@asabot/core 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -1
- package/dist/core/logger.js +4 -1
- package/dist/core/message/segment.js +3 -13
- package/dist/core/plugin/context.d.ts +7 -1
- package/dist/core/plugin/context.js +28 -3
- package/dist/core/plugin/definition.d.ts +2 -0
- package/dist/core/plugin/icon.d.ts +2 -0
- package/dist/core/plugin/icon.js +14 -0
- package/dist/core/plugin/manager.d.ts +8 -3
- package/dist/core/plugin/manager.js +42 -11
- package/dist/core/plugin/packages.d.ts +4 -0
- package/dist/core/plugin/packages.js +39 -9
- package/dist/core/plugin/types.d.ts +11 -0
- package/dist/index.d.ts +1 -1
- package/dist/server/index.js +1 -0
- package/dist/server/views.d.ts +2 -0
- package/docs/DEPLOY.md +22 -1
- package/package.json +1 -1
- package/web/dist/assets/index-ogXTSYEt.css +2 -0
- package/web/dist/assets/index-r9XycpMd.js +51 -0
- package/web/dist/assets/{markdown-MEN1AImu.js → markdown-CIohfKSa.js} +1 -1
- package/web/dist/index.html +2 -2
- package/web/dist/assets/index-BAbj8e7E.css +0 -2
- package/web/dist/assets/index-CMuBy6y5.js +0 -51
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ee(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ee(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),ee(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=ee(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=ee(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ee(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return ee(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var te=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function ne(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,te)}catch(e){te(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function re(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else ne(re.bind(null,e))}var ie={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ie,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=re,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ne,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),d=o(((e,t)=>{t.exports=u()}));function f(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=f(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function p(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=f(e))&&(r&&(r+=` `),r+=t);return r}var m=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},h=(e,t)=>({classGroupId:e,validator:t}),g=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),_=`-`,v=[],y=`arbitrary..`,b=e=>{let t=C(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return S(e);let n=e.split(_);return x(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?m(i,t):t:i||v}return n[e]||v}}},x=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=x(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(_):e.slice(t).join(_),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},S=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?y+r:void 0})(),C=e=>{let{theme:t,classGroups:n}=e;return w(n,t)},w=(e,t)=>{let n=g();for(let r in e){let i=e[r];T(i,n,r,t)}return n},T=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];E(i,t,n,r)}},E=(e,t,n,r)=>{typeof e==`string`?D(e,t,n):typeof e==`function`?O(e,t,n,r):k(e,t,n,r)},D=(e,t,n)=>{let r=e===``?t:A(t,e);r.classGroupId=n},O=(e,t,n,r)=>{j(e)?T(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(h(n,e)))},k=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];T(o,A(t,a),n,r)}},A=(e,t)=>{let n=e,r=t.split(_),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=g(),n.nextPart.set(t,i)),n=i}return n},j=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,M=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},N=`!`,ee=`:`,P=[],F=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),te=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===ee){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(N)?(c=s.slice(0,-1),l=!0):s.startsWith(N)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return F(t,l,c,u)};if(t){let e=t+ee,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):F(P,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},ne=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},re=e=>({cache:M(e.cacheSize),parseClassName:te(e),sortModifiers:ne(e),postfixLookupClassGroupIds:ie(e),...b(e)}),ie=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},ae=/\s+/,oe=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(ae),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+N:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},se=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=ce(n))&&(i&&(i+=` `),i+=r);return i},ce=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=ce(e[r]))&&(n&&(n+=` `),n+=t);return n},le=(e,...t)=>{let n,r,i,a,o=o=>(n=re(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=oe(e,n);return i(e,a),a};return a=o,(...e)=>a(se(...e))},ue=[],de=e=>{let t=t=>t[e]||ue;return t.isThemeGetter=!0,t.themeKey=e,t},fe=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,I=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,me=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,he=/\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$/,ge=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,_e=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ye=e=>pe.test(e),L=e=>!!e&&!Number.isNaN(Number(e)),be=e=>!!e&&Number.isInteger(Number(e)),xe=e=>e.endsWith(`%`)&&L(e.slice(0,-1)),Se=e=>me.test(e),Ce=()=>!0,we=e=>he.test(e)&&!ge.test(e),Te=()=>!1,Ee=e=>_e.test(e),De=e=>ve.test(e),Oe=e=>!R(e)&&!z(e),ke=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),Ae=e=>Ge(e,Ye,Te),R=e=>fe.test(e),je=e=>Ge(e,Xe,we),Me=e=>Ge(e,Ze,L),Ne=e=>Ge(e,$e,Ce),Pe=e=>Ge(e,Qe,Te),Fe=e=>Ge(e,qe,Te),Ie=e=>Ge(e,Je,De),Le=e=>Ge(e,et,Ee),z=e=>I.test(e),Re=e=>Ke(e,Xe),ze=e=>Ke(e,Qe),Be=e=>Ke(e,qe),Ve=e=>Ke(e,Ye),He=e=>Ke(e,Je),Ue=e=>Ke(e,et,!0),We=e=>Ke(e,$e,!0),Ge=(e,t,n)=>{let r=fe.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ke=(e,t,n=!1)=>{let r=I.exec(e);return r?r[1]?t(r[1]):n:!1},qe=e=>e===`position`||e===`percentage`,Je=e=>e===`image`||e===`url`,Ye=e=>e===`length`||e===`size`||e===`bg-size`,Xe=e=>e===`length`,Ze=e=>e===`number`,Qe=e=>e===`family-name`,$e=e=>e===`number`||e===`weight`,et=e=>e===`shadow`,tt=le(()=>{let e=de(`color`),t=de(`font`),n=de(`text`),r=de(`font-weight`),i=de(`tracking`),a=de(`leading`),o=de(`breakpoint`),s=de(`container`),c=de(`spacing`),l=de(`radius`),u=de(`shadow`),d=de(`inset-shadow`),f=de(`text-shadow`),p=de(`drop-shadow`),m=de(`blur`),h=de(`perspective`),g=de(`aspect`),_=de(`ease`),v=de(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),z,R],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[z,R,c],T=()=>[ye,`full`,`auto`,...w()],E=()=>[be,`none`,`subgrid`,z,R],D=()=>[`auto`,{span:[`full`,be,z,R]},be,z,R],O=()=>[be,`auto`,z,R],k=()=>[`auto`,`min`,`max`,`fr`,z,R],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[ye,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ee=()=>[s,ye,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],P=()=>[ye,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[e,z,R],te=()=>[...b(),Be,Fe,{position:[z,R]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,Ve,Ae,{size:[z,R]}],ie=()=>[xe,Re,je],ae=()=>[``,`none`,`full`,l,z,R],oe=()=>[``,L,Re,je],se=()=>[`solid`,`dashed`,`dotted`,`double`],ce=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],le=()=>[L,xe,Be,Fe],ue=()=>[``,`none`,m,z,R],fe=()=>[`none`,L,z,R],I=()=>[`none`,L,z,R],pe=()=>[L,z,R],me=()=>[ye,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Se],breakpoint:[Se],color:[Ce],container:[Se],"drop-shadow":[Se],ease:[`in`,`out`,`in-out`],font:[Oe],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Se],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Se],shadow:[Se],spacing:[`px`,L],text:[Se],"text-shadow":[Se],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ye,R,z,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,z,R]}],"container-named":[ke],columns:[{columns:[L,`auto`,R,z,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[be,`auto`,z,R]}],basis:[{basis:[ye,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[L,ye,`auto`,`initial`,`none`,R]}],grow:[{grow:[``,L,z,R]}],shrink:[{shrink:[``,L,z,R]}],order:[{order:[be,`first`,`last`,`none`,z,R]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...ee()]}],"min-inline-size":[{"min-inline":[`auto`,...ee()]}],"max-inline-size":[{"max-inline":[`none`,...ee()]}],"block-size":[{block:[`auto`,...P()]}],"min-block-size":[{"min-block":[`auto`,...P()]}],"max-block-size":[{"max-block":[`none`,...P()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...N()]}],"font-size":[{text:[`base`,n,Re,je]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,We,Ne]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,xe,R]}],"font-family":[{font:[ze,Pe,t]}],"font-features":[{"font-features":[R]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,z,R]}],"line-clamp":[{"line-clamp":[L,`none`,z,Me]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,z,R]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,z,R]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:F()}],"text-color":[{text:F()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...se(),`wavy`]}],"text-decoration-thickness":[{decoration:[L,`from-font`,`auto`,z,je]}],"text-decoration-color":[{decoration:F()}],"underline-offset":[{"underline-offset":[L,`auto`,z,R]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[be,z,R]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,z,R]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,z,R]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},be,z,R],radial:[``,z,R],conic:[``,be,z,R]},He,Ie]}],"bg-color":[{bg:F()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:F()}],"gradient-via":[{via:F()}],"gradient-to":[{to:F()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:oe()}],"border-w-x":[{"border-x":oe()}],"border-w-y":[{"border-y":oe()}],"border-w-s":[{"border-s":oe()}],"border-w-e":[{"border-e":oe()}],"border-w-bs":[{"border-bs":oe()}],"border-w-be":[{"border-be":oe()}],"border-w-t":[{"border-t":oe()}],"border-w-r":[{"border-r":oe()}],"border-w-b":[{"border-b":oe()}],"border-w-l":[{"border-l":oe()}],"divide-x":[{"divide-x":oe()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":oe()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...se(),`hidden`,`none`]}],"divide-style":[{divide:[...se(),`hidden`,`none`]}],"border-color":[{border:F()}],"border-color-x":[{"border-x":F()}],"border-color-y":[{"border-y":F()}],"border-color-s":[{"border-s":F()}],"border-color-e":[{"border-e":F()}],"border-color-bs":[{"border-bs":F()}],"border-color-be":[{"border-be":F()}],"border-color-t":[{"border-t":F()}],"border-color-r":[{"border-r":F()}],"border-color-b":[{"border-b":F()}],"border-color-l":[{"border-l":F()}],"divide-color":[{divide:F()}],"outline-style":[{outline:[...se(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[L,z,R]}],"outline-w":[{outline:[``,L,Re,je]}],"outline-color":[{outline:F()}],shadow:[{shadow:[``,`inner`,`none`,u,Ue,Le]}],"shadow-color":[{shadow:F()}],"inset-shadow":[{"inset-shadow":[`none`,d,Ue,Le]}],"inset-shadow-color":[{"inset-shadow":F()}],"ring-w":[{ring:oe()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:F()}],"ring-offset-w":[{"ring-offset":[L,je]}],"ring-offset-color":[{"ring-offset":F()}],"inset-ring-w":[{"inset-ring":oe()}],"inset-ring-color":[{"inset-ring":F()}],"text-shadow":[{"text-shadow":[`none`,f,Ue,Le]}],"text-shadow-color":[{"text-shadow":F()}],opacity:[{opacity:[L,z,R]}],"mix-blend":[{"mix-blend":[...ce(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[L]}],"mask-image-linear-from-pos":[{"mask-linear-from":le()}],"mask-image-linear-to-pos":[{"mask-linear-to":le()}],"mask-image-linear-from-color":[{"mask-linear-from":F()}],"mask-image-linear-to-color":[{"mask-linear-to":F()}],"mask-image-t-from-pos":[{"mask-t-from":le()}],"mask-image-t-to-pos":[{"mask-t-to":le()}],"mask-image-t-from-color":[{"mask-t-from":F()}],"mask-image-t-to-color":[{"mask-t-to":F()}],"mask-image-r-from-pos":[{"mask-r-from":le()}],"mask-image-r-to-pos":[{"mask-r-to":le()}],"mask-image-r-from-color":[{"mask-r-from":F()}],"mask-image-r-to-color":[{"mask-r-to":F()}],"mask-image-b-from-pos":[{"mask-b-from":le()}],"mask-image-b-to-pos":[{"mask-b-to":le()}],"mask-image-b-from-color":[{"mask-b-from":F()}],"mask-image-b-to-color":[{"mask-b-to":F()}],"mask-image-l-from-pos":[{"mask-l-from":le()}],"mask-image-l-to-pos":[{"mask-l-to":le()}],"mask-image-l-from-color":[{"mask-l-from":F()}],"mask-image-l-to-color":[{"mask-l-to":F()}],"mask-image-x-from-pos":[{"mask-x-from":le()}],"mask-image-x-to-pos":[{"mask-x-to":le()}],"mask-image-x-from-color":[{"mask-x-from":F()}],"mask-image-x-to-color":[{"mask-x-to":F()}],"mask-image-y-from-pos":[{"mask-y-from":le()}],"mask-image-y-to-pos":[{"mask-y-to":le()}],"mask-image-y-from-color":[{"mask-y-from":F()}],"mask-image-y-to-color":[{"mask-y-to":F()}],"mask-image-radial":[{"mask-radial":[z,R]}],"mask-image-radial-from-pos":[{"mask-radial-from":le()}],"mask-image-radial-to-pos":[{"mask-radial-to":le()}],"mask-image-radial-from-color":[{"mask-radial-from":F()}],"mask-image-radial-to-color":[{"mask-radial-to":F()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[L]}],"mask-image-conic-from-pos":[{"mask-conic-from":le()}],"mask-image-conic-to-pos":[{"mask-conic-to":le()}],"mask-image-conic-from-color":[{"mask-conic-from":F()}],"mask-image-conic-to-color":[{"mask-conic-to":F()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,z,R]}],filter:[{filter:[``,`none`,z,R]}],blur:[{blur:ue()}],brightness:[{brightness:[L,z,R]}],contrast:[{contrast:[L,z,R]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Ue,Le]}],"drop-shadow-color":[{"drop-shadow":F()}],grayscale:[{grayscale:[``,L,z,R]}],"hue-rotate":[{"hue-rotate":[L,z,R]}],invert:[{invert:[``,L,z,R]}],saturate:[{saturate:[L,z,R]}],sepia:[{sepia:[``,L,z,R]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,z,R]}],"backdrop-blur":[{"backdrop-blur":ue()}],"backdrop-brightness":[{"backdrop-brightness":[L,z,R]}],"backdrop-contrast":[{"backdrop-contrast":[L,z,R]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,L,z,R]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[L,z,R]}],"backdrop-invert":[{"backdrop-invert":[``,L,z,R]}],"backdrop-opacity":[{"backdrop-opacity":[L,z,R]}],"backdrop-saturate":[{"backdrop-saturate":[L,z,R]}],"backdrop-sepia":[{"backdrop-sepia":[``,L,z,R]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,z,R]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[L,`initial`,z,R]}],ease:[{ease:[`linear`,`initial`,_,z,R]}],delay:[{delay:[L,z,R]}],animate:[{animate:[`none`,v,z,R]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,z,R]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:I()}],"scale-x":[{"scale-x":I()}],"scale-y":[{"scale-y":I()}],"scale-z":[{"scale-z":I()}],"scale-3d":[`scale-3d`],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[z,R,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:me()}],"translate-x":[{"translate-x":me()}],"translate-y":[{"translate-y":me()}],"translate-z":[{"translate-z":me()}],"translate-none":[`translate-none`],zoom:[{zoom:[be,z,R]}],accent:[{accent:F()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:F()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,z,R]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":F()}],"scrollbar-track-color":[{"scrollbar-track":F()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,z,R]}],fill:[{fill:[`none`,...F()]}],"stroke-w":[{stroke:[L,Re,je,Me]}],stroke:[{stroke:[`none`,...F()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function B(...e){return tt(p(e))}var nt=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),rt=o(((e,t)=>{t.exports=nt()})),V=l(d(),1),H=rt(),it=[`bg-[#efedff] text-[#5245de] dark:bg-[#8b7ffa]/15 dark:text-[#b4acff]`,`bg-[#e2f5ef] text-[#0e8a6c] dark:bg-[#2bbd95]/15 dark:text-[#5fd6b3]`,`bg-[#fdeef4] text-[#c2457a] dark:bg-[#f2a5c8]/15 dark:text-[#f2a5c8]`,`bg-[#e7effd] text-[#2f6fd6] dark:bg-[#5f9cf3]/15 dark:text-[#8ab8f7]`,`bg-[#fcf0d9] text-[#a76a05] dark:bg-[#e9a43a]/15 dark:text-[#f0bf70]`];function at(e){let t=0;for(let n of e)t=t*31+n.charCodeAt(0)>>>0;return t}function ot({id:e,name:t,src:n,size:r=32,className:i}){let[a,o]=(0,V.useState)(),s=(t?.trim()||e).slice(0,1).toUpperCase();return(0,H.jsxs)(`span`,{className:B(`relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full font-medium select-none`,it[at(e)%it.length],i),style:{width:r,height:r,fontSize:r*.4},children:[n&&n!==a?(0,H.jsx)(`img`,{src:n,alt:``,loading:`lazy`,referrerPolicy:`no-referrer`,className:`size-full object-cover`,onError:()=>o(n)}):s,(0,H.jsx)(`span`,{className:`absolute inset-0 rounded-full ring-1 ring-black/5 ring-inset dark:ring-white/10`})]})}var st=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function ct(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:st(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var lt=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},ut=e=>{let t=lt(e);return t.charAt(0).toUpperCase()+t.slice(1)},dt=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),ft={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function pt(e){return e!=null}function mt(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??ft.width,a=e.size??e.height??ft.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?dt(...c):dt(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??ft[`stroke-width`])*Number(e.size??e.width??ft.width)/Number(t.size??t.width??ft.width):t.strokeWidth??ft[`stroke-width`];return[`svg`,{...Object.entries(ft).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&pt(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&pt(t.width)&&{[r(`width`)]:t.width},...`height`in t&&pt(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function ht(e,t={}){return mt(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var gt=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},_t=(0,V.createContext)({}),vt=()=>(0,V.useContext)(_t),yt=(0,V.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=vt()??{},y=!!c||gt(d),[b,x,S=[]]=ht(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:dt(v,s),hasA11yProp:y,attributes:d});return(0,V.createElement)(b,{ref:f,...x},[...S.map(([e,t])=>(0,V.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function U(e,t=[],n=[]){let r=typeof e==`string`?ct(e,t,n):e,i=(0,V.forwardRef)(({className:e,...t},n)=>(0,V.createElement)(yt,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=ut(r.name)),i}var bt={name:`app-window`,size:24,node:[[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}],[`path`,{d:`M10 4v4`,key:`pp8u80`}],[`path`,{d:`M2 8h20`,key:`d11cs7`}],[`path`,{d:`M6 4v4`,key:`1svtjw`}]]};bt.node;var xt=U(bt),St={name:`arrow-down-left`,size:24,node:[[`path`,{d:`M17 7 7 17`,key:`15tmo1`}],[`path`,{d:`M17 17H7V7`,key:`1org7z`}]]};St.node;var Ct=U(St),wt={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};wt.node;var Tt=U(wt),Et={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};Et.node;var Dt=U(Et),Ot={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};Ot.node;var kt=U(Ot),At={name:`arrow-up-right`,size:24,node:[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]};At.node;var jt=U(At),Mt={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};Mt.node;var Nt=U(Mt),Pt={name:`at-sign`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]};Pt.node;var Ft=U(Pt),It={name:`ban`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M4.929 4.929 19.07 19.071`,key:`196cmz`}]]};It.node;var Lt=U(It),Rt={name:`bell-ring`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M22 8c0-2.3-.8-4.3-2-6`,key:`5bb3ad`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}],[`path`,{d:`M4 2C2.8 3.7 2 5.7 2 8`,key:`tap9e0`}]]};Rt.node;var zt=U(Rt),Bt={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};Bt.node;var Vt=U(Bt),Ht={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};Ht.node;var Ut=U(Ht),Wt={name:`braces`,size:24,node:[[`path`,{d:`M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1`,key:`ezmyqa`}],[`path`,{d:`M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1`,key:`e1hn23`}]],aliases:[`curly-braces`]};Wt.node;var Gt=U(Wt),Kt={name:`cable`,size:24,node:[[`path`,{d:`M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z`,key:`trhst0`}],[`path`,{d:`M17 21v-2`,key:`ds4u3f`}],[`path`,{d:`M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10`,key:`1mo9zo`}],[`path`,{d:`M21 21v-2`,key:`eo0ou`}],[`path`,{d:`M3 5V3`,key:`1k5hjh`}],[`path`,{d:`M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z`,key:`1dd30t`}],[`path`,{d:`M7 5V3`,key:`1t1388`}]]};Kt.node;var qt=U(Kt),Jt={name:`calendar`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]};Jt.node;var Yt=U(Jt),Xt={name:`chart-column`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]],aliases:[`bar-chart-3`]};Xt.node;var Zt=U(Xt),Qt={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};Qt.node;var $t=U(Qt),en={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};en.node;var tn=U(en),nn={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};nn.node;var rn=U(nn),an={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};an.node;var on=U(an),sn={name:`circle-arrow-up`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]],aliases:[`arrow-up-circle`]};sn.node;var cn=U(sn),ln={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};ln.node;var un=U(ln),dn={name:`circle-exclamation-point`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`,`circle-alert`]};dn.node;var fn=U(dn),pn={name:`coins`,size:24,node:[[`path`,{d:`M13.744 17.736a6 6 0 1 1-7.48-7.48`,key:`bq4yh3`}],[`path`,{d:`M15 6h1v4`,key:`11y1tn`}],[`path`,{d:`m6.134 14.768.866-.5 2 3.464`,key:`17snzx`}],[`circle`,{cx:`16`,cy:`8`,r:`6`,key:`14bfc9`}]]};pn.node;var mn=U(pn),hn={name:`compass`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]};hn.node;var gn=U(hn),_n={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};_n.node;var vn=U(_n),yn={name:`corner-down-left`,size:24,node:[[`path`,{d:`M20 4v7a4 4 0 0 1-4 4H4`,key:`6o5b7l`}],[`path`,{d:`m9 10-5 5 5 5`,key:`1kshq7`}]]};yn.node;var bn=U(yn),xn={name:`cpu`,size:24,node:[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]};xn.node;var Sn=U(xn),Cn={name:`crown`,size:24,node:[[`path`,{d:`M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z`,key:`1vdc57`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]};Cn.node;var wn=U(Cn),Tn={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};Tn.node;var En=U(Tn),Dn={name:`eighth-notes`,size:24,node:[[`path`,{d:`M21 16V3a1 1 0 0 0-1.28-.96l-10 2.917a1 1 0 0 0-.72.96V19`,key:`uy6ho8`}],[`circle`,{cx:`18`,cy:`16`,r:`3`,key:`1hluhg`}],[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}]],aliases:[`music`]};Dn.node;var On=U(Dn),kn={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};kn.node;var An=U(kn),jn={name:`eraser`,size:24,node:[[`path`,{d:`M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21`,key:`g5wo59`}],[`path`,{d:`m5.082 11.09 8.828 8.828`,key:`1wx5vj`}]]};jn.node;var Mn=U(jn),Nn={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};Nn.node;var Pn=U(Nn),Fn={name:`file-up`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]};Fn.node;var In=U(Fn),Ln={name:`flask-conical`,size:24,node:[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]};Ln.node;var Rn=U(Ln),zn={name:`gamepad-2`,size:24,node:[[`line`,{x1:`6`,x2:`10`,y1:`11`,y2:`11`,key:`1gktln`}],[`line`,{x1:`8`,x2:`8`,y1:`9`,y2:`13`,key:`qnk9ow`}],[`line`,{x1:`15`,x2:`15.01`,y1:`12`,y2:`12`,key:`krot7o`}],[`line`,{x1:`18`,x2:`18.01`,y1:`10`,y2:`10`,key:`1lcuu1`}],[`path`,{d:`M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z`,key:`mfqc10`}]]};zn.node;var Bn=U(zn),Vn={name:`gift`,size:24,node:[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8`,key:`1sqzm4`}],[`path`,{d:`M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5`,key:`kc0143`}],[`rect`,{x:`3`,y:`7`,width:`18`,height:`4`,rx:`1`,key:`1hberx`}]]};Vn.node;var Hn=U(Vn),Un={name:`hand`,size:24,node:[[`path`,{d:`M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2`,key:`1fvzgz`}],[`path`,{d:`M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2`,key:`1kc0my`}],[`path`,{d:`M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8`,key:`10h0bg`}],[`path`,{d:`M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15`,key:`1s1gnw`}]]};Un.node;var Wn=U(Un),Gn={name:`image-plus`,size:24,node:[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]};Gn.node;var Kn=U(Gn),qn={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};qn.node;var Jn=U(qn),Yn={name:`inbox`,size:24,node:[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]};Yn.node;var Xn=U(Yn),Zn={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};Zn.node;var Qn=U(Zn),$n={name:`layout-dashboard`,size:24,node:[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]};$n.node;var er=U($n),tr={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};tr.node;var nr=U(tr),rr={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};rr.node;var ir=U(rr),ar={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};ar.node;var or=U(ar),sr={name:`log-in`,size:24,node:[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]};sr.node;var cr=U(sr),lr={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};lr.node;var ur=U(lr),dr={name:`menu`,size:24,node:[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]};dr.node;var fr=U(dr),pr={name:`message-square-reply`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`m10 8-3 3 3 3`,key:`fp6dz7`}],[`path`,{d:`M17 14v-1a2 2 0 0 0-2-2H7`,key:`1tkjnz`}]]};pr.node;var mr=U(pr),hr={name:`messages-square`,size:24,node:[[`path`,{d:`M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z`,key:`1n2ejm`}],[`path`,{d:`M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1`,key:`1qfcsi`}]]};hr.node;var gr=U(hr),_r={name:`mic-off`,size:24,node:[[`path`,{d:`M12 19v3`,key:`npa21l`}],[`path`,{d:`M15 9.34V5a3 3 0 0 0-5.68-1.33`,key:`1gzdoj`}],[`path`,{d:`M16.95 16.95A7 7 0 0 1 5 12v-2`,key:`cqa7eg`}],[`path`,{d:`M18.89 13.23A7 7 0 0 0 19 12v-2`,key:`16hl24`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v3a3 3 0 0 0 5.12 2.12`,key:`r2i35w`}]]};_r.node;var vr=U(_r),yr={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};yr.node;var br=U(yr),xr={name:`monitor`,size:24,node:[[`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`}]]};xr.node;var Sr=U(xr),Cr={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};Cr.node;var wr=U(Cr),Tr={name:`package-search`,size:24,node:[[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`path`,{d:`M20.27 18.27 22 20`,key:`er2am`}],[`path`,{d:`M21 10.498V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l.98-.559`,key:`tok1h1`}],[`path`,{d:`M3.29 7 12 12l8.71-5`,key:`19ckod`}],[`path`,{d:`m7.5 4.27 8.997 5.148`,key:`9yrvtv`}],[`circle`,{cx:`18.5`,cy:`16.5`,r:`2.5`,key:`ke13xx`}]]};Tr.node;var Er=U(Tr),Dr={name:`package`,size:24,node:[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]};Dr.node;var Or=U(Dr),kr={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};kr.node;var Ar=U(kr),jr={name:`pause`,size:24,node:[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]};jr.node;var Mr=U(jr),Nr={name:`pencil-line`,size:24,node:[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]};Nr.node;var Pr=U(Nr),Fr={name:`play`,size:24,node:[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]};Fr.node;var Ir=U(Fr),Lr={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};Lr.node;var Rr=U(Lr),zr={name:`puzzle`,size:24,node:[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]};zr.node;var Br=U(zr),Vr={name:`radio`,size:24,node:[[`path`,{d:`M16.247 7.761a6 6 0 0 1 0 8.478`,key:`1fwjs5`}],[`path`,{d:`M19.075 4.933a10 10 0 0 1 0 14.134`,key:`ehdyv1`}],[`path`,{d:`M4.925 19.067a10 10 0 0 1 0-14.134`,key:`1q22gi`}],[`path`,{d:`M7.753 16.239a6 6 0 0 1 0-8.478`,key:`r2q7qm`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]};Vr.node;var Hr=U(Vr),Ur={name:`refresh-cw`,size:24,node:[[`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`}]]};Ur.node;var Wr=U(Ur),Gr={name:`reply`,size:24,node:[[`path`,{d:`M20 18v-2a4 4 0 0 0-4-4H4`,key:`5vmcpk`}],[`path`,{d:`m9 17-5-5 5-5`,key:`nvlc11`}]]};Gr.node;var Kr=U(Gr),qr={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]};qr.node;var Jr=U(qr),Yr={name:`rotate-cw`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]};Yr.node;var Xr=U(Yr),Zr={name:`scale`,size:24,node:[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`m19 8 3 8a5 5 0 0 1-6 0zV7`,key:`zcdpyk`}],[`path`,{d:`M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1`,key:`1yorad`}],[`path`,{d:`m5 8 3 8a5 5 0 0 1-6 0zV7`,key:`eua70x`}],[`path`,{d:`M7 21h10`,key:`1b0cd5`}]]};Zr.node;var Qr=U(Zr),$r={name:`scan-line`,size:24,node:[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`path`,{d:`M7 12h10`,key:`b7w52i`}]]};$r.node;var ei=U($r),ti={name:`scroll-text`,size:24,node:[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]};ti.node;var ni=U(ti),ri={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};ri.node;var ii=U(ri),ai={name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]};ai.node;var oi=U(ai),si={name:`settings-2`,size:24,node:[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]};si.node;var ci=U(si),li={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};li.node;var ui=U(li),di={name:`share-2`,size:24,node:[[`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`}]]};di.node;var fi=U(di),pi={name:`shield-check`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]};pi.node;var mi=U(pi),hi={name:`shield-exclamation-point`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]],aliases:[`shield-alert`]};hi.node;var gi=U(hi),_i={name:`shield`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]};_i.node;var vi=U(_i),yi={name:`sliders-horizontal`,size:24,node:[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]};yi.node;var bi=U(yi),xi={name:`smartphone`,size:24,node:[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]};xi.node;var Si=U(xi),Ci={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};Ci.node;var wi=U(Ci),Ti={name:`square-terminal`,size:24,node:[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]],aliases:[`terminal-square`]};Ti.node;var Ei=U(Ti),Di={name:`star`,size:24,node:[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]};Di.node;var Oi=U(Di),ki={name:`store`,size:24,node:[[`path`,{d:`M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5`,key:`slp6dd`}],[`path`,{d:`M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244`,key:`o0xfot`}],[`path`,{d:`M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05`,key:`wn3emo`}]]};ki.node;var Ai=U(ki),ji={name:`sun`,size:24,node:[[`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`}]]};ji.node;var Mi=U(ji),Ni={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]};Ni.node;var Pi=U(Ni),Fi={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};Fi.node;var Ii=U(Fi),Li={name:`triangle-exclamation-point`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`,`triangle-alert`]};Li.node;var Ri=U(Li),zi={name:`trophy`,size:24,node:[[`path`,{d:`M10 14.66V17a1 1 0 0 1-1 1 2 2 0 0 0-2 2v2`,key:`pwuv1l`}],[`path`,{d:`M14 14.66V17a1 1 0 0 0 1 1 2 2 0 0 1 2 2v2`,key:`1y54w1`}],[`path`,{d:`M17.916 10H19.5A2.5 2.5 0 0 0 22 7.5V5a1 1 0 0 0-1-1h-3`,key:`e30mpu`}],[`path`,{d:`M4 22h16`,key:`57wxv0`}],[`path`,{d:`M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z`,key:`1mhfuq`}],[`path`,{d:`M6.084 10H4.5A2.5 2.5 0 0 1 2 7.5V5a1 1 0 0 1 1-1h3`,key:`i0yafy`}]]};zi.node;var Bi=U(zi),Vi={name:`user-plus`,size:24,node:[[`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`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,key:`1bvyxn`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]};Vi.node;var Hi=U(Vi),Ui={name:`user`,size:24,node:[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]};Ui.node;var Wi=U(Ui),Gi={name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};Gi.node;var Ki=U(Gi),qi={name:`workflow`,size:24,node:[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]};qi.node;var Ji=U(qi),Yi={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]};Yi.node;var Xi=U(Yi),Zi={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Zi.node;var Qi=U(Zi),$i=(0,V.createContext)({});function ea(e){let t=(0,V.useRef)(null);return t.current===null&&(t.current=e()),t.current}var ta=typeof window<`u`?V.useLayoutEffect:V.useEffect,na=(0,V.createContext)(null);function ra(e,t){e.indexOf(t)===-1&&e.push(t)}function ia(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var aa=(e,t,n)=>n>t?t:n<e?e:n,oa={},sa=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ca=e=>typeof e==`object`&&!!e,la=e=>/^0[^.\s]+$/u.test(e);function ua(e){let t;return()=>(t===void 0&&(t=e()),t)}var da=e=>e,fa=(...e)=>e.reduce((e,t)=>n=>t(e(n))),pa=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},ma=class{constructor(){this.subscriptions=[]}add(e){return ra(this.subscriptions,e),()=>this.remove(e)}remove(e){ia(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},ha=e=>e*1e3,ga=e=>e/1e3,_a=(e,t)=>t?1e3/t*e:0,va=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e},ya=(e,t,n)=>e*(3*(1-e)*((1-e)*t+e*n)+e*e);function ba(e,t,n,r){return e===t&&n===r?da:i=>{let a=0,o=1,s=i;for(let t=0;;t++){s>=a&&s<=o||(s=(a+o)/2);let r=ya(s,e,n)-i;if(r*r<1e-28||t===40)break;r>0?o=s:a=s,s-=r*1e-7/(ya(s+1e-7,e,n)-i-r)}return ya(s,t,r)}}var xa=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Sa=e=>t=>1-e(1-t),Ca=ba(.33,1.53,.69,.99),wa=Sa(Ca),Ta=xa(wa),Ea=e=>e>=1?1:(e*=2)<1?.5*wa(e):.5*(2-2**(-10*(e-1))),Da=e=>1-Math.sin(Math.acos(e)),Oa=Sa(Da),ka=xa(Da),Aa=ba(.42,0,1,1),ja=ba(0,0,.58,1),Ma=ba(.42,0,.58,1),Na=e=>Array.isArray(e)&&typeof e[0]!=`number`;function Pa(e,t){return Na(e)?e[va(0,e.length,t)]:e}var Fa=e=>Array.isArray(e)&&typeof e[0]==`number`,Ia={linear:da,easeIn:Aa,easeInOut:Ma,easeOut:ja,circIn:Da,circInOut:ka,circOut:Oa,backIn:wa,backInOut:Ta,backOut:Ca,anticipate:Ea},La=e=>typeof e==`string`,Ra=e=>{if(Fa(e)){let[t,n,r,i]=e;return ba(t,n,r,i)}return La(e)?Ia[e]:e},za={delta:0,timestamp:0,isProcessing:!1},Ba;function Va(){Ba=void 0}var Ha={now:()=>(Ba===void 0&&Ha.set(za.isProcessing||oa.useManualTiming?za.timestamp:performance.now()),Ba),set:e=>{Ba=e,queueMicrotask(Va)}},Ua=e=>Math.round(e*1e5)/1e5,Wa=e=>t=>typeof t==`string`&&t.startsWith(e),Ga=Wa(`--`),Ka=Wa(`var(--`),qa=e=>Ka(e)?Ja.test(e.split(`/*`)[0].trim()):!1,Ja=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Ya(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var Xa={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Za={...Xa,transform:e=>aa(0,1,e)},Qa={...Xa,default:1},$a=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function eo(e){return e==null}var to=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,no=(e,t)=>n=>!!(typeof n==`string`&&to.test(n)&&n.startsWith(e)||t&&!eo(n)&&Object.prototype.hasOwnProperty.call(n,t)),ro=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match($a);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},io=e=>aa(0,255,e),ao={...Xa,transform:e=>Math.round(io(e))},oo={test:no(`rgb`,`red`),parse:ro(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+ao.transform(e)+`, `+ao.transform(t)+`, `+ao.transform(n)+`, `+Ua(Za.transform(r))+`)`},so=(e,t,n)=>{let r=e.substring(1+t*n,1+(t+1)*n);return n>1?r:r+r};function co(e){let t=e.length>5?2:1,n=so(e,3,t);return{red:parseInt(so(e,0,t),16),green:parseInt(so(e,1,t),16),blue:parseInt(so(e,2,t),16),alpha:n?parseInt(n,16)/255:1}}var lo={test:no(`#`),parse:co,transform:oo.transform},uo=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),fo=uo(`deg`),po=uo(`%`),W=uo(`px`),mo=uo(`vh`),ho=uo(`vw`),go={...po,parse:e=>po.parse(e)/100,transform:e=>po.transform(e*100)},_o={test:no(`hsl`,`hue`),parse:ro(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+po.transform(Ua(t))+`, `+po.transform(Ua(n))+`, `+Ua(Za.transform(r))+`)`},vo={test:e=>oo.test(e)||lo.test(e)||_o.test(e),parse:e=>oo.test(e)?oo.parse(e):_o.test(e)?_o.parse(e):lo.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?oo.transform(e):_o.transform(e),getAnimatableNone:e=>{let t=vo.parse(e);return t.alpha=0,vo.transform(t)}},yo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,bo=new RegExp($a.source),xo=new RegExp(yo.source,`i`);function So(e){return isNaN(e)&&typeof e==`string`&&(bo.test(e)||xo.test(e))}var Co=`number`,wo=`color`,To=`var`,Eo=`var(`,Do="${}",Oo=/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+)(?![a-z]*\()/giu;function ko(e){let t=e.toString();return bo.test(t)||xo.test(t)}function Ao(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Oo,e=>(vo.test(e)?(r.color.push(a),i.push(wo),n.push(vo.parse(e))):e.startsWith(Eo)?(r.var.push(a),i.push(To),n.push(e)):(r.number.push(a),i.push(Co),n.push(parseFloat(e))),++a,Do)).split(Do),indexes:r,types:i}}function jo(e){return Ao(e).values}function Mo({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===Co?Ua(r[a]):e===wo?vo.transform(r[a]):r[a]}return i}}function No(e){return Mo(Ao(e))}var Po=e=>typeof e==`number`?0:vo.test(e)?vo.getAnimatableNone(e):e,Fo=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Po(e);function Io(e){let t=Ao(e);return Mo(t)(t.values.map((e,n)=>Fo(e,t.split[n])))}var G={test:So,parse:jo,createTransformer:No,getAnimatableNone:Io};function Lo(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ro({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=Lo(s,r,e+1/3),a=Lo(s,r,e),o=Lo(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function zo(e,t){return n=>n>0?t:e}var Bo=(e,t,n)=>e+(t-e)*n,Vo=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Ho=[lo,oo,_o],Uo=e=>Ho.find(t=>t.test(e));function Wo(e){let t=Uo(e);if(!t)return!1;let n=t.parse(e);return t===_o&&(n=Ro(n)),n}var Go=(e,t)=>{let n=Wo(e),r=Wo(t);if(!n||!r)return zo(e,t);let i={...n};return e=>(i.red=Vo(n.red,r.red,e),i.green=Vo(n.green,r.green,e),i.blue=Vo(n.blue,r.blue,e),i.alpha=Bo(n.alpha,r.alpha,e),oo.transform(i))},Ko=new Set([`none`,`hidden`]);function qo(e,t){return Ko.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Jo(e,t){return n=>Bo(e,t,n)}function Yo(e){return typeof e==`number`?Jo:typeof e==`string`?qa(e)?zo:vo.test(e)?Go:$o:Array.isArray(e)?Xo:typeof e==`object`?vo.test(e)?Go:Zo:zo}function Xo(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Yo(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Zo(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Yo(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Qo(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var $o=(e,t)=>{let n=Ao(e),r=Ao(t);return n.indexes.var.length===r.indexes.var.length&&n.indexes.color.length===r.indexes.color.length&&n.indexes.number.length>=r.indexes.number.length?Ko.has(e)&&!r.values.length||Ko.has(t)&&!n.values.length?qo(e,t):fa(Xo(Qo(n,r),r.values),Mo(r)):zo(e,t)},es=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function ts(e,t){let n=es.exec(e);if(!n)return;let r=es.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>Ua(Bo(a,o,e))+i}function ns(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return Bo(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=ts(e,t);if(n)return n}return Yo(e)(e,t)}var rs=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function is(e){let t=new Set,n=new Set,r=!1,i=!1,a,o=new Set,s={delta:0,timestamp:0,isProcessing:!1};function c(t){o.has(t)&&(n.add(t),e()),(a=t)(s)}let l={schedule:(e,i=!1,s=!1)=>{let c=s&&r,l=c?t:n;return i&&o.add(e),c&&e!==a&&l.delete(e),l.add(e),e},cancel:e=>{n.delete(e),o.delete(e)},process:e=>{if(s=e,r){i=!0;return}r=!0;let o=t;t=n,n=o,t.forEach(c),t.clear(),a=void 0,r=!1,i&&(i=!1,l.process(e))}};return l}var as=40;function os(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=rs.reduce((e,t)=>(e[t]=is(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=oa.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,as),1)),n.timestamp=o,n.isProcessing=!0,s.process(n),c.process(n),l.process(n),u.process(n),d.process(n),f.process(n),p.process(n),m.process(n),n.isProcessing=!1,r&&t&&(i=!1,e(h))},g=()=>{r=!0,i=!0,n.isProcessing||e(h)};return{schedule:rs.reduce((e,t)=>{let n=o[t];return e[t]=(e,t=!1,i=!1)=>(r||g(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<rs.length;t++)o[rs[t]].cancel(e)},state:n,steps:o}}var{schedule:ss,cancel:cs,steps:ls}=os(typeof requestAnimationFrame<`u`?requestAnimationFrame:da,!0,za),us=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>ss.update(t,e),stop:()=>cs(t),now:()=>za.isProcessing?za.timestamp:Ha.now()}},ds=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},fs=2e4;function ps(e,t=50,n=fs,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function ms(e,t=100,n){let{keyframes:r,velocity:i}=e,a=r&&r[r.length-1]-r[0],o=n({...e,velocity:i&&a?i*t/a:i,keyframes:[0,t]}),s=Math.min(ps(o),fs);return{type:`keyframes`,ease:e=>o.next(s*e).value/t,duration:ga(s)}}var hs=100,gs=10,_s=1,vs=800,ys=.3,bs=.3,xs=.01,Ss=2,Cs=.005,ws=.5,Ts=.01,Es=10,Ds=.05,Os=e=>e<0?1/Math.max(1+e,Ds):Math.max(1-e,Ds);function ks(e,t){if(!(e>1))return 1;let n=Math.sqrt(e*e-1),r=e-n,i=e+n,a=2*n*Math.exp(-t)*(1+t);return Ms(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function As(e,t){return e*Math.sqrt(1-t*t)}var js=12;function Ms(e,t,n){let r=n;for(let n=1;n<js;n++)r-=e(r)/t(r);return r}var Ns=.001;function Ps({duration:e=vs,bounce:t=ys}){let n,r,i=Os(t);e=aa(Ts,Es,ga(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=As(t,i),o=Math.exp(-r);return Ns-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=As(t*t,i);return(-n(t)+Ns>0?-1:1)*-a*o/s}):(n=t=>-.001+Math.exp(-t*e)*(t*e+1),r=t=>Math.exp(-t*e)*(-t*(e*e)));let a=5/e,o=Ms(n,r,a),s=o*ks(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:ha(e)}}var Fs=(e,t)=>(t?e>=0:e>0)&&e<1/0;function Is(e,t){if(Fs(e,t))return e}function Ls(e){let t=Is(e.stiffness),n=Is(e.damping,!0),r=Is(e.mass),i={...e,stiffness:t??hs,damping:n??gs,mass:r??_s,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=Os(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*ks(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,Ps(i)),i.isResolvedFromDuration=!0;Fs(i.stiffness)&&Fs(i.damping,!0)||(i.stiffness=hs,i.damping=gs)}return i}function Rs(e=bs,t=ys){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,isResolvedFromDuration:u,isTimeDefined:d}=Ls({...n}),f=e=>u?0:-ga(e),p=s/(2*Math.sqrt(o*c)),m=ga(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?xs:Ss),g.restDelta=n.restDelta||(e?Cs:ws)};_();let v,y,b;if(p<1){let e=As(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1),t=h-e,n=h+e,r=e<1||d?1/0:300/e,i=(e,t)=>Math.exp(t>r?(h-e)*r-h*t:-e*t),a={S:0,F:0};b=()=>{let t=(g.velocity+h*g.delta)/e;a.S=(g.delta+t)/2,a.F=(g.delta-t)/2},v=e=>g.target-a.S*i(t,e)-a.F*i(n,e),y=e=>t*a.S*i(t,e)+n*a.F*i(n,e)}b();let x=u&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>ha(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=ha(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(ps(S),fs),t=ds(t=>S.next(e*t).value,e,30);return e+`ms `+t}};return S}var zs=Object.assign(Rs,{applyToOptions:e=>{let t=ms(e,100,Rs);return e.ease=t.ease,e.duration=ha(t.duration),e.type=`keyframes`,e}});function Bs({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>e<s||e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o?o(g):g;_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:e?_+t:d},b,x,S=e=>{p(f.value)&&(b=e,x=zs({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function Vs(e,t,n){let r=[],i=oa.mix||ns,a=e.length-1;for(let o=0;o<a;o++){let a=n?.(e[o],e[o+1])||i(e[o],e[o+1]);t&&(a=fa(Array.isArray(t)?t[o]||da:t,a)),r.push(a)}return r}function Hs(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Vs(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=pa(e[r],e[r+1],n);return s[r](i)};return n?t=>l(aa(e[0],e[a-1],t)):l}function Us(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=pa(0,t,r);e.push(Bo(n,1,i))}}function Ws(e){let t=[0];return Us(t,e.length-1),t}function Gs(e,t){return e.map(e=>e*t)}function Ks(e,t){return e.map(()=>t||Ma).splice(0,e.length-1)}function qs({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`,mixer:i}){let a=typeof t[0]==`number`?void 0:i,o=Na(r)?r.map(Ra):Ra(r)||Ma,s={done:!1,value:t[0]},c=-1;if(!a){for(let e=1;e<t.length;e++)if(t[e]!==t[e-1]){if(c>=0){c=-2;break}c=e-1}}if(c>=0){let r=n&&n.length===t.length?n:Ws(t),i=r[c]*e,a=r[c+1]*e,l=t[c],u=t[c+1],d=Array.isArray(o)?o[c]:o,f=(oa.mix||ns)(l,u),p=t.length-2;return{calculatedDuration:e,next:t=>(s.value=c&&t<i?f(0):c<p&&(t>=a||!e)?typeof u==`number`?u:f(1):f(d(t>=a||!e?1:t<=i?0:(t-i)/(a-i))),s.done=t>=e,s)}}let l=Hs(Gs(n&&n.length===t.length?n:Ws(t),e),t,{ease:Array.isArray(o)?o:Ks(t,o),mixer:a});return{calculatedDuration:e,next:t=>(s.value=l(t),s.done=t>=e,s)}}var Js=5;function Ys(e,t,n){let r=Math.max(t-Js,0);return _a(n-e(r),t-r)}function Xs(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):Ys(t=>e.next(t).value,t,e.next(t).value)}function Zs(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a,o,s=0;for(let t=0;t<e.length;t++){let n=e[t];n!==null&&(s++||(a=n),o=n)}let c=i<0||t&&n!==`loop`&&t%2==1?0:s-1;return!c||r===void 0?c?o:a:r}var Qs={decay:Bs,inertia:Bs,tween:qs,keyframes:qs,spring:zs};function $s(e){typeof e.type==`string`&&(e.type=Qs[e.type])}var ec=40,tc=(e,t)=>t-e>ec&&!oa.useManualTiming?t:e;function nc(e,t){return{kind:e,animation:t,timestamp:Ha.now(),frameTimestamp:za.timestamp,frameIsProcessing:za.isProcessing}}function rc(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...nc(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function ic(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...nc(`layout-animation-start`,e),node:t})}catch{}}var ac=class{constructor(){this.isResolved=!1}get finished(){return this._finished||=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e}),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,t){return this.finished.then(e,t)}},oc=e=>e/100,sc=e=>Math.round(e*1e4)/1e4,cc=class extends ac{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options,t=Ha.now();e&&e.updatedAt!==t&&this.tick(e.updatedAt=t),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),rc(this,this.options)}initAnimation(){let{options:e}=this;$s(e);let{type:t=qs,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||qs;this.mixKeyframes=void 0,s!==qs&&typeof o[0]!=`number`&&(this.mixKeyframes=fa(oc,e.mixer?.(o[0],o[1])||ns(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=ps(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){this.currentTime=this.holdTime??Math.round(e-this.startTime)*this.playbackSpeed}tick(e,t=!1){let{generator:n,totalDuration:r,calculatedDuration:i}=this;if(this.startTime===null)return n.next(0);let{delay:a=0,keyframes:o,type:s,onUpdate:c,finalKeyframe:l}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=tc(this.startTime,e)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let u=this.currentTime-a*(this.playbackSpeed>=0?1:-1),d=this.playbackSpeed>=0?u<0:u>r;this.currentTime=Math.max(u,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let f=this.generate(this.currentTime,d),{done:p}=f;d||(p=this.playbackSpeed>=0?i<1/0?this.currentTime>=r:p:this.currentTime<=0);let m=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&p);return m&&s!==Bs&&(f.value=Zs(o,this.options,l,this.speed)),c&&c(f.value),m&&this.finish(),f}at(e){return this.holdTime??sc((e-this.startTime)*this.playbackSpeed)}sampleAt(e,t){let{options:n,totalDuration:r}=this,i=this.at(e)-(n.delay||0);return i>=r&&n.type!==Bs?Zs(n.keyframes,n,t?void 0:n.finalKeyframe):this.generate(Math.max(i,0),i<0).value}generate(e,t){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o}=this,{keyframes:s,repeat:c,repeatType:l,repeatDelay:u}=this.options,d=e,f=n;if(c){let t=Math.min(e,r)/o,n=Math.floor(t),i=t%1;!i&&t>=1&&(i=1),i===1&&n--,n=Math.min(n,c+1),n%2&&(l===`reverse`?(i=1-i,u&&(i-=u/o)):l===`mirror`&&(f=a)),d=aa(0,1,i)*o}let p;return t?(this.delayState.value=s[0],p=this.delayState):p=f.next(d),i&&!t&&(p.value=i(p.value)),p}get duration(){return ga(this.calculatedDuration)}get iterationDuration(){return this.duration+ga(this.options.delay??0)}get time(){return ga(this.currentTime)}set time(e){this.state===`finished`&&this.updateFinished(),e=ha(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return Xs(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(Ha.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=ga(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=us,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??(this.pendingStartTime=n):this.startTime=n-this.holdTime/(this.playbackSpeed||1),this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(Ha.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},lc=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function uc(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match($a)||[];if(!r)return e;let i=n.replace(r,``),a=+!!lc.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var dc=/\b([a-z-]*)\(.*?\)/gu,fc={...G,getAnimatableNone:e=>{let t=e.match(dc);return t?t.map(uc).join(` `):e}},pc={...G,getAnimatableNone:e=>{let t=G.parse(e);return G.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},mc={...Xa,transform:Math.round},hc={rotate:fo,pathRotation:fo,rotateX:fo,rotateY:fo,rotateZ:fo,scale:Qa,scaleX:Qa,scaleY:Qa,scaleZ:Qa,skew:fo,skewX:fo,skewY:fo,distance:W,translateX:W,translateY:W,translateZ:W,x:W,y:W,z:W,perspective:W,transformPerspective:W,opacity:Za,originX:go,originY:go,originZ:W},gc={borderWidth:W,borderTopWidth:W,borderRightWidth:W,borderBottomWidth:W,borderLeftWidth:W,borderRadius:W,borderTopLeftRadius:W,borderTopRightRadius:W,borderBottomRightRadius:W,borderBottomLeftRadius:W,width:W,maxWidth:W,height:W,maxHeight:W,top:W,right:W,bottom:W,left:W,inset:W,insetBlock:W,insetBlockStart:W,insetBlockEnd:W,insetInline:W,insetInlineStart:W,insetInlineEnd:W,padding:W,paddingTop:W,paddingRight:W,paddingBottom:W,paddingLeft:W,paddingBlock:W,paddingBlockStart:W,paddingBlockEnd:W,paddingInline:W,paddingInlineStart:W,paddingInlineEnd:W,margin:W,marginTop:W,marginRight:W,marginBottom:W,marginLeft:W,marginBlock:W,marginBlockStart:W,marginBlockEnd:W,marginInline:W,marginInlineStart:W,marginInlineEnd:W,fontSize:W,backgroundPositionX:W,backgroundPositionY:W,...hc,zIndex:mc,fillOpacity:Za,strokeOpacity:Za,numOctaves:mc},_c={...gc,color:vo,backgroundColor:vo,outlineColor:vo,fill:vo,stroke:vo,borderColor:vo,borderTopColor:vo,borderRightColor:vo,borderBottomColor:vo,borderLeftColor:vo,filter:fc,WebkitFilter:fc,mask:pc,WebkitMask:pc},vc=e=>_c[e],yc=new Set([fc,pc]),bc,xc,Sc;function Cc(e,t){if(e===bc&&t===xc)return Sc;let n=vc(e);return yc.has(n)||(n=G),Sc=n.getAnimatableNone?n.getAnimatableNone(t):void 0,bc=e,xc=t,Sc}function wc(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Tc=e=>e*180/Math.PI,Ec=e=>Oc(Tc(Math.atan2(e[1],e[0]))),Dc={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ec,rotateZ:Ec,skewX:e=>Tc(Math.atan(e[1])),skewY:e=>Tc(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Oc=e=>(e%=360,e<0&&(e+=360),e),kc=Ec,Ac=e=>Math.hypot(e[0],e[1]),jc=e=>Math.hypot(e[4],e[5]),Mc={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ac,scaleY:jc,scaleZ:e=>Math.hypot(e[8],e[9],e[10]),scale:e=>(Ac(e)+jc(e))/2,rotateX:e=>Oc(Tc(Math.atan2(e[6],e[5]))),rotateY:e=>Oc(Tc(Math.atan2(-e[2],e[0]))),rotateZ:kc,rotate:kc,skewX:e=>Tc(Math.atan(e[4])),skewY:e=>Tc(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Nc(e){return+!!e.includes(`scale`)}function Pc(e,t){if(!e||e===`none`)return Nc(t);let n=e.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!n)return Nc(t);let r=(n[1]?Mc:Dc)[t],i=n[2].split(`,`).map(e=>parseFloat(e));return typeof r==`function`?r(i):i[r]}var Fc=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return Pc(n,t)},Ic=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Lc=new Set([...Ic,`pathRotation`]),Rc=e=>e===Xa||e===W,zc=new Set([`x`,`y`,`z`]),Bc=Ic.filter(e=>!zc.has(e));function Vc(e){let t=[];return Bc.forEach(n=>{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}var Hc=new Set([`bottom`,`right`]);function Uc(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}var Wc=({transform:e})=>Pc(e,`x`),Gc=({transform:e})=>Pc(e,`y`),Kc={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>Uc(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>Uc(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:Wc,y:Gc,translateX:Wc,translateY:Gc},qc=new Set,Jc=!1,Yc=!1,Xc=!1;function Zc(){if(Yc){let e=[],t=new Set,n=new Set;qc.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),Hc.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=Vc(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Yc=!1,Jc=!1,qc.forEach(e=>e.complete(Xc)),qc.clear()}function Qc(){qc.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Yc=!0)})}function $c(){Xc=!0,Qc(),Zc(),Xc=!1}function el(e,t,n){if(typeof e==`string`){if(sa(e)||la(e))return parseFloat(e);if(!G.test(e)&&G.test(n))return Cc(t,n)}return e??void 0}var tl=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(qc.add(this),Jc||(Jc=!0,ss.read(Qc),ss.resolveKeyframes(Zc))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=el(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}wc(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),qc.delete(this)}cancel(){this.state===`scheduled`&&(qc.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},nl=e=>e.startsWith(`--`);function rl(e,t,n){nl(t)?e.style.setProperty(t,n):e.style[t]=n}var il={};function al(e,t){let n=ua(e);return()=>il[t]??n()}var ol=al(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),sl=al(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),cl=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ll={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:cl([0,.65,.55,1]),circOut:cl([.55,0,1,.45]),backIn:cl([.31,.01,.66,-.59]),backOut:cl([.33,1.53,.69,.99])};function ul(e,t){if(e)return typeof e==`function`?sl()?ds(e,t):`ease-out`:Fa(e)?cl(e):Array.isArray(e)?e.map(e=>ul(e,t)||ll.easeOut):ll[e]}function dl(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=ul(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function fl(e){return typeof e==`function`&&`applyToOptions`in e}function pl({type:e,...t}){return fl(e)&&sl()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var ml=class extends ac{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e;let c=pl(e);this.animation=dl(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=this.onFinish=()=>{if(this.animation.onfinish=null,this.finishedTime=this.time,!i){let e=Zs(r,this.options,o,this.speed);this.updateMotionValue?.(e),rl(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},rc(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.onfinish=this.onFinish,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.isStopped||(this.animation.onfinish=this.onFinish),this.animation.finish?.()}cancel(){this.animation.onfinish=null;try{this.animation.cancel()}catch{}}stop(){this.isStopped||(this.isStopped=!0,this.state!==`idle`&&this.finishedTime===null&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel()))}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return ga(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+ga(e)}get time(){return ga(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=ha(e),t&&(this.animation.pause(),this.updateFinished())}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=this.onFinish=null,e&&ol()?(this.animation.timeline=e,t?.(this.animation),da):n(this)}},hl={anticipate:Ea,backInOut:Ta,circInOut:ka};function gl(e){return e in hl}function _l(e){typeof e.ease==`string`&&gl(e.ease)&&(e.ease=hl[e.ease])}var vl=class extends ml{constructor(e){_l(e),$s(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}elapsed(){return this.state===`running`?(Ha.now()-this.startTime)*this.speed:this.time*1e3}sample(e){if(!this.sampler){let{motionValue:e,onUpdate:t,onComplete:n,onPlay:r,onStop:i,element:a,...o}=this.options;this.sampler=new cc({...o,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,e)).value}liveValue(){let{state:e}=this;if(e===`running`||e===`paused`)return this.sample(this.elapsed())}updateMotionValue(e){let{motionValue:t,element:n,name:r}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let{speed:i}=this,a=this.elapsed(),o=this.state===`running`&&i?aa(0,10,a):0,s=this.sample(a);n&&r&&rl(n,r,s),t.setWithVelocity(this.sample(a-o*Math.sign(i)),s,o/Math.abs(i||1))}},yl=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(G.test(e)||e===`0`)&&!e.startsWith(`url(`));function bl(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function xl(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=yl(i,t),s=yl(a,t);return!o||!s?!1:bl(e)||(n===`spring`||fl(n))&&r}function Sl(e){e.duration=0,e.type=`keyframes`}var Cl=new Set([`opacity`,`clipPath`,`filter`,`transform`]),wl=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Tl(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&wl.test(e[t]))return!0;return!1}var El=({mixer:e,keyframes:t})=>e&&typeof t[0]!=`number`&&t.some((n,r)=>r&&e(t[r-1],n)),Dl=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),Ol=()=>!oa.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,`animate`);function kl(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(Cl.has(n)||Dl.has(n)))return!1;let c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return Ol()&&(Cl.has(n)||Dl.has(n)&&Tl(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`&&!El(e)}var Al=(e,t)=>t&&typeof e==`number`?t.transform(e):e,jl={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Ml=Ic.length,Nl={},Pl=(e,t,n=Al(t,hc[e]))=>(Nl[e]||(Nl[e]=(jl[e]||e)+`(`))+n+`)`,Fl=(e,t)=>(typeof t==`number`?t:parseFloat(t))===+!!e.startsWith(`scale`);function Il(e,t,n){let r=``;for(let i=0;i<Ml;i++){let a=Ic[i],o=e[a];if(o===void 0)continue;let s=n&&(t[a]=Al(o,gc[a]));Fl(a,o)||(r+=Pl(a,o,s||void 0)+` `)}let i=e.pathRotation;return i&&(r+=Pl(`rotate`,i)),r=r.trim(),n?n(t,r):r||`none`}var Ll=new WeakMap,Rl=200,zl=.001,Bl=.1,Vl=.001,Hl=100,Ul=100,Wl=new Set([`linear`,`easeIn`,`easeOut`,`easeInOut`]),Gl=e=>Wl.has(e),Kl=new WeakMap,ql=(e,t)=>{let n=Kl.get(e);return n?.[0]!==t&&(n=[t,`linear(`+Ws(Array(t+1)).map(t=>sc(e(t))+` `+sc(t*100)+`%`)+`)`],Kl.set(e,n)),n[1]},Jl=(e,t)=>Math.min(Rl,Math.max(2,Math.ceil((t-e)/10))),Yl=(e,t)=>Math.abs(e-t)<=zl,Xl=(e,t)=>e-t,Zl=(e,t,n)=>Ws(Array(n+1)).map(n=>Bo(e,t,n)),Ql=e=>e.motionValue.owner,$l=e=>Ll.get(e),eu=({state:e})=>e===`idle`||e===`finished`,tu=(e,t)=>e.latestValues?e.latestValues[t]:e.getValue(t)?.get(),nu=({name:e,motionValue:t})=>e&&Ic.includes(e)&&t?.owner?.current instanceof HTMLElement&&Ol()&&sl();function ru(e){let t=Ql(e),{onUpdate:n,transformTemplate:r}=t.getProps();return!e.isHandoff&&!n&&!e.hasOnUpdate&&!r&&e.type!==`inertia`&&(tu(t,`transform`)||`none`)===`none`&&!tu(t,`pathRotation`)&&!t.projection?.isProjecting()&&!El(e)}var iu=class{constructor(e,t,n,r){this.element=e,this.update=t,this.makeDriver=n,this.animation=r}get js(){return this.driver||=this.makeDriver(this.update)}now(){return this.driver||this.makeDriver!==us?this.js.now():za.isProcessing?za.timestamp:Ha.now()}start(e=!0){let t=$l(this.element);!t||t.isJS?this.js.start(e):t.schedule(!1,!e)}stopJS(){this.driver?.stop()}stop(){this.stopJS();let e=$l(this.element);e&&!e.isFinishing&&e.release(this.animation)}},au,ou=class extends cc{constructor(e){let t=Ql(e).current,{driver:n=us}=e,r,i=ru(e);e.driver=e=>new iu(t,e,n,r),super(e),r=this;let a=this.driver;a&&(a.animation=this),this.canAccelerate=i;let{stop:o}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),o()}}offsets(){let{keyframes:e,times:t}=this.options;return t||(this.offsetsOf!==e&&(this.offsetsOf=e,this.cachedOffsets=Ws(e)),this.cachedOffsets)}get group(){return $l(Ql(this.options).current)}get js(){return this.driver?.js}stopJS(){this.driver?.stopJS()}get name(){return this.options.name}timing(){let{startTime:e,speed:t,totalDuration:n}=this,{delay:r=0,repeatType:i}=this.options;return this.holdTime===null?n===1/0?[e+r/t,this.resolvedDuration*(i===`loop`?1:2)/t||1]:[e+(r+n)/t,0]:[1/0,0]}isAccelerated(){let{group:e,state:t}=this;return e?.tracks.has(this)&&!e.isJS&&this.canAccelerate&&(t===`running`||t===`paused`)}liveValue(){return this.isAccelerated()?this.sampleAt(Ha.now()):void 0}tween(){let{keyframes:e,type:t,repeat:n,delay:r=0}=this.options,i=-1;if(n||t!==qs||this.holdTime!==null)return;for(let t=1;t<e.length;t++)if(e[t]!==e[t-1]){if(i>=0)return;i=t-1}let{ease:a}=this.options;Na(a)&&(a=a[i]);let o=this.offsets(),s=e=>this.startTime+(r+o[e]*this.totalDuration)/this.speed;if(i>=0){let e=Fa(a)?cl(a):Gl(a)?ll[a]:Ra(a);return[s(i),s(i+1),typeof e==`string`||Yl(e(0),0)&&Yl(e(1),1)?e:void 0]}}boundaries(e,t){let{startTime:n,speed:r,resolvedDuration:i,options:a}=this,{delay:o=0,repeat:s=0,repeatDelay:c=0,repeatType:l,type:u}=a,d=(u||qs)===qs?this.offsets():[0,1],f=n+o/r,p=[];if(this.holdTime!==null||!(i>0))return p;for(let n=Math.max(0,Math.floor((e-f)*r/i));n<=s;n++){let a=f+n*i/r;if(a>t)break;for(let o of d){let s=a+(n%2&&l&&l!==`loop`?1-o:o)*(i-c)/r;s>e&&s<t&&p.push(s)}}return p}numberAt(e){return parseFloat(this.sampleAt(e,!0))}sync(){let e=Ha.now(),t=this.sampleAt(e,!0);this.options.motionValue.setWithVelocity(this.holdTime===null?this.sampleAt(e-10,!0):t,t,10)}play(){this.isStopped||((this.group||lu(Ql(this.options))).tracks.add(this),super.play())}pause(){super.pause(),this.isAccelerated()&&this.group.schedule(!1)}complete(){super.complete();let{group:e}=this;e&&!e.isJS&&this.tick(Ha.now())}get time(){return this.isAccelerated()?ga(aa(0,this.totalDuration,this.at(Ha.now())-(this.options.delay||0))):super.time}set time(e){(au??=Object.getOwnPropertyDescriptor(cc.prototype,`time`).set).call(this,e)}attachTimeline(e){return this.canAccelerate=!1,this.group?.demote(!0),super.attachTimeline(e)}},su,cu=e=>{su||queueMicrotask(()=>{let e=su;su=void 0,e.forEach(e=>e())}),(su||=[]).push(e)};function lu(e){let t=e.current,n=new Set,r=new Map,i={},a=[],o=new Map,s=[],c=!1,l=!1,u=!1,d=!1,f=-1/0,p,m=1/0,h,g=e=>{for(let t of n)if(t.name===e)return!0},_=(t,n)=>{let o={};for(let s of t===void 0?Ic:a){let a=r.get(s),c=t===void 0?tu(e,s):a?a.sampleAt(n>t&&!a.timing()[1]?n:t):i[s];c!==void 0&&(o[s]=c)}return o},v=(e,t)=>{let n=``;for(let r in e){let i=e[r];t&&Fl(r,i)||(n+=Pl(r,i)+` `)}return(t?n.trim():n)||`none`},y=(e,t)=>v(_(e,t)),b=(e=_())=>{t.style.transform=v(e,!0)},x=e=>{e.onfinish=e.oncancel=null,e.cancel()},S=(e=!0)=>{clearTimeout(p),m=1/0,h=void 0,e&&b(),s.forEach(({animation:e})=>x(e)),s=[]},C=(e,n)=>new Animation(new KeyframeEffect(t,e,n)),w=(e,t,n=1/0)=>{let r={animation:e,offset:t,end:n};e.startTime=Ha.now()+t,n<1/0&&(e.onfinish=()=>{r.isDone=!0,s.some(e=>e.end===1/0)&&(x(e),s=s.filter(e=>e!==r)),P.schedule(!1)}),e.oncancel=()=>s.includes(r)&&P.demote(),s.push(r)},T=(e,t,n)=>{let r=(t,n)=>Math.abs(e(n)-e(t)),i=r(t,n);for(;n-t>.01;){let e=(t+n)/2;r(t,e)>r(e,n)?n=e:t=e}return r(t,n)>i/2?[t,n]:[]},E=(e,t,n,r)=>{let i=Jl(t,n);if(r.length*4>i)return;let a;for(let r of e){let e=r.numberAt(t),i=(r.numberAt((t+n)/2)-e)/(r.numberAt(n)-e);if(i===i){if(a===void 0)a=i;else if(!Yl(i,a))return}}let o=Zl(t,n,i).concat(r).sort(Xl),s=e=>pa(t,n,e),c,l;for(let n of e){let e=n.numberAt(t),r=o.map(t=>n.numberAt(t)-e),i=r[r.length-1],a=r.some(e=>Math.abs(e)*zl>Math.abs(i))?0:i,s=r.map(e=>a?e/a:e);if(a&&!c)c=s,l=t=>(n.numberAt(t)-e)/a;else if(s.some((e,t)=>!Yl(e,a&&c[t])))return}if(!c||c.every((e,t)=>Yl(e,s(o[t]))))return`linear`;let u=[],d=(e,t=l(e))=>u.push(sc(t)+` `+sc(s(e)*100)+`%`);return c.forEach((e,t)=>{t&&Math.abs(e-c[t-1])>.2&&T(l,o[t-1],o[t]).forEach(e=>d(e)),d(o[t],e)}),`linear(`+u+`)`},D=(e,t,n,r)=>{let i=[t],a=[],o=n,s=t;for(let r of e){let e=r.tween();if(e?.[2]!==`linear`){let[i,c]=r.timing(),[l,u]=e||[t,c?n:i];o=Math.min(o,l),s=Math.max(s,u),a.push(r)}}o=Math.max(t,o),s=Math.min(n,s);let c=(e,t)=>a.every(n=>!(Math.abs(n.numberAt((e+t)/2)-(n.numberAt(e)+n.numberAt(t))/2)>(n.name.startsWith(`scale`)?Vl:Bl))),l=(t,n,r)=>{if(n-t<1||c(t,n))i.push(n);else if(r<4)l(t,(t+n)/2,r+1),l((t+n)/2,n,r+1);else{for(let r of e)i.push(...T(e=>r.numberAt(e),t,n));i.push(n)}},u=s>o?Zl(o,s,Math.ceil((s-o)/100)):[];u.push(n);for(let e of r)u.push(e,Math.min(e+.01,n));let d=t;for(let e of u.sort(Xl))e>d&&l(d,e,0),d=e;return i.sort(Xl)},O=e=>{let t;for(let n of e){let e=n.tween();if(!e||t&&(Math.abs(e[0]-t[0])>1||Math.abs(e[1]-t[1])>1))return;t=[e[0],e[1],!t||e[2]===t[2]?e[2]:void 0]}return t},k=(e,t,n,r,i={fill:`both`},a)=>{let o=r?[]:e.flatMap(e=>e.boundaries(t,n)),s=r||E(e,t,n,o),c=s?[t,n]:D(e,t,n,o),l=c.map(e=>y(e,a)),u={transform:l};return s||(u.offset=c.map(e=>pa(t,n,e))),l.every(e=>e===l[0])&&(b(_(t,a)),u=null),C(u,{...i,duration:n-t,easing:s||`linear`})},A=e=>{let t=Ha.now()+e;t<m&&(clearTimeout(p),m=t,p=setTimeout(()=>{m=1/0,P.schedule(!1)},e))},j=t=>{let c=t,l=0,u=0,d=[],f=[],p=new Set;r.clear(),o=new Map;for(let e of n){r.set(e.name,e);let[n,i]=e.timing(),a=n===1/0;if(o.set(e,[e.at(t),e.speed,a]),!a){if(e.speed<0)return;if(i){if(l){let e=(n-u)/i;if(Math.abs(i-l)>1||Math.abs(e-Math.round(e))*l>1)return}else l=i,u=n;f.push(e)}else p.add(n);d.push(e),c=Math.max(c,n)}}i={},a=Ic.filter(t=>{if(r.has(t))return!0;let n=i[t]=tu(e,t);return n!==void 0&&!Fl(t,n)}),S(!1);let m=!l&&O(d);try{if(c>t){let e;if(m&&m[1]>t){let[n,r,i]=m;if(n-t>Ul)return d.forEach(e=>e.sync()),A(h=n-t-Ul),!0;e=typeof i==`string`?i:i?ql(i,Jl(n,r)):E(d,n,r,[]),e&&w(k(d,n,r,e,{fill:`both`,endDelay:c-r}),n-t,c-n)}e||w(k(d,t,c),0,c-t),p.forEach(e=>e<c-1&&w(C(null,{duration:e-t}),0,e-t))}if(l){let e=u+Math.floor((c-u)/l)*l;w(k(f,e,e+l,void 0,{iterations:1/0,iterationStart:(c-e)/l,fill:`forwards`},c),c-t)}}catch{return}return s.length||S(),!0},M=(e,t)=>{let r,i=0;for(let t of n){let n=o.get(t);if(!n)return!1;let[a,c,l]=n,u=t.at(e),d=t.timing()[0]===1/0;if(l){if(d&&(u===a||!s.length))continue;return!1}let f=(u-a)/c,p=d?0:t.speed/c;if(r===void 0)r=f,i=p;else if(Math.abs(f-r)>1||p!==i)return!1}if(r===void 0)return!0;if(!s.length){if(h===void 0||t&&i)return!1;if(i){let e=(h-r)/i;if(e<1)return!1;A(e)}return!0}for(let{offset:e,end:n,isDone:i}of s){let a=r-e;if(n<1/0&&(i?a<n-1:a<0&&(t||e<=0)||a>=n))return!1}for(let{animation:t,offset:n,isDone:a}of s){if(a)continue;let o=r-n;i&&t.updatePlaybackRate&&t.playState===`running`&&Math.abs(Number(t.currentTime)-o)<20?t.playbackRate!==i&&t.updatePlaybackRate(i):i?(t.playbackRate!==i&&(t.playbackRate=i),t.startTime=e-o/i):(t.startTime=null,t.currentTime=o)}return!0},N=()=>!n.size&&(u=!0,$l(t)===P&&Ll.delete(t),P.isJS||S(),!0),ee=()=>{let t=Ha.now();if(P.isJS||(P.isFinishing=!0,n.forEach(n=>{let[r,a]=n.timing();n.state===`running`&&n.speed>0&&!a&&r<=t+1&&(n.complete(),i[n.name]=tu(e,n.name),o.has(n)||(c=!0))}),P.isFinishing=!1),l=!1,u||(n.forEach(e=>eu(e)&&n.delete(e)),N()))return;for(let e of n)if(!e.canAccelerate)return P.demote(!0);P.isJS&&(P.isJS=!1,c=!0,n.forEach(e=>e.stopJS()));let r=c,a=d;if(c=d=!1,r||!M(t,a)){if(a){if(t-f<Hl)return P.demote();f=t}if(!j(t))return P.demote()}else if(h!==void 0&&!a)return;n.forEach(e=>e.timing()[0]===1/0&&e.sync())},P={tracks:n,isJS:!1,isFinishing:!1,schedule(e,t){u||(c||=e,d||=!!t,l||(l=!0,za.isProcessing?ss.render(ee,!1,!0):cu(ee)))},release(e){eu(e)&&n.delete(e),N()||P.schedule(!0)},check(){if(!P.isJS){for(let t in i)if(tu(e,t)!==i[t]&&!g(t))return P.schedule(!0,!0)}},demote(e){if(!(P.isJS||u))return n.forEach(t=>{t.isAccelerated()&&t.sync(),e||(t.canAccelerate=!1)}),P.isJS=!0,o=new Map,S(),n.forEach(e=>e.state===`running`&&e.js?.start()),!0}};return Ll.set(t,P),P}var uu=class extends ac{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ha.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||tl;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=Ha.now();let u=xl(e,i,a,o);u||((oa.instantAnimations||!s)&&l?.(Zs(e,n,t)),e[0]=e[e.length-1],Sl(n),n.repeat=0);let{onComplete:d}=n;n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{d?.(),this.notifyFinished()};let f=u&&!c&&kl(n),p=!f&&nu(n);r&&(f||p||this.resolvedAt!==this.createdAt)&&(n.startTime??=tc(this.createdAt,this.resolvedAt));let m;if(f){n.element=n.motionValue?.owner?.current;try{m=new vl(n)}catch{m=new cc(n)}}else m=p?new ou(n):new cc(n);this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),$c()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation?.cancel(),this.keyframeResolver?.cancel()}},du=class{constructor(e){this.stop=()=>{for(let e of this.animations)e.stop()},this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){for(let t of this.animations)t.time=e}get speed(){return this.getAll(`speed`)}set speed(e){for(let t of this.animations)t.speed=e}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return fu(this.animations,`duration`)}get iterationDuration(){return fu(this.animations,`iterationDuration`)}play(){for(let e of this.animations)e.play()}pause(){for(let e of this.animations)e.pause()}cancel(){for(let e of this.animations)e.cancel()}complete(){for(let e of this.animations)e.complete()}};function fu(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var pu=class extends du{then(e,t){return this.finished.finally(e).then(()=>{})}};function mu(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var hu=30,gu=e=>!isNaN(parseFloat(e)),_u={current:void 0},vu=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=Ha.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.dirty(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Ha.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=gu(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new ma)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new ma,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){ss.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){t&&(this.updatedAt=Ha.now(),this.stop()),this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stopPassiveEffect?.()}dirty(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){(this.dependents||=new Set).add(e)}removeDependent(e){this.dependents?.delete(e)}get(){_u.current?.push(this);let e=this.animation?.liveValue?.();return e===void 0?this.current:e}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){let e=Ha.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>hu)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,hu);return _a(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return new Promise(t=>this.run(e,t))}run(e,t){this.stop(),this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&(this.animation=void 0),t?.()}),n||(this.animation=r),this.events.animationStart?.notify()}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}};function yu(e,t){return new vu(e,t)}function bu(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function xu(e,t){let n=e?.[t]??e?.default??e;return n===e?n:bu(n,e)}var Su={type:`spring`,stiffness:500,damping:25,restSpeed:10},Cu=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),wu={type:`keyframes`,duration:.8},Tu={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Eu=(e,{keyframes:t})=>t.length>2?wu:Lc.has(e)?e.startsWith(`scale`)?Cu(t[1]):Su:Tu,Du=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`,`out`,`mixer`]);function Ou(e){for(let t in e)if(!Du.has(t))return!0;return!1}var ku=(e,t,n,r={},i,a)=>o=>{let s=xu(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=ha(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i,hasOnUpdate:!!s.onUpdate};Ou(s)||Object.assign(u,Eu(e,u)),u.duration&&=ha(u.duration),u.repeatDelay&&=ha(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(Sl(u),u.delay===0&&(d=!0)),(oa.instantAnimations||oa.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,Sl(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=Zs(u.keyframes,s);if(e!==void 0){ss.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new cc(u):new uu(u)},Au=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ju(e){let t=Au.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Mu(e,t,n=1){let[r,i]=ju(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return sa(e)?parseFloat(e):e}return qa(i)?Mu(i,t,n+1):i}function Nu(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Pu(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...Nu(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function Fu(e,t,n){return Pu(e.getProps(),t,n,e)}var Iu=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,Lu=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Ic]),Ru=e=>Array.isArray(e);function zu(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,yu(n))}function Bu(e){return Ru(e)?e[e.length-1]||0:e}function Vu(e,t){let{transitionEnd:n={},transition:r={},...i}=Fu(e,t)||{};i={...i,...n};for(let t in i)zu(e,t,Bu(i[t]))}var Hu=e=>!!(e&&e.getVelocity);function Uu(e){return!!(Hu(e)&&e.add)}function Wu(e,t){let n=e.getValue(`willChange`);if(Uu(n))return n.add(t);if(!n&&oa.WillChange){let n=new oa.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}var Gu=`data-framer-appear-id`;function Ku(e){return e.props[Gu]}var qu=typeof window<`u`;function Ju({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function Yu(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?bu(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&(p.animateValues?p.animateValues(t=>e.getValue(t,e.latestValues[t]??0),s,a,n,d):p.animateVisualElement?.(e,s,a,n,d));for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&Ju(f,t))continue;let o={delay:n,...xu(f?.out[t]||a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){ss.update(()=>r.set(i));continue}let p=!1;if(qu&&window.MotionHandoffAnimation){let n=Ku(e);if(n){let e=window.MotionHandoffAnimation(n,t,ss);e!==null&&(o.startTime=e,p=!0)}}Wu(e,t);let m=l??e.shouldReduceMotion;r.run(ku(t,r,i,m&&Lu.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>ss.update(()=>{o&&Vu(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Xu(e,t,n={}){let r=Fu(e,t,Iu(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?Yu(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(Xu(e,t,{...n,delay:r+(typeof o==`function`?0:o)+mu(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function Zu(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>Xu(e,t,n))):typeof t==`string`?Xu(e,t,n):Promise.all(Yu(e,Fu(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var Qu={test:e=>e===`auto`,parse:e=>e},$u=e=>t=>t.test(e),ed=[Xa,W,po,fo,ho,mo,Qu],td=e=>ed.find($u(e));function nd(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||la(e)}var rd=new Set([`auto`,`none`,`0`]);function id(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!rd.has(t)&&ko(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=Cc(n,i))}var ad=class extends tl{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}scheduleResolve(){if(this.canReadNow()&&(this.readKeyframes(),!this.needsMeasurement))return this.complete();super.scheduleResolve()}canReadNow(){let{unresolvedKeyframes:e,element:t,motionValue:n}=this,r=e[0]??n?.get();if(!t?.current||r===void 0)return!1;for(let t=0;t<e.length;t++)if(Ya(t?e[t]:r))return!1;return!0}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t?.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),qa(r))){let i=Mu(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Lu.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=td(r),o=td(i);if(Ya(r)!==Ya(i)&&Kc[n])this.needsMeasurement=!0;else if(a!==o){if(Rc(a)&&Rc(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else Kc[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||nd(e[t]))&&n.push(t);n.length&&id(e,n,t)}measure(){let{element:e,name:t}=this;return Kc[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e?.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e?.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.resolveNoneKeyframes()}},od=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`],sd=[];function cd(e){ld(e),sd.unshift(e)}function ld(e){ia(sd,e)}function ud(e){return sd.find(t=>t.test(e))}function dd(e,t,n={},r){let i=[],{velocity:a,path:o}=n,s=n.reduceMotion??r?.shouldReduceMotion;o?.animateValues&&r&&(t={...t},o.animateValues(e,t,n,0,i));for(let o in t){if(o===`transition`||o===`transitionEnd`)continue;let c=t[o];if(c===void 0)continue;let l=e(o),u=l.get();u!==void 0&&!l.isAnimating()&&!Array.isArray(c)&&c===u&&!a?ss.update(()=>l.set(c)):(l.run(ku(o,l,c,s&&Lu.has(o)?{type:!1}:n,r)),l.animation&&i.push(l.animation))}let{transitionEnd:c}=t;if(c){let t=()=>ss.update(()=>{for(let t in c)e(t).set(c[t])});i.length?Promise.all(i).then(t):t()}return i}function fd(e,t,n,r,i){let a,o=!1,s=dd(r=>{let s=a?.[r]??e.get(t,r);if(!s){let c;if(!i){let i=n[r];c=pd(i)??e.read(t,r,i)}s=yu(c,{owner:i}),o?e(t,{[r]:s}):(a||={})[r]=s}return s},n,r,i);return o=!0,a&&e(t,a),s}function pd(e){let t=Array.isArray(e)?e[0]:void 0;return t===null?void 0:t}function md(e){return ca(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function hd(e){return ca(e)&&`ownerSVGElement`in e}var gd={};function _d(e){return gd.current?.add(e),e}var vd=e=>gd.current?gd.current.bind(e):e;function yd(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=t?t.current:gd.current?.root||document,i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var bd=class{constructor(e=ss.render){this.step=e,this.values=new Map,this.pending=[],this.numPending=0,this.flush=()=>{let{pending:e,numPending:t}=this;this.numPending=0;for(let n=0;n<t;n++)e[n]()}}set(e,t,n,r){if(this.values.get(e)?.onRemove(),r)for(let e of this.values.values())e.value===r&&(n=e.render);let i=()=>n&&this.schedule(n);t.get()!==void 0&&i();let a=t.on(`change`,i),o=()=>{a(),n&&!r&&this.cancel(n),this.values.get(e)?.onRemove===o&&this.values.delete(e)};return this.values.set(e,{value:t,render:r?void 0:n,onRemove:o}),o}get(e){return this.values.get(e)?.value}release(){let e=new Map;return this.values.forEach((t,n)=>{e.set(n,t.value),t.onRemove()}),this.transformKeys=this.transformValues=void 0,e}schedule(e){let{pending:t,numPending:n}=this;for(let r=0;r<n;r++)if(t[r]===e)return;n||this.step(this.flush),t[this.numPending++]=e}cancel(e){let{pending:t}=this;for(let n=0;n<this.numPending;n++)if(t[n]===e){t[n]=t[--this.numPending];return}}};function xd(e,{step:t,...n}={}){let r=new WeakMap;return Object.assign((n,i)=>{let a=r.get(n)??new bd(t);r.set(n,a);let o=[];for(let t in i){let r=i[t],s=e(n,a,t,r);o.push(s)}return()=>{for(let e of o)e()}},n,{get:(e,t)=>r.get(e)?.get(t),flush:e=>r.get(e)?.flush(),state:e=>r.get(e)})}function Sd(e){let t=``,{transformKeys:n=[],transformValues:r={}}=e;for(let e=0;e<n.length;e++){let i=n[e],a=r[i].getCurrent();a!==void 0&&(Fl(i,a)||(t+=(t&&` `)+Pl(i,a)))}let i=e.get(`pathRotation`)?.get();return i&&(t+=(t&&` `)+Pl(`rotate`,i)),t||`none`}var Cd=new Set([`originX`,`originY`,`originZ`]),wd=(e,t)=>Al(e.get(t)?.get(),gc[t]),Td=(e,t,n,r)=>{let i,a;if(Lc.has(n)){if(n!==`pathRotation`){let e=t.transformKeys??=[];(t.transformValues??={})[n]=r,e.includes(n)||(e.push(n),e.sort((e,t)=>Ic.indexOf(e)-Ic.indexOf(t)))}t.get(`transform`)||(!md(e)&&!t.get(`transformBox`)&&Td(e,t,`transformBox`,new vu(`fill-box`)),t.set(`transform`,new vu(`none`),()=>{Ll.get(e)?.check(),e.style.transform=Sd(t)})),a=t.get(`transform`)}else Cd.has(n)?(t.get(`transformOrigin`)||t.set(`transformOrigin`,new vu(``),()=>{let n=wd(t,`originX`)??`50%`,r=wd(t,`originY`)??`50%`,i=wd(t,`originZ`)??0;e.style.transformOrigin=`${n} ${r} ${i}`}),a=t.get(`transformOrigin`)):i=nl(n)?()=>{e.style.setProperty(n,r.getCurrent())}:()=>{e.style[n]=Al(r.getCurrent(),gc[n])};return t.set(n,r,i,a)},Ed=e=>md(e)||hd(e),Dd=(e,t)=>{if(Lc.has(t))return Fc(e,t);let n=getComputedStyle(e),r=nl(t)?n.getPropertyValue(t):n[t];return typeof r==`string`&&r.trim()||0},Od=xd(Td,{test:Ed,read:Dd});function kd(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}function Ad(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Lc.has(e))o=!0;else if(Ga(e))i[e]=n;else{let t=Al(n,gc[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Il(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var jd={offset:`stroke-dashoffset`,array:`stroke-dasharray`},Md={offset:`strokeDashoffset`,array:`strokeDasharray`};function Nd(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?jd:Md;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Pd=[`transform`,`opacity`,`clipPath`,`filter`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Fd(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Ad(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of Pd)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Nd(d,i,a,o,!1)}function Id(e,t){if(!(t in e))return!1;let n=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t)||Object.getOwnPropertyDescriptor(e,t);return n&&typeof n.set==`function`}var Ld=(e,t,n,r,i=n)=>{let a=Id(e,i);!a&&(i.startsWith(`data`)||i.startsWith(`aria`))&&(i=kd(i));let o=gc[n]||gc[i],s=a?()=>{e[i]=Al(r.get(),gc[n])}:()=>{let t=Al(r.get(),o);t==null?e.removeAttribute(i):e.setAttribute(i,String(t))};return t.set(n,r,s)};function Rd(e,t,n,r){return ss.render(()=>e.setAttribute(`pathLength`,`1`)),n===`pathOffset`?t.set(n,r,()=>{let t=r.get();e.setAttribute(`stroke-dashoffset`,`${-t}`)}):(t.get(`stroke-dasharray`)||t.set(`stroke-dasharray`,new vu(`1 1`),()=>{let n=t.get(`pathLength`)?.get()??1,r=t.get(`pathSpacing`)?.get();e.setAttribute(`stroke-dasharray`,`${n} ${r??1-Number(n)}`)}),t.set(n,r,void 0,t.get(`stroke-dasharray`)))}var zd=xd((e,t,n,r)=>n.startsWith(`path`)&&!Lc.has(n)?Rd(e,t,n,r):n.startsWith(`attr`)?Ld(e,t,n,r,Bd(n)):n===`d`?t.set(n,r,()=>{let t=r.get()?.replace(/path\(|["')]/g,``);t===void 0?e.removeAttribute(n):e.setAttribute(n,t)}):(Lc.has(n)||Cd.has(n)||nl(n)||n in e.style?Td:Ld)(e,t,n,r),{test:hd,read:(e,t)=>Lc.has(t)?gc[t]?.default||0:nl(t)||Pd.includes(t)?Dd(e,t)||e.getAttribute(kd(t))||0:(t=Bd(t),e.getAttribute(kd(t))??e.getAttribute(t)??void 0)});function Bd(e){return e.replace(/^attr([A-Z])/,(e,t)=>t.toLowerCase())}function Vd({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Hd({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Ud(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Wd(e){return e===void 0||e===1}function Gd({scale:e,scaleX:t,scaleY:n}){return!Wd(e)||!Wd(t)||!Wd(n)}var Kd=[`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skewX`,`skewY`];function qd(e){return Gd(e)||Yd(e)||Jd(e)}function Jd(e){return e.z||e.rotate||e.rotateX||e.rotateY||e.rotateZ||e.skewX||e.skewY}function Yd(e){return Xd(e.x)||Xd(e.y)}function Xd(e){return e&&e!==`0%`}function Zd(e,t,n){return n+t*(e-n)}function Qd(e,t,n,r,i){return i!==void 0&&(e=Zd(e,i,r)),Zd(e,n,r)+t}function $d(e,t=0,n=1,r,i){e.min=Qd(e.min,t,n,r,i),e.max=Qd(e.max,t,n,r,i)}function ef(e,{x:t,y:n}){$d(e.x,t.translate,t.scale,t.originPoint),$d(e.y,n.translate,n.scale,n.originPoint)}var tf=.999999999999,nf=1.0000000000001;function rf(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++)a=n[s],o=a.projectionDelta,a.options.visualElement?.props.style?.display!==`contents`&&(r===!0&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(af(e.x,-a.scroll.offset.x),af(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,ef(e,o)),r&&(r.path?.[s]||r)!==a&&qd(a.latestValues)&&cf(e,a.latestValues,a.layout?.layoutBox));t.x<nf&&t.x>tf&&(t.x=1),t.y<nf&&t.y>tf&&(t.y=1)}function af(e,t){e.min+=t,e.max+=t}function of(e,t,n,r,i=.5){$d(e,t,n,Bo(e.min,e.max,i),r)}function sf(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function cf(e,t,n){let r=n??e;of(e.x,sf(t.x,r.x),t.scaleX,t.scale,t.originX),of(e.y,sf(t.y,r.y),t.scaleY,t.scale,t.originY)}function lf(e,t){return Vd(Ud(e.getBoundingClientRect(),t))}function uf(e,t,n){let r=lf(e,n),{scroll:i}=t;return i&&(af(r.x,i.offset.x),af(r.y,i.offset.y)),r}var df=()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),ff={},pf=e=>hd(e)?zd:Od,mf=class{constructor(e,t){this.effect=e,this.current=t,this.KeyframeResolver=ad}getValue(e){return this.effect.get(this.current,e)}readValue(e,t){return this.effect.read(this.current,e,t)}render(){this.effect.flush(this.current)}measureViewportBox(){return lf(this.current)}getProps(){return ff}};function hf(e,t,n,r){if(gd.current?.track(e),r)return dd(e=>r.getValue(e,null),t,n,r);let i=pf(e);return fd(i,e,t,n,new mf(i,e))}var gf=xd((e,t,n,r)=>t.set(n,r,()=>{e[n]=r.get()}),{test:e=>ca(e),read:(e,t)=>{let n=e[t];return typeof n==`string`||typeof n==`number`?n:void 0}}),{schedule:_f,cancel:vf}=os(queueMicrotask,!1);function yf(e,t,n){let r=Hu(e)?e:yu(e);return r.run(ku(``,r,t,n)),r.animation}var bf={},xf={value:null,addProjectionMetrics:null,countProjection:void 0};function Sf(e,t){let n=Ha.now();e=vd(e);let r=({timestamp:i})=>{let a=i-n;a>=t&&(cs(r),e(a-t))};return ss.setup(r,!0),_d(()=>cs(r))}function Cf(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function wf(e){return hd(e)&&e.tagName===`svg`}function Tf(e){return Hu(e)?e.get():e}var Ef=e=>typeof e==`number`?e:parseFloat(e),Df=od.length,Of=e=>typeof e==`number`||W.test(e);function kf(e,t,n,r,i,a){i?(e.opacity=Bo(0,n.opacity??1,jf(r)),e.opacityExit=Bo(t.opacity??1,0,Mf(r))):a&&(e.opacity=Bo(t.opacity??1,n.opacity??1,r));for(let i=0;i<Df;i++){let a=od[i],o=Af(t,a),s=Af(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||Of(o)===Of(s)?(e[a]=Math.max(Bo(Ef(o),Ef(s),r),0),(po.test(s)||po.test(o))&&(e[a]+=`%`)):e[a]=s)}for(let i=0;i<Kd.length;i++){let a=Kd[i];(t[a]||n[a])&&(e[a]=Bo(t[a]||0,n[a]||0,r))}}function Af(e,t){return e[t]===void 0?e.borderRadius:e[t]}var jf=Nf(0,.5,Oa),Mf=Nf(.5,.95,da);function Nf(e,t,n){return r=>r<e?0:r>t?1:n(pa(e,t,r))}function Pf(e,t){e.min=t.min,e.max=t.max}function Ff(e,t){Pf(e.x,t.x),Pf(e.y,t.y)}function If(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Lf=.9999,Rf=1.0001,zf=-.01,Bf=.01;function Vf(e){return e.max-e.min}function Hf(e,t,n){return Math.abs(e-t)<=n}function Uf(e,t,n,r=.5){e.origin=r,e.originPoint=Bo(t.min,t.max,e.origin),e.scale=Vf(n)/Vf(t),e.translate=Bo(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Lf&&e.scale<=Rf||isNaN(e.scale))&&(e.scale=1),(e.translate>=zf&&e.translate<=Bf||isNaN(e.translate))&&(e.translate=0)}function Wf(e,t,n,r){Uf(e.x,t.x,n.x,r?.originX),Uf(e.y,t.y,n.y,r?.originY)}function Gf(e,t,n,r=0){e.min=(r?Bo(n.min,n.max,r):n.min)+t.min,e.max=e.min+Vf(t)}function Kf(e,t,n,r){Gf(e.x,t.x,n.x,r?.x),Gf(e.y,t.y,n.y,r?.y)}function qf(e,t,n,r=0){let i=r?Bo(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Vf(t)}function Jf(e,t,n,r){qf(e.x,t.x,n.x,r?.x),qf(e.y,t.y,n.y,r?.y)}function Yf(e,t,n,r,i){return e-=t,e=Zd(e,1/n,r),i!==void 0&&(e=Zd(e,1/i,r)),e}function Xf(e,t=0,n=1,r=.5,i,a=e,o=e){if(po.test(t)&&(t=parseFloat(t),t=Bo(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=Bo(a.min,a.max,r);e===a&&(s-=t),e.min=Yf(e.min,t,n,s,i),e.max=Yf(e.max,t,n,s,i)}function Zf(e,t,[n,r,i],a,o){Xf(e,t[n],t[r],t[i],t.scale,a,o)}var Qf=[`x`,`scaleX`,`originX`],$f=[`y`,`scaleY`,`originY`];function ep(e,t,n,r){Zf(e.x,t,Qf,n?.x,r?.x),Zf(e.y,t,$f,n?.y,r?.y)}var tp=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),np=tp(`applewebkit/`)&&!tp(`chrome/`)?Math.round:da;function rp(e){e.min=np(e.min),e.max=np(e.max)}function ip(e){rp(e.x),rp(e.y)}var ap=()=>({translate:0,scale:1,origin:0,originPoint:0}),op=()=>({x:ap(),y:ap()}),sp=()=>({min:0,max:0}),cp=()=>({x:sp(),y:sp()});function lp(e){return e.translate===0&&e.scale===1}function up(e){return lp(e.x)&&lp(e.y)}function dp(e,t){return e.min===t.min&&e.max===t.max}function fp(e,t){return dp(e.x,t.x)&&dp(e.y,t.y)}function pp(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function mp(e,t){return pp(e.x,t.x)&&pp(e.y,t.y)}function hp(e){return Vf(e.x)/Vf(e.y)}function gp(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var _p=class{constructor(){this.members=[]}add(e){ra(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;r&&r.isConnected!==!1||n.snapshot||(ia(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(ia(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};function vp(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var yp={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(W.test(e))e=parseFloat(e);else return e}return`${vp(e,t.target.x)}% ${vp(e,t.target.y)}%`}},bp={borderRadius:Object.assign({},yp,{applyTo:od.slice()}),borderTopLeftRadius:yp,borderTopRightRadius:yp,borderBottomLeftRadius:yp,borderBottomRightRadius:yp,boxShadow:{correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=G.parse(e);if(i.length>5)return r;let a=G.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=Bo(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}}};function xp(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;(i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `);let s=``;if(n){let{transformPerspective:e}=n;e&&(r=`perspective(${e}px) ${r}`);for(let e=0;e<Kd.length;e++){let t=Kd[e],r=n[t];r&&(s+=`${t}(${r}deg) `),!e&&n.pathRotation&&(s+=`rotate(${n.pathRotation}deg) `)}}if(s){(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),r+=s;let n=e.x.scale*t.x,i=e.y.scale*t.y;(n!==1||i!==1)&&(r+=`scale(${n}, ${i})`)}else e.x.scale!==1||e.y.scale!==1?r+=`scale(${e.x.scale}, ${e.y.scale})`:r||t.x===1&&t.y===1||(r=`scale(1, 1)`);return r||`none`}function Sp(e){return[e(`x`),e(`y`)]}var Cp=(e,t)=>e.depth-t.depth,wp=class{constructor(){this.children=[],this.isDirty=!1}add(e){ra(this.children,e),this.isDirty=!0}remove(e){ia(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Cp),this.isDirty=!1,this.children.forEach(e)}},Tp={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Ep=[`z`,`skew`,`skewZ`],Dp=1e3,Op=0;function kp(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}var Ap=e=>e.instance&&Ll.get(e.instance)?.demote()&&e.resetSkewAndRotation();function jp(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Ku(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,ss,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&jp(r)}function Mp(e){if(e)return e.options.allowProjection===!1?Mp(e.parent):e.projection}function Np({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return Object.assign(bf,{...bp,...bf}),class{static create(e,t,n){let{layoutId:r,layout:i,drag:a,dragConstraints:o,layoutScroll:s,layoutRoot:c,layoutAnchor:l,layoutCrossfade:u}=t,d=e.projection=new this(e.latestValues,t[`data-framer-portal-id`]?void 0:Mp(e.parent));d.setOptions({layoutId:r,layout:i,alwaysMeasureLayout:!!a||o&&Cf(o),visualElement:e,animationType:typeof i==`string`?i:`both`,initialPromotionConfig:n,crossfade:u,layoutScroll:s,layoutRoot:c,layoutAnchor:l});let f=d.getStack()?.lead;f&&!d.root.isUpdateBlocked()&&(f.willUpdate(),f.scheduleCheckAfterUnmount())}constructor(e={},n=t?.()){this.id=Op++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Ip),this.nodes.forEach(qp),this.nodes.forEach(Jp),this.nodes.forEach(Lp),xf.countProjection?.()},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new wp)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new ma),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){this.eventHandlers.get(e)?.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=hd(t)&&!wf(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent?.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;ss.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n?.(),n=Sf(i,250),Tp.hasAnimatedSinceResize&&(Tp.hasAnimatedSinceResize=!1,this.nodes.forEach(Kp)))})}n&&this.root.registerSharedNode(n,this),this.addLayoutListener()}addLayoutListener(){let{layoutId:e,layout:t,visualElement:n,animate:r}=this.options;this.instance&&!this.hasLayoutListener&&r!==!1&&n&&(e||t)&&(this.hasLayoutListener=!0,this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:r,layout:i})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||n.getDefaultTransition()||em,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=n.getProps(),c=!this.targetLayout||!mp(this.targetLayout,i),l=!t&&r;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...xu(a,`layout`),onPlay:o,onComplete:s};(n.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||Kp(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=i}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,cs(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(Yp),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete?.();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&jp(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;Ap(this),this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,Ap(t),(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1),t.isAnimationBlocked&&(t.dragSnapshot||=t.measure(),this.dragAncestor=t)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Bp),this.nodes.forEach(zp);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Vp);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Up),this.nodes.forEach(Wp),this.nodes.forEach(Gp),this.nodes.forEach(Pp),this.nodes.forEach(Fp)):this.nodes.forEach(Vp),this.clearAllSnapshots();let e=Ha.now();za.delta=aa(0,1e3/60,e-za.timestamp),za.timestamp=e,za.isProcessing=!0,ls.update.process(za),ls.preRender.process(za),ls.render.process(za),za.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,_f.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Rp),this.sharedNodes.forEach((e,t)=>e.members.length?e.removeLeadSnapshot():this.sharedNodes.delete(t))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ss.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ss.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!Vf(this.snapshot.measuredBox.x)&&!Vf(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=cp(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t?.notify(`LayoutMeasure`,this.layout.layoutBox,e?.layoutBox)}updateScroll(e=`measure`){let{scroll:t,instance:i}=this,{animationId:a}=this.root;if(this.options.layoutScroll&&i&&!(t&&t.animationId===a&&t.phase===e)){let o=r(i);this.scroll={animationId:a,phase:e,isRoot:o,offset:n(i),wasRoot:t?t.isRoot:o}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout;e&&Ap(this);let t=this.projectionDelta&&!up(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||qd(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),ip(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return cp();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(rm))){let{scroll:e}=this.root;e&&(af(t.x,e.offset.x),af(t.y,e.offset.y))}return t}removeElementScroll(e){let t=cp();if(Ff(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Ff(t,e),af(t.x,i.offset.x),af(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n,r,i=0){let a=n||cp();Ff(a,e);for(let e=i;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(af(a.x,-n.scroll.offset.x),af(a.y,-n.scroll.offset.y)),qd(n.latestValues)&&cf(a,n.latestValues,n.layout?.layoutBox)}return!r&&qd(this.latestValues)&&cf(a,this.latestValues,this.layout?.layoutBox),a}removeTransform(e){let t=cp();Ff(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!qd(n.latestValues))continue;let r;n.instance&&(Gd(n.latestValues)&&n.updateSnapshot(),r=cp(),Ff(r,n.measurePageBox())),ep(t,n.latestValues,n.snapshot?.layoutBox,r)}return qd(this.latestValues)&&ep(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade},this.addLayoutListener()}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!==za.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=za.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=cp(),this.targetWithTransforms=cp()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Kf(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target,!0):Ff(this.target,this.layout.layoutBox),ef(this.target,this.targetDelta)):Ff(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&(!a.resumingFrom==!this.resumingFrom||a.options.layoutRoot&&!a.resumingFrom)&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),xf.countProjection?.(1))}getClosestProjectingParent(){if(!(!this.parent||Gd(this.parent.latestValues)||Yd(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=cp(),this.relativeTargetOrigin=cp(),Jf(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Ff(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===za.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent?.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Ff(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;rf(this.layoutCorrected,this.treeScale,this.path,t&&(e.relativeTarget&&!e.relativeParent.resumingFrom?e.relativeParent:!0)),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=cp());let{target:s}=e;s?(!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(If(this.prevProjectionDelta.x,this.projectionDelta.x),If(this.prevProjectionDelta.y,this.projectionDelta.y)),Wf(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===o&&gp(this.projectionDelta.x,this.prevProjectionDelta.x)&&gp(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),xf.countProjection?.(2)):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){this.options.visualElement?.scheduleRender(),e&&this.getStack()?.scheduleRender(),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=op(),this.projectionDelta=op(),this.projectionDeltaWithTransform=op()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=op();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=cp(),c=r?.source!==this.layout?.source,l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some($p));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);Xp(o.x,e.x,n),Xp(o.y,e.y,n),r&&(o.x.translate=r.x,o.y.translate=r.y),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Jf(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Qp(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&fp(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=cp(),Ff(f,this.relativeTarget)),c&&(this.animationValues=a,kf(a,i,this.latestValues,n,d,u)),r?.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(cs(this.pendingAnimation),void 0),this.pendingAnimation=ss.update(()=>{Tp.hasAnimatedSinceResize=!0,this.motionValue||=yu(0),this.motionValue.jump(0,!1),this.currentAnimation=yf(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),ic(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta?.(Dp),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&nm(this.options.animationType,this.layout.layoutBox,n.layoutBox)){let{layoutBox:e}=this.layout,t=i;i=this.target||cp(),tm(i.x,t.x,e.x),tm(i.y,t.y,e.y)}Ff(t,i),cf(t,r),Wf(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new _p),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?.transition,preserveFollowOpacity:n?.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){this.getStack()?.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let{latestValues:t}=e;if(!Jd(t))return;let n={};for(let t=0;t<Ep.length;t++)kp(Ep[t],e,n,this.animationValues);for(let t=0;t<Kd.length;t++)kp(Kd[t],e,n,this.animationValues);e.render();for(let t in n)e.setStaticValue(t,n[t]),this.animationValues&&(this.animationValues[t]=n[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;let n=this.getLead();if(!this.isVisible&&n!==this){e.visibility=`hidden`;return}let r=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=Tf(t?.pointerEvents)||``,e.transform=r?r(this.latestValues,``):`none`;return}if(!this.projectionDelta||!this.layout||!n.target){(this.options.layoutId||this.needsShow)&&(this.needsShow=!1,e.visibility=``,e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=Tf(t?.pointerEvents)||``),this.hasProjected&&!qd(this.latestValues)&&(e.transform=r?r({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=n.animationValues||n.latestValues;this.applyTransformsToTarget();let a=xp(this.projectionDeltaWithTransform,this.treeScale,i);r&&(a=r(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=n.animationValues?n===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:n===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in bf){if(i[t]===void 0)continue;let{correct:r,applyTo:o,isCSSVariable:s}=bf[t],c=a===`none`?i[t]:r(i[t],n);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=n===this?Tf(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=this.dragSnapshot=this.dragAncestor=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(zp),this.root.sharedNodes.clear()}}}function Pp(e){e.updateLayout(),Hp(e)}function Fp(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source,o=(r,a)=>{if(i===`size`)Sp(e=>{let t=Vf(r[e]);r[e].min=a[e].min,r[e].max=r[e].min+t});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Pf(r[e],a[e])}else nm(i,t.layoutBox,n)&&Sp(t=>{let n=Vf(a[t]);r[t].max=r[t].min+n,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[t].max=e.relativeTarget[t].min+n)})},s=a?t.measuredBox:t.layoutBox;o(s,n);let c=op();Wf(c,n,t.layoutBox);let l=op();Wf(l,a?e.applyTransform(r,!0):n,s);let u=!up(c),d=!1,f=e.getClosestProjectingParent();if((!a||f?.options.layoutRoot&&e.resumeFrom?.path.includes(f))&&f&&!f.resumeFrom){let{snapshot:r,layout:i}=f;if(r&&i){let s=e.options.layoutAnchor||void 0,c=cp();Jf(c,a?e.resumeFrom.applyTransform(t.layoutBox,!0,void 0,!0,f.depth+1):t.layoutBox,r.layoutBox,s);let l=cp();Jf(l,n,i.layoutBox,s),a&&o(c,l),mp(c,l)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=c,e.relativeParent=f)}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else e.isLead()&&e.options.onExitComplete?.();e.options.transition=void 0}function Ip(e){xf.countProjection?.(0),e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Lp(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Rp(e){e.clearSnapshot()}function zp(e){e.clearMeasurements()}function Bp(e){e.isLayoutDirty=!0,e.updateLayout()}function Vp(e){e.isLayoutDirty=!1}function Hp(e){let{snapshot:t,dragAncestor:n}=e,r=n?.isAnimationBlocked&&n.layout;if(!t||!r||e.resumeFrom||e.isAnimationBlocked)return;let i=n.dragSnapshot;Sp(e=>af(t.layoutBox[e],r.layoutBox[e].min-i.layoutBox[e].min))}function Up(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function Wp(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function Gp(e){let{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function Kp(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function qp(e){e.resolveTargetDelta()}function Jp(e){e.calcProjection()}function Yp(e){e.resetSkewAndRotation()}function Xp(e,t,n){e.translate=Bo(t.translate,0,n),e.scale=Bo(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Zp(e,t,n,r){e.min=Bo(t.min,n.min,r),e.max=Bo(t.max,n.max,r)}function Qp(e,t,n,r){Zp(e.x,t.x,n.x,r),Zp(e.y,t.y,n.y,r)}function $p(e){return e.animationValues?.opacityExit!==void 0}var em={duration:.45,ease:[.4,0,.1,1]};function tm(e,t,n){e.max=Vf(n)+(e.min=t.min)}function nm(e,t,n){return e===`position`||e===`preserve-aspect`&&!Hf(hp(t),hp(n),.2)}function rm(e){return e!==e.root&&e.scroll?.wasRoot}function im(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var am=Np({attachResizeListener:(e,t)=>im(e,`resize`,t),measureScroll:df,checkIsScrollRoot:()=>!0}),om={current:void 0},sm=Np({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!om.current){let e=new am({});e.mount(window),e.setOptions({layoutScroll:!0}),om.current=e}return om.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),cm=new WeakMap;function lm(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function um(e){return typeof e==`string`||Array.isArray(e)}var dm=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`whilePinch`,`exit`],fm=[`initial`].concat(dm);function pm(e){if(lm(e.animate))return!0;for(let t=0;t<fm.length;t++)if(um(e[fm[t]]))return!0;return!1}function mm(e){return!!(pm(e)||e.variants)}function hm(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Hu(i))e.addValue(r,i);else if(Hu(a))e.addValue(r,yu(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,yu(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var gm={current:null},_m={current:!1},vm=typeof window<`u`;function ym(){if(_m.current=!0,vm){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>gm.current=e.matches;e.addEventListener(`change`,t),t()}else gm.current=!1}}var bm=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],xm={};function Sm(e){xm=e}function Cm(){return xm}var wm=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=tl,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=Ha.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ss.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=pm(t),this.isVariantNode=mm(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&Hu(t)&&t.set(c[e])}}mount(e){let t=this.presenceContext;if(this.hasBeenMounted&&t?.isPresent!==!1&&!t?.keepValuesOnRemount)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];if(this.current=e,cm.set(e,this),this.projection?.instance||this.projection?.mount(e),this.isVariantNode&&!this.isControllingVariants){let e=this;do e=e.props.inherit!==!1&&e.parent;while(e&&!e.isVariantNode);if(e){let{variantChildren:t}=e;t.add(this),this.removeFromVariantTree=()=>t.delete(this)}}this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(_m.current||ym(),this.shouldReduceMotion=gm.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),cs(this.notifyUpdate),cs(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree?.(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),(this.enteringChildren||=new Set).add(e)}removeChild(e){this.children.delete(e),this.enteringChildren?.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.get(e)?.(),t.accelerate&&Cl.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new ml({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:ha(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Lc.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&ss.preRender(this.notifyUpdate),n&&(this.projection&&(this.projection.isTransformDirty=!0),Ll.get(this.current)?.check()),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i?.()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in xm){let t=xm[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):cp()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){let{transformTemplate:n,onUpdate:r}=this.props;(e.transformTemplate||n)&&this.scheduleRender(),(e.transformTemplate&&!n||e.onUpdate&&!r)&&Ll.get(this.current)?.demote(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<bm.length;t++){let n=bm[t];this.propEventSubscriptions[n]?.(),delete this.propEventSubscriptions[n];let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=hm(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue?.()}getProps(){return this.props}getVariant(e){return this.props.variants?.[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,t){let n=this.values.get(e);if(t!==n){n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t);let r=t.get();r!==void 0&&(this.latestValues[e]=r)}}removeValue(e){this.values.delete(e),this.valueSubscriptions.get(e)?.(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){let n=this.props.values?.[e];return n||(n=this.values.get(e),n===void 0&&t!==void 0&&(n=yu(t??this.getDefaultValue?.(e),{owner:this}),this.addValue(e,n)),n)}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(sa(n)||la(n))?n=parseFloat(n):typeof n!=`number`&&!G.test(n)&&G.test(t)&&(n=Cc(e,t)),this.setBaseTarget(e,Hu(n)?n.get():n)),Hu(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return(this.events[e]||(this.events[e]=new ma)).add(t)}notify(e,...t){this.events[e]?.notify(...t)}scheduleRenderMicrotask(){_f.render(this.render)}},Tm=class extends wm{constructor(){super(...arguments),this.KeyframeResolver=ad}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Hu(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function Em(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Dm(e,{layout:t,layoutId:n}){return Lc.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!bf[e]||e===`opacity`)}function Om(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(Hu(r[t])||i&&Hu(i[t])||Dm(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function km(e){return window.getComputedStyle(e)}var Am=class extends Tm{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Em}mount(e){super.mount(e)}readValueFromInstance(e,t){if(Lc.has(t))return this.projection?.isProjecting?Nc(t):Fc(e,t);{let n=km(e),r=(Ga(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return lf(e,t)}build(e,t,n){Ad(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Om(e,t,n)}},jm=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1;function Mm(e){return{point:{x:e.pageX,y:e.pageY}}}var Nm=e=>t=>jm(t)&&e(t,Mm(t));function Pm(e,t,n,r){return im(e,t,Nm(n),r)}var Fm=new WeakMap,Im,Lm=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:hd(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Rm=Lm(`inline`,`width`,`offsetWidth`),zm=Lm(`block`,`height`,`offsetHeight`);function Bm({target:e,borderBoxSize:t}){Fm.get(e)?.forEach(n=>{n(e,{get width(){return Rm(e,t)},get height(){return zm(e,t)}})})}function Vm(e){e.forEach(Bm)}function Hm(){typeof ResizeObserver<`u`&&(Im=new ResizeObserver(Vm))}function Um(e,t){Im||Hm();let n=yd(e);return n.forEach(e=>{let n=Fm.get(e);n||(n=new Set,Fm.set(e,n)),n.add(t),Im?.observe(e)}),()=>{n.forEach(e=>{let n=Fm.get(e);n?.delete(t),n?.size||Im?.unobserve(e)})}}var Wm=new Set,Gm;function Km(){Gm=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Wm.forEach(t=>t(e))},window.addEventListener(`resize`,Gm)}function qm(e){return Wm.add(e),Gm||Km(),()=>{Wm.delete(e),!Wm.size&&typeof Gm==`function`&&(window.removeEventListener(`resize`,Gm),Gm=void 0)}}function Jm(e,t){return _d(typeof e==`function`?qm(e):Um(e,t))}var Ym=(e,t)=>Math.abs(e-t);function Xm(e,t){let n=Ym(e.x,t.x),r=Ym(e.y,t.y);return Math.sqrt(n**2+r**2)}var Zm=new Set([`auto`,`scroll`]),Qm=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o,immediate:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=eh(this.lastRawMoveEventInfo,this.transformPagePoint));let e=nh(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Xm(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:Ha.now()});let{onStart:i,onMove:a}=this.handlers;t||(i?.(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a?.(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.handleScroll(window),this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=eh(t,this.transformPagePoint),this.hasPendingMove=!0,ss.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i?.(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=nh(e.type===`pointercancel`?this.lastMoveEventInfo:eh(t,this.transformPagePoint),this.history);this.startEvent&&n?.(e,a),r?.(e,a)},!jm(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=s?0:a,this.contextWindow=r||window;let c=Mm(e),l=eh(c,this.transformPagePoint),{point:u}=l;this.history=[{...u,timestamp:Ha.now()}];let{onSessionStart:d}=t;d&&d(e,nh(l,this.history));let f={passive:!0,capture:!0};this.removeListeners=fa(Pm(this.contextWindow,`pointermove`,this.handlePointerMove,f),Pm(this.contextWindow,`pointerup`,this.handlePointerUp,f),Pm(this.contextWindow,`pointercancel`,this.handlePointerUp,f)),o&&this.startScrollTracking(o),s&&(this.handlePointerMove(e,c),this.updatePoint())}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Zm.has(e.overflowX)||Zm.has(e.overflowY))&&this.scrollPositions.set(t,$m(t)),t=t.parentElement}this.scrollPositions.set(window,$m(window)),this.removeScrollListeners=fa(im(window,`scroll`,this.onElementScroll,{capture:!0}),im(window,`scroll`,this.onWindowScroll,{}))}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=$m(e),i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),ss.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),cs(this.updatePoint)}},$m=e=>e===window?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop};function eh(e,t){return t?{point:t(e.point)}:e}function th(e,t){return{x:e.x-t.x,y:e.y-t.y}}function nh({point:e},t){return{point:e,delta:th(e,ih(t)),offset:th(e,rh(t)),velocity:ah(t,.1)}}function rh(e){return e[0]}function ih(e){return e[e.length-1]}function ah(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=ih(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ha(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>ha(t)*2&&(r=e[1]);let a=ga(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}var oh=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function sh(e){return oh.has(e.tagName)||e.isContentEditable===!0}var ch=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function lh(e){return ch.has(e.tagName)||e.isContentEditable===!0}var uh={x:!1,y:!1};function dh(){return uh.x||uh.y}function fh(e){return e===`x`||e===`y`?uh[e]?null:(uh[e]=!0,()=>{uh[e]=!1}):uh.x||uh.y?null:(uh.x=uh.y=!0,()=>{uh.x=uh.y=!1})}function ph(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Bo(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Bo(n,e,r.max):Math.min(e,n)),e}function mh(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function hh(e,{top:t,left:n,bottom:r,right:i}){return{x:mh(e.x,n,i),y:mh(e.y,t,r)}}function gh(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function _h(e,t){return{x:gh(e.x,t.x),y:gh(e.y,t.y)}}function vh(e,t){let n=.5,r=Vf(e),i=Vf(t);return i>r?n=pa(t.min,t.max-r,e.min):r>i&&(n=pa(e.min,e.max-i,t.min)),aa(0,1,n)}function yh(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var bh=.35;function xh(e=bh){return e===!1?e=0:e===!0&&(e=bh),{x:Sh(e,`left`,`right`),y:Sh(e,`top`,`bottom`)}}function Sh(e,t,n){return{min:Ch(e,t),max:Ch(e,n)}}function Ch(e,t){return typeof e==`number`?e:e[t]||0}function wh(e){let t=``;for(let n of e.path){n.scroll=void 0,n.updateScroll();let{scroll:r}=n;n!==e.root&&r&&(t+=r.offset.x+`,`+r.offset.y+`,`)}return t}var Th=new WeakMap,Eh=class{constructor(e,t=()=>e.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=cp(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e,this.readProps=t}start(e,t={}){if(this.visualElement.presenceContext?.isPresent===!1)return;let n=e=>{t.snapToCursor&&this.snapToCursor(e),this.stopAnimation()},r=(e,t)=>{let{drag:n,dragConstraints:r,dragPropagation:i,onDragStart:a}=this.getProps();if(n&&!i&&(this.openDragLock?.(),this.openDragLock=fh(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();let{projection:o}=this.visualElement;o&&(o.isAnimationBlocked=!0,o.target=void 0),Sp(e=>{let t=this.getAxisMotionValue(e).get()||0;if(qa(t)&&(t=Mu(t,this.visualElement.current)||0),W.test(t))t=parseFloat(t);else if(po.test(t)){let n=o?.layout?.layoutBox[e];n&&(t=Vf(n)*(parseFloat(t)/100))}this.originPoint[e]=t}),this.point=typeof r==`function`&&r(this),a&&ss.update(()=>a(e,t),!1,!0),Wu(this.visualElement,`transform`),this.visualElement.animationState?.setActive(`whileDrag`,!0)},i=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){if(this.currentDirection=Mh(o),this.currentDirection===null)return;i&&i(this.currentDirection)}this.updateAxis(`x`,o),this.updateAxis(`y`,o),this.point&&this.point.move(),this.visualElement.render(),a&&ss.update(()=>a(e,t),!1,!0)},a=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},o=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints||this.point)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:s}=this.getProps();this.panSession=new Qm(e,{onSessionStart:n,onStart:r,onMove:i,onSessionEnd:a,resumeAnimation:o},{...t,transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:s,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(e,t,n){let r=e||this.latestPointerEvent,i=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;let{velocity:o}=i;this.startAnimation(o,n);let{onDragEnd:s}=this.getProps();s&&ss.postRender(()=>s(r,i))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t?.setActive(`whileDrag`,!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(e,t){let{drag:n}=this.readProps();if(!t||!jh(e,n,this.currentDirection))return;let r=this.getAxisMotionValue(e),i=this.originPoint[e]+t[e],a=this.constraints&&this.constraints[e];a&&(i=ph(i,a,this.elastic[e])),this.point?this.point[e]=i:r.set(i)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),{projection:n}=this.visualElement,r=n&&(n.layout||n.measure(!1)),i=this.constraints;Dh(e)?this.constraints&&this.scroll===wh(n)||(this.constraints=this.resolveRefConstraints()):this.constraints=e&&r&&typeof e==`object`?hh(r.layoutBox,e):!1,this.elastic=xh(t),i!==this.constraints&&!Dh(e)&&r&&this.constraints&&!this.hasMutatedConstraints&&Sp(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=yh(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!Dh(e))return!1;let n=Oh(e),{projection:r}=this.visualElement;if(!r||!r.layout)return!1;this.scroll=wh(r);let i=uf(n,r.root,this.visualElement.getTransformPagePoint()),a=_h(r.layout.layoutBox,r.removeElementScroll(i));if(t){let e=t(Hd(a));this.hasMutatedConstraints=!!e,e&&(a=Vd(e))}return a}startAnimation(e,t){let{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),c={bounceStiffness:i?200:1e6,bounceDamping:i?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...a},l=i=>r&&!(this.point&&o)&&jh(i,t||n,this.currentDirection)?e[i]:0;if(this.point&&!o)return this.point.release({x:l(`x`),y:l(`y`)},c).then(s);let u=this.constraints||{},d=Sp(e=>{if(!jh(e,t||n,this.currentDirection))return;let r=u[e]||{};(o===!0||o===e)&&(r={min:0,max:0});let i={type:`inertia`,velocity:l(e),...c,...r};return this.startAxisValueAnimation(e,i)});return Promise.all(d).then(s)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Wu(this.visualElement,e),n.start(ku(e,n,0,t,this.visualElement,!1))}stopAnimation(){Sp(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.readProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();Sp(e=>{if(!jh(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-Bo(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Dh(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};Sp(e=>{let t=this.getAxisMotionValue(e).get();i[e]=vh({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root?.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Sp(t=>{let n=this.getAxisMotionValue(t);if(!jh(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(Bo(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Th.set(this.visualElement,this);let e=this.visualElement.current,t=Pm(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&lh(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps(),r=Dh(t)&&Oh(t);r&&(this.constraints=this.resolveRefConstraints(),n||=Ah(e,r,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i.layout||(i.root?.updateScroll(),i.updateLayout()),ss.read(r);let o=im(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Sp(t=>{if(!jh(t,this.getProps().drag,this.currentDirection))return;let n=this.getAxisMotionValue(t);this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate)}),this.visualElement.render())}));return()=>{o(),t(),a(),s(),n?.()}}getProps(){let e=this.readProps(),{dragElastic:t=bh,dragMomentum:n=!0}=e;return{...e,dragElastic:t,dragMomentum:n}}};function Dh(e){return!!e&&typeof e==`object`&&(`current`in e||`nodeType`in e)}var Oh=e=>`current`in e?e.current:e;function kh(e){let t=!0;return()=>{t?t=!1:e()}}function Ah(e,t,n){let r=Jm(e,kh(n)),i=Jm(t,kh(n));return()=>{r(),i()}}function jh(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Mh(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}function Nh(e,t){let n=yd(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},_d(()=>r.abort())]}function Ph(e){return!(e.pointerType===`touch`||dh())}function Fh(e,t,n={}){t=vd(t);let[r,i,a]=Nh(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{e.pointerType!==`touch`&&(n?r=!0:s(e))};e.addEventListener(`pointerenter`,n=>{if(!Ph(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var Ih=(e,t)=>t?e===t||Ih(e,t.parentElement):!1,Lh=new WeakSet;function Rh(e){return t=>{t.key===`Enter`&&e(t)}}function zh(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Bh=(e,t)=>{let n=!1,r=Rh(()=>{n||Lh.has(e)||(n=!0,zh(e,`down`))}),i=Rh(()=>{n&&(n=!1,zh(e,`up`))});e.addEventListener(`keydown`,r,t),e.addEventListener(`keyup`,i,t),e.addEventListener(`blur`,()=>{e.removeEventListener(`keydown`,r),e.removeEventListener(`keyup`,i),n&&zh(e,`cancel`)},{...t,once:!0})};function Vh(e){return jm(e)&&!dh()}var Hh=new WeakSet,Uh=100,Wh=8,Gh=(e,t,n)=>Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)>n,Kh=e=>e.preventDefault();function qh(e,t,n={}){t=vd(t);let[r,i,a]=Nh(e,n),o=new WeakMap,s=e=>{let r=e.currentTarget;if(!Vh(e)||Hh.has(e))return;n.stopPropagation&&Hh.add(e);let{count:a=1,countTimeout:s=.3,hold:c=0,repeat:l}=n,u=Ha.now(),d=ha(c),f=ha(s),p=o.get(r);p?.expire(Gh(p.event,e,Uh))?p=void 0:p&&(cs(p.expire),o.delete(r));let m=p?p.count+1:1,h=m>=a,g=h&&(c||l),_=!c,v=0,y;if(Lh.add(r),p)y=p.handlers;else{let n=t(r,e);y=typeof n==`function`?{onComplete:n}:n||{}}h&&_&&y.onActive?.();let b=ha(l),x=d||b,S=u+x,C=!0,w=()=>{if(i.signal.aborted)return cs(w);let e=Math.min(1-(S-Ha.now())/x,1);C&&e<1&&(e=0),C=!1,y.onHold?.(e),e<1||(_?y.onRepeat?.(++v):(_=!0,y.onActive?.()),l?(C=!0,S+=x=b):cs(w))},T={...i,capture:!0},E=(t,n)=>{if(jm(t)){if(window.removeEventListener(`pointerup`,D,T),window.removeEventListener(`pointercancel`,O,T),window.removeEventListener(`pointermove`,k,T),r.removeEventListener(`contextmenu`,Kh),cs(w),Lh.delete(r),dh()&&(n=!1),n&&!h){let n=Ha.now(),a=e=>{let s=i.signal.aborted;if(s||e===!0||Ha.now()-n>f)return cs(a),o.delete(r),s||y.onComplete?.(t,{success:!1}),!0};o.set(r,{count:m,event:e,handlers:y,expire:a}),ss.update(a,!0)}else y.onComplete?.(t,{success:n&&_})}},D=e=>{E(e,r===window||r===document||n.useGlobalTarget||Ih(r,e.target))},O=e=>{E(e,!1)},k=t=>{jm(t)&&((l||!_)&&Gh(e,t,Wh)||a>1&&dh())&&O(t)};window.addEventListener(`pointerup`,D,T),window.addEventListener(`pointercancel`,O,T),(g||a>1)&&window.addEventListener(`pointermove`,k,T),g&&(ss.update(w,!0),r.addEventListener(`contextmenu`,Kh,{...i,passive:!1}))};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,s,i),md(e)&&(e.addEventListener(`focus`,()=>Bh(e,i),i),!sh(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function Jh(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=Hs(i,a,o);return t?s(r):s}var Yh=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},Xh=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`]),Zh=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function Qh(e,t,n,r){Em(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(Xh.has(n)?n:kd(n),t.attrs[n])}function $h(e,t,n){let r=Om(e,t,n);for(let n in e)if(n!==`children`&&(Hu(e[n])||Hu(t[n]))){let t=Ic.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var eg=class extends Tm{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=cp}getBaseTargetFromProps(e,t){return Lc.has(t)?super.getBaseTargetFromProps(e,t)??Nc(t):e[t]}getDefaultValue(e){return Lc.has(e)?this.latestValues[e]??Nc(e):void 0}readValueFromInstance(e,t){if(Lc.has(t)){let e=vc(t);return e&&e.default||0}if(Pd.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=Xh.has(t)?t:kd(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return $h(e,t,n)}build(e,t,n){Fd(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){Qh(e,t,n,r)}mount(e){this.isSVGTag=Zh(e.tagName),super.mount(e)}};function tg(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var ng=[...dm].reverse(),rg=e=>e?.out===!0?e:e?.out;function ig(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>Zu(e,t,n))),n=og(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,{initial:l}=o,u=r||i,d=[],f=(t=l)=>typeof t!=`boolean`&&Fu(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom)||void 0,p=new Map,m={},h=1/0,g=e;do g=g.props.inherit!==!1&&g.parent;while(g&&!g.isControllingVariants);let _=u&&rg(f(l??(g&&g.props.initial))?.transition);if(ng.forEach((t,r)=>{let i=n[t],l=o[t],f=g&&g.props[t],v=l===void 0?um(f)||f===!1?f:void 0:l,y=um(v),b=t===a?i.isActive:null,x=y&&l===void 0&&!(u&&c);if(i.protectedKeys={...m},!i.isActive&&b===null||!v&&!i.prevProp||lm(v)||typeof v==`boolean`)return;if(b===!1&&(h=r),t===`exit`&&i.isActive&&b!==!0){m={...m,...i.prevResolvedValues};return}let S=ag(i.prevProp,v),C=S||y&&(b&&!x||r>h),w=!1,T=Array.isArray(v)?v:[v],E={},D;if(b!==!1)for(let n of T){let{transition:r,transitionEnd:i,...a}=Fu(e,n,Iu(e,t))||{};E={...E,...a,...i},D=rg(r)||D}let{prevResolvedValues:O}=i;for(let t in{...O,...E}){if(t in m)continue;let n=E[t],r=O[t],a=Array.isArray(n)&&Array.isArray(r)?!tg(n,r)||S:n!==r,o;if(a&&n==null)p.has(t)||p.set(t,i.prevOut);else if(a||n!==void 0&&p.has(t)){C=!0,o=p.get(t)||_,p.delete(t)&&(w=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0;i.out[t]=o}if(i.prevProp=v,i.prevResolvedValues=E,i.prevOut=D,i.isActive&&(m={...m,...E}),C&&(!(x&&S)||w))for(let n of T){let r={type:t};if(typeof n==`string`&&u&&c&&s?.enteringChildren){let t=Fu(s,n)?.transition?.delayChildren;r.delay=mu(s.enteringChildren,e,t)}d.push({animation:n,options:r})}}),p.size){let t={},n=f(),r=n?.transition;p.forEach((i,a)=>{i&&(r={...r||e.getDefaultTransition(),[a]:i});let s=e.getValue(a);s&&(s.liveStyle=!0);let c=n&&!Array.isArray(l)?n[a]:void 0,u=e.getBaseTargetFromProps(o,a);t[a]=(c===void 0?u!==void 0&&!Hu(u)?u:e.initialValues[a]===void 0?e.baseTarget[a]:void 0:c)??null}),r&&(t.transition=r),d.push({animation:t})}let v=u&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!v&&d.length?t(d):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=og(),i=!0}}}function ag(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!tg(t,e):!1}function og(){let e={};for(let t of dm)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return e}var sg=(0,V.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function cg(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function lg(...e){return t=>{let n=!1,r=e.map(e=>{let r=cg(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():cg(e[t],null)}}}}function ug(...e){return V.useCallback(lg(...e),e)}var dg=e=>{let{width:t,height:n}=e?.getBoundingClientRect()||{};return[t/e?.offsetWidth||1,n/e?.offsetHeight||1]},fg=e=>{let{left:t,top:n}=e.getBoundingClientRect(),r=e;for(;r=r.parentElement||r.parentNode?.host;){let{scrollLeft:e,scrollTop:i}=r;if(e||i){let[a,o]=dg(r);t+=e*a,n+=i*o}if(getComputedStyle(r).position===`fixed`)break}let[i,a]=dg(e.offsetParent);return[t/i,n/a]},pg=class extends V.Component{getSnapshotBeforeUpdate(e){let t=this.props.getElement();if(md(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=md(e)&&e.offsetWidth||0,r=md(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction,a.point=fg(t)}return null}componentDidUpdate(){}render(){return this.props.children}};function mg({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a,popNode:o}){let s=(0,V.useId)(),c=(0,V.useRef)(null),l=(0,V.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:u}=(0,V.useContext)(sg),d=ug(c,a===!1?void 0:e.props?.ref??e?.ref),f=()=>c.current||o?.current?.current,p=e=>{let{width:t,height:i,top:a,left:o,right:c,bottom:u,direction:d}=l.current,f=d===`rtl`,p=n===`left`?f?`right:${c}`:`left:${o}`:f?`left:${o}`:`right:${c}`,m=r===`bottom`?`bottom:${u}`:`top:${a}`;e?.insertRule(`[data-motion-pop-id="${s}"]{position:absolute!important;width:${t}px!important;height:${i}px!important;${p}px!important;${m}px!important}`)};return(0,V.useInsertionEffect)(()=>{let{width:e,height:n}=l.current,r=f();if(t||a===!1||!r||!e||!n)return;r.dataset.motionPopId=s;let o=r.ownerDocument,c=o.createElement(`style`);u&&(c.nonce=u);let d=i??o.head;d.appendChild(c),p(c.sheet);let m=0,h=0;return _f.setup(()=>{let[e,t]=fg(r);m=l.current.point[0]-e,h=l.current.point[1]-t}),_f.read(()=>{let{sheet:e}=c;if(!e||!m&&!h)return;let t=l.current;t.left+=m,t.right-=m,t.top+=h,t.bottom-=h,e.deleteRule(0),p(e)}),()=>{r.removeAttribute(`data-motion-pop-id`),d.contains(c)&&d.removeChild(c)}},[t]),(0,H.jsx)(pg,{isPresent:t,getElement:f,sizeRef:l,pop:a,children:a===!1?e:V.cloneElement(e,{ref:d})})}var hg=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=ea(gg),d=(0,V.useId)(),f=(0,V.useRef)(),p=(0,V.useRef)(n),m=(0,V.useRef)(r);ta(()=>{p.current=n,m.current=r});let h=!0,g=(0,V.useMemo)(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:(e,t)=>(u.set(e,!1),t&&t.parent?.presenceContext?.id!==d&&(f.current=t),()=>{u.delete(e),!p.current&&!u.size&&m.current?.()})}),[n,u,r]);return a&&h&&(g={...g}),(0,V.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),V.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,H.jsx)(mg,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,popNode:f,children:e}),(0,H.jsx)(na.Provider,{value:g,children:e})};function gg(){return new Map}function _g(e=!0){let t=(0,V.useContext)(na);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,V.useId)();(0,V.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,V.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var vg=e=>e.key||``;function yg(e){let t=[];return V.Children.forEach(e,e=>{(0,V.isValidElement)(e)&&t.push(e)}),t}var bg=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=_g(o),f=(0,V.useMemo)(()=>yg(e),[e]),p=o&&!u?[]:f.map(vg),m=(0,V.useRef)(!0),h=ea(()=>new Map),g=(0,V.useRef)(new Set),[_,v]=(0,V.useState)(f),[y,b]=(0,V.useState)(f);ta(()=>{o&&!u&&!y.length&&d?.()},[u,o,y.length,d]);let x=(0,V.useRef)();(0,V.useEffect)(()=>()=>{let e=x.current;x.current=void 0,e?.()},[y]),ta(()=>{m.current=!1;for(let e=0;e<y.length;e++){let t=vg(y[e]);p.includes(t)?(h.delete(t),g.current.delete(t)):h.get(t)!==!0&&h.set(t,!1)}},[y,p.length,p.join(`-`)]);let S=[];if(f!==_){let e=[...f],t=0;for(let n of y){let r=p.indexOf(vg(n));r===-1?(e.splice(t++,0,n),S.push(n)):t=r+S.length+1}return S.every(e=>h.get(vg(e)))?e=f:a===`wait`&&(e=S),b(yg(e)),v(f),null}let{forceRender:C}=(0,V.useContext)($i);return(0,H.jsx)(H.Fragment,{children:y.map(e=>{let _=vg(e),b=o&&!u?!1:f===y||p.includes(_);return(0,H.jsx)(hg,{isPresent:b,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:b?void 0:()=>{if(g.current.has(_))return;if(h.has(_))g.current.add(_),h.set(_,!0);else return;let e=!0;h.forEach(t=>{t||(e=!1)}),e&&(C?.(),v([]),o&&d?.(),x.current=r)},anchorX:s,anchorY:c,children:e},_)})})},xg=(0,V.createContext)({strict:!1}),Sg={animation:[`variants`,...dm],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`]},Cg=!1;function wg(){if(Cg)return;let e={};for(let t in Sg)e[t]={isEnabled:e=>Sg[t].some(t=>!!e[t])};Sm(e),Cg=!0}function Tg(){return wg(),Cm()}function Eg(e){let t=Tg();for(let n in e)t[n]={...t[n],...e[n]};Sm(t)}function Dg({children:e,...t}){let n=(0,V.useContext)(sg);t={...n,...t},t.transition=bu(t.transition,n.transition),t.isStatic=ea(()=>t.isStatic);let r=(0,V.useMemo)(()=>t,[JSON.stringify(t.transition),t.transformPagePoint,t.reducedMotion,t.skipAnimations,t.isValidProp]);return(0,H.jsx)(sg.Provider,{value:r,children:e})}var Og=(0,V.createContext)({});function kg(e,t){if(pm(e)){let{initial:t,animate:n}=e;return{initial:t===!1||um(t)?t:void 0,animate:um(n)?n:void 0}}return e.inherit===!1?{}:t}function Ag(e){let{initial:t,animate:n}=kg(e,(0,V.useContext)(Og));return(0,V.useMemo)(()=>({initial:t,animate:n}),[jg(t),jg(n)])}function jg(e){return Array.isArray(e)?e.join(` `):e}var Mg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Ng(e,t,n){for(let r in t)!Hu(t[r])&&!Dm(r,n)&&(e[r]=t[r])}function Pg({transformTemplate:e},t){return(0,V.useMemo)(()=>{let n=Mg();return Ad(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Fg(e,t){let n=e.style||{},r={};return Ng(r,n,e),Object.assign(r,Pg(e,t)),r}function Ig(e,t){let n={},r=Fg(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Lg=()=>({...Mg(),attrs:{}});function Rg(e,t,n,r){let i=(0,V.useMemo)(()=>{let n=Lg();return Fd(n,t,Zh(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};return Ng(t,e.style,e),{...i,style:{...t,...i.style}}}return i}var zg=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.tap.propagate.ignoreStrict.viewport.pinch`.split(`.`));function Bg(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||zg.has(e)}function Vg(e,t){return e.startsWith(`on`)?!Bg(e):t?.(e)??!Bg(e)}function Hg(e,t,n,r){let i={};for(let a in e)a===`values`&&typeof e.values==`object`||Hu(e[a])||(Vg(a,r)||n===!0&&Bg(a)||!t&&!Bg(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]);return i}var Ug=[`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 Wg(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Ug.indexOf(e)>-1||/[A-Z]/u.test(e))}function Gg(e,t,n,{latestValues:r},i,a=!1,o,s){let c=(o??Wg(e)?Rg:Ig)(t,r,i,e),l=Hg(t,typeof e==`string`,a,s),u=e===V.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,V.useMemo)(()=>Hu(d)?d.get():d,[d]);return(0,V.createElement)(e,{...u,children:f})}function Kg({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:qg(n,r,i,e),renderState:t()}}function qg(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Tf(a[e]);let{initial:o,animate:s}=e,c=pm(e),l=mm(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!lm(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Pu(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Jg=e=>(t,n)=>{let r=(0,V.useContext)(Og),i=(0,V.useContext)(na),a=()=>Kg(e,t,r,i);return n?a():ea(a)},Yg=Jg({scrapeMotionValuesFromProps:Om,createRenderState:Mg}),Xg=Jg({scrapeMotionValuesFromProps:$h,createRenderState:Lg}),Zg=Symbol.for(`motionComponentSymbol`);function Qg(e,t,n){let r=(0,V.useRef)(n);(0,V.useInsertionEffect)(()=>{r.current=n});let i=(0,V.useRef)(null);return(0,V.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`){if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n)}else a&&(a.current=n)},[t])}var $g=(0,V.createContext)({});function e_(e,t,n,r,i,a){let{visualElement:o}=(0,V.useContext)(Og),s=(0,V.useContext)(xg),c=(0,V.useContext)(na),l=(0,V.useContext)(sg),u=l.reducedMotion,d=l.skipAnimations,f=(0,V.useRef)(null),p=(0,V.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,V.useContext)($g);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&i.create(m,n,h),(0,V.useInsertionEffect)(()=>{m&&m.props!==n&&m.update(n,c)});let g=n[Gu],_=(0,V.useRef)(!!g&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(g)&&window.MotionHasOptimisedAnimation?.(g));return ta(()=>{p.current&&m&&(m.animationState?.animateChanges(),m.enteringChildren=void 0)},[]),ta(()=>{p.current=!0,m&&(window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),_.current&&m.animationState&&m.animationState.animateChanges())}),(0,V.useEffect)(()=>{m&&(!_.current&&m.animationState&&m.animationState.animateChanges(),_.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(g)}),!1),m.enteringChildren=void 0)}),m}function t_(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Eg(r);let a=n?n===`svg`:Wg(e),o=a?Xg:Yg;function s(n,s){let c,l=n_(n);ea(()=>!!om.current?.sharedNodes.get(l)?.lead&&n.initial)&&(n={...n,initial:!1});let u={...(0,V.useContext)(sg),...n,layoutId:l},{isStatic:d,isValidProp:f}=u,p=Ag(n),m=o(n,d);if(!d&&typeof window<`u`){r_(u,r);let t=i_(u);p.visualElement=e_(e,m,u,i,t.ProjectionNode,a),(t.isEnabled||p.visualElement?.projection?.options.layoutId)&&(c=t.MeasureLayout)}return(0,H.jsxs)(Og.Provider,{value:p,children:[c&&p.visualElement?(0,H.jsx)(c,{visualElement:p.visualElement,...u}):null,Gg(e,n,Qg(m,p.visualElement,s),m,d,t,a,f)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,V.forwardRef)(s);return c[Zg]=e,c}function n_({layoutId:e}){let t=(0,V.useContext)($i).id;return t&&e!==void 0?t+`-`+e:e}function r_(e,t){(0,V.useContext)(xg).strict}function i_(e){let{drag:t,layout:n}=Tg();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:r.MeasureLayout,isEnabled:t?.isEnabled(e)||n?.isEnabled(e),ProjectionNode:r.ProjectionNode}}function a_(e,t){if(typeof Proxy>`u`)return t_;let n=new Map,r=(n,r)=>t_(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,t_(a,void 0,e,t)),n.get(a))})}var o_=(e,t)=>t.isSVG??Wg(e)?new eg(t):new Am(t,{allowProjection:e!==V.Fragment}),s_=class extends Yh{constructor(e){super(e),e.animationState||=ig(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();lm(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){this.node.getProps().animate!==this.node.prevProps?.animate&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},c_=0,l_={animation:{Feature:s_},exit:{Feature:class extends Yh{constructor(){super(...arguments),this.id=c_++}update(){let{presenceContext:e,animationState:t}=this.node;if(!e||!t)return;let{isPresent:n,onExitComplete:r}=e;if(n===!this.exit)return;if(n){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=Fu(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,t.reset(),t.animateChanges()}else t.setActive(`exit`,!1);this.exit=void 0;return}let i=this.exit=t.setActive(`exit`,!0);r&&i.then(()=>{this.exit===i&&(this.exit=!0,r(this.id))})}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id,this.node)),this.update()}unmount(){}}}},u_=class extends Yh{constructor(e){super(e),this.removeGroupControls=da,this.removeListeners=da,this.controls=new Eh(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||da}update(){let{dragControls:e,drag:t}=this.node.getProps(),{dragControls:n,drag:r}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls))),r&&!t&&this.controls.stop(void 0,void 0,r)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},d_=e=>(t,n)=>{e&&ss.update(()=>e(t,n),!1,!0)},f_=class extends Yh{constructor(){super(...arguments),this.removePointerDownListener=da}onPointerDown(e){this.session=new Qm(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:this.node.current?.ownerDocument.defaultView})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:d_(e),onStart:d_(t),onMove:d_(n),onEnd:(e,t)=>{delete this.session,r&&ss.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Pm(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}},p_=!1,m_=({layout:e,layoutDependency:t,layoutAnchor:n})=>({layout:e,layoutDependency:t,layoutAnchor:n,animationType:typeof e==`string`?e:`both`}),h_=(e,t)=>{let{snapshot:n}=e,r=e.getStack();r?.remove(e);let i=r?.lead;if(r?.prevLead===e&&i.resumeFrom===e&&(i.resumeFrom=i.currentAnimation=e.resumingFrom=void 0),e.options.layoutId=t,!t)e.needsShow=!0;else return e.root.registerSharedNode(t,e),()=>{let{resumeFrom:t}=e;t?.isPresent!==!1&&e.getStack().members.includes(t)&&(t.hide(),e.resumeFrom=void 0,e.snapshot=n)}},g_=class extends V.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group?.add(i),r&&n?.register?.(i),p_&&i.root.didUpdate(),i.options.layoutId!==r&&h_(i,r)?.(),i.addEventListener(`animationComplete`,()=>this.safeToRemove()),i.setOptions({...i.options,...m_(this.props),onExitComplete:()=>this.safeToRemove()})),Tp.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,layoutId:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,this.takeOver=e.layoutId===n?void 0:(o.willUpdate(),h_(o,n)),o.setOptions({...o.options,...m_(this.props)}),p_=!0,i||e.layoutDependency!==t||t===void 0||e.isPresent!==a?o.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?o.promote():o.relegate()||ss.postRender(()=>{o.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(this.takeOver?.(),e.root.didUpdate(),_f.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;p_=!0,r&&(r.scheduleCheckAfterUnmount(),t.group?.remove(r),n?.deregister?.(r))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}};function __(e){let[t,n]=_g(),r=(0,V.useContext)($i);return(0,H.jsx)(g_,{...e,layoutGroup:r,switchLayoutGroup:(0,V.useContext)($g),isPresent:t,safeToRemove:n})}var v_={pan:{Feature:f_},drag:{Feature:u_,ProjectionNode:sm,MeasureLayout:__}};function y_(e,t,n,r,i){let{props:a}=e,o=`while`+n;!i&&e.animationState&&a[o]&&e.animationState.setActive(o,r===`Start`);let s=a[`on`+n+r];s&&ss.postRender(()=>s(t,Mm(t)))}var b_=class extends Yh{mount(){let{current:e}=this.node;e&&(this.unmount=Fh(e,(e,t)=>(y_(this.node,t,`Hover`,`Start`),e=>y_(this.node,e,`Hover`,`End`))))}unmount(){}},x_=class extends Yh{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=fa(im(this.node.current,`focus`,()=>this.onFocus()),im(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function S_(e,t,n,r){e.current instanceof HTMLButtonElement&&e.current.disabled||y_(e,t,`Tap`,n,r)}var C_=class extends Yh{constructor(){super(...arguments),this.options={}}mount(){let{current:e}=this.node;e&&(this.update(),this.unmount=qh(e,(e,t)=>(S_(this.node,t,`Start`),{onComplete:(e,{success:t})=>S_(this.node,e,t?``:`Cancel`),onRepeat:()=>S_(this.node,t,``,!0)}),this.options))}update(){let{options:e,node:t}=this,{globalTapTarget:n,propagate:r,tap:i}=t.props;for(let t in e)delete e[t];Object.assign(e,i,{useGlobalTarget:n,stopPropagation:r?.tap===!1})}unmount(){}},w_=new WeakMap,T_=new WeakMap,E_=e=>{let t=w_.get(e.target);t&&t(e)},D_=e=>{e.forEach(E_)};function O_({root:e,...t}){let n=e||document;T_.has(n)||T_.set(n,{});let r=T_.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(D_,{root:e,...t})),r[i]}function k_(e,t,n){let r=O_(t);return w_.set(e,n),r.observe(e),()=>{w_.delete(e),r.unobserve(e)}}var A_={some:0,all:1},j_=class extends Yh{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:A_[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=k_(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(M_(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function M_({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var N_=a_(Object.assign({},l_,{inView:{Feature:j_},tap:{Feature:C_},focus:{Feature:x_},hover:{Feature:b_}},v_,{layout:{ProjectionNode:sm,MeasureLayout:__}}),o_);function P_(e){let t=ea(()=>yu(e)),{isStatic:n}=(0,V.useContext)(sg);if(n){let[,n]=(0,V.useState)(e);(0,V.useEffect)(()=>t.on(`change`,n),[])}return t}function F_(e,t){let n=P_(t()),r=()=>n.set(t());return r(),ta(()=>{let t=()=>ss.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return r(),()=>{n.forEach(e=>e()),cs(r)}}),n}function I_(e){_u.current=[],e();let t=F_(_u.current,e);return _u.current=void 0,t}function L_(e,t,n,r){if(typeof e==`function`)return I_(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return z_(e,t,n,r);let i=typeof t==`function`?t:Jh(t,n,r),a=Array.isArray(e)?R_(e,i):R_([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;if(o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&!r?.mixer){let e=r?.ease;a.accelerate={...o,times:[0,...t,1],keyframes:[n[0],...n,n[n.length-1]],isTransformed:!0,...e?{ease:Array.isArray(e)?[e[0],...e]:e}:{}}}return a}function R_(e,t){let n=ea(()=>[]);return F_(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function z_(e,t,n,r){let i=ea(()=>Object.keys(n)),a=ea(()=>({}));for(let o of i)a[o]=L_(e,t,n[o],r);return a}function B_(){!_m.current&&ym();let[e]=(0,V.useState)(gm.current);return e}function V_(e){e.values.forEach(e=>e.stop())}function H_(e,t){[...t].reverse().forEach(n=>{let r=e.getVariant(n);r&&Vu(e,r),e.variantChildren&&e.variantChildren.forEach(e=>{H_(e,t)})})}function U_(e,t){if(Array.isArray(t))return H_(e,t);if(typeof t==`string`)return H_(e,[t]);Vu(e,t)}function W_(){let e=new Set,t={subscribe(t){return e.add(t),()=>void e.delete(t)},start(t,n){let r=[];return e.forEach(e=>{r.push(Zu(e,t,{transitionOverride:n}))}),Promise.all(r)},set(t){return e.forEach(e=>{U_(e,t)})},stop(){e.forEach(e=>{V_(e)})},mount(){return()=>{t.stop()}}};return t}function G_(e){return typeof e==`object`&&!Array.isArray(e)}function K_(e,t,n,r){return e==null?[]:typeof e==`string`&&G_(t)?yd(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function q_(e,t,n){return e*(t+1)+n*t}function J_(e,t){if(t.has(e))return t.get(e);let[,n,r]=e.match(/^(.+?)([+-][\d.]+)$/)||[];return t.has(n)?Math.max(0,t.get(n)+parseFloat(r)):void 0}function Y_(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):J_(t,r)??e}function X_(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(ia(e,i),r--)}}function Z_(e,t,n,r,i,a){X_(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:Bo(i,a,r[o]),easing:Pa(n,o)})}function Q_(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function $_(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var ev=`easeInOut`,tv=20;function nv(e,{defaultTransition:t={},...n}={},r,i,a){let o=t.duration||.3,s=new Map,c=new Map,l={},u=new Map,d=0,f=0,p=0,m=(e,n)=>{let a=n,s=e=>typeof e==`number`?n+e:Y_(f,e,d,u);for(let n=0;n<e.length;n++){let h=e[n];if(typeof h==`string`){u.set(h,f);continue}if(!Array.isArray(h)){let e=h.at===void 0?f:s(h.at);`sequence`in h?(d=f=e,f=m(h.sequence,e),d=e,a=Math.max(a,f)):u.set(h.name,e);continue}let[g,_,v={}]=h;v.at!==void 0&&(f=s(v.at));let y=0,b=(e,n,r,a=0,s=0)=>{let c=av(e),{delay:l=0,times:u=Ws(c),type:d=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:g=0,..._}=n,{ease:v=t.ease||`easeOut`,duration:b}=n;r.mixer||=n.mixer;let x=typeof l==`function`?l(a,s):l,S=c.length,C=fl(d)?d:i?.[d||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&cv(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,..._};b!==void 0&&(n.duration=ha(b));let r=ms(n,e,C);v=r.ease,b=r.duration}b??=o;let w=f+x;u.length===1&&u[0]===0&&(u[1]=1);let T=u.length-c.length;if(T>0&&Us(u,T),c.length===1&&c.unshift(null),m&&m<tv){let e=b>0?g/b:0;b=q_(b,m,g);let t=[...c],n=[...u];v=Array.isArray(v)?[...v]:[v];let r=[...v],i=h===`reverse`||h===`mirror`,a=t,o=r;i&&(a=[...t].reverse(),h===`reverse`&&(o=[...r].reverse().map(e=>typeof e==`function`?Sa(e):e)));for(let s=0;s<m;s++){let l=i&&s%2==0,d=l?a:t,f=l?o:r,p=(s+1)*(1+e);e>0&&(c.push(c[c.length-1]),u.push(p),v.push(`linear`)),c.push(...d);for(let e=0;e<d.length;e++)u.push(n[e]+p),v.push(e===0?`linear`:Pa(f,e-1))}Q_(u,m,e)}let E=w+b;Z_(r,c,v,u,w,E),y=Math.max(x+b,y),p=Math.max(E,p)};if(Hu(g)){let e=rv(g,c);b(_,v,iv(`default`,e))}else{let e=K_(g,_,r,l),t=e.length;for(let n=0;n<t;n++){_=_,v=v;let r=e[n],i=rv(r,c);for(let e in _)b(_[e],ov(v,e),iv(e,i),n,t)}}d=f,f+=y,a=Math.max(a,f)}return a};m(e,0),a&&(a.duration=p,a.labels=u);let{type:h,...g}=t;return c.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort($_);let o=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];o.push(n),c.push(pa(0,p,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),o.unshift(o[0]),l.unshift(ev)),c[c.length-1]!==1&&(c.push(1),o.push(null)),s.has(r)||s.set(r,{keyframes:{},transition:{}});let u=s.get(r);u.keyframes[i]=o,u.transition[i]={...g,duration:p,ease:l,times:c,mixer:a.mixer||t.mixer,...n}}}),s}function rv(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function iv(e,t){return t[e]||(t[e]=[]),t[e]}function av(e){return Array.isArray(e)?e:[e]}function ov(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var sv=e=>typeof e==`number`,cv=e=>e.every(sv);function lv(e,t){return Hu(e)||typeof e==`number`||typeof e==`string`&&!G_(t)}function uv(e,t,n,r){let i=[];if(lv(e,t))i.push(yf(e,G_(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=K_(e,t,r),o=a.length;for(let e=0;e<o;e++){let r=a[e],s={...n};`delay`in s&&typeof s.delay==`function`&&(s.delay=s.delay(e,o)),r instanceof Element?i.push(...hf(r,t,s,cm.get(r))):i.push(...fd(ud(r)??gf,r,t,s))}}return i}function dv(e,t,n,r){let i=[],a=nv(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=yu(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:zs},r),o=t?.reduceMotion??t?.defaultTransition?.reduceMotion;return a.forEach(({keyframes:e,transition:t},n)=>{i.push(...uv(n,e,{...t,reduceMotion:o}))}),i}var fv=0;function pv({repeat:e=0,repeatDelay:t=0,repeatType:n=`loop`,delay:r=0},i,a,o){let s=i+t,c=o===void 0;if(c){let t=Math.max(0,a-r);o=s&&t>0?Math.min(e,Math.ceil(t/s-1e-9)-1):0,a=Math.min(t-o*s,i)}return n!==`loop`&&o%2&&(a=i-a),[o,c?a:r+o*s+a]}function mv(e,t){let n=[...e],r=typeof n[0]==`function`?Math.max(1,n.length-1):2;return n[r]={...n[r],at:t},n}var hv=(e,t)=>t===void 0?e:{name:e,at:t};function gv(e){e.pause(),e.time=0,e.stop()}var _v=class e{constructor(e=[],t={},n){this.options=t,this.entries=[],this.repeatIndex=0,this.prevTime=0,this.markers=[],this.labels=new Map,this.totalDuration=0,this.isDirty=!1,this.isDone=!1,this.isRebuilding=!1,this.playbackSpeed=1,this.motionScope=gd.current,this.isKilled=!1,this.isWrapped=!1,this.stop=()=>{this.flush(),this.group?.stop()},this.isPaused=t.autoplay===!1,this.newFinished(),e.forEach(e=>this.add(e)),n?(this.isDirty=!1,this.isWrapped=!0,this.group=new pu(n),this.watch()):(this.invalidate(),this.flush())}add(t,n){return t instanceof e&&t.adopt(this),this.push({item:t,at:n})}call(e,t){return this.push({item:e,at:t,marker:{name:`_m`+fv++,time:0,callback:e}})}addPause(e,t){return this.push({item:t||{},at:e,marker:{name:`_m`+fv++,time:0,callback:t,pause:!0}})}move(e,t){return this.entries.forEach(n=>{n.item===e&&(n.at=t)}),this.invalidate()}remove(t){return t instanceof e&&(t.parent=void 0),this.entries=this.entries.filter(e=>e.item!==t),this.invalidate()}clear(){return this.entries=[],this.invalidate()}getLabelTime(e){return this.flush(),this.labels.get(e)}seek(e){return this.time=this.resolve(e),this}playTo(e){let t=this.resolve(e),n=this.iterationDuration,r=this.time,[i]=pv(this.options,n,r),a=pv(this.options,n,t,i)[1],o=Math.abs(this.speed);return this.speed=a<r?-o:o,this.stopAt=t,this.clock||this.invalidate(),this.play(),this}reverse(){return this.speed=-this.speed,this.play(),this}get progress(){return this.duration?this.time/this.duration:0}set progress(e){this.time=e*this.duration}get time(){return this.active()?.time??0}set time(e){this.flush(),this.prevTime=e,this.group&&(this.group.time=e),this.repeatIndex=this.currentRepeat()}get speed(){return this.playbackSpeed}set speed(e){this.playbackSpeed=e,this.group&&(this.group.speed=e)}get duration(){return this.flush(),this.isWrapped?this.group.duration:this.totalDuration}get iterationDuration(){return this.flush(),this.isWrapped?this.group.iterationDuration:this.totalDuration}get state(){return this.active()?.state??`idle`}get startTime(){return this.active()?.startTime??null}play(){this.flush(),this.isPaused=!1,this.group?.play(),this.isDone&&(this.newFinished(),this.watch())}pause(){this.flush(),this.isPaused=!0,this.group?.pause()}cancel(){this.flush(),this.group?.cancel()}complete(){this.flush(),this.group?.complete()}attachTimeline(e){return this.flush(),this.scrollTimeline=e,this.detachScroll=this.group?.attachTimeline(e),()=>{this.scrollTimeline=void 0,this.detachScroll?.()}}then(e,t){return this.finished.then(e,t)}active(){return this.flush(),this.group?.animations.length?this.group:void 0}push(e){return this.entries.push(e),this.invalidate()}invalidate(){return this.parent?this.parent.invalidate():this.isDirty||(this.isDirty=!0,queueMicrotask(()=>this.flush())),this}flush(){this.isDirty&&!this.parent&&!this.isKilled&&this.build()}adopt(e){this.group&&=(gv(this.group),void 0),this.isDirty=!1,this.parent=e}build(){let e=this.isWrapped?this.group.iterationDuration:this.totalDuration;this.isDirty=!1,this.isWrapped=!1;let t=this.group,n=0;t&&(this.isRebuilding=!0,this.scrollTimeline?(this.detachScroll?.(),t.cancel()):(n=t.animations.length?t.time:0,gv(t)),this.isRebuilding=!1);let{defaultTransition:r,onComplete:i,onUpdate:a,onRepeat:o,onReverseComplete:s,autoplay:c,scope:l,...u}=this.options,d={};l?.reduceMotion!==void 0&&(d.reduceMotion=l.reduceMotion),l?.skipAnimations!==void 0&&(d.skipAnimations=l.skipAnimations),Object.assign(d,u);let f=new Map,p={},m=gd.current;gd.current=this.motionScope;let h;try{h=dv(this.toSequence(f),{defaultTransition:r,...d},l,p)}finally{gd.current=m}let g=p.labels,_=d.duration??p.duration,v=p.duration?_/p.duration:1;if(g.forEach((e,t)=>g.set(t,e*v)),this.markers=[],f.forEach((e,t)=>{e.time=g.get(t),g.delete(t),_=Math.max(_,e.time),this.markers.push(e)}),this.markers.sort((e,t)=>e.time-t.time),this.labels=g,this.totalDuration=_,this.clock=this.clockAnimation=void 0,this.markers.length||this.stopAt!==void 0||a||o){let e=this.clock=yu(0);e.on(`change`,t=>e===this.clock&&this.onClock(t)),h.unshift(this.clockAnimation=yf(e,[0,_],{...d,duration:_,ease:`linear`}))}let y=this.group=new pu(h),{delay:b=0,repeat:x=0,repeatDelay:S=0}=this.options,[C,w]=pv(this.options,e,n);n>b&&(n=pv(this.options,_,Math.min(w,_),C)[1]),this.isDone&&n<b+(x+1)*(_+S)-S&&this.newFinished(),this.scrollTimeline?this.detachScroll=y.attachTimeline(this.scrollTimeline):(y.speed=this.playbackSpeed,this.isPaused&&y.pause(),n&&(y.time=n)),this.repeatIndex=this.currentRepeat(),this.prevTime=n||-1,this.watch()}toSequence(t){return this.entries.map(({item:n,at:r,marker:i})=>i?(t.set(i.name,i),hv(i.name,r)):n instanceof e?{sequence:n.toSequence(t),at:r}:typeof n==`string`?hv(n,r):r===void 0?n:Array.isArray(n)?mv(n,r):{...n,at:r})}resolve(e){return this.flush(),typeof e==`number`?e:J_(e,this.labels)??this.time}currentRepeat(){return pv(this.options,this.totalDuration,this.clockAnimation?.time??0)[0]}onClock(e){let t=this.prevTime;if(this.prevTime=e,this.isRebuilding)return;let{onUpdate:n,onRepeat:r,repeatType:i=`loop`}=this.options;n?.(e);let a=this.currentRepeat(),o=a>this.repeatIndex?1:-1;for(;a!==this.repeatIndex;){let e=this.speed>0==(i===`loop`||!(this.repeatIndex%2)),n=e?this.totalDuration:0;if(this.cross(t,n))return;this.repeatIndex+=o,r?.(),t=i===`loop`?e?-1:1/0:n}this.cross(t,e)}cross(e,t){if(e===t)return;let n=t>e,r=r=>n?r>e&&r<=t:r<e&&r>=t,i=n?this.markers:[...this.markers].reverse();for(let e of i)if(r(e.time)&&(e.callback?.(n?1:-1),e.pause))return this.pauseAt(e.time);if(this.stopAt!==void 0&&r(this.stopAt))return this.pauseAt(this.stopAt),this.stopAt=void 0,!0}pauseAt(e){return this.pause(),this.time=pv(this.options,this.totalDuration,e,this.repeatIndex)[1],!0}watch(){let e=this.group;e.finished.then(()=>{if(e!==this.group||this.isDone)return;this.isDone=!0;let{onComplete:t,onReverseComplete:n}=this.options,r=this.speed<0&&n||t,i=this.resolveFinished;r?.(),i()})}newFinished(){this.isDone=!1,this.finished=new Promise(e=>{this.resolveFinished=e});let{scope:e}=this.options,t=this.motionScope?.add(()=>{this.isKilled=!0,this.stop()});e?.animations.push(this),this.finished.then(()=>{t?.(),e&&ia(e.animations,this)})}};function vv(e){return Array.isArray(e)&&e.some(e=>Array.isArray(e)||e?.sequence)}function yv(e={}){let{scope:t,reduceMotion:n,skipAnimations:r}=e;function i(e,i,a){let o=gd.current?.transition,s={};n!==void 0&&(s.reduceMotion=n),r!==void 0&&(s.skipAnimations=r);let c;if(vv(e)){let r={...s,...i,scope:t};o&&(r.defaultTransition={...o,...r.defaultTransition}),r.reduceMotion=i?.reduceMotion??r.defaultTransition?.reduceMotion??n,c=new _v(e,r)}else{let{onComplete:n,...r}=a||{},l={...s,...o,...r},{onUpdate:u}=r;c=new _v([typeof e==`number`||typeof e==`string`&&(typeof i==`string`||Array.isArray(i))?[u||(()=>{}),Array.isArray(i)?i:[e,i],{...l,onUpdate:void 0}]:[e,i,l]],{...s,onComplete:n,scope:t},uv(e,i,l,t))}return c}return i}var bv=Object.assign(yv(),{addEffect:cd,removeEffect:ld});function xv(){let e=ea(W_);return ta(e.mount,[]),e}var K=N_,Sv={type:`spring`,stiffness:420,damping:34,mass:.8},q={type:`spring`,stiffness:260,damping:30},Cv={type:`spring`,stiffness:600,damping:38};function wv(){let e=B_();return{initial:{opacity:0,y:e?0:8},animate:{opacity:1,y:0},exit:{opacity:0,y:e?0:-4,transition:{duration:.12}},transition:q}}var Tv={animate:{transition:{staggerChildren:.035,delayChildren:.04}}},Ev={initial:{opacity:0,y:10,scale:.985},animate:{opacity:1,y:0,scale:1,transition:q}};function J({className:e,...t}){return(0,H.jsx)(`div`,{className:B(`card`,e),...t})}function Dv({title:e,description:t,action:n,className:r}){return(0,H.jsxs)(`div`,{className:B(`flex items-start justify-between gap-4 px-5 pt-4 pb-3`,r),children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`h3`,{className:`text-[13.5px] font-semibold tracking-[-0.01em] text-fg`,children:e}),t&&(0,H.jsx)(`p`,{className:`mt-0.5 text-[12.5px] text-fg-3`,children:t})]}),n&&(0,H.jsx)(`div`,{className:`flex shrink-0 items-center gap-2`,children:n})]})}var Ov={neutral:`bg-surface-2 text-fg-2 border-border`,accent:`bg-accent-soft text-accent-soft-fg border-transparent`,success:`bg-success-soft text-success border-transparent`,warning:`bg-warning-soft text-warning border-transparent`,danger:`bg-danger-soft text-danger border-transparent`,info:`bg-info-soft text-info border-transparent`};function kv({tone:e=`neutral`,dot:t=!1,pulse:n=!1,className:r,children:i}){return(0,H.jsxs)(`span`,{className:B(`inline-flex h-[22px] items-center gap-1.5 rounded-md border px-2 text-[11.5px] font-medium whitespace-nowrap`,Ov[e],r),children:[t&&(0,H.jsx)(jv,{tone:e,pulse:n}),i]})}var Av={neutral:`bg-fg-3`,accent:`bg-accent`,success:`bg-success`,warning:`bg-warning`,danger:`bg-danger`,info:`bg-info`};function jv({tone:e,pulse:t=!1,className:n}){return(0,H.jsxs)(`span`,{className:B(`relative inline-flex size-1.5 shrink-0`,n),children:[t&&(0,H.jsx)(`span`,{className:B(`absolute inset-0 rounded-full motion-safe:animate-pulse-soft`,Av[e])}),(0,H.jsx)(`span`,{className:B(`relative inline-flex size-full rounded-full`,Av[e])})]})}function Mv({children:e,className:t}){return(0,H.jsx)(`kbd`,{className:B(`inline-flex h-5 min-w-5 items-center justify-center rounded-[5px] border border-border bg-surface-2 px-1 font-sans text-[11px] font-medium text-fg-3`,t),children:e})}function Nv({className:e}){return(0,H.jsxs)(`svg`,{className:B(`size-4 animate-spin`,e),viewBox:`0 0 24 24`,fill:`none`,"aria-hidden":!0,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`9`,stroke:`currentColor`,strokeOpacity:`0.2`,strokeWidth:`3`}),(0,H.jsx)(`path`,{d:`M21 12a9 9 0 0 0-9-9`,stroke:`currentColor`,strokeWidth:`3`,strokeLinecap:`round`})]})}function Pv({className:e}){return(0,H.jsx)(`div`,{className:B(`skeleton`,e)})}function Fv({icon:e,title:t,description:n,action:r,className:i}){return(0,H.jsxs)(K.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:q,className:B(`flex flex-col items-center justify-center px-6 py-14 text-center`,i),children:[(0,H.jsx)(`div`,{className:`mb-4 flex size-11 items-center justify-center rounded-xl border border-border bg-surface-2 text-fg-3 [&>svg]:size-5`,children:e}),(0,H.jsx)(`p`,{className:`text-sm font-medium text-fg`,children:t}),n&&(0,H.jsx)(`p`,{className:`mt-1 max-w-sm text-[13px] leading-relaxed text-fg-3`,children:n}),r&&(0,H.jsx)(`div`,{className:`mt-5`,children:r})]})}function Iv({error:e,onRetry:t,retrying:n=!1,className:r}){return(0,H.jsx)(Fv,{icon:(0,H.jsxs)(`svg`,{viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":!0,className:`text-danger`,children:[(0,H.jsx)(`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`}),(0,H.jsx)(`path`,{d:`M12 9v4`}),(0,H.jsx)(`path`,{d:`M12 17h.01`})]}),title:`加载失败`,description:e.message,className:r,action:(0,H.jsxs)(`button`,{type:`button`,onClick:t,disabled:n,className:`inline-flex h-8 cursor-pointer items-center gap-1.5 rounded-lg border border-border bg-surface px-3 text-[12.5px] font-medium text-fg shadow-card transition-colors hover:bg-surface-2 disabled:cursor-wait disabled:opacity-60`,children:[n&&(0,H.jsx)(Nv,{className:`size-3.5`}),`重试`]})})}function Lv({title:e,description:t,actions:n}){return(0,H.jsxs)(`div`,{className:`mb-6 flex flex-wrap items-end justify-between gap-4`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h1`,{className:`text-[22px] font-semibold tracking-[-0.025em] text-fg`,children:e}),t&&(0,H.jsx)(`p`,{className:`mt-1 text-[13.5px] text-fg-3`,children:t})]}),n&&(0,H.jsx)(`div`,{className:`flex items-center gap-2`,children:n})]})}function Rv({value:e}){return e?e.declared?!e.required.length&&!e.optional.length?(0,H.jsx)(kv,{tone:`success`,children:`能力匹配`}):(0,H.jsxs)(`div`,{className:`space-y-1 text-[12px]`,children:[e.required.length>0&&(0,H.jsxs)(`p`,{className:`flex items-start gap-1.5 text-warning`,children:[(0,H.jsx)(Ri,{className:`mt-0.5 size-3.5 shrink-0`}),`缺少必须能力:`,e.required.map(e=>e.name).join(`、`)]}),e.optional.length>0&&(0,H.jsxs)(`p`,{className:`text-fg-3`,children:[`缺少可选能力:`,e.optional.map(e=>e.name).join(`、`)]}),(0,H.jsx)(`p`,{className:`text-fg-3`,children:`仍可启用;相关功能可能不可用或降级。`})]}):(0,H.jsx)(kv,{children:`未声明能力要求`}):(0,H.jsx)(kv,{children:`暂无能力记录`})}var zv={not_sent:`未送达`,unknown:`结果未知`,partial:`部分送达`};function Bv({failure:e}){let{target:t,code:n,platformCode:r,confirmedMessageIds:i}=e,a=[t.platform,t.selfId,t.id,t.thread?.id].filter(Boolean).join(` / `);return(0,H.jsxs)(`div`,{className:`space-y-1.5 text-[12px] text-fg-3`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,H.jsx)(kv,{tone:e.outcome===`not_sent`?`neutral`:`warning`,children:zv[e.outcome]}),(0,H.jsxs)(`code`,{className:`break-all font-mono`,children:[n,r===void 0?``:` · ${r}`]})]}),(0,H.jsxs)(`p`,{className:`break-all`,children:[t.type===`group`?`群聊`:`私聊`,` `,(0,H.jsx)(`code`,{className:`font-mono`,children:a})]}),!!i?.length&&(0,H.jsxs)(`p`,{className:`break-all`,children:[`已确认消息 `,(0,H.jsx)(`code`,{className:`font-mono`,children:i.join(`、`)})]})]})}var Vv=new Intl.NumberFormat(`zh-CN`);function Hv(e){return Vv.format(Math.round(e))}function Uv(e,t=!0){return new Date(e).toLocaleTimeString(`zh-CN`,{hour:`2-digit`,minute:`2-digit`,...t?{second:`2-digit`}:{},hour12:!1})}var Wv=[{value:10,name:`trace`},{value:20,name:`debug`},{value:30,name:`info`},{value:40,name:`warn`},{value:50,name:`error`},{value:60,name:`fatal`}];function Gv(e){return[...Wv].reverse().find(t=>e>=t.value)?.name??`trace`}var Kv={trace:`text-fg-3 bg-surface-2`,debug:`text-fg-3 bg-surface-2`,info:`text-info bg-info-soft`,warn:`text-warning bg-warning-soft`,error:`text-danger bg-danger-soft`,fatal:`text-white bg-danger`};function qv({className:e}){let t=(0,V.useId)();return(0,H.jsxs)(`svg`,{viewBox:`0 0 32 32`,className:B(`size-7`,e),"aria-hidden":!0,children:[(0,H.jsx)(`defs`,{children:(0,H.jsxs)(`linearGradient`,{id:t,x1:`0`,y1:`0`,x2:`1`,y2:`1`,children:[(0,H.jsx)(`stop`,{offset:`0`,stopColor:`#8b7ffa`}),(0,H.jsx)(`stop`,{offset:`1`,stopColor:`#5b4cf0`})]})}),(0,H.jsx)(`rect`,{width:`32`,height:`32`,rx:`9`,fill:`url(#${t})`}),(0,H.jsx)(`rect`,{x:`0.5`,y:`0.5`,width:`31`,height:`31`,rx:`8.5`,fill:`none`,stroke:`white`,strokeOpacity:`0.18`}),(0,H.jsx)(`path`,{d:`M10 21.5 16 9l6 12.5M12.6 17h6.8`,stroke:`white`,strokeWidth:`2.6`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}var Jv=232,Yv={top:14,right:12,bottom:26,left:40},Xv=[{key:`received`,label:`收到`,color:`var(--series-in)`},{key:`sent`,label:`发出`,color:`var(--series-out)`}];function Zv(e){let t=e[0];if(!t)return``;let n=[],r=[];for(let i=1;i<e.length;i++){let[a,o]=e[i-1]??t,[s,c]=e[i]??t;r.push(s-a),n.push((c-o)/(s-a))}let i=e.map((e,t)=>{let i=n[t-1],a=n[t];if(i===void 0)return a??0;if(a===void 0||i*a<=0)return a===void 0?i:0;let o=r[t-1]??0,s=r[t]??0;return 3*(o+s)/((2*s+o)/i+(s+2*o)/a)}),a=`M${t[0]},${t[1]}`;for(let n=1;n<e.length;n++){let[r,o]=e[n-1]??t,[s,c]=e[n]??t,l=(s-r)/3;a+=`C${r+l},${o+l*(i[n-1]??0)},${s-l},${c-l*(i[n]??0)},${s},${c}`}return a}function Qv(e){let t=Math.max(1,e)/4,n=10**Math.floor(Math.log10(t)),r=t/n,i=Math.max(1,(r<=1?1:r<=2?2:r<=5?5:10)*n);return{max:i*4,step:i}}function $v({points:e,range:t,dimmed:n=!1}){let r=(0,V.useRef)(null),[i,a]=(0,V.useState)(0),[o,s]=(0,V.useState)(null);(0,V.useLayoutEffect)(()=>{let e=r.current;if(!e)return;let t=new ResizeObserver(([e])=>a(e?.contentRect.width??0));return t.observe(e),()=>t.disconnect()},[]);let c=(0,V.useMemo)(()=>{if(i===0||e.length===0)return null;let n=i-Yv.left-Yv.right,r=Jv-Yv.top-Yv.bottom,{max:a,step:o}=Qv(Math.max(...e.map(e=>Math.max(e.received,e.sent)))),s=e.length>1?n/(e.length-1):0,c=e=>Yv.left+e*s,l=e=>Yv.top+r-e/a*r,u=Object.fromEntries(Xv.map(t=>{let n=Zv(e.map((e,n)=>[c(n),l(e[t.key])])),r=`${n}L${c(e.length-1)},${l(0)}L${c(0)},${l(0)}Z`;return[t.key,{line:n,area:r}]})),d=[0,1,2,3,4].map(e=>({value:e*o,y:l(e*o)})),f=t===`1h`?15:24;return{x:c,y:l,lines:u,ticks:d,xLabels:e.map((e,t)=>({index:t,t:e.t})).filter(({t:e,index:n})=>t===`1h`?new Date(e).getMinutes()%15==0:n%f===0),innerHeight:r,step:s}},[e,t,i]),l=t=>{if(!c||e.length===0)return;let n=t.currentTarget.getBoundingClientRect(),r=t.clientX-n.left,i=c.step===0?0:Math.round(r/c.step);s(Math.max(0,Math.min(e.length-1,i)))},u=o===null?null:e[o],d={received:e.reduce((e,t)=>e+t.received,0),sent:e.reduce((e,t)=>e+t.sent,0)},f=d.received===0&&d.sent===0;return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`mb-3 flex items-center gap-5 px-5`,children:Xv.map(e=>(0,H.jsxs)(`div`,{className:`flex items-center gap-2 text-[12.5px] text-fg-2`,children:[(0,H.jsx)(`span`,{className:`h-[2px] w-3.5 rounded-full`,style:{background:e.color}}),e.label,(0,H.jsx)(`span`,{className:`font-medium text-fg tabular`,children:Hv(d[e.key])})]},e.key))}),(0,H.jsxs)(`div`,{ref:r,className:B(`relative transition-opacity duration-300`,n&&`opacity-50`),style:{height:Jv},children:[c&&(0,H.jsxs)(`svg`,{width:i,height:Jv,className:`block overflow-visible`,role:`img`,"aria-label":`消息趋势图`,children:[(0,H.jsx)(`defs`,{children:Xv.map(e=>(0,H.jsxs)(`linearGradient`,{id:`fill-${e.key}`,x1:`0`,x2:`0`,y1:`0`,y2:`1`,children:[(0,H.jsx)(`stop`,{offset:`0%`,stopColor:e.color,stopOpacity:.14}),(0,H.jsx)(`stop`,{offset:`100%`,stopColor:e.color,stopOpacity:.01})]},e.key))}),c.ticks.map(e=>(0,H.jsxs)(`g`,{children:[(0,H.jsx)(`line`,{x1:Yv.left,x2:i-Yv.right,y1:e.y,y2:e.y,stroke:`var(--border)`,strokeWidth:1}),(0,H.jsx)(`text`,{x:Yv.left-10,y:e.y,dy:`0.32em`,textAnchor:`end`,className:`fill-fg-3 text-[11px] tabular`,children:Hv(e.value)})]},e.value)),c.xLabels.map(({index:e,t})=>(0,H.jsx)(`text`,{x:c.x(e),y:226,textAnchor:`middle`,className:`fill-fg-3 text-[11px] tabular`,children:Uv(t,!1)},t)),Xv.map(e=>(0,H.jsx)(K.path,{d:c.lines[e.key].area,fill:`url(#fill-${e.key})`,initial:{opacity:0},animate:{opacity:1,d:c.lines[e.key].area},transition:q},`${e.key}-area`)),Xv.map(e=>(0,H.jsx)(K.path,{d:c.lines[e.key].line,fill:`none`,stroke:e.color,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,initial:{pathLength:0},animate:{pathLength:1,d:c.lines[e.key].line},transition:{pathLength:{duration:1.1,ease:[.16,1,.3,1]},d:q}},`${e.key}-line`)),u&&o!==null&&(0,H.jsxs)(`g`,{pointerEvents:`none`,children:[(0,H.jsx)(`line`,{x1:c.x(o),x2:c.x(o),y1:Yv.top,y2:Yv.top+c.innerHeight,stroke:`var(--border-strong)`,strokeWidth:1}),Xv.map(e=>(0,H.jsx)(K.circle,{initial:!1,animate:{cx:c.x(o),cy:c.y(u[e.key])},transition:{type:`spring`,stiffness:700,damping:40},r:4,fill:e.color,stroke:`var(--surface)`,strokeWidth:2},e.key))]}),(0,H.jsx)(`rect`,{x:Yv.left,y:Yv.top,width:Math.max(0,i-Yv.left-Yv.right),height:c.innerHeight,fill:`transparent`,onPointerMove:l,onPointerLeave:()=>s(null)})]}),(0,H.jsx)(bg,{children:u&&o!==null&&c&&(0,H.jsxs)(K.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0,x:Math.min(Math.max(c.x(o)-70,0),i-150)},exit:{opacity:0},transition:{type:`spring`,stiffness:600,damping:40},className:`pointer-events-none absolute top-1 left-0 w-[150px] rounded-xl border border-border bg-surface/95 px-3 py-2.5 shadow-pop backdrop-blur`,children:[(0,H.jsxs)(`div`,{className:`mb-1.5 text-[11.5px] text-fg-3 tabular`,children:[Uv(u.t,!1),t===`24h`&&` – ${Uv(u.t+9e5,!1)}`]}),Xv.map(e=>(0,H.jsxs)(`div`,{className:`flex items-center gap-2 text-[12.5px]`,children:[(0,H.jsx)(`span`,{className:`h-[2px] w-3 rounded-full`,style:{background:e.color}}),(0,H.jsx)(`span`,{className:`font-semibold text-fg tabular`,children:Hv(u[e.key])}),(0,H.jsx)(`span`,{className:`text-fg-3`,children:e.label})]},e.key))]})}),f&&c&&(0,H.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center pb-6 text-[12.5px] text-fg-3`,children:`这段时间还没有消息`}),(0,H.jsxs)(`table`,{className:`sr-only`,children:[(0,H.jsx)(`caption`,{children:`每个时间段收到和发出的消息数`}),(0,H.jsx)(`thead`,{children:(0,H.jsxs)(`tr`,{children:[(0,H.jsx)(`th`,{children:`时间`}),(0,H.jsx)(`th`,{children:`收到`}),(0,H.jsx)(`th`,{children:`发出`})]})}),(0,H.jsx)(`tbody`,{children:e.map(e=>(0,H.jsxs)(`tr`,{children:[(0,H.jsx)(`td`,{children:Uv(e.t,!1)}),(0,H.jsx)(`td`,{children:e.received}),(0,H.jsx)(`td`,{children:e.sent})]},e.t))})]})]})]})}var ey=Object.defineProperty,ty=(e,t)=>ey(e,`name`,{value:t,configurable:!0}),ny=!!(typeof window<`u`&&window.document&&window.document.createElement);function Y(e,t,{checkForDefaultPrevented:n=!0}={}){return ty(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}ty(Y,`composeEventHandlers`);function ry(e){if(!ny)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}ty(ry,`getOwnerWindow`);function iy(e){if(!ny)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}ty(iy,`getOwnerDocument`);function ay(e,t=!1){let{activeElement:n}=iy(e);if(!n?.nodeName)return null;if(oy(n)&&n.contentDocument)return ay(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=iy(n).getElementById(e);if(t)return t}}return n}ty(ay,`getActiveElement`);function oy(e){return e.tagName===`IFRAME`}ty(oy,`isFrame`);var sy=Object.defineProperty,cy=(e,t)=>sy(e,`name`,{value:t,configurable:!0});function ly(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}cy(ly,`setRef`);function uy(...e){return t=>{let n=!1,r=e.map(e=>{let r=ly(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():ly(e[t],null)}}}}cy(uy,`composeRefs`);function dy(...e){return V.useCallback(uy(...e),e)}cy(dy,`useComposedRefs`);var fy=Object.defineProperty,py=(e,t)=>fy(e,`name`,{value:t,configurable:!0});function my(e,t){let n=V.createContext(t);n.displayName=e+`Context`;let r=py(e=>{let{children:t,...r}=e,i=V.useMemo(()=>r,Object.values(r));return(0,H.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=V.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return py(i,`useContext`),[r,i]}py(my,`createContext`);function hy(e,t=[]){let n=[];function r(t,r){let i=V.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=py(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=V.useMemo(()=>o,Object.values(o));return(0,H.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=V.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return py(s,`useContext`),[o,s]}py(r,`createContext`);let i=py(()=>{let t=n.map(e=>V.createContext(e));return py(function(n){let r=n?.[e]||t;return V.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,gy(i,...t)]}py(hy,`createContextScope`);function gy(...e){let t=e[0];if(e.length===1)return t;let n=py(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return py(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return V.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}py(gy,`composeContextScopes`);var _y=globalThis?.document?V.useLayoutEffect:()=>{},vy=Object.defineProperty,yy=(e,t)=>vy(e,`name`,{value:t,configurable:!0}),by=V.useEffectEvent,xy=V.useInsertionEffect;function Sy(e){if(typeof by==`function`)return by(e);let t=V.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof xy==`function`?xy(()=>{t.current=e}):_y(()=>{t.current=e}),V.useMemo(()=>((...e)=>t.current?.(...e)),[])}yy(Sy,`useEffectEvent`);var Cy=Object.defineProperty,wy=(e,t)=>Cy(e,`name`,{value:t,configurable:!0}),Ty=V.useInsertionEffect||_y;function Ey({prop:e,defaultProp:t,onChange:n=wy(()=>{},`onChange`),caller:r}){let[i,a,o]=Dy({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,V.useCallback(t=>{if(s){let n=Oy(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}wy(Ey,`useControllableState`);function Dy({defaultProp:e,onChange:t}){let[n,r]=V.useState(e),i=V.useRef(n),a=V.useRef(t);return Ty(()=>{a.current=t},[t]),V.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}wy(Dy,`useUncontrolledState`);function Oy(e){return typeof e==`function`}wy(Oy,`isFunction`);var ky=Symbol(`RADIX:SYNC_STATE`);function Ay(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Sy(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=V.useReducer((t,n)=>{if(n.type===ky)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=V.useRef(p);V.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=V.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return V.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:ky,state:i})},[i,d.state,c]),[h,f]}wy(Ay,`useControllableStateReducer`);var jy=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),My=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=jy()})),Ny=l(My(),1),Py=Object.defineProperty,Fy=(e,t)=>Py(e,`name`,{value:t,configurable:!0});function Iy(e){let t=V.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];r=Ky(r),V.Children.forEach(r,e=>{if(Hy(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;Wy(n)&&typeof Xy==`function`;)n=Xy(n._payload);a=zy(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=V.cloneElement(a,void 0,s):!o&&V.Children.count(r)===1&&V.isValidElement(r)&&(a=r);let c=a?Vy(a):void 0,l=dy(n,c);if(!a){if(r||r===0)throw Error(o?Yy(e):Jy(e));return r}let u=By(i,a.props??{});return a.type!==V.Fragment&&(u.ref=n?l:c),V.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}Fy(Iy,`createSlot`);var Ly=Symbol.for(`radix.slottable`);function Ry(e){let t=Fy(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Ly,t}Fy(Ry,`createSlottable`);var zy=Fy((e,t)=>`child`in e.props?V.isValidElement(t)?V.cloneElement(t,void 0,e.props.children(t.props.children)):null:V.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function By(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=qy(a,i))}return{...e,...n}}Fy(By,`mergeProps`);function Vy(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Fy(Vy,`getElementRef`);function Hy(e){return V.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Ly}Fy(Hy,`isSlottable`);var Uy=Symbol.for(`react.lazy`);function Wy(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Uy&&`_payload`in e&&Gy(e._payload)}Fy(Wy,`isLazyComponent`);function Gy(e){return typeof e==`object`&&!!e&&`then`in e}Fy(Gy,`isPromiseLike`);function Ky(e){let t=e;for(;Wy(t)&&typeof Xy==`function`;)t=Xy(t._payload);return t}Fy(Ky,`useUnwrappedLazy`);function qy(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Fy(qy,`concatAriaDescribedby`);var Jy=Fy(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Yy=Fy(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),Xy=V.use,Zy=Object.defineProperty,Qy=(e,t)=>Zy(e,`name`,{value:t,configurable:!0}),$y=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Iy(`Primitive.${t}`),r=V.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,H.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function eb(e,t){e&&Ny.flushSync(()=>e.dispatchEvent(t))}Qy(eb,`dispatchDiscreteCustomEvent`);var tb=Object.defineProperty,nb=(e,t)=>tb(e,`name`,{value:t,configurable:!0});function rb(e){let t=e+`CollectionProvider`,[n,r]=hy(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=nb(e=>{let{scope:t,children:n}=e,r=V.useRef(null),a=V.useRef(new Map).current;return(0,H.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=Iy(s),l=V.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=dy(t,a(s,n).collectionRef);return(0,H.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=Iy(u),p=V.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=V.useRef(null),s=dy(t,o),c=a(u,n);return V.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,H.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return V.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return nb(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}nb(rb,`createCollection`);var ib=new WeakMap,ab=class e extends Map{static{nb(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],ib.set(this,!0)}set(e,t){return ib.get(this)&&!this.has(e)&&this.#e.push(e),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=r?this.size:this.size+1,a=cb(e),o=a>=0?Math.min(a,i-1):Math.max(i+a,0);if(r?this.#e.indexOf(t)===o:o===this.size)return this.set(t,n),this;let s=this.#e.filter(e=>e!==t);s.splice(o,0,t);let c=s.map(e=>[e,e===t?n:this.get(e)]);this.clear();for(let[e,t]of c)this.set(e,t);return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<r?r-1:r;return this.insert(a,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);if(r===-1)return this;let i=this.#e.indexOf(t),a=i!==-1&&i<=r?r:r+1;return this.insert(a,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=ob(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=ob(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return ob(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=0,a=n;for(let e of this)a=i===0&&!r?e:Reflect.apply(t,this,[a,e,i,this]),i++;return a}reduceRight(...e){let[t,n]=e,r=e.length>1;if(!r&&this.size===0)throw TypeError(`Reduce of empty OrderedDict with no initial value`);let i=n;for(let e=this.size-1;e>=0;e--){let n=this.entryAt(e);i=e===this.size-1&&!r?n:Reflect.apply(t,this,[i,n,e,this])}return i}sort(e){if(typeof e!=`function`)throw TypeError(`OrderedDict.sort requires a compare function`);let t=[...this.entries()].sort(e);this.clear();for(let[e,n]of t)this.set(e,n);return this}toSorted(t){if(typeof t!=`function`)throw TypeError(`OrderedDict.toSorted requires a compare function`);let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e;for(let e of this.#e.slice(t,n))r.set(e,this.get(e));return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function ob(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=sb(e,t);return n===-1?void 0:e[n]}nb(ob,`at`);function sb(e,t){let n=e.length,r=cb(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}nb(sb,`toSafeIndex`);function cb(e){return e!==e||e===0?0:Math.trunc(e)}nb(cb,`toSafeInteger`);function lb(e){let t=e+`CollectionProvider`,[n,r]=hy(t),[i,a]=n(t);i.displayName=e+`CollectionStableContextProvider`;let[o,s]=n(t);o.displayName=e+`CollectionStatefulContextProvider`;let c=nb(({state:e,...t})=>e?(0,H.jsx)(u,{...t,state:e}):(0,H.jsx)(l,{...t}),`CollectionProvider`);c.displayName=t;let l=nb(e=>{let t=_();return(0,H.jsx)(u,{...e,state:t})},`CollectionInit`);l.displayName=e+`CollectionInit`;let u=nb(e=>{let{scope:t,children:n,state:r}=e,a=V.useRef(null),[s,c]=V.useState(null),l=dy(a,c),[u,d]=r,f=V.useRef(new ab),p=V.useCallback(()=>{let e=f.current;return fb(e)||e.sort(pb),e},[]);return V.useEffect(()=>{if(!s)return;let e=mb(()=>{d(e=>{let t=e.toSorted(pb);return t.some(([t],n)=>e.keyAt(n)!==t)?t:e})});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s,d]),(0,H.jsx)(i,{scope:t,collectionElementRef:l,collectionElementRefObject:a,getCollection:p,setCollection:d,registryRef:f,children:(0,H.jsx)(o,{scope:t,collectionElement:s,collection:u,children:n})})},`CollectionProviderImpl`);u.displayName=e+`CollectionProviderImpl`;let d=e+`CollectionSlot`,f=Iy(d),p=V.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=dy(t,a(d,n).collectionElementRef);return(0,H.jsx)(f,{ref:i,children:r})});p.displayName=d;let m=e+`CollectionItemSlot`,h=Iy(m),g=V.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=V.useRef(null),{setCollection:s,registryRef:c}=a(m,n),l=V.useRef(i);ub(l.current,i)||(l.current=i);let u=l.current,d=dy(t,V.useCallback(e=>{let t=c.current;e?t.set(e,{...l.current,element:e}):o.current&&t.delete(o.current)},[c]),o);_y(()=>{let e=o.current,t=c.current;e&&t.has(e)&&t.set(e,{...u,element:e})},[u,c]);let f=V.useRef(null);return V.useEffect(()=>{let e=o.current,t=f.current;((t?.element??null)!==e||e&&t?.itemData!==u)&&(f.current=e?{element:e,itemData:u}:null,s(n=>{let r=new ab(n);return t&&t.element!==e&&r.delete(t.element),e&&r.set(e,{...u,element:e}),r.sort(pb)}))}),V.useEffect(()=>()=>{let e=f.current;f.current=null,e&&s(t=>{if(!t.has(e.element))return t;let n=new ab(t);return n.delete(e.element),n})},[s]),(0,H.jsx)(h,{"data-radix-collection-item":``,ref:d,children:r})});g.displayName=m;function _(){return V.useState(new ab)}nb(_,`useInitCollection`);function v(t){let{collection:n}=s(e+`CollectionConsumer`,t);return n}nb(v,`useCollection`);function y(t){let{getCollection:n}=a(e+`CollectionConsumer`,t);return n}return nb(y,`useGetCollection`),[{Provider:c,Slot:p,ItemSlot:g},{createCollectionScope:r,useCollection:v,useGetCollection:y,useInitCollection:_}]}nb(lb,`createCollection`);function ub(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}nb(ub,`shallowEqual`);function db(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}nb(db,`isElementPreceding`);function fb(e){let t;for(let n of e.keys()){if(t){let e=t.compareDocumentPosition(n);if(!(e&Node.DOCUMENT_POSITION_DISCONNECTED)&&e&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=n}return!0}nb(fb,`isInDocumentOrder`);function pb(e,t){return!e[1].element||!t[1].element?0:db(e[1].element,t[1].element)?-1:1}nb(pb,`sortByDocumentPosition`);function mb(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}nb(mb,`getChildListObserver`);var hb=Object.defineProperty,gb=(e,t)=>hb(e,`name`,{value:t,configurable:!0}),_b={LTR:`ltr`,RTL:`rtl`},vb=V.createContext(void 0);function yb(e){let t=V.useContext(vb);return e||t||_b.LTR}gb(yb,`useDirection`);var bb=Object.defineProperty,xb=(e,t)=>bb(e,`name`,{value:t,configurable:!0}),Sb=V.useInsertionEffect;function Cb(e){let t=V.useRef(e);return typeof Sb==`function`?Sb(()=>{t.current=e}):_y(()=>{t.current=e}),V.useMemo(()=>((...e)=>t.current?.(...e)),[])}xb(Cb,`useCallbackRef`);var wb=Object.defineProperty,Tb=(e,t)=>wb(e,`name`,{value:t,configurable:!0}),Eb=`dismissableLayer.update`,Db=`dismissableLayer.pointerDownOutside`,Ob=`dismissableLayer.focusOutside`,kb,Ab=V.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),jb=V.forwardRef(Tb(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=V.useContext(Ab),[d,f]=V.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=V.useState({}),h=dy(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=V.useRef(!1),C=Pb(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:V.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),w=Fb(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,E=Cb(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return V.useEffect(()=>{if(T)return p.addEventListener(`keydown`,E,{capture:!0}),()=>p.removeEventListener(`keydown`,E,{capture:!0})},[p,T,E]),V.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(kb=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Ib(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=kb))}},[d,p,n,u]),V.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Ib())},[d,u]),V.useEffect(()=>{let e=Tb(()=>m({}),`handleUpdate`);return document.addEventListener(Eb,e),()=>document.removeEventListener(Eb,e)},[]),(0,H.jsx)($y.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:Y(e.onFocusCapture,w.onFocusCapture),onBlurCapture:Y(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:Y(e.onPointerDownCapture,C.onPointerDownCapture)})},`DismissableLayer`));function Mb(){let e=V.useContext(Ab),[t,n]=V.useState(null);return V.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Tb(Mb,`useDismissableLayerSurface`);var Nb=Tb(()=>!0,`IS_TRUE`);function Pb(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Nb}=t,s=Cb(e),c=V.useRef(!1),l=V.useRef(!1),u=V.useRef(new Map),d=V.useRef(()=>{});return V.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}Tb(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}Tb(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}Tb(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}Tb(p,`handleInteractionBubble`);let m=Tb(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||Lb(Db,s,p,{discrete:!0})};if(Tb(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:Tb(()=>c.current=!0,`onPointerDownCapture`)}}Tb(Pb,`usePointerDownOutside`);function Fb(e,t=globalThis?.document){let n=Cb(e),r=V.useRef(!1);return V.useEffect(()=>{let e=Tb(e=>{e.target&&!r.current&&Lb(Ob,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Tb(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Tb(()=>r.current=!1,`onBlurCapture`)}}Tb(Fb,`useFocusOutside`);function Ib(){let e=new CustomEvent(Eb);document.dispatchEvent(e)}Tb(Ib,`dispatchUpdate`);function Lb(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?eb(i,a):i.dispatchEvent(a)}Tb(Lb,`handleAndDispatchCustomEvent`);var Rb=Object.defineProperty,zb=(e,t)=>Rb(e,`name`,{value:t,configurable:!0}),Bb=0,Vb=null;function Hb(e){return Ub(),e.children}zb(Hb,`FocusGuards`);function Ub(){V.useEffect(()=>{Vb||={start:Wb(),end:Wb()};let{start:e,end:t}=Vb;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Bb++,()=>{Bb===1&&(Vb?.start.remove(),Vb?.end.remove(),Vb=null),Bb=Math.max(0,Bb-1)}},[])}zb(Ub,`useFocusGuards`);function Wb(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}zb(Wb,`createFocusGuard`);var Gb=Object.defineProperty,Kb=(e,t)=>Gb(e,`name`,{value:t,configurable:!0}),qb=`focusScope.autoFocusOnMount`,Jb=`focusScope.autoFocusOnUnmount`,Yb={bubbles:!1,cancelable:!0},Xb=V.forwardRef(Kb(function(e,t){let{loop:n=!1,trapped:r=!1,branches:i,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,l]=V.useState(null),u=Cb(a),d=Cb(o),f=V.useRef(null),p=dy(t,l),m=V.useRef(i);V.useEffect(()=>{m.current=i});let h=V.useCallback(e=>e?c?.contains(e)?!0:!!m.current?.some(t=>t.contains(e)):!1,[c]),g=V.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;V.useEffect(()=>{if(r){let e=function(e){if(g.paused||!c)return;let t=e.target;h(t)?f.current=t:sx(f.current,{select:!0})},t=function(e){if(g.paused||!c)return;let t=e.relatedTarget;t!==null&&(h(t)||sx(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&sx(c)};Kb(e,`handleFocusIn`),Kb(t,`handleFocusOut`),Kb(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,g.paused,h]),V.useEffect(()=>{if(c){cx.add(g);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(qb,Yb);c.addEventListener(qb,u),c.dispatchEvent(t),t.defaultPrevented||(tx(dx(rx(c)),{select:!0}),document.activeElement===e&&sx(c))}return()=>{c.removeEventListener(qb,u);let t=c.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(Jb,Yb);c.addEventListener(Jb,d),c.dispatchEvent(r),r.defaultPrevented||sx(e??t.body,{select:!0}),c.removeEventListener(Jb,d),cx.remove(g)},0)}}},[c,u,d,g]);let _=V.useCallback(e=>{if(!n&&!r||g.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=nx(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&sx(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&sx(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,g.paused]);return(0,H.jsx)($y.div,{tabIndex:-1,...s,ref:p,onKeyDown:_})},`FocusScope`)),Zb=V.createContext(null);function Qb({registry:e,children:t}){return e?(0,H.jsx)(Zb.Provider,{value:e,children:t}):t}Kb(Qb,`FocusScopeBranchProvider`);function $b(){let[e,t]=V.useState([]);return{nodes:e,registry:V.useMemo(()=>({add:Kb(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:Kb(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}Kb($b,`useFocusScopeBranchRegistry`);function ex(e){let t=V.useContext(Zb);V.useEffect(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}Kb(ex,`useFocusScopeBranch`);function tx(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(sx(r,{select:t}),document.activeElement!==n)return}Kb(tx,`focusFirst`);function nx(e){let t=rx(e);return[ix(t,e),ix(t.reverse(),e)]}Kb(nx,`getTabbableEdges`);function rx(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Kb(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Kb(rx,`getTabbableCandidates`);function ix(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):ax(r,{upTo:t})))return r}Kb(ix,`findVisible`);function ax(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}Kb(ax,`isHidden`);function ox(e){return e.tagName===`INPUT`&&typeof e.select==`function`}Kb(ox,`isSelectableInput`);function sx(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&ox(e)&&t&&e.select()}}Kb(sx,`focus`);var cx=lx();function lx(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=ux(e,t),e.unshift(t)},remove(t){e=ux(e,t),e[0]?.resume()}}}Kb(lx,`createFocusScopesStack`);function ux(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Kb(ux,`arrayRemove`);function dx(e){return e.filter(e=>e.tagName!==`A`)}Kb(dx,`removeLinks`);var fx=Object.defineProperty,px=(e,t)=>fx(e,`name`,{value:t,configurable:!0}),mx=V.useId||(()=>void 0),hx=0;function gx(e){let[t,n]=V.useState(mx());return _y(()=>{e||n(e=>e??String(hx++))},[e]),e||(t?`radix-${t}`:``)}px(gx,`useId`);var _x=[`top`,`right`,`bottom`,`left`],vx=Math.min,yx=Math.max,bx=Math.round,xx=Math.floor,Sx=e=>({x:e,y:e}),Cx={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function wx(e,t,n){return yx(e,vx(t,n))}function Tx(e,t){return typeof e==`function`?e(t):e}function Ex(e){return e.split(`-`)[0]}function Dx(e){return e.split(`-`)[1]}function Ox(e){return e===`x`?`y`:`x`}function kx(e){return e===`y`?`height`:`width`}function Ax(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function jx(e){return Ox(Ax(e))}function Mx(e,t,n){n===void 0&&(n=!1);let r=Dx(e),i=jx(e),a=kx(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Vx(o)),[o,Vx(o)]}function Nx(e){let t=Vx(e);return[Px(e),t,Px(t)]}function Px(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Fx=[`left`,`right`],Ix=[`right`,`left`],Lx=[`top`,`bottom`],Rx=[`bottom`,`top`];function zx(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ix:Fx:t?Fx:Ix;case`left`:case`right`:return t?Lx:Rx;default:return[]}}function Bx(e,t,n,r){let i=Dx(e),a=zx(Ex(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Px)))),a}function Vx(e){let t=Ex(e);return Cx[t]+e.slice(t.length)}function Hx(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Ux(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Hx(e)}function Wx(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Gx(e,t,n){let{reference:r,floating:i}=e,a=Ax(t),o=jx(t),s=kx(o),c=Ex(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Dx(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Kx(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Tx(t,e),p=Ux(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Wx(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Wx(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var qx=50,Jx=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Kx},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Gx(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<qx&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Gx(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Yx=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Tx(e,t)||{};if(l==null)return{};let d=Ux(u),f={x:n,y:r},p=jx(i),m=kx(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=vx(d[_],T),D=vx(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=wx(E,k,O),j=!c.arrow&&Dx(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Xx=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Tx(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Ex(r),_=Ax(o),v=Ex(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Vx(o)]:Nx(o)),x=p!==`none`;!d&&x&&b.push(...Bx(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Mx(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Ax(t)||T.every(e=>Ax(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Ax(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function Zx(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qx(e){return _x.some(t=>e[t]>=0)}var $x=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Tx(e,t);switch(i){case`referenceHidden`:{let e=Zx(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Qx(e)}}}case`escaped`:{let e=Zx(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Qx(e)}}}default:return{}}}}},eS=new Set([`left`,`top`]);async function tS(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ex(n),s=Dx(n),c=Ax(n)===`y`,l=eS.has(o)?-1:1,u=a&&c?-1:1,d=Tx(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var nS=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await tS(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},rS=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Tx(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Ax(i),p=Ox(f),m=u[p],h=u[f],g=(e,t)=>wx(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},iS=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Tx(e,t),u={x:n,y:r},d=Ax(i),f=Ox(d),p=u[f],m=u[d],h=Tx(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=eS.has(Ex(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},aS=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Tx(e,t),c=await i.detectOverflow(t,s),l=Ex(n),u=Dx(n),d=Ax(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=vx(p-c[m],g),y=vx(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*yx(c.left,c.right):S=p-2*yx(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function oS(){return typeof window<`u`}function sS(e){return uS(e)?(e.nodeName||``).toLowerCase():`#document`}function cS(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function lS(e){return((uS(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function uS(e){return oS()?e instanceof Node||e instanceof cS(e).Node:!1}function dS(e){return oS()?e instanceof Element||e instanceof cS(e).Element:!1}function fS(e){return oS()?e instanceof HTMLElement||e instanceof cS(e).HTMLElement:!1}function pS(e){return!oS()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof cS(e).ShadowRoot}function mS(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=TS(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function hS(e){return/^(table|td|th)$/.test(sS(e))}function gS(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var _S=/transform|translate|scale|rotate|perspective|filter/,vS=/paint|layout|strict|content/,yS=e=>!!e&&e!==`none`,bS;function xS(e){let t=dS(e)?TS(e):e;return yS(t.transform)||yS(t.translate)||yS(t.scale)||yS(t.rotate)||yS(t.perspective)||!CS()&&(yS(t.backdropFilter)||yS(t.filter))||_S.test(t.willChange||``)||vS.test(t.contain||``)}function SS(e){let t=DS(e);for(;fS(t)&&!wS(t);){if(xS(t))return t;if(gS(t))return null;t=DS(t)}return null}function CS(){return bS??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),bS}function wS(e){return/^(html|body|#document)$/.test(sS(e))}function TS(e){return cS(e).getComputedStyle(e)}function ES(e){return dS(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function DS(e){if(sS(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||pS(e)&&e.host||lS(e);return pS(t)?t.host:t}function OS(e){let t=DS(e);return wS(t)?(e.ownerDocument||e).body:fS(t)&&mS(t)?t:OS(t)}function kS(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=OS(e),i=r===e.ownerDocument?.body,a=cS(r);if(i){let e=AS(a);return t.concat(a,a.visualViewport||[],mS(r)?r:[],e&&n?kS(e):[])}return t.concat(r,kS(r,[],n))}function AS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function jS(e){let t=TS(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=fS(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=bx(n)!==a||bx(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function MS(e){return dS(e)?e:e.contextElement}function NS(e){let t=MS(e);if(!fS(t))return Sx(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=jS(t),o=(a?bx(n.width):n.width)/r,s=(a?bx(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var PS=Sx(0);function FS(e){let t=cS(e);return!CS()||!t.visualViewport?PS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function IS(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===cS(e)}function LS(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=MS(e),o=Sx(1);t&&(r?dS(r)&&(o=NS(r)):o=NS(e));let s=IS(a,n,r)?FS(a):Sx(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=cS(a),t=dS(r)?cS(r):r,n=e,i=AS(n);for(;i&&t!==n;){let e=NS(i),t=i.getBoundingClientRect(),r=TS(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=cS(i),i=AS(n)}}return Wx({width:u,height:d,x:c,y:l})}function RS(e,t){let n=ES(e).scrollLeft;return t?t.left+n:LS(lS(e)).left+n}function zS(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-RS(e,n),y:n.top+t.scrollTop}}function BS(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=lS(r),s=t?gS(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Sx(1),u=Sx(0),d=fS(r);if((d||!a)&&((sS(r)!==`body`||mS(o))&&(c=ES(r)),d)){let e=LS(r);l=NS(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?zS(o,c):Sx(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function VS(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function HS(e){let t=ES(e),n=e.ownerDocument.body,r=yx(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=yx(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+RS(e),o=-t.scrollTop;return TS(n).direction===`rtl`&&(a+=yx(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var US=25;function WS(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=cS(e),a=lS(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!CS()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(RS(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=US&&(s-=o)}return{width:s,height:c,x:l,y:u}}function GS(e,t){let n=LS(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=NS(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function KS(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=WS(e,n,t);else if(t===`document`)r=HS(lS(e));else if(dS(t))r=GS(t,n);else{let n=FS(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Wx(r)}function qS(e,t){let n=t.get(e);if(n)return n;let r=kS(e,[],!1).filter(e=>dS(e)&&sS(e)!==`body`),i=null,a=TS(e).position===`fixed`,o=a?DS(e):e;for(;dS(o)&&!wS(o);){let e=TS(o),t=xS(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=DS(o)}return t.set(e,r),r}function JS(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?gS(t)?[]:qS(t,this._c):[].concat(n),r],o=KS(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=KS(t,a[e],i);s=yx(n.top,s),c=vx(n.right,c),l=vx(n.bottom,l),u=yx(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function YS(e){let{width:t,height:n}=jS(e);return{width:t,height:n}}function XS(e,t,n){let r=fS(t),i=lS(t),a=n===`fixed`,o=LS(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Sx(0);if((r||!a)&&((sS(t)!==`body`||mS(i))&&(s=ES(t)),r)){let e=LS(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=RS(i));let l=i&&!r&&!a?zS(i,s):Sx(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function ZS(e){return TS(e).position===`static`}function QS(e,t){if(!fS(e)||TS(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return lS(e)===n&&(n=n.ownerDocument.body),n}function $S(e,t){let n=cS(e);if(gS(e))return n;if(!fS(e)){let t=DS(e);for(;t&&!wS(t);){if(dS(t)&&!ZS(t))return t;t=DS(t)}return n}let r=QS(e,t);for(;r&&hS(r)&&ZS(r);)r=QS(r,t);return r&&wS(r)&&ZS(r)&&!xS(r)?n:r||SS(e)||n}var eC=async function(e){let t=this.getOffsetParent||$S,n=this.getDimensions,r=await n(e.floating);return{reference:XS(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function tC(e){return TS(e).direction===`rtl`}var nC={convertOffsetParentRelativeRectToViewportRelativeRect:BS,getDocumentElement:lS,getClippingRect:JS,getOffsetParent:$S,getElementRects:eC,getClientRects:VS,getDimensions:YS,getScale:NS,isElement:dS,isRTL:tC};function rC(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function iC(e,t,n){let r=null,i,a=lS(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=xx(d),h=xx(a.clientWidth-(u+f)),g=xx(a.clientHeight-(d+p)),_=xx(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:yx(0,vx(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!rC(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=cS(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function aC(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=MS(e),u=i||a?[...l?kS(l):[],...t?kS(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?iC(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?LS(e):null;c&&g();function g(){let t=LS(e);h&&!rC(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var oC=nS,sC=rS,cC=Xx,lC=aS,uC=$x,dC=Yx,fC=iS,pC=(e,t,n)=>{let r=new Map,i=n??{},a={...nC,...i.platform,_c:r};return Jx(e,t,{...i,platform:a})},mC=typeof document<`u`?V.useLayoutEffect:function(){};function hC(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!hC(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!hC(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function gC(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function _C(e,t){let n=gC(e);return Math.round(t*n)/n}function vC(e){let t=V.useRef(e);return mC(()=>{t.current=e}),t}function yC(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=V.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=V.useState(r);hC(f,r)||p(r);let[m,h]=V.useState(null),[g,_]=V.useState(null),v=V.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=V.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=V.useRef(null),C=V.useRef(null),w=V.useRef(u),T=c!=null,E=vC(c),D=vC(i),O=vC(l),k=V.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),pC(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!hC(w.current,t)&&(w.current=t,Ny.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);mC(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=V.useRef(!1);mC(()=>(A.current=!0,()=>{A.current=!1}),[]),mC(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=V.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=V.useMemo(()=>({reference:b,floating:x}),[b,x]),N=V.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=_C(M.floating,u.x),r=_C(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...gC(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return V.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var bC=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:dC({element:r.current,padding:i}).fn(n):r?dC({element:r,padding:i}).fn(n):{}}}},xC=(e,t)=>{let n=oC(e);return{name:n.name,fn:n.fn,options:[e,t]}},SC=(e,t)=>{let n=sC(e);return{name:n.name,fn:n.fn,options:[e,t]}},CC=(e,t)=>({fn:fC(e).fn,options:[e,t]}),wC=(e,t)=>{let n=cC(e);return{name:n.name,fn:n.fn,options:[e,t]}},TC=(e,t)=>{let n=lC(e);return{name:n.name,fn:n.fn,options:[e,t]}},EC=(e,t)=>{let n=uC(e);return{name:n.name,fn:n.fn,options:[e,t]}},DC=(e,t)=>{let n=bC(e);return{name:n.name,fn:n.fn,options:[e,t]}},OC=Object.defineProperty,kC=(e,t)=>OC(e,`name`,{value:t,configurable:!0});function AC(e){let[t,n]=V.useState(void 0);return _y(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}n(void 0)},[e]),t}kC(AC,`useSize`);var jC=Object.defineProperty,MC=(e,t)=>jC(e,`name`,{value:t,configurable:!0}),NC={Partial:`partial`,Always:`always`},PC={Optimized:`optimized`,Always:`always`},FC=`Popper`,[IC,LC]=hy(FC),[RC,zC]=IC(FC),BC=MC(e=>{let{__scopePopper:t,children:n}=e,[r,i]=V.useState(null),[a,o]=V.useState(void 0);return(0,H.jsx)(RC,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),VC=`PopperAnchor`,HC=V.forwardRef(MC(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=zC(VC,n),o=V.useRef(null),s=a.onAnchorChange,c=dy(t,V.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=V.useRef(null);V.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&YC(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,H.jsx)($y.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),UC=`PopperContent`,[WC,GC]=IC(UC),KC=V.forwardRef(MC(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=NC.Partial,hideWhenDetached:f=!1,updatePositionStrategy:p=PC.Optimized,onPlaced:m,...h}=e,g=zC(UC,n),[_,v]=V.useState(null),y=dy(t,v),[b,x]=V.useState(null),S=AC(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,k={padding:E,boundary:D.filter(qC),altBoundary:O},{refs:A,floatingStyles:j,placement:M,isPositioned:N,middlewareData:ee}=yC({strategy:`fixed`,placement:T,whileElementsMounted:MC((...e)=>aC(...e,{animationFrame:p===PC.Always}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[xC({mainAxis:i+w,alignmentAxis:o}),c&&SC({mainAxis:!0,crossAxis:!1,...d===NC.Partial?{limiter:CC()}:{},...k}),c&&wC({...k}),TC({...k,apply:MC(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),b&&DC({element:b,padding:s}),JC({arrowWidth:C,arrowHeight:w}),f&&EC(O?{strategy:`referenceHidden`,...k}:{strategy:`referenceHidden`,padding:k.padding,altBoundary:k.altBoundary})]}),P=g.setPlacementState;_y(()=>(P(M),()=>{P(void 0)}),[M,P]);let[F,te]=YC(M),ne=Cb(m);_y(()=>{N&&ne?.()},[N,ne]);let re=ee.arrow?.x,ie=ee.arrow?.y,ae=ee.arrow?.centerOffset!==0,[oe,se]=V.useState();return _y(()=>{_&&se(window.getComputedStyle(_).zIndex)},[_]),(0,H.jsx)(`div`,{ref:A.setFloating,"data-radix-popper-content-wrapper":``,style:{...j,transform:N?j.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:oe,"--radix-popper-transform-origin":[ee.transformOrigin?.x,ee.transformOrigin?.y].join(` `),...ee.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,H.jsx)(WC,{scope:n,placedSide:F,placedAlign:te,onArrowChange:x,arrowX:re,arrowY:ie,shouldHideArrow:ae,children:(0,H.jsx)($y.div,{"data-side":F,"data-align":te,...h,ref:y,style:{...h.style,animation:N?h.style?.animation:`none`}})})})},`PopperContent`));function qC(e){return e!==null}MC(qC,`isNotNull`);var JC=MC(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=YC(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function YC(e){let[t,n=`center`]=e.split(`-`);return[t,n]}MC(YC,`getSideAndAlignFromPlacement`);var XC=Object.defineProperty,ZC=V.forwardRef(((e,t)=>XC(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=V.useState(!1);_y(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?Ny.createPortal((0,H.jsx)($y.div,{...r,ref:t}),o):null},`Portal`)),QC=Object.defineProperty,$C=(e,t)=>QC(e,`name`,{value:t,configurable:!0});function ew(e,t){return V.useReducer((e,n)=>t[e][n]??e,e)}$C(ew,`useStateMachine`);var tw=$C(e=>{let{present:t,children:n}=e,r=nw(t),i=typeof n==`function`?n({present:r.isPresent}):V.Children.only(n),a=iw(r.ref,ow(i));return typeof n==`function`||r.isPresent?V.cloneElement(i,{ref:a}):null},`Presence`);function nw(e){let[t,n]=V.useState(),r=V.useRef(null),i=V.useRef(e),a=V.useRef(`none`),o=V.useRef(void 0),[s,c]=ew(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return V.useEffect(()=>{s===`mounted`?(a.current=o.current??aw(r.current),o.current=void 0):a.current=`none`},[s]),_y(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=aw(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),_y(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=$C(a=>{let o=aw(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=$C(e=>{e.target===t&&(a.current=aw(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:V.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=aw(t)}else r.current=null;n(e)},[])}}$C(nw,`usePresence`);function rw(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}$C(rw,`setRef`);function iw(...e){let t=V.useRef(e);return t.current=e,V.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=rw(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():rw(n[e],null)}}},[])}$C(iw,`useStableComposedRefs`);function aw(e){return e?.animationName||`none`}$C(aw,`getAnimationName`);function ow(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}$C(ow,`getElementRef`);var sw=Object.defineProperty,cw=(e,t)=>sw(e,`name`,{value:t,configurable:!0}),lw=!1;function uw(){let[e,t]=V.useState(lw);return V.useEffect(()=>{lw||(lw=!0,t(!0))},[]),e}cw(uw,`useIsHydrated`);var dw=V.useSyncExternalStore;function fw(){return()=>{}}cw(fw,`subscribe`);function pw(){return dw(fw,()=>!0,()=>!1)}cw(pw,`useIsHydratedModern`);var mw=typeof dw==`function`?pw:uw,hw=Object.defineProperty,gw=(e,t)=>hw(e,`name`,{value:t,configurable:!0}),_w=`rovingFocusGroup.onEntryFocus`,vw={bubbles:!1,cancelable:!0},yw=`RovingFocusGroup`,[bw,xw,Sw]=rb(yw),[Cw,ww]=hy(yw,[Sw]),Tw={Vertical:`vertical`,Horizontal:`horizontal`},Ew={LTR:`ltr`,RTL:`rtl`},[Dw,Ow]=Cw(yw),kw=V.forwardRef(gw(function(e,t){return(0,H.jsx)(bw.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(bw.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,H.jsx)(Aw,{...e,ref:t})})})},`RovingFocusGroup`)),Aw=V.forwardRef(gw(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=V.useRef(null),p=dy(t,f),m=yb(a),[h,g]=Ey({prop:o,defaultProp:s??null,onChange:c,caller:yw}),[_,v]=V.useState(!1),y=Cb(l),b=xw(n),x=V.useRef(!1),[S,C]=V.useState(0);return V.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(_w,y),()=>e.removeEventListener(_w,y)},[y]),(0,H.jsx)(Dw,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:V.useCallback(e=>g(e),[g]),onItemShiftTab:V.useCallback(()=>v(!0),[]),onFocusableItemAdd:V.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:V.useCallback(()=>C(e=>e-1),[]),children:(0,H.jsx)($y.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:Y(e.onMouseDown,()=>{x.current=!0}),onFocus:Y(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(_w,vw);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);Iw([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:Y(e.onBlur,()=>v(!1))})})},`RovingFocusGroupImpl`)),jw=`RovingFocusGroupItem`,Mw=V.forwardRef(gw(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=gx(),l=a||c,u=Ow(jw,n),d=u.currentTabStopId===l,f=xw(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=mw();return _y(()=>{if(g&&r)return p(),()=>m()},[g,r,p,m]),V.useEffect(()=>{if(!g&&r)return p(),()=>m()},[g,r,p,m]),(0,H.jsx)(bw.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,H.jsx)($y.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:Y(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:Y(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:Y(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Fw(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Lw(n,r+1):n.slice(r+1)}setTimeout(()=>Iw(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})},`RovingFocusGroupItem`)),Nw={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Pw(e,t){return t===Ew.RTL?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}gw(Pw,`getDirectionAwareKey`);function Fw(e,t,n){let r=Pw(e.key,n);if(!(t===Tw.Vertical&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===Tw.Horizontal&&[`ArrowUp`,`ArrowDown`].includes(r)))return Nw[r]}gw(Fw,`getFocusIntent`);function Iw(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}gw(Iw,`focusFirst`);function Lw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}gw(Lw,`wrapArray`);var Rw=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},zw=new WeakMap,Bw=new WeakMap,Vw={},Hw=0,Uw=function(e){return e&&(e.host||Uw(e.parentNode))},Ww=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Uw(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Gw=function(e,t,n,r){var i=Ww(t,Array.isArray(e)?e:[e]);Vw[n]||(Vw[n]=new WeakMap);var a=Vw[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(zw.get(e)||0)+1,l=(a.get(e)||0)+1;zw.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Bw.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Hw++,function(){o.forEach(function(e){var t=zw.get(e)-1,i=a.get(e)-1;zw.set(e,t),a.set(e,i),t||(Bw.has(e)||e.removeAttribute(r),Bw.delete(e)),i||e.removeAttribute(n)}),Hw--,Hw||(zw=new WeakMap,zw=new WeakMap,Bw=new WeakMap,Vw={})}},Kw=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Rw(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Gw(r,i,n,`aria-hidden`)):function(){return null}},qw=function(){return qw=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},qw.apply(this,arguments)};function Jw(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Yw(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Xw=`right-scroll-bar-position`,Zw=`width-before-scroll-bar`,Qw=`with-scroll-bars-hidden`,$w=`--removed-body-scroll-bar-size`;function eT(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function tT(e,t){var n=(0,V.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var nT=typeof window<`u`?V.useLayoutEffect:V.useEffect,rT=new WeakMap;function iT(e,t){var n=tT(t||null,function(t){return e.forEach(function(e){return eT(e,t)})});return nT(function(){var t=rT.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||eT(e,null)}),i.forEach(function(e){r.has(e)||eT(e,a)})}rT.set(n,e)},[e]),n}function aT(e){return e}function oT(e,t){t===void 0&&(t=aT);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function sT(e){e===void 0&&(e={});var t=oT(null);return t.options=qw({async:!0,ssr:!1},e),t}var cT=function(e){var t=e.sideCar,n=Jw(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return V.createElement(r,qw({},n))};cT.isSideCarExport=!0;function lT(e,t){return e.useMedium(t),cT}var uT=sT(),dT=function(){},fT=V.forwardRef(function(e,t){var n=V.useRef(null),r=V.useState({onScrollCapture:dT,onWheelCapture:dT,onTouchMoveCapture:dT}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=Jw(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=iT([n,t]),C=qw(qw({},b),i);return V.createElement(V.Fragment,null,u&&V.createElement(x,{sideCar:uT,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?V.cloneElement(V.Children.only(s),qw(qw({},C),{ref:S})):V.createElement(v,qw({},C,{className:c,ref:S}),s))});fT.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},fT.classNames={fullWidth:Zw,zeroRight:Xw};var pT=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function mT(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=pT();return t&&e.setAttribute(`nonce`,t),e}function hT(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function gT(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var _T=function(){var e=0,t=null;return{add:function(n){e==0&&(t=mT())&&(hT(t,n),gT(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},vT=function(){var e=_T();return function(t,n){V.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},yT=function(){var e=vT();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},bT={left:0,top:0,right:0,gap:0},xT=function(e){return parseInt(e||``,10)||0},ST=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[xT(n),xT(r),xT(i)]},CT=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return bT;var t=ST(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])}},wT=yT(),TT=`data-scroll-locked`,ET=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
|
-
.${Qw} {
|
|
3
|
-
overflow: hidden ${r};
|
|
4
|
-
padding-right: ${s}px ${r};
|
|
5
|
-
}
|
|
6
|
-
body[${TT}] {
|
|
7
|
-
overflow: hidden ${r};
|
|
8
|
-
overscroll-behavior: contain;
|
|
9
|
-
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
10
|
-
padding-left: ${i}px;
|
|
11
|
-
padding-top: ${a}px;
|
|
12
|
-
padding-right: ${o}px;
|
|
13
|
-
margin-left:0;
|
|
14
|
-
margin-top:0;
|
|
15
|
-
margin-right: ${s}px ${r};
|
|
16
|
-
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.${Xw} {
|
|
20
|
-
right: ${s}px ${r};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.${Zw} {
|
|
24
|
-
margin-right: ${s}px ${r};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.${Xw} .${Xw} {
|
|
28
|
-
right: 0 ${r};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.${Zw} .${Zw} {
|
|
32
|
-
margin-right: 0 ${r};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body[${TT}] {
|
|
36
|
-
${$w}: ${s}px;
|
|
37
|
-
}
|
|
38
|
-
`},DT=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},OT=function(){V.useEffect(function(){return document.body.setAttribute(TT,(DT()+1).toString()),function(){var e=DT()-1;e<=0?document.body.removeAttribute(TT):document.body.setAttribute(TT,e.toString())}},[])},kT=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;OT();var a=V.useMemo(function(){return CT(i)},[i]);return V.createElement(wT,{styles:ET(a,!t,i,n?``:`!important`)})},AT=!1;if(typeof window<`u`)try{var jT=Object.defineProperty({},"passive",{get:function(){return AT=!0,!0}});window.addEventListener(`test`,jT,jT),window.removeEventListener(`test`,jT,jT)}catch{AT=!1}var MT=AT?{passive:!1}:!1,NT=function(e){return e.tagName===`TEXTAREA`},PT=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!NT(e)&&n[t]===`visible`)},FT=function(e){return PT(e,`overflowY`)},IT=function(e){return PT(e,`overflowX`)},LT=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),BT(e,r)){var i=VT(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},RT=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},zT=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},BT=function(e,t){return e===`v`?FT(t):IT(t)},VT=function(e,t){return e===`v`?RT(t):zT(t)},HT=function(e,t){return e===`h`&&t===`rtl`?-1:1},UT=function(e,t,n,r,i){var a=HT(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=VT(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&BT(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},WT=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},GT=function(e){return[e.deltaX,e.deltaY]},KT=function(e){return e&&`current`in e?e.current:e},qT=function(e,t){return e[0]===t[0]&&e[1]===t[1]},JT=function(e){return`
|
|
39
|
-
.block-interactivity-${e} {pointer-events: none;}
|
|
40
|
-
.allow-interactivity-${e} {pointer-events: all;}
|
|
41
|
-
`},YT=0,XT=[];function ZT(e){var t=V.useRef([]),n=V.useRef([0,0]),r=V.useRef(),i=V.useState(YT++)[0],a=V.useState(yT)[0],o=V.useRef(e);V.useEffect(function(){o.current=e},[e]),V.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Yw([e.lockRef.current],(e.shards||[]).map(KT),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=V.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=WT(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=LT(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=LT(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return UT(h,t,e,h===`h`?s:c,!0)},[]),c=V.useCallback(function(e){var n=e;if(XT.length&&XT[XT.length-1]===a){var r=`deltaY`in n?GT(n):WT(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&qT(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(KT).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=V.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:QT(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=V.useCallback(function(e){n.current=WT(e),r.current=void 0},[]),d=V.useCallback(function(t){l(t.type,GT(t),t.target,s(t,e.lockRef.current))},[]),f=V.useCallback(function(t){l(t.type,WT(t),t.target,s(t,e.lockRef.current))},[]);V.useEffect(function(){return XT.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,MT),document.addEventListener(`touchmove`,c,MT),document.addEventListener(`touchstart`,u,MT),function(){XT=XT.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,MT),document.removeEventListener(`touchmove`,c,MT),document.removeEventListener(`touchstart`,u,MT)}},[]);var p=e.removeScrollBar,m=e.inert;return V.createElement(V.Fragment,null,m?V.createElement(a,{styles:JT(i)}):null,p?V.createElement(kT,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function QT(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var $T=lT(uT,ZT),eE=V.forwardRef(function(e,t){return V.createElement(fT,qw({},e,{ref:t,sideCar:$T}))});eE.classNames=fT.classNames;var tE=Object.defineProperty,nE=(e,t)=>tE(e,`name`,{value:t,configurable:!0}),rE=[`Enter`,` `],iE=[`ArrowDown`,`PageUp`,`Home`],aE=[`ArrowUp`,`PageDown`,`End`],oE=[...iE,...aE];[...rE],[...rE];var sE=`Menu`,[cE,lE,uE]=rb(sE),[dE,fE]=hy(sE,[uE,LC,ww]),pE=LC(),mE=ww(),[hE,gE]=dE(sE),[_E,vE]=dE(sE),yE=nE(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=pE(t),[c,l]=V.useState(null),u=V.useRef(!1),d=Cb(a),f=yb(i);return V.useEffect(()=>{let e=nE(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=nE(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),V.useEffect(()=>{if(!n)return;let e=nE(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,H.jsx)(BC,{...s,children:(0,H.jsx)(hE,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,H.jsx)(_E,{scope:t,onClose:V.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),bE=V.forwardRef(nE(function(e,t){let{__scopeMenu:n,...r}=e,i=pE(n);return(0,H.jsx)(HC,{...i,...r,ref:t})},`MenuAnchor`)),xE=`MenuPortal`,[SE,CE]=dE(xE,{forceMount:void 0}),wE=nE(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=gE(xE,t);return(0,H.jsx)(SE,{scope:t,forceMount:n,children:(0,H.jsx)(tw,{present:n||a.open,children:(0,H.jsx)(ZC,{asChild:!0,container:i,children:r})})})},`MenuPortal`),TE=`MenuContent`,[EE,DE]=dE(TE),OE=V.forwardRef(nE(function(e,t){let n=CE(TE,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=gE(TE,e.__scopeMenu),o=vE(TE,e.__scopeMenu);return(0,H.jsx)(cE.Provider,{scope:e.__scopeMenu,children:(0,H.jsx)(tw,{present:r||a.open,children:(0,H.jsx)(cE.Slot,{scope:e.__scopeMenu,children:o.modal?(0,H.jsx)(kE,{...i,ref:t}):(0,H.jsx)(AE,{...i,ref:t})})})})},`MenuContent`)),kE=V.forwardRef(nE(function(e,t){let n=gE(TE,e.__scopeMenu),r=V.useRef(null),i=dy(t,r);return V.useEffect(()=>{let e=r.current;if(e)return Kw(e)},[]),(0,H.jsx)(ME,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Y(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),AE=V.forwardRef(nE(function(e,t){let n=gE(TE,e.__scopeMenu);return(0,H.jsx)(ME,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),jE=Iy(`MenuContent.ScrollLock`),ME=V.forwardRef(nE(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=gE(TE,n),_=vE(TE,n),v=pE(n),y=mE(n),b=lE(n),[x,S]=V.useState(null),C=V.useRef(null),[w,T]=V.useState(null);ex(w);let{nodes:E,registry:D}=$b(),O=!!(i||m),k=dy(t,C,g.onContentChange,T),A=V.useRef(0),j=V.useRef(``),M=V.useRef(0),N=V.useRef(null),ee=V.useRef(`right`),P=V.useRef(0),F=V.useMemo(()=>m?[C,...E.map(e=>({current:e}))]:[],[C,E,m]),te=m?eE:V.Fragment,ne=m?{as:jE,allowPinchZoom:!0,shards:F}:void 0,re=nE(e=>{let t=j.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=YE(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;function s(e){j.current=e,window.clearTimeout(A.current),e!==``&&(A.current=window.setTimeout(()=>s(``),1e3))}nE(s,`updateSearch`),s(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);V.useEffect(()=>()=>window.clearTimeout(A.current),[]),Ub();let ie=V.useCallback(e=>ee.current===N.current?.side&&ZE(e,N.current?.area),[]);return(0,H.jsx)(EE,{scope:n,searchRef:j,onItemEnter:V.useCallback(e=>{ie(e)&&e.preventDefault()},[ie]),onItemLeave:V.useCallback(e=>{ie(e)||(C.current?.focus(),S(null))},[ie]),onTriggerLeave:V.useCallback(e=>{ie(e)&&e.preventDefault()},[ie]),pointerGraceTimerRef:M,onPointerGraceIntentChange:V.useCallback(e=>{N.current=e},[]),children:(0,H.jsx)(Qb,{registry:O?D:null,children:(0,H.jsx)(te,{...ne,children:(0,H.jsx)(Xb,{asChild:!0,trapped:i,branches:E,onMountAutoFocus:Y(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,H.jsx)(jb,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,H.jsx)(kw,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:Y(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,H.jsx)(KC,{role:`menu`,"aria-orientation":`vertical`,"data-state":WE(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:k,style:{outline:`none`,...h.style},onKeyDown:Y(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&re(e.key));let i=C.current;if(e.target!==i||!oE.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);aE.includes(e.key)&&a.reverse(),qE(a)}),onBlur:Y(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(A.current),j.current=``)}),onPointerMove:Y(e.onPointerMove,QE(e=>{let t=e.target,n=P.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>P.current?`right`:`left`;ee.current=t,P.current=e.clientX}}))})})})})})})})},`MenuContentImpl`)),NE=`MenuItem`,PE=`menu.itemSelect`,FE=V.forwardRef(nE(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=V.useRef(null),o=vE(NE,e.__scopeMenu),s=DE(NE,e.__scopeMenu),c=dy(t,a),l=V.useRef(!1),u=nE(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(PE,{bubbles:!0,cancelable:!0});e.addEventListener(PE,e=>r?.(e),{once:!0}),eb(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,H.jsx)(IE,{...i,ref:c,disabled:n,onClick:Y(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:Y(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:Y(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&rE.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),IE=V.forwardRef(nE(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=DE(NE,n),s=mE(n),c=V.useRef(null),l=dy(t,c),[u,d]=V.useState(!1),[f,p]=V.useState(``);return V.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,H.jsx)(cE.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,H.jsx)(Mw,{asChild:!0,...s,focusable:!r,children:(0,H.jsx)($y.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:Y(e.onPointerMove,QE(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Y(e.onPointerLeave,QE(e=>o.onItemLeave(e))),onFocus:Y(e.onFocus,()=>d(!0)),onBlur:Y(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[LE,RE]=dE(`MenuRadioGroup`,{value:void 0,onValueChange:nE(()=>{},`onValueChange`)}),[zE,BE]=dE(`MenuItemIndicator`,{checked:!1}),VE=V.forwardRef(nE(function(e,t){let{__scopeMenu:n,...r}=e;return(0,H.jsx)($y.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),[HE,UE]=dE(`MenuSub`);function WE(e){return e?`open`:`closed`}nE(WE,`getOpenState`);function GE(e){return e===`indeterminate`}nE(GE,`isIndeterminate`);function KE(e){return GE(e)?`indeterminate`:e?`checked`:`unchecked`}nE(KE,`getCheckedState`);function qE(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}nE(qE,`focusFirst`);function JE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}nE(JE,`wrapArray`);function YE(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=JE(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}nE(YE,`getNextMatch`);function XE(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}nE(XE,`isPointInPolygon`);function ZE(e,t){return t?XE({x:e.clientX,y:e.clientY},t):!1}nE(ZE,`isPointerInGraceArea`);function QE(e){return t=>t.pointerType===`mouse`?e(t):void 0}nE(QE,`whenMouse`);var $E=Object.defineProperty,eD=(e,t)=>$E(e,`name`,{value:t,configurable:!0}),tD=`DropdownMenu`,[nD,rD]=hy(tD,[fE]),iD=fE(),[aD,oD]=nD(tD),sD=eD(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=iD(t),l=V.useRef(null),[u,d]=Ey({prop:i,defaultProp:a??!1,onChange:o,caller:tD});return(0,H.jsx)(aD,{scope:t,triggerId:gx(),triggerRef:l,contentId:gx(),open:u,onOpenChange:d,onOpenToggle:V.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,H.jsx)(yE,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),cD=`DropdownMenuTrigger`,lD=V.forwardRef(eD(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=oD(cD,n),o=iD(n),s=dy(t,a.triggerRef);return(0,H.jsx)(bE,{asChild:!0,...o,children:(0,H.jsx)($y.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:Y(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:Y(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),uD=eD(e=>{let{__scopeDropdownMenu:t,...n}=e,r=iD(t);return(0,H.jsx)(wE,{...r,...n})},`DropdownMenuPortal`),dD=`DropdownMenuContent`,fD=V.forwardRef(eD(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=oD(dD,n),a=iD(n),o=V.useRef(!1);return(0,H.jsx)(OE,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:Y(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:Y(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),pD=V.forwardRef(eD(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=iD(n);return(0,H.jsx)(FE,{...i,...r,ref:t})},`DropdownMenuItem`)),mD=V.forwardRef(eD(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=iD(n);return(0,H.jsx)(VE,{...i,...r,ref:t})},`DropdownMenuSeparator`)),hD=Object.defineProperty,gD=(e,t)=>hD(e,`name`,{value:t,configurable:!0}),_D={Automatic:`automatic`,Manual:`manual`},vD=`Tabs`,[yD,bD]=hy(vD,[ww]),xD=ww(),[SD,CD]=yD(vD),wD=V.forwardRef(gD(function(e,t){let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=_D.Automatic,...l}=e,u=yb(s),[d,f]=Ey({prop:r,onChange:i,defaultProp:a??``,caller:vD});return(0,H.jsx)(SD,{scope:n,baseId:gx(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,H.jsx)($y.div,{dir:u,"data-orientation":o,...l,ref:t})})},`Tabs`)),TD=`TabsList`,ED=V.forwardRef(gD(function(e,t){let{__scopeTabs:n,loop:r=!0,...i}=e,a=CD(TD,n),o=xD(n);return(0,H.jsx)(kw,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,H.jsx)($y.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})},`TabsList`)),DD=`TabsTrigger`,OD=V.forwardRef(gD(function(e,t){let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=CD(DD,n),s=xD(n),c=jD(o.baseId,r),l=MD(o.baseId,r),u=r===o.value;return(0,H.jsx)(Mw,{asChild:!0,...s,focusable:!i,active:u,children:(0,H.jsx)($y.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:Y(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?(e.currentTarget.focus(),o.onValueChange(r)):e.preventDefault()}),onKeyDown:Y(e.onKeyDown,e=>{i||e.target!==e.currentTarget||[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:Y(e.onFocus,()=>{let e=o.activationMode!==_D.Manual;!u&&!i&&e&&o.onValueChange(r)})})})},`TabsTrigger`)),kD=`TabsContent`,AD=V.forwardRef(gD(function(e,t){let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=CD(kD,n),c=jD(s.baseId,r),l=MD(s.baseId,r),u=r===s.value,d=V.useRef(u);return V.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,H.jsx)(tw,{present:i||u,children:({present:n})=>(0,H.jsx)($y.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})},`TabsContent`));function jD(e,t){return`${e}-trigger-${t}`}gD(jD,`makeTriggerId`);function MD(e,t){return`${e}-content-${t}`}gD(MD,`makeContentId`);var ND=Object.defineProperty,PD=(e,t)=>ND(e,`name`,{value:t,configurable:!0}),FD=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),ID=V.forwardRef(PD(function(e,t){return(0,H.jsx)($y.span,{...e,ref:t,style:{...FD,...e.style}})},`VisuallyHidden`)),LD=Object.defineProperty,RD=(e,t)=>LD(e,`name`,{value:t,configurable:!0}),[zD,BD]=hy(`Tooltip`,[LC]),VD=LC(),HD=`TooltipProvider`,UD=700,WD=`tooltip.open`,[GD,KD]=zD(HD),qD=RD(e=>{let{__scopeTooltip:t,delayDuration:n=UD,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=V.useRef(!0),s=V.useRef(!1),c=V.useRef(0);return V.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,H.jsx)(GD,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:V.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:V.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:V.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),JD=`Tooltip`,[YD,XD]=zD(JD),ZD=RD(e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=KD(JD,e.__scopeTooltip),l=VD(t),[u,d]=V.useState(null),[f,p]=V.useState(void 0),m=gx(),h=V.useRef(0),g=o??c.disableHoverableContent,_=s??c.delayDuration,v=V.useRef(!1),[y,b]=Ey({prop:r,defaultProp:i??!1,onChange:RD(e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(WD))):c.onClose(),a?.(e)},`onChange`),caller:JD}),x=V.useMemo(()=>y?v.current?`delayed-open`:`instant-open`:`closed`,[y]),S=V.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,b(!0)},[b]),C=V.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b(!1)},[b]),w=V.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,b(!0),h.current=0},_)},[_,b]);V.useEffect(()=>()=>{h.current&&=(window.clearTimeout(h.current),0)},[]);let T=f??m;return(0,H.jsx)(BC,{...l,children:(0,H.jsx)(YD,{scope:t,contentId:T,setContentId:p,open:y,stateAttribute:x,trigger:u,onTriggerChange:d,onTriggerEnter:V.useCallback(()=>{c.isOpenDelayedRef.current?w():S()},[c.isOpenDelayedRef,w,S]),onTriggerLeave:V.useCallback(()=>{g?C():(window.clearTimeout(h.current),h.current=0)},[C,g]),onOpen:S,onClose:C,disableHoverableContent:g,children:n})})},`Tooltip`),QD=`TooltipTrigger`,$D=V.forwardRef(RD(function(e,t){let{__scopeTooltip:n,"aria-describedby":r,...i}=e,a=XD(QD,n),o=KD(QD,n),s=VD(n),c=dy(t,V.useRef(null),a.onTriggerChange),l=V.useRef(!1),u=V.useRef(!1),d=V.useCallback(()=>l.current=!1,[]);return V.useEffect(()=>()=>document.removeEventListener(`pointerup`,d),[d]),(0,H.jsx)(HC,{asChild:!0,...s,children:(0,H.jsx)($y.button,{"aria-describedby":a.open?hO(r,a.contentId):r,"data-state":a.stateAttribute,...i,ref:c,onPointerMove:Y(e.onPointerMove,e=>{e.pointerType!==`touch`&&!u.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),u.current=!0)}),onPointerLeave:Y(e.onPointerLeave,()=>{a.onTriggerLeave(),u.current=!1}),onPointerDown:Y(e.onPointerDown,()=>{a.open&&a.onClose(),l.current=!0,document.addEventListener(`pointerup`,d,{once:!0})}),onFocus:Y(e.onFocus,()=>{l.current||a.onOpen()}),onBlur:Y(e.onBlur,a.onClose),onClick:Y(e.onClick,a.onClose)})})},`TooltipTrigger`)),eO=`TooltipPortal`,[tO,nO]=zD(eO,{forceMount:void 0}),rO=RD(e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=XD(eO,t);return(0,H.jsx)(tO,{scope:t,forceMount:n,children:(0,H.jsx)(tw,{present:n||a.open,children:(0,H.jsx)(ZC,{asChild:!0,container:i,children:r})})})},`TooltipPortal`),iO=`TooltipContent`,aO=V.forwardRef(RD(function(e,t){let n=nO(iO,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=XD(iO,e.__scopeTooltip);return(0,H.jsx)(tw,{present:r||o.open,children:o.disableHoverableContent?(0,H.jsx)(cO,{side:i,...a,ref:t}):(0,H.jsx)(oO,{side:i,...a,ref:t})})},`TooltipContent`)),oO=V.forwardRef(RD(function(e,t){let n=XD(iO,e.__scopeTooltip),r=KD(iO,e.__scopeTooltip),i=V.useRef(null),a=dy(t,i),[o,s]=V.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=V.useCallback(()=>{s(null),d(!1)},[d]),p=V.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=uO(r,lO(r,n.getBoundingClientRect())),a=dO(t.getBoundingClientRect()),o=pO([...i,...a]);s(o),d(!0)},[d]);return V.useEffect(()=>()=>f(),[f]),V.useEffect(()=>{if(c&&u){let e=RD(e=>p(e,u),`handleTriggerLeave`),t=RD(e=>p(e,c),`handleContentLeave`);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),V.useEffect(()=>{if(o){let e=RD(e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!fO(n,o);r?f():i&&(f(),l())},`handleTrackPointerGrace`);return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,H.jsx)(cO,{...e,ref:a})},`TooltipContentHoverable`)),sO=Ry(`TooltipContent`),cO=V.forwardRef(RD(function(e,t){let{__scopeTooltip:n,children:r,"aria-label":i,id:a,onEscapeKeyDown:o,onPointerDownOutside:s,...c}=e,l=XD(iO,n),u=VD(n),{onClose:d}=l,[f,p]=V.useState(null),m=dy(t,p);ex(f),V.useEffect(()=>(document.addEventListener(WD,d),()=>document.removeEventListener(WD,d)),[d]),V.useEffect(()=>{if(l.trigger){let e=RD(e=>{e.target instanceof Node&&e.target.contains(l.trigger)&&d()},`handleScroll`);return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[l.trigger,d]);let{setContentId:h}=l;return _y(()=>(h(a),()=>{h(void 0)}),[a,h]),(0,H.jsx)(jb,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:(0,H.jsxs)(KC,{"data-state":l.stateAttribute,role:i?void 0:`tooltip`,id:i?void 0:l.contentId,...u,...c,ref:m,style:{...c.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,H.jsx)(sO,{children:r}),i?(0,H.jsx)(ID,{id:l.contentId,role:`tooltip`,children:i}):null]})})},`TooltipContentImpl`));function lO(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}RD(lO,`getExitSideFromRect`);function uO(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}RD(uO,`getPaddedExitPoints`);function dO(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}RD(dO,`getPointsFromRect`);function fO(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}RD(fO,`isPointInPolygon`);function pO(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:+(e.y>t.y)),mO(t)}RD(pO,`getHull`);function mO(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}RD(mO,`getHullPresorted`);function hO(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}RD(hO,`concatAriaDescribedby`);function gO({content:e,children:t,side:n=`top`}){return(0,H.jsxs)(ZD,{delayDuration:250,children:[(0,H.jsx)($D,{asChild:!0,children:t}),(0,H.jsx)(rO,{children:(0,H.jsx)(aO,{side:n,sideOffset:6,className:`z-50 rounded-lg bg-fg px-2.5 py-1.5 text-[12px] font-medium text-bg shadow-pop data-[state=delayed-open]:animate-[pop-in_140ms_cubic-bezier(0.16,1,0.3,1)]`,children:e})})]})}var _O=qD;function vO({value:e,onChange:t,options:n,size:r=`md`,className:i}){let a=(0,V.useId)();return(0,H.jsx)(`fieldset`,{className:B(`m-0 inline-flex min-w-0 items-center rounded-[10px] border border-border bg-surface-2 p-0.5`,r===`sm`?`h-7`:`h-9`,i),children:n.map(n=>{let i=n.value===e;return(0,H.jsxs)(`button`,{type:`button`,"aria-pressed":i,onClick:()=>t(n.value),className:B(`relative h-full cursor-pointer rounded-lg px-3 font-medium transition-colors duration-150`,r===`sm`?`text-[12px]`:`text-[13px]`,i?`text-fg`:`text-fg-3 hover:text-fg-2`),children:[i&&(0,H.jsx)(K.span,{layoutId:`segmented-${a}`,transition:Sv,className:`absolute inset-0 rounded-lg border border-border bg-surface shadow-card`}),(0,H.jsx)(`span`,{className:`relative`,children:n.label})]},n.value)})})}function yO({value:e,onChange:t,tabs:n,className:r}){let i=(0,V.useId)();return(0,H.jsx)(`div`,{role:`tablist`,className:B(`flex gap-5 border-b border-border`,r),children:n.map(n=>{let r=n.value===e;return(0,H.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":r,onClick:()=>t(n.value),className:B(`relative -mb-px flex h-10 shrink-0 cursor-pointer items-center gap-1.5 whitespace-nowrap text-[13.5px] font-medium transition-colors`,r?`text-fg`:`text-fg-3 hover:text-fg-2`),children:[n.label,r&&(0,H.jsx)(K.span,{layoutId:`page-tab-${i}`,transition:Sv,className:`absolute inset-x-0 bottom-0 h-[2px] rounded-full bg-accent`})]},n.value)})})}function bO({value:e,onChange:t,tabs:n,children:r,className:i}){let a=(0,V.useId)();return(0,H.jsxs)(wD,{value:e,onValueChange:e=>t(e),className:i,children:[(0,H.jsx)(ED,{className:`flex gap-1 border-b border-border px-6`,children:n.map(t=>(0,H.jsxs)(OD,{value:t.value,className:B(`relative -mb-px flex h-10 cursor-pointer items-center gap-1.5 px-2 text-[13px] font-medium transition-colors outline-none`,t.value===e?`text-fg`:`text-fg-3 hover:text-fg-2`),children:[t.label,t.count!==void 0&&(0,H.jsx)(`span`,{className:`rounded-full bg-surface-2 px-1.5 text-[11px] text-fg-3 tabular`,children:t.count}),t.value===e&&(0,H.jsx)(K.span,{layoutId:`tab-${a}`,transition:Sv,className:`absolute inset-x-1 bottom-0 h-[2px] rounded-full bg-accent`})]},t.value))}),r]})}var xO=AD;function SO({trigger:e,children:t,align:n=`end`}){return(0,H.jsxs)(sD,{children:[(0,H.jsx)(lD,{asChild:!0,children:e}),(0,H.jsx)(uD,{children:(0,H.jsx)(fD,{align:n,sideOffset:6,className:`z-50 min-w-44 rounded-xl border border-border bg-surface p-1 shadow-pop data-[state=open]:animate-[pop-in_150ms_cubic-bezier(0.16,1,0.3,1)]`,children:t})})]})}function CO({icon:e,children:t,onSelect:n,danger:r=!1,disabled:i=!1}){return(0,H.jsxs)(pD,{disabled:i,onSelect:n,className:B(`flex h-8 cursor-pointer items-center gap-2 rounded-lg px-2.5 text-[13px] outline-none select-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 [&>svg]:size-3.5`,r?`text-danger data-[highlighted]:bg-danger-soft`:`text-fg-2 data-[highlighted]:bg-surface-2 data-[highlighted]:text-fg`),children:[e,t]})}var wO=()=>(0,H.jsx)(mD,{className:`my-1 h-px bg-border`});function TO({value:e,format:t,className:n}){let r=P_(0),i=L_(r,e=>t?t(e):Math.round(e).toLocaleString(`zh-CN`));return(0,V.useEffect)(()=>{let t=bv(r,e,{...Cv,stiffness:120,damping:24});return()=>t.stop()},[r,e]),(0,H.jsx)(K.span,{className:B(`tabular`,n),children:i})}function EO({children:e}){return(0,H.jsx)(Dg,{reducedMotion:`user`,children:(0,H.jsx)(_O,{children:e})})}var DO={primary:`bg-accent text-accent-fg shadow-[0_1px_2px_rgb(0_0_0/0.12),inset_0_1px_0_rgb(255_255_255/0.16)] hover:bg-accent-hover`,secondary:`bg-surface text-fg border border-border shadow-card hover:bg-surface-2 hover:border-border-strong`,ghost:`text-fg-2 hover:text-fg hover:bg-surface-2`,soft:`bg-accent-soft text-accent-soft-fg hover:brightness-[0.97] dark:hover:brightness-125`,danger:`bg-danger text-white shadow-[0_1px_2px_rgb(0_0_0/0.12)] hover:brightness-105`,"danger-ghost":`text-danger hover:bg-danger-soft`},OO={sm:`h-7 gap-1.5 rounded-lg px-2.5 text-[12.5px]/[18px]`,md:`h-9 gap-2 rounded-[10px] px-3.5 text-[13.5px]`,lg:`h-10 gap-2 rounded-xl px-4 text-sm`,icon:`size-8 rounded-lg`,"icon-sm":`size-7 rounded-md`},X=(0,V.forwardRef)(function({variant:e=`secondary`,size:t=`md`,loading:n=!1,disabled:r,className:i,children:a,...o},s){return(0,H.jsxs)(K.button,{ref:s,whileTap:r||n?void 0:{scale:.97},transition:Cv,disabled:r||n,className:B(`relative inline-flex shrink-0 cursor-pointer select-none items-center justify-center font-medium whitespace-nowrap`,`transition-[background-color,border-color,color,filter,box-shadow] duration-150`,`disabled:cursor-not-allowed disabled:opacity-50`,DO[e],OO[t],i),...o,children:[(0,H.jsx)(`span`,{className:B(`inline-flex items-center gap-[inherit]`,n&&`opacity-0`),children:a}),n&&(0,H.jsx)(`span`,{className:`absolute inset-0 flex items-center justify-center`,children:(0,H.jsx)(Nv,{className:`size-4`})})]})}),kO=`w-full rounded-[10px] border border-border bg-surface text-[13.5px] text-fg placeholder:text-fg-3 shadow-[inset_0_1px_1px_rgb(0_0_0/0.02)] transition-[border-color,box-shadow] duration-150 outline-none hover:border-border-strong focus:border-accent focus:shadow-[0_0_0_3px_var(--ring)] disabled:cursor-not-allowed disabled:opacity-60 aria-[invalid=true]:border-danger aria-[invalid=true]:focus:shadow-[0_0_0_3px_var(--danger-soft)]`,AO=(0,V.forwardRef)(function({className:e,icon:t,...n},r){return t?(0,H.jsxs)(`div`,{className:B(`relative`,e),children:[(0,H.jsx)(`span`,{className:`pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-fg-3 [&>svg]:size-4`,children:t}),(0,H.jsx)(`input`,{ref:r,className:B(kO,`h-9 pr-3 pl-9`),...n})]}):(0,H.jsx)(`input`,{ref:r,className:B(kO,`h-9 px-3`,e),...n})}),jO=(0,V.forwardRef)(function({className:e,...t},n){return(0,H.jsx)(`textarea`,{ref:n,className:B(kO,`min-h-20 resize-y px-3 py-2 leading-relaxed`,e),...t})});function MO({label:e,hint:t,error:n,required:r,htmlFor:i,children:a,className:o}){return(0,H.jsxs)(`div`,{className:B(`space-y-1.5`,o),children:[(0,H.jsxs)(`label`,{htmlFor:i,className:`flex items-center gap-1 text-[12.5px] font-medium text-fg-2`,children:[e,r&&(0,H.jsx)(`span`,{className:`text-danger`,children:`*`})]}),a,n?(0,H.jsx)(`p`,{className:`text-[12px] text-danger`,children:n}):t&&(0,H.jsx)(`p`,{className:`text-[12px] leading-relaxed text-fg-3`,children:t})]})}var NO=Object.defineProperty,PO=(e,t)=>NO(e,`name`,{value:t,configurable:!0});function FO(e,[t,n]){return Math.min(n,Math.max(t,e))}PO(FO,`clamp`);var IO=Object.defineProperty,LO=(e,t)=>IO(e,`name`,{value:t,configurable:!0}),RO={ItemAligned:`item-aligned`,Popper:`popper`},zO={LTR:`ltr`,RTL:`rtl`},BO=[` `,`Enter`,`ArrowUp`,`ArrowDown`],VO=[` `,`Enter`],HO=`Select`,[UO,WO,GO]=rb(HO),[KO,qO]=hy(HO,[GO,LC]),JO=LC(),[YO,XO]=KO(HO),[ZO,QO]=KO(HO);function $O(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=JO(t),[_,v]=V.useState(null),[y,b]=V.useState(null),[x,S]=V.useState(!1),C=yb(l),[w,T]=Ey({prop:r,defaultProp:i??!1,onChange:a,caller:HO}),[E,D]=Ey({prop:o,defaultProp:s,onChange:c,caller:HO}),O=V.useRef(null),k=V.useRef(!1),[A,j]=V.useState(null),M=LO(e=>{j({value:e,hasConsumerStoppedPropagation:k.current}),D(e)},`handleUserSelect`),N=V.useRef(E);V.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=LO(()=>D(N.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,D]);let ee=!_||!!m||!!_.closest(`form`),[P,F]=V.useState(new Set),te=gx(),ne=Array.from(P).map(e=>e.props.value).join(`;`),re=V.useCallback(e=>{F(t=>new Set(t).add(e))},[]),ie=V.useCallback(e=>{F(t=>{let n=new Set(t);return n.delete(e),n})},[]),ae={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:te,value:E,onValueChange:D,hasConsumerStoppedPropagationRef:k,userSelection:A,onUserSelect:M,open:w,onOpenChange:T,dir:C,triggerPointerDownPosRef:O,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:P,nativeSelectKey:ne,isFormControl:ee};return(0,H.jsx)(BC,{...g,children:(0,H.jsx)(YO,{scope:t,...ae,children:(0,H.jsx)(UO.Provider,{scope:t,children:(0,H.jsx)(ZO,{scope:t,onNativeOptionAdd:re,onNativeOptionRemove:ie,children:Fk(h)?h(ae):n})})})})}LO($O,`SelectProvider`);var ek=LO(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,H.jsx)($O,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,H.jsxs)(H.Fragment,{children:[n,e?(0,H.jsx)(Pk,{__scopeSelect:t}):null]})})},`Select`),tk=`SelectTrigger`,nk=V.forwardRef(LO(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=JO(n),o=XO(tk,n),s=o.disabled||r,c=dy(t,o.onTriggerChange),l=WO(n),u=V.useRef(`touch`),[d,f,p]=Lk(e=>{let t=l().filter(e=>!e.disabled),n=Rk(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onUserSelect(n.value)}),m=LO(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,H.jsx)(HC,{asChild:!0,...a,children:(0,H.jsx)($y.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Ik(o.value)?``:void 0,...i,ref:c,onClick:Y(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:Y(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:Y(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&(o.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),f(e.key)),t&&e.key===` `||BO.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),rk=`SelectValue`,ik=V.forwardRef(LO(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=XO(rk,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=dy(t,c.onValueNodeChange);_y(()=>{l(u)},[l,u]);let f=Ik(c.value);return(0,H.jsx)($y.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,H.jsx)(V.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),ak=V.forwardRef(LO(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,H.jsx)($y.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[ok,sk]=KO(`SelectPortal`,{forceMount:void 0}),ck=LO(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,H.jsx)(ok,{scope:e.__scopeSelect,forceMount:n,children:(0,H.jsx)(ZC,{asChild:!0,...r})})},`SelectPortal`),lk=`SelectContent`,uk=V.forwardRef(LO(function(e,t){let n=sk(lk,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=XO(lk,e.__scopeSelect),[o,s]=V.useState();return _y(()=>{s(new DocumentFragment)},[]),(0,H.jsx)(tw,{present:r||a.open,children:({present:e})=>e?(0,H.jsx)(gk,{...i,ref:t}):(0,H.jsx)(dk,{...i,fragment:o})})},`SelectContent`)),dk=V.forwardRef(LO(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?Ny.createPortal((0,H.jsx)(pk,{scope:n,children:(0,H.jsx)(UO.Slot,{scope:n,children:(0,H.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),fk=10,[pk,mk]=KO(lk),hk=Iy(`SelectContent.RemoveScroll`),gk=V.forwardRef(LO(function(e,t){let{__scopeSelect:n}=e,{position:r=RO.ItemAligned,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=XO(lk,n),[y,b]=V.useState(null),[x,S]=V.useState(null),C=dy(t,b),[w,T]=V.useState(null),[E,D]=V.useState(null),O=WO(n),[k,A]=V.useState(!1),j=V.useRef(!1),M=V.useRef(!1),N=V.useRef(!1);V.useEffect(()=>{if(y)return Kw(y)},[y]),Ub();let ee=V.useCallback(e=>{let[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[O,x]),P=V.useCallback(()=>ee([w,y]),[ee,w,y]);V.useEffect(()=>{k&&P()},[k,P]);let{onOpenChange:F,triggerPointerDownPosRef:te}=v;V.useEffect(()=>{if(y){let e={x:0,y:0},t=LO(t=>{e={x:Math.abs(Math.round(t.pageX)-(te.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(te.current?.y??0))}},`handlePointerMove`),n=LO(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||F(!1),document.removeEventListener(`pointermove`,t),te.current=null},`handlePointerUp`);return te.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,F,te]),V.useEffect(()=>{let e=LO(()=>F(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[F]);let[ne,re]=Lk(e=>{let t=O().filter(e=>!e.disabled),n=Rk(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ie=V.useCallback((e,t,n)=>{let r=!M.current;r&&(M.current=!0);let i=!j.current&&!n;v.value!==void 0&&v.value===t||i?(T(e),i&&(j.current=!0)):r&&T(e)},[v.value]),ae=V.useCallback(()=>y?.focus(),[y]),oe=V.useCallback((e,t,n)=>{if(!e)return;let r=!N.current;r&&(N.current=!0);let i=!j.current&&!n;(v.value!==void 0&&v.value===t||i||r)&&D(e)},[v.value]),se=r===RO.Popper?vk:_k,ce=se===vk?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,H.jsx)(pk,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:ie,selectedItem:w,onItemLeave:ae,itemTextRefCallback:oe,focusSelectedItem:P,selectedItemText:E,position:r,isPositioned:k,searchRef:ne,children:(0,H.jsx)(eE,{as:hk,allowPinchZoom:!0,children:(0,H.jsx)(Xb,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:Y(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,H.jsx)(jb,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,H.jsx)(se,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...ce,onPlaced:()=>A(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:Y(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&re(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>ee(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),_k=V.forwardRef(LO(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=XO(lk,n),o=mk(lk,n),[s,c]=V.useState(null),[l,u]=V.useState(null),d=dy(t,u),f=WO(n),p=V.useRef(!1),m=V.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=V.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==zO.RTL){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-fk,d=FO(a,[fk,Math.max(fk,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-fk,d=FO(a,[fk,Math.max(fk,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-fk*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-fk,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${fk}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);_y(()=>y(),[y]);let[b,x]=V.useState();_y(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]);let S=V.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]);return(0,H.jsx)(yk,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:S,children:(0,H.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,H.jsx)($y.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),vk=V.forwardRef(LO(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=fk,...a}=e,o=JO(n);return(0,H.jsx)(KC,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[yk,bk]=KO(lk,{}),xk=`SelectViewport`,Sk=V.forwardRef(LO(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=mk(xk,n),o=bk(xk,n),s=dy(t,a.onViewportChange),c=V.useRef(0);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,H.jsx)(UO.Slot,{scope:n,children:(0,H.jsx)($y.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:Y(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-fk*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[Ck,wk]=KO(`SelectGroup`),Tk=`SelectItem`,[Ek,Dk]=KO(Tk),Ok=V.forwardRef(LO(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=XO(Tk,n),c=mk(Tk,n),l=s.value===r,[u,d]=V.useState(a??``),[f,p]=V.useState(!1),m=dy(t,Cb(e=>c.itemRefCallback?.(e,r,i))),h=gx(),g=V.useRef(`touch`);function _(e){s.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),s.onUserSelect(r),s.onOpenChange(!1)}return LO(_,`handleSelect`),(0,H.jsx)(Ek,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:V.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,H.jsx)(UO.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,H.jsx)($y.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:Y(o.onFocus,()=>p(!0)),onBlur:Y(o.onBlur,()=>p(!1)),onClick:Y(o.onClick,e=>{i||g.current!==`mouse`&&_(e)}),onPointerUp:Y(o.onPointerUp,e=>{i||g.current===`mouse`&&_(e)}),onPointerDown:Y(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:Y(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Y(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:Y(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(VO.includes(e.key)&&_(e),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),kk=`SelectItemText`,Ak=V.forwardRef(LO(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=XO(kk,n),s=mk(kk,n),c=Dk(kk,n),l=QO(kk,n),[u,d]=V.useState(null),f=Cb(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=dy(t,d,c.onItemTextChange,f),m=u?.textContent,h=V.useMemo(()=>(0,H.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return _y(()=>(g(h),()=>_(h)),[g,_,h]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)($y.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!Ik(o.value)?Ny.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),jk=`SelectItemIndicator`,Mk=V.forwardRef(LO(function(e,t){let{__scopeSelect:n,...r}=e;return Dk(jk,n).isSelected?(0,H.jsx)($y.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),Nk=`SelectBubbleInput`,Pk=V.forwardRef(LO(function({__scopeSelect:e,...t},n){let r=XO(Nk,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u,userSelection:d}=r,{nativeOptions:f,nativeSelectKey:p}=r,m=V.useRef(null),h=dy(n,m),g=i??``,_=V.useRef(g),v=V.useRef(d),y=V.useRef(!1),b=Array.from(f).some(e=>(e.props.value??``)===``);return V.useEffect(()=>{let e=m.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set,r=d!==null&&d!==v.current;v.current=d;let i=_.current!==g;_.current=g;let a=r&&i;if(r&&!i&&d.value!==g&&!d.hasConsumerStoppedPropagation&&n){y.current=!0;try{n.call(e,d.value),e.dispatchEvent(new Event(`change`,{bubbles:!0}))}finally{y.current=!1,n.call(e,g)}return}let o=a&&!d.hasConsumerStoppedPropagation;if(i&&n){let t=new Event(`change`,{bubbles:o});n.call(e,g),e.dispatchEvent(t)}},[g,d]),(0,H.jsxs)($y.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>{y.current||a(e.target.value)},...t,style:{...FD,...t.style},ref:h,defaultValue:g,children:[Ik(i)&&!b?(0,H.jsx)(`option`,{value:``}):null,Array.from(f)]},p)},`SelectBubbleInput`));function Fk(e){return typeof e==`function`}LO(Fk,`isFunction`);function Ik(e){return e===``||e===void 0}LO(Ik,`shouldShowPlaceholder`);function Lk(e){let t=Cb(e),n=V.useRef(``),r=V.useRef(0),i=V.useCallback(e=>{let i=n.current+e;t(i);function a(e){n.current=e,window.clearTimeout(r.current),e!==``&&(r.current=window.setTimeout(()=>a(``),1e3))}LO(a,`updateSearch`),a(i)},[t]),a=V.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return V.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}LO(Lk,`useTypeaheadSearch`);function Rk(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=zk(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}LO(Rk,`findNextItem`);function zk(e,t){return e.map((n,r)=>e[(t+r)%e.length])}LO(zk,`wrapArray`);function Bk({value:e,onValueChange:t,options:n,placeholder:r,className:i,disabled:a,"aria-label":o}){return(0,H.jsxs)(ek,{disabled:a,value:e??``,onValueChange:e=>t(e),children:[(0,H.jsxs)(nk,{"aria-label":o,className:B(`inline-flex h-9 min-w-32 cursor-pointer items-center justify-between gap-2 rounded-[10px] border border-border bg-surface px-3 text-[13.5px] text-fg shadow-card outline-none transition-[border-color,box-shadow] hover:border-border-strong focus-visible:border-accent focus-visible:shadow-[0_0_0_3px_var(--ring)] data-[placeholder]:text-fg-3 disabled:cursor-not-allowed disabled:opacity-60`,i),children:[(0,H.jsx)(ik,{placeholder:r}),(0,H.jsx)(ak,{children:(0,H.jsx)(tn,{className:`size-3.5 text-fg-3`})})]}),(0,H.jsx)(ck,{children:(0,H.jsx)(uk,{position:`popper`,sideOffset:6,className:`z-50 max-h-72 min-w-[var(--radix-select-trigger-width)] overflow-hidden rounded-xl border border-border bg-surface p-1 shadow-pop data-[state=open]:animate-[pop-in_160ms_cubic-bezier(0.16,1,0.3,1)]`,children:(0,H.jsx)(Sk,{children:n.map(e=>(0,H.jsxs)(Ok,{value:e.value,className:`relative flex h-8 cursor-pointer items-center rounded-lg pr-8 pl-2.5 text-[13px] text-fg-2 outline-none select-none data-[highlighted]:bg-surface-2 data-[highlighted]:text-fg data-[state=checked]:text-fg`,children:[(0,H.jsx)(Ak,{children:e.label}),(0,H.jsx)(Mk,{className:`absolute right-2.5`,children:(0,H.jsx)($t,{className:`size-3.5 text-accent`,strokeWidth:2.5})})]},e.value))})})})]})}var Vk=Object.defineProperty,Hk=(e,t)=>Vk(e,`name`,{value:t,configurable:!0}),Uk=`Switch`,[Wk,Gk]=hy(Uk),[Kk,qk]=Wk(Uk);function Jk(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=Ey({prop:n,defaultProp:i??!1,onChange:c,caller:Uk}),[m,h]=V.useState(null),[g,_]=V.useState(null),[v,y]=V.useState(null),b={checked:f,setChecked:p,disabled:a,control:m,setControl:h,name:s,form:o,value:u,userClick:v,onUserClick:y,required:l,defaultChecked:i,isFormControl:!m||!!o||!!m.closest(`form`),bubbleInput:g,setBubbleInput:_};return(0,H.jsx)(Kk,{scope:t,...b,children:nA(d)?d(b):r})}Hk(Jk,`SwitchProvider`);var Yk=`SwitchTrigger`,Xk=V.forwardRef(Hk(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,form:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,onUserClick:f,isFormControl:p,bubbleInput:m}=qk(Yk,e),h=dy(r,u),g=V.useRef(c);return V.useEffect(()=>{let e=a?i?.ownerDocument.getElementById(a):i?.form;if(e instanceof HTMLFormElement){let t=Hk(()=>d(g.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[i,a,d]),(0,H.jsx)($y.button,{type:`button`,role:`switch`,"aria-checked":c,"aria-required":l,"data-state":rA(c),"data-disabled":s?``:void 0,disabled:s,value:o,...n,ref:h,onClick:Y(t,e=>{let t=e.isPropagationStopped();f({requestedChecked:!c,hasConsumerStoppedPropagation:t}),d(e=>!e),m&&p&&(t||e.stopPropagation())})})},`SwitchTrigger`)),Zk=V.forwardRef(Hk(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,H.jsx)(Jk,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Xk,{...d,ref:t,__scopeSwitch:n}),e&&(0,H.jsx)(tA,{__scopeSwitch:n})]})})},`Switch`)),Qk=`SwitchThumb`,$k=V.forwardRef(Hk(function(e,t){let{__scopeSwitch:n,...r}=e,i=qk(Qk,n);return(0,H.jsx)($y.span,{"data-state":rA(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),eA=`SwitchBubbleInput`,tA=V.forwardRef(Hk(function({__scopeSwitch:e,onClick:t,...n},r){let{control:i,userClick:a,checked:o,defaultChecked:s,required:c,disabled:l,name:u,value:d,form:f,bubbleInput:p,setBubbleInput:m}=qk(eA,e),h=dy(r,m),g=AC(i),_=V.useRef(!1),v=V.useRef(o),y=V.useRef(a),b=V.useRef(null);V.useEffect(()=>{let e=p;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set;if(!n)return;let r=v.current!==o;v.current=o;let i=a!==null&&a!==y.current;if(y.current=a,i)b.current=r?null:a,r&&n.call(e,o),e.dispatchEvent(new Event(`click`,{bubbles:!a.hasConsumerStoppedPropagation}));else if(r){let t=b.current;b.current=null;let r=t?.requestedChecked===o;_.current=!0,n.call(e,o),e.dispatchEvent(new Event(`click`,{bubbles:!(r&&t.hasConsumerStoppedPropagation)})),_.current=!1}},[p,o,a]);let x=V.useRef(o);return(0,H.jsx)($y.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:s??x.current,required:c,disabled:l,name:u,value:d,form:f,...n,tabIndex:-1,ref:h,onClick:Y(t,e=>{_.current&&e.stopPropagation()}),style:{...n.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function nA(e){return typeof e==`function`}Hk(nA,`isFunction`);function rA(e){return e?`checked`:`unchecked`}Hk(rA,`getState`);function iA({id:e,checked:t,onCheckedChange:n,disabled:r,className:i,"aria-label":a}){return(0,H.jsx)(Zk,{id:e,checked:t,onCheckedChange:n,disabled:r,"aria-label":a,className:B(`relative inline-flex h-[22px] w-[38px] shrink-0 cursor-pointer items-center rounded-full p-[2px] transition-colors duration-200`,`disabled:cursor-not-allowed disabled:opacity-50`,t?`bg-accent`:`bg-surface-3 shadow-[inset_0_0_0_1px_var(--border-strong)]`,i),children:(0,H.jsx)($k,{asChild:!0,children:(0,H.jsx)(K.span,{layout:!0,transition:Cv,className:B(`block size-[18px] rounded-full bg-white shadow-[0_1px_3px_rgb(0_0_0/0.25),0_0_0_0.5px_rgb(0_0_0/0.04)]`,t?`ml-auto`:`ml-0`)})})})}var aA=new Set([`string`,`number`,`integer`,`boolean`]),oA=new Set([`accessToken`,`token`,`password`,`apiToken`,`appSecret`]);function sA(e){return Array.isArray(e.type)?e.type.find(e=>e!==`null`):e.type===void 0&&e.anyOf?.every(e=>aA.has(sA(e)??``))?`scalar`:e.type}function cA(e){if(e.oneOf?.length&&e.oneOf.every(e=>e.const!==void 0))return e.oneOf.map(e=>({value:e.const,label:e.title??String(e.const)}))}function lA(e){let t=sA(e);if(e.enum||e.const!==void 0||cA(e)||t===`scalar`||aA.has(t??``))return!0;if(t===`array`){let t=e.items?sA(e.items):void 0;return t===`object`?lA(e.items):t===`string`||t===`number`||t===`integer`}return t===`object`&&Object.values(e.properties??{}).every(lA)}function uA(e){if(e.const!==void 0)return e.const;if(e.default!==void 0)return e.default;if(sA(e)===`object`)return Object.fromEntries(Object.entries(e.properties??{}).map(([e,t])=>[e,uA(t)]))}function dA(e,t,n){if(t.length===0)return n;let[r,...i]=t;if(Array.isArray(e)){let t=[...e];return t[Number(r)]=dA(t[Number(r)],i,n),t}let a=e&&typeof e==`object`?e:{};return{...a,[r]:dA(a[r],i,n)}}function fA(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e.replace(/\[(\d+)\]/g,`.$1`),t]))}function pA(e){let t=e.default;if(t!==void 0&&t!==``&&typeof t!=`object`)return`默认 ${String(t)}`}function mA(e,t){return t.reduce((e,t)=>e&&typeof e==`object`?e[t]:void 0,e)}function hA({schema:e,value:t,issues:n,saving:r,onSubmit:i,note:a=`保存后写回配置文件并重载插件`,submitLabel:o=`保存并重载`,submitWhenPristine:s=!1}){let c=(0,V.useMemo)(()=>fA(n),[n]),l=JSON.stringify(t??uA(e)),u=(0,V.useMemo)(()=>l===void 0?void 0:JSON.parse(l),[l]),d=(0,V.useMemo)(()=>lA(e),[e]),[f,p]=(0,V.useState)(u),[m,h]=(0,V.useState)(!d),[g,_]=(0,V.useState)(()=>JSON.stringify(u,null,2)),[v,y]=(0,V.useState)(null);(0,V.useEffect)(()=>{p(u),_(JSON.stringify(u,null,2))},[u]);let b=m?g!==JSON.stringify(u,null,2):JSON.stringify(f)!==JSON.stringify(u);return(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`div`,{className:`mb-4 flex items-center justify-between`,children:[(0,H.jsx)(`p`,{className:`text-[12.5px] text-fg-3`,children:a}),d&&(0,H.jsxs)(X,{variant:`ghost`,size:`sm`,onClick:()=>{if(!m)_(JSON.stringify(f,null,2));else try{p(JSON.parse(g)),y(null)}catch{y(`JSON 有误,无法切回表单`);return}h(!m)},children:[(0,H.jsx)(Gt,{className:`size-3.5`}),m?`表单`:`JSON`]})]}),(0,H.jsx)(bg,{mode:`wait`,initial:!1,children:m?(0,H.jsxs)(K.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:[(0,H.jsx)(jO,{value:g,onChange:e=>_(e.target.value),spellCheck:!1,className:`min-h-64 font-mono text-[12.5px]`,"aria-invalid":v!==null}),v&&(0,H.jsx)(`p`,{className:`mt-1.5 text-[12px] text-danger`,children:v}),Object.keys(c).length>0&&(0,H.jsx)(`ul`,{className:`mt-3 space-y-1 rounded-xl bg-danger-soft px-3 py-2.5 text-[12.5px] text-danger`,children:Object.entries(c).map(([e,t])=>(0,H.jsxs)(`li`,{children:[(0,H.jsx)(`span`,{className:`font-mono`,children:e||`(根)`}),`:`,t]},e))})]},`json`):(0,H.jsx)(K.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:`space-y-5`,children:(0,H.jsx)(gA,{schema:e,value:f,path:[],issues:c,onChange:(e,t)=>p(n=>dA(n,e,t))})},`form`)}),(0,H.jsx)(bg,{children:(b||s)&&(0,H.jsxs)(K.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},exit:{opacity:0,y:12},transition:q,className:`sticky bottom-0 mt-6 -mx-6 flex items-center justify-between gap-3 border-t border-border bg-surface/90 px-6 py-3 backdrop-blur`,children:[(0,H.jsx)(`span`,{className:`text-[12.5px] text-fg-3`,children:b?`有未保存的修改`:`填写完成后保存`}),(0,H.jsxs)(`div`,{className:`flex gap-2`,children:[(0,H.jsxs)(X,{variant:`ghost`,size:`sm`,onClick:()=>{p(u),_(JSON.stringify(u,null,2)),y(null)},children:[(0,H.jsx)(Jr,{className:`size-3.5`}),`还原`]}),(0,H.jsx)(X,{variant:`primary`,size:`sm`,loading:r,onClick:()=>{if(!m)return i(f);let e;try{e=JSON.parse(g)}catch{y(`不是合法的 JSON`);return}y(null),i(e)},children:o})]})]})})]})}function gA({schema:e,value:t,path:n,issues:r,onChange:i}){let a=Object.entries(e.properties??{});return a.length===0?(0,H.jsx)(`p`,{className:`text-[13px] text-fg-3`,children:`这个插件没有可配置项。`}):(0,H.jsx)(H.Fragment,{children:a.map(([a,o])=>{let s=[...n,a],c=`field-${s.join(`-`)}`,l=o.title??a,u=e.required?.includes(a)&&o.default===void 0,d=r[s.join(`.`)],f=mA(t,[a]),p=sA(o);if(o.const!==void 0)return null;if(p===`array`&&o.items&&sA(o.items)===`object`){let e=o.items;return(0,H.jsx)(MO,{label:l,hint:o.description,error:d,htmlFor:c,children:(0,H.jsx)(vA,{schema:e,value:Array.isArray(f)?f:[],path:s,issues:r,onChange:i})},a)}return p===`object`&&!o.enum?(0,H.jsxs)(`fieldset`,{className:`space-y-4 rounded-xl border border-border p-4`,children:[(0,H.jsx)(`legend`,{className:`px-1 text-[12.5px] font-medium text-fg-2`,children:l}),(0,H.jsx)(gA,{schema:o,value:f,path:s,issues:r,onChange:i})]},a):p===`boolean`?(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-4 rounded-xl border border-border px-4 py-3`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`label`,{htmlFor:c,className:`text-[13px] font-medium text-fg`,children:l}),o.description&&(0,H.jsx)(`p`,{className:`mt-0.5 text-[12px] text-fg-3`,children:o.description}),d&&(0,H.jsx)(`p`,{className:`mt-0.5 text-[12px] text-danger`,children:d})]}),(0,H.jsx)(iA,{"aria-label":l,checked:f===!0,onCheckedChange:e=>i(s,e)})]},a):(0,H.jsx)(MO,{label:l,hint:o.description,error:d,required:u,htmlFor:c,children:(0,H.jsx)(_A,{id:c,schema:o,value:f,secret:oA.has(a)||o.writeOnly===!0,invalid:!!d,onChange:e=>i(s,e)})},a)})})}function _A({id:e,schema:t,value:n,secret:r=!1,invalid:i,onChange:a}){let o=sA(t);if(o===`scalar`){let r=t.anyOf?.some(e=>sA(e)===`number`||sA(e)===`integer`);return(0,H.jsx)(AO,{id:e,value:n===void 0?``:String(n),placeholder:pA(t),"aria-invalid":i,onChange:e=>{let t=e.target.value.trim();a(t===``?void 0:r&&/^-?\d+(?:\.\d+)?$/.test(t)?Number(t):t)},className:`font-mono`})}let s=cA(t);if(s)return(0,H.jsx)(Bk,{"aria-label":e,className:`w-full`,value:n===void 0?void 0:String(n),onValueChange:e=>a(s.find(t=>String(t.value)===e)?.value),options:s.map(e=>({value:String(e.value),label:e.label}))});if(t.enum)return(0,H.jsx)(Bk,{"aria-label":e,className:`w-full`,value:n===void 0?void 0:String(n),onValueChange:e=>a(t.enum?.find(t=>String(t)===e)),options:t.enum.map(e=>({value:String(e),label:String(e)}))});if(o===`number`||o===`integer`)return(0,H.jsx)(AO,{id:e,type:`number`,inputMode:o===`integer`?`numeric`:`decimal`,step:o===`integer`?1:`any`,min:t.minimum,max:t.maximum,value:typeof n==`number`?n:``,placeholder:pA(t),"aria-invalid":i,onChange:e=>a(e.target.value===``?void 0:Number(e.target.value)),className:`tabular`});if(o===`array`)return(0,H.jsx)(yA,{id:e,itemType:t.items?sA(t.items):`string`,value:Array.isArray(n)?n:[],onChange:a});let c=typeof n==`string`?n:``,l=r&&!c.startsWith("${");return(0,H.jsx)(AO,{id:e,type:l?`password`:`text`,autoComplete:r?`off`:void 0,value:c,placeholder:pA(t),"aria-invalid":i,onFocus:r?e=>e.target.select():void 0,onChange:e=>a(e.target.value),className:B(r&&`font-mono`)})}function vA({schema:e,value:t,path:n,issues:r,onChange:i}){let[a,o]=(0,V.useState)(()=>t.map(()=>crypto.randomUUID())),s=t.map((e,t)=>a[t]??`item-${t}`);return(0,H.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,H.jsx)(bg,{initial:!1,children:t.map((a,c)=>(0,H.jsxs)(K.div,{layout:!0,initial:{opacity:0,y:-6},animate:{opacity:1,y:0},exit:{opacity:0,scale:.97},transition:q,className:`rounded-xl border border-border bg-surface-2/40 p-4`,children:[(0,H.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[(0,H.jsxs)(`span`,{className:`text-[12px] font-medium text-fg-3 tabular`,children:[`#`,c+1]}),(0,H.jsx)(X,{variant:`ghost`,size:`icon-sm`,"aria-label":`删除第 ${c+1} 项`,onClick:()=>{o(s.filter((e,t)=>t!==c)),i(n,t.filter((e,t)=>t!==c))},children:(0,H.jsx)(Ii,{className:`size-3.5`})})]}),(0,H.jsx)(`div`,{className:`space-y-4`,children:(0,H.jsx)(gA,{schema:e,value:a,path:[...n,String(c)],issues:r,onChange:i})})]},s[c]))}),(0,H.jsxs)(X,{variant:`secondary`,size:`sm`,onClick:()=>{o([...s,crypto.randomUUID()]),i(n,[...t,uA(e)])},children:[(0,H.jsx)(Rr,{className:`size-3.5`}),`添加一项`]})]})}function yA({id:e,itemType:t,value:n,onChange:r}){let[i,a]=(0,V.useState)(``),o=t===`number`||t===`integer`,s=()=>{let e=i.trim();if(!e)return;let t=o?Number(e):e;o&&Number.isNaN(t)||(n.includes(t)||r([...n,t]),a(``))};return(0,H.jsx)(`div`,{className:`rounded-[10px] border border-border bg-surface p-1.5 transition-colors focus-within:border-accent focus-within:shadow-[0_0_0_3px_var(--ring)]`,children:(0,H.jsxs)(`div`,{className:`flex flex-wrap gap-1.5`,children:[(0,H.jsx)(bg,{initial:!1,children:n.map((e,t)=>(0,H.jsxs)(K.span,{layout:!0,initial:{opacity:0,scale:.85},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.85},transition:q,className:`inline-flex h-7 items-center gap-1 rounded-lg bg-surface-2 pr-1 pl-2.5 font-mono text-[12.5px] text-fg`,children:[String(e),(0,H.jsx)(`button`,{type:`button`,"aria-label":`移除 ${String(e)}`,onClick:()=>r(n.filter((e,n)=>n!==t)),className:`flex size-5 cursor-pointer items-center justify-center rounded-md text-fg-3 hover:bg-surface-3 hover:text-fg`,children:(0,H.jsx)(Qi,{className:`size-3`})})]},String(e)))}),(0,H.jsxs)(`div`,{className:`flex min-w-32 flex-1 items-center`,children:[(0,H.jsx)(`input`,{id:e,value:i,inputMode:o?`numeric`:void 0,placeholder:n.length===0?`输入后按回车添加`:``,onChange:e=>a(e.target.value),onKeyDown:e=>{e.key===`Enter`?(e.preventDefault(),s()):e.key===`Backspace`&&!i&&n.length>0&&r(n.slice(0,-1))},className:`h-7 flex-1 bg-transparent px-1.5 text-[13px] outline-none placeholder:text-fg-3`}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`添加`,onClick:s,className:B(`flex size-7 cursor-pointer items-center justify-center rounded-md text-fg-3 hover:bg-surface-2 hover:text-fg`,!i&&`invisible`),children:(0,H.jsx)(Rr,{className:`size-3.5`})})]})]})})}var bA=`modulepreload`,xA=function(e){return`/`+e},SA={},CA=function(e){return e.pathname.endsWith(`.css`)},wA=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},TA=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=xA(t,n);let r=s(t),i=CA(r);return wA(SA,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:bA,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{let i=a=>{t.removeEventListener(`load`,i),t.removeEventListener(`error`,i),a.type===`error`?n(Error(`Unable to preload CSS for ${r}`)):e(a)};t.addEventListener(`load`,i),t.addEventListener(`error`,i)})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},EA=(0,V.lazy)(()=>TA(()=>import(`./markdown-MEN1AImu.js`).then(e=>({default:e.Markdown})),[])),DA={bold:`font-semibold`,italic:`italic`,underline:`underline`,strike:`line-through`,code:`rounded bg-surface-3/70 px-1 font-mono text-[0.92em]`,spoiler:`rounded bg-fg-3/60 text-transparent transition-colors hover:bg-transparent hover:text-inherit`};function OA({children:e,icon:t}){return(0,H.jsxs)(`span`,{className:`mx-0.5 inline-flex items-center gap-1 rounded-md bg-surface-3/60 px-1.5 text-[0.92em] text-fg-2`,children:[t,e]})}function kA(e){let t=String(e.data.url??e.data.file??``);if(/^https?:\/\//i.test(t))return t;if(t.startsWith(`base64://`)&&!/\[\d+ bytes\]$/.test(t))return`data:image/png;base64,${t.slice(9)}`}function AA({message:e,renderReply:t}){return(0,H.jsx)(H.Fragment,{children:e.map((e,n)=>{let r=`${e.type}-${n}`,i=e.data;switch(e.type){case`text`:{let e=Array.isArray(i.style)?i.style:[];return(0,H.jsx)(`span`,{className:B(e.map(e=>DA[e])),children:String(i.text)},r)}case`markdown`:return(0,H.jsx)(V.Suspense,{fallback:(0,H.jsx)(`span`,{className:`whitespace-pre-wrap`,children:String(i.content)}),children:(0,H.jsx)(EA,{className:`markdown-compact`,children:String(i.content)})},r);case`button`:{let e=String(i.label),t=String(i.value);return i.kind===`link`&&/^https?:\/\//i.test(t)?(0,H.jsx)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,className:`mx-0.5 my-0.5 inline-flex rounded-lg border border-border bg-surface px-2.5 py-0.5 text-[0.92em] font-medium text-accent hover:border-border-strong`,children:e},r):(0,H.jsx)(`span`,{title:t,className:`mx-0.5 my-0.5 inline-flex rounded-lg border border-border bg-surface px-2.5 py-0.5 text-[0.92em] font-medium text-fg`,children:e},r)}case`at`:return(0,H.jsxs)(`span`,{className:`mx-0.5 rounded bg-accent-soft px-1 text-accent-soft-fg`,children:[`@`,i.id===`all`?`全体成员`:String(i.id)]},r);case`image`:{let t=kA(e);return t?(0,H.jsx)(`img`,{src:t,alt:String(i.summary??`图片`),referrerPolicy:`no-referrer`,className:`my-1 block max-h-60 max-w-full rounded-lg`},r):(0,H.jsx)(OA,{children:`图片`},r)}case`face`:return(0,H.jsx)(OA,{children:`表情`},r);case`audio`:return(0,H.jsx)(OA,{children:`语音`},r);case`video`:return(0,H.jsx)(OA,{children:`视频`},r);case`file`:return(0,H.jsx)(OA,{icon:(0,H.jsx)(Ar,{className:`size-3`}),children:String(i.name??`文件`)},r);case`forward`:return(0,H.jsx)(OA,{icon:(0,H.jsx)(fi,{className:`size-3`}),children:`合并转发`},r);case`reply`:{let e=(Array.isArray(i.message)?i.message.map(e=>e.type===`text`?String(e.data.text):e.type===`file`?String(e.data.name??`[文件]`):{image:`[图片]`,audio:`[语音]`,video:`[视频]`}[e.type]??``).join(``):``)||(typeof i.title==`string`?i.title:``);return(0,H.jsx)(`span`,{className:`mb-1 block`,children:t?t(String(i.id)):(0,H.jsx)(OA,{icon:(0,H.jsx)(Kr,{className:`size-3 shrink-0`}),children:(0,H.jsx)(`span`,{className:`line-clamp-2 break-all`,children:e||`回复`})})},r)}default:return(0,H.jsx)(OA,{children:e.type},r)}})})}var jA={filter:`访问过滤`,observer:`监听器`,middleware:`中间件`,prompt:`对话等待`,command:`命令`,matcher:`匹配器`,suggest:`相似命令提示`},MA={handled:{label:`已处理`,tone:`success`},passed:{label:`放行`,tone:`neutral`},blocked:{label:`已拦截`,tone:`danger`},denied:{label:`权限不足`,tone:`warning`},cooldown:{label:`冷却中`,tone:`warning`},invalid:{label:`参数错误`,tone:`warning`},error:{label:`出错`,tone:`danger`},timeout:{label:`超时`,tone:`danger`}},NA={neutral:`bg-fg-3`,accent:`bg-accent`,success:`bg-success`,warning:`bg-warning`,danger:`bg-danger`,info:`bg-info`};function PA(e,t){let n=new Map;return e.map(e=>{let r=t(e),i=n.get(r)??0;return n.set(r,i+1),`${r}#${i}`})}function FA(e){return e<1?`<1 ms`:e<1e3?`${Math.round(e)} ms`:`${(e/1e3).toFixed(1)} s`}function IA({trace:e,logs:t}){let n=PA(e.steps,e=>`${e.stage}|${e.plugin??``}|${e.command??``}`),r=PA(t??[],e=>`${e.time}|${e.msg}`);return(0,H.jsxs)(`div`,{className:`space-y-3 text-[12.5px]`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 text-fg-3`,children:[(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 font-medium text-fg-2`,children:[(0,H.jsx)(Ji,{className:`size-3.5`}),`处理链`]}),(0,H.jsx)(`span`,{className:`font-mono`,children:e.name}),(0,H.jsxs)(`span`,{children:[`耗时 `,FA(e.duration)]}),e.sent.length>0&&(0,H.jsxs)(`span`,{children:[`发出 `,e.sent.length,` 条消息`]})]}),e.steps.length===0?(0,H.jsx)(`p`,{className:`text-fg-3`,children:`没有任何处理器处理这条消息。`}):(0,H.jsx)(`ol`,{className:`relative space-y-2 pl-4 before:absolute before:top-1.5 before:bottom-1.5 before:left-[3px] before:w-px before:bg-border`,children:e.steps.map((e,t)=>{let r=MA[e.outcome];return(0,H.jsxs)(`li`,{className:`relative`,children:[(0,H.jsx)(`span`,{className:B(`absolute top-[7px] -left-4 size-[7px] rounded-full ring-2 ring-surface`,NA[r.tone])}),(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,H.jsx)(`span`,{className:`text-fg-2`,children:jA[e.stage]}),e.plugin&&(0,H.jsx)(`span`,{className:`rounded bg-accent-soft px-1.5 text-[11.5px] leading-[18px] text-accent-soft-fg`,children:e.plugin}),e.command&&(0,H.jsxs)(`code`,{className:`font-mono text-fg`,children:[`/`,e.command]}),(0,H.jsx)(kv,{tone:r.tone,children:r.label}),(0,H.jsx)(`span`,{className:`ml-auto text-fg-3 tabular`,children:FA(e.duration)})]}),e.error&&(0,H.jsx)(`p`,{className:`mt-1 break-words text-danger`,children:e.error}),e.deliveryFailure&&(0,H.jsx)(`div`,{className:`mt-2`,children:(0,H.jsx)(Bv,{failure:e.deliveryFailure})})]},n[t])})}),t&&t.length>0&&(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`div`,{className:`mb-1.5 flex items-center gap-1.5 font-medium text-fg-2`,children:[(0,H.jsx)(ni,{className:`size-3.5`}),`日志`]}),(0,H.jsx)(`ul`,{className:`space-y-1 rounded-lg bg-surface-2/60 px-3 py-2 font-mono text-[11.5px]`,children:t.map((e,t)=>{let n=Gv(e.level);return(0,H.jsxs)(`li`,{className:`flex items-start gap-2`,children:[(0,H.jsx)(`span`,{className:`shrink-0 text-fg-3 tabular`,children:Uv(e.time)}),(0,H.jsx)(`span`,{className:B(`w-11 shrink-0 rounded px-1 text-center text-[10.5px] leading-[17px] uppercase`,Kv[n]),children:n}),e.plugin&&(0,H.jsx)(`span`,{className:`shrink-0 text-accent-soft-fg`,children:e.plugin}),(0,H.jsx)(`span`,{className:B(`min-w-0 break-words`,e.level>=50?`text-danger`:`text-fg`),children:e.msg})]},r[t])})})]})]})}var LA=Object.defineProperty,RA=(e,t)=>LA(e,`name`,{value:t,configurable:!0}),zA=`Dialog`,[BA,VA]=hy(zA),[HA,UA]=BA(zA),WA=RA(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=V.useRef(null),c=V.useRef(null),{nodes:l,registry:u}=$b(),[d,f]=Ey({prop:r,defaultProp:i??!1,onChange:a,caller:zA}),[p,m]=V.useState(0),[h,g]=V.useState(0);return(0,H.jsx)(HA,{scope:t,triggerRef:s,contentRef:c,contentId:gx(),titleId:gx(),descriptionId:gx(),titlePresent:p>0,descriptionPresent:h>0,setTitleCount:m,setDescriptionCount:g,open:d,onOpenChange:f,onOpenToggle:V.useCallback(()=>f(e=>!e),[f]),modal:o,branchNodes:l,branchRegistry:u,children:n})},`Dialog`),GA=`DialogPortal`,[KA,qA]=BA(GA,{forceMount:void 0}),JA=RA(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=UA(GA,t);return(0,H.jsx)(KA,{scope:t,forceMount:n,children:V.Children.map(r,e=>(0,H.jsx)(tw,{present:n||a.open,children:(0,H.jsx)(ZC,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),YA=`DialogOverlay`,XA=V.forwardRef(RA(function(e,t){let n=qA(YA,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=UA(YA,e.__scopeDialog);return a.modal?(0,H.jsx)(tw,{present:r||a.open,children:(0,H.jsx)(QA,{...i,ref:t})}):null},`DialogOverlay`)),ZA=Iy(`DialogOverlay.RemoveScroll`),QA=V.forwardRef(RA(function(e,t){let{__scopeDialog:n,...r}=e,i=UA(YA,n),a=dy(t,Mb());return(0,H.jsx)(eE,{as:ZA,allowPinchZoom:!0,shards:V.useMemo(()=>[i.contentRef,...i.branchNodes.map(e=>({current:e}))],[i.contentRef,i.branchNodes]),children:(0,H.jsx)($y.div,{"data-state":cj(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),$A=`DialogContent`,ej=V.forwardRef(RA(function(e,t){let n=qA($A,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=UA($A,e.__scopeDialog);return(0,H.jsx)(tw,{present:r||a.open,children:a.modal?(0,H.jsx)(tj,{...i,ref:t}):(0,H.jsx)(nj,{...i,ref:t})})},`DialogContent`)),tj=V.forwardRef(RA(function(e,t){let n=UA($A,e.__scopeDialog),r=V.useRef(null),i=dy(t,n.contentRef,r);return V.useEffect(()=>{let e=r.current;if(e)return Kw(e)},[]),(0,H.jsx)(rj,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Y(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Y(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:Y(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),nj=V.forwardRef(RA(function(e,t){let n=UA($A,e.__scopeDialog),r=V.useRef(!1),i=V.useRef(!1);return(0,H.jsx)(rj,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),rj=V.forwardRef(RA(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":o,children:s,...c}=e,l=UA($A,n);return Ub(),(0,H.jsx)(Qb,{registry:l.branchRegistry,children:(0,H.jsx)(Xb,{asChild:!0,loop:!0,trapped:r,branches:l.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,H.jsx)(jb,{role:`dialog`,id:l.contentId,"aria-labelledby":l.titlePresent?l.titleId:void 0,"aria-describedby":l.descriptionPresent?sj(o,l.descriptionId):o,"data-state":cj(l.open),...c,ref:t,deferPointerDownOutside:!0,onDismiss:()=>l.onOpenChange(!1),children:s})})})},`DialogContentImpl`)),ij=V.forwardRef(RA(function(e,t){let{__scopeDialog:n,...r}=e,i=UA(`DialogTitle`,n),{setTitleCount:a}=i;return _y(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,H.jsx)($y.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),aj=`DialogClose`,oj=V.forwardRef(RA(function(e,t){let{__scopeDialog:n,...r}=e,i=UA(aj,n);return(0,H.jsx)($y.button,{type:`button`,...r,ref:t,onClick:Y(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function sj(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}RA(sj,`concatAriaDescribedby`);function cj(e){return e?`open`:`closed`}RA(cj,`getState`);function lj(){return(0,H.jsx)(XA,{asChild:!0,forceMount:!0,children:(0,H.jsx)(K.div,{className:`fixed inset-0 z-40 bg-overlay backdrop-blur-[3px]`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}})})}function uj({open:e,onOpenChange:t,title:n,description:r,children:i,footer:a,className:o}){return(0,H.jsx)(WA,{open:e,onOpenChange:t,children:(0,H.jsx)(bg,{children:e&&(0,H.jsxs)(JA,{forceMount:!0,children:[(0,H.jsx)(lj,{}),(0,H.jsx)(`div`,{className:`pointer-events-none fixed inset-0 z-50 flex items-center justify-center p-4`,children:(0,H.jsx)(ej,{asChild:!0,forceMount:!0,"aria-describedby":void 0,children:(0,H.jsxs)(K.div,{initial:{opacity:0,scale:.96,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.97,y:6},transition:Sv,className:B(`pointer-events-auto w-full max-w-md rounded-2xl border border-border bg-surface shadow-pop outline-none`,o),children:[(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-4 px-5 pt-5`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(ij,{className:`text-[15px] font-semibold tracking-[-0.01em] text-fg`,children:n}),r&&(0,H.jsx)(`p`,{className:`mt-1 text-[13px] leading-relaxed text-fg-3`,children:r})]}),(0,H.jsx)(oj,{asChild:!0,children:(0,H.jsx)(X,{variant:`ghost`,size:`icon-sm`,"aria-label":`关闭`,children:(0,H.jsx)(Qi,{className:`size-4`})})})]}),i&&(0,H.jsx)(`div`,{className:`px-5 pt-4 pb-1`,children:i}),a&&(0,H.jsx)(`div`,{className:`flex justify-end gap-2 px-5 pt-3 pb-5`,children:a})]})})})]})})})}function dj({open:e,onOpenChange:t,title:n,subtitle:r,headerExtra:i,children:a,className:o}){return(0,H.jsx)(WA,{open:e,onOpenChange:t,children:(0,H.jsx)(bg,{children:e&&(0,H.jsxs)(JA,{forceMount:!0,children:[(0,H.jsx)(lj,{}),(0,H.jsx)(ej,{asChild:!0,forceMount:!0,"aria-describedby":void 0,children:(0,H.jsxs)(K.aside,{initial:{x:`100%`,opacity:.6},animate:{x:0,opacity:1},exit:{x:`100%`,opacity:.6},transition:q,className:B(`fixed inset-y-2 right-2 z-50 flex w-[min(560px,calc(100vw-1rem))] flex-col overflow-hidden rounded-2xl border border-border bg-surface shadow-pop outline-none`,o),children:[(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-4 border-b border-border px-6 pt-5 pb-4`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(ij,{className:`truncate text-[17px] font-semibold tracking-[-0.02em] text-fg`,children:n}),r&&(0,H.jsx)(`div`,{className:`mt-1 text-[13px] text-fg-3`,children:r})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[i,(0,H.jsx)(oj,{asChild:!0,children:(0,H.jsx)(X,{variant:`ghost`,size:`icon`,"aria-label":`关闭`,children:(0,H.jsx)(Qi,{className:`size-4`})})})]})]}),(0,H.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:a})]})})]})})})}var fj=V.createContext(void 0),pj=e=>{let t=V.useContext(fj);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},mj=({client:e,children:t})=>(V.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,H.jsx)(fj.Provider,{value:e,children:t})),hj={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},gj=new class{#e=hj;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function _j(e){setTimeout(e,0)}var vj=typeof window>`u`||`Deno`in globalThis;function yj(){}function bj(e,t){return typeof e==`function`?e(t):e}function xj(e){return typeof e==`number`&&e>=0&&e!==1/0}function Sj(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Cj(e,t){return typeof e==`function`?e(t):e}function wj(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Ej(o,t.options))return!1}else if(!Oj(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Tj(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Dj(t.options.mutationKey)!==Dj(a))return!1}else if(!Oj(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Ej(e,t){return(t?.queryKeyHashFn||Dj)(e)}function Dj(e){return JSON.stringify(e,(e,t)=>Nj(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Oj(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!Oj(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Oj(e[r],t[r]))return!1;return!0}return!1}var kj=Object.prototype.hasOwnProperty;function Aj(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Mj(e)&&Mj(t);if(!r&&!(Nj(e)&&Nj(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:kj.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Aj(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function jj(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n of Object.keys(e))if(!kj.call(t,n)||e[n]!==t[n])return!1;return!0}function Mj(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Nj(e){if(!Pj(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!Pj(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function Pj(e){return Object.prototype.toString.call(e)===`[object Object]`}function Fj(e){return new Promise(t=>{gj.setTimeout(t,e)})}function Ij(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Aj(e,t)}function Lj(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(-n):r}function Rj(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,n):r}var zj=Symbol();function Bj(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===zj?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Vj(e,t){return typeof e==`function`?e(...t):!!e}var Hj=Symbol();function Uj(e,t,n,r){let i=!1,a;return Object.defineProperties(e,{[Hj]:{value:r},signal:{enumerable:!0,get:()=>(a??=t(),i||(i=!0,a.aborted?n():a.addEventListener(`abort`,n,{once:!0})),a)}}),e}var Wj=()=>vj,Gj=()=>Wj(),Kj=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},qj=new class extends Kj{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Jj=_j;function Yj(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Jj,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Xj=Yj(),Zj=new class extends Kj{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Qj(e){return Math.min(1e3*2**e,3e4)}function $j(e){return(e??`online`)!==`online`||Zj.isOnline()}var eM=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function tM(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(yj);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new eM(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>qj.isFocused()&&(e.networkMode===`always`||Zj.isOnline())&&e.canRun(),p=()=>$j(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(Gj()?0:3),a=e.retryDelay??Qj,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?h(r):(n++,e.onFail?.(n,r),Fj(o).then(()=>c()||f()?void 0:g(f)).then(()=>{t?h(r):_()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var nM=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),xj(this.gcTime)&&(this.#e=gj.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Gj()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(gj.clearTimeout(this.#e),this.#e=void 0)}};function rM(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=t,u=e=>{Uj(e,()=>t.signal,()=>n=!0,l[Hj])},d=Bj(t.options,t.fetchOptions),f=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return u(e),e})(),o=await d(a),{maxPages:s}=t.options,c=i?Rj:Lj;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?aM:iM,n={pages:a,pageParams:o};s=await f(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]===void 0?r.initialPageParam:o[0]:iM(r,s);if(c>0&&e==null)break;s=await f(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function iM(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function aM(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function oM(e,t){return t?iM(e,t)!=null:!1}function sM(e,t){return!t||!e.getPreviousPageParam?!1:aM(e,t)!=null}var cM=class extends nM{#e;#t;#n;#r;#i;#a;#o;#s;#c;constructor(e){super(),this.#c=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=dM(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#s,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=dM(this.options);e.data!==void 0&&(this.setState(uM(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Ij(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(yj).catch(yj):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Cj(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===zj||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data!==void 0&&this.getObserversCount()>0&&this.observers.some(e=>Cj(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Sj(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#c||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a&&this.#o)return this.#a.continueRetry(),this.#o}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperties(e,{[Hj]:{value:n.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!0,n.signal)}})},i=()=>{let e=Bj(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#c=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?rM(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=tM({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof eM&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}),s=(async()=>{try{let e=await o.promise;if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof eM){if(e.silent){if(this.#a!==o&&this.#o)return this.#o;throw e}if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0,this.#o=void 0),this.scheduleGc()}})();return this.#o=s,o.start(),s}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...lM(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...uM(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Xj.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function lM(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$j(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function uM(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function dM(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var fM=class extends Kj{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),mM(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return hM(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return hM(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Cj(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!jj(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&gM(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||Cj(this.options.enabled,this.#t)!==Cj(t.enabled,this.#t)||Cj(this.options.staleTime,this.#t)!==Cj(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Cj(this.options.enabled,this.#t)!==Cj(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return jj(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch(t).then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(yj)),t}#h(e){return!Gj()&&Cj(this.options.enabled,this.#t)!==!1&&xj(e)}#g(){this.#b();let e=Cj(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=Sj(this.#r.dataUpdatedAt,e)+1;this.#u=gj.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return Cj(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=gj.setInterval(()=>{(this.options.refetchIntervalInBackground||qj.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(gj.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(gj.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&mM(e,t),o=i&&gM(e,n,t,r);(a||o)&&(l={...l,...lM(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=Ij(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=Ij(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=i?.error===f?i.errorUpdatedAt:Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:_M(e,t),refetch:this.refetch,isEnabled:Cj(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),jj(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size||this.options.throwOnError&&this.#r.error!==e.error)return!0;for(let t of n??this.#p)if(this.#r[t]!==e[t])return!0;return!1})();Xj.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function pM(e,t){return Cj(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||Cj(t.retryOnMount,e)!==!1)}function mM(e,t){return pM(e,t)||e.state.data!==void 0&&hM(e,t,t.refetchOnMount)}function hM(e,t,n){if(Cj(t.enabled,e)!==!1&&Cj(t.staleTime,e)!==`static`){let r=Cj(n,e);return r===`always`||r!==!1&&_M(e,t)}return!1}function gM(e,t,n,r){return(e!==t||Cj(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&_M(e,n)}function _M(e,t){return Cj(t.enabled,e)!==!1&&e.isStaleByTime(Cj(t.staleTime,e))}var vM=class extends fM{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:oM(t,n.data),hasPreviousPage:sM(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},yM=class extends nM{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||bM(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=tM({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}this.state.isPaused&&r.canStart()&&t();let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Xj.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function bM(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var xM=class extends Kj{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new yM({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=SM(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=SM(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=SM(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=SM(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Xj.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Tj(t,e))}findAll(e={}){return this.getAll().filter(t=>Tj(e,t))}notify(e){Xj.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Xj.batch(()=>Promise.all(e.map(e=>e.continue().catch(yj))))}};function SM(e){return e.options.scope?.id}var CM=class extends Kj{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),jj(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Dj(t.mutationKey)!==Dj(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??bM();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){Xj.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},wM=class extends Kj{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??Ej(r,t),a=this.get(i);return a||(a=new cM({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Xj.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>wj(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>wj(e,t)):t}notify(e){Xj.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Xj.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Xj.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},TM=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new wM,this.#t=e.mutationCache||new xM,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=qj.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Zj.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Cj(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=bj(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Xj.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Xj.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Xj.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=Xj.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(yj).catch(yj)}invalidateQueries(e,t={}){return Xj.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Xj.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n),r=e.state.fetchStatus===`paused`;return(!n.throwOnError||r)&&(t=t.catch(yj)),r?Promise.resolve():t}));return Promise.all(r).then(yj)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(Cj(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Cj(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(yj).catch(yj)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(yj).catch(yj)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return Zj.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Dj(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Oj(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Dj(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Oj(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Ej(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===zj&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},EM=V.createContext(!1),DM=()=>V.useContext(EM);EM.Provider;function OM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var kM=V.createContext(OM()),AM=()=>V.useContext(kM),jM=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?Vj(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},MM=e=>{V.useEffect(()=>{e.clearReset()},[e])},NM=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Vj(n,[e.error,r])),PM=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},FM=(e,t)=>e?.suspense&&t.isPending,IM=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function LM(e,t,n){let r=DM(),i=AM(),a=pj(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,PM(o),jM(o,i,s),MM(i);let[l]=V.useState(()=>new t(a,o)),u=l.getOptimisticResult(o);V.useEffect(()=>{l.setOptions(o)},[o,l]);let d=!r&&c;if(V.useSyncExternalStore(V.useCallback(e=>{let t=d?l.subscribe(Xj.batchCalls(e)):yj;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),FM(o,u))throw IM(o,l,i);if(NM({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function RM(e,t){return LM(e,fM,t)}function zM(e,t){let n=pj(t),[r]=V.useState(()=>new CM(n,e));V.useEffect(()=>{r.setOptions(e)},[r,e]);let i=V.useSyncExternalStore(V.useCallback(e=>r.subscribe(Xj.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=V.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(yj)},[r]);if(i.error&&Vj(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function BM(e,t){return LM(e,vM,t)}var VM=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),HM=o(((e,t)=>{t.exports=VM()})),UM=o((e=>{var t=HM(),n=d(),r=My();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function p(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&p(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function m(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function h(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function g(e){var t=[null,null],n=m(e);return n===null||_(t,e,n.child,{foundSelf:!1}),t}function _(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&_(e,t,n.child,r))return!0;n=n.sibling}return!1}function v(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var y=null,b=null;function x(e,t,n){return e===n||e===t&&(y=e,!0)}function S(e,t,n){return e===n?(b=e,!1):e===t&&(b!==null&&(y=e),!0)}function C(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function w(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var T=Object.assign,E=Symbol.for(`react.element`),D=Symbol.for(`react.transitional.element`),O=Symbol.for(`react.portal`),k=Symbol.for(`react.fragment`),A=Symbol.for(`react.strict_mode`),j=Symbol.for(`react.profiler`),M=Symbol.for(`react.consumer`),N=Symbol.for(`react.context`),ee=Symbol.for(`react.forward_ref`),P=Symbol.for(`react.suspense`),F=Symbol.for(`react.suspense_list`),te=Symbol.for(`react.memo`),ne=Symbol.for(`react.lazy`),re=Symbol.for(`react.activity`),ie=Symbol.for(`react.legacy_hidden`),ae=Symbol.for(`react.memo_cache_sentinel`),oe=Symbol.for(`react.view_transition`),se=Symbol.for(`react.recoverable`),ce=Symbol.iterator;function le(e){return typeof e!=`object`||!e?null:(e=ce&&e[ce]||e[`@@iterator`],typeof e==`function`?e:null)}var ue=Symbol.for(`react.client.reference`);function de(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case k:return`Fragment`;case j:return`Profiler`;case A:return`StrictMode`;case P:return`Suspense`;case F:return`SuspenseList`;case re:return`Activity`;case oe:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case O:return`Portal`;case N:return e.displayName||`Context`;case M:return(e._context.displayName||`Context`)+`.Consumer`;case ee:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case te:return t=e.displayName||null,t===null?de(e.type)||`Memo`:t;case ne:t=e._payload,e=e._init;try{return de(e(t))}catch{}}return null}var fe=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},he=[],ge=-1;function _e(e){return{current:e}}function ve(e){0>ge||(e.current=he[ge],he[ge]=null,ge--)}function ye(e,t){ge++,he[ge]=e.current,e.current=t}var L=_e(null),be=_e(null),xe=_e(null),Se=_e(null);function Ce(e,t){switch(ye(xe,t),ye(be,e),ye(L,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?gp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=gp(t),e=_p(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ve(L),ye(L,e)}function we(){ve(L),ve(be),ve(xe)}function Te(e){var t=e.memoizedState;t!==null&&(ph._currentValue=t.memoizedState,ye(Se,e)),t=L.current;var n=_p(t,e.type);t!==n&&(ye(be,e),ye(L,n))}function Ee(e){be.current===e&&(ve(L),ve(be)),Se.current===e&&(ve(Se),ph._currentValue=me)}var De,Oe;function ke(e){if(De===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);De=t&&t[1]||``,Oe=-1<e.stack.indexOf(`
|
|
42
|
-
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
43
|
-
`+De+e+Oe}var Ae=!1;function R(e,t){if(!e||Ae)return``;Ae=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
44
|
-
`),l=s.split(`
|
|
45
|
-
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
46
|
-
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ae=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ke(n):``}function je(e,t){switch(e.tag){case 26:case 27:case 5:return ke(e.type);case 16:return ke(`Lazy`);case 13:return e.child!==t&&t!==null?ke(`Suspense Fallback`):ke(`Suspense`);case 19:return ke(`SuspenseList`);case 0:case 15:return R(e.type,!1);case 11:return R(e.type.render,!1);case 1:return R(e.type,!0);case 31:return ke(`Activity`);case 30:return ke(`ViewTransition`);default:return``}}function Me(e){try{var t=``,n=null;do t+=je(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
47
|
-
Error generating stack: `+e.message+`
|
|
48
|
-
`+e.stack}}var Ne=Object.prototype.hasOwnProperty,Pe=t.unstable_scheduleCallback,Fe=t.unstable_cancelCallback,Ie=t.unstable_shouldYield,Le=t.unstable_requestPaint,z=t.unstable_now,Re=t.unstable_getCurrentPriorityLevel,ze=t.unstable_ImmediatePriority,Be=t.unstable_UserBlockingPriority,Ve=t.unstable_NormalPriority,He=t.unstable_LowPriority,Ue=t.unstable_IdlePriority,We=t.log,Ge=t.unstable_setDisableYieldValue,Ke=null,qe=null;function Je(e){if(typeof We==`function`&&Ge(e),qe&&typeof qe.setStrictMode==`function`)try{qe.setStrictMode(Ke,e)}catch{}}var Ye=Math.clz32?Math.clz32:Qe,Xe=Math.log,Ze=Math.LN2;function Qe(e){return e>>>=0,e===0?32:31-(Xe(e)/Ze|0)|0}var $e=256,et=262144,tt=4194304;function B(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function nt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=B(n))):i=B(o):i=B(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=B(n))):i=B(o)):i=B(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function rt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function V(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Ye(n),i=1<<r;t|=e[r],n&=~i}return t}function H(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function it(){var e=tt;return tt<<=1,!(tt&62914560)&&(tt=4194304),e}function at(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ot(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function st(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ye(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ct(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ct(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ye(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function lt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ye(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function ut(e,t){var n=t&-t;return n=n&42?1:dt(n),(n&(e.suspendedLanes|t))===0?n:0}function dt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ft(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function pt(){var e=pe.p;return e===0?(e=window.event,e===void 0?32:kh(e.type)):e}function mt(e,t){var n=pe.p;try{return pe.p=e,t()}finally{pe.p=n}}var ht=Math.random().toString(36).slice(2),gt=`__reactFiber$`+ht,_t=`__reactProps$`+ht,vt=`__reactContainer$`+ht,yt=`__reactEvents$`+ht,U=`__reactListeners$`+ht,bt=`__reactHandles$`+ht,xt=`__reactResources$`+ht,St=`__reactMarker$`+ht,Ct=`__reactLoad$`+ht;function wt(e){delete e[gt],delete e[_t],delete e[U],delete e[bt]}function Tt(e){var t;if(t=e[gt])return t;for(var n=e.parentNode;n;){if(t=n[vt]||n[gt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=vm(e);e!==null;){if(n=e[gt])return n;e=vm(e)}return t}e=n,n=e.parentNode}return null}function Et(e){if(e=e[gt]||e[vt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Dt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ot(e){var t=e[xt];return t||=e[xt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function kt(e){e[St]=!0}function At(e){e[Ct]=void 0}var jt=new Set,Mt={};function Nt(e,t){Pt(e,t),Pt(e+`Capture`,t)}function Pt(e,t){for(Mt[e]=t,e=0;e<t.length;e++)jt.add(t[e])}var Ft=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),It={},Lt={};function Rt(e){return Ne.call(Lt,e)?!0:Ne.call(It,e)?!1:Ft.test(e)?Lt[e]=!0:(It[e]=!0,!1)}var zt=!1;function Bt(){var e=zt;return zt=!1,e}function Vt(e,t,n){if(Rt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Ht(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Ut(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Wt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Gt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Kt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qt(e){if(!e._valueTracker){var t=Gt(e)?`checked`:`value`;e._valueTracker=Kt(e,t,``+e[t])}}function Jt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Gt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var Yt=/[\n"\\]/g;function Xt(e){return e.replace(Yt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Zt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Wt(t)):e.value!==``+Wt(t)&&(e.value=``+Wt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):$t(e,Wt(n)):o===`number`&&e.value==t?$t(e,Wt(e.value)):$t(e,Wt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Wt(s):e.removeAttribute(`name`)}function Qt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){qt(e);return}n=n==null?``:``+Wt(n),t=t==null?n:``+Wt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),qt(e)}function $t(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function en(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Wt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function tn(e,t,n){t!=null&&(t=``+Wt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Wt(n)}function nn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(fe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Wt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),qt(e)}function rn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var an=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function on(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||an.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function sn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,zt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(on(e,a,r),zt=!0)}else for(var o in t)t.hasOwnProperty(o)&&on(e,o,t[o])}function cn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var ln=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),un=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function dn(e){return un.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function fn(){}var pn=null;function mn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hn=null,gn=null;function _n(e){var t=Et(e);if(t&&(e=t.stateNode)){var n=e[_t]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Zt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Xt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[_t]||null;if(!a)throw Error(i(90));Zt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Jt(r)}break a;case`textarea`:tn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&en(e,!!n.multiple,t,!1)}}}var vn=!1;function yn(e,t,n){if(vn)return e(t,n);vn=!0;try{return e(t)}finally{if(vn=!1,(hn!==null||gn!==null)&&(Hd(),hn&&(t=hn,e=gn,gn=hn=null,_n(t),e)))for(t=0;t<e.length;t++)_n(e[t])}}function bn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[_t]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var xn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Sn=!1;if(xn)try{var Cn={};Object.defineProperty(Cn,"passive",{get:function(){Sn=!0}}),window.addEventListener(`test`,Cn,Cn),window.removeEventListener(`test`,Cn,Cn)}catch{Sn=!1}var wn=null,Tn=null,En=null;function Dn(){if(En)return En;var e,t=Tn,n=t.length,r,i=`value`in wn?wn.value:wn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return En=i.slice(e,1<r?1-r:void 0)}function On(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function kn(){return!0}function An(){return!1}function jn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?kn:An,this.isPropagationStopped=An,this}return T(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=kn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=kn)},persist:function(){},isPersistent:kn}),t}var Mn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nn=jn(Mn),Pn=T({},Mn,{view:0,detail:0}),Fn=jn(Pn),In,Ln,Rn,zn=T({},Pn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Rn&&(Rn&&e.type===`mousemove`?(In=e.screenX-Rn.screenX,Ln=e.screenY-Rn.screenY):Ln=In=0,Rn=e),In)},movementY:function(e){return`movementY`in e?e.movementY:Ln}}),Bn=jn(zn),Vn=jn(T({},zn,{dataTransfer:0})),Hn=jn(T({},Pn,{relatedTarget:0})),Un=jn(T({},Mn,{animationName:0,elapsedTime:0,pseudoElement:0})),Wn=jn(T({},Mn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Gn=jn(T({},Mn,{data:0})),Kn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},qn={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`},Jn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Yn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Jn[e])?!!t[e]:!1}function Xn(){return Yn}var Zn=jn(T({},Pn,{key:function(e){if(e.key){var t=Kn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=On(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?qn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xn,charCode:function(e){return e.type===`keypress`?On(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?On(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Qn=jn(T({},zn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),$n=jn(T({},Mn,{submitter:0})),er=jn(T({},Pn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xn})),tr=jn(T({},Mn,{propertyName:0,elapsedTime:0,pseudoElement:0})),nr=jn(T({},zn,{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})),rr=jn(T({},Mn,{newState:0,oldState:0,source:0})),ir=[9,13,27,32],ar=xn&&`CompositionEvent`in window,or=null;xn&&`documentMode`in document&&(or=document.documentMode);var sr=xn&&`TextEvent`in window&&!or,cr=xn&&(!ar||or&&8<or&&11>=or),lr=` `,ur=!1;function dr(e,t){switch(e){case`keyup`:return ir.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function fr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var pr=!1;function mr(e,t){switch(e){case`compositionend`:return fr(t);case`keypress`:return t.which===32?(ur=!0,lr):null;case`textInput`:return e=t.data,e===lr&&ur?null:e;default:return null}}function hr(e,t){if(pr)return e===`compositionend`||!ar&&dr(e,t)?(e=Dn(),En=Tn=wn=null,pr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return cr&&t.locale!==`ko`?null:t.data;default:return null}}var gr={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 _r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!gr[e.type]:t===`textarea`}function vr(e,t,n,r){hn?gn?gn.push(r):gn=[r]:hn=r,t=$f(t,`onChange`),0<t.length&&(n=new Nn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var yr=null,br=null;function xr(e){Gf(e,0)}function Sr(e){if(Jt(Dt(e)))return e}function Cr(e,t){if(e===`change`)return t}var wr=!1;if(xn){var Tr;if(xn){var Er=`oninput`in document;if(!Er){var Dr=document.createElement(`div`);Dr.setAttribute(`oninput`,`return;`),Er=typeof Dr.oninput==`function`}Tr=Er}else Tr=!1;wr=Tr&&(!document.documentMode||9<document.documentMode)}function Or(){yr&&(yr.detachEvent(`onpropertychange`,kr),br=yr=null)}function kr(e){if(e.propertyName===`value`&&Sr(br)){var t=[];vr(t,br,e,mn(e)),yn(xr,t)}}function Ar(e,t,n){e===`focusin`?(Or(),yr=t,br=n,yr.attachEvent(`onpropertychange`,kr)):e===`focusout`&&Or()}function jr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Sr(br)}function Mr(e,t){if(e===`click`)return Sr(t)}function Nr(e,t){if(e===`input`||e===`change`)return Sr(t)}function Pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Fr=typeof Object.is==`function`?Object.is:Pr;function Ir(e,t){if(Fr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ne.call(t,i)||!Fr(e[i],t[i]))return!1}return!0}function Lr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Rr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zr(e,t){var n=Rr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Rr(n)}}function Br(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Br(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lr(e.document)}return t}function Hr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Ur=xn&&`documentMode`in document&&11>=document.documentMode,Wr=null,Gr=null,Kr=null,qr=!1;function Jr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qr||Wr==null||Wr!==Lr(r)||(r=Wr,`selectionStart`in r&&Hr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Kr&&Ir(Kr,r)||(Kr=r,r=$f(Gr,`onSelect`),0<r.length&&(t=new Nn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Wr)))}function Yr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Xr={animationend:Yr(`Animation`,`AnimationEnd`),animationiteration:Yr(`Animation`,`AnimationIteration`),animationstart:Yr(`Animation`,`AnimationStart`),transitionrun:Yr(`Transition`,`TransitionRun`),transitionstart:Yr(`Transition`,`TransitionStart`),transitioncancel:Yr(`Transition`,`TransitionCancel`),transitionend:Yr(`Transition`,`TransitionEnd`)},Zr={},Qr={};xn&&(Qr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Xr.animationend.animation,delete Xr.animationiteration.animation,delete Xr.animationstart.animation),`TransitionEvent`in window||delete Xr.transitionend.transition);function $r(e){if(Zr[e])return Zr[e];if(!Xr[e])return e;var t=Xr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Qr)return Zr[e]=t[n];return e}var ei=$r(`animationend`),ti=$r(`animationiteration`),ni=$r(`animationstart`),ri=$r(`transitionrun`),ii=$r(`transitionstart`),ai=$r(`transitioncancel`),oi=$r(`transitionend`),si=new Map,ci=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(` `);ci.push(`scrollEnd`);function li(e,t){si.set(e,t),Nt(t,[e])}var ui=0;function di(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Cd.identifierPrefix;var n=ui++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function fi(e){if(e==null||typeof e==`string`)return e;var t=null,n=jd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function pi(e,t){return e=fi(e),t=fi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var mi=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},hi=[],gi=0,_i=0;function vi(){for(var e=gi,t=_i=gi=0;t<e;){var n=hi[t];hi[t++]=null;var r=hi[t];hi[t++]=null;var i=hi[t];hi[t++]=null;var a=hi[t];if(hi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Si(n,i,a)}}function yi(e,t,n,r){hi[gi++]=e,hi[gi++]=t,hi[gi++]=n,hi[gi++]=r,_i|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function bi(e,t,n,r){return yi(e,t,n,r),Ci(e)}function xi(e,t){return yi(e,null,null,t),Ci(e)}function Si(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ye(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ci(e){if(50<Md)throw Md=0,Nd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var wi={};function Ti(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ei(e,t,n,r){return new Ti(e,t,n,r)}function Di(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Oi(e,t){var n=e.alternate;return n===null?(n=Ei(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ki(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ai(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Di(r)&&(s=1);else if(typeof r==`string`)s=$m(e,n,L.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case re:return e=Ei(31,n,t,a),e.elementType=re,e.lanes=o,e;case k:return ji(n.children,a,o,t);case A:s=8,a|=24;break;case j:return e=Ei(12,n,t,a|2),e.elementType=j,e.lanes=o,e;case P:return e=Ei(13,n,t,a),e.elementType=P,e.lanes=o,e;case F:return e=Ei(19,n,t,a),e.elementType=F,e.lanes=o,e;case ie:case oe:return e=a|32,e=Ei(30,n,t,e),e.elementType=oe,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case N:s=10;break a;case M:s=9;break a;case ee:s=11;break a;case te:s=14;break a;case ne:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Ei(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ji(e,t,n,r){return e=Ei(7,e,r,t),e.lanes=n,e}function Mi(e,t,n){return e=Ei(6,e,null,t),e.lanes=n,e}function Ni(e){var t=Ei(18,null,null,0);return t.stateNode=e,t}function Pi(e,t,n){return t=Ei(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Fi=new WeakMap;function Ii(e,t){if(typeof e==`object`&&e){var n=Fi.get(e);return n===void 0?(t={value:e,source:t,stack:Me(t)},Fi.set(e,t),t):n}return{value:e,source:t,stack:Me(t)}}var Li=[],Ri=0,zi=null,Bi=0,Vi=[],Hi=0,Ui=null,Wi=1,Gi=``;function Ki(e,t){Li[Ri++]=Bi,Li[Ri++]=zi,zi=e,Bi=t}function qi(e,t,n){Vi[Hi++]=Wi,Vi[Hi++]=Gi,Vi[Hi++]=Ui,Ui=e;var r=Wi;e=Gi;var i=32-Ye(r)-1;r&=~(1<<i),n+=1;var a=32-Ye(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Wi=1<<32-Ye(t)+i|n<<i|r,Gi=a+e}else Wi=1<<a|n<<i|r,Gi=e}function Ji(e){e.return!==null&&(Ki(e,1),qi(e,1,0))}function Yi(e){for(;e===zi;)zi=Li[--Ri],Li[Ri]=null,Bi=Li[--Ri],Li[Ri]=null;for(;e===Ui;)Ui=Vi[--Hi],Vi[Hi]=null,Gi=Vi[--Hi],Vi[Hi]=null,Wi=Vi[--Hi],Vi[Hi]=null}function Xi(e,t){Vi[Hi++]=Wi,Vi[Hi++]=Gi,Vi[Hi++]=Ui,Wi=t.id,Gi=t.overflow,Ui=e}var Zi=null,Qi=null,$i=!1,ea=null,ta=!1,na=Error(i(519));function ra(e){throw la(Ii(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),na}function ia(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[gt]=e,t[_t]=r,n){case`dialog`:Kf(`cancel`,t),Kf(`close`,t);break;case`iframe`:case`object`:case`embed`:Kf(`load`,t);break;case`video`:case`audio`:for(n=0;n<Uf.length;n++)Kf(Uf[n],t);break;case`source`:Kf(`error`,t);break;case`img`:case`image`:case`link`:Kf(`error`,t),Kf(`load`,t);break;case`details`:Kf(`toggle`,t);break;case`input`:Kf(`invalid`,t),Qt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Kf(`invalid`,t);break;case`textarea`:Kf(`invalid`,t),nn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||ap(t.textContent,n)?(r.popover!=null&&(Kf(`beforetoggle`,t),Kf(`toggle`,t)),r.onScroll!=null&&Kf(`scroll`,t),r.onScrollEnd!=null&&Kf(`scrollend`,t),r.onClick!=null&&(t.onclick=fn),t=!0):t=!1,t||ra(e,!0)}function aa(e){for(Zi=e.return;Zi;)switch(Zi.tag){case 5:case 31:case 13:ta=!1;return;case 27:case 3:ta=!0;return;default:Zi=Zi.return}}function oa(e){if(e!==Zi)return!1;if(!$i)return aa(e),$i=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||yp(e.type,e.memoizedProps)),n=!n),n&&Qi&&ra(e),aa(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Qi=_m(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Qi=_m(e)}else t===27?(t=Qi,Op(e.type)?(e=gm,gm=null,Qi=e):Qi=t):Qi=Zi?hm(e.stateNode.nextSibling):null;return!0}function sa(){Qi=Zi=null,$i=!1}function ca(){var e=ea;return e!==null&&(hd===null?hd=e:hd.push.apply(hd,e),ea=null),e}function la(e){ea===null?ea=[e]:ea.push(e)}var ua=_e(null),da=null,fa=null;function pa(e,t,n){ye(ua,t._currentValue),t._currentValue=n}function ma(e){e._currentValue=ua.current,ve(ua)}function ha(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ga(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ha(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ha(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ha(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function _a(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Fr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===Se.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[ph]:e.push(ph))}a=a.return}return e!==null&&ga(t,e,n,r),t.flags|=262144,e!==null}function va(e){for(e=e.firstContext;e!==null;){if(!Fr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ya(e){da=e,fa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ba(e){return Sa(da,e)}function xa(e,t){return da===null&&ya(e),Sa(e,t)}function Sa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},fa===null){if(e===null)throw Error(i(308));fa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else fa=fa.next=t;return n}var Ca=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},wa=t.unstable_scheduleCallback,Ta=t.unstable_NormalPriority,Ea={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Da(){return{controller:new Ca,data:new Map,refCount:0}}function Oa(e){e.refCount--,e.refCount===0&&wa(Ta,function(){e.controller.abort()})}function ka(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Aa=null;function ja(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ma=null,Na=0,Pa=0,Fa=null;function Ia(e,t){if(Ma===null){var n=Ma=[];Na=0,Pa=Rf(),Fa={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Na++,t.then(La,La),t}function La(){if(--Na===0&&(Aa=null,Ma!==null)){Fa!==null&&(Fa.status=`fulfilled`);var e=Ma;Ma=null,Pa=0,Fa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ra(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var za=I.S;I.S=function(e,t){if(vd=z(),typeof t==`object`&&t&&typeof t.then==`function`&&Ia(e,t),Aa!==null)for(var n=wf;n!==null;)ka(n,Aa),n=n.next;if(n=e.types,n!==null){for(var r=wf;r!==null;)ka(r,n),r=r.next;if(Pa!==0){r=Aa,r===null&&(r=Aa=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}za!==null&&za(e,t)};var Ba=_e(null);function Va(){var e=Ba.current;return e===null?$u.pooledCache:e}function Ha(e,t){t===null?ye(Ba,Ba.current):ye(Ba,t.pool)}function Ua(){var e=Va();return e===null?null:{parent:Ea._currentValue,pool:e}}var Wa=Error(i(460)),Ga=Error(i(474)),Ka=Error(i(542)),qa={then:function(){}};function Ja(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ya(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(fn,fn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,$a(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(fn,fn);else{if(e=$u,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,$a(e),e}throw Za=t,Wa}}function Xa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Za=e,Wa):e}}var Za=null;function Qa(){if(Za===null)throw Error(i(459));var e=Za;return Za=null,e}function $a(e){if(e===Wa||e===Ka)throw Error(i(483))}var eo=null,to=0;function no(e){var t=to;return to+=1,eo===null&&(eo=[]),Ya(eo,e,t)}function ro(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function io(e,t){throw t.$$typeof===E?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function ao(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Oi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Mi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===k?(e=d(e,t,n.props.children,r,n.key),ro(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ne&&Xa(i)===t.type)?(t=a(t,n.props),ro(t,n),t.return=e,t):(t=Ai(n.type,n.key,n.props,null,e.mode,r),ro(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Pi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ji(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Mi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case D:return n=Ai(t.type,t.key,t.props,null,e.mode,n),ro(n,t),n.return=e,n;case O:return t=Pi(t,e.mode,n),t.return=e,t;case ne:return t=Xa(t),f(e,t,n)}if(fe(t)||le(t))return t=ji(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,no(t),n);if(t.$$typeof===N)return f(e,xa(e,t),n);io(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case D:return n.key===i?l(e,t,n,r):null;case O:return n.key===i?u(e,t,n,r):null;case ne:return n=Xa(n),p(e,t,n,r)}if(fe(n)||le(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,no(n),r);if(n.$$typeof===N)return p(e,t,xa(e,n),r);io(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case D:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case O:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ne:return r=Xa(r),m(e,t,n,r,i)}if(fe(r)||le(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,no(r),i);if(r.$$typeof===N)return m(e,t,n,xa(t,r),i);io(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),$i&&Ki(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return $i&&Ki(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),$i&&Ki(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),$i&&Ki(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return $i&&Ki(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),$i&&Ki(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===k&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case D:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===k){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),ro(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ne&&Xa(l)===r.type){n(e,r.sibling),c=a(r,o.props),ro(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===k?(c=ji(o.props.children,e.mode,c,o.key),ro(c,o),c.return=e,e=c):(c=Ai(o.type,o.key,o.props,null,e.mode,c),ro(c,o),c.return=e,e=c)}return s(e);case O:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Pi(o,e.mode,c),c.return=e,e=c}return s(e);case ne:return o=Xa(o),_(e,r,o,c)}if(fe(o))return h(e,r,o,c);if(le(o)){if(l=le(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,no(o),c);if(o.$$typeof===N)return _(e,r,xa(e,o),c);io(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Mi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{to=0;var i=_(e,t,n,r);return eo=null,i}catch(t){if(t===Wa||t===Ka)throw t;var a=Ei(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var oo=ao(!0),so=ao(!1),co=!1;function lo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function uo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function fo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function po(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Qu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ci(e),Si(e,null,n),t}return yi(e,r,t,n),Ci(e)}function W(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lt(e,n)}}function mo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var ho=!1;function go(){if(ho){var e=Fa;if(e!==null)throw e}}function _o(e,t,n,r){ho=!1;var i=e.updateQueue;co=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(td&f)===f:(r&f)===f){f!==0&&f===Pa&&(ho=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=T({},d,f);break a;case 2:co=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ld|=o,e.lanes=o,e.memoizedState=d}}function vo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function yo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)vo(n[e],t)}var bo=_e(null),xo=_e(0);function So(e,t){e=sd,ye(xo,e),ye(bo,t),sd=e|t.baseLanes}function Co(){ye(xo,sd),ye(bo,bo.current)}function wo(){sd=xo.current,ve(bo),ve(xo)}var To=_e(null),Eo=null;function Do(e){var t=e.alternate;ye(Mo,Mo.current&1),ye(To,e),Eo===null&&(t===null||bo.current!==null||t.memoizedState!==null)&&(Eo=e)}function Oo(e){ye(Mo,Mo.current),ye(To,e),Eo===null&&(Eo=e)}function ko(e){e.tag===22?(ye(Mo,Mo.current),ye(To,e),Eo===null&&(Eo=e)):Ao()}function Ao(){ye(Mo,Mo.current),ye(To,To.current)}function jo(e){ve(To),Eo===e&&(Eo=null),ve(Mo)}var Mo=_e(0);function No(e,t){ye(To,To.current),ye(Mo,t)}function Po(e){ve(Mo),ve(To),Eo===e&&(Eo=null)}function Fo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||fm(n)||pm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Io=0,G=null,Lo=null,Ro=null,zo=!1,Bo=!1,Vo=!1,Ho=0,Uo=0,Wo=null,Go=0;function Ko(){throw Error(i(321))}function qo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fr(e[n],t[n]))return!1;return!0}function Jo(e,t,n,r,i,a){return Io=a,G=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?dc:fc,Vo=!1,a=n(r,i),Vo=!1,Bo&&(a=Xo(t,n,r,i)),Yo(e),a}function Yo(e){I.H=uc;var t=Lo!==null&&Lo.next!==null;if(Io=0,Ro=Lo=G=null,zo=!1,Uo=0,Wo=null,t)throw Error(i(300));e===null||kc||(e=e.dependencies,e!==null&&va(e)&&(kc=!0))}function Xo(e,t,n,r){G=e;var a=0;do{if(Bo&&(Wo=null),Uo=0,Bo=!1,25<=a)throw Error(i(301));if(a+=1,Ro=Lo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}I.H=pc,o=t(n,r)}while(Bo);return o}function Zo(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?is(t):t,e=e.useState()[0],(Lo===null?null:Lo.memoizedState)!==e&&(G.flags|=1024),t}function Qo(){var e=Ho!==0;return Ho=0,e}function $o(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function es(e){if(zo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}zo=!1}Io=0,Ro=Lo=G=null,Bo=!1,Uo=Ho=0,Wo=null}function ts(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ro===null?G.memoizedState=Ro=e:Ro=Ro.next=e,Ro}function ns(){if(Lo===null){var e=G.alternate;e=e===null?null:e.memoizedState}else e=Lo.next;var t=Ro===null?G.memoizedState:Ro.next;if(t!==null)Ro=t,Lo=e;else{if(e===null)throw G.alternate===null?Error(i(467)):Error(i(310));Lo=e,e={memoizedState:Lo.memoizedState,baseState:Lo.baseState,baseQueue:Lo.baseQueue,queue:Lo.queue,next:null},Ro===null?G.memoizedState=Ro=e:Ro=Ro.next=e}return Ro}function rs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function is(e){var t=Uo;return Uo+=1,Wo===null&&(Wo=[]),e=Ya(Wo,e,t),t=G,(Ro===null?t.memoizedState:Ro.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?dc:fc),e}function as(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return is(e);if(e.$$typeof===se)return;if(e.$$typeof===N)return ba(e)}throw Error(i(438,String(e)))}function os(e){var t=null,n=G.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=G.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=rs(),G.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ae;return t.index++,n}function ss(e,t){return typeof t==`function`?t(e):t}function cs(e){return ls(ns(),Lo,e)}function ls(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Io&f)===f:(td&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Pa&&(d=!0);else if((Io&p)===p){u=u.next,p===Pa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,G.lanes|=p,ld|=p;f=u.action,Vo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,G.lanes|=f,ld|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Fr(o,e.memoizedState)&&(kc=!0,d&&(n=Fa,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function us(e){var t=ns(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Fr(o,t.memoizedState)||(kc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ds(e,t,n){var r=G,a=ns(),o=$i;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Fr((Lo||a).memoizedState,n);if(s&&(a.memoizedState=n,kc=!0),a=a.queue,Is(ms.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Ro!==null&&!!(Ro.memoizedState.tag&1),js(e?9:8,{destroy:void 0},ps.bind(null,r,a,n,t),null),e){if(r.flags|=2048,$u===null)throw Error(i(349));o||Io&127||fs(r,t,n)}return n}function fs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=G.updateQueue,t===null?(t=rs(),G.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ps(e,t,n,r){t.value=n,t.getSnapshot=r,hs(t)&&gs(e)}function ms(e,t,n){return n(function(){hs(t)&&gs(e)})}function hs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fr(e,n)}catch{return!0}}function gs(e){var t=xi(e,2);t!==null&&Ld(t,e,2)}function _s(e){var t=ts();if(typeof e==`function`){var n=e;if(e=n(),Vo){Je(!0);try{n()}finally{Je(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:e},t}function vs(e,t,n,r){return e.baseState=n,ls(e,Lo,typeof r==`function`?r:ss)}function ys(e,t,n,r,a){if(sc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};I.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,bs(t,o)):(o.next=n.next,t.pending=n.next=o)}}function bs(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=I.T,o={};o.types=a===null?null:a.types,I.T=o;try{var s=n(i,r),c=I.S;c!==null&&c(o,s),xs(e,t,s)}catch(n){Cs(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),xs(e,t,a)}catch(n){Cs(e,t,n)}}function xs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Ss(e,t,n)},function(n){return Cs(e,t,n)}):Ss(e,t,n)}function Ss(e,t,n){t.status=`fulfilled`,t.value=n,ws(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,bs(e,n)))}function Cs(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ws(t),t=t.next;while(t!==r)}e.action=null}function ws(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ts(e,t){return t}function Es(e,t){if($i){var n=$u.formState;if(n!==null){a:{var r=G;if($i){if(Qi){b:{for(var i=Qi,a=ta;i.nodeType!==8;)if(!a||(i=hm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Qi=hm(i.nextSibling),r=i.data===`F!`;break a}}ra(r)}r=!1}r&&(t=n[0])}}return n=ts(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ts,lastRenderedState:t},n.queue=r,n=ic.bind(null,G,r),r.dispatch=n,r=_s(!1),a=oc.bind(null,G,!1,r.queue),r=ts(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=ys.bind(null,G,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ds(e){return Os(ns(),Lo,e)}function Os(e,t,n){if(t=ls(e,t,Ts)[0],e=cs(ss)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=is(t)}catch(e){throw e===Wa?Ka:e}else r=t;t=ns();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(G.flags|=2048,js(9,{destroy:void 0},ks.bind(null,i,n),null)),[r,a,e]}function ks(e,t){e.action=t}function As(e){var t=ns(),n=Lo;if(n!==null)return Os(t,n,e);ns(),t=t.memoizedState,n=ns();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function js(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=G.updateQueue,t===null&&(t=rs(),G.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ms(){return ns().memoizedState}function Ns(e,t,n,r){var i=ts();G.flags|=e,i.memoizedState=js(1|t,{destroy:void 0},n,r===void 0?null:r)}function Ps(e,t,n,r){var i=ns();r=r===void 0?null:r;var a=i.memoizedState.inst;Lo!==null&&r!==null&&qo(r,Lo.memoizedState.deps)?i.memoizedState=js(t,a,n,r):(G.flags|=e,i.memoizedState=js(1|t,a,n,r))}function Fs(e,t){Ns(8390656,8,e,t)}function Is(e,t){Ps(2048,8,e,t)}function Ls(e){G.flags|=4;var t=G.updateQueue;if(t===null)t=rs(),G.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Rs(e){var t=ns().memoizedState;return Ls({ref:t,nextImpl:e}),function(){if(Qu&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function zs(e,t){return Ps(4,2,e,t)}function Bs(e,t){return Ps(4,4,e,t)}function Vs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Hs(e,t,n){n=n==null?null:n.concat([e]),Ps(4,4,Vs.bind(null,t,e),n)}function Us(){}function Ws(e,t){var n=ns();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&qo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Gs(e,t){var n=ns();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&qo(t,r[1]))return r[0];if(r=e(),Vo){Je(!0);try{e()}finally{Je(!1)}}return n.memoizedState=[r,t],r}function Ks(e,t,n){return n===void 0||Io&1073741824&&!(td&261930)?e.memoizedState=t:(e.memoizedState=n,e=Fd(),G.lanes|=e,ld|=e,n)}function qs(e,t,n,r){return Fr(n,t)?n:bo.current===null?!(Io&106)||Io&1073741824&&!(td&261930)?(kc=!0,e.memoizedState=n):(e=Fd(),G.lanes|=e,ld|=e,t):(e=Ks(e,n,r),Fr(e,t)||(kc=!0),e)}function Js(e,t,n,r,i){var a=pe.p;pe.p=a!==0&&8>a?a:8;var o=I.T,s={};s.types=o===null?null:o.types,I.T=s,oc(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?ac(e,t,Ra(c,r),Pd(e)):ac(e,t,r,Pd(e))}catch(n){ac(e,t,{then:function(){},status:`rejected`,reason:n},Pd())}finally{pe.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function Ys(){}function Xs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Zs(e).queue;Js(e,a,t,me,n===null?Ys:function(){return Qs(e),n(r)})}function Zs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:me},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ss,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Qs(e){var t=Zs(e);t.next===null&&(t=e.alternate.memoizedState),ac(e,t.next.queue,{},Pd())}function $s(){return ba(ph)}function ec(){return ns().memoizedState}function tc(){return ns().memoizedState}function nc(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Pd();e=fo(n);var r=po(t,e,n);r!==null&&(Ld(r,t,n),W(r,t,n)),t={cache:Da()},e.payload=t;return}t=t.return}}function rc(e,t,n){var r=Pd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},sc(e)?cc(t,n):(n=bi(e,t,n,r),n!==null&&(Ld(n,e,r),lc(n,t,r)))}function ic(e,t,n){ac(e,t,n,Pd())}function ac(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(sc(e))cc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Fr(s,o))return yi(e,t,i,0),$u===null&&vi(),!1}catch{}if(n=bi(e,t,i,r),n!==null)return Ld(n,e,r),lc(n,t,r),!0}return!1}function oc(e,t,n,r){if(r={lane:2,revertLane:Rf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},sc(e)){if(t)throw Error(i(479))}else t=bi(e,n,r,2),t!==null&&Ld(t,e,2)}function sc(e){var t=e.alternate;return e===G||t!==null&&t===G}function cc(e,t){Bo=zo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function lc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,lt(e,n)}}var uc={readContext:ba,use:as,useCallback:Ko,useContext:Ko,useEffect:Ko,useImperativeHandle:Ko,useLayoutEffect:Ko,useInsertionEffect:Ko,useMemo:Ko,useReducer:Ko,useRef:Ko,useState:Ko,useDebugValue:Ko,useDeferredValue:Ko,useTransition:Ko,useSyncExternalStore:Ko,useId:Ko,useHostTransitionStatus:Ko,useFormState:Ko,useActionState:Ko,useOptimistic:Ko,useMemoCache:Ko,useCacheRefresh:Ko,useEffectEvent:Ko},dc={readContext:ba,use:as,useCallback:function(e,t){return ts().memoizedState=[e,t===void 0?null:t],e},useContext:ba,useEffect:Fs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Ns(4194308,4,Vs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ns(4194308,4,e,t)},useInsertionEffect:function(e,t){Ns(4,2,e,t)},useMemo:function(e,t){var n=ts();t=t===void 0?null:t;var r=e();if(Vo){Je(!0);try{e()}finally{Je(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ts();if(n!==void 0){var i=n(t);if(Vo){Je(!0);try{n(t)}finally{Je(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=rc.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=ts();return e={current:e},t.memoizedState=e},useState:function(e){e=_s(e);var t=e.queue,n=ic.bind(null,G,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Us,useDeferredValue:function(e,t){return Ks(ts(),e,t)},useTransition:function(){var e=_s(!1);return e=Js.bind(null,G,e.queue,!0,!1),ts().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=G,a=ts();if($i){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),$u===null)throw Error(i(349));td&127||fs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Fs(ms.bind(null,r,o,e),[e]),r.flags|=2048,js(9,{destroy:void 0},ps.bind(null,r,o,n,t),null),n},useId:function(){var e=ts(),t=$u.identifierPrefix;if($i){var n=Gi,r=Wi;n=(r&~(1<<32-Ye(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Ho++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Go++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:$s,useFormState:Es,useActionState:Es,useOptimistic:function(e){var t=ts();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=oc.bind(null,G,!0,n),n.dispatch=t,[e,t]},useMemoCache:os,useCacheRefresh:function(){return ts().memoizedState=nc.bind(null,G)},useEffectEvent:function(e){var t=ts(),n={impl:e};return t.memoizedState=n,function(){if(Qu&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},fc={readContext:ba,use:as,useCallback:Ws,useContext:ba,useEffect:Is,useImperativeHandle:Hs,useInsertionEffect:zs,useLayoutEffect:Bs,useMemo:Gs,useReducer:cs,useRef:Ms,useState:function(){return cs(ss)},useDebugValue:Us,useDeferredValue:function(e,t){return qs(ns(),Lo.memoizedState,e,t)},useTransition:function(){var e=cs(ss)[0],t=ns().memoizedState;return[typeof e==`boolean`?e:is(e),t]},useSyncExternalStore:ds,useId:ec,useHostTransitionStatus:$s,useFormState:Ds,useActionState:Ds,useOptimistic:function(e,t){return vs(ns(),Lo,e,t)},useMemoCache:os,useCacheRefresh:tc,useEffectEvent:Rs},pc={readContext:ba,use:as,useCallback:Ws,useContext:ba,useEffect:Is,useImperativeHandle:Hs,useInsertionEffect:zs,useLayoutEffect:Bs,useMemo:Gs,useReducer:us,useRef:Ms,useState:function(){return us(ss)},useDebugValue:Us,useDeferredValue:function(e,t){var n=ns();return Lo===null?Ks(n,e,t):qs(n,Lo.memoizedState,e,t)},useTransition:function(){var e=us(ss)[0],t=ns().memoizedState;return[typeof e==`boolean`?e:is(e),t]},useSyncExternalStore:ds,useId:ec,useHostTransitionStatus:$s,useFormState:As,useActionState:As,useOptimistic:function(e,t){var n=ns();return Lo===null?(n.baseState=e,[e,n.queue.dispatch]):vs(n,Lo,e,t)},useMemoCache:os,useCacheRefresh:tc,useEffectEvent:Rs};function mc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var hc={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Pd(),i=fo(r);i.payload=t,n!=null&&(i.callback=n),t=po(e,i,r),t!==null&&(Ld(t,e,r),W(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Pd(),i=fo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=po(e,i,r),t!==null&&(Ld(t,e,r),W(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Pd(),r=fo(n);r.tag=2,t!=null&&(r.callback=t),t=po(e,r,n),t!==null&&(Ld(t,e,n),W(t,e,n))}};function gc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ir(n,r)||!Ir(i,a):!0}function _c(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&hc.enqueueReplaceState(t,t.state,null)}function vc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=T({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function yc(e){mi(e)}function bc(e){console.error(e)}function xc(e){mi(e)}function Sc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Cc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function wc(e,t,n){return n=fo(n),n.tag=3,n.payload={element:null},n.callback=function(){Sc(e,t)},n}function Tc(e){return e=fo(e),e.tag=3,e}function Ec(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Cc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Cc(t,n,r),typeof i!=`function`&&(xd===null?xd=new Set([this]):xd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Dc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&_a(t,n,a,!0),n=To.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Eo===null?Yd():n.alternate===null&&cd===0&&(cd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===qa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),vf(e,r,a)),!1;case 22:return n.flags|=65536,r===qa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),vf(e,r,a)),!1}throw Error(i(435,n.tag))}return vf(e,r,a),Yd(),!1}if($i)return t=To.current,t===null?(r!==na&&(t=Error(i(423),{cause:r}),la(Ii(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ii(r,n),a=wc(e.stateNode,r,a),mo(e,a),cd!==4&&(cd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==na&&(e=Error(i(422),{cause:r}),la(Ii(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ii(o,n),md===null?md=[o]:md.push(o),cd!==4&&(cd=2),t===null)return!0;r=Ii(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=wc(n.stateNode,r,e),mo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(xd===null||!xd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Tc(a),Ec(a,e,n,r),mo(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Oc=Error(i(461)),kc=!1;function Ac(e,t,n,r){t.child=e===null?so(t,null,n,r):oo(t,e.child,n,r)}function jc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ya(t),r=Jo(e,t,n,o,a,i),s=Qo(),e!==null&&!kc?($o(e,t,i),al(e,t,i)):($i&&s&&Ji(t),t.flags|=1,Ac(e,t,r,i),t.child)}function Mc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Di(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Nc(e,t,a,r,i)):(e=Ai(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ol(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ir:n,n(o,r)&&e.ref===t.ref)return al(e,t,i)}return t.flags|=1,e=Oi(a,r),e.ref=t.ref,e.return=t,t.child=e}function Nc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ir(a,r)&&e.ref===t.ref){if(kc=!1,t.pendingProps=r=a,ol(e,i))e.flags&131072&&(kc=!0);else return t.lanes=e.lanes,al(e,t,i)}}return Vc(e,t,n,r,i)}function Pc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Ic(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ha(t,a===null?null:a.cachePool),a===null?Co():So(t,a),ko(t);else return r=t.lanes=536870912,Ic(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ha(t,null),Co(),Ao()):(Ha(t,a.cachePool),So(t,a),Ao(),t.memoizedState=null);return Ac(e,t,i,n),t.child}function Fc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ic(e,t,n,r,i){var a=Va();return a=a===null?null:{parent:Ea._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ha(t,null),Co(),ko(t),e!==null&&_a(e,t,r,!0),t.childLanes=i,null}function Lc(e,t){return t=Xc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Rc(e,t,n){return oo(t,e.child,null,n),e=Lc(t,t.pendingProps),e.flags|=2,jo(t),t.memoizedState=null,e}function zc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if($i){if(r.mode===`hidden`)return e=Lc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Fc(null,e);if(Oo(t),(e=Qi)?(e=dm(e,ta),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ui===null?null:{id:Wi,overflow:Gi},retryLane:536870912,hydrationErrors:null},n=Ni(e),n.return=t,t.child=n,Zi=t,Qi=null)):e=null,e===null)throw ra(t);return t.lanes=536870912,null}return Lc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Oo(t),a){if(t.flags&256)t.flags&=-257,t=Rc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(kc||_a(e,t,n,!1),a=(n&e.childLanes)!==0,kc||a){if(bo.current===null){if(r=$u,r!==null&&(s=ut(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,xi(e,s),Ld(r,e,s),Oc;Yd()}t=Rc(e,t,n)}else e=o.treeContext,Qi=hm(s.nextSibling),Zi=t,$i=!0,ea=null,ta=!1,e!==null&&Xi(t,e),t=Lc(t,r),t.flags|=134221824;return t}return e=Oi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Bc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Vc(e,t,n,r,i){return ya(t),n=Jo(e,t,n,r,void 0,i),r=Qo(),e!==null&&!kc?($o(e,t,i),al(e,t,i)):($i&&r&&Ji(t),t.flags|=1,Ac(e,t,n,i),t.child)}function Hc(e,t,n,r,i,a){return ya(t),t.updateQueue=null,n=Xo(t,r,n,i),Yo(e),r=Qo(),e!==null&&!kc?($o(e,t,a),al(e,t,a)):($i&&r&&Ji(t),t.flags|=1,Ac(e,t,n,a),t.child)}function Uc(e,t,n,r,i){if(ya(t),t.stateNode===null){var a=wi,o=n.contextType;typeof o==`object`&&o&&(a=ba(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=hc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},lo(t),o=n.contextType,a.context=typeof o==`object`&&o?ba(o):wi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(mc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&hc.enqueueReplaceState(a,a.state,null),_o(t,r,a,i),go(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=vc(n,s);a.props=c;var l=a.context,u=n.contextType;o=wi,typeof u==`object`&&u&&(o=ba(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&_c(t,a,r,o),co=!1;var f=t.memoizedState;a.state=f,_o(t,r,a,i),go(),l=t.memoizedState,s||f!==l||co?(typeof d==`function`&&(mc(t,n,d,r),l=t.memoizedState),(c=co||gc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,uo(e,t),o=t.memoizedProps,u=vc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=wi,typeof l==`object`&&l&&(c=ba(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&_c(t,a,r,c),co=!1,f=t.memoizedState,a.state=f,_o(t,r,a,i),go();var p=t.memoizedState;o!==d||f!==p||co||e!==null&&e.dependencies!==null&&va(e.dependencies)?(typeof s==`function`&&(mc(t,n,s,r),p=t.memoizedState),(u=co||gc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&va(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Bc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=oo(t,e.child,null,i),t.child=oo(t,null,n,i)):Ac(e,t,n,i),t.memoizedState=a.state,e=t.child):e=al(e,t,i),e}function Wc(e,t,n,r){return sa(),t.flags|=256,Ac(e,t,n,r),t.child}var Gc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Kc(e){return{baseLanes:e,cachePool:Ua()}}function qc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=fd),e}function Jc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Mo.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if($i){if(i?Do(t):Ao(),(e=Qi)?(e=dm(e,ta),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ui===null?null:{id:Wi,overflow:Gi},retryLane:536870912,hydrationErrors:null},n=Ni(e),n.return=t,t.child=n,Zi=t,Qi=null)):e=null,e===null)throw ra(t);return t.lanes=pm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Ao(),i=t.mode,a=Xc({mode:`hidden`,children:a},i),r=ji(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Kc(n),r.childLanes=qc(e,o,n),t.memoizedState=Gc,Fc(null,r)):(Do(t),Yc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return Qc(e,t,a,o,r,c,s,n)}return i?(Ao(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Oi(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=ji(i,a,n,null),i.flags|=2):i=Oi(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Fc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Kc(n):(a=i.cachePool,a===null?a=Ua():(s=Ea._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=qc(e,o,n),t.memoizedState=Gc,Fc(e.child,r)):(Do(t),n=e.child,e=n.sibling,n=Oi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Yc(e,t){return t=Xc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Xc(e,t){return e=Ei(22,e,null,t),e.lanes=0,e}function Zc(e,t,n){return oo(t,e.child,null,n),e=Yc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Qc(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Do(t),t.flags&=-257,Zc(e,t,c)):t.memoizedState===null?(Ao(),o=a.fallback,s=t.mode,a=Xc({mode:`visible`,children:a.children},s),o=ji(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,oo(t,e.child,null,c),a=t.child,a.memoizedState=Kc(c),a.childLanes=qc(e,r,c),t.memoizedState=Gc,Fc(null,a)):(Ao(),t.child=e.child,t.flags|=128,null);if(Do(t),pm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,la({value:a,source:null,stack:null})),Zc(e,t,c)}if(kc||_a(e,t,c,!1),r=(c&e.childLanes)!==0,kc||r){if(bo.current!==null)return Zc(e,t,c);if(r=$u,r!==null&&(a=ut(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,xi(e,a),Ld(r,e,a),Oc;return fm(o)||Yd(),Zc(e,t,c)}return fm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,Qi=hm(o.nextSibling),Zi=t,$i=!0,ea=null,ta=!1,e!==null&&Xi(t,e),t=Yc(t,a.children),t.flags|=134221824,t)}function $c(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ha(e.return,t,n)}function el(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Fo(n)===null&&(t=e),e=e.sibling}return t}function tl(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function nl(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function rl(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Mo.current;if(t.flags&128)return No(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,No(t,o),i===`backwards`&&e!==null?(nl(e),Ac(e,t,r,n),nl(e)):Ac(e,t,r,n),r=$i?Bi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$c(e,n,t);else if(e.tag===19)$c(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=el(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,nl(t)),tl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Fo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}tl(t,!0,n,null,a,r);break;case`together`:tl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=el(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),tl(t,!1,i,n,a,r)}return t.child}function il(e,t,n){var r=t.pendingProps;return pa(t,t.type,r.value),Ac(e,t,r.children,n),t.child}function al(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ld|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(_a(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Oi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ol(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&va(e)))}function sl(e,t,n){switch(t.tag){case 3:Ce(t,t.stateNode.containerInfo),pa(t,Ea,e.memoizedState.cache),sa();break;case 27:case 5:Te(t);break;case 4:Ce(t,t.stateNode.containerInfo);break;case 10:pa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Oo(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Do(t),t.flags|=128,null;r=_a(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Jc(e,t,n):(Do(t),e=al(e,t,n),e===null?null:e.sibling)}Do(t);break;case 19:if(t.flags&128)return rl(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(_a(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return rl(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),No(t,Mo.current),r)break;return null;case 22:return t.lanes=0,Pc(e,t,n,t.pendingProps);case 24:pa(t,Ea,e.memoizedState.cache)}return al(e,t,n)}function cl(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)kc=!0;else{if(!ol(e,n)&&!(t.flags&128))return kc=!1,sl(e,t,n);kc=!!(e.flags&131072)}}else kc=!1,$i&&t.flags&1048576&&qi(t,Bi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Xa(t.elementType),t.type=e,typeof e==`function`)Di(e)?(r=vc(e,r),t.tag=1,t=Uc(null,t,e,r,n)):(t.tag=0,t=Vc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ee){t.tag=11,t=jc(null,t,e,r,n);break a}if(a===te){t.tag=14,t=Mc(null,t,e,r,n);break a}if(a===N){t.tag=10,t.type=e,t=il(null,t,n);break a}}throw t=de(e)||e,Error(i(306,t,``))}}return t;case 0:return Vc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=vc(r,t.pendingProps),Uc(e,t,r,a,n);case 3:a:{if(Ce(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,uo(e,t),_o(t,r,null,n);var s=t.memoizedState;if(r=s.cache,pa(t,Ea,r),r!==o.cache&&ga(t,[Ea],n,!0),go(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Wc(e,t,r,n);break a}if(r!==a){a=Ii(Error(i(424)),t),la(a),t=Wc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Qi=hm(e.firstChild),Zi=t,$i=!0,ea=null,ta=!0,n=so(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(sa(),r===a){t=al(e,t,n);break a}Ac(e,t,r,n)}t=t.child}return t;case 26:return Bc(e,t),e===null?(n=zm(t.type,null,t.pendingProps,null))?t.memoizedState=n:$i||(t.stateNode=vp(t.type,t.pendingProps,xe.current,t)):t.memoizedState=zm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Te(t),e===null&&$i&&(r=t.stateNode=xm(t.type,t.pendingProps,xe.current),Zi=t,ta=!0,a=Qi,Op(t.type)?(gm=a,Qi=hm(r.firstChild)):Qi=a),Ac(e,t,t.pendingProps.children,n),Bc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&$i&&((a=r=Qi)&&(r=lm(r,t.type,t.pendingProps,ta),r===null?a=!1:(t.stateNode=r,Zi=t,Qi=hm(r.firstChild),ta=!1,a=!0)),a||ra(t)),Te(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,yp(a,o)?r=null:s!==null&&yp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Jo(e,t,Zo,null,null,n),ph._currentValue=a),Bc(e,t),Ac(e,t,r,n),t.child;case 6:return e===null&&$i&&((e=n=Qi)&&(n=um(n,t.pendingProps,ta),n===null?e=!1:(t.stateNode=n,Zi=t,Qi=null,e=!0)),e||ra(t)),null;case 13:return Jc(e,t,n);case 4:return Ce(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=oo(t,null,r,n):Ac(e,t,r,n),t.child;case 11:return jc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Bc(e,t),Ac(e,t,r,n),t.child;case 8:return Ac(e,t,t.pendingProps.children,n),t.child;case 12:return Ac(e,t,t.pendingProps.children,n),t.child;case 10:return il(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,ya(t),a=ba(a),r=r(a),t.flags|=1,Ac(e,t,r,n),t.child;case 14:return Mc(e,t,t.type,t.pendingProps,n);case 15:return Nc(e,t,t.type,t.pendingProps,n);case 19:return rl(e,t,n);case 31:return zc(e,t,n);case 22:return Pc(e,t,n,t.pendingProps);case 24:return ya(t),r=ba(Ea),e===null?(a=Va(),a===null&&(a=$u,o=Da(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},lo(t),pa(t,Ea,a)):((e.lanes&n)!==0&&(uo(e,t),_o(t,null,null,n),go()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,pa(t,Ea,r),r!==a.cache&&ga(t,[Ea],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),pa(t,Ea,r))),Ac(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:$i&&Ji(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Bc(e,t),Ac(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function ll(e){e.flags|=4}function ul(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?eh(t,r):eh(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Kd())e.flags|=8192;else throw Za=qa,Ga}}else e.flags&=-16777217}function dl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!th(t)){if(Kd())e.flags|=8192;else throw Za=qa,Ga}}function fl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:it(),e.lanes|=t,pd|=t)}function pl(e,t){if(!$i)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function ml(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function hl(e,t,n){var r=t.pendingProps;switch(Yi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ml(t),null;case 1:return ml(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ma(Ea),we(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(oa(t)?ll(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ca())),ml(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(ll(t),o===null?(ml(t),ul(t,a,null,r,n)):(ml(t),dl(t,o))):o?o===e.memoizedState?(ml(t),t.flags&=-16777217):(ll(t),ml(t),dl(t,o)):(e=e.memoizedProps,e!==r&&ll(t),ml(t),ul(t,a,e,r,n)),null;case 27:if(Ee(t),n=xe.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ll(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return ml(t),t.subtreeFlags&=-33554433,null}e=L.current,oa(t)?ia(t,e):(e=xm(a,r,n),t.stateNode=e,ll(t))}return ml(t),t.subtreeFlags&=-33554433,null;case 5:if(Ee(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ll(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return ml(t),t.subtreeFlags&=-33554433,null}if(o=L.current,oa(t))ia(t,o);else{var s=hp(xe.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[gt]=t,o[_t]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(cp(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&ll(t)}}return ml(t),t.subtreeFlags&=-33554433,ul(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ll(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=xe.current,oa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Zi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[gt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||ap(e.nodeValue,n)),e||ra(t,!0)}else e=hp(e).createTextNode(r),e[gt]=t,t.stateNode=e}return ml(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=oa(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[gt]=t}else sa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ml(t),e=!1}else n=ca(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(jo(t),t):(jo(t),null);if(t.flags&128)throw Error(i(558))}return ml(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=oa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[gt]=t}else sa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ml(t),a=!1}else a=ca(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(jo(t),t):(jo(t),null)}return jo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),fl(t,t.updateQueue),ml(t),null);case 4:return we(),e===null&&Yf(t.stateNode.containerInfo),t.flags|=67108864,ml(t),null;case 10:return ma(t.type),ml(t),null;case 19:if(Po(t),r=t.memoizedState,r===null)return ml(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)pl(r,!1);else{if(cd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Fo(e),o!==null){for(t.flags|=128,pl(r,!1),e=o.updateQueue,t.updateQueue=e,fl(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ki(n,e),n=n.sibling;return No(t,Mo.current&1|2),$i&&Ki(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&z()>yd&&(t.flags|=128,a=!0,pl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Fo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,fl(t,e),pl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!$i)return ml(t),null}else 2*z()-r.renderingStartTime>yd&&n!==536870912&&(t.flags|=128,a=!0,pl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=z(),e.sibling=null,o=Mo.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||$i?No(t,o):(n=o,ye(To,t),ye(Mo,n),Eo===null&&(Eo=t)),$i&&Ki(t,r.treeForkCount),e}return ml(t),null;case 22:case 23:return jo(t),wo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(ml(t),t.subtreeFlags&6&&(t.flags|=8192)):ml(t),n=t.updateQueue,n!==null&&fl(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ve(Ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ma(Ea),ml(t),null;case 25:return null;case 30:return t.flags|=33554432,ml(t),null}throw Error(i(156,t.tag))}function gl(e,t){switch(Yi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ma(Ea),we(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ee(t),null;case 31:if(t.memoizedState!==null){if(jo(t),t.alternate===null)throw Error(i(340));sa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(jo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));sa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Po(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return we(),null;case 10:return ma(t.type),null;case 22:case 23:return jo(t),wo(),e!==null&&ve(Ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ma(Ea),null;case 25:return null;default:return null}}function _l(e,t){switch(Yi(t),t.tag){case 3:ma(Ea),we();break;case 26:case 27:case 5:Ee(t);break;case 4:we();break;case 31:t.memoizedState!==null&&jo(t);break;case 13:jo(t);break;case 19:Po(t);break;case 10:ma(t.type);break;case 22:case 23:jo(t),wo(),e!==null&&ve(Ba);break;case 24:ma(Ea)}}function vl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){_f(t,t.return,e)}}function yl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){_f(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){_f(t,t.return,e)}}function bl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{yo(t,n)}catch(t){_f(e,e.return,t)}}}function xl(e,t,n){n.props=vc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){_f(e,t,n)}}function Sl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=di(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Bp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Vp(e);p(e.child,!1,im,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){_f(e,t,n)}}function Cl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){_f(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){_f(e,t,n)}else n.current=null}}function wl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)om(e.stateNode,t[n])}function Tl(e){for(var t=e.return;t!==null&&(Ol(t)&&om(e.stateNode,t.stateNode),!Dl(t));)t=t.return}function El(e){for(var t=e.return;t!==null&&(Ol(t)&&sm(e.stateNode,t.stateNode),!Dl(t));)t=t.return}function Dl(e){return e.tag===5||e.tag===3||e.tag===27}function Ol(e){return e&&e.tag===7&&e.stateNode!==null}function kl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){_f(e,e.return,t)}}function Al(e,t,n){try{var r=e.stateNode;up(r,e.type,n,t),r[_t]=t}catch(t){_f(e,e.return,t)}}function jl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Op(e.type)||e.tag===4}function Ml(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||jl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Op(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Nl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=fn)),wl(e,r),zt=!0;else if(i!==4&&(i===27&&(wl(e,r),r=null,Op(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Nl(e,t,n,r),e=e.sibling;e!==null;)Nl(e,t,n,r),e=e.sibling}function Pl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),wl(e,r),zt=!0;else if(i!==4&&(i===27&&(wl(e,r),r=null,Op(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Pl(e,t,n,r),e=e.sibling;e!==null;)Pl(e,t,n,r),e=e.sibling}function Fl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);cp(t,r,n),t[gt]=e,t[_t]=n}catch(t){_f(e,e.return,t)}}var Il=!1,Ll=null;function Rl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Il=!0)}var zl=null;function Bl(){var e=zl;return zl=null,e}var Vl=0;function Hl(e,t,n,r,i){return Vl=0,Ul(e.child,t,n,r,i)}function Ul(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Pp(o);r.push(s),s.view&&(a=!0)}else a||Pp(o).view&&(a=!0);Il=!0,jp(o,Vl===0?t:t+`_`+Vl,n),Vl++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Ul(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Wl(e,t){for(;e!==null;)e.tag===5?Mp(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Wl(e.child,t),e=e.sibling}function Gl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Gl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=pi(t.default,t.share),t!==`none`&&(Hl(e,n,t,null,!1)||Wl(e.child,!1))}e=e.sibling}}function Kl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=di(r,n),a=pi(r.default,n.paired?r.share:r.enter);a===`none`?Gl(e):Hl(e,i,a,null,!1)?(Gl(e),n.paired||t||Id(e,r.onEnter)):Wl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Kl(e,t),e=e.sibling;else Gl(e)}function ql(e){if(Ll!==null&&Ll.size!==0){var t=Ll;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=pi(n.default,n.share);if(a!==`none`&&(Hl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Id(e,n.onShare)):Wl(e.child,!1)),t.delete(r),t.size===0)break}}}ql(e)}e=e.sibling}}}function Jl(e){if(e.tag===30){var t=e.memoizedProps,n=di(t,e.stateNode),r=Ll===null?void 0:Ll.get(n),i=pi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Hl(e,n,i,null,!1)?r===void 0?Id(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Ll.delete(n),Id(e,t.onShare)):Wl(e.child,!1)),Ll!==null&&ql(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Jl(e),e=e.sibling;else Ll!==null&&ql(e)}function Yl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=di(t,e.stateNode);t=pi(t.default,t.update),e.flags&=-5,t!==`none`&&Hl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Yl(e);e=e.sibling}}function Xl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Wl(e.child,!1))}Xl(e)}e=e.sibling}}function Zl(e){if(e.tag===30)e.stateNode.paired=null,Wl(e.child,!1),Xl(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Zl(e),e=e.sibling;else Xl(e)}function Ql(e){for(e=e.child;e!==null;)e.tag===30?Wl(e.child,!1):e.subtreeFlags&33554432&&Ql(e),e=e.sibling}function $l(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Vl<a.length){var l=a[Vl],u=Pp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&jp(c,Vl===0?n:n+`_`+Vl,i),s&&e.flags&4||(zl===null&&(zl=[]),zl.push(c,Vl===0?r:r+`_`+Vl,t.memoizedProps)),Vl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:$l(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function eu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=di(n,r),a=pi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Fp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Vl=0,i=$l(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Id(e,n.onUpdate))}else e.subtreeFlags&33554432&&eu(e,t);e=e.sibling}}var tu=!1,nu=!1,ru=!1,iu=!1,au=typeof WeakSet==`function`?WeakSet:Set,ou=null,su=!1,cu=!1,lu=!1,uu=!1;function du(e,t,n){if(e=e.containerInfo,pp=Sh,e=Vr(e),Hr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(mp={focusedElem:e,selectionRange:r},Sh=!1,n=(n&335544064)===n,ou=t,t=n?9270:1024;ou!==null;){if(e=ou,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Jl(r[a]);if(e.alternate===null&&e.flags&2)n&&Rl(e),fu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Jl(r),fu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Rl(e),fu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,ou=r):(n&&Yl(e),fu(n))}}Ll=null}function fu(e){for(;ou!==null;){var t=ou,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=vc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){_f(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)cm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:cm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=di(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=pi(a.default,a.update),a!==`none`&&Hl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,ou=r;break}ou=t.return}}function pu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Nu(e,n),r&4&&vl(5,n);break;case 1:if(Nu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){_f(n,n.return,e)}else{var i=vc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){_f(n,n.return,e)}}}r&64&&bl(n),r&512&&Sl(n,n.return);break;case 3:if(Nu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{yo(e,t)}catch(e){_f(n,n.return,e)}}break;case 27:t===null&&r&4&&Fl(n);case 26:case 5:Nu(e,n),t===null&&r&4&&kl(n),r&512&&Sl(n,n.return);break;case 12:Nu(e,n);break;case 31:Nu(e,n),r&4&&Su(e,n);break;case 13:Nu(e,n),r&4&&Cu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=xf.bind(null,n),mm(e,n))));break;case 22:if(r=n.memoizedState!==null||tu,!r){var a=t!==null&&t.memoizedState!==null||nu;t=tu,i=nu,tu=r,(nu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Fu(e,n,r)):Nu(e,n),tu=t,nu=i}break;case 30:Nu(e,n),r&512&&Sl(n,n.return);break;case 7:r&512&&Sl(n,n.return);default:Nu(e,n)}}function mu(e,t){for(e=e.child;e!==null;)hu(e,t),e=e.sibling}function hu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){_f(e,e.return,t)}gu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,zt=!0}catch(t){_f(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Ap(s,!0):Ap(e.stateNode,!1)}catch(t){_f(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&mu(e,t);break;default:mu(e,t)}}function gu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:hu(n,r);break a;case 22:n.memoizedState===null&&gu(n,r);break a;default:gu(n,r)}}e=e.sibling}}function _u(e){var t=e.alternate;t!==null&&(e.alternate=null,_u(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&wt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var vu=null,yu=!1;function bu(e,t,n){for(n=n.child;n!==null;)xu(e,t,n),n=n.sibling}function xu(e,t,n){if(qe&&typeof qe.onCommitFiberUnmount==`function`)try{qe.onCommitFiberUnmount(Ke,n)}catch{}switch(n.tag){case 26:nu||Cl(n,t),bu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!nu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:nu||Cl(n,t),El(n);var r=vu,i=yu;Op(n.type)&&(vu=n.stateNode,yu=!1),bu(e,t,n),Sm(n.stateNode,n.type,n.memoizedProps),vu=r,yu=i;break;case 5:nu||Cl(n,t),El(n);case 6:if(n.tag===6&&El(n),r=vu,i=yu,vu=null,bu(e,t,n),vu=r,yu=i,vu!==null){if(yu)try{(vu.nodeType===9?vu.body:vu.nodeName===`HTML`?vu.ownerDocument.body:vu).removeChild(n.stateNode),zt=!0}catch(e){_f(n,t,e)}else try{vu.removeChild(n.stateNode),zt=!0}catch(e){_f(n,t,e)}}break;case 18:vu!==null&&(yu?(e=vu,kp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Jh(e)):kp(vu,n.stateNode));break;case 4:r=vu,i=yu,vu=n.stateNode.containerInfo,yu=!0,bu(e,t,n),vu=r,yu=i;break;case 0:case 11:case 14:case 15:yl(2,n,t),nu||yl(4,n,t),bu(e,t,n);break;case 1:nu||(Cl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&xl(n,t,r)),bu(e,t,n);break;case 21:bu(e,t,n);break;case 22:nu=(r=nu)||n.memoizedState!==null,bu(e,t,n),nu=r;break;case 30:Cl(n,t),bu(e,t,n);break;case 7:nu||Cl(n,t),bu(e,t,n);break;default:bu(e,t,n)}}function Su(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Jh(e)}catch(e){_f(t,t.return,e)}}}function Cu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Jh(e)}catch(e){_f(t,t.return,e)}}function wu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new au),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new au),t;default:throw Error(i(435,e.tag))}}function Tu(e,t){var n=wu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Sf.bind(null,e,t);t.then(r,r)}})}function Eu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Op(l.type)){vu=l.stateNode,yu=!1;break a}break;case 5:vu=l.stateNode,yu=!1;break a;case 3:case 4:vu=l.stateNode.containerInfo,yu=!0;break a}l=l.return}if(vu===null)throw Error(i(160));xu(s,c,o),vu=null,yu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ou(t,e,n),t=t.sibling}var Du=null;function Ou(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Eu(t,e,n),ku(e),a&4&&(yl(3,e,e.return),vl(3,e),yl(5,e,e.return));break;case 1:Eu(t,e,n),ku(e),a&512&&(nu||r===null||Cl(r,r.return)),a&64&&tu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Du,Eu(t,e,n),ku(e),a&512&&(nu||r===null||Cl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(tu)e.stateNode=vp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[St]||r[gt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),cp(r,t,n),r[gt]=e,kt(r),t=r;break a;case`link`:if(o=Zm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),cp(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Zm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),cp(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[gt]=e,kt(r),t=r}e.stateNode=t}}else tu||Qm(o,e.type,e.stateNode)}else e.stateNode=Km(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Al(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||nu||t.parentNode.removeChild(t)):a.count--,n===null?tu||Qm(o,e.type,e.stateNode):Km(o,n,e.memoizedProps))}break;case 27:Eu(t,e,n),ku(e),a&512&&(nu||r===null||Cl(r,r.return)),r!==null&&a&4&&Al(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=ru,ru=!1,Eu(t,e,n),ru=o,ku(e),a&512&&(nu||r===null||Cl(r,r.return)),e.flags&32){t=e.stateNode;try{rn(t,``),zt=!0}catch(t){_f(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Al(e,t,r===null?t:r.memoizedProps)),a&1024&&(iu=!0);break;case 6:if(Eu(t,e,n),ku(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,zt=!0}catch(t){_f(e,e.return,t)}}break;case 3:if(zt=!1,Xm=null,o=Du,Du=Em(t.containerInfo),Eu(t,e,n),Du=o,ku(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Jh(t.containerInfo)}catch(t){_f(e,e.return,t)}iu&&(iu=!1,Au(e)),zt=!1;break;case 4:a=ru,ru=tu,r=Bt(),o=Du,Du=Em(e.stateNode.containerInfo),Eu(t,e,n),ku(e),Du=o,zt&&cu&&(lu=!0),zt=r,ru=a;break;case 12:Eu(t,e,n),ku(e);break;case 31:Eu(t,e,n),ku(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Tu(e,t)));break;case 13:Eu(t,e,n),ku(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(_d=z()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Tu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=tu,l=nu,u=ru;tu=c||o,ru=u||o,nu=l||s,Eu(t,e,n),nu=l,ru=u,tu=c,ku(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||tu||nu||(t=s||nu,n=tu,r=nu,tu=o||tu,nu=t,Pu(e,2),tu=n,nu=r),!o&&ru||mu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Tu(e,n))));break;case 19:Eu(t,e,n),ku(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Tu(e,t)));break;case 30:a&512&&(nu||r===null||Cl(r,r.return)),a=Bt(),o=cu,s=(n&335544064)===n,c=e.memoizedProps,cu=s&&pi(c.default,c.update)!==`none`,Eu(t,e,n),ku(e),s&&r!==null&&zt&&(e.flags|=4),cu=o,zt=a;break;case 21:break;case 7:a&512&&(nu||r===null||Cl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Eu(t,e,n),ku(e)}}function ku(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(jl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Ol(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Dl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Pl(e,Ml(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(rn(l,``),n.flags&=-33),Pl(e,Ml(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Nl(e,Ml(e),u,s);break;default:throw Error(i(161))}}catch(t){_f(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Au(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Au(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Sh=!0,t.reset(),Sh=!1),e=e.sibling}}function ju(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Mu(t,e),t=t.sibling;else eu(t,!1)}function Mu(e,t){var n=e.alternate;if(n===null)Kl(e,!1);else switch(e.tag){case 3:if(uu=su=!1,Bl(),ju(t,e),!su&&!lu){if(e=zl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Mp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),uu=!0}zl=null;break;case 5:ju(t,e);break;case 4:r=su,su=!1,ju(t,e),su&&(lu=!0),su=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?ju(t,e):Kl(e,!1));break;case 30:r=su,i=Bl(),su=!1,ju(t,e),su&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=di(a,o),o=di(n.memoizedProps,o);var s=pi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Vl=0,t=$l(e,n,t,o,s,a,!0),Vl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Id(e,e.memoizedProps.onUpdate),zl=i):i!==null&&(i.push.apply(i,zl),zl=i),su=e.flags&32?!0:r;break;default:ju(t,e)}}function Nu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)pu(e,t.alternate,t),t=t.sibling}function Pu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:yl(4,n,n.return),Pu(n,r);break;case 1:Cl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&xl(n,n.return,i),Pu(n,r);break;case 27:r&2&&Sm(n.stateNode,n.type,n.memoizedProps);case 5:Cl(n,n.return),n.tag!==5&&n.tag!==27||El(n),Pu(n,r);break;case 6:El(n);break;case 26:Cl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||nu||i.parentNode.removeChild(i),Pu(n,r);break;case 22:n.memoizedState===null&&Pu(n,r);break;case 30:Cl(n,n.return),Pu(n,r);break;case 7:Cl(n,n.return);default:Pu(n,r)}e=e.sibling}}function Fu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Fu(i,a,n),vl(4,a);break;case 1:if(Fu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){_f(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)vo(l[i],c)}catch(e){_f(r,r.return,e)}}s&&o&64&&bl(a),Sl(a,a.return);break;case 27:n&2&&Fl(a);case 5:a.tag!==5&&a.tag!==27||Tl(a),Fu(i,a,n),s&&r===null&&o&4&&kl(a),Sl(a,a.return);break;case 6:Tl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||tu||Qm(Em(c.ownerDocument),a.type,c),Fu(i,a,n),s&&r===null&&o&4&&kl(a),Sl(a,a.return);break;case 12:Fu(i,a,n);break;case 31:Fu(i,a,n),s&&o&4&&Su(i,a);break;case 13:Fu(i,a,n),s&&o&4&&Cu(i,a);break;case 22:a.memoizedState===null&&Fu(i,a,n),Sl(a,a.return);break;case 30:Fu(i,a,n),Sl(a,a.return);break;case 7:Sl(a,a.return);default:Fu(i,a,n)}t=t.sibling}}function Iu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Oa(n))}function Lu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Oa(e))}function Ru(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)zu(e,t,n,r),t=t.sibling;else i&&Ql(t)}function zu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Zl(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Ru(e,t,n,r),a&2048&&vl(9,t);break;case 1:Ru(e,t,n,r);break;case 3:Ru(e,t,n,r),i&&uu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Oa(a)));break;case 12:if(a&2048){Ru(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){_f(t,t.return,e)}}else Ru(e,t,n,r);break;case 31:Ru(e,t,n,r);break;case 13:Ru(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&Zl(t),o._visibility&2?Ru(e,t,n,r):(o._visibility|=2,Bu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&Zl(s),o._visibility&2?Ru(e,t,n,r):Vu(e,t)),a&2048&&Iu(s,t);break;case 24:Ru(e,t,n,r),a&2048&&Lu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Wl(a.child,!0),Wl(t.child,!0))),Ru(e,t,n,r);break;default:Ru(e,t,n,r)}}function Bu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Bu(a,o,s,c,i),vl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Bu(a,o,s,c,i)):u._visibility&2?Bu(a,o,s,c,i):Vu(a,o),i&&l&2048&&Iu(o.alternate,o);break;case 24:Bu(a,o,s,c,i),i&&l&2048&&Lu(o.alternate,o);break;default:Bu(a,o,s,c,i)}t=t.sibling}}function Vu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Vu(n,r),i&2048&&Iu(r.alternate,r);break;case 24:Vu(n,r),i&2048&&Lu(r.alternate,r);break;default:Vu(n,r)}t=t.sibling}}var Hu=8192;function Uu(e,t,n){if(e.subtreeFlags&Hu)for(e=e.child;e!==null;)Wu(e,t,n),e=e.sibling}function Wu(e,t,n){switch(e.tag){case 26:Uu(e,t,n),e.flags&Hu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&rh(n,e)):ih(n,Du,e.memoizedState,e.memoizedProps));break;case 5:Uu(e,t,n),e.flags&Hu&&(e=e.stateNode,(t&335544128)===t&&rh(n,e));break;case 3:case 4:var r=Du;Du=Em(e.stateNode.containerInfo),Uu(e,t,n),Du=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Hu,Hu=16777216,Uu(e,t,n),Hu=r):Uu(e,t,n));break;case 30:if((e.flags&Hu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Ll===null&&(Ll=new Map),Ll.set(r,i)}Uu(e,t,n);break;default:Uu(e,t,n)}}function Gu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ku(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ou=r,Yu(r,e)}Gu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)qu(e),e=e.sibling}function qu(e){switch(e.tag){case 0:case 11:case 15:Ku(e),e.flags&2048&&yl(9,e,e.return);break;case 3:Ku(e);break;case 12:Ku(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ju(e)):Ku(e);break;default:Ku(e)}}function Ju(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ou=r,Yu(r,e)}Gu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:yl(8,t,t.return),Ju(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ju(t));break;default:Ju(t)}e=e.sibling}}function Yu(e,t){for(;ou!==null;){var n=ou;switch(n.tag){case 0:case 11:case 15:yl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Oa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ou=r;else a:for(n=e;ou!==null;){r=ou;var i=r.sibling,a=r.return;if(_u(r),r===n){ou=null;break a}if(i!==null){i.return=a,ou=i;break a}ou=a}}}var Xu={getCacheForType:function(e){var t=ba(Ea),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ba(Ea).controller.signal}},Zu=typeof WeakMap==`function`?WeakMap:Map,Qu=0,$u=null,ed=null,td=0,nd=0,rd=null,id=!1,ad=!1,od=!1,sd=0,cd=0,ld=0,ud=0,dd=0,fd=0,pd=0,md=null,hd=null,gd=!1,_d=0,vd=0,yd=1/0,bd=null,xd=null,Sd=0,Cd=null,wd=null,Td=0,Ed=0,Dd=null,Od=null,kd=null,Ad=null,jd=null,Md=0,Nd=null;function Pd(){return Qu&2&&td!==0?td&-td:I.T===null?pt():Rf()}function Fd(){if(fd===0){if(!(td&536870912)||$i){var e=et;et<<=1,!(et&3932160)&&(et=262144),fd=e}else fd=536870912}return e=To.current,e!==null&&(e.flags|=32),fd}function Id(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Bp(di(e.memoizedProps,n))),Ad===null&&(Ad=[]),Ad.push(t.bind(null,r))}}function Ld(e,t,n){(e===$u&&(nd===2||nd===9)||e.cancelPendingCommit!==null)&&(Wd(e,0),Vd(e,td,fd,!1)),ot(e,n),Qu&2&&e===$u||(e===$u&&(!(Qu&2)&&(ud|=n),cd===4&&Vd(e,td,fd,!1)),Af(e))}function Rd(e,t,n){if(Qu&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||rt(e,t),a=r?Qd(e,t):Xd(e,t,!0),o=r;do{if(a===0){ad&&!r&&Vd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Bd(n))a=Xd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=md;var l=c.current.memoizedState.isDehydrated;if(l&&(Wd(c,s).flags|=256),s=Xd(c,s,!1),s!==2&&s!==6){if(od&&!l){c.errorRecoveryDisabledLanes|=o,ud|=o,a=4;break a}o=hd,hd=a,o!==null&&(hd===null?hd=o:hd.push.apply(hd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Wd(e,0),Vd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Vd(r,t,fd,!id);break a;case 2:hd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=_d+300-z(),10<a)){if(Vd(r,t,fd,!id),nt(r,0,!0)!==0)break a;Td=t,r.timeoutHandle=Sp(zd.bind(null,r,n,hd,bd,gd,t,fd,ud,pd,id,o,`Throttled`,-0,0),a);break a}zd(r,n,hd,bd,gd,t,fd,ud,pd,id,o,null,-0,0)}break}}while(1);Af(e)}function zd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:fn},Ll=null,Wu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=ch.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?_d-z():(a&4194048)===a?vd-z():0,m=oh(d,m),m!==null)?(Td=a,e.cancelPendingCommit=m(of.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Vd(e,a,o,!l)):of(e,t,a,n,r,i,o,s,c,l,u,d)}function Bd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Fr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Vd(e,t,n,r){t=V(e,t),t&=~dd,t&=~ud,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ye(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ct(e,n,t)}function Hd(){return Qu&6?!0:(jf(0,!1),!1)}function Ud(){if(ed!==null){if(nd===0)var e=ed.return;else e=ed,fa=da=null,es(e),eo=null,to=0,e=ed;for(;e!==null;)_l(e.alternate,e),e=e.return;ed=null}}function Wd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,Cp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Td=0,Ud(),$u=e,ed=n=Oi(e.current,null),td=t,nd=0,rd=null,id=!1,ad=rt(e,t),od=!1,pd=fd=dd=ud=ld=cd=0,hd=md=null,gd=!1,sd=V(e,t),vi(),n}function Gd(e,t){G=null,I.H=uc,t===Wa||t===Ka?(t=Qa(),nd=3):t===Ga?(t=Qa(),nd=4):nd=t===Oc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,rd=t,ed===null&&(cd=1,Sc(e,Ii(t,e.current)))}function Kd(){var e=To.current;return e===null?!0:(td&4194048)===td?Eo===null:(td&62914560)===td||td&536870912?e===Eo:!1}function qd(){var e=I.H;return I.H=uc,e===null?uc:e}function Jd(){var e=I.A;return I.A=Xu,e}function Yd(){cd=4,id||(td&4194048)!==td&&To.current!==null||(ad=!0),!(ld&134217727)&&!(ud&134217727)||$u===null||Vd($u,td,fd,!1)}function Xd(e,t,n){var r=Qu;Qu|=2;var i=qd(),a=Jd();($u!==e||td!==t)&&(bd=null,Wd(e,t)),t=!1;var o=cd;a:do try{if(nd!==0&&ed!==null){var s=ed,c=rd;switch(nd){case 8:Ud(),o=6;break a;case 3:case 2:case 9:case 6:To.current===null&&(t=!0);var l=nd;if(nd=0,rd=null,nf(e,s,c,l),n&&ad){o=0;break a}break;default:l=nd,nd=0,rd=null,nf(e,s,c,l)}}Zd(),o=cd;break}catch(t){Gd(e,t)}while(1);return t&&e.shellSuspendCounter++,fa=da=null,Qu=r,I.H=i,I.A=a,ed===null&&($u=null,td=0,vi()),o}function Zd(){for(;ed!==null;)ef(ed)}function Qd(e,t){var n=Qu;Qu|=2;var r=qd(),a=Jd();$u!==e||td!==t?(bd=null,yd=z()+500,Wd(e,t)):ad=rt(e,t);a:do try{if(nd!==0&&ed!==null){t=ed;var o=rd;b:switch(nd){case 1:nd=0,rd=null,nf(e,t,o,1);break;case 2:case 9:if(Ja(o)){nd=0,rd=null,tf(t);break}t=function(){nd!==2&&nd!==9||$u!==e||(nd=7),Af(e)},o.then(t,t);break a;case 3:nd=7;break a;case 4:nd=5;break a;case 7:Ja(o)?(nd=0,rd=null,tf(t)):(nd=0,rd=null,nf(e,t,o,7));break;case 5:var s=null;switch(ed.tag){case 26:s=ed.memoizedState;case 5:case 27:var c=ed;if(s?th(s):c.stateNode.complete){nd=0,rd=null;var l=c.sibling;if(l!==null)ed=l;else{var u=c.return;u===null?ed=null:(ed=u,rf(u))}break b}}nd=0,rd=null,nf(e,t,o,5);break;case 6:nd=0,rd=null,nf(e,t,o,6);break;case 8:Ud(),cd=6;break a;default:throw Error(i(462))}}$d();break}catch(t){Gd(e,t)}while(1);return fa=da=null,I.H=r,I.A=a,Qu=n,ed===null?($u=null,td=0,vi(),cd):0}function $d(){for(;ed!==null&&!Ie();)ef(ed)}function ef(e){var t=cl(e.alternate,e,sd);e.memoizedProps=e.pendingProps,t===null?rf(e):ed=t}function tf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Hc(n,t,t.pendingProps,t.type,void 0,td);break;case 11:t=Hc(n,t,t.pendingProps,t.type.render,t.ref,td);break;case 5:es(t);var r=t;r===Zi&&($i?(aa(r),r.tag===5&&r.stateNode!=null&&(Qi=r.stateNode)):(aa(r),$i=!0));default:_l(n,t),t=ed=ki(t,sd),t=cl(n,t,sd)}e.memoizedProps=e.pendingProps,t===null?rf(e):ed=t}function nf(e,t,n,r){fa=da=null,es(t),eo=null,to=0;var i=t.return;try{if(Dc(e,i,t,n,td)){cd=1,Sc(e,Ii(n,e.current)),ed=null;return}}catch(t){if(i!==null)throw ed=i,t;cd=1,Sc(e,Ii(n,e.current)),ed=null;return}t.flags&32768?($i||r===1?e=!0:ad||td&536870912?e=!1:(id=e=!0,(r===2||r===9||r===3||r===6)&&(r=To.current,r!==null&&r.tag===13&&(r.flags|=16384))),af(t,e)):rf(t)}function rf(e){var t=e;do{if(t.flags&32768){af(t,id);return}e=t.return;var n=hl(t.alternate,t,sd);if(n!==null){ed=n;return}if(t=t.sibling,t!==null){ed=t;return}ed=t=e}while(t!==null);cd===0&&(cd=5)}function af(e,t){do{var n=gl(e.alternate,e);if(n!==null){n.flags&=32767,ed=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ed=e;return}ed=e=n}while(e!==null);cd=6,ed=null}function of(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do mf();while(Sd!==0);if(Qu&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===$u&&(ed=$u=null,td=0),wd=t,Cd=e,Td=n,Dd=a,Od=r,sf(e,t,n,s,c,l,f)}}function sf(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Ed=s,s|=_i,st(e,n,s,r,i,a),Ad=null,(n&335544064)===n?(jd=ja(e),r=10262):(jd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Cf(Ve,function(){return hf(),null})):(e.callbackNode=null,e.callbackPriority=0),Il=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=I.T,I.T=null,i=pe.p,pe.p=2,a=Qu,Qu|=4;try{du(e,t,n)}finally{Qu=a,pe.p=i,I.T=r}}Sd=1,Il?kd=Rp(o,e.containerInfo,jd,uf,df,lf,ff,hf,cf,null,null):(uf(),df(),ff())}function cf(e){if(Sd!==0){var t=Cd.onRecoverableError;t(e,{componentStack:null})}}function lf(){Sd===3&&(Sd=0,Mu(wd,Cd),Sd=4)}function uf(){if(Sd===1){Sd=0;var e=Cd,t=wd,n=Td,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=I.T,I.T=null;var i=pe.p;pe.p=2;var a=Qu;Qu|=4;try{cu=lu=!1,Ou(t,e,n),n=mp;var o=Vr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Br(s.ownerDocument.documentElement,s)){if(c!==null&&Hr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=zr(s,h),v=zr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}Sh=!!pp,mp=pp=null}finally{Qu=a,pe.p=i,I.T=r}}e.current=t,Sd=2}}function df(){if(Sd===2){Sd=0;var e=Cd,t=wd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=I.T,I.T=null;var r=pe.p;pe.p=2;var i=Qu;Qu|=4;try{pu(e,t.alternate,t)}finally{Qu=i,pe.p=r,I.T=n}}Sd=3}}function ff(){if(Sd===4||Sd===3){Sd=0;var e=kd;kd=null,Le();var t=Cd,n=wd,r=Td,i=Od,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Sd=5:(Sd=0,wd=Cd=null,pf(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(xd=null),ft(r),n=n.stateNode,qe&&typeof qe.onCommitFiberRoot==`function`)try{qe.onCommitFiberRoot(Ke,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=I.T,a=pe.p,pe.p=2,I.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{I.T=n,pe.p=a}}if(i=Ad,o=jd,jd=null,i!==null&&(Ad=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Td&3&&mf(),Af(t),a=t.pendingLanes,r&261930&&a&42?t===Nd?Md++:(Md=0,Nd=t):(Md=0,Nd=null),jf(0,!1)}}function pf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Oa(t)))}function mf(){return kd!==null&&(kd.skipTransition(),kd=null),uf(),df(),ff(),hf()}function hf(){if(Sd!==5)return!1;var e=Cd,t=Ed;Ed=0;var n=ft(Td),r=I.T,a=pe.p;try{pe.p=32>n?32:n,I.T=null,n=Dd,Dd=null;var o=Cd,s=Td;if(Sd=0,wd=Cd=null,Td=0,Qu&6)throw Error(i(331));var c=Qu;if(Qu|=4,qu(o.current),zu(o,o.current,s,n),Qu=c,jf(0,!1),qe&&typeof qe.onPostCommitFiberRoot==`function`)try{qe.onPostCommitFiberRoot(Ke,o)}catch{}return!0}finally{pe.p=a,I.T=r,pf(e,t)}}function gf(e,t,n){t=Ii(n,t),t=wc(e.stateNode,t,2),e=po(e,t,2),e!==null&&(ot(e,2),Af(e))}function _f(e,t,n){if(e.tag===3)gf(e,e,n);else for(;t!==null;){if(t.tag===3){gf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(xd===null||!xd.has(r))){e=Ii(n,e),n=Tc(2),r=po(t,n,2),r!==null&&(Ec(n,r,t,e),ot(r,2),Af(r));break}}t=t.return}}function vf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Zu;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(od=!0,i.add(n),e=yf.bind(null,e,t,n),t.then(e,e))}function yf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,$u===e&&(td&n)===n&&(cd===4||cd===3&&(td&62914560)===td&&300>z()-_d?Qu&2?dd|=n:Wd(e,0):dd|=n,pd===td&&(pd=0)),Af(e)}function bf(e,t){t===0&&(t=it()),e=xi(e,t),e!==null&&(ot(e,t),Af(e))}function xf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),bf(e,n)}function Sf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),bf(e,n)}function Cf(e,t){return Pe(e,t)}var wf=null,Tf=null,Ef=!1,Df=!1,Of=!1,kf=0;function Af(e){e!==Tf&&e.next===null&&(Tf===null?wf=Tf=e:Tf=Tf.next=e),Df=!0,Ef||(Ef=!0,Lf())}function jf(e,t){if(!Of&&Df){Of=!0;do for(var n=!1,r=wf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ye(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,If(r,a))}else a=td,a=nt(r,r===$u?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||rt(r,a)||(n=!0,If(r,a))}r=r.next}while(n);Of=!1}}function Mf(){Nf()}function Nf(){Df=Ef=!1;var e=0;kf!==0&&xp()&&(e=kf);for(var t=z(),n=null,r=wf;r!==null;){var i=r.next,a=Pf(r,t);a===0?(r.next=null,n===null?wf=i:n.next=i,i===null&&(Tf=n)):(n=r,(e!==0||a&3)&&(Df=!0)),r=i}Sd!==0&&Sd!==5||jf(e,!1),kf!==0&&(kf=0)}function Pf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ye(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=H(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=$u,n=td,n=nt(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(nd===2||nd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Fe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||rt(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Fe(r),ft(n)){case 2:case 8:n=Be;break;case 32:n=Ve;break;case 268435456:n=Ue;break;default:n=Ve}return r=Ff.bind(null,e),n=Pe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Fe(r),e.callbackPriority=2,e.callbackNode=null,2}function Ff(e,t){if(Sd!==0&&Sd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(mf()&&e.callbackNode!==n)return null;var r=td;return r=nt(e,e===$u?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Rd(e,r,t),Pf(e,z()),e.callbackNode!=null&&e.callbackNode===n?Ff.bind(null,e):null)}function If(e,t){if(mf())return null;Rd(e,t,!0)}function Lf(){Ep(function(){Qu&6?Pe(ze,Mf):Nf()})}function Rf(){if(kf===0){var e=Pa;e===0&&(e=$e,$e<<=1,!($e&261888)&&($e=256)),kf=e}return kf}function zf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:dn(e)}function Bf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=zf((i[_t]||null).action),o=r.submitter;o&&(t=(t=o[_t]||null)?zf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Nn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(kf!==0){var e=new FormData(i,o);Xs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Xs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Vf=0;Vf<ci.length;Vf++){var Hf=ci[Vf];li(Hf.toLowerCase(),`on`+(Hf[0].toUpperCase()+Hf.slice(1)))}li(ei,`onAnimationEnd`),li(ti,`onAnimationIteration`),li(ni,`onAnimationStart`),li(`dblclick`,`onDoubleClick`),li(`focusin`,`onFocus`),li(`focusout`,`onBlur`),li(ri,`onTransitionRun`),li(ii,`onTransitionStart`),li(ai,`onTransitionCancel`),li(oi,`onTransitionEnd`),Pt(`onMouseEnter`,[`mouseout`,`mouseover`]),Pt(`onMouseLeave`,[`mouseout`,`mouseover`]),Pt(`onPointerEnter`,[`pointerout`,`pointerover`]),Pt(`onPointerLeave`,[`pointerout`,`pointerover`]),Nt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Nt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Nt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Nt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Nt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Nt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Uf=`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(` `),Wf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Uf));function Gf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){mi(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){mi(e)}i.currentTarget=null,a=c}}}}function Kf(e,t){var n=t[yt];n===void 0&&(n=t[yt]=new Set);var r=e+`__bubble`;n.has(r)||(Xf(t,e,2,!1),n.add(r))}function qf(e,t,n){var r=0;t&&(r|=4),Xf(n,e,r,t)}var Jf=`_reactListening`+Math.random().toString(36).slice(2);function Yf(e){if(!e[Jf]){e[Jf]=!0,jt.forEach(function(t){t!==`selectionchange`&&(Wf.has(t)||qf(t,!1,e),qf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Jf]||(t[Jf]=!0,qf(`selectionchange`,!1,t))}}function Xf(e,t,n,r){switch(kh(t)){case 2:var i=Ch;break;case 8:i=wh;break;default:i=Th}n=i.bind(null,t,n,e),i=void 0,!Sn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Zf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Tt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}yn(function(){var r=a,i=mn(n),s=[];a:{var c=si.get(e);if(c!==void 0){var l=Nn,u=e;switch(e){case`keypress`:if(On(n)===0)break a;case`keydown`:case`keyup`:l=Zn;break;case`focusin`:u=`focus`,l=Hn;break;case`focusout`:u=`blur`,l=Hn;break;case`beforeblur`:case`afterblur`:l=Hn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Bn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Vn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=er;break;case ei:case ti:case ni:l=Un;break;case oi:l=tr;break;case`scroll`:case`scrollend`:l=Fn;break;case`wheel`:l=nr;break;case`copy`:case`cut`:case`paste`:l=Wn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Qn;break;case`submit`:l=$n;break;case`toggle`:case`beforetoggle`:l=rr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=bn(m,p),g!=null&&d.push(Qf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==pn&&(u=n.relatedTarget||n.fromElement)&&(Tt(u)||u[vt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Tt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Bn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Qn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Dt(c),h=l==null?u:Dt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,Tt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?w(c,l,ep):null,c!==null&&tp(s,u,c,d,!1),l!==null&&f!==null&&tp(s,f,l,d,!0)))}a:{if(c=r?Dt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Cr;else if(_r(c)){if(wr)_=Nr;else{_=jr;var v=Ar}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&cn(r.elementType)&&(_=Cr):_=Mr;if(_&&=_(e,r)){vr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Dt(r):window,e){case`focusin`:(_r(v)||v.contentEditable===`true`)&&(Wr=v,Gr=r,Kr=null);break;case`focusout`:Kr=Gr=Wr=null;break;case`mousedown`:qr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:qr=!1,Jr(s,n,i);break;case`selectionchange`:if(Ur)break;case`keydown`:case`keyup`:Jr(s,n,i)}var y;if(ar)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else pr?dr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(cr&&n.locale!==`ko`&&(pr||b!==`onCompositionStart`?b===`onCompositionEnd`&&pr&&(y=Dn()):(wn=i,Tn=`value`in wn?wn.value:wn.textContent,pr=!0)),v=$f(r,b),0<v.length&&(b=new Gn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=fr(n),y!==null&&(b.data=y)))),(y=sr?mr(e,n):hr(e,n))&&(b=$f(r,`onBeforeInput`),0<b.length&&(v=new Gn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Bf(s,e,r,n,i)}Gf(s,t)})}function Qf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function $f(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=bn(e,n),i!=null&&r.unshift(Qf(e,i,a)),i=bn(e,t),i!=null&&r.push(Qf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function ep(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function tp(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=bn(n,a),l!=null&&o.unshift(Qf(n,l,c))):i||(l=bn(n,a),l!=null&&o.push(Qf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var np=/\r\n?/g,rp=/\u0000|\uFFFD/g;function ip(e){return(typeof e==`string`?e:``+e).replace(np,`
|
|
49
|
-
`).replace(rp,``)}function ap(e,t){return t=ip(t),ip(e)===t}function op(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||rn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&rn(e,``+r);else return;break;case`className`:Ht(e,`class`,r);break;case`tabIndex`:Ht(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ht(e,n,r);break;case`style`:sn(e,r,o);return;case`data`:if(t!==`object`){Ht(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=dn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&op(e,t,`name`,a.name,a,null),op(e,t,`formEncType`,a.formEncType,a,null),op(e,t,`formMethod`,a.formMethod,a,null),op(e,t,`formTarget`,a.formTarget,a,null)):(op(e,t,`encType`,a.encType,a,null),op(e,t,`method`,a.method,a,null),op(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=dn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=fn);return;case`onScroll`:r!=null&&Kf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Kf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=dn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Kf(`beforetoggle`,e),Kf(`toggle`,e),Vt(e,`popover`,r);break;case`xlinkActuate`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Vt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=ln.get(n)||n,Vt(e,n,r);else return}zt=!0}function sp(e,t,n,r,a,o){switch(n){case`style`:sn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)rn(e,r);else if(typeof r==`number`||typeof r==`bigint`)rn(e,``+r);else return;break;case`onScroll`:r!=null&&Kf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Kf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=fn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Mt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[_t]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}zt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Vt(e,n,r)}return}zt=!0}function cp(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Kf(`error`,e),Kf(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:op(e,t,o,s,n,null)}}a&&op(e,t,`srcSet`,n.srcSet,n,null),r&&op(e,t,`src`,n.src,n,null);return;case`input`:Kf(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:op(e,t,r,d,n,null)}}Qt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Kf(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:op(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&en(e,!!r,n,!0):en(e,!!r,t,!1);return;case`textarea`:for(s in Kf(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:op(e,t,s,c,n,null)}nn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:op(e,t,l,r,n,null)}return;case`dialog`:Kf(`beforetoggle`,e),Kf(`toggle`,e),Kf(`cancel`,e),Kf(`close`,e);break;case`iframe`:case`object`:Kf(`load`,e);break;case`video`:case`audio`:for(r=0;r<Uf.length;r++)Kf(Uf[r],e);break;case`image`:Kf(`error`,e),Kf(`load`,e);break;case`details`:Kf(`toggle`,e);break;case`embed`:case`source`:case`link`:Kf(`error`,e),Kf(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:op(e,t,u,r,n,null)}return;default:if(cn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&sp(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&op(e,t,c,r,n,null))}var lp={};function up(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||op(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(zt=!0),o=m;break;case`name`:m!==f&&(zt=!0),a=m;break;case`checked`:m!==f&&(zt=!0),u=m;break;case`defaultChecked`:m!==f&&(zt=!0),d=m;break;case`value`:m!==f&&(zt=!0),s=m;break;case`defaultValue`:m!==f&&(zt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&op(e,t,p,m,r,f)}}Zt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||op(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(zt=!0),p=o;break;case`defaultValue`:o!==l&&(zt=!0),c=o;break;case`multiple`:o!==l&&(zt=!0),s=o;default:o!==l&&op(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?en(e,!!n,n?[]:``,!1):en(e,!!n,t,!0)):en(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:op(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(zt=!0),p=a;break;case`defaultValue`:a!==o&&(zt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&op(e,t,s,a,r,o)}tn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:op(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(zt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:op(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&op(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:op(e,t,u,p,r,m)}return;default:if(cn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&sp(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||sp(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&op(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||op(e,t,f,p,r,m)}function dp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function fp(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&dp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&dp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var pp=null,mp=null;function hp(e){return e.nodeType===9?e:e.ownerDocument}function gp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function _p(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function vp(e,t,n,r){return n=hp(n).createElement(e),n[gt]=r,n[_t]=t,cp(n,e,t),kt(n),n}function yp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var bp=null;function xp(){var e=window.event;return e&&e.type===`popstate`?e!==bp&&(bp=e,!0):(bp=null,!1)}var Sp=typeof setTimeout==`function`?setTimeout:void 0,Cp=typeof clearTimeout==`function`?clearTimeout:void 0,wp=typeof Promise==`function`?Promise:void 0,Tp=typeof requestAnimationFrame==`function`?requestAnimationFrame:Sp,Ep=typeof queueMicrotask==`function`?queueMicrotask:wp===void 0?Sp:function(e){return wp.resolve(null).then(e).catch(Dp)};function Dp(e){setTimeout(function(){throw e})}function Op(e){return e===`head`}function kp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Jh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Cm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Cm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[St]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Cm(e.ownerDocument.body)}n=i}while(n);Jh(t)}function Ap(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function jp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Mp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Np(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Pp(e){return Np(e.getBoundingClientRect(),getComputedStyle(e),e)}function Fp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Np(t,n,e)}function Ip(e){return e.documentElement.clientHeight}function Lp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Rp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Ip(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=nh(f),u>ah){s.length=o;break}f=new Promise(Lp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function zp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}zp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:T({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},zp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},zp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Bp(e){return{name:e,group:new zp(`group`,e),imagePair:new zp(`image-pair`,e),old:new zp(`old`,e),new:new zp(`new`,e)}}function Vp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Vp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Kp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Wp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),p(this._fragmentFiber.child,!1,Hp,e,s,r)}this._eventListeners=a}};function Hp(e,t,n,r){return v(e).addEventListener(t,n,r),!1}Vp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Kp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Wp(i.optionsOrUseCapture),p(this._fragmentFiber.child,!1,Up,e,n,i),r.splice(t,1),a!==null&&a()}};function Up(e,t,n,r){return v(e).removeEventListener(t,n,r),!1}function Wp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Gp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Kp(e,t,n,r){if(e.length===0)return-1;r=Gp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Gp(a.optionsOrUseCapture)===r)return i}return-1}Vp.prototype.dispatchEvent=function(e){var t=m(this._fragmentFiber);if(t===null)return!0;t=v(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Wp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Wp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Vp.prototype.focus=function(e){p(this._fragmentFiber.child,!0,qp,e,void 0,void 0)};function qp(e,t){return e.tag!==6&&(e=v(e),ym(e,t))}Vp.prototype.focusLast=function(e){var t=[];p(this._fragmentFiber.child,!0,Jp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!qp(t[n],e);n--);};function Jp(e,t){return t.push(e),!1}Vp.prototype.blur=function(){var e=m(this._fragmentFiber);e!==null&&(e=v(e),e=hp(e).activeElement,e!==null&&p(this._fragmentFiber.child,!1,Yp,e,void 0,void 0))};function Yp(e,t){return e.tag!==6&&(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Vp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),p(this._fragmentFiber.child,!1,Xp,e,void 0,void 0)};function Xp(e,t){return e.tag===6||(e=v(e),t.observe(e)),!1}Vp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),p(this._fragmentFiber.child,!1,Zp,e,void 0,void 0);for(var n=t=0;n<Qp.length;n++){var r=Qp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Qp[t++]=r}Qp.length=t}};function Zp(e,t){return e.tag===6||(e=v(e),t.unobserve(e)),!1}var Qp=[],$p=!1;function em(e,t,n){Qp.push({fragmentInstance:e,observer:t,instance:n}),$p||($p=!0,bm(function(){$p=!1;var e=Qp;Qp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Vp.prototype.getClientRects=function(){var e=[];return p(this._fragmentFiber.child,!1,tm,e,void 0,void 0),e};function tm(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=v(e),t.push.apply(t,e.getClientRects());return!1}Vp.prototype.getRootNode=function(e){var t=m(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},Vp.prototype.compareDocumentPosition=function(e){var t=m(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];p(this._fragmentFiber.child,!1,Jp,n,void 0,void 0);var r=v(t);if(n.length===0){if(n=r,h(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=g(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=v(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=v(n[0]),i=v(n[n.length-1]);var a=h(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||nm(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function nm(e,t,n,r,i){var a=Tt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=m(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=w(n,a,C),t===null?t=!1:(p(t,!0,x,a,n),a=y,y=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=w(r,a,C),t===null?t=!1:(p(t,!0,S,a,r),a=y,b=y=null,t=a!==null)),t):!1}function rm(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Vp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];p(this._fragmentFiber.child,!1,Jp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=g(this._fragmentFiber);if(r=n?r[1]||r[0]||m(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=v(r),rm(e,n);return}if(r=v(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=v(a),rm(a,n)):v(a).scrollIntoView(e),r+=n?-1:1}};function im(e,t){return e=v(e),am(e,t),!1}function am(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function om(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Wp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Qp.length;i++){var a=Qp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Qp[r++]=a)}Qp.length=r,n.observe(e)}),am(e,t))}function sm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Wp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?em(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function cm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:cm(n),wt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function lm(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[St])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=hm(e.nextSibling),e===null)break}return null}function um(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=hm(e.nextSibling),e===null))return null;return e}function dm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=hm(e.nextSibling),e===null))return null;return e}function fm(e){return e.data===`$?`||e.data===`$~`}function pm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function mm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function hm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var gm=null;function _m(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return hm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function vm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ym(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function bm(e){Tp(function(){Tp(function(t){return e(t)})})}function xm(e,t,n){switch(t=hp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Sm(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&op(e,t,r,null,lp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===fn&&(e.onclick=null),wt(e)}function Cm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);wt(e)}var wm=new Map,Tm=new Set;function Em(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Dm=pe.d;pe.d={f:Om,r:km,D:Mm,C:Nm,L:Pm,m:Fm,X:Lm,S:Im,M:Rm};function Om(){var e=Dm.f(),t=Hd();return e||t}function km(e){var t=Et(e);t!==null&&t.tag===5&&t.type===`form`?Qs(t):Dm.r(e)}var Am=typeof document>`u`?null:document;function jm(e,t,n){var r=Am;if(r&&typeof t==`string`&&t){var i=Xt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Tm.has(i)||(Tm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),cp(t,`link`,e),kt(t),r.head.appendChild(t)))}}function Mm(e){Dm.D(e),jm(`dns-prefetch`,e,null)}function Nm(e,t){Dm.C(e,t),jm(`preconnect`,e,t)}function Pm(e,t,n){Dm.L(e,t,n);var r=Am;if(r&&e&&t){var i=`link[rel="preload"][as="`+Xt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Xt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Xt(n.imageSizes)+`"]`)):i+=`[href="`+Xt(e)+`"]`;var a=i;switch(t){case`style`:a=Bm(e);break;case`script`:a=Wm(e)}if(!(wm.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),wm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Vm(a))||t===`script`&&r.querySelector(Gm(a))))){var o=r.createElement(`link`);cp(o,`link`,e),t===`style`&&(o[Ct]=!0,o.onload=o.onerror=function(){At(o)}),kt(o),r.head.appendChild(o)}}}function Fm(e,t){Dm.m(e,t);var n=Am;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Xt(r)+`"][href="`+Xt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Wm(e)}if(!wm.has(a)&&(e=T({rel:`modulepreload`,href:e},t),wm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Gm(a)))return}r=n.createElement(`link`),cp(r,`link`,e),kt(r),n.head.appendChild(r)}}}function Im(e,t,n){Dm.S(e,t,n);var r=Am;if(r&&e){var i=Ot(r).hoistableStyles,a=Bm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Vm(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=wm.get(a))&&Jm(e,n);var c=o=r.createElement(`link`);kt(c),cp(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,qm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Lm(e,t){Dm.X(e,t);var n=Am;if(n&&e){var r=Ot(n).hoistableScripts,i=Wm(e),a=r.get(i);a||(a=n.querySelector(Gm(i)),a||(e=T({src:e,async:!0},t),(t=wm.get(i))&&Ym(e,t),a=n.createElement(`script`),kt(a),cp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rm(e,t){Dm.M(e,t);var n=Am;if(n&&e){var r=Ot(n).hoistableScripts,i=Wm(e),a=r.get(i);a||(a=n.querySelector(Gm(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=wm.get(i))&&Ym(e,t),a=n.createElement(`script`),kt(a),cp(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zm(e,t,n,r){var a=(a=xe.current)?Em(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Bm(n.href),t=Ot(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Bm(n.href);var o=Ot(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Vm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=wm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},wm.set(e,o)),Um(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Wm(n),t=Ot(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Bm(e){return`href="`+Xt(e)+`"`}function Vm(e){return`link[rel="stylesheet"][`+e+`]`}function Hm(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Um(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Ct]){r.loading=1;return}}else t=e.createElement(`link`),t[Ct]=!0,t.onload=t.onerror=At.bind(null,t),cp(t,`link`,n),kt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Wm(e){return`[src="`+Xt(e)+`"]`}function Gm(e){return`script[async]`+e}function Km(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Xt(n.href)+`"]`);if(r)return t.instance=r,kt(r),r;var a=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),kt(r),cp(r,`style`,a),qm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Bm(n.href);var o=e.querySelector(Vm(a));if(o)return t.state.loading|=4,t.instance=o,kt(o),o;r=Hm(n),(a=wm.get(a))&&Jm(r,a),o=(e.ownerDocument||e).createElement(`link`),kt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),cp(o,`link`,r),t.state.loading|=4,qm(o,n.precedence,e),t.instance=o;case`script`:return o=Wm(n.src),(a=e.querySelector(Gm(o)))?(t.instance=a,kt(a),a):(r=n,(a=wm.get(o))&&(r=T({},n),Ym(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),kt(a),cp(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,qm(r,n.precedence,e));return t.instance}function qm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Jm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Ym(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Xm=null;function Zm(e,t,n){if(Xm===null){var r=new Map,i=Xm=new Map;i.set(n,r)}else i=Xm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[St]||a[gt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Qm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function $m(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function eh(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function th(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function nh(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function rh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=nh(t),e.suspenseyImages.push(t)),e=lh.bind(e),t.decode().then(e,e))}function ih(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Bm(r.href),a=t.querySelector(Vm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ch.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,kt(a);return}a=t.ownerDocument||t,r=Hm(r),(i=wm.get(i))&&Jm(r,i),a=a.createElement(`link`),kt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),cp(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ch.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ah=0;function oh(e,t){return e.stylesheets&&e.count===0&&dh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&dh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ah===0&&(ah=62500*fp());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&dh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ah?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function sh(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)dh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ch(){this.count--,sh(this)}function lh(){this.imgCount--,sh(this)}var uh=null;function dh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,uh=new Map,t.forEach(fh,e),uh=null,ch.call(e))}function fh(e,t){if(!(t.state.loading&4)){var n=uh.get(e);if(n)var r=n.get(null);else{n=new Map,uh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ch.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var ph={$$typeof:N,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function mh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=at(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=at(0),this.hiddenUpdates=at(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function hh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new mh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Ei(3,null,null,t),e.current=a,a.stateNode=e,t=Da(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},lo(a),e}function gh(e){return e?(e=wi,e):wi}function _h(e,t,n,r,i,a){i=gh(i),r.context===null?r.context=i:r.pendingContext=i,r=fo(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=po(e,r,t),n!==null&&(Ld(n,e,t),W(n,e,t))}function vh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function yh(e,t){vh(e,t),(e=e.alternate)&&vh(e,t)}function bh(e){if(e.tag===13||e.tag===31){var t=xi(e,67108864);t!==null&&Ld(t,e,67108864),yh(e,67108864)}}function xh(e){if(e.tag===13||e.tag===31){var t=Pd();t=dt(t);var n=xi(e,t);n!==null&&Ld(n,e,t),yh(e,t)}}var Sh=!0;function Ch(e,t,n,r){var i=I.T;I.T=null;var a=pe.p;try{pe.p=2,Th(e,t,n,r)}finally{pe.p=a,I.T=i}}function wh(e,t,n,r){var i=I.T;I.T=null;var a=pe.p;try{pe.p=8,Th(e,t,n,r)}finally{pe.p=a,I.T=i}}function Th(e,t,n,r){if(Sh){var i=Eh(r);if(i===null)Zf(e,t,r,Dh,n),Rh(e,r);else if(Bh(i,e,t,n,r))r.stopPropagation();else if(Rh(e,r),t&4&&-1<Lh.indexOf(e)){for(;i!==null;){var a=Et(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=B(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ye(o);s.entanglements[1]|=c,o&=~c}Af(a),!(Qu&6)&&(yd=z()+500,jf(0,!1))}}break;case 31:case 13:s=xi(a,2),s!==null&&Ld(s,a,2),Hd(),yh(a,2)}if(a=Eh(r),a===null&&Zf(e,t,r,Dh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Zf(e,t,r,null,n)}}function Eh(e){return e=mn(e),Oh(e)}var Dh=null;function Oh(e){if(Dh=null,e=Tt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Dh=e,null}function kh(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Re()){case ze:return 2;case Be:return 8;case Ve:case He:return 32;case Ue:return 268435456;default:return 32}default:return 32}}var Ah=!1,jh=null,Mh=null,Nh=null,Ph=new Map,Fh=new Map,Ih=[],Lh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Rh(e,t){switch(e){case`focusin`:case`focusout`:jh=null;break;case`dragenter`:case`dragleave`:Mh=null;break;case`mouseover`:case`mouseout`:Nh=null;break;case`pointerover`:case`pointerout`:Ph.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Fh.delete(t.pointerId)}}function zh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Et(t),t!==null&&bh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Bh(e,t,n,r,i){switch(t){case`focusin`:return jh=zh(jh,e,t,n,r,i),!0;case`dragenter`:return Mh=zh(Mh,e,t,n,r,i),!0;case`mouseover`:return Nh=zh(Nh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Ph.set(a,zh(Ph.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Fh.set(a,zh(Fh.get(a)||null,e,t,n,r,i)),!0}return!1}function Vh(e){var t=Tt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,mt(e.priority,function(){xh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,mt(e.priority,function(){xh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Hh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Eh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);pn=r,n.target.dispatchEvent(r),pn=null}else return t=Et(n),t!==null&&bh(t),e.blockedOn=n,!1;t.shift()}return!0}function Uh(e,t,n){Hh(e)&&n.delete(t)}function Wh(){Ah=!1,jh!==null&&Hh(jh)&&(jh=null),Mh!==null&&Hh(Mh)&&(Mh=null),Nh!==null&&Hh(Nh)&&(Nh=null),Ph.forEach(Uh),Fh.forEach(Uh)}function Gh(e,n){e.blockedOn===n&&(e.blockedOn=null,Ah||(Ah=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Wh)))}var Kh=null;function qh(e){Kh!==e&&(Kh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Kh===e&&(Kh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Oh(r||n)===null)continue;break}var a=Et(n);a!==null&&(e.splice(t,3),t-=3,Xs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Jh(e){function t(t){return Gh(t,e)}jh!==null&&Gh(jh,e),Mh!==null&&Gh(Mh,e),Nh!==null&&Gh(Nh,e),Ph.forEach(t),Fh.forEach(t);for(var n=0;n<Ih.length;n++){var r=Ih[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ih.length&&(n=Ih[0],n.blockedOn===null);)Vh(n),n.blockedOn===null&&Ih.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[_t]||null;if(typeof a==`function`)o||qh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[_t]||null)s=o.formAction;else if(Oh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),qh(n)}}}function Yh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Xh(e){this._internalRoot=e}Zh.prototype.render=Xh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;_h(n,Pd(),e,t,null,null)},Zh.prototype.unmount=Xh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_h(e.current,2,null,e,null,null),Hd(),t[vt]=null}};function Zh(e){this._internalRoot=e}Zh.prototype.unstable_scheduleHydration=function(e){if(e){var t=pt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ih.length&&t!==0&&t<Ih[n].priority;n++);Ih.splice(n,0,e),n===0&&Vh(e)}};var Qh=n.version;if(Qh!==`19.3.1`)throw Error(i(527,Qh,`19.3.1`));pe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var $h={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var eg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!eg.isDisabled&&eg.supportsFiber)try{Ke=eg.inject($h),qe=eg}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=yc,s=bc,c=xc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=hh(e,1,!1,null,null,n,r,null,o,s,c,Yh),e[vt]=t.current,Yf(e),new Xh(t)}})),WM=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=UM()}))();function GM(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var KM=e=>{switch(e){case`success`:return YM;case`info`:return ZM;case`warning`:return XM;case`error`:return QM;default:return null}},qM=Array(12).fill(0),JM=({visible:e,className:t})=>V.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},V.createElement(`div`,{className:`sonner-spinner`},qM.map((e,t)=>V.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),YM=V.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},V.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`})),XM=V.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},V.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`})),ZM=V.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},V.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`})),QM=V.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},V.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`})),$M=V.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`,"aria-hidden":`true`},V.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),V.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),eN=()=>{let[e,t]=V.useState(document.hidden);return V.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},tN=1,nN=100,rN=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:tN++,iN=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-nN;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=rN(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],V.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(oN(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!V.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!V.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!V.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!V.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=rN(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},aN=(e,t)=>iN.message(e,t),oN=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,Z=Object.assign(aN,{success:iN.success,info:iN.info,warning:iN.warning,error:iN.error,custom:iN.custom,message:iN.message,promise:iN.promise,dismiss:iN.dismiss,loading:iN.loading},{getHistory:()=>iN.toasts,getToasts:()=>iN.getActiveToasts()});GM(`[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;flex:1;min-width:0}[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(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);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]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function sN(e){return e.label!==void 0}var cN=3,lN=`24px`,uN=`16px`,dN=4e3,fN=356,pN=14,mN=45,hN=200;function gN(...e){return e.filter(Boolean).join(` `)}function _N(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var vN=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:T=`Close toast`}=e,[E,D]=V.useState(null),[O,k]=V.useState(null),[A,j]=V.useState(!1),[M,N]=V.useState(!1),[ee,P]=V.useState(!1),[F,te]=V.useState(!1),[ne,re]=V.useState(!1),[ie,ae]=V.useState(0),[oe,se]=V.useState(0),ce=V.useRef(n.duration||y||dN),le=V.useRef(null),ue=V.useRef(null),de=c===0,fe=c+1<=o,I=n.type,pe=I??`default`,me=n.dismissible!==!1,he=n.className||``,ge=n.descriptionClassName||``,_e=V.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),ve=V.useMemo(()=>n.closeButton??p,[n.closeButton,p]),ye=V.useMemo(()=>n.duration||y||dN,[n.duration,y]),L=V.useRef(0),be=V.useRef(0),xe=V.useRef(0),Se=V.useRef(null),[Ce,we]=b.split(`-`),Te=V.useMemo(()=>s.reduce((e,t,n)=>n>=_e?e:e+t.height,0),[s,_e]),Ee=eN(),De=V.useMemo(()=>e.swipeDirections??_N(b),[e.swipeDirections,b]),Oe=n.invert||t,ke=I===`loading`;be.current=V.useMemo(()=>_e*x+Te,[_e,Te]),V.useEffect(()=>{ce.current=ye},[ye]),V.useEffect(()=>{j(!0)},[]),V.useEffect(()=>{let e=ue.current;if(e){let t=e.getBoundingClientRect().height;return se(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),V.useLayoutEffect(()=>{if(!A)return;let e=ue.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,se(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[A,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Ae=V.useCallback(()=>{N(!0),ae(be.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},hN)},[n,d,a,be]);V.useEffect(()=>{if(n.promise&&I===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Ee?(()=>{if(xe.current<L.current){let e=new Date().getTime()-L.current;ce.current-=e}xe.current=new Date().getTime()})():ce.current!==1/0&&(L.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),Ae()},ce.current)),()=>clearTimeout(e)},[u,i,n,I,Ee,Ae]),V.useEffect(()=>{n.delete&&(Ae(),n.onDismiss==null||n.onDismiss.call(n,n))},[Ae,n.delete]);function R(){return w?.loading?V.createElement(`div`,{className:gN(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":I===`loading`},w.loading):V.createElement(JM,{className:gN(C?.loader,n?.classNames?.loader),visible:I===`loading`})}let je=n.icon||w?.[I]||KM(I);return V.createElement(`li`,{tabIndex:0,ref:ue,className:gN(_,he,C?.toast,n?.classNames?.toast,C?.[pe],n?.classNames?.[pe]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":A,"data-promise":!!n.promise,"data-swiped":ne,"data-removed":M,"data-visible":fe,"data-y-position":Ce,"data-x-position":we,"data-index":c,"data-front":de,"data-swiping":ee,"data-dismissible":me,"data-type":I,"data-invert":Oe,"data-swipe-out":F,"data-swipe-direction":O,"data-expanded":!!(u||S&&A),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${M?ie:be.current}px`,"--initial-height":S?`auto`:`${oe}px`,...m,...n.style},onDragEnd:()=>{P(!1),D(null),Se.current=null},onPointerDown:e=>{e.button!==2&&!ke&&me&&(le.current=new Date,ae(be.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(P(!0),Se.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(F||!me)return;Se.current=null;let e=Number(ue.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(ue.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-le.current?.getTime(),i=E===`x`?e:t,a=Math.abs(i)/r;if((E===`x`?De.includes(e>0?`right`:`left`):De.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=mN||a>.11))ae(be.current),n.onDismiss==null||n.onDismiss.call(n,n),k(E===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Ae(),te(!0);else{var o,s;(o=ue.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=ue.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),re(!1),P(!1),D(null)}},onPointerMove:e=>{var t,n;if(!Se.current||!me||window.getSelection()?.toString().length>0)return;let r=e.clientY-Se.current.y,i=e.clientX-Se.current.x;!E&&(Math.abs(i)>1||Math.abs(r)>1)&&D(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(E===`y`){if(De.includes(`top`)||De.includes(`bottom`)){if(De.includes(`top`)&&r<0||De.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(E===`x`&&(De.includes(`left`)||De.includes(`right`))){if(De.includes(`left`)&&i<0||De.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&re(!0),(t=ue.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=ue.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},ve&&!n.jsx&&I!==`loading`?V.createElement(`button`,{"aria-label":T,"data-disabled":ke,"data-close-button":!0,onClick:ke||!me?()=>{}:()=>{Ae(),n.onDismiss==null||n.onDismiss.call(n,n)},className:gN(C?.closeButton,n?.classNames?.closeButton)},w?.close??$M):null,(I||n.icon||n.promise)&&n.icon!==null&&(w?.[I]!==null||n.icon)?V.createElement(`div`,{"data-icon":``,className:gN(C?.icon,n?.classNames?.icon)},I===`loading`?n.icon||R():n.promise?R():null,I===`loading`?null:je):null,V.createElement(`div`,{"data-content":``,className:gN(C?.content,n?.classNames?.content)},V.createElement(`div`,{"data-title":``,className:gN(C?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?V.createElement(`div`,{"data-description":``,className:gN(v,ge,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),V.isValidElement(n.cancel)?n.cancel:n.cancel&&sN(n.cancel)?V.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{sN(n.cancel)&&me&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Ae())},className:gN(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,V.isValidElement(n.action)?n.action:n.action&&sN(n.action)?V.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{sN(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),e.defaultPrevented||Ae())},className:gN(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function yN(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function bN(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?uN:lN;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var xN=V.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=cN,toastOptions:g,dir:_=yN(),gap:v=pN,icons:y,customAriaLabel:b,containerAriaLabel:x=`Notifications`}=e,[S,C]=V.useState([]),w=V.useMemo(()=>n?S.filter(e=>e.toasterId===n):S.filter(e=>!e.toasterId),[S,n]),T=V.useMemo(()=>Array.from(new Set([i].concat(w.filter(e=>e.position).map(e=>e.position)))),[w,i]),[E,D]=V.useState([]),[O,k]=V.useState(!1),[A,j]=V.useState(!1),[M,N]=V.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),ee=V.useRef(null),P=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),F=V.useRef(null),te=V.useRef(!1),ne=V.useCallback(e=>{C(t=>(t.find(t=>t.id===e.id)?.delete||iN.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return V.useEffect(()=>iN.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{C(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{Ny.flushSync(()=>{C(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),V.useEffect(()=>{if(d!==`system`){N(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?N(`dark`):N(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{N(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{N(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),V.useEffect(()=>{S.length<=1&&k(!1)},[S]),V.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;k(!0),(t=ee.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===ee.current||ee.current?.contains(document.activeElement))&&k(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),V.useEffect(()=>{if(ee.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,te.current=!1)}},[ee.current]),V.createElement(`section`,{ref:t,"aria-label":b??`${x} ${P}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},T.map((t,n)=>{let[i,a]=t.split(`-`);return w.length?V.createElement(`ol`,{key:t,dir:_===`auto`?yN():_,tabIndex:-1,ref:ee,className:c,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${E[0]?.height||0}px`,"--width":`${fN}px`,"--gap":`${v}px`,...m,...bN(l,u)},onBlur:e=>{te.current&&!e.currentTarget.contains(e.relatedTarget)&&(te.current=!1,F.current&&=(F.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||te.current||(te.current=!0,F.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{A||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||j(!0)},onPointerUp:()=>j(!1)},w.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>V.createElement(vN,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:A,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:ne,toasts:w.filter(e=>e.position==n.position),heights:E.filter(e=>e.position==n.position),setHeights:D,expandByDefault:o,gap:v,expanded:O,swipeDirections:e.swipeDirections}))):null}))}),SN=class extends Error{status;code;issues;constructor(e,t,n,r=[]){super(n),this.name=`ApiError`,this.status=e,this.code=t,this.issues=r}},CN=()=>{};function wN(e){CN=e}async function Q(e,t,n,r){let i;try{i=await fetch(`/api/panel${t}`,{method:e,signal:r,credentials:`same-origin`,headers:n===void 0?void 0:{"Content-Type":`application/json`},body:n===void 0?void 0:JSON.stringify(n)})}catch{throw new SN(0,`network`,`无法连接到 AsaBot,请确认服务正在运行`)}if(i.status===401&&t!==`/login`&&t!==`/setup`&&CN(),!i.ok){let e=(await i.json().catch(()=>null))?.error;throw new SN(i.status,e?.code??`http`,e?.message??`请求失败(HTTP ${i.status})`,e?.issues)}if(i.status!==204)return await i.json()}var TN=encodeURIComponent,$={session:()=>Q(`GET`,`/session`),setup:e=>Q(`POST`,`/setup`,e),login:e=>Q(`POST`,`/login`,{password:e}),logout:()=>Q(`POST`,`/logout`,{}),overview:()=>Q(`GET`,`/overview`),tasks:e=>Q(`GET`,`/tasks?${new URLSearchParams(e)}`),task:e=>Q(`GET`,`/tasks/${TN(e)}`),taskAttempts:e=>Q(`GET`,`/tasks/${TN(e)}/attempts`),taskAction:(e,t,n=!1)=>Q(`POST`,`/tasks/${TN(e)}/${t}${n?`?confirmDelivery=1`:``}`,{}),stats:e=>Q(`GET`,`/stats/messages?range=${e}`),bots:()=>Q(`GET`,`/bots`),bot:e=>Q(`GET`,`/bots/${TN(e.platform)}/${TN(e.selfId)}`),botAdmins:(e,t)=>Q(`PUT`,`/bots/${TN(e.platform)}/${TN(e.selfId)}/admins`,{admins:t}),botPlugin:(e,t,n)=>Q(`PUT`,`/bots/${TN(e.platform)}/${TN(e.selfId)}/plugins/${TN(t)}`,n),pluginBots:e=>Q(`GET`,`/plugins/${TN(e)}/bots`),adapters:()=>Q(`GET`,`/adapters`),connections:()=>Q(`GET`,`/connections`),saveConnection:(e,t=!1)=>t?Q(`POST`,`/connections`,e):Q(`PUT`,`/connections/${TN(e.id)}`,{name:e.name,adapter:e.adapter,enabled:e.enabled,config:e.config}),deleteConnection:e=>Q(`DELETE`,`/connections/${TN(e)}`,{}),reconnect:e=>Q(`POST`,`/connections/${TN(e)}/reconnect`,{}),startConnectionSetup:(e,t)=>Q(`POST`,`/connection-setups`,{adapter:e,connectionId:t}),connectionSetup:(e,t)=>Q(`GET`,`/connection-setups/${TN(e)}`,void 0,t),verifyConnectionSetup:(e,t)=>Q(`POST`,`/connection-setups/${TN(e)}/verify`,{code:t}),saveConnectionSetup:(e,t)=>Q(`POST`,`/connection-setups/${TN(e)}/save`,t),cancelConnectionSetup:e=>Q(`DELETE`,`/connection-setups/${TN(e)}`,{}),botGroups:e=>Q(`GET`,`/bots/${TN(e.platform)}/${TN(e.selfId)}/groups`),send:e=>Q(`POST`,`/send`,e),groups:(e=!1)=>Q(`GET`,`/groups${e?`?refresh=1`:``}`),group:e=>Q(`GET`,`/groups/${TN(e)}`),plugins:()=>Q(`GET`,`/plugins`),pluginAction:(e,t)=>Q(`POST`,`/plugins/${TN(e)}/${t}`,{}),pluginBotDefault:(e,t)=>Q(`PUT`,`/plugins/${TN(e)}/bot-default`,{defaultOnNewBots:t}),pluginConfig:(e,t)=>Q(`PUT`,`/plugins/${TN(e)}/config`,{config:t}),pluginGroups:e=>Q(`GET`,`/plugins/${TN(e)}/groups`),setPluginGroup:(e,t,n)=>Q(`PUT`,`/plugins/${TN(e)}/groups/${TN(t)}`,n),rescanPlugins:()=>Q(`POST`,`/plugins/rescan`,{}),uploadPlugin:e=>Q(`POST`,`/plugins/upload`,e),uninstallPlugin:(e,t)=>Q(`POST`,`/plugins/${TN(e)}/uninstall`,{purge:t}),searchPackages:(e,t,n=0)=>Q(`GET`,`/packages/search?q=${TN(e)}&sort=${t}&from=${n}`),packageInfo:e=>Q(`GET`,`/packages/info?name=${TN(e)}`),installPackage:e=>Q(`POST`,`/packages/install`,e),updatePackage:e=>Q(`POST`,`/packages/update`,{name:e}),uninstallPackage:(e,t)=>Q(`POST`,`/packages/uninstall`,{name:e,purge:t}),packageOperations:()=>Q(`GET`,`/packages/operations`),commands:()=>Q(`GET`,`/commands`),setCommandOverride:(e,t)=>Q(`PUT`,`/commands/override`,{path:e,override:t}),setCommandGroup:(e,t,n)=>Q(`PUT`,`/commands/groups`,{path:e,groupKey:t,enabled:n}),acl:()=>Q(`GET`,`/acl`),addAcl:e=>Q(`POST`,`/acl`,e),removeAcl:e=>Q(`DELETE`,`/acl`,e),settings:()=>Q(`GET`,`/settings`),updateSettings:e=>Q(`PUT`,`/settings`,e),logs:(e=500,t)=>Q(`GET`,`/logs?limit=${e}&level=10${t===void 0?``:`&eventId=${TN(t)}`}`),logLevel:()=>Q(`GET`,`/logs/level`),setLogLevel:e=>Q(`PUT`,`/logs/level`,{level:e}),playground:e=>Q(`POST`,`/playground`,e),playgroundEvent:e=>Q(`POST`,`/playground/event`,e),ext:(e,t,n,r)=>Q(t,`/ext/${TN(e)}${n}`,r)};function EN(e){let t=e,n=new Set;return{get:()=>t,set(e){t=typeof e==`function`?e(t):e;for(let e of n)e()},subscribe(e){return n.add(e),()=>n.delete(e)}}}var DN=60,ON=0,kN=e=>({...e,seq:++ON}),AN=(0,V.createContext)(null),jN=e=>`${e.platform}:${e.selfId}`;function MN(e,t){if(!e)return e;let n=e.findIndex(e=>jN(e)===jN(t));return n===-1?[...e,t]:e.map((e,r)=>r===n?t:e)}function NN(e,t,n,r){switch(e.type){case`connections`:t.invalidateQueries({queryKey:[`connections`]}),t.invalidateQueries({queryKey:[`bots`]}),t.invalidateQueries({queryKey:[`bot`]}),t.invalidateQueries({queryKey:[`pluginBots`]}),t.invalidateQueries({queryKey:[`overview`]});break;case`policies`:t.invalidateQueries({queryKey:[`bot`]}),t.invalidateQueries({queryKey:[`pluginBots`]}),t.invalidateQueries({queryKey:[`group`]});break;case`task`:t.invalidateQueries({queryKey:[`tasks`]});break;case`hello`:t.setQueryData([`overview`],e.overview),t.setQueryData([`bots`],e.overview.bots);break;case`bot`:t.invalidateQueries({queryKey:[`bot`,e.bot.platform,e.bot.selfId]}),t.invalidateQueries({queryKey:[`pluginBots`]}),t.setQueryData([`bots`],t=>MN(t,e.bot)),t.setQueryData([`overview`],t=>t&&{...t,bots:MN(t.bots,e.bot)??t.bots});break;case`plugin`:{let n=t.getQueryData([`plugins`]);n?.some(t=>t.name===e.plugin.name)?t.setQueryData([`plugins`],n.map(t=>t.name===e.plugin.name?e.plugin:t)):t.invalidateQueries({queryKey:[`plugins`]}),t.invalidateQueries({queryKey:[`overview`]}),t.invalidateQueries({queryKey:[`commands`]}),t.invalidateQueries({queryKey:[`bot`]}),t.invalidateQueries({queryKey:[`pluginBots`]});break}case`message`:{let{type:r,...i}=e;n.messages.set(e=>[i,...e].slice(0,DN)),t.setQueryData([`overview`],e=>e&&{...e,today:{received:e.today.received+ +(i.direction===`in`),sent:e.today.sent+ +(i.direction===`out`)}});break}case`stats`:t.setQueryData([`stats`,`1h`],t=>t&&[...t.filter(t=>t.t!==e.point.t),e.point].sort((e,t)=>e.t-t.t).slice(-60));break;case`package`:{let r=e.operation;n.operations.set(e=>[r,...e.filter(e=>e.id!==r.id)].sort((e,t)=>t.startedAt-e.startedAt).slice(0,20)),(r.status===`succeeded`||r.status===`failed`)&&(t.invalidateQueries({queryKey:[`plugins`]}),t.invalidateQueries({queryKey:[`overview`]}),t.invalidateQueries({queryKey:[`commands`]}),t.invalidateQueries({queryKey:[`packageSearch`]}));break}case`plugin-event`:for(let t of PN)t(e);break;case`log`:r?r.push(e.record):n.logs.set(t=>[...t,kN(e.record)].slice(-2e3))}}var PN=new Set;function FN(e){return PN.add(e),()=>PN.delete(e)}function IN({children:e}){let t=pj(),n=RN();return(0,V.useEffect)(()=>{let e,r,i=0,a=!1,o=()=>{n.connection.set(`connecting`);let s=window.location.protocol===`https:`?`wss`:`ws`,c=new WebSocket(`${s}://${window.location.host}/api/panel/ws`);e=c;let l=[];c.onopen=()=>{i=0,n.connection.set(`open`),$.logs(500).then(e=>{let t=e.at(-1)?.time??0,r=(l??[]).filter(e=>e.time>t);n.logs.set([...e,...r].slice(-2e3).map(kN))}).catch(()=>{n.logs.set(e=>[...e,...(l??[]).map(kN)].slice(-2e3))}).finally(()=>{l=null}),$.packageOperations().then(e=>n.operations.set(e)).catch(e=>console.warn(`Failed to load package operations`,e)),t.invalidateQueries()},c.onmessage=e=>{NN(JSON.parse(String(e.data)),t,n,l)},c.onclose=()=>{if(a)return;n.connection.set(`closed`);let e=Math.min(15e3,1e3*2**i);i+=1,r=window.setTimeout(o,e)}};return o(),()=>{a=!0,window.clearTimeout(r),e?.close()}},[t,n]),(0,H.jsx)(AN,{value:n,children:e})}var LN;function RN(){return LN??={connection:EN(`connecting`),logs:EN([]),messages:EN([]),operations:EN([])},LN}function zN(){let e=(0,V.useContext)(AN);if(!e)throw Error(`Realtime hooks must be used inside RealtimeProvider`);return e}function BN(e){return(0,V.useSyncExternalStore)(e.subscribe,e.get)}var VN=()=>BN(zN().connection),HN=()=>BN(zN().logs),UN=()=>BN(zN().messages),WN=()=>BN(zN().operations),GN=()=>{let{operations:e}=zN();return t=>e.set(e=>[t,...e.filter(e=>e.id!==t.id)].slice(0,20))},KN=()=>{let{logs:e}=zN();return()=>e.set([])},qN=new Set;function JN(e){return qN.add(e),window.addEventListener(`popstate`,e),()=>{qN.delete(e),window.removeEventListener(`popstate`,e)}}function YN(e){if(e!==window.location.pathname+window.location.search){window.history.pushState(null,``,e);for(let e of qN)e()}}function XN(){return(0,V.useSyncExternalStore)(JN,()=>window.location.pathname)}function ZN({to:e,onClick:t,...n}){return(0,H.jsx)(`a`,{...n,href:e,onClick:n=>{t?.(n),n.defaultPrevented||n.button!==0||n.metaKey||n.ctrlKey||n.shiftKey||(n.preventDefault(),YN(e))}})}function QN(){return(0,V.useSyncExternalStore)(JN,()=>window.location.pathname+window.location.search)}function $N(e,t){e.removeQueries({predicate:e=>e.queryKey[0]!==`session`}),e.setQueryData([`session`],{authenticated:t})}var eP=`asabot-theme`,tP=()=>window.matchMedia(`(prefers-color-scheme: dark)`),nP=(0,V.createContext)(null);function rP(e){return e===`system`?tP().matches?`dark`:`light`:e}function iP({children:e}){let[t,n]=(0,V.useState)(()=>localStorage.getItem(eP)??`system`),[r,i]=(0,V.useState)(()=>rP(t));(0,V.useEffect)(()=>{let e=()=>{let e=rP(t);i(e),document.documentElement.classList.toggle(`dark`,e===`dark`)};if(e(),t!==`system`)return;let n=tP();return n.addEventListener(`change`,e),()=>n.removeEventListener(`change`,e)},[t]);let a=(0,V.useCallback)(e=>{localStorage.setItem(eP,e),n(e)},[]);return(0,H.jsx)(nP,{value:{preference:t,resolved:r,setPreference:a},children:e})}function aP(){let e=(0,V.useContext)(nP);if(!e)throw Error(`useTheme must be used inside ThemeProvider`);return e}var oP=EN(null);function sP(e){if(oP.get())return;let t=document.activeElement,n=window.location.pathname;oP.set({restoreFocus(){window.location.pathname===n&&t instanceof HTMLElement&&t.isConnected&&(t.focus({preventScroll:!0}),e?.())}})}var cP=EN(null);function lP(){return(0,V.useSyncExternalStore)(oP.subscribe,oP.get)}function uP(){return(0,V.useSyncExternalStore)(cP.subscribe,cP.get)}function dP(){let e=RM({queryKey:[`bots`],queryFn:$.bots});return[...new Set((e.data??[]).map(e=>e.platform))]}function fP(e){return/^\S+$/.test(e.trim())}var pP={onebot11:`OneBot 11`,feishu:`飞书`,virtual:`虚拟适配器`,wecom:`企业微信`,"weixin-clawbot":`微信 ClawBot`};function mP(e){return pP[e]??e}var hP=(e,t)=>e.list===t.list&&e.subject===t.subject&&e.key===t.key;function gP(){let e=pj(),t=RM({queryKey:[`acl`],queryFn:$.acl}),[n,r]=(0,V.useState)(null),i=zM({mutationFn:$.addAcl,onSuccess:(t,n)=>{e.setQueryData([`acl`],(e=[])=>[...e.filter(e=>!hP(e,n)),n]),r(null),Z.success(`已添加`)}}),a=zM({mutationFn:$.removeAcl,onSuccess:(t,n)=>{e.setQueryData([`acl`],(e=[])=>e.filter(e=>!hP(e,n))),Z(`已移除`,{description:n.key,action:{label:`撤销`,onClick:()=>i.mutate(n)}})}});return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Lv,{title:`访问控制`,description:`超管始终不受限制。用户和群两个维度分别生效:某一维度的白名单为空时,不限制这个维度。`}),(0,H.jsx)(`div`,{className:`grid gap-3 lg:grid-cols-2`,children:[{list:`block`,title:`屏蔽名单`,description:`名单中的用户或群发来的事件一律忽略`,icon:Lt},{list:`allow`,title:`白名单`,description:`非空时,只有名单中的用户(或群)能使用机器人`,icon:un}].map(({list:e,title:n,description:i,icon:o})=>{let s=t.data?.filter(t=>t.list===e)??[];return(0,H.jsxs)(J,{className:`flex flex-col`,children:[(0,H.jsx)(Dv,{title:(0,H.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(o,{className:e===`block`?`size-4 text-danger`:`size-4 text-success`}),n]}),description:i,action:(0,H.jsxs)(X,{size:`sm`,onClick:()=>r(e),children:[(0,H.jsx)(Rr,{className:`size-3.5`}),`添加`]})}),(0,H.jsx)(`div`,{className:`flex-1 px-2 pb-2`,children:t.error&&!t.data?(0,H.jsx)(Iv,{error:t.error,onRetry:()=>void t.refetch(),retrying:t.isFetching,className:`py-8`}):t.isPending?(0,H.jsxs)(`div`,{className:`space-y-2 px-3 pb-2`,children:[(0,H.jsx)(Pv,{className:`h-11`}),(0,H.jsx)(Pv,{className:`h-11`})]}):s.length===0?(0,H.jsx)(Fv,{icon:(0,H.jsx)(mi,{}),title:`名单为空`,className:`py-10`}):(0,H.jsx)(`ul`,{children:(0,H.jsx)(bg,{initial:!1,children:s.map(e=>{let[t,...n]=e.key.split(`:`);return(0,H.jsxs)(K.li,{layout:!0,initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:8,transition:{duration:.15}},transition:q,className:`group flex items-center gap-3 rounded-xl px-3 py-2.5 hover:bg-surface-2/70`,children:[(0,H.jsx)(`span`,{className:`flex size-8 items-center justify-center rounded-lg bg-surface-2 text-fg-3`,children:e.subject===`user`?(0,H.jsx)(Wi,{className:`size-4`}):(0,H.jsx)(Ki,{className:`size-4`})}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsx)(`div`,{className:`font-mono text-[13px] text-fg`,children:n.join(`:`)}),(0,H.jsxs)(`div`,{className:`text-[11.5px] text-fg-3`,children:[e.subject===`user`?`用户`:`群`,` · `,t]})]}),(0,H.jsx)(X,{variant:`danger-ghost`,size:`icon-sm`,"aria-label":`移除`,className:`opacity-0 transition-opacity group-hover:opacity-100 focus-visible:opacity-100`,onClick:()=>a.mutate(e),children:(0,H.jsx)(Ii,{className:`size-3.5`})})]},`${e.subject}:${e.key}`)})})})})]},e)})}),(0,H.jsx)(_P,{list:n,pending:i.isPending,onClose:()=>r(null),onSubmit:e=>i.mutate(e)})]})}function _P({list:e,pending:t,onClose:n,onSubmit:r}){let[i,a]=(0,V.useState)(`user`),[o,s]=(0,V.useState)(``),c=dP(),[l,u]=(0,V.useState)(``),d=l||c[0]||``,f=fP(o)&&d.trim().length>0,p=t=>{t.preventDefault(),e&&f&&(r({list:e,subject:i,key:`${d.trim()}:${o.trim()}`}),s(``))};return(0,H.jsx)(uj,{open:e!==null,onOpenChange:e=>!e&&n(),title:e===`block`?`添加到屏蔽名单`:`添加到白名单`,description:e===`allow`?`注意:白名单非空后,不在名单里的用户(或群)将无法使用机器人。`:void 0,footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{variant:`ghost`,onClick:n,children:`取消`}),(0,H.jsx)(X,{variant:e===`block`?`danger`:`primary`,loading:t,disabled:!f,onClick:p,children:`添加`})]}),children:(0,H.jsxs)(`form`,{onSubmit:p,className:`space-y-4`,children:[(0,H.jsx)(vO,{value:i,onChange:a,options:[{value:`user`,label:`用户`},{value:`group`,label:`群`}]}),(0,H.jsxs)(`div`,{className:`grid grid-cols-[1fr_120px] gap-3`,children:[(0,H.jsx)(MO,{label:i===`user`?`用户 ID`:`群 ID`,htmlFor:`acl-id`,children:(0,H.jsx)(AO,{id:`acl-id`,autoFocus:!0,value:o,onChange:e=>s(e.target.value),className:`font-mono`})}),(0,H.jsx)(MO,{label:`平台`,htmlFor:`acl-platform`,children:(0,H.jsx)(AO,{id:`acl-platform`,value:d,placeholder:`平台`,onChange:e=>u(e.target.value),className:`font-mono`})})]})]})})}var vP=(e,t=`overview`)=>`/bots/${encodeURIComponent(e.platform)}/${encodeURIComponent(e.selfId)}/${t}`,yP=e=>`/bots/connections/${encodeURIComponent(e)}`,bP=(e,t=`overview`)=>`/plugin/${encodeURIComponent(e)}/${t}`,xP=e=>`/adapters/${encodeURIComponent(e)}`,SP=e=>e===void 0?`—`:new Date(e).toLocaleString(`zh-CN`,{hour12:!1});function CP(e){for(let t of[`bot`,`pluginBots`,`groups`,`group`,`pluginGroups`])e.invalidateQueries({queryKey:[t]})}var wP={text:`文本`,at:`提及`,face:`表情`,image:`图片`,audio:`语音`,video:`视频`,file:`文件`,reply:`引用`,forward:`合并转发`,markdown:`Markdown`,button:`按钮`},TP={bold:`粗体`,italic:`斜体`,underline:`下划线`,strike:`删除线`,code:`代码`,spoiler:`剧透`},EP={sendPrivate:`私聊发送`,sendGroup:`群聊发送`,sendForward:`发送合并转发`,getForward:`读取合并转发`,deleteMessage:`撤回消息`,getMessage:`读取消息`,getSelf:`账号信息`,getGroupList:`群列表`,getGroupMember:`群成员信息`,getGroupMembers:`群成员列表`,getFriendList:`好友列表`,muteMember:`禁言`,kickMember:`踢出群`,setMemberCard:`修改群名片`,call:`平台 API 透传`,sendThread:`话题内发送`},DP={"feishu:card":`飞书卡片`,"feishu:emoji":`飞书表情`,"feishu:sticker":`飞书表情包`,"feishu:share_chat":`分享群名片`,"feishu:share_user":`分享个人名片`,"feishu.sendCard":`发送飞书卡片`,"feishu.updateCard":`更新飞书卡片`,"feishu.downloadResource":`下载消息资源`,"feishu.replyInThread":`开话题回复`,"feishu.listMessages":`会话与话题历史`,"feishu.forwardMessage":`转发消息`,"feishu.forwardThread":`转发话题`,"feishu.mergeForward":`合并转发已有消息`,"feishu.editMessage":`编辑文本消息`,"feishu.addReaction":`添加表情回复`,"feishu.removeReaction":`撤销表情回复`,"feishu.listReactions":`查询表情回复`,"feishu.pinMessage":`标记群消息`,"feishu.unpinMessage":`取消标记群消息`,"feishu.listPins":`查询群消息标记`,"feishu.listReadUsers":`查询消息已读成员`,"feishu.getChat":`查询会话信息`,"feishu.setChatMessageMode":`切换群消息模式`,"feishu.addChatMembers":`添加群成员`,"feishu.urgentApp":`应用内加急`,"wecom:card":`企业微信模板卡片`,"wecom.reply":`回复原消息`,"wecom.downloadMedia":`下载并解密媒体`,"wecom.stream.update":`更新流式回复`,"wecom.stream.finish":`结束流式回复`,"wecom.replyWelcome":`回复欢迎语`,"wecom.updateCard":`更新模板卡片`,"weixin-clawbot.downloadMedia":`下载并解密媒体`,"weixin-clawbot.setTyping":`设置或取消正在输入`};function OP(e,t){let n=new Set(t),r=Object.entries(e).map(([e,t])=>({key:e,label:t,supported:n.has(e)})),i=t.filter(t=>!(t in e)).map(e=>({key:e,label:DP[e]??(e.endsWith(`:*`)?`${e.slice(0,-2)} 专属段`:e),supported:!0}));return[...r,...i]}function kP(e){return{segments:OP(wP,e.segments),styles:OP(TP,e.textStyles),actions:OP(EP,e.actions)}}function AP(e){return`/groups/${encodeURIComponent(e)}`}function jP(e){let[t,n,r,...i]=e.split(`:`);return{platform:t,selfId:n,groupId:i.join(`:`)}}function MP(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function NP(e,t){let n={};for(let[r,i]of Object.entries(e))JSON.stringify(i)!==JSON.stringify(t[r])&&(n[r]=MP(i)&&MP(t[r])?NP(i,t[r]):i);return n}var PP={global:`全局配置`,bot:`机器人覆盖`,group:`群组覆盖`,default:`插件默认值`};function FP({plugin:e,inherited:t,effective:n,override:r,sources:i,save:a,onSaved:o}){let s=zM({mutationFn:a,onSuccess:(e,t)=>{Z.success(t===null?`已恢复继承配置`:`配置覆盖已保存`),o()}}),c=s.error instanceof SN?Object.fromEntries(s.error.issues.map(t=>[t.path.replace(`plugins.${e.name}.config`,``).replace(/^\./,``),t.message])):{};return!e.configSchema||!MP(n)||!MP(t)?(0,H.jsx)(`p`,{className:`text-sm text-fg-3`,children:`这个插件没有可用的对象配置,可在插件详情中检查全局配置。`}):(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 text-[12.5px] text-fg-3`,children:[(0,H.jsx)(`span`,{children:r?`已覆盖:${Object.keys(r).join(`、`)}`:`当前继承上级配置`}),r&&(0,H.jsxs)(X,{variant:`ghost`,size:`sm`,loading:s.isPending,onClick:()=>s.mutate(null),children:[(0,H.jsx)(Jr,{className:`size-3.5`}),`恢复继承`]})]}),(0,H.jsx)(hA,{schema:e.configSchema,value:n,issues:c,saving:s.isPending,note:`只保存修改的字段,立即生效`,submitLabel:`保存覆盖`,onSubmit:e=>{let n=NP(e,t);s.mutate(Object.keys(n).length?n:null)}}),(0,H.jsxs)(`details`,{className:`rounded-lg border border-border px-3 py-2 text-[12.5px]`,children:[(0,H.jsx)(`summary`,{className:`cursor-pointer text-fg-2`,children:`字段来源`}),(0,H.jsx)(`dl`,{className:`mt-2 divide-y divide-border`,children:Object.entries(i).map(([e,t])=>(0,H.jsxs)(`div`,{className:`flex justify-between gap-3 py-2`,children:[(0,H.jsx)(`dt`,{className:`break-all font-mono text-fg-2`,children:e}),(0,H.jsx)(`dd`,{className:`shrink-0 text-fg-3`,children:PP[t]??t})]},e))})]}),s.error&&(0,H.jsx)(`p`,{role:`alert`,className:`text-[13px] text-danger`,children:s.error.message})]})}function IP({bot:e,plugins:t,initialOpen:n}){let[r,i]=(0,V.useState)(n??null);return(0,H.jsx)(`div`,{className:`space-y-3`,children:t.map(t=>(0,H.jsx)(LP,{bot:e,plugin:t,open:r===t.name,onOpen:()=>i(r===t.name?null:t.name)},t.name))})}function LP({bot:e,plugin:t,open:n,onOpen:r}){let i=pj(),a=zM({mutationFn:n=>$.botPlugin(e,t.name,{enabled:n}),onSuccess:()=>CP(i)});return(0,H.jsxs)(J,{className:`overflow-hidden`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 p-4`,children:[(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,H.jsx)(ZN,{to:bP(t.name),className:`text-[14px] font-semibold hover:text-accent`,children:t.name}),(0,H.jsx)(kv,{tone:t.state===`active`&&t.botEnabled?`success`:`neutral`,children:t.state===`active`&&t.botEnabled?`生效中`:t.state===`disabled`?`全局已停用`:t.state===`failed`?`全局加载失败`:t.state===`loading`?`全局加载中`:`本机器人停用`})]}),t.description&&(0,H.jsx)(`p`,{className:`mt-1 text-[12.5px] text-fg-3`,children:t.description}),(0,H.jsx)(`div`,{className:`mt-2`,children:(0,H.jsx)(Rv,{value:t.compatibility})})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[t.configSchema&&(0,H.jsxs)(X,{variant:`ghost`,size:`sm`,"aria-expanded":n,onClick:r,children:[(0,H.jsx)(ci,{className:`size-3.5`}),`配置`,(0,H.jsx)(tn,{className:`size-3.5`})]}),(0,H.jsx)(iA,{"aria-label":`在 ${e.nickname??e.selfId} 上启用 ${t.name}`,checked:t.overrideEnabled??t.botDefaultEnabled,disabled:a.isPending,onCheckedChange:e=>a.mutate(e)})]})]}),t.overrideEnabled!==void 0&&(0,H.jsxs)(`div`,{className:`flex items-center justify-between border-t border-border px-4 py-2 text-[12px] text-fg-3`,children:[(0,H.jsx)(`span`,{children:`机器人开关已单独设置`}),(0,H.jsx)(X,{variant:`ghost`,size:`sm`,loading:a.isPending,onClick:()=>a.mutate(null),children:`恢复初始设置`})]}),n&&(0,H.jsx)(`div`,{className:`border-t border-border p-5`,children:(0,H.jsx)(FP,{plugin:t,inherited:t.config,effective:t.effectiveConfig,override:t.override,sources:t.configSources,save:n=>$.botPlugin(e,t.name,{config:n}),onSaved:()=>CP(i)})})]})}var RP={starting:{label:`正在获取二维码`,Icon:ir},waiting:{label:`等待扫码`,detail:`请用手机扫描二维码。`,Icon:ei},scanned:{label:`在手机上确认`,detail:`按手机上的提示继续。`,Icon:Si},verification:{label:`输入验证码`,Icon:Si},authorized:{label:`已授权,待保存`,Icon:mi},saved:{label:`连接已保存`,Icon:mi},expired:{label:`二维码已失效`,detail:`请刷新二维码后重新扫码。`,Icon:fn},"already-bound":{label:`该机器人已绑定`,detail:`没有返回新授权。若已有有效连接,可直接重连。`,Icon:fn},failed:{label:`扫码未完成`,detail:`请刷新二维码后重试。`,Icon:fn}};function zP({adapter:e,connection:t,onSaved:n,onCancel:r}){let i=pj(),a=wv(),o=(0,V.useId)(),s=(0,V.useId)(),c=(0,V.useId)(),[l,u]=(0,V.useState)(()=>({adapter:e.id,connectionId:t?.id})),[d,f]=(0,V.useState)(),[p,m]=(0,V.useState)(),[h,g]=(0,V.useState)(e.name),[_,v]=(0,V.useState)(!0),[y,b]=(0,V.useState)(``),[x,S]=(0,V.useState)(!1);(0,V.useEffect)(()=>{let e=!0,t;return Promise.resolve().then(async()=>{if(e)try{let n=await $.startConnectionSetup(l.adapter,l.connectionId);t=n.id,e?f(n):await $.cancelConnectionSetup(t)}catch(t){e&&m(t instanceof Error?t:Error(`扫码请求失败`))}}),()=>{e=!1,t&&$.cancelConnectionSetup(t).catch(()=>void 0)}},[l]);let C=[`connection-setup`,d?.id],w=RM({queryKey:C,enabled:!!d,queryFn:({signal:e})=>$.connectionSetup(d?.id??``,e),initialData:d,gcTime:0,retry:!1,refetchOnWindowFocus:!1,refetchInterval:({state:e})=>e.error||[`expired`,`failed`,`saved`,`already-bound`].includes(e.data?.status??``)?!1:1e3}),T=w.data,E=zM({mutationFn:async({id:e,code:t})=>(await i.cancelQueries({queryKey:C}),$.verifyConnectionSetup(e,t)),onSuccess:e=>{b(``),i.setQueryData(C,e)}}),D=zM({mutationFn:({id:e,replace:n})=>$.saveConnectionSetup(e,{...!t&&{name:h.trim(),enabled:_},replace:n}),onSuccess:({connectionId:e})=>n(e),onError:()=>S(!1)}),O=()=>{f(void 0),m(void 0),b(``),E.reset(),D.reset(),u({adapter:e.id,connectionId:t?.id})},k=p??w.error,A=k?`failed`:T?.status??`starting`,j=RP[A],M=k?.message??(T?.status===`failed`?T.detail:void 0)??j.detail,N=!k&&T?.status===`authorized`?T:void 0,ee=A===`expired`||A===`already-bound`||A===`failed`;return(0,H.jsxs)(`div`,{className:`space-y-5`,children:[(0,H.jsx)(`section`,{"aria-label":`扫码授权`,className:`rounded-xl border border-border bg-surface-2/45 p-4 sm:p-5`,children:(0,H.jsx)(bg,{mode:`wait`,initial:!1,children:(0,H.jsxs)(K.div,{...a,className:`flex flex-col gap-4 sm:flex-row sm:items-center`,children:[!k&&T?.status===`waiting`&&(0,H.jsx)(`img`,{src:T.image,alt:`${e.name} 授权二维码`,width:184,height:184,className:`mx-auto aspect-square h-auto w-full max-w-[184px] shrink-0 rounded-lg bg-white shadow-card sm:mx-0`}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-3`,children:[(0,H.jsxs)(`div`,{role:`status`,"aria-live":`polite`,"aria-atomic":`true`,className:`space-y-1.5`,children:[(0,H.jsxs)(`h2`,{className:`flex items-center gap-2 text-sm font-semibold`,children:[(0,H.jsx)(j.Icon,{"aria-hidden":`true`,className:`size-4 shrink-0 ${A===`starting`?`animate-spin motion-reduce:animate-none`:``} ${ee?`text-danger`:`text-accent`}`}),j.label]}),M&&(0,H.jsx)(`p`,{className:`text-[12.5px] leading-relaxed text-fg-3`,children:M}),N&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{className:`break-all font-mono text-xs text-fg-3`,children:N.selfId}),N.replaces&&(0,H.jsx)(`p`,{className:`text-[12.5px] text-fg-2`,children:`保存时需要确认替换当前机器人。`}),N.missingAdmin&&(0,H.jsx)(`p`,{className:`text-[12.5px] text-fg-2`,children:`未识别扫码用户,保存后可在机器人详情设置管理员。`})]})]}),!k&&T?.status===`verification`&&(0,H.jsxs)(`form`,{className:`flex flex-wrap items-end gap-2`,onSubmit:e=>{e.preventDefault(),!E.isPending&&y.trim()&&E.mutate({id:T.id,code:y.trim()})},children:[(0,H.jsx)(MO,{className:`min-w-32 flex-1`,htmlFor:c,label:`手机上显示的验证码`,error:E.error?.message??(T.retry?`请核对验证码后重试`:void 0),children:(0,H.jsx)(AO,{id:c,value:y,inputMode:`numeric`,autoComplete:`one-time-code`,maxLength:64,onChange:e=>b(e.target.value),disabled:E.isPending})}),(0,H.jsx)(X,{type:`submit`,loading:E.isPending,disabled:!y.trim(),children:`验证`})]}),ee&&(0,H.jsxs)(X,{size:`sm`,onClick:O,children:[(0,H.jsx)(Wr,{className:`size-3.5`}),` 刷新二维码`]})]})]},A)})}),(0,H.jsxs)(`form`,{className:`space-y-4`,onSubmit:e=>{e.preventDefault(),N&&!D.isPending&&(N.replaces?S(!0):D.mutate({id:N.id,replace:!1}))},children:[!t&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(MO,{htmlFor:o,label:`连接名称`,required:!0,children:(0,H.jsx)(AO,{id:o,value:h,onChange:e=>g(e.target.value),required:!0,maxLength:120,disabled:D.isPending})}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,H.jsx)(`label`,{htmlFor:s,className:`text-[12.5px] font-medium text-fg-2`,children:`启用连接`}),(0,H.jsx)(iA,{id:s,checked:_,onCheckedChange:v,disabled:D.isPending})]})]}),(0,H.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[(0,H.jsx)(X,{type:`button`,variant:`ghost`,onClick:r,disabled:D.isPending,children:`取消`}),(0,H.jsx)(X,{type:`submit`,variant:`primary`,loading:D.isPending,disabled:!N||!t&&!h.trim(),children:`保存连接`})]}),D.error&&(0,H.jsx)(`p`,{role:`alert`,className:`text-[13px] text-danger`,children:D.error.message})]}),(0,H.jsx)(uj,{open:x&&!!N,onOpenChange:e=>!D.isPending&&S(e),title:`替换已绑定的机器人?`,description:`保留这条连接的名称和启用状态。原机器人的管理员、插件设置、会话及历史不会迁移。`,footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{variant:`ghost`,disabled:D.isPending,onClick:()=>S(!1),children:`取消`}),(0,H.jsx)(X,{variant:`danger`,loading:D.isPending,disabled:!N,onClick:()=>N&&D.mutate({id:N.id,replace:!0}),children:`确认替换`})]})})]})}var BP={disabled:{label:`已停用`,tone:`neutral`},connecting:{label:`连接中`,tone:`warning`},waiting:{label:`等待接入`,tone:`info`},online:{label:`在线`,tone:`success`},retrying:{label:`等待重试`,tone:`warning`},error:{label:`连接失败`,tone:`danger`},offline:{label:`离线`,tone:`danger`},reauthorize:{label:`需要重新扫码`,tone:`danger`}};function VP({state:e}){return(0,H.jsx)(kv,{tone:BP[e].tone,dot:!0,children:BP[e].label})}function HP({view:e}){return(0,H.jsx)(yO,{value:e,onChange:e=>YN(e===`bots`?`/bots`:`/bots/connections`),tabs:[{value:`bots`,label:`机器人`},{value:`connections`,label:`连接`}],className:`mb-5`})}function UP({path:e}){let t=e.split(`/`).filter(Boolean).map(decodeURIComponent),n=RM({queryKey:[`connections`],queryFn:$.connections}),r=RM({queryKey:[`adapters`],queryFn:$.adapters});if(n.error||r.error)return(0,H.jsx)(Iv,{error:n.error??r.error,onRetry:()=>{n.refetch(),r.refetch()}});if(!n.data||!r.data)return(0,H.jsx)(Pv,{className:`h-64 rounded-xl`});if(t[2]===`new`)return(0,H.jsx)(WP,{adapters:r.data,initialAdapter:t[3]},t.join(`/`));if(t[2]){let e=n.data.find(e=>e.id===t[2]);return e?(0,H.jsx)(WP,{connection:e,adapters:r.data},e.id):(0,H.jsx)(Fv,{icon:(0,H.jsx)(qt,{}),title:`连接不存在`,action:(0,H.jsx)(X,{onClick:()=>YN(`/bots/connections`),children:`返回连接列表`})})}return(0,H.jsx)(H.Fragment,{children:n.data.length?(0,H.jsx)(`div`,{className:`space-y-3`,children:n.data.map(e=>(0,H.jsx)(ZN,{to:yP(e.id),className:`block`,children:(0,H.jsxs)(J,{className:`flex items-start gap-4 p-5 transition-colors hover:border-border-strong`,children:[(0,H.jsx)(`div`,{className:`flex size-10 shrink-0 items-center justify-center rounded-xl bg-surface-2 text-fg-3`,children:(0,H.jsx)(qt,{className:`size-5`})}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`text-[15px] font-semibold`,children:e.name}),(0,H.jsx)(VP,{state:e.state})]}),(0,H.jsxs)(`p`,{className:`mt-1 text-[12.5px] text-fg-3`,children:[r.data.find(t=>t.id===e.adapter)?.name??e.adapter,` `,`· `,e.bots.length,` 个已识别机器人`]}),e.lastError&&(0,H.jsx)(`p`,{className:`mt-2 truncate text-[12.5px] text-danger`,children:e.lastError}),e.nextRetryAt&&(0,H.jsxs)(`p`,{className:`mt-1 text-[12px] text-fg-3`,children:[`下次重试 `,SP(e.nextRetryAt)]})]}),(0,H.jsx)(on,{className:`mt-2 size-4 text-fg-3`})]})},e.id))}):(0,H.jsx)(J,{children:(0,H.jsx)(Fv,{icon:(0,H.jsx)(qt,{}),title:`还没有连接`,description:`选择适配器,按提示填写配置或扫码授权。`,action:(0,H.jsx)(X,{onClick:()=>YN(`/bots/connections/new`),children:`添加连接`})})})})}function WP({connection:e,adapters:t,initialAdapter:n}){let r=pj(),[i,a]=(0,V.useState)(e?.adapter??n??t[0]?.id??``),[o]=(0,V.useState)(()=>e?.id??crypto.randomUUID()),[s,c]=(0,V.useState)(!1),[l,u]=(0,V.useState)(!1),d=t.find(e=>e.id===i),f=d?.setup?.kind===`qr`,p=()=>Promise.all([`connections`,`bots`,`bot`,`overview`].map(e=>r.invalidateQueries({queryKey:[e]}))),m=async e=>{await p(),u(!1),Z.success(`连接已保存`),YN(yP(e))},h=zM({mutationFn:t=>$.saveConnection({...t,id:o,adapter:i,...f&&{config:{}}},!e),onSuccess:()=>m(o)}),g=zM({mutationFn:()=>$.reconnect(o),onSuccess:p}),_=zM({mutationFn:()=>$.deleteConnection(o),onSuccess:()=>{p(),YN(`/bots/connections`),Z.success(`连接已删除`)}}),v=(0,V.useMemo)(()=>({type:`object`,required:[`name`],properties:{name:{type:`string`,title:`连接名称`,minLength:1,default:d?.name},enabled:{type:`boolean`,title:`启用连接`,default:!0},...d?.setup?.kind!==`qr`&&{config:{...d?.configSchema,title:`连接配置`}}}}),[d]),y=e?{name:e.name,enabled:e.enabled,...!f&&{config:e.config}}:void 0,b=h.error instanceof SN?Object.fromEntries(h.error.issues.map(e=>[e.path,e.message])):{};return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(ZN,{to:`/bots/connections`,className:`mb-4 inline-flex items-center gap-1.5 text-[13px] text-fg-3 hover:text-fg`,children:[(0,H.jsx)(Dt,{className:`size-3.5`}),`连接列表`]}),(0,H.jsx)(Lv,{title:e?.name??`添加连接`,description:e?(0,H.jsx)(`span`,{className:`font-mono text-xs`,children:o}):`选择适配器并完成接入`,actions:e&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(X,{disabled:!e.enabled||l,loading:g.isPending,onClick:()=>g.mutate(),children:[(0,H.jsx)(Wr,{className:`size-3.5`}),`立即重连`]}),f&&(0,H.jsxs)(X,{variant:e.state===`reauthorize`?`primary`:`secondary`,disabled:l||g.isPending||h.isPending,onClick:()=>u(!0),children:[(0,H.jsx)(ei,{className:`size-3.5`}),`重新扫码`]}),(0,H.jsxs)(X,{variant:`danger-ghost`,disabled:l,onClick:()=>c(!0),children:[(0,H.jsx)(Ii,{className:`size-3.5`}),`删除`]})]})}),(0,H.jsxs)(`div`,{className:`grid items-start gap-5 lg:grid-cols-[minmax(0,1fr)_280px]`,children:[(0,H.jsxs)(J,{className:`min-w-0 p-4 sm:p-6`,children:[(0,H.jsx)(`div`,{className:`mb-5`,children:(0,H.jsx)(Bk,{"aria-label":`适配器`,value:i,onValueChange:a,disabled:!!e,options:t.map(e=>({value:e.id,label:e.name}))})}),d&&(f&&(!e||l)?(0,H.jsx)(zP,{adapter:d,connection:e,onSaved:e=>void m(e),onCancel:()=>e?u(!1):YN(`/bots/connections`)},d.id):(0,H.jsx)(hA,{schema:v,value:y,issues:b,saving:h.isPending,submitWhenPristine:!e,submitLabel:e?`保存连接`:`创建连接`,note:e?`保存后应用到这条连接`:`创建后开始连接`,onSubmit:e=>h.mutate(e)},d.id)),h.error&&(0,H.jsxs)(`p`,{role:`alert`,className:`mt-3 text-[13px] text-danger`,children:[h.error.message,h.error instanceof SN&&h.error.issues.map(e=>(0,H.jsx)(`span`,{className:`block`,children:e.message},e.path))]})]}),(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(J,{className:`space-y-4 p-5`,children:[(0,H.jsx)(`h2`,{className:`text-sm font-semibold`,children:e?`连接状态`:`适配器`}),e&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(VP,{state:e.state}),(0,H.jsxs)(`dl`,{className:`space-y-2 text-[12.5px] text-fg-3`,children:[(0,H.jsx)(`dt`,{children:`状态变更`}),(0,H.jsx)(`dd`,{children:SP(e.changedAt)}),(0,H.jsx)(`dt`,{children:`最近上线`}),(0,H.jsx)(`dd`,{children:SP(e.lastConnectedAt)}),e.nextRetryAt&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`dt`,{children:`下次重试`}),(0,H.jsx)(`dd`,{children:SP(e.nextRetryAt)})]})]})]}),(0,H.jsxs)(ZN,{to:xP(i),className:`inline-flex items-center gap-1 text-[13px] text-accent`,children:[d?.name,` 能力与配置`,(0,H.jsx)(on,{className:`size-3.5`})]})]}),e?.lastError&&(0,H.jsxs)(J,{className:`p-5`,children:[(0,H.jsx)(`p`,{className:`text-[13px] font-medium`,children:`最近异常`}),(0,H.jsx)(`p`,{className:`mt-1 text-[11.5px] text-fg-3`,children:SP(e.errorAt)}),(0,H.jsx)(`p`,{className:`mt-2 break-words text-[12.5px] text-danger`,children:e.lastError}),(0,H.jsx)(ZN,{to:`/logs?connectionId=${encodeURIComponent(o)}`,className:`mt-3 inline-block text-[12.5px] text-accent`,children:`查看连接日志`})]}),e?.endpoints.map(e=>{let t=`${location.protocol===`https:`?`wss`:`ws`}://${location.host}${e}`;return(0,H.jsxs)(J,{className:`p-5`,children:[(0,H.jsx)(`p`,{className:`mb-2 text-[13px] font-medium`,children:`反向接入地址`}),(0,H.jsx)(`code`,{className:`break-all text-[12px] text-fg-2`,children:t}),(0,H.jsxs)(X,{className:`mt-3`,size:`sm`,onClick:()=>{navigator.clipboard.writeText(t).then(()=>Z.success(`地址已复制`)).catch(()=>Z.error(`复制失败,请手动复制地址`))},children:[(0,H.jsx)(vn,{className:`size-3.5`}),`复制地址`]})]},e)}),e&&e.bots.length>0&&(0,H.jsxs)(J,{className:`p-5`,children:[(0,H.jsx)(`h2`,{className:`mb-3 text-sm font-semibold`,children:`关联机器人`}),(0,H.jsx)(`ul`,{className:`space-y-2`,children:e.bots.map(e=>(0,H.jsx)(`li`,{children:(0,H.jsx)(ZN,{to:vP(e),className:`break-all font-mono text-[12.5px] text-accent`,children:e.selfId})},`${e.platform}:${e.selfId}`))})]})]})]}),(0,H.jsx)(uj,{open:s,onOpenChange:c,title:`删除连接`,description:`这条连接会断开并从配置文件中移除,机器人设置和历史数据会保留。`,footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{variant:`ghost`,onClick:()=>c(!1),children:`取消`}),(0,H.jsx)(X,{variant:`danger`,loading:_.isPending,onClick:()=>_.mutate(),children:`删除连接`})]})})]})}function GP(e){return{type:`object`,properties:{admins:{type:`array`,title:`机器人管理员`,items:{type:`string`},description:e===`feishu`?`填写当前飞书应用下的用户 open_id(ou_ 开头),不是 user_id。可发送 whoami 命令查看。`:`填写这个机器人所属平台的用户 ID,可发送 whoami 命令查看。仅能管理本机器人的插件开关和群规则。`}}}}var KP=[{value:`overview`,label:`概览`},{value:`plugins`,label:`插件`},{value:`groups`,label:`群组`},{value:`settings`,label:`设置`}];function qP({path:e}){let t=wv(),n=e.split(`/`).filter(Boolean).map(decodeURIComponent),r={platform:n[1]??``,selfId:n[2]??``},i=(0,V.useMemo)(()=>GP(r.platform),[r.platform]),a=n[3]??`overview`,o=pj(),s=RM({queryKey:[`bot`,r.platform,r.selfId],queryFn:()=>$.bot(r)}),c=RM({queryKey:[`connections`],queryFn:$.connections}),[l,u]=(0,V.useState)(null),d=zM({mutationFn:e=>$.botAdmins(r,e),onSuccess:()=>{CP(o),Z.success(`机器人管理员已保存`)}}),f=(0,V.useMemo)(()=>({admins:s.data?.admins??[]}),[s.data?.admins]);if(s.error)return(0,H.jsx)(Iv,{error:s.error,onRetry:()=>void s.refetch()});if(!s.data)return(0,H.jsx)(Pv,{className:`h-64 rounded-xl`});let{bot:p,plugins:m}=s.data,h=c.data?.find(e=>e.id===p.connectionId);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(ZN,{to:`/bots`,className:`mb-4 inline-flex items-center gap-1.5 text-[13px] text-fg-3 hover:text-fg`,children:[(0,H.jsx)(Dt,{className:`size-3.5`}),`机器人列表`]}),(0,H.jsx)(Lv,{title:(0,H.jsxs)(`span`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(ot,{id:p.selfId,name:p.nickname,src:p.avatar,size:44}),(0,H.jsx)(`span`,{children:p.nickname||p.selfId}),(0,H.jsx)(kv,{tone:p.status===`online`?`success`:`neutral`,dot:!0,children:p.status===`online`?`在线`:p.status===`connecting`?`连接中`:`离线`})]}),description:`${p.platform} · ${p.selfId}`,actions:(0,H.jsxs)(X,{disabled:p.status!==`online`,onClick:()=>u({bot:p}),children:[(0,H.jsx)(oi,{className:`size-3.5`}),`发送消息`]})}),(0,H.jsx)(yO,{value:a,onChange:e=>YN(vP(p,e)),tabs:KP,className:`mb-5`}),(0,H.jsx)(bg,{mode:`wait`,initial:!1,children:(0,H.jsxs)(K.div,{...t,children:[a===`overview`&&(0,H.jsxs)(`div`,{className:`grid items-start gap-5 lg:grid-cols-[minmax(0,1fr)_300px]`,children:[(0,H.jsxs)(J,{className:`overflow-hidden`,children:[(0,H.jsx)(`div`,{className:`px-5 py-4`,children:(0,H.jsx)(`h2`,{className:`text-sm font-semibold`,children:`机器人能力`})}),p.capabilities?(0,H.jsx)(ZP,{capabilities:p.capabilities}):(0,H.jsx)(`p`,{className:`px-5 pb-4 text-[13px] text-fg-3`,children:`暂无能力记录`})]}),(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(J,{className:`space-y-3 p-5`,children:[(0,H.jsxs)(`h2`,{className:`flex items-center gap-2 text-sm font-semibold`,children:[(0,H.jsx)(qt,{className:`size-4 text-fg-3`}),`关联连接`]}),h?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(ZN,{to:yP(h.id),className:`block text-[13.5px] text-accent`,children:h.name}),(0,H.jsx)(VP,{state:h.state}),h.lastError&&(0,H.jsx)(`p`,{className:`break-words text-[12.5px] text-danger`,children:h.lastError})]}):(0,H.jsx)(`p`,{className:`text-[13px] text-fg-3`,children:`未关联连接`}),(0,H.jsxs)(`p`,{className:`text-[12px] text-fg-3`,children:[`机器人最近上线 `,SP(p.lastOnlineAt)]})]}),(0,H.jsxs)(J,{className:`p-5`,children:[(0,H.jsx)(`h2`,{className:`text-sm font-semibold`,children:`插件应用`}),(0,H.jsxs)(`p`,{className:`mt-2 text-[13px] text-fg-3`,children:[m.filter(e=>e.botEnabled&&e.state===`active`).length,` `,`个插件生效`]}),(0,H.jsx)(ZN,{to:vP(p,`plugins`),className:`mt-3 inline-block text-[13px] text-accent`,children:`管理插件与配置覆盖`})]}),(0,H.jsx)(ZN,{to:`/logs?platform=${encodeURIComponent(p.platform)}&selfId=${encodeURIComponent(p.selfId)}`,className:`block px-1 text-[13px] text-accent`,children:`查看机器人日志`})]})]}),a===`plugins`&&(0,H.jsx)(IP,{bot:p,plugins:m,initialOpen:n[4]},n[4]??`all`),a===`groups`&&(0,H.jsx)(J,{className:`overflow-hidden`,children:p.status===`online`?(0,H.jsx)($P,{bot:p,onSend:e=>u({bot:p,target:{type:`group`,id:e}})}):(0,H.jsx)(Fv,{icon:(0,H.jsx)(Hr,{}),title:`机器人当前离线`,description:`连接恢复后可获取群列表,已保存的规则仍可在群组页面管理。`,action:(0,H.jsx)(X,{onClick:()=>YN(`/groups`),children:`已保存的群规则`})})}),a===`settings`&&(0,H.jsxs)(`div`,{className:`max-w-3xl space-y-4`,children:[(0,H.jsxs)(J,{className:`p-6`,children:[(0,H.jsx)(`h2`,{className:`mb-4 text-sm font-semibold`,children:`管理员`}),(0,H.jsx)(hA,{schema:i,value:f,issues:{},saving:d.isPending,note:`保存后立即生效`,submitLabel:`保存管理员`,onSubmit:e=>d.mutate(e.admins)})]}),p.connectionId&&(0,H.jsxs)(J,{className:`flex items-center justify-between gap-3 p-5`,children:[(0,H.jsx)(`span`,{className:`text-sm text-fg-2`,children:`连接凭据、启停与重连`}),(0,H.jsx)(ZN,{className:`text-[13px] text-accent`,to:yP(p.connectionId),children:`进入连接设置`})]})]})]},a)}),(0,H.jsx)(eF,{state:l,onClose:()=>u(null)})]})}function JP(){let e=XN(),t=wv(),n=e===`/bots`||e===`/bots/connections`,r=e.startsWith(`/bots/connections/`),i=n?`/bots`:r?e:e.split(`/`).slice(0,4).join(`/`);return(0,H.jsx)(bg,{mode:`wait`,initial:!1,children:(0,H.jsx)(K.div,{...t,children:n?(0,H.jsx)(YP,{view:e===`/bots`?`bots`:`connections`}):r?(0,H.jsx)(UP,{path:e}):(0,H.jsx)(qP,{path:e})},i)})}function YP({view:e}){let t=wv();return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Lv,{title:`机器人`,description:`管理机器人账号与平台连接`,actions:(0,H.jsxs)(X,{variant:`primary`,onClick:()=>YN(`/bots/connections/new`),children:[(0,H.jsx)(Rr,{className:`size-4`}),`添加连接`]})}),(0,H.jsx)(HP,{view:e}),(0,H.jsx)(bg,{mode:`wait`,initial:!1,children:(0,H.jsx)(K.div,{...t,children:e===`bots`?(0,H.jsx)(XP,{}):(0,H.jsx)(UP,{path:`/bots/connections`})},e)})]})}function XP(){let e=RM({queryKey:[`bots`],queryFn:$.bots});return e.error?(0,H.jsx)(Iv,{error:e.error,onRetry:()=>void e.refetch()}):e.data?e.data.length?(0,H.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:e.data.map(e=>(0,H.jsx)(ZN,{to:vP(e),className:`block`,children:(0,H.jsxs)(J,{className:`flex items-center gap-4 p-5 transition-colors hover:border-border-strong`,children:[(0,H.jsx)(ot,{id:e.selfId,name:e.nickname,src:e.avatar,size:48}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`truncate text-[15px] font-semibold`,children:e.nickname||e.selfId}),(0,H.jsx)(kv,{tone:e.status===`online`?`success`:e.status===`connecting`?`warning`:`neutral`,dot:!0,children:e.status===`online`?`在线`:e.status===`connecting`?`连接中`:`离线`})]}),(0,H.jsx)(`p`,{className:`mt-1 text-[12px] text-fg-3`,children:e.platform}),(0,H.jsx)(`p`,{className:`mt-0.5 truncate font-mono text-[12px] text-fg-3`,children:e.selfId})]}),(0,H.jsx)(on,{className:`size-4 shrink-0 text-fg-3`})]})},`${e.platform}:${e.selfId}`))}):(0,H.jsx)(J,{children:(0,H.jsx)(Fv,{icon:(0,H.jsx)(Hr,{}),title:`还没有机器人`,description:`添加平台连接后,成功登录的机器人会显示在这里。连接失败时可以在“连接”中查看原因。`,action:(0,H.jsx)(X,{onClick:()=>YN(`/bots/connections`),children:`查看连接`})})}):(0,H.jsx)(Pv,{className:`h-48 rounded-xl`})}function ZP({capabilities:e,adapter:t=!1}){let{segments:n,styles:r,actions:i}=kP(e);return(0,H.jsxs)(`div`,{className:`space-y-4 border-t border-border bg-surface-2/40 px-5 py-4`,children:[(0,H.jsxs)(`p`,{className:`text-[12.5px] leading-relaxed text-fg-3`,children:[t?`适配器声明的实现范围,具体机器人能力以机器人详情为准。`:`机器人上报的消息与操作能力。`,`平台应用授权需在平台侧配置。`]}),(0,H.jsx)(QP,{title:`消息内容`,rows:n}),(0,H.jsx)(QP,{title:`文本样式`,rows:r}),(0,H.jsx)(QP,{title:`操作`,rows:i})]})}function QP({title:e,rows:t}){return(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`mb-2 text-[12px] font-medium text-fg-2`,children:e}),(0,H.jsx)(`ul`,{className:`flex flex-wrap gap-1.5`,children:t.map(e=>(0,H.jsxs)(`li`,{title:e.key,className:B(`flex items-center gap-1 rounded-md border px-2 py-0.5 text-[12px]`,e.supported?`border-border bg-surface text-fg`:`border-dashed border-border text-fg-3 line-through decoration-fg-3/50`),children:[e.supported?(0,H.jsx)($t,{className:`size-3 text-success`}):(0,H.jsx)(br,{className:`size-3 text-fg-3`}),e.label]},e.key))})]})}function $P({bot:e,onSend:t}){let n=RM({queryKey:[`bot-groups`,e.platform,e.selfId],queryFn:()=>$.botGroups(e)}),[r,i]=(0,V.useState)(``),a=(0,V.useMemo)(()=>{let e=r.trim().toLowerCase();return(n.data??[]).filter(t=>!e||t.groupName.toLowerCase().includes(e)||t.groupId.includes(e))},[n.data,r]);return(0,H.jsxs)(`div`,{className:`border-t border-border bg-surface-2/40 px-5 py-4`,children:[(0,H.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[(0,H.jsx)(`span`,{className:`text-[12.5px] text-fg-3`,children:n.data?`共 ${n.data.length} 个群`:`加载中…`}),(0,H.jsx)(AO,{icon:(0,H.jsx)(ii,{}),placeholder:`搜索群名或群号`,value:r,onChange:e=>i(e.target.value),className:`w-56`})]}),n.isPending?(0,H.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:[(0,H.jsx)(Pv,{className:`h-14`}),(0,H.jsx)(Pv,{className:`h-14`})]}):n.error?(0,H.jsx)(`p`,{className:`text-[13px] text-danger`,children:n.error.message}):(0,H.jsx)(K.ul,{variants:Tv,initial:`initial`,animate:`animate`,className:`grid max-h-80 gap-2 overflow-y-auto sm:grid-cols-2`,children:a.map(n=>(0,H.jsxs)(K.li,{variants:Ev,className:`group flex items-center gap-3 rounded-xl border border-border bg-surface px-3 py-2.5`,children:[(0,H.jsx)(`span`,{className:`flex size-8 items-center justify-center rounded-lg bg-surface-2 text-[12px] font-medium text-fg-2`,children:n.groupName.slice(0,1)}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsx)(`div`,{className:`truncate text-[13px] font-medium`,children:n.groupName}),(0,H.jsxs)(`div`,{className:`font-mono text-[11.5px] text-fg-3`,children:[n.groupId,n.memberCount!==void 0&&` · ${Hv(n.memberCount)} 人`]})]}),(0,H.jsx)(ZN,{className:`text-[12px] text-accent`,to:AP(`${e.platform}:${e.selfId}:group:${n.groupId}`),children:`群设置`}),(0,H.jsx)(X,{variant:`ghost`,size:`icon-sm`,"aria-label":`向 ${n.groupName} 发送消息`,className:`shrink-0`,onClick:()=>t(n.groupId),children:(0,H.jsx)(oi,{className:`size-3.5`})})]},n.groupId))})]})}function eF({state:e,onClose:t}){let[n,r]=(0,V.useState)(`group`),[i,a]=(0,V.useState)(``),[o,s]=(0,V.useState)(``),[c,l]=(0,V.useState)(e);e!==c&&(l(e),e?.target&&(r(e.target.type),a(e.target.id)));let u=zM({mutationFn:$.send,onSuccess:()=>{Z.success(`已发送`),s(``),t()}}),d=fP(i)&&o.trim().length>0,f=t=>{t?.preventDefault(),e&&d&&u.mutate({target:{platform:e.bot.platform,selfId:e.bot.selfId,type:n,id:i.trim()},message:o})};return(0,H.jsx)(uj,{open:e!==null,onOpenChange:e=>!e&&t(),title:`发送消息`,description:e?`以 ${e.bot.nickname??e.bot.selfId} 的身份发送`:void 0,footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{variant:`ghost`,onClick:t,children:`取消`}),(0,H.jsxs)(X,{variant:`primary`,loading:u.isPending,disabled:!d,onClick:()=>f(),children:[(0,H.jsx)(oi,{className:`size-3.5`}),`发送`]})]}),children:(0,H.jsxs)(`form`,{onSubmit:f,className:`space-y-4`,children:[(0,H.jsx)(vO,{value:n,onChange:r,options:[{value:`group`,label:`群聊`},{value:`private`,label:`私聊`}]}),(0,H.jsx)(MO,{label:n===`group`?`群 ID`:`用户 ID`,htmlFor:`send-id`,children:(0,H.jsx)(AO,{id:`send-id`,value:i,onChange:e=>a(e.target.value),className:`font-mono`})}),(0,H.jsx)(MO,{label:`内容`,htmlFor:`send-text`,hint:`按纯文本发送`,children:(0,H.jsx)(jO,{id:`send-text`,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&f()}})})]})})}function tF({schema:e}){return(0,H.jsx)(`dl`,{className:`divide-y divide-border`,children:Object.entries(e.properties??{}).map(([t,n])=>(0,H.jsxs)(`div`,{className:`py-3`,children:[(0,H.jsxs)(`dt`,{className:`flex flex-wrap items-center gap-2 text-[13px] font-medium`,children:[n.title??t,(0,H.jsx)(`code`,{className:`font-mono text-[11.5px] font-normal text-fg-3`,children:t}),e.required?.includes(t)&&(0,H.jsx)(kv,{children:`必填`}),n.writeOnly&&(0,H.jsx)(kv,{tone:`warning`,children:`凭据`})]}),n.description&&(0,H.jsx)(`dd`,{className:`mt-1 text-[12.5px] text-fg-3`,children:n.description}),n.properties&&(0,H.jsx)(`dd`,{className:`ml-3 border-l border-border pl-3`,children:(0,H.jsx)(tF,{schema:n})})]},t))})}function nF(){let e=XN().split(`/`)[2],t=wv();return(0,H.jsx)(bg,{mode:`wait`,initial:!1,children:(0,H.jsx)(K.div,{...t,children:(0,H.jsx)(rF,{id:e})},e??`/adapters`)})}function rF({id:e}){let t=RM({queryKey:[`adapters`],queryFn:$.adapters}),n=RM({queryKey:[`connections`],queryFn:$.connections}),r=RM({queryKey:[`bots`],queryFn:$.bots});if(t.error||n.error||r.error)return(0,H.jsx)(Iv,{error:t.error??n.error??r.error,onRetry:()=>{t.refetch(),n.refetch(),r.refetch()}});if(!t.data||!n.data||!r.data)return(0,H.jsx)(Pv,{className:`h-64 rounded-xl`});let i=t.data.find(t=>t.id===(e?decodeURIComponent(e):``));if(e&&!i)return(0,H.jsx)(Fv,{icon:(0,H.jsx)(qt,{}),title:`适配器未加载`,action:(0,H.jsx)(X,{onClick:()=>YN(`/adapters`),children:`返回适配器列表`})});if(!i)return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Lv,{title:`适配器`,description:`查看已加载的协议实现、连接方式和能力`}),(0,H.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:t.data.map(e=>(0,H.jsx)(iF,{adapter:e,count:n.data?.filter(t=>t.adapter===e.id).length??0},e.id))}),(0,H.jsxs)(J,{className:`mt-5 p-5`,children:[(0,H.jsx)(`h2`,{className:`text-sm font-semibold`,children:`添加外部适配器`}),(0,H.jsxs)(`p`,{className:`mt-2 text-[13px] leading-relaxed text-fg-3`,children:[`在项目目录通过包管理器安装适配器包,将包名加入配置文件的`,` `,(0,H.jsx)(`code`,{className:`font-mono`,children:`adapterModules`}),` 后重启服务。加载成功后会出现在这里。`]})]})]});let a=n.data?.filter(e=>e.adapter===i.id)??[],o=r.data?.filter(e=>a.some(t=>t.id===e.connectionId))??[];return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(ZN,{to:`/adapters`,className:`mb-4 inline-flex items-center gap-1.5 text-[13px] text-fg-3 hover:text-fg`,children:[(0,H.jsx)(Dt,{className:`size-3.5`}),`适配器列表`]}),(0,H.jsx)(Lv,{title:i.name,description:i.description,actions:(0,H.jsxs)(X,{variant:`primary`,onClick:()=>YN(`/bots/connections/new/${encodeURIComponent(i.id)}`),children:[(0,H.jsx)(Rr,{className:`size-3.5`}),`添加连接`]})}),(0,H.jsxs)(`div`,{className:`grid items-start gap-5 lg:grid-cols-[minmax(0,1fr)_300px]`,children:[(0,H.jsxs)(`div`,{className:`space-y-5`,children:[(0,H.jsxs)(J,{className:`overflow-hidden`,children:[(0,H.jsx)(`div`,{className:`px-5 py-4`,children:(0,H.jsx)(`h2`,{className:`text-sm font-semibold`,children:`适配器实现能力`})}),(0,H.jsx)(ZP,{capabilities:i.capabilities,adapter:!0})]}),(0,H.jsx)(J,{className:`p-5`,children:i.setup?.kind===`qr`?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`h2`,{className:`text-sm font-semibold`,children:`接入方式`}),(0,H.jsx)(`p`,{className:`mt-2 text-[13px] text-fg-3`,children:`扫码授权后保存连接。`})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`h2`,{className:`text-sm font-semibold`,children:`配置字段`}),(0,H.jsx)(tF,{schema:i.configSchema})]})})]}),(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(J,{className:`space-y-3 p-5`,children:[(0,H.jsx)(`h2`,{className:`text-sm font-semibold`,children:`版本与来源`}),(0,H.jsxs)(`p`,{className:`font-mono text-[13px]`,children:[`v`,i.version]}),(0,H.jsx)(`p`,{className:`break-all text-[12.5px] text-fg-3`,children:i.source===`builtin`?`框架内置`:i.source}),(0,H.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:i.connectionTypes.map(e=>(0,H.jsx)(kv,{children:e},e))})]}),(0,H.jsxs)(J,{className:`p-5`,children:[(0,H.jsx)(`h2`,{className:`mb-3 text-sm font-semibold`,children:`连接`}),a.length?(0,H.jsx)(`ul`,{className:`space-y-3`,children:a.map(e=>(0,H.jsxs)(`li`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,H.jsx)(ZN,{to:yP(e.id),className:`text-[13px] text-accent`,children:e.name}),(0,H.jsx)(VP,{state:e.state})]},e.id))}):(0,H.jsx)(`p`,{className:`text-[13px] text-fg-3`,children:`尚未添加连接`})]}),o.length>0&&(0,H.jsxs)(J,{className:`p-5`,children:[(0,H.jsx)(`h2`,{className:`mb-3 text-sm font-semibold`,children:`机器人`}),(0,H.jsx)(`ul`,{className:`space-y-2`,children:o.map(e=>(0,H.jsx)(`li`,{children:(0,H.jsx)(ZN,{className:`break-all text-[13px] text-accent`,to:vP(e),children:e.nickname||e.selfId})},`${e.platform}:${e.selfId}`))})]})]})]})]})}function iF({adapter:e,count:t}){return(0,H.jsx)(ZN,{to:xP(e.id),children:(0,H.jsxs)(J,{className:`flex h-full flex-col gap-4 p-5 transition-colors hover:border-border-strong`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(`span`,{className:`flex size-10 items-center justify-center rounded-xl bg-surface-2 text-fg-3`,children:(0,H.jsx)(Hr,{className:`size-5`})}),(0,H.jsx)(`h2`,{className:`text-[15px] font-semibold`,children:e.name}),(0,H.jsxs)(`span`,{className:`ml-auto font-mono text-xs text-fg-3`,children:[`v`,e.version]})]}),(0,H.jsx)(`p`,{className:`flex-1 text-[13px] leading-relaxed text-fg-3`,children:e.description}),(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,H.jsx)(kv,{children:e.source===`builtin`?`内置`:`外部包`}),(0,H.jsxs)(`span`,{className:`text-[12px] text-fg-3`,children:[t,` 条连接`]}),(0,H.jsx)(on,{className:`ml-auto size-4 text-fg-3`})]})]})})}function aF(e){if(e<1024)return`${e} B`;let t=[`KB`,`MB`,`GB`],n=e/1024,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r+=1;return`${n.toFixed(n>=100?0:1)} ${t[r]}`}function oF(e){let t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60);return n>0?`${n} 天 ${r} 小时`:r>0?`${r} 小时 ${i} 分`:i>0?`${i} 分 ${t%60} 秒`:`${t} 秒`}function sF(e,t=Date.now()){let n=Math.max(0,t-e);return n<1e4?`刚刚`:n<6e4?`${Math.floor(n/1e3)} 秒前`:n<36e5?`${Math.floor(n/6e4)} 分钟前`:n<864e5?`${Math.floor(n/36e5)} 小时前`:new Date(e).toLocaleDateString(`zh-CN`)}function cF(e){if(typeof e==`string`)return e;if(e<=0)return`0s`;let t=[[`d`,864e5],[`h`,36e5],[`m`,6e4],[`s`,1e3],[`ms`,1]],n=e,r=``;for(let[e,i]of t){let t=Math.floor(n/i);t>0&&(r+=`${t}${e}`,n-=t*i)}return r}var lF={everyone:`所有人`,"group.admin":`群管理员`,"group.owner":`群主`,"bot.admin":`机器人管理员`,superuser:`超管`},uF={user:`每个用户`,group:`每个群`,global:`全局`};function dF(e){let t=e.override??{};return{enabled:t.enabled!==!1,hidden:t.hidden??e.hidden,aliases:[...e.aliases,...t.aliases??[]],permission:t.permission===void 0?e.permission?`插件限定`:void 0:t.permission===`everyone`?void 0:lF[t.permission],cooldown:t.cooldown===void 0||t.cooldown===!1?void 0:`${cF(t.cooldown.duration)} / ${uF[t.cooldown.scope??`user`]}`,modified:e.override!==void 0&&Object.keys(e.override).length>0}}function fF(){let e=pj();return zM({mutationFn:({path:e,override:t})=>$.setCommandOverride(e,t),meta:{silent:!0},onSuccess:t=>{e.setQueryData([`commands`],(e=[])=>e.map(e=>e.path===t.path?t:e)),e.invalidateQueries({queryKey:[`plugins`]})}})}function pF(){let e=RM({queryKey:[`commands`],queryFn:$.commands}),[t,n]=(0,V.useState)(``),[r,i]=(0,V.useState)(!1),[a,o]=(0,V.useState)(null),s=(0,V.useMemo)(()=>{let n=t.trim().toLowerCase(),i=(e.data??[]).filter(e=>{let t=dF(e);return(r||!t.hidden)&&(!n||e.path.toLowerCase().includes(n)||e.description.toLowerCase().includes(n)||t.aliases.some(e=>e.toLowerCase().includes(n)))}),a=new Map;for(let e of i)a.set(e.owner,[...a.get(e.owner)??[],e]);return[...a.entries()].sort(([e],[t])=>e.localeCompare(t))},[e.data,t,r]),c=e.data?.find(e=>e.path===a);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Lv,{title:`命令`,description:`所有插件注册的命令。可以停用命令,或者修改别名、权限和冷却,不需要改插件代码`}),(0,H.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-3`,children:[(0,H.jsx)(AO,{icon:(0,H.jsx)(ii,{}),placeholder:`搜索命令、别名或说明`,value:t,onChange:e=>n(e.target.value),className:`w-72`}),(0,H.jsxs)(`div`,{className:`ml-auto flex items-center gap-2 text-[13px] text-fg-2`,children:[(0,H.jsx)(iA,{id:`show-hidden`,checked:r,onCheckedChange:i}),(0,H.jsx)(`label`,{htmlFor:`show-hidden`,className:`cursor-pointer`,children:`显示隐藏命令`})]})]}),e.error&&!e.data?(0,H.jsx)(J,{children:(0,H.jsx)(Iv,{error:e.error,onRetry:()=>void e.refetch(),retrying:e.isFetching})}):e.data?s.length===0?(0,H.jsx)(J,{children:(0,H.jsx)(Fv,{icon:(0,H.jsx)(Ei,{}),title:`没有匹配的命令`})}):(0,H.jsx)(K.div,{variants:Tv,initial:`initial`,animate:`animate`,className:`space-y-4`,children:s.map(([e,t])=>(0,H.jsx)(K.div,{variants:Ev,children:(0,H.jsxs)(J,{className:`overflow-hidden`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border bg-surface-2/50 px-5 py-2.5`,children:[(0,H.jsx)(`span`,{className:`text-[13px] font-semibold`,children:e}),(0,H.jsxs)(`span`,{className:`text-[12px] text-fg-3`,children:[t.length,` 条`]})]}),(0,H.jsx)(`ul`,{className:`divide-y divide-border`,children:t.map(e=>(0,H.jsx)(mF,{command:e,onEdit:()=>o(e.path)},e.path))})]})},e))}):(0,H.jsx)(Pv,{className:`h-80 rounded-xl`}),(0,H.jsx)(_F,{command:c,onClose:()=>o(null)})]})}function mF({command:e,onEdit:t}){let[n,r]=(0,V.useState)(!1),i=dF(e),a=fF(),o=e.options.length>0||e.examples.length>0;return(0,H.jsxs)(`li`,{className:B(`transition-opacity`,!i.enabled&&`opacity-60`),children:[(0,H.jsxs)(`div`,{className:`group flex items-center gap-3 px-5 py-3`,children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>o&&r(!n),className:B(`flex min-w-0 flex-1 items-center gap-3 text-left`,o&&`cursor-pointer`),children:[(0,H.jsx)(K.span,{animate:{rotate:n?90:0},transition:q,className:B(`text-fg-3`,!o&&`invisible`),children:(0,H.jsx)(on,{className:`size-3.5`})}),(0,H.jsx)(`code`,{className:B(`shrink-0 font-mono text-[13px] font-medium`,i.enabled?`text-fg`:`text-fg-3 line-through`),children:e.usage}),(0,H.jsx)(`span`,{className:`truncate text-[13px] text-fg-3`,children:e.description})]}),(0,H.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:[e.overrideIssues.length>0&&(0,H.jsx)(`span`,{title:e.overrideIssues.join(`
|
|
50
|
-
`),children:(0,H.jsxs)(kv,{tone:`danger`,children:[(0,H.jsx)(Ri,{className:`size-3`}),`覆盖有冲突`]})}),i.modified&&(0,H.jsx)(kv,{tone:`accent`,children:`已修改`}),i.aliases.slice(0,2).map(e=>(0,H.jsx)(kv,{children:e},e)),i.aliases.length>2&&(0,H.jsxs)(kv,{children:[`+`,i.aliases.length-2]}),i.permission&&(0,H.jsx)(kv,{tone:`warning`,children:i.permission}),i.cooldown&&(0,H.jsxs)(kv,{tone:`info`,children:[`冷却 `,i.cooldown]}),e.scope!==`all`&&(0,H.jsx)(kv,{tone:`info`,children:e.scope===`group`?`群聊`:`私聊`}),e.disabledGroups.length>0&&(0,H.jsxs)(kv,{children:[e.disabledGroups.length,` 个群停用`]}),i.hidden&&(0,H.jsx)(kv,{children:`隐藏`}),(0,H.jsxs)(`div`,{className:`ml-1 flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100`,children:[(0,H.jsxs)(X,{variant:`ghost`,size:`sm`,onClick:t,children:[(0,H.jsx)(Pr,{className:`size-3.5`}),`编辑`]}),(0,H.jsxs)(X,{variant:`soft`,size:`sm`,disabled:!i.enabled,onClick:()=>{cP.set(`/${e.path} `),YN(`/playground`)},children:[(0,H.jsx)(Rn,{className:`size-3.5`}),`试用`]})]}),(0,H.jsx)(iA,{"aria-label":`启用 /${e.path}`,checked:i.enabled,disabled:a.isPending,onCheckedChange:t=>{let{enabled:n,...r}=e.override??{},i=t?r:{...r,enabled:!1};a.mutate({path:e.path,override:Object.keys(i).length>0?i:null},{onSuccess:()=>Z.success(t?`已启用 /${e.path}`:`已停用 /${e.path}`),onError:e=>Z.error(e.message)})},className:`ml-2`})]})]}),(0,H.jsx)(bg,{initial:!1,children:n&&(0,H.jsx)(K.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:q,className:`overflow-hidden`,children:(0,H.jsxs)(`div`,{className:`grid gap-4 px-5 pb-4 pl-12 sm:grid-cols-2`,children:[e.options.length>0&&(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`mb-2 text-[11.5px] font-medium tracking-wide text-fg-3`,children:`选项`}),(0,H.jsx)(`ul`,{className:`space-y-1.5`,children:e.options.map(e=>(0,H.jsxs)(`li`,{className:`text-[12.5px]`,children:[(0,H.jsx)(`code`,{className:`font-mono text-fg`,children:e.flags.join(`, `)}),e.description&&(0,H.jsx)(`span`,{className:`ml-2 text-fg-3`,children:e.description}),e.default!==void 0&&(0,H.jsxs)(`span`,{className:`ml-2 text-fg-3`,children:[`(默认 `,JSON.stringify(e.default),`)`]})]},e.flags.join(`,`)))})]}),e.examples.length>0&&(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`mb-2 text-[11.5px] font-medium tracking-wide text-fg-3`,children:`示例`}),(0,H.jsx)(`ul`,{className:`space-y-1.5`,children:e.examples.map(e=>(0,H.jsx)(`li`,{children:(0,H.jsx)(`code`,{className:`rounded-md bg-surface-2 px-1.5 py-0.5 font-mono text-[12.5px] text-fg`,children:e})},e))})]})]})})})]})}function hF(e){let t=e.override??{},n=t.cooldown;return{enabled:t.enabled!==!1,aliases:t.aliases??[],permission:t.permission??`default`,cooldownMode:n===void 0?`default`:n===!1?`off`:`custom`,cooldownDuration:n?cF(n.duration):`10s`,cooldownScope:n?n.scope??`user`:`user`,hidden:t.hidden===void 0?`default`:t.hidden?`yes`:`no`}}function gF(e){let t={};return e.enabled||(t.enabled=!1),e.aliases.length>0&&(t.aliases=e.aliases),e.permission!=="default"&&(t.permission=e.permission),e.cooldownMode===`off`&&(t.cooldown=!1),e.cooldownMode===`custom`&&(t.cooldown={duration:e.cooldownDuration.trim(),scope:e.cooldownScope}),e.hidden!=="default"&&(t.hidden=e.hidden===`yes`),Object.keys(t).length>0?t:null}function _F({command:e,onClose:t}){let[n,r]=(0,V.useState)(null),[i,a]=(0,V.useState)(void 0);e!==i&&(a(e),r(e?hF(e):null));let o=fF(),s=pj(),c=zM({mutationFn:({path:e,groupKey:t})=>$.setCommandGroup(e,t,!0),onSuccess:()=>void s.invalidateQueries({queryKey:[`commands`]})}),l=e=>r(t=>t&&{...t,...e}),u=n?.cooldownMode!==`custom`||n.cooldownDuration.trim().length>0,d=n=>{e&&o.mutate({path:e.path,override:n},{onSuccess:e=>{e.overrideIssues.length>0?Z.warning(e.overrideIssues.join(`;`)):Z.success(n===null?`已恢复插件默认设置`:`已保存`),t()},onError:e=>Z.error(e instanceof SN&&e.issues.length>0?e.issues.map(e=>e.message).join(`;`):e.message)})};return(0,H.jsx)(uj,{open:e!==void 0,onOpenChange:e=>!e&&t(),title:e?`/${e.path}`:``,description:`这里的设置覆盖插件自己的声明,保存后立即生效,不需要重载插件`,footer:(0,H.jsxs)(H.Fragment,{children:[e?.override&&(0,H.jsxs)(X,{variant:`ghost`,className:`mr-auto`,onClick:()=>d(null),disabled:o.isPending,children:[(0,H.jsx)(Jr,{className:`size-3.5`}),`恢复默认`]}),(0,H.jsx)(X,{variant:`ghost`,onClick:t,children:`取消`}),(0,H.jsx)(X,{variant:`primary`,loading:o.isPending,disabled:!n||!u,onClick:()=>n&&d(gF(n)),children:`保存`})]}),children:e&&n&&(0,H.jsxs)(`div`,{className:`space-y-5`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-4 rounded-xl border border-border px-4 py-3`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`text-[13px] font-medium`,children:`启用`}),(0,H.jsx)(`p`,{className:`mt-0.5 text-[12px] text-fg-3`,children:`停用后对所有人(包括超管)都不可用,消息交给其他处理器。`})]}),(0,H.jsx)(iA,{checked:n.enabled,onCheckedChange:e=>l({enabled:e})})]}),(0,H.jsx)(MO,{label:`追加别名`,htmlFor:`override-aliases`,hint:e.aliases.length>0?`插件自带:${e.aliases.join(`、`)}。别名是完整路径,例如“重载插件”或“plugin rl”`:`别名是完整路径,例如“重载插件”或“plugin rl”`,children:(0,H.jsx)(yA,{id:`override-aliases`,value:n.aliases,onChange:e=>l({aliases:e.map(String)})})}),(0,H.jsx)(MO,{label:`权限`,htmlFor:`override-permission`,hint:e.permission?`插件为这条命令声明了权限规则`:`插件没有限制权限`,children:(0,H.jsx)(Bk,{"aria-label":`权限`,value:n.permission,onValueChange:e=>l({permission:e}),options:[{value:`default`,label:`插件默认`},{value:`everyone`,label:`所有人`},{value:`group.admin`,label:`群管理员(含群主)`},{value:`group.owner`,label:`群主`},{value:`superuser`,label:`仅超管`}]})}),(0,H.jsx)(MO,{label:`冷却`,htmlFor:`override-cooldown`,hint:`超管不受冷却限制`,children:(0,H.jsxs)(`div`,{className:`space-y-2.5`,children:[(0,H.jsx)(vO,{value:n.cooldownMode,onChange:e=>l({cooldownMode:e}),options:[{value:`default`,label:`插件默认`},{value:`off`,label:`取消冷却`},{value:`custom`,label:`自定义`}]}),n.cooldownMode===`custom`&&(0,H.jsxs)(`div`,{className:`flex gap-2`,children:[(0,H.jsx)(AO,{id:`override-cooldown`,placeholder:`例如 30s、5m`,value:n.cooldownDuration,onChange:e=>l({cooldownDuration:e.target.value}),className:`w-36 font-mono`}),(0,H.jsx)(Bk,{"aria-label":`冷却范围`,value:n.cooldownScope,onValueChange:e=>l({cooldownScope:e}),options:Object.keys(uF).map(e=>({value:e,label:uF[e]}))})]})]})}),(0,H.jsx)(MO,{label:`在帮助中`,htmlFor:`override-hidden`,children:(0,H.jsx)(vO,{value:n.hidden,onChange:e=>l({hidden:e}),options:[{value:`default`,label:e.hidden?`插件默认(隐藏)`:`插件默认(显示)`},{value:`no`,label:`显示`},{value:`yes`,label:`隐藏`}]})}),e.disabledGroups.length>0&&(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`mb-2 text-[13px] font-medium`,children:`已在这些群停用`}),(0,H.jsx)(`ul`,{className:`divide-y divide-border rounded-xl border border-border`,children:e.disabledGroups.map(t=>{let{platform:n,groupId:r}=jP(t);return(0,H.jsxs)(`li`,{className:`flex items-center justify-between px-3.5 py-2`,children:[(0,H.jsxs)(ZN,{to:AP(t),className:`min-w-0 hover:underline`,children:[(0,H.jsx)(`span`,{className:`font-mono text-[12.5px]`,children:r}),(0,H.jsx)(`span`,{className:`ml-2 text-[11.5px] text-fg-3`,children:n})]}),(0,H.jsx)(X,{variant:`ghost`,size:`sm`,loading:c.isPending&&c.variables?.groupKey===t,onClick:()=>c.mutate({path:e.path,groupKey:t}),children:`恢复`})]},t)})})]}),e.overrideIssues.length>0&&(0,H.jsx)(`div`,{className:`rounded-xl bg-danger-soft px-4 py-3 text-[12.5px] text-danger`,children:e.overrideIssues.map(e=>(0,H.jsx)(`div`,{children:e},e))})]})})}function vF(e){let t=/^\/groups\/(.+)$/.exec(e);return t?decodeURIComponent(t[1]):null}function yF(){let e=pj(),t=vF(XN()),n=RM({queryKey:[`groups`],queryFn:()=>$.groups()}),r=zM({mutationFn:()=>$.groups(!0),onSuccess:t=>e.setQueryData([`groups`],t)}),[i,a]=(0,V.useState)(``),[o,s]=(0,V.useState)(``),c=RM({queryKey:[`bots`],queryFn:$.bots}),[l,u]=(0,V.useState)(``),d=c.data?.find(e=>`${e.platform}:${e.selfId}`===l)??c.data?.[0],f=(0,V.useMemo)(()=>{let e=i.trim().toLowerCase();return(n.data??[]).filter(t=>!e||t.groupId.toLowerCase().includes(e)||t.name?.toLowerCase().includes(e)).sort((e,t)=>bF(t)-bF(e)||(e.name??e.groupId).localeCompare(t.name??t.groupId))},[n.data,i]);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Lv,{title:`群组`,description:`按群设置插件开关、配置覆盖、命令开关和访问控制。列表来自在线机器人的群,以及设置过规则的群`,actions:(0,H.jsxs)(X,{variant:`secondary`,loading:r.isPending,onClick:()=>r.mutate(),children:[(0,H.jsx)(Wr,{className:`size-3.5`}),`刷新群列表`]})}),(0,H.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-3`,children:[(0,H.jsx)(AO,{icon:(0,H.jsx)(ii,{}),placeholder:`搜索群名或群 ID`,value:i,onChange:e=>a(e.target.value),className:`w-72`}),(0,H.jsxs)(`form`,{className:`ml-auto flex gap-2`,onSubmit:e=>{e.preventDefault();let t=o.trim();if(!fP(t))return Z.error(`请输入群 ID`);if(!d)return Z.error(`请先添加机器人`);s(``),YN(AP(`${d.platform}:${d.selfId}:group:${t}`))},children:[(0,H.jsx)(Bk,{"aria-label":`机器人`,value:d?`${d.platform}:${d.selfId}`:``,onValueChange:u,options:(c.data??[]).map(e=>({value:`${e.platform}:${e.selfId}`,label:`${e.nickname||e.selfId} · ${e.platform}`}))}),(0,H.jsx)(AO,{icon:(0,H.jsx)(Ki,{}),placeholder:`按群 ID 打开`,value:o,onChange:e=>s(e.target.value),className:`w-44`}),(0,H.jsx)(X,{type:`submit`,variant:`secondary`,size:`icon`,"aria-label":`打开`,children:(0,H.jsx)(Rr,{className:`size-4`})})]})]}),n.error&&!n.data?(0,H.jsx)(J,{children:(0,H.jsx)(Iv,{error:n.error,onRetry:()=>void n.refetch(),retrying:n.isFetching})}):n.data?f.length===0?(0,H.jsx)(J,{children:(0,H.jsx)(Fv,{icon:(0,H.jsx)(Ki,{}),title:i?`没有匹配的群`:`还没有群`,description:i?void 0:`机器人上线后会列出它所在的群;也可以在右上角按群 ID 直接打开。`})}):(0,H.jsx)(J,{className:`overflow-hidden`,children:(0,H.jsx)(K.ul,{variants:Tv,initial:`initial`,animate:`animate`,className:`divide-y divide-border`,children:f.map(e=>(0,H.jsx)(K.li,{variants:Ev,children:(0,H.jsx)(xF,{group:e})},e.groupKey))})}):(0,H.jsx)(Pv,{className:`h-72 rounded-xl`}),(0,H.jsx)(SF,{groupKey:t,known:n.data,onClose:()=>YN(`/groups`)})]})}function bF(e){return e.rules.plugins+e.rules.configs+e.rules.commands+ +!!e.access}function xF({group:e}){let t=e.name??e.groupId;return(0,H.jsxs)(`button`,{type:`button`,onClick:()=>YN(AP(e.groupKey)),className:`group flex w-full cursor-pointer items-center gap-3 px-5 py-3 text-left transition-colors hover:bg-surface-2/60`,children:[(0,H.jsx)(`span`,{className:`flex size-9 shrink-0 items-center justify-center rounded-[10px] bg-surface-2 text-[13px] font-medium text-fg-2`,children:t.slice(0,1)}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsx)(`div`,{className:`truncate text-[13.5px] font-medium`,children:t}),(0,H.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-2 text-[11.5px] text-fg-3`,children:[(0,H.jsx)(`span`,{className:`font-mono`,children:e.groupId}),(0,H.jsx)(`span`,{children:mP(e.platform)}),e.bots.length>0?(0,H.jsxs)(`span`,{children:[`机器人 `,e.selfId]}):(0,H.jsx)(`span`,{children:`机器人不在群内`})]})]}),(0,H.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:[e.access===`block`&&(0,H.jsx)(kv,{tone:`danger`,children:`已屏蔽`}),e.access===`allow`&&(0,H.jsx)(kv,{tone:`success`,children:`白名单`}),e.rules.plugins>0&&(0,H.jsxs)(kv,{children:[e.rules.plugins,` 个插件开关`]}),e.rules.configs>0&&(0,H.jsxs)(kv,{tone:`accent`,children:[e.rules.configs,` 个配置覆盖`]}),e.rules.commands>0&&(0,H.jsxs)(kv,{children:[e.rules.commands,` 条命令停用`]}),(0,H.jsx)(on,{className:`size-4 text-fg-3 transition-transform group-hover:translate-x-0.5`})]})]})}function SF({groupKey:e,known:t,onClose:n}){let[r,i]=(0,V.useState)(`plugins`),a=RM({queryKey:[`group`,e],queryFn:()=>$.group(e),enabled:e!==null}),o=a.data?.group??t?.find(t=>t.groupKey===e);return(0,H.jsx)(dj,{open:e!==null,onOpenChange:e=>!e&&n(),title:o?.name??o?.groupId??e??``,subtitle:o?(0,H.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`font-mono`,children:o.groupId}),(0,H.jsx)(`span`,{children:mP(o.platform)})]}):void 0,children:e!==null&&(a.error&&!a.data?(0,H.jsx)(Iv,{error:a.error,onRetry:()=>void a.refetch(),retrying:a.isFetching,className:`py-16`}):a.data?(0,H.jsx)(bO,{value:r,onChange:i,className:`flex h-full flex-col`,tabs:[{value:`plugins`,label:`插件`,count:a.data.plugins.length},{value:`commands`,label:`命令`,count:a.data.commands.length},{value:`access`,label:`访问控制`}],children:(0,H.jsx)(bg,{mode:`wait`,initial:!1,children:(0,H.jsxs)(K.div,{initial:{opacity:0,x:8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8},transition:{duration:.16},className:`px-6 py-5`,children:[(0,H.jsx)(xO,{value:`plugins`,forceMount:!0,hidden:r!==`plugins`,children:r===`plugins`&&(0,H.jsx)(wF,{detail:a.data,groupKey:e})}),(0,H.jsx)(xO,{value:`commands`,forceMount:!0,hidden:r!==`commands`,children:r===`commands`&&(0,H.jsx)(TF,{detail:a.data,groupKey:e})}),(0,H.jsx)(xO,{value:`access`,forceMount:!0,hidden:r!==`access`,children:r===`access`&&(0,H.jsx)(EF,{group:a.data.group})})]},r)})}):(0,H.jsxs)(`div`,{className:`space-y-3 p-6`,children:[(0,H.jsx)(Pv,{className:`h-10`}),(0,H.jsx)(Pv,{className:`h-40`})]}))})}function CF(e){let t=pj();return()=>{t.invalidateQueries({queryKey:[`group`,e]}),t.invalidateQueries({queryKey:[`groups`]}),t.invalidateQueries({queryKey:[`pluginGroups`]}),t.invalidateQueries({queryKey:[`commands`]})}}function wF({detail:e,groupKey:t}){let n=RM({queryKey:[`plugins`],queryFn:$.plugins}),[r,i]=(0,V.useState)(null),a=CF(t),o=pj(),s=zM({mutationFn:({name:e,enabled:n})=>$.setPluginGroup(e,t,{enabled:n}),onMutate:({name:e,enabled:n})=>{o.setQueryData([`group`,t],t=>t&&{...t,plugins:t.plugins.map(t=>t.name===e?{...t,enabled:n}:t)})},onSettled:a});return e.plugins.length===0?(0,H.jsx)(Fv,{icon:(0,H.jsx)(ci,{}),title:`没有已加载的插件`,className:`py-10`}):(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsx)(`p`,{className:`text-[13px] leading-relaxed text-fg-3`,children:`插件开关与配置仅应用于这台机器人的当前群。配置按全局、机器人、群组逐层继承,保存覆盖后立即生效。`}),(0,H.jsx)(`ul`,{className:`space-y-2`,children:e.plugins.map(e=>{let o=n.data?.find(t=>t.name===e.name),c=r===e.name;return(0,H.jsxs)(`li`,{className:`overflow-hidden rounded-xl border border-border`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-4 py-3`,children:[(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`text-[13.5px] font-medium`,children:e.name}),e.override&&(0,H.jsx)(kv,{tone:`accent`,children:`配置已覆盖`})]}),o?.description&&(0,H.jsx)(`div`,{className:`mt-0.5 truncate text-[12px] text-fg-3`,children:o.description})]}),e.configurable&&(0,H.jsxs)(X,{variant:`ghost`,size:`sm`,onClick:()=>i(c?null:e.name),children:[(0,H.jsx)(ci,{className:`size-3.5`}),`配置`,(0,H.jsx)(K.span,{animate:{rotate:c?90:0},transition:q,children:(0,H.jsx)(on,{className:`size-3.5`})})]}),(0,H.jsx)(iA,{"aria-label":`在这个群启用 ${e.name}`,checked:e.enabled,onCheckedChange:t=>s.mutate({name:e.name,enabled:t})})]}),(0,H.jsx)(bg,{initial:!1,children:c&&o&&(0,H.jsx)(K.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:q,className:`overflow-hidden`,children:(0,H.jsx)(`div`,{className:`border-t border-border bg-surface-2/40 px-4 py-4`,children:(0,H.jsx)(FP,{plugin:o,inherited:e.inheritedConfig,effective:e.effectiveConfig,override:e.override,sources:e.configSources??{},save:e=>$.setPluginGroup(o.name,t,{config:e}),onSaved:a})})})})]},e.name)})})]})}function TF({detail:e,groupKey:t}){let n=CF(t),r=pj(),[i,a]=(0,V.useState)(``),o=zM({mutationFn:({path:e,enabled:n})=>$.setCommandGroup(e,t,n),onMutate:({path:e,enabled:n})=>{r.setQueryData([`group`,t],t=>t&&{...t,commands:t.commands.map(t=>t.path===e?{...t,enabled:n}:t)})},onSettled:n}),s=i.trim().toLowerCase(),c=e.commands.filter(e=>!s||e.path.toLowerCase().includes(s));return e.commands.length===0?(0,H.jsx)(Fv,{icon:(0,H.jsx)(Ei,{}),title:`没有已注册的命令`,className:`py-10`}):(0,H.jsxs)(`div`,{className:`space-y-4`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,H.jsx)(`p`,{className:`text-[13px] text-fg-3`,children:`在这个群停用的命令等于不存在,消息会交给其他处理器。`}),(0,H.jsx)(AO,{icon:(0,H.jsx)(ii,{}),placeholder:`搜索命令`,value:i,onChange:e=>a(e.target.value),className:`w-44`})]}),(0,H.jsx)(`ul`,{className:`divide-y divide-border rounded-xl border border-border`,children:c.map(e=>(0,H.jsxs)(`li`,{className:B(`flex items-center gap-3 px-4 py-2.5 transition-opacity`,!e.enabled&&`opacity-60`),children:[(0,H.jsxs)(`code`,{className:B(`font-mono text-[13px]`,!e.enabled&&`line-through`),children:[`/`,e.path]}),(0,H.jsx)(`span`,{className:`text-[12px] text-fg-3`,children:e.owner}),(0,H.jsx)(iA,{"aria-label":`在这个群启用 /${e.path}`,checked:e.enabled,onCheckedChange:t=>o.mutate({path:e.path,enabled:t}),className:`ml-auto`})]},e.path))})]})}function EF({group:e}){let t=pj(),n=CF(e.groupKey),r=t=>({list:t,subject:`group`,key:`${e.platform}:${e.groupId}`}),i=zM({mutationFn:async({add:e,remove:t})=>{t&&await $.removeAcl(t),e&&await $.addAcl(e)},onSuccess:()=>{t.invalidateQueries({queryKey:[`acl`]}),n()}}),a=e.access;return(0,H.jsxs)(`div`,{className:`space-y-3`,children:[(0,H.jsx)(`p`,{className:`text-[13px] text-fg-3`,children:`访问控制按平台和群共享,会同时影响其他机器人收到的这个群的事件。`}),[{list:`block`,title:`屏蔽这个群`,description:`这个群发来的所有事件都会被忽略(超管除外)。`,icon:(0,H.jsx)(Lt,{className:`size-4`})},{list:`allow`,title:`加入白名单`,description:`群白名单非空时,只有名单中的群能使用机器人;私聊不受影响。`,icon:(0,H.jsx)(un,{className:`size-4`})}].map(e=>{let t=a===e.list;return(0,H.jsxs)(`div`,{className:B(`flex items-center gap-4 rounded-xl border px-4 py-3.5 transition-colors`,t?e.list===`block`?`border-danger/40 bg-danger-soft/40`:`border-success/40 bg-success-soft/40`:`border-border`),children:[(0,H.jsx)(`span`,{className:B(e.list===`block`?`text-danger`:`text-success`),children:e.icon}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsx)(`div`,{className:`text-[13.5px] font-medium`,children:e.title}),(0,H.jsx)(`p`,{className:`mt-0.5 text-[12px] text-fg-3`,children:e.description})]}),(0,H.jsx)(X,{variant:t?`ghost`:`secondary`,size:`sm`,loading:i.isPending&&i.variables?.add?.list===e.list,onClick:()=>i.mutate(t?{remove:r(e.list)}:{add:r(e.list),...a?{remove:r(a)}:{}}),children:t?`取消`:e.list===`block`?`屏蔽`:`加入`})]},e.list)}),(0,H.jsxs)(`p`,{className:`flex items-center gap-1.5 pt-1 text-[12px] text-fg-3`,children:[(0,H.jsx)(mi,{className:`size-3.5`}),`完整的名单在“访问控制”页面管理。`]})]})}function DF({eventId:e}){let t=RM({queryKey:[`trace`,e],queryFn:()=>$.ext(`history`,`GET`,`/traces/${encodeURIComponent(e)}`),retry:!1,staleTime:1/0}),n=RM({queryKey:[`logs`,`event`,e],queryFn:()=>$.logs(200,e),staleTime:3e4});return t.isPending?(0,H.jsx)(Pv,{className:`h-20`}):t.error?(0,H.jsx)(`p`,{className:`text-[12.5px] text-fg-3`,children:t.error instanceof SN&&t.error.status===404?`这条消息没有处理记录(可能早于记录开始,或已被清理)。`:`无法加载处理记录:${t.error.message}`}):(0,H.jsx)(IA,{trace:t.data,logs:n.data})}var OF=50;function kF(){let e=RM({queryKey:[`groups`],queryFn:()=>$.groups()});return(0,V.useMemo)(()=>new Map((e.data??[]).flatMap(e=>e.name?[[e.groupKey,e.name]]:[])),[e.data])}function AF(e,t,n){return e.type===`group`?t.get(`${e.platform}:${e.selfId}:group:${e.id}`)??`群 ${e.id}`:n?`${n}(私聊)`:`私聊 ${e.id}`}function jF(e,t){return t?`${e} · 话题 ${t}`:e}function MF(e,t){return AF(e,t,e.last.direction===`in`?e.last.nickname:void 0)}function NF(){let e=pj(),t=kF(),[n,r]=(0,V.useState)(null),[i,a]=(0,V.useState)(``),[o,s]=(0,V.useState)(``),c=(0,V.useDeferredValue)(o.trim()),l=UN(),u=RM({queryKey:[`history`,`channels`],queryFn:()=>$.ext(`history`,`GET`,`/channels`)}),d=BM({queryKey:[`history`,`messages`,n,c],initialPageParam:void 0,queryFn:({pageParam:e})=>{let t=new URLSearchParams({limit:String(OF)});return n&&t.set(`channel`,n),c&&t.set(`q`,c),e!==void 0&&t.set(`before`,String(e)),$.ext(`history`,`GET`,`/messages?${t}`)},getNextPageParam:e=>e.more?e.items.at(-1)?.id:void 0}),f=l[0]?.time;(0,V.useEffect)(()=>{if(f===void 0)return;let t=window.setTimeout(()=>{e.invalidateQueries({queryKey:[`history`,`channels`]}),e.invalidateQueries({queryKey:[`history`,`messages`]})},600);return()=>window.clearTimeout(t)},[f,e]);let p=(0,V.useMemo)(()=>{let e=i.trim().toLowerCase();return(u.data??[]).filter(n=>!e||n.id.toLowerCase().includes(e)||n.thread?.id.toLowerCase().includes(e)||MF(n,t).toLowerCase().includes(e))},[u.data,i,t]),m=u.data?.find(e=>e.channel===n),h=m?jF(MF(m,t),m.thread?.id):`全部会话`,g=(0,V.useMemo)(()=>(d.data?.pages.flatMap(e=>e.items)??[]).toReversed(),[d.data]),_=(0,V.useRef)(null),v=(0,V.useRef)(null),y=d.data?.pages.length??0;(0,V.useLayoutEffect)(()=>{let e=_.current;if(!e||g.length===0)return;let t=v.current;!t||t.atBottom?e.scrollTop=e.scrollHeight:y>t.pages&&(e.scrollTop=e.scrollHeight-t.fromBottom)},[g,y]);let b=()=>{let e=_.current;if(!e)return;let t=e.scrollHeight-e.scrollTop;v.current={pages:y,fromBottom:t,atBottom:t-e.clientHeight<40}},x=e=>{v.current=null,r(e)};return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Lv,{title:`消息记录`,description:`history 插件记录的收发消息,以及每条消息经过了哪些插件处理`,actions:(0,H.jsxs)(X,{variant:`secondary`,onClick:()=>{let e=n?`?channel=${encodeURIComponent(n)}`:``;window.location.href=`/api/panel/ext/history/export${e}`},children:[(0,H.jsx)(En,{className:`size-3.5`}),n?`导出这个会话`:`导出全部`]})}),(0,H.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-[300px_1fr]`,children:[(0,H.jsxs)(J,{className:`flex h-[calc(100dvh-190px)] min-h-[480px] flex-col overflow-hidden`,children:[(0,H.jsx)(`div`,{className:`border-b border-border p-3`,children:(0,H.jsx)(AO,{icon:(0,H.jsx)(ii,{}),placeholder:`筛选会话`,value:i,onChange:e=>a(e.target.value)})}),(0,H.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-1.5`,children:[(0,H.jsx)(PF,{active:n===null,onClick:()=>x(null),title:`全部会话`,subtitle:u.data?`${u.data.length} 个会话`:void 0,icon:(0,H.jsx)(Xn,{className:`size-4`})}),u.error&&!u.data?(0,H.jsx)(Iv,{error:u.error,onRetry:()=>void u.refetch(),retrying:u.isFetching,className:`py-8`}):u.data?p.map(e=>(0,H.jsx)(PF,{active:n===e.channel,onClick:()=>x(e.channel),title:MF(e,t),threadId:e.thread?.id,subtitle:`${e.last.direction===`out`?`机器人:`:e.last.nickname?`${e.last.nickname}:`:``}${e.last.text||`[非文本消息]`}`,time:e.last.time,icon:e.thread?(0,H.jsx)(gr,{className:`size-4`}):e.type===`group`?(0,H.jsx)(`span`,{className:`text-[12px] font-medium`,children:MF(e,t).slice(0,1)}):(0,H.jsx)(ot,{id:e.id,name:e.last.nickname,size:32})},e.channel)):(0,H.jsxs)(`div`,{className:`space-y-1.5 p-1.5`,children:[(0,H.jsx)(Pv,{className:`h-12`}),(0,H.jsx)(Pv,{className:`h-12`}),(0,H.jsx)(Pv,{className:`h-12`})]})]})]}),(0,H.jsxs)(J,{className:`flex h-[calc(100dvh-190px)] min-h-[480px] flex-col overflow-hidden`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-border px-5 py-3`,children:[(0,H.jsxs)(`div`,{className:`min-w-0 leading-tight`,children:[(0,H.jsx)(`div`,{className:`truncate text-[13.5px] font-semibold`,title:h,children:h}),(0,H.jsx)(`div`,{className:`text-[11.5px] text-fg-3`,children:m?`${mP(m.platform)} · 机器人 ${m.selfId} · 共 ${m.count} 条`:`所有会话的消息按时间排列`})]}),(0,H.jsx)(AO,{icon:(0,H.jsx)(ii,{}),placeholder:`搜索消息内容`,value:o,onChange:e=>{v.current=null,s(e.target.value)},className:`w-56`})]}),(0,H.jsx)(`div`,{ref:_,onScroll:b,className:`flex-1 overflow-y-auto px-5 py-4`,children:d.error&&!d.data?(0,H.jsx)(Iv,{error:d.error,onRetry:()=>void d.refetch(),retrying:d.isFetching}):d.data?g.length===0?(0,H.jsx)(Fv,{icon:(0,H.jsx)(gr,{}),title:c?`没有匹配的消息`:`还没有消息记录`,description:c?void 0:`机器人收发消息后会出现在这里。`}):(0,H.jsxs)(`div`,{className:`space-y-1`,children:[d.hasNextPage&&(0,H.jsx)(`div`,{className:`flex justify-center pb-2`,children:(0,H.jsx)(X,{variant:`ghost`,size:`sm`,loading:d.isFetchingNextPage,onClick:()=>void d.fetchNextPage(),children:`加载更早的消息`})}),g.map(e=>(0,H.jsx)(FF,{message:e,showChannel:n===null,names:t},e.id))]}):(0,H.jsxs)(`div`,{className:`space-y-3`,children:[(0,H.jsx)(Pv,{className:`h-14`}),(0,H.jsx)(Pv,{className:`h-14`}),(0,H.jsx)(Pv,{className:`h-14`})]})})]})]})]})}function PF({active:e,onClick:t,title:n,threadId:r,subtitle:i,time:a,icon:o}){return(0,H.jsxs)(`button`,{type:`button`,onClick:t,"aria-pressed":e,"aria-label":r?jF(n,r):void 0,title:jF(n,r),className:B(`relative flex w-full cursor-pointer items-center gap-2.5 rounded-[10px] px-2.5 py-2 text-left transition-colors`,e?`text-fg`:`text-fg-2 hover:bg-surface-2/70`),children:[e&&(0,H.jsx)(K.span,{layoutId:`history-channel`,transition:q,className:`absolute inset-0 rounded-[10px] bg-accent-soft`}),(0,H.jsx)(`span`,{className:`relative flex size-8 shrink-0 items-center justify-center overflow-hidden rounded-[9px] bg-surface-2 text-fg-2`,children:o}),(0,H.jsxs)(`span`,{className:`relative min-w-0 flex-1`,children:[(0,H.jsxs)(`span`,{className:`flex items-center justify-between gap-2`,children:[(0,H.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-[13px] font-medium`,children:n}),r&&(0,H.jsxs)(`span`,{className:`shrink-0 text-[11px] text-fg-3`,children:[`话题 `,r.slice(-6)]}),a!==void 0&&(0,H.jsx)(`span`,{className:`shrink-0 text-[11px] text-fg-3`,children:sF(a)})]}),i&&(0,H.jsx)(`span`,{className:`block truncate text-[12px] text-fg-3`,children:i})]})]})}function FF({message:e,showChannel:t,names:n}){let[r,i]=(0,V.useState)(!1),a=e.direction===`out`,o=e.direction===`in`&&e.eventId!==void 0;return(0,H.jsxs)(`div`,{className:B(`group rounded-xl px-2 py-2 transition-colors`,r?`bg-surface-2/60`:`hover:bg-surface-2/40`),children:[(0,H.jsxs)(`div`,{className:`flex gap-3`,children:[a?(0,H.jsx)(qv,{className:`size-8 shrink-0`}):(0,H.jsx)(ot,{id:e.userId??`?`,name:e.nickname,size:32}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2 text-[12px]`,children:[(0,H.jsx)(`span`,{className:B(`font-medium`,a?`text-accent`:`text-fg`),children:a?`机器人`:e.nickname??e.userId}),!a&&e.nickname&&(0,H.jsx)(`span`,{className:`font-mono text-fg-3`,children:e.userId}),t&&(0,H.jsx)(`span`,{className:`break-all text-fg-3`,children:jF(AF(e.target,n),e.target.thread?.id)}),(0,H.jsx)(`span`,{className:`text-fg-3 tabular`,children:Uv(e.time)}),o&&(0,H.jsxs)(`button`,{type:`button`,onClick:()=>i(!r),className:B(`ml-auto inline-flex cursor-pointer items-center gap-1 rounded-md px-1.5 text-[11.5px] transition-opacity`,r?`text-accent`:`text-fg-3 opacity-0 group-hover:opacity-100 hover:text-fg-2`),children:[(0,H.jsx)(Ji,{className:`size-3`}),`处理链`,(0,H.jsx)(K.span,{animate:{rotate:r?180:0},transition:q,children:(0,H.jsx)(tn,{className:`size-3`})})]})]}),(0,H.jsx)(`div`,{className:`mt-0.5 text-[13.5px] leading-relaxed break-words whitespace-pre-wrap text-fg`,children:(0,H.jsx)(AA,{message:e.message})})]})]}),(0,H.jsx)(bg,{initial:!1,children:r&&e.eventId&&(0,H.jsx)(K.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:q,className:`overflow-hidden`,children:(0,H.jsx)(`div`,{className:`mt-2 ml-11 rounded-xl border border-border bg-surface px-4 py-3`,children:(0,H.jsx)(DF,{eventId:e.eventId})})})})]})}var IF=[{value:`trace`,label:`Trace`},{value:`debug`,label:`Debug`},{value:`info`,label:`Info`},{value:`warn`,label:`Warn`},{value:`error`,label:`Error`}],LF=new Set([`time`,`level`,`msg`,`plugin`,`eventId`,`pid`,`hostname`,`seq`]);function RF(){let e=QN(),t=(0,V.useMemo)(()=>new URLSearchParams(e.split(`?`)[1]),[e]),n=HN(),r=KN(),[i,a]=(0,V.useState)(`10`),[o,s]=(0,V.useState)(`*`),[c,l]=(0,V.useState)(``);(0,V.useEffect)(()=>{let t=new URLSearchParams(e.split(`?`)[1]);s(t.get(`plugin`)??`*`)},[e]);let[u,d]=(0,V.useState)(null),[f,p]=(0,V.useState)(!1),[m,h]=(0,V.useState)(null),[g,_]=(0,V.useState)(!0),v=(0,V.useRef)(null),y=f&&m?m:n,b=(0,V.useMemo)(()=>[...new Set(n.map(e=>e.plugin).filter(e=>!!e))].sort(),[n]),x=(0,V.useMemo)(()=>{let e=c.trim().toLowerCase(),n=Number(i);return y.filter(r=>r.level>=n&&(!t.has(`connectionId`)||r.connectionId===t.get(`connectionId`))&&(!t.has(`platform`)||r.platform===t.get(`platform`))&&(!t.has(`selfId`)||r.selfId===t.get(`selfId`))&&(u===null||r.eventId===u)&&(o===`*`||(o===`-`?!r.plugin:r.plugin===o))&&(!e||r.msg.toLowerCase().includes(e)||JSON.stringify(r).toLowerCase().includes(e))).slice(-600)},[y,i,o,c,u,t]);return(0,V.useEffect)(()=>{let e=v.current;e&&g&&x.length>0&&(e.scrollTop=e.scrollHeight)},[x,g]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Lv,{title:`日志`,description:`实时日志,保留最近 2000 条`,actions:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(zF,{}),(0,H.jsxs)(X,{variant:f?`primary`:`secondary`,onClick:()=>{h(f?null:n),p(!f)},children:[f?(0,H.jsx)(Ir,{className:`size-3.5`}):(0,H.jsx)(Mr,{className:`size-3.5`}),f?`继续`:`暂停`]}),(0,H.jsxs)(X,{variant:`ghost`,onClick:r,children:[(0,H.jsx)(Mn,{className:`size-3.5`}),`清空`]})]})}),(0,H.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2`,children:[(t.has(`connectionId`)||t.has(`selfId`))&&(0,H.jsxs)(`span`,{className:`inline-flex max-w-full items-center gap-1.5 rounded-lg border border-border py-1 pr-1 pl-2.5 text-xs text-fg-2`,children:[(0,H.jsx)(`span`,{className:`truncate`,children:t.has(`connectionId`)?`连接:${t.get(`connectionId`)}`:`机器人:${t.get(`platform`)} · ${t.get(`selfId`)}`}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`清除来源范围`,className:`rounded p-1 hover:bg-surface-2`,onClick:()=>{let e=new URLSearchParams(t);e.delete(`connectionId`),e.delete(`selfId`),e.delete(`platform`),YN(`/logs${e.size?`?${e}`:``}`)},children:(0,H.jsx)(Qi,{className:`size-3.5`})})]}),(0,H.jsx)(vO,{value:i,onChange:a,options:[{value:`10`,label:`全部`},{value:`30`,label:`Info+`},{value:`40`,label:`Warn+`},{value:`50`,label:`Error`}]}),(0,H.jsx)(Bk,{"aria-label":`按插件过滤`,value:o,onValueChange:s,options:[{value:`*`,label:`全部来源`},{value:`-`,label:`框架`},...b.map(e=>({value:e,label:e}))]}),u!==null&&(0,H.jsxs)(`span`,{className:`inline-flex h-8 items-center gap-1.5 rounded-lg border border-accent/30 bg-accent-soft py-0 pr-1 pl-2.5 text-[12.5px] text-accent-soft-fg`,children:[(0,H.jsx)(Ji,{className:`size-3.5`}),`只看事件 `,(0,H.jsx)(`span`,{className:`font-mono`,children:u.slice(0,8)}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`取消按事件过滤`,onClick:()=>d(null),className:`flex size-6 cursor-pointer items-center justify-center rounded-md hover:bg-accent/10`,children:(0,H.jsx)(Qi,{className:`size-3.5`})})]}),(0,H.jsx)(AO,{icon:(0,H.jsx)(ii,{}),placeholder:`搜索日志内容`,value:c,onChange:e=>l(e.target.value),className:`ml-auto w-64`})]}),(0,H.jsxs)(J,{className:`relative overflow-hidden`,children:[(0,H.jsx)(`div`,{ref:v,onScroll:e=>{let t=e.currentTarget;_(t.scrollHeight-t.scrollTop-t.clientHeight<40)},className:`h-[calc(100vh-270px)] min-h-[360px] overflow-y-auto py-1.5 font-mono text-[12.5px]`,children:x.length===0?(0,H.jsx)(Fv,{icon:(0,H.jsx)(ni,{}),title:y.length===0?`暂无日志`:`没有匹配的日志`,className:`h-full`}):x.map(e=>(0,H.jsx)(BF,{record:e,onEvent:d},e.seq))}),(0,H.jsx)(bg,{children:!g&&(0,H.jsx)(K.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:8},transition:q,className:`absolute right-4 bottom-4`,children:(0,H.jsxs)(X,{variant:`secondary`,size:`sm`,className:`shadow-pop`,onClick:()=>{_(!0),v.current?.scrollTo({top:v.current.scrollHeight,behavior:`smooth`})},children:[(0,H.jsx)(Tt,{className:`size-3.5`}),`最新`]})})}),f&&(0,H.jsx)(`div`,{className:`absolute top-3 right-4 rounded-md bg-warning-soft px-2 py-0.5 font-sans text-[11.5px] font-medium text-warning`,children:`已暂停`})]})]})}function zF(){let e=pj(),t=RM({queryKey:[`log-level`],queryFn:$.logLevel}),n=zM({mutationFn:$.setLogLevel,onSuccess:t=>{e.setQueryData([`log-level`],t),Z.success(`记录级别已调整为 ${t.level}`,{description:`仅本次运行有效,重启后恢复为配置文件中的 log.level`})}});return t.error?null:(0,H.jsxs)(`div`,{className:`mr-1 flex items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`text-[12.5px] text-fg-3`,children:`记录级别`}),(0,H.jsx)(Bk,{"aria-label":`记录级别`,value:t.data?.level,onValueChange:e=>n.mutate(e),options:IF,placeholder:`…`,className:`min-w-24`})]})}var BF=(0,V.memo)(function({record:e,onEvent:t}){let[n,r]=(0,V.useState)(!1),i=Gv(e.level),a=Object.fromEntries(Object.entries(e).filter(([e])=>!LF.has(e))),o=Object.keys(a).length>0;return(0,H.jsxs)(`div`,{className:B(`group relative [content-visibility:auto] [contain-intrinsic-size:auto_28px]`,n&&`bg-surface-2/60`),children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>o&&r(!n),className:B(`flex w-full items-start gap-3 px-4 py-[5px] text-left transition-colors hover:bg-surface-2/60`,o&&`cursor-pointer`),children:[(0,H.jsx)(`span`,{className:`shrink-0 text-fg-3 tabular`,children:Uv(e.time)}),(0,H.jsx)(`span`,{className:B(`w-12 shrink-0 rounded px-1 text-center text-[11px] leading-[18px] font-medium uppercase`,Kv[i]),children:i}),e.plugin&&(0,H.jsx)(`span`,{className:`shrink-0 rounded bg-accent-soft px-1.5 text-[11.5px] leading-[18px] text-accent-soft-fg`,children:e.plugin}),(0,H.jsx)(`span`,{className:B(`min-w-0 flex-1 break-words whitespace-pre-wrap`,e.level>=50?`text-danger`:`text-fg`),children:e.msg})]}),e.eventId&&(0,H.jsxs)(`button`,{type:`button`,title:`只看这次事件处理产生的日志`,onClick:()=>t(e.eventId),className:`absolute top-[5px] right-4 cursor-pointer rounded bg-surface-2 px-1.5 font-mono text-[11px] leading-[18px] text-fg-3 opacity-0 transition-opacity group-hover:opacity-100 hover:text-fg-2 focus-visible:opacity-100`,children:[`事件 `,e.eventId.slice(0,8)]}),(0,H.jsx)(bg,{initial:!1,children:n&&(0,H.jsx)(K.pre,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:q,className:`overflow-hidden px-4 pl-[170px] text-[12px] leading-relaxed text-fg-2`,children:(0,H.jsx)(`code`,{className:`block pb-2`,children:JSON.stringify(a,null,2)})})})]})});function VF(){return(0,H.jsx)(J,{className:`mt-10`,children:(0,H.jsx)(Fv,{icon:(0,H.jsx)(gn,{}),title:`页面不存在`,description:`这个地址没有对应的页面。`,action:(0,H.jsx)(X,{variant:`primary`,onClick:()=>YN(`/`),children:`回到概览`})})})}function HF(){let e=RM({queryKey:[`overview`],queryFn:$.overview,refetchInterval:6e4}),[t,n]=(0,V.useState)(`1h`),r=RM({queryKey:[`stats`,t],queryFn:()=>$.stats(t),refetchInterval:t===`24h`&&3e5,placeholderData:e=>e}),i=e.data,a=i?.bots.filter(e=>e.status===`online`).length??0;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Lv,{title:`概览`,description:new Date().toLocaleDateString(`zh-CN`,{month:`long`,day:`numeric`,weekday:`long`})}),e.error&&!e.data&&(0,H.jsx)(J,{className:`mb-3`,children:(0,H.jsx)(Iv,{error:e.error,onRetry:()=>void e.refetch(),retrying:e.isFetching,className:`py-8`})}),(0,H.jsxs)(K.div,{variants:Tv,initial:`initial`,animate:`animate`,className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:[(0,H.jsx)(UF,{icon:(0,H.jsx)(Ut,{}),label:`在线机器人`,loading:!i,value:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(TO,{value:a}),(0,H.jsxs)(`span`,{className:`text-fg-3`,children:[` / `,i?.bots.length??0]})]}),footer:i&&i.bots.length===0?`尚未配置连接`:a===i?.bots.length?(0,H.jsx)(`span`,{className:`text-success`,children:`全部在线`}):(0,H.jsxs)(`span`,{className:`text-warning`,children:[(i?.bots.length??0)-a,` 个离线`]})}),(0,H.jsx)(UF,{icon:(0,H.jsx)(Ct,{}),label:`今日收到`,loading:!i,value:(0,H.jsx)(TO,{value:i?.today.received??0}),footer:`条消息`}),(0,H.jsx)(UF,{icon:(0,H.jsx)(jt,{}),label:`今日发出`,loading:!i,value:(0,H.jsx)(TO,{value:i?.today.sent??0}),footer:`条消息`}),(0,H.jsx)(UF,{icon:(0,H.jsx)(Br,{}),label:`运行中插件`,loading:!i,value:(0,H.jsx)(TO,{value:i?.plugins.active??0}),footer:i&&i.plugins.failed>0?(0,H.jsxs)(ZN,{to:`/plugins`,className:`text-danger hover:underline`,children:[i.plugins.failed,` 个加载失败`]}):`${i?.plugins.disabled??0} 个已停用`})]}),(0,H.jsxs)(`div`,{className:`mt-3 grid gap-3 lg:grid-cols-3`,children:[(0,H.jsx)(K.div,{className:`lg:col-span-2`,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{...q,delay:.12},children:(0,H.jsxs)(J,{className:`h-full pb-3`,children:[(0,H.jsx)(Dv,{title:`消息趋势`,description:t===`1h`?`最近一小时,按分钟统计`:`最近 24 小时,每 15 分钟统计`,action:(0,H.jsx)(vO,{size:`sm`,value:t,onChange:n,options:[{value:`1h`,label:`1 小时`},{value:`24h`,label:`24 小时`}]})}),r.error&&!r.data?(0,H.jsx)(Iv,{error:r.error,onRetry:()=>void r.refetch(),retrying:r.isFetching,className:`py-12`}):r.data?(0,H.jsx)($v,{points:r.data,range:t,dimmed:r.isPlaceholderData}):(0,H.jsx)(`div`,{className:`px-5 pt-8 pb-4`,children:(0,H.jsx)(Pv,{className:`h-[232px] w-full`})})]})}),(0,H.jsx)(K.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{...q,delay:.16},children:(0,H.jsx)(KF,{bots:i?.bots})})]}),(0,H.jsxs)(`div`,{className:`mt-3 grid gap-3 lg:grid-cols-3`,children:[(0,H.jsx)(K.div,{className:`lg:col-span-2`,initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{...q,delay:.2},children:(0,H.jsx)(qF,{})}),(0,H.jsx)(K.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{...q,delay:.24},children:(0,H.jsx)(JF,{startedAt:i?.startedAt,rss:i?.memory.rss,heap:i?.memory.heapUsed,node:i?.node,version:i?.version})})]})]})}function UF({icon:e,label:t,value:n,footer:r,loading:i}){return(0,H.jsx)(K.div,{variants:Ev,whileHover:{y:-2},transition:q,children:(0,H.jsxs)(J,{className:`group relative overflow-hidden px-5 pt-4 pb-4`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between text-[12.5px] text-fg-3`,children:[t,(0,H.jsx)(`span`,{className:`flex size-7 items-center justify-center rounded-lg bg-surface-2 text-fg-3 transition-colors group-hover:bg-accent-soft group-hover:text-accent-soft-fg [&>svg]:size-3.5`,children:e})]}),i?(0,H.jsx)(Pv,{className:`mt-2 h-8 w-20`}):(0,H.jsx)(`div`,{className:`mt-1.5 text-[28px] leading-9 font-semibold tracking-[-0.03em] text-fg`,children:n}),(0,H.jsx)(`div`,{className:`mt-1 text-[12px] text-fg-3`,children:r})]})})}function WF(e){return e.status===`online`?`success`:e.status===`connecting`?`warning`:`danger`}var GF={online:`在线`,connecting:`连接中`,offline:`离线`};function KF({bots:e}){return(0,H.jsxs)(J,{className:`flex h-full flex-col`,children:[(0,H.jsx)(Dv,{title:`机器人`,description:`账号与连接状态`,action:(0,H.jsx)(ZN,{to:`/bots`,className:`text-[12.5px] text-fg-3 hover:text-fg`,children:`查看`})}),(0,H.jsx)(`div`,{className:`px-2 pb-3`,children:e?e.length===0?(0,H.jsx)(Fv,{icon:(0,H.jsx)(Hr,{}),title:`还没有连接`,description:`在配置文件的 adapters 段配置一个适配器,例如 OneBot 11 的正向或反向 WS。`,className:`py-8`}):(0,H.jsx)(`ul`,{children:e.map(e=>(0,H.jsxs)(`li`,{className:`flex items-center gap-3 rounded-xl px-3 py-2.5 transition-colors hover:bg-surface-2/70`,children:[(0,H.jsx)(ot,{id:e.selfId,name:e.nickname,src:e.avatar,size:34}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsx)(`div`,{className:`truncate text-[13.5px] font-medium`,children:e.nickname??e.selfId}),(0,H.jsxs)(`div`,{className:`truncate font-mono text-[11.5px] text-fg-3`,children:[e.selfId,` · `,e.connection]})]}),(0,H.jsx)(kv,{tone:WF(e),dot:!0,pulse:e.status===`online`,children:GF[e.status]})]},`${e.platform}:${e.selfId}`))}):(0,H.jsxs)(`div`,{className:`space-y-2 px-3`,children:[(0,H.jsx)(Pv,{className:`h-12`}),(0,H.jsx)(Pv,{className:`h-12`})]})}),(0,H.jsxs)(`div`,{className:`mt-auto border-t border-border px-2 py-2`,children:[(0,H.jsx)(`div`,{className:`px-3 pt-1 pb-1.5 text-[11.5px] font-medium text-fg-3`,children:`快捷入口`}),[{to:`/playground`,icon:(0,H.jsx)(Rn,{}),label:`在调试台试用插件`},{to:`/plugins`,icon:(0,H.jsx)(Br,{}),label:`管理插件与配置`},{to:`/logs`,icon:(0,H.jsx)(ni,{}),label:`查看实时日志`}].map(e=>(0,H.jsxs)(ZN,{to:e.to,className:`group flex h-9 items-center gap-2.5 rounded-lg px-3 text-[13px] text-fg-2 transition-colors hover:bg-surface-2/70 hover:text-fg [&>svg:first-child]:size-3.5 [&>svg:first-child]:text-fg-3`,children:[e.icon,(0,H.jsx)(`span`,{className:`flex-1`,children:e.label}),(0,H.jsx)(on,{className:`size-3.5 text-fg-3 transition-transform group-hover:translate-x-0.5`})]},e.to))]})]})}function qF(){let e=UN(),[,t]=(0,V.useState)(0);return(0,V.useEffect)(()=>{let e=window.setInterval(()=>t(e=>e+1),15e3);return()=>window.clearInterval(e)},[]),(0,H.jsxs)(J,{className:`h-full`,children:[(0,H.jsx)(Dv,{title:`实时消息`,description:`机器人收到和发出的消息`,action:(0,H.jsxs)(`span`,{className:`flex items-center gap-1.5 text-[12px] text-fg-3`,children:[(0,H.jsxs)(`span`,{className:`relative flex size-1.5`,children:[(0,H.jsx)(`span`,{className:`absolute inset-0 rounded-full bg-success motion-safe:animate-pulse-soft`}),(0,H.jsx)(`span`,{className:`relative size-full rounded-full bg-success`})]}),`实时`]})}),(0,H.jsx)(`div`,{className:`h-[316px] overflow-hidden px-2 pb-2 [mask-image:linear-gradient(to_bottom,black_85%,transparent)]`,children:e.length===0?(0,H.jsx)(Fv,{icon:(0,H.jsx)(gr,{}),title:`等待消息中`,description:`有人和机器人说话时,消息会出现在这里。`,className:`py-12`}):(0,H.jsx)(`ul`,{children:(0,H.jsx)(bg,{initial:!1,children:e.slice(0,14).map(e=>(0,H.jsxs)(K.li,{layout:!0,initial:{opacity:0,y:-14,scale:.98},animate:{opacity:1,y:0,scale:1},exit:{opacity:0},transition:q,className:`flex items-start gap-3 rounded-xl px-3 py-2`,children:[(0,H.jsx)(ot,{id:e.direction===`out`?e.selfId:e.userId??`?`,name:e.direction===`out`?`Bot`:e.nickname,src:e.avatar,size:28}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2 text-[12px]`,children:[(0,H.jsx)(`span`,{className:`font-medium text-fg`,children:e.direction===`out`?`机器人`:e.nickname??e.userId}),(0,H.jsx)(`span`,{className:B(`rounded px-1 text-[10.5px] font-medium`,e.direction===`out`?`bg-success-soft text-success`:`bg-accent-soft text-accent-soft-fg`),children:e.direction===`out`?`发出`:`收到`}),(0,H.jsx)(`span`,{className:`truncate text-fg-3`,children:e.channel.type===`group`?`群 ${e.channel.id}`:`私聊`}),(0,H.jsx)(`span`,{className:`ml-auto shrink-0 text-fg-3 tabular`,children:sF(e.time)})]}),(0,H.jsx)(`p`,{className:`mt-0.5 truncate text-[13px] text-fg-2`,children:e.preview||`[非文本消息]`})]})]},`${e.time}-${e.direction}-${e.preview}-${e.userId??``}`))})})})]})}function JF({startedAt:e,rss:t,heap:n,node:r,version:i}){let[a,o]=(0,V.useState)(Date.now());(0,V.useEffect)(()=>{let e=window.setInterval(()=>o(Date.now()),1e3);return()=>window.clearInterval(e)},[]);let s=[{label:`已运行`,value:e?oF(a-e):`—`},{label:`内存(RSS)`,value:t?aF(t):`—`},{label:`JS 堆`,value:n?aF(n):`—`},{label:`Node.js`,value:r??`—`},{label:`AsaBot`,value:i?`v${i}`:`—`}];return(0,H.jsxs)(J,{className:`h-full`,children:[(0,H.jsx)(Dv,{title:`系统`,description:`运行环境`,action:(0,H.jsx)(Sn,{className:`size-4 text-fg-3`})}),(0,H.jsx)(`dl`,{className:`space-y-0.5 px-5 pb-4`,children:s.map(e=>(0,H.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border py-2.5 last:border-0`,children:[(0,H.jsx)(`dt`,{className:`text-[13px] text-fg-3`,children:e.label}),(0,H.jsx)(`dd`,{className:`text-[13px] font-medium text-fg tabular`,children:e.value})]},e.label))})]})}var YF={segments:[`text`],textStyles:[]},XF=1572864,ZF=[{name:`notice.member.join`,label:`加入群聊`,icon:(0,H.jsx)(cr,{}),group:!0},{name:`notice.member.leave`,label:`退出群聊`,icon:(0,H.jsx)(ur,{}),group:!0},{name:`notice.member.mute`,label:`被禁言 10 分钟`,icon:(0,H.jsx)(vr,{}),group:!0},{name:`notice.poke`,label:`戳一戳机器人`,icon:(0,H.jsx)(Wn,{})},{name:`notice.message.recall`,label:`撤回上一条消息`,icon:(0,H.jsx)(Ii,{})},{name:`request.friend`,label:`申请加好友`,icon:(0,H.jsx)(Hi,{})},{name:`request.group.join`,label:`申请加群`,icon:(0,H.jsx)(Ki,{}),group:!0},{name:`request.group.invite`,label:`邀请机器人进群`,icon:(0,H.jsx)(zt,{}),group:!0}],QF=0;function $F(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result).replace(/^data:[^;]+;base64,/,``)),r.onerror=()=>n(r.error),r.readAsDataURL(e)})}function eI(){let e=uP(),t=RM({queryKey:[`commands`],queryFn:$.commands}),[n,r]=(0,V.useState)(`10001`),[i,a]=(0,V.useState)(`测试用户`),[o,s]=(0,V.useState)(`member`),[c,l]=(0,V.useState)(!1),[u,d]=(0,V.useState)(!1),[f,p]=(0,V.useState)(`group`),[m,h]=(0,V.useState)(`10000`),[g,_]=(0,V.useState)(``),[v,y]=(0,V.useState)(null),[b,x]=(0,V.useState)([]),[S,C]=(0,V.useState)(``),[w,T]=(0,V.useState)(null),[E,D]=(0,V.useState)([]),O=(0,V.useRef)(null),k=(0,V.useRef)(null),A=(0,V.useRef)(null);(0,V.useEffect)(()=>{e!==null&&(_(e),cP.set(null),O.current?.focus())},[e]),(0,V.useEffect)(()=>{E.length>0&&A.current?.scrollTo({top:A.current.scrollHeight,behavior:`smooth`})},[E]);let j=()=>({id:n,nickname:i,role:f===`group`?o:void 0,superuser:c}),M=u?YF:void 0,N=(e,t)=>{let n=Date.now();D(r=>[...r.map(n=>n.id===e?{...n,...t.incoming?{messageId:t.incoming.messageId}:{},traces:t.traces,logs:t.logs}:n),...t.replies.map(e=>({id:QF++,from:`bot`,time:n,message:e.message,text:e.text,messageId:e.messageId})),...t.actions.map(e=>({id:QF++,from:`system`,time:n,text:`机器人执行了 ${e.action}${Object.keys(e.params).length>0?` ${JSON.stringify(e.params)}`:``}`})),...t.replies.length===0&&t.actions.length===0?[{id:QF++,from:`system`,time:n,text:`没有回复`}]:[]])},ee=e=>D(t=>[...t,{id:QF++,from:`system`,time:Date.now(),text:`出错了:${e.message}`}]),P=zM({mutationFn:({message:e})=>$.playground({message:e,user:j(),group:f===`group`?m:null,capabilities:M}),meta:{silent:!0},onSuccess:(e,{sourceId:t})=>N(t,e),onError:ee}),F=zM({mutationFn:({name:e,fields:t})=>$.playgroundEvent({name:e,fields:t,user:j(),group:f===`group`?m:null,capabilities:M}),meta:{silent:!0},onSuccess:(e,{sourceId:t})=>N(t,e),onError:ee}),te=P.isPending||F.isPending,ne=(e=g)=>{let t=e.trim();if(!t&&!v||te)return;let n=[...w?.messageId?[{type:`reply`,data:{id:w.messageId}}]:[],...b.flatMap(e=>[{type:`at`,data:{id:e}},{type:`text`,data:{text:` `}}]),...t?[{type:`text`,data:{text:t}}]:[],...v?[{type:`image`,data:{file:`base64://${v}`}}]:[]],r=QF++;D(e=>[...e,{id:r,from:`user`,time:Date.now(),message:n,text:t}]),_(``),y(null),x([]),T(null),P.mutate({sourceId:r,message:n})},re=e=>{if(te)return;let t=[...E].reverse().find(e=>e.from===`user`&&e.messageId);if(e.name===`notice.message.recall`&&!t)return Z.error(`还没有可以撤回的消息`);let n=e.name===`notice.member.mute`?{duration:6e5}:e.name===`notice.poke`?{targetId:`playground`}:e.name===`notice.message.recall`?{messageId:t?.messageId}:e.name.startsWith(`request.`)?{comment:`来自调试台的测试请求`}:void 0,r=QF++;D(t=>[...t,{id:r,from:`system`,time:Date.now(),text:`模拟事件:${e.label}`}]),F.mutate({sourceId:r,name:e.name,...n?{fields:n}:{}})},ie=e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),ne())},ae=async e=>{if(e){if(!e.type.startsWith(`image/`))return Z.error(`只能附加图片`);if(e.size>XF)return Z.error(`图片不能超过 1.5 MB`);y(await $F(e))}},oe=e=>E.find(t=>t.messageId===e),se=(t.data??[]).filter(e=>!e.hidden).slice(0,8),ce=(g.trim().length>0||v!==null)&&!te;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Lv,{title:`调试台`,description:`模拟用户给机器人发消息或触发事件,走真实的插件和命令,但不会发到任何聊天平台`}),(0,H.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-[300px_1fr]`,children:[(0,H.jsxs)(`div`,{className:`space-y-3`,children:[(0,H.jsxs)(J,{children:[(0,H.jsx)(Dv,{title:`身份`,description:`以谁的身份发言`}),(0,H.jsxs)(`div`,{className:`space-y-4 px-5 pb-5`,children:[(0,H.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,H.jsx)(MO,{label:`用户 ID`,htmlFor:`pg-user`,children:(0,H.jsx)(AO,{id:`pg-user`,value:n,onChange:e=>r(e.target.value),className:`font-mono`})}),(0,H.jsx)(MO,{label:`昵称`,htmlFor:`pg-nick`,children:(0,H.jsx)(AO,{id:`pg-nick`,value:i,onChange:e=>a(e.target.value)})})]}),(0,H.jsx)(bg,{initial:!1,children:f===`group`&&(0,H.jsx)(K.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:q,className:`overflow-hidden`,children:(0,H.jsx)(MO,{label:`群角色`,children:(0,H.jsx)(vO,{className:`w-full [&>button]:flex-1`,value:o,onChange:s,options:[{value:`member`,label:(0,H.jsx)(rI,{icon:(0,H.jsx)(Wi,{className:`size-3`}),text:`成员`})},{value:`admin`,label:(0,H.jsx)(rI,{icon:(0,H.jsx)(vi,{className:`size-3`}),text:`管理员`})},{value:`owner`,label:(0,H.jsx)(rI,{icon:(0,H.jsx)(wn,{className:`size-3`}),text:`群主`})}]})})})}),(0,H.jsx)(tI,{id:`pg-superuser`,title:`超管`,description:`仅在调试台内生效`,checked:c,onChange:l})]})]}),(0,H.jsxs)(J,{children:[(0,H.jsx)(Dv,{title:`会话`,description:`消息发在哪里`}),(0,H.jsxs)(`div`,{className:`grid gap-4 px-5 pb-5`,children:[(0,H.jsx)(vO,{className:`w-full [&>button]:flex-1`,value:f,onChange:p,options:[{value:`group`,label:`群聊`},{value:`private`,label:`私聊`}]}),(0,H.jsx)(bg,{initial:!1,children:f===`group`&&(0,H.jsx)(K.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:q,className:`overflow-hidden`,children:(0,H.jsx)(MO,{label:`群号`,htmlFor:`pg-group`,hint:`群开关、白名单按这个群号判断`,children:(0,H.jsx)(AO,{id:`pg-group`,value:m,onChange:e=>h(e.target.value),className:`font-mono`})})})}),(0,H.jsx)(tI,{id:`pg-plain`,title:`模拟纯文本平台`,description:`图片、Markdown、按钮等会按平台能力降级`,checked:u,onChange:d})]})]})]}),(0,H.jsxs)(J,{className:`flex h-[calc(100dvh-200px)] min-h-[520px] flex-col overflow-hidden`,children:[(0,H.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border px-5 py-3`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,H.jsx)(qv,{className:`size-6`}),(0,H.jsxs)(`div`,{className:`leading-tight`,children:[(0,H.jsx)(`div`,{className:`text-[13.5px] font-semibold`,children:`AsaBot`}),(0,H.jsxs)(`div`,{className:`text-[11.5px] text-fg-3`,children:[f===`group`?`群 ${m}`:`与 ${i} 私聊`,u&&` · 纯文本平台`]})]})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,H.jsx)(SO,{trigger:(0,H.jsxs)(X,{variant:`ghost`,size:`sm`,disabled:te,children:[(0,H.jsx)(zt,{className:`size-3.5`}),`模拟事件`]}),children:ZF.map((e,t)=>(0,H.jsxs)(`div`,{children:[t===3&&(0,H.jsx)(wO,{}),(0,H.jsx)(CO,{icon:e.icon,disabled:e.group&&f!==`group`,onSelect:()=>re(e),children:e.label})]},e.name))}),(0,H.jsxs)(X,{variant:`ghost`,size:`sm`,disabled:E.length===0,onClick:()=>D([]),children:[(0,H.jsx)(Mn,{className:`size-3.5`}),`清空`]})]})]}),(0,H.jsxs)(`div`,{ref:A,className:`flex-1 space-y-3 overflow-y-auto px-5 py-5`,children:[E.length===0?(0,H.jsx)(iI,{suggestions:se.map(e=>`/${e.path}`),onPick:e=>ne(e)}):(0,H.jsx)(bg,{initial:!1,children:E.map(e=>(0,H.jsx)(oI,{entry:e,userId:n,nickname:i,onQuote:e.messageId?()=>T(e):void 0,renderReply:e=>(0,H.jsx)(aI,{entry:oe(e)})},e.id))}),(0,H.jsx)(bg,{children:te&&(0,H.jsx)(sI,{},`typing`)})]}),(0,H.jsxs)(`div`,{className:`border-t border-border p-3`,children:[se.length>0&&E.length>0&&(0,H.jsx)(`div`,{className:`mb-2 flex gap-1.5 overflow-x-auto pb-1`,children:se.map(e=>(0,H.jsxs)(`button`,{type:`button`,onClick:()=>{_(`/${e.path} `),O.current?.focus()},className:`shrink-0 cursor-pointer rounded-lg border border-border bg-surface px-2 py-1 font-mono text-[12px] text-fg-2 transition-colors hover:border-border-strong hover:text-fg`,children:[`/`,e.path]},e.path))}),(0,H.jsx)(bg,{initial:!1,children:(w||b.length>0||v)&&(0,H.jsx)(K.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:q,className:`overflow-hidden`,children:(0,H.jsxs)(`div`,{className:`mb-2 flex flex-wrap items-center gap-1.5`,children:[w&&(0,H.jsxs)(nI,{icon:(0,H.jsx)(Kr,{className:`size-3`}),onRemove:()=>T(null),children:[`回复:`,w.text?.slice(0,24)||`[消息]`]}),b.map(e=>(0,H.jsx)(nI,{icon:(0,H.jsx)(Ft,{className:`size-3`}),onRemove:()=>x(t=>t.filter(t=>t!==e)),children:e===`playground`?`机器人`:e},e)),v&&(0,H.jsxs)(nI,{onRemove:()=>y(null),children:[(0,H.jsx)(`img`,{src:`data:image/*;base64,${v}`,alt:`附图`,className:`h-6 rounded`}),`图片`]})]})})}),(0,H.jsxs)(`div`,{className:`flex items-end gap-1.5 rounded-xl border border-border bg-surface-2/50 p-1.5 transition-[border-color,box-shadow] focus-within:border-accent focus-within:shadow-[0_0_0_3px_var(--ring)]`,children:[(0,H.jsxs)(SO,{align:`start`,trigger:(0,H.jsx)(X,{variant:`ghost`,size:`icon`,"aria-label":`提及`,className:`size-9 rounded-[10px]`,children:(0,H.jsx)(Ft,{className:`size-4`})}),children:[(0,H.jsx)(CO,{icon:(0,H.jsx)(wi,{}),onSelect:()=>x(e=>[...new Set([...e,`playground`])]),children:`提及机器人`}),(0,H.jsx)(wO,{}),(0,H.jsxs)(`form`,{className:`flex gap-1 p-1`,onSubmit:e=>{e.preventDefault();let t=S.trim();t&&(x(e=>[...new Set([...e,t])]),C(``))},children:[(0,H.jsx)(AO,{placeholder:`用户 ID`,value:S,onChange:e=>C(e.target.value),onKeyDown:e=>e.stopPropagation(),className:`h-8 w-32 font-mono`}),(0,H.jsx)(X,{type:`submit`,size:`sm`,variant:`secondary`,children:`添加`})]})]}),(0,H.jsx)(X,{variant:`ghost`,size:`icon`,"aria-label":`附加图片`,className:`size-9 rounded-[10px]`,onClick:()=>k.current?.click(),children:(0,H.jsx)(Kn,{className:`size-4`})}),(0,H.jsx)(`input`,{ref:k,type:`file`,accept:`image/*`,className:`hidden`,onChange:e=>{ae(e.target.files?.[0]),e.target.value=``}}),(0,H.jsx)(`textarea`,{ref:O,rows:1,value:g,placeholder:`输入消息,回车发送,Shift + 回车换行;可以直接粘贴图片`,onChange:e=>_(e.target.value),onKeyDown:ie,onPaste:e=>{let t=[...e.clipboardData.files].find(e=>e.type.startsWith(`image/`));t&&(e.preventDefault(),ae(t))},className:`max-h-36 min-h-9 flex-1 resize-none bg-transparent px-2 py-2 text-[13.5px] leading-5 outline-none [field-sizing:content] placeholder:text-fg-3`}),(0,H.jsx)(X,{variant:`primary`,size:`icon`,"aria-label":`发送`,disabled:!ce,loading:P.isPending,onClick:()=>ne(),className:`size-9 rounded-[10px]`,children:(0,H.jsx)(Nt,{className:`size-4`})})]})]})]})]})]})}function tI({id:e,title:t,description:n,checked:r,onChange:i}){return(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-xl border border-border px-3.5 py-2.5`,children:[(0,H.jsxs)(`label`,{htmlFor:e,className:`cursor-pointer`,children:[(0,H.jsx)(`span`,{className:`block text-[13px] font-medium`,children:t}),(0,H.jsx)(`span`,{className:`text-[12px] text-fg-3`,children:n})]}),(0,H.jsx)(iA,{id:e,checked:r,onCheckedChange:i})]})}function nI({icon:e,children:t,onRemove:n}){return(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded-lg border border-border bg-surface py-0.5 pr-1 pl-2 text-[12px] text-fg-2`,children:[e,t,(0,H.jsx)(`button`,{type:`button`,"aria-label":`移除`,onClick:n,className:`flex size-5 cursor-pointer items-center justify-center rounded-md text-fg-3 hover:bg-surface-2 hover:text-fg`,children:(0,H.jsx)(Qi,{className:`size-3`})})]})}function rI({icon:e,text:t}){return(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[e,t]})}function iI({suggestions:e,onPick:t}){return(0,H.jsxs)(K.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:q,className:`flex h-full flex-col items-center justify-center text-center`,children:[(0,H.jsx)(`div`,{className:`mb-4 flex size-12 items-center justify-center rounded-2xl bg-accent-soft text-accent-soft-fg`,children:(0,H.jsx)(Rn,{className:`size-5`})}),(0,H.jsx)(`p`,{className:`text-[14px] font-medium`,children:`试试和机器人说点什么`}),(0,H.jsx)(`p`,{className:`mt-1 max-w-sm text-[13px] leading-relaxed text-fg-3`,children:`多轮对话(比如猜数)也可以:机器人提问后,直接继续发消息回答即可。右上角可以模拟入群、戳一戳、好友申请等事件。`}),e.length>0&&(0,H.jsx)(`div`,{className:`mt-5 flex max-w-md flex-wrap justify-center gap-2`,children:e.slice(0,6).map((e,n)=>(0,H.jsxs)(K.button,{type:`button`,initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{...q,delay:.05+n*.04},whileHover:{y:-2},onClick:()=>t(e),className:`flex cursor-pointer items-center gap-1.5 rounded-xl border border-border bg-surface px-3 py-1.5 font-mono text-[12.5px] text-fg-2 shadow-card hover:border-border-strong hover:text-fg`,children:[(0,H.jsx)(wi,{className:`size-3 text-accent`}),e]},e))})]})}function aI({entry:e}){return(0,H.jsxs)(`span`,{className:`inline-flex max-w-full items-center gap-1.5 rounded-lg border-l-2 border-current/40 bg-black/5 px-2 py-0.5 text-[12px] opacity-80 dark:bg-white/10`,children:[(0,H.jsx)(mr,{className:`size-3 shrink-0`}),(0,H.jsx)(`span`,{className:`truncate`,children:e?e.text||`[消息]`:`一条消息`})]})}function oI({entry:e,userId:t,nickname:n,onQuote:r,renderReply:i}){let[a,o]=(0,V.useState)(!1),s=e.traces??[],c=s.length>0&&(0,H.jsxs)(`button`,{type:`button`,onClick:()=>o(!a),className:B(`inline-flex cursor-pointer items-center gap-1 rounded-md px-1 text-[11px] transition-colors`,a?`text-accent`:`text-fg-3 hover:text-fg-2`),children:[(0,H.jsx)(Ji,{className:`size-3`}),`处理链`]}),l=(0,H.jsx)(bg,{initial:!1,children:a&&(0,H.jsx)(K.div,{initial:{height:0,opacity:0},animate:{height:`auto`,opacity:1},exit:{height:0,opacity:0},transition:q,className:`w-full overflow-hidden`,children:(0,H.jsx)(`div`,{className:`mt-1 space-y-4 rounded-xl border border-border bg-surface px-4 py-3 text-left`,children:s.map(t=>(0,H.jsx)(IA,{trace:t,logs:(e.logs??[]).filter(e=>e.eventId===t.eventId)},t.eventId))})})});if(e.from===`system`)return(0,H.jsxs)(K.div,{layout:!0,initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:q,className:`flex flex-col items-center gap-1`,children:[(0,H.jsxs)(`span`,{className:`flex items-center gap-2 rounded-full bg-surface-2 px-3 py-1 text-[12px] text-fg-3`,children:[e.text,c]}),(0,H.jsx)(`div`,{className:`w-full max-w-xl`,children:l})]});let u=e.from===`user`;return(0,H.jsxs)(K.div,{layout:!0,initial:{opacity:0,y:10,scale:.96,x:u?10:-10},animate:{opacity:1,y:0,scale:1,x:0},transition:Sv,className:B(`group flex items-start gap-2.5`,u&&`flex-row-reverse`),children:[u?(0,H.jsx)(ot,{id:t,name:n,size:28}):(0,H.jsx)(qv,{className:`size-7 shrink-0`}),(0,H.jsxs)(`div`,{className:B(`flex max-w-[72%] flex-col gap-1`,u?`items-end`:`items-start`),children:[(0,H.jsx)(`div`,{className:B(`rounded-2xl px-3.5 py-2 text-[13.5px] leading-relaxed break-words whitespace-pre-wrap`,u?`rounded-tr-md bg-accent text-accent-fg`:`rounded-tl-md border border-border bg-surface-2 text-fg`),children:e.message?(0,H.jsx)(AA,{message:e.message,renderReply:i}):e.text}),(0,H.jsxs)(`div`,{className:B(`flex items-center gap-1.5 px-1`,u&&`flex-row-reverse`),children:[(0,H.jsx)(`span`,{className:`text-[11px] text-fg-3 tabular`,children:Uv(e.time,!1)}),r&&(0,H.jsxs)(`button`,{type:`button`,onClick:r,className:`inline-flex cursor-pointer items-center gap-1 rounded-md px-1 text-[11px] text-fg-3 opacity-0 transition-opacity group-hover:opacity-100 hover:text-fg-2`,children:[(0,H.jsx)(Kr,{className:`size-3`}),`引用`]}),c]}),l]})]})}function sI(){return(0,H.jsxs)(K.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0},transition:q,className:`flex items-end gap-2.5`,children:[(0,H.jsx)(qv,{className:`size-7 shrink-0`}),(0,H.jsx)(`div`,{className:`flex gap-1 rounded-2xl rounded-bl-md border border-border bg-surface-2 px-3.5 py-3`,children:[0,1,2].map(e=>(0,H.jsx)(K.span,{className:`size-1.5 rounded-full bg-fg-3`,animate:{y:[0,-4,0],opacity:[.5,1,.5]},transition:{duration:.9,repeat:1/0,delay:e*.15,ease:`easeInOut`}},e))})]})}var cI=`bg.bg-glow.surface.surface-2.surface-3.overlay.border.border-strong.fg.fg-2.fg-3.accent.accent-hover.accent-fg.accent-soft.accent-soft-fg.success.success-soft.warning.warning-soft.danger.danger-soft.info.info-soft.series-in.series-out.ring.shadow-card.shadow-pop.highlight`.split(`.`);function lI(){let e=getComputedStyle(document.documentElement);return Object.fromEntries(cI.map(t=>[t,e.getPropertyValue(`--${t}`).trim()]))}async function uI(e,t,n,r){let i=`/api/panel/ext/${encodeURIComponent(e)}`,a=new URL(i+t,window.location.origin);if(a.origin!==window.location.origin||!(a.pathname===i||a.pathname.startsWith(`${i}/`)))return{status:400,body:{error:{code:`BAD_REQUEST`,message:`Path escapes the plugin routes`}}};let o=/^(GET|POST|PUT|PATCH|DELETE)$/.test(n)?n:`GET`,s=o!==`GET`&&r!==void 0;try{let e=await fetch(a,{method:o,credentials:`same-origin`,headers:s?{"Content-Type":`application/json`}:void 0,body:s?JSON.stringify(r):void 0}),t=await e.text(),n=t;try{n=t?JSON.parse(t):void 0}catch{}return{status:e.status,body:n}}catch{return{status:0,body:void 0}}}function dI({path:e}){let t=e.slice(7),n=RM({queryKey:[`plugins`],queryFn:$.plugins}),r=n.data?.find(e=>e.name===t),i=(0,V.useRef)(null),{resolved:a}=aP(),[o,s]=(0,V.useState)(!1),c=r?.state===`active`&&r.page!==void 0;if((0,V.useEffect)(()=>{r?.page&&(document.title=`${r.page.title} · AsaBot`)},[r?.page]),(0,V.useEffect)(()=>{if(!c)return;let n=e=>i.current?.contentWindow?.postMessage({asabot:1,...e},`*`),r=r=>{let a=i.current;if(!a||r.source!==a.contentWindow||window.location.pathname!==e)return;let o=r.data;if(o?.asabot===1){if(o.kind===`ready`)n({kind:`theme`,mode:document.documentElement.classList.contains(`dark`)?`dark`:`light`,tokens:lI()});else if(o.kind===`open-command-palette`)document.activeElement===a&&document.hasFocus()&&sP(()=>n({kind:`restore-focus`}));else if(o.kind===`toast`){let e=String(o.text).slice(0,300);o.level===`error`?Z.error(e):o.level===`success`?Z.success(e):Z(e)}else o.kind===`fetch`&&typeof o.id==`number`&&typeof o.path==`string`&&uI(t,o.path.startsWith(`/`)?o.path:`/${o.path}`,String(o.method??`GET`).toUpperCase(),o.body).then(e=>n({id:o.id,...e}))}};window.addEventListener(`message`,r);let a=FN(e=>{e.plugin===t&&n({kind:`event`,topic:e.topic,data:e.data})});return()=>{window.removeEventListener(`message`,r),a()}},[c,t,e]),(0,V.useEffect)(()=>{o&&i.current?.contentWindow?.postMessage({asabot:1,kind:`theme`,mode:a,tokens:lI()},`*`)},[a,o]),n.error&&!n.data)return(0,H.jsx)(J,{className:`min-h-0 overflow-y-auto overscroll-contain`,children:(0,H.jsx)(Iv,{error:n.error,onRetry:()=>void n.refetch(),retrying:n.isFetching})});if(!n.data)return(0,H.jsx)(Pv,{className:`min-h-0 flex-1 rounded-xl`});if(!c||!r?.page)return(0,H.jsx)(J,{className:`min-h-0 overflow-y-auto overscroll-contain`,children:(0,H.jsx)(Fv,{icon:(0,H.jsx)(xt,{}),title:`这个插件页面不可用`,description:r?r.state===`active`?`插件没有提供页面。`:`插件当前没有运行,启用后页面会出现在侧边栏。`:`没有名为 ${t} 的插件。`})});let l=`/plugin-pages/${encodeURIComponent(t)}/`;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`shrink-0`,children:(0,H.jsx)(Lv,{title:r.page.title,description:(0,H.jsxs)(H.Fragment,{children:[`由插件 `,(0,H.jsx)(`span`,{className:`font-medium text-fg-2`,children:r.name}),` 提供`]})})}),(0,H.jsxs)(J,{className:`relative min-h-0 flex-1 overflow-clip`,children:[!o&&(0,H.jsx)(Pv,{className:`absolute inset-0 rounded-none`}),(0,H.jsx)(`iframe`,{ref:i,title:r.page.title,src:l,sandbox:`allow-scripts allow-forms allow-popups`,onLoad:()=>s(!0),className:`block size-full border-0 bg-transparent`})]})]})}var fI=(0,V.lazy)(()=>TA(()=>import(`./markdown-MEN1AImu.js`).then(e=>({default:e.Markdown})),[]));function pI(e,t){if(!e.installed)return`安装`;let n=e.versions.findIndex(e=>e.version===t),r=e.versions.findIndex(t=>t.version===e.installed);return r===-1?`切换到`:n<r?`升级到`:`降级到`}var mI=[{value:`relevance`,label:`相关度`},{value:`updated`,label:`最近更新`},{value:`name`,label:`名称`}];function hI(e,t){let[n,r]=(0,V.useState)(e);return(0,V.useEffect)(()=>{let n=window.setTimeout(()=>r(e),t);return()=>window.clearTimeout(n)},[e,t]),n}function gI(){let[e,t]=(0,V.useState)(``),[n,r]=(0,V.useState)(`relevance`),i=hI(e.trim(),350),[a,o]=(0,V.useState)(null),[s,c]=(0,V.useState)(null),l=BM({queryKey:[`packageSearch`,i,n],queryFn:({pageParam:e})=>$.searchPackages(i,n,e),initialPageParam:0,getNextPageParam:(e,t)=>{let n=t.reduce((e,t)=>e+t.items.length,0);return e.items.length>0&&n<e.total?n:void 0},placeholderData:e=>e,retry:!1}),u=l.data?.pages.flatMap(e=>e.items),d=l.data?.pages[0]?.total;return(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-3`,children:[(0,H.jsx)(AO,{icon:(0,H.jsx)(ii,{}),placeholder:`搜索插件包(带有 asabot-plugin 关键词的 npm 包)`,value:e,onChange:e=>t(e.target.value),className:`w-full max-w-md`}),d!==void 0&&(0,H.jsxs)(`span`,{className:`text-[12.5px] text-fg-3`,children:[`共 `,d,` 个结果`]}),(0,H.jsx)(vO,{value:n,onChange:r,options:mI,size:`sm`,className:`ml-auto`})]}),l.isPending?(0,H.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[`a`,`b`,`c`,`d`].map(e=>(0,H.jsx)(Pv,{className:`h-[132px] rounded-xl`},e))}):l.error&&!u?(0,H.jsx)(J,{children:(0,H.jsx)(Fv,{icon:(0,H.jsx)(Er,{}),title:`无法连接插件源`,description:`${l.error.message}。可以在配置的 packages.registry 中换成可访问的镜像。`})}):!u||u.length===0?(0,H.jsx)(J,{children:(0,H.jsx)(Fv,{icon:(0,H.jsx)(Er,{}),title:`没有找到插件包`,description:`换个关键词试试。`})}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(K.div,{variants:Tv,initial:`initial`,animate:`animate`,className:B(`grid gap-3 sm:grid-cols-2 transition-opacity`,l.isPlaceholderData&&`opacity-60`),children:u.map(e=>(0,H.jsx)(_I,{item:e,onOpen:()=>o(e.name),onInstall:()=>c({name:e.name,version:e.version,description:e.description,verb:`安装`})},e.name))},`${i}:${n}`),l.hasNextPage&&(0,H.jsx)(`div`,{className:`mt-4 flex justify-center`,children:(0,H.jsxs)(X,{variant:`secondary`,loading:l.isFetchingNextPage,onClick:()=>void l.fetchNextPage(),children:[`加载更多`,(0,H.jsxs)(`span`,{className:`text-fg-3 tabular`,children:[u.length,` / `,d]})]})})]}),(0,H.jsx)(xI,{name:a,onClose:()=>o(null),onInstall:c}),(0,H.jsx)(SI,{target:s,onClose:()=>c(null)})]})}function _I({item:e,onOpen:t,onInstall:n}){let r=e.installed&&e.installedVersion!==e.version;return(0,H.jsx)(K.div,{variants:Ev,whileHover:{y:-2},transition:q,children:(0,H.jsxs)(J,{className:`flex h-full cursor-pointer flex-col p-4 transition-[border-color] hover:border-border-strong`,onClick:t,children:[(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),t()},className:`cursor-pointer truncate rounded font-mono text-[13.5px] font-semibold outline-none focus-visible:shadow-[0_0_0_3px_var(--ring)]`,children:e.name}),(0,H.jsxs)(`span`,{className:`font-mono text-[11px] text-fg-3`,children:[`v`,e.version]})]}),(0,H.jsx)(`div`,{className:`mt-0.5 text-[11.5px] text-fg-3`,children:[e.author,e.date&&sF(Date.parse(e.date))].filter(Boolean).join(` · `)})]}),e.installed?(0,H.jsx)(kv,{tone:r?`info`:`success`,dot:!0,children:r?`已安装 v${e.installedVersion}`:`已安装`}):(0,H.jsxs)(X,{size:`sm`,variant:`primary`,onClick:e=>{e.stopPropagation(),n()},children:[(0,H.jsx)(En,{className:`size-3.5`}),`安装`]})]}),(0,H.jsx)(`p`,{className:`mt-3 line-clamp-2 min-h-[38px] text-[13px] leading-relaxed text-fg-2`,children:e.description||`没有描述`}),(0,H.jsx)(`div`,{className:`mt-auto pt-3`,children:(0,H.jsx)(vI,{links:e.links})})]})})}function vI({links:e}){return(0,H.jsx)(`div`,{className:`flex gap-3 text-[12px]`,children:[[`npm`,e.npm],[`主页`,e.homepage],[`源码`,e.repository]].filter(e=>!!e[1]).map(([e,t])=>(0,H.jsxs)(`a`,{href:t,target:`_blank`,rel:`noopener noreferrer`,onClick:e=>e.stopPropagation(),className:`inline-flex items-center gap-1 text-fg-3 transition-colors hover:text-fg`,children:[e,(0,H.jsx)(Pn,{className:`size-3`})]},e))})}function yI(e){return e.versions.find(e=>e.compatible&&!e.deprecated)?.version??e.versions[0]?.version}function bI(e,t){return(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,H.jsxs)(`span`,{className:`font-mono`,children:[`v`,e.version]}),e.version===t.latest&&(0,H.jsx)(`span`,{className:`text-[11px] text-accent-soft-fg`,children:`最新`}),e.version===t.installed&&(0,H.jsx)(`span`,{className:`text-[11px] text-success`,children:`已安装`}),!e.compatible&&(0,H.jsx)(`span`,{className:`text-[11px] text-danger`,children:`不兼容`}),e.deprecated&&(0,H.jsx)(`span`,{className:`text-[11px] text-warning`,children:`已弃用`})]})}function xI({name:e,onClose:t,onInstall:n}){let[r,i]=(0,V.useState)(e);(0,V.useEffect)(()=>{e!==null&&i(e)},[e]);let a=RM({queryKey:[`packageInfo`,r],queryFn:()=>$.packageInfo(r),enabled:r!==null,staleTime:3e5,retry:!1}),[o,s]=(0,V.useState)(),c=a.data,l=o?.name===r?o.version:c&&yI(c),u=c?.versions.find(e=>e.version===l);return(0,H.jsx)(dj,{open:e!==null,onOpenChange:e=>!e&&t(),title:(0,H.jsx)(`span`,{className:`font-mono`,children:r}),subtitle:c?.description??(a.isPending?`加载中…`:void 0),children:a.error&&!c?(0,H.jsx)(Iv,{error:a.error,onRetry:()=>void a.refetch(),retrying:a.isFetching}):!c||!l?(0,H.jsxs)(`div`,{className:`space-y-3 p-6`,children:[(0,H.jsx)(Pv,{className:`h-10 w-full rounded-xl`}),(0,H.jsx)(Pv,{className:`h-4 w-3/4`}),(0,H.jsx)(Pv,{className:`h-4 w-2/3`}),(0,H.jsx)(Pv,{className:`h-40 w-full rounded-xl`})]}):(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`div`,{className:`space-y-3 border-b border-border px-6 py-4`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,H.jsx)(Bk,{"aria-label":`选择版本`,value:l,onValueChange:e=>s({name:c.name,version:e}),options:c.versions.map(e=>({value:e.version,label:bI(e,c)})),className:`min-w-48`}),(0,H.jsxs)(X,{variant:`primary`,disabled:l===c.installed,onClick:()=>n({name:c.name,version:l,description:c.description,installed:c.installed,verb:pI(c,l)}),children:[c.installed?(0,H.jsx)(cn,{className:`size-3.5`}):(0,H.jsx)(En,{className:`size-3.5`}),l===c.installed?`已安装此版本`:`${pI(c,l)} v${l}`]})]}),(0,H.jsx)(bg,{initial:!1,children:u&&(!u.compatible||u.deprecated)&&(0,H.jsx)(K.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:q,className:`overflow-hidden`,children:(0,H.jsxs)(`div`,{className:`space-y-1 rounded-xl bg-warning-soft px-3.5 py-2.5 text-[12.5px] leading-relaxed text-warning`,children:[!u.compatible&&(0,H.jsxs)(`p`,{className:`flex gap-2`,children:[(0,H.jsx)(Ri,{className:`mt-0.5 size-3.5 shrink-0`}),u.peerRange?`这个版本要求 asabot ${u.peerRange},与当前框架版本不兼容。`:`这个版本没有声明支持的 asabot 版本。`]}),u.deprecated&&(0,H.jsxs)(`p`,{className:`flex gap-2`,children:[(0,H.jsx)(Ri,{className:`mt-0.5 size-3.5 shrink-0`}),`已弃用:`,u.deprecated]})]})},l)}),(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-4 gap-y-1.5 text-[12px] text-fg-3`,children:[c.license&&(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,H.jsx)(Qr,{className:`size-3.5`}),c.license]}),u?.date&&(0,H.jsxs)(`span`,{children:[`发布于 `,sF(Date.parse(u.date))]}),(0,H.jsx)(vI,{links:c.links})]})]}),c.readme?.trim()?(0,H.jsx)(V.Suspense,{fallback:(0,H.jsxs)(`div`,{className:`space-y-2.5 px-6 py-5`,children:[(0,H.jsx)(Pv,{className:`h-5 w-1/2`}),(0,H.jsx)(Pv,{className:`h-4 w-full`}),(0,H.jsx)(Pv,{className:`h-4 w-5/6`})]}),children:(0,H.jsx)(fI,{className:`px-6 py-5`,children:c.readme})}):(0,H.jsx)(Fv,{icon:(0,H.jsx)(Vt,{}),title:`没有 README`,description:`这个插件包没有提供说明文档。`})]})})}function SI({target:e,onClose:t}){let n=GN(),[r,i]=(0,V.useState)(!1),[a,o]=(0,V.useState)(null),s=()=>{i(!1),o(null)},c=zM({mutationFn:e=>$.installPackage({name:e.name,version:e.version,force:r}),meta:{silent:!0},onSuccess:e=>{n(e),s(),t()},onError:e=>{e instanceof SN&&e.status===409?o(e.message):Z.error(e.message)}});return(0,H.jsx)(uj,{open:e!==null,onOpenChange:e=>{e||(s(),t())},title:`${e?.verb===`安装`?`安装`:`更换版本`} ${e?.name??``}`,description:e?.installed?`从 v${e.installed} ${e.verb} v${e.version}。`:e?.description,footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{variant:`ghost`,onClick:t,children:`取消`}),(0,H.jsxs)(X,{variant:`primary`,loading:c.isPending,disabled:a!==null&&!r,onClick:()=>e&&c.mutate(e),children:[(0,H.jsx)(En,{className:`size-3.5`}),e?.verb,` v`,e?.version]})]}),children:(0,H.jsxs)(`div`,{className:`space-y-3`,children:[(0,H.jsxs)(`div`,{className:`flex gap-2.5 rounded-xl bg-warning-soft px-3.5 py-3 text-[12.5px] leading-relaxed text-warning`,children:[(0,H.jsx)(gi,{className:`mt-0.5 size-4 shrink-0`}),`插件与框架运行在同一进程中,拥有完整权限。只安装你信任的插件包。`]}),(0,H.jsx)(bg,{children:a&&(0,H.jsx)(K.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:q,className:`overflow-hidden`,children:(0,H.jsxs)(`div`,{className:`space-y-3 rounded-xl border border-danger/30 bg-danger-soft px-3.5 py-3`,children:[(0,H.jsx)(`p`,{className:`text-[12.5px] text-danger`,children:a}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,H.jsx)(`label`,{htmlFor:`force-install`,className:`cursor-pointer text-[12.5px] text-fg-2`,children:`忽略版本要求,强制安装`}),(0,H.jsx)(iA,{id:`force-install`,checked:r,onCheckedChange:i})]})]})})})]})})}var CI=2097152;async function wI(e){let t=new Uint8Array(await e.arrayBuffer()),n=``;for(let e=0;e<t.length;e+=32768)n+=String.fromCharCode(...t.subarray(e,e+32768));return btoa(n)}function TI(e){let t=e.package;return!!(t?.latest&&t.latest!==t.version)}function EI({open:e,onOpenChange:t}){let n=pj(),r=(0,V.useRef)(null),[i,a]=(0,V.useState)(null),[o,s]=(0,V.useState)(!1),[c,l]=(0,V.useState)(!1),u=zM({mutationFn:async({file:e,overwrite:t})=>$.uploadPlugin({filename:e.name,content:await wI(e),overwrite:t}),meta:{silent:!0},onSuccess:e=>{n.invalidateQueries({queryKey:[`plugins`]}),n.invalidateQueries({queryKey:[`commands`]}),e.state===`failed`?Z.error(`${e.name} 已上传,但加载失败`,{description:e.error}):Z.success(`已安装 ${e.name}`),d()},onError:e=>{e instanceof SN&&e.status===409?l(!0):Z.error(e.message)}}),d=()=>{t(!1),a(null),l(!1)},f=e=>{if(e){if(!/\.(ts|js|zip)$/i.test(e.name))return Z.error(`只支持 .ts、.js 或 .zip 文件`);if(e.size>CI)return Z.error(`文件不能超过 2 MB`);a(e),l(!1)}};return(0,H.jsxs)(uj,{open:e,onOpenChange:e=>e?t(!0):d(),title:`上传插件`,description:`单个 .ts / .js 插件文件,或包含 index.ts 的 .zip 包。上传后立即加载。`,footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{variant:`ghost`,onClick:d,children:`取消`}),(0,H.jsx)(X,{variant:c?`danger`:`primary`,disabled:!i,loading:u.isPending,onClick:()=>i&&u.mutate({file:i,overwrite:c}),children:c?`覆盖并重载`:`上传`})]}),children:[(0,H.jsx)(`input`,{ref:r,type:`file`,accept:`.ts,.js,.zip`,className:`hidden`,onChange:e=>f(e.target.files?.[0])}),(0,H.jsxs)(K.button,{type:`button`,onClick:()=>r.current?.click(),onDragOver:e=>{e.preventDefault(),s(!0)},onDragLeave:()=>s(!1),onDrop:e=>{e.preventDefault(),s(!1),f(e.dataTransfer.files[0])},animate:{scale:o?1.015:1},transition:Sv,className:B(`flex w-full cursor-pointer flex-col items-center justify-center rounded-xl border border-dashed px-6 py-9 text-center transition-colors`,o?`border-accent bg-accent-soft`:`border-border-strong bg-surface-2/50 hover:bg-surface-2`),children:[(0,H.jsx)(K.span,{animate:{y:o?-4:0},transition:Sv,className:`mb-3 flex size-10 items-center justify-center rounded-xl bg-surface text-accent shadow-card`,children:(0,H.jsx)(In,{className:`size-5`})}),i?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{className:`font-mono text-[13px] text-fg`,children:i.name}),(0,H.jsxs)(`span`,{className:`mt-1 text-[12px] text-fg-3`,children:[(i.size/1024).toFixed(1),` KB · 点击更换`]})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{className:`text-[13.5px] font-medium text-fg`,children:`拖拽文件到这里,或点击选择`}),(0,H.jsx)(`span`,{className:`mt-1 text-[12px] text-fg-3`,children:`最大 2 MB`})]})]}),(0,H.jsx)(bg,{children:c&&(0,H.jsx)(K.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:q,className:`overflow-hidden`,children:(0,H.jsxs)(`div`,{className:`mt-3 flex gap-2 rounded-lg bg-warning-soft px-3 py-2.5 text-[12.5px] text-warning`,children:[(0,H.jsx)(Ri,{className:`mt-px size-4 shrink-0`}),`已存在同名插件。覆盖会替换原有文件并重新加载插件。`]})})})]})}function DI({plugin:e,onClose:t}){let n=pj(),r=GN(),[i,a]=(0,V.useState)(!1),o=zM({mutationFn:async e=>e.source===`package`&&e.package?(r(await $.uninstallPackage(e.package.name,i)),`queued`):(await $.uninstallPlugin(e.name,i),`done`),onSuccess:(e,r)=>{e===`done`&&(Z.success(`已卸载 ${r.name}`),n.invalidateQueries({queryKey:[`plugins`]}),n.invalidateQueries({queryKey:[`commands`]})),a(!1),t()}});return(0,H.jsx)(uj,{open:e!==null,onOpenChange:e=>!e&&t(),title:`卸载 ${e?.name??``}`,description:e?.source===`package`?`将通过 npm 卸载插件包 ${e.package?.name??``}。`:`将删除插件目录中的插件文件。依赖它的插件会被停用。`,footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(X,{variant:`ghost`,onClick:t,children:`取消`}),(0,H.jsxs)(X,{variant:`danger`,loading:o.isPending,onClick:()=>e&&o.mutate(e),children:[(0,H.jsx)(Ii,{className:`size-3.5`}),`卸载`]})]}),children:(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-4 rounded-xl border border-border px-4 py-3`,children:[(0,H.jsxs)(`label`,{htmlFor:`purge`,className:`cursor-pointer`,children:[(0,H.jsx)(`span`,{className:`block text-[13px] font-medium`,children:`同时清理数据`}),(0,H.jsx)(`span`,{className:`mt-0.5 block text-[12px] leading-relaxed text-fg-3`,children:`删除它的配置、存储的数据、数据表和数据目录。不清理的话,重新安装后可以继续使用原来的数据。`})]}),(0,H.jsx)(iA,{id:`purge`,checked:i,onCheckedChange:a})]})})}var OI={install:`安装`,update:`升级`,uninstall:`卸载`};function kI(){let e=WN(),[t,n]=(0,V.useState)(new Set),[r,i]=(0,V.useState)(Date.now());(0,V.useEffect)(()=>{let e=window.setInterval(()=>i(Date.now()),2e3);return()=>window.clearInterval(e)},[]);let a=e.filter(e=>!t.has(e.id)&&(e.status===`queued`||e.status===`running`||r-(e.finishedAt??r)<(e.status===`failed`?6e4:8e3)));return(0,H.jsx)(`div`,{className:`pointer-events-none fixed right-4 bottom-4 z-40 flex w-[360px] max-w-[calc(100vw-2rem)] flex-col gap-2`,children:(0,H.jsx)(bg,{initial:!1,children:a.map(e=>(0,H.jsx)(AI,{operation:e,onDismiss:()=>n(t=>new Set(t).add(e.id))},e.id))})})}function AI({operation:e,onDismiss:t}){let[n,r]=(0,V.useState)(e.status===`failed`),i=(0,V.useRef)(null),a=e.status===`queued`||e.status===`running`;return(0,V.useEffect)(()=>{e.status===`failed`&&r(!0)},[e.status]),(0,V.useEffect)(()=>{n&&e.log.length>0&&i.current?.scrollTo({top:i.current.scrollHeight})},[n,e.log.length]),(0,H.jsxs)(K.div,{layout:!0,initial:{opacity:0,y:16,scale:.97},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,x:24,transition:{duration:.18}},transition:Sv,className:`pointer-events-auto overflow-hidden rounded-xl border border-border bg-surface shadow-pop`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-3 px-3.5 py-3`,children:[(0,H.jsx)(`span`,{className:B(`flex size-7 shrink-0 items-center justify-center rounded-lg`,a&&`bg-accent-soft text-accent-soft-fg`,e.status===`succeeded`&&`bg-success-soft text-success`,e.status===`failed`&&`bg-danger-soft text-danger`),children:a?(0,H.jsx)(Nv,{className:`size-3.5`}):e.status===`succeeded`?(0,H.jsx)($t,{className:`size-3.5`,strokeWidth:2.5}):(0,H.jsx)(Qi,{className:`size-3.5`,strokeWidth:2.5})}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`truncate text-[13px] font-medium`,children:[OI[e.kind],` `,(0,H.jsx)(`span`,{className:`font-mono`,children:e.name})]}),(0,H.jsx)(`div`,{className:`truncate text-[12px] text-fg-3`,children:e.status===`queued`?`排队中…`:e.status===`running`?e.log.at(-1)??`正在执行 npm…`:e.status===`succeeded`?`完成${e.plugin?`,插件 ${e.plugin.name} 已${e.kind===`uninstall`?`移除`:`加载`}`:``}`:e.error??`失败`})]}),e.log.length>0&&(0,H.jsx)(X,{variant:`ghost`,size:`icon-sm`,"aria-label":`查看日志`,onClick:()=>r(!n),children:(0,H.jsx)(K.span,{animate:{rotate:n?180:0},transition:q,children:(0,H.jsx)(tn,{className:`size-3.5`})})}),!a&&(0,H.jsx)(X,{variant:`ghost`,size:`icon-sm`,"aria-label":`关闭`,onClick:t,children:(0,H.jsx)(Qi,{className:`size-3.5`})})]}),a&&(0,H.jsx)(`div`,{className:`h-0.5 overflow-hidden bg-surface-2`,children:(0,H.jsx)(K.div,{className:`h-full w-1/3 rounded-full bg-accent`,animate:{x:[`-100%`,`300%`]},transition:{duration:1.4,repeat:1/0,ease:`easeInOut`}})}),(0,H.jsx)(bg,{initial:!1,children:n&&(0,H.jsx)(K.div,{initial:{height:0},animate:{height:`auto`},exit:{height:0},transition:q,className:`overflow-hidden border-t border-border`,children:(0,H.jsx)(`pre`,{ref:i,className:`max-h-48 overflow-y-auto bg-surface-2/60 px-3.5 py-2.5 font-mono text-[11.5px] leading-relaxed whitespace-pre-wrap text-fg-2`,children:e.log.join(`
|
|
51
|
-
`)})})})]})}function jI({plugin:e,size:t=`sm`}){let n=zM({mutationFn:()=>$.updatePackage(e.package?.name??e.name),onSuccess:GN()});return TI(e)?(0,H.jsxs)(X,{variant:`soft`,size:t,loading:n.isPending,onClick:()=>n.mutate(),children:[(0,H.jsx)(cn,{className:`size-3.5`}),`升级到 v`,e.package?.latest]}):null}var MI={active:{label:`运行中`,tone:`success`},loading:{label:`加载中`,tone:`warning`},failed:{label:`加载失败`,tone:`danger`},disabled:{label:`已停用`,tone:`neutral`}};function NI(e){return e.source===`builtin`?`内置`:e.source===`package`?`npm · ${e.package?.name??e.name}`:`本地文件`}var PI=[`a`,`b`,`c`,`d`,`e`,`f`];function FI(e,t){e.setQueryData([`plugins`],e=>e?.map(e=>e.name===t.name?t:e))}function II(){let e=pj(),t=t=>FI(e,t);return{action:zM({mutationFn:({name:e,action:t})=>$.pluginAction(e,t),onMutate:({name:t,action:n})=>{n!==`reload`&&e.setQueryData([`plugins`],e=>e?.map(e=>e.name===t?{...e,enabled:n===`enable`}:e))},onSuccess:(n,{action:r})=>{t(n),e.invalidateQueries({queryKey:[`overview`]}),r===`reload`?Z.success(`已重载 ${n.name}`):n.state===`failed`&&Z.error(`${n.name} 启用失败`,{description:n.error})},onError:()=>void e.invalidateQueries({queryKey:[`plugins`]})}),update:t}}function LI(){let e=RM({queryKey:[`plugins`],queryFn:$.plugins}),[t,n]=(0,V.useState)(`all`),[r,i]=(0,V.useState)(``),[a,o]=(0,V.useState)(`installed`),[s,c]=(0,V.useState)(!1),[l,u]=(0,V.useState)(null),{action:d}=II(),f=pj(),p=zM({mutationFn:$.rescanPlugins,onSuccess:({added:e,removed:t,plugins:n})=>{f.setQueryData([`plugins`],n),f.invalidateQueries({queryKey:[`commands`]}),Z.success(e.length===0&&t.length===0?`没有发现变化`:[e.length>0&&`新增 ${e.join(`、`)}`,t.length>0&&`移除 ${t.join(`、`)}`].filter(Boolean).join(`;`))}}),m=(0,V.useMemo)(()=>{let n=r.trim().toLowerCase();return(e.data??[]).filter(e=>(t===`all`||e.state===t)&&(!n||e.name.toLowerCase().includes(n)||e.description?.toLowerCase().includes(n)))},[e.data,t,r]),h=(0,V.useMemo)(()=>{let t=e.data;if(t)return{all:t.length,active:t.filter(e=>e.state===`active`).length,disabled:t.filter(e=>e.state===`disabled`).length,failed:t.filter(e=>e.state===`failed`).length}},[e.data]);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Lv,{title:`插件`,description:h?`共 ${h.all} 个插件,${h.active} 个正在运行`:`管理插件的启停、配置和群开关`,actions:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(gO,{content:`发现插件目录中新增或删除的插件`,children:(0,H.jsxs)(X,{loading:!1,onClick:()=>p.mutate(),disabled:p.isPending,children:[(0,H.jsx)(K.span,{animate:p.isPending?{rotate:360}:{rotate:0},transition:p.isPending?{duration:.9,repeat:1/0,ease:`linear`}:q,className:`inline-flex`,children:(0,H.jsx)(Wr,{className:`size-3.5`})}),`重新扫描`]})}),(0,H.jsxs)(X,{variant:`primary`,onClick:()=>c(!0),children:[(0,H.jsx)(In,{className:`size-3.5`}),`上传插件`]})]})}),(0,H.jsx)(yO,{className:`mb-5`,value:a,onChange:o,tabs:[{value:`installed`,label:(0,H.jsxs)(H.Fragment,{children:[`已安装 `,(0,H.jsx)(RI,{n:h?.all})]})},{value:`market`,label:(0,H.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,H.jsx)(Ai,{className:`size-3.5`}),`插件市场`]})}]}),(0,H.jsx)(bg,{mode:`wait`,initial:!1,children:a===`market`?(0,H.jsx)(K.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:q,children:(0,H.jsx)(gI,{})},`market`):(0,H.jsxs)(K.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:q,children:[(0,H.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-2`,children:[(0,H.jsx)(vO,{value:t,onChange:n,options:[{value:`all`,label:(0,H.jsxs)(H.Fragment,{children:[`全部 `,(0,H.jsx)(RI,{n:h?.all})]})},{value:`active`,label:(0,H.jsxs)(H.Fragment,{children:[`运行中 `,(0,H.jsx)(RI,{n:h?.active})]})},{value:`disabled`,label:(0,H.jsxs)(H.Fragment,{children:[`已停用 `,(0,H.jsx)(RI,{n:h?.disabled})]})},{value:`failed`,label:(0,H.jsxs)(H.Fragment,{children:[`失败 `,(0,H.jsx)(RI,{n:h?.failed})]})}]}),(0,H.jsx)(AO,{icon:(0,H.jsx)(ii,{}),placeholder:`搜索插件`,value:r,onChange:e=>i(e.target.value),className:`ml-auto w-56`})]}),e.error&&!e.data?(0,H.jsx)(J,{children:(0,H.jsx)(Iv,{error:e.error,onRetry:()=>void e.refetch(),retrying:e.isFetching})}):e.data?m.length===0?(0,H.jsx)(J,{children:(0,H.jsx)(Fv,{icon:(0,H.jsx)(Br,{}),title:r||t!==`all`?`没有符合条件的插件`:`还没有插件`,description:`上传插件、从插件市场安装,或把插件文件放进插件目录后点“重新扫描”。`})}):(0,H.jsx)(K.div,{variants:Tv,initial:`initial`,animate:`animate`,className:`grid gap-3 sm:grid-cols-2 xl:grid-cols-3`,children:m.map(e=>(0,H.jsx)(zI,{plugin:e,onOpen:()=>YN(bP(e.name)),onToggle:t=>d.mutate({name:e.name,action:t?`enable`:`disable`}),onReload:()=>d.mutate({name:e.name,action:`reload`}),onUninstall:()=>u(e)},e.name))},t):(0,H.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2 xl:grid-cols-3`,children:PI.map(e=>(0,H.jsx)(Pv,{className:`h-[150px] rounded-xl`},e))})]},`installed`)}),(0,H.jsx)(EI,{open:s,onOpenChange:c}),(0,H.jsx)(DI,{plugin:l,onClose:()=>{u(null)}})]})}function RI({n:e}){return e===void 0?null:(0,H.jsx)(`span`,{className:`ml-0.5 text-fg-3 tabular`,children:e})}function zI({plugin:e,onOpen:t,onToggle:n,onReload:r,onUninstall:i}){let a=MI[e.state],o=e.commands.filter(e=>!e.hidden).length;return(0,H.jsx)(K.div,{variants:Ev,layout:!0,whileHover:{y:-2},transition:q,children:(0,H.jsxs)(J,{role:`button`,tabIndex:0,onClick:e=>{e.target.closest(`[data-card-control]`)||t()},onKeyDown:e=>e.key===`Enter`&&e.target===e.currentTarget&&t(),className:`group flex h-full cursor-pointer flex-col p-4 transition-[border-color,box-shadow] hover:border-border-strong hover:shadow-pop`,children:[(0,H.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,H.jsx)(`div`,{className:B(`flex size-9 shrink-0 items-center justify-center rounded-[10px] border border-border transition-colors`,e.state===`active`?`bg-accent-soft text-accent-soft-fg`:`bg-surface-2 text-fg-3`),children:(0,H.jsx)(Or,{className:`size-4`})}),(0,H.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,H.jsx)(`span`,{className:`truncate text-[14px] font-semibold tracking-[-0.01em]`,children:e.name}),e.version&&(0,H.jsxs)(`span`,{className:`font-mono text-[11px] text-fg-3`,children:[`v`,e.version]})]}),(0,H.jsx)(`div`,{className:`truncate text-[11.5px] text-fg-3`,children:NI(e)})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-1`,"data-card-control":!0,children:[(0,H.jsxs)(SO,{trigger:(0,H.jsx)(X,{variant:`ghost`,size:`icon-sm`,"aria-label":`更多操作`,className:`opacity-0 transition-opacity group-hover:opacity-100 data-[state=open]:opacity-100`,children:(0,H.jsx)(An,{className:`size-4`})}),children:[(0,H.jsx)(CO,{icon:(0,H.jsx)(Xr,{}),onSelect:r,children:`重载`}),(0,H.jsx)(CO,{icon:(0,H.jsx)(ci,{}),onSelect:t,children:`详情与配置`}),e.removable&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(wO,{}),(0,H.jsx)(CO,{icon:(0,H.jsx)(Ii,{}),danger:!0,onSelect:i,children:`卸载`})]})]}),(0,H.jsx)(iA,{"aria-label":`启用 ${e.name}`,checked:e.enabled,onCheckedChange:n})]})]}),(0,H.jsx)(bg,{mode:`wait`,initial:!1,children:e.state===`failed`&&e.error?(0,H.jsxs)(K.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:q,className:`mt-3 flex min-h-[38px] gap-2 rounded-lg bg-danger-soft px-2.5 py-1.5 text-[12px] leading-relaxed text-danger`,children:[(0,H.jsx)(Ri,{className:`mt-[3px] size-3.5 shrink-0`}),(0,H.jsx)(`span`,{className:`line-clamp-2 break-all`,children:e.error})]},`error`):(0,H.jsx)(K.p,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:`mt-3 line-clamp-2 min-h-[38px] text-[13px] leading-relaxed text-fg-2`,children:e.description||`没有描述`},`description`)}),(0,H.jsxs)(`div`,{className:`mt-auto flex items-center gap-2 pt-3`,children:[(0,H.jsx)(kv,{tone:a.tone,dot:!0,pulse:e.state===`loading`,children:a.label}),(0,H.jsxs)(`span`,{className:`flex items-center gap-1 text-[12px] text-fg-3`,children:[(0,H.jsx)(Ei,{className:`size-3.5`}),o,` 条命令`]}),TI(e)&&(0,H.jsxs)(`span`,{className:`ml-auto inline-flex items-center gap-1 text-[12px] text-info`,children:[(0,H.jsx)(cn,{className:`size-3.5`}),`v`,e.package?.latest]})]})]})})}function BI(){let e=XN().split(`/`).filter(Boolean).map(decodeURIComponent),t=e[1]??``,n=e[2]??`overview`,r=RM({queryKey:[`plugins`],queryFn:$.plugins}),[i,a]=(0,V.useState)(null),{action:o}=II();if(r.error)return(0,H.jsx)(Iv,{error:r.error,onRetry:()=>void r.refetch()});if(!r.data)return(0,H.jsx)(Pv,{className:`h-64 rounded-xl`});let s=r.data.find(e=>e.name===t);return s?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(ZN,{to:`/plugins`,className:`mb-4 inline-flex items-center gap-1.5 text-[13px] text-fg-3 hover:text-fg`,children:[(0,H.jsx)(Dt,{className:`size-3.5`}),`插件列表`]}),(0,H.jsx)(Lv,{title:(0,H.jsxs)(`span`,{className:`flex items-center gap-3`,children:[s.name,(0,H.jsx)(kv,{tone:MI[s.state].tone,dot:!0,children:MI[s.state].label})]}),description:s.description,actions:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(X,{loading:o.isPending,onClick:()=>o.mutate({name:t,action:`reload`}),children:[(0,H.jsx)(Xr,{className:`size-3.5`}),`重载`]}),(0,H.jsx)(iA,{"aria-label":`全局启用插件`,checked:s.enabled,disabled:t===`admin`||o.isPending,onCheckedChange:e=>o.mutate({name:t,action:e?`enable`:`disable`})})]})}),(0,H.jsxs)(`div`,{className:`mb-5 flex flex-wrap gap-4 text-[13px]`,children:[(0,H.jsx)(ZN,{to:`/logs?plugin=${encodeURIComponent(t)}`,className:`text-accent`,children:`查看日志`}),(0,H.jsx)(ZN,{to:`/tasks?plugin=${encodeURIComponent(t)}`,className:`text-accent`,children:`查看任务`})]}),(0,H.jsx)(yO,{value:n,onChange:e=>YN(bP(t,e)),tabs:[{value:`overview`,label:`概览`},{value:`config`,label:`全局配置`},{value:`commands`,label:`命令`},{value:`bots`,label:`机器人`},{value:`groups`,label:`群组`}],className:`mb-5 overflow-x-auto`}),(0,H.jsxs)(J,{className:`p-5 sm:p-6`,children:[n===`overview`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(GI,{plugin:s,onUninstall:()=>a(s)}),(0,H.jsx)(VI,{plugin:s})]}),n===`config`&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`p`,{className:`mb-4 text-[13px] text-fg-3`,children:[`这里的配置是默认值,机器人与群组可分别覆盖。`,(0,H.jsx)(ZN,{to:bP(t,`bots`),className:`ml-1 text-accent`,children:`查看机器人覆盖`})]}),(0,H.jsx)(qI,{plugin:s})]}),n===`commands`&&(0,H.jsx)(YI,{plugin:s}),n===`bots`&&(0,H.jsx)(HI,{plugin:s}),n===`groups`&&(0,H.jsx)(XI,{plugin:s})]}),(0,H.jsx)(DI,{plugin:i,onClose:()=>a(null)})]}):(0,H.jsx)(Fv,{icon:(0,H.jsx)(Br,{}),title:`插件不存在或已卸载`,action:(0,H.jsx)(X,{onClick:()=>YN(`/plugins`),children:`返回插件列表`})})}function VI({plugin:e}){return(0,H.jsxs)(`section`,{className:`mt-6 border-t border-border pt-5`,children:[(0,H.jsx)(`h2`,{className:`text-sm font-semibold`,children:`机器人能力要求`}),e.capabilities?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`p`,{className:`mt-2 text-[12.5px] text-fg-3`,children:`能力缺失会提示,不影响启用。各机器人的匹配情况可在“机器人”中查看。`}),[`required`,`optional`].map(t=>(0,H.jsxs)(`div`,{className:`mt-4`,children:[(0,H.jsx)(`h3`,{className:`mb-2 text-[12px] text-fg-3`,children:t===`required`?`必须能力`:`可选能力`}),(0,H.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:Object.entries(e.capabilities?.[t]??{}).flatMap(([e,t])=>t.map(t=>(0,H.jsxs)(kv,{children:[(0,H.jsx)(`span`,{className:`text-fg-3`,children:e}),t]},`${e}:${t}`)))})]},t))]}):(0,H.jsx)(`p`,{className:`mt-2 text-[13px] text-fg-3`,children:`插件未声明能力要求。`})]})}function HI({plugin:e}){let t=pj(),n=zM({mutationFn:t=>$.pluginBotDefault(e.name,t),onSuccess:e=>FI(t,e)});return(0,H.jsxs)(`div`,{className:`space-y-5`,children:[(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-b border-border pb-5`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h2`,{className:`text-sm font-semibold`,children:(0,H.jsx)(`label`,{htmlFor:`new-bot-plugin-default`,className:`cursor-pointer`,children:`新机器人默认启用`})}),(0,H.jsx)(`p`,{className:`mt-1 text-[13px] text-fg-3`,children:`仅影响之后首次接入的机器人。`})]}),(0,H.jsx)(iA,{id:`new-bot-plugin-default`,className:`ml-auto`,checked:n.isPending?n.variables:e.defaultOnNewBots,disabled:n.isPending,onCheckedChange:e=>n.mutate(e)})]}),!e.enabled&&(0,H.jsx)(`p`,{className:`text-[13px] text-fg-3`,children:`重新全局启用后,会按各机器人的开关生效。`}),(0,H.jsx)(UI,{plugin:e})]})}function UI({plugin:e}){let t=pj(),n=RM({queryKey:[`pluginBots`,e.name],queryFn:()=>$.pluginBots(e.name)}),r=zM({mutationFn:({bot:t,enabled:n})=>$.botPlugin(t,e.name,{enabled:n}),onSuccess:()=>CP(t)});return n.error?(0,H.jsx)(Iv,{error:n.error,onRetry:()=>void n.refetch()}):n.data?n.data.length?(0,H.jsx)(`ul`,{className:`divide-y divide-border`,children:n.data.map(({bot:t,application:n})=>(0,H.jsxs)(`li`,{className:`py-4 first:pt-0 last:pb-0`,children:[(0,H.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-between gap-3`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(ZN,{to:vP(t),className:`text-sm font-medium hover:text-accent`,children:t.nickname||t.selfId}),(0,H.jsxs)(`p`,{className:`mt-1 break-all font-mono text-[11.5px] text-fg-3`,children:[t.platform,` · `,t.selfId]})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(ZN,{to:vP(t,`plugins/${encodeURIComponent(e.name)}`),className:`text-[12.5px] text-accent`,children:`配置与继承`}),(0,H.jsx)(iA,{"aria-label":`在 ${t.nickname??t.selfId} 上启用`,checked:n.overrideEnabled??n.botDefaultEnabled,disabled:r.isPending,onCheckedChange:e=>r.mutate({bot:t,enabled:e})})]})]}),(0,H.jsx)(Rv,{value:n.compatibility}),n.override&&(0,H.jsxs)(`p`,{className:`mt-2 text-[12px] text-fg-3`,children:[`配置已覆盖:`,Object.keys(n.override).join(`、`)]})]},`${t.platform}:${t.selfId}`))}):(0,H.jsx)(Fv,{icon:(0,H.jsx)(Ut,{}),title:`还没有机器人`,action:(0,H.jsx)(X,{onClick:()=>YN(`/bots/connections/new`),children:`添加连接`})}):(0,H.jsx)(Pv,{className:`h-32`})}function WI({label:e,children:t}){return(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-6 border-b border-border py-3 last:border-0`,children:[(0,H.jsx)(`dt`,{className:`shrink-0 text-[13px] text-fg-3`,children:e}),(0,H.jsx)(`dd`,{className:`min-w-0 text-right text-[13px] break-all text-fg`,children:t})]})}function GI({plugin:e,onUninstall:t}){return(0,H.jsxs)(`div`,{className:`space-y-5`,children:[e.state===`failed`&&e.error&&(0,H.jsxs)(`div`,{className:`flex gap-2.5 rounded-xl bg-danger-soft px-3.5 py-3 text-[13px] text-danger`,children:[(0,H.jsx)(Ri,{className:`mt-0.5 size-4 shrink-0`}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`font-medium`,children:`加载失败`}),(0,H.jsx)(`p`,{className:`mt-0.5 leading-relaxed break-all`,children:e.error})]})]}),(0,H.jsxs)(`dl`,{children:[(0,H.jsx)(WI,{label:`状态`,children:MI[e.state].label}),(0,H.jsx)(WI,{label:`全局开关`,children:e.enabled?`已启用`:`已停用`}),(0,H.jsx)(WI,{label:`版本`,children:e.version?(0,H.jsxs)(`span`,{className:`font-mono`,children:[`v`,e.version]}):`—`}),(0,H.jsx)(WI,{label:`来源`,children:e.source===`builtin`?`内置插件`:e.source===`package`?`npm 插件包`:`本地文件`}),e.package&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(WI,{label:`包名`,children:(0,H.jsx)(`span`,{className:`font-mono`,children:e.package.name})}),(0,H.jsxs)(WI,{label:`已安装版本`,children:[(0,H.jsxs)(`span`,{className:`font-mono`,children:[`v`,e.package.version]}),e.package.latest&&e.package.latest!==e.package.version&&(0,H.jsxs)(`span`,{className:`ml-2 text-info`,children:[`最新 v`,e.package.latest]})]}),e.package.peerRange&&(0,H.jsxs)(WI,{label:`要求框架版本`,children:[(0,H.jsx)(`span`,{className:B(`font-mono`,!e.package.compatible&&`text-danger`),children:e.package.peerRange}),!e.package.compatible&&(0,H.jsx)(`span`,{className:`ml-2 text-danger`,children:`与当前版本不兼容`})]})]}),e.path&&(0,H.jsx)(WI,{label:`文件`,children:(0,H.jsx)(`span`,{className:`font-mono text-[12px] text-fg-2`,children:e.path})}),(0,H.jsxs)(WI,{label:`命令`,children:[e.commands.length,` 条`]}),(0,H.jsx)(WI,{label:`可配置`,children:e.configSchema?`是`:`否`}),e.depends&&e.depends.length>0&&(0,H.jsx)(WI,{label:`依赖插件`,children:(0,H.jsx)(`span`,{className:`inline-flex flex-wrap justify-end gap-2`,children:e.depends.map(e=>(0,H.jsx)(ZN,{to:bP(e),className:`text-accent`,children:e},e))})}),e.provides.length>0&&(0,H.jsx)(WI,{label:`提供服务`,children:(0,H.jsx)(JI,{services:e.provides.map(e=>({name:e,optional:!1}))})}),e.inject.length>0&&(0,H.jsx)(WI,{label:`依赖服务`,children:(0,H.jsx)(JI,{services:e.inject})})]}),TI(e)&&(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-3 rounded-xl bg-info-soft px-4 py-3`,children:[(0,H.jsxs)(`span`,{className:`text-[13px] text-info`,children:[`有新版本 v`,e.package?.latest,` 可用`]}),(0,H.jsx)(jI,{plugin:e})]}),e.removable&&(0,H.jsx)(`div`,{className:`rounded-xl border border-danger/25 px-4 py-3.5`,children:(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`text-[13px] font-medium text-fg`,children:`卸载插件`}),(0,H.jsxs)(`p`,{className:`mt-0.5 text-[12px] text-fg-3`,children:[e.source===`package`?`通过 npm 卸载这个插件包。`:`删除插件目录中的插件文件。`,`可以选择同时清理数据。`]})]}),(0,H.jsxs)(X,{variant:`danger-ghost`,size:`sm`,onClick:t,children:[(0,H.jsx)(Ii,{className:`size-3.5`}),`卸载`]})]})})]})}function KI(e,t){if(!(t instanceof SN))return{};let n=[`plugins.${e}.config.`,`plugins.${e}.config`,`config.`,`config`];return Object.fromEntries(t.issues.map(e=>{let t=n.find(t=>e.path.startsWith(t));return[t?e.path.slice(t.length):e.path,e.message]}))}function qI({plugin:e}){let{update:t}=II(),n=zM({mutationFn:t=>$.pluginConfig(e.name,t),meta:{silent:!0},onSuccess:e=>{t(e),Z.success(`配置已保存,插件已重载`)},onError:e=>{e instanceof SN&&e.status===400||Z.error(e.message)}});return e.configSchema?(0,H.jsx)(hA,{schema:e.configSchema,value:e.config,issues:n.error?KI(e.name,n.error):{},saving:n.isPending,onSubmit:e=>n.mutate(e)}):(0,H.jsx)(Fv,{icon:(0,H.jsx)(ci,{}),title:`没有可配置项`,description:`插件没有声明 config schema。`,className:`py-10`})}function JI({services:e}){return(0,H.jsx)(`span`,{className:`inline-flex flex-wrap justify-end gap-1.5`,children:e.map(({name:e,optional:t})=>(0,H.jsx)(`span`,{title:t?`可选:缺失时插件照常运行`:void 0,children:(0,H.jsxs)(kv,{className:`font-mono`,children:[e,t&&(0,H.jsx)(`span`,{className:`font-sans text-fg-3`,children:`可选`})]})},e))})}function YI({plugin:e}){return e.commands.length===0?(0,H.jsx)(Fv,{icon:(0,H.jsx)(Ei,{}),title:`这个插件没有注册命令`,className:`py-10`}):(0,H.jsx)(`ul`,{className:`space-y-2`,children:e.commands.map(e=>(0,H.jsx)(`li`,{className:`group rounded-xl border border-border px-3.5 py-3`,children:(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`code`,{className:`font-mono text-[13px] font-medium text-fg`,children:e.usage}),e.description&&(0,H.jsx)(`p`,{className:`mt-1 text-[12.5px] text-fg-3`,children:e.description}),(0,H.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1.5`,children:[e.aliases.map(e=>(0,H.jsxs)(kv,{children:[`别名 `,e]},e)),e.permission&&(0,H.jsx)(kv,{tone:`warning`,children:`需要权限`}),e.scope!==`all`&&(0,H.jsx)(kv,{tone:`info`,children:e.scope===`group`?`仅群聊`:`仅私聊`}),e.hidden&&(0,H.jsx)(kv,{children:`隐藏`})]})]}),(0,H.jsxs)(X,{variant:`soft`,size:`sm`,className:`opacity-0 transition-opacity group-hover:opacity-100`,onClick:()=>{cP.set(`/${e.path} `),YN(`/playground`)},children:[(0,H.jsx)(Rn,{className:`size-3.5`}),`试用`]})]})},e.path))})}function XI({plugin:e}){let t=pj(),n=RM({queryKey:[`pluginGroups`,e.name],queryFn:()=>$.pluginGroups(e.name)}),[r,i]=(0,V.useState)(``),a=RM({queryKey:[`bots`],queryFn:$.bots}),[o,s]=(0,V.useState)(``),c=a.data?.find(e=>`${e.platform}:${e.selfId}`===o)??a.data?.[0],l=zM({mutationFn:({groupKey:t,enabled:n})=>$.setPluginGroup(e.name,t,{enabled:n}),onMutate:({groupKey:n,enabled:r})=>{t.setQueryData([`pluginGroups`,e.name],(e=[])=>e.some(e=>e.groupKey===n)?e.map(e=>e.groupKey===n?{...e,enabled:r}:e):[...e,{groupKey:n,enabled:r}])},onSettled:()=>{t.invalidateQueries({queryKey:[`pluginGroups`,e.name]}),t.invalidateQueries({queryKey:[`groups`]})}});return(0,H.jsxs)(`div`,{className:`space-y-5`,children:[(0,H.jsxs)(`p`,{className:`text-[13px] leading-relaxed text-fg-3`,children:[`插件在机器人上启用后,默认在它的所有群生效。可单独关闭某个群,私聊不受影响。`,e.configSchema&&`按群覆盖配置请到“群组”页面中打开对应的群。`]}),(0,H.jsxs)(`form`,{className:`flex flex-wrap gap-2`,onSubmit:e=>{e.preventDefault();let t=r.trim();if(!fP(t))return Z.error(`请输入群 ID`);if(!c)return Z.error(`请先添加机器人`);l.mutate({groupKey:`${c.platform}:${c.selfId}:group:${t}`,enabled:!1}),i(``)},children:[(0,H.jsx)(Bk,{"aria-label":`机器人`,value:c?`${c.platform}:${c.selfId}`:``,onValueChange:s,options:(a.data??[]).map(e=>({value:`${e.platform}:${e.selfId}`,label:`${e.nickname||e.selfId} · ${e.platform}`}))}),(0,H.jsx)(AO,{icon:(0,H.jsx)(Ki,{}),placeholder:`群 ID`,value:r,onChange:e=>i(e.target.value),className:`flex-1`}),(0,H.jsxs)(X,{type:`submit`,variant:`secondary`,children:[(0,H.jsx)(Rr,{className:`size-4`}),`在该群关闭`]})]}),n.error&&!n.data?(0,H.jsx)(Iv,{error:n.error,onRetry:()=>void n.refetch(),retrying:n.isFetching,className:`py-8`}):n.isPending?(0,H.jsx)(Pv,{className:`h-24`}):(n.data??[]).length===0?(0,H.jsx)(Fv,{icon:(0,H.jsx)(Ki,{}),title:`没有单独设置的群`,description:`当前在所有群都生效。`,className:`py-8`}):(0,H.jsx)(`ul`,{className:`divide-y divide-border rounded-xl border border-border`,children:(0,H.jsx)(bg,{initial:!1,children:n.data?.map(e=>(0,H.jsxs)(K.li,{layout:!0,initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:q,className:`flex items-center justify-between px-4 py-3`,children:[(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsx)(`span`,{className:`font-mono text-[13px] text-fg`,children:e.groupKey.split(`:`).slice(3).join(`:`)}),e.config!==void 0&&(0,H.jsx)(ZN,{to:AP(e.groupKey),children:(0,H.jsx)(kv,{tone:`accent`,children:`配置已覆盖`})})]}),(0,H.jsx)(`div`,{className:`text-[11.5px] text-fg-3`,children:e.groupKey.split(`:`).slice(0,2).join(` · `)})]}),(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(`span`,{className:B(`text-[12.5px]`,e.enabled===!1?`text-fg-3`:`text-success`),children:e.enabled===!1?`已关闭`:`已开启`}),(0,H.jsx)(iA,{"aria-label":`${e.groupKey} 开关`,checked:e.enabled!==!1,onCheckedChange:t=>l.mutate({groupKey:e.groupKey,enabled:t})})]})]},e.groupKey))})})]})}var ZI={type:`object`,properties:{superusers:{type:`array`,items:{type:`object`,required:[`platform`,`selfId`,`userId`],properties:{platform:{type:`string`,title:`平台`},selfId:{type:`string`,title:`机器人 ID`},userId:{type:`string`,title:`用户 ID`}}},title:`框架管理员`,description:`身份绑定平台、机器人和用户,可在聊天中管理全局插件、安装包与访问控制。各机器人的管理员在机器人设置中配置`},timezone:{type:`string`,title:`时区`,description:`IANA 时区名称,例如 Asia/Shanghai。用于定时任务和“今日”统计,重启后生效`}}},QI={type:`object`,properties:{prefixes:{type:`array`,items:{type:`string`},title:`命令前缀`,description:`消息以其中任一前缀开头时识别为命令`},mentionAsPrefix:{type:`boolean`,title:`@机器人时可省略前缀`,description:`群聊中 @机器人 后可以直接写命令名`},privateRequirePrefix:{type:`boolean`,title:`私聊也需要前缀`,description:`关闭时私聊可以直接写命令名`},replyOnError:{type:`boolean`,title:`出错时回复`,description:`命令处理出错时回复一条简短提示`},replyOnDenied:{type:`boolean`,title:`拒绝时回复`,description:`权限不足或冷却中时回复提示`},suggest:{type:`string`,title:`相似命令提示`,description:`命令写错时回复“你是不是想用 /xxx?”,只提示不执行`,oneOf:[{const:`direct`,title:`私聊和 @机器人 时`},{const:`always`,title:`所有带前缀的消息`},{const:`off`,title:`关闭`}]}}},$I={timezone:`时区`};function eL(e,t){return e instanceof SN?Object.fromEntries(e.issues.filter(e=>e.path.startsWith(t)).map(e=>[e.path.slice(t.length).replace(/^\./,``),e.message])):{}}function tL(){let e=pj(),t=RM({queryKey:[`settings`],queryFn:$.settings}),n=zM({mutationFn:({input:e})=>$.updateSettings(e),meta:{silent:!0},onSuccess:(t,{message:n})=>{e.setQueryData([`settings`],t),Z.success(n)},onError:e=>{e instanceof SN&&e.status===400||Z.error(e.message)}}),r=e=>n.variables?.section===e?n.error:null,i=e=>n.isPending&&n.variables?.section===e;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Lv,{title:`设置`,description:`框架的核心配置,保存后写回配置文件`}),t.error&&!t.data?(0,H.jsx)(J,{children:(0,H.jsx)(Iv,{error:t.error,onRetry:()=>void t.refetch(),retrying:t.isFetching})}):t.data?(0,H.jsxs)(K.div,{variants:Tv,initial:`initial`,animate:`animate`,className:`max-w-3xl space-y-3`,children:[(0,H.jsx)(bg,{initial:!1,children:t.data.restartRequired.length>0&&(0,H.jsx)(K.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:q,className:`overflow-hidden`,children:(0,H.jsxs)(`div`,{className:`flex items-center gap-2.5 rounded-xl bg-warning-soft px-4 py-3 text-[13px] text-warning`,children:[(0,H.jsx)(Xr,{className:`size-4 shrink-0`}),`以下修改已写入配置文件,重启 AsaBot 后生效:`,t.data.restartRequired.map(e=>$I[e]??e).join(`、`)]})})}),(0,H.jsx)(nL,{icon:(0,H.jsx)(bi,{}),title:`基本`,description:`框架管理员与时区`,children:(0,H.jsx)(hA,{schema:ZI,value:{superusers:t.data.superusers,timezone:t.data.timezone},issues:eL(r(`basic`),``),saving:i(`basic`),note:`管理员设置立即生效,时区在重启后生效`,submitLabel:`保存`,onSubmit:e=>n.mutate({section:`basic`,input:e,message:`基本设置已保存`})})}),(0,H.jsx)(nL,{icon:(0,H.jsx)(Ei,{}),title:`命令`,description:`命令的触发方式与回复行为`,children:(0,H.jsx)(hA,{schema:QI,value:t.data.command,issues:eL(r(`command`),`command`),saving:i(`command`),note:`保存后立即生效`,submitLabel:`保存`,onSubmit:e=>n.mutate({section:`command`,input:{command:e},message:`命令设置已保存`})})})]}):(0,H.jsxs)(`div`,{className:`max-w-3xl space-y-3`,children:[(0,H.jsx)(Pv,{className:`h-56 rounded-xl`}),(0,H.jsx)(Pv,{className:`h-72 rounded-xl`})]})]})}function nL({icon:e,title:t,description:n,action:r,children:i}){return(0,H.jsx)(K.div,{variants:Ev,children:(0,H.jsxs)(J,{children:[(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-4 px-6 pt-5 pb-1`,children:[(0,H.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,H.jsx)(`div`,{className:`flex size-8 shrink-0 items-center justify-center rounded-lg border border-border bg-surface-2 text-fg-2 [&>svg]:size-4`,children:e}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h2`,{className:`text-[14px] font-semibold tracking-[-0.01em] text-fg`,children:t}),(0,H.jsx)(`p`,{className:`mt-0.5 text-[12.5px] text-fg-3`,children:n})]})]}),r]}),(0,H.jsx)(`div`,{className:`px-6 pt-4 pb-6`,children:i})]})})}var rL={pending:{label:`待执行`,tone:`neutral`},running:{label:`执行中`,tone:`accent`},retry_wait:{label:`等待重试`,tone:`warning`},cancelling:{label:`等待退出`,tone:`warning`},succeeded:{label:`已完成`,tone:`success`},failed:{label:`失败`,tone:`danger`},cancelled:{label:`已取消`,tone:`neutral`}},iL={running:`执行中`,succeeded:`成功`,failed:`失败`,cancelled:`取消`,interrupted:`中断`,timeout:`超时`},aL=e=>e===void 0?`—`:new Date(e).toLocaleString(`zh-CN`,{hour12:!1}),oL=e=>`/tasks/${encodeURIComponent(e)}${window.location.search}`;function sL(){let e=XN(),t=QN(),n=e.startsWith(`/tasks/`)?decodeURIComponent(e.slice(7)):null,[r,i]=(0,V.useState)(``),a=new URLSearchParams(t.split(`?`)[1]).get(`plugin`)??`all`,[o,s]=(0,V.useState)(`all`),[c,l]=(0,V.useState)({plugin:a,page:0}),u=c.plugin===a?c.page:0,d=e=>l({plugin:a,page:e}),f=RM({queryKey:[`plugins`],queryFn:$.plugins}),p={q:r,...a===`all`?{}:{plugin:a},...o===`all`?{}:{state:o},limit:`25`,offset:String(u*25)},m=RM({queryKey:[`tasks`,`list`,p],queryFn:()=>$.tasks(p),refetchInterval:15e3}),h=m.data?.total??0;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Lv,{title:`任务中心`,description:`查看插件的一次性任务、执行历史与重试状态。`,actions:(0,H.jsxs)(X,{variant:`secondary`,loading:m.isFetching,onClick:()=>void m.refetch(),children:[(0,H.jsx)(Wr,{className:`size-3.5`}),`刷新`]})}),(0,H.jsxs)(`div`,{className:`mb-4 flex flex-wrap gap-3`,children:[(0,H.jsx)(AO,{"aria-label":`搜索任务`,icon:(0,H.jsx)(ii,{}),placeholder:`搜索插件、任务名或键`,value:r,onChange:e=>{i(e.target.value),d(0)},className:`w-64`}),(0,H.jsx)(Bk,{"aria-label":`任务状态`,value:o,onValueChange:e=>{s(e),d(0)},options:[{value:`all`,label:`全部状态`},...Object.entries(rL).map(([e,{label:t}])=>({value:e,label:t}))]}),(0,H.jsx)(Bk,{"aria-label":`所属插件`,value:a,onValueChange:e=>{YN(e===`all`?`/tasks`:`/tasks?plugin=${encodeURIComponent(e)}`),d(0)},options:[{value:`all`,label:`全部插件`},...(f.data??[]).map(e=>({value:e.name,label:e.name}))]})]}),m.error?(0,H.jsx)(J,{children:(0,H.jsx)(Iv,{error:m.error,onRetry:()=>void m.refetch(),retrying:m.isFetching})}):m.data?m.data.items.length?(0,H.jsx)(J,{className:`overflow-hidden`,children:(0,H.jsx)(`div`,{className:`overflow-x-auto`,children:(0,H.jsxs)(`table`,{className:`w-full text-left text-[13px]`,children:[(0,H.jsx)(`thead`,{className:`bg-surface-2/50 text-fg-3`,children:(0,H.jsx)(`tr`,{children:[`任务 / 插件`,`状态`,`下次执行`,`尝试`,`最近更新`].map(e=>(0,H.jsx)(`th`,{className:`whitespace-nowrap px-5 py-3 font-medium`,children:e},e))})}),(0,H.jsx)(`tbody`,{className:`divide-y divide-border`,children:m.data.items.map(e=>(0,H.jsxs)(`tr`,{className:`hover:bg-surface-2/60`,children:[(0,H.jsxs)(`td`,{className:`max-w-64 px-5 py-3`,children:[(0,H.jsxs)(`button`,{type:`button`,onClick:()=>YN(oL(e.id)),className:`block w-full cursor-pointer truncate text-left font-medium text-accent hover:underline`,children:[e.name,` · `,e.key]}),(0,H.jsx)(`div`,{className:`mt-1 truncate text-xs text-fg-3`,children:e.plugin})]}),(0,H.jsxs)(`td`,{className:`px-5 py-3`,children:[(0,H.jsx)(kv,{tone:rL[e.state].tone,children:rL[e.state].label}),e.blockedReason&&(0,H.jsx)(`div`,{className:`mt-1 max-w-44 text-xs text-fg-3`,children:e.blockedReason})]}),(0,H.jsx)(`td`,{className:`whitespace-nowrap px-5 py-3 text-fg-2`,children:e.state===`pending`||e.state===`retry_wait`?aL(e.nextRunAt):`—`}),(0,H.jsx)(`td`,{className:`px-5 py-3 tabular-nums`,children:e.attempt}),(0,H.jsx)(`td`,{className:`whitespace-nowrap px-5 py-3 text-fg-3`,children:aL(e.updatedAt)})]},e.id))})]})})}):(0,H.jsx)(J,{children:(0,H.jsx)(Fv,{icon:(0,H.jsx)(nr,{}),title:r||o!==`all`||a!==`all`?`没有匹配的任务`:`暂无任务`,description:`插件通过 ctx.task 创建的任务会显示在这里。`})}):(0,H.jsx)(Pv,{className:`h-72 rounded-xl`}),(0,H.jsxs)(`div`,{className:`mt-4 flex items-center justify-between text-xs text-fg-3`,children:[(0,H.jsxs)(`span`,{children:[`共 `,h,` 个任务 · 第 `,u+1,` 页`]}),(0,H.jsxs)(`div`,{className:`flex gap-2`,children:[(0,H.jsx)(X,{variant:`secondary`,size:`icon`,"aria-label":`上一页`,disabled:!u,onClick:()=>d(u-1),children:(0,H.jsx)(rn,{className:`size-4`})}),(0,H.jsx)(X,{variant:`secondary`,size:`icon`,"aria-label":`下一页`,disabled:(u+1)*25>=h,onClick:()=>d(u+1),children:(0,H.jsx)(on,{className:`size-4`})})]})]}),(0,H.jsx)(cL,{id:n})]})}function cL({id:e}){let t=pj(),[n,r]=(0,V.useState)(null),i=RM({queryKey:[`tasks`,e],queryFn:()=>$.task(e),enabled:e!==null,refetchInterval:15e3}),a=RM({queryKey:[`tasks`,e,`attempts`],queryFn:()=>$.taskAttempts(e),enabled:e!==null,refetchInterval:15e3}),o=zM({mutationFn:({operation:t,confirmDelivery:n})=>$.taskAction(e,t,n),onSuccess:()=>{r(null),t.invalidateQueries({queryKey:[`tasks`]})},onError:e=>Z.error(e.message)}),s=i.data,c=s&&[`pending`,`running`,`retry_wait`].includes(s.state),l=s?`${s.id}:${s.attempt}`:null,u=s?.deliveryFailure&&s.deliveryFailure.outcome!==`not_sent`;return(0,H.jsx)(dj,{open:e!==null,onOpenChange:e=>{e||(r(null),YN(`/tasks${window.location.search}`))},title:s?.name??`任务详情`,subtitle:s?.plugin,children:(0,H.jsx)(`div`,{className:`space-y-6 p-6`,children:i.error?(0,H.jsx)(Iv,{error:i.error,onRetry:()=>void i.refetch()}):s?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(kv,{tone:rL[s.state].tone,children:rL[s.state].label}),(0,H.jsxs)(`div`,{className:`ml-auto flex gap-2`,children:[s.canRetry&&n!==l&&(0,H.jsx)(X,{variant:`secondary`,loading:o.isPending,onClick:()=>u?r(l):o.mutate({operation:`retry`}),children:`重试`}),c&&(0,H.jsx)(X,{variant:`secondary`,loading:o.isPending,onClick:()=>o.mutate({operation:`cancel`}),children:`取消任务`})]})]}),s.canRetry&&u&&n===l&&(0,H.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 rounded-lg border border-border p-3`,children:[(0,H.jsx)(`p`,{className:`mr-auto text-[13px] text-warning`,children:`重试可能重复发送。请先核对会话中的消息。`}),(0,H.jsx)(X,{variant:`ghost`,onClick:()=>r(null),children:`取消`}),(0,H.jsx)(X,{variant:`secondary`,loading:o.isPending,onClick:()=>o.mutate({operation:`retry`,confirmDelivery:!0}),children:`确认重试`})]}),s.blockedReason&&(0,H.jsx)(`p`,{className:`text-sm text-warning`,children:s.blockedReason}),s.state===`cancelling`&&(0,H.jsx)(`p`,{className:`text-sm text-fg-3`,children:`已发送中止信号,等待处理函数退出后释放执行名额。`}),(0,H.jsx)(`dl`,{className:`grid grid-cols-[auto_minmax(0,1fr)] gap-x-5 gap-y-3 text-[13px]`,children:[[`任务 ID`,s.id],[`逻辑键`,s.key],[`创建时间`,aL(s.createdAt)],[`原定执行`,aL(s.runAt)],[`下次执行`,aL(s.nextRunAt)],[`开始时间`,aL(s.startedAt)],[`结束时间`,aL(s.finishedAt)],[`执行次数`,String(s.attempt)],[`自动重试`,`${s.policy.maxRetries} 次 · ${s.policy.delay}ms 起`],[`超时`,s.policy.timeout?`${s.policy.timeout}ms`:`未设置`]].map(([e,t])=>(0,H.jsx)(lL,{label:e??``,value:t??``},e))}),s.error&&(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h3`,{className:`mb-2 text-sm font-medium`,children:`最近错误`}),(0,H.jsx)(`pre`,{className:`whitespace-pre-wrap break-all rounded-lg bg-danger-soft p-3 text-xs text-danger`,children:s.error}),s.deliveryFailure&&(0,H.jsx)(`div`,{className:`mt-3`,children:(0,H.jsx)(Bv,{failure:s.deliveryFailure})})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h3`,{className:`mb-2 text-sm font-medium`,children:`参数`}),(0,H.jsx)(`pre`,{className:`max-h-64 overflow-auto whitespace-pre-wrap break-all rounded-lg bg-surface-2 p-3 text-xs text-fg-2`,children:JSON.stringify(s.payload,null,2)})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h3`,{className:`mb-3 text-sm font-medium`,children:`执行历史`}),a.error?(0,H.jsx)(Iv,{error:a.error,onRetry:()=>void a.refetch()}):a.data?a.data.length===0?(0,H.jsx)(`p`,{className:`text-sm text-fg-3`,children:`尚未开始执行`}):(0,H.jsx)(`ol`,{className:`space-y-3`,children:a.data.map(e=>(0,H.jsxs)(`li`,{className:`rounded-lg border border-border p-3 text-xs`,children:[(0,H.jsxs)(`div`,{className:`flex justify-between font-medium`,children:[(0,H.jsxs)(`span`,{children:[`第 `,e.attempt,` 次`]}),(0,H.jsx)(`span`,{children:iL[e.outcome]})]}),(0,H.jsxs)(`div`,{className:`mt-2 text-fg-3`,children:[aL(e.startedAt),` → `,aL(e.finishedAt)]}),e.finishedAt!==void 0&&(0,H.jsxs)(`div`,{className:`mt-1 text-fg-3`,children:[`耗时 `,e.finishedAt-e.startedAt,`ms`]}),e.error&&(0,H.jsx)(`pre`,{className:`mt-2 whitespace-pre-wrap break-all text-danger`,children:e.error}),e.deliveryFailure&&(0,H.jsx)(`div`,{className:`mt-2`,children:(0,H.jsx)(Bv,{failure:e.deliveryFailure})})]},e.id))}):(0,H.jsx)(Pv,{className:`h-20`})]})]}):(0,H.jsx)(Pv,{className:`h-56`})})})}function lL({label:e,value:t}){return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`dt`,{className:`text-fg-3`,children:e}),(0,H.jsx)(`dd`,{className:`break-all text-fg-2`,children:t})]})}var uL=1,dL=.9,fL=.8,pL=.17,mL=.1,hL=.999,gL=.9999,_L=.99,vL=/[\\\/_+.#"@\[\(\{&]/,yL=/[\\\/_+.#"@\[\(\{&]/g,bL=/[\s-]/,xL=/[\s-]/g;function SL(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?uL:_L;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=SL(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=uL:vL.test(e.charAt(l-1))?(d*=fL,p=e.slice(i,l-1).match(yL),p&&i>0&&(d*=hL**+p.length)):bL.test(e.charAt(l-1))?(d*=dL,m=e.slice(i,l-1).match(xL),m&&i>0&&(d*=hL**+m.length)):(d*=pL,i>0&&(d*=hL**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=gL)),(d<mL&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=SL(e,t,n,r,l+1,a+2,o),f*mL>d&&(d=f*mL)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function CL(e){return e.toLowerCase().replace(xL,` `)}function wL(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,SL(e,t,CL(e),CL(t),0,0,{})}var TL=`[cmdk-group=""]`,EL=`[cmdk-group-items=""]`,DL=`[cmdk-group-heading=""]`,OL=`[cmdk-item=""]`,kL=`${OL}:not([aria-disabled="true"])`,AL=`cmdk-item-select`,jL=`data-value`,ML=(e,t,n)=>wL(e,t,n),NL=V.createContext(void 0),PL=()=>V.useContext(NL),FL=V.createContext(void 0),IL=()=>V.useContext(FL),LL=V.createContext(void 0),RL=V.forwardRef((e,t)=>{let n=QL(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=QL(()=>new Set),i=QL(()=>new Map),a=QL(()=>new Map),o=QL(()=>new Set),s=XL(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=gx(),y=gx(),b=gx(),x=V.useRef(null),S=tR();ZL(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,C.emit()}},[u]),ZL(()=>{S(6,k)},[]);let C=V.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)O(),E(),S(1,D);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(b);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(S(7,()=>{n.current.selectedItemId=A()?.id,C.emit()}),r||S(5,k),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}C.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),w=V.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,T(t,r)),S(2,()=>{E(),C.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),S(3,()=>{O(),E(),n.current.value||D(),C.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=A();S(4,()=>{O(),t?.getAttribute(`id`)===e&&D(),C.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:b,labelId:y,listInnerRef:x}),[]);function T(e,t){let r=s.current?.filter??ML;return e?r(e,n.current.search,t):0}function E(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;j().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(EL);t?t.appendChild(e.parentElement===t?e:e.closest(`${EL} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${EL} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=x.current?.querySelector(`${TL}[${jL}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function D(){let e=j().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(jL);C.setState(`value`,e||void 0)}function O(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=T(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function k(){var e;let t=A();t&&(t.parentElement?.firstChild===t&&((e=t.closest(TL)?.querySelector(DL))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function A(){return x.current?.querySelector(`${OL}[aria-selected="true"]`)}function j(){return Array.from(x.current?.querySelectorAll(kL)||[])}function M(e){let t=j()[e];t&&C.setState(`value`,t.getAttribute(jL))}function N(e){var t;let n=A(),r=j(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&C.setState(`value`,a.getAttribute(jL))}function ee(e){let t=A()?.closest(TL),n;for(;t&&!n;)t=e>0?JL(t,TL):YL(t,TL),n=t?.querySelector(kL);n?C.setState(`value`,n.getAttribute(jL)):N(e)}let P=()=>M(j().length-1),F=e=>{e.preventDefault(),e.metaKey?P():e.altKey?ee(1):N(1)},te=e=>{e.preventDefault(),e.metaKey?M(0):e.altKey?ee(-1):N(-1)};return V.createElement($y.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&F(e);break;case`ArrowDown`:F(e);break;case`p`:case`k`:g&&e.ctrlKey&&te(e);break;case`ArrowUp`:te(e);break;case`Home`:e.preventDefault(),M(0);break;case`End`:e.preventDefault(),P();break;case`Enter`:{e.preventDefault();let t=A();if(t){let e=new Event(AL);t.dispatchEvent(e)}}}}},V.createElement(`label`,{"cmdk-label":``,htmlFor:w.inputId,id:w.labelId,style:iR},c),rR(e,e=>V.createElement(FL.Provider,{value:C},V.createElement(NL.Provider,{value:w},e))))}),zL=V.forwardRef((e,t)=>{let n=gx(),r=V.useRef(null),i=V.useContext(LL),a=PL(),o=XL(e),s=o.current?.forceMount??i?.forceMount;ZL(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=eR(n,r,[e.value,e.children,r],e.keywords),l=IL(),u=$L(e=>e.value&&e.value===c.current),d=$L(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);V.useEffect(()=>{let t=r.current;if(t&&!e.disabled)return t.addEventListener(AL,f),()=>t.removeEventListener(AL,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return V.createElement($y.div,{ref:uy(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),BL=V.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=gx(),s=V.useRef(null),c=V.useRef(null),l=gx(),u=PL(),d=$L(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));ZL(()=>u.group(o),[]),eR(o,s,[e.value,e.heading,c]);let f=V.useMemo(()=>({id:o,forceMount:i}),[i]);return V.createElement($y.div,{ref:uy(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!d||void 0},n&&V.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),rR(e,e=>V.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},V.createElement(LL.Provider,{value:f},e))))}),VL=V.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=V.useRef(null),a=$L(e=>!e.search);return!n&&!a?null:V.createElement($y.div,{ref:uy(i,t),...r,"cmdk-separator":``,role:`separator`})}),HL=V.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=IL(),o=$L(e=>e.search),s=$L(e=>e.selectedItemId),c=PL();return V.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),V.createElement($y.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),UL=V.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=V.useRef(null),o=V.useRef(null),s=$L(e=>e.selectedItemId),c=PL();return V.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),V.createElement($y.div,{ref:uy(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},rR(e,e=>V.createElement(`div`,{ref:uy(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),WL=V.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return V.createElement(WA,{open:n,onOpenChange:r},V.createElement(JA,{container:o},V.createElement(XA,{"cmdk-overlay":``,className:i}),V.createElement(ej,{"aria-label":e.label,"cmdk-dialog":``,className:a},V.createElement(RL,{ref:t,...s}))))}),GL=V.forwardRef((e,t)=>$L(e=>e.filtered.count===0)?V.createElement($y.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),KL=V.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return V.createElement($y.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},rR(e,e=>V.createElement(`div`,{"aria-hidden":!0},e)))}),qL=Object.assign(RL,{List:UL,Item:zL,Input:HL,Group:BL,Separator:VL,Dialog:WL,Empty:GL,Loading:KL});function JL(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function YL(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function XL(e){let t=V.useRef(e);return ZL(()=>{t.current=e}),t}var ZL=typeof window>`u`?V.useEffect:V.useLayoutEffect;function QL(e){let t=V.useRef();return t.current===void 0&&(t.current=e()),t}function $L(e){let t=IL(),n=()=>e(t.snapshot());return V.useSyncExternalStore(t.subscribe,n,n)}function eR(e,t,n,r=[]){let i=V.useRef(),a=PL();return ZL(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(jL,s),i.current=s}),i}var tR=()=>{let[e,t]=V.useState(),n=QL(()=>new Map);return ZL(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function nR(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function rR({asChild:e,children:t},n){return e&&V.isValidElement(t)?V.cloneElement(nR(t),{ref:t.ref},n(t.props.children)):n(t)}var iR={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},aR=[{label:`工作区`,items:[{to:`/`,label:`概览`,icon:er},{to:`/plugins`,label:`插件`,icon:Br},{to:`/commands`,label:`命令`,icon:Ei},{to:`/groups`,label:`群组`,icon:Ki},{to:`/bots`,label:`机器人`,icon:Ut},{to:`/adapters`,label:`适配器`,icon:qt},{to:`/playground`,label:`调试台`,icon:Rn}]},{label:`运维`,items:[{to:`/tasks`,label:`任务中心`,icon:nr},{to:`/logs`,label:`日志`,icon:ni},{to:`/acl`,label:`访问控制`,icon:mi},{to:`/settings`,label:`设置`,icon:ui}]}],oR=[{to:`/history`,label:`消息记录`,icon:gr,plugin:`history`,group:`运维`}],sR={"app-window":xt,"bar-chart":Zt,calendar:Yt,coins:mn,gamepad:Bn,gift:Hn,image:Jn,"list-checks":nr,music:On,sparkles:wi,star:Oi,trophy:Bi,users:Ki,wrench:Xi};function cR(e){return`/pages/${encodeURIComponent(e)}`}function lR(e){return e.filter(e=>e.page&&e.state===`active`).map(e=>({to:cR(e.name),label:e.page?.title??e.name,icon:sR[e.page?.icon??``]??xt}))}function uR(){let e=lP(),t=e!==null,n=(0,V.useRef)(null),r=(0,V.useRef)(null),i=pj(),{setPreference:a}=aP(),o=RM({queryKey:[`plugins`],queryFn:$.plugins,enabled:t}),s=RM({queryKey:[`commands`],queryFn:$.commands,enabled:t}),c=zM({mutationFn:e=>$.pluginAction(e,`reload`),onSuccess:e=>{Z.success(`已重载 ${e.name}`),i.invalidateQueries({queryKey:[`plugins`]})}}),l=()=>oP.set(null),u=e=>{l(),e()};return(0,H.jsx)(WA,{open:t,onOpenChange:l,children:(0,H.jsx)(bg,{children:t&&(0,H.jsxs)(JA,{forceMount:!0,children:[(0,H.jsx)(XA,{asChild:!0,forceMount:!0,children:(0,H.jsx)(K.div,{className:`fixed inset-0 z-40 bg-overlay backdrop-blur-[3px]`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.18}})}),(0,H.jsx)(`div`,{className:`pointer-events-none fixed inset-0 z-50 flex justify-center px-4 pt-[14dvh] pb-4`,children:(0,H.jsx)(ej,{asChild:!0,forceMount:!0,"aria-describedby":void 0,onOpenAutoFocus:t=>{t.preventDefault(),r.current=e?.restoreFocus??null,n.current?.focus({preventScroll:!0})},onCloseAutoFocus:e=>{e.preventDefault(),oP.get()||(r.current?.(),r.current=null)},children:(0,H.jsxs)(K.div,{initial:{opacity:0,scale:.97,y:-8},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.98,y:-4},transition:Sv,className:`pointer-events-auto flex h-fit max-h-full w-full max-w-[580px] flex-col overflow-hidden rounded-2xl border border-border bg-surface shadow-pop outline-none`,children:[(0,H.jsx)(ij,{className:`sr-only`,children:`命令面板`}),(0,H.jsxs)(qL,{loop:!0,className:`flex min-h-0 flex-col [&_[cmdk-group-heading]]:px-3 [&_[cmdk-group-heading]]:pt-3 [&_[cmdk-group-heading]]:pb-1.5 [&_[cmdk-group-heading]]:text-[11px] [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-fg-3`,children:[(0,H.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2.5 border-b border-border px-4`,children:[(0,H.jsx)(ii,{className:`size-4 text-fg-3`}),(0,H.jsx)(qL.Input,{ref:n,placeholder:`输入页面、插件或命令…`,className:`h-13 min-w-0 flex-1 bg-transparent text-[14.5px] text-fg outline-none placeholder:text-fg-3`}),(0,H.jsx)(Mv,{children:`Esc`})]}),(0,H.jsxs)(qL.List,{className:`min-h-0 max-h-[min(420px,60dvh)] overflow-y-auto overscroll-contain p-1.5 [&_[cmdk-list-sizer]]:transition-[height]`,children:[(0,H.jsx)(qL.Empty,{className:`py-10 text-center text-[13px] text-fg-3`,children:`没有匹配的结果`}),(0,H.jsx)(qL.Group,{heading:`跳转`,children:aR.flatMap(e=>e.items.map(e=>(0,H.jsx)(dR,{value:`page ${e.label} ${e.to}`,icon:(0,H.jsx)(e.icon,{className:`size-4`}),onSelect:()=>u(()=>YN(e.to)),children:e.label},e.to)))}),s.data&&s.data.length>0&&(0,H.jsx)(qL.Group,{heading:`在调试台中试用命令`,children:s.data.filter(e=>!e.hidden).map(e=>(0,H.jsxs)(dR,{value:`command ${e.path} ${e.aliases.join(` `)} ${e.description}`,icon:(0,H.jsx)(Rn,{className:`size-4`}),hint:e.owner,onSelect:()=>u(()=>{cP.set(`/${e.path} `),YN(`/playground`)}),children:[(0,H.jsx)(`span`,{className:`font-mono text-[12.5px]`,children:e.usage}),e.description&&(0,H.jsx)(`span`,{className:`ml-2 text-fg-3`,children:e.description})]},`${e.owner}:${e.path}`))}),o.data&&o.data.length>0&&(0,H.jsx)(qL.Group,{heading:`重载插件`,children:o.data.map(e=>(0,H.jsxs)(dR,{value:`reload ${e.name} ${e.description??``}`,icon:(0,H.jsx)(Xr,{className:`size-4`}),onSelect:()=>u(()=>c.mutate(e.name)),children:[`重载 `,e.name]},e.name))}),(0,H.jsxs)(qL.Group,{heading:`偏好`,children:[(0,H.jsx)(dR,{value:`theme light 浅色`,icon:(0,H.jsx)(Mi,{className:`size-4`}),onSelect:()=>u(()=>a(`light`)),children:`切换到浅色主题`}),(0,H.jsx)(dR,{value:`theme dark 深色`,icon:(0,H.jsx)(wr,{className:`size-4`}),onSelect:()=>u(()=>a(`dark`)),children:`切换到深色主题`}),(0,H.jsx)(dR,{value:`theme system 跟随系统`,icon:(0,H.jsx)(Sr,{className:`size-4`}),onSelect:()=>u(()=>a(`system`)),children:`主题跟随系统`}),(0,H.jsx)(dR,{value:`logout 退出登录`,icon:(0,H.jsx)(ur,{className:`size-4`}),onSelect:()=>u(()=>{$.logout().finally(()=>{$N(i,!1)})}),children:`退出登录`})]})]}),(0,H.jsxs)(`div`,{className:`flex shrink-0 items-center gap-3 border-t border-border bg-surface-2/60 px-4 py-2 text-[11.5px] text-fg-3`,children:[(0,H.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,H.jsx)(Mv,{children:`↑`}),(0,H.jsx)(Mv,{children:`↓`}),`选择`]}),(0,H.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,H.jsx)(Mv,{children:(0,H.jsx)(bn,{className:`size-3`})}),`执行`]})]})]})]})})})]})})})}function dR({value:e,icon:t,hint:n,onSelect:r,children:i}){return(0,H.jsxs)(qL.Item,{value:e,onSelect:r,className:`group flex h-10 cursor-pointer items-center gap-3 rounded-[10px] px-3 text-[13.5px] text-fg-2 select-none data-[selected=true]:bg-surface-2 data-[selected=true]:text-fg`,children:[(0,H.jsx)(`span`,{className:`text-fg-3 group-data-[selected=true]:text-accent`,children:t}),(0,H.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:i}),n&&(0,H.jsx)(`span`,{className:`text-[11.5px] text-fg-3`,children:n})]})}var fR={"/":HF,"/plugins":LI,"/commands":pF,"/groups":yF,"/history":NF,"/bots":JP,"/adapters":nF,"/playground":eI,"/logs":RF,"/acl":gP,"/settings":tL,"/tasks":sL};function pR(e){let t=fR[e];return t?{key:e,Page:t}:e.startsWith(`/bots/`)?{key:`/bots`,Page:JP}:e.startsWith(`/adapters/`)?{key:`/adapters`,Page:nF}:e.startsWith(`/plugin/`)?{key:`/plugins`,Page:BI}:e.startsWith(`/groups/`)?{key:`/groups`,Page:yF}:e.startsWith(`/tasks/`)?{key:`/tasks`,Page:sL}:e.startsWith(`/pages/`)?{key:e,pluginPage:!0}:{key:e,Page:VF}}function mR(){let e=RM({queryKey:[`plugins`],queryFn:$.plugins}),t=new Set((e.data??[]).filter(e=>e.state===`active`).map(e=>e.name)),n=lR(e.data??[]);return[...aR.map(e=>({...e,items:[...e.items,...oR.filter(n=>n.group===e.label&&t.has(n.plugin))]})),...n.length>0?[{label:`插件页面`,items:n}]:[]]}function hR(){let e=XN(),[t,n]=(0,V.useState)(!1),r=mR(),i=pR(e),{key:a}=i,o=`pluginPage`in i,s=r.flatMap(e=>e.items).find(e=>e.to===a);return(0,V.useEffect)(()=>{let e=e=>{!e.metaKey&&!e.ctrlKey||e.altKey||e.shiftKey||e.isComposing||e.key.toLowerCase()!==`k`||(e.preventDefault(),e.repeat||(oP.get()?oP.set(null):sP()))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,V.useEffect)(()=>{document.title=s?`${s.label} · AsaBot`:`AsaBot 控制台`},[s]),(0,H.jsxs)(`div`,{className:`relative flex h-full`,children:[(0,H.jsx)(`div`,{className:`pointer-events-none fixed inset-x-0 top-0 h-[420px] bg-[radial-gradient(ellipse_70%_60%_at_60%_-10%,var(--bg-glow),transparent_70%)]`}),(0,H.jsx)(`aside`,{className:`relative z-10 hidden w-[236px] shrink-0 lg:block`,children:(0,H.jsx)(gR,{path:a,groups:r})}),(0,H.jsx)(bg,{children:t&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(K.div,{className:`fixed inset-0 z-40 bg-overlay backdrop-blur-[2px] lg:hidden`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>n(!1)}),(0,H.jsx)(K.aside,{className:`fixed inset-y-0 left-0 z-50 w-[260px] border-r border-border bg-bg lg:hidden`,initial:{x:-280},animate:{x:0},exit:{x:-280},transition:q,children:(0,H.jsx)(gR,{path:a,groups:r,onNavigate:()=>n(!1)})})]})}),(0,H.jsxs)(`div`,{className:`relative z-0 flex min-w-0 flex-1 flex-col`,children:[(0,H.jsxs)(`header`,{className:`flex h-14 shrink-0 items-center gap-3 px-4 lg:hidden`,children:[(0,H.jsx)(X,{variant:`ghost`,size:`icon`,"aria-label":`打开导航`,onClick:()=>n(!0),children:(0,H.jsx)(fr,{className:`size-4.5`})}),(0,H.jsx)(qv,{className:`size-6`}),(0,H.jsx)(`span`,{className:`font-semibold tracking-tight`,children:`AsaBot`})]}),(0,H.jsx)(`main`,{className:B(`min-h-0 flex-1`,o?`overflow-clip`:`overflow-y-auto [scrollbar-gutter:stable]`),children:(0,H.jsx)(bg,{mode:`wait`,initial:!1,children:(0,H.jsx)(K.div,{initial:{opacity:0,y:10,filter:`blur(3px)`},animate:{opacity:1,y:0,filter:`blur(0px)`},exit:{opacity:0,y:-6,filter:`blur(2px)`,transition:{duration:.12}},transition:q,className:B(`mx-auto w-full max-w-[1180px] px-5 lg:px-10`,o?`flex h-full min-h-0 flex-col py-4 lg:py-5`:`py-7 lg:py-9`),children:o?(0,H.jsx)(dI,{path:a}):(0,H.jsx)(i.Page,{})},a)})})]}),(0,H.jsx)(uR,{}),(0,H.jsx)(kI,{})]})}function gR({path:e,groups:t,onNavigate:n}){let r=RM({queryKey:[`overview`],queryFn:$.overview});return(0,H.jsxs)(`div`,{className:`flex h-full flex-col px-3 pt-4 pb-3`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2.5 px-2 pb-5`,children:[(0,H.jsx)(qv,{}),(0,H.jsxs)(`div`,{className:`leading-tight`,children:[(0,H.jsx)(`div`,{className:`text-[14.5px] font-semibold tracking-[-0.02em]`,children:`AsaBot`}),(0,H.jsx)(`div`,{className:`text-[11.5px] text-fg-3`,children:r.data?`v${r.data.version}`:`控制台`})]})]}),(0,H.jsxs)(`button`,{type:`button`,onClick:()=>sP(),className:`group mb-5 flex h-9 cursor-pointer items-center gap-2 rounded-[10px] border border-border bg-surface px-2.5 text-[13px] text-fg-3 shadow-card transition-colors hover:border-border-strong hover:text-fg-2`,children:[(0,H.jsx)(ii,{className:`size-3.5`}),(0,H.jsx)(`span`,{className:`flex-1 text-left`,children:`搜索或跳转…`}),(0,H.jsx)(Mv,{children:navigator.platform.includes(`Mac`)?`⌘`:`Ctrl`}),(0,H.jsx)(Mv,{children:`K`})]}),(0,H.jsx)(`nav`,{className:`flex-1 space-y-5 overflow-y-auto`,children:t.map(t=>(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{className:`mb-1 px-2.5 text-[11px] font-medium tracking-wide text-fg-3`,children:t.label}),(0,H.jsx)(`ul`,{className:`space-y-0.5`,children:t.items.map(t=>(0,H.jsx)(`li`,{children:(0,H.jsx)(_R,{item:t,active:t.to===e,onNavigate:n})},t.to))})]},t.label))}),(0,H.jsxs)(`div`,{className:`space-y-2 border-t border-border pt-3`,children:[(0,H.jsx)(vR,{}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-2 px-1`,children:[(0,H.jsx)(yR,{}),(0,H.jsx)(bR,{})]})]})]})}function _R({item:e,active:t,onNavigate:n}){let r=e.icon;return(0,H.jsxs)(ZN,{to:e.to,onClick:n,className:B(`relative flex h-8 items-center gap-2.5 rounded-lg px-2.5 text-[13.5px] font-medium transition-colors duration-150`,t?`text-fg`:`text-fg-2 hover:bg-surface-2/70 hover:text-fg`),children:[t&&(0,H.jsx)(K.span,{layoutId:`nav-active`,transition:Sv,className:`absolute inset-0 rounded-lg border border-border bg-surface shadow-card`}),(0,H.jsx)(r,{className:B(`relative size-4 transition-colors`,t?`text-accent`:`text-fg-3`)}),(0,H.jsx)(`span`,{className:`relative`,children:e.label})]})}function vR(){let e=VN();return(0,H.jsxs)(`div`,{className:`flex h-8 items-center gap-2 rounded-lg px-2.5 text-[12.5px] text-fg-3`,children:[(0,H.jsx)(jv,{tone:e===`open`?`success`:e===`connecting`?`warning`:`danger`,pulse:e===`open`}),(0,H.jsx)(bg,{mode:`wait`,initial:!1,children:(0,H.jsx)(K.span,{initial:{opacity:0,y:3},animate:{opacity:1,y:0},exit:{opacity:0,y:-3},transition:{duration:.15},children:{open:`实时连接正常`,connecting:`正在连接…`,closed:`连接已断开,重试中`}[e]},e)})]})}function yR(){let{preference:e,setPreference:t}=aP();return(0,H.jsx)(`fieldset`,{"aria-label":`主题`,className:`m-0 inline-flex h-8 min-w-0 items-center rounded-lg border border-border bg-surface-2 p-0.5`,children:[{value:`light`,icon:(0,H.jsx)(Mi,{className:`size-3.5`}),label:`浅色`},{value:`system`,icon:(0,H.jsx)(Sr,{className:`size-3.5`}),label:`跟随系统`},{value:`dark`,icon:(0,H.jsx)(wr,{className:`size-3.5`}),label:`深色`}].map(n=>(0,H.jsx)(gO,{content:n.label,children:(0,H.jsxs)(`button`,{type:`button`,"aria-pressed":e===n.value,"aria-label":n.label,onClick:()=>t(n.value),className:B(`relative flex h-full w-7 cursor-pointer items-center justify-center rounded-md transition-colors`,e===n.value?`text-fg`:`text-fg-3 hover:text-fg-2`),children:[e===n.value&&(0,H.jsx)(K.span,{layoutId:`theme-active`,transition:Sv,className:`absolute inset-0 rounded-md border border-border bg-surface shadow-card`}),(0,H.jsx)(`span`,{className:`relative`,children:n.icon})]})},n.value))})}function bR(){let e=pj(),t=zM({mutationFn:$.logout,onSettled:()=>{$N(e,!1)}});return(0,H.jsx)(gO,{content:`退出登录`,children:(0,H.jsx)(X,{variant:`ghost`,size:`icon`,"aria-label":`退出登录`,loading:t.isPending,onClick:()=>t.mutate(),children:(0,H.jsx)(ur,{className:`size-4`})})})}function xR({onSuccess:e}){let[t,n]=(0,V.useState)(``),[r,i]=(0,V.useState)(null),a=xv(),o=zM({mutationFn:$.login,meta:{silent:!0},onSuccess:e,onError:e=>{i(e instanceof SN&&e.status===401?`密码不正确`:e instanceof SN&&e.status===429?`尝试次数过多,请稍后再试`:e.message),a.start({x:[0,-8,7,-5,3,0],transition:{duration:.42}})}}),s=e=>{e.preventDefault(),t&&(i(null),o.mutate(t))};return(0,H.jsxs)(K.div,{className:`relative flex h-full items-center justify-center overflow-hidden px-4`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{duration:.2}},children:[(0,H.jsx)(SR,{}),(0,H.jsxs)(K.div,{className:`relative w-full max-w-[380px]`,initial:{opacity:0,y:16,scale:.98},animate:{opacity:1,y:0,scale:1},transition:{...q,delay:.05},children:[(0,H.jsxs)(`div`,{className:`mb-8 flex flex-col items-center text-center`,children:[(0,H.jsx)(K.div,{initial:{scale:.6,rotate:-12,opacity:0},animate:{scale:1,rotate:0,opacity:1},transition:{...Sv,delay:.12},className:`mb-5 rounded-[14px] shadow-[0_8px_24px_-6px_rgb(109_94_245/0.5)]`,children:(0,H.jsx)(qv,{className:`size-12`})}),(0,H.jsx)(`h1`,{className:`text-[22px] font-semibold tracking-[-0.03em]`,children:`欢迎回到 AsaBot`}),(0,H.jsx)(`p`,{className:`mt-1.5 text-[13.5px] text-fg-3`,children:`输入面板密码以继续`})]}),(0,H.jsxs)(K.form,{animate:a,onSubmit:s,className:`card space-y-4 p-6`,children:[(0,H.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,H.jsx)(`label`,{htmlFor:`password`,className:`text-[12.5px] font-medium text-fg-2`,children:`面板密码`}),(0,H.jsx)(AO,{id:`password`,type:`password`,autoFocus:!0,autoComplete:`current-password`,icon:(0,H.jsx)(Qn,{}),placeholder:`server.panelPassword`,value:t,"aria-invalid":r!==null,onChange:e=>{n(e.target.value),i(null)}}),(0,H.jsx)(K.p,{initial:!1,animate:{height:r?`auto`:0,opacity:+!!r},transition:q,className:`overflow-hidden text-[12.5px] text-danger`,children:r??` `})]}),(0,H.jsxs)(X,{type:`submit`,variant:`primary`,size:`lg`,className:`w-full`,loading:o.isPending,disabled:!t,children:[`登录`,(0,H.jsx)(kt,{className:`size-4`})]})]}),(0,H.jsxs)(`p`,{className:`mt-6 text-center text-[12px] leading-relaxed text-fg-3`,children:[`密码来自配置文件中的 `,(0,H.jsx)(`code`,{className:`font-mono`,children:`server.panelPassword`})]})]})]})}function SR(){return(0,H.jsxs)(`div`,{className:`pointer-events-none absolute inset-0`,"aria-hidden":!0,children:[(0,H.jsx)(`div`,{className:`absolute inset-0 bg-[linear-gradient(to_right,var(--border)_1px,transparent_1px),linear-gradient(to_bottom,var(--border)_1px,transparent_1px)] bg-[size:44px_44px] opacity-50 [mask-image:radial-gradient(ellipse_55%_50%_at_50%_45%,black,transparent)]`}),(0,H.jsx)(K.div,{className:`absolute top-[12%] left-[18%] size-[420px] rounded-full bg-[#8b7ffa] opacity-[0.16] blur-[110px] dark:opacity-[0.14]`,animate:{x:[0,60,-20,0],y:[0,30,60,0]},transition:{duration:22,repeat:1/0,ease:`easeInOut`}}),(0,H.jsx)(K.div,{className:`absolute right-[14%] bottom-[10%] size-[380px] rounded-full bg-[#2bbd95] opacity-[0.12] blur-[110px] dark:opacity-[0.1]`,animate:{x:[0,-50,20,0],y:[0,-40,-10,0]},transition:{duration:26,repeat:1/0,ease:`easeInOut`}}),(0,H.jsx)(K.div,{className:`absolute top-[40%] right-[30%] size-[260px] rounded-full bg-[#f2a5c8] opacity-[0.1] blur-[100px] dark:opacity-[0.07]`,animate:{x:[0,40,-30,0],y:[0,-30,20,0]},transition:{duration:30,repeat:1/0,ease:`easeInOut`}})]})}var CR=[{title:`验证设置码`,description:`确认你能访问运行 AsaBot 的机器`},{title:`设置面板密码`,description:`之后用它登录面板,再到机器人页面添加连接`}];function wR(e){let t=e.toUpperCase().replace(/[^A-Z0-9]/g,``).slice(0,8);return t.length>4?`${t.slice(0,4)}-${t.slice(4)}`:t}function TR(){let e=pj(),[t,n]=(0,V.useState)(0),[r,i]=(0,V.useState)(1),[a,o]=(0,V.useState)(``),[s,c]=(0,V.useState)(``),[l,u]=(0,V.useState)(``),[d,f]=(0,V.useState)({}),p=xv(),m=e=>{i(e>t?1:-1),n(e)},h=(e,n)=>{f(n),e!==t&&m(e),p.start({x:[0,-8,7,-5,3,0],transition:{duration:.42}})},g=zM({mutationFn:e=>$.setup(e),meta:{silent:!0},onSuccess:()=>{Z.success(`设置完成,欢迎使用 AsaBot`),$N(e,!0)},onError:e=>{if(e instanceof SN&&e.status===401)h(0,{code:`设置码不正确,请对照控制台输出`});else if(e instanceof SN&&e.status===429)h(0,{code:`尝试次数过多,请稍后再试`});else if(e instanceof SN&&e.issues.length>0){let t=e.issues[0];h(+!!t.path.startsWith(`password`),{password:t.message})}else Z.error(e.message)}}),_=()=>t===0&&!/^[A-Z0-9]{4}-[A-Z0-9]{4}$/.test(a)?{code:`设置码是 8 位字符,形如 ABCD-EFGH`}:t===1&&s.length<8?{password:`至少 8 个字符`}:t===1&&s.includes("${")?{password:"密码不能包含 ${"}:t===1&&l!==s?{confirm:`两次输入的密码不一致`}:{},v=e=>{e.preventDefault();let n=_();if(Object.keys(n).length>0)return h(t,n);if(f({}),t<CR.length-1)return m(t+1);g.mutate({code:a,password:s,superusers:[]})},y=CR[t];return(0,H.jsxs)(K.div,{className:`relative flex h-full items-center justify-center overflow-hidden px-4`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0,transition:{duration:.2}},children:[(0,H.jsx)(SR,{}),(0,H.jsxs)(K.div,{className:`relative w-full max-w-[440px]`,initial:{opacity:0,y:16,scale:.98},animate:{opacity:1,y:0,scale:1},transition:{...q,delay:.05},children:[(0,H.jsxs)(`div`,{className:`mb-7 flex flex-col items-center text-center`,children:[(0,H.jsx)(K.div,{initial:{scale:.6,rotate:-12,opacity:0},animate:{scale:1,rotate:0,opacity:1},transition:{...Sv,delay:.12},className:`mb-5 rounded-[14px] shadow-[0_8px_24px_-6px_rgb(109_94_245/0.5)]`,children:(0,H.jsx)(qv,{className:`size-12`})}),(0,H.jsx)(`h1`,{className:`text-[22px] font-semibold tracking-[-0.03em]`,children:`初始化 AsaBot`}),(0,H.jsx)(`p`,{className:`mt-1.5 text-[13.5px] text-fg-3`,children:`只需几步,完成后进入管理面板`})]}),(0,H.jsxs)(K.form,{animate:p,onSubmit:v,className:`card overflow-hidden`,children:[(0,H.jsx)(`div`,{className:`flex gap-1.5 px-6 pt-5`,children:CR.map((e,n)=>(0,H.jsx)(`div`,{className:`h-1 flex-1 overflow-hidden rounded-full bg-surface-3`,children:(0,H.jsx)(K.div,{className:`h-full rounded-full bg-accent`,initial:!1,animate:{width:n<=t?`100%`:`0%`},transition:q})},e.title))}),(0,H.jsxs)(`div`,{className:`px-6 pt-5`,children:[(0,H.jsxs)(`p`,{className:`text-[11.5px] font-medium text-fg-3 tabular`,children:[`第 `,t+1,` 步,共 `,CR.length,` 步`]}),(0,H.jsx)(`h2`,{className:`mt-1 text-[16px] font-semibold tracking-[-0.015em]`,children:y.title}),(0,H.jsx)(`p`,{className:`mt-0.5 text-[12.5px] text-fg-3`,children:y.description})]}),(0,H.jsx)(`div`,{className:`relative min-h-[196px] px-6 pt-5 pb-2`,children:(0,H.jsx)(bg,{mode:`wait`,initial:!1,custom:r,children:(0,H.jsxs)(K.div,{custom:r,initial:{opacity:0,x:r*24},animate:{opacity:1,x:0},exit:{opacity:0,x:r*-24},transition:{...q,opacity:{duration:.15}},className:`space-y-4`,children:[t===0&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(ER,{icon:(0,H.jsx)(Pi,{}),children:[`设置码在 AsaBot 启动时打印在控制台。Docker 部署可以用`,` `,(0,H.jsx)(`code`,{className:`font-mono text-[12px]`,children:`docker compose logs asabot`}),` 查看。`]}),(0,H.jsx)(MO,{label:`设置码`,error:d.code,htmlFor:`setup-code`,children:(0,H.jsx)(AO,{id:`setup-code`,autoFocus:!0,autoComplete:`off`,icon:(0,H.jsx)(Qn,{}),placeholder:`ABCD-EFGH`,value:a,"aria-invalid":!!d.code,onChange:e=>{o(wR(e.target.value)),f({})},className:`font-mono tracking-[0.12em]`})})]}),t===1&&(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(MO,{label:`面板密码`,error:d.password,hint:`至少 8 个字符`,htmlFor:`setup-password`,children:(0,H.jsx)(AO,{id:`setup-password`,type:`password`,autoFocus:!0,autoComplete:`new-password`,icon:(0,H.jsx)(or,{}),value:s,"aria-invalid":!!d.password,onChange:e=>{c(e.target.value),f({})}})}),(0,H.jsx)(MO,{label:`确认密码`,error:d.confirm,htmlFor:`setup-confirm`,children:(0,H.jsx)(AO,{id:`setup-confirm`,type:`password`,autoComplete:`new-password`,icon:(0,H.jsx)(or,{}),value:l,"aria-invalid":!!d.confirm,onChange:e=>{u(e.target.value),f({})}})})]})]},t)})}),(0,H.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-t border-border px-6 py-4`,children:[(0,H.jsxs)(X,{type:`button`,variant:`ghost`,onClick:()=>m(t-1),className:B(t===0&&`invisible`),children:[(0,H.jsx)(Dt,{className:`size-4`}),`上一步`]}),(0,H.jsx)(X,{type:`submit`,variant:`primary`,loading:g.isPending,children:t===CR.length-1?(0,H.jsxs)(H.Fragment,{children:[`完成设置`,(0,H.jsx)($t,{className:`size-4`})]}):(0,H.jsxs)(H.Fragment,{children:[`下一步`,(0,H.jsx)(kt,{className:`size-4`})]})})]})]})]})]})}function ER({icon:e,children:t}){return(0,H.jsxs)(`div`,{className:`flex gap-2.5 rounded-xl bg-surface-2 px-3.5 py-3 text-[12.5px] leading-relaxed text-fg-2 [&>svg]:mt-0.5 [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-fg-3`,children:[e,(0,H.jsx)(`p`,{children:t})]})}function DR(){let e=pj(),t=RM({queryKey:[`session`],queryFn:$.session,staleTime:1/0});(0,V.useEffect)(()=>{wN(()=>{e.setQueryData([`session`],{authenticated:!1})})},[e]);let n=t.isPending?`splash`:t.error?`error`:t.data?.authenticated?`app`:t.data?.setup?`setup`:`login`;return(0,H.jsxs)(bg,{mode:`wait`,children:[n===`splash`&&(0,H.jsx)(K.div,{className:`flex h-full items-center justify-center`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:(0,H.jsx)(K.div,{animate:{scale:[1,1.06,1]},transition:{duration:1.6,repeat:1/0},children:(0,H.jsx)(qv,{className:`size-10`})})},`splash`),n===`error`&&(0,H.jsx)(OR,{error:t.error,onRetry:()=>void t.refetch()},`error`),n===`setup`&&(0,H.jsx)(TR,{},`setup`),n===`login`&&(0,H.jsx)(xR,{onSuccess:()=>{$N(e,!0)}},`login`),n===`app`&&(0,H.jsx)(K.div,{className:`h-full`,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:q,children:(0,H.jsx)(IN,{children:(0,H.jsx)(hR,{})})},`app`)]})}function OR({error:e,onRetry:t}){let n=e instanceof SN&&e.status===404;return(0,H.jsx)(K.div,{className:`flex h-full items-center justify-center p-6`,initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0},transition:q,children:(0,H.jsxs)(`div`,{className:`card max-w-md p-8 text-center`,children:[(0,H.jsx)(qv,{className:`mx-auto mb-5 size-10`}),(0,H.jsx)(`h1`,{className:`text-lg font-semibold tracking-tight`,children:n?`面板未启用`:`无法连接到 AsaBot`}),(0,H.jsx)(`p`,{className:`mt-2 text-[13.5px] leading-relaxed text-fg-3`,children:n?(0,H.jsxs)(H.Fragment,{children:[`在配置文件中设置`,` `,(0,H.jsx)(`code`,{className:`rounded bg-surface-2 px-1 font-mono text-[12.5px]`,children:`server.panelPassword`}),` `,`后重启 AsaBot。`]}):e?.message??`请确认 AsaBot 正在运行。`}),(0,H.jsx)(`button`,{type:`button`,onClick:t,className:`mt-6 cursor-pointer text-[13px] font-medium text-accent hover:underline`,children:`重试`})]})})}var kR=new TM({defaultOptions:{queries:{staleTime:15e3,refetchOnWindowFocus:!1,retry:(e,t)=>!(t instanceof SN&&t.status>0&&t.status<500)&&e<2}},mutationCache:new xM({onError:(e,t,n,r)=>{r.meta?.silent||Z.error(e instanceof Error?e.message:`操作失败`)}})});function AR(){let{resolved:e}=aP();return(0,H.jsx)(xN,{theme:e,position:`top-right`,gap:10,toastOptions:{classNames:{toast:`!rounded-xl !border-border !bg-surface !text-fg !shadow-pop !font-sans !text-[13px]`,description:`!text-fg-3`}}})}var jR=document.getElementById(`root`);if(!jR)throw Error(`#root missing from index.html`);(0,WM.createRoot)(jR).render((0,H.jsx)(V.StrictMode,{children:(0,H.jsx)(iP,{children:(0,H.jsx)(mj,{client:kR,children:(0,H.jsxs)(EO,{children:[(0,H.jsx)(DR,{}),(0,H.jsx)(AR,{})]})})})}));export{o as a,d as i,rt as n,s as o,B as r,l as s,U as t};
|