aha-components 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Tab.esm.js +1 -1
- package/dist/Tab.esm.js.map +1 -1
- package/dist/Tab.js +1 -1
- package/dist/Tab.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import i,{createContext as o,useMemo as r,useContext as l,useState as a,useEffect as s,useCallback as d,useRef as c,forwardRef as u,useImperativeHandle as p}from"react";import{createPortal as f}from"react-dom";var h=function(){return h=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},h.apply(this,arguments)};function g(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}function v(e,t,n,i){return new(n||(n=Promise))(function(o,r){function l(e){try{s(i.next(e))}catch(e){r(e)}}function a(e){try{s(i.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(l,a)}s((i=i.apply(e,t||[])).next())})}function x(e,t){var n,i,o,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=a(0),l.throw=a(1),l.return=a(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,a[0]&&(r=0)),r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function m(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var y={primaryColor:"#FB6011"},b=o(y),w=function(t){var n=t.theme,i=t.children,o=r(function(){return h(h({},y),n)},[n]);return e(b.Provider,{value:o,children:i})},C=function(){var e=l(b);return e||y},F={small:{height:"32px",paddingLeft:"12px",paddingRight:"12px",fontSize:"14px",lineHeight:"20px",iconSize:"16px",gap:"6px"},mediumSmall:{height:"36px",paddingLeft:"14px",paddingRight:"14px",fontSize:"14px",lineHeight:"20px",iconSize:"16px",gap:"6px"},medium:{height:"40px",paddingLeft:"16px",paddingRight:"16px",fontSize:"14px",lineHeight:"20px",iconSize:"18px",gap:"8px"},large:{height:"48px",paddingLeft:"20px",paddingRight:"20px",fontSize:"16px",lineHeight:"24px",iconSize:"20px",gap:"8px"}},k=function(i){var o=i.size,r=i.color;return t(n,{children:[e("style",{children:"\n @keyframes aha-button-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n "}),t("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",style:{animation:"aha-button-spin 1s linear infinite"},children:[e("circle",{cx:"12",cy:"12",r:"10",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"24",opacity:"0.3"}),e("circle",{cx:"12",cy:"12",r:"10",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"16"})]})]})},S=function(n){var i,o=n.children,r=n.type,l=void 0===r?"default":r,s=n.size,d=void 0===s?"medium":s,c=n.disabled,u=void 0!==c&&c,p=n.loading,f=void 0!==p&&p,v=n.onClick,x=n.htmlType,m=void 0===x?"button":x,y=n.className,b=void 0===y?"":y,w=n.style,S=n.icon,E=n.iconPosition,A=void 0===E?"left":E,z=g(n,["children","type","size","disabled","loading","onClick","htmlType","className","style","icon","iconPosition"]),L=C().primaryColor,D=void 0===L?"#FB6011":L,B=a(!1),M=B[0],T=B[1],W=a(!1),N=W[0],I=W[1],j=F[d],R=u||f,H=function(){if(f){var t="primary"===l?"#FFFFFF":"#101828",n=parseInt(j.iconSize.replace("px",""));return e(k,{size:n,color:t})}return S?e("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:j.iconSize,height:j.iconSize,flexShrink:0},children:S}):null},O=(i=h({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:j.gap,height:j.height,paddingLeft:j.paddingLeft,paddingRight:j.paddingRight,fontSize:j.fontSize,lineHeight:j.lineHeight,fontWeight:500,fontFamily:"DM Sans, sans-serif",borderRadius:"8px",border:"none",cursor:R?"not-allowed":"pointer",outline:"none",transition:"all 0.2s",userSelect:"none",WebkitTapHighlightColor:"transparent"},w),"primary"===l?(i.color="#FFFFFF",i.backgroundColor=D,u?(i.opacity=.4,i.cursor="not-allowed"):f?i.backgroundColor=D:N?i.backgroundColor="#EC470A":M&&(i.backgroundColor="#FD843A")):u?(i.backgroundColor="#FAFAF9",i.color="#D6D3D1",i.border="1px solid #E7E5E4"):f?(i.backgroundColor="#FFFFFF",i.color="#101828",i.border="1px solid #E7E5E4",i.boxShadow="0px 1px 2px 0px rgba(12, 10, 9, 0.05)"):N?(i.backgroundColor="#F5F5F4",i.color="#101828",i.border="1px solid #D7D3D0",i.boxShadow="0px 1px 2px 0px rgba(12, 10, 9, 0.05)"):M?(i.backgroundColor="#FAFAF9",i.color="#101828",i.border="1px solid #D7D3D0",i.boxShadow="0px 2px 4px 0px rgba(12, 10, 9, 0.08)"):(i.backgroundColor="#FFFFFF",i.color="#101828",i.border="1px solid #E7E5E4",i.boxShadow="0px 1px 2px 0px rgba(12, 10, 9, 0.05)"),i);return t("button",h({type:m,className:"aha-button aha-button--".concat(l," aha-button--").concat(d," ").concat(R?"aha-button--disabled":""," ").concat(f?"aha-button--loading":""," ").concat(b),disabled:R,onClick:function(e){R?e.preventDefault():null==v||v(e)},onMouseEnter:function(){return!R&&T(!0)},onMouseLeave:function(){T(!1),I(!1)},onMouseDown:function(){return!R&&I(!0)},onMouseUp:function(){return I(!1)},style:O},z,{children:[f&&H(),!f&&"left"===A&&H(),o&&e("span",{style:{display:"inline-block"},children:o}),!f&&"right"===A&&H()]}))};S.displayName="Button";var E={success:e("svg",{className:"flex-shrink-0",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M10 1.66663C5.40002 1.66663 1.66669 5.39996 1.66669 9.99996C1.66669 14.6 5.40002 18.3333 10 18.3333C14.6 18.3333 18.3334 14.6 18.3334 9.99996C18.3334 5.39996 14.6 1.66663 10 1.66663ZM13.3584 8.49997L9.46668 12.3833C9.35001 12.5083 9.19168 12.5666 9.02501 12.5666C8.86668 12.5666 8.70834 12.5083 8.58334 12.3833L6.64169 10.4417C6.40002 10.2 6.40002 9.79994 6.64169 9.55827C6.88336 9.3166 7.28335 9.3166 7.52502 9.55827L9.02501 11.0583L12.475 7.61664C12.7167 7.36664 13.1167 7.36664 13.3584 7.61664C13.6 7.8583 13.6 8.24997 13.3584 8.49997Z",fill:"#00BC7D"})}),error:e("svg",{className:"flex-shrink-0",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M17.1342 6.3009L13.6999 2.86666C13.4658 2.63249 13.1474 2.50085 12.8157 2.50085H7.18504C6.85337 2.50085 6.53584 2.63249 6.30084 2.86666L2.8666 6.3009C2.63243 6.53507 2.50079 6.85343 2.50079 7.1851V12.8158C2.50079 13.1475 2.63243 13.465 2.8666 13.7L6.30084 17.1342C6.53501 17.3684 6.85337 17.5 7.18504 17.5H12.8157C13.1474 17.5 13.4649 17.3684 13.6999 17.1342L17.1342 13.7C17.3683 13.4658 17.5 13.1475 17.5 12.8158V7.1851C17.5 6.85343 17.3683 6.53507 17.1342 6.3009ZM12.525 11.6417C12.7692 11.8858 12.7692 12.2817 12.525 12.5259C12.4033 12.6475 12.2433 12.7092 12.0833 12.7092C11.9233 12.7092 11.7633 12.6484 11.6416 12.5259L9.99998 10.8842L8.35834 12.5259C8.23667 12.6475 8.07665 12.7092 7.91665 12.7092C7.75665 12.7092 7.59662 12.6484 7.47496 12.5259C7.23079 12.2817 7.23079 11.8858 7.47496 11.6417L9.1166 10L7.47496 8.3584C7.23079 8.11423 7.23079 7.71837 7.47496 7.4742C7.71912 7.23004 8.11498 7.23004 8.35915 7.4742L10.0008 9.11585L11.6424 7.4742C11.8866 7.23004 12.2825 7.23004 12.5266 7.4742C12.7708 7.71837 12.7708 8.11423 12.5266 8.3584L10.885 10L12.525 11.6417Z",fill:"#FB2C36"})}),warning:e("svg",{className:"flex-shrink-0",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M18.0057 14.2935L12.4999 3.99662C11.4333 2.00162 8.56744 2.00162 7.49995 3.99662L1.99417 14.2935C1.01583 16.1235 2.3442 18.3334 4.42337 18.3334H15.5765C17.6549 18.3334 18.9841 16.1226 18.0057 14.2935ZM9.37495 8.33337C9.37495 7.98837 9.65494 7.70837 9.99994 7.70837C10.3449 7.70837 10.6249 7.98837 10.6249 8.33337V11.6667C10.6249 12.0117 10.3449 12.2917 9.99994 12.2917C9.65494 12.2917 9.37495 12.0117 9.37495 11.6667V8.33337ZM10.0166 15C9.55663 15 9.17902 14.6267 9.17902 14.1667C9.17902 13.7067 9.54829 13.3334 10.0083 13.3334H10.0166C10.4775 13.3334 10.85 13.7067 10.85 14.1667C10.85 14.6267 10.4766 15 10.0166 15Z",fill:"#FE9A00"})}),info:e("svg",{className:"flex-shrink-0",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M14.6875 2.5H5.3125C3.4375 2.5 2.5 3.4375 2.5 5.3125V14.6875C2.5 16.5625 3.4375 17.5 5.3125 17.5H14.6875C16.5625 17.5 17.5 16.5625 17.5 14.6875V5.3125C17.5 3.4375 16.5625 2.5 14.6875 2.5ZM10.625 13.75C10.625 14.095 10.345 14.375 10 14.375C9.655 14.375 9.375 14.095 9.375 13.75V9.9408C9.375 9.5958 9.655 9.3158 10 9.3158C10.345 9.3158 10.625 9.5958 10.625 9.9408V13.75ZM10.0167 7.91667C9.55668 7.91667 9.17908 7.54333 9.17908 7.08333C9.17908 6.62333 9.54834 6.25 10.0083 6.25H10.0167C10.4775 6.25 10.85 6.62333 10.85 7.08333C10.85 7.54333 10.4767 7.91667 10.0167 7.91667Z",fill:"#2B7FFF"})})},A=e("svg",{className:"flex-shrink-0",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M15.4416 14.5583C15.6858 14.8025 15.6858 15.1984 15.4416 15.4425C15.32 15.5642 15.16 15.6258 15 15.6258C14.84 15.6258 14.68 15.565 14.5583 15.4425L9.99997 10.8842L5.44164 15.4425C5.31997 15.5642 5.15997 15.6258 4.99997 15.6258C4.83997 15.6258 4.67997 15.565 4.55831 15.4425C4.31414 15.1984 4.31414 14.8025 4.55831 14.5583L9.11664 10L4.55831 5.44171C4.31414 5.19754 4.31414 4.80168 4.55831 4.55751C4.80247 4.31335 5.19831 4.31335 5.44248 4.55751L10.0008 9.11587L14.5591 4.55751C14.8033 4.31335 15.1991 4.31335 15.4433 4.55751C15.6875 4.80168 15.6875 5.19754 15.4433 5.44171L10.885 10L15.4416 14.5583Z",fill:"#57534D"})}),z=function(n){var i=n.className,o=void 0===i?"":i,r=n.type,l=void 0===r?"info":r,s=n.title,d=n.description,c=n.icon,u=void 0===c?E[l]:c,p=n.showIcon,f=void 0===p||p,h=n.closeable,g=void 0!==h&&h,v=n.action,x=n.children,m=n.onClose,y=a(!0),b=y[0],w=y[1];return b?t("div",{className:"".concat("aha-alert px-4 py-3 rounded-md flex gap-2 relative"," ").concat(o),style:{success:{backgroundColor:"#ECFDF5"},error:{backgroundColor:"#FEF2F2"},warning:{backgroundColor:"#FFFBEB"},info:{backgroundColor:"#EFF6FF"}}[l],children:[f&&u,t("div",{className:"flex flex-col gap-1",style:g?{paddingRight:"2rem"}:{},children:[s&&e("div",{className:"justify-start text-[#292524] text-base font-semibold font-['DM_Sans'] leading-normal",children:s}),d&&e("div",{className:"w-full justify-center text-[#57534D] text-sm font-normal font-['DM_Sans'] leading-snug",children:d}),x&&e("div",{className:"w-full justify-center text-[#57534D] text-sm font-normal font-['DM_Sans'] leading-snug",children:x}),v&&g&&e("div",{className:"mt-3",children:v})]}),v&&!g&&e("div",{className:"ml-3",children:v}),g&&e("div",{className:"absolute right-4 top-3 cursor-pointer",onClick:function(){w(!1),null==m||m()},children:A})]}):null},L={success:e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM16.03 10.2L11.36 14.86C11.22 15.01 11.03 15.08 10.83 15.08C10.64 15.08 10.45 15.01 10.3 14.86L7.97 12.53C7.68 12.24 7.68 11.76 7.97 11.47C8.26 11.18 8.74 11.18 9.03 11.47L10.83 13.27L14.97 9.14001C15.26 8.84001 15.74 8.84001 16.03 9.14001C16.32 9.43001 16.32 9.90001 16.03 10.2Z",fill:"#ECFDF5"})}),error:e("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M21.3506 7.56104L17.2295 3.43994C16.9485 3.15894 16.5665 3.00098 16.1685 3.00098H9.41162C9.01362 3.00098 8.63259 3.15894 8.35059 3.43994L4.22949 7.56104C3.94849 7.84204 3.79053 8.22407 3.79053 8.62207V15.3789C3.79053 15.7769 3.94849 16.1579 4.22949 16.4399L8.35059 20.561C8.63159 20.842 9.01362 21 9.41162 21H16.1685C16.5665 21 16.9475 20.842 17.2295 20.561L21.3506 16.4399C21.6316 16.1589 21.7896 15.7769 21.7896 15.3789V8.62207C21.7896 8.22407 21.6316 7.84204 21.3506 7.56104ZM15.8196 13.97C16.1126 14.263 16.1126 14.738 15.8196 15.031C15.6736 15.177 15.4816 15.251 15.2896 15.251C15.0976 15.251 14.9055 15.178 14.7595 15.031L12.7896 13.061L10.8196 15.031C10.6736 15.177 10.4816 15.251 10.2896 15.251C10.0976 15.251 9.90552 15.178 9.75952 15.031C9.46652 14.738 9.46652 14.263 9.75952 13.97L11.7295 12L9.75952 10.03C9.46652 9.73703 9.46652 9.26199 9.75952 8.96899C10.0525 8.67599 10.5276 8.67599 10.8206 8.96899L12.7905 10.939L14.7605 8.96899C15.0535 8.67599 15.5285 8.67599 15.8215 8.96899C16.1145 9.26199 16.1145 9.73703 15.8215 10.03L13.8516 12L15.8196 13.97Z",fill:"#FEF2F2"})}),question:e("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M18.2041 3H6.9541C4.7041 3 3.5791 4.125 3.5791 6.375V17.625C3.5791 19.875 4.7041 21 6.9541 21H18.2041C20.4541 21 21.5791 19.875 21.5791 17.625V6.375C21.5791 4.125 20.4541 3 18.2041 3ZM12.5991 17.5C12.0471 17.5 11.594 17.052 11.594 16.5C11.594 15.948 12.0371 15.5 12.5891 15.5H12.5991C13.1521 15.5 13.5991 15.948 13.5991 16.5C13.5991 17.052 13.1511 17.5 12.5991 17.5ZM14.1821 12.5281C13.4511 13.0181 13.315 13.291 13.29 13.363C13.185 13.676 12.8931 13.874 12.5791 13.874C12.5001 13.874 12.4201 13.862 12.3411 13.835C11.9481 13.703 11.7372 13.278 11.8682 12.885C12.0492 12.345 12.5182 11.836 13.3462 11.281C14.3672 10.597 14.2361 9.84707 14.1931 9.60107C14.0801 8.94707 13.5291 8.38988 12.8821 8.27588C12.3891 8.18588 11.9092 8.31488 11.5332 8.62988C11.1552 8.94688 10.938 9.41391 10.938 9.90991C10.938 10.3239 10.602 10.6599 10.188 10.6599C9.77399 10.6599 9.43799 10.3239 9.43799 9.90991C9.43799 8.96891 9.85009 8.08396 10.5691 7.48096C11.2811 6.88496 12.2181 6.63605 13.1431 6.80005C14.4101 7.02405 15.4492 8.07097 15.6702 9.34497C15.8902 10.607 15.3611 11.7381 14.1821 12.5281Z",fill:"#FAFAF9"})}),info:e("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M18.2041 3H6.9541C4.7041 3 3.5791 4.125 3.5791 6.375V17.625C3.5791 19.875 4.7041 21 6.9541 21H18.2041C20.4541 21 21.5791 19.875 21.5791 17.625V6.375C21.5791 4.125 20.4541 3 18.2041 3ZM12.5991 17.5C12.0471 17.5 11.594 17.052 11.594 16.5C11.594 15.948 12.0371 15.5 12.5891 15.5H12.5991C13.1521 15.5 13.5991 15.948 13.5991 16.5C13.5991 17.052 13.1511 17.5 12.5991 17.5ZM14.1821 12.5281C13.4511 13.0181 13.315 13.291 13.29 13.363C13.185 13.676 12.8931 13.874 12.5791 13.874C12.5001 13.874 12.4201 13.862 12.3411 13.835C11.9481 13.703 11.7372 13.278 11.8682 12.885C12.0492 12.345 12.5182 11.836 13.3462 11.281C14.3672 10.597 14.2361 9.84707 14.1931 9.60107C14.0801 8.94707 13.5291 8.38988 12.8821 8.27588C12.3891 8.18588 11.9092 8.31488 11.5332 8.62988C11.1552 8.94688 10.938 9.41391 10.938 9.90991C10.938 10.3239 10.602 10.6599 10.188 10.6599C9.77399 10.6599 9.43799 10.3239 9.43799 9.90991C9.43799 8.96891 9.85009 8.08396 10.5691 7.48096C11.2811 6.88496 12.2181 6.63605 13.1431 6.80005C14.4101 7.02405 15.4492 8.07097 15.6702 9.34497C15.8902 10.607 15.3611 11.7381 14.1821 12.5281Z",fill:"#FAFAF9"})})},D=function(t){var n=t.className;return e("svg",{className:"flex-shrink-0 ".concat(n),width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M15.4416 14.5583C15.6858 14.8025 15.6858 15.1984 15.4416 15.4425C15.32 15.5642 15.16 15.6258 15 15.6258C14.84 15.6258 14.68 15.565 14.5583 15.4425L9.99997 10.8842L5.44164 15.4425C5.31997 15.5642 5.15997 15.6258 4.99997 15.6258C4.83997 15.6258 4.67997 15.565 4.55831 15.4425C4.31414 15.1984 4.31414 14.8025 4.55831 14.5583L9.11664 10L4.55831 5.44171C4.31414 5.19754 4.31414 4.80168 4.55831 4.55751C4.80247 4.31335 5.19831 4.31335 5.44248 4.55751L10.0008 9.11587L14.5591 4.55751C14.8033 4.31335 15.1991 4.31335 15.4433 4.55751C15.6875 4.80168 15.6875 5.19754 15.4433 5.44171L10.885 10L15.4416 14.5583Z",fill:"currentColor"})})},B=function(){function e(){this.toasts=[],this.listeners=new Set}return e.prototype.addToast=function(e){var t=Math.random().toString(36).slice(-8),n={id:t,props:e};return this.toasts.push(n),console.log("Toast: 添加 Toast 到管理器,ID:",t,"当前总数:",this.toasts.length),this.notifyListeners(),t},e.prototype.removeToast=function(e){this.toasts=this.toasts.filter(function(t){return t.id!==e}),this.notifyListeners()},e.prototype.getToasts=function(){return m([],this.toasts,!0)},e.prototype.subscribe=function(e){var t=this;return this.listeners.add(e),function(){return t.listeners.delete(e)}},e.prototype.notifyListeners=function(){console.log("Toast: 通知监听器,监听器数量:",this.listeners.size),this.listeners.forEach(function(e){return e()})},e.prototype.clearAll=function(){this.toasts=[],this.notifyListeners()},e}(),M=new B,T=function(){var i=a([]),o=i[0],r=i[1];s(function(){console.log("Toast: ToastContainer 组件已挂载");var e=M.getToasts();console.log("Toast: 初始 Toast 数量:",e.length),r(e);var t=M.subscribe(function(){var e=M.getToasts();console.log("Toast: 收到 Toast 更新,当前数量:",e.length,"Toast IDs:",e.map(function(e){return e.id})),r(e)});return t},[]);var l=o.filter(function(e){return"top-left"===e.props.position}),d=o.filter(function(e){return"top-right"===e.props.position}),c=o.filter(function(e){return"bottom-left"===e.props.position}),u=o.filter(function(e){return"bottom-right"===e.props.position});return t(n,{children:[e("div",{style:{position:"fixed",top:"16px",left:"16px",zIndex:9999,pointerEvents:"none",display:"flex",flexDirection:"column",gap:"8px"},children:l.map(function(t){return e(W,h({},t),t.id)})}),e("div",{style:{position:"fixed",top:"16px",right:"16px",zIndex:9999,pointerEvents:"none",display:"flex",flexDirection:"column",gap:"8px"},children:d.map(function(t){return e(W,h({},t),t.id)})}),e("div",{style:{position:"fixed",bottom:"16px",left:"16px",zIndex:9999,pointerEvents:"none",display:"flex",flexDirection:"column",gap:"8px"},children:c.map(function(t){return e(W,h({},t),t.id)})}),e("div",{style:{position:"fixed",bottom:"16px",right:"16px",zIndex:9999,pointerEvents:"none",display:"flex",flexDirection:"column",gap:"8px"},children:u.map(function(t){return e(W,h({},t),t.id)})})]})},W=function(n){var i=n.id,o=n.props,r=a(!1),l=r[0],c=r[1],u=a(!1),p=u[0],f=u[1],h=o.message,g=o.type,v=void 0===g?"info":g,x=o.duration,m=void 0===x?3e3:x,y=o.icon,b=o.action,w=o.showClose,C=void 0===w||w,F=o.onClose,k=o.onClick;o.className;var S=function(e){switch(e){case"success":return{bgColor:"#009966",defaultIcon:L.success};case"error":return{bgColor:"#E7000B",defaultIcon:L.error};case"question":return{bgColor:"#1C1917",defaultIcon:L.question};default:return{bgColor:"#1447E6",defaultIcon:L.info}}}(v);s(function(){var e=setTimeout(function(){c(!0)},10);return function(){return clearTimeout(e)}},[]),s(function(){if(m>0){var e=setTimeout(function(){E()},m);return function(){return clearTimeout(e)}}},[m,i]);var E=d(function(){f(!0),setTimeout(function(){M.removeToast(i),null==F||F()},300)},[i,F]),A=d(function(){null==k||k()},[k]);return e("div",{style:{pointerEvents:"auto",maxWidth:"380px",background:"white",borderRadius:"8px",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",overflow:"hidden",transform:l&&!p?"translateY(0) scale(1)":"translateY(8px) scale(0.95)",opacity:l&&!p?1:0,transition:"all 300ms ease-out",position:"relative",cursor:k?"pointer":"default"},onClick:A,children:t("div",{style:{display:"flex",alignItems:"flex-start",padding:"16px",backgroundColor:S.bgColor,color:"white"},children:[e("div",{style:{flexShrink:0,width:"24px",height:"24px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"8px"},children:y||S.defaultIcon}),t("div",{style:{flex:1,minWidth:0,paddingRight:"20px"},children:[e("div",{style:{width:"100%",justifyContent:"flex-start",color:"#f0fdf4",fontSize:"14px",fontWeight:500,fontFamily:"DM Sans, sans-serif",lineHeight:"24px"},children:h}),b&&e("div",{style:{marginTop:"12px"},children:b})]}),C&&e("button",{onClick:function(e){e.stopPropagation(),E()},style:{flexShrink:0,width:"20px",height:"20px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 200ms",position:"absolute",top:"14px",right:"16px",background:"transparent",border:"none",cursor:"pointer",color:"white"},onMouseEnter:function(e){e.currentTarget.style.background="rgba(255, 255, 255, 0.1)"},onMouseLeave:function(e){e.currentTarget.style.background="transparent"},children:e(D,{})})]})})},N=function(t){return e(W,{id:"direct",props:t})},I=function(e){return console.log("Toast: 调用 toast 函数",e),X(),setTimeout(function(){var t=M.addToast(e);console.log("Toast: 添加 Toast 成功,ID:",t)},100),Math.random().toString(36).slice(-8)},j=function(e){M.removeToast(e)},R=function(){M.clearAll()},H=function(){console.log("=== Toast 调试信息 ==="),console.log("当前环境:","undefined"!=typeof window?"浏览器":"服务端"),console.log("document 可用:","undefined"!=typeof document),console.log("容器元素:",document.getElementById("aha-toast-container")),console.log("Toast 管理器状态:",M.getToasts()),console.log("容器根节点:",K),console.log("是否正在初始化:",Y),console.log("====================")},O=function(e,t){return X(),I(h(h({},t),{message:e,type:"success"}))},P=function(e,t){return X(),I(h(h({},t),{message:e,type:"error"}))},V=function(e,t){return X(),I(h(h({},t),{message:e,type:"info"}))},q=function(e,t){return X(),I(h(h({},t),{message:e,type:"question"}))},Z=null,K=null,Y=!1,X=function(){if(console.log("Toast: 开始确保容器存在"),"undefined"!=typeof window&&"undefined"!=typeof document)if(Y)console.log("Toast: 容器正在初始化中,跳过");else if(Z)console.log("Toast: 容器已存在,跳过创建");else{console.log("Toast: 创建新的 Toast 容器"),Y=!0;try{var t=document.getElementById("aha-toast-container");if(t)return console.log("Toast: 发现已存在的容器"),Z=t,void(Y=!1);console.log("Toast: 创建容器元素"),(Z=document.createElement("div")).id="aha-toast-container",document.body.appendChild(Z),console.log("Toast: 容器已添加到 document.body"),console.log("Toast: 开始导入 ReactDOM");try{var n=require("react-dom/client").createRoot;console.log("Toast: ReactDOM 同步导入成功,创建根节点"),K=n(Z),console.log("Toast: 渲染 ToastContainer 组件"),K.render(e(T,{})),console.log("Toast: 容器渲染完成"),Y=!1}catch(t){console.log("Toast: 同步导入失败,尝试动态导入",t),import("react-dom/client").then(function(t){var n=t.createRoot;try{console.log("Toast: ReactDOM 动态导入成功,创建根节点"),K=n(Z),console.log("Toast: 渲染 ToastContainer 组件"),K.render(e(T,{})),console.log("Toast: 容器渲染完成")}catch(e){console.error("Toast: 渲染容器失败",e)}Y=!1}).catch(function(e){console.error("Toast: 导入 ReactDOM 失败",e),Y=!1})}}catch(e){console.error("Toast: 创建容器失败",e),Y=!1}}else console.warn("Toast: 当前环境不支持 Toast 组件")},G=function(i){var o=i.children,r=a(!1),l=r[0],d=r[1];return s(function(){d(!0)},[]),t(n,{children:[o,l&&f(e(T,{}),document.body)]})},_={Green:{light:{bg:"#ECFDF5",text:"#006045",border:"#A4F4CF"},fill:{bg:"#00BC7D",text:"#FFFFFF"}},Red:{light:{bg:"#FEF2F2",text:"#9F0712",border:"#FFC9C9"},fill:{bg:"#FB2C36",text:"#FFFFFF"}},Orange:{light:{bg:"#FFF6ED",text:"#9B2911",border:"#FFD1A9"},fill:{bg:"#FB6011",text:"#FFFFFF"}},Cyan:{light:{bg:"#ECFEFF",text:"#005F78",border:"#A2F4FD"},fill:{bg:"#00B8DB",text:"#FFFFFF"}},Violet:{light:{bg:"#F5F3FF",text:"#5D0EC0",border:"#DDD6FF"},fill:{bg:"#8E51FF",text:"#FFFFFF"}},Pink:{light:{bg:"#FDF2F8",text:"#A3004C",border:"#FCCEE8"},fill:{bg:"#F6339A",text:"#FFFFFF"}},Gray:{light:{bg:"#F5F5F4",text:"#292524",border:"#E7E5E4"},fill:{bg:"#292524",text:"#FFFFFF"}},Yellow:{light:{bg:"#FFFBEB",text:"#973C00",border:"#FEE685"},fill:{bg:"#FE9A00",text:"#FFFFFF"}},Blue:{light:{bg:"#EFF6FF",text:"#193CB8",border:"#BEDBFF"},fill:{bg:"#2B7FFF",text:"#FFFFFF"}}},U={large:{padding:"px-2 py-0.5",textSize:"text-sm",iconSize:"w-4 h-4",gap:"gap-1"},small:{padding:"px-2 py-0.5",textSize:"text-xs",iconSize:"w-3 h-3",gap:"gap-0.5"}},J=function(n){var o=n.children,r=n.color,l=n.variant,a=void 0===l?"light":l,s=n.size,d=void 0===s?"large":s,c=n.stroke,u=void 0!==c&&c,p=n.icon,f=n.iconPosition,v=void 0===f?"none":f,x=n.className,m=void 0===x?"":x,y=n.onClick,b=g(n,["children","color","variant","size","stroke","icon","iconPosition","className","onClick"]),w=C().primaryColor,F=function(e,t){if("string"==typeof e&&e in _){var n=_[e];return"Orange"===e&&t?h(h({},n),{fill:h(h({},n.fill),{bg:t})}):n}if("string"==typeof e&&e.startsWith("#")){var i=e.replace("#",""),o=parseInt(i.substr(0,2),16),r=parseInt(i.substr(2,2),16),l=parseInt(i.substr(4,2),16);return{light:{bg:"rgba(".concat(o,", ").concat(r,", ").concat(l,", 0.1)"),text:e,border:"rgba(".concat(o,", ").concat(r,", ").concat(l,", 0.3)")},fill:{bg:e,text:"#FFFFFF"}}}return _.Green}(r,w),k=U[d],S={borderRadius:"0.375rem",display:"inline-flex",justifyContent:"start",alignItems:"center",padding:"2px 8px",gap:"large"===d?"4px":"2px",fontWeight:500,fontFamily:"DM Sans, sans-serif",lineHeight:"large"===d?"1.375":"1",transition:"all 0.2s",fontSize:"large"===d?"14px":"12px",height:"small"===d?"20px":"24px"};"light"===a&&(S.backgroundColor=F.light.bg,S.color=F.light.text,u&&(S.outline="1px solid",S.outlineOffset="-1px",S.outlineColor=function(e){if("string"==typeof e&&e in _)switch(e){case"Green":default:return"#A4F4CF";case"Red":return"#FFC9C9";case"Orange":case"Yellow":return"#FFD1A9";case"Blue":return"#BEDBFF";case"Cyan":return"#A2F4FD";case"Violet":return"#DDD6FF";case"Pink":return"#FCCEE8";case"Gray":return"#E7E5E4"}if("string"==typeof e&&e.startsWith("#")){var t=e.replace("#",""),n=parseInt(t.substr(0,2),16),i=parseInt(t.substr(2,2),16),o=parseInt(t.substr(4,2),16);return"rgba(".concat(n,", ").concat(i,", ").concat(o,", 0.3)")}return"#A4F4CF"}(r))),y&&(S.cursor="pointer",S.opacity="1");var E=["rounded-md","inline-flex","justify-start","items-center",k.padding,k.gap,"font-medium","font-dm-sans","large"===d?"leading-snug":"leading-none","transition-colors","duration-200","small"===d?"h-5":"h-6"].filter(Boolean);"fill"===a&&(S.backgroundColor=F.fill.bg,S.color=F.fill.text),y&&E.push("cursor-pointer","hover:opacity-80"),m&&E.push(m);var A=E.join(" "),z=function(){if(!p)return null;var t=function(e,t){if("string"==typeof e&&e in _)switch(e){case"Green":default:return"#009966";case"Red":return"#E7000B";case"Orange":return t||"#E17100";case"Blue":return"#155DFC";case"Yellow":return"#EC470A";case"Cyan":return"#0092B8";case"Violet":return"#7F22FE";case"Pink":return"#E60076";case"Gray":return"#57534D"}return"string"==typeof e&&e.startsWith("#")?e:"#009966"}(r,w),n="small"===d?"14px":"16px";return e("div",{className:"flex items-center justify-center",style:{width:n,height:n},children:"svg"===p.type?i.cloneElement(p,{width:n,height:n,style:{fill:t}}):p})};return t("div",h({className:A,style:S,onClick:y},b,{children:["leading"===v&&z(),e("div",{className:"px-1 flex justify-center items-center",children:e("div",{className:"justify-center ".concat(k.textSize," font-medium font-dm-sans ").concat("large"===d?"leading-snug":"leading-none"),children:o})}),"after"===v&&z()]}))},Q=function(t){var n=t.className,i=t.style;return e("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,style:i,children:e("path",{d:"M11.6666 3.5L5.24992 9.91667L2.33325 7",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},$=function(t){var n=t.className,i=t.style;return e("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,style:i,children:e("path",{d:"M3.5 7H10.5",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},ee=function(t){var n=t.className,i=t.style;return e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,style:i,children:e("path",{d:"M3.5 7.5L6 10L8.5 7.5M3.5 4.5L6 2L8.5 4.5",stroke:"#A9A29D",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},te=function(n){var i=n.className,o=n.style;return t("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,style:o,children:[e("path",{d:"M3.5 4.5L6 2L8.5 4.5",stroke:"#A9A29D",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M3.5 7.5L6 10L8.5 7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})},ne=function(n){var i=n.className,o=n.style;return t("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,style:o,children:[e("path",{d:"M8.5 7.5L6 10L3.5 7.5",stroke:"#A9A29D",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M8.5 4.5L6 2L3.5 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})},ie=function(t){var n=t.className,i=t.style;return e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,style:i,children:e("path",{d:"M15.8334 10H4.16675M4.16675 10L10.0001 15.8334M4.16675 10L10.0001 4.16669",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})},oe=function(t){var n=t.className,i=t.style;return e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,style:i,children:e("path",{d:"M4.16675 10H15.8334M15.8334 10L10.0001 4.16669M15.8334 10L10.0001 15.8334",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})},re=function(n){var i=n.className,o=n.style;return t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,style:o,children:[e("g",{clipPath:"url(#clip0_54_1653)",children:e("path",{d:"M6.06 6C6.21674 5.55444 6.5261 5.17873 6.9333 4.93942C7.34051 4.7001 7.81926 4.61262 8.28479 4.69247C8.75031 4.77232 9.17255 5.01434 9.47672 5.37568C9.78089 5.73702 9.94737 6.19434 9.94667 6.66666C9.94667 8 7.94667 8.66666 7.94667 8.66666M8 11.3333H8.00667M14.6667 8C14.6667 11.6819 11.6819 14.6667 8 14.6667C4.3181 14.6667 1.33333 11.6819 1.33333 8C1.33333 4.3181 4.3181 1.33333 8 1.33333C11.6819 1.33333 14.6667 4.3181 14.6667 8Z",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})}),e("defs",{children:e("clipPath",{id:"clip0_54_1653",children:e("rect",{width:"16",height:"16",fill:"currentColor"})})})]})},le=function(n){var i=n.current,o=n.defaultCurrent,l=void 0===o?1:o,d=n.total,c=void 0===d?0:d,u=n.pageSize,p=n.defaultPageSize,f=void 0===p?10:p,g=n.showSizeChanger,v=void 0!==g&&g,x=n.pageSizeOptions,m=void 0===x?["10","20","50","100"]:x,y=n.showQuickJumper,b=void 0!==y&&y,w=n.showTotal,F=n.onChange,k=n.onShowSizeChange,E=n.simple,A=void 0!==E&&E,z=n.disabled,L=void 0!==z&&z,D=n.hideOnSinglePage,B=void 0!==D&&D,M=n.className,T=void 0===M?"":M,W=n.style,N=n.size,I=void 0===N?"default":N,j=n.responsive,R=void 0!==j&&j;n.showLessItems;var H=n.itemRender,O=C().primaryColor,P=void 0===O?"#FB6011":O,V=a(l),q=V[0],Z=V[1],K=a(f),Y=K[0],X=K[1],G=a(""),_=G[0],U=G[1],J=null!=i?i:q,Q=null!=u?u:Y,$=r(function(){return Math.ceil(c/Q)},[c,Q]);s(function(){void 0!==i&&Z(i)},[i]),s(function(){void 0!==u&&X(u)},[u]);var ee=function(e){e<1||e>$||e===J||L||(void 0===i&&Z(e),null==F||F(e,Q))},te=function(){var e=parseInt(_,10);e>=1&&e<=$&&(ee(e),U(""))};if(B&&$<=1)return null;if(A)return t("div",{className:"aha-pagination aha-pagination-simple ".concat(T),style:W,children:[e(S,{onClick:function(){return ee(J-1)},disabled:L||1===J,type:"default",size:"default"===I?"medium":"small",style:{marginRight:"8px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"上一页"}),t("span",{style:{margin:"0 8px",fontSize:"14px",lineHeight:"20px",color:"#475467",fontFamily:"DM Sans, sans-serif"},children:[J," / ",$]}),e(S,{onClick:function(){return ee(J+1)},disabled:L||J===$,type:"default",size:"default"===I?"medium":"small",style:{marginLeft:"8px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"下一页"})]});var ne=(J-1)*Q+1,re=Math.min(J*Q,c);return t("div",{className:"aha-pagination w-full ".concat(T),style:h({display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:R?"wrap":"nowrap",fontFamily:"DM Sans, sans-serif"},W),children:[w&&e("div",{className:"justify-start text-Text-text-secondary text-sm font-medium font-['DM_Sans'] leading-5",children:w(c,[ne,re])}),t("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[H?H(J-1,"prev",e(S,{onClick:function(){return ee(J-1)},disabled:L||1===J,type:"default",size:"default"===I?"medium":"small",style:{height:"small"===I?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:t("div",{className:"flex items-center gap-1",children:[e(ie,{})," ",e("span",{children:"Previous"})]})})):e(S,{onClick:function(){return ee(J-1)},disabled:L||1===J,type:"default",size:"default"===I?"medium":"small",style:{height:"small"===I?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:t("div",{className:"flex items-center gap-1",children:[e(ie,{})," ",e("span",{children:"Previous"})]})}),e("div",{style:{display:"flex",alignItems:"center",gap:0},children:function(){if($<=7)return Array.from({length:$},function(e,t){return t+1});var e=[];if(J<=4){for(var t=1;t<=5;t++)e.push(t);e.push("jump-next"),e.push($)}else if(J>=$-3){e.push(1),e.push("jump-prev");for(t=$-4;t<=$;t++)e.push(t)}else{e.push(1),e.push("jump-prev");for(t=J-1;t<=J+1;t++)e.push(t);e.push("jump-next"),e.push($)}return e}().map(function(t,n){return function(t){if("number"==typeof t){var n=t===J,i=e(S,{onClick:function(){return ee(t)},disabled:L,type:"default",size:"default"===I?"medium":"small",style:{minWidth:"small"===I?"32px":"36px",height:"small"===I?"32px":"36px",padding:"0 12px",margin:0,fontWeight:n?500:400,border:"none",background:n?"#FAFAF9":"white",backgroundColor:n?"#FAFAF9":"white",color:n?P:"#79716B",boxShadow:"none",borderRadius:"8px"},children:t},t);return H?H(t,"page",i):i}if("jump-prev"===t)return i=e(S,{onClick:function(){return ee(Math.max(1,J-5))},disabled:L,type:"default",size:"default"===I?"medium":"small",style:{minWidth:"small"===I?"32px":"36px",height:"small"===I?"32px":"36px",padding:"0 12px",margin:0,border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"•••"},"jump-prev"),H?H(J-5,"jump-prev",i):i;if("jump-next"===t)return i=e(S,{onClick:function(){return ee(Math.min($,J+5))},disabled:L,type:"default",size:"default"===I?"medium":"small",style:{minWidth:"small"===I?"32px":"36px",height:"small"===I?"32px":"36px",padding:"0 12px",margin:0,border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"•••"},"jump-next"),H?H(J+5,"jump-next",i):i;return null}(t)})}),H?H(J+1,"next",e(S,{onClick:function(){return ee(J+1)},disabled:L||J===$,type:"default",size:"default"===I?"medium":"small",style:{height:"small"===I?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:t("div",{className:"flex items-center gap-1",children:[e("span",{children:"Next"})," ",e(oe,{})]})})):e(S,{onClick:function(){return ee(J+1)},disabled:L||J===$,type:"default",size:"default"===I?"medium":"small",style:{height:"small"===I?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:t("div",{className:"flex items-center gap-1",children:[e("span",{children:"Next"})," ",e(oe,{})]})}),v&&e("select",{value:Q,onChange:function(e){return t=Number(e.target.value),n=Math.ceil(c/t),o=J>n?n:J,void 0===u&&X(t),void 0===i&&Z(o),null==k||k(o,t),void(null==F||F(o,t));var t,n,o},disabled:L,style:{padding:"small"===I?"6px 12px":"8px 12px",border:"1px solid #EAECF0",borderRadius:"8px",fontSize:"small"===I?"12px":"14px",lineHeight:"small"===I?"18px":"20px",color:"#101828",fontFamily:"DM Sans, sans-serif",cursor:L?"not-allowed":"pointer",backgroundColor:"white",outline:"none",transition:"all 0.2s"},onMouseEnter:function(e){L||(e.currentTarget.style.borderColor=P)},onMouseLeave:function(e){e.currentTarget.style.borderColor="#EAECF0"},children:m.map(function(e){return t("option",{value:e,children:[e," 条/页"]},e)})}),b&&t("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontFamily:"DM Sans, sans-serif"},children:[e("span",{style:{fontSize:"14px",lineHeight:"20px",color:"#475467"},children:"跳至"}),e("input",{type:"number",min:"1",value:_,onChange:function(e){return U(e.target.value)},onKeyPress:function(e){return"Enter"===e.key&&te()},disabled:L,style:{width:"56px",height:"small"===I?"28px":"36px",padding:"0 8px",border:"1px solid #EAECF0",borderRadius:"8px",fontSize:"14px",lineHeight:"20px",color:"#101828",fontFamily:"DM Sans, sans-serif",outline:"none",transition:"all 0.2s"},onFocus:function(e){e.currentTarget.style.borderColor=P},onBlur:function(e){e.currentTarget.style.borderColor="#EAECF0"}}),e("span",{style:{fontSize:"14px",lineHeight:"20px",color:"#475467"},children:"页"}),"object"==typeof b&&b.goButton?e(S,{onClick:te,disabled:L,type:"default",size:"default"===I?"medium":"small",style:{border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:b.goButton}):e(S,{onClick:te,disabled:L,type:"default",size:"default"===I?"medium":"small",style:{border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"确定"})]})]})]})},ae=function(n){var i=n.checked,o=void 0!==i&&i,r=n.indeterminate,l=void 0!==r&&r,a=n.disabled,s=void 0!==a&&a,d=n.onChange,c=n.className,u=void 0===c?"":c,p=n.style,f=n.children,g=C().primaryColor,v=o||l,x=s?"#FAFAF9":v?g:"white",m=s?"#FAFAF9":v?g:"#D7D3D0";return t("div",{className:"aha-checkbox ".concat(u),style:h({display:"inline-flex",alignItems:"center",gap:"8px",cursor:s?"not-allowed":"pointer"},p),onClick:function(e){s||(null==d||d({target:{checked:!o},currentTarget:{checked:!o}}))},children:[e("div",{style:{position:"relative",width:"20px",height:"20px",minWidth:"20px",minHeight:"20px",borderRadius:"4px",border:"1px solid ".concat(m),backgroundColor:x,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s",flexShrink:0,boxSizing:"border-box"},children:e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"14px",height:"14px",opacity:v?1:0,transition:"opacity 0.2s",pointerEvents:"none"},children:e(l?$:Q,{style:{width:"14px",height:"14px",display:"block"}})})}),f&&e("span",{style:{fontSize:"14px",lineHeight:"20px",color:s?"#98A2B3":"#101828",fontFamily:"DM Sans, sans-serif"},children:f}),e("input",{type:"checkbox",checked:o,ref:function(e){e&&(e.indeterminate=l)},onChange:d,disabled:s,style:{position:"absolute",opacity:0,width:0,height:0,pointerEvents:"none"},"aria-hidden":"true"})]})};ae.displayName="Checkbox";var se=function(e,t){return"string"==typeof t?null==e?void 0:e[t]:t.reduce(function(e,t){return null==e?void 0:e[t]},e)},de=function(e,t){var n,i;return"function"==typeof t?t(e):"string"==typeof t?null!==(n=se(e,t))&&void 0!==n?n:"":null!==(i=e.key)&&void 0!==i?i:""},ce=function(t){var n=t.order,i=C().primaryColor;return"ascend"===n?e(ne,{style:{color:i}}):"descend"===n?e(te,{style:{color:i}}):e(ee,{})},ue=function(n){var o,l,u,p,f=n.columns,v=void 0===f?[]:f,x=n.dataSource,y=void 0===x?[]:x,b=n.rowKey,w=void 0===b?"key":b,C=n.rowSelection,F=n.pagination,k=void 0!==F&&F,S=n.size,E=void 0===S?"middle":S,A=n.bordered,z=void 0!==A&&A;n.loading;var L=n.locale,D=n.showHeader,B=void 0===D||D,M=n.title,T=n.footer,W=n.summary,N=n.scroll,I=n.tableLayout,j=void 0===I?"auto":I,R=n.onChange,H=n.onSorterChange,O=n.onPaginationChange,P=n.onRow,V=n.className,q=void 0===V?"":V,Z=n.style,K=n.expandable,Y=n.rowClassName,X=n.onHeaderRow;n.sticky;var G=g(n,["columns","dataSource","rowKey","rowSelection","pagination","size","bordered","loading","locale","showHeader","title","footer","summary","scroll","tableLayout","onChange","onSorterChange","onPaginationChange","onRow","className","style","expandable","rowClassName","onHeaderRow","sticky"]),_=a((null==C?void 0:C.selectedRowKeys)||(null==C?void 0:C.defaultSelectedRowKeys)||[]),U=_[0],J=_[1];s(function(){void 0!==(null==C?void 0:C.selectedRowKeys)&&J(C.selectedRowKeys)},[null==C?void 0:C.selectedRowKeys]);var Q=a(new Map),$=Q[0],ee=Q[1],te=a((null==K?void 0:K.defaultExpandedRowKeys)||[]),ne=te[0],ie=te[1],oe=a(k&&"object"==typeof k&&(k.current||k.defaultCurrent)||1),re=oe[0],ue=oe[1],pe=a(k&&"object"==typeof k&&(k.pageSize||k.defaultPageSize)||10),fe=pe[0],he=pe[1];s(function(){k&&"object"==typeof k&&(void 0!==k.current&&ue(k.current),void 0!==k.pageSize&&he(k.pageSize))},[k]);var ge=a(null),ve=ge[0],xe=ge[1],me=a(null),ye=me[0],be=me[1],we=a(!1),Ce=we[0],Fe=we[1],ke=c(null),Se=c(null);s(function(){var e=function(){Fe(window.innerWidth<768)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[]);var Ee=d(function(e,t){var n,i,o,r=null===(n=null==C?void 0:C.getCheckboxProps)||void 0===n?void 0:n.call(C,e);if(!(null==r?void 0:r.disabled)){var l,a=de(e,w);l="radio"===(null==C?void 0:C.type)?t?[a]:[]:t?m(m([],U,!0),[a],!1):U.filter(function(e){return e!==a}),J(l);var s=y.filter(function(e){return l.includes(de(e,w))});null===(i=null==C?void 0:C.onChange)||void 0===i||i.call(C,l,s),null===(o=null==C?void 0:C.onSelect)||void 0===o||o.call(C,e,t,s,new Event("select"))}},[U,w,C,y]),Ae=d(function(e,t){var n,i,o=t.filter(function(e){var t;return!(null===(t=null==C?void 0:C.getCheckboxProps)||void 0===t?void 0:t.call(C,e).disabled)}).map(function(e){return de(e,w)}),r=e?o:[];J(r);var l=y.filter(function(e){return r.includes(de(e,w))}),a=e?t.filter(function(e){var t;return!(null===(t=null==C?void 0:C.getCheckboxProps)||void 0===t?void 0:t.call(C,e).disabled)}):[];null===(n=null==C?void 0:C.onChange)||void 0===n||n.call(C,r,l),null===(i=null==C?void 0:C.onSelectAll)||void 0===i||i.call(C,e,l,a)},[w,C,y]),ze=d(function(e,t){var n=e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex);if(n){var i=new Map($);null===t?i.delete(n):i.set(n,t),ee(i);var o=Array.from(i.entries()).map(function(t){var n=t[0],i=t[1];return{column:v.find(function(e){return(e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex))===n})||e,order:i,field:n,columnKey:n}}),r={column:e,order:t,field:n,columnKey:n};e.onSorterChange&&e.onSorterChange(r),H&&H(1===o.length?o[0]:o),R&&R({current:re,pageSize:fe},{},1===o.length?o[0]:o,{currentDataSource:y,action:"sort"})}},[$,R,H,re,fe,y,v]);d(function(e,t){var n,i,o,r=de(e,w);o=t?m(m([],ne,!0),[r],!1):ne.filter(function(e){return e!==r}),ie(o),null===(n=null==K?void 0:K.onExpand)||void 0===n||n.call(K,t,e),null===(i=null==K?void 0:K.onExpandedRowsChange)||void 0===i||i.call(K,o)},[ne,w,K]);var Le=d(function(){var e=m([],y,!0);return $.size>0&&e.sort(function(e,t){for(var n=function(n,i){var o=v.find(function(e){return(e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex))===n});if(!o)return"continue";var r=0;if("function"==typeof o.sorter)r=o.sorter(e,t);else if(!0===o.sorter){var l=se(e,o.dataIndex||n),a=se(t,o.dataIndex||n);l<a?r=-1:l>a&&(r=1)}return 0!==r?{value:"ascend"===i?r:-r}:void 0},i=0,o=Array.from($.entries());i<o.length;i++){var r=o[i],l=n(r[0],r[1]);if("object"==typeof l)return l.value}return 0}),e},[y,$,v]),De=Le(),Be=r(function(){if(!1===k||!k)return De;var e=(re-1)*fe,t=e+fe;return De.slice(e,t)},[De,re,fe,k]),Me=d(function(e,t){var n,i,o=null!=t?t:fe;if(ue(e),t&&he(t),O&&O(e,o),k&&"object"==typeof k&&(null===(n=k.onChange)||void 0===n||n.call(k,e,t),t&&(null===(i=k.onShowSizeChange)||void 0===i||i.call(k,e,t))),R){var r=Array.from($.entries()).map(function(e){var t=e[0],n=e[1];return{column:v.find(function(e){return(e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex))===t}),order:n,field:t,columnKey:t}});R({current:e,pageSize:o},{},1===r.length?r[0]:r,{currentDataSource:De,action:"paginate"})}},[k,O,R,fe,$,v,De]),Te=d(function(e,t,n){var i=se(t,e.dataIndex||"");return e.render?e.render(i,t,n):i},[]),We=d(function(e,t,n){if(t){var i=!0===t?"left":t,o=0;if("left"===i){if(C&&("left"===C.fixed||!0===C.fixed))o+="number"==typeof C.columnWidth?C.columnWidth:"string"==typeof C.columnWidth?parseInt(C.columnWidth):60;for(var r=0;r<e;r++){if("left"===(l=v[r]).fixed||!0===l.fixed)o+=l.width?"number"==typeof l.width?l.width:parseInt(l.width)||0:150}return o}if("right"===i){for(r=e+1;r<v.length;r++){var l;if("right"===(l=v[r]).fixed)o+=l.width?"number"==typeof l.width?l.width:parseInt(l.width)||0:150}if(C&&"right"===C.fixed)o+="number"==typeof C.columnWidth?C.columnWidth:"string"==typeof C.columnWidth?parseInt(C.columnWidth):60;return o}}},[v,C]),Ne=d(function(){if(!B)return null;var n,i,o,r,l=v.map(function(n,i){var o,r=n.key||(Array.isArray(n.dataIndex)?n.dataIndex.join("."):n.dataIndex)||i,l=$.get(r)||null,a=We(i,n.fixed,!0),s=n.width?"number"==typeof n.width?"".concat(n.width,"px"):n.width:void 0;return e("th",h({className:"".concat(n.className||""," ").concat(n.align?"text-".concat(n.align):""),style:{width:s,minWidth:n.minWidth?"number"==typeof n.minWidth?"".concat(n.minWidth,"px"):n.minWidth:s||void 0,maxWidth:s,position:n.fixed?"sticky":"relative",left:"left"===n.fixed||!0===n.fixed?void 0!==a?"".concat(a,"px"):"0":void 0,right:"right"===n.fixed?void 0!==a?"".concat(a,"px"):"0":void 0,zIndex:n.fixed?"left"===n.fixed||!0===n.fixed?10:9:1,backgroundColor:(n.fixed,"#F9FAFB"),boxShadow:"left"===n.fixed||!0===n.fixed?"2px 0 4px rgba(0, 0, 0, 0.05)":"right"===n.fixed?"-2px 0 4px rgba(0, 0, 0, 0.05)":void 0,padding:"12px 16px",textAlign:n.align||"left",borderBottom:"1px solid #EAECF0",fontWeight:600,fontSize:"12px",lineHeight:"18px",color:"#475467",fontFamily:"DM Sans, sans-serif"}},(null===(o=n.onHeaderCell)||void 0===o?void 0:o.call(n,n))||{},{children:t("div",{style:{display:"flex",alignItems:"center",gap:"8px",justifyContent:"right"===n.align?"flex-end":"center"===n.align?"center":"flex-start"},children:[e("span",{style:{fontWeight:600,fontSize:"12px",lineHeight:"18px",color:"#475467"},children:"function"==typeof n.title?n.title({sortOrder:l,sortColumn:n}):n.title}),n.sorter&&e("button",{onClick:function(){ze(n,null===l?"ascend":"ascend"===l?"descend":null)},style:{border:"none",background:"none",cursor:"pointer",display:"flex",alignItems:"center",padding:"2px",color:l?"#475467":"#98A2B3"},children:e(ce,{order:l||void 0})})]})}),r)});if(C){var a="number"==typeof C.columnWidth?"".concat(C.columnWidth,"px"):"string"==typeof C.columnWidth?C.columnWidth:"60px",s=e("th",{style:{width:a,position:C.fixed?"sticky":"relative",left:"left"===C.fixed||!0===C.fixed?"0px":void 0,right:"right"===C.fixed?"0px":void 0,zIndex:C.fixed?"left"===C.fixed||!0===C.fixed?12:11:1,backgroundColor:"#F9FAFB",padding:"12px 16px",borderBottom:"1px solid #EAECF0",fontWeight:600,fontSize:"12px",lineHeight:"18px",color:"#475467",fontFamily:"DM Sans, sans-serif",textAlign:"center"},children:t("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[!C.hideSelectAll&&"radio"!==C.type&&(n=Be.filter(function(e){var t;return!(null===(t=C.getCheckboxProps)||void 0===t?void 0:t.call(C,e).disabled)}),i=n.map(function(e){return de(e,w)}),o=n.length>0&&i.every(function(e){return U.includes(e)}),r=i.some(function(e){return U.includes(e)}),e(ae,{checked:o,indeterminate:r&&!o,onChange:function(e){return Ae(e.target.checked,Be)}})),C.columnTitle&&e("span",{style:{marginLeft:C.hideSelectAll?0:"8px"},children:C.columnTitle})]})},"selection");l.unshift(s)}var d=null==X?void 0:X(v,0);return e("thead",{ref:Se,children:e("tr",h({},d||{},{children:l}))})},[v,B,$,C,U,Be,w,ze,Ae,L,X,We]),Ie=d(function(e){xe(e)},[]),je=d(function(e,t){e.preventDefault(),be(t)},[]),Re=d(function(e,t){if(e.preventDefault(),null===ve||ve===t)return xe(null),void be(null);var n=m([],Be,!0),i=n[ve];n.splice(ve,1),n.splice(t,0,i),xe(null),be(null)},[ve,Be]),He=d(function(){xe(null),be(null)},[]),Oe=d(function(){return Be.map(function(n,o){var r,l=de(n,w),a=U.includes(l),s=ne.includes(l),d=(null==P?void 0:P(n,o))||{},c=o===Be.length-1;return t(i.Fragment,{children:[t("tr",h({className:"".concat("function"==typeof Y?Y(n,o):Y||""," ").concat(ve===o?"dragging":""," ").concat(ye===o?"drag-over":""),draggable:!0,onDragStart:function(){return Ie(o)},onDragOver:function(e){return je(e,o)},onDrop:function(e){return Re(e,o)},onDragEnd:He,style:h({cursor:"move",opacity:ve===o?.5:1,backgroundColor:ye===o?"#F9FAFB":"white",transition:"background-color 0.2s"},d.style),onMouseEnter:function(e){ve!==o&&ye!==o&&(e.currentTarget.style.backgroundColor="#F9FAFB")},onMouseLeave:function(e){ve!==o&&ye!==o&&(e.currentTarget.style.backgroundColor="white")}},d,{children:[C&&e("td",{style:{width:"number"==typeof C.columnWidth?"".concat(C.columnWidth,"px"):"string"==typeof C.columnWidth?C.columnWidth:"60px",position:C.fixed?"sticky":"relative",left:"left"===C.fixed||!0===C.fixed?"0px":void 0,right:"right"===C.fixed?"0px":void 0,zIndex:C.fixed?"left"===C.fixed||!0===C.fixed?12:11:1,backgroundColor:"white",padding:"16px",borderBottom:c?"none":"1px solid #EAECF0",textAlign:"center"},children:e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:e(ae,{checked:a,onChange:function(e){return Ee(n,e.target.checked)},disabled:null===(r=C.getCheckboxProps)||void 0===r?void 0:r.call(C,n).disabled})})}),v.map(function(t,i){var r,l=t.key||(Array.isArray(t.dataIndex)?t.dataIndex.join("."):t.dataIndex)||i,a=(null===(r=t.onCell)||void 0===r?void 0:r.call(t,n,o))||{},s=We(i,t.fixed,!1),d=t.width?"number"==typeof t.width?"".concat(t.width,"px"):t.width:void 0;return e("td",h({className:"".concat(t.className||""," ").concat(t.align?"text-".concat(t.align):""),style:h({width:d,minWidth:t.minWidth?"number"==typeof t.minWidth?"".concat(t.minWidth,"px"):t.minWidth:d||void 0,maxWidth:d,position:t.fixed?"sticky":"relative",left:"left"===t.fixed||!0===t.fixed?void 0!==s?"".concat(s,"px"):"0":void 0,right:"right"===t.fixed?void 0!==s?"".concat(s,"px"):"0":void 0,zIndex:t.fixed?"left"===t.fixed||!0===t.fixed?10:9:1,backgroundColor:"white",boxShadow:"left"===t.fixed||!0===t.fixed?"2px 0 4px rgba(0, 0, 0, 0.05)":"right"===t.fixed?"-2px 0 4px rgba(0, 0, 0, 0.05)":void 0,padding:"16px",borderBottom:c?"none":"1px solid #EAECF0",fontSize:"14px",lineHeight:"20px",color:"#101828",fontFamily:"DM Sans, sans-serif",textAlign:t.align||"left"},a.style),colSpan:t.colSpan,rowSpan:t.rowSpan},a,{children:Te(t,n,o)}),l)})]})),(null==K?void 0:K.expandedRowRender)&&s&&e("tr",{children:e("td",{colSpan:v.length+(C?1:0),children:K.expandedRowRender(n,o,0,!0)})})]},l)})},[Be,w,U,ne,C,v,P,Y,Ee,Te,K,ve,ye,Ie,je,Re,He,We]),Pe=function(){var t;if(!1===k||!k)return null;var n=null!==(t=k.total)&&void 0!==t?t:De.length,i=k.position||"bottomRight";return e("div",{style:{marginTop:"16px",display:"flex",justifyContent:i.includes("Right")?"flex-end":i.includes("Left")?"flex-start":"center"},children:e(le,{current:re,total:n,pageSize:fe,showSizeChanger:k.showSizeChanger,pageSizeOptions:k.pageSizeOptions,showQuickJumper:k.showQuickJumper,showTotal:k.showTotal,onChange:Me,onShowSizeChange:Me,simple:k.simple,responsive:k.responsive,size:"small"===E?"small":"default"})})},Ve=r(function(){return v.some(function(e){return e.fixed})||C&&C.fixed},[v,C]),qe=r(function(){return v.every(function(e){return e.width})&&(!C||C.columnWidth)},[v,C]),Ze=r(function(){if(null==N?void 0:N.x){if("number"==typeof N.x)return N.x;if(!0===N.x)return v.reduce(function(e,t){return e+(t.width?"number"==typeof t.width?t.width:parseInt(String(t.width).replace("px",""))||0:150)},0)+(C?"number"==typeof C.columnWidth?C.columnWidth:parseInt(String(C.columnWidth||"60").replace("px",""))||60:0)}if(Ve)return v.reduce(function(e,t){return t.fixed&&t.width?e+("number"==typeof t.width?t.width:parseInt(String(t.width).replace("px",""))||0):e},0)+(C&&C.fixed&&C.columnWidth?"number"==typeof C.columnWidth?C.columnWidth:parseInt(String(C.columnWidth).replace("px",""))||60:0)},[v,null==N?void 0:N.x,C,Ve]),Ke=r(function(){return"fixed"===j||Ve||qe||v.some(function(e){return e.width})?"fixed":j},[j,Ve,qe,v]),Ye={width:"100%",minWidth:Ze?"".concat(Ze,"px"):"100%",borderCollapse:"separate",borderSpacing:0,tableLayout:Ke,backgroundColor:"white",borderRadius:"8px",border:"1px solid #EAECF0"},Xe=h({position:"relative",width:"100%",maxWidth:"100%",maxHeight:"number"==typeof(null==N?void 0:N.y)?"".concat(N.y,"px"):void 0,borderRadius:"8px"},Z);if(Ce)return t("div",h({ref:ke,className:"aha-table aha-table-mobile-wrapper ".concat(q),style:Xe},G,{children:[M&&e("div",{style:{marginBottom:"16px"},children:M(De)}),k&&"object"==typeof k&&(null===(o=k.position)||void 0===o?void 0:o.startsWith("top"))&&Pe(),e("div",{className:"aha-table-mobile",children:Be.map(function(n,i){var o,r=de(n,w),l=U.includes(r);return t("div",{className:"aha-table-mobile-row ".concat(l?"selected":""),style:{border:"1px solid #e8e8e8",borderRadius:"4px",padding:"12px",marginBottom:"12px",backgroundColor:l?"#e6f7ff":"white"},children:[C&&e("div",{style:{marginBottom:"8px"},children:e(ae,{checked:l,onChange:function(e){return Ee(n,e.target.checked)},disabled:null===(o=C.getCheckboxProps)||void 0===o?void 0:o.call(C,n).disabled})}),v.map(function(o){var r=o.key||(Array.isArray(o.dataIndex)?o.dataIndex.join("."):o.dataIndex),l=se(n,o.dataIndex||""),a=o.render?o.render(l,n,i):l;return t("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"8px",paddingBottom:"8px",borderBottom:"1px solid #f0f0f0"},children:[t("span",{style:{fontWeight:"bold",color:"#666"},children:["function"==typeof o.title?o.title({}):o.title,":"]}),e("span",{style:{flex:1,textAlign:"right"},children:a})]},r)})]},r)})}),T&&e("div",{style:{marginTop:"16px"},children:T(De)}),k&&("object"!=typeof k||!(null===(l=k.position)||void 0===l?void 0:l.startsWith("top")))&&Pe()]}));var Ge={position:"relative",overflowX:(null==N?void 0:N.x)||Ve?"auto":"visible",overflowY:(null==N?void 0:N.y)?"auto":"visible",width:"100%",maxWidth:!0===(null==N?void 0:N.x)?"100%":"number"==typeof(null==N?void 0:N.x)?"".concat(N.x,"px"):void 0,maxHeight:"number"==typeof(null==N?void 0:N.y)?"".concat(N.y,"px"):void 0,borderRadius:"8px"};return t("div",h({ref:ke,className:"aha-table ".concat(q),style:Xe},G,{children:[M&&e("div",{style:{marginBottom:"16px"},children:M(De)}),k&&"object"==typeof k&&(null===(u=k.position)||void 0===u?void 0:u.startsWith("top"))&&Pe(),e("div",{style:Ge,children:e("div",{style:{width:"100%",minWidth:Ze?"".concat(Ze,"px"):"100%",display:"block"},children:t("table",{style:Ye,className:z?"bordered":"",children:[Ne(),e("tbody",{children:Oe()}),W&&e("tfoot",{children:e("tr",{children:e("td",{colSpan:v.length+(C?1:0),children:W(De)})})})]})})}),T&&e("div",{style:{marginTop:"16px"},children:T(De)}),k&&("object"!=typeof k||!(null===(p=k.position)||void 0===p?void 0:p.startsWith("top")))&&Pe()]}))},pe=function(n){var i=n.checked,o=void 0!==i&&i,r=n.disabled,l=void 0!==r&&r,a=n.onChange,s=n.className,d=void 0===s?"":s,c=n.style,u=n.children,p=n.value,f=n.name,g=C().primaryColor,v=void 0===g?"#FB6011":g,x=l?"#FAFAF9":o?v:"white",m=l?"#FAFAF9":o?v:"#D7D3D0";return t("div",{className:"aha-radio ".concat(d),style:h({display:"inline-flex",alignItems:"center",gap:"8px",cursor:l?"not-allowed":"pointer"},c),onClick:function(e){l||(null==a||a({target:{checked:!o,value:p},currentTarget:{checked:!o,value:p}}))},children:[e("div",{style:{position:"relative",width:"20px",height:"20px",minWidth:"20px",minHeight:"20px",borderRadius:"50%",border:"1px solid ".concat(m),backgroundColor:x,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s",flexShrink:0,boxSizing:"border-box"},children:e("div",{style:{width:"8px",height:"8px",minWidth:"8px",minHeight:"8px",borderRadius:"50%",backgroundColor:"white",opacity:o?1:0,transition:"opacity 0.2s",pointerEvents:"none",boxSizing:"border-box"}})}),u&&e("span",{style:{fontSize:"14px",lineHeight:"20px",color:l?"#98A2B3":"#101828",fontFamily:"DM Sans, sans-serif"},children:u}),e("input",{type:"radio",checked:o,onChange:a,disabled:l,value:p,name:f,style:{position:"absolute",opacity:0,width:0,height:0,pointerEvents:"none"},"aria-hidden":"true"})]})};pe.displayName="Radio";var fe=function(n){var o=n.items,r=void 0===o?[]:o,l=n.variant,u=void 0===l?"underline":l,p=n.layout,f=void 0===p?"equal":p,v=n.defaultValue,x=n.value,m=n.onChange,y=n.className,b=void 0===y?"":y,w=n.mode,F=void 0===w?"children":w,k=g(n,["items","variant","layout","defaultValue","value","onChange","className","mode"]),S=C().primaryColor;if(!r||0===r.length)return null;var E=function(){if(0===r.length)return[];var e=r[0];return"string"==typeof e||"number"==typeof e?r.map(function(e,t){return{key:String(e),label:String(e)}}):r}(),A=void 0!==x,z=E.length>0?E[0].key:"",L=a(function(){var e,t=null!==(e=null!=x?x:v)&&void 0!==e?e:z;return String(t)}),D=L[0],B=L[1],M=A?String(null!=x?x:z):D,T=d(function(e,t){if(!t){A||B(e);var n="number"!=typeof r[0]||isNaN(Number(e))?e:Number(e);null==m||m(n)}},[A,m,r]),W=E.find(function(e){return e.key===M}),N=S||"#FB6011",I=c({}),j=c(null),R=c(null),H=c(null),O=c(null),P=c(""),V=a({width:0,left:0,opacity:0}),q=V[0],Z=V[1],K=a({width:0,left:0,opacity:0}),Y=K[0],X=K[1];s(function(){if(P.current!==M&&(P.current=M,M)){if("underline"===u&&j.current&&H.current){var e=setTimeout(function(){if(j.current&&H.current&&P.current===M){var e=I.current[M];if(e){var t=H.current.getBoundingClientRect(),n=e.getBoundingClientRect();if(0!==t.width&&0!==n.width){var i=n.left-t.left,o=n.width,r="".concat(i,"px"),l="".concat(o,"px");Z(function(e){return e.left===r&&e.width===l&&1===e.opacity?e:{width:l,left:r,opacity:1}})}}}},0);return function(){return clearTimeout(e)}}if("background"===u&&R.current&&O.current){var t=setTimeout(function(){if(R.current&&O.current&&P.current===M){var e=I.current[M];if(e){var t=O.current.getBoundingClientRect(),n=e.getBoundingClientRect();if(0!==t.width&&0!==n.width){var i=n.left-t.left,o=n.width,r="".concat(i,"px"),l="".concat(o,"px");X(function(e){return e.left===r&&e.width===l&&1===e.opacity?e:{width:l,left:r,opacity:1}})}}}},0);return function(){return clearTimeout(t)}}}},[M,u]);var G;return t("div",{className:"aha-tab-container",children:["underline"===u?t("div",h({ref:H,className:"aha-tab aha-tab--underline ".concat(b),style:{display:"flex",alignItems:"center",gap:"32px",borderBottom:"1px solid #E7E5E4",paddingBottom:"0",position:"relative"}},k,{children:[e("div",{ref:j,style:h({position:"absolute",bottom:"-1px",height:"2px",backgroundColor:N,borderRadius:"1px 1px 0 0",transition:"left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease-in-out"},q)}),E.map(function(n){var o,r=n.key===M;return t("div",{ref:function(e){I.current[n.key]=e},onClick:function(){return T(n.key,n.disabled)},style:{position:"relative",padding:"12px 0",cursor:n.disabled?"not-allowed":"pointer",display:"flex",alignItems:"center",gap:"8px",opacity:n.disabled?.5:1,transition:"color 0.2s ease-in-out"},children:[n.icon&&e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",color:r?N:"#79716B",transition:"color 0.2s ease-in-out"},children:i.isValidElement(n.icon)?i.cloneElement(n.icon,{width:16,height:16,style:h(h({},null===(o=n.icon.props)||void 0===o?void 0:o.style),{color:r?N:"#79716B",transition:"color 0.2s ease-in-out"})}):n.icon}),e("span",{style:{fontSize:"14px",fontWeight:500,fontFamily:"DM Sans, sans-serif",color:r?N:"#79716B",lineHeight:"1.375",transition:"color 0.2s ease-in-out"},children:n.label}),void 0!==n.badge&&null!==n.badge&&e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minWidth:"20px",height:"20px",padding:"0 6px",borderRadius:"10px",backgroundColor:"#FAFAF9",border:"1px solid #E7E5E4",color:"#44403C",fontSize:"12px",fontWeight:500,fontFamily:"DM Sans, sans-serif",lineHeight:"1",transition:"all 0.2s ease-in-out"},children:n.badge}),n.customElement]},n.key)})]})):(G={display:"flex",alignItems:"center",backgroundColor:"#FAFAF9",borderRadius:"8px",padding:"4px",border:"1px solid #E7E5E4",gap:"4px",position:"relative"},G.width="equal"===f?"100%":"fit-content",t("div",h({ref:O,className:"aha-tab aha-tab--background aha-tab--".concat(f," ").concat(b),style:G},k,{children:[e("div",{ref:R,style:h({position:"absolute",top:"4px",bottom:"4px",borderRadius:"6px",backgroundColor:"#FFFFFF",border:"none",boxShadow:"0px 1px 2px 0px rgba(10, 13, 18, 0.1)",transition:"left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease-in-out",pointerEvents:"none"},Y)}),E.map(function(n){var o,r=n.key===M,l={position:"relative",padding:"8px 16px",cursor:n.disabled?"not-allowed":"pointer",display:"flex",alignItems:"center",gap:"8px",borderRadius:"6px",opacity:n.disabled?.5:1,flex:"equal"===f?1:"none",justifyContent:"center",backgroundColor:"transparent",border:"1px solid transparent",transition:"color 0.2s ease-in-out",zIndex:1};return t("div",{ref:function(e){I.current[n.key]=e},onClick:function(){return T(n.key,n.disabled)},style:l,children:[n.icon&&e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",color:r?"#44403C":"#79716B",transition:"color 0.2s ease-in-out"},children:i.isValidElement(n.icon)?i.cloneElement(n.icon,{width:16,height:16,style:h(h({},null===(o=n.icon.props)||void 0===o?void 0:o.style),{color:r?"#44403C":"#79716B",transition:"color 0.2s ease-in-out"})}):n.icon}),e("span",{style:{fontSize:"14px",fontWeight:500,fontFamily:"DM Sans, sans-serif",color:r?"#44403C":"#79716B",lineHeight:"1.375",transition:"color 0.2s ease-in-out"},children:n.label}),void 0!==n.badge&&null!==n.badge&&e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minWidth:"20px",height:"20px",padding:"0 6px",borderRadius:"10px",backgroundColor:"#FAFAF9",border:"1px solid #E7E5E4",color:"#44403C",fontSize:"12px",fontWeight:500,fontFamily:"DM Sans, sans-serif",lineHeight:"1",transition:"all 0.2s ease-in-out"},children:n.badge}),n.customElement]},n.key)})]}))),"children"===F&&(null==W?void 0:W.children)&&e("div",{className:"aha-tab-content",style:{marginTop:"24px"},children:W.children})]})},he=function(i){var o=i.percent,r=void 0===o?0:o,l=i.type,d=void 0===l?"circle":l,u=i.width,p=void 0===u?120:u,f=i.title,v=i.titlePosition,x=i.showPercent,m=void 0===x||x,y=i.animated,b=void 0!==y&&y,w=i.status,F=void 0===w?"normal":w,k=i.className,S=void 0===k?"":k,E=i.style,A=i.strokeColor,z=i.trailColor,L=void 0===z?"#F5F5F4":z,D=g(i,["percent","type","width","title","titlePosition","showPercent","animated","status","className","style","strokeColor","trailColor"]),B=C().primaryColor,M=Math.min(100,Math.max(0,r)),T=c(!0),W=a(!1),N=W[0],I=W[1],j=a(0),R=j[0],H=j[1];s(function(){if(b&&T.current&&M>0){T.current=!1,H(0),I(!0),requestAnimationFrame(function(){requestAnimationFrame(function(){H(M)})});var e=setTimeout(function(){I(!1),H(M)},300);return function(){return clearTimeout(e)}}T.current?(T.current=!1,I(!1),H(M)):H(M)},[b,M]);var O=A||B||"#FB6011";"success"===F?O="#00BC7D":"exception"===F&&(O="#FB2C36");var P=v||"inside",V=Math.max(4,Math.round(.06*p)),q=(p-V)/2,Z="semicircle"===d?p/2:p,K="14px",Y="12px",X=function(){var i=f&&"outside"===P?p+4+18+4:p,o=2*Math.PI*q,r=o-(N?R:M)/100*o;return t("div",{style:{position:"relative",width:p,height:i,display:"flex",alignItems:"center",justifyContent:"center"},children:[t("svg",{width:p,height:p,style:{position:"absolute",top:0,left:0},children:[e("circle",{cx:p/2,cy:p/2,r:q,fill:"none",stroke:L,strokeWidth:V,strokeLinecap:"round"}),e("circle",{cx:p/2,cy:p/2,r:q,fill:"none",stroke:O,strokeWidth:V,strokeLinecap:"round",strokeDasharray:o,strokeDashoffset:r,transform:"rotate(-90 ".concat(p/2," ").concat(p/2,")"),style:{transition:N?"stroke-dashoffset 0.3s ease":"none"}})]}),f&&"inside"===P?t("div",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:6},children:[e("div",{style:{fontSize:K,color:"#292524",fontFamily:"DM Sans, sans-serif",lineHeight:1},children:f}),m&&e("div",{style:{fontSize:Y,fontWeight:600,color:"#1C1917",fontFamily:"DM Sans, sans-serif",lineHeight:1},children:"".concat(Math.round(M),"%")})]}):t(n,{children:[m&&e("div",{style:{position:"absolute",left:"50%",top:"".concat(p/2,"px"),transform:"translate(-50%, -50%)",textAlign:"center",fontSize:Y,fontWeight:600,color:"#1C1917",fontFamily:"DM Sans, sans-serif",lineHeight:1},children:"".concat(Math.round(M),"%")}),f&&"outside"===P&&e("div",{style:{position:"absolute",left:"50%",top:"".concat(p,"px"),transform:"translateX(-50%)",marginTop:"4px",textAlign:"center",fontSize:K,color:"#57534E",fontFamily:"DM Sans, sans-serif",lineHeight:"18px"},children:f})]})]})},G=h({display:"inline-flex",flexDirection:"column",alignItems:"center",width:p},E);return e("div",h({className:"aha-progress aha-progress--".concat(d," ").concat(S),style:G},D,{children:function(){switch(d){case"circle":return X();case"semicircle":return o=V/2,r=p-V/2,l=(i=Z+V)-V/2,a=Z/2+V/2+V/2,s=f&&"outside"===P?i+4+18+4:i,c=Math.PI*q,u=c-(N?R:M)/100*c,t("div",{style:{position:"relative",width:p,height:s,overflow:"hidden"},children:[t("svg",{width:p,height:i,viewBox:"0 0 ".concat(p," ").concat(i),style:{position:"absolute",top:0,left:0},children:[e("path",{d:"M ".concat(o," ").concat(l," A ").concat(q," ").concat(q," 0 0 1 ").concat(r," ").concat(l),fill:"none",stroke:L,strokeWidth:V,strokeLinecap:"round"}),e("path",{d:"M ".concat(o," ").concat(l," A ").concat(q," ").concat(q," 0 0 1 ").concat(r," ").concat(l),fill:"none",stroke:O,strokeWidth:V,strokeLinecap:"round",strokeDasharray:c,strokeDashoffset:u,style:{transition:N?"stroke-dashoffset 0.3s ease":"none"}})]}),f&&"inside"===P?t("div",{style:{position:"absolute",left:"50%",top:"".concat(a,"px"),transform:"translate(-50%, -50%)",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:6},children:[e("div",{style:{fontSize:K,color:"#57534E",fontFamily:"DM Sans, sans-serif",lineHeight:1},children:f}),m&&e("div",{style:{fontSize:Y,fontWeight:600,color:"#1C1917",fontFamily:"DM Sans, sans-serif",lineHeight:1},children:"".concat(Math.round(M),"%")})]}):t(n,{children:[m&&e("div",{style:{position:"absolute",left:"50%",top:"".concat(a,"px"),transform:"translate(-50%, -50%)",textAlign:"center",fontSize:Y,fontWeight:600,color:"#1C1917",fontFamily:"DM Sans, sans-serif",lineHeight:1},children:"".concat(Math.round(M),"%")}),f&&"outside"===P&&e("div",{style:{position:"absolute",left:"50%",top:"".concat(i,"px"),transform:"translateX(-50%)",marginTop:"4px",textAlign:"center",fontSize:K,color:"#57534E",fontFamily:"DM Sans, sans-serif",lineHeight:"18px"},children:f})]})]});default:return console.warn('Progress type "'.concat(d,'" is not supported yet, using "circle" as fallback')),X()}var i,o,r,l,a,s,c,u}()}))},ge=u(function(o,r){var l=o.size,a=void 0===l?"medium":l,d=o.disabled,u=void 0!==d&&d,p=o.error,f=void 0!==p&&p,v=o.readOnly,x=void 0!==v&&v,m=o.prefix,y=o.suffix,b=o.allowClear,w=void 0!==b&&b,F=o.onClear,k=o.className,S=void 0===k?"":k,E=o.style,A=o.type,z=void 0===A?"text":A,L=o.placeholder,D=o.value,B=o.defaultValue,M=o.onChange,T=o.onFocus,W=o.onBlur,N=o.onPressEnter,I=g(o,["size","disabled","error","readOnly","prefix","suffix","allowClear","onClear","className","style","type","placeholder","value","defaultValue","onChange","onFocus","onBlur","onPressEnter"]),j=C().primaryColor,R=void 0===j?"#FB6011":j,H=c(null),O=i.useState(B||D||""),P=O[0],V=O[1],q=i.useState(!1),Z=q[0],K=q[1];s(function(){"function"==typeof r?r(H.current):r&&(r.current=H.current)},[r]);var Y=void 0!==D,X=Y?D:P,G=function(e){var t;e.stopPropagation(),Y||V("");null==M||M({target:{value:""},currentTarget:{value:""}}),null==F||F(),null===(t=H.current)||void 0===t||t.focus()},_=w&&X&&!u,U={small:{height:"32px",paddingTop:"3px",paddingBottom:"3px"},mediumSmall:{height:"36px",paddingTop:"5px",paddingBottom:"5px"},medium:{height:"40px",paddingTop:"7px",paddingBottom:"7px"},large:{height:"48px",paddingTop:"11px",paddingBottom:"11px"}},J=y||_?"40px":"12px",Q=h({width:"100%",boxSizing:"border-box",fontFamily:"DM Sans, sans-serif",borderRadius:"8px",border:"1px solid ".concat(f?"#F04438":Z?R:"#D7D3D0"),backgroundColor:u||x?"#FAFAF9":"#FFFFFF",color:u?"#98A2B3":"#1C1917",fontSize:"16px",fontWeight:400,lineHeight:"24px",paddingLeft:m?"40px":"12px",paddingRight:J,paddingTop:U[a].paddingTop,paddingBottom:U[a].paddingBottom,transition:"all 0.2s",outline:"none",WebkitAppearance:"none",MozAppearance:"textfield",appearance:"none"},E);return t(n,{children:[e("style",{children:'\n .aha-input-wrapper input::placeholder {\n color: #D7D3D0;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n .aha-input-wrapper input::-webkit-input-placeholder {\n color: #D7D3D0;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n .aha-input-wrapper input::-moz-placeholder {\n color: #D7D3D0;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n .aha-input-wrapper input:-ms-input-placeholder {\n color: #D7D3D0;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n /* 移动端优化 */\n .aha-input-wrapper input {\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n touch-action: manipulation;\n }\n /* 移除数字输入框的上下箭头 */\n .aha-input-wrapper input[type="number"]::-webkit-inner-spin-button,\n .aha-input-wrapper input[type="number"]::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n .aha-input-wrapper input[type="number"] {\n -moz-appearance: textfield;\n }\n '}),t("div",{className:"aha-input-wrapper ".concat(S),style:{position:"relative",display:"inline-flex",alignItems:"center",width:"100%"},children:[m&&e("span",{style:{position:"absolute",left:"12px",display:"flex",alignItems:"center",color:u?"#98A2B3":"#78716C",zIndex:1,pointerEvents:"none"},children:m}),e("input",h({ref:H,type:z,value:X,placeholder:L,disabled:u,readOnly:x,onChange:function(e){Y||V(e.target.value),null==M||M(e)},onFocus:function(e){K(!0),null==T||T(e)},onBlur:function(e){K(!1),null==W||W(e)},onKeyDown:function(e){var t;"Enter"===e.key&&N&&N(e),null===(t=I.onKeyDown)||void 0===t||t.call(I,e)},style:Q,autoComplete:I.autoComplete||"off",autoCorrect:I.autoCorrect||"off",autoCapitalize:I.autoCapitalize||"off",spellCheck:I.spellCheck||!1},I)),(y||_)&&t("span",{style:{position:"absolute",right:"12px",display:"flex",alignItems:"center",gap:"4px",color:u?"#98A2B3":"#78716C",zIndex:1},children:[_&&e(function(){return e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:G,style:{cursor:"pointer",flexShrink:0,color:"#78716C"},children:e("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},{}),y&&e("span",{style:{pointerEvents:"none"},children:y})]})]})]})});ge.displayName="Input";var ve=u(function(o,r){var l=o.disabled,a=void 0!==l&&l,d=o.error,u=void 0!==d&&d,p=o.readOnly,f=void 0!==p&&p,v=o.showCount,x=void 0!==v&&v,m=o.maxLength,y=o.className,b=void 0===y?"":y,w=o.style,F=o.placeholder,k=o.value,S=o.defaultValue,E=o.rows,A=void 0===E?3:E,z=o.autoSize,L=void 0!==z&&z,D=o.onChange,B=o.onFocus,M=o.onBlur,T=g(o,["disabled","error","readOnly","showCount","maxLength","className","style","placeholder","value","defaultValue","rows","autoSize","onChange","onFocus","onBlur"]),W=C().primaryColor,N=void 0===W?"#FB6011":W,I=c(null),j=i.useState(S||k||""),R=j[0],H=j[1],O=i.useState(!1),P=O[0],V=O[1],q=i.useState(void 0),Z=q[0],K=q[1];s(function(){"function"==typeof r?r(I.current):r&&(r.current=I.current)},[r]);var Y=void 0!==k,X=Y?k:R,G=String(X||"").length;s(function(){if(L&&I.current){var e=I.current,t="object"==typeof L&&L.minRows||1,n="object"==typeof L?L.maxRows:void 0;e.style.height="auto";var i=e.scrollHeight,o=parseInt(window.getComputedStyle(e).lineHeight||"22",10),r=t*o,l=n?n*o:void 0,a=Math.max(i,r);l&&(a=Math.min(a,l)),e.style.height="".concat(a,"px"),K(a)}},[X,L]);var _=h(h({width:"100%",boxSizing:"border-box",fontFamily:"DM Sans, sans-serif",borderRadius:"8px",border:"1px solid ".concat(u?"#F04438":P?N:"#D7D3D0"),backgroundColor:a||f?"#FAFAF9":"#FFFFFF",color:a?"#98A2B3":"#1C1917",fontSize:"16px",fontWeight:400,lineHeight:"24px",padding:"12px 14px",boxShadow:"0 1px 2px rgba(10, 13, 18, 0.05)",transition:"all 0.2s",outline:"none",resize:L?"none":"vertical",cursor:a?"not-allowed":"text",WebkitAppearance:"none",appearance:"none"},void 0!==Z&&L?{height:"".concat(Z,"px")}:{}),w);return t(n,{children:[e("style",{children:"\n .aha-textarea-wrapper textarea::placeholder {\n color: #79716B;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n .aha-textarea-wrapper textarea::-webkit-input-placeholder {\n color: #79716B;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n .aha-textarea-wrapper textarea::-moz-placeholder {\n color: #79716B;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n .aha-textarea-wrapper textarea:-ms-input-placeholder {\n color: #79716B;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n /* 移动端优化 */\n .aha-textarea-wrapper textarea {\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n touch-action: manipulation;\n }\n "}),t("div",{className:"aha-textarea-wrapper ".concat(b),style:{position:"relative",display:"inline-flex",flexDirection:"column",width:"100%"},children:[e("textarea",h({ref:I,value:X,placeholder:F,disabled:a,readOnly:f,rows:L?void 0:A,maxLength:m,onChange:function(e){Y||H(e.target.value),null==D||D(e)},onFocus:function(e){V(!0),null==B||B(e)},onBlur:function(e){V(!1),null==M||M(e)},style:_,autoComplete:T.autoComplete||"off",autoCorrect:T.autoCorrect||"off",autoCapitalize:T.autoCapitalize||"off",spellCheck:T.spellCheck||!1},T)),(x||m)&&e("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"4px",fontSize:"12px",lineHeight:"18px",color:a?"#98A2B3":"#78716C",fontFamily:"DM Sans, sans-serif"},children:m?t("span",{children:[G," / ",m]}):e("span",{children:G})})]})]})});ve.displayName="Textarea";var xe=function(n){var o=n.checked,r=n.defaultChecked,l=void 0!==r&&r,a=n.disabled,s=void 0!==a&&a,d=n.onChange,c=n.onClick,u=n.checkedChildren,p=n.unCheckedChildren,f=n.size,g=void 0===f?"default":f,v=n.loading,x=void 0!==v&&v,m=n.className,y=void 0===m?"":m,b=n.style,w=C().primaryColor,F=void 0===w?"#FB6011":w,k=i.useState(l),S=k[0],E=k[1],A=void 0!==o,z=A?o:S,L={small:{width:"36px",height:"20px",thumbSize:"16px",thumbOffset:"2px",fontSize:"10px"},default:{width:"44px",height:"24px",thumbSize:"20px",thumbOffset:"2px",fontSize:"12px"}}[g],D=z||x,B=s?"#E7E5E4":D?F:"#F5F5F4",M=D?"calc(100% - ".concat(L.thumbSize," - ").concat(L.thumbOffset,")"):L.thumbOffset;return t("button",{type:"button",role:"switch","aria-checked":z,disabled:s||x,onClick:function(e){if(!s&&!x){var t=!z;A||E(t),null==d||d(t,e),null==c||c(t,e)}},className:"aha-switch ".concat(y),style:h({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:D?"flex-end":"flex-start",width:L.width,height:L.height,padding:"0",margin:"0",border:"none",borderRadius:"small"===g?"10px":"12px",backgroundColor:B,cursor:s||x?"not-allowed":"pointer",transition:"all 0.2s",outline:"none",boxSizing:"border-box"},b),children:[(u||p)&&e("span",{style:{position:"absolute",left:D?"6px":"auto",right:D?"auto":"6px",fontSize:L.fontSize,lineHeight:"1",color:"#FFFFFF",fontFamily:"DM Sans, sans-serif",fontWeight:500,transition:"opacity 0.2s",opacity:s?.5:1,zIndex:1,pointerEvents:"none"},children:D?u:p}),e("span",{style:{position:"absolute",left:M,top:"50%",transform:"translateY(-50%)",width:L.thumbSize,height:L.thumbSize,borderRadius:"50%",backgroundColor:"#FFFFFF",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)",transition:"left 0.2s, background-color 0.2s",display:"flex",alignItems:"center",justifyContent:"center",zIndex:2},children:x&&t("svg",{width:"small"===g?"8":"10",height:"small"===g?"8":"10",viewBox:"0 0 24 24",fill:"none",style:{animation:"spin 1s linear infinite"},children:[e("style",{children:"\n @keyframes spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n "}),e("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"32",opacity:"0.3"}),e("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"24"})]})})]})};xe.displayName="Switch";var me=function(o){var l,u=o.value,p=o.defaultValue,g=o.options,v=void 0===g?[]:g,x=o.mode,y=o.disabled,b=void 0!==y&&y,w=o.error,F=void 0!==w&&w,k=o.placeholder,S=void 0===k?"Please select":k,E=o.size,A=void 0===E?"medium":E,z=o.showSearch,L=void 0!==z&&z,D=o.filterOption,B=void 0===D||D,M=o.allowClear,T=void 0!==M&&M,W=o.onChange,N=o.onSelect,I=o.onDeselect,j=o.onSearch,R=o.onFocus,H=o.onBlur,O=o.onDropdownVisibleChange,P=o.className,V=void 0===P?"":P,q=o.style,Z=o.dropdownClassName,K=void 0===Z?"":Z,Y=o.dropdownStyle,X=o.defaultOpen,G=void 0!==X&&X,_=o.open,U=o.maxTagCount,J=o.tagRender,Q=o.optionRender,$=C().primaryColor,ee=void 0===$?"#FB6011":$,te=a(void 0!==p?p:x?[]:void 0),ne=te[0],ie=te[1],oe=a(G),re=oe[0],le=oe[1],ae=a(""),se=ae[0],de=ae[1],ce=a(-1),ue=ce[0],pe=ce[1],fe=c(null),he=c(null),ge=c(null),ve=a(null),xe=ve[0],me=ve[1],ye=void 0!==u,be=void 0!==_,we=ye?u:ne,Ce=be?_:re,Fe="multiple"===x||"tags"===x,ke=d(function(){if(!we)return[];var e=Array.isArray(we)?we:[we];return v.filter(function(t){return e.includes(t.value)})},[we,v]),Se=d(function(){return L&&se?!1===B?v:"function"==typeof B?v.filter(function(e){return B(se,e)}):v.filter(function(e){var t=String(e.label||"").toLowerCase(),n=se.toLowerCase();return t.includes(n)}):v},[v,se,L,B]),Ee=r(function(){return Se()},[Se]);s(function(){if(Ce&&fe.current){var e=function(){if(fe.current){var e=fe.current.getBoundingClientRect();me({top:e.bottom+window.scrollY+4,left:e.left+window.scrollX,width:e.width})}};return e(),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),function(){window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}}me(null)},[Ce]),s(function(){var e=function(e){var t=e.target;fe.current&&!fe.current.contains(t)&&ge.current&&!ge.current.contains(t)&&(be||le(!1),null==O||O(!1),de(""))};if(Ce)return document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,!0),function(){document.removeEventListener("mousedown",e,!0),document.removeEventListener("touchstart",e,!0)}},[Ce,be,O]),s(function(){if(Ce){var e=function(e){var t;if("ArrowDown"===e.key)e.preventDefault(),pe(function(e){return e<Ee.length-1?e+1:e});else if("ArrowUp"===e.key)e.preventDefault(),pe(function(e){return e>0?e-1:0});else if("Enter"===e.key&&ue>=0){e.preventDefault();var n=Ee[ue];n&&!n.disabled&&Ae(n)}else"Escape"===e.key&&(e.preventDefault(),be||le(!1),null==O||O(!1),null===(t=fe.current)||void 0===t||t.focus())};return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}},[Ce,Ee,ue,be,O]),s(function(){if(ue>=0&&ge.current){var e=ge.current.querySelectorAll(".aha-select-option")[ue];e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})}},[ue]);var Ae=d(function(e){var t;if(!e.disabled)if(Fe){var n,i=Array.isArray(we)?we:[];i.includes(e.value)?(n=i.filter(function(t){return t!==e.value}),null==I||I(e.value,e)):(n=m(m([],i,!0),[e.value],!1),null==N||N(e.value,e)),ye||ie(n);var o=v.filter(function(e){return n.includes(e.value)});null==W||W(n,o)}else ye||ie(e.value),null==W||W(e.value,e),null==N||N(e.value,e),be||le(!1),null==O||O(!1),de(""),null===(t=fe.current)||void 0===t||t.focus()},[Fe,we,ye,be,v,W,N,I,O]),ze=d(function(e,t){if(e.stopPropagation(),Fe&&Array.isArray(we)){var n=we.filter(function(e){return e!==t}),i=v.find(function(e){return e.value===t});ye||ie(n),null==W||W(n,ke()),null==I||I(t,i)}},[Fe,we,ye,v,W,I,ke]),Le=function(e){e.stopPropagation();var t=Fe?[]:void 0;ye||ie(t),null==W||W(t,[]),de("")},De={small:{height:"32px",paddingTop:"3px",paddingBottom:"3px",fontSize:"16px",lineHeight:"24px"},mediumSmall:{height:"36px",paddingTop:"5px",paddingBottom:"5px",fontSize:"16px",lineHeight:"24px"},medium:{height:"40px",paddingTop:"7px",paddingBottom:"7px",fontSize:"16px",lineHeight:"24px"},large:{height:"48px",paddingTop:"11px",paddingBottom:"11px",fontSize:"16px",lineHeight:"24px"}},Be=r(function(){return ke()},[ke]),Me=r(function(){return T&&we&&!b},[T,we,b]),Te=r(function(){return Fe?Array.isArray(we)&&we.length>0:null!=we&&""!==we},[Fe,we]),We=r(function(){if(!Fe||!Array.isArray(we)||0===we.length)return null;var n="responsive"===U?Be.slice(0,2):U?Be.slice(0,U):Be,o=U&&Be.length>n.length?Be.length-n.length:0;return t("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"4px",flex:1,minWidth:0},children:[n.map(function(n){var o={label:n.label,value:n.value,closable:!b,onClose:function(){return ze({},n.value)}};return J?e(i.Fragment,{children:J(o)},n.value):t("span",{style:{display:"inline-flex",alignItems:"center",gap:"4px",padding:"2px 8px",backgroundColor:"#F5F5F4",borderRadius:"4px",fontSize:"12px",lineHeight:"18px",color:"#101828",fontFamily:"DM Sans, sans-serif",maxWidth:"100%"},children:[e("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n.label}),!b&&e("span",{onClick:function(e){return ze(e,n.value)},style:{cursor:"pointer",display:"flex",alignItems:"center",color:"#78716C",marginLeft:"4px"},children:e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]},n.value)}),o>0&&t("span",{style:{fontSize:"12px",lineHeight:"18px",color:"#78716C",fontFamily:"DM Sans, sans-serif"},children:["+",o]})]})},[Fe,we,Be,U,b,J]);return t(n,{children:[e("style",{children:"\n @keyframes dropdownFadeIn {\n from {\n opacity: 0;\n transform: translateY(-8px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n "}),t("div",{ref:fe,className:"aha-select ".concat(V),style:h({position:"relative",display:"inline-flex",alignItems:"center",width:"100%",minWidth:"120px",boxSizing:"border-box",fontFamily:"DM Sans, sans-serif",borderRadius:"8px",border:"1px solid ".concat(F?"#F04438":Ce?ee:"#D7D3D0"),backgroundColor:b?"#FAFAF9":"#FFFFFF",cursor:b?"not-allowed":"pointer",transition:"all 0.2s",paddingLeft:"12px",paddingRight:"36px",paddingTop:De[A].paddingTop,paddingBottom:De[A].paddingBottom,fontSize:De[A].fontSize,lineHeight:De[A].lineHeight,fontWeight:400,WebkitTapHighlightColor:"transparent",WebkitTouchCallout:"none",touchAction:"manipulation",userSelect:"none"},q),onClick:function(){if(!b){var e=!Ce;be||le(e),null==O||O(e),e&&L?setTimeout(function(){var e;null===(e=he.current)||void 0===e||e.focus()},0):de("")}},onFocus:function(e){null==R||R(e)},onBlur:function(e){null==H||H(e)},onTouchStart:function(e){b||(e.currentTarget.style.opacity="0.8")},onTouchEnd:function(e){e.currentTarget.style.opacity="1"},tabIndex:b?-1:0,children:[e("div",{style:{display:"flex",alignItems:"center",flex:1,minWidth:0,gap:"8px"},children:Fe?We||e("span",S?{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"#79716B",fontSize:"16px",lineHeight:"24px",fontWeight:400},children:S}:{style:{flex:1,minHeight:"24px"}}):L&&Ce?e("input",{ref:he,type:"text",value:se,onChange:function(e){var t=e.target.value;de(t),null==j||j(t),pe(-1)},onClick:function(e){return e.stopPropagation()},onFocus:function(e){return e.stopPropagation()},style:{flex:1,border:"none",outline:"none",background:"transparent",fontSize:"16px",lineHeight:"24px",fontWeight:400,color:b?"#98A2B3":"#1C1917",fontFamily:"DM Sans, sans-serif",minWidth:0,WebkitAppearance:"none",appearance:"none"},placeholder:Te?void 0:S,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1}):e("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:Te?b?"#98A2B3":"#1C1917":"#79716B",fontSize:"16px",lineHeight:"24px",fontWeight:400,minHeight:"24px",display:"inline-block"},children:Te?(null===(l=Be[0])||void 0===l?void 0:l.label)||we:S||" "})}),t("div",{style:{position:"absolute",right:"12px",display:"flex",alignItems:"center",gap:"4px"},children:[Me&&e(function(){return e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:Le,style:{cursor:"pointer",flexShrink:0,color:"#78716C"},children:e("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},{}),e(function(t){var n=t.isOpen;return e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:n?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease-in-out",flexShrink:0},children:e("path",{d:"M4 6L8 10L12 6",stroke:"#78716C",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},{isOpen:Ce})]})]}),Ce&&xe&&f(e("div",{ref:ge,className:"aha-select-dropdown ".concat(K),style:h({position:"absolute",top:"".concat(xe.top,"px"),left:"".concat(xe.left,"px"),width:"".concat(xe.width,"px"),zIndex:1050,backgroundColor:"#FFFFFF",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",border:"1px solid #E7E5E4",maxHeight:"256px",overflow:"auto",opacity:0,transform:"translateY(-8px)",animation:"dropdownFadeIn 0.2s ease-out forwards",WebkitOverflowScrolling:"touch",overscrollBehavior:"contain"},Y),children:0===Ee.length?e("div",{style:{padding:"8px 16px",textAlign:"center",color:"#78716C",fontSize:"14px",fontFamily:"DM Sans, sans-serif"},children:"No data"}):Ee.map(function(n,i){var o=Fe?Array.isArray(we)&&we.includes(n.value):we===n.value,r=i===ue;return Q?e("div",{className:"aha-select-option ".concat(n.disabled?"":"hover:bg-[#FAFAF9]"," ").concat(o?"bg-[#FAFAF9]":""),onClick:function(){return!n.disabled&&Ae(n)},style:{cursor:n.disabled?"not-allowed":"pointer",transition:"background-color 0.2s"},children:Q(n,{selected:o,focused:r,disabled:n.disabled||!1})},n.value):t("div",{className:"aha-select-option ".concat(n.disabled?"":"hover:bg-[#FAFAF9]"," ").concat(o?"bg-[#FAFAF9]":""),onClick:function(){return Ae(n)},style:{padding:"8px 16px",cursor:n.disabled?"not-allowed":"pointer",color:n.disabled?"#98A2B3":"#101828",fontSize:"14px",lineHeight:"20px",fontFamily:"DM Sans, sans-serif",display:"flex",alignItems:"center",justifyContent:"space-between",transition:"background-color 0.2s"},children:[e("span",{children:n.label}),o&&e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r?"hidden":"",children:e("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:ee,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]},n.value)})}),document.body)]})};me.displayName="Select";var ye=o(null),be=i.forwardRef(function(t,n){var i=t.initialValues,o=void 0===i?{}:i,l=t.onValuesChange,u=t.onFinish,f=t.onFinishFailed,g=t.labelWidth,m=void 0===g?"120px":g,y=t.labelAlign,b=void 0===y?"right":y,w=t.layout,C=void 0===w?"horizontal":w;t.size;var F=t.className,k=void 0===F?"":F,S=t.style,E=t.children,A=a(function(){var e={};return Object.keys(o).forEach(function(t){e[t]={value:o[t],error:void 0,touched:!1,validating:!1}}),e}),z=A[0],L=A[1],D=c(z);s(function(){D.current=z},[z]);var B=d(function(e){var t;return null===(t=D.current[e])||void 0===t?void 0:t.value},[]),M=d(function(e,t){L(function(n){var i=h({},n);if(i[e]?i[e]=h(h({},i[e]),{value:t}):i[e]={value:t,error:void 0,touched:!1,validating:!1},D.current[e]?D.current[e]=h(h({},D.current[e]),{value:t}):D.current[e]={value:t,error:void 0,touched:!1,validating:!1},l){var o={};o[e]=t;var r={};Object.keys(i).forEach(function(e){r[e]=i[e].value}),l(o,r)}return i})},[l]),T=d(function(e){var t;return null===(t=D.current[e])||void 0===t?void 0:t.error},[]),W=d(function(e,t){D.current[e]&&(D.current[e]=h(h({},D.current[e]),{error:t})),L(function(n){var i=h({},n);return i[e]?i[e]=h(h({},i[e]),{error:t}):i[e]={value:void 0,error:t,touched:!1,validating:!1},i})},[]),N=d(function(e){var t;return(null===(t=D.current[e])||void 0===t?void 0:t.touched)||!1},[]),I=d(function(e,t){D.current[e]&&(D.current[e]=h(h({},D.current[e]),{touched:t})),L(function(n){var i=h({},n);return i[e]?i[e]=h(h({},i[e]),{touched:t}):i[e]={value:void 0,error:void 0,touched:t,validating:!1},i})},[]),j=d(function(e){var t;return(null===(t=D.current[e])||void 0===t?void 0:t.validating)||!1},[]),R=d(function(e,t){D.current[e]&&(D.current[e]=h(h({},D.current[e]),{validating:t})),L(function(n){var i=h({},n);return i[e]?i[e]=h(h({},i[e]),{validating:t}):i[e]={value:void 0,error:void 0,touched:!1,validating:t},i})},[]),H=c();H.current=function(e,t){L(function(n){if(n[e]){var i=n[e].rules||[],r=t.rules||[],l=i.length===r.length;if(l&&i.length>0)for(var a=0;a<i.length;a++){var s=i[a],d=r[a];if((null==s?void 0:s.required)!==(null==d?void 0:d.required)||(null==s?void 0:s.message)!==(null==d?void 0:d.message)||(null==s?void 0:s.type)!==(null==d?void 0:d.type)||(null==s?void 0:s.pattern)!==(null==d?void 0:d.pattern)||(null==s?void 0:s.min)!==(null==d?void 0:d.min)||(null==s?void 0:s.max)!==(null==d?void 0:d.max)||(null==s?void 0:s.len)!==(null==d?void 0:d.len)||(null==s?void 0:s.whitespace)!==(null==d?void 0:d.whitespace)){l=!1;break}}if(l&&n[e].required===t.required)return n}var c=h({},n);return c[e]?c[e]=h(h({},c[e]),{rules:t.rules,required:t.required}):c[e]={value:o[e],error:void 0,touched:!1,validating:!1,rules:t.rules,required:t.required},c})};var O=d(function(e,t){var n;null===(n=H.current)||void 0===n||n.call(H,e,t)},[]),P=d(function(e){L(function(t){var n=h({},t);return delete n[e],n})},[]),V=d(function(e){return v(void 0,void 0,void 0,function(){var t,n,i,o,r,l,a,s,d;return x(this,function(c){switch(c.label){case 0:if(!(t=D.current[e]))return[2,void 0];R(e,!0),n=t.rules||[],o=0,r=n,c.label=1;case 1:if(!(o<r.length))return[3,6];if(l=r[o],a=t.value,l.required&&(null==a||""===a))return i=l.message||"".concat(e," is required"),[3,6];if(l.type&&null!=a&&""!==a&&(s={string:function(e){return"string"==typeof e},number:function(e){return"number"==typeof e&&!isNaN(e)},boolean:function(e){return"boolean"==typeof e},email:function(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(e))},url:function(e){try{return new URL(String(e)),!0}catch(e){return!1}}}[l.type])&&!s(a))return i=l.message||"".concat(e," must be a valid ").concat(l.type),[3,6];if(l.pattern&&null!=a&&""!==a&&!l.pattern.test(String(a)))return i=l.message||"".concat(e," format is invalid"),[3,6];if(void 0!==l.min&&null!=a&&""!==a&&("string"==typeof a?a.length:Number(a))<l.min)return i=l.message||"".concat(e," must be at least ").concat(l.min),[3,6];if(void 0!==l.max&&null!=a&&""!==a&&("string"==typeof a?a.length:Number(a))>l.max)return i=l.message||"".concat(e," must be at most ").concat(l.max),[3,6];if(void 0!==l.len&&null!=a&&""!==a&&("string"==typeof a?a.length:Number(a))!==l.len)return i=l.message||"".concat(e," must be exactly ").concat(l.len),[3,6];if(l.whitespace&&"string"==typeof a&&a.trim()!==a)return i=l.message||"".concat(e," cannot be whitespace"),[3,6];if(!l.validator)return[3,5];c.label=2;case 2:return c.trys.push([2,4,,5]),[4,l.validator(l,a)];case 3:return c.sent(),[3,5];case 4:return d=c.sent(),i=(null==d?void 0:d.message)||l.message||"".concat(e," validation failed"),[3,6];case 5:return o++,[3,1];case 6:return D.current[e]?D.current[e]=h(h({},D.current[e]),{error:i,validating:!1,touched:!0}):D.current[e]={value:t.value,error:i,touched:!0,validating:!1,rules:t.rules,required:t.required},L(function(n){var o=h({},n);return o[e]?o[e]=h(h({},o[e]),{error:i,validating:!1,touched:!0}):o[e]={value:t.value,error:i,touched:!0,validating:!1,rules:t.rules,required:t.required},o}),[2,i]}})})},[]),q=d(function(e){var t=D.current,n={};return(e||Object.keys(t)).forEach(function(e){var i;n[e]=null===(i=t[e])||void 0===i?void 0:i.value}),n},[]),Z=d(function(e){return v(void 0,void 0,void 0,function(){var t,n,i,o;return x(this,function(r){switch(r.label){case 0:return t=D.current,n=e||Object.keys(t),i=[],[4,Promise.all(n.map(function(e){return v(void 0,void 0,void 0,function(){var n,i;return x(this,function(o){switch(o.label){case 0:return(n=t[e])&&n.rules&&n.rules.length>0?[4,V(e)]:[3,2];case 1:return i=o.sent(),[2,{name:e,error:i}];case 2:return[2,{name:e,error:void 0}]}})})}))];case 1:return r.sent().forEach(function(e){var t=e.name,n=e.error;n&&i.push({name:t,errors:[n]})}),[4,new Promise(function(e){return requestAnimationFrame(function(){setTimeout(e,0)})})];case 2:if(r.sent(),i.length>0)throw o={values:q(),errorFields:i},null==f||f(o),o;return[2,q()]}})})},[V,q,f]),K=d(function(e){L(function(t){var n=h({},t);return(e||Object.keys(n)).forEach(function(e){n[e]&&(n[e]=h(h({},n[e]),{value:o[e],error:void 0,touched:!1,validating:!1}))}),n})},[o]),Y=d(function(e){L(function(t){var n=h({},t);if(Object.keys(e).forEach(function(t){n[t]?n[t]=h(h({},n[t]),{value:e[t]}):n[t]={value:e[t],error:void 0,touched:!1,validating:!1}}),l){var i={};Object.keys(n).forEach(function(e){i[e]=n[e].value}),l(e,i)}return n})},[l]),X=d(function(){return v(void 0,void 0,void 0,function(){var e;return x(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,Z()];case 1:return e=t.sent(),null==u||u(e),[2,e];case 2:throw t.sent();case 3:return[2]}})})},[Z,u]);p(n,function(){return{getFieldValue:B,getFieldsValue:q,setFieldValue:M,setFieldsValue:Y,getFieldError:T,validateField:V,validateFields:Z,resetFields:K,submit:X}});var G=r(function(){return{fields:z,getFieldValue:B,setFieldValue:M,getFieldError:T,setFieldError:W,isFieldTouched:N,setFieldTouched:I,isFieldValidating:j,setFieldValidating:R,registerField:O,unregisterField:P,validateField:V,validateFields:Z,resetFields:K,getFieldsValue:q,setFieldsValue:Y,submit:X,labelWidth:m,labelAlign:b}},[z,B,M,T,W,N,I,j,R,O,P,V,Z,K,q,Y,X,m,b]),_=h({},S);return"vertical"===C?(_.display="flex",_.flexDirection="column"):"inline"===C&&(_.display="inline-flex",_.flexWrap="wrap",_.gap="16px"),e(ye.Provider,{value:G,children:e("form",{className:"aha-form ".concat(k),style:_,onSubmit:function(e){return v(void 0,void 0,void 0,function(){var t;return x(this,function(n){switch(n.label){case 0:e.preventDefault(),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,Z()];case 2:return t=n.sent(),null==u||u(t),[3,4];case 3:return n.sent(),[3,4];case 4:return[2]}})})},children:E})})});be.displayName="Form";var we=be;we.Item=function(n){var o=n.name,a=n.label,d=n.htmlFor;n.labelCol,n.wrapperCol;var u=n.required,p=void 0!==u&&u,f=n.rules,g=void 0===f?[]:f;n.hasFeedback;var v=n.validateStatus,x=n.help,m=n.extra,y=n.className,b=void 0===y?"":y,w=n.style,C=n.children;n.labelAlign,n.labelWidth;var F=n.hidden,k=void 0!==F&&F,S=n.tooltip,E=l(ye),A=c(null),z=(null==E?void 0:E.fields)||{};o&&E&&E.getFieldValue(o);var L=o&&E?E.getFieldError(o):void 0,D=!(!o||!E)&&E.isFieldTouched(o),B=!(!o||!E)&&E.isFieldValidating(o);o&&z[o];var M=v||(L?"error":B?"validating":D&&!L?"success":void 0),T=void 0!==x?x:L||void 0,W=c(g),N=c(p),I=c(!1),j=p||g.some(function(e){return e.required}),R=r(function(){if(!I.current)return I.current=!0,!0;if(W.current.length!==g.length)return!0;if(W.current===g)return!1;for(var e=0;e<g.length;e++){var t=W.current[e],n=g[e];if((null==t?void 0:t.required)!==(null==n?void 0:n.required)||(null==t?void 0:t.message)!==(null==n?void 0:n.message)||(null==t?void 0:t.type)!==(null==n?void 0:n.type)||(null==t?void 0:t.pattern)!==(null==n?void 0:n.pattern)||(null==t?void 0:t.min)!==(null==n?void 0:n.min)||(null==t?void 0:t.max)!==(null==n?void 0:n.max)||(null==t?void 0:t.len)!==(null==n?void 0:n.len)||(null==t?void 0:t.whitespace)!==(null==n?void 0:n.whitespace))return!0}return!1},[g]);s(function(){if(o&&E)return(!W.current||R||N.current!==p)&&(W.current=g,N.current=p,E.registerField(o,{rules:g,required:j})),function(){o&&E&&E.unregisterField(o)}},[o]);if(k)return null;return t("div",{ref:A,className:"aha-form-item ".concat(b),style:h({display:"flex",flexDirection:"column",marginBottom:"16px"},w),children:[a&&t("label",{htmlFor:d,style:{display:"flex",alignItems:"center",marginBottom:"6px",fontSize:"14px",lineHeight:"20px",color:"#44403C",fontFamily:"DM Sans, sans-serif",fontWeight:500},children:[a,j&&e("span",{style:{color:"#EC470A",marginLeft:"4px"},children:"*"}),S&&e(function(n){var o=n.content,r=i.useState(!1),l=r[0],a=r[1],s=i.useRef(null);return i.useEffect(function(){var e=function(e){s.current&&!s.current.contains(e.target)&&a(!1)};if(l)return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}},[l]),t("div",{style:{position:"relative",display:"inline-block",marginLeft:"4px"},children:[e("div",{onClick:function(e){e.stopPropagation(),a(!l)},style:{display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"#A9A29D"},children:e(re,{})}),l&&t("div",{ref:s,style:{position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"4px",padding:"8px 12px",backgroundColor:"#1C1917",color:"#FFFFFF",fontSize:"12px",lineHeight:"18px",fontFamily:"DM Sans, sans-serif",borderRadius:"6px",whiteSpace:"nowrap",zIndex:1e3,boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)"},children:[o,e("div",{style:{position:"absolute",top:"-4px",left:"50%",transform:"translateX(-50%)",width:0,height:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderBottom:"4px solid #1C1917"}})]})]})},{content:S})]}),t("div",{style:{width:"100%"},children:[e("div",{children:i.Children.map(C,function(e){return i.isValidElement(e)?function(e){var t,n,r,l,a,s,d,c,u;if(!i.isValidElement(e))return e;var p=h({},e.props);if(o&&E){var f=E.getFieldValue(o),g=E.setFieldValue;if(!g)return e;if(e.type&&"object"==typeof e.type&&"displayName"in e.type){var v=e.type.displayName;if("Input"===v||"Textarea"===v){p.value=f||"";var x=null===(t=e.props)||void 0===t?void 0:t.onChange,m=null===(n=e.props)||void 0===n?void 0:n.onBlur;p.onChange=function(e){g(o,e.target.value),null==x||x(e),o&&E&&setTimeout(function(){E.validateField(o)},0)},p.onBlur=function(e){o&&E&&(E.setFieldTouched(o,!0),E.validateField(o)),null==m||m(e)},p.error="error"===M}else if("Select"===v){p.value=f;var y=null===(r=e.props)||void 0===r?void 0:r.onChange,b=null===(l=e.props)||void 0===l?void 0:l.onBlur;p.onChange=function(e,t){g(o,e),null==y||y(e,t),o&&E&&(E.setFieldTouched(o,!0),setTimeout(function(){E.validateField(o)},0))},p.onBlur=function(e){o&&E&&(E.setFieldTouched(o,!0),E.validateField(o)),null==b||b(e)},p.error="error"===M}else if("Switch"===v){p.checked=f||!1;var w=null===(a=e.props)||void 0===a?void 0:a.onChange;p.onChange=function(e,t){g(o,e),null==w||w(e,t),o&&E&&(E.setFieldTouched(o,!0),setTimeout(function(){E.validateField(o)},0))}}else if("Checkbox"===v){p.checked=f||!1;var C=null===(s=e.props)||void 0===s?void 0:s.onChange;p.onChange=function(e){g(o,e.target.checked),null==C||C(e),o&&E&&(E.setFieldTouched(o,!0),setTimeout(function(){E.validateField(o)},0))}}else if("Radio"===v){var F=null===(d=e.props)||void 0===d?void 0:d.value;if(void 0!==F){p.checked=f===F;var k=null===(c=e.props)||void 0===c?void 0:c.onChange;p.onChange=function(e){g(o,F),null==k||k(e),o&&E&&(E.setFieldTouched(o,!0),setTimeout(function(){E.validateField(o)},0))}}}}else{void 0!==f&&(p.value=f);var S=null===(u=e.props)||void 0===u?void 0:u.onChange;p.onChange=function(e){var t,n,i=null!==(n=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value)&&void 0!==n?n:e;g(o,i),null==S||S(e)}}}return"error"===M&&"error"in p&&(p.error=!0),i.cloneElement(e,p)}(e):e})}),T&&e("div",{style:{marginTop:"6px",fontSize:"14px",lineHeight:"20px",fontWeight:400,color:"error"===M?"#D92D20":"warning"===M?"#F59E0B":"#78716C",fontFamily:"DM Sans, sans-serif"},children:T}),m&&!T&&e("div",{style:{marginTop:"4px",fontSize:"12px",lineHeight:"18px",color:"#78716C",fontFamily:"DM Sans, sans-serif"},children:m})]})]})};var Ce=function(n){var o=n.items,r=void 0===o?[]:o,l=n.userProfile,s=n.selectedKeys,u=n.defaultSelectedKeys,p=void 0===u?[]:u,f=n.onSelect,g=n.onDeselect,v=n.onClick,x=n.className,y=void 0===x?"":x,b=n.style,w=n.width,F=void 0===w?320:w;C().primaryColor;var k=c(null),S=c({}),E=void 0!==s,A=a(p),z=A[0],L=A[1],D=E?s:z,B=function(e){return"children"in e&&Array.isArray(e.children)},M=d(function(e,t,n){void 0===n&&(n=[]);for(var i=0,o=t;i<o.length;i++){var r=o[i];if(B(r)){var l=M(e,r.children,n);if(l)return l}else{var a=r,s=m(m([],n,!0),[a.key],!1);if(a.key===e)return s}}return null},[]),T=d(function(e){var t;if(!e.disabled){var n,i=M(e.key,r)||[e.key];D.includes(e.key)?(n=D.filter(function(t){return t!==e.key}),null==g||g({key:e.key,keyPath:i,selectedKeys:n})):(n=[e.key],null==f||f({key:e.key,keyPath:i,selectedKeys:n})),E||L(n),null===(t=e.onClick)||void 0===t||t.call(e,{key:e.key,keyPath:i}),e.skipGlobalClick||null==v||v({key:e.key,keyPath:i})}},[D,E,f,g,v,r,M]),W=function(n){var i=D.includes(n.key);if(n.render)return e("div",{className:n.className,style:n.style,children:n.render(n,i)},n.key);var o=h({display:"flex",alignItems:"center",padding:"10px 16px",cursor:n.disabled?"not-allowed":"pointer",fontSize:"14px",lineHeight:"20px",fontFamily:"DM Sans, sans-serif",color:n.disabled?"#98A2B3":n.danger?"#DC2626":"#101828",backgroundColor:"transparent",transition:"background-color 0.15s",opacity:n.disabled?.5:1},n.style);return t("div",{ref:function(e){S.current[n.key]=e},className:"aha-menu-item ".concat(n.className||""),style:o,onClick:function(){return T(n)},onMouseEnter:function(e){n.disabled||(e.currentTarget.style.backgroundColor="#F9FAFB")},onMouseLeave:function(e){e.currentTarget.style.backgroundColor="transparent"},children:[n.icon&&e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px",marginRight:"12px",flexShrink:0,color:n.disabled?"#98A2B3":n.danger?"#DC2626":"#101828"},children:n.icon}),e("span",{style:{flex:1},children:n.label})]},n.key)},N=h({width:"number"==typeof F?"".concat(F,"px"):F,backgroundColor:"#FFFFFF",borderRadius:"12px",boxShadow:"0px 10px 38px rgba(22, 23, 24, 0.35), 0px 10px 20px rgba(22, 23, 24, 0.2)",overflow:"hidden",fontFamily:"DM Sans, sans-serif"},b),I=function(e,t){if(0===e)return!1;var n=t[e],i=t[e-1];return!!B(i)||!(!B(n)||B(i))};return t("div",{ref:k,className:"aha-menu-list ".concat(y),style:N,children:[l&&(l?l.render?l.render(l):e("div",{onClick:l.onClick,style:{padding:"16px",cursor:l.onClick?"pointer":"default",borderBottom:"1px solid #E7E5E4"},children:t("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[t("div",{style:{position:"relative",flexShrink:0},children:[l.avatar||e("div",{style:{width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"#F5F5F4",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"16px",color:"#78716C"},children:"string"==typeof l.name?l.name.charAt(0).toUpperCase():"U"}),void 0!==l.online&&e("div",{style:{position:"absolute",bottom:"0",right:"0",width:"12px",height:"12px",borderRadius:"50%",backgroundColor:l.online?"#10B981":"#9CA3AF",border:"2px solid #FFFFFF"}})]}),t("div",{style:{flex:1,minWidth:0},children:[e("div",{style:{fontSize:"14px",fontWeight:500,lineHeight:"20px",color:"#101828",fontFamily:"DM Sans, sans-serif",marginBottom:"2px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l.name}),l.email&&e("div",{style:{fontSize:"14px",lineHeight:"20px",color:"#78716C",fontFamily:"DM Sans, sans-serif",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l.email})]})]})}):null),e("div",{children:r.map(function(n,o){return t(i.Fragment,{children:[I(o,r)&&e("div",{style:{height:"1px",backgroundColor:"#E7E5E4",margin:"4px 0"}}),B(n)?(l=n,e("div",{className:"aha-menu-group ".concat(l.className||""),children:l.children.map(function(e){return W(e)})},"group-".concat(l.title))):W(n)]},o);var l})})]})};Ce.displayName="MenuList";var Fe=function(e,t,n,i){void 0===i&&(i=6);var o=window.scrollX||window.pageXOffset,r=window.scrollY||window.pageYOffset,l=e.left+e.width/2,a=e.top+e.height/2,s=i+6,d=0,c=0;switch(n){case"top":d=e.top-t.height-s+r,c=l-t.width/2+o;break;case"bottom":default:d=e.bottom+s+r,c=l-t.width/2+o;break;case"left":d=a-t.height/2+r,c=e.left-t.width-s+o;break;case"right":d=a-t.height/2+r,c=e.right+s+o;break;case"top-left":d=e.top-t.height-s+r,c=e.left+o;break;case"top-right":d=e.top-t.height-s+r,c=e.right-t.width+o;break;case"bottom-left":d=e.bottom+s+r,c=e.left+o;break;case"bottom-right":d=e.bottom+s+r,c=e.right-t.width+o}var u=window.innerWidth,p=window.innerHeight;return c<o+8?c=o+8:c+t.width>o+u-8&&(c=o+u-t.width-8),d<r+8?d=r+8:d+t.height>r+p-8&&(d=r+p-t.height-8),{top:d,left:c}},ke=function(e,t,n,i){void 0===i&&(i=6);var o=Fe(e,t,n,i),r=o.top,l=o.left,a=window.scrollX||window.pageXOffset,s=r-(window.scrollY||window.pageYOffset),d=l-a,c=s+t.height,u=d+t.width,p=s,f=d,h=Math.max(p,e.top),g=Math.min(c,e.bottom),v=Math.max(f,e.left),x=Math.min(u,e.right);return g>h+1&&x>v+1},Se=function(t,n){var i=h({position:"absolute",width:0,height:0,borderStyle:"solid"},n),o={top:h(h({},i),{borderWidth:"".concat(6,"px ").concat(6,"px 0 ").concat(6,"px"),borderColor:"#0C0A09 transparent transparent transparent"}),bottom:h(h({},i),{borderWidth:"0 ".concat(6,"px ").concat(6,"px ").concat(6,"px"),borderColor:"transparent transparent #0C0A09 transparent"}),left:h(h({},i),{borderWidth:"".concat(6,"px 0 ").concat(6,"px ").concat(6,"px"),borderColor:"transparent transparent transparent #0C0A09"}),right:h(h({},i),{borderWidth:"".concat(6,"px ").concat(6,"px ").concat(6,"px 0"),borderColor:"transparent #0C0A09 transparent transparent"}),"top-left":h(h({},i),{borderWidth:"".concat(6,"px ").concat(6,"px 0 ").concat(6,"px"),borderColor:"#0C0A09 transparent transparent transparent"}),"top-right":h(h({},i),{borderWidth:"".concat(6,"px ").concat(6,"px 0 ").concat(6,"px"),borderColor:"#0C0A09 transparent transparent transparent"}),"bottom-left":h(h({},i),{borderWidth:"0 ".concat(6,"px ").concat(6,"px ").concat(6,"px"),borderColor:"transparent transparent #0C0A09 transparent"}),"bottom-right":h(h({},i),{borderWidth:"0 ".concat(6,"px ").concat(6,"px ").concat(6,"px"),borderColor:"transparent transparent #0C0A09 transparent"})};return e("div",{style:o[t]})},Ee=function(i){var o=i.content,r=i.children,l=i.position,u=void 0===l?"top":l,p=i.trigger,g=void 0===p?"hover":p,v=i.delay,x=void 0===v?200:v,m=i.disabled,y=void 0!==m&&m,b=i.className,w=void 0===b?"":b,C=i.tooltipClassName,F=void 0===C?"":C,k=i.gap,S=void 0===k?6:k,E=i.showArrow,A=void 0===E||E,z=i.width,L=i.defaultVisible,D=void 0!==L&&L,B=i.visible,M=i.onVisibleChange,T=void 0!==B,W=a(D),N=W[0],I=W[1],j=T?B:N,R=a(T?null!=B&&B:D),H=R[0],O=R[1],P=d(function(e){T||I(e),null==M||M(e)},[T,M]);s(function(){T&&(B?requestAnimationFrame(function(){O(!0)}):O(!1))},[T,B]);var V=a(u),q=V[0],Z=V[1],K=a("320px"),Y=K[0],X=K[1],G=a({position:"absolute",top:0,left:0,pointerEvents:"hover"===g?"auto":"none"}),_=G[0],U=G[1],J=a({}),Q=J[0],$=J[1],ee=c(null),te=c(null),ne=c(null),ie=c(null),oe=d(function(){if(ee.current&&te.current&&j&&H){var e=ee.current.getBoundingClientRect(),t=te.current.getBoundingClientRect(),n=function(e,t,n,i){if(void 0===i&&(i=6),!ke(e,t,n,i))return n;for(var o=0,r=function(e){switch(e){case"top":return["bottom","right","left"];case"bottom":return["top","right","left"];case"left":return["right","top","bottom"];case"right":return["left","top","bottom"];case"top-left":return["bottom-left","top-right","bottom-right","right","left"];case"top-right":return["bottom-right","top-left","bottom-left","left","right"];case"bottom-left":return["top-left","bottom-right","top-right","right","left"];case"bottom-right":return["top-right","bottom-left","top-left","left","right"];default:return[]}}(n);o<r.length;o++){var l=r[o];if(!ke(e,t,l,i))return l}return n}(e,t,u,S);Z(n);var i=Fe(e,t,n,S),o=i.top,r=i.left;if(U(function(e){return h(h({},e),{position:"absolute",top:"".concat(o,"px"),left:"".concat(r,"px"),pointerEvents:"hover"===g?"auto":"none",zIndex:9999})}),A){var l=function(e,t,n,i,o){var r=window.scrollX||window.pageXOffset,l=window.scrollY||window.pageYOffset,a=t.left+(t.width-6)/2,s=t.top+(t.height-6)/2,d=i-r,c=o-l;switch(e){case"top":return{bottom:-6,left:Math.min(Math.max(a-d,6),n.width-6)};case"bottom":return{top:-6,left:Math.min(Math.max(a-d,6),n.width-6)};case"left":return{right:-6,top:Math.min(Math.max(s-c,6),n.height-6)};case"right":return{left:-6,top:Math.min(Math.max(s-c,6),n.height-6)};case"top-left":return{bottom:-6,left:12};case"top-right":return{bottom:-6,right:12};case"bottom-left":return{top:-6,left:12};case"bottom-right":return{top:-6,right:12};default:return{}}}(n,e,t,r,o);$(l)}}},[j,u,S,A,H,g]),re=d(function(){y||(ie.current&&(clearTimeout(ie.current),ie.current=null),ne.current&&clearTimeout(ne.current),ne.current=setTimeout(function(){P(!0),T||requestAnimationFrame(function(){O(!0)})},x))},[y,x,P,T]),le=d(function(){ne.current&&(clearTimeout(ne.current),ne.current=null),ie.current&&clearTimeout(ie.current),T?P(!1):(O(!1),ie.current=setTimeout(function(){P(!1),ie.current=null},150))},[P,T]),ae=d(function(){"hover"===g&&(ie.current&&(clearTimeout(ie.current),ie.current=null),j||(P(!0),requestAnimationFrame(function(){O(!0)})))},[g,j]),se=d(function(e){y||"click"!==g||(e.stopPropagation(),j?le():(ne.current&&(clearTimeout(ne.current),ne.current=null),P(!0),requestAnimationFrame(function(){O(!0)})))},[y,g,j,le]);s(function(){if(D&&j&&H){var e=function(){ee.current&&te.current?oe():setTimeout(function(){requestAnimationFrame(e)},10)};setTimeout(function(){requestAnimationFrame(e)},0)}},[D,j,H,oe]),s(function(){if(j)return requestAnimationFrame(function(){oe()}),window.addEventListener("scroll",oe,!0),window.addEventListener("resize",oe),function(){window.removeEventListener("scroll",oe,!0),window.removeEventListener("resize",oe)}},[j,oe]),s(function(){if(j&&"click"===g){var e=function(e){ee.current&&te.current&&!ee.current.contains(e.target)&&!te.current.contains(e.target)&&le()};return document.addEventListener("mousedown",e,!0),function(){document.removeEventListener("mousedown",e,!0)}}},[j,g,le]),s(function(){return function(){ne.current&&clearTimeout(ne.current),ie.current&&clearTimeout(ie.current)}},[]);var de={position:"absolute",top:0,left:0,opacity:H?1:0,transform:H?"scale(1)":"scale(0.95)",transition:"opacity 150ms ease-out, transform 150ms ease-out",pointerEvents:"hover"===g?"auto":"none",zIndex:9999},ce=d(function(){return"undefined"==typeof window||window.innerWidth>=768?"320px":"calc(100vw - 32px)"},[]);s(function(){var e=function(){X(ce())};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[ce]);var ue=h(h({backgroundColor:"#0C0A09",color:"#FFFFFF",padding:"8px 12px",borderRadius:"6px",fontSize:"12px",fontWeight:400,fontFamily:"DM Sans, sans-serif",lineHeight:"16px"},void 0!==z?{width:"number"==typeof z?"".concat(z,"px"):z,maxWidth:"undefined"!=typeof window&&window.innerWidth<768?"calc(100vw - 32px)":void 0}:{maxWidth:Y,width:"max-content"}),{wordWrap:"break-word",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",whiteSpace:"pre-wrap",position:"relative",boxSizing:"border-box"}),pe=t("div",{style:h(h(h({},de),_),{pointerEvents:"hover"===g?"auto":"none"}),className:"aha-tooltip-wrapper ".concat(F),onMouseEnter:"hover"===g?ae:void 0,onMouseLeave:"hover"===g?le:void 0,children:[e("div",{ref:te,className:"aha-tooltip ".concat(F),style:ue,role:"tooltip",children:o}),A&&Se(q,Q)]}),fe=d(function(){"hover"===g&&(ie.current=setTimeout(function(){le()},100))},[g,le]),he="click"===g?{onClick:se}:{onMouseEnter:re,onMouseLeave:fe,onFocus:re,onBlur:le};return t(n,{children:[e("div",h({ref:ee,className:"aha-tooltip-trigger ".concat(w),style:{display:"inline-block",cursor:"click"===g?"pointer":"default"}},he,{children:r})),j&&"undefined"!=typeof document&&f(pe,document.body)]})};export{z as Alert,S as Button,Q as CheckIcon,ae as Checkbox,we as Form,ge as Input,Ce as MenuList,$ as MinusIcon,le as Pagination,he as Progress,pe as Radio,me as Select,xe as Switch,fe as Tab,ue as Table,J as Tag,ve as Textarea,w as ThemeProvider,N as Toast,G as ToastProvider,Ee as Tooltip,R as clearAllToasts,j as closeToast,H as debugToast,I as toast,P as toastError,V as toastInfo,q as toastQuestion,O as toastSuccess,C as useTheme};
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import i,{createContext as o,useMemo as r,useContext as l,useState as a,useEffect as s,useCallback as d,useRef as c,forwardRef as u,useImperativeHandle as p}from"react";import{createPortal as f}from"react-dom";var h=function(){return h=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},h.apply(this,arguments)};function g(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}function v(e,t,n,i){return new(n||(n=Promise))(function(o,r){function l(e){try{s(i.next(e))}catch(e){r(e)}}function a(e){try{s(i.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(l,a)}s((i=i.apply(e,t||[])).next())})}function x(e,t){var n,i,o,r={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=a(0),l.throw=a(1),l.return=a(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function a(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;l&&(l=0,a[0]&&(r=0)),r;)try{if(n=1,i&&(o=2&a[0]?i.return:a[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,a[1])).done)return o;switch(i=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!(o=r.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){r.label=a[1];break}if(6===a[0]&&r.label<o[1]){r.label=o[1],o=a;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(a);break}o[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e],i=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function m(e,t,n){if(n||2===arguments.length)for(var i,o=0,r=t.length;o<r;o++)!i&&o in t||(i||(i=Array.prototype.slice.call(t,0,o)),i[o]=t[o]);return e.concat(i||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var y={primaryColor:"#FB6011"},b=o(y),w=function(t){var n=t.theme,i=t.children,o=r(function(){return h(h({},y),n)},[n]);return e(b.Provider,{value:o,children:i})},C=function(){var e=l(b);return e||y},F={small:{height:"32px",paddingLeft:"12px",paddingRight:"12px",fontSize:"14px",lineHeight:"20px",iconSize:"16px",gap:"6px"},mediumSmall:{height:"36px",paddingLeft:"14px",paddingRight:"14px",fontSize:"14px",lineHeight:"20px",iconSize:"16px",gap:"6px"},medium:{height:"40px",paddingLeft:"16px",paddingRight:"16px",fontSize:"14px",lineHeight:"20px",iconSize:"18px",gap:"8px"},large:{height:"48px",paddingLeft:"20px",paddingRight:"20px",fontSize:"16px",lineHeight:"24px",iconSize:"20px",gap:"8px"}},k=function(i){var o=i.size,r=i.color;return t(n,{children:[e("style",{children:"\n @keyframes aha-button-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n "}),t("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",style:{animation:"aha-button-spin 1s linear infinite"},children:[e("circle",{cx:"12",cy:"12",r:"10",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"24",opacity:"0.3"}),e("circle",{cx:"12",cy:"12",r:"10",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"16"})]})]})},S=function(n){var i,o=n.children,r=n.type,l=void 0===r?"default":r,s=n.size,d=void 0===s?"medium":s,c=n.disabled,u=void 0!==c&&c,p=n.loading,f=void 0!==p&&p,v=n.onClick,x=n.htmlType,m=void 0===x?"button":x,y=n.className,b=void 0===y?"":y,w=n.style,S=n.icon,E=n.iconPosition,A=void 0===E?"left":E,z=g(n,["children","type","size","disabled","loading","onClick","htmlType","className","style","icon","iconPosition"]),L=C().primaryColor,D=void 0===L?"#FB6011":L,B=a(!1),M=B[0],T=B[1],W=a(!1),N=W[0],I=W[1],j=F[d],R=u||f,H=function(){if(f){var t="primary"===l?"#FFFFFF":"#101828",n=parseInt(j.iconSize.replace("px",""));return e(k,{size:n,color:t})}return S?e("span",{style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:j.iconSize,height:j.iconSize,flexShrink:0},children:S}):null},O=(i=h({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:j.gap,height:j.height,paddingLeft:j.paddingLeft,paddingRight:j.paddingRight,fontSize:j.fontSize,lineHeight:j.lineHeight,fontWeight:500,fontFamily:"DM Sans, sans-serif",borderRadius:"8px",border:"none",cursor:R?"not-allowed":"pointer",outline:"none",transition:"all 0.2s",userSelect:"none",WebkitTapHighlightColor:"transparent"},w),"primary"===l?(i.color="#FFFFFF",i.backgroundColor=D,u?(i.opacity=.4,i.cursor="not-allowed"):f?i.backgroundColor=D:N?i.backgroundColor="#EC470A":M&&(i.backgroundColor="#FD843A")):u?(i.backgroundColor="#FAFAF9",i.color="#D6D3D1",i.border="1px solid #E7E5E4"):f?(i.backgroundColor="#FFFFFF",i.color="#101828",i.border="1px solid #E7E5E4",i.boxShadow="0px 1px 2px 0px rgba(12, 10, 9, 0.05)"):N?(i.backgroundColor="#F5F5F4",i.color="#101828",i.border="1px solid #D7D3D0",i.boxShadow="0px 1px 2px 0px rgba(12, 10, 9, 0.05)"):M?(i.backgroundColor="#FAFAF9",i.color="#101828",i.border="1px solid #D7D3D0",i.boxShadow="0px 2px 4px 0px rgba(12, 10, 9, 0.08)"):(i.backgroundColor="#FFFFFF",i.color="#101828",i.border="1px solid #E7E5E4",i.boxShadow="0px 1px 2px 0px rgba(12, 10, 9, 0.05)"),i);return t("button",h({type:m,className:"aha-button aha-button--".concat(l," aha-button--").concat(d," ").concat(R?"aha-button--disabled":""," ").concat(f?"aha-button--loading":""," ").concat(b),disabled:R,onClick:function(e){R?e.preventDefault():null==v||v(e)},onMouseEnter:function(){return!R&&T(!0)},onMouseLeave:function(){T(!1),I(!1)},onMouseDown:function(){return!R&&I(!0)},onMouseUp:function(){return I(!1)},style:O},z,{children:[f&&H(),!f&&"left"===A&&H(),o&&e("span",{style:{display:"inline-block"},children:o}),!f&&"right"===A&&H()]}))};S.displayName="Button";var E={success:e("svg",{className:"flex-shrink-0",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M10 1.66663C5.40002 1.66663 1.66669 5.39996 1.66669 9.99996C1.66669 14.6 5.40002 18.3333 10 18.3333C14.6 18.3333 18.3334 14.6 18.3334 9.99996C18.3334 5.39996 14.6 1.66663 10 1.66663ZM13.3584 8.49997L9.46668 12.3833C9.35001 12.5083 9.19168 12.5666 9.02501 12.5666C8.86668 12.5666 8.70834 12.5083 8.58334 12.3833L6.64169 10.4417C6.40002 10.2 6.40002 9.79994 6.64169 9.55827C6.88336 9.3166 7.28335 9.3166 7.52502 9.55827L9.02501 11.0583L12.475 7.61664C12.7167 7.36664 13.1167 7.36664 13.3584 7.61664C13.6 7.8583 13.6 8.24997 13.3584 8.49997Z",fill:"#00BC7D"})}),error:e("svg",{className:"flex-shrink-0",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M17.1342 6.3009L13.6999 2.86666C13.4658 2.63249 13.1474 2.50085 12.8157 2.50085H7.18504C6.85337 2.50085 6.53584 2.63249 6.30084 2.86666L2.8666 6.3009C2.63243 6.53507 2.50079 6.85343 2.50079 7.1851V12.8158C2.50079 13.1475 2.63243 13.465 2.8666 13.7L6.30084 17.1342C6.53501 17.3684 6.85337 17.5 7.18504 17.5H12.8157C13.1474 17.5 13.4649 17.3684 13.6999 17.1342L17.1342 13.7C17.3683 13.4658 17.5 13.1475 17.5 12.8158V7.1851C17.5 6.85343 17.3683 6.53507 17.1342 6.3009ZM12.525 11.6417C12.7692 11.8858 12.7692 12.2817 12.525 12.5259C12.4033 12.6475 12.2433 12.7092 12.0833 12.7092C11.9233 12.7092 11.7633 12.6484 11.6416 12.5259L9.99998 10.8842L8.35834 12.5259C8.23667 12.6475 8.07665 12.7092 7.91665 12.7092C7.75665 12.7092 7.59662 12.6484 7.47496 12.5259C7.23079 12.2817 7.23079 11.8858 7.47496 11.6417L9.1166 10L7.47496 8.3584C7.23079 8.11423 7.23079 7.71837 7.47496 7.4742C7.71912 7.23004 8.11498 7.23004 8.35915 7.4742L10.0008 9.11585L11.6424 7.4742C11.8866 7.23004 12.2825 7.23004 12.5266 7.4742C12.7708 7.71837 12.7708 8.11423 12.5266 8.3584L10.885 10L12.525 11.6417Z",fill:"#FB2C36"})}),warning:e("svg",{className:"flex-shrink-0",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M18.0057 14.2935L12.4999 3.99662C11.4333 2.00162 8.56744 2.00162 7.49995 3.99662L1.99417 14.2935C1.01583 16.1235 2.3442 18.3334 4.42337 18.3334H15.5765C17.6549 18.3334 18.9841 16.1226 18.0057 14.2935ZM9.37495 8.33337C9.37495 7.98837 9.65494 7.70837 9.99994 7.70837C10.3449 7.70837 10.6249 7.98837 10.6249 8.33337V11.6667C10.6249 12.0117 10.3449 12.2917 9.99994 12.2917C9.65494 12.2917 9.37495 12.0117 9.37495 11.6667V8.33337ZM10.0166 15C9.55663 15 9.17902 14.6267 9.17902 14.1667C9.17902 13.7067 9.54829 13.3334 10.0083 13.3334H10.0166C10.4775 13.3334 10.85 13.7067 10.85 14.1667C10.85 14.6267 10.4766 15 10.0166 15Z",fill:"#FE9A00"})}),info:e("svg",{className:"flex-shrink-0",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M14.6875 2.5H5.3125C3.4375 2.5 2.5 3.4375 2.5 5.3125V14.6875C2.5 16.5625 3.4375 17.5 5.3125 17.5H14.6875C16.5625 17.5 17.5 16.5625 17.5 14.6875V5.3125C17.5 3.4375 16.5625 2.5 14.6875 2.5ZM10.625 13.75C10.625 14.095 10.345 14.375 10 14.375C9.655 14.375 9.375 14.095 9.375 13.75V9.9408C9.375 9.5958 9.655 9.3158 10 9.3158C10.345 9.3158 10.625 9.5958 10.625 9.9408V13.75ZM10.0167 7.91667C9.55668 7.91667 9.17908 7.54333 9.17908 7.08333C9.17908 6.62333 9.54834 6.25 10.0083 6.25H10.0167C10.4775 6.25 10.85 6.62333 10.85 7.08333C10.85 7.54333 10.4767 7.91667 10.0167 7.91667Z",fill:"#2B7FFF"})})},A=e("svg",{className:"flex-shrink-0",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M15.4416 14.5583C15.6858 14.8025 15.6858 15.1984 15.4416 15.4425C15.32 15.5642 15.16 15.6258 15 15.6258C14.84 15.6258 14.68 15.565 14.5583 15.4425L9.99997 10.8842L5.44164 15.4425C5.31997 15.5642 5.15997 15.6258 4.99997 15.6258C4.83997 15.6258 4.67997 15.565 4.55831 15.4425C4.31414 15.1984 4.31414 14.8025 4.55831 14.5583L9.11664 10L4.55831 5.44171C4.31414 5.19754 4.31414 4.80168 4.55831 4.55751C4.80247 4.31335 5.19831 4.31335 5.44248 4.55751L10.0008 9.11587L14.5591 4.55751C14.8033 4.31335 15.1991 4.31335 15.4433 4.55751C15.6875 4.80168 15.6875 5.19754 15.4433 5.44171L10.885 10L15.4416 14.5583Z",fill:"#57534D"})}),z=function(n){var i=n.className,o=void 0===i?"":i,r=n.type,l=void 0===r?"info":r,s=n.title,d=n.description,c=n.icon,u=void 0===c?E[l]:c,p=n.showIcon,f=void 0===p||p,h=n.closeable,g=void 0!==h&&h,v=n.action,x=n.children,m=n.onClose,y=a(!0),b=y[0],w=y[1];return b?t("div",{className:"".concat("aha-alert px-4 py-3 rounded-md flex gap-2 relative"," ").concat(o),style:{success:{backgroundColor:"#ECFDF5"},error:{backgroundColor:"#FEF2F2"},warning:{backgroundColor:"#FFFBEB"},info:{backgroundColor:"#EFF6FF"}}[l],children:[f&&u,t("div",{className:"flex flex-col gap-1",style:g?{paddingRight:"2rem"}:{},children:[s&&e("div",{className:"justify-start text-[#292524] text-base font-semibold font-['DM_Sans'] leading-normal",children:s}),d&&e("div",{className:"w-full justify-center text-[#57534D] text-sm font-normal font-['DM_Sans'] leading-snug",children:d}),x&&e("div",{className:"w-full justify-center text-[#57534D] text-sm font-normal font-['DM_Sans'] leading-snug",children:x}),v&&g&&e("div",{className:"mt-3",children:v})]}),v&&!g&&e("div",{className:"ml-3",children:v}),g&&e("div",{className:"absolute right-4 top-3 cursor-pointer",onClick:function(){w(!1),null==m||m()},children:A})]}):null},L={success:e("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM16.03 10.2L11.36 14.86C11.22 15.01 11.03 15.08 10.83 15.08C10.64 15.08 10.45 15.01 10.3 14.86L7.97 12.53C7.68 12.24 7.68 11.76 7.97 11.47C8.26 11.18 8.74 11.18 9.03 11.47L10.83 13.27L14.97 9.14001C15.26 8.84001 15.74 8.84001 16.03 9.14001C16.32 9.43001 16.32 9.90001 16.03 10.2Z",fill:"#ECFDF5"})}),error:e("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M21.3506 7.56104L17.2295 3.43994C16.9485 3.15894 16.5665 3.00098 16.1685 3.00098H9.41162C9.01362 3.00098 8.63259 3.15894 8.35059 3.43994L4.22949 7.56104C3.94849 7.84204 3.79053 8.22407 3.79053 8.62207V15.3789C3.79053 15.7769 3.94849 16.1579 4.22949 16.4399L8.35059 20.561C8.63159 20.842 9.01362 21 9.41162 21H16.1685C16.5665 21 16.9475 20.842 17.2295 20.561L21.3506 16.4399C21.6316 16.1589 21.7896 15.7769 21.7896 15.3789V8.62207C21.7896 8.22407 21.6316 7.84204 21.3506 7.56104ZM15.8196 13.97C16.1126 14.263 16.1126 14.738 15.8196 15.031C15.6736 15.177 15.4816 15.251 15.2896 15.251C15.0976 15.251 14.9055 15.178 14.7595 15.031L12.7896 13.061L10.8196 15.031C10.6736 15.177 10.4816 15.251 10.2896 15.251C10.0976 15.251 9.90552 15.178 9.75952 15.031C9.46652 14.738 9.46652 14.263 9.75952 13.97L11.7295 12L9.75952 10.03C9.46652 9.73703 9.46652 9.26199 9.75952 8.96899C10.0525 8.67599 10.5276 8.67599 10.8206 8.96899L12.7905 10.939L14.7605 8.96899C15.0535 8.67599 15.5285 8.67599 15.8215 8.96899C16.1145 9.26199 16.1145 9.73703 15.8215 10.03L13.8516 12L15.8196 13.97Z",fill:"#FEF2F2"})}),question:e("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M18.2041 3H6.9541C4.7041 3 3.5791 4.125 3.5791 6.375V17.625C3.5791 19.875 4.7041 21 6.9541 21H18.2041C20.4541 21 21.5791 19.875 21.5791 17.625V6.375C21.5791 4.125 20.4541 3 18.2041 3ZM12.5991 17.5C12.0471 17.5 11.594 17.052 11.594 16.5C11.594 15.948 12.0371 15.5 12.5891 15.5H12.5991C13.1521 15.5 13.5991 15.948 13.5991 16.5C13.5991 17.052 13.1511 17.5 12.5991 17.5ZM14.1821 12.5281C13.4511 13.0181 13.315 13.291 13.29 13.363C13.185 13.676 12.8931 13.874 12.5791 13.874C12.5001 13.874 12.4201 13.862 12.3411 13.835C11.9481 13.703 11.7372 13.278 11.8682 12.885C12.0492 12.345 12.5182 11.836 13.3462 11.281C14.3672 10.597 14.2361 9.84707 14.1931 9.60107C14.0801 8.94707 13.5291 8.38988 12.8821 8.27588C12.3891 8.18588 11.9092 8.31488 11.5332 8.62988C11.1552 8.94688 10.938 9.41391 10.938 9.90991C10.938 10.3239 10.602 10.6599 10.188 10.6599C9.77399 10.6599 9.43799 10.3239 9.43799 9.90991C9.43799 8.96891 9.85009 8.08396 10.5691 7.48096C11.2811 6.88496 12.2181 6.63605 13.1431 6.80005C14.4101 7.02405 15.4492 8.07097 15.6702 9.34497C15.8902 10.607 15.3611 11.7381 14.1821 12.5281Z",fill:"#FAFAF9"})}),info:e("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M18.2041 3H6.9541C4.7041 3 3.5791 4.125 3.5791 6.375V17.625C3.5791 19.875 4.7041 21 6.9541 21H18.2041C20.4541 21 21.5791 19.875 21.5791 17.625V6.375C21.5791 4.125 20.4541 3 18.2041 3ZM12.5991 17.5C12.0471 17.5 11.594 17.052 11.594 16.5C11.594 15.948 12.0371 15.5 12.5891 15.5H12.5991C13.1521 15.5 13.5991 15.948 13.5991 16.5C13.5991 17.052 13.1511 17.5 12.5991 17.5ZM14.1821 12.5281C13.4511 13.0181 13.315 13.291 13.29 13.363C13.185 13.676 12.8931 13.874 12.5791 13.874C12.5001 13.874 12.4201 13.862 12.3411 13.835C11.9481 13.703 11.7372 13.278 11.8682 12.885C12.0492 12.345 12.5182 11.836 13.3462 11.281C14.3672 10.597 14.2361 9.84707 14.1931 9.60107C14.0801 8.94707 13.5291 8.38988 12.8821 8.27588C12.3891 8.18588 11.9092 8.31488 11.5332 8.62988C11.1552 8.94688 10.938 9.41391 10.938 9.90991C10.938 10.3239 10.602 10.6599 10.188 10.6599C9.77399 10.6599 9.43799 10.3239 9.43799 9.90991C9.43799 8.96891 9.85009 8.08396 10.5691 7.48096C11.2811 6.88496 12.2181 6.63605 13.1431 6.80005C14.4101 7.02405 15.4492 8.07097 15.6702 9.34497C15.8902 10.607 15.3611 11.7381 14.1821 12.5281Z",fill:"#FAFAF9"})})},D=function(t){var n=t.className;return e("svg",{className:"flex-shrink-0 ".concat(n),width:"20",height:"20",viewBox:"0 0 20 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M15.4416 14.5583C15.6858 14.8025 15.6858 15.1984 15.4416 15.4425C15.32 15.5642 15.16 15.6258 15 15.6258C14.84 15.6258 14.68 15.565 14.5583 15.4425L9.99997 10.8842L5.44164 15.4425C5.31997 15.5642 5.15997 15.6258 4.99997 15.6258C4.83997 15.6258 4.67997 15.565 4.55831 15.4425C4.31414 15.1984 4.31414 14.8025 4.55831 14.5583L9.11664 10L4.55831 5.44171C4.31414 5.19754 4.31414 4.80168 4.55831 4.55751C4.80247 4.31335 5.19831 4.31335 5.44248 4.55751L10.0008 9.11587L14.5591 4.55751C14.8033 4.31335 15.1991 4.31335 15.4433 4.55751C15.6875 4.80168 15.6875 5.19754 15.4433 5.44171L10.885 10L15.4416 14.5583Z",fill:"currentColor"})})},B=function(){function e(){this.toasts=[],this.listeners=new Set}return e.prototype.addToast=function(e){var t=Math.random().toString(36).slice(-8),n={id:t,props:e};return this.toasts.push(n),console.log("Toast: 添加 Toast 到管理器,ID:",t,"当前总数:",this.toasts.length),this.notifyListeners(),t},e.prototype.removeToast=function(e){this.toasts=this.toasts.filter(function(t){return t.id!==e}),this.notifyListeners()},e.prototype.getToasts=function(){return m([],this.toasts,!0)},e.prototype.subscribe=function(e){var t=this;return this.listeners.add(e),function(){return t.listeners.delete(e)}},e.prototype.notifyListeners=function(){console.log("Toast: 通知监听器,监听器数量:",this.listeners.size),this.listeners.forEach(function(e){return e()})},e.prototype.clearAll=function(){this.toasts=[],this.notifyListeners()},e}(),M=new B,T=function(){var i=a([]),o=i[0],r=i[1];s(function(){console.log("Toast: ToastContainer 组件已挂载");var e=M.getToasts();console.log("Toast: 初始 Toast 数量:",e.length),r(e);var t=M.subscribe(function(){var e=M.getToasts();console.log("Toast: 收到 Toast 更新,当前数量:",e.length,"Toast IDs:",e.map(function(e){return e.id})),r(e)});return t},[]);var l=o.filter(function(e){return"top-left"===e.props.position}),d=o.filter(function(e){return"top-right"===e.props.position}),c=o.filter(function(e){return"bottom-left"===e.props.position}),u=o.filter(function(e){return"bottom-right"===e.props.position});return t(n,{children:[e("div",{style:{position:"fixed",top:"16px",left:"16px",zIndex:9999,pointerEvents:"none",display:"flex",flexDirection:"column",gap:"8px"},children:l.map(function(t){return e(W,h({},t),t.id)})}),e("div",{style:{position:"fixed",top:"16px",right:"16px",zIndex:9999,pointerEvents:"none",display:"flex",flexDirection:"column",gap:"8px"},children:d.map(function(t){return e(W,h({},t),t.id)})}),e("div",{style:{position:"fixed",bottom:"16px",left:"16px",zIndex:9999,pointerEvents:"none",display:"flex",flexDirection:"column",gap:"8px"},children:c.map(function(t){return e(W,h({},t),t.id)})}),e("div",{style:{position:"fixed",bottom:"16px",right:"16px",zIndex:9999,pointerEvents:"none",display:"flex",flexDirection:"column",gap:"8px"},children:u.map(function(t){return e(W,h({},t),t.id)})})]})},W=function(n){var i=n.id,o=n.props,r=a(!1),l=r[0],c=r[1],u=a(!1),p=u[0],f=u[1],h=o.message,g=o.type,v=void 0===g?"info":g,x=o.duration,m=void 0===x?3e3:x,y=o.icon,b=o.action,w=o.showClose,C=void 0===w||w,F=o.onClose,k=o.onClick;o.className;var S=function(e){switch(e){case"success":return{bgColor:"#009966",defaultIcon:L.success};case"error":return{bgColor:"#E7000B",defaultIcon:L.error};case"question":return{bgColor:"#1C1917",defaultIcon:L.question};default:return{bgColor:"#1447E6",defaultIcon:L.info}}}(v);s(function(){var e=setTimeout(function(){c(!0)},10);return function(){return clearTimeout(e)}},[]),s(function(){if(m>0){var e=setTimeout(function(){E()},m);return function(){return clearTimeout(e)}}},[m,i]);var E=d(function(){f(!0),setTimeout(function(){M.removeToast(i),null==F||F()},300)},[i,F]),A=d(function(){null==k||k()},[k]);return e("div",{style:{pointerEvents:"auto",maxWidth:"380px",background:"white",borderRadius:"8px",boxShadow:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",overflow:"hidden",transform:l&&!p?"translateY(0) scale(1)":"translateY(8px) scale(0.95)",opacity:l&&!p?1:0,transition:"all 300ms ease-out",position:"relative",cursor:k?"pointer":"default"},onClick:A,children:t("div",{style:{display:"flex",alignItems:"flex-start",padding:"16px",backgroundColor:S.bgColor,color:"white"},children:[e("div",{style:{flexShrink:0,width:"24px",height:"24px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",marginRight:"8px"},children:y||S.defaultIcon}),t("div",{style:{flex:1,minWidth:0,paddingRight:"20px"},children:[e("div",{style:{width:"100%",justifyContent:"flex-start",color:"#f0fdf4",fontSize:"14px",fontWeight:500,fontFamily:"DM Sans, sans-serif",lineHeight:"24px"},children:h}),b&&e("div",{style:{marginTop:"12px"},children:b})]}),C&&e("button",{onClick:function(e){e.stopPropagation(),E()},style:{flexShrink:0,width:"20px",height:"20px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 200ms",position:"absolute",top:"14px",right:"16px",background:"transparent",border:"none",cursor:"pointer",color:"white"},onMouseEnter:function(e){e.currentTarget.style.background="rgba(255, 255, 255, 0.1)"},onMouseLeave:function(e){e.currentTarget.style.background="transparent"},children:e(D,{})})]})})},N=function(t){return e(W,{id:"direct",props:t})},I=function(e){return console.log("Toast: 调用 toast 函数",e),X(),setTimeout(function(){var t=M.addToast(e);console.log("Toast: 添加 Toast 成功,ID:",t)},100),Math.random().toString(36).slice(-8)},j=function(e){M.removeToast(e)},R=function(){M.clearAll()},H=function(){console.log("=== Toast 调试信息 ==="),console.log("当前环境:","undefined"!=typeof window?"浏览器":"服务端"),console.log("document 可用:","undefined"!=typeof document),console.log("容器元素:",document.getElementById("aha-toast-container")),console.log("Toast 管理器状态:",M.getToasts()),console.log("容器根节点:",K),console.log("是否正在初始化:",Y),console.log("====================")},O=function(e,t){return X(),I(h(h({},t),{message:e,type:"success"}))},P=function(e,t){return X(),I(h(h({},t),{message:e,type:"error"}))},V=function(e,t){return X(),I(h(h({},t),{message:e,type:"info"}))},q=function(e,t){return X(),I(h(h({},t),{message:e,type:"question"}))},Z=null,K=null,Y=!1,X=function(){if(console.log("Toast: 开始确保容器存在"),"undefined"!=typeof window&&"undefined"!=typeof document)if(Y)console.log("Toast: 容器正在初始化中,跳过");else if(Z)console.log("Toast: 容器已存在,跳过创建");else{console.log("Toast: 创建新的 Toast 容器"),Y=!0;try{var t=document.getElementById("aha-toast-container");if(t)return console.log("Toast: 发现已存在的容器"),Z=t,void(Y=!1);console.log("Toast: 创建容器元素"),(Z=document.createElement("div")).id="aha-toast-container",document.body.appendChild(Z),console.log("Toast: 容器已添加到 document.body"),console.log("Toast: 开始导入 ReactDOM");try{var n=require("react-dom/client").createRoot;console.log("Toast: ReactDOM 同步导入成功,创建根节点"),K=n(Z),console.log("Toast: 渲染 ToastContainer 组件"),K.render(e(T,{})),console.log("Toast: 容器渲染完成"),Y=!1}catch(t){console.log("Toast: 同步导入失败,尝试动态导入",t),import("react-dom/client").then(function(t){var n=t.createRoot;try{console.log("Toast: ReactDOM 动态导入成功,创建根节点"),K=n(Z),console.log("Toast: 渲染 ToastContainer 组件"),K.render(e(T,{})),console.log("Toast: 容器渲染完成")}catch(e){console.error("Toast: 渲染容器失败",e)}Y=!1}).catch(function(e){console.error("Toast: 导入 ReactDOM 失败",e),Y=!1})}}catch(e){console.error("Toast: 创建容器失败",e),Y=!1}}else console.warn("Toast: 当前环境不支持 Toast 组件")},G=function(i){var o=i.children,r=a(!1),l=r[0],d=r[1];return s(function(){d(!0)},[]),t(n,{children:[o,l&&f(e(T,{}),document.body)]})},_={Green:{light:{bg:"#ECFDF5",text:"#006045",border:"#A4F4CF"},fill:{bg:"#00BC7D",text:"#FFFFFF"}},Red:{light:{bg:"#FEF2F2",text:"#9F0712",border:"#FFC9C9"},fill:{bg:"#FB2C36",text:"#FFFFFF"}},Orange:{light:{bg:"#FFF6ED",text:"#9B2911",border:"#FFD1A9"},fill:{bg:"#FB6011",text:"#FFFFFF"}},Cyan:{light:{bg:"#ECFEFF",text:"#005F78",border:"#A2F4FD"},fill:{bg:"#00B8DB",text:"#FFFFFF"}},Violet:{light:{bg:"#F5F3FF",text:"#5D0EC0",border:"#DDD6FF"},fill:{bg:"#8E51FF",text:"#FFFFFF"}},Pink:{light:{bg:"#FDF2F8",text:"#A3004C",border:"#FCCEE8"},fill:{bg:"#F6339A",text:"#FFFFFF"}},Gray:{light:{bg:"#F5F5F4",text:"#292524",border:"#E7E5E4"},fill:{bg:"#292524",text:"#FFFFFF"}},Yellow:{light:{bg:"#FFFBEB",text:"#973C00",border:"#FEE685"},fill:{bg:"#FE9A00",text:"#FFFFFF"}},Blue:{light:{bg:"#EFF6FF",text:"#193CB8",border:"#BEDBFF"},fill:{bg:"#2B7FFF",text:"#FFFFFF"}}},U={large:{padding:"px-2 py-0.5",textSize:"text-sm",iconSize:"w-4 h-4",gap:"gap-1"},small:{padding:"px-2 py-0.5",textSize:"text-xs",iconSize:"w-3 h-3",gap:"gap-0.5"}},J=function(n){var o=n.children,r=n.color,l=n.variant,a=void 0===l?"light":l,s=n.size,d=void 0===s?"large":s,c=n.stroke,u=void 0!==c&&c,p=n.icon,f=n.iconPosition,v=void 0===f?"none":f,x=n.className,m=void 0===x?"":x,y=n.onClick,b=g(n,["children","color","variant","size","stroke","icon","iconPosition","className","onClick"]),w=C().primaryColor,F=function(e,t){if("string"==typeof e&&e in _){var n=_[e];return"Orange"===e&&t?h(h({},n),{fill:h(h({},n.fill),{bg:t})}):n}if("string"==typeof e&&e.startsWith("#")){var i=e.replace("#",""),o=parseInt(i.substr(0,2),16),r=parseInt(i.substr(2,2),16),l=parseInt(i.substr(4,2),16);return{light:{bg:"rgba(".concat(o,", ").concat(r,", ").concat(l,", 0.1)"),text:e,border:"rgba(".concat(o,", ").concat(r,", ").concat(l,", 0.3)")},fill:{bg:e,text:"#FFFFFF"}}}return _.Green}(r,w),k=U[d],S={borderRadius:"0.375rem",display:"inline-flex",justifyContent:"start",alignItems:"center",padding:"2px 8px",gap:"large"===d?"4px":"2px",fontWeight:500,fontFamily:"DM Sans, sans-serif",lineHeight:"large"===d?"1.375":"1",transition:"all 0.2s",fontSize:"large"===d?"14px":"12px",height:"small"===d?"20px":"24px"};"light"===a&&(S.backgroundColor=F.light.bg,S.color=F.light.text,u&&(S.outline="1px solid",S.outlineOffset="-1px",S.outlineColor=function(e){if("string"==typeof e&&e in _)switch(e){case"Green":default:return"#A4F4CF";case"Red":return"#FFC9C9";case"Orange":case"Yellow":return"#FFD1A9";case"Blue":return"#BEDBFF";case"Cyan":return"#A2F4FD";case"Violet":return"#DDD6FF";case"Pink":return"#FCCEE8";case"Gray":return"#E7E5E4"}if("string"==typeof e&&e.startsWith("#")){var t=e.replace("#",""),n=parseInt(t.substr(0,2),16),i=parseInt(t.substr(2,2),16),o=parseInt(t.substr(4,2),16);return"rgba(".concat(n,", ").concat(i,", ").concat(o,", 0.3)")}return"#A4F4CF"}(r))),y&&(S.cursor="pointer",S.opacity="1");var E=["rounded-md","inline-flex","justify-start","items-center",k.padding,k.gap,"font-medium","font-dm-sans","large"===d?"leading-snug":"leading-none","transition-colors","duration-200","small"===d?"h-5":"h-6"].filter(Boolean);"fill"===a&&(S.backgroundColor=F.fill.bg,S.color=F.fill.text),y&&E.push("cursor-pointer","hover:opacity-80"),m&&E.push(m);var A=E.join(" "),z=function(){if(!p)return null;var t=function(e,t){if("string"==typeof e&&e in _)switch(e){case"Green":default:return"#009966";case"Red":return"#E7000B";case"Orange":return t||"#E17100";case"Blue":return"#155DFC";case"Yellow":return"#EC470A";case"Cyan":return"#0092B8";case"Violet":return"#7F22FE";case"Pink":return"#E60076";case"Gray":return"#57534D"}return"string"==typeof e&&e.startsWith("#")?e:"#009966"}(r,w),n="small"===d?"14px":"16px";return e("div",{className:"flex items-center justify-center",style:{width:n,height:n},children:"svg"===p.type?i.cloneElement(p,{width:n,height:n,style:{fill:t}}):p})};return t("div",h({className:A,style:S,onClick:y},b,{children:["leading"===v&&z(),e("div",{className:"px-1 flex justify-center items-center",children:e("div",{className:"justify-center ".concat(k.textSize," font-medium font-dm-sans ").concat("large"===d?"leading-snug":"leading-none"),children:o})}),"after"===v&&z()]}))},Q=function(t){var n=t.className,i=t.style;return e("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,style:i,children:e("path",{d:"M11.6666 3.5L5.24992 9.91667L2.33325 7",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},$=function(t){var n=t.className,i=t.style;return e("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,style:i,children:e("path",{d:"M3.5 7H10.5",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},ee=function(t){var n=t.className,i=t.style;return e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,style:i,children:e("path",{d:"M3.5 7.5L6 10L8.5 7.5M3.5 4.5L6 2L8.5 4.5",stroke:"#A9A29D",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},te=function(n){var i=n.className,o=n.style;return t("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,style:o,children:[e("path",{d:"M3.5 4.5L6 2L8.5 4.5",stroke:"#A9A29D",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M3.5 7.5L6 10L8.5 7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})},ne=function(n){var i=n.className,o=n.style;return t("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,style:o,children:[e("path",{d:"M8.5 7.5L6 10L3.5 7.5",stroke:"#A9A29D",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e("path",{d:"M8.5 4.5L6 2L3.5 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})},ie=function(t){var n=t.className,i=t.style;return e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,style:i,children:e("path",{d:"M15.8334 10H4.16675M4.16675 10L10.0001 15.8334M4.16675 10L10.0001 4.16669",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})},oe=function(t){var n=t.className,i=t.style;return e("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,style:i,children:e("path",{d:"M4.16675 10H15.8334M15.8334 10L10.0001 4.16669M15.8334 10L10.0001 15.8334",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})},re=function(n){var i=n.className,o=n.style;return t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i,style:o,children:[e("g",{clipPath:"url(#clip0_54_1653)",children:e("path",{d:"M6.06 6C6.21674 5.55444 6.5261 5.17873 6.9333 4.93942C7.34051 4.7001 7.81926 4.61262 8.28479 4.69247C8.75031 4.77232 9.17255 5.01434 9.47672 5.37568C9.78089 5.73702 9.94737 6.19434 9.94667 6.66666C9.94667 8 7.94667 8.66666 7.94667 8.66666M8 11.3333H8.00667M14.6667 8C14.6667 11.6819 11.6819 14.6667 8 14.6667C4.3181 14.6667 1.33333 11.6819 1.33333 8C1.33333 4.3181 4.3181 1.33333 8 1.33333C11.6819 1.33333 14.6667 4.3181 14.6667 8Z",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round",strokeLinejoin:"round"})}),e("defs",{children:e("clipPath",{id:"clip0_54_1653",children:e("rect",{width:"16",height:"16",fill:"currentColor"})})})]})},le=function(n){var i=n.current,o=n.defaultCurrent,l=void 0===o?1:o,d=n.total,c=void 0===d?0:d,u=n.pageSize,p=n.defaultPageSize,f=void 0===p?10:p,g=n.showSizeChanger,v=void 0!==g&&g,x=n.pageSizeOptions,m=void 0===x?["10","20","50","100"]:x,y=n.showQuickJumper,b=void 0!==y&&y,w=n.showTotal,F=n.onChange,k=n.onShowSizeChange,E=n.simple,A=void 0!==E&&E,z=n.disabled,L=void 0!==z&&z,D=n.hideOnSinglePage,B=void 0!==D&&D,M=n.className,T=void 0===M?"":M,W=n.style,N=n.size,I=void 0===N?"default":N,j=n.responsive,R=void 0!==j&&j;n.showLessItems;var H=n.itemRender,O=C().primaryColor,P=void 0===O?"#FB6011":O,V=a(l),q=V[0],Z=V[1],K=a(f),Y=K[0],X=K[1],G=a(""),_=G[0],U=G[1],J=null!=i?i:q,Q=null!=u?u:Y,$=r(function(){return Math.ceil(c/Q)},[c,Q]);s(function(){void 0!==i&&Z(i)},[i]),s(function(){void 0!==u&&X(u)},[u]);var ee=function(e){e<1||e>$||e===J||L||(void 0===i&&Z(e),null==F||F(e,Q))},te=function(){var e=parseInt(_,10);e>=1&&e<=$&&(ee(e),U(""))};if(B&&$<=1)return null;if(A)return t("div",{className:"aha-pagination aha-pagination-simple ".concat(T),style:W,children:[e(S,{onClick:function(){return ee(J-1)},disabled:L||1===J,type:"default",size:"default"===I?"medium":"small",style:{marginRight:"8px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"上一页"}),t("span",{style:{margin:"0 8px",fontSize:"14px",lineHeight:"20px",color:"#475467",fontFamily:"DM Sans, sans-serif"},children:[J," / ",$]}),e(S,{onClick:function(){return ee(J+1)},disabled:L||J===$,type:"default",size:"default"===I?"medium":"small",style:{marginLeft:"8px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"下一页"})]});var ne=(J-1)*Q+1,re=Math.min(J*Q,c);return t("div",{className:"aha-pagination w-full ".concat(T),style:h({display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:R?"wrap":"nowrap",fontFamily:"DM Sans, sans-serif"},W),children:[w&&e("div",{className:"justify-start text-Text-text-secondary text-sm font-medium font-['DM_Sans'] leading-5",children:w(c,[ne,re])}),t("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[H?H(J-1,"prev",e(S,{onClick:function(){return ee(J-1)},disabled:L||1===J,type:"default",size:"default"===I?"medium":"small",style:{height:"small"===I?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:t("div",{className:"flex items-center gap-1",children:[e(ie,{})," ",e("span",{children:"Previous"})]})})):e(S,{onClick:function(){return ee(J-1)},disabled:L||1===J,type:"default",size:"default"===I?"medium":"small",style:{height:"small"===I?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:t("div",{className:"flex items-center gap-1",children:[e(ie,{})," ",e("span",{children:"Previous"})]})}),e("div",{style:{display:"flex",alignItems:"center",gap:0},children:function(){if($<=7)return Array.from({length:$},function(e,t){return t+1});var e=[];if(J<=4){for(var t=1;t<=5;t++)e.push(t);e.push("jump-next"),e.push($)}else if(J>=$-3){e.push(1),e.push("jump-prev");for(t=$-4;t<=$;t++)e.push(t)}else{e.push(1),e.push("jump-prev");for(t=J-1;t<=J+1;t++)e.push(t);e.push("jump-next"),e.push($)}return e}().map(function(t,n){return function(t){if("number"==typeof t){var n=t===J,i=e(S,{onClick:function(){return ee(t)},disabled:L,type:"default",size:"default"===I?"medium":"small",style:{minWidth:"small"===I?"32px":"36px",height:"small"===I?"32px":"36px",padding:"0 12px",margin:0,fontWeight:n?500:400,border:"none",background:n?"#FAFAF9":"white",backgroundColor:n?"#FAFAF9":"white",color:n?P:"#79716B",boxShadow:"none",borderRadius:"8px"},children:t},t);return H?H(t,"page",i):i}if("jump-prev"===t)return i=e(S,{onClick:function(){return ee(Math.max(1,J-5))},disabled:L,type:"default",size:"default"===I?"medium":"small",style:{minWidth:"small"===I?"32px":"36px",height:"small"===I?"32px":"36px",padding:"0 12px",margin:0,border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"•••"},"jump-prev"),H?H(J-5,"jump-prev",i):i;if("jump-next"===t)return i=e(S,{onClick:function(){return ee(Math.min($,J+5))},disabled:L,type:"default",size:"default"===I?"medium":"small",style:{minWidth:"small"===I?"32px":"36px",height:"small"===I?"32px":"36px",padding:"0 12px",margin:0,border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"•••"},"jump-next"),H?H(J+5,"jump-next",i):i;return null}(t)})}),H?H(J+1,"next",e(S,{onClick:function(){return ee(J+1)},disabled:L||J===$,type:"default",size:"default"===I?"medium":"small",style:{height:"small"===I?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:t("div",{className:"flex items-center gap-1",children:[e("span",{children:"Next"})," ",e(oe,{})]})})):e(S,{onClick:function(){return ee(J+1)},disabled:L||J===$,type:"default",size:"default"===I?"medium":"small",style:{height:"small"===I?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:t("div",{className:"flex items-center gap-1",children:[e("span",{children:"Next"})," ",e(oe,{})]})}),v&&e("select",{value:Q,onChange:function(e){return t=Number(e.target.value),n=Math.ceil(c/t),o=J>n?n:J,void 0===u&&X(t),void 0===i&&Z(o),null==k||k(o,t),void(null==F||F(o,t));var t,n,o},disabled:L,style:{padding:"small"===I?"6px 12px":"8px 12px",border:"1px solid #EAECF0",borderRadius:"8px",fontSize:"small"===I?"12px":"14px",lineHeight:"small"===I?"18px":"20px",color:"#101828",fontFamily:"DM Sans, sans-serif",cursor:L?"not-allowed":"pointer",backgroundColor:"white",outline:"none",transition:"all 0.2s"},onMouseEnter:function(e){L||(e.currentTarget.style.borderColor=P)},onMouseLeave:function(e){e.currentTarget.style.borderColor="#EAECF0"},children:m.map(function(e){return t("option",{value:e,children:[e," 条/页"]},e)})}),b&&t("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontFamily:"DM Sans, sans-serif"},children:[e("span",{style:{fontSize:"14px",lineHeight:"20px",color:"#475467"},children:"跳至"}),e("input",{type:"number",min:"1",value:_,onChange:function(e){return U(e.target.value)},onKeyPress:function(e){return"Enter"===e.key&&te()},disabled:L,style:{width:"56px",height:"small"===I?"28px":"36px",padding:"0 8px",border:"1px solid #EAECF0",borderRadius:"8px",fontSize:"14px",lineHeight:"20px",color:"#101828",fontFamily:"DM Sans, sans-serif",outline:"none",transition:"all 0.2s"},onFocus:function(e){e.currentTarget.style.borderColor=P},onBlur:function(e){e.currentTarget.style.borderColor="#EAECF0"}}),e("span",{style:{fontSize:"14px",lineHeight:"20px",color:"#475467"},children:"页"}),"object"==typeof b&&b.goButton?e(S,{onClick:te,disabled:L,type:"default",size:"default"===I?"medium":"small",style:{border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:b.goButton}):e(S,{onClick:te,disabled:L,type:"default",size:"default"===I?"medium":"small",style:{border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"确定"})]})]})]})},ae=function(n){var i=n.checked,o=void 0!==i&&i,r=n.indeterminate,l=void 0!==r&&r,a=n.disabled,s=void 0!==a&&a,d=n.onChange,c=n.className,u=void 0===c?"":c,p=n.style,f=n.children,g=C().primaryColor,v=o||l,x=s?"#FAFAF9":v?g:"white",m=s?"#FAFAF9":v?g:"#D7D3D0";return t("div",{className:"aha-checkbox ".concat(u),style:h({display:"inline-flex",alignItems:"center",gap:"8px",cursor:s?"not-allowed":"pointer"},p),onClick:function(e){s||(null==d||d({target:{checked:!o},currentTarget:{checked:!o}}))},children:[e("div",{style:{position:"relative",width:"20px",height:"20px",minWidth:"20px",minHeight:"20px",borderRadius:"4px",border:"1px solid ".concat(m),backgroundColor:x,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s",flexShrink:0,boxSizing:"border-box"},children:e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"14px",height:"14px",opacity:v?1:0,transition:"opacity 0.2s",pointerEvents:"none"},children:e(l?$:Q,{style:{width:"14px",height:"14px",display:"block"}})})}),f&&e("span",{style:{fontSize:"14px",lineHeight:"20px",color:s?"#98A2B3":"#101828",fontFamily:"DM Sans, sans-serif"},children:f}),e("input",{type:"checkbox",checked:o,ref:function(e){e&&(e.indeterminate=l)},onChange:d,disabled:s,style:{position:"absolute",opacity:0,width:0,height:0,pointerEvents:"none"},"aria-hidden":"true"})]})};ae.displayName="Checkbox";var se=function(e,t){return"string"==typeof t?null==e?void 0:e[t]:t.reduce(function(e,t){return null==e?void 0:e[t]},e)},de=function(e,t){var n,i;return"function"==typeof t?t(e):"string"==typeof t?null!==(n=se(e,t))&&void 0!==n?n:"":null!==(i=e.key)&&void 0!==i?i:""},ce=function(t){var n=t.order,i=C().primaryColor;return"ascend"===n?e(ne,{style:{color:i}}):"descend"===n?e(te,{style:{color:i}}):e(ee,{})},ue=function(n){var o,l,u,p,f=n.columns,v=void 0===f?[]:f,x=n.dataSource,y=void 0===x?[]:x,b=n.rowKey,w=void 0===b?"key":b,C=n.rowSelection,F=n.pagination,k=void 0!==F&&F,S=n.size,E=void 0===S?"middle":S,A=n.bordered,z=void 0!==A&&A;n.loading;var L=n.locale,D=n.showHeader,B=void 0===D||D,M=n.title,T=n.footer,W=n.summary,N=n.scroll,I=n.tableLayout,j=void 0===I?"auto":I,R=n.onChange,H=n.onSorterChange,O=n.onPaginationChange,P=n.onRow,V=n.className,q=void 0===V?"":V,Z=n.style,K=n.expandable,Y=n.rowClassName,X=n.onHeaderRow;n.sticky;var G=g(n,["columns","dataSource","rowKey","rowSelection","pagination","size","bordered","loading","locale","showHeader","title","footer","summary","scroll","tableLayout","onChange","onSorterChange","onPaginationChange","onRow","className","style","expandable","rowClassName","onHeaderRow","sticky"]),_=a((null==C?void 0:C.selectedRowKeys)||(null==C?void 0:C.defaultSelectedRowKeys)||[]),U=_[0],J=_[1];s(function(){void 0!==(null==C?void 0:C.selectedRowKeys)&&J(C.selectedRowKeys)},[null==C?void 0:C.selectedRowKeys]);var Q=a(new Map),$=Q[0],ee=Q[1],te=a((null==K?void 0:K.defaultExpandedRowKeys)||[]),ne=te[0],ie=te[1],oe=a(k&&"object"==typeof k&&(k.current||k.defaultCurrent)||1),re=oe[0],ue=oe[1],pe=a(k&&"object"==typeof k&&(k.pageSize||k.defaultPageSize)||10),fe=pe[0],he=pe[1];s(function(){k&&"object"==typeof k&&(void 0!==k.current&&ue(k.current),void 0!==k.pageSize&&he(k.pageSize))},[k]);var ge=a(null),ve=ge[0],xe=ge[1],me=a(null),ye=me[0],be=me[1],we=a(!1),Ce=we[0],Fe=we[1],ke=c(null),Se=c(null);s(function(){var e=function(){Fe(window.innerWidth<768)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[]);var Ee=d(function(e,t){var n,i,o,r=null===(n=null==C?void 0:C.getCheckboxProps)||void 0===n?void 0:n.call(C,e);if(!(null==r?void 0:r.disabled)){var l,a=de(e,w);l="radio"===(null==C?void 0:C.type)?t?[a]:[]:t?m(m([],U,!0),[a],!1):U.filter(function(e){return e!==a}),J(l);var s=y.filter(function(e){return l.includes(de(e,w))});null===(i=null==C?void 0:C.onChange)||void 0===i||i.call(C,l,s),null===(o=null==C?void 0:C.onSelect)||void 0===o||o.call(C,e,t,s,new Event("select"))}},[U,w,C,y]),Ae=d(function(e,t){var n,i,o=t.filter(function(e){var t;return!(null===(t=null==C?void 0:C.getCheckboxProps)||void 0===t?void 0:t.call(C,e).disabled)}).map(function(e){return de(e,w)}),r=e?o:[];J(r);var l=y.filter(function(e){return r.includes(de(e,w))}),a=e?t.filter(function(e){var t;return!(null===(t=null==C?void 0:C.getCheckboxProps)||void 0===t?void 0:t.call(C,e).disabled)}):[];null===(n=null==C?void 0:C.onChange)||void 0===n||n.call(C,r,l),null===(i=null==C?void 0:C.onSelectAll)||void 0===i||i.call(C,e,l,a)},[w,C,y]),ze=d(function(e,t){var n=e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex);if(n){var i=new Map($);null===t?i.delete(n):i.set(n,t),ee(i);var o=Array.from(i.entries()).map(function(t){var n=t[0],i=t[1];return{column:v.find(function(e){return(e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex))===n})||e,order:i,field:n,columnKey:n}}),r={column:e,order:t,field:n,columnKey:n};e.onSorterChange&&e.onSorterChange(r),H&&H(1===o.length?o[0]:o),R&&R({current:re,pageSize:fe},{},1===o.length?o[0]:o,{currentDataSource:y,action:"sort"})}},[$,R,H,re,fe,y,v]);d(function(e,t){var n,i,o,r=de(e,w);o=t?m(m([],ne,!0),[r],!1):ne.filter(function(e){return e!==r}),ie(o),null===(n=null==K?void 0:K.onExpand)||void 0===n||n.call(K,t,e),null===(i=null==K?void 0:K.onExpandedRowsChange)||void 0===i||i.call(K,o)},[ne,w,K]);var Le=d(function(){var e=m([],y,!0);return $.size>0&&e.sort(function(e,t){for(var n=function(n,i){var o=v.find(function(e){return(e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex))===n});if(!o)return"continue";var r=0;if("function"==typeof o.sorter)r=o.sorter(e,t);else if(!0===o.sorter){var l=se(e,o.dataIndex||n),a=se(t,o.dataIndex||n);l<a?r=-1:l>a&&(r=1)}return 0!==r?{value:"ascend"===i?r:-r}:void 0},i=0,o=Array.from($.entries());i<o.length;i++){var r=o[i],l=n(r[0],r[1]);if("object"==typeof l)return l.value}return 0}),e},[y,$,v]),De=Le(),Be=r(function(){if(!1===k||!k)return De;var e=(re-1)*fe,t=e+fe;return De.slice(e,t)},[De,re,fe,k]),Me=d(function(e,t){var n,i,o=null!=t?t:fe;if(ue(e),t&&he(t),O&&O(e,o),k&&"object"==typeof k&&(null===(n=k.onChange)||void 0===n||n.call(k,e,t),t&&(null===(i=k.onShowSizeChange)||void 0===i||i.call(k,e,t))),R){var r=Array.from($.entries()).map(function(e){var t=e[0],n=e[1];return{column:v.find(function(e){return(e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex))===t}),order:n,field:t,columnKey:t}});R({current:e,pageSize:o},{},1===r.length?r[0]:r,{currentDataSource:De,action:"paginate"})}},[k,O,R,fe,$,v,De]),Te=d(function(e,t,n){var i=se(t,e.dataIndex||"");return e.render?e.render(i,t,n):i},[]),We=d(function(e,t,n){if(t){var i=!0===t?"left":t,o=0;if("left"===i){if(C&&("left"===C.fixed||!0===C.fixed))o+="number"==typeof C.columnWidth?C.columnWidth:"string"==typeof C.columnWidth?parseInt(C.columnWidth):60;for(var r=0;r<e;r++){if("left"===(l=v[r]).fixed||!0===l.fixed)o+=l.width?"number"==typeof l.width?l.width:parseInt(l.width)||0:150}return o}if("right"===i){for(r=e+1;r<v.length;r++){var l;if("right"===(l=v[r]).fixed)o+=l.width?"number"==typeof l.width?l.width:parseInt(l.width)||0:150}if(C&&"right"===C.fixed)o+="number"==typeof C.columnWidth?C.columnWidth:"string"==typeof C.columnWidth?parseInt(C.columnWidth):60;return o}}},[v,C]),Ne=d(function(){if(!B)return null;var n,i,o,r,l=v.map(function(n,i){var o,r=n.key||(Array.isArray(n.dataIndex)?n.dataIndex.join("."):n.dataIndex)||i,l=$.get(r)||null,a=We(i,n.fixed,!0),s=n.width?"number"==typeof n.width?"".concat(n.width,"px"):n.width:void 0;return e("th",h({className:"".concat(n.className||""," ").concat(n.align?"text-".concat(n.align):""),style:{width:s,minWidth:n.minWidth?"number"==typeof n.minWidth?"".concat(n.minWidth,"px"):n.minWidth:s||void 0,maxWidth:s,position:n.fixed?"sticky":"relative",left:"left"===n.fixed||!0===n.fixed?void 0!==a?"".concat(a,"px"):"0":void 0,right:"right"===n.fixed?void 0!==a?"".concat(a,"px"):"0":void 0,zIndex:n.fixed?"left"===n.fixed||!0===n.fixed?10:9:1,backgroundColor:(n.fixed,"#F9FAFB"),boxShadow:"left"===n.fixed||!0===n.fixed?"2px 0 4px rgba(0, 0, 0, 0.05)":"right"===n.fixed?"-2px 0 4px rgba(0, 0, 0, 0.05)":void 0,padding:"12px 16px",textAlign:n.align||"left",borderBottom:"1px solid #EAECF0",fontWeight:600,fontSize:"12px",lineHeight:"18px",color:"#475467",fontFamily:"DM Sans, sans-serif"}},(null===(o=n.onHeaderCell)||void 0===o?void 0:o.call(n,n))||{},{children:t("div",{style:{display:"flex",alignItems:"center",gap:"8px",justifyContent:"right"===n.align?"flex-end":"center"===n.align?"center":"flex-start"},children:[e("span",{style:{fontWeight:600,fontSize:"12px",lineHeight:"18px",color:"#475467"},children:"function"==typeof n.title?n.title({sortOrder:l,sortColumn:n}):n.title}),n.sorter&&e("button",{onClick:function(){ze(n,null===l?"ascend":"ascend"===l?"descend":null)},style:{border:"none",background:"none",cursor:"pointer",display:"flex",alignItems:"center",padding:"2px",color:l?"#475467":"#98A2B3"},children:e(ce,{order:l||void 0})})]})}),r)});if(C){var a="number"==typeof C.columnWidth?"".concat(C.columnWidth,"px"):"string"==typeof C.columnWidth?C.columnWidth:"60px",s=e("th",{style:{width:a,position:C.fixed?"sticky":"relative",left:"left"===C.fixed||!0===C.fixed?"0px":void 0,right:"right"===C.fixed?"0px":void 0,zIndex:C.fixed?"left"===C.fixed||!0===C.fixed?12:11:1,backgroundColor:"#F9FAFB",padding:"12px 16px",borderBottom:"1px solid #EAECF0",fontWeight:600,fontSize:"12px",lineHeight:"18px",color:"#475467",fontFamily:"DM Sans, sans-serif",textAlign:"center"},children:t("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[!C.hideSelectAll&&"radio"!==C.type&&(n=Be.filter(function(e){var t;return!(null===(t=C.getCheckboxProps)||void 0===t?void 0:t.call(C,e).disabled)}),i=n.map(function(e){return de(e,w)}),o=n.length>0&&i.every(function(e){return U.includes(e)}),r=i.some(function(e){return U.includes(e)}),e(ae,{checked:o,indeterminate:r&&!o,onChange:function(e){return Ae(e.target.checked,Be)}})),C.columnTitle&&e("span",{style:{marginLeft:C.hideSelectAll?0:"8px"},children:C.columnTitle})]})},"selection");l.unshift(s)}var d=null==X?void 0:X(v,0);return e("thead",{ref:Se,children:e("tr",h({},d||{},{children:l}))})},[v,B,$,C,U,Be,w,ze,Ae,L,X,We]),Ie=d(function(e){xe(e)},[]),je=d(function(e,t){e.preventDefault(),be(t)},[]),Re=d(function(e,t){if(e.preventDefault(),null===ve||ve===t)return xe(null),void be(null);var n=m([],Be,!0),i=n[ve];n.splice(ve,1),n.splice(t,0,i),xe(null),be(null)},[ve,Be]),He=d(function(){xe(null),be(null)},[]),Oe=d(function(){return Be.map(function(n,o){var r,l=de(n,w),a=U.includes(l),s=ne.includes(l),d=(null==P?void 0:P(n,o))||{},c=o===Be.length-1;return t(i.Fragment,{children:[t("tr",h({className:"".concat("function"==typeof Y?Y(n,o):Y||""," ").concat(ve===o?"dragging":""," ").concat(ye===o?"drag-over":""),draggable:!0,onDragStart:function(){return Ie(o)},onDragOver:function(e){return je(e,o)},onDrop:function(e){return Re(e,o)},onDragEnd:He,style:h({cursor:"move",opacity:ve===o?.5:1,backgroundColor:ye===o?"#F9FAFB":"white",transition:"background-color 0.2s"},d.style),onMouseEnter:function(e){ve!==o&&ye!==o&&(e.currentTarget.style.backgroundColor="#F9FAFB")},onMouseLeave:function(e){ve!==o&&ye!==o&&(e.currentTarget.style.backgroundColor="white")}},d,{children:[C&&e("td",{style:{width:"number"==typeof C.columnWidth?"".concat(C.columnWidth,"px"):"string"==typeof C.columnWidth?C.columnWidth:"60px",position:C.fixed?"sticky":"relative",left:"left"===C.fixed||!0===C.fixed?"0px":void 0,right:"right"===C.fixed?"0px":void 0,zIndex:C.fixed?"left"===C.fixed||!0===C.fixed?12:11:1,backgroundColor:"white",padding:"16px",borderBottom:c?"none":"1px solid #EAECF0",textAlign:"center"},children:e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:e(ae,{checked:a,onChange:function(e){return Ee(n,e.target.checked)},disabled:null===(r=C.getCheckboxProps)||void 0===r?void 0:r.call(C,n).disabled})})}),v.map(function(t,i){var r,l=t.key||(Array.isArray(t.dataIndex)?t.dataIndex.join("."):t.dataIndex)||i,a=(null===(r=t.onCell)||void 0===r?void 0:r.call(t,n,o))||{},s=We(i,t.fixed,!1),d=t.width?"number"==typeof t.width?"".concat(t.width,"px"):t.width:void 0;return e("td",h({className:"".concat(t.className||""," ").concat(t.align?"text-".concat(t.align):""),style:h({width:d,minWidth:t.minWidth?"number"==typeof t.minWidth?"".concat(t.minWidth,"px"):t.minWidth:d||void 0,maxWidth:d,position:t.fixed?"sticky":"relative",left:"left"===t.fixed||!0===t.fixed?void 0!==s?"".concat(s,"px"):"0":void 0,right:"right"===t.fixed?void 0!==s?"".concat(s,"px"):"0":void 0,zIndex:t.fixed?"left"===t.fixed||!0===t.fixed?10:9:1,backgroundColor:"white",boxShadow:"left"===t.fixed||!0===t.fixed?"2px 0 4px rgba(0, 0, 0, 0.05)":"right"===t.fixed?"-2px 0 4px rgba(0, 0, 0, 0.05)":void 0,padding:"16px",borderBottom:c?"none":"1px solid #EAECF0",fontSize:"14px",lineHeight:"20px",color:"#101828",fontFamily:"DM Sans, sans-serif",textAlign:t.align||"left"},a.style),colSpan:t.colSpan,rowSpan:t.rowSpan},a,{children:Te(t,n,o)}),l)})]})),(null==K?void 0:K.expandedRowRender)&&s&&e("tr",{children:e("td",{colSpan:v.length+(C?1:0),children:K.expandedRowRender(n,o,0,!0)})})]},l)})},[Be,w,U,ne,C,v,P,Y,Ee,Te,K,ve,ye,Ie,je,Re,He,We]),Pe=function(){var t;if(!1===k||!k)return null;var n=null!==(t=k.total)&&void 0!==t?t:De.length,i=k.position||"bottomRight";return e("div",{style:{marginTop:"16px",display:"flex",justifyContent:i.includes("Right")?"flex-end":i.includes("Left")?"flex-start":"center"},children:e(le,{current:re,total:n,pageSize:fe,showSizeChanger:k.showSizeChanger,pageSizeOptions:k.pageSizeOptions,showQuickJumper:k.showQuickJumper,showTotal:k.showTotal,onChange:Me,onShowSizeChange:Me,simple:k.simple,responsive:k.responsive,size:"small"===E?"small":"default"})})},Ve=r(function(){return v.some(function(e){return e.fixed})||C&&C.fixed},[v,C]),qe=r(function(){return v.every(function(e){return e.width})&&(!C||C.columnWidth)},[v,C]),Ze=r(function(){if(null==N?void 0:N.x){if("number"==typeof N.x)return N.x;if(!0===N.x)return v.reduce(function(e,t){return e+(t.width?"number"==typeof t.width?t.width:parseInt(String(t.width).replace("px",""))||0:150)},0)+(C?"number"==typeof C.columnWidth?C.columnWidth:parseInt(String(C.columnWidth||"60").replace("px",""))||60:0)}if(Ve)return v.reduce(function(e,t){return t.fixed&&t.width?e+("number"==typeof t.width?t.width:parseInt(String(t.width).replace("px",""))||0):e},0)+(C&&C.fixed&&C.columnWidth?"number"==typeof C.columnWidth?C.columnWidth:parseInt(String(C.columnWidth).replace("px",""))||60:0)},[v,null==N?void 0:N.x,C,Ve]),Ke=r(function(){return"fixed"===j||Ve||qe||v.some(function(e){return e.width})?"fixed":j},[j,Ve,qe,v]),Ye={width:"100%",minWidth:Ze?"".concat(Ze,"px"):"100%",borderCollapse:"separate",borderSpacing:0,tableLayout:Ke,backgroundColor:"white",borderRadius:"8px",border:"1px solid #EAECF0"},Xe=h({position:"relative",width:"100%",maxWidth:"100%",maxHeight:"number"==typeof(null==N?void 0:N.y)?"".concat(N.y,"px"):void 0,borderRadius:"8px"},Z);if(Ce)return t("div",h({ref:ke,className:"aha-table aha-table-mobile-wrapper ".concat(q),style:Xe},G,{children:[M&&e("div",{style:{marginBottom:"16px"},children:M(De)}),k&&"object"==typeof k&&(null===(o=k.position)||void 0===o?void 0:o.startsWith("top"))&&Pe(),e("div",{className:"aha-table-mobile",children:Be.map(function(n,i){var o,r=de(n,w),l=U.includes(r);return t("div",{className:"aha-table-mobile-row ".concat(l?"selected":""),style:{border:"1px solid #e8e8e8",borderRadius:"4px",padding:"12px",marginBottom:"12px",backgroundColor:l?"#e6f7ff":"white"},children:[C&&e("div",{style:{marginBottom:"8px"},children:e(ae,{checked:l,onChange:function(e){return Ee(n,e.target.checked)},disabled:null===(o=C.getCheckboxProps)||void 0===o?void 0:o.call(C,n).disabled})}),v.map(function(o){var r=o.key||(Array.isArray(o.dataIndex)?o.dataIndex.join("."):o.dataIndex),l=se(n,o.dataIndex||""),a=o.render?o.render(l,n,i):l;return t("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"8px",paddingBottom:"8px",borderBottom:"1px solid #f0f0f0"},children:[t("span",{style:{fontWeight:"bold",color:"#666"},children:["function"==typeof o.title?o.title({}):o.title,":"]}),e("span",{style:{flex:1,textAlign:"right"},children:a})]},r)})]},r)})}),T&&e("div",{style:{marginTop:"16px"},children:T(De)}),k&&("object"!=typeof k||!(null===(l=k.position)||void 0===l?void 0:l.startsWith("top")))&&Pe()]}));var Ge={position:"relative",overflowX:(null==N?void 0:N.x)||Ve?"auto":"visible",overflowY:(null==N?void 0:N.y)?"auto":"visible",width:"100%",maxWidth:!0===(null==N?void 0:N.x)?"100%":"number"==typeof(null==N?void 0:N.x)?"".concat(N.x,"px"):void 0,maxHeight:"number"==typeof(null==N?void 0:N.y)?"".concat(N.y,"px"):void 0,borderRadius:"8px"};return t("div",h({ref:ke,className:"aha-table ".concat(q),style:Xe},G,{children:[M&&e("div",{style:{marginBottom:"16px"},children:M(De)}),k&&"object"==typeof k&&(null===(u=k.position)||void 0===u?void 0:u.startsWith("top"))&&Pe(),e("div",{style:Ge,children:e("div",{style:{width:"100%",minWidth:Ze?"".concat(Ze,"px"):"100%",display:"block"},children:t("table",{style:Ye,className:z?"bordered":"",children:[Ne(),e("tbody",{children:Oe()}),W&&e("tfoot",{children:e("tr",{children:e("td",{colSpan:v.length+(C?1:0),children:W(De)})})})]})})}),T&&e("div",{style:{marginTop:"16px"},children:T(De)}),k&&("object"!=typeof k||!(null===(p=k.position)||void 0===p?void 0:p.startsWith("top")))&&Pe()]}))},pe=function(n){var i=n.checked,o=void 0!==i&&i,r=n.disabled,l=void 0!==r&&r,a=n.onChange,s=n.className,d=void 0===s?"":s,c=n.style,u=n.children,p=n.value,f=n.name,g=C().primaryColor,v=void 0===g?"#FB6011":g,x=l?"#FAFAF9":o?v:"white",m=l?"#FAFAF9":o?v:"#D7D3D0";return t("div",{className:"aha-radio ".concat(d),style:h({display:"inline-flex",alignItems:"center",gap:"8px",cursor:l?"not-allowed":"pointer"},c),onClick:function(e){l||(null==a||a({target:{checked:!o,value:p},currentTarget:{checked:!o,value:p}}))},children:[e("div",{style:{position:"relative",width:"20px",height:"20px",minWidth:"20px",minHeight:"20px",borderRadius:"50%",border:"1px solid ".concat(m),backgroundColor:x,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s",flexShrink:0,boxSizing:"border-box"},children:e("div",{style:{width:"8px",height:"8px",minWidth:"8px",minHeight:"8px",borderRadius:"50%",backgroundColor:"white",opacity:o?1:0,transition:"opacity 0.2s",pointerEvents:"none",boxSizing:"border-box"}})}),u&&e("span",{style:{fontSize:"14px",lineHeight:"20px",color:l?"#98A2B3":"#101828",fontFamily:"DM Sans, sans-serif"},children:u}),e("input",{type:"radio",checked:o,onChange:a,disabled:l,value:p,name:f,style:{position:"absolute",opacity:0,width:0,height:0,pointerEvents:"none"},"aria-hidden":"true"})]})};pe.displayName="Radio";var fe=function(n){var o=n.items,r=void 0===o?[]:o,l=n.variant,u=void 0===l?"underline":l,p=n.layout,f=void 0===p?"equal":p,v=n.defaultValue,x=n.value,m=n.onChange,y=n.className,b=void 0===y?"":y,w=n.mode,F=void 0===w?"children":w,k=g(n,["items","variant","layout","defaultValue","value","onChange","className","mode"]),S=C().primaryColor;if(!r||0===r.length)return null;var E=function(){if(0===r.length)return[];var e=r[0];return"string"==typeof e||"number"==typeof e?r.map(function(e,t){return{key:String(e),label:String(e)}}):r}(),A=void 0!==x,z=E.length>0?E[0].key:"",L=function(e){if(void 0===e)return z;var t=String(e),n=E.find(function(e){return e.key===t});return n?n.key:z},D=a(function(){var e,t=null!==(e=null!=x?x:v)&&void 0!==e?e:z;return L(t)}),B=D[0],M=D[1],T=A?L(x):B,W=d(function(e,t){if(!t){A||M(e);var n="number"!=typeof r[0]||isNaN(Number(e))?e:Number(e);null==m||m(n)}},[A,m,r]),N=E.find(function(e){return e.key===T}),I=S||"#FB6011",j=c({}),R=c(null),H=c(null),O=c(null),P=c(null),V=c(""),q=a({width:0,left:0,opacity:0}),Z=q[0],K=q[1],Y=a({width:0,left:0,opacity:0}),X=Y[0],G=Y[1];s(function(){if(V.current!==T&&(V.current=T,T)){if("underline"===u&&O.current){var e=requestAnimationFrame(function(){var e=requestAnimationFrame(function(){if(R.current&&O.current&&V.current===T){var e=j.current[T];if(!e&&E.length>0){var t=E[0].key;(e=j.current[t])&&!A&&M(t)}if(e){var n=O.current.getBoundingClientRect(),i=e.getBoundingClientRect();if(0!==n.width&&0!==i.width){var o=i.left-n.left,r=i.width,l="".concat(o,"px"),a="".concat(r,"px");K(function(e){return e.left===l&&e.width===a&&1===e.opacity?e:{width:a,left:l,opacity:1}})}}}});return function(){return cancelAnimationFrame(e)}});return function(){return cancelAnimationFrame(e)}}if("background"===u&&H.current&&P.current){var t=setTimeout(function(){if(H.current&&P.current&&V.current===T){var e=j.current[T];if(e){var t=P.current.getBoundingClientRect(),n=e.getBoundingClientRect();if(0!==t.width&&0!==n.width){var i=n.left-t.left,o=n.width,r="".concat(i,"px"),l="".concat(o,"px");G(function(e){return e.left===r&&e.width===l&&1===e.opacity?e:{width:l,left:r,opacity:1}})}}}},0);return function(){return clearTimeout(t)}}}},[T,u,E.length,A]);var _;return t("div",{className:"aha-tab-container",children:["underline"===u?t("div",h({ref:O,className:"aha-tab aha-tab--underline ".concat(b),style:{display:"flex",alignItems:"center",gap:"32px",borderBottom:"1px solid #E7E5E4",paddingBottom:"0",position:"relative"}},k,{children:[e("div",{ref:R,style:h({position:"absolute",bottom:"-1px",height:"2px",backgroundColor:I,borderRadius:"1px 1px 0 0",transition:"left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease-in-out"},Z)}),E.map(function(n){var o,r=n.key===T;return t("div",{ref:function(e){j.current[n.key]=e},onClick:function(){return W(n.key,n.disabled)},style:{position:"relative",padding:"12px 0",cursor:n.disabled?"not-allowed":"pointer",display:"flex",alignItems:"center",gap:"8px",opacity:n.disabled?.5:1,transition:"color 0.2s ease-in-out"},children:[n.icon&&e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",color:r?I:"#79716B",transition:"color 0.2s ease-in-out"},children:i.isValidElement(n.icon)?i.cloneElement(n.icon,{width:16,height:16,style:h(h({},null===(o=n.icon.props)||void 0===o?void 0:o.style),{color:r?I:"#79716B",transition:"color 0.2s ease-in-out"})}):n.icon}),e("span",{style:{fontSize:"14px",fontWeight:500,fontFamily:"DM Sans, sans-serif",color:r?I:"#79716B",lineHeight:"1.375",transition:"color 0.2s ease-in-out"},children:n.label}),void 0!==n.badge&&null!==n.badge&&e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minWidth:"20px",height:"20px",padding:"0 6px",borderRadius:"10px",backgroundColor:"#FAFAF9",border:"1px solid #E7E5E4",color:"#44403C",fontSize:"12px",fontWeight:500,fontFamily:"DM Sans, sans-serif",lineHeight:"1",transition:"all 0.2s ease-in-out"},children:n.badge}),n.customElement]},n.key)})]})):(_={display:"flex",alignItems:"center",backgroundColor:"#FAFAF9",borderRadius:"8px",padding:"4px",border:"1px solid #E7E5E4",gap:"4px",position:"relative"},_.width="equal"===f?"100%":"fit-content",t("div",h({ref:P,className:"aha-tab aha-tab--background aha-tab--".concat(f," ").concat(b),style:_},k,{children:[e("div",{ref:H,style:h({position:"absolute",top:"4px",bottom:"4px",borderRadius:"6px",backgroundColor:"#FFFFFF",border:"none",boxShadow:"0px 1px 2px 0px rgba(10, 13, 18, 0.1)",transition:"left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease-in-out",pointerEvents:"none"},X)}),E.map(function(n){var o,r=n.key===T,l={position:"relative",padding:"8px 16px",cursor:n.disabled?"not-allowed":"pointer",display:"flex",alignItems:"center",gap:"8px",borderRadius:"6px",opacity:n.disabled?.5:1,flex:"equal"===f?1:"none",justifyContent:"center",backgroundColor:"transparent",border:"1px solid transparent",transition:"color 0.2s ease-in-out",zIndex:1};return t("div",{ref:function(e){j.current[n.key]=e},onClick:function(){return W(n.key,n.disabled)},style:l,children:[n.icon&&e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",color:r?"#44403C":"#79716B",transition:"color 0.2s ease-in-out"},children:i.isValidElement(n.icon)?i.cloneElement(n.icon,{width:16,height:16,style:h(h({},null===(o=n.icon.props)||void 0===o?void 0:o.style),{color:r?"#44403C":"#79716B",transition:"color 0.2s ease-in-out"})}):n.icon}),e("span",{style:{fontSize:"14px",fontWeight:500,fontFamily:"DM Sans, sans-serif",color:r?"#44403C":"#79716B",lineHeight:"1.375",transition:"color 0.2s ease-in-out"},children:n.label}),void 0!==n.badge&&null!==n.badge&&e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minWidth:"20px",height:"20px",padding:"0 6px",borderRadius:"10px",backgroundColor:"#FAFAF9",border:"1px solid #E7E5E4",color:"#44403C",fontSize:"12px",fontWeight:500,fontFamily:"DM Sans, sans-serif",lineHeight:"1",transition:"all 0.2s ease-in-out"},children:n.badge}),n.customElement]},n.key)})]}))),"children"===F&&(null==N?void 0:N.children)&&e("div",{className:"aha-tab-content",style:{marginTop:"24px"},children:N.children})]})},he=function(i){var o=i.percent,r=void 0===o?0:o,l=i.type,d=void 0===l?"circle":l,u=i.width,p=void 0===u?120:u,f=i.title,v=i.titlePosition,x=i.showPercent,m=void 0===x||x,y=i.animated,b=void 0!==y&&y,w=i.status,F=void 0===w?"normal":w,k=i.className,S=void 0===k?"":k,E=i.style,A=i.strokeColor,z=i.trailColor,L=void 0===z?"#F5F5F4":z,D=g(i,["percent","type","width","title","titlePosition","showPercent","animated","status","className","style","strokeColor","trailColor"]),B=C().primaryColor,M=Math.min(100,Math.max(0,r)),T=c(!0),W=a(!1),N=W[0],I=W[1],j=a(0),R=j[0],H=j[1];s(function(){if(b&&T.current&&M>0){T.current=!1,H(0),I(!0),requestAnimationFrame(function(){requestAnimationFrame(function(){H(M)})});var e=setTimeout(function(){I(!1),H(M)},300);return function(){return clearTimeout(e)}}T.current?(T.current=!1,I(!1),H(M)):H(M)},[b,M]);var O=A||B||"#FB6011";"success"===F?O="#00BC7D":"exception"===F&&(O="#FB2C36");var P=v||"inside",V=Math.max(4,Math.round(.06*p)),q=(p-V)/2,Z="semicircle"===d?p/2:p,K="14px",Y="12px",X=function(){var i=f&&"outside"===P?p+4+18+4:p,o=2*Math.PI*q,r=o-(N?R:M)/100*o;return t("div",{style:{position:"relative",width:p,height:i,display:"flex",alignItems:"center",justifyContent:"center"},children:[t("svg",{width:p,height:p,style:{position:"absolute",top:0,left:0},children:[e("circle",{cx:p/2,cy:p/2,r:q,fill:"none",stroke:L,strokeWidth:V,strokeLinecap:"round"}),e("circle",{cx:p/2,cy:p/2,r:q,fill:"none",stroke:O,strokeWidth:V,strokeLinecap:"round",strokeDasharray:o,strokeDashoffset:r,transform:"rotate(-90 ".concat(p/2," ").concat(p/2,")"),style:{transition:N?"stroke-dashoffset 0.3s ease":"none"}})]}),f&&"inside"===P?t("div",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:6},children:[e("div",{style:{fontSize:K,color:"#292524",fontFamily:"DM Sans, sans-serif",lineHeight:1},children:f}),m&&e("div",{style:{fontSize:Y,fontWeight:600,color:"#1C1917",fontFamily:"DM Sans, sans-serif",lineHeight:1},children:"".concat(Math.round(M),"%")})]}):t(n,{children:[m&&e("div",{style:{position:"absolute",left:"50%",top:"".concat(p/2,"px"),transform:"translate(-50%, -50%)",textAlign:"center",fontSize:Y,fontWeight:600,color:"#1C1917",fontFamily:"DM Sans, sans-serif",lineHeight:1},children:"".concat(Math.round(M),"%")}),f&&"outside"===P&&e("div",{style:{position:"absolute",left:"50%",top:"".concat(p,"px"),transform:"translateX(-50%)",marginTop:"4px",textAlign:"center",fontSize:K,color:"#57534E",fontFamily:"DM Sans, sans-serif",lineHeight:"18px"},children:f})]})]})},G=h({display:"inline-flex",flexDirection:"column",alignItems:"center",width:p},E);return e("div",h({className:"aha-progress aha-progress--".concat(d," ").concat(S),style:G},D,{children:function(){switch(d){case"circle":return X();case"semicircle":return o=V/2,r=p-V/2,l=(i=Z+V)-V/2,a=Z/2+V/2+V/2,s=f&&"outside"===P?i+4+18+4:i,c=Math.PI*q,u=c-(N?R:M)/100*c,t("div",{style:{position:"relative",width:p,height:s,overflow:"hidden"},children:[t("svg",{width:p,height:i,viewBox:"0 0 ".concat(p," ").concat(i),style:{position:"absolute",top:0,left:0},children:[e("path",{d:"M ".concat(o," ").concat(l," A ").concat(q," ").concat(q," 0 0 1 ").concat(r," ").concat(l),fill:"none",stroke:L,strokeWidth:V,strokeLinecap:"round"}),e("path",{d:"M ".concat(o," ").concat(l," A ").concat(q," ").concat(q," 0 0 1 ").concat(r," ").concat(l),fill:"none",stroke:O,strokeWidth:V,strokeLinecap:"round",strokeDasharray:c,strokeDashoffset:u,style:{transition:N?"stroke-dashoffset 0.3s ease":"none"}})]}),f&&"inside"===P?t("div",{style:{position:"absolute",left:"50%",top:"".concat(a,"px"),transform:"translate(-50%, -50%)",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:6},children:[e("div",{style:{fontSize:K,color:"#57534E",fontFamily:"DM Sans, sans-serif",lineHeight:1},children:f}),m&&e("div",{style:{fontSize:Y,fontWeight:600,color:"#1C1917",fontFamily:"DM Sans, sans-serif",lineHeight:1},children:"".concat(Math.round(M),"%")})]}):t(n,{children:[m&&e("div",{style:{position:"absolute",left:"50%",top:"".concat(a,"px"),transform:"translate(-50%, -50%)",textAlign:"center",fontSize:Y,fontWeight:600,color:"#1C1917",fontFamily:"DM Sans, sans-serif",lineHeight:1},children:"".concat(Math.round(M),"%")}),f&&"outside"===P&&e("div",{style:{position:"absolute",left:"50%",top:"".concat(i,"px"),transform:"translateX(-50%)",marginTop:"4px",textAlign:"center",fontSize:K,color:"#57534E",fontFamily:"DM Sans, sans-serif",lineHeight:"18px"},children:f})]})]});default:return console.warn('Progress type "'.concat(d,'" is not supported yet, using "circle" as fallback')),X()}var i,o,r,l,a,s,c,u}()}))},ge=u(function(o,r){var l=o.size,a=void 0===l?"medium":l,d=o.disabled,u=void 0!==d&&d,p=o.error,f=void 0!==p&&p,v=o.readOnly,x=void 0!==v&&v,m=o.prefix,y=o.suffix,b=o.allowClear,w=void 0!==b&&b,F=o.onClear,k=o.className,S=void 0===k?"":k,E=o.style,A=o.type,z=void 0===A?"text":A,L=o.placeholder,D=o.value,B=o.defaultValue,M=o.onChange,T=o.onFocus,W=o.onBlur,N=o.onPressEnter,I=g(o,["size","disabled","error","readOnly","prefix","suffix","allowClear","onClear","className","style","type","placeholder","value","defaultValue","onChange","onFocus","onBlur","onPressEnter"]),j=C().primaryColor,R=void 0===j?"#FB6011":j,H=c(null),O=i.useState(B||D||""),P=O[0],V=O[1],q=i.useState(!1),Z=q[0],K=q[1];s(function(){"function"==typeof r?r(H.current):r&&(r.current=H.current)},[r]);var Y=void 0!==D,X=Y?D:P,G=function(e){var t;e.stopPropagation(),Y||V("");null==M||M({target:{value:""},currentTarget:{value:""}}),null==F||F(),null===(t=H.current)||void 0===t||t.focus()},_=w&&X&&!u,U={small:{height:"32px",paddingTop:"3px",paddingBottom:"3px"},mediumSmall:{height:"36px",paddingTop:"5px",paddingBottom:"5px"},medium:{height:"40px",paddingTop:"7px",paddingBottom:"7px"},large:{height:"48px",paddingTop:"11px",paddingBottom:"11px"}},J=y||_?"40px":"12px",Q=h({width:"100%",boxSizing:"border-box",fontFamily:"DM Sans, sans-serif",borderRadius:"8px",border:"1px solid ".concat(f?"#F04438":Z?R:"#D7D3D0"),backgroundColor:u||x?"#FAFAF9":"#FFFFFF",color:u?"#98A2B3":"#1C1917",fontSize:"16px",fontWeight:400,lineHeight:"24px",paddingLeft:m?"40px":"12px",paddingRight:J,paddingTop:U[a].paddingTop,paddingBottom:U[a].paddingBottom,transition:"all 0.2s",outline:"none",WebkitAppearance:"none",MozAppearance:"textfield",appearance:"none"},E);return t(n,{children:[e("style",{children:'\n .aha-input-wrapper input::placeholder {\n color: #D7D3D0;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n .aha-input-wrapper input::-webkit-input-placeholder {\n color: #D7D3D0;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n .aha-input-wrapper input::-moz-placeholder {\n color: #D7D3D0;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n .aha-input-wrapper input:-ms-input-placeholder {\n color: #D7D3D0;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n /* 移动端优化 */\n .aha-input-wrapper input {\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n touch-action: manipulation;\n }\n /* 移除数字输入框的上下箭头 */\n .aha-input-wrapper input[type="number"]::-webkit-inner-spin-button,\n .aha-input-wrapper input[type="number"]::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n .aha-input-wrapper input[type="number"] {\n -moz-appearance: textfield;\n }\n '}),t("div",{className:"aha-input-wrapper ".concat(S),style:{position:"relative",display:"inline-flex",alignItems:"center",width:"100%"},children:[m&&e("span",{style:{position:"absolute",left:"12px",display:"flex",alignItems:"center",color:u?"#98A2B3":"#78716C",zIndex:1,pointerEvents:"none"},children:m}),e("input",h({ref:H,type:z,value:X,placeholder:L,disabled:u,readOnly:x,onChange:function(e){Y||V(e.target.value),null==M||M(e)},onFocus:function(e){K(!0),null==T||T(e)},onBlur:function(e){K(!1),null==W||W(e)},onKeyDown:function(e){var t;"Enter"===e.key&&N&&N(e),null===(t=I.onKeyDown)||void 0===t||t.call(I,e)},style:Q,autoComplete:I.autoComplete||"off",autoCorrect:I.autoCorrect||"off",autoCapitalize:I.autoCapitalize||"off",spellCheck:I.spellCheck||!1},I)),(y||_)&&t("span",{style:{position:"absolute",right:"12px",display:"flex",alignItems:"center",gap:"4px",color:u?"#98A2B3":"#78716C",zIndex:1},children:[_&&e(function(){return e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:G,style:{cursor:"pointer",flexShrink:0,color:"#78716C"},children:e("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},{}),y&&e("span",{style:{pointerEvents:"none"},children:y})]})]})]})});ge.displayName="Input";var ve=u(function(o,r){var l=o.disabled,a=void 0!==l&&l,d=o.error,u=void 0!==d&&d,p=o.readOnly,f=void 0!==p&&p,v=o.showCount,x=void 0!==v&&v,m=o.maxLength,y=o.className,b=void 0===y?"":y,w=o.style,F=o.placeholder,k=o.value,S=o.defaultValue,E=o.rows,A=void 0===E?3:E,z=o.autoSize,L=void 0!==z&&z,D=o.onChange,B=o.onFocus,M=o.onBlur,T=g(o,["disabled","error","readOnly","showCount","maxLength","className","style","placeholder","value","defaultValue","rows","autoSize","onChange","onFocus","onBlur"]),W=C().primaryColor,N=void 0===W?"#FB6011":W,I=c(null),j=i.useState(S||k||""),R=j[0],H=j[1],O=i.useState(!1),P=O[0],V=O[1],q=i.useState(void 0),Z=q[0],K=q[1];s(function(){"function"==typeof r?r(I.current):r&&(r.current=I.current)},[r]);var Y=void 0!==k,X=Y?k:R,G=String(X||"").length;s(function(){if(L&&I.current){var e=I.current,t="object"==typeof L&&L.minRows||1,n="object"==typeof L?L.maxRows:void 0;e.style.height="auto";var i=e.scrollHeight,o=parseInt(window.getComputedStyle(e).lineHeight||"22",10),r=t*o,l=n?n*o:void 0,a=Math.max(i,r);l&&(a=Math.min(a,l)),e.style.height="".concat(a,"px"),K(a)}},[X,L]);var _=h(h({width:"100%",boxSizing:"border-box",fontFamily:"DM Sans, sans-serif",borderRadius:"8px",border:"1px solid ".concat(u?"#F04438":P?N:"#D7D3D0"),backgroundColor:a||f?"#FAFAF9":"#FFFFFF",color:a?"#98A2B3":"#1C1917",fontSize:"16px",fontWeight:400,lineHeight:"24px",padding:"12px 14px",boxShadow:"0 1px 2px rgba(10, 13, 18, 0.05)",transition:"all 0.2s",outline:"none",resize:L?"none":"vertical",cursor:a?"not-allowed":"text",WebkitAppearance:"none",appearance:"none"},void 0!==Z&&L?{height:"".concat(Z,"px")}:{}),w);return t(n,{children:[e("style",{children:"\n .aha-textarea-wrapper textarea::placeholder {\n color: #79716B;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n .aha-textarea-wrapper textarea::-webkit-input-placeholder {\n color: #79716B;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n .aha-textarea-wrapper textarea::-moz-placeholder {\n color: #79716B;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n .aha-textarea-wrapper textarea:-ms-input-placeholder {\n color: #79716B;\n font-size: 16px;\n font-weight: 400;\n opacity: 1;\n }\n /* 移动端优化 */\n .aha-textarea-wrapper textarea {\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n touch-action: manipulation;\n }\n "}),t("div",{className:"aha-textarea-wrapper ".concat(b),style:{position:"relative",display:"inline-flex",flexDirection:"column",width:"100%"},children:[e("textarea",h({ref:I,value:X,placeholder:F,disabled:a,readOnly:f,rows:L?void 0:A,maxLength:m,onChange:function(e){Y||H(e.target.value),null==D||D(e)},onFocus:function(e){V(!0),null==B||B(e)},onBlur:function(e){V(!1),null==M||M(e)},style:_,autoComplete:T.autoComplete||"off",autoCorrect:T.autoCorrect||"off",autoCapitalize:T.autoCapitalize||"off",spellCheck:T.spellCheck||!1},T)),(x||m)&&e("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"4px",fontSize:"12px",lineHeight:"18px",color:a?"#98A2B3":"#78716C",fontFamily:"DM Sans, sans-serif"},children:m?t("span",{children:[G," / ",m]}):e("span",{children:G})})]})]})});ve.displayName="Textarea";var xe=function(n){var o=n.checked,r=n.defaultChecked,l=void 0!==r&&r,a=n.disabled,s=void 0!==a&&a,d=n.onChange,c=n.onClick,u=n.checkedChildren,p=n.unCheckedChildren,f=n.size,g=void 0===f?"default":f,v=n.loading,x=void 0!==v&&v,m=n.className,y=void 0===m?"":m,b=n.style,w=C().primaryColor,F=void 0===w?"#FB6011":w,k=i.useState(l),S=k[0],E=k[1],A=void 0!==o,z=A?o:S,L={small:{width:"36px",height:"20px",thumbSize:"16px",thumbOffset:"2px",fontSize:"10px"},default:{width:"44px",height:"24px",thumbSize:"20px",thumbOffset:"2px",fontSize:"12px"}}[g],D=z||x,B=s?"#E7E5E4":D?F:"#F5F5F4",M=D?"calc(100% - ".concat(L.thumbSize," - ").concat(L.thumbOffset,")"):L.thumbOffset;return t("button",{type:"button",role:"switch","aria-checked":z,disabled:s||x,onClick:function(e){if(!s&&!x){var t=!z;A||E(t),null==d||d(t,e),null==c||c(t,e)}},className:"aha-switch ".concat(y),style:h({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:D?"flex-end":"flex-start",width:L.width,height:L.height,padding:"0",margin:"0",border:"none",borderRadius:"small"===g?"10px":"12px",backgroundColor:B,cursor:s||x?"not-allowed":"pointer",transition:"all 0.2s",outline:"none",boxSizing:"border-box"},b),children:[(u||p)&&e("span",{style:{position:"absolute",left:D?"6px":"auto",right:D?"auto":"6px",fontSize:L.fontSize,lineHeight:"1",color:"#FFFFFF",fontFamily:"DM Sans, sans-serif",fontWeight:500,transition:"opacity 0.2s",opacity:s?.5:1,zIndex:1,pointerEvents:"none"},children:D?u:p}),e("span",{style:{position:"absolute",left:M,top:"50%",transform:"translateY(-50%)",width:L.thumbSize,height:L.thumbSize,borderRadius:"50%",backgroundColor:"#FFFFFF",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)",transition:"left 0.2s, background-color 0.2s",display:"flex",alignItems:"center",justifyContent:"center",zIndex:2},children:x&&t("svg",{width:"small"===g?"8":"10",height:"small"===g?"8":"10",viewBox:"0 0 24 24",fill:"none",style:{animation:"spin 1s linear infinite"},children:[e("style",{children:"\n @keyframes spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n "}),e("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"32",opacity:"0.3"}),e("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"24"})]})})]})};xe.displayName="Switch";var me=function(o){var l,u=o.value,p=o.defaultValue,g=o.options,v=void 0===g?[]:g,x=o.mode,y=o.disabled,b=void 0!==y&&y,w=o.error,F=void 0!==w&&w,k=o.placeholder,S=void 0===k?"Please select":k,E=o.size,A=void 0===E?"medium":E,z=o.showSearch,L=void 0!==z&&z,D=o.filterOption,B=void 0===D||D,M=o.allowClear,T=void 0!==M&&M,W=o.onChange,N=o.onSelect,I=o.onDeselect,j=o.onSearch,R=o.onFocus,H=o.onBlur,O=o.onDropdownVisibleChange,P=o.className,V=void 0===P?"":P,q=o.style,Z=o.dropdownClassName,K=void 0===Z?"":Z,Y=o.dropdownStyle,X=o.defaultOpen,G=void 0!==X&&X,_=o.open,U=o.maxTagCount,J=o.tagRender,Q=o.optionRender,$=C().primaryColor,ee=void 0===$?"#FB6011":$,te=a(void 0!==p?p:x?[]:void 0),ne=te[0],ie=te[1],oe=a(G),re=oe[0],le=oe[1],ae=a(""),se=ae[0],de=ae[1],ce=a(-1),ue=ce[0],pe=ce[1],fe=c(null),he=c(null),ge=c(null),ve=a(null),xe=ve[0],me=ve[1],ye=void 0!==u,be=void 0!==_,we=ye?u:ne,Ce=be?_:re,Fe="multiple"===x||"tags"===x,ke=d(function(){if(!we)return[];var e=Array.isArray(we)?we:[we];return v.filter(function(t){return e.includes(t.value)})},[we,v]),Se=d(function(){return L&&se?!1===B?v:"function"==typeof B?v.filter(function(e){return B(se,e)}):v.filter(function(e){var t=String(e.label||"").toLowerCase(),n=se.toLowerCase();return t.includes(n)}):v},[v,se,L,B]),Ee=r(function(){return Se()},[Se]);s(function(){if(Ce&&fe.current){var e=function(){if(fe.current){var e=fe.current.getBoundingClientRect();me({top:e.bottom+window.scrollY+4,left:e.left+window.scrollX,width:e.width})}};return e(),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),function(){window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}}me(null)},[Ce]),s(function(){var e=function(e){var t=e.target;fe.current&&!fe.current.contains(t)&&ge.current&&!ge.current.contains(t)&&(be||le(!1),null==O||O(!1),de(""))};if(Ce)return document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,!0),function(){document.removeEventListener("mousedown",e,!0),document.removeEventListener("touchstart",e,!0)}},[Ce,be,O]),s(function(){if(Ce){var e=function(e){var t;if("ArrowDown"===e.key)e.preventDefault(),pe(function(e){return e<Ee.length-1?e+1:e});else if("ArrowUp"===e.key)e.preventDefault(),pe(function(e){return e>0?e-1:0});else if("Enter"===e.key&&ue>=0){e.preventDefault();var n=Ee[ue];n&&!n.disabled&&Ae(n)}else"Escape"===e.key&&(e.preventDefault(),be||le(!1),null==O||O(!1),null===(t=fe.current)||void 0===t||t.focus())};return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}},[Ce,Ee,ue,be,O]),s(function(){if(ue>=0&&ge.current){var e=ge.current.querySelectorAll(".aha-select-option")[ue];e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})}},[ue]);var Ae=d(function(e){var t;if(!e.disabled)if(Fe){var n,i=Array.isArray(we)?we:[];i.includes(e.value)?(n=i.filter(function(t){return t!==e.value}),null==I||I(e.value,e)):(n=m(m([],i,!0),[e.value],!1),null==N||N(e.value,e)),ye||ie(n);var o=v.filter(function(e){return n.includes(e.value)});null==W||W(n,o)}else ye||ie(e.value),null==W||W(e.value,e),null==N||N(e.value,e),be||le(!1),null==O||O(!1),de(""),null===(t=fe.current)||void 0===t||t.focus()},[Fe,we,ye,be,v,W,N,I,O]),ze=d(function(e,t){if(e.stopPropagation(),Fe&&Array.isArray(we)){var n=we.filter(function(e){return e!==t}),i=v.find(function(e){return e.value===t});ye||ie(n),null==W||W(n,ke()),null==I||I(t,i)}},[Fe,we,ye,v,W,I,ke]),Le=function(e){e.stopPropagation();var t=Fe?[]:void 0;ye||ie(t),null==W||W(t,[]),de("")},De={small:{height:"32px",paddingTop:"3px",paddingBottom:"3px",fontSize:"16px",lineHeight:"24px"},mediumSmall:{height:"36px",paddingTop:"5px",paddingBottom:"5px",fontSize:"16px",lineHeight:"24px"},medium:{height:"40px",paddingTop:"7px",paddingBottom:"7px",fontSize:"16px",lineHeight:"24px"},large:{height:"48px",paddingTop:"11px",paddingBottom:"11px",fontSize:"16px",lineHeight:"24px"}},Be=r(function(){return ke()},[ke]),Me=r(function(){return T&&we&&!b},[T,we,b]),Te=r(function(){return Fe?Array.isArray(we)&&we.length>0:null!=we&&""!==we},[Fe,we]),We=r(function(){if(!Fe||!Array.isArray(we)||0===we.length)return null;var n="responsive"===U?Be.slice(0,2):U?Be.slice(0,U):Be,o=U&&Be.length>n.length?Be.length-n.length:0;return t("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"4px",flex:1,minWidth:0},children:[n.map(function(n){var o={label:n.label,value:n.value,closable:!b,onClose:function(){return ze({},n.value)}};return J?e(i.Fragment,{children:J(o)},n.value):t("span",{style:{display:"inline-flex",alignItems:"center",gap:"4px",padding:"2px 8px",backgroundColor:"#F5F5F4",borderRadius:"4px",fontSize:"12px",lineHeight:"18px",color:"#101828",fontFamily:"DM Sans, sans-serif",maxWidth:"100%"},children:[e("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n.label}),!b&&e("span",{onClick:function(e){return ze(e,n.value)},style:{cursor:"pointer",display:"flex",alignItems:"center",color:"#78716C",marginLeft:"4px"},children:e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]},n.value)}),o>0&&t("span",{style:{fontSize:"12px",lineHeight:"18px",color:"#78716C",fontFamily:"DM Sans, sans-serif"},children:["+",o]})]})},[Fe,we,Be,U,b,J]);return t(n,{children:[e("style",{children:"\n @keyframes dropdownFadeIn {\n from {\n opacity: 0;\n transform: translateY(-8px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n }\n "}),t("div",{ref:fe,className:"aha-select ".concat(V),style:h({position:"relative",display:"inline-flex",alignItems:"center",width:"100%",minWidth:"120px",boxSizing:"border-box",fontFamily:"DM Sans, sans-serif",borderRadius:"8px",border:"1px solid ".concat(F?"#F04438":Ce?ee:"#D7D3D0"),backgroundColor:b?"#FAFAF9":"#FFFFFF",cursor:b?"not-allowed":"pointer",transition:"all 0.2s",paddingLeft:"12px",paddingRight:"36px",paddingTop:De[A].paddingTop,paddingBottom:De[A].paddingBottom,fontSize:De[A].fontSize,lineHeight:De[A].lineHeight,fontWeight:400,WebkitTapHighlightColor:"transparent",WebkitTouchCallout:"none",touchAction:"manipulation",userSelect:"none"},q),onClick:function(){if(!b){var e=!Ce;be||le(e),null==O||O(e),e&&L?setTimeout(function(){var e;null===(e=he.current)||void 0===e||e.focus()},0):de("")}},onFocus:function(e){null==R||R(e)},onBlur:function(e){null==H||H(e)},onTouchStart:function(e){b||(e.currentTarget.style.opacity="0.8")},onTouchEnd:function(e){e.currentTarget.style.opacity="1"},tabIndex:b?-1:0,children:[e("div",{style:{display:"flex",alignItems:"center",flex:1,minWidth:0,gap:"8px"},children:Fe?We||e("span",S?{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"#79716B",fontSize:"16px",lineHeight:"24px",fontWeight:400},children:S}:{style:{flex:1,minHeight:"24px"}}):L&&Ce?e("input",{ref:he,type:"text",value:se,onChange:function(e){var t=e.target.value;de(t),null==j||j(t),pe(-1)},onClick:function(e){return e.stopPropagation()},onFocus:function(e){return e.stopPropagation()},style:{flex:1,border:"none",outline:"none",background:"transparent",fontSize:"16px",lineHeight:"24px",fontWeight:400,color:b?"#98A2B3":"#1C1917",fontFamily:"DM Sans, sans-serif",minWidth:0,WebkitAppearance:"none",appearance:"none"},placeholder:Te?void 0:S,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1}):e("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:Te?b?"#98A2B3":"#1C1917":"#79716B",fontSize:"16px",lineHeight:"24px",fontWeight:400,minHeight:"24px",display:"inline-block"},children:Te?(null===(l=Be[0])||void 0===l?void 0:l.label)||we:S||" "})}),t("div",{style:{position:"absolute",right:"12px",display:"flex",alignItems:"center",gap:"4px"},children:[Me&&e(function(){return e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:Le,style:{cursor:"pointer",flexShrink:0,color:"#78716C"},children:e("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},{}),e(function(t){var n=t.isOpen;return e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:n?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease-in-out",flexShrink:0},children:e("path",{d:"M4 6L8 10L12 6",stroke:"#78716C",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},{isOpen:Ce})]})]}),Ce&&xe&&f(e("div",{ref:ge,className:"aha-select-dropdown ".concat(K),style:h({position:"absolute",top:"".concat(xe.top,"px"),left:"".concat(xe.left,"px"),width:"".concat(xe.width,"px"),zIndex:1050,backgroundColor:"#FFFFFF",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",border:"1px solid #E7E5E4",maxHeight:"256px",overflow:"auto",opacity:0,transform:"translateY(-8px)",animation:"dropdownFadeIn 0.2s ease-out forwards",WebkitOverflowScrolling:"touch",overscrollBehavior:"contain"},Y),children:0===Ee.length?e("div",{style:{padding:"8px 16px",textAlign:"center",color:"#78716C",fontSize:"14px",fontFamily:"DM Sans, sans-serif"},children:"No data"}):Ee.map(function(n,i){var o=Fe?Array.isArray(we)&&we.includes(n.value):we===n.value,r=i===ue;return Q?e("div",{className:"aha-select-option ".concat(n.disabled?"":"hover:bg-[#FAFAF9]"," ").concat(o?"bg-[#FAFAF9]":""),onClick:function(){return!n.disabled&&Ae(n)},style:{cursor:n.disabled?"not-allowed":"pointer",transition:"background-color 0.2s"},children:Q(n,{selected:o,focused:r,disabled:n.disabled||!1})},n.value):t("div",{className:"aha-select-option ".concat(n.disabled?"":"hover:bg-[#FAFAF9]"," ").concat(o?"bg-[#FAFAF9]":""),onClick:function(){return Ae(n)},style:{padding:"8px 16px",cursor:n.disabled?"not-allowed":"pointer",color:n.disabled?"#98A2B3":"#101828",fontSize:"14px",lineHeight:"20px",fontFamily:"DM Sans, sans-serif",display:"flex",alignItems:"center",justifyContent:"space-between",transition:"background-color 0.2s"},children:[e("span",{children:n.label}),o&&e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r?"hidden":"",children:e("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:ee,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]},n.value)})}),document.body)]})};me.displayName="Select";var ye=o(null),be=i.forwardRef(function(t,n){var i=t.initialValues,o=void 0===i?{}:i,l=t.onValuesChange,u=t.onFinish,f=t.onFinishFailed,g=t.labelWidth,m=void 0===g?"120px":g,y=t.labelAlign,b=void 0===y?"right":y,w=t.layout,C=void 0===w?"horizontal":w;t.size;var F=t.className,k=void 0===F?"":F,S=t.style,E=t.children,A=a(function(){var e={};return Object.keys(o).forEach(function(t){e[t]={value:o[t],error:void 0,touched:!1,validating:!1}}),e}),z=A[0],L=A[1],D=c(z);s(function(){D.current=z},[z]);var B=d(function(e){var t;return null===(t=D.current[e])||void 0===t?void 0:t.value},[]),M=d(function(e,t){L(function(n){var i=h({},n);if(i[e]?i[e]=h(h({},i[e]),{value:t}):i[e]={value:t,error:void 0,touched:!1,validating:!1},D.current[e]?D.current[e]=h(h({},D.current[e]),{value:t}):D.current[e]={value:t,error:void 0,touched:!1,validating:!1},l){var o={};o[e]=t;var r={};Object.keys(i).forEach(function(e){r[e]=i[e].value}),l(o,r)}return i})},[l]),T=d(function(e){var t;return null===(t=D.current[e])||void 0===t?void 0:t.error},[]),W=d(function(e,t){D.current[e]&&(D.current[e]=h(h({},D.current[e]),{error:t})),L(function(n){var i=h({},n);return i[e]?i[e]=h(h({},i[e]),{error:t}):i[e]={value:void 0,error:t,touched:!1,validating:!1},i})},[]),N=d(function(e){var t;return(null===(t=D.current[e])||void 0===t?void 0:t.touched)||!1},[]),I=d(function(e,t){D.current[e]&&(D.current[e]=h(h({},D.current[e]),{touched:t})),L(function(n){var i=h({},n);return i[e]?i[e]=h(h({},i[e]),{touched:t}):i[e]={value:void 0,error:void 0,touched:t,validating:!1},i})},[]),j=d(function(e){var t;return(null===(t=D.current[e])||void 0===t?void 0:t.validating)||!1},[]),R=d(function(e,t){D.current[e]&&(D.current[e]=h(h({},D.current[e]),{validating:t})),L(function(n){var i=h({},n);return i[e]?i[e]=h(h({},i[e]),{validating:t}):i[e]={value:void 0,error:void 0,touched:!1,validating:t},i})},[]),H=c();H.current=function(e,t){L(function(n){if(n[e]){var i=n[e].rules||[],r=t.rules||[],l=i.length===r.length;if(l&&i.length>0)for(var a=0;a<i.length;a++){var s=i[a],d=r[a];if((null==s?void 0:s.required)!==(null==d?void 0:d.required)||(null==s?void 0:s.message)!==(null==d?void 0:d.message)||(null==s?void 0:s.type)!==(null==d?void 0:d.type)||(null==s?void 0:s.pattern)!==(null==d?void 0:d.pattern)||(null==s?void 0:s.min)!==(null==d?void 0:d.min)||(null==s?void 0:s.max)!==(null==d?void 0:d.max)||(null==s?void 0:s.len)!==(null==d?void 0:d.len)||(null==s?void 0:s.whitespace)!==(null==d?void 0:d.whitespace)){l=!1;break}}if(l&&n[e].required===t.required)return n}var c=h({},n);return c[e]?c[e]=h(h({},c[e]),{rules:t.rules,required:t.required}):c[e]={value:o[e],error:void 0,touched:!1,validating:!1,rules:t.rules,required:t.required},c})};var O=d(function(e,t){var n;null===(n=H.current)||void 0===n||n.call(H,e,t)},[]),P=d(function(e){L(function(t){var n=h({},t);return delete n[e],n})},[]),V=d(function(e){return v(void 0,void 0,void 0,function(){var t,n,i,o,r,l,a,s,d;return x(this,function(c){switch(c.label){case 0:if(!(t=D.current[e]))return[2,void 0];R(e,!0),n=t.rules||[],o=0,r=n,c.label=1;case 1:if(!(o<r.length))return[3,6];if(l=r[o],a=t.value,l.required&&(null==a||""===a))return i=l.message||"".concat(e," is required"),[3,6];if(l.type&&null!=a&&""!==a&&(s={string:function(e){return"string"==typeof e},number:function(e){return"number"==typeof e&&!isNaN(e)},boolean:function(e){return"boolean"==typeof e},email:function(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(e))},url:function(e){try{return new URL(String(e)),!0}catch(e){return!1}}}[l.type])&&!s(a))return i=l.message||"".concat(e," must be a valid ").concat(l.type),[3,6];if(l.pattern&&null!=a&&""!==a&&!l.pattern.test(String(a)))return i=l.message||"".concat(e," format is invalid"),[3,6];if(void 0!==l.min&&null!=a&&""!==a&&("string"==typeof a?a.length:Number(a))<l.min)return i=l.message||"".concat(e," must be at least ").concat(l.min),[3,6];if(void 0!==l.max&&null!=a&&""!==a&&("string"==typeof a?a.length:Number(a))>l.max)return i=l.message||"".concat(e," must be at most ").concat(l.max),[3,6];if(void 0!==l.len&&null!=a&&""!==a&&("string"==typeof a?a.length:Number(a))!==l.len)return i=l.message||"".concat(e," must be exactly ").concat(l.len),[3,6];if(l.whitespace&&"string"==typeof a&&a.trim()!==a)return i=l.message||"".concat(e," cannot be whitespace"),[3,6];if(!l.validator)return[3,5];c.label=2;case 2:return c.trys.push([2,4,,5]),[4,l.validator(l,a)];case 3:return c.sent(),[3,5];case 4:return d=c.sent(),i=(null==d?void 0:d.message)||l.message||"".concat(e," validation failed"),[3,6];case 5:return o++,[3,1];case 6:return D.current[e]?D.current[e]=h(h({},D.current[e]),{error:i,validating:!1,touched:!0}):D.current[e]={value:t.value,error:i,touched:!0,validating:!1,rules:t.rules,required:t.required},L(function(n){var o=h({},n);return o[e]?o[e]=h(h({},o[e]),{error:i,validating:!1,touched:!0}):o[e]={value:t.value,error:i,touched:!0,validating:!1,rules:t.rules,required:t.required},o}),[2,i]}})})},[]),q=d(function(e){var t=D.current,n={};return(e||Object.keys(t)).forEach(function(e){var i;n[e]=null===(i=t[e])||void 0===i?void 0:i.value}),n},[]),Z=d(function(e){return v(void 0,void 0,void 0,function(){var t,n,i,o;return x(this,function(r){switch(r.label){case 0:return t=D.current,n=e||Object.keys(t),i=[],[4,Promise.all(n.map(function(e){return v(void 0,void 0,void 0,function(){var n,i;return x(this,function(o){switch(o.label){case 0:return(n=t[e])&&n.rules&&n.rules.length>0?[4,V(e)]:[3,2];case 1:return i=o.sent(),[2,{name:e,error:i}];case 2:return[2,{name:e,error:void 0}]}})})}))];case 1:return r.sent().forEach(function(e){var t=e.name,n=e.error;n&&i.push({name:t,errors:[n]})}),[4,new Promise(function(e){return requestAnimationFrame(function(){setTimeout(e,0)})})];case 2:if(r.sent(),i.length>0)throw o={values:q(),errorFields:i},null==f||f(o),o;return[2,q()]}})})},[V,q,f]),K=d(function(e){L(function(t){var n=h({},t);return(e||Object.keys(n)).forEach(function(e){n[e]&&(n[e]=h(h({},n[e]),{value:o[e],error:void 0,touched:!1,validating:!1}))}),n})},[o]),Y=d(function(e){L(function(t){var n=h({},t);if(Object.keys(e).forEach(function(t){n[t]?n[t]=h(h({},n[t]),{value:e[t]}):n[t]={value:e[t],error:void 0,touched:!1,validating:!1}}),l){var i={};Object.keys(n).forEach(function(e){i[e]=n[e].value}),l(e,i)}return n})},[l]),X=d(function(){return v(void 0,void 0,void 0,function(){var e;return x(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,Z()];case 1:return e=t.sent(),null==u||u(e),[2,e];case 2:throw t.sent();case 3:return[2]}})})},[Z,u]);p(n,function(){return{getFieldValue:B,getFieldsValue:q,setFieldValue:M,setFieldsValue:Y,getFieldError:T,validateField:V,validateFields:Z,resetFields:K,submit:X}});var G=r(function(){return{fields:z,getFieldValue:B,setFieldValue:M,getFieldError:T,setFieldError:W,isFieldTouched:N,setFieldTouched:I,isFieldValidating:j,setFieldValidating:R,registerField:O,unregisterField:P,validateField:V,validateFields:Z,resetFields:K,getFieldsValue:q,setFieldsValue:Y,submit:X,labelWidth:m,labelAlign:b}},[z,B,M,T,W,N,I,j,R,O,P,V,Z,K,q,Y,X,m,b]),_=h({},S);return"vertical"===C?(_.display="flex",_.flexDirection="column"):"inline"===C&&(_.display="inline-flex",_.flexWrap="wrap",_.gap="16px"),e(ye.Provider,{value:G,children:e("form",{className:"aha-form ".concat(k),style:_,onSubmit:function(e){return v(void 0,void 0,void 0,function(){var t;return x(this,function(n){switch(n.label){case 0:e.preventDefault(),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,Z()];case 2:return t=n.sent(),null==u||u(t),[3,4];case 3:return n.sent(),[3,4];case 4:return[2]}})})},children:E})})});be.displayName="Form";var we=be;we.Item=function(n){var o=n.name,a=n.label,d=n.htmlFor;n.labelCol,n.wrapperCol;var u=n.required,p=void 0!==u&&u,f=n.rules,g=void 0===f?[]:f;n.hasFeedback;var v=n.validateStatus,x=n.help,m=n.extra,y=n.className,b=void 0===y?"":y,w=n.style,C=n.children;n.labelAlign,n.labelWidth;var F=n.hidden,k=void 0!==F&&F,S=n.tooltip,E=l(ye),A=c(null),z=(null==E?void 0:E.fields)||{};o&&E&&E.getFieldValue(o);var L=o&&E?E.getFieldError(o):void 0,D=!(!o||!E)&&E.isFieldTouched(o),B=!(!o||!E)&&E.isFieldValidating(o);o&&z[o];var M=v||(L?"error":B?"validating":D&&!L?"success":void 0),T=void 0!==x?x:L||void 0,W=c(g),N=c(p),I=c(!1),j=p||g.some(function(e){return e.required}),R=r(function(){if(!I.current)return I.current=!0,!0;if(W.current.length!==g.length)return!0;if(W.current===g)return!1;for(var e=0;e<g.length;e++){var t=W.current[e],n=g[e];if((null==t?void 0:t.required)!==(null==n?void 0:n.required)||(null==t?void 0:t.message)!==(null==n?void 0:n.message)||(null==t?void 0:t.type)!==(null==n?void 0:n.type)||(null==t?void 0:t.pattern)!==(null==n?void 0:n.pattern)||(null==t?void 0:t.min)!==(null==n?void 0:n.min)||(null==t?void 0:t.max)!==(null==n?void 0:n.max)||(null==t?void 0:t.len)!==(null==n?void 0:n.len)||(null==t?void 0:t.whitespace)!==(null==n?void 0:n.whitespace))return!0}return!1},[g]);s(function(){if(o&&E)return(!W.current||R||N.current!==p)&&(W.current=g,N.current=p,E.registerField(o,{rules:g,required:j})),function(){o&&E&&E.unregisterField(o)}},[o]);if(k)return null;return t("div",{ref:A,className:"aha-form-item ".concat(b),style:h({display:"flex",flexDirection:"column",marginBottom:"16px"},w),children:[a&&t("label",{htmlFor:d,style:{display:"flex",alignItems:"center",marginBottom:"6px",fontSize:"14px",lineHeight:"20px",color:"#44403C",fontFamily:"DM Sans, sans-serif",fontWeight:500},children:[a,j&&e("span",{style:{color:"#EC470A",marginLeft:"4px"},children:"*"}),S&&e(function(n){var o=n.content,r=i.useState(!1),l=r[0],a=r[1],s=i.useRef(null);return i.useEffect(function(){var e=function(e){s.current&&!s.current.contains(e.target)&&a(!1)};if(l)return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}},[l]),t("div",{style:{position:"relative",display:"inline-block",marginLeft:"4px"},children:[e("div",{onClick:function(e){e.stopPropagation(),a(!l)},style:{display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"#A9A29D"},children:e(re,{})}),l&&t("div",{ref:s,style:{position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"4px",padding:"8px 12px",backgroundColor:"#1C1917",color:"#FFFFFF",fontSize:"12px",lineHeight:"18px",fontFamily:"DM Sans, sans-serif",borderRadius:"6px",whiteSpace:"nowrap",zIndex:1e3,boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)"},children:[o,e("div",{style:{position:"absolute",top:"-4px",left:"50%",transform:"translateX(-50%)",width:0,height:0,borderLeft:"4px solid transparent",borderRight:"4px solid transparent",borderBottom:"4px solid #1C1917"}})]})]})},{content:S})]}),t("div",{style:{width:"100%"},children:[e("div",{children:i.Children.map(C,function(e){return i.isValidElement(e)?function(e){var t,n,r,l,a,s,d,c,u;if(!i.isValidElement(e))return e;var p=h({},e.props);if(o&&E){var f=E.getFieldValue(o),g=E.setFieldValue;if(!g)return e;if(e.type&&"object"==typeof e.type&&"displayName"in e.type){var v=e.type.displayName;if("Input"===v||"Textarea"===v){p.value=f||"";var x=null===(t=e.props)||void 0===t?void 0:t.onChange,m=null===(n=e.props)||void 0===n?void 0:n.onBlur;p.onChange=function(e){g(o,e.target.value),null==x||x(e),o&&E&&setTimeout(function(){E.validateField(o)},0)},p.onBlur=function(e){o&&E&&(E.setFieldTouched(o,!0),E.validateField(o)),null==m||m(e)},p.error="error"===M}else if("Select"===v){p.value=f;var y=null===(r=e.props)||void 0===r?void 0:r.onChange,b=null===(l=e.props)||void 0===l?void 0:l.onBlur;p.onChange=function(e,t){g(o,e),null==y||y(e,t),o&&E&&(E.setFieldTouched(o,!0),setTimeout(function(){E.validateField(o)},0))},p.onBlur=function(e){o&&E&&(E.setFieldTouched(o,!0),E.validateField(o)),null==b||b(e)},p.error="error"===M}else if("Switch"===v){p.checked=f||!1;var w=null===(a=e.props)||void 0===a?void 0:a.onChange;p.onChange=function(e,t){g(o,e),null==w||w(e,t),o&&E&&(E.setFieldTouched(o,!0),setTimeout(function(){E.validateField(o)},0))}}else if("Checkbox"===v){p.checked=f||!1;var C=null===(s=e.props)||void 0===s?void 0:s.onChange;p.onChange=function(e){g(o,e.target.checked),null==C||C(e),o&&E&&(E.setFieldTouched(o,!0),setTimeout(function(){E.validateField(o)},0))}}else if("Radio"===v){var F=null===(d=e.props)||void 0===d?void 0:d.value;if(void 0!==F){p.checked=f===F;var k=null===(c=e.props)||void 0===c?void 0:c.onChange;p.onChange=function(e){g(o,F),null==k||k(e),o&&E&&(E.setFieldTouched(o,!0),setTimeout(function(){E.validateField(o)},0))}}}}else{void 0!==f&&(p.value=f);var S=null===(u=e.props)||void 0===u?void 0:u.onChange;p.onChange=function(e){var t,n,i=null!==(n=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.value)&&void 0!==n?n:e;g(o,i),null==S||S(e)}}}return"error"===M&&"error"in p&&(p.error=!0),i.cloneElement(e,p)}(e):e})}),T&&e("div",{style:{marginTop:"6px",fontSize:"14px",lineHeight:"20px",fontWeight:400,color:"error"===M?"#D92D20":"warning"===M?"#F59E0B":"#78716C",fontFamily:"DM Sans, sans-serif"},children:T}),m&&!T&&e("div",{style:{marginTop:"4px",fontSize:"12px",lineHeight:"18px",color:"#78716C",fontFamily:"DM Sans, sans-serif"},children:m})]})]})};var Ce=function(n){var o=n.items,r=void 0===o?[]:o,l=n.userProfile,s=n.selectedKeys,u=n.defaultSelectedKeys,p=void 0===u?[]:u,f=n.onSelect,g=n.onDeselect,v=n.onClick,x=n.className,y=void 0===x?"":x,b=n.style,w=n.width,F=void 0===w?320:w;C().primaryColor;var k=c(null),S=c({}),E=void 0!==s,A=a(p),z=A[0],L=A[1],D=E?s:z,B=function(e){return"children"in e&&Array.isArray(e.children)},M=d(function(e,t,n){void 0===n&&(n=[]);for(var i=0,o=t;i<o.length;i++){var r=o[i];if(B(r)){var l=M(e,r.children,n);if(l)return l}else{var a=r,s=m(m([],n,!0),[a.key],!1);if(a.key===e)return s}}return null},[]),T=d(function(e){var t;if(!e.disabled){var n,i=M(e.key,r)||[e.key];D.includes(e.key)?(n=D.filter(function(t){return t!==e.key}),null==g||g({key:e.key,keyPath:i,selectedKeys:n})):(n=[e.key],null==f||f({key:e.key,keyPath:i,selectedKeys:n})),E||L(n),null===(t=e.onClick)||void 0===t||t.call(e,{key:e.key,keyPath:i}),e.skipGlobalClick||null==v||v({key:e.key,keyPath:i})}},[D,E,f,g,v,r,M]),W=function(n){var i=D.includes(n.key);if(n.render)return e("div",{className:n.className,style:n.style,children:n.render(n,i)},n.key);var o=h({display:"flex",alignItems:"center",padding:"10px 16px",cursor:n.disabled?"not-allowed":"pointer",fontSize:"14px",lineHeight:"20px",fontFamily:"DM Sans, sans-serif",color:n.disabled?"#98A2B3":n.danger?"#DC2626":"#101828",backgroundColor:"transparent",transition:"background-color 0.15s",opacity:n.disabled?.5:1},n.style);return t("div",{ref:function(e){S.current[n.key]=e},className:"aha-menu-item ".concat(n.className||""),style:o,onClick:function(){return T(n)},onMouseEnter:function(e){n.disabled||(e.currentTarget.style.backgroundColor="#F9FAFB")},onMouseLeave:function(e){e.currentTarget.style.backgroundColor="transparent"},children:[n.icon&&e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:"20px",height:"20px",marginRight:"12px",flexShrink:0,color:n.disabled?"#98A2B3":n.danger?"#DC2626":"#101828"},children:n.icon}),e("span",{style:{flex:1},children:n.label})]},n.key)},N=h({width:"number"==typeof F?"".concat(F,"px"):F,backgroundColor:"#FFFFFF",borderRadius:"12px",boxShadow:"0px 10px 38px rgba(22, 23, 24, 0.35), 0px 10px 20px rgba(22, 23, 24, 0.2)",overflow:"hidden",fontFamily:"DM Sans, sans-serif"},b),I=function(e,t){if(0===e)return!1;var n=t[e],i=t[e-1];return!!B(i)||!(!B(n)||B(i))};return t("div",{ref:k,className:"aha-menu-list ".concat(y),style:N,children:[l&&(l?l.render?l.render(l):e("div",{onClick:l.onClick,style:{padding:"16px",cursor:l.onClick?"pointer":"default",borderBottom:"1px solid #E7E5E4"},children:t("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[t("div",{style:{position:"relative",flexShrink:0},children:[l.avatar||e("div",{style:{width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"#F5F5F4",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"16px",color:"#78716C"},children:"string"==typeof l.name?l.name.charAt(0).toUpperCase():"U"}),void 0!==l.online&&e("div",{style:{position:"absolute",bottom:"0",right:"0",width:"12px",height:"12px",borderRadius:"50%",backgroundColor:l.online?"#10B981":"#9CA3AF",border:"2px solid #FFFFFF"}})]}),t("div",{style:{flex:1,minWidth:0},children:[e("div",{style:{fontSize:"14px",fontWeight:500,lineHeight:"20px",color:"#101828",fontFamily:"DM Sans, sans-serif",marginBottom:"2px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l.name}),l.email&&e("div",{style:{fontSize:"14px",lineHeight:"20px",color:"#78716C",fontFamily:"DM Sans, sans-serif",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l.email})]})]})}):null),e("div",{children:r.map(function(n,o){return t(i.Fragment,{children:[I(o,r)&&e("div",{style:{height:"1px",backgroundColor:"#E7E5E4",margin:"4px 0"}}),B(n)?(l=n,e("div",{className:"aha-menu-group ".concat(l.className||""),children:l.children.map(function(e){return W(e)})},"group-".concat(l.title))):W(n)]},o);var l})})]})};Ce.displayName="MenuList";var Fe=function(e,t,n,i){void 0===i&&(i=6);var o=window.scrollX||window.pageXOffset,r=window.scrollY||window.pageYOffset,l=e.left+e.width/2,a=e.top+e.height/2,s=i+6,d=0,c=0;switch(n){case"top":d=e.top-t.height-s+r,c=l-t.width/2+o;break;case"bottom":default:d=e.bottom+s+r,c=l-t.width/2+o;break;case"left":d=a-t.height/2+r,c=e.left-t.width-s+o;break;case"right":d=a-t.height/2+r,c=e.right+s+o;break;case"top-left":d=e.top-t.height-s+r,c=e.left+o;break;case"top-right":d=e.top-t.height-s+r,c=e.right-t.width+o;break;case"bottom-left":d=e.bottom+s+r,c=e.left+o;break;case"bottom-right":d=e.bottom+s+r,c=e.right-t.width+o}var u=window.innerWidth,p=window.innerHeight;return c<o+8?c=o+8:c+t.width>o+u-8&&(c=o+u-t.width-8),d<r+8?d=r+8:d+t.height>r+p-8&&(d=r+p-t.height-8),{top:d,left:c}},ke=function(e,t,n,i){void 0===i&&(i=6);var o=Fe(e,t,n,i),r=o.top,l=o.left,a=window.scrollX||window.pageXOffset,s=r-(window.scrollY||window.pageYOffset),d=l-a,c=s+t.height,u=d+t.width,p=s,f=d,h=Math.max(p,e.top),g=Math.min(c,e.bottom),v=Math.max(f,e.left),x=Math.min(u,e.right);return g>h+1&&x>v+1},Se=function(t,n){var i=h({position:"absolute",width:0,height:0,borderStyle:"solid"},n),o={top:h(h({},i),{borderWidth:"".concat(6,"px ").concat(6,"px 0 ").concat(6,"px"),borderColor:"#0C0A09 transparent transparent transparent"}),bottom:h(h({},i),{borderWidth:"0 ".concat(6,"px ").concat(6,"px ").concat(6,"px"),borderColor:"transparent transparent #0C0A09 transparent"}),left:h(h({},i),{borderWidth:"".concat(6,"px 0 ").concat(6,"px ").concat(6,"px"),borderColor:"transparent transparent transparent #0C0A09"}),right:h(h({},i),{borderWidth:"".concat(6,"px ").concat(6,"px ").concat(6,"px 0"),borderColor:"transparent #0C0A09 transparent transparent"}),"top-left":h(h({},i),{borderWidth:"".concat(6,"px ").concat(6,"px 0 ").concat(6,"px"),borderColor:"#0C0A09 transparent transparent transparent"}),"top-right":h(h({},i),{borderWidth:"".concat(6,"px ").concat(6,"px 0 ").concat(6,"px"),borderColor:"#0C0A09 transparent transparent transparent"}),"bottom-left":h(h({},i),{borderWidth:"0 ".concat(6,"px ").concat(6,"px ").concat(6,"px"),borderColor:"transparent transparent #0C0A09 transparent"}),"bottom-right":h(h({},i),{borderWidth:"0 ".concat(6,"px ").concat(6,"px ").concat(6,"px"),borderColor:"transparent transparent #0C0A09 transparent"})};return e("div",{style:o[t]})},Ee=function(i){var o=i.content,r=i.children,l=i.position,u=void 0===l?"top":l,p=i.trigger,g=void 0===p?"hover":p,v=i.delay,x=void 0===v?200:v,m=i.disabled,y=void 0!==m&&m,b=i.className,w=void 0===b?"":b,C=i.tooltipClassName,F=void 0===C?"":C,k=i.gap,S=void 0===k?6:k,E=i.showArrow,A=void 0===E||E,z=i.width,L=i.defaultVisible,D=void 0!==L&&L,B=i.visible,M=i.onVisibleChange,T=void 0!==B,W=a(D),N=W[0],I=W[1],j=T?B:N,R=a(T?null!=B&&B:D),H=R[0],O=R[1],P=d(function(e){T||I(e),null==M||M(e)},[T,M]);s(function(){T&&(B?requestAnimationFrame(function(){O(!0)}):O(!1))},[T,B]);var V=a(u),q=V[0],Z=V[1],K=a("320px"),Y=K[0],X=K[1],G=a({position:"absolute",top:0,left:0,pointerEvents:"hover"===g?"auto":"none"}),_=G[0],U=G[1],J=a({}),Q=J[0],$=J[1],ee=c(null),te=c(null),ne=c(null),ie=c(null),oe=d(function(){if(ee.current&&te.current&&j&&H){var e=ee.current.getBoundingClientRect(),t=te.current.getBoundingClientRect(),n=function(e,t,n,i){if(void 0===i&&(i=6),!ke(e,t,n,i))return n;for(var o=0,r=function(e){switch(e){case"top":return["bottom","right","left"];case"bottom":return["top","right","left"];case"left":return["right","top","bottom"];case"right":return["left","top","bottom"];case"top-left":return["bottom-left","top-right","bottom-right","right","left"];case"top-right":return["bottom-right","top-left","bottom-left","left","right"];case"bottom-left":return["top-left","bottom-right","top-right","right","left"];case"bottom-right":return["top-right","bottom-left","top-left","left","right"];default:return[]}}(n);o<r.length;o++){var l=r[o];if(!ke(e,t,l,i))return l}return n}(e,t,u,S);Z(n);var i=Fe(e,t,n,S),o=i.top,r=i.left;if(U(function(e){return h(h({},e),{position:"absolute",top:"".concat(o,"px"),left:"".concat(r,"px"),pointerEvents:"hover"===g?"auto":"none",zIndex:9999})}),A){var l=function(e,t,n,i,o){var r=window.scrollX||window.pageXOffset,l=window.scrollY||window.pageYOffset,a=t.left+(t.width-6)/2,s=t.top+(t.height-6)/2,d=i-r,c=o-l;switch(e){case"top":return{bottom:-6,left:Math.min(Math.max(a-d,6),n.width-6)};case"bottom":return{top:-6,left:Math.min(Math.max(a-d,6),n.width-6)};case"left":return{right:-6,top:Math.min(Math.max(s-c,6),n.height-6)};case"right":return{left:-6,top:Math.min(Math.max(s-c,6),n.height-6)};case"top-left":return{bottom:-6,left:12};case"top-right":return{bottom:-6,right:12};case"bottom-left":return{top:-6,left:12};case"bottom-right":return{top:-6,right:12};default:return{}}}(n,e,t,r,o);$(l)}}},[j,u,S,A,H,g]),re=d(function(){y||(ie.current&&(clearTimeout(ie.current),ie.current=null),ne.current&&clearTimeout(ne.current),ne.current=setTimeout(function(){P(!0),T||requestAnimationFrame(function(){O(!0)})},x))},[y,x,P,T]),le=d(function(){ne.current&&(clearTimeout(ne.current),ne.current=null),ie.current&&clearTimeout(ie.current),T?P(!1):(O(!1),ie.current=setTimeout(function(){P(!1),ie.current=null},150))},[P,T]),ae=d(function(){"hover"===g&&(ie.current&&(clearTimeout(ie.current),ie.current=null),j||(P(!0),requestAnimationFrame(function(){O(!0)})))},[g,j]),se=d(function(e){y||"click"!==g||(e.stopPropagation(),j?le():(ne.current&&(clearTimeout(ne.current),ne.current=null),P(!0),requestAnimationFrame(function(){O(!0)})))},[y,g,j,le]);s(function(){if(D&&j&&H){var e=function(){ee.current&&te.current?oe():setTimeout(function(){requestAnimationFrame(e)},10)};setTimeout(function(){requestAnimationFrame(e)},0)}},[D,j,H,oe]),s(function(){if(j)return requestAnimationFrame(function(){oe()}),window.addEventListener("scroll",oe,!0),window.addEventListener("resize",oe),function(){window.removeEventListener("scroll",oe,!0),window.removeEventListener("resize",oe)}},[j,oe]),s(function(){if(j&&"click"===g){var e=function(e){ee.current&&te.current&&!ee.current.contains(e.target)&&!te.current.contains(e.target)&&le()};return document.addEventListener("mousedown",e,!0),function(){document.removeEventListener("mousedown",e,!0)}}},[j,g,le]),s(function(){return function(){ne.current&&clearTimeout(ne.current),ie.current&&clearTimeout(ie.current)}},[]);var de={position:"absolute",top:0,left:0,opacity:H?1:0,transform:H?"scale(1)":"scale(0.95)",transition:"opacity 150ms ease-out, transform 150ms ease-out",pointerEvents:"hover"===g?"auto":"none",zIndex:9999},ce=d(function(){return"undefined"==typeof window||window.innerWidth>=768?"320px":"calc(100vw - 32px)"},[]);s(function(){var e=function(){X(ce())};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[ce]);var ue=h(h({backgroundColor:"#0C0A09",color:"#FFFFFF",padding:"8px 12px",borderRadius:"6px",fontSize:"12px",fontWeight:400,fontFamily:"DM Sans, sans-serif",lineHeight:"16px"},void 0!==z?{width:"number"==typeof z?"".concat(z,"px"):z,maxWidth:"undefined"!=typeof window&&window.innerWidth<768?"calc(100vw - 32px)":void 0}:{maxWidth:Y,width:"max-content"}),{wordWrap:"break-word",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",whiteSpace:"pre-wrap",position:"relative",boxSizing:"border-box"}),pe=t("div",{style:h(h(h({},de),_),{pointerEvents:"hover"===g?"auto":"none"}),className:"aha-tooltip-wrapper ".concat(F),onMouseEnter:"hover"===g?ae:void 0,onMouseLeave:"hover"===g?le:void 0,children:[e("div",{ref:te,className:"aha-tooltip ".concat(F),style:ue,role:"tooltip",children:o}),A&&Se(q,Q)]}),fe=d(function(){"hover"===g&&(ie.current=setTimeout(function(){le()},100))},[g,le]),he="click"===g?{onClick:se}:{onMouseEnter:re,onMouseLeave:fe,onFocus:re,onBlur:le};return t(n,{children:[e("div",h({ref:ee,className:"aha-tooltip-trigger ".concat(w),style:{display:"inline-block",cursor:"click"===g?"pointer":"default"}},he,{children:r})),j&&"undefined"!=typeof document&&f(pe,document.body)]})};export{z as Alert,S as Button,Q as CheckIcon,ae as Checkbox,we as Form,ge as Input,Ce as MenuList,$ as MinusIcon,le as Pagination,he as Progress,pe as Radio,me as Select,xe as Switch,fe as Tab,ue as Table,J as Tag,ve as Textarea,w as ThemeProvider,N as Toast,G as ToastProvider,Ee as Tooltip,R as clearAllToasts,j as closeToast,H as debugToast,I as toast,P as toastError,V as toastInfo,q as toastQuestion,O as toastSuccess,C as useTheme};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|