@datacrest/dcuikit 1.0.29 → 1.0.30
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/build/components/Atom/Typography/Typography.types.d.ts +2 -2
- package/build/index.css +1 -1
- package/build/index.esm.css +1 -1
- package/build/index.esm.js +1 -1
- package/build/index.esm.js.map +1 -1
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/build/tsconfig.prod.tsbuildinfo +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/build/index.esm.js
CHANGED
|
@@ -41,7 +41,7 @@ object-assign
|
|
|
41
41
|
Copyright (c) 2018 Jed Watson.
|
|
42
42
|
Licensed under the MIT License (MIT), see
|
|
43
43
|
http://jedwatson.github.io/classnames
|
|
44
|
-
*/var sg,cg=(ag||(ag=1,sg=lg,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=n(e,r(o)))}return e}function r(r){if("string"==typeof r||"number"==typeof r)return r;if("object"!=typeof r)return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var o="";for(var i in r)e.call(r,i)&&r[i]&&(o=n(o,i));return o}function n(e,t){return t?e?e+" "+t:e+t:e}sg.exports?(t.default=t,sg.exports=t):window.classNames=t}()),lg.exports),ug=pt(cg);const pg={extraSmall:"mt-1 mb-1",small:"mt-2 mb-2",medium:"mt-4 mb-4",large:"mt-6 mb-6",extraLarge:"mt-8 mb-8"},fg={tight:"tracking-tight",normal:"tracking-normal",wide:"tracking-wide",wider:"tracking-wider",widest:"tracking-widest"},dg={h1:"text-4xl",h2:"text-3xl",h3:"text-2xl",h4:"text-xl",h5:"text-lg",h6:"text-base"},mg={primary:"text-primary",secondary:"text-secondary",tertiary:"text-destructive",quaternary:"text-warning",quinary:"text-muted-foreground",white:"text-white",harford:"text-[#043d5a]"},hg={normal:"font-normal",bold:"font-bold",semibold:"font-semibold",light:"font-light"},yg={body:"text-base",paragraph:"text-lg",caption:"text-sm",small:"text-xs",regular:"text-base",paragraphSm:"text-md",captionSm:"text-xs"},vg=({variant:e="h1",color:r="harford",marginTop:n,marginBottom:o,letterSpacing:i,textAlign:a="text-left",fontWeight:l="normal",children:s,...c})=>{const u=ug(dg[e],mg[r],hg[l],n?pg[n]:"",o?pg[o]:"",i?fg[i]:"",a);return t.createElement(e,{className:u,...c},s)},gg=({variant:e,color:r="quaternary",marginTop:n,marginBottom:o,letterSpacing:i,textAlign:a="text-left",fontWeight:l="normal",children:s,...c})=>{const u=ug(yg[e],mg[r],hg[l],n?pg[n]:"",o?pg[o]:"",i?fg[i]:"",a);return t.createElement("p",{className:u,...c},s)},bg=gg,wg=vg,xg=({value:e,fluid:r,label:n,leftIcon:o,rightIcon:a,togglePassword:s,error:c,success:u,hint:p,disabled:f,type:d="text",hintTextProps:m={variant:"small"},className:h="",dataTestId:y,inputSize:v,...g})=>{const[b,w]=i(!1),[x,O]=i(!1),E=l(()=>b?t.createElement(tg,{name:"EyeOff",size:16}):t.createElement(tg,{name:"Eye",size:16}),[b]),k=n&&(e||x),{width:j}=(()=>{if(!n||!k)return{width:0,leftOffset:0};const e=7.5*n.length+16;return{width:Math.max(e,0),leftOffset:12}})(),S=f?"border-input":c?"border-destructive":u?"border-success":x||e?"border-primary":"border-input",P=l(()=>{let e="relative flex items-center px-3 py-2 rounded-lg overflow-visible min-h-[2.5rem]";return f?e+=" bg-muted text-muted-foreground":c?e+=" text-destructive":u&&(e+=" text-success"),r&&(e+=" w-full"),`${e} ${h}`},[f,c,u,r,h]),T=l(()=>{let e="peer w-full outline-none bg-transparent placeholder-transparent text-sm leading-5 transition-colors duration-200";return e+=f?" text-muted-foreground cursor-not-allowed":" text-foreground","password"===d&&(e+=" pr-8"),"number"===d&&(e+=" appearance-none"),e},[f,d]),C=l(()=>"password"===d&&b?"text":d,[d,b]),N=l(()=>{let e="absolute transform transition-all duration-300 ease-out z-20 pointer-events-none select-none";return k?(e+=" -top-4 text-xs font-medium tracking-wide",e+=" left-3"):e+=" top-1/2 left-3 -translate-y-1/2 text-sm font-normal",e+=x&&!f?" text-primary":c?" text-destructive":u?" text-success":" text-muted-foreground",e},[k,x,f,c,u]);return t.createElement("div",{className:P},t.createElement("div",{className:"absolute inset-0 rounded-lg pointer-events-none"},t.createElement("div",{className:`absolute inset-0 rounded-lg transition-all duration-300 ease-out border ${S}`,style:{clipPath:k?`polygon(\n 0% 0%,\n 12px 0%,\n 12px 0%,\n 14px 0%,\n 14px 50%,\n ${14+j}px 50%,\n ${14+j}px 0%,\n ${16+j}px 0%,\n 100% 0%,\n 100% 100%,\n 0% 100%\n )`:"none"}}),(x||e)&&t.createElement("div",{className:"absolute inset-0 rounded-lg transition-all duration-300 ease-out border-0",style:{boxShadow:x?c?"0 0 0 3px rgb(239 68 68 / 0.1)":u?"0 0 0 3px rgb(34 197 94 / 0.1)":"0 0 0 3px rgb(59 130 246 / 0.1)":"none",clipPath:k?`polygon(\n 0% 0%,\n 12px 0%,\n 12px 0%,\n 14px 0%,\n 14px 50%,\n ${14+j}px 50%,\n ${14+j}px 0%,\n ${16+j}px 0%,\n 100% 0%,\n 100% 100%,\n 0% 100%\n )`:"none"}})),o&&t.createElement("div",{className:"flex items-center mr-3 text-muted-foreground transition-colors duration-200"},o),t.createElement("div",{className:"relative w-full"},t.createElement("input",{...g,"data-test-id":y,id:g.id,value:e,disabled:f,type:C,className:T,placeholder:" ",onFocus:e=>{O(!0),g.onFocus?.(e)},onBlur:e=>{O(!1),g.onBlur?.(e)}}),n&&t.createElement("label",{htmlFor:g.id,className:N,style:{transform:k?"translateX(4px)":void 0}},n)),"password"===d&&s&&t.createElement("button",{type:"button",className:"absolute right-3 text-muted-foreground hover:text-foreground transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed hover:scale-105 active:scale-95",onClick:()=>{!f&&e&&w(!b)},disabled:f,tabIndex:-1},E),a&&t.createElement("div",{className:"flex items-center ml-3 text-muted-foreground transition-colors duration-200"},a),(c||u||p)&&t.createElement("div",{className:"absolute top-full left-0 mt-2 text-xs w-full transition-all duration-200"},t.createElement(bg,{color:"primary",...m},c?.message||u?.message&&!c?.message||!c?.message&&!u?.message&&p?.message)))};function Og(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function Eg(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function kg(...e){return t=>{let r=!1;const n=e.map(e=>{const n=Eg(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():Eg(e[t],null)}}}}function jg(...t){return e.useCallback(kg(...t),t)}function Sg(t,r=[]){let n=[];const o=()=>{const r=n.map(t=>e.createContext(t));return function(n){const o=n?.[t]||r;return e.useMemo(()=>({[`__scope${t}`]:{...n,[t]:o}}),[n,o])}};return o.scopeName=t,[function(r,o){const i=e.createContext(o),a=n.length;n=[...n,o];const l=r=>{const{scope:n,children:o,...l}=r,s=n?.[t]?.[a]||i,c=e.useMemo(()=>l,Object.values(l));return k(s.Provider,{value:c,children:o})};return l.displayName=r+"Provider",[l,function(n,l){const s=l?.[t]?.[a]||i,c=e.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},Pg(o,...r)]}function Pg(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){const o=n.reduce((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]}),{});return e.useMemo(()=>({[`__scope${r.scopeName}`]:o}),[o])}};return n.scopeName=r.scopeName,n}function Tg(t){const r=Ng(t),n=e.forwardRef((t,n)=>{const{children:o,...i}=t,a=e.Children.toArray(o),l=a.find(Ag);if(l){const t=l.props.children,o=a.map(r=>r===l?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:r);return k(r,{...i,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return k(r,{...i,ref:n,children:o})});return n.displayName=`${t}.Slot`,n}var Cg=Tg("Slot");function Ng(t){const r=e.forwardRef((t,r)=>{const{children:n,...o}=t;if(e.isValidElement(n)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,n.props);return n.type!==e.Fragment&&(i.ref=r?kg(r,t):t),e.cloneElement(n,i)}return e.Children.count(n)>1?e.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var Mg=Symbol("radix.slottable");function Ag(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===Mg}var zg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,r)=>{const n=Tg(`Primitive.${r}`),o=e.forwardRef((e,t)=>{const{asChild:o,...i}=e,a=o?n:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),k(a,{...i,ref:t})});return o.displayName=`Primitive.${r}`,{...t,[r]:o}},{});var Lg=globalThis?.document?e.useLayoutEffect:()=>{},Dg=e[" useId ".trim().toString()]||(()=>{}),_g=0;function Ig(t){const[r,n]=e.useState(Dg());return Lg(()=>{n(e=>e??String(_g++))},[t]),r?`radix-${r}`:""}function Rg(t){const r=e.useRef(t);return e.useEffect(()=>{r.current=t}),e.useMemo(()=>(...e)=>r.current?.(...e),[])}var Bg=e[" useInsertionEffect ".trim().toString()]||Lg;function Wg({prop:t,defaultProp:r,onChange:n=()=>{},caller:o}){const[i,a,l]=function({defaultProp:t,onChange:r}){const[n,o]=e.useState(t),i=e.useRef(n),a=e.useRef(r);return Bg(()=>{a.current=r},[r]),e.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,o,a]}({defaultProp:r,onChange:n}),s=void 0!==t,c=s?t:i;{const r=e.useRef(void 0!==t);e.useEffect(()=>{const e=r.current;if(e!==s){const t=e?"controlled":"uncontrolled",r=s?"controlled":"uncontrolled";console.warn(`${o} is changing from ${t} to ${r}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}r.current=s},[s,o])}const u=e.useCallback(e=>{if(s){const r=function(e){return"function"==typeof e}(e)?e(t):e;r!==t&&l.current?.(r)}else a(e)},[s,t,a,l]);return[c,u]}var Fg=e.createContext(void 0);function $g(t){const r=e.useContext(Fg);return t||r||"ltr"}var Vg="rovingFocusGroup.onEntryFocus",Hg={bubbles:!1,cancelable:!0},Ug="RovingFocusGroup",[qg,Yg,Xg]=function(e){const r=e+"CollectionProvider",[n,o]=Sg(r),[i,a]=n(r,{collectionRef:{current:null},itemMap:new Map}),l=e=>{const{scope:r,children:n}=e,o=t.useRef(null),a=t.useRef(new Map).current;return k(i,{scope:r,itemMap:a,collectionRef:o,children:n})};l.displayName=r;const s=e+"CollectionSlot",c=Tg(s),u=t.forwardRef((e,t)=>{const{scope:r,children:n}=e,o=jg(t,a(s,r).collectionRef);return k(c,{ref:o,children:n})});u.displayName=s;const p=e+"CollectionItemSlot",f="data-radix-collection-item",d=Tg(p),m=t.forwardRef((e,r)=>{const{scope:n,children:o,...i}=e,l=t.useRef(null),s=jg(r,l),c=a(p,n);return t.useEffect(()=>(c.itemMap.set(l,{ref:l,...i}),()=>{c.itemMap.delete(l)})),k(d,{[f]:"",ref:s,children:o})});return m.displayName=p,[{Provider:l,Slot:u,ItemSlot:m},function(r){const n=a(e+"CollectionConsumer",r),o=t.useCallback(()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`)),r=Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current));return r},[n.collectionRef,n.itemMap]);return o},o]}(Ug),[Gg,Kg]=Sg(Ug,[Xg]),[Zg,Jg]=Gg(Ug),Qg=e.forwardRef((e,t)=>k(qg.Provider,{scope:e.__scopeRovingFocusGroup,children:k(qg.Slot,{scope:e.__scopeRovingFocusGroup,children:k(eb,{...e,ref:t})})}));Qg.displayName=Ug;var eb=e.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:a,currentTabStopId:l,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:p=!1,...f}=t,d=e.useRef(null),m=jg(r,d),h=$g(a),[y,v]=Wg({prop:l,defaultProp:s??null,onChange:c,caller:Ug}),[g,b]=e.useState(!1),w=Rg(u),x=Yg(n),O=e.useRef(!1),[E,j]=e.useState(0);return e.useEffect(()=>{const e=d.current;if(e)return e.addEventListener(Vg,w),()=>e.removeEventListener(Vg,w)},[w]),k(Zg,{scope:n,orientation:o,dir:h,loop:i,currentTabStopId:y,onItemFocus:e.useCallback(e=>v(e),[v]),onItemShiftTab:e.useCallback(()=>b(!0),[]),onFocusableItemAdd:e.useCallback(()=>j(e=>e+1),[]),onFocusableItemRemove:e.useCallback(()=>j(e=>e-1),[]),children:k(zg.div,{tabIndex:g||0===E?-1:0,"data-orientation":o,...f,ref:m,style:{outline:"none",...t.style},onMouseDown:Og(t.onMouseDown,()=>{O.current=!0}),onFocus:Og(t.onFocus,e=>{const t=!O.current;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent(Vg,Hg);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter(e=>e.focusable);ob([e.find(e=>e.active),e.find(e=>e.id===y),...e].filter(Boolean).map(e=>e.ref.current),p)}}O.current=!1}),onBlur:Og(t.onBlur,()=>b(!1))})})}),tb="RovingFocusGroupItem",rb=e.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:a,children:l,...s}=t,c=Ig(),u=a||c,p=Jg(tb,n),f=p.currentTabStopId===u,d=Yg(n),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:y}=p;return e.useEffect(()=>{if(o)return m(),()=>h()},[o,m,h]),k(qg.ItemSlot,{scope:n,id:u,focusable:o,active:i,children:k(zg.span,{tabIndex:f?0:-1,"data-orientation":p.orientation,...s,ref:r,onMouseDown:Og(t.onMouseDown,e=>{o?p.onItemFocus(u):e.preventDefault()}),onFocus:Og(t.onFocus,()=>p.onItemFocus(u)),onKeyDown:Og(t.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,r){const n=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(n)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)?void 0:nb[n]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=d().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();const n=r.indexOf(e.currentTarget);r=p.loop?function(e,t){return e.map((r,n)=>e[(t+n)%e.length])}(r,n+1):r.slice(n+1)}setTimeout(()=>ob(r))}}),children:"function"==typeof l?l({isCurrentTabStop:f,hasTabStop:null!=y}):l})})});rb.displayName=tb;var nb={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ob(e,t=!1){const r=document.activeElement;for(const n of e){if(n===r)return;if(n.focus({preventScroll:t}),document.activeElement!==r)return}}var ib=Qg,ab=rb;function lb(t){const[r,n]=e.useState(void 0);return Lg(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver(e=>{if(!Array.isArray(e))return;if(!e.length)return;const r=e[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=t.offsetWidth,i=t.offsetHeight;n({width:o,height:i})});return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}n(void 0)},[t]),r}function sb(t){const r=e.useRef({value:t,previous:t});return e.useMemo(()=>(r.current.value!==t&&(r.current.previous=r.current.value,r.current.value=t),r.current.previous),[t])}var cb=t=>{const{present:r,children:n}=t,o=function(t){const[r,n]=e.useState(),o=e.useRef(null),i=e.useRef(t),a=e.useRef("none"),l=t?"mounted":"unmounted",[s,c]=function(t,r){return e.useReducer((e,t)=>r[e][t]??e,t)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const e=ub(o.current);a.current="mounted"===s?e:"none"},[s]),Lg(()=>{const e=o.current,r=i.current;if(r!==t){const n=a.current,o=ub(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}},[t,c]),Lg(()=>{if(r){let e;const t=r.ownerDocument.defaultView??window,n=n=>{const a=ub(o.current).includes(n.animationName);if(n.target===r&&a&&(c("ANIMATION_END"),!i.current)){const n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)})}},l=e=>{e.target===r&&(a.current=ub(o.current))};return r.addEventListener("animationstart",l),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",l),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}c("ANIMATION_END")},[r,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback(e=>{o.current=e?getComputedStyle(e):null,n(e)},[])}}(r),i="function"==typeof n?n({present:o.isPresent}):e.Children.only(n),a=jg(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof n||o.isPresent?e.cloneElement(i,{ref:a}):null};function ub(e){return e?.animationName||"none"}cb.displayName="Presence";var pb="Radio",[fb,db]=Sg(pb),[mb,hb]=fb(pb),yb=e.forwardRef((t,r)=>{const{__scopeRadio:n,name:o,checked:i=!1,required:a,disabled:l,value:s="on",onCheck:c,form:u,...p}=t,[f,d]=e.useState(null),m=jg(r,e=>d(e)),h=e.useRef(!1),y=!f||(u||!!f.closest("form"));return S(mb,{scope:n,checked:i,disabled:l,children:[k(zg.button,{type:"button",role:"radio","aria-checked":i,"data-state":wb(i),"data-disabled":l?"":void 0,disabled:l,value:s,...p,ref:m,onClick:Og(t.onClick,e=>{i||c?.(),y&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),y&&k(bb,{control:f,bubbles:!h.current,name:o,value:s,checked:i,required:a,disabled:l,form:u,style:{transform:"translateX(-100%)"}})]})});yb.displayName=pb;var vb="RadioIndicator",gb=e.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,i=hb(vb,r);return k(cb,{present:n||i.checked,children:k(zg.span,{"data-state":wb(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});gb.displayName=vb;var bb=e.forwardRef(({__scopeRadio:t,control:r,checked:n,bubbles:o=!0,...i},a)=>{const l=e.useRef(null),s=jg(l,a),c=sb(n),u=lb(r);return e.useEffect(()=>{const e=l.current;if(!e)return;const t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==n&&r){const t=new Event("click",{bubbles:o});r.call(e,n),e.dispatchEvent(t)}},[c,n,o]),k(zg.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function wb(e){return e?"checked":"unchecked"}bb.displayName="RadioBubbleInput";var xb=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ob="RadioGroup",[Eb,kb]=Sg(Ob,[Kg,db]),jb=Kg(),Sb=db(),[Pb,Tb]=Eb(Ob),Cb=e.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:i,required:a=!1,disabled:l=!1,orientation:s,dir:c,loop:u=!0,onValueChange:p,...f}=e,d=jb(r),m=$g(c),[h,y]=Wg({prop:i,defaultProp:o??null,onChange:p,caller:Ob});return k(Pb,{scope:r,name:n,required:a,disabled:l,value:h,onValueChange:y,children:k(ib,{asChild:!0,...d,orientation:s,dir:m,loop:u,children:k(zg.div,{role:"radiogroup","aria-required":a,"aria-orientation":s,"data-disabled":l?"":void 0,dir:m,...f,ref:t})})})});Cb.displayName=Ob;var Nb="RadioGroupItem",Mb=e.forwardRef((t,r)=>{const{__scopeRadioGroup:n,disabled:o,...i}=t,a=Tb(Nb,n),l=a.disabled||o,s=jb(n),c=Sb(n),u=e.useRef(null),p=jg(r,u),f=a.value===i.value,d=e.useRef(!1);return e.useEffect(()=>{const e=e=>{xb.includes(e.key)&&(d.current=!0)},t=()=>d.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),k(ab,{asChild:!0,...s,focusable:!l,active:f,children:k(yb,{disabled:l,required:a.required,checked:f,...c,...i,name:a.name,ref:p,onCheck:()=>a.onValueChange(i.value),onKeyDown:Og(e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:Og(i.onFocus,()=>{d.current&&u.current?.click()})})})});Mb.displayName=Nb;var Ab=e.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=Sb(r);return k(gb,{...o,...n,ref:t})});Ab.displayName="RadioGroupIndicator";var zb=Cb,Lb=Mb,Db=Ab;const _b=t.forwardRef(({className:e,classNames:r,showIcons:n=!0,withCard:o=!0,options:i,...a},l)=>t.createElement(zb,{ref:l,className:Be("grid gap-2",e,r?.root),...a},i.map(e=>t.createElement("div",{key:e.id,className:Be("relative")},t.createElement("label",{htmlFor:e.id,className:Be("relative flex w-full items-center gap-x-3",o&&["cursor-pointer rounded-lg border-2 p-4","border-input bg-background hover:bg-accent hover:text-accent-foreground","data-[state=checked]:border-primary data-[state=checked]:bg-primary/5"],!o&&"cursor-pointer py-2",r?.label)},t.createElement(Lb,{value:e.id,id:e.id,className:Be("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background","focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",r?.item)},t.createElement(Db,{className:Be("flex items-center justify-center",r?.indicator)},t.createElement(et,{className:"h-2.5 w-2.5 fill-current text-current"}))),t.createElement("div",{className:"flex flex-1 items-center justify-between"},t.createElement("div",{className:Be("space-y-1",!e.description&&"space-y-0")},t.createElement("p",{className:Be("text-sm font-medium leading-none","peer-disabled:cursor-not-allowed peer-disabled:opacity-70",r?.text)},e.label),e.description&&t.createElement("p",{className:Be("text-sm text-muted-foreground",r?.description)},e.description)),n&&e.icon&&t.createElement("div",{className:Be("ml-4 shrink-0 text-muted-foreground",r?.icon)},e.icon)))))));_b.displayName="RadioGroup";var Ib="Switch",[Rb,Bb]=Sg(Ib),[Wb,Fb]=Rb(Ib),$b=e.forwardRef((t,r)=>{const{__scopeSwitch:n,name:o,checked:i,defaultChecked:a,required:l,disabled:s,value:c="on",onCheckedChange:u,form:p,...f}=t,[d,m]=e.useState(null),h=jg(r,e=>m(e)),y=e.useRef(!1),v=!d||(p||!!d.closest("form")),[g,b]=Wg({prop:i,defaultProp:a??!1,onChange:u,caller:Ib});return S(Wb,{scope:n,checked:g,disabled:s,children:[k(zg.button,{type:"button",role:"switch","aria-checked":g,"aria-required":l,"data-state":qb(g),"data-disabled":s?"":void 0,disabled:s,value:c,...f,ref:h,onClick:Og(t.onClick,e=>{b(e=>!e),v&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})}),v&&k(Ub,{control:d,bubbles:!y.current,name:o,value:c,checked:g,required:l,disabled:s,form:p,style:{transform:"translateX(-100%)"}})]})});$b.displayName=Ib;var Vb="SwitchThumb",Hb=e.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=Fb(Vb,r);return k(zg.span,{"data-state":qb(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});Hb.displayName=Vb;var Ub=e.forwardRef(({__scopeSwitch:t,control:r,checked:n,bubbles:o=!0,...i},a)=>{const l=e.useRef(null),s=jg(l,a),c=sb(n),u=lb(r);return e.useEffect(()=>{const e=l.current;if(!e)return;const t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==n&&r){const t=new Event("click",{bubbles:o});r.call(e,n),e.dispatchEvent(t)}},[c,n,o]),k("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function qb(e){return e?"checked":"unchecked"}Ub.displayName="SwitchBubbleInput";var Yb=$b,Xb=Hb;const Gb="medium",Kb="primary",Zb={small:{switch:"w-8 h-4",thumb:"w-3 h-3",translate:"translate-x-4"},medium:{switch:"w-11 h-6",thumb:"w-5 h-5",translate:"translate-x-5"},large:{switch:"w-14 h-7",thumb:"w-6 h-6",translate:"translate-x-7"}},Jb={primary:{background:"bg-primary",foreground:"text-primary-foreground",hover:"hover:bg-primary/90"},success:{background:"bg-[rgb(var(--success))]",foreground:"text-[rgb(var(--success-foreground))]",hover:"hover:bg-[rgb(var(--success))]/90"},danger:{background:"bg-destructive",foreground:"text-destructive-foreground",hover:"hover:bg-destructive/90"},warning:{background:"bg-[rgb(var(--warning))]",foreground:"text-foreground",hover:"hover:bg-[rgb(var(--warning))]/90"}},Qb=({label:t,description:r,dataTestId:n})=>t||r?e.createElement("div",{className:"flex flex-col gap-1.5","data-test-id":n},t&&e.createElement(bg,{variant:"regular",color:"secondary"},t),r&&e.createElement(bg,{variant:"small",color:"secondary"},r)):null,ew=e.forwardRef(({label:t,description:r,size:n=Gb,variant:o=Kb,disabled:i=!1,loading:a=!1,className:l,onChange:s,dataTestId:c,checked:u,id:p,...f},d)=>{const m=n||Gb,h=o||Kb;return e.createElement("div",{className:"flex items-center"},e.createElement("label",{htmlFor:p,className:Be("relative inline-flex items-start gap-3 select-none",i&&"cursor-not-allowed opacity-60",l)},e.createElement("div",{className:"relative"},e.createElement(Yb,{id:p,checked:u,onCheckedChange:e=>{i||a||s?.(e)},disabled:i||a,"data-test-id":`${c}-root`,ref:d,...f,className:Be("peer relative inline-flex shrink-0 cursor-pointer rounded-full transition-colors","border-2 border-transparent","focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",Zb[m].switch,u?Be(Jb[h].background,Jb[h].foreground):"bg-input",i&&"cursor-not-allowed")},e.createElement(Xb,{className:Be("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform","flex items-center justify-center",Zb[m].thumb,u?Zb[m].translate:"translate-x-0.5"),"data-test-id":`${c}-thumb`},a&&e.createElement(it,{className:"animate-spin text-black",size:{small:12,medium:16,large:20}[m]})))),e.createElement(Qb,{label:t,description:r,dataTestId:c,disabled:i})))});ew.displayName="Switch";const tw=["small","medium","large"],rw=["primary","success","danger","warning"],nw=r(({className:e="",error:r=!1,disabled:n=!1,placeholder:o,value:a,defaultValue:c,onChange:u,onFocus:p,onBlur:f,rows:d=3,maxLength:m,required:h=!1,readOnly:y=!1,autoFocus:v=!1,resize:g=!1,label:b,helperText:w,showCharCount:x=!1,floatingLabel:O=!1,fluid:E=!0,width:k,...j},S)=>{const[P,T]=i(!1),[C,N]=i(a||c||""),M=s(e=>{T(!0),p?.(e)},[p]),A=s(e=>{T(!1),f?.(e)},[f]),z=s(e=>{N(e.target.value),u?.(e)},[u]),L=b&&(a||C||P),D=((e,t)=>{const r=e||t||"";return"string"==typeof r?r.length:0})(a,C),{width:_}=(()=>{if(!b||!L)return{width:0,leftOffset:0};const e=7.5*b.length+16;return{width:Math.max(e,0),leftOffset:12}})(),I=n?"border-input":r?"border-destructive":P||a||C?"border-primary":"border-input",R=l(()=>{let t="relative flex items-start px-3 py-2 rounded-lg overflow-visible";return n?t+=" bg-muted text-muted-foreground":r&&(t+=" text-destructive"),E&&(t+=" w-full"),k&&(t+=` ${k}`),`${t} ${e}`},[n,r,E,k,e]),B=l(()=>{let e="peer w-full outline-none bg-transparent placeholder-transparent text-sm leading-5 transition-colors duration-200";return e+=n?" text-muted-foreground cursor-not-allowed":" text-foreground",g||(e+=" resize-none"),e},[n,g]),W=l(()=>{let e="absolute transform transition-all duration-300 ease-out z-20 pointer-events-none select-none";return L?(e+=" -top-4 text-xs font-medium tracking-wide",e+=" left-3"):e+=" top-4 left-3 text-sm font-normal",e+=P&&!n?" text-primary":r?" text-destructive":" text-muted-foreground",e},[L,P,n,r]),F=l(()=>{const e={};return k&&!E&&(e.width=k),e},[k,E]);return t.createElement("div",{style:F},b&&!O&&t.createElement(bg,{variant:"caption",color:"primary",fontWeight:"semibold",marginBottom:"small"},b,h&&t.createElement("span",{className:"text-destructive ml-1"},"*")),t.createElement("div",{className:R},t.createElement("div",{className:"absolute inset-0 rounded-lg pointer-events-none"},t.createElement("div",{className:`absolute inset-0 rounded-lg transition-all duration-300 ease-out border ${I}`,style:{clipPath:L&&O?`polygon(\n 0% 0%,\n 12px 0%,\n 12px 0%,\n 14px 0%,\n 14px 50%,\n ${14+_}px 50%,\n ${14+_}px 0%,\n ${16+_}px 0%,\n 100% 0%,\n 100% 100%,\n 0% 100%\n )`:"none"}}),(P||a||C)&&t.createElement("div",{className:"absolute inset-0 rounded-lg transition-all duration-300 ease-out border-0",style:{boxShadow:P?r?"0 0 0 3px rgb(239 68 68 / 0.1)":"0 0 0 3px rgb(59 130 246 / 0.1)":"none",clipPath:L&&O?`polygon(\n 0% 0%,\n 12px 0%,\n 12px 0%,\n 14px 0%,\n 14px 50%,\n ${14+_}px 50%,\n ${14+_}px 0%,\n ${16+_}px 0%,\n 100% 0%,\n 100% 100%,\n 0% 100%\n )`:"none"}})),t.createElement("div",{className:"relative w-full"},t.createElement("textarea",{ref:S,className:B,placeholder:O?" ":o,value:a,defaultValue:c,onChange:z,onFocus:M,onBlur:A,disabled:n,readOnly:y,required:h,autoFocus:v,rows:d,maxLength:m,...j}),O&&b&&t.createElement("label",{className:W,style:{transform:L?"translateX(-2px)":void 0}},b,h&&t.createElement("span",{className:"text-destructive ml-1"},"*")))),(w||x||r)&&t.createElement("div",{className:"mt-2 text-xs w-full transition-all duration-200"},w&&!r&&t.createElement(bg,{variant:"captionSm",color:"quinary"},w),r&&"object"==typeof r&&"message"in r&&t.createElement(bg,{variant:"captionSm",color:"tertiary"},r),x&&m&&t.createElement("div",{className:"flex justify-end"},t.createElement(bg,{variant:"captionSm",color:D>.9*m?"tertiary":"quinary",className:"font-mono"},D,"/",m))))});var ow,iw;nw.displayName="TextArea",function(e){e.Success="success",e.Error="error",e.Warning="warning",e.Info="info"}(ow||(ow={})),function(e){e.TopCenter="top-center",e.TopLeft="top-left",e.TopRight="top-right",e.BottomCenter="bottom-center",e.BottomLeft="bottom-left",e.BottomRight="bottom-right"}(iw||(iw={}));const aw=({id:e,destroy:r,title:n,description:o,variant:l=ow.Info,position:u=iw.TopCenter,duration:p=5e3,animationDuration:f=400,icon:d,dataTestId:m})=>{const[h,y]=i(!1),[,v]=i(!1),g=c(null),b=c(null),w=c(0),x=c(p),O=s(()=>v(!0),[]),E=s(()=>v(!1),[]),k=s(()=>{b.current&&clearTimeout(b.current),y(!0),setTimeout(()=>{r()},f)},[r,f]);a(()=>(w.current=Date.now(),x.current=p,g.current&&(g.current.style.width="100%",g.current.style.transition="none",g.current.offsetWidth,g.current.style.transition=`width ${p}ms linear`,g.current.style.width="0%"),b.current=window.setTimeout(()=>{k()},p),()=>{b.current&&clearTimeout(b.current)}),[p,k]);const j={[ow.Success]:{icon:"text-emerald-500 dark:text-emerald-400",progress:"bg-emerald-500 dark:bg-emerald-400"},[ow.Error]:{icon:"text-destructive",progress:"bg-destructive"},[ow.Warning]:{icon:"text-amber-500 dark:text-amber-400",progress:"bg-amber-500 dark:bg-amber-400"},[ow.Info]:{icon:"text-primary",progress:"bg-primary"}}[l],S={[iw.TopCenter]:h?"animate-slide-out-up":"animate-slide-in-down",[iw.TopLeft]:h?"animate-slide-out-left":"animate-slide-in-left",[iw.TopRight]:h?"animate-slide-out-right":"animate-slide-in-right",[iw.BottomCenter]:h?"animate-slide-out-down":"animate-slide-in-up",[iw.BottomLeft]:h?"animate-slide-out-left":"animate-slide-in-left",[iw.BottomRight]:h?"animate-slide-out-right":"animate-slide-in-right"};return t.createElement("div",{id:e??`${l}-${"string"==typeof n?n:""}`,className:`\n relative group flex items-center justify-between pointer-events-auto\n rounded-lg max-w-md w-full overflow-hidden\n bg-background\n border border-border\n ${S[u]||S[iw.TopCenter]}\n ${h?"opacity-0":"opacity-100"}\n transition-all duration-300 ease-out\n shadow-sm hover:shadow-md\n `,"data-test-id":m,onMouseEnter:O,onMouseLeave:E,style:{transition:`all ${f}ms cubic-bezier(0.4, 0, 0.2, 1)`}},t.createElement("div",{className:"flex items-center gap-3 px-4 py-3 w-full"},d&&t.createElement("div",{className:`flex-shrink-0 ${j.icon}`},d),t.createElement("div",{className:"flex flex-col min-w-0 flex-grow"},t.createElement("div",{className:"font-medium text-sm m-0 text-foreground"},n),o&&t.createElement("div",{className:"text-xs m-0 mt-0.5 text-muted-foreground truncate"},o)),t.createElement("button",{onClick:k,className:"\n flex-shrink-0 ml-2 p-1 rounded-md\n transition-all duration-200\n hover:bg-accent\n text-muted-foreground hover:text-accent-foreground\n ","aria-label":"Close notification"},t.createElement(lt,{size:14}))),!h&&t.createElement("div",{className:`absolute bottom-0 left-0 h-[2px] ${j.progress} opacity-80`,ref:g,style:{width:"100%",transformOrigin:"left"}}))};const lw=new class{isSetup=!1;isBrowser="undefined"!=typeof window;containers={[iw.TopCenter]:void 0,[iw.TopLeft]:void 0,[iw.TopRight]:void 0,[iw.BottomCenter]:void 0,[iw.BottomLeft]:void 0,[iw.BottomRight]:void 0};roots={[iw.TopCenter]:null,[iw.TopLeft]:null,[iw.TopRight]:null,[iw.BottomCenter]:null,[iw.BottomLeft]:null,[iw.BottomRight]:null};messages={[iw.TopCenter]:[],[iw.TopLeft]:[],[iw.TopRight]:[],[iw.BottomCenter]:[],[iw.BottomLeft]:[],[iw.BottomRight]:[]};constructor(){this.isBrowser&&this.setup()}setup(){if(!this.isBrowser)return;const e=document.getElementsByTagName("body")[0];Object.values(iw).forEach(t=>{const r=`message-container-${t}`;let n=document.getElementById(r);n||(n=document.createElement("div"),n.id=r,e.appendChild(n)),this.containers[t]=n,this.roots[t]=N(n)}),this.isSetup=!0}show(e){if(!this.isBrowser)return;this.isSetup||this.setup();const t=e.position||iw.TopCenter,r=e.id||`message-${Math.random().toString().slice(2,11)}`,n=50*this.messages[t].length,o={id:r,...e,animationDuration:e.animationDuration||300,destroy:()=>this.destroy(r,t)};setTimeout(()=>{this.messages[t]=[o,...this.messages[t]],this.render(t)},n)}destroy(e,t=iw.TopCenter){this.isBrowser&&(this.messages[t]=this.messages[t].filter(t=>t.id!==e),this.render(t))}success(e){this.show({icon:t.createElement(Zv,{size:18}),...e,variant:ow.Success})}error(e){this.show({icon:t.createElement(qv,{size:18}),...e,variant:ow.Error})}warning(e){this.show({icon:t.createElement(Uv,{size:18}),...e,variant:ow.Warning})}info(e){this.show({icon:t.createElement(Hv,{size:18}),...e,variant:ow.Info})}getPositionStyles(e){switch(e){case iw.TopLeft:return"fixed flex flex-col items-start justify-start gap-2 p-4 top-0 left-0 z-9999 pointer-events-none";case iw.TopRight:return"fixed flex flex-col items-end justify-start gap-2 p-4 top-0 right-0 z-9999 pointer-events-none";case iw.BottomCenter:return"fixed flex flex-col items-center justify-end gap-2 p-4 bottom-0 left-0 right-0 z-9999 pointer-events-none";case iw.BottomLeft:return"fixed flex flex-col items-start justify-end gap-2 p-4 bottom-0 left-0 z-9999 pointer-events-none";case iw.BottomRight:return"fixed flex flex-col items-end justify-end gap-2 p-4 bottom-0 right-0 z-9999 pointer-events-none";case iw.TopCenter:default:return"fixed flex flex-col items-center justify-start gap-2 p-4 top-0 left-0 right-0 z-9999 pointer-events-none"}}render(e=iw.TopCenter){if(!this.isBrowser||!this.roots[e])return;const r=this.messages[e].map(e=>t.createElement(aw,{key:e.id,...e}));this.roots[e].render(t.createElement("div",{className:this.getPositionStyles(e)},r))}},sw="...",cw=({className:t,...r})=>e.createElement("nav",{role:"navigation","aria-label":"pagination",className:Be("mx-auto flex w-full justify-center",t),...r}),uw=e.forwardRef(({className:t,...r},n)=>e.createElement("ul",{ref:n,className:Be("flex flex-row items-center gap-1",t),...r}));uw.displayName="PaginationContent";const pw=e.forwardRef(({className:t,...r},n)=>e.createElement("li",{ref:n,className:Be("",t),...r}));pw.displayName="PaginationItem";const fw=e.forwardRef(({className:t,isActive:r,size:n="medium",...o},i)=>e.createElement(ct,{ref:i,"aria-current":r?"page":void 0,variant:r?"primary":"link",size:n,className:Be("h-9 w-9",t),...o}));fw.displayName="PaginationLink";const dw=e.forwardRef(({className:t,...r},n)=>e.createElement(ct,{ref:n,variant:"link",size:"medium",className:Be("h-9 w-9",t),...r},e.createElement(Ze,{className:"h-4 w-4"}),e.createElement("span",{className:"sr-only"},"Previous page")));dw.displayName="PaginationPrevious";const mw=e.forwardRef(({className:t,...r},n)=>e.createElement(ct,{ref:n,variant:"link",size:"medium",className:Be("h-9 w-9",t),...r},e.createElement("span",{className:"sr-only"},"Next page"),e.createElement(Je,{className:"h-4 w-4"})));mw.displayName="PaginationNext";const hw=({className:t,...r})=>e.createElement("span",{"aria-hidden":!0,className:Be("flex h-9 w-9 items-center justify-center",t),...r},e.createElement(tt,{className:"h-4 w-4"}),e.createElement("span",{className:"sr-only"},"More pages"));hw.displayName="PaginationEllipsis";const yw=(e,t)=>{const r=t-e+1;return Array.from({length:r},(t,r)=>r+e)},vw=({currentPage:e,totalPages:r,onPageChange:n,siblingCount:o=1,className:i,disabled:c=!1,isLoading:u=!1,enableKeyboardNav:p=!1,showEllipsis:f=!0})=>{const d=l(()=>((e,t,r,n)=>{if(r+5>=t)return yw(1,t);const o=Math.max(e-r,1),i=Math.min(e+r,t),a=o>2,l=i<t-2;if(!a&&l){const e=yw(1,3+2*r);return n?[...e,sw,t]:[...e,t]}if(a&&!l){const e=yw(t-(3+2*r)+1,t);return n?[1,sw,...e]:[1,...e]}if(a&&l){const e=yw(o,i);return n?[1,sw,...e,sw,t]:[1,...e,t]}return yw(1,t)})(e,r,o,f),[e,r,o,f]),m=s(()=>{!c&&!u&&e>1&&n(e-1)},[e,n,c,u]),h=s(()=>{!c&&!u&&e<r&&n(e+1)},[e,r,n,c,u]),y=s(e=>{c||u||!p||("ArrowLeft"===e.key?(e.preventDefault(),m()):"ArrowRight"===e.key&&(e.preventDefault(),h()))},[m,h,c,u,p]);return a(()=>{if(p)return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[y,p]),0===e||d.length<2?null:t.createElement(cw,{className:Be("select-none",i)},t.createElement(uw,null,t.createElement(pw,null,t.createElement(dw,{onClick:m,disabled:1===e||c||u,className:Be("transition-all duration-200","hover:scale-105 hover:bg-accent",(c||u)&&"pointer-events-none opacity-50"),"aria-label":"Previous page"})),d.map((r,o)=>{if(r===sw)return t.createElement(pw,{key:`dots-${o}`},t.createElement(hw,null));const i=r,a=i===e;return t.createElement(pw,{key:i},t.createElement(fw,{isActive:a,onClick:()=>!c&&!u&&n(i),className:Be("transition-all duration-200",a&&"hover:bg-primary/90",!a&&"hover:bg-accent hover:scale-105",(c||u)&&"pointer-events-none opacity-50"),"aria-label":`Page ${i}`,"aria-current":a?"page":void 0},i))}),t.createElement(pw,null,t.createElement(mw,{onClick:h,disabled:e===r||c||u,className:Be("transition-all duration-200","hover:scale-105 hover:bg-accent",(c||u)&&"pointer-events-none opacity-50"),"aria-label":"Next page"}))))};var gw,bw,ww;!function(e){e.Left="left",e.Center="center",e.Right="right"}(gw||(gw={})),function(e){e.Left="left",e.Right="right",e.Center="center"}(bw||(bw={})),function(e){e.Text="text",e.Date="date",e.Status="status",e.Custom="custom"}(ww||(ww={}));const xw=(e=gw.Left)=>({left:"justify-start",center:"justify-center",right:"justify-end"}[e]),Ow=(e,t,r,n,o,i)=>({toggleSorting:n=>{if(!t.find(t=>t.key===e))return;const o=n?"desc":"asc";i({key:e,direction:o}),r&&r(e,o)},getIsSorted:()=>!(!o||o.key!==e)&&o.direction,key:e,data:n}),Ew=(e,t,r,n,o,i)=>Ow(e,t,r,n,o,i),kw=e=>{switch(e){case bw.Right:return"ml-auto order-2";case bw.Center:return"mx-auto";default:return"order-1"}},jw=e=>{switch(e){case bw.Left:return"order-1";case bw.Center:return"mx-auto";default:return"ml-auto order-2"}},Sw=(e=!1)=>e?{effectivePaginationPosition:bw.Left,effectiveEntriesPosition:bw.Right}:{effectivePaginationPosition:bw.Right,effectiveEntriesPosition:bw.Left},Pw=(e,t)=>{if(!t)return e;const r=e.split(" ");return r.length<=t?e:`${r.slice(0,t).join(" ")}...`};var Tw,Cw={exports:{}};var Nw=(Tw||(Tw=1,Cw.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",l="day",s="week",c="month",u="quarter",p="year",f="date",d="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},v=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},g={s:v,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),o=r%60;return(t<=0?"+":"-")+v(n,2,"0")+":"+v(o,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),o=t.clone().add(n,c),i=r-o<0,a=t.clone().add(n+(i?-1:1),c);return+(-(n+(r-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:p,w:s,d:l,D:f,h:a,m:i,s:o,ms:n,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=y;var x="$isDayjsObject",O=function(e){return e instanceof S||!(!e||!e[x])},E=function e(t,r,n){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),r&&(w[i]=r,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var l=t.name;w[l]=t,o=l}return!n&&o&&(b=o),o||!n&&b},k=function(e,t){if(O(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new S(r)},j=g;j.l=E,j.i=O,j.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var S=function(){function y(e){this.$L=E(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var v=y.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(j.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(m);if(n){var o=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return j},v.isValid=function(){return!(this.$d.toString()===d)},v.isSame=function(e,t){var r=k(e);return this.startOf(t)<=r&&r<=this.endOf(t)},v.isAfter=function(e,t){return k(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<k(e)},v.$g=function(e,t,r){return j.u(e)?this[t]:this.set(r,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var r=this,n=!!j.u(t)||t,u=j.p(e),d=function(e,t){var o=j.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?o:o.endOf(l)},m=function(e,t){return j.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},h=this.$W,y=this.$M,v=this.$D,g="set"+(this.$u?"UTC":"");switch(u){case p:return n?d(1,0):d(31,11);case c:return n?d(1,y):d(0,y+1);case s:var b=this.$locale().weekStart||0,w=(h<b?h+7:h)-b;return d(n?v-w:v+(6-w),y);case l:case f:return m(g+"Hours",0);case a:return m(g+"Minutes",1);case i:return m(g+"Seconds",2);case o:return m(g+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var r,s=j.p(e),u="set"+(this.$u?"UTC":""),d=(r={},r[l]=u+"Date",r[f]=u+"Date",r[c]=u+"Month",r[p]=u+"FullYear",r[a]=u+"Hours",r[i]=u+"Minutes",r[o]=u+"Seconds",r[n]=u+"Milliseconds",r)[s],m=s===l?this.$D+(t-this.$W):t;if(s===c||s===p){var h=this.clone().set(f,1);h.$d[d](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else d&&this.$d[d](m);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[j.p(e)]()},v.add=function(n,u){var f,d=this;n=Number(n);var m=j.p(u),h=function(e){var t=k(d);return j.w(t.date(t.date()+Math.round(e*n)),d)};if(m===c)return this.set(c,this.$M+n);if(m===p)return this.set(p,this.$y+n);if(m===l)return h(1);if(m===s)return h(7);var y=(f={},f[i]=t,f[a]=r,f[o]=e,f)[m]||1,v=this.$d.getTime()+n*y;return j.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var n=e||"YYYY-MM-DDTHH:mm:ssZ",o=j.z(this),i=this.$H,a=this.$m,l=this.$M,s=r.weekdays,c=r.months,u=r.meridiem,p=function(e,r,o,i){return e&&(e[r]||e(t,n))||o[r].slice(0,i)},f=function(e){return j.s(i%12||12,e,"0")},m=u||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(h,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return j.s(t.$y,4,"0");case"M":return l+1;case"MM":return j.s(l+1,2,"0");case"MMM":return p(r.monthsShort,l,c,3);case"MMMM":return p(c,l);case"D":return t.$D;case"DD":return j.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return p(r.weekdaysMin,t.$W,s,2);case"ddd":return p(r.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(i);case"HH":return j.s(i,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return m(i,a,!0);case"A":return m(i,a,!1);case"m":return String(a);case"mm":return j.s(a,2,"0");case"s":return String(t.$s);case"ss":return j.s(t.$s,2,"0");case"SSS":return j.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(n,f,d){var m,h=this,y=j.p(f),v=k(n),g=(v.utcOffset()-this.utcOffset())*t,b=this-v,w=function(){return j.m(h,v)};switch(y){case p:m=w()/12;break;case c:m=w();break;case u:m=w()/3;break;case s:m=(b-g)/6048e5;break;case l:m=(b-g)/864e5;break;case a:m=b/r;break;case i:m=b/t;break;case o:m=b/e;break;default:m=b}return d?m:j.a(m)},v.daysInMonth=function(){return this.endOf(c).$D},v.$locale=function(){return w[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=E(e,t,!0);return n&&(r.$L=n),r},v.clone=function(){return j.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},y}(),P=S.prototype;return k.prototype=P,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",l],["$M",c],["$y",p],["$D",f]].forEach(function(e){P[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),k.extend=function(e,t){return e.$i||(e(t,S,k),e.$i=!0),k},k.locale=E,k.isDayjs=O,k.unix=function(e){return k(1e3*e)},k.en=w[b],k.Ls=w,k.p={},k}()),Cw.exports),Mw=pt(Nw);const Aw={active:"bg-green-100 text-green-800",inactive:"bg-red-100 text-red-800",pending:"bg-yellow-100 text-yellow-800",completed:"bg-blue-100 text-blue-800",processing:"bg-purple-100 text-purple-800",default:"bg-gray-100 text-gray-800"},zw="name",Lw="200px",Dw="email",_w="joinDate",Iw="status",Rw=(e,r,n,o)=>{const i=r[e.key],a=xw(e.align),l=e=>t.createElement("div",{className:`flex w-full ${a}`},e);if(n&&e.customCell)return l(e.customCell(i,r));if(null==i)return l(null);switch(e.type){case ww.Date:{if(!e.dateFormat)return l(t.createElement(bg,{variant:"small",color:"secondary"},String(i)));const r=Mw(i,e.dateFormat.input).format(e.dateFormat.output);return l(t.createElement(bg,{variant:"small",color:"secondary"},r))}case ww.Status:if(o){const e=String(i).toLowerCase(),r=Aw[e]||Aw.default;return l(t.createElement("span",{className:`px-2 py-1 text-xs font-medium rounded-full ${r}`},String(i)))}return l(t.createElement(bg,{variant:"small",color:"primary"},String(i)));case ww.Text:default:{const r=String(i),n=Pw(r,e.maxWords);return l(t.createElement(bg,{variant:"small",color:"primary",className:n!==r?"truncate":"",title:r},n))}}},Bw=(e,r)=>r?.key!==e.key?t.createElement(Ye,{className:"h-4 w-4 opacity-40"}):"asc"===r.direction?t.createElement(Qe,{className:"h-4 w-4 text-primary"}):t.createElement(Ke,{className:"h-4 w-4 text-primary"}),Ww=(e,r,n,o,i)=>{if(e.customHeader)return e.customHeader(r(e.key));const a=xw(e.align);return o&&e.sortable?t.createElement("div",{className:`flex w-full ${a}`},t.createElement(ct,{variant:"link",onClick:()=>n(e),className:"p-0 h-auto font-medium text-muted-foreground"},t.createElement("div",{className:"flex items-center"},t.createElement("span",{className:"truncate"},e.title),t.createElement("span",{className:"ml-2 inline-flex shrink-0"},Bw(e,i))))):t.createElement("div",{className:`flex w-full items-center h-9 ${a}`},t.createElement("span",{className:"truncate font-medium text-muted-foreground"},e.title))},Fw=(e,t,r,n,o)=>Ww(e,t,r,n,o),$w={renderSortIcon:Bw,renderHeader:Ww,renderTableHeader:Fw},Vw=({columns:e,data:r,sortable:n=!1,pagination:o=!1,searchable:c=!1,currentPage:u=1,pageSize:p=5,onSort:f,onPageChange:d,actions:m,showCustomCells:h=!0,useBuiltInStatus:y=!0,swapPaginationLayout:v=!1,selectable:g=!1,onSelectionChange:b})=>{const[w,x]=i(null),[O,E]=i(u),[k,j]=i(p),[S,P]=i(""),[T,C]=i({}),[N,M]=i(!1),{effectivePaginationPosition:A,effectiveEntriesPosition:z}=Sw(v);a(()=>{E(u)},[u]),a(()=>{g&&(C({}),M(!1))},[r,g]);const L=s(e=>{n&&e.sortable&&(w?.key===e.key?"asc"===w.direction?(x({key:e.key,direction:"desc"}),f&&f(e.key,"desc")):(x(null),f&&f("__clear_sort__","asc")):(x({key:e.key,direction:"asc"}),f&&f(e.key,"asc")))},[w,n,f]),D=s(e=>{n&&e.sortable&&L(e)},[n,L]),_=l(()=>w&&n?[...r].sort((e,t)=>{const r=e[w.key],n=t[w.key];return r<n?"asc"===w.direction?-1:1:r>n?"asc"===w.direction?1:-1:0}):r,[r,w,n]),I=s(e=>{P(e.target.value),E(1)},[]),R=l(()=>c&&S.trim()?_.filter(t=>e.some(e=>{const r=t[e.key];return null!=r&&String(r).toLowerCase().includes(S.toLowerCase())})):_,[_,e,S,c]),B=l(()=>Math.max(1,Math.ceil(R.length/k)),[R.length,k]),W=l(()=>{if(o){const e=(O-1)*k;return R.slice(e,e+k)}return R},[R,O,k,o]),F=s(e=>{e<1||e>B||(E(e),d&&d(e))},[B,d]),$=s(e=>{j(e),E(1)},[]),V=s((e,t)=>e.id||`row-${t}`,[]),H=s((e,t)=>{const r=V(e,t),n={...T,[r]:!T[r]};C(n);const o=W.every((e,t)=>!0===n[V(e,t)]);if(M(o),b){const e=W.filter((e,t)=>n[V(e,t)]);b(e)}},[T,W,b,V]),U=s(()=>{const e=!N;M(e);const t={...T};if(W.forEach((r,n)=>{const o=V(r,n);t[o]=e}),C(t),b){const t=e?[...W]:[];b(t)}},[N,W,T,b,V]),q=l(()=>(e,t)=>Rw(e,t,h,y),[h,y]);return t.createElement("div",{className:"w-full"},t.createElement("div",{className:"flex flex-wrap items-center justify-between mb-6 gap-6"},c&&t.createElement("div",{className:"w-80"},t.createElement(xg,{id:"table-search",value:S,onChange:I,label:"Search",type:"search"})),o&&t.createElement("div",{className:"flex items-center space-x-3 ml-auto"},t.createElement("label",{htmlFor:"page-size-select",className:"text-sm font-medium text-muted-foreground"},"Rows per page"),t.createElement("select",{id:"page-size-select",value:k,onChange:e=>$(parseInt(e.target.value)),className:"h-9 rounded-md border border-input bg-background px-3 py-1 text-sm ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 transition-colors"},[5,10,20,50].map(e=>t.createElement("option",{key:e,value:e},e))))),t.createElement("div",{className:"relative w-full overflow-auto rounded-lg border shadow-xs"},t.createElement("table",{className:"w-full caption-bottom text-sm"},t.createElement("thead",{className:"bg-muted/40"},t.createElement("tr",{className:"border-b border-border"},g&&t.createElement("th",{className:"h-11 px-3 font-medium text-muted-foreground w-10"},t.createElement(ig,{checked:N,onChange:U,dataTestId:"select-all-checkbox"})),e.map(r=>t.createElement("th",{key:r.key,className:"h-11 px-6 font-medium text-muted-foreground",style:{width:r.width||"auto"}},t.createElement("div",{className:"h-full flex items-center",onClick:()=>D(r)},Fw(r,t=>Ew(t,e,f,W,w,x),L,n,w)))),m&&t.createElement("th",{className:"h-11 px-6 text-right font-medium text-muted-foreground"},t.createElement("div",{className:"flex items-center h-9 justify-end"},t.createElement("span",{className:"truncate font-medium text-muted-foreground"},"Actions"))))),t.createElement("tbody",{className:"[&_tr:last-child]:border-0"},W.length>0?W.map((r,n)=>t.createElement("tr",{key:V(r,n),className:"border-b border-border transition-colors hover:bg-muted/30 "+(T[V(r,n)]?"bg-muted/50":"")},g&&t.createElement("td",{className:"p-4 px-5 w-10"},t.createElement(ig,{checked:!!T[V(r,n)],onChange:()=>H(r,n),dataTestId:`select-row-${n}`})),e.map(e=>t.createElement("td",{key:e.key,className:"p-4 px-6",style:{width:e.width||"auto"}},q(e,r))),m&&t.createElement("td",{className:"p-4 px-6 text-right"},m(r)))):t.createElement("tr",null,t.createElement("td",{colSpan:e.length+(m?1:0)+(g?1:0),className:"py-10 px-6 text-center text-muted-foreground"},"No data available"))))),o&&B>0&&t.createElement("div",{className:"flex items-center justify-between px-3 mt-6 w-full"},t.createElement("div",{className:`text-sm font-medium text-muted-foreground whitespace-nowrap ${kw(z)}`},"Showing"," ",t.createElement("span",{className:"text-foreground"},Math.min((O-1)*k+1,R.length))," ","to"," ",t.createElement("span",{className:"text-foreground"},Math.min(O*k,R.length))," ","of ",t.createElement("span",{className:"text-foreground"},R.length)," ","entries"),t.createElement("div",{className:jw(A)},t.createElement(vw,{currentPage:O,totalPages:B,onPageChange:F,disabled:!1,isLoading:!1}))))},Hw=(e,t,r)=>({key:e,title:t,type:ww.Text,width:r?.width,sortable:r?.sortable,align:r?.align||gw.Left,customCell:r?.customCell,maxWords:r?.maxWords}),Uw=(e,t,r)=>({key:e,title:t,type:ww.Date,width:r?.width,sortable:r?.sortable,align:r?.align||gw.Left,dateFormat:{input:r?.inputFormat,output:r?.outputFormat||"MMM DD, YYYY"},customCell:r?.customCell}),qw=(e,t,r)=>({key:e,title:t,type:ww.Status,width:r?.width,sortable:r?.sortable,align:r?.align||gw.Center,customCell:r?.customCell}),Yw=(e,r)=>{const{enableTruncation:n=!1,maxWords:o=5}=r||{},i=Hw("description","Description",{sortable:!0,...n&&{maxWords:2*o}});return[Hw(zw,"Name",{width:Lw,sortable:!0,...n&&{maxWords:o},customCell:e?e=>t.createElement("div",{className:"flex items-center"},t.createElement("div",{className:"h-8 w-8 rounded-full bg-gray-200 mr-3 flex items-center justify-center"},t.createElement(bg,{variant:"small",color:"secondary"},e.charAt(0))),t.createElement(bg,{variant:"small",color:"secondary",fontWeight:"semibold"},e)):void 0}),Hw(Dw,"Email",{...n&&{maxWords:o},customCell:e?e=>t.createElement("a",{href:`mailto:${e}`,className:"hover:underline"},t.createElement(bg,{variant:"small",color:"secondary"},e)):void 0}),i,Uw(_w,"Join Date",{sortable:!0,inputFormat:"YYYY-MM-DD",outputFormat:"MMM DD, YYYY"}),e?Hw(Iw,"Status",{align:gw.Center,customCell:e=>{const r=e;return t.createElement("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full"},t.createElement(bg,{variant:"small",color:"secondary",fontWeight:"semibold"},r))}}):qw(Iw,"Status",{align:gw.Center})]};function Xw(t){var r=t.children,n=t.prefixCls,o=t.id,i=t.overlayInnerStyle,a=t.bodyClassName,l=t.className,s=t.style;return e.createElement("div",{className:ug("".concat(n,"-content"),l),style:s},e.createElement("div",{className:ug("".concat(n,"-inner"),a),id:o,role:"tooltip",style:i},"function"==typeof r?r():r))}function Gw(){return Gw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gw.apply(null,arguments)}function Kw(e){return Kw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kw(e)}function Zw(e){var t=function(e,t){if("object"!=Kw(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=Kw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Kw(t)?t:t+""}function Jw(e,t,r){return(t=Zw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ex(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qw(Object(r),!0).forEach(function(t){Jw(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qw(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function tx(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function rx(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function nx(e,t){if(e){if("string"==typeof e)return rx(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rx(e,t):void 0}}function ox(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||nx(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ix(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var ax={},lx=[];function sx(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var r=lx.reduce(function(e,t){return t(null!=e?e:"","warning")},t);r&&console.error("Warning: ".concat(r))}}function cx(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var r=lx.reduce(function(e,t){return t(null!=e?e:"","note")},t);r&&console.warn("Note: ".concat(r))}}function ux(e,t,r){t||ax[r]||(e(!1,r),ax[r]=!0)}function px(e,t){ux(sx,e,t)}px.preMessage=function(e){lx.push(e)},px.resetWarned=function(){ax={}},px.noteOnce=function(e,t){ux(cx,e,t)};var fx,dx={exports:{}},mx={};var hx,yx,vx={};
|
|
44
|
+
*/var sg,cg=(ag||(ag=1,sg=lg,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=n(e,r(o)))}return e}function r(r){if("string"==typeof r||"number"==typeof r)return r;if("object"!=typeof r)return"";if(Array.isArray(r))return t.apply(null,r);if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]"))return r.toString();var o="";for(var i in r)e.call(r,i)&&r[i]&&(o=n(o,i));return o}function n(e,t){return t?e?e+" "+t:e+t:e}sg.exports?(t.default=t,sg.exports=t):window.classNames=t}()),lg.exports),ug=pt(cg);const pg={extraSmall:"mt-1 mb-1",small:"mt-2 mb-2",medium:"mt-4 mb-4",large:"mt-6 mb-6",extraLarge:"mt-8 mb-8"},fg={tight:"tracking-tight",normal:"tracking-normal",wide:"tracking-wide",wider:"tracking-wider",widest:"tracking-widest"},dg={h1:"text-4xl",h2:"text-3xl",h3:"text-2xl",h4:"text-xl",h5:"text-lg",h6:"text-base"},mg={primary:"text-primary",secondary:"text-secondary",tertiary:"text-destructive",quaternary:"text-warning",quinary:"text-muted-foreground",white:"text-white",harford:"text-[#043d5a]",cocoon:"text-[#62a4d9]"},hg={normal:"font-normal",bold:"font-bold",semibold:"font-semibold",light:"font-light"},yg={body:"text-base",paragraph:"text-lg",caption:"text-sm",small:"text-xs",regular:"text-base",paragraphSm:"text-md",captionSm:"text-xs"},vg=({variant:e="h1",color:r="harford",marginTop:n,marginBottom:o,letterSpacing:i,textAlign:a="text-left",fontWeight:l="normal",children:s,...c})=>{const u=ug(dg[e],mg[r],hg[l],n?pg[n]:"",o?pg[o]:"",i?fg[i]:"",a);return t.createElement(e,{className:u,...c},s)},gg=({variant:e,color:r="quaternary",marginTop:n,marginBottom:o,letterSpacing:i,textAlign:a="text-left",fontWeight:l="normal",children:s,...c})=>{const u=ug(yg[e],mg[r],hg[l],n?pg[n]:"",o?pg[o]:"",i?fg[i]:"",a);return t.createElement("p",{className:u,...c},s)},bg=gg,wg=vg,xg=({value:e,fluid:r,label:n,leftIcon:o,rightIcon:a,togglePassword:s,error:c,success:u,hint:p,disabled:f,type:d="text",hintTextProps:m={variant:"small"},className:h="",dataTestId:y,inputSize:v,...g})=>{const[b,w]=i(!1),[x,O]=i(!1),E=l(()=>b?t.createElement(tg,{name:"EyeOff",size:16}):t.createElement(tg,{name:"Eye",size:16}),[b]),k=n&&(e||x),{width:j}=(()=>{if(!n||!k)return{width:0,leftOffset:0};const e=7.5*n.length+16;return{width:Math.max(e,0),leftOffset:12}})(),S=f?"border-input":c?"border-destructive":u?"border-success":x||e?"border-primary":"border-input",P=l(()=>{let e="relative flex items-center px-3 py-2 rounded-lg overflow-visible min-h-[2.5rem]";return f?e+=" bg-muted text-muted-foreground":c?e+=" text-destructive":u&&(e+=" text-success"),r&&(e+=" w-full"),`${e} ${h}`},[f,c,u,r,h]),T=l(()=>{let e="peer w-full outline-none bg-transparent placeholder-transparent text-sm leading-5 transition-colors duration-200";return e+=f?" text-muted-foreground cursor-not-allowed":" text-foreground","password"===d&&(e+=" pr-8"),"number"===d&&(e+=" appearance-none"),e},[f,d]),C=l(()=>"password"===d&&b?"text":d,[d,b]),N=l(()=>{let e="absolute transform transition-all duration-300 ease-out z-20 pointer-events-none select-none";return k?(e+=" -top-4 text-xs font-medium tracking-wide",e+=" left-3"):e+=" top-1/2 left-3 -translate-y-1/2 text-sm font-normal",e+=x&&!f?" text-primary":c?" text-destructive":u?" text-success":" text-muted-foreground",e},[k,x,f,c,u]);return t.createElement("div",{className:P},t.createElement("div",{className:"absolute inset-0 rounded-lg pointer-events-none"},t.createElement("div",{className:`absolute inset-0 rounded-lg transition-all duration-300 ease-out border ${S}`,style:{clipPath:k?`polygon(\n 0% 0%,\n 12px 0%,\n 12px 0%,\n 14px 0%,\n 14px 50%,\n ${14+j}px 50%,\n ${14+j}px 0%,\n ${16+j}px 0%,\n 100% 0%,\n 100% 100%,\n 0% 100%\n )`:"none"}}),(x||e)&&t.createElement("div",{className:"absolute inset-0 rounded-lg transition-all duration-300 ease-out border-0",style:{boxShadow:x?c?"0 0 0 3px rgb(239 68 68 / 0.1)":u?"0 0 0 3px rgb(34 197 94 / 0.1)":"0 0 0 3px rgb(59 130 246 / 0.1)":"none",clipPath:k?`polygon(\n 0% 0%,\n 12px 0%,\n 12px 0%,\n 14px 0%,\n 14px 50%,\n ${14+j}px 50%,\n ${14+j}px 0%,\n ${16+j}px 0%,\n 100% 0%,\n 100% 100%,\n 0% 100%\n )`:"none"}})),o&&t.createElement("div",{className:"flex items-center mr-3 text-muted-foreground transition-colors duration-200"},o),t.createElement("div",{className:"relative w-full"},t.createElement("input",{...g,"data-test-id":y,id:g.id,value:e,disabled:f,type:C,className:T,placeholder:" ",onFocus:e=>{O(!0),g.onFocus?.(e)},onBlur:e=>{O(!1),g.onBlur?.(e)}}),n&&t.createElement("label",{htmlFor:g.id,className:N,style:{transform:k?"translateX(4px)":void 0}},n)),"password"===d&&s&&t.createElement("button",{type:"button",className:"absolute right-3 text-muted-foreground hover:text-foreground transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed hover:scale-105 active:scale-95",onClick:()=>{!f&&e&&w(!b)},disabled:f,tabIndex:-1},E),a&&t.createElement("div",{className:"flex items-center ml-3 text-muted-foreground transition-colors duration-200"},a),(c||u||p)&&t.createElement("div",{className:"absolute top-full left-0 mt-2 text-xs w-full transition-all duration-200"},t.createElement(bg,{color:"primary",...m},c?.message||u?.message&&!c?.message||!c?.message&&!u?.message&&p?.message)))};function Og(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),!1===r||!n.defaultPrevented)return t?.(n)}}function Eg(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function kg(...e){return t=>{let r=!1;const n=e.map(e=>{const n=Eg(e,t);return r||"function"!=typeof n||(r=!0),n});if(r)return()=>{for(let t=0;t<n.length;t++){const r=n[t];"function"==typeof r?r():Eg(e[t],null)}}}}function jg(...t){return e.useCallback(kg(...t),t)}function Sg(t,r=[]){let n=[];const o=()=>{const r=n.map(t=>e.createContext(t));return function(n){const o=n?.[t]||r;return e.useMemo(()=>({[`__scope${t}`]:{...n,[t]:o}}),[n,o])}};return o.scopeName=t,[function(r,o){const i=e.createContext(o),a=n.length;n=[...n,o];const l=r=>{const{scope:n,children:o,...l}=r,s=n?.[t]?.[a]||i,c=e.useMemo(()=>l,Object.values(l));return k(s.Provider,{value:c,children:o})};return l.displayName=r+"Provider",[l,function(n,l){const s=l?.[t]?.[a]||i,c=e.useContext(s);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${n}\` must be used within \`${r}\``)}]},Pg(o,...r)]}function Pg(...t){const r=t[0];if(1===t.length)return r;const n=()=>{const n=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){const o=n.reduce((e,{useScope:r,scopeName:n})=>({...e,...r(t)[`__scope${n}`]}),{});return e.useMemo(()=>({[`__scope${r.scopeName}`]:o}),[o])}};return n.scopeName=r.scopeName,n}function Tg(t){const r=Ng(t),n=e.forwardRef((t,n)=>{const{children:o,...i}=t,a=e.Children.toArray(o),l=a.find(Ag);if(l){const t=l.props.children,o=a.map(r=>r===l?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:r);return k(r,{...i,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return k(r,{...i,ref:n,children:o})});return n.displayName=`${t}.Slot`,n}var Cg=Tg("Slot");function Ng(t){const r=e.forwardRef((t,r)=>{const{children:n,...o}=t;if(e.isValidElement(n)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}(o,n.props);return n.type!==e.Fragment&&(i.ref=r?kg(r,t):t),e.cloneElement(n,i)}return e.Children.count(n)>1?e.Children.only(null):null});return r.displayName=`${t}.SlotClone`,r}var Mg=Symbol("radix.slottable");function Ag(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===Mg}var zg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,r)=>{const n=Tg(`Primitive.${r}`),o=e.forwardRef((e,t)=>{const{asChild:o,...i}=e,a=o?n:r;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),k(a,{...i,ref:t})});return o.displayName=`Primitive.${r}`,{...t,[r]:o}},{});var Lg=globalThis?.document?e.useLayoutEffect:()=>{},Dg=e[" useId ".trim().toString()]||(()=>{}),_g=0;function Ig(t){const[r,n]=e.useState(Dg());return Lg(()=>{n(e=>e??String(_g++))},[t]),r?`radix-${r}`:""}function Rg(t){const r=e.useRef(t);return e.useEffect(()=>{r.current=t}),e.useMemo(()=>(...e)=>r.current?.(...e),[])}var Bg=e[" useInsertionEffect ".trim().toString()]||Lg;function Wg({prop:t,defaultProp:r,onChange:n=()=>{},caller:o}){const[i,a,l]=function({defaultProp:t,onChange:r}){const[n,o]=e.useState(t),i=e.useRef(n),a=e.useRef(r);return Bg(()=>{a.current=r},[r]),e.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,o,a]}({defaultProp:r,onChange:n}),s=void 0!==t,c=s?t:i;{const r=e.useRef(void 0!==t);e.useEffect(()=>{const e=r.current;if(e!==s){const t=e?"controlled":"uncontrolled",r=s?"controlled":"uncontrolled";console.warn(`${o} is changing from ${t} to ${r}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}r.current=s},[s,o])}const u=e.useCallback(e=>{if(s){const r=function(e){return"function"==typeof e}(e)?e(t):e;r!==t&&l.current?.(r)}else a(e)},[s,t,a,l]);return[c,u]}var Fg=e.createContext(void 0);function $g(t){const r=e.useContext(Fg);return t||r||"ltr"}var Vg="rovingFocusGroup.onEntryFocus",Hg={bubbles:!1,cancelable:!0},Ug="RovingFocusGroup",[qg,Yg,Xg]=function(e){const r=e+"CollectionProvider",[n,o]=Sg(r),[i,a]=n(r,{collectionRef:{current:null},itemMap:new Map}),l=e=>{const{scope:r,children:n}=e,o=t.useRef(null),a=t.useRef(new Map).current;return k(i,{scope:r,itemMap:a,collectionRef:o,children:n})};l.displayName=r;const s=e+"CollectionSlot",c=Tg(s),u=t.forwardRef((e,t)=>{const{scope:r,children:n}=e,o=jg(t,a(s,r).collectionRef);return k(c,{ref:o,children:n})});u.displayName=s;const p=e+"CollectionItemSlot",f="data-radix-collection-item",d=Tg(p),m=t.forwardRef((e,r)=>{const{scope:n,children:o,...i}=e,l=t.useRef(null),s=jg(r,l),c=a(p,n);return t.useEffect(()=>(c.itemMap.set(l,{ref:l,...i}),()=>{c.itemMap.delete(l)})),k(d,{[f]:"",ref:s,children:o})});return m.displayName=p,[{Provider:l,Slot:u,ItemSlot:m},function(r){const n=a(e+"CollectionConsumer",r),o=t.useCallback(()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`)),r=Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current));return r},[n.collectionRef,n.itemMap]);return o},o]}(Ug),[Gg,Kg]=Sg(Ug,[Xg]),[Zg,Jg]=Gg(Ug),Qg=e.forwardRef((e,t)=>k(qg.Provider,{scope:e.__scopeRovingFocusGroup,children:k(qg.Slot,{scope:e.__scopeRovingFocusGroup,children:k(eb,{...e,ref:t})})}));Qg.displayName=Ug;var eb=e.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:i=!1,dir:a,currentTabStopId:l,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:p=!1,...f}=t,d=e.useRef(null),m=jg(r,d),h=$g(a),[y,v]=Wg({prop:l,defaultProp:s??null,onChange:c,caller:Ug}),[g,b]=e.useState(!1),w=Rg(u),x=Yg(n),O=e.useRef(!1),[E,j]=e.useState(0);return e.useEffect(()=>{const e=d.current;if(e)return e.addEventListener(Vg,w),()=>e.removeEventListener(Vg,w)},[w]),k(Zg,{scope:n,orientation:o,dir:h,loop:i,currentTabStopId:y,onItemFocus:e.useCallback(e=>v(e),[v]),onItemShiftTab:e.useCallback(()=>b(!0),[]),onFocusableItemAdd:e.useCallback(()=>j(e=>e+1),[]),onFocusableItemRemove:e.useCallback(()=>j(e=>e-1),[]),children:k(zg.div,{tabIndex:g||0===E?-1:0,"data-orientation":o,...f,ref:m,style:{outline:"none",...t.style},onMouseDown:Og(t.onMouseDown,()=>{O.current=!0}),onFocus:Og(t.onFocus,e=>{const t=!O.current;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent(Vg,Hg);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter(e=>e.focusable);ob([e.find(e=>e.active),e.find(e=>e.id===y),...e].filter(Boolean).map(e=>e.ref.current),p)}}O.current=!1}),onBlur:Og(t.onBlur,()=>b(!1))})})}),tb="RovingFocusGroupItem",rb=e.forwardRef((t,r)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:i=!1,tabStopId:a,children:l,...s}=t,c=Ig(),u=a||c,p=Jg(tb,n),f=p.currentTabStopId===u,d=Yg(n),{onFocusableItemAdd:m,onFocusableItemRemove:h,currentTabStopId:y}=p;return e.useEffect(()=>{if(o)return m(),()=>h()},[o,m,h]),k(qg.ItemSlot,{scope:n,id:u,focusable:o,active:i,children:k(zg.span,{tabIndex:f?0:-1,"data-orientation":p.orientation,...s,ref:r,onMouseDown:Og(t.onMouseDown,e=>{o?p.onItemFocus(u):e.preventDefault()}),onFocus:Og(t.onFocus,()=>p.onItemFocus(u)),onKeyDown:Og(t.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void p.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,r){const n=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(n)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)?void 0:nb[n]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let r=d().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)r.reverse();else if("prev"===t||"next"===t){"prev"===t&&r.reverse();const n=r.indexOf(e.currentTarget);r=p.loop?function(e,t){return e.map((r,n)=>e[(t+n)%e.length])}(r,n+1):r.slice(n+1)}setTimeout(()=>ob(r))}}),children:"function"==typeof l?l({isCurrentTabStop:f,hasTabStop:null!=y}):l})})});rb.displayName=tb;var nb={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ob(e,t=!1){const r=document.activeElement;for(const n of e){if(n===r)return;if(n.focus({preventScroll:t}),document.activeElement!==r)return}}var ib=Qg,ab=rb;function lb(t){const[r,n]=e.useState(void 0);return Lg(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver(e=>{if(!Array.isArray(e))return;if(!e.length)return;const r=e[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=t.offsetWidth,i=t.offsetHeight;n({width:o,height:i})});return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}n(void 0)},[t]),r}function sb(t){const r=e.useRef({value:t,previous:t});return e.useMemo(()=>(r.current.value!==t&&(r.current.previous=r.current.value,r.current.value=t),r.current.previous),[t])}var cb=t=>{const{present:r,children:n}=t,o=function(t){const[r,n]=e.useState(),o=e.useRef(null),i=e.useRef(t),a=e.useRef("none"),l=t?"mounted":"unmounted",[s,c]=function(t,r){return e.useReducer((e,t)=>r[e][t]??e,t)}(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const e=ub(o.current);a.current="mounted"===s?e:"none"},[s]),Lg(()=>{const e=o.current,r=i.current;if(r!==t){const n=a.current,o=ub(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(r&&n!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}},[t,c]),Lg(()=>{if(r){let e;const t=r.ownerDocument.defaultView??window,n=n=>{const a=ub(o.current).includes(n.animationName);if(n.target===r&&a&&(c("ANIMATION_END"),!i.current)){const n=r.style.animationFillMode;r.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===r.style.animationFillMode&&(r.style.animationFillMode=n)})}},l=e=>{e.target===r&&(a.current=ub(o.current))};return r.addEventListener("animationstart",l),r.addEventListener("animationcancel",n),r.addEventListener("animationend",n),()=>{t.clearTimeout(e),r.removeEventListener("animationstart",l),r.removeEventListener("animationcancel",n),r.removeEventListener("animationend",n)}}c("ANIMATION_END")},[r,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback(e=>{o.current=e?getComputedStyle(e):null,n(e)},[])}}(r),i="function"==typeof n?n({present:o.isPresent}):e.Children.only(n),a=jg(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;if(r)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof n||o.isPresent?e.cloneElement(i,{ref:a}):null};function ub(e){return e?.animationName||"none"}cb.displayName="Presence";var pb="Radio",[fb,db]=Sg(pb),[mb,hb]=fb(pb),yb=e.forwardRef((t,r)=>{const{__scopeRadio:n,name:o,checked:i=!1,required:a,disabled:l,value:s="on",onCheck:c,form:u,...p}=t,[f,d]=e.useState(null),m=jg(r,e=>d(e)),h=e.useRef(!1),y=!f||(u||!!f.closest("form"));return S(mb,{scope:n,checked:i,disabled:l,children:[k(zg.button,{type:"button",role:"radio","aria-checked":i,"data-state":wb(i),"data-disabled":l?"":void 0,disabled:l,value:s,...p,ref:m,onClick:Og(t.onClick,e=>{i||c?.(),y&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())})}),y&&k(bb,{control:f,bubbles:!h.current,name:o,value:s,checked:i,required:a,disabled:l,form:u,style:{transform:"translateX(-100%)"}})]})});yb.displayName=pb;var vb="RadioIndicator",gb=e.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,i=hb(vb,r);return k(cb,{present:n||i.checked,children:k(zg.span,{"data-state":wb(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});gb.displayName=vb;var bb=e.forwardRef(({__scopeRadio:t,control:r,checked:n,bubbles:o=!0,...i},a)=>{const l=e.useRef(null),s=jg(l,a),c=sb(n),u=lb(r);return e.useEffect(()=>{const e=l.current;if(!e)return;const t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==n&&r){const t=new Event("click",{bubbles:o});r.call(e,n),e.dispatchEvent(t)}},[c,n,o]),k(zg.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function wb(e){return e?"checked":"unchecked"}bb.displayName="RadioBubbleInput";var xb=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ob="RadioGroup",[Eb,kb]=Sg(Ob,[Kg,db]),jb=Kg(),Sb=db(),[Pb,Tb]=Eb(Ob),Cb=e.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:i,required:a=!1,disabled:l=!1,orientation:s,dir:c,loop:u=!0,onValueChange:p,...f}=e,d=jb(r),m=$g(c),[h,y]=Wg({prop:i,defaultProp:o??null,onChange:p,caller:Ob});return k(Pb,{scope:r,name:n,required:a,disabled:l,value:h,onValueChange:y,children:k(ib,{asChild:!0,...d,orientation:s,dir:m,loop:u,children:k(zg.div,{role:"radiogroup","aria-required":a,"aria-orientation":s,"data-disabled":l?"":void 0,dir:m,...f,ref:t})})})});Cb.displayName=Ob;var Nb="RadioGroupItem",Mb=e.forwardRef((t,r)=>{const{__scopeRadioGroup:n,disabled:o,...i}=t,a=Tb(Nb,n),l=a.disabled||o,s=jb(n),c=Sb(n),u=e.useRef(null),p=jg(r,u),f=a.value===i.value,d=e.useRef(!1);return e.useEffect(()=>{const e=e=>{xb.includes(e.key)&&(d.current=!0)},t=()=>d.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}},[]),k(ab,{asChild:!0,...s,focusable:!l,active:f,children:k(yb,{disabled:l,required:a.required,checked:f,...c,...i,name:a.name,ref:p,onCheck:()=>a.onValueChange(i.value),onKeyDown:Og(e=>{"Enter"===e.key&&e.preventDefault()}),onFocus:Og(i.onFocus,()=>{d.current&&u.current?.click()})})})});Mb.displayName=Nb;var Ab=e.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=Sb(r);return k(gb,{...o,...n,ref:t})});Ab.displayName="RadioGroupIndicator";var zb=Cb,Lb=Mb,Db=Ab;const _b=t.forwardRef(({className:e,classNames:r,showIcons:n=!0,withCard:o=!0,options:i,...a},l)=>t.createElement(zb,{ref:l,className:Be("grid gap-2",e,r?.root),...a},i.map(e=>t.createElement("div",{key:e.id,className:Be("relative")},t.createElement("label",{htmlFor:e.id,className:Be("relative flex w-full items-center gap-x-3",o&&["cursor-pointer rounded-lg border-2 p-4","border-input bg-background hover:bg-accent hover:text-accent-foreground","data-[state=checked]:border-primary data-[state=checked]:bg-primary/5"],!o&&"cursor-pointer py-2",r?.label)},t.createElement(Lb,{value:e.id,id:e.id,className:Be("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background","focus:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50",r?.item)},t.createElement(Db,{className:Be("flex items-center justify-center",r?.indicator)},t.createElement(et,{className:"h-2.5 w-2.5 fill-current text-current"}))),t.createElement("div",{className:"flex flex-1 items-center justify-between"},t.createElement("div",{className:Be("space-y-1",!e.description&&"space-y-0")},t.createElement("p",{className:Be("text-sm font-medium leading-none","peer-disabled:cursor-not-allowed peer-disabled:opacity-70",r?.text)},e.label),e.description&&t.createElement("p",{className:Be("text-sm text-muted-foreground",r?.description)},e.description)),n&&e.icon&&t.createElement("div",{className:Be("ml-4 shrink-0 text-muted-foreground",r?.icon)},e.icon)))))));_b.displayName="RadioGroup";var Ib="Switch",[Rb,Bb]=Sg(Ib),[Wb,Fb]=Rb(Ib),$b=e.forwardRef((t,r)=>{const{__scopeSwitch:n,name:o,checked:i,defaultChecked:a,required:l,disabled:s,value:c="on",onCheckedChange:u,form:p,...f}=t,[d,m]=e.useState(null),h=jg(r,e=>m(e)),y=e.useRef(!1),v=!d||(p||!!d.closest("form")),[g,b]=Wg({prop:i,defaultProp:a??!1,onChange:u,caller:Ib});return S(Wb,{scope:n,checked:g,disabled:s,children:[k(zg.button,{type:"button",role:"switch","aria-checked":g,"aria-required":l,"data-state":qb(g),"data-disabled":s?"":void 0,disabled:s,value:c,...f,ref:h,onClick:Og(t.onClick,e=>{b(e=>!e),v&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())})}),v&&k(Ub,{control:d,bubbles:!y.current,name:o,value:c,checked:g,required:l,disabled:s,form:p,style:{transform:"translateX(-100%)"}})]})});$b.displayName=Ib;var Vb="SwitchThumb",Hb=e.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=Fb(Vb,r);return k(zg.span,{"data-state":qb(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});Hb.displayName=Vb;var Ub=e.forwardRef(({__scopeSwitch:t,control:r,checked:n,bubbles:o=!0,...i},a)=>{const l=e.useRef(null),s=jg(l,a),c=sb(n),u=lb(r);return e.useEffect(()=>{const e=l.current;if(!e)return;const t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"checked").set;if(c!==n&&r){const t=new Event("click",{bubbles:o});r.call(e,n),e.dispatchEvent(t)}},[c,n,o]),k("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function qb(e){return e?"checked":"unchecked"}Ub.displayName="SwitchBubbleInput";var Yb=$b,Xb=Hb;const Gb="medium",Kb="primary",Zb={small:{switch:"w-8 h-4",thumb:"w-3 h-3",translate:"translate-x-4"},medium:{switch:"w-11 h-6",thumb:"w-5 h-5",translate:"translate-x-5"},large:{switch:"w-14 h-7",thumb:"w-6 h-6",translate:"translate-x-7"}},Jb={primary:{background:"bg-primary",foreground:"text-primary-foreground",hover:"hover:bg-primary/90"},success:{background:"bg-[rgb(var(--success))]",foreground:"text-[rgb(var(--success-foreground))]",hover:"hover:bg-[rgb(var(--success))]/90"},danger:{background:"bg-destructive",foreground:"text-destructive-foreground",hover:"hover:bg-destructive/90"},warning:{background:"bg-[rgb(var(--warning))]",foreground:"text-foreground",hover:"hover:bg-[rgb(var(--warning))]/90"}},Qb=({label:t,description:r,dataTestId:n})=>t||r?e.createElement("div",{className:"flex flex-col gap-1.5","data-test-id":n},t&&e.createElement(bg,{variant:"regular",color:"secondary"},t),r&&e.createElement(bg,{variant:"small",color:"secondary"},r)):null,ew=e.forwardRef(({label:t,description:r,size:n=Gb,variant:o=Kb,disabled:i=!1,loading:a=!1,className:l,onChange:s,dataTestId:c,checked:u,id:p,...f},d)=>{const m=n||Gb,h=o||Kb;return e.createElement("div",{className:"flex items-center"},e.createElement("label",{htmlFor:p,className:Be("relative inline-flex items-start gap-3 select-none",i&&"cursor-not-allowed opacity-60",l)},e.createElement("div",{className:"relative"},e.createElement(Yb,{id:p,checked:u,onCheckedChange:e=>{i||a||s?.(e)},disabled:i||a,"data-test-id":`${c}-root`,ref:d,...f,className:Be("peer relative inline-flex shrink-0 cursor-pointer rounded-full transition-colors","border-2 border-transparent","focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",Zb[m].switch,u?Be(Jb[h].background,Jb[h].foreground):"bg-input",i&&"cursor-not-allowed")},e.createElement(Xb,{className:Be("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform","flex items-center justify-center",Zb[m].thumb,u?Zb[m].translate:"translate-x-0.5"),"data-test-id":`${c}-thumb`},a&&e.createElement(it,{className:"animate-spin text-black",size:{small:12,medium:16,large:20}[m]})))),e.createElement(Qb,{label:t,description:r,dataTestId:c,disabled:i})))});ew.displayName="Switch";const tw=["small","medium","large"],rw=["primary","success","danger","warning"],nw=r(({className:e="",error:r=!1,disabled:n=!1,placeholder:o,value:a,defaultValue:c,onChange:u,onFocus:p,onBlur:f,rows:d=3,maxLength:m,required:h=!1,readOnly:y=!1,autoFocus:v=!1,resize:g=!1,label:b,helperText:w,showCharCount:x=!1,floatingLabel:O=!1,fluid:E=!0,width:k,...j},S)=>{const[P,T]=i(!1),[C,N]=i(a||c||""),M=s(e=>{T(!0),p?.(e)},[p]),A=s(e=>{T(!1),f?.(e)},[f]),z=s(e=>{N(e.target.value),u?.(e)},[u]),L=b&&(a||C||P),D=((e,t)=>{const r=e||t||"";return"string"==typeof r?r.length:0})(a,C),{width:_}=(()=>{if(!b||!L)return{width:0,leftOffset:0};const e=7.5*b.length+16;return{width:Math.max(e,0),leftOffset:12}})(),I=n?"border-input":r?"border-destructive":P||a||C?"border-primary":"border-input",R=l(()=>{let t="relative flex items-start px-3 py-2 rounded-lg overflow-visible";return n?t+=" bg-muted text-muted-foreground":r&&(t+=" text-destructive"),E&&(t+=" w-full"),k&&(t+=` ${k}`),`${t} ${e}`},[n,r,E,k,e]),B=l(()=>{let e="peer w-full outline-none bg-transparent placeholder-transparent text-sm leading-5 transition-colors duration-200";return e+=n?" text-muted-foreground cursor-not-allowed":" text-foreground",g||(e+=" resize-none"),e},[n,g]),W=l(()=>{let e="absolute transform transition-all duration-300 ease-out z-20 pointer-events-none select-none";return L?(e+=" -top-4 text-xs font-medium tracking-wide",e+=" left-3"):e+=" top-4 left-3 text-sm font-normal",e+=P&&!n?" text-primary":r?" text-destructive":" text-muted-foreground",e},[L,P,n,r]),F=l(()=>{const e={};return k&&!E&&(e.width=k),e},[k,E]);return t.createElement("div",{style:F},b&&!O&&t.createElement(bg,{variant:"caption",color:"primary",fontWeight:"semibold",marginBottom:"small"},b,h&&t.createElement("span",{className:"text-destructive ml-1"},"*")),t.createElement("div",{className:R},t.createElement("div",{className:"absolute inset-0 rounded-lg pointer-events-none"},t.createElement("div",{className:`absolute inset-0 rounded-lg transition-all duration-300 ease-out border ${I}`,style:{clipPath:L&&O?`polygon(\n 0% 0%,\n 12px 0%,\n 12px 0%,\n 14px 0%,\n 14px 50%,\n ${14+_}px 50%,\n ${14+_}px 0%,\n ${16+_}px 0%,\n 100% 0%,\n 100% 100%,\n 0% 100%\n )`:"none"}}),(P||a||C)&&t.createElement("div",{className:"absolute inset-0 rounded-lg transition-all duration-300 ease-out border-0",style:{boxShadow:P?r?"0 0 0 3px rgb(239 68 68 / 0.1)":"0 0 0 3px rgb(59 130 246 / 0.1)":"none",clipPath:L&&O?`polygon(\n 0% 0%,\n 12px 0%,\n 12px 0%,\n 14px 0%,\n 14px 50%,\n ${14+_}px 50%,\n ${14+_}px 0%,\n ${16+_}px 0%,\n 100% 0%,\n 100% 100%,\n 0% 100%\n )`:"none"}})),t.createElement("div",{className:"relative w-full"},t.createElement("textarea",{ref:S,className:B,placeholder:O?" ":o,value:a,defaultValue:c,onChange:z,onFocus:M,onBlur:A,disabled:n,readOnly:y,required:h,autoFocus:v,rows:d,maxLength:m,...j}),O&&b&&t.createElement("label",{className:W,style:{transform:L?"translateX(-2px)":void 0}},b,h&&t.createElement("span",{className:"text-destructive ml-1"},"*")))),(w||x||r)&&t.createElement("div",{className:"mt-2 text-xs w-full transition-all duration-200"},w&&!r&&t.createElement(bg,{variant:"captionSm",color:"quinary"},w),r&&"object"==typeof r&&"message"in r&&t.createElement(bg,{variant:"captionSm",color:"tertiary"},r),x&&m&&t.createElement("div",{className:"flex justify-end"},t.createElement(bg,{variant:"captionSm",color:D>.9*m?"tertiary":"quinary",className:"font-mono"},D,"/",m))))});var ow,iw;nw.displayName="TextArea",function(e){e.Success="success",e.Error="error",e.Warning="warning",e.Info="info"}(ow||(ow={})),function(e){e.TopCenter="top-center",e.TopLeft="top-left",e.TopRight="top-right",e.BottomCenter="bottom-center",e.BottomLeft="bottom-left",e.BottomRight="bottom-right"}(iw||(iw={}));const aw=({id:e,destroy:r,title:n,description:o,variant:l=ow.Info,position:u=iw.TopCenter,duration:p=5e3,animationDuration:f=400,icon:d,dataTestId:m})=>{const[h,y]=i(!1),[,v]=i(!1),g=c(null),b=c(null),w=c(0),x=c(p),O=s(()=>v(!0),[]),E=s(()=>v(!1),[]),k=s(()=>{b.current&&clearTimeout(b.current),y(!0),setTimeout(()=>{r()},f)},[r,f]);a(()=>(w.current=Date.now(),x.current=p,g.current&&(g.current.style.width="100%",g.current.style.transition="none",g.current.offsetWidth,g.current.style.transition=`width ${p}ms linear`,g.current.style.width="0%"),b.current=window.setTimeout(()=>{k()},p),()=>{b.current&&clearTimeout(b.current)}),[p,k]);const j={[ow.Success]:{icon:"text-emerald-500 dark:text-emerald-400",progress:"bg-emerald-500 dark:bg-emerald-400"},[ow.Error]:{icon:"text-destructive",progress:"bg-destructive"},[ow.Warning]:{icon:"text-amber-500 dark:text-amber-400",progress:"bg-amber-500 dark:bg-amber-400"},[ow.Info]:{icon:"text-primary",progress:"bg-primary"}}[l],S={[iw.TopCenter]:h?"animate-slide-out-up":"animate-slide-in-down",[iw.TopLeft]:h?"animate-slide-out-left":"animate-slide-in-left",[iw.TopRight]:h?"animate-slide-out-right":"animate-slide-in-right",[iw.BottomCenter]:h?"animate-slide-out-down":"animate-slide-in-up",[iw.BottomLeft]:h?"animate-slide-out-left":"animate-slide-in-left",[iw.BottomRight]:h?"animate-slide-out-right":"animate-slide-in-right"};return t.createElement("div",{id:e??`${l}-${"string"==typeof n?n:""}`,className:`\n relative group flex items-center justify-between pointer-events-auto\n rounded-lg max-w-md w-full overflow-hidden\n bg-background\n border border-border\n ${S[u]||S[iw.TopCenter]}\n ${h?"opacity-0":"opacity-100"}\n transition-all duration-300 ease-out\n shadow-sm hover:shadow-md\n `,"data-test-id":m,onMouseEnter:O,onMouseLeave:E,style:{transition:`all ${f}ms cubic-bezier(0.4, 0, 0.2, 1)`}},t.createElement("div",{className:"flex items-center gap-3 px-4 py-3 w-full"},d&&t.createElement("div",{className:`flex-shrink-0 ${j.icon}`},d),t.createElement("div",{className:"flex flex-col min-w-0 flex-grow"},t.createElement("div",{className:"font-medium text-sm m-0 text-foreground"},n),o&&t.createElement("div",{className:"text-xs m-0 mt-0.5 text-muted-foreground truncate"},o)),t.createElement("button",{onClick:k,className:"\n flex-shrink-0 ml-2 p-1 rounded-md\n transition-all duration-200\n hover:bg-accent\n text-muted-foreground hover:text-accent-foreground\n ","aria-label":"Close notification"},t.createElement(lt,{size:14}))),!h&&t.createElement("div",{className:`absolute bottom-0 left-0 h-[2px] ${j.progress} opacity-80`,ref:g,style:{width:"100%",transformOrigin:"left"}}))};const lw=new class{isSetup=!1;isBrowser="undefined"!=typeof window;containers={[iw.TopCenter]:void 0,[iw.TopLeft]:void 0,[iw.TopRight]:void 0,[iw.BottomCenter]:void 0,[iw.BottomLeft]:void 0,[iw.BottomRight]:void 0};roots={[iw.TopCenter]:null,[iw.TopLeft]:null,[iw.TopRight]:null,[iw.BottomCenter]:null,[iw.BottomLeft]:null,[iw.BottomRight]:null};messages={[iw.TopCenter]:[],[iw.TopLeft]:[],[iw.TopRight]:[],[iw.BottomCenter]:[],[iw.BottomLeft]:[],[iw.BottomRight]:[]};constructor(){this.isBrowser&&this.setup()}setup(){if(!this.isBrowser)return;const e=document.getElementsByTagName("body")[0];Object.values(iw).forEach(t=>{const r=`message-container-${t}`;let n=document.getElementById(r);n||(n=document.createElement("div"),n.id=r,e.appendChild(n)),this.containers[t]=n,this.roots[t]=N(n)}),this.isSetup=!0}show(e){if(!this.isBrowser)return;this.isSetup||this.setup();const t=e.position||iw.TopCenter,r=e.id||`message-${Math.random().toString().slice(2,11)}`,n=50*this.messages[t].length,o={id:r,...e,animationDuration:e.animationDuration||300,destroy:()=>this.destroy(r,t)};setTimeout(()=>{this.messages[t]=[o,...this.messages[t]],this.render(t)},n)}destroy(e,t=iw.TopCenter){this.isBrowser&&(this.messages[t]=this.messages[t].filter(t=>t.id!==e),this.render(t))}success(e){this.show({icon:t.createElement(Zv,{size:18}),...e,variant:ow.Success})}error(e){this.show({icon:t.createElement(qv,{size:18}),...e,variant:ow.Error})}warning(e){this.show({icon:t.createElement(Uv,{size:18}),...e,variant:ow.Warning})}info(e){this.show({icon:t.createElement(Hv,{size:18}),...e,variant:ow.Info})}getPositionStyles(e){switch(e){case iw.TopLeft:return"fixed flex flex-col items-start justify-start gap-2 p-4 top-0 left-0 z-9999 pointer-events-none";case iw.TopRight:return"fixed flex flex-col items-end justify-start gap-2 p-4 top-0 right-0 z-9999 pointer-events-none";case iw.BottomCenter:return"fixed flex flex-col items-center justify-end gap-2 p-4 bottom-0 left-0 right-0 z-9999 pointer-events-none";case iw.BottomLeft:return"fixed flex flex-col items-start justify-end gap-2 p-4 bottom-0 left-0 z-9999 pointer-events-none";case iw.BottomRight:return"fixed flex flex-col items-end justify-end gap-2 p-4 bottom-0 right-0 z-9999 pointer-events-none";case iw.TopCenter:default:return"fixed flex flex-col items-center justify-start gap-2 p-4 top-0 left-0 right-0 z-9999 pointer-events-none"}}render(e=iw.TopCenter){if(!this.isBrowser||!this.roots[e])return;const r=this.messages[e].map(e=>t.createElement(aw,{key:e.id,...e}));this.roots[e].render(t.createElement("div",{className:this.getPositionStyles(e)},r))}},sw="...",cw=({className:t,...r})=>e.createElement("nav",{role:"navigation","aria-label":"pagination",className:Be("mx-auto flex w-full justify-center",t),...r}),uw=e.forwardRef(({className:t,...r},n)=>e.createElement("ul",{ref:n,className:Be("flex flex-row items-center gap-1",t),...r}));uw.displayName="PaginationContent";const pw=e.forwardRef(({className:t,...r},n)=>e.createElement("li",{ref:n,className:Be("",t),...r}));pw.displayName="PaginationItem";const fw=e.forwardRef(({className:t,isActive:r,size:n="medium",...o},i)=>e.createElement(ct,{ref:i,"aria-current":r?"page":void 0,variant:r?"primary":"link",size:n,className:Be("h-9 w-9",t),...o}));fw.displayName="PaginationLink";const dw=e.forwardRef(({className:t,...r},n)=>e.createElement(ct,{ref:n,variant:"link",size:"medium",className:Be("h-9 w-9",t),...r},e.createElement(Ze,{className:"h-4 w-4"}),e.createElement("span",{className:"sr-only"},"Previous page")));dw.displayName="PaginationPrevious";const mw=e.forwardRef(({className:t,...r},n)=>e.createElement(ct,{ref:n,variant:"link",size:"medium",className:Be("h-9 w-9",t),...r},e.createElement("span",{className:"sr-only"},"Next page"),e.createElement(Je,{className:"h-4 w-4"})));mw.displayName="PaginationNext";const hw=({className:t,...r})=>e.createElement("span",{"aria-hidden":!0,className:Be("flex h-9 w-9 items-center justify-center",t),...r},e.createElement(tt,{className:"h-4 w-4"}),e.createElement("span",{className:"sr-only"},"More pages"));hw.displayName="PaginationEllipsis";const yw=(e,t)=>{const r=t-e+1;return Array.from({length:r},(t,r)=>r+e)},vw=({currentPage:e,totalPages:r,onPageChange:n,siblingCount:o=1,className:i,disabled:c=!1,isLoading:u=!1,enableKeyboardNav:p=!1,showEllipsis:f=!0})=>{const d=l(()=>((e,t,r,n)=>{if(r+5>=t)return yw(1,t);const o=Math.max(e-r,1),i=Math.min(e+r,t),a=o>2,l=i<t-2;if(!a&&l){const e=yw(1,3+2*r);return n?[...e,sw,t]:[...e,t]}if(a&&!l){const e=yw(t-(3+2*r)+1,t);return n?[1,sw,...e]:[1,...e]}if(a&&l){const e=yw(o,i);return n?[1,sw,...e,sw,t]:[1,...e,t]}return yw(1,t)})(e,r,o,f),[e,r,o,f]),m=s(()=>{!c&&!u&&e>1&&n(e-1)},[e,n,c,u]),h=s(()=>{!c&&!u&&e<r&&n(e+1)},[e,r,n,c,u]),y=s(e=>{c||u||!p||("ArrowLeft"===e.key?(e.preventDefault(),m()):"ArrowRight"===e.key&&(e.preventDefault(),h()))},[m,h,c,u,p]);return a(()=>{if(p)return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[y,p]),0===e||d.length<2?null:t.createElement(cw,{className:Be("select-none",i)},t.createElement(uw,null,t.createElement(pw,null,t.createElement(dw,{onClick:m,disabled:1===e||c||u,className:Be("transition-all duration-200","hover:scale-105 hover:bg-accent",(c||u)&&"pointer-events-none opacity-50"),"aria-label":"Previous page"})),d.map((r,o)=>{if(r===sw)return t.createElement(pw,{key:`dots-${o}`},t.createElement(hw,null));const i=r,a=i===e;return t.createElement(pw,{key:i},t.createElement(fw,{isActive:a,onClick:()=>!c&&!u&&n(i),className:Be("transition-all duration-200",a&&"hover:bg-primary/90",!a&&"hover:bg-accent hover:scale-105",(c||u)&&"pointer-events-none opacity-50"),"aria-label":`Page ${i}`,"aria-current":a?"page":void 0},i))}),t.createElement(pw,null,t.createElement(mw,{onClick:h,disabled:e===r||c||u,className:Be("transition-all duration-200","hover:scale-105 hover:bg-accent",(c||u)&&"pointer-events-none opacity-50"),"aria-label":"Next page"}))))};var gw,bw,ww;!function(e){e.Left="left",e.Center="center",e.Right="right"}(gw||(gw={})),function(e){e.Left="left",e.Right="right",e.Center="center"}(bw||(bw={})),function(e){e.Text="text",e.Date="date",e.Status="status",e.Custom="custom"}(ww||(ww={}));const xw=(e=gw.Left)=>({left:"justify-start",center:"justify-center",right:"justify-end"}[e]),Ow=(e,t,r,n,o,i)=>({toggleSorting:n=>{if(!t.find(t=>t.key===e))return;const o=n?"desc":"asc";i({key:e,direction:o}),r&&r(e,o)},getIsSorted:()=>!(!o||o.key!==e)&&o.direction,key:e,data:n}),Ew=(e,t,r,n,o,i)=>Ow(e,t,r,n,o,i),kw=e=>{switch(e){case bw.Right:return"ml-auto order-2";case bw.Center:return"mx-auto";default:return"order-1"}},jw=e=>{switch(e){case bw.Left:return"order-1";case bw.Center:return"mx-auto";default:return"ml-auto order-2"}},Sw=(e=!1)=>e?{effectivePaginationPosition:bw.Left,effectiveEntriesPosition:bw.Right}:{effectivePaginationPosition:bw.Right,effectiveEntriesPosition:bw.Left},Pw=(e,t)=>{if(!t)return e;const r=e.split(" ");return r.length<=t?e:`${r.slice(0,t).join(" ")}...`};var Tw,Cw={exports:{}};var Nw=(Tw||(Tw=1,Cw.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",l="day",s="week",c="month",u="quarter",p="year",f="date",d="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},v=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},g={s:v,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),o=r%60;return(t<=0?"+":"-")+v(n,2,"0")+":"+v(o,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),o=t.clone().add(n,c),i=r-o<0,a=t.clone().add(n+(i?-1:1),c);return+(-(n+(r-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:p,w:s,d:l,D:f,h:a,m:i,s:o,ms:n,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=y;var x="$isDayjsObject",O=function(e){return e instanceof S||!(!e||!e[x])},E=function e(t,r,n){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),r&&(w[i]=r,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var l=t.name;w[l]=t,o=l}return!n&&o&&(b=o),o||!n&&b},k=function(e,t){if(O(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new S(r)},j=g;j.l=E,j.i=O,j.w=function(e,t){return k(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var S=function(){function y(e){this.$L=E(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var v=y.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(j.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(m);if(n){var o=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return j},v.isValid=function(){return!(this.$d.toString()===d)},v.isSame=function(e,t){var r=k(e);return this.startOf(t)<=r&&r<=this.endOf(t)},v.isAfter=function(e,t){return k(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<k(e)},v.$g=function(e,t,r){return j.u(e)?this[t]:this.set(r,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var r=this,n=!!j.u(t)||t,u=j.p(e),d=function(e,t){var o=j.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?o:o.endOf(l)},m=function(e,t){return j.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},h=this.$W,y=this.$M,v=this.$D,g="set"+(this.$u?"UTC":"");switch(u){case p:return n?d(1,0):d(31,11);case c:return n?d(1,y):d(0,y+1);case s:var b=this.$locale().weekStart||0,w=(h<b?h+7:h)-b;return d(n?v-w:v+(6-w),y);case l:case f:return m(g+"Hours",0);case a:return m(g+"Minutes",1);case i:return m(g+"Seconds",2);case o:return m(g+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var r,s=j.p(e),u="set"+(this.$u?"UTC":""),d=(r={},r[l]=u+"Date",r[f]=u+"Date",r[c]=u+"Month",r[p]=u+"FullYear",r[a]=u+"Hours",r[i]=u+"Minutes",r[o]=u+"Seconds",r[n]=u+"Milliseconds",r)[s],m=s===l?this.$D+(t-this.$W):t;if(s===c||s===p){var h=this.clone().set(f,1);h.$d[d](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else d&&this.$d[d](m);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[j.p(e)]()},v.add=function(n,u){var f,d=this;n=Number(n);var m=j.p(u),h=function(e){var t=k(d);return j.w(t.date(t.date()+Math.round(e*n)),d)};if(m===c)return this.set(c,this.$M+n);if(m===p)return this.set(p,this.$y+n);if(m===l)return h(1);if(m===s)return h(7);var y=(f={},f[i]=t,f[a]=r,f[o]=e,f)[m]||1,v=this.$d.getTime()+n*y;return j.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var n=e||"YYYY-MM-DDTHH:mm:ssZ",o=j.z(this),i=this.$H,a=this.$m,l=this.$M,s=r.weekdays,c=r.months,u=r.meridiem,p=function(e,r,o,i){return e&&(e[r]||e(t,n))||o[r].slice(0,i)},f=function(e){return j.s(i%12||12,e,"0")},m=u||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(h,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return j.s(t.$y,4,"0");case"M":return l+1;case"MM":return j.s(l+1,2,"0");case"MMM":return p(r.monthsShort,l,c,3);case"MMMM":return p(c,l);case"D":return t.$D;case"DD":return j.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return p(r.weekdaysMin,t.$W,s,2);case"ddd":return p(r.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(i);case"HH":return j.s(i,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return m(i,a,!0);case"A":return m(i,a,!1);case"m":return String(a);case"mm":return j.s(a,2,"0");case"s":return String(t.$s);case"ss":return j.s(t.$s,2,"0");case"SSS":return j.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(n,f,d){var m,h=this,y=j.p(f),v=k(n),g=(v.utcOffset()-this.utcOffset())*t,b=this-v,w=function(){return j.m(h,v)};switch(y){case p:m=w()/12;break;case c:m=w();break;case u:m=w()/3;break;case s:m=(b-g)/6048e5;break;case l:m=(b-g)/864e5;break;case a:m=b/r;break;case i:m=b/t;break;case o:m=b/e;break;default:m=b}return d?m:j.a(m)},v.daysInMonth=function(){return this.endOf(c).$D},v.$locale=function(){return w[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=E(e,t,!0);return n&&(r.$L=n),r},v.clone=function(){return j.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},y}(),P=S.prototype;return k.prototype=P,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",l],["$M",c],["$y",p],["$D",f]].forEach(function(e){P[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),k.extend=function(e,t){return e.$i||(e(t,S,k),e.$i=!0),k},k.locale=E,k.isDayjs=O,k.unix=function(e){return k(1e3*e)},k.en=w[b],k.Ls=w,k.p={},k}()),Cw.exports),Mw=pt(Nw);const Aw={active:"bg-green-100 text-green-800",inactive:"bg-red-100 text-red-800",pending:"bg-yellow-100 text-yellow-800",completed:"bg-blue-100 text-blue-800",processing:"bg-purple-100 text-purple-800",default:"bg-gray-100 text-gray-800"},zw="name",Lw="200px",Dw="email",_w="joinDate",Iw="status",Rw=(e,r,n,o)=>{const i=r[e.key],a=xw(e.align),l=e=>t.createElement("div",{className:`flex w-full ${a}`},e);if(n&&e.customCell)return l(e.customCell(i,r));if(null==i)return l(null);switch(e.type){case ww.Date:{if(!e.dateFormat)return l(t.createElement(bg,{variant:"small",color:"secondary"},String(i)));const r=Mw(i,e.dateFormat.input).format(e.dateFormat.output);return l(t.createElement(bg,{variant:"small",color:"secondary"},r))}case ww.Status:if(o){const e=String(i).toLowerCase(),r=Aw[e]||Aw.default;return l(t.createElement("span",{className:`px-2 py-1 text-xs font-medium rounded-full ${r}`},String(i)))}return l(t.createElement(bg,{variant:"small",color:"primary"},String(i)));case ww.Text:default:{const r=String(i),n=Pw(r,e.maxWords);return l(t.createElement(bg,{variant:"small",color:"primary",className:n!==r?"truncate":"",title:r},n))}}},Bw=(e,r)=>r?.key!==e.key?t.createElement(Ye,{className:"h-4 w-4 opacity-40"}):"asc"===r.direction?t.createElement(Qe,{className:"h-4 w-4 text-primary"}):t.createElement(Ke,{className:"h-4 w-4 text-primary"}),Ww=(e,r,n,o,i)=>{if(e.customHeader)return e.customHeader(r(e.key));const a=xw(e.align);return o&&e.sortable?t.createElement("div",{className:`flex w-full ${a}`},t.createElement(ct,{variant:"link",onClick:()=>n(e),className:"p-0 h-auto font-medium text-muted-foreground"},t.createElement("div",{className:"flex items-center"},t.createElement("span",{className:"truncate"},e.title),t.createElement("span",{className:"ml-2 inline-flex shrink-0"},Bw(e,i))))):t.createElement("div",{className:`flex w-full items-center h-9 ${a}`},t.createElement("span",{className:"truncate font-medium text-muted-foreground"},e.title))},Fw=(e,t,r,n,o)=>Ww(e,t,r,n,o),$w={renderSortIcon:Bw,renderHeader:Ww,renderTableHeader:Fw},Vw=({columns:e,data:r,sortable:n=!1,pagination:o=!1,searchable:c=!1,currentPage:u=1,pageSize:p=5,onSort:f,onPageChange:d,actions:m,showCustomCells:h=!0,useBuiltInStatus:y=!0,swapPaginationLayout:v=!1,selectable:g=!1,onSelectionChange:b})=>{const[w,x]=i(null),[O,E]=i(u),[k,j]=i(p),[S,P]=i(""),[T,C]=i({}),[N,M]=i(!1),{effectivePaginationPosition:A,effectiveEntriesPosition:z}=Sw(v);a(()=>{E(u)},[u]),a(()=>{g&&(C({}),M(!1))},[r,g]);const L=s(e=>{n&&e.sortable&&(w?.key===e.key?"asc"===w.direction?(x({key:e.key,direction:"desc"}),f&&f(e.key,"desc")):(x(null),f&&f("__clear_sort__","asc")):(x({key:e.key,direction:"asc"}),f&&f(e.key,"asc")))},[w,n,f]),D=s(e=>{n&&e.sortable&&L(e)},[n,L]),_=l(()=>w&&n?[...r].sort((e,t)=>{const r=e[w.key],n=t[w.key];return r<n?"asc"===w.direction?-1:1:r>n?"asc"===w.direction?1:-1:0}):r,[r,w,n]),I=s(e=>{P(e.target.value),E(1)},[]),R=l(()=>c&&S.trim()?_.filter(t=>e.some(e=>{const r=t[e.key];return null!=r&&String(r).toLowerCase().includes(S.toLowerCase())})):_,[_,e,S,c]),B=l(()=>Math.max(1,Math.ceil(R.length/k)),[R.length,k]),W=l(()=>{if(o){const e=(O-1)*k;return R.slice(e,e+k)}return R},[R,O,k,o]),F=s(e=>{e<1||e>B||(E(e),d&&d(e))},[B,d]),$=s(e=>{j(e),E(1)},[]),V=s((e,t)=>e.id||`row-${t}`,[]),H=s((e,t)=>{const r=V(e,t),n={...T,[r]:!T[r]};C(n);const o=W.every((e,t)=>!0===n[V(e,t)]);if(M(o),b){const e=W.filter((e,t)=>n[V(e,t)]);b(e)}},[T,W,b,V]),U=s(()=>{const e=!N;M(e);const t={...T};if(W.forEach((r,n)=>{const o=V(r,n);t[o]=e}),C(t),b){const t=e?[...W]:[];b(t)}},[N,W,T,b,V]),q=l(()=>(e,t)=>Rw(e,t,h,y),[h,y]);return t.createElement("div",{className:"w-full"},t.createElement("div",{className:"flex flex-wrap items-center justify-between mb-6 gap-6"},c&&t.createElement("div",{className:"w-80"},t.createElement(xg,{id:"table-search",value:S,onChange:I,label:"Search",type:"search"})),o&&t.createElement("div",{className:"flex items-center space-x-3 ml-auto"},t.createElement("label",{htmlFor:"page-size-select",className:"text-sm font-medium text-muted-foreground"},"Rows per page"),t.createElement("select",{id:"page-size-select",value:k,onChange:e=>$(parseInt(e.target.value)),className:"h-9 rounded-md border border-input bg-background px-3 py-1 text-sm ring-offset-background focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 transition-colors"},[5,10,20,50].map(e=>t.createElement("option",{key:e,value:e},e))))),t.createElement("div",{className:"relative w-full overflow-auto rounded-lg border shadow-xs"},t.createElement("table",{className:"w-full caption-bottom text-sm"},t.createElement("thead",{className:"bg-muted/40"},t.createElement("tr",{className:"border-b border-border"},g&&t.createElement("th",{className:"h-11 px-3 font-medium text-muted-foreground w-10"},t.createElement(ig,{checked:N,onChange:U,dataTestId:"select-all-checkbox"})),e.map(r=>t.createElement("th",{key:r.key,className:"h-11 px-6 font-medium text-muted-foreground",style:{width:r.width||"auto"}},t.createElement("div",{className:"h-full flex items-center",onClick:()=>D(r)},Fw(r,t=>Ew(t,e,f,W,w,x),L,n,w)))),m&&t.createElement("th",{className:"h-11 px-6 text-right font-medium text-muted-foreground"},t.createElement("div",{className:"flex items-center h-9 justify-end"},t.createElement("span",{className:"truncate font-medium text-muted-foreground"},"Actions"))))),t.createElement("tbody",{className:"[&_tr:last-child]:border-0"},W.length>0?W.map((r,n)=>t.createElement("tr",{key:V(r,n),className:"border-b border-border transition-colors hover:bg-muted/30 "+(T[V(r,n)]?"bg-muted/50":"")},g&&t.createElement("td",{className:"p-4 px-5 w-10"},t.createElement(ig,{checked:!!T[V(r,n)],onChange:()=>H(r,n),dataTestId:`select-row-${n}`})),e.map(e=>t.createElement("td",{key:e.key,className:"p-4 px-6",style:{width:e.width||"auto"}},q(e,r))),m&&t.createElement("td",{className:"p-4 px-6 text-right"},m(r)))):t.createElement("tr",null,t.createElement("td",{colSpan:e.length+(m?1:0)+(g?1:0),className:"py-10 px-6 text-center text-muted-foreground"},"No data available"))))),o&&B>0&&t.createElement("div",{className:"flex items-center justify-between px-3 mt-6 w-full"},t.createElement("div",{className:`text-sm font-medium text-muted-foreground whitespace-nowrap ${kw(z)}`},"Showing"," ",t.createElement("span",{className:"text-foreground"},Math.min((O-1)*k+1,R.length))," ","to"," ",t.createElement("span",{className:"text-foreground"},Math.min(O*k,R.length))," ","of ",t.createElement("span",{className:"text-foreground"},R.length)," ","entries"),t.createElement("div",{className:jw(A)},t.createElement(vw,{currentPage:O,totalPages:B,onPageChange:F,disabled:!1,isLoading:!1}))))},Hw=(e,t,r)=>({key:e,title:t,type:ww.Text,width:r?.width,sortable:r?.sortable,align:r?.align||gw.Left,customCell:r?.customCell,maxWords:r?.maxWords}),Uw=(e,t,r)=>({key:e,title:t,type:ww.Date,width:r?.width,sortable:r?.sortable,align:r?.align||gw.Left,dateFormat:{input:r?.inputFormat,output:r?.outputFormat||"MMM DD, YYYY"},customCell:r?.customCell}),qw=(e,t,r)=>({key:e,title:t,type:ww.Status,width:r?.width,sortable:r?.sortable,align:r?.align||gw.Center,customCell:r?.customCell}),Yw=(e,r)=>{const{enableTruncation:n=!1,maxWords:o=5}=r||{},i=Hw("description","Description",{sortable:!0,...n&&{maxWords:2*o}});return[Hw(zw,"Name",{width:Lw,sortable:!0,...n&&{maxWords:o},customCell:e?e=>t.createElement("div",{className:"flex items-center"},t.createElement("div",{className:"h-8 w-8 rounded-full bg-gray-200 mr-3 flex items-center justify-center"},t.createElement(bg,{variant:"small",color:"secondary"},e.charAt(0))),t.createElement(bg,{variant:"small",color:"secondary",fontWeight:"semibold"},e)):void 0}),Hw(Dw,"Email",{...n&&{maxWords:o},customCell:e?e=>t.createElement("a",{href:`mailto:${e}`,className:"hover:underline"},t.createElement(bg,{variant:"small",color:"secondary"},e)):void 0}),i,Uw(_w,"Join Date",{sortable:!0,inputFormat:"YYYY-MM-DD",outputFormat:"MMM DD, YYYY"}),e?Hw(Iw,"Status",{align:gw.Center,customCell:e=>{const r=e;return t.createElement("span",{className:"inline-flex items-center px-2.5 py-0.5 rounded-full"},t.createElement(bg,{variant:"small",color:"secondary",fontWeight:"semibold"},r))}}):qw(Iw,"Status",{align:gw.Center})]};function Xw(t){var r=t.children,n=t.prefixCls,o=t.id,i=t.overlayInnerStyle,a=t.bodyClassName,l=t.className,s=t.style;return e.createElement("div",{className:ug("".concat(n,"-content"),l),style:s},e.createElement("div",{className:ug("".concat(n,"-inner"),a),id:o,role:"tooltip",style:i},"function"==typeof r?r():r))}function Gw(){return Gw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gw.apply(null,arguments)}function Kw(e){return Kw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kw(e)}function Zw(e){var t=function(e,t){if("object"!=Kw(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=Kw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Kw(t)?t:t+""}function Jw(e,t,r){return(t=Zw(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ex(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qw(Object(r),!0).forEach(function(t){Jw(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qw(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function tx(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function rx(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function nx(e,t){if(e){if("string"==typeof e)return rx(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?rx(e,t):void 0}}function ox(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||nx(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ix(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}var ax={},lx=[];function sx(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var r=lx.reduce(function(e,t){return t(null!=e?e:"","warning")},t);r&&console.error("Warning: ".concat(r))}}function cx(e,t){if("production"!==process.env.NODE_ENV&&!e&&void 0!==console){var r=lx.reduce(function(e,t){return t(null!=e?e:"","note")},t);r&&console.warn("Note: ".concat(r))}}function ux(e,t,r){t||ax[r]||(e(!1,r),ax[r]=!0)}function px(e,t){ux(sx,e,t)}px.preMessage=function(e){lx.push(e)},px.resetWarned=function(){ax={}},px.noteOnce=function(e,t){ux(cx,e,t)};var fx,dx={exports:{}},mx={};var hx,yx,vx={};
|
|
45
45
|
/**
|
|
46
46
|
* @license React
|
|
47
47
|
* react-is.development.js
|