@mathwiz/ui-components 0.1.1 → 0.1.3

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/dist/index.cjs CHANGED
@@ -1,77 +1,71 @@
1
- (function(H,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],y):(H=typeof globalThis<"u"?globalThis:H||self,y(H.MathwizUIComponents={},H.React,H.ReactDOM))})(this,(function(H,y,Mc){"use strict";function Nc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const Be=Nc(y);var nn={exports:{}},_t={};/**
1
+ (function(v,R){typeof exports=="object"&&typeof module<"u"?R(exports,require("react"),require("@heroui/progress"),require("@heroui/card"),require("@heroui/react")):typeof define=="function"&&define.amd?define(["exports","react","@heroui/progress","@heroui/card","@heroui/react"],R):(v=typeof globalThis<"u"?globalThis:v||self,R(v.MathwizUIComponents={},v.React,v.progress,v.card,v.react))})(this,(function(v,R,Jn,Ke,ye){"use strict";var Oe={exports:{}},xe={};/**
2
2
  * @license React
3
- * react-jsx-runtime.production.js
3
+ * react-jsx-runtime.production.min.js
4
4
  *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var ro;function Oc(){if(ro)return _t;ro=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,o){var i=null;if(o!==void 0&&(i=""+o),s.key!==void 0&&(i=""+s.key),"key"in s){o={};for(var a in s)a!=="key"&&(o[a]=s[a])}else o=s;return s=o.ref,{$$typeof:e,type:r,key:i,ref:s!==void 0?s:null,props:o}}return _t.Fragment=t,_t.jsx=n,_t.jsxs=n,_t}var Mt={};/**
9
+ */var wt;function Gn(){if(wt)return xe;wt=1;var e=R,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,r=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(l,m,f){var u,h={},x=null,O=null;f!==void 0&&(x=""+f),m.key!==void 0&&(x=""+m.key),m.ref!==void 0&&(O=m.ref);for(u in m)s.call(m,u)&&!i.hasOwnProperty(u)&&(h[u]=m[u]);if(l&&l.defaultProps)for(u in m=l.defaultProps,m)h[u]===void 0&&(h[u]=m[u]);return{$$typeof:t,type:l,key:x,ref:O,props:h,_owner:r.current}}return xe.Fragment=n,xe.jsx=o,xe.jsxs=o,xe}var we={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var so;function Ic(){return so||(so=1,process.env.NODE_ENV!=="production"&&(function(){function e(C){if(C==null)return null;if(typeof C=="function")return C.$$typeof===q?null:C.displayName||C.name||null;if(typeof C=="string")return C;switch(C){case v:return"Fragment";case S:return"Profiler";case b:return"StrictMode";case $:return"Suspense";case I:return"SuspenseList";case R:return"Activity"}if(typeof C=="object")switch(typeof C.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),C.$$typeof){case p:return"Portal";case A:return(C.displayName||"Context")+".Provider";case M:return(C._context.displayName||"Context")+".Consumer";case O:var j=C.render;return C=C.displayName,C||(C=j.displayName||j.name||"",C=C!==""?"ForwardRef("+C+")":"ForwardRef"),C;case N:return j=C.displayName||null,j!==null?j:e(C.type)||"Memo";case k:j=C._payload,C=C._init;try{return e(C(j))}catch{}}return null}function t(C){return""+C}function n(C){try{t(C);var j=!1}catch{j=!0}if(j){j=console;var z=j.error,U=typeof Symbol=="function"&&Symbol.toStringTag&&C[Symbol.toStringTag]||C.constructor.name||"Object";return z.call(j,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",U),t(C)}}function r(C){if(C===v)return"<>";if(typeof C=="object"&&C!==null&&C.$$typeof===k)return"<...>";try{var j=e(C);return j?"<"+j+">":"<...>"}catch{return"<...>"}}function s(){var C=h.A;return C===null?null:C.getOwner()}function o(){return Error("react-stack-top-frame")}function i(C){if(P.call(C,"key")){var j=Object.getOwnPropertyDescriptor(C,"key").get;if(j&&j.isReactWarning)return!1}return C.key!==void 0}function a(C,j){function z(){L||(L=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",j))}z.isReactWarning=!0,Object.defineProperty(C,"key",{get:z,configurable:!0})}function c(){var C=e(this.type);return g[C]||(g[C]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),C=this.props.ref,C!==void 0?C:null}function u(C,j,z,U,Y,Z,ie,J){return z=Z.ref,C={$$typeof:w,type:C,key:j,props:Z,_owner:Y},(z!==void 0?z:null)!==null?Object.defineProperty(C,"ref",{enumerable:!1,get:c}):Object.defineProperty(C,"ref",{enumerable:!1,value:null}),C._store={},Object.defineProperty(C._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(C,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(C,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ie}),Object.defineProperty(C,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:J}),Object.freeze&&(Object.freeze(C.props),Object.freeze(C)),C}function l(C,j,z,U,Y,Z,ie,J){var Q=j.children;if(Q!==void 0)if(U)if(D(Q)){for(U=0;U<Q.length;U++)d(Q[U]);Object.freeze&&Object.freeze(Q)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(Q);if(P.call(j,"key")){Q=e(C);var le=Object.keys(j).filter(function(we){return we!=="key"});U=0<le.length?"{key: someKey, "+le.join(": ..., ")+": ...}":"{key: someKey}",B[Q+U]||(le=0<le.length?"{"+le.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var vt;function Vn(){return vt||(vt=1,process.env.NODE_ENV!=="production"&&(function(){var e=R,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),O=Symbol.for("react.offscreen"),p=Symbol.iterator,y="@@iterator";function g(a){if(a===null||typeof a!="object")return null;var _=p&&a[p]||a[y];return typeof _=="function"?_:null}var E=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function k(a){{for(var _=arguments.length,b=new Array(_>1?_-1:0),S=1;S<_;S++)b[S-1]=arguments[S];N("error",a,b)}}function N(a,_,b){{var S=E.ReactDebugCurrentFrame,T=S.getStackAddendum();T!==""&&(_+="%s",b=b.concat([T]));var L=b.map(function(U){return String(U)});L.unshift("Warning: "+_),Function.prototype.apply.call(console[a],console,L)}}var P=!1,A=!1,I=!1,w=!1,F=!1,q;q=Symbol.for("react.module.reference");function ne(a){return!!(typeof a=="string"||typeof a=="function"||a===s||a===i||F||a===r||a===f||a===u||w||a===O||P||A||I||typeof a=="object"&&a!==null&&(a.$$typeof===x||a.$$typeof===h||a.$$typeof===o||a.$$typeof===l||a.$$typeof===m||a.$$typeof===q||a.getModuleId!==void 0))}function z(a,_,b){var S=a.displayName;if(S)return S;var T=_.displayName||_.name||"";return T!==""?b+"("+T+")":b}function D(a){return a.displayName||"Context"}function J(a){if(a==null)return null;if(typeof a.tag=="number"&&k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case s:return"Fragment";case n:return"Portal";case i:return"Profiler";case r:return"StrictMode";case f:return"Suspense";case u:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case l:var _=a;return D(_)+".Consumer";case o:var b=a;return D(b._context)+".Provider";case m:return z(a,a.render,"ForwardRef");case h:var S=a.displayName||null;return S!==null?S:J(a.type)||"Memo";case x:{var T=a,L=T._payload,U=T._init;try{return J(U(L))}catch{return null}}}return null}var G=Object.assign,ae=0,Z,ke,se,Ne,He,re,ie;function he(){}he.__reactDisabledLog=!0;function ge(){{if(ae===0){Z=console.log,ke=console.info,se=console.warn,Ne=console.error,He=console.group,re=console.groupCollapsed,ie=console.groupEnd;var a={configurable:!0,enumerable:!0,value:he,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}ae++}}function We(){{if(ae--,ae===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:G({},a,{value:Z}),info:G({},a,{value:ke}),warn:G({},a,{value:se}),error:G({},a,{value:Ne}),group:G({},a,{value:He}),groupCollapsed:G({},a,{value:re}),groupEnd:G({},a,{value:ie})})}ae<0&&k("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var mt=E.ReactCurrentDispatcher,pt;function ze(a,_,b){{if(pt===void 0)try{throw Error()}catch(T){var S=T.stack.trim().match(/\n( *(at )?)/);pt=S&&S[1]||""}return`
18
+ `+pt+a}}var ht=!1,Je;{var ho=typeof WeakMap=="function"?WeakMap:Map;Je=new ho}function jn(a,_){if(!a||ht)return"";{var b=Je.get(a);if(b!==void 0)return b}var S;ht=!0;var T=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var L;L=mt.current,mt.current=null,ge();try{if(_){var U=function(){throw Error()};if(Object.defineProperty(U.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(U,[])}catch(X){S=X}Reflect.construct(a,[],U)}else{try{U.call()}catch(X){S=X}a.call(U.prototype)}}else{try{throw Error()}catch(X){S=X}a()}}catch(X){if(X&&S&&typeof X.stack=="string"){for(var j=X.stack.split(`
19
+ `),V=S.stack.split(`
20
+ `),$=j.length-1,B=V.length-1;$>=1&&B>=0&&j[$]!==V[B];)B--;for(;$>=1&&B>=0;$--,B--)if(j[$]!==V[B]){if($!==1||B!==1)do if($--,B--,B<0||j[$]!==V[B]){var Q=`
21
+ `+j[$].replace(" at new "," at ");return a.displayName&&Q.includes("<anonymous>")&&(Q=Q.replace("<anonymous>",a.displayName)),typeof a=="function"&&Je.set(a,Q),Q}while($>=1&&B>=0);break}}}finally{ht=!1,mt.current=L,We(),Error.prepareStackTrace=T}var be=a?a.displayName||a.name:"",de=be?ze(be):"";return typeof a=="function"&&Je.set(a,de),de}function go(a,_,b){return jn(a,!1)}function _o(a){var _=a.prototype;return!!(_&&_.isReactComponent)}function Ge(a,_,b){if(a==null)return"";if(typeof a=="function")return jn(a,_o(a));if(typeof a=="string")return ze(a);switch(a){case f:return ze("Suspense");case u:return ze("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case m:return go(a.render);case h:return Ge(a.type,_,b);case x:{var S=a,T=S._payload,L=S._init;try{return Ge(L(T),_,b)}catch{}}}return""}var je=Object.prototype.hasOwnProperty,On={},Un=E.ReactDebugCurrentFrame;function Ve(a){if(a){var _=a._owner,b=Ge(a.type,a._source,_?_.type:null);Un.setExtraStackFrame(b)}else Un.setExtraStackFrame(null)}function bo(a,_,b,S,T){{var L=Function.call.bind(je);for(var U in a)if(L(a,U)){var j=void 0;try{if(typeof a[U]!="function"){var V=Error((S||"React class")+": "+b+" type `"+U+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[U]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw V.name="Invariant Violation",V}j=a[U](_,U,S,b,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch($){j=$}j&&!(j instanceof Error)&&(Ve(T),k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",S||"React class",b,U,typeof j),Ve(null)),j instanceof Error&&!(j.message in On)&&(On[j.message]=!0,Ve(T),k("Failed %s type: %s",b,j.message),Ve(null))}}}var yo=Array.isArray;function gt(a){return yo(a)}function xo(a){{var _=typeof Symbol=="function"&&Symbol.toStringTag,b=_&&a[Symbol.toStringTag]||a.constructor.name||"Object";return b}}function wo(a){try{return Tn(a),!1}catch{return!0}}function Tn(a){return""+a}function Pn(a){if(wo(a))return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",xo(a)),Tn(a)}var In=E.ReactCurrentOwner,vo={key:!0,ref:!0,__self:!0,__source:!0},Ln,Dn;function Eo(a){if(je.call(a,"ref")){var _=Object.getOwnPropertyDescriptor(a,"ref").get;if(_&&_.isReactWarning)return!1}return a.ref!==void 0}function So(a){if(je.call(a,"key")){var _=Object.getOwnPropertyDescriptor(a,"key").get;if(_&&_.isReactWarning)return!1}return a.key!==void 0}function Ao(a,_){typeof a.ref=="string"&&In.current}function Co(a,_){{var b=function(){Ln||(Ln=!0,k("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",_))};b.isReactWarning=!0,Object.defineProperty(a,"key",{get:b,configurable:!0})}}function Ro(a,_){{var b=function(){Dn||(Dn=!0,k("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",_))};b.isReactWarning=!0,Object.defineProperty(a,"ref",{get:b,configurable:!0})}}var ko=function(a,_,b,S,T,L,U){var j={$$typeof:t,type:a,key:_,ref:b,props:U,_owner:L};return j._store={},Object.defineProperty(j._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(j,"_self",{configurable:!1,enumerable:!1,writable:!1,value:S}),Object.defineProperty(j,"_source",{configurable:!1,enumerable:!1,writable:!1,value:T}),Object.freeze&&(Object.freeze(j.props),Object.freeze(j)),j};function No(a,_,b,S,T){{var L,U={},j=null,V=null;b!==void 0&&(Pn(b),j=""+b),So(_)&&(Pn(_.key),j=""+_.key),Eo(_)&&(V=_.ref,Ao(_,T));for(L in _)je.call(_,L)&&!vo.hasOwnProperty(L)&&(U[L]=_[L]);if(a&&a.defaultProps){var $=a.defaultProps;for(L in $)U[L]===void 0&&(U[L]=$[L])}if(j||V){var B=typeof a=="function"?a.displayName||a.name||"Unknown":a;j&&Co(U,B),V&&Ro(U,B)}return ko(a,j,V,T,S,In.current,U)}}var _t=E.ReactCurrentOwner,Mn=E.ReactDebugCurrentFrame;function _e(a){if(a){var _=a._owner,b=Ge(a.type,a._source,_?_.type:null);Mn.setExtraStackFrame(b)}else Mn.setExtraStackFrame(null)}var bt;bt=!1;function yt(a){return typeof a=="object"&&a!==null&&a.$$typeof===t}function Fn(){{if(_t.current){var a=J(_t.current.type);if(a)return`
22
+
23
+ Check the render method of \``+a+"`."}return""}}function jo(a){return""}var $n={};function Oo(a){{var _=Fn();if(!_){var b=typeof a=="string"?a:a.displayName||a.name;b&&(_=`
24
+
25
+ Check the top-level render call using <`+b+">.")}return _}}function Bn(a,_){{if(!a._store||a._store.validated||a.key!=null)return;a._store.validated=!0;var b=Oo(_);if($n[b])return;$n[b]=!0;var S="";a&&a._owner&&a._owner!==_t.current&&(S=" It was passed a child from "+J(a._owner.type)+"."),_e(a),k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',b,S),_e(null)}}function qn(a,_){{if(typeof a!="object")return;if(gt(a))for(var b=0;b<a.length;b++){var S=a[b];yt(S)&&Bn(S,_)}else if(yt(a))a._store&&(a._store.validated=!0);else if(a){var T=g(a);if(typeof T=="function"&&T!==a.entries)for(var L=T.call(a),U;!(U=L.next()).done;)yt(U.value)&&Bn(U.value,_)}}}function Uo(a){{var _=a.type;if(_==null||typeof _=="string")return;var b;if(typeof _=="function")b=_.propTypes;else if(typeof _=="object"&&(_.$$typeof===m||_.$$typeof===h))b=_.propTypes;else return;if(b){var S=J(_);bo(b,a.props,"prop",S,a)}else if(_.PropTypes!==void 0&&!bt){bt=!0;var T=J(_);k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T||"Unknown")}typeof _.getDefaultProps=="function"&&!_.getDefaultProps.isReactClassApproved&&k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function To(a){{for(var _=Object.keys(a.props),b=0;b<_.length;b++){var S=_[b];if(S!=="children"&&S!=="key"){_e(a),k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",S),_e(null);break}}a.ref!==null&&(_e(a),k("Invalid attribute `ref` supplied to `React.Fragment`."),_e(null))}}var Hn={};function Wn(a,_,b,S,T,L){{var U=ne(a);if(!U){var j="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(j+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var V=jo();V?j+=V:j+=Fn();var $;a===null?$="null":gt(a)?$="array":a!==void 0&&a.$$typeof===t?($="<"+(J(a.type)||"Unknown")+" />",j=" Did you accidentally export a JSX literal instead of a component?"):$=typeof a,k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",$,j)}var B=No(a,_,b,T,L);if(B==null)return B;if(U){var Q=_.children;if(Q!==void 0)if(S)if(gt(Q)){for(var be=0;be<Q.length;be++)qn(Q[be],a);Object.freeze&&Object.freeze(Q)}else k("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else qn(Q,a)}if(je.call(_,"key")){var de=J(a),X=Object.keys(_).filter(function(Fo){return Fo!=="key"}),xt=X.length>0?"{key: someKey, "+X.join(": ..., ")+": ...}":"{key: someKey}";if(!Hn[de+xt]){var Mo=X.length>0?"{"+X.join(": ..., ")+": ...}":"{}";k(`A props object containing a "key" prop is being spread into JSX:
18
26
  let props = %s;
19
27
  <%s {...props} />
20
28
  React keys must be passed directly to JSX without using spread:
21
29
  let props = %s;
22
- <%s key={someKey} {...props} />`,U,Q,le,Q),B[Q+U]=!0)}if(Q=null,z!==void 0&&(n(z),Q=""+z),i(j)&&(n(j.key),Q=""+j.key),"key"in j){z={};for(var ve in j)ve!=="key"&&(z[ve]=j[ve])}else z=j;return Q&&a(z,typeof C=="function"?C.displayName||C.name||"Unknown":C),u(C,Q,Z,Y,s(),z,ie,J)}function d(C){typeof C=="object"&&C!==null&&C.$$typeof===w&&C._store&&(C._store.validated=1)}var m=y,w=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),A=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),q=Symbol.for("react.client.reference"),h=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=Object.prototype.hasOwnProperty,D=Array.isArray,T=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(C){return C()}};var L,g={},_=m.react_stack_bottom_frame.bind(m,o)(),E=T(r(o)),B={};Mt.Fragment=v,Mt.jsx=function(C,j,z,U,Y){var Z=1e4>h.recentlyCreatedOwnerStacks++;return l(C,j,z,!1,U,Y,Z?Error("react-stack-top-frame"):_,Z?T(r(C)):E)},Mt.jsxs=function(C,j,z,U,Y){var Z=1e4>h.recentlyCreatedOwnerStacks++;return l(C,j,z,!0,U,Y,Z?Error("react-stack-top-frame"):_,Z?T(r(C)):E)}})()),Mt}var oo;function Lc(){return oo||(oo=1,process.env.NODE_ENV==="production"?nn.exports=Oc():nn.exports=Ic()),nn.exports}var f=Lc();const io=({progress:e,variant:t="solid",size:n="md",radius:r="md",children:s,className:o="",...i})=>{const c=e!==void 0?(l=>l===0?"button--primary":l===100?"button--success":"button--secondary")(e):"button--primary",u=["button",`button--${n}`,`button--${t}`,`button--radius-${r}`,c,o].filter(Boolean).join(" ");return f.jsx("button",{type:"button",className:u,"data-progress":e,...i,children:s})};function rn(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,s=Be.createContext(void 0);s.displayName=r;function o(){var i;const a=Be.useContext(s);if(!a&&t){const c=new Error(n);throw c.name="ContextError",(i=Error.captureStackTrace)==null||i.call(Error,c,o),c}return a}return[s.Provider,o,s]}function ze(e){const t=y.useRef(null);return y.useImperativeHandle(e,()=>t.current),t}process.env.NODE_ENV,process.env.NODE_ENV;var ae=e=>e?"true":void 0;function ao(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ao(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Oe(...e){for(var t=0,n,r,s="";t<e.length;)(n=e[t++])&&(r=ao(n))&&(s&&(s+=" "),s+=r);return s}var jc=e=>e?.length<=4?e:e?.slice(0,3);function Dc(e){return`${e}-${Math.floor(Math.random()*1e6)}`}function tr(e){if(!e||typeof e!="object")return"";try{return JSON.stringify(e)}catch{return""}}function Vc(e,t,n){return Math.min(Math.max(e,t),n)}function Fc(e,t=100){return Math.min(Math.max(e,0),t)}function nr(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}var lo=new Map;function Rc(e,t){if(e===t)return e;let n=lo.get(e);if(n)return n.forEach(s=>s.current=t),t;let r=lo.get(t);return r?(r.forEach(s=>s.current=e),e):t}function ot(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let s in r){let o=t[s],i=r[s];typeof o=="function"&&typeof i=="function"&&s[0]==="o"&&s[1]==="n"&&s.charCodeAt(2)>=65&&s.charCodeAt(2)<=90?t[s]=nr(o,i):(s==="className"||s==="UNSAFE_className")&&typeof o=="string"&&typeof i=="string"?t[s]=Oe(o,i):s==="id"&&o&&i?t.id=Rc(o,i):t[s]=i!==void 0?i:o}}return t}function Uc(){const e=()=>()=>{};return Be.useSyncExternalStore(e,()=>!0,()=>!1)}var Bc=new Set(["id","type","style","title","role","tabIndex","htmlFor","width","height","abbr","accept","acceptCharset","accessKey","action","allowFullScreen","allowTransparency","alt","async","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","challenge","charset","checked","cite","class","className","cols","colSpan","command","content","contentEditable","contextMenu","controls","coords","crossOrigin","data","dateTime","default","defer","dir","disabled","download","draggable","dropzone","encType","enterKeyHint","for","form","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","headers","hidden","high","href","hrefLang","httpEquiv","icon","inputMode","isMap","itemId","itemProp","itemRef","itemScope","itemType","kind","label","lang","list","loop","manifest","max","maxLength","media","mediaGroup","method","min","minLength","multiple","muted","name","noValidate","open","optimum","pattern","ping","placeholder","poster","preload","radioGroup","referrerPolicy","readOnly","rel","required","rows","rowSpan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","slot","sortable","span","spellCheck","src","srcDoc","srcSet","start","step","target","translate","typeMustMatch","useMap","value","wmode","wrap"]),zc=new Set(["onCopy","onCut","onPaste","onLoad","onError","onWheel","onScroll","onCompositionEnd","onCompositionStart","onCompositionUpdate","onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onSubmit","onClick","onContextMenu","onDoubleClick","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onPointerDown","onPointerEnter","onPointerLeave","onPointerUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionEnd"]),co=/^(data-.*)$/,Gc=/^(aria-.*)$/,sn=/^(on[A-Z].*)$/;function Nt(e,t={}){let{labelable:n=!0,enabled:r=!0,propNames:s,omitPropNames:o,omitEventNames:i,omitDataProps:a,omitEventProps:c}=t,u={};if(!r)return e;for(const l in e)o?.has(l)||i?.has(l)&&sn.test(l)||sn.test(l)&&!zc.has(l)||a&&co.test(l)||c&&sn.test(l)||(Object.prototype.hasOwnProperty.call(e,l)&&(Bc.has(l)||n&&Gc.test(l)||s?.has(l)||co.test(l))||sn.test(l))&&(u[l]=e[l]);return u}var[Ry,Ot]=rn({name:"ProviderContext",strict:!1});const Kc=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Hc=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Wc(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return Kc.has(n.script)}let t=e.split("-")[0];return Hc.has(t)}const on={prefix:String(Math.round(Math.random()*1e10)),current:0},uo=y.createContext(on),qc=y.createContext(!1);let Yc=!!(typeof window<"u"&&window.document&&window.document.createElement),rr=new WeakMap;function Xc(e=!1){let t=y.useContext(uo),n=y.useRef(null);if(n.current===null&&!e){var r,s;let o=(s=y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||s===void 0||(r=s.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let i=rr.get(o);i==null?rr.set(o,{id:t.current,state:o.memoizedState}):o.memoizedState!==i.state&&(t.current=i.id,rr.delete(o))}n.current=++t.current}return n.current}function Jc(e){let t=y.useContext(uo);t===on&&!Yc&&process.env.NODE_ENV!=="production"&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=Xc(!!e),r=t===on&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function Zc(e){let t=y.useId(),[n]=y.useState(fo()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${on.prefix}`;return e||`${r}-${t}`}const Qc=typeof y.useId=="function"?Zc:Jc;function eu(){return!1}function tu(){return!0}function nu(e){return()=>{}}function fo(){return typeof y.useSyncExternalStore=="function"?y.useSyncExternalStore(nu,eu,tu):y.useContext(qc)}const ru=Symbol.for("react-aria.i18n.locale");function po(){let e=typeof window<"u"&&window[ru]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:Wc(e)?"rtl":"ltr"}}let sr=po(),It=new Set;function mo(){sr=po();for(let e of It)e(sr)}function su(){let e=fo(),[t,n]=y.useState(sr);return y.useEffect(()=>(It.size===0&&window.addEventListener("languagechange",mo),It.add(n),()=>{It.delete(n),It.size===0&&window.removeEventListener("languagechange",mo)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const ou=y.createContext(null);function iu(){let e=su();return y.useContext(ou)||e}function au(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function lu(e,t,n){au(e,t),t.set(e,n)}const an=typeof document<"u"?y.useLayoutEffect:()=>{};var or;const cu=(or=y.useInsertionEffect)!==null&&or!==void 0?or:an;function Ie(e){const t=y.useRef(null);return cu(()=>{t.current=e},[e]),y.useCallback((...n)=>{const r=t.current;return r?.(...n)},[])}let uu=!!(typeof window<"u"&&window.document&&window.document.createElement),it=new Map,Lt;typeof FinalizationRegistry<"u"&&(Lt=new FinalizationRegistry(e=>{it.delete(e)}));function ir(e){let[t,n]=y.useState(e),r=y.useRef(null),s=Qc(t),o=y.useRef(null);if(Lt&&Lt.register(o,s),uu){const i=it.get(s);i&&!i.includes(r)?i.push(r):it.set(s,[r])}return an(()=>{let i=s;return()=>{Lt&&Lt.unregister(o),it.delete(i)}},[s]),y.useEffect(()=>{let i=r.current;return i&&n(i),()=>{i&&(r.current=null)}}),s}function du(e,t){if(e===t)return e;let n=it.get(e);if(n)return n.forEach(s=>s.current=t),t;let r=it.get(t);return r?(r.forEach(s=>s.current=e),e):t}function ho(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const ce=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},ge=e=>e&&"window"in e&&e.window===e?e:ce(e).defaultView||window;function fu(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function pu(e){return fu(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let mu=!1;function ar(){return mu}function re(e,t){if(!ar())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:pu(n)?n=n.host:n=n.parentNode}return!1}const jt=(e=document)=>{var t;if(!ar())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function ee(e){return ar()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function go(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=go(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function hu(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=go(e))&&(r&&(r+=" "),r+=t);return r}function Ge(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let s in r){let o=t[s],i=r[s];typeof o=="function"&&typeof i=="function"&&s[0]==="o"&&s[1]==="n"&&s.charCodeAt(2)>=65&&s.charCodeAt(2)<=90?t[s]=ho(o,i):(s==="className"||s==="UNSAFE_className")&&typeof o=="string"&&typeof i=="string"?t[s]=hu(o,i):s==="id"&&o&&i?t.id=du(o,i):t[s]=i!==void 0?i:o}}return t}const gu=new Set(["id"]),bu=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),yu=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),vu=new Set(["dir","lang","hidden","inert","translate"]),bo=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),wu=/^(data-.*)$/;function yo(e,t={}){let{labelable:n,isLink:r,global:s,events:o=s,propNames:i}=t,a={};for(const c in e)Object.prototype.hasOwnProperty.call(e,c)&&(gu.has(c)||n&&bu.has(c)||r&&yu.has(c)||s&&vu.has(c)||o&&bo.has(c)||c.endsWith("Capture")&&bo.has(c.slice(0,-7))||i?.has(c)||wu.test(c))&&(a[c]=e[c]);return a}function at(e){if(xu())e.focus({preventScroll:!0});else{let t=Tu(e);e.focus(),Eu(t)}}let ln=null;function xu(){if(ln==null){ln=!1;try{document.createElement("div").focus({get preventScroll(){return ln=!0,!0}})}catch{}}return ln}function Tu(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Eu(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function cn(e){var t;if(typeof window>"u"||window.navigator==null)return!1;let n=(t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands;return Array.isArray(n)&&n.some(r=>e.test(r.brand))||e.test(window.navigator.userAgent)}function lr(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Ae(e){if(process.env.NODE_ENV==="test")return e;let t=null;return()=>(t==null&&(t=e()),t)}const lt=Ae(function(){return lr(/^Mac/i)}),Su=Ae(function(){return lr(/^iPhone/i)}),vo=Ae(function(){return lr(/^iPad/i)||lt()&&navigator.maxTouchPoints>1}),cr=Ae(function(){return Su()||vo()});Ae(function(){return lt()||cr()});const Cu=Ae(function(){return cn(/AppleWebKit/i)&&!Pu()}),Pu=Ae(function(){return cn(/Chrome/i)}),wo=Ae(function(){return cn(/Android/i)}),ku=Ae(function(){return cn(/Firefox/i)});function Dt(e,t,n=!0){var r,s;let{metaKey:o,ctrlKey:i,altKey:a,shiftKey:c}=t;ku()&&(!((s=window.event)===null||s===void 0||(r=s.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(lt()?o=!0:i=!0);let u=Cu()&&lt()&&!vo()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:i,altKey:a,shiftKey:c}):new MouseEvent("click",{metaKey:o,ctrlKey:i,altKey:a,shiftKey:c,bubbles:!0,cancelable:!0});Dt.isOpening=n,at(e),e.dispatchEvent(u),Dt.isOpening=!1}Dt.isOpening=!1;let Le=new Map,ur=new Set;function xo(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let s=Le.get(r.target);s||(s=new Set,Le.set(r.target,s),r.target.addEventListener("transitioncancel",n,{once:!0})),s.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let s=Le.get(r.target);if(s&&(s.delete(r.propertyName),s.size===0&&(r.target.removeEventListener("transitioncancel",n),Le.delete(r.target)),Le.size===0)){for(let o of ur)o();ur.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?xo():document.addEventListener("DOMContentLoaded",xo));function Au(){for(const[e]of Le)"isConnected"in e&&!e.isConnected&&Le.delete(e)}function To(e){requestAnimationFrame(()=>{Au(),Le.size===0?e():ur.add(e)})}function dr(){let e=y.useRef(new Map),t=y.useCallback((s,o,i,a)=>{let c=a?.once?(...u)=>{e.current.delete(i),i(...u)}:i;e.current.set(i,{type:o,eventTarget:s,fn:c,options:a}),s.addEventListener(o,c,a)},[]),n=y.useCallback((s,o,i,a)=>{var c;let u=((c=e.current.get(i))===null||c===void 0?void 0:c.fn)||i;s.removeEventListener(o,u,a),e.current.delete(i)},[]),r=y.useCallback(()=>{e.current.forEach((s,o)=>{n(s.eventTarget,s.type,o,s.options)})},[n]);return y.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function $u(e,t){let{id:n,"aria-label":r,"aria-labelledby":s}=e;return n=ir(n),s&&r?s=[...new Set([n,...s.trim().split(/\s+/)])].join(" "):s&&(s=s.trim().split(/\s+/).join(" ")),!r&&!s&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":s}}function Eo(e,t){an(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function fr(e){return e.mozInputSource===0&&e.isTrusted?!0:wo()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function _u(e){return!wo()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}const Mu=typeof Element<"u"&&"checkVisibility"in Element.prototype;function Nu(e){const t=ge(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,s=n!=="none"&&r!=="hidden"&&r!=="collapse";if(s){const{getComputedStyle:o}=e.ownerDocument.defaultView;let{display:i,visibility:a}=o(e);s=i!=="none"&&a!=="hidden"&&a!=="collapse"}return s}function Ou(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function So(e,t){return Mu?e.checkVisibility():e.nodeName!=="#comment"&&Nu(e)&&Ou(e,t)&&(!e.parentElement||So(e.parentElement,e))}const Co=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],Iu=Co.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Co.push('[tabindex]:not([tabindex="-1"]):not([disabled])');function Lu(e){return e.matches(Iu)&&So(e)&&!ju(e)}function ju(e){let t=e;for(;t!=null;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function Du(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}let pr=new Map,mr=!1;try{mr=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let un=!1;try{un=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const Po={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class Vu{format(t){let n="";if(!mr&&this.options.signDisplay!=null?n=Ru(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!un){var r;let{unit:s,unitDisplay:o="short",locale:i}=this.resolvedOptions();if(!s)return n;let a=(r=Po[s])===null||r===void 0?void 0:r[o];n+=a[i]||a.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(t),s=this.numberFormatter.formatToParts(n);return[...r.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...s.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!mr&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!un&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=Fu(t,n),this.options=n}}function Fu(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!un){var r;let{unit:i,unitDisplay:a="short"}=t;if(!i)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=Po[i])===null||r===void 0)&&r[a]))throw new Error(`Unsupported unit ${i} with unitDisplay = ${a}`);t={...t,style:"decimal"}}let s=e+(t?Object.entries(t).sort((i,a)=>i[0]<a[0]?-1:1).join():"");if(pr.has(s))return pr.get(s);let o=new Intl.NumberFormat(e,t);return pr.set(s,o),o}function Ru(e,t,n){if(t==="auto")return e.format(n);if(t==="never")return e.format(Math.abs(n));{let r=!1;if(t==="always"?r=n>0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let s=e.format(-n),o=e.format(n),i=s.replace(o,"").replace(/\u200e|\u061C/,"");return[...i].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),s.replace(o,"!!!").replace(i,"+").replace("!!!",o)}else return e.format(n)}}function Uu(e={}){let{locale:t}=iu();return y.useMemo(()=>new Vu(t,e),[t,e])}const ko=y.createContext({});function hr(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}const gr=typeof window<"u",Ao=gr?y.useLayoutEffect:y.useEffect,dn=y.createContext(null);function Bu(e,t){e.indexOf(t)===-1&&e.push(t)}function zu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Ke=(e,t,n)=>n>t?t:n<e?e:n;function br(e,t){return t?`${e}. For more information and steps for solving, visit https://motion.dev/troubleshooting/${t}`:e}let ct=()=>{},je=()=>{};process.env.NODE_ENV!=="production"&&(ct=(e,t,n)=>{!e&&typeof console<"u"&&console.warn(br(t,n))},je=(e,t,n)=>{if(!e)throw new Error(br(t,n))});const $e={},$o=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Gu(e){return typeof e=="object"&&e!==null}const _o=e=>/^0[^.\s]+$/u.test(e);function yr(e){let t;return()=>(t===void 0&&(t=e()),t)}const ut=e=>e,Ku=(e,t)=>n=>t(e(n)),fn=(...e)=>e.reduce(Ku),Mo=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class No{constructor(){this.subscriptions=[]}add(t){return Bu(this.subscriptions,t),()=>zu(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let o=0;o<s;o++){const i=this.subscriptions[o];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Se=e=>e*1e3,_e=e=>e/1e3;function Oo(e,t){return t?e*(1e3/t):0}const Io=new Set;function vr(e,t,n){e||Io.has(t)||(console.warn(br(t,n)),Io.add(t))}const Lo=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Hu=1e-7,Wu=12;function qu(e,t,n,r,s){let o,i,a=0;do i=t+(n-t)/2,o=Lo(i,r,s)-e,o>0?n=i:t=i;while(Math.abs(o)>Hu&&++a<Wu);return i}function Vt(e,t,n,r){if(e===t&&n===r)return ut;const s=o=>qu(o,0,1,e,n);return o=>o===0||o===1?o:Lo(s(o),t,r)}const jo=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Do=e=>t=>1-e(1-t),Vo=Vt(.33,1.53,.69,.99),wr=Do(Vo),Fo=jo(wr),Ro=e=>(e*=2)<1?.5*wr(e):.5*(2-Math.pow(2,-10*(e-1))),xr=e=>1-Math.sin(Math.acos(e)),Yu=Do(xr),Uo=jo(xr),Xu=Vt(.42,0,1,1),Ju=Vt(0,0,.58,1),Bo=Vt(.42,0,.58,1),Zu=e=>Array.isArray(e)&&typeof e[0]!="number",zo=e=>Array.isArray(e)&&typeof e[0]=="number",Go={linear:ut,easeIn:Xu,easeInOut:Bo,easeOut:Ju,circIn:xr,circInOut:Uo,circOut:Yu,backIn:wr,backInOut:Fo,backOut:Vo,anticipate:Ro},Qu=e=>typeof e=="string",Ko=e=>{if(zo(e)){je(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,s]=e;return Vt(t,n,r,s)}else if(Qu(e))return je(Go[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Go[e];return e},pn=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function ed(e,t){let n=new Set,r=new Set,s=!1,o=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(l){i.has(l)&&(u.schedule(l),e()),l(a)}const u={schedule:(l,d=!1,m=!1)=>{const p=m&&s?n:r;return d&&i.add(l),p.has(l)||p.add(l),l},cancel:l=>{r.delete(l),i.delete(l)},process:l=>{if(a=l,s){o=!0;return}s=!0,[n,r]=[r,n],n.forEach(c),n.clear(),s=!1,o&&(o=!1,u.process(l))}};return u}const td=40;function Ho(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,i=pn.reduce((A,O)=>(A[O]=ed(o),A),{}),{setup:a,read:c,resolveKeyframes:u,preUpdate:l,update:d,preRender:m,render:w,postRender:p}=i,v=()=>{const A=$e.useManualTiming?s.timestamp:performance.now();n=!1,$e.useManualTiming||(s.delta=r?1e3/60:Math.max(Math.min(A-s.timestamp,td),1)),s.timestamp=A,s.isProcessing=!0,a.process(s),c.process(s),u.process(s),l.process(s),d.process(s),m.process(s),w.process(s),p.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(v))},b=()=>{n=!0,r=!0,s.isProcessing||e(v)};return{schedule:pn.reduce((A,O)=>{const $=i[O];return A[O]=(I,N=!1,k=!1)=>(n||b(),$.schedule(I,N,k)),A},{}),cancel:A=>{for(let O=0;O<pn.length;O++)i[pn[O]].cancel(A)},state:s,steps:i}}const{schedule:xe,cancel:Tr,state:mn}=Ho(typeof requestAnimationFrame<"u"?requestAnimationFrame:ut,!0);let hn;function nd(){hn=void 0}const be={now:()=>(hn===void 0&&be.set(mn.isProcessing||$e.useManualTiming?mn.timestamp:performance.now()),hn),set:e=>{hn=e,queueMicrotask(nd)}},Wo=e=>t=>typeof t=="string"&&t.startsWith(e),qo=Wo("--"),rd=Wo("var(--"),Er=e=>rd(e)?sd.test(e.split("/*")[0].trim()):!1,sd=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,dt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ft={...dt,transform:e=>Ke(0,1,e)},gn={...dt,default:1},Rt=e=>Math.round(e*1e5)/1e5,Sr=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function od(e){return e==null}const id=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Cr=(e,t)=>n=>!!(typeof n=="string"&&id.test(n)&&n.startsWith(e)||t&&!od(n)&&Object.prototype.hasOwnProperty.call(n,t)),Yo=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,o,i,a]=r.match(Sr);return{[e]:parseFloat(s),[t]:parseFloat(o),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},ad=e=>Ke(0,255,e),Pr={...dt,transform:e=>Math.round(ad(e))},He={test:Cr("rgb","red"),parse:Yo("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Pr.transform(e)+", "+Pr.transform(t)+", "+Pr.transform(n)+", "+Rt(Ft.transform(r))+")"};function ld(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const kr={test:Cr("#"),parse:ld,transform:He.transform},Ut=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),De=Ut("deg"),ft=Ut("%"),K=Ut("px"),cd=Ut("vh"),ud=Ut("vw"),Xo={...ft,parse:e=>ft.parse(e)/100,transform:e=>ft.transform(e*100)},pt={test:Cr("hsl","hue"),parse:Yo("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ft.transform(Rt(t))+", "+ft.transform(Rt(n))+", "+Rt(Ft.transform(r))+")"},se={test:e=>He.test(e)||kr.test(e)||pt.test(e),parse:e=>He.test(e)?He.parse(e):pt.test(e)?pt.parse(e):kr.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?He.transform(e):pt.transform(e),getAnimatableNone:e=>{const t=se.parse(e);return t.alpha=0,se.transform(t)}},dd=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function fd(e){return isNaN(e)&&typeof e=="string"&&(e.match(Sr)?.length||0)+(e.match(dd)?.length||0)>0}const Jo="number",Zo="color",pd="var",md="var(",Qo="${}",hd=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Bt(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let o=0;const a=t.replace(hd,c=>(se.test(c)?(r.color.push(o),s.push(Zo),n.push(se.parse(c))):c.startsWith(md)?(r.var.push(o),s.push(pd),n.push(c)):(r.number.push(o),s.push(Jo),n.push(parseFloat(c))),++o,Qo)).split(Qo);return{values:n,split:a,indexes:r,types:s}}function ei(e){return Bt(e).values}function ti(e){const{split:t,types:n}=Bt(e),r=t.length;return s=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],s[i]!==void 0){const a=n[i];a===Jo?o+=Rt(s[i]):a===Zo?o+=se.transform(s[i]):o+=s[i]}return o}}const gd=e=>typeof e=="number"?0:se.test(e)?se.getAnimatableNone(e):e;function bd(e){const t=ei(e);return ti(e)(t.map(gd))}const mt={test:fd,parse:ei,createTransformer:ti,getAnimatableNone:bd};function Ar(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function yd({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,o=0,i=0;if(!t)s=o=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;s=Ar(c,a,e+1/3),o=Ar(c,a,e),i=Ar(c,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(o*255),blue:Math.round(i*255),alpha:r}}function bn(e,t){return n=>n>0?t:e}const yn=(e,t,n)=>e+(t-e)*n,$r=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},vd=[kr,He,pt],wd=e=>vd.find(t=>t.test(e));function ni(e){const t=wd(e);if(ct(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let n=t.parse(e);return t===pt&&(n=yd(n)),n}const ri=(e,t)=>{const n=ni(e),r=ni(t);if(!n||!r)return bn(e,t);const s={...n};return o=>(s.red=$r(n.red,r.red,o),s.green=$r(n.green,r.green,o),s.blue=$r(n.blue,r.blue,o),s.alpha=yn(n.alpha,r.alpha,o),He.transform(s))},_r=new Set(["none","hidden"]);function xd(e,t){return _r.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Td(e,t){return n=>yn(e,t,n)}function Mr(e){return typeof e=="number"?Td:typeof e=="string"?Er(e)?bn:se.test(e)?ri:Cd:Array.isArray(e)?si:typeof e=="object"?se.test(e)?ri:Ed:bn}function si(e,t){const n=[...e],r=n.length,s=e.map((o,i)=>Mr(o)(o,t[i]));return o=>{for(let i=0;i<r;i++)n[i]=s[i](o);return n}}function Ed(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=Mr(e[s])(e[s],t[s]));return s=>{for(const o in r)n[o]=r[o](s);return n}}function Sd(e,t){const n=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const o=t.types[s],i=e.indexes[o][r[o]],a=e.values[i]??0;n[s]=a,r[o]++}return n}const Cd=(e,t)=>{const n=mt.createTransformer(t),r=Bt(e),s=Bt(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?_r.has(e)&&!s.values.length||_r.has(t)&&!r.values.length?xd(e,t):fn(si(Sd(r,s),s.values),n):(ct(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),bn(e,t))};function oi(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?yn(e,t,n):Mr(e)(e,t)}const Pd=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>xe.update(t,n),stop:()=>Tr(t),now:()=>mn.isProcessing?mn.timestamp:be.now()}},ii=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let o=0;o<s;o++)r+=Math.round(e(o/(s-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},vn=2e4;function Nr(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<vn;)t+=n,r=e.next(t);return t>=vn?1/0:t}function kd(e,t=100,n){const r=n({...e,keyframes:[0,t]}),s=Math.min(Nr(r),vn);return{type:"keyframes",ease:o=>r.next(s*o).value/t,duration:_e(s)}}const Ad=5;function ai(e,t,n){const r=Math.max(t-Ad,0);return Oo(n-e(r),t-r)}const te={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Or=.001;function $d({duration:e=te.duration,bounce:t=te.bounce,velocity:n=te.velocity,mass:r=te.mass}){let s,o;ct(e<=Se(te.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Ke(te.minDamping,te.maxDamping,i),e=Ke(te.minDuration,te.maxDuration,_e(e)),i<1?(s=u=>{const l=u*i,d=l*e,m=l-n,w=Ir(u,i),p=Math.exp(-d);return Or-m/w*p},o=u=>{const d=u*i*e,m=d*n+n,w=Math.pow(i,2)*Math.pow(u,2)*e,p=Math.exp(-d),v=Ir(Math.pow(u,2),i);return(-s(u)+Or>0?-1:1)*((m-w)*p)/v}):(s=u=>{const l=Math.exp(-u*e),d=(u-n)*e+1;return-Or+l*d},o=u=>{const l=Math.exp(-u*e),d=(n-u)*(e*e);return l*d});const a=5/e,c=Md(s,o,a);if(e=Se(e),isNaN(c))return{stiffness:te.stiffness,damping:te.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:i*2*Math.sqrt(r*u),duration:e}}}const _d=12;function Md(e,t,n){let r=n;for(let s=1;s<_d;s++)r=r-e(r)/t(r);return r}function Ir(e,t){return e*Math.sqrt(1-t*t)}const Nd=["duration","bounce"],Od=["stiffness","damping","mass"];function li(e,t){return t.some(n=>e[n]!==void 0)}function Id(e){let t={velocity:te.velocity,stiffness:te.stiffness,damping:te.damping,mass:te.mass,isResolvedFromDuration:!1,...e};if(!li(e,Od)&&li(e,Nd))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,o=2*Ke(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:te.mass,stiffness:s,damping:o}}else{const n=$d(e);t={...t,...n,mass:te.mass},t.isResolvedFromDuration=!0}return t}function wn(e=te.visualDuration,t=te.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const o=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:c,damping:u,mass:l,duration:d,velocity:m,isResolvedFromDuration:w}=Id({...n,velocity:-_e(n.velocity||0)}),p=m||0,v=u/(2*Math.sqrt(c*l)),b=i-o,S=_e(Math.sqrt(c/l)),M=Math.abs(b)<5;r||(r=M?te.restSpeed.granular:te.restSpeed.default),s||(s=M?te.restDelta.granular:te.restDelta.default);let A;if(v<1){const $=Ir(S,v);A=I=>{const N=Math.exp(-v*S*I);return i-N*((p+v*S*b)/$*Math.sin($*I)+b*Math.cos($*I))}}else if(v===1)A=$=>i-Math.exp(-S*$)*(b+(p+S*b)*$);else{const $=S*Math.sqrt(v*v-1);A=I=>{const N=Math.exp(-v*S*I),k=Math.min($*I,300);return i-N*((p+v*S*b)*Math.sinh(k)+$*b*Math.cosh(k))/$}}const O={calculatedDuration:w&&d||null,next:$=>{const I=A($);if(w)a.done=$>=d;else{let N=$===0?p:0;v<1&&(N=$===0?Se(p):ai(A,$,I));const k=Math.abs(N)<=r,R=Math.abs(i-I)<=s;a.done=k&&R}return a.value=a.done?i:I,a},toString:()=>{const $=Math.min(Nr(O),vn),I=ii(N=>O.next($*N).value,$,30);return $+"ms "+I},toTransition:()=>{}};return O}wn.applyToOptions=e=>{const t=kd(e,100,wn);return e.ease=t.ease,e.duration=Se(t.duration),e.type="keyframes",e};function Lr({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:c,restDelta:u=.5,restSpeed:l}){const d=e[0],m={done:!1,value:d},w=k=>a!==void 0&&k<a||c!==void 0&&k>c,p=k=>a===void 0?c:c===void 0||Math.abs(a-k)<Math.abs(c-k)?a:c;let v=n*t;const b=d+v,S=i===void 0?b:i(b);S!==b&&(v=S-d);const M=k=>-v*Math.exp(-k/r),A=k=>S+M(k),O=k=>{const R=M(k),q=A(k);m.done=Math.abs(R)<=u,m.value=m.done?S:q};let $,I;const N=k=>{w(m.value)&&($=k,I=wn({keyframes:[m.value,p(m.value)],velocity:ai(A,k,m.value),damping:s,stiffness:o,restDelta:u,restSpeed:l}))};return N(0),{calculatedDuration:null,next:k=>{let R=!1;return!I&&$===void 0&&(R=!0,O(k),N(k)),$!==void 0&&k>=$?I.next(k-$):(!R&&O(k),m)}}}function Ld(e,t,n){const r=[],s=n||$e.mix||oi,o=e.length-1;for(let i=0;i<o;i++){let a=s(e[i],e[i+1]);if(t){const c=Array.isArray(t)?t[i]||ut:t;a=fn(c,a)}r.push(a)}return r}function jd(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const o=e.length;if(je(o===t.length,"Both input and output ranges must be the same length","range-length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Ld(t,r,s),c=a.length,u=l=>{if(i&&l<e[0])return t[0];let d=0;if(c>1)for(;d<e.length-2&&!(l<e[d+1]);d++);const m=Mo(e[d],e[d+1],l);return a[d](m)};return n?l=>u(Ke(e[0],e[o-1],l)):u}function Dd(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Mo(0,t,r);e.push(yn(n,1,s))}}function Vd(e){const t=[0];return Dd(t,e.length-1),t}function Fd(e,t){return e.map(n=>n*t)}function Rd(e,t){return e.map(()=>t||Bo).splice(0,e.length-1)}function ht({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=Zu(r)?r.map(Ko):Ko(r),o={done:!1,value:t[0]},i=Fd(n&&n.length===t.length?n:Vd(t),e),a=jd(i,t,{ease:Array.isArray(s)?s:Rd(t,s)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}const Ud=e=>e!==null;function jr(e,{repeat:t,repeatType:n="loop"},r,s=1){const o=e.filter(Ud),a=s<0||t&&n!=="loop"&&t%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const Bd={decay:Lr,inertia:Lr,tween:ht,keyframes:ht,spring:wn};function ci(e){typeof e.type=="string"&&(e.type=Bd[e.type])}class Dr{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const zd=e=>e/100;class Vr extends Dr{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==be.now()&&this.tick(be.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;ci(t);const{type:n=ht,repeat:r=0,repeatDelay:s=0,repeatType:o,velocity:i=0}=t;let{keyframes:a}=t;const c=n||ht;process.env.NODE_ENV!=="production"&&c!==ht&&je(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`,"spring-two-frames"),c!==ht&&typeof a[0]!="number"&&(this.mixKeyframes=fn(zd,oi(a[0],a[1])),a=[0,100]);const u=c({...t,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...a].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Nr(u));const{calculatedDuration:l}=u;this.calculatedDuration=l,this.resolvedDuration=l+s,this.totalDuration=this.resolvedDuration*(r+1)-s,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:s,mixKeyframes:o,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:l,repeat:d,repeatType:m,repeatDelay:w,type:p,onUpdate:v,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-s/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const S=this.currentTime-u*(this.playbackSpeed>=0?1:-1),M=this.playbackSpeed>=0?S<0:S>s;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=s);let A=this.currentTime,O=r;if(d){const k=Math.min(this.currentTime,s)/a;let R=Math.floor(k),q=k%1;!q&&k>=1&&(q=1),q===1&&R--,R=Math.min(R,d+1),!!(R%2)&&(m==="reverse"?(q=1-q,w&&(q-=w/a)):m==="mirror"&&(O=i)),A=Ke(0,1,q)*a}const $=M?{done:!1,value:l[0]}:O.next(A);o&&($.value=o($.value));let{done:I}=$;!M&&c!==null&&(I=this.playbackSpeed>=0?this.currentTime>=s:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return N&&p!==Lr&&($.value=jr(l,this.options,b,this.speed)),v&&v($.value),N&&this.finish(),$}then(t,n){return this.finished.then(t,n)}get duration(){return _e(this.calculatedDuration)}get time(){return _e(this.currentTime)}set time(t){t=Se(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(be.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=_e(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Pd,startTime:n}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),this.options.onPlay?.();const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(be.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}function Gd(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const We=e=>e*180/Math.PI,Fr=e=>{const t=We(Math.atan2(e[1],e[0]));return Rr(t)},Kd={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Fr,rotateZ:Fr,skewX:e=>We(Math.atan(e[1])),skewY:e=>We(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Rr=e=>(e=e%360,e<0&&(e+=360),e),ui=Fr,di=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),fi=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Hd={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:di,scaleY:fi,scale:e=>(di(e)+fi(e))/2,rotateX:e=>Rr(We(Math.atan2(e[6],e[5]))),rotateY:e=>Rr(We(Math.atan2(-e[2],e[0]))),rotateZ:ui,rotate:ui,skewX:e=>We(Math.atan(e[4])),skewY:e=>We(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ur(e){return e.includes("scale")?1:0}function Br(e,t){if(!e||e==="none")return Ur(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,s;if(n)r=Hd,s=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Kd,s=a}if(!s)return Ur(t);const o=r[t],i=s[1].split(",").map(qd);return typeof o=="function"?o(i):i[o]}const Wd=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Br(n,t)};function qd(e){return parseFloat(e.trim())}const gt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],bt=new Set(gt),pi=e=>e===dt||e===K,Yd=new Set(["x","y","z"]),Xd=gt.filter(e=>!Yd.has(e));function Jd(e){const t=[];return Xd.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const qe={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Br(t,"x"),y:(e,{transform:t})=>Br(t,"y")};qe.translateX=qe.x,qe.translateY=qe.y;const Ye=new Set;let zr=!1,Gr=!1,Kr=!1;function mi(){if(Gr){const e=Array.from(Ye).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=Jd(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([o,i])=>{r.getValue(o)?.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Gr=!1,zr=!1,Ye.forEach(e=>e.complete(Kr)),Ye.clear()}function hi(){Ye.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Gr=!0)})}function Zd(){Kr=!0,hi(),mi(),Kr=!1}class Hr{constructor(t,n,r,s,o,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=o,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(Ye.add(this),zr||(zr=!0,xe.read(hi),xe.resolveKeyframes(mi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;if(t[0]===null){const o=s?.get(),i=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const a=r.readValue(n,i);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=i),s&&o===void 0&&s.set(t[0])}Gd(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Ye.delete(this)}cancel(){this.state==="scheduled"&&(Ye.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Qd=e=>e.startsWith("--");function ef(e,t,n){Qd(t)?e.style.setProperty(t,n):e.style[t]=n}const tf=yr(()=>window.ScrollTimeline!==void 0),nf={};function rf(e,t){const n=yr(e);return()=>nf[t]??n()}const gi=rf(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),zt=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,bi={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:zt([0,.65,.55,1]),circOut:zt([.55,0,1,.45]),backIn:zt([.31,.01,.66,-.59]),backOut:zt([.33,1.53,.69,.99])};function yi(e,t){if(e)return typeof e=="function"?gi()?ii(e,t):"ease-out":zo(e)?zt(e):Array.isArray(e)?e.map(n=>yi(n,t)||bi.easeOut):bi[e]}function sf(e,t,n,{delay:r=0,duration:s=300,repeat:o=0,repeatType:i="loop",ease:a="easeOut",times:c}={},u=void 0){const l={[t]:n};c&&(l.offset=c);const d=yi(a,s);Array.isArray(d)&&(l.easing=d);const m={delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:i==="reverse"?"alternate":"normal"};return u&&(m.pseudoElement=u),e.animate(l,m)}function vi(e){return typeof e=="function"&&"applyToOptions"in e}function of({type:e,...t}){return vi(e)&&gi()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class af extends Dr{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:s,pseudoElement:o,allowFlatten:i=!1,finalKeyframe:a,onComplete:c}=t;this.isPseudoElement=!!o,this.allowFlatten=i,this.options=t,je(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");const u=of(t);this.animation=sf(n,r,s,u,o),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const l=jr(s,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(l):ef(n,r,l),this.animation.cancel()}c?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return _e(Number(t))}get time(){return _e(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Se(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&tf()?(this.animation.timeline=t,ut):n(this)}}const wi={anticipate:Ro,backInOut:Fo,circInOut:Uo};function lf(e){return e in wi}function cf(e){typeof e.ease=="string"&&lf(e.ease)&&(e.ease=wi[e.ease])}const xi=10;class uf extends af{constructor(t){cf(t),ci(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:s,element:o,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Vr({...i,autoplay:!1}),c=Se(this.finishedTime??this.time);n.setWithVelocity(a.sample(c-xi).value,a.sample(c).value,xi),a.stop()}}const Ti=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(mt.test(e)||e==="0")&&!e.startsWith("url("));function df(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function ff(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],i=Ti(s,t),a=Ti(o,t);return ct(i===a,`You are trying to animate ${t} from "${s}" to "${o}". "${i?o:s}" is not an animatable value.`,"value-not-animatable"),!i||!a?!1:df(e)||(n==="spring"||vi(n))&&r}function Wr(e){e.duration=0,e.type}const pf=new Set(["opacity","clipPath","filter","transform"]),mf=yr(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function hf(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:s,damping:o,type:i}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return mf()&&n&&pf.has(n)&&(n!=="transform"||!u)&&!c&&!r&&s!=="mirror"&&o!==0&&i!=="inertia"}const gf=40;class bf extends Dr{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:i="loop",keyframes:a,name:c,motionValue:u,element:l,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=be.now();const m={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:o,repeatType:i,name:c,motionValue:u,element:l,...d},w=l?.KeyframeResolver||Hr;this.keyframeResolver=new w(a,(p,v,b)=>this.onKeyframesResolved(p,v,m,!b),c,u,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,n,r,s){this.keyframeResolver=void 0;const{name:o,type:i,velocity:a,delay:c,isHandoff:u,onUpdate:l}=r;this.resolvedAt=be.now(),ff(t,o,i,a)||(($e.instantAnimations||!c)&&l?.(jr(t,r,n)),t[0]=t[t.length-1],Wr(r),r.repeat=0);const m={startTime:s?this.resolvedAt?this.resolvedAt-this.createdAt>gf?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},w=!u&&hf(m)?new uf({...m,element:m.motionValue.owner.current}):new Vr(m);w.finished.then(()=>this.notifyFinished()).catch(ut),this.pendingTimeline&&(this.stopTimeline=w.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=w}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Zd()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const yf=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function vf(e){const t=yf.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}const wf=4;function Ei(e,t,n=1){je(n<=wf,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");const[r,s]=vf(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const i=o.trim();return $o(i)?parseFloat(i):i}return Er(s)?Ei(s,t,n+1):s}function Si(e,t){return e?.[t]??e?.default??e}const Ci=new Set(["width","height","top","left","right","bottom",...gt]),xf={test:e=>e==="auto",parse:e=>e},Pi=e=>t=>t.test(e),ki=[dt,K,ft,De,ud,cd,xf],Ai=e=>ki.find(Pi(e));function Tf(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||_o(e):!0}const Ef=new Set(["brightness","contrast","saturate","opacity"]);function Sf(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Sr)||[];if(!r)return e;const s=n.replace(r,"");let o=Ef.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+s+")"}const Cf=/\b([a-z-]*)\(.*?\)/gu,qr={...mt,getAnimatableNone:e=>{const t=e.match(Cf);return t?t.map(Sf).join(" "):e}},$i={...dt,transform:Math.round},Yr={borderWidth:K,borderTopWidth:K,borderRightWidth:K,borderBottomWidth:K,borderLeftWidth:K,borderRadius:K,radius:K,borderTopLeftRadius:K,borderTopRightRadius:K,borderBottomRightRadius:K,borderBottomLeftRadius:K,width:K,maxWidth:K,height:K,maxHeight:K,top:K,right:K,bottom:K,left:K,padding:K,paddingTop:K,paddingRight:K,paddingBottom:K,paddingLeft:K,margin:K,marginTop:K,marginRight:K,marginBottom:K,marginLeft:K,backgroundPositionX:K,backgroundPositionY:K,...{rotate:De,rotateX:De,rotateY:De,rotateZ:De,scale:gn,scaleX:gn,scaleY:gn,scaleZ:gn,skew:De,skewX:De,skewY:De,distance:K,translateX:K,translateY:K,translateZ:K,x:K,y:K,z:K,perspective:K,transformPerspective:K,opacity:Ft,originX:Xo,originY:Xo,originZ:K},zIndex:$i,fillOpacity:Ft,strokeOpacity:Ft,numOctaves:$i},Pf={...Yr,color:se,backgroundColor:se,outlineColor:se,fill:se,stroke:se,borderColor:se,borderTopColor:se,borderRightColor:se,borderBottomColor:se,borderLeftColor:se,filter:qr,WebkitFilter:qr},_i=e=>Pf[e];function Mi(e,t){let n=_i(e);return n!==qr&&(n=mt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const kf=new Set(["auto","none","0"]);function Af(e,t,n){let r=0,s;for(;r<e.length&&!s;){const o=e[r];typeof o=="string"&&!kf.has(o)&&Bt(o).values.length&&(s=e[r]),r++}if(s&&n)for(const o of t)e[o]=Mi(n,s)}class $f extends Hr{constructor(t,n,r,s,o){super(t,n,r,s,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),Er(u))){const l=Ei(u,n.current);l!==void 0&&(t[c]=l),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Ci.has(r)||t.length!==2)return;const[s,o]=t,i=Ai(s),a=Ai(o);if(i!==a)if(pi(i)&&pi(a))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else qe[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)(t[s]===null||Tf(t[s]))&&r.push(s);r.length&&Af(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=qe[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const s=t.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=r.length-1,i=r[o];r[o]=qe[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,c])=>{t.getValue(a).set(c)}),this.resolveNoneKeyframes()}}function _f(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=n?.[e]??r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}const Ni=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Oi(e){return Gu(e)&&"offsetHeight"in e}const Ii=30,Mf=e=>!isNaN(parseFloat(e));class Nf{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{const s=be.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=be.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Mf(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&vr(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new No);const r=this.events[t].add(n);return t==="change"?()=>{r(),xe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=be.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Ii)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Ii);return Oo(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function xn(e,t){return new Nf(e,t)}const{schedule:Of}=Ho(queueMicrotask,!1),If={y:!1};function Lf(){return If.y}function Li(e,t){const n=_f(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function ji(e){return!(e.pointerType==="touch"||Lf())}function jf(e,t,n={}){const[r,s,o]=Li(e,n),i=a=>{if(!ji(a))return;const{target:c}=a,u=t(c,a);if(typeof u!="function"||!c)return;const l=d=>{ji(d)&&(u(d),c.removeEventListener("pointerleave",l))};c.addEventListener("pointerleave",l,s)};return r.forEach(a=>{a.addEventListener("pointerenter",i,s)}),o}const Di=(e,t)=>t?e===t?!0:Di(e,t.parentElement):!1,Df=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Vf=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ff(e){return Vf.has(e.tagName)||e.tabIndex!==-1}const Tn=new WeakSet;function Vi(e){return t=>{t.key==="Enter"&&e(t)}}function Xr(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const Rf=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Vi(()=>{if(Tn.has(n))return;Xr(n,"down");const s=Vi(()=>{Xr(n,"up")}),o=()=>Xr(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function Fi(e){return Df(e)&&!0}function Uf(e,t,n={}){const[r,s,o]=Li(e,n),i=a=>{const c=a.currentTarget;if(!Fi(a))return;Tn.add(c);const u=t(c,a),l=(w,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",m),Tn.has(c)&&Tn.delete(c),Fi(w)&&typeof u=="function"&&u(w,{success:p})},d=w=>{l(w,c===window||c===document||n.useGlobalTarget||Di(c,w.target))},m=w=>{l(w,!1)};window.addEventListener("pointerup",d,s),window.addEventListener("pointercancel",m,s)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",i,s),Oi(a)&&(a.addEventListener("focus",u=>Rf(u,s)),!Ff(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}const de=e=>!!(e&&e.getVelocity),Bf=[...ki,se,mt],zf=e=>Bf.find(Pi(e)),Jr=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Ri(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gf(...e){return t=>{let n=!1;const r=e.map(s=>{const o=Ri(s,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let s=0;s<r.length;s++){const o=r[s];typeof o=="function"?o():Ri(e[s],null)}}}}function Kf(...e){return Be.useCallback(Gf(...e),e)}class Hf extends Be.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,s=Oi(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=s-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Wf({children:e,isPresent:t,anchorX:n,root:r}){const s=y.useId(),o=y.useRef(null),i=y.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=y.useContext(Jr),c=Kf(o,e?.ref);return y.useInsertionEffect(()=>{const{width:u,height:l,top:d,left:m,right:w}=i.current;if(t||!o.current||!u||!l)return;const p=n==="left"?`left: ${m}`:`right: ${w}`;o.current.dataset.motionPopId=s;const v=document.createElement("style");a&&(v.nonce=a);const b=r??document.head;return b.appendChild(v),v.sheet&&v.sheet.insertRule(`
23
- [data-motion-pop-id="${s}"] {
24
- position: absolute !important;
25
- width: ${u}px !important;
26
- height: ${l}px !important;
27
- ${p}px !important;
28
- top: ${d}px !important;
29
- }
30
- `),()=>{b.contains(v)&&b.removeChild(v)}},[t]),f.jsx(Hf,{isPresent:t,childRef:o,sizeRef:i,children:Be.cloneElement(e,{ref:c})})}const qf=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:o,mode:i,anchorX:a,root:c})=>{const u=hr(Yf),l=y.useId();let d=!0,m=y.useMemo(()=>(d=!1,{id:l,initial:t,isPresent:n,custom:s,onExitComplete:w=>{u.set(w,!0);for(const p of u.values())if(!p)return;r&&r()},register:w=>(u.set(w,!1),()=>u.delete(w))}),[n,u,r]);return o&&d&&(m={...m}),y.useMemo(()=>{u.forEach((w,p)=>u.set(p,!1))},[n]),Be.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),i==="popLayout"&&(e=f.jsx(Wf,{isPresent:n,anchorX:a,root:c,children:e})),f.jsx(dn.Provider,{value:m,children:e})};function Yf(){return new Map}function Xf(e=!0){const t=y.useContext(dn);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,o=y.useId();y.useEffect(()=>{if(e)return s(o)},[e]);const i=y.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,i]:[!0]}const En=e=>e.key||"";function Ui(e){const t=[];return y.Children.forEach(e,n=>{y.isValidElement(n)&&t.push(n)}),t}const Jf=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:o="sync",propagate:i=!1,anchorX:a="left",root:c})=>{const[u,l]=Xf(i),d=y.useMemo(()=>Ui(e),[e]),m=i&&!u?[]:d.map(En),w=y.useRef(!0),p=y.useRef(d),v=hr(()=>new Map),[b,S]=y.useState(d),[M,A]=y.useState(d);Ao(()=>{w.current=!1,p.current=d;for(let I=0;I<M.length;I++){const N=En(M[I]);m.includes(N)?v.delete(N):v.get(N)!==!0&&v.set(N,!1)}},[M,m.length,m.join("-")]);const O=[];if(d!==b){let I=[...d];for(let N=0;N<M.length;N++){const k=M[N],R=En(k);m.includes(R)||(I.splice(N,0,k),O.push(k))}return o==="wait"&&O.length&&(I=O),A(Ui(I)),S(d),null}process.env.NODE_ENV!=="production"&&o==="wait"&&M.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:$}=y.useContext(ko);return f.jsx(f.Fragment,{children:M.map(I=>{const N=En(I),k=i&&!u?!1:d===M||m.includes(N),R=()=>{if(v.has(N))v.set(N,!0);else return;let q=!0;v.forEach(h=>{h||(q=!1)}),q&&($?.(),A(p.current),i&&l?.(),r&&r())};return f.jsx(qf,{isPresent:k,initial:!w.current||n?void 0:!1,custom:t,presenceAffectsLayout:s,mode:o,root:c,onExitComplete:k?void 0:R,anchorX:a,children:I},N)})})},Zr=y.createContext({strict:!1}),Bi={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},yt={};for(const e in Bi)yt[e]={isEnabled:t=>Bi[e].some(n=>!!t[n])};function Qr(e){for(const t in e)yt[t]={...yt[t],...e[t]}}function Zf({children:e,features:t,strict:n=!1}){const[,r]=y.useState(!es(t)),s=y.useRef(void 0);if(!es(t)){const{renderer:o,...i}=t;s.current=o,Qr(i)}return y.useEffect(()=>{es(t)&&t().then(({renderer:o,...i})=>{Qr(i),s.current=o,r(!0)})},[]),f.jsx(Zr.Provider,{value:{renderer:s.current,strict:n},children:e})}function es(e){return typeof e=="function"}const Qf=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Sn(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Qf.has(e)}let zi=e=>!Sn(e);function ep(e){typeof e=="function"&&(zi=t=>t.startsWith("on")?!Sn(t):e(t))}try{ep(require("@emotion/is-prop-valid").default)}catch{}function tp(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(zi(s)||n===!0&&Sn(s)||!t&&!Sn(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}const Cn=y.createContext({});function Pn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Gt(e){return typeof e=="string"||Array.isArray(e)}const ts=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ns=["initial",...ts];function kn(e){return Pn(e.animate)||ns.some(t=>Gt(e[t]))}function Gi(e){return!!(kn(e)||e.variants)}function np(e,t){if(kn(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Gt(n)?n:void 0,animate:Gt(r)?r:void 0}}return e.inherit!==!1?t:{}}function rp(e){const{initial:t,animate:n}=np(e,y.useContext(Cn));return y.useMemo(()=>({initial:t,animate:n}),[Ki(t),Ki(n)])}function Ki(e){return Array.isArray(e)?e.join(" "):e}const sp={};function Hi(e,{layout:t,layoutId:n}){return bt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!sp[e]||e==="opacity")}const op={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ip=gt.length;function ap(e,t,n){let r="",s=!0;for(let o=0;o<ip;o++){const i=gt[o],a=e[i];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(i.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||n){const u=Ni(a,Yr[i]);if(!c){s=!1;const l=op[i]||i;r+=`${l}(${u}) `}n&&(t[i]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function rs(e,t,n){const{style:r,vars:s,transformOrigin:o}=e;let i=!1,a=!1;for(const c in t){const u=t[c];if(bt.has(c)){i=!0;continue}else if(qo(c)){s[c]=u;continue}else{const l=Ni(u,Yr[c]);c.startsWith("origin")?(a=!0,o[c]=l):r[c]=l}}if(t.transform||(i||n?r.transform=ap(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:u="50%",originZ:l=0}=o;r.transformOrigin=`${c} ${u} ${l}`}}const ss=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Wi(e,t,n){for(const r in t)!de(t[r])&&!Hi(r,n)&&(e[r]=t[r])}function lp({transformTemplate:e},t){return y.useMemo(()=>{const n=ss();return rs(n,t,e),Object.assign({},n.vars,n.style)},[t])}function cp(e,t){const n=e.style||{},r={};return Wi(r,n,e),Object.assign(r,lp(e,t)),r}function up(e,t){const n={},r=cp(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const dp={offset:"stroke-dashoffset",array:"stroke-dasharray"},fp={offset:"strokeDashoffset",array:"strokeDasharray"};function pp(e,t,n=1,r=0,s=!0){e.pathLength=1;const o=s?dp:fp;e[o.offset]=K.transform(-r);const i=K.transform(t),a=K.transform(n);e[o.array]=`${i} ${a}`}function qi(e,{attrX:t,attrY:n,attrScale:r,pathLength:s,pathSpacing:o=1,pathOffset:i=0,...a},c,u,l){if(rs(e,a,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:m}=e;d.transform&&(m.transform=d.transform,delete d.transform),(m.transform||d.transformOrigin)&&(m.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),m.transform&&(m.transformBox=l?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&pp(d,s,o,i,!1)}const Yi=()=>({...ss(),attrs:{}}),Xi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function mp(e,t,n,r){const s=y.useMemo(()=>{const o=Yi();return qi(o,t,Xi(r),e.transformTemplate,e.style),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Wi(o,e.style,e),s.style={...o,...s.style}}return s}const hp=["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 os(e){return typeof e!="string"||e.includes("-")?!1:!!(hp.indexOf(e)>-1||/[A-Z]/u.test(e))}function gp(e,t,n,{latestValues:r},s,o=!1){const a=(os(e)?mp:up)(t,r,s,e),c=tp(t,typeof e=="string",o),u=e!==y.Fragment?{...c,...a,ref:n}:{},{children:l}=t,d=y.useMemo(()=>de(l)?l.get():l,[l]);return y.createElement(e,{...u,children:d})}function Ji(e){const t=[{},{}];return e?.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function is(e,t,n,r){if(typeof t=="function"){const[s,o]=Ji(r);t=t(n!==void 0?n:e.custom,s,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,o]=Ji(r);t=t(n!==void 0?n:e.custom,s,o)}return t}function bp(e){return de(e)?e.get():e}function yp({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,s){return{latestValues:vp(n,r,s,e),renderState:t()}}function vp(e,t,n,r){const s={},o=r(e,{});for(const m in o)s[m]=bp(o[m]);let{initial:i,animate:a}=e;const c=kn(e),u=Gi(e);t&&u&&!c&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let l=n?n.initial===!1:!1;l=l||i===!1;const d=l?a:i;if(d&&typeof d!="boolean"&&!Pn(d)){const m=Array.isArray(d)?d:[d];for(let w=0;w<m.length;w++){const p=is(e,m[w]);if(p){const{transitionEnd:v,transition:b,...S}=p;for(const M in S){let A=S[M];if(Array.isArray(A)){const O=l?A.length-1:0;A=A[O]}A!==null&&(s[M]=A)}for(const M in v)s[M]=v[M]}}}return s}const Zi=e=>(t,n)=>{const r=y.useContext(Cn),s=y.useContext(dn),o=()=>yp(e,t,r,s);return n?o():hr(o)};function as(e,t,n){const{style:r}=e,s={};for(const o in r)(de(r[o])||t.style&&de(t.style[o])||Hi(o,e)||n?.getValue(o)?.liveStyle!==void 0)&&(s[o]=r[o]);return s}const wp=Zi({scrapeMotionValuesFromProps:as,createRenderState:ss});function Qi(e,t,n){const r=as(e,t,n);for(const s in e)if(de(e[s])||de(t[s])){const o=gt.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[o]=e[s]}return r}const xp=Zi({scrapeMotionValuesFromProps:Qi,createRenderState:Yi}),Tp=Symbol.for("motionComponentSymbol");function ea(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Ep(e,t,n){return y.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ea(n)&&(n.current=r))},[t])}const ls=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ta="data-"+ls("framerAppearId"),Sp=y.createContext({});function Cp(e,t,n,r,s){const{visualElement:o}=y.useContext(Cn),i=y.useContext(Zr),a=y.useContext(dn),c=y.useContext(Jr).reducedMotion,u=y.useRef(null);r=r||i.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const l=u.current,d=y.useContext(Sp);l&&!l.projection&&s&&(l.type==="html"||l.type==="svg")&&Pp(u.current,n,s,d);const m=y.useRef(!1);y.useInsertionEffect(()=>{l&&m.current&&l.update(n,a)});const w=n[ta],p=y.useRef(!!w&&!window.MotionHandoffIsComplete?.(w)&&window.MotionHasOptimisedAnimation?.(w));return Ao(()=>{l&&(m.current=!0,window.MotionIsMounted=!0,l.updateFeatures(),l.scheduleRenderMicrotask(),p.current&&l.animationState&&l.animationState.animateChanges())}),y.useEffect(()=>{l&&(!p.current&&l.animationState&&l.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(w)}),p.current=!1),l.enteringChildren=void 0)}),l}function Pp(e,t,n,r){const{layoutId:s,layout:o,drag:i,dragConstraints:a,layoutScroll:c,layoutRoot:u,layoutCrossfade:l}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:na(e.parent)),e.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:!!i||a&&ea(a),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:l,layoutScroll:c,layoutRoot:u})}function na(e){if(e)return e.options.allowProjection!==!1?e.projection:na(e.parent)}function cs(e,{forwardMotionProps:t=!1}={},n,r){n&&Qr(n);const s=os(e)?xp:wp;function o(a,c){let u;const l={...y.useContext(Jr),...a,layoutId:kp(a)},{isStatic:d}=l,m=rp(a),w=s(a,d);if(!d&&gr){Ap(l,n);const p=$p(l);u=p.MeasureLayout,m.visualElement=Cp(e,w,l,r,p.ProjectionNode)}return f.jsxs(Cn.Provider,{value:m,children:[u&&m.visualElement?f.jsx(u,{visualElement:m.visualElement,...l}):null,gp(e,a,Ep(w,m.visualElement,c),w,d,t)]})}o.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const i=y.forwardRef(o);return i[Tp]=e,i}function kp({layoutId:e}){const t=y.useContext(ko).id;return t&&e!==void 0?t+"-"+e:e}function Ap(e,t){const n=y.useContext(Zr).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?ct(!1,r,"lazy-strict-mode"):je(!1,r,"lazy-strict-mode")}}function $p(e){const{drag:t,layout:n}=yt;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function _p(e,t){if(typeof Proxy>"u")return cs;const n=new Map,r=(o,i)=>cs(o,i,e,t),s=(o,i)=>(process.env.NODE_ENV!=="production"&&vr(!1,"motion() is deprecated. Use motion.create() instead."),r(o,i));return new Proxy(s,{get:(o,i)=>i==="create"?r:(n.has(i)||n.set(i,cs(i,void 0,e,t)),n.get(i))})}const Mp=_p();function Np({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Op(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ip(e,t){return Np(Op(e.getBoundingClientRect(),t))}const ra=()=>({min:0,max:0}),sa=()=>({x:ra(),y:ra()}),us={current:null},oa={current:!1};function Lp(){if(oa.current=!0,!!gr)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>us.current=e.matches;e.addEventListener("change",t),t()}else us.current=!1}const jp=new WeakMap;function Dp(e,t,n){for(const r in t){const s=t[r],o=n[r];if(de(s))e.addValue(r,s);else if(de(o))e.addValue(r,xn(s,{owner:e}));else if(o!==s)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(s):i.hasAnimated||i.set(s)}else{const i=e.getStaticValue(r);e.addValue(r,xn(i!==void 0?i:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const ia=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Vp{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:o,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Hr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=be.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,xe.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=i;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=kn(n),this.isVariantNode=Gi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:l,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in d){const w=d[m];c[m]!==void 0&&de(w)&&w.set(c[m])}}mount(t){this.current=t,jp.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),oa.current||Lp(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:us.current,process.env.NODE_ENV!=="production"&&vr(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected.","reduced-motion-disabled"),this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Tr(this.notifyUpdate),Tr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=bt.has(t);r&&this.onBindTransform&&this.onBindTransform();const s=n.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&xe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in yt){const n=yt[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):sa()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<ia.length;r++){const s=ia[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const o="on"+s,i=t[o];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=Dp(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=xn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&($o(r)||_o(r))?r=parseFloat(r):!zf(r)&&mt.test(n)&&(r=Mi(t,n)),this.setBaseTarget(t,de(r)?r.get():r)),de(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=is(this.props,n,this.presenceContext?.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!de(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new No),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){Of.render(this.render)}}class aa extends Vp{constructor(){super(...arguments),this.KeyframeResolver=$f}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;de(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function la(e,{style:t,vars:n},r,s){const o=e.style;let i;for(i in t)o[i]=t[i];s?.applyProjectionStyles(o,r);for(i in n)o.setProperty(i,n[i])}function Fp(e){return window.getComputedStyle(e)}class Rp extends aa{constructor(){super(...arguments),this.type="html",this.renderInstance=la}readValueFromInstance(t,n){if(bt.has(n))return this.projection?.isProjecting?Ur(n):Wd(t,n);{const r=Fp(t),s=(qo(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Ip(t,n)}build(t,n,r){rs(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return as(t,n,r)}}const ca=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Up(e,t,n,r){la(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(ca.has(s)?s:ls(s),t.attrs[s])}class Bp extends aa{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=sa}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(bt.has(n)){const r=_i(n);return r&&r.default||0}return n=ca.has(n)?n:ls(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Qi(t,n,r)}build(t,n,r){qi(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,s){Up(t,n,r,s)}mount(t){this.isSVGTag=Xi(t.tagName),super.mount(t)}}const zp=(e,t)=>os(e)?new Bp(t):new Rp(t,{allowProjection:e!==y.Fragment});function vt(e,t,n){const r=e.getProps();return is(r,t,n!==void 0?n:r.custom,e)}const ds=e=>Array.isArray(e);function Gp(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,xn(n))}function Kp(e){return ds(e)?e[e.length-1]||0:e}function Hp(e,t){const n=vt(e,t);let{transitionEnd:r={},transition:s={},...o}=n||{};o={...o,...r};for(const i in o){const a=Kp(o[i]);Gp(e,i,a)}}function Wp(e){return!!(de(e)&&e.add)}function qp(e,t){const n=e.getValue("willChange");if(Wp(n))return n.add(t);if(!n&&$e.WillChange){const r=new $e.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Yp(e){return e.props[ta]}const Xp=e=>e!==null;function Jp(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(Xp),o=t&&n!=="loop"&&t%2===1?0:s.length-1;return s[o]}const Zp={type:"spring",stiffness:500,damping:25,restSpeed:10},Qp=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),em={type:"keyframes",duration:.8},tm={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},nm=(e,{keyframes:t})=>t.length>2?em:bt.has(e)?e.startsWith("scale")?Qp(t[1]):Zp:tm;function rm({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:i,repeatDelay:a,from:c,elapsed:u,...l}){return!!Object.keys(l).length}const sm=(e,t,n,r={},s,o)=>i=>{const a=Si(r,e)||{},c=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Se(c);const l={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:m=>{t.set(m),a.onUpdate&&a.onUpdate(m)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:s};rm(a)||Object.assign(l,nm(e,l)),l.duration&&(l.duration=Se(l.duration)),l.repeatDelay&&(l.repeatDelay=Se(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let d=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(Wr(l),l.delay===0&&(d=!0)),($e.instantAnimations||$e.skipAnimations)&&(d=!0,Wr(l),l.delay=0),l.allowFlatten=!a.type&&!a.ease,d&&!o&&t.get()!==void 0){const m=Jp(l.keyframes,a);if(m!==void 0){xe.update(()=>{l.onUpdate(m),l.onComplete()});return}}return a.isSync?new Vr(l):new bf(l)};function om({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ua(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:i,...a}=t;r&&(o=r);const c=[],u=s&&e.animationState&&e.animationState.getState()[s];for(const l in a){const d=e.getValue(l,e.latestValues[l]??null),m=a[l];if(m===void 0||u&&om(u,l))continue;const w={delay:n,...Si(o||{},l)},p=d.get();if(p!==void 0&&!d.isAnimating&&!Array.isArray(m)&&m===p&&!w.velocity)continue;let v=!1;if(window.MotionHandoffAnimation){const S=Yp(e);if(S){const M=window.MotionHandoffAnimation(S,l,xe);M!==null&&(w.startTime=M,v=!0)}}qp(e,l),d.start(sm(l,d,m,e.shouldReduceMotion&&Ci.has(l)?{type:!1}:w,e,v));const b=d.animation;b&&c.push(b)}return i&&Promise.all(c).then(()=>{xe.update(()=>{i&&Hp(e,i)})}),c}function da(e,t,n,r=0,s=1){const o=Array.from(e).sort((u,l)=>u.sortNodePosition(l)).indexOf(t),i=e.size,a=(i-1)*r;return typeof n=="function"?n(o,i):s===1?o*r:a-o*r}function fs(e,t,n={}){const r=vt(e,t,n.type==="exit"?e.presenceContext?.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(ua(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:l,staggerDirection:d}=s;return im(e,t,c,u,l,d,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[c,u]=a==="beforeChildren"?[o,i]:[i,o];return c().then(()=>u())}else return Promise.all([o(),i(n.delay)])}function im(e,t,n=0,r=0,s=0,o=1,i){const a=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),a.push(fs(c,t,{...i,delay:n+(typeof r=="function"?0:r)+da(e.variantChildren,c,r,s,o)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(a)}function am(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(o=>fs(e,o,n));r=Promise.all(s)}else if(typeof t=="string")r=fs(e,t,n);else{const s=typeof t=="function"?vt(e,t,n.custom):t;r=Promise.all(ua(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function fa(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const lm=ns.length;function pa(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?pa(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<lm;n++){const r=ns[n],s=e.props[r];(Gt(s)||s===!1)&&(t[r]=s)}return t}const cm=[...ts].reverse(),um=ts.length;function dm(e){return t=>Promise.all(t.map(({animation:n,options:r})=>am(e,n,r)))}function fm(e){let t=dm(e),n=ma(),r=!0;const s=c=>(u,l)=>{const d=vt(e,l,c==="exit"?e.presenceContext?.custom:void 0);if(d){const{transition:m,transitionEnd:w,...p}=d;u={...u,...p,...w}}return u};function o(c){t=c(e)}function i(c){const{props:u}=e,l=pa(e.parent)||{},d=[],m=new Set;let w={},p=1/0;for(let b=0;b<um;b++){const S=cm[b],M=n[S],A=u[S]!==void 0?u[S]:l[S],O=Gt(A),$=S===c?M.isActive:null;$===!1&&(p=b);let I=A===l[S]&&A!==u[S]&&O;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),M.protectedKeys={...w},!M.isActive&&$===null||!A&&!M.prevProp||Pn(A)||typeof A=="boolean")continue;const N=pm(M.prevProp,A);let k=N||S===c&&M.isActive&&!I&&O||b>p&&O,R=!1;const q=Array.isArray(A)?A:[A];let h=q.reduce(s(S),{});$===!1&&(h={});const{prevResolvedValues:P={}}=M,D={...P,...h},T=_=>{k=!0,m.has(_)&&(R=!0,m.delete(_)),M.needsAnimating[_]=!0;const E=e.getValue(_);E&&(E.liveStyle=!1)};for(const _ in D){const E=h[_],B=P[_];if(w.hasOwnProperty(_))continue;let C=!1;ds(E)&&ds(B)?C=!fa(E,B):C=E!==B,C?E!=null?T(_):m.add(_):E!==void 0&&m.has(_)?T(_):M.protectedKeys[_]=!0}M.prevProp=A,M.prevResolvedValues=h,M.isActive&&(w={...w,...h}),r&&e.blockInitialAnimation&&(k=!1);const L=I&&N;k&&(!L||R)&&d.push(...q.map(_=>{const E={type:S};if(typeof _=="string"&&r&&!L&&e.manuallyAnimateOnMount&&e.parent){const{parent:B}=e,C=vt(B,_);if(B.enteringChildren&&C){const{delayChildren:j}=C.transition||{};E.delay=da(B.enteringChildren,e,j)}}return{animation:_,options:E}}))}if(m.size){const b={};if(typeof u.initial!="boolean"){const S=vt(e,Array.isArray(u.initial)?u.initial[0]:u.initial);S&&S.transition&&(b.transition=S.transition)}m.forEach(S=>{const M=e.getBaseTarget(S),A=e.getValue(S);A&&(A.liveStyle=!0),b[S]=M??null}),d.push({animation:b})}let v=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(d):Promise.resolve()}function a(c,u){if(n[c].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(c,u)),n[c].isActive=u;const l=i(c);for(const d in n)n[d].protectedKeys={};return l}return{animateChanges:i,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=ma(),r=!0}}}function pm(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!fa(t,e):!1}function Xe(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ma(){return{animate:Xe(!0),whileInView:Xe(),whileHover:Xe(),whileTap:Xe(),whileDrag:Xe(),whileFocus:Xe(),exit:Xe()}}class wt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class mm extends wt{constructor(t){super(t),t.animationState||(t.animationState=fm(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Pn(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let hm=0;class gm extends wt{constructor(){super(...arguments),this.id=hm++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const bm={animation:{Feature:mm},exit:{Feature:gm}};function ha(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ga(e){return{point:{x:e.pageX,y:e.pageY}}}function ba(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,o=r[s];o&&xe.postRender(()=>o(t,ga(t)))}class ym extends wt{mount(){const{current:t}=this.node;t&&(this.unmount=jf(t,(n,r)=>(ba(this.node,r,"Start"),s=>ba(this.node,s,"End"))))}unmount(){}}class vm extends wt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=fn(ha(this.node.current,"focus",()=>this.onFocus()),ha(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ya(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),o=r[s];o&&xe.postRender(()=>o(t,ga(t)))}class wm extends wt{mount(){const{current:t}=this.node;t&&(this.unmount=Uf(t,(n,r)=>(ya(this.node,r,"Start"),(s,{success:o})=>ya(this.node,s,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const ps=new WeakMap,ms=new WeakMap,xm=e=>{const t=ps.get(e.target);t&&t(e)},Tm=e=>{e.forEach(xm)};function Em({root:e,...t}){const n=e||document;ms.has(n)||ms.set(n,{});const r=ms.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(Tm,{root:e,...t})),r[s]}function Sm(e,t,n){const r=Em(t);return ps.set(e,n),r.observe(e),()=>{ps.delete(e),r.unobserve(e)}}const Cm={some:0,all:1};class Pm extends wt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:o}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:Cm[s]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:l,onViewportLeave:d}=this.node.getProps(),m=u?l:d;m&&m(c)};return Sm(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(km(t,n))&&this.startObserver()}unmount(){}}function km({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Am={renderer:zp,...bm,...{inView:{Feature:Pm},tap:{Feature:wm},focus:{Feature:vm},hover:{Feature:ym}}};function hs(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function va(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function wa(e){let t=y.useRef({isFocused:!1,observer:null});an(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Ie(r=>{e?.(r)});return y.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let s=r.target,o=i=>{if(t.current.isFocused=!1,s.disabled){let a=hs(i);n(a)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};s.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&s.disabled){var i;(i=t.current.observer)===null||i===void 0||i.disconnect();let a=s===document.activeElement?null:document.activeElement;s.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),s.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),t.current.observer.observe(s,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let An=!1;function xa(e){for(;e&&!Lu(e);)e=e.parentElement;let t=ge(e),n=t.document.activeElement;if(!n||n===e)return;An=!0;let r=!1,s=l=>{(l.target===n||r)&&l.stopImmediatePropagation()},o=l=>{(l.target===n||r)&&(l.stopImmediatePropagation(),!e&&!r&&(r=!0,at(n),c()))},i=l=>{(l.target===e||r)&&l.stopImmediatePropagation()},a=l=>{(l.target===e||r)&&(l.stopImmediatePropagation(),r||(r=!0,at(n),c()))};t.addEventListener("blur",s,!0),t.addEventListener("focusout",o,!0),t.addEventListener("focusin",a,!0),t.addEventListener("focus",i,!0);let c=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",s,!0),t.removeEventListener("focusout",o,!0),t.removeEventListener("focusin",a,!0),t.removeEventListener("focus",i,!0),An=!1,r=!1},u=requestAnimationFrame(c);return c}let xt="default",gs="",$n=new WeakMap;function Ta(e){if(cr()){if(xt==="default"){const t=ce(e);gs=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}xt="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";$n.set(e,e.style[t]),e.style[t]="none"}}function bs(e){if(cr()){if(xt!=="disabled")return;xt="restoring",setTimeout(()=>{To(()=>{if(xt==="restoring"){const t=ce(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=gs||""),gs="",xt="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&$n.has(e)){let t=$n.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";e.style[n]==="none"&&(e.style[n]=t),e.getAttribute("style")===""&&e.removeAttribute("style"),$n.delete(e)}}const Ea=y.createContext({register:()=>{}});Ea.displayName="PressResponderContext";function $m(e,t){return t.get?t.get.call(e):t.value}function Sa(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function _m(e,t){var n=Sa(e,t,"get");return $m(e,n)}function Mm(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function Ca(e,t,n){var r=Sa(e,t,"set");return Mm(e,r,n),n}function Nm(e){let t=y.useContext(Ea);if(t){let{register:n,...r}=t;e=Ge(r,e),n()}return Eo(t,e.ref),e}var _n=new WeakMap;class Mn{continuePropagation(){Ca(this,_n,!1)}get shouldStopPropagation(){return _m(this,_n)}constructor(t,n,r,s){lu(this,_n,{writable:!0,value:void 0}),Ca(this,_n,!0);var o;let i=(o=s?.target)!==null&&o!==void 0?o:r.currentTarget;const a=i?.getBoundingClientRect();let c,u=0,l,d=null;r.clientX!=null&&r.clientY!=null&&(l=r.clientX,d=r.clientY),a&&(l!=null&&d!=null?(c=l-a.left,u=d-a.top):(c=a.width/2,u=a.height/2)),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=c,this.y=u}}const Pa=Symbol("linkClicked"),ka="react-aria-pressable-style",Aa="data-react-aria-pressable";function Om(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:s,onPressUp:o,onClick:i,isDisabled:a,isPressed:c,preventFocusOnPress:u,shouldCancelOnPointerExit:l,allowTextSelectionOnPress:d,ref:m,...w}=Nm(e),[p,v]=y.useState(!1),b=y.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:S,removeAllGlobalListeners:M}=dr(),A=Ie((h,P)=>{let D=b.current;if(a||D.didFirePressStart)return!1;let T=!0;if(D.isTriggeringEvent=!0,r){let L=new Mn("pressstart",P,h);r(L),T=L.shouldStopPropagation}return n&&n(!0),D.isTriggeringEvent=!1,D.didFirePressStart=!0,v(!0),T}),O=Ie((h,P,D=!0)=>{let T=b.current;if(!T.didFirePressStart)return!1;T.didFirePressStart=!1,T.isTriggeringEvent=!0;let L=!0;if(s){let g=new Mn("pressend",P,h);s(g),L=g.shouldStopPropagation}if(n&&n(!1),v(!1),t&&D&&!a){let g=new Mn("press",P,h);t(g),L&&(L=g.shouldStopPropagation)}return T.isTriggeringEvent=!1,L}),$=Ie((h,P)=>{let D=b.current;if(a)return!1;if(o){D.isTriggeringEvent=!0;let T=new Mn("pressup",P,h);return o(T),D.isTriggeringEvent=!1,T.shouldStopPropagation}return!0}),I=Ie(h=>{let P=b.current;if(P.isPressed&&P.target){P.didFirePressStart&&P.pointerType!=null&&O(Je(P.target,h),P.pointerType,!1),P.isPressed=!1,P.isOverTarget=!1,P.activePointerId=null,P.pointerType=null,M(),d||bs(P.target);for(let D of P.disposables)D();P.disposables=[]}}),N=Ie(h=>{l&&I(h)}),k=Ie(h=>{i?.(h)}),R=Ie((h,P)=>{if(i){let D=new MouseEvent("click",h);va(D,P),i(hs(D))}}),q=y.useMemo(()=>{let h=b.current,P={onKeyDown(T){if(vs(T.nativeEvent,T.currentTarget)&&re(T.currentTarget,ee(T.nativeEvent))){var L;Ma(ee(T.nativeEvent),T.key)&&T.preventDefault();let g=!0;if(!h.isPressed&&!T.repeat){h.target=T.currentTarget,h.isPressed=!0,h.pointerType="keyboard",g=A(T,"keyboard");let _=T.currentTarget,E=B=>{vs(B,_)&&!B.repeat&&re(_,ee(B))&&h.target&&$(Je(h.target,B),"keyboard")};S(ce(T.currentTarget),"keyup",ho(E,D),!0)}g&&T.stopPropagation(),T.metaKey&&lt()&&((L=h.metaKeyEvents)===null||L===void 0||L.set(T.key,T.nativeEvent))}else T.key==="Meta"&&(h.metaKeyEvents=new Map)},onClick(T){if(!(T&&!re(T.currentTarget,ee(T.nativeEvent)))&&T&&T.button===0&&!h.isTriggeringEvent&&!Dt.isOpening){let L=!0;if(a&&T.preventDefault(),!h.ignoreEmulatedMouseEvents&&!h.isPressed&&(h.pointerType==="virtual"||fr(T.nativeEvent))){let g=A(T,"virtual"),_=$(T,"virtual"),E=O(T,"virtual");k(T),L=g&&_&&E}else if(h.isPressed&&h.pointerType!=="keyboard"){let g=h.pointerType||T.nativeEvent.pointerType||"virtual",_=$(Je(T.currentTarget,T),g),E=O(Je(T.currentTarget,T),g,!0);L=_&&E,h.isOverTarget=!1,k(T),I(T)}h.ignoreEmulatedMouseEvents=!1,L&&T.stopPropagation()}}},D=T=>{var L;if(h.isPressed&&h.target&&vs(T,h.target)){var g;Ma(ee(T),T.key)&&T.preventDefault();let E=ee(T),B=re(h.target,ee(T));O(Je(h.target,T),"keyboard",B),B&&R(T,h.target),M(),T.key!=="Enter"&&ys(h.target)&&re(h.target,E)&&!T[Pa]&&(T[Pa]=!0,Dt(h.target,T,!1)),h.isPressed=!1,(g=h.metaKeyEvents)===null||g===void 0||g.delete(T.key)}else if(T.key==="Meta"&&(!((L=h.metaKeyEvents)===null||L===void 0)&&L.size)){var _;let E=h.metaKeyEvents;h.metaKeyEvents=void 0;for(let B of E.values())(_=h.target)===null||_===void 0||_.dispatchEvent(new KeyboardEvent("keyup",B))}};if(typeof PointerEvent<"u"){P.onPointerDown=g=>{if(g.button!==0||!re(g.currentTarget,ee(g.nativeEvent)))return;if(_u(g.nativeEvent)){h.pointerType="virtual";return}h.pointerType=g.pointerType;let _=!0;if(!h.isPressed){h.isPressed=!0,h.isOverTarget=!0,h.activePointerId=g.pointerId,h.target=g.currentTarget,d||Ta(h.target),_=A(g,h.pointerType);let E=ee(g.nativeEvent);"releasePointerCapture"in E&&E.releasePointerCapture(g.pointerId),S(ce(g.currentTarget),"pointerup",T,!1),S(ce(g.currentTarget),"pointercancel",L,!1)}_&&g.stopPropagation()},P.onMouseDown=g=>{if(re(g.currentTarget,ee(g.nativeEvent))&&g.button===0){if(u){let _=xa(g.target);_&&h.disposables.push(_)}g.stopPropagation()}},P.onPointerUp=g=>{!re(g.currentTarget,ee(g.nativeEvent))||h.pointerType==="virtual"||g.button===0&&!h.isPressed&&$(g,h.pointerType||g.pointerType)},P.onPointerEnter=g=>{g.pointerId===h.activePointerId&&h.target&&!h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!0,A(Je(h.target,g),h.pointerType))},P.onPointerLeave=g=>{g.pointerId===h.activePointerId&&h.target&&h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!1,O(Je(h.target,g),h.pointerType,!1),N(g))};let T=g=>{if(g.pointerId===h.activePointerId&&h.isPressed&&g.button===0&&h.target){if(re(h.target,ee(g))&&h.pointerType!=null){let _=!1,E=setTimeout(()=>{h.isPressed&&h.target instanceof HTMLElement&&(_?I(g):(at(h.target),h.target.click()))},80);S(g.currentTarget,"click",()=>_=!0,!0),h.disposables.push(()=>clearTimeout(E))}else I(g);h.isOverTarget=!1}},L=g=>{I(g)};P.onDragStart=g=>{re(g.currentTarget,ee(g.nativeEvent))&&I(g)}}else if(process.env.NODE_ENV==="test"){P.onMouseDown=g=>{if(g.button!==0||!re(g.currentTarget,ee(g.nativeEvent)))return;if(h.ignoreEmulatedMouseEvents){g.stopPropagation();return}if(h.isPressed=!0,h.isOverTarget=!0,h.target=g.currentTarget,h.pointerType=fr(g.nativeEvent)?"virtual":"mouse",Mc.flushSync(()=>A(g,h.pointerType))&&g.stopPropagation(),u){let E=xa(g.target);E&&h.disposables.push(E)}S(ce(g.currentTarget),"mouseup",T,!1)},P.onMouseEnter=g=>{if(!re(g.currentTarget,ee(g.nativeEvent)))return;let _=!0;h.isPressed&&!h.ignoreEmulatedMouseEvents&&h.pointerType!=null&&(h.isOverTarget=!0,_=A(g,h.pointerType)),_&&g.stopPropagation()},P.onMouseLeave=g=>{if(!re(g.currentTarget,ee(g.nativeEvent)))return;let _=!0;h.isPressed&&!h.ignoreEmulatedMouseEvents&&h.pointerType!=null&&(h.isOverTarget=!1,_=O(g,h.pointerType,!1),N(g)),_&&g.stopPropagation()},P.onMouseUp=g=>{re(g.currentTarget,ee(g.nativeEvent))&&!h.ignoreEmulatedMouseEvents&&g.button===0&&!h.isPressed&&$(g,h.pointerType||"mouse")};let T=g=>{if(g.button===0){if(h.ignoreEmulatedMouseEvents){h.ignoreEmulatedMouseEvents=!1;return}h.target&&h.target.contains(g.target)&&h.pointerType!=null||I(g),h.isOverTarget=!1}};P.onTouchStart=g=>{if(!re(g.currentTarget,ee(g.nativeEvent)))return;let _=Im(g.nativeEvent);if(!_)return;h.activePointerId=_.identifier,h.ignoreEmulatedMouseEvents=!0,h.isOverTarget=!0,h.isPressed=!0,h.target=g.currentTarget,h.pointerType="touch",d||Ta(h.target),A(Ve(h.target,g),h.pointerType)&&g.stopPropagation(),S(ge(g.currentTarget),"scroll",L,!0)},P.onTouchMove=g=>{if(!re(g.currentTarget,ee(g.nativeEvent)))return;if(!h.isPressed){g.stopPropagation();return}let _=$a(g.nativeEvent,h.activePointerId),E=!0;_&&_a(_,g.currentTarget)?!h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!0,E=A(Ve(h.target,g),h.pointerType)):h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!1,E=O(Ve(h.target,g),h.pointerType,!1),N(Ve(h.target,g))),E&&g.stopPropagation()},P.onTouchEnd=g=>{if(!re(g.currentTarget,ee(g.nativeEvent)))return;if(!h.isPressed){g.stopPropagation();return}let _=$a(g.nativeEvent,h.activePointerId),E=!0;_&&_a(_,g.currentTarget)&&h.pointerType!=null?($(Ve(h.target,g),h.pointerType),E=O(Ve(h.target,g),h.pointerType),R(g.nativeEvent,h.target)):h.isOverTarget&&h.pointerType!=null&&(E=O(Ve(h.target,g),h.pointerType,!1)),E&&g.stopPropagation(),h.isPressed=!1,h.activePointerId=null,h.isOverTarget=!1,h.ignoreEmulatedMouseEvents=!0,h.target&&!d&&bs(h.target),M()},P.onTouchCancel=g=>{re(g.currentTarget,ee(g.nativeEvent))&&(g.stopPropagation(),h.isPressed&&I(Ve(h.target,g)))};let L=g=>{h.isPressed&&re(ee(g),h.target)&&I({currentTarget:h.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};P.onDragStart=g=>{re(g.currentTarget,ee(g.nativeEvent))&&I(g)}}return P},[S,a,u,M,d,I,N,O,A,$,k,R]);return y.useEffect(()=>{if(!m||process.env.NODE_ENV==="test")return;const h=ce(m.current);if(!h||!h.head||h.getElementById(ka))return;const P=h.createElement("style");P.id=ka,P.textContent=`
31
- @layer {
32
- [${Aa}] {
33
- touch-action: pan-x pan-y pinch-zoom;
34
- }
35
- }
36
- `.trim(),h.head.prepend(P)},[m]),y.useEffect(()=>{let h=b.current;return()=>{var P;d||bs((P=h.target)!==null&&P!==void 0?P:void 0);for(let D of h.disposables)D();h.disposables=[]}},[d]),{isPressed:c||p,pressProps:Ge(w,q,{[Aa]:!0})}}function ys(e){return e.tagName==="A"&&e.hasAttribute("href")}function vs(e,t){const{key:n,code:r}=e,s=t,o=s.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(s instanceof ge(s).HTMLInputElement&&!Na(s,n)||s instanceof ge(s).HTMLTextAreaElement||s.isContentEditable)&&!((o==="link"||!o&&ys(s))&&n!=="Enter")}function Im(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function $a(e,t){const n=e.changedTouches;for(let r=0;r<n.length;r++){const s=n[r];if(s.identifier===t)return s}return null}function Ve(e,t){let n=0,r=0;return t.targetTouches&&t.targetTouches.length===1&&(n=t.targetTouches[0].clientX,r=t.targetTouches[0].clientY),{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function Je(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function Lm(e){let t=0,n=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?n=e.height/2:e.radiusY!==void 0&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function jm(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function _a(e,t){let n=t.getBoundingClientRect(),r=Lm(e);return jm(n,r)}function Dm(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!ys(e)}function Ma(e,t){return e instanceof HTMLInputElement?!Na(e,t):Dm(e)}const Vm=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Na(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":Vm.has(e.type)}let Tt=null,ws=new Set,Kt=new Map,Ze=!1,xs=!1;const Fm={Tab:!0,Escape:!0};function Ts(e,t){for(let n of ws)n(e,t)}function Rm(e){return!(e.metaKey||!lt()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Nn(e){Ze=!0,Rm(e)&&(Tt="keyboard",Ts("keyboard",e))}function ye(e){Tt="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Ze=!0,Ts("pointer",e))}function Oa(e){fr(e)&&(Ze=!0,Tt="virtual")}function Ia(e){e.target===window||e.target===document||An||!e.isTrusted||(!Ze&&!xs&&(Tt="virtual",Ts("virtual",e)),Ze=!1,xs=!1)}function La(){An||(Ze=!1,xs=!0)}function Es(e){if(typeof window>"u"||typeof document>"u"||Kt.get(ge(e)))return;const t=ge(e),n=ce(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Ze=!0,r.apply(this,arguments)},n.addEventListener("keydown",Nn,!0),n.addEventListener("keyup",Nn,!0),n.addEventListener("click",Oa,!0),t.addEventListener("focus",Ia,!0),t.addEventListener("blur",La,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",ye,!0),n.addEventListener("pointermove",ye,!0),n.addEventListener("pointerup",ye,!0)):process.env.NODE_ENV==="test"&&(n.addEventListener("mousedown",ye,!0),n.addEventListener("mousemove",ye,!0),n.addEventListener("mouseup",ye,!0)),t.addEventListener("beforeunload",()=>{ja(e)},{once:!0}),Kt.set(t,{focus:r})}const ja=(e,t)=>{const n=ge(e),r=ce(e);t&&r.removeEventListener("DOMContentLoaded",t),Kt.has(n)&&(n.HTMLElement.prototype.focus=Kt.get(n).focus,r.removeEventListener("keydown",Nn,!0),r.removeEventListener("keyup",Nn,!0),r.removeEventListener("click",Oa,!0),n.removeEventListener("focus",Ia,!0),n.removeEventListener("blur",La,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",ye,!0),r.removeEventListener("pointermove",ye,!0),r.removeEventListener("pointerup",ye,!0)):process.env.NODE_ENV==="test"&&(r.removeEventListener("mousedown",ye,!0),r.removeEventListener("mousemove",ye,!0),r.removeEventListener("mouseup",ye,!0)),Kt.delete(n))};function Um(e){const t=ce(e);let n;return t.readyState!=="loading"?Es(e):(n=()=>{Es(e)},t.addEventListener("DOMContentLoaded",n)),()=>ja(e,n)}typeof document<"u"&&Um();function Da(){return Tt!=="pointer"}function Bm(){return Tt}const zm=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Gm(e,t,n){let r=ce(n?.target);const s=typeof window<"u"?ge(n?.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?ge(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,i=typeof window<"u"?ge(n?.target).HTMLElement:HTMLElement,a=typeof window<"u"?ge(n?.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof s&&!zm.has(r.activeElement.type)||r.activeElement instanceof o||r.activeElement instanceof i&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof a&&!Fm[n.key])}function Km(e,t,n){Es(),y.useEffect(()=>{let r=(s,o)=>{Gm(!!n?.isTextInput,s,o)&&e(Da())};return ws.add(r),()=>{ws.delete(r)}},t)}function Hm(e){const t=ce(e),n=jt(t);if(Bm()==="virtual"){let r=n;To(()=>{jt(t)===r&&e.isConnected&&at(e)})}else at(e)}function Va(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:s}=e;const o=y.useCallback(c=>{if(c.target===c.currentTarget)return r&&r(c),s&&s(!1),!0},[r,s]),i=wa(o),a=y.useCallback(c=>{const u=ce(c.target),l=u?jt(u):jt();c.target===c.currentTarget&&l===ee(c.nativeEvent)&&(n&&n(c),s&&s(!0),i(c))},[s,n,i]);return{focusProps:{onFocus:!t&&(n||s||r)?a:void 0,onBlur:!t&&(r||s)?o:void 0}}}function Fa(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t&&process.env.NODE_ENV!=="production"?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(r),t&&n.stopPropagation()}}function Wm(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:Fa(e.onKeyDown),onKeyUp:Fa(e.onKeyUp)}}}let qm=y.createContext(null);function Ym(e){let t=y.useContext(qm)||{};Eo(t,e);let{ref:n,...r}=t;return r}function Xm(e,t){let{focusProps:n}=Va(e),{keyboardProps:r}=Wm(e),s=Ge(n,r),o=Ym(t),i=e.isDisabled?{}:o,a=y.useRef(e.autoFocus);y.useEffect(()=>{a.current&&t.current&&Hm(t.current),a.current=!1},[t]);let c=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(c=void 0),{focusableProps:Ge({...s,tabIndex:c},i)}}function Jm(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:s}=e,o=y.useRef({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:a}=dr(),c=y.useCallback(d=>{d.currentTarget.contains(d.target)&&o.current.isFocusWithin&&!d.currentTarget.contains(d.relatedTarget)&&(o.current.isFocusWithin=!1,a(),n&&n(d),s&&s(!1))},[n,s,o,a]),u=wa(c),l=y.useCallback(d=>{if(!d.currentTarget.contains(d.target))return;const m=ce(d.target),w=jt(m);if(!o.current.isFocusWithin&&w===ee(d.nativeEvent)){r&&r(d),s&&s(!0),o.current.isFocusWithin=!0,u(d);let p=d.currentTarget;i(m,"focus",v=>{if(o.current.isFocusWithin&&!re(p,v.target)){let b=new m.defaultView.FocusEvent("blur",{relatedTarget:v.target});va(b,p);let S=hs(b);c(S)}},{capture:!0})}},[r,s,u,i,c]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:c}}}let On=!1,In=0;function Ss(){On=!0,setTimeout(()=>{On=!1},50)}function Ra(e){e.pointerType==="touch"&&Ss()}function Zm(){if(!(typeof document>"u"))return In===0&&(typeof PointerEvent<"u"?document.addEventListener("pointerup",Ra):process.env.NODE_ENV==="test"&&document.addEventListener("touchend",Ss)),In++,()=>{In--,!(In>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",Ra):process.env.NODE_ENV==="test"&&document.removeEventListener("touchend",Ss))}}function Cs(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:s}=e,[o,i]=y.useState(!1),a=y.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;y.useEffect(Zm,[]);let{addGlobalListener:c,removeAllGlobalListeners:u}=dr(),{hoverProps:l,triggerHoverEnd:d}=y.useMemo(()=>{let m=(v,b)=>{if(a.pointerType=b,s||b==="touch"||a.isHovered||!v.currentTarget.contains(v.target))return;a.isHovered=!0;let S=v.currentTarget;a.target=S,c(ce(v.target),"pointerover",M=>{a.isHovered&&a.target&&!re(a.target,M.target)&&w(M,M.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:S,pointerType:b}),n&&n(!0),i(!0)},w=(v,b)=>{let S=a.target;a.pointerType="",a.target=null,!(b==="touch"||!a.isHovered||!S)&&(a.isHovered=!1,u(),r&&r({type:"hoverend",target:S,pointerType:b}),n&&n(!1),i(!1))},p={};return typeof PointerEvent<"u"?(p.onPointerEnter=v=>{On&&v.pointerType==="mouse"||m(v,v.pointerType)},p.onPointerLeave=v=>{!s&&v.currentTarget.contains(v.target)&&w(v,v.pointerType)}):process.env.NODE_ENV==="test"&&(p.onTouchStart=()=>{a.ignoreEmulatedMouseEvents=!0},p.onMouseEnter=v=>{!a.ignoreEmulatedMouseEvents&&!On&&m(v,"mouse"),a.ignoreEmulatedMouseEvents=!1},p.onMouseLeave=v=>{!s&&v.currentTarget.contains(v.target)&&w(v,"mouse")}),{hoverProps:p,triggerHoverEnd:w}},[t,n,r,s,a,c,u]);return y.useEffect(()=>{s&&d({currentTarget:a.target},a.pointerType)},[s]),{hoverProps:l,isHovered:o}}function Ps(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,s=y.useRef({isFocused:!1,isFocusVisible:t||Da()}),[o,i]=y.useState(!1),[a,c]=y.useState(()=>s.current.isFocused&&s.current.isFocusVisible),u=y.useCallback(()=>c(s.current.isFocused&&s.current.isFocusVisible),[]),l=y.useCallback(w=>{s.current.isFocused=w,i(w),u()},[u]);Km(w=>{s.current.isFocusVisible=w,u()},[],{isTextInput:n});let{focusProps:d}=Va({isDisabled:r,onFocusChange:l}),{focusWithinProps:m}=Jm({isDisabled:!r,onFocusWithinChange:l});return{isFocused:o,isFocusVisible:a,focusProps:r?m:d}}function Qe(e){return y.forwardRef(e)}var ks=(e,t,n=!0)=>{if(!t)return[e,{}];const r=t.reduce((s,o)=>o in e?{...s,[o]:e[o]}:s,{});return n?[Object.keys(e).filter(o=>!t.includes(o)).reduce((o,i)=>({...o,[i]:e[i]}),{}),r]:[e,r]},Qm={default:"bg-default text-default-foreground",primary:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-success text-success-foreground",warning:"bg-warning text-warning-foreground",danger:"bg-danger text-danger-foreground"},eh={default:"shadow-lg shadow-default/50 bg-default text-default-foreground",primary:"shadow-lg shadow-primary/40 bg-primary text-primary-foreground",secondary:"shadow-lg shadow-secondary/40 bg-secondary text-secondary-foreground",success:"shadow-lg shadow-success/40 bg-success text-success-foreground",warning:"shadow-lg shadow-warning/40 bg-warning text-warning-foreground",danger:"shadow-lg shadow-danger/40 bg-danger text-danger-foreground"},th={default:"bg-transparent border-default text-foreground",primary:"bg-transparent border-primary text-primary",secondary:"bg-transparent border-secondary text-secondary",success:"bg-transparent border-success text-success",warning:"bg-transparent border-warning text-warning",danger:"bg-transparent border-danger text-danger"},nh={default:"bg-default/40 text-default-700",primary:"bg-primary/20 text-primary-600",secondary:"bg-secondary/20 text-secondary-600",success:"bg-success/20 text-success-700 dark:text-success",warning:"bg-warning/20 text-warning-700 dark:text-warning",danger:"bg-danger/20 text-danger-600 dark:text-danger-500"},rh={default:"border-default bg-default-100 text-default-foreground",primary:"border-default bg-default-100 text-primary",secondary:"border-default bg-default-100 text-secondary",success:"border-default bg-default-100 text-success",warning:"border-default bg-default-100 text-warning",danger:"border-default bg-default-100 text-danger"},sh={default:"bg-transparent text-default-foreground",primary:"bg-transparent text-primary",secondary:"bg-transparent text-secondary",success:"bg-transparent text-success",warning:"bg-transparent text-warning",danger:"bg-transparent text-danger"},oh={default:"border-default text-default-foreground",primary:"border-primary text-primary",secondary:"border-secondary text-secondary",success:"border-success text-success",warning:"border-warning text-warning",danger:"border-danger text-danger"},G={solid:Qm,shadow:eh,bordered:th,flat:nh,faded:rh,light:sh,ghost:oh},ih={".spinner-bar-animation":{"animation-delay":"calc(-1.2s + (0.1s * var(--bar-index)))",transform:"rotate(calc(30deg * var(--bar-index)))translate(140%)"},".spinner-dot-animation":{"animation-delay":"calc(250ms * var(--dot-index))"},".spinner-dot-blink-animation":{"animation-delay":"calc(200ms * var(--dot-index))"}},ah={".leading-inherit":{"line-height":"inherit"},".bg-img-inherit":{"background-image":"inherit"},".bg-clip-inherit":{"background-clip":"inherit"},".text-fill-inherit":{"-webkit-text-fill-color":"inherit"},".tap-highlight-transparent":{"-webkit-tap-highlight-color":"transparent"},".input-search-cancel-button-none":{"&::-webkit-search-cancel-button":{"-webkit-appearance":"none"}}},lh={".scrollbar-hide":{"-ms-overflow-style":"none","scrollbar-width":"none","&::-webkit-scrollbar":{display:"none"}},".scrollbar-default":{"-ms-overflow-style":"auto","scrollbar-width":"auto","&::-webkit-scrollbar":{display:"block"}}},ch={".text-tiny":{"font-size":"var(--heroui-font-size-tiny)","line-height":"var(--heroui-line-height-tiny)"},".text-small":{"font-size":"var(--heroui-font-size-small)","line-height":"var(--heroui-line-height-small)"},".text-medium":{"font-size":"var(--heroui-font-size-medium)","line-height":"var(--heroui-line-height-medium)"},".text-large":{"font-size":"var(--heroui-font-size-large)","line-height":"var(--heroui-line-height-large)"}},Ce="250ms",uh={".transition-background":{"transition-property":"background","transition-timing-function":"ease","transition-duration":Ce},".transition-colors-opacity":{"transition-property":"color, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":Ce},".transition-width":{"transition-property":"width","transition-timing-function":"ease","transition-duration":Ce},".transition-height":{"transition-property":"height","transition-timing-function":"ease","transition-duration":Ce},".transition-size":{"transition-property":"width, height","transition-timing-function":"ease","transition-duration":Ce},".transition-left":{"transition-property":"left","transition-timing-function":"ease","transition-duration":Ce},".transition-transform-opacity":{"transition-property":"transform, scale, opacity rotate","transition-timing-function":"ease","transition-duration":Ce},".transition-transform-background":{"transition-property":"transform, scale, background","transition-timing-function":"ease","transition-duration":Ce},".transition-transform-colors":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke","transition-timing-function":"ease","transition-duration":Ce},".transition-transform-colors-opacity":{"transition-property":"transform, scale, color, background, background-color, border-color, text-decoration-color, fill, stroke, opacity","transition-timing-function":"ease","transition-duration":Ce}},dh={...ah,...uh,...lh,...ch,...ih},Ln=["small","medium","large"],Ua={theme:{spacing:["divider"],radius:Ln},classGroups:{shadow:[{shadow:Ln}],opacity:[{opacity:["disabled"]}],"font-size":[{text:["tiny",...Ln]}],"border-w":[{border:Ln}],"bg-image":["bg-stripe-gradient-default","bg-stripe-gradient-primary","bg-stripe-gradient-secondary","bg-stripe-gradient-success","bg-stripe-gradient-warning","bg-stripe-gradient-danger"],transition:Object.keys(dh).filter(e=>e.includes(".transition")).map(e=>e.replace(".",""))}},Ba=e=>e===!1?"false":e===!0?"true":e===0?"0":e,fe=e=>{if(!e||typeof e!="object")return!0;for(let t in e)return!1;return!0},fh=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let s=0;s<n.length;s++){let o=n[s];if(!r.includes(o)||e[o]!==t[o])return!1}return!0};function za(e,t){for(let n=0;n<e.length;n++){let r=e[n];Array.isArray(r)?za(r,t):t.push(r)}}var Ga=(...e)=>{let t=[];za(e,t);let n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},Ka=(e,t)=>{let n={};for(let r in e){let s=e[r];if(r in t){let o=t[r];Array.isArray(s)||Array.isArray(o)?n[r]=Ga(o,s):typeof s=="object"&&typeof o=="object"&&s&&o?n[r]=Ka(s,o):n[r]=o+" "+s}else n[r]=s}for(let r in t)r in e||(n[r]=t[r]);return n},ph=/\s+/g,Ha=e=>!e||typeof e!="string"?e:e.replace(ph," ").trim();const As="-",mh=e=>{const t=gh(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(As);return a[0]===""&&a.length!==1&&a.shift(),Wa(a,t)||hh(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},Wa=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),s=r?Wa(e.slice(1),r):void 0;if(s)return s;if(t.validators.length===0)return;const o=e.join(As);return t.validators.find(({validator:i})=>i(o))?.classGroupId},qa=/^\[(.+)\]$/,hh=e=>{if(qa.test(e)){const t=qa.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},gh=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const s in n)$s(n[s],r,s,t);return r},$s=(e,t,n,r)=>{e.forEach(s=>{if(typeof s=="string"){const o=s===""?t:Ya(t,s);o.classGroupId=n;return}if(typeof s=="function"){if(bh(s)){$s(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([o,i])=>{$s(i,Ya(t,o),n,r)})})},Ya=(e,t)=>{let n=e;return t.split(As).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},bh=e=>e.isThemeGetter,yh=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const s=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let i=n.get(o);if(i!==void 0)return i;if((i=r.get(o))!==void 0)return s(o,i),i},set(o,i){n.has(o)?n.set(o,i):s(o,i)}}},_s="!",Ms=":",vh=Ms.length,wh=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=s=>{const o=[];let i=0,a=0,c=0,u;for(let p=0;p<s.length;p++){let v=s[p];if(i===0&&a===0){if(v===Ms){o.push(s.slice(c,p)),c=p+vh;continue}if(v==="/"){u=p;continue}}v==="["?i++:v==="]"?i--:v==="("?a++:v===")"&&a--}const l=o.length===0?s:s.substring(c),d=xh(l),m=d!==l,w=u&&u>c?u-c:void 0;return{modifiers:o,hasImportantModifier:m,baseClassName:d,maybePostfixModifierPosition:w}};if(t){const s=t+Ms,o=r;r=i=>i.startsWith(s)?o(i.substring(s.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const s=r;r=o=>n({className:o,parseClassName:s})}return r},xh=e=>e.endsWith(_s)?e.substring(0,e.length-1):e.startsWith(_s)?e.substring(1):e,Th=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const s=[];let o=[];return r.forEach(i=>{i[0]==="["||t[i]?(s.push(...o.sort(),i),o=[]):o.push(i)}),s.push(...o.sort()),s}},Eh=e=>({cache:yh(e.cacheSize),parseClassName:wh(e),sortModifiers:Th(e),...mh(e)}),Sh=/\s+/,Ch=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:o}=t,i=[],a=e.trim().split(Sh);let c="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{isExternal:d,modifiers:m,hasImportantModifier:w,baseClassName:p,maybePostfixModifierPosition:v}=n(l);if(d){c=l+(c.length>0?" "+c:c);continue}let b=!!v,S=r(b?p.substring(0,v):p);if(!S){if(!b){c=l+(c.length>0?" "+c:c);continue}if(S=r(p),!S){c=l+(c.length>0?" "+c:c);continue}b=!1}const M=o(m).join(":"),A=w?M+_s:M,O=A+S;if(i.includes(O))continue;i.push(O);const $=s(S,b);for(let I=0;I<$.length;++I){const N=$[I];i.push(A+N)}c=l+(c.length>0?" "+c:c)}return c};function Ph(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Xa(t))&&(r&&(r+=" "),r+=n);return r}const Xa=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Xa(e[r]))&&(n&&(n+=" "),n+=t);return n};function Ns(e,...t){let n,r,s,o=i;function i(c){const u=t.reduce((l,d)=>d(l),e());return n=Eh(u),r=n.cache.get,s=n.cache.set,o=a,a(c)}function a(c){const u=r(c);if(u)return u;const l=Ch(c,n);return s(c,l),l}return function(){return o(Ph.apply(null,arguments))}}const oe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ja=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Za=/^\((?:(\w[\w-]*):)?(.+)\)$/i,kh=/^\d+\/\d+$/,Ah=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$h=/\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$/,_h=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Mh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Et=e=>kh.test(e),X=e=>!!e&&!Number.isNaN(Number(e)),Fe=e=>!!e&&Number.isInteger(Number(e)),Os=e=>e.endsWith("%")&&X(e.slice(0,-1)),Me=e=>Ah.test(e),Oh=()=>!0,Ih=e=>$h.test(e)&&!_h.test(e),Qa=()=>!1,Lh=e=>Mh.test(e),jh=e=>Nh.test(e),Dh=e=>!V(e)&&!F(e),Vh=e=>St(e,sl,Qa),V=e=>Ja.test(e),et=e=>St(e,ol,Ih),Is=e=>St(e,zh,X),el=e=>St(e,nl,Qa),Fh=e=>St(e,rl,jh),jn=e=>St(e,il,Lh),F=e=>Za.test(e),Ht=e=>Ct(e,ol),Rh=e=>Ct(e,Gh),tl=e=>Ct(e,nl),Uh=e=>Ct(e,sl),Bh=e=>Ct(e,rl),Dn=e=>Ct(e,il,!0),St=(e,t,n)=>{const r=Ja.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ct=(e,t,n=!1)=>{const r=Za.exec(e);return r?r[1]?t(r[1]):n:!1},nl=e=>e==="position"||e==="percentage",rl=e=>e==="image"||e==="url",sl=e=>e==="length"||e==="size"||e==="bg-size",ol=e=>e==="length",zh=e=>e==="number",Gh=e=>e==="family-name",il=e=>e==="shadow",Ls=()=>{const e=oe("color"),t=oe("font"),n=oe("text"),r=oe("font-weight"),s=oe("tracking"),o=oe("leading"),i=oe("breakpoint"),a=oe("container"),c=oe("spacing"),u=oe("radius"),l=oe("shadow"),d=oe("inset-shadow"),m=oe("text-shadow"),w=oe("drop-shadow"),p=oe("blur"),v=oe("perspective"),b=oe("aspect"),S=oe("ease"),M=oe("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],$=()=>[...O(),F,V],I=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],k=()=>[F,V,c],R=()=>[Et,"full","auto",...k()],q=()=>[Fe,"none","subgrid",F,V],h=()=>["auto",{span:["full",Fe,F,V]},Fe,F,V],P=()=>[Fe,"auto",F,V],D=()=>["auto","min","max","fr",F,V],T=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],g=()=>["auto",...k()],_=()=>[Et,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],E=()=>[e,F,V],B=()=>[...O(),tl,el,{position:[F,V]}],C=()=>["no-repeat",{repeat:["","x","y","space","round"]}],j=()=>["auto","cover","contain",Uh,Vh,{size:[F,V]}],z=()=>[Os,Ht,et],U=()=>["","none","full",u,F,V],Y=()=>["",X,Ht,et],Z=()=>["solid","dashed","dotted","double"],ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>[X,Os,tl,el],Q=()=>["","none",p,F,V],le=()=>["none",X,F,V],ve=()=>["none",X,F,V],we=()=>[X,F,V],ke=()=>[Et,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Me],breakpoint:[Me],color:[Oh],container:[Me],"drop-shadow":[Me],ease:["in","out","in-out"],font:[Dh],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Me],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Me],shadow:[Me],spacing:["px",X],text:[Me],"text-shadow":[Me],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Et,V,F,b]}],container:["container"],columns:[{columns:[X,V,F,a]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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:$()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{start:R()}],end:[{end:R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[Fe,"auto",F,V]}],basis:[{basis:[Et,"full","auto",a,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[X,Et,"auto","initial","none",V]}],grow:[{grow:["",X,F,V]}],shrink:[{shrink:["",X,F,V]}],order:[{order:[Fe,"first","last","none",F,V]}],"grid-cols":[{"grid-cols":q()}],"col-start-end":[{col:h()}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":q()}],"row-start-end":[{row:h()}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":D()}],"auto-rows":[{"auto-rows":D()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...T(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...T()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":T()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:g()}],mx:[{mx:g()}],my:[{my:g()}],ms:[{ms:g()}],me:[{me:g()}],mt:[{mt:g()}],mr:[{mr:g()}],mb:[{mb:g()}],ml:[{ml:g()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:_()}],w:[{w:[a,"screen",..._()]}],"min-w":[{"min-w":[a,"screen","none",..._()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},..._()]}],h:[{h:["screen","lh",..._()]}],"min-h":[{"min-h":["screen","lh","none",..._()]}],"max-h":[{"max-h":["screen","lh",..._()]}],"font-size":[{text:["base",n,Ht,et]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,F,Is]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Os,V]}],"font-family":[{font:[Rh,V,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,F,V]}],"line-clamp":[{"line-clamp":[X,"none",F,Is]}],leading:[{leading:[o,...k()]}],"list-image":[{"list-image":["none",F,V]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",F,V]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[X,"from-font","auto",F,et]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[X,"auto",F,V]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",F,V]}],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",F,V]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:C()}],"bg-size":[{bg:j()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Fe,F,V],radial:["",F,V],conic:[Fe,F,V]},Bh,Fh]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[X,F,V]}],"outline-w":[{outline:["",X,Ht,et]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",l,Dn,jn]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",d,Dn,jn]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[X,et]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",m,Dn,jn]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[X,F,V]}],"mix-blend":[{"mix-blend":[...ie(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ie()}],"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":[X]}],"mask-image-linear-from-pos":[{"mask-linear-from":J()}],"mask-image-linear-to-pos":[{"mask-linear-to":J()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":J()}],"mask-image-t-to-pos":[{"mask-t-to":J()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":J()}],"mask-image-r-to-pos":[{"mask-r-to":J()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":J()}],"mask-image-b-to-pos":[{"mask-b-to":J()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":J()}],"mask-image-l-to-pos":[{"mask-l-to":J()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":J()}],"mask-image-x-to-pos":[{"mask-x-to":J()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":J()}],"mask-image-y-to-pos":[{"mask-y-to":J()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[F,V]}],"mask-image-radial-from-pos":[{"mask-radial-from":J()}],"mask-image-radial-to-pos":[{"mask-radial-to":J()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"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":O()}],"mask-image-conic-pos":[{"mask-conic":[X]}],"mask-image-conic-from-pos":[{"mask-conic-from":J()}],"mask-image-conic-to-pos":[{"mask-conic-to":J()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:B()}],"mask-repeat":[{mask:C()}],"mask-size":[{mask:j()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",F,V]}],filter:[{filter:["","none",F,V]}],blur:[{blur:Q()}],brightness:[{brightness:[X,F,V]}],contrast:[{contrast:[X,F,V]}],"drop-shadow":[{"drop-shadow":["","none",w,Dn,jn]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",X,F,V]}],"hue-rotate":[{"hue-rotate":[X,F,V]}],invert:[{invert:["",X,F,V]}],saturate:[{saturate:[X,F,V]}],sepia:[{sepia:["",X,F,V]}],"backdrop-filter":[{"backdrop-filter":["","none",F,V]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[X,F,V]}],"backdrop-contrast":[{"backdrop-contrast":[X,F,V]}],"backdrop-grayscale":[{"backdrop-grayscale":["",X,F,V]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[X,F,V]}],"backdrop-invert":[{"backdrop-invert":["",X,F,V]}],"backdrop-opacity":[{"backdrop-opacity":[X,F,V]}],"backdrop-saturate":[{"backdrop-saturate":[X,F,V]}],"backdrop-sepia":[{"backdrop-sepia":["",X,F,V]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",F,V]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[X,"initial",F,V]}],ease:[{ease:["linear","initial",S,F,V]}],delay:[{delay:[X,F,V]}],animate:[{animate:["none",M,F,V]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,F,V]}],"perspective-origin":[{"perspective-origin":$()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":["scale-3d"],skew:[{skew:we()}],"skew-x":[{"skew-x":we()}],"skew-y":[{"skew-y":we()}],transform:[{transform:[F,V,"","none","gpu","cpu"]}],"transform-origin":[{origin:$()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ke()}],"translate-x":[{"translate-x":ke()}],"translate-y":[{"translate-y":ke()}],"translate-z":[{"translate-z":ke()}],"translate-none":["translate-none"],accent:[{accent:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"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",F,V]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",F,V]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[X,Ht,et,Is]}],stroke:[{stroke:["none",...E()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Kh=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:s={},override:o={}})=>(Wt(e,"cacheSize",t),Wt(e,"prefix",n),Wt(e,"experimentalParseClassName",r),Vn(e.theme,o.theme),Vn(e.classGroups,o.classGroups),Vn(e.conflictingClassGroups,o.conflictingClassGroups),Vn(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),Wt(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),Fn(e.theme,s.theme),Fn(e.classGroups,s.classGroups),Fn(e.conflictingClassGroups,s.conflictingClassGroups),Fn(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),al(e,s,"orderSensitiveModifiers"),e),Wt=(e,t,n)=>{n!==void 0&&(e[t]=n)},Vn=(e,t)=>{if(t)for(const n in t)Wt(e,n,t[n])},Fn=(e,t)=>{if(t)for(const n in t)al(e,t,n)},al=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},Hh=(e,...t)=>typeof e=="function"?Ns(Ls,e,...t):Ns(()=>Kh(Ls(),e),...t),Wh=Ns(Ls);var qh=e=>fe(e)?Wh:Hh({...e,extend:{theme:e.theme,classGroups:e.classGroups,conflictingClassGroupModifiers:e.conflictingClassGroupModifiers,conflictingClassGroups:e.conflictingClassGroups,...e.extend}}),Yh={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},Rn=(...e)=>{let t=[];ll(e,t);let n="";for(let r=0;r<t.length;r++)t[r]&&(n&&(n+=" "),n+=t[r]);return n||void 0};function ll(e,t){for(let n=0;n<e.length;n++){let r=e[n];Array.isArray(r)?ll(r,t):r&&t.push(r)}}var js=null,Ds={},Vs=!1,Un=(...e)=>t=>{let n=Rn(e);return!n||!t.twMerge?n:((!js||Vs)&&(Vs=!1,js=qh(Ds)),js(n)||void 0)},cl=(e,t)=>{for(let n in t)n in e?e[n]=Rn(e[n],t[n]):e[n]=t[n];return e},Xh=(e,t)=>{let{extend:n=null,slots:r={},variants:s={},compoundVariants:o=[],compoundSlots:i=[],defaultVariants:a={}}=e,c={...Yh,...t},u=n?.base?Rn(n.base,e?.base):e?.base,l=n?.variants&&!fe(n.variants)?Ka(s,n.variants):s,d=n?.defaultVariants&&!fe(n.defaultVariants)?{...n.defaultVariants,...a}:a;!fe(c.twMergeConfig)&&!fh(c.twMergeConfig,Ds)&&(Vs=!0,Ds=c.twMergeConfig);let m=fe(n?.slots),w=fe(r)?{}:{base:Rn(e?.base,m&&n?.base),...r},p=m?w:cl({...n?.slots},fe(w)?{base:e?.base}:w),v=fe(n?.compoundVariants)?o:Ga(n?.compoundVariants,o),b=M=>{if(fe(l)&&fe(r)&&m)return Un(u,M?.class,M?.className)(c);if(v&&!Array.isArray(v))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof v}`);if(i&&!Array.isArray(i))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof i}`);let A=(P,D,T=[],L)=>{let g=T;if(typeof D=="string"){let _=Ha(D).split(" ");for(let E=0;E<_.length;E++)g.push(`${P}:${_[E]}`)}else if(Array.isArray(D))for(let _=0;_<D.length;_++)g.push(`${P}:${D[_]}`);else if(typeof D=="object"&&typeof L=="string"&&L in D){let _=D[L];if(_&&typeof _=="string"){let E=Ha(_).split(" "),B=[];for(let C=0;C<E.length;C++)B.push(`${P}:${E[C]}`);g[L]=g[L]?g[L].concat(B):B}else if(Array.isArray(_)&&_.length>0){let E=[];for(let B=0;B<_.length;B++)E.push(`${P}:${_[B]}`);g[L]=E}}return g},O=(P,D=l,T=null,L=null)=>{let g=D[P];if(!g||fe(g))return null;let _=L?.[P]??M?.[P];if(_===null)return null;let E=Ba(_),B=Array.isArray(c.responsiveVariants)&&c.responsiveVariants.length>0||c.responsiveVariants===!0,C=d?.[P],j=[];if(typeof E=="object"&&B)for(let[Y,Z]of Object.entries(E)){let ie=g[Z];if(Y==="initial"){C=Z;continue}Array.isArray(c.responsiveVariants)&&!c.responsiveVariants.includes(Y)||(j=A(Y,ie,j,T))}let z=E!=null&&typeof E!="object"?E:Ba(C),U=g[z||"false"];return typeof j=="object"&&typeof T=="string"&&j[T]?cl(j,U):j.length>0?(j.push(U),T==="base"?j.join(" "):j):U},$=()=>{if(!l)return null;let P=Object.keys(l),D=[];for(let T=0;T<P.length;T++){let L=O(P[T],l);L&&D.push(L)}return D},I=(P,D)=>{if(!l||typeof l!="object")return null;let T=[];for(let L in l){let g=O(L,l,P,D),_=P==="base"&&typeof g=="string"?g:g&&g[P];_&&T.push(_)}return T},N={};for(let P in M){let D=M[P];D!==void 0&&(N[P]=D)}let k=(P,D)=>{let T=typeof M?.[P]=="object"?{[P]:M[P]?.initial}:{};return{...d,...N,...T,...D}},R=(P=[],D)=>{let T=[],L=P.length;for(let g=0;g<L;g++){let{class:_,className:E,...B}=P[g],C=!0,j=k(null,D);for(let z in B){let U=B[z],Y=j[z];if(Array.isArray(U)){if(!U.includes(Y)){C=!1;break}}else{if((U==null||U===!1)&&(Y==null||Y===!1))continue;if(Y!==U){C=!1;break}}}C&&(_&&T.push(_),E&&T.push(E))}return T},q=P=>{let D=R(v,P);if(!Array.isArray(D))return D;let T={},L=Un;for(let g=0;g<D.length;g++){let _=D[g];if(typeof _=="string")T.base=L(T.base,_)(c);else if(typeof _=="object")for(let E in _)T[E]=L(T[E],_[E])(c)}return T},h=P=>{if(i.length<1)return null;let D={},T=k(null,P);for(let L=0;L<i.length;L++){let{slots:g=[],class:_,className:E,...B}=i[L];if(!fe(B)){let C=!0;for(let j in B){let z=T[j],U=B[j];if(z===void 0||(Array.isArray(U)?!U.includes(z):U!==z)){C=!1;break}}if(!C)continue}for(let C=0;C<g.length;C++){let j=g[C];D[j]||(D[j]=[]),D[j].push([_,E])}}return D};if(!fe(r)||!m){let P={};if(typeof p=="object"&&!fe(p)){let D=Un;for(let T in p)P[T]=L=>{let g=q(L),_=h(L);return D(p[T],I(T,L),g?g[T]:void 0,_?_[T]:void 0,L?.class,L?.className)(c)}}return P}return Un(u,$(),R(v),M?.class,M?.className)(c)},S=()=>{if(!(!l||typeof l!="object"))return Object.keys(l)};return b.variantKeys=S(),b.extend=n,b.base=u,b.slots=p,b.variants=l,b.defaultVariants=d,b.compoundSlots=i,b.compoundVariants=v,b},Re=(e,t)=>{var n,r,s;return Xh(e,{...t,twMerge:(n=t?.twMerge)!=null?n:!0,twMergeConfig:{...t?.twMergeConfig,theme:{...(r=t?.twMergeConfig)==null?void 0:r.theme,...Ua.theme},classGroups:{...(s=t?.twMergeConfig)==null?void 0:s.classGroups,...Ua.classGroups}}})},ul=Re({slots:{base:"relative inline-flex flex-col gap-2 items-center justify-center",wrapper:"relative flex",label:"text-foreground dark:text-foreground-dark font-regular",circle1:"absolute w-full h-full rounded-full",circle2:"absolute w-full h-full rounded-full",dots:"relative rounded-full mx-auto",spinnerBars:["absolute","animate-fade-out","rounded-full","w-[25%]","h-[8%]","left-[calc(37.5%)]","top-[calc(46%)]","spinner-bar-animation"]},variants:{size:{sm:{wrapper:"w-5 h-5",circle1:"border-2",circle2:"border-2",dots:"size-1",label:"text-small"},md:{wrapper:"w-8 h-8",circle1:"border-3",circle2:"border-3",dots:"size-1.5",label:"text-medium"},lg:{wrapper:"w-10 h-10",circle1:"border-3",circle2:"border-3",dots:"size-2",label:"text-large"}},color:{current:{circle1:"border-b-current",circle2:"border-b-current",dots:"bg-current",spinnerBars:"bg-current"},white:{circle1:"border-b-white",circle2:"border-b-white",dots:"bg-white",spinnerBars:"bg-white"},default:{circle1:"border-b-default",circle2:"border-b-default",dots:"bg-default",spinnerBars:"bg-default"},primary:{circle1:"border-b-primary",circle2:"border-b-primary",dots:"bg-primary",spinnerBars:"bg-primary"},secondary:{circle1:"border-b-secondary",circle2:"border-b-secondary",dots:"bg-secondary",spinnerBars:"bg-secondary"},success:{circle1:"border-b-success",circle2:"border-b-success",dots:"bg-success",spinnerBars:"bg-success"},warning:{circle1:"border-b-warning",circle2:"border-b-warning",dots:"bg-warning",spinnerBars:"bg-warning"},danger:{circle1:"border-b-danger",circle2:"border-b-danger",dots:"bg-danger",spinnerBars:"bg-danger"}},labelColor:{foreground:{label:"text-foreground"},primary:{label:"text-primary"},secondary:{label:"text-secondary"},success:{label:"text-success"},warning:{label:"text-warning"},danger:{label:"text-danger"}},variant:{default:{circle1:["animate-spinner-ease-spin","border-solid","border-t-transparent","border-l-transparent","border-r-transparent"],circle2:["opacity-75","animate-spinner-linear-spin","border-dotted","border-t-transparent","border-l-transparent","border-r-transparent"]},gradient:{circle1:["border-0","bg-gradient-to-b","from-transparent","via-transparent","to-primary","animate-spinner-linear-spin","[animation-duration:1s]","[-webkit-mask:radial-gradient(closest-side,rgba(0,0,0,0.0)calc(100%-3px),rgba(0,0,0,1)calc(100%-3px))]"],circle2:["hidden"]},wave:{wrapper:"translate-y-3/4",dots:["animate-sway","spinner-dot-animation"]},dots:{wrapper:"translate-y-2/4",dots:["animate-blink","spinner-dot-blink-animation"]},spinner:{},simple:{wrapper:"text-foreground h-5 w-5 animate-spin",circle1:"opacity-25",circle2:"opacity-75"}}},defaultVariants:{size:"md",color:"primary",labelColor:"foreground",variant:"default"},compoundVariants:[{variant:"gradient",color:"current",class:{circle1:"to-current"}},{variant:"gradient",color:"white",class:{circle1:"to-white"}},{variant:"gradient",color:"default",class:{circle1:"to-default"}},{variant:"gradient",color:"primary",class:{circle1:"to-primary"}},{variant:"gradient",color:"secondary",class:{circle1:"to-secondary"}},{variant:"gradient",color:"success",class:{circle1:"to-success"}},{variant:"gradient",color:"warning",class:{circle1:"to-warning"}},{variant:"gradient",color:"danger",class:{circle1:"to-danger"}},{variant:"wave",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"wave",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"wave",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"dots",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"dots",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"dots",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",size:"sm",class:{wrapper:"w-5 h-5"}},{variant:"simple",size:"md",class:{wrapper:"w-8 h-8"}},{variant:"simple",size:"lg",class:{wrapper:"w-12 h-12"}},{variant:"simple",color:"current",class:{wrapper:"text-current"}},{variant:"simple",color:"white",class:{wrapper:"text-white"}},{variant:"simple",color:"default",class:{wrapper:"text-default"}},{variant:"simple",color:"primary",class:{wrapper:"text-primary"}},{variant:"simple",color:"secondary",class:{wrapper:"text-secondary"}},{variant:"simple",color:"success",class:{wrapper:"text-success"}},{variant:"simple",color:"warning",class:{wrapper:"text-warning"}},{variant:"simple",color:"danger",class:{wrapper:"text-danger"}}]}),Fs=["outline-solid outline-transparent","data-[focus-visible=true]:z-10","data-[focus-visible=true]:outline-2","data-[focus-visible=true]:outline-focus","data-[focus-visible=true]:outline-offset-2"],Rs=["absolute","top-1/2","left-1/2","-translate-x-1/2","-translate-y-1/2"],Pt={default:["[&+.border-medium.border-default]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],primary:["[&+.border-medium.border-primary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],secondary:["[&+.border-medium.border-secondary]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],success:["[&+.border-medium.border-success]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],warning:["[&+.border-medium.border-warning]:ms-[calc(var(--heroui-border-width-medium)*-1)]"],danger:["[&+.border-medium.border-danger]:ms-[calc(var(--heroui-border-width-medium)*-1)]"]},dl=Re({slots:{base:"flex flex-col gap-2 w-full",label:"",labelWrapper:"flex justify-between",value:"",track:"z-0 relative bg-default-300/50 overflow-hidden rtl:rotate-180",indicator:"h-full"},variants:{color:{default:{indicator:"bg-default-400"},primary:{indicator:"bg-primary"},secondary:{indicator:"bg-secondary"},success:{indicator:"bg-success"},warning:{indicator:"bg-warning"},danger:{indicator:"bg-danger"}},size:{sm:{label:"text-small",value:"text-small",track:"h-1"},md:{label:"text-medium",value:"text-medium",track:"h-3"},lg:{label:"text-large",value:"text-large",track:"h-5"}},radius:{none:{track:"rounded-none",indicator:"rounded-none"},sm:{track:"rounded-small",indicator:"rounded-small"},md:{track:"rounded-medium",indicator:"rounded-medium"},lg:{track:"rounded-large",indicator:"rounded-large"},full:{track:"rounded-full",indicator:"rounded-full"}},isStriped:{true:{indicator:"bg-stripe-gradient-default bg-stripe-size"}},isIndeterminate:{true:{indicator:["absolute","w-full","origin-left","animate-indeterminate-bar"]}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-transform !duration-500"}}},defaultVariants:{color:"primary",size:"md",radius:"full",isStriped:!1,isIndeterminate:!1,isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{indicator:"!transition-none motion-reduce:transition-none"}},{color:"primary",isStriped:!0,class:{indicator:"bg-stripe-gradient-primary bg-stripe-size"}},{color:"secondary",isStriped:!0,class:{indicator:"bg-stripe-gradient-secondary bg-stripe-size"}},{color:"success",isStriped:!0,class:{indicator:"bg-stripe-gradient-success bg-stripe-size"}},{color:"warning",isStriped:!0,class:{indicator:"bg-stripe-gradient-warning bg-stripe-size"}},{color:"danger",isStriped:!0,class:{indicator:"bg-stripe-gradient-danger bg-stripe-size"}}]},{twMerge:!0});Re({slots:{base:"flex flex-col justify-center gap-1 max-w-fit items-center",label:"",svgWrapper:"relative block",svg:"z-0 relative overflow-hidden",track:"h-full stroke-default-300/50",indicator:"h-full stroke-current",value:"absolute font-normal inset-0 flex items-center justify-center"},variants:{color:{default:{svg:"text-default-400"},primary:{svg:"text-primary"},secondary:{svg:"text-secondary"},success:{svg:"text-success"},warning:{svg:"text-warning"},danger:{svg:"text-danger"}},size:{sm:{svg:"w-8 h-8",label:"text-small",value:"text-[0.5rem]"},md:{svg:"w-10 h-10",label:"text-small",value:"text-[0.55rem]"},lg:{svg:"w-12 h-12",label:"text-medium",value:"text-[0.6rem]"}},isIndeterminate:{true:{svg:"animate-spinner-ease-spin"}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:{},false:{indicator:"transition-all !duration-500"}}},defaultVariants:{color:"primary",size:"md",isDisabled:!1},compoundVariants:[{disableAnimation:!0,isIndeterminate:!1,class:{svg:"!transition-none motion-reduce:transition-none"}}]});var Jh=Re({base:["z-0","group","relative","inline-flex","items-center","justify-center","box-border","appearance-none","outline-solid outline-transparent","select-none","whitespace-nowrap","min-w-max","font-normal","subpixel-antialiased","overflow-hidden","tap-highlight-transparent","transform-gpu data-[pressed=true]:scale-[0.97]","cursor-pointer",...Fs],variants:{variant:{solid:"",bordered:"border-medium bg-transparent",light:"bg-transparent",flat:"",faded:"border-medium",shadow:"",ghost:"border-medium bg-transparent"},size:{sm:"px-3 min-w-16 h-8 text-tiny gap-2 rounded-small",md:"px-4 min-w-20 h-10 text-small gap-2 rounded-medium",lg:"px-6 min-w-24 h-12 text-medium gap-3 rounded-large"},color:{default:"",primary:"",secondary:"",success:"",warning:"",danger:""},radius:{none:"rounded-none",sm:"rounded-small",md:"rounded-medium",lg:"rounded-large",full:"rounded-full"},fullWidth:{true:"w-full"},isDisabled:{true:"opacity-disabled pointer-events-none"},isInGroup:{true:"[&:not(:first-child):not(:last-child)]:rounded-none"},isIconOnly:{true:"px-0 !gap-0",false:"[&>svg]:max-w-[theme(spacing.8)]"},disableAnimation:{true:"!transition-none data-[pressed=true]:scale-100",false:"transition-transform-colors-opacity motion-reduce:transition-none"}},defaultVariants:{size:"md",variant:"solid",color:"default",fullWidth:!1,isDisabled:!1,isInGroup:!1},compoundVariants:[{variant:"solid",color:"default",class:G.solid.default},{variant:"solid",color:"primary",class:G.solid.primary},{variant:"solid",color:"secondary",class:G.solid.secondary},{variant:"solid",color:"success",class:G.solid.success},{variant:"solid",color:"warning",class:G.solid.warning},{variant:"solid",color:"danger",class:G.solid.danger},{variant:"shadow",color:"default",class:G.shadow.default},{variant:"shadow",color:"primary",class:G.shadow.primary},{variant:"shadow",color:"secondary",class:G.shadow.secondary},{variant:"shadow",color:"success",class:G.shadow.success},{variant:"shadow",color:"warning",class:G.shadow.warning},{variant:"shadow",color:"danger",class:G.shadow.danger},{variant:"bordered",color:"default",class:G.bordered.default},{variant:"bordered",color:"primary",class:G.bordered.primary},{variant:"bordered",color:"secondary",class:G.bordered.secondary},{variant:"bordered",color:"success",class:G.bordered.success},{variant:"bordered",color:"warning",class:G.bordered.warning},{variant:"bordered",color:"danger",class:G.bordered.danger},{variant:"flat",color:"default",class:G.flat.default},{variant:"flat",color:"primary",class:G.flat.primary},{variant:"flat",color:"secondary",class:G.flat.secondary},{variant:"flat",color:"success",class:G.flat.success},{variant:"flat",color:"warning",class:G.flat.warning},{variant:"flat",color:"danger",class:G.flat.danger},{variant:"faded",color:"default",class:G.faded.default},{variant:"faded",color:"primary",class:G.faded.primary},{variant:"faded",color:"secondary",class:G.faded.secondary},{variant:"faded",color:"success",class:G.faded.success},{variant:"faded",color:"warning",class:G.faded.warning},{variant:"faded",color:"danger",class:G.faded.danger},{variant:"light",color:"default",class:[G.light.default,"data-[hover=true]:bg-default/40"]},{variant:"light",color:"primary",class:[G.light.primary,"data-[hover=true]:bg-primary/20"]},{variant:"light",color:"secondary",class:[G.light.secondary,"data-[hover=true]:bg-secondary/20"]},{variant:"light",color:"success",class:[G.light.success,"data-[hover=true]:bg-success/20"]},{variant:"light",color:"warning",class:[G.light.warning,"data-[hover=true]:bg-warning/20"]},{variant:"light",color:"danger",class:[G.light.danger,"data-[hover=true]:bg-danger/20"]},{variant:"ghost",color:"default",class:[G.ghost.default,"data-[hover=true]:!bg-default"]},{variant:"ghost",color:"primary",class:[G.ghost.primary,"data-[hover=true]:!bg-primary data-[hover=true]:!text-primary-foreground"]},{variant:"ghost",color:"secondary",class:[G.ghost.secondary,"data-[hover=true]:!bg-secondary data-[hover=true]:!text-secondary-foreground"]},{variant:"ghost",color:"success",class:[G.ghost.success,"data-[hover=true]:!bg-success data-[hover=true]:!text-success-foreground"]},{variant:"ghost",color:"warning",class:[G.ghost.warning,"data-[hover=true]:!bg-warning data-[hover=true]:!text-warning-foreground"]},{variant:"ghost",color:"danger",class:[G.ghost.danger,"data-[hover=true]:!bg-danger data-[hover=true]:!text-danger-foreground"]},{isInGroup:!0,class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,size:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,size:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,isRounded:!0,class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,radius:"none",class:"rounded-none first:rounded-s-none last:rounded-e-none"},{isInGroup:!0,radius:"sm",class:"rounded-none first:rounded-s-small last:rounded-e-small"},{isInGroup:!0,radius:"md",class:"rounded-none first:rounded-s-medium last:rounded-e-medium"},{isInGroup:!0,radius:"lg",class:"rounded-none first:rounded-s-large last:rounded-e-large"},{isInGroup:!0,radius:"full",class:"rounded-none first:rounded-s-full last:rounded-e-full"},{isInGroup:!0,variant:["ghost","bordered"],color:"default",className:Pt.default},{isInGroup:!0,variant:["ghost","bordered"],color:"primary",className:Pt.primary},{isInGroup:!0,variant:["ghost","bordered"],color:"secondary",className:Pt.secondary},{isInGroup:!0,variant:["ghost","bordered"],color:"success",className:Pt.success},{isInGroup:!0,variant:["ghost","bordered"],color:"warning",className:Pt.warning},{isInGroup:!0,variant:["ghost","bordered"],color:"danger",className:Pt.danger},{isIconOnly:!0,size:"sm",class:"min-w-8 w-8 h-8"},{isIconOnly:!0,size:"md",class:"min-w-10 w-10 h-10"},{isIconOnly:!0,size:"lg",class:"min-w-12 w-12 h-12"},{variant:["solid","faded","flat","bordered","shadow"],class:"data-[hover=true]:opacity-hover"}]});Re({base:"inline-flex items-center justify-center h-auto",variants:{fullWidth:{true:"w-full"}},defaultVariants:{fullWidth:!1}});var fl=Re({slots:{base:["flex","flex-col","relative","overflow-hidden","h-auto","outline-solid outline-transparent","text-foreground","box-border","bg-content1",...Fs],header:["flex","p-3","z-10","w-full","justify-start","items-center","shrink-0","overflow-inherit","color-inherit","subpixel-antialiased"],body:["relative","flex","flex-1","w-full","p-3","flex-auto","flex-col","place-content-inherit","align-items-inherit","h-auto","break-words","text-left","overflow-y-auto","subpixel-antialiased"],footer:["p-3","h-auto","flex","w-full","items-center","overflow-hidden","color-inherit","subpixel-antialiased"]},variants:{shadow:{none:{base:"shadow-none"},sm:{base:"shadow-small"},md:{base:"shadow-medium"},lg:{base:"shadow-large"}},radius:{none:{base:"rounded-none",header:"rounded-none",footer:"rounded-none"},sm:{base:"rounded-small",header:"rounded-t-small",footer:"rounded-b-small"},md:{base:"rounded-medium",header:"rounded-t-medium",footer:"rounded-b-medium"},lg:{base:"rounded-large",header:"rounded-t-large",footer:"rounded-b-large"}},fullWidth:{true:{base:"w-full"}},isHoverable:{true:{base:"data-[hover=true]:bg-content2 dark:data-[hover=true]:bg-content2"}},isPressable:{true:{base:"cursor-pointer"}},isBlurred:{true:{base:["bg-background/80","dark:bg-background/20","backdrop-blur-md","backdrop-saturate-150"]}},isFooterBlurred:{true:{footer:["bg-background/10","backdrop-blur","backdrop-saturate-150"]}},isDisabled:{true:{base:"opacity-disabled cursor-not-allowed"}},disableAnimation:{true:"",false:{base:"transition-transform-background motion-reduce:transition-none"}}},compoundVariants:[{isPressable:!0,class:"data-[pressed=true]:scale-[0.97] tap-highlight-transparent"}],defaultVariants:{radius:"lg",shadow:"md",fullWidth:!1,isHoverable:!1,isPressable:!1,isDisabled:!1,isFooterBlurred:!1}}),Zh=Re({slots:{base:["flex","relative","justify-center","items-center","box-border","overflow-hidden","align-middle","text-white","z-0",...Fs],img:["flex","object-cover","w-full","h-full","transition-opacity","!duration-500","opacity-0","data-[loaded=true]:opacity-100"],fallback:[...Rs,"flex","items-center","justify-center"],name:[...Rs,"font-normal","text-center","text-inherit"],icon:[...Rs,"flex","items-center","justify-center","text-inherit","w-full","h-full"]},variants:{size:{sm:{base:"w-8 h-8 text-tiny"},md:{base:"w-10 h-10 text-tiny"},lg:{base:"w-14 h-14 text-small"}},color:{default:{base:G.solid.default},primary:{base:G.solid.primary},secondary:{base:G.solid.secondary},success:{base:G.solid.success},warning:{base:G.solid.warning},danger:{base:G.solid.danger}},radius:{none:{base:"rounded-none"},sm:{base:"rounded-small"},md:{base:"rounded-medium"},lg:{base:"rounded-large"},full:{base:"rounded-full"}},isBordered:{true:{base:"ring-2 ring-offset-2 ring-offset-background dark:ring-offset-background-dark"}},isDisabled:{true:{base:"opacity-disabled"}},isInGroup:{true:{base:["-ms-2 data-[hover=true]:-translate-x-3 rtl:data-[hover=true]:translate-x-3 transition-transform","data-[focus-visible=true]:-translate-x-3 rtl:data-[focus-visible=true]:translate-x-3"]}},isInGridGroup:{true:{base:"m-0 data-[hover=true]:translate-x-0"}},disableAnimation:{true:{base:"transition-none",img:"transition-none"},false:{}}},defaultVariants:{size:"md",color:"default",radius:"full"},compoundVariants:[{color:"default",isBordered:!0,class:{base:"ring-default"}},{color:"primary",isBordered:!0,class:{base:"ring-primary"}},{color:"secondary",isBordered:!0,class:{base:"ring-secondary"}},{color:"success",isBordered:!0,class:{base:"ring-success"}},{color:"warning",isBordered:!0,class:{base:"ring-warning"}},{color:"danger",isBordered:!0,class:{base:"ring-danger"}}]});Re({slots:{base:"flex items-center justify-center h-auto w-max",count:"hover:-translate-x-0"},variants:{isGrid:{true:"inline-grid grid-cols-4 gap-3"}}});function Qh(e={}){const{rerender:t=!1,delay:n=0}=e,r=y.useRef(!1),[s,o]=y.useState(!1);return y.useEffect(()=>{r.current=!0;let i=null;return t&&(n>0?i=setTimeout(()=>{o(!0)},n):o(!0)),()=>{r.current=!1,t&&o(!1),i&&clearTimeout(i)}},[t]),[y.useCallback(()=>r.current,[]),s]}function eg(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":s,labelElementType:o="label"}=e;t=ir(t);let i=ir(),a={};n?(r=r?`${i} ${r}`:i,a={id:i,htmlFor:o==="label"?t:void 0}):!r&&!s&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let c=$u({id:t,"aria-label":s,"aria-labelledby":r});return{labelProps:a,fieldProps:c}}function tg(e){let{value:t=0,minValue:n=0,maxValue:r=100,valueLabel:s,isIndeterminate:o,formatOptions:i={style:"percent"}}=e,a=yo(e,{labelable:!0}),{labelProps:c,fieldProps:u}=eg({...e,labelElementType:"span"});t=Du(t,n,r);let l=(t-n)/(r-n),d=Uu(i);if(!o&&!s){let m=i.style==="percent"?l:t;s=d.format(m)}return{progressBarProps:Ge(a,{...u,"aria-valuenow":o?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":o?void 0:s,role:"progressbar"}),labelProps:c}}function ng(e){var t,n;const r=Ot(),[s,o]=ks(e,dl.variantKeys),{ref:i,as:a,id:c,className:u,classNames:l,label:d,valueLabel:m,value:w=0,minValue:p=0,maxValue:v=100,showValueLabel:b=!1,formatOptions:S={style:"percent"},...M}=s,A=a||"div",O=ze(i),$=Oe(l?.base,u),[,I]=Qh({rerender:!0,delay:100}),N=e.isIndeterminate,k=(n=(t=e.disableAnimation)!=null?t:r?.disableAnimation)!=null?n:!1,{progressBarProps:R,labelProps:q}=tg({id:c,label:d,value:w,minValue:p,maxValue:v,valueLabel:m,formatOptions:S,isIndeterminate:N,"aria-labelledby":e["aria-labelledby"],"aria-label":e["aria-label"]}),h=y.useMemo(()=>dl({...o,disableAnimation:k}),[tr(o),k]),P=k?!0:I,D=y.useMemo(()=>N||!P?void 0:Fc((w-p)/(v-p)*100),[P,N,w,p,v]),T=y.useCallback((g={})=>({ref:O,"data-indeterminate":ae(N),"data-disabled":ae(e.isDisabled),className:h.base({class:$}),...ot(R,M,g)}),[O,h,N,e.isDisabled,$,R,M]),L=y.useCallback((g={})=>({className:h.label({class:l?.label}),...ot(q,g)}),[h,l,q]);return{Component:A,domRef:O,slots:h,classNames:l,label:d,percentage:D,showValueLabel:b,getProgressBarProps:T,getLabelProps:L}}var pl=Qe((e,t)=>{const{Component:n,slots:r,classNames:s,label:o,percentage:i,showValueLabel:a,getProgressBarProps:c,getLabelProps:u}=ng({...e,ref:t}),l=c(),d=o||a;return f.jsxs(n,{...l,children:[d?f.jsxs("div",{className:r.labelWrapper({class:s?.labelWrapper}),children:[o&&f.jsx("span",{...u(),children:o}),a&&f.jsx("span",{className:r.value({class:s?.value}),children:l["aria-valuetext"]})]}):null,f.jsx("div",{className:r.track({class:s?.track}),children:f.jsx("div",{className:r.indicator({class:s?.indicator}),style:{transform:`translateX(-${100-(i||0)}%)`}})})]})});pl.displayName="HeroUI.Progress";var ml=pl,[rg,hl]=rn({name:"CardContext",strict:!0,errorMessage:"useCardContext: `context` is undefined. Seems you forgot to wrap component within <Card />"}),gl=Qe((e,t)=>{var n;const{as:r,className:s,children:o,...i}=e,a=r||"div",c=ze(t),{slots:u,classNames:l}=hl(),d=Oe(l?.body,s);return f.jsx(a,{ref:c,className:(n=u.body)==null?void 0:n.call(u,{class:d}),...i,children:o})});gl.displayName="HeroUI.CardBody";var bl=gl,yl=Qe((e,t)=>{var n;const{as:r,className:s,children:o,...i}=e,a=r||"div",c=ze(t),{slots:u,classNames:l}=hl(),d=Oe(l?.footer,s);return f.jsx(a,{ref:c,className:(n=u.footer)==null?void 0:n.call(u,{class:d}),...i,children:o})});yl.displayName="HeroUI.CardFooter";var sg=yl;function vl(e,t){let{elementType:n="button",isDisabled:r,onPress:s,onPressStart:o,onPressEnd:i,onPressUp:a,onPressChange:c,preventFocusOnPress:u,allowFocusWhenDisabled:l,onClick:d,href:m,target:w,rel:p,type:v="button",allowTextSelectionOnPress:b}=e,S;n==="button"?S={type:v,disabled:r}:S={role:"button",href:n==="a"&&!r?m:void 0,target:n==="a"?w:void 0,type:n==="input"?v:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?p:void 0};let{pressProps:M,isPressed:A}=Om({onClick:d,onPressStart:o,onPressEnd:i,onPressUp:a,onPressChange:c,onPress:s,isDisabled:r,preventFocusOnPress:u,allowTextSelectionOnPress:b,ref:t}),{focusableProps:O}=Xm(e,t);l&&(O.tabIndex=r?-1:O.tabIndex);let $=Ge(O,M,yo(e,{labelable:!0}));return{isPressed:A,buttonProps:Ge(S,$,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}var og=()=>Promise.resolve().then(()=>Dy).then(e=>e.default),wl=e=>{const{ripples:t=[],motionProps:n,color:r="currentColor",style:s,onClear:o}=e;return f.jsx(f.Fragment,{children:t.map(i=>{const a=Vc(.01*i.size,.2,i.size>100?.75:.5);return f.jsx(Zf,{features:og,children:f.jsx(Jf,{mode:"popLayout",children:f.jsx(Mp.span,{animate:{transform:"scale(2)",opacity:0},className:"heroui-ripple",exit:{opacity:0},initial:{transform:"scale(0)",opacity:.35},style:{position:"absolute",backgroundColor:r,borderRadius:"100%",transformOrigin:"center",pointerEvents:"none",overflow:"hidden",inset:0,zIndex:0,top:i.y,left:i.x,width:`${i.size}px`,height:`${i.size}px`,...s},transition:{duration:a},onAnimationComplete:()=>{o(i.key)},...n})})},i.key)})})};wl.displayName="HeroUI.Ripple";var xl=wl;function Tl(e={}){const[t,n]=y.useState([]),r=y.useCallback(o=>{const i=o.target,a=Math.max(i.clientWidth,i.clientHeight);n(c=>[...c,{key:Dc(c.length.toString()),size:a,x:o.x-a/2,y:o.y-a/2}])},[]),s=y.useCallback(o=>{n(i=>i.filter(a=>a.key!==o))},[]);return{ripples:t,onClear:s,onPress:r,...e}}function ig(e){var t,n,r,s;const o=Ot(),[i,a]=ks(e,fl.variantKeys),{ref:c,as:u,children:l,onClick:d,onPress:m,autoFocus:w,className:p,classNames:v,allowTextSelectionOnPress:b=!0,...S}=i,M=ze(c),A=u||(e.isPressable?"button":"div"),O=typeof A=="string",$=(n=(t=e.disableAnimation)!=null?t:o?.disableAnimation)!=null?n:!1,I=(s=(r=e.disableRipple)!=null?r:o?.disableRipple)!=null?s:!1,N=Oe(v?.base,p),{onClear:k,onPress:R,ripples:q}=Tl(),h=y.useCallback(U=>{I||$||M.current&&R(U)},[I,$,M,R]),{buttonProps:P,isPressed:D}=vl({onPress:nr(m,h),elementType:u,isDisabled:!e.isPressable,onClick:d,allowTextSelectionOnPress:b,...S},M),{hoverProps:T,isHovered:L}=Cs({isDisabled:!e.isHoverable,...S}),{isFocusVisible:g,isFocused:_,focusProps:E}=Ps({autoFocus:w}),B=y.useMemo(()=>fl({...a,disableAnimation:$}),[tr(a),$]),C=y.useMemo(()=>({slots:B,classNames:v,disableAnimation:$,isDisabled:e.isDisabled,isFooterBlurred:e.isFooterBlurred,fullWidth:e.fullWidth}),[B,v,e.isDisabled,e.isFooterBlurred,$,e.fullWidth]),j=y.useCallback((U={})=>({ref:M,className:B.base({class:N}),tabIndex:e.isPressable?0:-1,"data-hover":ae(L),"data-pressed":ae(D),"data-focus":ae(_),"data-focus-visible":ae(g),"data-disabled":ae(e.isDisabled),...ot(e.isPressable?{...P,...E,role:"button"}:{},e.isHoverable?T:{},Nt(S,{enabled:O}),Nt(U))}),[M,B,N,O,e.isPressable,e.isHoverable,e.isDisabled,L,D,g,P,E,T,S]),z=y.useCallback(()=>({ripples:q,onClear:k}),[q,k]);return{context:C,domRef:M,Component:A,classNames:v,children:l,isHovered:L,isPressed:D,disableAnimation:$,isPressable:e.isPressable,isHoverable:e.isHoverable,disableRipple:I,handlePress:h,isFocusVisible:g,getCardProps:j,getRippleProps:z}}var El=Qe((e,t)=>{const{children:n,context:r,Component:s,isPressable:o,disableAnimation:i,disableRipple:a,getCardProps:c,getRippleProps:u}=ig({...e,ref:t});return f.jsxs(s,{...c(),children:[f.jsx(rg,{value:r,children:n}),o&&!i&&!a&&f.jsx(xl,{...u()})]})});El.displayName="HeroUI.Card";var Sl=El;/**
30
+ <%s key={someKey} {...props} />`,xt,de,Mo,de),Hn[de+xt]=!0}}return a===s?To(B):Uo(B),B}}function Po(a,_,b){return Wn(a,_,b,!0)}function Io(a,_,b){return Wn(a,_,b,!1)}var Lo=Io,Do=Po;we.Fragment=s,we.jsx=Lo,we.jsxs=Do})()),we}var Et;function Kn(){return Et||(Et=1,process.env.NODE_ENV==="production"?Oe.exports=Gn():Oe.exports=Vn()),Oe.exports}var c=Kn();const St=({progress:e,variant:t="solid",size:n="md",radius:s="md",children:r,className:i="",loading:o,...l})=>{const f=e!==void 0?(h=>h===0?"button--primary":h===100?"button--success":"button--secondary")(e):"button--primary",u=["button",`button--${n}`,`button--${t}`,`button--radius-${s}`,f,o&&"button--loading",i].filter(Boolean).join(" ");return c.jsx("button",{type:"button",className:u,"data-progress":e,disabled:o||l.disabled,...l,children:o?"加载中...":r})};/**
37
31
  * @license lucide-react v0.541.0 - ISC
38
32
  *
39
33
  * This source code is licensed under the ISC license.
40
34
  * See the LICENSE file in the root directory of this source tree.
41
- */const ag=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),lg=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Cl=e=>{const t=lg(e);return t.charAt(0).toUpperCase()+t.slice(1)},Pl=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),cg=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
35
+ */const Yn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Xn=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,s)=>s?s.toUpperCase():n.toLowerCase()),At=e=>{const t=Xn(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ct=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim(),Zn=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
42
36
  * @license lucide-react v0.541.0 - ISC
43
37
  *
44
38
  * This source code is licensed under the ISC license.
45
39
  * See the LICENSE file in the root directory of this source tree.
46
- */var ug={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
40
+ */var Qn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
47
41
  * @license lucide-react v0.541.0 - ISC
48
42
  *
49
43
  * This source code is licensed under the ISC license.
50
44
  * See the LICENSE file in the root directory of this source tree.
51
- */const dg=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:o,iconNode:i,...a},c)=>y.createElement("svg",{ref:c,...ug,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Pl("lucide",s),...!o&&!cg(a)&&{"aria-hidden":"true"},...a},[...i.map(([u,l])=>y.createElement(u,l)),...Array.isArray(o)?o:[o]]));/**
45
+ */const es=R.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:r="",children:i,iconNode:o,...l},m)=>R.createElement("svg",{ref:m,...Qn,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:Ct("lucide",r),...!i&&!Zn(l)&&{"aria-hidden":"true"},...l},[...o.map(([f,u])=>R.createElement(f,u)),...Array.isArray(i)?i:[i]]));/**
52
46
  * @license lucide-react v0.541.0 - ISC
53
47
  *
54
48
  * This source code is licensed under the ISC license.
55
49
  * See the LICENSE file in the root directory of this source tree.
56
- */const Us=(e,t)=>{const n=y.forwardRef(({className:r,...s},o)=>y.createElement(dg,{ref:o,iconNode:t,className:Pl(`lucide-${ag(Cl(e))}`,`lucide-${e}`,r),...s}));return n.displayName=Cl(e),n};/**
50
+ */const Ye=(e,t)=>{const n=R.forwardRef(({className:s,...r},i)=>R.createElement(es,{ref:i,iconNode:t,className:Ct(`lucide-${Yn(At(e))}`,`lucide-${e}`,s),...r}));return n.displayName=At(e),n};/**
57
51
  * @license lucide-react v0.541.0 - ISC
58
52
  *
59
53
  * This source code is licensed under the ISC license.
60
54
  * See the LICENSE file in the root directory of this source tree.
61
- */const fg=Us("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
55
+ */const ts=Ye("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
62
56
  * @license lucide-react v0.541.0 - ISC
63
57
  *
64
58
  * This source code is licensed under the ISC license.
65
59
  * See the LICENSE file in the root directory of this source tree.
66
- */const pg=Us("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
60
+ */const ns=Ye("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
67
61
  * @license lucide-react v0.541.0 - ISC
68
62
  *
69
63
  * This source code is licensed under the ISC license.
70
64
  * See the LICENSE file in the root directory of this source tree.
71
- */const mg=Us("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),kl=e=>e===0?"开始学习":e===100?"复习":"继续学习",hg=e=>{if(e.length===0)return 0;const t=e.reduce((n,r)=>n+r.progress,0);return Math.round(t/e.length)},gg=({knowledgeItem:e,onLearnAction:t})=>{const n=()=>{t(e)};return console.log("KnowledgeCard render:",{progress:e.progress,text:kl(e.progress)}),f.jsxs(Sl,{className:"content-accordion__knowledge-card",children:[f.jsxs(bl,{children:[f.jsx("h3",{className:"content-accordion__knowledge-title",children:e.title}),f.jsx("p",{className:"content-accordion__knowledge-description",children:e.description})]}),f.jsxs(sg,{className:"content-accordion__knowledge-actions",children:[f.jsxs("div",{className:"content-accordion__progress-container",children:[f.jsx(ml,{value:e.progress,size:"sm","aria-label":`${e.title} 进度`,className:"content-accordion__progress-bar"}),f.jsxs("span",{className:"content-accordion__progress-text",children:[e.progress,"%"]})]}),f.jsx(io,{size:"sm",radius:"md",onClick:n,progress:e.progress,variant:e.progress===100?"light":e.progress===0?"solid":"bordered",className:"content-accordion__learn-button",children:kl(e.progress)})]})]})},bg=({lesson:e,isExpanded:t,onToggle:n,onLearnAction:r})=>{const s=()=>{n(e.id)},o=hg(e.knowledgeItems);return f.jsxs("div",{className:`content-accordion__lesson-item ${t?"content-accordion__lesson-item--expanded":""}`,children:[f.jsxs("div",{className:"content-accordion__lesson-header",onClick:s,role:"button",tabIndex:0,"aria-expanded":t,"aria-label":`${e.title},点击${t?"收起":"展开"}`,children:[f.jsxs("div",{className:"content-accordion__lesson-header-content",children:[f.jsx("h2",{className:"content-accordion__lesson-title",children:e.title}),f.jsxs("span",{className:"content-accordion__lesson-duration",children:["约 ",e.duration," 分钟"]})]}),f.jsxs("div",{className:"content-accordion__lesson-actions",children:[f.jsxs("span",{className:"content-accordion__lesson-progress",children:[o,"%"]}),t?f.jsx(pg,{className:"content-accordion__lesson-icon"}):f.jsx(mg,{className:"content-accordion__lesson-icon"})]})]}),t&&f.jsx("div",{className:"content-accordion__knowledge-list",children:e.knowledgeItems.map(i=>f.jsx(gg,{knowledgeItem:i,onLearnAction:r},i.id))})]})},Al=({unit:e,activeLessonIds:t,onToggleLesson:n,onLearnAction:r,loading:s=!1,className:o="",emptyState:i})=>s?f.jsx("div",{className:"content-accordion content-accordion--loading",children:f.jsx("div",{className:"content-accordion__loading",children:"加载中..."})}):e?f.jsxs("div",{className:`content-accordion ${o}`,children:[f.jsxs("header",{className:"content-accordion__header",children:[f.jsx("h1",{className:"content-accordion__unit-title",children:e.title}),f.jsx("p",{className:"content-accordion__unit-description",children:e.description}),f.jsxs("div",{className:"content-accordion__unit-meta",children:[f.jsxs("span",{children:["总共 ",e.totalLessons," 节课"]}),f.jsx("span",{children:"•"}),f.jsxs("span",{children:["预计学习 ",e.estimatedDuration]})]})]}),f.jsx("div",{className:"content-accordion__lessons",children:e.lessons.map(a=>f.jsx(bg,{lesson:a,isExpanded:t.includes(a.id),onToggle:n,onLearnAction:r},a.id))})]}):f.jsx("div",{className:"content-accordion content-accordion--empty",children:i||f.jsx("div",{className:"content-accordion__empty",children:"暂无学习内容"})});var yg=()=>f.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"80%",role:"presentation",viewBox:"0 0 24 24",width:"80%",children:[f.jsx("path",{d:"M12 2C9.38 2 7.25 4.13 7.25 6.75C7.25 9.32 9.26 11.4 11.88 11.49C11.96 11.48 12.04 11.48 12.1 11.49C12.12 11.49 12.13 11.49 12.15 11.49C12.16 11.49 12.16 11.49 12.17 11.49C14.73 11.4 16.74 9.32 16.75 6.75C16.75 4.13 14.62 2 12 2Z",fill:"currentColor"}),f.jsx("path",{d:"M17.0809 14.1489C14.2909 12.2889 9.74094 12.2889 6.93094 14.1489C5.66094 14.9989 4.96094 16.1489 4.96094 17.3789C4.96094 18.6089 5.66094 19.7489 6.92094 20.5889C8.32094 21.5289 10.1609 21.9989 12.0009 21.9989C13.8409 21.9989 15.6809 21.5289 17.0809 20.5889C18.3409 19.7389 19.0409 18.5989 19.0409 17.3589C19.0309 16.1289 18.3409 14.9889 17.0809 14.1489Z",fill:"currentColor"})]}),[Wy,vg]=rn({name:"AvatarGroupContext",strict:!1}),wg=globalThis?.document?y.useLayoutEffect:y.useEffect;function xg(e={}){const{onLoad:t,onError:n,ignoreFallback:r,src:s,crossOrigin:o,srcSet:i,sizes:a,loading:c,shouldBypassImageLoad:u=!1}=e,l=Uc(),d=y.useRef(l?new Image:null),[m,w]=y.useState("pending");y.useEffect(()=>{d.current&&(d.current.onload=b=>{p(),w("loaded"),t?.(b)},d.current.onerror=b=>{p(),w("failed"),n?.(b)})},[d.current]);const p=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)},v=y.useCallback(()=>{if(!s)return"pending";if(r||u)return"loaded";const b=new Image;return b.src=s,o&&(b.crossOrigin=o),i&&(b.srcset=i),a&&(b.sizes=a),c&&(b.loading=c),d.current=b,b.complete&&b.naturalWidth?"loaded":"loading"},[s,o,i,a,t,n,c,u]);return wg(()=>{l&&w(v())},[l,v]),r?"loaded":m}function Tg(e={}){var t,n,r,s,o,i,a,c;const u=Ot(),l=vg(),d=!!l,{as:m,ref:w,src:p,name:v,icon:b,classNames:S,fallback:M,alt:A=v||"avatar",imgRef:O,color:$=(t=l?.color)!=null?t:"default",radius:I=(n=l?.radius)!=null?n:"full",size:N=(r=l?.size)!=null?r:"md",isBordered:k=(s=l?.isBordered)!=null?s:!1,isDisabled:R=(o=l?.isDisabled)!=null?o:!1,isFocusable:q=!1,getInitials:h=jc,ignoreFallback:P=!1,showFallback:D=!1,ImgComponent:T="img",imgProps:L,className:g,onError:_,disableAnimation:E,...B}=e,C=m||"span",j=ze(w),z=ze(O),{isFocusVisible:U,isFocused:Y,focusProps:Z}=Ps(),{isHovered:ie,hoverProps:J}=Cs({isDisabled:R}),Q=(i=E??u?.disableAnimation)!=null?i:!1,le=(c=typeof T=="object"&&((a=T?.displayName)==null?void 0:a.includes("HeroUI")))!=null?c:!1,we=xg({src:p,onError:_,ignoreFallback:P,shouldBypassImageLoad:m!==void 0||T!=="img"&&!le})==="loaded",ke=!le,Qn=(!p||!we)&&D,Ue=y.useMemo(()=>{var Ne;return Zh({color:$,radius:I,size:N,isBordered:k,isDisabled:R,isInGroup:d,disableAnimation:Q,isInGridGroup:(Ne=l?.isGrid)!=null?Ne:!1})},[$,I,N,k,R,Q,d,l?.isGrid]),en=Oe(S?.base,g),tn=y.useMemo(()=>q||m==="button",[q,m]),er=y.useCallback((Ne={})=>({ref:j,tabIndex:tn?0:-1,"data-hover":ae(ie),"data-focus":ae(Y),"data-focus-visible":ae(U),className:Ue.base({class:Oe(en,Ne?.className)}),...ot(B,J,tn?Z:{})}),[tn,Ue,en,Z,B]),no=y.useCallback((Ne={})=>({ref:z,src:p,"data-loaded":ae(we),className:Ue.img({class:S?.img}),...ot(L,Ne,Nt({disableAnimation:Q},{enabled:ke}))}),[Ue,we,L,Q,p,z,ke]);return{Component:C,ImgComponent:T,src:p,alt:A,icon:b,name:v,imgRef:z,slots:Ue,classNames:S,fallback:M,isImgLoaded:we,showFallback:Qn,ignoreFallback:P,getInitials:h,getAvatarProps:er,getImageProps:no}}var $l=Qe((e,t)=>{const{Component:n,ImgComponent:r,src:s,icon:o=f.jsx(yg,{}),alt:i,classNames:a,slots:c,name:u,showFallback:l,fallback:d,getInitials:m,getAvatarProps:w,getImageProps:p}=Tg({...e,ref:t}),v=y.useMemo(()=>!l&&s?null:d?f.jsx("div",{"aria-label":i,className:c.fallback({class:a?.fallback}),role:"img",children:d}):u?f.jsx("span",{"aria-label":i,className:c.name({class:a?.name}),role:"img",children:m(u)}):f.jsx("span",{"aria-label":i,className:c.icon({class:a?.icon}),role:"img",children:o}),[l,s,d,u,a]);return f.jsxs(n,{...w(),children:[s&&f.jsx(r,{...p(),alt:i}),v]})});$l.displayName="HeroUI.Avatar";var Eg=$l,[qy,Sg]=rn({name:"ButtonGroupContext",strict:!1});function Cg(e){var t,n,r,s,o,i,a,c,u;const l=Sg(),d=Ot(),m=!!l,{ref:w,as:p,children:v,startContent:b,endContent:S,autoFocus:M,className:A,spinner:O,isLoading:$=!1,disableRipple:I=!1,fullWidth:N=(t=l?.fullWidth)!=null?t:!1,radius:k=l?.radius,size:R=(n=l?.size)!=null?n:"md",color:q=(r=l?.color)!=null?r:"default",variant:h=(s=l?.variant)!=null?s:"solid",disableAnimation:P=(i=(o=l?.disableAnimation)!=null?o:d?.disableAnimation)!=null?i:!1,isDisabled:D=(a=l?.isDisabled)!=null?a:!1,isIconOnly:T=(c=l?.isIconOnly)!=null?c:!1,spinnerPlacement:L="start",onPress:g,onClick:_,...E}=e,B=p||"button",C=typeof B=="string",j=ze(w),z=(u=I||d?.disableRipple)!=null?u:P,{isFocusVisible:U,isFocused:Y,focusProps:Z}=Ps({autoFocus:M}),ie=D||$,J=y.useMemo(()=>Jh({size:R,color:q,variant:h,radius:k,fullWidth:N,isDisabled:ie,isInGroup:m,disableAnimation:P,isIconOnly:T,className:A}),[R,q,h,k,N,ie,m,T,P,A]),{onPress:Q,onClear:le,ripples:ve}=Tl(),we=y.useCallback(st=>{z||ie||P||j.current&&Q(st)},[z,ie,P,j,Q]),{buttonProps:ke,isPressed:Qn}=vl({elementType:p,isDisabled:ie,onPress:nr(g,we),onClick:_,...E},j),{isHovered:Ue,hoverProps:en}=Cs({isDisabled:ie}),tn=y.useCallback((st={})=>({"data-disabled":ae(ie),"data-focus":ae(Y),"data-pressed":ae(Qn),"data-focus-visible":ae(U),"data-hover":ae(Ue),"data-loading":ae($),...ot(ke,Z,en,Nt(E,{enabled:C}),Nt(st)),className:J}),[$,ie,Y,Qn,C,U,Ue,ke,Z,en,E,J]),er=st=>y.isValidElement(st)?y.cloneElement(st,{"aria-hidden":!0,focusable:!1}):null,no=er(b),Ne=er(S),Vy=y.useMemo(()=>({sm:"sm",md:"sm",lg:"md"})[R],[R]),Fy=y.useCallback(()=>({ripples:ve,onClear:le}),[ve,le]);return{Component:B,children:v,domRef:j,spinner:O,styles:J,startContent:no,endContent:Ne,isLoading:$,spinnerPlacement:L,spinnerSize:Vy,disableRipple:z,getButtonProps:tn,getRippleProps:Fy,isIconOnly:T}}function Pg(e){var t,n;const[r,s]=ks(e,ul.variantKeys),o=Ot(),i=(n=(t=e?.variant)!=null?t:o?.spinnerVariant)!=null?n:"default",{children:a,className:c,classNames:u,label:l,...d}=r,m=y.useMemo(()=>ul({...s}),[tr(s)]),w=Oe(u?.base,c),p=l||a,v=y.useMemo(()=>p&&typeof p=="string"?p:d["aria-label"]?"":"Loading",[a,p,d["aria-label"]]),b=y.useCallback(()=>({"aria-label":v,className:m.base({class:w}),...d}),[v,m,w,d]);return{label:p,slots:m,classNames:u,variant:i,getSpinnerProps:b}}var _l=Qe((e,t)=>{const{slots:n,classNames:r,label:s,variant:o,getSpinnerProps:i}=Pg({...e});return o==="wave"||o==="dots"?f.jsxs("div",{ref:t,...i(),children:[f.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(3)].map((a,c)=>f.jsx("i",{className:n.dots({class:r?.dots}),style:{"--dot-index":c}},`dot-${c}`))}),s&&f.jsx("span",{className:n.label({class:r?.label}),children:s})]}):o==="simple"?f.jsxs("div",{ref:t,...i(),children:[f.jsxs("svg",{className:n.wrapper({class:r?.wrapper}),fill:"none",viewBox:"0 0 24 24",children:[f.jsx("circle",{className:n.circle1({class:r?.circle1}),cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),f.jsx("path",{className:n.circle2({class:r?.circle2}),d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",fill:"currentColor"})]}),s&&f.jsx("span",{className:n.label({class:r?.label}),children:s})]}):o==="spinner"?f.jsxs("div",{ref:t,...i(),children:[f.jsx("div",{className:n.wrapper({class:r?.wrapper}),children:[...new Array(12)].map((a,c)=>f.jsx("i",{className:n.spinnerBars({class:r?.spinnerBars}),style:{"--bar-index":c}},`star-${c}`))}),s&&f.jsx("span",{className:n.label({class:r?.label}),children:s})]}):f.jsxs("div",{ref:t,...i(),children:[f.jsxs("div",{className:n.wrapper({class:r?.wrapper}),children:[f.jsx("i",{className:n.circle1({class:r?.circle1})}),f.jsx("i",{className:n.circle2({class:r?.circle2})})]}),s&&f.jsx("span",{className:n.label({class:r?.label}),children:s})]})});_l.displayName="HeroUI.Spinner";var kg=_l,Ml=Qe((e,t)=>{const{Component:n,domRef:r,children:s,spinnerSize:o,spinner:i=f.jsx(kg,{color:"current",size:o}),spinnerPlacement:a,startContent:c,endContent:u,isLoading:l,disableRipple:d,getButtonProps:m,getRippleProps:w,isIconOnly:p}=Cg({...e,ref:t});return f.jsxs(n,{ref:r,...m(),children:[c,l&&a==="start"&&i,l&&p?null:s,l&&a==="end"&&i,u,!d&&f.jsx(xl,{...w()})]})});Ml.displayName="HeroUI.Button";var Ag=Ml;const $g=e=>{switch(e){case"completed":return"success";case"in-progress":return"primary";case"not-started":default:return"default"}},Nl=({data:e,loading:t=!1,error:n=null,collapsed:r=!1,onToggleCollapse:s,activeUnitId:o=null,onUnitSelect:i,renderUnitItem:a,className:c="",unitItemClassName:u="",style:l={},unitItemStyle:d={}})=>{const m=(b,S)=>{S.preventDefault(),i?.(b)},w=()=>{s?.()},p=b=>f.jsxs("div",{className:`sidebar__unit-item ${u} ${o===b.unitId?"sidebar__unit-item--active":""} ${b.status?`sidebar__unit-item--${b.status}`:""}`,style:d,onClick:S=>m(b.unitId,S),role:"button",tabIndex:0,"aria-label":`${b.title},进度 ${b.progressPercentage}%`,children:[f.jsxs("div",{className:"sidebar__unit-item__content",children:[b.icon&&f.jsx("span",{className:"sidebar__unit-item__icon",children:b.icon}),!r&&f.jsx("span",{className:"sidebar__unit-item__title",children:b.title})]}),!r&&b.progressPercentage!==void 0&&f.jsxs("div",{className:"sidebar__unit-item__progress",children:[f.jsx(ml,{value:b.progressPercentage,size:"sm",color:$g(b.status),"aria-label":`${b.title} 进度`}),f.jsxs("span",{className:"progress-percentage",children:[b.progressPercentage,"%"]})]})]},b.unitId),v=()=>t?f.jsx("div",{className:"sidebar__loading",children:"加载中..."}):n?f.jsxs("div",{className:"sidebar__error",children:["加载失败: ",n.message]}):e?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"sidebar__header",children:[f.jsx("button",{className:"sidebar__toggle-btn",onClick:w,"aria-label":"切换侧边栏折叠状态",children:r?"→":"←"}),!r&&f.jsxs("div",{className:"sidebar__course-info",children:[f.jsx("h3",{className:"sidebar__course-title",children:e.courseTitle}),f.jsxs("span",{className:"sidebar__course-level",children:[e.courseLevel,"年级"]})]})]}),f.jsx("nav",{className:"sidebar__content",children:f.jsx("ul",{className:"sidebar__unit-list",children:e.units.map(b=>f.jsx("li",{children:a?a(b,b):p(b)},b.unitId))})})]}):f.jsx("div",{className:"sidebar__empty",children:"暂无课程数据"});return f.jsx("aside",{className:`sidebar ${c} ${r?"sidebar--collapsed":""} ${t?"sidebar--loading":""} ${n?"sidebar--error":""}`,style:l,"aria-label":"课程导航侧边栏",role:"complementary",children:v()})},Bs=({trigger:e,items:t,position:n="bottom",alignment:r="start",openDelay:s=300,closeDelay:o=100,onOpen:i,onClose:a,renderItem:c,itemConfig:u={},className:l,menuClassName:d,itemClassName:m})=>{const[w,p]=y.useState(!1),v=y.useRef(null),b=y.useRef(null),S=()=>{v.current&&clearTimeout(v.current),b.current&&clearTimeout(b.current)},M=()=>{S(),v.current=setTimeout(()=>{p(!0),i?.()},s)},A=()=>{S(),b.current=setTimeout(()=>{p(!1),a?.()},o)},O=N=>{!N.disabled&&N.onClick&&N.onClick(N)};y.useEffect(()=>()=>S(),[]);const $=N=>f.jsxs("div",{className:`submenu-item ${N.disabled?"is-disabled":""} ${m||""}`,onClick:()=>O(N),children:[N.icon&&f.jsx("span",{className:"submenu-item-icon",children:N.icon}),f.jsx("span",{children:N.label})]},N.id),I=()=>{const N=["submenu-panel"];return d&&N.push(d),N.push(`position-${n}`),r!=="start"&&N.push(`alignment-${r}`),w&&N.push("is-open"),N.join(" ")};return f.jsxs("div",{className:`submenu-container ${l||""}`,onMouseEnter:M,onMouseLeave:A,children:[f.jsx("div",{className:"submenu-trigger",children:e}),f.jsx("div",{className:I(),children:t.map(N=>c?c(N,u):$(N))})]})};function Ol(e,t){return function(){return e.apply(t,arguments)}}const{toString:_g}=Object.prototype,{getPrototypeOf:zs}=Object,{iterator:Bn,toStringTag:Il}=Symbol,zn=(e=>t=>{const n=_g.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Te=e=>(e=e.toLowerCase(),t=>zn(t)===e),Gn=e=>t=>typeof t===e,{isArray:kt}=Array,At=Gn("undefined");function qt(e){return e!==null&&!At(e)&&e.constructor!==null&&!At(e.constructor)&&pe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ll=Te("ArrayBuffer");function Mg(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ll(e.buffer),t}const Ng=Gn("string"),pe=Gn("function"),jl=Gn("number"),Yt=e=>e!==null&&typeof e=="object",Og=e=>e===!0||e===!1,Kn=e=>{if(zn(e)!=="object")return!1;const t=zs(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Il in e)&&!(Bn in e)},Ig=e=>{if(!Yt(e)||qt(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Lg=Te("Date"),jg=Te("File"),Dg=Te("Blob"),Vg=Te("FileList"),Fg=e=>Yt(e)&&pe(e.pipe),Rg=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||pe(e.append)&&((t=zn(e))==="formdata"||t==="object"&&pe(e.toString)&&e.toString()==="[object FormData]"))},Ug=Te("URLSearchParams"),[Bg,zg,Gg,Kg]=["ReadableStream","Request","Response","Headers"].map(Te),Hg=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Xt(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),kt(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(qt(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Dl(e,t){if(qt(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const tt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Vl=e=>!At(e)&&e!==tt;function Gs(){const{caseless:e,skipUndefined:t}=Vl(this)&&this||{},n={},r=(s,o)=>{const i=e&&Dl(n,o)||o;Kn(n[i])&&Kn(s)?n[i]=Gs(n[i],s):Kn(s)?n[i]=Gs({},s):kt(s)?n[i]=s.slice():(!t||!At(s))&&(n[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&Xt(arguments[s],r);return n}const Wg=(e,t,n,{allOwnKeys:r}={})=>(Xt(t,(s,o)=>{n&&pe(s)?e[o]=Ol(s,n):e[o]=s},{allOwnKeys:r}),e),qg=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Yg=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Xg=(e,t,n,r)=>{let s,o,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&zs(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Jg=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Zg=e=>{if(!e)return null;if(kt(e))return e;let t=e.length;if(!jl(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Qg=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&zs(Uint8Array)),eb=(e,t)=>{const r=(e&&e[Bn]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},tb=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},nb=Te("HTMLFormElement"),rb=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),Fl=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),sb=Te("RegExp"),Rl=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Xt(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},ob=e=>{Rl(e,(t,n)=>{if(pe(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(pe(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ib=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return kt(e)?r(e):r(String(e).split(t)),n},ab=()=>{},lb=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function cb(e){return!!(e&&pe(e.append)&&e[Il]==="FormData"&&e[Bn])}const ub=e=>{const t=new Array(10),n=(r,s)=>{if(Yt(r)){if(t.indexOf(r)>=0)return;if(qt(r))return r;if(!("toJSON"in r)){t[s]=r;const o=kt(r)?[]:{};return Xt(r,(i,a)=>{const c=n(i,s+1);!At(c)&&(o[a]=c)}),t[s]=void 0,o}}return r};return n(e,0)},db=Te("AsyncFunction"),fb=e=>e&&(Yt(e)||pe(e))&&pe(e.then)&&pe(e.catch),Ul=((e,t)=>e?setImmediate:t?((n,r)=>(tt.addEventListener("message",({source:s,data:o})=>{s===tt&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),tt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",pe(tt.postMessage)),pb=typeof queueMicrotask<"u"?queueMicrotask.bind(tt):typeof process<"u"&&process.nextTick||Ul,x={isArray:kt,isArrayBuffer:Ll,isBuffer:qt,isFormData:Rg,isArrayBufferView:Mg,isString:Ng,isNumber:jl,isBoolean:Og,isObject:Yt,isPlainObject:Kn,isEmptyObject:Ig,isReadableStream:Bg,isRequest:zg,isResponse:Gg,isHeaders:Kg,isUndefined:At,isDate:Lg,isFile:jg,isBlob:Dg,isRegExp:sb,isFunction:pe,isStream:Fg,isURLSearchParams:Ug,isTypedArray:Qg,isFileList:Vg,forEach:Xt,merge:Gs,extend:Wg,trim:Hg,stripBOM:qg,inherits:Yg,toFlatObject:Xg,kindOf:zn,kindOfTest:Te,endsWith:Jg,toArray:Zg,forEachEntry:eb,matchAll:tb,isHTMLForm:nb,hasOwnProperty:Fl,hasOwnProp:Fl,reduceDescriptors:Rl,freezeMethods:ob,toObjectSet:ib,toCamelCase:rb,noop:ab,toFiniteNumber:lb,findKey:Dl,global:tt,isContextDefined:Vl,isSpecCompliantForm:cb,toJSONObject:ub,isAsyncFn:db,isThenable:fb,setImmediate:Ul,asap:pb,isIterable:e=>e!=null&&pe(e[Bn])};function W(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}x.inherits(W,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:x.toJSONObject(this.config),code:this.code,status:this.status}}});const Bl=W.prototype,zl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{zl[e]={value:e}}),Object.defineProperties(W,zl),Object.defineProperty(Bl,"isAxiosError",{value:!0}),W.from=(e,t,n,r,s,o)=>{const i=Object.create(Bl);x.toFlatObject(e,i,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");const a=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return W.call(i,a,c,n,r,s),e&&i.cause==null&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",o&&Object.assign(i,o),i};const mb=null;function Ks(e){return x.isPlainObject(e)||x.isArray(e)}function Gl(e){return x.endsWith(e,"[]")?e.slice(0,-2):e}function Kl(e,t,n){return e?e.concat(t).map(function(s,o){return s=Gl(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function hb(e){return x.isArray(e)&&!e.some(Ks)}const gb=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function Hn(e,t,n){if(!x.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=x.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,b){return!x.isUndefined(b[v])});const r=n.metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&x.isSpecCompliantForm(t);if(!x.isFunction(s))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(x.isDate(p))return p.toISOString();if(x.isBoolean(p))return p.toString();if(!c&&x.isBlob(p))throw new W("Blob is not supported. Use a Buffer instead.");return x.isArrayBuffer(p)||x.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function l(p,v,b){let S=p;if(p&&!b&&typeof p=="object"){if(x.endsWith(v,"{}"))v=r?v:v.slice(0,-2),p=JSON.stringify(p);else if(x.isArray(p)&&hb(p)||(x.isFileList(p)||x.endsWith(v,"[]"))&&(S=x.toArray(p)))return v=Gl(v),S.forEach(function(A,O){!(x.isUndefined(A)||A===null)&&t.append(i===!0?Kl([v],O,o):i===null?v:v+"[]",u(A))}),!1}return Ks(p)?!0:(t.append(Kl(b,v,o),u(p)),!1)}const d=[],m=Object.assign(gb,{defaultVisitor:l,convertValue:u,isVisitable:Ks});function w(p,v){if(!x.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(p),x.forEach(p,function(S,M){(!(x.isUndefined(S)||S===null)&&s.call(t,S,x.isString(M)?M.trim():M,v,m))===!0&&w(S,v?v.concat(M):[M])}),d.pop()}}if(!x.isObject(e))throw new TypeError("data must be an object");return w(e),t}function Hl(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Hs(e,t){this._pairs=[],e&&Hn(e,this,t)}const Wl=Hs.prototype;Wl.append=function(t,n){this._pairs.push([t,n])},Wl.toString=function(t){const n=t?function(r){return t.call(this,r,Hl)}:Hl;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function bb(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ql(e,t,n){if(!t)return e;const r=n&&n.encode||bb;x.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let o;if(s?o=s(t,n):o=x.isURLSearchParams(t)?t.toString():new Hs(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Yl{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){x.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Xl={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yb={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Hs,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ws=typeof window<"u"&&typeof document<"u",qs=typeof navigator=="object"&&navigator||void 0,vb=Ws&&(!qs||["ReactNative","NativeScript","NS"].indexOf(qs.product)<0),wb=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",xb=Ws&&window.location.href||"http://localhost",ue={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ws,hasStandardBrowserEnv:vb,hasStandardBrowserWebWorkerEnv:wb,navigator:qs,origin:xb},Symbol.toStringTag,{value:"Module"})),...yb};function Tb(e,t){return Hn(e,new ue.classes.URLSearchParams,{visitor:function(n,r,s,o){return ue.isNode&&x.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function Eb(e){return x.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Sb(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function Jl(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),c=o>=n.length;return i=!i&&x.isArray(s)?s.length:i,c?(x.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!a):((!s[i]||!x.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&x.isArray(s[i])&&(s[i]=Sb(s[i])),!a)}if(x.isFormData(e)&&x.isFunction(e.entries)){const n={};return x.forEachEntry(e,(r,s)=>{t(Eb(r),s,n,0)}),n}return null}function Cb(e,t,n){if(x.isString(e))try{return(t||JSON.parse)(e),x.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Jt={transitional:Xl,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=x.isObject(t);if(o&&x.isHTMLForm(t)&&(t=new FormData(t)),x.isFormData(t))return s?JSON.stringify(Jl(t)):t;if(x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t)||x.isReadableStream(t))return t;if(x.isArrayBufferView(t))return t.buffer;if(x.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Tb(t,this.formSerializer).toString();if((a=x.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Hn(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),Cb(t)):t}],transformResponse:[function(t){const n=this.transitional||Jt.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(x.isResponse(t)||x.isReadableStream(t))return t;if(t&&x.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?W.from(a,W.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ue.classes.FormData,Blob:ue.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};x.forEach(["delete","get","head","post","put","patch"],e=>{Jt.headers[e]={}});const Pb=x.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),kb=e=>{const t={};let n,r,s;return e&&e.split(`
72
- `).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&Pb[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Zl=Symbol("internals");function Zt(e){return e&&String(e).trim().toLowerCase()}function Wn(e){return e===!1||e==null?e:x.isArray(e)?e.map(Wn):String(e)}function Ab(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const $b=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ys(e,t,n,r,s){if(x.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!x.isString(t)){if(x.isString(r))return t.indexOf(r)!==-1;if(x.isRegExp(r))return r.test(t)}}function _b(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Mb(e,t){const n=x.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let me=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(a,c,u){const l=Zt(c);if(!l)throw new Error("header name must be a non-empty string");const d=x.findKey(s,l);(!d||s[d]===void 0||u===!0||u===void 0&&s[d]!==!1)&&(s[d||c]=Wn(a))}const i=(a,c)=>x.forEach(a,(u,l)=>o(u,l,c));if(x.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(x.isString(t)&&(t=t.trim())&&!$b(t))i(kb(t),n);else if(x.isObject(t)&&x.isIterable(t)){let a={},c,u;for(const l of t){if(!x.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[u=l[0]]=(c=a[u])?x.isArray(c)?[...c,l[1]]:[c,l[1]]:l[1]}i(a,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=Zt(t),t){const r=x.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Ab(s);if(x.isFunction(n))return n.call(this,s,r);if(x.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Zt(t),t){const r=x.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ys(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=Zt(i),i){const a=x.findKey(r,i);a&&(!n||Ys(r,r[a],a,n))&&(delete r[a],s=!0)}}return x.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||Ys(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return x.forEach(this,(s,o)=>{const i=x.findKey(r,o);if(i){n[i]=Wn(s),delete n[o];return}const a=t?_b(o):String(o).trim();a!==o&&delete n[o],n[a]=Wn(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return x.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&x.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
73
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[Zl]=this[Zl]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=Zt(i);r[a]||(Mb(s,i),r[a]=!0)}return x.isArray(t)?t.forEach(o):o(t),this}};me.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),x.reduceDescriptors(me.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),x.freezeMethods(me);function Xs(e,t){const n=this||Jt,r=t||n,s=me.from(r.headers);let o=r.data;return x.forEach(e,function(a){o=a.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Ql(e){return!!(e&&e.__CANCEL__)}function $t(e,t,n){W.call(this,e??"canceled",W.ERR_CANCELED,t,n),this.name="CanceledError"}x.inherits($t,W,{__CANCEL__:!0});function ec(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new W("Request failed with status code "+n.status,[W.ERR_BAD_REQUEST,W.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Nb(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Ob(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),l=r[o];i||(i=u),n[s]=c,r[s]=u;let d=o,m=0;for(;d!==s;)m+=n[d++],d=d%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),u-i<t)return;const w=l&&u-l;return w?Math.round(m*1e3/w):void 0}}function Ib(e,t){let n=0,r=1e3/t,s,o;const i=(u,l=Date.now())=>{n=l,s=null,o&&(clearTimeout(o),o=null),e(...u)};return[(...u)=>{const l=Date.now(),d=l-n;d>=r?i(u,l):(s=u,o||(o=setTimeout(()=>{o=null,i(s)},r-d)))},()=>s&&i(s)]}const qn=(e,t,n=3)=>{let r=0;const s=Ob(50,250);return Ib(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,c=i-r,u=s(c),l=i<=a;r=i;const d={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:u||void 0,estimated:u&&a&&l?(a-i)/u:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},tc=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},nc=e=>(...t)=>x.asap(()=>e(...t)),Lb=ue.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ue.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ue.origin),ue.navigator&&/(msie|trident)/i.test(ue.navigator.userAgent)):()=>!0,jb=ue.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];x.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),x.isString(r)&&i.push("path="+r),x.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Db(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Vb(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function rc(e,t,n){let r=!Db(t);return e&&(r||n==!1)?Vb(e,t):t}const sc=e=>e instanceof me?{...e}:e;function nt(e,t){t=t||{};const n={};function r(u,l,d,m){return x.isPlainObject(u)&&x.isPlainObject(l)?x.merge.call({caseless:m},u,l):x.isPlainObject(l)?x.merge({},l):x.isArray(l)?l.slice():l}function s(u,l,d,m){if(x.isUndefined(l)){if(!x.isUndefined(u))return r(void 0,u,d,m)}else return r(u,l,d,m)}function o(u,l){if(!x.isUndefined(l))return r(void 0,l)}function i(u,l){if(x.isUndefined(l)){if(!x.isUndefined(u))return r(void 0,u)}else return r(void 0,l)}function a(u,l,d){if(d in t)return r(u,l);if(d in e)return r(void 0,u)}const c={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,l,d)=>s(sc(u),sc(l),d,!0)};return x.forEach(Object.keys({...e,...t}),function(l){const d=c[l]||s,m=d(e[l],t[l],l);x.isUndefined(m)&&d!==a||(n[l]=m)}),n}const oc=e=>{const t=nt({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=t;if(t.headers=i=me.from(i),t.url=ql(rc(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),x.isFormData(n)){if(ue.hasStandardBrowserEnv||ue.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(x.isFunction(n.getHeaders)){const c=n.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([l,d])=>{u.includes(l.toLowerCase())&&i.set(l,d)})}}if(ue.hasStandardBrowserEnv&&(r&&x.isFunction(r)&&(r=r(t)),r||r!==!1&&Lb(t.url))){const c=s&&o&&jb.read(o);c&&i.set(s,c)}return t},Fb=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const s=oc(e);let o=s.data;const i=me.from(s.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:u}=s,l,d,m,w,p;function v(){w&&w(),p&&p(),s.cancelToken&&s.cancelToken.unsubscribe(l),s.signal&&s.signal.removeEventListener("abort",l)}let b=new XMLHttpRequest;b.open(s.method.toUpperCase(),s.url,!0),b.timeout=s.timeout;function S(){if(!b)return;const A=me.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),$={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:A,config:e,request:b};ec(function(N){n(N),v()},function(N){r(N),v()},$),b=null}"onloadend"in b?b.onloadend=S:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(S)},b.onabort=function(){b&&(r(new W("Request aborted",W.ECONNABORTED,e,b)),b=null)},b.onerror=function(O){const $=O&&O.message?O.message:"Network Error",I=new W($,W.ERR_NETWORK,e,b);I.event=O||null,r(I),b=null},b.ontimeout=function(){let O=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const $=s.transitional||Xl;s.timeoutErrorMessage&&(O=s.timeoutErrorMessage),r(new W(O,$.clarifyTimeoutError?W.ETIMEDOUT:W.ECONNABORTED,e,b)),b=null},o===void 0&&i.setContentType(null),"setRequestHeader"in b&&x.forEach(i.toJSON(),function(O,$){b.setRequestHeader($,O)}),x.isUndefined(s.withCredentials)||(b.withCredentials=!!s.withCredentials),a&&a!=="json"&&(b.responseType=s.responseType),u&&([m,p]=qn(u,!0),b.addEventListener("progress",m)),c&&b.upload&&([d,w]=qn(c),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",w)),(s.cancelToken||s.signal)&&(l=A=>{b&&(r(!A||A.type?new $t(null,e,b):A),b.abort(),b=null)},s.cancelToken&&s.cancelToken.subscribe(l),s.signal&&(s.signal.aborted?l():s.signal.addEventListener("abort",l)));const M=Nb(s.url);if(M&&ue.protocols.indexOf(M)===-1){r(new W("Unsupported protocol "+M+":",W.ERR_BAD_REQUEST,e));return}b.send(o||null)})},Rb=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(u){if(!s){s=!0,a();const l=u instanceof Error?u:this.reason;r.abort(l instanceof W?l:new $t(l instanceof Error?l.message:l))}};let i=t&&setTimeout(()=>{i=null,o(new W(`timeout ${t} of ms exceeded`,W.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(o):u.removeEventListener("abort",o)}),e=null)};e.forEach(u=>u.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>x.asap(a),c}},Ub=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},Bb=async function*(e,t){for await(const n of zb(e))yield*Ub(n,t)},zb=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ic=(e,t,n,r)=>{const s=Bb(e,t);let o=0,i,a=c=>{i||(i=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:l}=await s.next();if(u){a(),c.close();return}let d=l.byteLength;if(n){let m=o+=d;n(m)}c.enqueue(new Uint8Array(l))}catch(u){throw a(u),u}},cancel(c){return a(c),s.return()}},{highWaterMark:2})},ac=64*1024,{isFunction:Yn}=x,Gb=(({Request:e,Response:t})=>({Request:e,Response:t}))(x.global),{ReadableStream:lc,TextEncoder:cc}=x.global,uc=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Kb=e=>{e=x.merge.call({skipUndefined:!0},Gb,e);const{fetch:t,Request:n,Response:r}=e,s=t?Yn(t):typeof fetch=="function",o=Yn(n),i=Yn(r);if(!s)return!1;const a=s&&Yn(lc),c=s&&(typeof cc=="function"?(p=>v=>p.encode(v))(new cc):async p=>new Uint8Array(await new n(p).arrayBuffer())),u=o&&a&&uc(()=>{let p=!1;const v=new n(ue.origin,{body:new lc,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!v}),l=i&&a&&uc(()=>x.isReadableStream(new r("").body)),d={stream:l&&(p=>p.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!d[p]&&(d[p]=(v,b)=>{let S=v&&v[p];if(S)return S.call(v);throw new W(`Response type '${p}' is not supported`,W.ERR_NOT_SUPPORT,b)})});const m=async p=>{if(p==null)return 0;if(x.isBlob(p))return p.size;if(x.isSpecCompliantForm(p))return(await new n(ue.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(x.isArrayBufferView(p)||x.isArrayBuffer(p))return p.byteLength;if(x.isURLSearchParams(p)&&(p=p+""),x.isString(p))return(await c(p)).byteLength},w=async(p,v)=>{const b=x.toFiniteNumber(p.getContentLength());return b??m(v)};return async p=>{let{url:v,method:b,data:S,signal:M,cancelToken:A,timeout:O,onDownloadProgress:$,onUploadProgress:I,responseType:N,headers:k,withCredentials:R="same-origin",fetchOptions:q}=oc(p),h=t||fetch;N=N?(N+"").toLowerCase():"text";let P=Rb([M,A&&A.toAbortSignal()],O),D=null;const T=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let L;try{if(I&&u&&b!=="get"&&b!=="head"&&(L=await w(k,S))!==0){let j=new n(v,{method:"POST",body:S,duplex:"half"}),z;if(x.isFormData(S)&&(z=j.headers.get("content-type"))&&k.setContentType(z),j.body){const[U,Y]=tc(L,qn(nc(I)));S=ic(j.body,ac,U,Y)}}x.isString(R)||(R=R?"include":"omit");const g=o&&"credentials"in n.prototype,_={...q,signal:P,method:b.toUpperCase(),headers:k.normalize().toJSON(),body:S,duplex:"half",credentials:g?R:void 0};D=o&&new n(v,_);let E=await(o?h(D,q):h(v,_));const B=l&&(N==="stream"||N==="response");if(l&&($||B&&T)){const j={};["status","statusText","headers"].forEach(Z=>{j[Z]=E[Z]});const z=x.toFiniteNumber(E.headers.get("content-length")),[U,Y]=$&&tc(z,qn(nc($),!0))||[];E=new r(ic(E.body,ac,U,()=>{Y&&Y(),T&&T()}),j)}N=N||"text";let C=await d[x.findKey(d,N)||"text"](E,p);return!B&&T&&T(),await new Promise((j,z)=>{ec(j,z,{data:C,headers:me.from(E.headers),status:E.status,statusText:E.statusText,config:p,request:D})})}catch(g){throw T&&T(),g&&g.name==="TypeError"&&/Load failed|fetch/i.test(g.message)?Object.assign(new W("Network Error",W.ERR_NETWORK,p,D),{cause:g.cause||g}):W.from(g,g&&g.code,p,D)}}},Hb=new Map,dc=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,a=i,c,u,l=Hb;for(;a--;)c=o[a],u=l.get(c),u===void 0&&l.set(c,u=a?new Map:Kb(t)),l=u;return u};dc();const Js={http:mb,xhr:Fb,fetch:{get:dc}};x.forEach(Js,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const fc=e=>`- ${e}`,Wb=e=>x.isFunction(e)||e===null||e===!1,pc={getAdapter:(e,t)=>{e=x.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i<n;i++){r=e[i];let a;if(s=r,!Wb(r)&&(s=Js[(a=String(r)).toLowerCase()],s===void 0))throw new W(`Unknown adapter '${a}'`);if(s&&(x.isFunction(s)||(s=s.get(t))))break;o[a||"#"+i]=s}if(!s){const i=Object.entries(o).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
74
- `+i.map(fc).join(`
75
- `):" "+fc(i[0]):"as no adapter specified";throw new W("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s},adapters:Js};function Zs(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $t(null,e)}function mc(e){return Zs(e),e.headers=me.from(e.headers),e.data=Xs.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),pc.getAdapter(e.adapter||Jt.adapter,e)(e).then(function(r){return Zs(e),r.data=Xs.call(e,e.transformResponse,r),r.headers=me.from(r.headers),r},function(r){return Ql(r)||(Zs(e),r&&r.response&&(r.response.data=Xs.call(e,e.transformResponse,r.response),r.response.headers=me.from(r.response.headers))),Promise.reject(r)})}const hc="1.12.2",Xn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Xn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const gc={};Xn.transitional=function(t,n,r){function s(o,i){return"[Axios v"+hc+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(t===!1)throw new W(s(i," has been removed"+(n?" in "+n:"")),W.ERR_DEPRECATED);return n&&!gc[i]&&(gc[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,a):!0}},Xn.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function qb(e,t,n){if(typeof e!="object")throw new W("options must be an object",W.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const a=e[o],c=a===void 0||i(a,o,e);if(c!==!0)throw new W("option "+o+" must be "+c,W.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new W("Unknown option "+o,W.ERR_BAD_OPTION)}}const Jn={assertOptions:qb,validators:Xn},Pe=Jn.validators;let rt=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Yl,response:new Yl}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
76
- `+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=nt(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Jn.assertOptions(r,{silentJSONParsing:Pe.transitional(Pe.boolean),forcedJSONParsing:Pe.transitional(Pe.boolean),clarifyTimeoutError:Pe.transitional(Pe.boolean)},!1),s!=null&&(x.isFunction(s)?n.paramsSerializer={serialize:s}:Jn.assertOptions(s,{encode:Pe.function,serialize:Pe.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Jn.assertOptions(n,{baseUrl:Pe.spelling("baseURL"),withXsrfToken:Pe.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&x.merge(o.common,o[n.method]);o&&x.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=me.concat(i,o);const a=[];let c=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(c=c&&v.synchronous,a.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let l,d=0,m;if(!c){const p=[mc.bind(this),void 0];for(p.unshift(...a),p.push(...u),m=p.length,l=Promise.resolve(n);d<m;)l=l.then(p[d++],p[d++]);return l}m=a.length;let w=n;for(;d<m;){const p=a[d++],v=a[d++];try{w=p(w)}catch(b){v.call(this,b);break}}try{l=mc.call(this,w)}catch(p){return Promise.reject(p)}for(d=0,m=u.length;d<m;)l=l.then(u[d++],u[d++]);return l}getUri(t){t=nt(this.defaults,t);const n=rc(t.baseURL,t.url,t.allowAbsoluteUrls);return ql(n,t.params,t.paramsSerializer)}};x.forEach(["delete","get","head","options"],function(t){rt.prototype[t]=function(n,r){return this.request(nt(r||{},{method:t,url:n,data:(r||{}).data}))}}),x.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,a){return this.request(nt(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}rt.prototype[t]=n(),rt.prototype[t+"Form"]=n(!0)});let Yb=class _c{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,a){r.reason||(r.reason=new $t(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new _c(function(s){t=s}),cancel:t}}};function Xb(e){return function(n){return e.apply(null,n)}}function Jb(e){return x.isObject(e)&&e.isAxiosError===!0}const Qs={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Qs).forEach(([e,t])=>{Qs[t]=e});function bc(e){const t=new rt(e),n=Ol(rt.prototype.request,t);return x.extend(n,rt.prototype,t,{allOwnKeys:!0}),x.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return bc(nt(e,s))},n}const ne=bc(Jt);ne.Axios=rt,ne.CanceledError=$t,ne.CancelToken=Yb,ne.isCancel=Ql,ne.VERSION=hc,ne.toFormData=Hn,ne.AxiosError=W,ne.Cancel=ne.CanceledError,ne.all=function(t){return Promise.all(t)},ne.spread=Xb,ne.isAxiosError=Jb,ne.mergeConfig=nt,ne.AxiosHeaders=me,ne.formToJSON=e=>Jl(x.isHTMLForm(e)?new FormData(e):e),ne.getAdapter=pc.getAdapter,ne.HttpStatusCode=Qs,ne.default=ne;const{Axios:tv,AxiosError:nv,CanceledError:rv,isCancel:sv,CancelToken:ov,VERSION:iv,all:av,Cancel:lv,isAxiosError:cv,spread:uv,toFormData:dv,AxiosHeaders:fv,HttpStatusCode:pv,formToJSON:mv,getAdapter:hv,mergeConfig:gv}=ne,Zb=()=>f.jsx("span",{style:{marginRight:8,fontSize:"1.2em"},children:"👤"}),Qb=()=>f.jsx("span",{style:{marginRight:8,fontSize:"1.2em"},children:"⚙️"}),ey=()=>f.jsx("span",{style:{marginRight:8,fontSize:"1.2em"},children:"❓"}),ty=()=>f.jsx("span",{style:{marginRight:8,fontSize:"1.2em"},children:"🚪"}),ny=[{id:"profile",label:"个人主页",icon:f.jsx(Zb,{})},{id:"settings",label:"设置",icon:f.jsx(Qb,{})},{id:"help",label:"帮助",icon:f.jsx(ey,{})},{id:"logout",label:"退出",icon:f.jsx(ty,{})}],yc=({userId:e,userName:t,userAvatar:n,apiConfig:r,menuItems:s=ny,avatarSize:o="md",isLoading:i=!1,error:a=null,avatarClassName:c,userNameClassName:u,containerClassName:l,onMenuOpen:d,onMenuClose:m,onMenuItemClick:w,onLogout:p,renderMenuItem:v,renderUserInfo:b})=>{const[S,M]=y.useState({id:e||"",name:t||"",avatar:n||"",level:0,badges:[]}),[A,O]=y.useState(i),[$,I]=y.useState(a);y.useEffect(()=>{e&&r&&!t&&!n&&N()},[e,r,t,n]);const N=async()=>{O(!0),I(null);try{const P=r.endpoints.userProfile.replace(":userId",e),D=await ne.get(`${r.baseURL}${P}`,{headers:r.headers});M(D.data)}catch(P){I(P)}finally{O(!1)}},k=P=>{w?.(P.id),P.id==="logout"&&p?.()},R=()=>{d?.()},q=()=>{m?.()},h=()=>f.jsxs("div",{className:"user-profile-trigger",children:[f.jsx(Eg,{src:S.avatar,size:o,className:c,alt:"用户头像"}),f.jsx("span",{className:`user-name ${u||""}`,children:S.name})]});return A?f.jsx("div",{className:`user-profile-container ${l||""} is-loading`,children:f.jsx("div",{className:"user-profile-loading",children:"加载中..."})}):$?f.jsx("div",{className:`user-profile-container ${l||""} has-error`,children:f.jsxs("div",{className:"user-profile-error",children:["错误: ",$.message]})}):S.name?f.jsx("div",{className:`user-profile-container ${l||""}`,children:f.jsx(Bs,{trigger:b?b(S):h(),items:s.map(P=>({...P,onClick:()=>k(P)})),position:"bottom",alignment:"end",onOpen:R,onClose:q,renderItem:v?P=>v(P,S):void 0})}):f.jsx("div",{className:`user-profile-container ${l||""}`,children:f.jsx("div",{className:"user-profile-loading",children:"未登录"})})},ry=e=>f.jsxs("div",{className:"explore-menu-item",onClick:()=>e.onClick?.(e),children:[f.jsx("span",{className:"explore-item-label",children:e.label}),e.status&&f.jsx("span",{className:`explore-item-status status-${e.status.toLowerCase().replace("%","").replace(" ","-")}`,children:e.status})]},e.id),sy=()=>f.jsxs("button",{className:"explore-button","aria-label":"探索数学课程",children:[f.jsx("span",{className:"explore-icon",children:"🌍"}),f.jsx("span",{className:"explore-text",children:"探索"})]}),oy=({className:e="",style:t,logoHref:n="/",logoText:r="MathWiz",onLogoClick:s,exploreItems:o=[],exploreMenuOpen:i=!1,onExploreMenuToggle:a,onExploreItemClick:c,renderExploreItem:u=ry,userData:l,userMenuItems:d,onUserMenuItemClick:m,onLogout:w,isLoading:p=!1,error:v=null,headerClassName:b="",logoClassName:S="",exploreClassName:M="",userProfileClassName:A="","aria-label":O,"aria-labelledby":$,...I})=>{const N=o.map(k=>({id:k.id,label:u(k),onClick:()=>c?.(k)}));return f.jsx("header",{className:`mathwiz-header site-header ${b} ${e}`,style:t,"aria-label":O,"aria-labelledby":$,role:"banner",...I,children:f.jsxs("div",{className:"header-content",children:[f.jsx("div",{className:"header-section left",children:f.jsx(Bs,{trigger:f.jsx(sy,{}),items:N,position:"bottom",alignment:"start",openDelay:300,closeDelay:100,onOpen:()=>a?.(!0),onClose:()=>a?.(!1),className:`explore-submenu ${M}`,menuClassName:"explore-panel"})}),f.jsx("div",{className:"header-section center",children:f.jsx("a",{href:n,className:`logo ${S}`,onClick:s,"aria-label":"MathWiz 首页",children:r})}),f.jsx("div",{className:"header-section right",children:f.jsx(yc,{userName:l?.name,userAvatar:l?.avatar,menuItems:d,onMenuItemClick:m,onLogout:w,containerClassName:A,isLoading:p,error:v})})]})})},vc=y.memo(oy,(e,t)=>e.logoText===t.logoText&&e.logoHref===t.logoHref&&e.className===t.className&&e.headerClassName===t.headerClassName&&e.logoClassName===t.logoClassName&&e.exploreClassName===t.exploreClassName&&e.userProfileClassName===t.userProfileClassName&&e["aria-label"]===t["aria-label"]&&e["aria-labelledby"]===t["aria-labelledby"]&&e.isLoading===t.isLoading&&e.error===t.error&&JSON.stringify(e.exploreItems)===JSON.stringify(t.exploreItems)&&JSON.stringify(e.userData)===JSON.stringify(t.userData)&&JSON.stringify(e.userMenuItems)===JSON.stringify(t.userMenuItems)),wc=({abilities:e,width:t=400,height:n=400})=>{const r=()=>e.length===0?"":e.map(i=>{if(i.svgPoint)return`${i.svgPoint.x},${i.svgPoint.y}`;const a=Math.PI*2*e.indexOf(i)/e.length,c=i.score/i.maxScore*40+10,u=50+c*Math.sin(a),l=50-c*Math.cos(a);return`${u},${l}`}).join(" "),s=i=>{const a=Math.PI*2*i/Math.max(e.length,1),c=50+40*Math.sin(a),u=50-40*Math.cos(a);return{x2:c,y2:u}},o=i=>{const a=Math.PI*2*i/Math.max(e.length,1),c=50+45*Math.sin(a),u=50-45*Math.cos(a);let l="middle";return a>Math.PI*.25&&a<Math.PI*.75&&(l="start"),a>Math.PI*1.25&&a<Math.PI*1.75&&(l="end"),{x:c,y:u,textAnchor:l}};return f.jsxs("svg",{"data-testid":"radar-chart",width:t,height:n,viewBox:"0 0 100 100",className:"w-full h-full",preserveAspectRatio:"xMidYMid meet",children:[f.jsx("circle",{"data-testid":"center-point",cx:"50",cy:"50",r:"1",fill:"#4A90E2"}),e.map((i,a)=>{const{x2:c,y2:u}=s(a);return f.jsx("line",{"data-testid":"axis-line",x1:"50",y1:"50",x2:c,y2:u,stroke:"#E2E8F0",strokeWidth:"0.5"},`axis-${a}`)}),e.length>2&&f.jsx("polygon",{"data-testid":"radar-polygon",points:r(),fill:"rgba(74, 144, 226, 0.2)",stroke:"rgb(74, 144, 226)",strokeWidth:"1",fillRule:"evenodd"}),e.map((i,a)=>{let c,u;if(i.svgPoint)c=i.svgPoint.x,u=i.svgPoint.y;else{const l=Math.PI*2*a/e.length,d=i.score/i.maxScore*40+10;c=50+d*Math.sin(l),u=50-d*Math.cos(l)}return f.jsx("circle",{"data-testid":"data-point",cx:c,cy:u,r:"2",fill:i.progressBarColor==="bg-orange-400"?"#FBBF24":"#4A90E2"},`point-${i.name}`)}),e.map((i,a)=>{const{x:c,y:u,textAnchor:l}=o(a);return f.jsx("text",{x:c,y:u,textAnchor:l,fontSize:"5",fill:"#334155",className:"text-xs",children:i.name},`label-${i.name}`)})]})},xc=e=>{let t;const n=new Set,r=(u,l)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const m=t;t=l??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(w=>w(t,m))}},s=()=>t,a={setState:r,getState:s,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u))},c=t=e(r,s,a);return a},iy=(e=>e?xc(e):xc),ay=e=>e;function ly(e,t=ay){const n=y.useSyncExternalStore(e.subscribe,y.useCallback(()=>t(e.getState()),[e,t]),y.useCallback(()=>t(e.getInitialState()),[e,t]));return y.useDebugValue(n),n}const Tc=e=>{const t=iy(e),n=r=>ly(t,r);return Object.assign(n,t),n},cy=(e=>e?Tc(e):Tc),Ec={overallRating:"优秀",generalRecommendation:"你的空间想象力和逻辑推理能力非常出色!若能进一步提升在复杂图形下的专注力,你将所向披靡。建议尝试我们‘专注力挑战’系列游戏。",abilities:[{name:"空间想象力",score:7.5,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:50,y:17.5},recommendation:"通过观察三维物体在不同角度的投影,或尝试构建复杂结构的游戏,能有效提升空间想象力。",recommendationLink:"#spatial-challenges"},{name:"逻辑推理",score:8,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:82,y:35},recommendation:"解决数独、迷宫或逻辑谜题,能够持续锻炼你的逻辑思维,尝试挑战更高难度的推理游戏。",recommendationLink:"#logic-puzzles"},{name:"图形辨识",score:9,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:85,y:65},recommendation:"你在这方面表现出色!可以尝试在更复杂、干扰因素更多的图形中进行辨识训练,保持敏锐。",recommendationLink:"#graphic-training"},{name:"专注力",score:7,maxScore:10,progressBarColor:"bg-orange-400",svgPoint:{x:50,y:80},recommendation:"在长时间的游戏中保持专注对你来说是一个挑战,建议尝试我们‘专注力挑战’系列游戏,逐渐延长专注时间。",recommendationLink:"#focus-challenges"},{name:"观察力",score:8.5,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:15,y:65},recommendation:"你的观察力非常敏锐,在细节发现上尤为突出。尝试在限时模式下进行观察力训练,提高反应速度。",recommendationLink:"#observation-drills"},{name:"抗压性",score:7.8,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:18,y:35},recommendation:"面对高压挑战时,保持冷静是关键。通过模拟竞赛或限时任务来提升抗压能力,逐步适应压力。",recommendationLink:"#stress-games"}]};class uy{static API_BASE_URL="/api/radar-ability";static async fetchRadarAbilityData(){try{return process.env.NODE_ENV==="test"?(await new Promise(t=>setTimeout(t,100)),Ec):(await ne.get(`${this.API_BASE_URL}/assessment`)).data}catch(t){if(console.error("Failed to fetch radar ability data:",t),process.env.NODE_ENV==="test")throw new Error("获取能力评估数据失败");return Ec}}static async submitFeedback(t){try{await ne.post(`${this.API_BASE_URL}/feedback`,t)}catch(n){throw console.error("Failed to submit feedback:",n),new Error("提交反馈失败")}}}const dy=cy((e,t)=>({data:null,loading:!1,error:null,fetchData:async()=>{if(!t().loading){e({loading:!0,error:null});try{const n=await uy.fetchRadarAbilityData();e({data:n,loading:!1})}catch(n){const r=n instanceof Error?n.message:"获取数据失败";e({error:r,loading:!1})}}},setData:n=>{e({data:n,error:null,loading:!1})},setError:n=>{e({error:n,loading:!1})},reset:()=>{e({data:null,loading:!1,error:null})}})),Sc=({ability:e})=>{const t=e.score/e.maxScore*100;return f.jsxs("div",{className:"ability-progress-bar-item","data-ability":e.name,"data-testid":"progress-bar-container",children:[f.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[f.jsx("span",{className:"text-gray-700 font-medium",children:e.name}),f.jsxs("span",{className:"text-gray-600",children:[e.score,"/",e.maxScore]})]}),f.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2.5","data-testid":"progress-bar-outer",children:f.jsx("div",{className:`${e.progressBarColor} h-2.5 rounded-full transition-all duration-300`,style:{width:`${t}%`},"data-testid":"progress-bar-inner",role:"progressbar","aria-valuenow":e.score,"aria-valuemin":0,"aria-valuemax":e.maxScore,"aria-label":`${e.name} progress: ${e.score} out of ${e.maxScore}`})})]})},Cc=({generalRecommendation:e})=>f.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4","data-testid":"advice-panel",role:"region","aria-label":"个性化建议",children:f.jsxs("div",{className:"flex items-start",children:[f.jsx("div",{className:"flex-shrink-0",children:f.jsx("i",{className:"material-icons text-blue-500","data-testid":"lightbulb-icon","aria-hidden":"true",children:"lightbulb"})}),f.jsxs("div",{className:"ml-3",children:[f.jsx("h3",{className:"text-md font-semibold text-blue-800","aria-level":3,children:"个性化建议"}),f.jsx("p",{className:"text-sm text-blue-700 mt-1","data-testid":"recommendation-text",children:e})]})]})}),Pc=({ability:e,customLinkTexts:t={}})=>{const n=r=>{const s={空间想象力:"探索空间挑战",逻辑推理:"深入逻辑谜题",图形辨识:"精进图形训练",专注力:"挑战专注极限",观察力:"提升观察速度",抗压性:"磨砺抗压意志"};return t[r]||s[r]||"开始挑战"};return f.jsx(Sl,{className:"recommendation-card w-full max-w-sm hover:shadow-lg transition-all duration-300","data-ability":e.name,"data-testid":"recommendation-card",isHoverable:!0,isPressable:!0,children:f.jsx(bl,{className:"p-5",children:f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsxs("h4",{className:"text-lg font-semibold text-foreground","aria-level":4,children:[e.name,": 专项提高"]}),f.jsx("p",{className:"text-sm text-default-600 leading-relaxed","data-testid":"recommendation-description",children:e.recommendation}),f.jsx(Ag,{as:"a",href:e.recommendationLink,className:"mt-2 w-fit",size:"sm",variant:"flat",color:"primary",endContent:f.jsx(fg,{className:"w-4 h-4"}),"data-testid":"recommendation-link","aria-label":`前往${e.name}专项提高页面`,children:n(e.name)})]})})})},Zn={dashboardLayout:"_dashboardLayout_10wqn_5",upperSection:"_upperSection_10wqn_19",lowerSection:"_lowerSection_10wqn_33",radarChartArea:"_radarChartArea_10wqn_51"},fy=()=>{const{data:e,loading:t,error:n,fetchData:r}=dy();return y.useEffect(()=>{r()},[r]),t?f.jsxs("div",{className:"card max-w-4xl mx-auto p-6 md:p-8 flex items-center justify-center","data-testid":"loading-spinner",children:[f.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-500"}),f.jsx("span",{className:"ml-3 text-gray-600",children:"加载中..."})]}):n?f.jsxs("div",{className:"card max-w-4xl mx-auto p-6 md:p-8 text-center",role:"alert","aria-live":"assertive",children:[f.jsx("div",{className:"text-red-500 mb-4",children:f.jsx("i",{className:"material-icons text-4xl","aria-hidden":"true",children:"error_outline"})}),f.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-2",children:"加载失败"}),f.jsx("p",{className:"text-gray-600 mb-4",children:n}),f.jsx("button",{onClick:r,className:"bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","aria-label":"重试加载数据",children:"重试"})]}):e?f.jsxs("div",{className:"card max-w-4xl mx-auto p-6 md:p-8 animate-fade-in","data-component":"AbilityAssessmentDashboard",role:"main","aria-label":"能力评估雷达图展示",children:[f.jsxs("div",{className:"flex justify-between items-center mb-6",children:[f.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"能力评估雷达图"}),f.jsxs("span",{className:"bg-blue-100 text-blue-800 text-sm font-semibold px-2.5 py-0.5 rounded-full","aria-label":`综合评级: ${e.overallRating}`,children:["综合评级: ",e.overallRating]})]}),f.jsxs("div",{className:Zn.dashboardLayout,children:[f.jsxs("div",{className:Zn.upperSection,children:[f.jsx("div",{className:Zn.radarChartArea,children:f.jsx(wc,{abilities:e.abilities})}),f.jsx("div",{className:"space-y-4 flex flex-col justify-around py-2",children:e.abilities.map(s=>f.jsx(Sc,{ability:s},s.name))})]}),f.jsxs("div",{className:Zn.lowerSection,children:[f.jsx(Cc,{generalRecommendation:e.generalRecommendation}),f.jsx("h3",{className:"text-lg font-bold text-gray-800 mb-4 mt-6",children:"专项提升建议"}),f.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:e.abilities.map(s=>f.jsx(Pc,{ability:s},s.name))})]})]})]}):f.jsx("div",{className:"card max-w-4xl mx-auto p-6 md:p-8 text-center",role:"status","aria-live":"polite",children:f.jsx("p",{className:"text-gray-600",children:"暂无数据"})})},Qt={id:"user-001",name:"小明",level:5,avatar:"https://i.pravatar.cc/40?u=student1",logIn:!0,badges:["🏆","🏅","🌟"]},py=[{id:"g3",label:"三年级",status:"new",onClick:()=>console.log("三年级 clicked")},{id:"g4",label:"四年级",status:"2%",onClick:()=>console.log("四年级 clicked")},{id:"g5",label:"五年级",status:"进行中",onClick:()=>console.log("五年级 clicked")},{id:"g6",label:"六年级",status:"new",onClick:()=>console.log("六年级 clicked")},{id:"g7",label:"七年级",status:"new",onClick:()=>console.log("七年级 clicked")},{id:"g8",label:"八年级",status:"new",onClick:()=>console.log("八年级 clicked")},{id:"alg_topic",label:"代数专题",status:"new",onClick:()=>console.log("代数专题 clicked")},{id:"calc_topic",label:"计算专题",status:"new",onClick:()=>console.log("计算专题 clicked")},{id:"geo_topic",label:"几何专题",status:"new",onClick:()=>console.log("几何专题 clicked")},{id:"olym_topic",label:"奥数专题",status:"new",onClick:()=>console.log("奥数专题 clicked")}],he={id:"g5",title:"小学数学五年级",level:5,subject:"数学",units:[{id:"unit_1",title:"小数乘法",description:"学习小数乘法的计算方法及应用",estimatedDuration:"3周",totalLessons:10,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit1_lesson1",title:"小数乘整数",duration:40,knowledgeItems:[{id:"unit1_lesson1_k1",title:"小数乘整数的意义",description:"理解小数乘整数的意义与整数乘法相同",progress:0,contentUrl:""},{id:"unit1_lesson1_k2",title:"小数乘整数的计算方法",description:"掌握小数乘整数的计算方法:先按整数乘法计算,再看因数中有几位小数,就从积的右边起数出几位点上小数点",progress:0,contentUrl:""}]},{id:"unit1_lesson2",title:"小数乘小数",duration:40,knowledgeItems:[{id:"unit1_lesson2_k1",title:"小数乘小数的计算方法",description:"掌握小数乘小数的计算方法:先按整数乘法算出积,再给积点上小数点",progress:0,contentUrl:""},{id:"unit1_lesson2_k2",title:"积的小数位数确定",description:"理解积的小数位数等于两个因数的小数位数之和",progress:0,contentUrl:""}]},{id:"unit1_lesson3",title:"积的近似数",duration:40,knowledgeItems:[{id:"unit1_lesson3_k1",title:'用"四舍五入"法求积的近似数',description:'掌握用"四舍五入"法求积的近似数的方法',progress:0,contentUrl:""}]},{id:"unit1_lesson4",title:"整数乘法运算定律推广到小数",duration:40,knowledgeItems:[{id:"unit1_lesson4_k1",title:"乘法运算定律在小数中的适用性",description:"理解整数乘法运算定律对于小数乘法同样适用",progress:0,contentUrl:""},{id:"unit1_lesson4_k2",title:"运用运算定律进行简便计算",description:"能运用乘法运算定律进行小数乘法的简便计算",progress:0,contentUrl:""}]},{id:"unit1_lesson5",title:"解决问题",duration:40,knowledgeItems:[{id:"unit1_lesson5_k1",title:"用小数乘法解决实际问题",description:"能运用小数乘法解决购物、面积计算等实际问题",progress:0,contentUrl:""}]}]},{id:"unit_2",title:"小数除法",description:"学习小数除法的计算方法及应用",estimatedDuration:"3周",totalLessons:12,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit2_lesson1",title:"小数除以整数",duration:40,knowledgeItems:[{id:"unit2_lesson1_k1",title:"小数除以整数的计算方法",description:"掌握小数除以整数的计算方法:按照整数除法的方法计算,商的小数点要与被除数的小数点对齐",progress:0,contentUrl:""}]},{id:"unit2_lesson2",title:"一个数除以小数",duration:40,knowledgeItems:[{id:"unit2_lesson2_k1",title:"除数是小数的除法计算方法",description:"掌握除数是小数的除法计算方法:利用商不变的性质,将除数转化为整数",progress:0,contentUrl:""}]},{id:"unit2_lesson3",title:"商的近似数",duration:40,knowledgeItems:[{id:"unit2_lesson3_k1",title:'用"四舍五入"法求商的近似数',description:'掌握用"四舍五入"法求商的近似数的方法',progress:0,contentUrl:""}]},{id:"unit2_lesson4",title:"循环小数",duration:40,knowledgeItems:[{id:"unit2_lesson4_k1",title:"循环小数的概念",description:"理解循环小数的概念,认识循环节",progress:0,contentUrl:""},{id:"unit2_lesson4_k2",title:"循环小数的表示方法",description:"掌握循环小数的简便表示方法",progress:0,contentUrl:""}]},{id:"unit2_lesson5",title:"用计算器探索规律",duration:40,knowledgeItems:[{id:"unit2_lesson5_k1",title:"用计算器计算小数除法",description:"会用计算器计算较复杂的小数除法",progress:0,contentUrl:""},{id:"unit2_lesson5_k2",title:"发现商的变化规律",description:"能借助计算器发现商的变化规律",progress:0,contentUrl:""}]},{id:"unit2_lesson6",title:"解决问题",duration:40,knowledgeItems:[{id:"unit2_lesson6_k1",title:"用小数除法解决实际问题",description:"能运用小数除法解决购物、分配等实际问题",progress:0,contentUrl:""}]}]},{id:"unit_3",title:"简易方程",description:"学习用字母表示数和解简易方程",estimatedDuration:"4周",totalLessons:14,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit3_lesson1",title:"用字母表示数",duration:40,knowledgeItems:[{id:"unit3_lesson1_k1",title:"用字母表示数",description:"初步理解用字母表示数的意义和作用",progress:0,contentUrl:""},{id:"unit3_lesson1_k2",title:"用字母表示运算定律和计算公式",description:"会用字母表示运算定律和计算公式",progress:0,contentUrl:""}]},{id:"unit3_lesson2",title:"方程的意义",duration:40,knowledgeItems:[{id:"unit3_lesson2_k1",title:"方程的概念",description:"理解方程的意义,知道方程与等式的区别和联系",progress:0,contentUrl:""}]},{id:"unit3_lesson3",title:"等式的性质",duration:40,knowledgeItems:[{id:"unit3_lesson3_k1",title:"等式的性质1",description:"理解等式的性质1:等式两边加上或减去同一个数,左右两边仍然相等",progress:0,contentUrl:""},{id:"unit3_lesson3_k2",title:"等式的性质2",description:"理解等式的性质2:等式两边乘同一个数,或除以同一个不为0的数,左右两边仍然相等",progress:0,contentUrl:""}]},{id:"unit3_lesson4",title:"解简易方程",duration:40,knowledgeItems:[{id:"unit3_lesson4_k1",title:"利用等式的性质解方程",description:"会利用等式的性质解形如x±a=b、ax=b、x÷a=b、a-x=b、a÷x=b的方程",progress:0,contentUrl:""}]},{id:"unit3_lesson5",title:"实际问题与方程",duration:40,knowledgeItems:[{id:"unit3_lesson5_k1",title:"列方程解决实际问题",description:"初步学会列方程解决一些简单的实际问题",progress:0,contentUrl:""}]}]},{id:"unit_4",title:"多边形的面积",description:"学习平行四边形、三角形、梯形和组合图形的面积计算",estimatedDuration:"3周",totalLessons:12,moduleCategory:"Graphics and Geometry",lessons:[{id:"unit4_lesson1",title:"平行四边形的面积",duration:40,knowledgeItems:[{id:"unit4_lesson1_k1",title:"平行四边形面积公式的推导",description:"通过割补法理解平行四边形面积公式的推导过程",progress:0,contentUrl:""},{id:"unit4_lesson1_k2",title:"平行四边形面积的计算",description:"掌握平行四边形面积计算公式:S=ah,并能正确运用",progress:0,contentUrl:""}]},{id:"unit4_lesson2",title:"三角形的面积",duration:40,knowledgeItems:[{id:"unit4_lesson2_k1",title:"三角形面积公式的推导",description:"通过拼摆法理解三角形面积公式的推导过程",progress:0,contentUrl:""},{id:"unit4_lesson2_k2",title:"三角形面积的计算",description:"掌握三角形面积计算公式:S=ah÷2,并能正确运用",progress:0,contentUrl:""}]},{id:"unit4_lesson3",title:"梯形的面积",duration:40,knowledgeItems:[{id:"unit4_lesson3_k1",title:"梯形面积公式的推导",description:"通过拼摆法理解梯形面积公式的推导过程",progress:0,contentUrl:""},{id:"unit4_lesson3_k2",title:"梯形面积的计算",description:"掌握梯形面积计算公式:S=(a+b)h÷2,并能正确运用",progress:0,contentUrl:""}]},{id:"unit4_lesson4",title:"组合图形的面积",duration:40,knowledgeItems:[{id:"unit4_lesson4_k1",title:"认识组合图形",description:"认识组合图形,会把组合图形分解成已学过的平面图形",progress:0,contentUrl:""},{id:"unit4_lesson4_k2",title:"计算组合图形的面积",description:"掌握计算组合图形面积的多种方法",progress:0,contentUrl:""}]}]},{id:"unit_5",title:"因数与倍数",description:"学习因数、倍数、质数、合数等概念",estimatedDuration:"3周",totalLessons:10,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit5_lesson1",title:"因数和倍数",duration:40,knowledgeItems:[{id:"unit5_lesson1_k1",title:"因数和倍数的意义",description:"理解因数和倍数的意义,掌握找一个数的因数和倍数的方法",progress:0,contentUrl:""},{id:"unit5_lesson1_k2",title:"因数和倍数的特征",description:"了解一个数的因数的个数是有限的,倍数的个数是无限的",progress:0,contentUrl:""}]},{id:"unit5_lesson2",title:"2、5、3的倍数的特征",duration:40,knowledgeItems:[{id:"unit5_lesson2_k1",title:"2、5的倍数的特征",description:"掌握2、5的倍数的特征,理解奇数和偶数的意义",progress:0,contentUrl:""},{id:"unit5_lesson2_k2",title:"3的倍数的特征",description:"掌握3的倍数的特征,能判断一个数是不是3的倍数",progress:0,contentUrl:""}]},{id:"unit5_lesson3",title:"质数和合数",duration:40,knowledgeItems:[{id:"unit5_lesson3_k1",title:"质数和合数的意义",description:"理解质数和合数的意义,能判断一个数是质数还是合数",progress:0,contentUrl:""},{id:"unit5_lesson3_k2",title:"制作100以内的质数表",description:"会制作100以内的质数表,熟记20以内的质数",progress:0,contentUrl:""}]}]},{id:"unit_6",title:"长方体和正方体",description:"学习长方体和正方体的特征、表面积和体积计算",estimatedDuration:"4周",totalLessons:14,moduleCategory:"Graphics and Geometry",lessons:[{id:"unit6_lesson1",title:"长方体和正方体的认识",duration:40,knowledgeItems:[{id:"unit6_lesson1_k1",title:"长方体的特征",description:"认识长方体的特征,了解长方体的长、宽、高",progress:0,contentUrl:""},{id:"unit6_lesson1_k2",title:"正方体的特征",description:"认识正方体的特征,理解正方体是特殊的长方体",progress:0,contentUrl:""}]},{id:"unit6_lesson2",title:"长方体和正方体的表面积",duration:40,knowledgeItems:[{id:"unit6_lesson2_k1",title:"表面积的意义",description:"理解表面积的意义,掌握长方体和正方体表面积的计算方法",progress:0,contentUrl:""},{id:"unit6_lesson2_k2",title:"表面积的实际应用",description:"能运用表面积知识解决一些实际问题",progress:0,contentUrl:""}]},{id:"unit6_lesson3",title:"长方体和正方体的体积",duration:40,knowledgeItems:[{id:"unit6_lesson3_k1",title:"体积和体积单位",description:"理解体积的意义,认识常用的体积单位",progress:0,contentUrl:""},{id:"unit6_lesson3_k2",title:"长方体和正方体体积的计算",description:"掌握长方体和正方体体积的计算公式",progress:0,contentUrl:""},{id:"unit6_lesson3_k3",title:"体积单位间的进率",description:"掌握体积单位之间的进率和换算",progress:0,contentUrl:""}]},{id:"unit6_lesson4",title:"容积和容积单位",duration:40,knowledgeItems:[{id:"unit6_lesson4_k1",title:"容积和容积单位",description:"理解容积的意义,认识常用的容积单位",progress:0,contentUrl:""},{id:"unit6_lesson4_k2",title:"容积和体积的关系",description:"掌握容积和体积之间的关系",progress:0,contentUrl:""}]}]},{id:"unit_7",title:"分数的意义和性质",description:"学习分数的意义、性质和约分、通分等方法",estimatedDuration:"4周",totalLessons:16,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit7_lesson1",title:"分数的意义",duration:40,knowledgeItems:[{id:"unit7_lesson1_k1",title:"分数的产生和意义",description:"理解分数的产生和意义,明确分数与除法的关系",progress:0,contentUrl:""},{id:"unit7_lesson1_k2",title:"分数单位",description:"认识分数单位,能说出一个分数中有几个这样的分数单位",progress:0,contentUrl:""}]},{id:"unit7_lesson2",title:"分数与除法",duration:40,knowledgeItems:[{id:"unit7_lesson2_k1",title:"分数与除法的关系",description:"理解分数与除法的关系,会用分数表示两个数相除的商",progress:0,contentUrl:""}]},{id:"unit7_lesson3",title:"真分数和假分数",duration:40,knowledgeItems:[{id:"unit7_lesson3_k1",title:"真分数和假分数的意义",description:"理解真分数和假分数的意义和特征",progress:0,contentUrl:""},{id:"unit7_lesson3_k2",title:"带分数",description:"认识带分数,会进行假分数与整数、带分数的互化",progress:0,contentUrl:""}]},{id:"unit7_lesson4",title:"分数的基本性质",duration:40,knowledgeItems:[{id:"unit7_lesson4_k1",title:"分数的基本性质",description:"理解分数的基本性质,能运用分数的基本性质进行分数的变形",progress:0,contentUrl:""}]},{id:"unit7_lesson5",title:"约分",duration:40,knowledgeItems:[{id:"unit7_lesson5_k1",title:"最大公因数",description:"理解公因数和最大公因数的意义,掌握求两个数的最大公因数的方法",progress:0,contentUrl:""},{id:"unit7_lesson5_k2",title:"约分的方法",description:"掌握约分的方法,能正确地进行约分",progress:0,contentUrl:""}]},{id:"unit7_lesson6",title:"通分",duration:40,knowledgeItems:[{id:"unit7_lesson6_k1",title:"最小公倍数",description:"理解公倍数和最小公倍数的意义,掌握求两个数的最小公倍数的方法",progress:0,contentUrl:""},{id:"unit7_lesson6_k2",title:"通分的方法",description:"掌握通分的方法,能正确地进行通分",progress:0,contentUrl:""}]},{id:"unit7_lesson7",title:"分数和小数的互化",duration:40,knowledgeItems:[{id:"unit7_lesson7_k1",title:"分数化成小数",description:"掌握分数化成小数的方法",progress:0,contentUrl:""},{id:"unit7_lesson7_k2",title:"小数化成分数",description:"掌握小数化成分数的方法",progress:0,contentUrl:""}]}]},{id:"unit_8",title:"分数的加法和减法",description:"学习同分母分数、异分母分数的加法和减法",estimatedDuration:"3周",totalLessons:12,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit8_lesson1",title:"同分母分数加、减法",duration:40,knowledgeItems:[{id:"unit8_lesson1_k1",title:"同分母分数加法的计算方法",description:"掌握同分母分数加法的计算方法",progress:0,contentUrl:""},{id:"unit8_lesson1_k2",title:"同分母分数减法的计算方法",description:"掌握同分母分数减法的计算方法",progress:0,contentUrl:""}]},{id:"unit8_lesson2",title:"异分母分数加、减法",duration:40,knowledgeItems:[{id:"unit8_lesson2_k1",title:"异分母分数加法的计算方法",description:"掌握异分母分数加法的计算方法:先通分,然后按照同分母分数加法进行计算",progress:0,contentUrl:""},{id:"unit8_lesson2_k2",title:"异分母分数减法的计算方法",description:"掌握异分母分数减法的计算方法:先通分,然后按照同分母分数减法进行计算",progress:0,contentUrl:""}]},{id:"unit8_lesson3",title:"分数加减混合运算",duration:40,knowledgeItems:[{id:"unit8_lesson3_k1",title:"分数加减混合运算的顺序",description:"掌握分数加减混合运算的运算顺序",progress:0,contentUrl:""},{id:"unit8_lesson3_k2",title:"整数加法运算定律推广到分数加法",description:"理解整数加法运算定律对于分数加法同样适用,能运用运算定律进行简便计算",progress:0,contentUrl:""}]}]},{id:"unit_9",title:"折线统计图",description:"学习单式折线统计图和复式折线统计图的认识和制作",estimatedDuration:"2周",totalLessons:6,moduleCategory:"Probability and Statistics",lessons:[{id:"unit9_lesson1",title:"单式折线统计图",duration:40,knowledgeItems:[{id:"unit9_lesson1_k1",title:"单式折线统计图的特点",description:"认识单式折线统计图,了解其特点和作用",progress:0,contentUrl:""},{id:"unit9_lesson1_k2",title:"绘制单式折线统计图",description:"能根据数据绘制单式折线统计图",progress:0,contentUrl:""}]},{id:"unit9_lesson2",title:"复式折线统计图",duration:40,knowledgeItems:[{id:"unit9_lesson2_k1",title:"复式折线统计图的特点",description:"认识复式折线统计图,了解其特点和作用",progress:0,contentUrl:""},{id:"unit9_lesson2_k2",title:"绘制复式折线统计图",description:"能根据数据绘制复式折线统计图",progress:0,contentUrl:""}]},{id:"unit9_lesson3",title:"数据分析",duration:40,knowledgeItems:[{id:"unit9_lesson3_k1",title:"根据统计图进行数据分析",description:"能根据折线统计图进行简单的数据分析,作出合理的判断和预测",progress:0,contentUrl:""}]}]}]},my=py,hy=Qt,gy=y.createContext(null),by=()=>{const e=y.useContext(gy);if(!e)throw new Error("useGradeUnitBrowser must be used within GradeUnitBrowserProvider");return e},yy=({gradeId:e,userId:t,onLearnAction:n,className:r,userInfo:s,exploreMenu:o})=>{const{userInfo:i,exploreMenu:a,unitsData:c,lessons:u,loading:l,error:d,activeUnitId:m,activeLessonIds:w,setActiveUnit:p,toggleLesson:v,loadPageData:b}=by(),S=s??i,M=o??a;y.useEffect(()=>{b(e,t)},[e,t,b]),y.useEffect(()=>{console.log("activeUnitId from context:",m),console.log("lessons from context:",u);const $=c?.units?.find(N=>N.unitId===m)||null,I=$&&m&&u[m]?{id:$.unitId,title:$.title,description:$.description,estimatedDuration:$.estimatedDuration,totalLessons:$.totalLessons,moduleCategory:$.moduleCategory,lessons:u[m]}:null;console.log("activeUnit computed:",I)},[m,u,c]);const A=c?.units?.find($=>$.unitId===m)||null,O=A&&m&&u[m]?{id:A.unitId,title:A.title,description:A.description,estimatedDuration:A.estimatedDuration,totalLessons:A.totalLessons,moduleCategory:A.moduleCategory,lessons:u[m]}:null;return l?f.jsx("div",{className:"grade-unit-browser-page loading","data-testid":"grade-unit-browser-page",children:f.jsx("div",{className:"loading-spinner","data-testid":"loading-spinner",children:"加载中..."})}):d?f.jsxs("div",{className:"grade-unit-browser-page error","data-testid":"grade-unit-browser-page",children:[f.jsx("div",{className:"error-message","data-testid":"error-message",children:d}),f.jsx("button",{onClick:()=>b(e,t),className:"retry-button",children:"重试"})]}):f.jsxs("div",{className:`grade-unit-browser-page ${r||""}`,"data-testid":"grade-unit-browser-page",children:[f.jsx("div",{className:"header-area",children:f.jsx(vc,{userData:S||void 0,exploreItems:M})}),f.jsx("div",{className:"sidebar-area",children:f.jsx(Nl,{data:c,activeUnitId:m,onUnitSelect:p,loading:l})}),f.jsx("div",{className:"content-area",children:f.jsx(Al,{unit:O,activeLessonIds:w,onToggleLesson:v,onLearnAction:n||(()=>{}),loading:l})})]})},vy={"Arithmetic and Algebra":"🔢","Graphics and Geometry":"📐","Probability and Statistics":"📊",Default:"📚"},wy={mastered:"已掌握",proficient:"熟练",familiar:"熟悉",attempted:"已尝试","not-started":"未开始"},xy={mastered:"#10b981",proficient:"#3b82f6",familiar:"#f59e0b",attempted:"#8b5cf6","not-started":"#6b7280"},Ee=(e,t,n)=>({x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}),Ty=()=>{const e={x:.5,y:.1,name:"A"},t={x:.1,y:.75,name:"B"},n={x:.9,y:.75,name:"C"},r={...Ee(e,t,1/3),name:"D"},s={...Ee(e,n,1/3),name:"E"},o={...Ee(e,t,2/3),name:"M"},i={...Ee(e,n,2/3),name:"N"},a={...Ee(t,n,1/3),name:"P"},c={...Ee(t,n,2/3),name:"Q"},u={...Ee(r,s,1/3),name:"U"},l={...Ee(r,s,2/3),name:"S"},d={...Ee(o,i,1/3),name:"K"},m={...Ee(o,i,2/3),name:"L"};return{A:e,B:t,C:n,D:r,E:s,M:o,N:i,P:a,Q:c,U:u,S:l,K:d,L:m}},Ey=(e,t,n)=>{const r={};for(const[s,o]of Object.entries(e))r[s]={...o,x:o.x*t,y:o.y*n};return r},Sy=(e,t)=>{const[n,r,s]=t,{x:o,y:i}=e,a=(r.y-s.y)*(n.x-s.x)+(s.x-r.x)*(n.y-s.y);if(Math.abs(a)<1e-4)return!1;const c=((r.y-s.y)*(o-s.x)+(s.x-r.x)*(i-s.y))/a,u=((s.y-n.y)*(o-s.x)+(n.x-s.x)*(i-s.y))/a,l=1-c-u;return c>=-.001&&u>=-.001&&l>=-.001},Cy=(e,t)=>{if(!e||!t||e.length!==3||t.length!==3)return!1;const n=e.map(s=>s.name).sort(),r=t.map(s=>s.name).sort();return n.every((s,o)=>s===r[o])},Py=(e,t)=>{if(!e||!t||e.length!==t.length)return!1;const n=e.map(s=>s.name).sort(),r=t.map(s=>s.name).sort();return n.join("")===r.join("")},ky=()=>[{from:"A",to:"B"},{from:"A",to:"C"},{from:"B",to:"C"},{from:"D",to:"E"},{from:"M",to:"N"},{from:"P",to:"Q"},{from:"A",to:"D"},{from:"A",to:"E"},{from:"A",to:"M"},{from:"A",to:"N"},{from:"A",to:"P"},{from:"A",to:"Q"},{from:"D",to:"U"},{from:"U",to:"S"},{from:"S",to:"E"},{from:"M",to:"K"},{from:"K",to:"L"},{from:"L",to:"N"},{from:"B",to:"P"},{from:"P",to:"Q"},{from:"Q",to:"C"}],Ay=()=>[{id:"gem_1",vertices:["A","B","P"],points:10,category:"basic"},{id:"gem_2",vertices:["A","P","Q"],points:10,category:"basic"},{id:"gem_3",vertices:["A","Q","C"],points:10,category:"basic"},{id:"gem_4",vertices:["A","B","Q"],points:15,category:"medium"},{id:"gem_5",vertices:["A","P","C"],points:15,category:"medium"},{id:"gem_6",vertices:["A","B","C"],points:20,category:"large"},{id:"gem_7",vertices:["A","D","U"],points:12,category:"ade_small"},{id:"gem_8",vertices:["A","U","S"],points:12,category:"ade_small"},{id:"gem_9",vertices:["A","S","E"],points:12,category:"ade_small"},{id:"gem_10",vertices:["A","D","S"],points:18,category:"ade_medium"},{id:"gem_11",vertices:["A","U","E"],points:18,category:"ade_medium"},{id:"gem_12",vertices:["A","D","E"],points:25,category:"ade_large"},{id:"gem_13",vertices:["A","M","K"],points:14,category:"amn_small"},{id:"gem_14",vertices:["A","K","L"],points:14,category:"amn_small"},{id:"gem_15",vertices:["A","L","N"],points:14,category:"amn_small"},{id:"gem_16",vertices:["A","M","L"],points:20,category:"amn_medium"},{id:"gem_17",vertices:["A","K","N"],points:20,category:"amn_medium"},{id:"gem_18",vertices:["A","M","N"],points:30,category:"amn_large"}],$y={TOTAL_GEMS:18,CANVAS_RATIO:4/3,DEFAULT_VIEWBOX:{width:700,height:600},POINT_RADIUS:{default:6,selected:9},TOLERANCE:.001,MIN_TRIANGLE_AREA:.001,COORDINATE_PRECISION:1e-4,BARYCENTRIC_TOLERANCE:-.001},kc=(e=Qt.id)=>{const t=he.units.map((s,o)=>{const i=Math.min(100,Math.max(0,o*15+Math.random()*20)),a=Math.floor(s.lessons.length*i/100),c=s.lessons.map((u,l)=>{const d=Math.min(100,Math.max(0,i-l*10+Math.random()*30));return{lessonId:u.id,status:d>=100?"completed":d>0?"in-progress":"not-started",progressPercentage:Math.round(d),lastAccessed:d>0?new Date(Date.now()-Math.random()*7*24*60*60*1e3).toISOString():void 0,timeSpent:d>0?Math.floor(Math.random()*120+10):void 0,score:d>=100?Math.floor(Math.random()*21+80):void 0,attempts:d>0?Math.floor(Math.random()*3+1):void 0}});return{unitId:s.id,userId:e,totalLessons:s.lessons.length,completedLessons:a,progressPercentage:Math.round(i),status:i>=100?"completed":i>0?"in-progress":"not-started",lastAccessed:i>0?new Date(Date.now()-Math.random()*14*24*60*60*1e3).toISOString():void 0,lessons:c}}),n=t.reduce((s,o)=>s+o.progressPercentage,0)/t.length,r=t.filter(s=>s.status==="completed").length;return{courseId:he.id,userId:e,totalUnits:t.length,completedUnits:r,progressPercentage:Math.round(n),status:n>=100?"completed":n>0?"in-progress":"not-started",lastAccessed:new Date(Date.now()-Math.random()*3*24*60*60*1e3).toISOString(),units:t}},Ac=kc(),eo=(e,t)=>e===Qt.id&&t===he.id?Ac:null,$c=(e,t,n)=>{const r=eo(e,t);return r&&r.units.find(s=>s.unitId===n)||null},_y=(e,t,n,r)=>{const s=$c(e,t,n);return s&&s.lessons.find(o=>o.lessonId===r)||null},My=(e,t,n,r,s)=>(console.log("Updating lesson progress:",{userId:e,courseId:t,unitId:n,lessonId:r,progress:s}),!0),to=(e,t)=>{const n=eo(e,t);if(!n)return null;const r=he.units.map((s,o)=>{const i=n.units.find(a=>a.unitId===s.id);return{unitId:s.id,title:s.title,description:s.description,moduleCategory:s.moduleCategory,estimatedDuration:s.estimatedDuration,totalLessons:s.lessons.length,completedLessons:i?.completedLessons||0,progressPercentage:i?.progressPercentage||0,status:i?.status||"not-started",lastAccessed:i?.lastAccessed,isActive:o===0,route:`/math/grade-${he.level}/unit/${s.id}`}});return{userId:e,courseId:he.id,courseTitle:he.title,courseLevel:he.level,totalUnits:r.length,completedUnits:r.filter(s=>s.status==="completed").length,overallProgress:n.progressPercentage,status:n.status,lastAccessed:n.lastAccessed,units:r}},Ny=(e,t,n)=>{const r=to(e,t);return r&&r.units.find(s=>s.unitId===n)||null},Oy=(e,t,n,r)=>(console.log("Updating unit active status:",{userId:e,courseId:t,unitId:n,isActive:r}),!0),Iy=to(Qt.id,he.id),Ly={userId:Qt.id,courseId:he.id,courseTitle:he.title,courseLevel:he.level,totalUnits:he.units.length,completedUnits:3,overallProgress:45,status:"in-progress",lastAccessed:"2024-01-15T10:30:00Z",units:[{unitId:"unit_1",title:"小数乘法",description:"学习小数乘法的计算方法及应用",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"3周",totalLessons:10,completedLessons:8,progressPercentage:80,status:"completed",lastAccessed:"2024-01-10T14:20:00Z",isActive:!1,route:"/math/grade-5/unit/unit_1",icon:"🔢"},{unitId:"unit_2",title:"小数除法",description:"学习小数除法的计算方法及应用",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"3周",totalLessons:12,completedLessons:6,progressPercentage:50,status:"in-progress",lastAccessed:"2024-01-15T10:30:00Z",isActive:!0,route:"/math/grade-5/unit/unit_2",icon:"➗"},{unitId:"unit_3",title:"简易方程",description:"学习用字母表示数和解简易方程",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"4周",totalLessons:14,completedLessons:2,progressPercentage:14,status:"in-progress",lastAccessed:"2024-01-12T16:45:00Z",isActive:!1,route:"/math/grade-5/unit/unit_3",icon:"📝"},{unitId:"unit_4",title:"多边形的面积",description:"学习平行四边形、三角形、梯形和组合图形的面积计算",moduleCategory:"Graphics and Geometry",estimatedDuration:"3周",totalLessons:12,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_4",icon:"📐"},{unitId:"unit_5",title:"因数与倍数",description:"学习因数、倍数、质数、合数等概念",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"3周",totalLessons:10,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_5",icon:"🔢"},{unitId:"unit_6",title:"长方体和正方体",description:"学习长方体和正方体的特征、表面积和体积计算",moduleCategory:"Graphics and Geometry",estimatedDuration:"4周",totalLessons:14,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_6",icon:"📦"},{unitId:"unit_7",title:"分数的意义和性质",description:"学习分数的意义、性质和约分、通分等方法",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"4周",totalLessons:16,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_7",icon:"½"},{unitId:"unit_8",title:"分数的加法和减法",description:"学习同分母分数、异分母分数的加法和减法",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"3周",totalLessons:12,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_8",icon:"➕"},{unitId:"unit_9",title:"折线统计图",description:"学习单式折线统计图和复式折线统计图的认识和制作",moduleCategory:"Probability and Statistics",estimatedDuration:"2周",totalLessons:6,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_9",icon:"📊"}]};var jy=Am;const Dy=Object.freeze(Object.defineProperty({__proto__:null,default:jy},Symbol.toStringTag,{value:"Module"}));H.AbilityAssessmentDashboard=fy,H.AbilityProgressBar=Sc,H.Button=io,H.ContentAccordion=Al,H.GEOMETRY_CONFIG=$y,H.GradeUnitBrowserPage=yy,H.MOCK_USER_COURSE_PROGRESS=Ac,H.MOCK_USER_GRADE_UNITS_NAV=Iy,H.MOCK_USER_GRADE_UNITS_PROGRESS=Ly,H.MathWizHeader=vc,H.PersonalizedAdvicePanel=Cc,H.RadarChart=wc,H.RecommendationCard=Pc,H.Sidebar=Nl,H.Submenu=Bs,H.UserProfile=yc,H.calculateGamePoints=Ty,H.categoryIcons=vy,H.comparePointArrays=Py,H.courseData=he,H.exploreItems=my,H.generateMockUserCourseProgress=kc,H.getBasicGemDefinitions=Ay,H.getBasicLineDefinitions=ky,H.getUnitNavItem=Ny,H.getUserCourseProgress=eo,H.getUserGradeUnitsNav=to,H.getUserLessonProgress=_y,H.getUserUnitProgress=$c,H.isPointInTriangle=Sy,H.pointOnLine=Ee,H.statusColors=xy,H.statusMapping=wy,H.toPixelCoordinates=Ey,H.trianglesMatch=Cy,H.updateUnitActiveStatus=Oy,H.updateUserLessonProgress=My,H.userData=hy,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"})}));
65
+ */const ss=Ye("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Rt=e=>e===0?"开始学习":e===100?"复习":"继续学习",rs=e=>{if(e.length===0)return 0;const t=e.reduce((n,s)=>n+s.progress,0);return Math.round(t/e.length)},os=({knowledgeItem:e,onLearnAction:t})=>{const n=()=>{t(e)};return console.log("KnowledgeCard render:",{progress:e.progress,text:Rt(e.progress)}),c.jsxs(Ke.Card,{className:"content-accordion__knowledge-card",children:[c.jsxs(Ke.CardBody,{children:[c.jsx("h3",{className:"content-accordion__knowledge-title",children:e.title}),c.jsx("p",{className:"content-accordion__knowledge-description",children:e.description})]}),c.jsxs(Ke.CardFooter,{className:"content-accordion__knowledge-actions",children:[c.jsxs("div",{className:"content-accordion__progress-container",children:[c.jsx(Jn.Progress,{value:e.progress,size:"sm","aria-label":`${e.title} 进度`,className:"content-accordion__progress-bar"}),c.jsxs("span",{className:"content-accordion__progress-text",children:[e.progress,"%"]})]}),c.jsx(St,{size:"sm",radius:"md",onClick:n,progress:e.progress,variant:e.progress===100?"light":e.progress===0?"solid":"bordered",className:"content-accordion__learn-button",children:Rt(e.progress)})]})]})},is=({lesson:e,isExpanded:t,onToggle:n,onLearnAction:s})=>{const r=()=>{n(e.id)},i=rs(e.knowledgeItems);return c.jsxs("div",{className:`content-accordion__lesson-item ${t?"content-accordion__lesson-item--expanded":""}`,children:[c.jsxs("div",{className:"content-accordion__lesson-header",onClick:r,role:"button",tabIndex:0,"aria-expanded":t,"aria-label":`${e.title},点击${t?"收起":"展开"}`,children:[c.jsxs("div",{className:"content-accordion__lesson-header-content",children:[c.jsx("h2",{className:"content-accordion__lesson-title",children:e.title}),c.jsxs("span",{className:"content-accordion__lesson-duration",children:["约 ",e.duration," 分钟"]})]}),c.jsxs("div",{className:"content-accordion__lesson-actions",children:[c.jsxs("span",{className:"content-accordion__lesson-progress",children:[i,"%"]}),t?c.jsx(ns,{className:"content-accordion__lesson-icon"}):c.jsx(ss,{className:"content-accordion__lesson-icon"})]})]}),t&&c.jsx("div",{className:"content-accordion__knowledge-list",children:e.knowledgeItems.map(o=>c.jsx(os,{knowledgeItem:o,onLearnAction:s},o.id))})]})},kt=({unit:e,activeLessonIds:t,onToggleLesson:n,onLearnAction:s,loading:r=!1,className:i="",emptyState:o})=>r?c.jsx("div",{className:"content-accordion content-accordion--loading",children:c.jsx("div",{className:"content-accordion__loading",children:"加载中..."})}):e?c.jsxs("div",{className:`content-accordion ${i}`,children:[c.jsxs("header",{className:"content-accordion__header",children:[c.jsx("h1",{className:"content-accordion__unit-title",children:e.title}),c.jsx("p",{className:"content-accordion__unit-description",children:e.description}),c.jsxs("div",{className:"content-accordion__unit-meta",children:[c.jsxs("span",{children:["总共 ",e.totalLessons," 节课"]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["预计学习 ",e.estimatedDuration]})]})]}),c.jsx("div",{className:"content-accordion__lessons",children:e.lessons.map(l=>c.jsx(is,{lesson:l,isExpanded:t.includes(l.id),onToggle:n,onLearnAction:s},l.id))})]}):c.jsx("div",{className:"content-accordion content-accordion--empty",children:o||c.jsx("div",{className:"content-accordion__empty",children:"暂无学习内容"})}),as=e=>{switch(e){case"completed":return"success";case"in-progress":return"primary";case"not-started":default:return"default"}},Nt=({data:e,loading:t=!1,error:n=null,collapsed:s=!1,onToggleCollapse:r,activeUnitId:i=null,onUnitSelect:o,renderUnitItem:l,className:m="",unitItemClassName:f="",style:u={},unitItemStyle:h={}})=>{const x=(g,E)=>{E.preventDefault(),o?.(g)},O=()=>{r?.()},p=g=>c.jsxs("div",{className:`sidebar__unit-item ${f} ${i===g.unitId?"sidebar__unit-item--active":""} ${g.status?`sidebar__unit-item--${g.status}`:""}`,style:h,onClick:E=>x(g.unitId,E),role:"button",tabIndex:0,"aria-label":`${g.title},进度 ${g.progressPercentage}%`,children:[c.jsxs("div",{className:"sidebar__unit-item__content",children:[g.icon&&c.jsx("span",{className:"sidebar__unit-item__icon",children:g.icon}),!s&&c.jsx("span",{className:"sidebar__unit-item__title",children:g.title})]}),!s&&g.progressPercentage!==void 0&&c.jsxs("div",{className:"sidebar__unit-item__progress",children:[c.jsx(ye.Progress,{value:g.progressPercentage,size:"sm",color:as(g.status),"aria-label":`${g.title} 进度`}),c.jsxs("span",{className:"progress-percentage",children:[g.progressPercentage,"%"]})]})]},g.unitId),y=()=>t?c.jsx("div",{className:"sidebar__loading",children:"加载中..."}):n?c.jsxs("div",{className:"sidebar__error",children:["加载失败: ",n.message]}):e?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"sidebar__header",children:[c.jsx("button",{className:"sidebar__toggle-btn",onClick:O,"aria-label":"切换侧边栏折叠状态",children:s?"→":"←"}),!s&&c.jsxs("div",{className:"sidebar__course-info",children:[c.jsx("h3",{className:"sidebar__course-title",children:e.courseTitle}),c.jsxs("span",{className:"sidebar__course-level",children:[e.courseLevel,"年级"]})]})]}),c.jsx("nav",{className:"sidebar__content",children:c.jsx("ul",{className:"sidebar__unit-list",children:e.units&&e.units.length>0?e.units.map(g=>c.jsx("li",{children:l?l(g,g):p(g)},g.unitId)):c.jsx("div",{className:"sidebar__empty",children:"暂无单元数据"})})})]}):c.jsx("div",{className:"sidebar__empty",children:"暂无课程数据"});return c.jsx("aside",{className:`sidebar ${m} ${s?"sidebar--collapsed":""} ${t?"sidebar--loading":""} ${n?"sidebar--error":""}`,style:u,"aria-label":"课程导航侧边栏",role:"complementary",children:y()})},Xe=({trigger:e,items:t,position:n="bottom",alignment:s="start",openDelay:r=300,closeDelay:i=100,onOpen:o,onClose:l,renderItem:m,itemConfig:f={},className:u,menuClassName:h,itemClassName:x})=>{const[O,p]=R.useState(!1),y=R.useRef(null),g=R.useRef(null),E=()=>{y.current&&clearTimeout(y.current),g.current&&clearTimeout(g.current)},k=()=>{E(),y.current=setTimeout(()=>{p(!0),o?.()},r)},N=()=>{E(),g.current=setTimeout(()=>{p(!1),l?.()},i)},P=w=>{!w.disabled&&w.onClick&&w.onClick(w)};R.useEffect(()=>()=>E(),[]);const A=w=>c.jsxs("div",{className:`submenu-item ${w.disabled?"is-disabled":""} ${x||""}`,onClick:()=>P(w),children:[w.icon&&c.jsx("span",{className:"submenu-item-icon",children:w.icon}),c.jsx("span",{children:w.label})]},w.id),I=()=>{const w=["submenu-panel"];return h&&w.push(h),w.push(`position-${n}`),s!=="start"&&w.push(`alignment-${s}`),O&&w.push("is-open"),w.join(" ")};return c.jsxs("div",{className:`submenu-container ${u||""}`,onMouseEnter:k,onMouseLeave:N,children:[c.jsx("div",{className:"submenu-trigger",children:e}),c.jsx("div",{className:I(),children:t.map(w=>m?m(w,f):A(w))})]})};function jt(e,t){return function(){return e.apply(t,arguments)}}const{toString:ls}=Object.prototype,{getPrototypeOf:Ze}=Object,{iterator:Ue,toStringTag:Ot}=Symbol,Te=(e=>t=>{const n=ls.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ee=e=>(e=e.toLowerCase(),t=>Te(t)===e),Pe=e=>t=>typeof t===e,{isArray:fe}=Array,me=Pe("undefined");function ve(e){return e!==null&&!me(e)&&e.constructor!==null&&!me(e.constructor)&&K(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ut=ee("ArrayBuffer");function cs(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ut(e.buffer),t}const us=Pe("string"),K=Pe("function"),Tt=Pe("number"),Ee=e=>e!==null&&typeof e=="object",ds=e=>e===!0||e===!1,Ie=e=>{if(Te(e)!=="object")return!1;const t=Ze(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ot in e)&&!(Ue in e)},fs=e=>{if(!Ee(e)||ve(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ms=ee("Date"),ps=ee("File"),hs=ee("Blob"),gs=ee("FileList"),_s=e=>Ee(e)&&K(e.pipe),bs=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||K(e.append)&&((t=Te(e))==="formdata"||t==="object"&&K(e.toString)&&e.toString()==="[object FormData]"))},ys=ee("URLSearchParams"),[xs,ws,vs,Es]=["ReadableStream","Request","Response","Headers"].map(ee),Ss=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Se(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,r;if(typeof e!="object"&&(e=[e]),fe(e))for(s=0,r=e.length;s<r;s++)t.call(null,e[s],s,e);else{if(ve(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let l;for(s=0;s<o;s++)l=i[s],t.call(null,e[l],l,e)}}function Pt(e,t){if(ve(e))return null;t=t.toLowerCase();const n=Object.keys(e);let s=n.length,r;for(;s-- >0;)if(r=n[s],t===r.toLowerCase())return r;return null}const le=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,It=e=>!me(e)&&e!==le;function Qe(){const{caseless:e,skipUndefined:t}=It(this)&&this||{},n={},s=(r,i)=>{const o=e&&Pt(n,i)||i;Ie(n[o])&&Ie(r)?n[o]=Qe(n[o],r):Ie(r)?n[o]=Qe({},r):fe(r)?n[o]=r.slice():(!t||!me(r))&&(n[o]=r)};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Se(arguments[r],s);return n}const As=(e,t,n,{allOwnKeys:s}={})=>(Se(t,(r,i)=>{n&&K(r)?e[i]=jt(r,n):e[i]=r},{allOwnKeys:s}),e),Cs=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Rs=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ks=(e,t,n,s)=>{let r,i,o;const l={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),i=r.length;i-- >0;)o=r[i],(!s||s(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=n!==!1&&Ze(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ns=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},js=e=>{if(!e)return null;if(fe(e))return e;let t=e.length;if(!Tt(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Os=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ze(Uint8Array)),Us=(e,t)=>{const s=(e&&e[Ue]).call(e);let r;for(;(r=s.next())&&!r.done;){const i=r.value;t.call(e,i[0],i[1])}},Ts=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},Ps=ee("HTMLFormElement"),Is=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,r){return s.toUpperCase()+r}),Lt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Ls=ee("RegExp"),Dt=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};Se(n,(r,i)=>{let o;(o=t(r,i,e))!==!1&&(s[i]=o||r)}),Object.defineProperties(e,s)},Ds=e=>{Dt(e,(t,n)=>{if(K(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=e[n];if(K(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Ms=(e,t)=>{const n={},s=r=>{r.forEach(i=>{n[i]=!0})};return fe(e)?s(e):s(String(e).split(t)),n},Fs=()=>{},$s=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Bs(e){return!!(e&&K(e.append)&&e[Ot]==="FormData"&&e[Ue])}const qs=e=>{const t=new Array(10),n=(s,r)=>{if(Ee(s)){if(t.indexOf(s)>=0)return;if(ve(s))return s;if(!("toJSON"in s)){t[r]=s;const i=fe(s)?[]:{};return Se(s,(o,l)=>{const m=n(o,r+1);!me(m)&&(i[l]=m)}),t[r]=void 0,i}}return s};return n(e,0)},Hs=ee("AsyncFunction"),Ws=e=>e&&(Ee(e)||K(e))&&K(e.then)&&K(e.catch),Mt=((e,t)=>e?setImmediate:t?((n,s)=>(le.addEventListener("message",({source:r,data:i})=>{r===le&&i===n&&s.length&&s.shift()()},!1),r=>{s.push(r),le.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",K(le.postMessage)),zs=typeof queueMicrotask<"u"?queueMicrotask.bind(le):typeof process<"u"&&process.nextTick||Mt,d={isArray:fe,isArrayBuffer:Ut,isBuffer:ve,isFormData:bs,isArrayBufferView:cs,isString:us,isNumber:Tt,isBoolean:ds,isObject:Ee,isPlainObject:Ie,isEmptyObject:fs,isReadableStream:xs,isRequest:ws,isResponse:vs,isHeaders:Es,isUndefined:me,isDate:ms,isFile:ps,isBlob:hs,isRegExp:Ls,isFunction:K,isStream:_s,isURLSearchParams:ys,isTypedArray:Os,isFileList:gs,forEach:Se,merge:Qe,extend:As,trim:Ss,stripBOM:Cs,inherits:Rs,toFlatObject:ks,kindOf:Te,kindOfTest:ee,endsWith:Ns,toArray:js,forEachEntry:Us,matchAll:Ts,isHTMLForm:Ps,hasOwnProperty:Lt,hasOwnProp:Lt,reduceDescriptors:Dt,freezeMethods:Ds,toObjectSet:Ms,toCamelCase:Is,noop:Fs,toFiniteNumber:$s,findKey:Pt,global:le,isContextDefined:It,isSpecCompliantForm:Bs,toJSONObject:qs,isAsyncFn:Hs,isThenable:Ws,setImmediate:Mt,asap:zs,isIterable:e=>e!=null&&K(e[Ue])};function C(e,t,n,s,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),r&&(this.response=r,this.status=r.status?r.status:null)}d.inherits(C,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.status}}});const Ft=C.prototype,$t={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{$t[e]={value:e}}),Object.defineProperties(C,$t),Object.defineProperty(Ft,"isAxiosError",{value:!0}),C.from=(e,t,n,s,r,i)=>{const o=Object.create(Ft);d.toFlatObject(e,o,function(u){return u!==Error.prototype},f=>f!=="isAxiosError");const l=e&&e.message?e.message:"Error",m=t==null&&e?e.code:t;return C.call(o,l,m,n,s,r),e&&o.cause==null&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",i&&Object.assign(o,i),o};const Js=null;function et(e){return d.isPlainObject(e)||d.isArray(e)}function Bt(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function qt(e,t,n){return e?e.concat(t).map(function(r,i){return r=Bt(r),!n&&i?"["+r+"]":r}).join(n?".":""):t}function Gs(e){return d.isArray(e)&&!e.some(et)}const Vs=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Le(e,t,n){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=d.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,g){return!d.isUndefined(g[y])});const s=n.metaTokens,r=n.visitor||u,i=n.dots,o=n.indexes,m=(n.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(t);if(!d.isFunction(r))throw new TypeError("visitor must be a function");function f(p){if(p===null)return"";if(d.isDate(p))return p.toISOString();if(d.isBoolean(p))return p.toString();if(!m&&d.isBlob(p))throw new C("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(p)||d.isTypedArray(p)?m&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,y,g){let E=p;if(p&&!g&&typeof p=="object"){if(d.endsWith(y,"{}"))y=s?y:y.slice(0,-2),p=JSON.stringify(p);else if(d.isArray(p)&&Gs(p)||(d.isFileList(p)||d.endsWith(y,"[]"))&&(E=d.toArray(p)))return y=Bt(y),E.forEach(function(N,P){!(d.isUndefined(N)||N===null)&&t.append(o===!0?qt([y],P,i):o===null?y:y+"[]",f(N))}),!1}return et(p)?!0:(t.append(qt(g,y,i),f(p)),!1)}const h=[],x=Object.assign(Vs,{defaultVisitor:u,convertValue:f,isVisitable:et});function O(p,y){if(!d.isUndefined(p)){if(h.indexOf(p)!==-1)throw Error("Circular reference detected in "+y.join("."));h.push(p),d.forEach(p,function(E,k){(!(d.isUndefined(E)||E===null)&&r.call(t,E,d.isString(k)?k.trim():k,y,x))===!0&&O(E,y?y.concat(k):[k])}),h.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return O(e),t}function Ht(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function tt(e,t){this._pairs=[],e&&Le(e,this,t)}const Wt=tt.prototype;Wt.append=function(t,n){this._pairs.push([t,n])},Wt.toString=function(t){const n=t?function(s){return t.call(this,s,Ht)}:Ht;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function Ks(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function zt(e,t,n){if(!t)return e;const s=n&&n.encode||Ks;d.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let i;if(r?i=r(t,n):i=d.isURLSearchParams(t)?t.toString():new tt(t,n).toString(s),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Jt{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){d.forEach(this.handlers,function(s){s!==null&&t(s)})}}const Gt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ys={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:tt,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},nt=typeof window<"u"&&typeof document<"u",st=typeof navigator=="object"&&navigator||void 0,Xs=nt&&(!st||["ReactNative","NativeScript","NS"].indexOf(st.product)<0),Zs=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Qs=nt&&window.location.href||"http://localhost",W={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:nt,hasStandardBrowserEnv:Xs,hasStandardBrowserWebWorkerEnv:Zs,navigator:st,origin:Qs},Symbol.toStringTag,{value:"Module"})),...Ys};function er(e,t){return Le(e,new W.classes.URLSearchParams,{visitor:function(n,s,r,i){return W.isNode&&d.isBuffer(n)?(this.append(s,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function tr(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function nr(e){const t={},n=Object.keys(e);let s;const r=n.length;let i;for(s=0;s<r;s++)i=n[s],t[i]=e[i];return t}function Vt(e){function t(n,s,r,i){let o=n[i++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),m=i>=n.length;return o=!o&&d.isArray(r)?r.length:o,m?(d.hasOwnProp(r,o)?r[o]=[r[o],s]:r[o]=s,!l):((!r[o]||!d.isObject(r[o]))&&(r[o]=[]),t(n,s,r[o],i)&&d.isArray(r[o])&&(r[o]=nr(r[o])),!l)}if(d.isFormData(e)&&d.isFunction(e.entries)){const n={};return d.forEachEntry(e,(s,r)=>{t(tr(s),r,n,0)}),n}return null}function sr(e,t,n){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const Ae={transitional:Gt,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",r=s.indexOf("application/json")>-1,i=d.isObject(t);if(i&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return r?JSON.stringify(Vt(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t)||d.isReadableStream(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return er(t,this.formSerializer).toString();if((l=d.isFileList(t))||s.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return Le(l?{"files[]":t}:t,m&&new m,this.formSerializer)}}return i||r?(n.setContentType("application/json",!1),sr(t)):t}],transformResponse:[function(t){const n=this.transitional||Ae.transitional,s=n&&n.forcedJSONParsing,r=this.responseType==="json";if(d.isResponse(t)||d.isReadableStream(t))return t;if(t&&d.isString(t)&&(s&&!this.responseType||r)){const o=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t,this.parseReviver)}catch(l){if(o)throw l.name==="SyntaxError"?C.from(l,C.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:W.classes.FormData,Blob:W.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{Ae.headers[e]={}});const rr=d.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),or=e=>{const t={};let n,s,r;return e&&e.split(`
66
+ `).forEach(function(o){r=o.indexOf(":"),n=o.substring(0,r).trim().toLowerCase(),s=o.substring(r+1).trim(),!(!n||t[n]&&rr[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t},Kt=Symbol("internals");function Ce(e){return e&&String(e).trim().toLowerCase()}function De(e){return e===!1||e==null?e:d.isArray(e)?e.map(De):String(e)}function ir(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const ar=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function rt(e,t,n,s,r){if(d.isFunction(s))return s.call(this,t,n);if(r&&(t=n),!!d.isString(t)){if(d.isString(s))return t.indexOf(s)!==-1;if(d.isRegExp(s))return s.test(t)}}function lr(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function cr(e,t){const n=d.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{value:function(r,i,o){return this[s].call(this,t,r,i,o)},configurable:!0})})}let Y=class{constructor(t){t&&this.set(t)}set(t,n,s){const r=this;function i(l,m,f){const u=Ce(m);if(!u)throw new Error("header name must be a non-empty string");const h=d.findKey(r,u);(!h||r[h]===void 0||f===!0||f===void 0&&r[h]!==!1)&&(r[h||m]=De(l))}const o=(l,m)=>d.forEach(l,(f,u)=>i(f,u,m));if(d.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(d.isString(t)&&(t=t.trim())&&!ar(t))o(or(t),n);else if(d.isObject(t)&&d.isIterable(t)){let l={},m,f;for(const u of t){if(!d.isArray(u))throw TypeError("Object iterator must return a key-value pair");l[f=u[0]]=(m=l[f])?d.isArray(m)?[...m,u[1]]:[m,u[1]]:u[1]}o(l,n)}else t!=null&&i(n,t,s);return this}get(t,n){if(t=Ce(t),t){const s=d.findKey(this,t);if(s){const r=this[s];if(!n)return r;if(n===!0)return ir(r);if(d.isFunction(n))return n.call(this,r,s);if(d.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ce(t),t){const s=d.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||rt(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let r=!1;function i(o){if(o=Ce(o),o){const l=d.findKey(s,o);l&&(!n||rt(s,s[l],l,n))&&(delete s[l],r=!0)}}return d.isArray(t)?t.forEach(i):i(t),r}clear(t){const n=Object.keys(this);let s=n.length,r=!1;for(;s--;){const i=n[s];(!t||rt(this,this[i],i,t,!0))&&(delete this[i],r=!0)}return r}normalize(t){const n=this,s={};return d.forEach(this,(r,i)=>{const o=d.findKey(s,i);if(o){n[o]=De(r),delete n[i];return}const l=t?lr(i):String(i).trim();l!==i&&delete n[i],n[l]=De(r),s[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return d.forEach(this,(s,r)=>{s!=null&&s!==!1&&(n[r]=t&&d.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
67
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[Kt]=this[Kt]={accessors:{}}).accessors,r=this.prototype;function i(o){const l=Ce(o);s[l]||(cr(r,o),s[l]=!0)}return d.isArray(t)?t.forEach(i):i(t),this}};Y.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),d.reduceDescriptors(Y.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}}),d.freezeMethods(Y);function ot(e,t){const n=this||Ae,s=t||n,r=Y.from(s.headers);let i=s.data;return d.forEach(e,function(l){i=l.call(n,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function Yt(e){return!!(e&&e.__CANCEL__)}function pe(e,t,n){C.call(this,e??"canceled",C.ERR_CANCELED,t,n),this.name="CanceledError"}d.inherits(pe,C,{__CANCEL__:!0});function Xt(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new C("Request failed with status code "+n.status,[C.ERR_BAD_REQUEST,C.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function ur(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function dr(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,i=0,o;return t=t!==void 0?t:1e3,function(m){const f=Date.now(),u=s[i];o||(o=f),n[r]=m,s[r]=f;let h=i,x=0;for(;h!==r;)x+=n[h++],h=h%e;if(r=(r+1)%e,r===i&&(i=(i+1)%e),f-o<t)return;const O=u&&f-u;return O?Math.round(x*1e3/O):void 0}}function fr(e,t){let n=0,s=1e3/t,r,i;const o=(f,u=Date.now())=>{n=u,r=null,i&&(clearTimeout(i),i=null),e(...f)};return[(...f)=>{const u=Date.now(),h=u-n;h>=s?o(f,u):(r=f,i||(i=setTimeout(()=>{i=null,o(r)},s-h)))},()=>r&&o(r)]}const Me=(e,t,n=3)=>{let s=0;const r=dr(50,250);return fr(i=>{const o=i.loaded,l=i.lengthComputable?i.total:void 0,m=o-s,f=r(m),u=o<=l;s=o;const h={loaded:o,total:l,progress:l?o/l:void 0,bytes:m,rate:f||void 0,estimated:f&&l&&u?(l-o)/f:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(h)},n)},Zt=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},Qt=e=>(...t)=>d.asap(()=>e(...t)),mr=W.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,W.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(W.origin),W.navigator&&/(msie|trident)/i.test(W.navigator.userAgent)):()=>!0,pr=W.hasStandardBrowserEnv?{write(e,t,n,s,r,i){const o=[e+"="+encodeURIComponent(t)];d.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),d.isString(s)&&o.push("path="+s),d.isString(r)&&o.push("domain="+r),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function hr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function gr(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function en(e,t,n){let s=!hr(t);return e&&(s||n==!1)?gr(e,t):t}const tn=e=>e instanceof Y?{...e}:e;function ce(e,t){t=t||{};const n={};function s(f,u,h,x){return d.isPlainObject(f)&&d.isPlainObject(u)?d.merge.call({caseless:x},f,u):d.isPlainObject(u)?d.merge({},u):d.isArray(u)?u.slice():u}function r(f,u,h,x){if(d.isUndefined(u)){if(!d.isUndefined(f))return s(void 0,f,h,x)}else return s(f,u,h,x)}function i(f,u){if(!d.isUndefined(u))return s(void 0,u)}function o(f,u){if(d.isUndefined(u)){if(!d.isUndefined(f))return s(void 0,f)}else return s(void 0,u)}function l(f,u,h){if(h in t)return s(f,u);if(h in e)return s(void 0,f)}const m={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(f,u,h)=>r(tn(f),tn(u),h,!0)};return d.forEach(Object.keys({...e,...t}),function(u){const h=m[u]||r,x=h(e[u],t[u],u);d.isUndefined(x)&&h!==l||(n[u]=x)}),n}const nn=e=>{const t=ce({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:i,headers:o,auth:l}=t;if(t.headers=o=Y.from(o),t.url=zt(en(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),d.isFormData(n)){if(W.hasStandardBrowserEnv||W.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(d.isFunction(n.getHeaders)){const m=n.getHeaders(),f=["content-type","content-length"];Object.entries(m).forEach(([u,h])=>{f.includes(u.toLowerCase())&&o.set(u,h)})}}if(W.hasStandardBrowserEnv&&(s&&d.isFunction(s)&&(s=s(t)),s||s!==!1&&mr(t.url))){const m=r&&i&&pr.read(i);m&&o.set(r,m)}return t},_r=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,s){const r=nn(e);let i=r.data;const o=Y.from(r.headers).normalize();let{responseType:l,onUploadProgress:m,onDownloadProgress:f}=r,u,h,x,O,p;function y(){O&&O(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(u),r.signal&&r.signal.removeEventListener("abort",u)}let g=new XMLHttpRequest;g.open(r.method.toUpperCase(),r.url,!0),g.timeout=r.timeout;function E(){if(!g)return;const N=Y.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),A={data:!l||l==="text"||l==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:N,config:e,request:g};Xt(function(w){n(w),y()},function(w){s(w),y()},A),g=null}"onloadend"in g?g.onloadend=E:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(E)},g.onabort=function(){g&&(s(new C("Request aborted",C.ECONNABORTED,e,g)),g=null)},g.onerror=function(P){const A=P&&P.message?P.message:"Network Error",I=new C(A,C.ERR_NETWORK,e,g);I.event=P||null,s(I),g=null},g.ontimeout=function(){let P=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const A=r.transitional||Gt;r.timeoutErrorMessage&&(P=r.timeoutErrorMessage),s(new C(P,A.clarifyTimeoutError?C.ETIMEDOUT:C.ECONNABORTED,e,g)),g=null},i===void 0&&o.setContentType(null),"setRequestHeader"in g&&d.forEach(o.toJSON(),function(P,A){g.setRequestHeader(A,P)}),d.isUndefined(r.withCredentials)||(g.withCredentials=!!r.withCredentials),l&&l!=="json"&&(g.responseType=r.responseType),f&&([x,p]=Me(f,!0),g.addEventListener("progress",x)),m&&g.upload&&([h,O]=Me(m),g.upload.addEventListener("progress",h),g.upload.addEventListener("loadend",O)),(r.cancelToken||r.signal)&&(u=N=>{g&&(s(!N||N.type?new pe(null,e,g):N),g.abort(),g=null)},r.cancelToken&&r.cancelToken.subscribe(u),r.signal&&(r.signal.aborted?u():r.signal.addEventListener("abort",u)));const k=ur(r.url);if(k&&W.protocols.indexOf(k)===-1){s(new C("Unsupported protocol "+k+":",C.ERR_BAD_REQUEST,e));return}g.send(i||null)})},br=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let s=new AbortController,r;const i=function(f){if(!r){r=!0,l();const u=f instanceof Error?f:this.reason;s.abort(u instanceof C?u:new pe(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,i(new C(`timeout ${t} of ms exceeded`,C.ETIMEDOUT))},t);const l=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),e=null)};e.forEach(f=>f.addEventListener("abort",i));const{signal:m}=s;return m.unsubscribe=()=>d.asap(l),m}},yr=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let s=0,r;for(;s<n;)r=s+t,yield e.slice(s,r),s=r},xr=async function*(e,t){for await(const n of wr(e))yield*yr(n,t)},wr=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:s}=await t.read();if(n)break;yield s}}finally{await t.cancel()}},sn=(e,t,n,s)=>{const r=xr(e,t);let i=0,o,l=m=>{o||(o=!0,s&&s(m))};return new ReadableStream({async pull(m){try{const{done:f,value:u}=await r.next();if(f){l(),m.close();return}let h=u.byteLength;if(n){let x=i+=h;n(x)}m.enqueue(new Uint8Array(u))}catch(f){throw l(f),f}},cancel(m){return l(m),r.return()}},{highWaterMark:2})},rn=64*1024,{isFunction:Fe}=d,vr=(({Request:e,Response:t})=>({Request:e,Response:t}))(d.global),{ReadableStream:on,TextEncoder:an}=d.global,ln=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Er=e=>{e=d.merge.call({skipUndefined:!0},vr,e);const{fetch:t,Request:n,Response:s}=e,r=t?Fe(t):typeof fetch=="function",i=Fe(n),o=Fe(s);if(!r)return!1;const l=r&&Fe(on),m=r&&(typeof an=="function"?(p=>y=>p.encode(y))(new an):async p=>new Uint8Array(await new n(p).arrayBuffer())),f=i&&l&&ln(()=>{let p=!1;const y=new n(W.origin,{body:new on,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!y}),u=o&&l&&ln(()=>d.isReadableStream(new s("").body)),h={stream:u&&(p=>p.body)};r&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!h[p]&&(h[p]=(y,g)=>{let E=y&&y[p];if(E)return E.call(y);throw new C(`Response type '${p}' is not supported`,C.ERR_NOT_SUPPORT,g)})});const x=async p=>{if(p==null)return 0;if(d.isBlob(p))return p.size;if(d.isSpecCompliantForm(p))return(await new n(W.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(d.isArrayBufferView(p)||d.isArrayBuffer(p))return p.byteLength;if(d.isURLSearchParams(p)&&(p=p+""),d.isString(p))return(await m(p)).byteLength},O=async(p,y)=>{const g=d.toFiniteNumber(p.getContentLength());return g??x(y)};return async p=>{let{url:y,method:g,data:E,signal:k,cancelToken:N,timeout:P,onDownloadProgress:A,onUploadProgress:I,responseType:w,headers:F,withCredentials:q="same-origin",fetchOptions:ne}=nn(p),z=t||fetch;w=w?(w+"").toLowerCase():"text";let D=br([k,N&&N.toAbortSignal()],P),J=null;const G=D&&D.unsubscribe&&(()=>{D.unsubscribe()});let ae;try{if(I&&f&&g!=="get"&&g!=="head"&&(ae=await O(F,E))!==0){let re=new n(y,{method:"POST",body:E,duplex:"half"}),ie;if(d.isFormData(E)&&(ie=re.headers.get("content-type"))&&F.setContentType(ie),re.body){const[he,ge]=Zt(ae,Me(Qt(I)));E=sn(re.body,rn,he,ge)}}d.isString(q)||(q=q?"include":"omit");const Z=i&&"credentials"in n.prototype,ke={...ne,signal:D,method:g.toUpperCase(),headers:F.normalize().toJSON(),body:E,duplex:"half",credentials:Z?q:void 0};J=i&&new n(y,ke);let se=await(i?z(J,ne):z(y,ke));const Ne=u&&(w==="stream"||w==="response");if(u&&(A||Ne&&G)){const re={};["status","statusText","headers"].forEach(We=>{re[We]=se[We]});const ie=d.toFiniteNumber(se.headers.get("content-length")),[he,ge]=A&&Zt(ie,Me(Qt(A),!0))||[];se=new s(sn(se.body,rn,he,()=>{ge&&ge(),G&&G()}),re)}w=w||"text";let He=await h[d.findKey(h,w)||"text"](se,p);return!Ne&&G&&G(),await new Promise((re,ie)=>{Xt(re,ie,{data:He,headers:Y.from(se.headers),status:se.status,statusText:se.statusText,config:p,request:J})})}catch(Z){throw G&&G(),Z&&Z.name==="TypeError"&&/Load failed|fetch/i.test(Z.message)?Object.assign(new C("Network Error",C.ERR_NETWORK,p,J),{cause:Z.cause||Z}):C.from(Z,Z&&Z.code,p,J)}}},Sr=new Map,cn=e=>{let t=e?e.env:{};const{fetch:n,Request:s,Response:r}=t,i=[s,r,n];let o=i.length,l=o,m,f,u=Sr;for(;l--;)m=i[l],f=u.get(m),f===void 0&&u.set(m,f=l?new Map:Er(t)),u=f;return f};cn();const it={http:Js,xhr:_r,fetch:{get:cn}};d.forEach(it,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const un=e=>`- ${e}`,Ar=e=>d.isFunction(e)||e===null||e===!1,dn={getAdapter:(e,t)=>{e=d.isArray(e)?e:[e];const{length:n}=e;let s,r;const i={};for(let o=0;o<n;o++){s=e[o];let l;if(r=s,!Ar(s)&&(r=it[(l=String(s)).toLowerCase()],r===void 0))throw new C(`Unknown adapter '${l}'`);if(r&&(d.isFunction(r)||(r=r.get(t))))break;i[l||"#"+o]=r}if(!r){const o=Object.entries(i).map(([m,f])=>`adapter ${m} `+(f===!1?"is not supported by the environment":"is not available in the build"));let l=n?o.length>1?`since :
68
+ `+o.map(un).join(`
69
+ `):" "+un(o[0]):"as no adapter specified";throw new C("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:it};function at(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pe(null,e)}function fn(e){return at(e),e.headers=Y.from(e.headers),e.data=ot.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),dn.getAdapter(e.adapter||Ae.adapter,e)(e).then(function(s){return at(e),s.data=ot.call(e,e.transformResponse,s),s.headers=Y.from(s.headers),s},function(s){return Yt(s)||(at(e),s&&s.response&&(s.response.data=ot.call(e,e.transformResponse,s.response),s.response.headers=Y.from(s.response.headers))),Promise.reject(s)})}const mn="1.12.2",$e={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{$e[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const pn={};$e.transitional=function(t,n,s){function r(i,o){return"[Axios v"+mn+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,l)=>{if(t===!1)throw new C(r(o," has been removed"+(n?" in "+n:"")),C.ERR_DEPRECATED);return n&&!pn[o]&&(pn[o]=!0,console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,l):!0}},$e.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function Cr(e,t,n){if(typeof e!="object")throw new C("options must be an object",C.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const i=s[r],o=t[i];if(o){const l=e[i],m=l===void 0||o(l,i,e);if(m!==!0)throw new C("option "+i+" must be "+m,C.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new C("Unknown option "+i,C.ERR_BAD_OPTION)}}const Be={assertOptions:Cr,validators:$e},oe=Be.validators;let ue=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Jt,response:new Jt}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+=`
70
+ `+i):s.stack=i}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ce(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:i}=n;s!==void 0&&Be.assertOptions(s,{silentJSONParsing:oe.transitional(oe.boolean),forcedJSONParsing:oe.transitional(oe.boolean),clarifyTimeoutError:oe.transitional(oe.boolean)},!1),r!=null&&(d.isFunction(r)?n.paramsSerializer={serialize:r}:Be.assertOptions(r,{encode:oe.function,serialize:oe.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Be.assertOptions(n,{baseUrl:oe.spelling("baseURL"),withXsrfToken:oe.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&d.merge(i.common,i[n.method]);i&&d.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=Y.concat(o,i);const l=[];let m=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(n)===!1||(m=m&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});const f=[];this.interceptors.response.forEach(function(y){f.push(y.fulfilled,y.rejected)});let u,h=0,x;if(!m){const p=[fn.bind(this),void 0];for(p.unshift(...l),p.push(...f),x=p.length,u=Promise.resolve(n);h<x;)u=u.then(p[h++],p[h++]);return u}x=l.length;let O=n;for(;h<x;){const p=l[h++],y=l[h++];try{O=p(O)}catch(g){y.call(this,g);break}}try{u=fn.call(this,O)}catch(p){return Promise.reject(p)}for(h=0,x=f.length;h<x;)u=u.then(f[h++],f[h++]);return u}getUri(t){t=ce(this.defaults,t);const n=en(t.baseURL,t.url,t.allowAbsoluteUrls);return zt(n,t.params,t.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(t){ue.prototype[t]=function(n,s){return this.request(ce(s||{},{method:t,url:n,data:(s||{}).data}))}}),d.forEach(["post","put","patch"],function(t){function n(s){return function(i,o,l){return this.request(ce(l||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}ue.prototype[t]=n(),ue.prototype[t+"Form"]=n(!0)});let Rr=class zn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const s=this;this.promise.then(r=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(l=>{s.subscribe(l),i=l}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},t(function(i,o,l){s.reason||(s.reason=new pe(i,o,l),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new zn(function(r){t=r}),cancel:t}}};function kr(e){return function(n){return e.apply(null,n)}}function Nr(e){return d.isObject(e)&&e.isAxiosError===!0}const lt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(lt).forEach(([e,t])=>{lt[t]=e});function hn(e){const t=new ue(e),n=jt(ue.prototype.request,t);return d.extend(n,ue.prototype,t,{allOwnKeys:!0}),d.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return hn(ce(e,r))},n}const M=hn(Ae);M.Axios=ue,M.CanceledError=pe,M.CancelToken=Rr,M.isCancel=Yt,M.VERSION=mn,M.toFormData=Le,M.AxiosError=C,M.Cancel=M.CanceledError,M.all=function(t){return Promise.all(t)},M.spread=kr,M.isAxiosError=Nr,M.mergeConfig=ce,M.AxiosHeaders=Y,M.formToJSON=e=>Vt(d.isHTMLForm(e)?new FormData(e):e),M.getAdapter=dn.getAdapter,M.HttpStatusCode=lt,M.default=M;const{Axios:Ko,AxiosError:Yo,CanceledError:Xo,isCancel:Zo,CancelToken:Qo,VERSION:ei,all:ti,Cancel:ni,isAxiosError:si,spread:ri,toFormData:oi,AxiosHeaders:ii,HttpStatusCode:ai,formToJSON:li,getAdapter:ci,mergeConfig:ui}=M,jr=()=>c.jsx("span",{style:{marginRight:8,fontSize:"1.2em"},children:"👤"}),Or=()=>c.jsx("span",{style:{marginRight:8,fontSize:"1.2em"},children:"⚙️"}),Ur=()=>c.jsx("span",{style:{marginRight:8,fontSize:"1.2em"},children:"❓"}),Tr=()=>c.jsx("span",{style:{marginRight:8,fontSize:"1.2em"},children:"🚪"}),Pr=[{id:"profile",label:"个人主页",icon:c.jsx(jr,{})},{id:"settings",label:"设置",icon:c.jsx(Or,{})},{id:"help",label:"帮助",icon:c.jsx(Ur,{})},{id:"logout",label:"退出",icon:c.jsx(Tr,{})}],gn=({userId:e,userName:t,userAvatar:n,apiConfig:s,menuItems:r=Pr,avatarSize:i="md",isLoading:o=!1,error:l=null,avatarClassName:m,userNameClassName:f,containerClassName:u,onMenuOpen:h,onMenuClose:x,onMenuItemClick:O,onLogout:p,renderMenuItem:y,renderUserInfo:g})=>{const[E,k]=R.useState({id:e||"",name:t||"",avatar:n||"",level:0,badges:[]}),[N,P]=R.useState(o),[A,I]=R.useState(l);R.useEffect(()=>{e&&s&&!t&&!n&&w()},[e,s,t,n]);const w=async()=>{P(!0),I(null);try{const D=s.endpoints.userProfile.replace(":userId",e),J=await M.get(`${s.baseURL}${D}`,{headers:s.headers});k(J.data)}catch(D){I(D)}finally{P(!1)}},F=D=>{O?.(D.id),D.id==="logout"&&p?.()},q=()=>{h?.()},ne=()=>{x?.()},z=()=>c.jsxs("div",{className:"user-profile-trigger",children:[c.jsx(ye.Avatar,{src:E.avatar,size:i,className:m,alt:"用户头像"}),c.jsx("span",{className:`user-name ${f||""}`,children:E.name})]});return N?c.jsx("div",{className:`user-profile-container ${u||""} is-loading`,children:c.jsx("div",{className:"user-profile-loading",children:"加载中..."})}):A?c.jsx("div",{className:`user-profile-container ${u||""} has-error`,children:c.jsxs("div",{className:"user-profile-error",children:["错误: ",A.message]})}):E.name?c.jsx("div",{className:`user-profile-container ${u||""}`,children:c.jsx(Xe,{trigger:g?g(E):z(),items:r.map(D=>({...D,onClick:()=>F(D)})),position:"bottom",alignment:"end",onOpen:q,onClose:ne,renderItem:y?D=>y(D,E):void 0})}):c.jsx("div",{className:`user-profile-container ${u||""}`,children:c.jsx("div",{className:"user-profile-loading",children:"未登录"})})},Ir=e=>c.jsxs("div",{className:"explore-menu-item",onClick:()=>e.onClick?.(e),children:[c.jsx("span",{className:"explore-item-label",children:e.label}),e.status&&c.jsx("span",{className:`explore-item-status status-${e.status.toLowerCase().replace("%","").replace(" ","-")}`,children:e.status})]},e.id),Lr=()=>c.jsxs("button",{className:"explore-button","aria-label":"探索数学课程",children:[c.jsx("span",{className:"explore-icon",children:"🌍"}),c.jsx("span",{className:"explore-text",children:"探索"})]}),Dr=({className:e="",style:t,logoHref:n="/",logoText:s="MathWiz",onLogoClick:r,exploreItems:i=[],exploreMenuOpen:o=!1,onExploreMenuToggle:l,onExploreItemClick:m,renderExploreItem:f=Ir,userData:u,userMenuItems:h,onUserMenuItemClick:x,onLogout:O,isLoading:p=!1,error:y=null,headerClassName:g="",logoClassName:E="",exploreClassName:k="",userProfileClassName:N="","aria-label":P,"aria-labelledby":A,...I})=>{const w=i.map(F=>({id:F.id,label:f(F),onClick:()=>m?.(F)}));return c.jsx("header",{className:`mathwiz-header site-header ${g} ${e}`,style:t,"aria-label":P,"aria-labelledby":A,role:"banner",...I,children:c.jsxs("div",{className:"header-content",children:[c.jsx("div",{className:"header-section left",children:c.jsx(Xe,{trigger:c.jsx(Lr,{}),items:w,position:"bottom",alignment:"start",openDelay:300,closeDelay:100,onOpen:()=>l?.(!0),onClose:()=>l?.(!1),className:`explore-submenu ${k}`,menuClassName:"explore-panel"})}),c.jsx("div",{className:"header-section center",children:c.jsx("a",{href:n,className:`logo ${E}`,onClick:r,"aria-label":"MathWiz 首页",children:s})}),c.jsx("div",{className:"header-section right",children:c.jsx(gn,{userName:u?.name,userAvatar:u?.avatar,menuItems:h,onMenuItemClick:x,onLogout:O,containerClassName:N,isLoading:p,error:y})})]})})},_n=R.memo(Dr,(e,t)=>e.logoText===t.logoText&&e.logoHref===t.logoHref&&e.className===t.className&&e.headerClassName===t.headerClassName&&e.logoClassName===t.logoClassName&&e.exploreClassName===t.exploreClassName&&e.userProfileClassName===t.userProfileClassName&&e["aria-label"]===t["aria-label"]&&e["aria-labelledby"]===t["aria-labelledby"]&&e.isLoading===t.isLoading&&e.error===t.error&&JSON.stringify(e.exploreItems)===JSON.stringify(t.exploreItems)&&JSON.stringify(e.userData)===JSON.stringify(t.userData)&&JSON.stringify(e.userMenuItems)===JSON.stringify(t.userMenuItems)),bn=({abilities:e,width:t=400,height:n=400})=>{const s=()=>e.length===0?"":e.map(o=>{if(o.svgPoint)return`${o.svgPoint.x},${o.svgPoint.y}`;const l=Math.PI*2*e.indexOf(o)/e.length,m=o.score/o.maxScore*40+10,f=50+m*Math.sin(l),u=50-m*Math.cos(l);return`${f},${u}`}).join(" "),r=o=>{const l=Math.PI*2*o/Math.max(e.length,1),m=50+40*Math.sin(l),f=50-40*Math.cos(l);return{x2:m,y2:f}},i=o=>{const l=Math.PI*2*o/Math.max(e.length,1),m=50+45*Math.sin(l),f=50-45*Math.cos(l);let u="middle";return l>Math.PI*.25&&l<Math.PI*.75&&(u="start"),l>Math.PI*1.25&&l<Math.PI*1.75&&(u="end"),{x:m,y:f,textAnchor:u}};return c.jsxs("svg",{"data-testid":"radar-chart",width:t,height:n,viewBox:"0 0 100 100",className:"w-full h-full",preserveAspectRatio:"xMidYMid meet",children:[c.jsx("circle",{"data-testid":"center-point",cx:"50",cy:"50",r:"1",fill:"#4A90E2"}),e.map((o,l)=>{const{x2:m,y2:f}=r(l);return c.jsx("line",{"data-testid":"axis-line",x1:"50",y1:"50",x2:m,y2:f,stroke:"#E2E8F0",strokeWidth:"0.5"},`axis-${l}`)}),e.length>2&&c.jsx("polygon",{"data-testid":"radar-polygon",points:s(),fill:"rgba(74, 144, 226, 0.2)",stroke:"rgb(74, 144, 226)",strokeWidth:"1",fillRule:"evenodd"}),e.map((o,l)=>{let m,f;if(o.svgPoint)m=o.svgPoint.x,f=o.svgPoint.y;else{const u=Math.PI*2*l/e.length,h=o.score/o.maxScore*40+10;m=50+h*Math.sin(u),f=50-h*Math.cos(u)}return c.jsx("circle",{"data-testid":"data-point",cx:m,cy:f,r:"2",fill:o.progressBarColor==="bg-orange-400"?"#FBBF24":"#4A90E2"},`point-${o.name}`)}),e.map((o,l)=>{const{x:m,y:f,textAnchor:u}=i(l);return c.jsx("text",{x:m,y:f,textAnchor:u,fontSize:"5",fill:"#334155",className:"text-xs",children:o.name},`label-${o.name}`)})]})},yn=e=>{let t;const n=new Set,s=(f,u)=>{const h=typeof f=="function"?f(t):f;if(!Object.is(h,t)){const x=t;t=u??(typeof h!="object"||h===null)?h:Object.assign({},t,h),n.forEach(O=>O(t,x))}},r=()=>t,l={setState:s,getState:r,getInitialState:()=>m,subscribe:f=>(n.add(f),()=>n.delete(f))},m=t=e(s,r,l);return l},Mr=(e=>e?yn(e):yn),Fr=e=>e;function $r(e,t=Fr){const n=R.useSyncExternalStore(e.subscribe,R.useCallback(()=>t(e.getState()),[e,t]),R.useCallback(()=>t(e.getInitialState()),[e,t]));return R.useDebugValue(n),n}const xn=e=>{const t=Mr(e),n=s=>$r(t,s);return Object.assign(n,t),n},Br=(e=>e?xn(e):xn),wn={overallRating:"优秀",generalRecommendation:"你的空间想象力和逻辑推理能力非常出色!若能进一步提升在复杂图形下的专注力,你将所向披靡。建议尝试我们‘专注力挑战’系列游戏。",abilities:[{name:"空间想象力",score:7.5,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:50,y:17.5},recommendation:"通过观察三维物体在不同角度的投影,或尝试构建复杂结构的游戏,能有效提升空间想象力。",recommendationLink:"#spatial-challenges"},{name:"逻辑推理",score:8,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:82,y:35},recommendation:"解决数独、迷宫或逻辑谜题,能够持续锻炼你的逻辑思维,尝试挑战更高难度的推理游戏。",recommendationLink:"#logic-puzzles"},{name:"图形辨识",score:9,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:85,y:65},recommendation:"你在这方面表现出色!可以尝试在更复杂、干扰因素更多的图形中进行辨识训练,保持敏锐。",recommendationLink:"#graphic-training"},{name:"专注力",score:7,maxScore:10,progressBarColor:"bg-orange-400",svgPoint:{x:50,y:80},recommendation:"在长时间的游戏中保持专注对你来说是一个挑战,建议尝试我们‘专注力挑战’系列游戏,逐渐延长专注时间。",recommendationLink:"#focus-challenges"},{name:"观察力",score:8.5,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:15,y:65},recommendation:"你的观察力非常敏锐,在细节发现上尤为突出。尝试在限时模式下进行观察力训练,提高反应速度。",recommendationLink:"#observation-drills"},{name:"抗压性",score:7.8,maxScore:10,progressBarColor:"bg-blue-500",svgPoint:{x:18,y:35},recommendation:"面对高压挑战时,保持冷静是关键。通过模拟竞赛或限时任务来提升抗压能力,逐步适应压力。",recommendationLink:"#stress-games"}]};class qr{static API_BASE_URL="/api/radar-ability";static async fetchRadarAbilityData(){try{return process.env.NODE_ENV==="test"?(await new Promise(t=>setTimeout(t,100)),wn):(await M.get(`${this.API_BASE_URL}/assessment`)).data}catch(t){if(console.error("Failed to fetch radar ability data:",t),process.env.NODE_ENV==="test")throw new Error("获取能力评估数据失败");return wn}}static async submitFeedback(t){try{await M.post(`${this.API_BASE_URL}/feedback`,t)}catch(n){throw console.error("Failed to submit feedback:",n),new Error("提交反馈失败")}}}const Hr=Br((e,t)=>({data:null,loading:!1,error:null,fetchData:async()=>{if(!t().loading){e({loading:!0,error:null});try{const n=await qr.fetchRadarAbilityData();e({data:n,loading:!1})}catch(n){const s=n instanceof Error?n.message:"获取数据失败";e({error:s,loading:!1})}}},setData:n=>{e({data:n,error:null,loading:!1})},setError:n=>{e({error:n,loading:!1})},reset:()=>{e({data:null,loading:!1,error:null})}})),vn=({ability:e})=>{const t=e.score/e.maxScore*100;return c.jsxs("div",{className:"ability-progress-bar-item","data-ability":e.name,"data-testid":"progress-bar-container",children:[c.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[c.jsx("span",{className:"text-gray-700 font-medium",children:e.name}),c.jsxs("span",{className:"text-gray-600",children:[e.score,"/",e.maxScore]})]}),c.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2.5","data-testid":"progress-bar-outer",children:c.jsx("div",{className:`${e.progressBarColor} h-2.5 rounded-full transition-all duration-300`,style:{width:`${t}%`},"data-testid":"progress-bar-inner",role:"progressbar","aria-valuenow":e.score,"aria-valuemin":0,"aria-valuemax":e.maxScore,"aria-label":`${e.name} progress: ${e.score} out of ${e.maxScore}`})})]})},En=({generalRecommendation:e})=>c.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4","data-testid":"advice-panel",role:"region","aria-label":"个性化建议",children:c.jsxs("div",{className:"flex items-start",children:[c.jsx("div",{className:"flex-shrink-0",children:c.jsx("i",{className:"material-icons text-blue-500","data-testid":"lightbulb-icon","aria-hidden":"true",children:"lightbulb"})}),c.jsxs("div",{className:"ml-3",children:[c.jsx("h3",{className:"text-md font-semibold text-blue-800","aria-level":3,children:"个性化建议"}),c.jsx("p",{className:"text-sm text-blue-700 mt-1","data-testid":"recommendation-text",children:e})]})]})}),Sn=({ability:e,customLinkTexts:t={}})=>{const n=s=>{const r={空间想象力:"探索空间挑战",逻辑推理:"深入逻辑谜题",图形辨识:"精进图形训练",专注力:"挑战专注极限",观察力:"提升观察速度",抗压性:"磨砺抗压意志"};return t[s]||r[s]||"开始挑战"};return c.jsx(ye.Card,{className:"recommendation-card w-full max-w-sm hover:shadow-lg transition-all duration-300","data-ability":e.name,"data-testid":"recommendation-card",isHoverable:!0,isPressable:!0,children:c.jsx(ye.CardBody,{className:"p-5",children:c.jsxs("div",{className:"flex flex-col gap-3",children:[c.jsxs("h4",{className:"text-lg font-semibold text-foreground","aria-level":4,children:[e.name,": 专项提高"]}),c.jsx("p",{className:"text-sm text-default-600 leading-relaxed","data-testid":"recommendation-description",children:e.recommendation}),c.jsx(ye.Button,{as:"a",href:e.recommendationLink,className:"mt-2 w-fit",size:"sm",variant:"flat",color:"primary",endContent:c.jsx(ts,{className:"w-4 h-4"}),"data-testid":"recommendation-link","aria-label":`前往${e.name}专项提高页面`,children:n(e.name)})]})})})},qe={dashboardLayout:"_dashboardLayout_10wqn_5",upperSection:"_upperSection_10wqn_19",lowerSection:"_lowerSection_10wqn_33",radarChartArea:"_radarChartArea_10wqn_51"},Wr=()=>{const{data:e,loading:t,error:n,fetchData:s}=Hr();return R.useEffect(()=>{s()},[s]),t?c.jsxs("div",{className:"card max-w-4xl mx-auto p-6 md:p-8 flex items-center justify-center","data-testid":"loading-spinner",children:[c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-500"}),c.jsx("span",{className:"ml-3 text-gray-600",children:"加载中..."})]}):n?c.jsxs("div",{className:"card max-w-4xl mx-auto p-6 md:p-8 text-center",role:"alert","aria-live":"assertive",children:[c.jsx("div",{className:"text-red-500 mb-4",children:c.jsx("i",{className:"material-icons text-4xl","aria-hidden":"true",children:"error_outline"})}),c.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-2",children:"加载失败"}),c.jsx("p",{className:"text-gray-600 mb-4",children:n}),c.jsx("button",{onClick:s,className:"bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","aria-label":"重试加载数据",children:"重试"})]}):e?c.jsxs("div",{className:"card max-w-4xl mx-auto p-6 md:p-8 animate-fade-in","data-component":"AbilityAssessmentDashboard",role:"main","aria-label":"能力评估雷达图展示",children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsx("h2",{className:"text-xl font-bold text-gray-800",children:"能力评估雷达图"}),c.jsxs("span",{className:"bg-blue-100 text-blue-800 text-sm font-semibold px-2.5 py-0.5 rounded-full","aria-label":`综合评级: ${e.overallRating}`,children:["综合评级: ",e.overallRating]})]}),c.jsxs("div",{className:qe.dashboardLayout,children:[c.jsxs("div",{className:qe.upperSection,children:[c.jsx("div",{className:qe.radarChartArea,children:c.jsx(bn,{abilities:e.abilities})}),c.jsx("div",{className:"space-y-4 flex flex-col justify-around py-2",children:e.abilities.map(r=>c.jsx(vn,{ability:r},r.name))})]}),c.jsxs("div",{className:qe.lowerSection,children:[c.jsx(En,{generalRecommendation:e.generalRecommendation}),c.jsx("h3",{className:"text-lg font-bold text-gray-800 mb-4 mt-6",children:"专项提升建议"}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:e.abilities.map(r=>c.jsx(Sn,{ability:r},r.name))})]})]})]}):c.jsx("div",{className:"card max-w-4xl mx-auto p-6 md:p-8 text-center",role:"status","aria-live":"polite",children:c.jsx("p",{className:"text-gray-600",children:"暂无数据"})})},ct={"Arithmetic and Algebra":"🔢","Graphics and Geometry":"📐","Probability and Statistics":"📊",Default:"📚"},zr={mastered:"已掌握",proficient:"熟练",familiar:"熟悉",attempted:"已尝试","not-started":"未开始"},Jr={mastered:"#10b981",proficient:"#3b82f6",familiar:"#f59e0b",attempted:"#8b5cf6","not-started":"#6b7280"},Re={id:"user-001",name:"小明",level:5,avatar:"https://i.pravatar.cc/40?u=student1",logIn:!0,badges:["🏆","🏅","🌟"]},Gr=[{id:"g3",label:"三年级",status:"new",onClick:()=>console.log("三年级 clicked")},{id:"g4",label:"四年级",status:"2%",onClick:()=>console.log("四年级 clicked")},{id:"g5",label:"五年级",status:"进行中",onClick:()=>console.log("五年级 clicked")},{id:"g6",label:"六年级",status:"new",onClick:()=>console.log("六年级 clicked")},{id:"g7",label:"七年级",status:"new",onClick:()=>console.log("七年级 clicked")},{id:"g8",label:"八年级",status:"new",onClick:()=>console.log("八年级 clicked")},{id:"alg_topic",label:"代数专题",status:"new",onClick:()=>console.log("代数专题 clicked")},{id:"calc_topic",label:"计算专题",status:"new",onClick:()=>console.log("计算专题 clicked")},{id:"geo_topic",label:"几何专题",status:"new",onClick:()=>console.log("几何专题 clicked")},{id:"olym_topic",label:"奥数专题",status:"new",onClick:()=>console.log("奥数专题 clicked")}],Vr="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c2VyLTAwMSIsIm5hbWUiOiLlsI_mmI4iLCJsZXZlbCI6NSwiYXZhdGFyIjoiaHR0cHM6Ly9pLnByYXZhdGFyLmNjLzQwP3U9c3R1ZGVudDEiLCJiYWRnZXMiOlsi8J-SoiIsIvCfjZUiLCLwn5KbIl0sImlhdCI6MTY5MTYwMDAwMCwiZXhwIjoxNzIzMTM2MDAwfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c";class Kr{baseURL;token;constructor(t="/api",n=Vr){this.baseURL=t,this.token=n}getAuthHeaders(){return{Authorization:`Bearer ${this.token}`,"Content-Type":"application/json"}}async fetchWithAuth(t,n={}){const s=await fetch(t,{...n,headers:{...this.getAuthHeaders(),...n.headers}});if(!s.ok)throw new Error(`HTTP error! status: ${s.status}`);return s}async getCourseData(t){return(await this.fetchWithAuth(`${this.baseURL}/courses/${t}`)).json()}async getUserGradeUnitsNav(t){const n=t?`${this.baseURL}/user/grade/units/nav?gradeId=${encodeURIComponent(t)}`:`${this.baseURL}/user/grade/units/nav`;return(await this.fetchWithAuth(n)).json()}async getUnitProgress(t,n){const s=n?`${this.baseURL}/courses/${t}/units/${n}/progress`:`${this.baseURL}/courses/${t}/progress`;return(await this.fetchWithAuth(s)).json()}async batchUpdateLessonProgress(t,n){return(await this.fetchWithAuth(`${this.baseURL}/user/units/${t}/progress/batch`,{method:"POST",body:JSON.stringify(n)})).json()}async updateLessonProgress(t,n,s,r){await this.fetchWithAuth(`${this.baseURL}/courses/${t}/units/${n}/lessons/${s}/progress`,{method:"POST",body:JSON.stringify({status:r})})}setToken(t){this.token=t}getToken(){return this.token}}const ut=new Kr,H={id:"g5",title:"小学数学五年级",level:5,subject:"数学",units:[{id:"unit_1",title:"小数乘法",description:"学习小数乘法的计算方法及应用",estimatedDuration:"3周",totalLessons:10,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit1_lesson1",title:"小数乘整数",duration:40,knowledgeItems:[{id:"unit1_lesson1_k1",title:"小数乘整数的意义",description:"理解小数乘整数的意义与整数乘法相同",progress:0,contentUrl:""},{id:"unit1_lesson1_k2",title:"小数乘整数的计算方法",description:"掌握小数乘整数的计算方法:先按整数乘法计算,再看因数中有几位小数,就从积的右边起数出几位点上小数点",progress:0,contentUrl:""}]},{id:"unit1_lesson2",title:"小数乘小数",duration:40,knowledgeItems:[{id:"unit1_lesson2_k1",title:"小数乘小数的计算方法",description:"掌握小数乘小数的计算方法:先按整数乘法算出积,再给积点上小数点",progress:0,contentUrl:""},{id:"unit1_lesson2_k2",title:"积的小数位数确定",description:"理解积的小数位数等于两个因数的小数位数之和",progress:0,contentUrl:""}]},{id:"unit1_lesson3",title:"积的近似数",duration:40,knowledgeItems:[{id:"unit1_lesson3_k1",title:'用"四舍五入"法求积的近似数',description:'掌握用"四舍五入"法求积的近似数的方法',progress:0,contentUrl:""}]},{id:"unit1_lesson4",title:"整数乘法运算定律推广到小数",duration:40,knowledgeItems:[{id:"unit1_lesson4_k1",title:"乘法运算定律在小数中的适用性",description:"理解整数乘法运算定律对于小数乘法同样适用",progress:0,contentUrl:""},{id:"unit1_lesson4_k2",title:"运用运算定律进行简便计算",description:"能运用乘法运算定律进行小数乘法的简便计算",progress:0,contentUrl:""}]},{id:"unit1_lesson5",title:"解决问题",duration:40,knowledgeItems:[{id:"unit1_lesson5_k1",title:"用小数乘法解决实际问题",description:"能运用小数乘法解决购物、面积计算等实际问题",progress:0,contentUrl:""}]}]},{id:"unit_2",title:"小数除法",description:"学习小数除法的计算方法及应用",estimatedDuration:"3周",totalLessons:12,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit2_lesson1",title:"小数除以整数",duration:40,knowledgeItems:[{id:"unit2_lesson1_k1",title:"小数除以整数的计算方法",description:"掌握小数除以整数的计算方法:按照整数除法的方法计算,商的小数点要与被除数的小数点对齐",progress:0,contentUrl:""}]},{id:"unit2_lesson2",title:"一个数除以小数",duration:40,knowledgeItems:[{id:"unit2_lesson2_k1",title:"除数是小数的除法计算方法",description:"掌握除数是小数的除法计算方法:利用商不变的性质,将除数转化为整数",progress:0,contentUrl:""}]},{id:"unit2_lesson3",title:"商的近似数",duration:40,knowledgeItems:[{id:"unit2_lesson3_k1",title:'用"四舍五入"法求商的近似数',description:'掌握用"四舍五入"法求商的近似数的方法',progress:0,contentUrl:""}]},{id:"unit2_lesson4",title:"循环小数",duration:40,knowledgeItems:[{id:"unit2_lesson4_k1",title:"循环小数的概念",description:"理解循环小数的概念,认识循环节",progress:0,contentUrl:""},{id:"unit2_lesson4_k2",title:"循环小数的表示方法",description:"掌握循环小数的简便表示方法",progress:0,contentUrl:""}]},{id:"unit2_lesson5",title:"用计算器探索规律",duration:40,knowledgeItems:[{id:"unit2_lesson5_k1",title:"用计算器计算小数除法",description:"会用计算器计算较复杂的小数除法",progress:0,contentUrl:""},{id:"unit2_lesson5_k2",title:"发现商的变化规律",description:"能借助计算器发现商的变化规律",progress:0,contentUrl:""}]},{id:"unit2_lesson6",title:"解决问题",duration:40,knowledgeItems:[{id:"unit2_lesson6_k1",title:"用小数除法解决实际问题",description:"能运用小数除法解决购物、分配等实际问题",progress:0,contentUrl:""}]}]},{id:"unit_3",title:"简易方程",description:"学习用字母表示数和解简易方程",estimatedDuration:"4周",totalLessons:14,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit3_lesson1",title:"用字母表示数",duration:40,knowledgeItems:[{id:"unit3_lesson1_k1",title:"用字母表示数",description:"初步理解用字母表示数的意义和作用",progress:0,contentUrl:""},{id:"unit3_lesson1_k2",title:"用字母表示运算定律和计算公式",description:"会用字母表示运算定律和计算公式",progress:0,contentUrl:""}]},{id:"unit3_lesson2",title:"方程的意义",duration:40,knowledgeItems:[{id:"unit3_lesson2_k1",title:"方程的概念",description:"理解方程的意义,知道方程与等式的区别和联系",progress:0,contentUrl:""}]},{id:"unit3_lesson3",title:"等式的性质",duration:40,knowledgeItems:[{id:"unit3_lesson3_k1",title:"等式的性质1",description:"理解等式的性质1:等式两边加上或减去同一个数,左右两边仍然相等",progress:0,contentUrl:""},{id:"unit3_lesson3_k2",title:"等式的性质2",description:"理解等式的性质2:等式两边乘同一个数,或除以同一个不为0的数,左右两边仍然相等",progress:0,contentUrl:""}]},{id:"unit3_lesson4",title:"解简易方程",duration:40,knowledgeItems:[{id:"unit3_lesson4_k1",title:"利用等式的性质解方程",description:"会利用等式的性质解形如x±a=b、ax=b、x÷a=b、a-x=b、a÷x=b的方程",progress:0,contentUrl:""}]},{id:"unit3_lesson5",title:"实际问题与方程",duration:40,knowledgeItems:[{id:"unit3_lesson5_k1",title:"列方程解决实际问题",description:"初步学会列方程解决一些简单的实际问题",progress:0,contentUrl:""}]}]},{id:"unit_4",title:"多边形的面积",description:"学习平行四边形、三角形、梯形和组合图形的面积计算",estimatedDuration:"3周",totalLessons:12,moduleCategory:"Graphics and Geometry",lessons:[{id:"unit4_lesson1",title:"平行四边形的面积",duration:40,knowledgeItems:[{id:"unit4_lesson1_k1",title:"平行四边形面积公式的推导",description:"通过割补法理解平行四边形面积公式的推导过程",progress:0,contentUrl:""},{id:"unit4_lesson1_k2",title:"平行四边形面积的计算",description:"掌握平行四边形面积计算公式:S=ah,并能正确运用",progress:0,contentUrl:""}]},{id:"unit4_lesson2",title:"三角形的面积",duration:40,knowledgeItems:[{id:"unit4_lesson2_k1",title:"三角形面积公式的推导",description:"通过拼摆法理解三角形面积公式的推导过程",progress:0,contentUrl:""},{id:"unit4_lesson2_k2",title:"三角形面积的计算",description:"掌握三角形面积计算公式:S=ah÷2,并能正确运用",progress:0,contentUrl:""}]},{id:"unit4_lesson3",title:"梯形的面积",duration:40,knowledgeItems:[{id:"unit4_lesson3_k1",title:"梯形面积公式的推导",description:"通过拼摆法理解梯形面积公式的推导过程",progress:0,contentUrl:""},{id:"unit4_lesson3_k2",title:"梯形面积的计算",description:"掌握梯形面积计算公式:S=(a+b)h÷2,并能正确运用",progress:0,contentUrl:""}]},{id:"unit4_lesson4",title:"组合图形的面积",duration:40,knowledgeItems:[{id:"unit4_lesson4_k1",title:"认识组合图形",description:"认识组合图形,会把组合图形分解成已学过的平面图形",progress:0,contentUrl:""},{id:"unit4_lesson4_k2",title:"计算组合图形的面积",description:"掌握计算组合图形面积的多种方法",progress:0,contentUrl:""}]}]},{id:"unit_5",title:"因数与倍数",description:"学习因数、倍数、质数、合数等概念",estimatedDuration:"3周",totalLessons:10,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit5_lesson1",title:"因数和倍数",duration:40,knowledgeItems:[{id:"unit5_lesson1_k1",title:"因数和倍数的意义",description:"理解因数和倍数的意义,掌握找一个数的因数和倍数的方法",progress:0,contentUrl:""},{id:"unit5_lesson1_k2",title:"因数和倍数的特征",description:"了解一个数的因数的个数是有限的,倍数的个数是无限的",progress:0,contentUrl:""}]},{id:"unit5_lesson2",title:"2、5、3的倍数的特征",duration:40,knowledgeItems:[{id:"unit5_lesson2_k1",title:"2、5的倍数的特征",description:"掌握2、5的倍数的特征,理解奇数和偶数的意义",progress:0,contentUrl:""},{id:"unit5_lesson2_k2",title:"3的倍数的特征",description:"掌握3的倍数的特征,能判断一个数是不是3的倍数",progress:0,contentUrl:""}]},{id:"unit5_lesson3",title:"质数和合数",duration:40,knowledgeItems:[{id:"unit5_lesson3_k1",title:"质数和合数的意义",description:"理解质数和合数的意义,能判断一个数是质数还是合数",progress:0,contentUrl:""},{id:"unit5_lesson3_k2",title:"制作100以内的质数表",description:"会制作100以内的质数表,熟记20以内的质数",progress:0,contentUrl:""}]}]},{id:"unit_6",title:"长方体和正方体",description:"学习长方体和正方体的特征、表面积和体积计算",estimatedDuration:"4周",totalLessons:14,moduleCategory:"Graphics and Geometry",lessons:[{id:"unit6_lesson1",title:"长方体和正方体的认识",duration:40,knowledgeItems:[{id:"unit6_lesson1_k1",title:"长方体的特征",description:"认识长方体的特征,了解长方体的长、宽、高",progress:0,contentUrl:""},{id:"unit6_lesson1_k2",title:"正方体的特征",description:"认识正方体的特征,理解正方体是特殊的长方体",progress:0,contentUrl:""}]},{id:"unit6_lesson2",title:"长方体和正方体的表面积",duration:40,knowledgeItems:[{id:"unit6_lesson2_k1",title:"表面积的意义",description:"理解表面积的意义,掌握长方体和正方体表面积的计算方法",progress:0,contentUrl:""},{id:"unit6_lesson2_k2",title:"表面积的实际应用",description:"能运用表面积知识解决一些实际问题",progress:0,contentUrl:""}]},{id:"unit6_lesson3",title:"长方体和正方体的体积",duration:40,knowledgeItems:[{id:"unit6_lesson3_k1",title:"体积和体积单位",description:"理解体积的意义,认识常用的体积单位",progress:0,contentUrl:""},{id:"unit6_lesson3_k2",title:"长方体和正方体体积的计算",description:"掌握长方体和正方体体积的计算公式",progress:0,contentUrl:""},{id:"unit6_lesson3_k3",title:"体积单位间的进率",description:"掌握体积单位之间的进率和换算",progress:0,contentUrl:""}]},{id:"unit6_lesson4",title:"容积和容积单位",duration:40,knowledgeItems:[{id:"unit6_lesson4_k1",title:"容积和容积单位",description:"理解容积的意义,认识常用的容积单位",progress:0,contentUrl:""},{id:"unit6_lesson4_k2",title:"容积和体积的关系",description:"掌握容积和体积之间的关系",progress:0,contentUrl:""}]}]},{id:"unit_7",title:"分数的意义和性质",description:"学习分数的意义、性质和约分、通分等方法",estimatedDuration:"4周",totalLessons:16,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit7_lesson1",title:"分数的意义",duration:40,knowledgeItems:[{id:"unit7_lesson1_k1",title:"分数的产生和意义",description:"理解分数的产生和意义,明确分数与除法的关系",progress:0,contentUrl:""},{id:"unit7_lesson1_k2",title:"分数单位",description:"认识分数单位,能说出一个分数中有几个这样的分数单位",progress:0,contentUrl:""}]},{id:"unit7_lesson2",title:"分数与除法",duration:40,knowledgeItems:[{id:"unit7_lesson2_k1",title:"分数与除法的关系",description:"理解分数与除法的关系,会用分数表示两个数相除的商",progress:0,contentUrl:""}]},{id:"unit7_lesson3",title:"真分数和假分数",duration:40,knowledgeItems:[{id:"unit7_lesson3_k1",title:"真分数和假分数的意义",description:"理解真分数和假分数的意义和特征",progress:0,contentUrl:""},{id:"unit7_lesson3_k2",title:"带分数",description:"认识带分数,会进行假分数与整数、带分数的互化",progress:0,contentUrl:""}]},{id:"unit7_lesson4",title:"分数的基本性质",duration:40,knowledgeItems:[{id:"unit7_lesson4_k1",title:"分数的基本性质",description:"理解分数的基本性质,能运用分数的基本性质进行分数的变形",progress:0,contentUrl:""}]},{id:"unit7_lesson5",title:"约分",duration:40,knowledgeItems:[{id:"unit7_lesson5_k1",title:"最大公因数",description:"理解公因数和最大公因数的意义,掌握求两个数的最大公因数的方法",progress:0,contentUrl:""},{id:"unit7_lesson5_k2",title:"约分的方法",description:"掌握约分的方法,能正确地进行约分",progress:0,contentUrl:""}]},{id:"unit7_lesson6",title:"通分",duration:40,knowledgeItems:[{id:"unit7_lesson6_k1",title:"最小公倍数",description:"理解公倍数和最小公倍数的意义,掌握求两个数的最小公倍数的方法",progress:0,contentUrl:""},{id:"unit7_lesson6_k2",title:"通分的方法",description:"掌握通分的方法,能正确地进行通分",progress:0,contentUrl:""}]},{id:"unit7_lesson7",title:"分数和小数的互化",duration:40,knowledgeItems:[{id:"unit7_lesson7_k1",title:"分数化成小数",description:"掌握分数化成小数的方法",progress:0,contentUrl:""},{id:"unit7_lesson7_k2",title:"小数化成分数",description:"掌握小数化成分数的方法",progress:0,contentUrl:""}]}]},{id:"unit_8",title:"分数的加法和减法",description:"学习同分母分数、异分母分数的加法和减法",estimatedDuration:"3周",totalLessons:12,moduleCategory:"Arithmetic and Algebra",lessons:[{id:"unit8_lesson1",title:"同分母分数加、减法",duration:40,knowledgeItems:[{id:"unit8_lesson1_k1",title:"同分母分数加法的计算方法",description:"掌握同分母分数加法的计算方法",progress:0,contentUrl:""},{id:"unit8_lesson1_k2",title:"同分母分数减法的计算方法",description:"掌握同分母分数减法的计算方法",progress:0,contentUrl:""}]},{id:"unit8_lesson2",title:"异分母分数加、减法",duration:40,knowledgeItems:[{id:"unit8_lesson2_k1",title:"异分母分数加法的计算方法",description:"掌握异分母分数加法的计算方法:先通分,然后按照同分母分数加法进行计算",progress:0,contentUrl:""},{id:"unit8_lesson2_k2",title:"异分母分数减法的计算方法",description:"掌握异分母分数减法的计算方法:先通分,然后按照同分母分数减法进行计算",progress:0,contentUrl:""}]},{id:"unit8_lesson3",title:"分数加减混合运算",duration:40,knowledgeItems:[{id:"unit8_lesson3_k1",title:"分数加减混合运算的顺序",description:"掌握分数加减混合运算的运算顺序",progress:0,contentUrl:""},{id:"unit8_lesson3_k2",title:"整数加法运算定律推广到分数加法",description:"理解整数加法运算定律对于分数加法同样适用,能运用运算定律进行简便计算",progress:0,contentUrl:""}]}]},{id:"unit_9",title:"折线统计图",description:"学习单式折线统计图和复式折线统计图的认识和制作",estimatedDuration:"2周",totalLessons:6,moduleCategory:"Probability and Statistics",lessons:[{id:"unit9_lesson1",title:"单式折线统计图",duration:40,knowledgeItems:[{id:"unit9_lesson1_k1",title:"单式折线统计图的特点",description:"认识单式折线统计图,了解其特点和作用",progress:0,contentUrl:""},{id:"unit9_lesson1_k2",title:"绘制单式折线统计图",description:"能根据数据绘制单式折线统计图",progress:0,contentUrl:""}]},{id:"unit9_lesson2",title:"复式折线统计图",duration:40,knowledgeItems:[{id:"unit9_lesson2_k1",title:"复式折线统计图的特点",description:"认识复式折线统计图,了解其特点和作用",progress:0,contentUrl:""},{id:"unit9_lesson2_k2",title:"绘制复式折线统计图",description:"能根据数据绘制复式折线统计图",progress:0,contentUrl:""}]},{id:"unit9_lesson3",title:"数据分析",duration:40,knowledgeItems:[{id:"unit9_lesson3_k1",title:"根据统计图进行数据分析",description:"能根据折线统计图进行简单的数据分析,作出合理的判断和预测",progress:0,contentUrl:""}]}]}]},Yr=Gr,Xr=Re,An=R.createContext(null),Cn=()=>{const e=R.useContext(An);if(!e)throw new Error("useGradeUnitBrowser must be used within GradeUnitBrowserProvider");return e},Zr=({children:e})=>{const[t,n]=R.useState(null),[s,r]=R.useState([]),[i,o]=R.useState(null),[l,m]=R.useState({}),[f,u]=R.useState(!1),[h,x]=R.useState(null),[O,p]=R.useState(null),[y,g]=R.useState([]),E=R.useCallback(async(A,I)=>{u(!0),x(null);try{await new Promise(F=>setTimeout(F,100));try{console.log("Attempting to fetch units data from API..."),console.log("API URL will be:",`/api/user/grade/units/nav?gradeId=${A}`),console.log("Using token:",ut.getToken());const F=await ut.getUserGradeUnitsNav(A);console.log("API call successful, units data:",F),o(F),console.log("unitsData:",F)}catch(F){const q=F;console.error("🚨 MSW API 请求失败 - 详细调试信息:"),console.error("📡 请求 URL:",`/api/user/grade/units/nav?gradeId=${A}`),console.error("🔑 使用 Token:",ut.getToken()),console.error("❌ 错误信息:",q.message),console.error("📝 错误类型:",q.name),console.error("🔍 错误堆栈:",q.stack),x(`MSW API 请求失败: ${q.message} - 请检查浏览器控制台获取详细信息`);const ne={userId:I,courseId:"g5",courseTitle:"小学数学五年级",courseLevel:5,totalUnits:H.units.length,completedUnits:2,overallProgress:22,status:"in-progress",lastAccessed:new Date().toISOString(),units:H.units.map((z,D)=>({unitId:z.id,title:z.title,description:z.description,moduleCategory:z.moduleCategory,estimatedDuration:z.estimatedDuration,totalLessons:z.lessons.length,completedLessons:D<2?Math.floor(z.lessons.length*.5):0,progressPercentage:D<2?50:0,status:D<2?"in-progress":"not-started",lastAccessed:D<2?new Date().toISOString():void 0,isActive:D===0,route:`/math/grade-5/unit/${z.id}`,icon:ct[z.moduleCategory]||ct.Default}))};o(ne),console.log("Using courseData.ts as fallback:",ne)}const w={};H.units.forEach(F=>{w[F.id]=F.lessons.map(q=>({id:q.id,title:q.title,duration:q.duration,knowledgeItems:q.knowledgeItems.map(ne=>({...ne,progress:0}))}))}),console.log("Lessons data loaded:",w),m(w),console.log("unitsData:",i),console.log("unitsData.units:",i?.units),console.log("First unit isActive:",i?.units?.[0]?.isActive),console.log("First unit unitId:",i?.units?.[0]?.unitId),console.log("Lessons data keys:",Object.keys(w)),console.log("Lessons for unit_1:",w.unit_1),n({id:I,name:"学生用户",level:5,avatar:"https://i.pravatar.cc/40",badges:["🏆"]}),r([{id:"g5",label:"五年级",status:"进行中"},{id:"g6",label:"六年级",status:"new"}])}catch(w){x(w instanceof Error?w.message:"数据加载失败"),console.error("数据加载错误:",w),console.error("API call error details:",w),console.log("gradeId parameter:",A)}finally{u(!1)}},[]),k=R.useCallback(A=>{g(I=>I.includes(A)?I.filter(w=>w!==A):[...I,A])},[]),N=R.useCallback(A=>{p(A)},[]);R.useEffect(()=>{if(console.log("unitsData state updated:",i),i&&i.units.length>0){const A=i.units.find(I=>I.isActive)?.unitId||i.units[0].unitId;p(A),console.log("Default active unit set after state update:",A)}},[i]);const P={userInfo:t,exploreMenu:s,unitsData:i,lessons:l,loading:f,error:h,activeUnitId:O,activeLessonIds:y,setLoading:u,setError:x,setActiveUnit:N,toggleLesson:k,loadPageData:E};return c.jsx(An.Provider,{value:P,children:e})},Qr=({gradeId:e,userId:t,onLearnAction:n,className:s,userInfo:r,exploreMenu:i})=>{const{userInfo:o,exploreMenu:l,unitsData:m,lessons:f,loading:u,error:h,activeUnitId:x,activeLessonIds:O,setActiveUnit:p,toggleLesson:y,loadPageData:g}=Cn(),E=r??o,k=i??l;R.useEffect(()=>{g(e,t)},[e,t,g]),R.useEffect(()=>{console.log("activeUnitId from context:",x),console.log("lessons from context:",f);const A=m?.units?.find(w=>w.unitId===x)||null,I=A&&x&&f[x]?{id:A.unitId,title:A.title,description:A.description,estimatedDuration:A.estimatedDuration,totalLessons:A.totalLessons,moduleCategory:A.moduleCategory,lessons:f[x]}:null;console.log("activeUnit computed:",I)},[x,f,m]);const N=m?.units?.find(A=>A.unitId===x)||null,P=N&&x&&f[x]?{id:N.unitId,title:N.title,description:N.description,estimatedDuration:N.estimatedDuration,totalLessons:N.totalLessons,moduleCategory:N.moduleCategory,lessons:f[x]}:null;return u?c.jsx("div",{className:"grade-unit-browser-page loading","data-testid":"grade-unit-browser-page",children:c.jsx("div",{className:"loading-spinner","data-testid":"loading-spinner",children:"加载中..."})}):h?c.jsxs("div",{className:"grade-unit-browser-page error","data-testid":"grade-unit-browser-page",children:[c.jsx("div",{className:"error-message","data-testid":"error-message",children:h}),c.jsx("button",{onClick:()=>g(e,t),className:"retry-button",children:"重试"})]}):c.jsxs("div",{className:`grade-unit-browser-page ${s||""}`,"data-testid":"grade-unit-browser-page",children:[c.jsx("div",{className:"header-area",children:c.jsx(_n,{userData:E||void 0,exploreItems:k})}),c.jsx("div",{className:"sidebar-area",children:c.jsx(Nt,{data:m,activeUnitId:x,onUnitSelect:p,loading:u})}),c.jsx("div",{className:"content-area",children:c.jsx(kt,{unit:P,activeLessonIds:O,onToggleLesson:y,onLearnAction:n||(()=>{}),loading:u})})]})},te=(e,t,n)=>({x:e.x+(t.x-e.x)*n,y:e.y+(t.y-e.y)*n}),eo=()=>{const e={x:.5,y:.1,name:"A"},t={x:.1,y:.75,name:"B"},n={x:.9,y:.75,name:"C"},s={...te(e,t,1/3),name:"D"},r={...te(e,n,1/3),name:"E"},i={...te(e,t,2/3),name:"M"},o={...te(e,n,2/3),name:"N"},l={...te(t,n,1/3),name:"P"},m={...te(t,n,2/3),name:"Q"},f={...te(s,r,1/3),name:"U"},u={...te(s,r,2/3),name:"S"},h={...te(i,o,1/3),name:"K"},x={...te(i,o,2/3),name:"L"};return{A:e,B:t,C:n,D:s,E:r,M:i,N:o,P:l,Q:m,U:f,S:u,K:h,L:x}},to=(e,t,n)=>{const s={};for(const[r,i]of Object.entries(e))s[r]={...i,x:i.x*t,y:i.y*n};return s},no=(e,t)=>{const[n,s,r]=t,{x:i,y:o}=e,l=(s.y-r.y)*(n.x-r.x)+(r.x-s.x)*(n.y-r.y);if(Math.abs(l)<1e-4)return!1;const m=((s.y-r.y)*(i-r.x)+(r.x-s.x)*(o-r.y))/l,f=((r.y-n.y)*(i-r.x)+(n.x-r.x)*(o-r.y))/l,u=1-m-f;return m>=-.001&&f>=-.001&&u>=-.001},so=(e,t)=>{if(!e||!t||e.length!==3||t.length!==3)return!1;const n=e.map(r=>r.name).sort(),s=t.map(r=>r.name).sort();return n.every((r,i)=>r===s[i])},ro=(e,t)=>{if(!e||!t||e.length!==t.length)return!1;const n=e.map(r=>r.name).sort(),s=t.map(r=>r.name).sort();return n.join("")===s.join("")},oo=()=>[{from:"A",to:"B"},{from:"A",to:"C"},{from:"B",to:"C"},{from:"D",to:"E"},{from:"M",to:"N"},{from:"P",to:"Q"},{from:"A",to:"D"},{from:"A",to:"E"},{from:"A",to:"M"},{from:"A",to:"N"},{from:"A",to:"P"},{from:"A",to:"Q"},{from:"D",to:"U"},{from:"U",to:"S"},{from:"S",to:"E"},{from:"M",to:"K"},{from:"K",to:"L"},{from:"L",to:"N"},{from:"B",to:"P"},{from:"P",to:"Q"},{from:"Q",to:"C"}],io=()=>[{id:"gem_1",vertices:["A","B","P"],points:10,category:"basic"},{id:"gem_2",vertices:["A","P","Q"],points:10,category:"basic"},{id:"gem_3",vertices:["A","Q","C"],points:10,category:"basic"},{id:"gem_4",vertices:["A","B","Q"],points:15,category:"medium"},{id:"gem_5",vertices:["A","P","C"],points:15,category:"medium"},{id:"gem_6",vertices:["A","B","C"],points:20,category:"large"},{id:"gem_7",vertices:["A","D","U"],points:12,category:"ade_small"},{id:"gem_8",vertices:["A","U","S"],points:12,category:"ade_small"},{id:"gem_9",vertices:["A","S","E"],points:12,category:"ade_small"},{id:"gem_10",vertices:["A","D","S"],points:18,category:"ade_medium"},{id:"gem_11",vertices:["A","U","E"],points:18,category:"ade_medium"},{id:"gem_12",vertices:["A","D","E"],points:25,category:"ade_large"},{id:"gem_13",vertices:["A","M","K"],points:14,category:"amn_small"},{id:"gem_14",vertices:["A","K","L"],points:14,category:"amn_small"},{id:"gem_15",vertices:["A","L","N"],points:14,category:"amn_small"},{id:"gem_16",vertices:["A","M","L"],points:20,category:"amn_medium"},{id:"gem_17",vertices:["A","K","N"],points:20,category:"amn_medium"},{id:"gem_18",vertices:["A","M","N"],points:30,category:"amn_large"}],ao={TOTAL_GEMS:18,CANVAS_RATIO:4/3,DEFAULT_VIEWBOX:{width:700,height:600},POINT_RADIUS:{default:6,selected:9},TOLERANCE:.001,MIN_TRIANGLE_AREA:.001,COORDINATE_PRECISION:1e-4,BARYCENTRIC_TOLERANCE:-.001},Rn=(e=Re.id)=>{const t=H.units.map((r,i)=>{const o=Math.min(100,Math.max(0,i*15+Math.random()*20)),l=Math.floor(r.lessons.length*o/100),m=r.lessons.map((f,u)=>{const h=Math.min(100,Math.max(0,o-u*10+Math.random()*30));return{lessonId:f.id,status:h>=100?"completed":h>0?"in-progress":"not-started",progressPercentage:Math.round(h),lastAccessed:h>0?new Date(Date.now()-Math.random()*7*24*60*60*1e3).toISOString():void 0,timeSpent:h>0?Math.floor(Math.random()*120+10):void 0,score:h>=100?Math.floor(Math.random()*21+80):void 0,attempts:h>0?Math.floor(Math.random()*3+1):void 0}});return{unitId:r.id,userId:e,totalLessons:r.lessons.length,completedLessons:l,progressPercentage:Math.round(o),status:o>=100?"completed":o>0?"in-progress":"not-started",lastAccessed:o>0?new Date(Date.now()-Math.random()*14*24*60*60*1e3).toISOString():void 0,lessons:m}}),n=t.reduce((r,i)=>r+i.progressPercentage,0)/t.length,s=t.filter(r=>r.status==="completed").length;return{courseId:H.id,userId:e,totalUnits:t.length,completedUnits:s,progressPercentage:Math.round(n),status:n>=100?"completed":n>0?"in-progress":"not-started",lastAccessed:new Date(Date.now()-Math.random()*3*24*60*60*1e3).toISOString(),units:t}},kn=Rn(),dt=(e,t)=>e===Re.id&&t===H.id?kn:null,Nn=(e,t,n)=>{const s=dt(e,t);return s&&s.units.find(r=>r.unitId===n)||null},lo=(e,t,n,s)=>{const r=Nn(e,t,n);return r&&r.lessons.find(i=>i.lessonId===s)||null},co=(e,t,n,s,r)=>(console.log("Updating lesson progress:",{userId:e,courseId:t,unitId:n,lessonId:s,progress:r}),!0),ft=(e,t)=>{const n=dt(e,t);if(!n)return null;const s=H.units.map((r,i)=>{const o=n.units.find(l=>l.unitId===r.id);return{unitId:r.id,title:r.title,description:r.description,moduleCategory:r.moduleCategory,estimatedDuration:r.estimatedDuration,totalLessons:r.lessons.length,completedLessons:o?.completedLessons||0,progressPercentage:o?.progressPercentage||0,status:o?.status||"not-started",lastAccessed:o?.lastAccessed,isActive:i===0,route:`/math/grade-${H.level}/unit/${r.id}`}});return{userId:e,courseId:H.id,courseTitle:H.title,courseLevel:H.level,totalUnits:s.length,completedUnits:s.filter(r=>r.status==="completed").length,overallProgress:n.progressPercentage,status:n.status,lastAccessed:n.lastAccessed,units:s}},uo=(e,t,n)=>{const s=ft(e,t);return s&&s.units.find(r=>r.unitId===n)||null},fo=(e,t,n,s)=>(console.log("Updating unit active status:",{userId:e,courseId:t,unitId:n,isActive:s}),!0),mo=ft(Re.id,H.id),po={userId:Re.id,courseId:H.id,courseTitle:H.title,courseLevel:H.level,totalUnits:H.units.length,completedUnits:3,overallProgress:45,status:"in-progress",lastAccessed:"2024-01-15T10:30:00Z",units:[{unitId:"unit_1",title:"小数乘法",description:"学习小数乘法的计算方法及应用",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"3周",totalLessons:10,completedLessons:8,progressPercentage:80,status:"completed",lastAccessed:"2024-01-10T14:20:00Z",isActive:!1,route:"/math/grade-5/unit/unit_1",icon:"🔢"},{unitId:"unit_2",title:"小数除法",description:"学习小数除法的计算方法及应用",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"3周",totalLessons:12,completedLessons:6,progressPercentage:50,status:"in-progress",lastAccessed:"2024-01-15T10:30:00Z",isActive:!0,route:"/math/grade-5/unit/unit_2",icon:"➗"},{unitId:"unit_3",title:"简易方程",description:"学习用字母表示数和解简易方程",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"4周",totalLessons:14,completedLessons:2,progressPercentage:14,status:"in-progress",lastAccessed:"2024-01-12T16:45:00Z",isActive:!1,route:"/math/grade-5/unit/unit_3",icon:"📝"},{unitId:"unit_4",title:"多边形的面积",description:"学习平行四边形、三角形、梯形和组合图形的面积计算",moduleCategory:"Graphics and Geometry",estimatedDuration:"3周",totalLessons:12,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_4",icon:"📐"},{unitId:"unit_5",title:"因数与倍数",description:"学习因数、倍数、质数、合数等概念",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"3周",totalLessons:10,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_5",icon:"🔢"},{unitId:"unit_6",title:"长方体和正方体",description:"学习长方体和正方体的特征、表面积和体积计算",moduleCategory:"Graphics and Geometry",estimatedDuration:"4周",totalLessons:14,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_6",icon:"📦"},{unitId:"unit_7",title:"分数的意义和性质",description:"学习分数的意义、性质和约分、通分等方法",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"4周",totalLessons:16,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_7",icon:"½"},{unitId:"unit_8",title:"分数的加法和减法",description:"学习同分母分数、异分母分数的加法和减法",moduleCategory:"Arithmetic and Algebra",estimatedDuration:"3周",totalLessons:12,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_8",icon:"➕"},{unitId:"unit_9",title:"折线统计图",description:"学习单式折线统计图和复式折线统计图的认识和制作",moduleCategory:"Probability and Statistics",estimatedDuration:"2周",totalLessons:6,completedLessons:0,progressPercentage:0,status:"not-started",isActive:!1,route:"/math/grade-5/unit/unit_9",icon:"📊"}]};v.AbilityAssessmentDashboard=Wr,v.AbilityProgressBar=vn,v.Button=St,v.ContentAccordion=kt,v.GEOMETRY_CONFIG=ao,v.GradeUnitBrowserPage=Qr,v.GradeUnitBrowserProvider=Zr,v.MOCK_USER_COURSE_PROGRESS=kn,v.MOCK_USER_GRADE_UNITS_NAV=mo,v.MOCK_USER_GRADE_UNITS_PROGRESS=po,v.MathWizHeader=_n,v.PersonalizedAdvicePanel=En,v.RadarChart=bn,v.RecommendationCard=Sn,v.Sidebar=Nt,v.Submenu=Xe,v.UserProfile=gn,v.calculateGamePoints=eo,v.categoryIcons=ct,v.comparePointArrays=ro,v.courseData=H,v.exploreItems=Yr,v.generateMockUserCourseProgress=Rn,v.getBasicGemDefinitions=io,v.getBasicLineDefinitions=oo,v.getUnitNavItem=uo,v.getUserCourseProgress=dt,v.getUserGradeUnitsNav=ft,v.getUserLessonProgress=lo,v.getUserUnitProgress=Nn,v.isPointInTriangle=no,v.pointOnLine=te,v.statusColors=Jr,v.statusMapping=zr,v.toPixelCoordinates=to,v.trianglesMatch=so,v.updateUnitActiveStatus=fo,v.updateUserLessonProgress=co,v.useGradeUnitBrowser=Cn,v.userData=Xr,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})}));
77
71
  //# sourceMappingURL=index.cjs.map