(function($,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],p):($=typeof globalThis<"u"?globalThis:$||self,p($.index={},$.React))})(this,function($,p){"use strict";function Ae(u){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(u){for(const g in u)if(g!=="default"){const s=Object.getOwnPropertyDescriptor(u,g);Object.defineProperty(l,g,s.get?s:{enumerable:!0,get:()=>u[g]})}}return l.default=u,Object.freeze(l)}const $e=Ae(p);function Me(u){if(u.__esModule)return u;var l=u.default;if(typeof l=="function"){var g=function s(){return this instanceof s?Reflect.construct(l,arguments,this.constructor):l.apply(this,arguments)};g.prototype=l.prototype}else g={};return Object.defineProperty(g,"__esModule",{value:!0}),Object.keys(u).forEach(function(s){var m=Object.getOwnPropertyDescriptor(u,s);Object.defineProperty(g,s,m.get?m:{enumerable:!0,get:function(){return u[s]}})}),g}var Q={exports:{}},U={};const ue=Me($e);/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ce;function Ne(){if(ce)return U;ce=1;var u=ue,l=Symbol.for("react.element"),g=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,m=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,M={key:!0,ref:!0,__self:!0,__source:!0};function D(C,c,k){var b,y={},P=null,j=null;k!==void 0&&(P=""+k),c.key!==void 0&&(P=""+c.key),c.ref!==void 0&&(j=c.ref);for(b in c)s.call(c,b)&&!M.hasOwnProperty(b)&&(y[b]=c[b]);if(C&&C.defaultProps)for(b in c=C.defaultProps,c)y[b]===void 0&&(y[b]=c[b]);return{$$typeof:l,type:C,key:P,ref:j,props:y,_owner:m.current}}return U.Fragment=g,U.jsx=D,U.jsxs=D,U}var B={};/** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var fe;function Ye(){return fe||(fe=1,process.env.NODE_ENV!=="production"&&function(){var u=ue,l=Symbol.for("react.element"),g=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),D=Symbol.for("react.provider"),C=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),j=Symbol.for("react.offscreen"),R=Symbol.iterator,O="@@iterator";function Y(e){if(e===null||typeof e!="object")return null;var r=R&&e[R]||e[O];return typeof r=="function"?r:null}var x=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function d(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n=1&&h>=0&&a[v]!==T[h];)h--;for(;v>=1&&h>=0;v--,h--)if(a[v]!==T[h]){if(v!==1||h!==1)do if(v--,h--,h<0||a[v]!==T[h]){var w=` `+a[v].replace(" at new "," at ");return e.displayName&&w.includes("")&&(w=w.replace("",e.displayName)),typeof e=="function"&&H.set(e,w),w}while(v>=1&&h>=0);break}}}finally{te=!1,ee.current=f,Je(),Error.prepareStackTrace=i}var W=e?e.displayName||e.name:"",Fe=W?G(W):"";return typeof e=="function"&&H.set(e,Fe),Fe}function Ge(e,r,t){return _e(e,!1)}function He(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function K(e,r,t){if(e==null)return"";if(typeof e=="function")return _e(e,He(e));if(typeof e=="string")return G(e);switch(e){case k:return G("Suspense");case b:return G("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case c:return Ge(e.render);case y:return K(e.type,r,t);case P:{var n=e,i=n._payload,f=n._init;try{return K(f(i),r,t)}catch{}}}return""}var X=Object.prototype.hasOwnProperty,Re={},Te=x.ReactDebugCurrentFrame;function Z(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);Te.setExtraStackFrame(t)}else Te.setExtraStackFrame(null)}function Ke(e,r,t,n,i){{var f=Function.call.bind(X);for(var o in e)if(f(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var T=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw T.name="Invariant Violation",T}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(v){a=v}a&&!(a instanceof Error)&&(Z(i),d("%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).",n||"React class",t,o,typeof a),Z(null)),a instanceof Error&&!(a.message in Re)&&(Re[a.message]=!0,Z(i),d("Failed %s type: %s",t,a.message),Z(null))}}}var Xe=Array.isArray;function ne(e){return Xe(e)}function Ze(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Qe(e){try{return je(e),!1}catch{return!0}}function je(e){return""+e}function Oe(e){if(Qe(e))return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ze(e)),je(e)}var z=x.ReactCurrentOwner,er={key:!0,ref:!0,__self:!0,__source:!0},Pe,Ce,ae;ae={};function rr(e){if(X.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function tr(e){if(X.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function nr(e,r){if(typeof e.ref=="string"&&z.current&&r&&z.current.stateNode!==r){var t=F(z.current.type);ae[t]||(d('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',F(z.current.type),e.ref),ae[t]=!0)}}function ar(e,r){{var t=function(){Pe||(Pe=!0,d("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function or(e,r){{var t=function(){Ce||(Ce=!0,d("%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)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var ir=function(e,r,t,n,i,f,o){var a={$$typeof:l,type:e,key:r,ref:t,props:o,_owner:f};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function sr(e,r,t,n,i){{var f,o={},a=null,T=null;t!==void 0&&(Oe(t),a=""+t),tr(r)&&(Oe(r.key),a=""+r.key),rr(r)&&(T=r.ref,nr(r,i));for(f in r)X.call(r,f)&&!er.hasOwnProperty(f)&&(o[f]=r[f]);if(e&&e.defaultProps){var v=e.defaultProps;for(f in v)o[f]===void 0&&(o[f]=v[f])}if(a||T){var h=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&ar(o,h),T&&or(o,h)}return ir(e,a,T,i,n,z.current,o)}}var oe=x.ReactCurrentOwner,xe=x.ReactDebugCurrentFrame;function V(e){if(e){var r=e._owner,t=K(e.type,e._source,r?r.type:null);xe.setExtraStackFrame(t)}else xe.setExtraStackFrame(null)}var ie;ie=!1;function se(e){return typeof e=="object"&&e!==null&&e.$$typeof===l}function we(){{if(oe.current){var e=F(oe.current.type);if(e)return` Check the render method of \``+e+"`."}return""}}function ur(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return` Check your code at `+r+":"+t+"."}return""}}var Se={};function cr(e){{var r=we();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=` Check the top-level render call using <`+t+">.")}return r}}function ke(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=cr(r);if(Se[t])return;Se[t]=!0;var n="";e&&e._owner&&e._owner!==oe.current&&(n=" It was passed a child from "+F(e._owner.type)+"."),V(e),d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),V(null)}}function De(e,r){{if(typeof e!="object")return;if(ne(e))for(var t=0;t",a=" Did you accidentally export a JSX literal instead of a component?"):v=typeof e,d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",v,a)}var h=sr(e,r,t,i,f);if(h==null)return h;if(o){var w=r.children;if(w!==void 0)if(n)if(ne(w)){for(var W=0;W{const[R,O]=p.useState(0),[Y,x]=p.useState(!1),d=p.useMemo(()=>{const S=Math.trunc(100/l*R),N=s*Math.PI/l*R,q=s*Math.PI-N;return{percent:S,length:N,remainLength:q}},[l,R,s]),E=p.useMemo(()=>{const S=s+m,N=s/2,q=s/2+m/2;return{size:S,radius:N,position:q}},[s,m]),I=p.useCallback(()=>{switch(C){case"left":return"180deg";case"top":return"270deg";case"right":return"0deg";case"bottom":return"90deg"}},[C]);return p.useEffect(()=>{!u||u<0||!y||R>=u?(x(!1),y||O(u)):x(!0)},[y,u,R]),p.useEffect(()=>{if(Y){const S=setInterval(()=>{O(N=>N+1)},P);return()=>{clearInterval(S)}}},[P,Y]),p.useEffect(()=>{if(j){if(c==="none")return;j(c==="state"?R:d.percent)}else return},[c,j,d.percent,R]),_.jsxs("div",{className:`tuo-circle-progress-container ${g&&g}`,style:{width:E.size,height:E.size},children:[_.jsxs("svg",{style:{width:E.size,height:E.size,transform:`rotate(${I()})`},children:[_.jsx("circle",{r:E.radius,cy:E.position,cx:E.position,strokeDasharray:s*Math.PI,className:"tuo-circle-progress-dashes-background",strokeWidth:m,stroke:D}),_.jsx("circle",{r:E.radius,cy:E.position,cx:E.position,strokeDasharray:`${d.length} ${d.remainLength}`,className:"tuo-circle-progress-dashes",strokeWidth:m,stroke:M})]}),_.jsx("div",{className:"tuo-circle-progress-content",style:{fontSize:`${k}px`,color:b},children:c!=="none"&&_.jsx("div",{className:"tuo-circle-progress-text",children:c==="percent"?_.jsxs("span",{children:[d.percent,"%"]}):_.jsxs("span",{children:[R,"/",l]})})})]})},Ve=({progress:u,max:l,className:g,barWidth:s=100,barHeight:m=10,barRadius:M=10,progressColor:D="#50586C",backgroundColor:C="#DCE2F0",displayState:c="percent",fontSize:k=12,fontColor:b="#777",animation:y=!0,animationSpeed:P=10,onAnimationState:j})=>{const R=p.useRef(null),[O,Y]=p.useState(0),[x,d]=p.useState(!1),E=p.useMemo(()=>{let I=-1;const S=Math.trunc(100/l*O);return s==="auto"&&R.current&&(I=R.current.offsetWidth/l*O),s!=="auto"&&(I=s/l*O),{percent:S,length:I}},[l,O,s]);return p.useEffect(()=>{!u||u<0||!y||O>=u?(d(!1),y||Y(u)):d(!0)},[y,u,O]),p.useEffect(()=>{if(x){const I=setInterval(()=>{Y(S=>S+1)},P);return()=>{clearInterval(I)}}},[P,x]),p.useEffect(()=>{if(j){if(c==="none")return;j(c==="state"?O:E.percent)}else return},[c,j,E.percent,O]),_.jsxs("div",{ref:R,className:`tuo-bar-progress-container ${g&&g}`,style:{width:s},children:[_.jsx("div",{className:"tuo-bar-progress-dashes-background",style:{height:m,borderRadius:M,background:C},children:_.jsx("div",{className:"tuo-bar-progress-dashes",style:{width:E.length,height:m,background:D}})}),_.jsx("div",{className:"tuo-bar-progress-content",children:c!=="none"&&_.jsx("div",{className:"tuo-circle-progress-text",style:{fontSize:`${k}px`,color:b},children:c==="percent"?_.jsxs("span",{children:[E.percent,"%"]}):_.jsxs("span",{children:[O,"/",l]})})})]})};$.TuoBarProgress=Ve,$.TuoCircleProgress=Le,Object.defineProperty($,Symbol.toStringTag,{value:"Module"})}); (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".tuo-circle-progress-container{position:relative}.tuo-circle-progress-container [class*=circle-progress-dashes]{fill:transparent;stroke-linecap:round}.tuo-circle-progress-container .tuo-circle-progress-content{position:absolute;top:50%;left:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;transform:translate(-50%,-50%)}.tuo-bar-progress-container{position:relative;display:flex;flex-direction:column;gap:3px}.tuo-bar-progress-container [class*=bar-progress-dashes]{width:100%;fill:transparent;stroke-linecap:round}.tuo-bar-progress-container .tuo-bar-progress-dashes-background{position:relative;overflow:hidden}.tuo-bar-progress-container .tuo-bar-progress-dashes-background .tuo-bar-progress-dashes{position:absolute;top:0;left:0}.tuo-bar-progress-container .tuo-bar-progress-content{display:flex;justify-content:flex-end}")),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();