@tom2012/cc-web 2026.4.20-b → 2026.4.20-c

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 (28) hide show
  1. package/README.md +1 -1
  2. package/backend/dist/index.d.ts.map +1 -1
  3. package/backend/dist/index.js +0 -6
  4. package/backend/dist/index.js.map +1 -1
  5. package/backend/dist/routes/filesystem.d.ts.map +1 -1
  6. package/backend/dist/routes/filesystem.js +0 -1
  7. package/backend/dist/routes/filesystem.js.map +1 -1
  8. package/frontend/dist/assets/AssistantMessageContent-CJjgmd_N.js +13 -0
  9. package/frontend/dist/assets/{GraphPreview-Ch_3lozG.js → GraphPreview-RFVYDef_.js} +1 -1
  10. package/frontend/dist/assets/{MobilePage-BUyBZIGk.js → MobilePage-DH1U9zmM.js} +4 -4
  11. package/frontend/dist/assets/{OfficePreview-DvPUEwFE.js → OfficePreview-sqDZ0-je.js} +2 -2
  12. package/frontend/dist/assets/{ProjectPage-DEXix3V3.js → ProjectPage-Dz5jkV71.js} +5 -5
  13. package/frontend/dist/assets/SettingsPage-B41wzoKs.js +13 -0
  14. package/frontend/dist/assets/{SkillHubPage-Cqip4-le.js → SkillHubPage-q9ST6TG_.js} +3 -3
  15. package/frontend/dist/assets/{chevron-down-B7gSUQDO.js → chevron-down-BYvlTx3e.js} +1 -1
  16. package/frontend/dist/assets/{chevron-up-CzlZZUvo.js → chevron-up-5CWyaSIP.js} +1 -1
  17. package/frontend/dist/assets/index-Bi1a2X3X.css +1 -0
  18. package/frontend/dist/assets/index-C9JRreZa.js +13 -0
  19. package/frontend/dist/assets/{index-CXWm66yF.js → index-DbEq0h3B.js} +1 -1
  20. package/frontend/dist/assets/{index-C0RwSVk6.js → index-DbpLbCD2.js} +7 -7
  21. package/frontend/dist/assets/{jszip.min-CQA8ZeOj.js → jszip.min-XVB3zf8x.js} +1 -1
  22. package/frontend/dist/assets/{search-BqD4Nj-c.js → search-df7u2kjN.js} +1 -1
  23. package/frontend/dist/index.html +2 -2
  24. package/package.json +1 -1
  25. package/frontend/dist/assets/AssistantMessageContent-CDu_OO0W.js +0 -13
  26. package/frontend/dist/assets/SettingsPage-BD5u0Nov.js +0 -13
  27. package/frontend/dist/assets/index-CWOuXpJO.js +0 -13
  28. package/frontend/dist/assets/index-C_UILLvR.css +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProjectPage-DEXix3V3.js","assets/purify.es-CgRAQgUo.js","assets/AssistantMessageContent-CDu_OO0W.js","assets/chevron-down-B7gSUQDO.js","assets/chevron-up-CzlZZUvo.js","assets/AssistantMessageContent-wklAmtGL.css","assets/index-CWOuXpJO.js","assets/search-BqD4Nj-c.js","assets/ProjectPage-9CEnUXvW.css","assets/SettingsPage-BD5u0Nov.js","assets/SkillHubPage-Cqip4-le.js","assets/MobilePage-BUyBZIGk.js"])))=>i.map(i=>d[i]);
2
- var e=Object.defineProperty,t=(t,n,r)=>((t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r)(t,"symbol"!=typeof n?n+"":n,r);function n(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var i={exports:{}},s={},l={exports:{}},u={},c=Symbol.for("react.element"),d=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),g=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),w=Symbol.iterator;var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,E={};function j(e,t,n){this.props=e,this.context=t,this.refs=E,this.updater=n||k}function C(){}function P(e,t,n){this.props=e,this.context=t,this.refs=E,this.updater=n||k}j.prototype.isReactComponent={},j.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): 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")},j.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},C.prototype=j.prototype;var N=P.prototype=new C;N.constructor=P,S(N,j.prototype),N.isPureReactComponent=!0;var T=Array.isArray,M=Object.prototype.hasOwnProperty,R={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};function D(e,t,n){var r,o={},a=null,i=null;if(null!=t)for(r in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(a=""+t.key),t)M.call(t,r)&&!L.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:c,type:e,key:a,ref:i,props:o,_owner:R.current}}function _(e){return"object"==typeof e&&null!==e&&e.$$typeof===c}var A=/\/+/g;function O(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function I(e,t,n,r,o){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var i=!1;if(null===e)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case c:case d:i=!0}}if(i)return o=o(i=e),e=""===r?"."+O(i,0):r,T(o)?(n="",null!=e&&(n=e.replace(A,"$&/")+"/"),I(o,t,n,"",function(e){return e})):null!=o&&(_(o)&&(o=function(e,t){return{$$typeof:c,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(A,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=""===r?".":r+":",T(e))for(var s=0;s<e.length;s++){var l=r+O(a=e[s],s);i+=I(a,t,n,l,o)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=w&&e[w]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),s=0;!(a=e.next()).done;)i+=I(a=a.value,t,n,l=r+O(a,s++),o);else if("object"===a)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function z(e,t,n){if(null==e)return e;var r=[],o=0;return I(e,r,"","",function(e){return t.call(n,e,o++)}),r}function F(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var V={current:null},B={transition:null},$={ReactCurrentDispatcher:V,ReactCurrentBatchConfig:B,ReactCurrentOwner:R};function U(){throw Error("act(...) is not supported in production builds of React.")}u.Children={map:z,forEach:function(e,t,n){z(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return z(e,function(){t++}),t},toArray:function(e){return z(e,function(e){return e})||[]},only:function(e){if(!_(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},u.Component=j,u.Fragment=f,u.Profiler=h,u.PureComponent=P,u.StrictMode=p,u.Suspense=y,u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$,u.act=U,u.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=S({},e.props),o=e.key,a=e.ref,i=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,i=R.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)M.call(t,l)&&!L.hasOwnProperty(l)&&(r[l]=void 0===t[l]&&void 0!==s?s[l]:t[l])}var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:c,type:e.type,key:o,ref:a,props:r,_owner:i}},u.createContext=function(e){return(e={$$typeof:g,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:m,_context:e},e.Consumer=e},u.createElement=D,u.createFactory=function(e){var t=D.bind(null,e);return t.type=e,t},u.createRef=function(){return{current:null}},u.forwardRef=function(e){return{$$typeof:v,render:e}},u.isValidElement=_,u.lazy=function(e){return{$$typeof:x,_payload:{_status:-1,_result:e},_init:F}},u.memo=function(e,t){return{$$typeof:b,type:e,compare:void 0===t?null:t}},u.startTransition=function(e){var t=B.transition;B.transition={};try{e()}finally{B.transition=t}},u.unstable_act=U,u.useCallback=function(e,t){return V.current.useCallback(e,t)},u.useContext=function(e){return V.current.useContext(e)},u.useDebugValue=function(){},u.useDeferredValue=function(e){return V.current.useDeferredValue(e)},u.useEffect=function(e,t){return V.current.useEffect(e,t)},u.useId=function(){return V.current.useId()},u.useImperativeHandle=function(e,t,n){return V.current.useImperativeHandle(e,t,n)},u.useInsertionEffect=function(e,t){return V.current.useInsertionEffect(e,t)},u.useLayoutEffect=function(e,t){return V.current.useLayoutEffect(e,t)},u.useMemo=function(e,t){return V.current.useMemo(e,t)},u.useReducer=function(e,t,n){return V.current.useReducer(e,t,n)},u.useRef=function(e){return V.current.useRef(e)},u.useState=function(e){return V.current.useState(e)},u.useSyncExternalStore=function(e,t,n){return V.current.useSyncExternalStore(e,t,n)},u.useTransition=function(){return V.current.useTransition()},u.version="18.3.1",l.exports=u;var W=l.exports;const H=o(W),G=n({__proto__:null,default:H},[W]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ProjectPage-Dz5jkV71.js","assets/purify.es-CgRAQgUo.js","assets/AssistantMessageContent-CJjgmd_N.js","assets/chevron-down-BYvlTx3e.js","assets/chevron-up-5CWyaSIP.js","assets/AssistantMessageContent-wklAmtGL.css","assets/index-C9JRreZa.js","assets/search-df7u2kjN.js","assets/ProjectPage-9CEnUXvW.css","assets/SettingsPage-B41wzoKs.js","assets/SkillHubPage-q9ST6TG_.js","assets/MobilePage-DH1U9zmM.js"])))=>i.map(i=>d[i]);
2
+ var e=Object.defineProperty,t=(t,n,r)=>((t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r)(t,"symbol"!=typeof n?n+"":n,r);function n(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function a(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var i={exports:{}},s={},l={exports:{}},u={},c=Symbol.for("react.element"),d=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),m=Symbol.for("react.provider"),g=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),w=Symbol.iterator;var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,E={};function j(e,t,n){this.props=e,this.context=t,this.refs=E,this.updater=n||k}function C(){}function P(e,t,n){this.props=e,this.context=t,this.refs=E,this.updater=n||k}j.prototype.isReactComponent={},j.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): 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")},j.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},C.prototype=j.prototype;var N=P.prototype=new C;N.constructor=P,S(N,j.prototype),N.isPureReactComponent=!0;var T=Array.isArray,M=Object.prototype.hasOwnProperty,R={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};function D(e,t,n){var r,o={},a=null,i=null;if(null!=t)for(r in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(a=""+t.key),t)M.call(t,r)&&!L.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:c,type:e,key:a,ref:i,props:o,_owner:R.current}}function _(e){return"object"==typeof e&&null!==e&&e.$$typeof===c}var A=/\/+/g;function O(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function I(e,t,n,r,o){var a=typeof e;"undefined"!==a&&"boolean"!==a||(e=null);var i=!1;if(null===e)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case c:case d:i=!0}}if(i)return o=o(i=e),e=""===r?"."+O(i,0):r,T(o)?(n="",null!=e&&(n=e.replace(A,"$&/")+"/"),I(o,t,n,"",function(e){return e})):null!=o&&(_(o)&&(o=function(e,t){return{$$typeof:c,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,n+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(A,"$&/")+"/")+e)),t.push(o)),1;if(i=0,r=""===r?".":r+":",T(e))for(var s=0;s<e.length;s++){var l=r+O(a=e[s],s);i+=I(a,t,n,l,o)}else if(l=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=w&&e[w]||e["@@iterator"])?e:null}(e),"function"==typeof l)for(e=l.call(e),s=0;!(a=e.next()).done;)i+=I(a=a.value,t,n,l=r+O(a,s++),o);else if("object"===a)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function z(e,t,n){if(null==e)return e;var r=[],o=0;return I(e,r,"","",function(e){return t.call(n,e,o++)}),r}function F(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var V={current:null},$={transition:null},B={ReactCurrentDispatcher:V,ReactCurrentBatchConfig:$,ReactCurrentOwner:R};function U(){throw Error("act(...) is not supported in production builds of React.")}u.Children={map:z,forEach:function(e,t,n){z(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return z(e,function(){t++}),t},toArray:function(e){return z(e,function(e){return e})||[]},only:function(e){if(!_(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},u.Component=j,u.Fragment=f,u.Profiler=h,u.PureComponent=P,u.StrictMode=p,u.Suspense=y,u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B,u.act=U,u.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=S({},e.props),o=e.key,a=e.ref,i=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,i=R.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)M.call(t,l)&&!L.hasOwnProperty(l)&&(r[l]=void 0===t[l]&&void 0!==s?s[l]:t[l])}var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:c,type:e.type,key:o,ref:a,props:r,_owner:i}},u.createContext=function(e){return(e={$$typeof:g,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:m,_context:e},e.Consumer=e},u.createElement=D,u.createFactory=function(e){var t=D.bind(null,e);return t.type=e,t},u.createRef=function(){return{current:null}},u.forwardRef=function(e){return{$$typeof:v,render:e}},u.isValidElement=_,u.lazy=function(e){return{$$typeof:x,_payload:{_status:-1,_result:e},_init:F}},u.memo=function(e,t){return{$$typeof:b,type:e,compare:void 0===t?null:t}},u.startTransition=function(e){var t=$.transition;$.transition={};try{e()}finally{$.transition=t}},u.unstable_act=U,u.useCallback=function(e,t){return V.current.useCallback(e,t)},u.useContext=function(e){return V.current.useContext(e)},u.useDebugValue=function(){},u.useDeferredValue=function(e){return V.current.useDeferredValue(e)},u.useEffect=function(e,t){return V.current.useEffect(e,t)},u.useId=function(){return V.current.useId()},u.useImperativeHandle=function(e,t,n){return V.current.useImperativeHandle(e,t,n)},u.useInsertionEffect=function(e,t){return V.current.useInsertionEffect(e,t)},u.useLayoutEffect=function(e,t){return V.current.useLayoutEffect(e,t)},u.useMemo=function(e,t){return V.current.useMemo(e,t)},u.useReducer=function(e,t,n){return V.current.useReducer(e,t,n)},u.useRef=function(e){return V.current.useRef(e)},u.useState=function(e){return V.current.useState(e)},u.useSyncExternalStore=function(e,t,n){return V.current.useSyncExternalStore(e,t,n)},u.useTransition=function(){return V.current.useTransition()},u.version="18.3.1",l.exports=u;var W=l.exports;const H=o(W),G=n({__proto__:null,default:H},[W]);
3
3
  /**
4
4
  * @license React
5
5
  * react-jsx-runtime.production.min.js
@@ -28,7 +28,7 @@ var Y=W,q=Symbol.for("react.element"),K=Symbol.for("react.fragment"),X=Object.pr
28
28
  *
29
29
  * This source code is licensed under the MIT license found in the
30
30
  * LICENSE file in the root directory of this source tree.
31
- */function ue(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}var ce=new Set,de={};function fe(e,t){pe(e,t),pe(e+"Capture",t)}function pe(e,t){for(de[e]=t,e=0;e<t.length;e++)ce.add(t[e])}var he=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),me=Object.prototype.hasOwnProperty,ge=/^[: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]*$/,ve={},ye={};function be(e,t,n,r,o,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xe[e]=new be(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xe[t]=new be(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){xe[e]=new be(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xe[e]=new be(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xe[e]=new be(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){xe[e]=new be(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){xe[e]=new be(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){xe[e]=new be(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){xe[e]=new be(e,5,!1,e.toLowerCase(),null,!1,!1)});var we=/[\-:]([a-z])/g;function ke(e){return e[1].toUpperCase()}function Se(e,t,n,r){var o=xe.hasOwnProperty(t)?xe[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!me.call(ye,e)||!me.call(ve,e)&&(ge.test(e)?ye[e]=!0:(ve[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(we,ke);xe[t]=new be(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(we,ke);xe[t]=new be(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(we,ke);xe[t]=new be(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){xe[e]=new be(e,1,!1,e.toLowerCase(),null,!1,!1)}),xe.xlinkHref=new be("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){xe[e]=new be(e,1,!1,e.toLowerCase(),null,!0,!0)});var Ee=se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,je=Symbol.for("react.element"),Ce=Symbol.for("react.portal"),Pe=Symbol.for("react.fragment"),Ne=Symbol.for("react.strict_mode"),Te=Symbol.for("react.profiler"),Me=Symbol.for("react.provider"),Re=Symbol.for("react.context"),Le=Symbol.for("react.forward_ref"),De=Symbol.for("react.suspense"),_e=Symbol.for("react.suspense_list"),Ae=Symbol.for("react.memo"),Oe=Symbol.for("react.lazy"),Ie=Symbol.for("react.offscreen"),ze=Symbol.iterator;function Fe(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=ze&&e[ze]||e["@@iterator"])?e:null}var Ve,Be=Object.assign;function $e(e){if(void 0===Ve)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ve=t&&t[1]||""}return"\n"+Ve+e}var Ue=!1;function We(e,t){if(!e||Ue)return"";Ue=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"==typeof u.stack){for(var o=u.stack.split("\n"),a=r.stack.split("\n"),i=o.length-1,s=a.length-1;1<=i&&0<=s&&o[i]!==a[s];)s--;for(;1<=i&&0<=s;i--,s--)if(o[i]!==a[s]){if(1!==i||1!==s)do{if(i--,0>--s||o[i]!==a[s]){var l="\n"+o[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=i&&0<=s);break}}}finally{Ue=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?$e(e):""}function He(e){switch(e.tag){case 5:return $e(e.type);case 16:return $e("Lazy");case 13:return $e("Suspense");case 19:return $e("SuspenseList");case 0:case 2:case 15:return e=We(e.type,!1);case 11:return e=We(e.type.render,!1);case 1:return e=We(e.type,!0);default:return""}}function Ge(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Pe:return"Fragment";case Ce:return"Portal";case Te:return"Profiler";case Ne:return"StrictMode";case De:return"Suspense";case _e:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Re:return(e.displayName||"Context")+".Consumer";case Me:return(e._context.displayName||"Context")+".Provider";case Le:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case Ae:return null!==(t=e.displayName||null)?t:Ge(e.type)||"Memo";case Oe:t=e._payload,e=e._init;try{return Ge(e(t))}catch(n){}}return null}function Ye(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ge(t);case 8:return t===Ne?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function qe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Ke(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Xe(e){e._valueTracker||(e._valueTracker=function(e){var t=Ke(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Qe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ke(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Ze(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Je(e,t){var n=t.checked;return Be({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function et(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=qe(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function tt(e,t){null!=(t=t.checked)&&Se(e,"checked",t,!1)}function nt(e,t){tt(e,t);var n=qe(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ot(e,t.type,n):t.hasOwnProperty("defaultValue")&&ot(e,t.type,qe(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function rt(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ot(e,t,n){"number"===t&&Ze(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var at=Array.isArray;function it(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+qe(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function st(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(ue(91));return Be({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function lt(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(ue(92));if(at(n)){if(1<n.length)throw Error(ue(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:qe(n)}}function ut(e,t){var n=qe(t.value),r=qe(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ct(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function dt(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ft(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?dt(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var pt,ht,mt=(ht=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((pt=pt||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pt.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return ht(e,t)})}:ht);function gt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var vt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yt=["Webkit","ms","Moz","O"];function bt(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||vt.hasOwnProperty(e)&&vt[e]?(""+t).trim():t+"px"}function xt(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=bt(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(vt).forEach(function(e){yt.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),vt[t]=vt[e]})});var wt=Be({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function kt(e,t){if(t){if(wt[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(ue(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(ue(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(ue(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(ue(62))}}function St(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;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 Et=null;function jt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ct=null,Pt=null,Nt=null;function Tt(e){if(e=Ea(e)){if("function"!=typeof Ct)throw Error(ue(280));var t=e.stateNode;t&&(t=Ca(t),Ct(e.stateNode,e.type,t))}}function Mt(e){Pt?Nt?Nt.push(e):Nt=[e]:Pt=e}function Rt(){if(Pt){var e=Pt,t=Nt;if(Nt=Pt=null,Tt(e),t)for(e=0;e<t.length;e++)Tt(t[e])}}function Lt(e,t){return e(t)}function Dt(){}var _t=!1;function At(e,t,n){if(_t)return e(t,n);_t=!0;try{return Lt(e,t,n)}finally{_t=!1,(null!==Pt||null!==Nt)&&(Dt(),Rt())}}function Ot(e,t){var n=e.stateNode;if(null===n)return null;var r=Ca(n);if(null===r)return null;n=r[t];e: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)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(ue(231,t,typeof n));return n}var It=!1;if(he)try{var zt={};Object.defineProperty(zt,"passive",{get:function(){It=!0}}),window.addEventListener("test",zt,zt),window.removeEventListener("test",zt,zt)}catch(ht){It=!1}function Ft(e,t,n,r,o,a,i,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Vt=!1,Bt=null,$t=!1,Ut=null,Wt={onError:function(e){Vt=!0,Bt=e}};function Ht(e,t,n,r,o,a,i,s,l){Vt=!1,Bt=null,Ft.apply(Wt,arguments)}function Gt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Yt(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function qt(e){if(Gt(e)!==e)throw Error(ue(188))}function Kt(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Gt(e)))throw Error(ue(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(r=o.return)){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return qt(o),e;if(a===r)return qt(o),t;a=a.sibling}throw Error(ue(188))}if(n.return!==r.return)n=o,r=a;else{for(var i=!1,s=o.child;s;){if(s===n){i=!0,n=o,r=a;break}if(s===r){i=!0,r=o,n=a;break}s=s.sibling}if(!i){for(s=a.child;s;){if(s===n){i=!0,n=a,r=o;break}if(s===r){i=!0,r=a,n=o;break}s=s.sibling}if(!i)throw Error(ue(189))}}if(n.alternate!==r)throw Error(ue(190))}if(3!==n.tag)throw Error(ue(188));return n.stateNode.current===n?e:t}(e))?Xt(e):null}function Xt(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Xt(e);if(null!==t)return t;e=e.sibling}return null}var Qt=le.unstable_scheduleCallback,Zt=le.unstable_cancelCallback,Jt=le.unstable_shouldYield,en=le.unstable_requestPaint,tn=le.unstable_now,nn=le.unstable_getCurrentPriorityLevel,rn=le.unstable_ImmediatePriority,on=le.unstable_UserBlockingPriority,an=le.unstable_NormalPriority,sn=le.unstable_LowPriority,ln=le.unstable_IdlePriority,un=null,cn=null;var dn=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(fn(e)/pn|0)|0},fn=Math.log,pn=Math.LN2;var hn=64,mn=4194304;function gn(e){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: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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function vn(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,a=e.pingedLanes,i=268435455&n;if(0!==i){var s=i&~o;0!==s?r=gn(s):0!==(a&=i)&&(r=gn(a))}else 0!==(i=n&~o)?r=gn(i):0!==a&&(r=gn(a));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&o)&&((o=r&-r)>=(a=t&-t)||16===o&&4194240&a))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-dn(t)),r|=e[n],t&=~o;return r}function yn(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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;default:return-1}}function bn(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function xn(){var e=hn;return!(4194240&(hn<<=1))&&(hn=64),e}function wn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function kn(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-dn(t)]=n}function Sn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-dn(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var En=0;function jn(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var Cn,Pn,Nn,Tn,Mn,Rn=!1,Ln=[],Dn=null,_n=null,An=null,On=new Map,In=new Map,zn=[],Fn="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 submit".split(" ");function Vn(e,t){switch(e){case"focusin":case"focusout":Dn=null;break;case"dragenter":case"dragleave":_n=null;break;case"mouseover":case"mouseout":An=null;break;case"pointerover":case"pointerout":On.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":In.delete(t.pointerId)}}function Bn(e,t,n,r,o,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[o]},null!==t&&(null!==(t=Ea(t))&&Pn(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function $n(e){var t=Sa(e.target);if(null!==t){var n=Gt(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Yt(n)))return e.blockedOn=t,void Mn(e.priority,function(){Nn(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Un(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=er(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Ea(n))&&Pn(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Et=r,n.target.dispatchEvent(r),Et=null,t.shift()}return!0}function Wn(e,t,n){Un(e)&&n.delete(t)}function Hn(){Rn=!1,null!==Dn&&Un(Dn)&&(Dn=null),null!==_n&&Un(_n)&&(_n=null),null!==An&&Un(An)&&(An=null),On.forEach(Wn),In.forEach(Wn)}function Gn(e,t){e.blockedOn===t&&(e.blockedOn=null,Rn||(Rn=!0,le.unstable_scheduleCallback(le.unstable_NormalPriority,Hn)))}function Yn(e){function t(t){return Gn(t,e)}if(0<Ln.length){Gn(Ln[0],e);for(var n=1;n<Ln.length;n++){var r=Ln[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Dn&&Gn(Dn,e),null!==_n&&Gn(_n,e),null!==An&&Gn(An,e),On.forEach(t),In.forEach(t),n=0;n<zn.length;n++)(r=zn[n]).blockedOn===e&&(r.blockedOn=null);for(;0<zn.length&&null===(n=zn[0]).blockedOn;)$n(n),null===n.blockedOn&&zn.shift()}var qn=Ee.ReactCurrentBatchConfig,Kn=!0;function Xn(e,t,n,r){var o=En,a=qn.transition;qn.transition=null;try{En=1,Zn(e,t,n,r)}finally{En=o,qn.transition=a}}function Qn(e,t,n,r){var o=En,a=qn.transition;qn.transition=null;try{En=4,Zn(e,t,n,r)}finally{En=o,qn.transition=a}}function Zn(e,t,n,r){if(Kn){var o=er(e,t,n,r);if(null===o)Ko(e,t,r,Jn,n),Vn(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Dn=Bn(Dn,e,t,n,r,o),!0;case"dragenter":return _n=Bn(_n,e,t,n,r,o),!0;case"mouseover":return An=Bn(An,e,t,n,r,o),!0;case"pointerover":var a=o.pointerId;return On.set(a,Bn(On.get(a)||null,e,t,n,r,o)),!0;case"gotpointercapture":return a=o.pointerId,In.set(a,Bn(In.get(a)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Vn(e,r),4&t&&-1<Fn.indexOf(e)){for(;null!==o;){var a=Ea(o);if(null!==a&&Cn(a),null===(a=er(e,t,n,r))&&Ko(e,t,r,Jn,n),a===o)break;o=a}null!==o&&r.stopPropagation()}else Ko(e,t,r,null,n)}}var Jn=null;function er(e,t,n,r){if(Jn=null,null!==(e=Sa(e=jt(r))))if(null===(t=Gt(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Yt(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Jn=e,null}function tr(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(nn()){case rn:return 1;case on:return 4;case an:case sn:return 16;case ln:return 536870912;default:return 16}default:return 16}}var nr=null,rr=null,or=null;function ar(){if(or)return or;var e,t,n=rr,r=n.length,o="value"in nr?nr.value:nr.textContent,a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===o[a-t];t++);return or=o.slice(e,1<t?1-t:void 0)}function ir(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function sr(){return!0}function lr(){return!1}function ur(e){function t(t,n,r,o,a){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(o):o[i]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?sr:lr,this.isPropagationStopped=lr,this}return Be(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=sr)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=sr)},persist:function(){},isPersistent:sr}),t}var cr,dr,fr,pr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hr=ur(pr),mr=Be({},pr,{view:0,detail:0}),gr=ur(mr),vr=Be({},mr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tr,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fr&&(fr&&"mousemove"===e.type?(cr=e.screenX-fr.screenX,dr=e.screenY-fr.screenY):dr=cr=0,fr=e),cr)},movementY:function(e){return"movementY"in e?e.movementY:dr}}),yr=ur(vr),br=ur(Be({},vr,{dataTransfer:0})),xr=ur(Be({},mr,{relatedTarget:0})),wr=ur(Be({},pr,{animationName:0,elapsedTime:0,pseudoElement:0})),kr=Be({},pr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Sr=ur(kr),Er=ur(Be({},pr,{data:0})),jr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cr={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"},Pr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Nr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Pr[e])&&!!t[e]}function Tr(){return Nr}var Mr=Be({},mr,{key:function(e){if(e.key){var t=jr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=ir(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Cr[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tr,charCode:function(e){return"keypress"===e.type?ir(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?ir(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Rr=ur(Mr),Lr=ur(Be({},vr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Dr=ur(Be({},mr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tr})),_r=ur(Be({},pr,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ar=Be({},vr,{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}),Or=ur(Ar),Ir=[9,13,27,32],zr=he&&"CompositionEvent"in window,Fr=null;he&&"documentMode"in document&&(Fr=document.documentMode);var Vr=he&&"TextEvent"in window&&!Fr,Br=he&&(!zr||Fr&&8<Fr&&11>=Fr),$r=String.fromCharCode(32),Ur=!1;function Wr(e,t){switch(e){case"keyup":return-1!==Ir.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Gr=!1;var Yr={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 qr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Yr[e.type]:"textarea"===t}function Kr(e,t,n,r){Mt(r),0<(t=Qo(t,"onChange")).length&&(n=new hr("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xr=null,Qr=null;function Zr(e){Uo(e,0)}function Jr(e){if(Qe(ja(e)))return e}function eo(e,t){if("change"===e)return t}var to=!1;if(he){var no;if(he){var ro="oninput"in document;if(!ro){var oo=document.createElement("div");oo.setAttribute("oninput","return;"),ro="function"==typeof oo.oninput}no=ro}else no=!1;to=no&&(!document.documentMode||9<document.documentMode)}function ao(){Xr&&(Xr.detachEvent("onpropertychange",io),Qr=Xr=null)}function io(e){if("value"===e.propertyName&&Jr(Qr)){var t=[];Kr(t,Qr,e,jt(e)),At(Zr,t)}}function so(e,t,n){"focusin"===e?(ao(),Qr=n,(Xr=t).attachEvent("onpropertychange",io)):"focusout"===e&&ao()}function lo(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Jr(Qr)}function uo(e,t){if("click"===e)return Jr(t)}function co(e,t){if("input"===e||"change"===e)return Jr(t)}var fo="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function po(e,t){if(fo(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===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 o=n[r];if(!me.call(t,o)||!fo(e[o],t[o]))return!1}return!0}function ho(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mo(e,t){var n,r=ho(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ho(r)}}function go(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?go(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function vo(){for(var e=window,t=Ze();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Ze((e=t.contentWindow).document)}return t}function yo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function bo(e){var t=vo(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&go(n.ownerDocument.documentElement,n)){if(null!==r&&yo(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,a=Math.min(r.start,o);r=void 0===r.end?a:Math.min(r.end,o),!e.extend&&a>r&&(o=r,r=a,a=o),o=mo(n,a);var i=mo(n,r);o&&i&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var xo=he&&"documentMode"in document&&11>=document.documentMode,wo=null,ko=null,So=null,Eo=!1;function jo(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Eo||null==wo||wo!==Ze(r)||("selectionStart"in(r=wo)&&yo(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},So&&po(So,r)||(So=r,0<(r=Qo(ko,"onSelect")).length&&(t=new hr("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=wo)))}function Co(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Po={animationend:Co("Animation","AnimationEnd"),animationiteration:Co("Animation","AnimationIteration"),animationstart:Co("Animation","AnimationStart"),transitionend:Co("Transition","TransitionEnd")},No={},To={};function Mo(e){if(No[e])return No[e];if(!Po[e])return e;var t,n=Po[e];for(t in n)if(n.hasOwnProperty(t)&&t in To)return No[e]=n[t];return e}he&&(To=document.createElement("div").style,"AnimationEvent"in window||(delete Po.animationend.animation,delete Po.animationiteration.animation,delete Po.animationstart.animation),"TransitionEvent"in window||delete Po.transitionend.transition);var Ro=Mo("animationend"),Lo=Mo("animationiteration"),Do=Mo("animationstart"),_o=Mo("transitionend"),Ao=new Map,Oo="abort auxClick 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(" ");function Io(e,t){Ao.set(e,t),fe(t,[e])}for(var zo=0;zo<Oo.length;zo++){var Fo=Oo[zo];Io(Fo.toLowerCase(),"on"+(Fo[0].toUpperCase()+Fo.slice(1)))}Io(Ro,"onAnimationEnd"),Io(Lo,"onAnimationIteration"),Io(Do,"onAnimationStart"),Io("dblclick","onDoubleClick"),Io("focusin","onFocus"),Io("focusout","onBlur"),Io(_o,"onTransitionEnd"),pe("onMouseEnter",["mouseout","mouseover"]),pe("onMouseLeave",["mouseout","mouseover"]),pe("onPointerEnter",["pointerout","pointerover"]),pe("onPointerLeave",["pointerout","pointerover"]),fe("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fe("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fe("onBeforeInput",["compositionend","keypress","textInput","paste"]),fe("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fe("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fe("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vo="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(" "),Bo=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vo));function $o(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,a,i,s,l){if(Ht.apply(this,arguments),Vt){if(!Vt)throw Error(ue(198));var u=Bt;Vt=!1,Bt=null,$t||($t=!0,Ut=u)}}(r,t,void 0,e),e.currentTarget=null}function Uo(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var s=r[i],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&o.isPropagationStopped())break e;$o(o,s,u),a=l}else for(i=0;i<r.length;i++){if(l=(s=r[i]).instance,u=s.currentTarget,s=s.listener,l!==a&&o.isPropagationStopped())break e;$o(o,s,u),a=l}}}if($t)throw e=Ut,$t=!1,Ut=null,e}function Wo(e,t){var n=t[xa];void 0===n&&(n=t[xa]=new Set);var r=e+"__bubble";n.has(r)||(qo(t,e,2,!1),n.add(r))}function Ho(e,t,n){var r=0;t&&(r|=4),qo(n,e,r,t)}var Go="_reactListening"+Math.random().toString(36).slice(2);function Yo(e){if(!e[Go]){e[Go]=!0,ce.forEach(function(t){"selectionchange"!==t&&(Bo.has(t)||Ho(t,!1,e),Ho(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Go]||(t[Go]=!0,Ho("selectionchange",!1,t))}}function qo(e,t,n,r){switch(tr(t)){case 1:var o=Xn;break;case 4:o=Qn;break;default:o=Zn}n=o.bind(null,t,n,e),o=void 0,!It||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Ko(e,t,n,r,o){var a=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===i)for(i=r.return;null!==i;){var l=i.tag;if((3===l||4===l)&&((l=i.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;i=i.return}for(;null!==s;){if(null===(i=Sa(s)))return;if(5===(l=i.tag)||6===l){r=a=i;continue e}s=s.parentNode}}r=r.return}At(function(){var r=a,o=jt(n),i=[];e:{var s=Ao.get(e);if(void 0!==s){var l=hr,u=e;switch(e){case"keypress":if(0===ir(n))break e;case"keydown":case"keyup":l=Rr;break;case"focusin":u="focus",l=xr;break;case"focusout":u="blur",l=xr;break;case"beforeblur":case"afterblur":l=xr;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=yr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=br;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Dr;break;case Ro:case Lo:case Do:l=wr;break;case _o:l=_r;break;case"scroll":l=gr;break;case"wheel":l=Or;break;case"copy":case"cut":case"paste":l=Sr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Lr}var c=!!(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=Ot(h,f))&&c.push(Xo(h,m,p)))),d)break;h=h.return}0<c.length&&(s=new l(s,u,null,n,o),i.push({event:s,listeners:c}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===Et||!(u=n.relatedTarget||n.fromElement)||!Sa(u)&&!u[ba])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?Sa(u):null)&&(u!==(d=Gt(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=yr,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=Lr,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:ja(l),p=null==u?s:ja(u),(s=new c(m,h+"leave",l,n,o)).target=d,s.relatedTarget=p,m=null,Sa(o)===r&&((c=new c(f,h+"enter",u,n,o)).target=p,c.relatedTarget=d,m=c),d=m,l&&u)e:{for(f=u,h=0,p=c=l;p;p=Zo(p))h++;for(p=0,m=f;m;m=Zo(m))p++;for(;0<h-p;)c=Zo(c),h--;for(;0<p-h;)f=Zo(f),p--;for(;h--;){if(c===f||null!==f&&c===f.alternate)break e;c=Zo(c),f=Zo(f)}c=null}else c=null;null!==l&&Jo(i,s,l,c,!1),null!==u&&null!==d&&Jo(i,d,u,c,!0)}if("select"===(l=(s=r?ja(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=eo;else if(qr(s))if(to)g=co;else{g=lo;var v=so}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=uo);switch(g&&(g=g(e,r))?Kr(i,g,n,o):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ot(s,"number",s.value)),v=r?ja(r):window,e){case"focusin":(qr(v)||"true"===v.contentEditable)&&(wo=v,ko=r,So=null);break;case"focusout":So=ko=wo=null;break;case"mousedown":Eo=!0;break;case"contextmenu":case"mouseup":case"dragend":Eo=!1,jo(i,n,o);break;case"selectionchange":if(xo)break;case"keydown":case"keyup":jo(i,n,o)}var y;if(zr)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Gr?Wr(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Br&&"ko"!==n.locale&&(Gr||"onCompositionStart"!==b?"onCompositionEnd"===b&&Gr&&(y=ar()):(rr="value"in(nr=o)?nr.value:nr.textContent,Gr=!0)),0<(v=Qo(r,b)).length&&(b=new Er(b,e,null,n,o),i.push({event:b,listeners:v}),y?b.data=y:null!==(y=Hr(n))&&(b.data=y))),(y=Vr?function(e,t){switch(e){case"compositionend":return Hr(t);case"keypress":return 32!==t.which?null:(Ur=!0,$r);case"textInput":return(e=t.data)===$r&&Ur?null:e;default:return null}}(e,n):function(e,t){if(Gr)return"compositionend"===e||!zr&&Wr(e,t)?(e=ar(),or=rr=nr=null,Gr=!1,e):null;switch(e){case"paste":default: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 Br&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Qo(r,"onBeforeInput")).length&&(o=new Er("onBeforeInput","beforeinput",null,n,o),i.push({event:o,listeners:r}),o.data=y))}Uo(i,t)})}function Xo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Qo(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,a=o.stateNode;5===o.tag&&null!==a&&(o=a,null!=(a=Ot(e,n))&&r.unshift(Xo(e,a,o)),null!=(a=Ot(e,t))&&r.push(Xo(e,a,o))),e=e.return}return r}function Zo(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Jo(e,t,n,r,o){for(var a=t._reactName,i=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,o?null!=(l=Ot(n,a))&&i.unshift(Xo(n,l,s)):o||null!=(l=Ot(n,a))&&i.push(Xo(n,l,s))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var ea=/\r\n?/g,ta=/\u0000|\uFFFD/g;function na(e){return("string"==typeof e?e:""+e).replace(ea,"\n").replace(ta,"")}function ra(e,t,n){if(t=na(t),na(e)!==t&&n)throw Error(ue(425))}function oa(){}var aa=null,ia=null;function sa(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var la="function"==typeof setTimeout?setTimeout:void 0,ua="function"==typeof clearTimeout?clearTimeout:void 0,ca="function"==typeof Promise?Promise:void 0,da="function"==typeof queueMicrotask?queueMicrotask:void 0!==ca?function(e){return ca.resolve(null).then(e).catch(fa)}:la;function fa(e){setTimeout(function(){throw e})}function pa(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Yn(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Yn(t)}function ha(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ma(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ga=Math.random().toString(36).slice(2),va="__reactFiber$"+ga,ya="__reactProps$"+ga,ba="__reactContainer$"+ga,xa="__reactEvents$"+ga,wa="__reactListeners$"+ga,ka="__reactHandles$"+ga;function Sa(e){var t=e[va];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ba]||n[va]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ma(e);null!==e;){if(n=e[va])return n;e=ma(e)}return t}n=(e=n).parentNode}return null}function Ea(e){return!(e=e[va]||e[ba])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ja(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(ue(33))}function Ca(e){return e[ya]||null}var Pa=[],Na=-1;function Ta(e){return{current:e}}function Ma(e){0>Na||(e.current=Pa[Na],Pa[Na]=null,Na--)}function Ra(e,t){Na++,Pa[Na]=e.current,e.current=t}var La={},Da=Ta(La),_a=Ta(!1),Aa=La;function Oa(e,t){var n=e.type.contextTypes;if(!n)return La;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in n)a[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Ia(e){return null!=(e=e.childContextTypes)}function za(){Ma(_a),Ma(Da)}function Fa(e,t,n){if(Da.current!==La)throw Error(ue(168));Ra(Da,t),Ra(_a,n)}function Va(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(ue(108,Ye(e)||"Unknown",o));return Be({},n,r)}function Ba(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||La,Aa=Da.current,Ra(Da,e),Ra(_a,_a.current),!0}function $a(e,t,n){var r=e.stateNode;if(!r)throw Error(ue(169));n?(e=Va(e,t,Aa),r.__reactInternalMemoizedMergedChildContext=e,Ma(_a),Ma(Da),Ra(Da,e)):Ma(_a),Ra(_a,n)}var Ua=null,Wa=!1,Ha=!1;function Ga(e){null===Ua?Ua=[e]:Ua.push(e)}function Ya(){if(!Ha&&null!==Ua){Ha=!0;var e=0,t=En;try{var n=Ua;for(En=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ua=null,Wa=!1}catch(o){throw null!==Ua&&(Ua=Ua.slice(e+1)),Qt(rn,Ya),o}finally{En=t,Ha=!1}}return null}var qa=[],Ka=0,Xa=null,Qa=0,Za=[],Ja=0,ei=null,ti=1,ni="";function ri(e,t){qa[Ka++]=Qa,qa[Ka++]=Xa,Xa=e,Qa=t}function oi(e,t,n){Za[Ja++]=ti,Za[Ja++]=ni,Za[Ja++]=ei,ei=e;var r=ti;e=ni;var o=32-dn(r)-1;r&=~(1<<o),n+=1;var a=32-dn(t)+o;if(30<a){var i=o-o%5;a=(r&(1<<i)-1).toString(32),r>>=i,o-=i,ti=1<<32-dn(t)+o|n<<o|r,ni=a+e}else ti=1<<a|n<<o|r,ni=e}function ai(e){null!==e.return&&(ri(e,1),oi(e,1,0))}function ii(e){for(;e===Xa;)Xa=qa[--Ka],qa[Ka]=null,Qa=qa[--Ka],qa[Ka]=null;for(;e===ei;)ei=Za[--Ja],Za[Ja]=null,ni=Za[--Ja],Za[Ja]=null,ti=Za[--Ja],Za[Ja]=null}var si=null,li=null,ui=!1,ci=null;function di(e,t){var n=Ac(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function fi(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,si=e,li=ha(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,si=e,li=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==ei?{id:ti,overflow:ni}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ac(18,null,null,0)).stateNode=t,n.return=e,e.child=n,si=e,li=null,!0);default:return!1}}function pi(e){return!(!(1&e.mode)||128&e.flags)}function hi(e){if(ui){var t=li;if(t){var n=t;if(!fi(e,t)){if(pi(e))throw Error(ue(418));t=ha(n.nextSibling);var r=si;t&&fi(e,t)?di(r,n):(e.flags=-4097&e.flags|2,ui=!1,si=e)}}else{if(pi(e))throw Error(ue(418));e.flags=-4097&e.flags|2,ui=!1,si=e}}}function mi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;si=e}function gi(e){if(e!==si)return!1;if(!ui)return mi(e),ui=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!sa(e.type,e.memoizedProps)),t&&(t=li)){if(pi(e))throw vi(),Error(ue(418));for(;t;)di(e,t),t=ha(t.nextSibling)}if(mi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(ue(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){li=ha(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}li=null}}else li=si?ha(e.stateNode.nextSibling):null;return!0}function vi(){for(var e=li;e;)e=ha(e.nextSibling)}function yi(){li=si=null,ui=!1}function bi(e){null===ci?ci=[e]:ci.push(e)}var xi=Ee.ReactCurrentBatchConfig;function wi(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(ue(309));var r=n.stateNode}if(!r)throw Error(ue(147,e));var o=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:((t=function(e){var t=o.refs;null===e?delete t[a]:t[a]=e})._stringRef=a,t)}if("string"!=typeof e)throw Error(ue(284));if(!n._owner)throw Error(ue(290,e))}return e}function ki(e,t){throw e=Object.prototype.toString.call(t),Error(ue(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Si(e){return(0,e._init)(e._payload)}function Ei(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Ic(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function i(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Bc(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){var a=n.type;return a===Pe?c(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===Oe&&Si(a)===t.type)?((r=o(t,n.props)).ref=wi(e,t,n),r.return=e,r):((r=zc(n.type,n.key,n.props,null,e.mode,r)).ref=wi(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=$c(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function c(e,t,n,r,a){return null===t||7!==t.tag?((t=Fc(n,e.mode,r,a)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Bc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case je:return(n=zc(t.type,t.key,t.props,null,e.mode,n)).ref=wi(e,null,t),n.return=e,n;case Ce:return(t=$c(t,e.mode,n)).return=e,t;case Oe:return d(e,(0,t._init)(t._payload),n)}if(at(t)||Fe(t))return(t=Fc(t,e.mode,n,null)).return=e,t;ki(e,t)}return null}function f(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case je:return n.key===o?l(e,t,n,r):null;case Ce:return n.key===o?u(e,t,n,r):null;case Oe:return f(e,t,(o=n._init)(n._payload),r)}if(at(n)||Fe(n))return null!==o?null:c(e,t,n,r,null);ki(e,n)}return null}function p(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case je:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o);case Ce:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case Oe:return p(e,t,n,(0,r._init)(r._payload),o)}if(at(r)||Fe(r))return c(t,e=e.get(n)||null,r,o,null);ki(t,r)}return null}return function s(l,u,c,h){if("object"==typeof c&&null!==c&&c.type===Pe&&null===c.key&&(c=c.props.children),"object"==typeof c&&null!==c){switch(c.$$typeof){case je:e:{for(var m=c.key,g=u;null!==g;){if(g.key===m){if((m=c.type)===Pe){if(7===g.tag){n(l,g.sibling),(u=o(g,c.props.children)).return=l,l=u;break e}}else if(g.elementType===m||"object"==typeof m&&null!==m&&m.$$typeof===Oe&&Si(m)===g.type){n(l,g.sibling),(u=o(g,c.props)).ref=wi(l,g,c),u.return=l,l=u;break e}n(l,g);break}t(l,g),g=g.sibling}c.type===Pe?((u=Fc(c.props.children,l.mode,h,c.key)).return=l,l=u):((h=zc(c.type,c.key,c.props,null,l.mode,h)).ref=wi(l,u,c),h.return=l,l=h)}return i(l);case Ce:e:{for(g=c.key;null!==u;){if(u.key===g){if(4===u.tag&&u.stateNode.containerInfo===c.containerInfo&&u.stateNode.implementation===c.implementation){n(l,u.sibling),(u=o(u,c.children||[])).return=l,l=u;break e}n(l,u);break}t(l,u),u=u.sibling}(u=$c(c,l.mode,h)).return=l,l=u}return i(l);case Oe:return s(l,u,(g=c._init)(c._payload),h)}if(at(c))return function(o,i,s,l){for(var u=null,c=null,h=i,m=i=0,g=null;null!==h&&m<s.length;m++){h.index>m?(g=h,h=null):g=h.sibling;var v=f(o,h,s[m],l);if(null===v){null===h&&(h=g);break}e&&h&&null===v.alternate&&t(o,h),i=a(v,i,m),null===c?u=v:c.sibling=v,c=v,h=g}if(m===s.length)return n(o,h),ui&&ri(o,m),u;if(null===h){for(;m<s.length;m++)null!==(h=d(o,s[m],l))&&(i=a(h,i,m),null===c?u=h:c.sibling=h,c=h);return ui&&ri(o,m),u}for(h=r(o,h);m<s.length;m++)null!==(g=p(h,o,m,s[m],l))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),i=a(g,i,m),null===c?u=g:c.sibling=g,c=g);return e&&h.forEach(function(e){return t(o,e)}),ui&&ri(o,m),u}(l,u,c,h);if(Fe(c))return function(o,i,s,l){var u=Fe(s);if("function"!=typeof u)throw Error(ue(150));if(null==(s=u.call(s)))throw Error(ue(151));for(var c=u=null,h=i,m=i=0,g=null,v=s.next();null!==h&&!v.done;m++,v=s.next()){h.index>m?(g=h,h=null):g=h.sibling;var y=f(o,h,v.value,l);if(null===y){null===h&&(h=g);break}e&&h&&null===y.alternate&&t(o,h),i=a(y,i,m),null===c?u=y:c.sibling=y,c=y,h=g}if(v.done)return n(o,h),ui&&ri(o,m),u;if(null===h){for(;!v.done;m++,v=s.next())null!==(v=d(o,v.value,l))&&(i=a(v,i,m),null===c?u=v:c.sibling=v,c=v);return ui&&ri(o,m),u}for(h=r(o,h);!v.done;m++,v=s.next())null!==(v=p(h,o,m,v.value,l))&&(e&&null!==v.alternate&&h.delete(null===v.key?m:v.key),i=a(v,i,m),null===c?u=v:c.sibling=v,c=v);return e&&h.forEach(function(e){return t(o,e)}),ui&&ri(o,m),u}(l,u,c,h);ki(l,c)}return"string"==typeof c&&""!==c||"number"==typeof c?(c=""+c,null!==u&&6===u.tag?(n(l,u.sibling),(u=o(u,c)).return=l,l=u):(n(l,u),(u=Bc(c,l.mode,h)).return=l,l=u),i(l)):n(l,u)}}var ji=Ei(!0),Ci=Ei(!1),Pi=Ta(null),Ni=null,Ti=null,Mi=null;function Ri(){Mi=Ti=Ni=null}function Li(e){var t=Pi.current;Ma(Pi),e._currentValue=t}function Di(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function _i(e,t){Ni=e,Mi=Ti=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Sl=!0),e.firstContext=null)}function Ai(e){var t=e._currentValue;if(Mi!==e)if(e={context:e,memoizedValue:t,next:null},null===Ti){if(null===Ni)throw Error(ue(308));Ti=e,Ni.dependencies={lanes:0,firstContext:e}}else Ti=Ti.next=e;return t}var Oi=null;function Ii(e){null===Oi?Oi=[e]:Oi.push(e)}function zi(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Ii(t)):(n.next=o.next,o.next=n),t.interleaved=n,Fi(e,r)}function Fi(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Vi=!1;function Bi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $i(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ui(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wi(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Lu){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Fi(e,n)}return null===(o=r.interleaved)?(t.next=t,Ii(r)):(t.next=o.next,o.next=t),r.interleaved=t,Fi(e,n)}function Hi(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Sn(e,n)}}function Gi(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?o=a=i:a=a.next=i,n=n.next}while(null!==n);null===a?o=a=t:a=a.next=t}else o=a=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Yi(e,t,n,r){var o=e.updateQueue;Vi=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,u=l.next;l.next=null,null===i?a=u:i.next=u,i=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==a){var d=o.baseState;for(i=0,c=u=l=null,s=a;;){var f=s.lane,p=s.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=m.payload)?h.call(p,d,f):h))break e;d=Be({},d,f);break e;case 2:Vi=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=o.effects)?o.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=p,l=d):c=c.next=p,i|=f;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(f=s).next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}if(null===c&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,null!==(t=o.shared.interleaved)){o=t;do{i|=o.lane,o=o.next}while(o!==t)}else null===a&&(o.shared.lanes=0);Vu|=i,e.lanes=i,e.memoizedState=d}}function qi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(ue(191,o));o.call(r)}}}var Ki={},Xi=Ta(Ki),Qi=Ta(Ki),Zi=Ta(Ki);function Ji(e){if(e===Ki)throw Error(ue(174));return e}function es(e,t){switch(Ra(Zi,t),Ra(Qi,e),Ra(Xi,Ki),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ft(null,"");break;default:t=ft(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ma(Xi),Ra(Xi,t)}function ts(){Ma(Xi),Ma(Qi),Ma(Zi)}function ns(e){Ji(Zi.current);var t=Ji(Xi.current),n=ft(t,e.type);t!==n&&(Ra(Qi,e),Ra(Xi,n))}function rs(e){Qi.current===e&&(Ma(Xi),Ma(Qi))}var os=Ta(0);function as(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var is=[];function ss(){for(var e=0;e<is.length;e++)is[e]._workInProgressVersionPrimary=null;is.length=0}var ls=Ee.ReactCurrentDispatcher,us=Ee.ReactCurrentBatchConfig,cs=0,ds=null,fs=null,ps=null,hs=!1,ms=!1,gs=0,vs=0;function ys(){throw Error(ue(321))}function bs(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!fo(e[n],t[n]))return!1;return!0}function xs(e,t,n,r,o,a){if(cs=a,ds=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ls.current=null===e||null===e.memoizedState?rl:ol,e=n(r,o),ms){a=0;do{if(ms=!1,gs=0,25<=a)throw Error(ue(301));a+=1,ps=fs=null,t.updateQueue=null,ls.current=al,e=n(r,o)}while(ms)}if(ls.current=nl,t=null!==fs&&null!==fs.next,cs=0,ps=fs=ds=null,hs=!1,t)throw Error(ue(300));return e}function ws(){var e=0!==gs;return gs=0,e}function ks(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ps?ds.memoizedState=ps=e:ps=ps.next=e,ps}function Ss(){if(null===fs){var e=ds.alternate;e=null!==e?e.memoizedState:null}else e=fs.next;var t=null===ps?ds.memoizedState:ps.next;if(null!==t)ps=t,fs=e;else{if(null===e)throw Error(ue(310));e={memoizedState:(fs=e).memoizedState,baseState:fs.baseState,baseQueue:fs.baseQueue,queue:fs.queue,next:null},null===ps?ds.memoizedState=ps=e:ps=ps.next=e}return ps}function Es(e,t){return"function"==typeof t?t(e):t}function js(e){var t=Ss(),n=t.queue;if(null===n)throw Error(ue(311));n.lastRenderedReducer=e;var r=fs,o=r.baseQueue,a=n.pending;if(null!==a){if(null!==o){var i=o.next;o.next=a.next,a.next=i}r.baseQueue=o=a,n.pending=null}if(null!==o){a=o.next,r=r.baseState;var s=i=null,l=null,u=a;do{var c=u.lane;if((cs&c)===c)null!==l&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===l?(s=l=d,i=r):l=l.next=d,ds.lanes|=c,Vu|=c}u=u.next}while(null!==u&&u!==a);null===l?i=r:l.next=s,fo(r,t.memoizedState)||(Sl=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{a=o.lane,ds.lanes|=a,Vu|=a,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Cs(e){var t=Ss(),n=t.queue;if(null===n)throw Error(ue(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(null!==o){n.pending=null;var i=o=o.next;do{a=e(a,i.action),i=i.next}while(i!==o);fo(a,t.memoizedState)||(Sl=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Ps(){}function Ns(e,t){var n=ds,r=Ss(),o=t(),a=!fo(r.memoizedState,o);if(a&&(r.memoizedState=o,Sl=!0),r=r.queue,Vs(Rs.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ps&&1&ps.memoizedState.tag){if(n.flags|=2048,As(9,Ms.bind(null,n,r,o,t),void 0,null),null===Du)throw Error(ue(349));30&cs||Ts(n,t,o)}return o}function Ts(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ds.updateQueue)?(t={lastEffect:null,stores:null},ds.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ms(e,t,n,r){t.value=n,t.getSnapshot=r,Ls(t)&&Ds(e)}function Rs(e,t,n){return n(function(){Ls(t)&&Ds(e)})}function Ls(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!fo(e,n)}catch(r){return!0}}function Ds(e){var t=Fi(e,1);null!==t&&ic(t,e,1,-1)}function _s(e){var t=ks();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Es,lastRenderedState:e},t.queue=e,e=e.dispatch=Zs.bind(null,ds,e),[t.memoizedState,e]}function As(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ds.updateQueue)?(t={lastEffect:null,stores:null},ds.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Os(){return Ss().memoizedState}function Is(e,t,n,r){var o=ks();ds.flags|=e,o.memoizedState=As(1|t,n,void 0,void 0===r?null:r)}function zs(e,t,n,r){var o=Ss();r=void 0===r?null:r;var a=void 0;if(null!==fs){var i=fs.memoizedState;if(a=i.destroy,null!==r&&bs(r,i.deps))return void(o.memoizedState=As(t,n,a,r))}ds.flags|=e,o.memoizedState=As(1|t,n,a,r)}function Fs(e,t){return Is(8390656,8,e,t)}function Vs(e,t){return zs(2048,8,e,t)}function Bs(e,t){return zs(4,2,e,t)}function $s(e,t){return zs(4,4,e,t)}function Us(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ws(e,t,n){return n=null!=n?n.concat([e]):null,zs(4,4,Us.bind(null,t,e),n)}function Hs(){}function Gs(e,t){var n=Ss();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&bs(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ys(e,t){var n=Ss();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&bs(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function qs(e,t,n){return 21&cs?(fo(n,t)||(n=xn(),ds.lanes|=n,Vu|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Sl=!0),e.memoizedState=n)}function Ks(e,t){var n=En;En=0!==n&&4>n?n:4,e(!0);var r=us.transition;us.transition={};try{e(!1),t()}finally{En=n,us.transition=r}}function Xs(){return Ss().memoizedState}function Qs(e,t,n){var r=ac(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Js(e))el(t,n);else if(null!==(n=zi(e,t,n,r))){ic(n,e,r,oc()),tl(n,t,r)}}function Zs(e,t,n){var r=ac(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Js(e))el(t,o);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var i=t.lastRenderedState,s=a(i,n);if(o.hasEagerState=!0,o.eagerState=s,fo(s,i)){var l=t.interleaved;return null===l?(o.next=o,Ii(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(u){}null!==(n=zi(e,t,o,r))&&(ic(n,e,r,o=oc()),tl(n,t,r))}}function Js(e){var t=e.alternate;return e===ds||null!==t&&t===ds}function el(e,t){ms=hs=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function tl(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Sn(e,n)}}var nl={readContext:Ai,useCallback:ys,useContext:ys,useEffect:ys,useImperativeHandle:ys,useInsertionEffect:ys,useLayoutEffect:ys,useMemo:ys,useReducer:ys,useRef:ys,useState:ys,useDebugValue:ys,useDeferredValue:ys,useTransition:ys,useMutableSource:ys,useSyncExternalStore:ys,useId:ys,unstable_isNewReconciler:!1},rl={readContext:Ai,useCallback:function(e,t){return ks().memoizedState=[e,void 0===t?null:t],e},useContext:Ai,useEffect:Fs,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Is(4194308,4,Us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Is(4194308,4,e,t)},useInsertionEffect:function(e,t){return Is(4,2,e,t)},useMemo:function(e,t){var n=ks();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ks();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Qs.bind(null,ds,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ks().memoizedState=e},useState:_s,useDebugValue:Hs,useDeferredValue:function(e){return ks().memoizedState=e},useTransition:function(){var e=_s(!1),t=e[0];return e=Ks.bind(null,e[1]),ks().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ds,o=ks();if(ui){if(void 0===n)throw Error(ue(407));n=n()}else{if(n=t(),null===Du)throw Error(ue(349));30&cs||Ts(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,Fs(Rs.bind(null,r,a,e),[e]),r.flags|=2048,As(9,Ms.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=ks(),t=Du.identifierPrefix;if(ui){var n=ni;t=":"+t+"R"+(n=(ti&~(1<<32-dn(ti)-1)).toString(32)+n),0<(n=gs++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=vs++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ol={readContext:Ai,useCallback:Gs,useContext:Ai,useEffect:Vs,useImperativeHandle:Ws,useInsertionEffect:Bs,useLayoutEffect:$s,useMemo:Ys,useReducer:js,useRef:Os,useState:function(){return js(Es)},useDebugValue:Hs,useDeferredValue:function(e){return qs(Ss(),fs.memoizedState,e)},useTransition:function(){return[js(Es)[0],Ss().memoizedState]},useMutableSource:Ps,useSyncExternalStore:Ns,useId:Xs,unstable_isNewReconciler:!1},al={readContext:Ai,useCallback:Gs,useContext:Ai,useEffect:Vs,useImperativeHandle:Ws,useInsertionEffect:Bs,useLayoutEffect:$s,useMemo:Ys,useReducer:Cs,useRef:Os,useState:function(){return Cs(Es)},useDebugValue:Hs,useDeferredValue:function(e){var t=Ss();return null===fs?t.memoizedState=e:qs(t,fs.memoizedState,e)},useTransition:function(){return[Cs(Es)[0],Ss().memoizedState]},useMutableSource:Ps,useSyncExternalStore:Ns,useId:Xs,unstable_isNewReconciler:!1};function il(e,t){if(e&&e.defaultProps){for(var n in t=Be({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function sl(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Be({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ll={isMounted:function(e){return!!(e=e._reactInternals)&&Gt(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=oc(),o=ac(e),a=Ui(r,o);a.payload=t,null!=n&&(a.callback=n),null!==(t=Wi(e,a,o))&&(ic(t,e,o,r),Hi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=oc(),o=ac(e),a=Ui(r,o);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=Wi(e,a,o))&&(ic(t,e,o,r),Hi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=oc(),r=ac(e),o=Ui(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=Wi(e,o,r))&&(ic(t,e,r,n),Hi(t,e,r))}};function ul(e,t,n,r,o,a,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,i):!t.prototype||!t.prototype.isPureReactComponent||(!po(n,r)||!po(o,a))}function cl(e,t,n){var r=!1,o=La,a=t.contextType;return"object"==typeof a&&null!==a?a=Ai(a):(o=Ia(t)?Aa:Da.current,a=(r=null!=(r=t.contextTypes))?Oa(e,o):La),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ll,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function dl(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ll.enqueueReplaceState(t,t.state,null)}function fl(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},Bi(e);var a=t.contextType;"object"==typeof a&&null!==a?o.context=Ai(a):(a=Ia(t)?Aa:Da.current,o.context=Oa(e,a)),o.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(sl(e,t,a,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&ll.enqueueReplaceState(o,o.state,null),Yi(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function pl(e,t){try{var n="",r=t;do{n+=He(r),r=r.return}while(r);var o=n}catch(a){o="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:o,digest:null}}function hl(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ml(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var gl="function"==typeof WeakMap?WeakMap:Map;function vl(e,t,n){(n=Ui(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){qu||(qu=!0,Ku=r),ml(0,t)},n}function yl(e,t,n){(n=Ui(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ml(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){ml(0,t),"function"!=typeof r&&(null===Xu?Xu=new Set([this]):Xu.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function bl(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new gl;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Tc.bind(null,e,t,n),t.then(e,e))}function xl(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function wl(e,t,n,r,o){return 1&e.mode?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ui(-1,1)).tag=2,Wi(n,t,1))),n.lanes|=1),e)}var kl=Ee.ReactCurrentOwner,Sl=!1;function El(e,t,n,r){t.child=null===e?Ci(t,null,n,r):ji(t,e.child,n,r)}function jl(e,t,n,r,o){n=n.render;var a=t.ref;return _i(t,o),r=xs(e,t,n,r,a,o),n=ws(),null===e||Sl?(ui&&n&&ai(t),t.flags|=1,El(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ql(e,t,o))}function Cl(e,t,n,r,o){if(null===e){var a=n.type;return"function"!=typeof a||Oc(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=zc(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Pl(e,t,a,r,o))}if(a=e.child,0===(e.lanes&o)){var i=a.memoizedProps;if((n=null!==(n=n.compare)?n:po)(i,r)&&e.ref===t.ref)return ql(e,t,o)}return t.flags|=1,(e=Ic(a,r)).ref=t.ref,e.return=t,t.child=e}function Pl(e,t,n,r,o){if(null!==e){var a=e.memoizedProps;if(po(a,r)&&e.ref===t.ref){if(Sl=!1,t.pendingProps=r=a,0===(e.lanes&o))return t.lanes=e.lanes,ql(e,t,o);131072&e.flags&&(Sl=!0)}}return Ml(e,t,n,r,o)}function Nl(e,t,n){var r=t.pendingProps,o=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ra(Iu,Ou),Ou|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Ra(Iu,Ou),Ou|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ra(Iu,Ou),Ou|=n;else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Ra(Iu,Ou),Ou|=r;return El(e,t,o,n),t.child}function Tl(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ml(e,t,n,r,o){var a=Ia(n)?Aa:Da.current;return a=Oa(t,a),_i(t,o),n=xs(e,t,n,r,a,o),r=ws(),null===e||Sl?(ui&&r&&ai(t),t.flags|=1,El(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ql(e,t,o))}function Rl(e,t,n,r,o){if(Ia(n)){var a=!0;Ba(t)}else a=!1;if(_i(t,o),null===t.stateNode)Yl(e,t),cl(t,n,r),fl(t,n,r,o),r=!0;else if(null===e){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,u=n.contextType;"object"==typeof u&&null!==u?u=Ai(u):u=Oa(t,u=Ia(n)?Aa:Da.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==r||l!==u)&&dl(t,i,r,u),Vi=!1;var f=t.memoizedState;i.state=f,Yi(t,r,i,o),l=t.memoizedState,s!==r||f!==l||_a.current||Vi?("function"==typeof c&&(sl(t,n,c,r),l=t.memoizedState),(s=Vi||ul(t,n,s,r,f,l,u))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=u,r=s):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,$i(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:il(t.type,s),i.props=u,d=t.pendingProps,f=i.context,"object"==typeof(l=n.contextType)&&null!==l?l=Ai(l):l=Oa(t,l=Ia(n)?Aa:Da.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==d||f!==l)&&dl(t,i,r,l),Vi=!1,f=t.memoizedState,i.state=f,Yi(t,r,i,o);var h=t.memoizedState;s!==d||f!==h||_a.current||Vi?("function"==typeof p&&(sl(t,n,p,r),h=t.memoizedState),(u=Vi||ul(t,n,u,r,f,h,l)||!1)?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,h,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),i.props=r,i.state=h,i.context=l,r=u):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Ll(e,t,n,r,a,o)}function Ll(e,t,n,r,o,a){Tl(e,t);var i=!!(128&t.flags);if(!r&&!i)return o&&$a(t,n,!1),ql(e,t,a);r=t.stateNode,kl.current=t;var s=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=ji(t,e.child,null,a),t.child=ji(t,null,s,a)):El(e,t,s,a),t.memoizedState=r.state,o&&$a(t,n,!0),t.child}function Dl(e){var t=e.stateNode;t.pendingContext?Fa(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Fa(0,t.context,!1),es(e,t.containerInfo)}function _l(e,t,n,r,o){return yi(),bi(o),t.flags|=256,El(e,t,n,r),t.child}var Al,Ol,Il,zl,Fl={dehydrated:null,treeContext:null,retryLane:0};function Vl(e){return{baseLanes:e,cachePool:null,transitions:null}}function Bl(e,t,n){var r,o=t.pendingProps,a=os.current,i=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&a)),r?(i=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Ra(os,1&a),null===e)return hi(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=o.children,e=o.fallback,i?(o=t.mode,i=t.child,s={mode:"hidden",children:s},1&o||null===i?i=Vc(s,o,0,null):(i.childLanes=0,i.pendingProps=s),e=Fc(e,o,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Vl(n),t.memoizedState=Fl,e):$l(t,s));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,o,a,i){if(n)return 256&t.flags?(t.flags&=-257,Ul(e,t,i,r=hl(Error(ue(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,o=t.mode,r=Vc({mode:"visible",children:r.children},o,0,null),(a=Fc(a,o,i,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,1&t.mode&&ji(t,e.child,null,i),t.child.memoizedState=Vl(i),t.memoizedState=Fl,a);if(!(1&t.mode))return Ul(e,t,i,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var s=r.dgst;return r=s,Ul(e,t,i,r=hl(a=Error(ue(419)),r,void 0))}if(s=0!==(i&e.childLanes),Sl||s){if(null!==(r=Du)){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(r.suspendedLanes|i))?0:o)&&o!==a.retryLane&&(a.retryLane=o,Fi(e,o),ic(r,e,o,-1))}return bc(),Ul(e,t,i,r=hl(Error(ue(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Rc.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,li=ha(o.nextSibling),si=t,ui=!0,ci=null,null!==e&&(Za[Ja++]=ti,Za[Ja++]=ni,Za[Ja++]=ei,ti=e.id,ni=e.overflow,ei=t),t=$l(t,r.children),t.flags|=4096,t)}(e,t,s,o,r,a,n);if(i){i=o.fallback,s=t.mode,r=(a=e.child).sibling;var l={mode:"hidden",children:o.children};return 1&s||t.child===a?(o=Ic(a,l)).subtreeFlags=14680064&a.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=l,t.deletions=null),null!==r?i=Ic(r,i):(i=Fc(i,s,n,null)).flags|=2,i.return=t,o.return=t,o.sibling=i,t.child=o,o=i,i=t.child,s=null===(s=e.child.memoizedState)?Vl(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=Fl,o}return e=(i=e.child).sibling,o=Ic(i,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function $l(e,t){return(t=Vc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ul(e,t,n,r){return null!==r&&bi(r),ji(t,e.child,null,n),(e=$l(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Wl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Di(e.return,t,n)}function Hl(e,t,n,r,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o)}function Gl(e,t,n){var r=t.pendingProps,o=r.revealOrder,a=r.tail;if(El(e,t,r.children,n),2&(r=os.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Wl(e,n,t);else if(19===e.tag)Wl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ra(os,r),1&t.mode)switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===as(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Hl(t,!1,o,n,a);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===as(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Hl(t,!0,n,null,a);break;case"together":Hl(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Yl(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ql(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Vu|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(ue(153));if(null!==t.child){for(n=Ic(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ic(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Kl(e,t){if(!ui)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ql(e,t,n){var r=t.pendingProps;switch(ii(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xl(t),null;case 1:case 17:return Ia(t.type)&&za(),Xl(t),null;case 3:return r=t.stateNode,ts(),Ma(_a),Ma(Da),ss(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(gi(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==ci&&(cc(ci),ci=null))),Ol(e,t),Xl(t),null;case 5:rs(t);var o=Ji(Zi.current);if(n=t.type,null!==e&&null!=t.stateNode)Il(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(ue(166));return Xl(t),null}if(e=Ji(Xi.current),gi(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[va]=t,r[ya]=a,e=!!(1&t.mode),n){case"dialog":Wo("cancel",r),Wo("close",r);break;case"iframe":case"object":case"embed":Wo("load",r);break;case"video":case"audio":for(o=0;o<Vo.length;o++)Wo(Vo[o],r);break;case"source":Wo("error",r);break;case"img":case"image":case"link":Wo("error",r),Wo("load",r);break;case"details":Wo("toggle",r);break;case"input":et(r,a),Wo("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Wo("invalid",r);break;case"textarea":lt(r,a),Wo("invalid",r)}for(var i in kt(n,a),o=null,a)if(a.hasOwnProperty(i)){var s=a[i];"children"===i?"string"==typeof s?r.textContent!==s&&(!0!==a.suppressHydrationWarning&&ra(r.textContent,s,e),o=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==a.suppressHydrationWarning&&ra(r.textContent,s,e),o=["children",""+s]):de.hasOwnProperty(i)&&null!=s&&"onScroll"===i&&Wo("scroll",r)}switch(n){case"input":Xe(r),rt(r,a,!0);break;case"textarea":Xe(r),ct(r);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(r.onclick=oa)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{i=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=dt(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=i.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),"select"===n&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[va]=t,e[ya]=r,Al(e,t,!1,!1),t.stateNode=e;e:{switch(i=St(n,r),n){case"dialog":Wo("cancel",e),Wo("close",e),o=r;break;case"iframe":case"object":case"embed":Wo("load",e),o=r;break;case"video":case"audio":for(o=0;o<Vo.length;o++)Wo(Vo[o],e);o=r;break;case"source":Wo("error",e),o=r;break;case"img":case"image":case"link":Wo("error",e),Wo("load",e),o=r;break;case"details":Wo("toggle",e),o=r;break;case"input":et(e,r),o=Je(e,r),Wo("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Be({},r,{value:void 0}),Wo("invalid",e);break;case"textarea":lt(e,r),o=st(e,r),Wo("invalid",e)}for(a in kt(n,o),s=o)if(s.hasOwnProperty(a)){var l=s[a];"style"===a?xt(e,l):"dangerouslySetInnerHTML"===a?null!=(l=l?l.__html:void 0)&&mt(e,l):"children"===a?"string"==typeof l?("textarea"!==n||""!==l)&&gt(e,l):"number"==typeof l&&gt(e,""+l):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(de.hasOwnProperty(a)?null!=l&&"onScroll"===a&&Wo("scroll",e):null!=l&&Se(e,a,l,i))}switch(n){case"input":Xe(e),rt(e,r,!1);break;case"textarea":Xe(e),ct(e);break;case"option":null!=r.value&&e.setAttribute("value",""+qe(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?it(e,!!r.multiple,a,!1):null!=r.defaultValue&&it(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=oa)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Xl(t),null;case 6:if(e&&null!=t.stateNode)zl(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(ue(166));if(n=Ji(Zi.current),Ji(Xi.current),gi(t)){if(r=t.stateNode,n=t.memoizedProps,r[va]=t,(a=r.nodeValue!==n)&&null!==(e=si))switch(e.tag){case 3:ra(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&ra(r.nodeValue,n,!!(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[va]=t,t.stateNode=r}return Xl(t),null;case 13:if(Ma(os),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ui&&null!==li&&1&t.mode&&!(128&t.flags))vi(),yi(),t.flags|=98560,a=!1;else if(a=gi(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(ue(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(ue(317));a[va]=t}else yi(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Xl(t),a=!1}else null!==ci&&(cc(ci),ci=null),a=!0;if(!a)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&os.current?0===zu&&(zu=3):bc())),null!==t.updateQueue&&(t.flags|=4),Xl(t),null);case 4:return ts(),Ol(e,t),null===e&&Yo(t.stateNode.containerInfo),Xl(t),null;case 10:return Li(t.type._context),Xl(t),null;case 19:if(Ma(os),null===(a=t.memoizedState))return Xl(t),null;if(r=!!(128&t.flags),null===(i=a.rendering))if(r)Kl(a,!1);else{if(0!==zu||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(i=as(e))){for(t.flags|=128,Kl(a,!1),null!==(r=i.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(i=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,a.type=i.type,e=i.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ra(os,1&os.current|2),t.child}e=e.sibling}null!==a.tail&&tn()>Gu&&(t.flags|=128,r=!0,Kl(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=as(i))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Kl(a,!0),null===a.tail&&"hidden"===a.tailMode&&!i.alternate&&!ui)return Xl(t),null}else 2*tn()-a.renderingStartTime>Gu&&1073741824!==n&&(t.flags|=128,r=!0,Kl(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(null!==(n=a.last)?n.sibling=i:t.child=i,a.last=i)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=tn(),t.sibling=null,n=os.current,Ra(os,r?1&n|2:1&n),t):(Xl(t),null);case 22:case 23:return mc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Ou)&&(Xl(t),6&t.subtreeFlags&&(t.flags|=8192)):Xl(t),null;case 24:case 25:return null}throw Error(ue(156,t.tag))}function Zl(e,t){switch(ii(t),t.tag){case 1:return Ia(t.type)&&za(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ts(),Ma(_a),Ma(Da),ss(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return rs(t),null;case 13:if(Ma(os),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(ue(340));yi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ma(os),null;case 4:return ts(),null;case 10:return Li(t.type._context),null;case 22:case 23:return mc(),null;default:return null}}Al=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ol=function(){},Il=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ji(Xi.current);var a,i=null;switch(n){case"input":o=Je(e,o),r=Je(e,r),i=[];break;case"select":o=Be({},o,{value:void 0}),r=Be({},r,{value:void 0}),i=[];break;case"textarea":o=st(e,o),r=st(e,r),i=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=oa)}for(u in kt(n,r),n=null,o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&null!=o[u])if("style"===u){var s=o[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(de.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(s=null!=o?o[u]:void 0,r.hasOwnProperty(u)&&l!==s&&(null!=l||null!=s))if("style"===u)if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(i||(i=[]),i.push(u,n)),n=l;else"dangerouslySetInnerHTML"===u?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(i=i||[]).push(u,l)):"children"===u?"string"!=typeof l&&"number"!=typeof l||(i=i||[]).push(u,""+l):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(de.hasOwnProperty(u)?(null!=l&&"onScroll"===u&&Wo("scroll",e),i||s===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}},zl=function(e,t,n,r){n!==r&&(t.flags|=4)};var Jl=!1,eu=!1,tu="function"==typeof WeakSet?WeakSet:Set,nu=null;function ru(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){Nc(e,t,r)}else n.current=null}function ou(e,t,n){try{n()}catch(r){Nc(e,t,r)}}var au=!1;function iu(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,void 0!==a&&ou(t,n,a)}o=o.next}while(o!==r)}}function su(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function lu(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function uu(e){var t=e.alternate;null!==t&&(e.alternate=null,uu(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[va],delete t[ya],delete t[xa],delete t[wa],delete t[ka])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function cu(e){return 5===e.tag||3===e.tag||4===e.tag}function du(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||cu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function fu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=oa));else if(4!==r&&null!==(e=e.child))for(fu(e,t,n),e=e.sibling;null!==e;)fu(e,t,n),e=e.sibling}function pu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(pu(e,t,n),e=e.sibling;null!==e;)pu(e,t,n),e=e.sibling}var hu=null,mu=!1;function gu(e,t,n){for(n=n.child;null!==n;)vu(e,t,n),n=n.sibling}function vu(e,t,n){if(cn&&"function"==typeof cn.onCommitFiberUnmount)try{cn.onCommitFiberUnmount(un,n)}catch(s){}switch(n.tag){case 5:eu||ru(n,t);case 6:var r=hu,o=mu;hu=null,gu(e,t,n),mu=o,null!==(hu=r)&&(mu?(e=hu,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):hu.removeChild(n.stateNode));break;case 18:null!==hu&&(mu?(e=hu,n=n.stateNode,8===e.nodeType?pa(e.parentNode,n):1===e.nodeType&&pa(e,n),Yn(e)):pa(hu,n.stateNode));break;case 4:r=hu,o=mu,hu=n.stateNode.containerInfo,mu=!0,gu(e,t,n),hu=r,mu=o;break;case 0:case 11:case 14:case 15:if(!eu&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var a=o,i=a.destroy;a=a.tag,void 0!==i&&(2&a||4&a)&&ou(n,t,i),o=o.next}while(o!==r)}gu(e,t,n);break;case 1:if(!eu&&(ru(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Nc(n,t,s)}gu(e,t,n);break;case 21:gu(e,t,n);break;case 22:1&n.mode?(eu=(r=eu)||null!==n.memoizedState,gu(e,t,n),eu=r):gu(e,t,n);break;default:gu(e,t,n)}}function yu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new tu),t.forEach(function(t){var r=Lc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function bu(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,i=t,s=i;e:for(;null!==s;){switch(s.tag){case 5:hu=s.stateNode,mu=!1;break e;case 3:case 4:hu=s.stateNode.containerInfo,mu=!0;break e}s=s.return}if(null===hu)throw Error(ue(160));vu(a,i,o),hu=null,mu=!1;var l=o.alternate;null!==l&&(l.return=null),o.return=null}catch(u){Nc(o,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)xu(t,e),t=t.sibling}function xu(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(bu(t,e),wu(e),4&r){try{iu(3,e,e.return),su(3,e)}catch(m){Nc(e,e.return,m)}try{iu(5,e,e.return)}catch(m){Nc(e,e.return,m)}}break;case 1:bu(t,e),wu(e),512&r&&null!==n&&ru(n,n.return);break;case 5:if(bu(t,e),wu(e),512&r&&null!==n&&ru(n,n.return),32&e.flags){var o=e.stateNode;try{gt(o,"")}catch(m){Nc(e,e.return,m)}}if(4&r&&null!=(o=e.stateNode)){var a=e.memoizedProps,i=null!==n?n.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===a.type&&null!=a.name&&tt(o,a),St(s,i);var u=St(s,a);for(i=0;i<l.length;i+=2){var c=l[i],d=l[i+1];"style"===c?xt(o,d):"dangerouslySetInnerHTML"===c?mt(o,d):"children"===c?gt(o,d):Se(o,c,d,u)}switch(s){case"input":nt(o,a);break;case"textarea":ut(o,a);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?it(o,!!a.multiple,p,!1):f!==!!a.multiple&&(null!=a.defaultValue?it(o,!!a.multiple,a.defaultValue,!0):it(o,!!a.multiple,a.multiple?[]:"",!1))}o[ya]=a}catch(m){Nc(e,e.return,m)}}break;case 6:if(bu(t,e),wu(e),4&r){if(null===e.stateNode)throw Error(ue(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(m){Nc(e,e.return,m)}}break;case 3:if(bu(t,e),wu(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Yn(t.containerInfo)}catch(m){Nc(e,e.return,m)}break;case 4:default:bu(t,e),wu(e);break;case 13:bu(t,e),wu(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(Hu=tn())),4&r&&yu(e);break;case 22:if(c=null!==n&&null!==n.memoizedState,1&e.mode?(eu=(u=eu)||c,bu(t,e),eu=u):bu(t,e),wu(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!c&&1&e.mode)for(nu=e,c=e.child;null!==c;){for(d=nu=c;null!==nu;){switch(p=(f=nu).child,f.tag){case 0:case 11:case 14:case 15:iu(4,f,f.return);break;case 1:ru(f,f.return);var h=f.stateNode;if("function"==typeof h.componentWillUnmount){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(m){Nc(r,n,m)}}break;case 5:ru(f,f.return);break;case 22:if(null!==f.memoizedState){ju(d);continue}}null!==p?(p.return=f,nu=p):ju(d)}c=c.sibling}e:for(c=null,d=e;;){if(5===d.tag){if(null===c){c=d;try{o=d.stateNode,u?"function"==typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(s=d.stateNode,i=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,s.style.display=bt("display",i))}catch(m){Nc(e,e.return,m)}}}else if(6===d.tag){if(null===c)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){Nc(e,e.return,m)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:bu(t,e),wu(e),4&r&&yu(e);case 21:}}function wu(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(cu(n)){var r=n;break e}n=n.return}throw Error(ue(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(gt(o,""),r.flags&=-33),pu(e,du(e),o);break;case 3:case 4:var a=r.stateNode.containerInfo;fu(e,du(e),a);break;default:throw Error(ue(161))}}catch(i){Nc(e,e.return,i)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ku(e,t,n){nu=e,Su(e)}function Su(e,t,n){for(var r=!!(1&e.mode);null!==nu;){var o=nu,a=o.child;if(22===o.tag&&r){var i=null!==o.memoizedState||Jl;if(!i){var s=o.alternate,l=null!==s&&null!==s.memoizedState||eu;s=Jl;var u=eu;if(Jl=i,(eu=l)&&!u)for(nu=o;null!==nu;)l=(i=nu).child,22===i.tag&&null!==i.memoizedState?Cu(o):null!==l?(l.return=i,nu=l):Cu(o);for(;null!==a;)nu=a,Su(a),a=a.sibling;nu=o,Jl=s,eu=u}Eu(e)}else 8772&o.subtreeFlags&&null!==a?(a.return=o,nu=a):Eu(e)}}function Eu(e){for(;null!==nu;){var t=nu;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:eu||su(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!eu)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:il(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&qi(t,a,r);break;case 3:var i=t.updateQueue;if(null!==i){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}qi(t,i,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var c=u.memoizedState;if(null!==c){var d=c.dehydrated;null!==d&&Yn(d)}}}break;default:throw Error(ue(163))}eu||512&t.flags&&lu(t)}catch(f){Nc(t,t.return,f)}}if(t===e){nu=null;break}if(null!==(n=t.sibling)){n.return=t.return,nu=n;break}nu=t.return}}function ju(e){for(;null!==nu;){var t=nu;if(t===e){nu=null;break}var n=t.sibling;if(null!==n){n.return=t.return,nu=n;break}nu=t.return}}function Cu(e){for(;null!==nu;){var t=nu;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{su(4,t)}catch(l){Nc(t,n,l)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(l){Nc(t,o,l)}}var a=t.return;try{lu(t)}catch(l){Nc(t,a,l)}break;case 5:var i=t.return;try{lu(t)}catch(l){Nc(t,i,l)}}}catch(l){Nc(t,t.return,l)}if(t===e){nu=null;break}var s=t.sibling;if(null!==s){s.return=t.return,nu=s;break}nu=t.return}}var Pu,Nu=Math.ceil,Tu=Ee.ReactCurrentDispatcher,Mu=Ee.ReactCurrentOwner,Ru=Ee.ReactCurrentBatchConfig,Lu=0,Du=null,_u=null,Au=0,Ou=0,Iu=Ta(0),zu=0,Fu=null,Vu=0,Bu=0,$u=0,Uu=null,Wu=null,Hu=0,Gu=1/0,Yu=null,qu=!1,Ku=null,Xu=null,Qu=!1,Zu=null,Ju=0,ec=0,tc=null,nc=-1,rc=0;function oc(){return 6&Lu?tn():-1!==nc?nc:nc=tn()}function ac(e){return 1&e.mode?2&Lu&&0!==Au?Au&-Au:null!==xi.transition?(0===rc&&(rc=xn()),rc):0!==(e=En)?e:e=void 0===(e=window.event)?16:tr(e.type):1}function ic(e,t,n,r){if(50<ec)throw ec=0,tc=null,Error(ue(185));kn(e,n,r),2&Lu&&e===Du||(e===Du&&(!(2&Lu)&&(Bu|=n),4===zu&&dc(e,Au)),sc(e,r),1===n&&0===Lu&&!(1&t.mode)&&(Gu=tn()+500,Wa&&Ya()))}function sc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-dn(a),s=1<<i,l=o[i];-1===l?0!==(s&n)&&0===(s&r)||(o[i]=yn(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=vn(e,e===Du?Au:0);if(0===r)null!==n&&Zt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Zt(n),1===t)0===e.tag?function(e){Wa=!0,Ga(e)}(fc.bind(null,e)):Ga(fc.bind(null,e)),da(function(){!(6&Lu)&&Ya()}),n=null;else{switch(jn(r)){case 1:n=rn;break;case 4:n=on;break;case 16:default:n=an;break;case 536870912:n=ln}n=Dc(n,lc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function lc(e,t){if(nc=-1,rc=0,6&Lu)throw Error(ue(327));var n=e.callbackNode;if(Cc()&&e.callbackNode!==n)return null;var r=vn(e,e===Du?Au:0);if(0===r)return null;if(30&r||0!==(r&e.expiredLanes)||t)t=xc(e,r);else{t=r;var o=Lu;Lu|=2;var a=yc();for(Du===e&&Au===t||(Yu=null,Gu=tn()+500,gc(e,t));;)try{kc();break}catch(s){vc(e,s)}Ri(),Tu.current=a,Lu=o,null!==_u?t=0:(Du=null,Au=0,t=zu)}if(0!==t){if(2===t&&(0!==(o=bn(e))&&(r=o,t=uc(e,o))),1===t)throw n=Fu,gc(e,0),dc(e,r),sc(e,tn()),n;if(6===t)dc(e,r);else{if(o=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],a=o.getSnapshot;o=o.value;try{if(!fo(a(),o))return!1}catch(i){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(t=xc(e,r),2===t&&(a=bn(e),0!==a&&(r=a,t=uc(e,a))),1!==t)))throw n=Fu,gc(e,0),dc(e,r),sc(e,tn()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(ue(345));case 2:case 5:jc(e,Wu,Yu);break;case 3:if(dc(e,r),(130023424&r)===r&&10<(t=Hu+500-tn())){if(0!==vn(e,0))break;if(((o=e.suspendedLanes)&r)!==r){oc(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=la(jc.bind(null,e,Wu,Yu),t);break}jc(e,Wu,Yu);break;case 4:if(dc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-dn(r);a=1<<i,(i=t[i])>o&&(o=i),r&=~a}if(r=o,10<(r=(120>(r=tn()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Nu(r/1960))-r)){e.timeoutHandle=la(jc.bind(null,e,Wu,Yu),r);break}jc(e,Wu,Yu);break;default:throw Error(ue(329))}}}return sc(e,tn()),e.callbackNode===n?lc.bind(null,e):null}function uc(e,t){var n=Uu;return e.current.memoizedState.isDehydrated&&(gc(e,t).flags|=256),2!==(e=xc(e,t))&&(t=Wu,Wu=n,null!==t&&cc(t)),e}function cc(e){null===Wu?Wu=e:Wu.push.apply(Wu,e)}function dc(e,t){for(t&=~$u,t&=~Bu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-dn(t),r=1<<n;e[n]=-1,t&=~r}}function fc(e){if(6&Lu)throw Error(ue(327));Cc();var t=vn(e,0);if(!(1&t))return sc(e,tn()),null;var n=xc(e,t);if(0!==e.tag&&2===n){var r=bn(e);0!==r&&(t=r,n=uc(e,r))}if(1===n)throw n=Fu,gc(e,0),dc(e,t),sc(e,tn()),n;if(6===n)throw Error(ue(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,jc(e,Wu,Yu),sc(e,tn()),null}function pc(e,t){var n=Lu;Lu|=1;try{return e(t)}finally{0===(Lu=n)&&(Gu=tn()+500,Wa&&Ya())}}function hc(e){null!==Zu&&0===Zu.tag&&!(6&Lu)&&Cc();var t=Lu;Lu|=1;var n=Ru.transition,r=En;try{if(Ru.transition=null,En=1,e)return e()}finally{En=r,Ru.transition=n,!(6&(Lu=t))&&Ya()}}function mc(){Ou=Iu.current,Ma(Iu)}function gc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ua(n)),null!==_u)for(n=_u.return;null!==n;){var r=n;switch(ii(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&za();break;case 3:ts(),Ma(_a),Ma(Da),ss();break;case 5:rs(r);break;case 4:ts();break;case 13:case 19:Ma(os);break;case 10:Li(r.type._context);break;case 22:case 23:mc()}n=n.return}if(Du=e,_u=e=Ic(e.current,null),Au=Ou=t,zu=0,Fu=null,$u=Bu=Vu=0,Wu=Uu=null,null!==Oi){for(t=0;t<Oi.length;t++)if(null!==(r=(n=Oi[t]).interleaved)){n.interleaved=null;var o=r.next,a=n.pending;if(null!==a){var i=a.next;a.next=o,r.next=i}n.pending=r}Oi=null}return e}function vc(e,t){for(;;){var n=_u;try{if(Ri(),ls.current=nl,hs){for(var r=ds.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}hs=!1}if(cs=0,ps=fs=ds=null,ms=!1,gs=0,Mu.current=null,null===n||null===n.return){zu=1,Fu=t,_u=null;break}e:{var a=e,i=n.return,s=n,l=t;if(t=Au,s.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var u=l,c=s,d=c.tag;if(!(1&c.mode||0!==d&&11!==d&&15!==d)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=xl(i);if(null!==p){p.flags&=-257,wl(p,i,s,0,t),1&p.mode&&bl(a,u,t),l=u;var h=(t=p).updateQueue;if(null===h){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}if(!(1&t)){bl(a,u,t),bc();break e}l=Error(ue(426))}else if(ui&&1&s.mode){var g=xl(i);if(null!==g){!(65536&g.flags)&&(g.flags|=256),wl(g,i,s,0,t),bi(pl(l,s));break e}}a=l=pl(l,s),4!==zu&&(zu=2),null===Uu?Uu=[a]:Uu.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Gi(a,vl(0,l,t));break e;case 1:s=l;var v=a.type,y=a.stateNode;if(!(128&a.flags||"function"!=typeof v.getDerivedStateFromError&&(null===y||"function"!=typeof y.componentDidCatch||null!==Xu&&Xu.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t,Gi(a,yl(a,s,t));break e}}a=a.return}while(null!==a)}Ec(n)}catch(b){t=b,_u===n&&null!==n&&(_u=n=n.return);continue}break}}function yc(){var e=Tu.current;return Tu.current=nl,null===e?nl:e}function bc(){0!==zu&&3!==zu&&2!==zu||(zu=4),null===Du||!(268435455&Vu)&&!(268435455&Bu)||dc(Du,Au)}function xc(e,t){var n=Lu;Lu|=2;var r=yc();for(Du===e&&Au===t||(Yu=null,gc(e,t));;)try{wc();break}catch(o){vc(e,o)}if(Ri(),Lu=n,Tu.current=r,null!==_u)throw Error(ue(261));return Du=null,Au=0,zu}function wc(){for(;null!==_u;)Sc(_u)}function kc(){for(;null!==_u&&!Jt();)Sc(_u)}function Sc(e){var t=Pu(e.alternate,e,Ou);e.memoizedProps=e.pendingProps,null===t?Ec(e):_u=t,Mu.current=null}function Ec(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Zl(n,t)))return n.flags&=32767,void(_u=n);if(null===e)return zu=6,void(_u=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ql(n,t,Ou)))return void(_u=n);if(null!==(t=t.sibling))return void(_u=t);_u=t=e}while(null!==t);0===zu&&(zu=5)}function jc(e,t,n){var r=En,o=Ru.transition;try{Ru.transition=null,En=1,function(e,t,n,r){do{Cc()}while(null!==Zu);if(6&Lu)throw Error(ue(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(ue(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-dn(n),a=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~a}}(e,a),e===Du&&(_u=Du=null,Au=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Qu||(Qu=!0,Dc(an,function(){return Cc(),null})),a=!!(15990&n.flags),!!(15990&n.subtreeFlags)||a){a=Ru.transition,Ru.transition=null;var i=En;En=1;var s=Lu;Lu|=4,Mu.current=null,function(e,t){if(aa=Kn,yo(e=vo())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(x){n=null;break e}var i=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||0!==o&&3!==d.nodeType||(s=i+o),d!==a||0!==r&&3!==d.nodeType||(l=i+r),3===d.nodeType&&(i+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(s=i),f===a&&++c===r&&(l=i),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(ia={focusedElem:e,selectionRange:n},Kn=!1,nu=t;null!==nu;)if(e=(t=nu).child,1028&t.subtreeFlags&&null!==e)e.return=t,nu=e;else for(;null!==nu;){t=nu;try{var h=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==h){var m=h.memoizedProps,g=h.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:il(t.type,m),g);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(ue(163))}}catch(x){Nc(t,t.return,x)}if(null!==(e=t.sibling)){e.return=t.return,nu=e;break}nu=t.return}h=au,au=!1}(e,n),xu(n,e),bo(ia),Kn=!!aa,ia=aa=null,e.current=n,ku(n),en(),Lu=s,En=i,Ru.transition=a}else e.current=n;if(Qu&&(Qu=!1,Zu=e,Ju=o),a=e.pendingLanes,0===a&&(Xu=null),function(e){if(cn&&"function"==typeof cn.onCommitFiberRoot)try{cn.onCommitFiberRoot(un,e,void 0,!(128&~e.current.flags))}catch(t){}}(n.stateNode),sc(e,tn()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(qu)throw qu=!1,e=Ku,Ku=null,e;!!(1&Ju)&&0!==e.tag&&Cc(),a=e.pendingLanes,1&a?e===tc?ec++:(ec=0,tc=e):ec=0,Ya()}(e,t,n,r)}finally{Ru.transition=o,En=r}return null}function Cc(){if(null!==Zu){var e=jn(Ju),t=Ru.transition,n=En;try{if(Ru.transition=null,En=16>e?16:e,null===Zu)var r=!1;else{if(e=Zu,Zu=null,Ju=0,6&Lu)throw Error(ue(331));var o=Lu;for(Lu|=4,nu=e.current;null!==nu;){var a=nu,i=a.child;if(16&nu.flags){var s=a.deletions;if(null!==s){for(var l=0;l<s.length;l++){var u=s[l];for(nu=u;null!==nu;){var c=nu;switch(c.tag){case 0:case 11:case 15:iu(8,c,a)}var d=c.child;if(null!==d)d.return=c,nu=d;else for(;null!==nu;){var f=(c=nu).sibling,p=c.return;if(uu(c),c===u){nu=null;break}if(null!==f){f.return=p,nu=f;break}nu=p}}}var h=a.alternate;if(null!==h){var m=h.child;if(null!==m){h.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(null!==m)}}nu=a}}if(2064&a.subtreeFlags&&null!==i)i.return=a,nu=i;else e:for(;null!==nu;){if(2048&(a=nu).flags)switch(a.tag){case 0:case 11:case 15:iu(9,a,a.return)}var v=a.sibling;if(null!==v){v.return=a.return,nu=v;break e}nu=a.return}}var y=e.current;for(nu=y;null!==nu;){var b=(i=nu).child;if(2064&i.subtreeFlags&&null!==b)b.return=i,nu=b;else e:for(i=y;null!==nu;){if(2048&(s=nu).flags)try{switch(s.tag){case 0:case 11:case 15:su(9,s)}}catch(w){Nc(s,s.return,w)}if(s===i){nu=null;break e}var x=s.sibling;if(null!==x){x.return=s.return,nu=x;break e}nu=s.return}}if(Lu=o,Ya(),cn&&"function"==typeof cn.onPostCommitFiberRoot)try{cn.onPostCommitFiberRoot(un,e)}catch(w){}r=!0}return r}finally{En=n,Ru.transition=t}}return!1}function Pc(e,t,n){e=Wi(e,t=vl(0,t=pl(n,t),1),1),t=oc(),null!==e&&(kn(e,1,t),sc(e,t))}function Nc(e,t,n){if(3===e.tag)Pc(e,e,n);else for(;null!==t;){if(3===t.tag){Pc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Xu||!Xu.has(r))){t=Wi(t,e=yl(t,e=pl(n,e),1),1),e=oc(),null!==t&&(kn(t,1,e),sc(t,e));break}}t=t.return}}function Tc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=oc(),e.pingedLanes|=e.suspendedLanes&n,Du===e&&(Au&n)===n&&(4===zu||3===zu&&(130023424&Au)===Au&&500>tn()-Hu?gc(e,0):$u|=n),sc(e,t)}function Mc(e,t){0===t&&(1&e.mode?(t=mn,!(130023424&(mn<<=1))&&(mn=4194304)):t=1);var n=oc();null!==(e=Fi(e,t))&&(kn(e,t,n),sc(e,n))}function Rc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Mc(e,n)}function Lc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ue(314))}null!==r&&r.delete(t),Mc(e,n)}function Dc(e,t){return Qt(e,t)}function _c(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.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 Ac(e,t,n,r){return new _c(e,t,n,r)}function Oc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ic(e,t){var n=e.alternate;return null===n?((n=Ac(e.tag,t,e.key,e.mode)).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=14680064&e.flags,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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function zc(e,t,n,r,o,a){var i=2;if(r=e,"function"==typeof e)Oc(e)&&(i=1);else if("string"==typeof e)i=5;else e:switch(e){case Pe:return Fc(n.children,o,a,t);case Ne:i=8,o|=8;break;case Te:return(e=Ac(12,n,t,2|o)).elementType=Te,e.lanes=a,e;case De:return(e=Ac(13,n,t,o)).elementType=De,e.lanes=a,e;case _e:return(e=Ac(19,n,t,o)).elementType=_e,e.lanes=a,e;case Ie:return Vc(n,o,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Me:i=10;break e;case Re:i=9;break e;case Le:i=11;break e;case Ae:i=14;break e;case Oe:i=16,r=null;break e}throw Error(ue(130,null==e?e:typeof e,""))}return(t=Ac(i,n,t,o)).elementType=e,t.type=r,t.lanes=a,t}function Fc(e,t,n,r){return(e=Ac(7,e,r,t)).lanes=n,e}function Vc(e,t,n,r){return(e=Ac(22,e,r,t)).elementType=Ie,e.lanes=n,e.stateNode={isHidden:!1},e}function Bc(e,t,n){return(e=Ac(6,e,null,t)).lanes=n,e}function $c(e,t,n){return(t=Ac(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Uc(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=wn(0),this.expirationTimes=wn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wn(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Wc(e,t,n,r,o,a,i,s,l){return e=new Uc(e,t,n,s,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Ac(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Bi(a),e}function Hc(e){if(!e)return La;e:{if(Gt(e=e._reactInternals)!==e||1!==e.tag)throw Error(ue(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ia(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(ue(171))}if(1===e.tag){var n=e.type;if(Ia(n))return Va(e,n,t)}return t}function Gc(e,t,n,r,o,a,i,s,l){return(e=Wc(n,r,!0,e,0,a,0,s,l)).context=Hc(null),n=e.current,(a=Ui(r=oc(),o=ac(n))).callback=null!=t?t:null,Wi(n,a,o),e.current.lanes=o,kn(e,o,r),sc(e,r),e}function Yc(e,t,n,r){var o=t.current,a=oc(),i=ac(o);return n=Hc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ui(a,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Wi(o,t,i))&&(ic(e,o,i,a),Hi(e,o,i)),i}function qc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Kc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Xc(e,t){Kc(e,t),(e=e.alternate)&&Kc(e,t)}Pu=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||_a.current)Sl=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return Sl=!1,function(e,t,n){switch(t.tag){case 3:Dl(t),yi();break;case 5:ns(t);break;case 1:Ia(t.type)&&Ba(t);break;case 4:es(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ra(Pi,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ra(os,1&os.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Bl(e,t,n):(Ra(os,1&os.current),null!==(e=ql(e,t,n))?e.sibling:null);Ra(os,1&os.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return Gl(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ra(os,os.current),r)break;return null;case 22:case 23:return t.lanes=0,Nl(e,t,n)}return ql(e,t,n)}(e,t,n);Sl=!!(131072&e.flags)}else Sl=!1,ui&&1048576&t.flags&&oi(t,Qa,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yl(e,t),e=t.pendingProps;var o=Oa(t,Da.current);_i(t,n),o=xs(null,t,r,e,o,n);var a=ws();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ia(r)?(a=!0,Ba(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Bi(t),o.updater=ll,t.stateNode=o,o._reactInternals=t,fl(t,r,e,n),t=Ll(null,t,r,!0,a,n)):(t.tag=0,ui&&a&&ai(t),El(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yl(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return Oc(e)?1:0;if(null!=e){if((e=e.$$typeof)===Le)return 11;if(e===Ae)return 14}return 2}(r),e=il(r,e),o){case 0:t=Ml(null,t,r,e,n);break e;case 1:t=Rl(null,t,r,e,n);break e;case 11:t=jl(null,t,r,e,n);break e;case 14:t=Cl(null,t,r,il(r.type,e),n);break e}throw Error(ue(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ml(e,t,r,o=t.elementType===r?o:il(r,o),n);case 1:return r=t.type,o=t.pendingProps,Rl(e,t,r,o=t.elementType===r?o:il(r,o),n);case 3:e:{if(Dl(t),null===e)throw Error(ue(387));r=t.pendingProps,o=(a=t.memoizedState).element,$i(e,t),Yi(t,r,null,n);var i=t.memoizedState;if(r=i.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=_l(e,t,r,n,o=pl(Error(ue(423)),t));break e}if(r!==o){t=_l(e,t,r,n,o=pl(Error(ue(424)),t));break e}for(li=ha(t.stateNode.containerInfo.firstChild),si=t,ui=!0,ci=null,n=Ci(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(yi(),r===o){t=ql(e,t,n);break e}El(e,t,r,n)}t=t.child}return t;case 5:return ns(t),null===e&&hi(t),r=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,i=o.children,sa(r,o)?i=null:null!==a&&sa(r,a)&&(t.flags|=32),Tl(e,t),El(e,t,i,n),t.child;case 6:return null===e&&hi(t),null;case 13:return Bl(e,t,n);case 4:return es(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=ji(t,null,r,n):El(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,jl(e,t,r,o=t.elementType===r?o:il(r,o),n);case 7:return El(e,t,t.pendingProps,n),t.child;case 8:case 12:return El(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=o.value,Ra(Pi,r._currentValue),r._currentValue=i,null!==a)if(fo(a.value,i)){if(a.children===o.children&&!_a.current){t=ql(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var s=a.dependencies;if(null!==s){i=a.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===a.tag){(l=Ui(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var c=(u=u.shared).pending;null===c?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),Di(a.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===a.tag)i=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(i=a.return))throw Error(ue(341));i.lanes|=n,null!==(s=i.alternate)&&(s.lanes|=n),Di(i,n,t),i=a.sibling}else i=a.child;if(null!==i)i.return=a;else for(i=a;null!==i;){if(i===t){i=null;break}if(null!==(a=i.sibling)){a.return=i.return,i=a;break}i=i.return}a=i}El(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,_i(t,n),r=r(o=Ai(o)),t.flags|=1,El(e,t,r,n),t.child;case 14:return o=il(r=t.type,t.pendingProps),Cl(e,t,r,o=il(r.type,o),n);case 15:return Pl(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:il(r,o),Yl(e,t),t.tag=1,Ia(r)?(e=!0,Ba(t)):e=!1,_i(t,n),cl(t,r,o),fl(t,r,o,n),Ll(null,t,r,!0,e,n);case 19:return Gl(e,t,n);case 22:return Nl(e,t,n)}throw Error(ue(156,t.tag))};var Qc="function"==typeof reportError?reportError:function(e){console.error(e)};function Zc(e){this._internalRoot=e}function Jc(e){this._internalRoot=e}function ed(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function td(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function nd(){}function rd(e,t,n,r,o){var a=n._reactRootContainer;if(a){var i=a;if("function"==typeof o){var s=o;o=function(){var e=qc(i);s.call(e)}}Yc(t,i,e,o)}else i=function(e,t,n,r,o){if(o){if("function"==typeof r){var a=r;r=function(){var e=qc(i);a.call(e)}}var i=Gc(t,r,e,0,null,!1,0,"",nd);return e._reactRootContainer=i,e[ba]=i.current,Yo(8===e.nodeType?e.parentNode:e),hc(),i}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var s=r;r=function(){var e=qc(l);s.call(e)}}var l=Wc(e,0,!1,null,0,!1,0,"",nd);return e._reactRootContainer=l,e[ba]=l.current,Yo(8===e.nodeType?e.parentNode:e),hc(function(){Yc(t,l,n,r)}),l}(n,t,e,o,r);return qc(i)}Jc.prototype.render=Zc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(ue(409));Yc(e,t,null,null)},Jc.prototype.unmount=Zc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;hc(function(){Yc(null,e,null,null)}),t[ba]=null}},Jc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Tn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<zn.length&&0!==t&&t<zn[n].priority;n++);zn.splice(n,0,e),0===n&&$n(e)}},Cn=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=gn(t.pendingLanes);0!==n&&(Sn(t,1|n),sc(t,tn()),!(6&Lu)&&(Gu=tn()+500,Ya()))}break;case 13:hc(function(){var t=Fi(e,1);if(null!==t){var n=oc();ic(t,e,1,n)}}),Xc(e,1)}},Pn=function(e){if(13===e.tag){var t=Fi(e,134217728);if(null!==t)ic(t,e,134217728,oc());Xc(e,134217728)}},Nn=function(e){if(13===e.tag){var t=ac(e),n=Fi(e,t);if(null!==n)ic(n,e,t,oc());Xc(e,t)}},Tn=function(){return En},Mn=function(e,t){var n=En;try{return En=e,t()}finally{En=n}},Ct=function(e,t,n){switch(t){case"input":if(nt(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Ca(r);if(!o)throw Error(ue(90));Qe(r),nt(r,o)}}}break;case"textarea":ut(e,n);break;case"select":null!=(t=n.value)&&it(e,!!n.multiple,t,!1)}},Lt=pc,Dt=hc;var od={usingClientEntryPoint:!1,Events:[Ea,ja,Ca,Mt,Rt,pc]},ad={findFiberByHostInstance:Sa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},id={bundleType:ad.bundleType,version:ad.version,rendererPackageName:ad.rendererPackageName,rendererConfig:ad.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ee.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Kt(e))?null:e.stateNode},findFiberByHostInstance:ad.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var sd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sd.isDisabled&&sd.supportsFiber)try{un=sd.inject(id),cn=sd}catch(ht){}}re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=od,re.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ed(t))throw Error(ue(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Ce,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},re.createRoot=function(e,t){if(!ed(e))throw Error(ue(299));var n=!1,r="",o=Qc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Wc(e,1,!1,null,0,n,0,r,o),e[ba]=t.current,Yo(8===e.nodeType?e.parentNode:e),new Zc(t)},re.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(ue(188));throw e=Object.keys(e).join(","),Error(ue(268,e))}return e=null===(e=Kt(t))?null:e.stateNode},re.flushSync=function(e){return hc(e)},re.hydrate=function(e,t,n){if(!td(t))throw Error(ue(200));return rd(null,e,t,!0,n)},re.hydrateRoot=function(e,t,n){if(!ed(e))throw Error(ue(405));var r=null!=n&&n.hydratedSources||null,o=!1,a="",i=Qc;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(i=n.onRecoverableError)),t=Gc(t,null,e,1,null!=n?n:null,o,0,a,i),e[ba]=t.current,Yo(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Jc(t)},re.render=function(e,t,n){if(!td(t))throw Error(ue(200));return rd(null,e,t,!1,n)},re.unmountComponentAtNode=function(e){if(!td(e))throw Error(ue(40));return!!e._reactRootContainer&&(hc(function(){rd(null,null,e,!1,function(){e._reactRootContainer=null,e[ba]=null})}),!0)},re.unstable_batchedUpdates=pc,re.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!td(n))throw Error(ue(200));if(null==e||void 0===e._reactInternals)throw Error(ue(38));return rd(e,t,n,!1,r)},re.version="18.3.1-next-f1338f8080-20240426",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),ne.exports=re;var ld=ne.exports;const ud=o(ld);var cd=ld;te.createRoot=cd.createRoot,te.hydrateRoot=cd.hydrateRoot;const dd={},fd=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),n=(null==e?void 0:e.nonce)||(null==e?void 0:e.getAttribute("nonce"));r=Promise.allSettled(t.map(e=>{if((e=function(e){return"/"+e}(e))in dd)return;dd[e]=!0;const t=e.endsWith(".css"),r=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${r}`))return;const o=document.createElement("link");return o.rel=t?"stylesheet":"modulepreload",t||(o.as="script"),o.crossOrigin="",o.href=e,n&&o.setAttribute("nonce",n),document.head.appendChild(o),t?new Promise((t,n)=>{o.addEventListener("load",t),o.addEventListener("error",()=>n(new Error(`Unable to preload CSS for ${e}`)))}):void 0}))}function o(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(const e of t||[])"rejected"===e.status&&o(e.reason);return e().catch(o)})};
31
+ */function ue(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;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."}var ce=new Set,de={};function fe(e,t){pe(e,t),pe(e+"Capture",t)}function pe(e,t){for(de[e]=t,e=0;e<t.length;e++)ce.add(t[e])}var he=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),me=Object.prototype.hasOwnProperty,ge=/^[: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]*$/,ve={},ye={};function be(e,t,n,r,o,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xe[e]=new be(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xe[t]=new be(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){xe[e]=new be(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xe[e]=new be(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xe[e]=new be(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){xe[e]=new be(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){xe[e]=new be(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){xe[e]=new be(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){xe[e]=new be(e,5,!1,e.toLowerCase(),null,!1,!1)});var we=/[\-:]([a-z])/g;function ke(e){return e[1].toUpperCase()}function Se(e,t,n,r){var o=xe.hasOwnProperty(t)?xe[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!me.call(ye,e)||!me.call(ve,e)&&(ge.test(e)?ye[e]=!0:(ve[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(we,ke);xe[t]=new be(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(we,ke);xe[t]=new be(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(we,ke);xe[t]=new be(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){xe[e]=new be(e,1,!1,e.toLowerCase(),null,!1,!1)}),xe.xlinkHref=new be("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){xe[e]=new be(e,1,!1,e.toLowerCase(),null,!0,!0)});var Ee=se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,je=Symbol.for("react.element"),Ce=Symbol.for("react.portal"),Pe=Symbol.for("react.fragment"),Ne=Symbol.for("react.strict_mode"),Te=Symbol.for("react.profiler"),Me=Symbol.for("react.provider"),Re=Symbol.for("react.context"),Le=Symbol.for("react.forward_ref"),De=Symbol.for("react.suspense"),_e=Symbol.for("react.suspense_list"),Ae=Symbol.for("react.memo"),Oe=Symbol.for("react.lazy"),Ie=Symbol.for("react.offscreen"),ze=Symbol.iterator;function Fe(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=ze&&e[ze]||e["@@iterator"])?e:null}var Ve,$e=Object.assign;function Be(e){if(void 0===Ve)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ve=t&&t[1]||""}return"\n"+Ve+e}var Ue=!1;function We(e,t){if(!e||Ue)return"";Ue=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"==typeof u.stack){for(var o=u.stack.split("\n"),a=r.stack.split("\n"),i=o.length-1,s=a.length-1;1<=i&&0<=s&&o[i]!==a[s];)s--;for(;1<=i&&0<=s;i--,s--)if(o[i]!==a[s]){if(1!==i||1!==s)do{if(i--,0>--s||o[i]!==a[s]){var l="\n"+o[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=i&&0<=s);break}}}finally{Ue=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Be(e):""}function He(e){switch(e.tag){case 5:return Be(e.type);case 16:return Be("Lazy");case 13:return Be("Suspense");case 19:return Be("SuspenseList");case 0:case 2:case 15:return e=We(e.type,!1);case 11:return e=We(e.type.render,!1);case 1:return e=We(e.type,!0);default:return""}}function Ge(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Pe:return"Fragment";case Ce:return"Portal";case Te:return"Profiler";case Ne:return"StrictMode";case De:return"Suspense";case _e:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Re:return(e.displayName||"Context")+".Consumer";case Me:return(e._context.displayName||"Context")+".Provider";case Le:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case Ae:return null!==(t=e.displayName||null)?t:Ge(e.type)||"Memo";case Oe:t=e._payload,e=e._init;try{return Ge(e(t))}catch(n){}}return null}function Ye(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ge(t);case 8:return t===Ne?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function qe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Ke(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Xe(e){e._valueTracker||(e._valueTracker=function(e){var t=Ke(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Qe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ke(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Ze(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Je(e,t){var n=t.checked;return $e({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function et(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=qe(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function tt(e,t){null!=(t=t.checked)&&Se(e,"checked",t,!1)}function nt(e,t){tt(e,t);var n=qe(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ot(e,t.type,n):t.hasOwnProperty("defaultValue")&&ot(e,t.type,qe(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function rt(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ot(e,t,n){"number"===t&&Ze(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var at=Array.isArray;function it(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+qe(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function st(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(ue(91));return $e({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function lt(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(ue(92));if(at(n)){if(1<n.length)throw Error(ue(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:qe(n)}}function ut(e,t){var n=qe(t.value),r=qe(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ct(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function dt(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ft(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?dt(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var pt,ht,mt=(ht=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((pt=pt||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pt.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return ht(e,t)})}:ht);function gt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var vt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},yt=["Webkit","ms","Moz","O"];function bt(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||vt.hasOwnProperty(e)&&vt[e]?(""+t).trim():t+"px"}function xt(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=bt(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(vt).forEach(function(e){yt.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),vt[t]=vt[e]})});var wt=$e({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function kt(e,t){if(t){if(wt[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(ue(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(ue(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(ue(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(ue(62))}}function St(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;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 Et=null;function jt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ct=null,Pt=null,Nt=null;function Tt(e){if(e=Ea(e)){if("function"!=typeof Ct)throw Error(ue(280));var t=e.stateNode;t&&(t=Ca(t),Ct(e.stateNode,e.type,t))}}function Mt(e){Pt?Nt?Nt.push(e):Nt=[e]:Pt=e}function Rt(){if(Pt){var e=Pt,t=Nt;if(Nt=Pt=null,Tt(e),t)for(e=0;e<t.length;e++)Tt(t[e])}}function Lt(e,t){return e(t)}function Dt(){}var _t=!1;function At(e,t,n){if(_t)return e(t,n);_t=!0;try{return Lt(e,t,n)}finally{_t=!1,(null!==Pt||null!==Nt)&&(Dt(),Rt())}}function Ot(e,t){var n=e.stateNode;if(null===n)return null;var r=Ca(n);if(null===r)return null;n=r[t];e: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)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(ue(231,t,typeof n));return n}var It=!1;if(he)try{var zt={};Object.defineProperty(zt,"passive",{get:function(){It=!0}}),window.addEventListener("test",zt,zt),window.removeEventListener("test",zt,zt)}catch(ht){It=!1}function Ft(e,t,n,r,o,a,i,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Vt=!1,$t=null,Bt=!1,Ut=null,Wt={onError:function(e){Vt=!0,$t=e}};function Ht(e,t,n,r,o,a,i,s,l){Vt=!1,$t=null,Ft.apply(Wt,arguments)}function Gt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Yt(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function qt(e){if(Gt(e)!==e)throw Error(ue(188))}function Kt(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Gt(e)))throw Error(ue(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(r=o.return)){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return qt(o),e;if(a===r)return qt(o),t;a=a.sibling}throw Error(ue(188))}if(n.return!==r.return)n=o,r=a;else{for(var i=!1,s=o.child;s;){if(s===n){i=!0,n=o,r=a;break}if(s===r){i=!0,r=o,n=a;break}s=s.sibling}if(!i){for(s=a.child;s;){if(s===n){i=!0,n=a,r=o;break}if(s===r){i=!0,r=a,n=o;break}s=s.sibling}if(!i)throw Error(ue(189))}}if(n.alternate!==r)throw Error(ue(190))}if(3!==n.tag)throw Error(ue(188));return n.stateNode.current===n?e:t}(e))?Xt(e):null}function Xt(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Xt(e);if(null!==t)return t;e=e.sibling}return null}var Qt=le.unstable_scheduleCallback,Zt=le.unstable_cancelCallback,Jt=le.unstable_shouldYield,en=le.unstable_requestPaint,tn=le.unstable_now,nn=le.unstable_getCurrentPriorityLevel,rn=le.unstable_ImmediatePriority,on=le.unstable_UserBlockingPriority,an=le.unstable_NormalPriority,sn=le.unstable_LowPriority,ln=le.unstable_IdlePriority,un=null,cn=null;var dn=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(fn(e)/pn|0)|0},fn=Math.log,pn=Math.LN2;var hn=64,mn=4194304;function gn(e){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: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 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function vn(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,a=e.pingedLanes,i=268435455&n;if(0!==i){var s=i&~o;0!==s?r=gn(s):0!==(a&=i)&&(r=gn(a))}else 0!==(i=n&~o)?r=gn(i):0!==a&&(r=gn(a));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&o)&&((o=r&-r)>=(a=t&-t)||16===o&&4194240&a))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-dn(t)),r|=e[n],t&=~o;return r}function yn(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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;default:return-1}}function bn(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function xn(){var e=hn;return!(4194240&(hn<<=1))&&(hn=64),e}function wn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function kn(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-dn(t)]=n}function Sn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-dn(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var En=0;function jn(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var Cn,Pn,Nn,Tn,Mn,Rn=!1,Ln=[],Dn=null,_n=null,An=null,On=new Map,In=new Map,zn=[],Fn="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 submit".split(" ");function Vn(e,t){switch(e){case"focusin":case"focusout":Dn=null;break;case"dragenter":case"dragleave":_n=null;break;case"mouseover":case"mouseout":An=null;break;case"pointerover":case"pointerout":On.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":In.delete(t.pointerId)}}function $n(e,t,n,r,o,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[o]},null!==t&&(null!==(t=Ea(t))&&Pn(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Bn(e){var t=Sa(e.target);if(null!==t){var n=Gt(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Yt(n)))return e.blockedOn=t,void Mn(e.priority,function(){Nn(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Un(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=er(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=Ea(n))&&Pn(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Et=r,n.target.dispatchEvent(r),Et=null,t.shift()}return!0}function Wn(e,t,n){Un(e)&&n.delete(t)}function Hn(){Rn=!1,null!==Dn&&Un(Dn)&&(Dn=null),null!==_n&&Un(_n)&&(_n=null),null!==An&&Un(An)&&(An=null),On.forEach(Wn),In.forEach(Wn)}function Gn(e,t){e.blockedOn===t&&(e.blockedOn=null,Rn||(Rn=!0,le.unstable_scheduleCallback(le.unstable_NormalPriority,Hn)))}function Yn(e){function t(t){return Gn(t,e)}if(0<Ln.length){Gn(Ln[0],e);for(var n=1;n<Ln.length;n++){var r=Ln[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Dn&&Gn(Dn,e),null!==_n&&Gn(_n,e),null!==An&&Gn(An,e),On.forEach(t),In.forEach(t),n=0;n<zn.length;n++)(r=zn[n]).blockedOn===e&&(r.blockedOn=null);for(;0<zn.length&&null===(n=zn[0]).blockedOn;)Bn(n),null===n.blockedOn&&zn.shift()}var qn=Ee.ReactCurrentBatchConfig,Kn=!0;function Xn(e,t,n,r){var o=En,a=qn.transition;qn.transition=null;try{En=1,Zn(e,t,n,r)}finally{En=o,qn.transition=a}}function Qn(e,t,n,r){var o=En,a=qn.transition;qn.transition=null;try{En=4,Zn(e,t,n,r)}finally{En=o,qn.transition=a}}function Zn(e,t,n,r){if(Kn){var o=er(e,t,n,r);if(null===o)Ko(e,t,r,Jn,n),Vn(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return Dn=$n(Dn,e,t,n,r,o),!0;case"dragenter":return _n=$n(_n,e,t,n,r,o),!0;case"mouseover":return An=$n(An,e,t,n,r,o),!0;case"pointerover":var a=o.pointerId;return On.set(a,$n(On.get(a)||null,e,t,n,r,o)),!0;case"gotpointercapture":return a=o.pointerId,In.set(a,$n(In.get(a)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Vn(e,r),4&t&&-1<Fn.indexOf(e)){for(;null!==o;){var a=Ea(o);if(null!==a&&Cn(a),null===(a=er(e,t,n,r))&&Ko(e,t,r,Jn,n),a===o)break;o=a}null!==o&&r.stopPropagation()}else Ko(e,t,r,null,n)}}var Jn=null;function er(e,t,n,r){if(Jn=null,null!==(e=Sa(e=jt(r))))if(null===(t=Gt(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Yt(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Jn=e,null}function tr(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(nn()){case rn:return 1;case on:return 4;case an:case sn:return 16;case ln:return 536870912;default:return 16}default:return 16}}var nr=null,rr=null,or=null;function ar(){if(or)return or;var e,t,n=rr,r=n.length,o="value"in nr?nr.value:nr.textContent,a=o.length;for(e=0;e<r&&n[e]===o[e];e++);var i=r-e;for(t=1;t<=i&&n[r-t]===o[a-t];t++);return or=o.slice(e,1<t?1-t:void 0)}function ir(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function sr(){return!0}function lr(){return!1}function ur(e){function t(t,n,r,o,a){for(var i in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(i)&&(t=e[i],this[i]=t?t(o):o[i]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?sr:lr,this.isPropagationStopped=lr,this}return $e(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=sr)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=sr)},persist:function(){},isPersistent:sr}),t}var cr,dr,fr,pr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hr=ur(pr),mr=$e({},pr,{view:0,detail:0}),gr=ur(mr),vr=$e({},mr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tr,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==fr&&(fr&&"mousemove"===e.type?(cr=e.screenX-fr.screenX,dr=e.screenY-fr.screenY):dr=cr=0,fr=e),cr)},movementY:function(e){return"movementY"in e?e.movementY:dr}}),yr=ur(vr),br=ur($e({},vr,{dataTransfer:0})),xr=ur($e({},mr,{relatedTarget:0})),wr=ur($e({},pr,{animationName:0,elapsedTime:0,pseudoElement:0})),kr=$e({},pr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Sr=ur(kr),Er=ur($e({},pr,{data:0})),jr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cr={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"},Pr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Nr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Pr[e])&&!!t[e]}function Tr(){return Nr}var Mr=$e({},mr,{key:function(e){if(e.key){var t=jr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=ir(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Cr[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tr,charCode:function(e){return"keypress"===e.type?ir(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?ir(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Rr=ur(Mr),Lr=ur($e({},vr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Dr=ur($e({},mr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tr})),_r=ur($e({},pr,{propertyName:0,elapsedTime:0,pseudoElement:0})),Ar=$e({},vr,{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}),Or=ur(Ar),Ir=[9,13,27,32],zr=he&&"CompositionEvent"in window,Fr=null;he&&"documentMode"in document&&(Fr=document.documentMode);var Vr=he&&"TextEvent"in window&&!Fr,$r=he&&(!zr||Fr&&8<Fr&&11>=Fr),Br=String.fromCharCode(32),Ur=!1;function Wr(e,t){switch(e){case"keyup":return-1!==Ir.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hr(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Gr=!1;var Yr={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 qr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Yr[e.type]:"textarea"===t}function Kr(e,t,n,r){Mt(r),0<(t=Qo(t,"onChange")).length&&(n=new hr("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xr=null,Qr=null;function Zr(e){Uo(e,0)}function Jr(e){if(Qe(ja(e)))return e}function eo(e,t){if("change"===e)return t}var to=!1;if(he){var no;if(he){var ro="oninput"in document;if(!ro){var oo=document.createElement("div");oo.setAttribute("oninput","return;"),ro="function"==typeof oo.oninput}no=ro}else no=!1;to=no&&(!document.documentMode||9<document.documentMode)}function ao(){Xr&&(Xr.detachEvent("onpropertychange",io),Qr=Xr=null)}function io(e){if("value"===e.propertyName&&Jr(Qr)){var t=[];Kr(t,Qr,e,jt(e)),At(Zr,t)}}function so(e,t,n){"focusin"===e?(ao(),Qr=n,(Xr=t).attachEvent("onpropertychange",io)):"focusout"===e&&ao()}function lo(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Jr(Qr)}function uo(e,t){if("click"===e)return Jr(t)}function co(e,t){if("input"===e||"change"===e)return Jr(t)}var fo="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function po(e,t){if(fo(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===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 o=n[r];if(!me.call(t,o)||!fo(e[o],t[o]))return!1}return!0}function ho(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mo(e,t){var n,r=ho(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ho(r)}}function go(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?go(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function vo(){for(var e=window,t=Ze();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Ze((e=t.contentWindow).document)}return t}function yo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function bo(e){var t=vo(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&go(n.ownerDocument.documentElement,n)){if(null!==r&&yo(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,a=Math.min(r.start,o);r=void 0===r.end?a:Math.min(r.end,o),!e.extend&&a>r&&(o=r,r=a,a=o),o=mo(n,a);var i=mo(n,r);o&&i&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var xo=he&&"documentMode"in document&&11>=document.documentMode,wo=null,ko=null,So=null,Eo=!1;function jo(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;Eo||null==wo||wo!==Ze(r)||("selectionStart"in(r=wo)&&yo(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},So&&po(So,r)||(So=r,0<(r=Qo(ko,"onSelect")).length&&(t=new hr("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=wo)))}function Co(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Po={animationend:Co("Animation","AnimationEnd"),animationiteration:Co("Animation","AnimationIteration"),animationstart:Co("Animation","AnimationStart"),transitionend:Co("Transition","TransitionEnd")},No={},To={};function Mo(e){if(No[e])return No[e];if(!Po[e])return e;var t,n=Po[e];for(t in n)if(n.hasOwnProperty(t)&&t in To)return No[e]=n[t];return e}he&&(To=document.createElement("div").style,"AnimationEvent"in window||(delete Po.animationend.animation,delete Po.animationiteration.animation,delete Po.animationstart.animation),"TransitionEvent"in window||delete Po.transitionend.transition);var Ro=Mo("animationend"),Lo=Mo("animationiteration"),Do=Mo("animationstart"),_o=Mo("transitionend"),Ao=new Map,Oo="abort auxClick 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(" ");function Io(e,t){Ao.set(e,t),fe(t,[e])}for(var zo=0;zo<Oo.length;zo++){var Fo=Oo[zo];Io(Fo.toLowerCase(),"on"+(Fo[0].toUpperCase()+Fo.slice(1)))}Io(Ro,"onAnimationEnd"),Io(Lo,"onAnimationIteration"),Io(Do,"onAnimationStart"),Io("dblclick","onDoubleClick"),Io("focusin","onFocus"),Io("focusout","onBlur"),Io(_o,"onTransitionEnd"),pe("onMouseEnter",["mouseout","mouseover"]),pe("onMouseLeave",["mouseout","mouseover"]),pe("onPointerEnter",["pointerout","pointerover"]),pe("onPointerLeave",["pointerout","pointerover"]),fe("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fe("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fe("onBeforeInput",["compositionend","keypress","textInput","paste"]),fe("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fe("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fe("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vo="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(" "),$o=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vo));function Bo(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,a,i,s,l){if(Ht.apply(this,arguments),Vt){if(!Vt)throw Error(ue(198));var u=$t;Vt=!1,$t=null,Bt||(Bt=!0,Ut=u)}}(r,t,void 0,e),e.currentTarget=null}function Uo(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var s=r[i],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&o.isPropagationStopped())break e;Bo(o,s,u),a=l}else for(i=0;i<r.length;i++){if(l=(s=r[i]).instance,u=s.currentTarget,s=s.listener,l!==a&&o.isPropagationStopped())break e;Bo(o,s,u),a=l}}}if(Bt)throw e=Ut,Bt=!1,Ut=null,e}function Wo(e,t){var n=t[xa];void 0===n&&(n=t[xa]=new Set);var r=e+"__bubble";n.has(r)||(qo(t,e,2,!1),n.add(r))}function Ho(e,t,n){var r=0;t&&(r|=4),qo(n,e,r,t)}var Go="_reactListening"+Math.random().toString(36).slice(2);function Yo(e){if(!e[Go]){e[Go]=!0,ce.forEach(function(t){"selectionchange"!==t&&($o.has(t)||Ho(t,!1,e),Ho(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Go]||(t[Go]=!0,Ho("selectionchange",!1,t))}}function qo(e,t,n,r){switch(tr(t)){case 1:var o=Xn;break;case 4:o=Qn;break;default:o=Zn}n=o.bind(null,t,n,e),o=void 0,!It||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Ko(e,t,n,r,o){var a=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var i=r.tag;if(3===i||4===i){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===i)for(i=r.return;null!==i;){var l=i.tag;if((3===l||4===l)&&((l=i.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;i=i.return}for(;null!==s;){if(null===(i=Sa(s)))return;if(5===(l=i.tag)||6===l){r=a=i;continue e}s=s.parentNode}}r=r.return}At(function(){var r=a,o=jt(n),i=[];e:{var s=Ao.get(e);if(void 0!==s){var l=hr,u=e;switch(e){case"keypress":if(0===ir(n))break e;case"keydown":case"keyup":l=Rr;break;case"focusin":u="focus",l=xr;break;case"focusout":u="blur",l=xr;break;case"beforeblur":case"afterblur":l=xr;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=yr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=br;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Dr;break;case Ro:case Lo:case Do:l=wr;break;case _o:l=_r;break;case"scroll":l=gr;break;case"wheel":l=Or;break;case"copy":case"cut":case"paste":l=Sr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Lr}var c=!!(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=Ot(h,f))&&c.push(Xo(h,m,p)))),d)break;h=h.return}0<c.length&&(s=new l(s,u,null,n,o),i.push({event:s,listeners:c}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===Et||!(u=n.relatedTarget||n.fromElement)||!Sa(u)&&!u[ba])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?Sa(u):null)&&(u!==(d=Gt(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=yr,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=Lr,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:ja(l),p=null==u?s:ja(u),(s=new c(m,h+"leave",l,n,o)).target=d,s.relatedTarget=p,m=null,Sa(o)===r&&((c=new c(f,h+"enter",u,n,o)).target=p,c.relatedTarget=d,m=c),d=m,l&&u)e:{for(f=u,h=0,p=c=l;p;p=Zo(p))h++;for(p=0,m=f;m;m=Zo(m))p++;for(;0<h-p;)c=Zo(c),h--;for(;0<p-h;)f=Zo(f),p--;for(;h--;){if(c===f||null!==f&&c===f.alternate)break e;c=Zo(c),f=Zo(f)}c=null}else c=null;null!==l&&Jo(i,s,l,c,!1),null!==u&&null!==d&&Jo(i,d,u,c,!0)}if("select"===(l=(s=r?ja(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=eo;else if(qr(s))if(to)g=co;else{g=lo;var v=so}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=uo);switch(g&&(g=g(e,r))?Kr(i,g,n,o):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ot(s,"number",s.value)),v=r?ja(r):window,e){case"focusin":(qr(v)||"true"===v.contentEditable)&&(wo=v,ko=r,So=null);break;case"focusout":So=ko=wo=null;break;case"mousedown":Eo=!0;break;case"contextmenu":case"mouseup":case"dragend":Eo=!1,jo(i,n,o);break;case"selectionchange":if(xo)break;case"keydown":case"keyup":jo(i,n,o)}var y;if(zr)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Gr?Wr(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&($r&&"ko"!==n.locale&&(Gr||"onCompositionStart"!==b?"onCompositionEnd"===b&&Gr&&(y=ar()):(rr="value"in(nr=o)?nr.value:nr.textContent,Gr=!0)),0<(v=Qo(r,b)).length&&(b=new Er(b,e,null,n,o),i.push({event:b,listeners:v}),y?b.data=y:null!==(y=Hr(n))&&(b.data=y))),(y=Vr?function(e,t){switch(e){case"compositionend":return Hr(t);case"keypress":return 32!==t.which?null:(Ur=!0,Br);case"textInput":return(e=t.data)===Br&&Ur?null:e;default:return null}}(e,n):function(e,t){if(Gr)return"compositionend"===e||!zr&&Wr(e,t)?(e=ar(),or=rr=nr=null,Gr=!1,e):null;switch(e){case"paste":default: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 $r&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Qo(r,"onBeforeInput")).length&&(o=new Er("onBeforeInput","beforeinput",null,n,o),i.push({event:o,listeners:r}),o.data=y))}Uo(i,t)})}function Xo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Qo(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,a=o.stateNode;5===o.tag&&null!==a&&(o=a,null!=(a=Ot(e,n))&&r.unshift(Xo(e,a,o)),null!=(a=Ot(e,t))&&r.push(Xo(e,a,o))),e=e.return}return r}function Zo(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Jo(e,t,n,r,o){for(var a=t._reactName,i=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,o?null!=(l=Ot(n,a))&&i.unshift(Xo(n,l,s)):o||null!=(l=Ot(n,a))&&i.push(Xo(n,l,s))),n=n.return}0!==i.length&&e.push({event:t,listeners:i})}var ea=/\r\n?/g,ta=/\u0000|\uFFFD/g;function na(e){return("string"==typeof e?e:""+e).replace(ea,"\n").replace(ta,"")}function ra(e,t,n){if(t=na(t),na(e)!==t&&n)throw Error(ue(425))}function oa(){}var aa=null,ia=null;function sa(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var la="function"==typeof setTimeout?setTimeout:void 0,ua="function"==typeof clearTimeout?clearTimeout:void 0,ca="function"==typeof Promise?Promise:void 0,da="function"==typeof queueMicrotask?queueMicrotask:void 0!==ca?function(e){return ca.resolve(null).then(e).catch(fa)}:la;function fa(e){setTimeout(function(){throw e})}function pa(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Yn(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Yn(t)}function ha(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ma(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ga=Math.random().toString(36).slice(2),va="__reactFiber$"+ga,ya="__reactProps$"+ga,ba="__reactContainer$"+ga,xa="__reactEvents$"+ga,wa="__reactListeners$"+ga,ka="__reactHandles$"+ga;function Sa(e){var t=e[va];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ba]||n[va]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ma(e);null!==e;){if(n=e[va])return n;e=ma(e)}return t}n=(e=n).parentNode}return null}function Ea(e){return!(e=e[va]||e[ba])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ja(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(ue(33))}function Ca(e){return e[ya]||null}var Pa=[],Na=-1;function Ta(e){return{current:e}}function Ma(e){0>Na||(e.current=Pa[Na],Pa[Na]=null,Na--)}function Ra(e,t){Na++,Pa[Na]=e.current,e.current=t}var La={},Da=Ta(La),_a=Ta(!1),Aa=La;function Oa(e,t){var n=e.type.contextTypes;if(!n)return La;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,a={};for(o in n)a[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Ia(e){return null!=(e=e.childContextTypes)}function za(){Ma(_a),Ma(Da)}function Fa(e,t,n){if(Da.current!==La)throw Error(ue(168));Ra(Da,t),Ra(_a,n)}function Va(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(ue(108,Ye(e)||"Unknown",o));return $e({},n,r)}function $a(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||La,Aa=Da.current,Ra(Da,e),Ra(_a,_a.current),!0}function Ba(e,t,n){var r=e.stateNode;if(!r)throw Error(ue(169));n?(e=Va(e,t,Aa),r.__reactInternalMemoizedMergedChildContext=e,Ma(_a),Ma(Da),Ra(Da,e)):Ma(_a),Ra(_a,n)}var Ua=null,Wa=!1,Ha=!1;function Ga(e){null===Ua?Ua=[e]:Ua.push(e)}function Ya(){if(!Ha&&null!==Ua){Ha=!0;var e=0,t=En;try{var n=Ua;for(En=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ua=null,Wa=!1}catch(o){throw null!==Ua&&(Ua=Ua.slice(e+1)),Qt(rn,Ya),o}finally{En=t,Ha=!1}}return null}var qa=[],Ka=0,Xa=null,Qa=0,Za=[],Ja=0,ei=null,ti=1,ni="";function ri(e,t){qa[Ka++]=Qa,qa[Ka++]=Xa,Xa=e,Qa=t}function oi(e,t,n){Za[Ja++]=ti,Za[Ja++]=ni,Za[Ja++]=ei,ei=e;var r=ti;e=ni;var o=32-dn(r)-1;r&=~(1<<o),n+=1;var a=32-dn(t)+o;if(30<a){var i=o-o%5;a=(r&(1<<i)-1).toString(32),r>>=i,o-=i,ti=1<<32-dn(t)+o|n<<o|r,ni=a+e}else ti=1<<a|n<<o|r,ni=e}function ai(e){null!==e.return&&(ri(e,1),oi(e,1,0))}function ii(e){for(;e===Xa;)Xa=qa[--Ka],qa[Ka]=null,Qa=qa[--Ka],qa[Ka]=null;for(;e===ei;)ei=Za[--Ja],Za[Ja]=null,ni=Za[--Ja],Za[Ja]=null,ti=Za[--Ja],Za[Ja]=null}var si=null,li=null,ui=!1,ci=null;function di(e,t){var n=Ac(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function fi(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,si=e,li=ha(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,si=e,li=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==ei?{id:ti,overflow:ni}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ac(18,null,null,0)).stateNode=t,n.return=e,e.child=n,si=e,li=null,!0);default:return!1}}function pi(e){return!(!(1&e.mode)||128&e.flags)}function hi(e){if(ui){var t=li;if(t){var n=t;if(!fi(e,t)){if(pi(e))throw Error(ue(418));t=ha(n.nextSibling);var r=si;t&&fi(e,t)?di(r,n):(e.flags=-4097&e.flags|2,ui=!1,si=e)}}else{if(pi(e))throw Error(ue(418));e.flags=-4097&e.flags|2,ui=!1,si=e}}}function mi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;si=e}function gi(e){if(e!==si)return!1;if(!ui)return mi(e),ui=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!sa(e.type,e.memoizedProps)),t&&(t=li)){if(pi(e))throw vi(),Error(ue(418));for(;t;)di(e,t),t=ha(t.nextSibling)}if(mi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(ue(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){li=ha(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}li=null}}else li=si?ha(e.stateNode.nextSibling):null;return!0}function vi(){for(var e=li;e;)e=ha(e.nextSibling)}function yi(){li=si=null,ui=!1}function bi(e){null===ci?ci=[e]:ci.push(e)}var xi=Ee.ReactCurrentBatchConfig;function wi(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(ue(309));var r=n.stateNode}if(!r)throw Error(ue(147,e));var o=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:((t=function(e){var t=o.refs;null===e?delete t[a]:t[a]=e})._stringRef=a,t)}if("string"!=typeof e)throw Error(ue(284));if(!n._owner)throw Error(ue(290,e))}return e}function ki(e,t){throw e=Object.prototype.toString.call(t),Error(ue(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Si(e){return(0,e._init)(e._payload)}function Ei(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Ic(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function i(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=$c(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function l(e,t,n,r){var a=n.type;return a===Pe?c(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===Oe&&Si(a)===t.type)?((r=o(t,n.props)).ref=wi(e,t,n),r.return=e,r):((r=zc(n.type,n.key,n.props,null,e.mode,r)).ref=wi(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Bc(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function c(e,t,n,r,a){return null===t||7!==t.tag?((t=Fc(n,e.mode,r,a)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=$c(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case je:return(n=zc(t.type,t.key,t.props,null,e.mode,n)).ref=wi(e,null,t),n.return=e,n;case Ce:return(t=Bc(t,e.mode,n)).return=e,t;case Oe:return d(e,(0,t._init)(t._payload),n)}if(at(t)||Fe(t))return(t=Fc(t,e.mode,n,null)).return=e,t;ki(e,t)}return null}function f(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case je:return n.key===o?l(e,t,n,r):null;case Ce:return n.key===o?u(e,t,n,r):null;case Oe:return f(e,t,(o=n._init)(n._payload),r)}if(at(n)||Fe(n))return null!==o?null:c(e,t,n,r,null);ki(e,n)}return null}function p(e,t,n,r,o){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case je:return l(t,e=e.get(null===r.key?n:r.key)||null,r,o);case Ce:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case Oe:return p(e,t,n,(0,r._init)(r._payload),o)}if(at(r)||Fe(r))return c(t,e=e.get(n)||null,r,o,null);ki(t,r)}return null}return function s(l,u,c,h){if("object"==typeof c&&null!==c&&c.type===Pe&&null===c.key&&(c=c.props.children),"object"==typeof c&&null!==c){switch(c.$$typeof){case je:e:{for(var m=c.key,g=u;null!==g;){if(g.key===m){if((m=c.type)===Pe){if(7===g.tag){n(l,g.sibling),(u=o(g,c.props.children)).return=l,l=u;break e}}else if(g.elementType===m||"object"==typeof m&&null!==m&&m.$$typeof===Oe&&Si(m)===g.type){n(l,g.sibling),(u=o(g,c.props)).ref=wi(l,g,c),u.return=l,l=u;break e}n(l,g);break}t(l,g),g=g.sibling}c.type===Pe?((u=Fc(c.props.children,l.mode,h,c.key)).return=l,l=u):((h=zc(c.type,c.key,c.props,null,l.mode,h)).ref=wi(l,u,c),h.return=l,l=h)}return i(l);case Ce:e:{for(g=c.key;null!==u;){if(u.key===g){if(4===u.tag&&u.stateNode.containerInfo===c.containerInfo&&u.stateNode.implementation===c.implementation){n(l,u.sibling),(u=o(u,c.children||[])).return=l,l=u;break e}n(l,u);break}t(l,u),u=u.sibling}(u=Bc(c,l.mode,h)).return=l,l=u}return i(l);case Oe:return s(l,u,(g=c._init)(c._payload),h)}if(at(c))return function(o,i,s,l){for(var u=null,c=null,h=i,m=i=0,g=null;null!==h&&m<s.length;m++){h.index>m?(g=h,h=null):g=h.sibling;var v=f(o,h,s[m],l);if(null===v){null===h&&(h=g);break}e&&h&&null===v.alternate&&t(o,h),i=a(v,i,m),null===c?u=v:c.sibling=v,c=v,h=g}if(m===s.length)return n(o,h),ui&&ri(o,m),u;if(null===h){for(;m<s.length;m++)null!==(h=d(o,s[m],l))&&(i=a(h,i,m),null===c?u=h:c.sibling=h,c=h);return ui&&ri(o,m),u}for(h=r(o,h);m<s.length;m++)null!==(g=p(h,o,m,s[m],l))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),i=a(g,i,m),null===c?u=g:c.sibling=g,c=g);return e&&h.forEach(function(e){return t(o,e)}),ui&&ri(o,m),u}(l,u,c,h);if(Fe(c))return function(o,i,s,l){var u=Fe(s);if("function"!=typeof u)throw Error(ue(150));if(null==(s=u.call(s)))throw Error(ue(151));for(var c=u=null,h=i,m=i=0,g=null,v=s.next();null!==h&&!v.done;m++,v=s.next()){h.index>m?(g=h,h=null):g=h.sibling;var y=f(o,h,v.value,l);if(null===y){null===h&&(h=g);break}e&&h&&null===y.alternate&&t(o,h),i=a(y,i,m),null===c?u=y:c.sibling=y,c=y,h=g}if(v.done)return n(o,h),ui&&ri(o,m),u;if(null===h){for(;!v.done;m++,v=s.next())null!==(v=d(o,v.value,l))&&(i=a(v,i,m),null===c?u=v:c.sibling=v,c=v);return ui&&ri(o,m),u}for(h=r(o,h);!v.done;m++,v=s.next())null!==(v=p(h,o,m,v.value,l))&&(e&&null!==v.alternate&&h.delete(null===v.key?m:v.key),i=a(v,i,m),null===c?u=v:c.sibling=v,c=v);return e&&h.forEach(function(e){return t(o,e)}),ui&&ri(o,m),u}(l,u,c,h);ki(l,c)}return"string"==typeof c&&""!==c||"number"==typeof c?(c=""+c,null!==u&&6===u.tag?(n(l,u.sibling),(u=o(u,c)).return=l,l=u):(n(l,u),(u=$c(c,l.mode,h)).return=l,l=u),i(l)):n(l,u)}}var ji=Ei(!0),Ci=Ei(!1),Pi=Ta(null),Ni=null,Ti=null,Mi=null;function Ri(){Mi=Ti=Ni=null}function Li(e){var t=Pi.current;Ma(Pi),e._currentValue=t}function Di(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function _i(e,t){Ni=e,Mi=Ti=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(Sl=!0),e.firstContext=null)}function Ai(e){var t=e._currentValue;if(Mi!==e)if(e={context:e,memoizedValue:t,next:null},null===Ti){if(null===Ni)throw Error(ue(308));Ti=e,Ni.dependencies={lanes:0,firstContext:e}}else Ti=Ti.next=e;return t}var Oi=null;function Ii(e){null===Oi?Oi=[e]:Oi.push(e)}function zi(e,t,n,r){var o=t.interleaved;return null===o?(n.next=n,Ii(t)):(n.next=o.next,o.next=n),t.interleaved=n,Fi(e,r)}function Fi(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Vi=!1;function $i(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Bi(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ui(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wi(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Lu){var o=r.pending;return null===o?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Fi(e,n)}return null===(o=r.interleaved)?(t.next=t,Ii(r)):(t.next=o.next,o.next=t),r.interleaved=t,Fi(e,n)}function Hi(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Sn(e,n)}}function Gi(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?o=a=i:a=a.next=i,n=n.next}while(null!==n);null===a?o=a=t:a=a.next=t}else o=a=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Yi(e,t,n,r){var o=e.updateQueue;Vi=!1;var a=o.firstBaseUpdate,i=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,u=l.next;l.next=null,null===i?a=u:i.next=u,i=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==a){var d=o.baseState;for(i=0,c=u=l=null,s=a;;){var f=s.lane,p=s.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(f="function"==typeof(h=m.payload)?h.call(p,d,f):h))break e;d=$e({},d,f);break e;case 2:Vi=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=o.effects)?o.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=p,l=d):c=c.next=p,i|=f;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(f=s).next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}if(null===c&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,null!==(t=o.shared.interleaved)){o=t;do{i|=o.lane,o=o.next}while(o!==t)}else null===a&&(o.shared.lanes=0);Vu|=i,e.lanes=i,e.memoizedState=d}}function qi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(ue(191,o));o.call(r)}}}var Ki={},Xi=Ta(Ki),Qi=Ta(Ki),Zi=Ta(Ki);function Ji(e){if(e===Ki)throw Error(ue(174));return e}function es(e,t){switch(Ra(Zi,t),Ra(Qi,e),Ra(Xi,Ki),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ft(null,"");break;default:t=ft(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ma(Xi),Ra(Xi,t)}function ts(){Ma(Xi),Ma(Qi),Ma(Zi)}function ns(e){Ji(Zi.current);var t=Ji(Xi.current),n=ft(t,e.type);t!==n&&(Ra(Qi,e),Ra(Xi,n))}function rs(e){Qi.current===e&&(Ma(Xi),Ma(Qi))}var os=Ta(0);function as(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var is=[];function ss(){for(var e=0;e<is.length;e++)is[e]._workInProgressVersionPrimary=null;is.length=0}var ls=Ee.ReactCurrentDispatcher,us=Ee.ReactCurrentBatchConfig,cs=0,ds=null,fs=null,ps=null,hs=!1,ms=!1,gs=0,vs=0;function ys(){throw Error(ue(321))}function bs(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!fo(e[n],t[n]))return!1;return!0}function xs(e,t,n,r,o,a){if(cs=a,ds=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ls.current=null===e||null===e.memoizedState?rl:ol,e=n(r,o),ms){a=0;do{if(ms=!1,gs=0,25<=a)throw Error(ue(301));a+=1,ps=fs=null,t.updateQueue=null,ls.current=al,e=n(r,o)}while(ms)}if(ls.current=nl,t=null!==fs&&null!==fs.next,cs=0,ps=fs=ds=null,hs=!1,t)throw Error(ue(300));return e}function ws(){var e=0!==gs;return gs=0,e}function ks(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ps?ds.memoizedState=ps=e:ps=ps.next=e,ps}function Ss(){if(null===fs){var e=ds.alternate;e=null!==e?e.memoizedState:null}else e=fs.next;var t=null===ps?ds.memoizedState:ps.next;if(null!==t)ps=t,fs=e;else{if(null===e)throw Error(ue(310));e={memoizedState:(fs=e).memoizedState,baseState:fs.baseState,baseQueue:fs.baseQueue,queue:fs.queue,next:null},null===ps?ds.memoizedState=ps=e:ps=ps.next=e}return ps}function Es(e,t){return"function"==typeof t?t(e):t}function js(e){var t=Ss(),n=t.queue;if(null===n)throw Error(ue(311));n.lastRenderedReducer=e;var r=fs,o=r.baseQueue,a=n.pending;if(null!==a){if(null!==o){var i=o.next;o.next=a.next,a.next=i}r.baseQueue=o=a,n.pending=null}if(null!==o){a=o.next,r=r.baseState;var s=i=null,l=null,u=a;do{var c=u.lane;if((cs&c)===c)null!==l&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===l?(s=l=d,i=r):l=l.next=d,ds.lanes|=c,Vu|=c}u=u.next}while(null!==u&&u!==a);null===l?i=r:l.next=s,fo(r,t.memoizedState)||(Sl=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{a=o.lane,ds.lanes|=a,Vu|=a,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Cs(e){var t=Ss(),n=t.queue;if(null===n)throw Error(ue(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(null!==o){n.pending=null;var i=o=o.next;do{a=e(a,i.action),i=i.next}while(i!==o);fo(a,t.memoizedState)||(Sl=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Ps(){}function Ns(e,t){var n=ds,r=Ss(),o=t(),a=!fo(r.memoizedState,o);if(a&&(r.memoizedState=o,Sl=!0),r=r.queue,Vs(Rs.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ps&&1&ps.memoizedState.tag){if(n.flags|=2048,As(9,Ms.bind(null,n,r,o,t),void 0,null),null===Du)throw Error(ue(349));30&cs||Ts(n,t,o)}return o}function Ts(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ds.updateQueue)?(t={lastEffect:null,stores:null},ds.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ms(e,t,n,r){t.value=n,t.getSnapshot=r,Ls(t)&&Ds(e)}function Rs(e,t,n){return n(function(){Ls(t)&&Ds(e)})}function Ls(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!fo(e,n)}catch(r){return!0}}function Ds(e){var t=Fi(e,1);null!==t&&ic(t,e,1,-1)}function _s(e){var t=ks();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Es,lastRenderedState:e},t.queue=e,e=e.dispatch=Zs.bind(null,ds,e),[t.memoizedState,e]}function As(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ds.updateQueue)?(t={lastEffect:null,stores:null},ds.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Os(){return Ss().memoizedState}function Is(e,t,n,r){var o=ks();ds.flags|=e,o.memoizedState=As(1|t,n,void 0,void 0===r?null:r)}function zs(e,t,n,r){var o=Ss();r=void 0===r?null:r;var a=void 0;if(null!==fs){var i=fs.memoizedState;if(a=i.destroy,null!==r&&bs(r,i.deps))return void(o.memoizedState=As(t,n,a,r))}ds.flags|=e,o.memoizedState=As(1|t,n,a,r)}function Fs(e,t){return Is(8390656,8,e,t)}function Vs(e,t){return zs(2048,8,e,t)}function $s(e,t){return zs(4,2,e,t)}function Bs(e,t){return zs(4,4,e,t)}function Us(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ws(e,t,n){return n=null!=n?n.concat([e]):null,zs(4,4,Us.bind(null,t,e),n)}function Hs(){}function Gs(e,t){var n=Ss();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&bs(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ys(e,t){var n=Ss();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&bs(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function qs(e,t,n){return 21&cs?(fo(n,t)||(n=xn(),ds.lanes|=n,Vu|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Sl=!0),e.memoizedState=n)}function Ks(e,t){var n=En;En=0!==n&&4>n?n:4,e(!0);var r=us.transition;us.transition={};try{e(!1),t()}finally{En=n,us.transition=r}}function Xs(){return Ss().memoizedState}function Qs(e,t,n){var r=ac(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Js(e))el(t,n);else if(null!==(n=zi(e,t,n,r))){ic(n,e,r,oc()),tl(n,t,r)}}function Zs(e,t,n){var r=ac(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Js(e))el(t,o);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var i=t.lastRenderedState,s=a(i,n);if(o.hasEagerState=!0,o.eagerState=s,fo(s,i)){var l=t.interleaved;return null===l?(o.next=o,Ii(t)):(o.next=l.next,l.next=o),void(t.interleaved=o)}}catch(u){}null!==(n=zi(e,t,o,r))&&(ic(n,e,r,o=oc()),tl(n,t,r))}}function Js(e){var t=e.alternate;return e===ds||null!==t&&t===ds}function el(e,t){ms=hs=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function tl(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Sn(e,n)}}var nl={readContext:Ai,useCallback:ys,useContext:ys,useEffect:ys,useImperativeHandle:ys,useInsertionEffect:ys,useLayoutEffect:ys,useMemo:ys,useReducer:ys,useRef:ys,useState:ys,useDebugValue:ys,useDeferredValue:ys,useTransition:ys,useMutableSource:ys,useSyncExternalStore:ys,useId:ys,unstable_isNewReconciler:!1},rl={readContext:Ai,useCallback:function(e,t){return ks().memoizedState=[e,void 0===t?null:t],e},useContext:Ai,useEffect:Fs,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Is(4194308,4,Us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Is(4194308,4,e,t)},useInsertionEffect:function(e,t){return Is(4,2,e,t)},useMemo:function(e,t){var n=ks();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ks();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Qs.bind(null,ds,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ks().memoizedState=e},useState:_s,useDebugValue:Hs,useDeferredValue:function(e){return ks().memoizedState=e},useTransition:function(){var e=_s(!1),t=e[0];return e=Ks.bind(null,e[1]),ks().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ds,o=ks();if(ui){if(void 0===n)throw Error(ue(407));n=n()}else{if(n=t(),null===Du)throw Error(ue(349));30&cs||Ts(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,Fs(Rs.bind(null,r,a,e),[e]),r.flags|=2048,As(9,Ms.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=ks(),t=Du.identifierPrefix;if(ui){var n=ni;t=":"+t+"R"+(n=(ti&~(1<<32-dn(ti)-1)).toString(32)+n),0<(n=gs++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=vs++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ol={readContext:Ai,useCallback:Gs,useContext:Ai,useEffect:Vs,useImperativeHandle:Ws,useInsertionEffect:$s,useLayoutEffect:Bs,useMemo:Ys,useReducer:js,useRef:Os,useState:function(){return js(Es)},useDebugValue:Hs,useDeferredValue:function(e){return qs(Ss(),fs.memoizedState,e)},useTransition:function(){return[js(Es)[0],Ss().memoizedState]},useMutableSource:Ps,useSyncExternalStore:Ns,useId:Xs,unstable_isNewReconciler:!1},al={readContext:Ai,useCallback:Gs,useContext:Ai,useEffect:Vs,useImperativeHandle:Ws,useInsertionEffect:$s,useLayoutEffect:Bs,useMemo:Ys,useReducer:Cs,useRef:Os,useState:function(){return Cs(Es)},useDebugValue:Hs,useDeferredValue:function(e){var t=Ss();return null===fs?t.memoizedState=e:qs(t,fs.memoizedState,e)},useTransition:function(){return[Cs(Es)[0],Ss().memoizedState]},useMutableSource:Ps,useSyncExternalStore:Ns,useId:Xs,unstable_isNewReconciler:!1};function il(e,t){if(e&&e.defaultProps){for(var n in t=$e({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function sl(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:$e({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ll={isMounted:function(e){return!!(e=e._reactInternals)&&Gt(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=oc(),o=ac(e),a=Ui(r,o);a.payload=t,null!=n&&(a.callback=n),null!==(t=Wi(e,a,o))&&(ic(t,e,o,r),Hi(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=oc(),o=ac(e),a=Ui(r,o);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=Wi(e,a,o))&&(ic(t,e,o,r),Hi(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=oc(),r=ac(e),o=Ui(n,r);o.tag=2,null!=t&&(o.callback=t),null!==(t=Wi(e,o,r))&&(ic(t,e,r,n),Hi(t,e,r))}};function ul(e,t,n,r,o,a,i){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,i):!t.prototype||!t.prototype.isPureReactComponent||(!po(n,r)||!po(o,a))}function cl(e,t,n){var r=!1,o=La,a=t.contextType;return"object"==typeof a&&null!==a?a=Ai(a):(o=Ia(t)?Aa:Da.current,a=(r=null!=(r=t.contextTypes))?Oa(e,o):La),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ll,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=a),t}function dl(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ll.enqueueReplaceState(t,t.state,null)}function fl(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},$i(e);var a=t.contextType;"object"==typeof a&&null!==a?o.context=Ai(a):(a=Ia(t)?Aa:Da.current,o.context=Oa(e,a)),o.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(sl(e,t,a,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&ll.enqueueReplaceState(o,o.state,null),Yi(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4194308)}function pl(e,t){try{var n="",r=t;do{n+=He(r),r=r.return}while(r);var o=n}catch(a){o="\nError generating stack: "+a.message+"\n"+a.stack}return{value:e,source:t,stack:o,digest:null}}function hl(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ml(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var gl="function"==typeof WeakMap?WeakMap:Map;function vl(e,t,n){(n=Ui(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){qu||(qu=!0,Ku=r),ml(0,t)},n}function yl(e,t,n){(n=Ui(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ml(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){ml(0,t),"function"!=typeof r&&(null===Xu?Xu=new Set([this]):Xu.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function bl(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new gl;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Tc.bind(null,e,t,n),t.then(e,e))}function xl(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function wl(e,t,n,r,o){return 1&e.mode?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ui(-1,1)).tag=2,Wi(n,t,1))),n.lanes|=1),e)}var kl=Ee.ReactCurrentOwner,Sl=!1;function El(e,t,n,r){t.child=null===e?Ci(t,null,n,r):ji(t,e.child,n,r)}function jl(e,t,n,r,o){n=n.render;var a=t.ref;return _i(t,o),r=xs(e,t,n,r,a,o),n=ws(),null===e||Sl?(ui&&n&&ai(t),t.flags|=1,El(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ql(e,t,o))}function Cl(e,t,n,r,o){if(null===e){var a=n.type;return"function"!=typeof a||Oc(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=zc(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Pl(e,t,a,r,o))}if(a=e.child,0===(e.lanes&o)){var i=a.memoizedProps;if((n=null!==(n=n.compare)?n:po)(i,r)&&e.ref===t.ref)return ql(e,t,o)}return t.flags|=1,(e=Ic(a,r)).ref=t.ref,e.return=t,t.child=e}function Pl(e,t,n,r,o){if(null!==e){var a=e.memoizedProps;if(po(a,r)&&e.ref===t.ref){if(Sl=!1,t.pendingProps=r=a,0===(e.lanes&o))return t.lanes=e.lanes,ql(e,t,o);131072&e.flags&&(Sl=!0)}}return Ml(e,t,n,r,o)}function Nl(e,t,n){var r=t.pendingProps,o=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ra(Iu,Ou),Ou|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Ra(Iu,Ou),Ou|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ra(Iu,Ou),Ou|=n;else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Ra(Iu,Ou),Ou|=r;return El(e,t,o,n),t.child}function Tl(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ml(e,t,n,r,o){var a=Ia(n)?Aa:Da.current;return a=Oa(t,a),_i(t,o),n=xs(e,t,n,r,a,o),r=ws(),null===e||Sl?(ui&&r&&ai(t),t.flags|=1,El(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ql(e,t,o))}function Rl(e,t,n,r,o){if(Ia(n)){var a=!0;$a(t)}else a=!1;if(_i(t,o),null===t.stateNode)Yl(e,t),cl(t,n,r),fl(t,n,r,o),r=!0;else if(null===e){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,u=n.contextType;"object"==typeof u&&null!==u?u=Ai(u):u=Oa(t,u=Ia(n)?Aa:Da.current);var c=n.getDerivedStateFromProps,d="function"==typeof c||"function"==typeof i.getSnapshotBeforeUpdate;d||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==r||l!==u)&&dl(t,i,r,u),Vi=!1;var f=t.memoizedState;i.state=f,Yi(t,r,i,o),l=t.memoizedState,s!==r||f!==l||_a.current||Vi?("function"==typeof c&&(sl(t,n,c,r),l=t.memoizedState),(s=Vi||ul(t,n,s,r,f,l,u))?(d||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||("function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"==typeof i.componentDidMount&&(t.flags|=4194308)):("function"==typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),i.props=r,i.state=l,i.context=u,r=s):("function"==typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Bi(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:il(t.type,s),i.props=u,d=t.pendingProps,f=i.context,"object"==typeof(l=n.contextType)&&null!==l?l=Ai(l):l=Oa(t,l=Ia(n)?Aa:Da.current);var p=n.getDerivedStateFromProps;(c="function"==typeof p||"function"==typeof i.getSnapshotBeforeUpdate)||"function"!=typeof i.UNSAFE_componentWillReceiveProps&&"function"!=typeof i.componentWillReceiveProps||(s!==d||f!==l)&&dl(t,i,r,l),Vi=!1,f=t.memoizedState,i.state=f,Yi(t,r,i,o);var h=t.memoizedState;s!==d||f!==h||_a.current||Vi?("function"==typeof p&&(sl(t,n,p,r),h=t.memoizedState),(u=Vi||ul(t,n,u,r,f,h,l)||!1)?(c||"function"!=typeof i.UNSAFE_componentWillUpdate&&"function"!=typeof i.componentWillUpdate||("function"==typeof i.componentWillUpdate&&i.componentWillUpdate(r,h,l),"function"==typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof i.componentDidUpdate&&(t.flags|=4),"function"==typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),i.props=r,i.state=h,i.context=l,r=u):("function"!=typeof i.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!=typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Ll(e,t,n,r,a,o)}function Ll(e,t,n,r,o,a){Tl(e,t);var i=!!(128&t.flags);if(!r&&!i)return o&&Ba(t,n,!1),ql(e,t,a);r=t.stateNode,kl.current=t;var s=i&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&i?(t.child=ji(t,e.child,null,a),t.child=ji(t,null,s,a)):El(e,t,s,a),t.memoizedState=r.state,o&&Ba(t,n,!0),t.child}function Dl(e){var t=e.stateNode;t.pendingContext?Fa(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Fa(0,t.context,!1),es(e,t.containerInfo)}function _l(e,t,n,r,o){return yi(),bi(o),t.flags|=256,El(e,t,n,r),t.child}var Al,Ol,Il,zl,Fl={dehydrated:null,treeContext:null,retryLane:0};function Vl(e){return{baseLanes:e,cachePool:null,transitions:null}}function $l(e,t,n){var r,o=t.pendingProps,a=os.current,i=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&a)),r?(i=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Ra(os,1&a),null===e)return hi(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=o.children,e=o.fallback,i?(o=t.mode,i=t.child,s={mode:"hidden",children:s},1&o||null===i?i=Vc(s,o,0,null):(i.childLanes=0,i.pendingProps=s),e=Fc(e,o,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Vl(n),t.memoizedState=Fl,e):Bl(t,s));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,o,a,i){if(n)return 256&t.flags?(t.flags&=-257,Ul(e,t,i,r=hl(Error(ue(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,o=t.mode,r=Vc({mode:"visible",children:r.children},o,0,null),(a=Fc(a,o,i,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,1&t.mode&&ji(t,e.child,null,i),t.child.memoizedState=Vl(i),t.memoizedState=Fl,a);if(!(1&t.mode))return Ul(e,t,i,null);if("$!"===o.data){if(r=o.nextSibling&&o.nextSibling.dataset)var s=r.dgst;return r=s,Ul(e,t,i,r=hl(a=Error(ue(419)),r,void 0))}if(s=0!==(i&e.childLanes),Sl||s){if(null!==(r=Du)){switch(i&-i){case 4:o=2;break;case 16:o=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(o=0!==(o&(r.suspendedLanes|i))?0:o)&&o!==a.retryLane&&(a.retryLane=o,Fi(e,o),ic(r,e,o,-1))}return bc(),Ul(e,t,i,r=hl(Error(ue(421))))}return"$?"===o.data?(t.flags|=128,t.child=e.child,t=Rc.bind(null,e),o._reactRetry=t,null):(e=a.treeContext,li=ha(o.nextSibling),si=t,ui=!0,ci=null,null!==e&&(Za[Ja++]=ti,Za[Ja++]=ni,Za[Ja++]=ei,ti=e.id,ni=e.overflow,ei=t),t=Bl(t,r.children),t.flags|=4096,t)}(e,t,s,o,r,a,n);if(i){i=o.fallback,s=t.mode,r=(a=e.child).sibling;var l={mode:"hidden",children:o.children};return 1&s||t.child===a?(o=Ic(a,l)).subtreeFlags=14680064&a.subtreeFlags:((o=t.child).childLanes=0,o.pendingProps=l,t.deletions=null),null!==r?i=Ic(r,i):(i=Fc(i,s,n,null)).flags|=2,i.return=t,o.return=t,o.sibling=i,t.child=o,o=i,i=t.child,s=null===(s=e.child.memoizedState)?Vl(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=Fl,o}return e=(i=e.child).sibling,o=Ic(i,{mode:"visible",children:o.children}),!(1&t.mode)&&(o.lanes=n),o.return=t,o.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=o,t.memoizedState=null,o}function Bl(e,t){return(t=Vc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ul(e,t,n,r){return null!==r&&bi(r),ji(t,e.child,null,n),(e=Bl(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Wl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Di(e.return,t,n)}function Hl(e,t,n,r,o){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o)}function Gl(e,t,n){var r=t.pendingProps,o=r.revealOrder,a=r.tail;if(El(e,t,r.children,n),2&(r=os.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Wl(e,n,t);else if(19===e.tag)Wl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ra(os,r),1&t.mode)switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===as(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Hl(t,!1,o,n,a);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===as(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Hl(t,!0,n,null,a);break;case"together":Hl(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Yl(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ql(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Vu|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(ue(153));if(null!==t.child){for(n=Ic(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ic(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Kl(e,t){if(!ui)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ql(e,t,n){var r=t.pendingProps;switch(ii(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xl(t),null;case 1:case 17:return Ia(t.type)&&za(),Xl(t),null;case 3:return r=t.stateNode,ts(),Ma(_a),Ma(Da),ss(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(gi(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==ci&&(cc(ci),ci=null))),Ol(e,t),Xl(t),null;case 5:rs(t);var o=Ji(Zi.current);if(n=t.type,null!==e&&null!=t.stateNode)Il(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(ue(166));return Xl(t),null}if(e=Ji(Xi.current),gi(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[va]=t,r[ya]=a,e=!!(1&t.mode),n){case"dialog":Wo("cancel",r),Wo("close",r);break;case"iframe":case"object":case"embed":Wo("load",r);break;case"video":case"audio":for(o=0;o<Vo.length;o++)Wo(Vo[o],r);break;case"source":Wo("error",r);break;case"img":case"image":case"link":Wo("error",r),Wo("load",r);break;case"details":Wo("toggle",r);break;case"input":et(r,a),Wo("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Wo("invalid",r);break;case"textarea":lt(r,a),Wo("invalid",r)}for(var i in kt(n,a),o=null,a)if(a.hasOwnProperty(i)){var s=a[i];"children"===i?"string"==typeof s?r.textContent!==s&&(!0!==a.suppressHydrationWarning&&ra(r.textContent,s,e),o=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==a.suppressHydrationWarning&&ra(r.textContent,s,e),o=["children",""+s]):de.hasOwnProperty(i)&&null!=s&&"onScroll"===i&&Wo("scroll",r)}switch(n){case"input":Xe(r),rt(r,a,!0);break;case"textarea":Xe(r),ct(r);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(r.onclick=oa)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{i=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=dt(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=i.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),"select"===n&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[va]=t,e[ya]=r,Al(e,t,!1,!1),t.stateNode=e;e:{switch(i=St(n,r),n){case"dialog":Wo("cancel",e),Wo("close",e),o=r;break;case"iframe":case"object":case"embed":Wo("load",e),o=r;break;case"video":case"audio":for(o=0;o<Vo.length;o++)Wo(Vo[o],e);o=r;break;case"source":Wo("error",e),o=r;break;case"img":case"image":case"link":Wo("error",e),Wo("load",e),o=r;break;case"details":Wo("toggle",e),o=r;break;case"input":et(e,r),o=Je(e,r),Wo("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=$e({},r,{value:void 0}),Wo("invalid",e);break;case"textarea":lt(e,r),o=st(e,r),Wo("invalid",e)}for(a in kt(n,o),s=o)if(s.hasOwnProperty(a)){var l=s[a];"style"===a?xt(e,l):"dangerouslySetInnerHTML"===a?null!=(l=l?l.__html:void 0)&&mt(e,l):"children"===a?"string"==typeof l?("textarea"!==n||""!==l)&&gt(e,l):"number"==typeof l&&gt(e,""+l):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(de.hasOwnProperty(a)?null!=l&&"onScroll"===a&&Wo("scroll",e):null!=l&&Se(e,a,l,i))}switch(n){case"input":Xe(e),rt(e,r,!1);break;case"textarea":Xe(e),ct(e);break;case"option":null!=r.value&&e.setAttribute("value",""+qe(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?it(e,!!r.multiple,a,!1):null!=r.defaultValue&&it(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof o.onClick&&(e.onclick=oa)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Xl(t),null;case 6:if(e&&null!=t.stateNode)zl(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(ue(166));if(n=Ji(Zi.current),Ji(Xi.current),gi(t)){if(r=t.stateNode,n=t.memoizedProps,r[va]=t,(a=r.nodeValue!==n)&&null!==(e=si))switch(e.tag){case 3:ra(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&ra(r.nodeValue,n,!!(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[va]=t,t.stateNode=r}return Xl(t),null;case 13:if(Ma(os),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ui&&null!==li&&1&t.mode&&!(128&t.flags))vi(),yi(),t.flags|=98560,a=!1;else if(a=gi(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(ue(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(ue(317));a[va]=t}else yi(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Xl(t),a=!1}else null!==ci&&(cc(ci),ci=null),a=!0;if(!a)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&os.current?0===zu&&(zu=3):bc())),null!==t.updateQueue&&(t.flags|=4),Xl(t),null);case 4:return ts(),Ol(e,t),null===e&&Yo(t.stateNode.containerInfo),Xl(t),null;case 10:return Li(t.type._context),Xl(t),null;case 19:if(Ma(os),null===(a=t.memoizedState))return Xl(t),null;if(r=!!(128&t.flags),null===(i=a.rendering))if(r)Kl(a,!1);else{if(0!==zu||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(i=as(e))){for(t.flags|=128,Kl(a,!1),null!==(r=i.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(i=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,a.type=i.type,e=i.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ra(os,1&os.current|2),t.child}e=e.sibling}null!==a.tail&&tn()>Gu&&(t.flags|=128,r=!0,Kl(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=as(i))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Kl(a,!0),null===a.tail&&"hidden"===a.tailMode&&!i.alternate&&!ui)return Xl(t),null}else 2*tn()-a.renderingStartTime>Gu&&1073741824!==n&&(t.flags|=128,r=!0,Kl(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(null!==(n=a.last)?n.sibling=i:t.child=i,a.last=i)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=tn(),t.sibling=null,n=os.current,Ra(os,r?1&n|2:1&n),t):(Xl(t),null);case 22:case 23:return mc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&Ou)&&(Xl(t),6&t.subtreeFlags&&(t.flags|=8192)):Xl(t),null;case 24:case 25:return null}throw Error(ue(156,t.tag))}function Zl(e,t){switch(ii(t),t.tag){case 1:return Ia(t.type)&&za(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ts(),Ma(_a),Ma(Da),ss(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return rs(t),null;case 13:if(Ma(os),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(ue(340));yi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ma(os),null;case 4:return ts(),null;case 10:return Li(t.type._context),null;case 22:case 23:return mc(),null;default:return null}}Al=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ol=function(){},Il=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ji(Xi.current);var a,i=null;switch(n){case"input":o=Je(e,o),r=Je(e,r),i=[];break;case"select":o=$e({},o,{value:void 0}),r=$e({},r,{value:void 0}),i=[];break;case"textarea":o=st(e,o),r=st(e,r),i=[];break;default:"function"!=typeof o.onClick&&"function"==typeof r.onClick&&(e.onclick=oa)}for(u in kt(n,r),n=null,o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&null!=o[u])if("style"===u){var s=o[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(de.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(s=null!=o?o[u]:void 0,r.hasOwnProperty(u)&&l!==s&&(null!=l||null!=s))if("style"===u)if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(i||(i=[]),i.push(u,n)),n=l;else"dangerouslySetInnerHTML"===u?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(i=i||[]).push(u,l)):"children"===u?"string"!=typeof l&&"number"!=typeof l||(i=i||[]).push(u,""+l):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(de.hasOwnProperty(u)?(null!=l&&"onScroll"===u&&Wo("scroll",e),i||s===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}},zl=function(e,t,n,r){n!==r&&(t.flags|=4)};var Jl=!1,eu=!1,tu="function"==typeof WeakSet?WeakSet:Set,nu=null;function ru(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){Nc(e,t,r)}else n.current=null}function ou(e,t,n){try{n()}catch(r){Nc(e,t,r)}}var au=!1;function iu(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var a=o.destroy;o.destroy=void 0,void 0!==a&&ou(t,n,a)}o=o.next}while(o!==r)}}function su(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function lu(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function uu(e){var t=e.alternate;null!==t&&(e.alternate=null,uu(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[va],delete t[ya],delete t[xa],delete t[wa],delete t[ka])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function cu(e){return 5===e.tag||3===e.tag||4===e.tag}function du(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||cu(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function fu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=oa));else if(4!==r&&null!==(e=e.child))for(fu(e,t,n),e=e.sibling;null!==e;)fu(e,t,n),e=e.sibling}function pu(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(pu(e,t,n),e=e.sibling;null!==e;)pu(e,t,n),e=e.sibling}var hu=null,mu=!1;function gu(e,t,n){for(n=n.child;null!==n;)vu(e,t,n),n=n.sibling}function vu(e,t,n){if(cn&&"function"==typeof cn.onCommitFiberUnmount)try{cn.onCommitFiberUnmount(un,n)}catch(s){}switch(n.tag){case 5:eu||ru(n,t);case 6:var r=hu,o=mu;hu=null,gu(e,t,n),mu=o,null!==(hu=r)&&(mu?(e=hu,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):hu.removeChild(n.stateNode));break;case 18:null!==hu&&(mu?(e=hu,n=n.stateNode,8===e.nodeType?pa(e.parentNode,n):1===e.nodeType&&pa(e,n),Yn(e)):pa(hu,n.stateNode));break;case 4:r=hu,o=mu,hu=n.stateNode.containerInfo,mu=!0,gu(e,t,n),hu=r,mu=o;break;case 0:case 11:case 14:case 15:if(!eu&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var a=o,i=a.destroy;a=a.tag,void 0!==i&&(2&a||4&a)&&ou(n,t,i),o=o.next}while(o!==r)}gu(e,t,n);break;case 1:if(!eu&&(ru(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Nc(n,t,s)}gu(e,t,n);break;case 21:gu(e,t,n);break;case 22:1&n.mode?(eu=(r=eu)||null!==n.memoizedState,gu(e,t,n),eu=r):gu(e,t,n);break;default:gu(e,t,n)}}function yu(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new tu),t.forEach(function(t){var r=Lc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function bu(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,i=t,s=i;e:for(;null!==s;){switch(s.tag){case 5:hu=s.stateNode,mu=!1;break e;case 3:case 4:hu=s.stateNode.containerInfo,mu=!0;break e}s=s.return}if(null===hu)throw Error(ue(160));vu(a,i,o),hu=null,mu=!1;var l=o.alternate;null!==l&&(l.return=null),o.return=null}catch(u){Nc(o,t,u)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)xu(t,e),t=t.sibling}function xu(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(bu(t,e),wu(e),4&r){try{iu(3,e,e.return),su(3,e)}catch(m){Nc(e,e.return,m)}try{iu(5,e,e.return)}catch(m){Nc(e,e.return,m)}}break;case 1:bu(t,e),wu(e),512&r&&null!==n&&ru(n,n.return);break;case 5:if(bu(t,e),wu(e),512&r&&null!==n&&ru(n,n.return),32&e.flags){var o=e.stateNode;try{gt(o,"")}catch(m){Nc(e,e.return,m)}}if(4&r&&null!=(o=e.stateNode)){var a=e.memoizedProps,i=null!==n?n.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===a.type&&null!=a.name&&tt(o,a),St(s,i);var u=St(s,a);for(i=0;i<l.length;i+=2){var c=l[i],d=l[i+1];"style"===c?xt(o,d):"dangerouslySetInnerHTML"===c?mt(o,d):"children"===c?gt(o,d):Se(o,c,d,u)}switch(s){case"input":nt(o,a);break;case"textarea":ut(o,a);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?it(o,!!a.multiple,p,!1):f!==!!a.multiple&&(null!=a.defaultValue?it(o,!!a.multiple,a.defaultValue,!0):it(o,!!a.multiple,a.multiple?[]:"",!1))}o[ya]=a}catch(m){Nc(e,e.return,m)}}break;case 6:if(bu(t,e),wu(e),4&r){if(null===e.stateNode)throw Error(ue(162));o=e.stateNode,a=e.memoizedProps;try{o.nodeValue=a}catch(m){Nc(e,e.return,m)}}break;case 3:if(bu(t,e),wu(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Yn(t.containerInfo)}catch(m){Nc(e,e.return,m)}break;case 4:default:bu(t,e),wu(e);break;case 13:bu(t,e),wu(e),8192&(o=e.child).flags&&(a=null!==o.memoizedState,o.stateNode.isHidden=a,!a||null!==o.alternate&&null!==o.alternate.memoizedState||(Hu=tn())),4&r&&yu(e);break;case 22:if(c=null!==n&&null!==n.memoizedState,1&e.mode?(eu=(u=eu)||c,bu(t,e),eu=u):bu(t,e),wu(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!c&&1&e.mode)for(nu=e,c=e.child;null!==c;){for(d=nu=c;null!==nu;){switch(p=(f=nu).child,f.tag){case 0:case 11:case 14:case 15:iu(4,f,f.return);break;case 1:ru(f,f.return);var h=f.stateNode;if("function"==typeof h.componentWillUnmount){r=f,n=f.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(m){Nc(r,n,m)}}break;case 5:ru(f,f.return);break;case 22:if(null!==f.memoizedState){ju(d);continue}}null!==p?(p.return=f,nu=p):ju(d)}c=c.sibling}e:for(c=null,d=e;;){if(5===d.tag){if(null===c){c=d;try{o=d.stateNode,u?"function"==typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(s=d.stateNode,i=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,s.style.display=bt("display",i))}catch(m){Nc(e,e.return,m)}}}else if(6===d.tag){if(null===c)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){Nc(e,e.return,m)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:bu(t,e),wu(e),4&r&&yu(e);case 21:}}function wu(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(cu(n)){var r=n;break e}n=n.return}throw Error(ue(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(gt(o,""),r.flags&=-33),pu(e,du(e),o);break;case 3:case 4:var a=r.stateNode.containerInfo;fu(e,du(e),a);break;default:throw Error(ue(161))}}catch(i){Nc(e,e.return,i)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ku(e,t,n){nu=e,Su(e)}function Su(e,t,n){for(var r=!!(1&e.mode);null!==nu;){var o=nu,a=o.child;if(22===o.tag&&r){var i=null!==o.memoizedState||Jl;if(!i){var s=o.alternate,l=null!==s&&null!==s.memoizedState||eu;s=Jl;var u=eu;if(Jl=i,(eu=l)&&!u)for(nu=o;null!==nu;)l=(i=nu).child,22===i.tag&&null!==i.memoizedState?Cu(o):null!==l?(l.return=i,nu=l):Cu(o);for(;null!==a;)nu=a,Su(a),a=a.sibling;nu=o,Jl=s,eu=u}Eu(e)}else 8772&o.subtreeFlags&&null!==a?(a.return=o,nu=a):Eu(e)}}function Eu(e){for(;null!==nu;){var t=nu;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:eu||su(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!eu)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:il(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&qi(t,a,r);break;case 3:var i=t.updateQueue;if(null!==i){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}qi(t,i,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var c=u.memoizedState;if(null!==c){var d=c.dehydrated;null!==d&&Yn(d)}}}break;default:throw Error(ue(163))}eu||512&t.flags&&lu(t)}catch(f){Nc(t,t.return,f)}}if(t===e){nu=null;break}if(null!==(n=t.sibling)){n.return=t.return,nu=n;break}nu=t.return}}function ju(e){for(;null!==nu;){var t=nu;if(t===e){nu=null;break}var n=t.sibling;if(null!==n){n.return=t.return,nu=n;break}nu=t.return}}function Cu(e){for(;null!==nu;){var t=nu;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{su(4,t)}catch(l){Nc(t,n,l)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(l){Nc(t,o,l)}}var a=t.return;try{lu(t)}catch(l){Nc(t,a,l)}break;case 5:var i=t.return;try{lu(t)}catch(l){Nc(t,i,l)}}}catch(l){Nc(t,t.return,l)}if(t===e){nu=null;break}var s=t.sibling;if(null!==s){s.return=t.return,nu=s;break}nu=t.return}}var Pu,Nu=Math.ceil,Tu=Ee.ReactCurrentDispatcher,Mu=Ee.ReactCurrentOwner,Ru=Ee.ReactCurrentBatchConfig,Lu=0,Du=null,_u=null,Au=0,Ou=0,Iu=Ta(0),zu=0,Fu=null,Vu=0,$u=0,Bu=0,Uu=null,Wu=null,Hu=0,Gu=1/0,Yu=null,qu=!1,Ku=null,Xu=null,Qu=!1,Zu=null,Ju=0,ec=0,tc=null,nc=-1,rc=0;function oc(){return 6&Lu?tn():-1!==nc?nc:nc=tn()}function ac(e){return 1&e.mode?2&Lu&&0!==Au?Au&-Au:null!==xi.transition?(0===rc&&(rc=xn()),rc):0!==(e=En)?e:e=void 0===(e=window.event)?16:tr(e.type):1}function ic(e,t,n,r){if(50<ec)throw ec=0,tc=null,Error(ue(185));kn(e,n,r),2&Lu&&e===Du||(e===Du&&(!(2&Lu)&&($u|=n),4===zu&&dc(e,Au)),sc(e,r),1===n&&0===Lu&&!(1&t.mode)&&(Gu=tn()+500,Wa&&Ya()))}function sc(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-dn(a),s=1<<i,l=o[i];-1===l?0!==(s&n)&&0===(s&r)||(o[i]=yn(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=vn(e,e===Du?Au:0);if(0===r)null!==n&&Zt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Zt(n),1===t)0===e.tag?function(e){Wa=!0,Ga(e)}(fc.bind(null,e)):Ga(fc.bind(null,e)),da(function(){!(6&Lu)&&Ya()}),n=null;else{switch(jn(r)){case 1:n=rn;break;case 4:n=on;break;case 16:default:n=an;break;case 536870912:n=ln}n=Dc(n,lc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function lc(e,t){if(nc=-1,rc=0,6&Lu)throw Error(ue(327));var n=e.callbackNode;if(Cc()&&e.callbackNode!==n)return null;var r=vn(e,e===Du?Au:0);if(0===r)return null;if(30&r||0!==(r&e.expiredLanes)||t)t=xc(e,r);else{t=r;var o=Lu;Lu|=2;var a=yc();for(Du===e&&Au===t||(Yu=null,Gu=tn()+500,gc(e,t));;)try{kc();break}catch(s){vc(e,s)}Ri(),Tu.current=a,Lu=o,null!==_u?t=0:(Du=null,Au=0,t=zu)}if(0!==t){if(2===t&&(0!==(o=bn(e))&&(r=o,t=uc(e,o))),1===t)throw n=Fu,gc(e,0),dc(e,r),sc(e,tn()),n;if(6===t)dc(e,r);else{if(o=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],a=o.getSnapshot;o=o.value;try{if(!fo(a(),o))return!1}catch(i){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)||(t=xc(e,r),2===t&&(a=bn(e),0!==a&&(r=a,t=uc(e,a))),1!==t)))throw n=Fu,gc(e,0),dc(e,r),sc(e,tn()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(ue(345));case 2:case 5:jc(e,Wu,Yu);break;case 3:if(dc(e,r),(130023424&r)===r&&10<(t=Hu+500-tn())){if(0!==vn(e,0))break;if(((o=e.suspendedLanes)&r)!==r){oc(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=la(jc.bind(null,e,Wu,Yu),t);break}jc(e,Wu,Yu);break;case 4:if(dc(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var i=31-dn(r);a=1<<i,(i=t[i])>o&&(o=i),r&=~a}if(r=o,10<(r=(120>(r=tn()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Nu(r/1960))-r)){e.timeoutHandle=la(jc.bind(null,e,Wu,Yu),r);break}jc(e,Wu,Yu);break;default:throw Error(ue(329))}}}return sc(e,tn()),e.callbackNode===n?lc.bind(null,e):null}function uc(e,t){var n=Uu;return e.current.memoizedState.isDehydrated&&(gc(e,t).flags|=256),2!==(e=xc(e,t))&&(t=Wu,Wu=n,null!==t&&cc(t)),e}function cc(e){null===Wu?Wu=e:Wu.push.apply(Wu,e)}function dc(e,t){for(t&=~Bu,t&=~$u,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-dn(t),r=1<<n;e[n]=-1,t&=~r}}function fc(e){if(6&Lu)throw Error(ue(327));Cc();var t=vn(e,0);if(!(1&t))return sc(e,tn()),null;var n=xc(e,t);if(0!==e.tag&&2===n){var r=bn(e);0!==r&&(t=r,n=uc(e,r))}if(1===n)throw n=Fu,gc(e,0),dc(e,t),sc(e,tn()),n;if(6===n)throw Error(ue(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,jc(e,Wu,Yu),sc(e,tn()),null}function pc(e,t){var n=Lu;Lu|=1;try{return e(t)}finally{0===(Lu=n)&&(Gu=tn()+500,Wa&&Ya())}}function hc(e){null!==Zu&&0===Zu.tag&&!(6&Lu)&&Cc();var t=Lu;Lu|=1;var n=Ru.transition,r=En;try{if(Ru.transition=null,En=1,e)return e()}finally{En=r,Ru.transition=n,!(6&(Lu=t))&&Ya()}}function mc(){Ou=Iu.current,Ma(Iu)}function gc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ua(n)),null!==_u)for(n=_u.return;null!==n;){var r=n;switch(ii(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&za();break;case 3:ts(),Ma(_a),Ma(Da),ss();break;case 5:rs(r);break;case 4:ts();break;case 13:case 19:Ma(os);break;case 10:Li(r.type._context);break;case 22:case 23:mc()}n=n.return}if(Du=e,_u=e=Ic(e.current,null),Au=Ou=t,zu=0,Fu=null,Bu=$u=Vu=0,Wu=Uu=null,null!==Oi){for(t=0;t<Oi.length;t++)if(null!==(r=(n=Oi[t]).interleaved)){n.interleaved=null;var o=r.next,a=n.pending;if(null!==a){var i=a.next;a.next=o,r.next=i}n.pending=r}Oi=null}return e}function vc(e,t){for(;;){var n=_u;try{if(Ri(),ls.current=nl,hs){for(var r=ds.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}hs=!1}if(cs=0,ps=fs=ds=null,ms=!1,gs=0,Mu.current=null,null===n||null===n.return){zu=1,Fu=t,_u=null;break}e:{var a=e,i=n.return,s=n,l=t;if(t=Au,s.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var u=l,c=s,d=c.tag;if(!(1&c.mode||0!==d&&11!==d&&15!==d)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=xl(i);if(null!==p){p.flags&=-257,wl(p,i,s,0,t),1&p.mode&&bl(a,u,t),l=u;var h=(t=p).updateQueue;if(null===h){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}if(!(1&t)){bl(a,u,t),bc();break e}l=Error(ue(426))}else if(ui&&1&s.mode){var g=xl(i);if(null!==g){!(65536&g.flags)&&(g.flags|=256),wl(g,i,s,0,t),bi(pl(l,s));break e}}a=l=pl(l,s),4!==zu&&(zu=2),null===Uu?Uu=[a]:Uu.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,Gi(a,vl(0,l,t));break e;case 1:s=l;var v=a.type,y=a.stateNode;if(!(128&a.flags||"function"!=typeof v.getDerivedStateFromError&&(null===y||"function"!=typeof y.componentDidCatch||null!==Xu&&Xu.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t,Gi(a,yl(a,s,t));break e}}a=a.return}while(null!==a)}Ec(n)}catch(b){t=b,_u===n&&null!==n&&(_u=n=n.return);continue}break}}function yc(){var e=Tu.current;return Tu.current=nl,null===e?nl:e}function bc(){0!==zu&&3!==zu&&2!==zu||(zu=4),null===Du||!(268435455&Vu)&&!(268435455&$u)||dc(Du,Au)}function xc(e,t){var n=Lu;Lu|=2;var r=yc();for(Du===e&&Au===t||(Yu=null,gc(e,t));;)try{wc();break}catch(o){vc(e,o)}if(Ri(),Lu=n,Tu.current=r,null!==_u)throw Error(ue(261));return Du=null,Au=0,zu}function wc(){for(;null!==_u;)Sc(_u)}function kc(){for(;null!==_u&&!Jt();)Sc(_u)}function Sc(e){var t=Pu(e.alternate,e,Ou);e.memoizedProps=e.pendingProps,null===t?Ec(e):_u=t,Mu.current=null}function Ec(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Zl(n,t)))return n.flags&=32767,void(_u=n);if(null===e)return zu=6,void(_u=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Ql(n,t,Ou)))return void(_u=n);if(null!==(t=t.sibling))return void(_u=t);_u=t=e}while(null!==t);0===zu&&(zu=5)}function jc(e,t,n){var r=En,o=Ru.transition;try{Ru.transition=null,En=1,function(e,t,n,r){do{Cc()}while(null!==Zu);if(6&Lu)throw Error(ue(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(ue(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-dn(n),a=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~a}}(e,a),e===Du&&(_u=Du=null,Au=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Qu||(Qu=!0,Dc(an,function(){return Cc(),null})),a=!!(15990&n.flags),!!(15990&n.subtreeFlags)||a){a=Ru.transition,Ru.transition=null;var i=En;En=1;var s=Lu;Lu|=4,Mu.current=null,function(e,t){if(aa=Kn,yo(e=vo())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(x){n=null;break e}var i=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||0!==o&&3!==d.nodeType||(s=i+o),d!==a||0!==r&&3!==d.nodeType||(l=i+r),3===d.nodeType&&(i+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(s=i),f===a&&++c===r&&(l=i),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(ia={focusedElem:e,selectionRange:n},Kn=!1,nu=t;null!==nu;)if(e=(t=nu).child,1028&t.subtreeFlags&&null!==e)e.return=t,nu=e;else for(;null!==nu;){t=nu;try{var h=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==h){var m=h.memoizedProps,g=h.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:il(t.type,m),g);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(ue(163))}}catch(x){Nc(t,t.return,x)}if(null!==(e=t.sibling)){e.return=t.return,nu=e;break}nu=t.return}h=au,au=!1}(e,n),xu(n,e),bo(ia),Kn=!!aa,ia=aa=null,e.current=n,ku(n),en(),Lu=s,En=i,Ru.transition=a}else e.current=n;if(Qu&&(Qu=!1,Zu=e,Ju=o),a=e.pendingLanes,0===a&&(Xu=null),function(e){if(cn&&"function"==typeof cn.onCommitFiberRoot)try{cn.onCommitFiberRoot(un,e,void 0,!(128&~e.current.flags))}catch(t){}}(n.stateNode),sc(e,tn()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(qu)throw qu=!1,e=Ku,Ku=null,e;!!(1&Ju)&&0!==e.tag&&Cc(),a=e.pendingLanes,1&a?e===tc?ec++:(ec=0,tc=e):ec=0,Ya()}(e,t,n,r)}finally{Ru.transition=o,En=r}return null}function Cc(){if(null!==Zu){var e=jn(Ju),t=Ru.transition,n=En;try{if(Ru.transition=null,En=16>e?16:e,null===Zu)var r=!1;else{if(e=Zu,Zu=null,Ju=0,6&Lu)throw Error(ue(331));var o=Lu;for(Lu|=4,nu=e.current;null!==nu;){var a=nu,i=a.child;if(16&nu.flags){var s=a.deletions;if(null!==s){for(var l=0;l<s.length;l++){var u=s[l];for(nu=u;null!==nu;){var c=nu;switch(c.tag){case 0:case 11:case 15:iu(8,c,a)}var d=c.child;if(null!==d)d.return=c,nu=d;else for(;null!==nu;){var f=(c=nu).sibling,p=c.return;if(uu(c),c===u){nu=null;break}if(null!==f){f.return=p,nu=f;break}nu=p}}}var h=a.alternate;if(null!==h){var m=h.child;if(null!==m){h.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(null!==m)}}nu=a}}if(2064&a.subtreeFlags&&null!==i)i.return=a,nu=i;else e:for(;null!==nu;){if(2048&(a=nu).flags)switch(a.tag){case 0:case 11:case 15:iu(9,a,a.return)}var v=a.sibling;if(null!==v){v.return=a.return,nu=v;break e}nu=a.return}}var y=e.current;for(nu=y;null!==nu;){var b=(i=nu).child;if(2064&i.subtreeFlags&&null!==b)b.return=i,nu=b;else e:for(i=y;null!==nu;){if(2048&(s=nu).flags)try{switch(s.tag){case 0:case 11:case 15:su(9,s)}}catch(w){Nc(s,s.return,w)}if(s===i){nu=null;break e}var x=s.sibling;if(null!==x){x.return=s.return,nu=x;break e}nu=s.return}}if(Lu=o,Ya(),cn&&"function"==typeof cn.onPostCommitFiberRoot)try{cn.onPostCommitFiberRoot(un,e)}catch(w){}r=!0}return r}finally{En=n,Ru.transition=t}}return!1}function Pc(e,t,n){e=Wi(e,t=vl(0,t=pl(n,t),1),1),t=oc(),null!==e&&(kn(e,1,t),sc(e,t))}function Nc(e,t,n){if(3===e.tag)Pc(e,e,n);else for(;null!==t;){if(3===t.tag){Pc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Xu||!Xu.has(r))){t=Wi(t,e=yl(t,e=pl(n,e),1),1),e=oc(),null!==t&&(kn(t,1,e),sc(t,e));break}}t=t.return}}function Tc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=oc(),e.pingedLanes|=e.suspendedLanes&n,Du===e&&(Au&n)===n&&(4===zu||3===zu&&(130023424&Au)===Au&&500>tn()-Hu?gc(e,0):Bu|=n),sc(e,t)}function Mc(e,t){0===t&&(1&e.mode?(t=mn,!(130023424&(mn<<=1))&&(mn=4194304)):t=1);var n=oc();null!==(e=Fi(e,t))&&(kn(e,t,n),sc(e,n))}function Rc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Mc(e,n)}function Lc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ue(314))}null!==r&&r.delete(t),Mc(e,n)}function Dc(e,t){return Qt(e,t)}function _c(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.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 Ac(e,t,n,r){return new _c(e,t,n,r)}function Oc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ic(e,t){var n=e.alternate;return null===n?((n=Ac(e.tag,t,e.key,e.mode)).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=14680064&e.flags,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=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function zc(e,t,n,r,o,a){var i=2;if(r=e,"function"==typeof e)Oc(e)&&(i=1);else if("string"==typeof e)i=5;else e:switch(e){case Pe:return Fc(n.children,o,a,t);case Ne:i=8,o|=8;break;case Te:return(e=Ac(12,n,t,2|o)).elementType=Te,e.lanes=a,e;case De:return(e=Ac(13,n,t,o)).elementType=De,e.lanes=a,e;case _e:return(e=Ac(19,n,t,o)).elementType=_e,e.lanes=a,e;case Ie:return Vc(n,o,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Me:i=10;break e;case Re:i=9;break e;case Le:i=11;break e;case Ae:i=14;break e;case Oe:i=16,r=null;break e}throw Error(ue(130,null==e?e:typeof e,""))}return(t=Ac(i,n,t,o)).elementType=e,t.type=r,t.lanes=a,t}function Fc(e,t,n,r){return(e=Ac(7,e,r,t)).lanes=n,e}function Vc(e,t,n,r){return(e=Ac(22,e,r,t)).elementType=Ie,e.lanes=n,e.stateNode={isHidden:!1},e}function $c(e,t,n){return(e=Ac(6,e,null,t)).lanes=n,e}function Bc(e,t,n){return(t=Ac(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Uc(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=wn(0),this.expirationTimes=wn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wn(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Wc(e,t,n,r,o,a,i,s,l){return e=new Uc(e,t,n,s,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Ac(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},$i(a),e}function Hc(e){if(!e)return La;e:{if(Gt(e=e._reactInternals)!==e||1!==e.tag)throw Error(ue(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ia(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(ue(171))}if(1===e.tag){var n=e.type;if(Ia(n))return Va(e,n,t)}return t}function Gc(e,t,n,r,o,a,i,s,l){return(e=Wc(n,r,!0,e,0,a,0,s,l)).context=Hc(null),n=e.current,(a=Ui(r=oc(),o=ac(n))).callback=null!=t?t:null,Wi(n,a,o),e.current.lanes=o,kn(e,o,r),sc(e,r),e}function Yc(e,t,n,r){var o=t.current,a=oc(),i=ac(o);return n=Hc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ui(a,i)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Wi(o,t,i))&&(ic(e,o,i,a),Hi(e,o,i)),i}function qc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Kc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Xc(e,t){Kc(e,t),(e=e.alternate)&&Kc(e,t)}Pu=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||_a.current)Sl=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return Sl=!1,function(e,t,n){switch(t.tag){case 3:Dl(t),yi();break;case 5:ns(t);break;case 1:Ia(t.type)&&$a(t);break;case 4:es(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Ra(Pi,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ra(os,1&os.current),t.flags|=128,null):0!==(n&t.child.childLanes)?$l(e,t,n):(Ra(os,1&os.current),null!==(e=ql(e,t,n))?e.sibling:null);Ra(os,1&os.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return Gl(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Ra(os,os.current),r)break;return null;case 22:case 23:return t.lanes=0,Nl(e,t,n)}return ql(e,t,n)}(e,t,n);Sl=!!(131072&e.flags)}else Sl=!1,ui&&1048576&t.flags&&oi(t,Qa,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yl(e,t),e=t.pendingProps;var o=Oa(t,Da.current);_i(t,n),o=xs(null,t,r,e,o,n);var a=ws();return t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ia(r)?(a=!0,$a(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,$i(t),o.updater=ll,t.stateNode=o,o._reactInternals=t,fl(t,r,e,n),t=Ll(null,t,r,!0,a,n)):(t.tag=0,ui&&a&&ai(t),El(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yl(e,t),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"==typeof e)return Oc(e)?1:0;if(null!=e){if((e=e.$$typeof)===Le)return 11;if(e===Ae)return 14}return 2}(r),e=il(r,e),o){case 0:t=Ml(null,t,r,e,n);break e;case 1:t=Rl(null,t,r,e,n);break e;case 11:t=jl(null,t,r,e,n);break e;case 14:t=Cl(null,t,r,il(r.type,e),n);break e}throw Error(ue(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ml(e,t,r,o=t.elementType===r?o:il(r,o),n);case 1:return r=t.type,o=t.pendingProps,Rl(e,t,r,o=t.elementType===r?o:il(r,o),n);case 3:e:{if(Dl(t),null===e)throw Error(ue(387));r=t.pendingProps,o=(a=t.memoizedState).element,Bi(e,t),Yi(t,r,null,n);var i=t.memoizedState;if(r=i.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=_l(e,t,r,n,o=pl(Error(ue(423)),t));break e}if(r!==o){t=_l(e,t,r,n,o=pl(Error(ue(424)),t));break e}for(li=ha(t.stateNode.containerInfo.firstChild),si=t,ui=!0,ci=null,n=Ci(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(yi(),r===o){t=ql(e,t,n);break e}El(e,t,r,n)}t=t.child}return t;case 5:return ns(t),null===e&&hi(t),r=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,i=o.children,sa(r,o)?i=null:null!==a&&sa(r,a)&&(t.flags|=32),Tl(e,t),El(e,t,i,n),t.child;case 6:return null===e&&hi(t),null;case 13:return $l(e,t,n);case 4:return es(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=ji(t,null,r,n):El(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,jl(e,t,r,o=t.elementType===r?o:il(r,o),n);case 7:return El(e,t,t.pendingProps,n),t.child;case 8:case 12:return El(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,i=o.value,Ra(Pi,r._currentValue),r._currentValue=i,null!==a)if(fo(a.value,i)){if(a.children===o.children&&!_a.current){t=ql(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var s=a.dependencies;if(null!==s){i=a.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===a.tag){(l=Ui(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var c=(u=u.shared).pending;null===c?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),Di(a.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===a.tag)i=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(i=a.return))throw Error(ue(341));i.lanes|=n,null!==(s=i.alternate)&&(s.lanes|=n),Di(i,n,t),i=a.sibling}else i=a.child;if(null!==i)i.return=a;else for(i=a;null!==i;){if(i===t){i=null;break}if(null!==(a=i.sibling)){a.return=i.return,i=a;break}i=i.return}a=i}El(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,_i(t,n),r=r(o=Ai(o)),t.flags|=1,El(e,t,r,n),t.child;case 14:return o=il(r=t.type,t.pendingProps),Cl(e,t,r,o=il(r.type,o),n);case 15:return Pl(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:il(r,o),Yl(e,t),t.tag=1,Ia(r)?(e=!0,$a(t)):e=!1,_i(t,n),cl(t,r,o),fl(t,r,o,n),Ll(null,t,r,!0,e,n);case 19:return Gl(e,t,n);case 22:return Nl(e,t,n)}throw Error(ue(156,t.tag))};var Qc="function"==typeof reportError?reportError:function(e){console.error(e)};function Zc(e){this._internalRoot=e}function Jc(e){this._internalRoot=e}function ed(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function td(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function nd(){}function rd(e,t,n,r,o){var a=n._reactRootContainer;if(a){var i=a;if("function"==typeof o){var s=o;o=function(){var e=qc(i);s.call(e)}}Yc(t,i,e,o)}else i=function(e,t,n,r,o){if(o){if("function"==typeof r){var a=r;r=function(){var e=qc(i);a.call(e)}}var i=Gc(t,r,e,0,null,!1,0,"",nd);return e._reactRootContainer=i,e[ba]=i.current,Yo(8===e.nodeType?e.parentNode:e),hc(),i}for(;o=e.lastChild;)e.removeChild(o);if("function"==typeof r){var s=r;r=function(){var e=qc(l);s.call(e)}}var l=Wc(e,0,!1,null,0,!1,0,"",nd);return e._reactRootContainer=l,e[ba]=l.current,Yo(8===e.nodeType?e.parentNode:e),hc(function(){Yc(t,l,n,r)}),l}(n,t,e,o,r);return qc(i)}Jc.prototype.render=Zc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(ue(409));Yc(e,t,null,null)},Jc.prototype.unmount=Zc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;hc(function(){Yc(null,e,null,null)}),t[ba]=null}},Jc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Tn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<zn.length&&0!==t&&t<zn[n].priority;n++);zn.splice(n,0,e),0===n&&Bn(e)}},Cn=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=gn(t.pendingLanes);0!==n&&(Sn(t,1|n),sc(t,tn()),!(6&Lu)&&(Gu=tn()+500,Ya()))}break;case 13:hc(function(){var t=Fi(e,1);if(null!==t){var n=oc();ic(t,e,1,n)}}),Xc(e,1)}},Pn=function(e){if(13===e.tag){var t=Fi(e,134217728);if(null!==t)ic(t,e,134217728,oc());Xc(e,134217728)}},Nn=function(e){if(13===e.tag){var t=ac(e),n=Fi(e,t);if(null!==n)ic(n,e,t,oc());Xc(e,t)}},Tn=function(){return En},Mn=function(e,t){var n=En;try{return En=e,t()}finally{En=n}},Ct=function(e,t,n){switch(t){case"input":if(nt(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Ca(r);if(!o)throw Error(ue(90));Qe(r),nt(r,o)}}}break;case"textarea":ut(e,n);break;case"select":null!=(t=n.value)&&it(e,!!n.multiple,t,!1)}},Lt=pc,Dt=hc;var od={usingClientEntryPoint:!1,Events:[Ea,ja,Ca,Mt,Rt,pc]},ad={findFiberByHostInstance:Sa,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},id={bundleType:ad.bundleType,version:ad.version,rendererPackageName:ad.rendererPackageName,rendererConfig:ad.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ee.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Kt(e))?null:e.stateNode},findFiberByHostInstance:ad.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var sd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sd.isDisabled&&sd.supportsFiber)try{un=sd.inject(id),cn=sd}catch(ht){}}re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=od,re.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ed(t))throw Error(ue(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Ce,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},re.createRoot=function(e,t){if(!ed(e))throw Error(ue(299));var n=!1,r="",o=Qc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Wc(e,1,!1,null,0,n,0,r,o),e[ba]=t.current,Yo(8===e.nodeType?e.parentNode:e),new Zc(t)},re.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(ue(188));throw e=Object.keys(e).join(","),Error(ue(268,e))}return e=null===(e=Kt(t))?null:e.stateNode},re.flushSync=function(e){return hc(e)},re.hydrate=function(e,t,n){if(!td(t))throw Error(ue(200));return rd(null,e,t,!0,n)},re.hydrateRoot=function(e,t,n){if(!ed(e))throw Error(ue(405));var r=null!=n&&n.hydratedSources||null,o=!1,a="",i=Qc;if(null!=n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(i=n.onRecoverableError)),t=Gc(t,null,e,1,null!=n?n:null,o,0,a,i),e[ba]=t.current,Yo(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Jc(t)},re.render=function(e,t,n){if(!td(t))throw Error(ue(200));return rd(null,e,t,!1,n)},re.unmountComponentAtNode=function(e){if(!td(e))throw Error(ue(40));return!!e._reactRootContainer&&(hc(function(){rd(null,null,e,!1,function(){e._reactRootContainer=null,e[ba]=null})}),!0)},re.unstable_batchedUpdates=pc,re.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!td(n))throw Error(ue(200));if(null==e||void 0===e._reactInternals)throw Error(ue(38));return rd(e,t,n,!1,r)},re.version="18.3.1-next-f1338f8080-20240426",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),ne.exports=re;var ld=ne.exports;const ud=o(ld);var cd=ld;te.createRoot=cd.createRoot,te.hydrateRoot=cd.hydrateRoot;const dd={},fd=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),n=(null==e?void 0:e.nonce)||(null==e?void 0:e.getAttribute("nonce"));r=Promise.allSettled(t.map(e=>{if((e=function(e){return"/"+e}(e))in dd)return;dd[e]=!0;const t=e.endsWith(".css"),r=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${r}`))return;const o=document.createElement("link");return o.rel=t?"stylesheet":"modulepreload",t||(o.as="script"),o.crossOrigin="",o.href=e,n&&o.setAttribute("nonce",n),document.head.appendChild(o),t?new Promise((t,n)=>{o.addEventListener("load",t),o.addEventListener("error",()=>n(new Error(`Unable to preload CSS for ${e}`)))}):void 0}))}function o(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(const e of t||[])"rejected"===e.status&&o(e.reason);return e().catch(o)})};
32
32
  /**
33
33
  * @remix-run/router v1.23.2
34
34
  *
@@ -39,7 +39,7 @@ var Y=W,q=Symbol.for("react.element"),K=Symbol.for("react.fragment"),X=Object.pr
39
39
  *
40
40
  * @license MIT
41
41
  */
42
- function pd(){return pd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pd.apply(this,arguments)}var hd,md;(md=hd||(hd={})).Pop="POP",md.Push="PUSH",md.Replace="REPLACE";const gd="popstate";function vd(e){return void 0===e&&(e={}),function(e,t,n,r){void 0===r&&(r={});let{window:o=document.defaultView,v5Compat:a=!1}=r,i=o.history,s=hd.Pop,l=null,u=c();null==u&&(u=0,i.replaceState(pd({},i.state,{idx:u}),""));function c(){return(i.state||{idx:null}).idx}function d(){s=hd.Pop;let e=c(),t=null==e?null:e-u;u=e,l&&l({action:s,location:m.location,delta:t})}function f(e,t){s=hd.Push;let n=wd(m.location,e,t);u=c()+1;let r=xd(n,u),d=m.createHref(n);try{i.pushState(r,"",d)}catch(f){if(f instanceof DOMException&&"DataCloneError"===f.name)throw f;o.location.assign(d)}a&&l&&l({action:s,location:m.location,delta:1})}function p(e,t){s=hd.Replace;let n=wd(m.location,e,t);u=c();let r=xd(n,u),o=m.createHref(n);i.replaceState(r,"",o),a&&l&&l({action:s,location:m.location,delta:0})}function h(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,n="string"==typeof e?e:kd(e);return n=n.replace(/ $/,"%20"),yd(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}let m={get action(){return s},get location(){return e(o,i)},listen(e){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(gd,d),l=e,()=>{o.removeEventListener(gd,d),l=null}},createHref:e=>t(o,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go:e=>i.go(e)};return m}(function(e,t){let{pathname:n,search:r,hash:o}=e.location;return wd("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:kd(t)},0,e)}function yd(e,t){if(!1===e||null==e)throw new Error(t)}function bd(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function xd(e,t){return{usr:e.state,key:e.key,idx:t}}function wd(e,t,n,r){return void 0===n&&(n=null),pd({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?Sd(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function kd(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function Sd(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var Ed,jd;function Cd(e,t,n){return void 0===n&&(n="/"),function(e,t,n){let r="string"==typeof t?Sd(t):t,o=Vd(r.pathname||"/",n);if(null==o)return null;let a=Pd(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(a);let i=null;for(let s=0;null==i&&s<a.length;++s){let e=Fd(o);i=Id(a[s],e)}return i}(e,t,n)}function Pd(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let o=(e,o,a)=>{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(yd(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));let s=Yd([r,i.relativePath]),l=n.concat(i);e.children&&e.children.length>0&&(yd(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),Pd(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:Od(s,e.index),routesMeta:l})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of Nd(e.path))o(e,t,r);else o(e,t)}),t}function Nd(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return o?[a,""]:[a];let i=Nd(r.join("/")),s=[];return s.push(...i.map(e=>""===e?a:[a,e].join("/"))),o&&s.push(...i),s.map(t=>e.startsWith("/")&&""===t?"/":t)}(jd=Ed||(Ed={})).data="data",jd.deferred="deferred",jd.redirect="redirect",jd.error="error";const Td=/^:[\w-]+$/,Md=3,Rd=2,Ld=1,Dd=10,_d=-2,Ad=e=>"*"===e;function Od(e,t){let n=e.split("/"),r=n.length;return n.some(Ad)&&(r+=_d),t&&(r+=Rd),n.filter(e=>!Ad(e)).reduce((e,t)=>e+(Td.test(t)?Md:""===t?Ld:Dd),r)}function Id(e,t,n){let{routesMeta:r}=e,o={},a="/",i=[];for(let s=0;s<r.length;++s){let e=r[s],n=s===r.length-1,l="/"===a?t:t.slice(a.length)||"/",u=zd({path:e.relativePath,caseSensitive:e.caseSensitive,end:n},l),c=e.route;if(!u)return null;Object.assign(o,u.params),i.push({params:o,pathname:Yd([a,u.pathname]),pathnameBase:qd(Yd([a,u.pathnameBase])),route:c}),"/"!==u.pathnameBase&&(a=Yd([a,u.pathnameBase]))}return i}function zd(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);bd("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let a=new RegExp(o,t?void 0:"i");return[a,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=s[n]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e},{}),pathname:a,pathnameBase:i,pattern:e}}function Fd(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return bd(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function Vd(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}const Bd=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function $d(e,t){void 0===t&&(t="/");let n,{pathname:r,search:o="",hash:a=""}="string"==typeof e?Sd(e):e;if(r)if(i=r,Bd.test(i))n=r;else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/"),bd(!1,"Pathnames cannot have embedded double slashes - normalizing "+e+" -> "+r)}n=r.startsWith("/")?Ud(r.substring(1),"/"):Ud(r,t)}else n=t;var i;return{pathname:n,search:Kd(o),hash:Xd(a)}}function Ud(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function Wd(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function Hd(e,t){let n=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function Gd(e,t,n,r){let o;void 0===r&&(r=!1),"string"==typeof e?o=Sd(e):(o=pd({},e),yd(!o.pathname||!o.pathname.includes("?"),Wd("?","pathname","search",o)),yd(!o.pathname||!o.pathname.includes("#"),Wd("#","pathname","hash",o)),yd(!o.search||!o.search.includes("#"),Wd("#","search","hash",o)));let a,i=""===e||""===o.pathname,s=i?"/":o.pathname;if(null==s)a=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let l=$d(o,a),u=s&&"/"!==s&&s.endsWith("/"),c=(i||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!u&&!c||(l.pathname+="/"),l}const Yd=e=>e.join("/").replace(/\/\/+/g,"/"),qd=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Kd=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Xd=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";const Qd=["post","put","patch","delete"];new Set(Qd);const Zd=["get",...Qd];
42
+ function pd(){return pd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pd.apply(this,arguments)}var hd,md;(md=hd||(hd={})).Pop="POP",md.Push="PUSH",md.Replace="REPLACE";const gd="popstate";function vd(e){return void 0===e&&(e={}),function(e,t,n,r){void 0===r&&(r={});let{window:o=document.defaultView,v5Compat:a=!1}=r,i=o.history,s=hd.Pop,l=null,u=c();null==u&&(u=0,i.replaceState(pd({},i.state,{idx:u}),""));function c(){return(i.state||{idx:null}).idx}function d(){s=hd.Pop;let e=c(),t=null==e?null:e-u;u=e,l&&l({action:s,location:m.location,delta:t})}function f(e,t){s=hd.Push;let n=wd(m.location,e,t);u=c()+1;let r=xd(n,u),d=m.createHref(n);try{i.pushState(r,"",d)}catch(f){if(f instanceof DOMException&&"DataCloneError"===f.name)throw f;o.location.assign(d)}a&&l&&l({action:s,location:m.location,delta:1})}function p(e,t){s=hd.Replace;let n=wd(m.location,e,t);u=c();let r=xd(n,u),o=m.createHref(n);i.replaceState(r,"",o),a&&l&&l({action:s,location:m.location,delta:0})}function h(e){let t="null"!==o.location.origin?o.location.origin:o.location.href,n="string"==typeof e?e:kd(e);return n=n.replace(/ $/,"%20"),yd(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}let m={get action(){return s},get location(){return e(o,i)},listen(e){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(gd,d),l=e,()=>{o.removeEventListener(gd,d),l=null}},createHref:e=>t(o,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go:e=>i.go(e)};return m}(function(e,t){let{pathname:n,search:r,hash:o}=e.location;return wd("",{pathname:n,search:r,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:kd(t)},0,e)}function yd(e,t){if(!1===e||null==e)throw new Error(t)}function bd(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function xd(e,t){return{usr:e.state,key:e.key,idx:t}}function wd(e,t,n,r){return void 0===n&&(n=null),pd({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?Sd(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function kd(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function Sd(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var Ed,jd;function Cd(e,t,n){return void 0===n&&(n="/"),function(e,t,n){let r="string"==typeof t?Sd(t):t,o=Vd(r.pathname||"/",n);if(null==o)return null;let a=Pd(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(a);let i=null;for(let s=0;null==i&&s<a.length;++s){let e=Fd(o);i=Id(a[s],e)}return i}(e,t,n)}function Pd(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r="");let o=(e,o,a)=>{let i={relativePath:void 0===a?e.path||"":a,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};i.relativePath.startsWith("/")&&(yd(i.relativePath.startsWith(r),'Absolute route path "'+i.relativePath+'" nested under path "'+r+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(r.length));let s=Yd([r,i.relativePath]),l=n.concat(i);e.children&&e.children.length>0&&(yd(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),Pd(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:Od(s,e.index),routesMeta:l})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?"))for(let r of Nd(e.path))o(e,t,r);else o(e,t)}),t}function Nd(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(0===r.length)return o?[a,""]:[a];let i=Nd(r.join("/")),s=[];return s.push(...i.map(e=>""===e?a:[a,e].join("/"))),o&&s.push(...i),s.map(t=>e.startsWith("/")&&""===t?"/":t)}(jd=Ed||(Ed={})).data="data",jd.deferred="deferred",jd.redirect="redirect",jd.error="error";const Td=/^:[\w-]+$/,Md=3,Rd=2,Ld=1,Dd=10,_d=-2,Ad=e=>"*"===e;function Od(e,t){let n=e.split("/"),r=n.length;return n.some(Ad)&&(r+=_d),t&&(r+=Rd),n.filter(e=>!Ad(e)).reduce((e,t)=>e+(Td.test(t)?Md:""===t?Ld:Dd),r)}function Id(e,t,n){let{routesMeta:r}=e,o={},a="/",i=[];for(let s=0;s<r.length;++s){let e=r[s],n=s===r.length-1,l="/"===a?t:t.slice(a.length)||"/",u=zd({path:e.relativePath,caseSensitive:e.caseSensitive,end:n},l),c=e.route;if(!u)return null;Object.assign(o,u.params),i.push({params:o,pathname:Yd([a,u.pathname]),pathnameBase:qd(Yd([a,u.pathnameBase])),route:c}),"/"!==u.pathnameBase&&(a=Yd([a,u.pathnameBase]))}return i}function zd(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=!0);bd("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)"));e.endsWith("*")?(r.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))");let a=new RegExp(o,t?void 0:"i");return[a,r]}(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce((e,t,n)=>{let{paramName:r,isOptional:o}=t;if("*"===r){let e=s[n]||"";i=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[n];return e[r]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e},{}),pathname:a,pathnameBase:i,pattern:e}}function Fd(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return bd(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function Vd(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}const $d=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Bd(e,t){void 0===t&&(t="/");let n,{pathname:r,search:o="",hash:a=""}="string"==typeof e?Sd(e):e;if(r)if(i=r,$d.test(i))n=r;else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/"),bd(!1,"Pathnames cannot have embedded double slashes - normalizing "+e+" -> "+r)}n=r.startsWith("/")?Ud(r.substring(1),"/"):Ud(r,t)}else n=t;var i;return{pathname:n,search:Kd(o),hash:Xd(a)}}function Ud(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function Wd(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function Hd(e,t){let n=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function Gd(e,t,n,r){let o;void 0===r&&(r=!1),"string"==typeof e?o=Sd(e):(o=pd({},e),yd(!o.pathname||!o.pathname.includes("?"),Wd("?","pathname","search",o)),yd(!o.pathname||!o.pathname.includes("#"),Wd("#","pathname","hash",o)),yd(!o.search||!o.search.includes("#"),Wd("#","search","hash",o)));let a,i=""===e||""===o.pathname,s=i?"/":o.pathname;if(null==s)a=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let l=Bd(o,a),u=s&&"/"!==s&&s.endsWith("/"),c=(i||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!u&&!c||(l.pathname+="/"),l}const Yd=e=>e.join("/").replace(/\/\/+/g,"/"),qd=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Kd=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Xd=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";const Qd=["post","put","patch","delete"];new Set(Qd);const Zd=["get",...Qd];
43
43
  /**
44
44
  * React Router v6.30.3
45
45
  *
@@ -60,16 +60,16 @@ function Jd(){return Jd=Object.assign?Object.assign.bind():function(e){for(var t
60
60
  * LICENSE.md file in the root directory of this source tree.
61
61
  *
62
62
  * @license MIT
63
- */function Cf(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}new Promise(()=>{});try{window.__reactRouterVersion="6"}catch(MT){}const Pf=G.startTransition;function Nf(e){let{basename:t,children:n,future:r,window:o}=e,a=W.useRef();null==a.current&&(a.current=vd({window:o,v5Compat:!0}));let i=a.current,[s,l]=W.useState({action:i.action,location:i.location}),{v7_startTransition:u}=r||{},c=W.useCallback(e=>{u&&Pf?Pf(()=>l(e)):l(e)},[l,u]);return W.useLayoutEffect(()=>i.listen(c),[i,c]),W.useEffect(()=>{return null==(e=r)||e.v7_startTransition,void(null==e||e.v7_relativeSplatPath);var e},[r]),W.createElement(Sf,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:i,future:r})}var Tf,Mf,Rf,Lf;function Df(e){let t=W.useRef(Cf(e)),n=W.useRef(!1),r=lf(),o=W.useMemo(()=>function(e,t){let n=Cf(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}(r.search,n.current?null:t.current),[r.search]),a=cf(),i=W.useCallback((e,t)=>{const r=Cf("function"==typeof e?e(o):e);n.current=!0,a("?"+r,t)},[a,o]);return[o,i]}(Mf=Tf||(Tf={})).UseScrollRestoration="useScrollRestoration",Mf.UseSubmit="useSubmit",Mf.UseSubmitFetcher="useSubmitFetcher",Mf.UseFetcher="useFetcher",Mf.useViewTransitionState="useViewTransitionState",(Lf=Rf||(Rf={})).UseFetcher="useFetcher",Lf.UseFetchers="useFetchers",Lf.UseScrollRestoration="useScrollRestoration";const _f=W.createContext({});function Af(e){const t=W.useRef(null);return null===t.current&&(t.current=e()),t.current}const Of="undefined"!=typeof window?W.useLayoutEffect:W.useEffect,If=W.createContext(null);function zf(e,t){-1===e.indexOf(t)&&e.push(t)}function Ff(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Vf=(e,t,n)=>n>t?t:n<e?e:n;const Bf={},$f=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Uf(e){return"object"==typeof e&&null!==e}const Wf=e=>/^0[^.\s]+$/u.test(e);function Hf(e){let t;return()=>(void 0===t&&(t=e()),t)}const Gf=e=>e,Yf=(e,t)=>n=>t(e(n)),qf=(...e)=>e.reduce(Yf),Kf=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class Xf{constructor(){this.subscriptions=[]}add(e){return zf(this.subscriptions,e),()=>Ff(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Qf=e=>1e3*e,Zf=e=>e/1e3;function Jf(e,t){return t?e*(1e3/t):0}const ep=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function tp(e,t,n,r){if(e===t&&n===r)return Gf;const o=t=>function(e,t,n,r,o){let a,i,s=0;do{i=t+(n-t)/2,a=ep(i,r,o)-e,a>0?n=i:t=i}while(Math.abs(a)>1e-7&&++s<12);return i}(t,0,1,e,n);return e=>0===e||1===e?e:ep(o(e),t,r)}const np=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,rp=e=>t=>1-e(1-t),op=tp(.33,1.53,.69,.99),ap=rp(op),ip=np(ap),sp=e=>e>=1?1:(e*=2)<1?.5*ap(e):.5*(2-Math.pow(2,-10*(e-1))),lp=e=>1-Math.sin(Math.acos(e)),up=rp(lp),cp=np(lp),dp=tp(.42,0,1,1),fp=tp(0,0,.58,1),pp=tp(.42,0,.58,1),hp=e=>Array.isArray(e)&&"number"==typeof e[0],mp={linear:Gf,easeIn:dp,easeInOut:pp,easeOut:fp,circIn:lp,circInOut:cp,circOut:up,backIn:ap,backInOut:ip,backOut:op,anticipate:sp},gp=e=>{if(hp(e)){e.length;const[t,n,r,o]=e;return tp(t,n,r,o)}return"string"==typeof e?mp[e]:e},vp=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function yp(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,i=vp.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,o=!1;const a=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(l.schedule(t),e()),t(i)}const l={schedule:(e,o=!1,i=!1)=>{const s=i&&r?t:n;return o&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(i=e,r)return void(o=!0);r=!0;const a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,o&&(o=!1,l.process(e))}};return l}(a),e),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:p,postRender:h}=i,m=()=>{const a=Bf.useManualTiming,i=a?o.timestamp:performance.now();n=!1,a||(o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1)),o.timestamp=i,o.isProcessing=!0,s.process(o),l.process(o),u.process(o),c.process(o),d.process(o),f.process(o),p.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:vp.reduce((t,a)=>{const s=i[a];return t[a]=(t,a=!1,i=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(m)),s.schedule(t,a,i)),t},{}),cancel:e=>{for(let t=0;t<vp.length;t++)i[vp[t]].cancel(e)},state:o,steps:i}}const{schedule:bp,cancel:xp,state:wp,steps:kp}=yp("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Gf,!0);let Sp;function Ep(){Sp=void 0}const jp={now:()=>(void 0===Sp&&jp.set(wp.isProcessing||Bf.useManualTiming?wp.timestamp:performance.now()),Sp),set:e=>{Sp=e,queueMicrotask(Ep)}},Cp=e=>t=>"string"==typeof t&&t.startsWith(e),Pp=Cp("--"),Np=Cp("var(--"),Tp=e=>!!Np(e)&&Mp.test(e.split("/*")[0].trim()),Mp=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Rp(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}const Lp={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Dp={...Lp,transform:e=>Vf(0,1,e)},_p={...Lp,default:1},Ap=e=>Math.round(1e5*e)/1e5,Op=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Ip=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,zp=(e,t)=>n=>Boolean("string"==typeof n&&Ip.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Fp=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,a,i,s]=r.match(Op);return{[e]:parseFloat(o),[t]:parseFloat(a),[n]:parseFloat(i),alpha:void 0!==s?parseFloat(s):1}},Vp={...Lp,transform:e=>Math.round((e=>Vf(0,255,e))(e))},Bp={test:zp("rgb","red"),parse:Fp("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Vp.transform(e)+", "+Vp.transform(t)+", "+Vp.transform(n)+", "+Ap(Dp.transform(r))+")"};const $p={test:zp("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:Bp.transform},Up=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Wp=Up("deg"),Hp=Up("%"),Gp=Up("px"),Yp=Up("vh"),qp=Up("vw"),Kp=(()=>({...Hp,parse:e=>Hp.parse(e)/100,transform:e=>Hp.transform(100*e)}))(),Xp={test:zp("hsl","hue"),parse:Fp("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Hp.transform(Ap(t))+", "+Hp.transform(Ap(n))+", "+Ap(Dp.transform(r))+")"},Qp={test:e=>Bp.test(e)||$p.test(e)||Xp.test(e),parse:e=>Bp.test(e)?Bp.parse(e):Xp.test(e)?Xp.parse(e):$p.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Bp.transform(e):Xp.transform(e),getAnimatableNone:e=>{const t=Qp.parse(e);return t.alpha=0,Qp.transform(t)}},Zp=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Jp="number",eh="color",th=/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 nh(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let a=0;const i=t.replace(th,e=>(Qp.test(e)?(r.color.push(a),o.push(eh),n.push(Qp.parse(e))):e.startsWith("var(")?(r.var.push(a),o.push("var"),n.push(e)):(r.number.push(a),o.push(Jp),n.push(parseFloat(e))),++a,"${}")).split("${}");return{values:n,split:i,indexes:r,types:o}}function rh({split:e,types:t}){const n=e.length;return r=>{let o="";for(let a=0;a<n;a++)if(o+=e[a],void 0!==r[a]){const e=t[a];o+=e===Jp?Ap(r[a]):e===eh?Qp.transform(r[a]):r[a]}return o}}const oh=(e,t)=>{return"number"==typeof e?(null==t?void 0:t.trim().endsWith("/"))?e:0:"number"==typeof(n=e)?0:Qp.test(n)?Qp.getAnimatableNone(n):n;var n};const ah={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null==(t=e.match(Op))?void 0:t.length)||0)+((null==(n=e.match(Zp))?void 0:n.length)||0)>0},parse:function(e){return nh(e).values},createTransformer:function(e){return rh(nh(e))},getAnimatableNone:function(e){const t=nh(e);return rh(t)(t.values.map((e,n)=>oh(e,t.split[n])))}};function ih(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function sh(e,t){return n=>n>0?t:e}const lh=(e,t,n)=>e+(t-e)*n,uh=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},ch=[$p,Bp,Xp];function dh(e){const t=(n=e,ch.find(e=>e.test(n)));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===Xp&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,a=0,i=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=ih(s,r,e+1/3),a=ih(s,r,e),i=ih(s,r,e-1/3)}else o=a=i=n;return{red:Math.round(255*o),green:Math.round(255*a),blue:Math.round(255*i),alpha:r}}(r)),r}const fh=(e,t)=>{const n=dh(e),r=dh(t);if(!n||!r)return sh(e,t);const o={...n};return e=>(o.red=uh(n.red,r.red,e),o.green=uh(n.green,r.green,e),o.blue=uh(n.blue,r.blue,e),o.alpha=lh(n.alpha,r.alpha,e),Bp.transform(o))},ph=new Set(["none","hidden"]);function hh(e,t){return n=>lh(e,t,n)}function mh(e){return"number"==typeof e?hh:"string"==typeof e?Tp(e)?sh:Qp.test(e)?fh:yh:Array.isArray(e)?gh:"object"==typeof e?Qp.test(e)?fh:vh:sh}function gh(e,t){const n=[...e],r=n.length,o=e.map((e,n)=>mh(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function vh(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=mh(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const yh=(e,t)=>{const n=ah.createTransformer(t),r=nh(e),o=nh(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?ph.has(e)&&!o.values.length||ph.has(t)&&!r.values.length?function(e,t){return ph.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):qf(gh(function(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],i=e.indexes[a][r[a]],s=e.values[i]??0;n[o]=s,r[a]++}return n}(r,o),o.values),n):sh(e,t)};function bh(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return lh(e,t,n);return mh(e)(e,t)}const xh=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>bp.update(t,e),stop:()=>xp(t),now:()=>wp.isProcessing?wp.timestamp:jp.now()}},wh=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let a=0;a<o;a++)r+=Math.round(1e4*e(a/(o-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},kh=2e4;function Sh(e){let t=0;let n=e.next(t);for(;!n.done&&t<kh;)t+=50,n=e.next(t);return t>=kh?1/0:t}const Eh=100,jh=10,Ch=1,Ph=0,Nh=800,Th=.3,Mh=.3,Rh={granular:.01,default:2},Lh={granular:.005,default:.5},Dh=.01,_h=10,Ah=.05,Oh=1;function Ih(e,t){return e*Math.sqrt(1-t*t)}const zh=.001;const Fh=["duration","bounce"],Vh=["stiffness","damping","mass"];function Bh(e,t){return t.some(t=>void 0!==e[t])}function $h(e){let t={velocity:Ph,stiffness:Eh,damping:jh,mass:Ch,isResolvedFromDuration:!1,...e};if(!Bh(e,Vh)&&Bh(e,Fh))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),o=r*r,a=2*Vf(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Ch,stiffness:o,damping:a}}else{const n=function({duration:e=Nh,bounce:t=Th,velocity:n=Ph,mass:r=Ch}){let o,a,i=1-t;i=Vf(Ah,Oh,i),e=Vf(Dh,_h,Zf(e)),i<1?(o=t=>{const r=t*i,o=r*e,a=r-n,s=Ih(t,i),l=Math.exp(-o);return zh-a/s*l},a=t=>{const r=t*i*e,a=r*n+n,s=Math.pow(i,2)*Math.pow(t,2)*e,l=Math.exp(-r),u=Ih(Math.pow(t,2),i);return(-o(t)+zh>0?-1:1)*((a-s)*l)/u}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let o=1;o<12;o++)r-=e(r)/t(r);return r}(o,a,5/e);if(e=Qf(e),isNaN(s))return{stiffness:Eh,damping:jh,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*i*Math.sqrt(r*t),duration:e}}}({...e,velocity:0});t={...t,...n,mass:Ch},t.isResolvedFromDuration=!0}return t}function Uh(e=Mh,t=Th){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const a=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:p}=$h({...n,velocity:-Zf(n.velocity||0)}),h=f||0,m=u/(2*Math.sqrt(l*c)),g=i-a,v=Zf(Math.sqrt(l/c)),y=Math.abs(g)<5;let b,x,w,k,S,E;if(r||(r=y?Rh.granular:Rh.default),o||(o=y?Lh.granular:Lh.default),m<1)w=Ih(v,m),k=(h+m*v*g)/w,b=e=>{const t=Math.exp(-m*v*e);return i-t*(k*Math.sin(w*e)+g*Math.cos(w*e))},S=m*v*k+g*w,E=m*v*g-k*w,x=e=>Math.exp(-m*v*e)*(S*Math.sin(w*e)+E*Math.cos(w*e));else if(1===m){b=e=>i-Math.exp(-v*e)*(g+(h+v*g)*e);const e=h+v*g;x=t=>Math.exp(-v*t)*(v*e*t-h)}else{const e=v*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*v*t),r=Math.min(e*t,300);return i-n*((h+m*v*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};const t=(h+m*v*g)/e,n=m*v*t-g*e,r=m*v*g-t*e;x=t=>{const o=Math.exp(-m*v*t),a=Math.min(e*t,300);return o*(n*Math.sinh(a)+r*Math.cosh(a))}}const j={calculatedDuration:p&&d||null,velocity:e=>Qf(x(e)),next:e=>{if(!p&&m<1){const t=Math.exp(-m*v*e),n=Math.sin(w*e),a=Math.cos(w*e),l=i-t*(k*n+g*a),u=Qf(t*(S*n+E*a));return s.done=Math.abs(u)<=r&&Math.abs(i-l)<=o,s.value=s.done?i:l,s}const t=b(e);if(p)s.done=e>=d;else{const n=Qf(x(e));s.done=Math.abs(n)<=r&&Math.abs(i-t)<=o}return s.value=s.done?i:t,s},toString:()=>{const e=Math.min(Sh(j),kh),t=wh(t=>j.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return j}Uh.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Sh(r),kh);return{type:"keyframes",ease:e=>r.next(o*e).value/t,duration:Zf(o)}}(e,100,Uh);return e.ease=t.ease,e.duration=Qf(t.duration),e.type="keyframes",e};function Wh(e,t,n){const r=Math.max(t-5,0);return Jf(n-e(r),t-r)}function Hh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let h=n*t;const m=d+h,g=void 0===i?m:i(m);g!==m&&(h=g-d);const v=e=>-h*Math.exp(-e/r),y=e=>g+v(e),b=e=>{const t=v(e),n=y(e);f.done=Math.abs(t)<=u,f.value=f.done?g:n};let x,w;const k=e=>{var t;(t=f.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(x=e,w=Uh({keyframes:[f.value,p(f.value)],velocity:Wh(y,e,f.value),damping:o,stiffness:a,restDelta:u,restSpeed:c}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),k(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),f)}}}function Gh(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const a=e.length;if(t.length,1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],o=n||Bf.mix||bh,a=e.length-1;for(let i=0;i<a;i++){let n=o(e[i],e[i+1]);if(t){const e=Array.isArray(t)?t[i]||Gf:t;n=qf(e,n)}r.push(n)}return r}(t,r,o),l=s.length,u=n=>{if(i&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const o=Kf(e[r],e[r+1],n);return s[r](o)};return n?t=>u(Vf(e[0],e[a-1],t)):u}function Yh(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Kf(0,t,r);e.push(lh(n,1,o))}}(t,e.length-1),t}function qh({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(gp):gp(r),a={done:!1,value:t[0]},i=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:Yh(t),e),s=Gh(i,t,{ease:Array.isArray(o)?o:(l=t,u=o,l.map(()=>u||pp).splice(0,l.length-1))});var l,u;return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}const Kh=e=>null!==e;function Xh(e,{repeat:t,repeatType:n="loop"},r,o=1){const a=e.filter(Kh),i=o<0||t&&"loop"!==n&&t%2==1?0:a.length-1;return i&&void 0!==r?r:a[i]}const Qh={decay:Hh,inertia:Hh,tween:qh,keyframes:qh,spring:Uh};function Zh(e){"string"==typeof e.type&&(e.type=Qh[e.type])}class Jh{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)}}const em=e=>e/100;class tm extends Jh{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=()=>{var e,t;const{motionValue:n}=this.options;n&&n.updatedAt!==jp.now()&&this.tick(jp.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),null==(t=(e=this.options).onStop)||t.call(e))},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;Zh(e);const{type:t=qh,repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:a=0}=e;let{keyframes:i}=e;const s=t||qh;s!==qh&&"number"!=typeof i[0]&&(this.mixKeyframes=qf(em,bh(i[0],i[1])),i=[0,100]);const l=s({...e,keyframes:i});"mirror"===o&&(this.mirroredGenerator=s({...e,keyframes:[...i].reverse(),velocity:-a})),null===l.calculatedDuration&&(l.calculatedDuration=Sh(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:o,mirroredGenerator:a,resolvedDuration:i,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:u,repeat:c,repeatType:d,repeatDelay:f,type:p,onUpdate:h,finalKeyframe:m}=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);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let y,b=this.currentTime,x=n;if(c){const e=Math.min(this.currentTime,r)/i;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,c+1);Boolean(t%2)&&("reverse"===d?(n=1-n,f&&(n-=f/i)):"mirror"===d&&(x=a)),b=Vf(0,1,n)*i}v?(this.delayState.value=u[0],y=this.delayState):y=x.next(b),o&&!v&&(y.value=o(y.value));let{done:w}=y;v||null===s||(w=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return k&&p!==Hh&&(y.value=Xh(u,this.options,m,this.speed)),h&&h(y.value),k&&this.finish(),y}then(e,t){return this.finished.then(e,t)}get duration(){return Zf(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Zf(e)}get time(){return Zf(this.currentTime)}set time(e){e=Qf(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?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(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);return Wh(e=>this.generator.next(e).value,e,this.generator.next(e).value)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(jp.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Zf(this.currentTime))}play(){var e,t;if(this.isStopped)return;const{driver:n=xh,startTime:r}=this.options;this.driver||(this.driver=n(e=>this.tick(e))),null==(t=(e=this.options).onPlay)||t.call(e);const o=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=o):null!==this.holdTime?this.startTime=o-this.holdTime:this.startTime||(this.startTime=r??o),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(jp.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,t;this.notifyFinished(),this.teardown(),this.state="finished",null==(t=(e=this.options).onComplete)||t.call(e)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),null==(t=(e=this.options).onCancel)||t.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),null==(t=this.driver)||t.stop(),e.observe(this)}}const nm=e=>180*e/Math.PI,rm=e=>{const t=nm(Math.atan2(e[1],e[0]));return am(t)},om={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:rm,rotateZ:rm,skewX:e=>nm(Math.atan(e[1])),skewY:e=>nm(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},am=e=>((e%=360)<0&&(e+=360),e),im=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),sm=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),lm={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:im,scaleY:sm,scale:e=>(im(e)+sm(e))/2,rotateX:e=>am(nm(Math.atan2(e[6],e[5]))),rotateY:e=>am(nm(Math.atan2(-e[2],e[0]))),rotateZ:rm,rotate:rm,skewX:e=>nm(Math.atan(e[4])),skewY:e=>nm(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function um(e){return e.includes("scale")?1:0}function cm(e,t){if(!e||"none"===e)return um(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=lm,o=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=om,o=t}if(!o)return um(t);const a=r[t],i=o[1].split(",").map(dm);return"function"==typeof a?a(i):i[a]}function dm(e){return parseFloat(e.trim())}const fm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pm=(()=>new Set(fm))(),hm=e=>e===Lp||e===Gp,mm=new Set(["x","y","z"]),gm=fm.filter(e=>!mm.has(e));const vm={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const o=e.max-e.min;return"border-box"===r?o:o-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const o=e.max-e.min;return"border-box"===r?o:o-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})=>cm(t,"x"),y:(e,{transform:t})=>cm(t,"y")};vm.translateX=vm.x,vm.translateY=vm.y;const ym=new Set;let bm=!1,xm=!1,wm=!1;function km(){if(xm){const e=Array.from(ym).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return gm.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{var r;null==(r=e.getValue(t))||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}xm=!1,bm=!1,ym.forEach(e=>e.complete(wm)),ym.clear()}function Sm(){ym.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(xm=!0)})}class Em{constructor(e,t,n,r,o,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=o,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(ym.add(this),bm||(bm=!0,bp.read(Sm),bp.resolveKeyframes(km))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const o=null==r?void 0:r.get(),a=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,a);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=a),r&&void 0===o&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ym.delete(this)}cancel(){"scheduled"===this.state&&(ym.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}function jm(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}const Cm={};function Pm(e,t){const n=Hf(e);return()=>Cm[t]??n()}const Nm=Pm(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Tm=Pm(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(MT){return!1}return!0},"linearEasing"),Mm=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Rm={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mm([0,.65,.55,1]),circOut:Mm([.55,0,1,.45]),backIn:Mm([.31,.01,.66,-.59]),backOut:Mm([.33,1.53,.69,.99])};function Lm(e,t){return e?"function"==typeof e?Tm()?wh(e,t):"ease-out":hp(e)?Mm(e):Array.isArray(e)?e.map(e=>Lm(e,t)||Rm.easeOut):Rm[e]:void 0}function Dm(e,t,n,{delay:r=0,duration:o=300,repeat:a=0,repeatType:i="loop",ease:s="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=Lm(s,o);Array.isArray(d)&&(c.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===i?"alternate":"normal"};u&&(f.pseudoElement=u);return e.animate(c,f)}function _m(e){return"function"==typeof e&&"applyToOptions"in e}class Am extends Jh{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:o,allowFlatten:a=!1,finalKeyframe:i,onComplete:s}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=a,this.options=e,e.type;const l=function({type:e,...t}){return _m(e)&&Tm()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=Dm(t,n,r,l,o),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const e=Xh(r,this.options,i,this.speed);this.updateMotionValue&&this.updateMotionValue(e),jm(t,n,e),this.animation.cancel()}null==s||s(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,t;null==(t=(e=this.animation).finish)||t.call(e)}cancel(){try{this.animation.cancel()}catch(MT){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,t,n;const r=null==(e=this.options)?void 0:e.element;!this.isPseudoElement&&(null==r?void 0:r.isConnected)&&(null==(n=(t=this.animation).commitStyles)||n.call(t))}get duration(){var e,t;const n=(null==(t=null==(e=this.animation.effect)?void 0:e.getComputedTiming)?void 0:t.call(e).duration)||0;return Zf(Number(n))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Zf(e)}get time(){return Zf(Number(this.animation.currentTime)||0)}set time(e){const t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Qf(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 null!==this.finishedTime?"finished":this.animation.playState}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}){var o;return this.allowFlatten&&(null==(o=this.animation.effect)||o.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Nm()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),Gf):r(this)}}const Om={anticipate:sp,backInOut:ip,circInOut:cp};function Im(e){"string"==typeof e.ease&&e.ease in Om&&(e.ease=Om[e.ease])}class zm extends Am{constructor(e){Im(e),Zh(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:o,...a}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const i=new tm({...a,autoplay:!1}),s=Math.max(10,jp.now()-this.startTime),l=Vf(0,10,s-10),u=i.sample(s).value,{name:c}=this.options;o&&c&&jm(o,c,u),t.setWithVelocity(i.sample(Math.max(0,s-l)).value,u,l),i.stop()}}const Fm=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!ah.test(e)&&"0"!==e||e.startsWith("url(")));function Vm(e){e.duration=0,e.type="keyframes"}const Bm=new Set(["opacity","clipPath","filter","transform"]),$m=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const Um=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Wm=Hf(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Hm(e){var t;const{motionValue:n,name:r,repeatDelay:o,repeatType:a,damping:i,type:s,keyframes:l}=e;if(!((null==(t=null==n?void 0:n.owner)?void 0:t.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=n.owner.getProps();return Wm()&&r&&(Bm.has(r)||Um.has(r)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&$m.test(e[t]))return!0;return!1}(l))&&("transform"!==r||!c)&&!u&&!o&&"mirror"!==a&&0!==i&&"inertia"!==s}class Gm extends Jh{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:a="loop",keyframes:i,name:s,motionValue:l,element:u,...c}){var d;super(),this.stop=()=>{var e,t;this._animation&&(this._animation.stop(),null==(e=this.stopTimeline)||e.call(this)),null==(t=this.keyframeResolver)||t.cancel()},this.createdAt=jp.now();const f={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:a,name:s,motionValue:l,element:u,...c},p=(null==u?void 0:u.KeyframeResolver)||Em;this.keyframeResolver=new p(i,(e,t,n)=>this.onKeyframesResolved(e,t,f,!n),s,l,u),null==(d=this.keyframeResolver)||d.scheduleResolve()}onKeyframesResolved(e,t,n,r){var o,a;this.keyframeResolver=void 0;const{name:i,type:s,velocity:l,delay:u,isHandoff:c,onUpdate:d}=n;this.resolvedAt=jp.now();let f=!0;(function(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const a=e[e.length-1],i=Fm(o,t),s=Fm(a,t);return!(!i||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||_m(n))&&r)})(e,i,s,l)||(f=!1,!Bf.instantAnimations&&u||null==d||d(Xh(e,n,t)),e[0]=e[e.length-1],Vm(n),n.repeat=0);const p={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},h=f&&!c&&Hm(p),m=null==(a=null==(o=p.motionValue)?void 0:o.owner)?void 0:a.current;let g;if(h)try{g=new zm({...p,element:m})}catch{g=new tm(p)}else g=new tm(p);g.finished.then(()=>{this.notifyFinished()}).catch(Gf),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||(null==(e=this.keyframeResolver)||e.resume(),wm=!0,Sm(),km(),wm=!1),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(){var e;this._animation&&this.animation.cancel(),null==(e=this.keyframeResolver)||e.cancel()}}function Ym(e,t,n,r=0,o=1){const a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),i=e.size,s=(i-1)*r;return"function"==typeof n?n(a,i):1===o?a*r:s-a*r}const qm=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Km(e,t,n=1){const[r,o]=function(e){const t=qm.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const e=a.trim();return $f(e)?parseFloat(e):e}return Tp(o)?Km(o,t,n+1):o}const Xm={type:"spring",stiffness:500,damping:25,restSpeed:10},Qm={type:"keyframes",duration:.8},Zm={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jm=(e,{keyframes:t})=>t.length>2?Qm:pm.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Xm:Zm;function eg(e,t){if((null==e?void 0:e.inherit)&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function tg(e,t){const n=(null==e?void 0:e[t])??(null==e?void 0:e.default)??e;return n!==e?eg(n,e):n}const ng=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);const rg=(e,t,n,r={},o,a)=>i=>{const s=tg(r,e)||{},l=s.delay||r.delay||0;let{elapsed:u=0}=r;u-=Qf(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:o};(function(e){for(const t in e)if(!ng.has(t))return!0;return!1})(s)||Object.assign(c,Jm(e,c)),c.duration&&(c.duration=Qf(c.duration)),c.repeatDelay&&(c.repeatDelay=Qf(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(Vm(c),0===c.delay&&(d=!0)),(Bf.instantAnimations||Bf.skipAnimations||(null==o?void 0:o.shouldSkipAnimations))&&(d=!0,Vm(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!a&&void 0!==t.get()){const e=Xh(c.keyframes,s);if(void 0!==e)return void bp.update(()=>{c.onUpdate(e),c.onComplete()})}return s.isSync?new tm(c):new Gm(c)};function og(e){const t=[{},{}];return null==e||e.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ag(e,t,n,r){if("function"==typeof t){const[o,a]=og(r);t=t(void 0!==n?n:e.custom,o,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,a]=og(r);t=t(void 0!==n?n:e.custom,o,a)}return t}function ig(e,t,n){const r=e.getProps();return ag(r,t,void 0!==n?n:r.custom,e)}const sg=new Set(["width","height","top","left","right","bottom",...fm]);class lg{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{var t;const n=jp.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(null==(t=this.events.change)||t.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=jp.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}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 Xf);const n=this.events[e].add(t);return"change"===e?()=>{n(),bp.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const 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(){var e;null==(e=this.events.change)||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=jp.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Jf(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(){var e,t;null==(e=this.dependents)||e.clear(),null==(t=this.events.destroy)||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ug(e,t){return new lg(e,t)}const cg=e=>Array.isArray(e);function dg(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ug(n))}function fg(e){return cg(e)?e[e.length-1]||0:e}const pg=e=>Boolean(e&&e.getVelocity);function hg(e,t){const n=e.getValue("willChange");if(r=n,Boolean(pg(r)&&r.add))return n.add(t);if(!n&&Bf.WillChange){const n=new Bf.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function mg(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const gg="data-"+mg("framerAppearId");function vg(e){return e.props[gg]}function yg({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function bg(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:a,transitionEnd:i,...s}=t;const l=e.getDefaultTransition();a=a?eg(a,l):l;const u=null==a?void 0:a.reduceMotion;r&&(a=r);const c=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const f in s){const t=e.getValue(f,e.latestValues[f]??null),r=s[f];if(void 0===r||d&&yg(d,f))continue;const o={delay:n,...tg(a||{},f)},i=t.get();if(void 0!==i&&!t.isAnimating()&&!Array.isArray(r)&&r===i&&!o.velocity){bp.update(()=>t.set(r));continue}let l=!1;if(window.MotionHandoffAnimation){const t=vg(e);if(t){const e=window.MotionHandoffAnimation(t,f,bp);null!==e&&(o.startTime=e,l=!0)}}hg(e,f);const p=u??e.shouldReduceMotion;t.start(rg(f,t,r,p&&sg.has(f)?{type:!1}:o,e,l));const h=t.animation;h&&c.push(h)}if(i){const t=()=>bp.update(()=>{i&&function(e,t){const n=ig(e,t);let{transitionEnd:r={},transition:o={},...a}=n||{};a={...a,...r};for(const i in a)dg(e,i,fg(a[i]))}(e,i)});c.length?Promise.all(c).then(t):t()}return c}function xg(e,t,n={}){var r;const o=ig(e,t,"exit"===n.type?null==(r=e.presenceContext)?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(a=n.transitionOverride);const i=o?()=>Promise.all(bg(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:i,staggerDirection:s}=a;return function(e,t,n=0,r=0,o=0,a=1,i){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(xg(l,t,{...i,delay:n+("function"==typeof r?0:r)+Ym(e.variantChildren,l,r,o,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,o,i,s,n)}:()=>Promise.resolve(),{when:l}=a;if(l){const[e,t]="beforeChildren"===l?[i,s]:[s,i];return e().then(()=>t())}return Promise.all([i(),s(n.delay)])}const wg=e=>t=>t.test(e),kg=[Lp,Gp,Hp,Wp,qp,Yp,{test:e=>"auto"===e,parse:e=>e}],Sg=e=>kg.find(wg(e));function Eg(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||Wf(e))}const jg=new Set(["brightness","contrast","saturate","opacity"]);function Cg(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Op)||[];if(!r)return e;const o=n.replace(r,"");let a=jg.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+o+")"}const Pg=/\b([a-z-]*)\(.*?\)/gu,Ng={...ah,getAnimatableNone:e=>{const t=e.match(Pg);return t?t.map(Cg).join(" "):e}},Tg={...ah,getAnimatableNone:e=>{const t=ah.parse(e);return ah.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},Mg={...Lp,transform:Math.round},Rg={borderWidth:Gp,borderTopWidth:Gp,borderRightWidth:Gp,borderBottomWidth:Gp,borderLeftWidth:Gp,borderRadius:Gp,borderTopLeftRadius:Gp,borderTopRightRadius:Gp,borderBottomRightRadius:Gp,borderBottomLeftRadius:Gp,width:Gp,maxWidth:Gp,height:Gp,maxHeight:Gp,top:Gp,right:Gp,bottom:Gp,left:Gp,inset:Gp,insetBlock:Gp,insetBlockStart:Gp,insetBlockEnd:Gp,insetInline:Gp,insetInlineStart:Gp,insetInlineEnd:Gp,padding:Gp,paddingTop:Gp,paddingRight:Gp,paddingBottom:Gp,paddingLeft:Gp,paddingBlock:Gp,paddingBlockStart:Gp,paddingBlockEnd:Gp,paddingInline:Gp,paddingInlineStart:Gp,paddingInlineEnd:Gp,margin:Gp,marginTop:Gp,marginRight:Gp,marginBottom:Gp,marginLeft:Gp,marginBlock:Gp,marginBlockStart:Gp,marginBlockEnd:Gp,marginInline:Gp,marginInlineStart:Gp,marginInlineEnd:Gp,fontSize:Gp,backgroundPositionX:Gp,backgroundPositionY:Gp,...{rotate:Wp,rotateX:Wp,rotateY:Wp,rotateZ:Wp,scale:_p,scaleX:_p,scaleY:_p,scaleZ:_p,skew:Wp,skewX:Wp,skewY:Wp,distance:Gp,translateX:Gp,translateY:Gp,translateZ:Gp,x:Gp,y:Gp,z:Gp,perspective:Gp,transformPerspective:Gp,opacity:Dp,originX:Kp,originY:Kp,originZ:Gp},zIndex:Mg,fillOpacity:Dp,strokeOpacity:Dp,numOctaves:Mg},Lg={...Rg,color:Qp,backgroundColor:Qp,outlineColor:Qp,fill:Qp,stroke:Qp,borderColor:Qp,borderTopColor:Qp,borderRightColor:Qp,borderBottomColor:Qp,borderLeftColor:Qp,filter:Ng,WebkitFilter:Ng,mask:Tg,WebkitMask:Tg},Dg=e=>Lg[e],_g=new Set([Ng,Tg]);function Ag(e,t){let n=Dg(e);return _g.has(n)||(n=ah),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Og=new Set(["auto","none","0"]);class Ig extends Em{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let s=0;s<e.length;s++){let n=e[s];if("string"==typeof n&&(n=n.trim(),Tp(n))){const r=Km(n,t.current);void 0!==r&&(e[s]=r),s===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!sg.has(n)||2!==e.length)return;const[r,o]=e,a=Sg(r),i=Sg(o);if(Rp(r)!==Rp(o)&&vm[n])this.needsMeasurement=!0;else if(a!==i)if(hm(a)&&hm(i))for(let s=0;s<e.length;s++){const t=e[s];"string"==typeof t&&(e[s]=parseFloat(t))}else vm[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)(null===e[r]||Eg(e[r]))&&n.push(r);n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!Og.has(t)&&nh(t).values.length&&(r=e[o]),o++}if(r&&n)for(const a of t)e[a]=Ag(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=vm[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const a=r.length-1,i=r[a];r[a]=vm[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),(null==(e=this.removedTransforms)?void 0:e.length)&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}function zg(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const r=(null==n?void 0:n[e])??t.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(e=>null!=e)}const Fg=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function Vg(e){return Uf(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:Bg}=yp(queueMicrotask,!1),$g={x:!1,y:!1};function Ug(){return $g.x||$g.y}function Wg(e,t){const n=zg(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Hg(e,t,n={}){const[r,o,a]=Wg(e,n);return r.forEach(e=>{let n,r=!1,a=!1;const i=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},s=e=>{r=!1,window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s),a&&(a=!1,i(e))},l=e=>{"touch"!==e.pointerType&&(r?a=!0:i(e))};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||Ug())return;a=!1;const i=t(e,r);"function"==typeof i&&(n=i,e.addEventListener("pointerleave",l,o))},o),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",s,o),window.addEventListener("pointercancel",s,o)},o)}),a}const Gg=(e,t)=>!!t&&(e===t||Gg(e,t.parentElement)),Yg=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,qg=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Kg=new Set(["INPUT","SELECT","TEXTAREA"]);const Xg=new WeakSet;function Qg(e){return t=>{"Enter"===t.key&&e(t)}}function Zg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function Jg(e){return Yg(e)&&!Ug()}const ev=new WeakSet;function tv(e,t,n={}){const[r,o,a]=Wg(e,n),i=e=>{const r=e.currentTarget;if(!Jg(e))return;if(ev.has(e))return;Xg.add(r),n.stopPropagation&&ev.add(e);const a=t(r,e),i=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),Xg.has(r)&&Xg.delete(r),Jg(e)&&"function"==typeof a&&a(e,{success:t})},s=e=>{i(e,r===window||r===document||n.useGlobalTarget||Gg(r,e.target))},l=e=>{i(e,!1)};window.addEventListener("pointerup",s,o),window.addEventListener("pointercancel",l,o)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",i,o),Vg(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Qg(()=>{if(Xg.has(n))return;Zg(n,"down");const e=Qg(()=>{Zg(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>Zg(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,o)),t=e,qg.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}function nv(e){return Uf(e)&&"ownerSVGElement"in e}const rv=new WeakMap;let ov;const av=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:nv(r)&&"getBBox"in r?r.getBBox()[t]:r[n],iv=av("inline","width","offsetWidth"),sv=av("block","height","offsetHeight");function lv({target:e,borderBoxSize:t}){var n;null==(n=rv.get(e))||n.forEach(n=>{n(e,{get width(){return iv(e,t)},get height(){return sv(e,t)}})})}function uv(e){e.forEach(lv)}function cv(e,t){ov||"undefined"!=typeof ResizeObserver&&(ov=new ResizeObserver(uv));const n=zg(e);return n.forEach(e=>{let n=rv.get(e);n||(n=new Set,rv.set(e,n)),n.add(t),null==ov||ov.observe(e)}),()=>{n.forEach(e=>{const n=rv.get(e);null==n||n.delete(t),(null==n?void 0:n.size)||null==ov||ov.unobserve(e)})}}const dv=new Set;let fv;function pv(e){return dv.add(e),fv||(fv=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};dv.forEach(t=>t(e))},window.addEventListener("resize",fv)),()=>{dv.delete(e),dv.size||"function"!=typeof fv||(window.removeEventListener("resize",fv),fv=void 0)}}function hv(e,t){return"function"==typeof e?pv(e):cv(e,t)}const mv=[...kg,Qp,ah],gv=()=>({x:{min:0,max:0},y:{min:0,max:0}}),vv=new WeakMap;function yv(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function bv(e){return"string"==typeof e||Array.isArray(e)}const xv=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wv=["initial",...xv];function kv(e){return yv(e.animate)||wv.some(t=>bv(e[t]))}function Sv(e){return Boolean(kv(e)||e.variants)}const Ev={current:null},jv={current:!1},Cv="undefined"!=typeof window;function Pv(){if(jv.current=!0,Cv)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ev.current=e.matches;e.addEventListener("change",t),t()}else Ev.current=!1}const Nv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Tv={};function Mv(e){Tv=e}class Rv{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:o,blockInitialAnimation:a,visualState:i},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=Em,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=()=>{const e=jp.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,bp.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=o,this.options=s,this.blockInitialAnimation=Boolean(a),this.isControllingVariants=kv(t),this.isVariantNode=Sv(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const f in d){const e=d[f];void 0!==l[f]&&pg(e)&&e.set(l[f])}}mount(e){var t,n;if(this.hasBeenMounted)for(const r in this.initialValues)null==(t=this.values.get(r))||t.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=e,vv.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)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(jv.current||Pv(),this.shouldReduceMotion=Ev.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,null==(n=this.parent)||n.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),xp(this.notifyUpdate),xp(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),null==(e=this.parent)||e.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(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&&Bm.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:o,ease:a,duration:i}=t.accelerate,s=new Am({element:this.current,name:e,keyframes:r,times:o,ease:a,duration:Qf(i)}),l=n(s);return void this.valueSubscriptions.set(e,()=>{l(),s.cancel()})}const n=pm.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&bp.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),o&&o(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Tv){const t=Tv[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const 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):{x:{min:0,max:0},y:{min:0,max:0}}}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 n=0;n<Nv.length;n++){const t=Nv[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],a=n[r];if(pg(o))e.addValue(r,o);else if(pg(a))e.addValue(r,ug(o,{owner:e}));else if(a!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,ug(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(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){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const 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);const 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 void 0===n&&void 0!==t&&(n=ug(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=n&&("string"==typeof n&&($f(n)||Wf(n))?n=parseFloat(n):(r=n,!mv.find(wg(r))&&ah.test(t)&&(n=Ag(e,t))),this.setBaseTarget(e,pg(n)?n.get():n)),pg(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=ag(this.props,n,null==(t=this.presenceContext)?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||pg(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new Xf),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){Bg.render(this.render)}}class Lv extends Rv{constructor(){super(...arguments),this.KeyframeResolver=Ig}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const 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);const{children:e}=this.props;pg(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class Dv{constructor(e){this.isMounted=!1,this.node=e}update(){}}function _v({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Av(e){return void 0===e||1===e}function Ov({scale:e,scaleX:t,scaleY:n}){return!Av(e)||!Av(t)||!Av(n)}function Iv(e){return Ov(e)||zv(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function zv(e){return Fv(e.x)||Fv(e.y)}function Fv(e){return e&&"0%"!==e}function Vv(e,t,n){return n+t*(e-n)}function Bv(e,t,n,r,o){return void 0!==o&&(e=Vv(e,o,r)),Vv(e,n,r)+t}function $v(e,t=0,n=1,r,o){e.min=Bv(e.min,t,n,r,o),e.max=Bv(e.max,t,n,r,o)}function Uv(e,{x:t,y:n}){$v(e.x,t.translate,t.scale,t.originPoint),$v(e.y,n.translate,n.scale,n.originPoint)}const Wv=.999999999999,Hv=1.0000000000001;function Gv(e,t){e.min+=t,e.max+=t}function Yv(e,t,n,r,o=.5){$v(e,t,n,lh(e.min,e.max,o),r)}function qv(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function Kv(e,t,n){const r=n??e;Yv(e.x,qv(t.x,r.x),t.scaleX,t.scale,t.originX),Yv(e.y,qv(t.y,r.y),t.scaleY,t.scale,t.originY)}function Xv(e,t){return _v(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const Qv={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Zv=fm.length;function Jv(e,t,n){const{style:r,vars:o,transformOrigin:a}=e;let i=!1,s=!1;for(const l in t){const e=t[l];if(pm.has(l))i=!0;else if(Pp(l))o[l]=e;else{const t=Fg(e,Rg[l]);l.startsWith("origin")?(s=!0,a[l]=t):r[l]=t}}if(t.transform||(i||n?r.transform=function(e,t,n){let r="",o=!0;for(let a=0;a<Zv;a++){const i=fm[a],s=e[i];if(void 0===s)continue;let l=!0;if("number"==typeof s)l=s===(i.startsWith("scale")?1:0);else{const e=parseFloat(s);l=i.startsWith("scale")?1===e:0===e}if(!l||n){const e=Fg(s,Rg[i]);l||(o=!1,r+=`${Qv[i]||i}(${e}) `),n&&(t[i]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function ey(e,{style:t,vars:n},r,o){const a=e.style;let i;for(i in t)a[i]=t[i];for(i in null==o||o.applyProjectionStyles(a,r),n)a.setProperty(i,n[i])}function ty(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ny={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Gp.test(e))return e;e=parseFloat(e)}return`${ty(e,t.target.x)}% ${ty(e,t.target.y)}%`}},ry={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ah.parse(e);if(o.length>5)return r;const a=ah.createTransformer(e),i="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=s,o[1+i]/=l;const u=lh(s,l,.5);return"number"==typeof o[2+i]&&(o[2+i]/=u),"number"==typeof o[3+i]&&(o[3+i]/=u),a(o)}},oy={borderRadius:{...ny,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ny,borderTopRightRadius:ny,borderBottomLeftRadius:ny,borderBottomRightRadius:ny,boxShadow:ry};function ay(e,{layout:t,layoutId:n}){return pm.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!oy[e]||"opacity"===e)}function iy(e,t,n){var r;const o=e.style,a=null==t?void 0:t.style,i={};if(!o)return i;for(const s in o)(pg(o[s])||a&&pg(a[s])||ay(s,e)||void 0!==(null==(r=null==n?void 0:n.getValue(s))?void 0:r.liveStyle))&&(i[s]=o[s]);return i}class sy extends Lv{constructor(){super(...arguments),this.type="html",this.renderInstance=ey}readValueFromInstance(e,t){var n,r;if(pm.has(t))return(null==(n=this.projection)?void 0:n.isProjecting)?um(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return cm(n,t)})(e,t);{const n=(r=e,window.getComputedStyle(r)),o=(Pp(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof o?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Xv(e,t)}build(e,t,n){Jv(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return iy(e,t,n)}}const ly={offset:"stroke-dashoffset",array:"stroke-dasharray"},uy={offset:"strokeDashoffset",array:"strokeDasharray"};const cy=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function dy(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:a=1,pathOffset:i=0,...s},l,u,c){if(Jv(e,s,u),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{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=(null==c?void 0:c.transformBox)??"fill-box",delete d.transformBox);for(const p of cy)void 0!==d[p]&&(f[p]=d[p],delete d[p]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==o&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const a=o?ly:uy;e[a.offset]=""+-r,e[a.array]=`${t} ${n}`}(d,o,a,i,!1)}const fy=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"]),py=e=>"string"==typeof e&&"svg"===e.toLowerCase();function hy(e,t,n){const r=iy(e,t,n);for(const o in e)if(pg(e[o])||pg(t[o])){r[-1!==fm.indexOf(o)?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o]=e[o]}return r}class my extends Lv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gv}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(pm.has(t)){const e=Dg(t);return e&&e.default||0}return t=fy.has(t)?t:mg(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return hy(e,t,n)}build(e,t,n){dy(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){ey(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(fy.has(o)?o:mg(o),t.attrs[o])}(e,t,0,r)}mount(e){this.isSVGTag=py(e.tagName),super.mount(e)}}const gy=wv.length;function vy(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&vy(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<gy;n++){const r=wv[n],o=e.props[r];(bv(o)||!1===o)&&(t[r]=o)}return t}function yy(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const by=[...xv].reverse(),xy=xv.length;function wy(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map(t=>xg(e,t,n));r=Promise.all(o)}else if("string"==typeof t)r=xg(e,t,n);else{const o="function"==typeof t?ig(e,t,n.custom):t;r=Promise.all(bg(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function ky(e){let t=wy(e),n=jy(),r=!0,o=!1;const a=t=>(n,r)=>{var o;const a=ig(e,r,"exit"===t?null==(o=e.presenceContext)?void 0:o.custom:void 0);if(a){const{transition:e,transitionEnd:t,...r}=a;n={...n,...r,...t}}return n};function i(i){const{props:s}=e,l=vy(e.parent)||{},u=[],c=new Set;let d={},f=1/0;for(let t=0;t<xy;t++){const p=by[t],h=n[p],m=void 0!==s[p]?s[p]:l[p],g=bv(m),v=p===i?h.isActive:null;!1===v&&(f=t);let y=m===l[p]&&m!==s[p]&&g;if(y&&(r||o)&&e.manuallyAnimateOnMount&&(y=!1),h.protectedKeys={...d},!h.isActive&&null===v||!m&&!h.prevProp||yv(m)||"boolean"==typeof m)continue;if("exit"===p&&h.isActive&&!0!==v){h.prevResolvedValues&&(d={...d,...h.prevResolvedValues});continue}const b=Sy(h.prevProp,m);let x=b||p===i&&h.isActive&&!y&&g||t>f&&g,w=!1;const k=Array.isArray(m)?m:[m];let S=k.reduce(a(p),{});!1===v&&(S={});const{prevResolvedValues:E={}}=h,j={...E,...S},C=t=>{x=!0,c.has(t)&&(w=!0,c.delete(t)),h.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in j){const t=S[e],n=E[e];if(d.hasOwnProperty(e))continue;let r=!1;r=cg(t)&&cg(n)?!yy(t,n):t!==n,r?null!=t?C(e):c.add(e):void 0!==t&&c.has(e)?C(e):h.protectedKeys[e]=!0}h.prevProp=m,h.prevResolvedValues=S,h.isActive&&(d={...d,...S}),(r||o)&&e.blockInitialAnimation&&(x=!1);const P=y&&b;x&&(!P||w)&&u.push(...k.map(t=>{const n={type:p};if("string"==typeof t&&(r||o)&&!P&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,o=ig(r,t);if(r.enteringChildren&&o){const{delayChildren:t}=o.transition||{};n.delay=Ym(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(c.size){const t={};if("boolean"!=typeof s.initial){const n=ig(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach(n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=r??null}),u.push({animation:t})}let p=Boolean(u.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,o=!1,p?t(u):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null==(o=e.variantChildren)||o.forEach(e=>{var n;return null==(n=e.animationState)?void 0:n.setActive(t,r)}),n[t].isActive=r;const a=i(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=jy(),o=!0}}}function Sy(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!yy(t,e)}function Ey(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function jy(){return{animate:Ey(!0),whileInView:Ey(),whileHover:Ey(),whileTap:Ey(),whileDrag:Ey(),whileFocus:Ey(),exit:Ey()}}function Cy(e,t){e.min=t.min,e.max=t.max}function Py(e,t){Cy(e.x,t.x),Cy(e.y,t.y)}function Ny(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ty(e){return e.max-e.min}function My(e,t,n,r=.5){e.origin=r,e.originPoint=lh(t.min,t.max,e.origin),e.scale=Ty(n)/Ty(t),e.translate=lh(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function Ry(e,t,n,r){My(e.x,t.x,n.x,r?r.originX:void 0),My(e.y,t.y,n.y,r?r.originY:void 0)}function Ly(e,t,n,r=0){const o=r?lh(n.min,n.max,r):n.min;e.min=o+t.min,e.max=e.min+Ty(t)}function Dy(e,t,n,r=0){const o=r?lh(n.min,n.max,r):n.min;e.min=t.min-o,e.max=e.min+Ty(t)}function _y(e,t,n,r){Dy(e.x,t.x,n.x,null==r?void 0:r.x),Dy(e.y,t.y,n.y,null==r?void 0:r.y)}function Ay(e,t,n,r,o){return e=Vv(e-=t,1/n,r),void 0!==o&&(e=Vv(e,1/o,r)),e}function Oy(e,t,[n,r,o],a,i){!function(e,t=0,n=1,r=.5,o,a=e,i=e){Hp.test(t)&&(t=parseFloat(t),t=lh(i.min,i.max,t/100)-i.min);if("number"!=typeof t)return;let s=lh(a.min,a.max,r);e===a&&(s-=t),e.min=Ay(e.min,t,n,s,o),e.max=Ay(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,a,i)}const Iy=["x","scaleX","originX"],zy=["y","scaleY","originY"];function Fy(e,t,n,r){Oy(e.x,t,Iy,n?n.x:void 0,r?r.x:void 0),Oy(e.y,t,zy,n?n.y:void 0,r?r.y:void 0)}function Vy(e){return 0===e.translate&&1===e.scale}function By(e){return Vy(e.x)&&Vy(e.y)}function $y(e,t){return e.min===t.min&&e.max===t.max}function Uy(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Wy(e,t){return Uy(e.x,t.x)&&Uy(e.y,t.y)}function Hy(e){return Ty(e.x)/Ty(e.y)}function Gy(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Yy(e){return[e("x"),e("y")]}const qy=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Ky=qy.length,Xy=e=>"string"==typeof e?parseFloat(e):e,Qy=e=>"number"==typeof e||Gp.test(e);function Zy(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Jy=tb(0,.5,up),eb=tb(.5,.95,Gf);function tb(e,t,n){return r=>r<e?0:r>t?1:n(Kf(e,t,r))}function nb(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const rb=(e,t)=>e.depth-t.depth;class ob{constructor(){this.children=[],this.isDirty=!1}add(e){zf(this.children,e),this.isDirty=!0}remove(e){Ff(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(rb),this.isDirty=!1,this.children.forEach(e)}}function ab(e){return pg(e)?e.get():e}class ib{constructor(){this.members=[]}add(e){zf(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const r=n.instance;r&&!1!==r.isConnected||n.snapshot||(Ff(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Ff(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){var t;for(let n=this.members.indexOf(e)-1;n>=0;n--){const e=this.members[n];if(!1!==e.isPresent&&!1!==(null==(t=e.instance)?void 0:t.isConnected))return this.promote(e),!0}return!1}promote(e,t){var n;const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.updateSnapshot(),e.scheduleRender();const{layoutDependency:o}=r.options,{layoutDependency:a}=e.options;void 0!==o&&o===a||(e.resumeFrom=r,t&&(r.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),(null==(n=e.root)?void 0:n.isUpdating)&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var t,n,r,o,a;null==(n=(t=e.options).onExitComplete)||n.call(t),null==(a=null==(r=e.resumingFrom)?void 0:(o=r.options).onExitComplete)||a.call(o)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(null==(e=this.lead)?void 0:e.snapshot)&&(this.lead.snapshot=void 0)}}const sb={hasAnimatedSinceResize:!0,hasEverUpdated:!1},lb=["","X","Y","Z"];let ub=0;function cb(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function db(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=vg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",bp,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&db(r)}function fb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=ub++,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,this.nodes.forEach(mb),this.nodes.forEach(Eb),this.nodes.forEach(jb),this.nodes.forEach(gb)},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 t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new ob)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Xf),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=nv(t)&&!(nv(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:o,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(o||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const o=()=>this.root.updateBlockedByResize=!1;bp.read(()=>{r=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=jp.now(),r=({timestamp:o})=>{const a=o-n;a>=t&&(xp(r),e(a-t))};return bp.setup(r,!0),()=>xp(r)}(o,250),sb.hasAnimatedSinceResize&&(sb.hasAnimatedSinceResize=!1,this.nodes.forEach(Sb)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&a&&(r||o)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||Rb,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!Wy(this.targetLayout,r),u=!t&&n;if(this.options.layoutRoot||this.resumeFrom||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...tg(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u)}else t||Sb(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),xp(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(Cb),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&db(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let o=0;o<this.path.length;o++){const e=this.path[o];e.shouldResetTransform=!0,"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const e=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(bb),void this.nodes.forEach(yb)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(xb);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(wb),this.nodes.forEach(kb),this.nodes.forEach(pb),this.nodes.forEach(hb)):this.nodes.forEach(xb),this.clearAllSnapshots();const e=jp.now();wp.delta=Vf(0,1e3/60,e-wp.timestamp),wp.timestamp=e,wp.isProcessing=!0,kp.update.process(wp),kp.preRender.process(wp),kp.render.process(wp),wp.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Bg.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(vb),this.sharedNodes.forEach(Pb)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,bp.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){bp.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Ty(this.snapshot.measuredBox.x)||Ty(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const 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(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!By(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Iv(this.latestValues)||a)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),_b((r=n).x),_b(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!((null==(e=this.scroll)?void 0:e.wasRoot)||this.path.some(Ob))){const{scroll:e}=this.root;e&&(Gv(n.x,e.offset.x),Gv(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(Py(n,e),null==(t=this.scroll)?void 0:t.wasRoot)return n;for(let r=0;r<this.path.length;r++){const t=this.path[r],{scroll:o,options:a}=t;t!==this.root&&o&&a.layoutScroll&&(o.wasRoot&&Py(n,e),Gv(n.x,o.offset.x),Gv(n.y,o.offset.y))}return n}applyTransform(e,t=!1,n){var r,o;const a=n||{x:{min:0,max:0},y:{min:0,max:0}};Py(a,e);for(let i=0;i<this.path.length;i++){const e=this.path[i];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&(Gv(a.x,-e.scroll.offset.x),Gv(a.y,-e.scroll.offset.y)),Iv(e.latestValues)&&Kv(a,e.latestValues,null==(r=e.layout)?void 0:r.layoutBox)}return Iv(this.latestValues)&&Kv(a,this.latestValues,null==(o=this.layout)?void 0:o.layoutBox),a}removeTransform(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};Py(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];if(!Iv(e.latestValues))continue;let o;e.instance&&(Ov(e.latestValues)&&e.updateSnapshot(),o=gv(),Py(o,e.measurePageBox())),Fy(n,e.latestValues,null==(t=e.snapshot)?void 0:t.layoutBox,o)}return Iv(this.latestValues)&&Fy(n,this.latestValues),n}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||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!==wp.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null==(t=this.parent)?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:a}=this.options;if(!this.layout||!o&&!a)return;this.resolvedRelativeTargetAt=wp.timestamp;const i=this.getClosestProjectingParent();var s,l,u,c;(i&&this.linkedParentVersion!==i.layoutVersion&&!i.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&i&&i.layout?this.createRelativeTarget(i,this.layout.layoutBox,i.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,l=this.relativeTarget,u=this.relativeParent.target,c=this.options.layoutAnchor||void 0,Ly(s.x,l.x,u.x,null==c?void 0:c.x),Ly(s.y,l.y,u.y,null==c?void 0:c.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):Py(this.target,this.layout.layoutBox),Uv(this.target,this.targetDelta)):Py(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&i&&Boolean(i.resumingFrom)===Boolean(this.resumingFrom)&&!i.options.layoutScroll&&i.target&&1!==this.animationProgress?this.createRelativeTarget(i,this.target,i.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!Ov(this.parent.latestValues)&&!zv(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},_y(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Py(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null==(e=this.parent)?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===wp.timestamp&&(r=!1),r)return;const{layout:o,layoutId:a}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!a)return;Py(this.layoutCorrected,this.layout.layoutBox);const i=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){var o;const a=n.length;if(!a)return;let i,s;t.x=t.y=1;for(let l=0;l<a;l++){i=n[l],s=i.projectionDelta;const{visualElement:a}=i.options;a&&a.props.style&&"contents"===a.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(Gv(e.x,-i.scroll.offset.x),Gv(e.y,-i.scroll.offset.y)),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Uv(e,s)),r&&Iv(i.latestValues)&&Kv(e,i.latestValues,null==(o=i.layout)?void 0:o.layoutBox))}t.x<Hv&&t.x>Wv&&(t.x=1),t.y<Hv&&t.y>Wv&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Ny(this.prevProjectionDelta.x,this.projectionDelta.x),Ny(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Ry(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===i&&this.treeScale.y===s&&Gy(this.projectionDelta.x,this.prevProjectionDelta.x)&&Gy(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null==(t=this.options.visualElement)||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const i={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(s&&!u&&!0===this.options.crossfade&&!this.path.some(Mb));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,f,p,h;Nb(a.x,e.x,n),Nb(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(_y(i,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),l=this.relativeTarget,f=this.relativeTargetOrigin,p=i,h=n,Tb(l.x,f.x,p.x,h),Tb(l.y,f.y,p.y,h),d&&function(e,t){return $y(e.x,t.x)&&$y(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Py(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,a){o?(e.opacity=lh(0,n.opacity??1,Jy(r)),e.opacityExit=lh(t.opacity??1,0,eb(r))):a&&(e.opacity=lh(t.opacity??1,n.opacity??1,r));for(let i=0;i<Ky;i++){const o=qy[i];let a=Zy(t,o),s=Zy(n,o);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||Qy(a)===Qy(s)?(e[o]=Math.max(lh(Xy(a),Xy(s),r),0),(Hp.test(s)||Hp.test(a))&&(e[o]+="%")):e[o]=s)}(t.rotate||n.rotate)&&(e.rotate=lh(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){var t,n,r;this.notifyListeners("animationStart"),null==(t=this.currentAnimation)||t.stop(),null==(r=null==(n=this.resumingFrom)?void 0:n.currentAnimation)||r.stop(),this.pendingAnimation&&(xp(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=bp.update(()=>{sb.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ug(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(e,t,n){const r=pg(e)?e:ug(e);return r.start(rg("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{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);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Ab(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Ty(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Ty(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Py(t,n),Kv(t,o),Ry(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ib);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null==(e=this.getStack())?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null==(e=this.getStack())?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&cb("z",e,r,this.animationValues);for(let o=0;o<lb.length;o++)cb(`rotate${lb[o]}`,e,r,this.animationValues),cb(`skew${lb[o]}`,e,r,this.animationValues);e.render();for(const o in r)e.setStaticValue(o,r[o]),this.animationValues&&(this.animationValues[o]=r[o]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=ab(null==t?void 0:t.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=ab(null==t?void 0:t.pointerEvents)||""),void(this.hasProjected&&!Iv(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const o=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=function(e,t,n){let r="";const o=e.x.translate/t.x,a=e.y.translate/t.y,i=(null==n?void 0:n.z)||0;if((o||a||i)&&(r=`translate3d(${o}px, ${a}px, ${i}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:a,skewX:i,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),a&&(r+=`rotateY(${a}deg) `),i&&(r+=`skewX(${i}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,o);n&&(a=n(o,a)),e.transform=a;const{x:i,y:s}=this.projectionDelta;e.transformOrigin=`${100*i.origin}% ${100*s.origin}% 0`,r.animationValues?e.opacity=r===this?o.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:e.opacity=r===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const l in oy){if(void 0===o[l])continue;const{correct:t,applyTo:n,isCSSVariable:i}=oy[l],s="none"===a?o[l]:t(o[l],r);if(n){const t=n.length;for(let r=0;r<t;r++)e[n[r]]=s}else i?this.options.visualElement.renderState.vars[l]=s:e[l]=s}this.options.layoutId&&(e.pointerEvents=r===this?ab(null==t?void 0:t.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null==(t=e.currentAnimation)?void 0:t.stop()}),this.root.nodes.forEach(yb),this.root.sharedNodes.clear()}}}function pb(e){e.updateLayout()}function hb(e){var t;const n=(null==(t=e.resumeFrom)?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;if("size"===o)Yy(e=>{const r=a?n.measuredBox[e]:n.layoutBox[e],o=Ty(r);r.min=t[e].min,r.max=r.min+o});else if("x"===o||"y"===o){const e="x"===o?"y":"x";Cy(a?n.measuredBox[e]:n.layoutBox[e],t[e])}else Ab(o,n.layoutBox,t)&&Yy(r=>{const o=a?n.measuredBox[r]:n.layoutBox[r],i=Ty(t[r]);o.max=o.min+i,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+i)});const i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Ry(i,t,n.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};a?Ry(s,e.applyTransform(r,!0),n.measuredBox):Ry(s,t,n.layoutBox);const l=!By(i);let u=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:a}=r;if(o&&a){const i=e.options.layoutAnchor||void 0,s={x:{min:0,max:0},y:{min:0,max:0}};_y(s,n.layoutBox,o.layoutBox,i);const l={x:{min:0,max:0},y:{min:0,max:0}};_y(l,t,a.layoutBox,i),Wy(s,l)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function mb(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function gb(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function vb(e){e.clearSnapshot()}function yb(e){e.clearMeasurements()}function bb(e){e.isLayoutDirty=!0,e.updateLayout()}function xb(e){e.isLayoutDirty=!1}function wb(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function kb(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Sb(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Eb(e){e.resolveTargetDelta()}function jb(e){e.calcProjection()}function Cb(e){e.resetSkewAndRotation()}function Pb(e){e.removeLeadSnapshot()}function Nb(e,t,n){e.translate=lh(t.translate,0,n),e.scale=lh(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Tb(e,t,n,r){e.min=lh(t.min,n.min,r),e.max=lh(t.max,n.max,r)}function Mb(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Rb={duration:.45,ease:[.4,0,.1,1]},Lb=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Db=Lb("applewebkit/")&&!Lb("chrome/")?Math.round:Gf;function _b(e){e.min=Db(e.min),e.max=Db(e.max)}function Ab(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=Hy(t),o=Hy(n),a=.2,!(Math.abs(r-o)<=a));var r,o,a}function Ob(e){var t;return e!==e.root&&(null==(t=e.scroll)?void 0:t.wasRoot)}const Ib=fb({attachResizeListener:(e,t)=>nb(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||(null==(e=document.body)?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||(null==(t=document.body)?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),zb={current:void 0},Fb=fb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zb.current){const e=new Ib({});e.mount(window),e.setOptions({layoutScroll:!0}),zb.current=e}return zb.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Vb=W.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Bb(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function $b(...e){return W.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Bb(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Bb(e[t],null)}}}}(...e),e)}class Ub extends W.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(Vg(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,n=Vg(e)&&e.offsetWidth||0,r=Vg(e)&&e.offsetHeight||0,o=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Wb({children:e,isPresent:t,anchorX:n,anchorY:r,root:o,pop:a}){var i;const s=W.useId(),l=W.useRef(null),u=W.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=W.useContext(Vb),d=(null==(i=e.props)?void 0:i.ref)??(null==e?void 0:e.ref),f=$b(l,d);return W.useInsertionEffect(()=>{const{width:e,height:i,top:d,left:f,right:p,bottom:h}=u.current;if(t||!1===a||!l.current||!e||!i)return;const m="left"===n?`left: ${f}`:`right: ${p}`,g="bottom"===r?`bottom: ${h}`:`top: ${d}`;l.current.dataset.motionPopId=s;const v=document.createElement("style");c&&(v.nonce=c);const y=o??document.head;return y.appendChild(v),v.sheet&&v.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${i}px !important;\n ${m}px !important;\n ${g}px !important;\n }\n `),()=>{var e;null==(e=l.current)||e.removeAttribute("data-motion-pop-id"),y.contains(v)&&y.removeChild(v)}},[t]),ee.jsx(Ub,{isPresent:t,childRef:l,sizeRef:u,pop:a,children:!1===a?e:W.cloneElement(e,{ref:f})})}const Hb=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:a,mode:i,anchorX:s,anchorY:l,root:u})=>{const c=Af(Gb),d=W.useId();let f=!0,p=W.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:e=>{c.set(e,!0);for(const t of c.values())if(!t)return;r&&r()},register:e=>(c.set(e,!1),()=>c.delete(e))}),[n,c,r]);return a&&f&&(p={...p}),W.useMemo(()=>{c.forEach((e,t)=>c.set(t,!1))},[n]),W.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=ee.jsx(Wb,{pop:"popLayout"===i,isPresent:n,anchorX:s,anchorY:l,root:u,children:e}),ee.jsx(If.Provider,{value:p,children:e})};function Gb(){return new Map}function Yb(e=!0){const t=W.useContext(If);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,a=W.useId();W.useEffect(()=>{if(e)return o(a)},[e]);const i=W.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,i]:[!0]}const qb=e=>e.key||"";function Kb(e){const t=[];return W.Children.forEach(e,e=>{W.isValidElement(e)&&t.push(e)}),t}const Xb=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:a="sync",propagate:i=!1,anchorX:s="left",anchorY:l="top",root:u})=>{const[c,d]=Yb(i),f=W.useMemo(()=>Kb(e),[e]),p=i&&!c?[]:f.map(qb),h=W.useRef(!0),m=W.useRef(f),g=Af(()=>new Map),v=W.useRef(new Set),[y,b]=W.useState(f),[x,w]=W.useState(f);Of(()=>{h.current=!1,m.current=f;for(let e=0;e<x.length;e++){const t=qb(x[e]);p.includes(t)?(g.delete(t),v.current.delete(t)):!0!==g.get(t)&&g.set(t,!1)}},[x,p.length,p.join("-")]);const k=[];if(f!==y){let e=[...f];for(let t=0;t<x.length;t++){const n=x[t],r=qb(n);p.includes(r)||(e.splice(t,0,n),k.push(n))}return"wait"===a&&k.length&&(e=k),w(Kb(e)),b(f),null}const{forceRender:S}=W.useContext(_f);return ee.jsx(ee.Fragment,{children:x.map(e=>{const y=qb(e),b=!(i&&!c)&&(f===x||p.includes(y));return ee.jsx(Hb,{isPresent:b,initial:!(h.current&&!n)&&void 0,custom:t,presenceAffectsLayout:o,mode:a,root:u,onExitComplete:b?void 0:()=>{if(v.current.has(y))return;if(!g.has(y))return;v.current.add(y),g.set(y,!0);let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(null==S||S(),w(m.current),i&&(null==d||d()),r&&r())},anchorX:s,anchorY:l,children:e},y)})})},Qb=W.createContext({strict:!1}),Zb={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"]};let Jb=!1;function ex(){return function(){if(Jb)return;const e={};for(const t in Zb)e[t]={isEnabled:e=>Zb[t].some(t=>!!e[t])};Mv(e),Jb=!0}(),Tv}const tx=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"]);function nx(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||tx.has(e)}let rx=e=>!nx(e);try{"function"==typeof(ox=require("@emotion/is-prop-valid").default)&&(rx=e=>e.startsWith("on")?!nx(e):ox(e))}catch{}var ox;const ax=W.createContext({});function ix(e){const{initial:t,animate:n}=function(e,t){if(kv(e)){const{initial:t,animate:n}=e;return{initial:!1===t||bv(t)?t:void 0,animate:bv(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,W.useContext(ax));return W.useMemo(()=>({initial:t,animate:n}),[sx(t),sx(n)])}function sx(e){return Array.isArray(e)?e.join(" "):e}const lx=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ux(e,t,n){for(const r in t)pg(t[r])||ay(r,n)||(e[r]=t[r])}function cx(e,t){const n={};return ux(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return W.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Jv(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}function dx(e,t){const n={},r=cx(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const fx=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function px(e,t,n,r){const o=W.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return dy(n,t,py(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};ux(t,e.style,e),o.style={...t,...o.style}}return o}const hx=["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 mx(e){return"string"==typeof e&&!e.includes("-")&&!!(hx.indexOf(e)>-1||/[A-Z]/u.test(e))}function gx(e,t,n,{latestValues:r},o,a=!1,i){const s=(i??mx(e)?px:dx)(t,r,o,e),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||pg(e[o])||(rx(o)||!0===n&&nx(o)||!t&&!nx(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(t,"string"==typeof e,a),u=e!==W.Fragment?{...l,...s,ref:n}:{},{children:c}=t,d=W.useMemo(()=>pg(c)?c.get():c,[c]);return W.createElement(e,{...u,children:d})}function vx(e,t,n,r){const o={},a=r(e,{});for(const f in a)o[f]=ab(a[f]);let{initial:i,animate:s}=e;const l=kv(e),u=Sv(e);t&&u&&!l&&!1!==e.inherit&&(void 0===i&&(i=t.initial),void 0===s&&(s=t.animate));let c=!!n&&!1===n.initial;c=c||!1===i;const d=c?s:i;if(d&&"boolean"!=typeof d&&!yv(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=ag(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(o[r]=e)}for(const r in e)o[r]=e[r]}}}return o}const yx=e=>(t,n)=>{const r=W.useContext(ax),o=W.useContext(If),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:vx(n,r,o,e),renderState:t()}}(e,t,r,o);return n?a():Af(a)},bx=yx({scrapeMotionValuesFromProps:iy,createRenderState:lx}),xx=yx({scrapeMotionValuesFromProps:hy,createRenderState:fx}),wx=Symbol.for("motionComponentSymbol");function kx(e,t,n){const r=W.useRef(n);W.useInsertionEffect(()=>{r.current=n});const o=W.useRef(null);return W.useCallback(n=>{var a;n&&(null==(a=e.onMount)||a.call(e,n));const i=r.current;if("function"==typeof i)if(n){const e=i(n);"function"==typeof e&&(o.current=e)}else o.current?(o.current(),o.current=null):i(n);else i&&(i.current=n);t&&(n?t.mount(n):t.unmount())},[t])}const Sx=W.createContext({});function Ex(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function jx(e,t,n,r,o,a){var i,s;const{visualElement:l}=W.useContext(ax),u=W.useContext(Qb),c=W.useContext(If),d=W.useContext(Vb),f=d.reducedMotion,p=d.skipAnimations,h=W.useRef(null),m=W.useRef(!1);r=r||u.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:l,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:f,skipAnimations:p,isSVG:a}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const g=h.current,v=W.useContext(Sx);!g||g.projection||!o||"html"!==g.type&&"svg"!==g.type||function(e,t,n,r){const{layoutId:o,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Cx(e.parent)),e.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:Boolean(i)||s&&Ex(s),visualElement:e,animationType:"string"==typeof a?a:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}(h.current,n,o,v);const y=W.useRef(!1);W.useInsertionEffect(()=>{g&&y.current&&g.update(n,c)});const b=n[gg],x=W.useRef(Boolean(b)&&"undefined"!=typeof window&&!(null==(i=window.MotionHandoffIsComplete)?void 0:i.call(window,b))&&(null==(s=window.MotionHasOptimisedAnimation)?void 0:s.call(window,b)));return Of(()=>{m.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),x.current&&g.animationState&&g.animationState.animateChanges())}),W.useEffect(()=>{g&&(!x.current&&g.animationState&&g.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var e;null==(e=window.MotionHandoffMarkAsComplete)||e.call(window,b)}),x.current=!1),g.enteringChildren=void 0)}),g}function Cx(e){if(e)return!1!==e.options.allowProjection?e.projection:Cx(e.parent)}function Px(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&function(e){const t=ex();for(const n in e)t[n]={...t[n],...e[n]};Mv(t)}(r);const a=n?"svg"===n:mx(e),i=a?xx:bx;function s(n,r){let s;const l={...W.useContext(Vb),...n,layoutId:Nx(n)},{isStatic:u}=l,c=ix(n),d=i(n,u);if(!u&&"undefined"!=typeof window){W.useContext(Qb).strict;const t=function(e){const t=ex(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:(null==n?void 0:n.isEnabled(e))||(null==r?void 0:r.isEnabled(e))?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}(l);s=t.MeasureLayout,c.visualElement=jx(e,d,l,o,t.ProjectionNode,a)}return ee.jsxs(ax.Provider,{value:c,children:[s&&c.visualElement?ee.jsx(s,{visualElement:c.visualElement,...l}):null,gx(e,n,kx(d,c.visualElement,r),d,u,t,a)]})}s.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const l=W.forwardRef(s);return l[wx]=e,l}function Nx({layoutId:e}){const t=W.useContext(_f).id;return t&&void 0!==e?t+"-"+e:e}function Tx(e,t){if("undefined"==typeof Proxy)return Px;const n=new Map,r=(n,r)=>Px(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(o,a)=>"create"===a?r:(n.has(a)||n.set(a,Px(a,void 0,e,t)),n.get(a))})}const Mx=(e,t)=>t.isSVG??mx(e)?new my(t):new sy(t,{allowProjection:e!==W.Fragment});let Rx=0;const Lx={animation:{Feature:class extends Dv{constructor(e){super(e),e.animationState||(e.animationState=ky(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();yv(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null==(e=this.unmountControls)||e.call(this)}}},exit:{Feature:class extends Dv{constructor(){super(...arguments),this.id=Rx++,this.isExitComplete=!1}update(){var e;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&!1===r){if(this.isExitComplete){const{initial:t,custom:n}=this.node.getProps();if("string"==typeof t){const r=ig(this.node,t,n);if(r){const{transition:t,transitionEnd:n,...o}=r;for(const r in o)null==(e=this.node.getValue(r))||e.jump(o[r])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Dx(e){return{point:{x:e.pageX,y:e.pageY}}}function _x(e,t,n,r){return nb(e,t,(e=>t=>Yg(t)&&e(t,Dx(t)))(n),r)}const Ax=({current:e})=>e?e.ownerDocument.defaultView:null,Ox=(e,t)=>Math.abs(e-t);const Ix=new Set(["auto","scroll"]);class zx{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:a=3,element:i}={}){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=Fx(this.lastRawMoveEventInfo,this.transformPagePoint));const e=Bx(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Ox(e.x,t.x),r=Ox(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=wp;this.history.push({...r,timestamp:o});const{onStart:a,onMove:i}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),i&&i(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=Fx(t,this.transformPagePoint),bp.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const a=Bx("pointercancel"===e.type?this.lastMoveEventInfo:Fx(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Yg(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;const s=Fx(Dx(e),this.transformPagePoint),{point:l}=s,{timestamp:u}=wp;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=t;c&&c(e,Bx(s,this.history)),this.removeListeners=qf(_x(this.contextWindow,"pointermove",this.handlePointerMove),_x(this.contextWindow,"pointerup",this.handlePointerUp),_x(this.contextWindow,"pointercancel",this.handlePointerUp)),i&&this.startScrollTracking(i)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(Ix.has(e.overflowX)||Ix.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){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},o=r.x-t.x,a=r.y-t.y;0===o&&0===a||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o,this.lastMoveEventInfo.point.y+=a):this.history.length>0&&(this.history[0].x-=o,this.history[0].y-=a),this.scrollPositions.set(e,r),bp.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),xp(this.updatePoint)}}function Fx(e,t){return t?{point:t(e.point)}:e}function Vx(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Bx({point:e},t){return{point:e,delta:Vx(e,Ux(t)),offset:Vx(e,$x(t)),velocity:Wx(t,.1)}}function $x(e){return e[0]}function Ux(e){return e[e.length-1]}function Wx(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Ux(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Qf(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>2*Qf(t)&&(r=e[1]);const a=Zf(o.timestamp-r.timestamp);if(0===a)return{x:0,y:0};const i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Hx(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Gx(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}}const Yx=.35;function qx(e,t,n){return{min:Kx(e,t),max:Kx(e,n)}}function Kx(e,t){return"number"==typeof e?e:e[t]||0}const Xx=new WeakMap;class Qx{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={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:o}=this.getProps();this.panSession=new zx(e,{onSessionStart:e=>{t&&this.snapToCursor(Dx(e).point),this.stopAnimation()},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(a=n)||"y"===a?$g[a]?null:($g[a]=!0,()=>{$g[a]=!1}):$g.x||$g.y?null:($g.x=$g.y=!0,()=>{$g.x=$g.y=!1}),!this.openDragLock))return;var a;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),Yy(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Hp.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=Ty(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),o&&bp.update(()=>o(e,t),!1,!0),hg(this.visualElement,"transform");const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:i}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(i),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,i),this.updateAxis("y",t.point,i),this.visualElement.render(),a&&bp.update(()=>a(e,t),!1,!0)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:o,distanceThreshold:n,contextWindow:Ax(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!n)return;const{velocity:a}=r;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&bp.postRender(()=>i(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{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){const{drag:r}=this.getProps();if(!n||!Jx(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?lh(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?lh(n,e,r.max):Math.min(e,n)),e}(a,this.constraints[e],this.elastic[e])),o.set(a)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null==(e=this.visualElement.projection)?void 0:e.layout,o=this.constraints;t&&Ex(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:Hx(e.x,n,o),y:Hx(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=Yx){return!1===e?e=0:!0===e&&(e=Yx),{x:qx(e,"left","right"),y:qx(e,"top","bottom")}}(n),o!==this.constraints&&!Ex(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Yy(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Ex(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=Xv(e,n),{scroll:o}=t;return o&&(Gv(r.x,o.offset.x),Gv(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let a=function(e,t){return{x:Gx(e.x,t.x),y:Gx(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=_v(e))}return a}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:i}=this.getProps(),s=this.constraints||{},l=Yy(i=>{if(!Jx(i,t,this.currentDirection))return;let l=s&&s[i]||{};!0!==a&&a!==i||(l={min:0,max:0});const u=r?200:1e6,c=r?40:1e7,d={type:"inertia",velocity:n?e[i]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(i,d)});return Promise.all(l).then(i)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return hg(this.visualElement,e),n.start(rg(e,n,0,t,this.visualElement,!1))}stopAnimation(){Yy(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Yy(t=>{const{drag:n}=this.getProps();if(!Jx(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:a}=r.layout.layoutBox[t],i=o.get()||0;o.set(e[t]-lh(n,a,.5)+i)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Ex(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Yy(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Ty(e),o=Ty(t);return o>r?n=Kf(t.min,t.max-r,e.min):r>o&&(n=Kf(e.min,e.max-o,t.min)),Vf(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Yy(t=>{if(!Jx(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:a}=this.constraints[t];n.set(lh(o,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Xx.set(this.visualElement,this);const e=this.visualElement.current,t=_x(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),o=t.target,a=o!==e&&function(e){return Kg.has(e.tagName)||!0===e.isContentEditable}(o);n&&r&&!a&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();Ex(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=hv(e,Zx(n)),o=hv(t,Zx(n));return()=>{r(),o()}}(e,t.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,a=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),bp.read(r);const i=nb(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Yy(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),t(),a(),s&&s(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:a=Yx,dragMomentum:i=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:a,dragMomentum:i}}}function Zx(e){let t=!0;return()=>{t?t=!1:e()}}function Jx(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const ew=e=>(t,n)=>{e&&bp.update(()=>e(t,n),!1,!0)};let tw=!1;class nw extends W.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),tw&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),sb.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,{projection:a}=n;return a?(a.isPresent=o,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),tw=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==o?a.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?a.promote():a.relegate()||bp.postRender(()=>{const e=a.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Bg.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;tw=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function rw(e){const[t,n]=Yb(),r=W.useContext(_f);return ee.jsx(nw,{...e,layoutGroup:r,switchLayoutGroup:W.useContext(Sx),isPresent:t,safeToRemove:n})}const ow={pan:{Feature:class extends Dv{constructor(){super(...arguments),this.removePointerDownListener=Gf}onPointerDown(e){this.session=new zx(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ax(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:ew(e),onStart:ew(t),onMove:ew(n),onEnd:(e,t)=>{delete this.session,r&&bp.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=_x(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Dv{constructor(e){super(e),this.removeGroupControls=Gf,this.removeListeners=Gf,this.controls=new Qx(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Gf}update(){const{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()}},ProjectionNode:Fb,MeasureLayout:rw}};function aw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&bp.postRender(()=>o(t,Dx(t)))}function iw(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const o=r["onTap"+("End"===n?"":n)];o&&bp.postRender(()=>o(t,Dx(t)))}const sw=new WeakMap,lw=new WeakMap,uw=e=>{const t=sw.get(e.target);t&&t(e)},cw=e=>{e.forEach(uw)};function dw(e,t,n){const r=function({root:e,...t}){const n=e||document;lw.has(n)||lw.set(n,{});const r=lw.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(cw,{root:e,...t})),r[o]}(t);return sw.set(e,n),r.observe(e),()=>{sw.delete(e),r.unobserve(e)}}const fw={some:0,all:1};const pw={inView:{Feature:class extends Dv{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e;null==(e=this.stopObserver)||e.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:a}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:"number"==typeof o?o:fw[o]};this.stopObserver=dw(this.node.current,i,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,a&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){var e;null==(e=this.stopObserver)||e.call(this),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends Dv{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=tv(e,(e,t)=>(iw(this.node,t,"Start"),(e,{success:t})=>iw(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===(null==n?void 0:n.tap)})}unmount(){}}},focus:{Feature:class extends Dv{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(MT){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=qf(nb(this.node.current,"focus",()=>this.onFocus()),nb(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Dv{mount(){const{current:e}=this.node;e&&(this.unmount=Hg(e,(e,t)=>(aw(this.node,t,"Start"),e=>aw(this.node,e,"End"))))}unmount(){}}}},hw=Tx({...Lx,...pw,...ow,...{layout:{ProjectionNode:Fb,MeasureLayout:rw}}},Mx);function mw(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=mw(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function gw(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=mw(e))&&(r&&(r+=" "),r+=t);return r}const vw=e=>{const t=ww(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),yw(n,t)||xw(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},yw=(e,t)=>{var n;if(0===e.length)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),a=o?yw(e.slice(1),o):void 0;if(a)return a;if(0===t.validators.length)return;const i=e.join("-");return null==(n=t.validators.find(({validator:e})=>e(i)))?void 0:n.classGroupId},bw=/^\[(.+)\]$/,xw=e=>{if(bw.test(e)){const t=bw.exec(e)[1],n=null==t?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ww=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return jw(Object.entries(e.classGroups),n).forEach(([e,n])=>{kw(n,r,e,t)}),r},kw=(e,t,n,r)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:Sw(t,e)).classGroupId=n)}if("function"==typeof e)return Ew(e)?void kw(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach(([e,o])=>{kw(o,Sw(t,e),n,r)})})},Sw=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},Ew=e=>e.isThemeGetter,jw=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,Cw=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},Pw=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],a=t.length,i=e=>{const n=[];let i,s=0,l=0;for(let d=0;d<e.length;d++){let u=e[d];if(0===s){if(u===o&&(r||e.slice(d,d+a)===t)){n.push(e.slice(l,d)),l=d+a;continue}if("/"===u){i=d;continue}}"["===u?s++:"]"===u&&s--}const u=0===n.length?e:e.substring(l),c=u.startsWith("!");return{modifiers:n,hasImportantModifier:c,baseClassName:c?u.substring(1):u,maybePostfixModifierPosition:i&&i>l?i-l:void 0}};return n?e=>n({className:e,parseClassName:i}):i},Nw=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},Tw=/\s+/;function Mw(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Rw(e))&&(r&&(r+=" "),r+=t);return r}const Rw=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Rw(e[r]))&&(n&&(n+=" "),n+=t);return n};function Lw(e,...t){let n,r,o,a=function(s){const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:Cw(e.cacheSize),parseClassName:Pw(e),...vw(e)}))(l),r=n.cache.get,o=n.cache.set,a=i,i(s)};function i(e){const t=r(e);if(t)return t;const a=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(Tw);let s="";for(let l=i.length-1;l>=0;l-=1){const e=i[l],{modifiers:t,hasImportantModifier:u,baseClassName:c,maybePostfixModifierPosition:d}=n(e);let f=Boolean(d),p=r(f?c.substring(0,d):c);if(!p){if(!f){s=e+(s.length>0?" "+s:s);continue}if(p=r(c),!p){s=e+(s.length>0?" "+s:s);continue}f=!1}const h=Nw(t).join(":"),m=u?h+"!":h,g=m+p;if(a.includes(g))continue;a.push(g);const v=o(p,f);for(let n=0;n<v.length;++n){const e=v[n];a.push(m+e)}s=e+(s.length>0?" "+s:s)}return s})(e,n);return o(e,a),a}return function(){return a(Mw.apply(null,arguments))}}const Dw=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},_w=/^\[(?:([a-z-]+):)?(.+)\]$/i,Aw=/^\d+\/\d+$/,Ow=new Set(["px","full","screen"]),Iw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zw=/\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$/,Fw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Vw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Bw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$w=e=>Ww(e)||Ow.has(e)||Aw.test(e),Uw=e=>rk(e,"length",ok),Ww=e=>Boolean(e)&&!Number.isNaN(Number(e)),Hw=e=>rk(e,"number",Ww),Gw=e=>Boolean(e)&&Number.isInteger(Number(e)),Yw=e=>e.endsWith("%")&&Ww(e.slice(0,-1)),qw=e=>_w.test(e),Kw=e=>Iw.test(e),Xw=new Set(["length","size","percentage"]),Qw=e=>rk(e,Xw,ak),Zw=e=>rk(e,"position",ak),Jw=new Set(["image","url"]),ek=e=>rk(e,Jw,sk),tk=e=>rk(e,"",ik),nk=()=>!0,rk=(e,t,n)=>{const r=_w.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},ok=e=>zw.test(e)&&!Fw.test(e),ak=()=>!1,ik=e=>Vw.test(e),sk=e=>Bw.test(e),lk=Lw(()=>{const e=Dw("colors"),t=Dw("spacing"),n=Dw("blur"),r=Dw("brightness"),o=Dw("borderColor"),a=Dw("borderRadius"),i=Dw("borderSpacing"),s=Dw("borderWidth"),l=Dw("contrast"),u=Dw("grayscale"),c=Dw("hueRotate"),d=Dw("invert"),f=Dw("gap"),p=Dw("gradientColorStops"),h=Dw("gradientColorStopPositions"),m=Dw("inset"),g=Dw("margin"),v=Dw("opacity"),y=Dw("padding"),b=Dw("saturate"),x=Dw("scale"),w=Dw("sepia"),k=Dw("skew"),S=Dw("space"),E=Dw("translate"),j=()=>["auto",qw,t],C=()=>[qw,t],P=()=>["",$w,Uw],N=()=>["auto",Ww,qw],T=()=>["","0",qw],M=()=>[Ww,qw];return{cacheSize:500,separator:":",theme:{colors:[nk],spacing:[$w,Uw],blur:["none","",Kw,qw],brightness:M(),borderColor:[e],borderRadius:["none","","full",Kw,qw],borderSpacing:C(),borderWidth:P(),contrast:M(),grayscale:T(),hueRotate:M(),invert:T(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[Yw,Uw],inset:j(),margin:j(),opacity:M(),padding:C(),saturate:M(),scale:M(),sepia:T(),skew:M(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",qw]}],container:["container"],columns:[{columns:[Kw]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"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"],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:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",qw]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Gw,qw]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",qw]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",Gw,qw]}],"grid-cols":[{"grid-cols":[nk]}],"col-start-end":[{col:["auto",{span:["full",Gw,qw]},qw]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[nk]}],"row-start-end":[{row:["auto",{span:[Gw,qw]},qw]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",qw]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",qw]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",qw,t]}],"min-w":[{"min-w":[qw,t,"min","max","fit"]}],"max-w":[{"max-w":[qw,t,"none","full","min","max","fit","prose",{screen:[Kw]},Kw]}],h:[{h:[qw,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[qw,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[qw,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[qw,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Kw,Uw]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Hw]}],"font-family":[{font:[nk]}],"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:["tighter","tight","normal","wide","wider","widest",qw]}],"line-clamp":[{"line-clamp":["none",Ww,Hw]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$w,qw]}],"list-image":[{"list-image":["none",qw]}],"list-style-type":[{list:["none","disc","decimal",qw]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$w,Uw]}],"underline-offset":[{"underline-offset":["auto",$w,qw]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qw]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",qw]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Zw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Qw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ek]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[$w,qw]}],"outline-w":[{outline:[$w,Uw]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[$w,Uw]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Kw,tk]}],"shadow-color":[{shadow:[nk]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Kw,qw]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",qw]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",qw]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",qw]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Gw,qw]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",qw]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",qw]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",qw]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$w,Uw,Hw]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function uk(...e){return lk(gw(e))}const ck=W.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:uk("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));ck.displayName="Card";const dk=W.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:uk("flex flex-col space-y-1.5 p-6",e),...t}));dk.displayName="CardHeader";const fk=W.forwardRef(({className:e,...t},n)=>ee.jsx("h3",{ref:n,className:uk("text-2xl font-semibold leading-none tracking-tight",e),...t}));fk.displayName="CardTitle";const pk=W.forwardRef(({className:e,...t},n)=>ee.jsx("p",{ref:n,className:uk("text-sm text-muted-foreground",e),...t}));pk.displayName="CardDescription";const hk=W.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:uk("p-6 pt-0",e),...t}));hk.displayName="CardContent";const mk=W.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:uk("flex items-center p-6 pt-0",e),...t}));function gk(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function vk(...e){return t=>{let n=!1;const r=e.map(e=>{const r=gk(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():gk(e[t],null)}}}}function yk(...e){return W.useCallback(vk(...e),e)}mk.displayName="CardFooter";var bk=Symbol.for("react.lazy"),xk=G[" use ".trim().toString()];function wk(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===bk&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function kk(e){const t=Ek(e),n=W.forwardRef((e,n)=>{let{children:r,...o}=e;wk(r)&&"function"==typeof xk&&(r=xk(r._payload));const a=W.Children.toArray(r),i=a.find(Ck);if(i){const e=i.props.children,r=a.map(t=>t===i?W.Children.count(e)>1?W.Children.only(null):W.isValidElement(e)?e.props.children:null:t);return ee.jsx(t,{...o,ref:n,children:W.isValidElement(e)?W.cloneElement(e,void 0,r):null})}return ee.jsx(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var Sk=kk("Slot");function Ek(e){const t=W.forwardRef((e,t)=>{let{children:n,...r}=e;if(wk(n)&&"function"==typeof xk&&(n=xk(n._payload)),W.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==W.Fragment&&(o.ref=t?vk(t,e):e),W.cloneElement(n,o)}return W.Children.count(n)>1?W.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jk=Symbol("radix.slottable");function Ck(e){return W.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===jk}const Pk=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Nk=gw,Tk=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return Nk(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const i=Pk(t)||Pk(r);return o[e][i]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]);return Nk(e,i,l,null==n?void 0:n.class,null==n?void 0:n.className)},Mk=Tk("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Rk=W.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const i=r?Sk:"button";return ee.jsx(i,{className:uk(Mk({variant:t,size:n,className:e})),ref:a,...o})});Rk.displayName="Button";const Lk=W.forwardRef(({className:e,type:t,...n},r)=>ee.jsx("input",{type:t,className:uk("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));Lk.displayName="Input";var Dk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=kk(`Primitive.${t}`),r=W.forwardRef((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),ee.jsx(i,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),_k=W.forwardRef((e,t)=>ee.jsx(Dk.label,{...e,ref:t,onMouseDown:t=>{var n;t.target.closest("button, input, select, textarea")||(null==(n=e.onMouseDown)||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));_k.displayName="Label";var Ak=_k;const Ok=Tk("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ik=W.forwardRef(({className:e,...t},n)=>ee.jsx(Ak,{ref:n,className:uk(Ok(),e),...t}));Ik.displayName=Ak.displayName;const zk=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach(n=>n(t,e))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>i,subscribe:e=>(n.add(e),()=>n.delete(e))},i=t=e(r,o,a);return a},Fk=e=>e;const Vk=e=>{const t=(e=>e?zk(e):zk)(e),n=e=>function(e,t=Fk){const n=H.useSyncExternalStore(e.subscribe,H.useCallback(()=>t(e.getState()),[e,t]),H.useCallback(()=>t(e.getInitialState()),[e,t]));return H.useDebugValue(n),n}(t,e);return Object.assign(n,t),n},Bk=e=>e?Vk(e):Vk,$k={token:"cc_web_token",theme:"cc_web_theme",viewMode:e=>`cc_viewmode_${e}`,panelFileTree:"cc_panel_filetree",panelShortcuts:"cc_panel_shortcuts",fileZoom:"cc_file_zoom",skillhubAuthor:"ccweb_skillhub_author",projectOrder:"cc_project_order",pomodoroConfig:"cc_pomodoro_config",panelLeftWidth:"cc_panel_left_width",panelRightWidth:"cc_panel_right_width",terminalDraft:e=>`cc_terminal_draft_${e}`,usedSkills:"cc_used_skills",usedShortcuts:e=>`cc_used_shortcuts_${e}`,projectModel:e=>`cc_project_model_${e}`,draftState:e=>`cc_draft_state_${e}`,usageMonitorTool:"cc_usage_monitor_tool",monitorMode:"cc_monitor_mode",chatOverlay:e=>`cc_chat_overlay_${e}`,rightPanelTab:"cc_right_panel_tab",leftPanelTab:"cc_left_panel_tab"};function Uk(e,t,n){try{const r=localStorage.getItem(e);return null===r?t:n?JSON.parse(r):r}catch{return t}}function Wk(e,t,n){try{localStorage.setItem(e,n?JSON.stringify(t):String(t))}catch{}}function Hk(e){try{localStorage.removeItem(e)}catch{}}function Gk(e,t,n){const r=(null==n?void 0:n.parse)??!1,[o,a]=W.useState(()=>{try{const n=localStorage.getItem(e);return null===n?t:r?JSON.parse(n):n}catch{return t}});return[o,W.useCallback(t=>{a(n=>{const o="function"==typeof t?t(n):t;try{localStorage.setItem(e,r?JSON.stringify(o):String(o))}catch{}return o})},[e,r])]}const Yk=Bk(e=>({token:localStorage.getItem($k.token),setToken:t=>{Wk($k.token,t),e({token:t})},clearToken:()=>{Hk($k.token),e({token:null})}}));let qk=null;const Kk=Bk((e,t)=>({projects:[],loading:!1,error:null,hasFetched:!1,fetchProjects:async()=>{if(!t().loading){e({loading:!0,error:null});try{const t=await async function(){if(!qk){const e=await fd(()=>Promise.resolve().then(()=>DE),void 0);qk=e.getProjects}return qk()}();e({projects:t,hasFetched:!0})}catch(n){e({error:n instanceof Error?n.message:"Failed to load projects"})}finally{e({loading:!1})}}},addProject:t=>e(e=>({projects:[...e.projects,t]})),updateProject:t=>e(e=>({projects:e.projects.map(e=>e.id===t.id?t:e)})),removeProject:t=>e(e=>({projects:e.projects.filter(e=>e.id!==t)})),setProjects:t=>e({projects:t})})),Xk={filePreviewPath:null,shortcutEditorOpen:!1,shortcutEditingId:null,shareHubOpen:!1,shareHubLabel:"",shareHubCommand:""},Qk=Bk((e,t)=>({entries:{},get:e=>t().entries[e]??Xk,setFilePreviewPath:(t,n)=>e(e=>({entries:{...e.entries,[t]:{...e.entries[t]??Xk,filePreviewPath:n}}})),setShortcutEditor:(t,n,r=null)=>e(e=>({entries:{...e.entries,[t]:{...e.entries[t]??Xk,shortcutEditorOpen:n,shortcutEditingId:n?r:null}}})),setShareHub:(t,n,r="",o="")=>e(e=>({entries:{...e.entries,[t]:{...e.entries[t]??Xk,shareHubOpen:n,shareHubLabel:n?r:"",shareHubCommand:n?o:""}}}))}));function Zk(){return Yk.getState().token}function Jk(){Yk.getState().clearToken()}async function eS(e,t,n,r=!0,o){const a={"Content-Type":"application/json"};if(r){const e=Zk();e&&(a.Authorization=`Bearer ${e}`)}const i=await fetch(`${t}`,{method:e,headers:a,body:void 0!==n?JSON.stringify(n):void 0,signal:o});if(401===i.status)throw Jk(),"/login"!==window.location.pathname&&(window.location.href="/login"),new Error("Unauthorized");if(!i.ok){let e=`HTTP ${i.status}`;try{const t=await i.json();t.error&&(e=t.error)}catch{}throw new Error(e)}return i.json()}async function tS(e,t){return(await eS("POST","/api/auth/login",{username:e,password:t},!1)).token}function nS(){const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"::1"===e}async function rS(){return(await eS("GET","/api/auth/local-token",void 0,!1)).token}async function oS(){return(await eS("GET","/api/projects/order")).order}async function aS(e){await eS("PUT","/api/projects/order",{order:e})}async function iS(){return eS("GET","/api/projects/users")}async function sS(e,t){return eS("PUT",`/api/projects/${e}/shares`,{shares:t})}async function lS(e){return eS("POST","/api/projects",e)}async function uS(e){return eS("POST","/api/projects/open",{folderPath:e})}async function cS(e){await eS("DELETE",`/api/projects/${e}`)}async function dS(e){return eS("PATCH",`/api/projects/${e}/start`)}async function fS(e){return eS("PATCH",`/api/projects/${e}/archive`)}async function pS(e){return eS("PATCH",`/api/projects/${e}/unarchive`)}async function hS(){return eS("GET","/api/shortcuts")}async function mS(e){return eS("POST","/api/shortcuts",e)}async function gS(e,t){return eS("PUT",`/api/shortcuts/${e}`,t)}async function vS(e){await eS("DELETE",`/api/shortcuts/${e}`)}async function yS(e){return eS("GET",`/api/shortcuts/project/${e}`)}async function bS(e,t){return eS("POST",`/api/shortcuts/project/${e}`,t)}async function xS(e,t,n){return eS("PUT",`/api/shortcuts/project/${e}/${t}`,n)}async function wS(e,t){await eS("DELETE",`/api/shortcuts/project/${e}/${t}`)}async function kS(){return eS("GET","/api/prompts")}async function SS(e){return eS("POST","/api/prompts",e)}async function ES(e,t){return eS("PUT",`/api/prompts/${e}`,t)}async function jS(e){await eS("DELETE",`/api/prompts/${e}`)}async function CS(e){return eS("GET",`/api/prompts/project/${e}`)}async function PS(e,t){return eS("POST",`/api/prompts/project/${e}`,t)}async function NS(e,t,n){return eS("PUT",`/api/prompts/project/${e}/${t}`,n)}async function TS(e,t){await eS("DELETE",`/api/prompts/project/${e}/${t}`)}async function MS(e){return eS("GET",`/api/memory/project/${encodeURIComponent(e)}`)}async function RS(e,t,n){return eS("POST",`/api/memory/project/${encodeURIComponent(e)}/toggle`,{filename:t,action:n})}async function LS(e,t,n){return eS("POST",`/api/prompts/project/${e}/toggle`,{text:t,action:n})}async function DS(){return eS("GET","/api/skillhub/items")}async function _S(){return eS("GET","/api/skillhub/auth")}async function AS(e){return eS("PUT","/api/skillhub/auth",{token:e})}async function OS(){await eS("DELETE","/api/skillhub/auth")}async function IS(e){return eS("POST","/api/skillhub/submit",e)}async function zS(e="claude"){return eS("GET",`/api/projects/usage?tool=${encodeURIComponent(e)}`)}async function FS(e="claude"){return eS("GET",`/api/projects/usage?refresh=true&tool=${encodeURIComponent(e)}`)}async function VS(e){return eS("GET",`/api/filesystem${e?`?path=${encodeURIComponent(e)}`:""}`)}function BS(e){return`/api/filesystem/raw?path=${encodeURIComponent(e)}`}async function $S(e,t){const n=new FormData;n.append("path",e);for(const i of t)n.append("files",i);const r={},o=Zk();o&&(r.Authorization=`Bearer ${o}`);const a=await fetch("/api/filesystem/upload",{method:"POST",headers:r,body:n});if(!a.ok){const e=await a.json().catch(()=>({}));throw new Error(e.error||`Upload failed: ${a.status}`)}return a.json()}async function US(e,t){return eS("POST","/api/filesystem/mkdir",{path:e,name:t})}async function WS(e){return eS("GET",`/api/filesystem/file?path=${encodeURIComponent(e)}`)}async function HS(e,t){return eS("PUT","/api/filesystem/file",{path:e,content:t})}async function GS(e){return eS("DELETE",`/api/filesystem?path=${encodeURIComponent(e)}`)}async function YS(){return eS("GET","/api/update/check-version")}async function qS(){return eS("POST","/api/update/execute")}async function KS(){return eS("GET","/api/update/status")}async function XS(){return eS("GET","/api/backup/built-in-oauth")}async function QS(){return eS("GET","/api/backup/providers")}async function ZS(e){return eS("POST","/api/backup/providers",e)}async function JS(e){await eS("DELETE",`/api/backup/providers/${e}`)}async function eE(e){return eS("GET",`/api/backup/auth/${e}/url`)}async function tE(e){return eS("POST",`/api/backup/run/${e}`)}async function nE(){return eS("GET","/api/backup/schedule")}async function rE(e){return eS("PUT","/api/backup/schedule",e)}async function oE(){return eS("GET","/api/backup/excludes")}async function aE(e){return eS("PUT","/api/backup/excludes",{patterns:e})}async function iE(){return eS("GET","/api/backup/history")}async function sE(){return eS("GET","/api/notify/config")}async function lE(e){return eS("PUT","/api/notify/config",e)}async function uE(e){return eS("GET",`/api/projects/${e}/git/status`)}async function cE(e,t){return eS("GET",`/api/projects/${e}/git/diff${t?`?file=${encodeURIComponent(t)}`:""}`)}async function dE(e,t){await eS("POST",`/api/projects/${e}/git/add`,{files:t})}async function fE(e,t){await eS("POST",`/api/projects/${e}/git/commit`,{message:t})}async function pE(e,t=50,n=0){return eS("GET",`/api/projects/${e}/git/log?limit=${t}&skip=${n}`)}async function hE(e,t){return eS("PATCH",`/api/projects/${e}/rename`,{name:t})}async function mE(e,t={}){const n=new URLSearchParams;null!=t.limit&&n.set("limit",String(t.limit)),t.before&&n.set("before",t.before);const r=n.toString();return eS("GET",`/api/projects/${e}/chat-history${r?"?"+r:""}`)}async function gE(e){return eS("GET",`/api/projects/${e}/disk-size`)}async function vE(e){return eS("GET",`/api/tool/model?tool=${encodeURIComponent(e)}`)}async function yE(e,t){return eS("PUT",`/api/tool/model?tool=${encodeURIComponent(e)}`,{model:t})}async function bE(e){return eS("GET",`/api/tool/models?tool=${encodeURIComponent(e)}`)}async function xE(e,t){return eS("GET",`/api/tool/skills${t?`?tool=${encodeURIComponent(e)}&projectId=${encodeURIComponent(t)}`:`?tool=${encodeURIComponent(e)}`}`)}async function wE(){return eS("GET","/api/plugins")}async function kE(e){return eS("POST","/api/plugins/install",{downloadUrl:e})}async function SE(e){await eS("DELETE",`/api/plugins/${e}`)}async function EE(e,t){return eS("PUT",`/api/plugins/${e}/config`,t)}async function jE(e,t){await eS("PUT",`/api/plugins/${e}/enabled`,{enabled:t})}async function CE(e){return eS("GET",`/api/approval/${encodeURIComponent(e)}/pending`)}async function PE(e,t,n,r){return eS("POST",`/api/approval/${encodeURIComponent(e)}/${encodeURIComponent(t)}/decide`,{behavior:n,message:r})}async function NE(){return eS("GET","/api/sync/config")}async function TE(e){return eS("PUT","/api/sync/config",e)}async function ME(){return eS("POST","/api/sync/test")}async function RE(e,t){return eS("POST",`/api/sync/project/${encodeURIComponent(e)}`,t?{direction:t}:{})}async function LE(){return eS("POST","/api/sync/all")}const DE=Object.freeze(Object.defineProperty({__proto__:null,addBackupProvider:ZS,archiveProject:fS,browseFilesystem:VS,checkRunningProjects:async function(){return eS("GET","/api/update/check-running")},checkVersion:YS,clearHubToken:OS,clearToken:Jk,createFolder:US,createGlobalPrompt:SS,createGlobalShortcut:mS,createProject:lS,createProjectPrompt:PS,createProjectShortcut:bS,decideApproval:PE,deleteBackupProvider:JS,deleteGlobalPrompt:jS,deleteGlobalShortcut:vS,deletePath:GS,deleteProject:cS,deleteProjectPrompt:TS,deleteProjectShortcut:wS,executeUpdate:qS,getAllUsers:iS,getBackupAuthUrl:eE,getBackupExcludes:oE,getBackupHistory:iE,getBackupProviders:QS,getBackupSchedule:nE,getBuiltInOAuthTypes:XS,getChatHistory:mE,getClaudeModel:async function(){return eS("GET","/api/claude/model")},getClaudeSkills:async function(){return eS("GET","/api/claude/skills")},getGitDiff:cE,getGitLog:pE,getGitStatus:uE,getGlobalPrompts:kS,getGlobalShortcuts:hS,getHubAuthStatus:_S,getHubItems:DS,getInstalledPlugins:wE,getLocalToken:rS,getMemoryPrompts:MS,getNotifyConfig:sE,getPendingApprovals:CE,getProjectDiskSize:gE,getProjectOrder:oS,getProjectPrompts:CS,getProjectShortcuts:yS,getProjects:async function(){return eS("GET","/api/projects")},getProjectsActivity:async function(e){return eS("GET","/api/projects/activity",void 0,!0,e)},getRawFileUrl:BS,getSyncConfig:NE,getSyncStatus:async function(){return eS("GET","/api/sync/status")},getToken:Zk,getToolModel:vE,getToolModels:bE,getToolSkills:xE,getUpdateStatus:KS,getUsage:zS,getWorkspace:async function(){return(await eS("GET","/api/projects/workspace")).workspace},gitAdd:dE,gitCommit:fE,installPlugin:kE,isLocalAccess:nS,login:tS,openProject:uS,prepareForUpdate:async function(){return eS("POST","/api/update/prepare")},readFile:WS,refreshUsage:FS,renameProject:hE,resetSyncConfig:async function(){return eS("POST","/api/sync/reset")},setHubToken:AS,setPluginEnabled:jE,setProjectOrder:aS,setToken:function(e){var t;t=e,Yk.getState().setToken(t)},setToolModel:yE,startProject:dS,stopProject:async function(e){return eS("PATCH",`/api/projects/${e}/stop`)},submitToHub:IS,syncAll:LE,syncProjectOnce:RE,testSyncConnection:ME,toggleMemoryInClaudeMd:RS,togglePromptInClaudeMd:LS,triggerBackup:tE,unarchiveProject:pS,uninstallPlugin:SE,updateBackupExcludes:aE,updateBackupSchedule:rE,updateGlobalPrompt:ES,updateGlobalShortcut:gS,updateNotifyConfig:lE,updatePlugin:async function(e,t){return eS("POST",`/api/plugins/${e}/update`,{downloadUrl:t})},updatePluginConfig:EE,updateProjectPrompt:NS,updateProjectShares:sS,updateProjectShortcut:xS,updateProjectTags:async function(e,t){return eS("PATCH",`/api/projects/${e}/tags`,{tags:t})},updateSyncConfig:TE,uploadFiles:$S,writeFile:HS},Symbol.toStringTag,{value:"Module"}));function _E(){const e=cf(),t=Yk(e=>e.setToken),[n,r]=W.useState(""),[o,a]=W.useState(""),[i,s]=W.useState(null),[l,u]=W.useState(!1);W.useEffect(()=>{if(!nS())return;let n=!1;return(async()=>{try{const r=await rS();n||(t(r),e("/",{replace:!0}))}catch{}})(),()=>{n=!0}},[e,t]);return ee.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:ee.jsx(hw.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,ease:"easeOut"},className:"w-full max-w-sm",children:ee.jsxs(ck,{children:[ee.jsxs(dk,{className:"text-center",children:[ee.jsx(fk,{className:"text-2xl",children:"CC Web"}),ee.jsx(pk,{children:nS()?"Connecting locally...":"Sign in to manage your Claude projects"})]}),ee.jsxs("form",{onSubmit:r=>{(async r=>{r.preventDefault(),s(null),u(!0);try{const r=await tS(n,o);t(r),e("/")}catch(a){s(a instanceof Error?a.message:"Login failed")}finally{u(!1)}})(r)},children:[ee.jsxs(hk,{className:"space-y-4",children:[ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ik,{htmlFor:"username",children:"Username"}),ee.jsx(Lk,{id:"username",type:"text",autoComplete:"username",value:n,onChange:e=>r(e.target.value),required:!0,autoFocus:!0})]}),ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ik,{htmlFor:"password",children:"Password"}),ee.jsx(Lk,{id:"password",type:"password",autoComplete:"current-password",value:o,onChange:e=>a(e.target.value),required:!0})]}),ee.jsx(Xb,{children:i&&ee.jsx(hw.p,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.2},className:"text-sm text-destructive",children:i})})]}),ee.jsx(mk,{children:ee.jsx(hw.div,{className:"w-full",whileTap:{scale:.98},children:ee.jsx(Rk,{type:"submit",className:"w-full",disabled:l,children:l?"Signing in...":"Sign In"})})})]})]})})})}
63
+ */function Cf(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}new Promise(()=>{});try{window.__reactRouterVersion="6"}catch(bT){}const Pf=G.startTransition;function Nf(e){let{basename:t,children:n,future:r,window:o}=e,a=W.useRef();null==a.current&&(a.current=vd({window:o,v5Compat:!0}));let i=a.current,[s,l]=W.useState({action:i.action,location:i.location}),{v7_startTransition:u}=r||{},c=W.useCallback(e=>{u&&Pf?Pf(()=>l(e)):l(e)},[l,u]);return W.useLayoutEffect(()=>i.listen(c),[i,c]),W.useEffect(()=>{return null==(e=r)||e.v7_startTransition,void(null==e||e.v7_relativeSplatPath);var e},[r]),W.createElement(Sf,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:i,future:r})}var Tf,Mf,Rf,Lf;function Df(e){let t=W.useRef(Cf(e)),n=W.useRef(!1),r=lf(),o=W.useMemo(()=>function(e,t){let n=Cf(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}(r.search,n.current?null:t.current),[r.search]),a=cf(),i=W.useCallback((e,t)=>{const r=Cf("function"==typeof e?e(o):e);n.current=!0,a("?"+r,t)},[a,o]);return[o,i]}(Mf=Tf||(Tf={})).UseScrollRestoration="useScrollRestoration",Mf.UseSubmit="useSubmit",Mf.UseSubmitFetcher="useSubmitFetcher",Mf.UseFetcher="useFetcher",Mf.useViewTransitionState="useViewTransitionState",(Lf=Rf||(Rf={})).UseFetcher="useFetcher",Lf.UseFetchers="useFetchers",Lf.UseScrollRestoration="useScrollRestoration";const _f=W.createContext({});function Af(e){const t=W.useRef(null);return null===t.current&&(t.current=e()),t.current}const Of="undefined"!=typeof window?W.useLayoutEffect:W.useEffect,If=W.createContext(null);function zf(e,t){-1===e.indexOf(t)&&e.push(t)}function Ff(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Vf=(e,t,n)=>n>t?t:n<e?e:n;const $f={},Bf=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Uf(e){return"object"==typeof e&&null!==e}const Wf=e=>/^0[^.\s]+$/u.test(e);function Hf(e){let t;return()=>(void 0===t&&(t=e()),t)}const Gf=e=>e,Yf=(e,t)=>n=>t(e(n)),qf=(...e)=>e.reduce(Yf),Kf=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};class Xf{constructor(){this.subscriptions=[]}add(e){return zf(this.subscriptions,e),()=>Ff(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Qf=e=>1e3*e,Zf=e=>e/1e3;function Jf(e,t){return t?e*(1e3/t):0}const ep=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function tp(e,t,n,r){if(e===t&&n===r)return Gf;const o=t=>function(e,t,n,r,o){let a,i,s=0;do{i=t+(n-t)/2,a=ep(i,r,o)-e,a>0?n=i:t=i}while(Math.abs(a)>1e-7&&++s<12);return i}(t,0,1,e,n);return e=>0===e||1===e?e:ep(o(e),t,r)}const np=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,rp=e=>t=>1-e(1-t),op=tp(.33,1.53,.69,.99),ap=rp(op),ip=np(ap),sp=e=>e>=1?1:(e*=2)<1?.5*ap(e):.5*(2-Math.pow(2,-10*(e-1))),lp=e=>1-Math.sin(Math.acos(e)),up=rp(lp),cp=np(lp),dp=tp(.42,0,1,1),fp=tp(0,0,.58,1),pp=tp(.42,0,.58,1),hp=e=>Array.isArray(e)&&"number"==typeof e[0],mp={linear:Gf,easeIn:dp,easeInOut:pp,easeOut:fp,circIn:lp,circInOut:cp,circOut:up,backIn:ap,backInOut:ip,backOut:op,anticipate:sp},gp=e=>{if(hp(e)){e.length;const[t,n,r,o]=e;return tp(t,n,r,o)}return"string"==typeof e?mp[e]:e},vp=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function yp(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,i=vp.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,o=!1;const a=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(l.schedule(t),e()),t(i)}const l={schedule:(e,o=!1,i=!1)=>{const s=i&&r?t:n;return o&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(i=e,r)return void(o=!0);r=!0;const a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,o&&(o=!1,l.process(e))}};return l}(a),e),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:p,postRender:h}=i,m=()=>{const a=$f.useManualTiming,i=a?o.timestamp:performance.now();n=!1,a||(o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1)),o.timestamp=i,o.isProcessing=!0,s.process(o),l.process(o),u.process(o),c.process(o),d.process(o),f.process(o),p.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))};return{schedule:vp.reduce((t,a)=>{const s=i[a];return t[a]=(t,a=!1,i=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(m)),s.schedule(t,a,i)),t},{}),cancel:e=>{for(let t=0;t<vp.length;t++)i[vp[t]].cancel(e)},state:o,steps:i}}const{schedule:bp,cancel:xp,state:wp,steps:kp}=yp("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Gf,!0);let Sp;function Ep(){Sp=void 0}const jp={now:()=>(void 0===Sp&&jp.set(wp.isProcessing||$f.useManualTiming?wp.timestamp:performance.now()),Sp),set:e=>{Sp=e,queueMicrotask(Ep)}},Cp=e=>t=>"string"==typeof t&&t.startsWith(e),Pp=Cp("--"),Np=Cp("var(--"),Tp=e=>!!Np(e)&&Mp.test(e.split("/*")[0].trim()),Mp=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Rp(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}const Lp={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Dp={...Lp,transform:e=>Vf(0,1,e)},_p={...Lp,default:1},Ap=e=>Math.round(1e5*e)/1e5,Op=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const Ip=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,zp=(e,t)=>n=>Boolean("string"==typeof n&&Ip.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Fp=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,a,i,s]=r.match(Op);return{[e]:parseFloat(o),[t]:parseFloat(a),[n]:parseFloat(i),alpha:void 0!==s?parseFloat(s):1}},Vp={...Lp,transform:e=>Math.round((e=>Vf(0,255,e))(e))},$p={test:zp("rgb","red"),parse:Fp("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Vp.transform(e)+", "+Vp.transform(t)+", "+Vp.transform(n)+", "+Ap(Dp.transform(r))+")"};const Bp={test:zp("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:$p.transform},Up=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Wp=Up("deg"),Hp=Up("%"),Gp=Up("px"),Yp=Up("vh"),qp=Up("vw"),Kp=(()=>({...Hp,parse:e=>Hp.parse(e)/100,transform:e=>Hp.transform(100*e)}))(),Xp={test:zp("hsl","hue"),parse:Fp("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Hp.transform(Ap(t))+", "+Hp.transform(Ap(n))+", "+Ap(Dp.transform(r))+")"},Qp={test:e=>$p.test(e)||Bp.test(e)||Xp.test(e),parse:e=>$p.test(e)?$p.parse(e):Xp.test(e)?Xp.parse(e):Bp.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?$p.transform(e):Xp.transform(e),getAnimatableNone:e=>{const t=Qp.parse(e);return t.alpha=0,Qp.transform(t)}},Zp=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const Jp="number",eh="color",th=/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 nh(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let a=0;const i=t.replace(th,e=>(Qp.test(e)?(r.color.push(a),o.push(eh),n.push(Qp.parse(e))):e.startsWith("var(")?(r.var.push(a),o.push("var"),n.push(e)):(r.number.push(a),o.push(Jp),n.push(parseFloat(e))),++a,"${}")).split("${}");return{values:n,split:i,indexes:r,types:o}}function rh({split:e,types:t}){const n=e.length;return r=>{let o="";for(let a=0;a<n;a++)if(o+=e[a],void 0!==r[a]){const e=t[a];o+=e===Jp?Ap(r[a]):e===eh?Qp.transform(r[a]):r[a]}return o}}const oh=(e,t)=>{return"number"==typeof e?(null==t?void 0:t.trim().endsWith("/"))?e:0:"number"==typeof(n=e)?0:Qp.test(n)?Qp.getAnimatableNone(n):n;var n};const ah={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null==(t=e.match(Op))?void 0:t.length)||0)+((null==(n=e.match(Zp))?void 0:n.length)||0)>0},parse:function(e){return nh(e).values},createTransformer:function(e){return rh(nh(e))},getAnimatableNone:function(e){const t=nh(e);return rh(t)(t.values.map((e,n)=>oh(e,t.split[n])))}};function ih(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function sh(e,t){return n=>n>0?t:e}const lh=(e,t,n)=>e+(t-e)*n,uh=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},ch=[Bp,$p,Xp];function dh(e){const t=(n=e,ch.find(e=>e.test(n)));var n;if(!Boolean(t))return!1;let r=t.parse(e);return t===Xp&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,a=0,i=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=ih(s,r,e+1/3),a=ih(s,r,e),i=ih(s,r,e-1/3)}else o=a=i=n;return{red:Math.round(255*o),green:Math.round(255*a),blue:Math.round(255*i),alpha:r}}(r)),r}const fh=(e,t)=>{const n=dh(e),r=dh(t);if(!n||!r)return sh(e,t);const o={...n};return e=>(o.red=uh(n.red,r.red,e),o.green=uh(n.green,r.green,e),o.blue=uh(n.blue,r.blue,e),o.alpha=lh(n.alpha,r.alpha,e),$p.transform(o))},ph=new Set(["none","hidden"]);function hh(e,t){return n=>lh(e,t,n)}function mh(e){return"number"==typeof e?hh:"string"==typeof e?Tp(e)?sh:Qp.test(e)?fh:yh:Array.isArray(e)?gh:"object"==typeof e?Qp.test(e)?fh:vh:sh}function gh(e,t){const n=[...e],r=n.length,o=e.map((e,n)=>mh(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function vh(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=mh(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const yh=(e,t)=>{const n=ah.createTransformer(t),r=nh(e),o=nh(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?ph.has(e)&&!o.values.length||ph.has(t)&&!r.values.length?function(e,t){return ph.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):qf(gh(function(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],i=e.indexes[a][r[a]],s=e.values[i]??0;n[o]=s,r[a]++}return n}(r,o),o.values),n):sh(e,t)};function bh(e,t,n){if("number"==typeof e&&"number"==typeof t&&"number"==typeof n)return lh(e,t,n);return mh(e)(e,t)}const xh=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>bp.update(t,e),stop:()=>xp(t),now:()=>wp.isProcessing?wp.timestamp:jp.now()}},wh=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let a=0;a<o;a++)r+=Math.round(1e4*e(a/(o-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},kh=2e4;function Sh(e){let t=0;let n=e.next(t);for(;!n.done&&t<kh;)t+=50,n=e.next(t);return t>=kh?1/0:t}const Eh=100,jh=10,Ch=1,Ph=0,Nh=800,Th=.3,Mh=.3,Rh={granular:.01,default:2},Lh={granular:.005,default:.5},Dh=.01,_h=10,Ah=.05,Oh=1;function Ih(e,t){return e*Math.sqrt(1-t*t)}const zh=.001;const Fh=["duration","bounce"],Vh=["stiffness","damping","mass"];function $h(e,t){return t.some(t=>void 0!==e[t])}function Bh(e){let t={velocity:Ph,stiffness:Eh,damping:jh,mass:Ch,isResolvedFromDuration:!1,...e};if(!$h(e,Vh)&&$h(e,Fh))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),o=r*r,a=2*Vf(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:Ch,stiffness:o,damping:a}}else{const n=function({duration:e=Nh,bounce:t=Th,velocity:n=Ph,mass:r=Ch}){let o,a,i=1-t;i=Vf(Ah,Oh,i),e=Vf(Dh,_h,Zf(e)),i<1?(o=t=>{const r=t*i,o=r*e,a=r-n,s=Ih(t,i),l=Math.exp(-o);return zh-a/s*l},a=t=>{const r=t*i*e,a=r*n+n,s=Math.pow(i,2)*Math.pow(t,2)*e,l=Math.exp(-r),u=Ih(Math.pow(t,2),i);return(-o(t)+zh>0?-1:1)*((a-s)*l)/u}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let o=1;o<12;o++)r-=e(r)/t(r);return r}(o,a,5/e);if(e=Qf(e),isNaN(s))return{stiffness:Eh,damping:jh,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*i*Math.sqrt(r*t),duration:e}}}({...e,velocity:0});t={...t,...n,mass:Ch},t.isResolvedFromDuration=!0}return t}function Uh(e=Mh,t=Th){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const a=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:p}=Bh({...n,velocity:-Zf(n.velocity||0)}),h=f||0,m=u/(2*Math.sqrt(l*c)),g=i-a,v=Zf(Math.sqrt(l/c)),y=Math.abs(g)<5;let b,x,w,k,S,E;if(r||(r=y?Rh.granular:Rh.default),o||(o=y?Lh.granular:Lh.default),m<1)w=Ih(v,m),k=(h+m*v*g)/w,b=e=>{const t=Math.exp(-m*v*e);return i-t*(k*Math.sin(w*e)+g*Math.cos(w*e))},S=m*v*k+g*w,E=m*v*g-k*w,x=e=>Math.exp(-m*v*e)*(S*Math.sin(w*e)+E*Math.cos(w*e));else if(1===m){b=e=>i-Math.exp(-v*e)*(g+(h+v*g)*e);const e=h+v*g;x=t=>Math.exp(-v*t)*(v*e*t-h)}else{const e=v*Math.sqrt(m*m-1);b=t=>{const n=Math.exp(-m*v*t),r=Math.min(e*t,300);return i-n*((h+m*v*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};const t=(h+m*v*g)/e,n=m*v*t-g*e,r=m*v*g-t*e;x=t=>{const o=Math.exp(-m*v*t),a=Math.min(e*t,300);return o*(n*Math.sinh(a)+r*Math.cosh(a))}}const j={calculatedDuration:p&&d||null,velocity:e=>Qf(x(e)),next:e=>{if(!p&&m<1){const t=Math.exp(-m*v*e),n=Math.sin(w*e),a=Math.cos(w*e),l=i-t*(k*n+g*a),u=Qf(t*(S*n+E*a));return s.done=Math.abs(u)<=r&&Math.abs(i-l)<=o,s.value=s.done?i:l,s}const t=b(e);if(p)s.done=e>=d;else{const n=Qf(x(e));s.done=Math.abs(n)<=r&&Math.abs(i-t)<=o}return s.value=s.done?i:t,s},toString:()=>{const e=Math.min(Sh(j),kh),t=wh(t=>j.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return j}Uh.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Sh(r),kh);return{type:"keyframes",ease:e=>r.next(o*e).value/t,duration:Zf(o)}}(e,100,Uh);return e.ease=t.ease,e.duration=Qf(t.duration),e.type="keyframes",e};function Wh(e,t,n){const r=Math.max(t-5,0);return Jf(n-e(r),t-r)}function Hh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},p=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let h=n*t;const m=d+h,g=void 0===i?m:i(m);g!==m&&(h=g-d);const v=e=>-h*Math.exp(-e/r),y=e=>g+v(e),b=e=>{const t=v(e),n=y(e);f.done=Math.abs(t)<=u,f.value=f.done?g:n};let x,w;const k=e=>{var t;(t=f.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(x=e,w=Uh({keyframes:[f.value,p(f.value)],velocity:Wh(y,e,f.value),damping:o,stiffness:a,restDelta:u,restSpeed:c}))};return k(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),k(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),f)}}}function Gh(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const a=e.length;if(t.length,1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],o=n||$f.mix||bh,a=e.length-1;for(let i=0;i<a;i++){let n=o(e[i],e[i+1]);if(t){const e=Array.isArray(t)?t[i]||Gf:t;n=qf(e,n)}r.push(n)}return r}(t,r,o),l=s.length,u=n=>{if(i&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const o=Kf(e[r],e[r+1],n);return s[r](o)};return n?t=>u(Vf(e[0],e[a-1],t)):u}function Yh(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Kf(0,t,r);e.push(lh(n,1,o))}}(t,e.length-1),t}function qh({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(gp):gp(r),a={done:!1,value:t[0]},i=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:Yh(t),e),s=Gh(i,t,{ease:Array.isArray(o)?o:(l=t,u=o,l.map(()=>u||pp).splice(0,l.length-1))});var l,u;return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}const Kh=e=>null!==e;function Xh(e,{repeat:t,repeatType:n="loop"},r,o=1){const a=e.filter(Kh),i=o<0||t&&"loop"!==n&&t%2==1?0:a.length-1;return i&&void 0!==r?r:a[i]}const Qh={decay:Hh,inertia:Hh,tween:qh,keyframes:qh,spring:Uh};function Zh(e){"string"==typeof e.type&&(e.type=Qh[e.type])}class Jh{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)}}const em=e=>e/100;class tm extends Jh{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=()=>{var e,t;const{motionValue:n}=this.options;n&&n.updatedAt!==jp.now()&&this.tick(jp.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),null==(t=(e=this.options).onStop)||t.call(e))},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;Zh(e);const{type:t=qh,repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:a=0}=e;let{keyframes:i}=e;const s=t||qh;s!==qh&&"number"!=typeof i[0]&&(this.mixKeyframes=qf(em,bh(i[0],i[1])),i=[0,100]);const l=s({...e,keyframes:i});"mirror"===o&&(this.mirroredGenerator=s({...e,keyframes:[...i].reverse(),velocity:-a})),null===l.calculatedDuration&&(l.calculatedDuration=Sh(l));const{calculatedDuration:u}=l;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:o,mirroredGenerator:a,resolvedDuration:i,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:u,repeat:c,repeatType:d,repeatDelay:f,type:p,onUpdate:h,finalKeyframe:m}=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);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let y,b=this.currentTime,x=n;if(c){const e=Math.min(this.currentTime,r)/i;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,c+1);Boolean(t%2)&&("reverse"===d?(n=1-n,f&&(n-=f/i)):"mirror"===d&&(x=a)),b=Vf(0,1,n)*i}v?(this.delayState.value=u[0],y=this.delayState):y=x.next(b),o&&!v&&(y.value=o(y.value));let{done:w}=y;v||null===s||(w=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return k&&p!==Hh&&(y.value=Xh(u,this.options,m,this.speed)),h&&h(y.value),k&&this.finish(),y}then(e,t){return this.finished.then(e,t)}get duration(){return Zf(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Zf(e)}get time(){return Zf(this.currentTime)}set time(e){e=Qf(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?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(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);return Wh(e=>this.generator.next(e).value,e,this.generator.next(e).value)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(jp.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Zf(this.currentTime))}play(){var e,t;if(this.isStopped)return;const{driver:n=xh,startTime:r}=this.options;this.driver||(this.driver=n(e=>this.tick(e))),null==(t=(e=this.options).onPlay)||t.call(e);const o=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=o):null!==this.holdTime?this.startTime=o-this.holdTime:this.startTime||(this.startTime=r??o),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(jp.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,t;this.notifyFinished(),this.teardown(),this.state="finished",null==(t=(e=this.options).onComplete)||t.call(e)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),null==(t=(e=this.options).onCancel)||t.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),null==(t=this.driver)||t.stop(),e.observe(this)}}const nm=e=>180*e/Math.PI,rm=e=>{const t=nm(Math.atan2(e[1],e[0]));return am(t)},om={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:rm,rotateZ:rm,skewX:e=>nm(Math.atan(e[1])),skewY:e=>nm(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},am=e=>((e%=360)<0&&(e+=360),e),im=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),sm=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),lm={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:im,scaleY:sm,scale:e=>(im(e)+sm(e))/2,rotateX:e=>am(nm(Math.atan2(e[6],e[5]))),rotateY:e=>am(nm(Math.atan2(-e[2],e[0]))),rotateZ:rm,rotate:rm,skewX:e=>nm(Math.atan(e[4])),skewY:e=>nm(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function um(e){return e.includes("scale")?1:0}function cm(e,t){if(!e||"none"===e)return um(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=lm,o=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=om,o=t}if(!o)return um(t);const a=r[t],i=o[1].split(",").map(dm);return"function"==typeof a?a(i):i[a]}function dm(e){return parseFloat(e.trim())}const fm=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],pm=(()=>new Set(fm))(),hm=e=>e===Lp||e===Gp,mm=new Set(["x","y","z"]),gm=fm.filter(e=>!mm.has(e));const vm={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const o=e.max-e.min;return"border-box"===r?o:o-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const o=e.max-e.min;return"border-box"===r?o:o-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})=>cm(t,"x"),y:(e,{transform:t})=>cm(t,"y")};vm.translateX=vm.x,vm.translateY=vm.y;const ym=new Set;let bm=!1,xm=!1,wm=!1;function km(){if(xm){const e=Array.from(ym).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return gm.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{var r;null==(r=e.getValue(t))||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}xm=!1,bm=!1,ym.forEach(e=>e.complete(wm)),ym.clear()}function Sm(){ym.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(xm=!0)})}class Em{constructor(e,t,n,r,o,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=o,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(ym.add(this),bm||(bm=!0,bp.read(Sm),bp.resolveKeyframes(km))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const o=null==r?void 0:r.get(),a=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,a);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=a),r&&void 0===o&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ym.delete(this)}cancel(){"scheduled"===this.state&&(ym.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}function jm(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}const Cm={};function Pm(e,t){const n=Hf(e);return()=>Cm[t]??n()}const Nm=Pm(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Tm=Pm(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(bT){return!1}return!0},"linearEasing"),Mm=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Rm={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Mm([0,.65,.55,1]),circOut:Mm([.55,0,1,.45]),backIn:Mm([.31,.01,.66,-.59]),backOut:Mm([.33,1.53,.69,.99])};function Lm(e,t){return e?"function"==typeof e?Tm()?wh(e,t):"ease-out":hp(e)?Mm(e):Array.isArray(e)?e.map(e=>Lm(e,t)||Rm.easeOut):Rm[e]:void 0}function Dm(e,t,n,{delay:r=0,duration:o=300,repeat:a=0,repeatType:i="loop",ease:s="easeOut",times:l}={},u=void 0){const c={[t]:n};l&&(c.offset=l);const d=Lm(s,o);Array.isArray(d)&&(c.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===i?"alternate":"normal"};u&&(f.pseudoElement=u);return e.animate(c,f)}function _m(e){return"function"==typeof e&&"applyToOptions"in e}class Am extends Jh{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:o,allowFlatten:a=!1,finalKeyframe:i,onComplete:s}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=a,this.options=e,e.type;const l=function({type:e,...t}){return _m(e)&&Tm()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=Dm(t,n,r,l,o),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const e=Xh(r,this.options,i,this.speed);this.updateMotionValue&&this.updateMotionValue(e),jm(t,n,e),this.animation.cancel()}null==s||s(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,t;null==(t=(e=this.animation).finish)||t.call(e)}cancel(){try{this.animation.cancel()}catch(bT){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,t,n;const r=null==(e=this.options)?void 0:e.element;!this.isPseudoElement&&(null==r?void 0:r.isConnected)&&(null==(n=(t=this.animation).commitStyles)||n.call(t))}get duration(){var e,t;const n=(null==(t=null==(e=this.animation.effect)?void 0:e.getComputedTiming)?void 0:t.call(e).duration)||0;return Zf(Number(n))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Zf(e)}get time(){return Zf(Number(this.animation.currentTime)||0)}set time(e){const t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Qf(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 null!==this.finishedTime?"finished":this.animation.playState}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}){var o;return this.allowFlatten&&(null==(o=this.animation.effect)||o.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Nm()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),Gf):r(this)}}const Om={anticipate:sp,backInOut:ip,circInOut:cp};function Im(e){"string"==typeof e.ease&&e.ease in Om&&(e.ease=Om[e.ease])}class zm extends Am{constructor(e){Im(e),Zh(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:o,...a}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const i=new tm({...a,autoplay:!1}),s=Math.max(10,jp.now()-this.startTime),l=Vf(0,10,s-10),u=i.sample(s).value,{name:c}=this.options;o&&c&&jm(o,c,u),t.setWithVelocity(i.sample(Math.max(0,s-l)).value,u,l),i.stop()}}const Fm=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!ah.test(e)&&"0"!==e||e.startsWith("url(")));function Vm(e){e.duration=0,e.type="keyframes"}const $m=new Set(["opacity","clipPath","filter","transform"]),Bm=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;const Um=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Wm=Hf(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Hm(e){var t;const{motionValue:n,name:r,repeatDelay:o,repeatType:a,damping:i,type:s,keyframes:l}=e;if(!((null==(t=null==n?void 0:n.owner)?void 0:t.current)instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:c}=n.owner.getProps();return Wm()&&r&&($m.has(r)||Um.has(r)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&Bm.test(e[t]))return!0;return!1}(l))&&("transform"!==r||!c)&&!u&&!o&&"mirror"!==a&&0!==i&&"inertia"!==s}class Gm extends Jh{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:a="loop",keyframes:i,name:s,motionValue:l,element:u,...c}){var d;super(),this.stop=()=>{var e,t;this._animation&&(this._animation.stop(),null==(e=this.stopTimeline)||e.call(this)),null==(t=this.keyframeResolver)||t.cancel()},this.createdAt=jp.now();const f={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:a,name:s,motionValue:l,element:u,...c},p=(null==u?void 0:u.KeyframeResolver)||Em;this.keyframeResolver=new p(i,(e,t,n)=>this.onKeyframesResolved(e,t,f,!n),s,l,u),null==(d=this.keyframeResolver)||d.scheduleResolve()}onKeyframesResolved(e,t,n,r){var o,a;this.keyframeResolver=void 0;const{name:i,type:s,velocity:l,delay:u,isHandoff:c,onUpdate:d}=n;this.resolvedAt=jp.now();let f=!0;(function(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const a=e[e.length-1],i=Fm(o,t),s=Fm(a,t);return!(!i||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||_m(n))&&r)})(e,i,s,l)||(f=!1,!$f.instantAnimations&&u||null==d||d(Xh(e,n,t)),e[0]=e[e.length-1],Vm(n),n.repeat=0);const p={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},h=f&&!c&&Hm(p),m=null==(a=null==(o=p.motionValue)?void 0:o.owner)?void 0:a.current;let g;if(h)try{g=new zm({...p,element:m})}catch{g=new tm(p)}else g=new tm(p);g.finished.then(()=>{this.notifyFinished()}).catch(Gf),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||(null==(e=this.keyframeResolver)||e.resume(),wm=!0,Sm(),km(),wm=!1),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(){var e;this._animation&&this.animation.cancel(),null==(e=this.keyframeResolver)||e.cancel()}}function Ym(e,t,n,r=0,o=1){const a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),i=e.size,s=(i-1)*r;return"function"==typeof n?n(a,i):1===o?a*r:s-a*r}const qm=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Km(e,t,n=1){const[r,o]=function(e){const t=qm.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const e=a.trim();return Bf(e)?parseFloat(e):e}return Tp(o)?Km(o,t,n+1):o}const Xm={type:"spring",stiffness:500,damping:25,restSpeed:10},Qm={type:"keyframes",duration:.8},Zm={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jm=(e,{keyframes:t})=>t.length>2?Qm:pm.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Xm:Zm;function eg(e,t){if((null==e?void 0:e.inherit)&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function tg(e,t){const n=(null==e?void 0:e[t])??(null==e?void 0:e.default)??e;return n!==e?eg(n,e):n}const ng=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);const rg=(e,t,n,r={},o,a)=>i=>{const s=tg(r,e)||{},l=s.delay||r.delay||0;let{elapsed:u=0}=r;u-=Qf(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:o};(function(e){for(const t in e)if(!ng.has(t))return!0;return!1})(s)||Object.assign(c,Jm(e,c)),c.duration&&(c.duration=Qf(c.duration)),c.repeatDelay&&(c.repeatDelay=Qf(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let d=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(Vm(c),0===c.delay&&(d=!0)),($f.instantAnimations||$f.skipAnimations||(null==o?void 0:o.shouldSkipAnimations))&&(d=!0,Vm(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!a&&void 0!==t.get()){const e=Xh(c.keyframes,s);if(void 0!==e)return void bp.update(()=>{c.onUpdate(e),c.onComplete()})}return s.isSync?new tm(c):new Gm(c)};function og(e){const t=[{},{}];return null==e||e.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ag(e,t,n,r){if("function"==typeof t){const[o,a]=og(r);t=t(void 0!==n?n:e.custom,o,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,a]=og(r);t=t(void 0!==n?n:e.custom,o,a)}return t}function ig(e,t,n){const r=e.getProps();return ag(r,t,void 0!==n?n:r.custom,e)}const sg=new Set(["width","height","top","left","right","bottom",...fm]);class lg{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{var t;const n=jp.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(null==(t=this.events.change)||t.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=jp.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}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 Xf);const n=this.events[e].add(t);return"change"===e?()=>{n(),bp.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const 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(){var e;null==(e=this.events.change)||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=jp.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Jf(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(){var e,t;null==(e=this.dependents)||e.clear(),null==(t=this.events.destroy)||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ug(e,t){return new lg(e,t)}const cg=e=>Array.isArray(e);function dg(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ug(n))}function fg(e){return cg(e)?e[e.length-1]||0:e}const pg=e=>Boolean(e&&e.getVelocity);function hg(e,t){const n=e.getValue("willChange");if(r=n,Boolean(pg(r)&&r.add))return n.add(t);if(!n&&$f.WillChange){const n=new $f.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function mg(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const gg="data-"+mg("framerAppearId");function vg(e){return e.props[gg]}function yg({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function bg(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:a,transitionEnd:i,...s}=t;const l=e.getDefaultTransition();a=a?eg(a,l):l;const u=null==a?void 0:a.reduceMotion;r&&(a=r);const c=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const f in s){const t=e.getValue(f,e.latestValues[f]??null),r=s[f];if(void 0===r||d&&yg(d,f))continue;const o={delay:n,...tg(a||{},f)},i=t.get();if(void 0!==i&&!t.isAnimating()&&!Array.isArray(r)&&r===i&&!o.velocity){bp.update(()=>t.set(r));continue}let l=!1;if(window.MotionHandoffAnimation){const t=vg(e);if(t){const e=window.MotionHandoffAnimation(t,f,bp);null!==e&&(o.startTime=e,l=!0)}}hg(e,f);const p=u??e.shouldReduceMotion;t.start(rg(f,t,r,p&&sg.has(f)?{type:!1}:o,e,l));const h=t.animation;h&&c.push(h)}if(i){const t=()=>bp.update(()=>{i&&function(e,t){const n=ig(e,t);let{transitionEnd:r={},transition:o={},...a}=n||{};a={...a,...r};for(const i in a)dg(e,i,fg(a[i]))}(e,i)});c.length?Promise.all(c).then(t):t()}return c}function xg(e,t,n={}){var r;const o=ig(e,t,"exit"===n.type?null==(r=e.presenceContext)?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(a=n.transitionOverride);const i=o?()=>Promise.all(bg(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:i,staggerDirection:s}=a;return function(e,t,n=0,r=0,o=0,a=1,i){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(xg(l,t,{...i,delay:n+("function"==typeof r?0:r)+Ym(e.variantChildren,l,r,o,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,o,i,s,n)}:()=>Promise.resolve(),{when:l}=a;if(l){const[e,t]="beforeChildren"===l?[i,s]:[s,i];return e().then(()=>t())}return Promise.all([i(),s(n.delay)])}const wg=e=>t=>t.test(e),kg=[Lp,Gp,Hp,Wp,qp,Yp,{test:e=>"auto"===e,parse:e=>e}],Sg=e=>kg.find(wg(e));function Eg(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||Wf(e))}const jg=new Set(["brightness","contrast","saturate","opacity"]);function Cg(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Op)||[];if(!r)return e;const o=n.replace(r,"");let a=jg.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+o+")"}const Pg=/\b([a-z-]*)\(.*?\)/gu,Ng={...ah,getAnimatableNone:e=>{const t=e.match(Pg);return t?t.map(Cg).join(" "):e}},Tg={...ah,getAnimatableNone:e=>{const t=ah.parse(e);return ah.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},Mg={...Lp,transform:Math.round},Rg={borderWidth:Gp,borderTopWidth:Gp,borderRightWidth:Gp,borderBottomWidth:Gp,borderLeftWidth:Gp,borderRadius:Gp,borderTopLeftRadius:Gp,borderTopRightRadius:Gp,borderBottomRightRadius:Gp,borderBottomLeftRadius:Gp,width:Gp,maxWidth:Gp,height:Gp,maxHeight:Gp,top:Gp,right:Gp,bottom:Gp,left:Gp,inset:Gp,insetBlock:Gp,insetBlockStart:Gp,insetBlockEnd:Gp,insetInline:Gp,insetInlineStart:Gp,insetInlineEnd:Gp,padding:Gp,paddingTop:Gp,paddingRight:Gp,paddingBottom:Gp,paddingLeft:Gp,paddingBlock:Gp,paddingBlockStart:Gp,paddingBlockEnd:Gp,paddingInline:Gp,paddingInlineStart:Gp,paddingInlineEnd:Gp,margin:Gp,marginTop:Gp,marginRight:Gp,marginBottom:Gp,marginLeft:Gp,marginBlock:Gp,marginBlockStart:Gp,marginBlockEnd:Gp,marginInline:Gp,marginInlineStart:Gp,marginInlineEnd:Gp,fontSize:Gp,backgroundPositionX:Gp,backgroundPositionY:Gp,...{rotate:Wp,rotateX:Wp,rotateY:Wp,rotateZ:Wp,scale:_p,scaleX:_p,scaleY:_p,scaleZ:_p,skew:Wp,skewX:Wp,skewY:Wp,distance:Gp,translateX:Gp,translateY:Gp,translateZ:Gp,x:Gp,y:Gp,z:Gp,perspective:Gp,transformPerspective:Gp,opacity:Dp,originX:Kp,originY:Kp,originZ:Gp},zIndex:Mg,fillOpacity:Dp,strokeOpacity:Dp,numOctaves:Mg},Lg={...Rg,color:Qp,backgroundColor:Qp,outlineColor:Qp,fill:Qp,stroke:Qp,borderColor:Qp,borderTopColor:Qp,borderRightColor:Qp,borderBottomColor:Qp,borderLeftColor:Qp,filter:Ng,WebkitFilter:Ng,mask:Tg,WebkitMask:Tg},Dg=e=>Lg[e],_g=new Set([Ng,Tg]);function Ag(e,t){let n=Dg(e);return _g.has(n)||(n=ah),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Og=new Set(["auto","none","0"]);class Ig extends Em{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let s=0;s<e.length;s++){let n=e[s];if("string"==typeof n&&(n=n.trim(),Tp(n))){const r=Km(n,t.current);void 0!==r&&(e[s]=r),s===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!sg.has(n)||2!==e.length)return;const[r,o]=e,a=Sg(r),i=Sg(o);if(Rp(r)!==Rp(o)&&vm[n])this.needsMeasurement=!0;else if(a!==i)if(hm(a)&&hm(i))for(let s=0;s<e.length;s++){const t=e[s];"string"==typeof t&&(e[s]=parseFloat(t))}else vm[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)(null===e[r]||Eg(e[r]))&&n.push(r);n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!Og.has(t)&&nh(t).values.length&&(r=e[o]),o++}if(r&&n)for(const a of t)e[a]=Ag(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=vm[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const a=r.length-1,i=r[a];r[a]=vm[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),(null==(e=this.removedTransforms)?void 0:e.length)&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}function zg(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const r=(null==n?void 0:n[e])??t.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e).filter(e=>null!=e)}const Fg=(e,t)=>t&&"number"==typeof e?t.transform(e):e;function Vg(e){return Uf(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:$g}=yp(queueMicrotask,!1),Bg={x:!1,y:!1};function Ug(){return Bg.x||Bg.y}function Wg(e,t){const n=zg(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Hg(e,t,n={}){const[r,o,a]=Wg(e,n);return r.forEach(e=>{let n,r=!1,a=!1;const i=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},s=e=>{r=!1,window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s),a&&(a=!1,i(e))},l=e=>{"touch"!==e.pointerType&&(r?a=!0:i(e))};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||Ug())return;a=!1;const i=t(e,r);"function"==typeof i&&(n=i,e.addEventListener("pointerleave",l,o))},o),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",s,o),window.addEventListener("pointercancel",s,o)},o)}),a}const Gg=(e,t)=>!!t&&(e===t||Gg(e,t.parentElement)),Yg=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,qg=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Kg=new Set(["INPUT","SELECT","TEXTAREA"]);const Xg=new WeakSet;function Qg(e){return t=>{"Enter"===t.key&&e(t)}}function Zg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function Jg(e){return Yg(e)&&!Ug()}const ev=new WeakSet;function tv(e,t,n={}){const[r,o,a]=Wg(e,n),i=e=>{const r=e.currentTarget;if(!Jg(e))return;if(ev.has(e))return;Xg.add(r),n.stopPropagation&&ev.add(e);const a=t(r,e),i=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),Xg.has(r)&&Xg.delete(r),Jg(e)&&"function"==typeof a&&a(e,{success:t})},s=e=>{i(e,r===window||r===document||n.useGlobalTarget||Gg(r,e.target))},l=e=>{i(e,!1)};window.addEventListener("pointerup",s,o),window.addEventListener("pointercancel",l,o)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",i,o),Vg(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Qg(()=>{if(Xg.has(n))return;Zg(n,"down");const e=Qg(()=>{Zg(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>Zg(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,o)),t=e,qg.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}function nv(e){return Uf(e)&&"ownerSVGElement"in e}const rv=new WeakMap;let ov;const av=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:nv(r)&&"getBBox"in r?r.getBBox()[t]:r[n],iv=av("inline","width","offsetWidth"),sv=av("block","height","offsetHeight");function lv({target:e,borderBoxSize:t}){var n;null==(n=rv.get(e))||n.forEach(n=>{n(e,{get width(){return iv(e,t)},get height(){return sv(e,t)}})})}function uv(e){e.forEach(lv)}function cv(e,t){ov||"undefined"!=typeof ResizeObserver&&(ov=new ResizeObserver(uv));const n=zg(e);return n.forEach(e=>{let n=rv.get(e);n||(n=new Set,rv.set(e,n)),n.add(t),null==ov||ov.observe(e)}),()=>{n.forEach(e=>{const n=rv.get(e);null==n||n.delete(t),(null==n?void 0:n.size)||null==ov||ov.unobserve(e)})}}const dv=new Set;let fv;function pv(e){return dv.add(e),fv||(fv=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};dv.forEach(t=>t(e))},window.addEventListener("resize",fv)),()=>{dv.delete(e),dv.size||"function"!=typeof fv||(window.removeEventListener("resize",fv),fv=void 0)}}function hv(e,t){return"function"==typeof e?pv(e):cv(e,t)}const mv=[...kg,Qp,ah],gv=()=>({x:{min:0,max:0},y:{min:0,max:0}}),vv=new WeakMap;function yv(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function bv(e){return"string"==typeof e||Array.isArray(e)}const xv=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wv=["initial",...xv];function kv(e){return yv(e.animate)||wv.some(t=>bv(e[t]))}function Sv(e){return Boolean(kv(e)||e.variants)}const Ev={current:null},jv={current:!1},Cv="undefined"!=typeof window;function Pv(){if(jv.current=!0,Cv)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ev.current=e.matches;e.addEventListener("change",t),t()}else Ev.current=!1}const Nv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Tv={};function Mv(e){Tv=e}class Rv{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:o,blockInitialAnimation:a,visualState:i},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=Em,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=()=>{const e=jp.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,bp.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=u,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=o,this.options=s,this.blockInitialAnimation=Boolean(a),this.isControllingVariants=kv(t),this.isVariantNode=Sv(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const f in d){const e=d[f];void 0!==l[f]&&pg(e)&&e.set(l[f])}}mount(e){var t,n;if(this.hasBeenMounted)for(const r in this.initialValues)null==(t=this.values.get(r))||t.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=e,vv.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)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(jv.current||Pv(),this.shouldReduceMotion=Ev.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,null==(n=this.parent)||n.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),xp(this.notifyUpdate),xp(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),null==(e=this.parent)||e.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(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&&$m.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:o,ease:a,duration:i}=t.accelerate,s=new Am({element:this.current,name:e,keyframes:r,times:o,ease:a,duration:Qf(i)}),l=n(s);return void this.valueSubscriptions.set(e,()=>{l(),s.cancel()})}const n=pm.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&bp.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),o&&o(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Tv){const t=Tv[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const 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):{x:{min:0,max:0},y:{min:0,max:0}}}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 n=0;n<Nv.length;n++){const t=Nv[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],a=n[r];if(pg(o))e.addValue(r,o);else if(pg(a))e.addValue(r,ug(o,{owner:e}));else if(a!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,ug(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(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){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const 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);const 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 void 0===n&&void 0!==t&&(n=ug(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var r;return null!=n&&("string"==typeof n&&(Bf(n)||Wf(n))?n=parseFloat(n):(r=n,!mv.find(wg(r))&&ah.test(t)&&(n=Ag(e,t))),this.setBaseTarget(e,pg(n)?n.get():n)),pg(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=ag(this.props,n,null==(t=this.presenceContext)?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||pg(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new Xf),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){$g.render(this.render)}}class Lv extends Rv{constructor(){super(...arguments),this.KeyframeResolver=Ig}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const 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);const{children:e}=this.props;pg(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class Dv{constructor(e){this.isMounted=!1,this.node=e}update(){}}function _v({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Av(e){return void 0===e||1===e}function Ov({scale:e,scaleX:t,scaleY:n}){return!Av(e)||!Av(t)||!Av(n)}function Iv(e){return Ov(e)||zv(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function zv(e){return Fv(e.x)||Fv(e.y)}function Fv(e){return e&&"0%"!==e}function Vv(e,t,n){return n+t*(e-n)}function $v(e,t,n,r,o){return void 0!==o&&(e=Vv(e,o,r)),Vv(e,n,r)+t}function Bv(e,t=0,n=1,r,o){e.min=$v(e.min,t,n,r,o),e.max=$v(e.max,t,n,r,o)}function Uv(e,{x:t,y:n}){Bv(e.x,t.translate,t.scale,t.originPoint),Bv(e.y,n.translate,n.scale,n.originPoint)}const Wv=.999999999999,Hv=1.0000000000001;function Gv(e,t){e.min+=t,e.max+=t}function Yv(e,t,n,r,o=.5){Bv(e,t,n,lh(e.min,e.max,o),r)}function qv(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function Kv(e,t,n){const r=n??e;Yv(e.x,qv(t.x,r.x),t.scaleX,t.scale,t.originX),Yv(e.y,qv(t.y,r.y),t.scaleY,t.scale,t.originY)}function Xv(e,t){return _v(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const Qv={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Zv=fm.length;function Jv(e,t,n){const{style:r,vars:o,transformOrigin:a}=e;let i=!1,s=!1;for(const l in t){const e=t[l];if(pm.has(l))i=!0;else if(Pp(l))o[l]=e;else{const t=Fg(e,Rg[l]);l.startsWith("origin")?(s=!0,a[l]=t):r[l]=t}}if(t.transform||(i||n?r.transform=function(e,t,n){let r="",o=!0;for(let a=0;a<Zv;a++){const i=fm[a],s=e[i];if(void 0===s)continue;let l=!0;if("number"==typeof s)l=s===(i.startsWith("scale")?1:0);else{const e=parseFloat(s);l=i.startsWith("scale")?1===e:0===e}if(!l||n){const e=Fg(s,Rg[i]);l||(o=!1,r+=`${Qv[i]||i}(${e}) `),n&&(t[i]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function ey(e,{style:t,vars:n},r,o){const a=e.style;let i;for(i in t)a[i]=t[i];for(i in null==o||o.applyProjectionStyles(a,r),n)a.setProperty(i,n[i])}function ty(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ny={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Gp.test(e))return e;e=parseFloat(e)}return`${ty(e,t.target.x)}% ${ty(e,t.target.y)}%`}},ry={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=ah.parse(e);if(o.length>5)return r;const a=ah.createTransformer(e),i="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=s,o[1+i]/=l;const u=lh(s,l,.5);return"number"==typeof o[2+i]&&(o[2+i]/=u),"number"==typeof o[3+i]&&(o[3+i]/=u),a(o)}},oy={borderRadius:{...ny,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ny,borderTopRightRadius:ny,borderBottomLeftRadius:ny,borderBottomRightRadius:ny,boxShadow:ry};function ay(e,{layout:t,layoutId:n}){return pm.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!oy[e]||"opacity"===e)}function iy(e,t,n){var r;const o=e.style,a=null==t?void 0:t.style,i={};if(!o)return i;for(const s in o)(pg(o[s])||a&&pg(a[s])||ay(s,e)||void 0!==(null==(r=null==n?void 0:n.getValue(s))?void 0:r.liveStyle))&&(i[s]=o[s]);return i}class sy extends Lv{constructor(){super(...arguments),this.type="html",this.renderInstance=ey}readValueFromInstance(e,t){var n,r;if(pm.has(t))return(null==(n=this.projection)?void 0:n.isProjecting)?um(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return cm(n,t)})(e,t);{const n=(r=e,window.getComputedStyle(r)),o=(Pp(t)?n.getPropertyValue(t):n[t])||0;return"string"==typeof o?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Xv(e,t)}build(e,t,n){Jv(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return iy(e,t,n)}}const ly={offset:"stroke-dashoffset",array:"stroke-dasharray"},uy={offset:"strokeDashoffset",array:"strokeDasharray"};const cy=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function dy(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:a=1,pathOffset:i=0,...s},l,u,c){if(Jv(e,s,u),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{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=(null==c?void 0:c.transformBox)??"fill-box",delete d.transformBox);for(const p of cy)void 0!==d[p]&&(f[p]=d[p],delete d[p]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==o&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const a=o?ly:uy;e[a.offset]=""+-r,e[a.array]=`${t} ${n}`}(d,o,a,i,!1)}const fy=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"]),py=e=>"string"==typeof e&&"svg"===e.toLowerCase();function hy(e,t,n){const r=iy(e,t,n);for(const o in e)if(pg(e[o])||pg(t[o])){r[-1!==fm.indexOf(o)?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o]=e[o]}return r}class my extends Lv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gv}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(pm.has(t)){const e=Dg(t);return e&&e.default||0}return t=fy.has(t)?t:mg(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return hy(e,t,n)}build(e,t,n){dy(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){ey(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(fy.has(o)?o:mg(o),t.attrs[o])}(e,t,0,r)}mount(e){this.isSVGTag=py(e.tagName),super.mount(e)}}const gy=wv.length;function vy(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&vy(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<gy;n++){const r=wv[n],o=e.props[r];(bv(o)||!1===o)&&(t[r]=o)}return t}function yy(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const by=[...xv].reverse(),xy=xv.length;function wy(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map(t=>xg(e,t,n));r=Promise.all(o)}else if("string"==typeof t)r=xg(e,t,n);else{const o="function"==typeof t?ig(e,t,n.custom):t;r=Promise.all(bg(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}function ky(e){let t=wy(e),n=jy(),r=!0,o=!1;const a=t=>(n,r)=>{var o;const a=ig(e,r,"exit"===t?null==(o=e.presenceContext)?void 0:o.custom:void 0);if(a){const{transition:e,transitionEnd:t,...r}=a;n={...n,...r,...t}}return n};function i(i){const{props:s}=e,l=vy(e.parent)||{},u=[],c=new Set;let d={},f=1/0;for(let t=0;t<xy;t++){const p=by[t],h=n[p],m=void 0!==s[p]?s[p]:l[p],g=bv(m),v=p===i?h.isActive:null;!1===v&&(f=t);let y=m===l[p]&&m!==s[p]&&g;if(y&&(r||o)&&e.manuallyAnimateOnMount&&(y=!1),h.protectedKeys={...d},!h.isActive&&null===v||!m&&!h.prevProp||yv(m)||"boolean"==typeof m)continue;if("exit"===p&&h.isActive&&!0!==v){h.prevResolvedValues&&(d={...d,...h.prevResolvedValues});continue}const b=Sy(h.prevProp,m);let x=b||p===i&&h.isActive&&!y&&g||t>f&&g,w=!1;const k=Array.isArray(m)?m:[m];let S=k.reduce(a(p),{});!1===v&&(S={});const{prevResolvedValues:E={}}=h,j={...E,...S},C=t=>{x=!0,c.has(t)&&(w=!0,c.delete(t)),h.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in j){const t=S[e],n=E[e];if(d.hasOwnProperty(e))continue;let r=!1;r=cg(t)&&cg(n)?!yy(t,n):t!==n,r?null!=t?C(e):c.add(e):void 0!==t&&c.has(e)?C(e):h.protectedKeys[e]=!0}h.prevProp=m,h.prevResolvedValues=S,h.isActive&&(d={...d,...S}),(r||o)&&e.blockInitialAnimation&&(x=!1);const P=y&&b;x&&(!P||w)&&u.push(...k.map(t=>{const n={type:p};if("string"==typeof t&&(r||o)&&!P&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,o=ig(r,t);if(r.enteringChildren&&o){const{delayChildren:t}=o.transition||{};n.delay=Ym(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(c.size){const t={};if("boolean"!=typeof s.initial){const n=ig(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}c.forEach(n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=r??null}),u.push({animation:t})}let p=Boolean(u.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,o=!1,p?t(u):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null==(o=e.variantChildren)||o.forEach(e=>{var n;return null==(n=e.animationState)?void 0:n.setActive(t,r)}),n[t].isActive=r;const a=i(t);for(const e in n)n[e].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=jy(),o=!0}}}function Sy(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!yy(t,e)}function Ey(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function jy(){return{animate:Ey(!0),whileInView:Ey(),whileHover:Ey(),whileTap:Ey(),whileDrag:Ey(),whileFocus:Ey(),exit:Ey()}}function Cy(e,t){e.min=t.min,e.max=t.max}function Py(e,t){Cy(e.x,t.x),Cy(e.y,t.y)}function Ny(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Ty(e){return e.max-e.min}function My(e,t,n,r=.5){e.origin=r,e.originPoint=lh(t.min,t.max,e.origin),e.scale=Ty(n)/Ty(t),e.translate=lh(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function Ry(e,t,n,r){My(e.x,t.x,n.x,r?r.originX:void 0),My(e.y,t.y,n.y,r?r.originY:void 0)}function Ly(e,t,n,r=0){const o=r?lh(n.min,n.max,r):n.min;e.min=o+t.min,e.max=e.min+Ty(t)}function Dy(e,t,n,r=0){const o=r?lh(n.min,n.max,r):n.min;e.min=t.min-o,e.max=e.min+Ty(t)}function _y(e,t,n,r){Dy(e.x,t.x,n.x,null==r?void 0:r.x),Dy(e.y,t.y,n.y,null==r?void 0:r.y)}function Ay(e,t,n,r,o){return e=Vv(e-=t,1/n,r),void 0!==o&&(e=Vv(e,1/o,r)),e}function Oy(e,t,[n,r,o],a,i){!function(e,t=0,n=1,r=.5,o,a=e,i=e){Hp.test(t)&&(t=parseFloat(t),t=lh(i.min,i.max,t/100)-i.min);if("number"!=typeof t)return;let s=lh(a.min,a.max,r);e===a&&(s-=t),e.min=Ay(e.min,t,n,s,o),e.max=Ay(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,a,i)}const Iy=["x","scaleX","originX"],zy=["y","scaleY","originY"];function Fy(e,t,n,r){Oy(e.x,t,Iy,n?n.x:void 0,r?r.x:void 0),Oy(e.y,t,zy,n?n.y:void 0,r?r.y:void 0)}function Vy(e){return 0===e.translate&&1===e.scale}function $y(e){return Vy(e.x)&&Vy(e.y)}function By(e,t){return e.min===t.min&&e.max===t.max}function Uy(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Wy(e,t){return Uy(e.x,t.x)&&Uy(e.y,t.y)}function Hy(e){return Ty(e.x)/Ty(e.y)}function Gy(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Yy(e){return[e("x"),e("y")]}const qy=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],Ky=qy.length,Xy=e=>"string"==typeof e?parseFloat(e):e,Qy=e=>"number"==typeof e||Gp.test(e);function Zy(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Jy=tb(0,.5,up),eb=tb(.5,.95,Gf);function tb(e,t,n){return r=>r<e?0:r>t?1:n(Kf(e,t,r))}function nb(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const rb=(e,t)=>e.depth-t.depth;class ob{constructor(){this.children=[],this.isDirty=!1}add(e){zf(this.children,e),this.isDirty=!0}remove(e){Ff(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(rb),this.isDirty=!1,this.children.forEach(e)}}function ab(e){return pg(e)?e.get():e}class ib{constructor(){this.members=[]}add(e){zf(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const r=n.instance;r&&!1!==r.isConnected||n.snapshot||(Ff(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Ff(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){var t;for(let n=this.members.indexOf(e)-1;n>=0;n--){const e=this.members[n];if(!1!==e.isPresent&&!1!==(null==(t=e.instance)?void 0:t.isConnected))return this.promote(e),!0}return!1}promote(e,t){var n;const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.updateSnapshot(),e.scheduleRender();const{layoutDependency:o}=r.options,{layoutDependency:a}=e.options;void 0!==o&&o===a||(e.resumeFrom=r,t&&(r.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),(null==(n=e.root)?void 0:n.isUpdating)&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var t,n,r,o,a;null==(n=(t=e.options).onExitComplete)||n.call(t),null==(a=null==(r=e.resumingFrom)?void 0:(o=r.options).onExitComplete)||a.call(o)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(null==(e=this.lead)?void 0:e.snapshot)&&(this.lead.snapshot=void 0)}}const sb={hasAnimatedSinceResize:!0,hasEverUpdated:!1},lb=["","X","Y","Z"];let ub=0;function cb(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function db(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=vg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",bp,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&db(r)}function fb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=ub++,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,this.nodes.forEach(mb),this.nodes.forEach(Eb),this.nodes.forEach(jb),this.nodes.forEach(gb)},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 t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new ob)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Xf),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=nv(t)&&!(nv(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:o,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(o||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const o=()=>this.root.updateBlockedByResize=!1;bp.read(()=>{r=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=jp.now(),r=({timestamp:o})=>{const a=o-n;a>=t&&(xp(r),e(a-t))};return bp.setup(r,!0),()=>xp(r)}(o,250),sb.hasAnimatedSinceResize&&(sb.hasAnimatedSinceResize=!1,this.nodes.forEach(Sb)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&a&&(r||o)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||Rb,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!Wy(this.targetLayout,r),u=!t&&n;if(this.options.layoutRoot||this.resumeFrom||u||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...tg(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,u)}else t||Sb(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),xp(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(Cb),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&db(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let o=0;o<this.path.length;o++){const e=this.path[o];e.shouldResetTransform=!0,"string"!=typeof e.latestValues.x&&"string"!=typeof e.latestValues.y||(e.isLayoutDirty=!0),e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked()){const e=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(bb),void this.nodes.forEach(yb)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(xb);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(wb),this.nodes.forEach(kb),this.nodes.forEach(pb),this.nodes.forEach(hb)):this.nodes.forEach(xb),this.clearAllSnapshots();const e=jp.now();wp.delta=Vf(0,1e3/60,e-wp.timestamp),wp.timestamp=e,wp.isProcessing=!0,kp.update.process(wp),kp.preRender.process(wp),kp.render.process(wp),wp.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,$g.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(vb),this.sharedNodes.forEach(Pb)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,bp.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){bp.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Ty(this.snapshot.measuredBox.x)||Ty(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const 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(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!$y(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Iv(this.latestValues)||a)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),_b((r=n).x),_b(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!((null==(e=this.scroll)?void 0:e.wasRoot)||this.path.some(Ob))){const{scroll:e}=this.root;e&&(Gv(n.x,e.offset.x),Gv(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(Py(n,e),null==(t=this.scroll)?void 0:t.wasRoot)return n;for(let r=0;r<this.path.length;r++){const t=this.path[r],{scroll:o,options:a}=t;t!==this.root&&o&&a.layoutScroll&&(o.wasRoot&&Py(n,e),Gv(n.x,o.offset.x),Gv(n.y,o.offset.y))}return n}applyTransform(e,t=!1,n){var r,o;const a=n||{x:{min:0,max:0},y:{min:0,max:0}};Py(a,e);for(let i=0;i<this.path.length;i++){const e=this.path[i];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&(Gv(a.x,-e.scroll.offset.x),Gv(a.y,-e.scroll.offset.y)),Iv(e.latestValues)&&Kv(a,e.latestValues,null==(r=e.layout)?void 0:r.layoutBox)}return Iv(this.latestValues)&&Kv(a,this.latestValues,null==(o=this.layout)?void 0:o.layoutBox),a}removeTransform(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};Py(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];if(!Iv(e.latestValues))continue;let o;e.instance&&(Ov(e.latestValues)&&e.updateSnapshot(),o=gv(),Py(o,e.measurePageBox())),Fy(n,e.latestValues,null==(t=e.snapshot)?void 0:t.layoutBox,o)}return Iv(this.latestValues)&&Fy(n,this.latestValues),n}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||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!==wp.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null==(t=this.parent)?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:a}=this.options;if(!this.layout||!o&&!a)return;this.resolvedRelativeTargetAt=wp.timestamp;const i=this.getClosestProjectingParent();var s,l,u,c;(i&&this.linkedParentVersion!==i.layoutVersion&&!i.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&i&&i.layout?this.createRelativeTarget(i,this.layout.layoutBox,i.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,l=this.relativeTarget,u=this.relativeParent.target,c=this.options.layoutAnchor||void 0,Ly(s.x,l.x,u.x,null==c?void 0:c.x),Ly(s.y,l.y,u.y,null==c?void 0:c.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):Py(this.target,this.layout.layoutBox),Uv(this.target,this.targetDelta)):Py(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&i&&Boolean(i.resumingFrom)===Boolean(this.resumingFrom)&&!i.options.layoutScroll&&i.target&&1!==this.animationProgress?this.createRelativeTarget(i,this.target,i.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(this.parent&&!Ov(this.parent.latestValues)&&!zv(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},_y(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Py(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null==(e=this.parent)?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===wp.timestamp&&(r=!1),r)return;const{layout:o,layoutId:a}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!a)return;Py(this.layoutCorrected,this.layout.layoutBox);const i=this.treeScale.x,s=this.treeScale.y;!function(e,t,n,r=!1){var o;const a=n.length;if(!a)return;let i,s;t.x=t.y=1;for(let l=0;l<a;l++){i=n[l],s=i.projectionDelta;const{visualElement:a}=i.options;a&&a.props.style&&"contents"===a.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&(Gv(e.x,-i.scroll.offset.x),Gv(e.y,-i.scroll.offset.y)),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Uv(e,s)),r&&Iv(i.latestValues)&&Kv(e,i.latestValues,null==(o=i.layout)?void 0:o.layoutBox))}t.x<Hv&&t.x>Wv&&(t.x=1),t.y<Hv&&t.y>Wv&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Ny(this.prevProjectionDelta.x,this.projectionDelta.x),Ny(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Ry(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===i&&this.treeScale.y===s&&Gy(this.projectionDelta.x,this.prevProjectionDelta.x)&&Gy(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null==(t=this.options.visualElement)||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const i={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(s&&!u&&!0===this.options.crossfade&&!this.path.some(Mb));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,f,p,h;Nb(a.x,e.x,n),Nb(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(_y(i,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),l=this.relativeTarget,f=this.relativeTargetOrigin,p=i,h=n,Tb(l.x,f.x,p.x,h),Tb(l.y,f.y,p.y,h),d&&function(e,t){return By(e.x,t.x)&&By(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),Py(d,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,a){o?(e.opacity=lh(0,n.opacity??1,Jy(r)),e.opacityExit=lh(t.opacity??1,0,eb(r))):a&&(e.opacity=lh(t.opacity??1,n.opacity??1,r));for(let i=0;i<Ky;i++){const o=qy[i];let a=Zy(t,o),s=Zy(n,o);void 0===a&&void 0===s||(a||(a=0),s||(s=0),0===a||0===s||Qy(a)===Qy(s)?(e[o]=Math.max(lh(Xy(a),Xy(s),r),0),(Hp.test(s)||Hp.test(a))&&(e[o]+="%")):e[o]=s)}(t.rotate||n.rotate)&&(e.rotate=lh(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){var t,n,r;this.notifyListeners("animationStart"),null==(t=this.currentAnimation)||t.stop(),null==(r=null==(n=this.resumingFrom)?void 0:n.currentAnimation)||r.stop(),this.pendingAnimation&&(xp(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=bp.update(()=>{sb.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ug(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(e,t,n){const r=pg(e)?e:ug(e);return r.start(rg("",r,t,n)),r.animation}(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{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);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Ab(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Ty(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Ty(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Py(t,n),Kv(t,o),Ry(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ib);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null==(e=this.getStack())?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null==(e=this.getStack())?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&cb("z",e,r,this.animationValues);for(let o=0;o<lb.length;o++)cb(`rotate${lb[o]}`,e,r,this.animationValues),cb(`skew${lb[o]}`,e,r,this.animationValues);e.render();for(const o in r)e.setStaticValue(o,r[o]),this.animationValues&&(this.animationValues[o]=r[o]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=ab(null==t?void 0:t.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=ab(null==t?void 0:t.pointerEvents)||""),void(this.hasProjected&&!Iv(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const o=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=function(e,t,n){let r="";const o=e.x.translate/t.x,a=e.y.translate/t.y,i=(null==n?void 0:n.z)||0;if((o||a||i)&&(r=`translate3d(${o}px, ${a}px, ${i}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:a,skewX:i,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),a&&(r+=`rotateY(${a}deg) `),i&&(r+=`skewX(${i}deg) `),s&&(r+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,o);n&&(a=n(o,a)),e.transform=a;const{x:i,y:s}=this.projectionDelta;e.transformOrigin=`${100*i.origin}% ${100*s.origin}% 0`,r.animationValues?e.opacity=r===this?o.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:e.opacity=r===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const l in oy){if(void 0===o[l])continue;const{correct:t,applyTo:n,isCSSVariable:i}=oy[l],s="none"===a?o[l]:t(o[l],r);if(n){const t=n.length;for(let r=0;r<t;r++)e[n[r]]=s}else i?this.options.visualElement.renderState.vars[l]=s:e[l]=s}this.options.layoutId&&(e.pointerEvents=r===this?ab(null==t?void 0:t.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null==(t=e.currentAnimation)?void 0:t.stop()}),this.root.nodes.forEach(yb),this.root.sharedNodes.clear()}}}function pb(e){e.updateLayout()}function hb(e){var t;const n=(null==(t=e.resumeFrom)?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;if("size"===o)Yy(e=>{const r=a?n.measuredBox[e]:n.layoutBox[e],o=Ty(r);r.min=t[e].min,r.max=r.min+o});else if("x"===o||"y"===o){const e="x"===o?"y":"x";Cy(a?n.measuredBox[e]:n.layoutBox[e],t[e])}else Ab(o,n.layoutBox,t)&&Yy(r=>{const o=a?n.measuredBox[r]:n.layoutBox[r],i=Ty(t[r]);o.max=o.min+i,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+i)});const i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Ry(i,t,n.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};a?Ry(s,e.applyTransform(r,!0),n.measuredBox):Ry(s,t,n.layoutBox);const l=!$y(i);let u=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:a}=r;if(o&&a){const i=e.options.layoutAnchor||void 0,s={x:{min:0,max:0},y:{min:0,max:0}};_y(s,n.layoutBox,o.layoutBox,i);const l={x:{min:0,max:0},y:{min:0,max:0}};_y(l,t,a.layoutBox,i),Wy(s,l)||(u=!0),r.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function mb(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function gb(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function vb(e){e.clearSnapshot()}function yb(e){e.clearMeasurements()}function bb(e){e.isLayoutDirty=!0,e.updateLayout()}function xb(e){e.isLayoutDirty=!1}function wb(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function kb(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Sb(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Eb(e){e.resolveTargetDelta()}function jb(e){e.calcProjection()}function Cb(e){e.resetSkewAndRotation()}function Pb(e){e.removeLeadSnapshot()}function Nb(e,t,n){e.translate=lh(t.translate,0,n),e.scale=lh(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Tb(e,t,n,r){e.min=lh(t.min,n.min,r),e.max=lh(t.max,n.max,r)}function Mb(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Rb={duration:.45,ease:[.4,0,.1,1]},Lb=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Db=Lb("applewebkit/")&&!Lb("chrome/")?Math.round:Gf;function _b(e){e.min=Db(e.min),e.max=Db(e.max)}function Ab(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=Hy(t),o=Hy(n),a=.2,!(Math.abs(r-o)<=a));var r,o,a}function Ob(e){var t;return e!==e.root&&(null==(t=e.scroll)?void 0:t.wasRoot)}const Ib=fb({attachResizeListener:(e,t)=>nb(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||(null==(e=document.body)?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||(null==(t=document.body)?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),zb={current:void 0},Fb=fb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zb.current){const e=new Ib({});e.mount(window),e.setOptions({layoutScroll:!0}),zb.current=e}return zb.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Vb=W.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function $b(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Bb(...e){return W.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=$b(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():$b(e[t],null)}}}}(...e),e)}class Ub extends W.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(Vg(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,n=Vg(e)&&e.offsetWidth||0,r=Vg(e)&&e.offsetHeight||0,o=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top}return null}componentDidUpdate(){}render(){return this.props.children}}function Wb({children:e,isPresent:t,anchorX:n,anchorY:r,root:o,pop:a}){var i;const s=W.useId(),l=W.useRef(null),u=W.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:c}=W.useContext(Vb),d=(null==(i=e.props)?void 0:i.ref)??(null==e?void 0:e.ref),f=Bb(l,d);return W.useInsertionEffect(()=>{const{width:e,height:i,top:d,left:f,right:p,bottom:h}=u.current;if(t||!1===a||!l.current||!e||!i)return;const m="left"===n?`left: ${f}`:`right: ${p}`,g="bottom"===r?`bottom: ${h}`:`top: ${d}`;l.current.dataset.motionPopId=s;const v=document.createElement("style");c&&(v.nonce=c);const y=o??document.head;return y.appendChild(v),v.sheet&&v.sheet.insertRule(`\n [data-motion-pop-id="${s}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${i}px !important;\n ${m}px !important;\n ${g}px !important;\n }\n `),()=>{var e;null==(e=l.current)||e.removeAttribute("data-motion-pop-id"),y.contains(v)&&y.removeChild(v)}},[t]),ee.jsx(Ub,{isPresent:t,childRef:l,sizeRef:u,pop:a,children:!1===a?e:W.cloneElement(e,{ref:f})})}const Hb=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:a,mode:i,anchorX:s,anchorY:l,root:u})=>{const c=Af(Gb),d=W.useId();let f=!0,p=W.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:e=>{c.set(e,!0);for(const t of c.values())if(!t)return;r&&r()},register:e=>(c.set(e,!1),()=>c.delete(e))}),[n,c,r]);return a&&f&&(p={...p}),W.useMemo(()=>{c.forEach((e,t)=>c.set(t,!1))},[n]),W.useEffect(()=>{!n&&!c.size&&r&&r()},[n]),e=ee.jsx(Wb,{pop:"popLayout"===i,isPresent:n,anchorX:s,anchorY:l,root:u,children:e}),ee.jsx(If.Provider,{value:p,children:e})};function Gb(){return new Map}function Yb(e=!0){const t=W.useContext(If);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,a=W.useId();W.useEffect(()=>{if(e)return o(a)},[e]);const i=W.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,i]:[!0]}const qb=e=>e.key||"";function Kb(e){const t=[];return W.Children.forEach(e,e=>{W.isValidElement(e)&&t.push(e)}),t}const Xb=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:a="sync",propagate:i=!1,anchorX:s="left",anchorY:l="top",root:u})=>{const[c,d]=Yb(i),f=W.useMemo(()=>Kb(e),[e]),p=i&&!c?[]:f.map(qb),h=W.useRef(!0),m=W.useRef(f),g=Af(()=>new Map),v=W.useRef(new Set),[y,b]=W.useState(f),[x,w]=W.useState(f);Of(()=>{h.current=!1,m.current=f;for(let e=0;e<x.length;e++){const t=qb(x[e]);p.includes(t)?(g.delete(t),v.current.delete(t)):!0!==g.get(t)&&g.set(t,!1)}},[x,p.length,p.join("-")]);const k=[];if(f!==y){let e=[...f];for(let t=0;t<x.length;t++){const n=x[t],r=qb(n);p.includes(r)||(e.splice(t,0,n),k.push(n))}return"wait"===a&&k.length&&(e=k),w(Kb(e)),b(f),null}const{forceRender:S}=W.useContext(_f);return ee.jsx(ee.Fragment,{children:x.map(e=>{const y=qb(e),b=!(i&&!c)&&(f===x||p.includes(y));return ee.jsx(Hb,{isPresent:b,initial:!(h.current&&!n)&&void 0,custom:t,presenceAffectsLayout:o,mode:a,root:u,onExitComplete:b?void 0:()=>{if(v.current.has(y))return;if(!g.has(y))return;v.current.add(y),g.set(y,!0);let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(null==S||S(),w(m.current),i&&(null==d||d()),r&&r())},anchorX:s,anchorY:l,children:e},y)})})},Qb=W.createContext({strict:!1}),Zb={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"]};let Jb=!1;function ex(){return function(){if(Jb)return;const e={};for(const t in Zb)e[t]={isEnabled:e=>Zb[t].some(t=>!!e[t])};Mv(e),Jb=!0}(),Tv}const tx=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"]);function nx(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||tx.has(e)}let rx=e=>!nx(e);try{"function"==typeof(ox=require("@emotion/is-prop-valid").default)&&(rx=e=>e.startsWith("on")?!nx(e):ox(e))}catch{}var ox;const ax=W.createContext({});function ix(e){const{initial:t,animate:n}=function(e,t){if(kv(e)){const{initial:t,animate:n}=e;return{initial:!1===t||bv(t)?t:void 0,animate:bv(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,W.useContext(ax));return W.useMemo(()=>({initial:t,animate:n}),[sx(t),sx(n)])}function sx(e){return Array.isArray(e)?e.join(" "):e}const lx=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ux(e,t,n){for(const r in t)pg(t[r])||ay(r,n)||(e[r]=t[r])}function cx(e,t){const n={};return ux(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return W.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Jv(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}function dx(e,t){const n={},r=cx(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const fx=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function px(e,t,n,r){const o=W.useMemo(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return dy(n,t,py(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};ux(t,e.style,e),o.style={...t,...o.style}}return o}const hx=["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 mx(e){return"string"==typeof e&&!e.includes("-")&&!!(hx.indexOf(e)>-1||/[A-Z]/u.test(e))}function gx(e,t,n,{latestValues:r},o,a=!1,i){const s=(i??mx(e)?px:dx)(t,r,o,e),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||pg(e[o])||(rx(o)||!0===n&&nx(o)||!t&&!nx(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(t,"string"==typeof e,a),u=e!==W.Fragment?{...l,...s,ref:n}:{},{children:c}=t,d=W.useMemo(()=>pg(c)?c.get():c,[c]);return W.createElement(e,{...u,children:d})}function vx(e,t,n,r){const o={},a=r(e,{});for(const f in a)o[f]=ab(a[f]);let{initial:i,animate:s}=e;const l=kv(e),u=Sv(e);t&&u&&!l&&!1!==e.inherit&&(void 0===i&&(i=t.initial),void 0===s&&(s=t.animate));let c=!!n&&!1===n.initial;c=c||!1===i;const d=c?s:i;if(d&&"boolean"!=typeof d&&!yv(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=ag(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(o[r]=e)}for(const r in e)o[r]=e[r]}}}return o}const yx=e=>(t,n)=>{const r=W.useContext(ax),o=W.useContext(If),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:vx(n,r,o,e),renderState:t()}}(e,t,r,o);return n?a():Af(a)},bx=yx({scrapeMotionValuesFromProps:iy,createRenderState:lx}),xx=yx({scrapeMotionValuesFromProps:hy,createRenderState:fx}),wx=Symbol.for("motionComponentSymbol");function kx(e,t,n){const r=W.useRef(n);W.useInsertionEffect(()=>{r.current=n});const o=W.useRef(null);return W.useCallback(n=>{var a;n&&(null==(a=e.onMount)||a.call(e,n));const i=r.current;if("function"==typeof i)if(n){const e=i(n);"function"==typeof e&&(o.current=e)}else o.current?(o.current(),o.current=null):i(n);else i&&(i.current=n);t&&(n?t.mount(n):t.unmount())},[t])}const Sx=W.createContext({});function Ex(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function jx(e,t,n,r,o,a){var i,s;const{visualElement:l}=W.useContext(ax),u=W.useContext(Qb),c=W.useContext(If),d=W.useContext(Vb),f=d.reducedMotion,p=d.skipAnimations,h=W.useRef(null),m=W.useRef(!1);r=r||u.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:l,props:n,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:f,skipAnimations:p,isSVG:a}),m.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));const g=h.current,v=W.useContext(Sx);!g||g.projection||!o||"html"!==g.type&&"svg"!==g.type||function(e,t,n,r){const{layoutId:o,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutAnchor:c,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Cx(e.parent)),e.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:Boolean(i)||s&&Ex(s),visualElement:e,animationType:"string"==typeof a?a:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:u,layoutAnchor:c})}(h.current,n,o,v);const y=W.useRef(!1);W.useInsertionEffect(()=>{g&&y.current&&g.update(n,c)});const b=n[gg],x=W.useRef(Boolean(b)&&"undefined"!=typeof window&&!(null==(i=window.MotionHandoffIsComplete)?void 0:i.call(window,b))&&(null==(s=window.MotionHasOptimisedAnimation)?void 0:s.call(window,b)));return Of(()=>{m.current=!0,g&&(y.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),x.current&&g.animationState&&g.animationState.animateChanges())}),W.useEffect(()=>{g&&(!x.current&&g.animationState&&g.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{var e;null==(e=window.MotionHandoffMarkAsComplete)||e.call(window,b)}),x.current=!1),g.enteringChildren=void 0)}),g}function Cx(e){if(e)return!1!==e.options.allowProjection?e.projection:Cx(e.parent)}function Px(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&function(e){const t=ex();for(const n in e)t[n]={...t[n],...e[n]};Mv(t)}(r);const a=n?"svg"===n:mx(e),i=a?xx:bx;function s(n,r){let s;const l={...W.useContext(Vb),...n,layoutId:Nx(n)},{isStatic:u}=l,c=ix(n),d=i(n,u);if(!u&&"undefined"!=typeof window){W.useContext(Qb).strict;const t=function(e){const t=ex(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:(null==n?void 0:n.isEnabled(e))||(null==r?void 0:r.isEnabled(e))?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}(l);s=t.MeasureLayout,c.visualElement=jx(e,d,l,o,t.ProjectionNode,a)}return ee.jsxs(ax.Provider,{value:c,children:[s&&c.visualElement?ee.jsx(s,{visualElement:c.visualElement,...l}):null,gx(e,n,kx(d,c.visualElement,r),d,u,t,a)]})}s.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const l=W.forwardRef(s);return l[wx]=e,l}function Nx({layoutId:e}){const t=W.useContext(_f).id;return t&&void 0!==e?t+"-"+e:e}function Tx(e,t){if("undefined"==typeof Proxy)return Px;const n=new Map,r=(n,r)=>Px(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(o,a)=>"create"===a?r:(n.has(a)||n.set(a,Px(a,void 0,e,t)),n.get(a))})}const Mx=(e,t)=>t.isSVG??mx(e)?new my(t):new sy(t,{allowProjection:e!==W.Fragment});let Rx=0;const Lx={animation:{Feature:class extends Dv{constructor(e){super(e),e.animationState||(e.animationState=ky(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();yv(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null==(e=this.unmountControls)||e.call(this)}}},exit:{Feature:class extends Dv{constructor(){super(...arguments),this.id=Rx++,this.isExitComplete=!1}update(){var e;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&!1===r){if(this.isExitComplete){const{initial:t,custom:n}=this.node.getProps();if("string"==typeof t){const r=ig(this.node,t,n);if(r){const{transition:t,transitionEnd:n,...o}=r;for(const r in o)null==(e=this.node.getValue(r))||e.jump(o[r])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Dx(e){return{point:{x:e.pageX,y:e.pageY}}}function _x(e,t,n,r){return nb(e,t,(e=>t=>Yg(t)&&e(t,Dx(t)))(n),r)}const Ax=({current:e})=>e?e.ownerDocument.defaultView:null,Ox=(e,t)=>Math.abs(e-t);const Ix=new Set(["auto","scroll"]);class zx{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:a=3,element:i}={}){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=Fx(this.lastRawMoveEventInfo,this.transformPagePoint));const e=$x(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Ox(e.x,t.x),r=Ox(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=wp;this.history.push({...r,timestamp:o});const{onStart:a,onMove:i}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),i&&i(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=Fx(t,this.transformPagePoint),bp.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const a=$x("pointercancel"===e.type?this.lastMoveEventInfo:Fx(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Yg(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;const s=Fx(Dx(e),this.transformPagePoint),{point:l}=s,{timestamp:u}=wp;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=t;c&&c(e,$x(s,this.history)),this.removeListeners=qf(_x(this.contextWindow,"pointermove",this.handlePointerMove),_x(this.contextWindow,"pointerup",this.handlePointerUp),_x(this.contextWindow,"pointercancel",this.handlePointerUp)),i&&this.startScrollTracking(i)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(Ix.has(e.overflowX)||Ix.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){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},o=r.x-t.x,a=r.y-t.y;0===o&&0===a||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o,this.lastMoveEventInfo.point.y+=a):this.history.length>0&&(this.history[0].x-=o,this.history[0].y-=a),this.scrollPositions.set(e,r),bp.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),xp(this.updatePoint)}}function Fx(e,t){return t?{point:t(e.point)}:e}function Vx(e,t){return{x:e.x-t.x,y:e.y-t.y}}function $x({point:e},t){return{point:e,delta:Vx(e,Ux(t)),offset:Vx(e,Bx(t)),velocity:Wx(t,.1)}}function Bx(e){return e[0]}function Ux(e){return e[e.length-1]}function Wx(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Ux(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Qf(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>2*Qf(t)&&(r=e[1]);const a=Zf(o.timestamp-r.timestamp);if(0===a)return{x:0,y:0};const i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function Hx(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Gx(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}}const Yx=.35;function qx(e,t,n){return{min:Kx(e,t),max:Kx(e,n)}}function Kx(e,t){return"number"==typeof e?e:e[t]||0}const Xx=new WeakMap;class Qx{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={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:o}=this.getProps();this.panSession=new zx(e,{onSessionStart:e=>{t&&this.snapToCursor(Dx(e).point),this.stopAnimation()},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(a=n)||"y"===a?Bg[a]?null:(Bg[a]=!0,()=>{Bg[a]=!1}):Bg.x||Bg.y?null:(Bg.x=Bg.y=!0,()=>{Bg.x=Bg.y=!1}),!this.openDragLock))return;var a;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),Yy(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Hp.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=Ty(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),o&&bp.update(()=>o(e,t),!1,!0),hg(this.visualElement,"transform");const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:i}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(i),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,i),this.updateAxis("y",t.point,i),this.visualElement.render(),a&&bp.update(()=>a(e,t),!1,!0)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:o,distanceThreshold:n,contextWindow:Ax(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!n)return;const{velocity:a}=r;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&bp.postRender(()=>i(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{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){const{drag:r}=this.getProps();if(!n||!Jx(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?lh(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?lh(n,e,r.max):Math.min(e,n)),e}(a,this.constraints[e],this.elastic[e])),o.set(a)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null==(e=this.visualElement.projection)?void 0:e.layout,o=this.constraints;t&&Ex(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:Hx(e.x,n,o),y:Hx(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=Yx){return!1===e?e=0:!0===e&&(e=Yx),{x:qx(e,"left","right"),y:qx(e,"top","bottom")}}(n),o!==this.constraints&&!Ex(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Yy(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Ex(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=Xv(e,n),{scroll:o}=t;return o&&(Gv(r.x,o.offset.x),Gv(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let a=function(e,t){return{x:Gx(e.x,t.x),y:Gx(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=_v(e))}return a}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:i}=this.getProps(),s=this.constraints||{},l=Yy(i=>{if(!Jx(i,t,this.currentDirection))return;let l=s&&s[i]||{};!0!==a&&a!==i||(l={min:0,max:0});const u=r?200:1e6,c=r?40:1e7,d={type:"inertia",velocity:n?e[i]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(i,d)});return Promise.all(l).then(i)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return hg(this.visualElement,e),n.start(rg(e,n,0,t,this.visualElement,!1))}stopAnimation(){Yy(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Yy(t=>{const{drag:n}=this.getProps();if(!Jx(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:a}=r.layout.layoutBox[t],i=o.get()||0;o.set(e[t]-lh(n,a,.5)+i)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Ex(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Yy(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Ty(e),o=Ty(t);return o>r?n=Kf(t.min,t.max-r,e.min):r>o&&(n=Kf(e.min,e.max-o,t.min)),Vf(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Yy(t=>{if(!Jx(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:a}=this.constraints[t];n.set(lh(o,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Xx.set(this.visualElement,this);const e=this.visualElement.current,t=_x(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),o=t.target,a=o!==e&&function(e){return Kg.has(e.tagName)||!0===e.isContentEditable}(o);n&&r&&!a&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();Ex(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=hv(e,Zx(n)),o=hv(t,Zx(n));return()=>{r(),o()}}(e,t.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,a=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),bp.read(r);const i=nb(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Yy(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),t(),a(),s&&s(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:a=Yx,dragMomentum:i=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:a,dragMomentum:i}}}function Zx(e){let t=!0;return()=>{t?t=!1:e()}}function Jx(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const ew=e=>(t,n)=>{e&&bp.update(()=>e(t,n),!1,!0)};let tw=!1;class nw extends W.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),tw&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),sb.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,{projection:a}=n;return a?(a.isPresent=o,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),tw=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==o?a.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?a.promote():a.relegate()||bp.postRender(()=>{const e=a.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),$g.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;tw=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function rw(e){const[t,n]=Yb(),r=W.useContext(_f);return ee.jsx(nw,{...e,layoutGroup:r,switchLayoutGroup:W.useContext(Sx),isPresent:t,safeToRemove:n})}const ow={pan:{Feature:class extends Dv{constructor(){super(...arguments),this.removePointerDownListener=Gf}onPointerDown(e){this.session=new zx(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ax(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:ew(e),onStart:ew(t),onMove:ew(n),onEnd:(e,t)=>{delete this.session,r&&bp.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=_x(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Dv{constructor(e){super(e),this.removeGroupControls=Gf,this.removeListeners=Gf,this.controls=new Qx(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Gf}update(){const{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()}},ProjectionNode:Fb,MeasureLayout:rw}};function aw(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&bp.postRender(()=>o(t,Dx(t)))}function iw(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const o=r["onTap"+("End"===n?"":n)];o&&bp.postRender(()=>o(t,Dx(t)))}const sw=new WeakMap,lw=new WeakMap,uw=e=>{const t=sw.get(e.target);t&&t(e)},cw=e=>{e.forEach(uw)};function dw(e,t,n){const r=function({root:e,...t}){const n=e||document;lw.has(n)||lw.set(n,{});const r=lw.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(cw,{root:e,...t})),r[o]}(t);return sw.set(e,n),r.observe(e),()=>{sw.delete(e),r.unobserve(e)}}const fw={some:0,all:1};const pw={inView:{Feature:class extends Dv{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e;null==(e=this.stopObserver)||e.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:a}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:"number"==typeof o?o:fw[o]};this.stopObserver=dw(this.node.current,i,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,a&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=t?n:r;o&&o(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){var e;null==(e=this.stopObserver)||e.call(this),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends Dv{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=tv(e,(e,t)=>(iw(this.node,t,"Start"),(e,{success:t})=>iw(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===(null==n?void 0:n.tap)})}unmount(){}}},focus:{Feature:class extends Dv{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(bT){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=qf(nb(this.node.current,"focus",()=>this.onFocus()),nb(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Dv{mount(){const{current:e}=this.node;e&&(this.unmount=Hg(e,(e,t)=>(aw(this.node,t,"Start"),e=>aw(this.node,e,"End"))))}unmount(){}}}},hw=Tx({...Lx,...pw,...ow,...{layout:{ProjectionNode:Fb,MeasureLayout:rw}}},Mx);function mw(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=mw(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function gw(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=mw(e))&&(r&&(r+=" "),r+=t);return r}const vw=e=>{const t=ww(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),yw(n,t)||xw(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},yw=(e,t)=>{var n;if(0===e.length)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),a=o?yw(e.slice(1),o):void 0;if(a)return a;if(0===t.validators.length)return;const i=e.join("-");return null==(n=t.validators.find(({validator:e})=>e(i)))?void 0:n.classGroupId},bw=/^\[(.+)\]$/,xw=e=>{if(bw.test(e)){const t=bw.exec(e)[1],n=null==t?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ww=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return jw(Object.entries(e.classGroups),n).forEach(([e,n])=>{kw(n,r,e,t)}),r},kw=(e,t,n,r)=>{e.forEach(e=>{if("string"==typeof e){return void((""===e?t:Sw(t,e)).classGroupId=n)}if("function"==typeof e)return Ew(e)?void kw(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach(([e,o])=>{kw(o,Sw(t,e),n,r)})})},Sw=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},Ew=e=>e.isThemeGetter,jw=(e,t)=>t?e.map(([e,n])=>[e,n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e)]):e,Cw=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},Pw=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],a=t.length,i=e=>{const n=[];let i,s=0,l=0;for(let d=0;d<e.length;d++){let u=e[d];if(0===s){if(u===o&&(r||e.slice(d,d+a)===t)){n.push(e.slice(l,d)),l=d+a;continue}if("/"===u){i=d;continue}}"["===u?s++:"]"===u&&s--}const u=0===n.length?e:e.substring(l),c=u.startsWith("!");return{modifiers:n,hasImportantModifier:c,baseClassName:c?u.substring(1):u,maybePostfixModifierPosition:i&&i>l?i-l:void 0}};return n?e=>n({className:e,parseClassName:i}):i},Nw=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},Tw=/\s+/;function Mw(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Rw(e))&&(r&&(r+=" "),r+=t);return r}const Rw=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Rw(e[r]))&&(n&&(n+=" "),n+=t);return n};function Lw(e,...t){let n,r,o,a=function(s){const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:Cw(e.cacheSize),parseClassName:Pw(e),...vw(e)}))(l),r=n.cache.get,o=n.cache.set,a=i,i(s)};function i(e){const t=r(e);if(t)return t;const a=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(Tw);let s="";for(let l=i.length-1;l>=0;l-=1){const e=i[l],{modifiers:t,hasImportantModifier:u,baseClassName:c,maybePostfixModifierPosition:d}=n(e);let f=Boolean(d),p=r(f?c.substring(0,d):c);if(!p){if(!f){s=e+(s.length>0?" "+s:s);continue}if(p=r(c),!p){s=e+(s.length>0?" "+s:s);continue}f=!1}const h=Nw(t).join(":"),m=u?h+"!":h,g=m+p;if(a.includes(g))continue;a.push(g);const v=o(p,f);for(let n=0;n<v.length;++n){const e=v[n];a.push(m+e)}s=e+(s.length>0?" "+s:s)}return s})(e,n);return o(e,a),a}return function(){return a(Mw.apply(null,arguments))}}const Dw=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},_w=/^\[(?:([a-z-]+):)?(.+)\]$/i,Aw=/^\d+\/\d+$/,Ow=new Set(["px","full","screen"]),Iw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zw=/\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$/,Fw=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Vw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$w=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Bw=e=>Ww(e)||Ow.has(e)||Aw.test(e),Uw=e=>rk(e,"length",ok),Ww=e=>Boolean(e)&&!Number.isNaN(Number(e)),Hw=e=>rk(e,"number",Ww),Gw=e=>Boolean(e)&&Number.isInteger(Number(e)),Yw=e=>e.endsWith("%")&&Ww(e.slice(0,-1)),qw=e=>_w.test(e),Kw=e=>Iw.test(e),Xw=new Set(["length","size","percentage"]),Qw=e=>rk(e,Xw,ak),Zw=e=>rk(e,"position",ak),Jw=new Set(["image","url"]),ek=e=>rk(e,Jw,sk),tk=e=>rk(e,"",ik),nk=()=>!0,rk=(e,t,n)=>{const r=_w.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},ok=e=>zw.test(e)&&!Fw.test(e),ak=()=>!1,ik=e=>Vw.test(e),sk=e=>$w.test(e),lk=Lw(()=>{const e=Dw("colors"),t=Dw("spacing"),n=Dw("blur"),r=Dw("brightness"),o=Dw("borderColor"),a=Dw("borderRadius"),i=Dw("borderSpacing"),s=Dw("borderWidth"),l=Dw("contrast"),u=Dw("grayscale"),c=Dw("hueRotate"),d=Dw("invert"),f=Dw("gap"),p=Dw("gradientColorStops"),h=Dw("gradientColorStopPositions"),m=Dw("inset"),g=Dw("margin"),v=Dw("opacity"),y=Dw("padding"),b=Dw("saturate"),x=Dw("scale"),w=Dw("sepia"),k=Dw("skew"),S=Dw("space"),E=Dw("translate"),j=()=>["auto",qw,t],C=()=>[qw,t],P=()=>["",Bw,Uw],N=()=>["auto",Ww,qw],T=()=>["","0",qw],M=()=>[Ww,qw];return{cacheSize:500,separator:":",theme:{colors:[nk],spacing:[Bw,Uw],blur:["none","",Kw,qw],brightness:M(),borderColor:[e],borderRadius:["none","","full",Kw,qw],borderSpacing:C(),borderWidth:P(),contrast:M(),grayscale:T(),hueRotate:M(),invert:T(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[Yw,Uw],inset:j(),margin:j(),opacity:M(),padding:C(),saturate:M(),scale:M(),sepia:T(),skew:M(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",qw]}],container:["container"],columns:[{columns:[Kw]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"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"],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:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",qw]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Gw,qw]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",qw]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",Gw,qw]}],"grid-cols":[{"grid-cols":[nk]}],"col-start-end":[{col:["auto",{span:["full",Gw,qw]},qw]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[nk]}],"row-start-end":[{row:["auto",{span:[Gw,qw]},qw]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",qw]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",qw]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",qw,t]}],"min-w":[{"min-w":[qw,t,"min","max","fit"]}],"max-w":[{"max-w":[qw,t,"none","full","min","max","fit","prose",{screen:[Kw]},Kw]}],h:[{h:[qw,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[qw,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[qw,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[qw,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Kw,Uw]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Hw]}],"font-family":[{font:[nk]}],"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:["tighter","tight","normal","wide","wider","widest",qw]}],"line-clamp":[{"line-clamp":["none",Ww,Hw]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Bw,qw]}],"list-image":[{"list-image":["none",qw]}],"list-style-type":[{list:["none","disc","decimal",qw]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Bw,Uw]}],"underline-offset":[{"underline-offset":["auto",Bw,qw]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qw]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",qw]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",Zw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Qw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ek]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[Bw,qw]}],"outline-w":[{outline:[Bw,Uw]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Bw,Uw]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Kw,tk]}],"shadow-color":[{shadow:[nk]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Kw,qw]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",qw]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",qw]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",qw]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Gw,qw]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",qw]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",qw]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",qw]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Bw,Uw,Hw]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function uk(...e){return lk(gw(e))}const ck=W.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:uk("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));ck.displayName="Card";const dk=W.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:uk("flex flex-col space-y-1.5 p-6",e),...t}));dk.displayName="CardHeader";const fk=W.forwardRef(({className:e,...t},n)=>ee.jsx("h3",{ref:n,className:uk("text-2xl font-semibold leading-none tracking-tight",e),...t}));fk.displayName="CardTitle";const pk=W.forwardRef(({className:e,...t},n)=>ee.jsx("p",{ref:n,className:uk("text-sm text-muted-foreground",e),...t}));pk.displayName="CardDescription";const hk=W.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:uk("p-6 pt-0",e),...t}));hk.displayName="CardContent";const mk=W.forwardRef(({className:e,...t},n)=>ee.jsx("div",{ref:n,className:uk("flex items-center p-6 pt-0",e),...t}));function gk(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function vk(...e){return t=>{let n=!1;const r=e.map(e=>{const r=gk(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():gk(e[t],null)}}}}function yk(...e){return W.useCallback(vk(...e),e)}mk.displayName="CardFooter";var bk=Symbol.for("react.lazy"),xk=G[" use ".trim().toString()];function wk(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===bk&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function kk(e){const t=Ek(e),n=W.forwardRef((e,n)=>{let{children:r,...o}=e;wk(r)&&"function"==typeof xk&&(r=xk(r._payload));const a=W.Children.toArray(r),i=a.find(Ck);if(i){const e=i.props.children,r=a.map(t=>t===i?W.Children.count(e)>1?W.Children.only(null):W.isValidElement(e)?e.props.children:null:t);return ee.jsx(t,{...o,ref:n,children:W.isValidElement(e)?W.cloneElement(e,void 0,r):null})}return ee.jsx(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var Sk=kk("Slot");function Ek(e){const t=W.forwardRef((e,t)=>{let{children:n,...r}=e;if(wk(n)&&"function"==typeof xk&&(n=xk(n._payload)),W.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==W.Fragment&&(o.ref=t?vk(t,e):e),W.cloneElement(n,o)}return W.Children.count(n)>1?W.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jk=Symbol("radix.slottable");function Ck(e){return W.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===jk}const Pk=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,Nk=gw,Tk=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return Nk(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const i=Pk(t)||Pk(r);return o[e][i]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]);return Nk(e,i,l,null==n?void 0:n.class,null==n?void 0:n.className)},Mk=Tk("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Rk=W.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const i=r?Sk:"button";return ee.jsx(i,{className:uk(Mk({variant:t,size:n,className:e})),ref:a,...o})});Rk.displayName="Button";const Lk=W.forwardRef(({className:e,type:t,...n},r)=>ee.jsx("input",{type:t,className:uk("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));Lk.displayName="Input";var Dk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=kk(`Primitive.${t}`),r=W.forwardRef((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),ee.jsx(i,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),_k=W.forwardRef((e,t)=>ee.jsx(Dk.label,{...e,ref:t,onMouseDown:t=>{var n;t.target.closest("button, input, select, textarea")||(null==(n=e.onMouseDown)||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));_k.displayName="Label";var Ak=_k;const Ok=Tk("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Ik=W.forwardRef(({className:e,...t},n)=>ee.jsx(Ak,{ref:n,className:uk(Ok(),e),...t}));Ik.displayName=Ak.displayName;const zk=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach(n=>n(t,e))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>i,subscribe:e=>(n.add(e),()=>n.delete(e))},i=t=e(r,o,a);return a},Fk=e=>e;const Vk=e=>{const t=(e=>e?zk(e):zk)(e),n=e=>function(e,t=Fk){const n=H.useSyncExternalStore(e.subscribe,H.useCallback(()=>t(e.getState()),[e,t]),H.useCallback(()=>t(e.getInitialState()),[e,t]));return H.useDebugValue(n),n}(t,e);return Object.assign(n,t),n},$k=e=>e?Vk(e):Vk,Bk={token:"cc_web_token",theme:"cc_web_theme",viewMode:e=>`cc_viewmode_${e}`,panelFileTree:"cc_panel_filetree",panelShortcuts:"cc_panel_shortcuts",fileZoom:"cc_file_zoom",skillhubAuthor:"ccweb_skillhub_author",projectOrder:"cc_project_order",pomodoroConfig:"cc_pomodoro_config",panelLeftWidth:"cc_panel_left_width",panelRightWidth:"cc_panel_right_width",terminalDraft:e=>`cc_terminal_draft_${e}`,usedSkills:"cc_used_skills",usedShortcuts:e=>`cc_used_shortcuts_${e}`,projectModel:e=>`cc_project_model_${e}`,draftState:e=>`cc_draft_state_${e}`,usageMonitorTool:"cc_usage_monitor_tool",monitorMode:"cc_monitor_mode",chatOverlay:e=>`cc_chat_overlay_${e}`,rightPanelTab:"cc_right_panel_tab",leftPanelTab:"cc_left_panel_tab"};function Uk(e,t,n){try{const r=localStorage.getItem(e);return null===r?t:n?JSON.parse(r):r}catch{return t}}function Wk(e,t,n){try{localStorage.setItem(e,n?JSON.stringify(t):String(t))}catch{}}function Hk(e){try{localStorage.removeItem(e)}catch{}}function Gk(e,t,n){const r=(null==n?void 0:n.parse)??!1,[o,a]=W.useState(()=>{try{const n=localStorage.getItem(e);return null===n?t:r?JSON.parse(n):n}catch{return t}});return[o,W.useCallback(t=>{a(n=>{const o="function"==typeof t?t(n):t;try{localStorage.setItem(e,r?JSON.stringify(o):String(o))}catch{}return o})},[e,r])]}const Yk=$k(e=>({token:localStorage.getItem(Bk.token),setToken:t=>{Wk(Bk.token,t),e({token:t})},clearToken:()=>{Hk(Bk.token),e({token:null})}}));let qk=null;const Kk=$k((e,t)=>({projects:[],loading:!1,error:null,hasFetched:!1,fetchProjects:async()=>{if(!t().loading){e({loading:!0,error:null});try{const t=await async function(){if(!qk){const e=await fd(()=>Promise.resolve().then(()=>kE),void 0);qk=e.getProjects}return qk()}();e({projects:t,hasFetched:!0})}catch(n){e({error:n instanceof Error?n.message:"Failed to load projects"})}finally{e({loading:!1})}}},addProject:t=>e(e=>({projects:[...e.projects,t]})),updateProject:t=>e(e=>({projects:e.projects.map(e=>e.id===t.id?t:e)})),removeProject:t=>e(e=>({projects:e.projects.filter(e=>e.id!==t)})),setProjects:t=>e({projects:t})})),Xk={filePreviewPath:null,shortcutEditorOpen:!1,shortcutEditingId:null,shareHubOpen:!1,shareHubLabel:"",shareHubCommand:""},Qk=$k((e,t)=>({entries:{},get:e=>t().entries[e]??Xk,setFilePreviewPath:(t,n)=>e(e=>({entries:{...e.entries,[t]:{...e.entries[t]??Xk,filePreviewPath:n}}})),setShortcutEditor:(t,n,r=null)=>e(e=>({entries:{...e.entries,[t]:{...e.entries[t]??Xk,shortcutEditorOpen:n,shortcutEditingId:n?r:null}}})),setShareHub:(t,n,r="",o="")=>e(e=>({entries:{...e.entries,[t]:{...e.entries[t]??Xk,shareHubOpen:n,shareHubLabel:n?r:"",shareHubCommand:n?o:""}}}))}));function Zk(){return Yk.getState().token}function Jk(){Yk.getState().clearToken()}async function eS(e,t,n,r=!0,o){const a={"Content-Type":"application/json"};if(r){const e=Zk();e&&(a.Authorization=`Bearer ${e}`)}const i=await fetch(`${t}`,{method:e,headers:a,body:void 0!==n?JSON.stringify(n):void 0,signal:o});if(401===i.status)throw Jk(),"/login"!==window.location.pathname&&(window.location.href="/login"),new Error("Unauthorized");if(!i.ok){let e=`HTTP ${i.status}`;try{const t=await i.json();t.error&&(e=t.error)}catch{}throw new Error(e)}return i.json()}async function tS(e,t){return(await eS("POST","/api/auth/login",{username:e,password:t},!1)).token}function nS(){const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"::1"===e}async function rS(){return(await eS("GET","/api/auth/local-token",void 0,!1)).token}async function oS(){return(await eS("GET","/api/projects/order")).order}async function aS(e){await eS("PUT","/api/projects/order",{order:e})}async function iS(){return eS("GET","/api/projects/users")}async function sS(e,t){return eS("PUT",`/api/projects/${e}/shares`,{shares:t})}async function lS(e){return eS("POST","/api/projects",e)}async function uS(e){return eS("POST","/api/projects/open",{folderPath:e})}async function cS(e){await eS("DELETE",`/api/projects/${e}`)}async function dS(e){return eS("PATCH",`/api/projects/${e}/start`)}async function fS(e){return eS("PATCH",`/api/projects/${e}/archive`)}async function pS(e){return eS("PATCH",`/api/projects/${e}/unarchive`)}async function hS(){return eS("GET","/api/shortcuts")}async function mS(e){return eS("POST","/api/shortcuts",e)}async function gS(e,t){return eS("PUT",`/api/shortcuts/${e}`,t)}async function vS(e){await eS("DELETE",`/api/shortcuts/${e}`)}async function yS(e){return eS("GET",`/api/shortcuts/project/${e}`)}async function bS(e,t){return eS("POST",`/api/shortcuts/project/${e}`,t)}async function xS(e,t,n){return eS("PUT",`/api/shortcuts/project/${e}/${t}`,n)}async function wS(e,t){await eS("DELETE",`/api/shortcuts/project/${e}/${t}`)}async function kS(){return eS("GET","/api/prompts")}async function SS(e){return eS("POST","/api/prompts",e)}async function ES(e,t){return eS("PUT",`/api/prompts/${e}`,t)}async function jS(e){await eS("DELETE",`/api/prompts/${e}`)}async function CS(e){return eS("GET",`/api/prompts/project/${e}`)}async function PS(e,t){return eS("POST",`/api/prompts/project/${e}`,t)}async function NS(e,t,n){return eS("PUT",`/api/prompts/project/${e}/${t}`,n)}async function TS(e,t){await eS("DELETE",`/api/prompts/project/${e}/${t}`)}async function MS(e){return eS("GET",`/api/memory/project/${encodeURIComponent(e)}`)}async function RS(e,t,n){return eS("POST",`/api/memory/project/${encodeURIComponent(e)}/toggle`,{filename:t,action:n})}async function LS(e,t,n){return eS("POST",`/api/prompts/project/${e}/toggle`,{text:t,action:n})}async function DS(){return eS("GET","/api/skillhub/items")}async function _S(){return eS("GET","/api/skillhub/auth")}async function AS(e){return eS("PUT","/api/skillhub/auth",{token:e})}async function OS(){await eS("DELETE","/api/skillhub/auth")}async function IS(e){return eS("POST","/api/skillhub/submit",e)}async function zS(e="claude"){return eS("GET",`/api/projects/usage?tool=${encodeURIComponent(e)}`)}async function FS(e="claude"){return eS("GET",`/api/projects/usage?refresh=true&tool=${encodeURIComponent(e)}`)}async function VS(e){return eS("GET",`/api/filesystem${e?`?path=${encodeURIComponent(e)}`:""}`)}function $S(e){return`/api/filesystem/raw?path=${encodeURIComponent(e)}`}async function BS(e,t){const n=new FormData;n.append("path",e);for(const i of t)n.append("files",i);const r={},o=Zk();o&&(r.Authorization=`Bearer ${o}`);const a=await fetch("/api/filesystem/upload",{method:"POST",headers:r,body:n});if(!a.ok){const e=await a.json().catch(()=>({}));throw new Error(e.error||`Upload failed: ${a.status}`)}return a.json()}async function US(e,t){return eS("POST","/api/filesystem/mkdir",{path:e,name:t})}async function WS(e){return eS("GET",`/api/filesystem/file?path=${encodeURIComponent(e)}`)}async function HS(e,t){return eS("PUT","/api/filesystem/file",{path:e,content:t})}async function GS(e){return eS("DELETE",`/api/filesystem?path=${encodeURIComponent(e)}`)}async function YS(){return eS("GET","/api/update/check-version")}async function qS(){return eS("POST","/api/update/execute")}async function KS(){return eS("GET","/api/update/status")}async function XS(){return eS("GET","/api/notify/config")}async function QS(e){return eS("PUT","/api/notify/config",e)}async function ZS(e){return eS("GET",`/api/projects/${e}/git/status`)}async function JS(e,t){return eS("GET",`/api/projects/${e}/git/diff${t?`?file=${encodeURIComponent(t)}`:""}`)}async function eE(e,t){await eS("POST",`/api/projects/${e}/git/add`,{files:t})}async function tE(e,t){await eS("POST",`/api/projects/${e}/git/commit`,{message:t})}async function nE(e,t=50,n=0){return eS("GET",`/api/projects/${e}/git/log?limit=${t}&skip=${n}`)}async function rE(e,t){return eS("PATCH",`/api/projects/${e}/rename`,{name:t})}async function oE(e,t={}){const n=new URLSearchParams;null!=t.limit&&n.set("limit",String(t.limit)),t.before&&n.set("before",t.before);const r=n.toString();return eS("GET",`/api/projects/${e}/chat-history${r?"?"+r:""}`)}async function aE(e){return eS("GET",`/api/projects/${e}/disk-size`)}async function iE(e){return eS("GET",`/api/tool/model?tool=${encodeURIComponent(e)}`)}async function sE(e,t){return eS("PUT",`/api/tool/model?tool=${encodeURIComponent(e)}`,{model:t})}async function lE(e){return eS("GET",`/api/tool/models?tool=${encodeURIComponent(e)}`)}async function uE(e,t){return eS("GET",`/api/tool/skills${t?`?tool=${encodeURIComponent(e)}&projectId=${encodeURIComponent(t)}`:`?tool=${encodeURIComponent(e)}`}`)}async function cE(){return eS("GET","/api/plugins")}async function dE(e){return eS("POST","/api/plugins/install",{downloadUrl:e})}async function fE(e){await eS("DELETE",`/api/plugins/${e}`)}async function pE(e,t){return eS("PUT",`/api/plugins/${e}/config`,t)}async function hE(e,t){await eS("PUT",`/api/plugins/${e}/enabled`,{enabled:t})}async function mE(e){return eS("GET",`/api/approval/${encodeURIComponent(e)}/pending`)}async function gE(e,t,n,r){return eS("POST",`/api/approval/${encodeURIComponent(e)}/${encodeURIComponent(t)}/decide`,{behavior:n,message:r})}async function vE(){return eS("GET","/api/sync/config")}async function yE(e){return eS("PUT","/api/sync/config",e)}async function bE(){return eS("POST","/api/sync/test")}async function xE(e,t){return eS("POST",`/api/sync/project/${encodeURIComponent(e)}`,t?{direction:t}:{})}async function wE(){return eS("POST","/api/sync/all")}const kE=Object.freeze(Object.defineProperty({__proto__:null,archiveProject:fS,browseFilesystem:VS,checkRunningProjects:async function(){return eS("GET","/api/update/check-running")},checkVersion:YS,clearHubToken:OS,clearToken:Jk,createFolder:US,createGlobalPrompt:SS,createGlobalShortcut:mS,createProject:lS,createProjectPrompt:PS,createProjectShortcut:bS,decideApproval:gE,deleteGlobalPrompt:jS,deleteGlobalShortcut:vS,deletePath:GS,deleteProject:cS,deleteProjectPrompt:TS,deleteProjectShortcut:wS,executeUpdate:qS,getAllUsers:iS,getChatHistory:oE,getClaudeModel:async function(){return eS("GET","/api/claude/model")},getClaudeSkills:async function(){return eS("GET","/api/claude/skills")},getGitDiff:JS,getGitLog:nE,getGitStatus:ZS,getGlobalPrompts:kS,getGlobalShortcuts:hS,getHubAuthStatus:_S,getHubItems:DS,getInstalledPlugins:cE,getLocalToken:rS,getMemoryPrompts:MS,getNotifyConfig:XS,getPendingApprovals:mE,getProjectDiskSize:aE,getProjectOrder:oS,getProjectPrompts:CS,getProjectShortcuts:yS,getProjects:async function(){return eS("GET","/api/projects")},getProjectsActivity:async function(e){return eS("GET","/api/projects/activity",void 0,!0,e)},getRawFileUrl:$S,getSyncConfig:vE,getSyncStatus:async function(){return eS("GET","/api/sync/status")},getToken:Zk,getToolModel:iE,getToolModels:lE,getToolSkills:uE,getUpdateStatus:KS,getUsage:zS,getWorkspace:async function(){return(await eS("GET","/api/projects/workspace")).workspace},gitAdd:eE,gitCommit:tE,installPlugin:dE,isLocalAccess:nS,login:tS,openProject:uS,prepareForUpdate:async function(){return eS("POST","/api/update/prepare")},readFile:WS,refreshUsage:FS,renameProject:rE,resetSyncConfig:async function(){return eS("POST","/api/sync/reset")},setHubToken:AS,setPluginEnabled:hE,setProjectOrder:aS,setToken:function(e){var t;t=e,Yk.getState().setToken(t)},setToolModel:sE,startProject:dS,stopProject:async function(e){return eS("PATCH",`/api/projects/${e}/stop`)},submitToHub:IS,syncAll:wE,syncProjectOnce:xE,testSyncConnection:bE,toggleMemoryInClaudeMd:RS,togglePromptInClaudeMd:LS,unarchiveProject:pS,uninstallPlugin:fE,updateGlobalPrompt:ES,updateGlobalShortcut:gS,updateNotifyConfig:QS,updatePlugin:async function(e,t){return eS("POST",`/api/plugins/${e}/update`,{downloadUrl:t})},updatePluginConfig:pE,updateProjectPrompt:NS,updateProjectShares:sS,updateProjectShortcut:xS,updateProjectTags:async function(e,t){return eS("PATCH",`/api/projects/${e}/tags`,{tags:t})},updateSyncConfig:yE,uploadFiles:BS,writeFile:HS},Symbol.toStringTag,{value:"Module"}));function SE(){const e=cf(),t=Yk(e=>e.setToken),[n,r]=W.useState(""),[o,a]=W.useState(""),[i,s]=W.useState(null),[l,u]=W.useState(!1);W.useEffect(()=>{if(!nS())return;let n=!1;return(async()=>{try{const r=await rS();n||(t(r),e("/",{replace:!0}))}catch{}})(),()=>{n=!0}},[e,t]);return ee.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background p-4",children:ee.jsx(hw.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,ease:"easeOut"},className:"w-full max-w-sm",children:ee.jsxs(ck,{children:[ee.jsxs(dk,{className:"text-center",children:[ee.jsx(fk,{className:"text-2xl",children:"CC Web"}),ee.jsx(pk,{children:nS()?"Connecting locally...":"Sign in to manage your Claude projects"})]}),ee.jsxs("form",{onSubmit:r=>{(async r=>{r.preventDefault(),s(null),u(!0);try{const r=await tS(n,o);t(r),e("/")}catch(a){s(a instanceof Error?a.message:"Login failed")}finally{u(!1)}})(r)},children:[ee.jsxs(hk,{className:"space-y-4",children:[ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ik,{htmlFor:"username",children:"Username"}),ee.jsx(Lk,{id:"username",type:"text",autoComplete:"username",value:n,onChange:e=>r(e.target.value),required:!0,autoFocus:!0})]}),ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ik,{htmlFor:"password",children:"Password"}),ee.jsx(Lk,{id:"password",type:"password",autoComplete:"current-password",value:o,onChange:e=>a(e.target.value),required:!0})]}),ee.jsx(Xb,{children:i&&ee.jsx(hw.p,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.2},className:"text-sm text-destructive",children:i})})]}),ee.jsx(mk,{children:ee.jsx(hw.div,{className:"w-full",whileTap:{scale:.98},children:ee.jsx(Rk,{type:"submit",className:"w-full",disabled:l,children:l?"Signing in...":"Sign In"})})})]})]})})})}
64
64
  /**
65
65
  * @license lucide-react v0.309.0 - ISC
66
66
  *
67
67
  * This source code is licensed under the ISC license.
68
68
  * See the LICENSE file in the root directory of this source tree.
69
- */var AE={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"};
69
+ */var EE={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"};
70
70
  /**
71
71
  * @license lucide-react v0.309.0 - ISC
72
72
  *
73
73
  * This source code is licensed under the ISC license.
74
74
  * See the LICENSE file in the root directory of this source tree.
75
- */const OE=(e,t)=>{const n=W.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:i="",children:s,...l},u)=>{return W.createElement("svg",{ref:u,...AE,width:r,height:r,stroke:n,strokeWidth:a?24*Number(o)/Number(r):o,className:["lucide",`lucide-${c=e,c.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim()}`,i].join(" "),...l},[...t.map(([e,t])=>W.createElement(e,t)),...Array.isArray(s)?s:[s]]);var c});return n.displayName=`${e}`,n},IE=OE("ArchiveRestore",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]]),zE=OE("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]),FE=OE("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),VE=OE("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),BE=OE("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),$E=OE("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),UE=OE("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),WE=OE("File",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}]]),HE=OE("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),GE=OE("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["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"}]]),YE=OE("FolderSync",[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v.5",key:"1dkoa9"}],["path",{d:"M12 10v4h4",key:"1czhmt"}],["path",{d:"m12 14 1.535-1.605a5 5 0 0 1 8 1.5",key:"lvuxfi"}],["path",{d:"M22 22v-4h-4",key:"1ewp4q"}],["path",{d:"m22 18-1.535 1.605a5 5 0 0 1-8-1.5",key:"14ync0"}]]),qE=OE("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"}]]),KE=OE("GitMerge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]),XE=OE("GripHorizontal",[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]]),QE=OE("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),ZE=OE("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]),JE=OE("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",key:"1kog09"}]]),ej=OE("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),tj=OE("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),nj=OE("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),rj=OE("Maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]),oj=OE("Minimize",[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]]),aj=OE("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),ij=OE("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),sj=OE("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),lj=OE("Pencil",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),uj=OE("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),cj=OE("RefreshCw",[["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"}]]),dj=OE("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]),fj=OE("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),pj=OE("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),hj=OE("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]),mj=OE("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]),gj=OE("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),vj=OE("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]),yj=OE("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]),bj=OE("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),xj=OE("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),wj=OE("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),kj=OE("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),Sj=Tk("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ej({className:e,variant:t,...n}){return ee.jsx("div",{className:uk(Sj({variant:t}),e),...n})}function jj(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function Cj(e,t=[]){let n=[];const r=()=>{const t=n.map(e=>W.createContext(e));return function(n){const r=(null==n?void 0:n[e])||t;return W.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){const o=W.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,u=W.useMemo(()=>s,Object.values(s));return ee.jsx(l.Provider,{value:u,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[a])||o,u=W.useContext(l);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},Pj(r,...t)]}function Pj(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const r=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return W.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var Nj=(null==globalThis?void 0:globalThis.document)?W.useLayoutEffect:()=>{},Tj=G[" useId ".trim().toString()]||(()=>{}),Mj=0;function Rj(e){const[t,n]=W.useState(Tj());return Nj(()=>{n(e=>e??String(Mj++))},[e]),e||(t?`radix-${t}`:"")}var Lj=G[" useInsertionEffect ".trim().toString()]||Nj;function Dj({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=function({defaultProp:e,onChange:t}){const[n,r]=W.useState(e),o=W.useRef(n),a=W.useRef(t);return Lj(()=>{a.current=t},[t]),W.useEffect(()=>{var e;o.current!==n&&(null==(e=a.current)||e.call(a,n),o.current=n)},[n,o]),[n,r,a]}({defaultProp:t,onChange:n}),s=void 0!==e,l=s?e:o;{const t=W.useRef(void 0!==e);W.useEffect(()=>{const e=t.current;if(e!==s){const t=e?"controlled":"uncontrolled",n=s?"controlled":"uncontrolled";console.warn(`${r} is changing from ${t} to ${n}. 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])}const u=W.useCallback(t=>{var n;if(s){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&(null==(n=i.current)||n.call(i,r))}else a(t)},[s,e,a,i]);return[l,u]}function _j(e){const t=Aj(e),n=W.forwardRef((e,n)=>{const{children:r,...o}=e,a=W.Children.toArray(r),i=a.find(Ij);if(i){const e=i.props.children,r=a.map(t=>t===i?W.Children.count(e)>1?W.Children.only(null):W.isValidElement(e)?e.props.children:null:t);return ee.jsx(t,{...o,ref:n,children:W.isValidElement(e)?W.cloneElement(e,void 0,r):null})}return ee.jsx(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Aj(e){const t=W.forwardRef((e,t)=>{const{children:n,...r}=e;if(W.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==W.Fragment&&(o.ref=t?vk(t,e):e),W.cloneElement(n,o)}return W.Children.count(n)>1?W.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Oj=Symbol("radix.slottable");function Ij(e){return W.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Oj}var zj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=_j(`Primitive.${t}`),r=W.forwardRef((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),ee.jsx(i,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Fj(e,t){e&&ld.flushSync(()=>e.dispatchEvent(t))}function Vj(e){const t=W.useRef(e);return W.useEffect(()=>{t.current=e}),W.useMemo(()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)},[])}var Bj,$j="dismissableLayer.update",Uj="dismissableLayer.pointerDownOutside",Wj="dismissableLayer.focusOutside",Hj=W.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Gj=W.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=W.useContext(Hj),[c,d]=W.useState(null),f=(null==c?void 0:c.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,p]=W.useState({}),h=yk(t,e=>d(e)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(g),y=c?m.indexOf(c):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=Vj(e),r=W.useRef(!1),o=W.useRef(()=>{});return W.useEffect(()=>{const e=e=>{if(e.target&&!r.current){let r=function(){qj(Uj,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{const t=e.target,n=[...u.branches].some(e=>e.contains(t));x&&!n&&(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())},f),k=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=Vj(e),r=W.useRef(!1);return W.useEffect(()=>{const e=e=>{if(e.target&&!r.current){qj(Wj,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{const t=e.target;[...u.branches].some(e=>e.contains(t))||(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())},f);return function(e,t=(null==globalThis?void 0:globalThis.document)){const n=Vj(e);W.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{y===u.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),W.useEffect(()=>{if(c)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(Bj=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Yj(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=Bj)}},[c,f,n,u]),W.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Yj())},[c,u]),W.useEffect(()=>{const e=()=>p({});return document.addEventListener($j,e),()=>document.removeEventListener($j,e)},[]),ee.jsx(zj.div,{...l,ref:h,style:{pointerEvents:b?x?"auto":"none":void 0,...e.style},onFocusCapture:jj(e.onFocusCapture,k.onFocusCapture),onBlurCapture:jj(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:jj(e.onPointerDownCapture,w.onPointerDownCapture)})});Gj.displayName="DismissableLayer";function Yj(){const e=new CustomEvent($j);document.dispatchEvent(e)}function qj(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Fj(o,a):o.dispatchEvent(a)}W.forwardRef((e,t)=>{const n=W.useContext(Hj),r=W.useRef(null),o=yk(t,r);return W.useEffect(()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),ee.jsx(zj.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var Kj="focusScope.autoFocusOnMount",Xj="focusScope.autoFocusOnUnmount",Qj={bubbles:!1,cancelable:!0},Zj=W.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,l]=W.useState(null),u=Vj(o),c=Vj(a),d=W.useRef(null),f=yk(t,e=>l(e)),p=W.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;W.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:nC(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||nC(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&nC(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const 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]),W.useEffect(()=>{if(s){rC.add(p);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(Kj,Qj);s.addEventListener(Kj,u),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(nC(r,{select:t}),document.activeElement!==n)return}((e=Jj(s),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&nC(s))}return()=>{s.removeEventListener(Kj,u),setTimeout(()=>{const e=new CustomEvent(Xj,Qj);s.addEventListener(Xj,c),s.dispatchEvent(e),e.defaultPrevented||nC(t??document.body,{select:!0}),s.removeEventListener(Xj,c),rC.remove(p)},0)}}var e},[s,u,c,p]);const h=W.useCallback(e=>{if(!n&&!r)return;if(p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=function(e){const t=Jj(e),n=eC(t,e),r=eC(t.reverse(),e);return[n,r]}(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&nC(a,{select:!0})):(e.preventDefault(),n&&nC(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,p.paused]);return ee.jsx(zj.div,{tabIndex:-1,...i,ref:f,onKeyDown:h})});function Jj(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;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 eC(e,t){for(const n of e)if(!tC(n,{upTo:t}))return n}function tC(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function nC(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}Zj.displayName="FocusScope";var rC=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=oC(e,t),e.unshift(t)},remove(t){var n;e=oC(e,t),null==(n=e[0])||n.resume()}}}();function oC(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var aC=W.forwardRef((e,t)=>{var n;const{container:r,...o}=e,[a,i]=W.useState(!1);Nj(()=>i(!0),[]);const s=r||a&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return s?ud.createPortal(ee.jsx(zj.div,{...o,ref:t}),s):null});aC.displayName="Portal";var iC=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=W.useState(),r=W.useRef(null),o=W.useRef(e),a=W.useRef("none"),i=e?"mounted":"unmounted",[s,l]=function(e,t){return W.useReducer((e,n)=>t[e][n]??e,e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return W.useEffect(()=>{const e=sC(r.current);a.current="mounted"===s?e:"none"},[s]),Nj(()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=sC(t);if(e)l("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}},[e,l]),Nj(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=sC(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&i&&(l("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=sC(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:W.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}(t),o="function"==typeof n?n({present:r.isPresent}):W.Children.only(n),a=yk(r.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof n||r.isPresent?W.cloneElement(o,{ref:a}):null};function sC(e){return(null==e?void 0:e.animationName)||"none"}iC.displayName="Presence";var lC=0;function uC(){W.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??cC()),document.body.insertAdjacentElement("beforeend",e[1]??cC()),lC++,()=>{1===lC&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),lC--}},[])}function cC(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var dC=function(){return dC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},dC.apply(this,arguments)};function fC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var pC="right-scroll-bar-position",hC="width-before-scroll-bar";function mC(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var gC="undefined"!=typeof window?W.useLayoutEffect:W.useEffect,vC=new WeakMap;function yC(e,t){var n,r,o,a=(n=null,r=function(t){return e.forEach(function(e){return mC(e,t)})},(o=W.useState(function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0]).callback=r,o.facade);return gC(function(){var t=vC.get(a);if(t){var n=new Set(t),r=new Set(e),o=a.current;n.forEach(function(e){r.has(e)||mC(e,null)}),r.forEach(function(e){n.has(e)||mC(e,o)})}vC.set(a,e)},[e]),a}function bC(e){return e}var xC=function(e){var t=e.sideCar,n=fC(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return W.createElement(r,dC({},n))};xC.isSideCarExport=!0;var wC=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=bC);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},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 o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=dC({async:!0,ssr:!1},e),t}(),kC=function(){},SC=W.forwardRef(function(e,t){var n=W.useRef(null),r=W.useState({onScrollCapture:kC,onWheelCapture:kC,onTouchMoveCapture:kC}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,v=e.as,y=void 0===v?"div":v,b=e.gapMode,x=fC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,k=yC([n,t]),S=dC(dC({},x),o);return W.createElement(W.Fragment,null,c&&W.createElement(w,{sideCar:wC,removeScrollBar:u,shards:d,noRelative:p,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:b}),i?W.cloneElement(W.Children.only(s),dC(dC({},S),{ref:k})):W.createElement(y,dC({},S,{className:l,ref:k}),s))});SC.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},SC.classNames={fullWidth:hC,zeroRight:pC};function EC(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var jC=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=EC())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},CC=function(){var e,t=(e=jC(),function(t,n){W.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},PC={left:0,top:0,right:0,gap:0},NC=function(e){return parseInt(e||"",10)||0},TC=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return PC;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[NC(n),NC(r),NC(o)]}(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])}},MC=CC(),RC="data-scroll-locked",LC=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(RC,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(pC," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(hC," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(pC," .").concat(pC," {\n right: 0 ").concat(r,";\n }\n \n .").concat(hC," .").concat(hC," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(RC,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},DC=function(){var e=parseInt(document.body.getAttribute(RC)||"0",10);return isFinite(e)?e:0},_C=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;W.useEffect(function(){return document.body.setAttribute(RC,(DC()+1).toString()),function(){var e=DC()-1;e<=0?document.body.removeAttribute(RC):document.body.setAttribute(RC,e.toString())}},[]);var a=W.useMemo(function(){return TC(o)},[o]);return W.createElement(MC,{styles:LC(a,!t,o,n?"":"!important")})},AC=!1;if("undefined"!=typeof window)try{var OC=Object.defineProperty({},"passive",{get:function(){return AC=!0,!0}});window.addEventListener("test",OC,OC),window.removeEventListener("test",OC,OC)}catch(RT){AC=!1}var IC=!!AC&&{passive:!1},zC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},FC=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),VC(e,r)){var o=BC(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},VC=function(e,t){return"v"===e?function(e){return zC(e,"overflowY")}(t):function(e){return zC(e,"overflowX")}(t)},BC=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},$C=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},UC=function(e){return[e.deltaX,e.deltaY]},WC=function(e){return e&&"current"in e?e.current:e},HC=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},GC=0,YC=[];function qC(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const KC=(XC=function(e){var t=W.useRef([]),n=W.useRef([0,0]),r=W.useRef(),o=W.useState(GC++)[0],a=W.useState(CC)[0],i=W.useRef(e);W.useEffect(function(){i.current=e},[e]),W.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(WC),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=W.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=$C(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-a[0],u="deltaY"in e?e.deltaY:s[1]-a[1],c=e.target,d=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===c||p.contains(c)))return!1;var h=FC(d,c);if(!h)return!0;if(h?o=d:(o="v"===d?"h":"v",h=FC(d,c)),!h)return!1;if(!r.current&&"changedTouches"in e&&(l||u)&&(r.current=o),!o)return!0;var m=r.current||o;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*r,i=n.target,s=t.contains(i),l=!1,u=a>0,c=0,d=0;do{if(!i)break;var f=BC(e,i),p=f[0],h=f[1]-f[2]-o*p;(p||h)&&VC(e,i)&&(c+=h,d+=p);var m=i.parentNode;i=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return(u&&Math.abs(c)<1||!u&&Math.abs(d)<1)&&(l=!0),l}(m,t,e,"h"===m?l:u)},[]),l=W.useCallback(function(e){var n=e;if(YC.length&&YC[YC.length-1]===a){var r="deltaY"in n?UC(n):$C(n),o=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o})[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var l=(i.current.shards||[]).map(WC).filter(Boolean).filter(function(e){return e.contains(n.target)});(l.length>0?s(n,l[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=W.useCallback(function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:qC(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),c=W.useCallback(function(e){n.current=$C(e),r.current=void 0},[]),d=W.useCallback(function(t){u(t.type,UC(t),t.target,s(t,e.lockRef.current))},[]),f=W.useCallback(function(t){u(t.type,$C(t),t.target,s(t,e.lockRef.current))},[]);W.useEffect(function(){return YC.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,IC),document.addEventListener("touchmove",l,IC),document.addEventListener("touchstart",c,IC),function(){YC=YC.filter(function(e){return e!==a}),document.removeEventListener("wheel",l,IC),document.removeEventListener("touchmove",l,IC),document.removeEventListener("touchstart",c,IC)}},[]);var p=e.removeScrollBar,h=e.inert;return W.createElement(W.Fragment,null,h?W.createElement(a,{styles:HC(o)}):null,p?W.createElement(_C,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},wC.useMedium(XC),xC);var XC,QC=W.forwardRef(function(e,t){return W.createElement(SC,dC({},e,{ref:t,sideCar:KC}))});QC.classNames=SC.classNames;var ZC=new WeakMap,JC=new WeakMap,eP={},tP=0,nP=function(e){return e&&(e.host||nP(e.parentNode))},rP=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=nP(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);eP[n]||(eP[n]=new WeakMap);var a=eP[n],i=[],s=new Set,l=new Set(o),u=function(e){e&&!s.has(e)&&(s.add(e),u(e.parentNode))};o.forEach(u);var c=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))c(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(ZC.get(e)||0)+1,u=(a.get(e)||0)+1;ZC.set(e,l),a.set(e,u),i.push(e),1===l&&o&&JC.set(e,!0),1===u&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(MT){console.error("aria-hidden: cannot operate on ",e,MT)}})};return c(t),s.clear(),tP++,function(){i.forEach(function(e){var t=ZC.get(e)-1,o=a.get(e)-1;ZC.set(e,t),a.set(e,o),t||(JC.has(e)||e.removeAttribute(r),JC.delete(e)),o||e.removeAttribute(n)}),--tP||(ZC=new WeakMap,ZC=new WeakMap,JC=new WeakMap,eP={})}},oP=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),rP(r,o,n,"aria-hidden")):function(){return null}};function aP(e){const t=iP(e),n=W.forwardRef((e,n)=>{const{children:r,...o}=e,a=W.Children.toArray(r),i=a.find(lP);if(i){const e=i.props.children,r=a.map(t=>t===i?W.Children.count(e)>1?W.Children.only(null):W.isValidElement(e)?e.props.children:null:t);return ee.jsx(t,{...o,ref:n,children:W.isValidElement(e)?W.cloneElement(e,void 0,r):null})}return ee.jsx(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function iP(e){const t=W.forwardRef((e,t)=>{const{children:n,...r}=e;if(W.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==W.Fragment&&(o.ref=t?vk(t,e):e),W.cloneElement(n,o)}return W.Children.count(n)>1?W.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sP=Symbol("radix.slottable");function lP(e){return W.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===sP}var uP="Dialog",[cP]=Cj(uP),[dP,fP]=cP(uP),pP=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=W.useRef(null),l=W.useRef(null),[u,c]=Dj({prop:r,defaultProp:o??!1,onChange:a,caller:uP});return ee.jsx(dP,{scope:t,triggerRef:s,contentRef:l,contentId:Rj(),titleId:Rj(),descriptionId:Rj(),open:u,onOpenChange:c,onOpenToggle:W.useCallback(()=>c(e=>!e),[c]),modal:i,children:n})};pP.displayName=uP;var hP="DialogTrigger";W.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fP(hP,n),a=yk(t,o.triggerRef);return ee.jsx(zj.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":_P(o.open),...r,ref:a,onClick:jj(e.onClick,o.onOpenToggle)})}).displayName=hP;var mP="DialogPortal",[gP,vP]=cP(mP,{forceMount:void 0}),yP=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=fP(mP,t);return ee.jsx(gP,{scope:t,forceMount:n,children:W.Children.map(r,e=>ee.jsx(iC,{present:n||a.open,children:ee.jsx(aC,{asChild:!0,container:o,children:e})}))})};yP.displayName=mP;var bP="DialogOverlay",xP=W.forwardRef((e,t)=>{const n=vP(bP,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=fP(bP,e.__scopeDialog);return a.modal?ee.jsx(iC,{present:r||a.open,children:ee.jsx(kP,{...o,ref:t})}):null});xP.displayName=bP;var wP=aP("DialogOverlay.RemoveScroll"),kP=W.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fP(bP,n);return ee.jsx(QC,{as:wP,allowPinchZoom:!0,shards:[o.contentRef],children:ee.jsx(zj.div,{"data-state":_P(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),SP="DialogContent",EP=W.forwardRef((e,t)=>{const n=vP(SP,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=fP(SP,e.__scopeDialog);return ee.jsx(iC,{present:r||a.open,children:a.modal?ee.jsx(jP,{...o,ref:t}):ee.jsx(CP,{...o,ref:t})})});EP.displayName=SP;var jP=W.forwardRef((e,t)=>{const n=fP(SP,e.__scopeDialog),r=W.useRef(null),o=yk(t,n.contentRef,r);return W.useEffect(()=>{const e=r.current;if(e)return oP(e)},[]),ee.jsx(PP,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:jj(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()}),onPointerDownOutside:jj(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:jj(e.onFocusOutside,e=>e.preventDefault())})}),CP=W.forwardRef((e,t)=>{const n=fP(SP,e.__scopeDialog),r=W.useRef(!1),o=W.useRef(!1);return ee.jsx(PP,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var a,i;null==(a=e.onCloseAutoFocus)||a.call(e,t),t.defaultPrevented||(r.current||null==(i=n.triggerRef.current)||i.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{var a,i;null==(a=e.onInteractOutside)||a.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),PP=W.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=fP(SP,n),l=W.useRef(null),u=yk(t,l);return uC(),ee.jsxs(ee.Fragment,{children:[ee.jsx(Zj,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:ee.jsx(Gj,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":_P(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),ee.jsxs(ee.Fragment,{children:[ee.jsx(zP,{titleId:s.titleId}),ee.jsx(FP,{contentRef:l,descriptionId:s.descriptionId})]})]})}),NP="DialogTitle",TP=W.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fP(NP,n);return ee.jsx(zj.h2,{id:o.titleId,...r,ref:t})});TP.displayName=NP;var MP="DialogDescription",RP=W.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fP(MP,n);return ee.jsx(zj.p,{id:o.descriptionId,...r,ref:t})});RP.displayName=MP;var LP="DialogClose",DP=W.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=fP(LP,n);return ee.jsx(zj.button,{type:"button",...r,ref:t,onClick:jj(e.onClick,()=>o.onOpenChange(!1))})});function _P(e){return e?"open":"closed"}DP.displayName=LP;var AP="DialogTitleWarning",[OP,IP]=function(e,t){const n=W.createContext(t),r=e=>{const{children:t,...r}=e,o=W.useMemo(()=>r,Object.values(r));return ee.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=W.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}(AP,{contentName:SP,titleName:NP,docsSlug:"dialog"}),zP=({titleId:e})=>{const t=IP(AP),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return W.useEffect(()=>{if(e){document.getElementById(e)||console.error(n)}},[n,e]),null},FP=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${IP("DialogDescriptionWarning").contentName}}.`;return W.useEffect(()=>{var r;const o=null==(r=e.current)?void 0:r.getAttribute("aria-describedby");if(t&&o){document.getElementById(t)||console.warn(n)}},[n,e,t]),null},VP=xP,BP=EP,$P=TP,UP=RP,WP=DP;const HP=pP,GP=yP,YP=W.forwardRef(({className:e,...t},n)=>ee.jsx(VP,{ref:n,className:uk("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));YP.displayName=VP.displayName;const qP=W.forwardRef(({className:e,children:t,noOverlay:n,...r},o)=>ee.jsxs(GP,{children:[!n&&ee.jsx(YP,{}),ee.jsxs(BP,{ref:o,className:uk("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,ee.jsxs(WP,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[ee.jsx(wj,{className:"h-4 w-4"}),ee.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));qP.displayName=BP.displayName;const KP=({className:e,...t})=>ee.jsx("div",{className:uk("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});KP.displayName="DialogHeader";const XP=({className:e,...t})=>ee.jsx("div",{className:uk("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});XP.displayName="DialogFooter";const QP=W.forwardRef(({className:e,...t},n)=>ee.jsx($P,{ref:n,className:uk("text-lg font-semibold leading-none tracking-tight",e),...t}));QP.displayName=$P.displayName;const ZP=W.forwardRef(({className:e,...t},n)=>ee.jsx(UP,{ref:n,className:uk("text-sm text-muted-foreground",e),...t}));function JP({project:e,open:t,onOpenChange:n,onUpdated:r}){const[o,a]=W.useState([]),[i,s]=W.useState([]),[l,u]=W.useState(!1),[c,d]=W.useState(null);W.useEffect(()=>{if(!t)return;a(e.shares?[...e.shares]:[]),d(null);let n=!1;return iS().then(e=>{n||s(e)}).catch(()=>{}),()=>{n=!0}},[t,e.id]);const f=new Set(o.map(e=>e.username)),p=i.filter(t=>t!==e.owner&&!f.has(t));return ee.jsx(HP,{open:t,onOpenChange:n,children:ee.jsxs(qP,{className:"sm:max-w-md",children:[ee.jsxs(KP,{children:[ee.jsxs(QP,{className:"flex items-center gap-2",children:[ee.jsx(xj,{className:"h-4 w-4"}),"共享设置"]}),ee.jsx(ZP,{children:"选择用户并设置权限:可见(只读)或可编辑(读写+终端)"})]}),ee.jsxs("div",{className:"space-y-3 max-h-64 overflow-y-auto",children:[0===o.length&&ee.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"尚未共享给任何用户"}),o.map(e=>ee.jsxs("div",{className:"flex items-center justify-between gap-2 px-1",children:[ee.jsx("span",{className:"text-sm font-medium",children:e.username}),ee.jsxs("div",{className:"flex items-center gap-1.5",children:[ee.jsx("button",{onClick:()=>{return t=e.username,void a(e=>e.map(e=>e.username===t?{...e,permission:"view"===e.permission?"edit":"view"}:e));var t},className:"focus:outline-none",children:ee.jsx(Ej,{variant:"edit"===e.permission?"default":"secondary",className:"cursor-pointer text-xs",children:"edit"===e.permission?"可编辑":"可见"})}),ee.jsx(Rk,{variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive",onClick:()=>{return t=e.username,void a(e=>e.filter(e=>e.username!==t));var t},children:ee.jsx(bj,{className:"h-3.5 w-3.5"})})]})]},e.username))]}),p.length>0&&ee.jsxs("div",{className:"border-t pt-3",children:[ee.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"添加用户"}),ee.jsx("div",{className:"flex flex-wrap gap-1.5",children:p.map(e=>ee.jsxs(Rk,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1",onClick:()=>{return t=e,void a(e=>[...e,{username:t,permission:"view"}]);var t},children:[ee.jsx(uj,{className:"h-3 w-3"}),e]},e))})]}),c&&ee.jsx("p",{className:"text-sm text-destructive",children:c}),ee.jsxs(XP,{children:[ee.jsx(Rk,{variant:"outline",onClick:()=>n(!1),disabled:l,children:"取消"}),ee.jsx(Rk,{onClick:()=>{(async()=>{u(!0),d(null);try{const t=await sS(e.id,o);r(t),n(!1)}catch(RT){d(RT instanceof Error?RT.message:"Failed to update shares")}finally{u(!1)}})()},disabled:l,children:l?"保存中...":"保存"})]})]})})}ZP.displayName=UP.displayName;const eN=Array(12).fill(0),tN=({visible:e,className:t})=>H.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},H.createElement("div",{className:"sonner-spinner"},eN.map((e,t)=>H.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),nN=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.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"})),rN=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},H.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"})),oN=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.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"})),aN=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.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"})),iN=H.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"},H.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),H.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}));let sN=1;const lN=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const 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=>{var t;const{message:n,...r}=e,o="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:sN++,a=this.toasts.find(e=>e.id===o),i=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(t=>t.id===o?(this.publish({...t,...e,id:o,title:n}),{...t,...e,id:o,dismissible:i,title:n}):t):this.addToast({title:n,...r,dismissible:i,id:o}),o},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;void 0!==t.loading&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));const r=Promise.resolve(e instanceof Function?e():e);let o,a=void 0!==n;const i=r.then(async e=>{o=["resolve",e];if(H.isValidElement(e))a=!1,this.create({id:n,type:"default",message:e});else if(uN(e)&&!e.ok){a=!1;const r="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,o="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description,i="object"==typeof r&&!H.isValidElement(r)?r:{message:r};this.create({id:n,type:"error",description:o,...i})}else if(e instanceof Error){a=!1;const r="function"==typeof t.error?await t.error(e):t.error,o="function"==typeof t.description?await t.description(e):t.description,i="object"==typeof r&&!H.isValidElement(r)?r:{message:r};this.create({id:n,type:"error",description:o,...i})}else if(void 0!==t.success){a=!1;const r="function"==typeof t.success?await t.success(e):t.success,o="function"==typeof t.description?await t.description(e):t.description,i="object"==typeof r&&!H.isValidElement(r)?r:{message:r};this.create({id:n,type:"success",description:o,...i})}}).catch(async e=>{if(o=["reject",e],void 0!==t.error){a=!1;const r="function"==typeof t.error?await t.error(e):t.error,o="function"==typeof t.description?await t.description(e):t.description,i="object"==typeof r&&!H.isValidElement(r)?r:{message:r};this.create({id:n,type:"error",description:o,...i})}}).finally(()=>{a&&(this.dismiss(n),n=void 0),null==t.finally||t.finally.call(t)}),s=()=>new Promise((e,t)=>i.then(()=>"reject"===o[0]?t(o[1]):e(o[1])).catch(t));return"string"!=typeof n&&"number"!=typeof n?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{const n=(null==t?void 0:t.id)||sN++;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}},uN=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,cN=(e,t)=>{const n=(null==t?void 0:t.id)||sN++;return lN.addToast({title:e,...t,id:n}),n},dN=Object.assign(cN,{success:lN.success,info:lN.info,warning:lN.warning,error:lN.error,custom:lN.custom,message:lN.message,promise:lN.promise,dismiss:lN.dismiss,loading:lN.loading},{getHistory:()=>lN.toasts,getToasts:()=>lN.getActiveToasts()});function fN(e){return void 0!==e.label}!function(e){if("undefined"==typeof document)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))}("[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%)}");const pN=3,hN=14;function mN(...e){return e.filter(Boolean).join(" ")}const gN=e=>{var t,n,r,o,a,i,s,l,u;const{invert:c,toast:d,unstyled:f,interacting:p,setHeights:h,visibleToasts:m,heights:g,index:v,toasts:y,expanded:b,removeToast:x,defaultRichColors:w,closeButton:k,style:S,cancelButtonStyle:E,actionButtonStyle:j,className:C="",descriptionClassName:P="",duration:N,position:T,gap:M,expandByDefault:R,classNames:L,icons:D,closeButtonAriaLabel:_="Close toast"}=e,[A,O]=H.useState(null),[I,z]=H.useState(null),[F,V]=H.useState(!1),[B,$]=H.useState(!1),[U,W]=H.useState(!1),[G,Y]=H.useState(!1),[q,K]=H.useState(!1),[X,Q]=H.useState(0),[Z,J]=H.useState(0),ee=H.useRef(d.duration||N||4e3),te=H.useRef(null),ne=H.useRef(null),re=0===v,oe=v+1<=m,ae=d.type,ie=!1!==d.dismissible,se=d.className||"",le=d.descriptionClassName||"",ue=H.useMemo(()=>g.findIndex(e=>e.toastId===d.id)||0,[g,d.id]),ce=H.useMemo(()=>{var e;return null!=(e=d.closeButton)?e:k},[d.closeButton,k]),de=H.useMemo(()=>d.duration||N||4e3,[d.duration,N]),fe=H.useRef(0),pe=H.useRef(0),he=H.useRef(0),me=H.useRef(null),[ge,ve]=T.split("-"),ye=H.useMemo(()=>g.reduce((e,t,n)=>n>=ue?e:e+t.height,0),[g,ue]),be=(()=>{const[e,t]=H.useState(document.hidden);return H.useEffect(()=>{const e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e})(),xe=d.invert||c,we="loading"===ae;pe.current=H.useMemo(()=>ue*M+ye,[ue,ye]),H.useEffect(()=>{ee.current=de},[de]),H.useEffect(()=>{V(!0)},[]),H.useEffect(()=>{const e=ne.current;if(e){const t=e.getBoundingClientRect().height;return J(t),h(e=>[{toastId:d.id,height:t,position:d.position},...e]),()=>h(e=>e.filter(e=>e.toastId!==d.id))}},[h,d.id]),H.useLayoutEffect(()=>{if(!F)return;const e=ne.current,t=e.style.height;e.style.height="auto";const n=e.getBoundingClientRect().height;e.style.height=t,J(n),h(e=>e.find(e=>e.toastId===d.id)?e.map(e=>e.toastId===d.id?{...e,height:n}:e):[{toastId:d.id,height:n,position:d.position},...e])},[F,d.title,d.description,h,d.id,d.jsx,d.action,d.cancel]);const ke=H.useCallback(()=>{$(!0),Q(pe.current),h(e=>e.filter(e=>e.toastId!==d.id)),setTimeout(()=>{x(d)},200)},[d,x,h,pe]);H.useEffect(()=>{if(d.promise&&"loading"===ae||d.duration===1/0||"loading"===d.type)return;let e;return b||p||be?(()=>{if(he.current<fe.current){const e=(new Date).getTime()-fe.current;ee.current=ee.current-e}he.current=(new Date).getTime()})():ee.current!==1/0&&(fe.current=(new Date).getTime(),e=setTimeout(()=>{null==d.onAutoClose||d.onAutoClose.call(d,d),ke()},ee.current)),()=>clearTimeout(e)},[b,p,d,ae,be,ke]),H.useEffect(()=>{d.delete&&(ke(),null==d.onDismiss||d.onDismiss.call(d,d))},[ke,d.delete]);const Se=d.icon||(null==D?void 0:D[ae])||(e=>{switch(e){case"success":return nN;case"info":return oN;case"warning":return rN;case"error":return aN;default:return null}})(ae);var Ee,je,Ce,Pe;return H.createElement("li",{tabIndex:0,ref:ne,className:mN(C,se,null==L?void 0:L.toast,null==d||null==(t=d.classNames)?void 0:t.toast,null==L?void 0:L.default,null==L?void 0:L[ae],null==d||null==(n=d.classNames)?void 0:n[ae]),"data-sonner-toast":"","data-rich-colors":null!=(Ee=d.richColors)?Ee:w,"data-styled":!Boolean(d.jsx||d.unstyled||f),"data-mounted":F,"data-promise":Boolean(d.promise),"data-swiped":q,"data-removed":B,"data-visible":oe,"data-y-position":ge,"data-x-position":ve,"data-index":v,"data-front":re,"data-swiping":U,"data-dismissible":ie,"data-type":ae,"data-invert":xe,"data-swipe-out":G,"data-swipe-direction":I,"data-expanded":Boolean(b||R&&F),"data-testid":d.testId,style:{"--index":v,"--toasts-before":v,"--z-index":y.length-v,"--offset":`${B?X:pe.current}px`,"--initial-height":R?"auto":`${Z}px`,...S,...d.style},onDragEnd:()=>{W(!1),O(null),me.current=null},onPointerDown:e=>{2!==e.button&&!we&&ie&&(te.current=new Date,Q(pe.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(W(!0),me.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,n;if(G||!ie)return;me.current=null;const r=Number((null==(e=ne.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),o=Number((null==(t=ne.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),a=(new Date).getTime()-(null==(n=te.current)?void 0:n.getTime()),i="x"===A?r:o,s=Math.abs(i)/a;if(Math.abs(i)>=45||s>.11)return Q(pe.current),null==d.onDismiss||d.onDismiss.call(d,d),z("x"===A?r>0?"right":"left":o>0?"down":"up"),ke(),void Y(!0);var l,u;null==(l=ne.current)||l.style.setProperty("--swipe-amount-x","0px"),null==(u=ne.current)||u.style.setProperty("--swipe-amount-y","0px"),K(!1),W(!1),O(null)},onPointerMove:t=>{var n,r,o;if(!me.current||!ie)return;if((null==(n=window.getSelection())?void 0:n.toString().length)>0)return;const a=t.clientY-me.current.y,i=t.clientX-me.current.x;var s;const l=null!=(s=e.swipeDirections)?s:function(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}(T);!A&&(Math.abs(i)>1||Math.abs(a)>1)&&O(Math.abs(i)>Math.abs(a)?"x":"y");let u={x:0,y:0};const c=e=>1/(1.5+Math.abs(e)/20);if("y"===A){if(l.includes("top")||l.includes("bottom"))if(l.includes("top")&&a<0||l.includes("bottom")&&a>0)u.y=a;else{const e=a*c(a);u.y=Math.abs(e)<Math.abs(a)?e:a}}else if("x"===A&&(l.includes("left")||l.includes("right")))if(l.includes("left")&&i<0||l.includes("right")&&i>0)u.x=i;else{const e=i*c(i);u.x=Math.abs(e)<Math.abs(i)?e:i}(Math.abs(u.x)>0||Math.abs(u.y)>0)&&K(!0),null==(r=ne.current)||r.style.setProperty("--swipe-amount-x",`${u.x}px`),null==(o=ne.current)||o.style.setProperty("--swipe-amount-y",`${u.y}px`)}},ce&&!d.jsx&&"loading"!==ae?H.createElement("button",{"aria-label":_,"data-disabled":we,"data-close-button":!0,onClick:we||!ie?()=>{}:()=>{ke(),null==d.onDismiss||d.onDismiss.call(d,d)},className:mN(null==L?void 0:L.closeButton,null==d||null==(r=d.classNames)?void 0:r.closeButton)},null!=(je=null==D?void 0:D.close)?je:iN):null,(ae||d.icon||d.promise)&&null!==d.icon&&(null!==(null==D?void 0:D[ae])||d.icon)?H.createElement("div",{"data-icon":"",className:mN(null==L?void 0:L.icon,null==d||null==(o=d.classNames)?void 0:o.icon)},d.promise||"loading"===d.type&&!d.icon?d.icon||((null==D?void 0:D.loading)?H.createElement("div",{className:mN(null==L?void 0:L.loader,null==d||null==(Pe=d.classNames)?void 0:Pe.loader,"sonner-loader"),"data-visible":"loading"===ae},D.loading):H.createElement(tN,{className:mN(null==L?void 0:L.loader,null==d||null==(Ce=d.classNames)?void 0:Ce.loader),visible:"loading"===ae})):null,"loading"!==d.type?Se:null):null,H.createElement("div",{"data-content":"",className:mN(null==L?void 0:L.content,null==d||null==(a=d.classNames)?void 0:a.content)},H.createElement("div",{"data-title":"",className:mN(null==L?void 0:L.title,null==d||null==(i=d.classNames)?void 0:i.title)},d.jsx?d.jsx:"function"==typeof d.title?d.title():d.title),d.description?H.createElement("div",{"data-description":"",className:mN(P,le,null==L?void 0:L.description,null==d||null==(s=d.classNames)?void 0:s.description)},"function"==typeof d.description?d.description():d.description):null),H.isValidElement(d.cancel)?d.cancel:d.cancel&&fN(d.cancel)?H.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||E,onClick:e=>{fN(d.cancel)&&ie&&(null==d.cancel.onClick||d.cancel.onClick.call(d.cancel,e),ke())},className:mN(null==L?void 0:L.cancelButton,null==d||null==(l=d.classNames)?void 0:l.cancelButton)},d.cancel.label):null,H.isValidElement(d.action)?d.action:d.action&&fN(d.action)?H.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||j,onClick:e=>{fN(d.action)&&(null==d.action.onClick||d.action.onClick.call(d.action,e),e.defaultPrevented||ke())},className:mN(null==L?void 0:L.actionButton,null==d||null==(u=d.classNames)?void 0:u.actionButton)},d.action.label):null)};function vN(){if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}function yN(e,t){const n={};return[e,t].forEach((e,t)=>{const r=1===t,o=r?"--mobile-offset":"--offset",a=r?"16px":"24px";function i(e){["top","right","bottom","left"].forEach(t=>{n[`${o}-${t}`]="number"==typeof e?`${e}px`:e})}"number"==typeof e||"string"==typeof e?i(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?n[`${o}-${t}`]=a:n[`${o}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]}):i(a)}),n}const bN=H.forwardRef(function(e,t){const{id:n,invert:r,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:s,className:l,offset:u,mobileOffset:c,theme:d="light",richColors:f,duration:p,style:h,visibleToasts:m=pN,toastOptions:g,dir:v=vN(),gap:y=hN,icons:b,containerAriaLabel:x="Notifications"}=e,[w,k]=H.useState([]),S=H.useMemo(()=>n?w.filter(e=>e.toasterId===n):w.filter(e=>!e.toasterId),[w,n]),E=H.useMemo(()=>Array.from(new Set([o].concat(S.filter(e=>e.position).map(e=>e.position)))),[S,o]),[j,C]=H.useState([]),[P,N]=H.useState(!1),[T,M]=H.useState(!1),[R,L]=H.useState("system"!==d?d:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),D=H.useRef(null),_=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=H.useRef(null),O=H.useRef(!1),I=H.useCallback(e=>{k(t=>{var n;return(null==(n=t.find(t=>t.id===e.id))?void 0:n.delete)||lN.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return H.useEffect(()=>lN.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{k(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{ud.flushSync(()=>{k(t=>{const n=t.findIndex(t=>t.id===e.id);return-1!==n?[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]:[e,...t]})})})}),[w]),H.useEffect(()=>{if("system"!==d)return void L(d);if("system"===d&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L("dark"):L("light")),"undefined"==typeof window)return;const e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",({matches:e})=>{L(e?"dark":"light")})}catch(t){e.addListener(({matches:e})=>{try{L(e?"dark":"light")}catch(MT){console.error(MT)}})}},[d]),H.useEffect(()=>{w.length<=1&&N(!1)},[w]),H.useEffect(()=>{const e=e=>{var t;var n;a.every(t=>e[t]||e.code===t)&&(N(!0),null==(n=D.current)||n.focus());"Escape"!==e.code||document.activeElement!==D.current&&!(null==(t=D.current)?void 0:t.contains(document.activeElement))||N(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[a]),H.useEffect(()=>{if(D.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,O.current=!1)}},[D.current]),H.createElement("section",{ref:t,"aria-label":`${x} ${_}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},E.map((t,n)=>{var o;const[a,d]=t.split("-");return S.length?H.createElement("ol",{key:t,dir:"auto"===v?vN():v,tabIndex:-1,ref:D,className:l,"data-sonner-toaster":!0,"data-sonner-theme":R,"data-y-position":a,"data-x-position":d,style:{"--front-toast-height":`${(null==(o=j[0])?void 0:o.height)||0}px`,"--width":"356px","--gap":`${y}px`,...h,...yN(u,c)},onBlur:e=>{O.current&&!e.currentTarget.contains(e.relatedTarget)&&(O.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||O.current||(O.current=!0,A.current=e.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{T||N(!1)},onDragEnd:()=>N(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||M(!0)},onPointerUp:()=>M(!1)},S.filter(e=>!e.position&&0===n||e.position===t).map((n,o)=>{var a,l;return H.createElement(gN,{key:n.id,icons:b,index:o,toast:n,defaultRichColors:f,duration:null!=(a=null==g?void 0:g.duration)?a:p,className:null==g?void 0:g.className,descriptionClassName:null==g?void 0:g.descriptionClassName,invert:r,visibleToasts:m,closeButton:null!=(l=null==g?void 0:g.closeButton)?l:s,interacting:T,position:t,style:null==g?void 0:g.style,unstyled:null==g?void 0:g.unstyled,classNames:null==g?void 0:g.classNames,cancelButtonStyle:null==g?void 0:g.cancelButtonStyle,actionButtonStyle:null==g?void 0:g.actionButtonStyle,closeButtonAriaLabel:null==g?void 0:g.closeButtonAriaLabel,removeToast:I,toasts:S.filter(e=>e.position==n.position),heights:j.filter(e=>e.position==n.position),setHeights:C,expandByDefault:i,gap:y,expanded:P,swipeDirections:e.swipeDirections})})):null}))}),xN=W.createContext(null);function wN({children:e}){const[t,n]=W.useState(!1),[r,o]=W.useState({}),a=W.useRef(null),i=W.useCallback(e=>(o(e),n(!0),new Promise(e=>{a.current=e})),[]),s=W.useCallback(e=>{n(!1);const t=a.current;a.current=null,t&&t(e)},[]);return ee.jsxs(xN.Provider,{value:i,children:[e,ee.jsx(HP,{open:t,onOpenChange:e=>{e||s(!1)},children:ee.jsxs(qP,{className:"max-w-md",children:[ee.jsxs(KP,{children:[ee.jsx(QP,{children:r.title??"确认"}),void 0!==r.description&&ee.jsx(ZP,{asChild:!0,children:ee.jsx("div",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:r.description})})]}),ee.jsxs(XP,{children:[ee.jsx(Rk,{variant:"outline",onClick:()=>s(!1),children:r.cancelLabel??"取消"}),ee.jsx(kN,{destructive:r.destructive,onClick:()=>s(!0),children:r.confirmLabel??"确定"})]})]})})]})}function kN({destructive:e,onClick:t,children:n}){const r=W.useRef(null);return W.useEffect(()=>{var e;null==(e=r.current)||e.focus()},[]),ee.jsx(Rk,{ref:r,onClick:t,className:uk(e&&"bg-red-600 hover:bg-red-700 text-white"),children:n})}function SN(){const e=W.useContext(xN);if(!e)throw new Error("useConfirm must be used within <ConfirmProvider>");return e}function EN(e,t){switch(e){case"thinking":return"Thinking…";case"tool_use":return t?`${t}`:"Tool…";case"tool_result":return"Reading…";case"text":return"Writing…"}}function jN({status:e}){return ee.jsx("span",{className:uk("inline-block w-2 h-2 rounded-full",{"bg-green-500":"running"===e,"bg-zinc-400":"stopped"===e,"bg-yellow-400 animate-pulse":"restarting"===e})})}const CN=H.memo(function({project:e,active:t=!1,statusStack:n=[],onDelete:r,onArchive:o,onUnarchive:a,onUpdated:i}){var s,l;const u=cf(),c=SN(),[d,f]=W.useState(!1),[p,h]=W.useState(null),[m,g]=W.useState(!1),[v,y]=W.useState(e.name),b=W.useRef(null),x=!!e._sharedPermission;W.useEffect(()=>{let t=!1;return gE(e.id).then(({bytes:e})=>{t||h(e)}).catch(()=>{}),()=>{t=!0}},[e.id]);const w="view"===e._sharedPermission,k=t=>{t.stopPropagation(),y(e.name),g(!0),setTimeout(()=>{var e;return null==(e=b.current)?void 0:e.select()},0)},S=async()=>{const t=v.trim();if(t&&t!==e.name)try{const n=await hE(e.id,t);null==i||i(n),g(!1)}catch(RT){dN.error("Rename failed",{description:null==RT?void 0:RT.message})}else g(!1)},E=ee.jsx(hw.div,{whileHover:e.archived||t?{}:{y:-2},transition:{duration:.2},children:ee.jsxs(ck,{className:uk("group cursor-pointer transition-colors relative",e.archived?"opacity-60 hover:opacity-80 hover:border-zinc-400":t?"border-transparent hover:border-transparent bg-transparent shadow-none":"hover:border-zinc-400 hover:shadow-md"),onClick:()=>!e.archived&&u(`/projects/${e.id}`),children:[ee.jsxs(dk,{className:"pb-2",children:[ee.jsxs("div",{className:"flex items-start justify-between gap-2",children:[m?ee.jsx("input",{ref:b,className:"text-base leading-tight font-semibold bg-transparent border-b border-primary outline-none w-full min-w-0",value:v,onChange:e=>y(e.target.value),onBlur:()=>{S()},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),S()),"Escape"===e.key&&g(!1)},onClick:e=>e.stopPropagation()}):ee.jsx(fk,{className:uk("text-base leading-tight",e.archived&&"text-muted-foreground"),onDoubleClick:x||e.archived?void 0:k,children:e.name}),ee.jsx("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0",children:!x&&ee.jsxs(ee.Fragment,{children:[e.archived?ee.jsx(Rk,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:t=>{t.stopPropagation(),a(e.id)},title:"Restore project",children:ee.jsx(IE,{className:"h-3.5 w-3.5"})}):ee.jsxs(ee.Fragment,{children:[ee.jsx(Rk,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:k,title:"Rename project",children:ee.jsx(lj,{className:"h-3.5 w-3.5"})}),ee.jsx(Rk,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:e=>{e.stopPropagation(),f(!0)},title:"共享设置",children:ee.jsx(xj,{className:"h-3.5 w-3.5"})}),ee.jsx(Rk,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:t=>{t.stopPropagation(),o(e.id)},title:"Archive project",children:ee.jsx(zE,{className:"h-3.5 w-3.5"})})]}),ee.jsx(Rk,{variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:async t=>{t.stopPropagation();await c({title:"删除项目",description:`确认删除项目 "${e.name}"?此操作不可撤销。`,destructive:!0,confirmLabel:"删除"})&&r(e.id)},title:"Delete project",children:ee.jsx(bj,{className:"h-3.5 w-3.5"})})]})})]}),ee.jsx("div",{className:"flex items-center gap-1.5",children:e.archived?ee.jsx(Ej,{variant:"secondary",className:"text-xs",children:"Archived"}):ee.jsxs(ee.Fragment,{children:[ee.jsx(jN,{status:e.status}),ee.jsx("span",{className:"text-xs text-muted-foreground capitalize",children:e.status}),t&&n.length>0&&ee.jsx("div",{className:"ml-auto",children:ee.jsx(Xb,{mode:"wait",children:n.slice(-1).map(e=>ee.jsx(hw.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.25,ease:"easeOut"},children:ee.jsx(Ej,{variant:"outline",className:"text-xs font-normal whitespace-nowrap",children:EN(e.phase,e.detail)})},e.id))})})]})})]}),ee.jsxs(hk,{className:"space-y-2",children:[ee.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[ee.jsx(HE,{className:"h-3.5 w-3.5 flex-shrink-0"}),ee.jsx("span",{className:"truncate font-mono",children:e.folderPath}),null!==p&&ee.jsx("span",{className:"flex-shrink-0 ml-auto text-muted-foreground/70",children:(j=p,j>=1073741824?(j/1073741824).toFixed(1)+" GB":j>=1048576?(j/1048576).toFixed(1)+" MB":Math.round(j/1024)+" KB")})]}),ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx(Ej,{variant:"outline",className:"text-xs font-mono",children:e.cliTool??"claude"}),ee.jsx(Ej,{variant:"unlimited"===e.permissionMode?"destructive":"secondary",className:"text-xs",children:"unlimited"===e.permissionMode?"Unlimited":"Limited"}),x&&ee.jsxs(Ej,{variant:"outline",className:"text-xs gap-0.5",children:[w?ee.jsx(UE,{className:"h-3 w-3"}):ee.jsx(lj,{className:"h-3 w-3"}),w?"可见":"可编辑"]}),!x&&e.shares&&e.shares.length>0&&ee.jsxs(Ej,{variant:"outline",className:"text-xs gap-0.5",children:[ee.jsx(xj,{className:"h-3 w-3"}),e.shares.length]}),ee.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(e.createdAt).toLocaleDateString()})]}),(e.tags??[]).length>0&&ee.jsxs("div",{className:"flex flex-wrap gap-1 mt-1",children:[(e.tags??[]).slice(0,3).map(e=>ee.jsxs("span",{className:"px-1.5 py-0 rounded-full text-[10px] bg-muted text-muted-foreground border border-border",children:["#",e]},e)),((null==(s=e.tags)?void 0:s.length)??0)>3&&ee.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["+",((null==(l=e.tags)?void 0:l.length)??0)-3]})]})]})]})});var j;const C=t&&!e.archived?ee.jsx("div",{className:"card-active-glow rounded-lg",children:E}):E;return ee.jsxs(ee.Fragment,{children:[C,!x&&i&&ee.jsx(JP,{project:e,open:d,onOpenChange:f,onUpdated:i})]})});function PN({onSelect:e}){const[t,n]=W.useState(""),[r,o]=W.useState(null),[a,i]=W.useState([]),[s,l]=W.useState(!0),[u,c]=W.useState(null),[d,f]=W.useState(!1),[p,h]=W.useState(""),[m,g]=W.useState(null),[v,y]=W.useState(!1),b=W.useRef(null),x=async e=>{l(!0),c(null);try{const t=await VS(e);n(t.path),o(t.parent),i(t.entries)}catch(RT){c(RT instanceof Error?RT.message:"Failed to load directory")}finally{l(!1)}};W.useEffect(()=>{x()},[]),W.useEffect(()=>{d&&setTimeout(()=>{var e;return null==(e=b.current)?void 0:e.focus()},0)},[d]);const w=()=>{f(!1),h(""),g(null)},k=async()=>{const e=p.trim();if(e){y(!0),g(null);try{const{path:n}=await US(t,e);f(!1),h(""),await x(t),x(n)}catch(RT){g(RT instanceof Error?RT.message:"Failed to create folder")}finally{y(!1)}}},S=t.split("/").filter(Boolean);return ee.jsxs("div",{className:"flex flex-col h-64 border rounded-md overflow-hidden",children:[ee.jsxs("div",{className:"flex items-center gap-1 px-2 py-2 bg-muted border-b flex-shrink-0",children:[ee.jsx(Rk,{variant:"ghost",size:"sm",className:"h-6 px-1 flex-shrink-0",onClick:()=>{x()},title:"Home",children:ee.jsx(ZE,{className:"h-3 w-3"})}),ee.jsx("div",{className:"flex items-center gap-1 flex-1 overflow-x-auto min-w-0",children:S.map((e,t)=>ee.jsxs(H.Fragment,{children:[ee.jsx(BE,{className:"h-3 w-3 text-muted-foreground flex-shrink-0"}),ee.jsx("button",{className:"text-xs hover:text-foreground text-muted-foreground whitespace-nowrap",onClick:()=>(e=>{const t="/"+S.slice(0,e+1).join("/");x(t)})(t),children:e})]},t))}),ee.jsxs(Rk,{variant:"ghost",size:"sm",className:"h-6 px-1.5 flex-shrink-0 gap-1 text-xs",onClick:()=>{h(""),g(null),f(!0)},disabled:d||s||!!u,title:"New folder",children:[ee.jsx(GE,{className:"h-3.5 w-3.5"}),ee.jsx("span",{className:"hidden sm:inline",children:"New folder"})]})]}),ee.jsxs("div",{className:"flex-1 overflow-y-auto",children:[s&&ee.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"Loading..."}),u&&ee.jsx("div",{className:"flex items-center justify-center h-full text-sm text-destructive px-4 text-center",children:u}),!s&&!u&&ee.jsxs("div",{className:"p-1",children:[r&&ee.jsxs("button",{className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded hover:bg-accent hover:text-accent-foreground",onClick:()=>{x(r)},children:[ee.jsx(FE,{className:"h-4 w-4 text-muted-foreground"}),ee.jsx("span",{children:".."})]}),d&&ee.jsxs("div",{className:"flex items-center gap-1 px-2 py-1.5",children:[ee.jsx(qE,{className:"h-4 w-4 text-blue-500 flex-shrink-0"}),ee.jsx("input",{ref:b,className:uk("flex-1 text-sm bg-background border rounded px-1.5 py-0.5 outline-none","focus:ring-1 focus:ring-ring",m&&"border-destructive"),placeholder:"Folder name",value:p,onChange:e=>{h(e.target.value),g(null)},onKeyDown:e=>{"Enter"===e.key?(e.preventDefault(),k()):"Escape"===e.key&&w()},disabled:v}),ee.jsx("button",{className:"p-1 rounded hover:bg-accent disabled:opacity-50",onClick:()=>{k()},disabled:!p.trim()||v,title:"Create",children:ee.jsx(VE,{className:"h-3.5 w-3.5 text-green-600"})}),ee.jsx("button",{className:"p-1 rounded hover:bg-accent",onClick:w,disabled:v,title:"Cancel",children:ee.jsx(wj,{className:"h-3.5 w-3.5 text-muted-foreground"})})]}),m&&ee.jsx("p",{className:"px-3 pb-1 text-xs text-destructive",children:m}),0===a.length&&!d&&ee.jsx("div",{className:"text-sm text-muted-foreground px-2 py-4 text-center",children:"Empty directory"}),a.map(e=>ee.jsxs("button",{className:uk("flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded text-left","dir"===e.type?"hover:bg-accent hover:text-accent-foreground cursor-pointer":"opacity-40 cursor-not-allowed"),onClick:()=>{"dir"===e.type&&x(e.path)},disabled:"file"===e.type,children:["dir"===e.type?ee.jsx(qE,{className:"h-4 w-4 text-blue-500 flex-shrink-0"}):ee.jsx(WE,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),ee.jsx("span",{className:"truncate",children:e.name})]},e.path))]})]}),ee.jsxs("div",{className:"border-t px-3 py-2 flex items-center justify-between gap-2 flex-shrink-0 bg-background",children:[ee.jsx("span",{className:"text-xs text-muted-foreground truncate flex-1",children:t}),ee.jsx(Rk,{size:"sm",onClick:()=>e(t),disabled:!t,children:"Select this folder"})]})]})}const NN=[{value:"claude",label:"Claude",desc:"Anthropic Claude Code CLI"},{value:"opencode",label:"OpenCode",desc:"OpenCode CLI (sst/opencode)"},{value:"codex",label:"Codex",desc:"OpenAI Codex CLI"},{value:"qwen",label:"Qwen",desc:"Qwen Code CLI (QwenLM)"},{value:"gemini",label:"Gemini",desc:"Google Gemini CLI"},{value:"terminal",label:"Terminal",desc:"Plain shell (no AI CLI)"}],TN={claude:{limited:"claude",unlimited:"claude --dangerously-skip-permissions"},opencode:{limited:"opencode",unlimited:"opencode --dangerously-skip-permissions"},codex:{limited:"codex",unlimited:"codex --ask-for-approval never --sandbox danger-full-access"},qwen:{limited:"qwen-code",unlimited:"qwen-code --yolo"},gemini:{limited:"gemini",unlimited:"gemini --yolo"},terminal:{limited:"$SHELL (interactive)",unlimited:"$SHELL (interactive)"}};function MN({open:e,onOpenChange:t,onCreated:n}){const[r,o]=W.useState("name"),[a,i]=W.useState(""),[s,l]=W.useState(""),[u,c]=W.useState("claude"),[d,f]=W.useState("limited"),[p,h]=W.useState(!1),[m,g]=W.useState(null),v=e=>{e||(o("name"),i(""),l(""),c("claude"),f("limited"),g(null),h(!1)),t(e)},y=()=>{a.trim()?(g(null),o("folder")):g("Please enter a project name")},b=["name","folder","settings"];return ee.jsx(HP,{open:e,onOpenChange:v,children:ee.jsxs(qP,{className:"sm:max-w-lg",children:[ee.jsxs(KP,{children:[ee.jsx(QP,{children:{name:"New Project — Name",folder:"New Project — Select Folder",settings:"New Project — Settings"}[r]}),ee.jsxs(ZP,{children:["name"===r&&"Give your project a name.","folder"===r&&"Choose the working directory for this project.","settings"===r&&"Choose the AI coding tool and run mode."]})]}),ee.jsx("div",{className:"flex gap-2 mb-2",children:b.map((e,t)=>ee.jsx("div",{className:"h-1.5 flex-1 rounded-full "+(r===e?"bg-primary":b.indexOf(r)>t?"bg-primary/40":"bg-muted")},e))}),"name"===r&&ee.jsxs("div",{className:"space-y-4",children:[ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ik,{htmlFor:"project-name",children:"Project Name"}),ee.jsx(Lk,{id:"project-name",placeholder:"My Project",value:a,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"===e.key&&y()},autoFocus:!0})]}),m&&ee.jsx("p",{className:"text-sm text-destructive",children:m})]}),"folder"===r&&ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ik,{children:"Working Directory"}),ee.jsx(PN,{onSelect:e=>{l(e),o("settings")}})]}),"settings"===r&&ee.jsxs("div",{className:"space-y-5",children:[ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ik,{children:"AI Coding Tool"}),ee.jsx("div",{className:"grid grid-cols-2 gap-2",children:NN.map(e=>ee.jsxs("label",{className:"flex items-center gap-2.5 cursor-pointer p-3 rounded-md border transition-colors "+(u===e.value?"border-primary bg-primary/5":"hover:bg-accent"),children:[ee.jsx("input",{type:"radio",name:"cliTool",value:e.value,checked:u===e.value,onChange:()=>c(e.value),className:"accent-primary"}),ee.jsxs("div",{children:[ee.jsx("div",{className:"font-medium text-sm",children:e.label}),ee.jsx("div",{className:"text-xs text-muted-foreground",children:e.desc})]})]},e.value))})]}),"terminal"!==u&&ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ik,{children:"Permission Mode"}),ee.jsxs("div",{className:"space-y-2",children:[ee.jsxs("label",{className:"flex items-start gap-3 cursor-pointer p-3 rounded-md border hover:bg-accent transition-colors",children:[ee.jsx("input",{type:"radio",name:"permissionMode",value:"limited",checked:"limited"===d,onChange:()=>f("limited"),className:"mt-0.5"}),ee.jsxs("div",{children:[ee.jsx("div",{className:"font-medium text-sm",children:"Limited"}),ee.jsxs("div",{className:"text-xs text-muted-foreground",children:["Runs ",ee.jsx("code",{className:"bg-muted px-1 rounded",children:TN[u].limited})," — asks for permission before file changes."]})]})]}),ee.jsxs("label",{className:"flex items-start gap-3 cursor-pointer p-3 rounded-md border hover:bg-accent transition-colors",children:[ee.jsx("input",{type:"radio",name:"permissionMode",value:"unlimited",checked:"unlimited"===d,onChange:()=>f("unlimited"),className:"mt-0.5"}),ee.jsxs("div",{children:[ee.jsx("div",{className:"font-medium text-sm",children:"Unlimited"}),ee.jsxs("div",{className:"text-xs text-muted-foreground",children:["Runs ",ee.jsx("code",{className:"bg-muted px-1 rounded",children:TN[u].unlimited})," — acts autonomously."]})]})]})]})]}),ee.jsxs("div",{className:"text-xs text-muted-foreground",children:[ee.jsx("span",{className:"font-medium",children:"Folder:"})," ",ee.jsx("span",{className:"font-mono",children:s})]}),m&&ee.jsx("p",{className:"text-sm text-destructive",children:m})]}),ee.jsxs(XP,{children:["name"!==r&&ee.jsx(Rk,{variant:"outline",onClick:()=>o("settings"===r?"folder":"name"),disabled:p,children:"Back"}),"name"===r&&ee.jsx(Rk,{onClick:y,children:"Next"}),"folder"===r&&ee.jsx(Rk,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),"settings"===r&&ee.jsx(Rk,{onClick:()=>{(async()=>{h(!0),g(null);try{const e=await lS({name:a.trim(),folderPath:s,permissionMode:d,cliTool:u});n(e),v(!1)}catch(RT){g(RT instanceof Error?RT.message:"Failed to create project")}finally{h(!1)}})()},disabled:p,children:p?"Creating...":"Create Project"})]})]})})}function RN({open:e,onOpenChange:t,onOpened:n}){const[r,o]=W.useState(""),[a,i]=W.useState(!1),[s,l]=W.useState(null),u=e=>{e||(o(""),l(null),i(!1)),t(e)};return ee.jsx(HP,{open:e,onOpenChange:u,children:ee.jsxs(qP,{className:"sm:max-w-lg",children:[ee.jsxs(KP,{children:[ee.jsx(QP,{children:"Open Existing Project"}),ee.jsxs(ZP,{children:["Select a folder that contains a ",ee.jsx("code",{className:"bg-muted px-1 rounded text-xs",children:".ccweb/"})," configuration. The project's history and settings will be restored."]})]}),ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ik,{children:"Project Folder"}),ee.jsx(PN,{onSelect:e=>{(async e=>{o(e),i(!0),l(null);try{const t=await uS(e);n(t),u(!1)}catch(RT){l(RT instanceof Error?RT.message:"Failed to open project"),i(!1)}})(e)}})]}),s&&ee.jsx("p",{className:"text-sm text-destructive",children:s}),r&&!s&&a&&ee.jsxs("p",{className:"text-sm text-muted-foreground",children:["Opening project from ",r,"..."]}),ee.jsx(XP,{children:ee.jsx(Rk,{variant:"outline",onClick:()=>u(!1),disabled:a,children:"Cancel"})})]})})}const LN=`${"https:"===window.location.protocol?"wss:":"ws:"}//${window.location.host}`,DN=3e3;function _N(e,t){const n=W.useRef(null),r=W.useRef(0),o=W.useRef(!0),a=W.useRef(!1),i=W.useRef(null),s=W.useRef(t);s.current=t;const[l,u]=W.useState(!1),[c,d]=W.useState(0),f=W.useRef(!1),p=W.useRef([]),h=W.useCallback(e=>{var t;(null==(t=n.current)?void 0:t.readyState)===WebSocket.OPEN&&n.current.send(JSON.stringify(e))},[]),m=W.useCallback(()=>{var e;if((null==(e=n.current)?void 0:e.readyState)===WebSocket.OPEN)for(;p.current.length>0;){const e=p.current.shift();n.current.send(JSON.stringify({type:"terminal_input",data:e}))}},[]),g=W.useCallback((e,t)=>{var r;(null==(r=n.current)?void 0:r.readyState)===WebSocket.OPEN?(n.current.send(JSON.stringify({type:"terminal_subscribe",cols:e,rows:t})),f.current=!1):f.current=!0},[]),v=W.useCallback(e=>{var t;(null==(t=n.current)?void 0:t.readyState)===WebSocket.OPEN?n.current.send(JSON.stringify({type:"terminal_input",data:e})):p.current.push(e)},[]),y=W.useCallback((e,t)=>{h({type:"terminal_resize",cols:e,rows:t})},[h]),b=W.useCallback(()=>{h({type:"chat_subscribe",replay:50})},[h]),x=W.useCallback(()=>{if(!o.current)return;if(a.current)return;const t=Zk();if(!t)return void(window.location.href="/login");a.current=!0;const l=new WebSocket(`${LN}/ws/projects/${e}`);n.current=l,l.onopen=()=>{a.current=!1,r.current=0,l.send(JSON.stringify({type:"auth",token:t}))},l.onmessage=e=>{var t,n,r,o,a,i,l,c,p,h,g,v,y,b,x,w,k,S;let E;try{E=JSON.parse(e.data)}catch{return}switch(E.type){case"connected":f.current=!1,u(!0),d(e=>e+1),m(),null==(n=(t=s.current).onConnected)||n.call(t);break;case"terminal_data":null==(o=(r=s.current).onTerminalData)||o.call(r,E.data);break;case"status":null==(i=(a=s.current).onStatus)||i.call(a,E.status);break;case"chat_message":{const e=E;null==(c=(l=s.current).onChatMessage)||c.call(l,e);break}case"project_stopped":{const e=E;null==(h=(p=s.current).onProjectStopped)||h.call(p,e.projectId,e.projectName);break}case"context_update":null==(v=(g=s.current).onContextUpdate)||v.call(g,E);break;case"semantic_update":null==(b=(y=s.current).onSemanticUpdate)||b.call(y,E);break;case"approval_request":null==(w=(x=s.current).onApprovalRequest)||w.call(x,E);break;case"approval_resolved":null==(S=(k=s.current).onApprovalResolved)||S.call(k,E);break;case"error":console.error("[WS] Server error:",E.message)}},l.onclose=()=>{var e,t;a.current=!1,n.current===l&&(n.current=null),u(!1),null==(t=(e=s.current).onDisconnected)||t.call(e),o.current&&r.current<5&&(r.current++,i.current=window.setTimeout(x,DN))},l.onerror=e=>{a.current=!1,console.error("[WS] WebSocket error:",e)}},[e]);return W.useEffect(()=>(o.current=!0,x(),()=>{var e;o.current=!1,i.current&&(clearTimeout(i.current),i.current=null),null==(e=n.current)||e.close(),n.current=null,p.current=[]}),[x]),{subscribeTerminal:g,sendTerminalInput:v,sendTerminalResize:y,subscribeChatMessages:b,connected:l,readyTick:c}}function AN(e){const t=W.useRef(null),n=W.useRef(0),r=W.useRef(!0),o=W.useRef(!1),a=W.useRef(null),i=W.useRef(e);i.current=e;const s=W.useCallback(()=>{if(!r.current)return;if(o.current)return;const e=Zk();if(!e)return;o.current=!0;const l=new WebSocket(`${LN}/ws/dashboard`);t.current=l,l.onopen=()=>{o.current=!1,n.current=0,l.send(JSON.stringify({type:"auth",token:e}))},l.onmessage=e=>{var t,n;try{const r=JSON.parse(e.data);"activity_update"===r.type?i.current.onActivityUpdate(r):"project_stopped"===r.type&&(null==(n=(t=i.current).onProjectStopped)||n.call(t,r.projectId,r.projectName))}catch{}},l.onclose=()=>{o.current=!1,t.current===l&&(t.current=null),r.current&&n.current<5&&(n.current++,a.current=window.setTimeout(s,DN))},l.onerror=e=>{o.current=!1,console.error("[DashboardWS] Error:",e)}},[]);W.useEffect(()=>(r.current=!0,s(),()=>{var e;r.current=!1,a.current&&(clearTimeout(a.current),a.current=null),null==(e=t.current)||e.close(),t.current=null}),[s])}function ON({projectId:e,enabled:t,onChatMessage:n,onStatusChange:r,onContextUpdate:o,onApprovalRequest:a,onApprovalResolved:i}){const s=W.useRef(null),l=W.useRef(!0),u=W.useRef(0),c=W.useRef(null),d=W.useRef(!1),f=W.useRef(!1),p=W.useRef([]),h=W.useRef({onChatMessage:n,onStatusChange:r,onContextUpdate:o,onApprovalRequest:a,onApprovalResolved:i});h.current={onChatMessage:n,onStatusChange:r,onContextUpdate:o,onApprovalRequest:a,onApprovalResolved:i};const[m,g]=W.useState(!1),[v,y]=W.useState(0),b=W.useCallback(()=>{if(f.current&&s.current&&s.current.readyState===WebSocket.OPEN)for(;p.current.length>0;){const e=p.current.shift();s.current.send(JSON.stringify({type:"terminal_input",data:e}))}},[]),x=W.useCallback(e=>{var t;f.current&&(null==(t=s.current)?void 0:t.readyState)===WebSocket.OPEN?s.current.send(JSON.stringify({type:"terminal_input",data:e})):p.current.push(e)},[]),w=W.useCallback(()=>{if(!l.current||!t)return;if(d.current)return;const n=Zk();if(!n)return;d.current=!0,f.current=!1;const r=new WebSocket(`${LN}/ws/projects/${e}`);s.current=r,r.onopen=()=>{d.current=!1,u.current=0,r.send(JSON.stringify({type:"auth",token:n}))},r.onmessage=e=>{var t,n,o,a,i,s,l,u,c,d;try{const p=JSON.parse(e.data);"connected"===p.type?(r.send(JSON.stringify({type:"chat_subscribe",replay:50})),f.current=!0,g(!0),y(e=>e+1),b()):"chat_message"===p.type?h.current.onChatMessage(p):"status"===p.type&&p.status?null==(n=(t=h.current).onStatusChange)||n.call(t,p.status):"project_stopped"===p.type?null==(a=(o=h.current).onStatusChange)||a.call(o,"stopped"):"context_update"===p.type?null==(s=(i=h.current).onContextUpdate)||s.call(i,p):"approval_request"===p.type?null==(u=(l=h.current).onApprovalRequest)||u.call(l,p):"approval_resolved"===p.type&&(null==(d=(c=h.current).onApprovalResolved)||d.call(c,p))}catch{}},r.onclose=()=>{if(d.current=!1,f.current=!1,g(!1),s.current===r&&(s.current=null),l.current&&t)if(u.current<5){u.current++;const e=2e3*Math.random();c.current=window.setTimeout(w,DN+e)}else p.current.length>0&&(console.warn("[MonitorWS] Retries exhausted, dropping",p.current.length,"queued messages"),p.current=[])},r.onerror=()=>{d.current=!1}},[e,t,b]);return W.useEffect(()=>(l.current=!0,()=>{l.current=!1,p.current=[]}),[]),W.useEffect(()=>(u.current=0,w(),()=>{var e;f.current=!1,c.current&&(clearTimeout(c.current),c.current=null),null==(e=s.current)||e.close(),s.current=null}),[w,t]),{sendInput:x,connected:m,readyTick:v}}const IN="cc_project_order_cache";function zN(){try{const e=localStorage.getItem(IN);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)&&t.every(e=>"string"==typeof e)?t:[]}catch{return[]}}function FN(e){try{localStorage.setItem(IN,JSON.stringify(e))}catch{}}function VN(){const[e,t]=W.useState(zN),n=W.useRef(!1),r=W.useRef(null),o=W.useRef(null),a=W.useRef(!1),i=W.useRef(!0);W.useEffect(()=>{i.current=!0;let e=!1;return oS().then(r=>{e||n.current||(t(e=>function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(e,r)?e:r),FN(r))}).catch(()=>{}),()=>{e=!0,i.current=!1,o.current&&(clearTimeout(o.current),o.current=null)}},[]);const s=W.useCallback(async()=>{for(;r.current;){const e=r.current;r.current=null,a.current=!0;try{await aS(e)}catch{}a.current=!1}},[]),l=W.useCallback(e=>{n.current=!0,t(e),FN(e),r.current=e,o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,i.current&&(a.current||s())},400)},[s]),u=W.useCallback(t=>{const n=new Map(e.map((e,t)=>[e,t]));return[...t].sort((e,t)=>{const r=n.get(e.id)??1/0,o=n.get(t.id)??1/0;return r===o?0:r-o})},[e]);return W.useMemo(()=>({order:e,setOrder:l,applyOrder:u}),[e,l,u])}const BN=18e6,$N=6048e5;function UN(e,t=18e6){if(!e||void 0===e.utilization||e.utilization<=0||!e.resetAt)return null;const n=new Date(e.resetAt).getTime()-Date.now();if(n<=0)return null;const r=t-n;return r<=0?null:Math.round(e.utilization/(r/t))}function WN({label:e,bucket:t}){if(!t||void 0===t.utilization)return null;const n=t.utilization,r=n<50?"text-green-400":n<80?"text-yellow-400":"text-red-400",o=function(e){if(!e)return"";const t=new Date(e).getTime()-Date.now();if(t<=0)return"即将重置";const n=Math.floor(t/36e5),r=Math.floor(t%36e5/6e4);return n>0?`${n}h${r}m`:`${r}m`}(t.resetAt);return ee.jsxs("span",{className:"text-muted-foreground whitespace-nowrap",children:[e," ",ee.jsxs("span",{className:uk("font-medium",r),children:[n,"%"]}),o&&ee.jsxs("span",{className:"text-muted-foreground/70 ml-0.5",children:["(",o,")"]})]})}function HN({className:e}){const[t,n]=W.useState("loading"),[r,o]=W.useState(!1),a=()=>Uk($k.usageMonitorTool,"claude");W.useEffect(()=>{const e=async()=>{try{n(await zS(a()))}catch{n(null)}};e();const t=setInterval(()=>{e()},3e5),r=()=>{e()},o=t=>{t.key===$k.usageMonitorTool&&e()};return window.addEventListener("ccweb:usage-tool-change",r),window.addEventListener("storage",o),()=>{clearInterval(t),window.removeEventListener("ccweb:usage-tool-change",r),window.removeEventListener("storage",o)}},[]);if("loading"===t)return null;if(!t)return null;const i=!!t.fiveHour,s=!!t.sevenDay,l=!!t.sevenDaySonnet,u=!!t.sevenDayOpus,c=i||s||l||u,d=UN(t.fiveHour,BN),f=UN(t.sevenDay,$N),p=UN(t.sevenDaySonnet,$N),h=null!==d||null!==f||null!==p;return ee.jsxs("div",{className:uk("flex items-center gap-1.5 text-xs",e),children:[h&&ee.jsxs("span",{className:"flex items-center gap-1",children:[null!==d&&ee.jsxs("span",{className:uk("font-medium",d<=100?"text-green-400":"text-orange-400"),title:`5h 配速:按当前速率,窗口结束时预计使用 ${d}%`,children:[d,"%"]}),null!==f&&ee.jsxs(ee.Fragment,{children:[ee.jsx("span",{className:"text-muted-foreground/40",children:"/"}),ee.jsxs("span",{className:uk("font-medium",f<=100?"text-green-400":"text-orange-400"),title:`7d 配速:按当前速率,窗口结束时预计使用 ${f}%`,children:[f,"%"]})]}),null!==p&&ee.jsxs(ee.Fragment,{children:[ee.jsx("span",{className:"text-muted-foreground/40",children:"/"}),ee.jsxs("span",{className:uk("font-medium",p<=100?"text-green-400":"text-orange-400"),title:`7d Sonnet 配速:按当前速率,窗口结束时预计使用 ${p}%`,children:[p,"%"]})]})]}),t.planName&&ee.jsx("span",{className:"font-medium text-foreground bg-muted border border-border px-2 py-0.5 rounded-full",children:t.planName}),c&&ee.jsxs(ee.Fragment,{children:[ee.jsx("span",{className:"text-muted-foreground/50",children:"|"}),ee.jsx(WN,{label:"5h",bucket:t.fiveHour}),s&&ee.jsxs(ee.Fragment,{children:[ee.jsx("span",{className:"text-muted-foreground/50",children:"·"}),ee.jsx(WN,{label:"7d",bucket:t.sevenDay})]}),l&&ee.jsxs(ee.Fragment,{children:[ee.jsx("span",{className:"text-muted-foreground/50",children:"·"}),ee.jsx(WN,{label:"7d Sonnet",bucket:t.sevenDaySonnet})]}),u&&ee.jsxs(ee.Fragment,{children:[ee.jsx("span",{className:"text-muted-foreground/50",children:"·"}),ee.jsx(WN,{label:"7d Opus",bucket:t.sevenDayOpus})]})]}),ee.jsx("button",{onClick:()=>{(async()=>{o(!0);try{n(await FS(a()))}catch{n(null)}finally{o(!1)}})()},className:"text-muted-foreground hover:text-foreground transition-colors",title:"刷新用量信息",children:ee.jsx(cj,{className:uk("h-3 w-3",r&&"animate-spin")})})]})}function GN({open:e,onOpenChange:t,kind:n,label:r,content:o}){const a=cf(),[i,s]=W.useState(()=>Uk($k.skillhubAuthor,"")),[l,u]=W.useState(""),[c,d]=W.useState(""),[f,p]=W.useState(!1),[h,m]=W.useState(null),[g,v]=W.useState(!0);W.useEffect(()=>{e&&(s(Uk($k.skillhubAuthor,"")),u(""),d(""),v(!0),_S().then(m).catch(()=>m({configured:!1,needsReset:!1})).finally(()=>v(!1)))},[e]);const y=()=>{t(!1),a("/settings?tab=hub")},b="quick-prompt"===n?"快捷 Prompt":"Agent Prompt",x=!g&&h&&!h.configured;return ee.jsx(HP,{open:e,onOpenChange:t,children:ee.jsxs(qP,{className:uk("sm:max-w-lg"),children:[ee.jsxs(KP,{children:[ee.jsx(QP,{children:"共享到 ccweb-hub"}),ee.jsxs(ZP,{children:["「",r,"」将以 GitHub Issue 形式提交到 ",ee.jsx("code",{children:"zbc0315/ccweb-hub"}),", 使用你配置的 GitHub token。审核通过后会合入为社区 prompt。"]})]}),g?ee.jsxs("div",{className:"py-8 flex items-center justify-center text-sm text-muted-foreground",children:[ee.jsx(tj,{className:"h-4 w-4 mr-2 animate-spin"}),"检查 token 配置…"]}):x?ee.jsxs("div",{className:"space-y-3 py-2",children:[ee.jsx("div",{className:"rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2.5 text-xs",children:ee.jsxs("div",{className:"flex items-start gap-2",children:[ee.jsx(JE,{className:"h-4 w-4 shrink-0 text-amber-500 mt-0.5"}),ee.jsxs("div",{className:"space-y-1",children:[ee.jsx("div",{className:"font-medium text-foreground",children:(null==h?void 0:h.needsReset)?"之前配置的 token 已失效(服务端密钥可能已轮换),请重新设置":"还没配置 GitHub token"}),ee.jsxs("div",{className:"text-muted-foreground",children:["为保护你的 GitHub 账号,ccweb 不自带 token,需要你用自己的 GitHub fine-grained PAT(只勾 ",ee.jsx("code",{children:"ccweb-hub"})," 仓库的",ee.jsx("code",{children:" Issues: Read and write"}),")。"]})]})]})}),ee.jsxs("div",{className:"flex gap-2 pt-1",children:[ee.jsx(Rk,{variant:"outline",onClick:()=>t(!1),className:"flex-1",children:"稍后"}),ee.jsx(Rk,{onClick:y,className:"flex-1",children:"去设置页配置"})]})]}):ee.jsxs(ee.Fragment,{children:[ee.jsxs("div",{className:"space-y-3 py-2",children:[ee.jsxs("div",{className:"space-y-1.5",children:[ee.jsx(Ik,{htmlFor:"share-author",className:"text-xs",children:"GitHub 用户名(可选,用于作者标注)"}),ee.jsx(Lk,{id:"share-author",placeholder:"zbc0315",value:i,onChange:e=>s(e.target.value)})]}),ee.jsxs("div",{className:"space-y-1.5",children:[ee.jsx(Ik,{htmlFor:"share-desc",className:"text-xs",children:"一句话描述(可选)"}),ee.jsx(Lk,{id:"share-desc",placeholder:"quick-prompt"===n?"这个命令用来...":"这段 prompt 让 Claude...",value:l,onChange:e=>u(e.target.value)})]}),ee.jsxs("div",{className:"space-y-1.5",children:[ee.jsx(Ik,{htmlFor:"share-tags",className:"text-xs",children:"标签(逗号分隔,可选)"}),ee.jsx(Lk,{id:"share-tags",placeholder:"review, 中文, 代码",value:c,onChange:e=>d(e.target.value)})]})]}),ee.jsxs("div",{className:"rounded-md border bg-muted/30 px-3 py-2 text-xs text-muted-foreground",children:[ee.jsxs("div",{className:"font-medium text-foreground mb-1",children:["预览:",b," · ",r]}),ee.jsxs("pre",{className:"whitespace-pre-wrap font-mono text-[11px] leading-snug max-h-32 overflow-y-auto",children:[Array.from(o).slice(0,500).join(""),Array.from(o).length>500&&"…"]})]}),ee.jsxs(XP,{children:[ee.jsxs(Rk,{variant:"ghost",size:"sm",onClick:y,className:"mr-auto",title:"更换或清除 token",children:[ee.jsx(JE,{className:"h-3.5 w-3.5 mr-1"}),"管理 token"]}),ee.jsx(Rk,{variant:"outline",onClick:()=>t(!1),disabled:f,children:"取消"}),ee.jsx(Rk,{onClick:()=>{(async()=>{if(!f){p(!0),Wk($k.skillhubAuthor,i);try{const e=await IS({kind:n,label:r,body:o,description:l.trim()||void 0,author:i.trim()||void 0,tags:c.split(",").map(e=>e.trim()).filter(Boolean)});dN.success(`已提交:Issue #${e.issueNumber}`,{action:{label:"查看",onClick:()=>window.open(e.issueUrl,"_blank","noopener,noreferrer")}}),t(!1)}catch(RT){const t=RT.message;dN.error(t),/invalid|expired|401/.test(t)&&m({configured:!1,needsReset:!0})}finally{p(!1)}}})()},disabled:f,children:f?ee.jsxs(ee.Fragment,{children:[ee.jsx(tj,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}),"提交中"]}):ee.jsxs(ee.Fragment,{children:[ee.jsx(dj,{className:"h-3.5 w-3.5 mr-1.5"}),"直接提交"]})})]})]})]})})}function YN(){const[e,t]=W.useState([]),[n,r]=W.useState(!1),[o,a]=W.useState(""),[i,s]=W.useState(""),[l,u]=W.useState(""),[c,d]=W.useState(null),[f,p]=W.useState(""),[h,m]=W.useState(""),[g,v]=W.useState(""),y=W.useRef(null),b=W.useRef(null),[x,w]=W.useState(null);W.useEffect(()=>{hS().then(t).catch(()=>t([]))},[]),W.useEffect(()=>{n&&setTimeout(()=>{var e;return null==(e=y.current)?void 0:e.focus()},0)},[n]),W.useEffect(()=>{c&&setTimeout(()=>{var e;return null==(e=b.current)?void 0:e.focus()},0)},[c]);const k=async()=>{const e=i.trim();if(e)try{const n=await mS({label:o.trim()||e,command:e,...l?{parentId:l}:{}});t(e=>[...e,n]),a(""),s(""),u(""),r(!1)}catch(RT){console.error("[GlobalShortcuts] Failed to add:",RT)}},S=async()=>{const e=h.trim();if(e&&c)try{const n=await gS(c,{label:f.trim()||e,command:e,parentId:g||null});t(e=>e.map(e=>e.id===c?n:e)),d(null)}catch(RT){console.error("[GlobalShortcuts] Failed to save:",RT)}};return ee.jsxs("section",{className:"mt-10",children:[ee.jsxs("div",{className:"flex items-center justify-between mb-4",children:[ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx(kj,{className:"h-4 w-4 text-muted-foreground"}),ee.jsx("h2",{className:"text-lg font-semibold",children:"全局快捷 Prompts"}),ee.jsx("span",{className:"text-xs text-muted-foreground",children:"在所有项目的终端中可用"})]}),ee.jsxs("button",{onClick:()=>{r(e=>!e),d(null)},className:uk("flex items-center gap-1.5 text-sm px-3 py-1.5 rounded-md border transition-colors",n?"border-border text-foreground bg-muted":"border-border text-muted-foreground hover:text-foreground hover:bg-muted"),children:[ee.jsx(uj,{className:"h-3.5 w-3.5"}),"新建"]})]}),n&&ee.jsxs("div",{className:"mb-4 p-4 rounded-lg border border-border bg-background space-y-3",children:[ee.jsx("input",{ref:y,placeholder:"名称(可选)",value:o,onChange:e=>a(e.target.value),className:"w-full text-sm bg-muted border border-border rounded px-3 py-1.5 text-foreground placeholder:text-muted-foreground outline-none focus:border-border transition-colors"}),ee.jsx("textarea",{placeholder:"命令内容…",value:i,onChange:e=>s(e.target.value),rows:3,className:"w-full text-sm bg-muted border border-border rounded px-3 py-1.5 text-foreground placeholder:text-muted-foreground font-mono outline-none focus:border-border transition-colors resize-none",onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),k()),"Escape"===e.key&&(r(!1),a(""),s(""),u(""))}}),ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx(KE,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),ee.jsxs("select",{value:l,onChange:e=>u(e.target.value),className:"flex-1 text-sm bg-muted border border-border rounded px-3 py-1.5 text-foreground outline-none focus:border-border transition-colors",children:[ee.jsx("option",{value:"",children:"无继承"}),e.map(e=>ee.jsx("option",{value:e.id,children:e.label},e.id))]})]}),ee.jsxs("div",{className:"flex items-center justify-between",children:[ee.jsx("span",{className:"text-xs text-muted-foreground",children:"⌘↩ 保存 · Esc 取消"}),ee.jsxs("div",{className:"flex gap-2",children:[ee.jsx("button",{onClick:()=>{r(!1),a(""),s("")},className:"text-sm px-3 py-1 rounded bg-secondary hover:bg-accent text-foreground transition-colors",children:"取消"}),ee.jsx("button",{onClick:()=>{k()},disabled:!i.trim(),className:uk("text-sm px-3 py-1 rounded transition-colors text-white",i.trim()?"bg-blue-600 hover:bg-blue-500":"bg-secondary opacity-40 cursor-not-allowed"),children:"保存"})]})]})]}),0!==e.length||n?ee.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:e.map(n=>c===n.id?ee.jsxs("div",{className:"rounded-lg border border-border bg-background p-3 space-y-2",children:[ee.jsx("input",{ref:b,value:f,onChange:e=>p(e.target.value),placeholder:"名称(可选)",className:"w-full text-sm bg-muted border border-border rounded px-2.5 py-1 text-foreground placeholder:text-muted-foreground outline-none focus:border-border transition-colors"}),ee.jsx("textarea",{value:h,onChange:e=>m(e.target.value),rows:3,className:"w-full text-sm bg-muted border border-border rounded px-2.5 py-1 text-foreground font-mono outline-none focus:border-border transition-colors resize-none",onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),S()),"Escape"===e.key&&d(null)}}),ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx(KE,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),ee.jsxs("select",{value:g,onChange:e=>v(e.target.value),className:"flex-1 text-sm bg-muted border border-border rounded px-2.5 py-1 text-foreground outline-none focus:border-border transition-colors",children:[ee.jsx("option",{value:"",children:"无继承"}),e.filter(e=>e.id!==n.id).map(e=>ee.jsx("option",{value:e.id,children:e.label},e.id))]})]}),ee.jsxs("div",{className:"flex gap-2 justify-end",children:[ee.jsx("button",{onClick:()=>d(null),className:"text-xs px-2.5 py-1 rounded bg-secondary hover:bg-accent text-foreground transition-colors",children:"取消"}),ee.jsx("button",{onClick:()=>{S()},disabled:!h.trim(),className:uk("text-xs px-2.5 py-1 rounded transition-colors text-white",h.trim()?"bg-blue-600 hover:bg-blue-500":"bg-secondary opacity-40 cursor-not-allowed"),children:"保存"})]})]},n.id):ee.jsxs("div",{className:"group relative rounded-lg border border-border bg-background hover:border-muted-foreground/30 transition-colors p-3",children:[ee.jsx("div",{className:"text-sm font-medium text-foreground truncate pr-14",children:n.label}),n.parentId&&(()=>{const t=e.find(e=>e.id===n.parentId);return t?ee.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[ee.jsx(KE,{className:"h-3 w-3 text-muted-foreground"}),ee.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["继承: ",t.label]})]}):null})(),!n.parentId&&n.label!==n.command&&ee.jsx("div",{className:"text-xs text-muted-foreground font-mono truncate mt-1 pr-14",children:n.command}),ee.jsxs("div",{className:"absolute top-2.5 right-2.5 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[ee.jsx("button",{onClick:()=>w({label:n.label,content:n.command}),className:"p-1 rounded text-muted-foreground hover:text-green-400 transition-colors",title:"共享到 ccweb-hub",children:ee.jsx(pj,{className:"h-3.5 w-3.5"})}),ee.jsx("button",{onClick:()=>{d(n.id),p(n.label),m(n.command),v(n.parentId||""),r(!1)},className:"p-1 rounded text-muted-foreground hover:text-blue-400 transition-colors",title:"编辑",children:ee.jsx(lj,{className:"h-3.5 w-3.5"})}),ee.jsx("button",{onClick:()=>{(async e=>{try{await vS(e),t(t=>t.filter(t=>t.id!==e)),c===e&&d(null)}catch(RT){console.error("[GlobalShortcuts] Failed to delete:",RT)}})(n.id)},className:"p-1 rounded text-muted-foreground hover:text-red-400 transition-colors",title:"删除",children:ee.jsx(wj,{className:"h-3.5 w-3.5"})})]})]},n.id))}):ee.jsxs("div",{className:"flex flex-col items-center gap-2 py-10 text-muted-foreground/50 border border-dashed border-border rounded-lg",children:[ee.jsx(kj,{className:"h-6 w-6"}),ee.jsx("p",{className:"text-sm",children:"还没有全局快捷 Prompts"})]}),ee.jsx(GN,{open:!!x,onOpenChange:e=>{e||w(null)},kind:"quick-prompt",label:(null==x?void 0:x.label)??"",content:(null==x?void 0:x.content)??""})]})}const qN=W.createContext({theme:"system",resolved:"dark",setTheme:()=>{}});function KN(){return W.useSyncExternalStore(e=>{const t=window.matchMedia("(prefers-color-scheme: dark)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},()=>window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")}function XN({children:e}){const[t,n]=W.useState(()=>Uk($k.theme,"system")),r=KN(),o="system"===t?r:t;W.useEffect(()=>{const e=document.documentElement;e.classList.remove("light","dark"),e.classList.add(o)},[o]);return ee.jsx(qN.Provider,{value:{theme:t,resolved:o,setTheme:e=>{n(e),Wk($k.theme,e)}},children:e})}function QN(){return W.useContext(qN)}function ZN(){const{theme:e,setTheme:t}=QN(),n=[{value:"light",icon:gj,label:"浅色"},{value:"dark",icon:sj,label:"深色"},{value:"system",icon:ij,label:"系统"}];return ee.jsx("div",{className:"flex items-center rounded-md border border-border bg-muted/50 p-0.5",children:n.map(({value:n,icon:r,label:o})=>ee.jsx("button",{onClick:()=>t(n),className:uk("p-1 rounded-sm transition-colors",e===n?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:o,children:ee.jsx(r,{className:"h-3.5 w-3.5"})},n))})}const JN={workMinutes:30,breakMinutes:5};function eT(){return Uk($k.pomodoroConfig,JN,!0)}const tT=Bk(e=>({running:!1,phase:"work",secondsLeft:60*eT().workMinutes,setRunning:t=>e({running:t}),setPhase:t=>e({phase:t}),setSecondsLeft:t=>e({secondsLeft:t})}));function nT(){const{running:e,phase:t,secondsLeft:n,setPhase:r,setSecondsLeft:o}=tT(),a=W.useCallback(e=>{const t=eT();var n;r(e),o("work"===e?60*t.workMinutes:60*t.breakMinutes),n="break"===e?"休息一下 ☕":"该工作了 💻",dN.info(`番茄钟: ${n}`)},[r,o]);return W.useEffect(()=>{if(!e)return;if(0===n)return void a("work"===t?"break":"work");const r=setTimeout(()=>o(n-1),1e3);return()=>clearTimeout(r)},[e,n,t,a,o]),null}function rT(){const{running:e,phase:t,secondsLeft:n}=tT(),r=Math.floor(n/60),o=n%60,a=`${String(r).padStart(2,"0")}:${String(o).padStart(2,"0")}`;return e?ld.createPortal(ee.jsxs("div",{className:"fixed inset-0 flex flex-col items-center justify-center pointer-events-none z-40 select-none",style:{opacity:"work"===t?.1:.6},children:[ee.jsx("div",{className:uk("font-mono font-bold tabular-nums leading-none","work"===t?"text-foreground":"text-blue-400 dark:text-blue-300"),style:{fontSize:"clamp(360px, 90vw, 1100px)"},children:a}),ee.jsx("div",{className:"mt-3 text-muted-foreground font-medium tracking-widest uppercase",style:{fontSize:"clamp(12px, 1.5vw, 20px)"},children:"work"===t?"专注工作":"休息一下"})]}),document.body):null}function oT(){const{running:e,phase:t,secondsLeft:n,setRunning:r,setPhase:o,setSecondsLeft:a}=tT(),i=Math.floor(n/60),s=n%60,l=`${String(i).padStart(2,"0")}:${String(s).padStart(2,"0")}`;return ee.jsx("button",{onClick:()=>{if(e){const e=eT();o("work"),a(60*e.workMinutes)}else{const e=eT();o("work"),a(60*e.workMinutes)}r(!e)},className:uk("p-1 rounded transition-colors",e?"work"===t?"text-red-500 bg-red-500/10 hover:bg-red-500/20":"text-green-500 bg-green-500/10 hover:bg-green-500/20":"text-muted-foreground hover:text-foreground hover:bg-muted"),title:e?"work"===t?`工作中 ${l} — 点击停止`:`休息中 ${l} — 点击停止`:"启动番茄钟",children:ee.jsx(yj,{className:"h-4 w-4"})})}const aT="v2026.4.20-b",iT=!!window.electronUpdater;function sT(){const[e,t]=W.useState("idle"),[n,r]=W.useState(!1),[o,a]=W.useState(""),[i,s]=W.useState(0),[l,u]=W.useState(null),[c,d]=W.useState(null);W.useEffect(()=>{if(!window.electronUpdater)return;return window.electronUpdater.onUpdateStatus(e=>{switch(e.type){case"progress":{const t=e.info;s(Math.round((null==t?void 0:t.percent)??0));break}case"downloaded":t("downloaded");break;case"error":u(e.info||"Download failed"),t("error")}})},[]);const f=W.useCallback(async()=>{t("checking"),u(null),r(!0);try{if(iT){const e=await window.electronUpdater.checkForUpdate();if(e.error)throw new Error(e.error);if(!e.available)return void t("no_update");a(e.version?`v${e.version}`:"new version")}else{const e=await YS();if(!e.updateAvailable)return void t("no_update");a(`v${e.latest}`)}t("update_available")}catch(RT){u(RT instanceof Error?RT.message:"Check failed"),t("error")}},[]),p=W.useCallback(()=>{const e=3e3,n=Date.now(),r=()=>{if(Date.now()-n>3e5)return u("更新超时(5 分钟)— 请检查服务器状态"),void t("update_failed");KS().then(n=>{n?n.success?(a(n.newVersion?`v${n.newVersion}`:"new version"),t("update_complete")):(u(n.error||"Update failed"),t("update_failed")):setTimeout(r,e)}).catch(()=>{setTimeout(r,e)})};setTimeout(r,e)},[]),h=()=>{r(!1),setTimeout(()=>{t("idle"),a(""),u(null),s(0),d(null)},200)};return ee.jsxs(ee.Fragment,{children:[ee.jsx(Rk,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>{f()},disabled:"checking"===e||"downloading"===e||"executing"===e||"reconnecting"===e,title:"检查更新",children:"checking"===e||"downloading"===e||"executing"===e||"reconnecting"===e?ee.jsx(tj,{className:"h-4 w-4 animate-spin"}):ee.jsx($E,{className:"h-4 w-4"})}),ee.jsx(HP,{open:n,onOpenChange:e=>{e||h()},children:ee.jsxs(qP,{className:"sm:max-w-md",children:[ee.jsxs(KP,{children:[ee.jsxs(QP,{children:["checking"===e&&"Checking for updates...","no_update"===e&&"Up to date","update_available"===e&&`Update ${o} available`,"downloading"===e&&"Downloading update...","downloaded"===e&&"Update ready to install","executing"===e&&"Updating server...","reconnecting"===e&&"Waiting for server restart...","update_complete"===e&&`Updated to ${o}`,"update_failed"===e&&"Update failed","error"===e&&"Update error"]}),ee.jsxs(ZP,{children:["checking"===e&&"Checking for the latest version...","no_update"===e&&`Current version ${aT} is the latest.`,"update_available"===e&&"A new version is available. "+(iT?"Click download to update automatically.":""),"downloading"===e&&`Downloading... ${i}%`,"downloaded"===e&&"The update has been downloaded. Click install to restart and apply.","executing"===e&&"Server is shutting down and installing the update. Please wait...","reconnecting"===e&&"Update installed. Waiting for server to restart...","update_complete"===e&&`Successfully updated from ${aT} to ${o}. Click reload to use the new version.`,"update_failed"===e&&(l||"Update failed. You may need to restart the server manually."),"error"===e&&(l||"An error occurred.")]})]}),"downloading"===e&&ee.jsx("div",{className:"w-full bg-muted rounded-full h-2 overflow-hidden",children:ee.jsx("div",{className:"bg-primary h-full transition-all duration-300",style:{width:`${i}%`}})}),("executing"===e||"reconnecting"===e)&&ee.jsx("div",{className:"flex items-center justify-center py-6",children:ee.jsx(tj,{className:"h-8 w-8 animate-spin text-muted-foreground"})}),ee.jsxs(XP,{children:["no_update"===e&&ee.jsx(Rk,{onClick:h,children:"OK"}),"update_available"===e&&ee.jsxs(ee.Fragment,{children:[ee.jsx(Rk,{variant:"outline",onClick:h,children:"Later"}),ee.jsx(Rk,{onClick:()=>{(async()=>{if(iT){t("downloading"),s(0);const e=await window.electronUpdater.downloadUpdate();e.success?e.path&&d(e.path):(u(e.error||"Download failed"),t("error"))}else{t("executing");try{await qS(),t("reconnecting"),p()}catch(RT){u(RT instanceof Error?RT.message:"Execute failed"),t("error")}}})()},children:iT?"Download & Install":`Update to ${o}`})]}),"downloaded"===e&&ee.jsxs(ee.Fragment,{children:[ee.jsx(Rk,{variant:"outline",onClick:h,children:"Later"}),ee.jsx(Rk,{onClick:()=>{var e;null==(e=window.electronUpdater)||e.quitAndInstall(c||void 0)},children:"Restart & Install"})]}),"update_complete"===e&&ee.jsx(Rk,{onClick:()=>window.location.reload(),children:"Reload Page"}),"update_failed"===e&&ee.jsx(Rk,{onClick:h,children:"Close"}),"error"===e&&ee.jsx(Rk,{onClick:h,children:"Close"})]})]})})]})}function lT(e){return e.map(e=>"text"===e.type?e.content:`\n\`\`\`${e.type}\n${e.content}\n\`\`\`\n`).join("")}function uT(e,t){return{id:e.id??t(),role:e.role,content:lT(e.blocks),blocks:e.blocks,ts:e.timestamp}}function cT({project:e,liveMessages:t,ws:n,historyLimit:r=20,liveWindow:o=50,historyEnabled:a=!0}){const i=e.id,[s,l]=W.useState("running"===e.status?"live":"stopped"),{history:u,hasMore:c,reload:d,loadMore:f}=function({projectId:e,historyLimit:t=20,enabled:n=!0}){const[r,o]=W.useState([]),[a,i]=W.useState(!1),[s,l]=W.useState(!1),u=W.useRef(0),c=W.useCallback(()=>"h"+ ++u.current,[]),d=W.useRef({projectId:e,enabled:n});d.current={projectId:e,enabled:n};const f=W.useCallback(async()=>{if(!d.current.enabled)return;const e=d.current.projectId;l(!0);try{const n=await mE(e,{limit:t});if(d.current.projectId!==e)return;const r=[];for(const e of n.blocks){const t=uT(e,c);t.content.trim()&&r.push(t)}o(r),i(n.hasMore)}catch{}finally{l(!1)}},[t,c]),p=W.useCallback(async()=>{if(!a||s||0===r.length)return;if(!d.current.enabled)return;const e=d.current.projectId,n=r[0];if(n.id&&!n.id.startsWith("h")){l(!0);try{const r=await mE(e,{limit:t,before:n.id});if(d.current.projectId!==e)return;const a=[];for(const e of r.blocks){const t=uT(e,c);t.content.trim()&&a.push(t)}o(e=>[...a,...e]),i(r.hasMore)}catch{}finally{l(!1)}}},[t,a,s,r,c]);return W.useEffect(()=>{n&&f()},[e,n]),{history:r,hasMore:a,isLoading:s,reload:f,loadMore:p}}({projectId:i,historyLimit:r,enabled:a}),[p,h]=W.useState([]),m=W.useRef(0),g=W.useCallback(()=>"m"+ ++m.current,[]),v=W.useRef(null),y=W.useCallback(()=>{v.current&&(clearTimeout(v.current.timer),v.current=null)},[]),b=W.useRef([]),x=W.useRef(!1),w=W.useRef(0);W.useEffect(()=>{if(t.length<w.current&&(w.current=0,b.current=[]),t.length<=w.current)return;const e=t.slice(w.current);w.current=t.length;for(const t of e){x.current=!0;const e=lT(t.blocks);if(e.trim()){if("user"===t.role){const t=b.current.indexOf(e.trim());if(-1!==t){b.current.splice(t,1),y();continue}}h(n=>{if(t.id&&n.some(e=>e.id===t.id))return n;const r={id:t.id??g(),role:t.role,content:e,blocks:t.blocks,ts:t.timestamp};return[...n,r].slice(-o)})}}},[t,g,o,y]),W.useEffect(()=>{if("live"!==s)return void(x.current=!1);const e=setTimeout(()=>{x.current||d()},3e3);return()=>clearTimeout(e)},[s,d]),W.useEffect(()=>{"running"!==e.status||"stopped"!==s&&"error"!==s?"stopped"===e.status&&"live"===s&&l("stopped"):(h([]),l("live"))},[e.status]);const k=W.useRef([]),S=W.useRef(null),E=W.useRef(0),j=W.useCallback(()=>{if(v.current)return;const e=t=>{const r=setTimeout(()=>{if(0!==b.current.length){if(t>=20)return b.current=[],void(v.current=null);n.send("\r"),e(t+1)}else v.current=null},3e3);v.current={timer:r,attempts:t}};e(0)},[n]);W.useEffect(()=>{if(!n.connected)return;if("live"!==s)return;if(0===k.current.length)return;const e=[...k.current];k.current=[];for(const t of e)n.send(t.replace(/\n/g,"\r")+"\r");j()},[n.connected,s,n,j]),W.useEffect(()=>()=>{S.current&&clearTimeout(S.current),y()},[y]);const C=W.useCallback(e=>{k.current.length>=20&&k.current.shift(),k.current.push(e)},[]),P=W.useCallback(e=>{const t=e.trimStart().startsWith("/");if(t||(b.current.push(e),b.current.length>10&&b.current.shift()),h(t=>[...t,{id:g(),role:"user",content:e,ts:(new Date).toISOString()}].slice(-o)),"live"===s)!n.connected||k.current.length>0?C(e):(n.send(e.replace(/\n/g,"\r")+"\r"),t||j());else if("waking"===s)C(e);else if("stopped"===s||"error"===s){C(e);const t=++E.current;l("waking"),dS(i).then(()=>{t===E.current&&(S.current&&clearTimeout(S.current),l("live"))}).catch(e=>{t===E.current&&(dN.error(`启动失败: ${e instanceof Error?e.message:String(e)}`),l("error"),k.current=[])}),S.current=setTimeout(()=>{t===E.current&&k.current.length>0&&(dN.error("启动超时(10s)"),l("error"),k.current=[])},1e4)}},[s,n,i,g,o,j,C]),N=W.useCallback(e=>{const t=e.replace(/\r$/,"").trim();t&&(b.current.push(t),b.current.length>10&&b.current.shift(),h(e=>[...e,{id:g(),role:"user",content:t,ts:(new Date).toISOString()}].slice(-o)))},[g,o]),T=W.useMemo(()=>{const e=new Set;for(const t of p)t.id&&e.add(t.id);return[...u.filter(t=>!t.id||!e.has(t.id)),...p]},[u,p]);return{state:s,setState:l,messages:T,historyMessages:u,displayMessages:p,setDisplayMessages:h,hasMoreHistory:c,loadMoreHistory:f,reloadHistory:d,liveReceivedRef:x,sendMessage:P,appendUserMessage:N,clearSendRetry:y,isWaking:"waking"===s,isRunning:"live"===s}}function dT(e,t,n){const r=W.useRef(!0),o=W.useRef(0),a=W.useCallback(()=>{const t=e.current;t&&(t.scrollHeight<=t.clientHeight||(o.current=performance.now(),t.scrollTop=t.scrollHeight))},[e]);return W.useEffect(()=>{const t=e.current;t&&(t.style.overflowAnchor="none")},[e]),W.useEffect(()=>{const t=e.current;if(!t)return;const n=()=>{if(performance.now()-o.current<80)return;const e=t.scrollHeight-t.scrollTop-t.clientHeight<80;r.current=e};return t.addEventListener("scroll",n,{passive:!0}),()=>t.removeEventListener("scroll",n)},[e]),W.useLayoutEffect(()=>{r.current&&a()},[a,...n]),W.useEffect(()=>{const e=t.current;if(!e)return;const n=new ResizeObserver(()=>{r.current&&a()});return n.observe(e),()=>n.disconnect()},[t,a]),{pinnedRef:r,scrollToBottom:a}}function fT(e,t="shift"){return W.useCallback(n=>{if("Enter"!==n.key)return;if(n.nativeEvent.isComposing||229===n.keyCode)return;("shift"===t?!n.shiftKey:n.shiftKey)&&(n.preventDefault(),e())},[e,t])}const pT=H.memo(function({project:e,externalStatus:t,active:n=!1}){const r=cf(),[o,a]=W.useState(""),[i,s]=W.useState(!1),l=W.useRef(null),u=W.useRef(null),[c,d]=W.useState([]),f=W.useRef(0),p=W.useCallback(e=>{d(t=>{const n=[...t,e];return n.length>200?n.slice(-200):n}),"assistant"===e.role&&(s(!0),setTimeout(()=>s(!1),1e3))},[]),h=W.useCallback(e=>{var t;"stopped"===e&&(null==(t=S.current)||t.call(S,"stopped"))},[]),{sendInput:m,connected:g}=ON({projectId:e.id,enabled:!0,onChatMessage:p,onStatusChange:h}),{state:v,setState:y,messages:b,sendMessage:x,isRunning:w,isWaking:k}=cT({project:e,liveMessages:c,ws:{send:m,connected:g},historyLimit:4,liveWindow:4}),S=W.useRef(y);S.current=y,W.useEffect(()=>{"stopped"===v&&(d([]),f.current=0)},[v]),W.useEffect(()=>{t&&("running"!==t||"stopped"!==v&&"error"!==v?"stopped"===t&&"live"===v&&y("stopped"):(d([]),y("live")))},[t]),dT(l,u,[b]);const E=fT(W.useCallback(()=>{const e=o.trim();e&&(a(""),x(e))},[o,x]),"enter"),j="stopped"===v,C=b.slice(-4),P=ee.jsxs("div",{className:uk("flex flex-col h-full rounded-lg overflow-hidden bg-background transition-colors duration-300",n?"border-transparent bg-transparent shadow-none":i?"border border-blue-500":"border border-border","error"===v&&"border border-red-500/50"),children:[ee.jsxs("div",{className:"flex items-center gap-1 px-1.5 py-1.5 border-b border-border bg-muted/30 transition-colors",children:[ee.jsx(QE,{className:"h-3.5 w-3.5 text-muted-foreground/40 flex-shrink-0 cursor-grab active:cursor-grabbing"}),ee.jsx("span",{className:"font-medium text-sm truncate flex-1 cursor-pointer hover:text-blue-400 transition-colors",onClick:()=>r(`/projects/${e.id}`),title:"打开项目详情",children:e.name}),ee.jsx("span",{className:"text-[10px] text-muted-foreground font-mono",children:e.cliTool??"claude"}),ee.jsx("span",{className:uk("w-2 h-2 rounded-full flex-shrink-0",w?"bg-green-500":k?"bg-yellow-400 animate-pulse":"bg-zinc-400")})]}),ee.jsx("div",{ref:l,className:"flex-1 overflow-y-auto min-h-0 text-xs",children:ee.jsxs("div",{ref:u,className:"p-2 space-y-2 min-h-full",children:[C.map(e=>{const t="user"===e.role;return ee.jsx("div",{className:uk("flex",t?"justify-end":"justify-start"),children:ee.jsx("div",{className:uk("max-w-[85%] rounded-lg px-2.5 py-1.5 whitespace-pre-wrap break-words leading-relaxed",t?"bg-blue-500/15 text-foreground border border-blue-500/20 rounded-br-sm dark:bg-blue-500/20 dark:border-blue-500/25":"bg-secondary text-secondary-foreground border border-border rounded-bl-sm"),children:ee.jsx("div",{className:"line-clamp-6",children:e.content})})},e.id)}),j&&0===C.length&&ee.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground/40 text-xs",children:"无对话记录"}),k&&ee.jsx("div",{className:"flex items-center justify-center h-full text-yellow-400 text-xs animate-pulse",children:"启动中..."})]})}),ee.jsx("div",{className:"border-t border-border p-1.5",children:ee.jsx("input",{type:"text",value:o,onChange:e=>a(e.target.value),onKeyDown:E,disabled:k,placeholder:k?"启动中...":j?"输入命令(自动启动)... Shift+⏎":"输入命令... Shift+⏎",className:uk("w-full bg-transparent text-xs font-mono outline-none placeholder:text-muted-foreground/40 px-1.5 py-1",k&&"opacity-50 cursor-not-allowed")})})]});return n?ee.jsx("div",{className:"card-active-glow rounded-lg h-full",children:P}):P});function hT({projects:e,projectStatuses:t,activeProjectIds:n}){const r=W.useMemo(()=>e.filter(e=>!e.archived),[e]),{order:o,setOrder:a,applyOrder:i}=VN(),[s,l]=W.useState(null),[u,c]=W.useState(null),d=W.useRef(null),f=W.useMemo(()=>i(r),[r,i]),p=W.useCallback((e,t)=>{l(t),e.dataTransfer.effectAllowed="move";const n=document.createElement("div");n.style.width="1px",n.style.height="1px",n.style.opacity="0.01",document.body.appendChild(n),e.dataTransfer.setDragImage(n,0,0),d.current=n},[]),h=W.useCallback((e,t)=>{e.preventDefault(),e.dataTransfer.dropEffect="move",c(t)},[]),m=W.useCallback((e,t)=>{if(e.preventDefault(),!s||s===t)return l(null),void c(null);const n=f.map(e=>e.id),r=o.length?[...o]:n;for(const o of n)r.includes(o)||r.push(o);const i=r.indexOf(s),u=r.indexOf(t);if(-1===i||-1===u)return l(null),void c(null);r.splice(i,1),r.splice(u,0,s),a(r),l(null),c(null)},[s,f,o,a]),g=W.useCallback(()=>{l(null),c(null),d.current&&(d.current.remove(),d.current=null)},[]),{cols:v,rows:y}=(b=f.length)<=1?{cols:1,rows:1}:b<=2?{cols:2,rows:1}:b<=4?{cols:2,rows:2}:b<=6?{cols:3,rows:2}:b<=9?{cols:3,rows:3}:b<=12?{cols:4,rows:3}:{cols:4,rows:Math.ceil(b/4)};var b;if(0===f.length)return ee.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground/50 text-sm",children:"没有活跃项目"});const x=y<=3;return ee.jsx("div",{className:"h-full w-full p-2 gap-2 overflow-y-auto",style:{display:"grid",gridTemplateColumns:`repeat(${v}, minmax(0, 1fr))`,gridAutoRows:x?`minmax(180px, min(${Math.floor(100/y)}vh, 350px))`:"280px"},children:f.map(e=>ee.jsx("div",{draggable:!0,onDragStart:t=>p(t,e.id),onDragOver:t=>h(t,e.id),onDrop:t=>m(t,e.id),onDragEnd:g,className:uk("transition-all duration-200",s===e.id&&"opacity-40 scale-95",u===e.id&&s!==e.id&&"ring-2 ring-blue-500/50 rounded-lg"),children:ee.jsx(pT,{project:e,externalStatus:t.get(e.id),active:n.has(e.id)})},e.id))})}function mT(){const e=cf(),{projects:t,loading:n,error:r,hasFetched:o,fetchProjects:a,addProject:i,updateProject:s,removeProject:l}=Kk(),u=Yk(e=>e.clearToken),[c,d]=W.useState(!1),[f,p]=W.useState(!1),[h,m]=W.useState(new Set),g=W.useRef(new Map),[v,y]=W.useState(new Map),b=W.useRef(0),[x,w]=W.useState(!!document.fullscreenElement),[k,S]=W.useState(!1),[E,j]=Gk($k.monitorMode,!1,{parse:!0}),[C,P]=W.useState(new Map);W.useEffect(()=>{const e=()=>w(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[]),W.useEffect(()=>{a()},[a]);AN({onActivityUpdate:W.useCallback(e=>{if(e.status){const t=Kk.getState().projects.find(t=>t.id===e.projectId);t&&t.status!==e.status&&s({...t,status:e.status}),P(t=>{const n=new Map(t);return n.set(e.projectId,e.status),n})}const t=Date.now(),n=g.current;if(e.active){m(t=>t.has(e.projectId)?t:new Set(t).add(e.projectId));const r=n.get(e.projectId)??[];let o=!1;if(e.semantic){const n=r[r.length-1];`${e.semantic.phase}:${e.semantic.detail??""}`!==(n?`${n.phase}:${n.detail??""}`:"")?(r.push({id:b.current++,phase:e.semantic.phase,detail:e.semantic.detail,ts:t}),o=!0):n&&(n.ts=t)}const a=r.filter(e=>t-e.ts<8e3),i=a.length>3?a.slice(-3):a;i.length!==r.length&&(o=!0),n.set(e.projectId,i),o&&y(new Map(n))}else m(t=>{if(!t.has(e.projectId))return t;const n=new Set(t);return n.delete(e.projectId),n}),n.has(e.projectId)&&n.get(e.projectId).length>0&&(n.set(e.projectId,[]),y(new Map(n)))},[s])}),W.useEffect(()=>{const e=setInterval(()=>{const e=Date.now(),t=g.current;let n=!1;for(const[r,o]of t){const a=o.filter(t=>e-t.ts<8e3);a.length!==o.length&&(t.set(r,a),n=!0)}n&&y(new Map(t)),m(e=>{let n=!1;const r=new Set(e);for(const o of e){const e=t.get(o);e&&0!==e.length||(r.delete(o),n=!0)}return n?r:e})},3e3);return()=>clearInterval(e)},[]);const N=W.useMemo(()=>t.filter(e=>!e.archived),[t]),T=W.useMemo(()=>t.filter(e=>e.archived),[t]),M=W.useMemo(()=>Array.from(new Set(t.flatMap(e=>e.tags??[]))),[t]),[R,L]=W.useState([]),D=W.useMemo(()=>0===R.length?N:N.filter(e=>R.some(t=>{var n;return null==(n=e.tags)?void 0:n.includes(t)})),[N,R]),[_,A]=W.useState(!1),O=W.useCallback(async()=>{if(!_){A(!0);try{const e=await LE(),t=e.results.filter(e=>e.ok).length,n=e.results.filter(e=>e.skipped).length,r=e.total-t-n;dN.success(`同步完成:${t} 成功 / ${n} 跳过 / ${r} 失败`)}catch(RT){dN.error(`同步失败:${RT.message}`)}finally{A(!1)}}},[_]),{order:I,setOrder:z,applyOrder:F}=VN(),[V,B]=W.useState(null),[$,U]=W.useState(null),H=W.useMemo(()=>F(D),[D,F]),G=W.useCallback(e=>B(e),[]),Y=W.useCallback(()=>{B(null),U(null)},[]),q=W.useCallback((e,t)=>{e.preventDefault(),U(t)},[]),K=W.useCallback((e,t,n)=>{if(e.preventDefault(),!n||n===t)return void U(null);const r=H.map(e=>e.id),o=I.length?[...I]:r;for(const s of r)o.includes(s)||o.push(s);const a=o.indexOf(n),i=o.indexOf(t);if(-1===a||-1===i)return B(null),void U(null);o.splice(a,1),o.splice(i,0,n),z(o),B(null),U(null)},[H,I,z]),X={onDelete:e=>{(async e=>{try{await cS(e),l(e)}catch(RT){dN.error(RT instanceof Error?RT.message:"Failed to delete project")}})(e)},onArchive:e=>{(async e=>{try{const t=await fS(e);s(t)}catch(RT){dN.error(RT instanceof Error?RT.message:"Failed to archive project")}})(e)},onUnarchive:e=>{(async e=>{try{const t=await pS(e);s(t)}catch(RT){dN.error(RT instanceof Error?RT.message:"Failed to restore project")}})(e)},onUpdated:s};return ee.jsxs("div",{className:"min-h-screen bg-background",children:[ee.jsx("header",{className:"border-b sticky top-0 bg-background z-10",children:ee.jsxs("div",{className:"max-w-6xl mx-auto px-4 h-14 flex items-center justify-between",children:[ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx(vj,{className:"h-5 w-5"}),ee.jsxs("div",{children:[ee.jsx("span",{className:"font-semibold text-lg leading-tight block",children:"CC Web"}),ee.jsx("span",{className:"text-[10px] text-muted-foreground leading-none",children:aT})]})]}),ee.jsx(HN,{}),ee.jsx(Rk,{variant:"ghost",size:"sm",onClick:()=>e("/skillhub"),title:"CCWeb Hub",children:ee.jsx(mj,{className:"h-4 w-4"})}),ee.jsx(Rk,{variant:"ghost",size:"sm",onClick:()=>e("/mobile"),title:"手机界面",children:ee.jsx(hj,{className:"h-4 w-4"})}),ee.jsx(Rk,{variant:"ghost",size:"sm",onClick:()=>e("/settings"),title:"设置",children:ee.jsx(fj,{className:"h-4 w-4"})}),ee.jsx(Rk,{variant:"ghost",size:"sm",onClick:()=>j(!E),title:E?"卡片模式":"监控大屏",className:uk(E&&"text-blue-400 bg-blue-500/10"),children:E?ee.jsx(ej,{className:"h-4 w-4"}):ee.jsx(ij,{className:"h-4 w-4"})}),ee.jsx(Rk,{variant:"ghost",size:"sm",onClick:()=>{document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()},title:x?"Exit fullscreen":"Fullscreen",children:x?ee.jsx(oj,{className:"h-4 w-4"}):ee.jsx(rj,{className:"h-4 w-4"})}),ee.jsx(sT,{}),ee.jsx(oT,{}),ee.jsx(ZN,{}),ee.jsxs(Rk,{variant:"ghost",size:"sm",onClick:()=>{u(),e("/login")},children:[ee.jsx(nj,{className:"h-4 w-4 mr-2"}),"Logout"]})]})}),E&&ee.jsx("div",{className:"flex-1 min-h-0",children:ee.jsx(hT,{projects:t,projectStatuses:C,activeProjectIds:h})}),!E&&ee.jsxs("main",{className:"max-w-6xl mx-auto px-4 py-8",children:[ee.jsxs("div",{className:"flex items-center justify-between mb-6",children:[ee.jsxs("div",{children:[ee.jsx("h1",{className:"text-2xl font-bold",children:"Projects"}),ee.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"Each project runs Claude CLI in a dedicated terminal session."})]}),ee.jsxs("div",{className:"flex gap-2",children:[ee.jsxs(Rk,{variant:"outline",onClick:()=>{O()},disabled:_,title:"通过 rsync 同步所有项目(在设置里配置服务器)",children:[_?ee.jsx(tj,{className:"h-4 w-4 mr-2 animate-spin"}):ee.jsx(YE,{className:"h-4 w-4 mr-2"}),"全部同步"]}),ee.jsxs(Rk,{variant:"outline",onClick:()=>p(!0),children:[ee.jsx(HE,{className:"h-4 w-4 mr-2"}),"Open Project"]}),ee.jsxs(Rk,{onClick:()=>d(!0),children:[ee.jsx(uj,{className:"h-4 w-4 mr-2"}),"New Project"]})]})]}),n&&!o&&ee.jsx("div",{className:"text-center text-muted-foreground py-12",children:"Loading projects..."}),r&&ee.jsx("div",{className:"text-center text-destructive py-12",children:r}),o&&!n&&!r&&0===t.length&&ee.jsxs("div",{className:"text-center py-20",children:[ee.jsx(vj,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),ee.jsx("h2",{className:"text-lg font-semibold mb-2",children:"No projects yet"}),ee.jsx("p",{className:"text-muted-foreground text-sm mb-6",children:"Create a new project or open an existing one."}),ee.jsxs("div",{className:"flex gap-2 justify-center",children:[ee.jsxs(Rk,{variant:"outline",onClick:()=>p(!0),children:[ee.jsx(HE,{className:"h-4 w-4 mr-2"}),"Open Project"]}),ee.jsxs(Rk,{onClick:()=>d(!0),children:[ee.jsx(uj,{className:"h-4 w-4 mr-2"}),"New Project"]})]})]}),!n&&!r&&M.length>0&&ee.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-4",children:[M.map(e=>ee.jsxs("button",{onClick:()=>L(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),className:uk("px-2 py-0.5 rounded-full text-xs border transition-colors",R.includes(e)?"bg-blue-500/20 text-blue-400 border-blue-500/40":"bg-muted text-muted-foreground border-border hover:border-muted-foreground/40"),children:["#",e]},e)),R.length>0&&ee.jsx("button",{onClick:()=>L([]),className:"px-2 py-0.5 rounded-full text-xs text-muted-foreground hover:text-foreground transition-colors",children:"清除"})]}),!n&&!r&&H.length>0&&ee.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:H.map((e,t)=>ee.jsx(hw.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.3,delay:Math.min(.05*t,.3),ease:"easeOut"},draggable:!0,onDragStart:()=>G(e.id),onDragOver:t=>q(t,e.id),onDrop:t=>K(t,e.id,V),onDragEnd:Y,style:{opacity:V===e.id?.4:1,cursor:"grab"},className:uk($===e.id&&V!==e.id&&"ring-2 ring-blue-500/50 rounded-xl"),children:ee.jsx(CN,{project:e,active:h.has(e.id),statusStack:v.get(e.id)??[],...X})},e.id))}),!n&&!r&&T.length>0&&ee.jsxs("div",{className:"mt-10",children:[ee.jsxs("button",{className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors mb-4 group",onClick:()=>S(e=>!e),children:[ee.jsx(hw.span,{animate:{rotate:k?90:0},transition:{duration:.2},children:ee.jsx(BE,{className:"h-4 w-4"})}),ee.jsx("span",{className:"font-medium",children:"Archived"}),ee.jsx("span",{className:"text-xs bg-muted rounded-full px-2 py-0.5",children:T.length})]}),ee.jsx(Xb,{children:k&&ee.jsx(hw.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.25,ease:"easeInOut"},className:"overflow-hidden",children:ee.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:T.map(e=>ee.jsx(CN,{project:e,active:!1,...X},e.id))})})})]}),ee.jsx(YN,{})]}),ee.jsx(MN,{open:c,onOpenChange:d,onCreated:e=>{i(e)}}),ee.jsx(RN,{open:f,onOpenChange:p,onOpened:e=>{i(e)}})]})}class gT extends H.Component{constructor(){super(...arguments),t(this,"state",{hasError:!1,error:null}),t(this,"handleReset",()=>{var e,t;this.setState({hasError:!1,error:null}),null==(t=(e=this.props).onReset)||t.call(e)})}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("[ErrorBoundary]",e,t.componentStack),dN.error(e.message||"Something went wrong")}render(){return this.state.hasError?this.props.fallback?this.props.fallback:ee.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3 p-4 text-sm text-muted-foreground",children:[ee.jsx("p",{children:"出错了"}),ee.jsx("button",{onClick:this.handleReset,className:"px-3 py-1.5 text-xs rounded-md border border-border hover:bg-muted transition-colors",children:"重新加载"})]}):this.props.children}}function vT({plugin:e,onConfigChange:t,onClose:n}){const{float:r,userConfig:o}=e,[a,i]=W.useState(()=>{var e,t;return{x:(null==(e=o.floatPosition)?void 0:e.x)??.5*window.innerWidth-r.defaultWidth/2,y:(null==(t=o.floatPosition)?void 0:t.y)??.3*window.innerHeight}}),[s,l]=W.useState(()=>{var e,t;return{w:(null==(e=o.floatSize)?void 0:e.w)??r.defaultWidth,h:(null==(t=o.floatSize)?void 0:t.h)??r.defaultHeight}}),[u,c]=W.useState(!1),[d,f]=W.useState(100),p=W.useRef(null),h=W.useRef(null),m=W.useCallback(()=>{f(Date.now()%1e5+100)},[]),g=W.useRef(null),v=W.useCallback(n=>{n.preventDefault(),m(),g.current={sx:n.clientX,sy:n.clientY,ox:a.x,oy:a.y},h.current&&(h.current.style.pointerEvents="none");const r=e=>{if(!g.current)return;const t=Math.max(0,Math.min(window.innerWidth-100,g.current.ox+e.clientX-g.current.sx)),n=Math.max(0,Math.min(window.innerHeight-40,g.current.oy+e.clientY-g.current.sy));p.current&&(p.current.style.left=t+"px",p.current.style.top=n+"px")},o=n=>{if(!g.current)return;const a=Math.max(0,Math.min(window.innerWidth-100,g.current.ox+n.clientX-g.current.sx)),s=Math.max(0,Math.min(window.innerHeight-40,g.current.oy+n.clientY-g.current.sy));g.current=null,h.current&&(h.current.style.pointerEvents=""),i({x:a,y:s}),t(e.id,{floatPosition:{x:a,y:s}}),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",o)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",o)},[a,m,e.id,t]),y=W.useRef(null),b=W.useCallback(n=>{if(!r.resizable)return;n.preventDefault(),n.stopPropagation(),m(),y.current={sx:n.clientX,sy:n.clientY,ow:s.w,oh:s.h},h.current&&(h.current.style.pointerEvents="none");const o=r.minWidth??150,a=r.minHeight??100,i=e=>{if(!y.current)return;const t=Math.max(o,y.current.ow+e.clientX-y.current.sx),n=Math.max(a,y.current.oh+e.clientY-y.current.sy);p.current&&(p.current.style.width=t+"px",p.current.style.height=n+"px")},u=n=>{if(!y.current)return;const r=Math.max(o,y.current.ow+n.clientX-y.current.sx),s=Math.max(a,y.current.oh+n.clientY-y.current.sy);y.current=null,h.current&&(h.current.style.pointerEvents=""),l({w:r,h:s}),t(e.id,{floatSize:{w:r,h:s}}),window.removeEventListener("mousemove",i),window.removeEventListener("mouseup",u)};window.addEventListener("mousemove",i),window.addEventListener("mouseup",u)},[s,r,m,e.id,t]);W.useEffect(()=>{const t=async t=>{var n,r,o,a,i;if(t.source!==(null==(n=h.current)?void 0:n.contentWindow))return;const{callId:s,method:l,args:u}=t.data;if(s&&l)try{const t=Zk(),n={"Content-Type":"application/json","X-Plugin-Id":e.id};let a,i;if(t&&(n.Authorization=`Bearer ${t}`),"storage:get"===l)a=`/api/plugin-bridge/storage/${e.id}`,i={method:"GET",headers:n};else if("storage:set"===l)a=`/api/plugin-bridge/storage/${e.id}`,i={method:"PUT",headers:n,body:JSON.stringify(u)};else{const t={"project:status":{path:`/api/plugin-bridge/project/status/${u.projectId}`,httpMethod:"GET"},"project:list":{path:"/api/plugin-bridge/project/list",httpMethod:"GET"},"terminal:send":{path:"/api/plugin-bridge/terminal/send",httpMethod:"POST"},"session:read":{path:`/api/plugin-bridge/session/${u.projectId}`,httpMethod:"GET"},"system:info":{path:"/api/plugin-bridge/system/info",httpMethod:"GET"}};if("backend:api"===l){const{method:t,path:r,body:o}=u;if(!r||!r.startsWith("/")||r.includes(".."))throw new Error("Invalid API path");a=`/api/plugins/${e.id}${r}`,i={method:t||"GET",headers:n},!o||"POST"!==t&&"PUT"!==t||(i.body=JSON.stringify(o))}else{const e=t[l];if(!e)throw new Error(`Unknown method: ${l}`);a=e.path,i={method:e.httpMethod,headers:n},"POST"===e.httpMethod&&(i.body=JSON.stringify(u))}}const c=await fetch(a,i),d=await c.json();null==(o=null==(r=h.current)?void 0:r.contentWindow)||o.postMessage({callId:s,result:d,error:null},window.location.origin)}catch(RT){const t=RT instanceof Error?RT.message:"Bridge error";null==(i=null==(a=h.current)?void 0:a.contentWindow)||i.postMessage({callId:s,result:null,error:t},window.location.origin)}};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)},[e.id]);const x=o.clickable??r.clickable.default,w=`/plugins/${e.id}/${e.float?"index.html":""}`;return ee.jsxs(hw.div,{ref:p,className:uk("fixed rounded-lg border border-border shadow-xl overflow-hidden flex flex-col","bg-background/95 backdrop-blur-sm"),style:{left:a.x,top:a.y,width:u?200:s.w,height:u?32:s.h,zIndex:d},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},onMouseDown:m,children:[ee.jsxs("div",{className:"h-8 flex items-center gap-1 px-2 bg-muted/50 border-b border-border cursor-grab active:cursor-grabbing flex-shrink-0 select-none",onMouseDown:v,children:[ee.jsx(XE,{className:"h-3 w-3 text-muted-foreground/40 flex-shrink-0"}),ee.jsx("span",{className:"text-xs text-muted-foreground truncate flex-1",children:e.name}),ee.jsx("button",{onClick:()=>c(e=>!e),className:"p-0.5 rounded hover:bg-white/10 text-muted-foreground/60 hover:text-foreground transition-colors",children:ee.jsx(aj,{className:"h-3 w-3"})}),ee.jsx("button",{onClick:()=>n(e.id),className:"p-0.5 rounded hover:bg-red-500/20 text-muted-foreground/60 hover:text-red-400 transition-colors",children:ee.jsx(wj,{className:"h-3 w-3"})})]}),!u&&ee.jsxs("div",{className:"flex-1 min-h-0 relative",children:[ee.jsx("iframe",{ref:h,src:w,sandbox:"allow-scripts allow-same-origin",className:"w-full h-full border-0",style:{pointerEvents:x?"auto":"none"}}),r.resizable&&ee.jsx("div",{className:"absolute bottom-0 right-0 w-3 h-3 cursor-se-resize",onMouseDown:b,children:ee.jsxs("svg",{viewBox:"0 0 12 12",className:"w-3 h-3 text-muted-foreground/30",children:[ee.jsx("path",{d:"M11 1v10H1",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),ee.jsx("path",{d:"M11 5v6H5",fill:"none",stroke:"currentColor",strokeWidth:"1.5"})]})})]})]})}function yT({plugins:e,onPluginsChange:t,onClose:n}){const r=W.useCallback(async(e,n)=>{t(t=>t.map(t=>t.id===e?{...t,userConfig:{...t.userConfig,...n}}:t));try{await EE(e,n)}catch{}},[t]);return 0===e.length?null:ee.jsx(Xb,{children:e.map(e=>ee.jsx(vT,{plugin:e,onConfigChange:r,onClose:n},e.id))})}function bT({onTogglePlugin:e,activeIds:t}){const[n,r]=W.useState([]);return W.useEffect(()=>{wE().then(e=>r(e.filter(e=>e.enabled))).catch(()=>r([]))},[]),W.useEffect(()=>{const e=()=>{wE().then(e=>r(e.filter(e=>e.enabled))).catch(()=>{})};return window.addEventListener("focus",e),()=>window.removeEventListener("focus",e)},[]),0===n.length?null:ee.jsx("div",{className:"fixed top-14 left-1/2 -translate-x-1/2 z-40 pointer-events-none",children:ee.jsx(hw.div,{className:"pointer-events-auto flex items-center gap-1 px-2 py-1 rounded-full bg-background/60 backdrop-blur-md border border-border/50 shadow-lg",initial:{opacity:0,y:-8},animate:{opacity:1,y:0},transition:{duration:.2,ease:"easeOut"},children:n.map(n=>{const r=t.has(n.id),o=n.name.slice(0,2);return ee.jsxs(hw.button,{onClick:()=>e(n),className:uk("relative flex items-center justify-center w-7 h-7 rounded-full text-[10px] font-medium transition-colors",r?"bg-blue-500/20 text-blue-400":"text-muted-foreground/70 hover:text-foreground hover:bg-muted/80"),whileHover:{scale:1.12},whileTap:{scale:.92},title:n.name+(n.description?` — ${n.description}`:""),children:[o,ee.jsx(Xb,{children:r&&ee.jsx(hw.span,{className:"absolute -bottom-0.5 left-1/2 -translate-x-1/2 h-1 w-1 rounded-full bg-blue-400",initial:{scale:0},animate:{scale:1},exit:{scale:0}})})]},n.id)})})})}const xT=H.lazy(()=>fd(()=>import("./ProjectPage-DEXix3V3.js").then(e=>e.P),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(e=>({default:e.ProjectPage}))),wT=H.lazy(()=>fd(()=>import("./SettingsPage-BD5u0Nov.js"),__vite__mapDeps([9,6,3,4])).then(e=>({default:e.SettingsPage}))),kT=H.lazy(()=>fd(()=>import("./SkillHubPage-Cqip4-le.js"),__vite__mapDeps([10,7,3])).then(e=>({default:e.SkillHubPage}))),ST=H.lazy(()=>fd(()=>import("./MobilePage-BUyBZIGk.js"),__vite__mapDeps([11,2,3,4,5])).then(e=>({default:e.MobilePage})));function ET(){return ee.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:ee.jsx("span",{className:"text-muted-foreground text-sm",children:"Loading…"})})}function jT({children:e}){const[t,n]=W.useState(!1),r=Yk(e=>e.token),o=Yk(e=>e.setToken);return W.useEffect(()=>{r?n(!0):nS()?rS().then(e=>o(e)).catch(()=>{}).finally(()=>n(!0)):n(!0)},[]),t||r?r?ee.jsx(ee.Fragment,{children:e}):ee.jsx(wf,{to:"/login",replace:!0}):null}const CT=window.matchMedia("(pointer: coarse)").matches&&window.innerWidth<768;function PT(){const[e,t]=W.useState([]),[n,r]=W.useState(()=>{try{return new Set(JSON.parse(localStorage.getItem("cc_plugin_open")||"[]"))}catch{return new Set}}),o=lf();W.useEffect(()=>{wE().then(t).catch(()=>t([]))},[]);const a=W.useCallback(e=>{r(t=>{const n=new Set(t);n.has(e.id)?n.delete(e.id):n.add(e.id);try{localStorage.setItem("cc_plugin_open",JSON.stringify([...n]))}catch{}return n})},[]),i=W.useCallback(e=>{r(t=>{const n=new Set(t);n.delete(e);try{localStorage.setItem("cc_plugin_open",JSON.stringify([...n]))}catch{}return n})},[]),s=function(e){if("/"===e||"/dashboard"===e)return{type:"dashboard"};const t=e.match(/^\/projects?\/([^/]+)/);return t?{type:"project",projectId:t[1]}:{type:"other"}}(o.pathname),l=e.filter(e=>{if(!e.enabled||!n.has(e.id))return!1;switch(e.userConfig.scope??e.float.scope.default){case"global":return!0;case"dashboard":return"dashboard"===s.type;case"project":return"project"===s.type;case"project:specific":return"project"===s.type&&(e.userConfig.projectIds??[]).includes(s.projectId??"");default:return!1}}),u="/login"===o.pathname,c="/mobile"===o.pathname;return ee.jsxs(ee.Fragment,{children:[!u&&!c&&!CT&&ee.jsx(bT,{onTogglePlugin:a,activeIds:n}),ee.jsx(yT,{plugins:l,onPluginsChange:t,onClose:i})]})}function NT({children:e}){const t=lf();return CT&&"/"===t.pathname?ee.jsx(wf,{to:"/mobile",replace:!0}):ee.jsx(ee.Fragment,{children:e})}function TT(){return ee.jsx(XN,{children:ee.jsxs(wN,{children:[ee.jsx(bN,{richColors:!0,position:"bottom-right"}),ee.jsx(nT,{}),ee.jsx(rT,{}),ee.jsx(gT,{children:ee.jsxs(Nf,{children:[ee.jsx(PT,{}),ee.jsx(NT,{children:ee.jsx(W.Suspense,{fallback:ee.jsx(ET,{}),children:ee.jsxs(Ef,{children:[ee.jsx(kf,{path:"/login",element:ee.jsx(_E,{})}),ee.jsx(kf,{path:"/",element:ee.jsx(jT,{children:ee.jsx(mT,{})})}),ee.jsx(kf,{path:"/projects/:id",element:ee.jsx(jT,{children:ee.jsx(xT,{})})}),ee.jsx(kf,{path:"/settings",element:ee.jsx(jT,{children:ee.jsx(wT,{})})}),ee.jsx(kf,{path:"/skillhub",element:ee.jsx(jT,{children:ee.jsx(kT,{})})}),ee.jsx(kf,{path:"/mobile",element:ee.jsx(jT,{children:ee.jsx(ST,{})})}),ee.jsx(kf,{path:"*",element:ee.jsx(wf,{to:"/",replace:!0})})]})})})]})})]})})}te.createRoot(document.getElementById("root")).render(ee.jsx(H.StrictMode,{children:ee.jsx(TT,{})}));export{uC as $,Xb as A,Rk as B,BE as C,$E as D,UE as E,HE as F,dE as G,fE as H,Lk as I,Gk as J,vk as K,Vj as L,oj as M,Cj as N,iC as O,lj as P,aC as Q,H as R,$k as S,bj as T,yk as U,jj as V,zj as W,wj as X,oP as Y,Fj as Z,fd as _,QN as a,eE as a$,QC as a0,Zj as a1,Gj as a2,pj as a3,yS as a4,hS as a5,KE as a6,GN as a7,wS as a8,vS as a9,oT as aA,ZN as aB,tj as aC,YE as aD,RE as aE,tE as aF,dS as aG,_N as aH,HN as aI,Nj as aJ,CE as aK,cT as aL,bE as aM,vE as aN,dT as aO,Hk as aP,xE as aQ,yE as aR,dj as aS,df as aT,Kk as aU,vj as aV,Dj as aW,Rj as aX,ld as aY,XS as aZ,ZS as a_,HP as aa,qP as ab,KP as ac,QP as ad,ZP as ae,Ik as af,XP as ag,mS as ah,bS as ai,gS as aj,xS as ak,CS as al,LS as am,SS as an,PS as ao,ES as ap,NS as aq,jS as ar,TS as as,MS as at,RS as au,kj as av,mj as aw,cf as ax,FE as ay,Ej as az,WS as b,ck as b0,dk as b1,fk as b2,hk as b3,NE as b4,TE as b5,ME as b6,LE as b7,_S as b8,OS as b9,zS as bA,jv as bB,Pv as bC,Ev as bD,r as bE,o as bF,PE as bG,a as bH,DE as bI,AS as ba,Df as bb,eT as bc,sE as bd,yj as be,QS as bf,nE as bg,oE as bh,iE as bi,JS as bj,aE as bk,rE as bl,lE as bm,wE as bn,kE as bo,SE as bp,jE as bq,DS as br,kS as bs,AN as bt,VN as bu,sT as bv,ij as bw,ON as bx,fT as by,WE as bz,OE as c,uk as d,rj as e,BS as f,Zk as g,Uk as h,Qk as i,ee as j,VS as k,cj as l,GS as m,$S as n,qE as o,hw as p,uE as q,W as r,Wk as s,dN as t,SN as u,pE as v,HS as w,VE as x,uj as y,cE as z};
75
+ */const jE=(e,t)=>{const n=W.forwardRef(({color:n="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:i="",children:s,...l},u)=>{return W.createElement("svg",{ref:u,...EE,width:r,height:r,stroke:n,strokeWidth:a?24*Number(o)/Number(r):o,className:["lucide",`lucide-${c=e,c.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim()}`,i].join(" "),...l},[...t.map(([e,t])=>W.createElement(e,t)),...Array.isArray(s)?s:[s]]);var c});return n.displayName=`${e}`,n},CE=jE("ArchiveRestore",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]]),PE=jE("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]),NE=jE("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),TE=jE("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),ME=jE("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),RE=jE("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),LE=jE("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),DE=jE("File",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}]]),_E=jE("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]),AE=jE("FolderPlus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["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"}]]),OE=jE("FolderSync",[["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v.5",key:"1dkoa9"}],["path",{d:"M12 10v4h4",key:"1czhmt"}],["path",{d:"m12 14 1.535-1.605a5 5 0 0 1 8 1.5",key:"lvuxfi"}],["path",{d:"M22 22v-4h-4",key:"1ewp4q"}],["path",{d:"m22 18-1.535 1.605a5 5 0 0 1-8-1.5",key:"14ync0"}]]),IE=jE("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"}]]),zE=jE("GitMerge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]),FE=jE("GripHorizontal",[["circle",{cx:"12",cy:"9",r:"1",key:"124mty"}],["circle",{cx:"19",cy:"9",r:"1",key:"1ruzo2"}],["circle",{cx:"5",cy:"9",r:"1",key:"1a8b28"}],["circle",{cx:"12",cy:"15",r:"1",key:"1e56xg"}],["circle",{cx:"19",cy:"15",r:"1",key:"1a92ep"}],["circle",{cx:"5",cy:"15",r:"1",key:"5r1jwy"}]]),VE=jE("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]),$E=jE("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]),BE=jE("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",key:"1kog09"}]]),UE=jE("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),WE=jE("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),HE=jE("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),GE=jE("Maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]),YE=jE("Minimize",[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]]),qE=jE("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),KE=jE("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]),XE=jE("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),QE=jE("Pencil",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),ZE=jE("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),JE=jE("RefreshCw",[["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"}]]),ej=jE("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]),tj=jE("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),nj=jE("Share2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),rj=jE("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]),oj=jE("Sparkles",[["path",{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z",key:"17u4zn"}],["path",{d:"M5 3v4",key:"bklmnn"}],["path",{d:"M19 17v4",key:"iiml17"}],["path",{d:"M3 5h4",key:"nem4j1"}],["path",{d:"M17 19h4",key:"lbex7p"}]]),aj=jE("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),ij=jE("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]),sj=jE("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]),lj=jE("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),uj=jE("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),cj=jE("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),dj=jE("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),fj=Tk("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function pj({className:e,variant:t,...n}){return ee.jsx("div",{className:uk(fj({variant:t}),e),...n})}function hj(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function mj(e,t=[]){let n=[];const r=()=>{const t=n.map(e=>W.createContext(e));return function(n){const r=(null==n?void 0:n[e])||t;return W.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){const o=W.createContext(r),a=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,l=(null==(n=null==r?void 0:r[e])?void 0:n[a])||o,u=W.useMemo(()=>s,Object.values(s));return ee.jsx(l.Provider,{value:u,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const l=(null==(s=null==i?void 0:i[e])?void 0:s[a])||o,u=W.useContext(l);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},gj(r,...t)]}function gj(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const r=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return W.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var vj=(null==globalThis?void 0:globalThis.document)?W.useLayoutEffect:()=>{},yj=G[" useId ".trim().toString()]||(()=>{}),bj=0;function xj(e){const[t,n]=W.useState(yj());return vj(()=>{n(e=>e??String(bj++))},[e]),e||(t?`radix-${t}`:"")}var wj=G[" useInsertionEffect ".trim().toString()]||vj;function kj({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=function({defaultProp:e,onChange:t}){const[n,r]=W.useState(e),o=W.useRef(n),a=W.useRef(t);return wj(()=>{a.current=t},[t]),W.useEffect(()=>{var e;o.current!==n&&(null==(e=a.current)||e.call(a,n),o.current=n)},[n,o]),[n,r,a]}({defaultProp:t,onChange:n}),s=void 0!==e,l=s?e:o;{const t=W.useRef(void 0!==e);W.useEffect(()=>{const e=t.current;if(e!==s){const t=e?"controlled":"uncontrolled",n=s?"controlled":"uncontrolled";console.warn(`${r} is changing from ${t} to ${n}. 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])}const u=W.useCallback(t=>{var n;if(s){const r=function(e){return"function"==typeof e}(t)?t(e):t;r!==e&&(null==(n=i.current)||n.call(i,r))}else a(t)},[s,e,a,i]);return[l,u]}function Sj(e){const t=Ej(e),n=W.forwardRef((e,n)=>{const{children:r,...o}=e,a=W.Children.toArray(r),i=a.find(Cj);if(i){const e=i.props.children,r=a.map(t=>t===i?W.Children.count(e)>1?W.Children.only(null):W.isValidElement(e)?e.props.children:null:t);return ee.jsx(t,{...o,ref:n,children:W.isValidElement(e)?W.cloneElement(e,void 0,r):null})}return ee.jsx(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Ej(e){const t=W.forwardRef((e,t)=>{const{children:n,...r}=e;if(W.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==W.Fragment&&(o.ref=t?vk(t,e):e),W.cloneElement(n,o)}return W.Children.count(n)>1?W.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jj=Symbol("radix.slottable");function Cj(e){return W.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===jj}var Pj=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=Sj(`Primitive.${t}`),r=W.forwardRef((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),ee.jsx(i,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Nj(e,t){e&&ld.flushSync(()=>e.dispatchEvent(t))}function Tj(e){const t=W.useRef(e);return W.useEffect(()=>{t.current=e}),W.useMemo(()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)},[])}var Mj,Rj="dismissableLayer.update",Lj="dismissableLayer.pointerDownOutside",Dj="dismissableLayer.focusOutside",_j=W.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Aj=W.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=W.useContext(_j),[c,d]=W.useState(null),f=(null==c?void 0:c.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,p]=W.useState({}),h=yk(t,e=>d(e)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(g),y=c?m.indexOf(c):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,w=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=Tj(e),r=W.useRef(!1),o=W.useRef(()=>{});return W.useEffect(()=>{const e=e=>{if(e.target&&!r.current){let r=function(){Ij(Lj,n,a,{discrete:!0})};const a={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{const t=e.target,n=[...u.branches].some(e=>e.contains(t));x&&!n&&(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())},f),k=function(e,t=(null==globalThis?void 0:globalThis.document)){const n=Tj(e),r=W.useRef(!1);return W.useEffect(()=>{const e=e=>{if(e.target&&!r.current){Ij(Dj,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{const t=e.target;[...u.branches].some(e=>e.contains(t))||(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())},f);return function(e,t=(null==globalThis?void 0:globalThis.document)){const n=Tj(e);W.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{y===u.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),W.useEffect(()=>{if(c)return n&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(Mj=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Oj(),()=>{n&&1===u.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=Mj)}},[c,f,n,u]),W.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Oj())},[c,u]),W.useEffect(()=>{const e=()=>p({});return document.addEventListener(Rj,e),()=>document.removeEventListener(Rj,e)},[]),ee.jsx(Pj.div,{...l,ref:h,style:{pointerEvents:b?x?"auto":"none":void 0,...e.style},onFocusCapture:hj(e.onFocusCapture,k.onFocusCapture),onBlurCapture:hj(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:hj(e.onPointerDownCapture,w.onPointerDownCapture)})});Aj.displayName="DismissableLayer";function Oj(){const e=new CustomEvent(Rj);document.dispatchEvent(e)}function Ij(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Nj(o,a):o.dispatchEvent(a)}W.forwardRef((e,t)=>{const n=W.useContext(_j),r=W.useRef(null),o=yk(t,r);return W.useEffect(()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),ee.jsx(Pj.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var zj="focusScope.autoFocusOnMount",Fj="focusScope.autoFocusOnUnmount",Vj={bubbles:!1,cancelable:!0},$j=W.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,l]=W.useState(null),u=Tj(o),c=Tj(a),d=W.useRef(null),f=yk(t,e=>l(e)),p=W.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;W.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:Hj(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||Hj(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Hj(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const 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]),W.useEffect(()=>{if(s){Gj.add(p);const t=document.activeElement;if(!s.contains(t)){const n=new CustomEvent(zj,Vj);s.addEventListener(zj,u),s.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Hj(r,{select:t}),document.activeElement!==n)return}((e=Bj(s),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&Hj(s))}return()=>{s.removeEventListener(zj,u),setTimeout(()=>{const e=new CustomEvent(Fj,Vj);s.addEventListener(Fj,c),s.dispatchEvent(e),e.defaultPrevented||Hj(t??document.body,{select:!0}),s.removeEventListener(Fj,c),Gj.remove(p)},0)}}var e},[s,u,c,p]);const h=W.useCallback(e=>{if(!n&&!r)return;if(p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,a]=function(e){const t=Bj(e),n=Uj(t,e),r=Uj(t.reverse(),e);return[n,r]}(t);r&&a?e.shiftKey||o!==a?e.shiftKey&&o===r&&(e.preventDefault(),n&&Hj(a,{select:!0})):(e.preventDefault(),n&&Hj(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,p.paused]);return ee.jsx(Pj.div,{tabIndex:-1,...i,ref:f,onKeyDown:h})});function Bj(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;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 Uj(e,t){for(const n of e)if(!Wj(n,{upTo:t}))return n}function Wj(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Hj(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}$j.displayName="FocusScope";var Gj=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=Yj(e,t),e.unshift(t)},remove(t){var n;e=Yj(e,t),null==(n=e[0])||n.resume()}}}();function Yj(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var qj=W.forwardRef((e,t)=>{var n;const{container:r,...o}=e,[a,i]=W.useState(!1);vj(()=>i(!0),[]);const s=r||a&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return s?ud.createPortal(ee.jsx(Pj.div,{...o,ref:t}),s):null});qj.displayName="Portal";var Kj=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=W.useState(),r=W.useRef(null),o=W.useRef(e),a=W.useRef("none"),i=e?"mounted":"unmounted",[s,l]=function(e,t){return W.useReducer((e,n)=>t[e][n]??e,e)}(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return W.useEffect(()=>{const e=Xj(r.current);a.current="mounted"===s?e:"none"},[s]),vj(()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=Xj(t);if(e)l("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))l("UNMOUNT");else{l(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}},[e,l]),vj(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=a=>{const i=Xj(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&i&&(l("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},s=e=>{e.target===t&&(a.current=Xj(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:W.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}(t),o="function"==typeof n?n({present:r.isPresent}):W.Children.only(n),a=yk(r.ref,function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(o));return"function"==typeof n||r.isPresent?W.cloneElement(o,{ref:a}):null};function Xj(e){return(null==e?void 0:e.animationName)||"none"}Kj.displayName="Presence";var Qj=0;function Zj(){W.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Jj()),document.body.insertAdjacentElement("beforeend",e[1]??Jj()),Qj++,()=>{1===Qj&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Qj--}},[])}function Jj(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var eC=function(){return eC=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},eC.apply(this,arguments)};function tC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var nC="right-scroll-bar-position",rC="width-before-scroll-bar";function oC(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var aC="undefined"!=typeof window?W.useLayoutEffect:W.useEffect,iC=new WeakMap;function sC(e,t){var n,r,o,a=(n=null,r=function(t){return e.forEach(function(e){return oC(e,t)})},(o=W.useState(function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0]).callback=r,o.facade);return aC(function(){var t=iC.get(a);if(t){var n=new Set(t),r=new Set(e),o=a.current;n.forEach(function(e){r.has(e)||oC(e,null)}),r.forEach(function(e){n.has(e)||oC(e,o)})}iC.set(a,e)},[e]),a}function lC(e){return e}var uC=function(e){var t=e.sideCar,n=tC(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return W.createElement(r,eC({},n))};uC.isSideCarExport=!0;var cC=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=lC);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},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 o=n;n=[],o.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),n={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=eC({async:!0,ssr:!1},e),t}(),dC=function(){},fC=W.forwardRef(function(e,t){var n=W.useRef(null),r=W.useState({onScrollCapture:dC,onWheelCapture:dC,onTouchMoveCapture:dC}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,h=e.noIsolation,m=e.inert,g=e.allowPinchZoom,v=e.as,y=void 0===v?"div":v,b=e.gapMode,x=tC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=f,k=sC([n,t]),S=eC(eC({},x),o);return W.createElement(W.Fragment,null,c&&W.createElement(w,{sideCar:cC,removeScrollBar:u,shards:d,noRelative:p,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:b}),i?W.cloneElement(W.Children.only(s),eC(eC({},S),{ref:k})):W.createElement(y,eC({},S,{className:l,ref:k}),s))});fC.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},fC.classNames={fullWidth:rC,zeroRight:nC};function pC(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var hC=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=pC())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},mC=function(){var e,t=(e=hC(),function(t,n){W.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},gC={left:0,top:0,right:0,gap:0},vC=function(e){return parseInt(e||"",10)||0},yC=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return gC;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[vC(n),vC(r),vC(o)]}(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])}},bC=mC(),xC="data-scroll-locked",wC=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(xC,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(nC," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(rC," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(nC," .").concat(nC," {\n right: 0 ").concat(r,";\n }\n \n .").concat(rC," .").concat(rC," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(xC,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},kC=function(){var e=parseInt(document.body.getAttribute(xC)||"0",10);return isFinite(e)?e:0},SC=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;W.useEffect(function(){return document.body.setAttribute(xC,(kC()+1).toString()),function(){var e=kC()-1;e<=0?document.body.removeAttribute(xC):document.body.setAttribute(xC,e.toString())}},[]);var a=W.useMemo(function(){return yC(o)},[o]);return W.createElement(bC,{styles:wC(a,!t,o,n?"":"!important")})},EC=!1;if("undefined"!=typeof window)try{var jC=Object.defineProperty({},"passive",{get:function(){return EC=!0,!0}});window.addEventListener("test",jC,jC),window.removeEventListener("test",jC,jC)}catch(xT){EC=!1}var CC=!!EC&&{passive:!1},PC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},NC=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),TC(e,r)){var o=MC(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},TC=function(e,t){return"v"===e?function(e){return PC(e,"overflowY")}(t):function(e){return PC(e,"overflowX")}(t)},MC=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},RC=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},LC=function(e){return[e.deltaX,e.deltaY]},DC=function(e){return e&&"current"in e?e.current:e},_C=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},AC=0,OC=[];function IC(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const zC=(FC=function(e){var t=W.useRef([]),n=W.useRef([0,0]),r=W.useRef(),o=W.useState(AC++)[0],a=W.useState(mC)[0],i=W.useRef(e);W.useEffect(function(){i.current=e},[e]),W.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}([e.lockRef.current],(e.shards||[]).map(DC),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=W.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=RC(e),s=n.current,l="deltaX"in e?e.deltaX:s[0]-a[0],u="deltaY"in e?e.deltaY:s[1]-a[1],c=e.target,d=Math.abs(l)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===c||p.contains(c)))return!1;var h=NC(d,c);if(!h)return!0;if(h?o=d:(o="v"===d?"h":"v",h=NC(d,c)),!h)return!1;if(!r.current&&"changedTouches"in e&&(l||u)&&(r.current=o),!o)return!0;var m=r.current||o;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=o*r,i=n.target,s=t.contains(i),l=!1,u=a>0,c=0,d=0;do{if(!i)break;var f=MC(e,i),p=f[0],h=f[1]-f[2]-o*p;(p||h)&&TC(e,i)&&(c+=h,d+=p);var m=i.parentNode;i=m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE?m.host:m}while(!s&&i!==document.body||s&&(t.contains(i)||t===i));return(u&&Math.abs(c)<1||!u&&Math.abs(d)<1)&&(l=!0),l}(m,t,e,"h"===m?l:u)},[]),l=W.useCallback(function(e){var n=e;if(OC.length&&OC[OC.length-1]===a){var r="deltaY"in n?LC(n):RC(n),o=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o})[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var l=(i.current.shards||[]).map(DC).filter(Boolean).filter(function(e){return e.contains(n.target)});(l.length>0?s(n,l[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),u=W.useCallback(function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:IC(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),c=W.useCallback(function(e){n.current=RC(e),r.current=void 0},[]),d=W.useCallback(function(t){u(t.type,LC(t),t.target,s(t,e.lockRef.current))},[]),f=W.useCallback(function(t){u(t.type,RC(t),t.target,s(t,e.lockRef.current))},[]);W.useEffect(function(){return OC.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,CC),document.addEventListener("touchmove",l,CC),document.addEventListener("touchstart",c,CC),function(){OC=OC.filter(function(e){return e!==a}),document.removeEventListener("wheel",l,CC),document.removeEventListener("touchmove",l,CC),document.removeEventListener("touchstart",c,CC)}},[]);var p=e.removeScrollBar,h=e.inert;return W.createElement(W.Fragment,null,h?W.createElement(a,{styles:_C(o)}):null,p?W.createElement(SC,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},cC.useMedium(FC),uC);var FC,VC=W.forwardRef(function(e,t){return W.createElement(fC,eC({},e,{ref:t,sideCar:zC}))});VC.classNames=fC.classNames;var $C=new WeakMap,BC=new WeakMap,UC={},WC=0,HC=function(e){return e&&(e.host||HC(e.parentNode))},GC=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=HC(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);UC[n]||(UC[n]=new WeakMap);var a=UC[n],i=[],s=new Set,l=new Set(o),u=function(e){e&&!s.has(e)&&(s.add(e),u(e.parentNode))};o.forEach(u);var c=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))c(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=($C.get(e)||0)+1,u=(a.get(e)||0)+1;$C.set(e,l),a.set(e,u),i.push(e),1===l&&o&&BC.set(e,!0),1===u&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(bT){console.error("aria-hidden: cannot operate on ",e,bT)}})};return c(t),s.clear(),WC++,function(){i.forEach(function(e){var t=$C.get(e)-1,o=a.get(e)-1;$C.set(e,t),a.set(e,o),t||(BC.has(e)||e.removeAttribute(r),BC.delete(e)),o||e.removeAttribute(n)}),--WC||($C=new WeakMap,$C=new WeakMap,BC=new WeakMap,UC={})}},YC=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),GC(r,o,n,"aria-hidden")):function(){return null}};function qC(e){const t=KC(e),n=W.forwardRef((e,n)=>{const{children:r,...o}=e,a=W.Children.toArray(r),i=a.find(QC);if(i){const e=i.props.children,r=a.map(t=>t===i?W.Children.count(e)>1?W.Children.only(null):W.isValidElement(e)?e.props.children:null:t);return ee.jsx(t,{...o,ref:n,children:W.isValidElement(e)?W.cloneElement(e,void 0,r):null})}return ee.jsx(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function KC(e){const t=W.forwardRef((e,t)=>{const{children:n,...r}=e;if(W.isValidElement(n)){const e=function(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;if(o)return e.ref;if(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==W.Fragment&&(o.ref=t?vk(t,e):e),W.cloneElement(n,o)}return W.Children.count(n)>1?W.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var XC=Symbol("radix.slottable");function QC(e){return W.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===XC}var ZC="Dialog",[JC]=mj(ZC),[eP,tP]=JC(ZC),nP=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=W.useRef(null),l=W.useRef(null),[u,c]=kj({prop:r,defaultProp:o??!1,onChange:a,caller:ZC});return ee.jsx(eP,{scope:t,triggerRef:s,contentRef:l,contentId:xj(),titleId:xj(),descriptionId:xj(),open:u,onOpenChange:c,onOpenToggle:W.useCallback(()=>c(e=>!e),[c]),modal:i,children:n})};nP.displayName=ZC;var rP="DialogTrigger";W.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tP(rP,n),a=yk(t,o.triggerRef);return ee.jsx(Pj.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":SP(o.open),...r,ref:a,onClick:hj(e.onClick,o.onOpenToggle)})}).displayName=rP;var oP="DialogPortal",[aP,iP]=JC(oP,{forceMount:void 0}),sP=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=tP(oP,t);return ee.jsx(aP,{scope:t,forceMount:n,children:W.Children.map(r,e=>ee.jsx(Kj,{present:n||a.open,children:ee.jsx(qj,{asChild:!0,container:o,children:e})}))})};sP.displayName=oP;var lP="DialogOverlay",uP=W.forwardRef((e,t)=>{const n=iP(lP,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=tP(lP,e.__scopeDialog);return a.modal?ee.jsx(Kj,{present:r||a.open,children:ee.jsx(dP,{...o,ref:t})}):null});uP.displayName=lP;var cP=qC("DialogOverlay.RemoveScroll"),dP=W.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tP(lP,n);return ee.jsx(VC,{as:cP,allowPinchZoom:!0,shards:[o.contentRef],children:ee.jsx(Pj.div,{"data-state":SP(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),fP="DialogContent",pP=W.forwardRef((e,t)=>{const n=iP(fP,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=tP(fP,e.__scopeDialog);return ee.jsx(Kj,{present:r||a.open,children:a.modal?ee.jsx(hP,{...o,ref:t}):ee.jsx(mP,{...o,ref:t})})});pP.displayName=fP;var hP=W.forwardRef((e,t)=>{const n=tP(fP,e.__scopeDialog),r=W.useRef(null),o=yk(t,n.contentRef,r);return W.useEffect(()=>{const e=r.current;if(e)return YC(e)},[]),ee.jsx(gP,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:hj(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()}),onPointerDownOutside:hj(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:hj(e.onFocusOutside,e=>e.preventDefault())})}),mP=W.forwardRef((e,t)=>{const n=tP(fP,e.__scopeDialog),r=W.useRef(!1),o=W.useRef(!1);return ee.jsx(gP,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var a,i;null==(a=e.onCloseAutoFocus)||a.call(e,t),t.defaultPrevented||(r.current||null==(i=n.triggerRef.current)||i.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{var a,i;null==(a=e.onInteractOutside)||a.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),gP=W.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=tP(fP,n),l=W.useRef(null),u=yk(t,l);return Zj(),ee.jsxs(ee.Fragment,{children:[ee.jsx($j,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:ee.jsx(Aj,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":SP(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),ee.jsxs(ee.Fragment,{children:[ee.jsx(PP,{titleId:s.titleId}),ee.jsx(NP,{contentRef:l,descriptionId:s.descriptionId})]})]})}),vP="DialogTitle",yP=W.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tP(vP,n);return ee.jsx(Pj.h2,{id:o.titleId,...r,ref:t})});yP.displayName=vP;var bP="DialogDescription",xP=W.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tP(bP,n);return ee.jsx(Pj.p,{id:o.descriptionId,...r,ref:t})});xP.displayName=bP;var wP="DialogClose",kP=W.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=tP(wP,n);return ee.jsx(Pj.button,{type:"button",...r,ref:t,onClick:hj(e.onClick,()=>o.onOpenChange(!1))})});function SP(e){return e?"open":"closed"}kP.displayName=wP;var EP="DialogTitleWarning",[jP,CP]=function(e,t){const n=W.createContext(t),r=e=>{const{children:t,...r}=e,o=W.useMemo(()=>r,Object.values(r));return ee.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=W.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}(EP,{contentName:fP,titleName:vP,docsSlug:"dialog"}),PP=({titleId:e})=>{const t=CP(EP),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return W.useEffect(()=>{if(e){document.getElementById(e)||console.error(n)}},[n,e]),null},NP=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${CP("DialogDescriptionWarning").contentName}}.`;return W.useEffect(()=>{var r;const o=null==(r=e.current)?void 0:r.getAttribute("aria-describedby");if(t&&o){document.getElementById(t)||console.warn(n)}},[n,e,t]),null},TP=uP,MP=pP,RP=yP,LP=xP,DP=kP;const _P=nP,AP=sP,OP=W.forwardRef(({className:e,...t},n)=>ee.jsx(TP,{ref:n,className:uk("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));OP.displayName=TP.displayName;const IP=W.forwardRef(({className:e,children:t,noOverlay:n,...r},o)=>ee.jsxs(AP,{children:[!n&&ee.jsx(OP,{}),ee.jsxs(MP,{ref:o,className:uk("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,ee.jsxs(DP,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[ee.jsx(cj,{className:"h-4 w-4"}),ee.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));IP.displayName=MP.displayName;const zP=({className:e,...t})=>ee.jsx("div",{className:uk("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});zP.displayName="DialogHeader";const FP=({className:e,...t})=>ee.jsx("div",{className:uk("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});FP.displayName="DialogFooter";const VP=W.forwardRef(({className:e,...t},n)=>ee.jsx(RP,{ref:n,className:uk("text-lg font-semibold leading-none tracking-tight",e),...t}));VP.displayName=RP.displayName;const $P=W.forwardRef(({className:e,...t},n)=>ee.jsx(LP,{ref:n,className:uk("text-sm text-muted-foreground",e),...t}));function BP({project:e,open:t,onOpenChange:n,onUpdated:r}){const[o,a]=W.useState([]),[i,s]=W.useState([]),[l,u]=W.useState(!1),[c,d]=W.useState(null);W.useEffect(()=>{if(!t)return;a(e.shares?[...e.shares]:[]),d(null);let n=!1;return iS().then(e=>{n||s(e)}).catch(()=>{}),()=>{n=!0}},[t,e.id]);const f=new Set(o.map(e=>e.username)),p=i.filter(t=>t!==e.owner&&!f.has(t));return ee.jsx(_P,{open:t,onOpenChange:n,children:ee.jsxs(IP,{className:"sm:max-w-md",children:[ee.jsxs(zP,{children:[ee.jsxs(VP,{className:"flex items-center gap-2",children:[ee.jsx(uj,{className:"h-4 w-4"}),"共享设置"]}),ee.jsx($P,{children:"选择用户并设置权限:可见(只读)或可编辑(读写+终端)"})]}),ee.jsxs("div",{className:"space-y-3 max-h-64 overflow-y-auto",children:[0===o.length&&ee.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"尚未共享给任何用户"}),o.map(e=>ee.jsxs("div",{className:"flex items-center justify-between gap-2 px-1",children:[ee.jsx("span",{className:"text-sm font-medium",children:e.username}),ee.jsxs("div",{className:"flex items-center gap-1.5",children:[ee.jsx("button",{onClick:()=>{return t=e.username,void a(e=>e.map(e=>e.username===t?{...e,permission:"view"===e.permission?"edit":"view"}:e));var t},className:"focus:outline-none",children:ee.jsx(pj,{variant:"edit"===e.permission?"default":"secondary",className:"cursor-pointer text-xs",children:"edit"===e.permission?"可编辑":"可见"})}),ee.jsx(Rk,{variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive",onClick:()=>{return t=e.username,void a(e=>e.filter(e=>e.username!==t));var t},children:ee.jsx(lj,{className:"h-3.5 w-3.5"})})]})]},e.username))]}),p.length>0&&ee.jsxs("div",{className:"border-t pt-3",children:[ee.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:"添加用户"}),ee.jsx("div",{className:"flex flex-wrap gap-1.5",children:p.map(e=>ee.jsxs(Rk,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1",onClick:()=>{return t=e,void a(e=>[...e,{username:t,permission:"view"}]);var t},children:[ee.jsx(ZE,{className:"h-3 w-3"}),e]},e))})]}),c&&ee.jsx("p",{className:"text-sm text-destructive",children:c}),ee.jsxs(FP,{children:[ee.jsx(Rk,{variant:"outline",onClick:()=>n(!1),disabled:l,children:"取消"}),ee.jsx(Rk,{onClick:()=>{(async()=>{u(!0),d(null);try{const t=await sS(e.id,o);r(t),n(!1)}catch(xT){d(xT instanceof Error?xT.message:"Failed to update shares")}finally{u(!1)}})()},disabled:l,children:l?"保存中...":"保存"})]})]})})}$P.displayName=LP.displayName;const UP=Array(12).fill(0),WP=({visible:e,className:t})=>H.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},H.createElement("div",{className:"sonner-spinner"},UP.map((e,t)=>H.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),HP=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.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"})),GP=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},H.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"})),YP=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.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"})),qP=H.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},H.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"})),KP=H.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"},H.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),H.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}));let XP=1;const QP=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const 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=>{var t;const{message:n,...r}=e,o="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:XP++,a=this.toasts.find(e=>e.id===o),i=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(t=>t.id===o?(this.publish({...t,...e,id:o,title:n}),{...t,...e,id:o,dismissible:i,title:n}):t):this.addToast({title:n,...r,dismissible:i,id:o}),o},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;void 0!==t.loading&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));const r=Promise.resolve(e instanceof Function?e():e);let o,a=void 0!==n;const i=r.then(async e=>{o=["resolve",e];if(H.isValidElement(e))a=!1,this.create({id:n,type:"default",message:e});else if(ZP(e)&&!e.ok){a=!1;const r="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,o="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description,i="object"==typeof r&&!H.isValidElement(r)?r:{message:r};this.create({id:n,type:"error",description:o,...i})}else if(e instanceof Error){a=!1;const r="function"==typeof t.error?await t.error(e):t.error,o="function"==typeof t.description?await t.description(e):t.description,i="object"==typeof r&&!H.isValidElement(r)?r:{message:r};this.create({id:n,type:"error",description:o,...i})}else if(void 0!==t.success){a=!1;const r="function"==typeof t.success?await t.success(e):t.success,o="function"==typeof t.description?await t.description(e):t.description,i="object"==typeof r&&!H.isValidElement(r)?r:{message:r};this.create({id:n,type:"success",description:o,...i})}}).catch(async e=>{if(o=["reject",e],void 0!==t.error){a=!1;const r="function"==typeof t.error?await t.error(e):t.error,o="function"==typeof t.description?await t.description(e):t.description,i="object"==typeof r&&!H.isValidElement(r)?r:{message:r};this.create({id:n,type:"error",description:o,...i})}}).finally(()=>{a&&(this.dismiss(n),n=void 0),null==t.finally||t.finally.call(t)}),s=()=>new Promise((e,t)=>i.then(()=>"reject"===o[0]?t(o[1]):e(o[1])).catch(t));return"string"!=typeof n&&"number"!=typeof n?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{const n=(null==t?void 0:t.id)||XP++;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}},ZP=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,JP=(e,t)=>{const n=(null==t?void 0:t.id)||XP++;return QP.addToast({title:e,...t,id:n}),n},eN=Object.assign(JP,{success:QP.success,info:QP.info,warning:QP.warning,error:QP.error,custom:QP.custom,message:QP.message,promise:QP.promise,dismiss:QP.dismiss,loading:QP.loading},{getHistory:()=>QP.toasts,getToasts:()=>QP.getActiveToasts()});function tN(e){return void 0!==e.label}!function(e){if("undefined"==typeof document)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))}("[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%)}");const nN=3,rN=14;function oN(...e){return e.filter(Boolean).join(" ")}const aN=e=>{var t,n,r,o,a,i,s,l,u;const{invert:c,toast:d,unstyled:f,interacting:p,setHeights:h,visibleToasts:m,heights:g,index:v,toasts:y,expanded:b,removeToast:x,defaultRichColors:w,closeButton:k,style:S,cancelButtonStyle:E,actionButtonStyle:j,className:C="",descriptionClassName:P="",duration:N,position:T,gap:M,expandByDefault:R,classNames:L,icons:D,closeButtonAriaLabel:_="Close toast"}=e,[A,O]=H.useState(null),[I,z]=H.useState(null),[F,V]=H.useState(!1),[$,B]=H.useState(!1),[U,W]=H.useState(!1),[G,Y]=H.useState(!1),[q,K]=H.useState(!1),[X,Q]=H.useState(0),[Z,J]=H.useState(0),ee=H.useRef(d.duration||N||4e3),te=H.useRef(null),ne=H.useRef(null),re=0===v,oe=v+1<=m,ae=d.type,ie=!1!==d.dismissible,se=d.className||"",le=d.descriptionClassName||"",ue=H.useMemo(()=>g.findIndex(e=>e.toastId===d.id)||0,[g,d.id]),ce=H.useMemo(()=>{var e;return null!=(e=d.closeButton)?e:k},[d.closeButton,k]),de=H.useMemo(()=>d.duration||N||4e3,[d.duration,N]),fe=H.useRef(0),pe=H.useRef(0),he=H.useRef(0),me=H.useRef(null),[ge,ve]=T.split("-"),ye=H.useMemo(()=>g.reduce((e,t,n)=>n>=ue?e:e+t.height,0),[g,ue]),be=(()=>{const[e,t]=H.useState(document.hidden);return H.useEffect(()=>{const e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e})(),xe=d.invert||c,we="loading"===ae;pe.current=H.useMemo(()=>ue*M+ye,[ue,ye]),H.useEffect(()=>{ee.current=de},[de]),H.useEffect(()=>{V(!0)},[]),H.useEffect(()=>{const e=ne.current;if(e){const t=e.getBoundingClientRect().height;return J(t),h(e=>[{toastId:d.id,height:t,position:d.position},...e]),()=>h(e=>e.filter(e=>e.toastId!==d.id))}},[h,d.id]),H.useLayoutEffect(()=>{if(!F)return;const e=ne.current,t=e.style.height;e.style.height="auto";const n=e.getBoundingClientRect().height;e.style.height=t,J(n),h(e=>e.find(e=>e.toastId===d.id)?e.map(e=>e.toastId===d.id?{...e,height:n}:e):[{toastId:d.id,height:n,position:d.position},...e])},[F,d.title,d.description,h,d.id,d.jsx,d.action,d.cancel]);const ke=H.useCallback(()=>{B(!0),Q(pe.current),h(e=>e.filter(e=>e.toastId!==d.id)),setTimeout(()=>{x(d)},200)},[d,x,h,pe]);H.useEffect(()=>{if(d.promise&&"loading"===ae||d.duration===1/0||"loading"===d.type)return;let e;return b||p||be?(()=>{if(he.current<fe.current){const e=(new Date).getTime()-fe.current;ee.current=ee.current-e}he.current=(new Date).getTime()})():ee.current!==1/0&&(fe.current=(new Date).getTime(),e=setTimeout(()=>{null==d.onAutoClose||d.onAutoClose.call(d,d),ke()},ee.current)),()=>clearTimeout(e)},[b,p,d,ae,be,ke]),H.useEffect(()=>{d.delete&&(ke(),null==d.onDismiss||d.onDismiss.call(d,d))},[ke,d.delete]);const Se=d.icon||(null==D?void 0:D[ae])||(e=>{switch(e){case"success":return HP;case"info":return YP;case"warning":return GP;case"error":return qP;default:return null}})(ae);var Ee,je,Ce,Pe;return H.createElement("li",{tabIndex:0,ref:ne,className:oN(C,se,null==L?void 0:L.toast,null==d||null==(t=d.classNames)?void 0:t.toast,null==L?void 0:L.default,null==L?void 0:L[ae],null==d||null==(n=d.classNames)?void 0:n[ae]),"data-sonner-toast":"","data-rich-colors":null!=(Ee=d.richColors)?Ee:w,"data-styled":!Boolean(d.jsx||d.unstyled||f),"data-mounted":F,"data-promise":Boolean(d.promise),"data-swiped":q,"data-removed":$,"data-visible":oe,"data-y-position":ge,"data-x-position":ve,"data-index":v,"data-front":re,"data-swiping":U,"data-dismissible":ie,"data-type":ae,"data-invert":xe,"data-swipe-out":G,"data-swipe-direction":I,"data-expanded":Boolean(b||R&&F),"data-testid":d.testId,style:{"--index":v,"--toasts-before":v,"--z-index":y.length-v,"--offset":`${$?X:pe.current}px`,"--initial-height":R?"auto":`${Z}px`,...S,...d.style},onDragEnd:()=>{W(!1),O(null),me.current=null},onPointerDown:e=>{2!==e.button&&!we&&ie&&(te.current=new Date,Q(pe.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(W(!0),me.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,n;if(G||!ie)return;me.current=null;const r=Number((null==(e=ne.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),o=Number((null==(t=ne.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),a=(new Date).getTime()-(null==(n=te.current)?void 0:n.getTime()),i="x"===A?r:o,s=Math.abs(i)/a;if(Math.abs(i)>=45||s>.11)return Q(pe.current),null==d.onDismiss||d.onDismiss.call(d,d),z("x"===A?r>0?"right":"left":o>0?"down":"up"),ke(),void Y(!0);var l,u;null==(l=ne.current)||l.style.setProperty("--swipe-amount-x","0px"),null==(u=ne.current)||u.style.setProperty("--swipe-amount-y","0px"),K(!1),W(!1),O(null)},onPointerMove:t=>{var n,r,o;if(!me.current||!ie)return;if((null==(n=window.getSelection())?void 0:n.toString().length)>0)return;const a=t.clientY-me.current.y,i=t.clientX-me.current.x;var s;const l=null!=(s=e.swipeDirections)?s:function(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}(T);!A&&(Math.abs(i)>1||Math.abs(a)>1)&&O(Math.abs(i)>Math.abs(a)?"x":"y");let u={x:0,y:0};const c=e=>1/(1.5+Math.abs(e)/20);if("y"===A){if(l.includes("top")||l.includes("bottom"))if(l.includes("top")&&a<0||l.includes("bottom")&&a>0)u.y=a;else{const e=a*c(a);u.y=Math.abs(e)<Math.abs(a)?e:a}}else if("x"===A&&(l.includes("left")||l.includes("right")))if(l.includes("left")&&i<0||l.includes("right")&&i>0)u.x=i;else{const e=i*c(i);u.x=Math.abs(e)<Math.abs(i)?e:i}(Math.abs(u.x)>0||Math.abs(u.y)>0)&&K(!0),null==(r=ne.current)||r.style.setProperty("--swipe-amount-x",`${u.x}px`),null==(o=ne.current)||o.style.setProperty("--swipe-amount-y",`${u.y}px`)}},ce&&!d.jsx&&"loading"!==ae?H.createElement("button",{"aria-label":_,"data-disabled":we,"data-close-button":!0,onClick:we||!ie?()=>{}:()=>{ke(),null==d.onDismiss||d.onDismiss.call(d,d)},className:oN(null==L?void 0:L.closeButton,null==d||null==(r=d.classNames)?void 0:r.closeButton)},null!=(je=null==D?void 0:D.close)?je:KP):null,(ae||d.icon||d.promise)&&null!==d.icon&&(null!==(null==D?void 0:D[ae])||d.icon)?H.createElement("div",{"data-icon":"",className:oN(null==L?void 0:L.icon,null==d||null==(o=d.classNames)?void 0:o.icon)},d.promise||"loading"===d.type&&!d.icon?d.icon||((null==D?void 0:D.loading)?H.createElement("div",{className:oN(null==L?void 0:L.loader,null==d||null==(Pe=d.classNames)?void 0:Pe.loader,"sonner-loader"),"data-visible":"loading"===ae},D.loading):H.createElement(WP,{className:oN(null==L?void 0:L.loader,null==d||null==(Ce=d.classNames)?void 0:Ce.loader),visible:"loading"===ae})):null,"loading"!==d.type?Se:null):null,H.createElement("div",{"data-content":"",className:oN(null==L?void 0:L.content,null==d||null==(a=d.classNames)?void 0:a.content)},H.createElement("div",{"data-title":"",className:oN(null==L?void 0:L.title,null==d||null==(i=d.classNames)?void 0:i.title)},d.jsx?d.jsx:"function"==typeof d.title?d.title():d.title),d.description?H.createElement("div",{"data-description":"",className:oN(P,le,null==L?void 0:L.description,null==d||null==(s=d.classNames)?void 0:s.description)},"function"==typeof d.description?d.description():d.description):null),H.isValidElement(d.cancel)?d.cancel:d.cancel&&tN(d.cancel)?H.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||E,onClick:e=>{tN(d.cancel)&&ie&&(null==d.cancel.onClick||d.cancel.onClick.call(d.cancel,e),ke())},className:oN(null==L?void 0:L.cancelButton,null==d||null==(l=d.classNames)?void 0:l.cancelButton)},d.cancel.label):null,H.isValidElement(d.action)?d.action:d.action&&tN(d.action)?H.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||j,onClick:e=>{tN(d.action)&&(null==d.action.onClick||d.action.onClick.call(d.action,e),e.defaultPrevented||ke())},className:oN(null==L?void 0:L.actionButton,null==d||null==(u=d.classNames)?void 0:u.actionButton)},d.action.label):null)};function iN(){if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}function sN(e,t){const n={};return[e,t].forEach((e,t)=>{const r=1===t,o=r?"--mobile-offset":"--offset",a=r?"16px":"24px";function i(e){["top","right","bottom","left"].forEach(t=>{n[`${o}-${t}`]="number"==typeof e?`${e}px`:e})}"number"==typeof e||"string"==typeof e?i(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?n[`${o}-${t}`]=a:n[`${o}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]}):i(a)}),n}const lN=H.forwardRef(function(e,t){const{id:n,invert:r,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:s,className:l,offset:u,mobileOffset:c,theme:d="light",richColors:f,duration:p,style:h,visibleToasts:m=nN,toastOptions:g,dir:v=iN(),gap:y=rN,icons:b,containerAriaLabel:x="Notifications"}=e,[w,k]=H.useState([]),S=H.useMemo(()=>n?w.filter(e=>e.toasterId===n):w.filter(e=>!e.toasterId),[w,n]),E=H.useMemo(()=>Array.from(new Set([o].concat(S.filter(e=>e.position).map(e=>e.position)))),[S,o]),[j,C]=H.useState([]),[P,N]=H.useState(!1),[T,M]=H.useState(!1),[R,L]=H.useState("system"!==d?d:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),D=H.useRef(null),_=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),A=H.useRef(null),O=H.useRef(!1),I=H.useCallback(e=>{k(t=>{var n;return(null==(n=t.find(t=>t.id===e.id))?void 0:n.delete)||QP.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return H.useEffect(()=>QP.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{k(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{ud.flushSync(()=>{k(t=>{const n=t.findIndex(t=>t.id===e.id);return-1!==n?[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]:[e,...t]})})})}),[w]),H.useEffect(()=>{if("system"!==d)return void L(d);if("system"===d&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L("dark"):L("light")),"undefined"==typeof window)return;const e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",({matches:e})=>{L(e?"dark":"light")})}catch(t){e.addListener(({matches:e})=>{try{L(e?"dark":"light")}catch(bT){console.error(bT)}})}},[d]),H.useEffect(()=>{w.length<=1&&N(!1)},[w]),H.useEffect(()=>{const e=e=>{var t;var n;a.every(t=>e[t]||e.code===t)&&(N(!0),null==(n=D.current)||n.focus());"Escape"!==e.code||document.activeElement!==D.current&&!(null==(t=D.current)?void 0:t.contains(document.activeElement))||N(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[a]),H.useEffect(()=>{if(D.current)return()=>{A.current&&(A.current.focus({preventScroll:!0}),A.current=null,O.current=!1)}},[D.current]),H.createElement("section",{ref:t,"aria-label":`${x} ${_}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},E.map((t,n)=>{var o;const[a,d]=t.split("-");return S.length?H.createElement("ol",{key:t,dir:"auto"===v?iN():v,tabIndex:-1,ref:D,className:l,"data-sonner-toaster":!0,"data-sonner-theme":R,"data-y-position":a,"data-x-position":d,style:{"--front-toast-height":`${(null==(o=j[0])?void 0:o.height)||0}px`,"--width":"356px","--gap":`${y}px`,...h,...sN(u,c)},onBlur:e=>{O.current&&!e.currentTarget.contains(e.relatedTarget)&&(O.current=!1,A.current&&(A.current.focus({preventScroll:!0}),A.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||O.current||(O.current=!0,A.current=e.relatedTarget)},onMouseEnter:()=>N(!0),onMouseMove:()=>N(!0),onMouseLeave:()=>{T||N(!1)},onDragEnd:()=>N(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||M(!0)},onPointerUp:()=>M(!1)},S.filter(e=>!e.position&&0===n||e.position===t).map((n,o)=>{var a,l;return H.createElement(aN,{key:n.id,icons:b,index:o,toast:n,defaultRichColors:f,duration:null!=(a=null==g?void 0:g.duration)?a:p,className:null==g?void 0:g.className,descriptionClassName:null==g?void 0:g.descriptionClassName,invert:r,visibleToasts:m,closeButton:null!=(l=null==g?void 0:g.closeButton)?l:s,interacting:T,position:t,style:null==g?void 0:g.style,unstyled:null==g?void 0:g.unstyled,classNames:null==g?void 0:g.classNames,cancelButtonStyle:null==g?void 0:g.cancelButtonStyle,actionButtonStyle:null==g?void 0:g.actionButtonStyle,closeButtonAriaLabel:null==g?void 0:g.closeButtonAriaLabel,removeToast:I,toasts:S.filter(e=>e.position==n.position),heights:j.filter(e=>e.position==n.position),setHeights:C,expandByDefault:i,gap:y,expanded:P,swipeDirections:e.swipeDirections})})):null}))}),uN=W.createContext(null);function cN({children:e}){const[t,n]=W.useState(!1),[r,o]=W.useState({}),a=W.useRef(null),i=W.useCallback(e=>(o(e),n(!0),new Promise(e=>{a.current=e})),[]),s=W.useCallback(e=>{n(!1);const t=a.current;a.current=null,t&&t(e)},[]);return ee.jsxs(uN.Provider,{value:i,children:[e,ee.jsx(_P,{open:t,onOpenChange:e=>{e||s(!1)},children:ee.jsxs(IP,{className:"max-w-md",children:[ee.jsxs(zP,{children:[ee.jsx(VP,{children:r.title??"确认"}),void 0!==r.description&&ee.jsx($P,{asChild:!0,children:ee.jsx("div",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:r.description})})]}),ee.jsxs(FP,{children:[ee.jsx(Rk,{variant:"outline",onClick:()=>s(!1),children:r.cancelLabel??"取消"}),ee.jsx(dN,{destructive:r.destructive,onClick:()=>s(!0),children:r.confirmLabel??"确定"})]})]})})]})}function dN({destructive:e,onClick:t,children:n}){const r=W.useRef(null);return W.useEffect(()=>{var e;null==(e=r.current)||e.focus()},[]),ee.jsx(Rk,{ref:r,onClick:t,className:uk(e&&"bg-red-600 hover:bg-red-700 text-white"),children:n})}function fN(){const e=W.useContext(uN);if(!e)throw new Error("useConfirm must be used within <ConfirmProvider>");return e}function pN(e,t){switch(e){case"thinking":return"Thinking…";case"tool_use":return t?`${t}`:"Tool…";case"tool_result":return"Reading…";case"text":return"Writing…"}}function hN({status:e}){return ee.jsx("span",{className:uk("inline-block w-2 h-2 rounded-full",{"bg-green-500":"running"===e,"bg-zinc-400":"stopped"===e,"bg-yellow-400 animate-pulse":"restarting"===e})})}const mN=H.memo(function({project:e,active:t=!1,statusStack:n=[],onDelete:r,onArchive:o,onUnarchive:a,onUpdated:i}){var s,l;const u=cf(),c=fN(),[d,f]=W.useState(!1),[p,h]=W.useState(null),[m,g]=W.useState(!1),[v,y]=W.useState(e.name),b=W.useRef(null),x=!!e._sharedPermission;W.useEffect(()=>{let t=!1;return aE(e.id).then(({bytes:e})=>{t||h(e)}).catch(()=>{}),()=>{t=!0}},[e.id]);const w="view"===e._sharedPermission,k=t=>{t.stopPropagation(),y(e.name),g(!0),setTimeout(()=>{var e;return null==(e=b.current)?void 0:e.select()},0)},S=async()=>{const t=v.trim();if(t&&t!==e.name)try{const n=await rE(e.id,t);null==i||i(n),g(!1)}catch(xT){eN.error("Rename failed",{description:null==xT?void 0:xT.message})}else g(!1)},E=ee.jsx(hw.div,{whileHover:e.archived||t?{}:{y:-2},transition:{duration:.2},children:ee.jsxs(ck,{className:uk("group cursor-pointer transition-colors relative",e.archived?"opacity-60 hover:opacity-80 hover:border-zinc-400":t?"border-transparent hover:border-transparent bg-transparent shadow-none":"hover:border-zinc-400 hover:shadow-md"),onClick:()=>!e.archived&&u(`/projects/${e.id}`),children:[ee.jsxs(dk,{className:"pb-2",children:[ee.jsxs("div",{className:"flex items-start justify-between gap-2",children:[m?ee.jsx("input",{ref:b,className:"text-base leading-tight font-semibold bg-transparent border-b border-primary outline-none w-full min-w-0",value:v,onChange:e=>y(e.target.value),onBlur:()=>{S()},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),S()),"Escape"===e.key&&g(!1)},onClick:e=>e.stopPropagation()}):ee.jsx(fk,{className:uk("text-base leading-tight",e.archived&&"text-muted-foreground"),onDoubleClick:x||e.archived?void 0:k,children:e.name}),ee.jsx("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0",children:!x&&ee.jsxs(ee.Fragment,{children:[e.archived?ee.jsx(Rk,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:t=>{t.stopPropagation(),a(e.id)},title:"Restore project",children:ee.jsx(CE,{className:"h-3.5 w-3.5"})}):ee.jsxs(ee.Fragment,{children:[ee.jsx(Rk,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:k,title:"Rename project",children:ee.jsx(QE,{className:"h-3.5 w-3.5"})}),ee.jsx(Rk,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:e=>{e.stopPropagation(),f(!0)},title:"共享设置",children:ee.jsx(uj,{className:"h-3.5 w-3.5"})}),ee.jsx(Rk,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:t=>{t.stopPropagation(),o(e.id)},title:"Archive project",children:ee.jsx(PE,{className:"h-3.5 w-3.5"})})]}),ee.jsx(Rk,{variant:"ghost",size:"icon",className:"h-7 w-7 text-destructive hover:text-destructive hover:bg-destructive/10",onClick:async t=>{t.stopPropagation();await c({title:"删除项目",description:`确认删除项目 "${e.name}"?此操作不可撤销。`,destructive:!0,confirmLabel:"删除"})&&r(e.id)},title:"Delete project",children:ee.jsx(lj,{className:"h-3.5 w-3.5"})})]})})]}),ee.jsx("div",{className:"flex items-center gap-1.5",children:e.archived?ee.jsx(pj,{variant:"secondary",className:"text-xs",children:"Archived"}):ee.jsxs(ee.Fragment,{children:[ee.jsx(hN,{status:e.status}),ee.jsx("span",{className:"text-xs text-muted-foreground capitalize",children:e.status}),t&&n.length>0&&ee.jsx("div",{className:"ml-auto",children:ee.jsx(Xb,{mode:"wait",children:n.slice(-1).map(e=>ee.jsx(hw.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.25,ease:"easeOut"},children:ee.jsx(pj,{variant:"outline",className:"text-xs font-normal whitespace-nowrap",children:pN(e.phase,e.detail)})},e.id))})})]})})]}),ee.jsxs(hk,{className:"space-y-2",children:[ee.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[ee.jsx(_E,{className:"h-3.5 w-3.5 flex-shrink-0"}),ee.jsx("span",{className:"truncate font-mono",children:e.folderPath}),null!==p&&ee.jsx("span",{className:"flex-shrink-0 ml-auto text-muted-foreground/70",children:(j=p,j>=1073741824?(j/1073741824).toFixed(1)+" GB":j>=1048576?(j/1048576).toFixed(1)+" MB":Math.round(j/1024)+" KB")})]}),ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx(pj,{variant:"outline",className:"text-xs font-mono",children:e.cliTool??"claude"}),ee.jsx(pj,{variant:"unlimited"===e.permissionMode?"destructive":"secondary",className:"text-xs",children:"unlimited"===e.permissionMode?"Unlimited":"Limited"}),x&&ee.jsxs(pj,{variant:"outline",className:"text-xs gap-0.5",children:[w?ee.jsx(LE,{className:"h-3 w-3"}):ee.jsx(QE,{className:"h-3 w-3"}),w?"可见":"可编辑"]}),!x&&e.shares&&e.shares.length>0&&ee.jsxs(pj,{variant:"outline",className:"text-xs gap-0.5",children:[ee.jsx(uj,{className:"h-3 w-3"}),e.shares.length]}),ee.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(e.createdAt).toLocaleDateString()})]}),(e.tags??[]).length>0&&ee.jsxs("div",{className:"flex flex-wrap gap-1 mt-1",children:[(e.tags??[]).slice(0,3).map(e=>ee.jsxs("span",{className:"px-1.5 py-0 rounded-full text-[10px] bg-muted text-muted-foreground border border-border",children:["#",e]},e)),((null==(s=e.tags)?void 0:s.length)??0)>3&&ee.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["+",((null==(l=e.tags)?void 0:l.length)??0)-3]})]})]})]})});var j;const C=t&&!e.archived?ee.jsx("div",{className:"card-active-glow rounded-lg",children:E}):E;return ee.jsxs(ee.Fragment,{children:[C,!x&&i&&ee.jsx(BP,{project:e,open:d,onOpenChange:f,onUpdated:i})]})});function gN({onSelect:e}){const[t,n]=W.useState(""),[r,o]=W.useState(null),[a,i]=W.useState([]),[s,l]=W.useState(!0),[u,c]=W.useState(null),[d,f]=W.useState(!1),[p,h]=W.useState(""),[m,g]=W.useState(null),[v,y]=W.useState(!1),b=W.useRef(null),x=async e=>{l(!0),c(null);try{const t=await VS(e);n(t.path),o(t.parent),i(t.entries)}catch(xT){c(xT instanceof Error?xT.message:"Failed to load directory")}finally{l(!1)}};W.useEffect(()=>{x()},[]),W.useEffect(()=>{d&&setTimeout(()=>{var e;return null==(e=b.current)?void 0:e.focus()},0)},[d]);const w=()=>{f(!1),h(""),g(null)},k=async()=>{const e=p.trim();if(e){y(!0),g(null);try{const{path:n}=await US(t,e);f(!1),h(""),await x(t),x(n)}catch(xT){g(xT instanceof Error?xT.message:"Failed to create folder")}finally{y(!1)}}},S=t.split("/").filter(Boolean);return ee.jsxs("div",{className:"flex flex-col h-64 border rounded-md overflow-hidden",children:[ee.jsxs("div",{className:"flex items-center gap-1 px-2 py-2 bg-muted border-b flex-shrink-0",children:[ee.jsx(Rk,{variant:"ghost",size:"sm",className:"h-6 px-1 flex-shrink-0",onClick:()=>{x()},title:"Home",children:ee.jsx($E,{className:"h-3 w-3"})}),ee.jsx("div",{className:"flex items-center gap-1 flex-1 overflow-x-auto min-w-0",children:S.map((e,t)=>ee.jsxs(H.Fragment,{children:[ee.jsx(ME,{className:"h-3 w-3 text-muted-foreground flex-shrink-0"}),ee.jsx("button",{className:"text-xs hover:text-foreground text-muted-foreground whitespace-nowrap",onClick:()=>(e=>{const t="/"+S.slice(0,e+1).join("/");x(t)})(t),children:e})]},t))}),ee.jsxs(Rk,{variant:"ghost",size:"sm",className:"h-6 px-1.5 flex-shrink-0 gap-1 text-xs",onClick:()=>{h(""),g(null),f(!0)},disabled:d||s||!!u,title:"New folder",children:[ee.jsx(AE,{className:"h-3.5 w-3.5"}),ee.jsx("span",{className:"hidden sm:inline",children:"New folder"})]})]}),ee.jsxs("div",{className:"flex-1 overflow-y-auto",children:[s&&ee.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"Loading..."}),u&&ee.jsx("div",{className:"flex items-center justify-center h-full text-sm text-destructive px-4 text-center",children:u}),!s&&!u&&ee.jsxs("div",{className:"p-1",children:[r&&ee.jsxs("button",{className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded hover:bg-accent hover:text-accent-foreground",onClick:()=>{x(r)},children:[ee.jsx(NE,{className:"h-4 w-4 text-muted-foreground"}),ee.jsx("span",{children:".."})]}),d&&ee.jsxs("div",{className:"flex items-center gap-1 px-2 py-1.5",children:[ee.jsx(IE,{className:"h-4 w-4 text-blue-500 flex-shrink-0"}),ee.jsx("input",{ref:b,className:uk("flex-1 text-sm bg-background border rounded px-1.5 py-0.5 outline-none","focus:ring-1 focus:ring-ring",m&&"border-destructive"),placeholder:"Folder name",value:p,onChange:e=>{h(e.target.value),g(null)},onKeyDown:e=>{"Enter"===e.key?(e.preventDefault(),k()):"Escape"===e.key&&w()},disabled:v}),ee.jsx("button",{className:"p-1 rounded hover:bg-accent disabled:opacity-50",onClick:()=>{k()},disabled:!p.trim()||v,title:"Create",children:ee.jsx(TE,{className:"h-3.5 w-3.5 text-green-600"})}),ee.jsx("button",{className:"p-1 rounded hover:bg-accent",onClick:w,disabled:v,title:"Cancel",children:ee.jsx(cj,{className:"h-3.5 w-3.5 text-muted-foreground"})})]}),m&&ee.jsx("p",{className:"px-3 pb-1 text-xs text-destructive",children:m}),0===a.length&&!d&&ee.jsx("div",{className:"text-sm text-muted-foreground px-2 py-4 text-center",children:"Empty directory"}),a.map(e=>ee.jsxs("button",{className:uk("flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded text-left","dir"===e.type?"hover:bg-accent hover:text-accent-foreground cursor-pointer":"opacity-40 cursor-not-allowed"),onClick:()=>{"dir"===e.type&&x(e.path)},disabled:"file"===e.type,children:["dir"===e.type?ee.jsx(IE,{className:"h-4 w-4 text-blue-500 flex-shrink-0"}):ee.jsx(DE,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),ee.jsx("span",{className:"truncate",children:e.name})]},e.path))]})]}),ee.jsxs("div",{className:"border-t px-3 py-2 flex items-center justify-between gap-2 flex-shrink-0 bg-background",children:[ee.jsx("span",{className:"text-xs text-muted-foreground truncate flex-1",children:t}),ee.jsx(Rk,{size:"sm",onClick:()=>e(t),disabled:!t,children:"Select this folder"})]})]})}const vN=[{value:"claude",label:"Claude",desc:"Anthropic Claude Code CLI"},{value:"opencode",label:"OpenCode",desc:"OpenCode CLI (sst/opencode)"},{value:"codex",label:"Codex",desc:"OpenAI Codex CLI"},{value:"qwen",label:"Qwen",desc:"Qwen Code CLI (QwenLM)"},{value:"gemini",label:"Gemini",desc:"Google Gemini CLI"},{value:"terminal",label:"Terminal",desc:"Plain shell (no AI CLI)"}],yN={claude:{limited:"claude",unlimited:"claude --dangerously-skip-permissions"},opencode:{limited:"opencode",unlimited:"opencode --dangerously-skip-permissions"},codex:{limited:"codex",unlimited:"codex --ask-for-approval never --sandbox danger-full-access"},qwen:{limited:"qwen-code",unlimited:"qwen-code --yolo"},gemini:{limited:"gemini",unlimited:"gemini --yolo"},terminal:{limited:"$SHELL (interactive)",unlimited:"$SHELL (interactive)"}};function bN({open:e,onOpenChange:t,onCreated:n}){const[r,o]=W.useState("name"),[a,i]=W.useState(""),[s,l]=W.useState(""),[u,c]=W.useState("claude"),[d,f]=W.useState("limited"),[p,h]=W.useState(!1),[m,g]=W.useState(null),v=e=>{e||(o("name"),i(""),l(""),c("claude"),f("limited"),g(null),h(!1)),t(e)},y=()=>{a.trim()?(g(null),o("folder")):g("Please enter a project name")},b=["name","folder","settings"];return ee.jsx(_P,{open:e,onOpenChange:v,children:ee.jsxs(IP,{className:"sm:max-w-lg",children:[ee.jsxs(zP,{children:[ee.jsx(VP,{children:{name:"New Project — Name",folder:"New Project — Select Folder",settings:"New Project — Settings"}[r]}),ee.jsxs($P,{children:["name"===r&&"Give your project a name.","folder"===r&&"Choose the working directory for this project.","settings"===r&&"Choose the AI coding tool and run mode."]})]}),ee.jsx("div",{className:"flex gap-2 mb-2",children:b.map((e,t)=>ee.jsx("div",{className:"h-1.5 flex-1 rounded-full "+(r===e?"bg-primary":b.indexOf(r)>t?"bg-primary/40":"bg-muted")},e))}),"name"===r&&ee.jsxs("div",{className:"space-y-4",children:[ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ik,{htmlFor:"project-name",children:"Project Name"}),ee.jsx(Lk,{id:"project-name",placeholder:"My Project",value:a,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"===e.key&&y()},autoFocus:!0})]}),m&&ee.jsx("p",{className:"text-sm text-destructive",children:m})]}),"folder"===r&&ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ik,{children:"Working Directory"}),ee.jsx(gN,{onSelect:e=>{l(e),o("settings")}})]}),"settings"===r&&ee.jsxs("div",{className:"space-y-5",children:[ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ik,{children:"AI Coding Tool"}),ee.jsx("div",{className:"grid grid-cols-2 gap-2",children:vN.map(e=>ee.jsxs("label",{className:"flex items-center gap-2.5 cursor-pointer p-3 rounded-md border transition-colors "+(u===e.value?"border-primary bg-primary/5":"hover:bg-accent"),children:[ee.jsx("input",{type:"radio",name:"cliTool",value:e.value,checked:u===e.value,onChange:()=>c(e.value),className:"accent-primary"}),ee.jsxs("div",{children:[ee.jsx("div",{className:"font-medium text-sm",children:e.label}),ee.jsx("div",{className:"text-xs text-muted-foreground",children:e.desc})]})]},e.value))})]}),"terminal"!==u&&ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ik,{children:"Permission Mode"}),ee.jsxs("div",{className:"space-y-2",children:[ee.jsxs("label",{className:"flex items-start gap-3 cursor-pointer p-3 rounded-md border hover:bg-accent transition-colors",children:[ee.jsx("input",{type:"radio",name:"permissionMode",value:"limited",checked:"limited"===d,onChange:()=>f("limited"),className:"mt-0.5"}),ee.jsxs("div",{children:[ee.jsx("div",{className:"font-medium text-sm",children:"Limited"}),ee.jsxs("div",{className:"text-xs text-muted-foreground",children:["Runs ",ee.jsx("code",{className:"bg-muted px-1 rounded",children:yN[u].limited})," — asks for permission before file changes."]})]})]}),ee.jsxs("label",{className:"flex items-start gap-3 cursor-pointer p-3 rounded-md border hover:bg-accent transition-colors",children:[ee.jsx("input",{type:"radio",name:"permissionMode",value:"unlimited",checked:"unlimited"===d,onChange:()=>f("unlimited"),className:"mt-0.5"}),ee.jsxs("div",{children:[ee.jsx("div",{className:"font-medium text-sm",children:"Unlimited"}),ee.jsxs("div",{className:"text-xs text-muted-foreground",children:["Runs ",ee.jsx("code",{className:"bg-muted px-1 rounded",children:yN[u].unlimited})," — acts autonomously."]})]})]})]})]}),ee.jsxs("div",{className:"text-xs text-muted-foreground",children:[ee.jsx("span",{className:"font-medium",children:"Folder:"})," ",ee.jsx("span",{className:"font-mono",children:s})]}),m&&ee.jsx("p",{className:"text-sm text-destructive",children:m})]}),ee.jsxs(FP,{children:["name"!==r&&ee.jsx(Rk,{variant:"outline",onClick:()=>o("settings"===r?"folder":"name"),disabled:p,children:"Back"}),"name"===r&&ee.jsx(Rk,{onClick:y,children:"Next"}),"folder"===r&&ee.jsx(Rk,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),"settings"===r&&ee.jsx(Rk,{onClick:()=>{(async()=>{h(!0),g(null);try{const e=await lS({name:a.trim(),folderPath:s,permissionMode:d,cliTool:u});n(e),v(!1)}catch(xT){g(xT instanceof Error?xT.message:"Failed to create project")}finally{h(!1)}})()},disabled:p,children:p?"Creating...":"Create Project"})]})]})})}function xN({open:e,onOpenChange:t,onOpened:n}){const[r,o]=W.useState(""),[a,i]=W.useState(!1),[s,l]=W.useState(null),u=e=>{e||(o(""),l(null),i(!1)),t(e)};return ee.jsx(_P,{open:e,onOpenChange:u,children:ee.jsxs(IP,{className:"sm:max-w-lg",children:[ee.jsxs(zP,{children:[ee.jsx(VP,{children:"Open Existing Project"}),ee.jsxs($P,{children:["Select a folder that contains a ",ee.jsx("code",{className:"bg-muted px-1 rounded text-xs",children:".ccweb/"})," configuration. The project's history and settings will be restored."]})]}),ee.jsxs("div",{className:"space-y-2",children:[ee.jsx(Ik,{children:"Project Folder"}),ee.jsx(gN,{onSelect:e=>{(async e=>{o(e),i(!0),l(null);try{const t=await uS(e);n(t),u(!1)}catch(xT){l(xT instanceof Error?xT.message:"Failed to open project"),i(!1)}})(e)}})]}),s&&ee.jsx("p",{className:"text-sm text-destructive",children:s}),r&&!s&&a&&ee.jsxs("p",{className:"text-sm text-muted-foreground",children:["Opening project from ",r,"..."]}),ee.jsx(FP,{children:ee.jsx(Rk,{variant:"outline",onClick:()=>u(!1),disabled:a,children:"Cancel"})})]})})}const wN=`${"https:"===window.location.protocol?"wss:":"ws:"}//${window.location.host}`,kN=3e3;function SN(e,t){const n=W.useRef(null),r=W.useRef(0),o=W.useRef(!0),a=W.useRef(!1),i=W.useRef(null),s=W.useRef(t);s.current=t;const[l,u]=W.useState(!1),[c,d]=W.useState(0),f=W.useRef(!1),p=W.useRef([]),h=W.useCallback(e=>{var t;(null==(t=n.current)?void 0:t.readyState)===WebSocket.OPEN&&n.current.send(JSON.stringify(e))},[]),m=W.useCallback(()=>{var e;if((null==(e=n.current)?void 0:e.readyState)===WebSocket.OPEN)for(;p.current.length>0;){const e=p.current.shift();n.current.send(JSON.stringify({type:"terminal_input",data:e}))}},[]),g=W.useCallback((e,t)=>{var r;(null==(r=n.current)?void 0:r.readyState)===WebSocket.OPEN?(n.current.send(JSON.stringify({type:"terminal_subscribe",cols:e,rows:t})),f.current=!1):f.current=!0},[]),v=W.useCallback(e=>{var t;(null==(t=n.current)?void 0:t.readyState)===WebSocket.OPEN?n.current.send(JSON.stringify({type:"terminal_input",data:e})):p.current.push(e)},[]),y=W.useCallback((e,t)=>{h({type:"terminal_resize",cols:e,rows:t})},[h]),b=W.useCallback(()=>{h({type:"chat_subscribe",replay:50})},[h]),x=W.useCallback(()=>{if(!o.current)return;if(a.current)return;const t=Zk();if(!t)return void(window.location.href="/login");a.current=!0;const l=new WebSocket(`${wN}/ws/projects/${e}`);n.current=l,l.onopen=()=>{a.current=!1,r.current=0,l.send(JSON.stringify({type:"auth",token:t}))},l.onmessage=e=>{var t,n,r,o,a,i,l,c,p,h,g,v,y,b,x,w,k,S;let E;try{E=JSON.parse(e.data)}catch{return}switch(E.type){case"connected":f.current=!1,u(!0),d(e=>e+1),m(),null==(n=(t=s.current).onConnected)||n.call(t);break;case"terminal_data":null==(o=(r=s.current).onTerminalData)||o.call(r,E.data);break;case"status":null==(i=(a=s.current).onStatus)||i.call(a,E.status);break;case"chat_message":{const e=E;null==(c=(l=s.current).onChatMessage)||c.call(l,e);break}case"project_stopped":{const e=E;null==(h=(p=s.current).onProjectStopped)||h.call(p,e.projectId,e.projectName);break}case"context_update":null==(v=(g=s.current).onContextUpdate)||v.call(g,E);break;case"semantic_update":null==(b=(y=s.current).onSemanticUpdate)||b.call(y,E);break;case"approval_request":null==(w=(x=s.current).onApprovalRequest)||w.call(x,E);break;case"approval_resolved":null==(S=(k=s.current).onApprovalResolved)||S.call(k,E);break;case"error":console.error("[WS] Server error:",E.message)}},l.onclose=()=>{var e,t;a.current=!1,n.current===l&&(n.current=null),u(!1),null==(t=(e=s.current).onDisconnected)||t.call(e),o.current&&r.current<5&&(r.current++,i.current=window.setTimeout(x,kN))},l.onerror=e=>{a.current=!1,console.error("[WS] WebSocket error:",e)}},[e]);return W.useEffect(()=>(o.current=!0,x(),()=>{var e;o.current=!1,i.current&&(clearTimeout(i.current),i.current=null),null==(e=n.current)||e.close(),n.current=null,p.current=[]}),[x]),{subscribeTerminal:g,sendTerminalInput:v,sendTerminalResize:y,subscribeChatMessages:b,connected:l,readyTick:c}}function EN(e){const t=W.useRef(null),n=W.useRef(0),r=W.useRef(!0),o=W.useRef(!1),a=W.useRef(null),i=W.useRef(e);i.current=e;const s=W.useCallback(()=>{if(!r.current)return;if(o.current)return;const e=Zk();if(!e)return;o.current=!0;const l=new WebSocket(`${wN}/ws/dashboard`);t.current=l,l.onopen=()=>{o.current=!1,n.current=0,l.send(JSON.stringify({type:"auth",token:e}))},l.onmessage=e=>{var t,n;try{const r=JSON.parse(e.data);"activity_update"===r.type?i.current.onActivityUpdate(r):"project_stopped"===r.type&&(null==(n=(t=i.current).onProjectStopped)||n.call(t,r.projectId,r.projectName))}catch{}},l.onclose=()=>{o.current=!1,t.current===l&&(t.current=null),r.current&&n.current<5&&(n.current++,a.current=window.setTimeout(s,kN))},l.onerror=e=>{o.current=!1,console.error("[DashboardWS] Error:",e)}},[]);W.useEffect(()=>(r.current=!0,s(),()=>{var e;r.current=!1,a.current&&(clearTimeout(a.current),a.current=null),null==(e=t.current)||e.close(),t.current=null}),[s])}function jN({projectId:e,enabled:t,onChatMessage:n,onStatusChange:r,onContextUpdate:o,onApprovalRequest:a,onApprovalResolved:i}){const s=W.useRef(null),l=W.useRef(!0),u=W.useRef(0),c=W.useRef(null),d=W.useRef(!1),f=W.useRef(!1),p=W.useRef([]),h=W.useRef({onChatMessage:n,onStatusChange:r,onContextUpdate:o,onApprovalRequest:a,onApprovalResolved:i});h.current={onChatMessage:n,onStatusChange:r,onContextUpdate:o,onApprovalRequest:a,onApprovalResolved:i};const[m,g]=W.useState(!1),[v,y]=W.useState(0),b=W.useCallback(()=>{if(f.current&&s.current&&s.current.readyState===WebSocket.OPEN)for(;p.current.length>0;){const e=p.current.shift();s.current.send(JSON.stringify({type:"terminal_input",data:e}))}},[]),x=W.useCallback(e=>{var t;f.current&&(null==(t=s.current)?void 0:t.readyState)===WebSocket.OPEN?s.current.send(JSON.stringify({type:"terminal_input",data:e})):p.current.push(e)},[]),w=W.useCallback(()=>{if(!l.current||!t)return;if(d.current)return;const n=Zk();if(!n)return;d.current=!0,f.current=!1;const r=new WebSocket(`${wN}/ws/projects/${e}`);s.current=r,r.onopen=()=>{d.current=!1,u.current=0,r.send(JSON.stringify({type:"auth",token:n}))},r.onmessage=e=>{var t,n,o,a,i,s,l,u,c,d;try{const p=JSON.parse(e.data);"connected"===p.type?(r.send(JSON.stringify({type:"chat_subscribe",replay:50})),f.current=!0,g(!0),y(e=>e+1),b()):"chat_message"===p.type?h.current.onChatMessage(p):"status"===p.type&&p.status?null==(n=(t=h.current).onStatusChange)||n.call(t,p.status):"project_stopped"===p.type?null==(a=(o=h.current).onStatusChange)||a.call(o,"stopped"):"context_update"===p.type?null==(s=(i=h.current).onContextUpdate)||s.call(i,p):"approval_request"===p.type?null==(u=(l=h.current).onApprovalRequest)||u.call(l,p):"approval_resolved"===p.type&&(null==(d=(c=h.current).onApprovalResolved)||d.call(c,p))}catch{}},r.onclose=()=>{if(d.current=!1,f.current=!1,g(!1),s.current===r&&(s.current=null),l.current&&t)if(u.current<5){u.current++;const e=2e3*Math.random();c.current=window.setTimeout(w,kN+e)}else p.current.length>0&&(console.warn("[MonitorWS] Retries exhausted, dropping",p.current.length,"queued messages"),p.current=[])},r.onerror=()=>{d.current=!1}},[e,t,b]);return W.useEffect(()=>(l.current=!0,()=>{l.current=!1,p.current=[]}),[]),W.useEffect(()=>(u.current=0,w(),()=>{var e;f.current=!1,c.current&&(clearTimeout(c.current),c.current=null),null==(e=s.current)||e.close(),s.current=null}),[w,t]),{sendInput:x,connected:m,readyTick:v}}const CN="cc_project_order_cache";function PN(){try{const e=localStorage.getItem(CN);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)&&t.every(e=>"string"==typeof e)?t:[]}catch{return[]}}function NN(e){try{localStorage.setItem(CN,JSON.stringify(e))}catch{}}function TN(){const[e,t]=W.useState(PN),n=W.useRef(!1),r=W.useRef(null),o=W.useRef(null),a=W.useRef(!1),i=W.useRef(!0);W.useEffect(()=>{i.current=!0;let e=!1;return oS().then(r=>{e||n.current||(t(e=>function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(e,r)?e:r),NN(r))}).catch(()=>{}),()=>{e=!0,i.current=!1,o.current&&(clearTimeout(o.current),o.current=null)}},[]);const s=W.useCallback(async()=>{for(;r.current;){const e=r.current;r.current=null,a.current=!0;try{await aS(e)}catch{}a.current=!1}},[]),l=W.useCallback(e=>{n.current=!0,t(e),NN(e),r.current=e,o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{o.current=null,i.current&&(a.current||s())},400)},[s]),u=W.useCallback(t=>{const n=new Map(e.map((e,t)=>[e,t]));return[...t].sort((e,t)=>{const r=n.get(e.id)??1/0,o=n.get(t.id)??1/0;return r===o?0:r-o})},[e]);return W.useMemo(()=>({order:e,setOrder:l,applyOrder:u}),[e,l,u])}const MN=18e6,RN=6048e5;function LN(e,t=18e6){if(!e||void 0===e.utilization||e.utilization<=0||!e.resetAt)return null;const n=new Date(e.resetAt).getTime()-Date.now();if(n<=0)return null;const r=t-n;return r<=0?null:Math.round(e.utilization/(r/t))}function DN({label:e,bucket:t}){if(!t||void 0===t.utilization)return null;const n=t.utilization,r=n<50?"text-green-400":n<80?"text-yellow-400":"text-red-400",o=function(e){if(!e)return"";const t=new Date(e).getTime()-Date.now();if(t<=0)return"即将重置";const n=Math.floor(t/36e5),r=Math.floor(t%36e5/6e4);return n>0?`${n}h${r}m`:`${r}m`}(t.resetAt);return ee.jsxs("span",{className:"text-muted-foreground whitespace-nowrap",children:[e," ",ee.jsxs("span",{className:uk("font-medium",r),children:[n,"%"]}),o&&ee.jsxs("span",{className:"text-muted-foreground/70 ml-0.5",children:["(",o,")"]})]})}function _N({className:e}){const[t,n]=W.useState("loading"),[r,o]=W.useState(!1),a=()=>Uk(Bk.usageMonitorTool,"claude");W.useEffect(()=>{const e=async()=>{try{n(await zS(a()))}catch{n(null)}};e();const t=setInterval(()=>{e()},3e5),r=()=>{e()},o=t=>{t.key===Bk.usageMonitorTool&&e()};return window.addEventListener("ccweb:usage-tool-change",r),window.addEventListener("storage",o),()=>{clearInterval(t),window.removeEventListener("ccweb:usage-tool-change",r),window.removeEventListener("storage",o)}},[]);if("loading"===t)return null;if(!t)return null;const i=!!t.fiveHour,s=!!t.sevenDay,l=!!t.sevenDaySonnet,u=!!t.sevenDayOpus,c=i||s||l||u,d=LN(t.fiveHour,MN),f=LN(t.sevenDay,RN),p=LN(t.sevenDaySonnet,RN),h=null!==d||null!==f||null!==p;return ee.jsxs("div",{className:uk("flex items-center gap-1.5 text-xs",e),children:[h&&ee.jsxs("span",{className:"flex items-center gap-1",children:[null!==d&&ee.jsxs("span",{className:uk("font-medium",d<=100?"text-green-400":"text-orange-400"),title:`5h 配速:按当前速率,窗口结束时预计使用 ${d}%`,children:[d,"%"]}),null!==f&&ee.jsxs(ee.Fragment,{children:[ee.jsx("span",{className:"text-muted-foreground/40",children:"/"}),ee.jsxs("span",{className:uk("font-medium",f<=100?"text-green-400":"text-orange-400"),title:`7d 配速:按当前速率,窗口结束时预计使用 ${f}%`,children:[f,"%"]})]}),null!==p&&ee.jsxs(ee.Fragment,{children:[ee.jsx("span",{className:"text-muted-foreground/40",children:"/"}),ee.jsxs("span",{className:uk("font-medium",p<=100?"text-green-400":"text-orange-400"),title:`7d Sonnet 配速:按当前速率,窗口结束时预计使用 ${p}%`,children:[p,"%"]})]})]}),t.planName&&ee.jsx("span",{className:"font-medium text-foreground bg-muted border border-border px-2 py-0.5 rounded-full",children:t.planName}),c&&ee.jsxs(ee.Fragment,{children:[ee.jsx("span",{className:"text-muted-foreground/50",children:"|"}),ee.jsx(DN,{label:"5h",bucket:t.fiveHour}),s&&ee.jsxs(ee.Fragment,{children:[ee.jsx("span",{className:"text-muted-foreground/50",children:"·"}),ee.jsx(DN,{label:"7d",bucket:t.sevenDay})]}),l&&ee.jsxs(ee.Fragment,{children:[ee.jsx("span",{className:"text-muted-foreground/50",children:"·"}),ee.jsx(DN,{label:"7d Sonnet",bucket:t.sevenDaySonnet})]}),u&&ee.jsxs(ee.Fragment,{children:[ee.jsx("span",{className:"text-muted-foreground/50",children:"·"}),ee.jsx(DN,{label:"7d Opus",bucket:t.sevenDayOpus})]})]}),ee.jsx("button",{onClick:()=>{(async()=>{o(!0);try{n(await FS(a()))}catch{n(null)}finally{o(!1)}})()},className:"text-muted-foreground hover:text-foreground transition-colors",title:"刷新用量信息",children:ee.jsx(JE,{className:uk("h-3 w-3",r&&"animate-spin")})})]})}function AN({open:e,onOpenChange:t,kind:n,label:r,content:o}){const a=cf(),[i,s]=W.useState(()=>Uk(Bk.skillhubAuthor,"")),[l,u]=W.useState(""),[c,d]=W.useState(""),[f,p]=W.useState(!1),[h,m]=W.useState(null),[g,v]=W.useState(!0);W.useEffect(()=>{e&&(s(Uk(Bk.skillhubAuthor,"")),u(""),d(""),v(!0),_S().then(m).catch(()=>m({configured:!1,needsReset:!1})).finally(()=>v(!1)))},[e]);const y=()=>{t(!1),a("/settings?tab=hub")},b="quick-prompt"===n?"快捷 Prompt":"Agent Prompt",x=!g&&h&&!h.configured;return ee.jsx(_P,{open:e,onOpenChange:t,children:ee.jsxs(IP,{className:uk("sm:max-w-lg"),children:[ee.jsxs(zP,{children:[ee.jsx(VP,{children:"共享到 ccweb-hub"}),ee.jsxs($P,{children:["「",r,"」将以 GitHub Issue 形式提交到 ",ee.jsx("code",{children:"zbc0315/ccweb-hub"}),", 使用你配置的 GitHub token。审核通过后会合入为社区 prompt。"]})]}),g?ee.jsxs("div",{className:"py-8 flex items-center justify-center text-sm text-muted-foreground",children:[ee.jsx(WE,{className:"h-4 w-4 mr-2 animate-spin"}),"检查 token 配置…"]}):x?ee.jsxs("div",{className:"space-y-3 py-2",children:[ee.jsx("div",{className:"rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2.5 text-xs",children:ee.jsxs("div",{className:"flex items-start gap-2",children:[ee.jsx(BE,{className:"h-4 w-4 shrink-0 text-amber-500 mt-0.5"}),ee.jsxs("div",{className:"space-y-1",children:[ee.jsx("div",{className:"font-medium text-foreground",children:(null==h?void 0:h.needsReset)?"之前配置的 token 已失效(服务端密钥可能已轮换),请重新设置":"还没配置 GitHub token"}),ee.jsxs("div",{className:"text-muted-foreground",children:["为保护你的 GitHub 账号,ccweb 不自带 token,需要你用自己的 GitHub fine-grained PAT(只勾 ",ee.jsx("code",{children:"ccweb-hub"})," 仓库的",ee.jsx("code",{children:" Issues: Read and write"}),")。"]})]})]})}),ee.jsxs("div",{className:"flex gap-2 pt-1",children:[ee.jsx(Rk,{variant:"outline",onClick:()=>t(!1),className:"flex-1",children:"稍后"}),ee.jsx(Rk,{onClick:y,className:"flex-1",children:"去设置页配置"})]})]}):ee.jsxs(ee.Fragment,{children:[ee.jsxs("div",{className:"space-y-3 py-2",children:[ee.jsxs("div",{className:"space-y-1.5",children:[ee.jsx(Ik,{htmlFor:"share-author",className:"text-xs",children:"GitHub 用户名(可选,用于作者标注)"}),ee.jsx(Lk,{id:"share-author",placeholder:"zbc0315",value:i,onChange:e=>s(e.target.value)})]}),ee.jsxs("div",{className:"space-y-1.5",children:[ee.jsx(Ik,{htmlFor:"share-desc",className:"text-xs",children:"一句话描述(可选)"}),ee.jsx(Lk,{id:"share-desc",placeholder:"quick-prompt"===n?"这个命令用来...":"这段 prompt 让 Claude...",value:l,onChange:e=>u(e.target.value)})]}),ee.jsxs("div",{className:"space-y-1.5",children:[ee.jsx(Ik,{htmlFor:"share-tags",className:"text-xs",children:"标签(逗号分隔,可选)"}),ee.jsx(Lk,{id:"share-tags",placeholder:"review, 中文, 代码",value:c,onChange:e=>d(e.target.value)})]})]}),ee.jsxs("div",{className:"rounded-md border bg-muted/30 px-3 py-2 text-xs text-muted-foreground",children:[ee.jsxs("div",{className:"font-medium text-foreground mb-1",children:["预览:",b," · ",r]}),ee.jsxs("pre",{className:"whitespace-pre-wrap font-mono text-[11px] leading-snug max-h-32 overflow-y-auto",children:[Array.from(o).slice(0,500).join(""),Array.from(o).length>500&&"…"]})]}),ee.jsxs(FP,{children:[ee.jsxs(Rk,{variant:"ghost",size:"sm",onClick:y,className:"mr-auto",title:"更换或清除 token",children:[ee.jsx(BE,{className:"h-3.5 w-3.5 mr-1"}),"管理 token"]}),ee.jsx(Rk,{variant:"outline",onClick:()=>t(!1),disabled:f,children:"取消"}),ee.jsx(Rk,{onClick:()=>{(async()=>{if(!f){p(!0),Wk(Bk.skillhubAuthor,i);try{const e=await IS({kind:n,label:r,body:o,description:l.trim()||void 0,author:i.trim()||void 0,tags:c.split(",").map(e=>e.trim()).filter(Boolean)});eN.success(`已提交:Issue #${e.issueNumber}`,{action:{label:"查看",onClick:()=>window.open(e.issueUrl,"_blank","noopener,noreferrer")}}),t(!1)}catch(xT){const t=xT.message;eN.error(t),/invalid|expired|401/.test(t)&&m({configured:!1,needsReset:!0})}finally{p(!1)}}})()},disabled:f,children:f?ee.jsxs(ee.Fragment,{children:[ee.jsx(WE,{className:"h-3.5 w-3.5 mr-1.5 animate-spin"}),"提交中"]}):ee.jsxs(ee.Fragment,{children:[ee.jsx(ej,{className:"h-3.5 w-3.5 mr-1.5"}),"直接提交"]})})]})]})]})})}function ON(){const[e,t]=W.useState([]),[n,r]=W.useState(!1),[o,a]=W.useState(""),[i,s]=W.useState(""),[l,u]=W.useState(""),[c,d]=W.useState(null),[f,p]=W.useState(""),[h,m]=W.useState(""),[g,v]=W.useState(""),y=W.useRef(null),b=W.useRef(null),[x,w]=W.useState(null);W.useEffect(()=>{hS().then(t).catch(()=>t([]))},[]),W.useEffect(()=>{n&&setTimeout(()=>{var e;return null==(e=y.current)?void 0:e.focus()},0)},[n]),W.useEffect(()=>{c&&setTimeout(()=>{var e;return null==(e=b.current)?void 0:e.focus()},0)},[c]);const k=async()=>{const e=i.trim();if(e)try{const n=await mS({label:o.trim()||e,command:e,...l?{parentId:l}:{}});t(e=>[...e,n]),a(""),s(""),u(""),r(!1)}catch(xT){console.error("[GlobalShortcuts] Failed to add:",xT)}},S=async()=>{const e=h.trim();if(e&&c)try{const n=await gS(c,{label:f.trim()||e,command:e,parentId:g||null});t(e=>e.map(e=>e.id===c?n:e)),d(null)}catch(xT){console.error("[GlobalShortcuts] Failed to save:",xT)}};return ee.jsxs("section",{className:"mt-10",children:[ee.jsxs("div",{className:"flex items-center justify-between mb-4",children:[ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx(dj,{className:"h-4 w-4 text-muted-foreground"}),ee.jsx("h2",{className:"text-lg font-semibold",children:"全局快捷 Prompts"}),ee.jsx("span",{className:"text-xs text-muted-foreground",children:"在所有项目的终端中可用"})]}),ee.jsxs("button",{onClick:()=>{r(e=>!e),d(null)},className:uk("flex items-center gap-1.5 text-sm px-3 py-1.5 rounded-md border transition-colors",n?"border-border text-foreground bg-muted":"border-border text-muted-foreground hover:text-foreground hover:bg-muted"),children:[ee.jsx(ZE,{className:"h-3.5 w-3.5"}),"新建"]})]}),n&&ee.jsxs("div",{className:"mb-4 p-4 rounded-lg border border-border bg-background space-y-3",children:[ee.jsx("input",{ref:y,placeholder:"名称(可选)",value:o,onChange:e=>a(e.target.value),className:"w-full text-sm bg-muted border border-border rounded px-3 py-1.5 text-foreground placeholder:text-muted-foreground outline-none focus:border-border transition-colors"}),ee.jsx("textarea",{placeholder:"命令内容…",value:i,onChange:e=>s(e.target.value),rows:3,className:"w-full text-sm bg-muted border border-border rounded px-3 py-1.5 text-foreground placeholder:text-muted-foreground font-mono outline-none focus:border-border transition-colors resize-none",onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),k()),"Escape"===e.key&&(r(!1),a(""),s(""),u(""))}}),ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx(zE,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),ee.jsxs("select",{value:l,onChange:e=>u(e.target.value),className:"flex-1 text-sm bg-muted border border-border rounded px-3 py-1.5 text-foreground outline-none focus:border-border transition-colors",children:[ee.jsx("option",{value:"",children:"无继承"}),e.map(e=>ee.jsx("option",{value:e.id,children:e.label},e.id))]})]}),ee.jsxs("div",{className:"flex items-center justify-between",children:[ee.jsx("span",{className:"text-xs text-muted-foreground",children:"⌘↩ 保存 · Esc 取消"}),ee.jsxs("div",{className:"flex gap-2",children:[ee.jsx("button",{onClick:()=>{r(!1),a(""),s("")},className:"text-sm px-3 py-1 rounded bg-secondary hover:bg-accent text-foreground transition-colors",children:"取消"}),ee.jsx("button",{onClick:()=>{k()},disabled:!i.trim(),className:uk("text-sm px-3 py-1 rounded transition-colors text-white",i.trim()?"bg-blue-600 hover:bg-blue-500":"bg-secondary opacity-40 cursor-not-allowed"),children:"保存"})]})]})]}),0!==e.length||n?ee.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:e.map(n=>c===n.id?ee.jsxs("div",{className:"rounded-lg border border-border bg-background p-3 space-y-2",children:[ee.jsx("input",{ref:b,value:f,onChange:e=>p(e.target.value),placeholder:"名称(可选)",className:"w-full text-sm bg-muted border border-border rounded px-2.5 py-1 text-foreground placeholder:text-muted-foreground outline-none focus:border-border transition-colors"}),ee.jsx("textarea",{value:h,onChange:e=>m(e.target.value),rows:3,className:"w-full text-sm bg-muted border border-border rounded px-2.5 py-1 text-foreground font-mono outline-none focus:border-border transition-colors resize-none",onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),S()),"Escape"===e.key&&d(null)}}),ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx(zE,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),ee.jsxs("select",{value:g,onChange:e=>v(e.target.value),className:"flex-1 text-sm bg-muted border border-border rounded px-2.5 py-1 text-foreground outline-none focus:border-border transition-colors",children:[ee.jsx("option",{value:"",children:"无继承"}),e.filter(e=>e.id!==n.id).map(e=>ee.jsx("option",{value:e.id,children:e.label},e.id))]})]}),ee.jsxs("div",{className:"flex gap-2 justify-end",children:[ee.jsx("button",{onClick:()=>d(null),className:"text-xs px-2.5 py-1 rounded bg-secondary hover:bg-accent text-foreground transition-colors",children:"取消"}),ee.jsx("button",{onClick:()=>{S()},disabled:!h.trim(),className:uk("text-xs px-2.5 py-1 rounded transition-colors text-white",h.trim()?"bg-blue-600 hover:bg-blue-500":"bg-secondary opacity-40 cursor-not-allowed"),children:"保存"})]})]},n.id):ee.jsxs("div",{className:"group relative rounded-lg border border-border bg-background hover:border-muted-foreground/30 transition-colors p-3",children:[ee.jsx("div",{className:"text-sm font-medium text-foreground truncate pr-14",children:n.label}),n.parentId&&(()=>{const t=e.find(e=>e.id===n.parentId);return t?ee.jsxs("div",{className:"flex items-center gap-1 mt-1",children:[ee.jsx(zE,{className:"h-3 w-3 text-muted-foreground"}),ee.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["继承: ",t.label]})]}):null})(),!n.parentId&&n.label!==n.command&&ee.jsx("div",{className:"text-xs text-muted-foreground font-mono truncate mt-1 pr-14",children:n.command}),ee.jsxs("div",{className:"absolute top-2.5 right-2.5 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[ee.jsx("button",{onClick:()=>w({label:n.label,content:n.command}),className:"p-1 rounded text-muted-foreground hover:text-green-400 transition-colors",title:"共享到 ccweb-hub",children:ee.jsx(nj,{className:"h-3.5 w-3.5"})}),ee.jsx("button",{onClick:()=>{d(n.id),p(n.label),m(n.command),v(n.parentId||""),r(!1)},className:"p-1 rounded text-muted-foreground hover:text-blue-400 transition-colors",title:"编辑",children:ee.jsx(QE,{className:"h-3.5 w-3.5"})}),ee.jsx("button",{onClick:()=>{(async e=>{try{await vS(e),t(t=>t.filter(t=>t.id!==e)),c===e&&d(null)}catch(xT){console.error("[GlobalShortcuts] Failed to delete:",xT)}})(n.id)},className:"p-1 rounded text-muted-foreground hover:text-red-400 transition-colors",title:"删除",children:ee.jsx(cj,{className:"h-3.5 w-3.5"})})]})]},n.id))}):ee.jsxs("div",{className:"flex flex-col items-center gap-2 py-10 text-muted-foreground/50 border border-dashed border-border rounded-lg",children:[ee.jsx(dj,{className:"h-6 w-6"}),ee.jsx("p",{className:"text-sm",children:"还没有全局快捷 Prompts"})]}),ee.jsx(AN,{open:!!x,onOpenChange:e=>{e||w(null)},kind:"quick-prompt",label:(null==x?void 0:x.label)??"",content:(null==x?void 0:x.content)??""})]})}const IN=W.createContext({theme:"system",resolved:"dark",setTheme:()=>{}});function zN(){return W.useSyncExternalStore(e=>{const t=window.matchMedia("(prefers-color-scheme: dark)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},()=>window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")}function FN({children:e}){const[t,n]=W.useState(()=>Uk(Bk.theme,"system")),r=zN(),o="system"===t?r:t;W.useEffect(()=>{const e=document.documentElement;e.classList.remove("light","dark"),e.classList.add(o)},[o]);return ee.jsx(IN.Provider,{value:{theme:t,resolved:o,setTheme:e=>{n(e),Wk(Bk.theme,e)}},children:e})}function VN(){return W.useContext(IN)}function $N(){const{theme:e,setTheme:t}=VN(),n=[{value:"light",icon:aj,label:"浅色"},{value:"dark",icon:XE,label:"深色"},{value:"system",icon:KE,label:"系统"}];return ee.jsx("div",{className:"flex items-center rounded-md border border-border bg-muted/50 p-0.5",children:n.map(({value:n,icon:r,label:o})=>ee.jsx("button",{onClick:()=>t(n),className:uk("p-1 rounded-sm transition-colors",e===n?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),title:o,children:ee.jsx(r,{className:"h-3.5 w-3.5"})},n))})}const BN={workMinutes:30,breakMinutes:5};function UN(){return Uk(Bk.pomodoroConfig,BN,!0)}const WN=$k(e=>({running:!1,phase:"work",secondsLeft:60*UN().workMinutes,setRunning:t=>e({running:t}),setPhase:t=>e({phase:t}),setSecondsLeft:t=>e({secondsLeft:t})}));function HN(){const{running:e,phase:t,secondsLeft:n,setPhase:r,setSecondsLeft:o}=WN(),a=W.useCallback(e=>{const t=UN();var n;r(e),o("work"===e?60*t.workMinutes:60*t.breakMinutes),n="break"===e?"休息一下 ☕":"该工作了 💻",eN.info(`番茄钟: ${n}`)},[r,o]);return W.useEffect(()=>{if(!e)return;if(0===n)return void a("work"===t?"break":"work");const r=setTimeout(()=>o(n-1),1e3);return()=>clearTimeout(r)},[e,n,t,a,o]),null}function GN(){const{running:e,phase:t,secondsLeft:n}=WN(),r=Math.floor(n/60),o=n%60,a=`${String(r).padStart(2,"0")}:${String(o).padStart(2,"0")}`;return e?ld.createPortal(ee.jsxs("div",{className:"fixed inset-0 flex flex-col items-center justify-center pointer-events-none z-40 select-none",style:{opacity:"work"===t?.1:.6},children:[ee.jsx("div",{className:uk("font-mono font-bold tabular-nums leading-none","work"===t?"text-foreground":"text-blue-400 dark:text-blue-300"),style:{fontSize:"clamp(360px, 90vw, 1100px)"},children:a}),ee.jsx("div",{className:"mt-3 text-muted-foreground font-medium tracking-widest uppercase",style:{fontSize:"clamp(12px, 1.5vw, 20px)"},children:"work"===t?"专注工作":"休息一下"})]}),document.body):null}function YN(){const{running:e,phase:t,secondsLeft:n,setRunning:r,setPhase:o,setSecondsLeft:a}=WN(),i=Math.floor(n/60),s=n%60,l=`${String(i).padStart(2,"0")}:${String(s).padStart(2,"0")}`;return ee.jsx("button",{onClick:()=>{if(e){const e=UN();o("work"),a(60*e.workMinutes)}else{const e=UN();o("work"),a(60*e.workMinutes)}r(!e)},className:uk("p-1 rounded transition-colors",e?"work"===t?"text-red-500 bg-red-500/10 hover:bg-red-500/20":"text-green-500 bg-green-500/10 hover:bg-green-500/20":"text-muted-foreground hover:text-foreground hover:bg-muted"),title:e?"work"===t?`工作中 ${l} — 点击停止`:`休息中 ${l} — 点击停止`:"启动番茄钟",children:ee.jsx(sj,{className:"h-4 w-4"})})}const qN="v2026.4.20-c",KN=!!window.electronUpdater;function XN(){const[e,t]=W.useState("idle"),[n,r]=W.useState(!1),[o,a]=W.useState(""),[i,s]=W.useState(0),[l,u]=W.useState(null),[c,d]=W.useState(null);W.useEffect(()=>{if(!window.electronUpdater)return;return window.electronUpdater.onUpdateStatus(e=>{switch(e.type){case"progress":{const t=e.info;s(Math.round((null==t?void 0:t.percent)??0));break}case"downloaded":t("downloaded");break;case"error":u(e.info||"Download failed"),t("error")}})},[]);const f=W.useCallback(async()=>{t("checking"),u(null),r(!0);try{if(KN){const e=await window.electronUpdater.checkForUpdate();if(e.error)throw new Error(e.error);if(!e.available)return void t("no_update");a(e.version?`v${e.version}`:"new version")}else{const e=await YS();if(!e.updateAvailable)return void t("no_update");a(`v${e.latest}`)}t("update_available")}catch(xT){u(xT instanceof Error?xT.message:"Check failed"),t("error")}},[]),p=W.useCallback(()=>{const e=3e3,n=Date.now(),r=()=>{if(Date.now()-n>3e5)return u("更新超时(5 分钟)— 请检查服务器状态"),void t("update_failed");KS().then(n=>{n?n.success?(a(n.newVersion?`v${n.newVersion}`:"new version"),t("update_complete")):(u(n.error||"Update failed"),t("update_failed")):setTimeout(r,e)}).catch(()=>{setTimeout(r,e)})};setTimeout(r,e)},[]),h=()=>{r(!1),setTimeout(()=>{t("idle"),a(""),u(null),s(0),d(null)},200)};return ee.jsxs(ee.Fragment,{children:[ee.jsx(Rk,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>{f()},disabled:"checking"===e||"downloading"===e||"executing"===e||"reconnecting"===e,title:"检查更新",children:"checking"===e||"downloading"===e||"executing"===e||"reconnecting"===e?ee.jsx(WE,{className:"h-4 w-4 animate-spin"}):ee.jsx(RE,{className:"h-4 w-4"})}),ee.jsx(_P,{open:n,onOpenChange:e=>{e||h()},children:ee.jsxs(IP,{className:"sm:max-w-md",children:[ee.jsxs(zP,{children:[ee.jsxs(VP,{children:["checking"===e&&"Checking for updates...","no_update"===e&&"Up to date","update_available"===e&&`Update ${o} available`,"downloading"===e&&"Downloading update...","downloaded"===e&&"Update ready to install","executing"===e&&"Updating server...","reconnecting"===e&&"Waiting for server restart...","update_complete"===e&&`Updated to ${o}`,"update_failed"===e&&"Update failed","error"===e&&"Update error"]}),ee.jsxs($P,{children:["checking"===e&&"Checking for the latest version...","no_update"===e&&`Current version ${qN} is the latest.`,"update_available"===e&&"A new version is available. "+(KN?"Click download to update automatically.":""),"downloading"===e&&`Downloading... ${i}%`,"downloaded"===e&&"The update has been downloaded. Click install to restart and apply.","executing"===e&&"Server is shutting down and installing the update. Please wait...","reconnecting"===e&&"Update installed. Waiting for server to restart...","update_complete"===e&&`Successfully updated from ${qN} to ${o}. Click reload to use the new version.`,"update_failed"===e&&(l||"Update failed. You may need to restart the server manually."),"error"===e&&(l||"An error occurred.")]})]}),"downloading"===e&&ee.jsx("div",{className:"w-full bg-muted rounded-full h-2 overflow-hidden",children:ee.jsx("div",{className:"bg-primary h-full transition-all duration-300",style:{width:`${i}%`}})}),("executing"===e||"reconnecting"===e)&&ee.jsx("div",{className:"flex items-center justify-center py-6",children:ee.jsx(WE,{className:"h-8 w-8 animate-spin text-muted-foreground"})}),ee.jsxs(FP,{children:["no_update"===e&&ee.jsx(Rk,{onClick:h,children:"OK"}),"update_available"===e&&ee.jsxs(ee.Fragment,{children:[ee.jsx(Rk,{variant:"outline",onClick:h,children:"Later"}),ee.jsx(Rk,{onClick:()=>{(async()=>{if(KN){t("downloading"),s(0);const e=await window.electronUpdater.downloadUpdate();e.success?e.path&&d(e.path):(u(e.error||"Download failed"),t("error"))}else{t("executing");try{await qS(),t("reconnecting"),p()}catch(xT){u(xT instanceof Error?xT.message:"Execute failed"),t("error")}}})()},children:KN?"Download & Install":`Update to ${o}`})]}),"downloaded"===e&&ee.jsxs(ee.Fragment,{children:[ee.jsx(Rk,{variant:"outline",onClick:h,children:"Later"}),ee.jsx(Rk,{onClick:()=>{var e;null==(e=window.electronUpdater)||e.quitAndInstall(c||void 0)},children:"Restart & Install"})]}),"update_complete"===e&&ee.jsx(Rk,{onClick:()=>window.location.reload(),children:"Reload Page"}),"update_failed"===e&&ee.jsx(Rk,{onClick:h,children:"Close"}),"error"===e&&ee.jsx(Rk,{onClick:h,children:"Close"})]})]})})]})}function QN(e){return e.map(e=>"text"===e.type?e.content:`\n\`\`\`${e.type}\n${e.content}\n\`\`\`\n`).join("")}function ZN(e,t){return{id:e.id??t(),role:e.role,content:QN(e.blocks),blocks:e.blocks,ts:e.timestamp}}function JN({project:e,liveMessages:t,ws:n,historyLimit:r=20,liveWindow:o=50,historyEnabled:a=!0}){const i=e.id,[s,l]=W.useState("running"===e.status?"live":"stopped"),{history:u,hasMore:c,reload:d,loadMore:f}=function({projectId:e,historyLimit:t=20,enabled:n=!0}){const[r,o]=W.useState([]),[a,i]=W.useState(!1),[s,l]=W.useState(!1),u=W.useRef(0),c=W.useCallback(()=>"h"+ ++u.current,[]),d=W.useRef({projectId:e,enabled:n});d.current={projectId:e,enabled:n};const f=W.useCallback(async()=>{if(!d.current.enabled)return;const e=d.current.projectId;l(!0);try{const n=await oE(e,{limit:t});if(d.current.projectId!==e)return;const r=[];for(const e of n.blocks){const t=ZN(e,c);t.content.trim()&&r.push(t)}o(r),i(n.hasMore)}catch{}finally{l(!1)}},[t,c]),p=W.useCallback(async()=>{if(!a||s||0===r.length)return;if(!d.current.enabled)return;const e=d.current.projectId,n=r[0];if(n.id&&!n.id.startsWith("h")){l(!0);try{const r=await oE(e,{limit:t,before:n.id});if(d.current.projectId!==e)return;const a=[];for(const e of r.blocks){const t=ZN(e,c);t.content.trim()&&a.push(t)}o(e=>[...a,...e]),i(r.hasMore)}catch{}finally{l(!1)}}},[t,a,s,r,c]);return W.useEffect(()=>{n&&f()},[e,n]),{history:r,hasMore:a,isLoading:s,reload:f,loadMore:p}}({projectId:i,historyLimit:r,enabled:a}),[p,h]=W.useState([]),m=W.useRef(0),g=W.useCallback(()=>"m"+ ++m.current,[]),v=W.useRef(null),y=W.useCallback(()=>{v.current&&(clearTimeout(v.current.timer),v.current=null)},[]),b=W.useRef([]),x=W.useRef(!1),w=W.useRef(0);W.useEffect(()=>{if(t.length<w.current&&(w.current=0,b.current=[]),t.length<=w.current)return;const e=t.slice(w.current);w.current=t.length;for(const t of e){x.current=!0;const e=QN(t.blocks);if(e.trim()){if("user"===t.role){const t=b.current.indexOf(e.trim());if(-1!==t){b.current.splice(t,1),y();continue}}h(n=>{if(t.id&&n.some(e=>e.id===t.id))return n;const r={id:t.id??g(),role:t.role,content:e,blocks:t.blocks,ts:t.timestamp};return[...n,r].slice(-o)})}}},[t,g,o,y]),W.useEffect(()=>{if("live"!==s)return void(x.current=!1);const e=setTimeout(()=>{x.current||d()},3e3);return()=>clearTimeout(e)},[s,d]),W.useEffect(()=>{"running"!==e.status||"stopped"!==s&&"error"!==s?"stopped"===e.status&&"live"===s&&l("stopped"):(h([]),l("live"))},[e.status]);const k=W.useRef([]),S=W.useRef(null),E=W.useRef(0),j=W.useCallback(()=>{if(v.current)return;const e=t=>{const r=setTimeout(()=>{if(0!==b.current.length){if(t>=20)return b.current=[],void(v.current=null);n.send("\r"),e(t+1)}else v.current=null},3e3);v.current={timer:r,attempts:t}};e(0)},[n]);W.useEffect(()=>{if(!n.connected)return;if("live"!==s)return;if(0===k.current.length)return;const e=[...k.current];k.current=[];for(const t of e)n.send(t.replace(/\n/g,"\r")+"\r");j()},[n.connected,s,n,j]),W.useEffect(()=>()=>{S.current&&clearTimeout(S.current),y()},[y]);const C=W.useCallback(e=>{k.current.length>=20&&k.current.shift(),k.current.push(e)},[]),P=W.useCallback(e=>{const t=e.trimStart().startsWith("/");if(t||(b.current.push(e),b.current.length>10&&b.current.shift()),h(t=>[...t,{id:g(),role:"user",content:e,ts:(new Date).toISOString()}].slice(-o)),"live"===s)!n.connected||k.current.length>0?C(e):(n.send(e.replace(/\n/g,"\r")+"\r"),t||j());else if("waking"===s)C(e);else if("stopped"===s||"error"===s){C(e);const t=++E.current;l("waking"),dS(i).then(()=>{t===E.current&&(S.current&&clearTimeout(S.current),l("live"))}).catch(e=>{t===E.current&&(eN.error(`启动失败: ${e instanceof Error?e.message:String(e)}`),l("error"),k.current=[])}),S.current=setTimeout(()=>{t===E.current&&k.current.length>0&&(eN.error("启动超时(10s)"),l("error"),k.current=[])},1e4)}},[s,n,i,g,o,j,C]),N=W.useCallback(e=>{const t=e.replace(/\r$/,"").trim();t&&(b.current.push(t),b.current.length>10&&b.current.shift(),h(e=>[...e,{id:g(),role:"user",content:t,ts:(new Date).toISOString()}].slice(-o)))},[g,o]),T=W.useMemo(()=>{const e=new Set;for(const t of p)t.id&&e.add(t.id);return[...u.filter(t=>!t.id||!e.has(t.id)),...p]},[u,p]);return{state:s,setState:l,messages:T,historyMessages:u,displayMessages:p,setDisplayMessages:h,hasMoreHistory:c,loadMoreHistory:f,reloadHistory:d,liveReceivedRef:x,sendMessage:P,appendUserMessage:N,clearSendRetry:y,isWaking:"waking"===s,isRunning:"live"===s}}function eT(e,t,n){const r=W.useRef(!0),o=W.useRef(0),a=W.useCallback(()=>{const t=e.current;t&&(t.scrollHeight<=t.clientHeight||(o.current=performance.now(),t.scrollTop=t.scrollHeight))},[e]);return W.useEffect(()=>{const t=e.current;t&&(t.style.overflowAnchor="none")},[e]),W.useEffect(()=>{const t=e.current;if(!t)return;const n=()=>{if(performance.now()-o.current<80)return;const e=t.scrollHeight-t.scrollTop-t.clientHeight<80;r.current=e};return t.addEventListener("scroll",n,{passive:!0}),()=>t.removeEventListener("scroll",n)},[e]),W.useLayoutEffect(()=>{r.current&&a()},[a,...n]),W.useEffect(()=>{const e=t.current;if(!e)return;const n=new ResizeObserver(()=>{r.current&&a()});return n.observe(e),()=>n.disconnect()},[t,a]),{pinnedRef:r,scrollToBottom:a}}function tT(e,t="shift"){return W.useCallback(n=>{if("Enter"!==n.key)return;if(n.nativeEvent.isComposing||229===n.keyCode)return;("shift"===t?!n.shiftKey:n.shiftKey)&&(n.preventDefault(),e())},[e,t])}const nT=H.memo(function({project:e,externalStatus:t,active:n=!1}){const r=cf(),[o,a]=W.useState(""),[i,s]=W.useState(!1),l=W.useRef(null),u=W.useRef(null),[c,d]=W.useState([]),f=W.useRef(0),p=W.useCallback(e=>{d(t=>{const n=[...t,e];return n.length>200?n.slice(-200):n}),"assistant"===e.role&&(s(!0),setTimeout(()=>s(!1),1e3))},[]),h=W.useCallback(e=>{var t;"stopped"===e&&(null==(t=S.current)||t.call(S,"stopped"))},[]),{sendInput:m,connected:g}=jN({projectId:e.id,enabled:!0,onChatMessage:p,onStatusChange:h}),{state:v,setState:y,messages:b,sendMessage:x,isRunning:w,isWaking:k}=JN({project:e,liveMessages:c,ws:{send:m,connected:g},historyLimit:4,liveWindow:4}),S=W.useRef(y);S.current=y,W.useEffect(()=>{"stopped"===v&&(d([]),f.current=0)},[v]),W.useEffect(()=>{t&&("running"!==t||"stopped"!==v&&"error"!==v?"stopped"===t&&"live"===v&&y("stopped"):(d([]),y("live")))},[t]),eT(l,u,[b]);const E=tT(W.useCallback(()=>{const e=o.trim();e&&(a(""),x(e))},[o,x]),"enter"),j="stopped"===v,C=b.slice(-4),P=ee.jsxs("div",{className:uk("flex flex-col h-full rounded-lg overflow-hidden bg-background transition-colors duration-300",n?"border-transparent bg-transparent shadow-none":i?"border border-blue-500":"border border-border","error"===v&&"border border-red-500/50"),children:[ee.jsxs("div",{className:"flex items-center gap-1 px-1.5 py-1.5 border-b border-border bg-muted/30 transition-colors",children:[ee.jsx(VE,{className:"h-3.5 w-3.5 text-muted-foreground/40 flex-shrink-0 cursor-grab active:cursor-grabbing"}),ee.jsx("span",{className:"font-medium text-sm truncate flex-1 cursor-pointer hover:text-blue-400 transition-colors",onClick:()=>r(`/projects/${e.id}`),title:"打开项目详情",children:e.name}),ee.jsx("span",{className:"text-[10px] text-muted-foreground font-mono",children:e.cliTool??"claude"}),ee.jsx("span",{className:uk("w-2 h-2 rounded-full flex-shrink-0",w?"bg-green-500":k?"bg-yellow-400 animate-pulse":"bg-zinc-400")})]}),ee.jsx("div",{ref:l,className:"flex-1 overflow-y-auto min-h-0 text-xs",children:ee.jsxs("div",{ref:u,className:"p-2 space-y-2 min-h-full",children:[C.map(e=>{const t="user"===e.role;return ee.jsx("div",{className:uk("flex",t?"justify-end":"justify-start"),children:ee.jsx("div",{className:uk("max-w-[85%] rounded-lg px-2.5 py-1.5 whitespace-pre-wrap break-words leading-relaxed",t?"bg-blue-500/15 text-foreground border border-blue-500/20 rounded-br-sm dark:bg-blue-500/20 dark:border-blue-500/25":"bg-secondary text-secondary-foreground border border-border rounded-bl-sm"),children:ee.jsx("div",{className:"line-clamp-6",children:e.content})})},e.id)}),j&&0===C.length&&ee.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground/40 text-xs",children:"无对话记录"}),k&&ee.jsx("div",{className:"flex items-center justify-center h-full text-yellow-400 text-xs animate-pulse",children:"启动中..."})]})}),ee.jsx("div",{className:"border-t border-border p-1.5",children:ee.jsx("input",{type:"text",value:o,onChange:e=>a(e.target.value),onKeyDown:E,disabled:k,placeholder:k?"启动中...":j?"输入命令(自动启动)... Shift+⏎":"输入命令... Shift+⏎",className:uk("w-full bg-transparent text-xs font-mono outline-none placeholder:text-muted-foreground/40 px-1.5 py-1",k&&"opacity-50 cursor-not-allowed")})})]});return n?ee.jsx("div",{className:"card-active-glow rounded-lg h-full",children:P}):P});function rT({projects:e,projectStatuses:t,activeProjectIds:n}){const r=W.useMemo(()=>e.filter(e=>!e.archived),[e]),{order:o,setOrder:a,applyOrder:i}=TN(),[s,l]=W.useState(null),[u,c]=W.useState(null),d=W.useRef(null),f=W.useMemo(()=>i(r),[r,i]),p=W.useCallback((e,t)=>{l(t),e.dataTransfer.effectAllowed="move";const n=document.createElement("div");n.style.width="1px",n.style.height="1px",n.style.opacity="0.01",document.body.appendChild(n),e.dataTransfer.setDragImage(n,0,0),d.current=n},[]),h=W.useCallback((e,t)=>{e.preventDefault(),e.dataTransfer.dropEffect="move",c(t)},[]),m=W.useCallback((e,t)=>{if(e.preventDefault(),!s||s===t)return l(null),void c(null);const n=f.map(e=>e.id),r=o.length?[...o]:n;for(const o of n)r.includes(o)||r.push(o);const i=r.indexOf(s),u=r.indexOf(t);if(-1===i||-1===u)return l(null),void c(null);r.splice(i,1),r.splice(u,0,s),a(r),l(null),c(null)},[s,f,o,a]),g=W.useCallback(()=>{l(null),c(null),d.current&&(d.current.remove(),d.current=null)},[]),{cols:v,rows:y}=(b=f.length)<=1?{cols:1,rows:1}:b<=2?{cols:2,rows:1}:b<=4?{cols:2,rows:2}:b<=6?{cols:3,rows:2}:b<=9?{cols:3,rows:3}:b<=12?{cols:4,rows:3}:{cols:4,rows:Math.ceil(b/4)};var b;if(0===f.length)return ee.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground/50 text-sm",children:"没有活跃项目"});const x=y<=3;return ee.jsx("div",{className:"h-full w-full p-2 gap-2 overflow-y-auto",style:{display:"grid",gridTemplateColumns:`repeat(${v}, minmax(0, 1fr))`,gridAutoRows:x?`minmax(180px, min(${Math.floor(100/y)}vh, 350px))`:"280px"},children:f.map(e=>ee.jsx("div",{draggable:!0,onDragStart:t=>p(t,e.id),onDragOver:t=>h(t,e.id),onDrop:t=>m(t,e.id),onDragEnd:g,className:uk("transition-all duration-200",s===e.id&&"opacity-40 scale-95",u===e.id&&s!==e.id&&"ring-2 ring-blue-500/50 rounded-lg"),children:ee.jsx(nT,{project:e,externalStatus:t.get(e.id),active:n.has(e.id)})},e.id))})}function oT(){const e=cf(),{projects:t,loading:n,error:r,hasFetched:o,fetchProjects:a,addProject:i,updateProject:s,removeProject:l}=Kk(),u=Yk(e=>e.clearToken),[c,d]=W.useState(!1),[f,p]=W.useState(!1),[h,m]=W.useState(new Set),g=W.useRef(new Map),[v,y]=W.useState(new Map),b=W.useRef(0),[x,w]=W.useState(!!document.fullscreenElement),[k,S]=W.useState(!1),[E,j]=Gk(Bk.monitorMode,!1,{parse:!0}),[C,P]=W.useState(new Map);W.useEffect(()=>{const e=()=>w(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[]),W.useEffect(()=>{a()},[a]);EN({onActivityUpdate:W.useCallback(e=>{if(e.status){const t=Kk.getState().projects.find(t=>t.id===e.projectId);t&&t.status!==e.status&&s({...t,status:e.status}),P(t=>{const n=new Map(t);return n.set(e.projectId,e.status),n})}const t=Date.now(),n=g.current;if(e.active){m(t=>t.has(e.projectId)?t:new Set(t).add(e.projectId));const r=n.get(e.projectId)??[];let o=!1;if(e.semantic){const n=r[r.length-1];`${e.semantic.phase}:${e.semantic.detail??""}`!==(n?`${n.phase}:${n.detail??""}`:"")?(r.push({id:b.current++,phase:e.semantic.phase,detail:e.semantic.detail,ts:t}),o=!0):n&&(n.ts=t)}const a=r.filter(e=>t-e.ts<8e3),i=a.length>3?a.slice(-3):a;i.length!==r.length&&(o=!0),n.set(e.projectId,i),o&&y(new Map(n))}else m(t=>{if(!t.has(e.projectId))return t;const n=new Set(t);return n.delete(e.projectId),n}),n.has(e.projectId)&&n.get(e.projectId).length>0&&(n.set(e.projectId,[]),y(new Map(n)))},[s])}),W.useEffect(()=>{const e=setInterval(()=>{const e=Date.now(),t=g.current;let n=!1;for(const[r,o]of t){const a=o.filter(t=>e-t.ts<8e3);a.length!==o.length&&(t.set(r,a),n=!0)}n&&y(new Map(t)),m(e=>{let n=!1;const r=new Set(e);for(const o of e){const e=t.get(o);e&&0!==e.length||(r.delete(o),n=!0)}return n?r:e})},3e3);return()=>clearInterval(e)},[]);const N=W.useMemo(()=>t.filter(e=>!e.archived),[t]),T=W.useMemo(()=>t.filter(e=>e.archived),[t]),M=W.useMemo(()=>Array.from(new Set(t.flatMap(e=>e.tags??[]))),[t]),[R,L]=W.useState([]),D=W.useMemo(()=>0===R.length?N:N.filter(e=>R.some(t=>{var n;return null==(n=e.tags)?void 0:n.includes(t)})),[N,R]),[_,A]=W.useState(!1),O=W.useCallback(async()=>{if(!_){A(!0);try{const e=await wE(),t=e.results.filter(e=>e.ok).length,n=e.results.filter(e=>e.skipped).length,r=e.total-t-n;eN.success(`同步完成:${t} 成功 / ${n} 跳过 / ${r} 失败`)}catch(xT){eN.error(`同步失败:${xT.message}`)}finally{A(!1)}}},[_]),{order:I,setOrder:z,applyOrder:F}=TN(),[V,$]=W.useState(null),[B,U]=W.useState(null),H=W.useMemo(()=>F(D),[D,F]),G=W.useCallback(e=>$(e),[]),Y=W.useCallback(()=>{$(null),U(null)},[]),q=W.useCallback((e,t)=>{e.preventDefault(),U(t)},[]),K=W.useCallback((e,t,n)=>{if(e.preventDefault(),!n||n===t)return void U(null);const r=H.map(e=>e.id),o=I.length?[...I]:r;for(const s of r)o.includes(s)||o.push(s);const a=o.indexOf(n),i=o.indexOf(t);if(-1===a||-1===i)return $(null),void U(null);o.splice(a,1),o.splice(i,0,n),z(o),$(null),U(null)},[H,I,z]),X={onDelete:e=>{(async e=>{try{await cS(e),l(e)}catch(xT){eN.error(xT instanceof Error?xT.message:"Failed to delete project")}})(e)},onArchive:e=>{(async e=>{try{const t=await fS(e);s(t)}catch(xT){eN.error(xT instanceof Error?xT.message:"Failed to archive project")}})(e)},onUnarchive:e=>{(async e=>{try{const t=await pS(e);s(t)}catch(xT){eN.error(xT instanceof Error?xT.message:"Failed to restore project")}})(e)},onUpdated:s};return ee.jsxs("div",{className:"min-h-screen bg-background",children:[ee.jsx("header",{className:"border-b sticky top-0 bg-background z-10",children:ee.jsxs("div",{className:"max-w-6xl mx-auto px-4 h-14 flex items-center justify-between",children:[ee.jsxs("div",{className:"flex items-center gap-2",children:[ee.jsx(ij,{className:"h-5 w-5"}),ee.jsxs("div",{children:[ee.jsx("span",{className:"font-semibold text-lg leading-tight block",children:"CC Web"}),ee.jsx("span",{className:"text-[10px] text-muted-foreground leading-none",children:qN})]})]}),ee.jsx(_N,{}),ee.jsx(Rk,{variant:"ghost",size:"sm",onClick:()=>e("/skillhub"),title:"CCWeb Hub",children:ee.jsx(oj,{className:"h-4 w-4"})}),ee.jsx(Rk,{variant:"ghost",size:"sm",onClick:()=>e("/mobile"),title:"手机界面",children:ee.jsx(rj,{className:"h-4 w-4"})}),ee.jsx(Rk,{variant:"ghost",size:"sm",onClick:()=>e("/settings"),title:"设置",children:ee.jsx(tj,{className:"h-4 w-4"})}),ee.jsx(Rk,{variant:"ghost",size:"sm",onClick:()=>j(!E),title:E?"卡片模式":"监控大屏",className:uk(E&&"text-blue-400 bg-blue-500/10"),children:E?ee.jsx(UE,{className:"h-4 w-4"}):ee.jsx(KE,{className:"h-4 w-4"})}),ee.jsx(Rk,{variant:"ghost",size:"sm",onClick:()=>{document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()},title:x?"Exit fullscreen":"Fullscreen",children:x?ee.jsx(YE,{className:"h-4 w-4"}):ee.jsx(GE,{className:"h-4 w-4"})}),ee.jsx(XN,{}),ee.jsx(YN,{}),ee.jsx($N,{}),ee.jsxs(Rk,{variant:"ghost",size:"sm",onClick:()=>{u(),e("/login")},children:[ee.jsx(HE,{className:"h-4 w-4 mr-2"}),"Logout"]})]})}),E&&ee.jsx("div",{className:"flex-1 min-h-0",children:ee.jsx(rT,{projects:t,projectStatuses:C,activeProjectIds:h})}),!E&&ee.jsxs("main",{className:"max-w-6xl mx-auto px-4 py-8",children:[ee.jsxs("div",{className:"flex items-center justify-between mb-6",children:[ee.jsxs("div",{children:[ee.jsx("h1",{className:"text-2xl font-bold",children:"Projects"}),ee.jsx("p",{className:"text-muted-foreground text-sm mt-1",children:"Each project runs Claude CLI in a dedicated terminal session."})]}),ee.jsxs("div",{className:"flex gap-2",children:[ee.jsxs(Rk,{variant:"outline",onClick:()=>{O()},disabled:_,title:"通过 rsync 同步所有项目(在设置里配置服务器)",children:[_?ee.jsx(WE,{className:"h-4 w-4 mr-2 animate-spin"}):ee.jsx(OE,{className:"h-4 w-4 mr-2"}),"全部同步"]}),ee.jsxs(Rk,{variant:"outline",onClick:()=>p(!0),children:[ee.jsx(_E,{className:"h-4 w-4 mr-2"}),"Open Project"]}),ee.jsxs(Rk,{onClick:()=>d(!0),children:[ee.jsx(ZE,{className:"h-4 w-4 mr-2"}),"New Project"]})]})]}),n&&!o&&ee.jsx("div",{className:"text-center text-muted-foreground py-12",children:"Loading projects..."}),r&&ee.jsx("div",{className:"text-center text-destructive py-12",children:r}),o&&!n&&!r&&0===t.length&&ee.jsxs("div",{className:"text-center py-20",children:[ee.jsx(ij,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),ee.jsx("h2",{className:"text-lg font-semibold mb-2",children:"No projects yet"}),ee.jsx("p",{className:"text-muted-foreground text-sm mb-6",children:"Create a new project or open an existing one."}),ee.jsxs("div",{className:"flex gap-2 justify-center",children:[ee.jsxs(Rk,{variant:"outline",onClick:()=>p(!0),children:[ee.jsx(_E,{className:"h-4 w-4 mr-2"}),"Open Project"]}),ee.jsxs(Rk,{onClick:()=>d(!0),children:[ee.jsx(ZE,{className:"h-4 w-4 mr-2"}),"New Project"]})]})]}),!n&&!r&&M.length>0&&ee.jsxs("div",{className:"flex flex-wrap gap-1.5 mb-4",children:[M.map(e=>ee.jsxs("button",{onClick:()=>L(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),className:uk("px-2 py-0.5 rounded-full text-xs border transition-colors",R.includes(e)?"bg-blue-500/20 text-blue-400 border-blue-500/40":"bg-muted text-muted-foreground border-border hover:border-muted-foreground/40"),children:["#",e]},e)),R.length>0&&ee.jsx("button",{onClick:()=>L([]),className:"px-2 py-0.5 rounded-full text-xs text-muted-foreground hover:text-foreground transition-colors",children:"清除"})]}),!n&&!r&&H.length>0&&ee.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:H.map((e,t)=>ee.jsx(hw.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.3,delay:Math.min(.05*t,.3),ease:"easeOut"},draggable:!0,onDragStart:()=>G(e.id),onDragOver:t=>q(t,e.id),onDrop:t=>K(t,e.id,V),onDragEnd:Y,style:{opacity:V===e.id?.4:1,cursor:"grab"},className:uk(B===e.id&&V!==e.id&&"ring-2 ring-blue-500/50 rounded-xl"),children:ee.jsx(mN,{project:e,active:h.has(e.id),statusStack:v.get(e.id)??[],...X})},e.id))}),!n&&!r&&T.length>0&&ee.jsxs("div",{className:"mt-10",children:[ee.jsxs("button",{className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors mb-4 group",onClick:()=>S(e=>!e),children:[ee.jsx(hw.span,{animate:{rotate:k?90:0},transition:{duration:.2},children:ee.jsx(ME,{className:"h-4 w-4"})}),ee.jsx("span",{className:"font-medium",children:"Archived"}),ee.jsx("span",{className:"text-xs bg-muted rounded-full px-2 py-0.5",children:T.length})]}),ee.jsx(Xb,{children:k&&ee.jsx(hw.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.25,ease:"easeInOut"},className:"overflow-hidden",children:ee.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:T.map(e=>ee.jsx(mN,{project:e,active:!1,...X},e.id))})})})]}),ee.jsx(ON,{})]}),ee.jsx(bN,{open:c,onOpenChange:d,onCreated:e=>{i(e)}}),ee.jsx(xN,{open:f,onOpenChange:p,onOpened:e=>{i(e)}})]})}class aT extends H.Component{constructor(){super(...arguments),t(this,"state",{hasError:!1,error:null}),t(this,"handleReset",()=>{var e,t;this.setState({hasError:!1,error:null}),null==(t=(e=this.props).onReset)||t.call(e)})}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error("[ErrorBoundary]",e,t.componentStack),eN.error(e.message||"Something went wrong")}render(){return this.state.hasError?this.props.fallback?this.props.fallback:ee.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3 p-4 text-sm text-muted-foreground",children:[ee.jsx("p",{children:"出错了"}),ee.jsx("button",{onClick:this.handleReset,className:"px-3 py-1.5 text-xs rounded-md border border-border hover:bg-muted transition-colors",children:"重新加载"})]}):this.props.children}}function iT({plugin:e,onConfigChange:t,onClose:n}){const{float:r,userConfig:o}=e,[a,i]=W.useState(()=>{var e,t;return{x:(null==(e=o.floatPosition)?void 0:e.x)??.5*window.innerWidth-r.defaultWidth/2,y:(null==(t=o.floatPosition)?void 0:t.y)??.3*window.innerHeight}}),[s,l]=W.useState(()=>{var e,t;return{w:(null==(e=o.floatSize)?void 0:e.w)??r.defaultWidth,h:(null==(t=o.floatSize)?void 0:t.h)??r.defaultHeight}}),[u,c]=W.useState(!1),[d,f]=W.useState(100),p=W.useRef(null),h=W.useRef(null),m=W.useCallback(()=>{f(Date.now()%1e5+100)},[]),g=W.useRef(null),v=W.useCallback(n=>{n.preventDefault(),m(),g.current={sx:n.clientX,sy:n.clientY,ox:a.x,oy:a.y},h.current&&(h.current.style.pointerEvents="none");const r=e=>{if(!g.current)return;const t=Math.max(0,Math.min(window.innerWidth-100,g.current.ox+e.clientX-g.current.sx)),n=Math.max(0,Math.min(window.innerHeight-40,g.current.oy+e.clientY-g.current.sy));p.current&&(p.current.style.left=t+"px",p.current.style.top=n+"px")},o=n=>{if(!g.current)return;const a=Math.max(0,Math.min(window.innerWidth-100,g.current.ox+n.clientX-g.current.sx)),s=Math.max(0,Math.min(window.innerHeight-40,g.current.oy+n.clientY-g.current.sy));g.current=null,h.current&&(h.current.style.pointerEvents=""),i({x:a,y:s}),t(e.id,{floatPosition:{x:a,y:s}}),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",o)};window.addEventListener("mousemove",r),window.addEventListener("mouseup",o)},[a,m,e.id,t]),y=W.useRef(null),b=W.useCallback(n=>{if(!r.resizable)return;n.preventDefault(),n.stopPropagation(),m(),y.current={sx:n.clientX,sy:n.clientY,ow:s.w,oh:s.h},h.current&&(h.current.style.pointerEvents="none");const o=r.minWidth??150,a=r.minHeight??100,i=e=>{if(!y.current)return;const t=Math.max(o,y.current.ow+e.clientX-y.current.sx),n=Math.max(a,y.current.oh+e.clientY-y.current.sy);p.current&&(p.current.style.width=t+"px",p.current.style.height=n+"px")},u=n=>{if(!y.current)return;const r=Math.max(o,y.current.ow+n.clientX-y.current.sx),s=Math.max(a,y.current.oh+n.clientY-y.current.sy);y.current=null,h.current&&(h.current.style.pointerEvents=""),l({w:r,h:s}),t(e.id,{floatSize:{w:r,h:s}}),window.removeEventListener("mousemove",i),window.removeEventListener("mouseup",u)};window.addEventListener("mousemove",i),window.addEventListener("mouseup",u)},[s,r,m,e.id,t]);W.useEffect(()=>{const t=async t=>{var n,r,o,a,i;if(t.source!==(null==(n=h.current)?void 0:n.contentWindow))return;const{callId:s,method:l,args:u}=t.data;if(s&&l)try{const t=Zk(),n={"Content-Type":"application/json","X-Plugin-Id":e.id};let a,i;if(t&&(n.Authorization=`Bearer ${t}`),"storage:get"===l)a=`/api/plugin-bridge/storage/${e.id}`,i={method:"GET",headers:n};else if("storage:set"===l)a=`/api/plugin-bridge/storage/${e.id}`,i={method:"PUT",headers:n,body:JSON.stringify(u)};else{const t={"project:status":{path:`/api/plugin-bridge/project/status/${u.projectId}`,httpMethod:"GET"},"project:list":{path:"/api/plugin-bridge/project/list",httpMethod:"GET"},"terminal:send":{path:"/api/plugin-bridge/terminal/send",httpMethod:"POST"},"session:read":{path:`/api/plugin-bridge/session/${u.projectId}`,httpMethod:"GET"},"system:info":{path:"/api/plugin-bridge/system/info",httpMethod:"GET"}};if("backend:api"===l){const{method:t,path:r,body:o}=u;if(!r||!r.startsWith("/")||r.includes(".."))throw new Error("Invalid API path");a=`/api/plugins/${e.id}${r}`,i={method:t||"GET",headers:n},!o||"POST"!==t&&"PUT"!==t||(i.body=JSON.stringify(o))}else{const e=t[l];if(!e)throw new Error(`Unknown method: ${l}`);a=e.path,i={method:e.httpMethod,headers:n},"POST"===e.httpMethod&&(i.body=JSON.stringify(u))}}const c=await fetch(a,i),d=await c.json();null==(o=null==(r=h.current)?void 0:r.contentWindow)||o.postMessage({callId:s,result:d,error:null},window.location.origin)}catch(xT){const t=xT instanceof Error?xT.message:"Bridge error";null==(i=null==(a=h.current)?void 0:a.contentWindow)||i.postMessage({callId:s,result:null,error:t},window.location.origin)}};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)},[e.id]);const x=o.clickable??r.clickable.default,w=`/plugins/${e.id}/${e.float?"index.html":""}`;return ee.jsxs(hw.div,{ref:p,className:uk("fixed rounded-lg border border-border shadow-xl overflow-hidden flex flex-col","bg-background/95 backdrop-blur-sm"),style:{left:a.x,top:a.y,width:u?200:s.w,height:u?32:s.h,zIndex:d},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},onMouseDown:m,children:[ee.jsxs("div",{className:"h-8 flex items-center gap-1 px-2 bg-muted/50 border-b border-border cursor-grab active:cursor-grabbing flex-shrink-0 select-none",onMouseDown:v,children:[ee.jsx(FE,{className:"h-3 w-3 text-muted-foreground/40 flex-shrink-0"}),ee.jsx("span",{className:"text-xs text-muted-foreground truncate flex-1",children:e.name}),ee.jsx("button",{onClick:()=>c(e=>!e),className:"p-0.5 rounded hover:bg-white/10 text-muted-foreground/60 hover:text-foreground transition-colors",children:ee.jsx(qE,{className:"h-3 w-3"})}),ee.jsx("button",{onClick:()=>n(e.id),className:"p-0.5 rounded hover:bg-red-500/20 text-muted-foreground/60 hover:text-red-400 transition-colors",children:ee.jsx(cj,{className:"h-3 w-3"})})]}),!u&&ee.jsxs("div",{className:"flex-1 min-h-0 relative",children:[ee.jsx("iframe",{ref:h,src:w,sandbox:"allow-scripts allow-same-origin",className:"w-full h-full border-0",style:{pointerEvents:x?"auto":"none"}}),r.resizable&&ee.jsx("div",{className:"absolute bottom-0 right-0 w-3 h-3 cursor-se-resize",onMouseDown:b,children:ee.jsxs("svg",{viewBox:"0 0 12 12",className:"w-3 h-3 text-muted-foreground/30",children:[ee.jsx("path",{d:"M11 1v10H1",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),ee.jsx("path",{d:"M11 5v6H5",fill:"none",stroke:"currentColor",strokeWidth:"1.5"})]})})]})]})}function sT({plugins:e,onPluginsChange:t,onClose:n}){const r=W.useCallback(async(e,n)=>{t(t=>t.map(t=>t.id===e?{...t,userConfig:{...t.userConfig,...n}}:t));try{await pE(e,n)}catch{}},[t]);return 0===e.length?null:ee.jsx(Xb,{children:e.map(e=>ee.jsx(iT,{plugin:e,onConfigChange:r,onClose:n},e.id))})}function lT({onTogglePlugin:e,activeIds:t}){const[n,r]=W.useState([]);return W.useEffect(()=>{cE().then(e=>r(e.filter(e=>e.enabled))).catch(()=>r([]))},[]),W.useEffect(()=>{const e=()=>{cE().then(e=>r(e.filter(e=>e.enabled))).catch(()=>{})};return window.addEventListener("focus",e),()=>window.removeEventListener("focus",e)},[]),0===n.length?null:ee.jsx("div",{className:"fixed top-14 left-1/2 -translate-x-1/2 z-40 pointer-events-none",children:ee.jsx(hw.div,{className:"pointer-events-auto flex items-center gap-1 px-2 py-1 rounded-full bg-background/60 backdrop-blur-md border border-border/50 shadow-lg",initial:{opacity:0,y:-8},animate:{opacity:1,y:0},transition:{duration:.2,ease:"easeOut"},children:n.map(n=>{const r=t.has(n.id),o=n.name.slice(0,2);return ee.jsxs(hw.button,{onClick:()=>e(n),className:uk("relative flex items-center justify-center w-7 h-7 rounded-full text-[10px] font-medium transition-colors",r?"bg-blue-500/20 text-blue-400":"text-muted-foreground/70 hover:text-foreground hover:bg-muted/80"),whileHover:{scale:1.12},whileTap:{scale:.92},title:n.name+(n.description?` — ${n.description}`:""),children:[o,ee.jsx(Xb,{children:r&&ee.jsx(hw.span,{className:"absolute -bottom-0.5 left-1/2 -translate-x-1/2 h-1 w-1 rounded-full bg-blue-400",initial:{scale:0},animate:{scale:1},exit:{scale:0}})})]},n.id)})})})}const uT=H.lazy(()=>fd(()=>import("./ProjectPage-Dz5jkV71.js").then(e=>e.P),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(e=>({default:e.ProjectPage}))),cT=H.lazy(()=>fd(()=>import("./SettingsPage-B41wzoKs.js"),__vite__mapDeps([9,6,3,4])).then(e=>({default:e.SettingsPage}))),dT=H.lazy(()=>fd(()=>import("./SkillHubPage-q9ST6TG_.js"),__vite__mapDeps([10,7,3])).then(e=>({default:e.SkillHubPage}))),fT=H.lazy(()=>fd(()=>import("./MobilePage-DH1U9zmM.js"),__vite__mapDeps([11,2,3,4,5])).then(e=>({default:e.MobilePage})));function pT(){return ee.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background",children:ee.jsx("span",{className:"text-muted-foreground text-sm",children:"Loading…"})})}function hT({children:e}){const[t,n]=W.useState(!1),r=Yk(e=>e.token),o=Yk(e=>e.setToken);return W.useEffect(()=>{r?n(!0):nS()?rS().then(e=>o(e)).catch(()=>{}).finally(()=>n(!0)):n(!0)},[]),t||r?r?ee.jsx(ee.Fragment,{children:e}):ee.jsx(wf,{to:"/login",replace:!0}):null}const mT=window.matchMedia("(pointer: coarse)").matches&&window.innerWidth<768;function gT(){const[e,t]=W.useState([]),[n,r]=W.useState(()=>{try{return new Set(JSON.parse(localStorage.getItem("cc_plugin_open")||"[]"))}catch{return new Set}}),o=lf();W.useEffect(()=>{cE().then(t).catch(()=>t([]))},[]);const a=W.useCallback(e=>{r(t=>{const n=new Set(t);n.has(e.id)?n.delete(e.id):n.add(e.id);try{localStorage.setItem("cc_plugin_open",JSON.stringify([...n]))}catch{}return n})},[]),i=W.useCallback(e=>{r(t=>{const n=new Set(t);n.delete(e);try{localStorage.setItem("cc_plugin_open",JSON.stringify([...n]))}catch{}return n})},[]),s=function(e){if("/"===e||"/dashboard"===e)return{type:"dashboard"};const t=e.match(/^\/projects?\/([^/]+)/);return t?{type:"project",projectId:t[1]}:{type:"other"}}(o.pathname),l=e.filter(e=>{if(!e.enabled||!n.has(e.id))return!1;switch(e.userConfig.scope??e.float.scope.default){case"global":return!0;case"dashboard":return"dashboard"===s.type;case"project":return"project"===s.type;case"project:specific":return"project"===s.type&&(e.userConfig.projectIds??[]).includes(s.projectId??"");default:return!1}}),u="/login"===o.pathname,c="/mobile"===o.pathname;return ee.jsxs(ee.Fragment,{children:[!u&&!c&&!mT&&ee.jsx(lT,{onTogglePlugin:a,activeIds:n}),ee.jsx(sT,{plugins:l,onPluginsChange:t,onClose:i})]})}function vT({children:e}){const t=lf();return mT&&"/"===t.pathname?ee.jsx(wf,{to:"/mobile",replace:!0}):ee.jsx(ee.Fragment,{children:e})}function yT(){return ee.jsx(FN,{children:ee.jsxs(cN,{children:[ee.jsx(lN,{richColors:!0,position:"bottom-right"}),ee.jsx(HN,{}),ee.jsx(GN,{}),ee.jsx(aT,{children:ee.jsxs(Nf,{children:[ee.jsx(gT,{}),ee.jsx(vT,{children:ee.jsx(W.Suspense,{fallback:ee.jsx(pT,{}),children:ee.jsxs(Ef,{children:[ee.jsx(kf,{path:"/login",element:ee.jsx(SE,{})}),ee.jsx(kf,{path:"/",element:ee.jsx(hT,{children:ee.jsx(oT,{})})}),ee.jsx(kf,{path:"/projects/:id",element:ee.jsx(hT,{children:ee.jsx(uT,{})})}),ee.jsx(kf,{path:"/settings",element:ee.jsx(hT,{children:ee.jsx(cT,{})})}),ee.jsx(kf,{path:"/skillhub",element:ee.jsx(hT,{children:ee.jsx(dT,{})})}),ee.jsx(kf,{path:"/mobile",element:ee.jsx(hT,{children:ee.jsx(fT,{})})}),ee.jsx(kf,{path:"*",element:ee.jsx(wf,{to:"/",replace:!0})})]})})})]})})]})})}te.createRoot(document.getElementById("root")).render(ee.jsx(H.StrictMode,{children:ee.jsx(yT,{})}));export{Zj as $,Xb as A,Rk as B,ME as C,RE as D,LE as E,_E as F,eE as G,tE as H,Lk as I,Gk as J,vk as K,Tj as L,YE as M,mj as N,Kj as O,QE as P,qj as Q,H as R,Bk as S,lj as T,yk as U,hj as V,Pj as W,cj as X,YC as Y,Nj as Z,fd as _,VN as a,wE as a$,VC as a0,$j as a1,Aj as a2,nj as a3,yS as a4,hS as a5,zE as a6,AN as a7,wS as a8,vS as a9,YN as aA,$N as aB,WE as aC,OE as aD,xE as aE,dS as aF,SN as aG,_N as aH,vj as aI,mE as aJ,JN as aK,lE as aL,iE as aM,eT as aN,Hk as aO,uE as aP,sE as aQ,ej as aR,df as aS,Kk as aT,ij as aU,kj as aV,xj as aW,ld as aX,vE as aY,yE as aZ,bE as a_,_P as aa,IP as ab,zP as ac,VP as ad,$P as ae,Ik as af,FP as ag,mS as ah,bS as ai,gS as aj,xS as ak,CS as al,LS as am,SS as an,PS as ao,ES as ap,NS as aq,jS as ar,TS as as,MS as at,RS as au,dj as av,oj as aw,cf as ax,NE as ay,pj as az,WS as b,_S as b0,OS as b1,AS as b2,Df as b3,UN as b4,XS as b5,sj as b6,QS as b7,cE as b8,dE as b9,fE as ba,hE as bb,DS as bc,kS as bd,EN as be,TN as bf,XN as bg,KE as bh,jN as bi,tT as bj,DE as bk,zS as bl,jv as bm,Pv as bn,Ev as bo,r as bp,o as bq,gE as br,a as bs,kE as bt,jE as c,uk as d,GE as e,$S as f,Zk as g,Uk as h,Qk as i,ee as j,VS as k,JE as l,GS as m,BS as n,IE as o,hw as p,ZS as q,W as r,Wk as s,eN as t,fN as u,nE as v,HS as w,TE as x,ZE as y,JS as z};