@unizap/uniui 1.0.17 → 1.0.19
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/uniui.umd.cjs
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,L,M,G,M),J[M+L]=!0)}if(M=null,F!==void 0&&(t(F),M=""+F),i(S)&&(t(S.key),M=""+S.key),"key"in S){F={};for(var W in S)W!=="key"&&(F[W]=S[W])}else F=S;return M&&l(F,typeof h=="function"?h.displayName||h.name||"Unknown":h),u(h,M,V,N,o(),F,z,P)}function g(h){typeof h=="object"&&h!==null&&h.$$typeof===p&&h._store&&(h._store.validated=1)}var f=w,p=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),y=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),A=Symbol.for("react.activity"),X=Symbol.for("react.client.reference"),ae=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se=Object.prototype.hasOwnProperty,ee=Array.isArray,q=console.createTask?console.createTask:function(){return null};f={"react-stack-bottom-frame":function(h){return h()}};var K,O={},ne=f["react-stack-bottom-frame"].bind(f,a)(),ue=q(r(a)),J={};Oe.Fragment=m,Oe.jsx=function(h,S,F,L,N){var V=1e4>ae.recentlyCreatedOwnerStacks++;return d(h,S,F,!1,L,N,V?Error("react-stack-top-frame"):ne,V?q(r(h)):ue)},Oe.jsxs=function(h,S,F,L,N){var V=1e4>ae.recentlyCreatedOwnerStacks++;return d(h,S,F,!0,L,N,V?Error("react-stack-top-frame"):ne,V?q(r(h)):ue)}}()),Oe}var vn;function Ur(){return vn||(vn=1,process.env.NODE_ENV==="production"?We.exports=Gr():We.exports=Wr()),We.exports}var s=Ur();const ve={dark:{filled:"bg-color-gray-800 text-color-gray-200 hover:bg-color-gray-900",outline:"border-color-gray-900 text-color-gray-900 hover:bg-color-gray-50",transparent:"text-color-gray-900 hover:bg-color-gray-50",accent:"accent-color-gray-900",peer:"peer-checked:border-color-gray-900 peer-checked:text-color-gray-900"},gray:{filled:"bg-color-gray-500 text-color-white hover:bg-color-gray-600",outline:"border-color-gray-500 text-color-gray-500 hover:bg-color-gray-50",transparent:"text-color-gray-500 hover:bg-color-gray-50",accent:"accent-color-gray-500",peer:"peer-checked:border-color-gray-500 peer-checked:text-color-gray-500"},light:{filled:"bg-color-white text-color-gray-700 hover:bg-color-gray-50",outline:"border-color-white text-color-white hover:bg-color-gray-50",transparent:"text-color-white hover:bg-color-gray-50",accent:"accent-color-white",peer:"peer-checked:border-color-white peer-checked:text-color-white"},pearl:{filled:"bg-color-zinc-200 text-color-zinc-600 hover:bg-color-zinc-300",outline:"border-color-zinc-200 text-color-zinc-900 hover:bg-color-zinc-50",transparent:"text-color-zinc-600 hover:bg-color-zinc-50",accent:"accent-color-zinc-200",peer:"peer-checked:border-color-zinc-200 peer-checked:text-color-zinc-200"},red:{filled:"bg-color-red-500 text-color-white hover:bg-color-red-600",outline:"border-color-red-500 text-color-red-500 hover:bg-color-red-50",transparent:"text-color-red-500 hover:bg-color-red-50",accent:"accent-color-red-500",peer:"peer-checked:border-color-red-500 peer-checked:text-color-red-500"},orange:{filled:"bg-color-orange-500 text-color-white hover:bg-color-orange-600",outline:"border-color-orange-500 text-color-orange-500 hover:bg-color-orange-50",transparent:"text-color-orange-500 hover:bg-color-orange-50",accent:"accent-color-orange-500",peer:"peer-checked:border-color-orange-500 peer-checked:text-color-orange-500"},amber:{filled:"bg-color-amber-500 text-color-white hover:bg-color-amber-600",outline:"border-color-amber-500 text-color-amber-500 hover:bg-color-amber-50",transparent:"text-color-amber-500 hover:bg-color-amber-50",accent:"accent-color-amber-500",peer:"peer-checked:border-color-amber-500 peer-checked:text-color-amber-500"},yellow:{filled:"bg-color-yellow-500 text-color-white hover:bg-color-yellow-600",outline:"border-color-yellow-500 text-color-yellow-500 hover:bg-color-yellow-50",transparent:"text-color-yellow-500 hover:bg-color-yellow-50",accent:"accent-color-yellow-500",peer:"peer-checked:border-color-yellow-500 peer-checked:text-color-yellow-500"},lime:{filled:"bg-color-lime-500 text-color-white hover:bg-color-lime-600",outline:"border-color-lime-500 text-color-lime-500 hover:bg-color-lime-50",transparent:"text-color-lime-500 hover:bg-color-lime-50",accent:"accent-color-lime-500",peer:"peer-checked:border-color-lime-500 peer-checked:text-color-lime-500"},green:{filled:"bg-color-green-500 text-color-white hover:bg-color-green-600",outline:"border-color-green-500 text-color-green-500 hover:bg-color-green-50",transparent:"text-color-green-500 hover:bg-color-green-50",accent:"accent-color-green-500",peer:"peer-checked:border-color-green-500 peer-checked:text-color-green-500"},emerald:{filled:"bg-color-emerald-500 text-color-white hover:bg-color-emerald-600",outline:"border-color-emerald-500 text-color-emerald-500 hover:bg-color-emerald-50",transparent:"text-color-emerald-500 hover:bg-color-emerald-50",accent:"accent-color-emerald-500",peer:"peer-checked:border-color-emerald-500 peer-checked:text-color-emerald-500"},teal:{filled:"bg-color-teal-500 text-color-white hover:bg-color-teal-600",outline:"border-color-teal-500 text-color-teal-500 hover:bg-color-teal-50",transparent:"text-color-teal-500 hover:bg-color-teal-50",accent:"accent-color-teal-500",peer:"peer-checked:border-color-teal-500 peer-checked:text-color-teal-500"},cyan:{filled:"bg-color-cyan-500 text-color-white hover:bg-color-cyan-600",outline:"border-color-cyan-500 text-color-cyan-500 hover:bg-color-cyan-50",transparent:"text-color-cyan-500 hover:bg-color-cyan-50",accent:"accent-color-cyan-500",peer:"peer-checked:border-color-cyan-500 peer-checked:text-color-cyan-500"},sky:{filled:"bg-color-sky-500 text-color-white hover:bg-color-sky-600",outline:"border-color-sky-500 text-color-sky-500 hover:bg-color-sky-50",transparent:"text-color-sky-500 hover:bg-color-sky-50",accent:"accent-color-sky-500",peer:"peer-checked:border-color-sky-500 peer-checked:text-color-sky-500"},blue:{filled:"bg-color-blue-500 text-color-white hover:bg-color-blue-600",outline:"border-color-blue-500 text-color-blue-500 hover:bg-color-blue-50",transparent:"text-color-blue-500 hover:bg-color-blue-50",accent:"accent-color-blue-500",peer:"peer-checked:border-color-blue-500 peer-checked:text-color-blue-500"},indigo:{filled:"bg-color-indigo-500 text-color-white hover:bg-color-indigo-600",outline:"border-color-indigo-500 text-color-indigo-500 hover:bg-color-indigo-50",transparent:"text-color-indigo-500 hover:bg-color-indigo-50",accent:"accent-color-indigo-500",peer:"peer-checked:border-color-indigo-500 peer-checked:text-color-indigo-500"},violet:{filled:"bg-color-violet-500 text-color-white hover:bg-color-violet-600",outline:"border-color-violet-500 text-color-violet-500 hover:bg-color-violet-50",transparent:"text-color-violet-500 hover:bg-color-violet-50",accent:"accent-color-violet-500",peer:"peer-checked:border-color-violet-500 peer-checked:text-color-violet-500"},purple:{filled:"bg-color-purple-500 text-color-white hover:bg-color-purple-600",outline:"border-color-purple-500 text-color-purple-500 hover:bg-color-purple-50",transparent:"text-color-purple-500 hover:bg-color-purple-50",accent:"accent-color-purple-500",peer:"peer-checked:border-color-purple-500 peer-checked:text-color-purple-500"},fuchsia:{filled:"bg-color-fuchsia-500 text-color-white hover:bg-color-fuchsia-600",outline:"border-color-fuchsia-500 text-color-fuchsia-500 hover:bg-color-fuchsia-50",transparent:"text-color-fuchsia-500 hover:bg-color-fuchsia-50",accent:"accent-color-fuchsia-500",peer:"peer-checked:border-color-fuchsia-500 peer-checked:text-color-fuchsia-500"},pink:{filled:"bg-color-pink-500 text-color-white hover:bg-color-pink-600",outline:"border-color-pink-500 text-color-pink-500 hover:bg-color-pink-50",transparent:"text-color-pink-500 hover:bg-color-pink-50",accent:"accent-color-pink-500",peer:"peer-checked:border-color-pink-500 peer-checked:text-color-pink-500"},rose:{filled:"bg-color-rose-500 text-color-white hover:bg-color-rose-600",outline:"border-color-rose-500 text-color-rose-500 hover:bg-color-rose-50",transparent:"text-color-rose-500 hover:bg-color-rose-50",accent:"accent-color-rose-500",peer:"peer-checked:border-color-rose-500 peer-checked:text-color-rose-500"}},Yr=e=>{Object.assign(ve,e)},Ue={dark:{track:"bg-color-gray-200",progress:"bg-color-gray-900",thumb:"bg-color-gray-900 border-color-gray-950 shadow-color-gray-300",thumbHover:"hover:bg-color-gray-900",thumbActive:"active:bg-color-gray-900"},gray:{track:"bg-color-gray-200",progress:"bg-color-gray-500",thumb:"bg-color-gray-500 border-color-gray-600 shadow-color-gray-200",thumbHover:"hover:bg-color-gray-600",thumbActive:"active:bg-color-gray-700"},light:{track:"bg-color-gray-600",progress:"bg-color-white",thumb:"bg-color-gray-100 border-color-white shadow-color-gray-200",thumbHover:"hover:bg-color-gray-200",thumbActive:"active:bg-color-white"},pearl:{track:"bg-color-zinc-200",progress:"bg-color-zinc-500",thumb:"bg-color-zinc-500 border-color-zinc-600 shadow-color-zinc-200",thumbHover:"hover:bg-color-zinc-600",thumbActive:"active:bg-color-zinc-700"},red:{track:"bg-color-red-200",progress:"bg-color-red-500",thumb:"bg-color-red-500 border-color-red-600/50 shadow-color-red-200",thumbHover:"hover:bg-color-red-600",thumbActive:"active:bg-color-red-700"},orange:{track:"bg-color-orange-200",progress:"bg-color-orange-500",thumb:"bg-color-orange-500 border-color-orange-600/50 shadow-color-orange-200",thumbHover:"hover:bg-color-orange-600",thumbActive:"active:bg-color-orange-700"},amber:{track:"bg-color-amber-200",progress:"bg-color-amber-500",thumb:"bg-color-amber-500 border-color-amber-600/50 shadow-color-amber-200",thumbHover:"hover:bg-color-amber-600",thumbActive:"active:bg-color-amber-700"},yellow:{track:"bg-color-yellow-200",progress:"bg-color-yellow-500",thumb:"bg-color-yellow-500 border-color-yellow-600/50 shadow-color-yellow-200",thumbHover:"hover:bg-color-yellow-600",thumbActive:"active:bg-color-yellow-700"},lime:{track:"bg-color-lime-200",progress:"bg-color-lime-500",thumb:"bg-color-lime-500 border-color-lime-600/50 shadow-color-lime-200",thumbHover:"hover:bg-color-lime-600",thumbActive:"active:bg-color-lime-700"},green:{track:"bg-color-green-200",progress:"bg-color-green-500",thumb:"bg-color-green-500 border-color-green-600/50 shadow-color-green-200",thumbHover:"hover:bg-color-green-600",thumbActive:"active:bg-color-green-700"},emerald:{track:"bg-color-emerald-200",progress:"bg-color-emerald-500",thumb:"bg-color-emerald-500 border-color-emerald-600/50 shadow-color-emerald-200",thumbHover:"hover:bg-color-emerald-600",thumbActive:"active:bg-color-emerald-700"},teal:{track:"bg-color-teal-200",progress:"bg-color-teal-500",thumb:"bg-color-teal-500 border-color-teal-600/50 shadow-color-teal-200",thumbHover:"hover:bg-color-teal-600",thumbActive:"active:bg-color-teal-700"},cyan:{track:"bg-color-cyan-200",progress:"bg-color-cyan-500",thumb:"bg-color-cyan-500 border-color-cyan-600/50 shadow-color-cyan-200",thumbHover:"hover:bg-color-cyan-600",thumbActive:"active:bg-color-cyan-700"},sky:{track:"bg-color-sky-200",progress:"bg-color-sky-500",thumb:"bg-color-sky-500 border-color-sky-600/50 shadow-color-sky-200",thumbHover:"hover:bg-color-sky-600",thumbActive:"active:bg-color-sky-700"},blue:{track:"bg-color-blue-200",progress:"bg-color-blue-500",thumb:"bg-color-blue-500 border-color-blue-600/50 shadow-color-blue-200",thumbHover:"hover:bg-color-blue-600",thumbActive:"active:bg-color-blue-700"},indigo:{track:"bg-color-indigo-200",progress:"bg-color-indigo-500",thumb:"bg-color-indigo-500 border-color-indigo-600/50 shadow-color-indigo-200",thumbHover:"hover:bg-color-indigo-600",thumbActive:"active:bg-color-indigo-700"},violet:{track:"bg-color-violet-200",progress:"bg-color-violet-500",thumb:"bg-color-violet-500 border-color-violet-600/50 shadow-color-violet-200",thumbHover:"hover:bg-color-violet-600",thumbActive:"active:bg-color-violet-700"},purple:{track:"bg-color-purple-200",progress:"bg-color-purple-500",thumb:"bg-color-purple-500 border-color-purple-600/50 shadow-color-purple-200",thumbHover:"hover:bg-color-purple-600",thumbActive:"active:bg-color-purple-700"},fuchsia:{track:"bg-color-fuchsia-200",progress:"bg-color-fuchsia-500",thumb:"bg-color-fuchsia-500 border-color-fuchsia-600/50 shadow-color-fuchsia-200",thumbHover:"hover:bg-color-fuchsia-600",thumbActive:"active:bg-color-fuchsia-700"},pink:{track:"bg-color-pink-200",progress:"bg-color-pink-500",thumb:"bg-color-pink-500 border-color-pink-600/50 shadow-color-pink-200",thumbHover:"hover:bg-color-pink-600",thumbActive:"active:bg-color-pink-700"},rose:{track:"bg-color-rose-200",progress:"bg-color-rose-500",thumb:"bg-color-rose-500 border-color-rose-600/50 shadow-color-rose-200",thumbHover:"hover:bg-color-rose-600",thumbActive:"active:bg-color-rose-700"}},Zr=e=>{Object.assign(Ue,e)},Ye=({title:e,children:n,variant:t="filled",color:r="blue",startIcon:o,endIcon:a,onClick:i,className:l="",fullWidth:c=!1,disabled:u=!1,roundedFull:d=!1,size:g="medium",type:f="button",autoFocus:p=!1,href:v,target:m,...b})=>{var C;const x=w.useRef(null),R=w.useRef(null),y=I=>{const T=x.current;if(!T)return;const H=document.createElement("span"),A=T.getBoundingClientRect(),X=Math.max(A.width,A.height);H.style.width=H.style.height=`${X}px`,H.style.left=`${I.clientX-A.left-X/2}px`,H.style.top=`${I.clientY-A.top-X/2}px`,H.className="ripple",T.appendChild(H),setTimeout(()=>H.remove(),600),i==null||i(I)},E=((C=ve[r])==null?void 0:C[t==="filled"?"filled":t==="outlined"?"outline":"transparent"])||"";return s.jsx(s.Fragment,{children:v?s.jsxs("a",{ref:R,href:v,target:m,className:`relative leading-none no-underline inline-flex font-medium overflow-hidden flex items-center justify-center gap-1 transition-all focus:outline-0
|
|
22
|
+
<%s key={someKey} {...props} />`,L,M,G,M),J[M+L]=!0)}if(M=null,F!==void 0&&(t(F),M=""+F),i(S)&&(t(S.key),M=""+S.key),"key"in S){F={};for(var W in S)W!=="key"&&(F[W]=S[W])}else F=S;return M&&l(F,typeof h=="function"?h.displayName||h.name||"Unknown":h),u(h,M,V,N,o(),F,z,P)}function g(h){typeof h=="object"&&h!==null&&h.$$typeof===p&&h._store&&(h._store.validated=1)}var f=w,p=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),m=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),y=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),A=Symbol.for("react.activity"),X=Symbol.for("react.client.reference"),ae=f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se=Object.prototype.hasOwnProperty,ee=Array.isArray,q=console.createTask?console.createTask:function(){return null};f={"react-stack-bottom-frame":function(h){return h()}};var K,O={},ne=f["react-stack-bottom-frame"].bind(f,a)(),ue=q(r(a)),J={};Oe.Fragment=m,Oe.jsx=function(h,S,F,L,N){var V=1e4>ae.recentlyCreatedOwnerStacks++;return d(h,S,F,!1,L,N,V?Error("react-stack-top-frame"):ne,V?q(r(h)):ue)},Oe.jsxs=function(h,S,F,L,N){var V=1e4>ae.recentlyCreatedOwnerStacks++;return d(h,S,F,!0,L,N,V?Error("react-stack-top-frame"):ne,V?q(r(h)):ue)}}()),Oe}var vn;function Ur(){return vn||(vn=1,process.env.NODE_ENV==="production"?We.exports=Gr():We.exports=Wr()),We.exports}var s=Ur();const me={dark:{filled:"bg-color-gray-800 text-color-gray-200 hover:bg-color-gray-900",outline:"border-color-gray-900 text-color-gray-900 hover:bg-color-gray-50",transparent:"text-color-gray-900 hover:bg-color-gray-50",accent:"accent-color-gray-900",peer:"peer-checked:border-color-gray-900 peer-checked:text-color-gray-900"},gray:{filled:"bg-color-gray-500 text-color-white hover:bg-color-gray-600",outline:"border-color-gray-500 text-color-gray-500 hover:bg-color-gray-50",transparent:"text-color-gray-500 hover:bg-color-gray-50",accent:"accent-color-gray-500",peer:"peer-checked:border-color-gray-500 peer-checked:text-color-gray-500"},light:{filled:"bg-color-white text-color-gray-700 hover:bg-color-gray-50",outline:"border-color-white text-color-white hover:bg-color-gray-50",transparent:"text-color-white hover:bg-color-gray-50",accent:"accent-color-white",peer:"peer-checked:border-color-white peer-checked:text-color-white"},pearl:{filled:"bg-color-zinc-200 text-color-zinc-600 hover:bg-color-zinc-300",outline:"border-color-zinc-200 text-color-zinc-900 hover:bg-color-zinc-50",transparent:"text-color-zinc-600 hover:bg-color-zinc-50",accent:"accent-color-zinc-200",peer:"peer-checked:border-color-zinc-200 peer-checked:text-color-zinc-200"},red:{filled:"bg-color-red-500 text-color-white hover:bg-color-red-600",outline:"border-color-red-500 text-color-red-500 hover:bg-color-red-50",transparent:"text-color-red-500 hover:bg-color-red-50",accent:"accent-color-red-500",peer:"peer-checked:border-color-red-500 peer-checked:text-color-red-500"},orange:{filled:"bg-color-orange-500 text-color-white hover:bg-color-orange-600",outline:"border-color-orange-500 text-color-orange-500 hover:bg-color-orange-50",transparent:"text-color-orange-500 hover:bg-color-orange-50",accent:"accent-color-orange-500",peer:"peer-checked:border-color-orange-500 peer-checked:text-color-orange-500"},amber:{filled:"bg-color-amber-500 text-color-white hover:bg-color-amber-600",outline:"border-color-amber-500 text-color-amber-500 hover:bg-color-amber-50",transparent:"text-color-amber-500 hover:bg-color-amber-50",accent:"accent-color-amber-500",peer:"peer-checked:border-color-amber-500 peer-checked:text-color-amber-500"},yellow:{filled:"bg-color-yellow-500 text-color-white hover:bg-color-yellow-600",outline:"border-color-yellow-500 text-color-yellow-500 hover:bg-color-yellow-50",transparent:"text-color-yellow-500 hover:bg-color-yellow-50",accent:"accent-color-yellow-500",peer:"peer-checked:border-color-yellow-500 peer-checked:text-color-yellow-500"},lime:{filled:"bg-color-lime-500 text-color-white hover:bg-color-lime-600",outline:"border-color-lime-500 text-color-lime-500 hover:bg-color-lime-50",transparent:"text-color-lime-500 hover:bg-color-lime-50",accent:"accent-color-lime-500",peer:"peer-checked:border-color-lime-500 peer-checked:text-color-lime-500"},green:{filled:"bg-color-green-500 text-color-white hover:bg-color-green-600",outline:"border-color-green-500 text-color-green-500 hover:bg-color-green-50",transparent:"text-color-green-500 hover:bg-color-green-50",accent:"accent-color-green-500",peer:"peer-checked:border-color-green-500 peer-checked:text-color-green-500"},emerald:{filled:"bg-color-emerald-500 text-color-white hover:bg-color-emerald-600",outline:"border-color-emerald-500 text-color-emerald-500 hover:bg-color-emerald-50",transparent:"text-color-emerald-500 hover:bg-color-emerald-50",accent:"accent-color-emerald-500",peer:"peer-checked:border-color-emerald-500 peer-checked:text-color-emerald-500"},teal:{filled:"bg-color-teal-500 text-color-white hover:bg-color-teal-600",outline:"border-color-teal-500 text-color-teal-500 hover:bg-color-teal-50",transparent:"text-color-teal-500 hover:bg-color-teal-50",accent:"accent-color-teal-500",peer:"peer-checked:border-color-teal-500 peer-checked:text-color-teal-500"},cyan:{filled:"bg-color-cyan-500 text-color-white hover:bg-color-cyan-600",outline:"border-color-cyan-500 text-color-cyan-500 hover:bg-color-cyan-50",transparent:"text-color-cyan-500 hover:bg-color-cyan-50",accent:"accent-color-cyan-500",peer:"peer-checked:border-color-cyan-500 peer-checked:text-color-cyan-500"},sky:{filled:"bg-color-sky-500 text-color-white hover:bg-color-sky-600",outline:"border-color-sky-500 text-color-sky-500 hover:bg-color-sky-50",transparent:"text-color-sky-500 hover:bg-color-sky-50",accent:"accent-color-sky-500",peer:"peer-checked:border-color-sky-500 peer-checked:text-color-sky-500"},blue:{filled:"bg-color-blue-500 text-color-white hover:bg-color-blue-600",outline:"border-color-blue-500 text-color-blue-500 hover:bg-color-blue-50",transparent:"text-color-blue-500 hover:bg-color-blue-50",accent:"accent-color-blue-500",peer:"peer-checked:border-color-blue-500 peer-checked:text-color-blue-500"},indigo:{filled:"bg-color-indigo-500 text-color-white hover:bg-color-indigo-600",outline:"border-color-indigo-500 text-color-indigo-500 hover:bg-color-indigo-50",transparent:"text-color-indigo-500 hover:bg-color-indigo-50",accent:"accent-color-indigo-500",peer:"peer-checked:border-color-indigo-500 peer-checked:text-color-indigo-500"},violet:{filled:"bg-color-violet-500 text-color-white hover:bg-color-violet-600",outline:"border-color-violet-500 text-color-violet-500 hover:bg-color-violet-50",transparent:"text-color-violet-500 hover:bg-color-violet-50",accent:"accent-color-violet-500",peer:"peer-checked:border-color-violet-500 peer-checked:text-color-violet-500"},purple:{filled:"bg-color-purple-500 text-color-white hover:bg-color-purple-600",outline:"border-color-purple-500 text-color-purple-500 hover:bg-color-purple-50",transparent:"text-color-purple-500 hover:bg-color-purple-50",accent:"accent-color-purple-500",peer:"peer-checked:border-color-purple-500 peer-checked:text-color-purple-500"},fuchsia:{filled:"bg-color-fuchsia-500 text-color-white hover:bg-color-fuchsia-600",outline:"border-color-fuchsia-500 text-color-fuchsia-500 hover:bg-color-fuchsia-50",transparent:"text-color-fuchsia-500 hover:bg-color-fuchsia-50",accent:"accent-color-fuchsia-500",peer:"peer-checked:border-color-fuchsia-500 peer-checked:text-color-fuchsia-500"},pink:{filled:"bg-color-pink-500 text-color-white hover:bg-color-pink-600",outline:"border-color-pink-500 text-color-pink-500 hover:bg-color-pink-50",transparent:"text-color-pink-500 hover:bg-color-pink-50",accent:"accent-color-pink-500",peer:"peer-checked:border-color-pink-500 peer-checked:text-color-pink-500"},rose:{filled:"bg-color-rose-500 text-color-white hover:bg-color-rose-600",outline:"border-color-rose-500 text-color-rose-500 hover:bg-color-rose-50",transparent:"text-color-rose-500 hover:bg-color-rose-50",accent:"accent-color-rose-500",peer:"peer-checked:border-color-rose-500 peer-checked:text-color-rose-500"}},Yr=e=>{Object.assign(me,e)},Ue={dark:{track:"bg-color-gray-200",progress:"bg-color-gray-900",thumb:"bg-color-gray-900 border-color-gray-950 shadow-color-gray-300",thumbHover:"hover:bg-color-gray-900",thumbActive:"active:bg-color-gray-900"},gray:{track:"bg-color-gray-200",progress:"bg-color-gray-500",thumb:"bg-color-gray-500 border-color-gray-600 shadow-color-gray-200",thumbHover:"hover:bg-color-gray-600",thumbActive:"active:bg-color-gray-700"},light:{track:"bg-color-gray-600",progress:"bg-color-white",thumb:"bg-color-gray-100 border-color-white shadow-color-gray-200",thumbHover:"hover:bg-color-gray-200",thumbActive:"active:bg-color-white"},pearl:{track:"bg-color-zinc-200",progress:"bg-color-zinc-500",thumb:"bg-color-zinc-500 border-color-zinc-600 shadow-color-zinc-200",thumbHover:"hover:bg-color-zinc-600",thumbActive:"active:bg-color-zinc-700"},red:{track:"bg-color-red-200",progress:"bg-color-red-500",thumb:"bg-color-red-500 border-color-red-600/50 shadow-color-red-200",thumbHover:"hover:bg-color-red-600",thumbActive:"active:bg-color-red-700"},orange:{track:"bg-color-orange-200",progress:"bg-color-orange-500",thumb:"bg-color-orange-500 border-color-orange-600/50 shadow-color-orange-200",thumbHover:"hover:bg-color-orange-600",thumbActive:"active:bg-color-orange-700"},amber:{track:"bg-color-amber-200",progress:"bg-color-amber-500",thumb:"bg-color-amber-500 border-color-amber-600/50 shadow-color-amber-200",thumbHover:"hover:bg-color-amber-600",thumbActive:"active:bg-color-amber-700"},yellow:{track:"bg-color-yellow-200",progress:"bg-color-yellow-500",thumb:"bg-color-yellow-500 border-color-yellow-600/50 shadow-color-yellow-200",thumbHover:"hover:bg-color-yellow-600",thumbActive:"active:bg-color-yellow-700"},lime:{track:"bg-color-lime-200",progress:"bg-color-lime-500",thumb:"bg-color-lime-500 border-color-lime-600/50 shadow-color-lime-200",thumbHover:"hover:bg-color-lime-600",thumbActive:"active:bg-color-lime-700"},green:{track:"bg-color-green-200",progress:"bg-color-green-500",thumb:"bg-color-green-500 border-color-green-600/50 shadow-color-green-200",thumbHover:"hover:bg-color-green-600",thumbActive:"active:bg-color-green-700"},emerald:{track:"bg-color-emerald-200",progress:"bg-color-emerald-500",thumb:"bg-color-emerald-500 border-color-emerald-600/50 shadow-color-emerald-200",thumbHover:"hover:bg-color-emerald-600",thumbActive:"active:bg-color-emerald-700"},teal:{track:"bg-color-teal-200",progress:"bg-color-teal-500",thumb:"bg-color-teal-500 border-color-teal-600/50 shadow-color-teal-200",thumbHover:"hover:bg-color-teal-600",thumbActive:"active:bg-color-teal-700"},cyan:{track:"bg-color-cyan-200",progress:"bg-color-cyan-500",thumb:"bg-color-cyan-500 border-color-cyan-600/50 shadow-color-cyan-200",thumbHover:"hover:bg-color-cyan-600",thumbActive:"active:bg-color-cyan-700"},sky:{track:"bg-color-sky-200",progress:"bg-color-sky-500",thumb:"bg-color-sky-500 border-color-sky-600/50 shadow-color-sky-200",thumbHover:"hover:bg-color-sky-600",thumbActive:"active:bg-color-sky-700"},blue:{track:"bg-color-blue-200",progress:"bg-color-blue-500",thumb:"bg-color-blue-500 border-color-blue-600/50 shadow-color-blue-200",thumbHover:"hover:bg-color-blue-600",thumbActive:"active:bg-color-blue-700"},indigo:{track:"bg-color-indigo-200",progress:"bg-color-indigo-500",thumb:"bg-color-indigo-500 border-color-indigo-600/50 shadow-color-indigo-200",thumbHover:"hover:bg-color-indigo-600",thumbActive:"active:bg-color-indigo-700"},violet:{track:"bg-color-violet-200",progress:"bg-color-violet-500",thumb:"bg-color-violet-500 border-color-violet-600/50 shadow-color-violet-200",thumbHover:"hover:bg-color-violet-600",thumbActive:"active:bg-color-violet-700"},purple:{track:"bg-color-purple-200",progress:"bg-color-purple-500",thumb:"bg-color-purple-500 border-color-purple-600/50 shadow-color-purple-200",thumbHover:"hover:bg-color-purple-600",thumbActive:"active:bg-color-purple-700"},fuchsia:{track:"bg-color-fuchsia-200",progress:"bg-color-fuchsia-500",thumb:"bg-color-fuchsia-500 border-color-fuchsia-600/50 shadow-color-fuchsia-200",thumbHover:"hover:bg-color-fuchsia-600",thumbActive:"active:bg-color-fuchsia-700"},pink:{track:"bg-color-pink-200",progress:"bg-color-pink-500",thumb:"bg-color-pink-500 border-color-pink-600/50 shadow-color-pink-200",thumbHover:"hover:bg-color-pink-600",thumbActive:"active:bg-color-pink-700"},rose:{track:"bg-color-rose-200",progress:"bg-color-rose-500",thumb:"bg-color-rose-500 border-color-rose-600/50 shadow-color-rose-200",thumbHover:"hover:bg-color-rose-600",thumbActive:"active:bg-color-rose-700"}},Zr=e=>{Object.assign(Ue,e)},Ye=({title:e,children:n,variant:t="filled",color:r="blue",startIcon:o,endIcon:a,onClick:i,className:l="",fullWidth:c=!1,disabled:u=!1,roundedFull:d=!1,size:g="medium",type:f="button",autoFocus:p=!1,href:v,target:m,...b})=>{var C;const x=w.useRef(null),R=w.useRef(null),y=I=>{const T=x.current;if(!T)return;const H=document.createElement("span"),A=T.getBoundingClientRect(),X=Math.max(A.width,A.height);H.style.width=H.style.height=`${X}px`,H.style.left=`${I.clientX-A.left-X/2}px`,H.style.top=`${I.clientY-A.top-X/2}px`,H.className="ripple",T.appendChild(H),setTimeout(()=>H.remove(),600),i==null||i(I)},E=((C=me[r])==null?void 0:C[t==="filled"?"filled":t==="outlined"?"outline":"transparent"])||"";return s.jsx(s.Fragment,{children:v?s.jsxs("a",{ref:R,href:v,target:m,className:`relative leading-none no-underline inline-flex font-medium overflow-hidden flex items-center justify-center gap-1 transition-all focus:outline-0
|
|
23
23
|
${t==="outlined"&&"border"}
|
|
24
24
|
${E}
|
|
25
25
|
${l}
|
|
@@ -80,7 +80,7 @@ Valid keys: `+JSON.stringify(Object.keys(h),null," "));var j=k(P,W,N,V,z+"."+W,
|
|
|
80
80
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function So(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ko(e){if(Array.isArray(e))return $t(e)}function Nn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,r)}return t}function Tn(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?Nn(Object(t),!0).forEach(function(r){zn(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Nn(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function zn(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Ie(e,n){return Ro(e)||$o(e,n)||On(e,n)||jo()}function jo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
81
81
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function On(e,n){if(e){if(typeof e=="string")return $t(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return $t(e,n)}}function $t(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function $o(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r=[],o=!0,a=!1,i,l;try{for(t=t.call(e);!(o=(i=t.next()).done)&&(r.push(i.value),!(n&&r.length===n));o=!0);}catch(c){a=!0,l=c}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw l}}return r}}function Ro(e){if(Array.isArray(e))return e}var Eo=typeof jt=="function"?jt:jt.default,_o="file-invalid-type",Po="file-too-large",Mo="file-too-small",Lo="too-many-files",Fo=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=n.split(","),r=t.length>1?"one of ".concat(t.join(", ")):t[0];return{code:_o,message:"File type must be ".concat(r)}},In=function(n){return{code:Po,message:"File is larger than ".concat(n," ").concat(n===1?"byte":"bytes")}},Vn=function(n){return{code:Mo,message:"File is smaller than ".concat(n," ").concat(n===1?"byte":"bytes")}},Ao={code:Lo,message:"Too many files"};function Hn(e,n){var t=e.type==="application/x-moz-file"||Eo(e,n);return[t,t?null:Fo(n)]}function Bn(e,n,t){if(Le(e.size))if(Le(n)&&Le(t)){if(e.size>t)return[!1,In(t)];if(e.size<n)return[!1,Vn(n)]}else{if(Le(n)&&e.size<n)return[!1,Vn(n)];if(Le(t)&&e.size>t)return[!1,In(t)]}return[!0,null]}function Le(e){return e!=null}function Do(e){var n=e.files,t=e.accept,r=e.minSize,o=e.maxSize,a=e.multiple,i=e.maxFiles,l=e.validator;return!a&&n.length>1||a&&i>=1&&n.length>i?!1:n.every(function(c){var u=Hn(c,t),d=Ie(u,1),g=d[0],f=Bn(c,r,o),p=Ie(f,1),v=p[0],m=l?l(c):null;return g&&v&&!m})}function Qe(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function et(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(n){return n==="Files"||n==="application/x-moz-file"}):!!e.target&&!!e.target.files}function qn(e){e.preventDefault()}function No(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function To(e){return e.indexOf("Edge/")!==-1}function zo(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return No(e)||To(e)}function ye(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return function(r){for(var o=arguments.length,a=new Array(o>1?o-1:0),i=1;i<o;i++)a[i-1]=arguments[i];return n.some(function(l){return!Qe(r)&&l&&l.apply(void 0,[r].concat(a)),Qe(r)})}}function Oo(){return"showOpenFilePicker"in window}function Io(e){if(Le(e)){var n=Object.entries(e).filter(function(t){var r=Ie(t,2),o=r[0],a=r[1],i=!0;return Gn(o)||(console.warn('Skipped "'.concat(o,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),i=!1),(!Array.isArray(a)||!a.every(Wn))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),i=!1),i}).reduce(function(t,r){var o=Ie(r,2),a=o[0],i=o[1];return Tn(Tn({},t),{},zn({},a,i))},{});return[{description:"Files",accept:n}]}return e}function Vo(e){if(Le(e))return Object.entries(e).reduce(function(n,t){var r=Ie(t,2),o=r[0],a=r[1];return[].concat(Dn(n),[o],Dn(a))},[]).filter(function(n){return Gn(n)||Wn(n)}).join(",")}function Ho(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function Bo(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Gn(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||e==="application/*"||/\w+\/[-+.\w]+/g.test(e)}function Wn(e){return/^.*\.[\w]+$/.test(e)}var qo=["children"],Go=["open"],Wo=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Uo=["refKey","onChange","onClick"];function Yo(e){return Xo(e)||Ko(e)||Un(e)||Zo()}function Zo(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
82
82
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ko(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xo(e){if(Array.isArray(e))return Et(e)}function Rt(e,n){return ea(e)||Qo(e,n)||Un(e,n)||Jo()}function Jo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
83
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Un(e,n){if(e){if(typeof e=="string")return Et(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Et(e,n)}}function Et(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Qo(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r=[],o=!0,a=!1,i,l;try{for(t=t.call(e);!(o=(i=t.next()).done)&&(r.push(i.value),!(n&&r.length===n));o=!0);}catch(c){a=!0,l=c}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw l}}return r}}function ea(e){if(Array.isArray(e))return e}function Yn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,r)}return t}function le(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?Yn(Object(t),!0).forEach(function(r){_t(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Yn(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function tt(e,n){if(e==null)return{};var t=ta(e,n),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(n.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}function ta(e,n){if(e==null)return{};var t={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(n.indexOf(o)>=0)&&(t[o]=e[o]);return t}var Pt=w.forwardRef(function(e,n){var t=e.children,r=tt(e,qo),o=Kn(r),a=o.open,i=tt(o,Go);return w.useImperativeHandle(n,function(){return{open:a}},[a]),w.createElement(w.Fragment,null,t(le(le({},i),{},{open:a})))});Pt.displayName="Dropzone";var Zn={disabled:!1,getFilesFromEvent:uo,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Pt.defaultProps=Zn,Pt.propTypes={children:ie.func,accept:ie.objectOf(ie.arrayOf(ie.string)),multiple:ie.bool,preventDropOnDocument:ie.bool,noClick:ie.bool,noKeyboard:ie.bool,noDrag:ie.bool,noDragEventsBubbling:ie.bool,minSize:ie.number,maxSize:ie.number,maxFiles:ie.number,disabled:ie.bool,getFilesFromEvent:ie.func,onFileDialogCancel:ie.func,onFileDialogOpen:ie.func,useFsAccessApi:ie.bool,autoFocus:ie.bool,onDragEnter:ie.func,onDragLeave:ie.func,onDragOver:ie.func,onDrop:ie.func,onDropAccepted:ie.func,onDropRejected:ie.func,onError:ie.func,validator:ie.func};var Mt={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Kn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=le(le({},Zn),e),t=n.accept,r=n.disabled,o=n.getFilesFromEvent,a=n.maxSize,i=n.minSize,l=n.multiple,c=n.maxFiles,u=n.onDragEnter,d=n.onDragLeave,g=n.onDragOver,f=n.onDrop,p=n.onDropAccepted,v=n.onDropRejected,m=n.onFileDialogCancel,b=n.onFileDialogOpen,x=n.useFsAccessApi,R=n.autoFocus,y=n.preventDropOnDocument,E=n.noClick,C=n.noKeyboard,I=n.noDrag,T=n.noDragEventsBubbling,H=n.onError,A=n.validator,X=w.useMemo(function(){return Vo(t)},[t]),ae=w.useMemo(function(){return Io(t)},[t]),se=w.useMemo(function(){return typeof b=="function"?b:Xn},[b]),ee=w.useMemo(function(){return typeof m=="function"?m:Xn},[m]),q=w.useRef(null),K=w.useRef(null),O=w.useReducer(na,Mt),ne=Rt(O,2),ue=ne[0],J=ne[1],h=ue.isFocused,S=ue.isFileDialogActive,F=w.useRef(typeof window<"u"&&window.isSecureContext&&x&&Oo()),L=function(){!F.current&&S&&setTimeout(function(){if(K.current){var U=K.current.files;U.length||(J({type:"closeDialog"}),ee())}},300)};w.useEffect(function(){return window.addEventListener("focus",L,!1),function(){window.removeEventListener("focus",L,!1)}},[K,S,ee,F]);var N=w.useRef([]),V=function(U){q.current&&q.current.contains(U.target)||(U.preventDefault(),N.current=[])};w.useEffect(function(){return y&&(document.addEventListener("dragover",qn,!1),document.addEventListener("drop",V,!1)),function(){y&&(document.removeEventListener("dragover",qn),document.removeEventListener("drop",V))}},[q,y]),w.useEffect(function(){return!r&&R&&q.current&&q.current.focus(),function(){}},[q,R,r]);var z=w.useCallback(function(D){H?H(D):console.error(D)},[H]),P=w.useCallback(function(D){D.preventDefault(),D.persist(),gt(D),N.current=[].concat(Yo(N.current),[D.target]),et(D)&&Promise.resolve(o(D)).then(function(U){if(!(Qe(D)&&!T)){var pe=U.length,fe=pe>0&&Do({files:U,accept:X,minSize:i,maxSize:a,multiple:l,maxFiles:c,validator:A}),be=pe>0&&!fe;J({isDragAccept:fe,isDragReject:be,isDragActive:!0,type:"setDraggedFiles"}),u&&u(D)}}).catch(function(U){return z(U)})},[o,u,z,T,X,i,a,l,c,A]),M=w.useCallback(function(D){D.preventDefault(),D.persist(),gt(D);var U=et(D);if(U&&D.dataTransfer)try{D.dataTransfer.dropEffect="copy"}catch{}return U&&g&&g(D),!1},[g,T]),G=w.useCallback(function(D){D.preventDefault(),D.persist(),gt(D);var U=N.current.filter(function(fe){return q.current&&q.current.contains(fe)}),pe=U.indexOf(D.target);pe!==-1&&U.splice(pe,1),N.current=U,!(U.length>0)&&(J({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),et(D)&&d&&d(D))},[q,d,T]),W=w.useCallback(function(D,U){var pe=[],fe=[];D.forEach(function(be){var Ge=Hn(be,X),Ne=Rt(Ge,2),an=Ne[0],ln=Ne[1],sn=Bn(be,i,a),vt=Rt(sn,2),cn=vt[0],un=vt[1],dn=A?A(be):null;if(an&&cn&&!dn)pe.push(be);else{var pn=[ln,un];dn&&(pn=pn.concat(dn)),fe.push({file:be,errors:pn.filter(function(Il){return Il})})}}),(!l&&pe.length>1||l&&c>=1&&pe.length>c)&&(pe.forEach(function(be){fe.push({file:be,errors:[Ao]})}),pe.splice(0)),J({acceptedFiles:pe,fileRejections:fe,isDragReject:fe.length>0,type:"setFiles"}),f&&f(pe,fe,U),fe.length>0&&v&&v(fe,U),pe.length>0&&p&&p(pe,U)},[J,l,X,i,a,c,f,p,v,A]),k=w.useCallback(function(D){D.preventDefault(),D.persist(),gt(D),N.current=[],et(D)&&Promise.resolve(o(D)).then(function(U){Qe(D)&&!T||W(U,D)}).catch(function(U){return z(U)}),J({type:"reset"})},[o,W,z,T]),j=w.useCallback(function(){if(F.current){J({type:"openDialog"}),se();var D={multiple:l,types:ae};window.showOpenFilePicker(D).then(function(U){return o(U)}).then(function(U){W(U,null),J({type:"closeDialog"})}).catch(function(U){Ho(U)?(ee(U),J({type:"closeDialog"})):Bo(U)?(F.current=!1,K.current?(K.current.value=null,K.current.click()):z(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):z(U)});return}K.current&&(J({type:"openDialog"}),se(),K.current.value=null,K.current.click())},[J,se,ee,x,W,z,ae,l]),_=w.useCallback(function(D){!q.current||!q.current.isEqualNode(D.target)||(D.key===" "||D.key==="Enter"||D.keyCode===32||D.keyCode===13)&&(D.preventDefault(),j())},[q,j]),Q=w.useCallback(function(){J({type:"focus"})},[]),te=w.useCallback(function(){J({type:"blur"})},[]),ce=w.useCallback(function(){E||(zo()?setTimeout(j,0):j())},[E,j]),de=function(U){return r?null:U},he=function(U){return C?null:de(U)},mt=function(U){return I?null:de(U)},gt=function(U){T&&U.stopPropagation()},Tl=w.useMemo(function(){return function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},U=D.refKey,pe=U===void 0?"ref":U,fe=D.role,be=D.onKeyDown,Ge=D.onFocus,Ne=D.onBlur,an=D.onClick,ln=D.onDragEnter,sn=D.onDragOver,vt=D.onDragLeave,cn=D.onDrop,un=tt(D,Wo);return le(le(_t({onKeyDown:he(ye(be,_)),onFocus:he(ye(Ge,Q)),onBlur:he(ye(Ne,te)),onClick:de(ye(an,ce)),onDragEnter:mt(ye(ln,P)),onDragOver:mt(ye(sn,M)),onDragLeave:mt(ye(vt,G)),onDrop:mt(ye(cn,k)),role:typeof fe=="string"&&fe!==""?fe:"presentation"},pe,q),!r&&!C?{tabIndex:0}:{}),un)}},[q,_,Q,te,ce,P,M,G,k,C,I,r]),zl=w.useCallback(function(D){D.stopPropagation()},[]),Ol=w.useMemo(function(){return function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},U=D.refKey,pe=U===void 0?"ref":U,fe=D.onChange,be=D.onClick,Ge=tt(D,Uo),Ne=_t({accept:X,multiple:l,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:de(ye(fe,k)),onClick:de(ye(be,zl)),tabIndex:-1},pe,K);return le(le({},Ne),Ge)}},[K,t,l,k,r]);return le(le({},ue),{},{isFocused:h&&!r,getRootProps:Tl,getInputProps:Ol,rootRef:q,inputRef:K,open:de(j)})}function na(e,n){switch(n.type){case"focus":return le(le({},e),{},{isFocused:!0});case"blur":return le(le({},e),{},{isFocused:!1});case"openDialog":return le(le({},Mt),{},{isFileDialogActive:!0});case"closeDialog":return le(le({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return le(le({},e),{},{isDragActive:n.isDragActive,isDragAccept:n.isDragAccept,isDragReject:n.isDragReject});case"setFiles":return le(le({},e),{},{acceptedFiles:n.acceptedFiles,fileRejections:n.fileRejections,isDragReject:n.isDragReject});case"reset":return le({},Mt);default:return e}}function Xn(){}const ra=({onFilesAccepted:e,onError:n,accept:t={"image/*":[],"application/pdf":[],"application/msword":[],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[]},multiple:r=!1,maxSizeInBytes:o=1*1024*1024,maxFiles:a=void 0,disabled:i=!1,label:l="Upload PDF",subLabel:c="Maximum size: 2 MB",icon:u=s.jsx("svg",{className:"size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M3 19H21V21H3V19ZM13 5.82843V17H11V5.82843L4.92893 11.8995L3.51472 10.4853L12 2L20.4853 10.4853L19.0711 11.8995L13 5.82843Z"})}),wrapperClass:d="",iconClass:g="",labelClass:f="",subLabelClass:p="",showList:v=!0,listView:m=!0,showListImage:b=!1,uploadedFiles:x=[],onDeleteCallback:R=()=>{}})=>{const[y,E]=w.useState(x),[C,I]=w.useState([]);w.useEffect(()=>{E(x)},[x]);const T=w.useCallback((ee,q)=>{const K=[];if(q.length>0&&q.forEach(O=>{O.errors.forEach(ne=>{ne.code==="file-too-large"&&K.push(`${O.file.name} is too large (max ${(o/1024/1024).toFixed(2)}MB)`),ne.code==="file-invalid-type"&&K.push(`${O.file.name} has an invalid file type`)})}),a!==void 0&&(r?y.length:0)+ee.length>a&&K.push(`You can only upload up to ${a} file${a>1?"s":""}.`),K.length>0){I(K),n==null||n(K);return}else I([]);ee.length>0&&(E(O=>r?[...O,...ee]:ee),e(ee))},[e,n,o,a,y,r]),H=ee=>{E(q=>q.filter((K,O)=>O!==ee)),R(y)},{getRootProps:A,getInputProps:X,isDragActive:ae,isDragReject:se}=Kn({onDrop:T,accept:t,multiple:r,maxSize:o,disabled:i});return s.jsxs("div",{className:`
|
|
83
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Un(e,n){if(e){if(typeof e=="string")return Et(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Et(e,n)}}function Et(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Qo(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r=[],o=!0,a=!1,i,l;try{for(t=t.call(e);!(o=(i=t.next()).done)&&(r.push(i.value),!(n&&r.length===n));o=!0);}catch(c){a=!0,l=c}finally{try{!o&&t.return!=null&&t.return()}finally{if(a)throw l}}return r}}function ea(e){if(Array.isArray(e))return e}function Yn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,r)}return t}function le(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?arguments[n]:{};n%2?Yn(Object(t),!0).forEach(function(r){_t(e,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Yn(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})}return e}function _t(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function tt(e,n){if(e==null)return{};var t=ta(e,n),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(n.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}function ta(e,n){if(e==null)return{};var t={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(n.indexOf(o)>=0)&&(t[o]=e[o]);return t}var Pt=w.forwardRef(function(e,n){var t=e.children,r=tt(e,qo),o=Kn(r),a=o.open,i=tt(o,Go);return w.useImperativeHandle(n,function(){return{open:a}},[a]),w.createElement(w.Fragment,null,t(le(le({},i),{},{open:a})))});Pt.displayName="Dropzone";var Zn={disabled:!1,getFilesFromEvent:uo,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1,autoFocus:!1};Pt.defaultProps=Zn,Pt.propTypes={children:ie.func,accept:ie.objectOf(ie.arrayOf(ie.string)),multiple:ie.bool,preventDropOnDocument:ie.bool,noClick:ie.bool,noKeyboard:ie.bool,noDrag:ie.bool,noDragEventsBubbling:ie.bool,minSize:ie.number,maxSize:ie.number,maxFiles:ie.number,disabled:ie.bool,getFilesFromEvent:ie.func,onFileDialogCancel:ie.func,onFileDialogOpen:ie.func,useFsAccessApi:ie.bool,autoFocus:ie.bool,onDragEnter:ie.func,onDragLeave:ie.func,onDragOver:ie.func,onDrop:ie.func,onDropAccepted:ie.func,onDropRejected:ie.func,onError:ie.func,validator:ie.func};var Mt={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Kn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=le(le({},Zn),e),t=n.accept,r=n.disabled,o=n.getFilesFromEvent,a=n.maxSize,i=n.minSize,l=n.multiple,c=n.maxFiles,u=n.onDragEnter,d=n.onDragLeave,g=n.onDragOver,f=n.onDrop,p=n.onDropAccepted,v=n.onDropRejected,m=n.onFileDialogCancel,b=n.onFileDialogOpen,x=n.useFsAccessApi,R=n.autoFocus,y=n.preventDropOnDocument,E=n.noClick,C=n.noKeyboard,I=n.noDrag,T=n.noDragEventsBubbling,H=n.onError,A=n.validator,X=w.useMemo(function(){return Vo(t)},[t]),ae=w.useMemo(function(){return Io(t)},[t]),se=w.useMemo(function(){return typeof b=="function"?b:Xn},[b]),ee=w.useMemo(function(){return typeof m=="function"?m:Xn},[m]),q=w.useRef(null),K=w.useRef(null),O=w.useReducer(na,Mt),ne=Rt(O,2),ue=ne[0],J=ne[1],h=ue.isFocused,S=ue.isFileDialogActive,F=w.useRef(typeof window<"u"&&window.isSecureContext&&x&&Oo()),L=function(){!F.current&&S&&setTimeout(function(){if(K.current){var U=K.current.files;U.length||(J({type:"closeDialog"}),ee())}},300)};w.useEffect(function(){return window.addEventListener("focus",L,!1),function(){window.removeEventListener("focus",L,!1)}},[K,S,ee,F]);var N=w.useRef([]),V=function(U){q.current&&q.current.contains(U.target)||(U.preventDefault(),N.current=[])};w.useEffect(function(){return y&&(document.addEventListener("dragover",qn,!1),document.addEventListener("drop",V,!1)),function(){y&&(document.removeEventListener("dragover",qn),document.removeEventListener("drop",V))}},[q,y]),w.useEffect(function(){return!r&&R&&q.current&&q.current.focus(),function(){}},[q,R,r]);var z=w.useCallback(function(D){H?H(D):console.error(D)},[H]),P=w.useCallback(function(D){D.preventDefault(),D.persist(),gt(D),N.current=[].concat(Yo(N.current),[D.target]),et(D)&&Promise.resolve(o(D)).then(function(U){if(!(Qe(D)&&!T)){var pe=U.length,fe=pe>0&&Do({files:U,accept:X,minSize:i,maxSize:a,multiple:l,maxFiles:c,validator:A}),be=pe>0&&!fe;J({isDragAccept:fe,isDragReject:be,isDragActive:!0,type:"setDraggedFiles"}),u&&u(D)}}).catch(function(U){return z(U)})},[o,u,z,T,X,i,a,l,c,A]),M=w.useCallback(function(D){D.preventDefault(),D.persist(),gt(D);var U=et(D);if(U&&D.dataTransfer)try{D.dataTransfer.dropEffect="copy"}catch{}return U&&g&&g(D),!1},[g,T]),G=w.useCallback(function(D){D.preventDefault(),D.persist(),gt(D);var U=N.current.filter(function(fe){return q.current&&q.current.contains(fe)}),pe=U.indexOf(D.target);pe!==-1&&U.splice(pe,1),N.current=U,!(U.length>0)&&(J({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),et(D)&&d&&d(D))},[q,d,T]),W=w.useCallback(function(D,U){var pe=[],fe=[];D.forEach(function(be){var Ge=Hn(be,X),Ne=Rt(Ge,2),an=Ne[0],ln=Ne[1],sn=Bn(be,i,a),vt=Rt(sn,2),cn=vt[0],un=vt[1],dn=A?A(be):null;if(an&&cn&&!dn)pe.push(be);else{var pn=[ln,un];dn&&(pn=pn.concat(dn)),fe.push({file:be,errors:pn.filter(function(Hl){return Hl})})}}),(!l&&pe.length>1||l&&c>=1&&pe.length>c)&&(pe.forEach(function(be){fe.push({file:be,errors:[Ao]})}),pe.splice(0)),J({acceptedFiles:pe,fileRejections:fe,isDragReject:fe.length>0,type:"setFiles"}),f&&f(pe,fe,U),fe.length>0&&v&&v(fe,U),pe.length>0&&p&&p(pe,U)},[J,l,X,i,a,c,f,p,v,A]),k=w.useCallback(function(D){D.preventDefault(),D.persist(),gt(D),N.current=[],et(D)&&Promise.resolve(o(D)).then(function(U){Qe(D)&&!T||W(U,D)}).catch(function(U){return z(U)}),J({type:"reset"})},[o,W,z,T]),j=w.useCallback(function(){if(F.current){J({type:"openDialog"}),se();var D={multiple:l,types:ae};window.showOpenFilePicker(D).then(function(U){return o(U)}).then(function(U){W(U,null),J({type:"closeDialog"})}).catch(function(U){Ho(U)?(ee(U),J({type:"closeDialog"})):Bo(U)?(F.current=!1,K.current?(K.current.value=null,K.current.click()):z(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):z(U)});return}K.current&&(J({type:"openDialog"}),se(),K.current.value=null,K.current.click())},[J,se,ee,x,W,z,ae,l]),_=w.useCallback(function(D){!q.current||!q.current.isEqualNode(D.target)||(D.key===" "||D.key==="Enter"||D.keyCode===32||D.keyCode===13)&&(D.preventDefault(),j())},[q,j]),Q=w.useCallback(function(){J({type:"focus"})},[]),te=w.useCallback(function(){J({type:"blur"})},[]),ce=w.useCallback(function(){E||(zo()?setTimeout(j,0):j())},[E,j]),de=function(U){return r?null:U},he=function(U){return C?null:de(U)},mt=function(U){return I?null:de(U)},gt=function(U){T&&U.stopPropagation()},Ol=w.useMemo(function(){return function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},U=D.refKey,pe=U===void 0?"ref":U,fe=D.role,be=D.onKeyDown,Ge=D.onFocus,Ne=D.onBlur,an=D.onClick,ln=D.onDragEnter,sn=D.onDragOver,vt=D.onDragLeave,cn=D.onDrop,un=tt(D,Wo);return le(le(_t({onKeyDown:he(ye(be,_)),onFocus:he(ye(Ge,Q)),onBlur:he(ye(Ne,te)),onClick:de(ye(an,ce)),onDragEnter:mt(ye(ln,P)),onDragOver:mt(ye(sn,M)),onDragLeave:mt(ye(vt,G)),onDrop:mt(ye(cn,k)),role:typeof fe=="string"&&fe!==""?fe:"presentation"},pe,q),!r&&!C?{tabIndex:0}:{}),un)}},[q,_,Q,te,ce,P,M,G,k,C,I,r]),Il=w.useCallback(function(D){D.stopPropagation()},[]),Vl=w.useMemo(function(){return function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},U=D.refKey,pe=U===void 0?"ref":U,fe=D.onChange,be=D.onClick,Ge=tt(D,Uo),Ne=_t({accept:X,multiple:l,type:"file",style:{border:0,clip:"rect(0, 0, 0, 0)",clipPath:"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"},onChange:de(ye(fe,k)),onClick:de(ye(be,Il)),tabIndex:-1},pe,K);return le(le({},Ne),Ge)}},[K,t,l,k,r]);return le(le({},ue),{},{isFocused:h&&!r,getRootProps:Ol,getInputProps:Vl,rootRef:q,inputRef:K,open:de(j)})}function na(e,n){switch(n.type){case"focus":return le(le({},e),{},{isFocused:!0});case"blur":return le(le({},e),{},{isFocused:!1});case"openDialog":return le(le({},Mt),{},{isFileDialogActive:!0});case"closeDialog":return le(le({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return le(le({},e),{},{isDragActive:n.isDragActive,isDragAccept:n.isDragAccept,isDragReject:n.isDragReject});case"setFiles":return le(le({},e),{},{acceptedFiles:n.acceptedFiles,fileRejections:n.fileRejections,isDragReject:n.isDragReject});case"reset":return le({},Mt);default:return e}}function Xn(){}const ra=({onFilesAccepted:e,onError:n,accept:t={"image/*":[],"application/pdf":[],"application/msword":[],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[]},multiple:r=!1,maxSizeInBytes:o=1*1024*1024,maxFiles:a=void 0,disabled:i=!1,label:l="Upload PDF",subLabel:c="Maximum size: 2 MB",icon:u=s.jsx("svg",{className:"size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M3 19H21V21H3V19ZM13 5.82843V17H11V5.82843L4.92893 11.8995L3.51472 10.4853L12 2L20.4853 10.4853L19.0711 11.8995L13 5.82843Z"})}),wrapperClass:d="",iconClass:g="",labelClass:f="",subLabelClass:p="",showList:v=!0,listView:m=!0,showListImage:b=!1,uploadedFiles:x=[],onDeleteCallback:R=()=>{}})=>{const[y,E]=w.useState(x),[C,I]=w.useState([]);w.useEffect(()=>{E(x)},[x]);const T=w.useCallback((ee,q)=>{const K=[];if(q.length>0&&q.forEach(O=>{O.errors.forEach(ne=>{ne.code==="file-too-large"&&K.push(`${O.file.name} is too large (max ${(o/1024/1024).toFixed(2)}MB)`),ne.code==="file-invalid-type"&&K.push(`${O.file.name} has an invalid file type`)})}),a!==void 0&&(r?y.length:0)+ee.length>a&&K.push(`You can only upload up to ${a} file${a>1?"s":""}.`),K.length>0){I(K),n==null||n(K);return}else I([]);ee.length>0&&(E(O=>r?[...O,...ee]:ee),e(ee))},[e,n,o,a,y,r]),H=ee=>{E(q=>q.filter((K,O)=>O!==ee)),R(y)},{getRootProps:A,getInputProps:X,isDragActive:ae,isDragReject:se}=Kn({onDrop:T,accept:t,multiple:r,maxSize:o,disabled:i});return s.jsxs("div",{className:`
|
|
84
84
|
border border-style-dashed rounded-lg p-0 overflow-hidden transition
|
|
85
85
|
${ae?"border-color-blue-500 bg-color-blue-50":"border-color-gray-200 bg-color-gray-50"}
|
|
86
86
|
${se?"border-color-red-500 bg-color-red-50":""}
|
|
@@ -94,7 +94,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
94
94
|
${ia[c]}
|
|
95
95
|
${aa[u]}
|
|
96
96
|
${n}
|
|
97
|
-
`,value:t[b]||"",onChange:x=>p(x,b),onKeyDown:x=>v(x,b),...d},b))})});Qn.displayName="OtpInput";const Lt=w.forwardRef(({placeholder:e,value:n,onChange:t,type:r="text",className:o="",inputClass:a="",iconStyle:i="",startIcon:l,endIcon:c,error:u,maxLength:d,label:g,labelClassName:f="",...
|
|
97
|
+
`,value:t[b]||"",onChange:x=>p(x,b),onKeyDown:x=>v(x,b),...d},b))})});Qn.displayName="OtpInput";const la={small:"p-2 text-sm",medium:"p-3 text-base",large:"p-4 text-lg"},sa={filled:"bg-color-gray-100 border-color-gray-200",outlined:"border-color-gray-200 bg-color-transparent"},Lt=w.forwardRef(({placeholder:e,value:n,onChange:t,type:r="text",className:o="",inputClass:a="",iconStyle:i="",startIcon:l,endIcon:c,error:u,maxLength:d,label:g,labelClassName:f="",variant:p="outlined",size:v="medium",...m},b)=>{const x=u?"border-color-red-500 focus-within:ring-color-red-500":"border-color-gray-200",R=u?"text-color-red-500":i;return s.jsxs("div",{className:"w-full",children:[g&&s.jsx("label",{className:`text-sm text-color-gray-500 mb-2 block ${f}`,children:g}),s.jsxs("div",{className:`flex items-center w-full rounded-md border focus-within:ring-1 ${x} ${sa[p]} ${o}`,children:[l&&s.jsx("span",{className:`pl-3 ${R}`,children:l}),s.jsx("input",{...m,ref:b,type:r,placeholder:e,defaultValue:n,maxLength:d,onChange:t,className:`grow outline-0 w-full font-medium placeholder:font-normal bg-color-transparent ${la[v]} ${a}`}),c&&s.jsx("span",{className:`pr-3 ${R}`,children:c})]}),u&&s.jsx("p",{className:"text-color-red-500 text-xs mt-1",children:u})]})});Lt.displayName="TextInput";const er=w.forwardRef((e,n)=>{const[t,r]=w.useState(!1);return s.jsx(Lt,{...e,ref:n,type:t?"text":"password",inputClass:e.inputClass,startIcon:e.startIcon??s.jsx("svg",{className:"size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M19 10H20C20.5523 10 21 10.4477 21 11V21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21V11C3 10.4477 3.44772 10 4 10H5V9C5 5.13401 8.13401 2 12 2C15.866 2 19 5.13401 19 9V10ZM5 12V20H19V12H5ZM11 14H13V18H11V14ZM17 10V9C17 6.23858 14.7614 4 12 4C9.23858 4 7 6.23858 7 9V10H17Z"})}),endIcon:s.jsx("span",{onClick:()=>r(!t),className:"cursor-pointer",children:t?s.jsx("svg",{className:"size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3ZM12.0003 19C16.2359 19 19.8603 16.052 20.7777 12C19.8603 7.94803 16.2359 5 12.0003 5C7.7646 5 4.14022 7.94803 3.22278 12C4.14022 16.052 7.7646 19 12.0003 19ZM12.0003 16.5C9.51498 16.5 7.50026 14.4853 7.50026 12C7.50026 9.51472 9.51498 7.5 12.0003 7.5C14.4855 7.5 16.5003 9.51472 16.5003 12C16.5003 14.4853 14.4855 16.5 12.0003 16.5ZM12.0003 14.5C13.381 14.5 14.5003 13.3807 14.5003 12C14.5003 10.6193 13.381 9.5 12.0003 9.5C10.6196 9.5 9.50026 10.6193 9.50026 12C9.50026 13.3807 10.6196 14.5 12.0003 14.5Z"})}):s.jsx("svg",{className:"size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M17.8827 19.2968C16.1814 20.3755 14.1638 21.0002 12.0003 21.0002C6.60812 21.0002 2.12215 17.1204 1.18164 12.0002C1.61832 9.62282 2.81932 7.5129 4.52047 5.93457L1.39366 2.80777L2.80788 1.39355L22.6069 21.1925L21.1927 22.6068L17.8827 19.2968ZM5.9356 7.3497C4.60673 8.56015 3.6378 10.1672 3.22278 12.0002C4.14022 16.0521 7.7646 19.0002 12.0003 19.0002C13.5997 19.0002 15.112 18.5798 16.4243 17.8384L14.396 15.8101C13.7023 16.2472 12.8808 16.5002 12.0003 16.5002C9.51498 16.5002 7.50026 14.4854 7.50026 12.0002C7.50026 11.1196 7.75317 10.2981 8.19031 9.60442L5.9356 7.3497ZM12.9139 14.328L9.67246 11.0866C9.5613 11.3696 9.50026 11.6777 9.50026 12.0002C9.50026 13.3809 10.6196 14.5002 12.0003 14.5002C12.3227 14.5002 12.6309 14.4391 12.9139 14.328ZM20.8068 16.5925L19.376 15.1617C20.0319 14.2268 20.5154 13.1586 20.7777 12.0002C19.8603 7.94818 16.2359 5.00016 12.0003 5.00016C11.1544 5.00016 10.3329 5.11773 9.55249 5.33818L7.97446 3.76015C9.22127 3.26959 10.5793 3.00016 12.0003 3.00016C17.3924 3.00016 21.8784 6.87992 22.8189 12.0002C22.5067 13.6998 21.8038 15.2628 20.8068 16.5925ZM11.7229 7.50857C11.8146 7.50299 11.9071 7.50016 12.0003 7.50016C14.4855 7.50016 16.5003 9.51488 16.5003 12.0002C16.5003 12.0933 16.4974 12.1858 16.4919 12.2775L11.7229 7.50857Z"})})})})});er.displayName="PasswordInput";const ca={small:"text-xs px-2 py-1",medium:"text-sm px-3 py-[0.35rem]",large:"text-base px-4 py-2"},ua=({label:e,color:n="blue",variant:t="filled",size:r="medium",className:o=""})=>{var u,d;const a=(u=me[n])==null?void 0:u.filled,i=(d=me[n])==null?void 0:d.outline,l=ca[r],c=`inline-flex text-nowrap items-center rounded-full font-medium leading-none ${t==="outlined"?`border ${i}`:a} ${l}`.trim();return s.jsx("span",{className:`${c} ${o}`,children:e})},tr=({src:e,alt:n,size:t="medium",fallback:r,className:o="",color:a="pearl",shape:i="circle"})=>{var u;const l={small:"w-8 h-8 text-sm",medium:"w-10 h-10 text-base",large:"w-14 h-14 text-lg","extra-large":"w-20 h-20 text-xl"},c={circle:"rounded-full",rounded:"rounded-md",square:"rounded-none"};return s.jsx("div",{className:`inline-flex items-center justify-center font-medium overflow-hidden ${l[t]} ${c[i]} ${me[a].filled} ${o}`,children:e?s.jsx("img",{src:e,alt:n,className:`object-cover w-full h-full ${c[i]}`}):r||((u=n==null?void 0:n[0])==null?void 0:u.toUpperCase())||"?"})},da=({size:e,imageUrl:n,name:t="User",number:r="1234567890",className:o=""})=>s.jsxs("div",{className:o||"flex items-center gap-2 w-fit bg-color-transparent rounded-md p-1",children:[s.jsx(tr,{size:e,src:n,alt:`${t}'s profile`}),s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"text-sm font-medium text-color-gray-800",children:t}),s.jsx("span",{className:"text-xs text-color-gray-600",children:r})]})]}),pa=({steps:e,currentStep:n,className:t="",onChange:r})=>s.jsx("div",{className:`flex items-center ${t}`,children:e.map((o,a)=>{const i=a===n,l=a<n;return s.jsxs(w.Fragment,{children:[s.jsxs("div",{className:"flex items-center space-x-2 cursor-pointer",onClick:()=>r==null?void 0:r(a),children:[s.jsx("div",{className:`flex items-center font-semibold justify-center w-7 h-7 rounded-full text-sm transition-color duration-200 leading-none
|
|
98
98
|
${i?"bg-color-blue-500 text-color-white ":l?"bg-color-green-500 text-color-white ":" bg-color-white text-color-gray-400 ring "}`,children:l?s.jsx("svg",{className:"size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z"})}):a+1}),s.jsx("span",{className:`text-sm ${i?"text-color-blue-600 ":"text-color-gray-600"}`,children:o.label})]}),a<e.length-1&&s.jsx("svg",{className:"mx-4 text-color-gray-400 size-6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"})})]},a)})});/**
|
|
99
99
|
* table-core
|
|
100
100
|
*
|
|
@@ -104,10 +104,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
104
104
|
* LICENSE.md file in the root directory of this source tree.
|
|
105
105
|
*
|
|
106
106
|
* @license MIT
|
|
107
|
-
*/function Ee(e,n){return typeof e=="function"?e(n):e}function xe(e,n){return t=>{n.setState(r=>({...r,[e]:Ee(t,r[e])}))}}function nt(e){return e instanceof Function}function
|
|
107
|
+
*/function Ee(e,n){return typeof e=="function"?e(n):e}function xe(e,n){return t=>{n.setState(r=>({...r,[e]:Ee(t,r[e])}))}}function nt(e){return e instanceof Function}function fa(e){return Array.isArray(e)&&e.every(n=>typeof n=="number")}function ma(e,n){const t=[],r=o=>{o.forEach(a=>{t.push(a);const i=n(a);i!=null&&i.length&&r(i)})};return r(e),t}function Y(e,n,t){let r=[],o;return a=>{let i;t.key&&t.debug&&(i=Date.now());const l=e(a);if(!(l.length!==r.length||l.some((d,g)=>r[g]!==d)))return o;r=l;let u;if(t.key&&t.debug&&(u=Date.now()),o=n(...l),t==null||t.onChange==null||t.onChange(o),t.key&&t.debug&&t!=null&&t.debug()){const d=Math.round((Date.now()-i)*100)/100,g=Math.round((Date.now()-u)*100)/100,f=g/16,p=(v,m)=>{for(v=String(v);v.length<m;)v=" "+v;return v};console.info(`%c⏱ ${p(g,5)} /${p(d,5)} ms`,`
|
|
108
108
|
font-size: .6rem;
|
|
109
109
|
font-weight: bold;
|
|
110
|
-
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,t==null?void 0:t.key)}return o}}function Z(e,n,t,r){return{debug:()=>{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[n]},key:process.env.NODE_ENV==="development"&&t,onChange:r}}function fa(e,n,t,r){const o=()=>{var i;return(i=a.getValue())!=null?i:e.options.renderFallbackValue},a={id:`${n.id}_${t.id}`,row:n,column:t,getValue:()=>n.getValue(r),renderValue:o,getContext:Y(()=>[e,t,n,a],(i,l,c,u)=>({table:i,column:l,row:c,cell:u,getValue:u.getValue,renderValue:u.renderValue}),Z(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(a,t,n,e)},{}),a}function ma(e,n,t,r){var o,a;const l={...e._getDefaultColumnDef(),...n},c=l.accessorKey;let u=(o=(a=l.id)!=null?a:c?typeof String.prototype.replaceAll=="function"?c.replaceAll(".","_"):c.replace(/\./g,"_"):void 0)!=null?o:typeof l.header=="string"?l.header:void 0,d;if(l.accessorFn?d=l.accessorFn:c&&(c.includes(".")?d=f=>{let p=f;for(const m of c.split(".")){var v;p=(v=p)==null?void 0:v[m],process.env.NODE_ENV!=="production"&&p===void 0&&console.warn(`"${m}" in deeply nested key "${c}" returned undefined.`)}return p}:d=f=>f[l.accessorKey]),!u)throw process.env.NODE_ENV!=="production"?new Error(l.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let g={id:`${String(u)}`,accessorFn:d,parent:r,depth:t,columnDef:l,columns:[],getFlatColumns:Y(()=>[!0],()=>{var f;return[g,...(f=g.columns)==null?void 0:f.flatMap(p=>p.getFlatColumns())]},Z(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:Y(()=>[e._getOrderColumnsFn()],f=>{var p;if((p=g.columns)!=null&&p.length){let v=g.columns.flatMap(m=>m.getLeafColumns());return f(v)}return[g]},Z(e.options,"debugColumns","column.getLeafColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(g,e);return g}const ge="debugHeaders";function nr(e,n,t){var r;let a={id:(r=t.id)!=null?r:n.id,column:n,index:t.index,isPlaceholder:!!t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],l=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(l),i.push(c)};return l(a),i},getContext:()=>({table:e,header:a,column:n})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(a,e)}),a}const ga={createTable:e=>{e.getHeaderGroups=Y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,r,o)=>{var a,i;const l=(a=r==null?void 0:r.map(g=>t.find(f=>f.id===g)).filter(Boolean))!=null?a:[],c=(i=o==null?void 0:o.map(g=>t.find(f=>f.id===g)).filter(Boolean))!=null?i:[],u=t.filter(g=>!(r!=null&&r.includes(g.id))&&!(o!=null&&o.includes(g.id)));return rt(n,[...l,...u,...c],e)},Z(e.options,ge,"getHeaderGroups")),e.getCenterHeaderGroups=Y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,r,o)=>(t=t.filter(a=>!(r!=null&&r.includes(a.id))&&!(o!=null&&o.includes(a.id))),rt(n,t,e,"center")),Z(e.options,ge,"getCenterHeaderGroups")),e.getLeftHeaderGroups=Y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(n,t,r)=>{var o;const a=(o=r==null?void 0:r.map(i=>t.find(l=>l.id===i)).filter(Boolean))!=null?o:[];return rt(n,a,e,"left")},Z(e.options,ge,"getLeftHeaderGroups")),e.getRightHeaderGroups=Y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(n,t,r)=>{var o;const a=(o=r==null?void 0:r.map(i=>t.find(l=>l.id===i)).filter(Boolean))!=null?o:[];return rt(n,a,e,"right")},Z(e.options,ge,"getRightHeaderGroups")),e.getFooterGroups=Y(()=>[e.getHeaderGroups()],n=>[...n].reverse(),Z(e.options,ge,"getFooterGroups")),e.getLeftFooterGroups=Y(()=>[e.getLeftHeaderGroups()],n=>[...n].reverse(),Z(e.options,ge,"getLeftFooterGroups")),e.getCenterFooterGroups=Y(()=>[e.getCenterHeaderGroups()],n=>[...n].reverse(),Z(e.options,ge,"getCenterFooterGroups")),e.getRightFooterGroups=Y(()=>[e.getRightHeaderGroups()],n=>[...n].reverse(),Z(e.options,ge,"getRightFooterGroups")),e.getFlatHeaders=Y(()=>[e.getHeaderGroups()],n=>n.map(t=>t.headers).flat(),Z(e.options,ge,"getFlatHeaders")),e.getLeftFlatHeaders=Y(()=>[e.getLeftHeaderGroups()],n=>n.map(t=>t.headers).flat(),Z(e.options,ge,"getLeftFlatHeaders")),e.getCenterFlatHeaders=Y(()=>[e.getCenterHeaderGroups()],n=>n.map(t=>t.headers).flat(),Z(e.options,ge,"getCenterFlatHeaders")),e.getRightFlatHeaders=Y(()=>[e.getRightHeaderGroups()],n=>n.map(t=>t.headers).flat(),Z(e.options,ge,"getRightFlatHeaders")),e.getCenterLeafHeaders=Y(()=>[e.getCenterFlatHeaders()],n=>n.filter(t=>{var r;return!((r=t.subHeaders)!=null&&r.length)}),Z(e.options,ge,"getCenterLeafHeaders")),e.getLeftLeafHeaders=Y(()=>[e.getLeftFlatHeaders()],n=>n.filter(t=>{var r;return!((r=t.subHeaders)!=null&&r.length)}),Z(e.options,ge,"getLeftLeafHeaders")),e.getRightLeafHeaders=Y(()=>[e.getRightFlatHeaders()],n=>n.filter(t=>{var r;return!((r=t.subHeaders)!=null&&r.length)}),Z(e.options,ge,"getRightLeafHeaders")),e.getLeafHeaders=Y(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(n,t,r)=>{var o,a,i,l,c,u;return[...(o=(a=n[0])==null?void 0:a.headers)!=null?o:[],...(i=(l=t[0])==null?void 0:l.headers)!=null?i:[],...(c=(u=r[0])==null?void 0:u.headers)!=null?c:[]].map(d=>d.getLeafHeaders()).flat()},Z(e.options,ge,"getLeafHeaders"))}};function rt(e,n,t,r){var o,a;let i=0;const l=function(f,p){p===void 0&&(p=1),i=Math.max(i,p),f.filter(v=>v.getIsVisible()).forEach(v=>{var m;(m=v.columns)!=null&&m.length&&l(v.columns,p+1)},0)};l(e);let c=[];const u=(f,p)=>{const v={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},m=[];f.forEach(b=>{const x=[...m].reverse()[0],R=b.column.depth===v.depth;let y,E=!1;if(R&&b.column.parent?y=b.column.parent:(y=b.column,E=!0),x&&(x==null?void 0:x.column)===y)x.subHeaders.push(b);else{const C=nr(t,y,{id:[r,p,y.id,b==null?void 0:b.id].filter(Boolean).join("_"),isPlaceholder:E,placeholderId:E?`${m.filter(I=>I.column===y).length}`:void 0,depth:p,index:m.length});C.subHeaders.push(b),m.push(C)}v.headers.push(b),b.headerGroup=v}),c.push(v),p>0&&u(m,p-1)},d=n.map((f,p)=>nr(t,f,{depth:i,index:p}));u(d,i-1),c.reverse();const g=f=>f.filter(v=>v.column.getIsVisible()).map(v=>{let m=0,b=0,x=[0];v.subHeaders&&v.subHeaders.length?(x=[],g(v.subHeaders).forEach(y=>{let{colSpan:E,rowSpan:C}=y;m+=E,x.push(C)})):m=1;const R=Math.min(...x);return b=b+R,v.colSpan=m,v.rowSpan=b,{colSpan:m,rowSpan:b}});return g((o=(a=c[0])==null?void 0:a.headers)!=null?o:[]),c}const va=(e,n,t,r,o,a,i)=>{let l={id:n,index:r,original:t,depth:o,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(l._valuesCache.hasOwnProperty(c))return l._valuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return l._valuesCache[c]=u.accessorFn(l.original,r),l._valuesCache[c]},getUniqueValues:c=>{if(l._uniqueValuesCache.hasOwnProperty(c))return l._uniqueValuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(l._uniqueValuesCache[c]=u.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[c]):(l._uniqueValuesCache[c]=[l.getValue(c)],l._uniqueValuesCache[c])},renderValue:c=>{var u;return(u=l.getValue(c))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>pa(l.subRows,c=>c.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let c=[],u=l;for(;;){const d=u.getParentRow();if(!d)break;c.push(d),u=d}return c.reverse()},getAllCells:Y(()=>[e.getAllLeafColumns()],c=>c.map(u=>fa(e,l,u,u.id)),Z(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:Y(()=>[l.getAllCells()],c=>c.reduce((u,d)=>(u[d.column.id]=d,u),{}),Z(e.options,"debugRows","getAllCellsByColumnId"))};for(let c=0;c<e._features.length;c++){const u=e._features[c];u==null||u.createRow==null||u.createRow(l,e)}return l},ha={createColumn:(e,n)=>{e._getFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():n.getPreFilteredRowModel(),e._getFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},rr=(e,n,t)=>{var r,o;const a=t==null||(r=t.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(n))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(a))};rr.autoRemove=e=>we(e);const or=(e,n,t)=>{var r;return!!(!((r=e.getValue(n))==null||(r=r.toString())==null)&&r.includes(t))};or.autoRemove=e=>we(e);const ar=(e,n,t)=>{var r;return((r=e.getValue(n))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(t==null?void 0:t.toLowerCase())};ar.autoRemove=e=>we(e);const ir=(e,n,t)=>{var r;return(r=e.getValue(n))==null?void 0:r.includes(t)};ir.autoRemove=e=>we(e);const lr=(e,n,t)=>!t.some(r=>{var o;return!((o=e.getValue(n))!=null&&o.includes(r))});lr.autoRemove=e=>we(e)||!(e!=null&&e.length);const sr=(e,n,t)=>t.some(r=>{var o;return(o=e.getValue(n))==null?void 0:o.includes(r)});sr.autoRemove=e=>we(e)||!(e!=null&&e.length);const cr=(e,n,t)=>e.getValue(n)===t;cr.autoRemove=e=>we(e);const ur=(e,n,t)=>e.getValue(n)==t;ur.autoRemove=e=>we(e);const Ft=(e,n,t)=>{let[r,o]=t;const a=e.getValue(n);return a>=r&&a<=o};Ft.resolveFilterValue=e=>{let[n,t]=e,r=typeof n!="number"?parseFloat(n):n,o=typeof t!="number"?parseFloat(t):t,a=n===null||Number.isNaN(r)?-1/0:r,i=t===null||Number.isNaN(o)?1/0:o;if(a>i){const l=a;a=i,i=l}return[a,i]},Ft.autoRemove=e=>we(e)||we(e[0])&&we(e[1]);const Se={includesString:rr,includesStringSensitive:or,equalsString:ar,arrIncludes:ir,arrIncludesAll:lr,arrIncludesSome:sr,equals:cr,weakEquals:ur,inNumberRange:Ft};function we(e){return e==null||e===""}const xa={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:xe("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,n)=>{e.getAutoFilterFn=()=>{const t=n.getCoreRowModel().flatRows[0],r=t==null?void 0:t.getValue(e.id);return typeof r=="string"?Se.includesString:typeof r=="number"?Se.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Se.equals:Array.isArray(r)?Se.arrIncludes:Se.weakEquals},e.getFilterFn=()=>{var t,r;return nt(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(t=(r=n.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?t:Se[e.columnDef.filterFn]},e.getCanFilter=()=>{var t,r,o;return((t=e.columnDef.enableColumnFilter)!=null?t:!0)&&((r=n.options.enableColumnFilters)!=null?r:!0)&&((o=n.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var t;return(t=n.getState().columnFilters)==null||(t=t.find(r=>r.id===e.id))==null?void 0:t.value},e.getFilterIndex=()=>{var t,r;return(t=(r=n.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?t:-1},e.setFilterValue=t=>{n.setColumnFilters(r=>{const o=e.getFilterFn(),a=r==null?void 0:r.find(d=>d.id===e.id),i=Ee(t,a?a.value:void 0);if(dr(o,i,e)){var l;return(l=r==null?void 0:r.filter(d=>d.id!==e.id))!=null?l:[]}const c={id:e.id,value:i};if(a){var u;return(u=r==null?void 0:r.map(d=>d.id===e.id?c:d))!=null?u:[]}return r!=null&&r.length?[...r,c]:[c]})}},createRow:(e,n)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=n=>{const t=e.getAllLeafColumns(),r=o=>{var a;return(a=Ee(n,o))==null?void 0:a.filter(i=>{const l=t.find(c=>c.id===i.id);if(l){const c=l.getFilterFn();if(dr(c,i.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=n=>{var t,r;e.setColumnFilters(n?[]:(t=(r=e.initialState)==null?void 0:r.columnFilters)!=null?t:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function dr(e,n,t){return(e&&e.autoRemove?e.autoRemove(n,t):!1)||typeof n>"u"||typeof n=="string"&&!n}const At={sum:(e,n,t)=>t.reduce((r,o)=>{const a=o.getValue(e);return r+(typeof a=="number"?a:0)},0),min:(e,n,t)=>{let r;return t.forEach(o=>{const a=o.getValue(e);a!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}),r},max:(e,n,t)=>{let r;return t.forEach(o=>{const a=o.getValue(e);a!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}),r},extent:(e,n,t)=>{let r,o;return t.forEach(a=>{const i=a.getValue(e);i!=null&&(r===void 0?i>=i&&(r=o=i):(r>i&&(r=i),o<i&&(o=i)))}),[r,o]},mean:(e,n)=>{let t=0,r=0;if(n.forEach(o=>{let a=o.getValue(e);a!=null&&(a=+a)>=a&&(++t,r+=a)}),t)return r/t},median:(e,n)=>{if(!n.length)return;const t=n.map(a=>a.getValue(e));if(!da(t))return;if(t.length===1)return t[0];const r=Math.floor(t.length/2),o=t.sort((a,i)=>a-i);return t.length%2!==0?o[r]:(o[r-1]+o[r])/2},unique:(e,n)=>Array.from(new Set(n.map(t=>t.getValue(e))).values()),uniqueCount:(e,n)=>new Set(n.map(t=>t.getValue(e))).size,count:(e,n)=>n.length},ba={getDefaultColumnDef:()=>({aggregatedCell:e=>{var n,t;return(n=(t=e.getValue())==null||t.toString==null?void 0:t.toString())!=null?n:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:xe("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,n)=>{e.toggleGrouping=()=>{n.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(r=>r!==e.id):[...t??[],e.id])},e.getCanGroup=()=>{var t,r;return((t=e.columnDef.enableGrouping)!=null?t:!0)&&((r=n.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.includes(e.id)},e.getGroupedIndex=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const t=n.getCoreRowModel().flatRows[0],r=t==null?void 0:t.getValue(e.id);if(typeof r=="number")return At.sum;if(Object.prototype.toString.call(r)==="[object Date]")return At.extent},e.getAggregationFn=()=>{var t,r;if(!e)throw new Error;return nt(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(t=(r=n.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?t:At[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=n=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(n),e.resetGrouping=n=>{var t,r;e.setGrouping(n?[]:(t=(r=e.initialState)==null?void 0:r.grouping)!=null?t:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,n)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=t=>{if(e._groupingValuesCache.hasOwnProperty(t))return e._groupingValuesCache[t];const r=n.getColumn(t);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[t]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[t]):e.getValue(t)},e._groupingValuesCache={}},createCell:(e,n,t,r)=>{e.getIsGrouped=()=>n.getIsGrouped()&&n.id===t.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&n.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=t.subRows)!=null&&o.length)}}};function wa(e,n,t){if(!(n!=null&&n.length)||!t)return e;const r=e.filter(a=>!n.includes(a.id));return t==="remove"?r:[...n.map(a=>e.find(i=>i.id===a)).filter(Boolean),...r]}const ya={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:xe("columnOrder",e)}),createColumn:(e,n)=>{e.getIndex=Y(t=>[Ve(n,t)],t=>t.findIndex(r=>r.id===e.id),Z(n.options,"debugColumns","getIndex")),e.getIsFirstColumn=t=>{var r;return((r=Ve(n,t)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=t=>{var r;const o=Ve(n,t);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=n=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(n),e.resetColumnOrder=n=>{var t;e.setColumnOrder(n?[]:(t=e.initialState.columnOrder)!=null?t:[])},e._getOrderColumnsFn=Y(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(n,t,r)=>o=>{let a=[];if(!(n!=null&&n.length))a=o;else{const i=[...n],l=[...o];for(;l.length&&i.length;){const c=i.shift(),u=l.findIndex(d=>d.id===c);u>-1&&a.push(l.splice(u,1)[0])}a=[...a,...l]}return wa(a,t,r)},Z(e.options,"debugTable","_getOrderColumnsFn"))}},Dt=()=>({left:[],right:[]}),Ca={getInitialState:e=>({columnPinning:Dt(),...e}),getDefaultOptions:e=>({onColumnPinningChange:xe("columnPinning",e)}),createColumn:(e,n)=>{e.pin=t=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);n.setColumnPinning(o=>{var a,i;if(t==="right"){var l,c;return{left:((l=o==null?void 0:o.left)!=null?l:[]).filter(g=>!(r!=null&&r.includes(g))),right:[...((c=o==null?void 0:o.right)!=null?c:[]).filter(g=>!(r!=null&&r.includes(g))),...r]}}if(t==="left"){var u,d;return{left:[...((u=o==null?void 0:o.left)!=null?u:[]).filter(g=>!(r!=null&&r.includes(g))),...r],right:((d=o==null?void 0:o.right)!=null?d:[]).filter(g=>!(r!=null&&r.includes(g)))}}return{left:((a=o==null?void 0:o.left)!=null?a:[]).filter(g=>!(r!=null&&r.includes(g))),right:((i=o==null?void 0:o.right)!=null?i:[]).filter(g=>!(r!=null&&r.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,a,i;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((a=(i=n.options.enableColumnPinning)!=null?i:n.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{const t=e.getLeafColumns().map(l=>l.id),{left:r,right:o}=n.getState().columnPinning,a=t.some(l=>r==null?void 0:r.includes(l)),i=t.some(l=>o==null?void 0:o.includes(l));return a?"left":i?"right":!1},e.getPinnedIndex=()=>{var t,r;const o=e.getIsPinned();return o?(t=(r=n.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?t:-1:0}},createRow:(e,n)=>{e.getCenterVisibleCells=Y(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left,n.getState().columnPinning.right],(t,r,o)=>{const a=[...r??[],...o??[]];return t.filter(i=>!a.includes(i.column.id))},Z(n.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=Y(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left],(t,r)=>(r??[]).map(a=>t.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),Z(n.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=Y(()=>[e._getAllVisibleCells(),n.getState().columnPinning.right],(t,r)=>(r??[]).map(a=>t.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),Z(n.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=n=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(n),e.resetColumnPinning=n=>{var t,r;return e.setColumnPinning(n?Dt():(t=(r=e.initialState)==null?void 0:r.columnPinning)!=null?t:Dt())},e.getIsSomeColumnsPinned=n=>{var t;const r=e.getState().columnPinning;if(!n){var o,a;return!!((o=r.left)!=null&&o.length||(a=r.right)!=null&&a.length)}return!!((t=r[n])!=null&&t.length)},e.getLeftLeafColumns=Y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(n,t)=>(t??[]).map(r=>n.find(o=>o.id===r)).filter(Boolean),Z(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=Y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(n,t)=>(t??[]).map(r=>n.find(o=>o.id===r)).filter(Boolean),Z(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=Y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,r)=>{const o=[...t??[],...r??[]];return n.filter(a=>!o.includes(a.id))},Z(e.options,"debugColumns","getCenterLeafColumns"))}},ot={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Nt=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Sa={getDefaultColumnDef:()=>ot,getInitialState:e=>({columnSizing:{},columnSizingInfo:Nt(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:xe("columnSizing",e),onColumnSizingInfoChange:xe("columnSizingInfo",e)}),createColumn:(e,n)=>{e.getSize=()=>{var t,r,o;const a=n.getState().columnSizing[e.id];return Math.min(Math.max((t=e.columnDef.minSize)!=null?t:ot.minSize,(r=a??e.columnDef.size)!=null?r:ot.size),(o=e.columnDef.maxSize)!=null?o:ot.maxSize)},e.getStart=Y(t=>[t,Ve(n,t),n.getState().columnSizing],(t,r)=>r.slice(0,e.getIndex(t)).reduce((o,a)=>o+a.getSize(),0),Z(n.options,"debugColumns","getStart")),e.getAfter=Y(t=>[t,Ve(n,t),n.getState().columnSizing],(t,r)=>r.slice(e.getIndex(t)+1).reduce((o,a)=>o+a.getSize(),0),Z(n.options,"debugColumns","getAfter")),e.resetSize=()=>{n.setColumnSizing(t=>{let{[e.id]:r,...o}=t;return o})},e.getCanResize=()=>{var t,r;return((t=e.columnDef.enableResizing)!=null?t:!0)&&((r=n.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>n.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,n)=>{e.getSize=()=>{let t=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var a;t+=(a=o.column.getSize())!=null?a:0}};return r(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=t=>{const r=n.getColumn(e.column.id),o=r==null?void 0:r.getCanResize();return a=>{if(!r||!o||(a.persist==null||a.persist(),Tt(a)&&a.touches&&a.touches.length>1))return;const i=e.getSize(),l=e?e.getLeafHeaders().map(x=>[x.column.id,x.column.getSize()]):[[r.id,r.getSize()]],c=Tt(a)?Math.round(a.touches[0].clientX):a.clientX,u={},d=(x,R)=>{typeof R=="number"&&(n.setColumnSizingInfo(y=>{var E,C;const I=n.options.columnResizeDirection==="rtl"?-1:1,T=(R-((E=y==null?void 0:y.startOffset)!=null?E:0))*I,H=Math.max(T/((C=y==null?void 0:y.startSize)!=null?C:0),-.999999);return y.columnSizingStart.forEach(A=>{let[X,ae]=A;u[X]=Math.round(Math.max(ae+ae*H,0)*100)/100}),{...y,deltaOffset:T,deltaPercentage:H}}),(n.options.columnResizeMode==="onChange"||x==="end")&&n.setColumnSizing(y=>({...y,...u})))},g=x=>d("move",x),f=x=>{d("end",x),n.setColumnSizingInfo(R=>({...R,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=t||typeof document<"u"?document:null,v={moveHandler:x=>g(x.clientX),upHandler:x=>{p==null||p.removeEventListener("mousemove",v.moveHandler),p==null||p.removeEventListener("mouseup",v.upHandler),f(x.clientX)}},m={moveHandler:x=>(x.cancelable&&(x.preventDefault(),x.stopPropagation()),g(x.touches[0].clientX),!1),upHandler:x=>{var R;p==null||p.removeEventListener("touchmove",m.moveHandler),p==null||p.removeEventListener("touchend",m.upHandler),x.cancelable&&(x.preventDefault(),x.stopPropagation()),f((R=x.touches[0])==null?void 0:R.clientX)}},b=ka()?{passive:!1}:!1;Tt(a)?(p==null||p.addEventListener("touchmove",m.moveHandler,b),p==null||p.addEventListener("touchend",m.upHandler,b)):(p==null||p.addEventListener("mousemove",v.moveHandler,b),p==null||p.addEventListener("mouseup",v.upHandler,b)),n.setColumnSizingInfo(x=>({...x,startOffset:c,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=n=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(n),e.setColumnSizingInfo=n=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(n),e.resetColumnSizing=n=>{var t;e.setColumnSizing(n?{}:(t=e.initialState.columnSizing)!=null?t:{})},e.resetHeaderSizeInfo=n=>{var t;e.setColumnSizingInfo(n?Nt():(t=e.initialState.columnSizingInfo)!=null?t:Nt())},e.getTotalSize=()=>{var n,t;return(n=(t=e.getHeaderGroups()[0])==null?void 0:t.headers.reduce((r,o)=>r+o.getSize(),0))!=null?n:0},e.getLeftTotalSize=()=>{var n,t;return(n=(t=e.getLeftHeaderGroups()[0])==null?void 0:t.headers.reduce((r,o)=>r+o.getSize(),0))!=null?n:0},e.getCenterTotalSize=()=>{var n,t;return(n=(t=e.getCenterHeaderGroups()[0])==null?void 0:t.headers.reduce((r,o)=>r+o.getSize(),0))!=null?n:0},e.getRightTotalSize=()=>{var n,t;return(n=(t=e.getRightHeaderGroups()[0])==null?void 0:t.headers.reduce((r,o)=>r+o.getSize(),0))!=null?n:0}}};let at=null;function ka(){if(typeof at=="boolean")return at;let e=!1;try{const n={get passive(){return e=!0,!1}},t=()=>{};window.addEventListener("test",t,n),window.removeEventListener("test",t)}catch{e=!1}return at=e,at}function Tt(e){return e.type==="touchstart"}const ja={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:xe("columnVisibility",e)}),createColumn:(e,n)=>{e.toggleVisibility=t=>{e.getCanHide()&&n.setColumnVisibility(r=>({...r,[e.id]:t??!e.getIsVisible()}))},e.getIsVisible=()=>{var t,r;const o=e.columns;return(t=o.length?o.some(a=>a.getIsVisible()):(r=n.getState().columnVisibility)==null?void 0:r[e.id])!=null?t:!0},e.getCanHide=()=>{var t,r;return((t=e.columnDef.enableHiding)!=null?t:!0)&&((r=n.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,n)=>{e._getAllVisibleCells=Y(()=>[e.getAllCells(),n.getState().columnVisibility],t=>t.filter(r=>r.column.getIsVisible()),Z(n.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=Y(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(t,r,o)=>[...t,...r,...o],Z(n.options,"debugRows","getVisibleCells"))},createTable:e=>{const n=(t,r)=>Y(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),Z(e.options,"debugColumns",t));e.getVisibleFlatColumns=n("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=n("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=n("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=n("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=n("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var r;e.setColumnVisibility(t?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=t=>{var r;t=(r=t)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,a)=>({...o,[a.id]:t||!(a.getCanHide!=null&&a.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(t=>!(t.getIsVisible!=null&&t.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(t=>t.getIsVisible==null?void 0:t.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var r;e.toggleAllColumnsVisible((r=t.target)==null?void 0:r.checked)}}};function Ve(e,n){return n?n==="center"?e.getCenterVisibleLeafColumns():n==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const $a={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Ra={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:xe("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:n=>{var t;const r=(t=e.getCoreRowModel().flatRows[0])==null||(t=t._getAllCellsByColumnId()[n.id])==null?void 0:t.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,n)=>{e.getCanGlobalFilter=()=>{var t,r,o,a;return((t=e.columnDef.enableGlobalFilter)!=null?t:!0)&&((r=n.options.enableGlobalFilter)!=null?r:!0)&&((o=n.options.enableFilters)!=null?o:!0)&&((a=n.options.getColumnCanGlobalFilter==null?void 0:n.options.getColumnCanGlobalFilter(e))!=null?a:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Se.includesString,e.getGlobalFilterFn=()=>{var n,t;const{globalFilterFn:r}=e.options;return nt(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(n=(t=e.options.filterFns)==null?void 0:t[r])!=null?n:Se[r]},e.setGlobalFilter=n=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(n)},e.resetGlobalFilter=n=>{e.setGlobalFilter(n?void 0:e.initialState.globalFilter)}}},Ea={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:xe("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let n=!1,t=!1;e._autoResetExpanded=()=>{var r,o;if(!n){e._queue(()=>{n=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(t)return;t=!0,e._queue(()=>{e.resetExpanded(),t=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,a;e.setExpanded(r?{}:(o=(a=e.initialState)==null?void 0:a.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{const i=a.split(".");r=Math.max(r,i.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,n)=>{e.toggleExpanded=t=>{n.setExpanded(r=>{var o;const a=r===!0?!0:!!(r!=null&&r[e.id]);let i={};if(r===!0?Object.keys(n.getRowModel().rowsById).forEach(l=>{i[l]=!0}):i=r,t=(o=t)!=null?o:!a,!a&&t)return{...i,[e.id]:!0};if(a&&!t){const{[e.id]:l,...c}=i;return c}return r})},e.getIsExpanded=()=>{var t;const r=n.getState().expanded;return!!((t=n.options.getIsRowExpanded==null?void 0:n.options.getIsRowExpanded(e))!=null?t:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var t,r,o;return(t=n.options.getRowCanExpand==null?void 0:n.options.getRowCanExpand(e))!=null?t:((r=n.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let t=!0,r=e;for(;t&&r.parentId;)r=n.getRow(r.parentId,!0),t=r.getIsExpanded();return t},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},zt=0,Ot=10,It=()=>({pageIndex:zt,pageSize:Ot}),_a={getInitialState:e=>({...e,pagination:{...It(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:xe("pagination",e)}),createTable:e=>{let n=!1,t=!1;e._autoResetPageIndex=()=>{var r,o;if(!n){e._queue(()=>{n=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(t)return;t=!0,e._queue(()=>{e.resetPageIndex(),t=!1})}},e.setPagination=r=>{const o=a=>Ee(r,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?It():(o=e.initialState.pagination)!=null?o:It())},e.setPageIndex=r=>{e.setPagination(o=>{let a=Ee(r,o.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,i)),{...o,pageIndex:a}})},e.resetPageIndex=r=>{var o,a;e.setPageIndex(r?zt:(o=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?o:zt)},e.resetPageSize=r=>{var o,a;e.setPageSize(r?Ot:(o=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?o:Ot)},e.setPageSize=r=>{e.setPagination(o=>{const a=Math.max(1,Ee(r,o.pageSize)),i=o.pageSize*o.pageIndex,l=Math.floor(i/a);return{...o,pageIndex:l,pageSize:a}})},e.setPageCount=r=>e.setPagination(o=>{var a;let i=Ee(r,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...o,pageCount:i}}),e.getPageOptions=Y(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((a,i)=>i)),o},Z(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},Vt=()=>({top:[],bottom:[]}),Pa={getInitialState:e=>({rowPinning:Vt(),...e}),getDefaultOptions:e=>({onRowPinningChange:xe("rowPinning",e)}),createRow:(e,n)=>{e.pin=(t,r,o)=>{const a=r?e.getLeafRows().map(c=>{let{id:u}=c;return u}):[],i=o?e.getParentRows().map(c=>{let{id:u}=c;return u}):[],l=new Set([...i,e.id,...a]);n.setRowPinning(c=>{var u,d;if(t==="bottom"){var g,f;return{top:((g=c==null?void 0:c.top)!=null?g:[]).filter(m=>!(l!=null&&l.has(m))),bottom:[...((f=c==null?void 0:c.bottom)!=null?f:[]).filter(m=>!(l!=null&&l.has(m))),...Array.from(l)]}}if(t==="top"){var p,v;return{top:[...((p=c==null?void 0:c.top)!=null?p:[]).filter(m=>!(l!=null&&l.has(m))),...Array.from(l)],bottom:((v=c==null?void 0:c.bottom)!=null?v:[]).filter(m=>!(l!=null&&l.has(m)))}}return{top:((u=c==null?void 0:c.top)!=null?u:[]).filter(m=>!(l!=null&&l.has(m))),bottom:((d=c==null?void 0:c.bottom)!=null?d:[]).filter(m=>!(l!=null&&l.has(m)))}})},e.getCanPin=()=>{var t;const{enableRowPinning:r,enablePinning:o}=n.options;return typeof r=="function"?r(e):(t=r??o)!=null?t:!0},e.getIsPinned=()=>{const t=[e.id],{top:r,bottom:o}=n.getState().rowPinning,a=t.some(l=>r==null?void 0:r.includes(l)),i=t.some(l=>o==null?void 0:o.includes(l));return a?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var t,r;const o=e.getIsPinned();if(!o)return-1;const a=(t=o==="top"?n.getTopRows():n.getBottomRows())==null?void 0:t.map(i=>{let{id:l}=i;return l});return(r=a==null?void 0:a.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=n=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(n),e.resetRowPinning=n=>{var t,r;return e.setRowPinning(n?Vt():(t=(r=e.initialState)==null?void 0:r.rowPinning)!=null?t:Vt())},e.getIsSomeRowsPinned=n=>{var t;const r=e.getState().rowPinning;if(!n){var o,a;return!!((o=r.top)!=null&&o.length||(a=r.bottom)!=null&&a.length)}return!!((t=r[n])!=null&&t.length)},e._getPinnedRows=(n,t,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(t??[]).map(i=>{const l=e.getRow(i,!0);return l.getIsAllParentsExpanded()?l:null}):(t??[]).map(i=>n.find(l=>l.id===i))).filter(Boolean).map(i=>({...i,position:r}))},e.getTopRows=Y(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(n,t)=>e._getPinnedRows(n,t,"top"),Z(e.options,"debugRows","getTopRows")),e.getBottomRows=Y(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(n,t)=>e._getPinnedRows(n,t,"bottom"),Z(e.options,"debugRows","getBottomRows")),e.getCenterRows=Y(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(n,t,r)=>{const o=new Set([...t??[],...r??[]]);return n.filter(a=>!o.has(a.id))},Z(e.options,"debugRows","getCenterRows"))}},Ma={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:xe("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=n=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(n),e.resetRowSelection=n=>{var t;return e.setRowSelection(n?{}:(t=e.initialState.rowSelection)!=null?t:{})},e.toggleAllRowsSelected=n=>{e.setRowSelection(t=>{n=typeof n<"u"?n:!e.getIsAllRowsSelected();const r={...t},o=e.getPreGroupedRowModel().flatRows;return n?o.forEach(a=>{a.getCanSelect()&&(r[a.id]=!0)}):o.forEach(a=>{delete r[a.id]}),r})},e.toggleAllPageRowsSelected=n=>e.setRowSelection(t=>{const r=typeof n<"u"?n:!e.getIsAllPageRowsSelected(),o={...t};return e.getRowModel().rows.forEach(a=>{Ht(o,a.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Y(()=>[e.getState().rowSelection,e.getCoreRowModel()],(n,t)=>Object.keys(n).length?Bt(e,t):{rows:[],flatRows:[],rowsById:{}},Z(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=Y(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(n,t)=>Object.keys(n).length?Bt(e,t):{rows:[],flatRows:[],rowsById:{}},Z(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=Y(()=>[e.getState().rowSelection,e.getSortedRowModel()],(n,t)=>Object.keys(n).length?Bt(e,t):{rows:[],flatRows:[],rowsById:{}},Z(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const n=e.getFilteredRowModel().flatRows,{rowSelection:t}=e.getState();let r=!!(n.length&&Object.keys(t).length);return r&&n.some(o=>o.getCanSelect()&&!t[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const n=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:t}=e.getState();let r=!!n.length;return r&&n.some(o=>!t[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var n;const t=Object.keys((n=e.getState().rowSelection)!=null?n:{}).length;return t>0&&t<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const n=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:n.filter(t=>t.getCanSelect()).some(t=>t.getIsSelected()||t.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>n=>{e.toggleAllRowsSelected(n.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>n=>{e.toggleAllPageRowsSelected(n.target.checked)}},createRow:(e,n)=>{e.toggleSelected=(t,r)=>{const o=e.getIsSelected();n.setRowSelection(a=>{var i;if(t=typeof t<"u"?t:!o,e.getCanSelect()&&o===t)return a;const l={...a};return Ht(l,e.id,t,(i=r==null?void 0:r.selectChildren)!=null?i:!0,n),l})},e.getIsSelected=()=>{const{rowSelection:t}=n.getState();return qt(e,t)},e.getIsSomeSelected=()=>{const{rowSelection:t}=n.getState();return Gt(e,t)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:t}=n.getState();return Gt(e,t)==="all"},e.getCanSelect=()=>{var t;return typeof n.options.enableRowSelection=="function"?n.options.enableRowSelection(e):(t=n.options.enableRowSelection)!=null?t:!0},e.getCanSelectSubRows=()=>{var t;return typeof n.options.enableSubRowSelection=="function"?n.options.enableSubRowSelection(e):(t=n.options.enableSubRowSelection)!=null?t:!0},e.getCanMultiSelect=()=>{var t;return typeof n.options.enableMultiRowSelection=="function"?n.options.enableMultiRowSelection(e):(t=n.options.enableMultiRowSelection)!=null?t:!0},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return r=>{var o;t&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},Ht=(e,n,t,r,o)=>{var a;const i=o.getRow(n,!0);t?(i.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),i.getCanSelect()&&(e[n]=!0)):delete e[n],r&&(a=i.subRows)!=null&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(l=>Ht(e,l.id,t,r,o))};function Bt(e,n){const t=e.getState().rowSelection,r=[],o={},a=function(i,l){return i.map(c=>{var u;const d=qt(c,t);if(d&&(r.push(c),o[c.id]=c),(u=c.subRows)!=null&&u.length&&(c={...c,subRows:a(c.subRows)}),d)return c}).filter(Boolean)};return{rows:a(n.rows),flatRows:r,rowsById:o}}function qt(e,n){var t;return(t=n[e.id])!=null?t:!1}function Gt(e,n,t){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,a=!1;return e.subRows.forEach(i=>{if(!(a&&!o)&&(i.getCanSelect()&&(qt(i,n)?a=!0:o=!1),i.subRows&&i.subRows.length)){const l=Gt(i,n);l==="all"?a=!0:(l==="some"&&(a=!0),o=!1)}}),o?"all":a?"some":!1}const Wt=/([0-9]+)/gm,La=(e,n,t)=>pr(_e(e.getValue(t)).toLowerCase(),_e(n.getValue(t)).toLowerCase()),Fa=(e,n,t)=>pr(_e(e.getValue(t)),_e(n.getValue(t))),Aa=(e,n,t)=>Ut(_e(e.getValue(t)).toLowerCase(),_e(n.getValue(t)).toLowerCase()),Da=(e,n,t)=>Ut(_e(e.getValue(t)),_e(n.getValue(t))),Na=(e,n,t)=>{const r=e.getValue(t),o=n.getValue(t);return r>o?1:r<o?-1:0},Ta=(e,n,t)=>Ut(e.getValue(t),n.getValue(t));function Ut(e,n){return e===n?0:e>n?1:-1}function _e(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function pr(e,n){const t=e.split(Wt).filter(Boolean),r=n.split(Wt).filter(Boolean);for(;t.length&&r.length;){const o=t.shift(),a=r.shift(),i=parseInt(o,10),l=parseInt(a,10),c=[i,l].sort();if(isNaN(c[0])){if(o>a)return 1;if(a>o)return-1;continue}if(isNaN(c[1]))return isNaN(i)?-1:1;if(i>l)return 1;if(l>i)return-1}return t.length-r.length}const He={alphanumeric:La,alphanumericCaseSensitive:Fa,text:Aa,textCaseSensitive:Da,datetime:Na,basic:Ta},za=[ga,ja,ya,Ca,ha,xa,$a,Ra,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:xe("sorting",e),isMultiSortEvent:n=>n.shiftKey}),createColumn:(e,n)=>{e.getAutoSortingFn=()=>{const t=n.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of t){const a=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return He.datetime;if(typeof a=="string"&&(r=!0,a.split(Wt).length>1))return He.alphanumeric}return r?He.text:He.basic},e.getAutoSortDir=()=>{const t=n.getFilteredRowModel().flatRows[0];return typeof(t==null?void 0:t.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var t,r;if(!e)throw new Error;return nt(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(t=(r=n.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?t:He[e.columnDef.sortingFn]},e.toggleSorting=(t,r)=>{const o=e.getNextSortingOrder(),a=typeof t<"u"&&t!==null;n.setSorting(i=>{const l=i==null?void 0:i.find(p=>p.id===e.id),c=i==null?void 0:i.findIndex(p=>p.id===e.id);let u=[],d,g=a?t:o==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&r?l?d="toggle":d="add":i!=null&&i.length&&c!==i.length-1?d="replace":l?d="toggle":d="replace",d==="toggle"&&(a||o||(d="remove")),d==="add"){var f;u=[...i,{id:e.id,desc:g}],u.splice(0,u.length-((f=n.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else d==="toggle"?u=i.map(p=>p.id===e.id?{...p,desc:g}:p):d==="remove"?u=i.filter(p=>p.id!==e.id):u=[{id:e.id,desc:g}];return u})},e.getFirstSortDir=()=>{var t,r;return((t=(r=e.columnDef.sortDescFirst)!=null?r:n.options.sortDescFirst)!=null?t:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=t=>{var r,o;const a=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==a&&((r=n.options.enableSortingRemoval)==null||r)&&(!(t&&(o=n.options.enableMultiRemove)!=null)||o)?!1:i==="desc"?"asc":"desc":a},e.getCanSort=()=>{var t,r;return((t=e.columnDef.enableSorting)!=null?t:!0)&&((r=n.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var t,r;return(t=(r=e.columnDef.enableMultiSort)!=null?r:n.options.enableMultiSort)!=null?t:!!e.accessorFn},e.getIsSorted=()=>{var t;const r=(t=n.getState().sorting)==null?void 0:t.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var t,r;return(t=(r=n.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?t:-1},e.clearSorting=()=>{n.setSorting(t=>t!=null&&t.length?t.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const t=e.getCanSort();return r=>{t&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?n.options.isMultiSortEvent==null?void 0:n.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=n=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(n),e.resetSorting=n=>{var t,r;e.setSorting(n?[]:(t=(r=e.initialState)==null?void 0:r.sorting)!=null?t:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},ba,Ea,_a,Pa,Ma,Sa];function Oa(e){var n,t;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...za,...(n=e._features)!=null?n:[]];let o={_features:r};const a=o._features.reduce((f,p)=>Object.assign(f,p.getDefaultOptions==null?void 0:p.getDefaultOptions(o)),{}),i=f=>o.options.mergeOptions?o.options.mergeOptions(a,f):{...a,...f};let c={...{},...(t=e.initialState)!=null?t:{}};o._features.forEach(f=>{var p;c=(p=f.getInitialState==null?void 0:f.getInitialState(c))!=null?p:c});const u=[];let d=!1;const g={_features:r,options:{...a,...e},initialState:c,_queue:f=>{u.push(f),d||(d=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();d=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{o.setState(o.initialState)},setOptions:f=>{const p=Ee(f,o.options);o.options=i(p)},getState:()=>o.options.state,setState:f=>{o.options.onStateChange==null||o.options.onStateChange(f)},_getRowId:(f,p,v)=>{var m;return(m=o.options.getRowId==null?void 0:o.options.getRowId(f,p,v))!=null?m:`${v?[v.id,p].join("."):p}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(f,p)=>{let v=(p?o.getPrePaginationRowModel():o.getRowModel()).rowsById[f];if(!v&&(v=o.getCoreRowModel().rowsById[f],!v))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${f}`):new Error;return v},_getDefaultColumnDef:Y(()=>[o.options.defaultColumn],f=>{var p;return f=(p=f)!=null?p:{},{header:v=>{const m=v.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:v=>{var m,b;return(m=(b=v.renderValue())==null||b.toString==null?void 0:b.toString())!=null?m:null},...o._features.reduce((v,m)=>Object.assign(v,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...f}},Z(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:Y(()=>[o._getColumnDefs()],f=>{const p=function(v,m,b){return b===void 0&&(b=0),v.map(x=>{const R=ma(o,x,b,m),y=x;return R.columns=y.columns?p(y.columns,R,b+1):[],R})};return p(f)},Z(e,"debugColumns","getAllColumns")),getAllFlatColumns:Y(()=>[o.getAllColumns()],f=>f.flatMap(p=>p.getFlatColumns()),Z(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:Y(()=>[o.getAllFlatColumns()],f=>f.reduce((p,v)=>(p[v.id]=v,p),{}),Z(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:Y(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(f,p)=>{let v=f.flatMap(m=>m.getLeafColumns());return p(v)},Z(e,"debugColumns","getAllLeafColumns")),getColumn:f=>{const p=o._getAllFlatColumnsById()[f];return process.env.NODE_ENV!=="production"&&!p&&console.error(`[Table] Column with id '${f}' does not exist.`),p}};Object.assign(o,g);for(let f=0;f<o._features.length;f++){const p=o._features[f];p==null||p.createTable==null||p.createTable(o)}return o}function Ia(){return e=>Y(()=>[e.options.data],n=>{const t={rows:[],flatRows:[],rowsById:{}},r=function(o,a,i){a===void 0&&(a=0);const l=[];for(let u=0;u<o.length;u++){const d=va(e,e._getRowId(o[u],u,i),o[u],u,a,void 0,i==null?void 0:i.id);if(t.flatRows.push(d),t.rowsById[d.id]=d,l.push(d),e.options.getSubRows){var c;d.originalSubRows=e.options.getSubRows(o[u],u),(c=d.originalSubRows)!=null&&c.length&&(d.subRows=r(d.originalSubRows,a+1,d))}}return l};return t.rows=r(n),t},Z(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}/**
|
|
110
|
+
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,t==null?void 0:t.key)}return o}}function Z(e,n,t,r){return{debug:()=>{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[n]},key:process.env.NODE_ENV==="development"&&t,onChange:r}}function ga(e,n,t,r){const o=()=>{var i;return(i=a.getValue())!=null?i:e.options.renderFallbackValue},a={id:`${n.id}_${t.id}`,row:n,column:t,getValue:()=>n.getValue(r),renderValue:o,getContext:Y(()=>[e,t,n,a],(i,l,c,u)=>({table:i,column:l,row:c,cell:u,getValue:u.getValue,renderValue:u.renderValue}),Z(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(a,t,n,e)},{}),a}function va(e,n,t,r){var o,a;const l={...e._getDefaultColumnDef(),...n},c=l.accessorKey;let u=(o=(a=l.id)!=null?a:c?typeof String.prototype.replaceAll=="function"?c.replaceAll(".","_"):c.replace(/\./g,"_"):void 0)!=null?o:typeof l.header=="string"?l.header:void 0,d;if(l.accessorFn?d=l.accessorFn:c&&(c.includes(".")?d=f=>{let p=f;for(const m of c.split(".")){var v;p=(v=p)==null?void 0:v[m],process.env.NODE_ENV!=="production"&&p===void 0&&console.warn(`"${m}" in deeply nested key "${c}" returned undefined.`)}return p}:d=f=>f[l.accessorKey]),!u)throw process.env.NODE_ENV!=="production"?new Error(l.accessorFn?"Columns require an id when using an accessorFn":"Columns require an id when using a non-string header"):new Error;let g={id:`${String(u)}`,accessorFn:d,parent:r,depth:t,columnDef:l,columns:[],getFlatColumns:Y(()=>[!0],()=>{var f;return[g,...(f=g.columns)==null?void 0:f.flatMap(p=>p.getFlatColumns())]},Z(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:Y(()=>[e._getOrderColumnsFn()],f=>{var p;if((p=g.columns)!=null&&p.length){let v=g.columns.flatMap(m=>m.getLeafColumns());return f(v)}return[g]},Z(e.options,"debugColumns","column.getLeafColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(g,e);return g}const ve="debugHeaders";function nr(e,n,t){var r;let a={id:(r=t.id)!=null?r:n.id,column:n,index:t.index,isPlaceholder:!!t.isPlaceholder,placeholderId:t.placeholderId,depth:t.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],l=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(l),i.push(c)};return l(a),i},getContext:()=>({table:e,header:a,column:n})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(a,e)}),a}const ha={createTable:e=>{e.getHeaderGroups=Y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,r,o)=>{var a,i;const l=(a=r==null?void 0:r.map(g=>t.find(f=>f.id===g)).filter(Boolean))!=null?a:[],c=(i=o==null?void 0:o.map(g=>t.find(f=>f.id===g)).filter(Boolean))!=null?i:[],u=t.filter(g=>!(r!=null&&r.includes(g.id))&&!(o!=null&&o.includes(g.id)));return rt(n,[...l,...u,...c],e)},Z(e.options,ve,"getHeaderGroups")),e.getCenterHeaderGroups=Y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,r,o)=>(t=t.filter(a=>!(r!=null&&r.includes(a.id))&&!(o!=null&&o.includes(a.id))),rt(n,t,e,"center")),Z(e.options,ve,"getCenterHeaderGroups")),e.getLeftHeaderGroups=Y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(n,t,r)=>{var o;const a=(o=r==null?void 0:r.map(i=>t.find(l=>l.id===i)).filter(Boolean))!=null?o:[];return rt(n,a,e,"left")},Z(e.options,ve,"getLeftHeaderGroups")),e.getRightHeaderGroups=Y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(n,t,r)=>{var o;const a=(o=r==null?void 0:r.map(i=>t.find(l=>l.id===i)).filter(Boolean))!=null?o:[];return rt(n,a,e,"right")},Z(e.options,ve,"getRightHeaderGroups")),e.getFooterGroups=Y(()=>[e.getHeaderGroups()],n=>[...n].reverse(),Z(e.options,ve,"getFooterGroups")),e.getLeftFooterGroups=Y(()=>[e.getLeftHeaderGroups()],n=>[...n].reverse(),Z(e.options,ve,"getLeftFooterGroups")),e.getCenterFooterGroups=Y(()=>[e.getCenterHeaderGroups()],n=>[...n].reverse(),Z(e.options,ve,"getCenterFooterGroups")),e.getRightFooterGroups=Y(()=>[e.getRightHeaderGroups()],n=>[...n].reverse(),Z(e.options,ve,"getRightFooterGroups")),e.getFlatHeaders=Y(()=>[e.getHeaderGroups()],n=>n.map(t=>t.headers).flat(),Z(e.options,ve,"getFlatHeaders")),e.getLeftFlatHeaders=Y(()=>[e.getLeftHeaderGroups()],n=>n.map(t=>t.headers).flat(),Z(e.options,ve,"getLeftFlatHeaders")),e.getCenterFlatHeaders=Y(()=>[e.getCenterHeaderGroups()],n=>n.map(t=>t.headers).flat(),Z(e.options,ve,"getCenterFlatHeaders")),e.getRightFlatHeaders=Y(()=>[e.getRightHeaderGroups()],n=>n.map(t=>t.headers).flat(),Z(e.options,ve,"getRightFlatHeaders")),e.getCenterLeafHeaders=Y(()=>[e.getCenterFlatHeaders()],n=>n.filter(t=>{var r;return!((r=t.subHeaders)!=null&&r.length)}),Z(e.options,ve,"getCenterLeafHeaders")),e.getLeftLeafHeaders=Y(()=>[e.getLeftFlatHeaders()],n=>n.filter(t=>{var r;return!((r=t.subHeaders)!=null&&r.length)}),Z(e.options,ve,"getLeftLeafHeaders")),e.getRightLeafHeaders=Y(()=>[e.getRightFlatHeaders()],n=>n.filter(t=>{var r;return!((r=t.subHeaders)!=null&&r.length)}),Z(e.options,ve,"getRightLeafHeaders")),e.getLeafHeaders=Y(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(n,t,r)=>{var o,a,i,l,c,u;return[...(o=(a=n[0])==null?void 0:a.headers)!=null?o:[],...(i=(l=t[0])==null?void 0:l.headers)!=null?i:[],...(c=(u=r[0])==null?void 0:u.headers)!=null?c:[]].map(d=>d.getLeafHeaders()).flat()},Z(e.options,ve,"getLeafHeaders"))}};function rt(e,n,t,r){var o,a;let i=0;const l=function(f,p){p===void 0&&(p=1),i=Math.max(i,p),f.filter(v=>v.getIsVisible()).forEach(v=>{var m;(m=v.columns)!=null&&m.length&&l(v.columns,p+1)},0)};l(e);let c=[];const u=(f,p)=>{const v={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},m=[];f.forEach(b=>{const x=[...m].reverse()[0],R=b.column.depth===v.depth;let y,E=!1;if(R&&b.column.parent?y=b.column.parent:(y=b.column,E=!0),x&&(x==null?void 0:x.column)===y)x.subHeaders.push(b);else{const C=nr(t,y,{id:[r,p,y.id,b==null?void 0:b.id].filter(Boolean).join("_"),isPlaceholder:E,placeholderId:E?`${m.filter(I=>I.column===y).length}`:void 0,depth:p,index:m.length});C.subHeaders.push(b),m.push(C)}v.headers.push(b),b.headerGroup=v}),c.push(v),p>0&&u(m,p-1)},d=n.map((f,p)=>nr(t,f,{depth:i,index:p}));u(d,i-1),c.reverse();const g=f=>f.filter(v=>v.column.getIsVisible()).map(v=>{let m=0,b=0,x=[0];v.subHeaders&&v.subHeaders.length?(x=[],g(v.subHeaders).forEach(y=>{let{colSpan:E,rowSpan:C}=y;m+=E,x.push(C)})):m=1;const R=Math.min(...x);return b=b+R,v.colSpan=m,v.rowSpan=b,{colSpan:m,rowSpan:b}});return g((o=(a=c[0])==null?void 0:a.headers)!=null?o:[]),c}const xa=(e,n,t,r,o,a,i)=>{let l={id:n,index:r,original:t,depth:o,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(l._valuesCache.hasOwnProperty(c))return l._valuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return l._valuesCache[c]=u.accessorFn(l.original,r),l._valuesCache[c]},getUniqueValues:c=>{if(l._uniqueValuesCache.hasOwnProperty(c))return l._uniqueValuesCache[c];const u=e.getColumn(c);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(l._uniqueValuesCache[c]=u.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[c]):(l._uniqueValuesCache[c]=[l.getValue(c)],l._uniqueValuesCache[c])},renderValue:c=>{var u;return(u=l.getValue(c))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>ma(l.subRows,c=>c.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let c=[],u=l;for(;;){const d=u.getParentRow();if(!d)break;c.push(d),u=d}return c.reverse()},getAllCells:Y(()=>[e.getAllLeafColumns()],c=>c.map(u=>ga(e,l,u,u.id)),Z(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:Y(()=>[l.getAllCells()],c=>c.reduce((u,d)=>(u[d.column.id]=d,u),{}),Z(e.options,"debugRows","getAllCellsByColumnId"))};for(let c=0;c<e._features.length;c++){const u=e._features[c];u==null||u.createRow==null||u.createRow(l,e)}return l},ba={createColumn:(e,n)=>{e._getFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():n.getPreFilteredRowModel(),e._getFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},rr=(e,n,t)=>{var r,o;const a=t==null||(r=t.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(n))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(a))};rr.autoRemove=e=>we(e);const or=(e,n,t)=>{var r;return!!(!((r=e.getValue(n))==null||(r=r.toString())==null)&&r.includes(t))};or.autoRemove=e=>we(e);const ar=(e,n,t)=>{var r;return((r=e.getValue(n))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(t==null?void 0:t.toLowerCase())};ar.autoRemove=e=>we(e);const ir=(e,n,t)=>{var r;return(r=e.getValue(n))==null?void 0:r.includes(t)};ir.autoRemove=e=>we(e);const lr=(e,n,t)=>!t.some(r=>{var o;return!((o=e.getValue(n))!=null&&o.includes(r))});lr.autoRemove=e=>we(e)||!(e!=null&&e.length);const sr=(e,n,t)=>t.some(r=>{var o;return(o=e.getValue(n))==null?void 0:o.includes(r)});sr.autoRemove=e=>we(e)||!(e!=null&&e.length);const cr=(e,n,t)=>e.getValue(n)===t;cr.autoRemove=e=>we(e);const ur=(e,n,t)=>e.getValue(n)==t;ur.autoRemove=e=>we(e);const Ft=(e,n,t)=>{let[r,o]=t;const a=e.getValue(n);return a>=r&&a<=o};Ft.resolveFilterValue=e=>{let[n,t]=e,r=typeof n!="number"?parseFloat(n):n,o=typeof t!="number"?parseFloat(t):t,a=n===null||Number.isNaN(r)?-1/0:r,i=t===null||Number.isNaN(o)?1/0:o;if(a>i){const l=a;a=i,i=l}return[a,i]},Ft.autoRemove=e=>we(e)||we(e[0])&&we(e[1]);const Se={includesString:rr,includesStringSensitive:or,equalsString:ar,arrIncludes:ir,arrIncludesAll:lr,arrIncludesSome:sr,equals:cr,weakEquals:ur,inNumberRange:Ft};function we(e){return e==null||e===""}const wa={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:xe("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,n)=>{e.getAutoFilterFn=()=>{const t=n.getCoreRowModel().flatRows[0],r=t==null?void 0:t.getValue(e.id);return typeof r=="string"?Se.includesString:typeof r=="number"?Se.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Se.equals:Array.isArray(r)?Se.arrIncludes:Se.weakEquals},e.getFilterFn=()=>{var t,r;return nt(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(t=(r=n.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?t:Se[e.columnDef.filterFn]},e.getCanFilter=()=>{var t,r,o;return((t=e.columnDef.enableColumnFilter)!=null?t:!0)&&((r=n.options.enableColumnFilters)!=null?r:!0)&&((o=n.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var t;return(t=n.getState().columnFilters)==null||(t=t.find(r=>r.id===e.id))==null?void 0:t.value},e.getFilterIndex=()=>{var t,r;return(t=(r=n.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?t:-1},e.setFilterValue=t=>{n.setColumnFilters(r=>{const o=e.getFilterFn(),a=r==null?void 0:r.find(d=>d.id===e.id),i=Ee(t,a?a.value:void 0);if(dr(o,i,e)){var l;return(l=r==null?void 0:r.filter(d=>d.id!==e.id))!=null?l:[]}const c={id:e.id,value:i};if(a){var u;return(u=r==null?void 0:r.map(d=>d.id===e.id?c:d))!=null?u:[]}return r!=null&&r.length?[...r,c]:[c]})}},createRow:(e,n)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=n=>{const t=e.getAllLeafColumns(),r=o=>{var a;return(a=Ee(n,o))==null?void 0:a.filter(i=>{const l=t.find(c=>c.id===i.id);if(l){const c=l.getFilterFn();if(dr(c,i.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=n=>{var t,r;e.setColumnFilters(n?[]:(t=(r=e.initialState)==null?void 0:r.columnFilters)!=null?t:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function dr(e,n,t){return(e&&e.autoRemove?e.autoRemove(n,t):!1)||typeof n>"u"||typeof n=="string"&&!n}const At={sum:(e,n,t)=>t.reduce((r,o)=>{const a=o.getValue(e);return r+(typeof a=="number"?a:0)},0),min:(e,n,t)=>{let r;return t.forEach(o=>{const a=o.getValue(e);a!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}),r},max:(e,n,t)=>{let r;return t.forEach(o=>{const a=o.getValue(e);a!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}),r},extent:(e,n,t)=>{let r,o;return t.forEach(a=>{const i=a.getValue(e);i!=null&&(r===void 0?i>=i&&(r=o=i):(r>i&&(r=i),o<i&&(o=i)))}),[r,o]},mean:(e,n)=>{let t=0,r=0;if(n.forEach(o=>{let a=o.getValue(e);a!=null&&(a=+a)>=a&&(++t,r+=a)}),t)return r/t},median:(e,n)=>{if(!n.length)return;const t=n.map(a=>a.getValue(e));if(!fa(t))return;if(t.length===1)return t[0];const r=Math.floor(t.length/2),o=t.sort((a,i)=>a-i);return t.length%2!==0?o[r]:(o[r-1]+o[r])/2},unique:(e,n)=>Array.from(new Set(n.map(t=>t.getValue(e))).values()),uniqueCount:(e,n)=>new Set(n.map(t=>t.getValue(e))).size,count:(e,n)=>n.length},ya={getDefaultColumnDef:()=>({aggregatedCell:e=>{var n,t;return(n=(t=e.getValue())==null||t.toString==null?void 0:t.toString())!=null?n:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:xe("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,n)=>{e.toggleGrouping=()=>{n.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(r=>r!==e.id):[...t??[],e.id])},e.getCanGroup=()=>{var t,r;return((t=e.columnDef.enableGrouping)!=null?t:!0)&&((r=n.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.includes(e.id)},e.getGroupedIndex=()=>{var t;return(t=n.getState().grouping)==null?void 0:t.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const t=n.getCoreRowModel().flatRows[0],r=t==null?void 0:t.getValue(e.id);if(typeof r=="number")return At.sum;if(Object.prototype.toString.call(r)==="[object Date]")return At.extent},e.getAggregationFn=()=>{var t,r;if(!e)throw new Error;return nt(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(t=(r=n.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?t:At[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=n=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(n),e.resetGrouping=n=>{var t,r;e.setGrouping(n?[]:(t=(r=e.initialState)==null?void 0:r.grouping)!=null?t:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,n)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=t=>{if(e._groupingValuesCache.hasOwnProperty(t))return e._groupingValuesCache[t];const r=n.getColumn(t);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[t]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[t]):e.getValue(t)},e._groupingValuesCache={}},createCell:(e,n,t,r)=>{e.getIsGrouped=()=>n.getIsGrouped()&&n.id===t.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&n.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=t.subRows)!=null&&o.length)}}};function Ca(e,n,t){if(!(n!=null&&n.length)||!t)return e;const r=e.filter(a=>!n.includes(a.id));return t==="remove"?r:[...n.map(a=>e.find(i=>i.id===a)).filter(Boolean),...r]}const Sa={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:xe("columnOrder",e)}),createColumn:(e,n)=>{e.getIndex=Y(t=>[Ve(n,t)],t=>t.findIndex(r=>r.id===e.id),Z(n.options,"debugColumns","getIndex")),e.getIsFirstColumn=t=>{var r;return((r=Ve(n,t)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=t=>{var r;const o=Ve(n,t);return((r=o[o.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=n=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(n),e.resetColumnOrder=n=>{var t;e.setColumnOrder(n?[]:(t=e.initialState.columnOrder)!=null?t:[])},e._getOrderColumnsFn=Y(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(n,t,r)=>o=>{let a=[];if(!(n!=null&&n.length))a=o;else{const i=[...n],l=[...o];for(;l.length&&i.length;){const c=i.shift(),u=l.findIndex(d=>d.id===c);u>-1&&a.push(l.splice(u,1)[0])}a=[...a,...l]}return Ca(a,t,r)},Z(e.options,"debugTable","_getOrderColumnsFn"))}},Dt=()=>({left:[],right:[]}),ka={getInitialState:e=>({columnPinning:Dt(),...e}),getDefaultOptions:e=>({onColumnPinningChange:xe("columnPinning",e)}),createColumn:(e,n)=>{e.pin=t=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);n.setColumnPinning(o=>{var a,i;if(t==="right"){var l,c;return{left:((l=o==null?void 0:o.left)!=null?l:[]).filter(g=>!(r!=null&&r.includes(g))),right:[...((c=o==null?void 0:o.right)!=null?c:[]).filter(g=>!(r!=null&&r.includes(g))),...r]}}if(t==="left"){var u,d;return{left:[...((u=o==null?void 0:o.left)!=null?u:[]).filter(g=>!(r!=null&&r.includes(g))),...r],right:((d=o==null?void 0:o.right)!=null?d:[]).filter(g=>!(r!=null&&r.includes(g)))}}return{left:((a=o==null?void 0:o.left)!=null?a:[]).filter(g=>!(r!=null&&r.includes(g))),right:((i=o==null?void 0:o.right)!=null?i:[]).filter(g=>!(r!=null&&r.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,a,i;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((a=(i=n.options.enableColumnPinning)!=null?i:n.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{const t=e.getLeafColumns().map(l=>l.id),{left:r,right:o}=n.getState().columnPinning,a=t.some(l=>r==null?void 0:r.includes(l)),i=t.some(l=>o==null?void 0:o.includes(l));return a?"left":i?"right":!1},e.getPinnedIndex=()=>{var t,r;const o=e.getIsPinned();return o?(t=(r=n.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?t:-1:0}},createRow:(e,n)=>{e.getCenterVisibleCells=Y(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left,n.getState().columnPinning.right],(t,r,o)=>{const a=[...r??[],...o??[]];return t.filter(i=>!a.includes(i.column.id))},Z(n.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=Y(()=>[e._getAllVisibleCells(),n.getState().columnPinning.left],(t,r)=>(r??[]).map(a=>t.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),Z(n.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=Y(()=>[e._getAllVisibleCells(),n.getState().columnPinning.right],(t,r)=>(r??[]).map(a=>t.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),Z(n.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=n=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(n),e.resetColumnPinning=n=>{var t,r;return e.setColumnPinning(n?Dt():(t=(r=e.initialState)==null?void 0:r.columnPinning)!=null?t:Dt())},e.getIsSomeColumnsPinned=n=>{var t;const r=e.getState().columnPinning;if(!n){var o,a;return!!((o=r.left)!=null&&o.length||(a=r.right)!=null&&a.length)}return!!((t=r[n])!=null&&t.length)},e.getLeftLeafColumns=Y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(n,t)=>(t??[]).map(r=>n.find(o=>o.id===r)).filter(Boolean),Z(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=Y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(n,t)=>(t??[]).map(r=>n.find(o=>o.id===r)).filter(Boolean),Z(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=Y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(n,t,r)=>{const o=[...t??[],...r??[]];return n.filter(a=>!o.includes(a.id))},Z(e.options,"debugColumns","getCenterLeafColumns"))}},ot={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Nt=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),ja={getDefaultColumnDef:()=>ot,getInitialState:e=>({columnSizing:{},columnSizingInfo:Nt(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:xe("columnSizing",e),onColumnSizingInfoChange:xe("columnSizingInfo",e)}),createColumn:(e,n)=>{e.getSize=()=>{var t,r,o;const a=n.getState().columnSizing[e.id];return Math.min(Math.max((t=e.columnDef.minSize)!=null?t:ot.minSize,(r=a??e.columnDef.size)!=null?r:ot.size),(o=e.columnDef.maxSize)!=null?o:ot.maxSize)},e.getStart=Y(t=>[t,Ve(n,t),n.getState().columnSizing],(t,r)=>r.slice(0,e.getIndex(t)).reduce((o,a)=>o+a.getSize(),0),Z(n.options,"debugColumns","getStart")),e.getAfter=Y(t=>[t,Ve(n,t),n.getState().columnSizing],(t,r)=>r.slice(e.getIndex(t)+1).reduce((o,a)=>o+a.getSize(),0),Z(n.options,"debugColumns","getAfter")),e.resetSize=()=>{n.setColumnSizing(t=>{let{[e.id]:r,...o}=t;return o})},e.getCanResize=()=>{var t,r;return((t=e.columnDef.enableResizing)!=null?t:!0)&&((r=n.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>n.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,n)=>{e.getSize=()=>{let t=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var a;t+=(a=o.column.getSize())!=null?a:0}};return r(e),t},e.getStart=()=>{if(e.index>0){const t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=t=>{const r=n.getColumn(e.column.id),o=r==null?void 0:r.getCanResize();return a=>{if(!r||!o||(a.persist==null||a.persist(),Tt(a)&&a.touches&&a.touches.length>1))return;const i=e.getSize(),l=e?e.getLeafHeaders().map(x=>[x.column.id,x.column.getSize()]):[[r.id,r.getSize()]],c=Tt(a)?Math.round(a.touches[0].clientX):a.clientX,u={},d=(x,R)=>{typeof R=="number"&&(n.setColumnSizingInfo(y=>{var E,C;const I=n.options.columnResizeDirection==="rtl"?-1:1,T=(R-((E=y==null?void 0:y.startOffset)!=null?E:0))*I,H=Math.max(T/((C=y==null?void 0:y.startSize)!=null?C:0),-.999999);return y.columnSizingStart.forEach(A=>{let[X,ae]=A;u[X]=Math.round(Math.max(ae+ae*H,0)*100)/100}),{...y,deltaOffset:T,deltaPercentage:H}}),(n.options.columnResizeMode==="onChange"||x==="end")&&n.setColumnSizing(y=>({...y,...u})))},g=x=>d("move",x),f=x=>{d("end",x),n.setColumnSizingInfo(R=>({...R,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=t||typeof document<"u"?document:null,v={moveHandler:x=>g(x.clientX),upHandler:x=>{p==null||p.removeEventListener("mousemove",v.moveHandler),p==null||p.removeEventListener("mouseup",v.upHandler),f(x.clientX)}},m={moveHandler:x=>(x.cancelable&&(x.preventDefault(),x.stopPropagation()),g(x.touches[0].clientX),!1),upHandler:x=>{var R;p==null||p.removeEventListener("touchmove",m.moveHandler),p==null||p.removeEventListener("touchend",m.upHandler),x.cancelable&&(x.preventDefault(),x.stopPropagation()),f((R=x.touches[0])==null?void 0:R.clientX)}},b=$a()?{passive:!1}:!1;Tt(a)?(p==null||p.addEventListener("touchmove",m.moveHandler,b),p==null||p.addEventListener("touchend",m.upHandler,b)):(p==null||p.addEventListener("mousemove",v.moveHandler,b),p==null||p.addEventListener("mouseup",v.upHandler,b)),n.setColumnSizingInfo(x=>({...x,startOffset:c,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=n=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(n),e.setColumnSizingInfo=n=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(n),e.resetColumnSizing=n=>{var t;e.setColumnSizing(n?{}:(t=e.initialState.columnSizing)!=null?t:{})},e.resetHeaderSizeInfo=n=>{var t;e.setColumnSizingInfo(n?Nt():(t=e.initialState.columnSizingInfo)!=null?t:Nt())},e.getTotalSize=()=>{var n,t;return(n=(t=e.getHeaderGroups()[0])==null?void 0:t.headers.reduce((r,o)=>r+o.getSize(),0))!=null?n:0},e.getLeftTotalSize=()=>{var n,t;return(n=(t=e.getLeftHeaderGroups()[0])==null?void 0:t.headers.reduce((r,o)=>r+o.getSize(),0))!=null?n:0},e.getCenterTotalSize=()=>{var n,t;return(n=(t=e.getCenterHeaderGroups()[0])==null?void 0:t.headers.reduce((r,o)=>r+o.getSize(),0))!=null?n:0},e.getRightTotalSize=()=>{var n,t;return(n=(t=e.getRightHeaderGroups()[0])==null?void 0:t.headers.reduce((r,o)=>r+o.getSize(),0))!=null?n:0}}};let at=null;function $a(){if(typeof at=="boolean")return at;let e=!1;try{const n={get passive(){return e=!0,!1}},t=()=>{};window.addEventListener("test",t,n),window.removeEventListener("test",t)}catch{e=!1}return at=e,at}function Tt(e){return e.type==="touchstart"}const Ra={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:xe("columnVisibility",e)}),createColumn:(e,n)=>{e.toggleVisibility=t=>{e.getCanHide()&&n.setColumnVisibility(r=>({...r,[e.id]:t??!e.getIsVisible()}))},e.getIsVisible=()=>{var t,r;const o=e.columns;return(t=o.length?o.some(a=>a.getIsVisible()):(r=n.getState().columnVisibility)==null?void 0:r[e.id])!=null?t:!0},e.getCanHide=()=>{var t,r;return((t=e.columnDef.enableHiding)!=null?t:!0)&&((r=n.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,n)=>{e._getAllVisibleCells=Y(()=>[e.getAllCells(),n.getState().columnVisibility],t=>t.filter(r=>r.column.getIsVisible()),Z(n.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=Y(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(t,r,o)=>[...t,...r,...o],Z(n.options,"debugRows","getVisibleCells"))},createTable:e=>{const n=(t,r)=>Y(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),Z(e.options,"debugColumns",t));e.getVisibleFlatColumns=n("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=n("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=n("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=n("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=n("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{var r;e.setColumnVisibility(t?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=t=>{var r;t=(r=t)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,a)=>({...o,[a.id]:t||!(a.getCanHide!=null&&a.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(t=>!(t.getIsVisible!=null&&t.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(t=>t.getIsVisible==null?void 0:t.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{var r;e.toggleAllColumnsVisible((r=t.target)==null?void 0:r.checked)}}};function Ve(e,n){return n?n==="center"?e.getCenterVisibleLeafColumns():n==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Ea={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},_a={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:xe("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:n=>{var t;const r=(t=e.getCoreRowModel().flatRows[0])==null||(t=t._getAllCellsByColumnId()[n.id])==null?void 0:t.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,n)=>{e.getCanGlobalFilter=()=>{var t,r,o,a;return((t=e.columnDef.enableGlobalFilter)!=null?t:!0)&&((r=n.options.enableGlobalFilter)!=null?r:!0)&&((o=n.options.enableFilters)!=null?o:!0)&&((a=n.options.getColumnCanGlobalFilter==null?void 0:n.options.getColumnCanGlobalFilter(e))!=null?a:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Se.includesString,e.getGlobalFilterFn=()=>{var n,t;const{globalFilterFn:r}=e.options;return nt(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(n=(t=e.options.filterFns)==null?void 0:t[r])!=null?n:Se[r]},e.setGlobalFilter=n=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(n)},e.resetGlobalFilter=n=>{e.setGlobalFilter(n?void 0:e.initialState.globalFilter)}}},Pa={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:xe("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let n=!1,t=!1;e._autoResetExpanded=()=>{var r,o;if(!n){e._queue(()=>{n=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(t)return;t=!0,e._queue(()=>{e.resetExpanded(),t=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,a;e.setExpanded(r?{}:(o=(a=e.initialState)==null?void 0:a.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{const i=a.split(".");r=Math.max(r,i.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,n)=>{e.toggleExpanded=t=>{n.setExpanded(r=>{var o;const a=r===!0?!0:!!(r!=null&&r[e.id]);let i={};if(r===!0?Object.keys(n.getRowModel().rowsById).forEach(l=>{i[l]=!0}):i=r,t=(o=t)!=null?o:!a,!a&&t)return{...i,[e.id]:!0};if(a&&!t){const{[e.id]:l,...c}=i;return c}return r})},e.getIsExpanded=()=>{var t;const r=n.getState().expanded;return!!((t=n.options.getIsRowExpanded==null?void 0:n.options.getIsRowExpanded(e))!=null?t:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var t,r,o;return(t=n.options.getRowCanExpand==null?void 0:n.options.getRowCanExpand(e))!=null?t:((r=n.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let t=!0,r=e;for(;t&&r.parentId;)r=n.getRow(r.parentId,!0),t=r.getIsExpanded();return t},e.getToggleExpandedHandler=()=>{const t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},zt=0,Ot=10,It=()=>({pageIndex:zt,pageSize:Ot}),Ma={getInitialState:e=>({...e,pagination:{...It(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:xe("pagination",e)}),createTable:e=>{let n=!1,t=!1;e._autoResetPageIndex=()=>{var r,o;if(!n){e._queue(()=>{n=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(t)return;t=!0,e._queue(()=>{e.resetPageIndex(),t=!1})}},e.setPagination=r=>{const o=a=>Ee(r,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?It():(o=e.initialState.pagination)!=null?o:It())},e.setPageIndex=r=>{e.setPagination(o=>{let a=Ee(r,o.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,i)),{...o,pageIndex:a}})},e.resetPageIndex=r=>{var o,a;e.setPageIndex(r?zt:(o=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?o:zt)},e.resetPageSize=r=>{var o,a;e.setPageSize(r?Ot:(o=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?o:Ot)},e.setPageSize=r=>{e.setPagination(o=>{const a=Math.max(1,Ee(r,o.pageSize)),i=o.pageSize*o.pageIndex,l=Math.floor(i/a);return{...o,pageIndex:l,pageSize:a}})},e.setPageCount=r=>e.setPagination(o=>{var a;let i=Ee(r,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...o,pageCount:i}}),e.getPageOptions=Y(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((a,i)=>i)),o},Z(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},Vt=()=>({top:[],bottom:[]}),La={getInitialState:e=>({rowPinning:Vt(),...e}),getDefaultOptions:e=>({onRowPinningChange:xe("rowPinning",e)}),createRow:(e,n)=>{e.pin=(t,r,o)=>{const a=r?e.getLeafRows().map(c=>{let{id:u}=c;return u}):[],i=o?e.getParentRows().map(c=>{let{id:u}=c;return u}):[],l=new Set([...i,e.id,...a]);n.setRowPinning(c=>{var u,d;if(t==="bottom"){var g,f;return{top:((g=c==null?void 0:c.top)!=null?g:[]).filter(m=>!(l!=null&&l.has(m))),bottom:[...((f=c==null?void 0:c.bottom)!=null?f:[]).filter(m=>!(l!=null&&l.has(m))),...Array.from(l)]}}if(t==="top"){var p,v;return{top:[...((p=c==null?void 0:c.top)!=null?p:[]).filter(m=>!(l!=null&&l.has(m))),...Array.from(l)],bottom:((v=c==null?void 0:c.bottom)!=null?v:[]).filter(m=>!(l!=null&&l.has(m)))}}return{top:((u=c==null?void 0:c.top)!=null?u:[]).filter(m=>!(l!=null&&l.has(m))),bottom:((d=c==null?void 0:c.bottom)!=null?d:[]).filter(m=>!(l!=null&&l.has(m)))}})},e.getCanPin=()=>{var t;const{enableRowPinning:r,enablePinning:o}=n.options;return typeof r=="function"?r(e):(t=r??o)!=null?t:!0},e.getIsPinned=()=>{const t=[e.id],{top:r,bottom:o}=n.getState().rowPinning,a=t.some(l=>r==null?void 0:r.includes(l)),i=t.some(l=>o==null?void 0:o.includes(l));return a?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var t,r;const o=e.getIsPinned();if(!o)return-1;const a=(t=o==="top"?n.getTopRows():n.getBottomRows())==null?void 0:t.map(i=>{let{id:l}=i;return l});return(r=a==null?void 0:a.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=n=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(n),e.resetRowPinning=n=>{var t,r;return e.setRowPinning(n?Vt():(t=(r=e.initialState)==null?void 0:r.rowPinning)!=null?t:Vt())},e.getIsSomeRowsPinned=n=>{var t;const r=e.getState().rowPinning;if(!n){var o,a;return!!((o=r.top)!=null&&o.length||(a=r.bottom)!=null&&a.length)}return!!((t=r[n])!=null&&t.length)},e._getPinnedRows=(n,t,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(t??[]).map(i=>{const l=e.getRow(i,!0);return l.getIsAllParentsExpanded()?l:null}):(t??[]).map(i=>n.find(l=>l.id===i))).filter(Boolean).map(i=>({...i,position:r}))},e.getTopRows=Y(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(n,t)=>e._getPinnedRows(n,t,"top"),Z(e.options,"debugRows","getTopRows")),e.getBottomRows=Y(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(n,t)=>e._getPinnedRows(n,t,"bottom"),Z(e.options,"debugRows","getBottomRows")),e.getCenterRows=Y(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(n,t,r)=>{const o=new Set([...t??[],...r??[]]);return n.filter(a=>!o.has(a.id))},Z(e.options,"debugRows","getCenterRows"))}},Fa={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:xe("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=n=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(n),e.resetRowSelection=n=>{var t;return e.setRowSelection(n?{}:(t=e.initialState.rowSelection)!=null?t:{})},e.toggleAllRowsSelected=n=>{e.setRowSelection(t=>{n=typeof n<"u"?n:!e.getIsAllRowsSelected();const r={...t},o=e.getPreGroupedRowModel().flatRows;return n?o.forEach(a=>{a.getCanSelect()&&(r[a.id]=!0)}):o.forEach(a=>{delete r[a.id]}),r})},e.toggleAllPageRowsSelected=n=>e.setRowSelection(t=>{const r=typeof n<"u"?n:!e.getIsAllPageRowsSelected(),o={...t};return e.getRowModel().rows.forEach(a=>{Ht(o,a.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Y(()=>[e.getState().rowSelection,e.getCoreRowModel()],(n,t)=>Object.keys(n).length?Bt(e,t):{rows:[],flatRows:[],rowsById:{}},Z(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=Y(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(n,t)=>Object.keys(n).length?Bt(e,t):{rows:[],flatRows:[],rowsById:{}},Z(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=Y(()=>[e.getState().rowSelection,e.getSortedRowModel()],(n,t)=>Object.keys(n).length?Bt(e,t):{rows:[],flatRows:[],rowsById:{}},Z(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{const n=e.getFilteredRowModel().flatRows,{rowSelection:t}=e.getState();let r=!!(n.length&&Object.keys(t).length);return r&&n.some(o=>o.getCanSelect()&&!t[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const n=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:t}=e.getState();let r=!!n.length;return r&&n.some(o=>!t[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var n;const t=Object.keys((n=e.getState().rowSelection)!=null?n:{}).length;return t>0&&t<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const n=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:n.filter(t=>t.getCanSelect()).some(t=>t.getIsSelected()||t.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>n=>{e.toggleAllRowsSelected(n.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>n=>{e.toggleAllPageRowsSelected(n.target.checked)}},createRow:(e,n)=>{e.toggleSelected=(t,r)=>{const o=e.getIsSelected();n.setRowSelection(a=>{var i;if(t=typeof t<"u"?t:!o,e.getCanSelect()&&o===t)return a;const l={...a};return Ht(l,e.id,t,(i=r==null?void 0:r.selectChildren)!=null?i:!0,n),l})},e.getIsSelected=()=>{const{rowSelection:t}=n.getState();return qt(e,t)},e.getIsSomeSelected=()=>{const{rowSelection:t}=n.getState();return Gt(e,t)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:t}=n.getState();return Gt(e,t)==="all"},e.getCanSelect=()=>{var t;return typeof n.options.enableRowSelection=="function"?n.options.enableRowSelection(e):(t=n.options.enableRowSelection)!=null?t:!0},e.getCanSelectSubRows=()=>{var t;return typeof n.options.enableSubRowSelection=="function"?n.options.enableSubRowSelection(e):(t=n.options.enableSubRowSelection)!=null?t:!0},e.getCanMultiSelect=()=>{var t;return typeof n.options.enableMultiRowSelection=="function"?n.options.enableMultiRowSelection(e):(t=n.options.enableMultiRowSelection)!=null?t:!0},e.getToggleSelectedHandler=()=>{const t=e.getCanSelect();return r=>{var o;t&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},Ht=(e,n,t,r,o)=>{var a;const i=o.getRow(n,!0);t?(i.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),i.getCanSelect()&&(e[n]=!0)):delete e[n],r&&(a=i.subRows)!=null&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(l=>Ht(e,l.id,t,r,o))};function Bt(e,n){const t=e.getState().rowSelection,r=[],o={},a=function(i,l){return i.map(c=>{var u;const d=qt(c,t);if(d&&(r.push(c),o[c.id]=c),(u=c.subRows)!=null&&u.length&&(c={...c,subRows:a(c.subRows)}),d)return c}).filter(Boolean)};return{rows:a(n.rows),flatRows:r,rowsById:o}}function qt(e,n){var t;return(t=n[e.id])!=null?t:!1}function Gt(e,n,t){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,a=!1;return e.subRows.forEach(i=>{if(!(a&&!o)&&(i.getCanSelect()&&(qt(i,n)?a=!0:o=!1),i.subRows&&i.subRows.length)){const l=Gt(i,n);l==="all"?a=!0:(l==="some"&&(a=!0),o=!1)}}),o?"all":a?"some":!1}const Wt=/([0-9]+)/gm,Aa=(e,n,t)=>pr(_e(e.getValue(t)).toLowerCase(),_e(n.getValue(t)).toLowerCase()),Da=(e,n,t)=>pr(_e(e.getValue(t)),_e(n.getValue(t))),Na=(e,n,t)=>Ut(_e(e.getValue(t)).toLowerCase(),_e(n.getValue(t)).toLowerCase()),Ta=(e,n,t)=>Ut(_e(e.getValue(t)),_e(n.getValue(t))),za=(e,n,t)=>{const r=e.getValue(t),o=n.getValue(t);return r>o?1:r<o?-1:0},Oa=(e,n,t)=>Ut(e.getValue(t),n.getValue(t));function Ut(e,n){return e===n?0:e>n?1:-1}function _e(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function pr(e,n){const t=e.split(Wt).filter(Boolean),r=n.split(Wt).filter(Boolean);for(;t.length&&r.length;){const o=t.shift(),a=r.shift(),i=parseInt(o,10),l=parseInt(a,10),c=[i,l].sort();if(isNaN(c[0])){if(o>a)return 1;if(a>o)return-1;continue}if(isNaN(c[1]))return isNaN(i)?-1:1;if(i>l)return 1;if(l>i)return-1}return t.length-r.length}const He={alphanumeric:Aa,alphanumericCaseSensitive:Da,text:Na,textCaseSensitive:Ta,datetime:za,basic:Oa},Ia=[ha,Ra,Sa,ka,ba,wa,Ea,_a,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:xe("sorting",e),isMultiSortEvent:n=>n.shiftKey}),createColumn:(e,n)=>{e.getAutoSortingFn=()=>{const t=n.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of t){const a=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return He.datetime;if(typeof a=="string"&&(r=!0,a.split(Wt).length>1))return He.alphanumeric}return r?He.text:He.basic},e.getAutoSortDir=()=>{const t=n.getFilteredRowModel().flatRows[0];return typeof(t==null?void 0:t.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var t,r;if(!e)throw new Error;return nt(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(t=(r=n.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?t:He[e.columnDef.sortingFn]},e.toggleSorting=(t,r)=>{const o=e.getNextSortingOrder(),a=typeof t<"u"&&t!==null;n.setSorting(i=>{const l=i==null?void 0:i.find(p=>p.id===e.id),c=i==null?void 0:i.findIndex(p=>p.id===e.id);let u=[],d,g=a?t:o==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&r?l?d="toggle":d="add":i!=null&&i.length&&c!==i.length-1?d="replace":l?d="toggle":d="replace",d==="toggle"&&(a||o||(d="remove")),d==="add"){var f;u=[...i,{id:e.id,desc:g}],u.splice(0,u.length-((f=n.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else d==="toggle"?u=i.map(p=>p.id===e.id?{...p,desc:g}:p):d==="remove"?u=i.filter(p=>p.id!==e.id):u=[{id:e.id,desc:g}];return u})},e.getFirstSortDir=()=>{var t,r;return((t=(r=e.columnDef.sortDescFirst)!=null?r:n.options.sortDescFirst)!=null?t:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=t=>{var r,o;const a=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==a&&((r=n.options.enableSortingRemoval)==null||r)&&(!(t&&(o=n.options.enableMultiRemove)!=null)||o)?!1:i==="desc"?"asc":"desc":a},e.getCanSort=()=>{var t,r;return((t=e.columnDef.enableSorting)!=null?t:!0)&&((r=n.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var t,r;return(t=(r=e.columnDef.enableMultiSort)!=null?r:n.options.enableMultiSort)!=null?t:!!e.accessorFn},e.getIsSorted=()=>{var t;const r=(t=n.getState().sorting)==null?void 0:t.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var t,r;return(t=(r=n.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?t:-1},e.clearSorting=()=>{n.setSorting(t=>t!=null&&t.length?t.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const t=e.getCanSort();return r=>{t&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?n.options.isMultiSortEvent==null?void 0:n.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=n=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(n),e.resetSorting=n=>{var t,r;e.setSorting(n?[]:(t=(r=e.initialState)==null?void 0:r.sorting)!=null?t:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},ya,Pa,Ma,La,Fa,ja];function Va(e){var n,t;process.env.NODE_ENV!=="production"&&(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");const r=[...Ia,...(n=e._features)!=null?n:[]];let o={_features:r};const a=o._features.reduce((f,p)=>Object.assign(f,p.getDefaultOptions==null?void 0:p.getDefaultOptions(o)),{}),i=f=>o.options.mergeOptions?o.options.mergeOptions(a,f):{...a,...f};let c={...{},...(t=e.initialState)!=null?t:{}};o._features.forEach(f=>{var p;c=(p=f.getInitialState==null?void 0:f.getInitialState(c))!=null?p:c});const u=[];let d=!1;const g={_features:r,options:{...a,...e},initialState:c,_queue:f=>{u.push(f),d||(d=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();d=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{o.setState(o.initialState)},setOptions:f=>{const p=Ee(f,o.options);o.options=i(p)},getState:()=>o.options.state,setState:f=>{o.options.onStateChange==null||o.options.onStateChange(f)},_getRowId:(f,p,v)=>{var m;return(m=o.options.getRowId==null?void 0:o.options.getRowId(f,p,v))!=null?m:`${v?[v.id,p].join("."):p}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(f,p)=>{let v=(p?o.getPrePaginationRowModel():o.getRowModel()).rowsById[f];if(!v&&(v=o.getCoreRowModel().rowsById[f],!v))throw process.env.NODE_ENV!=="production"?new Error(`getRow could not find row with ID: ${f}`):new Error;return v},_getDefaultColumnDef:Y(()=>[o.options.defaultColumn],f=>{var p;return f=(p=f)!=null?p:{},{header:v=>{const m=v.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:v=>{var m,b;return(m=(b=v.renderValue())==null||b.toString==null?void 0:b.toString())!=null?m:null},...o._features.reduce((v,m)=>Object.assign(v,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...f}},Z(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>o.options.columns,getAllColumns:Y(()=>[o._getColumnDefs()],f=>{const p=function(v,m,b){return b===void 0&&(b=0),v.map(x=>{const R=va(o,x,b,m),y=x;return R.columns=y.columns?p(y.columns,R,b+1):[],R})};return p(f)},Z(e,"debugColumns","getAllColumns")),getAllFlatColumns:Y(()=>[o.getAllColumns()],f=>f.flatMap(p=>p.getFlatColumns()),Z(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:Y(()=>[o.getAllFlatColumns()],f=>f.reduce((p,v)=>(p[v.id]=v,p),{}),Z(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:Y(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(f,p)=>{let v=f.flatMap(m=>m.getLeafColumns());return p(v)},Z(e,"debugColumns","getAllLeafColumns")),getColumn:f=>{const p=o._getAllFlatColumnsById()[f];return process.env.NODE_ENV!=="production"&&!p&&console.error(`[Table] Column with id '${f}' does not exist.`),p}};Object.assign(o,g);for(let f=0;f<o._features.length;f++){const p=o._features[f];p==null||p.createTable==null||p.createTable(o)}return o}function Ha(){return e=>Y(()=>[e.options.data],n=>{const t={rows:[],flatRows:[],rowsById:{}},r=function(o,a,i){a===void 0&&(a=0);const l=[];for(let u=0;u<o.length;u++){const d=xa(e,e._getRowId(o[u],u,i),o[u],u,a,void 0,i==null?void 0:i.id);if(t.flatRows.push(d),t.rowsById[d.id]=d,l.push(d),e.options.getSubRows){var c;d.originalSubRows=e.options.getSubRows(o[u],u),(c=d.originalSubRows)!=null&&c.length&&(d.subRows=r(d.originalSubRows,a+1,d))}}return l};return t.rows=r(n),t},Z(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}/**
|
|
111
111
|
* react-table
|
|
112
112
|
*
|
|
113
113
|
* Copyright (c) TanStack
|
|
@@ -116,20 +116,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
116
116
|
* LICENSE.md file in the root directory of this source tree.
|
|
117
117
|
*
|
|
118
118
|
* @license MIT
|
|
119
|
-
*/function
|
|
119
|
+
*/function Ba(e){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[t]=$.useState(()=>({current:Va(n)})),[r,o]=$.useState(()=>t.current.initialState);return t.current.setOptions(a=>({...a,...e,state:{...r,...e.state},onStateChange:i=>{o(i),e.onStateChange==null||e.onStateChange(i)}})),t.current}const qa={h1:"text-5xl font-bold",h2:"text-4xl font-bold",h3:"text-3xl font-bold",h4:"text-2xl font-semibold",h5:"text-xl font-semibold",h6:"text-lg font-semibold",subtitle1:"text-base font-medium",subtitle2:"text-sm font-normal",body1:"text-base",body2:"text-sm",caption:"text-xs",overline:"text-xs uppercase tracking-wide"},Ga={default:"text-color-gray-800",primary:"text-color-primary",secondary:"text-color-secondary",accent:"text-color-accent",muted:"text-color-gray-400",error:"text-color-red-500",success:"text-color-green-500"},fr=({variant:e="body1",component:n,className:t="",children:r,color:o=""})=>{const i=n||{h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"p",subtitle2:"p",body1:"p",body2:"p",caption:"span",overline:"span"}[e]||"p";return s.jsx(i,{className:`${qa[e]} ${Ga[o]} ${t}`,children:r})},Ce=({variant:e="filled",color:n="blue",icon:t,onClick:r,className:o="",disabled:a=!1,roundedFull:i=!1,size:l="medium",autoFocus:c=!1,...u})=>{var p;const d=w.useRef(null),g=v=>{const m=d.current;if(!m)return;const b=document.createElement("span"),x=m.getBoundingClientRect(),R=Math.max(x.width,x.height);b.style.width=b.style.height=`${R}px`,b.style.left=`${v.clientX-x.left-R/2}px`,b.style.top=`${v.clientY-x.top-R/2}px`,b.className="ripple_small",m.appendChild(b),setTimeout(()=>b.remove(),600),r==null||r(v)},f=((p=me[n])==null?void 0:p[e==="filled"?"filled":e==="outlined"?"outline":"transparent"])||"";return s.jsx("button",{ref:d,type:"button",disabled:a,onClick:g,className:`relative overflow-hidden flex items-center justify-center gap-1 transition-all focus:outline-0
|
|
120
120
|
${f}
|
|
121
121
|
${e==="outlined"&&"border"}
|
|
122
122
|
${o}
|
|
123
123
|
${l==="small"?"text-sm size-8":l==="large"?"text-lg size-12":"text-base size-10"}
|
|
124
124
|
${i?"rounded-full":"rounded-md"}
|
|
125
125
|
${a?`!text-color-gray-400 hover:bg-color-transparent ${e==="filled"&&"!bg-color-gray-200"} !border-color-gray-200 cursor-not-allowed`:"cursor-pointer hover:opacity-90"}
|
|
126
|
-
`,autoFocus:c,...u,children:t&&s.jsx(s.Fragment,{children:t})})},mr=({total:e,currentPage:n,pageSize:t=10,onPageChange:r,hideEdgeButtons:o=!1,className:a=""})=>{const i=Math.ceil(e/t),l=n===1,c=n===i;return i<=1?null:s.jsxs("div",{className:`flex items-center space-x-1 ${a}`,children:[!o&&s.jsx(Ce,{color:"dark",icon:s.jsx("svg",{className:"size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M4.83582 12L11.0429 18.2071L12.4571 16.7929L7.66424 12L12.4571 7.20712L11.0429 5.79291L4.83582 12ZM10.4857 12L16.6928 18.2071L18.107 16.7929L13.3141 12L18.107 7.20712L16.6928 5.79291L10.4857 12Z"})}),onClick:()=>r(1),disabled:l,roundedFull:!0,size:"small",variant:"transparent"}),s.jsx(Ce,{color:"dark",icon:s.jsx("svg",{className:"size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z"})}),onClick:()=>r(n-1),disabled:l,roundedFull:!0,size:"small",variant:"transparent"}),s.jsxs("span",{className:"text-sm text-color-gray-800",children:["Page ",n," of ",i]}),s.jsx(Ce,{color:"dark",icon:s.jsx("svg",{className:"size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"})}),onClick:()=>r(n+1),disabled:c,roundedFull:!0,size:"small",variant:"transparent"}),!o&&s.jsx(Ce,{color:"dark",icon:s.jsx("svg",{className:"size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M19.1642 12L12.9571 5.79291L11.5429 7.20712L16.3358 12L11.5429 16.7929L12.9571 18.2071L19.1642 12ZM13.5143 12L7.30722 5.79291L5.89301 7.20712L10.6859 12L5.89301 16.7929L7.30722 18.2071L13.5143 12Z"})}),onClick:()=>r(i),disabled:c,roundedFull:!0,size:"small",variant:"transparent"})]})},
|
|
126
|
+
`,autoFocus:c,...u,children:t&&s.jsx(s.Fragment,{children:t})})},mr=({total:e,currentPage:n,pageSize:t=10,onPageChange:r,hideEdgeButtons:o=!1,className:a=""})=>{const i=Math.ceil(e/t),l=n===1,c=n===i;return i<=1?null:s.jsxs("div",{className:`flex items-center space-x-1 ${a}`,children:[!o&&s.jsx(Ce,{color:"dark",icon:s.jsx("svg",{className:"size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M4.83582 12L11.0429 18.2071L12.4571 16.7929L7.66424 12L12.4571 7.20712L11.0429 5.79291L4.83582 12ZM10.4857 12L16.6928 18.2071L18.107 16.7929L13.3141 12L18.107 7.20712L16.6928 5.79291L10.4857 12Z"})}),onClick:()=>r(1),disabled:l,roundedFull:!0,size:"small",variant:"transparent"}),s.jsx(Ce,{color:"dark",icon:s.jsx("svg",{className:"size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z"})}),onClick:()=>r(n-1),disabled:l,roundedFull:!0,size:"small",variant:"transparent"}),s.jsxs("span",{className:"text-sm text-color-gray-800",children:["Page ",n," of ",i]}),s.jsx(Ce,{color:"dark",icon:s.jsx("svg",{className:"size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"})}),onClick:()=>r(n+1),disabled:c,roundedFull:!0,size:"small",variant:"transparent"}),!o&&s.jsx(Ce,{color:"dark",icon:s.jsx("svg",{className:"size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M19.1642 12L12.9571 5.79291L11.5429 7.20712L16.3358 12L11.5429 16.7929L12.9571 18.2071L19.1642 12ZM13.5143 12L7.30722 5.79291L5.89301 7.20712L10.6859 12L5.89301 16.7929L7.30722 18.2071L13.5143 12Z"})}),onClick:()=>r(i),disabled:c,roundedFull:!0,size:"small",variant:"transparent"})]})},Wa=({data:e,columns:n=[],pageSize:t,pageIndex:r,onPageSizeChange:o,onPageChange:a,rowOptionArray:i=[5,10,15],totalRecords:l=e.length,className:c="",paginationClassName:u="",tdClassName:d="",thClassName:g=""})=>{const f=Ba({data:e,columns:n,getCoreRowModel:Ha(),manualPagination:!0,pageCount:Math.ceil(l/t),state:{pagination:{pageIndex:r,pageSize:t}}});return s.jsx(s.Fragment,{children:s.jsxs("div",{className:`relative overflow-y-auto flex flex-col ${c} `,children:[s.jsxs("table",{className:"w-full relative border-collapse",children:[s.jsx("thead",{className:"sticky top-0 left-0 rounded-xl bg-color-[#FAFBFB] z-10 h-10",children:f.getHeaderGroups().map(p=>s.jsx("tr",{children:p.headers.map(v=>s.jsx("th",{className:`bg-color-[#FAFBFB] p-2 text-left text-xs font-semibold text-color-gray-500 border-b border-color-gray-200 ${g}`,children:v.isPlaceholder?null:v.column.columnDef.header instanceof Function?v.column.columnDef.header(v.getContext()):v.column.columnDef.header},v.id))},p.id))}),s.jsx("tbody",{className:"",children:f.getRowModel().rows.map(p=>s.jsx("tr",{className:"border-b border-color-gray-200",children:p.getVisibleCells().map(v=>s.jsx("td",{className:`px-2 py-4 font-normal text-sm text-color-gray-800 ${d}`,children:v.column.columnDef.cell instanceof Function?v.column.columnDef.cell(v.getContext()):v.getValue()},v.id))},p.id))})]}),s.jsxs("div",{className:`w-full py-4 px-2 border-t border-color-gray-200 bg-color-[#FAFBFB] flex justify-between items-center ${u} sticky bottom-0 z-10`,children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(fr,{variant:"body2",className:"hidden md:flex",children:"Rows per page"}),s.jsx(Jn,{options:i,selectedValue:t,placementTop:!0,onChange:p=>{o(p),a(0)}})]}),s.jsx(mr,{total:l,pageSize:t,currentPage:r+1,onPageChange:p=>a(p-1)})]})]})})},Ua=({animation:e="pulse",variant:n="rectangular",width:t,height:r,className:o=""})=>{const a="bg-color-gray-200 dark:bg-color-gray-700",i={pulse:"animate-pulse",wave:"relative overflow-hidden"},l=()=>{switch(n){case"circular":return{classes:"rounded-full",defaultWidth:40,defaultHeight:40};case"rectangular":return{classes:"",defaultWidth:200,defaultHeight:100};case"rounded":return{classes:"rounded-lg",defaultWidth:200,defaultHeight:100};case"text":return{classes:"rounded-sm",defaultWidth:void 0,defaultHeight:16};default:return{classes:"",defaultWidth:200,defaultHeight:100}}},{classes:c,defaultWidth:u,defaultHeight:d}=l(),g=t??u,f=r??d,p={};g!==void 0&&(p.width=`${g}px`),f!==void 0&&(p.height=`${f}px`),n==="text"&&t===void 0&&(p.width="100%");const v=[a,c,i[e],o].filter(Boolean).join(" ");return s.jsx("div",{className:v,style:p,children:e==="wave"&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-[linear-gradient(90deg,_rgba(255,_255,_255,_0)_0%,_rgba(255,_255,_255,_0.35)_50%,_rgba(255,_255,_255,_0)_100%)] dark:bg-gradient-[linear-gradient(90deg,_rgba(255,_255,_255,_0)_0%,_rgba(255,_255,_255,_0.1)_50%,_rgba(255,_255,_255,_0)_100%)]",style:{animation:"skeleton-wave 2s ease-in-out infinite"}}),s.jsx("style",{children:`
|
|
127
127
|
@keyframes skeleton-wave {
|
|
128
128
|
0% { transform: translateX(-100%); }
|
|
129
129
|
50% { transform: translateX(100%); }
|
|
130
130
|
100% { transform: translateX(100%); }
|
|
131
131
|
}
|
|
132
|
-
`})]})})},
|
|
132
|
+
`})]})})},Ya=({label:e,error:n,className:t="",inputClass:r="",labelClass:o="",...a})=>s.jsxs("div",{className:`flex flex-col gap-1 ${t}`,children:[e&&s.jsx("label",{className:`text-sm font-medium ${o}`,children:e}),s.jsx("textarea",{className:`border border-color-gray-300 rounded-md px-3 py-2 resize-none focus:ring-1 focus:outline-none ${r}`,...a}),n&&s.jsx("span",{className:"text-xs text-color-red-500",children:n})]}),gr={small:{track:"h-1",thumb:"w-3 h-3"},medium:{track:"h-2",thumb:"w-4 h-4"},large:{track:"h-3",thumb:"w-5 h-5"}};function Za(e){const n=w.useRef(null),t=w.useRef(null),r=w.useRef(null),o=(c,u)=>{if(c===u)return!0;if(Array.isArray(c)&&Array.isArray(u)){if(c.length!==u.length)return!1;for(let d=0;d<c.length;d++)if(c[d]!==u[d])return!1;return!0}return!1},a=w.useCallback(c=>{e&&(o(c,r.current)||(r.current=c,e(c)))},[e]),i=w.useCallback(c=>{t.current=c,n.current==null&&(n.current=requestAnimationFrame(()=>{n.current=null,t.current!=null&&a(t.current)}))},[a]),l=w.useCallback(()=>{n.current!=null&&cancelAnimationFrame(n.current),n.current=null},[]);return{schedule:i,flush:a,cancel:l,last:t}}const Ka=w.memo(function({value:n,defaultValue:t,onChange:r,onChangeEnd:o,min:a=0,max:i=100,step:l=1,color:c="blue",size:u="medium",disabled:d=!1,className:g="",showValue:f=!0,showMarks:p=!1,marks:v=[],range:m=!1,minDistance:b=0}){const x=n!==void 0,[R,y]=w.useState(()=>t!==void 0?t:m?[a,i]:a),E=x?n:R,C=Array.isArray(E)?E[0]:E,[I,T]=Array.isArray(E)?E:[E,E],H=Ue[c]||Ue.blue,A=gr[u]??gr.medium,X=w.useCallback(_=>(_-a)/(i-a)*100,[a,i]),ae=X(C),se=X(I),ee=X(T),q=w.useCallback(_=>Math.max(a,Math.min(i,_)),[a,i]),K=w.useCallback(_=>Math.round(_/l)*l,[l]),O=Za(r),ne=w.useCallback((_,Q=!0)=>{x||y(_),Q?O.schedule(_):O.flush(_)},[x,O]),ue=w.useCallback(()=>{const _=O.last.current;_!=null&&(O.flush(_),o==null||o(_))},[O,o]),J=w.useCallback((_,Q)=>{if(m&&Array.isArray(_)){let[te,ce]=_,de=K(q(te)),he=K(q(ce));return he-de<b&&(Q==="min"?he=q(de+b):Q==="max"&&(de=q(he-b))),de>he&&(Q==="min"?de=he:he=de),[de,he]}else if(!m&&typeof _=="number")return K(q(_));return _},[m,q,K,b]),h=w.useRef(null),S=w.useCallback(_=>{var ce;const Q=(ce=h.current)==null?void 0:ce.getBoundingClientRect();if(!Q)return m?a:C;const te=Math.max(0,Math.min(1,(_-Q.left)/Q.width));return a+te*(i-a)},[a,i,m,C]),F=w.useCallback(_=>{const Q=Math.abs(_-I),te=Math.abs(_-T);return Q<=te?"min":"max"},[I,T]),[L,N]=w.useState(null),[V,z]=w.useState(null),[P,M]=w.useState(null),G=w.useCallback((_,Q)=>{var ce,de;if(d)return;_.preventDefault(),(de=(ce=_.currentTarget).setPointerCapture)==null||de.call(ce,_.pointerId),M(_.pointerId);const te=S(_.clientX);if(m){const he=Q||F(te);N(he),ne(he==="min"?J([te,T],"min"):J([I,te],"max"))}else N("single"),ne(J(te,"single"))},[d,m,S,F,J,I,T,ne]),W=w.useCallback(_=>{if(d||P==null||L==null)return;const Q=S(_.clientX);m?L==="min"?ne(J([Q,T],"min")):L==="max"&&ne(J([I,Q],"max")):ne(J(Q,"single"))},[d,P,L,m,S,J,I,T,ne]),k=w.useCallback(()=>{L!=null&&(N(null),M(null),ue())},[L,ue]),j=w.useCallback((_,Q)=>{if(d)return;const te=m?Q==="min"?I:T:C;let ce=te;const de=(i-a)/10;switch(_.key){case"ArrowLeft":case"ArrowDown":ce=te-l;break;case"ArrowRight":case"ArrowUp":ce=te+l;break;case"PageDown":ce=te-de;break;case"PageUp":ce=te+de;break;case"Home":ce=a;break;case"End":ce=i;break;default:return}_.preventDefault(),ne(m?Q==="min"?J([ce,T],"min"):J([I,ce],"max"):J(ce,"single"),!1),o==null||o(x?n:E)},[d,m,C,I,T,l,a,i,J,ne,o,x,n,E]);return w.useEffect(()=>{if(!L)return;const _=document.body.style.userSelect;return document.body.style.userSelect="none",()=>{document.body.style.userSelect=_}},[L]),s.jsx("div",{className:`w-full ${g}`,children:s.jsxs("div",{className:"relative flex items-center",children:[m&&s.jsx("div",{className:"mr-3 text-sm font-medium text-color-gray-700 dark:text-color-gray-200 min-w-[2rem]",children:s.jsx("div",{className:"range-min",children:s.jsx("div",{children:I})})}),s.jsxs("div",{className:"w-full",children:[s.jsxs("div",{ref:h,className:`
|
|
133
133
|
relative w-full ${A.track} ${H.track} rounded-full
|
|
134
134
|
${d?"opacity-60 cursor-not-allowed":"cursor-pointer"}
|
|
135
135
|
`,onPointerDown:_=>G(_),onPointerMove:W,onPointerUp:k,onPointerCancel:k,children:[m?s.jsx("div",{className:`absolute top-0 ${A.track} ${H.progress} rounded-full ${L?"":"transition-all duration-150"}`,style:{left:`${se}%`,width:`${ee-se}%`}}):s.jsx("div",{className:`absolute top-0 left-0 ${A.track} ${H.progress} rounded-full ${L?"":"transition-all duration-150"}`,style:{width:`${ae}%`}}),p&&v.map((_,Q)=>{const te=X(_.value);return s.jsx("div",{className:"absolute top-1/2 transform -translate-y-1/2 w-1 h-1 bg-gray-400 rounded-full",style:{left:`${te}%`}},Q)}),!m&&s.jsx("div",{className:`
|
|
@@ -153,19 +153,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
153
153
|
${L==="max"?"cursor-grabbing scale-110 z-20":L?"":"transition-all duration-150"}
|
|
154
154
|
${V==="max"?"ring-2 ring-offset-1 ring-blue-300":""}
|
|
155
155
|
shadow-md hover:shadow-lg focus:outline-none dark:shadow-none
|
|
156
|
-
`,style:{left:`${ee}%`},tabIndex:d?-1:0,role:"slider","aria-orientation":"horizontal","aria-valuemin":a,"aria-valuemax":i,"aria-valuenow":T,"aria-disabled":d,"aria-label":"Maximum value",onKeyDown:_=>j(_,"max"),onFocus:()=>z("max"),onBlur:()=>z(null),onPointerDown:_=>G(_,"max")})]})]}),p&&v.length>0&&s.jsx("div",{className:"relative mt-2 text-xs text-color-gray-500 dark:text-color-gray-200",children:v.map((_,Q)=>{const te=X(_.value);return s.jsx("div",{className:"absolute transform -translate-x-1/2 text-xs",style:{left:`${te}%`},children:_.label||_.value},Q)})})]}),f&&s.jsx("div",{className:"ml-3 text-sm font-medium text-color-gray-700 dark:text-color-gray-200 min-w-[2rem] text-right",children:m?s.jsx("div",{className:"range-max",children:s.jsx("div",{children:T})}):s.jsx("span",{children:C})})]})})}),
|
|
157
|
-
${u(r)} ${d} ${l}`,role:"alert","aria-live":"assertive","aria-atomic":"true",children:[s.jsx("span",{className:"flex-1 text-sm font-medium leading-relaxed",children:n}),s.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[i&&s.jsx("div",{className:"flex items-center",children:i}),a&&s.jsx(Ce,{color:"light",size:"small",icon:s.jsx("svg",{className:"size-6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z"})}),onClick:c,roundedFull:!0,className:"hover:!bg-color-white/10 -mr-1",variant:"transparent"})]})]})]}):null},
|
|
156
|
+
`,style:{left:`${ee}%`},tabIndex:d?-1:0,role:"slider","aria-orientation":"horizontal","aria-valuemin":a,"aria-valuemax":i,"aria-valuenow":T,"aria-disabled":d,"aria-label":"Maximum value",onKeyDown:_=>j(_,"max"),onFocus:()=>z("max"),onBlur:()=>z(null),onPointerDown:_=>G(_,"max")})]})]}),p&&v.length>0&&s.jsx("div",{className:"relative mt-2 text-xs text-color-gray-500 dark:text-color-gray-200",children:v.map((_,Q)=>{const te=X(_.value);return s.jsx("div",{className:"absolute transform -translate-x-1/2 text-xs",style:{left:`${te}%`},children:_.label||_.value},Q)})})]}),f&&s.jsx("div",{className:"ml-3 text-sm font-medium text-color-gray-700 dark:text-color-gray-200 min-w-[2rem] text-right",children:m?s.jsx("div",{className:"range-max",children:s.jsx("div",{children:T})}):s.jsx("span",{children:C})})]})})}),Xa=({open:e=!1,message:n,autoHideDuration:t=4e3,position:r="bottom-center",color:o="dark",onClose:a,action:i,className:l=""})=>{var g;w.useEffect(()=>{if(e&&t>0&&a){const f=setTimeout(()=>{a()},t);return()=>clearTimeout(f)}},[e,t,a]),w.useEffect(()=>{const f=p=>{p.key==="Escape"&&e&&a&&a()};if(e)return document.addEventListener("keydown",f),()=>document.removeEventListener("keydown",f)},[e,a]);const c=w.useCallback(()=>{a&&a()},[a]),u=f=>{const p="fixed z-50 transform transition-all duration-300 ease-in-out";switch(f){case"top-center":return`${p} top-4 left-1/2 -translate-x-1/2 ${e?"translate-y-0 opacity-100":"-translate-y-full opacity-0"}`;case"top-left":return`${p} top-4 left-4 ${e?"translate-y-0 opacity-100":"-translate-y-full opacity-0"}`;case"top-right":return`${p} top-4 right-4 ${e?"translate-y-0 opacity-100":"-translate-y-full opacity-0"}`;case"bottom-left":return`${p} bottom-4 left-4 ${e?"translate-y-0 opacity-100":"translate-y-full opacity-0"}`;case"bottom-right":return`${p} bottom-4 right-4 ${e?"translate-y-0 opacity-100":"translate-y-full opacity-0"}`;case"bottom-center":default:return`${p} bottom-4 left-1/2 -translate-x-1/2 ${e?"translate-y-0 opacity-100":"translate-y-full opacity-0"}`}},d=(g=me[o])==null?void 0:g.filled;return e?s.jsxs(s.Fragment,{children:[e&&s.jsx("div",{className:"fixed inset-0 z-40 bg-color-black/10 backdrop-blur-[1px] md:hidden",onClick:c}),s.jsxs("div",{className:`min-w-72 max-w-lg mx-4 px-4 py-2 rounded-lg shadow-xl flex items-center justify-between gap-3 backdrop-blur-sm border border-color-white/20
|
|
157
|
+
${u(r)} ${d} ${l}`,role:"alert","aria-live":"assertive","aria-atomic":"true",children:[s.jsx("span",{className:"flex-1 text-sm font-medium leading-relaxed",children:n}),s.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[i&&s.jsx("div",{className:"flex items-center",children:i}),a&&s.jsx(Ce,{color:"light",size:"small",icon:s.jsx("svg",{className:"size-6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z"})}),onClick:c,roundedFull:!0,className:"hover:!bg-color-white/10 -mr-1",variant:"transparent"})]})]})]}):null},Ja=({variant:e="linear",value:n=0,color:t="blue",determinate:r=!0,className:o="",...a})=>{var g,f;const i="inline-block",l=(g=me[t])==null?void 0:g.transparent,c=(f=me[t])==null?void 0:f.filled,u=Math.min(Math.max(n,0),100);if(e==="circular"){const{size:p=40,thickness:v=3.6}=a,m=(p-v)/2,b=2*Math.PI*m,x=`${b} ${b}`,R=b-u/100*b;return s.jsx("div",{className:`${i} ${o}`,style:{width:p,height:p},role:"progressbar","aria-valuenow":r?u:void 0,"aria-valuemin":0,"aria-valuemax":100,children:s.jsxs("svg",{className:"transform -rotate-90",width:p,height:p,viewBox:`0 0 ${p} ${p}`,children:[s.jsx("circle",{cx:p/2,cy:p/2,r:m,stroke:"currentColor",strokeWidth:v,fill:"none",className:"text-color-gray-200 dark:text-color-gray-700"}),s.jsx("circle",{cx:p/2,cy:p/2,r:m,stroke:"currentColor",strokeWidth:v,fill:"none",strokeLinecap:"round",className:`${l} transition-all duration-300 ease-out ${r?"":"animate-spin"}`,style:{strokeDasharray:x,strokeDashoffset:r?R:b*.75,transformOrigin:"center"}})]})})}const{thickness:d=4}=a;return s.jsx("div",{className:`${i} w-full ${o}`,role:"progressbar","aria-valuenow":r?u:void 0,"aria-valuemin":0,"aria-valuemax":100,children:s.jsx("div",{className:"w-full bg-color-gray-200 dark:bg-color-gray-700 rounded-full overflow-hidden relative",style:{height:`${d}px`},children:r?s.jsx("div",{className:`h-full ${c} transition-all duration-300 ease-out`,style:{width:`${u}%`}}):s.jsx("div",{className:`absolute left-0 top-0 h-full ${c} animate-progress-indeterminate`,style:{width:"40%"}})})})},vr=s.jsx("svg",{className:"w-5 h-5 fill-color-yellow-500",fill:"currentColor",viewBox:"0 0 20 20",children:s.jsx("path",{d:"M10 15l-5.878 3.09 1.122-6.545L.488 6.91l6.561-.955L10 0l2.951 5.955 6.561.955-4.756 4.635 1.122 6.545z"})}),hr=s.jsx("svg",{className:"w-5 h-5 fill-color-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 20 20",children:s.jsx("path",{d:"M10 15l-5.878 3.09 1.122-6.545L.488 6.91l6.561-.955L10 0l2.951 5.955 6.561.955-4.756 4.635 1.122 6.545z"})}),it={small:"w-4 h-4",medium:"w-6 h-6",large:"w-8 h-8"},Qa=({value:e,onChange:n,readOnly:t=!1,disabled:r=!1,precision:o=1,max:a=5,size:i="medium",icon:l,emptyIcon:c,className:u="",showHoverValue:d=!1,showValue:g=!1,labels:f={}})=>{const[p,v]=w.useState(null),m=(y,E)=>{if(t||r||!n)return;const{left:C,width:I}=y.target.getBoundingClientRect(),T=(y.clientX-C)/I;let H=E-1+Math.ceil(T/o)*o;H=Math.min(a,Math.max(o,Math.round(H/o)*o)),n(H)},b=(y,E)=>{if(t||r)return;const{left:C,width:I}=y.target.getBoundingClientRect(),T=(y.clientX-C)/I;let H=E-1+Math.ceil(T/o)*o;H=Math.min(a,Math.max(o,Math.round(H/o)*o)),v(H)},x=()=>v(null),R=[];for(let y=1;y<=a;y++){let E=(p!==null?p:e)>=y,C=!E&&(p!==null?p:e)>y-1,I=E?l||w.cloneElement(vr,{className:`fill-color-yellow-500 ${it[i]}`}):c||w.cloneElement(hr,{className:`stroke-color-gray-300 ${it[i]}`});if(C){const T=((p!==null?p:e)-(y-1))*100;I=s.jsxs("span",{className:"relative block",children:[s.jsx("span",{className:"absolute top-0 left-0 overflow-hidden",style:{width:`${T}%`},children:l||w.cloneElement(vr,{className:`fill-color-yellow-500 ${it[i]}`})}),c||w.cloneElement(hr,{className:`stroke-color-gray-300 ${it[i]}`})]})}R.push(s.jsx("span",{className:`inline-block ${r?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,onClick:T=>m(T,y),onMouseMove:T=>b(T,y),onMouseLeave:x,tabIndex:t||r?-1:0,"aria-label":`Rate ${y}`,role:"radio","aria-checked":e===y,children:I},y))}return s.jsxs("div",{className:`flex items-center gap-1 ${u}`,role:"radiogroup","aria-disabled":r,children:[R,d&&p!==null?s.jsx("span",{className:"ml-2 text-xs text-gray-500",children:f[p]||p}):g?s.jsx("span",{className:"ml-2 text-xs text-gray-500",children:f[e]||e}):null]})},ei=({children:e,width:n="100%",height:t="auto",showIndicators:r=!0,showArrows:o=!0,autoplay:a=!1,interval:i=3e3,infiniteLoop:l=!1,perview:c=1,gap:u=0,onClickItem:d,showThumbs:g=!1,pauseOnHover:f=!1,swipeable:p=!0,thumbWidth:v=60,orientation:m="horizontal",nextIcon:b,prevIcon:x,className:R})=>{const y=e.length,E=Math.min(Math.max(c,.1),y),[C,I]=w.useState(0),[T,H]=w.useState(!1),[A,X]=w.useState(!1),[ae,se]=w.useState(0),ee=w.useRef(null),q=w.useRef(0),K=w.useRef(0),O=E>=y?0:Math.max(0,y-E),ne=P=>Math.max(0,Math.min(P,O)),ue=P=>I(l&&O>0?(P%(O+1)+(O+1))%(O+1):ne(P)),J=()=>{l&&O>0?I(C===0?O:C-1):ue(C-1)},h=()=>{l&&O>0?I(C>=O?0:C+1):ue(C+1)};w.useEffect(()=>{if(!a||f&&T||A||O===0)return;const P=setInterval(()=>{I(M=>{const G=M+1;return G>O?l?0:M:G})},i);return()=>clearInterval(P)},[a,i,T,f,A,O,l]);const S=(P,M)=>{!p||O===0||(X(!0),q.current=m==="horizontal"?P:M,K.current=q.current)},F=(P,M)=>{A&&(K.current=m==="horizontal"?P:M,se(K.current-q.current))},L=()=>{if(!A)return;Math.abs(K.current-q.current)>50&&(K.current<q.current?h():J()),X(!1),se(0)},N=()=>{const P=m==="horizontal"?"X":"Y";let M=0;if(A&&ee.current&&O>0){const Q=m==="horizontal"?ee.current.offsetWidth:ee.current.offsetHeight;M=ae/Q*100*(E/y)}const W=Math.min(C,O)*(100/y)-M,k=C>=O,_=C<=0?0:k?u/(c/2):u/c;return`translate${P}(calc(-${W}% - ${_}px))`},V=()=>E>=y?1:Math.floor(O)+1,z=()=>O===0?0:Math.round(C/O*(V()-1));return s.jsxs("div",{className:`relative flex flex-col items-center select-none ${R}`,style:{width:n,height:t},onMouseEnter:()=>f&&H(!0),onMouseLeave:()=>f&&H(!1),children:[s.jsxs("div",{ref:ee,className:`w-full overflow-hidden relative ${p&&O>0?A?"cursor-grabbing":"cursor-grab":"cursor-default"}`,style:{height:g?`calc(${t} - ${v+20}px)`:t},onMouseDown:P=>{P.preventDefault(),S(P.clientX,P.clientY)},onMouseMove:P=>F(P.clientX,P.clientY),onMouseUp:L,onMouseLeave:L,onTouchStart:P=>S(P.touches[0].clientX,P.touches[0].clientY),onTouchMove:P=>F(P.touches[0].clientX,P.touches[0].clientY),onTouchEnd:L,children:[s.jsx("div",{className:`flex ${m==="horizontal"?"flex-row":"flex-col"} transition-transform duration-300 ease-in-out`,style:{width:m==="horizontal"?`${y*100/E}%`:"100%",height:m==="vertical"?`${y*100/E}%`:"100%",transform:N(),gap:`${u}px`,transitionProperty:A?"none":"transform"},children:e.map((P,M)=>s.jsx("div",{className:"shrink-0 flex items-center justify-center",style:{width:m==="horizontal"?`calc(${100/y}% - ${u/c}px)`:"100%",height:m==="vertical"?`calc(${100/y}% - ${u*(y-1)/y}px)`:"100%"},onClick:()=>!A&&(d==null?void 0:d(M)),children:P},M))}),o&&O>0&&s.jsxs(s.Fragment,{children:[s.jsx("button",{"aria-label":"prev",onClick:J,className:`absolute z-20 bg-color-white/80 border border-color-gray-300 rounded-full w-10 h-10 flex items-center justify-center text-lg font-bold text-color-gray-800 hover:bg-color-white transition-color cursor-pointer
|
|
158
158
|
${m==="horizontal"?"left-2 top-1/2 -translate-y-1/2":"left-1/2 top-2 -translate-x-1/2"}`,children:x||(m==="horizontal"?"‹":"↑")}),s.jsx("button",{"aria-label":"next",onClick:h,className:`absolute z-20 bg-color-white/80 border border-color-gray-300 rounded-full w-10 h-10 flex items-center justify-center text-lg font-bold text-color-gray-800 hover:bg-color-white transition-colo cursor-pointer
|
|
159
|
-
${m==="horizontal"?"right-2 top-1/2 -translate-y-1/2":"left-1/2 bottom-2 -translate-x-1/2"}`,children:b||(m==="horizontal"?"›":"↓")})]}),r&&V()>1&&s.jsx("div",{className:`flex gap-1 mt-3 justify-center absolute bg-color-white/90 py-1 px-[5px] rounded-full ${m==="horizontal"?"bottom-3 left-1/2 -translate-x-1/2":"top-1/2 right-3 -translate-y-1/2 rotate-90"} z-10`,children:Array.from({length:V()}).map((P,M)=>s.jsx("button",{onClick:()=>ue(Math.round(M/(V()-1)*O)),className:`size-[10px] rounded-full transition-color hover:bg-color-gray-600 cursor-pointer ${M===z()?"bg-color-gray-800":"bg-color-gray-400"}`},M))})]}),g&&s.jsx("div",{className:"flex gap-2 mt-3 justify-center flex-wrap",children:e.map((P,M)=>{const G=M===Math.round(C);return s.jsx("div",{onClick:()=>{const W=Math.max(0,Math.min(O,M-Math.floor(E/2)));ue(W)},className:`overflow-hidden rounded-md cursor-pointer transition-all hover:opacity-100 ${G?"border-2 border-color-gray-800 opacity-100 scale-105":"border-2 border-color-gray-300 opacity-70"}`,style:{width:v,height:v},children:P},M)})})]})},
|
|
159
|
+
${m==="horizontal"?"right-2 top-1/2 -translate-y-1/2":"left-1/2 bottom-2 -translate-x-1/2"}`,children:b||(m==="horizontal"?"›":"↓")})]}),r&&V()>1&&s.jsx("div",{className:`flex gap-1 mt-3 justify-center absolute bg-color-white/90 py-1 px-[5px] rounded-full ${m==="horizontal"?"bottom-3 left-1/2 -translate-x-1/2":"top-1/2 right-3 -translate-y-1/2 rotate-90"} z-10`,children:Array.from({length:V()}).map((P,M)=>s.jsx("button",{onClick:()=>ue(Math.round(M/(V()-1)*O)),className:`size-[10px] rounded-full transition-color hover:bg-color-gray-600 cursor-pointer ${M===z()?"bg-color-gray-800":"bg-color-gray-400"}`},M))})]}),g&&s.jsx("div",{className:"flex gap-2 mt-3 justify-center flex-wrap",children:e.map((P,M)=>{const G=M===Math.round(C);return s.jsx("div",{onClick:()=>{const W=Math.max(0,Math.min(O,M-Math.floor(E/2)));ue(W)},className:`overflow-hidden rounded-md cursor-pointer transition-all hover:opacity-100 ${G?"border-2 border-color-gray-800 opacity-100 scale-105":"border-2 border-color-gray-300 opacity-70"}`,style:{width:v,height:v},children:P},M)})})]})},ti=({title:e,description:n,actionLabel:t,onAction:r,illustration:o,illustrationWidth:a=120,children:i,color:l="gray"})=>s.jsxs("section",{className:"flex flex-col items-center justify-center text-center p-6 max-w-md",role:"status","aria-live":"polite",children:[o&&s.jsx("div",{className:"flex items-center justify-center",style:{width:a},children:typeof o=="string"?s.jsx("img",{src:o,alt:"",className:"object-contain"}):o}),s.jsx("h2",{className:"text-lg mt-4 font-semibold text-color-gray-800",children:e}),n&&s.jsx("p",{className:"text-sm mt-2 text-color-gray-600",children:n}),t&&r&&s.jsx(Ye,{onClick:r,color:l,className:"mt-4",children:t}),i]}),ni=({initialState:e=!1,onToggle:n,disabled:t=!1,type:r="button",color:o="green",variant:a="ios"})=>{var g,f,p;const[i,l]=w.useState(e),[c,u]=w.useState(!1),d=async()=>{if(!(t||c))if(n){u(!0);try{await n(!i),l(!i)}catch(v){console.error("Toggle failed",v)}finally{u(!1)}}else l(!i)};return a==="android"?s.jsxs("button",{onClick:d,type:r,disabled:t,className:`relative w-10 h-3 flex items-center transition-color duration-300
|
|
160
|
+
} ${t?"bg-color-gray-200 opacity-50 cursor-not-allowed":"cursor-pointer"}`,children:[s.jsx("span",{className:`absolute rounded-full inset-0 opacity-50 ${i?`${(g=me[o])==null?void 0:g.filled}`:"bg-color-gray-400"}`}),s.jsx("div",{className:`flex justify-center items-center absolute shadow-md top-0.5 left-0.5 size-5 rounded-full shadow transition-all duration-300 ${i?`translate-x-5 ${(f=me[o])==null?void 0:f.filled}`:"translate-x-0 bg-color-white"}`,children:c?s.jsx("svg",{className:"animate-spin text-color-gray-500 size-3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M11.9995 2C12.5518 2 12.9995 2.44772 12.9995 3V6C12.9995 6.55228 12.5518 7 11.9995 7C11.4472 7 10.9995 6.55228 10.9995 6V3C10.9995 2.44772 11.4472 2 11.9995 2ZM11.9995 17C12.5518 17 12.9995 17.4477 12.9995 18V21C12.9995 21.5523 12.5518 22 11.9995 22C11.4472 22 10.9995 21.5523 10.9995 21V18C10.9995 17.4477 11.4472 17 11.9995 17ZM20.6597 7C20.9359 7.47829 20.772 8.08988 20.2937 8.36602L17.6956 9.86602C17.2173 10.1422 16.6057 9.97829 16.3296 9.5C16.0535 9.02171 16.2173 8.41012 16.6956 8.13398L19.2937 6.63397C19.772 6.35783 20.3836 6.52171 20.6597 7ZM7.66935 14.5C7.94549 14.9783 7.78161 15.5899 7.30332 15.866L4.70525 17.366C4.22695 17.6422 3.61536 17.4783 3.33922 17C3.06308 16.5217 3.22695 15.9101 3.70525 15.634L6.30332 14.134C6.78161 13.8578 7.3932 14.0217 7.66935 14.5ZM20.6597 17C20.3836 17.4783 19.772 17.6422 19.2937 17.366L16.6956 15.866C16.2173 15.5899 16.0535 14.9783 16.3296 14.5C16.6057 14.0217 17.2173 13.8578 17.6956 14.134L20.2937 15.634C20.772 15.9101 20.9359 16.5217 20.6597 17ZM7.66935 9.5C7.3932 9.97829 6.78161 10.1422 6.30332 9.86602L3.70525 8.36602C3.22695 8.08988 3.06308 7.47829 3.33922 7C3.61536 6.52171 4.22695 6.35783 4.70525 6.63397L7.30332 8.13398C7.78161 8.41012 7.94549 9.02171 7.66935 9.5Z"})}):null})]}):s.jsx("button",{onClick:d,type:r,disabled:t,className:`relative w-11 h-6 flex items-center rounded-full transition-color duration-300 ${i?(p=me[o])==null?void 0:p.filled:"bg-color-gray-300"} ${t?"bg-color-gray-300 opacity-50 cursor-not-allowed":"cursor-pointer"}`,children:s.jsx("div",{className:`absolute top-[4px] left-1 w-4 h-4 bg-color-white rounded-full flex items-center justify-center transition-all duration-300 ${i?"translate-x-[19px]":"-translate-x-0"}`,children:c?s.jsx("svg",{className:"animate-spin text-color-gray-500 size-3",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M11.9995 2C12.5518 2 12.9995 2.44772 12.9995 3V6C12.9995 6.55228 12.5518 7 11.9995 7C11.4472 7 10.9995 6.55228 10.9995 6V3C10.9995 2.44772 11.4472 2 11.9995 2ZM11.9995 17C12.5518 17 12.9995 17.4477 12.9995 18V21C12.9995 21.5523 12.5518 22 11.9995 22C11.4472 22 10.9995 21.5523 10.9995 21V18C10.9995 17.4477 11.4472 17 11.9995 17ZM20.6597 7C20.9359 7.47829 20.772 8.08988 20.2937 8.36602L17.6956 9.86602C17.2173 10.1422 16.6057 9.97829 16.3296 9.5C16.0535 9.02171 16.2173 8.41012 16.6956 8.13398L19.2937 6.63397C19.772 6.35783 20.3836 6.52171 20.6597 7ZM7.66935 14.5C7.94549 14.9783 7.78161 15.5899 7.30332 15.866L4.70525 17.366C4.22695 17.6422 3.61536 17.4783 3.33922 17C3.06308 16.5217 3.22695 15.9101 3.70525 15.634L6.30332 14.134C6.78161 13.8578 7.3932 14.0217 7.66935 14.5ZM20.6597 17C20.3836 17.4783 19.772 17.6422 19.2937 17.366L16.6956 15.866C16.2173 15.5899 16.0535 14.9783 16.3296 14.5C16.6057 14.0217 17.2173 13.8578 17.6956 14.134L20.2937 15.634C20.772 15.9101 20.9359 16.5217 20.6597 17ZM7.66935 9.5C7.3932 9.97829 6.78161 10.1422 6.30332 9.86602L3.70525 8.36602C3.22695 8.08988 3.06308 7.47829 3.33922 7C3.61536 6.52171 4.22695 6.35783 4.70525 6.63397L7.30332 8.13398C7.78161 8.41012 7.94549 9.02171 7.66935 9.5Z"})}):null})})},xr={small:"p-2",medium:"p-4",large:"p-6",none:"p-0"},br={default:"shadow-xs",small:"shadow-sm",medium:"shadow-md",large:"shadow-lg"},wr={small:"rounded-md",medium:"rounded-xl",large:"rounded-2xl"},yr=({title:e,subtitle:n,space:t="medium",shadow:r="small",roundness:o="medium",image:a,actionMenu:i,divider:l=!0,children:c,className:u="",hoverable:d=!1,bordered:g=!1,onClick:f,loaderJsx:p=!1})=>{const v=["relative","bg-white","overflow-hidden",xr[t]||xr.medium,br[r]||br.small,wr[o]||wr.medium,d?"hover:shadow-xl transition-shadow duration-300 cursor-pointer":"",g?"border border-color-gray-200":"",u].join(" ").trim();return s.jsxs("div",{className:v,onClick:f,children:[a&&s.jsx("img",{src:a,alt:"Card",className:"w-full h-auto mb-4 rounded"}),(e||n)&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex justify-between items-start mb-2",children:[s.jsxs("div",{children:[e&&s.jsx("h2",{className:"text-lg font-semibold",children:e}),n&&s.jsx("p",{className:"text-color-gray-500 text-sm",children:n})]}),i&&s.jsx("div",{className:"ml-2",children:i})]}),l&&s.jsx("hr",{className:"h-px my-5 bg-color-gray-200 border-0"})]}),s.jsx("div",{children:c}),p&&s.jsx("div",{className:"absolute w-full h-full top-0 left-0 flex items-center justify-center bg-color-white bg-opacity-50",children:p})]})},ri=({orientation:e="horizontal",variant:n="fullWidth",children:t,className:r=""})=>{const o=e==="horizontal";if(t){const i=["flex items-center gap-2 text-sm text-color-gray-500 w-full",o?"flex-row":"flex-col"].filter(Boolean).join(" "),l=o?"flex-1 border-t border-color-gray-300":"h-4 border-l border-color-gray-300";return s.jsx("div",{role:"separator",className:`flex ${o?"w-full items-center":"h-full flex-col justify-center"}
|
|
160
161
|
${r}
|
|
161
162
|
${n==="inset"?o?"pl-4":"pt-4":""}`,children:s.jsxs("div",{className:i,children:[s.jsx("div",{className:l}),s.jsx("span",{children:t}),s.jsx("div",{className:l})]})})}const a=o?"h-px w-full bg-color-gray-300":"w-px h-full bg-color-gray-300";return s.jsx("div",{role:"separator",className:`flex ${o?"w-full items-center":"h-full flex-col justify-center"}
|
|
162
163
|
${r}
|
|
163
|
-
${n==="inset"?o?"pl-4":"pt-4":""} ${a}`})},
|
|
164
|
+
${n==="inset"?o?"pl-4":"pt-4":""} ${a}`})},oi=({name:e,options:n,selectedValue:t,onChange:r,direction:o="column",disabled:a=!1,color:i="blue",className:l="",radioClass:c})=>s.jsx("div",{className:`flex ${o==="row"?"flex-row gap-6":"flex-col gap-3"} ${l}`,children:n.map(({label:u,value:d,disabled:g})=>{var p,v;const f=a||g;return s.jsxs("label",{className:`relative flex items-center cursor-pointer select-none transition ${f?"opacity-50 cursor-not-allowed":"hover:opacity-90"}`,children:[s.jsx("input",{type:"radio",name:e,value:d,disabled:f,checked:t===d,onChange:()=>!f&&(r==null?void 0:r(d)),className:"sr-only peer"}),s.jsx("div",{className:`w-5 h-5 rounded-full border-2 border-color-gray-400 peer-checked:border-[7px] transition-all duration-150 ${(p=me[i])==null?void 0:p.peer} ${c}`}),s.jsx("span",{className:`ml-2 text-sm text-color-gray-800 ${(v=me[i])==null?void 0:v.peer}`,children:u})]},d)})}),ai=({label:e,value:n,onChange:t,options:r,className:o="",labelClass:a="",disabled:i=!1,size:l="medium",variant:c="outlined",rounded:u="medium",shadow:d=!1})=>{const g={small:"p-2",medium:"p-3",large:"p-4"},f={small:"rounded-md",medium:"rounded-lg",full:"rounded-full"},p={filled:"bg-color-gray-100 border-color-gray-200",outlined:"border-color-gray-300 bg-color-transparent"};return s.jsxs("div",{className:`relative w-full ${o}`,children:[e&&s.jsx("label",{className:`text-sm text-color-gray-500 pointer-events-none block mb-1 ${a}`,children:e}),s.jsxs("div",{className:"relative",children:[s.jsx("select",{disabled:i,value:n,onChange:v=>t(v.target.value),className:`appearance-none focus:ring-1 text-color-gray-800 w-full border outline-none transition-all ${f[u]} ${g[l]} ${p[c]} ${i?"!bg-color-gray-50 opacity-60 cursor-not-allowed":""} ${d?"shadow-md shadow-color-zinc-100":""}`,children:r.map(v=>s.jsx("option",{value:v.value,className:"text-color-gray-900",children:v.label},v.value))}),s.jsx("span",{className:`absolute right-3 text-sm top-1/2 -translate-y-1/2 ${i?"opacity-60":""}`,children:s.jsx("svg",{className:"size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"})})})]})]})},ii=({content:e,children:n,position:t="top"})=>{const[r,o]=w.useState(!1),[a,i]=w.useState({top:0,left:0}),l=w.useRef(null),c=w.useRef(null);return w.useEffect(()=>{if(r&&l.current&&c.current){const u=l.current.getBoundingClientRect(),d=c.current.getBoundingClientRect();let g=0,f=0;switch(t){case"top":g=u.top-d.height-8,f=u.left+u.width/2-d.width/2;break;case"bottom":g=u.bottom+8,f=u.left+u.width/2-d.width/2;break;case"left":g=u.top+u.height/2-d.height/2,f=u.left-d.width-8;break;case"right":g=u.top+u.height/2-d.height/2,f=u.right+8;break}i({top:g,left:f})}},[r,t]),s.jsxs(s.Fragment,{children:[s.jsx("div",{ref:l,className:"inline-block",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),children:n}),r&&Te.createPortal(s.jsx("div",{ref:c,style:{top:a.top,left:a.left},className:"fixed z-50 px-2 py-1 text-sm text-color-white bg-color-gray-800 rounded shadow-md whitespace-nowrap pointer-events-none",children:e}),document.body)]})};function li(...e){return e.filter(Boolean).join(" ")}const si={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","4xl":"max-w-4xl","6xl":"max-w-6xl"},Cr=w.forwardRef(({open:e,onClose:n,className:t,title:r,children:o,actions:a,showCloseIcon:i=!0,fullscreen:l=!1,fullWidth:c=!1,maxWidth:u},d)=>{const[g,f]=w.useState(e||!1),[p,v]=w.useState(!1),[m,b]=w.useState(!1);w.useEffect(()=>{e!==void 0&&f(e)},[e]),w.useImperativeHandle(d,()=>({open:()=>f(!0),close:()=>{b(!1),setTimeout(()=>f(!1),300)}})),w.useEffect(()=>{let R;return g?(v(!0),R=setTimeout(()=>b(!0),10)):b(!1),()=>clearTimeout(R)},[g]);const x=()=>{g||v(!1)};return w.useEffect(()=>{const R=y=>{y.key==="Escape"&&(n==null||n())};return g&&document.addEventListener("keydown",R),()=>document.removeEventListener("keydown",R)},[g,n]),w.useEffect(()=>(g?(document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"):(document.body.style.overflow="",document.documentElement.style.overflow=""),()=>{document.body.style.overflow="",document.documentElement.style.overflow=""}),[g]),p?Te.createPortal(s.jsxs("div",{className:li("fixed inset-0 z-50 flex items-center justify-center transition-opacity duration-300",m?"opacity-100":"opacity-0 pointer-events-none"),children:[s.jsx("div",{className:"fixed inset-0 bg-color-black/50",onClick:()=>{n==null||n(),f(!1)}}),s.jsxs("div",{className:`relative flex flex-col z-50 bg-color-white rounded-xl shadow-lg transition-all duration-300 transform p-6 ${m?"opacity-100 scale-100":"opacity-0 scale-95"} ${l?"w-full h-[calc(100%_-_40px)] m-5":`${c?"w-full":"w-auto"} ${u?si[u]:""} mx-5`} ${t}`,onTransitionEnd:x,children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r&&s.jsx("h2",{className:"text-xl font-semibold",children:r}),i&&s.jsx(Ce,{color:"gray",icon:s.jsx("svg",{className:"size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z"})}),size:"small",roundedFull:!0,onClick:()=>{n==null||n(),f(!1)},variant:"transparent"})]}),s.jsx("div",{className:"grow lg:max-h-[calc(100vh_-_200px)] max-h-[calc(100vh_-_130px)] overflow-y-auto",children:o}),a&&s.jsx("div",{className:"mt-8",children:a})]})]}),document.body):null});function ci({items:e,trigger:n,className:t,dropdownItemClass:r}){const[o,a]=w.useState(!1),[i,l]=w.useState({top:0,left:0}),[c,u]=w.useState(!1),d=w.useRef(null),g=w.useRef(null),f=v=>{v.stopPropagation(),a(m=>!m),u(!1)};w.useLayoutEffect(()=>{if(o&&d.current&&g.current){const v=d.current.getBoundingClientRect(),m=g.current.getBoundingClientRect(),b=window.innerWidth,x=window.innerHeight;let R=v.left+window.scrollX,y=v.bottom+window.scrollY;v.right+m.width>b&&(R=v.right+window.scrollX-m.width),R+m.width>b&&(R=b-m.width-12),y+m.height>x&&(y=v.top+window.scrollY-m.height),l({top:y,left:R}),setTimeout(()=>{u(!0)},150)}},[o]),w.useEffect(()=>{const v=m=>{var b;g.current&&!g.current.contains(m.target)&&!((b=d.current)!=null&&b.contains(m.target))&&a(!1)};return o&&document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[o]);const p=s.jsx("div",{ref:g,className:`absolute mt-2 z-50 rounded-xl bg-color-white shadow-xl p-2 min-w-[160px] transition-all duration-200 transform ${c?"opacity-100 scale-100":"opacity-0 scale-95"} ${t}`,style:{top:i.top,left:i.left},children:e.map((v,m)=>s.jsxs("button",{disabled:v.disabled,onClick:()=>{var b;(b=v.onClick)==null||b.call(v),a(!1)},className:`flex items-center gap-3 w-full text-left px-3 py-2 bg-color-transparent hover:bg-color-gray-100 transition-all cursor-pointer rounded-md text-md text-color-gray-700 ${v.disabled?"opacity-50 hover:bg-color-transparent !cursor-not-allowed":""} ${r} ${v.itemClass}`,children:[v.icon&&s.jsx("span",{children:v.icon}),s.jsx("span",{children:v.label})]},m))});return s.jsxs(s.Fragment,{children:[s.jsx("div",{ref:d,onClick:f,className:"cursor-pointer",children:n}),o&&Te.createPortal(p,document.body)]})}function ui(...e){return e.filter(Boolean).join(" ")}const Sr=({open:e,onClose:n,className:t,title:r,children:o,childrenClass:a,actions:i,showCloseIcon:l=!0,anchor:c="left"})=>{const[u,d]=w.useState(!1),[g,f]=w.useState(!1);w.useEffect(()=>{let b;return e?(d(!0),b=setTimeout(()=>{f(!0)},10)):f(!1),()=>clearTimeout(b)},[e]);const p=()=>{e||d(!1)};if(w.useEffect(()=>{const b=x=>{x.key==="Escape"&&(n==null||n())};return e&&document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[e,n]),w.useEffect(()=>(e?(document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden"):(document.body.style.overflow="",document.documentElement.style.overflow=""),()=>{document.body.style.overflow="",document.documentElement.style.overflow=""}),[e]),!u)return null;const v={left:"left-0 top-0 h-full min-w-96 transition-all duration-300",right:"right-0 top-0 h-full min-w-96 transition-all duration-300",top:"top-0 left-0 w-full min-h-40 transition-all duration-300",bottom:"bottom-0 left-0 w-full min-h-40 transition-all duration-300"},m={left:g?"translate-x-0":"-translate-x-full",right:g?"translate-x-0":"translate-x-full",top:g?"translate-y-0":"-translate-y-full",bottom:g?"translate-y-0":"translate-y-full"};return Te.createPortal(s.jsxs("div",{className:ui("fixed inset-0 z-50 transition-opacity duration-300",g?"opacity-100":"opacity-0 pointer-events-none"),children:[s.jsx("div",{className:"fixed inset-0 bg-color-black/50",onClick:n}),s.jsxs("div",{className:`
|
|
164
165
|
fixed bg-color-white shadow-lg z-50 p-6 flex flex-col
|
|
165
166
|
${v[c]}
|
|
166
167
|
${m[c]}
|
|
167
168
|
${t}
|
|
168
|
-
`,onTransitionEnd:p,children:[l&&s.jsx(Ce,{color:"gray",icon:s.jsx("svg",{className:"size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z"})}),size:"small",roundedFull:!0,className:"!absolute right-3 top-3",onClick:n,variant:"transparent"}),r&&s.jsx("h2",{className:"text-xl font-semibold mb-4",children:r}),s.jsx("div",{className:`grow overflow-y-auto ${a}`,children:o}),i&&s.jsx("div",{className:"mt-4",children:i})]})]}),document.body)},
|
|
169
|
+
`,onTransitionEnd:p,children:[l&&s.jsx(Ce,{color:"gray",icon:s.jsx("svg",{className:"size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z"})}),size:"small",roundedFull:!0,className:"!absolute right-3 top-3",onClick:n,variant:"transparent"}),r&&s.jsx("h2",{className:"text-xl font-semibold mb-4",children:r}),s.jsx("div",{className:`grow overflow-y-auto ${a}`,children:o}),i&&s.jsx("div",{className:"mt-4",children:i})]})]}),document.body)},di=({title:e,content:n,expandIcon:t,collapseIcon:r,isOpen:o,defaultExpanded:a=!1,onToggle:i,className:l="",titleClass:c="",contentClass:u=""})=>{const[d,g]=w.useState(a),f=o!==void 0,p=f?o:d,v=()=>{const m=!p;f||g(m),i==null||i(m)};return w.useEffect(()=>{f&&g(o)},[o]),s.jsxs("div",{className:`overflow-hidden ${l}`,children:[s.jsxs("button",{onClick:v,className:`flex justify-between items-center w-full p-4 bg-color-gray-50 hover:bg-color-gray-200 transition ${c}`,children:[s.jsx("div",{className:"text-left text-sm font-medium",children:e}),s.jsx("div",{className:"transition-transform duration-300",children:p?t:r})]}),s.jsx("div",{className:`grid overflow-hidden transition-all duration-300 ease-in-out grid-rows-[0fr] ${p?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0"}`,children:s.jsx("div",{className:"overflow-hidden",children:s.jsx("div",{className:`p-4 text-sm text-color-gray-700 ${u}`,children:n})})})]})},pi={info:"bg-color-blue-50 border-color-blue-300 text-color-blue-800",success:"bg-color-green-50 border-color-green-300 text-color-green-800",danger:"bg-color-red-50 border-color-red-300 text-color-red-800",warning:"bg-color-yellow-50 border-color-yellow-300 text-color-yellow-800",dark:"bg-color-gray-100 border-color-gray-300 text-color-gray-800"},fi={info:s.jsx("svg",{className:"text-color-blue-800 shrink-0 size-7",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 7H13V9H11V7ZM11 11H13V17H11V11Z"})}),success:s.jsx("svg",{className:"text-color-green-800 shrink-0 size-7",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12ZM12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM17.4571 9.45711L16.0429 8.04289L11 13.0858L8.20711 10.2929L6.79289 11.7071L11 15.9142L17.4571 9.45711Z"})}),danger:s.jsx("svg",{className:"text-color-red-800 shrink-0 size-7",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM12 10.5858L14.8284 7.75736L16.2426 9.17157L13.4142 12L16.2426 14.8284L14.8284 16.2426L12 13.4142L9.17157 16.2426L7.75736 14.8284L10.5858 12L7.75736 9.17157L9.17157 7.75736L12 10.5858Z"})}),warning:s.jsx("svg",{className:"text-color-yellow-800 shrink-0 size-7",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 15H13V17H11V15ZM11 7H13V13H11V7Z"})}),dark:s.jsx("svg",{className:"text-color-gray-800 shrink-0 size-7",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 7H13V9H11V7ZM11 11H13V17H11V11Z"})})},mi={info:"bg-color-blue-500",success:"bg-color-green-500",danger:"bg-color-red-500",warning:"bg-color-yellow-500",dark:"bg-color-gray-700"},gi=({message:e,variant:n="info",onClose:t,autoClose:r=!1,className:o="",autoCloseDuration:a=5e3})=>{const[i,l]=w.useState(!0),c=w.useRef(null);return w.useEffect(()=>{let u;return r&&(requestAnimationFrame(()=>{c.current&&(c.current.style.transition=`width ${a}ms linear`,c.current.style.width="0%")}),u=setTimeout(()=>{l(!1),t==null||t()},a)),()=>clearTimeout(u)},[r,a,t]),i?s.jsxs("div",{className:`relative border-t-4 p-4 flex items-start justify-between ${pi[n]} ${o}`,children:[s.jsxs("div",{className:"flex items-center gap-2",children:[fi[n],s.jsx("span",{dangerouslySetInnerHTML:{__html:e}})]}),s.jsx("button",{onClick:()=>{l(!1),t==null||t()},"aria-label":"Close alert",className:"ml-4 bg-color-transparent cursor-pointer hover:bg-color-white rounded-full p-1 transition-colors",children:s.jsx("svg",{className:`size-5 ${n==="dark"?"text-gray-700":""}`,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z"})})}),r&&s.jsx("div",{className:"absolute -top-1 left-0 h-1 w-full bg-color-transparent overflow-hidden",children:s.jsx("div",{ref:c,className:`${mi[n]} h-1`,style:{width:"100%"}})})]}):null},vi=({children:e,count:n,showDot:t=!1,max:r=99,color:o="red",position:a="top-right"})=>{const i=()=>{var u,d;if(t)return s.jsx("span",{className:`h-2 w-2 rounded-full ${(u=me[o])==null?void 0:u.filled} block`});if(n===0||n===void 0)return null;const c=n>r?`${r}+`:n;return s.jsx("span",{className:`text-color-white text-xs px-[10px] py-1 rounded-full whitespace-nowrap ${(d=me[o])==null?void 0:d.filled}`,children:c})},l=()=>{switch(a){case"top-left":return"top-0 left-0 -translate-x-1/2 -translate-y-1/2";case"bottom-right":return"bottom-0 right-0 translate-x-1/2 translate-y-1/2";case"bottom-left":return"bottom-0 left-0 -translate-x-1/2 translate-y-1/2";case"top-right":default:return"top-0 right-0 translate-x-1/2 -translate-y-1/2"}};return s.jsxs("div",{className:"relative inline-block",children:[e,s.jsx("span",{className:`absolute ${l()}`,children:i()})]})};/**
|
|
169
170
|
* react-router v7.7.1
|
|
170
171
|
*
|
|
171
172
|
* Copyright (c) Remix Software Inc.
|
|
@@ -174,17 +175,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
174
175
|
* LICENSE.md file in the root directory of this source tree.
|
|
175
176
|
*
|
|
176
177
|
* @license MIT
|
|
177
|
-
*/function
|
|
178
|
+
*/function ge(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function ke(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function Yt({pathname:e="/",search:n="",hash:t=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),t&&t!=="#"&&(e+=t.charAt(0)==="#"?t:"#"+t),e}function Zt(e){let n={};if(e){let t=e.indexOf("#");t>=0&&(n.hash=e.substring(t),e=e.substring(0,t));let r=e.indexOf("?");r>=0&&(n.search=e.substring(r),e=e.substring(0,r)),e&&(n.pathname=e)}return n}function kr(e,n,t="/"){return hi(e,n,t,!1)}function hi(e,n,t,r){let o=typeof n=="string"?Zt(n):n,a=Pe(o.pathname||"/",t);if(a==null)return null;let i=jr(e);xi(i);let l=null;for(let c=0;l==null&&c<i.length;++c){let u=_i(a);l=Ri(i[c],u,r)}return l}function jr(e,n=[],t=[],r=""){let o=(a,i,l)=>{let c={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:i,route:a};c.relativePath.startsWith("/")&&(ge(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length));let u=je([r,c.relativePath]),d=t.concat(c);a.children&&a.children.length>0&&(ge(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),jr(a.children,n,d,u)),!(a.path==null&&!a.index)&&n.push({path:u,score:ji(u,a.index),routesMeta:d})};return e.forEach((a,i)=>{var l;if(a.path===""||!((l=a.path)!=null&&l.includes("?")))o(a,i);else for(let c of $r(a.path))o(a,i,c)}),n}function $r(e){let n=e.split("/");if(n.length===0)return[];let[t,...r]=n,o=t.endsWith("?"),a=t.replace(/\?$/,"");if(r.length===0)return o?[a,""]:[a];let i=$r(r.join("/")),l=[];return l.push(...i.map(c=>c===""?a:[a,c].join("/"))),o&&l.push(...i),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function xi(e){e.sort((n,t)=>n.score!==t.score?t.score-n.score:$i(n.routesMeta.map(r=>r.childrenIndex),t.routesMeta.map(r=>r.childrenIndex)))}var bi=/^:[\w-]+$/,wi=3,yi=2,Ci=1,Si=10,ki=-2,Rr=e=>e==="*";function ji(e,n){let t=e.split("/"),r=t.length;return t.some(Rr)&&(r+=ki),n&&(r+=yi),t.filter(o=>!Rr(o)).reduce((o,a)=>o+(bi.test(a)?wi:a===""?Ci:Si),r)}function $i(e,n){return e.length===n.length&&e.slice(0,-1).every((r,o)=>r===n[o])?e[e.length-1]-n[n.length-1]:0}function Ri(e,n,t=!1){let{routesMeta:r}=e,o={},a="/",i=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,d=a==="/"?n:n.slice(a.length)||"/",g=lt({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),f=c.route;if(!g&&u&&t&&!r[r.length-1].route.index&&(g=lt({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!g)return null;Object.assign(o,g.params),i.push({params:o,pathname:je([a,g.pathname]),pathnameBase:Fi(je([a,g.pathnameBase])),route:f}),g.pathnameBase!=="/"&&(a=je([a,g.pathnameBase]))}return i}function lt(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[t,r]=Ei(e.path,e.caseSensitive,e.end),o=n.match(t);if(!o)return null;let a=o[0],i=a.replace(/(.)\/+$/,"$1"),l=o.slice(1);return{params:r.reduce((u,{paramName:d,isOptional:g},f)=>{if(d==="*"){let v=l[f]||"";i=a.slice(0,a.length-v.length).replace(/(.)\/+$/,"$1")}const p=l[f];return g&&!p?u[d]=void 0:u[d]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:i,pattern:e}}function Ei(e,n=!1,t=!0){ke(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,n?void 0:"i"),r]}function _i(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return ke(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function Pe(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let t=n.endsWith("/")?n.length-1:n.length,r=e.charAt(t);return r&&r!=="/"?null:e.slice(t)||"/"}function Pi(e,n="/"){let{pathname:t,search:r="",hash:o=""}=typeof e=="string"?Zt(e):e;return{pathname:t?t.startsWith("/")?t:Mi(t,n):n,search:Ai(r),hash:Di(o)}}function Mi(e,n){let t=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?t.length>1&&t.pop():o!=="."&&t.push(o)}),t.length>1?t.join("/"):"/"}function Kt(e,n,t,r){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${t}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Li(e){return e.filter((n,t)=>t===0||n.route.path&&n.route.path.length>0)}function Er(e){let n=Li(e);return n.map((t,r)=>r===n.length-1?t.pathname:t.pathnameBase)}function _r(e,n,t,r=!1){let o;typeof e=="string"?o=Zt(e):(o={...e},ge(!o.pathname||!o.pathname.includes("?"),Kt("?","pathname","search",o)),ge(!o.pathname||!o.pathname.includes("#"),Kt("#","pathname","hash",o)),ge(!o.search||!o.search.includes("#"),Kt("#","search","hash",o)));let a=e===""||o.pathname==="",i=a?"/":o.pathname,l;if(i==null)l=t;else{let g=n.length-1;if(!r&&i.startsWith("..")){let f=i.split("/");for(;f[0]==="..";)f.shift(),g-=1;o.pathname=f.join("/")}l=g>=0?n[g]:"/"}let c=Pi(o,l),u=i&&i!=="/"&&i.endsWith("/"),d=(a||i===".")&&t.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}var je=e=>e.join("/").replace(/\/\/+/g,"/"),Fi=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ai=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Di=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Ni(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Pr=["POST","PUT","PATCH","DELETE"];new Set(Pr);var Ti=["GET",...Pr];new Set(Ti);var De=$.createContext(null);De.displayName="DataRouter";var st=$.createContext(null);st.displayName="DataRouterState",$.createContext(!1);var Mr=$.createContext({isTransitioning:!1});Mr.displayName="ViewTransition";var zi=$.createContext(new Map);zi.displayName="Fetchers";var Oi=$.createContext(null);Oi.displayName="Await";var $e=$.createContext(null);$e.displayName="Navigation";var Xt=$.createContext(null);Xt.displayName="Location";var Re=$.createContext({outlet:null,matches:[],isDataRoute:!1});Re.displayName="Route";var Jt=$.createContext(null);Jt.displayName="RouteError";function Ii(e,{relative:n}={}){ge(ct(),"useHref() may be used only in the context of a <Router> component.");let{basename:t,navigator:r}=$.useContext($e),{hash:o,pathname:a,search:i}=Be(e,{relative:n}),l=a;return t!=="/"&&(l=a==="/"?t:je([t,a])),r.createHref({pathname:l,search:i,hash:o})}function ct(){return $.useContext(Xt)!=null}function Fe(){return ge(ct(),"useLocation() may be used only in the context of a <Router> component."),$.useContext(Xt).location}var Lr="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Fr(e){$.useContext($e).static||$.useLayoutEffect(e)}function Vi(){let{isDataRoute:e}=$.useContext(Re);return e?el():Hi()}function Hi(){ge(ct(),"useNavigate() may be used only in the context of a <Router> component.");let e=$.useContext(De),{basename:n,navigator:t}=$.useContext($e),{matches:r}=$.useContext(Re),{pathname:o}=Fe(),a=JSON.stringify(Er(r)),i=$.useRef(!1);return Fr(()=>{i.current=!0}),$.useCallback((c,u={})=>{if(ke(i.current,Lr),!i.current)return;if(typeof c=="number"){t.go(c);return}let d=_r(c,JSON.parse(a),o,u.relative==="path");e==null&&n!=="/"&&(d.pathname=d.pathname==="/"?n:je([n,d.pathname])),(u.replace?t.replace:t.push)(d,u.state,u)},[n,t,a,o,e])}$.createContext(null);function Be(e,{relative:n}={}){let{matches:t}=$.useContext(Re),{pathname:r}=Fe(),o=JSON.stringify(Er(t));return $.useMemo(()=>_r(e,JSON.parse(o),r,n==="path"),[e,o,r,n])}function Bi(e,n,t,r){ge(ct(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=$.useContext($e),{matches:a}=$.useContext(Re),i=a[a.length-1],l=i?i.params:{},c=i?i.pathname:"/",u=i?i.pathnameBase:"/",d=i&&i.route;{let x=d&&d.path||"";Dr(c,!d||x.endsWith("*")||x.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${x}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
178
179
|
|
|
179
|
-
Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let g=Fe(),f;f=g;let p=f.pathname||"/",v=p;if(u!=="/"){let x=u.replace(/^\//,"").split("/");v="/"+p.replace(/^\//,"").split("/").slice(x.length).join("/")}let m=kr(e,{pathname:v});return ke(d||m!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),ke(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Wi(m&&m.map(x=>Object.assign({},x,{params:Object.assign({},l,x.params),pathname:je([u,o.encodeLocation?o.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?u:je([u,o.encodeLocation?o.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),a,t,r)}function Hi(){let e=Xi(),n=Ai(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),t=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=$.createElement($.Fragment,null,$.createElement("p",null,"💿 Hey developer 👋"),$.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",$.createElement("code",{style:a},"ErrorBoundary")," or"," ",$.createElement("code",{style:a},"errorElement")," prop on your route.")),$.createElement($.Fragment,null,$.createElement("h2",null,"Unexpected Application Error!"),$.createElement("h3",{style:{fontStyle:"italic"}},n),t?$.createElement("pre",{style:o},t):null,i)}var Bi=$.createElement(Hi,null),qi=class extends $.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?$.createElement(Re.Provider,{value:this.props.routeContext},$.createElement(Jt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Gi({routeContext:e,match:n,children:t}){let r=$.useContext(De);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),$.createElement(Re.Provider,{value:e},t)}function Wi(e,n=[],t=null,r=null){if(e==null){if(!t)return null;if(t.errors)e=t.matches;else if(n.length===0&&!t.initialized&&t.matches.length>0)e=t.matches;else return null}let o=e,a=t==null?void 0:t.errors;if(a!=null){let c=o.findIndex(u=>u.route.id&&(a==null?void 0:a[u.route.id])!==void 0);me(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),o=o.slice(0,Math.min(o.length,c+1))}let i=!1,l=-1;if(t)for(let c=0;c<o.length;c++){let u=o[c];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(l=c),u.route.id){let{loaderData:d,errors:g}=t,f=u.route.loader&&!d.hasOwnProperty(u.route.id)&&(!g||g[u.route.id]===void 0);if(u.route.lazy||f){i=!0,l>=0?o=o.slice(0,l+1):o=[o[0]];break}}}return o.reduceRight((c,u,d)=>{let g,f=!1,p=null,v=null;t&&(g=a&&u.route.id?a[u.route.id]:void 0,p=u.route.errorElement||Bi,i&&(l<0&&d===0?(Dr("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,v=null):l===d&&(f=!0,v=u.route.hydrateFallbackElement||null)));let m=n.concat(o.slice(0,d+1)),b=()=>{let x;return g?x=p:f?x=v:u.route.Component?x=$.createElement(u.route.Component,null):u.route.element?x=u.route.element:x=c,$.createElement(Gi,{match:u,routeContext:{outlet:c,matches:m,isDataRoute:t!=null},children:x})};return t&&(u.route.ErrorBoundary||u.route.errorElement||d===0)?$.createElement(qi,{location:t.location,revalidation:t.revalidation,component:p,error:g,children:b(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):b()},null)}function Qt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ui(e){let n=$.useContext(De);return me(n,Qt(e)),n}function Yi(e){let n=$.useContext(st);return me(n,Qt(e)),n}function Zi(e){let n=$.useContext(Re);return me(n,Qt(e)),n}function en(e){let n=Zi(e),t=n.matches[n.matches.length-1];return me(t.route.id,`${e} can only be used on routes that contain a unique "id"`),t.route.id}function Ki(){return en("useRouteId")}function Xi(){var r;let e=$.useContext(Jt),n=Yi("useRouteError"),t=en("useRouteError");return e!==void 0?e:(r=n.errors)==null?void 0:r[t]}function Ji(){let{router:e}=Ui("useNavigate"),n=en("useNavigate"),t=$.useRef(!1);return Fr(()=>{t.current=!0}),$.useCallback(async(o,a={})=>{ke(t.current,Lr),t.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:n,...a}))},[e,n])}var Ar={};function Dr(e,n,t){!n&&!Ar[e]&&(Ar[e]=!0,ke(!1,t))}$.memo(Qi);function Qi({routes:e,future:n,state:t}){return Vi(e,void 0,t,n)}var ut="get",dt="application/x-www-form-urlencoded";function pt(e){return e!=null&&typeof e.tagName=="string"}function el(e){return pt(e)&&e.tagName.toLowerCase()==="button"}function tl(e){return pt(e)&&e.tagName.toLowerCase()==="form"}function nl(e){return pt(e)&&e.tagName.toLowerCase()==="input"}function rl(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ol(e,n){return e.button===0&&(!n||n==="_self")&&!rl(e)}var ft=null;function al(){if(ft===null)try{new FormData(document.createElement("form"),0),ft=!1}catch{ft=!0}return ft}var il=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function tn(e){return e!=null&&!il.has(e)?(ke(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${dt}"`),null):e}function ll(e,n){let t,r,o,a,i;if(tl(e)){let l=e.getAttribute("action");r=l?Pe(l,n):null,t=e.getAttribute("method")||ut,o=tn(e.getAttribute("enctype"))||dt,a=new FormData(e)}else if(el(e)||nl(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(r=c?Pe(c,n):null,t=e.getAttribute("formmethod")||l.getAttribute("method")||ut,o=tn(e.getAttribute("formenctype"))||tn(l.getAttribute("enctype"))||dt,a=new FormData(l,e),!al()){let{name:u,type:d,value:g}=e;if(d==="image"){let f=u?`${u}.`:"";a.append(`${f}x`,"0"),a.append(`${f}y`,"0")}else u&&a.append(u,g)}}else{if(pt(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=ut,r=null,o=dt,i=e}return a&&o==="text/plain"&&(i=a,a=void 0),{action:r,method:t.toLowerCase(),encType:o,formData:a,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function nn(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function sl(e,n,t){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname=`_root.${t}`:n&&Pe(r.pathname,n)==="/"?r.pathname=`${n.replace(/\/$/,"")}/_root.${t}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${t}`,r}async function cl(e,n){if(e.id in n)return n[e.id];try{let t=await import(e.module);return n[e.id]=t,t}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ul(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function dl(e,n,t){let r=await Promise.all(e.map(async o=>{let a=n.routes[o.route.id];if(a){let i=await cl(a,t);return i.links?i.links():[]}return[]}));return gl(r.flat(1).filter(ul).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Nr(e,n,t,r,o,a){let i=(c,u)=>t[u]?c.route.id!==t[u].route.id:!0,l=(c,u)=>{var d;return t[u].pathname!==c.pathname||((d=t[u].route.path)==null?void 0:d.endsWith("*"))&&t[u].params["*"]!==c.params["*"]};return a==="assets"?n.filter((c,u)=>i(c,u)||l(c,u)):a==="data"?n.filter((c,u)=>{var g;let d=r.routes[c.route.id];if(!d||!d.hasLoader)return!1;if(i(c,u)||l(c,u))return!0;if(c.route.shouldRevalidate){let f=c.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((g=t[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function pl(e,n,{includeHydrateFallback:t}={}){return fl(e.map(r=>{let o=n.routes[r.route.id];if(!o)return[];let a=[o.module];return o.clientActionModule&&(a=a.concat(o.clientActionModule)),o.clientLoaderModule&&(a=a.concat(o.clientLoaderModule)),t&&o.hydrateFallbackModule&&(a=a.concat(o.hydrateFallbackModule)),o.imports&&(a=a.concat(o.imports)),a}).flat(1))}function fl(e){return[...new Set(e)]}function ml(e){let n={},t=Object.keys(e).sort();for(let r of t)n[r]=e[r];return n}function gl(e,n){let t=new Set;return new Set(n),e.reduce((r,o)=>{let a=JSON.stringify(ml(o));return t.has(a)||(t.add(a),r.push({key:a,link:o})),r},[])}function Tr(){let e=$.useContext(De);return nn(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function vl(){let e=$.useContext(st);return nn(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var rn=$.createContext(void 0);rn.displayName="FrameworkContext";function zr(){let e=$.useContext(rn);return nn(e,"You must render this element inside a <HydratedRouter> element"),e}function hl(e,n){let t=$.useContext(rn),[r,o]=$.useState(!1),[a,i]=$.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:g}=n,f=$.useRef(null);$.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let m=x=>{x.forEach(R=>{i(R.isIntersecting)})},b=new IntersectionObserver(m,{threshold:.5});return f.current&&b.observe(f.current),()=>{b.disconnect()}}},[e]),$.useEffect(()=>{if(r){let m=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(m)}}},[r]);let p=()=>{o(!0)},v=()=>{o(!1),i(!1)};return t?e!=="intent"?[a,f,{}]:[a,f,{onFocus:qe(l,p),onBlur:qe(c,v),onMouseEnter:qe(u,p),onMouseLeave:qe(d,v),onTouchStart:qe(g,p)}]:[!1,f,{}]}function qe(e,n){return t=>{e&&e(t),t.defaultPrevented||n(t)}}function xl({page:e,...n}){let{router:t}=Tr(),r=$.useMemo(()=>kr(t.routes,e,t.basename),[t.routes,e,t.basename]);return r?$.createElement(wl,{page:e,matches:r,...n}):null}function bl(e){let{manifest:n,routeModules:t}=zr(),[r,o]=$.useState([]);return $.useEffect(()=>{let a=!1;return dl(e,n,t).then(i=>{a||o(i)}),()=>{a=!0}},[e,n,t]),r}function wl({page:e,matches:n,...t}){let r=Fe(),{manifest:o,routeModules:a}=zr(),{basename:i}=Tr(),{loaderData:l,matches:c}=vl(),u=$.useMemo(()=>Nr(e,n,c,o,r,"data"),[e,n,c,o,r]),d=$.useMemo(()=>Nr(e,n,c,o,r,"assets"),[e,n,c,o,r]),g=$.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let v=new Set,m=!1;if(n.forEach(x=>{var y;let R=o.routes[x.route.id];!R||!R.hasLoader||(!u.some(E=>E.route.id===x.route.id)&&x.route.id in l&&((y=a[x.route.id])!=null&&y.shouldRevalidate)||R.hasClientLoader?m=!0:v.add(x.route.id))}),v.size===0)return[];let b=sl(e,i,"data");return m&&v.size>0&&b.searchParams.set("_routes",n.filter(x=>v.has(x.route.id)).map(x=>x.route.id).join(",")),[b.pathname+b.search]},[i,l,r,o,u,n,e,a]),f=$.useMemo(()=>pl(d,o),[d,o]),p=bl(d);return $.createElement($.Fragment,null,g.map(v=>$.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...t})),f.map(v=>$.createElement("link",{key:v,rel:"modulepreload",href:v,...t})),p.map(({key:v,link:m})=>$.createElement("link",{key:v,...m})))}function yl(...e){return n=>{e.forEach(t=>{typeof t=="function"?t(n):t!=null&&(t.current=n)})}}var Or=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Or&&(window.__reactRouterVersion="7.7.1")}catch{}var Ir=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,on=$.forwardRef(function({onClick:n,discover:t="render",prefetch:r="none",relative:o,reloadDocument:a,replace:i,state:l,target:c,to:u,preventScrollReset:d,viewTransition:g,...f},p){let{basename:v}=$.useContext($e),m=typeof u=="string"&&Ir.test(u),b,x=!1;if(typeof u=="string"&&m&&(b=u,Or))try{let A=new URL(window.location.href),X=u.startsWith("//")?new URL(A.protocol+u):new URL(u),ae=Pe(X.pathname,v);X.origin===A.origin&&ae!=null?u=ae+X.search+X.hash:x=!0}catch{ke(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let R=zi(u,{relative:o}),[y,E,C]=hl(r,f),I=kl(u,{replace:i,state:l,target:c,preventScrollReset:d,relative:o,viewTransition:g});function T(A){n&&n(A),A.defaultPrevented||I(A)}let H=$.createElement("a",{...f,...C,href:b||R,onClick:x||a?n:T,ref:yl(p,E),target:c,"data-discover":!m&&t==="render"?"true":void 0});return y&&!m?$.createElement($.Fragment,null,H,$.createElement(xl,{page:R})):H});on.displayName="Link";var Vr=$.forwardRef(function({"aria-current":n="page",caseSensitive:t=!1,className:r="",end:o=!1,style:a,to:i,viewTransition:l,children:c,...u},d){let g=Be(i,{relative:u.relative}),f=Fe(),p=$.useContext(st),{navigator:v,basename:m}=$.useContext($e),b=p!=null&&_l(g)&&l===!0,x=v.encodeLocation?v.encodeLocation(g).pathname:g.pathname,R=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(R=R.toLowerCase(),y=y?y.toLowerCase():null,x=x.toLowerCase()),y&&m&&(y=Pe(y,m)||y);const E=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let C=R===x||!o&&R.startsWith(x)&&R.charAt(E)==="/",I=y!=null&&(y===x||!o&&y.startsWith(x)&&y.charAt(x.length)==="/"),T={isActive:C,isPending:I,isTransitioning:b},H=C?n:void 0,A;typeof r=="function"?A=r(T):A=[r,C?"active":null,I?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let X=typeof a=="function"?a(T):a;return $.createElement(on,{...u,"aria-current":H,className:A,ref:d,style:X,to:i,viewTransition:l},typeof c=="function"?c(T):c)});Vr.displayName="NavLink";var Cl=$.forwardRef(({discover:e="render",fetcherKey:n,navigate:t,reloadDocument:r,replace:o,state:a,method:i=ut,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:g,...f},p)=>{let v=Rl(),m=El(l,{relative:u}),b=i.toLowerCase()==="get"?"get":"post",x=typeof l=="string"&&Ir.test(l),R=y=>{if(c&&c(y),y.defaultPrevented)return;y.preventDefault();let E=y.nativeEvent.submitter,C=(E==null?void 0:E.getAttribute("formmethod"))||i;v(E||y.currentTarget,{fetcherKey:n,method:C,navigate:t,replace:o,state:a,relative:u,preventScrollReset:d,viewTransition:g})};return $.createElement("form",{ref:p,method:b,action:m,onSubmit:r?c:R,...f,"data-discover":!x&&e==="render"?"true":void 0})});Cl.displayName="Form";function Sl(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hr(e){let n=$.useContext(De);return me(n,Sl(e)),n}function kl(e,{target:n,replace:t,state:r,preventScrollReset:o,relative:a,viewTransition:i}={}){let l=Oi(),c=Fe(),u=Be(e,{relative:a});return $.useCallback(d=>{if(ol(d,n)){d.preventDefault();let g=t!==void 0?t:Yt(c)===Yt(u);l(e,{replace:g,state:r,preventScrollReset:o,relative:a,viewTransition:i})}},[c,l,u,t,r,n,e,o,a,i])}var jl=0,$l=()=>`__${String(++jl)}__`;function Rl(){let{router:e}=Hr("useSubmit"),{basename:n}=$.useContext($e),t=Ki();return $.useCallback(async(r,o={})=>{let{action:a,method:i,encType:l,formData:c,body:u}=ll(r,n);if(o.navigate===!1){let d=o.fetcherKey||$l();await e.fetch(d,t,o.action||a,{preventScrollReset:o.preventScrollReset,formData:c,body:u,formMethod:o.method||i,formEncType:o.encType||l,flushSync:o.flushSync})}else await e.navigate(o.action||a,{preventScrollReset:o.preventScrollReset,formData:c,body:u,formMethod:o.method||i,formEncType:o.encType||l,replace:o.replace,state:o.state,fromRouteId:t,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,n,t])}function El(e,{relative:n}={}){let{basename:t}=$.useContext($e),r=$.useContext(Re);me(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),a={...Be(e||".",{relative:n})},i=Fe();if(e==null){a.search=i.search;let l=new URLSearchParams(a.search),c=l.getAll("index");if(c.some(d=>d==="")){l.delete("index"),c.filter(g=>g).forEach(g=>l.append("index",g));let d=l.toString();a.search=d?`?${d}`:""}}return(!e||e===".")&&o.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(a.pathname=a.pathname==="/"?t:je([t,a.pathname])),Yt(a)}function _l(e,{relative:n}={}){let t=$.useContext(Mr);me(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Hr("useViewTransitionState"),o=Be(e,{relative:n});if(!t.isTransitioning)return!1;let a=Pe(t.currentLocation.pathname,r)||t.currentLocation.pathname,i=Pe(t.nextLocation.pathname,r)||t.nextLocation.pathname;return lt(o.pathname,i)!=null||lt(o.pathname,a)!=null}const Pl=({variant:e="fixed",activeTab:n,navItems:t,onTabChange:r,className:o="",activeClass:a="",buttonClass:i=""})=>{let l="flex justify-around items-center bg-color-white shadow-sm text-color-gray-600 py-2 px-4";return e==="fixed"?l+=" fixed bottom-0 left-0 right-0":e==="floating"?l+=" fixed bottom-4 left-4 right-4 rounded-full":e==="static"&&(l+=" static"),s.jsx("nav",{className:`${l} ${o}`,children:t.map(c=>{const u=c.label===n;return s.jsxs(on,{to:c.path,onClick:()=>r(c.label),className:`flex flex-col items-center text-sm cursor-pointer text-color-gray-500 no-underline ${i}`,children:[s.jsx("span",{className:`text-xl ${u?`text-color-blue-500 ${a}`:""}`,children:c.icon}),s.jsx("span",{className:`text-xs font-medium mt-1 ${u?`text-color-blue-500 ${a}`:""}`,children:c.label})]},c.label)})})},Ml=({items:e,separator:n="/",className:t=""})=>s.jsx("nav",{className:`text-sm text-color-gray-600 ${t}`,"aria-label":"Breadcrumb",children:s.jsx("ol",{className:"flex items-center space-x-1",children:e.map((r,o)=>s.jsxs("li",{className:"flex items-center",children:[r.href?s.jsx("a",{href:r.href,className:"text-color-gray-800 hover:underline font-medium",children:r.label}):s.jsx("span",{className:"text-color-gray-500 font-medium",children:r.label}),o<e.length-1&&s.jsx("span",{className:"mx-2 text-color-gray-400",children:n})]},o))})}),Br=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ll=["Su","Mo","Tu","We","Th","Fr","Sa"],Fl=({mode:e="single",type:n="inline",showTime:t=!1,onlyTime:r=!1,className:o,onChange:a,placeholder:i="Select date",icon:l=s.jsx("svg",{className:"text-color-gray-500 size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M7 3V1H9V3H15V1H17V3H21C21.5523 3 22 3.44772 22 4V9H20V5H17V7H15V5H9V7H7V5H4V19H10V21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H7ZM17 12C14.7909 12 13 13.7909 13 16C13 18.2091 14.7909 20 17 20C19.2091 20 21 18.2091 21 16C21 13.7909 19.2091 12 17 12ZM11 16C11 12.6863 13.6863 10 17 10C20.3137 10 23 12.6863 23 16C23 19.3137 20.3137 22 17 22C13.6863 22 11 19.3137 11 16ZM16 13V16.4142L18.2929 18.7071L19.7071 17.2929L18 15.5858V13H16Z"})}),disableBefore:c,disableAfter:u,selectedDate:d})=>{const[g,f]=w.useState(!1),[p,v]=w.useState(null),[m,b]=w.useState(new Date),[x,R]=w.useState(d?new Date(d):null),[y,E]=w.useState(null),[C,I]=w.useState(null),[T,H]=w.useState(null),[A,X]=w.useState({hour:12,minute:0,ampm:"AM"}),ae=w.useRef(null),[se,ee]=w.useState(d?new Date(d):null),[q,K]=w.useState(null),[O,ne]=w.useState(null);w.useEffect(()=>{R(d?new Date(d):null),ee(d?new Date(d):null)},[d]);const ue=k=>{k.stopPropagation(),v(k.currentTarget),f(!0)},J=()=>{f(!1)},h=k=>!!(c&&k.getTime()<c||u&&k.getTime()>u),S=k=>{n==="inline"&&ae.current&&!ae.current.contains(k.target)&&(e==="single"?x||R(null):e==="range"&&(!y||!C)&&(E(null),I(null)),f(!1))};w.useEffect(()=>(g?document.addEventListener("mousedown",S):document.removeEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)}),[g]);const F=k=>{!k||h(k)||(e==="single"?R(k):e==="range"&&(!y||y&&C?(E(k),I(null)):k>=y?I(k):E(k)))},L=k=>{if(!k||h(k)){H(null);return}e==="range"&&y&&!C&&H(k)},N=()=>{H(null)},V=()=>{if(f(!1),e==="single"){const k=r?new Date:x,j=k?new Date(k.getFullYear(),k.getMonth(),k.getDate(),A.ampm==="PM"&&A.hour!==12?A.hour+12:A.ampm==="AM"&&A.hour===12?0:A.hour,A.minute):null;ee(j),a==null||a(j?j.getTime():null)}else e==="range"&&(K(y),ne(C),a==null||a({startDate:y?y.getTime():null,endDate:C?C.getTime():null}))},z=()=>{const k=new Date(m.getFullYear(),m.getMonth(),1),j=new Date(m.getFullYear(),m.getMonth()+1,0),_=[],Q=k.getDay();for(let te=0;te<Q;te++)_.push(null);for(let te=1;te<=j.getDate();te++)_.push(new Date(m.getFullYear(),m.getMonth(),te));return _},P=k=>{if(!k)return!1;if(e==="single")return(x==null?void 0:x.toDateString())===k.toDateString();if(e==="range"){if(y&&!C&&T){const j=y<T?y:T,_=y<T?T:y;return k>=j&&k<=_}return y&&C&&k>=y&&k<=C}return!1},M=(k,j)=>{if(!k)return e==="range"?j==="end"?"End Date":"Start Date":r?`${String(A.hour).padStart(2,"0")}:${String(A.minute).padStart(2,"0")} ${A.ampm}`:i;if(r)return`${String(A.hour).padStart(2,"0")}:${String(A.minute).padStart(2,"0")} ${A.ampm}`;const _=k.getDate().toString().padStart(2,"0"),Q=Br[k.getMonth()],te=k.getFullYear(),ce=t?` ${String(A.hour).padStart(2,"0")}:${String(A.minute).padStart(2,"0")} ${A.ampm}`:"";return`${_} ${Q} ${te}${ce}`},G=s.jsxs("div",{className:"flex items-center justify-between w-full border border-color-gray-300 rounded-md p-2",children:[s.jsx("select",{value:A.hour,onChange:k=>X({...A,hour:parseInt(k.target.value)}),className:"w-16 border-0 text-center bg-color-transparent outline-0",children:Array.from({length:12},(k,j)=>j+1).map(k=>s.jsx("option",{value:k,children:k.toString().padStart(2,"0")},k))}),s.jsx("select",{value:A.minute,onChange:k=>X({...A,minute:parseInt(k.target.value)}),className:"w-16 border-0 text-center bg-color-transparent outline-0 border-l border-color-gray-300",children:Array.from({length:60},(k,j)=>j).map(k=>s.jsx("option",{value:k,children:k.toString().padStart(2,"0")},k))}),s.jsxs("select",{value:A.ampm,onChange:k=>X({...A,ampm:k.target.value}),className:"w-16 border-0 text-center bg-color-transparent outline-0 border-l border-color-gray-300",children:[s.jsx("option",{value:"AM",children:"AM"}),s.jsx("option",{value:"PM",children:"PM"})]})]}),W=s.jsxs("div",{ref:ae,className:`${n==="dialog"?"relative w-full":"absolute z-50 mt-2 w-72 rounded-lg border border-color-gray-200 bg-color-white shadow-xl p-4"}`,style:n==="dialog"?void 0:{position:"absolute",left:p==null?void 0:p.getBoundingClientRect().left,top:p?p.getBoundingClientRect().bottom+window.scrollY:0},children:[!r&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx(Ce,{variant:"transparent",size:"small",color:"gray",roundedFull:!0,onClick:()=>b(new Date(m.getFullYear(),m.getMonth()-1,1)),icon:s.jsx("svg",{className:"size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z"})})}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("select",{className:"text-sm outline-none",value:m.getMonth(),onChange:k=>b(new Date(m.getFullYear(),parseInt(k.target.value),1)),children:Br.map((k,j)=>s.jsx("option",{value:j,children:k},k))}),s.jsx("select",{className:"text-sm outline-none",value:m.getFullYear(),onChange:k=>b(new Date(parseInt(k.target.value),m.getMonth(),1)),children:Array.from({length:150},(k,j)=>new Date().getFullYear()-100+j).map(k=>s.jsx("option",{value:k,children:k},k))})]}),s.jsx(Ce,{variant:"transparent",size:"small",color:"gray",roundedFull:!0,onClick:()=>b(new Date(m.getFullYear(),m.getMonth()+1,1)),icon:s.jsx("svg",{className:"size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"})})})]}),s.jsxs("div",{className:"grid grid-columns-7 gap-1 text-center text-sm mb-2",children:[Ll.map(k=>s.jsx("div",{className:"font-semibold",children:k},k)),z().map((k,j)=>s.jsx("div",{className:`size-8 flex justify-center items-center text-sm rounded-full transition-all
|
|
180
|
+
Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let g=Fe(),f;f=g;let p=f.pathname||"/",v=p;if(u!=="/"){let x=u.replace(/^\//,"").split("/");v="/"+p.replace(/^\//,"").split("/").slice(x.length).join("/")}let m=kr(e,{pathname:v});return ke(d||m!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),ke(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),Yi(m&&m.map(x=>Object.assign({},x,{params:Object.assign({},l,x.params),pathname:je([u,o.encodeLocation?o.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?u:je([u,o.encodeLocation?o.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),a,t,r)}function qi(){let e=Qi(),n=Ni(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),t=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=$.createElement($.Fragment,null,$.createElement("p",null,"💿 Hey developer 👋"),$.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",$.createElement("code",{style:a},"ErrorBoundary")," or"," ",$.createElement("code",{style:a},"errorElement")," prop on your route.")),$.createElement($.Fragment,null,$.createElement("h2",null,"Unexpected Application Error!"),$.createElement("h3",{style:{fontStyle:"italic"}},n),t?$.createElement("pre",{style:o},t):null,i)}var Gi=$.createElement(qi,null),Wi=class extends $.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?$.createElement(Re.Provider,{value:this.props.routeContext},$.createElement(Jt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Ui({routeContext:e,match:n,children:t}){let r=$.useContext(De);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),$.createElement(Re.Provider,{value:e},t)}function Yi(e,n=[],t=null,r=null){if(e==null){if(!t)return null;if(t.errors)e=t.matches;else if(n.length===0&&!t.initialized&&t.matches.length>0)e=t.matches;else return null}let o=e,a=t==null?void 0:t.errors;if(a!=null){let c=o.findIndex(u=>u.route.id&&(a==null?void 0:a[u.route.id])!==void 0);ge(c>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),o=o.slice(0,Math.min(o.length,c+1))}let i=!1,l=-1;if(t)for(let c=0;c<o.length;c++){let u=o[c];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(l=c),u.route.id){let{loaderData:d,errors:g}=t,f=u.route.loader&&!d.hasOwnProperty(u.route.id)&&(!g||g[u.route.id]===void 0);if(u.route.lazy||f){i=!0,l>=0?o=o.slice(0,l+1):o=[o[0]];break}}}return o.reduceRight((c,u,d)=>{let g,f=!1,p=null,v=null;t&&(g=a&&u.route.id?a[u.route.id]:void 0,p=u.route.errorElement||Gi,i&&(l<0&&d===0?(Dr("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,v=null):l===d&&(f=!0,v=u.route.hydrateFallbackElement||null)));let m=n.concat(o.slice(0,d+1)),b=()=>{let x;return g?x=p:f?x=v:u.route.Component?x=$.createElement(u.route.Component,null):u.route.element?x=u.route.element:x=c,$.createElement(Ui,{match:u,routeContext:{outlet:c,matches:m,isDataRoute:t!=null},children:x})};return t&&(u.route.ErrorBoundary||u.route.errorElement||d===0)?$.createElement(Wi,{location:t.location,revalidation:t.revalidation,component:p,error:g,children:b(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):b()},null)}function Qt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Zi(e){let n=$.useContext(De);return ge(n,Qt(e)),n}function Ki(e){let n=$.useContext(st);return ge(n,Qt(e)),n}function Xi(e){let n=$.useContext(Re);return ge(n,Qt(e)),n}function en(e){let n=Xi(e),t=n.matches[n.matches.length-1];return ge(t.route.id,`${e} can only be used on routes that contain a unique "id"`),t.route.id}function Ji(){return en("useRouteId")}function Qi(){var r;let e=$.useContext(Jt),n=Ki("useRouteError"),t=en("useRouteError");return e!==void 0?e:(r=n.errors)==null?void 0:r[t]}function el(){let{router:e}=Zi("useNavigate"),n=en("useNavigate"),t=$.useRef(!1);return Fr(()=>{t.current=!0}),$.useCallback(async(o,a={})=>{ke(t.current,Lr),t.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:n,...a}))},[e,n])}var Ar={};function Dr(e,n,t){!n&&!Ar[e]&&(Ar[e]=!0,ke(!1,t))}$.memo(tl);function tl({routes:e,future:n,state:t}){return Bi(e,void 0,t,n)}var ut="get",dt="application/x-www-form-urlencoded";function pt(e){return e!=null&&typeof e.tagName=="string"}function nl(e){return pt(e)&&e.tagName.toLowerCase()==="button"}function rl(e){return pt(e)&&e.tagName.toLowerCase()==="form"}function ol(e){return pt(e)&&e.tagName.toLowerCase()==="input"}function al(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function il(e,n){return e.button===0&&(!n||n==="_self")&&!al(e)}var ft=null;function ll(){if(ft===null)try{new FormData(document.createElement("form"),0),ft=!1}catch{ft=!0}return ft}var sl=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function tn(e){return e!=null&&!sl.has(e)?(ke(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${dt}"`),null):e}function cl(e,n){let t,r,o,a,i;if(rl(e)){let l=e.getAttribute("action");r=l?Pe(l,n):null,t=e.getAttribute("method")||ut,o=tn(e.getAttribute("enctype"))||dt,a=new FormData(e)}else if(nl(e)||ol(e)&&(e.type==="submit"||e.type==="image")){let l=e.form;if(l==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||l.getAttribute("action");if(r=c?Pe(c,n):null,t=e.getAttribute("formmethod")||l.getAttribute("method")||ut,o=tn(e.getAttribute("formenctype"))||tn(l.getAttribute("enctype"))||dt,a=new FormData(l,e),!ll()){let{name:u,type:d,value:g}=e;if(d==="image"){let f=u?`${u}.`:"";a.append(`${f}x`,"0"),a.append(`${f}y`,"0")}else u&&a.append(u,g)}}else{if(pt(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=ut,r=null,o=dt,i=e}return a&&o==="text/plain"&&(i=a,a=void 0),{action:r,method:t.toLowerCase(),encType:o,formData:a,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function nn(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function ul(e,n,t){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname=`_root.${t}`:n&&Pe(r.pathname,n)==="/"?r.pathname=`${n.replace(/\/$/,"")}/_root.${t}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${t}`,r}async function dl(e,n){if(e.id in n)return n[e.id];try{let t=await import(e.module);return n[e.id]=t,t}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function pl(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function fl(e,n,t){let r=await Promise.all(e.map(async o=>{let a=n.routes[o.route.id];if(a){let i=await dl(a,t);return i.links?i.links():[]}return[]}));return hl(r.flat(1).filter(pl).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Nr(e,n,t,r,o,a){let i=(c,u)=>t[u]?c.route.id!==t[u].route.id:!0,l=(c,u)=>{var d;return t[u].pathname!==c.pathname||((d=t[u].route.path)==null?void 0:d.endsWith("*"))&&t[u].params["*"]!==c.params["*"]};return a==="assets"?n.filter((c,u)=>i(c,u)||l(c,u)):a==="data"?n.filter((c,u)=>{var g;let d=r.routes[c.route.id];if(!d||!d.hasLoader)return!1;if(i(c,u)||l(c,u))return!0;if(c.route.shouldRevalidate){let f=c.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((g=t[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof f=="boolean")return f}return!0}):[]}function ml(e,n,{includeHydrateFallback:t}={}){return gl(e.map(r=>{let o=n.routes[r.route.id];if(!o)return[];let a=[o.module];return o.clientActionModule&&(a=a.concat(o.clientActionModule)),o.clientLoaderModule&&(a=a.concat(o.clientLoaderModule)),t&&o.hydrateFallbackModule&&(a=a.concat(o.hydrateFallbackModule)),o.imports&&(a=a.concat(o.imports)),a}).flat(1))}function gl(e){return[...new Set(e)]}function vl(e){let n={},t=Object.keys(e).sort();for(let r of t)n[r]=e[r];return n}function hl(e,n){let t=new Set;return new Set(n),e.reduce((r,o)=>{let a=JSON.stringify(vl(o));return t.has(a)||(t.add(a),r.push({key:a,link:o})),r},[])}function Tr(){let e=$.useContext(De);return nn(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function xl(){let e=$.useContext(st);return nn(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var rn=$.createContext(void 0);rn.displayName="FrameworkContext";function zr(){let e=$.useContext(rn);return nn(e,"You must render this element inside a <HydratedRouter> element"),e}function bl(e,n){let t=$.useContext(rn),[r,o]=$.useState(!1),[a,i]=$.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:g}=n,f=$.useRef(null);$.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let m=x=>{x.forEach(R=>{i(R.isIntersecting)})},b=new IntersectionObserver(m,{threshold:.5});return f.current&&b.observe(f.current),()=>{b.disconnect()}}},[e]),$.useEffect(()=>{if(r){let m=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(m)}}},[r]);let p=()=>{o(!0)},v=()=>{o(!1),i(!1)};return t?e!=="intent"?[a,f,{}]:[a,f,{onFocus:qe(l,p),onBlur:qe(c,v),onMouseEnter:qe(u,p),onMouseLeave:qe(d,v),onTouchStart:qe(g,p)}]:[!1,f,{}]}function qe(e,n){return t=>{e&&e(t),t.defaultPrevented||n(t)}}function wl({page:e,...n}){let{router:t}=Tr(),r=$.useMemo(()=>kr(t.routes,e,t.basename),[t.routes,e,t.basename]);return r?$.createElement(Cl,{page:e,matches:r,...n}):null}function yl(e){let{manifest:n,routeModules:t}=zr(),[r,o]=$.useState([]);return $.useEffect(()=>{let a=!1;return fl(e,n,t).then(i=>{a||o(i)}),()=>{a=!0}},[e,n,t]),r}function Cl({page:e,matches:n,...t}){let r=Fe(),{manifest:o,routeModules:a}=zr(),{basename:i}=Tr(),{loaderData:l,matches:c}=xl(),u=$.useMemo(()=>Nr(e,n,c,o,r,"data"),[e,n,c,o,r]),d=$.useMemo(()=>Nr(e,n,c,o,r,"assets"),[e,n,c,o,r]),g=$.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let v=new Set,m=!1;if(n.forEach(x=>{var y;let R=o.routes[x.route.id];!R||!R.hasLoader||(!u.some(E=>E.route.id===x.route.id)&&x.route.id in l&&((y=a[x.route.id])!=null&&y.shouldRevalidate)||R.hasClientLoader?m=!0:v.add(x.route.id))}),v.size===0)return[];let b=ul(e,i,"data");return m&&v.size>0&&b.searchParams.set("_routes",n.filter(x=>v.has(x.route.id)).map(x=>x.route.id).join(",")),[b.pathname+b.search]},[i,l,r,o,u,n,e,a]),f=$.useMemo(()=>ml(d,o),[d,o]),p=yl(d);return $.createElement($.Fragment,null,g.map(v=>$.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...t})),f.map(v=>$.createElement("link",{key:v,rel:"modulepreload",href:v,...t})),p.map(({key:v,link:m})=>$.createElement("link",{key:v,...m})))}function Sl(...e){return n=>{e.forEach(t=>{typeof t=="function"?t(n):t!=null&&(t.current=n)})}}var Or=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Or&&(window.__reactRouterVersion="7.7.1")}catch{}var Ir=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,on=$.forwardRef(function({onClick:n,discover:t="render",prefetch:r="none",relative:o,reloadDocument:a,replace:i,state:l,target:c,to:u,preventScrollReset:d,viewTransition:g,...f},p){let{basename:v}=$.useContext($e),m=typeof u=="string"&&Ir.test(u),b,x=!1;if(typeof u=="string"&&m&&(b=u,Or))try{let A=new URL(window.location.href),X=u.startsWith("//")?new URL(A.protocol+u):new URL(u),ae=Pe(X.pathname,v);X.origin===A.origin&&ae!=null?u=ae+X.search+X.hash:x=!0}catch{ke(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let R=Ii(u,{relative:o}),[y,E,C]=bl(r,f),I=$l(u,{replace:i,state:l,target:c,preventScrollReset:d,relative:o,viewTransition:g});function T(A){n&&n(A),A.defaultPrevented||I(A)}let H=$.createElement("a",{...f,...C,href:b||R,onClick:x||a?n:T,ref:Sl(p,E),target:c,"data-discover":!m&&t==="render"?"true":void 0});return y&&!m?$.createElement($.Fragment,null,H,$.createElement(wl,{page:R})):H});on.displayName="Link";var Vr=$.forwardRef(function({"aria-current":n="page",caseSensitive:t=!1,className:r="",end:o=!1,style:a,to:i,viewTransition:l,children:c,...u},d){let g=Be(i,{relative:u.relative}),f=Fe(),p=$.useContext(st),{navigator:v,basename:m}=$.useContext($e),b=p!=null&&Ml(g)&&l===!0,x=v.encodeLocation?v.encodeLocation(g).pathname:g.pathname,R=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(R=R.toLowerCase(),y=y?y.toLowerCase():null,x=x.toLowerCase()),y&&m&&(y=Pe(y,m)||y);const E=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let C=R===x||!o&&R.startsWith(x)&&R.charAt(E)==="/",I=y!=null&&(y===x||!o&&y.startsWith(x)&&y.charAt(x.length)==="/"),T={isActive:C,isPending:I,isTransitioning:b},H=C?n:void 0,A;typeof r=="function"?A=r(T):A=[r,C?"active":null,I?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let X=typeof a=="function"?a(T):a;return $.createElement(on,{...u,"aria-current":H,className:A,ref:d,style:X,to:i,viewTransition:l},typeof c=="function"?c(T):c)});Vr.displayName="NavLink";var kl=$.forwardRef(({discover:e="render",fetcherKey:n,navigate:t,reloadDocument:r,replace:o,state:a,method:i=ut,action:l,onSubmit:c,relative:u,preventScrollReset:d,viewTransition:g,...f},p)=>{let v=_l(),m=Pl(l,{relative:u}),b=i.toLowerCase()==="get"?"get":"post",x=typeof l=="string"&&Ir.test(l),R=y=>{if(c&&c(y),y.defaultPrevented)return;y.preventDefault();let E=y.nativeEvent.submitter,C=(E==null?void 0:E.getAttribute("formmethod"))||i;v(E||y.currentTarget,{fetcherKey:n,method:C,navigate:t,replace:o,state:a,relative:u,preventScrollReset:d,viewTransition:g})};return $.createElement("form",{ref:p,method:b,action:m,onSubmit:r?c:R,...f,"data-discover":!x&&e==="render"?"true":void 0})});kl.displayName="Form";function jl(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Hr(e){let n=$.useContext(De);return ge(n,jl(e)),n}function $l(e,{target:n,replace:t,state:r,preventScrollReset:o,relative:a,viewTransition:i}={}){let l=Vi(),c=Fe(),u=Be(e,{relative:a});return $.useCallback(d=>{if(il(d,n)){d.preventDefault();let g=t!==void 0?t:Yt(c)===Yt(u);l(e,{replace:g,state:r,preventScrollReset:o,relative:a,viewTransition:i})}},[c,l,u,t,r,n,e,o,a,i])}var Rl=0,El=()=>`__${String(++Rl)}__`;function _l(){let{router:e}=Hr("useSubmit"),{basename:n}=$.useContext($e),t=Ji();return $.useCallback(async(r,o={})=>{let{action:a,method:i,encType:l,formData:c,body:u}=cl(r,n);if(o.navigate===!1){let d=o.fetcherKey||El();await e.fetch(d,t,o.action||a,{preventScrollReset:o.preventScrollReset,formData:c,body:u,formMethod:o.method||i,formEncType:o.encType||l,flushSync:o.flushSync})}else await e.navigate(o.action||a,{preventScrollReset:o.preventScrollReset,formData:c,body:u,formMethod:o.method||i,formEncType:o.encType||l,replace:o.replace,state:o.state,fromRouteId:t,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,n,t])}function Pl(e,{relative:n}={}){let{basename:t}=$.useContext($e),r=$.useContext(Re);ge(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),a={...Be(e||".",{relative:n})},i=Fe();if(e==null){a.search=i.search;let l=new URLSearchParams(a.search),c=l.getAll("index");if(c.some(d=>d==="")){l.delete("index"),c.filter(g=>g).forEach(g=>l.append("index",g));let d=l.toString();a.search=d?`?${d}`:""}}return(!e||e===".")&&o.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(a.pathname=a.pathname==="/"?t:je([t,a.pathname])),Yt(a)}function Ml(e,{relative:n}={}){let t=$.useContext(Mr);ge(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Hr("useViewTransitionState"),o=Be(e,{relative:n});if(!t.isTransitioning)return!1;let a=Pe(t.currentLocation.pathname,r)||t.currentLocation.pathname,i=Pe(t.nextLocation.pathname,r)||t.nextLocation.pathname;return lt(o.pathname,i)!=null||lt(o.pathname,a)!=null}const Ll=({variant:e="fixed",activeTab:n,navItems:t,onTabChange:r,className:o="",activeClass:a="",buttonClass:i=""})=>{let l="flex justify-around items-center bg-color-white shadow-sm text-color-gray-600 py-2 px-4";return e==="fixed"?l+=" fixed bottom-0 left-0 right-0":e==="floating"?l+=" fixed bottom-4 left-4 right-4 rounded-full":e==="static"&&(l+=" static"),s.jsx("nav",{className:`${l} ${o}`,children:t.map(c=>{const u=c.label===n;return s.jsxs(on,{to:c.path,onClick:()=>r(c.label),className:`flex flex-col items-center text-sm cursor-pointer text-color-gray-500 no-underline ${i}`,children:[s.jsx("span",{className:`text-xl ${u?`text-color-blue-500 ${a}`:""}`,children:c.icon}),s.jsx("span",{className:`text-xs font-medium mt-1 ${u?`text-color-blue-500 ${a}`:""}`,children:c.label})]},c.label)})})},Fl=({items:e,separator:n="/",className:t=""})=>s.jsx("nav",{className:`text-sm text-color-gray-600 ${t}`,"aria-label":"Breadcrumb",children:s.jsx("ol",{className:"flex items-center space-x-1",children:e.map((r,o)=>s.jsxs("li",{className:"flex items-center",children:[r.href?s.jsx("a",{href:r.href,className:"text-color-gray-800 hover:underline font-medium",children:r.label}):s.jsx("span",{className:"text-color-gray-500 font-medium",children:r.label}),o<e.length-1&&s.jsx("span",{className:"mx-2 text-color-gray-400",children:n})]},o))})}),Br=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Al=["Su","Mo","Tu","We","Th","Fr","Sa"],Dl=({mode:e="single",type:n="inline",showTime:t=!1,onlyTime:r=!1,className:o,onChange:a,placeholder:i="Select date",icon:l=s.jsx("svg",{className:"text-color-gray-500 size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M7 3V1H9V3H15V1H17V3H21C21.5523 3 22 3.44772 22 4V9H20V5H17V7H15V5H9V7H7V5H4V19H10V21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H7ZM17 12C14.7909 12 13 13.7909 13 16C13 18.2091 14.7909 20 17 20C19.2091 20 21 18.2091 21 16C21 13.7909 19.2091 12 17 12ZM11 16C11 12.6863 13.6863 10 17 10C20.3137 10 23 12.6863 23 16C23 19.3137 20.3137 22 17 22C13.6863 22 11 19.3137 11 16ZM16 13V16.4142L18.2929 18.7071L19.7071 17.2929L18 15.5858V13H16Z"})}),disableBefore:c,disableAfter:u,selectedDate:d})=>{const[g,f]=w.useState(!1),[p,v]=w.useState(null),[m,b]=w.useState(new Date),[x,R]=w.useState(d?new Date(d):null),[y,E]=w.useState(null),[C,I]=w.useState(null),[T,H]=w.useState(null),[A,X]=w.useState({hour:12,minute:0,ampm:"AM"}),ae=w.useRef(null),[se,ee]=w.useState(d?new Date(d):null),[q,K]=w.useState(null),[O,ne]=w.useState(null);w.useEffect(()=>{R(d?new Date(d):null),ee(d?new Date(d):null)},[d]);const ue=k=>{k.stopPropagation(),v(k.currentTarget),f(!0)},J=()=>{f(!1)},h=k=>!!(c&&k.getTime()<c||u&&k.getTime()>u),S=k=>{n==="inline"&&ae.current&&!ae.current.contains(k.target)&&(e==="single"?x||R(null):e==="range"&&(!y||!C)&&(E(null),I(null)),f(!1))};w.useEffect(()=>(g?document.addEventListener("mousedown",S):document.removeEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)}),[g]);const F=k=>{!k||h(k)||(e==="single"?R(k):e==="range"&&(!y||y&&C?(E(k),I(null)):k>=y?I(k):E(k)))},L=k=>{if(!k||h(k)){H(null);return}e==="range"&&y&&!C&&H(k)},N=()=>{H(null)},V=()=>{if(f(!1),e==="single"){const k=r?new Date:x,j=k?new Date(k.getFullYear(),k.getMonth(),k.getDate(),A.ampm==="PM"&&A.hour!==12?A.hour+12:A.ampm==="AM"&&A.hour===12?0:A.hour,A.minute):null;ee(j),a==null||a(j?j.getTime():null)}else e==="range"&&(K(y),ne(C),a==null||a({startDate:y?y.getTime():null,endDate:C?C.getTime():null}))},z=()=>{const k=new Date(m.getFullYear(),m.getMonth(),1),j=new Date(m.getFullYear(),m.getMonth()+1,0),_=[],Q=k.getDay();for(let te=0;te<Q;te++)_.push(null);for(let te=1;te<=j.getDate();te++)_.push(new Date(m.getFullYear(),m.getMonth(),te));return _},P=k=>{if(!k)return!1;if(e==="single")return(x==null?void 0:x.toDateString())===k.toDateString();if(e==="range"){if(y&&!C&&T){const j=y<T?y:T,_=y<T?T:y;return k>=j&&k<=_}return y&&C&&k>=y&&k<=C}return!1},M=(k,j)=>{if(!k)return e==="range"?j==="end"?"End Date":"Start Date":r?`${String(A.hour).padStart(2,"0")}:${String(A.minute).padStart(2,"0")} ${A.ampm}`:i;if(r)return`${String(A.hour).padStart(2,"0")}:${String(A.minute).padStart(2,"0")} ${A.ampm}`;const _=k.getDate().toString().padStart(2,"0"),Q=Br[k.getMonth()],te=k.getFullYear(),ce=t?` ${String(A.hour).padStart(2,"0")}:${String(A.minute).padStart(2,"0")} ${A.ampm}`:"";return`${_} ${Q} ${te}${ce}`},G=s.jsxs("div",{className:"flex items-center justify-between w-full border border-color-gray-300 rounded-md p-2",children:[s.jsx("select",{value:A.hour,onChange:k=>X({...A,hour:parseInt(k.target.value)}),className:"w-16 border-0 text-center bg-color-transparent outline-0",children:Array.from({length:12},(k,j)=>j+1).map(k=>s.jsx("option",{value:k,children:k.toString().padStart(2,"0")},k))}),s.jsx("select",{value:A.minute,onChange:k=>X({...A,minute:parseInt(k.target.value)}),className:"w-16 border-0 text-center bg-color-transparent outline-0 border-l border-color-gray-300",children:Array.from({length:60},(k,j)=>j).map(k=>s.jsx("option",{value:k,children:k.toString().padStart(2,"0")},k))}),s.jsxs("select",{value:A.ampm,onChange:k=>X({...A,ampm:k.target.value}),className:"w-16 border-0 text-center bg-color-transparent outline-0 border-l border-color-gray-300",children:[s.jsx("option",{value:"AM",children:"AM"}),s.jsx("option",{value:"PM",children:"PM"})]})]}),W=s.jsxs("div",{ref:ae,className:`${n==="dialog"?"relative w-full":"absolute z-50 mt-2 w-72 rounded-lg border border-color-gray-200 bg-color-white shadow-xl p-4"}`,style:n==="dialog"?void 0:{position:"absolute",left:p==null?void 0:p.getBoundingClientRect().left,top:p?p.getBoundingClientRect().bottom+window.scrollY:0},children:[!r&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx(Ce,{variant:"transparent",size:"small",color:"gray",roundedFull:!0,onClick:()=>b(new Date(m.getFullYear(),m.getMonth()-1,1)),icon:s.jsx("svg",{className:"size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z"})})}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("select",{className:"text-sm outline-none",value:m.getMonth(),onChange:k=>b(new Date(m.getFullYear(),parseInt(k.target.value),1)),children:Br.map((k,j)=>s.jsx("option",{value:j,children:k},k))}),s.jsx("select",{className:"text-sm outline-none",value:m.getFullYear(),onChange:k=>b(new Date(parseInt(k.target.value),m.getMonth(),1)),children:Array.from({length:150},(k,j)=>new Date().getFullYear()-100+j).map(k=>s.jsx("option",{value:k,children:k},k))})]}),s.jsx(Ce,{variant:"transparent",size:"small",color:"gray",roundedFull:!0,onClick:()=>b(new Date(m.getFullYear(),m.getMonth()+1,1)),icon:s.jsx("svg",{className:"size-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"})})})]}),s.jsxs("div",{className:"grid grid-columns-7 gap-1 text-center text-sm mb-2",children:[Al.map(k=>s.jsx("div",{className:"font-semibold",children:k},k)),z().map((k,j)=>s.jsx("div",{className:`size-8 flex justify-center items-center text-sm rounded-full transition-all
|
|
180
181
|
${k?"hover:bg-color-blue-100 cursor-pointer":""}
|
|
181
182
|
${k&&P(k)?"bg-color-blue-500 hover:bg-color-blue-500 text-color-white":""}
|
|
182
|
-
${k&&h(k)?"bg-color-gray-100 text-color-gray-400 !cursor-not-allowed hover:bg-color-gray-100":""}`,onClick:()=>k&&F(k),onMouseEnter:()=>k&&L(k),onMouseLeave:N,children:k?k.getDate():""},j))]})]}),(t||r)&&G,s.jsx("div",{className:"mt-4 flex justify-end",children:s.jsx(Ye,{fullWidth:!0,onClick:V,disabled:e==="range"&&!C&&!r,className:`${e==="range"&&!C&&!r?"bg-color-gray-400 cursor-not-allowed":""}`,children:"Confirm"})})]});return s.jsxs("div",{className:"relative",children:[s.jsxs(Ye,{onClick:ue,fullWidth:!0,color:"gray",variant:"outlined",className:`!justify-between gap-2 ${o||""}`,children:[e==="single"?se?M(se):i:y||q||O?s.jsxs(s.Fragment,{children:[M(y||q,"start")," -"," ",M(C||O,"end")]}):i,l]}),n==="inline"?s.jsx(s.Fragment,{children:g&&Te.createPortal(W,document.body)}):s.jsx(Cr,{open:g,title:r?"Select Time":i,onClose:J,children:s.jsx("div",{className:"w-72",children:W})})]})},
|
|
183
|
+
${k&&h(k)?"bg-color-gray-100 text-color-gray-400 !cursor-not-allowed hover:bg-color-gray-100":""}`,onClick:()=>k&&F(k),onMouseEnter:()=>k&&L(k),onMouseLeave:N,children:k?k.getDate():""},j))]})]}),(t||r)&&G,s.jsx("div",{className:"mt-4 flex justify-end",children:s.jsx(Ye,{fullWidth:!0,onClick:V,disabled:e==="range"&&!C&&!r,className:`${e==="range"&&!C&&!r?"bg-color-gray-400 cursor-not-allowed":""}`,children:"Confirm"})})]});return s.jsxs("div",{className:"relative",children:[s.jsxs(Ye,{onClick:ue,fullWidth:!0,color:"gray",variant:"outlined",className:`!justify-between gap-2 ${o||""}`,children:[e==="single"?se?M(se):i:y||q||O?s.jsxs(s.Fragment,{children:[M(y||q,"start")," -"," ",M(C||O,"end")]}):i,l]}),n==="inline"?s.jsx(s.Fragment,{children:g&&Te.createPortal(W,document.body)}):s.jsx(Cr,{open:g,title:r?"Select Time":i,onClose:J,children:s.jsx("div",{className:"w-72",children:W})})]})},Nl=({tabs:e,activeKey:n,onChange:t,className:r="",tabsClass:o="",tabItemClass:a="",tabContentClass:i="",variant:l="horizontal"})=>{const c=e.find(d=>d.key===n),u=l==="vertical";return s.jsxs("div",{className:`w-full flex ${u?"flex-row":"flex-col"} ${r}`,children:[s.jsx("div",{className:`${u?"flex flex-col min-w-[160px] border-r border-color-gray-200":"flex space-x-6 border-b border-color-gray-200"} ${o}`,children:e.map(d=>{const g=n===d.key;return s.jsxs("button",{onClick:()=>t(d.key),className:`relative flex ${u?"flex-row items-center px-4 py-3":"flex-col items-center py-4"}
|
|
183
184
|
text-sm font-medium transition-color duration-200 bg-color-transparent
|
|
184
185
|
${g?"text-color-blue-500":"text-color-gray-600 hover:text-color-blue-500 cursor-pointer"}
|
|
185
|
-
${a}`,children:[s.jsxs("div",{className:`flex items-center ${u?"space-x-3":"space-x-2"}`,children:[d.icon&&s.jsx("span",{children:d.icon}),s.jsx("span",{children:d.label})]}),g&&(u?s.jsx("div",{className:"absolute right-0 top-3 bottom-3 w-1 bg-color-blue-500 rounded-full"}):s.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1 bg-color-blue-500 rounded-full"}))]},d.key)})}),s.jsx("div",{className:`mt-4 ${u?"ml-6 mt-0":""} ${i}`,children:c==null?void 0:c.content})]})},
|
|
186
|
-
md:p-2 not-last:pb-4 w-full h-full ${t.className}`,children:[s.jsx("div",{className:`p-2 ${t.accentColor} ${t.accentBackground} flex-shrink-0 flex items-center justify-center p-4 text-md rounded-lg`,children:t.icon}),s.jsxs("div",{className:"flex flex-col justify-center gap-1 w-full ",children:[s.jsx("div",{className:"text-sm",children:t.name}),s.jsx("div",{className:`text-xl ${t.accentColor} font-semibold`,children:t.value})]})]},r))})});function
|
|
186
|
+
${a}`,children:[s.jsxs("div",{className:`flex items-center ${u?"space-x-3":"space-x-2"}`,children:[d.icon&&s.jsx("span",{children:d.icon}),s.jsx("span",{children:d.label})]}),g&&(u?s.jsx("div",{className:"absolute right-0 top-3 bottom-3 w-1 bg-color-blue-500 rounded-full"}):s.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1 bg-color-blue-500 rounded-full"}))]},d.key)})}),s.jsx("div",{className:`mt-4 ${u?"ml-6 mt-0":""} ${i}`,children:c==null?void 0:c.content})]})},Tl=({stats:e=[],className:n=""})=>s.jsx(yr,{className:`w-full ${n}`,children:s.jsx("div",{className:"grid grid-columns-1 sm:grid-columns-1 md:grid-columns-2 lg:grid-columns-4 gap-4 justify-items-center",children:e.map((t,r)=>s.jsxs("div",{className:`flex items-center justify-center gap-4 lg:not-last:border-r md:not-last:border-r md:nth-2:border-r-0 md:not-last:border-b-0 not-last:border-b border-color-gray-200
|
|
187
|
+
md:p-2 not-last:pb-4 w-full h-full ${t.className}`,children:[s.jsx("div",{className:`p-2 ${t.accentColor} ${t.accentBackground} flex-shrink-0 flex items-center justify-center p-4 text-md rounded-lg`,children:t.icon}),s.jsxs("div",{className:"flex flex-col justify-center gap-1 w-full ",children:[s.jsx("div",{className:"text-sm",children:t.name}),s.jsx("div",{className:`text-xl ${t.accentColor} font-semibold`,children:t.value})]})]},r))})});function zl({items:e=[],logoJSX:n,position:t,defaultActive:r,open:o=!0,onClose:a,onItemSelect:i}){const[l,c]=w.useState(r),u=d=>{c(d),d.onClick&&d.onClick(),i&&i(d)};return s.jsx(s.Fragment,{children:s.jsx(Sr,{open:o,onClose:a,anchor:t,showCloseIcon:!1,children:s.jsxs("div",{className:"",children:[n&&s.jsx("div",{className:"pb-6",children:n}),s.jsx("nav",{className:"space-y-2 text-sm font-medium text-color-gray-700",children:e.map(d=>d.href?s.jsxs(Vr,{to:d.href,className:`flex items-center gap-3 py-3 px-4 cursor-pointer rounded-full w-full no-underline
|
|
187
188
|
${d.label===(l==null?void 0:l.label)?"bg-color-blue-500 text-color-white font-medium ":"hover:bg-color-gray-50 text-color-gray-600"}
|
|
188
189
|
`,onClick:()=>u(d),children:[s.jsx("span",{className:"text-lg",children:d.icon}),s.jsx("span",{children:d.label})]},d.label):s.jsxs("button",{onClick:()=>u(d),className:`flex items-center gap-3 py-3 px-4 cursor-pointer rounded-full w-full no-underline
|
|
189
190
|
${d.label===(l==null?void 0:l.label)?"bg-color-blue-500 text-color-white font-medium ":"hover:bg-color-gray-50 text-color-gray-600 bg-color-transparent"}
|
|
190
|
-
`,children:[s.jsx("span",{className:"text-lg",children:d.icon}),s.jsx("span",{children:d.label})]}))})]})})})}B.Accordion=
|
|
191
|
+
`,children:[s.jsx("span",{className:"text-lg",children:d.icon}),s.jsx("span",{children:d.label})]}))})]})})})}B.Accordion=di,B.ActionMenu=ci,B.Alert=gi,B.Avatar=tr,B.Badge=vi,B.BottomNavigation=Ll,B.Breadcrumbs=Fl,B.Button=Ye,B.COLOR_MAP=me,B.Card=yr,B.CardWrapper=Kr,B.Carousel=ei,B.Checkbox=Xr,B.DashboardStatBoxes=Tl,B.DatePicker=Dl,B.Dialog=Cr,B.Divider=ri,B.Drawer=Sr,B.Dropdown=Jr,B.DropzoneUploader=ra,B.EmptyState=ti,B.IconButton=Ce,B.Menu=Jn,B.OtpInput=Qn,B.Pagination=mr,B.PasswordInput=er,B.Pill=ua,B.ProfileImageShowcase=da,B.Progress=Ja,B.RANGE_COLOR_MAP=Ue,B.RadioGroup=oi,B.Rating=Qa,B.Select=ai,B.Sidebar=zl,B.Skeleton=Ua,B.Slider=Ka,B.Snackbar=Xa,B.Stepper=pa,B.Table=Wa,B.Tabs=Nl,B.TextArea=Ya,B.TextInput=Lt,B.ToggleSwitch=ni,B.Tooltip=ii,B.Typography=fr,B.extendColorMap=Yr,B.extendRangeColorMap=Zr,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})});
|