@lax-wp/design-system 0.3.18 → 0.3.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +2 -2
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -36135,7 +36135,7 @@ const dz = (e = {}) => {
|
|
|
36135
36135
|
padding: m ? "0px" : "0px 20px"
|
|
36136
36136
|
},
|
|
36137
36137
|
mask: {
|
|
36138
|
-
zIndex: c ||
|
|
36138
|
+
zIndex: c || 5e3,
|
|
36139
36139
|
position: w ? "absolute" : void 0,
|
|
36140
36140
|
top: w ? 0 : void 0,
|
|
36141
36141
|
right: w ? 0 : void 0,
|
|
@@ -36143,7 +36143,7 @@ const dz = (e = {}) => {
|
|
|
36143
36143
|
left: w ? 0 : void 0
|
|
36144
36144
|
},
|
|
36145
36145
|
wrapper: {
|
|
36146
|
-
zIndex: c ||
|
|
36146
|
+
zIndex: c || 5001,
|
|
36147
36147
|
position: w ? "absolute" : void 0,
|
|
36148
36148
|
top: w ? 0 : void 0,
|
|
36149
36149
|
right: w ? 0 : void 0,
|
package/dist/index.umd.js
CHANGED
|
@@ -387,7 +387,7 @@ theme.transitions = createTransitions(theme.transitions || {});
|
|
|
387
387
|
|
|
388
388
|
export default theme;`}function iE(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const aV=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let r=0;r<t.length;r+=1)n+=+t[r];return n};function sV(e){Object.assign(e,{alpha(t,n){const r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:XS(t,aV(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${iE(n)})`:Sd(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${iE(n)})`:wd(t,n)}})}function Mh(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:s={},shape:l,colorSpace:c,...u}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":Ci(20));const d=Th({...i,colorSpace:c}),f=BS(e);let m=mr(f,{mixins:X_(f.breakpoints,r),palette:d,shadows:Q_.slice(),typography:J_(d,s),transitions:rV(a),zIndex:{...oV}});if(m=mr(m,u),m=t.reduce((h,p)=>mr(h,p),m),process.env.NODE_ENV!=="production"){const h=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],p=(g,y)=>{let x;for(x in g){const I=g[x];if(h.includes(x)&&Object.keys(I).length>0){if(process.env.NODE_ENV!=="production"){const S=Eh("",x);console.error([`MUI: The \`${y}\` component increases the CSS specificity of the \`${x}\` internal state.`,"You can not override it like this: ",JSON.stringify(g,null,2),"",`Instead, you need to use the '&.${S}' syntax:`,JSON.stringify({root:{[`&.${S}`]:I}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
389
389
|
`))}g[x]={}}}};Object.keys(m.components).forEach(g=>{const y=m.components[g].styleOverrides;y&&g.startsWith("Mui")&&p(y,g)})}return m.unstable_sxConfig={...yd,...u?.unstable_sxConfig},m.unstable_sx=function(p){return Va({sx:p,theme:this})},m.toRuntimeSource=oE,sV(m),m}function lV(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const cV=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=lV(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function aE(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function sE(e){return e==="dark"?cV:[]}function uV(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:o,...i}=e,a=Th({...t,colorSpace:o});return{palette:a,opacity:{...aE(a.mode),...n},overlays:r||sE(a.mode),...i}}function dV(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const fV=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],pV=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return fV(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:i?{[i.replace("%s",t)]:a,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function mV(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function me(e,t,n){!e[t]&&n&&(e[t]=n)}function yl(e){return typeof e!="string"||!e.startsWith("hsl")?e:WS(e)}function Lo(e,t){`${t}Channel`in e||(e[`${t}Channel`]=hl(yl(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
|
|
390
|
-
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function gV(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const mo=e=>{try{return e()}catch{}},hV=(e="mui")=>k_(e);function kh(e,t,n,r,o){if(!n)return;n=n===!0?{}:n;const i=o==="dark"?"dark":"light";if(!r){t[o]=uV({...n,palette:{mode:i,...n?.palette},colorSpace:e});return}const{palette:a,...s}=Mh({...r,palette:{mode:i,...n?.palette},colorSpace:e});return t[o]={...n,palette:a,opacity:{...aE(i),...n?.opacity},overlays:n?.overlays||sE(i)},s}function vV(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",nativeColor:a=!1,shouldSkipGeneratingVar:s=dV,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...u}=e,d=Object.keys(n)[0],f=r||(n.light&&d!=="light"?"light":d),m=hV(i),{[f]:h,light:p,dark:g,...y}=n,x={...y};let I=h;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(I=!0),!I)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:Ci(21,f));let S;a&&(S="oklch");const b=kh(S,x,I,u,f);p&&!x.light&&kh(S,x,p,void 0,"light"),g&&!x.dark&&kh(S,x,g,void 0,"dark");let E={defaultColorScheme:f,...b,cssVarPrefix:i,colorSchemeSelector:l,rootSelector:c,getCssVar:m,colorSchemes:x,font:{...U_(b.typography),...b.font},spacing:gV(u.spacing)};Object.keys(E.colorSchemes).forEach(k=>{const $=E.colorSchemes[k].palette,T=j=>{const R=j.split("-"),_=R[1],H=R[2];return m(j,$[_][H])};$.mode==="light"&&(me($.common,"background","#fff"),me($.common,"onBackground","#000")),$.mode==="dark"&&(me($.common,"background","#000"),me($.common,"onBackground","#fff"));function M(j,R,_){if(S){let H;return j===Wi&&(H=`transparent ${((1-_)*100).toFixed(0)}%`),j===Zt&&(H=`#000 ${(_*100).toFixed(0)}%`),j===qt&&(H=`#fff ${(_*100).toFixed(0)}%`),`color-mix(in ${S}, ${R}, ${H})`}return j(R,_)}if(mV($,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),$.mode==="light"){me($.Alert,"errorColor",M(Zt,$.error.light,.6)),me($.Alert,"infoColor",M(Zt,$.info.light,.6)),me($.Alert,"successColor",M(Zt,$.success.light,.6)),me($.Alert,"warningColor",M(Zt,$.warning.light,.6)),me($.Alert,"errorFilledBg",T("palette-error-main")),me($.Alert,"infoFilledBg",T("palette-info-main")),me($.Alert,"successFilledBg",T("palette-success-main")),me($.Alert,"warningFilledBg",T("palette-warning-main")),me($.Alert,"errorFilledColor",mo(()=>$.getContrastText($.error.main))),me($.Alert,"infoFilledColor",mo(()=>$.getContrastText($.info.main))),me($.Alert,"successFilledColor",mo(()=>$.getContrastText($.success.main))),me($.Alert,"warningFilledColor",mo(()=>$.getContrastText($.warning.main))),me($.Alert,"errorStandardBg",M(qt,$.error.light,.9)),me($.Alert,"infoStandardBg",M(qt,$.info.light,.9)),me($.Alert,"successStandardBg",M(qt,$.success.light,.9)),me($.Alert,"warningStandardBg",M(qt,$.warning.light,.9)),me($.Alert,"errorIconColor",T("palette-error-main")),me($.Alert,"infoIconColor",T("palette-info-main")),me($.Alert,"successIconColor",T("palette-success-main")),me($.Alert,"warningIconColor",T("palette-warning-main")),me($.AppBar,"defaultBg",T("palette-grey-100")),me($.Avatar,"defaultBg",T("palette-grey-400")),me($.Button,"inheritContainedBg",T("palette-grey-300")),me($.Button,"inheritContainedHoverBg",T("palette-grey-A100")),me($.Chip,"defaultBorder",T("palette-grey-400")),me($.Chip,"defaultAvatarColor",T("palette-grey-700")),me($.Chip,"defaultIconColor",T("palette-grey-700")),me($.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),me($.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),me($.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),me($.LinearProgress,"primaryBg",M(qt,$.primary.main,.62)),me($.LinearProgress,"secondaryBg",M(qt,$.secondary.main,.62)),me($.LinearProgress,"errorBg",M(qt,$.error.main,.62)),me($.LinearProgress,"infoBg",M(qt,$.info.main,.62)),me($.LinearProgress,"successBg",M(qt,$.success.main,.62)),me($.LinearProgress,"warningBg",M(qt,$.warning.main,.62)),me($.Skeleton,"bg",S?M(Wi,$.text.primary,.11):`rgba(${T("palette-text-primaryChannel")} / 0.11)`),me($.Slider,"primaryTrack",M(qt,$.primary.main,.62)),me($.Slider,"secondaryTrack",M(qt,$.secondary.main,.62)),me($.Slider,"errorTrack",M(qt,$.error.main,.62)),me($.Slider,"infoTrack",M(qt,$.info.main,.62)),me($.Slider,"successTrack",M(qt,$.success.main,.62)),me($.Slider,"warningTrack",M(qt,$.warning.main,.62));const j=S?M(Zt,$.background.default,.6825):Ed($.background.default,.8);me($.SnackbarContent,"bg",j),me($.SnackbarContent,"color",mo(()=>S?Ah.text.primary:$.getContrastText(j))),me($.SpeedDialAction,"fabHoverBg",Ed($.background.paper,.15)),me($.StepConnector,"border",T("palette-grey-400")),me($.StepContent,"border",T("palette-grey-400")),me($.Switch,"defaultColor",T("palette-common-white")),me($.Switch,"defaultDisabledColor",T("palette-grey-100")),me($.Switch,"primaryDisabledColor",M(qt,$.primary.main,.62)),me($.Switch,"secondaryDisabledColor",M(qt,$.secondary.main,.62)),me($.Switch,"errorDisabledColor",M(qt,$.error.main,.62)),me($.Switch,"infoDisabledColor",M(qt,$.info.main,.62)),me($.Switch,"successDisabledColor",M(qt,$.success.main,.62)),me($.Switch,"warningDisabledColor",M(qt,$.warning.main,.62)),me($.TableCell,"border",M(qt,M(Wi,$.divider,1),.88)),me($.Tooltip,"bg",M(Wi,$.grey[700],.92))}if($.mode==="dark"){me($.Alert,"errorColor",M(qt,$.error.light,.6)),me($.Alert,"infoColor",M(qt,$.info.light,.6)),me($.Alert,"successColor",M(qt,$.success.light,.6)),me($.Alert,"warningColor",M(qt,$.warning.light,.6)),me($.Alert,"errorFilledBg",T("palette-error-dark")),me($.Alert,"infoFilledBg",T("palette-info-dark")),me($.Alert,"successFilledBg",T("palette-success-dark")),me($.Alert,"warningFilledBg",T("palette-warning-dark")),me($.Alert,"errorFilledColor",mo(()=>$.getContrastText($.error.dark))),me($.Alert,"infoFilledColor",mo(()=>$.getContrastText($.info.dark))),me($.Alert,"successFilledColor",mo(()=>$.getContrastText($.success.dark))),me($.Alert,"warningFilledColor",mo(()=>$.getContrastText($.warning.dark))),me($.Alert,"errorStandardBg",M(Zt,$.error.light,.9)),me($.Alert,"infoStandardBg",M(Zt,$.info.light,.9)),me($.Alert,"successStandardBg",M(Zt,$.success.light,.9)),me($.Alert,"warningStandardBg",M(Zt,$.warning.light,.9)),me($.Alert,"errorIconColor",T("palette-error-main")),me($.Alert,"infoIconColor",T("palette-info-main")),me($.Alert,"successIconColor",T("palette-success-main")),me($.Alert,"warningIconColor",T("palette-warning-main")),me($.AppBar,"defaultBg",T("palette-grey-900")),me($.AppBar,"darkBg",T("palette-background-paper")),me($.AppBar,"darkColor",T("palette-text-primary")),me($.Avatar,"defaultBg",T("palette-grey-600")),me($.Button,"inheritContainedBg",T("palette-grey-800")),me($.Button,"inheritContainedHoverBg",T("palette-grey-700")),me($.Chip,"defaultBorder",T("palette-grey-700")),me($.Chip,"defaultAvatarColor",T("palette-grey-300")),me($.Chip,"defaultIconColor",T("palette-grey-300")),me($.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),me($.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),me($.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),me($.LinearProgress,"primaryBg",M(Zt,$.primary.main,.5)),me($.LinearProgress,"secondaryBg",M(Zt,$.secondary.main,.5)),me($.LinearProgress,"errorBg",M(Zt,$.error.main,.5)),me($.LinearProgress,"infoBg",M(Zt,$.info.main,.5)),me($.LinearProgress,"successBg",M(Zt,$.success.main,.5)),me($.LinearProgress,"warningBg",M(Zt,$.warning.main,.5)),me($.Skeleton,"bg",S?M(Wi,$.text.primary,.13):`rgba(${T("palette-text-primaryChannel")} / 0.13)`),me($.Slider,"primaryTrack",M(Zt,$.primary.main,.5)),me($.Slider,"secondaryTrack",M(Zt,$.secondary.main,.5)),me($.Slider,"errorTrack",M(Zt,$.error.main,.5)),me($.Slider,"infoTrack",M(Zt,$.info.main,.5)),me($.Slider,"successTrack",M(Zt,$.success.main,.5)),me($.Slider,"warningTrack",M(Zt,$.warning.main,.5));const j=S?M(qt,$.background.default,.985):Ed($.background.default,.98);me($.SnackbarContent,"bg",j),me($.SnackbarContent,"color",mo(()=>S?qS.text.primary:$.getContrastText(j))),me($.SpeedDialAction,"fabHoverBg",Ed($.background.paper,.15)),me($.StepConnector,"border",T("palette-grey-600")),me($.StepContent,"border",T("palette-grey-600")),me($.Switch,"defaultColor",T("palette-grey-300")),me($.Switch,"defaultDisabledColor",T("palette-grey-600")),me($.Switch,"primaryDisabledColor",M(Zt,$.primary.main,.55)),me($.Switch,"secondaryDisabledColor",M(Zt,$.secondary.main,.55)),me($.Switch,"errorDisabledColor",M(Zt,$.error.main,.55)),me($.Switch,"infoDisabledColor",M(Zt,$.info.main,.55)),me($.Switch,"successDisabledColor",M(Zt,$.success.main,.55)),me($.Switch,"warningDisabledColor",M(Zt,$.warning.main,.55)),me($.TableCell,"border",M(Zt,M(Wi,$.divider,1),.68)),me($.Tooltip,"bg",M(Wi,$.grey[700],.92))}Lo($.background,"default"),Lo($.background,"paper"),Lo($.common,"background"),Lo($.common,"onBackground"),Lo($,"divider"),Object.keys($).forEach(j=>{const R=$[j];j!=="tonalOffset"&&R&&typeof R=="object"&&(R.main&&me($[j],"mainChannel",hl(yl(R.main))),R.light&&me($[j],"lightChannel",hl(yl(R.light))),R.dark&&me($[j],"darkChannel",hl(yl(R.dark))),R.contrastText&&me($[j],"contrastTextChannel",hl(yl(R.contrastText))),j==="text"&&(Lo($[j],"primary"),Lo($[j],"secondary")),j==="action"&&(R.active&&Lo($[j],"active"),R.selected&&Lo($[j],"selected")))})}),E=t.reduce((k,$)=>mr(k,$),E);const O={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:s,getSelector:pV(E),enableContrastVars:a},{vars:N,generateThemeVars:P,generateStyleSheets:A}=D_(E,O);return E.vars=N,Object.entries(E.colorSchemes[E.defaultColorScheme]).forEach(([k,$])=>{E[k]=$}),E.generateThemeVars=P,E.generateStyleSheets=A,E.generateSpacing=function(){return LS(u.spacing,Ch(this))},E.getColorSchemeSelector=F_(l),E.spacing=E.generateSpacing(),E.shouldSkipGeneratingVar=s,E.unstable_sxConfig={...yd,...u?.unstable_sxConfig},E.unstable_sx=function($){return Va({sx:$,theme:this})},E.toRuntimeSource=oE,E}function lE(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Th({...n===!0?{}:n.palette,mode:t})})}function bV(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n?.mode,...a}=e,s=i||"light",l=o?.[s],c={...o,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Mh(e,...t);let u=n;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const d=Mh({...e,palette:u},...t);return d.defaultColorScheme=s,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},lE(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},lE(d,"light",c.light)),d}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),vV({...a,colorSchemes:c,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}const yV=bV(),xV="$$material";function CV(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const wV=x_({themeId:xV,defaultTheme:yV,rootShouldForwardProp:e=>CV(e)&&e!=="classes"}),SV=M_;process.env.NODE_ENV!=="production"&&(Lt.node,Lt.object.isRequired);function EV(e){return T_(e)}function IV(e){return Eh("MuiSvgIcon",e)}g_("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const OV=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${zi(t)}`,`fontSize${zi(n)}`]};return aB(o,IV,r)},NV=wV("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${zi(n.color)}`],t[`fontSize${zi(n.fontSize)}`]]}})(SV(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Id=v.forwardRef(function(t,n){const r=EV({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...m}=r,h=v.isValidElement(o)&&o.type==="svg",p={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:h},g={};u||(g.viewBox=f);const y=OV(p);return C.jsxs(NV,{as:s,className:po(y.root,i),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...g,...m,...h&&o.props,ownerState:p,children:[h?o.props.children:o,d?C.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Id.propTypes={children:Lt.node,classes:Lt.object,className:Lt.string,color:Lt.oneOfType([Lt.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),Lt.string]),component:Lt.elementType,fontSize:Lt.oneOfType([Lt.oneOf(["inherit","large","medium","small"]),Lt.string]),htmlColor:Lt.string,inheritViewBox:Lt.bool,shapeRendering:Lt.string,sx:Lt.oneOfType([Lt.arrayOf(Lt.oneOfType([Lt.func,Lt.object,Lt.bool])),Lt.func,Lt.object]),titleAccess:Lt.string,viewBox:Lt.string}),Id.muiName="SvgIcon";function Od(e,t){function n(r,o){return C.jsx(Id,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:o,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Id.muiName,v.memo(v.forwardRef(n))}const $V=Od(C.jsx("path",{d:"M14.71 6.71a.996.996 0 0 0-1.41 0L8.71 11.3c-.39.39-.39 1.02 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L10.83 12l3.88-3.88c.39-.39.38-1.03 0-1.41"}),"ChevronLeftRounded"),PV=Od(C.jsx("path",{d:"M9.29 6.71c-.39.39-.39 1.02 0 1.41L13.17 12l-3.88 3.88c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41L10.7 6.7c-.38-.38-1.02-.38-1.41.01"}),"ChevronRightRounded"),AV=Od(C.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),TV=Od(C.jsx("path",{d:"M14.59 2.59c-.38-.38-.89-.59-1.42-.59H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8.83c0-.53-.21-1.04-.59-1.41zM15 18H9c-.55 0-1-.45-1-1s.45-1 1-1h6c.55 0 1 .45 1 1s-.45 1-1 1m0-4H9c-.55 0-1-.45-1-1s.45-1 1-1h6c.55 0 1 .45 1 1s-.45 1-1 1m-2-6V3.5L18.5 9H14c-.55 0-1-.45-1-1"}),"DescriptionRounded"),cE=w.forwardRef(({id:e,label:t,placeholder:n="Select...",value:r,selectedValues:o,onChange:i,onColorChange:a,selectOptions:s,loading:l=!1,multiSelect:c=!1,disabled:u=!1,isClearable:d=!0,required:f=!1,message:m,messageType:h="default",originalCase:p=!1,wrapperClassName:g,selectClassName:y,labelClassName:x,helpText:I,size:S="medium",filterOption:b,selectProps:E,components:O,tags:N,tooltip:P},A)=>{const k=()=>{switch(S){case"small":return{height:"28px",minHeight:"28px",fontSize:"12px",padding:"2px 8px"};case"large":return{height:"40px",minHeight:"40px",fontSize:"16px",padding:"8px 12px"};default:return{height:"32px",minHeight:"32px",fontSize:"14px",padding:"4px 10px"}}},$=F=>m&&h==="error"?"rgb(253 164 155)":m&&h==="success"?"rgb(34 197 94)":m&&h==="info"?"rgb(59 130 246)":F.isFocused?"rgb(0 108 207)":"rgb(229 229 229)",T=k(),M={control:(F,U)=>({...F,borderColor:$(U),backgroundColor:U.isDisabled?"rgb(245 245 245)":"rgb(255 255 255)",borderRadius:"6px",...T,opacity:U.isDisabled?.6:1,cursor:U.isDisabled?"not-allowed":"default",boxShadow:U.isFocused?"0 0 0 2px rgba(59, 130, 246, 0.1)":"none","&:hover":{borderColor:$(U)},transition:"all 0.2s ease-in-out"}),valueContainer:F=>({...F,fontSize:T.fontSize,padding:0,height:"auto",minHeight:"20px"}),input:F=>({...F,margin:"0",padding:"0",color:"inherit"}),indicatorsContainer:F=>({...F,fontSize:T.fontSize,padding:0,height:"20px"}),option:(F,U)=>({...F,fontFamily:"Inter",fontWeight:500,fontSize:T.fontSize,lineHeight:"1.2",borderBottom:"1px solid rgb(229 229 229)",backgroundColor:U.isSelected?"rgb(59 130 246)":U.isFocused?"rgb(245 245 245)":"rgb(255 255 255)",color:U.isSelected?"white":U.isDisabled?"rgb(163 163 163)":"inherit",cursor:U.isDisabled?"not-allowed":"pointer",opacity:U.isDisabled?.6:1,"&:hover":{backgroundColor:U.isSelected?"rgb(59 130 246)":U.isDisabled?"rgb(255 255 255)":"rgb(245 245 245)"}}),singleValue:(F,U)=>({...F,fontFamily:"Inter",fontWeight:500,fontSize:T.fontSize,lineHeight:"1.25rem",display:"block",color:U.isDisabled?"rgb(163 163 163)":"inherit"}),placeholder:(F,U)=>({...F,fontFamily:"Inter",fontSize:T.fontSize,fontWeight:500,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",color:U.isDisabled?"rgb(163 163 163)":"rgb(115 115 115)"}),multiValue:F=>({...F,backgroundColor:"rgb(230 241 252)",border:"1px solid rgb(198 225 249)",borderRadius:"4px",fontFamily:"Inter"}),multiValueLabel:F=>({...F,color:"rgb(0 108 207)",fontSize:"12px"}),multiValueRemove:F=>({...F,color:"rgb(0 108 207)",":hover":{backgroundColor:"rgb(230 241 252)",color:"rgb(220 38 38)"}}),menu:F=>({...F,backgroundColor:"rgb(255 255 255)",border:"1px solid rgb(229 229 229)",borderRadius:"6px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"}),loadingIndicator:F=>({...F,color:"rgb(99 102 241)"}),noOptionsMessage:F=>({...F,color:"rgb(107 114 128)",fontSize:T.fontSize})},j=()=>h==="error"?"text-red-500 dark:text-red-400":h==="success"?"text-green-500 dark:text-green-400":h==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",R=()=>{switch(S){case"small":return"extra-small";case"large":return"medium";default:return"small"}},_=()=>C.jsx("div",{className:"flex items-center",children:C.jsx($V,{className:"-rotate-90 transition-transform duration-200",sx:{fontSize:S==="small"?"14px":S==="large"?"18px":"16px"}})}),H=F=>C.jsx("div",{className:"absolute top-0 left-0 h-full flex items-center dark:text-neutral-100",children:F.data.label}),z=!!o?.length,D=d&&(z||!!r),L=(F,U)=>{i(F,U),a?.(F)};return C.jsxs("div",{className:G("flex flex-col w-full",g),children:[t&&C.jsx("label",{htmlFor:e,className:G("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",!p&&"capitalize",x),children:C.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:C.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:C.jsxs(Ke,{variant:"medium",size:R(),appearance:"subtitle",children:[t,f&&C.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}),I&&C.jsx(Ke,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:I}),C.jsx(ZL,{...E,ref:A,id:e,required:f,options:s,isClearable:D,isLoading:l,isDisabled:u,styles:M,isMulti:c,value:c?o:r,placeholder:n,filterOption:b,onChange:L,className:G("react-select-container",y),classNamePrefix:"react-select",components:{IndicatorsContainer:_,SingleValue:H,...O},"aria-required":f,"aria-invalid":m&&h==="error"?"true":"false","aria-describedby":m||I?`${e}-description`:void 0}),C.jsx(Dt.AnimatePresence,{children:m&&C.jsx(Dt.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${e}-description`,role:h==="error"?"alert":void 0,children:C.jsx(Ke,{className:G("mt-1",j()),appearance:"custom",size:"extra-small",variant:"medium",children:m})})}),I&&!m&&C.jsx("div",{id:`${e}-description`,className:"sr-only",children:I})]})});cE.displayName="CreatableSelectField";const jh=[{value:"USD",label:"United States Dollar",symbol:"$"},{value:"EUR",label:"Euro",symbol:"€"},{value:"GBP",label:"British Pound",symbol:"£"},{value:"JPY",label:"Japanese Yen",symbol:"¥"},{value:"CAD",label:"Canadian Dollar",symbol:"C$"},{value:"AUD",label:"Australian Dollar",symbol:"A$"},{value:"CHF",label:"Swiss Franc",symbol:"CHF"},{value:"CNY",label:"Chinese Yuan",symbol:"¥"},{value:"SEK",label:"Swedish Krona",symbol:"kr"},{value:"NZD",label:"New Zealand Dollar",symbol:"NZ$"}],uE={USD:"$",EUR:"€",GBP:"£",JPY:"¥",CAD:"C$",AUD:"A$",CHF:"CHF",CNY:"¥",SEK:"kr",NZD:"NZ$"},dE=w.forwardRef(({id:e,label:t,value:n,defaultValue:r,onChange:o,disabled:i=!1,required:a=!1,placeholder:s,message:l,messageType:c="default",wrapperClassName:u,inputClassName:d,labelClassName:f,helpText:m,size:h="medium",currencyCode:p="USD",allowCurrencyChange:g=!1,availableCurrencies:y,showSymbol:x=!0,formatValue:I=!0,min:S,max:b,decimalPlaces:E=2,inputProps:O,inputStyle:N},P)=>{const[A,k]=w.useState(!1),[$,T]=w.useState(p),[M,j]=w.useState(!1),R=y?jh.filter(Y=>y.includes(Y.value)):jh,_=()=>{switch(h){case"small":return{height:"h-7",padding:"px-2 py-1",fontSize:"text-xs",symbolPadding:"pl-8"};case"large":return{height:"h-10",padding:"px-4 py-2",fontSize:"text-base",symbolPadding:"pl-12"};default:return{height:"h-8",padding:"px-3 py-1.5",fontSize:"text-sm",symbolPadding:"pl-10"}}},H=()=>c==="error"?"border-red-300 focus:border-red-500 focus:ring-red-200 dark:focus:ring-red-400/20":c==="success"?"border-green-300 focus:border-green-500 focus:ring-green-200 dark:focus:ring-green-400/20":c==="info"?"border-blue-300 focus:border-blue-500 focus:ring-blue-200 dark:focus:ring-blue-400/20":"border-neutral-300 dark:border-neutral-600 focus:border-primary-500 dark:focus:border-primary-400 focus:ring-primary-200 dark:focus:ring-primary-400/20",z=()=>c==="error"?"text-red-500 dark:text-red-400":c==="success"?"text-green-500 dark:text-green-400":c==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",V=()=>{switch(h){case"small":return"extra-small";case"large":return"medium";default:return"small"}},D=Y=>{if(Y==null)return"";const Q=Number(Y);return isNaN(Q)?String(Y):I?Q.toLocaleString("en-US",{minimumFractionDigits:E,maximumFractionDigits:E}):String(Q)},L=Y=>{const Q=Y.target.value;if(Q===""||Q===null||Q===void 0)o(null,$);else{const Z=Number(Q);isNaN(Z)||o(Z,$)}},F=Y=>{T(Y),j(!1),o(n??null,Y)},U=()=>{k(!0)},K=()=>{k(!1)},q=_();return w.useEffect(()=>{T(p)},[p]),C.jsxs("div",{className:G("flex flex-col w-full",u),children:[t&&C.jsx("label",{htmlFor:e,className:G("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",f),children:C.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:C.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:C.jsxs(Ke,{variant:"medium",size:V(),appearance:"subtitle",children:[t,a&&C.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}),m&&C.jsx(Ke,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:m}),C.jsxs("div",{className:"relative",children:[x&&C.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-3 text-neutral-900 dark:text-neutral-100 pointer-events-none",children:uE[$]||$}),C.jsx("input",{...O,ref:P,id:e,type:A?"number":"text",value:A?n??"":D(n),defaultValue:r!==void 0?A?r??"":D(r):void 0,placeholder:s,required:a,disabled:i,min:S,max:b,step:1/Math.pow(10,E),onFocus:U,onBlur:K,onChange:L,className:G("border rounded-md bg-white dark:bg-neutral-800 block w-full font-medium text-neutral-900 dark:text-neutral-100","transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2",q.height,q.padding,q.fontSize,x?q.symbolPadding:"",H(),g?"pr-20":"",i&&"opacity-50 cursor-not-allowed bg-neutral-50 dark:bg-neutral-700",d),style:N,"aria-required":a,"aria-invalid":l&&c==="error"?"true":"false","aria-describedby":l||m?`${e}-description`:void 0}),g&&C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center",children:C.jsxs("div",{className:"relative",children:[C.jsxs("button",{type:"button",onClick:()=>j(!M),disabled:i,className:G("px-3 py-1 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 rounded-r-md border-l border-gray-300 dark:border-gray-600 transition-colors",i&&"opacity-50 cursor-not-allowed"),children:[$,C.jsx("svg",{className:"w-4 h-4 ml-1 inline-block",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),M&&C.jsx("div",{className:"absolute top-full right-0 mt-1 w-64 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-md shadow-lg z-50 max-h-60 overflow-y-auto",children:R.map(Y=>C.jsxs("button",{type:"button",onClick:()=>F(Y.value),className:"w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 flex justify-between items-center",children:[C.jsxs("span",{children:[Y.value," - ",Y.label]}),C.jsx("span",{className:"text-gray-500",children:Y.symbol})]},Y.value))})]})}),M&&C.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>j(!1)})]}),C.jsx(Dt.AnimatePresence,{children:l&&C.jsx(Dt.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${e}-description`,role:c==="error"?"alert":void 0,children:C.jsx(Ke,{className:G("mt-1",z()),appearance:"custom",size:"extra-small",variant:"medium",children:l})})}),m&&!l&&C.jsx("div",{id:`${e}-description`,className:"sr-only",children:m})]})});dE.displayName="CurrencyInputField";const fE=w.forwardRef(({id:e,label:t,value:n,defaultValue:r,onChange:o,disabled:i=!1,required:a=!1,message:s,messageType:l="default",wrapperClassName:c,inputClassName:u,labelClassName:d,helpText:f,size:m="medium",minDate:h,maxDate:p,startPlaceholder:g="Start date",endPlaceholder:y="End date",allowClear:x=!0,inputProps:I},S)=>{const b=n!==void 0?n:r||{startDate:null,endDate:null},E=()=>{switch(m){case"small":return{height:"h-7",padding:"px-2 py-1",fontSize:"text-xs"};case"large":return{height:"h-10",padding:"px-4 py-2",fontSize:"text-base"};default:return{height:"h-8",padding:"px-3 py-1.5",fontSize:"text-sm"}}},O=()=>l==="error"?"border-red-300 focus:border-red-500 focus:ring-red-200 dark:focus:ring-red-400/20":l==="success"?"border-green-300 focus:border-green-500 focus:ring-green-200 dark:focus:ring-green-400/20":l==="info"?"border-blue-300 focus:border-blue-500 focus:ring-blue-200 dark:focus:ring-blue-400/20":"border-neutral-300 dark:border-neutral-600 focus:border-primary-500 dark:focus:border-primary-400 focus:ring-primary-200 dark:focus:ring-primary-400/20",N=()=>l==="error"?"text-red-500 dark:text-red-400":l==="success"?"text-green-500 dark:text-green-400":l==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",P=()=>{switch(m){case"small":return"extra-small";case"large":return"medium";default:return"small"}},A=_=>{if(!_)return"";const H=_.getFullYear(),z=String(_.getMonth()+1).padStart(2,"0"),V=String(_.getDate()).padStart(2,"0");return`${H}-${z}-${V}`},k=_=>{if(!_)return null;const H=new Date(_);return isNaN(H.getTime())?null:H},$=_=>{const H=k(_.target.value);o({startDate:H,endDate:b.endDate})},T=_=>{const H=k(_.target.value);o({startDate:b.startDate,endDate:H})},M=()=>{o({startDate:null,endDate:null})},j=_=>_?A(_):void 0,R=E();return C.jsxs("div",{className:G("flex flex-col w-full",c),ref:S,children:[t&&C.jsx("label",{htmlFor:`${e}-start`,className:G("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",d),children:C.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:C.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:C.jsxs(Ke,{variant:"medium",size:P(),appearance:"subtitle",children:[t,a&&C.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}),f&&C.jsx(Ke,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:f}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("div",{className:"flex-1",children:C.jsx("input",{...I,id:`${e}-start`,type:"date",value:A(b.startDate),onChange:$,disabled:i,required:a,min:j(h),max:j(p),placeholder:g,className:G("border rounded-md bg-white dark:bg-neutral-800 block w-full font-medium text-neutral-900 dark:text-neutral-100","transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2",R.height,R.padding,R.fontSize,O(),i&&"opacity-50 cursor-not-allowed bg-neutral-50 dark:bg-neutral-700",u),"aria-required":a,"aria-invalid":s&&l==="error"?"true":"false","aria-describedby":s||f?`${e}-description`:void 0})}),C.jsx("div",{className:"flex-shrink-0 text-neutral-500 dark:text-neutral-400",children:C.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18 12H6"})})}),C.jsx("div",{className:"flex-1",children:C.jsx("input",{...I,id:`${e}-end`,type:"date",value:A(b.endDate),onChange:T,disabled:i,required:a,min:j(b.startDate||h),max:j(p),placeholder:y,className:G("border rounded-md bg-white dark:bg-neutral-800 block w-full font-medium text-neutral-900 dark:text-neutral-100","transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2",R.height,R.padding,R.fontSize,O(),i&&"opacity-50 cursor-not-allowed bg-neutral-50 dark:bg-neutral-700",u),"aria-required":a,"aria-invalid":s&&l==="error"?"true":"false","aria-describedby":s||f?`${e}-description`:void 0})}),x&&(b.startDate||b.endDate)&&!i&&C.jsx("button",{type:"button",onClick:M,className:"flex-shrink-0 p-1 text-neutral-500 hover:text-neutral-700 dark:text-neutral-400 dark:hover:text-neutral-200 transition-colors","aria-label":"Clear date range",children:C.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),C.jsx("div",{className:"absolute right-3 top-1/2 transform -translate-y-1/2 pointer-events-none text-neutral-400 dark:text-neutral-500",children:C.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),C.jsx(Dt.AnimatePresence,{children:s&&C.jsx(Dt.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${e}-description`,role:l==="error"?"alert":void 0,children:C.jsx(Ke,{className:G("mt-1",N()),appearance:"custom",size:"extra-small",variant:"medium",children:s})})}),f&&!s&&C.jsx("div",{id:`${e}-description`,className:"sr-only",children:f})]})});fE.displayName="DateRange";const pE=w.forwardRef(({id:e,label:t,value:n,defaultValue:r,onChange:o,onImmediateChange:i,disabled:a=!1,required:s=!1,placeholder:l,message:c,messageType:u="default",wrapperClassName:d,inputClassName:f,labelClassName:m,helpText:h,size:p="medium",type:g="text",debounceTimeout:y=300,min:x,max:I,maxLength:S,pattern:b,inputProps:E,inputStyle:O,onKeyDown:N,onFocus:P,onBlur:A},k)=>{const[$,T]=w.useState(n||r||""),[M,j]=w.useState(n||r||""),R=()=>{switch(p){case"small":return{height:"h-7",padding:"px-2 py-1",fontSize:"text-xs"};case"large":return{height:"h-10",padding:"px-4 py-2",fontSize:"text-base"};default:return{height:"h-8",padding:"px-3 py-1.5",fontSize:"text-sm"}}},_=()=>u==="error"?"border-red-300 focus:border-red-500 focus:ring-red-200 dark:focus:ring-red-400/20":u==="success"?"border-green-300 focus:border-green-500 focus:ring-green-200 dark:focus:ring-green-400/20":u==="info"?"border-blue-300 focus:border-blue-500 focus:ring-blue-200 dark:focus:ring-blue-400/20":"border-neutral-300 dark:border-neutral-600 focus:border-primary-500 dark:focus:border-primary-400 focus:ring-primary-200 dark:focus:ring-primary-400/20",H=()=>u==="error"?"text-red-500 dark:text-red-400":u==="success"?"text-green-500 dark:text-green-400":u==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",z=()=>{switch(p){case"small":return"extra-small";case"large":return"medium";default:return"small"}};w.useEffect(()=>{const L=setTimeout(()=>{M!==$&&(j($),o($))},y);return()=>clearTimeout(L)},[$,y,o,M]),w.useEffect(()=>{n!==void 0&&n!==$&&(T(n),j(n))},[n,$]);const V=w.useCallback(L=>{const F=L.target.value;T(F),i?.(F)},[i]),D=R();return C.jsxs("div",{className:G("flex flex-col w-full",d),children:[t&&C.jsx("label",{htmlFor:e,className:G("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",m),children:C.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:C.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:C.jsxs(Ke,{variant:"medium",size:z(),appearance:"subtitle",children:[t,s&&C.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}),h&&C.jsx(Ke,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:h}),C.jsxs("div",{className:"relative",children:[C.jsx("input",{...E,ref:k,id:e,type:g,value:$,defaultValue:r,placeholder:l,required:s,disabled:a,min:x,max:I,maxLength:S,pattern:b,onChange:V,onKeyDown:N,onFocus:P,onBlur:A,className:G("border rounded-md bg-white dark:bg-neutral-800 block w-full font-medium text-neutral-900 dark:text-neutral-100","transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2",D.height,D.padding,D.fontSize,_(),a&&"opacity-50 cursor-not-allowed bg-neutral-50 dark:bg-neutral-700",f),style:O,"aria-required":s,"aria-invalid":c&&u==="error"?"true":"false","aria-describedby":c||h?`${e}-description`:void 0}),$!==M&&C.jsx("div",{className:"absolute right-2 top-1/2 transform -translate-y-1/2",children:C.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-pulse"})})]}),S&&C.jsx("div",{className:"mt-1 text-right",children:C.jsxs(Ke,{className:G("text-xs",$.length>S*.9?"text-orange-500":$.length===S?"text-red-500":"text-neutral-400 dark:text-neutral-500"),appearance:"custom",size:"extra-small",children:[$.length,"/",S]})}),C.jsx(Dt.AnimatePresence,{children:c&&C.jsx(Dt.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${e}-description`,role:u==="error"?"alert":void 0,children:C.jsx(Ke,{className:G("mt-1",H()),appearance:"custom",size:"extra-small",variant:"medium",children:c})})}),h&&!c&&C.jsx("div",{id:`${e}-description`,className:"sr-only",children:h})]})});pE.displayName="DebounceInputField";const mE=w.forwardRef(({id:e,label:t,value:n,defaultValue:r,onChange:o,disabled:i=!1,required:a=!1,placeholder:s,message:l,messageType:c="default",wrapperClassName:u,inputClassName:d,labelClassName:f,helpText:m,size:h="medium",min:p=0,max:g=100,step:y=.01,decimalPlaces:x=2,showSymbol:I=!0,allowNegative:S=!1,inputProps:b,inputStyle:E,onKeyDown:O,onFocus:N,onBlur:P},A)=>{const k=()=>{switch(h){case"small":return{height:"h-7",padding:"px-2 py-1",fontSize:"text-xs",symbolPadding:"pr-8"};case"large":return{height:"h-10",padding:"px-4 py-2",fontSize:"text-base",symbolPadding:"pr-10"};default:return{height:"h-8",padding:"px-3 py-1.5",fontSize:"text-sm",symbolPadding:"pr-9"}}},$=()=>c==="error"?"border-red-300 focus:border-red-500 focus:ring-red-200 dark:focus:ring-red-400/20":c==="success"?"border-green-300 focus:border-green-500 focus:ring-green-200 dark:focus:ring-green-400/20":c==="info"?"border-blue-300 focus:border-blue-500 focus:ring-blue-200 dark:focus:ring-blue-400/20":"border-neutral-300 dark:border-neutral-600 focus:border-primary-500 dark:focus:border-primary-400 focus:ring-primary-200 dark:focus:ring-primary-400/20",T=()=>c==="error"?"text-red-500 dark:text-red-400":c==="success"?"text-green-500 dark:text-green-400":c==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",M=()=>{switch(h){case"small":return"extra-small";case"large":return"medium";default:return"small"}},j=z=>{const V=z.target.value;if(V===""||V===null||V===void 0)o(null);else{const D=Number(V);if(!isNaN(D)){let L=D;!S&&L<0&&(L=0),p!==void 0&&L<p&&(L=p),g!==void 0&&L>g&&(L=g);const F=Math.pow(10,x);L=Math.round(L*F)/F,o(L)}}},R=z=>{N?.(z)},_=z=>{P?.(z)},H=k();return C.jsxs("div",{className:G("flex flex-col w-full",u),children:[t&&C.jsx("label",{htmlFor:e,className:G("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",f),children:C.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:C.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:C.jsxs(Ke,{variant:"medium",size:M(),appearance:"subtitle",children:[t,a&&C.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}),m&&C.jsx(Ke,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:m}),C.jsxs("div",{className:"relative",children:[C.jsx("input",{...b,ref:A,id:e,type:"number",value:n??"",defaultValue:r??"",placeholder:s,required:a,disabled:i,min:S?void 0:p,max:g,step:y,onChange:j,onKeyDown:O,onFocus:R,onBlur:_,className:G("border rounded-md bg-white dark:bg-neutral-800 block w-full font-medium text-neutral-900 dark:text-neutral-100","transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2",H.height,H.padding,H.fontSize,I?H.symbolPadding:"",$(),i&&"opacity-50 cursor-not-allowed bg-neutral-50 dark:bg-neutral-700",d),style:E,"aria-required":a,"aria-invalid":l&&c==="error"?"true":"false","aria-describedby":l||m?`${e}-description`:void 0}),I&&C.jsx("span",{className:"absolute inset-y-0 right-0 flex items-center pr-3 text-neutral-900 dark:text-neutral-100 pointer-events-none",children:"%"})]}),n!=null&&C.jsxs("div",{className:"mt-1 flex justify-between items-center text-xs",children:[C.jsxs("div",{className:"flex items-center gap-2",children:[n<p&&C.jsxs("span",{className:"text-orange-500",children:["Below minimum (",p,"%)"]}),n>g&&C.jsxs("span",{className:"text-orange-500",children:["Above maximum (",g,"%)"]}),n>=p&&n<=g&&C.jsx("span",{className:"text-green-500",children:"Valid range"})]}),C.jsxs("span",{className:"text-neutral-400 dark:text-neutral-500",children:[n.toFixed(x),"%"]})]}),C.jsx(Dt.AnimatePresence,{children:l&&C.jsx(Dt.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${e}-description`,role:c==="error"?"alert":void 0,children:C.jsx(Ke,{className:G("mt-1",T()),appearance:"custom",size:"extra-small",variant:"medium",children:l})})}),m&&!l&&C.jsx("div",{id:`${e}-description`,className:"sr-only",children:m})]})});mE.displayName="PercentageInputField";const MV=(e,t,n,r,o)=>{const i={small:"w-7 h-4 after:h-3 after:w-3 after:top-0.5 after:left-0.5",medium:"w-9 h-5 after:h-4 after:w-4 after:top-0.5 after:left-0.5",large:"w-11 h-6 after:h-5 after:w-5 after:top-0.5 after:left-0.5"},a={small:"peer-checked:after:translate-x-3",medium:"peer-checked:after:translate-x-4",large:"peer-checked:after:translate-x-5"};return G("p-0.5 rounded-full peer after:content-[''] after:absolute after:rounded-full after:transition-all bg-gray-200",i[o],a[o],{"dark:bg-neutral-400 dark:peer-focus:ring-blue-800 dark:after:bg-neutral-500":n==="secondary"&&!e,"dark:bg-neutral-500 dark:peer-focus:ring-blue-800 dark:after:bg-neutral-700":n==="primary"&&!e,"peer-checked:bg-blue-600 dark:peer-checked:bg-primary-900 after:bg-white dark:after:bg-primary-500":e,"after:bg-white dark:after:bg-neutral-700":!e,"text-white dark:text-neutral-900":t,"cursor-not-allowed opacity-70":r})},Rh=w.forwardRef(({id:e,checked:t,onChange:n,label:r,required:o=!1,disabled:i=!1,message:a,messageType:s="default",wrapperClassName:l,toggleClassName:c,labelClassName:u,helpText:d,size:f="medium",labelDirection:m="top",hideStatus:h=!1,statusText:p,withIcon:g=!1,icon:y,variant:x="primary",originalCase:I=!1,stopClickPropagation:S=!0},b)=>{const E=m==="top",O=m==="left",N=m==="right",P=()=>s==="error"?"text-red-500 dark:text-red-400":s==="success"?"text-green-500 dark:text-green-400":s==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",A=T=>{i||n(T.target.checked)},k=()=>C.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),$=()=>C.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})});return C.jsxs("div",{className:G("flex flex-col w-full",l),onClick:T=>{S&&T.stopPropagation()},children:[E&&r&&C.jsx("div",{className:"w-full flex justify-between flex-wrap mb-1",children:C.jsx("label",{htmlFor:e,className:G("text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",!I&&"capitalize",u),children:C.jsxs(Ke,{size:"extra-small",variant:"medium",appearance:"subtitle",children:[r,o&&C.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})}),d&&C.jsx(Ke,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:d}),C.jsxs("div",{className:"flex items-center",children:[O&&r&&C.jsx(Ke,{size:"small",variant:"medium",className:G("mr-2 text-neutral-700 dark:text-neutral-200",u),appearance:"custom",children:r}),C.jsxs("label",{className:G("relative inline-flex items-center",N||p?"":"w-min",i?"cursor-not-allowed opacity-50":"cursor-pointer"),onClick:T=>T.stopPropagation(),children:[C.jsx("input",{ref:b,type:"checkbox",id:e,onChange:A,disabled:i,checked:t,className:G("sr-only peer w-full",c),"aria-required":o,"aria-invalid":a&&s==="error"?"true":"false","aria-describedby":a||d?`${e}-description`:void 0}),C.jsx("div",{className:MV(t,g,x,i,f),children:g&&C.jsx("div",{className:"flex items-center justify-center h-full",children:C.jsx("div",{className:G("z-10 transition-all transform",f==="small"&&(t?"translate-x-2 translate-y-[-2px]":"translate-x-[-6px] translate-y-[-2px]"),f==="medium"&&(t?"translate-x-[8.5px] translate-y-[-2px]":"translate-x-[-8px] translate-y-[-2px]"),f==="large"&&(t?"translate-x-3 translate-y-[-2px]":"translate-x-[-10px] translate-y-[-2px]")),children:t?y?.checkedIcon?y.checkedIcon:C.jsx(k,{}):y?.uncheckedIcon?y.uncheckedIcon:C.jsx($,{})})})}),N&&r&&C.jsx(Ke,{size:"small",variant:"medium",className:G("ml-2 text-neutral-700 dark:text-neutral-300",u),appearance:"custom",children:r}),!h&&C.jsx(Ke,{size:"small",variant:"medium",className:"ml-2 text-neutral-900 dark:text-neutral-100",appearance:"custom",children:p||(t?"Yes":"No")})]})]}),C.jsx(Dt.AnimatePresence,{children:a&&C.jsx(Dt.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${e}-description`,role:s==="error"?"alert":void 0,children:C.jsx(Ke,{className:G("mt-1",P()),appearance:"custom",size:"extra-small",variant:"medium",children:a})})}),d&&!a&&C.jsx("div",{id:`${e}-description`,className:"sr-only",children:d})]})});Rh.displayName="Toggle";var gE={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},hE=w.createContext&&w.createContext(gE),kV=["attr","size","title"];function jV(e,t){if(e==null)return{};var n=RV(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function RV(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Nd(){return Nd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nd.apply(this,arguments)}function vE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function $d(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vE(Object(n),!0).forEach(function(r){DV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DV(e,t,n){return t=FV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FV(e){var t=LV(e,"string");return typeof t=="symbol"?t:t+""}function LV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bE(e){return e&&e.map((t,n)=>w.createElement(t.tag,$d({key:n},t.attr),bE(t.child)))}function Pd(e){return t=>w.createElement(BV,Nd({attr:$d({},e.attr)},t),bE(e.child))}function BV(e){var t=n=>{var{attr:r,size:o,title:i}=e,a=jV(e,kV),s=o||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),w.createElement("svg",Nd({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:l,style:$d($d({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),i&&w.createElement("title",null,i),e.children)};return hE!==void 0?w.createElement(hE.Consumer,null,n=>t(n)):t(gE)}function _V(e){return Pd({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"},child:[]}]})(e)}function VV(e){return Pd({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]},{tag:"line",attr:{x1:"10",y1:"11",x2:"10",y2:"17"},child:[]},{tag:"line",attr:{x1:"14",y1:"11",x2:"14",y2:"17"},child:[]}]})(e)}function yE(e){return Pd({attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{opacity:"0.2",fillRule:"evenodd",clipRule:"evenodd",d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z",fill:"currentColor"},child:[]}]})(e)}function zV(e){return Pd({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM1.6 11.85H0v3.999h.791v-1.342h.803q.43 0 .732-.173.305-.175.463-.474a1.4 1.4 0 0 0 .161-.677q0-.375-.158-.677a1.2 1.2 0 0 0-.46-.477q-.3-.18-.732-.179m.545 1.333a.8.8 0 0 1-.085.38.57.57 0 0 1-.238.241.8.8 0 0 1-.375.082H.788V12.48h.66q.327 0 .512.181.185.183.185.522m1.217-1.333v3.999h1.46q.602 0 .998-.237a1.45 1.45 0 0 0 .595-.689q.196-.45.196-1.084 0-.63-.196-1.075a1.43 1.43 0 0 0-.589-.68q-.396-.234-1.005-.234zm.791.645h.563q.371 0 .609.152a.9.9 0 0 1 .354.454q.118.302.118.753a2.3 2.3 0 0 1-.068.592 1.1 1.1 0 0 1-.196.422.8.8 0 0 1-.334.252 1.3 1.3 0 0 1-.483.082h-.563zm3.743 1.763v1.591h-.79V11.85h2.548v.653H7.896v1.117h1.606v.638z"},child:[]}]})(e)}const{Dragger:HV}=ja,GV=e=>e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(2)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(2)} MB`:`${(e/(1024*1024*1024)).toFixed(2)} GB`,WV=(e,t=20)=>e?e.length<=t?e:e.slice(0,t-7)+"...."+e.slice(-7):"",xE=w.forwardRef(({id:e,onFileChange:t,description:n,errorMessage:r,disabled:o=!1,defaultFile:i=null,acceptedFiles:a="*",isLoading:s=!1,asBase64:l=!1,toFileServer:c=!1,setFileUploading:u,fileUploading:d=!1,multiple:f=!1,getRealFileName:m=!1,maxSize:h=50*1024*1024,onUpload:p,onDelete:g,wrapperClassName:y,uploadClassName:x,showFileSize:I=!0,formatFileSize:S=GV},b)=>{const[E,O]=w.useState(null),[N,P]=w.useState([]),[A,k]=w.useState("#d9d9d9"),[$,T]=w.useState(!1),[M,j]=w.useState(null),R=w.useCallback(async()=>{if(p)try{const z=await p(N),V=f?z?.map(L=>L?.fileUrl):z?.[0]?.fileUrl,D=m?E?.name:z?.[0]?.fileName;t(V,D),u?.(null)}catch(z){console.error("Upload failed:",z),u?.(null)}},[p,N,f,E,m,t,u]),_={accept:a,multiple:f,showUploadList:!1,disabled:o,onRemove:()=>{P([])},beforeUpload:(z,V)=>{if(z.size>h){const D=(h/1048576).toFixed(0);return console.error(`File size exceeds ${D}MB limit`),!1}return O(z),c?(u?.(e||"field-file-upload"),P(V)):(l?Promise.all((f?V:[z]).map(D=>new Promise(L=>{const F=new FileReader;F.onload=U=>{L({filename:D.name,content:U?.target?.result?.split(",")[1]})},F.readAsDataURL(D)}))).then(D=>{t(f?D:D[0])}):t(z),O(z)),!1}},H=async()=>{if(c&&M&&g)try{await g(M),j(null)}catch(z){console.error("Delete failed:",z)}O(null),P([]),t(null)};return w.useEffect(()=>{k(r?"#EF4444":"#d9d9d9")},[r]),w.useEffect(()=>{N.length&&c&&R()},[N,c,R]),w.useEffect(()=>{i?.name&&O(i)},[i]),C.jsxs("div",{ref:b,className:G("w-full",y),children:[C.jsx("div",{className:"h-32",onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),children:C.jsx(HV,{..._,className:x,style:{borderColor:$&&!r?"#1890ff":A},disabled:o||d,children:E?C.jsxs("div",{className:"flex items-center justify-between mx-5",title:E?.name||i?.name||"",children:[C.jsxs("div",{className:"flex items-center justify-center gap-4",children:[E?.type==="application/pdf"?C.jsx("div",{className:"p-3 bg-[#E6F1FC] rounded-lg",children:C.jsx(zV,{size:20,fill:"#006CCF"})}):C.jsx("div",{className:"p-3 bg-[#E6F1FC] rounded-lg",children:C.jsx(TV,{sx:{height:"20px",width:"20px",color:"#006CCF"}})}),C.jsxs("div",{className:"text-left",children:[C.jsx(Ke,{size:"small",variant:"medium",className:"font-inter text-md font-medium text-base",children:WV(E?.name||i?.name||"")}),d?C.jsx(Ke,{size:"small",variant:"medium",appearance:"subtitle",children:"Uploading..."}):I&&E?.size>0?C.jsx(Ke,{size:"small",variant:"medium",appearance:"subtitle",children:S(E.size)}):null]})]}),s?C.jsx(yE,{size:40,className:"spinner text-primary-600"}):C.jsx("button",{id:`btn-file-upload-${e}`,className:"ml-4",onClick:z=>{z.stopPropagation(),H()},disabled:o,type:"button","aria-label":"Delete file",children:C.jsx(VV,{size:20,className:"text-gray-400"})})]}):C.jsx("div",{className:"flex items-center justify-center",children:C.jsxs("div",{className:"flex-col",children:[C.jsx("div",{className:"mb-4 flex justify-center",children:C.jsx(_V,{size:24,className:"text-gray-400"})}),C.jsxs("div",{children:[C.jsxs("div",{className:"flex items-center justify-center",children:[C.jsx(Ke,{size:"small",variant:"medium",className:"text-primary-600 dark:text-primary-300",appearance:"custom",children:"Click to upload"}),C.jsx(Ke,{size:"small",variant:"medium",className:"ml-1",appearance:"subtitle",children:"or drag and drop"})]}),n?C.jsx(Ke,{size:"small",variant:"medium",appearance:"subtitle",children:n}):null]})]})})})}),r&&C.jsx(Ke,{className:"text-red-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:r})]})});xE.displayName="MultiFileUpload";const{Dragger:UV}=ja,XV=200*1024*1024,YV=(e,t,n,r,o)=>{const i={small:"h-24",medium:"h-32",large:"h-40"},a={primary:"border-blue-200 hover:border-blue-400",secondary:"border-gray-200 hover:border-gray-400"};return G("border-2 border-dashed rounded-lg transition-colors duration-200",i[e],a[t],{"border-red-400 bg-red-50":r,"cursor-not-allowed opacity-50":n,"cursor-pointer":!n})},JV=()=>C.jsx("div",{className:"p-3 bg-blue-50 rounded-lg",children:C.jsx("svg",{className:"w-5 h-5 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"})})}),ZV=()=>C.jsx("div",{className:"p-3 bg-blue-50 rounded-lg",children:C.jsx("svg",{className:"w-5 h-5 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4z",clipRule:"evenodd"})})}),qV=()=>C.jsx("svg",{className:"w-6 h-6 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),KV=()=>C.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}),CE=w.forwardRef(({id:e,onFileSelect:t,onUpload:n,description:r,errorMessage:o,disabled:i=!1,defaultFile:a=null,acceptedFiles:s="*",isLoading:l=!1,asBase64:c=!1,multiple:u=!1,hideSelectedFile:d=!1,onDelete:f,maxSize:m=XV,wrapperClassName:h,uploadClassName:p,size:g="medium",variant:y="primary",uploadIcon:x,deleteIcon:I,fileTypeIcons:S,showFileSize:b=!0,showProgress:E=!1,progress:O=0},N)=>{const[P,A]=w.useState(null),[k,$]=w.useState(!1),T=(z,V)=>{if(z.size>m){const D=Math.round(m/1048576);return console.error(`File size exceeds the limit of ${D} MB`),ja.LIST_IGNORE}if(d||A(z),c){const D=new FileReader;D.onload=L=>{const F=L?.target?.result;t(F,z.name)},D.readAsDataURL(z)}else t(u?V:z,z.name);return n&&n(u?V:z),ja.LIST_IGNORE},M=()=>{A(null),t(null),f?.()},j=z=>{if(z===0)return"0 Bytes";const V=1024,D=["Bytes","KB","MB","GB"],L=Math.floor(Math.log(z)/Math.log(V));return parseFloat((z/Math.pow(V,L)).toFixed(2))+" "+D[L]},R=z=>z.length<=30?z:`${z.slice(0,23)}....${z.slice(-7)}`,_=z=>z.type==="application/pdf"?S?.pdf||C.jsx(JV,{}):S?.default||C.jsx(ZV,{});w.useEffect(()=>{a&&A(a)},[a]);const H={accept:s,multiple:u,showUploadList:!1,disabled:i,beforeUpload:T};return C.jsxs("div",{ref:N,className:G("w-full",h),children:[C.jsx("div",{className:G(YV(g,y,i,!!o),p),onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),role:"button",tabIndex:i?-1:0,"aria-label":"File upload area",children:C.jsx(UV,{...H,children:P&&!d?C.jsxs("div",{className:"flex items-center justify-between mx-5",title:P.name,children:[C.jsxs("div",{className:"flex items-center gap-4",children:[_(P),C.jsxs("div",{className:"text-left",children:[C.jsx(Ke,{size:"small",variant:"medium",className:"text-neutral-900 font-medium",children:R(P.name)}),b&&P.size>0&&C.jsx(Ke,{size:"small",variant:"medium",appearance:"subtitle",children:j(P.size)}),E&&O>0&&C.jsxs("div",{className:"mt-1",children:[C.jsx("div",{className:"w-full bg-gray-200 rounded-full h-1",children:C.jsx("div",{className:"bg-blue-600 h-1 rounded-full transition-all duration-300",style:{width:`${O}%`}})}),C.jsxs(Ke,{size:"extra-small",variant:"medium",appearance:"subtitle",children:[O,"% uploaded"]})]})]})]}),l?C.jsx("div",{className:"animate-spin",children:C.jsx("svg",{className:"w-5 h-5 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}):C.jsx("button",{className:"ml-4 p-1 hover:bg-gray-100 rounded",onClick:z=>{z.stopPropagation(),M()},disabled:i,type:"button","aria-label":"Delete file",children:I||C.jsx(KV,{})})]}):C.jsx("div",{className:"flex items-center justify-center h-full",children:C.jsxs("div",{className:"flex flex-col items-center",children:[C.jsx("div",{className:"mb-4 flex justify-center",children:x||C.jsx(qV,{})}),C.jsxs("div",{className:"text-center",children:[C.jsxs("div",{className:"flex items-center justify-center gap-1",children:[C.jsx(Ke,{size:"small",variant:"medium",className:"text-blue-600 dark:text-blue-300",appearance:"custom",children:"Click to upload"}),C.jsx(Ke,{size:"small",variant:"medium",appearance:"subtitle",children:"or drag and drop"})]}),r&&C.jsx(Ke,{size:"small",variant:"medium",className:"text-neutral-400 mt-1",children:r})]})]})})})}),o&&C.jsx(Ke,{className:"text-red-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:o})]})});CE.displayName="FileUpload";const wE=w.forwardRef(({status:e,children:t,className:n,size:r="medium","aria-label":o},i)=>{const a=()=>{switch(r){case"small":return"text-xs px-1.5 py-0.5";case"large":return"text-base px-3 py-1.5";default:return"text-sm px-2 py-1"}},s=()=>{switch(e?.toLowerCase()){case"purple":return"bg-purple-50 text-purple-500 border border-purple-100 dark:bg-purple-950 dark:text-purple-400 dark:border-purple-800";case"blue":return"bg-blue-50 text-blue-500 border border-blue-100 dark:bg-blue-950 dark:text-blue-400 dark:border-blue-800";case"teal":return"bg-teal-50 text-teal-500 border border-teal-100 dark:bg-teal-950 dark:text-teal-400 dark:border-teal-800";case"green":return"bg-green-50 text-green-500 border border-green-100 dark:bg-green-950 dark:text-green-400 dark:border-green-800";case"yellow":return"bg-yellow-50 text-yellow-600 border border-yellow-100 dark:bg-yellow-950 dark:text-yellow-400 dark:border-yellow-800";case"orange":return"bg-orange-50 text-orange-500 border border-orange-100 dark:bg-orange-950 dark:text-orange-400 dark:border-orange-800";case"peach":return"bg-orange-50 text-orange-400 border border-orange-100 dark:bg-orange-950 dark:text-orange-300 dark:border-orange-800";case"red":return"bg-red-50 text-red-500 border border-red-100 dark:bg-red-950 dark:text-red-400 dark:border-red-800";case"navy":return"bg-slate-50 text-slate-700 border border-slate-100 dark:bg-slate-950 dark:text-slate-400 dark:border-slate-800";case"grey":return"bg-neutral-50 text-neutral-500 border border-neutral-100 dark:bg-neutral-950 dark:text-neutral-400 dark:border-neutral-800";default:return"bg-blue-50 text-blue-600 border border-blue-200 dark:bg-blue-950 dark:text-blue-400 dark:border-blue-800"}};return C.jsx("span",{ref:i,className:G("inline-flex items-center justify-center font-medium rounded-md transition-colors",a(),s(),n),"aria-label":o||`Status: ${e||"default"}`,role:"status",children:t})});wE.displayName="StatusColorMapping";const SE=w.forwardRef(({status:e="default",children:t,appearance:n="outline",size:r="md",className:o,isRounded:i=!1,capitalize:a=!0,"aria-label":s},l)=>{const c=h=>!h||!a?h:h.replace(/\w\S*/g,p=>p.charAt(0).toUpperCase()+p.substr(1).toLowerCase()),u=()=>{switch(r){case"sm":return"text-xs px-1.5 py-0.5";case"lg":return"text-sm px-3 py-1.5";default:return"text-xs px-2 py-1"}},d=()=>{switch(e){case"primary":case"default":return"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-300 border border-blue-300 dark:border-blue-700";case"warning":return"bg-yellow-50 dark:bg-yellow-950 text-yellow-600 dark:text-yellow-300 border border-yellow-300 dark:border-yellow-700";case"error":return"bg-red-50 dark:bg-red-950 text-red-600 dark:text-red-300 border border-red-300 dark:border-red-700";case"neutral":return"bg-neutral-50 dark:bg-neutral-950 text-neutral-600 dark:text-neutral-300 border border-neutral-300 dark:border-neutral-700";case"success":return"bg-green-50 dark:bg-green-950 text-green-600 dark:text-green-300 border border-green-300 dark:border-green-700";case"info":return"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-300 border border-blue-300 dark:border-blue-700";default:return"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-300 border border-blue-300 dark:border-blue-700"}},f=()=>{switch(e){case"primary":case"default":return"bg-blue-600 dark:bg-blue-700 text-white";case"warning":return"bg-yellow-600 dark:bg-yellow-700 text-white";case"success":return"bg-green-600 dark:bg-green-700 text-white";case"error":return"bg-red-600 dark:bg-red-700 text-white";case"neutral":return"bg-neutral-600 dark:bg-neutral-700 text-white";case"info":return"bg-blue-600 dark:bg-blue-700 text-white";default:return"bg-blue-600 dark:bg-blue-700 text-white"}},m=()=>n==="filled"?f():d();return C.jsx("span",{ref:l,className:G("inline-flex items-center justify-center font-medium transition-colors",i?"rounded-full":"rounded",u(),m(),o),"aria-label":s||`Badge: ${e}`,role:"status",children:c(t)})});SE.displayName="Badge";const EE=(e={})=>{const{primaryContainerId:t="layout-app-main-content-container",fallbackContainerId:n="full-screen-container",maxRetries:r=10,retryDelay:o=100}=e,[i,a]=w.useState(null);return w.useEffect(()=>{let s=0,l;const c=d=>{if(typeof document<"u"){const f=document.getElementById(d);if(f)return f}if(typeof globalThis<"u"&&globalThis.window&&globalThis.window.parent&&globalThis.window.parent!==globalThis.window)try{const f=globalThis.window.parent.document?.getElementById(d);if(f)return f}catch{}return null},u=()=>{let d=c(t);if(!d&&n&&(d=c(n)),d){a(d);return}s<r?(s++,l=setTimeout(u,o)):a(document.body)};return u(),()=>{l&&clearTimeout(l)}},[t,n,r,o]),i},Ui=e=>{const{open:t,children:n,title:r,mask:o=!0,onlyBody:i=!1,bodySpacing:a=!0,headerRightContent:s,parentContainer:l,zIndex:c,asForm:u,onSubmit:d,showCloseButton:f=!0,noPadding:m=!1,...h}=e,p=EE({primaryContainerId:"layout-app-main-content-container",fallbackContainerId:"full-screen-container"}),g=C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:"flex justify-between items-center",children:[f?C.jsx(Ke,{size:"large",variant:"semibold",className:"tour__title",children:r}):C.jsx("div",{className:"flex flex-col w-full",children:r}),s||f&&C.jsx("button",{id:"btn-modal-close",onClick:h.onCancel,className:"",type:"button",children:C.jsx(AV,{sx:{fontSize:"20px"},className:"cursor-pointer text-neutral-400 hover:text-neutral-600"})})]}),h.addLineAfterHeader&&C.jsx("hr",{className:"mt-2"})]}),y=u?"form":"div",x=()=>{if(l){if(typeof document<"u"){const E=document.getElementById(l);if(E)return E}if(typeof globalThis<"u"&&globalThis.window&&globalThis.window.parent&&globalThis.window.parent!==globalThis.window)try{const E=globalThis.window.parent.document?.getElementById(l);if(E)return E}catch{}}return p};if(!t)return null;const I=x();if(!I)return null;const S=I!==document.body;return C.jsx(Tr,{open:t,centered:!0,closable:!1,title:i?null:g,modalRender:E=>C.jsx(y,{onSubmit:O=>{O.preventDefault(),d&&d()},children:C.jsx("div",{role:"none",onClick:O=>O.stopPropagation(),children:E})}),styles:{content:{padding:m?"0px":"20px 0px"},header:{padding:m?"0px":"0px 20px"},body:{padding:m?"0px":a?"0px 20px":"0px"},footer:{padding:m?"0px":"0px 20px"},mask:{zIndex:c||1e3,position:S?"absolute":void 0,top:S?0:void 0,right:S?0:void 0,bottom:S?0:void 0,left:S?0:void 0},wrapper:{zIndex:c||1e3,position:S?"absolute":void 0,top:S?0:void 0,right:S?0:void 0,bottom:S?0:void 0,left:S?0:void 0,backgroundColor:o?"rgb(16 24 40 / 80%)":void 0}},mask:o,...h,getContainer:()=>I,children:n})},IE=({size:e=20,className:t="",...n})=>C.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`text-primary-600 dark:text-primary-300 cursor-pointer ${t}`,...n,children:[C.jsx("circle",{cx:"11",cy:"11",r:"8"}),C.jsx("path",{d:"M21 21l-4.35-4.35"})]}),Dh=e=>e===1||e==="1"||typeof e=="string"&&e.toLowerCase()==="yes"||typeof e=="string"&&e.toLowerCase()==="true"?"Yes":e===0||e==="0"||typeof e=="string"&&e.toLowerCase()==="no"||typeof e=="string"&&e.toLowerCase()==="false"?"No":e?.toString()||"-",Fh=(e,t="USD")=>{try{if(e==null)return"";const n=Number(e);if(isNaN(n))return e?.toString()||"";const r=n.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});return`${{USD:"$",EUR:"€",GBP:"£",JPY:"¥",CAD:"C$",AUD:"A$",CHF:"CHF",CNY:"¥",SEK:"kr",NOK:"kr",DKK:"kr",PLN:"zł",CZK:"Kč",HUF:"Ft",RUB:"₽",BRL:"R$",INR:"₹",KRW:"₩",SGD:"S$",HKD:"HK$",NZD:"NZ$",MXN:"$",ZAR:"R",TRY:"₺",ILS:"₪",AED:"د.إ",SAR:"﷼",QAR:"﷼",KWD:"د.ك",BHD:"د.ب",OMR:"﷼",JOD:"د.ا",LBP:"ل.ل",EGP:"£",MAD:"د.م.",TND:"د.ت",DZD:"د.ج",LYD:"ل.د",SDG:"ج.س.",ETB:"Br",KES:"KSh",UGX:"USh",TZS:"TSh",ZMW:"ZK",BWP:"P",ZWL:"Z$",AOA:"Kz",MZN:"MT",GHS:"₵",NGN:"₦",XAF:"FCFA",XOF:"CFA",CDF:"FC",RWF:"RF",BIF:"FBu",KMF:"CF",DJF:"Fdj",SOS:"S",ERN:"Nfk"}[t]||"$"}${r}`}catch{return"-"}},xl=(e,t={})=>{const{format:n,relative:r=!1,withTime:o=!0,fallback:i="-",skipTimezone:a=!1,onlyTime:s=!1}=t||{};if(!e)return i;try{const l=new Date(e);if(isNaN(l.getTime()))return i;if(r){const m=Math.floor((new Date().getTime()-l.getTime())/1e3);return m<60?"just now":m<3600?`${Math.floor(m/60)} minutes ago`:m<86400?`${Math.floor(m/3600)} hours ago`:m<2592e3?`${Math.floor(m/86400)} days ago`:m<31536e3?`${Math.floor(m/2592e3)} months ago`:`${Math.floor(m/31536e3)} years ago`}const c="MM/dd/yyyy",u="hh:mm a",d=o&&!s;return l.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:o?"2-digit":void 0,minute:o?"2-digit":void 0,hour12:!0})}catch{return i}},OE=e=>typeof e=="string"&&/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(e),NE=w.forwardRef(({label:e,value:t,className:n,type:r="string",tags:o,tooltip:i,items:a,isModified:s=!1,isChanged:l=!1,size:c="medium",isHighlighted:u=!1,deletedValue:d,highlightColor:f="warning",isSearchActive:m=!1,originalValue:h=!1,showDiff:p=!1,theme:g="light",onUpload:y,acceptsUpload:x=!1,MasterDataModal:I,riskDetails:S,isRiskAnalysisOpen:b=!1,RiskDetailsCard:E,"aria-label":O},N)=>{const[P,A]=w.useState(!0),[k,$]=w.useState(!1),[T,M]=w.useState(null),[j,R]=w.useState(!1),_=()=>{A(!P)},H=U=>{$(!0),M({...U,value:t})},z=()=>{$(!1),M(null)},V=U=>{const K=U.target.files?.[0];K&&y&&y(K),U.target.value=""},D=()=>{const U=typeof t=="string"&&OE(t);if(m&&typeof t=="object")return t;if(t||r==="boolean"&&t===0||r==="currency"&&Number(t)>=0){if((t===!0||t==="True")&&!h)return"Yes";if((t===!1||t==="False")&&!h)return"No";if(r==="url")return C.jsx("a",{href:t,className:"text-primary-600 truncate",children:t});if(r==="boolean")return Dh(t);if(r==="currency")return Fh(t,a?.currency_code)||"-";if(r==="datetime"){const K=typeof t=="string"&&t.includes("Z")?t.replace(/\.000Z$/,"Z"):t;return xl(K,{skipTimezone:!1,withTime:!0})}else if(r==="date"||U){const K=typeof t=="string"&&t.includes("Z")?t.replace(/\.000Z$/,"Z"):t;return xl(K,{skipTimezone:!0,withTime:!1})}else return r==="percentage"?`${t}%`:typeof t=="string"&&t.length>100?C.jsxs("p",{children:[t.slice(0,P?100:t.length),P?"... ":" ",C.jsx("button",{id:`btn-label-value-${P?"Show more":"Show less"}`,className:"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap",onClick:_,onKeyDown:K=>{(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),_())},"aria-label":P?"Show more content":"Show less content",type:"button",children:P?"Show more":"Show less"})]}):t}return"-"},L=()=>{switch(c){case"small":return"extra-small";case"large":return"large";default:return"small"}},F=()=>{switch(f){case"success":return"bg-success-100";case"warning":return"bg-warning-100";case"error":return"bg-error-100";case"info":return"bg-info-100";default:return"bg-warning-100"}};return C.jsxs("div",{ref:N,className:G("font-medium relative",n),onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),"aria-label":O||`Label: ${e}, Value: ${t}`,children:[C.jsxs(Ke,{variant:"medium",size:L(),className:"flex gap-1 flex-wrap",appearance:"subtitle",children:[e," ",C.jsx(Vw,{labels:o?.map(U=>({...U,color:U.color||"primary"}))}),o&&o.length>0&&C.jsx(C.Fragment,{children:o.map(U=>C.jsx(Ra,{label:U.label,color:U.color,size:"xs",theme:g},`${U.label}-${U.value||U.color}`))}),i&&C.jsx(jo,{placement:"top",title:i,children:C.jsx("div",{className:"cursor-pointer",role:"button",tabIndex:0,onKeyDown:U=>{(U.key==="Enter"||U.key===" ")&&U.preventDefault()},children:C.jsx(Lw,{size:14})})})]}),C.jsxs(Ke,{variant:"medium",size:L(),className:G("text-- whitespace-normal break-all flex gap-1 pt-0.5",s&&"bg-neutral-50 dark:bg-black-700 p-1 rounded",b&&S?.color&&`bg-${S.color}-50 border-${S.color}-300 px-0.5 rounded-lg`),appearance:"body",children:[p&&d&&t?C.jsxs("div",{className:"flex gap-2",children:[C.jsx("span",{className:"line-through",children:d}),C.jsx("span",{children:D()})]}):l||u?C.jsx("mark",{className:G("rounded-md py-0.5 px-1",F()),children:D()}):D(),a?.is_master_data&&a?.reference&&t&&C.jsx("button",{onClick:()=>H(a),onKeyDown:U=>{(U.key==="Enter"||U.key===" ")&&(U.preventDefault(),H(a))},"aria-label":`Search master data for ${e}`,type:"button",className:"cursor-pointer",children:C.jsx(IE,{size:20})}),x&&C.jsx("input",{type:"file",onChange:V,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer","aria-label":`Upload file for ${e}`})]}),d&&!p&&C.jsx(Ke,{variant:"medium",size:"extra-small",className:"pt-0.5",appearance:"body",children:C.jsx("mark",{className:"rounded-md py-0.5 px-1 bg-error-100",children:C.jsx("del",{children:d||r==="boolean"&&d==="0"?d==="True"?"Yes":d==="False"?"No":r==="boolean"?Dh(d):r==="currency"?Fh(d,a?.currency_code):r==="date"?xl(d,{skipTimezone:!0,withTime:!1}):r==="datetime"?xl(d,{skipTimezone:!0,withTime:!0}):r==="percentage"?`${d}%`:d.length>100?C.jsxs("p",{children:[d.slice(0,P?100:d.length),P?"... ":" ",C.jsx("button",{id:`btn-label-value-${P?"Show more":"Show less"}`,className:"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap",onClick:_,children:P?"Show more":"Show less"})]}):d:"-"})})}),I&&C.jsx(I,{isVisible:k,onClose:z,masterdataInfo:T}),j&&S&&b&&C.jsx("div",{className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:U=>U.stopPropagation(),onMouseDown:U=>U.preventDefault(),onKeyDown:U=>{U.key==="Escape"&&R(!1)},role:"tooltip","aria-label":"Risk analysis details",tabIndex:0,children:E?C.jsx(E,{riskDetails:S}):C.jsx("div",{className:"shadow-lg p-4",children:C.jsxs("div",{className:"text-sm",children:[C.jsx("h4",{className:"font-semibold mb-2",children:"Risk Details"}),C.jsx("p",{className:"text-neutral-600 dark:text-neutral-300",children:S.description||"Risk analysis information"})]})})})]})});NE.displayName="LabelValue";const $E=w.forwardRef(({status:e,children:t,additionalChildren:n,ExpandedComponent:r,expandable:o=!1,icon:i,className:a,onClick:s,"aria-label":l},c)=>{const[u,d]=w.useState(!1),f=()=>{switch(e){case"success":return"bg-green-50 dark:bg-green-950 text-green-700 dark:text-green-300 border-l-4 border-green-400 dark:border-green-600";case"error":return"bg-red-50 dark:bg-red-950 text-red-700 dark:text-red-300 border-l-4 border-red-400 dark:border-red-600";case"warning":return"bg-yellow-50 dark:bg-yellow-950 text-yellow-700 dark:text-yellow-300 border-l-4 border-yellow-400 dark:border-yellow-600";case"info":return"bg-blue-50 dark:bg-blue-950 text-blue-700 dark:text-blue-300 border-l-4 border-blue-400 dark:border-blue-600";case"archived":return"bg-neutral-50 dark:bg-neutral-950 text-neutral-700 dark:text-neutral-300 border-l-4 border-neutral-400 dark:border-neutral-600";case"canceled":return"bg-gray-50 dark:bg-gray-950 text-gray-700 dark:text-gray-300 border-l-4 border-gray-400 dark:border-gray-600";case"queued":return"bg-blue-50 dark:bg-blue-950 text-blue-700 dark:text-blue-300 border-l-4 border-blue-400 dark:border-blue-600";case"paused":return"bg-orange-50 dark:bg-orange-950 text-orange-700 dark:text-orange-300 border-l-4 border-orange-400 dark:border-orange-600";case"awaiting_action":return"bg-orange-50 dark:bg-orange-950 text-orange-700 dark:text-orange-300 border-l-4 border-orange-400 dark:border-orange-600";case"skipped":return"bg-gray-50 dark:bg-gray-950 text-gray-700 dark:text-gray-300 border-l-4 border-gray-400 dark:border-gray-600";case"pending":return"bg-purple-50 dark:bg-purple-950 text-purple-700 dark:text-purple-300 border-l-4 border-purple-400 dark:border-purple-600";default:return"bg-blue-50 dark:bg-blue-950 text-blue-700 dark:text-blue-300 border-l-4 border-blue-400 dark:border-blue-600"}},m=()=>{if(i)return i;const g="w-5 h-5 flex-shrink-0";switch(e){case"success":return C.jsx("svg",{className:G(g,"text-green-600 dark:text-green-400"),fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.236 4.53L7.53 10.06a.75.75 0 00-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})});case"error":return C.jsx("svg",{className:G(g,"text-red-600 dark:text-red-400"),fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z",clipRule:"evenodd"})});case"warning":return C.jsx("svg",{className:G(g,"text-yellow-600 dark:text-yellow-400"),fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})});case"info":case"queued":case"pending":return C.jsx("svg",{className:G(g,"text-blue-600 dark:text-blue-400"),fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})});case"paused":return C.jsx("svg",{className:G(g,"text-orange-600 dark:text-orange-400"),fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{d:"M5.75 3a.75.75 0 00-.75.75v12.5c0 .414.336.75.75.75h1.5a.75.75 0 00.75-.75V3.75A.75.75 0 007.25 3h-1.5zM12.75 3a.75.75 0 00-.75.75v12.5c0 .414.336.75.75.75h1.5a.75.75 0 00.75-.75V3.75a.75.75 0 00-.75-.75h-1.5z"})});case"archived":case"canceled":case"skipped":return C.jsx("svg",{className:G(g,"text-gray-600 dark:text-gray-400"),fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z",clipRule:"evenodd"})});case"awaiting_action":return C.jsx("svg",{className:G(g,"text-orange-600 dark:text-orange-400"),fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm.75-13a.75.75 0 00-1.5 0v5c0 .414.336.75.75.75h4a.75.75 0 000-1.5h-3.25V5z",clipRule:"evenodd"})});default:return C.jsx("svg",{className:G(g,"text-blue-600 dark:text-blue-400"),fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})})}},h=()=>{(o||e==="error")&&(d(!u),s?.())},p=o||e==="error";return C.jsxs("div",{ref:c,className:G("w-full",a),children:[C.jsxs("div",{className:G("flex items-center justify-between p-4 rounded-lg font-medium text-sm transition-all duration-200",f(),p&&["cursor-pointer select-none","hover:shadow-md","active:scale-[0.99]"]),onClick:h,role:p?"button":void 0,tabIndex:p?0:void 0,onKeyDown:g=>{p&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),h())},"aria-label":l||`Banner: ${e}`,"aria-expanded":p?u:void 0,children:[C.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[m(),C.jsx("span",{className:"flex-1",children:t})]}),C.jsxs("div",{className:"flex items-center gap-2",children:[n&&C.jsx("div",{className:"flex items-center",children:n}),p&&C.jsx("div",{className:"flex items-center",children:C.jsx("svg",{className:G("w-5 h-5 transition-transform duration-200",u?"rotate-180":"rotate-0"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]})]}),C.jsx(Dt.AnimatePresence,{children:u&&r&&C.jsx(Dt.motion.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},className:"overflow-hidden",children:C.jsx("div",{className:"pt-2",children:C.jsx(r,{children:t})})})})]})});$E.displayName="Banner";var Nn=function(){return Nn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Nn.apply(this,arguments)},PE={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},AE={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Ad={width:"20px",height:"20px",position:"absolute",zIndex:1},QV={top:Nn(Nn({},PE),{top:"-5px"}),right:Nn(Nn({},AE),{left:void 0,right:"-5px"}),bottom:Nn(Nn({},PE),{top:void 0,bottom:"-5px"}),left:Nn(Nn({},AE),{left:"-5px"}),topRight:Nn(Nn({},Ad),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Nn(Nn({},Ad),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Nn(Nn({},Ad),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Nn(Nn({},Ad),{left:"-10px",top:"-10px",cursor:"nw-resize"})},ez=w.memo(function(e){var t=e.onResizeStart,n=e.direction,r=e.children,o=e.replaceStyles,i=e.className,a=w.useCallback(function(c){t(c,n)},[t,n]),s=w.useCallback(function(c){t(c,n)},[t,n]),l=w.useMemo(function(){return Nn(Nn({position:"absolute",userSelect:"none"},QV[n]),o??{})},[o,n]);return C.jsx("div",{className:i||void 0,style:l,onMouseDown:a,onTouchStart:s,children:r})}),tz=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),go=function(){return go=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},go.apply(this,arguments)},nz={width:"auto",height:"auto"},Td=function(e,t,n){return Math.max(Math.min(e,n),t)},TE=function(e,t,n){var r=Math.round(e/t);return r*t+n*(r-1)},Xa=function(e,t){return new RegExp(e,"i").test(t)},Md=function(e){return!!(e.touches&&e.touches.length)},rz=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},ME=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(i,a,s){return Math.abs(a-e)<Math.abs(t[i]-e)?s:i},0),o=Math.abs(t[r]-e);return n===0||o<n?t[r]:e},Lh=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},kd=function(e,t,n,r){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var o=Number(e.replace("%",""))/100;return t*o}if(e.endsWith("vw")){var o=Number(e.replace("vw",""))/100;return n*o}if(e.endsWith("vh")){var o=Number(e.replace("vh",""))/100;return r*o}}return e},oz=function(e,t,n,r,o,i,a){return r=kd(r,e.width,t,n),o=kd(o,e.height,t,n),i=kd(i,e.width,t,n),a=kd(a,e.height,t,n),{maxWidth:typeof r>"u"?void 0:Number(r),maxHeight:typeof o>"u"?void 0:Number(o),minWidth:typeof i>"u"?void 0:Number(i),minHeight:typeof a>"u"?void 0:Number(a)}},iz=function(e){return Array.isArray(e)?e:[e,e]},az=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],kE="__resizable_base__",sz=function(e){tz(t,e);function t(n){var r,o,i,a,s=e.call(this,n)||this;return s.ratio=1,s.resizable=null,s.parentLeft=0,s.parentTop=0,s.resizableLeft=0,s.resizableRight=0,s.resizableTop=0,s.resizableBottom=0,s.targetLeft=0,s.targetTop=0,s.delta={width:0,height:0},s.appendBase=function(){if(!s.resizable||!s.window)return null;var l=s.parentNode;if(!l)return null;var c=s.window.document.createElement("div");return c.style.width="100%",c.style.height="100%",c.style.position="absolute",c.style.transform="scale(0, 0)",c.style.left="0",c.style.flex="0 0 100%",c.classList?c.classList.add(kE):c.className+=kE,l.appendChild(c),c},s.removeBase=function(l){var c=s.parentNode;c&&c.removeChild(l)},s.state={isResizing:!1,width:(o=(r=s.propsSize)===null||r===void 0?void 0:r.width)!==null&&o!==void 0?o:"auto",height:(a=(i=s.propsSize)===null||i===void 0?void 0:i.height)!==null&&a!==void 0?a:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},s.onResizeStart=s.onResizeStart.bind(s),s.onMouseMove=s.onMouseMove.bind(s),s.onMouseUp=s.onMouseUp.bind(s),s}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||nz},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,i=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:o,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:i,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,o=function(s){var l;if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&(!((l=n.propsSize[s])===null||l===void 0)&&l.toString().endsWith("%"))){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var c=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),d=u/c[s]*100;return"".concat(d,"%")}return Lh(n.state[s])},i=r&&typeof r.width<"u"&&!this.state.isResizing?Lh(r.width):o("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Lh(r.height):o("height");return{width:i,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,o=this.parentNode.style.flexWrap;o!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var i={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=o),this.removeBase(n),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var o=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof o>"u"||o==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var o=this.props.boundsByDirection,i=this.state.direction,a=o&&Xa("left",i),s=o&&Xa("top",i),l,c;if(this.props.bounds==="parent"){var u=this.parentNode;u&&(l=a?this.resizableRight-this.parentLeft:u.offsetWidth+(this.parentLeft-this.resizableLeft),c=s?this.resizableBottom-this.parentTop:u.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,c=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),c=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n<l?n:l),c&&Number.isFinite(c)&&(r=r&&r<c?r:c),{maxWidth:n,maxHeight:r}},t.prototype.calculateNewSizeFromDirection=function(n,r){var o=this.props.scale||1,i=iz(this.props.resizeRatio||1),a=i[0],s=i[1],l=this.state,c=l.direction,u=l.original,d=this.props,f=d.lockAspectRatio,m=d.lockAspectRatioExtraHeight,h=d.lockAspectRatioExtraWidth,p=u.width,g=u.height,y=m||0,x=h||0;return Xa("right",c)&&(p=u.width+(n-u.x)*a/o,f&&(g=(p-x)/this.ratio+y)),Xa("left",c)&&(p=u.width-(n-u.x)*a/o,f&&(g=(p-x)/this.ratio+y)),Xa("bottom",c)&&(g=u.height+(r-u.y)*s/o,f&&(p=(g-y)*this.ratio+x)),Xa("top",c)&&(g=u.height-(r-u.y)*s/o,f&&(p=(g-y)*this.ratio+x)),{newWidth:p,newHeight:g}},t.prototype.calculateNewSizeFromAspectRatio=function(n,r,o,i){var a=this.props,s=a.lockAspectRatio,l=a.lockAspectRatioExtraHeight,c=a.lockAspectRatioExtraWidth,u=typeof i.width>"u"?10:i.width,d=typeof o.width>"u"||o.width<0?n:o.width,f=typeof i.height>"u"?10:i.height,m=typeof o.height>"u"||o.height<0?r:o.height,h=l||0,p=c||0;if(s){var g=(f-h)*this.ratio+p,y=(m-h)*this.ratio+p,x=(u-p)/this.ratio+h,I=(d-p)/this.ratio+h,S=Math.max(u,g),b=Math.min(d,y),E=Math.max(f,x),O=Math.min(m,I);n=Td(n,S,b),r=Td(r,E,O)}else n=Td(n,u,d),r=Td(r,f,m);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){var n=1/(this.props.scale||1);if(this.props.bounds==="parent"){var r=this.parentNode;if(r){var o=r.getBoundingClientRect();this.parentLeft=o.left*n,this.parentTop=o.top*n}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left*n,this.targetTop=i.top*n}if(this.resizable){var a=this.resizable.getBoundingClientRect(),s=a.left,l=a.top,c=a.right,u=a.bottom;this.resizableLeft=s*n,this.resizableRight=c*n,this.resizableTop=l*n,this.resizableBottom=u*n}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var o=0,i=0;if(n.nativeEvent&&rz(n.nativeEvent)?(o=n.nativeEvent.clientX,i=n.nativeEvent.clientY):n.nativeEvent&&Md(n.nativeEvent)&&(o=n.nativeEvent.touches[0].clientX,i=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var c=this.parentNode;if(c){var u=this.window.getComputedStyle(c).flexDirection;this.flexDir=u.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var d={original:{x:o,y:i,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:go(go({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(d)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Md(n))try{n.preventDefault(),n.stopPropagation()}catch{}var o=this.props,i=o.maxWidth,a=o.maxHeight,s=o.minWidth,l=o.minHeight,c=Md(n)?n.touches[0].clientX:n.clientX,u=Md(n)?n.touches[0].clientY:n.clientY,d=this.state,f=d.direction,m=d.original,h=d.width,p=d.height,g=this.getParentSize(),y=oz(g,this.window.innerWidth,this.window.innerHeight,i,a,s,l);i=y.maxWidth,a=y.maxHeight,s=y.minWidth,l=y.minHeight;var x=this.calculateNewSizeFromDirection(c,u),I=x.newHeight,S=x.newWidth,b=this.calculateNewMaxFromBoundary(i,a);this.props.snap&&this.props.snap.x&&(S=ME(S,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(I=ME(I,this.props.snap.y,this.props.snapGap));var E=this.calculateNewSizeFromAspectRatio(S,I,{width:b.maxWidth,height:b.maxHeight},{width:s,height:l});if(S=E.newWidth,I=E.newHeight,this.props.grid){var O=TE(S,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),N=TE(I,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),P=this.props.snapGap||0,A=P===0||Math.abs(O-S)<=P?O:S,k=P===0||Math.abs(N-I)<=P?N:I;S=A,I=k}var $={width:S-m.width,height:I-m.height};if(this.delta=$,h&&typeof h=="string"){if(h.endsWith("%")){var T=S/g.width*100;S="".concat(T,"%")}else if(h.endsWith("vw")){var M=S/this.window.innerWidth*100;S="".concat(M,"vw")}else if(h.endsWith("vh")){var j=S/this.window.innerHeight*100;S="".concat(j,"vh")}}if(p&&typeof p=="string"){if(p.endsWith("%")){var T=I/g.height*100;I="".concat(T,"%")}else if(p.endsWith("vw")){var M=I/this.window.innerWidth*100;I="".concat(M,"vw")}else if(p.endsWith("vh")){var j=I/this.window.innerHeight*100;I="".concat(j,"vh")}}var R={width:this.createSizeForCssProperty(S,"width"),height:this.createSizeForCssProperty(I,"height")};this.flexDir==="row"?R.flexBasis=R.width:this.flexDir==="column"&&(R.flexBasis=R.height);var _=this.state.width!==R.width,H=this.state.height!==R.height,z=this.state.flexBasis!==R.flexBasis,V=_||H||z;V&&cn.flushSync(function(){r.setState(R)}),this.props.onResize&&V&&this.props.onResize(n,f,this.resizable,$)}},t.prototype.onMouseUp=function(n){var r,o,i=this.state,a=i.isResizing,s=i.direction;i.original,!(!a||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(n,s,this.resizable,this.delta),this.props.size&&this.setState({width:(r=this.props.size.width)!==null&&r!==void 0?r:"auto",height:(o=this.props.size.height)!==null&&o!==void 0?o:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:go(go({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(n){var r,o;this.setState({width:(r=n.width)!==null&&r!==void 0?r:"auto",height:(o=n.height)!==null&&o!==void 0?o:"auto"})},t.prototype.renderResizer=function(){var n=this,r=this.props,o=r.enable,i=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,c=r.handleComponent;if(!o)return null;var u=Object.keys(o).map(function(d){return o[d]!==!1?C.jsx(ez,{direction:d,onResizeStart:n.onResizeStart,replaceStyles:i&&i[d],className:a&&a[d],children:c&&c[d]?c[d]:null},d):null});return C.jsx("div",{className:l,style:s,children:u})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return az.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),o=go(go(go({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return C.jsxs(i,go({style:o,className:this.props.className},r,{ref:function(a){a&&(n.resizable=a)},children:[this.state.isResizing&&C.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(w.PureComponent);const lz=()=>C.jsx("div",{className:"cursor-ew-resize flex items-center justify-center rounded-full bg-[#1018288F] bg-opacity-55 w-8 h-8 shadow-200 border-[1.5px] border-[#FFFFFF3D]",children:C.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[C.jsx("mask",{id:"mask0_36675_12",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:C.jsx("rect",{y:"20",width:"20",height:"20",transform:"rotate(-90 0 20)",fill:"#D9D9D9"})}),C.jsx("g",{mask:"url(#mask0_36675_12)",children:C.jsx("path",{d:"M15.9583 10L12.7292 6.77084C12.5625 6.60418 12.4792 6.40973 12.4792 6.18751C12.4792 5.96529 12.5625 5.77084 12.7292 5.60418C12.8958 5.43751 13.0938 5.35418 13.3229 5.35418C13.5521 5.35418 13.75 5.43751 13.9167 5.60418L17.1458 8.81251C17.4653 9.13195 17.625 9.52779 17.625 10C17.625 10.4722 17.4653 10.8681 17.1458 11.1875L13.9167 14.4167C13.75 14.5833 13.5521 14.6632 13.3229 14.6563C13.0938 14.6493 12.8958 14.5625 12.7292 14.3958C12.5625 14.2292 12.4792 14.0313 12.4792 13.8021C12.4792 13.5729 12.5625 13.375 12.7292 13.2083L15.9583 10ZM4.04167 10L7.25 13.2083C7.41667 13.375 7.49653 13.5695 7.48958 13.7917C7.48264 14.0139 7.40278 14.2083 7.25 14.375C7.08333 14.5417 6.88542 14.6285 6.65625 14.6354C6.42708 14.6424 6.22917 14.5625 6.0625 14.3958L2.85417 11.1875C2.53472 10.8681 2.375 10.4722 2.375 10C2.375 9.52779 2.53472 9.13195 2.85417 8.81251L6.0625 5.60418C6.22917 5.43751 6.42708 5.35765 6.65625 5.36459C6.88542 5.37154 7.08333 5.45834 7.25 5.62501C7.40278 5.79168 7.48264 5.98612 7.48958 6.20834C7.49653 6.43057 7.41667 6.62501 7.25 6.79168L4.04167 10Z",fill:"white"})})]})}),cz=(e,t)=>{const n=document.getElementById(e);n?t(n):requestAnimationFrame(()=>{const r=document.getElementById(e);r&&t(r)})},uz=(e,t)=>{if(e.current){if(t)localStorage.setItem("resizable-sidebar-width-before-fullscreen",String(e.current.size?.width));else{const n=localStorage.getItem("resizable-sidebar-width-before-fullscreen");if(n){e.current.updateSize({width:n,height:"100%"});return}}e.current.updateSize({width:t?"100vw":"",height:"100%"})}},dz=(e,t,n,r,o,i)=>{const[a,s]=w.useState(!1),[l,c]=w.useState(null);return w.useEffect(()=>{if(!e||typeof window>"u"){c(null);return}cz(e,c)},[e]),w.useEffect(()=>{uz(o,n)},[n]),w.useEffect(()=>{if(e&&t){const u=requestAnimationFrame(()=>{s(!0)});return()=>{cancelAnimationFrame(u),s(!1)}}e||s(!0),t||s(!1)},[t,e]),w.useEffect(()=>{o.current?.size?.width&&r&&r(o.current.size.width)},[o.current?.size?.width,r]),{shouldRenderSidebar:a,portalTarget:l}},fz=({isOpen:e,header:t,id:n,ref:r,className:o,containerClassName:i,widthStyle:a,heightStyle:s,motionVariants:l,resizableRef:c,fullScreen:u,maxResizableWidth:d,minWidth:f,handleKey:m,onDragEnd:h,onResize:p,children:g})=>C.jsx(Dt.AnimatePresence,{children:e&&C.jsx(Dt.motion.div,{ref:r,id:n,initial:l.initial,animate:l.animate,exit:l.exit,transition:{type:"tween",duration:.3},className:G("flex-shrink-0 z-50 relative bg-white border-neutral-200 dark:bg-black-800 dark:border-black-700",u?"fixed w-full transition translate-x-4 duration-300":"sticky",o),style:{width:a,height:s},children:C.jsx(sz,{onResize:y=>{y.stopPropagation();const x=c.current?.size?.width;p&&p(x||f)},onResizeStart:y=>{y.stopPropagation()},ref:c,maxWidth:u?d:d*.75,minWidth:f,minHeight:s,maxHeight:s,enable:u?{}:{[m]:!0},handleClasses:{[m]:G("relative w-6 -left-1 flex items-center justify-center bg-transparent transition-colors cursor-ew-resize group z-[9999] hover:bg-neutral-200 dark:hover:bg-neutral-700")},handleComponent:{[m]:C.jsx("div",{className:G("absolute -left-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center w-8 h-12 cursor-ew-resize opacity-0 group-hover:opacity-100 hover:opacity-100 active:opacity-100 transition-opacity z-[9999]",m==="left"&&"-right-2.5 -left-auto"),children:C.jsx(lz,{})})},className:"!h-full",onResizeStop:h||void 0,children:C.jsxs("div",{className:G("h-full w-full flex flex-col overflow-hidden @container/sidebar border-b border-neutral-200 dark:border-black-700 bg-white dark:bg-black-800 dark:border",i),children:[t?C.jsx("div",{className:"py-4 px-6",children:t||null}):null,C.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:g})]})})})}),jE=w.forwardRef(({isOpen:e,children:t,fullScreen:n=!1,defaultSize:r=void 0,minWidth:o=400,onDragEnd:i=null,onResize:a,className:s,placement:l="right",parentContainer:c,header:u,id:d,containerClassName:f,ignoreParentContainerHeight:m=!1,height:h,isMainSidebarExpanded:p=!1,mainSidebarExpandedWidth:g=280,mainSidebarCollapsedWidth:y=80,navbarHeight:x=64},I)=>{const S=p?g:y,b=w.useRef(null),{shouldRenderSidebar:E,portalTarget:O}=dz(c,e,n,a,b),N=typeof window<"u"?window.innerWidth-S:0,P=r,A=l==="right",k=h||(c&&!m?"100%":`calc(100vh - ${x}px)`),$={initial:{x:A?"100%":"-100%"},animate:{x:0},exit:{x:A?"100%":"-100%"}},T=A?"left":"right",M=C.jsx(fz,{isOpen:e,header:u,id:d,ref:I,className:s,containerClassName:f,widthStyle:P,heightStyle:k,motionVariants:$,resizableRef:b,fullScreen:n,maxResizableWidth:N,minWidth:o,handleKey:T,onDragEnd:i,onResize:a,children:t});return c?!E||!O?null:cn.createPortal(M,O):E?M:null});jE.displayName="ResizableSidebar";const RE=w.forwardRef(({pdfUrl:e,width:t="100%",height:n="100vh",className:r,iframeClassName:o,title:i="PDF Viewer",showLoading:a=!0,loadingComponent:s,errorComponent:l,onError:c,onLoad:u,allowFullScreen:d=!0,"aria-label":f},m)=>{const[h,p]=w.useState(!0),[g,y]=w.useState(!1),x=()=>{p(!1),y(!1),u?.()},I=()=>{p(!1),y(!0),c?.()},S=C.jsx("div",{className:"flex items-center justify-center h-full bg-neutral-50 dark:bg-neutral-900",children:C.jsxs("div",{className:"text-center",children:[C.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto mb-4"}),C.jsx("p",{className:"text-neutral-600 dark:text-neutral-400 text-sm",children:"Loading PDF..."})]})}),b=C.jsx("div",{className:"flex items-center justify-center h-full bg-neutral-50 dark:bg-neutral-900",children:C.jsxs("div",{className:"text-center p-6",children:[C.jsx("svg",{className:"mx-auto h-12 w-12 text-red-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.998-.833-2.768 0L3.046 16.5c-.77.833.192 2.5 1.732 2.5z"})}),C.jsx("h3",{className:"text-lg font-medium text-neutral-900 dark:text-neutral-100 mb-2",children:"Failed to load PDF"}),C.jsx("p",{className:"text-neutral-600 dark:text-neutral-400 text-sm mb-4",children:"The PDF document could not be displayed. Please check the URL or try again later."}),C.jsx("button",{onClick:()=>{y(!1),p(!0);const O=document.querySelector(`iframe[src="${e}"]`);O&&(O.src=O.src)},className:"bg-blue-600 text-white px-4 py-2 rounded-md text-sm hover:bg-blue-700 transition-colors",children:"Retry"})]})});return!e||!(O=>{try{return new URL(O,window.location.href).pathname.toLowerCase().endsWith(".pdf")||O.includes("pdf")}catch{return!1}})(e)?C.jsx("div",{ref:m,className:G("relative overflow-hidden",r),style:{width:t,height:n},children:l||b}):C.jsxs("div",{ref:m,className:G("relative overflow-hidden",r),style:{width:t,height:n},"aria-label":f||`PDF Viewer: ${i}`,children:[h&&a&&C.jsx("div",{className:"absolute inset-0 z-10",children:s||S}),g&&C.jsx("div",{className:"absolute inset-0 z-10",children:l||b}),!g&&C.jsx("iframe",{src:e,title:i,className:G("w-full h-full border-none",h&&"opacity-0",o),onLoad:x,onError:I,allowFullScreen:d,loading:"lazy",sandbox:"allow-same-origin allow-scripts allow-forms","aria-label":f||`PDF document: ${i}`}),C.jsx("div",{className:"sr-only",children:"PDF document viewer. Use your browser's PDF controls to navigate, zoom, or download the document."})]})});RE.displayName="PdfViewer";const DE=({ref:e,handler:t,enabled:n=!0})=>{w.useEffect(()=>{if(!n)return;const r=o=>{e.current&&!e.current.contains(o.target)&&t()};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t,n])},FE=w.forwardRef(({children:e,component:t,placement:n="bottom",isOpen:r,toggleMenu:o,parentContainer:i,noSpacing:a=!1,triggerClassName:s,containerClassName:l,className:c,showArrow:u=!1,offset:d=8,disableOutsideClick:f=!1,"aria-label":m,disabled:h=!1},p)=>{const g=w.useRef(null),y=w.useRef(null);DE({ref:y,handler:()=>{!f&&r&&o?.()},enabled:r&&!f}),w.useEffect(()=>{if(!r||!g.current||!y.current)return;const E=g.current,O=y.current,N=E.getBoundingClientRect(),P=O.getBoundingClientRect(),A={width:window.innerWidth,height:window.innerHeight};let k=0,$=0;switch(n){case"top":k=N.top-P.height-d,$=N.left+(N.width-P.width)/2;break;case"top-start":k=N.top-P.height-d,$=N.left;break;case"top-end":k=N.top-P.height-d,$=N.right-P.width;break;case"bottom":k=N.bottom+d,$=N.left+(N.width-P.width)/2;break;case"bottom-start":k=N.bottom+d,$=N.left;break;case"bottom-end":k=N.bottom+d,$=N.right-P.width;break;case"left":k=N.top+(N.height-P.height)/2,$=N.left-P.width-d;break;case"left-start":k=N.top,$=N.left-P.width-d;break;case"left-end":k=N.bottom-P.height,$=N.left-P.width-d;break;case"right":k=N.top+(N.height-P.height)/2,$=N.right+d;break;case"right-start":k=N.top,$=N.right+d;break;case"right-end":k=N.bottom-P.height,$=N.right+d;break}$<0&&($=8),$+P.width>A.width&&($=A.width-P.width-8),k<0&&(k=8),k+P.height>A.height&&(k=A.height-P.height-8),O.style.top=`${k}px`,O.style.left=`${$}px`},[r,n,d]);const x=E=>{h||o?.(E)},I=E=>{E.key==="Escape"&&r&&o?.()},S=()=>{const E="absolute w-2 h-2 bg-white dark:bg-neutral-800 transform rotate-45 border";switch(n){case"top":case"top-start":case"top-end":return G(E,"bottom-[-4px] border-t-0 border-l-0");case"bottom":case"bottom-start":case"bottom-end":return G(E,"top-[-4px] border-b-0 border-r-0");case"left":case"left-start":case"left-end":return G(E,"right-[-4px] border-l-0 border-b-0");case"right":case"right-start":case"right-end":return G(E,"left-[-4px] border-r-0 border-t-0");default:return G(E,"top-[-4px] border-b-0 border-r-0")}},b=()=>{switch(n){case"top":case"bottom":return{left:"50%",transform:"translateX(-50%)"};case"top-start":case"bottom-start":return{left:"12px"};case"top-end":case"bottom-end":return{right:"12px"};case"left":case"right":return{top:"50%",transform:"translateY(-50%)"};case"left-start":case"right-start":return{top:"12px"};case"left-end":case"right-end":return{bottom:"12px"};default:return{left:"50%",transform:"translateX(-50%)"}}};return C.jsxs("div",{ref:p,className:G("relative inline-block",c),children:[C.jsx("button",{ref:g,onClick:x,onKeyDown:I,className:G("flex items-center justify-center outline-none focus:outline-none transition-colors",!a&&"p-2",h&&"opacity-50 cursor-not-allowed",s),"aria-label":m,"aria-expanded":r,"aria-haspopup":"true",disabled:h,type:"button",children:e}),r&&cn.createPortal(C.jsx(Dt.AnimatePresence,{children:C.jsxs(Dt.motion.div,{ref:y,initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},className:G("fixed z-[9999] bg-white dark:bg-neutral-800 rounded-lg shadow-lg border border-neutral-200 dark:border-neutral-700","focus:outline-none",l),style:{minWidth:"120px"},role:"menu","aria-orientation":"vertical",tabIndex:-1,children:[u&&C.jsx("div",{className:S(),style:b()}),C.jsx("div",{className:"relative",children:t})]})}),document.getElementById(i)||document.body)]})});FE.displayName="Popper";var LE=function(t){return t.reduce(function(n,r){var o=r[0],i=r[1];return n[o]=i,n},{})},BE=typeof window<"u"&&window.document&&window.document.createElement?v.useLayoutEffect:v.useEffect,tr="top",jr="bottom",Rr="right",nr="left",Bh="auto",Cl=[tr,jr,Rr,nr],Ya="start",wl="end",pz="clippingParents",_E="viewport",Sl="popper",mz="reference",VE=Cl.reduce(function(e,t){return e.concat([t+"-"+Ya,t+"-"+wl])},[]),zE=[].concat(Cl,[Bh]).reduce(function(e,t){return e.concat([t,t+"-"+Ya,t+"-"+wl])},[]),gz="beforeRead",hz="read",vz="afterRead",bz="beforeMain",yz="main",xz="afterMain",Cz="beforeWrite",wz="write",Sz="afterWrite",Ez=[gz,hz,vz,bz,yz,xz,Cz,wz,Sz];function ho(e){return e?(e.nodeName||"").toLowerCase():null}function hr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Xi(e){var t=hr(e).Element;return e instanceof t||e instanceof Element}function Dr(e){var t=hr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function _h(e){if(typeof ShadowRoot>"u")return!1;var t=hr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Iz(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!Dr(i)||!ho(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function Oz(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!Dr(o)||!ho(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const Nz={name:"applyStyles",enabled:!0,phase:"write",fn:Iz,effect:Oz,requires:["computeStyles"]};function vo(e){return e.split("-")[0]}var Yi=Math.max,jd=Math.min,Ja=Math.round;function Vh(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function HE(){return!/^((?!chrome|android).)*safari/i.test(Vh())}function Za(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Dr(e)&&(o=e.offsetWidth>0&&Ja(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Ja(r.height)/e.offsetHeight||1);var a=Xi(e)?hr(e):window,s=a.visualViewport,l=!HE()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/o,u=(r.top+(l&&s?s.offsetTop:0))/i,d=r.width/o,f=r.height/i;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function zh(e){var t=Za(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function GE(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&_h(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Bo(e){return hr(e).getComputedStyle(e)}function $z(e){return["table","td","th"].indexOf(ho(e))>=0}function Ei(e){return((Xi(e)?e.ownerDocument:e.document)||window.document).documentElement}function Rd(e){return ho(e)==="html"?e:e.assignedSlot||e.parentNode||(_h(e)?e.host:null)||Ei(e)}function WE(e){return!Dr(e)||Bo(e).position==="fixed"?null:e.offsetParent}function Pz(e){var t=/firefox/i.test(Vh()),n=/Trident/i.test(Vh());if(n&&Dr(e)){var r=Bo(e);if(r.position==="fixed")return null}var o=Rd(e);for(_h(o)&&(o=o.host);Dr(o)&&["html","body"].indexOf(ho(o))<0;){var i=Bo(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function El(e){for(var t=hr(e),n=WE(e);n&&$z(n)&&Bo(n).position==="static";)n=WE(n);return n&&(ho(n)==="html"||ho(n)==="body"&&Bo(n).position==="static")?t:n||Pz(e)||t}function Hh(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Il(e,t,n){return Yi(e,jd(t,n))}function Az(e,t,n){var r=Il(e,t,n);return r>n?n:r}function UE(){return{top:0,right:0,bottom:0,left:0}}function XE(e){return Object.assign({},UE(),e)}function YE(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Tz=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,XE(typeof t!="number"?t:YE(t,Cl))};function Mz(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=vo(n.placement),l=Hh(s),c=[nr,Rr].indexOf(s)>=0,u=c?"height":"width";if(!(!i||!a)){var d=Tz(o.padding,n),f=zh(i),m=l==="y"?tr:nr,h=l==="y"?jr:Rr,p=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],g=a[l]-n.rects.reference[l],y=El(i),x=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,I=p/2-g/2,S=d[m],b=x-f[u]-d[h],E=x/2-f[u]/2+I,O=Il(S,E,b),N=l;n.modifiersData[r]=(t={},t[N]=O,t.centerOffset=O-E,t)}}function kz(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||GE(t.elements.popper,o)&&(t.elements.arrow=o))}const jz={name:"arrow",enabled:!0,phase:"main",fn:Mz,effect:kz,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function qa(e){return e.split("-")[1]}var Rz={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Dz(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Ja(n*o)/o||0,y:Ja(r*o)/o||0}}function JE(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,m=f===void 0?0:f,h=a.y,p=h===void 0?0:h,g=typeof u=="function"?u({x:m,y:p}):{x:m,y:p};m=g.x,p=g.y;var y=a.hasOwnProperty("x"),x=a.hasOwnProperty("y"),I=nr,S=tr,b=window;if(c){var E=El(n),O="clientHeight",N="clientWidth";if(E===hr(n)&&(E=Ei(n),Bo(E).position!=="static"&&s==="absolute"&&(O="scrollHeight",N="scrollWidth")),E=E,o===tr||(o===nr||o===Rr)&&i===wl){S=jr;var P=d&&E===b&&b.visualViewport?b.visualViewport.height:E[O];p-=P-r.height,p*=l?1:-1}if(o===nr||(o===tr||o===jr)&&i===wl){I=Rr;var A=d&&E===b&&b.visualViewport?b.visualViewport.width:E[N];m-=A-r.width,m*=l?1:-1}}var k=Object.assign({position:s},c&&Rz),$=u===!0?Dz({x:m,y:p},hr(n)):{x:m,y:p};if(m=$.x,p=$.y,l){var T;return Object.assign({},k,(T={},T[S]=x?"0":"",T[I]=y?"0":"",T.transform=(b.devicePixelRatio||1)<=1?"translate("+m+"px, "+p+"px)":"translate3d("+m+"px, "+p+"px, 0)",T))}return Object.assign({},k,(t={},t[S]=x?p+"px":"",t[I]=y?m+"px":"",t.transform="",t))}function Fz(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:vo(t.placement),variation:qa(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,JE(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,JE(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Lz={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Fz,data:{}};var Dd={passive:!0};function Bz(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,l=hr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,Dd)}),s&&l.addEventListener("resize",n.update,Dd),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Dd)}),s&&l.removeEventListener("resize",n.update,Dd)}}const _z={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Bz,data:{}};var Vz={left:"right",right:"left",bottom:"top",top:"bottom"};function Fd(e){return e.replace(/left|right|bottom|top/g,function(t){return Vz[t]})}var zz={start:"end",end:"start"};function ZE(e){return e.replace(/start|end/g,function(t){return zz[t]})}function Gh(e){var t=hr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Wh(e){return Za(Ei(e)).left+Gh(e).scrollLeft}function Hz(e,t){var n=hr(e),r=Ei(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=HE();(c||!c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+Wh(e),y:l}}function Gz(e){var t,n=Ei(e),r=Gh(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=Yi(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Yi(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Wh(e),l=-r.scrollTop;return Bo(o||n).direction==="rtl"&&(s+=Yi(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function Uh(e){var t=Bo(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function qE(e){return["html","body","#document"].indexOf(ho(e))>=0?e.ownerDocument.body:Dr(e)&&Uh(e)?e:qE(Rd(e))}function Ol(e,t){var n;t===void 0&&(t=[]);var r=qE(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=hr(r),a=o?[i].concat(i.visualViewport||[],Uh(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(Ol(Rd(a)))}function Xh(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Wz(e,t){var n=Za(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function KE(e,t,n){return t===_E?Xh(Hz(e,n)):Xi(t)?Wz(t,n):Xh(Gz(Ei(e)))}function Uz(e){var t=Ol(Rd(e)),n=["absolute","fixed"].indexOf(Bo(e).position)>=0,r=n&&Dr(e)?El(e):e;return Xi(r)?t.filter(function(o){return Xi(o)&&GE(o,r)&&ho(o)!=="body"}):[]}function Xz(e,t,n,r){var o=t==="clippingParents"?Uz(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(l,c){var u=KE(e,c,r);return l.top=Yi(u.top,l.top),l.right=jd(u.right,l.right),l.bottom=jd(u.bottom,l.bottom),l.left=Yi(u.left,l.left),l},KE(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function QE(e){var t=e.reference,n=e.element,r=e.placement,o=r?vo(r):null,i=r?qa(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case tr:l={x:a,y:t.y-n.height};break;case jr:l={x:a,y:t.y+t.height};break;case Rr:l={x:t.x+t.width,y:s};break;case nr:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=o?Hh(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case Ya:l[c]=l[c]-(t[u]/2-n[u]/2);break;case wl:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Nl(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,s=n.boundary,l=s===void 0?pz:s,c=n.rootBoundary,u=c===void 0?_E:c,d=n.elementContext,f=d===void 0?Sl:d,m=n.altBoundary,h=m===void 0?!1:m,p=n.padding,g=p===void 0?0:p,y=XE(typeof g!="number"?g:YE(g,Cl)),x=f===Sl?mz:Sl,I=e.rects.popper,S=e.elements[h?x:f],b=Xz(Xi(S)?S:S.contextElement||Ei(e.elements.popper),l,u,a),E=Za(e.elements.reference),O=QE({reference:E,element:I,placement:o}),N=Xh(Object.assign({},I,O)),P=f===Sl?N:E,A={top:b.top-P.top+y.top,bottom:P.bottom-b.bottom+y.bottom,left:b.left-P.left+y.left,right:P.right-b.right+y.right},k=e.modifiersData.offset;if(f===Sl&&k){var $=k[o];Object.keys(A).forEach(function(T){var M=[Rr,jr].indexOf(T)>=0?1:-1,j=[tr,jr].indexOf(T)>=0?"y":"x";A[T]+=$[j]*M})}return A}function Yz(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?zE:l,u=qa(r),d=u?s?VE:VE.filter(function(h){return qa(h)===u}):Cl,f=d.filter(function(h){return c.indexOf(h)>=0});f.length===0&&(f=d);var m=f.reduce(function(h,p){return h[p]=Nl(e,{placement:p,boundary:o,rootBoundary:i,padding:a})[vo(p)],h},{});return Object.keys(m).sort(function(h,p){return m[h]-m[p]})}function Jz(e){if(vo(e)===Bh)return[];var t=Fd(e);return[ZE(e),t,ZE(t)]}function Zz(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,m=n.flipVariations,h=m===void 0?!0:m,p=n.allowedAutoPlacements,g=t.options.placement,y=vo(g),x=y===g,I=l||(x||!h?[Fd(g)]:Jz(g)),S=[g].concat(I).reduce(function(U,K){return U.concat(vo(K)===Bh?Yz(t,{placement:K,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:p}):K)},[]),b=t.rects.reference,E=t.rects.popper,O=new Map,N=!0,P=S[0],A=0;A<S.length;A++){var k=S[A],$=vo(k),T=qa(k)===Ya,M=[tr,jr].indexOf($)>=0,j=M?"width":"height",R=Nl(t,{placement:k,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),_=M?T?Rr:nr:T?jr:tr;b[j]>E[j]&&(_=Fd(_));var H=Fd(_),z=[];if(i&&z.push(R[$]<=0),s&&z.push(R[_]<=0,R[H]<=0),z.every(function(U){return U})){P=k,N=!1;break}O.set(k,z)}if(N)for(var V=h?3:1,D=function(K){var q=S.find(function(Y){var Q=O.get(Y);if(Q)return Q.slice(0,K).every(function(Z){return Z})});if(q)return P=q,"break"},L=V;L>0;L--){var F=D(L);if(F==="break")break}t.placement!==P&&(t.modifiersData[r]._skip=!0,t.placement=P,t.reset=!0)}}const qz={name:"flip",enabled:!0,phase:"main",fn:Zz,requiresIfExists:["offset"],data:{_skip:!1}};function eI(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function tI(e){return[tr,Rr,jr,nr].some(function(t){return e[t]>=0})}function Kz(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Nl(t,{elementContext:"reference"}),s=Nl(t,{altBoundary:!0}),l=eI(a,r),c=eI(s,o,i),u=tI(l),d=tI(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const Qz={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Kz};function eH(e,t,n){var r=vo(e),o=[nr,tr].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[nr,Rr].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function tH(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=zE.reduce(function(u,d){return u[d]=eH(d,t.rects,i),u},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const nH={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:tH};function rH(e){var t=e.state,n=e.name;t.modifiersData[n]=QE({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const oH={name:"popperOffsets",enabled:!0,phase:"read",fn:rH,data:{}};function iH(e){return e==="x"?"y":"x"}function aH(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,m=f===void 0?!0:f,h=n.tetherOffset,p=h===void 0?0:h,g=Nl(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=vo(t.placement),x=qa(t.placement),I=!x,S=Hh(y),b=iH(S),E=t.modifiersData.popperOffsets,O=t.rects.reference,N=t.rects.popper,P=typeof p=="function"?p(Object.assign({},t.rects,{placement:t.placement})):p,A=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,$={x:0,y:0};if(E){if(i){var T,M=S==="y"?tr:nr,j=S==="y"?jr:Rr,R=S==="y"?"height":"width",_=E[S],H=_+g[M],z=_-g[j],V=m?-N[R]/2:0,D=x===Ya?O[R]:N[R],L=x===Ya?-N[R]:-O[R],F=t.elements.arrow,U=m&&F?zh(F):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:UE(),q=K[M],Y=K[j],Q=Il(0,O[R],U[R]),Z=I?O[R]/2-V-Q-q-A.mainAxis:D-Q-q-A.mainAxis,re=I?-O[R]/2+V+Q+Y+A.mainAxis:L+Q+Y+A.mainAxis,ae=t.elements.arrow&&El(t.elements.arrow),W=ae?S==="y"?ae.clientTop||0:ae.clientLeft||0:0,se=(T=k?.[S])!=null?T:0,te=_+Z-se-W,oe=_+re-se,ce=Il(m?jd(H,te):H,_,m?Yi(z,oe):z);E[S]=ce,$[S]=ce-_}if(s){var Ne,he=S==="x"?tr:nr,Ee=S==="x"?jr:Rr,Ae=E[b],fe=b==="y"?"height":"width",ge=Ae+g[he],Pe=Ae-g[Ee],be=[tr,nr].indexOf(y)!==-1,Qe=(Ne=k?.[b])!=null?Ne:0,Xe=be?ge:Ae-O[fe]-N[fe]-Qe+A.altAxis,Ze=be?Ae+O[fe]+N[fe]-Qe-A.altAxis:Pe,De=m&&be?Az(Xe,Ae,Ze):Il(m?Xe:ge,Ae,m?Ze:Pe);E[b]=De,$[b]=De-Ae}t.modifiersData[r]=$}}const sH={name:"preventOverflow",enabled:!0,phase:"main",fn:aH,requiresIfExists:["offset"]};function lH(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function cH(e){return e===hr(e)||!Dr(e)?Gh(e):lH(e)}function uH(e){var t=e.getBoundingClientRect(),n=Ja(t.width)/e.offsetWidth||1,r=Ja(t.height)/e.offsetHeight||1;return n!==1||r!==1}function dH(e,t,n){n===void 0&&(n=!1);var r=Dr(t),o=Dr(t)&&uH(t),i=Ei(t),a=Za(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((ho(t)!=="body"||Uh(i))&&(s=cH(t)),Dr(t)?(l=Za(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Wh(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function fH(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function pH(e){var t=fH(e);return Ez.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function mH(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function gH(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var nI={placement:"bottom",modifiers:[],strategy:"absolute"};function rI(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function hH(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,i=o===void 0?nI:o;return function(s,l,c){c===void 0&&(c=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},nI,i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],f=!1,m={state:u,setOptions:function(y){var x=typeof y=="function"?y(u.options):y;p(),u.options=Object.assign({},i,u.options,x),u.scrollParents={reference:Xi(s)?Ol(s):s.contextElement?Ol(s.contextElement):[],popper:Ol(l)};var I=pH(gH([].concat(r,u.options.modifiers)));return u.orderedModifiers=I.filter(function(S){return S.enabled}),h(),m.update()},forceUpdate:function(){if(!f){var y=u.elements,x=y.reference,I=y.popper;if(rI(x,I)){u.rects={reference:dH(x,El(I),u.options.strategy==="fixed"),popper:zh(I)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(A){return u.modifiersData[A.name]=Object.assign({},A.data)});for(var S=0;S<u.orderedModifiers.length;S++){if(u.reset===!0){u.reset=!1,S=-1;continue}var b=u.orderedModifiers[S],E=b.fn,O=b.options,N=O===void 0?{}:O,P=b.name;typeof E=="function"&&(u=E({state:u,options:N,name:P,instance:m})||u)}}}},update:mH(function(){return new Promise(function(g){m.forceUpdate(),g(u)})}),destroy:function(){p(),f=!0}};if(!rI(s,l))return m;m.setOptions(c).then(function(g){!f&&c.onFirstUpdate&&c.onFirstUpdate(g)});function h(){u.orderedModifiers.forEach(function(g){var y=g.name,x=g.options,I=x===void 0?{}:x,S=g.effect;if(typeof S=="function"){var b=S({state:u,name:y,instance:m,options:I}),E=function(){};d.push(b||E)}})}function p(){d.forEach(function(g){return g()}),d=[]}return m}}var vH=[_z,oH,Lz,Nz,nH,qz,sH,jz,Qz],bH=hH({defaultModifiers:vH}),Yh,oI;function yH(){if(oI)return Yh;oI=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(i,a){if(i===a)return!0;if(i&&a&&typeof i=="object"&&typeof a=="object"){if(i.constructor!==a.constructor)return!1;var s,l,c;if(Array.isArray(i)){if(s=i.length,s!=a.length)return!1;for(l=s;l--!==0;)if(!o(i[l],a[l]))return!1;return!0}var u;if(t&&i instanceof Map&&a instanceof Map){if(i.size!==a.size)return!1;for(u=i.entries();!(l=u.next()).done;)if(!a.has(l.value[0]))return!1;for(u=i.entries();!(l=u.next()).done;)if(!o(l.value[1],a.get(l.value[0])))return!1;return!0}if(n&&i instanceof Set&&a instanceof Set){if(i.size!==a.size)return!1;for(u=i.entries();!(l=u.next()).done;)if(!a.has(l.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(a)){if(s=i.length,s!=a.length)return!1;for(l=s;l--!==0;)if(i[l]!==a[l])return!1;return!0}if(i.constructor===RegExp)return i.source===a.source&&i.flags===a.flags;if(i.valueOf!==Object.prototype.valueOf&&typeof i.valueOf=="function"&&typeof a.valueOf=="function")return i.valueOf()===a.valueOf();if(i.toString!==Object.prototype.toString&&typeof i.toString=="function"&&typeof a.toString=="function")return i.toString()===a.toString();if(c=Object.keys(i),s=c.length,s!==Object.keys(a).length)return!1;for(l=s;l--!==0;)if(!Object.prototype.hasOwnProperty.call(a,c[l]))return!1;if(e&&i instanceof Element)return!1;for(l=s;l--!==0;)if(!((c[l]==="_owner"||c[l]==="__v"||c[l]==="__o")&&i.$$typeof)&&!o(i[c[l]],a[c[l]]))return!1;return!0}return i!==i&&a!==a}return Yh=function(a,s){try{return o(a,s)}catch(l){if((l.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw l}},Yh}var xH=yH();const CH=ps(xH);var wH=[],SH=function(t,n,r){r===void 0&&(r={});var o=v.useRef(null),i={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||wH},a=v.useState({styles:{popper:{position:i.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=a[0],l=a[1],c=v.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(m){var h=m.state,p=Object.keys(h.elements);Lf.flushSync(function(){l({styles:LE(p.map(function(g){return[g,h.styles[g]||{}]})),attributes:LE(p.map(function(g){return[g,h.attributes[g]]}))})})},requires:["computeStyles"]}},[]),u=v.useMemo(function(){var f={onFirstUpdate:i.onFirstUpdate,placement:i.placement,strategy:i.strategy,modifiers:[].concat(i.modifiers,[c,{name:"applyStyles",enabled:!1}])};return CH(o.current,f)?o.current||f:(o.current=f,f)},[i.onFirstUpdate,i.placement,i.strategy,i.modifiers,c]),d=v.useRef();return BE(function(){d.current&&d.current.setOptions(u)},[u]),BE(function(){if(!(t==null||n==null)){var f=r.createPopper||bH,m=f(t,n,u);return d.current=m,function(){m.destroy(),d.current=null}}},[t,n,r.createPopper]),{state:d.current?d.current.state:null,styles:s.styles,attributes:s.attributes,update:d.current?d.current.update:null,forceUpdate:d.current?d.current.forceUpdate:null}};function iI(e){var t=v.useRef(e);return t.current=e,v.useCallback(function(){return t.current},[])}var EH=function(){};function IH(e){var t=e.initial,n=e.value,r=e.onChange,o=r===void 0?EH:r;if(t===void 0&&n===void 0)throw new TypeError('Either "value" or "initial" variable must be set. Now both are undefined');var i=v.useState(t),a=i[0],s=i[1],l=iI(a),c=v.useCallback(function(d){var f=l(),m=typeof d=="function"?d(f):d;typeof m.persist=="function"&&m.persist(),s(m),typeof o=="function"&&o(m)},[l,o]),u=n!==void 0;return[u?n:a,u?o:c]}function aI(e,t){return e===void 0&&(e=0),t===void 0&&(t=0),function(){return{width:0,height:0,top:t,right:e,bottom:t,left:e,x:0,y:0,toJSON:function(){return null}}}}var OH=["styles","attributes"],sI={getBoundingClientRect:aI()},lI={closeOnOutsideClick:!0,closeOnTriggerHidden:!1,defaultVisible:!1,delayHide:0,delayShow:0,followCursor:!1,interactive:!1,mutationObserverOptions:{attributes:!0,childList:!0,subtree:!0},offset:[0,6],trigger:"hover"};function cI(e,t){var n,r,o;e===void 0&&(e={}),t===void 0&&(t={});var i=Object.keys(lI).reduce(function(j,R){var _;return de({},j,(_={},_[R]=j[R]!==void 0?j[R]:lI[R],_))},e),a=v.useMemo(function(){return[{name:"offset",options:{offset:i.offset}}]},Array.isArray(i.offset)?i.offset:[]),s=de({},t,{placement:t.placement||i.placement,modifiers:t.modifiers||a}),l=v.useState(null),c=l[0],u=l[1],d=v.useState(null),f=d[0],m=d[1],h=IH({initial:i.defaultVisible,value:i.visible,onChange:i.onVisibleChange}),p=h[0],g=h[1],y=v.useRef();v.useEffect(function(){return function(){return clearTimeout(y.current)}},[]);var x=SH(i.followCursor?sI:c,f,s),I=x.styles,S=x.attributes,b=zv(x,OH),E=b.update,O=iI({visible:p,triggerRef:c,tooltipRef:f,finalConfig:i}),N=v.useCallback(function(j){return Array.isArray(i.trigger)?i.trigger.includes(j):i.trigger===j},Array.isArray(i.trigger)?i.trigger:[i.trigger]),P=v.useCallback(function(){clearTimeout(y.current),y.current=window.setTimeout(function(){return g(!1)},i.delayHide)},[i.delayHide,g]),A=v.useCallback(function(){clearTimeout(y.current),y.current=window.setTimeout(function(){return g(!0)},i.delayShow)},[i.delayShow,g]),k=v.useCallback(function(){O().visible?P():A()},[O,P,A]);v.useEffect(function(){if(O().finalConfig.closeOnOutsideClick){var j=function(_){var H,z=O(),V=z.tooltipRef,D=z.triggerRef,L=(_.composedPath==null||(H=_.composedPath())==null?void 0:H[0])||_.target;L instanceof Node&&V!=null&&D!=null&&!V.contains(L)&&!D.contains(L)&&P()};return document.addEventListener("mousedown",j),function(){return document.removeEventListener("mousedown",j)}}},[O,P]),v.useEffect(function(){if(!(c==null||!N("click")))return c.addEventListener("click",k),function(){return c.removeEventListener("click",k)}},[c,N,k]),v.useEffect(function(){if(!(c==null||!N("double-click")))return c.addEventListener("dblclick",k),function(){return c.removeEventListener("dblclick",k)}},[c,N,k]),v.useEffect(function(){if(!(c==null||!N("right-click"))){var j=function(_){_.preventDefault(),k()};return c.addEventListener("contextmenu",j),function(){return c.removeEventListener("contextmenu",j)}}},[c,N,k]),v.useEffect(function(){if(!(c==null||!N("focus")))return c.addEventListener("focus",A),c.addEventListener("blur",P),function(){c.removeEventListener("focus",A),c.removeEventListener("blur",P)}},[c,N,A,P]),v.useEffect(function(){if(!(c==null||!N("hover")))return c.addEventListener("mouseenter",A),c.addEventListener("mouseleave",P),function(){c.removeEventListener("mouseenter",A),c.removeEventListener("mouseleave",P)}},[c,N,A,P]),v.useEffect(function(){if(!(f==null||!N("hover")||!O().finalConfig.interactive))return f.addEventListener("mouseenter",A),f.addEventListener("mouseleave",P),function(){f.removeEventListener("mouseenter",A),f.removeEventListener("mouseleave",P)}},[f,N,A,P,O]);var $=b==null||(n=b.state)==null||(r=n.modifiersData)==null||(o=r.hide)==null?void 0:o.isReferenceHidden;v.useEffect(function(){i.closeOnTriggerHidden&&$&&P()},[i.closeOnTriggerHidden,P,$]),v.useEffect(function(){if(!i.followCursor||c==null)return;function j(R){var _=R.clientX,H=R.clientY;sI.getBoundingClientRect=aI(_,H),E?.()}return c.addEventListener("mousemove",j),function(){return c.removeEventListener("mousemove",j)}},[i.followCursor,c,E]),v.useEffect(function(){if(!(f==null||E==null||i.mutationObserverOptions==null)){var j=new MutationObserver(E);return j.observe(f,i.mutationObserverOptions),function(){return j.disconnect()}}},[i.mutationObserverOptions,f,E]);var T=function(R){return R===void 0&&(R={}),de({},R,{style:de({},R.style,I.popper)},S.popper,{"data-popper-interactive":i.interactive})},M=function(R){return R===void 0&&(R={}),de({},R,S.arrow,{style:de({},R.style,I.arrow),"data-popper-arrow":!0})};return de({getArrowProps:M,getTooltipProps:T,setTooltipRef:m,setTriggerRef:u,tooltipRef:f,triggerRef:c,visible:p},b)}const bo=({children:e,title:t,hideTooltip:n=!1,delayShow:r=!1,whiteSpace:o="initial",placement:i="top",className:a})=>{const{getArrowProps:s,getTooltipProps:l,setTooltipRef:c,setTriggerRef:u,visible:d}=cI({placement:i}),[f,m]=w.useState(!r),[h,p]=w.useState(null),g=()=>{if(r){const x=setTimeout(()=>{m(!0)},1e3);p(x)}else m(!0)},y=()=>{h&&(clearTimeout(h),p(null)),r&&m(!1)};return C.jsxs(C.Fragment,{children:[C.jsx("div",{ref:u,className:a,onMouseEnter:g,onMouseLeave:y,children:e}),d&&(r?f&&t:t)&&!n&&cn.createPortal(C.jsxs("div",{ref:c,...l({className:"tooltip-container",style:{whiteSpace:o}}),children:[t,C.jsx("div",{...s({className:"tooltip-arrow"})})]}),document.body)]})},$l=e=>typeof e=="number"&&!isNaN(e),Ji=e=>typeof e=="string",vr=e=>typeof e=="function",Ld=e=>Ji(e)||vr(e)?e:null,Jh=e=>w.isValidElement(e)||Ji(e)||vr(e)||$l(e);function NH(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function Bd(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:i=300}=e;return function(a){let{children:s,position:l,preventExitTransition:c,done:u,nodeRef:d,isIn:f,playToast:m}=a;const h=r?`${t}--${l}`:t,p=r?`${n}--${l}`:n,g=w.useRef(0);return w.useLayoutEffect(()=>{const y=d.current,x=h.split(" "),I=S=>{S.target===d.current&&(m(),y.removeEventListener("animationend",I),y.removeEventListener("animationcancel",I),g.current===0&&S.type!=="animationcancel"&&y.classList.remove(...x))};y.classList.add(...x),y.addEventListener("animationend",I),y.addEventListener("animationcancel",I)},[]),w.useEffect(()=>{const y=d.current,x=()=>{y.removeEventListener("animationend",x),o?NH(y,u,i):u()};f||(c?x():(g.current=1,y.className+=` ${p}`,y.addEventListener("animationend",x)))},[f]),w.createElement(w.Fragment,null,s)}}function uI(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Zn=new Map;let Pl=[];const Zh=new Set,$H=e=>Zh.forEach(t=>t(e)),dI=()=>Zn.size>0;function fI(e,t){var n;if(t)return!((n=Zn.get(t))==null||!n.isToastActive(e));let r=!1;return Zn.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function pI(e,t){Jh(e)&&(dI()||Pl.push({content:e,options:t}),Zn.forEach(n=>{n.buildToast(e,t)}))}function mI(e,t){Zn.forEach(n=>{t!=null&&t!=null&&t.containerId?t?.containerId===n.id&&n.toggle(e,t?.id):n.toggle(e,t?.id)})}function PH(e){const{subscribe:t,getSnapshot:n,setProps:r}=w.useRef(function(i){const a=i.containerId||1;return{subscribe(s){const l=function(u,d,f){let m=1,h=0,p=[],g=[],y=[],x=d;const I=new Map,S=new Set,b=()=>{y=Array.from(I.values()),S.forEach(N=>N())},E=N=>{g=N==null?[]:g.filter(P=>P!==N),b()},O=N=>{const{toastId:P,onOpen:A,updateId:k,children:$}=N.props,T=k==null;N.staleId&&I.delete(N.staleId),I.set(P,N),g=[...g,N.props.toastId].filter(M=>M!==N.staleId),b(),f(uI(N,T?"added":"updated")),T&&vr(A)&&A(w.isValidElement($)&&$.props)};return{id:u,props:x,observe:N=>(S.add(N),()=>S.delete(N)),toggle:(N,P)=>{I.forEach(A=>{P!=null&&P!==A.props.toastId||vr(A.toggle)&&A.toggle(N)})},removeToast:E,toasts:I,clearQueue:()=>{h-=p.length,p=[]},buildToast:(N,P)=>{if((L=>{let{containerId:F,toastId:U,updateId:K}=L;const q=F?F!==u:u!==1,Y=I.has(U)&&K==null;return q||Y})(P))return;const{toastId:A,updateId:k,data:$,staleId:T,delay:M}=P,j=()=>{E(A)},R=k==null;R&&h++;const _={...x,style:x.toastStyle,key:m++,...Object.fromEntries(Object.entries(P).filter(L=>{let[F,U]=L;return U!=null})),toastId:A,updateId:k,data:$,closeToast:j,isIn:!1,className:Ld(P.className||x.toastClassName),bodyClassName:Ld(P.bodyClassName||x.bodyClassName),progressClassName:Ld(P.progressClassName||x.progressClassName),autoClose:!P.isLoading&&(H=P.autoClose,z=x.autoClose,H===!1||$l(H)&&H>0?H:z),deleteToast(){const L=I.get(A),{onClose:F,children:U}=L.props;vr(F)&&F(w.isValidElement(U)&&U.props),f(uI(L,"removed")),I.delete(A),h--,h<0&&(h=0),p.length>0?O(p.shift()):b()}};var H,z;_.closeButton=x.closeButton,P.closeButton===!1||Jh(P.closeButton)?_.closeButton=P.closeButton:P.closeButton===!0&&(_.closeButton=!Jh(x.closeButton)||x.closeButton);let V=N;w.isValidElement(N)&&!Ji(N.type)?V=w.cloneElement(N,{closeToast:j,toastProps:_,data:$}):vr(N)&&(V=N({closeToast:j,toastProps:_,data:$}));const D={content:V,props:_,staleId:T};x.limit&&x.limit>0&&h>x.limit&&R?p.push(D):$l(M)?setTimeout(()=>{O(D)},M):O(D)},setProps(N){x=N},setToggle:(N,P)=>{I.get(N).toggle=P},isToastActive:N=>g.some(P=>P===N),getSnapshot:()=>y}}(a,i,$H);Zn.set(a,l);const c=l.observe(s);return Pl.forEach(u=>pI(u.content,u.options)),Pl=[],()=>{c(),Zn.delete(a)}},setProps(s){var l;(l=Zn.get(a))==null||l.setProps(s)},getSnapshot(){var s;return(s=Zn.get(a))==null?void 0:s.getSnapshot()}}}(e)).current;r(e);const o=w.useSyncExternalStore(t,n,n);return{getToastToRender:function(i){if(!o)return[];const a=new Map;return e.newestOnTop&&o.reverse(),o.forEach(s=>{const{position:l}=s.props;a.has(l)||a.set(l,[]),a.get(l).push(s)}),Array.from(a,s=>i(s[0],s[1]))},isToastActive:fI,count:o?.length}}function AH(e){const[t,n]=w.useState(!1),[r,o]=w.useState(!1),i=w.useRef(null),a=w.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:s,pauseOnHover:l,closeToast:c,onClick:u,closeOnClick:d}=e;var f,m;function h(){n(!0)}function p(){n(!1)}function g(I){const S=i.current;a.canDrag&&S&&(a.didMove=!0,t&&p(),a.delta=e.draggableDirection==="x"?I.clientX-a.start:I.clientY-a.start,a.start!==I.clientX&&(a.canCloseOnClick=!1),S.style.transform=`translate3d(${e.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,S.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function y(){document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",y);const I=i.current;if(a.canDrag&&a.didMove&&I){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();I.style.transition="transform 0.2s, opacity 0.2s",I.style.removeProperty("transform"),I.style.removeProperty("opacity")}}(m=Zn.get((f={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||m.setToggle(f.id,f.fn),w.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||p(),window.addEventListener("focus",h),window.addEventListener("blur",p),()=>{window.removeEventListener("focus",h),window.removeEventListener("blur",p)}},[e.pauseOnFocusLoss]);const x={onPointerDown:function(I){if(e.draggable===!0||e.draggable===I.pointerType){a.didMove=!1,document.addEventListener("pointermove",g),document.addEventListener("pointerup",y);const S=i.current;a.canCloseOnClick=!0,a.canDrag=!0,S.style.transition="none",e.draggableDirection==="x"?(a.start=I.clientX,a.removalDistance=S.offsetWidth*(e.draggablePercent/100)):(a.start=I.clientY,a.removalDistance=S.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(I){const{top:S,bottom:b,left:E,right:O}=i.current.getBoundingClientRect();I.nativeEvent.type!=="touchend"&&e.pauseOnHover&&I.clientX>=E&&I.clientX<=O&&I.clientY>=S&&I.clientY<=b?p():h()}};return s&&l&&(x.onMouseEnter=p,e.stacked||(x.onMouseLeave=h)),d&&(x.onClick=I=>{u&&u(I),a.canCloseOnClick&&c()}),{playToast:h,pauseToast:p,isRunning:t,preventExitTransition:r,toastRef:i,eventHandlers:x}}function TH(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:i,className:a,style:s,controlledProgress:l,progress:c,rtl:u,isIn:d,theme:f}=e;const m=i||l&&c===0,h={...s,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};l&&(h.transform=`scaleX(${c})`);const p=po("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${f}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":u}),g=vr(a)?a({rtl:u,type:o,defaultClassName:p}):po(p,a),y={[l&&c>=1?"onTransitionEnd":"onAnimationEnd"]:l&&c<1?null:()=>{d&&r()}};return w.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":m},w.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${f} Toastify__progress-bar--${o}`}),w.createElement("div",{role:"progressbar","aria-hidden":m?"true":"false","aria-label":"notification timer",className:g,style:h,...y}))}let MH=1;const gI=()=>""+MH++;function kH(e){return e&&(Ji(e.toastId)||$l(e.toastId))?e.toastId:gI()}function Al(e,t){return pI(e,t),t.toastId}function _d(e,t){return{...t,type:t&&t.type||e,toastId:kH(t)}}function Vd(e){return(t,n)=>Al(t,_d(e,n))}function Nt(e,t){return Al(e,_d("default",t))}Nt.loading=(e,t)=>Al(e,_d("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Nt.promise=function(e,t,n){let r,{pending:o,error:i,success:a}=t;o&&(r=Ji(o)?Nt.loading(o,n):Nt.loading(o.render,{...n,...o}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(u,d,f)=>{if(d==null)return void Nt.dismiss(r);const m={type:u,...s,...n,data:f},h=Ji(d)?{render:d}:d;return r?Nt.update(r,{...m,...h}):Nt(h.render,{...m,...h}),f},c=vr(e)?e():e;return c.then(u=>l("success",a,u)).catch(u=>l("error",i,u)),c},Nt.success=Vd("success"),Nt.info=Vd("info"),Nt.error=Vd("error"),Nt.warning=Vd("warning"),Nt.warn=Nt.warning,Nt.dark=(e,t)=>Al(e,_d("default",{theme:"dark",...t})),Nt.dismiss=function(e){(function(t){var n;if(dI()){if(t==null||Ji(n=t)||$l(n))Zn.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=Zn.get(t.containerId);r?r.removeToast(t.id):Zn.forEach(o=>{o.removeToast(t.id)})}}else Pl=Pl.filter(r=>t!=null&&r.options.toastId!==t)})(e)},Nt.clearWaitingQueue=function(e){e===void 0&&(e={}),Zn.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},Nt.isActive=fI,Nt.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var i;let{containerId:a}=o;return(i=Zn.get(a||1))==null?void 0:i.toasts.get(r)})(e,t);if(n){const{props:r,content:o}=n,i={delay:100,...r,...t,toastId:t.toastId||e,updateId:gI()};i.toastId!==e&&(i.staleId=e);const a=i.render||o;delete i.render,Al(a,i)}},Nt.done=e=>{Nt.update(e,{progress:1})},Nt.onChange=function(e){return Zh.add(e),()=>{Zh.delete(e)}},Nt.play=e=>mI(!0,e),Nt.pause=e=>mI(!1,e);const jH=typeof window<"u"?w.useLayoutEffect:w.useEffect,zd=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return w.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},qh={info:function(e){return w.createElement(zd,{...e},w.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return w.createElement(zd,{...e},w.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return w.createElement(zd,{...e},w.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return w.createElement(zd,{...e},w.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return w.createElement("div",{className:"Toastify__spinner"})}},RH=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:i}=AH(e),{closeButton:a,children:s,autoClose:l,onClick:c,type:u,hideProgressBar:d,closeToast:f,transition:m,position:h,className:p,style:g,bodyClassName:y,bodyStyle:x,progressClassName:I,progressStyle:S,updateId:b,role:E,progress:O,rtl:N,toastId:P,deleteToast:A,isIn:k,isLoading:$,closeOnClick:T,theme:M}=e,j=po("Toastify__toast",`Toastify__toast-theme--${M}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":N},{"Toastify__toast--close-on-click":T}),R=vr(p)?p({rtl:N,position:h,type:u,defaultClassName:j}):po(j,p),_=function(D){let{theme:L,type:F,isLoading:U,icon:K}=D,q=null;const Y={theme:L,type:F};return K===!1||(vr(K)?q=K({...Y,isLoading:U}):w.isValidElement(K)?q=w.cloneElement(K,Y):U?q=qh.spinner():(Q=>Q in qh)(F)&&(q=qh[F](Y))),q}(e),H=!!O||!l,z={closeToast:f,type:u,theme:M};let V=null;return a===!1||(V=vr(a)?a(z):w.isValidElement(a)?w.cloneElement(a,z):function(D){let{closeToast:L,theme:F,ariaLabel:U="close"}=D;return w.createElement("button",{className:`Toastify__close-button Toastify__close-button--${F}`,type:"button",onClick:K=>{K.stopPropagation(),L(K)},"aria-label":U},w.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},w.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(z)),w.createElement(m,{isIn:k,done:A,position:h,preventExitTransition:n,nodeRef:r,playToast:i},w.createElement("div",{id:P,onClick:c,"data-in":k,className:R,...o,style:g,ref:r},w.createElement("div",{...k&&{role:E},className:vr(y)?y({type:u}):po("Toastify__toast-body",y),style:x},_!=null&&w.createElement("div",{className:po("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!$})},_),w.createElement("div",null,s)),V,w.createElement(TH,{...b&&!H?{key:`pb-${b}`}:{},rtl:N,theme:M,delay:l,isRunning:t,isIn:k,closeToast:f,hide:d,type:u,style:S,className:I,controlledProgress:H,progress:O||0})))},Hd=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},DH=Bd(Hd("bounce",!0)),FH=Bd(Hd("slide",!0));Bd(Hd("zoom")),Bd(Hd("flip"));const LH={position:"top-right",transition:DH,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function BH(e){let t={...LH,...e};const n=e.stacked,[r,o]=w.useState(!0),i=w.useRef(null),{getToastToRender:a,isToastActive:s,count:l}=PH(t),{className:c,style:u,rtl:d,containerId:f}=t;function m(p){const g=po("Toastify__toast-container",`Toastify__toast-container--${p}`,{"Toastify__toast-container--rtl":d});return vr(c)?c({position:p,rtl:d,defaultClassName:g}):po(g,Ld(c))}function h(){n&&(o(!0),Nt.play())}return jH(()=>{if(n){var p;const g=i.current.querySelectorAll('[data-in="true"]'),y=12,x=(p=t.position)==null?void 0:p.includes("top");let I=0,S=0;Array.from(g).reverse().forEach((b,E)=>{const O=b;O.classList.add("Toastify__toast--stacked"),E>0&&(O.dataset.collapsed=`${r}`),O.dataset.pos||(O.dataset.pos=x?"top":"bot");const N=I*(r?.2:1)+(r?0:y*E);O.style.setProperty("--y",`${x?N:-1*N}px`),O.style.setProperty("--g",`${y}`),O.style.setProperty("--s",""+(1-(r?S:0))),I+=O.offsetHeight,S+=.025})}},[r,l,n]),w.createElement("div",{ref:i,className:"Toastify",id:f,onMouseEnter:()=>{n&&(o(!1),Nt.pause())},onMouseLeave:h},a((p,g)=>{const y=g.length?{...u}:{...u,pointerEvents:"none"};return w.createElement("div",{className:m(p),style:y,key:`container-${p}`},g.map(x=>{let{content:I,props:S}=x;return w.createElement(RH,{...S,stacked:n,collapseAll:h,isIn:s(S.toastId,S.containerId),style:S.style,key:`toast-${S.key}`},I)}))}))}const _H=({size:e=24,fill:t="#12B76A"})=>C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:t,xmlns:"http://www.w3.org/2000/svg",children:C.jsx("g",{mask:"url(#mask0_4874_46615)",children:C.jsx("path",{d:"M10.6 13.8L8.425 11.625C8.24167 11.4417 8.01267 11.3543 7.738 11.363C7.46267 11.371 7.23333 11.4667 7.05 11.65C6.86667 11.8333 6.775 12.0667 6.775 12.35C6.775 12.6333 6.86667 12.8667 7.05 13.05L9.9 15.9C10.0833 16.0833 10.3167 16.175 10.6 16.175C10.8833 16.175 11.1167 16.0833 11.3 15.9L16.975 10.225C17.1583 10.0417 17.246 9.81233 17.238 9.537C17.2293 9.26233 17.1333 9.03333 16.95 8.85C16.7667 8.66667 16.5333 8.575 16.25 8.575C15.9667 8.575 15.7333 8.66667 15.55 8.85L10.6 13.8ZM12 22C10.6167 22 9.31667 21.7373 8.1 21.212C6.88333 20.6873 5.825 19.975 4.925 19.075C4.025 18.175 3.31267 17.1167 2.788 15.9C2.26267 14.6833 2 13.3833 2 12C2 10.6167 2.26267 9.31667 2.788 8.1C3.31267 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.31233 8.1 2.787C9.31667 2.26233 10.6167 2 12 2C13.3833 2 14.6833 2.26233 15.9 2.787C17.1167 3.31233 18.175 4.025 19.075 4.925C19.975 5.825 20.6873 6.88333 21.212 8.1C21.7373 9.31667 22 10.6167 22 12C22 13.3833 21.7373 14.6833 21.212 15.9C20.6873 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6873 15.9 21.212C14.6833 21.7373 13.3833 22 12 22ZM12 20C14.2167 20 16.1043 19.221 17.663 17.663C19.221 16.1043 20 14.2167 20 12C20 9.78333 19.221 7.89567 17.663 6.337C16.1043 4.779 14.2167 4 12 4C9.78333 4 7.896 4.779 6.338 6.337C4.77933 7.89567 4 9.78333 4 12C4 14.2167 4.77933 16.1043 6.338 17.663C7.896 19.221 9.78333 20 12 20Z",fill:t})})}),VH=({size:e=24,fill:t="#F04438"})=>C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("g",{id:"error",children:C.jsx("g",{mask:"url(#mask0_4874_46622)",children:C.jsx("path",{id:"error_2",d:"M12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16C13 15.7167 12.9042 15.4792 12.7125 15.2875C12.5208 15.0958 12.2833 15 12 15C11.7167 15 11.4792 15.0958 11.2875 15.2875C11.0958 15.4792 11 15.7167 11 16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17ZM12 13C12.2833 13 12.5208 12.9042 12.7125 12.7125C12.9042 12.5208 13 12.2833 13 12V8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8V12C11 12.2833 11.0958 12.5208 11.2875 12.7125C11.4792 12.9042 11.7167 13 12 13ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",fill:t})})})}),zH=({size:e=24,fill:t="#F79009"})=>C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:C.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99ZM2.74 18C1.97 19.33 2.93 21 4.47 21H19.53C21.07 21 22.03 19.33 21.26 18L13.73 4.99C12.96 3.66 11.04 3.66 10.27 4.99L2.74 18ZM11 11V13C11 13.55 11.45 14 12 14C12.55 14 13 13.55 13 13V11C13 10.45 12.55 10 12 10C11.45 10 11 10.45 11 11ZM11 16H13V18H11V16Z",fill:t})}),HH=({size:e=24,fill:t="#016DCF"})=>C.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[C.jsx("mask",{id:"mask0_32271_5688",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:C.jsx("rect",{width:"24",height:"24",fill:"#D9D9D9"})}),C.jsx("g",{mask:"url(#mask0_32271_5688)",children:C.jsx("path",{d:"M12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16V12C13 11.7167 12.9042 11.4792 12.7125 11.2875C12.5208 11.0958 12.2833 11 12 11C11.7167 11 11.4792 11.0958 11.2875 11.2875C11.0958 11.4792 11 11.7167 11 12V16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17ZM12 9C12.2833 9 12.5208 8.90417 12.7125 8.7125C12.9042 8.52083 13 8.28333 13 8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8C11 8.28333 11.0958 8.52083 11.2875 8.7125C11.4792 8.90417 11.7167 9 12 9ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",fill:t})})]}),GH=({size:e=24,fill:t="#016DCF"})=>C.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[C.jsx("mask",{id:"mask0_35096_2621",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:C.jsx("rect",{width:"24",height:"24",fill:"#D9D9D9"})}),C.jsx("g",{mask:"url(#mask0_35096_2621)",children:C.jsx("path",{d:"M8 20H16V17C16 15.9 15.6083 14.9583 14.825 14.175C14.0417 13.3917 13.1 13 12 13C10.9 13 9.95833 13.3917 9.175 14.175C8.39167 14.9583 8 15.9 8 17V20ZM12 11C13.1 11 14.0417 10.6083 14.825 9.825C15.6083 9.04167 16 8.1 16 7V4H8V7C8 8.1 8.39167 9.04167 9.175 9.825C9.95833 10.6083 10.9 11 12 11ZM5 22C4.71667 22 4.47917 21.9042 4.2875 21.7125C4.09583 21.5208 4 21.2833 4 21C4 20.7167 4.09583 20.4792 4.2875 20.2875C4.47917 20.0958 4.71667 20 5 20H6V17C6 15.9833 6.2375 15.0292 6.7125 14.1375C7.1875 13.2458 7.85 12.5333 8.7 12C7.85 11.4667 7.1875 10.7542 6.7125 9.8625C6.2375 8.97083 6 8.01667 6 7V4H5C4.71667 4 4.47917 3.90417 4.2875 3.7125C4.09583 3.52083 4 3.28333 4 3C4 2.71667 4.09583 2.47917 4.2875 2.2875C4.47917 2.09583 4.71667 2 5 2H19C19.2833 2 19.5208 2.09583 19.7125 2.2875C19.9042 2.47917 20 2.71667 20 3C20 3.28333 19.9042 3.52083 19.7125 3.7125C19.5208 3.90417 19.2833 4 19 4H18V7C18 8.01667 17.7625 8.97083 17.2875 9.8625C16.8125 10.7542 16.15 11.4667 15.3 12C16.15 12.5333 16.8125 13.2458 17.2875 14.1375C17.7625 15.0292 18 15.9833 18 17V20H19C19.2833 20 19.5208 20.0958 19.7125 20.2875C19.9042 20.4792 20 20.7167 20 21C20 21.2833 19.9042 21.5208 19.7125 21.7125C19.5208 21.9042 19.2833 22 19 22H5Z",fill:t})})]}),WH=({size:e=16})=>C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{d:"M18.3 5.71a.996.996 0 00-1.41 0L12 10.59 7.11 5.7A.996.996 0 105.7 7.11L10.59 12 5.7 16.89a.996.996 0 101.41 1.41L12 13.41l4.89 4.89a.996.996 0 101.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"})}),UH=e=>{switch(e){case"success":return C.jsx("div",{className:"w-8 h-8 bg-green-50 dark:bg-green-900 rounded-full p-1 flex justify-center items-center",children:C.jsx(_H,{size:24,fill:"#12B76A"})});case"error":return C.jsx("div",{className:"w-8 h-8 bg-red-50 dark:bg-red-900 rounded-full p-1 flex justify-center items-center",children:C.jsx(VH,{fill:"#F04438",size:24})});case"warning":return C.jsx("div",{className:"w-8 h-8 bg-yellow-50 dark:bg-yellow-900 rounded-full p-1 flex justify-center items-center",children:C.jsx(zH,{fill:"#F79009",size:24})});case"info":return C.jsx("div",{className:"w-8 h-8 bg-blue-50 dark:bg-blue-900 rounded-full p-1 flex justify-center items-center",children:C.jsx(HH,{})});case"in-progress":return C.jsx("div",{className:"w-8 h-8 bg-blue-50 dark:bg-blue-900 rounded-full p-1 flex justify-center items-center",children:C.jsx(GH,{})});default:return null}},XH={success:"border-b-[5px] !border-green-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600",error:"border-b-[5px] !border-red-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600",warning:"border-b-[5px] !border-yellow-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600",info:"border-b-[5px] !border-blue-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600","in-progress":"border-b-[5px] !border-blue-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600"},YH=({closeToast:e})=>C.jsx("button",{onClick:e,className:"text-neutral-900 dark:text-white hover:text-neutral-600 dark:hover:text-neutral-300 transition-colors",children:C.jsx(WH,{size:16})}),JH=({position:e="bottom-right",autoClose:t=3e3,hideProgressBar:n=!0,newestOnTop:r=!0,closeOnClick:o=!0,pauseOnFocusLoss:i=!1,draggable:a=!0,pauseOnHover:s=!0,rtl:l=!1,className:c,style:u={zIndex:1e5},...d})=>C.jsx(BH,{position:e,transition:FH,autoClose:t,hideProgressBar:n,newestOnTop:r,closeOnClick:o,rtl:l,pauseOnFocusLoss:i,draggable:a,pauseOnHover:s,icon:({type:f})=>UH(f),bodyStyle:{gap:"4px"},style:u,toastClassName:f=>{const{type:m="",defaultClassName:h=""}=f||{};return`w-[100%] sm:w-[400px] bg-white dark:bg-neutral-800 rounded-[4px] font-medium text-sm text-neutral-900 dark:text-white shadow-lg p-[20px] min-h-0 ${h} ${XH[m]} ${c||""}`},closeButton:YH,...d}),ZH={success:(e,t)=>Nt.success(e,t),error:(e,t)=>Nt.error(e,t),warning:(e,t)=>Nt.warning(e,t),info:(e,t)=>Nt.info(e,t),inProgress:(e,t)=>Nt(e,{...t,type:"in-progress"}),dismiss:e=>Nt.dismiss(e),isActive:e=>Nt.isActive(e)},Zr=({status:e="primary",appearance:t,className:n,disabled:r,children:o,isLoading:i,title:a,id:s,onClick:l,onKeyDown:c,badge:u,type:d="button",options:f,tooltip:m,tooltipPlacement:h="top",theme:p="light"})=>{const g=w.useCallback(()=>{switch(t){case"outline":return I();case"ghost":return S();case"dashed":return b();default:return x()}},[t,e,r,p]),y=w.useCallback(()=>{switch(t){case"dashed":return E();default:return{}}},[t,e,r,p]),x=w.useCallback(()=>{switch(e){case"primary":return"bg-primary-600 text-white focus:border-primary-200 hover:bg-primary-700 disabled:opacity-60";case"secondary":return"bg-primary-50 dark:bg-black-800 text-primary-600 dark:hover:text-primary-400 border border-primary-200 dark:border-primary-600 hover:bg-primary-100 dark:hover:bg-black-800 focus:border-primary-200 hover:border-primary-200 dark:hover:border-primary-400 disabled:opacity-60";case"error":return"bg-error-600 dark:bg-error-500 text-white hover:bg-error-700 dark:hover:bg-error-600 focus:!border-error-300 dark:focus:!border-error-600 dark:focus:bg-error-800 disabled:opacity-60";case"error-secondary":return"bg-error-100 dark:bg-black-800 text-error-600 border !border-error-300 dark:!border-error-900 hover:bg-error-200 focus:!border-error-300 dark:focus:!border-error-400 disabled:opacity-60";case"secondary-neutral":return"bg-white dark:bg-black-800 text-neutral-900 border border-neutral-300 dark:border-black-600 dark:hover:bg-black-600 dark:text-black-200 hover:bg-neutral-100 focus:border-primary-200 disabled:opacity-60";case"warning":return"bg-warning-300 dark:bg-warning-600 text-white border-warning-300 border hover:bg-warning-400 disabled:opacity-60";case"success":return"bg-success-600 text-white border-success-600 border hover:bg-success-700 disabled:opacity-60";case"publish":return"bg-teal-800 text-white border-teal-800 border hover:bg-teal-900 disabled:opacity-60";case"no-background":return"bg-transparent text-neutral-900 dark:text-black-100 border-transparent border";default:return"bg-white dark:bg-black-800 text-neutral-900 dark:text-white border-white border hover:bg-neutral-100 dark:hover:bg-black-600 disabled:opacity-60"}},[e,r,p]),I=w.useCallback(()=>{switch(e){case"primary":return"text-primary-700 dark:text-primary-600 border-primary-700 border dark:border-primary-600 hover:bg-primary-100 disabled:opacity-60";case"secondary":return"text-primary-700 dark:text-primary-600 border-primary-100 dark:border-primary-600 border bg-primary-50 dark:bg-black-800 hover:bg-primary-100 disabled:opacity-60";case"secondary-neutral":return"text-neutral-900 dark:text-white border-neutral-300 dark:border-neutral-700 border bg-white dark:bg-black-800 hover:bg-neutral-100 dark:hover:bg-black-600 disabled:opacity-60";case"error":return"text-error-600 dark:text-error-500 !border-error-600 dark:!border-error-500 border hover:bg-[#FEF3F2] disabled:opacity-60";case"warning":return"text-warning-300 dark:text-warning-500 border-warning-300 dark:border-warning-500 border hover:bg-[#FFFAEB] disabled:opacity-60";case"success":return"text-success-600 dark:text-success-500 border-success-600 dark:border-success-500 border hover:bg-[#ECFDF3] disabled:opacity-60";default:return"bg-white dark:bg-black-800 text-neutral-900 dark:text-white border-neutral-300 dark:border-neutral-700 border hover:bg-neutral-100 dark:hover:bg-black-600 disabled:opacity-60"}},[e,p]),S=w.useCallback(()=>{switch(e){case"primary":return"text-primary-700 dark:text-primary-600 border border-transparent dark:border-transparent hover:text-primary-700 disabled:opacity-60";case"secondary":return"text-primary-50 dark:text-primary-900 border border-transparent dark:border-transparent hover:text-primary-100 disabled:opacity-60";case"error":return"text-error-600 dark:text-error-500 border border-transparent dark:border-transparent hover:text-error-600 disabled:opacity-60";case"warning":return"text-warning-300 dark:text-warning-500 border border-transparent dark:border-transparent hover:text-warning-400 disabled:opacity-60";case"success":return"text-success-600 dark:text-success-500 border border-transparent dark:border-transparent hover:text-success-700 disabled:opacity-60";default:return"text-neutral-900 dark:text-white border border-transparent dark:border-transparent hover:text-[#667085] disabled:opacity-60"}},[e,p]),b=w.useCallback(()=>{switch(e){case"primary":return"bg-primary-50 dark:bg-black-700 text-primary-600 dark:text-primary-600 disabled:text-primary-100 hover:bg-primary-100 dark:hover:bg-black-600";default:return"bg-primary-50 dark:bg-black-700 text-primary-600 dark:text-primary-600 disabled:text-primary-100 hover:bg-primary-100 dark:hover:bg-black-600"}},[e,p]),E=w.useCallback(()=>{switch(e){case"primary":return{backgroundImage:"repeating-linear-gradient(3deg, #016DCF, #016DCF 10px, transparent 10px, transparent 19px, #016DCF 19px), repeating-linear-gradient(93deg, #016DCF, #016DCF 10px, transparent 10px, transparent 19px, #016DCF 19px), repeating-linear-gradient(183deg, #016DCF, #016DCF 10px, transparent 10px, transparent 19px, #016DCF 19px), repeating-linear-gradient(273deg, #016DCF, #016DCF 10px, transparent 10px, transparent 19px, #016DCF 19px)",backgroundSize:"1px 100%, 100% 1px, 1px 100% , 100% 1px",backgroundPosition:"0 0, 0 0, 100% 0, 0 100%",backgroundRepeat:"no-repeat"};default:return{}}},[e,p]),O=()=>C.jsx(C.Fragment,{children:C.jsx(yE,{size:24,className:"inline mr-2 spinner"})});return C.jsx(bo,{title:m,placement:h,delayShow:!0,children:C.jsxs("button",{className:`
|
|
390
|
+
To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function gV(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const mo=e=>{try{return e()}catch{}},hV=(e="mui")=>k_(e);function kh(e,t,n,r,o){if(!n)return;n=n===!0?{}:n;const i=o==="dark"?"dark":"light";if(!r){t[o]=uV({...n,palette:{mode:i,...n?.palette},colorSpace:e});return}const{palette:a,...s}=Mh({...r,palette:{mode:i,...n?.palette},colorSpace:e});return t[o]={...n,palette:a,opacity:{...aE(i),...n?.opacity},overlays:n?.overlays||sE(i)},s}function vV(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",nativeColor:a=!1,shouldSkipGeneratingVar:s=dV,colorSchemeSelector:l=n.light&&n.dark?"media":void 0,rootSelector:c=":root",...u}=e,d=Object.keys(n)[0],f=r||(n.light&&d!=="light"?"light":d),m=hV(i),{[f]:h,light:p,dark:g,...y}=n,x={...y};let I=h;if((f==="dark"&&!("dark"in n)||f==="light"&&!("light"in n))&&(I=!0),!I)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${f}\` option is either missing or invalid.`:Ci(21,f));let S;a&&(S="oklch");const b=kh(S,x,I,u,f);p&&!x.light&&kh(S,x,p,void 0,"light"),g&&!x.dark&&kh(S,x,g,void 0,"dark");let E={defaultColorScheme:f,...b,cssVarPrefix:i,colorSchemeSelector:l,rootSelector:c,getCssVar:m,colorSchemes:x,font:{...U_(b.typography),...b.font},spacing:gV(u.spacing)};Object.keys(E.colorSchemes).forEach(k=>{const $=E.colorSchemes[k].palette,T=j=>{const R=j.split("-"),_=R[1],H=R[2];return m(j,$[_][H])};$.mode==="light"&&(me($.common,"background","#fff"),me($.common,"onBackground","#000")),$.mode==="dark"&&(me($.common,"background","#000"),me($.common,"onBackground","#fff"));function M(j,R,_){if(S){let H;return j===Wi&&(H=`transparent ${((1-_)*100).toFixed(0)}%`),j===Zt&&(H=`#000 ${(_*100).toFixed(0)}%`),j===qt&&(H=`#fff ${(_*100).toFixed(0)}%`),`color-mix(in ${S}, ${R}, ${H})`}return j(R,_)}if(mV($,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),$.mode==="light"){me($.Alert,"errorColor",M(Zt,$.error.light,.6)),me($.Alert,"infoColor",M(Zt,$.info.light,.6)),me($.Alert,"successColor",M(Zt,$.success.light,.6)),me($.Alert,"warningColor",M(Zt,$.warning.light,.6)),me($.Alert,"errorFilledBg",T("palette-error-main")),me($.Alert,"infoFilledBg",T("palette-info-main")),me($.Alert,"successFilledBg",T("palette-success-main")),me($.Alert,"warningFilledBg",T("palette-warning-main")),me($.Alert,"errorFilledColor",mo(()=>$.getContrastText($.error.main))),me($.Alert,"infoFilledColor",mo(()=>$.getContrastText($.info.main))),me($.Alert,"successFilledColor",mo(()=>$.getContrastText($.success.main))),me($.Alert,"warningFilledColor",mo(()=>$.getContrastText($.warning.main))),me($.Alert,"errorStandardBg",M(qt,$.error.light,.9)),me($.Alert,"infoStandardBg",M(qt,$.info.light,.9)),me($.Alert,"successStandardBg",M(qt,$.success.light,.9)),me($.Alert,"warningStandardBg",M(qt,$.warning.light,.9)),me($.Alert,"errorIconColor",T("palette-error-main")),me($.Alert,"infoIconColor",T("palette-info-main")),me($.Alert,"successIconColor",T("palette-success-main")),me($.Alert,"warningIconColor",T("palette-warning-main")),me($.AppBar,"defaultBg",T("palette-grey-100")),me($.Avatar,"defaultBg",T("palette-grey-400")),me($.Button,"inheritContainedBg",T("palette-grey-300")),me($.Button,"inheritContainedHoverBg",T("palette-grey-A100")),me($.Chip,"defaultBorder",T("palette-grey-400")),me($.Chip,"defaultAvatarColor",T("palette-grey-700")),me($.Chip,"defaultIconColor",T("palette-grey-700")),me($.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),me($.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),me($.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),me($.LinearProgress,"primaryBg",M(qt,$.primary.main,.62)),me($.LinearProgress,"secondaryBg",M(qt,$.secondary.main,.62)),me($.LinearProgress,"errorBg",M(qt,$.error.main,.62)),me($.LinearProgress,"infoBg",M(qt,$.info.main,.62)),me($.LinearProgress,"successBg",M(qt,$.success.main,.62)),me($.LinearProgress,"warningBg",M(qt,$.warning.main,.62)),me($.Skeleton,"bg",S?M(Wi,$.text.primary,.11):`rgba(${T("palette-text-primaryChannel")} / 0.11)`),me($.Slider,"primaryTrack",M(qt,$.primary.main,.62)),me($.Slider,"secondaryTrack",M(qt,$.secondary.main,.62)),me($.Slider,"errorTrack",M(qt,$.error.main,.62)),me($.Slider,"infoTrack",M(qt,$.info.main,.62)),me($.Slider,"successTrack",M(qt,$.success.main,.62)),me($.Slider,"warningTrack",M(qt,$.warning.main,.62));const j=S?M(Zt,$.background.default,.6825):Ed($.background.default,.8);me($.SnackbarContent,"bg",j),me($.SnackbarContent,"color",mo(()=>S?Ah.text.primary:$.getContrastText(j))),me($.SpeedDialAction,"fabHoverBg",Ed($.background.paper,.15)),me($.StepConnector,"border",T("palette-grey-400")),me($.StepContent,"border",T("palette-grey-400")),me($.Switch,"defaultColor",T("palette-common-white")),me($.Switch,"defaultDisabledColor",T("palette-grey-100")),me($.Switch,"primaryDisabledColor",M(qt,$.primary.main,.62)),me($.Switch,"secondaryDisabledColor",M(qt,$.secondary.main,.62)),me($.Switch,"errorDisabledColor",M(qt,$.error.main,.62)),me($.Switch,"infoDisabledColor",M(qt,$.info.main,.62)),me($.Switch,"successDisabledColor",M(qt,$.success.main,.62)),me($.Switch,"warningDisabledColor",M(qt,$.warning.main,.62)),me($.TableCell,"border",M(qt,M(Wi,$.divider,1),.88)),me($.Tooltip,"bg",M(Wi,$.grey[700],.92))}if($.mode==="dark"){me($.Alert,"errorColor",M(qt,$.error.light,.6)),me($.Alert,"infoColor",M(qt,$.info.light,.6)),me($.Alert,"successColor",M(qt,$.success.light,.6)),me($.Alert,"warningColor",M(qt,$.warning.light,.6)),me($.Alert,"errorFilledBg",T("palette-error-dark")),me($.Alert,"infoFilledBg",T("palette-info-dark")),me($.Alert,"successFilledBg",T("palette-success-dark")),me($.Alert,"warningFilledBg",T("palette-warning-dark")),me($.Alert,"errorFilledColor",mo(()=>$.getContrastText($.error.dark))),me($.Alert,"infoFilledColor",mo(()=>$.getContrastText($.info.dark))),me($.Alert,"successFilledColor",mo(()=>$.getContrastText($.success.dark))),me($.Alert,"warningFilledColor",mo(()=>$.getContrastText($.warning.dark))),me($.Alert,"errorStandardBg",M(Zt,$.error.light,.9)),me($.Alert,"infoStandardBg",M(Zt,$.info.light,.9)),me($.Alert,"successStandardBg",M(Zt,$.success.light,.9)),me($.Alert,"warningStandardBg",M(Zt,$.warning.light,.9)),me($.Alert,"errorIconColor",T("palette-error-main")),me($.Alert,"infoIconColor",T("palette-info-main")),me($.Alert,"successIconColor",T("palette-success-main")),me($.Alert,"warningIconColor",T("palette-warning-main")),me($.AppBar,"defaultBg",T("palette-grey-900")),me($.AppBar,"darkBg",T("palette-background-paper")),me($.AppBar,"darkColor",T("palette-text-primary")),me($.Avatar,"defaultBg",T("palette-grey-600")),me($.Button,"inheritContainedBg",T("palette-grey-800")),me($.Button,"inheritContainedHoverBg",T("palette-grey-700")),me($.Chip,"defaultBorder",T("palette-grey-700")),me($.Chip,"defaultAvatarColor",T("palette-grey-300")),me($.Chip,"defaultIconColor",T("palette-grey-300")),me($.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),me($.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),me($.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),me($.LinearProgress,"primaryBg",M(Zt,$.primary.main,.5)),me($.LinearProgress,"secondaryBg",M(Zt,$.secondary.main,.5)),me($.LinearProgress,"errorBg",M(Zt,$.error.main,.5)),me($.LinearProgress,"infoBg",M(Zt,$.info.main,.5)),me($.LinearProgress,"successBg",M(Zt,$.success.main,.5)),me($.LinearProgress,"warningBg",M(Zt,$.warning.main,.5)),me($.Skeleton,"bg",S?M(Wi,$.text.primary,.13):`rgba(${T("palette-text-primaryChannel")} / 0.13)`),me($.Slider,"primaryTrack",M(Zt,$.primary.main,.5)),me($.Slider,"secondaryTrack",M(Zt,$.secondary.main,.5)),me($.Slider,"errorTrack",M(Zt,$.error.main,.5)),me($.Slider,"infoTrack",M(Zt,$.info.main,.5)),me($.Slider,"successTrack",M(Zt,$.success.main,.5)),me($.Slider,"warningTrack",M(Zt,$.warning.main,.5));const j=S?M(qt,$.background.default,.985):Ed($.background.default,.98);me($.SnackbarContent,"bg",j),me($.SnackbarContent,"color",mo(()=>S?qS.text.primary:$.getContrastText(j))),me($.SpeedDialAction,"fabHoverBg",Ed($.background.paper,.15)),me($.StepConnector,"border",T("palette-grey-600")),me($.StepContent,"border",T("palette-grey-600")),me($.Switch,"defaultColor",T("palette-grey-300")),me($.Switch,"defaultDisabledColor",T("palette-grey-600")),me($.Switch,"primaryDisabledColor",M(Zt,$.primary.main,.55)),me($.Switch,"secondaryDisabledColor",M(Zt,$.secondary.main,.55)),me($.Switch,"errorDisabledColor",M(Zt,$.error.main,.55)),me($.Switch,"infoDisabledColor",M(Zt,$.info.main,.55)),me($.Switch,"successDisabledColor",M(Zt,$.success.main,.55)),me($.Switch,"warningDisabledColor",M(Zt,$.warning.main,.55)),me($.TableCell,"border",M(Zt,M(Wi,$.divider,1),.68)),me($.Tooltip,"bg",M(Wi,$.grey[700],.92))}Lo($.background,"default"),Lo($.background,"paper"),Lo($.common,"background"),Lo($.common,"onBackground"),Lo($,"divider"),Object.keys($).forEach(j=>{const R=$[j];j!=="tonalOffset"&&R&&typeof R=="object"&&(R.main&&me($[j],"mainChannel",hl(yl(R.main))),R.light&&me($[j],"lightChannel",hl(yl(R.light))),R.dark&&me($[j],"darkChannel",hl(yl(R.dark))),R.contrastText&&me($[j],"contrastTextChannel",hl(yl(R.contrastText))),j==="text"&&(Lo($[j],"primary"),Lo($[j],"secondary")),j==="action"&&(R.active&&Lo($[j],"active"),R.selected&&Lo($[j],"selected")))})}),E=t.reduce((k,$)=>mr(k,$),E);const O={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:s,getSelector:pV(E),enableContrastVars:a},{vars:N,generateThemeVars:P,generateStyleSheets:A}=D_(E,O);return E.vars=N,Object.entries(E.colorSchemes[E.defaultColorScheme]).forEach(([k,$])=>{E[k]=$}),E.generateThemeVars=P,E.generateStyleSheets=A,E.generateSpacing=function(){return LS(u.spacing,Ch(this))},E.getColorSchemeSelector=F_(l),E.spacing=E.generateSpacing(),E.shouldSkipGeneratingVar=s,E.unstable_sxConfig={...yd,...u?.unstable_sxConfig},E.unstable_sx=function($){return Va({sx:$,theme:this})},E.toRuntimeSource=oE,E}function lE(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Th({...n===!0?{}:n.palette,mode:t})})}function bV(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n?.mode,...a}=e,s=i||"light",l=o?.[s],c={...o,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return Mh(e,...t);let u=n;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const d=Mh({...e,palette:u},...t);return d.defaultColorScheme=s,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},lE(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},lE(d,"light",c.light)),d}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),vV({...a,colorSchemes:c,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}const yV=bV(),xV="$$material";function CV(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const wV=x_({themeId:xV,defaultTheme:yV,rootShouldForwardProp:e=>CV(e)&&e!=="classes"}),SV=M_;process.env.NODE_ENV!=="production"&&(Lt.node,Lt.object.isRequired);function EV(e){return T_(e)}function IV(e){return Eh("MuiSvgIcon",e)}g_("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const OV=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${zi(t)}`,`fontSize${zi(n)}`]};return aB(o,IV,r)},NV=wV("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${zi(n.color)}`],t[`fontSize${zi(n.fontSize)}`]]}})(SV(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),Id=v.forwardRef(function(t,n){const r=EV({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...m}=r,h=v.isValidElement(o)&&o.type==="svg",p={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:h},g={};u||(g.viewBox=f);const y=OV(p);return C.jsxs(NV,{as:s,className:po(y.root,i),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...g,...m,...h&&o.props,ownerState:p,children:[h?o.props.children:o,d?C.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Id.propTypes={children:Lt.node,classes:Lt.object,className:Lt.string,color:Lt.oneOfType([Lt.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),Lt.string]),component:Lt.elementType,fontSize:Lt.oneOfType([Lt.oneOf(["inherit","large","medium","small"]),Lt.string]),htmlColor:Lt.string,inheritViewBox:Lt.bool,shapeRendering:Lt.string,sx:Lt.oneOfType([Lt.arrayOf(Lt.oneOfType([Lt.func,Lt.object,Lt.bool])),Lt.func,Lt.object]),titleAccess:Lt.string,viewBox:Lt.string}),Id.muiName="SvgIcon";function Od(e,t){function n(r,o){return C.jsx(Id,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:o,...r,children:e})}return process.env.NODE_ENV!=="production"&&(n.displayName=`${t}Icon`),n.muiName=Id.muiName,v.memo(v.forwardRef(n))}const $V=Od(C.jsx("path",{d:"M14.71 6.71a.996.996 0 0 0-1.41 0L8.71 11.3c-.39.39-.39 1.02 0 1.41l4.59 4.59c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L10.83 12l3.88-3.88c.39-.39.38-1.03 0-1.41"}),"ChevronLeftRounded"),PV=Od(C.jsx("path",{d:"M9.29 6.71c-.39.39-.39 1.02 0 1.41L13.17 12l-3.88 3.88c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41L10.7 6.7c-.38-.38-1.02-.38-1.41.01"}),"ChevronRightRounded"),AV=Od(C.jsx("path",{d:"M18.3 5.71a.996.996 0 0 0-1.41 0L12 10.59 7.11 5.7a.996.996 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41s1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4"}),"CloseRounded"),TV=Od(C.jsx("path",{d:"M14.59 2.59c-.38-.38-.89-.59-1.42-.59H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8.83c0-.53-.21-1.04-.59-1.41zM15 18H9c-.55 0-1-.45-1-1s.45-1 1-1h6c.55 0 1 .45 1 1s-.45 1-1 1m0-4H9c-.55 0-1-.45-1-1s.45-1 1-1h6c.55 0 1 .45 1 1s-.45 1-1 1m-2-6V3.5L18.5 9H14c-.55 0-1-.45-1-1"}),"DescriptionRounded"),cE=w.forwardRef(({id:e,label:t,placeholder:n="Select...",value:r,selectedValues:o,onChange:i,onColorChange:a,selectOptions:s,loading:l=!1,multiSelect:c=!1,disabled:u=!1,isClearable:d=!0,required:f=!1,message:m,messageType:h="default",originalCase:p=!1,wrapperClassName:g,selectClassName:y,labelClassName:x,helpText:I,size:S="medium",filterOption:b,selectProps:E,components:O,tags:N,tooltip:P},A)=>{const k=()=>{switch(S){case"small":return{height:"28px",minHeight:"28px",fontSize:"12px",padding:"2px 8px"};case"large":return{height:"40px",minHeight:"40px",fontSize:"16px",padding:"8px 12px"};default:return{height:"32px",minHeight:"32px",fontSize:"14px",padding:"4px 10px"}}},$=F=>m&&h==="error"?"rgb(253 164 155)":m&&h==="success"?"rgb(34 197 94)":m&&h==="info"?"rgb(59 130 246)":F.isFocused?"rgb(0 108 207)":"rgb(229 229 229)",T=k(),M={control:(F,U)=>({...F,borderColor:$(U),backgroundColor:U.isDisabled?"rgb(245 245 245)":"rgb(255 255 255)",borderRadius:"6px",...T,opacity:U.isDisabled?.6:1,cursor:U.isDisabled?"not-allowed":"default",boxShadow:U.isFocused?"0 0 0 2px rgba(59, 130, 246, 0.1)":"none","&:hover":{borderColor:$(U)},transition:"all 0.2s ease-in-out"}),valueContainer:F=>({...F,fontSize:T.fontSize,padding:0,height:"auto",minHeight:"20px"}),input:F=>({...F,margin:"0",padding:"0",color:"inherit"}),indicatorsContainer:F=>({...F,fontSize:T.fontSize,padding:0,height:"20px"}),option:(F,U)=>({...F,fontFamily:"Inter",fontWeight:500,fontSize:T.fontSize,lineHeight:"1.2",borderBottom:"1px solid rgb(229 229 229)",backgroundColor:U.isSelected?"rgb(59 130 246)":U.isFocused?"rgb(245 245 245)":"rgb(255 255 255)",color:U.isSelected?"white":U.isDisabled?"rgb(163 163 163)":"inherit",cursor:U.isDisabled?"not-allowed":"pointer",opacity:U.isDisabled?.6:1,"&:hover":{backgroundColor:U.isSelected?"rgb(59 130 246)":U.isDisabled?"rgb(255 255 255)":"rgb(245 245 245)"}}),singleValue:(F,U)=>({...F,fontFamily:"Inter",fontWeight:500,fontSize:T.fontSize,lineHeight:"1.25rem",display:"block",color:U.isDisabled?"rgb(163 163 163)":"inherit"}),placeholder:(F,U)=>({...F,fontFamily:"Inter",fontSize:T.fontSize,fontWeight:500,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",color:U.isDisabled?"rgb(163 163 163)":"rgb(115 115 115)"}),multiValue:F=>({...F,backgroundColor:"rgb(230 241 252)",border:"1px solid rgb(198 225 249)",borderRadius:"4px",fontFamily:"Inter"}),multiValueLabel:F=>({...F,color:"rgb(0 108 207)",fontSize:"12px"}),multiValueRemove:F=>({...F,color:"rgb(0 108 207)",":hover":{backgroundColor:"rgb(230 241 252)",color:"rgb(220 38 38)"}}),menu:F=>({...F,backgroundColor:"rgb(255 255 255)",border:"1px solid rgb(229 229 229)",borderRadius:"6px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"}),loadingIndicator:F=>({...F,color:"rgb(99 102 241)"}),noOptionsMessage:F=>({...F,color:"rgb(107 114 128)",fontSize:T.fontSize})},j=()=>h==="error"?"text-red-500 dark:text-red-400":h==="success"?"text-green-500 dark:text-green-400":h==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",R=()=>{switch(S){case"small":return"extra-small";case"large":return"medium";default:return"small"}},_=()=>C.jsx("div",{className:"flex items-center",children:C.jsx($V,{className:"-rotate-90 transition-transform duration-200",sx:{fontSize:S==="small"?"14px":S==="large"?"18px":"16px"}})}),H=F=>C.jsx("div",{className:"absolute top-0 left-0 h-full flex items-center dark:text-neutral-100",children:F.data.label}),z=!!o?.length,D=d&&(z||!!r),L=(F,U)=>{i(F,U),a?.(F)};return C.jsxs("div",{className:G("flex flex-col w-full",g),children:[t&&C.jsx("label",{htmlFor:e,className:G("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",!p&&"capitalize",x),children:C.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:C.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:C.jsxs(Ke,{variant:"medium",size:R(),appearance:"subtitle",children:[t,f&&C.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}),I&&C.jsx(Ke,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:I}),C.jsx(ZL,{...E,ref:A,id:e,required:f,options:s,isClearable:D,isLoading:l,isDisabled:u,styles:M,isMulti:c,value:c?o:r,placeholder:n,filterOption:b,onChange:L,className:G("react-select-container",y),classNamePrefix:"react-select",components:{IndicatorsContainer:_,SingleValue:H,...O},"aria-required":f,"aria-invalid":m&&h==="error"?"true":"false","aria-describedby":m||I?`${e}-description`:void 0}),C.jsx(Dt.AnimatePresence,{children:m&&C.jsx(Dt.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${e}-description`,role:h==="error"?"alert":void 0,children:C.jsx(Ke,{className:G("mt-1",j()),appearance:"custom",size:"extra-small",variant:"medium",children:m})})}),I&&!m&&C.jsx("div",{id:`${e}-description`,className:"sr-only",children:I})]})});cE.displayName="CreatableSelectField";const jh=[{value:"USD",label:"United States Dollar",symbol:"$"},{value:"EUR",label:"Euro",symbol:"€"},{value:"GBP",label:"British Pound",symbol:"£"},{value:"JPY",label:"Japanese Yen",symbol:"¥"},{value:"CAD",label:"Canadian Dollar",symbol:"C$"},{value:"AUD",label:"Australian Dollar",symbol:"A$"},{value:"CHF",label:"Swiss Franc",symbol:"CHF"},{value:"CNY",label:"Chinese Yuan",symbol:"¥"},{value:"SEK",label:"Swedish Krona",symbol:"kr"},{value:"NZD",label:"New Zealand Dollar",symbol:"NZ$"}],uE={USD:"$",EUR:"€",GBP:"£",JPY:"¥",CAD:"C$",AUD:"A$",CHF:"CHF",CNY:"¥",SEK:"kr",NZD:"NZ$"},dE=w.forwardRef(({id:e,label:t,value:n,defaultValue:r,onChange:o,disabled:i=!1,required:a=!1,placeholder:s,message:l,messageType:c="default",wrapperClassName:u,inputClassName:d,labelClassName:f,helpText:m,size:h="medium",currencyCode:p="USD",allowCurrencyChange:g=!1,availableCurrencies:y,showSymbol:x=!0,formatValue:I=!0,min:S,max:b,decimalPlaces:E=2,inputProps:O,inputStyle:N},P)=>{const[A,k]=w.useState(!1),[$,T]=w.useState(p),[M,j]=w.useState(!1),R=y?jh.filter(Y=>y.includes(Y.value)):jh,_=()=>{switch(h){case"small":return{height:"h-7",padding:"px-2 py-1",fontSize:"text-xs",symbolPadding:"pl-8"};case"large":return{height:"h-10",padding:"px-4 py-2",fontSize:"text-base",symbolPadding:"pl-12"};default:return{height:"h-8",padding:"px-3 py-1.5",fontSize:"text-sm",symbolPadding:"pl-10"}}},H=()=>c==="error"?"border-red-300 focus:border-red-500 focus:ring-red-200 dark:focus:ring-red-400/20":c==="success"?"border-green-300 focus:border-green-500 focus:ring-green-200 dark:focus:ring-green-400/20":c==="info"?"border-blue-300 focus:border-blue-500 focus:ring-blue-200 dark:focus:ring-blue-400/20":"border-neutral-300 dark:border-neutral-600 focus:border-primary-500 dark:focus:border-primary-400 focus:ring-primary-200 dark:focus:ring-primary-400/20",z=()=>c==="error"?"text-red-500 dark:text-red-400":c==="success"?"text-green-500 dark:text-green-400":c==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",V=()=>{switch(h){case"small":return"extra-small";case"large":return"medium";default:return"small"}},D=Y=>{if(Y==null)return"";const Q=Number(Y);return isNaN(Q)?String(Y):I?Q.toLocaleString("en-US",{minimumFractionDigits:E,maximumFractionDigits:E}):String(Q)},L=Y=>{const Q=Y.target.value;if(Q===""||Q===null||Q===void 0)o(null,$);else{const Z=Number(Q);isNaN(Z)||o(Z,$)}},F=Y=>{T(Y),j(!1),o(n??null,Y)},U=()=>{k(!0)},K=()=>{k(!1)},q=_();return w.useEffect(()=>{T(p)},[p]),C.jsxs("div",{className:G("flex flex-col w-full",u),children:[t&&C.jsx("label",{htmlFor:e,className:G("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",f),children:C.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:C.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:C.jsxs(Ke,{variant:"medium",size:V(),appearance:"subtitle",children:[t,a&&C.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}),m&&C.jsx(Ke,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:m}),C.jsxs("div",{className:"relative",children:[x&&C.jsx("span",{className:"absolute inset-y-0 left-0 flex items-center pl-3 text-neutral-900 dark:text-neutral-100 pointer-events-none",children:uE[$]||$}),C.jsx("input",{...O,ref:P,id:e,type:A?"number":"text",value:A?n??"":D(n),defaultValue:r!==void 0?A?r??"":D(r):void 0,placeholder:s,required:a,disabled:i,min:S,max:b,step:1/Math.pow(10,E),onFocus:U,onBlur:K,onChange:L,className:G("border rounded-md bg-white dark:bg-neutral-800 block w-full font-medium text-neutral-900 dark:text-neutral-100","transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2",q.height,q.padding,q.fontSize,x?q.symbolPadding:"",H(),g?"pr-20":"",i&&"opacity-50 cursor-not-allowed bg-neutral-50 dark:bg-neutral-700",d),style:N,"aria-required":a,"aria-invalid":l&&c==="error"?"true":"false","aria-describedby":l||m?`${e}-description`:void 0}),g&&C.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center",children:C.jsxs("div",{className:"relative",children:[C.jsxs("button",{type:"button",onClick:()=>j(!M),disabled:i,className:G("px-3 py-1 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 rounded-r-md border-l border-gray-300 dark:border-gray-600 transition-colors",i&&"opacity-50 cursor-not-allowed"),children:[$,C.jsx("svg",{className:"w-4 h-4 ml-1 inline-block",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),M&&C.jsx("div",{className:"absolute top-full right-0 mt-1 w-64 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-md shadow-lg z-50 max-h-60 overflow-y-auto",children:R.map(Y=>C.jsxs("button",{type:"button",onClick:()=>F(Y.value),className:"w-full px-4 py-2 text-left text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 flex justify-between items-center",children:[C.jsxs("span",{children:[Y.value," - ",Y.label]}),C.jsx("span",{className:"text-gray-500",children:Y.symbol})]},Y.value))})]})}),M&&C.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>j(!1)})]}),C.jsx(Dt.AnimatePresence,{children:l&&C.jsx(Dt.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${e}-description`,role:c==="error"?"alert":void 0,children:C.jsx(Ke,{className:G("mt-1",z()),appearance:"custom",size:"extra-small",variant:"medium",children:l})})}),m&&!l&&C.jsx("div",{id:`${e}-description`,className:"sr-only",children:m})]})});dE.displayName="CurrencyInputField";const fE=w.forwardRef(({id:e,label:t,value:n,defaultValue:r,onChange:o,disabled:i=!1,required:a=!1,message:s,messageType:l="default",wrapperClassName:c,inputClassName:u,labelClassName:d,helpText:f,size:m="medium",minDate:h,maxDate:p,startPlaceholder:g="Start date",endPlaceholder:y="End date",allowClear:x=!0,inputProps:I},S)=>{const b=n!==void 0?n:r||{startDate:null,endDate:null},E=()=>{switch(m){case"small":return{height:"h-7",padding:"px-2 py-1",fontSize:"text-xs"};case"large":return{height:"h-10",padding:"px-4 py-2",fontSize:"text-base"};default:return{height:"h-8",padding:"px-3 py-1.5",fontSize:"text-sm"}}},O=()=>l==="error"?"border-red-300 focus:border-red-500 focus:ring-red-200 dark:focus:ring-red-400/20":l==="success"?"border-green-300 focus:border-green-500 focus:ring-green-200 dark:focus:ring-green-400/20":l==="info"?"border-blue-300 focus:border-blue-500 focus:ring-blue-200 dark:focus:ring-blue-400/20":"border-neutral-300 dark:border-neutral-600 focus:border-primary-500 dark:focus:border-primary-400 focus:ring-primary-200 dark:focus:ring-primary-400/20",N=()=>l==="error"?"text-red-500 dark:text-red-400":l==="success"?"text-green-500 dark:text-green-400":l==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",P=()=>{switch(m){case"small":return"extra-small";case"large":return"medium";default:return"small"}},A=_=>{if(!_)return"";const H=_.getFullYear(),z=String(_.getMonth()+1).padStart(2,"0"),V=String(_.getDate()).padStart(2,"0");return`${H}-${z}-${V}`},k=_=>{if(!_)return null;const H=new Date(_);return isNaN(H.getTime())?null:H},$=_=>{const H=k(_.target.value);o({startDate:H,endDate:b.endDate})},T=_=>{const H=k(_.target.value);o({startDate:b.startDate,endDate:H})},M=()=>{o({startDate:null,endDate:null})},j=_=>_?A(_):void 0,R=E();return C.jsxs("div",{className:G("flex flex-col w-full",c),ref:S,children:[t&&C.jsx("label",{htmlFor:`${e}-start`,className:G("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",d),children:C.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:C.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:C.jsxs(Ke,{variant:"medium",size:P(),appearance:"subtitle",children:[t,a&&C.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}),f&&C.jsx(Ke,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:f}),C.jsxs("div",{className:"flex items-center gap-2",children:[C.jsx("div",{className:"flex-1",children:C.jsx("input",{...I,id:`${e}-start`,type:"date",value:A(b.startDate),onChange:$,disabled:i,required:a,min:j(h),max:j(p),placeholder:g,className:G("border rounded-md bg-white dark:bg-neutral-800 block w-full font-medium text-neutral-900 dark:text-neutral-100","transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2",R.height,R.padding,R.fontSize,O(),i&&"opacity-50 cursor-not-allowed bg-neutral-50 dark:bg-neutral-700",u),"aria-required":a,"aria-invalid":s&&l==="error"?"true":"false","aria-describedby":s||f?`${e}-description`:void 0})}),C.jsx("div",{className:"flex-shrink-0 text-neutral-500 dark:text-neutral-400",children:C.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M18 12H6"})})}),C.jsx("div",{className:"flex-1",children:C.jsx("input",{...I,id:`${e}-end`,type:"date",value:A(b.endDate),onChange:T,disabled:i,required:a,min:j(b.startDate||h),max:j(p),placeholder:y,className:G("border rounded-md bg-white dark:bg-neutral-800 block w-full font-medium text-neutral-900 dark:text-neutral-100","transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2",R.height,R.padding,R.fontSize,O(),i&&"opacity-50 cursor-not-allowed bg-neutral-50 dark:bg-neutral-700",u),"aria-required":a,"aria-invalid":s&&l==="error"?"true":"false","aria-describedby":s||f?`${e}-description`:void 0})}),x&&(b.startDate||b.endDate)&&!i&&C.jsx("button",{type:"button",onClick:M,className:"flex-shrink-0 p-1 text-neutral-500 hover:text-neutral-700 dark:text-neutral-400 dark:hover:text-neutral-200 transition-colors","aria-label":"Clear date range",children:C.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),C.jsx("div",{className:"absolute right-3 top-1/2 transform -translate-y-1/2 pointer-events-none text-neutral-400 dark:text-neutral-500",children:C.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),C.jsx(Dt.AnimatePresence,{children:s&&C.jsx(Dt.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${e}-description`,role:l==="error"?"alert":void 0,children:C.jsx(Ke,{className:G("mt-1",N()),appearance:"custom",size:"extra-small",variant:"medium",children:s})})}),f&&!s&&C.jsx("div",{id:`${e}-description`,className:"sr-only",children:f})]})});fE.displayName="DateRange";const pE=w.forwardRef(({id:e,label:t,value:n,defaultValue:r,onChange:o,onImmediateChange:i,disabled:a=!1,required:s=!1,placeholder:l,message:c,messageType:u="default",wrapperClassName:d,inputClassName:f,labelClassName:m,helpText:h,size:p="medium",type:g="text",debounceTimeout:y=300,min:x,max:I,maxLength:S,pattern:b,inputProps:E,inputStyle:O,onKeyDown:N,onFocus:P,onBlur:A},k)=>{const[$,T]=w.useState(n||r||""),[M,j]=w.useState(n||r||""),R=()=>{switch(p){case"small":return{height:"h-7",padding:"px-2 py-1",fontSize:"text-xs"};case"large":return{height:"h-10",padding:"px-4 py-2",fontSize:"text-base"};default:return{height:"h-8",padding:"px-3 py-1.5",fontSize:"text-sm"}}},_=()=>u==="error"?"border-red-300 focus:border-red-500 focus:ring-red-200 dark:focus:ring-red-400/20":u==="success"?"border-green-300 focus:border-green-500 focus:ring-green-200 dark:focus:ring-green-400/20":u==="info"?"border-blue-300 focus:border-blue-500 focus:ring-blue-200 dark:focus:ring-blue-400/20":"border-neutral-300 dark:border-neutral-600 focus:border-primary-500 dark:focus:border-primary-400 focus:ring-primary-200 dark:focus:ring-primary-400/20",H=()=>u==="error"?"text-red-500 dark:text-red-400":u==="success"?"text-green-500 dark:text-green-400":u==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",z=()=>{switch(p){case"small":return"extra-small";case"large":return"medium";default:return"small"}};w.useEffect(()=>{const L=setTimeout(()=>{M!==$&&(j($),o($))},y);return()=>clearTimeout(L)},[$,y,o,M]),w.useEffect(()=>{n!==void 0&&n!==$&&(T(n),j(n))},[n,$]);const V=w.useCallback(L=>{const F=L.target.value;T(F),i?.(F)},[i]),D=R();return C.jsxs("div",{className:G("flex flex-col w-full",d),children:[t&&C.jsx("label",{htmlFor:e,className:G("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",m),children:C.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:C.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:C.jsxs(Ke,{variant:"medium",size:z(),appearance:"subtitle",children:[t,s&&C.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}),h&&C.jsx(Ke,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:h}),C.jsxs("div",{className:"relative",children:[C.jsx("input",{...E,ref:k,id:e,type:g,value:$,defaultValue:r,placeholder:l,required:s,disabled:a,min:x,max:I,maxLength:S,pattern:b,onChange:V,onKeyDown:N,onFocus:P,onBlur:A,className:G("border rounded-md bg-white dark:bg-neutral-800 block w-full font-medium text-neutral-900 dark:text-neutral-100","transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2",D.height,D.padding,D.fontSize,_(),a&&"opacity-50 cursor-not-allowed bg-neutral-50 dark:bg-neutral-700",f),style:O,"aria-required":s,"aria-invalid":c&&u==="error"?"true":"false","aria-describedby":c||h?`${e}-description`:void 0}),$!==M&&C.jsx("div",{className:"absolute right-2 top-1/2 transform -translate-y-1/2",children:C.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-pulse"})})]}),S&&C.jsx("div",{className:"mt-1 text-right",children:C.jsxs(Ke,{className:G("text-xs",$.length>S*.9?"text-orange-500":$.length===S?"text-red-500":"text-neutral-400 dark:text-neutral-500"),appearance:"custom",size:"extra-small",children:[$.length,"/",S]})}),C.jsx(Dt.AnimatePresence,{children:c&&C.jsx(Dt.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${e}-description`,role:u==="error"?"alert":void 0,children:C.jsx(Ke,{className:G("mt-1",H()),appearance:"custom",size:"extra-small",variant:"medium",children:c})})}),h&&!c&&C.jsx("div",{id:`${e}-description`,className:"sr-only",children:h})]})});pE.displayName="DebounceInputField";const mE=w.forwardRef(({id:e,label:t,value:n,defaultValue:r,onChange:o,disabled:i=!1,required:a=!1,placeholder:s,message:l,messageType:c="default",wrapperClassName:u,inputClassName:d,labelClassName:f,helpText:m,size:h="medium",min:p=0,max:g=100,step:y=.01,decimalPlaces:x=2,showSymbol:I=!0,allowNegative:S=!1,inputProps:b,inputStyle:E,onKeyDown:O,onFocus:N,onBlur:P},A)=>{const k=()=>{switch(h){case"small":return{height:"h-7",padding:"px-2 py-1",fontSize:"text-xs",symbolPadding:"pr-8"};case"large":return{height:"h-10",padding:"px-4 py-2",fontSize:"text-base",symbolPadding:"pr-10"};default:return{height:"h-8",padding:"px-3 py-1.5",fontSize:"text-sm",symbolPadding:"pr-9"}}},$=()=>c==="error"?"border-red-300 focus:border-red-500 focus:ring-red-200 dark:focus:ring-red-400/20":c==="success"?"border-green-300 focus:border-green-500 focus:ring-green-200 dark:focus:ring-green-400/20":c==="info"?"border-blue-300 focus:border-blue-500 focus:ring-blue-200 dark:focus:ring-blue-400/20":"border-neutral-300 dark:border-neutral-600 focus:border-primary-500 dark:focus:border-primary-400 focus:ring-primary-200 dark:focus:ring-primary-400/20",T=()=>c==="error"?"text-red-500 dark:text-red-400":c==="success"?"text-green-500 dark:text-green-400":c==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",M=()=>{switch(h){case"small":return"extra-small";case"large":return"medium";default:return"small"}},j=z=>{const V=z.target.value;if(V===""||V===null||V===void 0)o(null);else{const D=Number(V);if(!isNaN(D)){let L=D;!S&&L<0&&(L=0),p!==void 0&&L<p&&(L=p),g!==void 0&&L>g&&(L=g);const F=Math.pow(10,x);L=Math.round(L*F)/F,o(L)}}},R=z=>{N?.(z)},_=z=>{P?.(z)},H=k();return C.jsxs("div",{className:G("flex flex-col w-full",u),children:[t&&C.jsx("label",{htmlFor:e,className:G("mb-1 text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",f),children:C.jsx("div",{className:"flex flex-wrap items-center justify-between w-full",children:C.jsx("div",{className:"inline-flex flex-wrap items-center gap-1",children:C.jsxs(Ke,{variant:"medium",size:M(),appearance:"subtitle",children:[t,a&&C.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})})}),m&&C.jsx(Ke,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:m}),C.jsxs("div",{className:"relative",children:[C.jsx("input",{...b,ref:A,id:e,type:"number",value:n??"",defaultValue:r??"",placeholder:s,required:a,disabled:i,min:S?void 0:p,max:g,step:y,onChange:j,onKeyDown:O,onFocus:R,onBlur:_,className:G("border rounded-md bg-white dark:bg-neutral-800 block w-full font-medium text-neutral-900 dark:text-neutral-100","transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2",H.height,H.padding,H.fontSize,I?H.symbolPadding:"",$(),i&&"opacity-50 cursor-not-allowed bg-neutral-50 dark:bg-neutral-700",d),style:E,"aria-required":a,"aria-invalid":l&&c==="error"?"true":"false","aria-describedby":l||m?`${e}-description`:void 0}),I&&C.jsx("span",{className:"absolute inset-y-0 right-0 flex items-center pr-3 text-neutral-900 dark:text-neutral-100 pointer-events-none",children:"%"})]}),n!=null&&C.jsxs("div",{className:"mt-1 flex justify-between items-center text-xs",children:[C.jsxs("div",{className:"flex items-center gap-2",children:[n<p&&C.jsxs("span",{className:"text-orange-500",children:["Below minimum (",p,"%)"]}),n>g&&C.jsxs("span",{className:"text-orange-500",children:["Above maximum (",g,"%)"]}),n>=p&&n<=g&&C.jsx("span",{className:"text-green-500",children:"Valid range"})]}),C.jsxs("span",{className:"text-neutral-400 dark:text-neutral-500",children:[n.toFixed(x),"%"]})]}),C.jsx(Dt.AnimatePresence,{children:l&&C.jsx(Dt.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${e}-description`,role:c==="error"?"alert":void 0,children:C.jsx(Ke,{className:G("mt-1",T()),appearance:"custom",size:"extra-small",variant:"medium",children:l})})}),m&&!l&&C.jsx("div",{id:`${e}-description`,className:"sr-only",children:m})]})});mE.displayName="PercentageInputField";const MV=(e,t,n,r,o)=>{const i={small:"w-7 h-4 after:h-3 after:w-3 after:top-0.5 after:left-0.5",medium:"w-9 h-5 after:h-4 after:w-4 after:top-0.5 after:left-0.5",large:"w-11 h-6 after:h-5 after:w-5 after:top-0.5 after:left-0.5"},a={small:"peer-checked:after:translate-x-3",medium:"peer-checked:after:translate-x-4",large:"peer-checked:after:translate-x-5"};return G("p-0.5 rounded-full peer after:content-[''] after:absolute after:rounded-full after:transition-all bg-gray-200",i[o],a[o],{"dark:bg-neutral-400 dark:peer-focus:ring-blue-800 dark:after:bg-neutral-500":n==="secondary"&&!e,"dark:bg-neutral-500 dark:peer-focus:ring-blue-800 dark:after:bg-neutral-700":n==="primary"&&!e,"peer-checked:bg-blue-600 dark:peer-checked:bg-primary-900 after:bg-white dark:after:bg-primary-500":e,"after:bg-white dark:after:bg-neutral-700":!e,"text-white dark:text-neutral-900":t,"cursor-not-allowed opacity-70":r})},Rh=w.forwardRef(({id:e,checked:t,onChange:n,label:r,required:o=!1,disabled:i=!1,message:a,messageType:s="default",wrapperClassName:l,toggleClassName:c,labelClassName:u,helpText:d,size:f="medium",labelDirection:m="top",hideStatus:h=!1,statusText:p,withIcon:g=!1,icon:y,variant:x="primary",originalCase:I=!1,stopClickPropagation:S=!0},b)=>{const E=m==="top",O=m==="left",N=m==="right",P=()=>s==="error"?"text-red-500 dark:text-red-400":s==="success"?"text-green-500 dark:text-green-400":s==="info"?"text-blue-500 dark:text-blue-400":"text-neutral-500 dark:text-neutral-400",A=T=>{i||n(T.target.checked)},k=()=>C.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),$=()=>C.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})});return C.jsxs("div",{className:G("flex flex-col w-full",l),onClick:T=>{S&&T.stopPropagation()},children:[E&&r&&C.jsx("div",{className:"w-full flex justify-between flex-wrap mb-1",children:C.jsx("label",{htmlFor:e,className:G("text-xs font-medium text-gray-600 dark:text-gray-300 inline-flex items-center gap-1",!I&&"capitalize",u),children:C.jsxs(Ke,{size:"extra-small",variant:"medium",appearance:"subtitle",children:[r,o&&C.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})})}),d&&C.jsx(Ke,{className:"mb-2 text-neutral-600 dark:text-neutral-400",appearance:"custom",size:"extra-small",variant:"regular",children:d}),C.jsxs("div",{className:"flex items-center",children:[O&&r&&C.jsx(Ke,{size:"small",variant:"medium",className:G("mr-2 text-neutral-700 dark:text-neutral-200",u),appearance:"custom",children:r}),C.jsxs("label",{className:G("relative inline-flex items-center",N||p?"":"w-min",i?"cursor-not-allowed opacity-50":"cursor-pointer"),onClick:T=>T.stopPropagation(),children:[C.jsx("input",{ref:b,type:"checkbox",id:e,onChange:A,disabled:i,checked:t,className:G("sr-only peer w-full",c),"aria-required":o,"aria-invalid":a&&s==="error"?"true":"false","aria-describedby":a||d?`${e}-description`:void 0}),C.jsx("div",{className:MV(t,g,x,i,f),children:g&&C.jsx("div",{className:"flex items-center justify-center h-full",children:C.jsx("div",{className:G("z-10 transition-all transform",f==="small"&&(t?"translate-x-2 translate-y-[-2px]":"translate-x-[-6px] translate-y-[-2px]"),f==="medium"&&(t?"translate-x-[8.5px] translate-y-[-2px]":"translate-x-[-8px] translate-y-[-2px]"),f==="large"&&(t?"translate-x-3 translate-y-[-2px]":"translate-x-[-10px] translate-y-[-2px]")),children:t?y?.checkedIcon?y.checkedIcon:C.jsx(k,{}):y?.uncheckedIcon?y.uncheckedIcon:C.jsx($,{})})})}),N&&r&&C.jsx(Ke,{size:"small",variant:"medium",className:G("ml-2 text-neutral-700 dark:text-neutral-300",u),appearance:"custom",children:r}),!h&&C.jsx(Ke,{size:"small",variant:"medium",className:"ml-2 text-neutral-900 dark:text-neutral-100",appearance:"custom",children:p||(t?"Yes":"No")})]})]}),C.jsx(Dt.AnimatePresence,{children:a&&C.jsx(Dt.motion.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},id:`${e}-description`,role:s==="error"?"alert":void 0,children:C.jsx(Ke,{className:G("mt-1",P()),appearance:"custom",size:"extra-small",variant:"medium",children:a})})}),d&&!a&&C.jsx("div",{id:`${e}-description`,className:"sr-only",children:d})]})});Rh.displayName="Toggle";var gE={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},hE=w.createContext&&w.createContext(gE),kV=["attr","size","title"];function jV(e,t){if(e==null)return{};var n=RV(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function RV(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Nd(){return Nd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nd.apply(this,arguments)}function vE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function $d(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vE(Object(n),!0).forEach(function(r){DV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DV(e,t,n){return t=FV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function FV(e){var t=LV(e,"string");return typeof t=="symbol"?t:t+""}function LV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bE(e){return e&&e.map((t,n)=>w.createElement(t.tag,$d({key:n},t.attr),bE(t.child)))}function Pd(e){return t=>w.createElement(BV,Nd({attr:$d({},e.attr)},t),bE(e.child))}function BV(e){var t=n=>{var{attr:r,size:o,title:i}=e,a=jV(e,kV),s=o||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),w.createElement("svg",Nd({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,a,{className:l,style:$d($d({color:e.color||n.color},n.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),i&&w.createElement("title",null,i),e.children)};return hE!==void 0?w.createElement(hE.Consumer,null,n=>t(n)):t(gE)}function _V(e){return Pd({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},child:[]},{tag:"polyline",attr:{points:"7 10 12 15 17 10"},child:[]},{tag:"line",attr:{x1:"12",y1:"15",x2:"12",y2:"3"},child:[]}]})(e)}function VV(e){return Pd({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"3 6 5 6 21 6"},child:[]},{tag:"path",attr:{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"},child:[]},{tag:"line",attr:{x1:"10",y1:"11",x2:"10",y2:"17"},child:[]},{tag:"line",attr:{x1:"14",y1:"11",x2:"14",y2:"17"},child:[]}]})(e)}function yE(e){return Pd({attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{opacity:"0.2",fillRule:"evenodd",clipRule:"evenodd",d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",fill:"currentColor"},child:[]},{tag:"path",attr:{d:"M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z",fill:"currentColor"},child:[]}]})(e)}function zV(e){return Pd({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM1.6 11.85H0v3.999h.791v-1.342h.803q.43 0 .732-.173.305-.175.463-.474a1.4 1.4 0 0 0 .161-.677q0-.375-.158-.677a1.2 1.2 0 0 0-.46-.477q-.3-.18-.732-.179m.545 1.333a.8.8 0 0 1-.085.38.57.57 0 0 1-.238.241.8.8 0 0 1-.375.082H.788V12.48h.66q.327 0 .512.181.185.183.185.522m1.217-1.333v3.999h1.46q.602 0 .998-.237a1.45 1.45 0 0 0 .595-.689q.196-.45.196-1.084 0-.63-.196-1.075a1.43 1.43 0 0 0-.589-.68q-.396-.234-1.005-.234zm.791.645h.563q.371 0 .609.152a.9.9 0 0 1 .354.454q.118.302.118.753a2.3 2.3 0 0 1-.068.592 1.1 1.1 0 0 1-.196.422.8.8 0 0 1-.334.252 1.3 1.3 0 0 1-.483.082h-.563zm3.743 1.763v1.591h-.79V11.85h2.548v.653H7.896v1.117h1.606v.638z"},child:[]}]})(e)}const{Dragger:HV}=ja,GV=e=>e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(2)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(2)} MB`:`${(e/(1024*1024*1024)).toFixed(2)} GB`,WV=(e,t=20)=>e?e.length<=t?e:e.slice(0,t-7)+"...."+e.slice(-7):"",xE=w.forwardRef(({id:e,onFileChange:t,description:n,errorMessage:r,disabled:o=!1,defaultFile:i=null,acceptedFiles:a="*",isLoading:s=!1,asBase64:l=!1,toFileServer:c=!1,setFileUploading:u,fileUploading:d=!1,multiple:f=!1,getRealFileName:m=!1,maxSize:h=50*1024*1024,onUpload:p,onDelete:g,wrapperClassName:y,uploadClassName:x,showFileSize:I=!0,formatFileSize:S=GV},b)=>{const[E,O]=w.useState(null),[N,P]=w.useState([]),[A,k]=w.useState("#d9d9d9"),[$,T]=w.useState(!1),[M,j]=w.useState(null),R=w.useCallback(async()=>{if(p)try{const z=await p(N),V=f?z?.map(L=>L?.fileUrl):z?.[0]?.fileUrl,D=m?E?.name:z?.[0]?.fileName;t(V,D),u?.(null)}catch(z){console.error("Upload failed:",z),u?.(null)}},[p,N,f,E,m,t,u]),_={accept:a,multiple:f,showUploadList:!1,disabled:o,onRemove:()=>{P([])},beforeUpload:(z,V)=>{if(z.size>h){const D=(h/1048576).toFixed(0);return console.error(`File size exceeds ${D}MB limit`),!1}return O(z),c?(u?.(e||"field-file-upload"),P(V)):(l?Promise.all((f?V:[z]).map(D=>new Promise(L=>{const F=new FileReader;F.onload=U=>{L({filename:D.name,content:U?.target?.result?.split(",")[1]})},F.readAsDataURL(D)}))).then(D=>{t(f?D:D[0])}):t(z),O(z)),!1}},H=async()=>{if(c&&M&&g)try{await g(M),j(null)}catch(z){console.error("Delete failed:",z)}O(null),P([]),t(null)};return w.useEffect(()=>{k(r?"#EF4444":"#d9d9d9")},[r]),w.useEffect(()=>{N.length&&c&&R()},[N,c,R]),w.useEffect(()=>{i?.name&&O(i)},[i]),C.jsxs("div",{ref:b,className:G("w-full",y),children:[C.jsx("div",{className:"h-32",onMouseEnter:()=>T(!0),onMouseLeave:()=>T(!1),children:C.jsx(HV,{..._,className:x,style:{borderColor:$&&!r?"#1890ff":A},disabled:o||d,children:E?C.jsxs("div",{className:"flex items-center justify-between mx-5",title:E?.name||i?.name||"",children:[C.jsxs("div",{className:"flex items-center justify-center gap-4",children:[E?.type==="application/pdf"?C.jsx("div",{className:"p-3 bg-[#E6F1FC] rounded-lg",children:C.jsx(zV,{size:20,fill:"#006CCF"})}):C.jsx("div",{className:"p-3 bg-[#E6F1FC] rounded-lg",children:C.jsx(TV,{sx:{height:"20px",width:"20px",color:"#006CCF"}})}),C.jsxs("div",{className:"text-left",children:[C.jsx(Ke,{size:"small",variant:"medium",className:"font-inter text-md font-medium text-base",children:WV(E?.name||i?.name||"")}),d?C.jsx(Ke,{size:"small",variant:"medium",appearance:"subtitle",children:"Uploading..."}):I&&E?.size>0?C.jsx(Ke,{size:"small",variant:"medium",appearance:"subtitle",children:S(E.size)}):null]})]}),s?C.jsx(yE,{size:40,className:"spinner text-primary-600"}):C.jsx("button",{id:`btn-file-upload-${e}`,className:"ml-4",onClick:z=>{z.stopPropagation(),H()},disabled:o,type:"button","aria-label":"Delete file",children:C.jsx(VV,{size:20,className:"text-gray-400"})})]}):C.jsx("div",{className:"flex items-center justify-center",children:C.jsxs("div",{className:"flex-col",children:[C.jsx("div",{className:"mb-4 flex justify-center",children:C.jsx(_V,{size:24,className:"text-gray-400"})}),C.jsxs("div",{children:[C.jsxs("div",{className:"flex items-center justify-center",children:[C.jsx(Ke,{size:"small",variant:"medium",className:"text-primary-600 dark:text-primary-300",appearance:"custom",children:"Click to upload"}),C.jsx(Ke,{size:"small",variant:"medium",className:"ml-1",appearance:"subtitle",children:"or drag and drop"})]}),n?C.jsx(Ke,{size:"small",variant:"medium",appearance:"subtitle",children:n}):null]})]})})})}),r&&C.jsx(Ke,{className:"text-red-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:r})]})});xE.displayName="MultiFileUpload";const{Dragger:UV}=ja,XV=200*1024*1024,YV=(e,t,n,r,o)=>{const i={small:"h-24",medium:"h-32",large:"h-40"},a={primary:"border-blue-200 hover:border-blue-400",secondary:"border-gray-200 hover:border-gray-400"};return G("border-2 border-dashed rounded-lg transition-colors duration-200",i[e],a[t],{"border-red-400 bg-red-50":r,"cursor-not-allowed opacity-50":n,"cursor-pointer":!n})},JV=()=>C.jsx("div",{className:"p-3 bg-blue-50 rounded-lg",children:C.jsx("svg",{className:"w-5 h-5 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z",clipRule:"evenodd"})})}),ZV=()=>C.jsx("div",{className:"p-3 bg-blue-50 rounded-lg",children:C.jsx("svg",{className:"w-5 h-5 text-blue-600",fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4z",clipRule:"evenodd"})})}),qV=()=>C.jsx("svg",{className:"w-6 h-6 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),KV=()=>C.jsx("svg",{className:"w-5 h-5 text-gray-400",fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}),CE=w.forwardRef(({id:e,onFileSelect:t,onUpload:n,description:r,errorMessage:o,disabled:i=!1,defaultFile:a=null,acceptedFiles:s="*",isLoading:l=!1,asBase64:c=!1,multiple:u=!1,hideSelectedFile:d=!1,onDelete:f,maxSize:m=XV,wrapperClassName:h,uploadClassName:p,size:g="medium",variant:y="primary",uploadIcon:x,deleteIcon:I,fileTypeIcons:S,showFileSize:b=!0,showProgress:E=!1,progress:O=0},N)=>{const[P,A]=w.useState(null),[k,$]=w.useState(!1),T=(z,V)=>{if(z.size>m){const D=Math.round(m/1048576);return console.error(`File size exceeds the limit of ${D} MB`),ja.LIST_IGNORE}if(d||A(z),c){const D=new FileReader;D.onload=L=>{const F=L?.target?.result;t(F,z.name)},D.readAsDataURL(z)}else t(u?V:z,z.name);return n&&n(u?V:z),ja.LIST_IGNORE},M=()=>{A(null),t(null),f?.()},j=z=>{if(z===0)return"0 Bytes";const V=1024,D=["Bytes","KB","MB","GB"],L=Math.floor(Math.log(z)/Math.log(V));return parseFloat((z/Math.pow(V,L)).toFixed(2))+" "+D[L]},R=z=>z.length<=30?z:`${z.slice(0,23)}....${z.slice(-7)}`,_=z=>z.type==="application/pdf"?S?.pdf||C.jsx(JV,{}):S?.default||C.jsx(ZV,{});w.useEffect(()=>{a&&A(a)},[a]);const H={accept:s,multiple:u,showUploadList:!1,disabled:i,beforeUpload:T};return C.jsxs("div",{ref:N,className:G("w-full",h),children:[C.jsx("div",{className:G(YV(g,y,i,!!o),p),onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),role:"button",tabIndex:i?-1:0,"aria-label":"File upload area",children:C.jsx(UV,{...H,children:P&&!d?C.jsxs("div",{className:"flex items-center justify-between mx-5",title:P.name,children:[C.jsxs("div",{className:"flex items-center gap-4",children:[_(P),C.jsxs("div",{className:"text-left",children:[C.jsx(Ke,{size:"small",variant:"medium",className:"text-neutral-900 font-medium",children:R(P.name)}),b&&P.size>0&&C.jsx(Ke,{size:"small",variant:"medium",appearance:"subtitle",children:j(P.size)}),E&&O>0&&C.jsxs("div",{className:"mt-1",children:[C.jsx("div",{className:"w-full bg-gray-200 rounded-full h-1",children:C.jsx("div",{className:"bg-blue-600 h-1 rounded-full transition-all duration-300",style:{width:`${O}%`}})}),C.jsxs(Ke,{size:"extra-small",variant:"medium",appearance:"subtitle",children:[O,"% uploaded"]})]})]})]}),l?C.jsx("div",{className:"animate-spin",children:C.jsx("svg",{className:"w-5 h-5 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}):C.jsx("button",{className:"ml-4 p-1 hover:bg-gray-100 rounded",onClick:z=>{z.stopPropagation(),M()},disabled:i,type:"button","aria-label":"Delete file",children:I||C.jsx(KV,{})})]}):C.jsx("div",{className:"flex items-center justify-center h-full",children:C.jsxs("div",{className:"flex flex-col items-center",children:[C.jsx("div",{className:"mb-4 flex justify-center",children:x||C.jsx(qV,{})}),C.jsxs("div",{className:"text-center",children:[C.jsxs("div",{className:"flex items-center justify-center gap-1",children:[C.jsx(Ke,{size:"small",variant:"medium",className:"text-blue-600 dark:text-blue-300",appearance:"custom",children:"Click to upload"}),C.jsx(Ke,{size:"small",variant:"medium",appearance:"subtitle",children:"or drag and drop"})]}),r&&C.jsx(Ke,{size:"small",variant:"medium",className:"text-neutral-400 mt-1",children:r})]})]})})})}),o&&C.jsx(Ke,{className:"text-red-500 mt-1",appearance:"custom",size:"extra-small",variant:"medium",children:o})]})});CE.displayName="FileUpload";const wE=w.forwardRef(({status:e,children:t,className:n,size:r="medium","aria-label":o},i)=>{const a=()=>{switch(r){case"small":return"text-xs px-1.5 py-0.5";case"large":return"text-base px-3 py-1.5";default:return"text-sm px-2 py-1"}},s=()=>{switch(e?.toLowerCase()){case"purple":return"bg-purple-50 text-purple-500 border border-purple-100 dark:bg-purple-950 dark:text-purple-400 dark:border-purple-800";case"blue":return"bg-blue-50 text-blue-500 border border-blue-100 dark:bg-blue-950 dark:text-blue-400 dark:border-blue-800";case"teal":return"bg-teal-50 text-teal-500 border border-teal-100 dark:bg-teal-950 dark:text-teal-400 dark:border-teal-800";case"green":return"bg-green-50 text-green-500 border border-green-100 dark:bg-green-950 dark:text-green-400 dark:border-green-800";case"yellow":return"bg-yellow-50 text-yellow-600 border border-yellow-100 dark:bg-yellow-950 dark:text-yellow-400 dark:border-yellow-800";case"orange":return"bg-orange-50 text-orange-500 border border-orange-100 dark:bg-orange-950 dark:text-orange-400 dark:border-orange-800";case"peach":return"bg-orange-50 text-orange-400 border border-orange-100 dark:bg-orange-950 dark:text-orange-300 dark:border-orange-800";case"red":return"bg-red-50 text-red-500 border border-red-100 dark:bg-red-950 dark:text-red-400 dark:border-red-800";case"navy":return"bg-slate-50 text-slate-700 border border-slate-100 dark:bg-slate-950 dark:text-slate-400 dark:border-slate-800";case"grey":return"bg-neutral-50 text-neutral-500 border border-neutral-100 dark:bg-neutral-950 dark:text-neutral-400 dark:border-neutral-800";default:return"bg-blue-50 text-blue-600 border border-blue-200 dark:bg-blue-950 dark:text-blue-400 dark:border-blue-800"}};return C.jsx("span",{ref:i,className:G("inline-flex items-center justify-center font-medium rounded-md transition-colors",a(),s(),n),"aria-label":o||`Status: ${e||"default"}`,role:"status",children:t})});wE.displayName="StatusColorMapping";const SE=w.forwardRef(({status:e="default",children:t,appearance:n="outline",size:r="md",className:o,isRounded:i=!1,capitalize:a=!0,"aria-label":s},l)=>{const c=h=>!h||!a?h:h.replace(/\w\S*/g,p=>p.charAt(0).toUpperCase()+p.substr(1).toLowerCase()),u=()=>{switch(r){case"sm":return"text-xs px-1.5 py-0.5";case"lg":return"text-sm px-3 py-1.5";default:return"text-xs px-2 py-1"}},d=()=>{switch(e){case"primary":case"default":return"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-300 border border-blue-300 dark:border-blue-700";case"warning":return"bg-yellow-50 dark:bg-yellow-950 text-yellow-600 dark:text-yellow-300 border border-yellow-300 dark:border-yellow-700";case"error":return"bg-red-50 dark:bg-red-950 text-red-600 dark:text-red-300 border border-red-300 dark:border-red-700";case"neutral":return"bg-neutral-50 dark:bg-neutral-950 text-neutral-600 dark:text-neutral-300 border border-neutral-300 dark:border-neutral-700";case"success":return"bg-green-50 dark:bg-green-950 text-green-600 dark:text-green-300 border border-green-300 dark:border-green-700";case"info":return"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-300 border border-blue-300 dark:border-blue-700";default:return"bg-blue-50 dark:bg-blue-950 text-blue-600 dark:text-blue-300 border border-blue-300 dark:border-blue-700"}},f=()=>{switch(e){case"primary":case"default":return"bg-blue-600 dark:bg-blue-700 text-white";case"warning":return"bg-yellow-600 dark:bg-yellow-700 text-white";case"success":return"bg-green-600 dark:bg-green-700 text-white";case"error":return"bg-red-600 dark:bg-red-700 text-white";case"neutral":return"bg-neutral-600 dark:bg-neutral-700 text-white";case"info":return"bg-blue-600 dark:bg-blue-700 text-white";default:return"bg-blue-600 dark:bg-blue-700 text-white"}},m=()=>n==="filled"?f():d();return C.jsx("span",{ref:l,className:G("inline-flex items-center justify-center font-medium transition-colors",i?"rounded-full":"rounded",u(),m(),o),"aria-label":s||`Badge: ${e}`,role:"status",children:c(t)})});SE.displayName="Badge";const EE=(e={})=>{const{primaryContainerId:t="layout-app-main-content-container",fallbackContainerId:n="full-screen-container",maxRetries:r=10,retryDelay:o=100}=e,[i,a]=w.useState(null);return w.useEffect(()=>{let s=0,l;const c=d=>{if(typeof document<"u"){const f=document.getElementById(d);if(f)return f}if(typeof globalThis<"u"&&globalThis.window&&globalThis.window.parent&&globalThis.window.parent!==globalThis.window)try{const f=globalThis.window.parent.document?.getElementById(d);if(f)return f}catch{}return null},u=()=>{let d=c(t);if(!d&&n&&(d=c(n)),d){a(d);return}s<r?(s++,l=setTimeout(u,o)):a(document.body)};return u(),()=>{l&&clearTimeout(l)}},[t,n,r,o]),i},Ui=e=>{const{open:t,children:n,title:r,mask:o=!0,onlyBody:i=!1,bodySpacing:a=!0,headerRightContent:s,parentContainer:l,zIndex:c,asForm:u,onSubmit:d,showCloseButton:f=!0,noPadding:m=!1,...h}=e,p=EE({primaryContainerId:"layout-app-main-content-container",fallbackContainerId:"full-screen-container"}),g=C.jsxs(C.Fragment,{children:[C.jsxs("div",{className:"flex justify-between items-center",children:[f?C.jsx(Ke,{size:"large",variant:"semibold",className:"tour__title",children:r}):C.jsx("div",{className:"flex flex-col w-full",children:r}),s||f&&C.jsx("button",{id:"btn-modal-close",onClick:h.onCancel,className:"",type:"button",children:C.jsx(AV,{sx:{fontSize:"20px"},className:"cursor-pointer text-neutral-400 hover:text-neutral-600"})})]}),h.addLineAfterHeader&&C.jsx("hr",{className:"mt-2"})]}),y=u?"form":"div",x=()=>{if(l){if(typeof document<"u"){const E=document.getElementById(l);if(E)return E}if(typeof globalThis<"u"&&globalThis.window&&globalThis.window.parent&&globalThis.window.parent!==globalThis.window)try{const E=globalThis.window.parent.document?.getElementById(l);if(E)return E}catch{}}return p};if(!t)return null;const I=x();if(!I)return null;const S=I!==document.body;return C.jsx(Tr,{open:t,centered:!0,closable:!1,title:i?null:g,modalRender:E=>C.jsx(y,{onSubmit:O=>{O.preventDefault(),d&&d()},children:C.jsx("div",{role:"none",onClick:O=>O.stopPropagation(),children:E})}),styles:{content:{padding:m?"0px":"20px 0px"},header:{padding:m?"0px":"0px 20px"},body:{padding:m?"0px":a?"0px 20px":"0px"},footer:{padding:m?"0px":"0px 20px"},mask:{zIndex:c||5e3,position:S?"absolute":void 0,top:S?0:void 0,right:S?0:void 0,bottom:S?0:void 0,left:S?0:void 0},wrapper:{zIndex:c||5001,position:S?"absolute":void 0,top:S?0:void 0,right:S?0:void 0,bottom:S?0:void 0,left:S?0:void 0,backgroundColor:o?"rgb(16 24 40 / 80%)":void 0}},mask:o,...h,getContainer:()=>I,children:n})},IE=({size:e=20,className:t="",...n})=>C.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`text-primary-600 dark:text-primary-300 cursor-pointer ${t}`,...n,children:[C.jsx("circle",{cx:"11",cy:"11",r:"8"}),C.jsx("path",{d:"M21 21l-4.35-4.35"})]}),Dh=e=>e===1||e==="1"||typeof e=="string"&&e.toLowerCase()==="yes"||typeof e=="string"&&e.toLowerCase()==="true"?"Yes":e===0||e==="0"||typeof e=="string"&&e.toLowerCase()==="no"||typeof e=="string"&&e.toLowerCase()==="false"?"No":e?.toString()||"-",Fh=(e,t="USD")=>{try{if(e==null)return"";const n=Number(e);if(isNaN(n))return e?.toString()||"";const r=n.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});return`${{USD:"$",EUR:"€",GBP:"£",JPY:"¥",CAD:"C$",AUD:"A$",CHF:"CHF",CNY:"¥",SEK:"kr",NOK:"kr",DKK:"kr",PLN:"zł",CZK:"Kč",HUF:"Ft",RUB:"₽",BRL:"R$",INR:"₹",KRW:"₩",SGD:"S$",HKD:"HK$",NZD:"NZ$",MXN:"$",ZAR:"R",TRY:"₺",ILS:"₪",AED:"د.إ",SAR:"﷼",QAR:"﷼",KWD:"د.ك",BHD:"د.ب",OMR:"﷼",JOD:"د.ا",LBP:"ل.ل",EGP:"£",MAD:"د.م.",TND:"د.ت",DZD:"د.ج",LYD:"ل.د",SDG:"ج.س.",ETB:"Br",KES:"KSh",UGX:"USh",TZS:"TSh",ZMW:"ZK",BWP:"P",ZWL:"Z$",AOA:"Kz",MZN:"MT",GHS:"₵",NGN:"₦",XAF:"FCFA",XOF:"CFA",CDF:"FC",RWF:"RF",BIF:"FBu",KMF:"CF",DJF:"Fdj",SOS:"S",ERN:"Nfk"}[t]||"$"}${r}`}catch{return"-"}},xl=(e,t={})=>{const{format:n,relative:r=!1,withTime:o=!0,fallback:i="-",skipTimezone:a=!1,onlyTime:s=!1}=t||{};if(!e)return i;try{const l=new Date(e);if(isNaN(l.getTime()))return i;if(r){const m=Math.floor((new Date().getTime()-l.getTime())/1e3);return m<60?"just now":m<3600?`${Math.floor(m/60)} minutes ago`:m<86400?`${Math.floor(m/3600)} hours ago`:m<2592e3?`${Math.floor(m/86400)} days ago`:m<31536e3?`${Math.floor(m/2592e3)} months ago`:`${Math.floor(m/31536e3)} years ago`}const c="MM/dd/yyyy",u="hh:mm a",d=o&&!s;return l.toLocaleDateString("en-US",{year:"numeric",month:"2-digit",day:"2-digit",hour:o?"2-digit":void 0,minute:o?"2-digit":void 0,hour12:!0})}catch{return i}},OE=e=>typeof e=="string"&&/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(e),NE=w.forwardRef(({label:e,value:t,className:n,type:r="string",tags:o,tooltip:i,items:a,isModified:s=!1,isChanged:l=!1,size:c="medium",isHighlighted:u=!1,deletedValue:d,highlightColor:f="warning",isSearchActive:m=!1,originalValue:h=!1,showDiff:p=!1,theme:g="light",onUpload:y,acceptsUpload:x=!1,MasterDataModal:I,riskDetails:S,isRiskAnalysisOpen:b=!1,RiskDetailsCard:E,"aria-label":O},N)=>{const[P,A]=w.useState(!0),[k,$]=w.useState(!1),[T,M]=w.useState(null),[j,R]=w.useState(!1),_=()=>{A(!P)},H=U=>{$(!0),M({...U,value:t})},z=()=>{$(!1),M(null)},V=U=>{const K=U.target.files?.[0];K&&y&&y(K),U.target.value=""},D=()=>{const U=typeof t=="string"&&OE(t);if(m&&typeof t=="object")return t;if(t||r==="boolean"&&t===0||r==="currency"&&Number(t)>=0){if((t===!0||t==="True")&&!h)return"Yes";if((t===!1||t==="False")&&!h)return"No";if(r==="url")return C.jsx("a",{href:t,className:"text-primary-600 truncate",children:t});if(r==="boolean")return Dh(t);if(r==="currency")return Fh(t,a?.currency_code)||"-";if(r==="datetime"){const K=typeof t=="string"&&t.includes("Z")?t.replace(/\.000Z$/,"Z"):t;return xl(K,{skipTimezone:!1,withTime:!0})}else if(r==="date"||U){const K=typeof t=="string"&&t.includes("Z")?t.replace(/\.000Z$/,"Z"):t;return xl(K,{skipTimezone:!0,withTime:!1})}else return r==="percentage"?`${t}%`:typeof t=="string"&&t.length>100?C.jsxs("p",{children:[t.slice(0,P?100:t.length),P?"... ":" ",C.jsx("button",{id:`btn-label-value-${P?"Show more":"Show less"}`,className:"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap",onClick:_,onKeyDown:K=>{(K.key==="Enter"||K.key===" ")&&(K.preventDefault(),_())},"aria-label":P?"Show more content":"Show less content",type:"button",children:P?"Show more":"Show less"})]}):t}return"-"},L=()=>{switch(c){case"small":return"extra-small";case"large":return"large";default:return"small"}},F=()=>{switch(f){case"success":return"bg-success-100";case"warning":return"bg-warning-100";case"error":return"bg-error-100";case"info":return"bg-info-100";default:return"bg-warning-100"}};return C.jsxs("div",{ref:N,className:G("font-medium relative",n),onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),"aria-label":O||`Label: ${e}, Value: ${t}`,children:[C.jsxs(Ke,{variant:"medium",size:L(),className:"flex gap-1 flex-wrap",appearance:"subtitle",children:[e," ",C.jsx(Vw,{labels:o?.map(U=>({...U,color:U.color||"primary"}))}),o&&o.length>0&&C.jsx(C.Fragment,{children:o.map(U=>C.jsx(Ra,{label:U.label,color:U.color,size:"xs",theme:g},`${U.label}-${U.value||U.color}`))}),i&&C.jsx(jo,{placement:"top",title:i,children:C.jsx("div",{className:"cursor-pointer",role:"button",tabIndex:0,onKeyDown:U=>{(U.key==="Enter"||U.key===" ")&&U.preventDefault()},children:C.jsx(Lw,{size:14})})})]}),C.jsxs(Ke,{variant:"medium",size:L(),className:G("text-- whitespace-normal break-all flex gap-1 pt-0.5",s&&"bg-neutral-50 dark:bg-black-700 p-1 rounded",b&&S?.color&&`bg-${S.color}-50 border-${S.color}-300 px-0.5 rounded-lg`),appearance:"body",children:[p&&d&&t?C.jsxs("div",{className:"flex gap-2",children:[C.jsx("span",{className:"line-through",children:d}),C.jsx("span",{children:D()})]}):l||u?C.jsx("mark",{className:G("rounded-md py-0.5 px-1",F()),children:D()}):D(),a?.is_master_data&&a?.reference&&t&&C.jsx("button",{onClick:()=>H(a),onKeyDown:U=>{(U.key==="Enter"||U.key===" ")&&(U.preventDefault(),H(a))},"aria-label":`Search master data for ${e}`,type:"button",className:"cursor-pointer",children:C.jsx(IE,{size:20})}),x&&C.jsx("input",{type:"file",onChange:V,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer","aria-label":`Upload file for ${e}`})]}),d&&!p&&C.jsx(Ke,{variant:"medium",size:"extra-small",className:"pt-0.5",appearance:"body",children:C.jsx("mark",{className:"rounded-md py-0.5 px-1 bg-error-100",children:C.jsx("del",{children:d||r==="boolean"&&d==="0"?d==="True"?"Yes":d==="False"?"No":r==="boolean"?Dh(d):r==="currency"?Fh(d,a?.currency_code):r==="date"?xl(d,{skipTimezone:!0,withTime:!1}):r==="datetime"?xl(d,{skipTimezone:!0,withTime:!0}):r==="percentage"?`${d}%`:d.length>100?C.jsxs("p",{children:[d.slice(0,P?100:d.length),P?"... ":" ",C.jsx("button",{id:`btn-label-value-${P?"Show more":"Show less"}`,className:"text-primary-400 text-sm hover:text-primary-500 cursor-pointer whitespace-nowrap",onClick:_,children:P?"Show more":"Show less"})]}):d:"-"})})}),I&&C.jsx(I,{isVisible:k,onClose:z,masterdataInfo:T}),j&&S&&b&&C.jsx("div",{className:"absolute left-0 right-0 top-[95%] mt-1 z-50 bg-white dark:bg-black-600 rounded-xl",onClick:U=>U.stopPropagation(),onMouseDown:U=>U.preventDefault(),onKeyDown:U=>{U.key==="Escape"&&R(!1)},role:"tooltip","aria-label":"Risk analysis details",tabIndex:0,children:E?C.jsx(E,{riskDetails:S}):C.jsx("div",{className:"shadow-lg p-4",children:C.jsxs("div",{className:"text-sm",children:[C.jsx("h4",{className:"font-semibold mb-2",children:"Risk Details"}),C.jsx("p",{className:"text-neutral-600 dark:text-neutral-300",children:S.description||"Risk analysis information"})]})})})]})});NE.displayName="LabelValue";const $E=w.forwardRef(({status:e,children:t,additionalChildren:n,ExpandedComponent:r,expandable:o=!1,icon:i,className:a,onClick:s,"aria-label":l},c)=>{const[u,d]=w.useState(!1),f=()=>{switch(e){case"success":return"bg-green-50 dark:bg-green-950 text-green-700 dark:text-green-300 border-l-4 border-green-400 dark:border-green-600";case"error":return"bg-red-50 dark:bg-red-950 text-red-700 dark:text-red-300 border-l-4 border-red-400 dark:border-red-600";case"warning":return"bg-yellow-50 dark:bg-yellow-950 text-yellow-700 dark:text-yellow-300 border-l-4 border-yellow-400 dark:border-yellow-600";case"info":return"bg-blue-50 dark:bg-blue-950 text-blue-700 dark:text-blue-300 border-l-4 border-blue-400 dark:border-blue-600";case"archived":return"bg-neutral-50 dark:bg-neutral-950 text-neutral-700 dark:text-neutral-300 border-l-4 border-neutral-400 dark:border-neutral-600";case"canceled":return"bg-gray-50 dark:bg-gray-950 text-gray-700 dark:text-gray-300 border-l-4 border-gray-400 dark:border-gray-600";case"queued":return"bg-blue-50 dark:bg-blue-950 text-blue-700 dark:text-blue-300 border-l-4 border-blue-400 dark:border-blue-600";case"paused":return"bg-orange-50 dark:bg-orange-950 text-orange-700 dark:text-orange-300 border-l-4 border-orange-400 dark:border-orange-600";case"awaiting_action":return"bg-orange-50 dark:bg-orange-950 text-orange-700 dark:text-orange-300 border-l-4 border-orange-400 dark:border-orange-600";case"skipped":return"bg-gray-50 dark:bg-gray-950 text-gray-700 dark:text-gray-300 border-l-4 border-gray-400 dark:border-gray-600";case"pending":return"bg-purple-50 dark:bg-purple-950 text-purple-700 dark:text-purple-300 border-l-4 border-purple-400 dark:border-purple-600";default:return"bg-blue-50 dark:bg-blue-950 text-blue-700 dark:text-blue-300 border-l-4 border-blue-400 dark:border-blue-600"}},m=()=>{if(i)return i;const g="w-5 h-5 flex-shrink-0";switch(e){case"success":return C.jsx("svg",{className:G(g,"text-green-600 dark:text-green-400"),fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.236 4.53L7.53 10.06a.75.75 0 00-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})});case"error":return C.jsx("svg",{className:G(g,"text-red-600 dark:text-red-400"),fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z",clipRule:"evenodd"})});case"warning":return C.jsx("svg",{className:G(g,"text-yellow-600 dark:text-yellow-400"),fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})});case"info":case"queued":case"pending":return C.jsx("svg",{className:G(g,"text-blue-600 dark:text-blue-400"),fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})});case"paused":return C.jsx("svg",{className:G(g,"text-orange-600 dark:text-orange-400"),fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{d:"M5.75 3a.75.75 0 00-.75.75v12.5c0 .414.336.75.75.75h1.5a.75.75 0 00.75-.75V3.75A.75.75 0 007.25 3h-1.5zM12.75 3a.75.75 0 00-.75.75v12.5c0 .414.336.75.75.75h1.5a.75.75 0 00.75-.75V3.75a.75.75 0 00-.75-.75h-1.5z"})});case"archived":case"canceled":case"skipped":return C.jsx("svg",{className:G(g,"text-gray-600 dark:text-gray-400"),fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z",clipRule:"evenodd"})});case"awaiting_action":return C.jsx("svg",{className:G(g,"text-orange-600 dark:text-orange-400"),fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm.75-13a.75.75 0 00-1.5 0v5c0 .414.336.75.75.75h4a.75.75 0 000-1.5h-3.25V5z",clipRule:"evenodd"})});default:return C.jsx("svg",{className:G(g,"text-blue-600 dark:text-blue-400"),fill:"currentColor",viewBox:"0 0 20 20",children:C.jsx("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})})}},h=()=>{(o||e==="error")&&(d(!u),s?.())},p=o||e==="error";return C.jsxs("div",{ref:c,className:G("w-full",a),children:[C.jsxs("div",{className:G("flex items-center justify-between p-4 rounded-lg font-medium text-sm transition-all duration-200",f(),p&&["cursor-pointer select-none","hover:shadow-md","active:scale-[0.99]"]),onClick:h,role:p?"button":void 0,tabIndex:p?0:void 0,onKeyDown:g=>{p&&(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),h())},"aria-label":l||`Banner: ${e}`,"aria-expanded":p?u:void 0,children:[C.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[m(),C.jsx("span",{className:"flex-1",children:t})]}),C.jsxs("div",{className:"flex items-center gap-2",children:[n&&C.jsx("div",{className:"flex items-center",children:n}),p&&C.jsx("div",{className:"flex items-center",children:C.jsx("svg",{className:G("w-5 h-5 transition-transform duration-200",u?"rotate-180":"rotate-0"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})})]})]}),C.jsx(Dt.AnimatePresence,{children:u&&r&&C.jsx(Dt.motion.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},className:"overflow-hidden",children:C.jsx("div",{className:"pt-2",children:C.jsx(r,{children:t})})})})]})});$E.displayName="Banner";var Nn=function(){return Nn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Nn.apply(this,arguments)},PE={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},AE={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},Ad={width:"20px",height:"20px",position:"absolute",zIndex:1},QV={top:Nn(Nn({},PE),{top:"-5px"}),right:Nn(Nn({},AE),{left:void 0,right:"-5px"}),bottom:Nn(Nn({},PE),{top:void 0,bottom:"-5px"}),left:Nn(Nn({},AE),{left:"-5px"}),topRight:Nn(Nn({},Ad),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Nn(Nn({},Ad),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Nn(Nn({},Ad),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Nn(Nn({},Ad),{left:"-10px",top:"-10px",cursor:"nw-resize"})},ez=w.memo(function(e){var t=e.onResizeStart,n=e.direction,r=e.children,o=e.replaceStyles,i=e.className,a=w.useCallback(function(c){t(c,n)},[t,n]),s=w.useCallback(function(c){t(c,n)},[t,n]),l=w.useMemo(function(){return Nn(Nn({position:"absolute",userSelect:"none"},QV[n]),o??{})},[o,n]);return C.jsx("div",{className:i||void 0,style:l,onMouseDown:a,onTouchStart:s,children:r})}),tz=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),go=function(){return go=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},go.apply(this,arguments)},nz={width:"auto",height:"auto"},Td=function(e,t,n){return Math.max(Math.min(e,n),t)},TE=function(e,t,n){var r=Math.round(e/t);return r*t+n*(r-1)},Xa=function(e,t){return new RegExp(e,"i").test(t)},Md=function(e){return!!(e.touches&&e.touches.length)},rz=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},ME=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(i,a,s){return Math.abs(a-e)<Math.abs(t[i]-e)?s:i},0),o=Math.abs(t[r]-e);return n===0||o<n?t[r]:e},Lh=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:"".concat(e,"px")},kd=function(e,t,n,r){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var o=Number(e.replace("%",""))/100;return t*o}if(e.endsWith("vw")){var o=Number(e.replace("vw",""))/100;return n*o}if(e.endsWith("vh")){var o=Number(e.replace("vh",""))/100;return r*o}}return e},oz=function(e,t,n,r,o,i,a){return r=kd(r,e.width,t,n),o=kd(o,e.height,t,n),i=kd(i,e.width,t,n),a=kd(a,e.height,t,n),{maxWidth:typeof r>"u"?void 0:Number(r),maxHeight:typeof o>"u"?void 0:Number(o),minWidth:typeof i>"u"?void 0:Number(i),minHeight:typeof a>"u"?void 0:Number(a)}},iz=function(e){return Array.isArray(e)?e:[e,e]},az=["as","ref","style","className","grid","gridGap","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],kE="__resizable_base__",sz=function(e){tz(t,e);function t(n){var r,o,i,a,s=e.call(this,n)||this;return s.ratio=1,s.resizable=null,s.parentLeft=0,s.parentTop=0,s.resizableLeft=0,s.resizableRight=0,s.resizableTop=0,s.resizableBottom=0,s.targetLeft=0,s.targetTop=0,s.delta={width:0,height:0},s.appendBase=function(){if(!s.resizable||!s.window)return null;var l=s.parentNode;if(!l)return null;var c=s.window.document.createElement("div");return c.style.width="100%",c.style.height="100%",c.style.position="absolute",c.style.transform="scale(0, 0)",c.style.left="0",c.style.flex="0 0 100%",c.classList?c.classList.add(kE):c.className+=kE,l.appendChild(c),c},s.removeBase=function(l){var c=s.parentNode;c&&c.removeChild(l)},s.state={isResizing:!1,width:(o=(r=s.propsSize)===null||r===void 0?void 0:r.width)!==null&&o!==void 0?o:"auto",height:(a=(i=s.propsSize)===null||i===void 0?void 0:i.height)!==null&&a!==void 0?a:"auto",direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},s.onResizeStart=s.onResizeStart.bind(s),s.onMouseMove=s.onMouseMove.bind(s),s.onMouseUp=s.onMouseUp.bind(s),s}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||nz},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,i=this.resizable.offsetHeight,a=this.resizable.style.position;a!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:o,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:i,this.resizable.style.position=a}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,o=function(s){var l;if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&(!((l=n.propsSize[s])===null||l===void 0)&&l.toString().endsWith("%"))){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var c=n.getParentSize(),u=Number(n.state[s].toString().replace("px","")),d=u/c[s]*100;return"".concat(d,"%")}return Lh(n.state[s])},i=r&&typeof r.width<"u"&&!this.state.isResizing?Lh(r.width):o("width"),a=r&&typeof r.height<"u"&&!this.state.isResizing?Lh(r.height):o("height");return{width:i,height:a}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,o=this.parentNode.style.flexWrap;o!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var i={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=o),this.removeBase(n),i},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var o=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof o>"u"||o==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var o=this.props.boundsByDirection,i=this.state.direction,a=o&&Xa("left",i),s=o&&Xa("top",i),l,c;if(this.props.bounds==="parent"){var u=this.parentNode;u&&(l=a?this.resizableRight-this.parentLeft:u.offsetWidth+(this.parentLeft-this.resizableLeft),c=s?this.resizableBottom-this.parentTop:u.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=a?this.resizableRight:this.window.innerWidth-this.resizableLeft,c=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=a?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),c=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n<l?n:l),c&&Number.isFinite(c)&&(r=r&&r<c?r:c),{maxWidth:n,maxHeight:r}},t.prototype.calculateNewSizeFromDirection=function(n,r){var o=this.props.scale||1,i=iz(this.props.resizeRatio||1),a=i[0],s=i[1],l=this.state,c=l.direction,u=l.original,d=this.props,f=d.lockAspectRatio,m=d.lockAspectRatioExtraHeight,h=d.lockAspectRatioExtraWidth,p=u.width,g=u.height,y=m||0,x=h||0;return Xa("right",c)&&(p=u.width+(n-u.x)*a/o,f&&(g=(p-x)/this.ratio+y)),Xa("left",c)&&(p=u.width-(n-u.x)*a/o,f&&(g=(p-x)/this.ratio+y)),Xa("bottom",c)&&(g=u.height+(r-u.y)*s/o,f&&(p=(g-y)*this.ratio+x)),Xa("top",c)&&(g=u.height-(r-u.y)*s/o,f&&(p=(g-y)*this.ratio+x)),{newWidth:p,newHeight:g}},t.prototype.calculateNewSizeFromAspectRatio=function(n,r,o,i){var a=this.props,s=a.lockAspectRatio,l=a.lockAspectRatioExtraHeight,c=a.lockAspectRatioExtraWidth,u=typeof i.width>"u"?10:i.width,d=typeof o.width>"u"||o.width<0?n:o.width,f=typeof i.height>"u"?10:i.height,m=typeof o.height>"u"||o.height<0?r:o.height,h=l||0,p=c||0;if(s){var g=(f-h)*this.ratio+p,y=(m-h)*this.ratio+p,x=(u-p)/this.ratio+h,I=(d-p)/this.ratio+h,S=Math.max(u,g),b=Math.min(d,y),E=Math.max(f,x),O=Math.min(m,I);n=Td(n,S,b),r=Td(r,E,O)}else n=Td(n,u,d),r=Td(r,f,m);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){var n=1/(this.props.scale||1);if(this.props.bounds==="parent"){var r=this.parentNode;if(r){var o=r.getBoundingClientRect();this.parentLeft=o.left*n,this.parentTop=o.top*n}}if(this.props.bounds&&typeof this.props.bounds!="string"){var i=this.props.bounds.getBoundingClientRect();this.targetLeft=i.left*n,this.targetTop=i.top*n}if(this.resizable){var a=this.resizable.getBoundingClientRect(),s=a.left,l=a.top,c=a.right,u=a.bottom;this.resizableLeft=s*n,this.resizableRight=c*n,this.resizableTop=l*n,this.resizableBottom=u*n}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var o=0,i=0;if(n.nativeEvent&&rz(n.nativeEvent)?(o=n.nativeEvent.clientX,i=n.nativeEvent.clientY):n.nativeEvent&&Md(n.nativeEvent)&&(o=n.nativeEvent.touches[0].clientX,i=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var a=this.props.onResizeStart(n,r,this.resizable);if(a===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var c=this.parentNode;if(c){var u=this.window.getComputedStyle(c).flexDirection;this.flexDir=u.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var d={original:{x:o,y:i,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:go(go({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(d)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&Md(n))try{n.preventDefault(),n.stopPropagation()}catch{}var o=this.props,i=o.maxWidth,a=o.maxHeight,s=o.minWidth,l=o.minHeight,c=Md(n)?n.touches[0].clientX:n.clientX,u=Md(n)?n.touches[0].clientY:n.clientY,d=this.state,f=d.direction,m=d.original,h=d.width,p=d.height,g=this.getParentSize(),y=oz(g,this.window.innerWidth,this.window.innerHeight,i,a,s,l);i=y.maxWidth,a=y.maxHeight,s=y.minWidth,l=y.minHeight;var x=this.calculateNewSizeFromDirection(c,u),I=x.newHeight,S=x.newWidth,b=this.calculateNewMaxFromBoundary(i,a);this.props.snap&&this.props.snap.x&&(S=ME(S,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(I=ME(I,this.props.snap.y,this.props.snapGap));var E=this.calculateNewSizeFromAspectRatio(S,I,{width:b.maxWidth,height:b.maxHeight},{width:s,height:l});if(S=E.newWidth,I=E.newHeight,this.props.grid){var O=TE(S,this.props.grid[0],this.props.gridGap?this.props.gridGap[0]:0),N=TE(I,this.props.grid[1],this.props.gridGap?this.props.gridGap[1]:0),P=this.props.snapGap||0,A=P===0||Math.abs(O-S)<=P?O:S,k=P===0||Math.abs(N-I)<=P?N:I;S=A,I=k}var $={width:S-m.width,height:I-m.height};if(this.delta=$,h&&typeof h=="string"){if(h.endsWith("%")){var T=S/g.width*100;S="".concat(T,"%")}else if(h.endsWith("vw")){var M=S/this.window.innerWidth*100;S="".concat(M,"vw")}else if(h.endsWith("vh")){var j=S/this.window.innerHeight*100;S="".concat(j,"vh")}}if(p&&typeof p=="string"){if(p.endsWith("%")){var T=I/g.height*100;I="".concat(T,"%")}else if(p.endsWith("vw")){var M=I/this.window.innerWidth*100;I="".concat(M,"vw")}else if(p.endsWith("vh")){var j=I/this.window.innerHeight*100;I="".concat(j,"vh")}}var R={width:this.createSizeForCssProperty(S,"width"),height:this.createSizeForCssProperty(I,"height")};this.flexDir==="row"?R.flexBasis=R.width:this.flexDir==="column"&&(R.flexBasis=R.height);var _=this.state.width!==R.width,H=this.state.height!==R.height,z=this.state.flexBasis!==R.flexBasis,V=_||H||z;V&&cn.flushSync(function(){r.setState(R)}),this.props.onResize&&V&&this.props.onResize(n,f,this.resizable,$)}},t.prototype.onMouseUp=function(n){var r,o,i=this.state,a=i.isResizing,s=i.direction;i.original,!(!a||!this.resizable)&&(this.props.onResizeStop&&this.props.onResizeStop(n,s,this.resizable,this.delta),this.props.size&&this.setState({width:(r=this.props.size.width)!==null&&r!==void 0?r:"auto",height:(o=this.props.size.height)!==null&&o!==void 0?o:"auto"}),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:go(go({},this.state.backgroundStyle),{cursor:"auto"})}))},t.prototype.updateSize=function(n){var r,o;this.setState({width:(r=n.width)!==null&&r!==void 0?r:"auto",height:(o=n.height)!==null&&o!==void 0?o:"auto"})},t.prototype.renderResizer=function(){var n=this,r=this.props,o=r.enable,i=r.handleStyles,a=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,c=r.handleComponent;if(!o)return null;var u=Object.keys(o).map(function(d){return o[d]!==!1?C.jsx(ez,{direction:d,onResizeStart:n.onResizeStart,replaceStyles:i&&i[d],className:a&&a[d],children:c&&c[d]?c[d]:null},d):null});return C.jsx("div",{className:l,style:s,children:u})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(a,s){return az.indexOf(s)!==-1||(a[s]=n.props[s]),a},{}),o=go(go(go({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var i=this.props.as||"div";return C.jsxs(i,go({style:o,className:this.props.className},r,{ref:function(a){a&&(n.resizable=a)},children:[this.state.isResizing&&C.jsx("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]}))},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],gridGap:[0,0],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(w.PureComponent);const lz=()=>C.jsx("div",{className:"cursor-ew-resize flex items-center justify-center rounded-full bg-[#1018288F] bg-opacity-55 w-8 h-8 shadow-200 border-[1.5px] border-[#FFFFFF3D]",children:C.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[C.jsx("mask",{id:"mask0_36675_12",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"20",height:"20",children:C.jsx("rect",{y:"20",width:"20",height:"20",transform:"rotate(-90 0 20)",fill:"#D9D9D9"})}),C.jsx("g",{mask:"url(#mask0_36675_12)",children:C.jsx("path",{d:"M15.9583 10L12.7292 6.77084C12.5625 6.60418 12.4792 6.40973 12.4792 6.18751C12.4792 5.96529 12.5625 5.77084 12.7292 5.60418C12.8958 5.43751 13.0938 5.35418 13.3229 5.35418C13.5521 5.35418 13.75 5.43751 13.9167 5.60418L17.1458 8.81251C17.4653 9.13195 17.625 9.52779 17.625 10C17.625 10.4722 17.4653 10.8681 17.1458 11.1875L13.9167 14.4167C13.75 14.5833 13.5521 14.6632 13.3229 14.6563C13.0938 14.6493 12.8958 14.5625 12.7292 14.3958C12.5625 14.2292 12.4792 14.0313 12.4792 13.8021C12.4792 13.5729 12.5625 13.375 12.7292 13.2083L15.9583 10ZM4.04167 10L7.25 13.2083C7.41667 13.375 7.49653 13.5695 7.48958 13.7917C7.48264 14.0139 7.40278 14.2083 7.25 14.375C7.08333 14.5417 6.88542 14.6285 6.65625 14.6354C6.42708 14.6424 6.22917 14.5625 6.0625 14.3958L2.85417 11.1875C2.53472 10.8681 2.375 10.4722 2.375 10C2.375 9.52779 2.53472 9.13195 2.85417 8.81251L6.0625 5.60418C6.22917 5.43751 6.42708 5.35765 6.65625 5.36459C6.88542 5.37154 7.08333 5.45834 7.25 5.62501C7.40278 5.79168 7.48264 5.98612 7.48958 6.20834C7.49653 6.43057 7.41667 6.62501 7.25 6.79168L4.04167 10Z",fill:"white"})})]})}),cz=(e,t)=>{const n=document.getElementById(e);n?t(n):requestAnimationFrame(()=>{const r=document.getElementById(e);r&&t(r)})},uz=(e,t)=>{if(e.current){if(t)localStorage.setItem("resizable-sidebar-width-before-fullscreen",String(e.current.size?.width));else{const n=localStorage.getItem("resizable-sidebar-width-before-fullscreen");if(n){e.current.updateSize({width:n,height:"100%"});return}}e.current.updateSize({width:t?"100vw":"",height:"100%"})}},dz=(e,t,n,r,o,i)=>{const[a,s]=w.useState(!1),[l,c]=w.useState(null);return w.useEffect(()=>{if(!e||typeof window>"u"){c(null);return}cz(e,c)},[e]),w.useEffect(()=>{uz(o,n)},[n]),w.useEffect(()=>{if(e&&t){const u=requestAnimationFrame(()=>{s(!0)});return()=>{cancelAnimationFrame(u),s(!1)}}e||s(!0),t||s(!1)},[t,e]),w.useEffect(()=>{o.current?.size?.width&&r&&r(o.current.size.width)},[o.current?.size?.width,r]),{shouldRenderSidebar:a,portalTarget:l}},fz=({isOpen:e,header:t,id:n,ref:r,className:o,containerClassName:i,widthStyle:a,heightStyle:s,motionVariants:l,resizableRef:c,fullScreen:u,maxResizableWidth:d,minWidth:f,handleKey:m,onDragEnd:h,onResize:p,children:g})=>C.jsx(Dt.AnimatePresence,{children:e&&C.jsx(Dt.motion.div,{ref:r,id:n,initial:l.initial,animate:l.animate,exit:l.exit,transition:{type:"tween",duration:.3},className:G("flex-shrink-0 z-50 relative bg-white border-neutral-200 dark:bg-black-800 dark:border-black-700",u?"fixed w-full transition translate-x-4 duration-300":"sticky",o),style:{width:a,height:s},children:C.jsx(sz,{onResize:y=>{y.stopPropagation();const x=c.current?.size?.width;p&&p(x||f)},onResizeStart:y=>{y.stopPropagation()},ref:c,maxWidth:u?d:d*.75,minWidth:f,minHeight:s,maxHeight:s,enable:u?{}:{[m]:!0},handleClasses:{[m]:G("relative w-6 -left-1 flex items-center justify-center bg-transparent transition-colors cursor-ew-resize group z-[9999] hover:bg-neutral-200 dark:hover:bg-neutral-700")},handleComponent:{[m]:C.jsx("div",{className:G("absolute -left-2.5 top-1/2 -translate-y-1/2 flex items-center justify-center w-8 h-12 cursor-ew-resize opacity-0 group-hover:opacity-100 hover:opacity-100 active:opacity-100 transition-opacity z-[9999]",m==="left"&&"-right-2.5 -left-auto"),children:C.jsx(lz,{})})},className:"!h-full",onResizeStop:h||void 0,children:C.jsxs("div",{className:G("h-full w-full flex flex-col overflow-hidden @container/sidebar border-b border-neutral-200 dark:border-black-700 bg-white dark:bg-black-800 dark:border",i),children:[t?C.jsx("div",{className:"py-4 px-6",children:t||null}):null,C.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden",children:g})]})})})}),jE=w.forwardRef(({isOpen:e,children:t,fullScreen:n=!1,defaultSize:r=void 0,minWidth:o=400,onDragEnd:i=null,onResize:a,className:s,placement:l="right",parentContainer:c,header:u,id:d,containerClassName:f,ignoreParentContainerHeight:m=!1,height:h,isMainSidebarExpanded:p=!1,mainSidebarExpandedWidth:g=280,mainSidebarCollapsedWidth:y=80,navbarHeight:x=64},I)=>{const S=p?g:y,b=w.useRef(null),{shouldRenderSidebar:E,portalTarget:O}=dz(c,e,n,a,b),N=typeof window<"u"?window.innerWidth-S:0,P=r,A=l==="right",k=h||(c&&!m?"100%":`calc(100vh - ${x}px)`),$={initial:{x:A?"100%":"-100%"},animate:{x:0},exit:{x:A?"100%":"-100%"}},T=A?"left":"right",M=C.jsx(fz,{isOpen:e,header:u,id:d,ref:I,className:s,containerClassName:f,widthStyle:P,heightStyle:k,motionVariants:$,resizableRef:b,fullScreen:n,maxResizableWidth:N,minWidth:o,handleKey:T,onDragEnd:i,onResize:a,children:t});return c?!E||!O?null:cn.createPortal(M,O):E?M:null});jE.displayName="ResizableSidebar";const RE=w.forwardRef(({pdfUrl:e,width:t="100%",height:n="100vh",className:r,iframeClassName:o,title:i="PDF Viewer",showLoading:a=!0,loadingComponent:s,errorComponent:l,onError:c,onLoad:u,allowFullScreen:d=!0,"aria-label":f},m)=>{const[h,p]=w.useState(!0),[g,y]=w.useState(!1),x=()=>{p(!1),y(!1),u?.()},I=()=>{p(!1),y(!0),c?.()},S=C.jsx("div",{className:"flex items-center justify-center h-full bg-neutral-50 dark:bg-neutral-900",children:C.jsxs("div",{className:"text-center",children:[C.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto mb-4"}),C.jsx("p",{className:"text-neutral-600 dark:text-neutral-400 text-sm",children:"Loading PDF..."})]})}),b=C.jsx("div",{className:"flex items-center justify-center h-full bg-neutral-50 dark:bg-neutral-900",children:C.jsxs("div",{className:"text-center p-6",children:[C.jsx("svg",{className:"mx-auto h-12 w-12 text-red-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.998-.833-2.768 0L3.046 16.5c-.77.833.192 2.5 1.732 2.5z"})}),C.jsx("h3",{className:"text-lg font-medium text-neutral-900 dark:text-neutral-100 mb-2",children:"Failed to load PDF"}),C.jsx("p",{className:"text-neutral-600 dark:text-neutral-400 text-sm mb-4",children:"The PDF document could not be displayed. Please check the URL or try again later."}),C.jsx("button",{onClick:()=>{y(!1),p(!0);const O=document.querySelector(`iframe[src="${e}"]`);O&&(O.src=O.src)},className:"bg-blue-600 text-white px-4 py-2 rounded-md text-sm hover:bg-blue-700 transition-colors",children:"Retry"})]})});return!e||!(O=>{try{return new URL(O,window.location.href).pathname.toLowerCase().endsWith(".pdf")||O.includes("pdf")}catch{return!1}})(e)?C.jsx("div",{ref:m,className:G("relative overflow-hidden",r),style:{width:t,height:n},children:l||b}):C.jsxs("div",{ref:m,className:G("relative overflow-hidden",r),style:{width:t,height:n},"aria-label":f||`PDF Viewer: ${i}`,children:[h&&a&&C.jsx("div",{className:"absolute inset-0 z-10",children:s||S}),g&&C.jsx("div",{className:"absolute inset-0 z-10",children:l||b}),!g&&C.jsx("iframe",{src:e,title:i,className:G("w-full h-full border-none",h&&"opacity-0",o),onLoad:x,onError:I,allowFullScreen:d,loading:"lazy",sandbox:"allow-same-origin allow-scripts allow-forms","aria-label":f||`PDF document: ${i}`}),C.jsx("div",{className:"sr-only",children:"PDF document viewer. Use your browser's PDF controls to navigate, zoom, or download the document."})]})});RE.displayName="PdfViewer";const DE=({ref:e,handler:t,enabled:n=!0})=>{w.useEffect(()=>{if(!n)return;const r=o=>{e.current&&!e.current.contains(o.target)&&t()};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t,n])},FE=w.forwardRef(({children:e,component:t,placement:n="bottom",isOpen:r,toggleMenu:o,parentContainer:i,noSpacing:a=!1,triggerClassName:s,containerClassName:l,className:c,showArrow:u=!1,offset:d=8,disableOutsideClick:f=!1,"aria-label":m,disabled:h=!1},p)=>{const g=w.useRef(null),y=w.useRef(null);DE({ref:y,handler:()=>{!f&&r&&o?.()},enabled:r&&!f}),w.useEffect(()=>{if(!r||!g.current||!y.current)return;const E=g.current,O=y.current,N=E.getBoundingClientRect(),P=O.getBoundingClientRect(),A={width:window.innerWidth,height:window.innerHeight};let k=0,$=0;switch(n){case"top":k=N.top-P.height-d,$=N.left+(N.width-P.width)/2;break;case"top-start":k=N.top-P.height-d,$=N.left;break;case"top-end":k=N.top-P.height-d,$=N.right-P.width;break;case"bottom":k=N.bottom+d,$=N.left+(N.width-P.width)/2;break;case"bottom-start":k=N.bottom+d,$=N.left;break;case"bottom-end":k=N.bottom+d,$=N.right-P.width;break;case"left":k=N.top+(N.height-P.height)/2,$=N.left-P.width-d;break;case"left-start":k=N.top,$=N.left-P.width-d;break;case"left-end":k=N.bottom-P.height,$=N.left-P.width-d;break;case"right":k=N.top+(N.height-P.height)/2,$=N.right+d;break;case"right-start":k=N.top,$=N.right+d;break;case"right-end":k=N.bottom-P.height,$=N.right+d;break}$<0&&($=8),$+P.width>A.width&&($=A.width-P.width-8),k<0&&(k=8),k+P.height>A.height&&(k=A.height-P.height-8),O.style.top=`${k}px`,O.style.left=`${$}px`},[r,n,d]);const x=E=>{h||o?.(E)},I=E=>{E.key==="Escape"&&r&&o?.()},S=()=>{const E="absolute w-2 h-2 bg-white dark:bg-neutral-800 transform rotate-45 border";switch(n){case"top":case"top-start":case"top-end":return G(E,"bottom-[-4px] border-t-0 border-l-0");case"bottom":case"bottom-start":case"bottom-end":return G(E,"top-[-4px] border-b-0 border-r-0");case"left":case"left-start":case"left-end":return G(E,"right-[-4px] border-l-0 border-b-0");case"right":case"right-start":case"right-end":return G(E,"left-[-4px] border-r-0 border-t-0");default:return G(E,"top-[-4px] border-b-0 border-r-0")}},b=()=>{switch(n){case"top":case"bottom":return{left:"50%",transform:"translateX(-50%)"};case"top-start":case"bottom-start":return{left:"12px"};case"top-end":case"bottom-end":return{right:"12px"};case"left":case"right":return{top:"50%",transform:"translateY(-50%)"};case"left-start":case"right-start":return{top:"12px"};case"left-end":case"right-end":return{bottom:"12px"};default:return{left:"50%",transform:"translateX(-50%)"}}};return C.jsxs("div",{ref:p,className:G("relative inline-block",c),children:[C.jsx("button",{ref:g,onClick:x,onKeyDown:I,className:G("flex items-center justify-center outline-none focus:outline-none transition-colors",!a&&"p-2",h&&"opacity-50 cursor-not-allowed",s),"aria-label":m,"aria-expanded":r,"aria-haspopup":"true",disabled:h,type:"button",children:e}),r&&cn.createPortal(C.jsx(Dt.AnimatePresence,{children:C.jsxs(Dt.motion.div,{ref:y,initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},className:G("fixed z-[9999] bg-white dark:bg-neutral-800 rounded-lg shadow-lg border border-neutral-200 dark:border-neutral-700","focus:outline-none",l),style:{minWidth:"120px"},role:"menu","aria-orientation":"vertical",tabIndex:-1,children:[u&&C.jsx("div",{className:S(),style:b()}),C.jsx("div",{className:"relative",children:t})]})}),document.getElementById(i)||document.body)]})});FE.displayName="Popper";var LE=function(t){return t.reduce(function(n,r){var o=r[0],i=r[1];return n[o]=i,n},{})},BE=typeof window<"u"&&window.document&&window.document.createElement?v.useLayoutEffect:v.useEffect,tr="top",jr="bottom",Rr="right",nr="left",Bh="auto",Cl=[tr,jr,Rr,nr],Ya="start",wl="end",pz="clippingParents",_E="viewport",Sl="popper",mz="reference",VE=Cl.reduce(function(e,t){return e.concat([t+"-"+Ya,t+"-"+wl])},[]),zE=[].concat(Cl,[Bh]).reduce(function(e,t){return e.concat([t,t+"-"+Ya,t+"-"+wl])},[]),gz="beforeRead",hz="read",vz="afterRead",bz="beforeMain",yz="main",xz="afterMain",Cz="beforeWrite",wz="write",Sz="afterWrite",Ez=[gz,hz,vz,bz,yz,xz,Cz,wz,Sz];function ho(e){return e?(e.nodeName||"").toLowerCase():null}function hr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Xi(e){var t=hr(e).Element;return e instanceof t||e instanceof Element}function Dr(e){var t=hr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function _h(e){if(typeof ShadowRoot>"u")return!1;var t=hr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Iz(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!Dr(i)||!ho(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function Oz(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!Dr(o)||!ho(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const Nz={name:"applyStyles",enabled:!0,phase:"write",fn:Iz,effect:Oz,requires:["computeStyles"]};function vo(e){return e.split("-")[0]}var Yi=Math.max,jd=Math.min,Ja=Math.round;function Vh(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function HE(){return!/^((?!chrome|android).)*safari/i.test(Vh())}function Za(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&Dr(e)&&(o=e.offsetWidth>0&&Ja(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Ja(r.height)/e.offsetHeight||1);var a=Xi(e)?hr(e):window,s=a.visualViewport,l=!HE()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/o,u=(r.top+(l&&s?s.offsetTop:0))/i,d=r.width/o,f=r.height/i;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function zh(e){var t=Za(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function GE(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&_h(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Bo(e){return hr(e).getComputedStyle(e)}function $z(e){return["table","td","th"].indexOf(ho(e))>=0}function Ei(e){return((Xi(e)?e.ownerDocument:e.document)||window.document).documentElement}function Rd(e){return ho(e)==="html"?e:e.assignedSlot||e.parentNode||(_h(e)?e.host:null)||Ei(e)}function WE(e){return!Dr(e)||Bo(e).position==="fixed"?null:e.offsetParent}function Pz(e){var t=/firefox/i.test(Vh()),n=/Trident/i.test(Vh());if(n&&Dr(e)){var r=Bo(e);if(r.position==="fixed")return null}var o=Rd(e);for(_h(o)&&(o=o.host);Dr(o)&&["html","body"].indexOf(ho(o))<0;){var i=Bo(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function El(e){for(var t=hr(e),n=WE(e);n&&$z(n)&&Bo(n).position==="static";)n=WE(n);return n&&(ho(n)==="html"||ho(n)==="body"&&Bo(n).position==="static")?t:n||Pz(e)||t}function Hh(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Il(e,t,n){return Yi(e,jd(t,n))}function Az(e,t,n){var r=Il(e,t,n);return r>n?n:r}function UE(){return{top:0,right:0,bottom:0,left:0}}function XE(e){return Object.assign({},UE(),e)}function YE(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Tz=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,XE(typeof t!="number"?t:YE(t,Cl))};function Mz(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=vo(n.placement),l=Hh(s),c=[nr,Rr].indexOf(s)>=0,u=c?"height":"width";if(!(!i||!a)){var d=Tz(o.padding,n),f=zh(i),m=l==="y"?tr:nr,h=l==="y"?jr:Rr,p=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],g=a[l]-n.rects.reference[l],y=El(i),x=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,I=p/2-g/2,S=d[m],b=x-f[u]-d[h],E=x/2-f[u]/2+I,O=Il(S,E,b),N=l;n.modifiersData[r]=(t={},t[N]=O,t.centerOffset=O-E,t)}}function kz(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||GE(t.elements.popper,o)&&(t.elements.arrow=o))}const jz={name:"arrow",enabled:!0,phase:"main",fn:Mz,effect:kz,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function qa(e){return e.split("-")[1]}var Rz={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Dz(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Ja(n*o)/o||0,y:Ja(r*o)/o||0}}function JE(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,m=f===void 0?0:f,h=a.y,p=h===void 0?0:h,g=typeof u=="function"?u({x:m,y:p}):{x:m,y:p};m=g.x,p=g.y;var y=a.hasOwnProperty("x"),x=a.hasOwnProperty("y"),I=nr,S=tr,b=window;if(c){var E=El(n),O="clientHeight",N="clientWidth";if(E===hr(n)&&(E=Ei(n),Bo(E).position!=="static"&&s==="absolute"&&(O="scrollHeight",N="scrollWidth")),E=E,o===tr||(o===nr||o===Rr)&&i===wl){S=jr;var P=d&&E===b&&b.visualViewport?b.visualViewport.height:E[O];p-=P-r.height,p*=l?1:-1}if(o===nr||(o===tr||o===jr)&&i===wl){I=Rr;var A=d&&E===b&&b.visualViewport?b.visualViewport.width:E[N];m-=A-r.width,m*=l?1:-1}}var k=Object.assign({position:s},c&&Rz),$=u===!0?Dz({x:m,y:p},hr(n)):{x:m,y:p};if(m=$.x,p=$.y,l){var T;return Object.assign({},k,(T={},T[S]=x?"0":"",T[I]=y?"0":"",T.transform=(b.devicePixelRatio||1)<=1?"translate("+m+"px, "+p+"px)":"translate3d("+m+"px, "+p+"px, 0)",T))}return Object.assign({},k,(t={},t[S]=x?p+"px":"",t[I]=y?m+"px":"",t.transform="",t))}function Fz(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:vo(t.placement),variation:qa(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,JE(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,JE(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Lz={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Fz,data:{}};var Dd={passive:!0};function Bz(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,l=hr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,Dd)}),s&&l.addEventListener("resize",n.update,Dd),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Dd)}),s&&l.removeEventListener("resize",n.update,Dd)}}const _z={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Bz,data:{}};var Vz={left:"right",right:"left",bottom:"top",top:"bottom"};function Fd(e){return e.replace(/left|right|bottom|top/g,function(t){return Vz[t]})}var zz={start:"end",end:"start"};function ZE(e){return e.replace(/start|end/g,function(t){return zz[t]})}function Gh(e){var t=hr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function Wh(e){return Za(Ei(e)).left+Gh(e).scrollLeft}function Hz(e,t){var n=hr(e),r=Ei(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=HE();(c||!c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+Wh(e),y:l}}function Gz(e){var t,n=Ei(e),r=Gh(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=Yi(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Yi(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+Wh(e),l=-r.scrollTop;return Bo(o||n).direction==="rtl"&&(s+=Yi(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function Uh(e){var t=Bo(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function qE(e){return["html","body","#document"].indexOf(ho(e))>=0?e.ownerDocument.body:Dr(e)&&Uh(e)?e:qE(Rd(e))}function Ol(e,t){var n;t===void 0&&(t=[]);var r=qE(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=hr(r),a=o?[i].concat(i.visualViewport||[],Uh(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(Ol(Rd(a)))}function Xh(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Wz(e,t){var n=Za(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function KE(e,t,n){return t===_E?Xh(Hz(e,n)):Xi(t)?Wz(t,n):Xh(Gz(Ei(e)))}function Uz(e){var t=Ol(Rd(e)),n=["absolute","fixed"].indexOf(Bo(e).position)>=0,r=n&&Dr(e)?El(e):e;return Xi(r)?t.filter(function(o){return Xi(o)&&GE(o,r)&&ho(o)!=="body"}):[]}function Xz(e,t,n,r){var o=t==="clippingParents"?Uz(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(l,c){var u=KE(e,c,r);return l.top=Yi(u.top,l.top),l.right=jd(u.right,l.right),l.bottom=jd(u.bottom,l.bottom),l.left=Yi(u.left,l.left),l},KE(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function QE(e){var t=e.reference,n=e.element,r=e.placement,o=r?vo(r):null,i=r?qa(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case tr:l={x:a,y:t.y-n.height};break;case jr:l={x:a,y:t.y+t.height};break;case Rr:l={x:t.x+t.width,y:s};break;case nr:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=o?Hh(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case Ya:l[c]=l[c]-(t[u]/2-n[u]/2);break;case wl:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Nl(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,s=n.boundary,l=s===void 0?pz:s,c=n.rootBoundary,u=c===void 0?_E:c,d=n.elementContext,f=d===void 0?Sl:d,m=n.altBoundary,h=m===void 0?!1:m,p=n.padding,g=p===void 0?0:p,y=XE(typeof g!="number"?g:YE(g,Cl)),x=f===Sl?mz:Sl,I=e.rects.popper,S=e.elements[h?x:f],b=Xz(Xi(S)?S:S.contextElement||Ei(e.elements.popper),l,u,a),E=Za(e.elements.reference),O=QE({reference:E,element:I,placement:o}),N=Xh(Object.assign({},I,O)),P=f===Sl?N:E,A={top:b.top-P.top+y.top,bottom:P.bottom-b.bottom+y.bottom,left:b.left-P.left+y.left,right:P.right-b.right+y.right},k=e.modifiersData.offset;if(f===Sl&&k){var $=k[o];Object.keys(A).forEach(function(T){var M=[Rr,jr].indexOf(T)>=0?1:-1,j=[tr,jr].indexOf(T)>=0?"y":"x";A[T]+=$[j]*M})}return A}function Yz(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?zE:l,u=qa(r),d=u?s?VE:VE.filter(function(h){return qa(h)===u}):Cl,f=d.filter(function(h){return c.indexOf(h)>=0});f.length===0&&(f=d);var m=f.reduce(function(h,p){return h[p]=Nl(e,{placement:p,boundary:o,rootBoundary:i,padding:a})[vo(p)],h},{});return Object.keys(m).sort(function(h,p){return m[h]-m[p]})}function Jz(e){if(vo(e)===Bh)return[];var t=Fd(e);return[ZE(e),t,ZE(t)]}function Zz(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,m=n.flipVariations,h=m===void 0?!0:m,p=n.allowedAutoPlacements,g=t.options.placement,y=vo(g),x=y===g,I=l||(x||!h?[Fd(g)]:Jz(g)),S=[g].concat(I).reduce(function(U,K){return U.concat(vo(K)===Bh?Yz(t,{placement:K,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:p}):K)},[]),b=t.rects.reference,E=t.rects.popper,O=new Map,N=!0,P=S[0],A=0;A<S.length;A++){var k=S[A],$=vo(k),T=qa(k)===Ya,M=[tr,jr].indexOf($)>=0,j=M?"width":"height",R=Nl(t,{placement:k,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),_=M?T?Rr:nr:T?jr:tr;b[j]>E[j]&&(_=Fd(_));var H=Fd(_),z=[];if(i&&z.push(R[$]<=0),s&&z.push(R[_]<=0,R[H]<=0),z.every(function(U){return U})){P=k,N=!1;break}O.set(k,z)}if(N)for(var V=h?3:1,D=function(K){var q=S.find(function(Y){var Q=O.get(Y);if(Q)return Q.slice(0,K).every(function(Z){return Z})});if(q)return P=q,"break"},L=V;L>0;L--){var F=D(L);if(F==="break")break}t.placement!==P&&(t.modifiersData[r]._skip=!0,t.placement=P,t.reset=!0)}}const qz={name:"flip",enabled:!0,phase:"main",fn:Zz,requiresIfExists:["offset"],data:{_skip:!1}};function eI(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function tI(e){return[tr,Rr,jr,nr].some(function(t){return e[t]>=0})}function Kz(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Nl(t,{elementContext:"reference"}),s=Nl(t,{altBoundary:!0}),l=eI(a,r),c=eI(s,o,i),u=tI(l),d=tI(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const Qz={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Kz};function eH(e,t,n){var r=vo(e),o=[nr,tr].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[nr,Rr].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function tH(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=zE.reduce(function(u,d){return u[d]=eH(d,t.rects,i),u},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const nH={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:tH};function rH(e){var t=e.state,n=e.name;t.modifiersData[n]=QE({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const oH={name:"popperOffsets",enabled:!0,phase:"read",fn:rH,data:{}};function iH(e){return e==="x"?"y":"x"}function aH(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,m=f===void 0?!0:f,h=n.tetherOffset,p=h===void 0?0:h,g=Nl(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=vo(t.placement),x=qa(t.placement),I=!x,S=Hh(y),b=iH(S),E=t.modifiersData.popperOffsets,O=t.rects.reference,N=t.rects.popper,P=typeof p=="function"?p(Object.assign({},t.rects,{placement:t.placement})):p,A=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),k=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,$={x:0,y:0};if(E){if(i){var T,M=S==="y"?tr:nr,j=S==="y"?jr:Rr,R=S==="y"?"height":"width",_=E[S],H=_+g[M],z=_-g[j],V=m?-N[R]/2:0,D=x===Ya?O[R]:N[R],L=x===Ya?-N[R]:-O[R],F=t.elements.arrow,U=m&&F?zh(F):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:UE(),q=K[M],Y=K[j],Q=Il(0,O[R],U[R]),Z=I?O[R]/2-V-Q-q-A.mainAxis:D-Q-q-A.mainAxis,re=I?-O[R]/2+V+Q+Y+A.mainAxis:L+Q+Y+A.mainAxis,ae=t.elements.arrow&&El(t.elements.arrow),W=ae?S==="y"?ae.clientTop||0:ae.clientLeft||0:0,se=(T=k?.[S])!=null?T:0,te=_+Z-se-W,oe=_+re-se,ce=Il(m?jd(H,te):H,_,m?Yi(z,oe):z);E[S]=ce,$[S]=ce-_}if(s){var Ne,he=S==="x"?tr:nr,Ee=S==="x"?jr:Rr,Ae=E[b],fe=b==="y"?"height":"width",ge=Ae+g[he],Pe=Ae-g[Ee],be=[tr,nr].indexOf(y)!==-1,Qe=(Ne=k?.[b])!=null?Ne:0,Xe=be?ge:Ae-O[fe]-N[fe]-Qe+A.altAxis,Ze=be?Ae+O[fe]+N[fe]-Qe-A.altAxis:Pe,De=m&&be?Az(Xe,Ae,Ze):Il(m?Xe:ge,Ae,m?Ze:Pe);E[b]=De,$[b]=De-Ae}t.modifiersData[r]=$}}const sH={name:"preventOverflow",enabled:!0,phase:"main",fn:aH,requiresIfExists:["offset"]};function lH(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function cH(e){return e===hr(e)||!Dr(e)?Gh(e):lH(e)}function uH(e){var t=e.getBoundingClientRect(),n=Ja(t.width)/e.offsetWidth||1,r=Ja(t.height)/e.offsetHeight||1;return n!==1||r!==1}function dH(e,t,n){n===void 0&&(n=!1);var r=Dr(t),o=Dr(t)&&uH(t),i=Ei(t),a=Za(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((ho(t)!=="body"||Uh(i))&&(s=cH(t)),Dr(t)?(l=Za(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=Wh(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function fH(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function pH(e){var t=fH(e);return Ez.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function mH(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function gH(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var nI={placement:"bottom",modifiers:[],strategy:"absolute"};function rI(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function hH(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,o=t.defaultOptions,i=o===void 0?nI:o;return function(s,l,c){c===void 0&&(c=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},nI,i),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],f=!1,m={state:u,setOptions:function(y){var x=typeof y=="function"?y(u.options):y;p(),u.options=Object.assign({},i,u.options,x),u.scrollParents={reference:Xi(s)?Ol(s):s.contextElement?Ol(s.contextElement):[],popper:Ol(l)};var I=pH(gH([].concat(r,u.options.modifiers)));return u.orderedModifiers=I.filter(function(S){return S.enabled}),h(),m.update()},forceUpdate:function(){if(!f){var y=u.elements,x=y.reference,I=y.popper;if(rI(x,I)){u.rects={reference:dH(x,El(I),u.options.strategy==="fixed"),popper:zh(I)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(A){return u.modifiersData[A.name]=Object.assign({},A.data)});for(var S=0;S<u.orderedModifiers.length;S++){if(u.reset===!0){u.reset=!1,S=-1;continue}var b=u.orderedModifiers[S],E=b.fn,O=b.options,N=O===void 0?{}:O,P=b.name;typeof E=="function"&&(u=E({state:u,options:N,name:P,instance:m})||u)}}}},update:mH(function(){return new Promise(function(g){m.forceUpdate(),g(u)})}),destroy:function(){p(),f=!0}};if(!rI(s,l))return m;m.setOptions(c).then(function(g){!f&&c.onFirstUpdate&&c.onFirstUpdate(g)});function h(){u.orderedModifiers.forEach(function(g){var y=g.name,x=g.options,I=x===void 0?{}:x,S=g.effect;if(typeof S=="function"){var b=S({state:u,name:y,instance:m,options:I}),E=function(){};d.push(b||E)}})}function p(){d.forEach(function(g){return g()}),d=[]}return m}}var vH=[_z,oH,Lz,Nz,nH,qz,sH,jz,Qz],bH=hH({defaultModifiers:vH}),Yh,oI;function yH(){if(oI)return Yh;oI=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(i,a){if(i===a)return!0;if(i&&a&&typeof i=="object"&&typeof a=="object"){if(i.constructor!==a.constructor)return!1;var s,l,c;if(Array.isArray(i)){if(s=i.length,s!=a.length)return!1;for(l=s;l--!==0;)if(!o(i[l],a[l]))return!1;return!0}var u;if(t&&i instanceof Map&&a instanceof Map){if(i.size!==a.size)return!1;for(u=i.entries();!(l=u.next()).done;)if(!a.has(l.value[0]))return!1;for(u=i.entries();!(l=u.next()).done;)if(!o(l.value[1],a.get(l.value[0])))return!1;return!0}if(n&&i instanceof Set&&a instanceof Set){if(i.size!==a.size)return!1;for(u=i.entries();!(l=u.next()).done;)if(!a.has(l.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(a)){if(s=i.length,s!=a.length)return!1;for(l=s;l--!==0;)if(i[l]!==a[l])return!1;return!0}if(i.constructor===RegExp)return i.source===a.source&&i.flags===a.flags;if(i.valueOf!==Object.prototype.valueOf&&typeof i.valueOf=="function"&&typeof a.valueOf=="function")return i.valueOf()===a.valueOf();if(i.toString!==Object.prototype.toString&&typeof i.toString=="function"&&typeof a.toString=="function")return i.toString()===a.toString();if(c=Object.keys(i),s=c.length,s!==Object.keys(a).length)return!1;for(l=s;l--!==0;)if(!Object.prototype.hasOwnProperty.call(a,c[l]))return!1;if(e&&i instanceof Element)return!1;for(l=s;l--!==0;)if(!((c[l]==="_owner"||c[l]==="__v"||c[l]==="__o")&&i.$$typeof)&&!o(i[c[l]],a[c[l]]))return!1;return!0}return i!==i&&a!==a}return Yh=function(a,s){try{return o(a,s)}catch(l){if((l.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw l}},Yh}var xH=yH();const CH=ps(xH);var wH=[],SH=function(t,n,r){r===void 0&&(r={});var o=v.useRef(null),i={onFirstUpdate:r.onFirstUpdate,placement:r.placement||"bottom",strategy:r.strategy||"absolute",modifiers:r.modifiers||wH},a=v.useState({styles:{popper:{position:i.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=a[0],l=a[1],c=v.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(m){var h=m.state,p=Object.keys(h.elements);Lf.flushSync(function(){l({styles:LE(p.map(function(g){return[g,h.styles[g]||{}]})),attributes:LE(p.map(function(g){return[g,h.attributes[g]]}))})})},requires:["computeStyles"]}},[]),u=v.useMemo(function(){var f={onFirstUpdate:i.onFirstUpdate,placement:i.placement,strategy:i.strategy,modifiers:[].concat(i.modifiers,[c,{name:"applyStyles",enabled:!1}])};return CH(o.current,f)?o.current||f:(o.current=f,f)},[i.onFirstUpdate,i.placement,i.strategy,i.modifiers,c]),d=v.useRef();return BE(function(){d.current&&d.current.setOptions(u)},[u]),BE(function(){if(!(t==null||n==null)){var f=r.createPopper||bH,m=f(t,n,u);return d.current=m,function(){m.destroy(),d.current=null}}},[t,n,r.createPopper]),{state:d.current?d.current.state:null,styles:s.styles,attributes:s.attributes,update:d.current?d.current.update:null,forceUpdate:d.current?d.current.forceUpdate:null}};function iI(e){var t=v.useRef(e);return t.current=e,v.useCallback(function(){return t.current},[])}var EH=function(){};function IH(e){var t=e.initial,n=e.value,r=e.onChange,o=r===void 0?EH:r;if(t===void 0&&n===void 0)throw new TypeError('Either "value" or "initial" variable must be set. Now both are undefined');var i=v.useState(t),a=i[0],s=i[1],l=iI(a),c=v.useCallback(function(d){var f=l(),m=typeof d=="function"?d(f):d;typeof m.persist=="function"&&m.persist(),s(m),typeof o=="function"&&o(m)},[l,o]),u=n!==void 0;return[u?n:a,u?o:c]}function aI(e,t){return e===void 0&&(e=0),t===void 0&&(t=0),function(){return{width:0,height:0,top:t,right:e,bottom:t,left:e,x:0,y:0,toJSON:function(){return null}}}}var OH=["styles","attributes"],sI={getBoundingClientRect:aI()},lI={closeOnOutsideClick:!0,closeOnTriggerHidden:!1,defaultVisible:!1,delayHide:0,delayShow:0,followCursor:!1,interactive:!1,mutationObserverOptions:{attributes:!0,childList:!0,subtree:!0},offset:[0,6],trigger:"hover"};function cI(e,t){var n,r,o;e===void 0&&(e={}),t===void 0&&(t={});var i=Object.keys(lI).reduce(function(j,R){var _;return de({},j,(_={},_[R]=j[R]!==void 0?j[R]:lI[R],_))},e),a=v.useMemo(function(){return[{name:"offset",options:{offset:i.offset}}]},Array.isArray(i.offset)?i.offset:[]),s=de({},t,{placement:t.placement||i.placement,modifiers:t.modifiers||a}),l=v.useState(null),c=l[0],u=l[1],d=v.useState(null),f=d[0],m=d[1],h=IH({initial:i.defaultVisible,value:i.visible,onChange:i.onVisibleChange}),p=h[0],g=h[1],y=v.useRef();v.useEffect(function(){return function(){return clearTimeout(y.current)}},[]);var x=SH(i.followCursor?sI:c,f,s),I=x.styles,S=x.attributes,b=zv(x,OH),E=b.update,O=iI({visible:p,triggerRef:c,tooltipRef:f,finalConfig:i}),N=v.useCallback(function(j){return Array.isArray(i.trigger)?i.trigger.includes(j):i.trigger===j},Array.isArray(i.trigger)?i.trigger:[i.trigger]),P=v.useCallback(function(){clearTimeout(y.current),y.current=window.setTimeout(function(){return g(!1)},i.delayHide)},[i.delayHide,g]),A=v.useCallback(function(){clearTimeout(y.current),y.current=window.setTimeout(function(){return g(!0)},i.delayShow)},[i.delayShow,g]),k=v.useCallback(function(){O().visible?P():A()},[O,P,A]);v.useEffect(function(){if(O().finalConfig.closeOnOutsideClick){var j=function(_){var H,z=O(),V=z.tooltipRef,D=z.triggerRef,L=(_.composedPath==null||(H=_.composedPath())==null?void 0:H[0])||_.target;L instanceof Node&&V!=null&&D!=null&&!V.contains(L)&&!D.contains(L)&&P()};return document.addEventListener("mousedown",j),function(){return document.removeEventListener("mousedown",j)}}},[O,P]),v.useEffect(function(){if(!(c==null||!N("click")))return c.addEventListener("click",k),function(){return c.removeEventListener("click",k)}},[c,N,k]),v.useEffect(function(){if(!(c==null||!N("double-click")))return c.addEventListener("dblclick",k),function(){return c.removeEventListener("dblclick",k)}},[c,N,k]),v.useEffect(function(){if(!(c==null||!N("right-click"))){var j=function(_){_.preventDefault(),k()};return c.addEventListener("contextmenu",j),function(){return c.removeEventListener("contextmenu",j)}}},[c,N,k]),v.useEffect(function(){if(!(c==null||!N("focus")))return c.addEventListener("focus",A),c.addEventListener("blur",P),function(){c.removeEventListener("focus",A),c.removeEventListener("blur",P)}},[c,N,A,P]),v.useEffect(function(){if(!(c==null||!N("hover")))return c.addEventListener("mouseenter",A),c.addEventListener("mouseleave",P),function(){c.removeEventListener("mouseenter",A),c.removeEventListener("mouseleave",P)}},[c,N,A,P]),v.useEffect(function(){if(!(f==null||!N("hover")||!O().finalConfig.interactive))return f.addEventListener("mouseenter",A),f.addEventListener("mouseleave",P),function(){f.removeEventListener("mouseenter",A),f.removeEventListener("mouseleave",P)}},[f,N,A,P,O]);var $=b==null||(n=b.state)==null||(r=n.modifiersData)==null||(o=r.hide)==null?void 0:o.isReferenceHidden;v.useEffect(function(){i.closeOnTriggerHidden&&$&&P()},[i.closeOnTriggerHidden,P,$]),v.useEffect(function(){if(!i.followCursor||c==null)return;function j(R){var _=R.clientX,H=R.clientY;sI.getBoundingClientRect=aI(_,H),E?.()}return c.addEventListener("mousemove",j),function(){return c.removeEventListener("mousemove",j)}},[i.followCursor,c,E]),v.useEffect(function(){if(!(f==null||E==null||i.mutationObserverOptions==null)){var j=new MutationObserver(E);return j.observe(f,i.mutationObserverOptions),function(){return j.disconnect()}}},[i.mutationObserverOptions,f,E]);var T=function(R){return R===void 0&&(R={}),de({},R,{style:de({},R.style,I.popper)},S.popper,{"data-popper-interactive":i.interactive})},M=function(R){return R===void 0&&(R={}),de({},R,S.arrow,{style:de({},R.style,I.arrow),"data-popper-arrow":!0})};return de({getArrowProps:M,getTooltipProps:T,setTooltipRef:m,setTriggerRef:u,tooltipRef:f,triggerRef:c,visible:p},b)}const bo=({children:e,title:t,hideTooltip:n=!1,delayShow:r=!1,whiteSpace:o="initial",placement:i="top",className:a})=>{const{getArrowProps:s,getTooltipProps:l,setTooltipRef:c,setTriggerRef:u,visible:d}=cI({placement:i}),[f,m]=w.useState(!r),[h,p]=w.useState(null),g=()=>{if(r){const x=setTimeout(()=>{m(!0)},1e3);p(x)}else m(!0)},y=()=>{h&&(clearTimeout(h),p(null)),r&&m(!1)};return C.jsxs(C.Fragment,{children:[C.jsx("div",{ref:u,className:a,onMouseEnter:g,onMouseLeave:y,children:e}),d&&(r?f&&t:t)&&!n&&cn.createPortal(C.jsxs("div",{ref:c,...l({className:"tooltip-container",style:{whiteSpace:o}}),children:[t,C.jsx("div",{...s({className:"tooltip-arrow"})})]}),document.body)]})},$l=e=>typeof e=="number"&&!isNaN(e),Ji=e=>typeof e=="string",vr=e=>typeof e=="function",Ld=e=>Ji(e)||vr(e)?e:null,Jh=e=>w.isValidElement(e)||Ji(e)||vr(e)||$l(e);function NH(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function Bd(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:i=300}=e;return function(a){let{children:s,position:l,preventExitTransition:c,done:u,nodeRef:d,isIn:f,playToast:m}=a;const h=r?`${t}--${l}`:t,p=r?`${n}--${l}`:n,g=w.useRef(0);return w.useLayoutEffect(()=>{const y=d.current,x=h.split(" "),I=S=>{S.target===d.current&&(m(),y.removeEventListener("animationend",I),y.removeEventListener("animationcancel",I),g.current===0&&S.type!=="animationcancel"&&y.classList.remove(...x))};y.classList.add(...x),y.addEventListener("animationend",I),y.addEventListener("animationcancel",I)},[]),w.useEffect(()=>{const y=d.current,x=()=>{y.removeEventListener("animationend",x),o?NH(y,u,i):u()};f||(c?x():(g.current=1,y.className+=` ${p}`,y.addEventListener("animationend",x)))},[f]),w.createElement(w.Fragment,null,s)}}function uI(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Zn=new Map;let Pl=[];const Zh=new Set,$H=e=>Zh.forEach(t=>t(e)),dI=()=>Zn.size>0;function fI(e,t){var n;if(t)return!((n=Zn.get(t))==null||!n.isToastActive(e));let r=!1;return Zn.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function pI(e,t){Jh(e)&&(dI()||Pl.push({content:e,options:t}),Zn.forEach(n=>{n.buildToast(e,t)}))}function mI(e,t){Zn.forEach(n=>{t!=null&&t!=null&&t.containerId?t?.containerId===n.id&&n.toggle(e,t?.id):n.toggle(e,t?.id)})}function PH(e){const{subscribe:t,getSnapshot:n,setProps:r}=w.useRef(function(i){const a=i.containerId||1;return{subscribe(s){const l=function(u,d,f){let m=1,h=0,p=[],g=[],y=[],x=d;const I=new Map,S=new Set,b=()=>{y=Array.from(I.values()),S.forEach(N=>N())},E=N=>{g=N==null?[]:g.filter(P=>P!==N),b()},O=N=>{const{toastId:P,onOpen:A,updateId:k,children:$}=N.props,T=k==null;N.staleId&&I.delete(N.staleId),I.set(P,N),g=[...g,N.props.toastId].filter(M=>M!==N.staleId),b(),f(uI(N,T?"added":"updated")),T&&vr(A)&&A(w.isValidElement($)&&$.props)};return{id:u,props:x,observe:N=>(S.add(N),()=>S.delete(N)),toggle:(N,P)=>{I.forEach(A=>{P!=null&&P!==A.props.toastId||vr(A.toggle)&&A.toggle(N)})},removeToast:E,toasts:I,clearQueue:()=>{h-=p.length,p=[]},buildToast:(N,P)=>{if((L=>{let{containerId:F,toastId:U,updateId:K}=L;const q=F?F!==u:u!==1,Y=I.has(U)&&K==null;return q||Y})(P))return;const{toastId:A,updateId:k,data:$,staleId:T,delay:M}=P,j=()=>{E(A)},R=k==null;R&&h++;const _={...x,style:x.toastStyle,key:m++,...Object.fromEntries(Object.entries(P).filter(L=>{let[F,U]=L;return U!=null})),toastId:A,updateId:k,data:$,closeToast:j,isIn:!1,className:Ld(P.className||x.toastClassName),bodyClassName:Ld(P.bodyClassName||x.bodyClassName),progressClassName:Ld(P.progressClassName||x.progressClassName),autoClose:!P.isLoading&&(H=P.autoClose,z=x.autoClose,H===!1||$l(H)&&H>0?H:z),deleteToast(){const L=I.get(A),{onClose:F,children:U}=L.props;vr(F)&&F(w.isValidElement(U)&&U.props),f(uI(L,"removed")),I.delete(A),h--,h<0&&(h=0),p.length>0?O(p.shift()):b()}};var H,z;_.closeButton=x.closeButton,P.closeButton===!1||Jh(P.closeButton)?_.closeButton=P.closeButton:P.closeButton===!0&&(_.closeButton=!Jh(x.closeButton)||x.closeButton);let V=N;w.isValidElement(N)&&!Ji(N.type)?V=w.cloneElement(N,{closeToast:j,toastProps:_,data:$}):vr(N)&&(V=N({closeToast:j,toastProps:_,data:$}));const D={content:V,props:_,staleId:T};x.limit&&x.limit>0&&h>x.limit&&R?p.push(D):$l(M)?setTimeout(()=>{O(D)},M):O(D)},setProps(N){x=N},setToggle:(N,P)=>{I.get(N).toggle=P},isToastActive:N=>g.some(P=>P===N),getSnapshot:()=>y}}(a,i,$H);Zn.set(a,l);const c=l.observe(s);return Pl.forEach(u=>pI(u.content,u.options)),Pl=[],()=>{c(),Zn.delete(a)}},setProps(s){var l;(l=Zn.get(a))==null||l.setProps(s)},getSnapshot(){var s;return(s=Zn.get(a))==null?void 0:s.getSnapshot()}}}(e)).current;r(e);const o=w.useSyncExternalStore(t,n,n);return{getToastToRender:function(i){if(!o)return[];const a=new Map;return e.newestOnTop&&o.reverse(),o.forEach(s=>{const{position:l}=s.props;a.has(l)||a.set(l,[]),a.get(l).push(s)}),Array.from(a,s=>i(s[0],s[1]))},isToastActive:fI,count:o?.length}}function AH(e){const[t,n]=w.useState(!1),[r,o]=w.useState(!1),i=w.useRef(null),a=w.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:s,pauseOnHover:l,closeToast:c,onClick:u,closeOnClick:d}=e;var f,m;function h(){n(!0)}function p(){n(!1)}function g(I){const S=i.current;a.canDrag&&S&&(a.didMove=!0,t&&p(),a.delta=e.draggableDirection==="x"?I.clientX-a.start:I.clientY-a.start,a.start!==I.clientX&&(a.canCloseOnClick=!1),S.style.transform=`translate3d(${e.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`},0)`,S.style.opacity=""+(1-Math.abs(a.delta/a.removalDistance)))}function y(){document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",y);const I=i.current;if(a.canDrag&&a.didMove&&I){if(a.canDrag=!1,Math.abs(a.delta)>a.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();I.style.transition="transform 0.2s, opacity 0.2s",I.style.removeProperty("transform"),I.style.removeProperty("opacity")}}(m=Zn.get((f={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||m.setToggle(f.id,f.fn),w.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||p(),window.addEventListener("focus",h),window.addEventListener("blur",p),()=>{window.removeEventListener("focus",h),window.removeEventListener("blur",p)}},[e.pauseOnFocusLoss]);const x={onPointerDown:function(I){if(e.draggable===!0||e.draggable===I.pointerType){a.didMove=!1,document.addEventListener("pointermove",g),document.addEventListener("pointerup",y);const S=i.current;a.canCloseOnClick=!0,a.canDrag=!0,S.style.transition="none",e.draggableDirection==="x"?(a.start=I.clientX,a.removalDistance=S.offsetWidth*(e.draggablePercent/100)):(a.start=I.clientY,a.removalDistance=S.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(I){const{top:S,bottom:b,left:E,right:O}=i.current.getBoundingClientRect();I.nativeEvent.type!=="touchend"&&e.pauseOnHover&&I.clientX>=E&&I.clientX<=O&&I.clientY>=S&&I.clientY<=b?p():h()}};return s&&l&&(x.onMouseEnter=p,e.stacked||(x.onMouseLeave=h)),d&&(x.onClick=I=>{u&&u(I),a.canCloseOnClick&&c()}),{playToast:h,pauseToast:p,isRunning:t,preventExitTransition:r,toastRef:i,eventHandlers:x}}function TH(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:i,className:a,style:s,controlledProgress:l,progress:c,rtl:u,isIn:d,theme:f}=e;const m=i||l&&c===0,h={...s,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};l&&(h.transform=`scaleX(${c})`);const p=po("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${f}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":u}),g=vr(a)?a({rtl:u,type:o,defaultClassName:p}):po(p,a),y={[l&&c>=1?"onTransitionEnd":"onAnimationEnd"]:l&&c<1?null:()=>{d&&r()}};return w.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":m},w.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${f} Toastify__progress-bar--${o}`}),w.createElement("div",{role:"progressbar","aria-hidden":m?"true":"false","aria-label":"notification timer",className:g,style:h,...y}))}let MH=1;const gI=()=>""+MH++;function kH(e){return e&&(Ji(e.toastId)||$l(e.toastId))?e.toastId:gI()}function Al(e,t){return pI(e,t),t.toastId}function _d(e,t){return{...t,type:t&&t.type||e,toastId:kH(t)}}function Vd(e){return(t,n)=>Al(t,_d(e,n))}function Nt(e,t){return Al(e,_d("default",t))}Nt.loading=(e,t)=>Al(e,_d("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Nt.promise=function(e,t,n){let r,{pending:o,error:i,success:a}=t;o&&(r=Ji(o)?Nt.loading(o,n):Nt.loading(o.render,{...n,...o}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(u,d,f)=>{if(d==null)return void Nt.dismiss(r);const m={type:u,...s,...n,data:f},h=Ji(d)?{render:d}:d;return r?Nt.update(r,{...m,...h}):Nt(h.render,{...m,...h}),f},c=vr(e)?e():e;return c.then(u=>l("success",a,u)).catch(u=>l("error",i,u)),c},Nt.success=Vd("success"),Nt.info=Vd("info"),Nt.error=Vd("error"),Nt.warning=Vd("warning"),Nt.warn=Nt.warning,Nt.dark=(e,t)=>Al(e,_d("default",{theme:"dark",...t})),Nt.dismiss=function(e){(function(t){var n;if(dI()){if(t==null||Ji(n=t)||$l(n))Zn.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=Zn.get(t.containerId);r?r.removeToast(t.id):Zn.forEach(o=>{o.removeToast(t.id)})}}else Pl=Pl.filter(r=>t!=null&&r.options.toastId!==t)})(e)},Nt.clearWaitingQueue=function(e){e===void 0&&(e={}),Zn.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},Nt.isActive=fI,Nt.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var i;let{containerId:a}=o;return(i=Zn.get(a||1))==null?void 0:i.toasts.get(r)})(e,t);if(n){const{props:r,content:o}=n,i={delay:100,...r,...t,toastId:t.toastId||e,updateId:gI()};i.toastId!==e&&(i.staleId=e);const a=i.render||o;delete i.render,Al(a,i)}},Nt.done=e=>{Nt.update(e,{progress:1})},Nt.onChange=function(e){return Zh.add(e),()=>{Zh.delete(e)}},Nt.play=e=>mI(!0,e),Nt.pause=e=>mI(!1,e);const jH=typeof window<"u"?w.useLayoutEffect:w.useEffect,zd=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return w.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},qh={info:function(e){return w.createElement(zd,{...e},w.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return w.createElement(zd,{...e},w.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return w.createElement(zd,{...e},w.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return w.createElement(zd,{...e},w.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return w.createElement("div",{className:"Toastify__spinner"})}},RH=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:i}=AH(e),{closeButton:a,children:s,autoClose:l,onClick:c,type:u,hideProgressBar:d,closeToast:f,transition:m,position:h,className:p,style:g,bodyClassName:y,bodyStyle:x,progressClassName:I,progressStyle:S,updateId:b,role:E,progress:O,rtl:N,toastId:P,deleteToast:A,isIn:k,isLoading:$,closeOnClick:T,theme:M}=e,j=po("Toastify__toast",`Toastify__toast-theme--${M}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":N},{"Toastify__toast--close-on-click":T}),R=vr(p)?p({rtl:N,position:h,type:u,defaultClassName:j}):po(j,p),_=function(D){let{theme:L,type:F,isLoading:U,icon:K}=D,q=null;const Y={theme:L,type:F};return K===!1||(vr(K)?q=K({...Y,isLoading:U}):w.isValidElement(K)?q=w.cloneElement(K,Y):U?q=qh.spinner():(Q=>Q in qh)(F)&&(q=qh[F](Y))),q}(e),H=!!O||!l,z={closeToast:f,type:u,theme:M};let V=null;return a===!1||(V=vr(a)?a(z):w.isValidElement(a)?w.cloneElement(a,z):function(D){let{closeToast:L,theme:F,ariaLabel:U="close"}=D;return w.createElement("button",{className:`Toastify__close-button Toastify__close-button--${F}`,type:"button",onClick:K=>{K.stopPropagation(),L(K)},"aria-label":U},w.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},w.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(z)),w.createElement(m,{isIn:k,done:A,position:h,preventExitTransition:n,nodeRef:r,playToast:i},w.createElement("div",{id:P,onClick:c,"data-in":k,className:R,...o,style:g,ref:r},w.createElement("div",{...k&&{role:E},className:vr(y)?y({type:u}):po("Toastify__toast-body",y),style:x},_!=null&&w.createElement("div",{className:po("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!$})},_),w.createElement("div",null,s)),V,w.createElement(TH,{...b&&!H?{key:`pb-${b}`}:{},rtl:N,theme:M,delay:l,isRunning:t,isIn:k,closeToast:f,hide:d,type:u,style:S,className:I,controlledProgress:H,progress:O||0})))},Hd=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},DH=Bd(Hd("bounce",!0)),FH=Bd(Hd("slide",!0));Bd(Hd("zoom")),Bd(Hd("flip"));const LH={position:"top-right",transition:DH,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function BH(e){let t={...LH,...e};const n=e.stacked,[r,o]=w.useState(!0),i=w.useRef(null),{getToastToRender:a,isToastActive:s,count:l}=PH(t),{className:c,style:u,rtl:d,containerId:f}=t;function m(p){const g=po("Toastify__toast-container",`Toastify__toast-container--${p}`,{"Toastify__toast-container--rtl":d});return vr(c)?c({position:p,rtl:d,defaultClassName:g}):po(g,Ld(c))}function h(){n&&(o(!0),Nt.play())}return jH(()=>{if(n){var p;const g=i.current.querySelectorAll('[data-in="true"]'),y=12,x=(p=t.position)==null?void 0:p.includes("top");let I=0,S=0;Array.from(g).reverse().forEach((b,E)=>{const O=b;O.classList.add("Toastify__toast--stacked"),E>0&&(O.dataset.collapsed=`${r}`),O.dataset.pos||(O.dataset.pos=x?"top":"bot");const N=I*(r?.2:1)+(r?0:y*E);O.style.setProperty("--y",`${x?N:-1*N}px`),O.style.setProperty("--g",`${y}`),O.style.setProperty("--s",""+(1-(r?S:0))),I+=O.offsetHeight,S+=.025})}},[r,l,n]),w.createElement("div",{ref:i,className:"Toastify",id:f,onMouseEnter:()=>{n&&(o(!1),Nt.pause())},onMouseLeave:h},a((p,g)=>{const y=g.length?{...u}:{...u,pointerEvents:"none"};return w.createElement("div",{className:m(p),style:y,key:`container-${p}`},g.map(x=>{let{content:I,props:S}=x;return w.createElement(RH,{...S,stacked:n,collapseAll:h,isIn:s(S.toastId,S.containerId),style:S.style,key:`toast-${S.key}`},I)}))}))}const _H=({size:e=24,fill:t="#12B76A"})=>C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:t,xmlns:"http://www.w3.org/2000/svg",children:C.jsx("g",{mask:"url(#mask0_4874_46615)",children:C.jsx("path",{d:"M10.6 13.8L8.425 11.625C8.24167 11.4417 8.01267 11.3543 7.738 11.363C7.46267 11.371 7.23333 11.4667 7.05 11.65C6.86667 11.8333 6.775 12.0667 6.775 12.35C6.775 12.6333 6.86667 12.8667 7.05 13.05L9.9 15.9C10.0833 16.0833 10.3167 16.175 10.6 16.175C10.8833 16.175 11.1167 16.0833 11.3 15.9L16.975 10.225C17.1583 10.0417 17.246 9.81233 17.238 9.537C17.2293 9.26233 17.1333 9.03333 16.95 8.85C16.7667 8.66667 16.5333 8.575 16.25 8.575C15.9667 8.575 15.7333 8.66667 15.55 8.85L10.6 13.8ZM12 22C10.6167 22 9.31667 21.7373 8.1 21.212C6.88333 20.6873 5.825 19.975 4.925 19.075C4.025 18.175 3.31267 17.1167 2.788 15.9C2.26267 14.6833 2 13.3833 2 12C2 10.6167 2.26267 9.31667 2.788 8.1C3.31267 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.31233 8.1 2.787C9.31667 2.26233 10.6167 2 12 2C13.3833 2 14.6833 2.26233 15.9 2.787C17.1167 3.31233 18.175 4.025 19.075 4.925C19.975 5.825 20.6873 6.88333 21.212 8.1C21.7373 9.31667 22 10.6167 22 12C22 13.3833 21.7373 14.6833 21.212 15.9C20.6873 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6873 15.9 21.212C14.6833 21.7373 13.3833 22 12 22ZM12 20C14.2167 20 16.1043 19.221 17.663 17.663C19.221 16.1043 20 14.2167 20 12C20 9.78333 19.221 7.89567 17.663 6.337C16.1043 4.779 14.2167 4 12 4C9.78333 4 7.896 4.779 6.338 6.337C4.77933 7.89567 4 9.78333 4 12C4 14.2167 4.77933 16.1043 6.338 17.663C7.896 19.221 9.78333 20 12 20Z",fill:t})})}),VH=({size:e=24,fill:t="#F04438"})=>C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("g",{id:"error",children:C.jsx("g",{mask:"url(#mask0_4874_46622)",children:C.jsx("path",{id:"error_2",d:"M12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16C13 15.7167 12.9042 15.4792 12.7125 15.2875C12.5208 15.0958 12.2833 15 12 15C11.7167 15 11.4792 15.0958 11.2875 15.2875C11.0958 15.4792 11 15.7167 11 16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17ZM12 13C12.2833 13 12.5208 12.9042 12.7125 12.7125C12.9042 12.5208 13 12.2833 13 12V8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8V12C11 12.2833 11.0958 12.5208 11.2875 12.7125C11.4792 12.9042 11.7167 13 12 13ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",fill:t})})})}),zH=({size:e=24,fill:t="#F79009"})=>C.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:C.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99ZM2.74 18C1.97 19.33 2.93 21 4.47 21H19.53C21.07 21 22.03 19.33 21.26 18L13.73 4.99C12.96 3.66 11.04 3.66 10.27 4.99L2.74 18ZM11 11V13C11 13.55 11.45 14 12 14C12.55 14 13 13.55 13 13V11C13 10.45 12.55 10 12 10C11.45 10 11 10.45 11 11ZM11 16H13V18H11V16Z",fill:t})}),HH=({size:e=24,fill:t="#016DCF"})=>C.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[C.jsx("mask",{id:"mask0_32271_5688",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:C.jsx("rect",{width:"24",height:"24",fill:"#D9D9D9"})}),C.jsx("g",{mask:"url(#mask0_32271_5688)",children:C.jsx("path",{d:"M12 17C12.2833 17 12.5208 16.9042 12.7125 16.7125C12.9042 16.5208 13 16.2833 13 16V12C13 11.7167 12.9042 11.4792 12.7125 11.2875C12.5208 11.0958 12.2833 11 12 11C11.7167 11 11.4792 11.0958 11.2875 11.2875C11.0958 11.4792 11 11.7167 11 12V16C11 16.2833 11.0958 16.5208 11.2875 16.7125C11.4792 16.9042 11.7167 17 12 17ZM12 9C12.2833 9 12.5208 8.90417 12.7125 8.7125C12.9042 8.52083 13 8.28333 13 8C13 7.71667 12.9042 7.47917 12.7125 7.2875C12.5208 7.09583 12.2833 7 12 7C11.7167 7 11.4792 7.09583 11.2875 7.2875C11.0958 7.47917 11 7.71667 11 8C11 8.28333 11.0958 8.52083 11.2875 8.7125C11.4792 8.90417 11.7167 9 12 9ZM12 22C10.6167 22 9.31667 21.7375 8.1 21.2125C6.88333 20.6875 5.825 19.975 4.925 19.075C4.025 18.175 3.3125 17.1167 2.7875 15.9C2.2625 14.6833 2 13.3833 2 12C2 10.6167 2.2625 9.31667 2.7875 8.1C3.3125 6.88333 4.025 5.825 4.925 4.925C5.825 4.025 6.88333 3.3125 8.1 2.7875C9.31667 2.2625 10.6167 2 12 2C13.3833 2 14.6833 2.2625 15.9 2.7875C17.1167 3.3125 18.175 4.025 19.075 4.925C19.975 5.825 20.6875 6.88333 21.2125 8.1C21.7375 9.31667 22 10.6167 22 12C22 13.3833 21.7375 14.6833 21.2125 15.9C20.6875 17.1167 19.975 18.175 19.075 19.075C18.175 19.975 17.1167 20.6875 15.9 21.2125C14.6833 21.7375 13.3833 22 12 22ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76667 19.225 7.875 17.675 6.325C16.125 4.775 14.2333 4 12 4C9.76667 4 7.875 4.775 6.325 6.325C4.775 7.875 4 9.76667 4 12C4 14.2333 4.775 16.125 6.325 17.675C7.875 19.225 9.76667 20 12 20Z",fill:t})})]}),GH=({size:e=24,fill:t="#016DCF"})=>C.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 24 24",fill:"none",children:[C.jsx("mask",{id:"mask0_35096_2621",maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24",children:C.jsx("rect",{width:"24",height:"24",fill:"#D9D9D9"})}),C.jsx("g",{mask:"url(#mask0_35096_2621)",children:C.jsx("path",{d:"M8 20H16V17C16 15.9 15.6083 14.9583 14.825 14.175C14.0417 13.3917 13.1 13 12 13C10.9 13 9.95833 13.3917 9.175 14.175C8.39167 14.9583 8 15.9 8 17V20ZM12 11C13.1 11 14.0417 10.6083 14.825 9.825C15.6083 9.04167 16 8.1 16 7V4H8V7C8 8.1 8.39167 9.04167 9.175 9.825C9.95833 10.6083 10.9 11 12 11ZM5 22C4.71667 22 4.47917 21.9042 4.2875 21.7125C4.09583 21.5208 4 21.2833 4 21C4 20.7167 4.09583 20.4792 4.2875 20.2875C4.47917 20.0958 4.71667 20 5 20H6V17C6 15.9833 6.2375 15.0292 6.7125 14.1375C7.1875 13.2458 7.85 12.5333 8.7 12C7.85 11.4667 7.1875 10.7542 6.7125 9.8625C6.2375 8.97083 6 8.01667 6 7V4H5C4.71667 4 4.47917 3.90417 4.2875 3.7125C4.09583 3.52083 4 3.28333 4 3C4 2.71667 4.09583 2.47917 4.2875 2.2875C4.47917 2.09583 4.71667 2 5 2H19C19.2833 2 19.5208 2.09583 19.7125 2.2875C19.9042 2.47917 20 2.71667 20 3C20 3.28333 19.9042 3.52083 19.7125 3.7125C19.5208 3.90417 19.2833 4 19 4H18V7C18 8.01667 17.7625 8.97083 17.2875 9.8625C16.8125 10.7542 16.15 11.4667 15.3 12C16.15 12.5333 16.8125 13.2458 17.2875 14.1375C17.7625 15.0292 18 15.9833 18 17V20H19C19.2833 20 19.5208 20.0958 19.7125 20.2875C19.9042 20.4792 20 20.7167 20 21C20 21.2833 19.9042 21.5208 19.7125 21.7125C19.5208 21.9042 19.2833 22 19 22H5Z",fill:t})})]}),WH=({size:e=16})=>C.jsx("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:C.jsx("path",{d:"M18.3 5.71a.996.996 0 00-1.41 0L12 10.59 7.11 5.7A.996.996 0 105.7 7.11L10.59 12 5.7 16.89a.996.996 0 101.41 1.41L12 13.41l4.89 4.89a.996.996 0 101.41-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"})}),UH=e=>{switch(e){case"success":return C.jsx("div",{className:"w-8 h-8 bg-green-50 dark:bg-green-900 rounded-full p-1 flex justify-center items-center",children:C.jsx(_H,{size:24,fill:"#12B76A"})});case"error":return C.jsx("div",{className:"w-8 h-8 bg-red-50 dark:bg-red-900 rounded-full p-1 flex justify-center items-center",children:C.jsx(VH,{fill:"#F04438",size:24})});case"warning":return C.jsx("div",{className:"w-8 h-8 bg-yellow-50 dark:bg-yellow-900 rounded-full p-1 flex justify-center items-center",children:C.jsx(zH,{fill:"#F79009",size:24})});case"info":return C.jsx("div",{className:"w-8 h-8 bg-blue-50 dark:bg-blue-900 rounded-full p-1 flex justify-center items-center",children:C.jsx(HH,{})});case"in-progress":return C.jsx("div",{className:"w-8 h-8 bg-blue-50 dark:bg-blue-900 rounded-full p-1 flex justify-center items-center",children:C.jsx(GH,{})});default:return null}},XH={success:"border-b-[5px] !border-green-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600",error:"border-b-[5px] !border-red-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600",warning:"border-b-[5px] !border-yellow-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600",info:"border-b-[5px] !border-blue-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600","in-progress":"border-b-[5px] !border-blue-500 dark:!border-t-[1px] dark:!border-r-[1px] dark:!border-l-[1px] dark:!border-t-neutral-600 dark:!border-r-neutral-600 dark:!border-l-neutral-600"},YH=({closeToast:e})=>C.jsx("button",{onClick:e,className:"text-neutral-900 dark:text-white hover:text-neutral-600 dark:hover:text-neutral-300 transition-colors",children:C.jsx(WH,{size:16})}),JH=({position:e="bottom-right",autoClose:t=3e3,hideProgressBar:n=!0,newestOnTop:r=!0,closeOnClick:o=!0,pauseOnFocusLoss:i=!1,draggable:a=!0,pauseOnHover:s=!0,rtl:l=!1,className:c,style:u={zIndex:1e5},...d})=>C.jsx(BH,{position:e,transition:FH,autoClose:t,hideProgressBar:n,newestOnTop:r,closeOnClick:o,rtl:l,pauseOnFocusLoss:i,draggable:a,pauseOnHover:s,icon:({type:f})=>UH(f),bodyStyle:{gap:"4px"},style:u,toastClassName:f=>{const{type:m="",defaultClassName:h=""}=f||{};return`w-[100%] sm:w-[400px] bg-white dark:bg-neutral-800 rounded-[4px] font-medium text-sm text-neutral-900 dark:text-white shadow-lg p-[20px] min-h-0 ${h} ${XH[m]} ${c||""}`},closeButton:YH,...d}),ZH={success:(e,t)=>Nt.success(e,t),error:(e,t)=>Nt.error(e,t),warning:(e,t)=>Nt.warning(e,t),info:(e,t)=>Nt.info(e,t),inProgress:(e,t)=>Nt(e,{...t,type:"in-progress"}),dismiss:e=>Nt.dismiss(e),isActive:e=>Nt.isActive(e)},Zr=({status:e="primary",appearance:t,className:n,disabled:r,children:o,isLoading:i,title:a,id:s,onClick:l,onKeyDown:c,badge:u,type:d="button",options:f,tooltip:m,tooltipPlacement:h="top",theme:p="light"})=>{const g=w.useCallback(()=>{switch(t){case"outline":return I();case"ghost":return S();case"dashed":return b();default:return x()}},[t,e,r,p]),y=w.useCallback(()=>{switch(t){case"dashed":return E();default:return{}}},[t,e,r,p]),x=w.useCallback(()=>{switch(e){case"primary":return"bg-primary-600 text-white focus:border-primary-200 hover:bg-primary-700 disabled:opacity-60";case"secondary":return"bg-primary-50 dark:bg-black-800 text-primary-600 dark:hover:text-primary-400 border border-primary-200 dark:border-primary-600 hover:bg-primary-100 dark:hover:bg-black-800 focus:border-primary-200 hover:border-primary-200 dark:hover:border-primary-400 disabled:opacity-60";case"error":return"bg-error-600 dark:bg-error-500 text-white hover:bg-error-700 dark:hover:bg-error-600 focus:!border-error-300 dark:focus:!border-error-600 dark:focus:bg-error-800 disabled:opacity-60";case"error-secondary":return"bg-error-100 dark:bg-black-800 text-error-600 border !border-error-300 dark:!border-error-900 hover:bg-error-200 focus:!border-error-300 dark:focus:!border-error-400 disabled:opacity-60";case"secondary-neutral":return"bg-white dark:bg-black-800 text-neutral-900 border border-neutral-300 dark:border-black-600 dark:hover:bg-black-600 dark:text-black-200 hover:bg-neutral-100 focus:border-primary-200 disabled:opacity-60";case"warning":return"bg-warning-300 dark:bg-warning-600 text-white border-warning-300 border hover:bg-warning-400 disabled:opacity-60";case"success":return"bg-success-600 text-white border-success-600 border hover:bg-success-700 disabled:opacity-60";case"publish":return"bg-teal-800 text-white border-teal-800 border hover:bg-teal-900 disabled:opacity-60";case"no-background":return"bg-transparent text-neutral-900 dark:text-black-100 border-transparent border";default:return"bg-white dark:bg-black-800 text-neutral-900 dark:text-white border-white border hover:bg-neutral-100 dark:hover:bg-black-600 disabled:opacity-60"}},[e,r,p]),I=w.useCallback(()=>{switch(e){case"primary":return"text-primary-700 dark:text-primary-600 border-primary-700 border dark:border-primary-600 hover:bg-primary-100 disabled:opacity-60";case"secondary":return"text-primary-700 dark:text-primary-600 border-primary-100 dark:border-primary-600 border bg-primary-50 dark:bg-black-800 hover:bg-primary-100 disabled:opacity-60";case"secondary-neutral":return"text-neutral-900 dark:text-white border-neutral-300 dark:border-neutral-700 border bg-white dark:bg-black-800 hover:bg-neutral-100 dark:hover:bg-black-600 disabled:opacity-60";case"error":return"text-error-600 dark:text-error-500 !border-error-600 dark:!border-error-500 border hover:bg-[#FEF3F2] disabled:opacity-60";case"warning":return"text-warning-300 dark:text-warning-500 border-warning-300 dark:border-warning-500 border hover:bg-[#FFFAEB] disabled:opacity-60";case"success":return"text-success-600 dark:text-success-500 border-success-600 dark:border-success-500 border hover:bg-[#ECFDF3] disabled:opacity-60";default:return"bg-white dark:bg-black-800 text-neutral-900 dark:text-white border-neutral-300 dark:border-neutral-700 border hover:bg-neutral-100 dark:hover:bg-black-600 disabled:opacity-60"}},[e,p]),S=w.useCallback(()=>{switch(e){case"primary":return"text-primary-700 dark:text-primary-600 border border-transparent dark:border-transparent hover:text-primary-700 disabled:opacity-60";case"secondary":return"text-primary-50 dark:text-primary-900 border border-transparent dark:border-transparent hover:text-primary-100 disabled:opacity-60";case"error":return"text-error-600 dark:text-error-500 border border-transparent dark:border-transparent hover:text-error-600 disabled:opacity-60";case"warning":return"text-warning-300 dark:text-warning-500 border border-transparent dark:border-transparent hover:text-warning-400 disabled:opacity-60";case"success":return"text-success-600 dark:text-success-500 border border-transparent dark:border-transparent hover:text-success-700 disabled:opacity-60";default:return"text-neutral-900 dark:text-white border border-transparent dark:border-transparent hover:text-[#667085] disabled:opacity-60"}},[e,p]),b=w.useCallback(()=>{switch(e){case"primary":return"bg-primary-50 dark:bg-black-700 text-primary-600 dark:text-primary-600 disabled:text-primary-100 hover:bg-primary-100 dark:hover:bg-black-600";default:return"bg-primary-50 dark:bg-black-700 text-primary-600 dark:text-primary-600 disabled:text-primary-100 hover:bg-primary-100 dark:hover:bg-black-600"}},[e,p]),E=w.useCallback(()=>{switch(e){case"primary":return{backgroundImage:"repeating-linear-gradient(3deg, #016DCF, #016DCF 10px, transparent 10px, transparent 19px, #016DCF 19px), repeating-linear-gradient(93deg, #016DCF, #016DCF 10px, transparent 10px, transparent 19px, #016DCF 19px), repeating-linear-gradient(183deg, #016DCF, #016DCF 10px, transparent 10px, transparent 19px, #016DCF 19px), repeating-linear-gradient(273deg, #016DCF, #016DCF 10px, transparent 10px, transparent 19px, #016DCF 19px)",backgroundSize:"1px 100%, 100% 1px, 1px 100% , 100% 1px",backgroundPosition:"0 0, 0 0, 100% 0, 0 100%",backgroundRepeat:"no-repeat"};default:return{}}},[e,p]),O=()=>C.jsx(C.Fragment,{children:C.jsx(yE,{size:24,className:"inline mr-2 spinner"})});return C.jsx(bo,{title:m,placement:h,delayShow:!0,children:C.jsxs("button",{className:`
|
|
391
391
|
${n||""}
|
|
392
392
|
cursor-pointer
|
|
393
393
|
font-inter
|