aha-components 1.8.3 → 1.8.5
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/Avatar.esm.js +1 -1
- package/dist/Avatar.esm.js.map +1 -1
- package/dist/Avatar.js +1 -1
- package/dist/Avatar.js.map +1 -1
- package/dist/Badge.esm.js +1 -1
- package/dist/Badge.esm.js.map +1 -1
- package/dist/Badge.js +1 -1
- package/dist/Badge.js.map +1 -1
- package/dist/Button.esm.js +1 -1
- package/dist/Button.esm.js.map +1 -1
- package/dist/Button.js +1 -1
- package/dist/Button.js.map +1 -1
- package/dist/Checkbox.esm.js +1 -1
- package/dist/Checkbox.esm.js.map +1 -1
- package/dist/Checkbox.js +1 -1
- package/dist/Checkbox.js.map +1 -1
- package/dist/DatePicker.esm.js.map +1 -1
- package/dist/DatePicker.js.map +1 -1
- package/dist/Drawer.esm.js.map +1 -1
- package/dist/Drawer.js.map +1 -1
- package/dist/Form.esm.js.map +1 -1
- package/dist/Form.js.map +1 -1
- package/dist/Input.esm.js +1 -1
- package/dist/Input.esm.js.map +1 -1
- package/dist/Input.js +1 -1
- package/dist/Input.js.map +1 -1
- package/dist/Loading.esm.js +1 -1
- package/dist/Loading.esm.js.map +1 -1
- package/dist/Loading.js +1 -1
- package/dist/Loading.js.map +1 -1
- package/dist/MenuList.esm.js.map +1 -1
- package/dist/MenuList.js.map +1 -1
- package/dist/Pagination.esm.js +1 -1
- package/dist/Pagination.esm.js.map +1 -1
- package/dist/Pagination.js +1 -1
- package/dist/Pagination.js.map +1 -1
- package/dist/Popover.esm.js +1 -1
- package/dist/Popover.esm.js.map +1 -1
- package/dist/Popover.js +1 -1
- package/dist/Popover.js.map +1 -1
- package/dist/Progress.esm.js.map +1 -1
- package/dist/Progress.js.map +1 -1
- package/dist/Radio.esm.js +1 -1
- package/dist/Radio.esm.js.map +1 -1
- package/dist/Radio.js +1 -1
- package/dist/Radio.js.map +1 -1
- package/dist/Select.esm.js.map +1 -1
- package/dist/Select.js.map +1 -1
- package/dist/Switch.esm.js.map +1 -1
- package/dist/Switch.js.map +1 -1
- package/dist/Tab.esm.js.map +1 -1
- package/dist/Tab.js.map +1 -1
- package/dist/Table.esm.js +1 -1
- package/dist/Table.esm.js.map +1 -1
- package/dist/Table.js +1 -1
- package/dist/Table.js.map +1 -1
- package/dist/Tag.esm.js.map +1 -1
- package/dist/Tag.js.map +1 -1
- package/dist/Textarea.esm.js +1 -1
- package/dist/Textarea.esm.js.map +1 -1
- package/dist/Textarea.js +1 -1
- package/dist/Textarea.js.map +1 -1
- package/dist/Toast.esm.js.map +1 -1
- package/dist/Toast.js.map +1 -1
- package/dist/Tooltip.esm.js.map +1 -1
- package/dist/Tooltip.js.map +1 -1
- package/dist/components/Alert/icon.d.ts +5 -5
- package/dist/components/Badge/index.d.ts +2 -1
- package/dist/components/Button/index.d.ts +2 -2
- package/dist/components/Table/index.d.ts +1 -1
- package/dist/components/Toast/icon.d.ts +5 -5
- package/dist/components/shared/badgeColors.d.ts +25 -0
- package/dist/components/shared/buttonStyles.d.ts +18 -0
- package/dist/components/shared/colorUtils.d.ts +6 -0
- package/dist/components/shared/controlStyles.d.ts +27 -0
- package/dist/components/shared/fieldStyles.d.ts +37 -0
- package/dist/index.css +3848 -0
- package/dist/index.d.ts +29 -5
- package/dist/index.esm.css +3848 -0
- 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/dist/tokens.d.ts +14 -14
- package/package.json +1 -1
package/dist/Table.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as e,jsx as o,Fragment as n}from"react/jsx-runtime";import r,{createContext as t,useContext as i,useState as l,forwardRef as a,useRef as d,useEffect as s,useCallback as c,useMemo as u}from"react";import{createPortal as p}from"react-dom";var f=function(){return f=Object.assign||function(e){for(var o,n=1,r=arguments.length;n<r;n++)for(var t in o=arguments[n])Object.prototype.hasOwnProperty.call(o,t)&&(e[t]=o[t]);return e},f.apply(this,arguments)};function h(e,o){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&o.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(r=Object.getOwnPropertySymbols(e);t<r.length;t++)o.indexOf(r[t])<0&&Object.prototype.propertyIsEnumerable.call(e,r[t])&&(n[r[t]]=e[r[t]])}return n}function x(e,o,n){if(n||2===arguments.length)for(var r,t=0,i=o.length;t<i;t++)!r&&t in o||(r||(r=Array.prototype.slice.call(o,0,t)),r[t]=o[t]);return e.concat(r||Array.prototype.slice.call(o))}"function"==typeof SuppressedError&&SuppressedError;var v={primaryColor:"#FB6011"},g=t(v),m=function(){var e=i(g);return e||v},y={sm:"sm",md:"md",lg:"lg",xl:"xl",small:"sm",mediumSmall:"sm",medium:"md",large:"xl"},b={primary:"primary",secondary:"secondary",tertiary:"tertiary","link-color":"link-color","link-gray":"link-gray","destructive-primary":"destructive-primary","destructive-secondary":"destructive-secondary","destructive-tertiary":"destructive-tertiary","destructive-link":"destructive-link",default:"secondary"},w={sm:{height:36,paddingX:12,paddingXLg:12,fontSize:14,lineHeight:20,iconSize:20,gap:4,iconOnlyPad:8},md:{height:40,paddingX:14,paddingXLg:14,fontSize:14,lineHeight:20,iconSize:20,gap:4,iconOnlyPad:10},lg:{height:44,paddingX:16,paddingXLg:16,fontSize:16,lineHeight:24,iconSize:20,gap:6,iconOnlyPad:12},xl:{height:48,paddingX:18,paddingXLg:18,fontSize:16,lineHeight:24,iconSize:20,gap:6,iconOnlyPad:14}},k=function(r){var t=r.size,i=r.color;return e(n,{children:[o("style",{children:"@keyframes aha-button-spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}"}),e("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,style:{animation:"aha-button-spin 1s linear infinite",flexShrink:0},children:[o("circle",{cx:"12",cy:"12",r:"10",stroke:i,strokeWidth:"2",opacity:"0.25"}),o("path",{d:"M22 12a10 10 0 0 1-10 10",stroke:i,strokeWidth:"2",strokeLinecap:"round",fill:"none"})]})]})},S=function(n){var r=n.children,t=n.type,i=void 0===t?"secondary":t,a=n.size,d=void 0===a?"md":a,s=n.disabled,c=void 0!==s&&s,u=n.loading,p=void 0!==u&&u,x=n.iconOnly,v=n.focused,g=void 0!==v&&v,S=n.onClick,C=n.htmlType,z=void 0===C?"button":C,F=n.className,W=void 0===F?"":F,L=n.style,A=n.icon,I=n.iconPosition,B=void 0===I?"left":I,E=h(n,["children","type","size","disabled","loading","iconOnly","focused","onClick","htmlType","className","style","icon","iconPosition"]),j=m().primaryColor,N=l(!1),D=N[0],M=N[1],H=l(!1),R=H[0],T=H[1],O=b[i]||"secondary",P=w[y[d]||"md"],_=null!=x?x:!!A&&null==r,K="link-color"===O||"link-gray"===O||"destructive-link"===O,X=c||p,q=g,Y=j,V=function(){if(c)return"primary"===O||"secondary"===O||"destructive-primary"===O||"destructive-secondary"===O?{bg:"var(--color-bg-disabled, #f5f5f4)",color:"var(--color-fg-disabled, #a9a29d)",iconColor:"var(--color-fg-disabled, #a9a29d)",border:"1px solid var(--color-border-disabled_subtle, #e7e5e4)",boxShadow:"none"}:{bg:"transparent",color:"var(--color-fg-disabled, #a9a29d)",iconColor:"var(--color-fg-disabled, #a9a29d)",border:"none",boxShadow:"none"};var e=D||R;return"primary"===O?{bg:e?"var(--color-bg-brand-solid_hover, #ec470a)":Y||"var(--color-bg-brand-solid, #fb6011)",color:"var(--color-text-white, #ffffff)",iconColor:"var(--color-brand-300, #feb073)",border:"none",boxShadow:"var(--shadow-xs-skeuomorphic, 0 1px 2px 0 rgba(10,13,18,.05))"}:"secondary"===O?{bg:e?"var(--color-bg-primary_hover, #fafaf9)":"var(--color-bg-primary, #ffffff)",color:e?"var(--color-text-secondary_hover, #292524)":"var(--color-text-secondary, #44403c)",iconColor:e?"var(--color-fg-quaternary_hover, #79716b)":"var(--color-fg-quaternary, #a9a29d)",border:"none",boxShadow:"var(--shadow-xs-skeuomorphic)"}:"tertiary"===O?{bg:e?"var(--color-bg-primary_hover, #fafaf9)":"transparent",color:e?"var(--color-text-tertiary_hover, #44403c)":"var(--color-text-tertiary, #57534e)",iconColor:e?"var(--color-fg-quaternary_hover, #79716b)":"var(--color-fg-quaternary, #a9a29d)",border:"none",boxShadow:"none"}:"link-color"===O?{bg:"transparent",color:e?"var(--color-text-brand-secondary_hover, #c4330a)":"var(--color-text-brand-secondary, #ec470a)",iconColor:"var(--color-fg-brand-secondary_alt, #fb6011)",border:"none",boxShadow:"none",textDecoration:e?"underline":"none"}:"link-gray"===O?{bg:"transparent",color:e?"var(--color-text-tertiary_hover, #44403c)":"var(--color-text-tertiary, #57534e)",iconColor:"var(--color-fg-quaternary, #a9a29d)",border:"none",boxShadow:"none",textDecoration:e?"underline":"none"}:"destructive-primary"===O?{bg:e?"var(--color-error-600)":"var(--color-error-500)",color:"var(--color-text-white)",iconColor:e?"var(--color-error-200)":"var(--color-error-300)",border:"none",boxShadow:"var(--shadow-xs-skeuomorphic)"}:"destructive-secondary"===O?{bg:e?"var(--color-bg-error-primary)":"var(--color-bg-primary)",color:"var(--color-text-error-primary)",iconColor:"var(--color-fg-error-secondary)",border:"none",boxShadow:"inset 0 0 0 1px var(--color-border-error_subtle), inset 0 -2px 0 0 rgba(10,13,18,0.05), 0 1px 2px 0 rgba(10,13,18,0.05)"}:"destructive-tertiary"===O?{bg:e?"var(--color-bg-error-primary)":"transparent",color:"var(--color-text-error-primary)",iconColor:"var(--color-fg-error-secondary)",border:"none",boxShadow:"none"}:{bg:"transparent",color:e?"var(--color-text-error-primary_hover)":"var(--color-text-error-primary)",iconColor:"var(--color-fg-error-secondary)",border:"none",boxShadow:"none",textDecoration:e?"underline":"none"}}(),J=function(){if(q)return"destructive-primary"===O||"destructive-secondary"===O||"destructive-tertiary"===O||"destructive-link"===O?"destructive-primary"===O||"destructive-secondary"===O?"var(--focus-ring-error-shadow-xs-skeuomorphic)":"var(--focus-ring-error)":"primary"===O||"secondary"===O?"var(--focus-ring-shadow-xs-skeuomorphic, 0 0 0 2px #fff, 0 0 0 4px #fb6011)":"var(--focus-ring, 0 0 0 2px #fff, 0 0 0 4px #fb6011)"}(),Q=f({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:P.gap,fontFamily:'var(--font-family-body, "DM Sans", system-ui, sans-serif)',fontWeight:600,fontSize:P.fontSize,lineHeight:"".concat(P.lineHeight,"px"),cursor:X?"not-allowed":"pointer",outline:"none",transition:"background-color .15s ease, color .15s ease, box-shadow .15s ease",userSelect:"none",WebkitTapHighlightColor:"transparent",whiteSpace:"nowrap",backgroundColor:V.bg,color:V.color,border:V.border,boxShadow:null!=J?J:V.boxShadow,textDecoration:V.textDecoration},L);K?(Q.borderRadius="4px",Q.overflow="hidden",_?(Q.width=P.height,Q.height=P.height,Q.padding=0):(Q.height=P.height,Q.paddingLeft=P.paddingX,Q.paddingRight=P.paddingX)):(Q.borderRadius="var(--radius-md, 8px)",_?(Q.width=P.height,Q.height=P.height,Q.padding=0):(Q.height=P.height,Q.paddingLeft=P.paddingX,Q.paddingRight=P.paddingX));var G=function(){return p?o(k,{size:P.iconSize,color:V.iconColor}):A?o("span",{"aria-hidden":!0,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:P.iconSize,height:P.iconSize,color:V.iconColor,flexShrink:0},children:A}):null},U=p||A&&"left"===B,Z=!p&&A&&"right"===B;return e("button",f({type:z,className:["aha-button","aha-button--".concat(O),"aha-button--".concat(y[d]||"md"),_&&"aha-button--icon-only",X&&"aha-button--disabled",p&&"aha-button--loading",q&&"aha-button--focused",W].filter(Boolean).join(" "),disabled:X,onClick:function(e){X?e.preventDefault():null==S||S(e)},onMouseEnter:function(){return!X&&M(!0)},onMouseLeave:function(){M(!1),T(!1)},onMouseDown:function(){return!X&&T(!0)},onMouseUp:function(){return T(!1)},style:Q},E,{children:[U&&G(),!_&&r,Z&&G(),_&&!A&&!p&&r]}))};S.displayName="Button";var C="var(--shadow-xs)",z={small:{pt:"5px",pb:"5px"},mediumSmall:{pt:"7px",pb:"7px"},medium:{pt:"9px",pb:"9px"},large:{pt:"11px",pb:"11px"}};a(function(n,r){var t=n.size,i=void 0===t?"mediumSmall":t,a=n.error,c=void 0!==a&&a,u=n.disabled,p=void 0!==u&&u,x=n.readOnly,v=void 0!==x&&x,g=n.prefix,m=n.suffix,y=n.leadingText,b=n.trailingText,w=n.leadingAddon,k=n.trailingAddon,S=n.className,F=void 0===S?"":S,W=n.style,L=n.onFocus,A=n.onBlur,I=n.onKeyDown,B=n.onPressEnter,E=n.value,j=n.defaultValue,N=n.onChange,D=n.placeholder,M=n.type,H=void 0===M?"text":M,R=n.label,T=n.required,O=n.hintText,P=h(n,["size","error","disabled","readOnly","prefix","suffix","leadingText","trailingText","leadingAddon","trailingAddon","className","style","onFocus","onBlur","onKeyDown","onPressEnter","value","defaultValue","onChange","placeholder","type","label","required","hintText"]),_=d(null),K=l(!1),X=K[0],q=K[1],Y=l(null!=j?j:""),V=Y[0],J=Y[1];s(function(){"function"==typeof r?r(_.current):r&&(r.current=_.current)},[r]);var Q=void 0!==E,G=Q?E:V,U=p?{border:"1px solid var(--color-border-disabled)",boxShadow:C,outline:"none"}:c&&X?{border:"1px solid var(--color-border-error)",boxShadow:C,outline:"2px solid var(--color-border-error)",outlineOffset:"-2px"}:c?{border:"1px solid var(--color-border-error_subtle)",boxShadow:C,outline:"none"}:X?{border:"1px solid var(--color-border-brand)",boxShadow:C,outline:"2px solid var(--color-border-brand)",outlineOffset:"-2px"}:{border:"1px solid var(--color-border-primary)",boxShadow:C,outline:"none"},Z=U.border,$=U.boxShadow,ee=U.outline,oe=U.outlineOffset,ne=z[i],re=ne.pt,te=ne.pb,ie=p?"var(--color-border-disabled)":"var(--color-border-primary)",le=!!g,ae=!!m,de={position:"absolute",top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",color:p?"var(--color-fg-disabled)":"var(--color-fg-quaternary)",zIndex:1,pointerEvents:"none"},se={display:"flex",alignItems:"center",paddingTop:re,paddingBottom:te,paddingLeft:"14px",paddingRight:"12px",color:"var(--color-text-tertiary)",fontFamily:"var(--font-family-body)",fontSize:"var(--font-size-text-md)",lineHeight:"var(--line-height-text-md)",whiteSpace:"nowrap",flexShrink:0,backgroundColor:p?"var(--color-bg-disabled_subtle)":"transparent"},ce=e("div",{className:"aha-input-group ".concat(F),style:f({display:"flex",alignItems:"stretch",width:"100%",border:Z,boxShadow:$,outline:ee,outlineOffset:oe,borderRadius:"var(--radius-md)",backgroundColor:p||v?"var(--color-bg-disabled_subtle)":"var(--color-bg-primary)",overflow:"hidden",boxSizing:"border-box",transition:"border-color 0.15s ease, box-shadow 0.15s ease"},W),children:[void 0!==y&&o("div",{style:f(f({},se),{borderRight:"1px solid ".concat(ie)}),children:y}),void 0!==w&&o("div",{style:{display:"flex",alignItems:"stretch",flexShrink:0,borderRight:"1px solid ".concat(ie)},children:w}),e("div",{style:{flex:1,position:"relative",display:"flex",alignItems:"stretch",minWidth:0},children:[le&&o("span",{style:f(f({},de),{left:"14px"}),children:g}),o("input",f({ref:_,type:H,value:G,placeholder:D,disabled:p,readOnly:v,onChange:function(e){Q||J(e.target.value),null==N||N(e)},onFocus:function(e){q(!0),null==L||L(e)},onBlur:function(e){q(!1),null==A||A(e)},onKeyDown:function(e){"Enter"===e.key&&B&&B(e),null==I||I(e)},style:{flex:1,border:"none",outline:"none",width:"100%",boxSizing:"border-box",fontFamily:"var(--font-family-body)",fontSize:"var(--font-size-text-md)",fontWeight:400,lineHeight:"var(--line-height-text-md)",backgroundColor:"transparent",color:p?"var(--color-text-disabled)":"var(--color-text-primary)",paddingTop:re,paddingBottom:te,paddingLeft:le?"40px":"14px",paddingRight:ae?"40px":"14px"},autoComplete:P.autoComplete||"off"},P)),ae&&o("span",{style:f(f({},de),{right:"14px"}),children:m})]}),void 0!==b&&o("div",{style:f(f({},se),{paddingLeft:"12px",paddingRight:"14px",borderLeft:"1px solid ".concat(ie)}),children:b}),void 0!==k&&o("div",{style:{display:"flex",alignItems:"stretch",flexShrink:0,borderLeft:"1px solid ".concat(ie)},children:k})]});if(!R&&!O)return ce;var ue={margin:0,fontFamily:"var(--font-family-body)",fontSize:"var(--font-size-text-sm)",fontWeight:400,lineHeight:"20px",color:c?"var(--color-error-600)":"var(--color-text-tertiary)"};return e("div",{style:{display:"flex",flexDirection:"column",gap:"6px",width:"100%"},children:[R&&e("label",{style:{fontFamily:"var(--font-family-body)",fontSize:"var(--font-size-text-sm)",fontWeight:500,lineHeight:"20px",color:"var(--color-text-secondary)"},children:[R,T&&o("span",{style:{color:"var(--color-error-600)",marginLeft:"2px"},children:"*"})]}),ce,O&&o("p",{style:ue,children:O})]})}).displayName="InputGroup";var F={small:{height:"36px",paddingTop:"5px",paddingBottom:"5px"},mediumSmall:{height:"40px",paddingTop:"7px",paddingBottom:"7px"},medium:{height:"44px",paddingTop:"9px",paddingBottom:"9px"},large:{height:"48px",paddingTop:"11px",paddingBottom:"11px"}},W="var(--shadow-xs)",L=function(e){var n=e.onClick;return o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:n,style:{cursor:"pointer",flexShrink:0},children:o("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},A=a(function(t,i){var l=t.size,a=void 0===l?"mediumSmall":l,c=t.disabled,u=void 0!==c&&c,p=t.error,x=void 0!==p&&p,v=t.readOnly,g=void 0!==v&&v,m=t.prefix,y=t.suffix,b=t.allowClear,w=void 0!==b&&b,k=t.onClear,S=t.className,C=void 0===S?"":S,z=t.style,A=t.type,I=void 0===A?"text":A,B=t.placeholder,E=t.value,j=t.defaultValue,N=t.onChange,D=t.onFocus,M=t.onBlur,H=t.onPressEnter,R=t.label,T=t.required,O=t.hintText,P=h(t,["size","disabled","error","readOnly","prefix","suffix","allowClear","onClear","className","style","type","placeholder","value","defaultValue","onChange","onFocus","onBlur","onPressEnter","label","required","hintText"]),_=d(null),K=r.useState(j||E||""),X=K[0],q=K[1],Y=r.useState(!1),V=Y[0],J=Y[1];s(function(){"function"==typeof i?i(_.current):i&&(i.current=_.current)},[i]);var Q=void 0!==E,G=Q?E:X,U=w&&G&&!u,Z=u?{border:"1px solid var(--color-border-disabled)",boxShadow:W,outline:"none"}:x&&V?{border:"1px solid var(--color-border-error)",boxShadow:W,outline:"2px solid var(--color-border-error)",outlineOffset:"-2px"}:x?{border:"1px solid var(--color-border-error_subtle)",boxShadow:W,outline:"none"}:V?{border:"1px solid var(--color-border-brand)",boxShadow:W,outline:"2px solid var(--color-border-brand)",outlineOffset:"-2px"}:{border:"1px solid var(--color-border-primary)",boxShadow:W,outline:"none"},$=Z.border,ee=Z.boxShadow,oe=Z.outline,ne=Z.outlineOffset,re=F[a],te=re.height,ie=re.paddingTop,le=re.paddingBottom,ae=f({width:"100%",height:te,boxSizing:"border-box",fontFamily:"var(--font-family-body)",fontSize:"var(--font-size-text-md)",fontWeight:400,lineHeight:"var(--line-height-text-md)",borderRadius:"var(--radius-md)",border:$,boxShadow:ee,backgroundColor:u||g?"var(--color-bg-disabled_subtle)":"var(--color-bg-primary)",color:u?"var(--color-text-disabled)":"var(--color-text-primary)",paddingTop:ie,paddingBottom:le,paddingLeft:m?"40px":"14px",paddingRight:y||U?"40px":"14px",transition:"border-color 0.15s ease, box-shadow 0.15s ease, outline-color 0.15s ease",outline:oe,outlineOffset:ne,WebkitAppearance:"none",MozAppearance:"textfield",appearance:"none"},z),de={position:"absolute",top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",color:u?"var(--color-fg-disabled)":"var(--color-fg-quaternary)",zIndex:1},se=e(n,{children:[o("style",{children:'\n .aha-input-wrapper input::placeholder {\n color: var(--color-text-placeholder);\n font-size: var(--font-size-text-md);\n font-weight: 400;\n opacity: 1;\n }\n .aha-input-wrapper input::-webkit-input-placeholder { color: var(--color-text-placeholder); }\n .aha-input-wrapper input::-moz-placeholder { color: var(--color-text-placeholder); }\n .aha-input-wrapper input:-ms-input-placeholder { color: var(--color-text-placeholder); }\n .aha-input-wrapper input {\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n touch-action: manipulation;\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"] { -moz-appearance: textfield; }\n '}),e("div",{className:"aha-input-wrapper ".concat(C),style:{position:"relative",display:"block",width:"100%"},children:[m&&o("span",{style:f(f({},de),{left:"14px",pointerEvents:"none"}),children:m}),o("input",f({ref:_,type:I,value:G,placeholder:B,disabled:u,readOnly:g,onChange:function(e){Q||q(e.target.value),null==N||N(e)},onFocus:function(e){J(!0),null==D||D(e)},onBlur:function(e){J(!1),null==M||M(e)},onKeyDown:function(e){var o;"Enter"===e.key&&H&&H(e),null===(o=P.onKeyDown)||void 0===o||o.call(P,e)},style:ae,autoComplete:P.autoComplete||"off",autoCorrect:P.autoCorrect||"off",autoCapitalize:P.autoCapitalize||"off",spellCheck:P.spellCheck||!1},P)),(y||U)&&e("span",{style:f(f({},de),{right:"14px",gap:"var(--spacing-xs)"}),children:[U&&o(L,{onClick:function(e){var o;e.stopPropagation(),Q||q("");null==N||N({target:{value:""},currentTarget:{value:""}}),null==k||k(),null===(o=_.current)||void 0===o||o.focus()}}),y]})]})]});return R||O?e("div",{style:{display:"flex",flexDirection:"column",gap:"6px",width:"100%"},children:[R&&e("label",{style:{fontFamily:"var(--font-family-body)",fontSize:"var(--font-size-text-sm)",fontWeight:500,lineHeight:"20px",color:"var(--color-text-secondary)"},children:[R,T&&o("span",{style:{color:"var(--color-error-600)",marginLeft:"2px"},children:"*"})]}),se,O&&o("p",{style:{margin:0,fontFamily:"var(--font-family-body)",fontSize:"var(--font-size-text-sm)",fontWeight:400,lineHeight:"20px",color:x?"var(--color-error-600)":"var(--color-text-tertiary)"},children:O})]}):se});A.displayName="Input";var I=function(t){var i,a=t.value,h=t.defaultValue,v=t.options,g=void 0===v?[]:v,y=t.mode,b=t.disabled,w=void 0!==b&&b,k=t.error,S=void 0!==k&&k,C=t.placeholder,z=void 0===C?"Please select":C,F=t.size,W=void 0===F?"medium":F,L=t.showSearch,A=void 0!==L&&L,I=t.filterOption,B=void 0===I||I,E=t.allowClear,j=void 0!==E&&E,N=t.onChange,D=t.onSelect,M=t.onDeselect,H=t.onSearch,R=t.onFocus,T=t.onBlur,O=t.onDropdownVisibleChange,P=t.className,_=void 0===P?"":P,K=t.style,X=t.dropdownClassName,q=void 0===X?"":X,Y=t.dropdownStyle,V=t.defaultOpen,J=void 0!==V&&V,Q=t.open,G=t.maxTagCount,U=t.tagRender,Z=t.optionRender,$=m().primaryColor,ee=void 0===$?"#FB6011":$,oe=l(void 0!==h?h:y?[]:void 0),ne=oe[0],re=oe[1],te=l(J),ie=te[0],le=te[1],ae=l(""),de=ae[0],se=ae[1],ce=l(-1),ue=ce[0],pe=ce[1],fe=d(null),he=d(null),xe=d(null),ve=l(null),ge=ve[0],me=ve[1],ye=void 0!==a,be=void 0!==Q,we=ye?a:ne,ke=be?Q:ie,Se="multiple"===y||"tags"===y,Ce=c(function(){if(!we)return[];var e=Array.isArray(we)?we:[we];return g.filter(function(o){return e.includes(o.value)})},[we,g]),ze=c(function(){return A&&de?!1===B?g:"function"==typeof B?g.filter(function(e){return B(de,e)}):g.filter(function(e){var o=String(e.label||"").toLowerCase(),n=de.toLowerCase();return o.includes(n)}):g},[g,de,A,B]),Fe=u(function(){return ze()},[ze]);s(function(){if(ke&&fe.current){var e=function(){var e,o;if(fe.current){var n=fe.current.getBoundingClientRect(),r=null!==(o=null===(e=xe.current)||void 0===e?void 0:e.offsetHeight)&&void 0!==o?o:Math.min(256,Math.max(40,40*Fe.length)),t=window.innerHeight-n.bottom,i=n.top,l=t<r+4&&i>t,a=l?n.top+window.scrollY-r-4:n.bottom+window.scrollY+4;me({top:a,left:n.left+window.scrollX,width:n.width,placement:l?"top":"bottom"})}};return e(),requestAnimationFrame(e),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),function(){window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}}me(null)},[ke,Fe.length]),s(function(){var e=function(e){var o=e.target;fe.current&&!fe.current.contains(o)&&xe.current&&!xe.current.contains(o)&&(be||le(!1),null==O||O(!1),se(""))};if(ke)return document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,!0),function(){document.removeEventListener("mousedown",e,!0),document.removeEventListener("touchstart",e,!0)}},[ke,be,O]),s(function(){if(ke){var e=function(e){var o;if("ArrowDown"===e.key)e.preventDefault(),pe(function(e){return e<Fe.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=Fe[ue];n&&!n.disabled&&We(n)}else"Escape"===e.key&&(e.preventDefault(),be||le(!1),null==O||O(!1),null===(o=fe.current)||void 0===o||o.focus())};return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}},[ke,Fe,ue,be,O]),s(function(){if(ue>=0&&xe.current){var e=xe.current.querySelectorAll(".aha-select-option")[ue];e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})}},[ue]);var We=c(function(e){var o;if(!e.disabled)if(Se){var n,r=Array.isArray(we)?we:[];r.includes(e.value)?(n=r.filter(function(o){return o!==e.value}),null==M||M(e.value,e)):(n=x(x([],r,!0),[e.value],!1),null==D||D(e.value,e)),ye||re(n);var t=g.filter(function(e){return n.includes(e.value)});null==N||N(n,t)}else ye||re(e.value),null==N||N(e.value,e),null==D||D(e.value,e),be||le(!1),null==O||O(!1),se(""),null===(o=fe.current)||void 0===o||o.focus()},[Se,we,ye,be,g,N,D,M,O]),Le=c(function(e,o){if(e.stopPropagation(),Se&&Array.isArray(we)){var n=we.filter(function(e){return e!==o}),r=g.find(function(e){return e.value===o});ye||re(n),null==N||N(n,Ce()),null==M||M(o,r)}},[Se,we,ye,g,N,M,Ce]),Ae=function(e){e.stopPropagation();var o=Se?[]:void 0;ye||re(o),null==N||N(o,[]),se("")},Ie={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=u(function(){return Ce()},[Ce]),Ee=u(function(){return j&&we&&!w},[j,we,w]),je=u(function(){return Se?Array.isArray(we)&&we.length>0:null!=we&&""!==we},[Se,we]),Ne=u(function(){if(!Se||!Array.isArray(we)||0===we.length)return null;var n="responsive"===G?Be.slice(0,2):G?Be.slice(0,G):Be,t=G&&Be.length>n.length?Be.length-n.length:0;return e("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"4px",flex:1,minWidth:0},children:[n.map(function(n){var t={label:n.label,value:n.value,closable:!w,onClose:function(){return Le({},n.value)}};return U?o(r.Fragment,{children:U(t)},n.value):e("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:[o("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n.label}),!w&&o("span",{onClick:function(e){return Le(e,n.value)},style:{cursor:"pointer",display:"flex",alignItems:"center",color:"#78716C",marginLeft:"4px"},children:o("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:o("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]},n.value)}),t>0&&e("span",{style:{fontSize:"12px",lineHeight:"18px",color:"#78716C",fontFamily:"DM Sans, sans-serif"},children:["+",t]})]})},[Se,we,Be,G,w,U]);return e(n,{children:[o("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 "}),e("div",{ref:fe,className:"aha-select ".concat(_),style:f({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(S?"#F04438":ke?ee:"#D7D3D0"),backgroundColor:w?"#FAFAF9":"#FFFFFF",cursor:w?"not-allowed":"pointer",transition:"all 0.2s",paddingLeft:"12px",paddingRight:"36px",paddingTop:Ie[W].paddingTop,paddingBottom:Ie[W].paddingBottom,fontSize:Ie[W].fontSize,lineHeight:Ie[W].lineHeight,fontWeight:400,WebkitTapHighlightColor:"transparent",WebkitTouchCallout:"none",touchAction:"manipulation",userSelect:"none"},K),onClick:function(){if(!w){var e=!ke;be||le(e),null==O||O(e),e&&A?setTimeout(function(){var e;null===(e=he.current)||void 0===e||e.focus()},0):se("")}},onFocus:function(e){null==R||R(e)},onBlur:function(e){null==T||T(e)},onTouchStart:function(e){w||(e.currentTarget.style.opacity="0.8")},onTouchEnd:function(e){e.currentTarget.style.opacity="1"},tabIndex:w?-1:0,children:[o("div",{style:{display:"flex",alignItems:"center",flex:1,minWidth:0,gap:"8px"},children:Se?Ne||o("span",z?{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"#79716B",fontSize:"16px",lineHeight:"24px",fontWeight:400},children:z}:{style:{flex:1,minHeight:"24px"}}):A&&ke?o("input",{ref:he,type:"text",value:de,onChange:function(e){var o=e.target.value;se(o),null==H||H(o),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:w?"#98A2B3":"#1C1917",fontFamily:"DM Sans, sans-serif",minWidth:0,WebkitAppearance:"none",appearance:"none"},placeholder:je?void 0:z,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1}):o("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:je?w?"#98A2B3":"#1C1917":"#79716B",fontSize:"16px",lineHeight:"24px",fontWeight:400,minHeight:"24px",display:"inline-block"},children:je?(null===(i=Be[0])||void 0===i?void 0:i.label)||we:z||" "})}),e("div",{style:{position:"absolute",right:"12px",display:"flex",alignItems:"center",gap:"4px"},children:[Ee&&o(function(){return o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:Ae,style:{cursor:"pointer",flexShrink:0,color:"#78716C"},children:o("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},{}),o(function(e){var n=e.isOpen;return o("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:o("path",{d:"M4 6L8 10L12 6",stroke:"#78716C",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},{isOpen:ke})]})]}),ke&&ge&&p(o("div",{ref:xe,className:"aha-select-dropdown ".concat(q),style:f({position:"absolute",top:"".concat(ge.top,"px"),left:"".concat(ge.left,"px"),width:"".concat(ge.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:"top"===ge.placement?"translateY(8px)":"translateY(-8px)",animation:"dropdownFadeIn 0.2s ease-out forwards",transformOrigin:"top"===ge.placement?"bottom center":"top center",WebkitOverflowScrolling:"touch",overscrollBehavior:"contain"},Y),children:0===Fe.length?o("div",{style:{padding:"8px 16px",textAlign:"center",color:"#78716C",fontSize:"14px",fontFamily:"DM Sans, sans-serif"},children:"No data"}):Fe.map(function(n,r){var t=Se?Array.isArray(we)&&we.includes(n.value):we===n.value,i=r===ue;return Z?o("div",{className:"aha-select-option ".concat(n.disabled?"":"hover:bg-[#FAFAF9]"," ").concat(t?"bg-[#FAFAF9]":""),onClick:function(){return!n.disabled&&We(n)},style:{cursor:n.disabled?"not-allowed":"pointer",transition:"background-color 0.2s"},children:Z(n,{selected:t,focused:i,disabled:n.disabled||!1})},n.value):e("div",{className:"aha-select-option ".concat(n.disabled?"":"hover:bg-[#FAFAF9]"," ").concat(t?"bg-[#FAFAF9]":""),onClick:function(){return We(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:[o("span",{children:n.label}),t&&o("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:i?"hidden":"",children:o("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:ee,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]},n.value)})}),document.body)]})};I.displayName="Select";var B=function(e){var n=e.className,r=e.style;return o("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,style:r,children:o("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"})})},E=function(n){var r=n.className,t=n.style;return e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,style:t,children:[o("path",{d:"M3.5 4.5L6 2L8.5 4.5",stroke:"#A9A29D",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o("path",{d:"M3.5 7.5L6 10L8.5 7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})},j=function(n){var r=n.className,t=n.style;return e("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r,style:t,children:[o("path",{d:"M8.5 7.5L6 10L3.5 7.5",stroke:"#A9A29D",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),o("path",{d:"M8.5 4.5L6 2L3.5 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})},N=function(e){var n=e.className,r=e.style;return o("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,style:r,children:o("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"})})},D=function(e){var n=e.className,r=e.style;return o("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:n,style:r,children:o("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"})})},M=function(r){var t=r.current,i=r.defaultCurrent,a=void 0===i?1:i,d=r.total,c=void 0===d?0:d,p=r.pageSize,h=r.defaultPageSize,x=void 0===h?10:h,v=r.showSizeChanger,g=void 0!==v&&v,y=r.pageSizeOptions,b=void 0===y?["10","20","50","100"]:y,w=r.showQuickJumper,k=void 0!==w&&w,C=r.showTotal,z=r.onChange,F=r.onShowSizeChange,W=r.simple,L=void 0!==W&&W,B=r.disabled,E=void 0!==B&&B,j=r.hideOnSinglePage,M=void 0!==j&&j,H=r.className,R=void 0===H?"":H,T=r.style,O=r.size,P=void 0===O?"default":O,_=r.responsive,K=void 0!==_&&_;r.showLessItems;var X=r.itemRender,q=m().primaryColor,Y=void 0===q?"#FB6011":q,V=l(a),J=V[0],Q=V[1],G=l(x),U=G[0],Z=G[1],$=l(""),ee=$[0],oe=$[1],ne=null!=t?t:J,re=null!=p?p:U,te=u(function(){return Math.ceil(c/re)},[c,re]);s(function(){void 0!==t&&Q(t)},[t]),s(function(){void 0!==p&&Z(p)},[p]);var ie=function(e){e<1||e>te||e===ne||E||(void 0===t&&Q(e),null==z||z(e,re))},le=function(){var e=parseInt(ee,10);e>=1&&e<=te&&(ie(e),oe(""))};if(M&&te<=1)return null;if(L)return e("div",{className:"aha-pagination aha-pagination-simple ".concat(R),style:T,children:[o(S,{onClick:function(){return ie(ne-1)},disabled:E||1===ne,type:"default",size:"default"===P?"medium":"small",style:{marginRight:"8px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:o(N,{})}),e("span",{style:{margin:"0 8px",fontSize:"14px",lineHeight:"20px",color:"#475467",fontFamily:"DM Sans, sans-serif"},children:[ne," / ",te]}),o(S,{onClick:function(){return ie(ne+1)},disabled:E||ne===te,type:"default",size:"default"===P?"medium":"small",style:{marginLeft:"8px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:o(D,{})})]});var ae=(ne-1)*re+1,de=Math.min(ne*re,c);return e("div",{className:"aha-pagination w-full ".concat(R),style:f({display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:K?"wrap":"nowrap",fontFamily:"DM Sans, sans-serif"},T),children:[C&&o("div",{className:"justify-start text-Text-text-secondary text-sm font-medium font-['DM_Sans'] leading-5",children:C(c,[ae,de])}),e("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[c>0&&o(n,{children:X?X(ne-1,"prev",o(S,{onClick:function(){return ie(ne-1)},disabled:E||1===ne,type:"default",size:"default"===P?"medium":"small",style:{height:"small"===P?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:o(N,{})})):o(S,{onClick:function(){return ie(ne-1)},disabled:E||1===ne,type:"default",size:"default"===P?"medium":"small",style:{height:"small"===P?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:o(N,{})})}),o("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:function(){if(te<=7)return Array.from({length:te},function(e,o){return o+1});var e=[];if(ne<=4){for(var o=1;o<=5;o++)e.push(o);e.push("jump-next"),e.push(te)}else if(ne>=te-3){e.push(1),e.push("jump-prev");for(o=te-4;o<=te;o++)e.push(o)}else{e.push(1),e.push("jump-prev");for(o=ne-1;o<=ne+1;o++)e.push(o);e.push("jump-next"),e.push(te)}return e}().map(function(e){return function(e){if("number"==typeof e){var n=e===ne,r=o(S,{onClick:function(){return ie(e)},disabled:E,type:n?"primary":"default",size:"default"===P?"medium":"small",style:{minWidth:"small"===P?"32px":"36px",height:"small"===P?"32px":"36px",padding:"0 12px",margin:0,fontWeight:n?500:400,border:n?"1px solid ".concat(Y):void 0,boxShadow:"none",borderRadius:"8px"},children:e},e);return X?X(e,"page",r):r}if("jump-prev"===e)return r=o(S,{onClick:function(){return ie(Math.max(1,ne-5))},disabled:E,type:"default",size:"default"===P?"medium":"small",style:{minWidth:"small"===P?"32px":"36px",height:"small"===P?"32px":"36px",padding:"0 12px",margin:0,border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"•••"},"jump-prev"),X?X(ne-5,"jump-prev",r):r;if("jump-next"===e)return r=o(S,{onClick:function(){return ie(Math.min(te,ne+5))},disabled:E,type:"default",size:"default"===P?"medium":"small",style:{minWidth:"small"===P?"32px":"36px",height:"small"===P?"32px":"36px",padding:"0 12px",margin:0,border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"•••"},"jump-next"),X?X(ne+5,"jump-next",r):r;return null}(e)})}),c>0&&o(n,{children:X?X(ne+1,"next",o(S,{onClick:function(){return ie(ne+1)},disabled:E||ne===te,type:"default",size:"default"===P?"medium":"small",style:{height:"small"===P?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:o(D,{})})):o(S,{onClick:function(){return ie(ne+1)},disabled:E||ne===te,type:"default",size:"default"===P?"medium":"small",style:{height:"small"===P?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:o(D,{})})}),g&&o(I,{value:re,options:b.map(function(e){return{label:"".concat(e," / page"),value:Number(e)}}),onChange:function(e){return o=Number(e),n=Math.ceil(c/o),r=ne>n?n:ne,void 0===p&&Z(o),void 0===t&&Q(r),null==F||F(r,o),void(null==z||z(r,o));var o,n,r},disabled:E,size:"small"===P?"small":"medium",style:{minWidth:"small"===P?80:96}}),k&&e("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontFamily:"DM Sans, sans-serif"},children:[o("span",{style:{fontSize:"14px",lineHeight:"20px",color:"#475467"},children:"Go to"}),o(A,{type:"number",min:1,value:ee,onChange:function(e){return oe(e.target.value)},onPressEnter:le,disabled:E,size:"small"===P?"small":"medium",style:{width:56,minWidth:56}}),o("span",{style:{fontSize:"14px",lineHeight:"20px",color:"#475467"},children:"page"}),"object"==typeof k&&k.goButton?o(S,{onClick:le,disabled:E,type:"default",size:"default"===P?"medium":"small",style:{border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:k.goButton}):o(S,{onClick:le,disabled:E,type:"default",size:"default"===P?"medium":"small",style:{border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"OK"})]})]})]})},H=function(n){var r=n.checked,t=void 0!==r&&r,i=n.indeterminate,a=void 0!==i&&i,d=n.disabled,s=void 0!==d&&d,c=n.onChange,u=n.className,p=void 0===u?"":u,h=n.style,x=n.children,v=n.size,g=void 0===v?"sm":v,m=n.hint,y=n.isFocused,b=l(!1),w=b[0],k=b[1],S=l(!1),C=S[0],z=S[1],F=t||a,W=null!=y?y:C,L=function(){s||(null==c||c({target:{checked:!t},currentTarget:{checked:!t}}))},A="sm"===g?"16px":"20px",I="sm"===g?"12px":"14px",B="sm"===g?"var(--radius-xs, 4px)":"var(--radius-sm, 6px)",E="sm"===g?"var(--font-size-text-sm, 14px)":"var(--font-size-text-md, 16px)",j="sm"===g?"var(--line-height-text-sm, 20px)":"var(--line-height-text-md, 24px)",N="sm"===g?"var(--spacing-md, 8px)":"var(--spacing-lg, 12px)",D=s&&F?"var(--color-fg-disabled_subtle, #d7d3d0)":"var(--color-fg-white, #ffffff)",M=x||m;return e("div",{className:"aha-checkbox ".concat(p),role:"checkbox","aria-checked":a?"mixed":t,"aria-disabled":s,tabIndex:s?-1:0,style:f({display:"inline-flex",alignItems:"flex-start",gap:N,cursor:s?"not-allowed":"pointer",outline:"none"},h),onClick:L,onKeyDown:function(e){" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),L())},onMouseEnter:function(){return!s&&k(!0)},onMouseLeave:function(){return k(!1)},onFocus:function(){return!s&&z(!0)},onBlur:function(){return z(!1)},children:[e("div",{style:{position:"relative",width:A,height:A,minWidth:A,minHeight:A,flexShrink:0,borderRadius:B,border:s?"1px solid var(--color-border-disabled, #d7d3d0)":F?w?"1px solid var(--color-bg-brand-solid_hover, #ec470a)":"1px solid var(--color-bg-brand-solid, #fb6011)":"1px solid var(--color-border-primary, #d7d3d0)",backgroundColor:s?"var(--color-bg-disabled_subtle, #fafaf9)":F?w?"var(--color-bg-brand-solid_hover, #ec470a)":"var(--color-bg-brand-solid, #fb6011)":w?"var(--color-bg-primary_hover, #fafaf9)":"var(--color-bg-primary, #ffffff)",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.15s, border-color 0.15s, box-shadow 0.15s",boxSizing:"border-box",boxShadow:W?"var(--focus-ring, 0px 0px 0px 2px #ffffff, 0px 0px 0px 4px #fb6011)":"none",marginTop:M?"2px":"0"},children:[o("svg",{"aria-hidden":"true",viewBox:"0 0 14 14",fill:"none",style:{position:"absolute",width:I,height:I,color:D,opacity:a?1:0,transition:"opacity 0.15s",pointerEvents:"none"},children:o("path",{d:"M2.91675 7H11.0834",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),o("svg",{"aria-hidden":"true",viewBox:"0 0 14 14",fill:"none",style:{position:"absolute",width:I,height:I,color:D,opacity:t&&!a?1:0,transition:"opacity 0.15s",pointerEvents:"none"},children:o("path",{d:"M11.6666 3.5L5.24992 9.91667L2.33325 7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]}),M&&e("div",{style:{display:"inline-flex",flexDirection:"column",gap:"md"===g?"var(--spacing-xxs, 2px)":"0"},children:[x&&o("span",{style:{fontSize:E,lineHeight:j,fontWeight:"var(--font-weight-medium, 500)",fontFamily:'var(--font-family-body, "DM Sans", sans-serif)',color:s?"var(--color-text-disabled, #79716b)":"var(--color-text-secondary, #44403c)",userSelect:"none"},children:x}),m&&o("span",{style:{fontSize:E,lineHeight:j,fontWeight:"var(--font-weight-regular, 400)",fontFamily:'var(--font-family-body, "DM Sans", sans-serif)',color:"var(--color-text-tertiary, #57534e)"},onClick:function(e){return e.stopPropagation()},children:m})]})]})};H.displayName="Checkbox";var R=function(r){var t=r.color;return e(n,{children:[o("style",{children:"\n @keyframes aha-table-loading-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n "}),e("svg",{width:32,height:32,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,style:{animation:"aha-table-loading-spin 1s linear infinite"},children:[o("circle",{cx:"12",cy:"12",r:"10",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"24",opacity:.3}),o("circle",{cx:"12",cy:"12",r:"10",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"16"})]})]})},T=function(e){var n=e.loading,r=e.spinColor;if(!n)return null;var t=!0===n?o(R,{color:r}):n;return o("div",{role:"status","aria-live":"polite","aria-label":"Loading",className:"aha-table-loading-overlay",style:{position:"absolute",inset:0,zIndex:50,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.55)",pointerEvents:"auto"},children:t})},O=function(e,o){return"string"==typeof o?null==e?void 0:e[o]:o.reduce(function(e,o){return null==e?void 0:e[o]},e)},P=function(e,o){var n,r;return"function"==typeof o?o(e):"string"==typeof o?null!==(n=O(e,o))&&void 0!==n?n:"":null!==(r=e.key)&&void 0!==r?r:""},_=function(e){var n=e.order,r=m().primaryColor;return"ascend"===n?o(j,{style:{color:r}}):"descend"===n?o(E,{style:{color:r}}):o(B,{})},K=function(n){var t,i,a,p,v=n.columns,g=void 0===v?[]:v,y=n.dataSource,b=void 0===y?[]:y,w=n.rowKey,k=void 0===w?"key":w,S=n.rowSelection,C=n.pagination,z=void 0!==C&&C,F=n.size,W=void 0===F?"middle":F,L=n.bordered,A=void 0!==L&&L,I=n.loading,B=void 0!==I&&I,E=n.locale,j=n.showHeader,N=void 0===j||j,D=n.title,R=n.footer,K=n.summary,X=n.scroll,q=n.tableLayout,Y=void 0===q?"auto":q,V=n.onChange,J=n.onSorterChange,Q=n.onPaginationChange,G=n.onRow,U=n.className,Z=void 0===U?"":U,$=n.innerClassName,ee=void 0===$?"":$,oe=n.style,ne=n.expandable,re=n.rowClassName,te=n.onHeaderRow;n.sticky;var ie=h(n,["columns","dataSource","rowKey","rowSelection","pagination","size","bordered","loading","locale","showHeader","title","footer","summary","scroll","tableLayout","onChange","onSorterChange","onPaginationChange","onRow","className","innerClassName","style","expandable","rowClassName","onHeaderRow","sticky"]),le=m().primaryColor||"#FB6011",ae=l((null==S?void 0:S.selectedRowKeys)||(null==S?void 0:S.defaultSelectedRowKeys)||[]),de=ae[0],se=ae[1];s(function(){void 0!==(null==S?void 0:S.selectedRowKeys)&&se(S.selectedRowKeys)},[null==S?void 0:S.selectedRowKeys]);var ce=l(new Map),ue=ce[0],pe=ce[1],fe=l((null==ne?void 0:ne.defaultExpandedRowKeys)||[]),he=fe[0],xe=fe[1],ve=l(z&&"object"==typeof z&&(z.current||z.defaultCurrent)||1),ge=ve[0],me=ve[1],ye=l(z&&"object"==typeof z&&(z.pageSize||z.defaultPageSize)||10),be=ye[0],we=ye[1];s(function(){z&&"object"==typeof z&&(void 0!==z.current&&me(z.current),void 0!==z.pageSize&&we(z.pageSize))},[z]);var ke=l(null),Se=ke[0],Ce=ke[1],ze=l(null),Fe=ze[0],We=ze[1],Le=l(!1),Ae=Le[0],Ie=Le[1],Be=d(null),Ee=d(null);s(function(){var e=function(){Ie(window.innerWidth<768)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[]);var je=c(function(e,o){var n,r,t,i=null===(n=null==S?void 0:S.getCheckboxProps)||void 0===n?void 0:n.call(S,e);if(!(null==i?void 0:i.disabled)){var l,a=P(e,k);l="radio"===(null==S?void 0:S.type)?o?[a]:[]:o?x(x([],de,!0),[a],!1):de.filter(function(e){return e!==a}),se(l);var d=b.filter(function(e){return l.includes(P(e,k))});null===(r=null==S?void 0:S.onChange)||void 0===r||r.call(S,l,d),null===(t=null==S?void 0:S.onSelect)||void 0===t||t.call(S,e,o,d,new Event("select"))}},[de,k,S,b]),Ne=c(function(e,o){var n,r,t=o.filter(function(e){var o;return!(null===(o=null==S?void 0:S.getCheckboxProps)||void 0===o?void 0:o.call(S,e).disabled)}).map(function(e){return P(e,k)}),i=e?t:[];se(i);var l=b.filter(function(e){return i.includes(P(e,k))}),a=e?o.filter(function(e){var o;return!(null===(o=null==S?void 0:S.getCheckboxProps)||void 0===o?void 0:o.call(S,e).disabled)}):[];null===(n=null==S?void 0:S.onChange)||void 0===n||n.call(S,i,l),null===(r=null==S?void 0:S.onSelectAll)||void 0===r||r.call(S,e,l,a)},[k,S,b]),De=c(function(e,o){var n=e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex);if(n){var r=new Map(ue);null===o?r.delete(n):r.set(n,o),pe(r);var t=Array.from(r.entries()).map(function(o){var n=o[0],r=o[1];return{column:g.find(function(e){return(e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex))===n})||e,order:r,field:n,columnKey:n}}),i={column:e,order:o,field:n,columnKey:n};e.onSorterChange&&e.onSorterChange(i),J&&J(1===t.length?t[0]:t),V&&V({current:ge,pageSize:be},{},1===t.length?t[0]:t,{currentDataSource:b,action:"sort"})}},[ue,V,J,ge,be,b,g]);c(function(e,o){var n,r,t,i=P(e,k);t=o?x(x([],he,!0),[i],!1):he.filter(function(e){return e!==i}),xe(t),null===(n=null==ne?void 0:ne.onExpand)||void 0===n||n.call(ne,o,e),null===(r=null==ne?void 0:ne.onExpandedRowsChange)||void 0===r||r.call(ne,t)},[he,k,ne]);var Me,He=c(function(){var e=x([],b,!0);return ue.size>0&&e.sort(function(e,o){for(var n=function(n,r){var t=g.find(function(e){return(e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex))===n});if(!t)return"continue";var i=0;if("function"==typeof t.sorter)i=t.sorter(e,o);else if(!0===t.sorter){var l=O(e,t.dataIndex||n),a=O(o,t.dataIndex||n);l<a?i=-1:l>a&&(i=1)}return 0!==i?{value:"ascend"===r?i:-i}:void 0},r=0,t=Array.from(ue.entries());r<t.length;r++){var i=t[r],l=n(i[0],i[1]);if("object"==typeof l)return l.value}return 0}),e},[b,ue,g]),Re=He(),Te=Boolean(z&&"object"==typeof z&&void 0!==z.total),Oe=u(function(){if(!1===z||!z)return Re;if(Te)return Re;var e=(ge-1)*be,o=e+be;return Re.slice(e,o)},[Re,ge,be,z,Te]),Pe=c(function(e,o){var n,r,t=null!=o?o:be;if(me(e),o&&we(o),Q&&Q(e,t),z&&"object"==typeof z&&(null===(n=z.onChange)||void 0===n||n.call(z,e,o),o&&(null===(r=z.onShowSizeChange)||void 0===r||r.call(z,e,o))),V){var i=Array.from(ue.entries()).map(function(e){var o=e[0],n=e[1];return{column:g.find(function(e){return(e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex))===o}),order:n,field:o,columnKey:o}});V({current:e,pageSize:t},{},1===i.length?i[0]:i,{currentDataSource:Re,action:"paginate"})}},[z,Q,V,be,ue,g,Re]),_e=c(function(e,o,n){var r=O(o,e.dataIndex||"");return e.render?e.render(r,o,n):r},[]),Ke=c(function(e,o,n){if(o){var r=!0===o?"left":o,t=0;if("left"===r){if(S&&("left"===S.fixed||!0===S.fixed))t+="number"==typeof S.columnWidth?S.columnWidth:"string"==typeof S.columnWidth?parseInt(S.columnWidth):60;for(var i=0;i<e;i++){if("left"===(l=g[i]).fixed||!0===l.fixed)t+=l.width?"number"==typeof l.width?l.width:parseInt(l.width)||0:150}return t}if("right"===r){for(i=e+1;i<g.length;i++){var l;if("right"===(l=g[i]).fixed)t+=l.width?"number"==typeof l.width?l.width:parseInt(l.width)||0:150}if(S&&"right"===S.fixed)t+="number"==typeof S.columnWidth?S.columnWidth:"string"==typeof S.columnWidth?parseInt(S.columnWidth):60;return t}}},[g,S]),Xe=c(function(){if(!N)return null;var n,r,t,i,l=g.map(function(n,r){var t,i=n.key||(Array.isArray(n.dataIndex)?n.dataIndex.join("."):n.dataIndex)||r,l=ue.get(i)||null,a=Ke(r,n.fixed,!0),d=n.width?"number"==typeof n.width?"".concat(n.width,"px"):n.width:void 0;return o("th",f({className:"".concat(n.className||""," ").concat(n.align?"text-".concat(n.align):""),style:{width:d,minWidth:n.minWidth?"number"==typeof n.minWidth?"".concat(n.minWidth,"px"):n.minWidth:d||void 0,maxWidth:d,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===(t=n.onHeaderCell)||void 0===t?void 0:t.call(n,n))||{},{children:e("div",{style:{display:"flex",alignItems:"center",gap:"8px",justifyContent:"right"===n.align?"flex-end":"center"===n.align?"center":"flex-start"},children:[o("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&&o("button",{onClick:function(){De(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:o(_,{order:l||void 0})})]})}),i)});if(S){var a="number"==typeof S.columnWidth?"".concat(S.columnWidth,"px"):"string"==typeof S.columnWidth?S.columnWidth:"60px",d=o("th",{style:{width:a,position:S.fixed?"sticky":"relative",left:"left"===S.fixed||!0===S.fixed?"0px":void 0,right:"right"===S.fixed?"0px":void 0,zIndex:S.fixed?"left"===S.fixed||!0===S.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:e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[!S.hideSelectAll&&"radio"!==S.type&&(n=Oe.filter(function(e){var o;return!(null===(o=S.getCheckboxProps)||void 0===o?void 0:o.call(S,e).disabled)}),r=n.map(function(e){return P(e,k)}),t=n.length>0&&r.every(function(e){return de.includes(e)}),i=r.some(function(e){return de.includes(e)}),o(H,{checked:t,indeterminate:i&&!t,onChange:function(e){return Ne(e.target.checked,Oe)}})),S.columnTitle&&o("span",{style:{marginLeft:S.hideSelectAll?0:"8px"},children:S.columnTitle})]})},"selection");l.unshift(d)}var s=null==te?void 0:te(g,0);return o("thead",{ref:Ee,children:o("tr",f({},s||{},{children:l}))})},[g,N,ue,S,de,Oe,k,De,Ne,E,te,Ke]),qe=c(function(e){Ce(e)},[]),Ye=c(function(e,o){e.preventDefault(),We(o)},[]),Ve=c(function(e,o){if(e.preventDefault(),null===Se||Se===o)return Ce(null),void We(null);var n=x([],Oe,!0),r=n[Se];n.splice(Se,1),n.splice(o,0,r),Ce(null),We(null)},[Se,Oe]),Je=c(function(){Ce(null),We(null)},[]),Qe=c(function(){var e=null==E?void 0:E.emptyText,n="function"==typeof e?e():void 0!==e?e:"No data",r=g.length+(S?1:0);return o("tr",{className:"aha-table-placeholder",children:o("td",{colSpan:r,style:{padding:"48px 16px",textAlign:"center",color:"#98A2B3",fontSize:"14px",lineHeight:"20px",fontFamily:"DM Sans, sans-serif",borderBottom:"none",backgroundColor:"white"},children:n})})},[null==E?void 0:E.emptyText,g.length,S]),Ge=c(function(){return 0===Oe.length?Qe():Oe.map(function(n,t){var i,l=P(n,k),a=de.includes(l),d=he.includes(l),s=(null==G?void 0:G(n,t))||{},c=t===Oe.length-1;return e(r.Fragment,{children:[e("tr",f({className:"".concat("function"==typeof re?re(n,t):re||""," ").concat(Se===t?"dragging":""," ").concat(Fe===t?"drag-over":""),draggable:!0,onDragStart:function(){return qe(t)},onDragOver:function(e){return Ye(e,t)},onDrop:function(e){return Ve(e,t)},onDragEnd:Je,style:f({cursor:"move",opacity:Se===t?.5:1,backgroundColor:Fe===t?"#F9FAFB":"white",transition:"background-color 0.2s"},s.style),onMouseEnter:function(e){Se!==t&&Fe!==t&&(e.currentTarget.style.backgroundColor="#F9FAFB")},onMouseLeave:function(e){Se!==t&&Fe!==t&&(e.currentTarget.style.backgroundColor="white")}},s,{children:[S&&o("td",{style:{width:"number"==typeof S.columnWidth?"".concat(S.columnWidth,"px"):"string"==typeof S.columnWidth?S.columnWidth:"60px",position:S.fixed?"sticky":"relative",left:"left"===S.fixed||!0===S.fixed?"0px":void 0,right:"right"===S.fixed?"0px":void 0,zIndex:S.fixed?"left"===S.fixed||!0===S.fixed?12:11:1,backgroundColor:"white",padding:"16px",borderBottom:c?"none":"1px solid #EAECF0",textAlign:"center"},children:o("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:o(H,{checked:a,onChange:function(e){return je(n,e.target.checked)},disabled:null===(i=S.getCheckboxProps)||void 0===i?void 0:i.call(S,n).disabled})})}),g.map(function(e,r){var i,l=e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex)||r,a=(null===(i=e.onCell)||void 0===i?void 0:i.call(e,n,t))||{},d=Ke(r,e.fixed,!1),s=e.width?"number"==typeof e.width?"".concat(e.width,"px"):e.width:void 0;return o("td",f({className:"".concat(e.className||""," ").concat(e.align?"text-".concat(e.align):""),style:f({width:s,minWidth:e.minWidth?"number"==typeof e.minWidth?"".concat(e.minWidth,"px"):e.minWidth:s||void 0,maxWidth:s,position:e.fixed?"sticky":"relative",left:"left"===e.fixed||!0===e.fixed?void 0!==d?"".concat(d,"px"):"0":void 0,right:"right"===e.fixed?void 0!==d?"".concat(d,"px"):"0":void 0,zIndex:e.fixed?"left"===e.fixed||!0===e.fixed?10:9:1,backgroundColor:"white",boxShadow:"left"===e.fixed||!0===e.fixed?"2px 0 4px rgba(0, 0, 0, 0.05)":"right"===e.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:e.align||"left"},a.style),colSpan:e.colSpan,rowSpan:e.rowSpan},a,{children:_e(e,n,t)}),l)})]})),(null==ne?void 0:ne.expandedRowRender)&&d&&o("tr",{children:o("td",{colSpan:g.length+(S?1:0),children:ne.expandedRowRender(n,t,0,!0)})})]},l)})},[Oe,k,de,he,S,g,G,re,je,_e,ne,Se,Fe,qe,Ye,Ve,Je,Ke,Qe]),Ue=function(){var e;if(!1===z||!z)return null;var n=null!==(e=z.total)&&void 0!==e?e:Re.length,r=z.position||"bottomRight";return o("div",{style:{marginTop:"16px",display:"flex",justifyContent:r.includes("Right")?"flex-end":r.includes("Left")?"flex-start":"center"},children:o(M,{current:ge,total:n,pageSize:be,showSizeChanger:z.showSizeChanger,pageSizeOptions:z.pageSizeOptions,showQuickJumper:z.showQuickJumper,showTotal:z.showTotal,onChange:Pe,onShowSizeChange:Pe,simple:z.simple,responsive:z.responsive,size:"small"===W?"small":"default"})})},Ze=u(function(){return g.some(function(e){return e.fixed})||S&&S.fixed},[g,S]),$e=u(function(){return g.every(function(e){return e.width})&&(!S||S.columnWidth)},[g,S]),eo=u(function(){if(null==X?void 0:X.x){if("number"==typeof X.x)return X.x;if(!0===X.x)return g.reduce(function(e,o){return e+(o.width?"number"==typeof o.width?o.width:parseInt(String(o.width).replace("px",""))||0:150)},0)+(S?"number"==typeof S.columnWidth?S.columnWidth:parseInt(String(S.columnWidth||"60").replace("px",""))||60:0)}if(Ze)return g.reduce(function(e,o){return o.fixed&&o.width?e+("number"==typeof o.width?o.width:parseInt(String(o.width).replace("px",""))||0):e},0)+(S&&S.fixed&&S.columnWidth?"number"==typeof S.columnWidth?S.columnWidth:parseInt(String(S.columnWidth).replace("px",""))||60:0)},[g,null==X?void 0:X.x,S,Ze]),oo=u(function(){return"fixed"===Y||Ze||$e||g.some(function(e){return e.width})?"fixed":Y},[Y,Ze,$e,g]),no=f(f({width:"100%",minWidth:eo?"".concat(eo,"px"):"100%",borderCollapse:"separate",borderSpacing:0,tableLayout:oo,backgroundColor:"white"},A&&{borderRadius:"8px",border:"1px solid #EAECF0"}),{overflow:"hidden"}),ro=f({position:"relative",width:"100%",maxWidth:"100%",maxHeight:"number"==typeof(null==X?void 0:X.y)?"".concat(X.y,"px"):void 0,borderRadius:"8px"},oe);if(Ae)return e("div",f({ref:Be,className:"aha-table aha-table-mobile-wrapper ".concat(Z),style:ro,"aria-busy":!!B||void 0},ie,{children:[D&&o("div",{style:{marginBottom:"16px"},children:D(Re)}),z&&"object"==typeof z&&(null===(t=z.position)||void 0===t?void 0:t.startsWith("top"))&&Ue(),(Me="function"==typeof(null==E?void 0:E.emptyText)?E.emptyText():void 0!==(null==E?void 0:E.emptyText)?E.emptyText:"No data",0===Oe.length?o("div",{className:"aha-table-mobile aha-table-placeholder",style:{padding:"48px 16px",textAlign:"center",color:"#98A2B3",fontSize:"14px",lineHeight:"20px",fontFamily:"DM Sans, sans-serif"},children:Me}):o("div",{className:"aha-table-mobile",children:Oe.map(function(n,r){var t,i=P(n,k),l=de.includes(i);return e("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:[S&&o("div",{style:{marginBottom:"8px"},children:o(H,{checked:l,onChange:function(e){return je(n,e.target.checked)},disabled:null===(t=S.getCheckboxProps)||void 0===t?void 0:t.call(S,n).disabled})}),g.map(function(t){var i=t.key||(Array.isArray(t.dataIndex)?t.dataIndex.join("."):t.dataIndex),l=O(n,t.dataIndex||""),a=t.render?t.render(l,n,r):l;return e("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"8px",paddingBottom:"8px",borderBottom:"1px solid #f0f0f0"},children:[e("span",{style:{fontWeight:"bold",color:"#666"},children:["function"==typeof t.title?t.title({}):t.title,":"]}),o("span",{style:{flex:1,textAlign:"right"},children:a})]},i)})]},i)})})),R&&o("div",{style:{marginTop:"16px"},children:R(Re)}),z&&("object"!=typeof z||!(null===(i=z.position)||void 0===i?void 0:i.startsWith("top")))&&Ue(),o(T,{loading:B,spinColor:le})]}));var to={position:"relative",overflowX:(null==X?void 0:X.x)||Ze?"auto":"visible",overflowY:(null==X?void 0:X.y)?"auto":"visible",width:"100%",maxWidth:!0===(null==X?void 0:X.x)?"100%":"number"==typeof(null==X?void 0:X.x)?"".concat(X.x,"px"):void 0,maxHeight:"number"==typeof(null==X?void 0:X.y)?"".concat(X.y,"px"):void 0,borderRadius:"8px"};return e("div",f({ref:Be,className:"aha-table ".concat(Z),style:ro,"aria-busy":!!B||void 0},ie,{children:[D&&o("div",{style:{marginBottom:"16px"},children:D(Re)}),z&&"object"==typeof z&&(null===(a=z.position)||void 0===a?void 0:a.startsWith("top"))&&Ue(),o("div",{style:to,children:o("div",{style:{width:"100%",minWidth:eo?"".concat(eo,"px"):"100%",display:"block"},children:e("table",{style:no,className:ee,children:[Xe(),o("tbody",{children:Ge()}),K&&o("tfoot",{children:o("tr",{children:o("td",{colSpan:g.length+(S?1:0),children:K(Re)})})})]})})}),R&&o("div",{style:{marginTop:"16px"},children:R(Re)}),z&&("object"!=typeof z||!(null===(p=z.position)||void 0===p?void 0:p.startsWith("top")))&&Ue(),o(T,{loading:B,spinColor:le})]}))};export{K as default};
|
|
1
|
+
import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import o,{createContext as i,useContext as r,useState as l,forwardRef as a,useRef as d,useEffect as s,useCallback as c,useMemo as p}from"react";import{createPortal as u}from"react-dom";var f=function(){return f=Object.assign||function(e){for(var n,t=1,o=arguments.length;t<o;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},f.apply(this,arguments)};function h(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)n.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(t[o[i]]=e[o[i]])}return t}function x(e,n,t){if(t||2===arguments.length)for(var o,i=0,r=n.length;i<r;i++)!o&&i in n||(o||(o=Array.prototype.slice.call(n,0,i)),o[i]=n[i]);return e.concat(o||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var g={primaryColor:"#FB6011"},m=i(g),v=function(){var e=r(m);return e||g},y="#feb073",b="#fb6011",w="#ec470a",k="#c4330a",S="#fecdca",C="#fda29b",z="#f04438",L="#d92d20",F="#b42318",W="#1c1917",A="#44403c",I="#57534e",E="#79716b",B="#79716b",D="#ffffff",j="#d92d20",M="#d7d3d0",N="#fb6011",T="#f04438",H="#fda29b",R="#d7d3d0",O="#e7e5e4",P="#ffffff",X="#fafaf9",K="#f5f5f4",Y="#fafaf9",V="#fef3f2",q="#a9a29d",Q="#a9a29d",G="#d7d3d0",J="#ffffff",U="#f04438",_={display:'"DM Sans", system-ui, -apple-system, sans-serif',body:'"DM Sans", system-ui, -apple-system, sans-serif',base:'"DM Sans", system-ui, -apple-system, sans-serif'},Z={xs:"12px",sm:"14px",base:"16px",md:"16px",lg:"18px",xl:"20px",displayXs:"24px",displaySm:"30px",displayMd:"36px",displayLg:"48px",displayXl:"60px",display2xl:"72px"},$={regular:400,medium:500,semibold:600,bold:700},ee={xs:"18px",sm:"20px",base:"24px",md:"24px",lg:"28px",xl:"30px",displayXs:"32px",displaySm:"38px",displayMd:"44px",displayLg:"60px",displayXl:"72px",display2xl:"90px"},ne="2px",te="4px",oe="8px",ie="12px",re="4px",le="6px",ae="8px",de="0px 1px 2px 0px #0a0d120d",se="inset 0px 0px 0px 1px #0a0d122e, inset 0px -2px 0px 0px #0a0d120d, 0px 1px 2px 0px #0a0d120d",ce={default:"0px 0px 0px 2px #ffffff, 0px 0px 0px 4px ".concat(b),shadowXs:"0px 1px 2px 0px #0a0d120d, 0px 0px 0px 2px #ffffff, 0px 0px 0px 4px ".concat(b),shadowXsSkeuomorphic:"inset 0px 0px 0px 1px #0a0d122e, inset 0px -2px 0px 0px #0a0d120d, 0px 1px 2px 0px #0a0d120d, 0px 0px 0px 2px #ffffff, 0px 0px 0px 4px ".concat(b),shadowSm:"0px 1px 3px 0px #0a0d121a, 0px 1px 2px 0px #0a0d121a, 0px 0px 0px 2px #ffffff, 0px 0px 0px 4px ".concat(b),error:"0px 0px 0px 2px #ffffff, 0px 0px 0px 4px ".concat(z),errorShadowXs:"0px 1px 2px 0px #0a0d120d, 0px 0px 0px 2px #ffffff, 0px 0px 0px 4px ".concat(z),errorShadowXsSkeuomorphic:"inset 0px 0px 0px 1px #0a0d122e, inset 0px -2px 0px 0px #0a0d120d, 0px 1px 2px 0px #0a0d120d, 0px 0px 0px 2px #ffffff, 0px 0px 0px 4px ".concat(z)},pe=b;function ue(e){return!e||e.toLowerCase()===pe.toLowerCase()}function fe(e){return e||pe}var he=w,xe=b;var ge=_.body,me=ae,ve={sm:"sm",md:"md",lg:"lg",xl:"xl",small:"sm",mediumSmall:"sm",medium:"md",large:"xl"},ye={default:"default",primary:"primary",secondary:"secondary",tertiary:"tertiary","link-color":"link-color","link-gray":"link-gray","destructive-primary":"destructive-primary","destructive-secondary":"destructive-secondary","destructive-tertiary":"destructive-tertiary","destructive-link":"destructive-link"},be={sm:{height:36,paddingX:12,paddingXLg:12,fontSize:14,lineHeight:20,iconSize:20,gap:4,iconOnlyPad:8},md:{height:40,paddingX:14,paddingXLg:14,fontSize:14,lineHeight:20,iconSize:20,gap:4,iconOnlyPad:10},lg:{height:44,paddingX:16,paddingXLg:16,fontSize:16,lineHeight:24,iconSize:20,gap:6,iconOnlyPad:12},xl:{height:48,paddingX:18,paddingXLg:18,fontSize:16,lineHeight:24,iconSize:20,gap:6,iconOnlyPad:14}},we=function(o){var i=o.size,r=o.color;return e(t,{children:[n("style",{children:"@keyframes aha-button-spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}"}),e("svg",{width:i,height:i,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,style:{animation:"aha-button-spin 1s linear infinite",flexShrink:0},children:[n("circle",{cx:"12",cy:"12",r:"10",stroke:r,strokeWidth:"2",opacity:"0.25"}),n("path",{d:"M22 12a10 10 0 0 1-10 10",stroke:r,strokeWidth:"2",strokeLinecap:"round",fill:"none"})]})]})},ke=function(t){var o=t.children,i=t.type,r=void 0===i?"default":i,a=t.size,d=void 0===a?"md":a,s=t.disabled,c=void 0!==s&&s,p=t.loading,u=void 0!==p&&p,x=t.iconOnly,g=t.focused,m=void 0!==g&&g,b=t.onClick,W=t.htmlType,E=void 0===W?"button":W,B=t.className,N=void 0===B?"":B,T=t.style,R=t.icon,Y=t.iconPosition,G=void 0===Y?"left":Y,J=h(t,["children","type","size","disabled","loading","iconOnly","focused","onClick","htmlType","className","style","icon","iconPosition"]),_=v().primaryColor,Z=l(!1),$=Z[0],ee=Z[1],ne=l(!1),te=ne[0],oe=ne[1],ie=ye[r]||"default",re=be[ve[d]||"md"],le=null!=x?x:!!R&&null==o,ae="link-color"===ie||"link-gray"===ie||"destructive-link"===ie,de=c||u,pe=m,ke=_,Se=function(e){var n=e.hierarchy,t=e.disabled,o=e.interactive,i=fe(e.brandColor),r=he,l=w,a=k;return t?"default"===n||"primary"===n||"secondary"===n||"destructive-primary"===n||"destructive-secondary"===n?{bg:K,color:Q,iconColor:Q,border:"1px solid ".concat(O),boxShadow:"none"}:{bg:"transparent",color:Q,iconColor:Q,border:"none",boxShadow:"none"}:"default"===n?{bg:o?X:P,color:o?l:A,iconColor:o?xe:q,border:"1px solid ".concat(o?xe:M),boxShadow:"none"}:"primary"===n?{bg:o?r:i,color:D,iconColor:y,border:"none",boxShadow:se}:"secondary"===n?{bg:o?X:P,color:o?"#292524":A,iconColor:o?"#79716b":q,border:"none",boxShadow:se}:"tertiary"===n?{bg:o?X:"transparent",color:o?"#44403c":I,iconColor:o?"#79716b":q,border:"none",boxShadow:"none"}:"link-color"===n?{bg:"transparent",color:o?a:l,iconColor:xe,border:"none",boxShadow:"none",textDecoration:o?"underline":"none"}:"link-gray"===n?{bg:"transparent",color:o?"#44403c":I,iconColor:q,border:"none",boxShadow:"none",textDecoration:o?"underline":"none"}:"destructive-primary"===n?{bg:o?L:z,color:D,iconColor:o?S:C,border:"none",boxShadow:se}:"destructive-secondary"===n?{bg:o?V:P,color:j,iconColor:U,border:"none",boxShadow:"inset 0 0 0 1px ".concat(H,", inset 0 -2px 0 0 rgba(10,13,18,0.05), 0 1px 2px 0 rgba(10,13,18,0.05)")}:"destructive-tertiary"===n?{bg:o?V:"transparent",color:j,iconColor:U,border:"none",boxShadow:"none"}:{bg:"transparent",color:o?F:j,iconColor:U,border:"none",boxShadow:"none",textDecoration:o?"underline":"none"}}({hierarchy:ie,disabled:c,interactive:$||te,brandColor:ke}),Ce=function(e,n,t){if(n)return"destructive-primary"===e||"destructive-secondary"===e||"destructive-tertiary"===e||"destructive-link"===e?"destructive-primary"===e||"destructive-secondary"===e?ce.errorShadowXsSkeuomorphic:ce.error:"primary"===e||"secondary"===e?ue(t)?ce.shadowXsSkeuomorphic:"".concat(se,", 0px 0px 0px 2px #ffffff, 0px 0px 0px 4px ").concat(t):ue(t)?ce.default:"0px 0px 0px 2px #ffffff, 0px 0px 0px 4px ".concat(t)}(ie,pe,ke),ze=f({position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:re.gap,fontFamily:ge,fontWeight:600,fontSize:re.fontSize,lineHeight:"".concat(re.lineHeight,"px"),cursor:de?"not-allowed":"pointer",outline:"none",transition:"background-color .15s ease, color .15s ease, box-shadow .15s ease",userSelect:"none",WebkitTapHighlightColor:"transparent",whiteSpace:"nowrap",backgroundColor:Se.bg,color:Se.color,border:Se.border,boxShadow:null!=Ce?Ce:Se.boxShadow,textDecoration:Se.textDecoration},T);ae?(ze.borderRadius="4px",ze.overflow="hidden",le?(ze.width=re.height,ze.height=re.height,ze.padding=0):(ze.height=re.height,ze.paddingLeft=re.paddingX,ze.paddingRight=re.paddingX)):(ze.borderRadius=me,le?(ze.width=re.height,ze.height=re.height,ze.padding=0):(ze.height=re.height,ze.paddingLeft=re.paddingX,ze.paddingRight=re.paddingX));var Le=function(){return u?n(we,{size:re.iconSize,color:Se.iconColor}):R?n("span",{"aria-hidden":!0,style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:re.iconSize,height:re.iconSize,color:Se.iconColor,flexShrink:0},children:R}):null},Fe=u||R&&"left"===G,We=!u&&R&&"right"===G;return e("button",f({type:E,className:["aha-button","aha-button--".concat(ie),"aha-button--".concat(ve[d]||"md"),le&&"aha-button--icon-only",de&&"aha-button--disabled",u&&"aha-button--loading",pe&&"aha-button--focused",N].filter(Boolean).join(" "),disabled:de,onClick:function(e){de?e.preventDefault():null==b||b(e)},onMouseEnter:function(){return!de&&ee(!0)},onMouseLeave:function(){ee(!1),oe(!1)},onMouseDown:function(){return!de&&oe(!0)},onMouseUp:function(){return oe(!1)},style:ze},J,{children:[Fe&&Le(),!le&&o,We&&Le(),le&&!R&&!u&&o]}))};ke.displayName="Button";var Se=_.body,Ce=Z.md,ze=Z.sm,Le=ee.md,Fe=ee.sm,We=ae,Ae=de,Ie=te,Ee={textPrimary:W,textSecondary:A,textTertiary:I,textDisabled:E,textPlaceholder:B,borderPrimary:M,borderDisabled:R,borderBrand:N,borderError:T,borderErrorSubtle:H,bgPrimary:P,bgDisabledSubtle:Y,fgDisabled:Q,fgQuaternary:q,error600:L};function Be(e){var n=e.disabled,t=void 0!==n&&n,o=e.error,i=void 0!==o&&o,r=e.focused,l=void 0!==r&&r,a=e.brandColor,d=Ee,s=Ae,c=a||d.borderBrand;return t?{border:"1px solid ".concat(d.borderDisabled),boxShadow:s,outline:"none"}:i&&l?{border:"1px solid ".concat(d.borderError),boxShadow:s,outline:"2px solid ".concat(d.borderError),outlineOffset:"-2px"}:i?{border:"1px solid ".concat(d.borderErrorSubtle),boxShadow:s,outline:"none"}:l?{border:"1px solid ".concat(c),boxShadow:s,outline:"2px solid ".concat(c),outlineOffset:"-2px"}:{border:"1px solid ".concat(d.borderPrimary),boxShadow:s,outline:"none"}}function De(){return{fontFamily:Se,fontSize:ze,fontWeight:500,lineHeight:Fe,color:Ee.textSecondary}}function je(e){return void 0===e&&(e=!1),{margin:0,fontFamily:Se,fontSize:ze,fontWeight:400,lineHeight:Fe,color:e?Ee.error600:Ee.textTertiary}}var Me={small:{pt:"5px",pb:"5px"},mediumSmall:{pt:"7px",pb:"7px"},medium:{pt:"9px",pb:"9px"},large:{pt:"11px",pb:"11px"}};a(function(t,o){var i=t.size,r=void 0===i?"mediumSmall":i,a=t.error,c=void 0!==a&&a,p=t.disabled,u=void 0!==p&&p,x=t.readOnly,g=void 0!==x&&x,m=t.prefix,y=t.suffix,b=t.leadingText,w=t.trailingText,k=t.leadingAddon,S=t.trailingAddon,C=t.className,z=void 0===C?"":C,L=t.style,F=t.onFocus,W=t.onBlur,A=t.onKeyDown,I=t.onPressEnter,E=t.value,B=t.defaultValue,D=t.onChange,j=t.placeholder,M=t.type,N=void 0===M?"text":M,T=t.label,H=t.required,R=t.hintText,O=h(t,["size","error","disabled","readOnly","prefix","suffix","leadingText","trailingText","leadingAddon","trailingAddon","className","style","onFocus","onBlur","onKeyDown","onPressEnter","value","defaultValue","onChange","placeholder","type","label","required","hintText"]),P=d(null),X=l(!1),K=X[0],Y=X[1],V=l(null!=B?B:""),q=V[0],Q=V[1],G=v().primaryColor;s(function(){"function"==typeof o?o(P.current):o&&(o.current=P.current)},[o]);var J=void 0!==E,U=J?E:q,_=Be({disabled:u,error:c,focused:K,brandColor:G}),Z=_.border,$=_.boxShadow,ee=_.outline,ne=_.outlineOffset,te=Me[r],oe=te.pt,ie=te.pb,re=u?Ee.borderDisabled:Ee.borderPrimary,le=!!m,ae=!!y,de={position:"absolute",top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",color:u?Ee.fgDisabled:Ee.fgQuaternary,zIndex:1,pointerEvents:"none"},se={display:"flex",alignItems:"center",paddingTop:oe,paddingBottom:ie,paddingLeft:"14px",paddingRight:"12px",color:Ee.textTertiary,fontFamily:Se,fontSize:Ce,lineHeight:Le,whiteSpace:"nowrap",flexShrink:0,backgroundColor:u?Ee.bgDisabledSubtle:"transparent"},ce=e("div",{className:"aha-input-group ".concat(z),style:f({display:"flex",alignItems:"stretch",width:"100%",border:Z,boxShadow:$,outline:ee,outlineOffset:ne,borderRadius:We,backgroundColor:u||g?Ee.bgDisabledSubtle:Ee.bgPrimary,overflow:"hidden",boxSizing:"border-box",transition:"border-color 0.15s ease, box-shadow 0.15s ease"},L),children:[void 0!==b&&n("div",{style:f(f({},se),{borderRight:"1px solid ".concat(re)}),children:b}),void 0!==k&&n("div",{style:{display:"flex",alignItems:"stretch",flexShrink:0,borderRight:"1px solid ".concat(re)},children:k}),e("div",{style:{flex:1,position:"relative",display:"flex",alignItems:"stretch",minWidth:0},children:[le&&n("span",{style:f(f({},de),{left:"14px"}),children:m}),n("input",f({ref:P,type:N,value:U,placeholder:j,disabled:u,readOnly:g,onChange:function(e){J||Q(e.target.value),null==D||D(e)},onFocus:function(e){Y(!0),null==F||F(e)},onBlur:function(e){Y(!1),null==W||W(e)},onKeyDown:function(e){"Enter"===e.key&&I&&I(e),null==A||A(e)},style:{flex:1,border:"none",outline:"none",width:"100%",boxSizing:"border-box",fontFamily:Se,fontSize:Ce,fontWeight:400,lineHeight:Le,backgroundColor:"transparent",color:u?Ee.textDisabled:Ee.textPrimary,paddingTop:oe,paddingBottom:ie,paddingLeft:le?"40px":"14px",paddingRight:ae?"40px":"14px"},autoComplete:O.autoComplete||"off"},O)),ae&&n("span",{style:f(f({},de),{right:"14px"}),children:y})]}),void 0!==w&&n("div",{style:f(f({},se),{paddingLeft:"12px",paddingRight:"14px",borderLeft:"1px solid ".concat(re)}),children:w}),void 0!==S&&n("div",{style:{display:"flex",alignItems:"stretch",flexShrink:0,borderLeft:"1px solid ".concat(re)},children:S})]});return T||R?e("div",{style:{display:"flex",flexDirection:"column",gap:"6px",width:"100%"},children:[T&&e("label",{style:De(),children:[T,H&&n("span",{style:{color:Ee.error600,marginLeft:"2px"},children:"*"})]}),ce,R&&n("p",{style:je(c),children:R})]}):ce}).displayName="InputGroup";var Ne={small:{height:"36px",paddingTop:"5px",paddingBottom:"5px"},mediumSmall:{height:"40px",paddingTop:"7px",paddingBottom:"7px"},medium:{height:"44px",paddingTop:"9px",paddingBottom:"9px"},large:{height:"48px",paddingTop:"11px",paddingBottom:"11px"}},Te=function(e){var t=e.onClick;return n("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:t,style:{cursor:"pointer",flexShrink:0},children:n("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},He=a(function(i,r){var l=i.size,a=void 0===l?"mediumSmall":l,c=i.disabled,p=void 0!==c&&c,u=i.error,x=void 0!==u&&u,g=i.readOnly,m=void 0!==g&&g,y=i.prefix,b=i.suffix,w=i.allowClear,k=void 0!==w&&w,S=i.onClear,C=i.className,z=void 0===C?"":C,L=i.style,F=i.type,W=void 0===F?"text":F,A=i.placeholder,I=i.value,E=i.defaultValue,B=i.onChange,D=i.onFocus,j=i.onBlur,M=i.onPressEnter,N=i.label,T=i.required,H=i.hintText,R=h(i,["size","disabled","error","readOnly","prefix","suffix","allowClear","onClear","className","style","type","placeholder","value","defaultValue","onChange","onFocus","onBlur","onPressEnter","label","required","hintText"]),O=d(null),P=o.useState(E||I||""),X=P[0],K=P[1],Y=o.useState(!1),V=Y[0],q=Y[1],Q=v().primaryColor;s(function(){"function"==typeof r?r(O.current):r&&(r.current=O.current)},[r]);var G,J,U,_=void 0!==I,Z=_?I:X,$=k&&Z&&!p,ee=Be({disabled:p,error:x,focused:V,brandColor:Q}),ne=Ne[a],te=ne.height,oe=ne.paddingTop,ie=ne.paddingBottom,re=y?"40px":"14px",le=b||$?"40px":"14px",ae=f(f(f({width:"100%",height:te,boxSizing:"border-box",fontFamily:Se,fontSize:Ce,fontWeight:400,lineHeight:Le,borderRadius:We},ee),{backgroundColor:p||m?Ee.bgDisabledSubtle:Ee.bgPrimary,color:p?Ee.textDisabled:Ee.textPrimary,paddingTop:oe,paddingBottom:ie,paddingLeft:re,paddingRight:le,transition:"border-color 0.15s ease, box-shadow 0.15s ease, outline-color 0.15s ease",WebkitAppearance:"none",MozAppearance:"textfield",appearance:"none"}),L),de=(void 0===(J='\n .aha-input-wrapper input {\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n touch-action: manipulation;\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"] { -moz-appearance: textfield; }\n ')&&(J=""),void 0===U&&(U=Ee.textPlaceholder),"\n ".concat(G=".aha-input-wrapper input","::placeholder {\n color: ").concat(U,";\n font-size: ").concat(Ce,";\n font-weight: 400;\n opacity: 1;\n }\n ").concat(G,"::-webkit-input-placeholder { color: ").concat(U,"; }\n ").concat(G,"::-moz-placeholder { color: ").concat(U,"; }\n ").concat(G,":-ms-input-placeholder { color: ").concat(U,"; }\n ").concat(J,"\n ")),se={position:"absolute",top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",color:p?Ee.fgDisabled:Ee.fgQuaternary,zIndex:1},ce=e(t,{children:[n("style",{children:de}),e("div",{className:"aha-input-wrapper ".concat(z),style:{position:"relative",display:"block",width:"100%"},children:[y&&n("span",{style:f(f({},se),{left:"14px",pointerEvents:"none"}),children:y}),n("input",f({ref:O,type:W,value:Z,placeholder:A,disabled:p,readOnly:m,onChange:function(e){_||K(e.target.value),null==B||B(e)},onFocus:function(e){q(!0),null==D||D(e)},onBlur:function(e){q(!1),null==j||j(e)},onKeyDown:function(e){var n;"Enter"===e.key&&M&&M(e),null===(n=R.onKeyDown)||void 0===n||n.call(R,e)},style:ae,autoComplete:R.autoComplete||"off",autoCorrect:R.autoCorrect||"off",autoCapitalize:R.autoCapitalize||"off",spellCheck:R.spellCheck||!1},R)),(b||$)&&e("span",{style:f(f({},se),{right:"14px",gap:Ie}),children:[$&&n(Te,{onClick:function(e){var n;e.stopPropagation(),_||K("");null==B||B({target:{value:""},currentTarget:{value:""}}),null==S||S(),null===(n=O.current)||void 0===n||n.focus()}}),b]})]})]});return N||H?e("div",{style:{display:"flex",flexDirection:"column",gap:"6px",width:"100%"},children:[N&&e("label",{style:De(),children:[N,T&&n("span",{style:{color:Ee.error600,marginLeft:"2px"},children:"*"})]}),ce,H&&n("p",{style:je(x),children:H})]}):ce});He.displayName="Input";var Re=function(i){var r,a=i.value,h=i.defaultValue,g=i.options,m=void 0===g?[]:g,y=i.mode,b=i.disabled,w=void 0!==b&&b,k=i.error,S=void 0!==k&&k,C=i.placeholder,z=void 0===C?"Please select":C,L=i.size,F=void 0===L?"medium":L,W=i.showSearch,A=void 0!==W&&W,I=i.filterOption,E=void 0===I||I,B=i.allowClear,D=void 0!==B&&B,j=i.onChange,M=i.onSelect,N=i.onDeselect,T=i.onSearch,H=i.onFocus,R=i.onBlur,O=i.onDropdownVisibleChange,P=i.className,X=void 0===P?"":P,K=i.style,Y=i.dropdownClassName,V=void 0===Y?"":Y,q=i.dropdownStyle,Q=i.defaultOpen,G=void 0!==Q&&Q,J=i.open,U=i.maxTagCount,_=i.tagRender,Z=i.optionRender,$=v().primaryColor,ee=void 0===$?"#FB6011":$,ne=l(void 0!==h?h:y?[]:void 0),te=ne[0],oe=ne[1],ie=l(G),re=ie[0],le=ie[1],ae=l(""),de=ae[0],se=ae[1],ce=l(-1),pe=ce[0],ue=ce[1],fe=d(null),he=d(null),xe=d(null),ge=l(null),me=ge[0],ve=ge[1],ye=void 0!==a,be=void 0!==J,we=ye?a:te,ke=be?J:re,Se="multiple"===y||"tags"===y,Ce=c(function(){if(!we)return[];var e=Array.isArray(we)?we:[we];return m.filter(function(n){return e.includes(n.value)})},[we,m]),ze=c(function(){return A&&de?!1===E?m:"function"==typeof E?m.filter(function(e){return E(de,e)}):m.filter(function(e){var n=String(e.label||"").toLowerCase(),t=de.toLowerCase();return n.includes(t)}):m},[m,de,A,E]),Le=p(function(){return ze()},[ze]);s(function(){if(ke&&fe.current){var e=function(){var e,n;if(fe.current){var t=fe.current.getBoundingClientRect(),o=null!==(n=null===(e=xe.current)||void 0===e?void 0:e.offsetHeight)&&void 0!==n?n:Math.min(256,Math.max(40,40*Le.length)),i=window.innerHeight-t.bottom,r=t.top,l=i<o+4&&r>i,a=l?t.top+window.scrollY-o-4:t.bottom+window.scrollY+4;ve({top:a,left:t.left+window.scrollX,width:t.width,placement:l?"top":"bottom"})}};return e(),requestAnimationFrame(e),window.addEventListener("resize",e),window.addEventListener("scroll",e,!0),function(){window.removeEventListener("resize",e),window.removeEventListener("scroll",e,!0)}}ve(null)},[ke,Le.length]),s(function(){var e=function(e){var n=e.target;fe.current&&!fe.current.contains(n)&&xe.current&&!xe.current.contains(n)&&(be||le(!1),null==O||O(!1),se(""))};if(ke)return document.addEventListener("mousedown",e,!0),document.addEventListener("touchstart",e,!0),function(){document.removeEventListener("mousedown",e,!0),document.removeEventListener("touchstart",e,!0)}},[ke,be,O]),s(function(){if(ke){var e=function(e){var n;if("ArrowDown"===e.key)e.preventDefault(),ue(function(e){return e<Le.length-1?e+1:e});else if("ArrowUp"===e.key)e.preventDefault(),ue(function(e){return e>0?e-1:0});else if("Enter"===e.key&&pe>=0){e.preventDefault();var t=Le[pe];t&&!t.disabled&&Fe(t)}else"Escape"===e.key&&(e.preventDefault(),be||le(!1),null==O||O(!1),null===(n=fe.current)||void 0===n||n.focus())};return window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}},[ke,Le,pe,be,O]),s(function(){if(pe>=0&&xe.current){var e=xe.current.querySelectorAll(".aha-select-option")[pe];e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})}},[pe]);var Fe=c(function(e){var n;if(!e.disabled)if(Se){var t,o=Array.isArray(we)?we:[];o.includes(e.value)?(t=o.filter(function(n){return n!==e.value}),null==N||N(e.value,e)):(t=x(x([],o,!0),[e.value],!1),null==M||M(e.value,e)),ye||oe(t);var i=m.filter(function(e){return t.includes(e.value)});null==j||j(t,i)}else ye||oe(e.value),null==j||j(e.value,e),null==M||M(e.value,e),be||le(!1),null==O||O(!1),se(""),null===(n=fe.current)||void 0===n||n.focus()},[Se,we,ye,be,m,j,M,N,O]),We=c(function(e,n){if(e.stopPropagation(),Se&&Array.isArray(we)){var t=we.filter(function(e){return e!==n}),o=m.find(function(e){return e.value===n});ye||oe(t),null==j||j(t,Ce()),null==N||N(n,o)}},[Se,we,ye,m,j,N,Ce]),Ae=function(e){e.stopPropagation();var n=Se?[]:void 0;ye||oe(n),null==j||j(n,[]),se("")},Ie={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"}},Ee=p(function(){return Ce()},[Ce]),Be=p(function(){return D&&we&&!w},[D,we,w]),De=p(function(){return Se?Array.isArray(we)&&we.length>0:null!=we&&""!==we},[Se,we]),je=p(function(){if(!Se||!Array.isArray(we)||0===we.length)return null;var t="responsive"===U?Ee.slice(0,2):U?Ee.slice(0,U):Ee,i=U&&Ee.length>t.length?Ee.length-t.length:0;return e("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"4px",flex:1,minWidth:0},children:[t.map(function(t){var i={label:t.label,value:t.value,closable:!w,onClose:function(){return We({},t.value)}};return _?n(o.Fragment,{children:_(i)},t.value):e("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:[n("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.label}),!w&&n("span",{onClick:function(e){return We(e,t.value)},style:{cursor:"pointer",display:"flex",alignItems:"center",color:"#78716C",marginLeft:"4px"},children:n("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n("path",{d:"M9 3L3 9M3 3L9 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]},t.value)}),i>0&&e("span",{style:{fontSize:"12px",lineHeight:"18px",color:"#78716C",fontFamily:"DM Sans, sans-serif"},children:["+",i]})]})},[Se,we,Ee,U,w,_]);return e(t,{children:[n("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 "}),e("div",{ref:fe,className:"aha-select ".concat(X),style:f({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(S?"#F04438":ke?ee:"#D7D3D0"),backgroundColor:w?"#FAFAF9":"#FFFFFF",cursor:w?"not-allowed":"pointer",transition:"all 0.2s",paddingLeft:"12px",paddingRight:"36px",paddingTop:Ie[F].paddingTop,paddingBottom:Ie[F].paddingBottom,fontSize:Ie[F].fontSize,lineHeight:Ie[F].lineHeight,fontWeight:400,WebkitTapHighlightColor:"transparent",WebkitTouchCallout:"none",touchAction:"manipulation",userSelect:"none"},K),onClick:function(){if(!w){var e=!ke;be||le(e),null==O||O(e),e&&A?setTimeout(function(){var e;null===(e=he.current)||void 0===e||e.focus()},0):se("")}},onFocus:function(e){null==H||H(e)},onBlur:function(e){null==R||R(e)},onTouchStart:function(e){w||(e.currentTarget.style.opacity="0.8")},onTouchEnd:function(e){e.currentTarget.style.opacity="1"},tabIndex:w?-1:0,children:[n("div",{style:{display:"flex",alignItems:"center",flex:1,minWidth:0,gap:"8px"},children:Se?je||n("span",z?{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"#79716B",fontSize:"16px",lineHeight:"24px",fontWeight:400},children:z}:{style:{flex:1,minHeight:"24px"}}):A&&ke?n("input",{ref:he,type:"text",value:de,onChange:function(e){var n=e.target.value;se(n),null==T||T(n),ue(-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:w?"#98A2B3":"#1C1917",fontFamily:"DM Sans, sans-serif",minWidth:0,WebkitAppearance:"none",appearance:"none"},placeholder:De?void 0:z,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1}):n("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:De?w?"#98A2B3":"#1C1917":"#79716B",fontSize:"16px",lineHeight:"24px",fontWeight:400,minHeight:"24px",display:"inline-block"},children:De?(null===(r=Ee[0])||void 0===r?void 0:r.label)||we:z||" "})}),e("div",{style:{position:"absolute",right:"12px",display:"flex",alignItems:"center",gap:"4px"},children:[Be&&n(function(){return n("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",onClick:Ae,style:{cursor:"pointer",flexShrink:0,color:"#78716C"},children:n("path",{d:"M12 4L4 12M4 4L12 12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},{}),n(function(e){var t=e.isOpen;return n("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:t?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s ease-in-out",flexShrink:0},children:n("path",{d:"M4 6L8 10L12 6",stroke:"#78716C",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})},{isOpen:ke})]})]}),ke&&me&&u(n("div",{ref:xe,className:"aha-select-dropdown ".concat(V),style:f({position:"absolute",top:"".concat(me.top,"px"),left:"".concat(me.left,"px"),width:"".concat(me.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:"top"===me.placement?"translateY(8px)":"translateY(-8px)",animation:"dropdownFadeIn 0.2s ease-out forwards",transformOrigin:"top"===me.placement?"bottom center":"top center",WebkitOverflowScrolling:"touch",overscrollBehavior:"contain"},q),children:0===Le.length?n("div",{style:{padding:"8px 16px",textAlign:"center",color:"#78716C",fontSize:"14px",fontFamily:"DM Sans, sans-serif"},children:"No data"}):Le.map(function(t,o){var i=Se?Array.isArray(we)&&we.includes(t.value):we===t.value,r=o===pe;return Z?n("div",{className:"aha-select-option ".concat(t.disabled?"":"hover:bg-[#FAFAF9]"," ").concat(i?"bg-[#FAFAF9]":""),onClick:function(){return!t.disabled&&Fe(t)},style:{cursor:t.disabled?"not-allowed":"pointer",transition:"background-color 0.2s"},children:Z(t,{selected:i,focused:r,disabled:t.disabled||!1})},t.value):e("div",{className:"aha-select-option ".concat(t.disabled?"":"hover:bg-[#FAFAF9]"," ").concat(i?"bg-[#FAFAF9]":""),onClick:function(){return Fe(t)},style:{padding:"8px 16px",cursor:t.disabled?"not-allowed":"pointer",color:t.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:[n("span",{children:t.label}),i&&n("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:r?"hidden":"",children:n("path",{d:"M13.3333 4L6 11.3333L2.66667 8",stroke:ee,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]},t.value)})}),document.body)]})};Re.displayName="Select";var Oe=function(e){var t=e.className,o=e.style;return n("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,style:o,children:n("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"})})},Pe=function(t){var o=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:o,style:i,children:[n("path",{d:"M3.5 4.5L6 2L8.5 4.5",stroke:"#A9A29D",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),n("path",{d:"M3.5 7.5L6 10L8.5 7.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})},Xe=function(t){var o=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:o,style:i,children:[n("path",{d:"M8.5 7.5L6 10L3.5 7.5",stroke:"#A9A29D",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),n("path",{d:"M8.5 4.5L6 2L3.5 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})},Ke=function(e){var t=e.className,o=e.style;return n("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,style:o,children:n("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"})})},Ye=function(e){var t=e.className,o=e.style;return n("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,style:o,children:n("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"})})},Ve=function(o){var i=o.current,r=o.defaultCurrent,a=void 0===r?1:r,d=o.total,c=void 0===d?0:d,u=o.pageSize,h=o.defaultPageSize,x=void 0===h?10:h,g=o.showSizeChanger,m=void 0!==g&&g,y=o.pageSizeOptions,b=void 0===y?["10","20","50","100"]:y,w=o.showQuickJumper,k=void 0!==w&&w,S=o.showTotal,C=o.onChange,z=o.onShowSizeChange,L=o.simple,F=void 0!==L&&L,W=o.disabled,A=void 0!==W&&W,I=o.hideOnSinglePage,E=void 0!==I&&I,B=o.className,D=void 0===B?"":B,j=o.style,M=o.size,N=void 0===M?"default":M,T=o.responsive,H=void 0!==T&&T;o.showLessItems;var R=o.itemRender,O=v().primaryColor,P=void 0===O?"#FB6011":O,X=l(a),K=X[0],Y=X[1],V=l(x),q=V[0],Q=V[1],G=l(""),J=G[0],U=G[1],_=null!=i?i:K,Z=null!=u?u:q,$=p(function(){return Math.ceil(c/Z)},[c,Z]);s(function(){void 0!==i&&Y(i)},[i]),s(function(){void 0!==u&&Q(u)},[u]);var ee=function(e){e<1||e>$||e===_||A||(void 0===i&&Y(e),null==C||C(e,Z))},ne=function(){var e=parseInt(J,10);e>=1&&e<=$&&(ee(e),U(""))};if(E&&$<=1)return null;if(F)return e("div",{className:"aha-pagination aha-pagination-simple ".concat(D),style:j,children:[n(ke,{onClick:function(){return ee(_-1)},disabled:A||1===_,type:"default",size:"default"===N?"medium":"small",style:{marginRight:"8px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:n(Ke,{})}),e("span",{style:{margin:"0 8px",fontSize:"14px",lineHeight:"20px",color:"#475467",fontFamily:"DM Sans, sans-serif"},children:[_," / ",$]}),n(ke,{onClick:function(){return ee(_+1)},disabled:A||_===$,type:"default",size:"default"===N?"medium":"small",style:{marginLeft:"8px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:n(Ye,{})})]});var te=(_-1)*Z+1,oe=Math.min(_*Z,c);return e("div",{className:"aha-pagination w-full ".concat(D),style:f({display:"flex",alignItems:"center",justifyContent:"space-between",flexWrap:H?"wrap":"nowrap",fontFamily:"DM Sans, sans-serif"},j),children:[S&&n("div",{className:"justify-start text-Text-text-secondary text-sm font-medium font-['DM_Sans'] leading-5",children:S(c,[te,oe])}),e("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[c>0&&n(t,{children:R?R(_-1,"prev",n(ke,{onClick:function(){return ee(_-1)},disabled:A||1===_,type:"default",size:"default"===N?"medium":"small",style:{height:"small"===N?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:n(Ke,{})})):n(ke,{onClick:function(){return ee(_-1)},disabled:A||1===_,type:"default",size:"default"===N?"medium":"small",style:{height:"small"===N?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:n(Ke,{})})}),n("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:function(){if($<=7)return Array.from({length:$},function(e,n){return n+1});var e=[];if(_<=4){for(var n=1;n<=5;n++)e.push(n);e.push("jump-next"),e.push($)}else if(_>=$-3){e.push(1),e.push("jump-prev");for(n=$-4;n<=$;n++)e.push(n)}else{e.push(1),e.push("jump-prev");for(n=_-1;n<=_+1;n++)e.push(n);e.push("jump-next"),e.push($)}return e}().map(function(e){return function(e){if("number"==typeof e){var t=e===_,o=n(ke,{onClick:function(){return ee(e)},disabled:A,type:t?"primary":"default",size:"default"===N?"medium":"small",style:{minWidth:"small"===N?"32px":"36px",height:"small"===N?"32px":"36px",padding:"0 12px",margin:0,fontWeight:t?500:400,border:t?"1px solid ".concat(P):void 0,boxShadow:"none",borderRadius:"8px"},children:e},e);return R?R(e,"page",o):o}if("jump-prev"===e)return o=n(ke,{onClick:function(){return ee(Math.max(1,_-5))},disabled:A,type:"default",size:"default"===N?"medium":"small",style:{minWidth:"small"===N?"32px":"36px",height:"small"===N?"32px":"36px",padding:"0 12px",margin:0,border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"•••"},"jump-prev"),R?R(_-5,"jump-prev",o):o;if("jump-next"===e)return o=n(ke,{onClick:function(){return ee(Math.min($,_+5))},disabled:A,type:"default",size:"default"===N?"medium":"small",style:{minWidth:"small"===N?"32px":"36px",height:"small"===N?"32px":"36px",padding:"0 12px",margin:0,border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"•••"},"jump-next"),R?R(_+5,"jump-next",o):o;return null}(e)})}),c>0&&n(t,{children:R?R(_+1,"next",n(ke,{onClick:function(){return ee(_+1)},disabled:A||_===$,type:"default",size:"default"===N?"medium":"small",style:{height:"small"===N?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:n(Ye,{})})):n(ke,{onClick:function(){return ee(_+1)},disabled:A||_===$,type:"default",size:"default"===N?"medium":"small",style:{height:"small"===N?"32px":"36px",padding:"0 12px",gap:"4px",border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:n(Ye,{})})}),m&&n(Re,{value:Z,options:b.map(function(e){return{label:"".concat(e," / page"),value:Number(e)}}),onChange:function(e){return n=Number(e),t=Math.ceil(c/n),o=_>t?t:_,void 0===u&&Q(n),void 0===i&&Y(o),null==z||z(o,n),void(null==C||C(o,n));var n,t,o},disabled:A,size:"small"===N?"small":"medium",style:{minWidth:"small"===N?80:96}}),k&&e("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontFamily:"DM Sans, sans-serif"},children:[n("span",{style:{fontSize:"14px",lineHeight:"20px",color:"#475467"},children:"Go to"}),n(He,{type:"number",min:1,value:J,onChange:function(e){return U(e.target.value)},onPressEnter:ne,disabled:A,size:"small"===N?"small":"medium",style:{width:56,minWidth:56}}),n("span",{style:{fontSize:"14px",lineHeight:"20px",color:"#475467"},children:"page"}),"object"==typeof k&&k.goButton?n(ke,{onClick:ne,disabled:A,type:"default",size:"default"===N?"medium":"small",style:{border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:k.goButton}):n(ke,{onClick:ne,disabled:A,type:"default",size:"default"===N?"medium":"small",style:{border:"1px solid #EAECF0",boxShadow:"none",borderRadius:"8px"},children:"OK"})]})]})]})},qe=_.body,Qe=$.medium,Ge=$.regular;function Je(e){return{fontSize:"sm"===e?Z.sm:Z.md,lineHeight:"sm"===e?ee.sm:ee.md,gap:"sm"===e?oe:ie,hintGap:"md"===e?ne:"0"}}function Ue(e,n){return e?ue(n)?ce.default:"0px 0px 0px 2px #ffffff, 0px 0px 0px 4px ".concat(n):"none"}function _e(e){var n=Je(e.size);return{fontSize:n.fontSize,lineHeight:n.lineHeight,fontWeight:Qe,fontFamily:qe,color:e.disabled?E:A,userSelect:"none"}}function Ze(e){var n=Je(e);return{fontSize:n.fontSize,lineHeight:n.lineHeight,fontWeight:Ge,fontFamily:qe,color:I}}var $e=function(t){var o=t.checked,i=void 0!==o&&o,r=t.indeterminate,a=void 0!==r&&r,d=t.disabled,s=void 0!==d&&d,c=t.onChange,p=t.className,u=void 0===p?"":p,h=t.style,x=t.children,g=t.size,m=void 0===g?"sm":g,y=t.hint,b=t.isFocused,w=v().primaryColor,k=l(!1),S=k[0],C=k[1],z=l(!1),L=z[0],F=z[1],W=i||a,A=null!=b?b:L,I=function(){s||(null==c||c({target:{checked:!i},currentTarget:{checked:!i}}))},E="sm"===m?"16px":"20px",B="sm"===m?"12px":"14px",D=function(e){return"sm"===e?re:le}(m),j=Je(m),N=j.gap,T=j.hintGap,H=function(e){var n=e.disabled,t=e.active,o=e.hovered,i=fe(e.brandColor);return{bg:n?Y:t?o?he:i:o?X:P,border:"1px solid ".concat(n?R:t?o?he:i:M)}}({disabled:s,active:W,hovered:S,brandColor:w}),O=H.bg,K=H.border,V=function(e,n){return e&&n?G:J}(s,W),q=x||y;return e("div",{className:"aha-checkbox ".concat(u),role:"checkbox","aria-checked":a?"mixed":i,"aria-disabled":s,tabIndex:s?-1:0,style:f({display:"inline-flex",alignItems:"flex-start",gap:N,cursor:s?"not-allowed":"pointer",outline:"none"},h),onClick:I,onKeyDown:function(e){" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),I())},onMouseEnter:function(){return!s&&C(!0)},onMouseLeave:function(){return C(!1)},onFocus:function(){return!s&&F(!0)},onBlur:function(){return F(!1)},children:[e("div",{style:{position:"relative",width:E,height:E,minWidth:E,minHeight:E,flexShrink:0,borderRadius:D,border:K,backgroundColor:O,display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.15s, border-color 0.15s, box-shadow 0.15s",boxSizing:"border-box",boxShadow:Ue(A,w),marginTop:q?"2px":"0"},children:[n("svg",{"aria-hidden":"true",viewBox:"0 0 14 14",fill:"none",style:{position:"absolute",width:B,height:B,color:V,opacity:a?1:0,transition:"opacity 0.15s",pointerEvents:"none"},children:n("path",{d:"M2.91675 7H11.0834",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),n("svg",{"aria-hidden":"true",viewBox:"0 0 14 14",fill:"none",style:{position:"absolute",width:B,height:B,color:V,opacity:i&&!a?1:0,transition:"opacity 0.15s",pointerEvents:"none"},children:n("path",{d:"M11.6666 3.5L5.24992 9.91667L2.33325 7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]}),q&&e("div",{style:{display:"inline-flex",flexDirection:"column",gap:T},children:[x&&n("span",{style:_e({size:m,disabled:s}),children:x}),y&&n("span",{style:Ze(m),onClick:function(e){return e.stopPropagation()},children:y})]})]})};$e.displayName="Checkbox";var en=function(o){var i=o.color;return e(t,{children:[n("style",{children:"\n @keyframes aha-table-loading-spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n }\n "}),e("svg",{width:32,height:32,viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,style:{animation:"aha-table-loading-spin 1s linear infinite"},children:[n("circle",{cx:"12",cy:"12",r:"10",stroke:i,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"24",opacity:.3}),n("circle",{cx:"12",cy:"12",r:"10",stroke:i,strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"16"})]})]})},nn=function(e){var t=e.loading,o=e.spinColor;if(!t)return null;var i=!0===t?n(en,{color:o}):t;return n("div",{role:"status","aria-live":"polite","aria-label":"Loading",className:"aha-table-loading-overlay",style:{position:"absolute",inset:0,zIndex:50,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(255, 255, 255, 0.55)",pointerEvents:"auto"},children:i})},tn=function(e,n){return"string"==typeof n?null==e?void 0:e[n]:n.reduce(function(e,n){return null==e?void 0:e[n]},e)},on=function(e,n){var t,o;return"function"==typeof n?n(e):"string"==typeof n?null!==(t=tn(e,n))&&void 0!==t?t:"":null!==(o=e.key)&&void 0!==o?o:""},rn=function(e){var t=e.order,o=v().primaryColor;return"ascend"===t?n(Xe,{style:{color:o}}):"descend"===t?n(Pe,{style:{color:o}}):n(Oe,{})},ln=function(t){var i,r,a,u,g=t.columns,m=void 0===g?[]:g,y=t.dataSource,b=void 0===y?[]:y,w=t.rowKey,k=void 0===w?"key":w,S=t.rowSelection,C=t.pagination,z=void 0!==C&&C,L=t.size,F=void 0===L?"middle":L,W=t.bordered,A=void 0!==W&&W,I=t.loading,E=void 0!==I&&I,B=t.locale,D=t.showHeader,j=void 0===D||D,M=t.title,N=t.footer,T=t.summary,H=t.scroll,R=t.tableLayout,O=void 0===R?"auto":R,P=t.onChange,X=t.onSorterChange,K=t.onPaginationChange,Y=t.onRow,V=t.className,q=void 0===V?"":V,Q=t.innerClassName,G=void 0===Q?"":Q,J=t.style,U=t.expandable,_=t.rowClassName,Z=t.onHeaderRow;t.sticky;var $=h(t,["columns","dataSource","rowKey","rowSelection","pagination","size","bordered","loading","locale","showHeader","title","footer","summary","scroll","tableLayout","onChange","onSorterChange","onPaginationChange","onRow","className","innerClassName","style","expandable","rowClassName","onHeaderRow","sticky"]),ee=v().primaryColor||"#FB6011",ne=l((null==S?void 0:S.selectedRowKeys)||(null==S?void 0:S.defaultSelectedRowKeys)||[]),te=ne[0],oe=ne[1];s(function(){void 0!==(null==S?void 0:S.selectedRowKeys)&&oe(S.selectedRowKeys)},[null==S?void 0:S.selectedRowKeys]);var ie=l(new Map),re=ie[0],le=ie[1],ae=l((null==U?void 0:U.defaultExpandedRowKeys)||[]),de=ae[0],se=ae[1],ce=l(z&&"object"==typeof z&&(z.current||z.defaultCurrent)||1),pe=ce[0],ue=ce[1],fe=l(z&&"object"==typeof z&&(z.pageSize||z.defaultPageSize)||10),he=fe[0],xe=fe[1];s(function(){z&&"object"==typeof z&&(void 0!==z.current&&ue(z.current),void 0!==z.pageSize&&xe(z.pageSize))},[z]);var ge=l(null),me=ge[0],ve=ge[1],ye=l(null),be=ye[0],we=ye[1],ke=l(!1),Se=ke[0],Ce=ke[1],ze=d(null),Le=d(null);s(function(){var e=function(){Ce(window.innerWidth<768)};return e(),window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}},[]);var Fe=c(function(e,n){var t,o,i,r=null===(t=null==S?void 0:S.getCheckboxProps)||void 0===t?void 0:t.call(S,e);if(!(null==r?void 0:r.disabled)){var l,a=on(e,k);l="radio"===(null==S?void 0:S.type)?n?[a]:[]:n?x(x([],te,!0),[a],!1):te.filter(function(e){return e!==a}),oe(l);var d=b.filter(function(e){return l.includes(on(e,k))});null===(o=null==S?void 0:S.onChange)||void 0===o||o.call(S,l,d),null===(i=null==S?void 0:S.onSelect)||void 0===i||i.call(S,e,n,d,new Event("select"))}},[te,k,S,b]),We=c(function(e,n){var t,o,i=n.filter(function(e){var n;return!(null===(n=null==S?void 0:S.getCheckboxProps)||void 0===n?void 0:n.call(S,e).disabled)}).map(function(e){return on(e,k)}),r=e?i:[];oe(r);var l=b.filter(function(e){return r.includes(on(e,k))}),a=e?n.filter(function(e){var n;return!(null===(n=null==S?void 0:S.getCheckboxProps)||void 0===n?void 0:n.call(S,e).disabled)}):[];null===(t=null==S?void 0:S.onChange)||void 0===t||t.call(S,r,l),null===(o=null==S?void 0:S.onSelectAll)||void 0===o||o.call(S,e,l,a)},[k,S,b]),Ae=c(function(e,n){var t=e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex);if(t){var o=new Map(re);null===n?o.delete(t):o.set(t,n),le(o);var i=Array.from(o.entries()).map(function(n){var t=n[0],o=n[1];return{column:m.find(function(e){return(e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex))===t})||e,order:o,field:t,columnKey:t}}),r={column:e,order:n,field:t,columnKey:t};e.onSorterChange&&e.onSorterChange(r),X&&X(1===i.length?i[0]:i),P&&P({current:pe,pageSize:he},{},1===i.length?i[0]:i,{currentDataSource:b,action:"sort"})}},[re,P,X,pe,he,b,m]);c(function(e,n){var t,o,i,r=on(e,k);i=n?x(x([],de,!0),[r],!1):de.filter(function(e){return e!==r}),se(i),null===(t=null==U?void 0:U.onExpand)||void 0===t||t.call(U,n,e),null===(o=null==U?void 0:U.onExpandedRowsChange)||void 0===o||o.call(U,i)},[de,k,U]);var Ie,Ee=c(function(){var e=x([],b,!0);return re.size>0&&e.sort(function(e,n){for(var t=function(t,o){var i=m.find(function(e){return(e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex))===t});if(!i)return"continue";var r=0;if("function"==typeof i.sorter)r=i.sorter(e,n);else if(!0===i.sorter){var l=tn(e,i.dataIndex||t),a=tn(n,i.dataIndex||t);l<a?r=-1:l>a&&(r=1)}return 0!==r?{value:"ascend"===o?r:-r}:void 0},o=0,i=Array.from(re.entries());o<i.length;o++){var r=i[o],l=t(r[0],r[1]);if("object"==typeof l)return l.value}return 0}),e},[b,re,m]),Be=Ee(),De=Boolean(z&&"object"==typeof z&&void 0!==z.total),je=p(function(){if(!1===z||!z)return Be;if(De)return Be;var e=(pe-1)*he,n=e+he;return Be.slice(e,n)},[Be,pe,he,z,De]),Me=c(function(e,n){var t,o,i=null!=n?n:he;if(ue(e),n&&xe(n),K&&K(e,i),z&&"object"==typeof z&&(null===(t=z.onChange)||void 0===t||t.call(z,e,n),n&&(null===(o=z.onShowSizeChange)||void 0===o||o.call(z,e,n))),P){var r=Array.from(re.entries()).map(function(e){var n=e[0],t=e[1];return{column:m.find(function(e){return(e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex))===n}),order:t,field:n,columnKey:n}});P({current:e,pageSize:i},{},1===r.length?r[0]:r,{currentDataSource:Be,action:"paginate"})}},[z,K,P,he,re,m,Be]),Ne=c(function(e,n,t){var o=tn(n,e.dataIndex||"");return e.render?e.render(o,n,t):o},[]),Te=c(function(e,n,t){if(n){var o=!0===n?"left":n,i=0;if("left"===o){if(S&&("left"===S.fixed||!0===S.fixed))i+="number"==typeof S.columnWidth?S.columnWidth:"string"==typeof S.columnWidth?parseInt(S.columnWidth):60;for(var r=0;r<e;r++){if("left"===(l=m[r]).fixed||!0===l.fixed)i+=l.width?"number"==typeof l.width?l.width:parseInt(l.width)||0:150}return i}if("right"===o){for(r=e+1;r<m.length;r++){var l;if("right"===(l=m[r]).fixed)i+=l.width?"number"==typeof l.width?l.width:parseInt(l.width)||0:150}if(S&&"right"===S.fixed)i+="number"==typeof S.columnWidth?S.columnWidth:"string"==typeof S.columnWidth?parseInt(S.columnWidth):60;return i}}},[m,S]),He=c(function(){if(!j)return null;var t,o,i,r,l=m.map(function(t,o){var i,r=t.key||(Array.isArray(t.dataIndex)?t.dataIndex.join("."):t.dataIndex)||o,l=re.get(r)||null,a=Te(o,t.fixed,!0),d=t.width?"number"==typeof t.width?"".concat(t.width,"px"):t.width:void 0;return n("th",f({className:"".concat(t.className||""," ").concat(t.align?"text-".concat(t.align):""),style:{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!==a?"".concat(a,"px"):"0":void 0,right:"right"===t.fixed?void 0!==a?"".concat(a,"px"):"0":void 0,zIndex:t.fixed?"left"===t.fixed||!0===t.fixed?10:9:1,backgroundColor:(t.fixed,"#F9FAFB"),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:"12px 16px",textAlign:t.align||"left",borderBottom:"1px solid #EAECF0",fontWeight:600,fontSize:"12px",lineHeight:"18px",color:"#475467",fontFamily:"DM Sans, sans-serif"}},(null===(i=t.onHeaderCell)||void 0===i?void 0:i.call(t,t))||{},{children:e("div",{style:{display:"flex",alignItems:"center",gap:"8px",justifyContent:"right"===t.align?"flex-end":"center"===t.align?"center":"flex-start"},children:[n("span",{style:{fontWeight:600,fontSize:"12px",lineHeight:"18px",color:"#475467"},children:"function"==typeof t.title?t.title({sortOrder:l,sortColumn:t}):t.title}),t.sorter&&n("button",{onClick:function(){Ae(t,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:n(rn,{order:l||void 0})})]})}),r)});if(S){var a="number"==typeof S.columnWidth?"".concat(S.columnWidth,"px"):"string"==typeof S.columnWidth?S.columnWidth:"60px",d=n("th",{style:{width:a,position:S.fixed?"sticky":"relative",left:"left"===S.fixed||!0===S.fixed?"0px":void 0,right:"right"===S.fixed?"0px":void 0,zIndex:S.fixed?"left"===S.fixed||!0===S.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:e("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[!S.hideSelectAll&&"radio"!==S.type&&(t=je.filter(function(e){var n;return!(null===(n=S.getCheckboxProps)||void 0===n?void 0:n.call(S,e).disabled)}),o=t.map(function(e){return on(e,k)}),i=t.length>0&&o.every(function(e){return te.includes(e)}),r=o.some(function(e){return te.includes(e)}),n($e,{checked:i,indeterminate:r&&!i,onChange:function(e){return We(e.target.checked,je)}})),S.columnTitle&&n("span",{style:{marginLeft:S.hideSelectAll?0:"8px"},children:S.columnTitle})]})},"selection");l.unshift(d)}var s=null==Z?void 0:Z(m,0);return n("thead",{ref:Le,children:n("tr",f({},s||{},{children:l}))})},[m,j,re,S,te,je,k,Ae,We,B,Z,Te]),Re=c(function(e){ve(e)},[]),Oe=c(function(e,n){e.preventDefault(),we(n)},[]),Pe=c(function(e,n){if(e.preventDefault(),null===me||me===n)return ve(null),void we(null);var t=x([],je,!0),o=t[me];t.splice(me,1),t.splice(n,0,o),ve(null),we(null)},[me,je]),Xe=c(function(){ve(null),we(null)},[]),Ke=c(function(){var e=null==B?void 0:B.emptyText,t="function"==typeof e?e():void 0!==e?e:"No data",o=m.length+(S?1:0);return n("tr",{className:"aha-table-placeholder",children:n("td",{colSpan:o,style:{padding:"48px 16px",textAlign:"center",color:"#98A2B3",fontSize:"14px",lineHeight:"20px",fontFamily:"DM Sans, sans-serif",borderBottom:"none",backgroundColor:"white"},children:t})})},[null==B?void 0:B.emptyText,m.length,S]),Ye=c(function(){return 0===je.length?Ke():je.map(function(t,i){var r,l=on(t,k),a=te.includes(l),d=de.includes(l),s=(null==Y?void 0:Y(t,i))||{},c=i===je.length-1;return e(o.Fragment,{children:[e("tr",f({className:"".concat("function"==typeof _?_(t,i):_||""," ").concat(me===i?"dragging":""," ").concat(be===i?"drag-over":""),draggable:!0,onDragStart:function(){return Re(i)},onDragOver:function(e){return Oe(e,i)},onDrop:function(e){return Pe(e,i)},onDragEnd:Xe,style:f({cursor:"move",opacity:me===i?.5:1,backgroundColor:be===i?"#F9FAFB":"white",transition:"background-color 0.2s"},s.style),onMouseEnter:function(e){me!==i&&be!==i&&(e.currentTarget.style.backgroundColor="#F9FAFB")},onMouseLeave:function(e){me!==i&&be!==i&&(e.currentTarget.style.backgroundColor="white")}},s,{children:[S&&n("td",{style:{width:"number"==typeof S.columnWidth?"".concat(S.columnWidth,"px"):"string"==typeof S.columnWidth?S.columnWidth:"60px",position:S.fixed?"sticky":"relative",left:"left"===S.fixed||!0===S.fixed?"0px":void 0,right:"right"===S.fixed?"0px":void 0,zIndex:S.fixed?"left"===S.fixed||!0===S.fixed?12:11:1,backgroundColor:"white",padding:"16px",borderBottom:c?"none":"1px solid #EAECF0",textAlign:"center"},children:n("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:n($e,{checked:a,onChange:function(e){return Fe(t,e.target.checked)},disabled:null===(r=S.getCheckboxProps)||void 0===r?void 0:r.call(S,t).disabled})})}),m.map(function(e,o){var r,l=e.key||(Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex)||o,a=(null===(r=e.onCell)||void 0===r?void 0:r.call(e,t,i))||{},d=Te(o,e.fixed,!1),s=e.width?"number"==typeof e.width?"".concat(e.width,"px"):e.width:void 0;return n("td",f({className:"".concat(e.className||""," ").concat(e.align?"text-".concat(e.align):""),style:f({width:s,minWidth:e.minWidth?"number"==typeof e.minWidth?"".concat(e.minWidth,"px"):e.minWidth:s||void 0,maxWidth:s,position:e.fixed?"sticky":"relative",left:"left"===e.fixed||!0===e.fixed?void 0!==d?"".concat(d,"px"):"0":void 0,right:"right"===e.fixed?void 0!==d?"".concat(d,"px"):"0":void 0,zIndex:e.fixed?"left"===e.fixed||!0===e.fixed?10:9:1,backgroundColor:"white",boxShadow:"left"===e.fixed||!0===e.fixed?"2px 0 4px rgba(0, 0, 0, 0.05)":"right"===e.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:e.align||"left"},a.style),colSpan:e.colSpan,rowSpan:e.rowSpan},a,{children:Ne(e,t,i)}),l)})]})),(null==U?void 0:U.expandedRowRender)&&d&&n("tr",{children:n("td",{colSpan:m.length+(S?1:0),children:U.expandedRowRender(t,i,0,!0)})})]},l)})},[je,k,te,de,S,m,Y,_,Fe,Ne,U,me,be,Re,Oe,Pe,Xe,Te,Ke]),qe=function(){var e;if(!1===z||!z)return null;var t=null!==(e=z.total)&&void 0!==e?e:Be.length,o=z.position||"bottomRight";return n("div",{style:{marginTop:"16px",display:"flex",justifyContent:o.includes("Right")?"flex-end":o.includes("Left")?"flex-start":"center"},children:n(Ve,{current:pe,total:t,pageSize:he,showSizeChanger:z.showSizeChanger,pageSizeOptions:z.pageSizeOptions,showQuickJumper:z.showQuickJumper,showTotal:z.showTotal,onChange:Me,onShowSizeChange:Me,simple:z.simple,responsive:z.responsive,size:"small"===F?"small":"default"})})},Qe=p(function(){return m.some(function(e){return e.fixed})||S&&S.fixed},[m,S]),Ge=p(function(){return m.every(function(e){return e.width})&&(!S||S.columnWidth)},[m,S]),Je=p(function(){if(null==H?void 0:H.x){if("number"==typeof H.x)return H.x;if(!0===H.x)return m.reduce(function(e,n){return e+(n.width?"number"==typeof n.width?n.width:parseInt(String(n.width).replace("px",""))||0:150)},0)+(S?"number"==typeof S.columnWidth?S.columnWidth:parseInt(String(S.columnWidth||"60").replace("px",""))||60:0)}if(Qe)return m.reduce(function(e,n){return n.fixed&&n.width?e+("number"==typeof n.width?n.width:parseInt(String(n.width).replace("px",""))||0):e},0)+(S&&S.fixed&&S.columnWidth?"number"==typeof S.columnWidth?S.columnWidth:parseInt(String(S.columnWidth).replace("px",""))||60:0)},[m,null==H?void 0:H.x,S,Qe]),Ue=p(function(){return"fixed"===O||Qe||Ge||m.some(function(e){return e.width})?"fixed":O},[O,Qe,Ge,m]),_e=f(f({width:"100%",minWidth:Je?"".concat(Je,"px"):"100%",borderCollapse:"separate",borderSpacing:0,tableLayout:Ue,backgroundColor:"white"},A&&{borderRadius:"8px",border:"1px solid #EAECF0"}),{overflow:"hidden"}),Ze=f({position:"relative",width:"100%",maxWidth:"100%",maxHeight:"number"==typeof(null==H?void 0:H.y)?"".concat(H.y,"px"):void 0,borderRadius:"8px"},J);if(Se)return e("div",f({ref:ze,className:"aha-table aha-table-mobile-wrapper ".concat(q),style:Ze,"aria-busy":!!E||void 0},$,{children:[M&&n("div",{style:{marginBottom:"16px"},children:M(Be)}),z&&"object"==typeof z&&(null===(i=z.position)||void 0===i?void 0:i.startsWith("top"))&&qe(),(Ie="function"==typeof(null==B?void 0:B.emptyText)?B.emptyText():void 0!==(null==B?void 0:B.emptyText)?B.emptyText:"No data",0===je.length?n("div",{className:"aha-table-mobile aha-table-placeholder",style:{padding:"48px 16px",textAlign:"center",color:"#98A2B3",fontSize:"14px",lineHeight:"20px",fontFamily:"DM Sans, sans-serif"},children:Ie}):n("div",{className:"aha-table-mobile",children:je.map(function(t,o){var i,r=on(t,k),l=te.includes(r);return e("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:[S&&n("div",{style:{marginBottom:"8px"},children:n($e,{checked:l,onChange:function(e){return Fe(t,e.target.checked)},disabled:null===(i=S.getCheckboxProps)||void 0===i?void 0:i.call(S,t).disabled})}),m.map(function(i){var r=i.key||(Array.isArray(i.dataIndex)?i.dataIndex.join("."):i.dataIndex),l=tn(t,i.dataIndex||""),a=i.render?i.render(l,t,o):l;return e("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"8px",paddingBottom:"8px",borderBottom:"1px solid #f0f0f0"},children:[e("span",{style:{fontWeight:"bold",color:"#666"},children:["function"==typeof i.title?i.title({}):i.title,":"]}),n("span",{style:{flex:1,textAlign:"right"},children:a})]},r)})]},r)})})),N&&n("div",{style:{marginTop:"16px"},children:N(Be)}),z&&("object"!=typeof z||!(null===(r=z.position)||void 0===r?void 0:r.startsWith("top")))&&qe(),n(nn,{loading:E,spinColor:ee})]}));var en={position:"relative",overflowX:(null==H?void 0:H.x)||Qe?"auto":"visible",overflowY:(null==H?void 0:H.y)?"auto":"visible",width:"100%",maxWidth:!0===(null==H?void 0:H.x)?"100%":"number"==typeof(null==H?void 0:H.x)?"".concat(H.x,"px"):void 0,maxHeight:"number"==typeof(null==H?void 0:H.y)?"".concat(H.y,"px"):void 0,borderRadius:"8px"};return e("div",f({ref:ze,className:"aha-table ".concat(q),style:Ze,"aria-busy":!!E||void 0},$,{children:[M&&n("div",{style:{marginBottom:"16px"},children:M(Be)}),z&&"object"==typeof z&&(null===(a=z.position)||void 0===a?void 0:a.startsWith("top"))&&qe(),n("div",{style:en,children:n("div",{style:{width:"100%",minWidth:Je?"".concat(Je,"px"):"100%",display:"block"},children:e("table",{style:_e,className:G,children:[He(),n("tbody",{children:Ye()}),T&&n("tfoot",{children:n("tr",{children:n("td",{colSpan:m.length+(S?1:0),children:T(Be)})})})]})})}),N&&n("div",{style:{marginTop:"16px"},children:N(Be)}),z&&("object"!=typeof z||!(null===(u=z.position)||void 0===u?void 0:u.startsWith("top")))&&qe(),n(nn,{loading:E,spinColor:ee})]}))};export{ln as default};
|
|
2
2
|
//# sourceMappingURL=Table.esm.js.map
|