@simpoobusiness/sdk 2.0.44 → 2.0.46

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.
@@ -138,7 +138,7 @@ function(e,t){return tm(e,t)}(e,{shouldForwardProp:h,label:gm(),...c}),g=e=>{if(
138
138
  }
139
139
  `,_y=D.forwardRef(function(e,t){const n=ry({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:o={},className:a,...i}=n,[s,l]=D.useState([]),u=D.useRef(0),c=D.useRef(null);D.useEffect(()=>{c.current&&(c.current(),c.current=null)},[s]);const d=D.useRef(!1),f=vy(),p=D.useRef(null),h=D.useRef(null),g=D.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:a,cb:i}=e;l(e=>[...e,m.jsx(ky,{classes:{ripple:Dr(o.ripple,by.ripple),rippleVisible:Dr(o.rippleVisible,by.rippleVisible),ripplePulsate:Dr(o.ripplePulsate,by.ripplePulsate),child:Dr(o.child,by.child),childLeaving:Dr(o.childLeaving,by.childLeaving),childPulsate:Dr(o.childPulsate,by.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:a},u.current)]),u.current+=1,c.current=i},[o]),y=D.useCallback((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:a=r||t.pulsate,fakeElement:i=!1}=t;if("mousedown"===e?.type&&d.current)return void(d.current=!1);"touchstart"===e?.type&&(d.current=!0);const s=i?null:h.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let u,c,m;if(a||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(l.width/2),c=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;u=Math.round(t-l.left),c=Math.round(n-l.top)}if(a)m=Math.sqrt((2*l.width**2+l.height**2)/3),m%2==0&&(m+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-u),u)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-c),c)+2;m=Math.sqrt(e**2+t**2)}e?.touches?null===p.current&&(p.current=()=>{g({pulsate:o,rippleX:u,rippleY:c,rippleSize:m,cb:n})},f.start(80,()=>{p.current&&(p.current(),p.current=null)})):g({pulsate:o,rippleX:u,rippleY:c,rippleSize:m,cb:n})},[r,g,f]),v=D.useCallback(()=>{y({},{pulsate:!0})},[y]),b=D.useCallback((e,t)=>{if(f.clear(),"touchend"===e?.type&&p.current)return p.current(),p.current=null,void f.start(0,()=>{b(e,t)});p.current=null,l(e=>e.length>0?e.slice(1):e),c.current=t},[f]);return D.useImperativeHandle(t,()=>({pulsate:v,start:y,stop:b}),[v,y,b]),m.jsx(Cy,{className:Dr(by.root,o.root,a),ref:h,...i,children:m.jsx(my,{component:null,exit:!0,children:s})})});function Ey(e){return Wd("MuiButtonBase",e)}const jy=qd("MuiButtonBase",["root","disabled","focusVisible"]),Oy=ny("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${jy.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ny=D.forwardRef(function(e,t){const n=ry({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:o=!1,children:a,className:i,component:s="button",disabled:l=!1,disableRipple:u=!1,disableTouchRipple:c=!1,focusRipple:d=!1,focusVisibleClassName:f,LinkComponent:p="a",onBlur:h,onClick:g,onContextMenu:y,onDragLeave:v,onFocus:b,onFocusVisible:w,onKeyDown:x,onKeyUp:S,onMouseDown:C,onMouseLeave:k,onMouseUp:_,onTouchEnd:E,onTouchMove:j,onTouchStart:O,tabIndex:N=0,TouchRippleProps:R,touchRippleRef:P,type:T,...M}=n,I=D.useRef(null),A=ly.use(),F=oy(A.ref,P),[L,z]=D.useState(!1);l&&L&&z(!1),D.useImperativeHandle(r,()=>({focusVisible:()=>{z(!0),I.current.focus()}}),[]);const $=A.shouldMount&&!u&&!l;D.useEffect(()=>{L&&d&&!u&&A.pulsate()},[u,d,L,A]);const H=Ry(A,"start",C,c),V=Ry(A,"stop",y,c),B=Ry(A,"stop",v,c),U=Ry(A,"stop",_,c),W=Ry(A,"stop",e=>{L&&e.preventDefault(),k&&k(e)},c),q=Ry(A,"start",O,c),Y=Ry(A,"stop",E,c),G=Ry(A,"stop",j,c),K=Ry(A,"stop",e=>{Zd(e.target)||z(!1),h&&h(e)},!1),Q=ay(e=>{I.current||(I.current=e.currentTarget),Zd(e.target)&&(z(!0),w&&w(e)),b&&b(e)}),X=()=>{const e=I.current;return s&&"button"!==s&&!("A"===e.tagName&&e.href)},Z=ay(e=>{d&&!e.repeat&&L&&" "===e.key&&A.stop(e,()=>{A.start(e)}),e.target===e.currentTarget&&X()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&X()&&"Enter"===e.key&&!l&&(e.preventDefault(),g&&g(e))}),J=ay(e=>{d&&" "===e.key&&L&&!e.defaultPrevented&&A.stop(e,()=>{A.pulsate(e)}),S&&S(e),g&&e.target===e.currentTarget&&X()&&" "===e.key&&!e.defaultPrevented&&g(e)});let ee=s;"button"===ee&&(M.href||M.to)&&(ee=p);const te={};"button"===ee?(te.type=void 0===T?"button":T,te.disabled=l):(M.href||M.to||(te.role="button"),l&&(te["aria-disabled"]=l));const ne=oy(t,I),re={...n,centerRipple:o,component:s,disabled:l,disableRipple:u,disableTouchRipple:c,focusRipple:d,tabIndex:N,focusVisible:L},oe=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=Hd({root:["root",t&&"disabled",n&&"focusVisible"]},Ey,o);return n&&r&&(a.root+=` ${r}`),a})(re);return m.jsxs(Oy,{as:ee,className:Dr(oe.root,i),ownerState:re,onBlur:K,onClick:g,onContextMenu:V,onFocus:Q,onKeyDown:Z,onKeyUp:J,onMouseDown:H,onMouseLeave:W,onMouseUp:U,onDragLeave:B,onTouchEnd:Y,onTouchMove:G,onTouchStart:q,ref:ne,tabIndex:l?-1:N,type:T,...te,...M,children:[a,$?m.jsx(_y,{ref:F,center:o,...R}):null]})});function Ry(e,t,n,r=!1){return ay(o=>(n&&n(o),r||e[t](o),!0))}function Py(e=[]){return([,t])=>t&&function(e,t=[]){if(!function(e){return"string"==typeof e.main}(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||"string"!=typeof e[n])return!1;return!0}(t,e)}const Ty=function(e){let t,n;return function(r){let o=t;return void 0!==o&&r.theme===n||(Im.theme=r.theme,o=um(e(Im)),t=o,n=r.theme),o}};function Dy(e){return Wd("MuiSvgIcon",e)}qd("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const My=ny("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${ef(n.color)}`],t[`fontSize${ef(n.fontSize)}`]]}})(Ty(({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:e=>!e.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(([,e])=>e&&e.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}}]}))),Iy=D.forwardRef(function(e,t){const n=ry({props:e,name:"MuiSvgIcon"}),{children:r,className:o,color:a="inherit",component:i="svg",fontSize:s="medium",htmlColor:l,inheritViewBox:u=!1,titleAccess:c,viewBox:d="0 0 24 24",...f}=n,p=D.isValidElement(r)&&"svg"===r.type,h={...n,color:a,component:i,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:d,hasSvgAsChild:p},g={};u||(g.viewBox=d);const y=(e=>{const{color:t,fontSize:n,classes:r}=e;return Hd({root:["root","inherit"!==t&&`color${ef(t)}`,`fontSize${ef(n)}`]},Dy,r)})(h);return m.jsxs(My,{as:i,className:Dr(y.root,o),focusable:"false",color:l,"aria-hidden":!c||void 0,role:c?"img":void 0,ref:t,...g,...f,...p&&r.props,ownerState:h,children:[p?r.props.children:r,c?m.jsx("title",{children:c}):null]})});function Ay(e,t){function n(t,n){return m.jsx(Iy,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=Iy.muiName,D.memo(D.forwardRef(n))}Iy.muiName="SvgIcon";var Fy=Ay(m.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"})),Ly=Ay(m.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"})),zy=Ay(m.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),$y=Ay(m.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}));function Hy(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t}function Vy(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:a}=e;if(!t){const e=Dr(n?.className,a,o?.className,r?.className),t={...n?.style,...o?.style,...r?.style},i={...n,...o,...r};return e.length>0&&(i.className=e),Object.keys(t).length>0&&(i.style=t),{props:i,internalRef:void 0}}const i=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}({...o,...r}),s=Hy(r),l=Hy(o),u=t(i),c=Dr(u?.className,n?.className,a,o?.className,r?.className),d={...u?.style,...n?.style,...o?.style,...r?.style},f={...u,...n,...l,...s};return c.length>0&&(f.className=c),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:u.ref}}function By(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:a,internalForwardedProps:i,shouldForwardComponentProp:s=!1,...l}=t,{component:u,slots:c={[e]:void 0},slotProps:d={[e]:void 0},...f}=a,p=c[e]||r,h=function(e,t,n){return"function"==typeof e?e(t,n):e}(d[e],o),{props:{component:m,...g},internalRef:y}=Vy({className:n,...l,externalForwardedProps:"root"===e?f:void 0,externalSlotProps:h}),v=oy(y,h?.ref,t.ref),b="root"===e?m||u:m,w=function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}(p,{..."root"===e&&!u&&!c[e]&&i,..."root"!==e&&!c[e]&&i,...g,...b&&!s&&{as:b},...b&&s&&{component:b},ref:v},o);return[p,w]}const Uy=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${ef(n.size)}`],"text"===n.variant&&t[`text${ef(n.color)}`],"outlined"===n.variant&&t[`outlined${ef(n.color)}`],"rounded"===n.shape&&t.rounded,"page"===n.type&&t.page,("start-ellipsis"===n.type||"end-ellipsis"===n.type)&&t.ellipsis,("previous"===n.type||"next"===n.type)&&t.previousNext,("first"===n.type||"last"===n.type)&&t.firstLast]},Wy=ny("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:Uy})(Ty(({theme:e})=>({...e.typography.body2,borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,height:"auto",[`&.${Xd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:{size:"small"},style:{minWidth:26,borderRadius:13,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,borderRadius:20,padding:"0 10px",fontSize:e.typography.pxToRem(15)}}]}))),qy=ny(Ny,{name:"MuiPaginationItem",slot:"Root",overridesResolver:Uy})(Ty(({theme:e})=>({...e.typography.body2,borderRadius:16,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,[`&.${Xd.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Xd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},transition:e.transitions.create(["color","background-color"],{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Xd.selected}`]:{backgroundColor:(e.vars||e).palette.action.selected,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Xd.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},[`&.${Xd.disabled}`]:{opacity:1,color:(e.vars||e).palette.action.disabled,backgroundColor:(e.vars||e).palette.action.selected}},variants:[{props:{size:"small"},style:{minWidth:26,height:26,borderRadius:13,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,height:40,borderRadius:20,padding:"0 10px",fontSize:e.typography.pxToRem(15)}},{props:{shape:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"outlined"},style:{border:e.vars?`1px solid ${e.alpha(e.vars.palette.common.onBackground,.23)}`:"1px solid "+("light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${Xd.selected}`]:{[`&.${Xd.disabled}`]:{borderColor:(e.vars||e).palette.action.disabledBackground,color:(e.vars||e).palette.action.disabled}}}},{props:{variant:"text"},style:{[`&.${Xd.selected}`]:{[`&.${Xd.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}},...Object.entries(e.palette).filter(Py(["dark","contrastText"])).map(([t])=>({props:{variant:"text",color:t},style:{[`&.${Xd.selected}`]:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}},[`&.${Xd.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark},[`&.${Xd.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}})),...Object.entries(e.palette).filter(Py(["light"])).map(([t])=>({props:{variant:"outlined",color:t},style:{[`&.${Xd.selected}`]:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.alpha((e.vars||e).palette[t].main,.5)}`,backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.activatedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,`${(e.vars||e).palette.action.activatedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Xd.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[t].main,`${(e.vars||e).palette.action.activatedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}}}))]}))),Yy=ny("div",{name:"MuiPaginationItem",slot:"Icon"})(Ty(({theme:e})=>({fontSize:e.typography.pxToRem(20),margin:"0 -8px",variants:[{props:{size:"small"},style:{fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{fontSize:e.typography.pxToRem(22)}}]}))),Gy=D.forwardRef(function(e,t){const n=ry({props:e,name:"MuiPaginationItem"}),{className:r,color:o="standard",component:a,components:i={},disabled:s=!1,page:l,selected:u=!1,shape:c="circular",size:d="medium",slots:f={},slotProps:p={},type:h="page",variant:g="text",...y}=n,v={...n,color:o,disabled:s,selected:u,shape:c,size:d,type:h,variant:g},b=D.useContext(Kd)??!1,w=(e=>{const{classes:t,color:n,disabled:r,selected:o,size:a,shape:i,type:s,variant:l}=e;return Hd({root:["root",`size${ef(a)}`,l,i,"standard"!==n&&`color${ef(n)}`,"standard"!==n&&`${l}${ef(n)}`,r&&"disabled",o&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]},Qd,t)})(v),x={slots:{previous:f.previous??i.previous,next:f.next??i.next,first:f.first??i.first,last:f.last??i.last},slotProps:p},[S,C]=By("previous",{elementType:zy,externalForwardedProps:x,ownerState:v}),[k,_]=By("next",{elementType:$y,externalForwardedProps:x,ownerState:v}),[E,j]=By("first",{elementType:Fy,externalForwardedProps:x,ownerState:v}),[O,N]=By("last",{elementType:Ly,externalForwardedProps:x,ownerState:v}),R=b?{previous:"next",next:"previous",first:"last",last:"first"}[h]:h,P={previous:S,next:k,first:E,last:O}[R],T={previous:C,next:_,first:j,last:N}[R];return"start-ellipsis"===h||"end-ellipsis"===h?m.jsx(Wy,{ref:t,ownerState:v,className:Dr(w.root,r),children:"…"}):m.jsxs(qy,{ref:t,ownerState:v,component:a,disabled:s,className:Dr(w.root,r),...y,children:["page"===h&&l,P?m.jsx(Yy,{...T,className:w.icon,as:P}):null]})}),Ky=ny("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),Qy=ny("ul",{name:"MuiPagination",slot:"Ul"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function Xy(e,t,n){return"page"===e?`${n?"":"Go to "}page ${t}`:`Go to ${e} page`}const Zy=D.forwardRef(function(e,t){const n=ry({props:e,name:"MuiPagination"}),{boundaryCount:r=1,className:o,color:a="standard",count:i=1,defaultPage:s=1,disabled:l=!1,getItemAriaLabel:u=Xy,hideNextButton:c=!1,hidePrevButton:d=!1,onChange:f,page:p,renderItem:h=e=>m.jsx(Gy,{...e}),shape:g="circular",showFirstButton:y=!1,showLastButton:v=!1,siblingCount:b=1,size:w="medium",variant:x="text",...S}=n,{items:C}=Gd({...n,componentName:"Pagination"}),k={...n,boundaryCount:r,color:a,count:i,defaultPage:s,disabled:l,getItemAriaLabel:u,hideNextButton:c,hidePrevButton:d,renderItem:h,shape:g,showFirstButton:y,showLastButton:v,siblingCount:b,size:w,variant:x},_=(e=>{const{classes:t,variant:n}=e;return Hd({root:["root",n],ul:["ul"]},Yd,t)})(k);return m.jsx(Ky,{"aria-label":"pagination navigation",className:Dr(_.root,o),ownerState:k,ref:t,...S,children:m.jsx(Qy,{className:_.ul,ownerState:k,children:C.map((e,t)=>m.jsx("li",{children:h({...e,color:a,"aria-label":u(e.type,e.page,e.selected),shape:g,size:w,variant:x})},t))})})}),Jy={arrow:m.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M8.65833 15.7667C8.54866 15.7673 8.43994 15.7463 8.33841 15.7048C8.23688 15.6634 8.14453 15.6023 8.06667 15.525C7.91146 15.3689 7.82434 15.1577 7.82434 14.9375C7.82434 14.7174 7.91146 14.5062 8.06667 14.35L12.4083 10L8.06667 5.65004C7.93014 5.49062 7.85881 5.28556 7.86691 5.07583C7.87501 4.8661 7.96195 4.66715 8.11036 4.51874C8.25878 4.37032 8.45773 4.28338 8.66746 4.27528C8.87719 4.26718 9.08225 4.33852 9.24167 4.47504L14.1667 9.40837C14.2439 9.48624 14.305 9.57859 14.3465 9.68012C14.3879 9.78165 14.409 9.89037 14.4083 10C14.4053 10.2207 14.3189 10.432 14.1667 10.5917L9.225 15.525C9.07391 15.675 8.87116 15.7615 8.65833 15.7667Z",fill:"#A1A5B7"})}),info_input:m.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{opacity:"0.3",d:"M10 18.3332C14.6024 18.3332 18.3333 14.6022 18.3333 9.99984C18.3333 5.39746 14.6024 1.6665 10 1.6665C5.39763 1.6665 1.66667 5.39746 1.66667 9.99984C1.66667 14.6022 5.39763 18.3332 10 18.3332Z",fill:"#1868DB"}),m.jsx("path",{d:"M10 8.83301C10.221 8.83301 10.433 8.9208 10.5893 9.07708C10.7455 9.23337 10.8333 9.44533 10.8333 9.66634V13.5497C10.8333 13.7707 10.7455 13.9826 10.5893 14.1389C10.433 14.2952 10.221 14.383 10 14.383C9.77899 14.383 9.56703 14.2952 9.41075 14.1389C9.25447 13.9826 9.16667 13.7707 9.16667 13.5497V9.66634C9.16667 9.44533 9.25447 9.23337 9.41075 9.07708C9.56703 8.9208 9.77899 8.83301 10 8.83301Z",fill:"#1868DB"}),m.jsx("path",{d:"M10 7.70003C10.5753 7.70003 11.0417 7.23366 11.0417 6.65837C11.0417 6.08307 10.5753 5.6167 10 5.6167C9.42471 5.6167 8.95834 6.08307 8.95834 6.65837C8.95834 7.23366 9.42471 7.70003 10 7.70003Z",fill:"#1868DB"})]}),cube:m.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{opacity:"0.3",d:"M9.90996 21.67L4.66996 18.67C4.02642 18.2997 3.4934 17.7643 3.12598 17.1192C2.75856 16.474 2.57006 15.7424 2.57996 15V9C2.57541 8.26267 2.76644 7.53731 3.13359 6.89787C3.50075 6.25843 4.03088 5.72778 4.66996 5.36L9.90996 2.36C10.5447 1.99116 11.2658 1.79688 12 1.79688C12.7341 1.79688 13.4552 1.99116 14.09 2.36L19.33 5.36C19.969 5.72778 20.4992 6.25843 20.8663 6.89787C21.2335 7.53731 21.4245 8.26267 21.42 9V15C21.4192 15.7323 21.2257 16.4514 20.8588 17.0851C20.4919 17.7188 19.9646 18.2448 19.33 18.61L14.09 21.61C13.4605 21.988 12.7422 22.1927 12.008 22.2032C11.2739 22.2137 10.55 22.0298 9.90996 21.67Z",fill:"#1868DB"}),m.jsx("path",{opacity:"0.3",d:"M20.8599 6.89C20.4965 6.2519 19.968 5.7234 19.3299 5.36L14.0899 2.36C13.4551 1.99116 12.734 1.79688 11.9999 1.79688C11.2657 1.79688 10.5447 1.99116 9.90989 2.36L4.66989 5.36C4.03179 5.7234 3.5033 6.2519 3.13989 6.89L11.9999 12L20.8599 6.89Z",fill:"#1868DB"}),m.jsx("path",{d:"M20.85 6.89014L12 12.0001L12.13 22.2201C12.8324 22.2082 13.5203 22.019 14.13 21.6701L19.37 18.6701C20.0061 18.2948 20.5311 17.7572 20.8913 17.1124C21.2515 16.4675 21.4339 15.7386 21.42 15.0001V9.00014C21.4215 8.25857 21.2247 7.53009 20.85 6.89014Z",fill:"#1868DB"})]}),magnifier:m.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{opacity:"0.3",d:"M19.7083 17.8015L16.8025 15.0515C16.25 15.7628 15.5878 16.3817 14.8408 16.8848L17.8292 19.7265C17.9548 19.8733 18.1102 19.9917 18.285 20.074C18.4598 20.1563 18.6501 20.2005 18.8432 20.2038C19.0364 20.2071 19.2281 20.1694 19.4056 20.0932C19.5832 20.017 19.7425 19.9039 19.8731 19.7615C20.0037 19.6192 20.1026 19.4507 20.1633 19.2673C20.224 19.0839 20.2451 18.8897 20.2252 18.6975C20.2053 18.5053 20.1449 18.3195 20.0479 18.1525C19.9509 17.9854 19.8195 17.8408 19.6625 17.7282L19.7083 17.8015Z",fill:"#7E8299"}),m.jsx("path",{d:"M10.2117 1.83325C8.57998 1.83325 6.98492 2.31711 5.62822 3.22363C4.27151 4.13015 3.21409 5.41862 2.58967 6.92611C1.96524 8.4336 1.80187 10.0924 2.1202 11.6927C2.43852 13.2931 3.22426 14.7631 4.37804 15.9169C5.53183 17.0707 7.00183 17.8564 8.60218 18.1747C10.2025 18.4931 11.8613 18.3297 13.3688 17.7053C14.8763 17.0808 16.1648 16.0234 17.0713 14.6667C17.9778 13.31 18.4617 11.7149 18.4617 10.0833C18.4617 7.89522 17.5925 5.7968 16.0453 4.24962C14.4981 2.70245 12.3997 1.83325 10.2117 1.83325ZM10.2117 15.9133C9.06081 15.9132 7.93578 15.5721 6.97875 14.9329C6.02172 14.2937 5.27564 13.3851 4.83481 12.3221C4.39397 11.259 4.27817 10.0891 4.50202 8.9602C4.72588 7.83132 5.27935 6.79413 6.09249 5.97971C6.90563 5.16529 7.94195 4.61018 9.07048 4.38455C10.199 4.15892 11.3691 4.27288 12.4329 4.71204C13.4966 5.1512 14.4064 5.89585 15.0471 6.85187C15.6878 7.8079 16.0307 8.93239 16.0325 10.0833C16.0349 10.8488 15.8861 11.6072 15.5945 12.315C15.303 13.0229 14.8744 13.6661 14.3336 14.2078C13.7927 14.7496 13.1501 15.1791 12.4428 15.4718C11.7354 15.7644 10.9772 15.9145 10.2117 15.9133Z",fill:"#7E8299"})]}),filter_edit:m.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M17.3083 3.4917V5.4917C17.3065 5.84118 17.2313 6.18639 17.0878 6.50504C16.9443 6.82369 16.7355 7.10871 16.475 7.3417L15.5167 8.17503C15.3929 8.28554 15.2303 8.34235 15.0646 8.33298C14.899 8.3236 14.7438 8.2488 14.6333 8.12503C14.5228 8.00126 14.466 7.83867 14.4754 7.67301C14.4848 7.50735 14.5596 7.35221 14.6833 7.2417L15.6333 6.40837C15.7618 6.29272 15.8646 6.15136 15.9349 5.99344C16.0053 5.83552 16.0416 5.66458 16.0417 5.4917V3.4917C16.0417 3.16902 15.9135 2.85956 15.6853 2.63139C15.4571 2.40322 15.1477 2.27503 14.825 2.27503H4.21667C3.89399 2.27503 3.58452 2.40322 3.35635 2.63139C3.12818 2.85956 3 3.16902 3 3.4917V5.5667C3.00618 5.87894 3.13137 6.17702 3.35 6.40003L6.48333 9.57503C7.19463 10.2901 7.59322 11.2581 7.59167 12.2667V16.6667C7.59567 16.8589 7.65113 17.0465 7.75227 17.2099C7.85341 17.3734 7.99654 17.5068 8.16674 17.5961C8.33694 17.6855 8.52798 17.7276 8.71997 17.718C8.91196 17.7084 9.09787 17.6475 9.25833 17.5417L10.3917 16.7084C10.459 16.6608 10.535 16.6269 10.6154 16.6087C10.6958 16.5904 10.779 16.5882 10.8602 16.6021C10.9415 16.6161 11.0192 16.6459 11.0889 16.6898C11.1587 16.7338 11.2191 16.7911 11.2667 16.8584C11.3143 16.9257 11.3482 17.0017 11.3664 17.0821C11.3846 17.1625 11.3868 17.2457 11.3729 17.3269C11.359 17.4082 11.3292 17.4859 11.2852 17.5556C11.2412 17.6254 11.184 17.6858 11.1167 17.7334L9.975 18.5667C9.62709 18.8036 9.22141 18.9415 8.80123 18.9659C8.38105 18.9903 7.96213 18.9002 7.58916 18.7051C7.21619 18.5101 6.90316 18.2175 6.68346 17.8585C6.46376 17.4995 6.34563 17.0876 6.34167 16.6667V12.2917C6.34169 11.6108 6.07202 10.9576 5.59167 10.475L2.5 7.30003C2.03298 6.84254 1.76375 6.22032 1.75 5.5667V3.4917C1.75 2.82866 2.01339 2.19277 2.48223 1.72393C2.95107 1.25509 3.58696 0.991699 4.25 0.991699H14.8417C15.4989 1.00046 16.1263 1.26772 16.5879 1.73561C17.0496 2.20351 17.3084 2.83439 17.3083 3.4917ZM16.3583 12.1584L15.7167 12.8084L13.5583 15C13.3939 15.1657 13.1858 15.2813 12.9583 15.3334L12.075 15.5167C11.9919 15.5249 11.9081 15.5249 11.825 15.5167C11.5126 15.5114 11.2142 15.386 10.9917 15.1667C10.849 15.0271 10.7431 14.8544 10.6835 14.6639C10.6239 14.4734 10.6124 14.2711 10.65 14.075L10.8167 13.1917C10.8569 12.9611 10.9675 12.7486 11.1333 12.5834L13.925 9.72503C14.0459 9.60279 14.19 9.50591 14.3488 9.44009C14.5077 9.37426 14.6781 9.34081 14.85 9.3417C15.1962 9.34532 15.5277 9.48268 15.775 9.72503L16.3167 10.2584C16.4464 10.379 16.5506 10.5245 16.6232 10.6862C16.6957 10.8478 16.7351 11.0224 16.739 11.1996C16.7429 11.3767 16.7112 11.5528 16.6458 11.7175C16.5804 11.8822 16.4827 12.0321 16.3583 12.1584ZM14.8 10.6334L14.3167 11.1334C14.3687 11.2877 14.4624 11.4247 14.5874 11.5291C14.7124 11.6335 14.8639 11.7013 15.025 11.725L15.4583 11.2834C15.4583 11.2834 15.4583 11.2167 15.4583 11.1834L14.9167 10.65C14.8947 10.6453 14.872 10.6453 14.85 10.65L14.8 10.6334ZM14.075 12.7C13.8068 12.5397 13.5787 12.3203 13.4083 12.0584L12.0083 13.4917L11.8583 14.325L12.6917 14.1084L14.075 12.7Z",fill:"inherit"})}),price_tag:m.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("g",{opacity:"0.3",children:m.jsx("path",{d:"M3.55997 6.65016L3.41997 11.7402C3.39903 12.4124 3.517 13.0818 3.76649 13.7063C4.01598 14.3309 4.39164 14.8973 4.86997 15.3702L9.42997 19.9402C9.84795 20.3589 10.3444 20.6912 10.8909 20.9178C11.4374 21.1445 12.0233 21.2612 12.615 21.2612C13.2066 21.2612 13.7925 21.1445 14.339 20.9178C14.8855 20.6912 15.382 20.3589 15.8 19.9402L20.57 15.1702C20.9887 14.7522 21.321 14.2557 21.5477 13.7092C21.7743 13.1627 21.891 12.5768 21.891 11.9852C21.891 11.3935 21.7743 10.8076 21.5477 10.2611C21.321 9.71459 20.9887 9.21814 20.57 8.80016L15.96 4.19016C15.4798 3.71338 14.9078 3.33903 14.2787 3.08979C13.6496 2.84055 12.9764 2.72161 12.3 2.74016L7.29997 2.91016C6.31604 2.93547 5.37939 3.33763 4.68341 4.0336C3.98744 4.72958 3.58528 5.66623 3.55997 6.65016Z",fill:"inherit"})}),m.jsx("path",{d:"M10.23 12.2304C11.7764 12.2304 13.03 10.9768 13.03 9.43037C13.03 7.88397 11.7764 6.63037 10.23 6.63037C8.6836 6.63037 7.42999 7.88397 7.42999 9.43037C7.42999 10.9768 8.6836 12.2304 10.23 12.2304Z",fill:"inherit"}),m.jsx("path",{d:"M13.1 17.0003C12.9509 17.0022 12.8046 16.9596 12.6799 16.8779C12.5551 16.7963 12.4575 16.6793 12.3996 16.5419C12.3416 16.4045 12.3259 16.253 12.3545 16.1066C12.3831 15.9603 12.4546 15.8258 12.56 15.7203L16.56 11.7203C16.7006 11.5799 16.8912 11.501 17.09 11.501C17.2887 11.501 17.4794 11.5799 17.62 11.7203C17.6907 11.7893 17.747 11.8717 17.7854 11.9627C17.8238 12.0537 17.8435 12.1515 17.8435 12.2503C17.8435 12.3491 17.8238 12.4469 17.7854 12.5379C17.747 12.629 17.6907 12.7114 17.62 12.7803L13.67 16.7803C13.5961 16.8555 13.507 16.914 13.4087 16.9519C13.3104 16.9898 13.2052 17.0063 13.1 17.0003Z",fill:"inherit"})]}),eyeslash:m.jsxs("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{d:"M2.88008 22.3404C2.67861 22.3386 2.48544 22.2599 2.34008 22.1204C2.19902 21.978 2.11987 21.7858 2.11987 21.5854C2.11987 21.385 2.19902 21.1927 2.34008 21.0504L20.6001 2.88037C20.6636 2.7878 20.7471 2.71068 20.8444 2.65467C20.9417 2.59867 21.0503 2.56523 21.1622 2.5568C21.2742 2.54838 21.3866 2.56519 21.4911 2.606C21.5957 2.64681 21.6898 2.71057 21.7665 2.79258C21.8431 2.8746 21.9004 2.97278 21.934 3.07987C21.9677 3.18697 21.9769 3.30025 21.9609 3.41137C21.9449 3.52249 21.9042 3.6286 21.8418 3.72189C21.7793 3.81518 21.6967 3.89325 21.6001 3.95037L3.40008 22.1204C3.26264 22.2595 3.07568 22.3386 2.88008 22.3404Z",fill:"black"}),m.jsx("path",{d:"M9.14993 13.1107C9.15256 12.3557 9.45368 11.6323 9.98758 11.0984C10.5215 10.5645 11.2449 10.2634 11.9999 10.2607C12.4251 10.2609 12.8448 10.3573 13.2275 10.5426C13.6102 10.7279 13.9461 10.9973 14.2099 11.3307L10.2099 15.3307C9.87756 15.0643 9.60962 14.7263 9.42608 14.3419C9.24255 13.9576 9.14815 13.5367 9.14993 13.1107ZM11.7099 15.9307C11.8065 15.9357 11.9033 15.9357 11.9999 15.9307C12.7558 15.9307 13.4807 15.6305 14.0152 15.096C14.5497 14.5615 14.8499 13.8366 14.8499 13.0807C14.8548 12.9908 14.8548 12.9007 14.8499 12.8107L11.7099 15.9307Z",fill:"black"}),m.jsx("path",{opacity:"0.3",d:"M6.05 19.5008L9.15 16.4108C8.70449 16.0196 8.34405 15.5411 8.09102 15.005C7.838 14.4688 7.69777 13.8864 7.67903 13.2938C7.66029 12.7013 7.76343 12.1112 7.98208 11.5601C8.20072 11.009 8.5302 10.5087 8.95011 10.0902C9.37001 9.67167 9.87139 9.34383 10.4232 9.12699C10.975 8.91015 11.5654 8.80893 12.1579 8.82961C12.7504 8.85029 13.3323 8.99243 13.8677 9.24721C14.403 9.50199 14.8803 9.86399 15.27 10.3108L18.43 7.16078C16.6374 5.59863 14.3743 4.68002 12 4.55078C7.27 4.55078 2 9.17078 2 13.1108C2 15.2508 3.71 17.7208 6.05 19.5008Z",fill:"black"}),m.jsx("path",{opacity:"0.3",d:"M16.0601 11.6004C16.2484 12.0817 16.3467 12.5935 16.3501 13.1104C16.3552 13.8149 16.1879 14.5101 15.8628 15.1352C15.5377 15.7604 15.0646 16.2965 14.4848 16.6968C13.905 17.0972 13.236 17.3496 12.5362 17.4322C11.8365 17.5147 11.1271 17.4248 10.4701 17.1704L7.33008 20.2904C8.74153 21.1458 10.3504 21.6212 12.0001 21.6704C17.0001 21.6704 22.0001 17.0804 22.0001 13.1104C21.8378 11.1937 20.9595 9.40848 19.5401 8.11035L16.0601 11.6004Z",fill:"black"})]}),eye_outline:m.jsx("svg",{width:"16",height:"14",viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M7.99998 9.39988C7.5253 9.39988 7.06129 9.25912 6.66661 8.99541C6.27193 8.73169 5.96432 8.35686 5.78267 7.91832C5.60102 7.47978 5.55349 6.99722 5.6461 6.53166C5.7387 6.06611 5.96728 5.63847 6.30292 5.30282C6.63857 4.96718 7.06621 4.7386 7.53176 4.646C7.99732 4.55339 8.47988 4.60092 8.91842 4.78257C9.35696 4.96422 9.73179 5.27183 9.99551 5.66651C10.2592 6.06119 10.4 6.5252 10.4 6.99988C10.3982 7.63586 10.1448 8.24529 9.69509 8.69499C9.24539 9.1447 8.63596 9.39812 7.99998 9.39988ZM7.99998 5.59988C7.72309 5.59988 7.45241 5.68199 7.22218 5.83582C6.99195 5.98966 6.81251 6.20831 6.70655 6.46412C6.60059 6.71994 6.57286 7.00143 6.62688 7.27301C6.6809 7.54458 6.81424 7.79404 7.01003 7.98983C7.20582 8.18562 7.45528 8.31896 7.72685 8.37298C7.99843 8.427 8.27992 8.39927 8.53574 8.29331C8.79155 8.18735 9.0102 8.00791 9.16404 7.77768C9.31787 7.54745 9.39998 7.27677 9.39998 6.99988C9.39998 6.62858 9.25248 6.27248 8.98993 6.00993C8.72738 5.74738 8.37128 5.59988 7.99998 5.59988ZM7.99998 13.2065C6.19341 13.1238 4.4753 12.4006 3.15331 11.1665C1.69998 9.89321 0.833313 8.33321 0.833313 6.99988C0.833313 4.03988 4.58665 0.793213 7.99998 0.793213C11.4133 0.793213 15.1666 4.12655 15.1666 6.99988C15.1666 10.0132 11.48 13.2065 7.99998 13.2065ZM7.99998 1.79321C5.17998 1.79321 1.83331 4.61321 1.83331 6.99988C1.83331 8.03988 2.59331 9.34655 3.83331 10.4132C4.97144 11.4773 6.44482 12.1114 7.99998 12.2065C11.1733 12.2065 14.1666 9.27321 14.1666 6.99988C14.1666 4.84655 10.98 1.79321 7.99998 1.79321Z",fill:"inherit"})}),eye:m.jsxs("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{d:"M11.9999 15.3504C13.5739 15.3504 14.8499 14.0744 14.8499 12.5004C14.8499 10.9264 13.5739 9.65039 11.9999 9.65039C10.4259 9.65039 9.1499 10.9264 9.1499 12.5004C9.1499 14.0744 10.4259 15.3504 11.9999 15.3504Z",fill:"black"}),m.jsx("path",{opacity:"0.3",d:"M11.9999 15.3504C13.5739 15.3504 14.8499 14.0744 14.8499 12.5004C14.8499 10.9264 13.5739 9.65039 11.9999 9.65039C10.4259 9.65039 9.1499 10.9264 9.1499 12.5004C9.1499 14.0744 10.4259 15.3504 11.9999 15.3504Z",fill:"black"}),m.jsx("path",{opacity:"0.3",d:"M12 3.94043C7.27 3.94043 2 8.56043 2 12.5004C2 16.2604 7.27 21.0604 12 21.0604C17 21.0604 22 16.4704 22 12.5004C22 8.68043 16.73 3.94043 12 3.94043ZM12 16.8504C11.1397 16.8504 10.2986 16.5953 9.58327 16.1173C8.86792 15.6393 8.31037 14.96 7.98112 14.1651C7.65188 13.3702 7.56574 12.4956 7.73358 11.6518C7.90143 10.808 8.31573 10.0329 8.92409 9.42452C9.53244 8.81616 10.3075 8.40186 11.1514 8.23401C11.9952 8.06617 12.8698 8.15231 13.6647 8.48155C14.4595 8.81079 15.1389 9.36834 15.6169 10.0837C16.0949 10.7991 16.35 11.6401 16.35 12.5004C16.35 13.6541 15.8917 14.7606 15.0759 15.5763C14.2601 16.3921 13.1537 16.8504 12 16.8504Z",fill:"black"})]}),trash:m.jsx("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M3.51994 15.1668C2.96424 15.1616 2.43084 14.9475 2.02573 14.5671C1.62061 14.1867 1.37343 13.6678 1.33328 13.1135L0.846611 6.15352C0.842233 6.08785 0.850832 6.02197 0.871915 5.95964C0.892998 5.8973 0.926153 5.83972 0.969487 5.7902C1.01282 5.74067 1.06549 5.70017 1.12447 5.671C1.18346 5.64183 1.24762 5.62456 1.31328 5.62018C1.37894 5.61581 1.44482 5.6244 1.50716 5.64549C1.56949 5.66657 1.62707 5.69973 1.67659 5.74306C1.72612 5.78639 1.76662 5.83906 1.79579 5.89804C1.82497 5.95703 1.84223 6.02119 1.84661 6.08685L2.31994 13.0468C2.34358 13.3534 2.48268 13.6395 2.70914 13.8474C2.9356 14.0553 3.23254 14.1694 3.53994 14.1668L8.57328 14.1068C8.8791 14.1038 9.17223 13.9842 9.39278 13.7723C9.61334 13.5604 9.74467 13.2723 9.75994 12.9668L10.1533 6.08685C10.1635 5.95423 10.2249 5.83076 10.3243 5.74246C10.4238 5.65417 10.5537 5.60794 10.6866 5.61352C10.8181 5.6221 10.9409 5.68224 11.0283 5.78086C11.1157 5.87948 11.1606 6.00862 11.1533 6.14018L10.7599 13.0268C10.7264 13.5836 10.4839 14.1072 10.081 14.4928C9.67801 14.8785 9.1443 15.0978 8.58661 15.1068L3.55328 15.1668H3.51994ZM7.98661 8.56685C7.98488 8.43478 7.93165 8.3086 7.83825 8.2152C7.74486 8.12181 7.61868 8.06858 7.48661 8.06685H4.51328C4.38067 8.06685 4.25349 8.11953 4.15972 8.21329C4.06596 8.30706 4.01328 8.43424 4.01328 8.56685C4.01328 8.69946 4.06596 8.82663 4.15972 8.9204C4.25349 9.01417 4.38067 9.06685 4.51328 9.06685H7.48661C7.55338 9.06863 7.61984 9.05701 7.68205 9.03268C7.74426 9.00836 7.80096 8.97181 7.84881 8.9252C7.89667 8.87859 7.93469 8.82287 7.96065 8.76132C7.98661 8.69977 7.99997 8.63365 7.99994 8.56685H7.98661ZM7.46661 11.0335C7.46661 10.9009 7.41393 10.7737 7.32016 10.68C7.2264 10.5862 7.09922 10.5335 6.96661 10.5335H5.03328C4.90067 10.5335 4.77349 10.5862 4.67972 10.68C4.58596 10.7737 4.53328 10.9009 4.53328 11.0335C4.53328 11.1661 4.58596 11.2933 4.67972 11.3871C4.77349 11.4808 4.90067 11.5335 5.03328 11.5335H6.96661C7.09868 11.5318 7.22486 11.4786 7.31825 11.3852C7.41165 11.2918 7.46488 11.1656 7.46661 11.0335ZM11.9999 4.34685C11.9837 4.46582 11.9247 4.5748 11.8338 4.65334C11.743 4.73189 11.6267 4.77462 11.5066 4.77352H11.4333C7.83463 4.27895 4.18525 4.27895 0.586611 4.77352C0.52046 4.78494 0.452697 4.78311 0.387261 4.76812C0.321825 4.75314 0.260019 4.7253 0.205434 4.68622C0.15085 4.64714 0.104575 4.5976 0.0692985 4.54049C0.0340221 4.48338 0.0104474 4.41982 -5.58854e-05 4.35352C-0.0212122 4.22268 0.0104398 4.08881 0.0879442 3.9813C0.165449 3.87379 0.282465 3.80146 0.413277 3.78018C0.499944 3.78018 1.41994 3.62018 2.86661 3.50685L3.10661 2.25352C3.18278 1.85342 3.39637 1.49252 3.71044 1.23323C4.02452 0.973936 4.41933 0.832548 4.82661 0.833516H7.17994C7.59027 0.831559 7.98819 0.974125 8.30391 1.23621C8.61963 1.4983 8.83301 1.86317 8.90661 2.26685L9.13328 3.50685C9.92661 3.57352 10.7399 3.65352 11.5733 3.78018C11.6386 3.78918 11.7015 3.811 11.7583 3.84439C11.8152 3.87778 11.8648 3.92209 11.9045 3.97476C11.9441 4.02742 11.973 4.08741 11.9894 4.15127C12.0058 4.21513 12.0093 4.2816 11.9999 4.34685ZM5.70661 3.39352H8.09328L7.91994 2.44685C7.88875 2.27498 7.79829 2.11949 7.66431 2.00743C7.53032 1.89537 7.36128 1.83383 7.18661 1.83352H4.83328C4.65875 1.83327 4.48955 1.89362 4.35458 2.00427C4.21962 2.11492 4.12726 2.269 4.09328 2.44018L3.91328 3.39352H5.70661Z",fill:"#F1416C"})}),trash2:m.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{d:"M10 2.25C9.58579 2.25 9.25 2.58579 9.25 3V3.75H5C4.58579 3.75 4.25 4.08579 4.25 4.5C4.25 4.91421 4.58579 5.25 5 5.25H19C19.4142 5.25 19.75 4.91421 19.75 4.5C19.75 4.08579 19.4142 3.75 19 3.75H14.75V3C14.75 2.58579 14.4142 2.25 14 2.25H10Z",fill:"#F1416C"}),m.jsx("path",{d:"M10 10.65C10.4142 10.65 10.75 10.9858 10.75 11.4L10.75 18.4C10.75 18.8142 10.4142 19.15 10 19.15C9.58579 19.15 9.25 18.8142 9.25 18.4L9.25 11.4C9.25 10.9858 9.58579 10.65 10 10.65Z",fill:"#F1416C"}),m.jsx("path",{d:"M14.75 11.4C14.75 10.9858 14.4142 10.65 14 10.65C13.5858 10.65 13.25 10.9858 13.25 11.4V18.4C13.25 18.8142 13.5858 19.15 14 19.15C14.4142 19.15 14.75 18.8142 14.75 18.4V11.4Z",fill:"#F1416C"}),m.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.99142 7.91718C6.03363 7.53735 6.35468 7.25 6.73684 7.25H17.2632C17.6453 7.25 17.9664 7.53735 18.0086 7.91718L18.2087 9.71852C18.5715 12.9838 18.5715 16.2793 18.2087 19.5446L18.189 19.722C18.045 21.0181 17.0404 22.0517 15.7489 22.2325C13.2618 22.5807 10.7382 22.5807 8.25108 22.2325C6.95954 22.0517 5.955 21.0181 5.81098 19.722L5.79128 19.5446C5.42846 16.2793 5.42846 12.9838 5.79128 9.71852L5.99142 7.91718ZM7.40812 8.75L7.2821 9.88417C6.93152 13.0394 6.93152 16.2238 7.2821 19.379L7.3018 19.5563C7.37011 20.171 7.84652 20.6612 8.45905 20.747C10.8082 21.0758 13.1918 21.0758 15.5409 20.747C16.1535 20.6612 16.6299 20.171 16.6982 19.5563L16.7179 19.379C17.0685 16.2238 17.0685 13.0394 16.7179 9.88417L16.5919 8.75H7.40812Z",fill:"#F1416C"})]}),trash_outline:m.jsx("svg",{width:"12",height:"16",viewBox:"0 0 12 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M3.51994 15.1668C2.96424 15.1616 2.43084 14.9475 2.02573 14.5671C1.62061 14.1867 1.37343 13.6678 1.33328 13.1135L0.846611 6.15352C0.842233 6.08785 0.850832 6.02197 0.871915 5.95964C0.892998 5.8973 0.926153 5.83972 0.969487 5.7902C1.01282 5.74067 1.06549 5.70017 1.12447 5.671C1.18346 5.64183 1.24762 5.62456 1.31328 5.62018C1.37894 5.61581 1.44482 5.6244 1.50716 5.64549C1.56949 5.66657 1.62707 5.69973 1.67659 5.74306C1.72612 5.78639 1.76662 5.83906 1.79579 5.89804C1.82497 5.95703 1.84223 6.02119 1.84661 6.08685L2.31994 13.0468C2.34358 13.3534 2.48268 13.6395 2.70914 13.8474C2.9356 14.0553 3.23254 14.1694 3.53994 14.1668L8.57328 14.1068C8.8791 14.1038 9.17223 13.9842 9.39278 13.7723C9.61334 13.5604 9.74467 13.2723 9.75994 12.9668L10.1533 6.08685C10.1635 5.95423 10.2249 5.83076 10.3243 5.74246C10.4238 5.65417 10.5537 5.60794 10.6866 5.61352C10.8181 5.6221 10.9409 5.68224 11.0283 5.78086C11.1157 5.87948 11.1606 6.00862 11.1533 6.14018L10.7599 13.0268C10.7264 13.5836 10.4839 14.1072 10.081 14.4928C9.67801 14.8785 9.1443 15.0978 8.58661 15.1068L3.55328 15.1668H3.51994ZM7.98661 8.56685C7.98488 8.43478 7.93165 8.3086 7.83825 8.2152C7.74486 8.12181 7.61868 8.06858 7.48661 8.06685H4.51328C4.38067 8.06685 4.25349 8.11953 4.15972 8.21329C4.06596 8.30706 4.01328 8.43424 4.01328 8.56685C4.01328 8.69946 4.06596 8.82663 4.15972 8.9204C4.25349 9.01417 4.38067 9.06685 4.51328 9.06685H7.48661C7.55338 9.06863 7.61984 9.05701 7.68205 9.03268C7.74426 9.00836 7.80096 8.97181 7.84881 8.9252C7.89667 8.87859 7.93469 8.82287 7.96065 8.76132C7.98661 8.69977 7.99997 8.63365 7.99994 8.56685H7.98661ZM7.46661 11.0335C7.46661 10.9009 7.41393 10.7737 7.32016 10.68C7.2264 10.5862 7.09922 10.5335 6.96661 10.5335H5.03328C4.90067 10.5335 4.77349 10.5862 4.67972 10.68C4.58596 10.7737 4.53328 10.9009 4.53328 11.0335C4.53328 11.1661 4.58596 11.2933 4.67972 11.3871C4.77349 11.4808 4.90067 11.5335 5.03328 11.5335H6.96661C7.09868 11.5318 7.22486 11.4786 7.31825 11.3852C7.41165 11.2918 7.46488 11.1656 7.46661 11.0335ZM11.9999 4.34685C11.9837 4.46582 11.9247 4.5748 11.8338 4.65334C11.743 4.73189 11.6267 4.77462 11.5066 4.77352H11.4333C7.83463 4.27895 4.18525 4.27895 0.586611 4.77352C0.52046 4.78494 0.452697 4.78311 0.387261 4.76812C0.321825 4.75314 0.260019 4.7253 0.205434 4.68622C0.15085 4.64714 0.104575 4.5976 0.0692985 4.54049C0.0340221 4.48338 0.0104474 4.41982 -5.58854e-05 4.35352C-0.0212122 4.22268 0.0104398 4.08881 0.0879442 3.9813C0.165449 3.87379 0.282465 3.80146 0.413277 3.78018C0.499944 3.78018 1.41994 3.62018 2.86661 3.50685L3.10661 2.25352C3.18278 1.85342 3.39637 1.49252 3.71044 1.23323C4.02452 0.973936 4.41933 0.832548 4.82661 0.833516H7.17994C7.59027 0.831559 7.98819 0.974125 8.30391 1.23621C8.61963 1.4983 8.83301 1.86317 8.90661 2.26685L9.13328 3.50685C9.92661 3.57352 10.7399 3.65352 11.5733 3.78018C11.6386 3.78918 11.7015 3.811 11.7583 3.84439C11.8152 3.87778 11.8648 3.92209 11.9045 3.97476C11.9441 4.02742 11.973 4.08741 11.9894 4.15127C12.0058 4.21513 12.0093 4.2816 11.9999 4.34685ZM5.70661 3.39352H8.09328L7.91994 2.44685C7.88875 2.27498 7.79829 2.11949 7.66431 2.00743C7.53032 1.89537 7.36128 1.83383 7.18661 1.83352H4.83328C4.65875 1.83327 4.48955 1.89362 4.35458 2.00427C4.21962 2.11492 4.12726 2.269 4.09328 2.44018L3.91328 3.39352H5.70661Z",fill:"inherit"})}),plus_squared:m.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{opacity:"0.3",d:"M9.16667 10.8333H5.83333C5.61232 10.8333 5.40036 10.7455 5.24408 10.5893C5.0878 10.433 5 10.221 5 10C5 9.77899 5.0878 9.56703 5.24408 9.41075C5.40036 9.25447 5.61232 9.16667 5.83333 9.16667H9.16667V10.8333ZM14.1667 9.16667H10.8333V10.8333H14.1667C14.3877 10.8333 14.5996 10.7455 14.7559 10.5893C14.9122 10.433 15 10.221 15 10C15 9.77899 14.9122 9.56703 14.7559 9.41075C14.5996 9.25447 14.3877 9.16667 14.1667 9.16667Z",fill:"white"}),m.jsx("path",{opacity:"0.3",d:"M13.4915 1.66667H6.50817C3.83419 1.66667 1.6665 3.83436 1.6665 6.50834V13.4917C1.6665 16.1657 3.83419 18.3333 6.50817 18.3333H13.4915C16.1655 18.3333 18.3332 16.1657 18.3332 13.4917V6.50834C18.3332 3.83436 16.1655 1.66667 13.4915 1.66667Z",fill:"white"}),m.jsx("path",{d:"M14.1667 9.16667H10.8333V5.83333C10.8333 5.61232 10.7455 5.40036 10.5893 5.24408C10.433 5.0878 10.221 5 10 5C9.77899 5 9.56702 5.0878 9.41074 5.24408C9.25446 5.40036 9.16667 5.61232 9.16667 5.83333V9.16667H5.83333C5.61232 9.16667 5.40036 9.25446 5.24408 9.41074C5.0878 9.56702 5 9.77899 5 10C5 10.221 5.0878 10.433 5.24408 10.5893C5.40036 10.7455 5.61232 10.8333 5.83333 10.8333H9.16667V14.1667C9.16667 14.3877 9.25446 14.5996 9.41074 14.7559C9.56702 14.9122 9.77899 15 10 15C10.221 15 10.433 14.9122 10.5893 14.7559C10.7455 14.5996 10.8333 14.3877 10.8333 14.1667V10.8333H14.1667C14.3877 10.8333 14.5996 10.7455 14.7559 10.5893C14.9122 10.433 15 10.221 15 10C15 9.77899 14.9122 9.56702 14.7559 9.41074C14.5996 9.25446 14.3877 9.16667 14.1667 9.16667Z",fill:"white"})]}),plus_squared2:m.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{opacity:"0.3",d:"M9.16667 10.8332H5.83333C5.61232 10.8332 5.40036 10.7454 5.24408 10.5891C5.0878 10.4328 5 10.2209 5 9.99984C5 9.77882 5.0878 9.56686 5.24408 9.41058C5.40036 9.2543 5.61232 9.1665 5.83333 9.1665H9.16667V10.8332ZM14.1667 9.1665H10.8333V10.8332H14.1667C14.3877 10.8332 14.5996 10.7454 14.7559 10.5891C14.9122 10.4328 15 10.2209 15 9.99984C15 9.77882 14.9122 9.56686 14.7559 9.41058C14.5996 9.2543 14.3877 9.1665 14.1667 9.1665Z",fill:"#1868DB"}),m.jsx("path",{opacity:"0.3",d:"M13.4917 1.6665H6.50832C3.83434 1.6665 1.66666 3.83419 1.66666 6.50817V13.4915C1.66666 16.1655 3.83434 18.3332 6.50832 18.3332H13.4917C16.1656 18.3332 18.3333 16.1655 18.3333 13.4915V6.50817C18.3333 3.83419 16.1656 1.6665 13.4917 1.6665Z",fill:"#1868DB"}),m.jsx("path",{d:"M14.1667 9.16667H10.8333V5.83333C10.8333 5.61232 10.7455 5.40036 10.5893 5.24408C10.433 5.0878 10.221 5 10 5C9.77899 5 9.56702 5.0878 9.41074 5.24408C9.25446 5.40036 9.16667 5.61232 9.16667 5.83333V9.16667H5.83333C5.61232 9.16667 5.40036 9.25446 5.24408 9.41074C5.0878 9.56702 5 9.77899 5 10C5 10.221 5.0878 10.433 5.24408 10.5893C5.40036 10.7455 5.61232 10.8333 5.83333 10.8333H9.16667V14.1667C9.16667 14.3877 9.25446 14.5996 9.41074 14.7559C9.56702 14.9122 9.77899 15 10 15C10.221 15 10.433 14.9122 10.5893 14.7559C10.7455 14.5996 10.8333 14.3877 10.8333 14.1667V10.8333H14.1667C14.3877 10.8333 14.5996 10.7455 14.7559 10.5893C14.9122 10.433 15 10.221 15 10C15 9.77899 14.9122 9.56702 14.7559 9.41074C14.5996 9.25446 14.3877 9.16667 14.1667 9.16667Z",fill:"#1868DB"})]}),plus_circle:m.jsx("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M9.00008 0.666992C7.35191 0.666992 5.74074 1.15573 4.37033 2.07141C2.99992 2.98709 1.93182 4.28858 1.30109 5.8113C0.670359 7.33401 0.505331 9.00957 0.826874 10.6261C1.14842 12.2426 1.94209 13.7274 3.10753 14.8929C4.27297 16.0583 5.75782 16.852 7.37433 17.1735C8.99084 17.4951 10.6664 17.3301 12.1891 16.6993C13.7118 16.0686 15.0133 15.0005 15.929 13.6301C16.8447 12.2597 17.3334 10.6485 17.3334 9.00033C17.3334 7.90598 17.1179 6.82234 16.6991 5.8113C16.2803 4.80025 15.6665 3.88159 14.8926 3.10777C14.1188 2.33395 13.2002 1.72012 12.1891 1.30133C11.1781 0.88254 10.0944 0.666992 9.00008 0.666992ZM13.1668 9.83366H9.83342V13.167C9.83342 13.388 9.74562 13.6 9.58934 13.7562C9.43306 13.9125 9.2211 14.0003 9.00008 14.0003C8.77907 14.0003 8.56711 13.9125 8.41083 13.7562C8.25455 13.6 8.16675 13.388 8.16675 13.167V9.83366H4.83342C4.6124 9.83366 4.40044 9.74586 4.24416 9.58958C4.08788 9.4333 4.00008 9.22134 4.00008 9.00033C4.00008 8.77931 4.08788 8.56735 4.24416 8.41107C4.40044 8.25479 4.6124 8.16699 4.83342 8.16699H8.16675V4.83366C8.16675 4.61265 8.25455 4.40068 8.41083 4.2444C8.56711 4.08812 8.77907 4.00033 9.00008 4.00033C9.2211 4.00033 9.43306 4.08812 9.58934 4.2444C9.74562 4.40068 9.83342 4.61265 9.83342 4.83366V8.16699H13.1668C13.3878 8.16699 13.5997 8.25479 13.756 8.41107C13.9123 8.56735 14.0001 8.77931 14.0001 9.00033C14.0001 9.22134 13.9123 9.4333 13.756 9.58958C13.5997 9.74586 13.3878 9.83366 13.1668 9.83366Z",fill:"black"})}),close:m.jsx("svg",{width:"27",height:"27",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M15.0862 13.5L19.125 9.49499C19.3398 9.27718 19.4593 8.98295 19.4572 8.67703C19.4551 8.37112 19.3315 8.07856 19.1137 7.86374C18.8959 7.64891 18.6017 7.52941 18.2958 7.53152C17.9898 7.53363 17.6973 7.65718 17.4825 7.87499L13.5 11.9137L9.51747 7.95374C9.30669 7.74421 9.02155 7.6266 8.72435 7.6266C8.42714 7.6266 8.142 7.74421 7.93122 7.95374C7.82578 8.05832 7.74208 8.18275 7.68497 8.31984C7.62785 8.45693 7.59845 8.60398 7.59845 8.75249C7.59845 8.901 7.62785 9.04805 7.68497 9.18514C7.74208 9.32223 7.82578 9.44666 7.93122 9.55124L11.9137 13.5L7.87497 17.505C7.66014 17.7228 7.54064 18.017 7.54275 18.3229C7.54486 18.6289 7.66841 18.9214 7.88622 19.1362C8.10403 19.3511 8.39826 19.4706 8.70417 19.4685C9.01009 19.4663 9.30264 19.3428 9.51747 19.125L13.5 15.0862L17.4825 19.0462C17.6933 19.2558 17.9784 19.3734 18.2756 19.3734C18.5728 19.3734 18.8579 19.2558 19.0687 19.0462C19.1742 18.9417 19.2579 18.8172 19.315 18.6801C19.3721 18.543 19.4015 18.396 19.4015 18.2475C19.4015 18.099 19.3721 17.9519 19.315 17.8148C19.2579 17.6777 19.1742 17.5533 19.0687 17.4487L15.0862 13.5Z",fill:"#1868DB"})}),close2:m.jsx("svg",{width:"27",height:"27",viewBox:"0 0 27 27",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M15.0862 13.5L19.125 9.49499C19.3398 9.27718 19.4593 8.98295 19.4572 8.67703C19.4551 8.37112 19.3315 8.07856 19.1137 7.86374C18.8959 7.64891 18.6017 7.52941 18.2958 7.53152C17.9898 7.53363 17.6973 7.65718 17.4825 7.87499L13.5 11.9137L9.51747 7.95374C9.30669 7.74421 9.02155 7.6266 8.72435 7.6266C8.42714 7.6266 8.142 7.74421 7.93122 7.95374C7.82578 8.05832 7.74208 8.18275 7.68497 8.31984C7.62785 8.45693 7.59845 8.60398 7.59845 8.75249C7.59845 8.901 7.62785 9.04805 7.68497 9.18514C7.74208 9.32223 7.82578 9.44666 7.93122 9.55124L11.9137 13.5L7.87497 17.505C7.66014 17.7228 7.54064 18.017 7.54275 18.3229C7.54486 18.6289 7.66841 18.9214 7.88622 19.1362C8.10403 19.3511 8.39826 19.4706 8.70417 19.4685C9.01009 19.4663 9.30264 19.3428 9.51747 19.125L13.5 15.0862L17.4825 19.0462C17.6933 19.2558 17.9784 19.3734 18.2756 19.3734C18.5728 19.3734 18.8579 19.2558 19.0687 19.0462C19.1742 18.9417 19.2579 18.8172 19.315 18.6801C19.3721 18.543 19.4015 18.396 19.4015 18.2475C19.4015 18.099 19.3721 17.9519 19.315 17.8148C19.2579 17.6777 19.1742 17.5533 19.0687 17.4487L15.0862 13.5Z",fill:"inherit"})}),close_custom:m.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{d:"M17.0001 16.9298C16.8127 17.1161 16.5593 17.2206 16.2951 17.2206C16.0309 17.2206 15.7774 17.1161 15.5901 16.9298L7.05007 8.48985C6.95634 8.39688 6.88195 8.28628 6.83118 8.16442C6.78041 8.04256 6.75427 7.91186 6.75427 7.77985C6.75427 7.64783 6.78041 7.51713 6.83118 7.39527C6.88195 7.27341 6.95634 7.16281 7.05007 7.06985C7.23743 6.88359 7.49088 6.77905 7.75507 6.77905C8.01926 6.77905 8.27271 6.88359 8.46007 7.06985L17.0001 15.5098C17.0938 15.6028 17.1682 15.7134 17.219 15.8353C17.2697 15.9571 17.2959 16.0878 17.2959 16.2198C17.2959 16.3519 17.2697 16.4826 17.219 16.6044C17.1682 16.7263 17.0938 16.8369 17.0001 16.9298Z",fill:"#202125"}),m.jsx("path",{opacity:"0.3",d:"M8.46004 16.9999C8.26909 17.1935 8.00904 17.3033 7.73711 17.3052C7.46518 17.3071 7.20365 17.2009 7.01004 17.0099C6.81643 16.819 6.70661 16.5589 6.70474 16.287C6.70286 16.0151 6.80909 15.7535 7.00004 15.5599L15.54 6.99991C15.731 6.8063 15.991 6.69648 16.263 6.6946C16.5349 6.69273 16.7964 6.79895 16.99 6.98991C17.1836 7.18087 17.2935 7.44091 17.2953 7.71284C17.2972 7.98477 17.191 8.2463 17 8.43991L8.46004 16.9999Z",fill:"#202125"})]}),expand:m.jsx("svg",{width:"34",height:"34",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M14.1667 29.75V26.9167H9.08083L15.4558 20.5417L13.4583 18.5442L7.08333 24.9192V19.8333H4.25V29.75H14.1667ZM20.5417 15.4558L26.9167 9.08083V14.1667H29.75V4.25H19.8333V7.08333H24.9192L18.5442 13.4583L20.5417 15.4558Z",fill:"#5E6278"})}),error:m.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M12 21C7.0293 21 3 16.9707 3 12C3 7.0293 7.0293 3 12 3C16.9707 3 21 7.0293 21 12C21 16.9707 16.9707 21 12 21ZM11.1 14.7V16.5H12.9V14.7H11.1ZM11.1 7.5V12.9H12.9V7.5H11.1Z",fill:"inherit"})}),printer_blue:m.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[m.jsx("path",{opacity:"0.3",d:"M12.1333 4.66602H3.86667C2.83574 4.66602 2 5.50175 2 6.53268V10.1327C2 11.1636 2.83574 11.9993 3.86667 11.9993H12.1333C13.1643 11.9993 14 11.1636 14 10.1327V6.53268C14 5.50175 13.1643 4.66602 12.1333 4.66602Z",fill:"#1868DB"}),m.jsx("path",{d:"M6.83366 1.33301H9.17366C9.74714 1.33477 10.2965 1.56382 10.7014 1.96996C11.1063 2.3761 11.3337 2.92619 11.3337 3.49967V4.66634H4.66699V3.49967C4.66699 2.92504 4.89527 2.37394 5.30159 1.96761C5.70792 1.56128 6.25902 1.33301 6.83366 1.33301Z",fill:"#1868DB"}),m.jsx("path",{d:"M5.33301 10H10.6663V12.6133C10.6663 13.1579 10.45 13.6802 10.0649 14.0653C9.67986 14.4503 9.15759 14.6667 8.61301 14.6667H7.38634C6.84176 14.6667 6.31949 14.4503 5.93442 14.0653C5.54934 13.6802 5.33301 13.1579 5.33301 12.6133V10Z",fill:"#1868DB"}),m.jsx("path",{d:"M6.66699 7.83301H4.66699C4.53438 7.83301 4.40721 7.78033 4.31344 7.68656C4.21967 7.59279 4.16699 7.46562 4.16699 7.33301C4.16699 7.2004 4.21967 7.07322 4.31344 6.97945C4.40721 6.88569 4.53438 6.83301 4.66699 6.83301H6.66699C6.7996 6.83301 6.92678 6.88569 7.02055 6.97945C7.11431 7.07322 7.16699 7.2004 7.16699 7.33301C7.16699 7.46562 7.11431 7.59279 7.02055 7.68656C6.92678 7.78033 6.7996 7.83301 6.66699 7.83301Z",fill:"black"}),m.jsx("path",{d:"M11.3337 10.5H4.66699C4.53438 10.5 4.40721 10.4473 4.31344 10.3536C4.21967 10.2598 4.16699 10.1326 4.16699 10C4.16699 9.86739 4.21967 9.74022 4.31344 9.64645C4.40721 9.55268 4.53438 9.5 4.66699 9.5H11.3337C11.4663 9.5 11.5934 9.55268 11.6872 9.64645C11.781 9.74022 11.8337 9.86739 11.8337 10C11.8337 10.1326 11.781 10.2598 11.6872 10.3536C11.5934 10.4473 11.4663 10.5 11.3337 10.5Z",fill:"black"})]})};function ev({showBulkActions:e=!0,meta:t}){const n=J(),{currentPage:r,perview:o}=ne(e=>e.app);return D.useEffect(()=>{t&&r>t?.last_page&&n(wt(1))},[t?.per_page]),m.jsxs("div",{className:Ko("flex items-center justify-between gap-4 flex-wrap",t&&t?.total>0?null:"hidden"),children:[e?m.jsxs("div",{className:"flex items-center gap-2.5 shrink-0",children:[m.jsxs(Fd,{children:[m.jsx(Ld,{asChild:!0,children:m.jsxs("button",{className:"rounded-md h-9 flex items-center justify-between p-3 font-semibold text-xs text-gray-600 outline-none border border-gray-300 gap-2.5 ",children:[o,m.jsx("span",{className:"rotate-90",children:Jy.arrow})]})}),m.jsx(zd,{align:"center",className:"flex flex-col gap-2.5 rounded-xl border-gray-200 py-2.5",children:[7,10,20].map((e,t)=>m.jsx($d,{className:`capitalize focus:bg-primary_light rounded-md focus:text-primary font-semibold text-sm cursor-pointer px-[15px] flex items-center gap-[5px] ${o===e?"bg-primary_light text-primary":"text-gray-700"} `,onClick:()=>n(xt(e)),children:e},t))})]}),m.jsxs("p",{className:"font-normal text-gray-600 text-[15px]",children:["Showing ",t?.from," - ",t?.to," of ",t?.total]})]}):null,m.jsx(Zy,{count:t?.last_page||1,page:t?.current_page??1,shape:"rounded",color:"primary",onChange:(e,t)=>{n(wt(t))}})]})}function tv({props:e={}}){return m.jsxs("div",{className:"flex flex-col gap-3 items-center py-24",children:[m.jsx("p",{className:"font-bold text-sm",children:e.header??"No item attached"}),m.jsx("p",{className:"font-bold text-[13px] text-gray-700",children:e.subText??"Add a new item to start managing your orders."})]})}function nv({columns:e,data:t,tbhRowClass:n,tHeadClass:r,tbCellClass:o,meta:a,showBulkActions:i,showPaginate:s=!0,emptyData:l,emptyProps:u,loading:c,accordionData:d,hasAccordion:f,bodyRowClass:p,tableContainerClass:h,firstCellClass:g,lastCellClass:y,showAccordionDropdown:v=!0,onToggleAccordion:b}){const[w,x]=D.useState(null),S=function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=D.useState(()=>({current:Rr(t)})),[r,o]=D.useState(()=>n.current.initialState);return n.current.setOptions(t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{o(t),null==e.onStateChange||e.onStateChange(t)}})),n.current}({data:t,columns:e,getCoreRowModel:e=>Ln(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(t,o,a){void 0===o&&(o=0);const i=[];for(let l=0;l<t.length;l++){const u=Un(e,e._getRowId(t[l],l,a),t[l],l,o,0,null==a?void 0:a.id);var s;n.flatRows.push(u),n.rowsById[u.id]=u,i.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[l],l),null!=(s=u.originalSubRows)&&s.length&&(u.subRows=r(u.originalSubRows,o+1,u)))}return i};return n.rows=r(t),n},zn(e.options,"debugTable",0,()=>e._autoResetPageIndex()))});return m.jsxs("div",{className:"flex flex-col gap-[30px]",children:[m.jsx("div",{className:`shadow-[0_3px_4px_0_#00000008] ${h}`,children:m.jsxs(Qo,{children:[m.jsx(Xo,{children:S.getHeaderGroups().map(e=>m.jsx(Jo,{className:Ko("border-gray-300 bg-gray-100 hover:!bg-gray-100 rounded-xl",n),children:e.headers.map(e=>m.jsx(ea,{className:Ko("text-dark text-sm capitalize font-bold",r),children:e.isPlaceholder?null:Pr(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),m.jsx(Zo,{children:c?Array(5).fill(null).map((e,t)=>m.jsx(M.Fragment,{children:S.getHeaderGroups().map(e=>m.jsx(Jo,{className:Ko("border-gray-300 hover:!bg-gray-100 rounded-xl"),children:e.headers.map(e=>m.jsx(ta,{children:m.jsx(na,{className:"w-full h-6 rounded-lg"})},e.id))},e.id))},t)):S?.getRowModel().rows?.length?S?.getRowModel().rows.map((e,t)=>m.jsx(M.Fragment,{children:m.jsx(Jo,{onClick:()=>((e,t)=>{x(t=>t===e?null:e),b?.(e,t)})(t,e.original),"data-state":e.getIsSelected()&&"selected",className:`border-gray-300 hover:!bg-gray-100 data-[state=selected]:bg-gray-100 ${p} `,children:e.getVisibleCells().map((n,r)=>m.jsx(ta,{className:Ko("text-gray-500 text-sm font-bold",o,0===r&&g,r===e.getVisibleCells().length-1&&y),children:m.jsxs("div",{className:"flex",children:[f&&v&&0===r&&m.jsx("div",{className:"cursor-pointer inline",children:m.jsx("div",{className:"transform transition-transform duration-200 "+(w===t?"-rotate-90":"rotate-90"),children:Jy.arrow})})," ",m.jsx("div",{children:Pr(n.column.columnDef.cell,n.getContext())})]})},n.id))},e.id)},e.id)):m.jsx(Jo,{children:m.jsx(ta,{colSpan:e.length,className:"h-24 text-center hover:bg-gray-100",children:l?m.jsx(tv,{props:u}):"No results found."})})})]})}),s&&m.jsx(ev,{showBulkActions:i,meta:a})]})}function rv(e,t="NGN",n="en-NG"){isNaN(e)&&(e=0);return new Intl.NumberFormat(n,{style:"currency",currency:t,minimumFractionDigits:2,maximumFractionDigits:6}).format(e)}function ov(e=0){if(null==e)return"0";if(isNaN(e))return"0";{const[t,n]=e.toString().split("."),r=t.replace(/\B(?=(\d{3})+(?!\d))/g,",");return n?`${r}.${n}`:r}}var av,iv="HoverCard",[sv]=sa(iv,[Bs]),lv=Bs(),[uv,cv]=sv(iv),dv=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:a,openDelay:i=700,closeDelay:s=300}=e,l=lv(t),u=D.useRef(0),c=D.useRef(0),d=D.useRef(!1),f=D.useRef(!1),[p,h]=da({prop:r,defaultProp:o??!1,onChange:a,caller:iv}),g=D.useCallback(()=>{clearTimeout(c.current),u.current=window.setTimeout(()=>h(!0),i)},[i,h]),y=D.useCallback(()=>{clearTimeout(u.current),d.current||f.current||(c.current=window.setTimeout(()=>h(!1),s))},[s,h]),v=D.useCallback(()=>h(!1),[h]);return D.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(c.current)},[]),m.jsx(uv,{scope:t,open:p,onOpenChange:h,onOpen:g,onClose:y,onDismiss:v,hasSelectionRef:d,isPointerDownOnContentRef:f,children:m.jsx(al,{...l,children:n})})};dv.displayName=iv;var fv="HoverCardTrigger",pv=D.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=cv(fv,n),a=lv(n);return m.jsx(il,{asChild:!0,...a,children:m.jsx(ba.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:ra(e.onPointerEnter,bv(o.onOpen)),onPointerLeave:ra(e.onPointerLeave,bv(o.onClose)),onFocus:ra(e.onFocus,o.onOpen),onBlur:ra(e.onBlur,o.onClose),onTouchStart:ra(e.onTouchStart,e=>e.preventDefault())})})});pv.displayName=fv;var[hv,mv]=sv("HoverCardPortal",{forceMount:void 0}),gv="HoverCardContent",yv=D.forwardRef((e,t)=>{const n=mv(gv,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,a=cv(gv,e.__scopeHoverCard);return m.jsx(cl,{present:r||a.open,children:m.jsx(vv,{"data-state":a.open?"open":"closed",...o,onPointerEnter:ra(e.onPointerEnter,bv(a.onOpen)),onPointerLeave:ra(e.onPointerLeave,bv(a.onClose)),ref:t})})});yv.displayName=gv;var vv=D.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,...s}=e,l=cv(gv,n),u=lv(n),c=D.useRef(null),d=ia(t,c),[f,p]=D.useState(!1);return D.useEffect(()=>{if(f){const e=document.body;return av=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=av,e.style.webkitUserSelect=av}}},[f]),D.useEffect(()=>{if(c.current){const e=()=>{p(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{""!==document.getSelection()?.toString()&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),D.useEffect(()=>{if(c.current){const e=function(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}(c.current);e.forEach(e=>e.setAttribute("tabindex","-1"))}}),m.jsx(Ra,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:ra(a,e=>{e.preventDefault()}),onDismiss:l.onDismiss,children:m.jsx(sl,{...u,...s,onPointerDown:ra(s.onPointerDown,e=>{e.currentTarget.contains(e.target)&&p(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:d,style:{...s.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})});function bv(e){return t=>"touch"===t.pointerType?void 0:e()}D.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=lv(n);return m.jsx(ll,{...o,...r,ref:t})}).displayName="HoverCardArrow";var wv=yv;const xv=dv,Sv=pv,Cv=D.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>m.jsx(wv,{ref:o,align:t,sideOffset:n,className:Ko("z-50 w-64 rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",e),...r}));function kv({children:e,trigger:t,fieldName:n,align:r="start"}){return m.jsxs(xv,{children:[m.jsx(Sv,{className:"cursor-pointer",children:t??Jy.info_input}),m.jsxs(Cv,{align:r,className:"bg-[#0A0D14] text-[#CDD0D5] text-xs font-normal border-none",children:[n?m.jsx("p",{className:"text-sm font-medium text-white first-letter:uppercase",children:n}):null,e]})]})}function _v({status:e}){return m.jsx("span",{className:Ko("font-semibold text-xs rounded p-[7px] capitalize text-center min-w-[70px] bg-gray-300 text-gray-700",["active","approved","published","received","returned","completed","reconciled","credit"].includes(e)?"text-success bg-success-light":null,["inactive","pending","expired","expiring","rejected","voided","cancelled","debit","out of stock"].includes(e)?"text-danger bg-danger_light":null,["pending","paylater","suspended","awaiting_approval"].includes(e)?"text-warning bg-warning-light":null,["draft","in_transit"].includes(e)?"text-black bg-[#E1E3EA]":null,["ongoing"].includes(e)?"text-[#7239EA] bg-[#f5edff]":null),children:e?.replace("_"," ")})}Cv.displayName=wv.displayName,Array(12).fill(0);let Ev=1;const jv=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;const{message:n,...r}=e,o="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:Ev++,a=this.toasts.find(e=>e.id===o),i=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(t=>t.id===o?(this.publish({...t,...e,id:o,title:n}),{...t,...e,id:o,dismissible:i,title:n}):t):this.addToast({title:n,...r,dismissible:i,id:o}),o},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;void 0!==t.loading&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));const r=Promise.resolve(e instanceof Function?e():e);let o,a=void 0!==n;const i=r.then(async e=>{o=["resolve",e];if(M.isValidElement(e))a=!1,this.create({id:n,type:"default",message:e});else if(Ov(e)&&!e.ok){a=!1;const r="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,o="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description,i="object"==typeof r&&!M.isValidElement(r)?r:{message:r};this.create({id:n,type:"error",description:o,...i})}else if(e instanceof Error){a=!1;const r="function"==typeof t.error?await t.error(e):t.error,o="function"==typeof t.description?await t.description(e):t.description,i="object"==typeof r&&!M.isValidElement(r)?r:{message:r};this.create({id:n,type:"error",description:o,...i})}else if(void 0!==t.success){a=!1;const r="function"==typeof t.success?await t.success(e):t.success,o="function"==typeof t.description?await t.description(e):t.description,i="object"==typeof r&&!M.isValidElement(r)?r:{message:r};this.create({id:n,type:"success",description:o,...i})}}).catch(async e=>{if(o=["reject",e],void 0!==t.error){a=!1;const r="function"==typeof t.error?await t.error(e):t.error,o="function"==typeof t.description?await t.description(e):t.description,i="object"==typeof r&&!M.isValidElement(r)?r:{message:r};this.create({id:n,type:"error",description:o,...i})}}).finally(()=>{a&&(this.dismiss(n),n=void 0),null==t.finally||t.finally.call(t)}),s=()=>new Promise((e,t)=>i.then(()=>"reject"===o[0]?t(o[1]):e(o[1])).catch(t));return"string"!=typeof n&&"number"!=typeof n?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{const n=(null==t?void 0:t.id)||Ev++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ov=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,Nv=(e,t)=>{const n=(null==t?void 0:t.id)||Ev++;return jv.addToast({title:e,...t,id:n}),n},Rv=Object.assign(Nv,{success:jv.success,info:jv.info,warning:jv.warning,error:jv.error,custom:jv.custom,message:jv.message,promise:jv.promise,dismiss:jv.dismiss,loading:jv.loading},{getHistory:()=>jv.toasts,getToasts:()=>jv.getActiveToasts()});function Pv(e,t){return function(){return e.apply(t,arguments)}}!function(e){if("undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");const{toString:Tv}=Object.prototype,{getPrototypeOf:Dv}=Object,{iterator:Mv,toStringTag:Iv}=Symbol,Av=(Fv=Object.create(null),e=>{const t=Tv.call(e);return Fv[t]||(Fv[t]=t.slice(8,-1).toLowerCase())});var Fv;const Lv=e=>(e=e.toLowerCase(),t=>Av(t)===e),zv=e=>t=>typeof t===e,{isArray:$v}=Array,Hv=zv("undefined");function Vv(e){return null!==e&&!Hv(e)&&null!==e.constructor&&!Hv(e.constructor)&&Wv(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Bv=Lv("ArrayBuffer");const Uv=zv("string"),Wv=zv("function"),qv=zv("number"),Yv=e=>null!==e&&"object"==typeof e,Gv=e=>{if("object"!==Av(e))return!1;const t=Dv(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Iv in e||Mv in e)},Kv=Lv("Date"),Qv=Lv("File"),Xv=Lv("Blob"),Zv=Lv("FileList"),Jv=Lv("URLSearchParams"),[eb,tb,nb,rb]=["ReadableStream","Request","Response","Headers"].map(Lv);function ob(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),$v(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Vv(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let i;for(r=0;r<a;r++)i=o[r],t.call(null,e[i],i,e)}}function ab(e,t){if(Vv(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const ib="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,sb=e=>!Hv(e)&&e!==ib;const lb=(ub="undefined"!=typeof Uint8Array&&Dv(Uint8Array),e=>ub&&e instanceof ub);var ub;const cb=Lv("HTMLFormElement"),db=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),fb=Lv("RegExp"),pb=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ob(n,(n,o)=>{let a;!1!==(a=t(n,o,e))&&(r[o]=a||n)}),Object.defineProperties(e,r)};const hb=Lv("AsyncFunction"),mb=(gb="function"==typeof setImmediate,yb=Wv(ib.postMessage),gb?setImmediate:yb?((e,t)=>(ib.addEventListener("message",({source:n,data:r})=>{n===ib&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),ib.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e));var gb,yb;const vb="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ib):"undefined"!=typeof process&&process.nextTick||mb;var bb={isArray:$v,isArrayBuffer:Bv,isBuffer:Vv,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Wv(e.append)&&("formdata"===(t=Av(e))||"object"===t&&Wv(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Bv(e.buffer),t},isString:Uv,isNumber:qv,isBoolean:e=>!0===e||!1===e,isObject:Yv,isPlainObject:Gv,isEmptyObject:e=>{if(!Yv(e)||Vv(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:eb,isRequest:tb,isResponse:nb,isHeaders:rb,isUndefined:Hv,isDate:Kv,isFile:Qv,isBlob:Xv,isRegExp:fb,isFunction:Wv,isStream:e=>Yv(e)&&Wv(e.pipe),isURLSearchParams:Jv,isTypedArray:lb,isFileList:Zv,forEach:ob,merge:function e(){const{caseless:t,skipUndefined:n}=sb(this)&&this||{},r={},o=(o,a)=>{const i=t&&ab(r,a)||a;Gv(r[i])&&Gv(o)?r[i]=e(r[i],o):Gv(o)?r[i]=e({},o):$v(o)?r[i]=o.slice():n&&Hv(o)||(r[i]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&ob(arguments[e],o);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(ob(t,(t,r)=>{n&&Wv(t)?e[r]=Pv(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,a,i;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)i=o[a],r&&!r(i,e,t)||s[i]||(t[i]=e[i],s[i]=!0);e=!1!==n&&Dv(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Av,kindOfTest:Lv,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if($v(e))return e;let t=e.length;if(!qv(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Mv]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:cb,hasOwnProperty:db,hasOwnProp:db,reduceDescriptors:pb,freezeMethods:e=>{pb(e,(t,n)=>{if(Wv(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];Wv(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return $v(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:ab,global:ib,isContextDefined:sb,isSpecCompliantForm:function(e){return!!(e&&Wv(e.append)&&"FormData"===e[Iv]&&e[Mv])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Yv(e)){if(t.indexOf(e)>=0)return;if(Vv(e))return e;if(!("toJSON"in e)){t[r]=e;const o=$v(e)?[]:{};return ob(e,(e,t)=>{const a=n(e,r+1);!Hv(a)&&(o[t]=a)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:hb,isThenable:e=>e&&(Yv(e)||Wv(e))&&Wv(e.then)&&Wv(e.catch),setImmediate:mb,asap:vb,isIterable:e=>null!=e&&Wv(e[Mv])};function wb(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}bb.inherits(wb,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:bb.toJSONObject(this.config),code:this.code,status:this.status}}});const xb=wb.prototype,Sb={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Sb[e]={value:e}}),Object.defineProperties(wb,Sb),Object.defineProperty(xb,"isAxiosError",{value:!0}),wb.from=(e,t,n,r,o,a)=>{const i=Object.create(xb);bb.toFlatObject(e,i,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const s=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return wb.call(i,s,l,n,r,o),e&&null==i.cause&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",a&&Object.assign(i,a),i};function Cb(e){return bb.isPlainObject(e)||bb.isArray(e)}function kb(e){return bb.endsWith(e,"[]")?e.slice(0,-2):e}function _b(e,t,n){return e?e.concat(t).map(function(e,t){return e=kb(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Eb=bb.toFlatObject(bb,{},null,function(e){return/^is[A-Z]/.test(e)});function jb(e,t,n){if(!bb.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=bb.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!bb.isUndefined(t[e])})).metaTokens,o=n.visitor||u,a=n.dots,i=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&bb.isSpecCompliantForm(t);if(!bb.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(bb.isDate(e))return e.toISOString();if(bb.isBoolean(e))return e.toString();if(!s&&bb.isBlob(e))throw new wb("Blob is not supported. Use a Buffer instead.");return bb.isArrayBuffer(e)||bb.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(bb.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(bb.isArray(e)&&function(e){return bb.isArray(e)&&!e.some(Cb)}(e)||(bb.isFileList(e)||bb.endsWith(n,"[]"))&&(s=bb.toArray(e)))return n=kb(n),s.forEach(function(e,r){!bb.isUndefined(e)&&null!==e&&t.append(!0===i?_b([n],r,a):null===i?n:n+"[]",l(e))}),!1;return!!Cb(e)||(t.append(_b(o,n,a),l(e)),!1)}const c=[],d=Object.assign(Eb,{defaultVisitor:u,convertValue:l,isVisitable:Cb});if(!bb.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!bb.isUndefined(n)){if(-1!==c.indexOf(n))throw Error("Circular reference detected in "+r.join("."));c.push(n),bb.forEach(n,function(n,a){!0===(!(bb.isUndefined(n)||null===n)&&o.call(t,n,bb.isString(a)?a.trim():a,r,d))&&e(n,r?r.concat(a):[a])}),c.pop()}}(e),t}function Ob(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Nb(e,t){this._pairs=[],e&&jb(e,this,t)}const Rb=Nb.prototype;function Pb(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Tb(e,t,n){if(!t)return e;const r=n&&n.encode||Pb;bb.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(a=o?o(t,n):bb.isURLSearchParams(t)?t.toString():new Nb(t,n).toString(r),a){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}Rb.append=function(e,t){this._pairs.push([e,t])},Rb.toString=function(e){const t=e?function(t){return e.call(this,t,Ob)}:Ob;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class Db{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){bb.forEach(this.handlers,function(t){null!==t&&e(t)})}}var Mb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ib={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Nb,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Ab="undefined"!=typeof window&&"undefined"!=typeof document,Fb="object"==typeof navigator&&navigator||void 0,Lb=Ab&&(!Fb||["ReactNative","NativeScript","NS"].indexOf(Fb.product)<0),zb="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,$b=Ab&&window.location.href||"http://localhost";var Hb={...Object.freeze({__proto__:null,hasBrowserEnv:Ab,hasStandardBrowserEnv:Lb,hasStandardBrowserWebWorkerEnv:zb,navigator:Fb,origin:$b}),...Ib};function Vb(e){function t(e,n,r,o){let a=e[o++];if("__proto__"===a)return!0;const i=Number.isFinite(+a),s=o>=e.length;if(a=!a&&bb.isArray(r)?r.length:a,s)return bb.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!i;r[a]&&bb.isObject(r[a])||(r[a]=[]);return t(e,n,r[a],o)&&bb.isArray(r[a])&&(r[a]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}(r[a])),!i}if(bb.isFormData(e)&&bb.isFunction(e.entries)){const n={};return bb.forEachEntry(e,(e,r)=>{t(function(e){return bb.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const Bb={transitional:Mb,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=bb.isObject(e);o&&bb.isHTMLForm(e)&&(e=new FormData(e));if(bb.isFormData(e))return r?JSON.stringify(Vb(e)):e;if(bb.isArrayBuffer(e)||bb.isBuffer(e)||bb.isStream(e)||bb.isFile(e)||bb.isBlob(e)||bb.isReadableStream(e))return e;if(bb.isArrayBufferView(e))return e.buffer;if(bb.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return jb(e,new Hb.classes.URLSearchParams,{visitor:function(e,t,n,r){return Hb.isNode&&bb.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((a=bb.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return jb(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(bb.isString(e))try{return(t||JSON.parse)(e),bb.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Bb.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(bb.isResponse(e)||bb.isReadableStream(e))return e;if(e&&bb.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw wb.from(e,wb.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Hb.classes.FormData,Blob:Hb.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};bb.forEach(["delete","get","head","post","put","patch"],e=>{Bb.headers[e]={}});const Ub=bb.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const Wb=Symbol("internals");function qb(e){return e&&String(e).trim().toLowerCase()}function Yb(e){return!1===e||null==e?e:bb.isArray(e)?e.map(Yb):String(e)}function Gb(e,t,n,r,o){return bb.isFunction(r)?r.call(this,t,n):(o&&(t=n),bb.isString(t)?bb.isString(r)?-1!==t.indexOf(r):bb.isRegExp(r)?r.test(t):void 0:void 0)}let Kb=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=qb(t);if(!o)throw new Error("header name must be a non-empty string");const a=bb.findKey(r,o);(!a||void 0===r[a]||!0===n||void 0===n&&!1!==r[a])&&(r[a||t]=Yb(e))}const a=(e,t)=>bb.forEach(e,(e,n)=>o(e,n,t));if(bb.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(bb.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))a((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Ub[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(bb.isObject(e)&&bb.isIterable(e)){let n,r,o={};for(const t of e){if(!bb.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?bb.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}a(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=qb(e)){const n=bb.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(bb.isFunction(t))return t.call(this,e,n);if(bb.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=qb(e)){const n=bb.findKey(this,e);return!(!n||void 0===this[n]||t&&!Gb(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=qb(e)){const o=bb.findKey(n,e);!o||t&&!Gb(0,n[o],o,t)||(delete n[o],r=!0)}}return bb.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Gb(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return bb.forEach(this,(r,o)=>{const a=bb.findKey(n,o);if(a)return t[a]=Yb(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();i!==o&&delete t[o],t[i]=Yb(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return bb.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&bb.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Wb]=this[Wb]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=qb(e);t[r]||(!function(e,t){const n=bb.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return bb.isArray(e)?e.forEach(r):r(e),this}};function Qb(e,t){const n=this||Bb,r=t||n,o=Kb.from(r.headers);let a=r.data;return bb.forEach(e,function(e){a=e.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Xb(e){return!(!e||!e.__CANCEL__)}function Zb(e,t,n){wb.call(this,null==e?"canceled":e,wb.ERR_CANCELED,t,n),this.name="CanceledError"}function Jb(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new wb("Request failed with status code "+n.status,[wb.ERR_BAD_REQUEST,wb.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}Kb.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),bb.reduceDescriptors(Kb.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),bb.freezeMethods(Kb),bb.inherits(Zb,wb,{__CANCEL__:!0});const ew=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,a=0,i=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),u=r[i];o||(o=l),n[a]=s,r[a]=l;let c=i,d=0;for(;c!==a;)d+=n[c++],c%=e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),l-o<t)return;const f=u&&l-u;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,o=0,a=1e3/t;const i=(t,a=Date.now())=>{o=a,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=a?i(e,t):(n=e,r||(r=setTimeout(()=>{r=null,i(n)},a-s)))},()=>n&&i(n)]}(n=>{const a=n.loaded,i=n.lengthComputable?n.total:void 0,s=a-r,l=o(s);r=a;e({loaded:a,total:i,progress:i?a/i:void 0,bytes:s,rate:l||void 0,estimated:l&&i&&a<=i?(i-a)/l:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})},n)},tw=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},nw=e=>(...t)=>bb.asap(()=>e(...t));var rw=Hb.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Hb.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Hb.origin),Hb.navigator&&/(msie|trident)/i.test(Hb.navigator.userAgent)):()=>!0,ow=Hb.hasStandardBrowserEnv?{write(e,t,n,r,o,a,i){if("undefined"==typeof document)return;const s=[`${e}=${encodeURIComponent(t)}`];bb.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),bb.isString(r)&&s.push(`path=${r}`),bb.isString(o)&&s.push(`domain=${o}`),!0===a&&s.push("secure"),bb.isString(i)&&s.push(`SameSite=${i}`),document.cookie=s.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function aw(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const iw=e=>e instanceof Kb?{...e}:e;function sw(e,t){t=t||{};const n={};function r(e,t,n,r){return bb.isPlainObject(e)&&bb.isPlainObject(t)?bb.merge.call({caseless:r},e,t):bb.isPlainObject(t)?bb.merge({},t):bb.isArray(t)?t.slice():t}function o(e,t,n,o){return bb.isUndefined(t)?bb.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function a(e,t){if(!bb.isUndefined(t))return r(void 0,t)}function i(e,t){return bb.isUndefined(t)?bb.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,a){return a in t?r(n,o):a in e?r(void 0,n):void 0}const l={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(e,t,n)=>o(iw(e),iw(t),0,!0)};return bb.forEach(Object.keys({...e,...t}),function(r){const a=l[r]||o,i=a(e[r],t[r],r);bb.isUndefined(i)&&a!==s||(n[r]=i)}),n}var lw=e=>{const t=sw({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:s}=t;if(t.headers=i=Kb.from(i),t.url=Tb(aw(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&i.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),bb.isFormData(n))if(Hb.hasStandardBrowserEnv||Hb.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(bb.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&i.set(e,n)})}if(Hb.hasStandardBrowserEnv&&(r&&bb.isFunction(r)&&(r=r(t)),r||!1!==r&&rw(t.url))){const e=o&&a&&ow.read(a);e&&i.set(o,e)}return t};var uw="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=lw(e);let o=r.data;const a=Kb.from(r.headers).normalize();let i,s,l,u,c,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=r;function h(){u&&u(),c&&c(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=Kb.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Jb(function(e){t(e),h()},function(e){n(e),h()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new wb("Request aborted",wb.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const r=new wb(t&&t.message?t.message:"Network Error",wb.ERR_NETWORK,e,m);r.event=t||null,n(r),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Mb;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new wb(t,o.clarifyTimeoutError?wb.ETIMEDOUT:wb.ECONNABORTED,e,m)),m=null},void 0===o&&a.setContentType(null),"setRequestHeader"in m&&bb.forEach(a.toJSON(),function(e,t){m.setRequestHeader(t,e)}),bb.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),p&&([l,c]=ew(p,!0),m.addEventListener("progress",l)),f&&m.upload&&([s,u]=ew(f),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new Zb(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===Hb.protocols.indexOf(y)?n(new wb("Unsupported protocol "+y+":",wb.ERR_BAD_REQUEST,e)):m.send(o||null)})};const cw=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof wb?t:new Zb(t instanceof Error?t.message:t))}};let a=t&&setTimeout(()=>{a=null,o(new wb(`timeout ${t} of ms exceeded`,wb.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=()=>bb.asap(i),s}},dw=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},fw=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},pw=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of fw(e))yield*dw(n,t)}(e,t);let a,i=0,s=e=>{a||(a=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let a=r.byteLength;if(n){let e=i+=a;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:hw}=bb,mw=(({Request:e,Response:t})=>({Request:e,Response:t}))(bb.global),{ReadableStream:gw,TextEncoder:yw}=bb.global,vw=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},bw=e=>{e=bb.merge.call({skipUndefined:!0},mw,e);const{fetch:t,Request:n,Response:r}=e,o=t?hw(t):"function"==typeof fetch,a=hw(n),i=hw(r);if(!o)return!1;const s=o&&hw(gw),l=o&&("function"==typeof yw?(u=new yw,e=>u.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var u;const c=a&&s&&vw(()=>{let e=!1;const t=new n(Hb.origin,{body:new gw,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=i&&s&&vw(()=>bb.isReadableStream(new r("").body)),f={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!f[e]&&(f[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new wb(`Response type '${e}' is not supported`,wb.ERR_NOT_SUPPORT,n)})});const p=async(e,t)=>{const r=bb.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(bb.isBlob(e))return e.size;if(bb.isSpecCompliantForm(e)){const t=new n(Hb.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return bb.isArrayBufferView(e)||bb.isArrayBuffer(e)?e.byteLength:(bb.isURLSearchParams(e)&&(e+=""),bb.isString(e)?(await l(e)).byteLength:void 0)})(t):r};return async e=>{let{url:o,method:i,data:s,signal:l,cancelToken:u,timeout:h,onDownloadProgress:m,onUploadProgress:g,responseType:y,headers:v,withCredentials:b="same-origin",fetchOptions:w}=lw(e),x=t||fetch;y=y?(y+"").toLowerCase():"text";let S=cw([l,u&&u.toAbortSignal()],h),C=null;const k=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let _;try{if(g&&c&&"get"!==i&&"head"!==i&&0!==(_=await p(v,s))){let e,t=new n(o,{method:"POST",body:s,duplex:"half"});if(bb.isFormData(s)&&(e=t.headers.get("content-type"))&&v.setContentType(e),t.body){const[e,n]=tw(_,ew(nw(g)));s=pw(t.body,65536,e,n)}}bb.isString(b)||(b=b?"include":"omit");const t=a&&"credentials"in n.prototype,l={...w,signal:S,method:i.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:"half",credentials:t?b:void 0};C=a&&new n(o,l);let u=await(a?x(C,w):x(o,l));const h=d&&("stream"===y||"response"===y);if(d&&(m||h&&k)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=u[t]});const t=bb.toFiniteNumber(u.headers.get("content-length")),[n,o]=m&&tw(t,ew(nw(m),!0))||[];u=new r(pw(u.body,65536,n,()=>{o&&o(),k&&k()}),e)}y=y||"text";let E=await f[bb.findKey(f,y)||"text"](u,e);return!h&&k&&k(),await new Promise((t,n)=>{Jb(t,n,{data:E,headers:Kb.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:C})})}catch(t){if(k&&k(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new wb("Network Error",wb.ERR_NETWORK,e,C),{cause:t.cause||t});throw wb.from(t,t&&t.code,e,C)}}},ww=new Map,xw=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let i,s,l=a.length,u=ww;for(;l--;)i=a[l],s=u.get(i),void 0===s&&u.set(i,s=l?new Map:bw(t)),u=s;return s};xw();const Sw={http:null,xhr:uw,fetch:{get:xw}};bb.forEach(Sw,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Cw=e=>`- ${e}`,kw=e=>bb.isFunction(e)||null===e||!1===e;var _w={getAdapter:function(e,t){e=bb.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let i=0;i<n;i++){let n;if(r=e[i],o=r,!kw(r)&&(o=Sw[(n=String(r)).toLowerCase()],void 0===o))throw new wb(`Unknown adapter '${n}'`);if(o&&(bb.isFunction(o)||(o=o.get(t))))break;a[n||"#"+i]=o}if(!o){const e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new wb("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(Cw).join("\n"):" "+Cw(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o},adapters:Sw};function Ew(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Zb(null,e)}function jw(e){Ew(e),e.headers=Kb.from(e.headers),e.data=Qb.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return _w.getAdapter(e.adapter||Bb.adapter,e)(e).then(function(t){return Ew(e),t.data=Qb.call(e,e.transformResponse,t),t.headers=Kb.from(t.headers),t},function(t){return Xb(t)||(Ew(e),t&&t.response&&(t.response.data=Qb.call(e,e.transformResponse,t.response),t.response.headers=Kb.from(t.response.headers))),Promise.reject(t)})}const Ow="1.13.2",Nw={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Nw[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Rw={};Nw.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Ow+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,a)=>{if(!1===e)throw new wb(r(o," has been removed"+(t?" in "+t:"")),wb.ERR_DEPRECATED);return t&&!Rw[o]&&(Rw[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,a)}},Nw.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var Pw={assertOptions:function(e,t,n){if("object"!=typeof e)throw new wb("options must be an object",wb.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],i=t[a];if(i){const t=e[a],n=void 0===t||i(t,a,e);if(!0!==n)throw new wb("option "+a+" must be "+n,wb.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new wb("Unknown option "+a,wb.ERR_BAD_OPTION)}},validators:Nw};const Tw=Pw.validators;let Dw=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Db,response:new Db}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=sw(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Pw.assertOptions(n,{silentJSONParsing:Tw.transitional(Tw.boolean),forcedJSONParsing:Tw.transitional(Tw.boolean),clarifyTimeoutError:Tw.transitional(Tw.boolean)},!1),null!=r&&(bb.isFunction(r)?t.paramsSerializer={serialize:r}:Pw.assertOptions(r,{encode:Tw.function,serialize:Tw.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Pw.assertOptions(t,{baseUrl:Tw.spelling("baseURL"),withXsrfToken:Tw.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=o&&bb.merge(o.common,o[t.method]);o&&bb.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=Kb.concat(a,o);const i=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});const l=[];let u;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let c,d=0;if(!s){const e=[jw.bind(this),void 0];for(e.unshift(...i),e.push(...l),c=e.length,u=Promise.resolve(t);d<c;)u=u.then(e[d++],e[d++]);return u}c=i.length;let f=t;for(;d<c;){const e=i[d++],t=i[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{u=jw.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,c=l.length;d<c;)u=u.then(l[d++],l[d++]);return u}getUri(e){return Tb(aw((e=sw(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};bb.forEach(["delete","get","head","options"],function(e){Dw.prototype[e]=function(t,n){return this.request(sw(n||{},{method:e,url:t,data:(n||{}).data}))}}),bb.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(sw(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Dw.prototype[e]=t(),Dw.prototype[e+"Form"]=t(!0)});const Mw={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Mw).forEach(([e,t])=>{Mw[t]=e});const Iw=function e(t){const n=new Dw(t),r=Pv(Dw.prototype.request,n);return bb.extend(r,Dw.prototype,n,{allOwnKeys:!0}),bb.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(sw(t,n))},r}(Bb);Iw.Axios=Dw,Iw.CanceledError=Zb,Iw.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new Zb(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;const n=new e(function(e){t=e});return{token:n,cancel:t}}},Iw.isCancel=Xb,Iw.VERSION=Ow,Iw.toFormData=jb,Iw.AxiosError=wb,Iw.Cancel=Iw.CanceledError,Iw.all=function(e){return Promise.all(e)},Iw.spread=function(e){return function(t){return e.apply(null,t)}},Iw.isAxiosError=function(e){return bb.isObject(e)&&!0===e.isAxiosError},Iw.mergeConfig=sw,Iw.AxiosHeaders=Kb,Iw.formToJSON=e=>Vb(bb.isHTMLForm(e)?new FormData(e):e),Iw.getAdapter=_w.getAdapter,Iw.HttpStatusCode=Mw,Iw.default=Iw;const{Axios:Aw,AxiosError:Fw,CanceledError:Lw,isCancel:zw,CancelToken:$w,VERSION:Hw,all:Vw,Cancel:Bw,isAxiosError:Uw,spread:Ww,toFormData:qw,AxiosHeaders:Yw,HttpStatusCode:Gw,formToJSON:Kw,getAdapter:Qw,mergeConfig:Xw}=Iw,Zw=e=>{e||console.warn("⚠️ No API key provided to createApiClient");const t=Iw.create({baseURL:"https://biz.api.simpoocodes.com/api/v1/outbound",headers:{"Content-Type":"application/json","SIMPOO-API-KEY":e}});return t.interceptors.request.use(t=>(e&&t.headers&&(t.headers["SIMPOO-API-KEY"]=e),t),e=>Promise.reject(e)),t.interceptors.response.use(e=>e,e=>(e.response?console.error("API Error:",e.response.status,e.response.data):console.error("Network or Axios Error:",e.message),Promise.reject(e))),t},Jw=(e,t,n={})=>{const{apiKey:r}=Dn(),o=Zw(r||"");return function(e){return Pn(e,dn)}({queryKey:e,queryFn:()=>(async e=>{try{const{data:t}=await o.get(e);return t}catch(e){tx(e)}})(t),...n})},ex=(e={enableToast:!0},t,n)=>{const{enableToast:r,...o}=e,{apiKey:a}=Dn(),i=Zw(a||"");return function(e){const t=En(),[n]=D.useState(()=>new Sn(t,e));D.useEffect(()=>{n.setOptions(e)},[n,e]);const r=D.useSyncExternalStore(D.useCallback(e=>n.subscribe(Jt.batchCalls(e)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=D.useCallback((e,t)=>{n.mutate(e,t).catch(Ot)},[n]);if(r.error&&Kt(n.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:o,mutateAsync:r.mutate}}({mutationFn:async({url:e,payload:t})=>{const{data:n}=await i.post(e,t);return n},onSuccess(e,t,n){r&&Rv.success(e.message)},onError(e,t,n){console.log(e),tx(e)},...o})},tx=e=>{e?.response?(console.log("response data:",e.response.data),console.log("Status Code:",e.response.status),console.log("Status Text:",e.response.statusText),500===e.response.status?Rv.error("Something went wrong",{position:"top-right"}):e.response.data&&e.response.data.message&&Rv.error(`${e.response?.data?.message}`,{position:"top-right"})):(e.request,console.log(e?.message),Rv.error(`${e?.message}`,{position:"top-right"}))};function nx(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var rx,ox={exports:{}};var ax=(rx||(rx=1,function(e){e.exports=function(){var t,n;function r(){return t.apply(null,arguments)}function o(e){t=e}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(s(e,t))return!1;return!0}function u(e){return void 0===e}function c(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,r=[],o=e.length;for(n=0;n<o;++n)r.push(t(e[n],n));return r}function p(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,"toString")&&(e.toString=t.toString),s(t,"valueOf")&&(e.valueOf=t.valueOf),e}function h(e,t,n,r){return Gn(e,t,n,r,!0).utc()}function m(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return null==e._pf&&(e._pf=m()),e._pf}function y(e){var t=null,r=!1,o=e._d&&!isNaN(e._d.getTime());return o&&(t=g(e),r=n.call(t.parsedDateParts,function(e){return null!=e}),o=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?o:(e._isValid=o,e._isValid)}function v(e){var t=h(NaN);return null!=e?p(g(t),e):g(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var b=r.momentProperties=[],w=!1;function x(e,t){var n,r,o,a=b.length;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=g(t)),u(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)u(o=t[r=b[n]])||(e[r]=o);return e}function S(e){x(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===w&&(w=!0,r.updateOffset(this),w=!1)}function C(e){return e instanceof S||null!=e&&null!=e._isAMomentObject}function k(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function _(e,t){var n=!0;return p(function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var o,a,i,l=[],u=arguments.length;for(a=0;a<u;a++){if(o="","object"==typeof arguments[a]){for(i in o+="\n["+a+"] ",arguments[0])s(arguments[0],i)&&(o+=i+": "+arguments[0][i]+", ");o=o.slice(0,-2)}else o=arguments[a];l.push(o)}k(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)},t)}var E,j={};function O(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),j[e]||(k(t),j[e]=!0)}function N(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function R(e){var t,n;for(n in e)s(e,n)&&(N(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function P(e,t){var n,r=p({},e);for(n in t)s(t,n)&&(i(e[n])&&i(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)s(e,n)&&!s(t,n)&&i(e[n])&&(r[n]=p({},r[n]));return r}function T(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,E=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var D={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function M(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return N(r)?r.call(t,n):r}function I(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var A=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,F=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,L={},z={};function $(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(z[e]=o),t&&(z[t[0]]=function(){return I(o.apply(this,arguments),t[1],t[2])}),n&&(z[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function H(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function V(e){var t,n,r=e.match(A);for(t=0,n=r.length;t<n;t++)z[r[t]]?r[t]=z[r[t]]:r[t]=H(r[t]);return function(t){var o,a="";for(o=0;o<n;o++)a+=N(r[o])?r[o].call(t,e):r[o];return a}}function B(e,t){return e.isValid()?(t=U(t,e.localeData()),L[t]=L[t]||V(t),L[t](e)):e.localeData().invalidDate()}function U(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(F.lastIndex=0;n>=0&&F.test(e);)e=e.replace(F,r),F.lastIndex=0,n-=1;return e}var W={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function q(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(A).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])}var Y="Invalid date";function G(){return this._invalidDate}var K="%d",Q=/\d{1,2}/;function X(e){return this._ordinal.replace("%d",e)}var Z={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function J(e,t,n,r){var o=this._relativeTime[n];return N(o)?o(e,t,n,r):o.replace(/%d/i,e)}function ee(e,t){var n=this._relativeTime[e>0?"future":"past"];return N(n)?n(t):n.replace(/%s/i,t)}var te={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ne(e){return"string"==typeof e?te[e]||te[e.toLowerCase()]:void 0}function re(e){var t,n,r={};for(n in e)s(e,n)&&(t=ne(n))&&(r[t]=e[n]);return r}var oe={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ae(e){var t,n=[];for(t in e)s(e,t)&&n.push({unit:t,priority:oe[t]});return n.sort(function(e,t){return e.priority-t.priority}),n}var ie,se=/\d/,le=/\d\d/,ue=/\d{3}/,ce=/\d{4}/,de=/[+-]?\d{6}/,fe=/\d\d?/,pe=/\d\d\d\d?/,he=/\d\d\d\d\d\d?/,me=/\d{1,3}/,ge=/\d{1,4}/,ye=/[+-]?\d{1,6}/,ve=/\d+/,be=/[+-]?\d+/,we=/Z|[+-]\d\d:?\d\d/gi,xe=/Z|[+-]\d\d(?::?\d\d)?/gi,Se=/[+-]?\d+(\.\d{1,3})?/,Ce=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ke=/^[1-9]\d?/,_e=/^([1-9]\d|\d)/;function Ee(e,t,n){ie[e]=N(t)?t:function(e,r){return e&&n?n:t}}function je(e,t){return s(ie,e)?ie[e](t._strict,t._locale):new RegExp(Oe(e))}function Oe(e){return Ne(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,o){return t||n||r||o}))}function Ne(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Re(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Pe(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=Re(t)),n}ie={};var Te={};function De(e,t){var n,r,o=t;for("string"==typeof e&&(e=[e]),c(t)&&(o=function(e,n){n[t]=Pe(e)}),r=e.length,n=0;n<r;n++)Te[e[n]]=o}function Me(e,t){De(e,function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)})}function Ie(e,t,n){null!=t&&s(Te,e)&&Te[e](t,n._a,n,e)}function Ae(e){return e%4==0&&e%100!=0||e%400==0}var Fe=0,Le=1,ze=2,$e=3,He=4,Ve=5,Be=6,Ue=7,We=8;function qe(e){return Ae(e)?366:365}$("Y",0,0,function(){var e=this.year();return e<=9999?I(e,4):"+"+e}),$(0,["YY",2],0,function(){return this.year()%100}),$(0,["YYYY",4],0,"year"),$(0,["YYYYY",5],0,"year"),$(0,["YYYYYY",6,!0],0,"year"),Ee("Y",be),Ee("YY",fe,le),Ee("YYYY",ge,ce),Ee("YYYYY",ye,de),Ee("YYYYYY",ye,de),De(["YYYYY","YYYYYY"],Fe),De("YYYY",function(e,t){t[Fe]=2===e.length?r.parseTwoDigitYear(e):Pe(e)}),De("YY",function(e,t){t[Fe]=r.parseTwoDigitYear(e)}),De("Y",function(e,t){t[Fe]=parseInt(e,10)}),r.parseTwoDigitYear=function(e){return Pe(e)+(Pe(e)>68?1900:2e3)};var Ye,Ge=Qe("FullYear",!0);function Ke(){return Ae(this.year())}function Qe(e,t){return function(n){return null!=n?(Ze(this,e,n),r.updateOffset(this,t),this):Xe(this,e)}}function Xe(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Ze(e,t,n){var r,o,a,i,s;if(e.isValid()&&!isNaN(n)){switch(r=e._d,o=e._isUTC,t){case"Milliseconds":return void(o?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(o?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(o?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(o?r.setUTCHours(n):r.setHours(n));case"Date":return void(o?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}a=n,i=e.month(),s=29!==(s=e.date())||1!==i||Ae(a)?s:28,o?r.setUTCFullYear(a,i,s):r.setFullYear(a,i,s)}}function Je(e){return N(this[e=ne(e)])?this[e]():this}function et(e,t){if("object"==typeof e){var n,r=ae(e=re(e)),o=r.length;for(n=0;n<o;n++)this[r[n].unit](e[r[n].unit])}else if(N(this[e=ne(e)]))return this[e](t);return this}function tt(e,t){return(e%t+t)%t}function nt(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=tt(t,12);return e+=(t-n)/12,1===n?Ae(e)?29:28:31-n%7%2}Ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},$("M",["MM",2],"Mo",function(){return this.month()+1}),$("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),$("MMMM",0,0,function(e){return this.localeData().months(this,e)}),Ee("M",fe,ke),Ee("MM",fe,le),Ee("MMM",function(e,t){return t.monthsShortRegex(e)}),Ee("MMMM",function(e,t){return t.monthsRegex(e)}),De(["M","MM"],function(e,t){t[Le]=Pe(e)-1}),De(["MMM","MMMM"],function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[Le]=o:g(n).invalidMonth=e});var rt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ot="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),at=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,it=Ce,st=Ce;function lt(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||at).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months.standalone}function ut(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[at.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ct(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=h([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=Ye.call(this._shortMonthsParse,i))?o:null:-1!==(o=Ye.call(this._longMonthsParse,i))?o:null:"MMM"===t?-1!==(o=Ye.call(this._shortMonthsParse,i))||-1!==(o=Ye.call(this._longMonthsParse,i))?o:null:-1!==(o=Ye.call(this._longMonthsParse,i))||-1!==(o=Ye.call(this._shortMonthsParse,i))?o:null}function dt(e,t,n){var r,o,a;if(this._monthsParseExact)return ct.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function ft(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=Pe(t);else if(!c(t=e.localeData().monthsParse(t)))return e;var n=t,r=e.date();return r=r<29?r:Math.min(r,nt(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function pt(e){return null!=e?(ft(this,e),r.updateOffset(this,!0),this):Xe(this,"Month")}function ht(){return nt(this.year(),this.month())}function mt(e){return this._monthsParseExact?(s(this,"_monthsRegex")||yt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=it),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function gt(e){return this._monthsParseExact?(s(this,"_monthsRegex")||yt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=st),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function yt(){function e(e,t){return t.length-e.length}var t,n,r,o,a=[],i=[],s=[];for(t=0;t<12;t++)n=h([2e3,t]),r=Ne(this.monthsShort(n,"")),o=Ne(this.months(n,"")),a.push(r),i.push(o),s.push(o),s.push(r);a.sort(e),i.sort(e),s.sort(e),this._monthsRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+a.join("|")+")","i")}function vt(e,t,n,r,o,a,i){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,o,a,i),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,o,a,i),s}function bt(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function wt(e,t,n){var r=7+t-n;return-(7+bt(e,0,r).getUTCDay()-t)%7+r-1}function xt(e,t,n,r,o){var a,i,s=1+7*(t-1)+(7+n-r)%7+wt(e,r,o);return s<=0?i=qe(a=e-1)+s:s>qe(e)?(a=e+1,i=s-qe(e)):(a=e,i=s),{year:a,dayOfYear:i}}function St(e,t,n){var r,o,a=wt(e.year(),t,n),i=Math.floor((e.dayOfYear()-a-1)/7)+1;return i<1?r=i+Ct(o=e.year()-1,t,n):i>Ct(e.year(),t,n)?(r=i-Ct(e.year(),t,n),o=e.year()+1):(o=e.year(),r=i),{week:r,year:o}}function Ct(e,t,n){var r=wt(e,t,n),o=wt(e+1,t,n);return(qe(e)-r+o)/7}function kt(e){return St(e,this._week.dow,this._week.doy).week}$("w",["ww",2],"wo","week"),$("W",["WW",2],"Wo","isoWeek"),Ee("w",fe,ke),Ee("ww",fe,le),Ee("W",fe,ke),Ee("WW",fe,le),Me(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Pe(e)});var _t={dow:0,doy:6};function Et(){return this._week.dow}function jt(){return this._week.doy}function Ot(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Nt(e){var t=St(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Rt(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Pt(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Tt(e,t){return e.slice(t,7).concat(e.slice(0,t))}$("d",0,"do","day"),$("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),$("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),$("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),$("e",0,0,"weekday"),$("E",0,0,"isoWeekday"),Ee("d",fe),Ee("e",fe),Ee("E",fe),Ee("dd",function(e,t){return t.weekdaysMinRegex(e)}),Ee("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Ee("dddd",function(e,t){return t.weekdaysRegex(e)}),Me(["dd","ddd","dddd"],function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:g(n).invalidWeekday=e}),Me(["d","e","E"],function(e,t,n,r){t[r]=Pe(e)});var Dt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Mt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),It="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),At=Ce,Ft=Ce,Lt=Ce;function zt(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Tt(n,this._week.dow):e?n[e.day()]:n}function $t(e){return!0===e?Tt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ht(e){return!0===e?Tt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Vt(e,t,n){var r,o,a,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=Ye.call(this._weekdaysParse,i))?o:null:"ddd"===t?-1!==(o=Ye.call(this._shortWeekdaysParse,i))?o:null:-1!==(o=Ye.call(this._minWeekdaysParse,i))?o:null:"dddd"===t?-1!==(o=Ye.call(this._weekdaysParse,i))||-1!==(o=Ye.call(this._shortWeekdaysParse,i))||-1!==(o=Ye.call(this._minWeekdaysParse,i))?o:null:"ddd"===t?-1!==(o=Ye.call(this._shortWeekdaysParse,i))||-1!==(o=Ye.call(this._weekdaysParse,i))||-1!==(o=Ye.call(this._minWeekdaysParse,i))?o:null:-1!==(o=Ye.call(this._minWeekdaysParse,i))||-1!==(o=Ye.call(this._weekdaysParse,i))||-1!==(o=Ye.call(this._shortWeekdaysParse,i))?o:null}function Bt(e,t,n){var r,o,a;if(this._weekdaysParseExact)return Vt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Ut(e){if(!this.isValid())return null!=e?this:NaN;var t=Xe(this,"Day");return null!=e?(e=Rt(e,this.localeData()),this.add(e-t,"d")):t}function Wt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function qt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Pt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function Yt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=At),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Gt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ft),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Kt(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Lt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Qt(){function e(e,t){return t.length-e.length}var t,n,r,o,a,i=[],s=[],l=[],u=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=Ne(this.weekdaysMin(n,"")),o=Ne(this.weekdaysShort(n,"")),a=Ne(this.weekdays(n,"")),i.push(r),s.push(o),l.push(a),u.push(r),u.push(o),u.push(a);i.sort(e),s.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Xt(){return this.hours()%12||12}function Zt(){return this.hours()||24}function Jt(e,t){$(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function en(e,t){return t._meridiemParse}function tn(e){return"p"===(e+"").toLowerCase().charAt(0)}$("H",["HH",2],0,"hour"),$("h",["hh",2],0,Xt),$("k",["kk",2],0,Zt),$("hmm",0,0,function(){return""+Xt.apply(this)+I(this.minutes(),2)}),$("hmmss",0,0,function(){return""+Xt.apply(this)+I(this.minutes(),2)+I(this.seconds(),2)}),$("Hmm",0,0,function(){return""+this.hours()+I(this.minutes(),2)}),$("Hmmss",0,0,function(){return""+this.hours()+I(this.minutes(),2)+I(this.seconds(),2)}),Jt("a",!0),Jt("A",!1),Ee("a",en),Ee("A",en),Ee("H",fe,_e),Ee("h",fe,ke),Ee("k",fe,ke),Ee("HH",fe,le),Ee("hh",fe,le),Ee("kk",fe,le),Ee("hmm",pe),Ee("hmmss",he),Ee("Hmm",pe),Ee("Hmmss",he),De(["H","HH"],$e),De(["k","kk"],function(e,t,n){var r=Pe(e);t[$e]=24===r?0:r}),De(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),De(["h","hh"],function(e,t,n){t[$e]=Pe(e),g(n).bigHour=!0}),De("hmm",function(e,t,n){var r=e.length-2;t[$e]=Pe(e.substr(0,r)),t[He]=Pe(e.substr(r)),g(n).bigHour=!0}),De("hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[$e]=Pe(e.substr(0,r)),t[He]=Pe(e.substr(r,2)),t[Ve]=Pe(e.substr(o)),g(n).bigHour=!0}),De("Hmm",function(e,t,n){var r=e.length-2;t[$e]=Pe(e.substr(0,r)),t[He]=Pe(e.substr(r))}),De("Hmmss",function(e,t,n){var r=e.length-4,o=e.length-2;t[$e]=Pe(e.substr(0,r)),t[He]=Pe(e.substr(r,2)),t[Ve]=Pe(e.substr(o))});var nn=/[ap]\.?m?\.?/i,rn=Qe("Hours",!0);function on(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var an,sn={calendar:D,longDateFormat:W,invalidDate:Y,ordinal:K,dayOfMonthOrdinalParse:Q,relativeTime:Z,months:rt,monthsShort:ot,week:_t,weekdays:Dt,weekdaysMin:It,weekdaysShort:Mt,meridiemParse:nn},ln={},un={};function cn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function dn(e){return e?e.toLowerCase().replace("_","-"):e}function fn(e){for(var t,n,r,o,a=0;a<e.length;){for(t=(o=dn(e[a]).split("-")).length,n=(n=dn(e[a+1]))?n.split("-"):null;t>0;){if(r=hn(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&cn(o,n)>=t-1)break;t--}a++}return an}function pn(e){return!(!e||!e.match("^[^/\\\\]*$"))}function hn(t){var n=null;if(void 0===ln[t]&&e&&e.exports&&pn(t))try{n=an._abbr,nx("./locale/"+t),mn(n)}catch(e){ln[t]=null}return ln[t]}function mn(e,t){var n;return e&&((n=u(t)?vn(e):gn(e,t))?an=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),an._abbr}function gn(e,t){if(null!==t){var n,r=sn;if(t.abbr=e,null!=ln[e])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=ln[e]._config;else if(null!=t.parentLocale)if(null!=ln[t.parentLocale])r=ln[t.parentLocale]._config;else{if(null==(n=hn(t.parentLocale)))return un[t.parentLocale]||(un[t.parentLocale]=[]),un[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ln[e]=new T(P(r,t)),un[e]&&un[e].forEach(function(e){gn(e.name,e.config)}),mn(e),ln[e]}return delete ln[e],null}function yn(e,t){if(null!=t){var n,r,o=sn;null!=ln[e]&&null!=ln[e].parentLocale?ln[e].set(P(ln[e]._config,t)):(null!=(r=hn(e))&&(o=r._config),t=P(o,t),null==r&&(t.abbr=e),(n=new T(t)).parentLocale=ln[e],ln[e]=n),mn(e)}else null!=ln[e]&&(null!=ln[e].parentLocale?(ln[e]=ln[e].parentLocale,e===mn()&&mn(e)):null!=ln[e]&&delete ln[e]);return ln[e]}function vn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return an;if(!a(e)){if(t=hn(e))return t;e=[e]}return fn(e)}function bn(){return E(ln)}function wn(e){var t,n=e._a;return n&&-2===g(e).overflow&&(t=n[Le]<0||n[Le]>11?Le:n[ze]<1||n[ze]>nt(n[Fe],n[Le])?ze:n[$e]<0||n[$e]>24||24===n[$e]&&(0!==n[He]||0!==n[Ve]||0!==n[Be])?$e:n[He]<0||n[He]>59?He:n[Ve]<0||n[Ve]>59?Ve:n[Be]<0||n[Be]>999?Be:-1,g(e)._overflowDayOfYear&&(t<Fe||t>ze)&&(t=ze),g(e)._overflowWeeks&&-1===t&&(t=Ue),g(e)._overflowWeekday&&-1===t&&(t=We),g(e).overflow=t),e}var xn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Sn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Cn=/Z|[+-]\d\d(?::?\d\d)?/,kn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],_n=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],En=/^\/?Date\((-?\d+)/i,jn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,On={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Nn(e){var t,n,r,o,a,i,s=e._i,l=xn.exec(s)||Sn.exec(s),u=kn.length,c=_n.length;if(l){for(g(e).iso=!0,t=0,n=u;t<n;t++)if(kn[t][1].exec(l[1])){o=kn[t][0],r=!1!==kn[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=c;t<n;t++)if(_n[t][1].exec(l[3])){a=(l[2]||" ")+_n[t][0];break}if(null==a)return void(e._isValid=!1)}if(!r&&null!=a)return void(e._isValid=!1);if(l[4]){if(!Cn.exec(l[4]))return void(e._isValid=!1);i="Z"}e._f=o+(a||"")+(i||""),Hn(e)}else e._isValid=!1}function Rn(e,t,n,r,o,a){var i=[Pn(e),ot.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(o,10)];return a&&i.push(parseInt(a,10)),i}function Pn(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Tn(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Dn(e,t,n){return!e||Mt.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(g(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Mn(e,t,n){if(e)return On[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}function In(e){var t,n=jn.exec(Tn(e._i));if(n){if(t=Rn(n[4],n[3],n[2],n[5],n[6],n[7]),!Dn(n[1],t,e))return;e._a=t,e._tzm=Mn(n[8],n[9],n[10]),e._d=bt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function An(e){var t=En.exec(e._i);null===t?(Nn(e),!1===e._isValid&&(delete e._isValid,In(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Fn(e,t,n){return null!=e?e:null!=t?t:n}function Ln(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function zn(e){var t,n,r,o,a,i=[];if(!e._d){for(r=Ln(e),e._w&&null==e._a[ze]&&null==e._a[Le]&&$n(e),null!=e._dayOfYear&&(a=Fn(e._a[Fe],r[Fe]),(e._dayOfYear>qe(a)||0===e._dayOfYear)&&(g(e)._overflowDayOfYear=!0),n=bt(a,0,e._dayOfYear),e._a[Le]=n.getUTCMonth(),e._a[ze]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=i[t]=r[t];for(;t<7;t++)e._a[t]=i[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[$e]&&0===e._a[He]&&0===e._a[Ve]&&0===e._a[Be]&&(e._nextDay=!0,e._a[$e]=0),e._d=(e._useUTC?bt:vt).apply(null,i),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[$e]=24),e._w&&void 0!==e._w.d&&e._w.d!==o&&(g(e).weekdayMismatch=!0)}}function $n(e){var t,n,r,o,a,i,s,l,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(a=1,i=4,n=Fn(t.GG,e._a[Fe],St(Kn(),1,4).year),r=Fn(t.W,1),((o=Fn(t.E,1))<1||o>7)&&(l=!0)):(a=e._locale._week.dow,i=e._locale._week.doy,u=St(Kn(),a,i),n=Fn(t.gg,e._a[Fe],u.year),r=Fn(t.w,u.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+a,(t.e<0||t.e>6)&&(l=!0)):o=a),r<1||r>Ct(n,a,i)?g(e)._overflowWeeks=!0:null!=l?g(e)._overflowWeekday=!0:(s=xt(n,r,o,a,i),e._a[Fe]=s.year,e._dayOfYear=s.dayOfYear)}function Hn(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],g(e).empty=!0;var t,n,o,a,i,s,l,u=""+e._i,c=u.length,d=0;for(l=(o=U(e._f,e._locale).match(A)||[]).length,t=0;t<l;t++)a=o[t],(n=(u.match(je(a,e))||[])[0])&&((i=u.substr(0,u.indexOf(n))).length>0&&g(e).unusedInput.push(i),u=u.slice(u.indexOf(n)+n.length),d+=n.length),z[a]?(n?g(e).empty=!1:g(e).unusedTokens.push(a),Ie(a,n,e)):e._strict&&!n&&g(e).unusedTokens.push(a);g(e).charsLeftOver=c-d,u.length>0&&g(e).unusedInput.push(u),e._a[$e]<=12&&!0===g(e).bigHour&&e._a[$e]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[$e]=Vn(e._locale,e._a[$e],e._meridiem),null!==(s=g(e).era)&&(e._a[Fe]=e._locale.erasConvertYear(s,e._a[Fe])),zn(e),wn(e)}else In(e);else Nn(e)}function Vn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function Bn(e){var t,n,r,o,a,i,s=!1,l=e._f.length;if(0===l)return g(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<l;o++)a=0,i=!1,t=x({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],Hn(t),y(t)&&(i=!0),a+=g(t).charsLeftOver,a+=10*g(t).unusedTokens.length,g(t).score=a,s?a<r&&(r=a,n=t):(null==r||a<r||i)&&(r=a,n=t,i&&(s=!0));p(e,n||t)}function Un(e){if(!e._d){var t=re(e._i),n=void 0===t.day?t.date:t.day;e._a=f([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),zn(e)}}function Wn(e){var t=new S(wn(qn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function qn(e){var t=e._i,n=e._f;return e._locale=e._locale||vn(e._l),null===t||void 0===n&&""===t?v({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),C(t)?new S(wn(t)):(d(t)?e._d=t:a(n)?Bn(e):n?Hn(e):Yn(e),y(e)||(e._d=null),e))}function Yn(e){var t=e._i;u(t)?e._d=new Date(r.now()):d(t)?e._d=new Date(t.valueOf()):"string"==typeof t?An(e):a(t)?(e._a=f(t.slice(0),function(e){return parseInt(e,10)}),zn(e)):i(t)?Un(e):c(t)?e._d=new Date(t):r.createFromInputFallback(e)}function Gn(e,t,n,r,o){var s={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(i(e)&&l(e)||a(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=n,s._i=e,s._f=t,s._strict=r,Wn(s)}function Kn(e,t,n,r){return Gn(e,t,n,r,!1)}r.createFromInputFallback=_("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),r.ISO_8601=function(){},r.RFC_2822=function(){};var Qn=_("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Kn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()}),Xn=_("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Kn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:v()});function Zn(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Kn();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}function Jn(){return Zn("isBefore",[].slice.call(arguments,0))}function er(){return Zn("isAfter",[].slice.call(arguments,0))}var tr=function(){return Date.now?Date.now():+new Date},nr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function rr(e){var t,n,r=!1,o=nr.length;for(t in e)if(s(e,t)&&(-1===Ye.call(nr,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<o;++n)if(e[nr[n]]){if(r)return!1;parseFloat(e[nr[n]])!==Pe(e[nr[n]])&&(r=!0)}return!0}function or(){return this._isValid}function ar(){return Or(NaN)}function ir(e){var t=re(e),n=t.year||0,r=t.quarter||0,o=t.month||0,a=t.week||t.isoWeek||0,i=t.day||0,s=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=rr(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*s*60*60,this._days=+i+7*a,this._months=+o+3*r+12*n,this._data={},this._locale=vn(),this._bubble()}function sr(e){return e instanceof ir}function lr(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function ur(e,t,n){var r,o=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),i=0;for(r=0;r<o;r++)Pe(e[r])!==Pe(t[r])&&i++;return i+a}function cr(e,t){$(e,0,0,function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+I(~~(e/60),2)+t+I(~~e%60,2)})}cr("Z",":"),cr("ZZ",""),Ee("Z",xe),Ee("ZZ",xe),De(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=fr(xe,e)});var dr=/([\+\-]|\d\d)/gi;function fr(e,t){var n,r,o=(t||"").match(e);return null===o?null:0===(r=60*(n=((o[o.length-1]||[])+"").match(dr)||["-",0,0])[1]+Pe(n[2]))?0:"+"===n[0]?r:-r}function pr(e,t){var n,o;return t._isUTC?(n=t.clone(),o=(C(e)||d(e)?e.valueOf():Kn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+o),r.updateOffset(n,!1),n):Kn(e).local()}function hr(e){return-Math.round(e._d.getTimezoneOffset())}function mr(e,t,n){var o,a=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=fr(xe,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(o=hr(this)),this._offset=e,this._isUTC=!0,null!=o&&this.add(o,"m"),a!==e&&(!t||this._changeInProgress?Dr(this,Or(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:hr(this)}function gr(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function yr(e){return this.utcOffset(0,e)}function vr(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(hr(this),"m")),this}function br(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=fr(we,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function wr(e){return!!this.isValid()&&(e=e?Kn(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function xr(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Sr(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return x(t,this),(t=qn(t))._a?(e=t._isUTC?h(t._a):Kn(t._a),this._isDSTShifted=this.isValid()&&ur(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Cr(){return!!this.isValid()&&!this._isUTC}function kr(){return!!this.isValid()&&this._isUTC}function _r(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Er=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,jr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Or(e,t){var n,r,o,a=e,i=null;return sr(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:c(e)||!isNaN(+e)?(a={},t?a[t]=+e:a.milliseconds=+e):(i=Er.exec(e))?(n="-"===i[1]?-1:1,a={y:0,d:Pe(i[ze])*n,h:Pe(i[$e])*n,m:Pe(i[He])*n,s:Pe(i[Ve])*n,ms:Pe(lr(1e3*i[Be]))*n}):(i=jr.exec(e))?(n="-"===i[1]?-1:1,a={y:Nr(i[2],n),M:Nr(i[3],n),w:Nr(i[4],n),d:Nr(i[5],n),h:Nr(i[6],n),m:Nr(i[7],n),s:Nr(i[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(o=Pr(Kn(a.from),Kn(a.to)),(a={}).ms=o.milliseconds,a.M=o.months),r=new ir(a),sr(e)&&s(e,"_locale")&&(r._locale=e._locale),sr(e)&&s(e,"_isValid")&&(r._isValid=e._isValid),r}function Nr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Rr(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Pr(e,t){var n;return e.isValid()&&t.isValid()?(t=pr(t,e),e.isBefore(t)?n=Rr(e,t):((n=Rr(t,e)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Tr(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(O(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=n,n=r,r=o),Dr(this,Or(n,r),e),this}}function Dr(e,t,n,o){var a=t._milliseconds,i=lr(t._days),s=lr(t._months);e.isValid()&&(o=null==o||o,s&&ft(e,Xe(e,"Month")+s*n),i&&Ze(e,"Date",Xe(e,"Date")+i*n),a&&e._d.setTime(e._d.valueOf()+a*n),o&&r.updateOffset(e,i||s))}Or.fn=ir.prototype,Or.invalid=ar;var Mr=Tr(1,"add"),Ir=Tr(-1,"subtract");function Ar(e){return"string"==typeof e||e instanceof String}function Fr(e){return C(e)||d(e)||Ar(e)||c(e)||zr(e)||Lr(e)||null==e}function Lr(e){var t,n,r=i(e)&&!l(e),o=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],u=a.length;for(t=0;t<u;t+=1)n=a[t],o=o||s(e,n);return r&&o}function zr(e){var t=a(e),n=!1;return t&&(n=0===e.filter(function(t){return!c(t)&&Ar(e)}).length),t&&n}function $r(e){var t,n,r=i(e)&&!l(e),o=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<a.length;t+=1)n=a[t],o=o||s(e,n);return r&&o}function Hr(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Vr(e,t){1===arguments.length&&(arguments[0]?Fr(arguments[0])?(e=arguments[0],t=void 0):$r(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Kn(),o=pr(n,this).startOf("day"),a=r.calendarFormat(this,o)||"sameElse",i=t&&(N(t[a])?t[a].call(this,n):t[a]);return this.format(i||this.localeData().calendar(a,this,Kn(n)))}function Br(){return new S(this)}function Ur(e,t){var n=C(e)?e:Kn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Wr(e,t){var n=C(e)?e:Kn(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function qr(e,t,n,r){var o=C(e)?e:Kn(e),a=C(t)?t:Kn(t);return!!(this.isValid()&&o.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))}function Yr(e,t){var n,r=C(e)?e:Kn(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=ne(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function Gr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Kr(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Qr(e,t,n){var r,o,a;if(!this.isValid())return NaN;if(!(r=pr(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=ne(t)){case"year":a=Xr(this,r)/12;break;case"month":a=Xr(this,r);break;case"quarter":a=Xr(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-o)/864e5;break;case"week":a=(this-r-o)/6048e5;break;default:a=this-r}return n?a:Re(a)}function Xr(e,t){if(e.date()<t.date())return-Xr(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function Zr(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Jr(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?B(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):N(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",B(n,"Z")):B(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function eo(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,o="moment",a="";return this.isLocal()||(o=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),e="["+o+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=a+'[")]',this.format(e+t+n+r)}function to(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=B(this,e);return this.localeData().postformat(t)}function no(e,t){return this.isValid()&&(C(e)&&e.isValid()||Kn(e).isValid())?Or({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ro(e){return this.from(Kn(),e)}function oo(e,t){return this.isValid()&&(C(e)&&e.isValid()||Kn(e).isValid())?Or({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ao(e){return this.to(Kn(),e)}function io(e){var t;return void 0===e?this._locale._abbr:(null!=(t=vn(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var so=_("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function lo(){return this._locale}var uo=1e3,co=60*uo,fo=60*co,po=3506328*fo;function ho(e,t){return(e%t+t)%t}function mo(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-po:new Date(e,t,n).valueOf()}function go(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-po:Date.UTC(e,t,n)}function yo(e){var t,n;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?go:mo,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=ho(t+(this._isUTC?0:this.utcOffset()*co),fo);break;case"minute":t=this._d.valueOf(),t-=ho(t,co);break;case"second":t=this._d.valueOf(),t-=ho(t,uo)}return this._d.setTime(t),r.updateOffset(this,!0),this}function vo(e){var t,n;if(void 0===(e=ne(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?go:mo,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=fo-ho(t+(this._isUTC?0:this.utcOffset()*co),fo)-1;break;case"minute":t=this._d.valueOf(),t+=co-ho(t,co)-1;break;case"second":t=this._d.valueOf(),t+=uo-ho(t,uo)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function bo(){return this._d.valueOf()-6e4*(this._offset||0)}function wo(){return Math.floor(this.valueOf()/1e3)}function xo(){return new Date(this.valueOf())}function So(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Co(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function ko(){return this.isValid()?this.toISOString():null}function _o(){return y(this)}function Eo(){return p({},g(this))}function jo(){return g(this).overflow}function Oo(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function No(e,t){var n,o,a,i=this._eras||vn("en")._eras;for(n=0,o=i.length;n<o;++n)switch("string"==typeof i[n].since&&(a=r(i[n].since).startOf("day"),i[n].since=a.valueOf()),typeof i[n].until){case"undefined":i[n].until=1/0;break;case"string":a=r(i[n].until).startOf("day").valueOf(),i[n].until=a.valueOf()}return i}function Ro(e,t,n){var r,o,a,i,s,l=this.eras();for(e=e.toUpperCase(),r=0,o=l.length;r<o;++r)if(a=l[r].name.toUpperCase(),i=l[r].abbr.toUpperCase(),s=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(i===e)return l[r];break;case"NNNN":if(a===e)return l[r];break;case"NNNNN":if(s===e)return l[r]}else if([a,i,s].indexOf(e)>=0)return l[r]}function Po(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function To(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}function Do(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""}function Mo(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""}function Io(){var e,t,n,o,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=a[e].since<=a[e].until?1:-1,o=this.clone().startOf("day").valueOf(),a[e].since<=o&&o<=a[e].until||a[e].until<=o&&o<=a[e].since)return(this.year()-r(a[e].since).year())*n+a[e].offset;return this.year()}function Ao(e){return s(this,"_erasNameRegex")||Bo.call(this),e?this._erasNameRegex:this._erasRegex}function Fo(e){return s(this,"_erasAbbrRegex")||Bo.call(this),e?this._erasAbbrRegex:this._erasRegex}function Lo(e){return s(this,"_erasNarrowRegex")||Bo.call(this),e?this._erasNarrowRegex:this._erasRegex}function zo(e,t){return t.erasAbbrRegex(e)}function $o(e,t){return t.erasNameRegex(e)}function Ho(e,t){return t.erasNarrowRegex(e)}function Vo(e,t){return t._eraYearOrdinalRegex||ve}function Bo(){var e,t,n,r,o,a=[],i=[],s=[],l=[],u=this.eras();for(e=0,t=u.length;e<t;++e)n=Ne(u[e].name),r=Ne(u[e].abbr),o=Ne(u[e].narrow),i.push(n),a.push(r),s.push(o),l.push(n),l.push(r),l.push(o);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+s.join("|")+")","i")}function Uo(e,t){$(0,[e,e.length],0,t)}function Wo(e){return Xo.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function qo(e){return Xo.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Yo(){return Ct(this.year(),1,4)}function Go(){return Ct(this.isoWeekYear(),1,4)}function Ko(){var e=this.localeData()._week;return Ct(this.year(),e.dow,e.doy)}function Qo(){var e=this.localeData()._week;return Ct(this.weekYear(),e.dow,e.doy)}function Xo(e,t,n,r,o){var a;return null==e?St(this,r,o).year:(t>(a=Ct(e,r,o))&&(t=a),Zo.call(this,e,t,n,r,o))}function Zo(e,t,n,r,o){var a=xt(e,t,n,r,o),i=bt(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}function Jo(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}$("N",0,0,"eraAbbr"),$("NN",0,0,"eraAbbr"),$("NNN",0,0,"eraAbbr"),$("NNNN",0,0,"eraName"),$("NNNNN",0,0,"eraNarrow"),$("y",["y",1],"yo","eraYear"),$("y",["yy",2],0,"eraYear"),$("y",["yyy",3],0,"eraYear"),$("y",["yyyy",4],0,"eraYear"),Ee("N",zo),Ee("NN",zo),Ee("NNN",zo),Ee("NNNN",$o),Ee("NNNNN",Ho),De(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?g(n).era=o:g(n).invalidEra=e}),Ee("y",ve),Ee("yy",ve),Ee("yyy",ve),Ee("yyyy",ve),Ee("yo",Vo),De(["y","yy","yyy","yyyy"],Fe),De(["yo"],function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Fe]=n._locale.eraYearOrdinalParse(e,o):t[Fe]=parseInt(e,10)}),$(0,["gg",2],0,function(){return this.weekYear()%100}),$(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Uo("gggg","weekYear"),Uo("ggggg","weekYear"),Uo("GGGG","isoWeekYear"),Uo("GGGGG","isoWeekYear"),Ee("G",be),Ee("g",be),Ee("GG",fe,le),Ee("gg",fe,le),Ee("GGGG",ge,ce),Ee("gggg",ge,ce),Ee("GGGGG",ye,de),Ee("ggggg",ye,de),Me(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=Pe(e)}),Me(["gg","GG"],function(e,t,n,o){t[o]=r.parseTwoDigitYear(e)}),$("Q",0,"Qo","quarter"),Ee("Q",se),De("Q",function(e,t){t[Le]=3*(Pe(e)-1)}),$("D",["DD",2],"Do","date"),Ee("D",fe,ke),Ee("DD",fe,le),Ee("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),De(["D","DD"],ze),De("Do",function(e,t){t[ze]=Pe(e.match(fe)[0])});var ea=Qe("Date",!0);function ta(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}$("DDD",["DDDD",3],"DDDo","dayOfYear"),Ee("DDD",me),Ee("DDDD",ue),De(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Pe(e)}),$("m",["mm",2],0,"minute"),Ee("m",fe,_e),Ee("mm",fe,le),De(["m","mm"],He);var na=Qe("Minutes",!1);$("s",["ss",2],0,"second"),Ee("s",fe,_e),Ee("ss",fe,le),De(["s","ss"],Ve);var ra,oa,aa=Qe("Seconds",!1);for($("S",0,0,function(){return~~(this.millisecond()/100)}),$(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),$(0,["SSS",3],0,"millisecond"),$(0,["SSSS",4],0,function(){return 10*this.millisecond()}),$(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),$(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),$(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),$(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),$(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),Ee("S",me,se),Ee("SS",me,le),Ee("SSS",me,ue),ra="SSSS";ra.length<=9;ra+="S")Ee(ra,ve);function ia(e,t){t[Be]=Pe(1e3*("0."+e))}for(ra="S";ra.length<=9;ra+="S")De(ra,ia);function sa(){return this._isUTC?"UTC":""}function la(){return this._isUTC?"Coordinated Universal Time":""}oa=Qe("Milliseconds",!1),$("z",0,0,"zoneAbbr"),$("zz",0,0,"zoneName");var ua=S.prototype;function ca(e){return Kn(1e3*e)}function da(){return Kn.apply(null,arguments).parseZone()}function fa(e){return e}ua.add=Mr,ua.calendar=Vr,ua.clone=Br,ua.diff=Qr,ua.endOf=vo,ua.format=to,ua.from=no,ua.fromNow=ro,ua.to=oo,ua.toNow=ao,ua.get=Je,ua.invalidAt=jo,ua.isAfter=Ur,ua.isBefore=Wr,ua.isBetween=qr,ua.isSame=Yr,ua.isSameOrAfter=Gr,ua.isSameOrBefore=Kr,ua.isValid=_o,ua.lang=so,ua.locale=io,ua.localeData=lo,ua.max=Xn,ua.min=Qn,ua.parsingFlags=Eo,ua.set=et,ua.startOf=yo,ua.subtract=Ir,ua.toArray=So,ua.toObject=Co,ua.toDate=xo,ua.toISOString=Jr,ua.inspect=eo,"undefined"!=typeof Symbol&&null!=Symbol.for&&(ua[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ua.toJSON=ko,ua.toString=Zr,ua.unix=wo,ua.valueOf=bo,ua.creationData=Oo,ua.eraName=To,ua.eraNarrow=Do,ua.eraAbbr=Mo,ua.eraYear=Io,ua.year=Ge,ua.isLeapYear=Ke,ua.weekYear=Wo,ua.isoWeekYear=qo,ua.quarter=ua.quarters=Jo,ua.month=pt,ua.daysInMonth=ht,ua.week=ua.weeks=Ot,ua.isoWeek=ua.isoWeeks=Nt,ua.weeksInYear=Ko,ua.weeksInWeekYear=Qo,ua.isoWeeksInYear=Yo,ua.isoWeeksInISOWeekYear=Go,ua.date=ea,ua.day=ua.days=Ut,ua.weekday=Wt,ua.isoWeekday=qt,ua.dayOfYear=ta,ua.hour=ua.hours=rn,ua.minute=ua.minutes=na,ua.second=ua.seconds=aa,ua.millisecond=ua.milliseconds=oa,ua.utcOffset=mr,ua.utc=yr,ua.local=vr,ua.parseZone=br,ua.hasAlignedHourOffset=wr,ua.isDST=xr,ua.isLocal=Cr,ua.isUtcOffset=kr,ua.isUtc=_r,ua.isUTC=_r,ua.zoneAbbr=sa,ua.zoneName=la,ua.dates=_("dates accessor is deprecated. Use date instead.",ea),ua.months=_("months accessor is deprecated. Use month instead",pt),ua.years=_("years accessor is deprecated. Use year instead",Ge),ua.zone=_("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",gr),ua.isDSTShifted=_("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Sr);var pa=T.prototype;function ha(e,t,n,r){var o=vn(),a=h().set(r,t);return o[n](a,e)}function ma(e,t,n){if(c(e)&&(t=e,e=void 0),e=e||"",null!=t)return ha(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=ha(e,r,n,"month");return o}function ga(e,t,n,r){"boolean"==typeof e?(c(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,c(t)&&(n=t,t=void 0),t=t||"");var o,a=vn(),i=e?a._week.dow:0,s=[];if(null!=n)return ha(t,(n+i)%7,r,"day");for(o=0;o<7;o++)s[o]=ha(t,(o+i)%7,r,"day");return s}function ya(e,t){return ma(e,t,"months")}function va(e,t){return ma(e,t,"monthsShort")}function ba(e,t,n){return ga(e,t,n,"weekdays")}function wa(e,t,n){return ga(e,t,n,"weekdaysShort")}function xa(e,t,n){return ga(e,t,n,"weekdaysMin")}pa.calendar=M,pa.longDateFormat=q,pa.invalidDate=G,pa.ordinal=X,pa.preparse=fa,pa.postformat=fa,pa.relativeTime=J,pa.pastFuture=ee,pa.set=R,pa.eras=No,pa.erasParse=Ro,pa.erasConvertYear=Po,pa.erasAbbrRegex=Fo,pa.erasNameRegex=Ao,pa.erasNarrowRegex=Lo,pa.months=lt,pa.monthsShort=ut,pa.monthsParse=dt,pa.monthsRegex=gt,pa.monthsShortRegex=mt,pa.week=kt,pa.firstDayOfYear=jt,pa.firstDayOfWeek=Et,pa.weekdays=zt,pa.weekdaysMin=Ht,pa.weekdaysShort=$t,pa.weekdaysParse=Bt,pa.weekdaysRegex=Yt,pa.weekdaysShortRegex=Gt,pa.weekdaysMinRegex=Kt,pa.isPM=tn,pa.meridiem=on,mn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===Pe(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=_("moment.lang is deprecated. Use moment.locale instead.",mn),r.langData=_("moment.langData is deprecated. Use moment.localeData instead.",vn);var Sa=Math.abs;function Ca(){var e=this._data;return this._milliseconds=Sa(this._milliseconds),this._days=Sa(this._days),this._months=Sa(this._months),e.milliseconds=Sa(e.milliseconds),e.seconds=Sa(e.seconds),e.minutes=Sa(e.minutes),e.hours=Sa(e.hours),e.months=Sa(e.months),e.years=Sa(e.years),this}function ka(e,t,n,r){var o=Or(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function _a(e,t){return ka(this,e,t,1)}function Ea(e,t){return ka(this,e,t,-1)}function ja(e){return e<0?Math.floor(e):Math.ceil(e)}function Oa(){var e,t,n,r,o,a=this._milliseconds,i=this._days,s=this._months,l=this._data;return a>=0&&i>=0&&s>=0||a<=0&&i<=0&&s<=0||(a+=864e5*ja(Ra(s)+i),i=0,s=0),l.milliseconds=a%1e3,e=Re(a/1e3),l.seconds=e%60,t=Re(e/60),l.minutes=t%60,n=Re(t/60),l.hours=n%24,i+=Re(n/24),s+=o=Re(Na(i)),i-=ja(Ra(o)),r=Re(s/12),s%=12,l.days=i,l.months=s,l.years=r,this}function Na(e){return 4800*e/146097}function Ra(e){return 146097*e/4800}function Pa(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=ne(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Na(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Ra(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function Ta(e){return function(){return this.as(e)}}var Da=Ta("ms"),Ma=Ta("s"),Ia=Ta("m"),Aa=Ta("h"),Fa=Ta("d"),La=Ta("w"),za=Ta("M"),$a=Ta("Q"),Ha=Ta("y"),Va=Da;function Ba(){return Or(this)}function Ua(e){return e=ne(e),this.isValid()?this[e+"s"]():NaN}function Wa(e){return function(){return this.isValid()?this._data[e]:NaN}}var qa=Wa("milliseconds"),Ya=Wa("seconds"),Ga=Wa("minutes"),Ka=Wa("hours"),Qa=Wa("days"),Xa=Wa("months"),Za=Wa("years");function Ja(){return Re(this.days()/7)}var ei=Math.round,ti={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ni(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}function ri(e,t,n,r){var o=Or(e).abs(),a=ei(o.as("s")),i=ei(o.as("m")),s=ei(o.as("h")),l=ei(o.as("d")),u=ei(o.as("M")),c=ei(o.as("w")),d=ei(o.as("y")),f=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||i<=1&&["m"]||i<n.m&&["mm",i]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(f=f||c<=1&&["w"]||c<n.w&&["ww",c]),(f=f||u<=1&&["M"]||u<n.M&&["MM",u]||d<=1&&["y"]||["yy",d])[2]=t,f[3]=+e>0,f[4]=r,ni.apply(null,f)}function oi(e){return void 0===e?ei:"function"==typeof e&&(ei=e,!0)}function ai(e,t){return void 0!==ti[e]&&(void 0===t?ti[e]:(ti[e]=t,"s"===e&&(ti.ss=t-1),!0))}function ii(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,o=!1,a=ti;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(o=e),"object"==typeof t&&(a=Object.assign({},ti,t),null!=t.s&&null==t.ss&&(a.ss=t.s-1)),r=ri(this,!o,a,n=this.localeData()),o&&(r=n.pastFuture(+this,r)),n.postformat(r)}var si=Math.abs;function li(e){return(e>0)-(e<0)||+e}function ui(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,o,a,i,s,l=si(this._milliseconds)/1e3,u=si(this._days),c=si(this._months),d=this.asSeconds();return d?(e=Re(l/60),t=Re(e/60),l%=60,e%=60,n=Re(c/12),c%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=d<0?"-":"",a=li(this._months)!==li(d)?"-":"",i=li(this._days)!==li(d)?"-":"",s=li(this._milliseconds)!==li(d)?"-":"",o+"P"+(n?a+n+"Y":"")+(c?a+c+"M":"")+(u?i+u+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+r+"S":"")):"P0D"}var ci=ir.prototype;return ci.isValid=or,ci.abs=Ca,ci.add=_a,ci.subtract=Ea,ci.as=Pa,ci.asMilliseconds=Da,ci.asSeconds=Ma,ci.asMinutes=Ia,ci.asHours=Aa,ci.asDays=Fa,ci.asWeeks=La,ci.asMonths=za,ci.asQuarters=$a,ci.asYears=Ha,ci.valueOf=Va,ci._bubble=Oa,ci.clone=Ba,ci.get=Ua,ci.milliseconds=qa,ci.seconds=Ya,ci.minutes=Ga,ci.hours=Ka,ci.days=Qa,ci.weeks=Ja,ci.months=Xa,ci.years=Za,ci.humanize=ii,ci.toISOString=ui,ci.toString=ui,ci.toJSON=ui,ci.locale=io,ci.localeData=lo,ci.toIsoString=_("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ui),ci.lang=so,$("X",0,0,"unix"),$("x",0,0,"valueOf"),Ee("x",be),Ee("X",Se),De("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e))}),De("x",function(e,t,n){n._d=new Date(Pe(e))}),
140
140
  //! moment.js
141
- r.version="2.30.1",o(Kn),r.fn=ua,r.min=Jn,r.max=er,r.now=tr,r.utc=h,r.unix=ca,r.months=ya,r.isDate=d,r.locale=mn,r.invalid=v,r.duration=Or,r.isMoment=C,r.weekdays=ba,r.parseZone=da,r.localeData=vn,r.isDuration=sr,r.monthsShort=va,r.weekdaysMin=xa,r.defineLocale=gn,r.updateLocale=yn,r.locales=bn,r.weekdaysShort=wa,r.normalizeUnits=ne,r.relativeTimeRounding=oi,r.relativeTimeThreshold=ai,r.calendarFormat=Hr,r.prototype=ua,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}(ox)),ox.exports),ix=n(ax),sx="Dialog",[lx]=sa(sx),[ux,cx]=lx(sx),dx=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=D.useRef(null),l=D.useRef(null),[u,c]=da({prop:r,defaultProp:o??!1,onChange:a,caller:sx});return m.jsx(ux,{scope:t,triggerRef:s,contentRef:l,contentId:Ka(),titleId:Ka(),descriptionId:Ka(),open:u,onOpenChange:c,onOpenToggle:D.useCallback(()=>c(e=>!e),[c]),modal:i,children:n})};dx.displayName=sx;var fx="DialogTrigger";D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cx(fx,n),a=ia(t,o.triggerRef);return m.jsx(ba.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Tx(o.open),...r,ref:a,onClick:ra(e.onClick,o.onOpenToggle)})}).displayName=fx;var px="DialogPortal",[hx,mx]=lx(px,{forceMount:void 0}),gx=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=cx(px,t);return m.jsx(hx,{scope:t,forceMount:n,children:D.Children.map(r,e=>m.jsx(cl,{present:n||a.open,children:m.jsx(ul,{asChild:!0,container:o,children:e})}))})};gx.displayName=px;var yx="DialogOverlay",vx=D.forwardRef((e,t)=>{const n=mx(yx,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=cx(yx,e.__scopeDialog);return a.modal?m.jsx(cl,{present:r||a.open,children:m.jsx(wx,{...o,ref:t})}):null});vx.displayName=yx;var bx=ha("DialogOverlay.RemoveScroll"),wx=D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cx(yx,n);return m.jsx(ku,{as:bx,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(ba.div,{"data-state":Tx(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),xx="DialogContent",Sx=D.forwardRef((e,t)=>{const n=mx(xx,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=cx(xx,e.__scopeDialog);return m.jsx(cl,{present:r||a.open,children:a.modal?m.jsx(Cx,{...o,ref:t}):m.jsx(kx,{...o,ref:t})})});Sx.displayName=xx;var Cx=D.forwardRef((e,t)=>{const n=cx(xx,e.__scopeDialog),r=D.useRef(null),o=ia(t,n.contentRef,r);return D.useEffect(()=>{const e=r.current;if(e)return Al(e)},[]),m.jsx(_x,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ra(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ra(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:ra(e.onFocusOutside,e=>e.preventDefault())})}),kx=D.forwardRef((e,t)=>{const n=cx(xx,e.__scopeDialog),r=D.useRef(!1),o=D.useRef(!1);return m.jsx(_x,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const a=t.target,i=n.triggerRef.current?.contains(a);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),_x=D.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=cx(xx,n),l=D.useRef(null),u=ia(t,l);return Ia(),m.jsxs(m.Fragment,{children:[m.jsx($a,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(Ra,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Tx(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(Ax,{titleId:s.titleId}),m.jsx(Fx,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Ex="DialogTitle",jx=D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cx(Ex,n);return m.jsx(ba.h2,{id:o.titleId,...r,ref:t})});jx.displayName=Ex;var Ox="DialogDescription",Nx=D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cx(Ox,n);return m.jsx(ba.p,{id:o.descriptionId,...r,ref:t})});Nx.displayName=Ox;var Rx="DialogClose",Px=D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cx(Rx,n);return m.jsx(ba.button,{type:"button",...r,ref:t,onClick:ra(e.onClick,()=>o.onOpenChange(!1))})});function Tx(e){return e?"open":"closed"}Px.displayName=Rx;var Dx="DialogTitleWarning",[Mx,Ix]=function(e,t){const n=D.createContext(t),r=e=>{const{children:t,...r}=e,o=D.useMemo(()=>r,Object.values(r));return m.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=D.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}(Dx,{contentName:xx,titleName:Ex,docsSlug:"dialog"}),Ax=({titleId:e})=>{const t=Ix(Dx),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return D.useEffect(()=>{if(e){document.getElementById(e)||console.error(n)}},[n,e]),null},Fx=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ix("DialogDescriptionWarning").contentName}}.`;return D.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");if(t&&r){document.getElementById(t)||console.warn(n)}},[n,e,t]),null},Lx=dx,zx=gx,$x=vx,Hx=Sx,Vx=jx,Bx=Nx,Ux=Px;const Wx=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,qx=Dr,Yx=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return qx(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const i=Wx(t)||Wx(r);return o[e][i]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]);return qx(e,i,l,null==n?void 0:n.class,null==n?void 0:n.className)},Gx=Lx,Kx=Ux,Qx=zx,Xx=D.forwardRef(({className:e,...t},n)=>m.jsx($x,{className:Ko("fixed inset-0 z-50 bg-[#1E1E1E]/30 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Xx.displayName=$x.displayName;const Zx=Yx("fixed z-50 gap-4 bg-white p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:bg-neutral-950",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Jx=D.forwardRef(({side:e="right",className:t,children:n,...r},o)=>m.jsxs(Qx,{children:[m.jsx(Xx,{}),m.jsx(Hx,{ref:o,className:Ko(Zx({side:e}),t),...r,children:n})]}));Jx.displayName=Hx.displayName;D.forwardRef(({className:e,...t},n)=>m.jsx(Vx,{ref:n,className:Ko("text-lg font-semibold text-neutral-950 dark:text-neutral-50",e),...t})).displayName=Vx.displayName;function eS({children:e,isOpen:t,onClose:n,title:r,className:o}){const[a,i]=D.useState(!1);return m.jsx(Gx,{open:t,onOpenChange:n,children:m.jsxs(Jx,{className:Ko("p-[30px] rounded-l-xl lg:max-w-full space-y-6 overflow-auto",o,a?"w-full rounded-l-none":null),children:[m.jsxs("div",{className:"flex items-center justify-between border-b pb-2",children:[m.jsx("h1",{className:"text-gray-900 font-semibold text-xl",children:r}),m.jsxs("div",{className:"flex items-center gap-5",children:[m.jsx("button",{className:"w-9 h-9 flex items-center justify-center rounded-md hover:ring-2 ring-inset ring-dark",onClick:()=>{i(!a)},children:Jy.expand}),m.jsx(Kx,{asChild:!0,className:"w-9 h-9 rounded-md flex items-center justify-center bg-danger_light",children:m.jsxs("button",{children:[" ",M.cloneElement(Jy.close2,{fill:"#F1416C"})]})})]})]}),e]})})}function tS({children:e,className:t}){return m.jsx("div",{className:Ko("border rounded-xl py-[30px] border-gray-200 ",t),children:e})}function nS(){return m.jsxs("div",{className:"space-y-6",children:[m.jsxs("div",{className:"flex justify-between",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx(na,{className:"h-5 w-[500px] rounded-md"}),m.jsx(na,{className:"h-5 w-[500px] rounded-md"})]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx(na,{className:"h-9 w-[140px] rounded-md"}),m.jsx(na,{className:"h-9 w-[140px] rounded-md"})]})]}),m.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[m.jsxs(tS,{className:"p-4 flex flex-col gap-3",children:[m.jsx(na,{className:"flex-grow w-full rounded-md"}),m.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[m.jsx(na,{className:"h-[79px] rounded-md"}),m.jsx(na,{className:"h-[79px] rounded-md"}),m.jsx(na,{className:"h-[79px] rounded-md"})]})]}),m.jsxs("div",{className:"space-y-8 col-span-2",children:[m.jsx(na,{className:"h-9 w-full rounded-md"}),m.jsx(na,{className:"h-4 w-[326px] rounded-md"}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(na,{className:"h-3.5 w-[150px] rounded-md"}),m.jsx(na,{className:"h-10 w-full rounded-md"})]}),m.jsx(na,{className:"h-9 w-[500px] rounded-md"}),m.jsxs("div",{className:"flex gap-3",children:[m.jsx(na,{className:"h-12 w-[115px] rounded-md"}),m.jsx(na,{className:"h-12 w-[150px] rounded-md"}),m.jsx(na,{className:"h-12 w-[171px] rounded-md"})]}),m.jsx(na,{className:"h-3.5 w-[337px] rounded-md"})]})]}),m.jsxs("div",{className:"flex gap-4",children:[m.jsx(na,{className:"h-3.5 w-[140px] rounded-md"}),m.jsx(na,{className:"h-3.5 w-[140px] rounded-md"})]}),m.jsx("div",{className:"grid grid-cols-4 gap-3",children:[1,2,3,4].map((e,t)=>m.jsxs("div",{className:"border rounded-xl border-gray-200 p-4 gap-4 flex flex-col",children:[m.jsx(na,{className:"h-3.5 w-[140px] rounded-md"}),m.jsx(na,{className:"h-10 w-[200px] rounded-md"})]},t))}),m.jsx("div",{className:"space-y-6",children:[1,2,3,4].map((e,t)=>m.jsxs("div",{className:" gap-4 flex flex-col",children:[m.jsx(na,{className:"h-3.5 w-[140px] rounded-md"}),m.jsx(na,{className:"h-[163px] w-[896px] rounded-md"})]},t))})]})}D.forwardRef(({className:e,...t},n)=>m.jsx(Bx,{ref:n,className:Ko("text-sm text-neutral-500 dark:text-neutral-400",e),...t})).displayName=Bx.displayName;var rS="https://unpkg.com/@simpoobusiness/sdk/dist/assets/placeholder-imageaf93498c918127fb.svg";function oS({images:e}){return m.jsxs(tS,{className:"p-5 flex flex-col gap-2.5",children:[m.jsx("div",{className:"relative flex-grow",children:m.jsx("img",{src:e?.[0]??rS,sizes:"100%",alt:"item image",draggable:!1,className:"rounded-xl object-cover w-full h-full"})}),m.jsx("div",{className:"flex gap-4 overflow-auto",children:e.filter((e,t)=>0!==t).map((e,t)=>m.jsx("div",{className:"w-[89px] h-[79px] relative shrink-0",children:m.jsx("img",{src:e??rS,alt:"item image",draggable:!1,className:"rounded-xl object-cover h-full w-full"})},t))})]})}var aS=Symbol.for("react.lazy"),iS=I[" use ".trim().toString()];function sS(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===aS&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function lS(e){const t=D.forwardRef((e,t)=>{let{children:n,...r}=e;if(sS(n)&&"function"==typeof iS&&(n=iS(n._payload)),D.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==D.Fragment&&(o.ref=t?aa(t,e):e),D.cloneElement(n,o)}return D.Children.count(n)>1?D.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var uS=Symbol("radix.slottable");function cS(e){return D.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===uS}var dS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=function(e){const t=lS(e),n=D.forwardRef((e,n)=>{let{children:r,...o}=e;sS(r)&&"function"==typeof iS&&(r=iS(r._payload));const a=D.Children.toArray(r),i=a.find(cS);if(i){const e=i.props.children,r=a.map(t=>t===i?D.Children.count(e)>1?D.Children.only(null):D.isValidElement(e)?e.props.children:null:t);return m.jsx(t,{...o,ref:n,children:D.isValidElement(e)?D.cloneElement(e,void 0,r):null})}return m.jsx(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}(`Primitive.${t}`),r=D.forwardRef((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),m.jsx(i,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),fS="horizontal",pS=["horizontal","vertical"],hS=D.forwardRef((e,t)=>{const{decorative:n,orientation:r=fS,...o}=e,a=function(e){return pS.includes(e)}(r)?r:fS,i=n?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return m.jsx(dS.div,{"data-orientation":a,...i,...o,ref:t})});hS.displayName="Separator";var mS=hS;const gS=D.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>m.jsx(mS,{ref:o,decorative:n,orientation:t,className:Ko("shrink-0 bg-gray-300 dark:bg-neutral-800","horizontal"===t?"h-[1px] w-full":"h-full w-[1px]",e),...r}));function yS({data:e,printLabel:t}){const n=[{tag:"reorder level",value:`${e?.reorder_level} ${e?.unit_resource?.name}`},{tag:"packing groups",value:`${e?.item_group?.length} group(s)`},{tag:"variations",value:`${e?.variation?.length} variable(s)`},{tag:"extras",value:`${e?.extras?.length} extras`}];return m.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[m.jsx(oS,{images:e?.images?.map(e=>e.image)}),m.jsxs("div",{className:"col-span-2 flex flex-col gap-9",children:[m.jsxs("div",{className:"flex gap-4 bg-primary_light p-2.5 rounded-md",children:[m.jsxs("p",{className:"text-gray-700 text-sm font-medium",children:["Cost price:"," ",m.jsx("span",{className:"text-dark font-bold text-[15px]",children:rv(Number(e?.cost_price))})]}),m.jsxs("p",{className:"text-gray-700 text-sm font-medium",children:["Selling price:"," ",e?.duplicate_prices?.map((t,n)=>m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-dark font-bold text-[15px] px-2",children:rv(Number(t.selling_price))},n),n<e?.duplicate_prices?.length-1&&"-"]}))]})]}),m.jsxs("div",{className:"flex gap-2.5",children:[m.jsxs("p",{className:"text-gray-800 text-sm font-medium",children:["In stock:"," ",m.jsxs("span",{className:"text-dark font-bold text-[15px]",children:[ov(Number(e?.quantity))," ",e?.item_unit]})]}),"|",m.jsxs("p",{className:"text-gray-700 text-sm font-medium",children:["Total sold:"," ",m.jsxs("span",{className:"text-dark font-bold text-[15px]",children:[ov(e?.total_sold)," ",e?.item_unit]})]})]}),m.jsxs("div",{className:"space-y-2.5",children:[m.jsx("h2",{className:"text-gray-800 text-sm font-bold",children:"Description"}),m.jsx("p",{className:"text-gray-800 font-normal text-sm",children:e?.description??"No description..."})]}),m.jsx("div",{className:"flex gap-5 items-center",children:n.map((e,t)=>m.jsxs("div",{className:"flex gap-5 items-center",children:[m.jsxs("div",{className:"flex flex-col gap-2.5",children:[m.jsx("p",{className:"text-dark font-medium text-sm first-letter:uppercase",children:e.tag}),m.jsx("p",{className:"text-primary",children:e.value})]}),t<n.length-1&&m.jsx(gS,{className:"bg-[#7E8299] h-[30px] w-[1px]"})]},t))}),m.jsxs("div",{className:"flex gap-2.5 items-center",children:[m.jsxs("p",{className:"text-gray-700 text-sm font-medium flex gap-2",children:["Category:"," ",e?.category?.map((e,t)=>m.jsxs("span",{className:"text-dark font-normal text-[15px]",children:[e.name," "]},t))]}),m.jsx(gS,{className:"bg-[#7E8299] h-[14px] w-[1px]"}),m.jsxs("p",{className:"text-gray-700 text-sm font-medium",children:["Collection:"," ",e?.item_tags?.map((e,t)=>m.jsx("span",{className:"text-dark font-normal text-[15px]",children:e.name},t))]})]})]})]})}gS.displayName=mS.displayName;var vS=.999,bS=/[\\\/_+.#"@\[\(\{&]/,wS=/[\\\/_+.#"@\[\(\{&]/g,xS=/[\s-]/,SS=/[\s-]/g;function CS(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?1:.99;var s=`${o},${a}`;if(void 0!==i[s])return i[s];for(var l,u,c,d,f=r.charAt(a),p=n.indexOf(f,o),h=0;p>=0;)(l=CS(e,t,n,r,p+1,a+1,i))>h&&(p===o?l*=1:bS.test(e.charAt(p-1))?(l*=.8,(c=e.slice(o,p-1).match(wS))&&o>0&&(l*=Math.pow(vS,c.length))):xS.test(e.charAt(p-1))?(l*=.9,(d=e.slice(o,p-1).match(SS))&&o>0&&(l*=Math.pow(vS,d.length))):(l*=.17,o>0&&(l*=Math.pow(vS,p-o))),e.charAt(p)!==t.charAt(a)&&(l*=.9999)),(l<.1&&n.charAt(p-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(p-1)!==r.charAt(a))&&(.1*(u=CS(e,t,n,r,p+1,a+2,i))>l&&(l=.1*u)),l>h&&(h=l),p=n.indexOf(f,p+1);return i[s]=h,h}function kS(e){return e.toLowerCase().replace(SS," ")}function _S(e,t,n){return CS(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,kS(e),kS(t),0,0,{})}var ES='[cmdk-group=""]',jS='[cmdk-group-items=""]',OS='[cmdk-item=""]',NS=`${OS}:not([aria-disabled="true"])`,RS="cmdk-item-select",PS="data-value",TS=(e,t,n)=>_S(e,t,n),DS=D.createContext(void 0),MS=()=>D.useContext(DS),IS=D.createContext(void 0),AS=()=>D.useContext(IS),FS=D.createContext(void 0),LS=D.forwardRef((e,t)=>{let n=ZS(()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=ZS(()=>new Set),o=ZS(()=>new Map),a=ZS(()=>new Map),i=ZS(()=>new Set),s=QS(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:h,disablePointerSelection:m=!1,vimBindings:g=!0,...y}=e,v=Ka(),b=Ka(),w=Ka(),x=D.useRef(null),S=tC();XS(()=>{if(void 0!==c){let e=c.trim();n.current.value=e,C.emit()}},[c]),XS(()=>{S(6,N)},[]);let C=D.useMemo(()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,a,i,l;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)O(),E(),S(1,j);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(w);e?e.focus():null==(o=document.getElementById(v))||o.focus()}if(S(7,()=>{var e;n.current.selectedItemId=null==(e=R())?void 0:e.id,C.emit()}),r||S(5,N),void 0!==(null==(a=s.current)?void 0:a.value)){let e=null!=t?t:"";return void(null==(l=(i=s.current).onValueChange)||l.call(i,e))}}C.emit()}},emit:()=>{i.current.forEach(e=>e())}}),[]),k=D.useMemo(()=>({value:(e,t,r)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,_(t,r)),S(2,()=>{E(),C.emit()}))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),S(3,()=>{O(),E(),n.current.value||j(),C.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=R();S(4,()=>{O(),(null==t?void 0:t.getAttribute("id"))===e&&j(),C.emit()})}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{a.current.delete(e),o.current.delete(e)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:w,labelId:b,listInnerRef:x}),[]);function _(e,t){var r,o;let a=null!=(o=null==(r=s.current)?void 0:r.filter)?o:TS;return e?a(e,n.current.search,t):0}function E(){if(!n.current.search||!1===s.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=o.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;P().sort((t,n)=>{var r,o;let a=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(r=e.get(i))?r:0)-(null!=(o=e.get(a))?o:0)}).forEach(e=>{let t=e.closest(jS);t?t.appendChild(e.parentElement===t?e:e.closest(`${jS} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${jS} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let n=null==(t=x.current)?void 0:t.querySelector(`${ES}[${PS}="${encodeURIComponent(e[0])}"]`);null==n||n.parentElement.appendChild(n)})}function j(){let e=P().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(PS);C.setState("value",t||void 0)}function O(){var e,t,i,l;if(!n.current.search||!1===s.current.shouldFilter)return void(n.current.filtered.count=r.current.size);n.current.filtered.groups=new Set;let u=0;for(let o of r.current){let r=_(null!=(t=null==(e=a.current.get(o))?void 0:e.value)?t:"",null!=(l=null==(i=a.current.get(o))?void 0:i.keywords)?l:[]);n.current.filtered.items.set(o,r),r>0&&u++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=u}function N(){var e,t,n;let r=R();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(ES))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function R(){var e;return null==(e=x.current)?void 0:e.querySelector(`${OS}[aria-selected="true"]`)}function P(){var e;return Array.from((null==(e=x.current)?void 0:e.querySelectorAll(NS))||[])}function T(e){let t=P()[e];t&&C.setState("value",t.getAttribute(PS))}function M(e){var t;let n=R(),r=P(),o=r.findIndex(e=>e===n),a=r[o+e];null!=(t=s.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&C.setState("value",a.getAttribute(PS))}function I(e){let t,n=R(),r=null==n?void 0:n.closest(ES);for(;r&&!t;)r=e>0?GS(r,ES):KS(r,ES),t=null==r?void 0:r.querySelector(NS);t?C.setState("value",t.getAttribute(PS)):M(e)}let A=()=>T(P().length-1),F=e=>{e.preventDefault(),e.metaKey?A():e.altKey?I(1):M(1)},L=e=>{e.preventDefault(),e.metaKey?T(0):e.altKey?I(-1):M(-1)};return D.createElement(ba.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=y.onKeyDown)||t.call(y,e);let n=e.nativeEvent.isComposing||229===e.keyCode;if(!e.defaultPrevented&&!n)switch(e.key){case"n":case"j":g&&e.ctrlKey&&F(e);break;case"ArrowDown":F(e);break;case"p":case"k":g&&e.ctrlKey&&L(e);break;case"ArrowUp":L(e);break;case"Home":e.preventDefault(),T(0);break;case"End":e.preventDefault(),A();break;case"Enter":{e.preventDefault();let t=R();if(t){let e=new Event(RS);t.dispatchEvent(e)}}}}},D.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:rC},l),nC(e,e=>D.createElement(IS.Provider,{value:C},D.createElement(DS.Provider,{value:k},e))))}),zS=D.forwardRef((e,t)=>{var n,r;let o=Ka(),a=D.useRef(null),i=D.useContext(FS),s=MS(),l=QS(e),u=null!=(r=null==(n=l.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;XS(()=>{if(!u)return s.item(o,null==i?void 0:i.id)},[u]);let c=eC(o,a,[e.value,e.children,a],e.keywords),d=AS(),f=JS(e=>e.value&&e.value===c.current),p=JS(e=>!(!u&&!1!==s.filter())||(!e.search||e.filtered.items.get(o)>0));function h(){var e,t;m(),null==(t=(e=l.current).onSelect)||t.call(e,c.current)}function m(){d.setState("value",c.current,!0)}if(D.useEffect(()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(RS,h),()=>t.removeEventListener(RS,h)},[p,e.onSelect,e.disabled]),!p)return null;let{disabled:g,value:y,onSelect:v,forceMount:b,keywords:w,...x}=e;return D.createElement(ba.div,{ref:aa(a,t),...x,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||s.getDisablePointerSelection()?void 0:m,onClick:g?void 0:h},e.children)}),$S=D.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=Ka(),s=D.useRef(null),l=D.useRef(null),u=Ka(),c=MS(),d=JS(e=>!(!o&&!1!==c.filter())||(!e.search||e.filtered.groups.has(i)));XS(()=>c.group(i),[]),eC(i,s,[e.value,e.heading,l]);let f=D.useMemo(()=>({id:i,forceMount:o}),[o]);return D.createElement(ba.div,{ref:aa(s,t),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&D.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),nC(e,e=>D.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},D.createElement(FS.Provider,{value:f},e))))}),HS=D.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=D.useRef(null),a=JS(e=>!e.search);return n||a?D.createElement(ba.div,{ref:aa(o,t),...r,"cmdk-separator":"",role:"separator"}):null}),VS=D.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=AS(),i=JS(e=>e.search),s=JS(e=>e.selectedItemId),l=MS();return D.useEffect(()=>{null!=e.value&&a.setState("search",e.value)},[e.value]),D.createElement(ba.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":s,id:l.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||a.setState("search",e.target.value),null==n||n(e.target.value)}})}),BS=D.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=D.useRef(null),i=D.useRef(null),s=JS(e=>e.selectedItemId),l=MS();return D.useEffect(()=>{if(i.current&&a.current){let e,t=i.current,n=a.current,r=new ResizeObserver(()=>{e=requestAnimationFrame(()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")})});return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}},[]),D.createElement(ba.div,{ref:aa(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:l.listId},nC(e,e=>D.createElement("div",{ref:aa(i,l.listInnerRef),"cmdk-list-sizer":""},e)))}),US=D.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...s}=e;return D.createElement(Lx,{open:n,onOpenChange:r},D.createElement(zx,{container:i},D.createElement($x,{"cmdk-overlay":"",className:o}),D.createElement(Hx,{"aria-label":e.label,"cmdk-dialog":"",className:a},D.createElement(LS,{ref:t,...s}))))}),WS=D.forwardRef((e,t)=>JS(e=>0===e.filtered.count)?D.createElement(ba.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),qS=D.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return D.createElement(ba.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},nC(e,e=>D.createElement("div",{"aria-hidden":!0},e)))}),YS=Object.assign(LS,{List:BS,Item:zS,Input:VS,Group:$S,Separator:HS,Dialog:US,Empty:WS,Loading:qS});function GS(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function KS(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function QS(e){let t=D.useRef(e);return XS(()=>{t.current=e}),t}var XS="undefined"==typeof window?D.useEffect:D.useLayoutEffect;function ZS(e){let t=D.useRef();return void 0===t.current&&(t.current=e()),t}function JS(e){let t=AS(),n=()=>e(t.snapshot());return D.useSyncExternalStore(t.subscribe,n,n)}function eC(e,t,n,r=[]){let o=D.useRef(),a=MS();return XS(()=>{var i;let s=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),l=r.map(e=>e.trim());a.value(e,s,l),null==(i=t.current)||i.setAttribute(PS,s),o.current=s}),o}var tC=()=>{let[e,t]=D.useState(),n=ZS(()=>new Map);return XS(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function nC({asChild:e,children:t},n){return e&&D.isValidElement(t)?D.cloneElement(function(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}(t),{ref:t.ref},n(t.props.children)):n(t)}var rC={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const oC=Lx,aC=zx,iC=D.forwardRef(({className:e,...t},n)=>m.jsx($x,{ref:n,className:Ko("fixed inset-0 z-50 bg-[#1E1E1E]/30 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));iC.displayName=$x.displayName;const sC=D.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(aC,{children:[m.jsx(iC,{}),m.jsxs(Hx,{ref:r,className:Ko("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950",e),...n,children:[t,m.jsxs(Ux,{className:"hidden absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400",children:[m.jsx(Ad,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));sC.displayName=Hx.displayName;const lC=D.forwardRef(({className:e,...t},n)=>m.jsx(Vx,{ref:n,className:Ko("text-lg font-semibold leading-none tracking-tight",e),...t}));lC.displayName=Vx.displayName;const uC=D.forwardRef(({className:e,...t},n)=>m.jsx(Bx,{ref:n,className:Ko("text-sm text-neutral-500 dark:text-neutral-400",e),...t}));uC.displayName=Bx.displayName;const cC=D.forwardRef(({className:e,...t},n)=>m.jsx(YS,{ref:n,className:Ko("flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50",e),...t}));cC.displayName=YS.displayName;const dC=D.forwardRef(({className:e,...t},n)=>m.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[m.jsx(Id,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),m.jsx(YS.Input,{ref:n,className:Ko("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400",e),...t})]}));dC.displayName=YS.Input.displayName;const fC=D.forwardRef(({className:e,...t},n)=>m.jsx(YS.List,{ref:n,className:Ko("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));fC.displayName=YS.List.displayName;const pC=D.forwardRef((e,t)=>m.jsx(YS.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));pC.displayName=YS.Empty.displayName;const hC=D.forwardRef(({className:e,...t},n)=>m.jsx(YS.Group,{ref:n,className:Ko("overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:text-neutral-50 dark:[&_[cmdk-group-heading]]:text-neutral-400",e),...t}));hC.displayName=YS.Group.displayName;D.forwardRef(({className:e,...t},n)=>m.jsx(YS.Separator,{ref:n,className:Ko("-mx-1 h-px bg-neutral-200 dark:bg-neutral-800",e),...t})).displayName=YS.Separator.displayName;const mC=D.forwardRef(({className:e,...t},n)=>m.jsx(YS.Item,{ref:n,className:Ko("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-primary_light data-[selected=true]:text-primary data-[disabled=true]:opacity-50 dark:data-[selected='true']:bg-primary_light dark:data-[selected=true]:text-primary",e),...t}));mC.displayName=YS.Item.displayName;var gC="Popover",[yC]=sa(gC,[Bs]),vC=Bs(),[bC,wC]=yC(gC),xC=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,s=vC(t),l=D.useRef(null),[u,c]=D.useState(!1),[d,f]=da({prop:r,defaultProp:o??!1,onChange:a,caller:gC});return m.jsx(al,{...s,children:m.jsx(bC,{scope:t,contentId:Ka(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:D.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:u,onCustomAnchorAdd:D.useCallback(()=>c(!0),[]),onCustomAnchorRemove:D.useCallback(()=>c(!1),[]),modal:i,children:n})})};xC.displayName=gC;var SC="PopoverAnchor";D.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wC(SC,n),a=vC(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return D.useEffect(()=>(i(),()=>s()),[i,s]),m.jsx(il,{...a,...r,ref:t})}).displayName=SC;var CC="PopoverTrigger",kC=D.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wC(CC,n),a=vC(n),i=ia(t,o.triggerRef),s=m.jsx(ba.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":FC(o.open),...r,ref:i,onClick:ra(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:m.jsx(il,{asChild:!0,...a,children:s})});kC.displayName=CC;var _C="PopoverPortal",[EC,jC]=yC(_C,{forceMount:void 0}),OC=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=wC(_C,t);return m.jsx(EC,{scope:t,forceMount:n,children:m.jsx(cl,{present:n||a.open,children:m.jsx(ul,{asChild:!0,container:o,children:r})})})};OC.displayName=_C;var NC="PopoverContent",RC=D.forwardRef((e,t)=>{const n=jC(NC,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=wC(NC,e.__scopePopover);return m.jsx(cl,{present:r||a.open,children:a.modal?m.jsx(TC,{...o,ref:t}):m.jsx(DC,{...o,ref:t})})});RC.displayName=NC;var PC=ha("PopoverContent.RemoveScroll"),TC=D.forwardRef((e,t)=>{const n=wC(NC,e.__scopePopover),r=D.useRef(null),o=ia(t,r),a=D.useRef(!1);return D.useEffect(()=>{const e=r.current;if(e)return Al(e)},[]),m.jsx(ku,{as:PC,allowPinchZoom:!0,children:m.jsx(MC,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ra(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:ra(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:ra(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),DC=D.forwardRef((e,t)=>{const n=wC(NC,e.__scopePopover),r=D.useRef(!1),o=D.useRef(!1);return m.jsx(MC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const a=t.target,i=n.triggerRef.current?.contains(a);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),MC=D.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=wC(NC,n),p=vC(n);return Ia(),m.jsx($a,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(Ra,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:m.jsx(sl,{"data-state":FC(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),IC="PopoverClose",AC=D.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wC(IC,n);return m.jsx(ba.button,{type:"button",...r,ref:t,onClick:ra(e.onClick,()=>o.onOpenChange(!1))})});AC.displayName=IC;function FC(e){return e?"open":"closed"}D.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=vC(n);return m.jsx(ll,{...o,...r,ref:t})}).displayName="PopoverArrow";var LC=OC,zC=RC;const $C=xC,HC=kC,VC=D.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>m.jsx(LC,{children:m.jsx(zC,{ref:o,align:t,sideOffset:n,className:Ko("z-50 w-72 rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",e),...r})}));VC.displayName=zC.displayName;const BC=Yx("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300",{variants:{variant:{default:"bg-neutral-900 text-neutral-50 hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90",destructive:"bg-red-500 text-neutral-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/90",outline:"border border-neutral-200 bg-white hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",secondary:"bg-neutral-100 text-neutral-900 hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80",ghost:"hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",link:"text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),UC=D.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const i=r?ma:"button";return m.jsx(i,{className:Ko(BC({variant:t,size:n,className:e})),ref:a,...o})});UC.displayName="Button";const WC=({label:e,options:t=[],className:n,placeholder:r,value:o="",onValueChange:a,required:i,error:s,showSearch:l=!0,showOutline:u=!0,icon:c,info:d,optional:f,labelClass:p,actionLabel:h,actionLabelAction:g,actionLabelInfo:y,searchPlaceholder:v,disabled:b,triggerClass:w,loading:x,showError:S,onChangeSearch:C,searching:k,infoAlignment:_,align:E="start",valueClass:j})=>{const[O,N]=D.useState(""),[R,P]=D.useState(!1),[T,M]=D.useState(0),I=D.useRef(null);D.useEffect(()=>{const e=()=>{I.current&&M(I?.current?.offsetWidth)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);return m.jsx(m.Fragment,{children:x?m.jsx(na,{className:"w-full h-[48px]"}):m.jsxs("div",{className:Ko("flex flex-col gap-2.5",n),children:[m.jsxs("div",{className:Ko("flex justify-between gap-2 flex-wrap",e?null:"hidden"),children:[e&&m.jsxs("label",{className:Ko("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",p),children:[m.jsx("span",{className:"first-letter:inherit",children:e})," ",i?m.jsx("span",{className:"text-[#E12D39]",children:e&&"*"}):f?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,d&&m.jsx(kv,{fieldName:e,align:_,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:d})})]}),h&&m.jsxs("button",{onClick:g,className:"text-primary flex items-center gap-1 first-letter:uppercase text-sm font-medium",children:[h,y&&m.jsx(kv,{fieldName:h,children:m.jsx("p",{className:"font-normal first-letter:uppercase text-left",children:y})})]})]}),m.jsxs($C,{modal:!0,open:R,onOpenChange:P,children:[m.jsx(HC,{asChild:!0,children:m.jsxs(UC,{ref:I,variant:"outline",role:"combobox","aria-expanded":R,className:Ko(`w-full h-[48px] justify-between border focus:border-primary border-neutral-200 bg-white hover:bg-white hover:border-[#BFD7FE] ${(s||S)&&"!border-danger"}`,w),disabled:b,children:[m.jsx("span",{className:Ko("flex gap-2 first-letter:uppercase capitalize text-[#5E6278] justify-start truncate",o?"text-dark":null,j),children:o?(e=>{const n=t?.find(t=>t.value===e);return n?.label})(o):r??"Select..."}),m.jsx(Dd,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),m.jsx(VC,{style:{width:T},className:"min-w-[280px] p-0 bg-white rounded-xl border-gray-200",align:E,children:m.jsxs(cC,{className:"w-full",children:[l&&m.jsx(dC,{onChangeCapture:C,className:"placeholder:text-xs",placeholder:v??"Search..."}),k?m.jsx("div",{className:"flex flex-col gap-2 p-2",children:[1,2,3].map((e,t)=>m.jsx(na,{className:"h-9 rounded-md"},t))}):m.jsx(pC,{children:"No result found."}),m.jsx(hC,{children:m.jsx(fC,{className:"",children:t?.map(e=>m.jsxs(mC,{value:"string"==typeof e.label?e.label:e?.searchId,className:`first-letter:uppercase capitalize mb-1 hover:bg-primary_light w-full rounded-md hover:text-primary font-semibold text-gray-700 text-sm cursor-pointer ${o===e.value&&"bg-primary_light text-primary"}`,onSelect:()=>{a&&a(e.value),P(!1)},children:[m.jsx(Nd,{className:Ko("mr-2 h-4 w-4",o===e.value?"opacity-100":"opacity-0")}),e.label]},`${"string"==typeof e.label?e.label:e?.searchId}${e.value}`))})})]})})]}),s&&m.jsx("p",{className:"text-danger text-xs font-normal",children:s})]})})};var qC="https://unpkg.com/@simpoobusiness/sdk/dist/assets/image-placeholdere1821db1b147e2aa.png";function YC({data:e}){const[t,n]=D.useState(e?.total_selling_price||0),r=[{label:"Stock Quantity",value:ov(Number(e?.quantity)),desc:null},{label:"Total Cost",value:rv(Number(e?.total_cost_price)),desc:null},{label:"Total Selling Price",value:rv(t),desc:m.jsx(WC,{options:e?.prices?.map(e=>({label:e.priceGroup.name,value:e.selling_price.toString()})),onValueChange:e=>n(Number(e)),value:t?.toString(),triggerClass:"h-8",showSearch:!1,placeholder:"Select price"})},{label:"Profit to be made",value:rv(t-e?.total_cost_price),desc:null}],o=[{tag:"Barcode",value:e?.barcode.map(e=>e.barcode)},{tag:"SKU",value:e?.sku},{tag:"System code",value:e?.itemcode.toString()}],a=["S/N","Batch number","Quantity","Expiry date","Unit cost"],i=[{tag:"Extras",headers:["S/N","image","extra name","quantity inside ","selling price"],body:e?.extras?.map((e,t)=>m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:t+1}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:qC,className:"object-cover w-full h-full"})})}),m.jsx("td",{children:e.extra.name}),m.jsxs("td",{children:[e.quantity," ",e.extra.item_unit]}),m.jsx("td",{children:rv(Number(e.selling_price))})]},t))||[]},{tag:"Raw materials",headers:["S/N","image","material name","quantity inside ","selling price"],body:e?.material?.map((e,t)=>m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:t+1}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:qC,className:"object-cover w-full h-full"})})}),m.jsx("td",{children:e.raw_material?.name}),m.jsxs("td",{children:[e.quantity," ",e.raw_material?.item_unit]}),m.jsx("td",{children:rv(Number(e.selling_price))})]},t))},{tag:"Packing groups",headers:["S/N","image","group name","quantity inside ","selling price","Group code","print label"],body:e?.item_group?.map((t,n)=>m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:n+1}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:qC,className:"object-cover w-full h-full"})})}),m.jsx("td",{children:t.group_name}),m.jsxs("td",{children:[t.quantity," ",e.item_unit]}),m.jsx("td",{children:rv(Number(t.selling_price))}),m.jsx("td",{children:t.barcode}),m.jsx("td",{children:m.jsx("button",{className:"w-6 h-6 items-center flex justify-center",children:Jy.printer_blue})})]},n))},{tag:"Variations",headers:["S/N","image","variation","quantity ","selling price","code","print label"],body:e?.variation?.map((t,n)=>m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:n+1}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:t.image??qC,className:"object-cover w-full h-full"})})}),m.jsx("td",{children:t.variation_values.map((e,n)=>m.jsxs("span",{className:"pr-2",children:[e.attribute_value.value_name," ",t?.variation_values?.length-1>n&&"-"]},n))}),m.jsxs("td",{children:[t.quantity,e?.item_unit]}),m.jsx("td",{children:rv(Number(t.locationprices?.[0]?.selling_price))}),m.jsx("td",{children:t.barcode}),m.jsx("td",{children:m.jsx("button",{className:"w-6 h-6 items-center flex justify-center",children:Jy.printer_blue})})]},n))}];return m.jsxs("div",{className:"space-y-6",children:[m.jsx("div",{className:"grid grid-cols-4 gap-2.5",children:r.map((n,o)=>m.jsxs("div",{className:"border rounded-xl border-gray-200 p-4 gap-4 flex flex-col",children:[m.jsx("p",{className:"text-dark text-sm font-medium",children:n.label}),m.jsxs("p",{title:n.value,className:Ko("text-dark font-bold text-3xl truncate",o===r.length-1&&Number(t)-Number(e?.cost_price)<0?"text-danger":null),children:[n.value,0===o&&m.jsx("span",{className:"font-normal text-sm",children:e.item_unit})]}),n.desc]},o))}),m.jsx("div",{className:"grid grid-cols-12",children:m.jsxs("div",{className:"col-span-10 space-y-6",children:[m.jsxs("div",{className:"space-y-3",children:[m.jsx("p",{className:"border-b border-gray-300 pb-2.5 text-gray-800 font-semibold ",children:"Item codes:"}),m.jsx("div",{className:"flex gap-5",children:o.map((e,t)=>m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:Ko("flex flex-col gap-2.5"),children:[m.jsx("p",{className:"text-dark text-sm font-medium",children:e.tag}),m.jsx("p",{className:"text-gray-500 text-sm font-normal flex flex-col gap-2",children:Array.isArray(e.value)?e.value?.map((e,t)=>m.jsx("span",{children:e},t)):e.value})]},t),t<o.length-1&&m.jsx("div",{children:m.jsx(gS,{orientation:"vertical",className:"bg-[#7E8299]"})},t)]}))})]}),m.jsxs("div",{className:"space-y-3",children:[m.jsx("p",{className:"border-b border-gray-300 pb-2.5 text-gray-800 font-semibold ",children:"Suppliers:"}),m.jsx("div",{className:"flex gap-5 flex-col",children:e?.suppliers?.map((e,t)=>m.jsxs("div",{className:"bg-gray-100 rounded-xl p-[15px] space-y-[18px]",children:[m.jsxs("div",{className:"flex gap-3",children:[m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:qC,className:"object-cover w-full h-full"})}),m.jsxs("div",{className:"space-y-1 flex-grow border-b border-dashed border-gray-300 pb-1",children:[m.jsx("h1",{className:"text-dark font-semibold text-sm capitalize",children:e.name}),m.jsx("p",{className:"text-gray-700 font-medium text-[13px] capitalize"})]})]}),m.jsxs("table",{className:"table-auto w-full border-separate border-spacing-y-3",children:[m.jsx("thead",{children:m.jsx("tr",{children:a.map((e,t)=>m.jsx("th",{className:"text-left text-dark",children:e},t))})}),m.jsx("tbody",{children:m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:"1"}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:e.supplier_batch_number})}),m.jsx("td",{children:e.supplier_quantity}),m.jsx("td",{children:ix(e.supplier_expired_date).format("MMMM DD, YYYY")}),m.jsx("td",{children:rv(Number(e.supplier_price))})]})})]})]},t))})]}),i.map((e,t)=>m.jsxs("div",{className:"space-y-3",children:[m.jsxs("p",{className:"border-b border-gray-300 pb-2.5 text-gray-800 font-semibold ",children:[e.tag,": ",e.body?.length]}),e.body?.length>0?m.jsx("div",{className:"bg-gray-100 rounded-xl p-[15px] space-y-[18px]",children:m.jsxs("table",{className:"table-auto w-full border-separate border-spacing-y-3",children:[m.jsx("thead",{children:m.jsx("tr",{children:e.headers.map((e,t)=>m.jsx("th",{className:"text-left text-dark first-letter:uppercase",children:e},t))})}),m.jsx("tbody",{children:e.body})]})}):null]},t))]})})]})}const GC=[{label:"All",count:900},{label:"Active",count:10},{label:"Inactive",count:0}];function KC({tabs:e=GC,loading:t}){const[n,r]=D.useState(0);return m.jsxs("div",{className:"flex flex-col",children:[m.jsx("div",{className:"flex gap-7.5",children:e.map((e,o)=>m.jsxs("button",{className:"flex items-center gap-2.5 group relative pb-2",onClick:()=>((e,t)=>{e.link||r(t),e.action&&e.action()})(e,o),children:[m.jsx("p",{className:Ko("group-hover:text-gray-900 duration-200 text-gray-800 font-normal text-sm first-letter:uppercase",o===n?"text-gray-900 font-semibold":null),children:e.label}),t?m.jsx(na,{className:"h-[26px] rounded w-8"}):m.jsxs(m.Fragment,{children:[" ",e.count>=0?m.jsx("span",{className:Ko("rounded px-1.5 h-6.5 flex items-center text-xs font-semibold duration-200 group-hover:bg-primary_light group-hover:text-primary bg-gray-200 text-gray-500 shrink-0",o===n?"bg-primary_light text-primary":null),children:e.count}):null]}),o===n?m.jsx("div",{className:"h-[5px] rounded bg-primary absolute left-0 right-0 -bottom-[5px]"}):null]},o))}),m.jsx("div",{className:"h-[5px] rounded bg-gray-300"})]})}function QC({isOpen:e,onClose:t,itemUUID:n}){const{data:r,isFetching:o}=Jw(["single_item",n],`/items/get?item_uuid=${n}`,{enabled:e}),a=r?.data,i=[{tag:"Created",value:ix(a?.created_date).format("MMMM DD, YYYY")},{tag:"Last edited",value:ix(a?.last_update_date).format("MMMM DD, YYYY")},{tag:"Expiry",value:m.jsxs("p",{className:"",children:[" ",m.jsxs("span",{className:"text-danger",children:[a?.expired," Expired,"]})," ",m.jsxs("span",{className:"text-warning",children:[a?.expiring," Expiring"]})]})}],[s,l]=D.useState(1),u=[{label:"Item overview",action:()=>l(1)}];return D.useEffect(()=>{!e&&l(1)},[e]),m.jsx(eS,{isOpen:e,onClose:t,title:"Item View",className:"w-[1176px]",children:o?m.jsx(nS,{}):m.jsxs("div",{className:"space-y-7",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsxs("h1",{className:"text-dark text-xl font-semibold flex items-center gap-2",children:[a?.name,m.jsx("span",{className:"bg-primary_light text-primary text-xs rounded px-[7px] h-5 flex items-center capitalize",children:a?.item_type?.name})]}),m.jsx("div",{className:"flex gap-2",children:i.map((e,t)=>m.jsxs("p",{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[m.jsxs("span",{className:"text-dark",children:[e.tag,":"]})," ",e.value," ",t<2&&"|"]},t))})]}),m.jsx("div",{className:"flex gap-3"})]}),m.jsx(yS,{data:a}),m.jsx(KC,{tabs:u}),1===s?m.jsx(YC,{data:a}):null]})})}function XC({children:e,isOpen:t,onClose:n,title:r,className:o}){return m.jsx(oC,{open:t,onOpenChange:n,children:m.jsxs(sC,{className:Ko("p-0 gap-4 max-h-[90vh] overflow-auto",o),children:[m.jsx(lC,{className:"sr-only",children:"Modal Component"}),m.jsx(uC,{className:"sr-only",children:"This is a modal component"}),r?m.jsxs("div",{className:"sticky top-0 bg-inherit flex flex-col gap-4 pt-5 z-10",children:[m.jsxs("div",{className:"flex justify-between items-center px-5",children:[m.jsx("h1",{className:"text-dark font-medium text-lg",children:r}),m.jsx("button",{className:"w-6 h-6",onClick:n,children:M.cloneElement(Jy.close2,{fill:"black"})})]}),m.jsx(gS,{})]}):null,e]})})}var ZC="-ms-",JC="-moz-",ek="-webkit-",tk="comm",nk="rule",rk="decl",ok="@keyframes",ak=Math.abs,ik=String.fromCharCode,sk=Object.assign;function lk(e){return e.trim()}function uk(e,t){return(e=t.exec(e))?e[0]:e}function ck(e,t,n){return e.replace(t,n)}function dk(e,t,n){return e.indexOf(t,n)}function fk(e,t){return 0|e.charCodeAt(t)}function pk(e,t,n){return e.slice(t,n)}function hk(e){return e.length}function mk(e){return e.length}function gk(e,t){return t.push(e),e}function yk(e,t){return e.filter(function(e){return!uk(e,t)})}var vk=1,bk=1,wk=0,xk=0,Sk=0,Ck="";function kk(e,t,n,r,o,a,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:vk,column:bk,length:i,return:"",siblings:s}}function _k(e,t){return sk(kk("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Ek(e){for(;e.root;)e=_k(e.root,{children:[e]});gk(e,e.siblings)}function jk(){return Sk=xk>0?fk(Ck,--xk):0,bk--,10===Sk&&(bk=1,vk--),Sk}function Ok(){return Sk=xk<wk?fk(Ck,xk++):0,bk++,10===Sk&&(bk=1,vk++),Sk}function Nk(){return fk(Ck,xk)}function Rk(){return xk}function Pk(e,t){return pk(Ck,e,t)}function Tk(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Dk(e){return lk(Pk(xk-1,Ak(91===e?e+2:40===e?e+1:e)))}function Mk(e){for(;(Sk=Nk())&&Sk<33;)Ok();return Tk(e)>2||Tk(Sk)>3?"":" "}function Ik(e,t){for(;--t&&Ok()&&!(Sk<48||Sk>102||Sk>57&&Sk<65||Sk>70&&Sk<97););return Pk(e,Rk()+(t<6&&32==Nk()&&32==Ok()))}function Ak(e){for(;Ok();)switch(Sk){case e:return xk;case 34:case 39:34!==e&&39!==e&&Ak(Sk);break;case 40:41===e&&Ak(e);break;case 92:Ok()}return xk}function Fk(e,t){for(;Ok()&&e+Sk!==57&&(e+Sk!==84||47!==Nk()););return"/*"+Pk(t,xk-1)+"*"+ik(47===e?e:Ok())}function Lk(e){for(;!Tk(Nk());)Ok();return Pk(e,xk)}function zk(e){return function(e){return Ck="",e}($k("",null,null,null,[""],e=function(e){return vk=bk=1,wk=hk(Ck=e),xk=0,[]}(e),0,[0],e))}function $k(e,t,n,r,o,a,i,s,l){for(var u=0,c=0,d=i,f=0,p=0,h=0,m=1,g=1,y=1,v=0,b="",w=o,x=a,S=r,C=b;g;)switch(h=v,v=Ok()){case 40:if(108!=h&&58==fk(C,d-1)){-1!=dk(C+=ck(Dk(v),"&","&\f"),"&\f",ak(u?s[u-1]:0))&&(y=-1);break}case 34:case 39:case 91:C+=Dk(v);break;case 9:case 10:case 13:case 32:C+=Mk(h);break;case 92:C+=Ik(Rk()-1,7);continue;case 47:switch(Nk()){case 42:case 47:gk(Vk(Fk(Ok(),Rk()),t,n,l),l);break;default:C+="/"}break;case 123*m:s[u++]=hk(C)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+c:-1==y&&(C=ck(C,/\f/g,"")),p>0&&hk(C)-d&&gk(p>32?Bk(C+";",r,n,d-1,l):Bk(ck(C," ","")+";",r,n,d-2,l),l);break;case 59:C+=";";default:if(gk(S=Hk(C,t,n,u,c,o,s,b,w=[],x=[],d,a),a),123===v)if(0===c)$k(C,t,S,S,w,a,d,s,x);else switch(99===f&&110===fk(C,3)?100:f){case 100:case 108:case 109:case 115:$k(e,S,S,r&&gk(Hk(e,S,S,0,0,o,s,b,o,w=[],d,x),x),o,x,d,s,r?w:x);break;default:$k(C,S,S,S,[""],x,0,s,x)}}u=c=p=0,m=y=1,b=C="",d=i;break;case 58:d=1+hk(C),p=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==jk())continue;switch(C+=ik(v),v*m){case 38:y=c>0?1:(C+="\f",-1);break;case 44:s[u++]=(hk(C)-1)*y,y=1;break;case 64:45===Nk()&&(C+=Dk(Ok())),f=Nk(),c=d=hk(b=C+=Lk(Rk())),v++;break;case 45:45===h&&2==hk(C)&&(m=0)}}return a}function Hk(e,t,n,r,o,a,i,s,l,u,c,d){for(var f=o-1,p=0===o?a:[""],h=mk(p),m=0,g=0,y=0;m<r;++m)for(var v=0,b=pk(e,f+1,f=ak(g=i[m])),w=e;v<h;++v)(w=lk(g>0?p[v]+" "+b:ck(b,/&\f/g,p[v])))&&(l[y++]=w);return kk(e,t,n,0===o?nk:s,l,u,c,d)}function Vk(e,t,n,r){return kk(e,t,n,tk,ik(Sk),pk(e,2,-2),0,r)}function Bk(e,t,n,r,o){return kk(e,t,n,rk,pk(e,0,r),pk(e,r+1,-1),r,o)}function Uk(e,t,n){switch(function(e,t){return 45^fk(e,0)?(((t<<2^fk(e,0))<<2^fk(e,1))<<2^fk(e,2))<<2^fk(e,3):0}(e,t)){case 5103:return ek+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ek+e+e;case 4789:return JC+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ek+e+JC+e+ZC+e+e;case 5936:switch(fk(e,t+11)){case 114:return ek+e+ZC+ck(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ek+e+ZC+ck(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ek+e+ZC+ck(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return ek+e+ZC+e+e;case 6165:return ek+e+ZC+"flex-"+e+e;case 5187:return ek+e+ck(e,/(\w+).+(:[^]+)/,ek+"box-$1$2"+ZC+"flex-$1$2")+e;case 5443:return ek+e+ZC+"flex-item-"+ck(e,/flex-|-self/g,"")+(uk(e,/flex-|baseline/)?"":ZC+"grid-row-"+ck(e,/flex-|-self/g,""))+e;case 4675:return ek+e+ZC+"flex-line-pack"+ck(e,/align-content|flex-|-self/g,"")+e;case 5548:return ek+e+ZC+ck(e,"shrink","negative")+e;case 5292:return ek+e+ZC+ck(e,"basis","preferred-size")+e;case 6060:return ek+"box-"+ck(e,"-grow","")+ek+e+ZC+ck(e,"grow","positive")+e;case 4554:return ek+ck(e,/([^-])(transform)/g,"$1"+ek+"$2")+e;case 6187:return ck(ck(ck(e,/(zoom-|grab)/,ek+"$1"),/(image-set)/,ek+"$1"),e,"")+e;case 5495:case 3959:return ck(e,/(image-set\([^]*)/,ek+"$1$`$1");case 4968:return ck(ck(e,/(.+:)(flex-)?(.*)/,ek+"box-pack:$3"+ZC+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ek+e+e;case 4200:if(!uk(e,/flex-|baseline/))return ZC+"grid-column-align"+pk(e,t)+e;break;case 2592:case 3360:return ZC+ck(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,uk(e.props,/grid-\w+-end/)})?~dk(e+(n=n[t].value),"span",0)?e:ZC+ck(e,"-start","")+e+ZC+"grid-row-span:"+(~dk(n,"span",0)?uk(n,/\d+/):+uk(n,/\d+/)-+uk(e,/\d+/))+";":ZC+ck(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(e){return uk(e.props,/grid-\w+-start/)})?e:ZC+ck(ck(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return ck(e,/(.+)-inline(.+)/,ek+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(hk(e)-1-t>6)switch(fk(e,t+1)){case 109:if(45!==fk(e,t+4))break;case 102:return ck(e,/(.+:)(.+)-([^]+)/,"$1"+ek+"$2-$3$1"+JC+(108==fk(e,t+3)?"$3":"$2-$3"))+e;case 115:return~dk(e,"stretch",0)?Uk(ck(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return ck(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,o,a,i,s){return ZC+n+":"+r+s+(o?ZC+n+"-span:"+(a?i:+i-+r)+s:"")+e});case 4949:if(121===fk(e,t+6))return ck(e,":",":"+ek)+e;break;case 6444:switch(fk(e,45===fk(e,14)?18:11)){case 120:return ck(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+ek+(45===fk(e,14)?"inline-":"")+"box$3$1"+ek+"$2$3$1"+ZC+"$2box$3")+e;case 100:return ck(e,":",":"+ZC)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return ck(e,"scroll-","scroll-snap-")+e}return e}function Wk(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function qk(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case rk:return e.return=e.return||e.value;case tk:return"";case ok:return e.return=e.value+"{"+Wk(e.children,r)+"}";case nk:if(!hk(e.value=e.props.join(",")))return""}return hk(n=Wk(e.children,r))?e.return=e.value+"{"+n+"}":""}function Yk(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case rk:return void(e.return=Uk(e.value,e.length,n));case ok:return Wk([_k(e,{value:ck(e.value,"@","@"+ek)})],r);case nk:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,function(t){switch(uk(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Ek(_k(e,{props:[ck(t,/:(read-\w+)/,":-moz-$1")]})),Ek(_k(e,{props:[t]})),sk(e,{props:yk(n,r)});break;case"::placeholder":Ek(_k(e,{props:[ck(t,/:(plac\w+)/,":"+ek+"input-$1")]})),Ek(_k(e,{props:[ck(t,/:(plac\w+)/,":-moz-$1")]})),Ek(_k(e,{props:[ck(t,/:(plac\w+)/,ZC+"input-$1")]})),Ek(_k(e,{props:[t]})),sk(e,{props:yk(n,r)})}return""})}}var Gk={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Kk="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Qk="active",Xk="data-styled-version",Zk="6.1.19",Jk="/*!sc*/\n",e_="undefined"!=typeof window&&"undefined"!=typeof document,t_=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&("false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY)),n_=Object.freeze([]),r_=Object.freeze({});var o_=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),a_=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,i_=/(^-|-$)/g;function s_(e){return e.replace(a_,"-").replace(i_,"")}var l_=/(a)(d)/gi,u_=function(e){return String.fromCharCode(e+(e>25?39:97))};function c_(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=u_(t%52)+n;return(u_(t%52)+n).replace(l_,"$1-$2")}var d_,f_=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},p_=function(e){return f_(5381,e)};function h_(e){return c_(p_(e)>>>0)}function m_(e){return"string"==typeof e&&!0}var g_="function"==typeof Symbol&&Symbol.for,y_=g_?Symbol.for("react.memo"):60115,v_=g_?Symbol.for("react.forward_ref"):60112,b_={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},w_={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},x_={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},S_=((d_={})[v_]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},d_[y_]=x_,d_);function C_(e){return("type"in(t=e)&&t.type.$$typeof)===y_?x_:"$$typeof"in e?S_[e.$$typeof]:b_;var t}var k_=Object.defineProperty,__=Object.getOwnPropertyNames,E_=Object.getOwnPropertySymbols,j_=Object.getOwnPropertyDescriptor,O_=Object.getPrototypeOf,N_=Object.prototype;function R_(e,t,n){if("string"!=typeof t){if(N_){var r=O_(t);r&&r!==N_&&R_(e,r,n)}var o=__(t);E_&&(o=o.concat(E_(t)));for(var a=C_(e),i=C_(t),s=0;s<o.length;++s){var l=o[s];if(!(l in w_||n&&n[l]||i&&l in i||a&&l in a)){var u=j_(t,l);try{k_(e,l,u)}catch(e){}}}}return e}function P_(e){return"function"==typeof e}function T_(e){return"object"==typeof e&&"styledComponentId"in e}function D_(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function M_(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=e[r];return n}function I_(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function A_(e,t,n){if(void 0===n&&(n=!1),!n&&!I_(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=A_(e[r],t[r]);else if(I_(t))for(var r in t)e[r]=A_(e[r],t[r]);return e}function F_(e,t){Object.defineProperty(e,"toString",{value:t})}function L_(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var z_=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw L_(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var a=r;a<o;a++)this.groupSizes[a]=0}for(var i=this.indexOfGroup(e+1),s=(a=0,t.length);a<s;a++)this.tag.insertRule(i,t[a])&&(this.groupSizes[e]++,i++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,a=r;a<o;a++)t+="".concat(this.tag.getRule(a)).concat(Jk);return t},e}(),$_=new Map,H_=new Map,V_=1,B_=function(e){if($_.has(e))return $_.get(e);for(;H_.has(V_);)V_++;var t=V_++;return $_.set(e,t),H_.set(t,e),t},U_=function(e,t){V_=t+1,$_.set(e,t),H_.set(t,e)},W_="style[".concat(Kk,"][").concat(Xk,'="').concat(Zk,'"]'),q_=new RegExp("^".concat(Kk,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Y_=function(e,t,n){for(var r,o=n.split(","),a=0,i=o.length;a<i;a++)(r=o[a])&&e.registerName(t,r)},G_=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(Jk),o=[],a=0,i=r.length;a<i;a++){var s=r[a].trim();if(s){var l=s.match(q_);if(l){var u=0|parseInt(l[1],10),c=l[2];0!==u&&(U_(c,u),Y_(e,c,l[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(s)}}},K_=function(e){for(var t=document.querySelectorAll(W_),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(Kk)!==Qk&&(G_(e,o),o.parentNode&&o.parentNode.removeChild(o))}};var Q_=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(Kk,"]")));return t[t.length-1]}(n),a=void 0!==o?o.nextSibling:null;r.setAttribute(Kk,Qk),r.setAttribute(Xk,Zk);var i="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return i&&r.setAttribute("nonce",i),n.insertBefore(r,a),r},X_=function(){function e(e){this.element=Q_(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw L_(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),Z_=function(){function e(e){this.element=Q_(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),J_=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),eE=e_,tE={isServer:!e_,useCSSOMInjection:!t_},nE=function(){function e(e,t,n){void 0===e&&(e=r_),void 0===t&&(t={});var r=this;this.options=Fl(Fl({},tE),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&e_&&eE&&(eE=!1,K_(this)),F_(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return H_.get(e)}(n);if(void 0===o)return"continue";var a=e.names.get(o),i=t.getGroup(n);if(void 0===a||!a.size||0===i.length)return"continue";var s="".concat(Kk,".g").concat(n,'[id="').concat(o,'"]'),l="";void 0!==a&&a.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),r+="".concat(i).concat(s,'{content:"').concat(l,'"}').concat(Jk)},a=0;a<n;a++)o(a);return r}(r)})}return e.registerId=function(e){return B_(e)},e.prototype.rehydrate=function(){!this.server&&e_&&K_(this)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(Fl(Fl({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new J_(n):t?new X_(n):new Z_(n)}(this.options),new z_(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(B_(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(B_(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(B_(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),rE=/&/g,oE=/^\s*\/\/.*$/gm;function aE(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=aE(e.children,t)),e})}var iE=new nE,sE=function(){var e,t,n,r=r_,o=r.options,a=void 0===o?r_:o,i=r.plugins,s=void 0===i?n_:i,l=function(n,r,o){return o.startsWith(t)&&o.endsWith(t)&&o.replaceAll(t,"").length>0?".".concat(e):n},u=s.slice();u.push(function(e){e.type===nk&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(rE,t).replace(n,l))}),a.prefix&&u.push(Yk),u.push(qk);var c=function(r,o,i,s){void 0===o&&(o=""),void 0===i&&(i=""),void 0===s&&(s="&"),e=s,t=o,n=new RegExp("\\".concat(t,"\\b"),"g");var l=r.replace(oE,""),c=zk(i||o?"".concat(i," ").concat(o," { ").concat(l," }"):l);a.namespace&&(c=aE(c,a.namespace));var d,f=[];return Wk(c,function(e){var t=mk(e);return function(n,r,o,a){for(var i="",s=0;s<t;s++)i+=e[s](n,r,o,a)||"";return i}}(u.concat((d=function(e){return f.push(e)},function(e){e.root||(e=e.return)&&d(e)})))),f};return c.hash=s.length?s.reduce(function(e,t){return t.name||L_(15),f_(e,t.name)},5381).toString():"",c}(),lE=M.createContext({shouldForwardProp:void 0,styleSheet:iE,stylis:sE});function uE(){return D.useContext(lE)}lE.Consumer,M.createContext(void 0);var cE=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=sE);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,F_(this,function(){throw L_(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=sE),this.name+e.hash},e}(),dE=function(e){return e>="A"&&e<="Z"};function fE(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;dE(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var pE=function(e){return null==e||!1===e||""===e},hE=function(e){var t,n,r=[];for(var o in e){var a=e[o];e.hasOwnProperty(o)&&!pE(a)&&(Array.isArray(a)&&a.isCss||P_(a)?r.push("".concat(fE(o),":"),a,";"):I_(a)?r.push.apply(r,zl(zl(["".concat(o," {")],hE(a),!1),["}"],!1)):r.push("".concat(fE(o),": ").concat((t=o,null==(n=a)||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||t in Gk||t.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function mE(e,t,n,r){return pE(e)?[]:T_(e)?[".".concat(e.styledComponentId)]:P_(e)?!P_(o=e)||o.prototype&&o.prototype.isReactComponent||!t?[e]:mE(e(t),t,n,r):e instanceof cE?n?(e.inject(n,r),[e.getName(r)]):[e]:I_(e)?hE(e):Array.isArray(e)?Array.prototype.concat.apply(n_,e.map(function(e){return mE(e,t,n,r)})):[e.toString()];var o}var gE=p_(Zk),yE=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(P_(n)&&!T_(n))return!1}return!0}(e),this.componentId=t,this.baseHash=f_(gE,t),this.baseStyle=n,nE.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=D_(r,this.staticRulesId);else{var o=M_(mE(this.rules,e,t,n)),a=c_(f_(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,a)){var i=n(o,".".concat(a),void 0,this.componentId);t.insertRules(this.componentId,a,i)}r=D_(r,a),this.staticRulesId=a}else{for(var s=f_(this.baseHash,n.hash),l="",u=0;u<this.rules.length;u++){var c=this.rules[u];if("string"==typeof c)l+=c;else if(c){var d=M_(mE(c,e,t,n));s=f_(s,d+u),l+=d}}if(l){var f=c_(s>>>0);t.hasNameForId(this.componentId,f)||t.insertRules(this.componentId,f,n(l,".".concat(f),void 0,this.componentId)),r=D_(r,f)}}return r},e}(),vE=M.createContext(void 0);vE.Consumer;var bE={};function wE(e,t,n){var r=T_(e),o=e,a=!m_(e),i=t.attrs,s=void 0===i?n_:i,l=t.componentId,u=void 0===l?function(e,t){var n="string"!=typeof e?"sc":s_(e);bE[n]=(bE[n]||0)+1;var r="".concat(n,"-").concat(h_(Zk+n+bE[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):l,c=t.displayName,d=void 0===c?function(e){return m_(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e):c,f=t.displayName&&t.componentId?"".concat(s_(t.displayName),"-").concat(t.componentId):t.componentId||u,p=r&&o.attrs?o.attrs.concat(s).filter(Boolean):s,h=t.shouldForwardProp;if(r&&o.shouldForwardProp){var m=o.shouldForwardProp;if(t.shouldForwardProp){var g=t.shouldForwardProp;h=function(e,t){return m(e,t)&&g(e,t)}}else h=m}var y=new yE(n,f,r?o.componentStyle:void 0);function v(e,t){return function(e,t,n){var r=e.attrs,o=e.componentStyle,a=e.defaultProps,i=e.foldedComponentIds,s=e.styledComponentId,l=e.target,u=M.useContext(vE),c=uE(),d=e.shouldForwardProp||c.shouldForwardProp,f=function(e,t,n){return void 0===n&&(n=r_),e.theme!==n.theme&&e.theme||t||n.theme}(t,u,a)||r_,p=function(e,t,n){for(var r,o=Fl(Fl({},t),{className:void 0,theme:n}),a=0;a<e.length;a+=1){var i=P_(r=e[a])?r(o):r;for(var s in i)o[s]="className"===s?D_(o[s],i[s]):"style"===s?Fl(Fl({},o[s]),i[s]):i[s]}return t.className&&(o.className=D_(o.className,t.className)),o}(r,t,f),h=p.as||l,m={};for(var g in p)void 0===p[g]||"$"===g[0]||"as"===g||"theme"===g&&p.theme===f||("forwardedAs"===g?m.as=p.forwardedAs:d&&!d(g,h)||(m[g]=p[g]));var y=function(e,t){var n=uE();return e.generateAndInjectStyles(t,n.styleSheet,n.stylis)}(o,p),v=D_(i,s);return y&&(v+=" "+y),p.className&&(v+=" "+p.className),m[m_(h)&&!o_.has(h)?"class":"className"]=v,n&&(m.ref=n),D.createElement(h,m)}(b,e,t)}v.displayName=d;var b=M.forwardRef(v);return b.attrs=p,b.componentStyle=y,b.displayName=d,b.shouldForwardProp=h,b.foldedComponentIds=r?D_(o.foldedComponentIds,o.styledComponentId):"",b.styledComponentId=f,b.target=r?o.target:e,Object.defineProperty(b,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=r?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)A_(e,o[r],!0);return e}({},o.defaultProps,e):e}}),F_(b,function(){return".".concat(b.styledComponentId)}),a&&R_(b,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),b}function xE(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var SE=function(e){return Object.assign(e,{isCss:!0})};function CE(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(P_(e)||I_(e))return SE(mE(xE(n_,zl([e],t,!0))));var r=e;return 0===t.length&&1===r.length&&"string"==typeof r[0]?mE(r):SE(mE(xE(r,t)))}function kE(e,t,n){if(void 0===n&&(n=r_),!t)throw L_(1,t);var r=function(r){for(var o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];return e(t,n,CE.apply(void 0,zl([r],o,!1)))};return r.attrs=function(r){return kE(e,t,Fl(Fl({},n),{attrs:Array.prototype.concat(n.attrs,r).filter(Boolean)}))},r.withConfig=function(r){return kE(e,t,Fl(Fl({},n),r))},r}var _E=function(e){return kE(wE,e)},EE=_E;function jE(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=M_(CE.apply(void 0,zl([e],t,!1))),o=h_(r);return new cE(o,r)}o_.forEach(function(e){EE[e]=_E(e)});const OE={"aria-busy":!0,role:"progressbar"},NE=EE.div`
141
+ r.version="2.30.1",o(Kn),r.fn=ua,r.min=Jn,r.max=er,r.now=tr,r.utc=h,r.unix=ca,r.months=ya,r.isDate=d,r.locale=mn,r.invalid=v,r.duration=Or,r.isMoment=C,r.weekdays=ba,r.parseZone=da,r.localeData=vn,r.isDuration=sr,r.monthsShort=va,r.weekdaysMin=xa,r.defineLocale=gn,r.updateLocale=yn,r.locales=bn,r.weekdaysShort=wa,r.normalizeUnits=ne,r.relativeTimeRounding=oi,r.relativeTimeThreshold=ai,r.calendarFormat=Hr,r.prototype=ua,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r}()}(ox)),ox.exports),ix=n(ax),sx="Dialog",[lx]=sa(sx),[ux,cx]=lx(sx),dx=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=D.useRef(null),l=D.useRef(null),[u,c]=da({prop:r,defaultProp:o??!1,onChange:a,caller:sx});return m.jsx(ux,{scope:t,triggerRef:s,contentRef:l,contentId:Ka(),titleId:Ka(),descriptionId:Ka(),open:u,onOpenChange:c,onOpenToggle:D.useCallback(()=>c(e=>!e),[c]),modal:i,children:n})};dx.displayName=sx;var fx="DialogTrigger";D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cx(fx,n),a=ia(t,o.triggerRef);return m.jsx(ba.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Tx(o.open),...r,ref:a,onClick:ra(e.onClick,o.onOpenToggle)})}).displayName=fx;var px="DialogPortal",[hx,mx]=lx(px,{forceMount:void 0}),gx=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=cx(px,t);return m.jsx(hx,{scope:t,forceMount:n,children:D.Children.map(r,e=>m.jsx(cl,{present:n||a.open,children:m.jsx(ul,{asChild:!0,container:o,children:e})}))})};gx.displayName=px;var yx="DialogOverlay",vx=D.forwardRef((e,t)=>{const n=mx(yx,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=cx(yx,e.__scopeDialog);return a.modal?m.jsx(cl,{present:r||a.open,children:m.jsx(wx,{...o,ref:t})}):null});vx.displayName=yx;var bx=ha("DialogOverlay.RemoveScroll"),wx=D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cx(yx,n);return m.jsx(ku,{as:bx,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(ba.div,{"data-state":Tx(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),xx="DialogContent",Sx=D.forwardRef((e,t)=>{const n=mx(xx,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=cx(xx,e.__scopeDialog);return m.jsx(cl,{present:r||a.open,children:a.modal?m.jsx(Cx,{...o,ref:t}):m.jsx(kx,{...o,ref:t})})});Sx.displayName=xx;var Cx=D.forwardRef((e,t)=>{const n=cx(xx,e.__scopeDialog),r=D.useRef(null),o=ia(t,n.contentRef,r);return D.useEffect(()=>{const e=r.current;if(e)return Al(e)},[]),m.jsx(_x,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ra(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ra(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:ra(e.onFocusOutside,e=>e.preventDefault())})}),kx=D.forwardRef((e,t)=>{const n=cx(xx,e.__scopeDialog),r=D.useRef(!1),o=D.useRef(!1);return m.jsx(_x,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const a=t.target,i=n.triggerRef.current?.contains(a);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),_x=D.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=cx(xx,n),l=D.useRef(null),u=ia(t,l);return Ia(),m.jsxs(m.Fragment,{children:[m.jsx($a,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(Ra,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Tx(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(Ax,{titleId:s.titleId}),m.jsx(Fx,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Ex="DialogTitle",jx=D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cx(Ex,n);return m.jsx(ba.h2,{id:o.titleId,...r,ref:t})});jx.displayName=Ex;var Ox="DialogDescription",Nx=D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cx(Ox,n);return m.jsx(ba.p,{id:o.descriptionId,...r,ref:t})});Nx.displayName=Ox;var Rx="DialogClose",Px=D.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cx(Rx,n);return m.jsx(ba.button,{type:"button",...r,ref:t,onClick:ra(e.onClick,()=>o.onOpenChange(!1))})});function Tx(e){return e?"open":"closed"}Px.displayName=Rx;var Dx="DialogTitleWarning",[Mx,Ix]=function(e,t){const n=D.createContext(t),r=e=>{const{children:t,...r}=e,o=D.useMemo(()=>r,Object.values(r));return m.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=D.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}(Dx,{contentName:xx,titleName:Ex,docsSlug:"dialog"}),Ax=({titleId:e})=>{const t=Ix(Dx),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return D.useEffect(()=>{if(e){document.getElementById(e)||console.error(n)}},[n,e]),null},Fx=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ix("DialogDescriptionWarning").contentName}}.`;return D.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");if(t&&r){document.getElementById(t)||console.warn(n)}},[n,e,t]),null},Lx=dx,zx=gx,$x=vx,Hx=Sx,Vx=jx,Bx=Nx,Ux=Px;const Wx=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,qx=Dr,Yx=(e,t)=>n=>{var r;if(null==(null==t?void 0:t.variants))return qx(e,null==n?void 0:n.class,null==n?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(e=>{const t=null==n?void 0:n[e],r=null==a?void 0:a[e];if(null===t)return null;const i=Wx(t)||Wx(r);return o[e][i]}),s=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),l=null==t||null===(r=t.compoundVariants)||void 0===r?void 0:r.reduce((e,t)=>{let{class:n,className:r,...o}=t;return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...a,...s}[t]):{...a,...s}[t]===n})?[...e,n,r]:e},[]);return qx(e,i,l,null==n?void 0:n.class,null==n?void 0:n.className)},Gx=Lx,Kx=Ux,Qx=zx,Xx=D.forwardRef(({className:e,...t},n)=>m.jsx($x,{className:Ko("fixed inset-0 z-50 bg-[#1E1E1E]/30 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Xx.displayName=$x.displayName;const Zx=Yx("fixed z-50 gap-4 bg-white p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:bg-neutral-950",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Jx=D.forwardRef(({side:e="right",className:t,children:n,...r},o)=>m.jsxs(Qx,{children:[m.jsx(Xx,{}),m.jsx(Hx,{ref:o,className:Ko(Zx({side:e}),t),...r,children:n})]}));Jx.displayName=Hx.displayName;D.forwardRef(({className:e,...t},n)=>m.jsx(Vx,{ref:n,className:Ko("text-lg font-semibold text-neutral-950 dark:text-neutral-50",e),...t})).displayName=Vx.displayName;function eS({children:e,isOpen:t,onClose:n,title:r,className:o}){const[a,i]=D.useState(!1);return m.jsx(Gx,{open:t,onOpenChange:n,children:m.jsxs(Jx,{className:Ko("p-[30px] rounded-l-xl lg:max-w-full space-y-6 overflow-auto",o,a?"w-full rounded-l-none":null),children:[m.jsxs("div",{className:"flex items-center justify-between border-b pb-2",children:[m.jsx("h1",{className:"text-gray-900 font-semibold text-xl",children:r}),m.jsxs("div",{className:"flex items-center gap-5",children:[m.jsx("button",{className:"w-9 h-9 flex items-center justify-center rounded-md hover:ring-2 ring-inset ring-dark",onClick:()=>{i(!a)},children:Jy.expand}),m.jsx(Kx,{asChild:!0,className:"w-9 h-9 rounded-md flex items-center justify-center bg-danger_light",children:m.jsxs("button",{children:[" ",M.cloneElement(Jy.close2,{fill:"#F1416C"})]})})]})]}),e]})})}function tS({children:e,className:t}){return m.jsx("div",{className:Ko("border rounded-xl py-[30px] border-gray-200 ",t),children:e})}function nS(){return m.jsxs("div",{className:"space-y-6",children:[m.jsxs("div",{className:"flex justify-between",children:[m.jsxs("div",{className:"space-y-2",children:[m.jsx(na,{className:"h-5 w-[500px] rounded-md"}),m.jsx(na,{className:"h-5 w-[500px] rounded-md"})]}),m.jsxs("div",{className:"flex gap-2",children:[m.jsx(na,{className:"h-9 w-[140px] rounded-md"}),m.jsx(na,{className:"h-9 w-[140px] rounded-md"})]})]}),m.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[m.jsxs(tS,{className:"p-4 flex flex-col gap-3",children:[m.jsx(na,{className:"flex-grow w-full rounded-md"}),m.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[m.jsx(na,{className:"h-[79px] rounded-md"}),m.jsx(na,{className:"h-[79px] rounded-md"}),m.jsx(na,{className:"h-[79px] rounded-md"})]})]}),m.jsxs("div",{className:"space-y-8 col-span-2",children:[m.jsx(na,{className:"h-9 w-full rounded-md"}),m.jsx(na,{className:"h-4 w-[326px] rounded-md"}),m.jsxs("div",{className:"space-y-2",children:[m.jsx(na,{className:"h-3.5 w-[150px] rounded-md"}),m.jsx(na,{className:"h-10 w-full rounded-md"})]}),m.jsx(na,{className:"h-9 w-[500px] rounded-md"}),m.jsxs("div",{className:"flex gap-3",children:[m.jsx(na,{className:"h-12 w-[115px] rounded-md"}),m.jsx(na,{className:"h-12 w-[150px] rounded-md"}),m.jsx(na,{className:"h-12 w-[171px] rounded-md"})]}),m.jsx(na,{className:"h-3.5 w-[337px] rounded-md"})]})]}),m.jsxs("div",{className:"flex gap-4",children:[m.jsx(na,{className:"h-3.5 w-[140px] rounded-md"}),m.jsx(na,{className:"h-3.5 w-[140px] rounded-md"})]}),m.jsx("div",{className:"grid grid-cols-4 gap-3",children:[1,2,3,4].map((e,t)=>m.jsxs("div",{className:"border rounded-xl border-gray-200 p-4 gap-4 flex flex-col",children:[m.jsx(na,{className:"h-3.5 w-[140px] rounded-md"}),m.jsx(na,{className:"h-10 w-[200px] rounded-md"})]},t))}),m.jsx("div",{className:"space-y-6",children:[1,2,3,4].map((e,t)=>m.jsxs("div",{className:" gap-4 flex flex-col",children:[m.jsx(na,{className:"h-3.5 w-[140px] rounded-md"}),m.jsx(na,{className:"h-[163px] w-[896px] rounded-md"})]},t))})]})}D.forwardRef(({className:e,...t},n)=>m.jsx(Bx,{ref:n,className:Ko("text-sm text-neutral-500 dark:text-neutral-400",e),...t})).displayName=Bx.displayName;var rS="https://unpkg.com/@simpoobusiness/sdk/dist/assets/placeholder-imageaf93498c918127fb.svg";function oS({images:e}){return m.jsxs(tS,{className:"p-5 flex flex-col gap-2.5",children:[m.jsx("div",{className:"relative flex-grow",children:m.jsx("img",{src:e?.[0]??rS,sizes:"100%",alt:"item image",draggable:!1,className:"rounded-xl object-cover w-full h-full"})}),m.jsx("div",{className:"flex gap-4 overflow-auto",children:e.filter((e,t)=>0!==t).map((e,t)=>m.jsx("div",{className:"w-[89px] h-[79px] relative shrink-0",children:m.jsx("img",{src:e??rS,alt:"item image",draggable:!1,className:"rounded-xl object-cover h-full w-full"})},t))})]})}var aS=Symbol.for("react.lazy"),iS=I[" use ".trim().toString()];function sS(e){return null!=e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===aS&&"_payload"in e&&("object"==typeof(t=e._payload)&&null!==t&&"then"in t);var t}function lS(e){const t=D.forwardRef((e,t)=>{let{children:n,...r}=e;if(sS(n)&&"function"==typeof iS&&(n=iS(n._payload)),D.isValidElement(n)){const e=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(n),o=function(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...e)=>{const t=a(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...a}:"className"===r&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props);return n.type!==D.Fragment&&(o.ref=t?aa(t,e):e),D.cloneElement(n,o)}return D.Children.count(n)>1?D.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var uS=Symbol("radix.slottable");function cS(e){return D.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===uS}var dS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=function(e){const t=lS(e),n=D.forwardRef((e,n)=>{let{children:r,...o}=e;sS(r)&&"function"==typeof iS&&(r=iS(r._payload));const a=D.Children.toArray(r),i=a.find(cS);if(i){const e=i.props.children,r=a.map(t=>t===i?D.Children.count(e)>1?D.Children.only(null):D.isValidElement(e)?e.props.children:null:t);return m.jsx(t,{...o,ref:n,children:D.isValidElement(e)?D.cloneElement(e,void 0,r):null})}return m.jsx(t,{...o,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}(`Primitive.${t}`),r=D.forwardRef((e,r)=>{const{asChild:o,...a}=e,i=o?n:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),m.jsx(i,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),fS="horizontal",pS=["horizontal","vertical"],hS=D.forwardRef((e,t)=>{const{decorative:n,orientation:r=fS,...o}=e,a=function(e){return pS.includes(e)}(r)?r:fS,i=n?{role:"none"}:{"aria-orientation":"vertical"===a?a:void 0,role:"separator"};return m.jsx(dS.div,{"data-orientation":a,...i,...o,ref:t})});hS.displayName="Separator";var mS=hS;const gS=D.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>m.jsx(mS,{ref:o,decorative:n,orientation:t,className:Ko("shrink-0 bg-gray-300 dark:bg-neutral-800","horizontal"===t?"h-[1px] w-full":"h-full w-[1px]",e),...r}));function yS({data:e,printLabel:t}){const n=[{tag:"reorder level",value:`${e?.reorder_level} ${e?.unit_resource?.name}`},{tag:"packing groups",value:`${e?.item_group?.length} group(s)`},{tag:"variations",value:`${e?.variation?.length} variable(s)`},{tag:"extras",value:`${e?.extras?.length} extras`}];return m.jsxs("div",{className:"grid grid-cols-3 gap-6",children:[m.jsx(oS,{images:e?.images?.map(e=>e.image)}),m.jsxs("div",{className:"col-span-2 flex flex-col gap-9",children:[m.jsxs("div",{className:"flex gap-4 bg-primary_light p-2.5 rounded-md",children:[m.jsxs("p",{className:"text-gray-700 text-sm font-medium",children:["Cost price:"," ",m.jsx("span",{className:"text-dark font-bold text-[15px]",children:rv(Number(e?.cost_price))})]}),m.jsxs("p",{className:"text-gray-700 text-sm font-medium",children:["Selling price:"," ",e?.duplicate_prices?.map((t,n)=>m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-dark font-bold text-[15px] px-2",children:rv(Number(t.selling_price))},n),n<e?.duplicate_prices?.length-1&&"-"]}))]})]}),m.jsxs("div",{className:"flex gap-2.5",children:[m.jsxs("p",{className:"text-gray-800 text-sm font-medium",children:["In stock:"," ",m.jsxs("span",{className:"text-dark font-bold text-[15px]",children:[ov(Number(e?.quantity))," ",e?.item_unit]})]}),"|",m.jsxs("p",{className:"text-gray-700 text-sm font-medium",children:["Total sold:"," ",m.jsxs("span",{className:"text-dark font-bold text-[15px]",children:[ov(e?.total_sold)," ",e?.item_unit]})]})]}),m.jsxs("div",{className:"space-y-2.5",children:[m.jsx("h2",{className:"text-gray-800 text-sm font-bold",children:"Description"}),m.jsx("p",{className:"text-gray-800 font-normal text-sm",children:e?.description??"No description..."})]}),m.jsx("div",{className:"flex gap-5 items-center",children:n.map((e,t)=>m.jsxs("div",{className:"flex gap-5 items-center",children:[m.jsxs("div",{className:"flex flex-col gap-2.5",children:[m.jsx("p",{className:"text-dark font-medium text-sm first-letter:uppercase",children:e.tag}),m.jsx("p",{className:"text-primary",children:e.value})]}),t<n.length-1&&m.jsx(gS,{className:"bg-[#7E8299] h-[30px] w-[1px]"})]},t))}),m.jsxs("div",{className:"flex gap-2.5 items-center",children:[m.jsxs("p",{className:"text-gray-700 text-sm font-medium flex gap-2",children:["Category:"," ",e?.category?.map((e,t)=>m.jsxs("span",{className:"text-dark font-normal text-[15px]",children:[e.name," "]},t))]}),m.jsx(gS,{className:"bg-[#7E8299] h-[14px] w-[1px]"}),m.jsxs("p",{className:"text-gray-700 text-sm font-medium",children:["Collection:"," ",e?.item_tags?.map((e,t)=>m.jsx("span",{className:"text-dark font-normal text-[15px]",children:e.name},t))]})]})]})]})}gS.displayName=mS.displayName;var vS=.999,bS=/[\\\/_+.#"@\[\(\{&]/,wS=/[\\\/_+.#"@\[\(\{&]/g,xS=/[\s-]/,SS=/[\s-]/g;function CS(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?1:.99;var s=`${o},${a}`;if(void 0!==i[s])return i[s];for(var l,u,c,d,f=r.charAt(a),p=n.indexOf(f,o),h=0;p>=0;)(l=CS(e,t,n,r,p+1,a+1,i))>h&&(p===o?l*=1:bS.test(e.charAt(p-1))?(l*=.8,(c=e.slice(o,p-1).match(wS))&&o>0&&(l*=Math.pow(vS,c.length))):xS.test(e.charAt(p-1))?(l*=.9,(d=e.slice(o,p-1).match(SS))&&o>0&&(l*=Math.pow(vS,d.length))):(l*=.17,o>0&&(l*=Math.pow(vS,p-o))),e.charAt(p)!==t.charAt(a)&&(l*=.9999)),(l<.1&&n.charAt(p-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(p-1)!==r.charAt(a))&&(.1*(u=CS(e,t,n,r,p+1,a+2,i))>l&&(l=.1*u)),l>h&&(h=l),p=n.indexOf(f,p+1);return i[s]=h,h}function kS(e){return e.toLowerCase().replace(SS," ")}function _S(e,t,n){return CS(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,kS(e),kS(t),0,0,{})}var ES='[cmdk-group=""]',jS='[cmdk-group-items=""]',OS='[cmdk-item=""]',NS=`${OS}:not([aria-disabled="true"])`,RS="cmdk-item-select",PS="data-value",TS=(e,t,n)=>_S(e,t,n),DS=D.createContext(void 0),MS=()=>D.useContext(DS),IS=D.createContext(void 0),AS=()=>D.useContext(IS),FS=D.createContext(void 0),LS=D.forwardRef((e,t)=>{let n=ZS(()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=ZS(()=>new Set),o=ZS(()=>new Map),a=ZS(()=>new Map),i=ZS(()=>new Set),s=QS(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:h,disablePointerSelection:m=!1,vimBindings:g=!0,...y}=e,v=Ka(),b=Ka(),w=Ka(),x=D.useRef(null),S=tC();XS(()=>{if(void 0!==c){let e=c.trim();n.current.value=e,C.emit()}},[c]),XS(()=>{S(6,N)},[]);let C=D.useMemo(()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,a,i,l;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)O(),E(),S(1,j);else if("value"===e){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let e=document.getElementById(w);e?e.focus():null==(o=document.getElementById(v))||o.focus()}if(S(7,()=>{var e;n.current.selectedItemId=null==(e=R())?void 0:e.id,C.emit()}),r||S(5,N),void 0!==(null==(a=s.current)?void 0:a.value)){let e=null!=t?t:"";return void(null==(l=(i=s.current).onValueChange)||l.call(i,e))}}C.emit()}},emit:()=>{i.current.forEach(e=>e())}}),[]),k=D.useMemo(()=>({value:(e,t,r)=>{var o;t!==(null==(o=a.current.get(e))?void 0:o.value)&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,_(t,r)),S(2,()=>{E(),C.emit()}))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),S(3,()=>{O(),E(),n.current.value||j(),C.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=R();S(4,()=>{O(),(null==t?void 0:t.getAttribute("id"))===e&&j(),C.emit()})}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{a.current.delete(e),o.current.delete(e)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:w,labelId:b,listInnerRef:x}),[]);function _(e,t){var r,o;let a=null!=(o=null==(r=s.current)?void 0:r.filter)?o:TS;return e?a(e,n.current.search,t):0}function E(){if(!n.current.search||!1===s.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=o.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;P().sort((t,n)=>{var r,o;let a=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(r=e.get(i))?r:0)-(null!=(o=e.get(a))?o:0)}).forEach(e=>{let t=e.closest(jS);t?t.appendChild(e.parentElement===t?e:e.closest(`${jS} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${jS} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{var t;let n=null==(t=x.current)?void 0:t.querySelector(`${ES}[${PS}="${encodeURIComponent(e[0])}"]`);null==n||n.parentElement.appendChild(n)})}function j(){let e=P().find(e=>"true"!==e.getAttribute("aria-disabled")),t=null==e?void 0:e.getAttribute(PS);C.setState("value",t||void 0)}function O(){var e,t,i,l;if(!n.current.search||!1===s.current.shouldFilter)return void(n.current.filtered.count=r.current.size);n.current.filtered.groups=new Set;let u=0;for(let o of r.current){let r=_(null!=(t=null==(e=a.current.get(o))?void 0:e.value)?t:"",null!=(l=null==(i=a.current.get(o))?void 0:i.keywords)?l:[]);n.current.filtered.items.set(o,r),r>0&&u++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=u}function N(){var e,t,n;let r=R();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(ES))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function R(){var e;return null==(e=x.current)?void 0:e.querySelector(`${OS}[aria-selected="true"]`)}function P(){var e;return Array.from((null==(e=x.current)?void 0:e.querySelectorAll(NS))||[])}function T(e){let t=P()[e];t&&C.setState("value",t.getAttribute(PS))}function M(e){var t;let n=R(),r=P(),o=r.findIndex(e=>e===n),a=r[o+e];null!=(t=s.current)&&t.loop&&(a=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),a&&C.setState("value",a.getAttribute(PS))}function I(e){let t,n=R(),r=null==n?void 0:n.closest(ES);for(;r&&!t;)r=e>0?GS(r,ES):KS(r,ES),t=null==r?void 0:r.querySelector(NS);t?C.setState("value",t.getAttribute(PS)):M(e)}let A=()=>T(P().length-1),F=e=>{e.preventDefault(),e.metaKey?A():e.altKey?I(1):M(1)},L=e=>{e.preventDefault(),e.metaKey?T(0):e.altKey?I(-1):M(-1)};return D.createElement(ba.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:e=>{var t;null==(t=y.onKeyDown)||t.call(y,e);let n=e.nativeEvent.isComposing||229===e.keyCode;if(!e.defaultPrevented&&!n)switch(e.key){case"n":case"j":g&&e.ctrlKey&&F(e);break;case"ArrowDown":F(e);break;case"p":case"k":g&&e.ctrlKey&&L(e);break;case"ArrowUp":L(e);break;case"Home":e.preventDefault(),T(0);break;case"End":e.preventDefault(),A();break;case"Enter":{e.preventDefault();let t=R();if(t){let e=new Event(RS);t.dispatchEvent(e)}}}}},D.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:rC},l),nC(e,e=>D.createElement(IS.Provider,{value:C},D.createElement(DS.Provider,{value:k},e))))}),zS=D.forwardRef((e,t)=>{var n,r;let o=Ka(),a=D.useRef(null),i=D.useContext(FS),s=MS(),l=QS(e),u=null!=(r=null==(n=l.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;XS(()=>{if(!u)return s.item(o,null==i?void 0:i.id)},[u]);let c=eC(o,a,[e.value,e.children,a],e.keywords),d=AS(),f=JS(e=>e.value&&e.value===c.current),p=JS(e=>!(!u&&!1!==s.filter())||(!e.search||e.filtered.items.get(o)>0));function h(){var e,t;m(),null==(t=(e=l.current).onSelect)||t.call(e,c.current)}function m(){d.setState("value",c.current,!0)}if(D.useEffect(()=>{let t=a.current;if(t&&!e.disabled)return t.addEventListener(RS,h),()=>t.removeEventListener(RS,h)},[p,e.onSelect,e.disabled]),!p)return null;let{disabled:g,value:y,onSelect:v,forceMount:b,keywords:w,...x}=e;return D.createElement(ba.div,{ref:aa(a,t),...x,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||s.getDisablePointerSelection()?void 0:m,onClick:g?void 0:h},e.children)}),$S=D.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=Ka(),s=D.useRef(null),l=D.useRef(null),u=Ka(),c=MS(),d=JS(e=>!(!o&&!1!==c.filter())||(!e.search||e.filtered.groups.has(i)));XS(()=>c.group(i),[]),eC(i,s,[e.value,e.heading,l]);let f=D.useMemo(()=>({id:i,forceMount:o}),[o]);return D.createElement(ba.div,{ref:aa(s,t),...a,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&D.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),nC(e,e=>D.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},D.createElement(FS.Provider,{value:f},e))))}),HS=D.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=D.useRef(null),a=JS(e=>!e.search);return n||a?D.createElement(ba.div,{ref:aa(o,t),...r,"cmdk-separator":"",role:"separator"}):null}),VS=D.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,a=AS(),i=JS(e=>e.search),s=JS(e=>e.selectedItemId),l=MS();return D.useEffect(()=>{null!=e.value&&a.setState("search",e.value)},[e.value]),D.createElement(ba.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":s,id:l.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||a.setState("search",e.target.value),null==n||n(e.target.value)}})}),BS=D.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=D.useRef(null),i=D.useRef(null),s=JS(e=>e.selectedItemId),l=MS();return D.useEffect(()=>{if(i.current&&a.current){let e,t=i.current,n=a.current,r=new ResizeObserver(()=>{e=requestAnimationFrame(()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")})});return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}},[]),D.createElement(ba.div,{ref:aa(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:l.listId},nC(e,e=>D.createElement("div",{ref:aa(i,l.listInnerRef),"cmdk-list-sizer":""},e)))}),US=D.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...s}=e;return D.createElement(Lx,{open:n,onOpenChange:r},D.createElement(zx,{container:i},D.createElement($x,{"cmdk-overlay":"",className:o}),D.createElement(Hx,{"aria-label":e.label,"cmdk-dialog":"",className:a},D.createElement(LS,{ref:t,...s}))))}),WS=D.forwardRef((e,t)=>JS(e=>0===e.filtered.count)?D.createElement(ba.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),qS=D.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return D.createElement(ba.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},nC(e,e=>D.createElement("div",{"aria-hidden":!0},e)))}),YS=Object.assign(LS,{List:BS,Item:zS,Input:VS,Group:$S,Separator:HS,Dialog:US,Empty:WS,Loading:qS});function GS(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function KS(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function QS(e){let t=D.useRef(e);return XS(()=>{t.current=e}),t}var XS="undefined"==typeof window?D.useEffect:D.useLayoutEffect;function ZS(e){let t=D.useRef();return void 0===t.current&&(t.current=e()),t}function JS(e){let t=AS(),n=()=>e(t.snapshot());return D.useSyncExternalStore(t.subscribe,n,n)}function eC(e,t,n,r=[]){let o=D.useRef(),a=MS();return XS(()=>{var i;let s=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),l=r.map(e=>e.trim());a.value(e,s,l),null==(i=t.current)||i.setAttribute(PS,s),o.current=s}),o}var tC=()=>{let[e,t]=D.useState(),n=ZS(()=>new Map);return XS(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function nC({asChild:e,children:t},n){return e&&D.isValidElement(t)?D.cloneElement(function(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}(t),{ref:t.ref},n(t.props.children)):n(t)}var rC={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const oC=Lx,aC=zx,iC=D.forwardRef(({className:e,...t},n)=>m.jsx($x,{ref:n,className:Ko("fixed inset-0 z-50 bg-[#1E1E1E]/30 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));iC.displayName=$x.displayName;const sC=D.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(aC,{children:[m.jsx(iC,{}),m.jsxs(Hx,{ref:r,className:Ko("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-neutral-800 dark:bg-neutral-950",e),...n,children:[t,m.jsxs(Ux,{className:"hidden absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400",children:[m.jsx(Ad,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));sC.displayName=Hx.displayName;const lC=D.forwardRef(({className:e,...t},n)=>m.jsx(Vx,{ref:n,className:Ko("text-lg font-semibold leading-none tracking-tight",e),...t}));lC.displayName=Vx.displayName;const uC=D.forwardRef(({className:e,...t},n)=>m.jsx(Bx,{ref:n,className:Ko("text-sm text-neutral-500 dark:text-neutral-400",e),...t}));uC.displayName=Bx.displayName;const cC=D.forwardRef(({className:e,...t},n)=>m.jsx(YS,{ref:n,className:Ko("flex h-full w-full flex-col overflow-hidden rounded-md bg-white text-neutral-950 dark:bg-neutral-950 dark:text-neutral-50",e),...t}));cC.displayName=YS.displayName;const dC=D.forwardRef(({className:e,...t},n)=>m.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[m.jsx(Id,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),m.jsx(YS.Input,{ref:n,className:Ko("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50 dark:placeholder:text-neutral-400",e),...t})]}));dC.displayName=YS.Input.displayName;const fC=D.forwardRef(({className:e,...t},n)=>m.jsx(YS.List,{ref:n,className:Ko("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));fC.displayName=YS.List.displayName;const pC=D.forwardRef((e,t)=>m.jsx(YS.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));pC.displayName=YS.Empty.displayName;const hC=D.forwardRef(({className:e,...t},n)=>m.jsx(YS.Group,{ref:n,className:Ko("overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 dark:text-neutral-50 dark:[&_[cmdk-group-heading]]:text-neutral-400",e),...t}));hC.displayName=YS.Group.displayName;D.forwardRef(({className:e,...t},n)=>m.jsx(YS.Separator,{ref:n,className:Ko("-mx-1 h-px bg-neutral-200 dark:bg-neutral-800",e),...t})).displayName=YS.Separator.displayName;const mC=D.forwardRef(({className:e,...t},n)=>m.jsx(YS.Item,{ref:n,className:Ko("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-primary_light data-[selected=true]:text-primary data-[disabled=true]:opacity-50 dark:data-[selected='true']:bg-primary_light dark:data-[selected=true]:text-primary",e),...t}));mC.displayName=YS.Item.displayName;var gC="Popover",[yC]=sa(gC,[Bs]),vC=Bs(),[bC,wC]=yC(gC),xC=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,s=vC(t),l=D.useRef(null),[u,c]=D.useState(!1),[d,f]=da({prop:r,defaultProp:o??!1,onChange:a,caller:gC});return m.jsx(al,{...s,children:m.jsx(bC,{scope:t,contentId:Ka(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:D.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:u,onCustomAnchorAdd:D.useCallback(()=>c(!0),[]),onCustomAnchorRemove:D.useCallback(()=>c(!1),[]),modal:i,children:n})})};xC.displayName=gC;var SC="PopoverAnchor";D.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wC(SC,n),a=vC(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return D.useEffect(()=>(i(),()=>s()),[i,s]),m.jsx(il,{...a,...r,ref:t})}).displayName=SC;var CC="PopoverTrigger",kC=D.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wC(CC,n),a=vC(n),i=ia(t,o.triggerRef),s=m.jsx(ba.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":FC(o.open),...r,ref:i,onClick:ra(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:m.jsx(il,{asChild:!0,...a,children:s})});kC.displayName=CC;var _C="PopoverPortal",[EC,jC]=yC(_C,{forceMount:void 0}),OC=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=wC(_C,t);return m.jsx(EC,{scope:t,forceMount:n,children:m.jsx(cl,{present:n||a.open,children:m.jsx(ul,{asChild:!0,container:o,children:r})})})};OC.displayName=_C;var NC="PopoverContent",RC=D.forwardRef((e,t)=>{const n=jC(NC,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=wC(NC,e.__scopePopover);return m.jsx(cl,{present:r||a.open,children:a.modal?m.jsx(TC,{...o,ref:t}):m.jsx(DC,{...o,ref:t})})});RC.displayName=NC;var PC=ha("PopoverContent.RemoveScroll"),TC=D.forwardRef((e,t)=>{const n=wC(NC,e.__scopePopover),r=D.useRef(null),o=ia(t,r),a=D.useRef(!1);return D.useEffect(()=>{const e=r.current;if(e)return Al(e)},[]),m.jsx(ku,{as:PC,allowPinchZoom:!0,children:m.jsx(MC,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ra(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:ra(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:ra(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),DC=D.forwardRef((e,t)=>{const n=wC(NC,e.__scopePopover),r=D.useRef(!1),o=D.useRef(!1);return m.jsx(MC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const a=t.target,i=n.triggerRef.current?.contains(a);i&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),MC=D.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=wC(NC,n),p=vC(n);return Ia(),m.jsx($a,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(Ra,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:m.jsx(sl,{"data-state":FC(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),IC="PopoverClose",AC=D.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wC(IC,n);return m.jsx(ba.button,{type:"button",...r,ref:t,onClick:ra(e.onClick,()=>o.onOpenChange(!1))})});AC.displayName=IC;function FC(e){return e?"open":"closed"}D.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=vC(n);return m.jsx(ll,{...o,...r,ref:t})}).displayName="PopoverArrow";var LC=OC,zC=RC;const $C=xC,HC=kC,VC=D.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>m.jsx(LC,{children:m.jsx(zC,{ref:o,align:t,sideOffset:n,className:Ko("z-50 w-72 rounded-md border border-neutral-200 bg-white p-4 text-neutral-950 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",e),...r})}));VC.displayName=zC.displayName;const BC=Yx("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-neutral-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 dark:ring-offset-neutral-950 dark:focus-visible:ring-neutral-300",{variants:{variant:{default:"bg-neutral-900 text-neutral-50 hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90",destructive:"bg-red-500 text-neutral-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/90",outline:"border border-neutral-200 bg-white hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",secondary:"bg-neutral-100 text-neutral-900 hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80",ghost:"hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",link:"text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),UC=D.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const i=r?ma:"button";return m.jsx(i,{className:Ko(BC({variant:t,size:n,className:e})),ref:a,...o})});UC.displayName="Button";const WC=({label:e,options:t=[],className:n,placeholder:r,value:o="",onValueChange:a,required:i,error:s,showSearch:l=!0,showOutline:u=!0,icon:c,info:d,optional:f,labelClass:p,actionLabel:h,actionLabelAction:g,actionLabelInfo:y,searchPlaceholder:v,disabled:b,triggerClass:w,loading:x,showError:S,onChangeSearch:C,searching:k,infoAlignment:_,align:E="start",valueClass:j})=>{const[O,N]=D.useState(""),[R,P]=D.useState(!1),[T,M]=D.useState(0),I=D.useRef(null);D.useEffect(()=>{const e=()=>{I.current&&M(I?.current?.offsetWidth)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);return m.jsx(m.Fragment,{children:x?m.jsx(na,{className:"w-full h-[48px]"}):m.jsxs("div",{className:Ko("flex flex-col gap-2.5",n),children:[m.jsxs("div",{className:Ko("flex justify-between gap-2 flex-wrap",e?null:"hidden"),children:[e&&m.jsxs("label",{className:Ko("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",p),children:[m.jsx("span",{className:"first-letter:inherit",children:e})," ",i?m.jsx("span",{className:"text-[#E12D39]",children:e&&"*"}):f?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,d&&m.jsx(kv,{fieldName:e,align:_,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:d})})]}),h&&m.jsxs("button",{onClick:g,className:"text-primary flex items-center gap-1 first-letter:uppercase text-sm font-medium",children:[h,y&&m.jsx(kv,{fieldName:h,children:m.jsx("p",{className:"font-normal first-letter:uppercase text-left",children:y})})]})]}),m.jsxs($C,{modal:!0,open:R,onOpenChange:P,children:[m.jsx(HC,{asChild:!0,children:m.jsxs(UC,{ref:I,variant:"outline",role:"combobox","aria-expanded":R,className:Ko(`w-full h-[48px] justify-between border focus:border-primary border-neutral-200 bg-white hover:bg-white hover:border-[#BFD7FE] ${(s||S)&&"!border-danger"}`,w),disabled:b,children:[m.jsx("span",{className:Ko("flex gap-2 first-letter:uppercase capitalize text-[#5E6278] justify-start truncate",o?"text-dark":null,j),children:o?(e=>{const n=t?.find(t=>t.value===e);return n?.label})(o):r??"Select..."}),m.jsx(Dd,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),m.jsx(VC,{style:{width:T},className:"min-w-[280px] p-0 bg-white rounded-xl border-gray-200",align:E,children:m.jsxs(cC,{className:"w-full",children:[l&&m.jsx(dC,{onChangeCapture:C,className:"placeholder:text-xs",placeholder:v??"Search..."}),k?m.jsx("div",{className:"flex flex-col gap-2 p-2",children:[1,2,3].map((e,t)=>m.jsx(na,{className:"h-9 rounded-md"},t))}):m.jsx(pC,{children:"No result found."}),m.jsx(hC,{children:m.jsx(fC,{className:"",children:t?.map(e=>m.jsxs(mC,{value:"string"==typeof e.label?e.label:e?.searchId,className:`first-letter:uppercase capitalize mb-1 hover:bg-primary_light w-full rounded-md hover:text-primary font-semibold text-gray-700 text-sm cursor-pointer ${o===e.value&&"bg-primary_light text-primary"}`,onSelect:()=>{a&&a(e.value),P(!1)},children:[m.jsx(Nd,{className:Ko("mr-2 h-4 w-4",o===e.value?"opacity-100":"opacity-0")}),e.label]},`${"string"==typeof e.label?e.label:e?.searchId}${e.value}`))})})]})})]}),s&&m.jsx("p",{className:"text-danger text-xs font-normal",children:s})]})})};var qC="https://unpkg.com/@simpoobusiness/sdk/dist/assets/image-placeholdere1821db1b147e2aa.png";function YC({data:e}){const[t,n]=D.useState(e?.total_selling_price||0),r=[{label:"Stock Quantity",value:ov(Number(e?.quantity)),desc:null},{label:"Total Cost",value:rv(Number(e?.total_cost_price)),desc:null},{label:"Total Selling Price",value:rv(t),desc:m.jsx(WC,{options:e?.prices?.map(e=>({label:e.priceGroup.name,value:e.selling_price.toString()})),onValueChange:e=>n(Number(e)),value:t?.toString(),triggerClass:"h-8",showSearch:!1,placeholder:"Select price"})},{label:"Profit to be made",value:rv(t-e?.total_cost_price),desc:null}],o=[{tag:"Barcode",value:e?.barcode.map(e=>e.barcode)},{tag:"SKU",value:e?.sku},{tag:"System code",value:e?.itemcode.toString()}],a=["S/N","Batch number","Quantity","Expiry date","Unit cost"],i=[{tag:"Extras",headers:["S/N","image","extra name","quantity inside ","selling price"],body:e?.extras?.map((e,t)=>m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:t+1}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:qC,className:"object-cover w-full h-full"})})}),m.jsx("td",{children:e.extra.name}),m.jsxs("td",{children:[e.quantity," ",e.extra.item_unit]}),m.jsx("td",{children:rv(Number(e.selling_price))})]},t))||[]},{tag:"Raw materials",headers:["S/N","image","material name","quantity inside ","selling price"],body:e?.material?.map((e,t)=>m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:t+1}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:qC,className:"object-cover w-full h-full"})})}),m.jsx("td",{children:e.raw_material?.name}),m.jsxs("td",{children:[e.quantity," ",e.raw_material?.item_unit]}),m.jsx("td",{children:rv(Number(e.selling_price))})]},t))},{tag:"Packing groups",headers:["S/N","image","group name","quantity inside ","selling price","Group code","print label"],body:e?.item_group?.map((t,n)=>m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:n+1}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:qC,className:"object-cover w-full h-full"})})}),m.jsx("td",{children:t.group_name}),m.jsxs("td",{children:[t.quantity," ",e.item_unit]}),m.jsx("td",{children:rv(Number(t.selling_price))}),m.jsx("td",{children:t.barcode}),m.jsx("td",{children:m.jsx("button",{className:"w-6 h-6 items-center flex justify-center",children:Jy.printer_blue})})]},n))},{tag:"Variations",headers:["S/N","image","variation","quantity ","selling price","code","print label"],body:e?.variation?.map((t,n)=>m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:n+1}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:t.image??qC,className:"object-cover w-full h-full"})})}),m.jsx("td",{children:t.variation_values.map((e,n)=>m.jsxs("span",{className:"pr-2",children:[e.attribute_value.value_name," ",t?.variation_values?.length-1>n&&"-"]},n))}),m.jsxs("td",{children:[t.quantity,e?.item_unit]}),m.jsx("td",{children:rv(Number(t.locationprices?.[0]?.selling_price))}),m.jsx("td",{children:t.barcode}),m.jsx("td",{children:m.jsx("button",{className:"w-6 h-6 items-center flex justify-center",children:Jy.printer_blue})})]},n))}];return m.jsxs("div",{className:"space-y-6",children:[m.jsx("div",{className:"grid grid-cols-4 gap-2.5",children:r.map((n,o)=>m.jsxs("div",{className:"border rounded-xl border-gray-200 p-4 gap-4 flex flex-col",children:[m.jsx("p",{className:"text-dark text-sm font-medium",children:n.label}),m.jsxs("p",{title:n.value,className:Ko("text-dark font-bold text-3xl truncate",o===r.length-1&&Number(t)-Number(e?.cost_price)<0?"text-danger":null),children:[n.value,0===o&&m.jsx("span",{className:"font-normal text-sm",children:e.item_unit})]}),n.desc]},o))}),m.jsx("div",{className:"grid grid-cols-12",children:m.jsxs("div",{className:"col-span-10 space-y-6",children:[m.jsxs("div",{className:"space-y-3",children:[m.jsx("p",{className:"border-b border-gray-300 pb-2.5 text-gray-800 font-semibold ",children:"Item codes:"}),m.jsx("div",{className:"flex gap-5",children:o.map((e,t)=>m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:Ko("flex flex-col gap-2.5"),children:[m.jsx("p",{className:"text-dark text-sm font-medium",children:e.tag}),m.jsx("p",{className:"text-gray-500 text-sm font-normal flex flex-col gap-2",children:Array.isArray(e.value)?e.value?.map((e,t)=>m.jsx("span",{children:e},t)):e.value})]},t),t<o.length-1&&m.jsx("div",{children:m.jsx(gS,{orientation:"vertical",className:"bg-[#7E8299]"})},t)]}))})]}),m.jsxs("div",{className:"space-y-3",children:[m.jsx("p",{className:"border-b border-gray-300 pb-2.5 text-gray-800 font-semibold ",children:"Suppliers:"}),m.jsx("div",{className:"flex gap-5 flex-col",children:e?.suppliers?.map((e,t)=>m.jsxs("div",{className:"bg-gray-100 rounded-xl p-[15px] space-y-[18px]",children:[m.jsxs("div",{className:"flex gap-3",children:[m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:m.jsx("img",{alt:"item image",src:qC,className:"object-cover w-full h-full"})}),m.jsxs("div",{className:"space-y-1 flex-grow border-b border-dashed border-gray-300 pb-1",children:[m.jsx("h1",{className:"text-dark font-semibold text-sm capitalize",children:e.name}),m.jsx("p",{className:"text-gray-700 font-medium text-[13px] capitalize"})]})]}),m.jsxs("table",{className:"table-auto w-full border-separate border-spacing-y-3",children:[m.jsx("thead",{children:m.jsx("tr",{children:a.map((e,t)=>m.jsx("th",{className:"text-left text-dark",children:e},t))})}),m.jsx("tbody",{children:m.jsxs("tr",{className:"text-dark text-sm",children:[m.jsx("td",{children:"1"}),m.jsx("td",{children:m.jsx("div",{className:"w-9 h-9 shrink-0 relative",children:e.supplier_batch_number})}),m.jsx("td",{children:e.supplier_quantity}),m.jsx("td",{children:ix(e.supplier_expired_date).format("MMMM DD, YYYY")}),m.jsx("td",{children:rv(Number(e.supplier_price))})]})})]})]},t))})]}),i.map((e,t)=>m.jsxs("div",{className:"space-y-3",children:[m.jsxs("p",{className:"border-b border-gray-300 pb-2.5 text-gray-800 font-semibold ",children:[e.tag,": ",e.body?.length]}),e.body?.length>0?m.jsx("div",{className:"bg-gray-100 rounded-xl p-[15px] space-y-[18px]",children:m.jsxs("table",{className:"table-auto w-full border-separate border-spacing-y-3",children:[m.jsx("thead",{children:m.jsx("tr",{children:e.headers.map((e,t)=>m.jsx("th",{className:"text-left text-dark first-letter:uppercase",children:e},t))})}),m.jsx("tbody",{children:e.body})]})}):null]},t))]})})]})}const GC=[{label:"All",count:900},{label:"Active",count:10},{label:"Inactive",count:0}];function KC({tabs:e=GC,loading:t}){const[n,r]=D.useState(0);return m.jsxs("div",{className:"flex flex-col",children:[m.jsx("div",{className:"flex gap-7.5",children:e.map((e,o)=>m.jsxs("button",{className:"flex items-center gap-2.5 group relative pb-2",onClick:()=>((e,t)=>{e.link||r(t),e.action&&e.action()})(e,o),children:[m.jsx("p",{className:Ko("group-hover:text-gray-900 duration-200 text-gray-800 font-normal text-sm first-letter:uppercase",o===n?"text-gray-900 font-semibold":null),children:e.label}),t?m.jsx(na,{className:"h-6.5 rounded w-8"}):m.jsxs(m.Fragment,{children:[" ",e.count>=0?m.jsx("span",{className:Ko("rounded px-1.5 h-6.5 flex items-center text-xs font-semibold duration-200 group-hover:bg-primary_light group-hover:text-primary bg-gray-200 text-gray-500 shrink-0",o===n?"bg-primary_light text-primary":null),children:e.count}):null]}),o===n?m.jsx("div",{className:"h-[5px] rounded bg-primary absolute left-0 right-0 -bottom-[5px]"}):null]},o))}),m.jsx("div",{className:"h-[5px] rounded bg-gray-300"})]})}function QC({isOpen:e,onClose:t,itemUUID:n}){const{data:r,isFetching:o}=Jw(["single_item",n],`/items/get?item_uuid=${n}`,{enabled:e}),a=r?.data,i=[{tag:"Created",value:ix(a?.created_date).format("MMMM DD, YYYY")},{tag:"Last edited",value:ix(a?.last_update_date).format("MMMM DD, YYYY")},{tag:"Expiry",value:m.jsxs("p",{className:"",children:[" ",m.jsxs("span",{className:"text-danger",children:[a?.expired," Expired,"]})," ",m.jsxs("span",{className:"text-warning",children:[a?.expiring," Expiring"]})]})}],[s,l]=D.useState(1),u=[{label:"Item overview",action:()=>l(1)}];return D.useEffect(()=>{!e&&l(1)},[e]),m.jsx(eS,{isOpen:e,onClose:t,title:"Item View",className:"w-[1176px]",children:o?m.jsx(nS,{}):m.jsxs("div",{className:"space-y-7",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("div",{className:"space-y-1",children:[m.jsxs("h1",{className:"text-dark text-xl font-semibold flex items-center gap-2",children:[a?.name,m.jsx("span",{className:"bg-primary_light text-primary text-xs rounded px-[7px] h-5 flex items-center capitalize",children:a?.item_type?.name})]}),m.jsx("div",{className:"flex gap-2",children:i.map((e,t)=>m.jsxs("p",{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[m.jsxs("span",{className:"text-dark",children:[e.tag,":"]})," ",e.value," ",t<2&&"|"]},t))})]}),m.jsx("div",{className:"flex gap-3"})]}),m.jsx(yS,{data:a}),m.jsx(KC,{tabs:u}),1===s?m.jsx(YC,{data:a}):null]})})}function XC({children:e,isOpen:t,onClose:n,title:r,className:o}){return m.jsx(oC,{open:t,onOpenChange:n,children:m.jsxs(sC,{className:Ko("p-0 gap-4 max-h-[90vh] overflow-auto",o),children:[m.jsx(lC,{className:"sr-only",children:"Modal Component"}),m.jsx(uC,{className:"sr-only",children:"This is a modal component"}),r?m.jsxs("div",{className:"sticky top-0 bg-inherit flex flex-col gap-4 pt-5 z-10",children:[m.jsxs("div",{className:"flex justify-between items-center px-5",children:[m.jsx("h1",{className:"text-dark font-medium text-lg",children:r}),m.jsx("button",{className:"w-6 h-6",onClick:n,children:M.cloneElement(Jy.close2,{fill:"black"})})]}),m.jsx(gS,{})]}):null,e]})})}var ZC="-ms-",JC="-moz-",ek="-webkit-",tk="comm",nk="rule",rk="decl",ok="@keyframes",ak=Math.abs,ik=String.fromCharCode,sk=Object.assign;function lk(e){return e.trim()}function uk(e,t){return(e=t.exec(e))?e[0]:e}function ck(e,t,n){return e.replace(t,n)}function dk(e,t,n){return e.indexOf(t,n)}function fk(e,t){return 0|e.charCodeAt(t)}function pk(e,t,n){return e.slice(t,n)}function hk(e){return e.length}function mk(e){return e.length}function gk(e,t){return t.push(e),e}function yk(e,t){return e.filter(function(e){return!uk(e,t)})}var vk=1,bk=1,wk=0,xk=0,Sk=0,Ck="";function kk(e,t,n,r,o,a,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:vk,column:bk,length:i,return:"",siblings:s}}function _k(e,t){return sk(kk("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Ek(e){for(;e.root;)e=_k(e.root,{children:[e]});gk(e,e.siblings)}function jk(){return Sk=xk>0?fk(Ck,--xk):0,bk--,10===Sk&&(bk=1,vk--),Sk}function Ok(){return Sk=xk<wk?fk(Ck,xk++):0,bk++,10===Sk&&(bk=1,vk++),Sk}function Nk(){return fk(Ck,xk)}function Rk(){return xk}function Pk(e,t){return pk(Ck,e,t)}function Tk(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Dk(e){return lk(Pk(xk-1,Ak(91===e?e+2:40===e?e+1:e)))}function Mk(e){for(;(Sk=Nk())&&Sk<33;)Ok();return Tk(e)>2||Tk(Sk)>3?"":" "}function Ik(e,t){for(;--t&&Ok()&&!(Sk<48||Sk>102||Sk>57&&Sk<65||Sk>70&&Sk<97););return Pk(e,Rk()+(t<6&&32==Nk()&&32==Ok()))}function Ak(e){for(;Ok();)switch(Sk){case e:return xk;case 34:case 39:34!==e&&39!==e&&Ak(Sk);break;case 40:41===e&&Ak(e);break;case 92:Ok()}return xk}function Fk(e,t){for(;Ok()&&e+Sk!==57&&(e+Sk!==84||47!==Nk()););return"/*"+Pk(t,xk-1)+"*"+ik(47===e?e:Ok())}function Lk(e){for(;!Tk(Nk());)Ok();return Pk(e,xk)}function zk(e){return function(e){return Ck="",e}($k("",null,null,null,[""],e=function(e){return vk=bk=1,wk=hk(Ck=e),xk=0,[]}(e),0,[0],e))}function $k(e,t,n,r,o,a,i,s,l){for(var u=0,c=0,d=i,f=0,p=0,h=0,m=1,g=1,y=1,v=0,b="",w=o,x=a,S=r,C=b;g;)switch(h=v,v=Ok()){case 40:if(108!=h&&58==fk(C,d-1)){-1!=dk(C+=ck(Dk(v),"&","&\f"),"&\f",ak(u?s[u-1]:0))&&(y=-1);break}case 34:case 39:case 91:C+=Dk(v);break;case 9:case 10:case 13:case 32:C+=Mk(h);break;case 92:C+=Ik(Rk()-1,7);continue;case 47:switch(Nk()){case 42:case 47:gk(Vk(Fk(Ok(),Rk()),t,n,l),l);break;default:C+="/"}break;case 123*m:s[u++]=hk(C)*y;case 125*m:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+c:-1==y&&(C=ck(C,/\f/g,"")),p>0&&hk(C)-d&&gk(p>32?Bk(C+";",r,n,d-1,l):Bk(ck(C," ","")+";",r,n,d-2,l),l);break;case 59:C+=";";default:if(gk(S=Hk(C,t,n,u,c,o,s,b,w=[],x=[],d,a),a),123===v)if(0===c)$k(C,t,S,S,w,a,d,s,x);else switch(99===f&&110===fk(C,3)?100:f){case 100:case 108:case 109:case 115:$k(e,S,S,r&&gk(Hk(e,S,S,0,0,o,s,b,o,w=[],d,x),x),o,x,d,s,r?w:x);break;default:$k(C,S,S,S,[""],x,0,s,x)}}u=c=p=0,m=y=1,b=C="",d=i;break;case 58:d=1+hk(C),p=h;default:if(m<1)if(123==v)--m;else if(125==v&&0==m++&&125==jk())continue;switch(C+=ik(v),v*m){case 38:y=c>0?1:(C+="\f",-1);break;case 44:s[u++]=(hk(C)-1)*y,y=1;break;case 64:45===Nk()&&(C+=Dk(Ok())),f=Nk(),c=d=hk(b=C+=Lk(Rk())),v++;break;case 45:45===h&&2==hk(C)&&(m=0)}}return a}function Hk(e,t,n,r,o,a,i,s,l,u,c,d){for(var f=o-1,p=0===o?a:[""],h=mk(p),m=0,g=0,y=0;m<r;++m)for(var v=0,b=pk(e,f+1,f=ak(g=i[m])),w=e;v<h;++v)(w=lk(g>0?p[v]+" "+b:ck(b,/&\f/g,p[v])))&&(l[y++]=w);return kk(e,t,n,0===o?nk:s,l,u,c,d)}function Vk(e,t,n,r){return kk(e,t,n,tk,ik(Sk),pk(e,2,-2),0,r)}function Bk(e,t,n,r,o){return kk(e,t,n,rk,pk(e,0,r),pk(e,r+1,-1),r,o)}function Uk(e,t,n){switch(function(e,t){return 45^fk(e,0)?(((t<<2^fk(e,0))<<2^fk(e,1))<<2^fk(e,2))<<2^fk(e,3):0}(e,t)){case 5103:return ek+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ek+e+e;case 4789:return JC+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ek+e+JC+e+ZC+e+e;case 5936:switch(fk(e,t+11)){case 114:return ek+e+ZC+ck(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ek+e+ZC+ck(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ek+e+ZC+ck(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return ek+e+ZC+e+e;case 6165:return ek+e+ZC+"flex-"+e+e;case 5187:return ek+e+ck(e,/(\w+).+(:[^]+)/,ek+"box-$1$2"+ZC+"flex-$1$2")+e;case 5443:return ek+e+ZC+"flex-item-"+ck(e,/flex-|-self/g,"")+(uk(e,/flex-|baseline/)?"":ZC+"grid-row-"+ck(e,/flex-|-self/g,""))+e;case 4675:return ek+e+ZC+"flex-line-pack"+ck(e,/align-content|flex-|-self/g,"")+e;case 5548:return ek+e+ZC+ck(e,"shrink","negative")+e;case 5292:return ek+e+ZC+ck(e,"basis","preferred-size")+e;case 6060:return ek+"box-"+ck(e,"-grow","")+ek+e+ZC+ck(e,"grow","positive")+e;case 4554:return ek+ck(e,/([^-])(transform)/g,"$1"+ek+"$2")+e;case 6187:return ck(ck(ck(e,/(zoom-|grab)/,ek+"$1"),/(image-set)/,ek+"$1"),e,"")+e;case 5495:case 3959:return ck(e,/(image-set\([^]*)/,ek+"$1$`$1");case 4968:return ck(ck(e,/(.+:)(flex-)?(.*)/,ek+"box-pack:$3"+ZC+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ek+e+e;case 4200:if(!uk(e,/flex-|baseline/))return ZC+"grid-column-align"+pk(e,t)+e;break;case 2592:case 3360:return ZC+ck(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,uk(e.props,/grid-\w+-end/)})?~dk(e+(n=n[t].value),"span",0)?e:ZC+ck(e,"-start","")+e+ZC+"grid-row-span:"+(~dk(n,"span",0)?uk(n,/\d+/):+uk(n,/\d+/)-+uk(e,/\d+/))+";":ZC+ck(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(e){return uk(e.props,/grid-\w+-start/)})?e:ZC+ck(ck(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return ck(e,/(.+)-inline(.+)/,ek+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(hk(e)-1-t>6)switch(fk(e,t+1)){case 109:if(45!==fk(e,t+4))break;case 102:return ck(e,/(.+:)(.+)-([^]+)/,"$1"+ek+"$2-$3$1"+JC+(108==fk(e,t+3)?"$3":"$2-$3"))+e;case 115:return~dk(e,"stretch",0)?Uk(ck(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return ck(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,o,a,i,s){return ZC+n+":"+r+s+(o?ZC+n+"-span:"+(a?i:+i-+r)+s:"")+e});case 4949:if(121===fk(e,t+6))return ck(e,":",":"+ek)+e;break;case 6444:switch(fk(e,45===fk(e,14)?18:11)){case 120:return ck(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+ek+(45===fk(e,14)?"inline-":"")+"box$3$1"+ek+"$2$3$1"+ZC+"$2box$3")+e;case 100:return ck(e,":",":"+ZC)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return ck(e,"scroll-","scroll-snap-")+e}return e}function Wk(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function qk(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case rk:return e.return=e.return||e.value;case tk:return"";case ok:return e.return=e.value+"{"+Wk(e.children,r)+"}";case nk:if(!hk(e.value=e.props.join(",")))return""}return hk(n=Wk(e.children,r))?e.return=e.value+"{"+n+"}":""}function Yk(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case rk:return void(e.return=Uk(e.value,e.length,n));case ok:return Wk([_k(e,{value:ck(e.value,"@","@"+ek)})],r);case nk:if(e.length)return function(e,t){return e.map(t).join("")}(n=e.props,function(t){switch(uk(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Ek(_k(e,{props:[ck(t,/:(read-\w+)/,":-moz-$1")]})),Ek(_k(e,{props:[t]})),sk(e,{props:yk(n,r)});break;case"::placeholder":Ek(_k(e,{props:[ck(t,/:(plac\w+)/,":"+ek+"input-$1")]})),Ek(_k(e,{props:[ck(t,/:(plac\w+)/,":-moz-$1")]})),Ek(_k(e,{props:[ck(t,/:(plac\w+)/,ZC+"input-$1")]})),Ek(_k(e,{props:[t]})),sk(e,{props:yk(n,r)})}return""})}}var Gk={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Kk="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Qk="active",Xk="data-styled-version",Zk="6.1.19",Jk="/*!sc*/\n",e_="undefined"!=typeof window&&"undefined"!=typeof document,t_=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY&&("false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY)),n_=Object.freeze([]),r_=Object.freeze({});var o_=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),a_=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,i_=/(^-|-$)/g;function s_(e){return e.replace(a_,"-").replace(i_,"")}var l_=/(a)(d)/gi,u_=function(e){return String.fromCharCode(e+(e>25?39:97))};function c_(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=u_(t%52)+n;return(u_(t%52)+n).replace(l_,"$1-$2")}var d_,f_=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},p_=function(e){return f_(5381,e)};function h_(e){return c_(p_(e)>>>0)}function m_(e){return"string"==typeof e&&!0}var g_="function"==typeof Symbol&&Symbol.for,y_=g_?Symbol.for("react.memo"):60115,v_=g_?Symbol.for("react.forward_ref"):60112,b_={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},w_={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},x_={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},S_=((d_={})[v_]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},d_[y_]=x_,d_);function C_(e){return("type"in(t=e)&&t.type.$$typeof)===y_?x_:"$$typeof"in e?S_[e.$$typeof]:b_;var t}var k_=Object.defineProperty,__=Object.getOwnPropertyNames,E_=Object.getOwnPropertySymbols,j_=Object.getOwnPropertyDescriptor,O_=Object.getPrototypeOf,N_=Object.prototype;function R_(e,t,n){if("string"!=typeof t){if(N_){var r=O_(t);r&&r!==N_&&R_(e,r,n)}var o=__(t);E_&&(o=o.concat(E_(t)));for(var a=C_(e),i=C_(t),s=0;s<o.length;++s){var l=o[s];if(!(l in w_||n&&n[l]||i&&l in i||a&&l in a)){var u=j_(t,l);try{k_(e,l,u)}catch(e){}}}}return e}function P_(e){return"function"==typeof e}function T_(e){return"object"==typeof e&&"styledComponentId"in e}function D_(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function M_(e,t){if(0===e.length)return"";for(var n=e[0],r=1;r<e.length;r++)n+=e[r];return n}function I_(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function A_(e,t,n){if(void 0===n&&(n=!1),!n&&!I_(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=A_(e[r],t[r]);else if(I_(t))for(var r in t)e[r]=A_(e[r],t[r]);return e}function F_(e,t){Object.defineProperty(e,"toString",{value:t})}function L_(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var z_=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw L_(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var a=r;a<o;a++)this.groupSizes[a]=0}for(var i=this.indexOfGroup(e+1),s=(a=0,t.length);a<s;a++)this.tag.insertRule(i,t[a])&&(this.groupSizes[e]++,i++)},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,a=r;a<o;a++)t+="".concat(this.tag.getRule(a)).concat(Jk);return t},e}(),$_=new Map,H_=new Map,V_=1,B_=function(e){if($_.has(e))return $_.get(e);for(;H_.has(V_);)V_++;var t=V_++;return $_.set(e,t),H_.set(t,e),t},U_=function(e,t){V_=t+1,$_.set(e,t),H_.set(t,e)},W_="style[".concat(Kk,"][").concat(Xk,'="').concat(Zk,'"]'),q_=new RegExp("^".concat(Kk,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Y_=function(e,t,n){for(var r,o=n.split(","),a=0,i=o.length;a<i;a++)(r=o[a])&&e.registerName(t,r)},G_=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(Jk),o=[],a=0,i=r.length;a<i;a++){var s=r[a].trim();if(s){var l=s.match(q_);if(l){var u=0|parseInt(l[1],10),c=l[2];0!==u&&(U_(c,u),Y_(e,c,l[3]),e.getTag().insertRules(u,o)),o.length=0}else o.push(s)}}},K_=function(e){for(var t=document.querySelectorAll(W_),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(Kk)!==Qk&&(G_(e,o),o.parentNode&&o.parentNode.removeChild(o))}};var Q_=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(Kk,"]")));return t[t.length-1]}(n),a=void 0!==o?o.nextSibling:null;r.setAttribute(Kk,Qk),r.setAttribute(Xk,Zk);var i="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return i&&r.setAttribute("nonce",i),n.insertBefore(r,a),r},X_=function(){function e(e){this.element=Q_(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw L_(17)}(this.element),this.length=0}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),Z_=function(){function e(e){this.element=Q_(e),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),J_=function(){function e(e){this.rules=[],this.length=0}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),eE=e_,tE={isServer:!e_,useCSSOMInjection:!t_},nE=function(){function e(e,t,n){void 0===e&&(e=r_),void 0===t&&(t={});var r=this;this.options=Fl(Fl({},tE),e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&e_&&eE&&(eE=!1,K_(this)),F_(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return H_.get(e)}(n);if(void 0===o)return"continue";var a=e.names.get(o),i=t.getGroup(n);if(void 0===a||!a.size||0===i.length)return"continue";var s="".concat(Kk,".g").concat(n,'[id="').concat(o,'"]'),l="";void 0!==a&&a.forEach(function(e){e.length>0&&(l+="".concat(e,","))}),r+="".concat(i).concat(s,'{content:"').concat(l,'"}').concat(Jk)},a=0;a<n;a++)o(a);return r}(r)})}return e.registerId=function(e){return B_(e)},e.prototype.rehydrate=function(){!this.server&&e_&&K_(this)},e.prototype.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(Fl(Fl({},this.options),t),this.gs,n&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new J_(n):t?new X_(n):new Z_(n)}(this.options),new z_(e)));var e},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(B_(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(B_(e),n)},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},e.prototype.clearRules=function(e){this.getTag().clearGroup(B_(e)),this.clearNames(e)},e.prototype.clearTag=function(){this.tag=void 0},e}(),rE=/&/g,oE=/^\s*\/\/.*$/gm;function aE(e,t){return e.map(function(e){return"rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return"".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=aE(e.children,t)),e})}var iE=new nE,sE=function(){var e,t,n,r=r_,o=r.options,a=void 0===o?r_:o,i=r.plugins,s=void 0===i?n_:i,l=function(n,r,o){return o.startsWith(t)&&o.endsWith(t)&&o.replaceAll(t,"").length>0?".".concat(e):n},u=s.slice();u.push(function(e){e.type===nk&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(rE,t).replace(n,l))}),a.prefix&&u.push(Yk),u.push(qk);var c=function(r,o,i,s){void 0===o&&(o=""),void 0===i&&(i=""),void 0===s&&(s="&"),e=s,t=o,n=new RegExp("\\".concat(t,"\\b"),"g");var l=r.replace(oE,""),c=zk(i||o?"".concat(i," ").concat(o," { ").concat(l," }"):l);a.namespace&&(c=aE(c,a.namespace));var d,f=[];return Wk(c,function(e){var t=mk(e);return function(n,r,o,a){for(var i="",s=0;s<t;s++)i+=e[s](n,r,o,a)||"";return i}}(u.concat((d=function(e){return f.push(e)},function(e){e.root||(e=e.return)&&d(e)})))),f};return c.hash=s.length?s.reduce(function(e,t){return t.name||L_(15),f_(e,t.name)},5381).toString():"",c}(),lE=M.createContext({shouldForwardProp:void 0,styleSheet:iE,stylis:sE});function uE(){return D.useContext(lE)}lE.Consumer,M.createContext(void 0);var cE=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=sE);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,F_(this,function(){throw L_(12,String(n.name))})}return e.prototype.getName=function(e){return void 0===e&&(e=sE),this.name+e.hash},e}(),dE=function(e){return e>="A"&&e<="Z"};function fE(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;dE(r)?t+="-"+r.toLowerCase():t+=r}return t.startsWith("ms-")?"-"+t:t}var pE=function(e){return null==e||!1===e||""===e},hE=function(e){var t,n,r=[];for(var o in e){var a=e[o];e.hasOwnProperty(o)&&!pE(a)&&(Array.isArray(a)&&a.isCss||P_(a)?r.push("".concat(fE(o),":"),a,";"):I_(a)?r.push.apply(r,zl(zl(["".concat(o," {")],hE(a),!1),["}"],!1)):r.push("".concat(fE(o),": ").concat((t=o,null==(n=a)||"boolean"==typeof n||""===n?"":"number"!=typeof n||0===n||t in Gk||t.startsWith("--")?String(n).trim():"".concat(n,"px")),";")))}return r};function mE(e,t,n,r){return pE(e)?[]:T_(e)?[".".concat(e.styledComponentId)]:P_(e)?!P_(o=e)||o.prototype&&o.prototype.isReactComponent||!t?[e]:mE(e(t),t,n,r):e instanceof cE?n?(e.inject(n,r),[e.getName(r)]):[e]:I_(e)?hE(e):Array.isArray(e)?Array.prototype.concat.apply(n_,e.map(function(e){return mE(e,t,n,r)})):[e.toString()];var o}var gE=p_(Zk),yE=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(P_(n)&&!T_(n))return!1}return!0}(e),this.componentId=t,this.baseHash=f_(gE,t),this.baseStyle=n,nE.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=D_(r,this.staticRulesId);else{var o=M_(mE(this.rules,e,t,n)),a=c_(f_(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,a)){var i=n(o,".".concat(a),void 0,this.componentId);t.insertRules(this.componentId,a,i)}r=D_(r,a),this.staticRulesId=a}else{for(var s=f_(this.baseHash,n.hash),l="",u=0;u<this.rules.length;u++){var c=this.rules[u];if("string"==typeof c)l+=c;else if(c){var d=M_(mE(c,e,t,n));s=f_(s,d+u),l+=d}}if(l){var f=c_(s>>>0);t.hasNameForId(this.componentId,f)||t.insertRules(this.componentId,f,n(l,".".concat(f),void 0,this.componentId)),r=D_(r,f)}}return r},e}(),vE=M.createContext(void 0);vE.Consumer;var bE={};function wE(e,t,n){var r=T_(e),o=e,a=!m_(e),i=t.attrs,s=void 0===i?n_:i,l=t.componentId,u=void 0===l?function(e,t){var n="string"!=typeof e?"sc":s_(e);bE[n]=(bE[n]||0)+1;var r="".concat(n,"-").concat(h_(Zk+n+bE[n]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):l,c=t.displayName,d=void 0===c?function(e){return m_(e)?"styled.".concat(e):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(e),")")}(e):c,f=t.displayName&&t.componentId?"".concat(s_(t.displayName),"-").concat(t.componentId):t.componentId||u,p=r&&o.attrs?o.attrs.concat(s).filter(Boolean):s,h=t.shouldForwardProp;if(r&&o.shouldForwardProp){var m=o.shouldForwardProp;if(t.shouldForwardProp){var g=t.shouldForwardProp;h=function(e,t){return m(e,t)&&g(e,t)}}else h=m}var y=new yE(n,f,r?o.componentStyle:void 0);function v(e,t){return function(e,t,n){var r=e.attrs,o=e.componentStyle,a=e.defaultProps,i=e.foldedComponentIds,s=e.styledComponentId,l=e.target,u=M.useContext(vE),c=uE(),d=e.shouldForwardProp||c.shouldForwardProp,f=function(e,t,n){return void 0===n&&(n=r_),e.theme!==n.theme&&e.theme||t||n.theme}(t,u,a)||r_,p=function(e,t,n){for(var r,o=Fl(Fl({},t),{className:void 0,theme:n}),a=0;a<e.length;a+=1){var i=P_(r=e[a])?r(o):r;for(var s in i)o[s]="className"===s?D_(o[s],i[s]):"style"===s?Fl(Fl({},o[s]),i[s]):i[s]}return t.className&&(o.className=D_(o.className,t.className)),o}(r,t,f),h=p.as||l,m={};for(var g in p)void 0===p[g]||"$"===g[0]||"as"===g||"theme"===g&&p.theme===f||("forwardedAs"===g?m.as=p.forwardedAs:d&&!d(g,h)||(m[g]=p[g]));var y=function(e,t){var n=uE();return e.generateAndInjectStyles(t,n.styleSheet,n.stylis)}(o,p),v=D_(i,s);return y&&(v+=" "+y),p.className&&(v+=" "+p.className),m[m_(h)&&!o_.has(h)?"class":"className"]=v,n&&(m.ref=n),D.createElement(h,m)}(b,e,t)}v.displayName=d;var b=M.forwardRef(v);return b.attrs=p,b.componentStyle=y,b.displayName=d,b.shouldForwardProp=h,b.foldedComponentIds=r?D_(o.foldedComponentIds,o.styledComponentId):"",b.styledComponentId=f,b.target=r?o.target:e,Object.defineProperty(b,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=r?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)A_(e,o[r],!0);return e}({},o.defaultProps,e):e}}),F_(b,function(){return".".concat(b.styledComponentId)}),a&&R_(b,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),b}function xE(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var SE=function(e){return Object.assign(e,{isCss:!0})};function CE(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(P_(e)||I_(e))return SE(mE(xE(n_,zl([e],t,!0))));var r=e;return 0===t.length&&1===r.length&&"string"==typeof r[0]?mE(r):SE(mE(xE(r,t)))}function kE(e,t,n){if(void 0===n&&(n=r_),!t)throw L_(1,t);var r=function(r){for(var o=[],a=1;a<arguments.length;a++)o[a-1]=arguments[a];return e(t,n,CE.apply(void 0,zl([r],o,!1)))};return r.attrs=function(r){return kE(e,t,Fl(Fl({},n),{attrs:Array.prototype.concat(n.attrs,r).filter(Boolean)}))},r.withConfig=function(r){return kE(e,t,Fl(Fl({},n),r))},r}var _E=function(e){return kE(wE,e)},EE=_E;function jE(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=M_(CE.apply(void 0,zl([e],t,!1))),o=h_(r);return new cE(o,r)}o_.forEach(function(e){EE[e]=_E(e)});const OE={"aria-busy":!0,role:"progressbar"},NE=EE.div`
142
142
  display: ${e=>e.$visible?"flex":"none"};
143
143
  `,RE=242.776657104492,PE=jE`
144
144
  12.5% {
@@ -220,7 +220,7 @@ to {
220
220
  animation: ${ME} 2.5s cubic-bezier(0.35, 0.04, 0.63, 0.95) infinite;
221
221
  `,EE.svg`
222
222
  transform-origin: 50% 65%;
223
- `;var LE=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});D.forwardRef((e,t)=>m.jsx(ba.span,{...e,ref:t,style:{...LE,...e.style}})).displayName="VisuallyHidden";var zE=[" ","Enter","ArrowUp","ArrowDown"],$E=[" ","Enter"],HE="Select",[VE,BE,UE]=xa(HE),[WE]=sa(HE,[UE,Bs]),qE=Bs(),[YE,GE]=WE(HE),[KE,QE]=WE(HE),XE=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:p,form:h}=e,g=qE(t),[y,v]=D.useState(null),[b,w]=D.useState(null),[x,S]=D.useState(!1),C=Ca(u),[k,_]=da({prop:r,defaultProp:o??!1,onChange:a,caller:HE}),[E,j]=da({prop:i,defaultProp:s,onChange:l,caller:HE}),O=D.useRef(null),N=!y||(h||!!y.closest("form")),[R,P]=D.useState(new Set),T=Array.from(R).map(e=>e.props.value).join(";");return m.jsx(al,{...g,children:m.jsxs(YE,{required:p,scope:t,trigger:y,onTriggerChange:v,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:Ka(),value:E,onValueChange:j,open:k,onOpenChange:_,dir:C,triggerPointerDownPosRef:O,disabled:f,children:[m.jsx(VE.Provider,{scope:t,children:m.jsx(KE,{scope:e.__scopeSelect,onNativeOptionAdd:D.useCallback(e=>{P(t=>new Set(t).add(e))},[]),onNativeOptionRemove:D.useCallback(e=>{P(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:n})}),N?m.jsxs(Fj,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:E,onChange:e=>j(e.target.value),disabled:f,form:h,children:[void 0===E?m.jsx("option",{value:""}):null,Array.from(R)]},T):null]})})};XE.displayName=HE;var ZE="SelectTrigger",JE=D.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=qE(n),i=GE(ZE,n),s=i.disabled||r,l=ia(t,i.onTriggerChange),u=BE(n),c=D.useRef("touch"),[d,f,p]=zj(e=>{const t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===i.value),r=$j(t,e,n);void 0!==r&&i.onValueChange(r.value)}),h=e=>{s||(i.onOpenChange(!0),p()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return m.jsx(il,{asChild:!0,...a,children:m.jsx(ba.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Lj(i.value)?"":void 0,...o,ref:l,onClick:ra(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==c.current&&h(e)}),onPointerDown:ra(o.onPointerDown,e=>{c.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(h(e),e.preventDefault())}),onKeyDown:ra(o.onKeyDown,e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),t&&" "===e.key||zE.includes(e.key)&&(h(),e.preventDefault())})})})});JE.displayName=ZE;var ej="SelectValue",tj=D.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,l=GE(ej,n),{onValueNodeHasChildrenChange:u}=l,c=void 0!==a,d=ia(t,l.onValueNodeChange);return ua(()=>{u(c)},[u,c]),m.jsx(ba.span,{...s,ref:d,style:{pointerEvents:"none"},children:Lj(l.value)?m.jsx(m.Fragment,{children:i}):a})});tj.displayName=ej;var nj=D.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return m.jsx(ba.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});nj.displayName="SelectIcon";var rj=e=>m.jsx(ul,{asChild:!0,...e});rj.displayName="SelectPortal";var oj="SelectContent",aj=D.forwardRef((e,t)=>{const n=GE(oj,e.__scopeSelect),[r,o]=D.useState();if(ua(()=>{o(new DocumentFragment)},[]),!n.open){const t=r;return t?fa.createPortal(m.jsx(sj,{scope:e.__scopeSelect,children:m.jsx(VE.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),t):null}return m.jsx(cj,{...e,ref:t})});aj.displayName=oj;var ij=10,[sj,lj]=WE(oj),uj=ha("SelectContent.RemoveScroll"),cj=D.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:g,avoidCollisions:y,...v}=e,b=GE(oj,n),[w,x]=D.useState(null),[S,C]=D.useState(null),k=ia(t,e=>x(e)),[_,E]=D.useState(null),[j,O]=D.useState(null),N=BE(n),[R,P]=D.useState(!1),T=D.useRef(!1);D.useEffect(()=>{if(w)return Al(w)},[w]),Ia();const M=D.useCallback(e=>{const[t,...n]=N().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(const n of e){if(n===o)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==o)return}},[N,S]),I=D.useCallback(()=>M([_,w]),[M,_,w]);D.useEffect(()=>{R&&I()},[R,I]);const{onOpenChange:A,triggerPointerDownPosRef:F}=b;D.useEffect(()=>{if(w){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():w.contains(n.target)||A(!1),document.removeEventListener("pointermove",t),F.current=null};return null!==F.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[w,A,F]),D.useEffect(()=>{const e=()=>A(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[A]);const[L,z]=zj(e=>{const t=N().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=$j(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),$=D.useCallback((e,t,n)=>{const r=!T.current&&!n;(void 0!==b.value&&b.value===t||r)&&(E(e),r&&(T.current=!0))},[b.value]),H=D.useCallback(()=>w?.focus(),[w]),V=D.useCallback((e,t,n)=>{const r=!T.current&&!n;(void 0!==b.value&&b.value===t||r)&&O(e)},[b.value]),B="popper"===r?fj:dj,U=B===fj?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:g,avoidCollisions:y}:{};return m.jsx(sj,{scope:n,content:w,viewport:S,onViewportChange:C,itemRefCallback:$,selectedItem:_,onItemLeave:H,itemTextRefCallback:V,focusSelectedItem:I,selectedItemText:j,position:r,isPositioned:R,searchRef:L,children:m.jsx(ku,{as:uj,allowPinchZoom:!0,children:m.jsx($a,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:ra(o,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:m.jsx(Ra,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:m.jsx(B,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...v,...U,onPlaced:()=>P(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:ra(v.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=N().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>M(t)),e.preventDefault()}})})})})})})});cj.displayName="SelectContentImpl";var dj=D.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=GE(oj,n),i=lj(oj,n),[s,l]=D.useState(null),[u,c]=D.useState(null),d=ia(t,e=>c(e)),f=BE(n),p=D.useRef(!1),h=D.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:v,focusSelectedItem:b}=i,w=D.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&y&&v){const e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=v.getBoundingClientRect();if("rtl"!==a.dir){const r=o.left-t.left,a=n.left-r,i=e.left-a,l=e.width+i,u=Math.max(l,t.width),c=window.innerWidth-ij,d=FE(a,[ij,Math.max(ij,c-u)]);s.style.minWidth=l+"px",s.style.left=d+"px"}else{const r=t.right-o.right,a=window.innerWidth-n.right-r,i=window.innerWidth-e.right-a,l=e.width+i,u=Math.max(l,t.width),c=window.innerWidth-ij,d=FE(a,[ij,Math.max(ij,c-u)]);s.style.minWidth=l+"px",s.style.right=d+"px"}const i=f(),l=window.innerHeight-2*ij,c=g.scrollHeight,d=window.getComputedStyle(u),h=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=h+m+c+parseInt(d.paddingBottom,10)+b,x=Math.min(5*y.offsetHeight,w),S=window.getComputedStyle(g),C=parseInt(S.paddingTop,10),k=parseInt(S.paddingBottom,10),_=e.top+e.height/2-ij,E=l-_,j=y.offsetHeight/2,O=h+m+(y.offsetTop+j),N=w-O;if(O<=_){const e=i.length>0&&y===i[i.length-1].ref.current;s.style.bottom="0px";const t=u.clientHeight-g.offsetTop-g.offsetHeight,n=O+Math.max(E,j+(e?k:0)+t+b);s.style.height=n+"px"}else{const e=i.length>0&&y===i[0].ref.current;s.style.top="0px";const t=Math.max(_,h+g.offsetTop+(e?C:0)+j)+N;s.style.height=t+"px",g.scrollTop=O-_+g.offsetTop}s.style.margin=`${ij}px 0`,s.style.minHeight=x+"px",s.style.maxHeight=l+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,u,g,y,v,a.dir,r]);ua(()=>w(),[w]);const[x,S]=D.useState();ua(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const C=D.useCallback(e=>{e&&!0===h.current&&(w(),b?.(),h.current=!1)},[w,b]);return m.jsx(pj,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:m.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:m.jsx(ba.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});dj.displayName="SelectItemAlignedPosition";var fj=D.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ij,...a}=e,i=qE(n);return m.jsx(sl,{...i,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});fj.displayName="SelectPopperPosition";var[pj,hj]=WE(oj,{}),mj="SelectViewport",gj=D.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=lj(mj,n),i=hj(mj,n),s=ia(t,a.onViewportChange),l=D.useRef(0);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),m.jsx(VE.Slot,{scope:n,children:m.jsx(ba.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ra(o.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if(r?.current&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*ij,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),s=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop})})})]})});gj.displayName=mj;var yj="SelectGroup",[vj,bj]=WE(yj);D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ka();return m.jsx(vj,{scope:n,id:o,children:m.jsx(ba.div,{role:"group","aria-labelledby":o,...r,ref:t})})}).displayName=yj;var wj="SelectLabel",xj=D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=bj(wj,n);return m.jsx(ba.div,{id:o.id,...r,ref:t})});xj.displayName=wj;var Sj="SelectItem",[Cj,kj]=WE(Sj),_j=D.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=GE(Sj,n),l=lj(Sj,n),u=s.value===r,[c,d]=D.useState(a??""),[f,p]=D.useState(!1),h=ia(t,e=>l.itemRefCallback?.(e,r,o)),g=Ka(),y=D.useRef("touch"),v=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return m.jsx(Cj,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:D.useCallback(e=>{d(t=>t||(e?.textContent??"").trim())},[]),children:m.jsx(VE.ItemSlot,{scope:n,value:r,disabled:o,textValue:c,children:m.jsx(ba.div,{role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:h,onFocus:ra(i.onFocus,()=>p(!0)),onBlur:ra(i.onBlur,()=>p(!1)),onClick:ra(i.onClick,()=>{"mouse"!==y.current&&v()}),onPointerUp:ra(i.onPointerUp,()=>{"mouse"===y.current&&v()}),onPointerDown:ra(i.onPointerDown,e=>{y.current=e.pointerType}),onPointerMove:ra(i.onPointerMove,e=>{y.current=e.pointerType,o?l.onItemLeave?.():"mouse"===y.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ra(i.onPointerLeave,e=>{e.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:ra(i.onKeyDown,e=>{""!==l.searchRef?.current&&" "===e.key||($E.includes(e.key)&&v()," "===e.key&&e.preventDefault())})})})})});_j.displayName=Sj;var Ej="SelectItemText",jj=D.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=GE(Ej,n),s=lj(Ej,n),l=kj(Ej,n),u=QE(Ej,n),[c,d]=D.useState(null),f=ia(t,e=>d(e),l.onItemTextChange,e=>s.itemTextRefCallback?.(e,l.value,l.disabled)),p=c?.textContent,h=D.useMemo(()=>m.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=u;return ua(()=>(g(h),()=>y(h)),[g,y,h]),m.jsxs(m.Fragment,{children:[m.jsx(ba.span,{id:l.textId,...a,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?fa.createPortal(a.children,i.valueNode):null]})});jj.displayName=Ej;var Oj="SelectItemIndicator",Nj=D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return kj(Oj,n).isSelected?m.jsx(ba.span,{"aria-hidden":!0,...r,ref:t}):null});Nj.displayName=Oj;var Rj="SelectScrollUpButton",Pj=D.forwardRef((e,t)=>{const n=lj(Rj,e.__scopeSelect),r=hj(Rj,e.__scopeSelect),[o,a]=D.useState(!1),i=ia(t,r.onScrollButtonChange);return ua(()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?m.jsx(Mj,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});Pj.displayName=Rj;var Tj="SelectScrollDownButton",Dj=D.forwardRef((e,t)=>{const n=lj(Tj,e.__scopeSelect),r=hj(Tj,e.__scopeSelect),[o,a]=D.useState(!1),i=ia(t,r.onScrollButtonChange);return ua(()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?m.jsx(Mj,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});Dj.displayName=Tj;var Mj=D.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=lj("SelectScrollButton",n),i=D.useRef(null),s=BE(n),l=D.useCallback(()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)},[]);return D.useEffect(()=>()=>l(),[l]),ua(()=>{const e=s().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[s]),m.jsx(ba.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ra(o.onPointerDown,()=>{null===i.current&&(i.current=window.setInterval(r,50))}),onPointerMove:ra(o.onPointerMove,()=>{a.onItemLeave?.(),null===i.current&&(i.current=window.setInterval(r,50))}),onPointerLeave:ra(o.onPointerLeave,()=>{l()})})}),Ij=D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m.jsx(ba.div,{"aria-hidden":!0,...r,ref:t})});Ij.displayName="SelectSeparator";var Aj="SelectArrow";D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=qE(n),a=GE(Aj,n),i=lj(Aj,n);return a.open&&"popper"===i.position?m.jsx(ll,{...o,...r,ref:t}):null}).displayName=Aj;var Fj=D.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=D.useRef(null),a=ia(r,o),i=function(e){const t=D.useRef({value:e,previous:e});return D.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}(t);return D.useEffect(()=>{const e=o.current;if(!e)return;const n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,"value").set;if(i!==t&&r){const n=new Event("change",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[i,t]),m.jsx(ba.select,{...n,style:{...LE,...n.style},ref:a,defaultValue:t})});function Lj(e){return""===e||void 0===e}function zj(e){const t=ka(e),n=D.useRef(""),r=D.useRef(0),o=D.useCallback(e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),a=D.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return D.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function $j(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0]),o=r?t[0]:t,a=n?e.indexOf(n):-1;let i=(s=e,l=Math.max(a,0),s.map((e,t)=>s[(l+t)%s.length]));var s,l;1===o.length&&(i=i.filter(e=>e!==n));const u=i.find(e=>e.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}Fj.displayName="SelectBubbleInput";var Hj=JE,Vj=nj,Bj=rj,Uj=aj,Wj=gj,qj=xj,Yj=_j,Gj=jj,Kj=Nj,Qj=Pj,Xj=Dj,Zj=Ij;const Jj=XE,eO=tj,tO=D.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(Hj,{ref:r,className:Ko("flex h-10 w-full items-center hover:border-[#BFD7FE] justify-between rounded-md border focus:border-primary border-neutral-200 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-neutral-500 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 ",e),...n,children:[t,m.jsx(Vj,{asChild:!0,children:m.jsx(Rd,{className:"h-4 w-4 opacity-50"})})]}));tO.displayName=Hj.displayName;const nO=D.forwardRef(({className:e,...t},n)=>m.jsx(Qj,{ref:n,className:Ko("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(Td,{className:"h-4 w-4"})}));nO.displayName=Qj.displayName;const rO=D.forwardRef(({className:e,...t},n)=>m.jsx(Xj,{ref:n,className:Ko("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(Rd,{className:"h-4 w-4"})}));rO.displayName=Xj.displayName;const oO=D.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>m.jsx(Bj,{children:m.jsxs(Uj,{ref:o,className:Ko("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white text-neutral-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[m.jsx(nO,{}),m.jsx(Wj,{className:Ko("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),m.jsx(rO,{})]})}));oO.displayName=Uj.displayName;D.forwardRef(({className:e,...t},n)=>m.jsx(qj,{ref:n,className:Ko("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t})).displayName=qj.displayName;const aO=D.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(Yj,{ref:r,className:Ko("relative flex w-full select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-primary/20 cursor-pointer focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50",e),...n,children:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(Kj,{children:m.jsx(Nd,{className:"h-4 w-4"})})}),m.jsx(Gj,{children:t})]}));aO.displayName=Yj.displayName;function iO({label:e,addonLabel:t,type:n,placeholder:r,selectPlaceholder:o,error:a,success:i,value:s,defaultValue:l,name:u,id:c,formik:d,onChange:f,inputRef:p,onBlur:h,required:g,disabled:y,loading:v,showError:b,selectOptions:w,disableSearch:x,searchSelectPlaceholder:S,showSelectSearch:C,onSelectValueChange:k,selectValue:_,showOutline:E=!0,cols:j,rows:O,labelClass:N,addonLabelClass:R,optional:P,info:T,addonInfo:M,icon:I,actionIcon:A,actionLabel:F,actionLabelInfo:L,actionLabelAction:z,className:$,textAreaOnChange:H,addOn:V,infoAlignment:B,addonInfoAlignment:U,inputContainerClass:W,showNegative:q,showPositive:Y,...G}){const[K,Q]=D.useState(n),[X,Z]=D.useState(!1),[J,ee]=D.useState(""),te=((e,t)=>{const n=e?.filter(e=>"string"==typeof e.label?e.label?.toLowerCase().includes(t.toLowerCase()):e.value?.toLowerCase().includes(t.toLowerCase())||e?.searchId?.toLowerCase().includes(t.toLowerCase()));return t?n:e})(w??[],J);return m.jsx(m.Fragment,{children:v?m.jsx(na,{className:"w-full h-12"}):m.jsx("div",{className:"w-full",children:m.jsxs("div",{className:`flex flex-col ${e&&"gap-2.5"} relative `,children:[m.jsxs("div",{className:"flex justify-between gap-2 flex-wrap",children:[t&&m.jsxs("label",{className:Ko("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",R),children:[t," ",g?m.jsx("span",{className:"text-[#E12D39]",children:t&&"*"}):P?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,M&&m.jsx(kv,{fieldName:t,align:U,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:M})})]}),e&&m.jsxs("label",{className:Ko("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",N),children:[e," ",g?m.jsx("span",{className:"text-[#E12D39]",children:e&&"*"}):P?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,T&&m.jsx(kv,{fieldName:e,align:B,children:m.jsx("p",{className:"font-normal first-letter:uppercase w-full whitespace-pre-wrap",children:T})})]}),F&&m.jsxs("button",{onClick:z,className:"text-primary flex items-center gap-1 first-letter:uppercase text-sm font-bold",children:[A,F,L&&m.jsx(kv,{fieldName:e,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:L})})]})]}),m.jsxs("div",{className:Ko(`border overflow-hidden rounded-md text-sm border-[#E1E3EA] hover:border-primary_light font-normal text-grey-950 flex gap-2 items-center bg-white px-3 ${"text-area"!==n&&"h-12"} ${(a||b)&&"!border-danger"} ${i&&"!border-success"} ${X&&E&&"!border-primary"}\n ${I&&"px-2"}\n ${V&&"px-0"}\n `,y?"cursor-not-allowed bg-gray-200":null,w?"px-0":null,W),children:[V&&m.jsx("span",{className:"bg-gray-200 text-[13px] font-semibold text-gray-700 h-full min-w-9.5 flex items-center justify-center shrink-0 rounded-l-md px-2 ",children:V}),I,w&&m.jsxs(Jj,{onValueChange:k,defaultValue:_,value:_,children:[m.jsx(tO,{disabled:x,className:" min-w-max w-max h-full border-0 border-r rounded-none hover:border-neutral-200 focus:border-neutral-200 bg-[#F9F9F9] hover:border-b-neutral-200 disabled:opacity-100 ",children:m.jsx(eO,{className:" text-sm text-[#5E6278] placeholder:font-medium outline-none",placeholder:o})}),m.jsxs(oO,{className:"bg-white w-full relative",children:[C&&m.jsx("input",{value:J,onChange:e=>{ee(e.target.value.toString())},placeholder:S??"Search...",className:"h-10 border mb-2 text-sm px-4 outline-none w-full border-neutral-200 rounded bg-white sticky top-0 z-20"}),te?.map((e,t)=>m.jsx(aO,{className:"text-sm",value:e.value,children:e.label},e.value))]})]}),"text-area"===n?m.jsx("textarea",{cols:j,rows:O,onFocus:()=>Z(!0),onBlur:e=>{Z(!1)},placeholder:r,className:Ko(`placeholder:text-[#7E8299] hover:border-primary_light py-2 h-full placeholder:font-medium outline-none w-full rounded ${y?"bg-[#EEEFF2] cursor-not-allowed":null} ${X&&E&&"!border-primary"} transition-all ease-in-out`,$),...G,value:s,name:u,onChange:H}):m.jsx("input",{onInput:e=>{const t=e.target;"number"===n&&(t.value=t.value.replace(/[^0-9.]/g,""),t.value=t.value.replace(/^\.|(\..*)\./g,"$1"),t.value.length>1&&t.value.startsWith("0")&&"."!==t.value[1]&&(t.value=t.value.replace(/^0+/,"")),""!==t.value&&"0"!==t.value||(t.value="0"))},type:"number"===K?"text":K,placeholder:r,className:Ko("placeholder:text-[#7E8299] h-full placeholder:font-medium outline-none w-full rounded disabled:cursor-not-allowed",w&&"number"===n?"pr-2":null,I||V?"pr-0":null,w&&"number"===n&&t&&"text-right pr-2",$,Y&&"0"!==s?.toString().trim()?"text-green-600 font-semibold":"",q&&s?.toString().trim().startsWith("-")?"text-red-600 font-semibold":""),onFocus:()=>Z(!0),onBlur:e=>{d&&h&&d&&h(e),Z(!1)},value:s||"",defaultValue:l,onChange:f,id:c,name:u,required:g,disabled:y,ref:p,...G}),"password"===n&&m.jsx("span",{className:"cursor-pointer",onClick:()=>{Q(e=>"password"===e?"text":"password")},children:"password"===K?Jy.eyeslash:Jy.eye})]}),a&&m.jsx("p",{className:"text-danger text-xs font-normal",children:a})]})})})}function sO({value:e,label:t,placeholder:n,uuid:r,name:o,displayValue:a,valueType:i,item_unit:s}){const{mutate:l,isPending:u}=ex();J();const[c,d]=D.useState(!1),[f,p]=D.useState({item_uuid:r,[o]:e});En();const[h,g]=D.useState("");return m.jsxs($C,{open:c,onOpenChange:d,children:[m.jsx(HC,{className:"flex items-center",children:m.jsx("button",{className:"hover:text-primary duration-150 underline disabled:no-underline disabled:hover:text-inherit",children:h?"selling_price"===o?rv(+h):ov(+h)+s:a})}),m.jsxs(VC,{align:"center",className:"shadow-[0_1px_2px_0px_#E4E5E73D,_0_12px_24px_0_#868C981F] space-y-2 bg-white rounded-xl p-3 w-[280px] relative before:absolute before:w-3 before:h-1.5 before:bg-white before:left-1/2 before:-translate-x-1/2 before:rotate-45 data-[side=bottom]:before:top-0 data-[side=top]:before:bottom-0",children:[m.jsx(iO,{type:i,value:f[o],label:t,placeholder:n,onChange:e=>{p(t=>({...t,[o]:e.target.value}))}}),m.jsxs("div",{className:"flex justify-end gap-2.5",children:[m.jsx(AC,{children:m.jsx(IE,{label:"Dismiss",className:"bg-gray-300 text-dark text-sm hover:bg-gray-300/90 font-medium",disabled:u})}),m.jsx(IE,{label:"Update",className:"text-sm font-medium",onClick:()=>{l({url:"/items/update_basic",payload:f},{onSuccess:()=>{g(f[o]),d(!1)},onError:()=>{g("")}})},loading:u})]})]})]})}D.forwardRef(({className:e,...t},n)=>m.jsx(Zj,{ref:n,className:Ko("-mx-1 my-1 h-px bg-neutral-100 dark:bg-neutral-800",e),...t})).displayName=Zj.displayName;const lO=[{accessorKey:"item_description",header:()=>m.jsxs("p",{children:[" ","Item description/ ",m.jsx("br",{})," Product code"," "]}),cell:({row:e})=>{const t=e.original;return m.jsxs("div",{className:"flex items-center gap-5",children:[m.jsx("div",{className:"w-[50px] h-[50px] rounded-2xl relative bg-gray-100",children:m.jsx("img",{src:t.item_image,alt:"item image",className:"rounded-2xl object-cover w-full h-full",draggable:!1})}),m.jsxs("div",{className:"space-y-1 max-w-[265px]",children:[m.jsx(cO,{title:t.item_description,item_uuid:t.uuid,item_type_id:t.item_type_id,data:t.fullData}),m.jsxs("p",{className:"text-dark text-xs font-normal flex items-center gap-1",children:[m.jsx("span",{className:"uppercase whitespace-nowrap",children:t.itemcode}),t.sku||t.barcode.length>0?m.jsx(kv,{align:"center",fieldName:"All item codes",trigger:m.jsxs("button",{className:"rounded bg-primary_light px-[5px] flex items-center text-primary font-semibold text-[11px] h-[18px]",children:["+",(t.barcode?.length||0)+(t.sku?1:0)]}),children:m.jsxs("div",{className:"space-y-2",children:[t.sku?m.jsxs("div",{className:"",children:[m.jsx("p",{children:" SKU:"}),m.jsx("ul",{className:"list-disc pl-4",children:m.jsx("li",{children:t.sku})})]}):null,t.barcode.length>0?m.jsxs("div",{children:[m.jsx("p",{children:"Barcodes:"}),m.jsx("ul",{className:"list-disc pl-4 ",children:t.barcode.map((e,t)=>m.jsx("li",{children:e.barcode},t))})]}):null,m.jsxs("div",{className:"",children:[m.jsx("p",{children:" Itemcode:"}),m.jsx("ul",{className:"list-disc pl-4",children:m.jsx("li",{children:t.itemcode})})]})]})}):null,t.expired?m.jsxs(m.Fragment,{children:[m.jsx("span",{children:"|"}),"Expired",m.jsx("span",{className:"rounded bg-danger_light px-[5px] flex items-center text-danger font-semibold text-[11px] h-[18px]",children:t.expired})]}):null,t.expiring?m.jsxs(m.Fragment,{children:[m.jsx("span",{children:"|"}),"Expiring",m.jsx("span",{className:"rounded bg-warning-light px-[5px] flex items-center text-warning font-semibold text-[11px] h-[18px]",children:t.expiring})]}):null]})]})]})}},{accessorKey:"quantity",header:()=>m.jsx("p",{children:"quantity"}),cell:({row:e})=>{const t=e.original;return m.jsxs(m.Fragment,{children:[m.jsx("div",{className:Ko("flex items-center",t.quantity<=0?"text-danger":Number(t.reorder_level)==t.quantity?"text-orange":null),children:m.jsx(sO,{label:"Edit item quantity",placeholder:"Enter quantity",uuid:t.uuid,name:"item_quantity",displayValue:ov(t.quantity)+t.unit,value:t.quantity,valueType:"number",item_unit:t.unit})}),t.all_quantity===t.quantity?null:m.jsx("p",{className:"text-gray-700",children:Intl.NumberFormat().format(t.all_quantity??0)+t.unit})]})}},{accessorKey:"type",cell:({row:e})=>{const t=e.original;return m.jsx("p",{className:"capitalize",children:t.type})}},{accessorKey:"selling_price",header:"Selling Price (₦)",cell:({row:e})=>{const t=e.original;return m.jsx(sO,{label:"Edit selling price (₦)",placeholder:"Enter selling price",uuid:t.uuid,name:"selling_price",displayValue:rv(t.selling_price??0),value:t.selling_price??0,valueType:"number"})}},{accessorKey:"categories",header:"categories/Tags",cell:({row:e})=>{const t=e.original;return m.jsxs(m.Fragment,{children:[" ",m.jsxs("div",{className:"flex items-center gap-2 capitalize",children:[t.categories&&t.categories?.length>0?t.categories?.[0]?.name:"...",t.categories.length>1?m.jsx(kv,{align:"center",fieldName:"Categories",trigger:m.jsxs("button",{className:"rounded bg-primary_light px-[5px] flex items-center text-primary font-semibold text-[11px] h-[18px]",children:["+",t.categories.length-1]}),children:m.jsx("ul",{className:"list-disc pl-4",children:t.categories.map((e,t)=>m.jsx("li",{children:e.name},t))})}):null]}),m.jsxs("div",{className:"text-gray-700 flex items-center gap-2 capitalize",children:[t.tags?.[0],t.tags?.length>1?m.jsx(kv,{align:"center",fieldName:"Tags",trigger:m.jsxs("button",{className:"rounded bg-primary_light px-[5px] flex items-center text-primary font-semibold text-[11px] h-[18px] border-primary",children:["+",t.tags.length-1]}),children:m.jsx("ul",{className:"list-disc pl-4",children:t.tags.map((e,t)=>m.jsx("li",{children:e},t))})}):null]})]})}},{accessorKey:"status",cell:({row:e})=>{const t=e.getValue("status");return m.jsx(_v,{status:t})}},{id:"actions",header:"actions",cell:({row:e})=>{const t=e.original;return m.jsx(uO,{item_uuid:t.uuid,item_type_id:t.item_type_id,data:t.fullData})}}],uO=({item_uuid:e,item_type_id:t,data:n})=>{const[r,o]=D.useState(null),a=()=>{o(null)},[i,s]=D.useState(!1),[l,u]=D.useState(!1),[c,d]=D.useState(!1),[f,p]=D.useState(!1),[h,g]=D.useState(!1),[y,v]=D.useState(!1),[b,w]=D.useState(!1),x=[{label:"view",icon:Jy.eye_outline,action:()=>s(!0)},{label:"delete",icon:Jy.trash,action:()=>p(!0)}];return m.jsxs(m.Fragment,{children:[m.jsxs(Fd,{children:[m.jsx(Ld,{asChild:!0,children:m.jsxs("button",{className:"bg-gray-100 rounded-md h-[30px] w-[90px] flex items-center justify-between p-2.5 font-semibold text-[10px] text-gray-500 hover:border duration-200",children:["Action"," ",m.jsx("svg",{width:"11",height:"6",viewBox:"0 0 11 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M5.50855 5.49304C5.42081 5.49355 5.33383 5.47673 5.25261 5.44356C5.17138 5.41038 5.09751 5.3615 5.03521 5.29971L1.03521 1.29971C0.972726 1.23773 0.92313 1.164 0.889284 1.08276C0.855438 1.00152 0.838013 0.914383 0.838013 0.826375C0.838013 0.738367 0.855438 0.65123 0.889284 0.56999C0.92313 0.488751 0.972726 0.415017 1.03521 0.353041C1.16012 0.228874 1.32909 0.15918 1.50521 0.15918C1.68134 0.15918 1.8503 0.228874 1.97521 0.353041L5.50855 3.88637L9.03521 0.353041C9.16012 0.228874 9.32909 0.15918 9.50521 0.15918C9.68134 0.15918 9.8503 0.228874 9.97521 0.353041C10.0377 0.415017 10.0873 0.488751 10.1211 0.56999C10.155 0.65123 10.1724 0.738367 10.1724 0.826375C10.1724 0.914383 10.155 1.00152 10.1211 1.08276C10.0873 1.164 10.0377 1.23773 9.97521 1.29971L5.97521 5.29971C5.85104 5.42287 5.68344 5.4923 5.50855 5.49304Z",fill:"#202125"})})]})}),m.jsx(zd,{align:"end",className:"flex flex-col gap-2.5 rounded-xl border-gray-200",children:x.map((e,t)=>m.jsxs($d,{className:`capitalize focus:bg-primary_light rounded-md focus:text-primary font-semibold text-gray-700 text-sm cursor-pointer px-[15px] flex items-center gap-[5px] ${t===x.length-1&&"text-danger focus:text-danger"}`,onMouseOver:()=>(e=>{o(e)})(t),onMouseOut:a,onClick:e.action,children:[M.cloneElement(e.icon,{fill:r===t?"#1868DB":"#5E6278"})," ",e.label]},t))})]}),m.jsx(QC,{isOpen:i,onClose:()=>s(!1),itemUUID:e}),m.jsx(AE,{isOpen:f,onClose:()=>p(!1),uuids:[e],single:!0})]})},cO=({title:e,item_uuid:t,item_type_id:n,data:r})=>{const[o,a]=D.useState(!1),[i,s]=D.useState(!1),[l,u]=D.useState(!1);return m.jsxs(m.Fragment,{children:[m.jsx("button",{className:Ko("text-primary font-bold text-sm first-letter:uppercase truncate max-w-[265px] cursor-pointer",r.expired?"text-danger":""),title:e,onClick:()=>a(!0),children:e}),m.jsx(QC,{isOpen:o,onClose:()=>a(!1),itemUUID:t})]})};var dO,fO={};function pO(){if(dO)return fO;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}dO=1,Object.defineProperty(fO,"__esModule",{value:!0}),fO.Collapse=void 0;var t,n=(t=f())&&t.__esModule?t:{default:t};function r(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}function a(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,o=s(t);if(n){var a=s(this).constructor;r=Reflect.construct(o,arguments,a)}else r=o.apply(this,arguments);return function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return i(t)}(this,r)}}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(s,e);var t=a(s);function s(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),l(i(n=t.call(this,e)),"timeout",void 0),l(i(n),"container",void 0),l(i(n),"content",void 0),l(i(n),"onResize",function(){if(clearTimeout(n.timeout),n.container&&n.content){var e=n.props,t=e.isOpened,r=e.checkTimeout,o=Math.floor(n.container.clientHeight),a=Math.floor(n.content.clientHeight),i=t&&Math.abs(a-o)<=1,s=!t&&Math.abs(o)<=1;i||s?n.onRest({isFullyOpened:i,isFullyClosed:s,isOpened:t,containerHeight:o,contentHeight:a}):(n.onWork({isFullyOpened:i,isFullyClosed:s,isOpened:t,containerHeight:o,contentHeight:a}),n.timeout=setTimeout(function(){return n.onResize()},r))}}),l(i(n),"onRest",function(e){var t=e.isFullyOpened,r=e.isFullyClosed,o=e.isOpened,a=e.containerHeight,i=e.contentHeight;if(n.container&&n.content){var s=o&&n.container.style.height==="".concat(i,"px"),l=!o&&"0px"===n.container.style.height;if(s||l){n.container.style.overflow=o?"initial":"hidden",n.container.style.height=o?"auto":"0px";var u=n.props.onRest;u&&u({isFullyOpened:t,isFullyClosed:r,isOpened:o,containerHeight:a,contentHeight:i})}}}),l(i(n),"onWork",function(e){var t=e.isFullyOpened,r=e.isFullyClosed,o=e.isOpened,a=e.containerHeight,i=e.contentHeight;if(n.container&&n.content){var s=o&&n.container.style.height==="".concat(i,"px"),l=!o&&"0px"===n.container.style.height;if(!s&&!l){n.container.style.overflow="hidden",n.container.style.height=o?"".concat(i,"px"):"0px";var u=n.props.onWork;u&&u({isFullyOpened:t,isFullyClosed:r,isOpened:o,containerHeight:a,contentHeight:i})}}}),l(i(n),"onRefContainer",function(e){n.container=e}),l(i(n),"onRefContent",function(e){n.content=e}),e.initialStyle?n.initialStyle=e.initialStyle:n.initialStyle=e.isOpened?{height:"auto",overflow:"initial"}:{height:"0px",overflow:"hidden"},n}return r(s,[{key:"componentDidMount",value:function(){this.onResize()}},{key:"shouldComponentUpdate",value:function(e){var t=this.props,n=t.theme,r=t.isOpened;return t.children!==e.children||r!==e.isOpened||Object.keys(n).some(function(t){return n[t]!==e.theme[t]})}},{key:"getSnapshotBeforeUpdate",value:function(){if(!this.container||!this.content)return null;if("auto"===this.container.style.height){var e=this.content.clientHeight;this.container.style.height="".concat(e,"px")}return null}},{key:"componentDidUpdate",value:function(){this.onResize()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeout)}},{key:"render",value:function(){var e=this.props,t=e.theme,r=e.children,o=e.isOpened;return n.default.createElement("div",{ref:this.onRefContainer,className:t.collapse,style:this.initialStyle,"aria-hidden":!o},n.default.createElement("div",{ref:this.onRefContent,className:t.content},r))}}]),s}(n.default.Component);return fO.Collapse=u,l(u,"defaultProps",{theme:{collapse:"ReactCollapse--collapse",content:"ReactCollapse--content"},initialStyle:void 0,onRest:void 0,onWork:void 0,checkTimeout:50}),fO}var hO,mO,gO,yO={};function vO(){if(hO)return yO;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}hO=1,Object.defineProperty(yO,"__esModule",{value:!0}),yO.UnmountClosed=void 0;var t,n=(t=f())&&t.__esModule?t:{default:t},r=pO(),o=["isOpened"],a=["isOpened"];function i(){return i=Object.assign||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},i.apply(this,arguments)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function p(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,o=m(t);if(n){var a=m(this).constructor;r=Reflect.construct(o,arguments,a)}else r=o.apply(this,arguments);return function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}(this,r)}}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(s,e);var t=p(s);function s(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),g(h(n=t.call(this,e)),"onWork",function(e){var t=e.isOpened,r=u(e,o);n.setState({isResting:!1,isOpened:t});var a=n.props.onWork;a&&a(l({isOpened:t},r))}),g(h(n),"onRest",function(e){var t=e.isOpened,r=u(e,a);n.setState({isResting:!0,isOpened:t,isInitialRender:!1});var o=n.props.onRest;o&&o(l({isOpened:t},r))}),g(h(n),"getInitialStyle",function(){var e=n.state,t=e.isOpened;return e.isInitialRender&&t?{height:"auto",overflow:"initial"}:{height:"0px",overflow:"hidden"}}),n.state={isResting:!0,isOpened:e.isOpened,isInitialRender:!0},n}return c(s,[{key:"componentDidUpdate",value:function(e){var t=this.props.isOpened;e.isOpened!==t&&this.setState({isResting:!1,isOpened:t,isInitialRender:!1})}},{key:"render",value:function(){var e=this.state,t=e.isResting,o=e.isOpened;return t&&!o?null:n.default.createElement(r.Collapse,i({},this.props,{initialStyle:this.getInitialStyle(),onWork:this.onWork,onRest:this.onRest}))}}]),s}(n.default.PureComponent);return yO.UnmountClosed=y,g(y,"defaultProps",{onWork:void 0,onRest:void 0}),yO}var bO=function(){if(gO)return mO;gO=1;var e=pO().Collapse,t=vO().UnmountClosed;return mO=t,t.Collapse=e,t.UnmountClosed=t,mO}();function wO({loading:e,data:t,meta:n}){const r=t?.otherscount?.map(e=>{const n=e.name;return{type:n,value:t?.result_array?.[n]?.total_selling_price??0}}),o=[{type:t?.result_array?.Retail?.pricegroup??t?.default,value:t?.result_array?.Retail?.total_selling_price??0},...r||[]],a=t?.otherscount?.map(e=>{const n=e.name;return{type:n,value:t?.result_array?.[n]?.total_profit??0}}),i=[{type:t?.result_array?.Retail?.pricegroup??t?.default,value:t?.result_array?.Retail?.total_profit??0},...a||[]],[s,l]=D.useState({type:o?.[0].type,value:o?.[0].value}),[u,c]=D.useState({type:i?.[0].type,value:i?.[0].value});M.useEffect(()=>{l({type:o?.[0].type,value:o?.[0].value}),c({type:i?.[0].type,value:i?.[0].value})},[e]);const d=[{label:"Total No. of Unique Item",count:Intl.NumberFormat().format(n?.total??0),desc:`With ${t?.unit_count??0} unit(s)`,icon:m.jsx("div",{className:"shrink-0 rounded-lg \r\n \r\n bg-[#EFF5FF] w-12 h-12 flex items-center justify-center border border-[#EDEEF1]",children:Jy.cube})},{label:"Total Cost Price",count:rv(t?.result_array?.Retail?.total_cost??0),desc:"Takes into Account FIFO & LIFO ",icon:m.jsx("div",{className:"shrink-0 rounded-lg bg-[#F9DFDD] w-12 h-12 flex items-center justify-center border border-[#EDEEF1]",children:M.cloneElement(Jy.price_tag,{fill:"#ED7400"})})},{label:"Total Selling Price",count:rv(s.value),desc:m.jsxs("p",{className:"flex gap-2 items-center flex-wrap",children:["Showing ",s.type," price"," ",m.jsxs(Fd,{children:[m.jsx(Ld,{asChild:!0,children:m.jsxs("button",{className:"rounded-lg h-8 flex items-center justify-between p-3 font-semibold text-xs text-gray-600 outline-none border border-gray-300 gap-2.5 capitalize bg-[#F9F9F9]",children:["change",m.jsx("span",{className:"rotate-90",children:Jy.arrow})]})}),m.jsx(zd,{align:"start",className:"flex flex-col gap-2.5 rounded-xl border-gray-200 py-2.5 w-[210px]",children:o.map((e,t)=>m.jsx($d,{className:Ko("capitalize focus:bg-primary_light rounded-md focus:text-primary font-semibold text-sm cursor-pointer px-[15px] flex items-center gap-[5px] \n \n ",e.type===s.type?"bg-primary_light text-primary":null),onClick:()=>l(t=>({...t,value:e.value,type:e.type})),children:e.type},t))})]})]}),icon:m.jsx("div",{className:"shrink-0 rounded-lg bg-[#D8CDF4] w-12 h-12 flex items-center justify-center border border-[#EDEEF1]",children:M.cloneElement(Jy.price_tag,{fill:"#9747FF"})})},{label:"Profit to be made",count:rv(u.value),desc:m.jsxs("p",{className:"flex gap-2 items-center flex-wrap",children:["Showing ",u.type," price"," ",m.jsxs(Fd,{children:[m.jsx(Ld,{asChild:!0,children:m.jsxs("button",{className:"rounded-lg h-8 flex items-center justify-between p-3 font-semibold text-xs text-gray-600 outline-none border border-gray-300 gap-2.5 capitalize bg-[#F9F9F9]",children:["change",m.jsx("span",{className:"rotate-90",children:Jy.arrow})]})}),m.jsx(zd,{align:"start",className:"flex flex-col gap-2.5 rounded-xl border-gray-200 py-2.5 w-[210px]",children:i.map((e,t)=>m.jsx($d,{className:Ko("capitalize focus:bg-primary_light rounded-md focus:text-primary font-semibold text-sm cursor-pointer px-[15px] flex items-center gap-[5px] \n \n ",e.type===u.type?"bg-primary_light text-primary":null),onClick:()=>c(t=>({...t,value:e.value,type:e.type})),children:e.type},t))})]})]}),icon:m.jsx("div",{className:"shrink-0 rounded-lg bg-[#C6E3D2] w-12 h-12 flex items-center justify-center border border-[#EDEEF1]",children:M.cloneElement(Jy.price_tag,{fill:"#378C5A"})})}],[f,p]=D.useState(!1);return m.jsxs(tS,{className:"bg-[#F6F8FA] p-2.5 flex flex-col",children:[m.jsxs("div",{className:"flex justify-between",children:[m.jsx("h1",{className:"capitalize text-dark font-semibold text-lg",children:"Items overview"}),m.jsxs("button",{className:"rounded-lg h-8 flex items-center justify-between p-3 font-semibold text-xs text-gray-600 outline-none border border-gray-300 gap-2.5 capitalize bg-white",onClick:()=>p(!f),children:[f?"Close":"Open"," ",m.jsx("span",{className:"rotate-90",children:Jy.arrow})]})]}),m.jsx(bO.Collapse,{isOpened:f,children:m.jsx("div",{className:"flex flex-wrap gap-2.5 mt-3",children:d.map((t,n)=>m.jsxs("div",{className:Ko("border rounded-xl border-[#E4E7EC] p-4 flex flex-col relative bg-right-bottom bg-no-repeat flex-auto",0===n?"bg-[#E4EEFA] bg-[url('/assets/images/ecstacy1.svg')]":1===n?"bg-[#FAEAE9] bg-[url('/assets/images/ecstacy2.svg')]":2===n?"bg-[#EEE9FA] bg-[url('/assets/images/ecstacy3.svg')]":3===n?"bg-[#EBF5EF] bg-[url('/assets/images/ecstacy4.svg')]":null),children:[m.jsxs("div",{className:"flex justify-between gap-1",children:[m.jsx("h1",{className:"text-dark text-sm font-medium",children:t.label}),m.jsx("div",{className:"shrink-0",children:t.icon})]}),m.jsxs("div",{className:"flex flex-col gap-1",children:[e?m.jsx(na,{className:"w-28 h-6 rounded"}):m.jsx("h1",{className:Ko("text-dark font-bold text-[29px] truncate",n===d.length-1&&u.value<0?"text-danger":null),title:t.count,children:t.count}),m.jsx("div",{className:"text-gray-700 text-sm font-medium ",children:t.desc})]})]},n))})})]})}function xO({placeholder:e,className:t,inputClass:n,...r}){return m.jsxs("div",{className:Ko("h-12 border border-gray-300 rounded-md w-[320px] flex",t),children:[m.jsx("span",{className:"bg-gray-200 w-[38px] flex items-center justify-center shrink-0 rounded-l-[6px] ",children:Jy.magnifier}),m.jsx("input",{type:"search",placeholder:e,className:"w-full px-3 text-dark text-sm font-medium bg-transparent outline-none rounded-r-[6px]",...r})]})}function SO(e,t){return e===t}function CO(e,t,n){var r=SO,o=D.useRef(e),a=D.useState({})[1],i=function(e,t,n,r){var o=this,a=D.useRef(null),i=D.useRef(0),s=D.useRef(0),l=D.useRef(null),u=D.useRef([]),c=D.useRef(),d=D.useRef(),f=D.useRef(e),p=D.useRef(!0);f.current=e;var h="undefined"!=typeof window,m=!t&&0!==t&&h;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var g=!!(n=n||{}).leading,y=!("trailing"in n)||!!n.trailing,v="maxWait"in n,b="debounceOnServer"in n&&!!n.debounceOnServer,w=v?Math.max(+n.maxWait||0,t):null;D.useEffect(function(){return p.current=!0,function(){p.current=!1}},[]);var x=D.useMemo(function(){var e=function(e){var t=u.current,n=c.current;return u.current=c.current=null,i.current=e,s.current=s.current||e,d.current=f.current.apply(n,t)},n=function(e,t){m&&cancelAnimationFrame(l.current),l.current=m?requestAnimationFrame(e):setTimeout(e,t)},x=function(e){if(!p.current)return!1;var n=e-a.current;return!a.current||n>=t||n<0||v&&e-i.current>=w},S=function(t){return l.current=null,y&&u.current?e(t):(u.current=c.current=null,d.current)},C=function e(){var r=Date.now();if(g&&s.current===i.current&&k(),x(r))return S(r);if(p.current){var o=t-(r-a.current),l=v?Math.min(o,w-(r-i.current)):o;n(e,l)}},k=function(){r&&r({})},_=function(){if(h||b){var r=Date.now(),s=x(r);if(u.current=[].slice.call(arguments),c.current=o,a.current=r,s){if(!l.current&&p.current)return i.current=a.current,n(C,t),g?e(a.current):d.current;if(v)return n(C,t),e(a.current)}return l.current||n(C,t),d.current}};return _.cancel=function(){var e=l.current;e&&(m?cancelAnimationFrame(l.current):clearTimeout(l.current)),i.current=0,u.current=a.current=c.current=l.current=null,e&&r&&r({})},_.isPending=function(){return!!l.current},_.flush=function(){return l.current?S(Date.now()):d.current},_},[g,v,t,w,y,m,h,b,r]);return x}(D.useCallback(function(e){o.current=e,a({})},[a]),t,n,a),s=D.useRef(e);return r(s.current,e)||(i(e),s.current=e),[o.current,i]}function kO({placeholder:e,searchPlaceholder:t,options:n=[],showMultiSelectValues:r=!0,values:o,onChange:a,className:i,showCheckMark:s=!0,label:l,labelClass:u,required:c,info:d,optional:f,actionLabel:p,actionLabelAction:h,actionLabelInfo:g,removeSelectedValue:y,removeTag:v,loading:b,showCount:w,error:x}){const[S,C]=D.useState(!1),[k,_]=D.useState(0),E=D.useRef(null);D.useEffect(()=>{const e=()=>{E.current&&_(E?.current?.offsetWidth)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[E]);const j=e=>{const t=o?.includes(e)?o?.filter(t=>t!==e):[...o||[],e];a&&a(t)};D.useEffect(()=>{y&&j(y)},[y]);const[O,N]=D.useState(null),R=e=>{N(t=>t===e?null:e)},P=e=>{for(let t of n){if(t.value===e)return t.label;if(t.subOptions){const n=t.subOptions.find(t=>t.value===e);if(n)return n.label}}return null};return m.jsx("div",{ref:E,children:b?m.jsx(na,{className:"w-full h-[48px]"}):m.jsxs("div",{className:Ko("flex flex-col gap-2.5",i),children:[m.jsxs("div",{className:"flex justify-between gap-2 flex-wrap",children:[l&&m.jsxs("label",{className:Ko("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",u),children:[l," ",c?m.jsx("span",{className:"text-[#E12D39]",children:l&&"*"}):f?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,d&&m.jsx(kv,{fieldName:l,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:d})})]}),p&&m.jsxs("button",{onClick:h,className:"text-primary flex items-center gap-1 first-letter:uppercase text-sm font-medium",children:[p,g&&m.jsx(kv,{fieldName:l,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:g})})]})]}),m.jsxs($C,{modal:!0,open:S,onOpenChange:C,children:[m.jsx(HC,{asChild:!0,children:m.jsxs(UC,{variant:"outline",role:"combobox","aria-expanded":S,className:Ko(`w-full h-[48px] justify-between border focus:border-primary border-neutral-200 bg-white hover:bg-white hover:border-[#BFD7FE] ${x&&"!border-danger"}`,r?"h-auto py-3":null,i),children:[m.jsx("div",{className:"flex gap-2 text-[#5E6278] justify-start first-letter:uppercase flex-wrap",children:o?.length&&r?o.map((e,t)=>m.jsxs("div",{onClick:()=>{v||j(e),R(e)},className:"px-2 py-1 text-black flex items-center justify-between rounded gap-2 border bg-slate-200 text-xs font-medium",children:[m.jsx("span",{className:"flex justify-start text-start flex-wrap gap-2 whitespace-normal",children:P(e)}),m.jsx("span",{className:"",children:m.jsx("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M5.44001 4.49978L7.83334 2.12644C7.96064 1.99737 8.03146 1.82301 8.03021 1.64173C8.02896 1.46044 7.95575 1.28708 7.82667 1.15978C7.6976 1.03247 7.52324 0.961657 7.34196 0.962907C7.16067 0.964157 6.98731 1.03737 6.86001 1.16644L4.50001 3.55978L2.14001 1.21311C2.0151 1.08894 1.84613 1.01925 1.67001 1.01925C1.49388 1.01925 1.32492 1.08894 1.20001 1.21311C1.13752 1.27509 1.08793 1.34882 1.05408 1.43006C1.02023 1.5113 1.00281 1.59844 1.00281 1.68644C1.00281 1.77445 1.02023 1.86159 1.05408 1.94283C1.08793 2.02407 1.13752 2.0978 1.20001 2.15978L3.56001 4.49978L1.16667 6.87311C1.03937 7.00218 0.968554 7.17654 0.969804 7.35782C0.971054 7.53911 1.04427 7.71247 1.17334 7.83978C1.30241 7.96708 1.47677 8.0379 1.65805 8.03665C1.83934 8.0354 2.0127 7.96218 2.14001 7.83311L4.50001 5.43978L6.86001 7.78644C6.98492 7.91061 7.15388 7.98031 7.33001 7.98031C7.50613 7.98031 7.6751 7.91061 7.80001 7.78644C7.86249 7.72447 7.91209 7.65073 7.94594 7.56949C7.97978 7.48826 7.99721 7.40112 7.99721 7.31311C7.99721 7.2251 7.97978 7.13797 7.94594 7.05673C7.91209 6.97549 7.86249 6.90175 7.80001 6.83978L5.44001 4.49978Z",fill:"black"})})})]},t)):!r&&w&&o.length>0?`${o.length} ${l} selected`:e??"Select..."}),m.jsx(Dd,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),m.jsx(VC,{align:"start",style:{width:k},className:"w-[480px] p-0 bg-white rounded-xl border-gray-200",children:m.jsxs(cC,{children:[m.jsx(dC,{className:"placeholder:text-xs",placeholder:t??"Search..."}),m.jsx(pC,{children:"No result found."}),m.jsx(hC,{children:m.jsx(fC,{className:"",children:n?.map((e,t)=>m.jsxs("div",{children:[m.jsxs(mC,{value:"string"==typeof e.label?e.label:e.searchId,className:`first-letter:uppercase mb-1 focus:bg-primary_light w-full rounded-md focus:text-primary hover:text-primary font-semibold text-gray-700 text-sm cursor-pointer ${o?.includes(e.value)&&"bg-primary_light text-primary"}`,onSelect:()=>{j(e.value),e?.subOptions&&e?.subOptions?.length>0&&R(e.value)},children:[s&&m.jsx(Nd,{className:Ko("mr-2 h-4 w-4",o?.includes(e.value)?"opacity-100":"opacity-0")}),m.jsxs("p",{className:"flex justify-between w-full",children:[e.label,e?.subOptions&&e?.subOptions?.length>0&&m.jsx(Rd,{className:"ml-2 h-5 w-5 font-bold shrink-0 opacity-50"})]})]}),O===e.value&&e?.subOptions&&e?.subOptions?.map((e,t)=>m.jsxs(mC,{value:"string"==typeof e.label?e.label:e.searchId,className:`first-letter:uppercase mb-1 focus:bg-primary_light w-full rounded-md focus:text-primary hover:text-primary font-semibold text-gray-700 text-sm cursor-pointer pl-6 ${o?.includes(e.value)&&"bg-primary_light text-primary"}`,onSelect:()=>{j(e.value)},children:[s&&m.jsx(Nd,{className:Ko("mr-2 h-4 w-4",o?.includes(e.value)?"opacity-100":"opacity-0")}),e.label]},t))]},t))})})]})})]}),x&&m.jsx("p",{className:"text-danger text-xs font-normal",children:x})]})})}var _O="ScrollArea",[EO]=sa(_O),[jO,OO]=EO(_O),NO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...i}=e,[s,l]=D.useState(null),[u,c]=D.useState(null),[d,f]=D.useState(null),[p,h]=D.useState(null),[g,y]=D.useState(null),[v,b]=D.useState(0),[w,x]=D.useState(0),[S,C]=D.useState(!1),[k,_]=D.useState(!1),E=ia(t,e=>l(e)),j=Ca(o);return m.jsx(jO,{scope:n,type:r,dir:j,scrollHideDelay:a,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:h,scrollbarXEnabled:S,onScrollbarXEnabledChange:C,scrollbarY:g,onScrollbarYChange:y,scrollbarYEnabled:k,onScrollbarYEnabledChange:_,onCornerWidthChange:b,onCornerHeightChange:x,children:m.jsx(ba.div,{dir:j,...i,ref:E,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});NO.displayName=_O;var RO="ScrollAreaViewport",PO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,i=OO(RO,n),s=ia(t,D.useRef(null),i.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),m.jsx(ba.div,{"data-radix-scroll-area-viewport":"",...a,ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:m.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});PO.displayName=RO;var TO="ScrollAreaScrollbar",DO=D.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=OO(TO,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,s="horizontal"===e.orientation;return D.useEffect(()=>(s?a(!0):i(!0),()=>{s?a(!1):i(!1)}),[s,a,i]),"hover"===o.type?m.jsx(MO,{...r,ref:t,forceMount:n}):"scroll"===o.type?m.jsx(IO,{...r,ref:t,forceMount:n}):"auto"===o.type?m.jsx(AO,{...r,ref:t,forceMount:n}):"always"===o.type?m.jsx(FO,{...r,ref:t}):null});DO.displayName=TO;var MO=D.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=OO(TO,e.__scopeScrollArea),[a,i]=D.useState(!1);return D.useEffect(()=>{const e=o.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),i(!0)},r=()=>{t=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}},[o.scrollArea,o.scrollHideDelay]),m.jsx(cl,{present:n||a,children:m.jsx(AO,{"data-state":a?"visible":"hidden",...r,ref:t})})}),IO=D.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=OO(TO,e.__scopeScrollArea),a="horizontal"===e.orientation,i=nN(()=>l("SCROLL_END"),100),[s,l]=function(e,t){return D.useReducer((e,n)=>t[e][n]??e,e)}("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return D.useEffect(()=>{if("idle"===s){const e=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,o.scrollHideDelay,l]),D.useEffect(()=>{const e=o.viewport,t=a?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(l("SCROLL"),i()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}},[o.viewport,a,l,i]),m.jsx(cl,{present:n||"hidden"!==s,children:m.jsx(FO,{"data-state":"hidden"===s?"hidden":"visible",...r,ref:t,onPointerEnter:ra(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ra(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),AO=D.forwardRef((e,t)=>{const n=OO(TO,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,i]=D.useState(!1),s="horizontal"===e.orientation,l=nN(()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;i(s?e:t)}},10);return rN(n.viewport,l),rN(n.content,l),m.jsx(cl,{present:r||a,children:m.jsx(FO,{"data-state":a?"visible":"hidden",...o,ref:t})})}),FO=D.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=OO(TO,e.__scopeScrollArea),a=D.useRef(null),i=D.useRef(0),[s,l]=D.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=QO(s.viewport,s.content),c={...r,sizes:s,onSizesChange:l,hasThumb:Boolean(u>0&&u<1),onThumbChange:e=>a.current=e,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:e=>i.current=e};function d(e,t){return function(e,t,n,r="ltr"){const o=XO(n),a=o/2,i=t||a,s=o-i,l=n.scrollbar.paddingStart+i,u=n.scrollbar.size-n.scrollbar.paddingEnd-s,c=n.content-n.viewport,d="ltr"===r?[0,c]:[-1*c,0];return JO([l,u],d)(e)}(e,i.current,s,t)}return"horizontal"===n?m.jsx(LO,{...c,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const e=ZO(o.viewport.scrollLeft,s,o.dir);a.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollLeft=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollLeft=d(e,o.dir))}}):"vertical"===n?m.jsx(zO,{...c,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const e=ZO(o.viewport.scrollTop,s);a.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollTop=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollTop=d(e))}}):null}),LO=D.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=OO(TO,e.__scopeScrollArea),[i,s]=D.useState(),l=D.useRef(null),u=ia(t,l,a.onScrollbarXChange);return D.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),m.jsx(VO,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{bottom:0,left:"rtl"===a.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===a.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":XO(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){const r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),eN(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:KO(i.paddingLeft),paddingEnd:KO(i.paddingRight)}})}})}),zO=D.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=OO(TO,e.__scopeScrollArea),[i,s]=D.useState(),l=D.useRef(null),u=ia(t,l,a.onScrollbarYChange);return D.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),m.jsx(VO,{"data-orientation":"vertical",...o,ref:u,sizes:n,style:{top:0,right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":XO(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){const r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),eN(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:KO(i.paddingTop),paddingEnd:KO(i.paddingBottom)}})}})}),[$O,HO]=EO(TO),VO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,p=OO(TO,n),[h,g]=D.useState(null),y=ia(t,e=>g(e)),v=D.useRef(null),b=D.useRef(""),w=p.viewport,x=r.content-r.viewport,S=ka(c),C=ka(l),k=nN(d,10);function _(e){if(v.current){const t=e.clientX-v.current.left,n=e.clientY-v.current.top;u({x:t,y:n})}}return D.useEffect(()=>{const e=e=>{const t=e.target,n=h?.contains(t);n&&S(e,x)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[w,h,x,S]),D.useEffect(C,[r,C]),rN(h,k),rN(p.content,k),m.jsx($O,{scope:n,scrollbar:h,hasThumb:o,onThumbChange:ka(a),onThumbPointerUp:ka(i),onThumbPositionChange:C,onThumbPointerDown:ka(s),children:m.jsx(ba.div,{...f,ref:y,style:{position:"absolute",...f.style},onPointerDown:ra(e.onPointerDown,e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),v.current=h.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),_(e)}}),onPointerMove:ra(e.onPointerMove,_),onPointerUp:ra(e.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=b.current,p.viewport&&(p.viewport.style.scrollBehavior=""),v.current=null})})})}),BO="ScrollAreaThumb",UO=D.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=HO(BO,e.__scopeScrollArea);return m.jsx(cl,{present:n||o.hasThumb,children:m.jsx(WO,{ref:t,...r})})}),WO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=OO(BO,n),i=HO(BO,n),{onThumbPositionChange:s}=i,l=ia(t,e=>i.onThumbChange(e)),u=D.useRef(void 0),c=nN(()=>{u.current&&(u.current(),u.current=void 0)},100);return D.useEffect(()=>{const e=a.viewport;if(e){const t=()=>{if(c(),!u.current){const t=tN(e,s);u.current=t,s()}};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[a.viewport,c,s]),m.jsx(ba.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ra(e.onPointerDownCapture,e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;i.onThumbPointerDown({x:n,y:r})}),onPointerUp:ra(e.onPointerUp,i.onThumbPointerUp)})});UO.displayName=BO;var qO="ScrollAreaCorner",YO=D.forwardRef((e,t)=>{const n=OO(qO,e.__scopeScrollArea),r=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?m.jsx(GO,{...e,ref:t}):null});YO.displayName=qO;var GO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=OO(qO,n),[a,i]=D.useState(0),[s,l]=D.useState(0),u=Boolean(a&&s);return rN(o.scrollbarX,()=>{const e=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(e),l(e)}),rN(o.scrollbarY,()=>{const e=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(e),i(e)}),u?m.jsx(ba.div,{...r,ref:t,style:{width:a,height:s,position:"absolute",right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:0,...e.style}}):null});function KO(e){return e?parseInt(e,10):0}function QO(e,t){const n=e/t;return isNaN(n)?0:n}function XO(e){const t=QO(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function ZO(e,t,n="ltr"){const r=XO(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,s=a-r,l=FE(e,"ltr"===n?[0,i]:[-1*i,0]);return JO([0,i],[0,s])(l)}function JO(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function eN(e,t){return e>0&&e<t}var tN=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const a={left:e.scrollLeft,top:e.scrollTop},i=n.left!==a.left,s=n.top!==a.top;(i||s)&&t(),n=a,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function nN(e,t){const n=ka(e),r=D.useRef(0);return D.useEffect(()=>()=>window.clearTimeout(r.current),[]),D.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function rN(e,t){const n=ka(t);ua(()=>{let t=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var oN=NO,aN=PO,iN=YO;const sN=D.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(oN,{ref:r,className:Ko("relative overflow-hidden",e),...n,children:[m.jsx(aN,{className:"h-full w-full rounded-[inherit]",children:t}),m.jsx(lN,{}),m.jsx(iN,{})]}));sN.displayName=oN.displayName;const lN=D.forwardRef(({className:e,orientation:t="vertical",...n},r)=>m.jsx(DO,{ref:r,orientation:t,className:Ko("flex touch-none select-none transition-colors","vertical"===t&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:m.jsx(UO,{className:"relative flex-1 rounded-full bg-neutral-200 dark:bg-neutral-800"})}));function uN({placeholder:e,searchPlaceholder:t,options:n=[],showMultiSelectValues:r=!0,values:o,onChange:a,className:i,showCheckMark:s=!0,label:l,labelClass:u,required:c,info:d,optional:f,actionLabel:p,actionLabelAction:h,actionLabelInfo:g,removeSelectedValue:y,removeTag:v,loading:b,showCount:w,error:x,showError:S,onChangeSearch:C,searching:k,contentStyle:_,disabled:E,searchValue:j}){const[O,N]=D.useState(!1),[R,P]=D.useState(0),T=D.useRef(null);D.useEffect(()=>{const e=()=>{T.current&&P(T?.current?.offsetWidth)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const M=o?.filter(e=>""!==e),I=e=>{const t=M?.includes(e)?M?.filter(t=>t!==e):[...M||[],e];a&&a(t)};return D.useEffect(()=>{y&&I(y)},[y]),m.jsx(m.Fragment,{children:b?m.jsx(na,{className:"w-full h-[48px]"}):m.jsxs("div",{className:Ko("flex flex-col gap-2.5",i),children:[m.jsxs("div",{className:"flex justify-between gap-2 flex-wrap",children:[l&&m.jsxs("label",{className:Ko("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",u),children:[l," ",c?m.jsx("span",{className:"text-[#E12D39]",children:l&&"*"}):f?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,d&&m.jsx(kv,{fieldName:l,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:d})})]}),p&&m.jsxs("button",{onClick:h,className:"text-primary flex items-center gap-1 first-letter:uppercase text-sm font-medium",children:[p,g&&m.jsx(kv,{fieldName:p,children:m.jsx("p",{className:"font-normal first-letter:uppercase text-left",children:g})})]})]}),m.jsxs($C,{modal:!0,open:O,onOpenChange:N,children:[m.jsx(HC,{disabled:E,asChild:!0,children:m.jsxs(UC,{ref:T,variant:"outline",role:"combobox","aria-expanded":O,className:Ko(`w-full h-[48px] justify-between border focus:border-primary border-neutral-200 bg-white hover:bg-white hover:border-[#BFD7FE] ${(x||S)&&"!border-danger"}`,r?"h-auto py-3":null,i),children:[m.jsx("div",{className:"flex gap-2 text-[#5E6278] justify-start first-letter:uppercase flex-wrap",children:M?.length>0&&r?M?.map((e,t)=>m.jsxs("div",{onClick:()=>{!v&&I(e)},className:"px-2 py-1 text-black flex items-center justify-between rounded gap-2 border bg-slate-200 text-xs font-medium",children:[n?.[0].searchId?n?.find(t=>t.value===e)?.searchId:n?.find(t=>t.value===e)?.label,m.jsx("span",{className:"",children:m.jsx("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M5.44001 4.49978L7.83334 2.12644C7.96064 1.99737 8.03146 1.82301 8.03021 1.64173C8.02896 1.46044 7.95575 1.28708 7.82667 1.15978C7.6976 1.03247 7.52324 0.961657 7.34196 0.962907C7.16067 0.964157 6.98731 1.03737 6.86001 1.16644L4.50001 3.55978L2.14001 1.21311C2.0151 1.08894 1.84613 1.01925 1.67001 1.01925C1.49388 1.01925 1.32492 1.08894 1.20001 1.21311C1.13752 1.27509 1.08793 1.34882 1.05408 1.43006C1.02023 1.5113 1.00281 1.59844 1.00281 1.68644C1.00281 1.77445 1.02023 1.86159 1.05408 1.94283C1.08793 2.02407 1.13752 2.0978 1.20001 2.15978L3.56001 4.49978L1.16667 6.87311C1.03937 7.00218 0.968554 7.17654 0.969804 7.35782C0.971054 7.53911 1.04427 7.71247 1.17334 7.83978C1.30241 7.96708 1.47677 8.0379 1.65805 8.03665C1.83934 8.0354 2.0127 7.96218 2.14001 7.83311L4.50001 5.43978L6.86001 7.78644C6.98492 7.91061 7.15388 7.98031 7.33001 7.98031C7.50613 7.98031 7.6751 7.91061 7.80001 7.78644C7.86249 7.72447 7.91209 7.65073 7.94594 7.56949C7.97978 7.48826 7.99721 7.40112 7.99721 7.31311C7.99721 7.2251 7.97978 7.13797 7.94594 7.05673C7.91209 6.97549 7.86249 6.90175 7.80001 6.83978L5.44001 4.49978Z",fill:"black"})})})]},t)):!r&&w&&o.length>0?`${M.length} ${l} selected`:e??"Select..."}),m.jsx(Dd,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),m.jsx(VC,{align:"start",style:{width:R},className:Ko("w-[480px] p-0 bg-white rounded-xl border-gray-200",_),children:m.jsx(sN,{children:m.jsxs(cC,{children:[m.jsx(dC,{onChangeCapture:C,className:"placeholder:text-xs",placeholder:t??"Search..."}),k?m.jsx("div",{className:"flex flex-col gap-2 p-2",children:[1,2,3].map((e,t)=>m.jsx(na,{className:"h-9 rounded-md"},t))}):m.jsx(pC,{children:j?"No result found.":e}),m.jsx(hC,{children:m.jsx(fC,{className:"",children:n?.map(e=>m.jsxs(mC,{value:"string"==typeof e.label?e.label:e.searchId,className:`first-letter:uppercase mb-1 focus:bg-primary_light w-full rounded-md focus:text-primary hover:text-primary font-semibold text-gray-700 text-sm cursor-pointer ${o?.includes(e.value)&&"bg-primary_light text-primary"}`,onSelect:()=>{I(e.value)},children:[s&&m.jsx(Nd,{className:Ko("mr-2 h-4 w-4",o?.includes(e.value)?"opacity-100":"opacity-0")}),e.label]},e.value))})})]})})})]})]})})}lN.displayName=DO.displayName;const cN=D.createContext({dragDropManager:void 0});function dN(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var fN="function"==typeof Symbol&&Symbol.observable||"@@observable",pN=function(){return Math.random().toString(36).substring(7).split("").join(".")},hN={INIT:"@@redux/INIT"+pN(),REPLACE:"@@redux/REPLACE"+pN()};function mN(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(dN(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(dN(1));return n(mN)(e,t)}if("function"!=typeof e)throw new Error(dN(2));var o=e,a=t,i=[],s=i,l=!1;function u(){s===i&&(s=i.slice())}function c(){if(l)throw new Error(dN(3));return a}function d(e){if("function"!=typeof e)throw new Error(dN(4));if(l)throw new Error(dN(5));var t=!0;return u(),s.push(e),function(){if(t){if(l)throw new Error(dN(6));t=!1,u();var n=s.indexOf(e);s.splice(n,1),i=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(dN(7));if(void 0===e.type)throw new Error(dN(8));if(l)throw new Error(dN(9));try{l=!0,a=o(a,e)}finally{l=!1}for(var t=i=s,n=0;n<t.length;n++){(0,t[n])()}return e}return f({type:hN.INIT}),(r={dispatch:f,subscribe:d,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error(dN(10));o=e,f({type:hN.REPLACE})}})[fN]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(dN(11));function n(){e.next&&e.next(c())}return n(),{unsubscribe:t(n)}}})[fN]=function(){return this},e},r}function gN(e,t,...n){if("undefined"!=typeof process&&"production"===process.env.NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let r=0;e=new Error(t.replace(/%s/g,function(){return n[r++]})),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function yN(e){return"object"==typeof e}const vN="dnd-core/INIT_COORDS",bN="dnd-core/BEGIN_DRAG",wN="dnd-core/PUBLISH_DRAG_SOURCE",xN="dnd-core/HOVER",SN="dnd-core/DROP",CN="dnd-core/END_DRAG";function kN(e,t){return{type:vN,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const _N={type:vN,payload:{clientOffset:null,sourceClientOffset:null}};function EN(e){return function(t=[],n={publishSource:!0}){const{publishSource:r=!0,clientOffset:o,getSourceClientOffset:a}=n,i=e.getMonitor(),s=e.getRegistry();e.dispatch(kN(o)),function(e,t,n){gN(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(e){gN(n.getSource(e),"Expected sourceIds to be registered.")})}(t,i,s);const l=function(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}(t,i);if(null==l)return void e.dispatch(_N);let u=null;if(o){if(!a)throw new Error("getSourceClientOffset must be defined");!function(e){gN("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(a),u=a(l)}e.dispatch(kN(o,u));const c=s.getSource(l).beginDrag(i,l);if(null==c)return;!function(e){gN(yN(e),"Item must be an object.")}(c),s.pinSource(l);const d=s.getSourceType(l);return{type:bN,payload:{itemType:d,item:c,sourceId:l,clientOffset:o||null,sourceClientOffset:u||null,isSourcePublic:!!r}}}}function jN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ON(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){jN(e,t,n[t])})}return e}function NN(e){return function(t={}){const n=e.getMonitor(),r=e.getRegistry();!function(e){gN(e.isDragging(),"Cannot call drop while not dragging."),gN(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(n);const o=function(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(n);o.forEach((o,a)=>{const i=function(e,t,n,r){const o=n.getTarget(e);let a=o?o.drop(r,e):void 0;(function(e){gN(void 0===e||yN(e),"Drop result must either be an object or undefined.")})(a),void 0===a&&(a=0===t?{}:r.getDropResult());return a}(o,a,r,n),s={type:SN,payload:{dropResult:ON({},t,i)}};e.dispatch(s)})}}function RN(e){return function(){const t=e.getMonitor(),n=e.getRegistry();!function(e){gN(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const r=t.getSourceId();if(null!=r){n.getSource(r,!0).endDrag(t,r),n.unpinSource()}return{type:CN}}}function PN(e,t){return null===t?null===e:Array.isArray(e)?e.some(e=>e===t):e===t}function TN(e){return function(t,{clientOffset:n}={}){!function(e){gN(Array.isArray(e),"Expected targetIds to be an array.")}(t);const r=t.slice(0),o=e.getMonitor(),a=e.getRegistry();return function(e,t,n){for(let r=e.length-1;r>=0;r--){const o=e[r];PN(t.getTargetType(o),n)||e.splice(r,1)}}(r,a,o.getItemType()),function(e,t,n){gN(t.isDragging(),"Cannot call hover while not dragging."),gN(!t.didDrop(),"Cannot call hover after drop.");for(let t=0;t<e.length;t++){const r=e[t];gN(e.lastIndexOf(r)===t,"Expected targetIds to be unique in the passed array.");gN(n.getTarget(r),"Expected targetIds to be registered.")}}(r,o,a),function(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}(r,o,a),{type:xN,payload:{targetIds:r,clientOffset:n||null}}}}function DN(e){return function(){if(e.getMonitor().isDragging())return{type:wN}}}class MN{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store;const n=function(e){return{beginDrag:EN(e),publishDragSource:DN(e),hover:TN(e),drop:NN(e),endDrag:RN(e)}}(this);return Object.keys(n).reduce((r,o)=>{const a=n[o];var i;return r[o]=(i=a,(...n)=>{const r=i.apply(e,n);void 0!==r&&t(r)}),r},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}}function IN(e,t){return{x:e.x-t.x,y:e.y-t.y}}const AN=[],FN=[];AN.__IS_NONE__=!0,FN.__IS_ALL__=!0;class LN{subscribeToStateChange(e,t={}){const{handlerIds:n}=t;gN("function"==typeof e,"listener must be a function."),gN(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let r=this.store.getState().stateId;return this.store.subscribe(()=>{const t=this.store.getState(),o=t.stateId;try{const a=o===r||o===r+1&&!function(e,t){return e!==AN&&(e===FN||void 0===t||(n=e,t.filter(e=>n.indexOf(e)>-1)).length>0);var n}(t.dirtyHandlerIds,n);a||e()}finally{r=o}})}subscribeToOffsetChange(e){gN("function"==typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{const n=this.store.getState().dragOffset;n!==t&&(t=n,e())})}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return gN(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);if(gN(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;return PN(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);if(gN(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;return this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:n}=t;if(!this.isDragging())return!1;const r=this.registry.getTargetType(e),o=this.getItemType();if(o&&!PN(r,o))return!1;const a=this.getTargetIds();if(!a.length)return!1;const i=a.indexOf(e);return n?i===a.length-1:i>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return t&&n&&r?IN(function(e,t){return{x:e.x+t.x,y:e.y+t.y}}(t,r),n):null}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:n}=e;return t&&n?IN(t,n):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}}const zN="undefined"!=typeof global?global:self,$N=zN.MutationObserver||zN.WebKitMutationObserver;function HN(e){return function(){const t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}const VN="function"==typeof $N?function(e){let t=1;const n=new $N(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}:HN;class BN{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const UN=new class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=VN(this.flush),this.requestErrorThrow=HN(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},WN=new class{create(e){const t=this.freeTasks,n=t.length?t.pop():new BN(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}(UN.registerPendingError);const qN="dnd-core/ADD_SOURCE",YN="dnd-core/ADD_TARGET",GN="dnd-core/REMOVE_SOURCE",KN="dnd-core/REMOVE_TARGET";function QN(e,t){t&&Array.isArray(e)?e.forEach(e=>QN(e,!1)):gN("string"==typeof e||"symbol"==typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var XN;!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(XN||(XN={}));let ZN=0;function JN(e){const t=(ZN++).toString();switch(e){case XN.SOURCE:return`S${t}`;case XN.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function eR(e){switch(e[0]){case"S":return XN.SOURCE;case"T":return XN.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function tR(e,t){const n=e.entries();let r=!1;do{const{done:e,value:[,o]}=n.next();if(o===t)return!0;r=!!e}while(!r);return!1}class nR{addSource(e,t){QN(e),function(e){gN("function"==typeof e.canDrag,"Expected canDrag to be a function."),gN("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),gN("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);const n=this.addHandler(XN.SOURCE,e,t);return this.store.dispatch(function(e){return{type:qN,payload:{sourceId:e}}}(n)),n}addTarget(e,t){QN(e,!0),function(e){gN("function"==typeof e.canDrop,"Expected canDrop to be a function."),gN("function"==typeof e.hover,"Expected hover to be a function."),gN("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);const n=this.addHandler(XN.TARGET,e,t);return this.store.dispatch(function(e){return{type:YN,payload:{targetId:e}}}(n)),n}containsHandler(e){return tR(this.dragSources,e)||tR(this.dropTargets,e)}getSource(e,t=!1){gN(this.isSourceId(e),"Expected a valid source ID.");return t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return gN(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return gN(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return gN(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return eR(e)===XN.SOURCE}isTargetId(e){return eR(e)===XN.TARGET}removeSource(e){var t;gN(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:GN,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},UN.enqueueTask(WN.create(t))}removeTarget(e){gN(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:KN,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);gN(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){gN(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){const r=JN(e);return this.types.set(r,t),e===XN.SOURCE?this.dragSources.set(r,n):e===XN.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const rR=(e,t)=>e===t;function oR(e=AN,t){switch(t.type){case xN:break;case qN:case YN:case KN:case GN:return AN;default:return FN}const{targetIds:n=[],prevTargetIds:r=[]}=t.payload,o=function(e,t){const n=new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);const o=[];return n.forEach((e,t)=>{1===e&&o.push(t)}),o}(n,r),a=o.length>0||!function(e,t,n=rR){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}(n,r);if(!a)return AN;const i=r[r.length-1],s=n[n.length-1];return i!==s&&(i&&o.push(i),s&&o.push(s)),o}function aR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const iR={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function sR(e=iR,t){const{payload:n}=t;switch(t.type){case vN:case bN:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case xN:return r=e.clientOffset,o=n.clientOffset,!r&&!o||r&&o&&r.x===o.x&&r.y===o.y?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){aR(e,t,n[t])})}return e}({},e,{clientOffset:n.clientOffset});case CN:case SN:return iR;default:return e}var r,o}function lR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){lR(e,t,n[t])})}return e}const cR={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function dR(e=cR,t){const{payload:n}=t;switch(t.type){case bN:return uR({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case wN:return uR({},e,{isSourcePublic:!0});case xN:return uR({},e,{targetIds:n.targetIds});case KN:return-1===e.targetIds.indexOf(n.targetId)?e:uR({},e,{targetIds:(r=e.targetIds,o=n.targetId,r.filter(e=>e!==o))});case SN:return uR({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case CN:return uR({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var r,o}function fR(e=0,t){switch(t.type){case qN:case YN:return e+1;case GN:case KN:return e-1;default:return e}}function pR(e=0){return e+1}function hR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){hR(e,t,n[t])})}return e}function gR(e={},t){return{dirtyHandlerIds:oR(e.dirtyHandlerIds,{type:t.type,payload:mR({},t.payload,{prevTargetIds:(n=e,r="dragOperation.targetIds",o=[],r.split(".").reduce((e,t)=>e&&e[t]?e[t]:o||null,n))})}),dragOffset:sR(e.dragOffset,t),refCount:fR(e.refCount,t),dragOperation:dR(e.dragOperation,t),stateId:pR(e.stateId)};var n,r,o}function yR(e,t=void 0,n={},r=!1){const o=function(e){const t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return mN(gR,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(r),a=new LN(o,new nR(o)),i=new MN(o,a),s=e(i,t,n);return i.receiveBackend(s),i}function vR(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}let bR=0;const wR=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var xR,SR,CR=D.memo(function(e){var{children:t}=e,n=vR(e,["children"]);const[r,o]=function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}const t=function(e,t=kR(),n,r){const o=t;o[wR]||(o[wR]={dragDropManager:yR(e,t,n,r)});return o[wR]}(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}(n);return D.useEffect(()=>{if(o){const e=kR();return++bR,()=>{0===--bR&&(e[wR]=null)}}},[]),m.jsx(cN.Provider,{value:r,children:t})});function kR(){return"undefined"!=typeof global?global:window}var _R=(SR||(SR=1,xR=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,a;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,a[o]))return!1;for(o=r;0!==o--;){var i=a[o];if(!e(t[i],n[i]))return!1}return!0}return t!=t&&n!=n}),xR),ER=n(_R);const jR="undefined"!=typeof window?D.useLayoutEffect:D.useEffect;function OR(e,t,n){const[r,o]=function(e,t,n){const[r,o]=D.useState(()=>t(e)),a=D.useCallback(()=>{const a=t(e);ER(r,a)||(o(a),n&&n())},[r,e,n]);return jR(a),[r,a]}(e,t,n);return jR(function(){const t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(o,{handlerIds:[t]})},[e,o]),r}function NR(e,t,n){return OR(t,e||(()=>({})),()=>n.reconnect())}function RR(e,t){const n=[...t||[]];return null==t&&"function"!=typeof e&&n.push(e),D.useMemo(()=>"function"==typeof e?e():e,n)}function PR(e){return D.useMemo(()=>e.hooks.dragSource(),[e])}function TR(e){return D.useMemo(()=>e.hooks.dragPreview(),[e])}let DR=!1,MR=!1;class IR{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){gN(!DR,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return DR=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{DR=!1}}isDragging(){if(!this.sourceId)return!1;gN(!MR,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return MR=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{MR=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let AR=!1;class FR{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;gN(!AR,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return AR=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{AR=!1}}isOver(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function LR(e,t,n,r){let o;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;const s=Object.prototype.hasOwnProperty.bind(t);for(let n=0;n<a.length;n++){const r=a[n];if(!s(r))return!1;const i=e[r],l=t[r];if(o=void 0,!1===o||void 0===o&&i!==l)return!1}return!0}function zR(e){return null!==e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function $R(e){return(t=null,n=null)=>{if(!D.isValidElement(t)){const r=t;return e(r,n),r}const r=t;!function(e){if("string"==typeof e.type)return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}(r);const o=n?t=>e(t,n):e;return function(e,t){const n=e.ref;return gN("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?D.cloneElement(e,{ref:e=>{VR(n,e),VR(t,e)}}):D.cloneElement(e,{ref:t})}(r,o)}}function HR(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const e=$R(r);t[n]=()=>e}}),t}function VR(e,t){"function"==typeof e?e(t):e.current=t}class BR{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){const t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!LR(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!LR(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=HR({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,zR(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,zR(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class UR{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!LR(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=HR({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,zR(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function WR(){const{dragDropManager:e}=D.useContext(cN);return gN(null!=e,"Expected drag drop context"),e}class qR{beginDrag(){const e=this.spec,t=this.monitor;let n=null;return n="object"==typeof e.item?e.item:"function"==typeof e.item?e.item(t):{},null!=n?n:null}canDrag(){const e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)}isDragging(e,t){const n=this.spec,r=this.monitor,{isDragging:o}=n;return o?o(r):t===e.getSourceId()}endDrag(){const e=this.spec,t=this.monitor,n=this.connector,{end:r}=e;r&&r(t.getItem(),t),n.reconnect()}constructor(e,t,n){this.spec=e,this.monitor=t,this.connector=n}}function YR(e,t,n){const r=WR(),o=function(e,t,n){const r=D.useMemo(()=>new qR(e,t,n),[t,n]);return D.useEffect(()=>{r.spec=e},[e]),r}(e,t,n),a=function(e){return D.useMemo(()=>{const t=e.type;return gN(null!=t,"spec.type must be defined"),t},[e])}(e);jR(function(){if(null!=a){const[e,i]=function(e,t,n){const r=n.getRegistry(),o=r.addSource(e,t);return[o,()=>r.removeSource(o)]}(a,o,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),i}},[r,t,n,o,a])}function GR(e,t){const n=RR(e,t);gN(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=function(){const e=WR();return D.useMemo(()=>new IR(e),[e])}(),o=function(e,t){const n=WR(),r=D.useMemo(()=>new BR(n.getBackend()),[n]);return jR(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),jR(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}(n.options,n.previewOptions);return YR(n,r,o),[NR(n.collect,r,o),PR(o),TR(o)]}function KR(e){return D.useMemo(()=>e.hooks.dropTarget(),[e])}class QR{canDrop(){const e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}hover(){const e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){const e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}}function XR(e,t,n){const r=WR(),o=function(e,t){const n=D.useMemo(()=>new QR(e,t),[t]);return D.useEffect(()=>{n.spec=e},[e]),n}(e,t),a=function(e){const{accept:t}=e;return D.useMemo(()=>(gN(null!=e.accept,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}(e);jR(function(){const[e,i]=function(e,t,n){const r=n.getRegistry(),o=r.addTarget(e,t);return[o,()=>r.removeTarget(o)]}(a,o,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),i},[r,t,o,n,a.map(e=>e.toString()).join("|")])}function ZR(e,t){const n=RR(e,t),r=function(){const e=WR();return D.useMemo(()=>new FR(e),[e])}(),o=function(e){const t=WR(),n=D.useMemo(()=>new UR(t.getBackend()),[t]);return jR(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}(n.options);return XR(n,r,o),[NR(n.collect,r,o),KR(o)]}function JR(e){let t=null;return()=>(null==t&&(t=e()),t)}class eP{enter(e){const t=this.entered.length;return this.entered=function(e,t){const n=new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);const o=[];return n.forEach(e=>o.push(e)),o}(this.entered.filter(t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e))),[e]),0===t&&this.entered.length>0}leave(e){const t=this.entered.length;var n,r;return this.entered=(n=this.entered.filter(this.isNodeInDocument),r=e,n.filter(e=>e!==r)),t>0&&0===this.entered.length}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class tP{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get:()=>(console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null)})})}loadDataTransfer(e){if(e){const t={};Object.keys(this.config.exposeProperties).forEach(n=>{const r=this.config.exposeProperties[n];null!=r&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const nP="__NATIVE_FILE__",rP="__NATIVE_URL__",oP="__NATIVE_TEXT__",aP="__NATIVE_HTML__";var iP=Object.freeze({__proto__:null,FILE:nP,HTML:aP,TEXT:oP,URL:rP});function sP(e,t,n){const r=t.reduce((t,n)=>t||e.getData(n),"");return null!=r?r:n}const lP={[nP]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[aP]:{exposeProperties:{html:(e,t)=>sP(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[rP]:{exposeProperties:{urls:(e,t)=>sP(e,t,"").split("\n"),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[oP]:{exposeProperties:{text:(e,t)=>sP(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function uP(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(lP).filter(e=>{const n=lP[e];return!!(null==n?void 0:n.matchesTypes)&&n.matchesTypes.some(e=>t.indexOf(e)>-1)})[0]||null}const cP=JR(()=>/firefox/i.test(navigator.userAgent)),dP=JR(()=>Boolean(window.safari));class fP{interpolate(e){const{xs:t,ys:n,c1s:r,c2s:o,c3s:a}=this;let i=t.length-1;if(e===t[i])return n[i];let s,l=0,u=a.length-1;for(;l<=u;){s=Math.floor(.5*(l+u));const r=t[s];if(r<e)l=s+1;else{if(!(r>e))return n[s];u=s-1}}i=Math.max(0,u);const c=e-t[i],d=c*c;return n[i]+r[i]*c+o[i]*d+a[i]*c*d}constructor(e,t){const{length:n}=e,r=[];for(let e=0;e<n;e++)r.push(e);r.sort((t,n)=>e[t]<e[n]?-1:1);const o=[],a=[];let i,s;for(let r=0;r<n-1;r++)i=e[r+1]-e[r],s=t[r+1]-t[r],o.push(i),a.push(s/i);const l=[a[0]];for(let e=0;e<o.length-1;e++){const t=a[e],n=a[e+1];if(t*n<=0)l.push(0);else{i=o[e];const r=o[e+1],a=i+r;l.push(3*a/((a+r)/t+(a+i)/n))}}l.push(a[a.length-1]);const u=[],c=[];let d;for(let e=0;e<l.length-1;e++){d=a[e];const t=l[e],n=1/o[e],r=t+l[e+1]-d-d;u.push((d-t-r)*n),c.push(r*n*n)}this.xs=e,this.ys=t,this.c1s=l,this.c2s=u,this.c3s=c}}function pP(e){const t=1===e.nodeType?e:e.parentElement;if(!t)return null;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function hP(e){return{x:e.clientX,y:e.clientY}}function mP(e,t,n,r,o){const a=function(e){var t;return"IMG"===e.nodeName&&(cP()||!(null===(t=document.documentElement)||void 0===t?void 0:t.contains(e)))}(t),i=pP(a?e:t),s={x:n.x-i.x,y:n.y-i.y},{offsetWidth:l,offsetHeight:u}=e,{anchorX:c,anchorY:d}=r,{dragPreviewWidth:f,dragPreviewHeight:p}=function(e,t,n,r){let o=e?t.width:n,a=e?t.height:r;return dP()&&e&&(a/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:a}}(a,t,l,u),{offsetX:h,offsetY:m}=o,g=0===m||m;return{x:0===h||h?h:new fP([0,.5,1],[s.x,s.x/l*f,s.x+f-l]).interpolate(c),y:g?m:(()=>{let e=new fP([0,.5,1],[s.y,s.y/u*p,s.y+p-u]).interpolate(d);return dP()&&a&&(e+=(window.devicePixelRatio-1)*p),e})()}}class gP{get window(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}get document(){var e;return(null===(e=this.globalContext)||void 0===e?void 0:e.document)?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}}function yP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){yP(e,t,n[t])})}return e}class bP{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;var t;void 0!==e&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(t=this.window)||void 0===t||t.cancelAnimationFrame(this.asyncEndDragFrameId)))}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);const r=t=>this.handleDragStart(t,e),o=e=>this.handleSelectStart(e);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",r),t.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",r),t.removeEventListener("selectstart",o),t.setAttribute("draggable","false")}}connectDropTarget(e,t){const n=t=>this.handleDragEnter(t,e),r=t=>this.handleDragOver(t,e),o=t=>this.handleDrop(t,e);return t.addEventListener("dragenter",n),t.addEventListener("dragover",r),t.addEventListener("drop",o),()=>{t.removeEventListener("dragenter",n),t.removeEventListener("dragover",r),t.removeEventListener("drop",o)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return vP({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId();return vP({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(iP).some(t=>iP[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){const n=lP[e];if(!n)throw new Error(`native type ${e} has no configuration`);const r=new tP(n);return r.loadDataTransfer(t),r}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;this.mouseMoveTimeoutTimer=setTimeout(()=>{var e;return null===(e=this.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){var e;if(this.currentDragSourceNode=null,this.rootElement)null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0);return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{const t=this.sourceNodes.get(e);return t&&pP(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>Boolean(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{const e=this.currentDragSourceNode;null==e||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{null===this.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!=typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;const{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;const n=hP(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});const{dataTransfer:r}=e,o=uP(r);if(this.monitor.isDragging()){if(r&&"function"==typeof r.setDragImage){const e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),o=this.sourcePreviewNodes.get(e)||t;if(o){const{anchorX:e,anchorY:a,offsetX:i,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),l=mP(t,o,n,{anchorX:e,anchorY:a},{offsetX:i,offsetY:s});r.setDragImage(o,l.x,l.y)}}try{null==r||r.setData("application/json",{})}catch(e){}this.setCurrentDragSourceNode(e.target);const{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(o)this.beginDragNativeItem(o);else{if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{var t;(this.dragEnterTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer));if(!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;const{dataTransfer:n}=e,r=uP(n);r&&this.beginDragNativeItem(r,n)},this.handleTopDragEnter=e=>{const{dragEnterTargetIds:t}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:hP(e)});t.some(e=>this.monitor.canDropOnTarget(e))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=e=>{var t;(this.dragOverTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer))},this.handleTopDragOver=e=>{const{dragOverTargetIds:t}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));this.altKeyPressed=e.altKey,this.lastClientOffset=hP(e),this.scheduleHover(t);(t||[]).some(e=>this.monitor.canDropOnTarget(e))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault();this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=e=>{var t;(this.dropTargetIds=[],this.isDraggingNativeItem())?(e.preventDefault(),null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):uP(e.dataTransfer)&&e.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{const{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:hP(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{const t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new gP(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new eP(this.isNodeInDocument)}}const wP=function(e,t,n){return new bP(e,t,n)};var xP,SP,CP=Object.create,kP=Object.defineProperty,_P=Object.getOwnPropertyDescriptor,EP=Object.getOwnPropertyNames,jP=Object.getPrototypeOf,OP=Object.prototype.hasOwnProperty,NP=(e,t,n)=>(n=null!=e?CP(jP(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of EP(t))OP.call(e,o)||o===n||kP(e,o,{get:()=>t[o],enumerable:!(r=_P(t,o))||r.enumerable});return e})(kP(n,"default",{value:e,enumerable:!0}),e)),RP=(xP={"node_modules/classnames/index.js"(e,t){!function(){var e={}.hasOwnProperty;function n(){for(var t=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var a=typeof o;if("string"===a||"number"===a)t.push(o);else if(Array.isArray(o)){if(o.length){var i=n.apply(null,o);i&&t.push(i)}}else if("object"===a){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){t.push(o.toString());continue}for(var s in o)e.call(o,s)&&o[s]&&t.push(s)}}}return t.join(" ")}void 0!==t&&t.exports?(n.default=n,t.exports=n):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],function(){return n}):window.classNames=n}()}},function(){return SP||(0,xP[EP(xP)[0]])((SP={exports:{}}).exports,SP),SP.exports}),PP=NP(RP()),TP="object"==typeof global&&global&&global.Object===Object&&global,DP="object"==typeof self&&self&&self.Object===Object&&self,MP=TP||DP||Function("return this")(),IP=MP.Symbol,AP=Object.prototype,FP=AP.hasOwnProperty,LP=AP.toString,zP=IP?IP.toStringTag:void 0;var $P=function(e){var t=FP.call(e,zP),n=e[zP];try{e[zP]=void 0;var r=!0}catch(e){}var o=LP.call(e);return r&&(t?e[zP]=n:delete e[zP]),o},HP=Object.prototype.toString;var VP=function(e){return HP.call(e)},BP=IP?IP.toStringTag:void 0;var UP=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":BP&&BP in Object(e)?$P(e):VP(e)};var WP=function(e){return null!=e&&"object"==typeof e};var qP=function(e){return"symbol"==typeof e||WP(e)&&"[object Symbol]"==UP(e)};var YP=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},GP=Array.isArray,KP=IP?IP.prototype:void 0,QP=KP?KP.toString:void 0;var XP=function e(t){if("string"==typeof t)return t;if(GP(t))return YP(t,e)+"";if(qP(t))return QP?QP.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var ZP=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var JP,eT=function(e){if(!ZP(e))return!1;var t=UP(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},tT=MP["__core-js_shared__"],nT=(JP=/[^.]+$/.exec(tT&&tT.keys&&tT.keys.IE_PROTO||""))?"Symbol(src)_1."+JP:"";var rT=function(e){return!!nT&&nT in e},oT=Function.prototype.toString;var aT=function(e){if(null!=e){try{return oT.call(e)}catch(e){}try{return e+""}catch(e){}}return""},iT=/^\[object .+?Constructor\]$/,sT=Function.prototype,lT=Object.prototype,uT=sT.toString,cT=lT.hasOwnProperty,dT=RegExp("^"+uT.call(cT).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var fT=function(e){return!(!ZP(e)||rT(e))&&(eT(e)?dT:iT).test(aT(e))};var pT=function(e,t){return null==e?void 0:e[t]};var hT=function(e,t){var n=pT(e,t);return fT(n)?n:void 0},mT=hT(MP,"WeakMap");var gT=function(){};var yT=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1};var vT=function(e){return e!=e};var bT=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1};var wT=function(e,t,n){return t==t?bT(e,t,n):yT(e,vT,n)};var xT=function(e,t){return!!(null==e?0:e.length)&&wT(e,t,0)>-1},ST=/^(?:0|[1-9]\d*)$/;var CT=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ST.test(e))&&e>-1&&e%1==0&&e<t};var kT=function(e,t){return e===t||e!=e&&t!=t};var _T=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var ET=function(e){return null!=e&&_T(e.length)&&!eT(e)},jT=Object.prototype;var OT=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||jT)};var NT=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var RT=function(e){return WP(e)&&"[object Arguments]"==UP(e)},PT=Object.prototype,TT=PT.hasOwnProperty,DT=PT.propertyIsEnumerable,MT=RT(function(){return arguments}())?RT:function(e){return WP(e)&&TT.call(e,"callee")&&!DT.call(e,"callee")},IT=MT;var AT=function(){return!1},FT="object"==typeof e&&e&&!e.nodeType&&e,LT=FT&&"object"==typeof module&&module&&!module.nodeType&&module,zT=LT&&LT.exports===FT?MP.Buffer:void 0,$T=(zT?zT.isBuffer:void 0)||AT,HT={};HT["[object Float32Array]"]=HT["[object Float64Array]"]=HT["[object Int8Array]"]=HT["[object Int16Array]"]=HT["[object Int32Array]"]=HT["[object Uint8Array]"]=HT["[object Uint8ClampedArray]"]=HT["[object Uint16Array]"]=HT["[object Uint32Array]"]=!0,HT["[object Arguments]"]=HT["[object Array]"]=HT["[object ArrayBuffer]"]=HT["[object Boolean]"]=HT["[object DataView]"]=HT["[object Date]"]=HT["[object Error]"]=HT["[object Function]"]=HT["[object Map]"]=HT["[object Number]"]=HT["[object Object]"]=HT["[object RegExp]"]=HT["[object Set]"]=HT["[object String]"]=HT["[object WeakMap]"]=!1;var VT=function(e){return WP(e)&&_T(e.length)&&!!HT[UP(e)]};var BT=function(e){return function(t){return e(t)}},UT="object"==typeof e&&e&&!e.nodeType&&e,WT=UT&&"object"==typeof module&&module&&!module.nodeType&&module,qT=WT&&WT.exports===UT&&TP.process,YT=function(){try{var e=WT&&WT.require&&WT.require("util").types;return e||qT&&qT.binding&&qT.binding("util")}catch(e){}}(),GT=YT&&YT.isTypedArray,KT=GT?BT(GT):VT,QT=Object.prototype.hasOwnProperty;var XT=function(e,t){var n=GP(e),r=!n&&IT(e),o=!n&&!r&&$T(e),a=!n&&!r&&!o&&KT(e),i=n||r||o||a,s=i?NT(e.length,String):[],l=s.length;for(var u in e)!t&&!QT.call(e,u)||i&&("length"==u||o&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||CT(u,l))||s.push(u);return s};var ZT=function(e,t){return function(n){return e(t(n))}},JT=ZT(Object.keys,Object),eD=Object.prototype.hasOwnProperty;var tD=function(e){if(!OT(e))return JT(e);var t=[];for(var n in Object(e))eD.call(e,n)&&"constructor"!=n&&t.push(n);return t};var nD=function(e){return ET(e)?XT(e):tD(e)},rD=hT(Object,"create");var oD=function(){this.__data__=rD?rD(null):{},this.size=0};var aD=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},iD=Object.prototype.hasOwnProperty;var sD=function(e){var t=this.__data__;if(rD){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return iD.call(t,e)?t[e]:void 0},lD=Object.prototype.hasOwnProperty;var uD=function(e){var t=this.__data__;return rD?void 0!==t[e]:lD.call(t,e)};var cD=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=rD&&void 0===t?"__lodash_hash_undefined__":t,this};function dD(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}dD.prototype.clear=oD,dD.prototype.delete=aD,dD.prototype.get=sD,dD.prototype.has=uD,dD.prototype.set=cD;var fD=dD;var pD=function(){this.__data__=[],this.size=0};var hD=function(e,t){for(var n=e.length;n--;)if(kT(e[n][0],t))return n;return-1},mD=Array.prototype.splice;var gD=function(e){var t=this.__data__,n=hD(t,e);return!(n<0)&&(n==t.length-1?t.pop():mD.call(t,n,1),--this.size,!0)};var yD=function(e){var t=this.__data__,n=hD(t,e);return n<0?void 0:t[n][1]};var vD=function(e){return hD(this.__data__,e)>-1};var bD=function(e,t){var n=this.__data__,r=hD(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function wD(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}wD.prototype.clear=pD,wD.prototype.delete=gD,wD.prototype.get=yD,wD.prototype.has=vD,wD.prototype.set=bD;var xD=wD,SD=hT(MP,"Map");var CD=function(){this.size=0,this.__data__={hash:new fD,map:new(SD||xD),string:new fD}};var kD=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var _D=function(e,t){var n=e.__data__;return kD(t)?n["string"==typeof t?"string":"hash"]:n.map};var ED=function(e){var t=_D(this,e).delete(e);return this.size-=t?1:0,t};var jD=function(e){return _D(this,e).get(e)};var OD=function(e){return _D(this,e).has(e)};var ND=function(e,t){var n=_D(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function RD(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}RD.prototype.clear=CD,RD.prototype.delete=ED,RD.prototype.get=jD,RD.prototype.has=OD,RD.prototype.set=ND;var PD=RD;var TD=function(e){return null==e?"":XP(e)};var DD=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e};var MD=function(e){return function(t){return null==e?void 0:e[t]}};var ID=function(){this.__data__=new xD,this.size=0};var AD=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var FD=function(e){return this.__data__.get(e)};var LD=function(e){return this.__data__.has(e)};var zD=function(e,t){var n=this.__data__;if(n instanceof xD){var r=n.__data__;if(!SD||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new PD(r)}return n.set(e,t),this.size=n.size,this};function $D(e){var t=this.__data__=new xD(e);this.size=t.size}$D.prototype.clear=ID,$D.prototype.delete=AD,$D.prototype.get=FD,$D.prototype.has=LD,$D.prototype.set=zD;var HD=$D;var VD=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a};var BD=function(){return[]},UD=Object.prototype.propertyIsEnumerable,WD=Object.getOwnPropertySymbols,qD=WD?function(e){return null==e?[]:(e=Object(e),VD(WD(e),function(t){return UD.call(e,t)}))}:BD;var YD=function(e,t,n){var r=t(e);return GP(e)?r:DD(r,n(e))};var GD=function(e){return YD(e,nD,qD)},KD=hT(MP,"DataView"),QD=hT(MP,"Promise"),XD=hT(MP,"Set"),ZD="[object Map]",JD="[object Promise]",eM="[object Set]",tM="[object WeakMap]",nM="[object DataView]",rM=aT(KD),oM=aT(SD),aM=aT(QD),iM=aT(XD),sM=aT(mT),lM=UP;(KD&&lM(new KD(new ArrayBuffer(1)))!=nM||SD&&lM(new SD)!=ZD||QD&&lM(QD.resolve())!=JD||XD&&lM(new XD)!=eM||mT&&lM(new mT)!=tM)&&(lM=function(e){var t=UP(e),n="[object Object]"==t?e.constructor:void 0,r=n?aT(n):"";if(r)switch(r){case rM:return nM;case oM:return ZD;case aM:return JD;case iM:return eM;case sM:return tM}return t});var uM=lM,cM=MP.Uint8Array;var dM=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var fM=function(e){return this.__data__.has(e)};function pM(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new PD;++t<n;)this.add(e[t])}pM.prototype.add=pM.prototype.push=dM,pM.prototype.has=fM;var hM=pM;var mM=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var gM=function(e,t){return e.has(t)};var yM=function(e,t,n,r,o,a){var i=1&n,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,p=2&n?new hM:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var h=e[d],m=t[d];if(r)var g=i?r(m,h,d,t,e,a):r(h,m,d,e,t,a);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!mM(t,function(e,t){if(!gM(p,t)&&(h===e||o(h,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(h!==m&&!o(h,m,n,r,a)){f=!1;break}}return a.delete(e),a.delete(t),f};var vM=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n};var bM=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n},wM=IP?IP.prototype:void 0,xM=wM?wM.valueOf:void 0;var SM=function(e,t,n,r,o,a,i){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new cM(e),new cM(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return kT(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=vM;case"[object Set]":var l=1&r;if(s||(s=bM),e.size!=t.size&&!l)return!1;var u=i.get(e);if(u)return u==t;r|=2,i.set(e,t);var c=yM(s(e),s(t),r,o,a,i);return i.delete(e),c;case"[object Symbol]":if(xM)return xM.call(e)==xM.call(t)}return!1},CM=Object.prototype.hasOwnProperty;var kM=function(e,t,n,r,o,a){var i=1&n,s=GD(e),l=s.length;if(l!=GD(t).length&&!i)return!1;for(var u=l;u--;){var c=s[u];if(!(i?c in t:CM.call(t,c)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var h=i;++u<l;){var m=e[c=s[u]],g=t[c];if(r)var y=i?r(g,m,c,t,e,a):r(m,g,c,e,t,a);if(!(void 0===y?m===g||o(m,g,n,r,a):y)){p=!1;break}h||(h="constructor"==c)}if(p&&!h){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(p=!1)}return a.delete(e),a.delete(t),p},_M="[object Arguments]",EM="[object Array]",jM="[object Object]",OM=Object.prototype.hasOwnProperty;var NM=function(e,t,n,r,o,a){var i=GP(e),s=GP(t),l=i?EM:uM(e),u=s?EM:uM(t),c=(l=l==_M?jM:l)==jM,d=(u=u==_M?jM:u)==jM,f=l==u;if(f&&$T(e)){if(!$T(t))return!1;i=!0,c=!1}if(f&&!c)return a||(a=new HD),i||KT(e)?yM(e,t,n,r,o,a):SM(e,t,l,n,r,o,a);if(!(1&n)){var p=c&&OM.call(e,"__wrapped__"),h=d&&OM.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,g=h?t.value():t;return a||(a=new HD),o(m,g,n,r,a)}}return!!f&&(a||(a=new HD),kM(e,t,n,r,o,a))};var RM=function e(t,n,r,o,a){return t===n||(null==t||null==n||!WP(t)&&!WP(n)?t!=t&&n!=n:NM(t,n,r,o,e,a))};var PM=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},TM=MD({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),DM=/[&<>"']/g,MM=RegExp(DM.source);var IM=function(e){return(e=TD(e))&&MM.test(e)?e.replace(DM,TM):e},AM=/[\\^$.*+?()[\]{}|]/g,FM=RegExp(AM.source);var LM=function(e){return(e=TD(e))&&FM.test(e)?e.replace(AM,"\\$&"):e};var zM=function(e,t){return RM(e,t)},$M=XD&&1/bM(new XD([,-0]))[1]==1/0?function(e){return new XD(e)}:gT,HM=$M;var VM=function(e,t,n){var r=-1,o=xT,a=e.length,i=!0,s=[],l=s;if(n)i=!1,o=PM;else if(a>=200){var u=t?null:HM(e);if(u)return bM(u);i=!1,o=gM,l=new hM}else l=t?[]:s;e:for(;++r<a;){var c=e[r],d=t?t(c):c;if(c=n||0!==c?c:0,i&&d==d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(c)}else o(l,d,n)||(l!==s&&l.push(d),s.push(c))}return s};var BM=function(e){return e&&e.length?VM(e):[]},UM={ENTER:[10,13],TAB:9,BACKSPACE:8,UP_ARROW:38,DOWN_ARROW:40,SPACE:32},WM={ENTER:"Enter",TAB:"Tab",COMMA:",",SPACE:" ",SEMICOLON:";"},qM="Press enter to add new tag",YM="text",GM={tags:"ReactTags__tags",tagInput:"ReactTags__tagInput",tagInputField:"ReactTags__tagInputField",selected:"ReactTags__selected",tag:"ReactTags__tag",remove:"ReactTags__remove",suggestions:"ReactTags__suggestions",activeSuggestion:"ReactTags__activeSuggestion",editTagInput:"ReactTags__editTagInput",editTagInputField:"ReactTags__editTagInputField",clearAll:"ReactTags__clearAll"},KM="inline",QM="top",XM="bottom",ZM="Tag limit reached!";function JM(e){const{moveTag:t,readOnly:n,allowDragDrop:r}=e;return void 0!==t&&!n&&r}var eI=e=>{const{readOnly:t,removeComponent:n,onRemove:r,className:o,tag:a,index:i}=e,s=e=>{if(UM.ENTER.includes(e.keyCode)||e.keyCode===UM.SPACE)return e.preventDefault(),void e.stopPropagation();e.keyCode===UM.BACKSPACE&&r(e)};if(t)return m.jsx("span",{});const l=`Tag at index ${i} with value ${a.id} focussed. Press backspace to remove`;if(n){const e=n;return m.jsx(e,{"data-testid":"remove",onRemove:r,onKeyDown:s,className:o,"aria-label":l,tag:a,index:i})}return m.jsx("button",{"data-testid":"remove",onClick:r,onKeyDown:s,className:o,type:"button","aria-label":l,children:m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",height:"12",width:"12",fill:"#fff",children:m.jsx("path",{d:"M376.6 84.5c11.3-13.6 9.5-33.8-4.1-45.1s-33.8-9.5-45.1 4.1L192 206 56.6 43.5C45.3 29.9 25.1 28.1 11.5 39.4S-3.9 70.9 7.4 84.5L150.3 256 7.4 427.5c-11.3 13.6-9.5 33.8 4.1 45.1s33.8 9.5 45.1-4.1L192 306 327.4 468.5c11.3 13.6 31.5 15.4 45.1 4.1s15.4-31.5 4.1-45.1L233.7 256 376.6 84.5z"})})})},tI="tag",nI=e=>{const t=D.useRef(null),{readOnly:n=!1,tag:r,classNames:o,index:a,moveTag:i,allowDragDrop:s=!0,labelField:l="text",tags:u}=e,[{isDragging:c},d]=GR(()=>({type:tI,collect:e=>({isDragging:!!e.isDragging()}),item:e,canDrag:()=>JM({moveTag:i,readOnly:n,allowDragDrop:s})}),[u]),[,f]=ZR(()=>({accept:tI,drop:t=>{const n=t.index,r=a;n!==r&&e?.moveTag?.(n,r)},canDrop:e=>function(e){const{readOnly:t,allowDragDrop:n}=e;return!t&&n}(e)}),[u]);d(f(t));const p=e.tag[l],{className:h=""}=r,g=c?0:1;return m.jsxs("span",{ref:t,className:(0,PP.default)("tag-wrapper",o.tag,h),style:{opacity:g,cursor:JM({moveTag:i,readOnly:n,allowDragDrop:s})?"move":"auto"},"data-testid":"tag",onClick:e.onTagClicked,onTouchStart:e.onTagClicked,children:[p,m.jsx(eI,{tag:e.tag,className:o.remove,removeComponent:e.removeComponent,onRemove:e.onDelete,readOnly:n,index:a})]})},rI=e=>m.jsx("button",{"aria-label":e["aria-label"],className:e.classNames.clearAll,onClick:e.onClick,children:"Clear all"}),oI=(e,t,n,r)=>"function"==typeof r?r(e):e.length>=t&&n,aI=D.memo(e=>{const t=D.createRef(),{labelField:n,minQueryLength:r,isFocused:o,classNames:a,selectedIndex:i,query:s}=e;D.useEffect(()=>{if(!t.current)return;const e=t.current.querySelector(`.${a.activeSuggestion}`);e&&((e,t)=>{const n=t.offsetHeight,r=e.offsetHeight,o=e.offsetTop-t.scrollTop;o+r>=n?t.scrollTop+=o-n+r:o<0&&(t.scrollTop+=o)})(e,t.current)},[i]);const l=(e,t)=>{const r=t.trim().replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&"),{[n]:o}=e;return{__html:o.replace(RegExp(r,"gi"),e=>`<mark>${IM(e)}</mark>`)}},u=(t,n)=>"function"==typeof e.renderSuggestion?e.renderSuggestion(t,n):m.jsx("span",{dangerouslySetInnerHTML:l(t,n)}),c=e.suggestions.map((t,n)=>m.jsx("li",{onMouseDown:e.handleClick.bind(null,n),onTouchStart:e.handleClick.bind(null,n),onMouseOver:e.handleHover.bind(null,n),className:n===e.selectedIndex?e.classNames.activeSuggestion:"",children:u(t,e.query)},n));return 0!==c.length&&oI(s,r||2,o,e.shouldRenderSuggestions)?m.jsx("div",{ref:t,className:a.suggestions,"data-testid":"suggestions",children:m.jsxs("ul",{children:[" ",c," "]})}):null},(e,t)=>{const{query:n,minQueryLength:r=2,isFocused:o,suggestions:a}=t;return!(e.isFocused!==o||!zM(e.suggestions,a)||oI(n,r,o,t.shouldRenderSuggestions)!==oI(e.query,e.minQueryLength??2,e.isFocused,e.shouldRenderSuggestions)||e.selectedIndex!==t.selectedIndex)}),iI=aI,sI=NP(RP()),lI=e=>{const{autofocus:t,autoFocus:n,readOnly:r,labelField:o,allowDeleteFromEmptyInput:a,allowAdditionFromPaste:i,allowDragDrop:s,minQueryLength:l,shouldRenderSuggestions:u,removeComponent:c,autocomplete:d,inline:f,maxTags:p,allowUnique:h,editable:g,placeholder:y,delimiters:v,separators:b,tags:w,inputFieldPosition:x,inputProps:S,classNames:C,maxLength:k,inputValue:_,clearAll:E,ariaAttrs:j}=e,[O,N]=D.useState(e.suggestions),[R,P]=D.useState(""),[T,M]=D.useState(!1),[I,A]=D.useState(-1),[F,L]=D.useState(!1),[z,$]=D.useState(""),[H,V]=D.useState(-1),[B,U]=D.useState(""),W=D.createRef(),q=D.useRef(null),Y=D.useRef(null);D.useEffect(()=>{v.length&&console.warn("[Deprecation] The delimiters prop is deprecated and will be removed in v7.x.x, please use separators instead. If you have any concerns regarding this, please share your thoughts in https://github.com/react-tags/react-tags/issues/960")},[]),D.useEffect(()=>{void 0!==f&&console.warn("[Deprecation] The inline attribute is deprecated and will be removed in v7.x.x, please use inputFieldPosition instead.")},[f]),D.useEffect(()=>{void 0!==t&&console.warn("[Deprecated] autofocus prop will be removed in 7.x so please migrate to autoFocus prop."),(t||n&&!1!==t)&&!r&&Q()},[n,n,r]),D.useEffect(()=>{ee()},[R,e.suggestions]);const G=t=>{let n=e.suggestions.slice();if(h){const e=w.map(e=>e.id.trim().toLowerCase());n=n.filter(t=>!e.includes(t.id.toLowerCase()))}if(e.handleFilterSuggestions)return e.handleFilterSuggestions(t,n);const r=n.filter(e=>0===K(t,e)),o=n.filter(e=>K(t,e)>0);return r.concat(o)},K=(e,t)=>t[o].toLowerCase().indexOf(e.toLowerCase()),Q=()=>{P(""),q.current&&(q.current.value="",q.current.focus())},X=(t,n)=>{n.preventDefault(),n.stopPropagation();const r=w.slice();0!==r.length&&(U(""),e?.handleDelete?.(t,n),Z(t,r))},Z=(e,t)=>{if(!W?.current)return;const n=W.current.querySelectorAll(".ReactTags__remove");let r="";0===e&&t.length>1?(r=`Tag at index ${e} with value ${t[e].id} deleted. Tag at index 0 with value ${t[1].id} focussed. Press backspace to remove`,n[0].focus()):e>0?(r=`Tag at index ${e} with value ${t[e].id} deleted. Tag at index ${e-1} with value ${t[e-1].id} focussed. Press backspace to remove`,n[e-1].focus()):(r=`Tag at index ${e} with value ${t[e].id} deleted. Input focussed. Press enter to add a new tag`,q.current?.focus()),$(r)},J=t=>{e.handleInputChange&&e.handleInputChange(t.target.value,t);const n=t.target.value.trim();P(n)},ee=()=>{const e=G(R);N(e),A(I>=e.length?e.length-1:I)},te=t=>{const n=t.target.value;e.handleInputFocus&&e.handleInputFocus(n,t),M(!0)},ne=t=>{const n=t.target.value;e.handleInputBlur&&(e.handleInputBlur(n,t),q.current&&(q.current.value="")),M(!1),V(-1)},re=e=>{if(!e.nativeEvent.isComposing){if("Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),A(-1),L(!1),N([]),V(-1)),(-1!==b.indexOf(e.key)||-1!==v.indexOf(e.keyCode))&&!e.shiftKey){e.keyCode===UM.TAB&&""===R||e.preventDefault();const t=F&&-1!==I?O[I]:{id:R.trim(),[o]:R.trim(),className:""};Object.keys(t)&&ie(t)}"Backspace"!==e.key||""!==R||!a&&x!==KM||X(w.length-1,e),e.keyCode===UM.UP_ARROW&&(e.preventDefault(),A(I<=0?O.length-1:I-1),L(!0)),e.keyCode===UM.DOWN_ARROW&&(e.preventDefault(),L(!0),0===O.length?A(-1):A((I+1)%O.length))}},oe=()=>p&&w.length>=p,ae=t=>{if(!i)return;if(oe())return U(ZM),void Q();U(""),t.preventDefault();const n=t.clipboardData||window.clipboardData,r=n.getData("text"),{maxLength:a=r.length}=e,s=Math.min(a,r.length),l=n.getData("text").substr(0,s);let u=v;b.length&&(u=[],b.forEach(e=>{const t=function(e){switch(e){case WM.ENTER:return[10,13];case WM.TAB:return 9;case WM.COMMA:return 188;case WM.SPACE:return 32;case WM.SEMICOLON:return 186;default:return 0}}(e);Array.isArray(t)?u=[...u,...t]:u.push(t)}));const c=function(e){const t=e.map(e=>{const t=e-48*Math.floor(e/48);return String.fromCharCode(96<=e?t:e)}).join(""),n=LM(t);return new RegExp(`[${n}]+`)}(u),d=l.split(c).map(e=>e.trim());BM(d).forEach(e=>ie({id:e.trim(),[o]:e.trim(),className:""}))},ie=t=>{if(!t.id||!t[o])return;if(-1===H){if(oe())return U(ZM),void Q();U("")}const n=w.map(e=>e.id.toLowerCase());if(!(h&&n.indexOf(t.id.trim().toLowerCase())>=0)){if(d){const e=G(t[o]);console.warn("[Deprecation] The autocomplete prop will be removed in 7.x to simplify the integration and make it more intutive. If you have any concerns regarding this, please share your thoughts in https://github.com/react-tags/react-tags/issues/949"),(1===d&&1===e.length||!0===d&&e.length)&&(t=e[0])}-1!==H&&e.onTagUpdate?e.onTagUpdate(H,t):e?.handleAddition?.(t),P(""),L(!1),A(-1),V(-1),Q()}},se=(t,n)=>{const r=w[t];e?.handleDrag?.(r,t,n)},le=(()=>{const t={...GM,...e.classNames};return w.map((n,a)=>m.jsx(D.Fragment,{children:H===a?m.jsx("div",{className:t.editTagInput,children:m.jsx("input",{ref:e=>{Y.current=e},onFocus:te,value:R,onChange:J,onKeyDown:re,onBlur:ne,className:t.editTagInputField,onPaste:ae,"data-testid":"tag-edit"})}):m.jsx(nI,{index:a,tag:n,tags:w,labelField:o,onDelete:e=>X(a,e),moveTag:s?se:void 0,removeComponent:c,onTagClicked:t=>((t,n,a)=>{r||(g&&(V(t),P(n[o]),Y.current?.focus()),e.handleTagClick?.(t,a))})(a,n,t),readOnly:r,classNames:t,allowDragDrop:s})},a))})(),ue={...GM,...C},{name:ce,id:de}=e,fe=!1===f?XM:x,pe=r?null:m.jsxs("div",{className:ue.tagInput,children:[m.jsx("input",{...S,ref:e=>{q.current=e},className:ue.tagInputField,type:"text",placeholder:y,"aria-label":y,onFocus:te,onBlur:ne,onChange:J,onKeyDown:re,onPaste:ae,name:ce,id:de,maxLength:k,value:_,"data-automation":"input","data-testid":"input"}),m.jsx(iI,{query:R.trim(),suggestions:O,labelField:o,selectedIndex:I,handleClick:e=>{ie(O[e])},handleHover:e=>{A(e),L(!0)},minQueryLength:l,shouldRenderSuggestions:u,isFocused:T,classNames:ue,renderSuggestion:e.renderSuggestion}),E&&w.length>0&&m.jsx(rI,{"aria-label":j?.clearAllLabel,classNames:ue,onClick:()=>{e.onClearAll&&e.onClearAll(),U(""),Q()}}),B&&m.jsxs("div",{"data-testid":"error",className:"ReactTags__error",children:[m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",height:"24",width:"24",fill:"#e03131",children:m.jsx("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"})}),B]})]});return m.jsxs("div",{className:(0,sI.default)(ue.tags,"react-tags-wrapper"),ref:W,children:[m.jsx("p",{role:"alert",className:"sr-only",style:{position:"absolute",overflow:"hidden",clip:"rect(0 0 0 0)",margin:"-1px",padding:0,width:"1px",height:"1px",border:0},children:z}),fe===QM&&pe,m.jsxs("div",{className:ue.selected,children:[le,fe===KM&&pe]}),fe===XM&&pe]})},uI=e=>{const{placeholder:t=qM,labelField:n=YM,suggestions:r=[],delimiters:o=[],separators:a=(e.delimiters?.length?[]:[WM.ENTER,WM.TAB]),autofocus:i,autoFocus:s=!0,inline:l,inputFieldPosition:u="inline",allowDeleteFromEmptyInput:c=!1,allowAdditionFromPaste:d=!0,autocomplete:f=!1,readOnly:p=!1,allowUnique:h=!0,allowDragDrop:g=!0,tags:y=[],inputProps:v={},editable:b=!1,clearAll:w=!1,ariaAttrs:x={clearAllLabel:"clear all tags"},handleDelete:S,handleAddition:C,onTagUpdate:k,handleDrag:_,handleFilterSuggestions:E,handleTagClick:j,handleInputChange:O,handleInputFocus:N,handleInputBlur:R,minQueryLength:P,shouldRenderSuggestions:T,removeComponent:D,onClearAll:M,classNames:I,name:A,id:F,maxLength:L,inputValue:z,maxTags:$,renderSuggestion:H}=e;return m.jsx(lI,{placeholder:t,labelField:n,suggestions:r,delimiters:o,separators:a,autofocus:i,autoFocus:s,inline:l,inputFieldPosition:u,allowDeleteFromEmptyInput:c,allowAdditionFromPaste:d,autocomplete:f,readOnly:p,allowUnique:h,allowDragDrop:g,tags:y,inputProps:v,editable:b,clearAll:w,ariaAttrs:x,handleDelete:S,handleAddition:C,onTagUpdate:k,handleDrag:_,handleFilterSuggestions:E,handleTagClick:j,handleInputChange:O,handleInputFocus:N,handleInputBlur:R,minQueryLength:P,shouldRenderSuggestions:T,removeComponent:D,onClearAll:M,classNames:I,name:A,id:F,maxLength:L,inputValue:z,maxTags:$,renderSuggestion:H})},cI=({...e})=>m.jsx(CR,{backend:wP,children:m.jsx(uI,{...e})});
223
+ `;var LE=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});D.forwardRef((e,t)=>m.jsx(ba.span,{...e,ref:t,style:{...LE,...e.style}})).displayName="VisuallyHidden";var zE=[" ","Enter","ArrowUp","ArrowDown"],$E=[" ","Enter"],HE="Select",[VE,BE,UE]=xa(HE),[WE]=sa(HE,[UE,Bs]),qE=Bs(),[YE,GE]=WE(HE),[KE,QE]=WE(HE),XE=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:p,form:h}=e,g=qE(t),[y,v]=D.useState(null),[b,w]=D.useState(null),[x,S]=D.useState(!1),C=Ca(u),[k,_]=da({prop:r,defaultProp:o??!1,onChange:a,caller:HE}),[E,j]=da({prop:i,defaultProp:s,onChange:l,caller:HE}),O=D.useRef(null),N=!y||(h||!!y.closest("form")),[R,P]=D.useState(new Set),T=Array.from(R).map(e=>e.props.value).join(";");return m.jsx(al,{...g,children:m.jsxs(YE,{required:p,scope:t,trigger:y,onTriggerChange:v,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:Ka(),value:E,onValueChange:j,open:k,onOpenChange:_,dir:C,triggerPointerDownPosRef:O,disabled:f,children:[m.jsx(VE.Provider,{scope:t,children:m.jsx(KE,{scope:e.__scopeSelect,onNativeOptionAdd:D.useCallback(e=>{P(t=>new Set(t).add(e))},[]),onNativeOptionRemove:D.useCallback(e=>{P(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:n})}),N?m.jsxs(Fj,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:E,onChange:e=>j(e.target.value),disabled:f,form:h,children:[void 0===E?m.jsx("option",{value:""}):null,Array.from(R)]},T):null]})})};XE.displayName=HE;var ZE="SelectTrigger",JE=D.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=qE(n),i=GE(ZE,n),s=i.disabled||r,l=ia(t,i.onTriggerChange),u=BE(n),c=D.useRef("touch"),[d,f,p]=zj(e=>{const t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===i.value),r=$j(t,e,n);void 0!==r&&i.onValueChange(r.value)}),h=e=>{s||(i.onOpenChange(!0),p()),e&&(i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return m.jsx(il,{asChild:!0,...a,children:m.jsx(ba.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Lj(i.value)?"":void 0,...o,ref:l,onClick:ra(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==c.current&&h(e)}),onPointerDown:ra(o.onPointerDown,e=>{c.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(h(e),e.preventDefault())}),onKeyDown:ra(o.onKeyDown,e=>{const t=""!==d.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||f(e.key),t&&" "===e.key||zE.includes(e.key)&&(h(),e.preventDefault())})})})});JE.displayName=ZE;var ej="SelectValue",tj=D.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,l=GE(ej,n),{onValueNodeHasChildrenChange:u}=l,c=void 0!==a,d=ia(t,l.onValueNodeChange);return ua(()=>{u(c)},[u,c]),m.jsx(ba.span,{...s,ref:d,style:{pointerEvents:"none"},children:Lj(l.value)?m.jsx(m.Fragment,{children:i}):a})});tj.displayName=ej;var nj=D.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return m.jsx(ba.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});nj.displayName="SelectIcon";var rj=e=>m.jsx(ul,{asChild:!0,...e});rj.displayName="SelectPortal";var oj="SelectContent",aj=D.forwardRef((e,t)=>{const n=GE(oj,e.__scopeSelect),[r,o]=D.useState();if(ua(()=>{o(new DocumentFragment)},[]),!n.open){const t=r;return t?fa.createPortal(m.jsx(sj,{scope:e.__scopeSelect,children:m.jsx(VE.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),t):null}return m.jsx(cj,{...e,ref:t})});aj.displayName=oj;var ij=10,[sj,lj]=WE(oj),uj=ha("SelectContent.RemoveScroll"),cj=D.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:g,avoidCollisions:y,...v}=e,b=GE(oj,n),[w,x]=D.useState(null),[S,C]=D.useState(null),k=ia(t,e=>x(e)),[_,E]=D.useState(null),[j,O]=D.useState(null),N=BE(n),[R,P]=D.useState(!1),T=D.useRef(!1);D.useEffect(()=>{if(w)return Al(w)},[w]),Ia();const M=D.useCallback(e=>{const[t,...n]=N().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(const n of e){if(n===o)return;if(n?.scrollIntoView({block:"nearest"}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==o)return}},[N,S]),I=D.useCallback(()=>M([_,w]),[M,_,w]);D.useEffect(()=>{R&&I()},[R,I]);const{onOpenChange:A,triggerPointerDownPosRef:F}=b;D.useEffect(()=>{if(w){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(F.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():w.contains(n.target)||A(!1),document.removeEventListener("pointermove",t),F.current=null};return null!==F.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[w,A,F]),D.useEffect(()=>{const e=()=>A(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[A]);const[L,z]=zj(e=>{const t=N().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=$j(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),$=D.useCallback((e,t,n)=>{const r=!T.current&&!n;(void 0!==b.value&&b.value===t||r)&&(E(e),r&&(T.current=!0))},[b.value]),H=D.useCallback(()=>w?.focus(),[w]),V=D.useCallback((e,t,n)=>{const r=!T.current&&!n;(void 0!==b.value&&b.value===t||r)&&O(e)},[b.value]),B="popper"===r?fj:dj,U=B===fj?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:g,avoidCollisions:y}:{};return m.jsx(sj,{scope:n,content:w,viewport:S,onViewportChange:C,itemRefCallback:$,selectedItem:_,onItemLeave:H,itemTextRefCallback:V,focusSelectedItem:I,selectedItemText:j,position:r,isPositioned:R,searchRef:L,children:m.jsx(ku,{as:uj,allowPinchZoom:!0,children:m.jsx($a,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:ra(o,e=>{b.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:m.jsx(Ra,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:m.jsx(B,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault(),...v,...U,onPlaced:()=>P(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:ra(v.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||z(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=N().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>M(t)),e.preventDefault()}})})})})})})});cj.displayName="SelectContentImpl";var dj=D.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=GE(oj,n),i=lj(oj,n),[s,l]=D.useState(null),[u,c]=D.useState(null),d=ia(t,e=>c(e)),f=BE(n),p=D.useRef(!1),h=D.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:v,focusSelectedItem:b}=i,w=D.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&y&&v){const e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),o=v.getBoundingClientRect();if("rtl"!==a.dir){const r=o.left-t.left,a=n.left-r,i=e.left-a,l=e.width+i,u=Math.max(l,t.width),c=window.innerWidth-ij,d=FE(a,[ij,Math.max(ij,c-u)]);s.style.minWidth=l+"px",s.style.left=d+"px"}else{const r=t.right-o.right,a=window.innerWidth-n.right-r,i=window.innerWidth-e.right-a,l=e.width+i,u=Math.max(l,t.width),c=window.innerWidth-ij,d=FE(a,[ij,Math.max(ij,c-u)]);s.style.minWidth=l+"px",s.style.right=d+"px"}const i=f(),l=window.innerHeight-2*ij,c=g.scrollHeight,d=window.getComputedStyle(u),h=parseInt(d.borderTopWidth,10),m=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=h+m+c+parseInt(d.paddingBottom,10)+b,x=Math.min(5*y.offsetHeight,w),S=window.getComputedStyle(g),C=parseInt(S.paddingTop,10),k=parseInt(S.paddingBottom,10),_=e.top+e.height/2-ij,E=l-_,j=y.offsetHeight/2,O=h+m+(y.offsetTop+j),N=w-O;if(O<=_){const e=i.length>0&&y===i[i.length-1].ref.current;s.style.bottom="0px";const t=u.clientHeight-g.offsetTop-g.offsetHeight,n=O+Math.max(E,j+(e?k:0)+t+b);s.style.height=n+"px"}else{const e=i.length>0&&y===i[0].ref.current;s.style.top="0px";const t=Math.max(_,h+g.offsetTop+(e?C:0)+j)+N;s.style.height=t+"px",g.scrollTop=O-_+g.offsetTop}s.style.margin=`${ij}px 0`,s.style.minHeight=x+"px",s.style.maxHeight=l+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,u,g,y,v,a.dir,r]);ua(()=>w(),[w]);const[x,S]=D.useState();ua(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const C=D.useCallback(e=>{e&&!0===h.current&&(w(),b?.(),h.current=!1)},[w,b]);return m.jsx(pj,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:m.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:m.jsx(ba.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});dj.displayName="SelectItemAlignedPosition";var fj=D.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ij,...a}=e,i=qE(n);return m.jsx(sl,{...i,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});fj.displayName="SelectPopperPosition";var[pj,hj]=WE(oj,{}),mj="SelectViewport",gj=D.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=lj(mj,n),i=hj(mj,n),s=ia(t,a.onViewportChange),l=D.useRef(0);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),m.jsx(VE.Slot,{scope:n,children:m.jsx(ba.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ra(o.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if(r?.current&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*ij,o=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),i=Math.max(o,a);if(i<r){const o=i+e,a=Math.min(r,o),s=o-a;n.style.height=a+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop})})})]})});gj.displayName=mj;var yj="SelectGroup",[vj,bj]=WE(yj);D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ka();return m.jsx(vj,{scope:n,id:o,children:m.jsx(ba.div,{role:"group","aria-labelledby":o,...r,ref:t})})}).displayName=yj;var wj="SelectLabel",xj=D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=bj(wj,n);return m.jsx(ba.div,{id:o.id,...r,ref:t})});xj.displayName=wj;var Sj="SelectItem",[Cj,kj]=WE(Sj),_j=D.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=GE(Sj,n),l=lj(Sj,n),u=s.value===r,[c,d]=D.useState(a??""),[f,p]=D.useState(!1),h=ia(t,e=>l.itemRefCallback?.(e,r,o)),g=Ka(),y=D.useRef("touch"),v=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return m.jsx(Cj,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:D.useCallback(e=>{d(t=>t||(e?.textContent??"").trim())},[]),children:m.jsx(VE.ItemSlot,{scope:n,value:r,disabled:o,textValue:c,children:m.jsx(ba.div,{role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:h,onFocus:ra(i.onFocus,()=>p(!0)),onBlur:ra(i.onBlur,()=>p(!1)),onClick:ra(i.onClick,()=>{"mouse"!==y.current&&v()}),onPointerUp:ra(i.onPointerUp,()=>{"mouse"===y.current&&v()}),onPointerDown:ra(i.onPointerDown,e=>{y.current=e.pointerType}),onPointerMove:ra(i.onPointerMove,e=>{y.current=e.pointerType,o?l.onItemLeave?.():"mouse"===y.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ra(i.onPointerLeave,e=>{e.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:ra(i.onKeyDown,e=>{""!==l.searchRef?.current&&" "===e.key||($E.includes(e.key)&&v()," "===e.key&&e.preventDefault())})})})})});_j.displayName=Sj;var Ej="SelectItemText",jj=D.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=GE(Ej,n),s=lj(Ej,n),l=kj(Ej,n),u=QE(Ej,n),[c,d]=D.useState(null),f=ia(t,e=>d(e),l.onItemTextChange,e=>s.itemTextRefCallback?.(e,l.value,l.disabled)),p=c?.textContent,h=D.useMemo(()=>m.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=u;return ua(()=>(g(h),()=>y(h)),[g,y,h]),m.jsxs(m.Fragment,{children:[m.jsx(ba.span,{id:l.textId,...a,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?fa.createPortal(a.children,i.valueNode):null]})});jj.displayName=Ej;var Oj="SelectItemIndicator",Nj=D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return kj(Oj,n).isSelected?m.jsx(ba.span,{"aria-hidden":!0,...r,ref:t}):null});Nj.displayName=Oj;var Rj="SelectScrollUpButton",Pj=D.forwardRef((e,t)=>{const n=lj(Rj,e.__scopeSelect),r=hj(Rj,e.__scopeSelect),[o,a]=D.useState(!1),i=ia(t,r.onScrollButtonChange);return ua(()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?m.jsx(Mj,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});Pj.displayName=Rj;var Tj="SelectScrollDownButton",Dj=D.forwardRef((e,t)=>{const n=lj(Tj,e.__scopeSelect),r=hj(Tj,e.__scopeSelect),[o,a]=D.useState(!1),i=ia(t,r.onScrollButtonChange);return ua(()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),o?m.jsx(Mj,{...e,ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});Dj.displayName=Tj;var Mj=D.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=lj("SelectScrollButton",n),i=D.useRef(null),s=BE(n),l=D.useCallback(()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)},[]);return D.useEffect(()=>()=>l(),[l]),ua(()=>{const e=s().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[s]),m.jsx(ba.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ra(o.onPointerDown,()=>{null===i.current&&(i.current=window.setInterval(r,50))}),onPointerMove:ra(o.onPointerMove,()=>{a.onItemLeave?.(),null===i.current&&(i.current=window.setInterval(r,50))}),onPointerLeave:ra(o.onPointerLeave,()=>{l()})})}),Ij=D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m.jsx(ba.div,{"aria-hidden":!0,...r,ref:t})});Ij.displayName="SelectSeparator";var Aj="SelectArrow";D.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=qE(n),a=GE(Aj,n),i=lj(Aj,n);return a.open&&"popper"===i.position?m.jsx(ll,{...o,...r,ref:t}):null}).displayName=Aj;var Fj=D.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=D.useRef(null),a=ia(r,o),i=function(e){const t=D.useRef({value:e,previous:e});return D.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}(t);return D.useEffect(()=>{const e=o.current;if(!e)return;const n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,"value").set;if(i!==t&&r){const n=new Event("change",{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[i,t]),m.jsx(ba.select,{...n,style:{...LE,...n.style},ref:a,defaultValue:t})});function Lj(e){return""===e||void 0===e}function zj(e){const t=ka(e),n=D.useRef(""),r=D.useRef(0),o=D.useCallback(e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),a=D.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return D.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function $j(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0]),o=r?t[0]:t,a=n?e.indexOf(n):-1;let i=(s=e,l=Math.max(a,0),s.map((e,t)=>s[(l+t)%s.length]));var s,l;1===o.length&&(i=i.filter(e=>e!==n));const u=i.find(e=>e.textValue.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}Fj.displayName="SelectBubbleInput";var Hj=JE,Vj=nj,Bj=rj,Uj=aj,Wj=gj,qj=xj,Yj=_j,Gj=jj,Kj=Nj,Qj=Pj,Xj=Dj,Zj=Ij;const Jj=XE,eO=tj,tO=D.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(Hj,{ref:r,className:Ko("flex h-10 w-full items-center hover:border-[#BFD7FE] justify-between rounded-md border focus:border-primary border-neutral-200 bg-white px-3 py-2 text-sm ring-offset-white placeholder:text-neutral-500 focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 ",e),...n,children:[t,m.jsx(Vj,{asChild:!0,children:m.jsx(Rd,{className:"h-4 w-4 opacity-50"})})]}));tO.displayName=Hj.displayName;const nO=D.forwardRef(({className:e,...t},n)=>m.jsx(Qj,{ref:n,className:Ko("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(Td,{className:"h-4 w-4"})}));nO.displayName=Qj.displayName;const rO=D.forwardRef(({className:e,...t},n)=>m.jsx(Xj,{ref:n,className:Ko("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(Rd,{className:"h-4 w-4"})}));rO.displayName=Xj.displayName;const oO=D.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>m.jsx(Bj,{children:m.jsxs(Uj,{ref:o,className:Ko("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-neutral-200 bg-white text-neutral-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[m.jsx(nO,{}),m.jsx(Wj,{className:Ko("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),m.jsx(rO,{})]})}));oO.displayName=Uj.displayName;D.forwardRef(({className:e,...t},n)=>m.jsx(qj,{ref:n,className:Ko("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t})).displayName=qj.displayName;const aO=D.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(Yj,{ref:r,className:Ko("relative flex w-full select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-primary/20 cursor-pointer focus:text-neutral-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-neutral-800 dark:focus:text-neutral-50",e),...n,children:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(Kj,{children:m.jsx(Nd,{className:"h-4 w-4"})})}),m.jsx(Gj,{children:t})]}));aO.displayName=Yj.displayName;function iO({label:e,addonLabel:t,type:n,placeholder:r,selectPlaceholder:o,error:a,success:i,value:s,defaultValue:l,name:u,id:c,formik:d,onChange:f,inputRef:p,onBlur:h,required:g,disabled:y,loading:v,showError:b,selectOptions:w,disableSearch:x,searchSelectPlaceholder:S,showSelectSearch:C,onSelectValueChange:k,selectValue:_,showOutline:E=!0,cols:j,rows:O,labelClass:N,addonLabelClass:R,optional:P,info:T,addonInfo:M,icon:I,actionIcon:A,actionLabel:F,actionLabelInfo:L,actionLabelAction:z,className:$,textAreaOnChange:H,addOn:V,infoAlignment:B,addonInfoAlignment:U,inputContainerClass:W,showNegative:q,showPositive:Y,...G}){const[K,Q]=D.useState(n),[X,Z]=D.useState(!1),[J,ee]=D.useState(""),te=((e,t)=>{const n=e?.filter(e=>"string"==typeof e.label?e.label?.toLowerCase().includes(t.toLowerCase()):e.value?.toLowerCase().includes(t.toLowerCase())||e?.searchId?.toLowerCase().includes(t.toLowerCase()));return t?n:e})(w??[],J);return m.jsx(m.Fragment,{children:v?m.jsx(na,{className:"w-full h-12"}):m.jsx("div",{className:"w-full",children:m.jsxs("div",{className:`flex flex-col ${e&&"gap-2.5"} relative `,children:[m.jsxs("div",{className:"flex justify-between gap-2 flex-wrap",children:[t&&m.jsxs("label",{className:Ko("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",R),children:[t," ",g?m.jsx("span",{className:"text-[#E12D39]",children:t&&"*"}):P?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,M&&m.jsx(kv,{fieldName:t,align:U,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:M})})]}),e&&m.jsxs("label",{className:Ko("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",N),children:[e," ",g?m.jsx("span",{className:"text-[#E12D39]",children:e&&"*"}):P?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,T&&m.jsx(kv,{fieldName:e,align:B,children:m.jsx("p",{className:"font-normal first-letter:uppercase w-full whitespace-pre-wrap",children:T})})]}),F&&m.jsxs("button",{onClick:z,className:"text-primary flex items-center gap-1 first-letter:uppercase text-sm font-bold",children:[A,F,L&&m.jsx(kv,{fieldName:e,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:L})})]})]}),m.jsxs("div",{className:Ko(`border overflow-hidden rounded-md text-sm border-[#E1E3EA] hover:border-primary_light font-normal text-grey-950 flex gap-2 items-center bg-white px-3 ${"text-area"!==n&&"h-10"} ${(a||b)&&"!border-danger"} ${i&&"!border-success"} ${X&&E&&"!border-primary"}\n ${I&&"px-2"}\n ${V&&"px-0"}\n `,y?"cursor-not-allowed bg-gray-200":null,w?"px-0":null,W),children:[V&&m.jsx("span",{className:"bg-gray-200 text-[13px] font-semibold text-gray-700 h-full min-w-9.5 flex items-center justify-center shrink-0 rounded-l-md px-2 ",children:V}),I,w&&m.jsxs(Jj,{onValueChange:k,defaultValue:_,value:_,children:[m.jsx(tO,{disabled:x,className:" min-w-max w-max h-full border-0 border-r rounded-none hover:border-neutral-200 focus:border-neutral-200 bg-[#F9F9F9] hover:border-b-neutral-200 disabled:opacity-100 ",children:m.jsx(eO,{className:" text-sm text-[#5E6278] placeholder:font-medium outline-none",placeholder:o})}),m.jsxs(oO,{className:"bg-white w-full relative",children:[C&&m.jsx("input",{value:J,onChange:e=>{ee(e.target.value.toString())},placeholder:S??"Search...",className:"h-10 border mb-2 text-sm px-4 outline-none w-full border-neutral-200 rounded bg-white sticky top-0 z-20"}),te?.map((e,t)=>m.jsx(aO,{className:"text-sm",value:e.value,children:e.label},e.value))]})]}),"text-area"===n?m.jsx("textarea",{cols:j,rows:O,onFocus:()=>Z(!0),onBlur:e=>{Z(!1)},placeholder:r,className:Ko(`placeholder:text-[#7E8299] hover:border-primary_light py-2 h-full placeholder:font-medium outline-none w-full rounded ${y?"bg-[#EEEFF2] cursor-not-allowed":null} ${X&&E&&"!border-primary"} transition-all ease-in-out`,$),...G,value:s,name:u,onChange:H}):m.jsx("input",{onInput:e=>{const t=e.target;"number"===n&&(t.value=t.value.replace(/[^0-9.]/g,""),t.value=t.value.replace(/^\.|(\..*)\./g,"$1"),t.value.length>1&&t.value.startsWith("0")&&"."!==t.value[1]&&(t.value=t.value.replace(/^0+/,"")),""!==t.value&&"0"!==t.value||(t.value="0"))},type:"number"===K?"text":K,placeholder:r,className:Ko("placeholder:text-[#7E8299] h-full placeholder:font-medium outline-none w-full rounded disabled:cursor-not-allowed",w&&"number"===n?"pr-2":null,I||V?"pr-0":null,w&&"number"===n&&t&&"text-right pr-2",$,Y&&"0"!==s?.toString().trim()?"text-green-600 font-semibold":"",q&&s?.toString().trim().startsWith("-")?"text-red-600 font-semibold":""),onFocus:()=>Z(!0),onBlur:e=>{d&&h&&d&&h(e),Z(!1)},value:s||"",defaultValue:l,onChange:f,id:c,name:u,required:g,disabled:y,ref:p,...G}),"password"===n&&m.jsx("span",{className:"cursor-pointer",onClick:()=>{Q(e=>"password"===e?"text":"password")},children:"password"===K?Jy.eyeslash:Jy.eye})]}),a&&m.jsx("p",{className:"text-danger text-xs font-normal",children:a})]})})})}function sO({value:e,label:t,placeholder:n,uuid:r,name:o,displayValue:a,valueType:i,item_unit:s}){const{mutate:l,isPending:u}=ex();J();const[c,d]=D.useState(!1),[f,p]=D.useState({item_uuid:r,[o]:e});En();const[h,g]=D.useState("");return m.jsxs($C,{open:c,onOpenChange:d,children:[m.jsx(HC,{className:"flex items-center",children:m.jsx("button",{className:"hover:text-primary duration-150 underline disabled:no-underline disabled:hover:text-inherit",children:h?"selling_price"===o?rv(+h):ov(+h)+s:a})}),m.jsxs(VC,{align:"center",className:"shadow-[0_1px_2px_0px_#E4E5E73D,_0_12px_24px_0_#868C981F] space-y-2 bg-white rounded-xl p-3 w-[280px] relative before:absolute before:w-3 before:h-1.5 before:bg-white before:left-1/2 before:-translate-x-1/2 before:rotate-45 data-[side=bottom]:before:top-0 data-[side=top]:before:bottom-0",children:[m.jsx(iO,{type:i,value:f[o],label:t,placeholder:n,onChange:e=>{p(t=>({...t,[o]:e.target.value}))}}),m.jsxs("div",{className:"flex justify-end gap-2.5",children:[m.jsx(AC,{children:m.jsx(IE,{label:"Dismiss",className:"bg-gray-300 text-dark text-sm hover:bg-gray-300/90 font-medium",disabled:u})}),m.jsx(IE,{label:"Update",className:"text-sm font-medium",onClick:()=>{l({url:"/items/update_basic",payload:f},{onSuccess:()=>{g(f[o]),d(!1)},onError:()=>{g("")}})},loading:u})]})]})]})}D.forwardRef(({className:e,...t},n)=>m.jsx(Zj,{ref:n,className:Ko("-mx-1 my-1 h-px bg-neutral-100 dark:bg-neutral-800",e),...t})).displayName=Zj.displayName;const lO=[{accessorKey:"item_description",header:()=>m.jsxs("p",{children:[" ","Item description/ ",m.jsx("br",{})," Product code"," "]}),cell:({row:e})=>{const t=e.original;return m.jsxs("div",{className:"flex items-center gap-5",children:[m.jsx("div",{className:"w-[50px] h-[50px] rounded-2xl relative bg-gray-100",children:m.jsx("img",{src:t.item_image,alt:"item image",className:"rounded-2xl object-cover w-full h-full",draggable:!1})}),m.jsxs("div",{className:"space-y-1 max-w-[265px]",children:[m.jsx(cO,{title:t.item_description,item_uuid:t.uuid,item_type_id:t.item_type_id,data:t.fullData}),m.jsxs("p",{className:"text-dark text-xs font-normal flex items-center gap-1",children:[m.jsx("span",{className:"uppercase whitespace-nowrap",children:t.itemcode}),t.sku||t.barcode.length>0?m.jsx(kv,{align:"center",fieldName:"All item codes",trigger:m.jsxs("button",{className:"rounded bg-primary_light px-[5px] flex items-center text-primary font-semibold text-[11px] h-[18px]",children:["+",(t.barcode?.length||0)+(t.sku?1:0)]}),children:m.jsxs("div",{className:"space-y-2",children:[t.sku?m.jsxs("div",{className:"",children:[m.jsx("p",{children:" SKU:"}),m.jsx("ul",{className:"list-disc pl-4",children:m.jsx("li",{children:t.sku})})]}):null,t.barcode.length>0?m.jsxs("div",{children:[m.jsx("p",{children:"Barcodes:"}),m.jsx("ul",{className:"list-disc pl-4 ",children:t.barcode.map((e,t)=>m.jsx("li",{children:e.barcode},t))})]}):null,m.jsxs("div",{className:"",children:[m.jsx("p",{children:" Itemcode:"}),m.jsx("ul",{className:"list-disc pl-4",children:m.jsx("li",{children:t.itemcode})})]})]})}):null,t.expired?m.jsxs(m.Fragment,{children:[m.jsx("span",{children:"|"}),"Expired",m.jsx("span",{className:"rounded bg-danger_light px-[5px] flex items-center text-danger font-semibold text-[11px] h-[18px]",children:t.expired})]}):null,t.expiring?m.jsxs(m.Fragment,{children:[m.jsx("span",{children:"|"}),"Expiring",m.jsx("span",{className:"rounded bg-warning-light px-[5px] flex items-center text-warning font-semibold text-[11px] h-[18px]",children:t.expiring})]}):null]})]})]})}},{accessorKey:"quantity",header:()=>m.jsx("p",{children:"quantity"}),cell:({row:e})=>{const t=e.original;return m.jsxs(m.Fragment,{children:[m.jsx("div",{className:Ko("flex items-center",t.quantity<=0?"text-danger":Number(t.reorder_level)==t.quantity?"text-orange":null),children:m.jsx(sO,{label:"Edit item quantity",placeholder:"Enter quantity",uuid:t.uuid,name:"item_quantity",displayValue:ov(t.quantity)+t.unit,value:t.quantity,valueType:"number",item_unit:t.unit})}),t.all_quantity===t.quantity?null:m.jsx("p",{className:"text-gray-700",children:Intl.NumberFormat().format(t.all_quantity??0)+t.unit})]})}},{accessorKey:"type",cell:({row:e})=>{const t=e.original;return m.jsx("p",{className:"capitalize",children:t.type})}},{accessorKey:"selling_price",header:"Selling Price (₦)",cell:({row:e})=>{const t=e.original;return m.jsx(sO,{label:"Edit selling price (₦)",placeholder:"Enter selling price",uuid:t.uuid,name:"selling_price",displayValue:rv(t.selling_price??0),value:t.selling_price??0,valueType:"number"})}},{accessorKey:"categories",header:"categories/Tags",cell:({row:e})=>{const t=e.original;return m.jsxs(m.Fragment,{children:[" ",m.jsxs("div",{className:"flex items-center gap-2 capitalize",children:[t.categories&&t.categories?.length>0?t.categories?.[0]?.name:"...",t.categories.length>1?m.jsx(kv,{align:"center",fieldName:"Categories",trigger:m.jsxs("button",{className:"rounded bg-primary_light px-[5px] flex items-center text-primary font-semibold text-[11px] h-[18px]",children:["+",t.categories.length-1]}),children:m.jsx("ul",{className:"list-disc pl-4",children:t.categories.map((e,t)=>m.jsx("li",{children:e.name},t))})}):null]}),m.jsxs("div",{className:"text-gray-700 flex items-center gap-2 capitalize",children:[t.tags?.[0],t.tags?.length>1?m.jsx(kv,{align:"center",fieldName:"Tags",trigger:m.jsxs("button",{className:"rounded bg-primary_light px-[5px] flex items-center text-primary font-semibold text-[11px] h-[18px] border-primary",children:["+",t.tags.length-1]}),children:m.jsx("ul",{className:"list-disc pl-4",children:t.tags.map((e,t)=>m.jsx("li",{children:e},t))})}):null]})]})}},{accessorKey:"status",cell:({row:e})=>{const t=e.getValue("status");return m.jsx(_v,{status:t})}},{id:"actions",header:"actions",cell:({row:e})=>{const t=e.original;return m.jsx(uO,{item_uuid:t.uuid,item_type_id:t.item_type_id,data:t.fullData})}}],uO=({item_uuid:e,item_type_id:t,data:n})=>{const[r,o]=D.useState(null),a=()=>{o(null)},[i,s]=D.useState(!1),[l,u]=D.useState(!1),[c,d]=D.useState(!1),[f,p]=D.useState(!1),[h,g]=D.useState(!1),[y,v]=D.useState(!1),[b,w]=D.useState(!1),x=[{label:"view",icon:Jy.eye_outline,action:()=>s(!0)},{label:"delete",icon:Jy.trash,action:()=>p(!0)}];return m.jsxs(m.Fragment,{children:[m.jsxs(Fd,{children:[m.jsx(Ld,{asChild:!0,children:m.jsxs("button",{className:"bg-gray-100 rounded-md h-[30px] w-[90px] flex items-center justify-between p-2.5 font-semibold text-[10px] text-gray-500 hover:border duration-200",children:["Action"," ",m.jsx("svg",{width:"11",height:"6",viewBox:"0 0 11 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M5.50855 5.49304C5.42081 5.49355 5.33383 5.47673 5.25261 5.44356C5.17138 5.41038 5.09751 5.3615 5.03521 5.29971L1.03521 1.29971C0.972726 1.23773 0.92313 1.164 0.889284 1.08276C0.855438 1.00152 0.838013 0.914383 0.838013 0.826375C0.838013 0.738367 0.855438 0.65123 0.889284 0.56999C0.92313 0.488751 0.972726 0.415017 1.03521 0.353041C1.16012 0.228874 1.32909 0.15918 1.50521 0.15918C1.68134 0.15918 1.8503 0.228874 1.97521 0.353041L5.50855 3.88637L9.03521 0.353041C9.16012 0.228874 9.32909 0.15918 9.50521 0.15918C9.68134 0.15918 9.8503 0.228874 9.97521 0.353041C10.0377 0.415017 10.0873 0.488751 10.1211 0.56999C10.155 0.65123 10.1724 0.738367 10.1724 0.826375C10.1724 0.914383 10.155 1.00152 10.1211 1.08276C10.0873 1.164 10.0377 1.23773 9.97521 1.29971L5.97521 5.29971C5.85104 5.42287 5.68344 5.4923 5.50855 5.49304Z",fill:"#202125"})})]})}),m.jsx(zd,{align:"end",className:"flex flex-col gap-2.5 rounded-xl border-gray-200",children:x.map((e,t)=>m.jsxs($d,{className:`capitalize focus:bg-primary_light rounded-md focus:text-primary font-semibold text-gray-700 text-sm cursor-pointer px-[15px] flex items-center gap-[5px] ${t===x.length-1&&"text-danger focus:text-danger"}`,onMouseOver:()=>(e=>{o(e)})(t),onMouseOut:a,onClick:e.action,children:[M.cloneElement(e.icon,{fill:r===t?"#1868DB":"#5E6278"})," ",e.label]},t))})]}),m.jsx(QC,{isOpen:i,onClose:()=>s(!1),itemUUID:e}),m.jsx(AE,{isOpen:f,onClose:()=>p(!1),uuids:[e],single:!0})]})},cO=({title:e,item_uuid:t,item_type_id:n,data:r})=>{const[o,a]=D.useState(!1),[i,s]=D.useState(!1),[l,u]=D.useState(!1);return m.jsxs(m.Fragment,{children:[m.jsx("button",{className:Ko("text-primary font-bold text-sm first-letter:uppercase truncate max-w-[265px] cursor-pointer",r.expired?"text-danger":""),title:e,onClick:()=>a(!0),children:e}),m.jsx(QC,{isOpen:o,onClose:()=>a(!1),itemUUID:t})]})};var dO,fO={};function pO(){if(dO)return fO;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}dO=1,Object.defineProperty(fO,"__esModule",{value:!0}),fO.Collapse=void 0;var t,n=(t=f())&&t.__esModule?t:{default:t};function r(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function o(e,t){return o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},o(e,t)}function a(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,o=s(t);if(n){var a=s(this).constructor;r=Reflect.construct(o,arguments,a)}else r=o.apply(this,arguments);return function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return i(t)}(this,r)}}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)}(s,e);var t=a(s);function s(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),l(i(n=t.call(this,e)),"timeout",void 0),l(i(n),"container",void 0),l(i(n),"content",void 0),l(i(n),"onResize",function(){if(clearTimeout(n.timeout),n.container&&n.content){var e=n.props,t=e.isOpened,r=e.checkTimeout,o=Math.floor(n.container.clientHeight),a=Math.floor(n.content.clientHeight),i=t&&Math.abs(a-o)<=1,s=!t&&Math.abs(o)<=1;i||s?n.onRest({isFullyOpened:i,isFullyClosed:s,isOpened:t,containerHeight:o,contentHeight:a}):(n.onWork({isFullyOpened:i,isFullyClosed:s,isOpened:t,containerHeight:o,contentHeight:a}),n.timeout=setTimeout(function(){return n.onResize()},r))}}),l(i(n),"onRest",function(e){var t=e.isFullyOpened,r=e.isFullyClosed,o=e.isOpened,a=e.containerHeight,i=e.contentHeight;if(n.container&&n.content){var s=o&&n.container.style.height==="".concat(i,"px"),l=!o&&"0px"===n.container.style.height;if(s||l){n.container.style.overflow=o?"initial":"hidden",n.container.style.height=o?"auto":"0px";var u=n.props.onRest;u&&u({isFullyOpened:t,isFullyClosed:r,isOpened:o,containerHeight:a,contentHeight:i})}}}),l(i(n),"onWork",function(e){var t=e.isFullyOpened,r=e.isFullyClosed,o=e.isOpened,a=e.containerHeight,i=e.contentHeight;if(n.container&&n.content){var s=o&&n.container.style.height==="".concat(i,"px"),l=!o&&"0px"===n.container.style.height;if(!s&&!l){n.container.style.overflow="hidden",n.container.style.height=o?"".concat(i,"px"):"0px";var u=n.props.onWork;u&&u({isFullyOpened:t,isFullyClosed:r,isOpened:o,containerHeight:a,contentHeight:i})}}}),l(i(n),"onRefContainer",function(e){n.container=e}),l(i(n),"onRefContent",function(e){n.content=e}),e.initialStyle?n.initialStyle=e.initialStyle:n.initialStyle=e.isOpened?{height:"auto",overflow:"initial"}:{height:"0px",overflow:"hidden"},n}return r(s,[{key:"componentDidMount",value:function(){this.onResize()}},{key:"shouldComponentUpdate",value:function(e){var t=this.props,n=t.theme,r=t.isOpened;return t.children!==e.children||r!==e.isOpened||Object.keys(n).some(function(t){return n[t]!==e.theme[t]})}},{key:"getSnapshotBeforeUpdate",value:function(){if(!this.container||!this.content)return null;if("auto"===this.container.style.height){var e=this.content.clientHeight;this.container.style.height="".concat(e,"px")}return null}},{key:"componentDidUpdate",value:function(){this.onResize()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeout)}},{key:"render",value:function(){var e=this.props,t=e.theme,r=e.children,o=e.isOpened;return n.default.createElement("div",{ref:this.onRefContainer,className:t.collapse,style:this.initialStyle,"aria-hidden":!o},n.default.createElement("div",{ref:this.onRefContent,className:t.content},r))}}]),s}(n.default.Component);return fO.Collapse=u,l(u,"defaultProps",{theme:{collapse:"ReactCollapse--collapse",content:"ReactCollapse--content"},initialStyle:void 0,onRest:void 0,onWork:void 0,checkTimeout:50}),fO}var hO,mO,gO,yO={};function vO(){if(hO)return yO;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}hO=1,Object.defineProperty(yO,"__esModule",{value:!0}),yO.UnmountClosed=void 0;var t,n=(t=f())&&t.__esModule?t:{default:t},r=pO(),o=["isOpened"],a=["isOpened"];function i(){return i=Object.assign||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},i.apply(this,arguments)}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function p(t){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var r,o=m(t);if(n){var a=m(this).constructor;r=Reflect.construct(o,arguments,a)}else r=o.apply(this,arguments);return function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}(this,r)}}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(s,e);var t=p(s);function s(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),g(h(n=t.call(this,e)),"onWork",function(e){var t=e.isOpened,r=u(e,o);n.setState({isResting:!1,isOpened:t});var a=n.props.onWork;a&&a(l({isOpened:t},r))}),g(h(n),"onRest",function(e){var t=e.isOpened,r=u(e,a);n.setState({isResting:!0,isOpened:t,isInitialRender:!1});var o=n.props.onRest;o&&o(l({isOpened:t},r))}),g(h(n),"getInitialStyle",function(){var e=n.state,t=e.isOpened;return e.isInitialRender&&t?{height:"auto",overflow:"initial"}:{height:"0px",overflow:"hidden"}}),n.state={isResting:!0,isOpened:e.isOpened,isInitialRender:!0},n}return c(s,[{key:"componentDidUpdate",value:function(e){var t=this.props.isOpened;e.isOpened!==t&&this.setState({isResting:!1,isOpened:t,isInitialRender:!1})}},{key:"render",value:function(){var e=this.state,t=e.isResting,o=e.isOpened;return t&&!o?null:n.default.createElement(r.Collapse,i({},this.props,{initialStyle:this.getInitialStyle(),onWork:this.onWork,onRest:this.onRest}))}}]),s}(n.default.PureComponent);return yO.UnmountClosed=y,g(y,"defaultProps",{onWork:void 0,onRest:void 0}),yO}var bO=function(){if(gO)return mO;gO=1;var e=pO().Collapse,t=vO().UnmountClosed;return mO=t,t.Collapse=e,t.UnmountClosed=t,mO}();function wO({loading:e,data:t,meta:n}){const r=t?.otherscount?.map(e=>{const n=e.name;return{type:n,value:t?.result_array?.[n]?.total_selling_price??0}}),o=[{type:t?.result_array?.Retail?.pricegroup??t?.default,value:t?.result_array?.Retail?.total_selling_price??0},...r||[]],a=t?.otherscount?.map(e=>{const n=e.name;return{type:n,value:t?.result_array?.[n]?.total_profit??0}}),i=[{type:t?.result_array?.Retail?.pricegroup??t?.default,value:t?.result_array?.Retail?.total_profit??0},...a||[]],[s,l]=D.useState({type:o?.[0].type,value:o?.[0].value}),[u,c]=D.useState({type:i?.[0].type,value:i?.[0].value});M.useEffect(()=>{l({type:o?.[0].type,value:o?.[0].value}),c({type:i?.[0].type,value:i?.[0].value})},[e]);const d=[{label:"Total No. of Unique Item",count:Intl.NumberFormat().format(n?.total??0),desc:`With ${t?.unit_count??0} unit(s)`,icon:m.jsx("div",{className:"shrink-0 rounded-lg \r\n \r\n bg-[#EFF5FF] w-12 h-12 flex items-center justify-center border border-[#EDEEF1]",children:Jy.cube})},{label:"Total Cost Price",count:rv(t?.result_array?.Retail?.total_cost??0),desc:"Takes into Account FIFO & LIFO ",icon:m.jsx("div",{className:"shrink-0 rounded-lg bg-[#F9DFDD] w-12 h-12 flex items-center justify-center border border-[#EDEEF1]",children:M.cloneElement(Jy.price_tag,{fill:"#ED7400"})})},{label:"Total Selling Price",count:rv(s.value),desc:m.jsxs("p",{className:"flex gap-2 items-center flex-wrap",children:["Showing ",s.type," price"," ",m.jsxs(Fd,{children:[m.jsx(Ld,{asChild:!0,children:m.jsxs("button",{className:"rounded-lg h-8 flex items-center justify-between p-3 font-semibold text-xs text-gray-600 outline-none border border-gray-300 gap-2.5 capitalize bg-[#F9F9F9]",children:["change",m.jsx("span",{className:"rotate-90",children:Jy.arrow})]})}),m.jsx(zd,{align:"start",className:"flex flex-col gap-2.5 rounded-xl border-gray-200 py-2.5 w-[210px]",children:o.map((e,t)=>m.jsx($d,{className:Ko("capitalize focus:bg-primary_light rounded-md focus:text-primary font-semibold text-sm cursor-pointer px-[15px] flex items-center gap-[5px] \n \n ",e.type===s.type?"bg-primary_light text-primary":null),onClick:()=>l(t=>({...t,value:e.value,type:e.type})),children:e.type},t))})]})]}),icon:m.jsx("div",{className:"shrink-0 rounded-lg bg-[#D8CDF4] w-12 h-12 flex items-center justify-center border border-[#EDEEF1]",children:M.cloneElement(Jy.price_tag,{fill:"#9747FF"})})},{label:"Profit to be made",count:rv(u.value),desc:m.jsxs("p",{className:"flex gap-2 items-center flex-wrap",children:["Showing ",u.type," price"," ",m.jsxs(Fd,{children:[m.jsx(Ld,{asChild:!0,children:m.jsxs("button",{className:"rounded-lg h-8 flex items-center justify-between p-3 font-semibold text-xs text-gray-600 outline-none border border-gray-300 gap-2.5 capitalize bg-[#F9F9F9]",children:["change",m.jsx("span",{className:"rotate-90",children:Jy.arrow})]})}),m.jsx(zd,{align:"start",className:"flex flex-col gap-2.5 rounded-xl border-gray-200 py-2.5 w-[210px]",children:i.map((e,t)=>m.jsx($d,{className:Ko("capitalize focus:bg-primary_light rounded-md focus:text-primary font-semibold text-sm cursor-pointer px-[15px] flex items-center gap-[5px] \n \n ",e.type===u.type?"bg-primary_light text-primary":null),onClick:()=>c(t=>({...t,value:e.value,type:e.type})),children:e.type},t))})]})]}),icon:m.jsx("div",{className:"shrink-0 rounded-lg bg-[#C6E3D2] w-12 h-12 flex items-center justify-center border border-[#EDEEF1]",children:M.cloneElement(Jy.price_tag,{fill:"#378C5A"})})}],[f,p]=D.useState(!1);return m.jsxs(tS,{className:"bg-[#F6F8FA] p-2.5 flex flex-col",children:[m.jsxs("div",{className:"flex justify-between",children:[m.jsx("h1",{className:"capitalize text-dark font-semibold text-lg",children:"Items overview"}),m.jsxs("button",{className:"rounded-lg h-8 flex items-center justify-between p-3 font-semibold text-xs text-gray-600 outline-none border border-gray-300 gap-2.5 capitalize bg-white",onClick:()=>p(!f),children:[f?"Close":"Open"," ",m.jsx("span",{className:"rotate-90",children:Jy.arrow})]})]}),m.jsx(bO.Collapse,{isOpened:f,children:m.jsx("div",{className:"flex flex-wrap gap-2.5 mt-3",children:d.map((t,n)=>m.jsxs("div",{className:Ko("border rounded-xl border-[#E4E7EC] p-4 flex flex-col relative bg-right-bottom bg-no-repeat flex-auto",0===n?"bg-[#E4EEFA] bg-[url('/assets/images/ecstacy1.svg')]":1===n?"bg-[#FAEAE9] bg-[url('/assets/images/ecstacy2.svg')]":2===n?"bg-[#EEE9FA] bg-[url('/assets/images/ecstacy3.svg')]":3===n?"bg-[#EBF5EF] bg-[url('/assets/images/ecstacy4.svg')]":null),children:[m.jsxs("div",{className:"flex justify-between gap-1",children:[m.jsx("h1",{className:"text-dark text-sm font-medium",children:t.label}),m.jsx("div",{className:"shrink-0",children:t.icon})]}),m.jsxs("div",{className:"flex flex-col gap-1",children:[e?m.jsx(na,{className:"w-28 h-6 rounded"}):m.jsx("h1",{className:Ko("text-dark font-bold text-[29px] truncate",n===d.length-1&&u.value<0?"text-danger":null),title:t.count,children:t.count}),m.jsx("div",{className:"text-gray-700 text-sm font-medium ",children:t.desc})]})]},n))})})]})}function xO({placeholder:e,className:t,inputClass:n,...r}){return m.jsxs("div",{className:Ko("h-12 border border-gray-300 rounded-md w-[320px] flex",t),children:[m.jsx("span",{className:"bg-gray-200 w-9.5 flex items-center justify-center shrink-0 rounded-l-md ",children:Jy.magnifier}),m.jsx("input",{type:"search",placeholder:e,className:"w-full px-3 text-dark text-sm font-medium bg-transparent outline-none rounded-r-md",...r})]})}function SO(e,t){return e===t}function CO(e,t,n){var r=SO,o=D.useRef(e),a=D.useState({})[1],i=function(e,t,n,r){var o=this,a=D.useRef(null),i=D.useRef(0),s=D.useRef(0),l=D.useRef(null),u=D.useRef([]),c=D.useRef(),d=D.useRef(),f=D.useRef(e),p=D.useRef(!0);f.current=e;var h="undefined"!=typeof window,m=!t&&0!==t&&h;if("function"!=typeof e)throw new TypeError("Expected a function");t=+t||0;var g=!!(n=n||{}).leading,y=!("trailing"in n)||!!n.trailing,v="maxWait"in n,b="debounceOnServer"in n&&!!n.debounceOnServer,w=v?Math.max(+n.maxWait||0,t):null;D.useEffect(function(){return p.current=!0,function(){p.current=!1}},[]);var x=D.useMemo(function(){var e=function(e){var t=u.current,n=c.current;return u.current=c.current=null,i.current=e,s.current=s.current||e,d.current=f.current.apply(n,t)},n=function(e,t){m&&cancelAnimationFrame(l.current),l.current=m?requestAnimationFrame(e):setTimeout(e,t)},x=function(e){if(!p.current)return!1;var n=e-a.current;return!a.current||n>=t||n<0||v&&e-i.current>=w},S=function(t){return l.current=null,y&&u.current?e(t):(u.current=c.current=null,d.current)},C=function e(){var r=Date.now();if(g&&s.current===i.current&&k(),x(r))return S(r);if(p.current){var o=t-(r-a.current),l=v?Math.min(o,w-(r-i.current)):o;n(e,l)}},k=function(){r&&r({})},_=function(){if(h||b){var r=Date.now(),s=x(r);if(u.current=[].slice.call(arguments),c.current=o,a.current=r,s){if(!l.current&&p.current)return i.current=a.current,n(C,t),g?e(a.current):d.current;if(v)return n(C,t),e(a.current)}return l.current||n(C,t),d.current}};return _.cancel=function(){var e=l.current;e&&(m?cancelAnimationFrame(l.current):clearTimeout(l.current)),i.current=0,u.current=a.current=c.current=l.current=null,e&&r&&r({})},_.isPending=function(){return!!l.current},_.flush=function(){return l.current?S(Date.now()):d.current},_},[g,v,t,w,y,m,h,b,r]);return x}(D.useCallback(function(e){o.current=e,a({})},[a]),t,n,a),s=D.useRef(e);return r(s.current,e)||(i(e),s.current=e),[o.current,i]}function kO({placeholder:e,searchPlaceholder:t,options:n=[],showMultiSelectValues:r=!0,values:o,onChange:a,className:i,showCheckMark:s=!0,label:l,labelClass:u,required:c,info:d,optional:f,actionLabel:p,actionLabelAction:h,actionLabelInfo:g,removeSelectedValue:y,removeTag:v,loading:b,showCount:w,error:x}){const[S,C]=D.useState(!1),[k,_]=D.useState(0),E=D.useRef(null);D.useEffect(()=>{const e=()=>{E.current&&_(E?.current?.offsetWidth)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[E]);const j=e=>{const t=o?.includes(e)?o?.filter(t=>t!==e):[...o||[],e];a&&a(t)};D.useEffect(()=>{y&&j(y)},[y]);const[O,N]=D.useState(null),R=e=>{N(t=>t===e?null:e)},P=e=>{for(let t of n){if(t.value===e)return t.label;if(t.subOptions){const n=t.subOptions.find(t=>t.value===e);if(n)return n.label}}return null};return m.jsx("div",{ref:E,children:b?m.jsx(na,{className:"w-full h-[48px]"}):m.jsxs("div",{className:Ko("flex flex-col gap-2.5",i),children:[m.jsxs("div",{className:"flex justify-between gap-2 flex-wrap",children:[l&&m.jsxs("label",{className:Ko("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",u),children:[l," ",c?m.jsx("span",{className:"text-[#E12D39]",children:l&&"*"}):f?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,d&&m.jsx(kv,{fieldName:l,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:d})})]}),p&&m.jsxs("button",{onClick:h,className:"text-primary flex items-center gap-1 first-letter:uppercase text-sm font-medium",children:[p,g&&m.jsx(kv,{fieldName:l,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:g})})]})]}),m.jsxs($C,{modal:!0,open:S,onOpenChange:C,children:[m.jsx(HC,{asChild:!0,children:m.jsxs(UC,{variant:"outline",role:"combobox","aria-expanded":S,className:Ko(`w-full h-[48px] justify-between border focus:border-primary border-neutral-200 bg-white hover:bg-white hover:border-[#BFD7FE] ${x&&"!border-danger"}`,r?"h-auto py-3":null,i),children:[m.jsx("div",{className:"flex gap-2 text-[#5E6278] justify-start first-letter:uppercase flex-wrap",children:o?.length&&r?o.map((e,t)=>m.jsxs("div",{onClick:()=>{v||j(e),R(e)},className:"px-2 py-1 text-black flex items-center justify-between rounded gap-2 border bg-slate-200 text-xs font-medium",children:[m.jsx("span",{className:"flex justify-start text-start flex-wrap gap-2 whitespace-normal",children:P(e)}),m.jsx("span",{className:"",children:m.jsx("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M5.44001 4.49978L7.83334 2.12644C7.96064 1.99737 8.03146 1.82301 8.03021 1.64173C8.02896 1.46044 7.95575 1.28708 7.82667 1.15978C7.6976 1.03247 7.52324 0.961657 7.34196 0.962907C7.16067 0.964157 6.98731 1.03737 6.86001 1.16644L4.50001 3.55978L2.14001 1.21311C2.0151 1.08894 1.84613 1.01925 1.67001 1.01925C1.49388 1.01925 1.32492 1.08894 1.20001 1.21311C1.13752 1.27509 1.08793 1.34882 1.05408 1.43006C1.02023 1.5113 1.00281 1.59844 1.00281 1.68644C1.00281 1.77445 1.02023 1.86159 1.05408 1.94283C1.08793 2.02407 1.13752 2.0978 1.20001 2.15978L3.56001 4.49978L1.16667 6.87311C1.03937 7.00218 0.968554 7.17654 0.969804 7.35782C0.971054 7.53911 1.04427 7.71247 1.17334 7.83978C1.30241 7.96708 1.47677 8.0379 1.65805 8.03665C1.83934 8.0354 2.0127 7.96218 2.14001 7.83311L4.50001 5.43978L6.86001 7.78644C6.98492 7.91061 7.15388 7.98031 7.33001 7.98031C7.50613 7.98031 7.6751 7.91061 7.80001 7.78644C7.86249 7.72447 7.91209 7.65073 7.94594 7.56949C7.97978 7.48826 7.99721 7.40112 7.99721 7.31311C7.99721 7.2251 7.97978 7.13797 7.94594 7.05673C7.91209 6.97549 7.86249 6.90175 7.80001 6.83978L5.44001 4.49978Z",fill:"black"})})})]},t)):!r&&w&&o.length>0?`${o.length} ${l} selected`:e??"Select..."}),m.jsx(Dd,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),m.jsx(VC,{align:"start",style:{width:k},className:"w-[480px] p-0 bg-white rounded-xl border-gray-200",children:m.jsxs(cC,{children:[m.jsx(dC,{className:"placeholder:text-xs",placeholder:t??"Search..."}),m.jsx(pC,{children:"No result found."}),m.jsx(hC,{children:m.jsx(fC,{className:"",children:n?.map((e,t)=>m.jsxs("div",{children:[m.jsxs(mC,{value:"string"==typeof e.label?e.label:e.searchId,className:`first-letter:uppercase mb-1 focus:bg-primary_light w-full rounded-md focus:text-primary hover:text-primary font-semibold text-gray-700 text-sm cursor-pointer ${o?.includes(e.value)&&"bg-primary_light text-primary"}`,onSelect:()=>{j(e.value),e?.subOptions&&e?.subOptions?.length>0&&R(e.value)},children:[s&&m.jsx(Nd,{className:Ko("mr-2 h-4 w-4",o?.includes(e.value)?"opacity-100":"opacity-0")}),m.jsxs("p",{className:"flex justify-between w-full",children:[e.label,e?.subOptions&&e?.subOptions?.length>0&&m.jsx(Rd,{className:"ml-2 h-5 w-5 font-bold shrink-0 opacity-50"})]})]}),O===e.value&&e?.subOptions&&e?.subOptions?.map((e,t)=>m.jsxs(mC,{value:"string"==typeof e.label?e.label:e.searchId,className:`first-letter:uppercase mb-1 focus:bg-primary_light w-full rounded-md focus:text-primary hover:text-primary font-semibold text-gray-700 text-sm cursor-pointer pl-6 ${o?.includes(e.value)&&"bg-primary_light text-primary"}`,onSelect:()=>{j(e.value)},children:[s&&m.jsx(Nd,{className:Ko("mr-2 h-4 w-4",o?.includes(e.value)?"opacity-100":"opacity-0")}),e.label]},t))]},t))})})]})})]}),x&&m.jsx("p",{className:"text-danger text-xs font-normal",children:x})]})})}var _O="ScrollArea",[EO]=sa(_O),[jO,OO]=EO(_O),NO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:a=600,...i}=e,[s,l]=D.useState(null),[u,c]=D.useState(null),[d,f]=D.useState(null),[p,h]=D.useState(null),[g,y]=D.useState(null),[v,b]=D.useState(0),[w,x]=D.useState(0),[S,C]=D.useState(!1),[k,_]=D.useState(!1),E=ia(t,e=>l(e)),j=Ca(o);return m.jsx(jO,{scope:n,type:r,dir:j,scrollHideDelay:a,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:h,scrollbarXEnabled:S,onScrollbarXEnabledChange:C,scrollbarY:g,onScrollbarYChange:y,scrollbarYEnabled:k,onScrollbarYEnabledChange:_,onCornerWidthChange:b,onCornerHeightChange:x,children:m.jsx(ba.div,{dir:j,...i,ref:E,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});NO.displayName=_O;var RO="ScrollAreaViewport",PO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...a}=e,i=OO(RO,n),s=ia(t,D.useRef(null),i.onViewportChange);return m.jsxs(m.Fragment,{children:[m.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),m.jsx(ba.div,{"data-radix-scroll-area-viewport":"",...a,ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:m.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});PO.displayName=RO;var TO="ScrollAreaScrollbar",DO=D.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=OO(TO,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,s="horizontal"===e.orientation;return D.useEffect(()=>(s?a(!0):i(!0),()=>{s?a(!1):i(!1)}),[s,a,i]),"hover"===o.type?m.jsx(MO,{...r,ref:t,forceMount:n}):"scroll"===o.type?m.jsx(IO,{...r,ref:t,forceMount:n}):"auto"===o.type?m.jsx(AO,{...r,ref:t,forceMount:n}):"always"===o.type?m.jsx(FO,{...r,ref:t}):null});DO.displayName=TO;var MO=D.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=OO(TO,e.__scopeScrollArea),[a,i]=D.useState(!1);return D.useEffect(()=>{const e=o.scrollArea;let t=0;if(e){const n=()=>{window.clearTimeout(t),i(!0)},r=()=>{t=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return e.addEventListener("pointerenter",n),e.addEventListener("pointerleave",r),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",n),e.removeEventListener("pointerleave",r)}}},[o.scrollArea,o.scrollHideDelay]),m.jsx(cl,{present:n||a,children:m.jsx(AO,{"data-state":a?"visible":"hidden",...r,ref:t})})}),IO=D.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=OO(TO,e.__scopeScrollArea),a="horizontal"===e.orientation,i=nN(()=>l("SCROLL_END"),100),[s,l]=function(e,t){return D.useReducer((e,n)=>t[e][n]??e,e)}("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return D.useEffect(()=>{if("idle"===s){const e=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,o.scrollHideDelay,l]),D.useEffect(()=>{const e=o.viewport,t=a?"scrollLeft":"scrollTop";if(e){let n=e[t];const r=()=>{const r=e[t];n!==r&&(l("SCROLL"),i()),n=r};return e.addEventListener("scroll",r),()=>e.removeEventListener("scroll",r)}},[o.viewport,a,l,i]),m.jsx(cl,{present:n||"hidden"!==s,children:m.jsx(FO,{"data-state":"hidden"===s?"hidden":"visible",...r,ref:t,onPointerEnter:ra(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ra(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),AO=D.forwardRef((e,t)=>{const n=OO(TO,e.__scopeScrollArea),{forceMount:r,...o}=e,[a,i]=D.useState(!1),s="horizontal"===e.orientation,l=nN(()=>{if(n.viewport){const e=n.viewport.offsetWidth<n.viewport.scrollWidth,t=n.viewport.offsetHeight<n.viewport.scrollHeight;i(s?e:t)}},10);return rN(n.viewport,l),rN(n.content,l),m.jsx(cl,{present:r||a,children:m.jsx(FO,{"data-state":a?"visible":"hidden",...o,ref:t})})}),FO=D.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=OO(TO,e.__scopeScrollArea),a=D.useRef(null),i=D.useRef(0),[s,l]=D.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=QO(s.viewport,s.content),c={...r,sizes:s,onSizesChange:l,hasThumb:Boolean(u>0&&u<1),onThumbChange:e=>a.current=e,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:e=>i.current=e};function d(e,t){return function(e,t,n,r="ltr"){const o=XO(n),a=o/2,i=t||a,s=o-i,l=n.scrollbar.paddingStart+i,u=n.scrollbar.size-n.scrollbar.paddingEnd-s,c=n.content-n.viewport,d="ltr"===r?[0,c]:[-1*c,0];return JO([l,u],d)(e)}(e,i.current,s,t)}return"horizontal"===n?m.jsx(LO,{...c,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const e=ZO(o.viewport.scrollLeft,s,o.dir);a.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollLeft=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollLeft=d(e,o.dir))}}):"vertical"===n?m.jsx(zO,{...c,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){const e=ZO(o.viewport.scrollTop,s);a.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{o.viewport&&(o.viewport.scrollTop=e)},onDragScroll:e=>{o.viewport&&(o.viewport.scrollTop=d(e))}}):null}),LO=D.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=OO(TO,e.__scopeScrollArea),[i,s]=D.useState(),l=D.useRef(null),u=ia(t,l,a.onScrollbarXChange);return D.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),m.jsx(VO,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{bottom:0,left:"rtl"===a.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===a.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":XO(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){const r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),eN(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:KO(i.paddingLeft),paddingEnd:KO(i.paddingRight)}})}})}),zO=D.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,a=OO(TO,e.__scopeScrollArea),[i,s]=D.useState(),l=D.useRef(null),u=ia(t,l,a.onScrollbarYChange);return D.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),m.jsx(VO,{"data-orientation":"vertical",...o,ref:u,sizes:n,style:{top:0,right:"ltr"===a.dir?0:void 0,left:"rtl"===a.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":XO(n)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){const r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),eN(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:KO(i.paddingTop),paddingEnd:KO(i.paddingBottom)}})}})}),[$O,HO]=EO(TO),VO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,p=OO(TO,n),[h,g]=D.useState(null),y=ia(t,e=>g(e)),v=D.useRef(null),b=D.useRef(""),w=p.viewport,x=r.content-r.viewport,S=ka(c),C=ka(l),k=nN(d,10);function _(e){if(v.current){const t=e.clientX-v.current.left,n=e.clientY-v.current.top;u({x:t,y:n})}}return D.useEffect(()=>{const e=e=>{const t=e.target,n=h?.contains(t);n&&S(e,x)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})},[w,h,x,S]),D.useEffect(C,[r,C]),rN(h,k),rN(p.content,k),m.jsx($O,{scope:n,scrollbar:h,hasThumb:o,onThumbChange:ka(a),onThumbPointerUp:ka(i),onThumbPositionChange:C,onThumbPointerDown:ka(s),children:m.jsx(ba.div,{...f,ref:y,style:{position:"absolute",...f.style},onPointerDown:ra(e.onPointerDown,e=>{if(0===e.button){e.target.setPointerCapture(e.pointerId),v.current=h.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),_(e)}}),onPointerMove:ra(e.onPointerMove,_),onPointerUp:ra(e.onPointerUp,e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=b.current,p.viewport&&(p.viewport.style.scrollBehavior=""),v.current=null})})})}),BO="ScrollAreaThumb",UO=D.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=HO(BO,e.__scopeScrollArea);return m.jsx(cl,{present:n||o.hasThumb,children:m.jsx(WO,{ref:t,...r})})}),WO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,a=OO(BO,n),i=HO(BO,n),{onThumbPositionChange:s}=i,l=ia(t,e=>i.onThumbChange(e)),u=D.useRef(void 0),c=nN(()=>{u.current&&(u.current(),u.current=void 0)},100);return D.useEffect(()=>{const e=a.viewport;if(e){const t=()=>{if(c(),!u.current){const t=tN(e,s);u.current=t,s()}};return s(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}},[a.viewport,c,s]),m.jsx(ba.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ra(e.onPointerDownCapture,e=>{const t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;i.onThumbPointerDown({x:n,y:r})}),onPointerUp:ra(e.onPointerUp,i.onThumbPointerUp)})});UO.displayName=BO;var qO="ScrollAreaCorner",YO=D.forwardRef((e,t)=>{const n=OO(qO,e.__scopeScrollArea),r=Boolean(n.scrollbarX&&n.scrollbarY);return"scroll"!==n.type&&r?m.jsx(GO,{...e,ref:t}):null});YO.displayName=qO;var GO=D.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=OO(qO,n),[a,i]=D.useState(0),[s,l]=D.useState(0),u=Boolean(a&&s);return rN(o.scrollbarX,()=>{const e=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(e),l(e)}),rN(o.scrollbarY,()=>{const e=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(e),i(e)}),u?m.jsx(ba.div,{...r,ref:t,style:{width:a,height:s,position:"absolute",right:"ltr"===o.dir?0:void 0,left:"rtl"===o.dir?0:void 0,bottom:0,...e.style}}):null});function KO(e){return e?parseInt(e,10):0}function QO(e,t){const n=e/t;return isNaN(n)?0:n}function XO(e){const t=QO(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function ZO(e,t,n="ltr"){const r=XO(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,s=a-r,l=FE(e,"ltr"===n?[0,i]:[-1*i,0]);return JO([0,i],[0,s])(l)}function JO(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function eN(e,t){return e>0&&e<t}var tN=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const a={left:e.scrollLeft,top:e.scrollTop},i=n.left!==a.left,s=n.top!==a.top;(i||s)&&t(),n=a,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function nN(e,t){const n=ka(e),r=D.useRef(0);return D.useEffect(()=>()=>window.clearTimeout(r.current),[]),D.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function rN(e,t){const n=ka(t);ua(()=>{let t=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}var oN=NO,aN=PO,iN=YO;const sN=D.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(oN,{ref:r,className:Ko("relative overflow-hidden",e),...n,children:[m.jsx(aN,{className:"h-full w-full rounded-[inherit]",children:t}),m.jsx(lN,{}),m.jsx(iN,{})]}));sN.displayName=oN.displayName;const lN=D.forwardRef(({className:e,orientation:t="vertical",...n},r)=>m.jsx(DO,{ref:r,orientation:t,className:Ko("flex touch-none select-none transition-colors","vertical"===t&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:m.jsx(UO,{className:"relative flex-1 rounded-full bg-neutral-200 dark:bg-neutral-800"})}));function uN({placeholder:e,searchPlaceholder:t,options:n=[],showMultiSelectValues:r=!0,values:o,onChange:a,className:i,showCheckMark:s=!0,label:l,labelClass:u,required:c,info:d,optional:f,actionLabel:p,actionLabelAction:h,actionLabelInfo:g,removeSelectedValue:y,removeTag:v,loading:b,showCount:w,error:x,showError:S,onChangeSearch:C,searching:k,contentStyle:_,disabled:E,searchValue:j}){const[O,N]=D.useState(!1),[R,P]=D.useState(0),T=D.useRef(null);D.useEffect(()=>{const e=()=>{T.current&&P(T?.current?.offsetWidth)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const M=o?.filter(e=>""!==e),I=e=>{const t=M?.includes(e)?M?.filter(t=>t!==e):[...M||[],e];a&&a(t)};return D.useEffect(()=>{y&&I(y)},[y]),m.jsx(m.Fragment,{children:b?m.jsx(na,{className:"w-full h-[48px]"}):m.jsxs("div",{className:Ko("flex flex-col gap-2.5",i),children:[m.jsxs("div",{className:"flex justify-between gap-2 flex-wrap",children:[l&&m.jsxs("label",{className:Ko("text-black flex items-center gap-1 first-letter:uppercase text-sm font-medium",u),children:[l," ",c?m.jsx("span",{className:"text-[#E12D39]",children:l&&"*"}):f?m.jsx("span",{className:"text-[#B5B5B5] font-normal",children:"(optional)"}):null,d&&m.jsx(kv,{fieldName:l,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:d})})]}),p&&m.jsxs("button",{onClick:h,className:"text-primary flex items-center gap-1 first-letter:uppercase text-sm font-medium",children:[p,g&&m.jsx(kv,{fieldName:p,children:m.jsx("p",{className:"font-normal first-letter:uppercase text-left",children:g})})]})]}),m.jsxs($C,{modal:!0,open:O,onOpenChange:N,children:[m.jsx(HC,{disabled:E,asChild:!0,children:m.jsxs(UC,{ref:T,variant:"outline",role:"combobox","aria-expanded":O,className:Ko(`w-full h-[48px] justify-between border focus:border-primary border-neutral-200 bg-white hover:bg-white hover:border-[#BFD7FE] ${(x||S)&&"!border-danger"}`,r?"h-auto py-3":null,i),children:[m.jsx("div",{className:"flex gap-2 text-[#5E6278] justify-start first-letter:uppercase flex-wrap",children:M?.length>0&&r?M?.map((e,t)=>m.jsxs("div",{onClick:()=>{!v&&I(e)},className:"px-2 py-1 text-black flex items-center justify-between rounded gap-2 border bg-slate-200 text-xs font-medium",children:[n?.[0].searchId?n?.find(t=>t.value===e)?.searchId:n?.find(t=>t.value===e)?.label,m.jsx("span",{className:"",children:m.jsx("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M5.44001 4.49978L7.83334 2.12644C7.96064 1.99737 8.03146 1.82301 8.03021 1.64173C8.02896 1.46044 7.95575 1.28708 7.82667 1.15978C7.6976 1.03247 7.52324 0.961657 7.34196 0.962907C7.16067 0.964157 6.98731 1.03737 6.86001 1.16644L4.50001 3.55978L2.14001 1.21311C2.0151 1.08894 1.84613 1.01925 1.67001 1.01925C1.49388 1.01925 1.32492 1.08894 1.20001 1.21311C1.13752 1.27509 1.08793 1.34882 1.05408 1.43006C1.02023 1.5113 1.00281 1.59844 1.00281 1.68644C1.00281 1.77445 1.02023 1.86159 1.05408 1.94283C1.08793 2.02407 1.13752 2.0978 1.20001 2.15978L3.56001 4.49978L1.16667 6.87311C1.03937 7.00218 0.968554 7.17654 0.969804 7.35782C0.971054 7.53911 1.04427 7.71247 1.17334 7.83978C1.30241 7.96708 1.47677 8.0379 1.65805 8.03665C1.83934 8.0354 2.0127 7.96218 2.14001 7.83311L4.50001 5.43978L6.86001 7.78644C6.98492 7.91061 7.15388 7.98031 7.33001 7.98031C7.50613 7.98031 7.6751 7.91061 7.80001 7.78644C7.86249 7.72447 7.91209 7.65073 7.94594 7.56949C7.97978 7.48826 7.99721 7.40112 7.99721 7.31311C7.99721 7.2251 7.97978 7.13797 7.94594 7.05673C7.91209 6.97549 7.86249 6.90175 7.80001 6.83978L5.44001 4.49978Z",fill:"black"})})})]},t)):!r&&w&&o.length>0?`${M.length} ${l} selected`:e??"Select..."}),m.jsx(Dd,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),m.jsx(VC,{align:"start",style:{width:R},className:Ko("w-[480px] p-0 bg-white rounded-xl border-gray-200",_),children:m.jsx(sN,{children:m.jsxs(cC,{children:[m.jsx(dC,{onChangeCapture:C,className:"placeholder:text-xs",placeholder:t??"Search..."}),k?m.jsx("div",{className:"flex flex-col gap-2 p-2",children:[1,2,3].map((e,t)=>m.jsx(na,{className:"h-9 rounded-md"},t))}):m.jsx(pC,{children:j?"No result found.":e}),m.jsx(hC,{children:m.jsx(fC,{className:"",children:n?.map(e=>m.jsxs(mC,{value:"string"==typeof e.label?e.label:e.searchId,className:`first-letter:uppercase mb-1 focus:bg-primary_light w-full rounded-md focus:text-primary hover:text-primary font-semibold text-gray-700 text-sm cursor-pointer ${o?.includes(e.value)&&"bg-primary_light text-primary"}`,onSelect:()=>{I(e.value)},children:[s&&m.jsx(Nd,{className:Ko("mr-2 h-4 w-4",o?.includes(e.value)?"opacity-100":"opacity-0")}),e.label]},e.value))})})]})})})]})]})})}lN.displayName=DO.displayName;const cN=D.createContext({dragDropManager:void 0});function dN(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var fN="function"==typeof Symbol&&Symbol.observable||"@@observable",pN=function(){return Math.random().toString(36).substring(7).split("").join(".")},hN={INIT:"@@redux/INIT"+pN(),REPLACE:"@@redux/REPLACE"+pN()};function mN(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(dN(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(dN(1));return n(mN)(e,t)}if("function"!=typeof e)throw new Error(dN(2));var o=e,a=t,i=[],s=i,l=!1;function u(){s===i&&(s=i.slice())}function c(){if(l)throw new Error(dN(3));return a}function d(e){if("function"!=typeof e)throw new Error(dN(4));if(l)throw new Error(dN(5));var t=!0;return u(),s.push(e),function(){if(t){if(l)throw new Error(dN(6));t=!1,u();var n=s.indexOf(e);s.splice(n,1),i=null}}}function f(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(dN(7));if(void 0===e.type)throw new Error(dN(8));if(l)throw new Error(dN(9));try{l=!0,a=o(a,e)}finally{l=!1}for(var t=i=s,n=0;n<t.length;n++){(0,t[n])()}return e}return f({type:hN.INIT}),(r={dispatch:f,subscribe:d,getState:c,replaceReducer:function(e){if("function"!=typeof e)throw new Error(dN(10));o=e,f({type:hN.REPLACE})}})[fN]=function(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(dN(11));function n(){e.next&&e.next(c())}return n(),{unsubscribe:t(n)}}})[fN]=function(){return this},e},r}function gN(e,t,...n){if("undefined"!=typeof process&&"production"===process.env.NODE_ENV&&void 0===t)throw new Error("invariant requires an error message argument");if(!e){let e;if(void 0===t)e=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let r=0;e=new Error(t.replace(/%s/g,function(){return n[r++]})),e.name="Invariant Violation"}throw e.framesToPop=1,e}}function yN(e){return"object"==typeof e}const vN="dnd-core/INIT_COORDS",bN="dnd-core/BEGIN_DRAG",wN="dnd-core/PUBLISH_DRAG_SOURCE",xN="dnd-core/HOVER",SN="dnd-core/DROP",CN="dnd-core/END_DRAG";function kN(e,t){return{type:vN,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const _N={type:vN,payload:{clientOffset:null,sourceClientOffset:null}};function EN(e){return function(t=[],n={publishSource:!0}){const{publishSource:r=!0,clientOffset:o,getSourceClientOffset:a}=n,i=e.getMonitor(),s=e.getRegistry();e.dispatch(kN(o)),function(e,t,n){gN(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(e){gN(n.getSource(e),"Expected sourceIds to be registered.")})}(t,i,s);const l=function(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}(t,i);if(null==l)return void e.dispatch(_N);let u=null;if(o){if(!a)throw new Error("getSourceClientOffset must be defined");!function(e){gN("function"==typeof e,"When clientOffset is provided, getSourceClientOffset must be a function.")}(a),u=a(l)}e.dispatch(kN(o,u));const c=s.getSource(l).beginDrag(i,l);if(null==c)return;!function(e){gN(yN(e),"Item must be an object.")}(c),s.pinSource(l);const d=s.getSourceType(l);return{type:bN,payload:{itemType:d,item:c,sourceId:l,clientOffset:o||null,sourceClientOffset:u||null,isSourcePublic:!!r}}}}function jN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ON(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){jN(e,t,n[t])})}return e}function NN(e){return function(t={}){const n=e.getMonitor(),r=e.getRegistry();!function(e){gN(e.isDragging(),"Cannot call drop while not dragging."),gN(!e.didDrop(),"Cannot call drop twice during one drag operation.")}(n);const o=function(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}(n);o.forEach((o,a)=>{const i=function(e,t,n,r){const o=n.getTarget(e);let a=o?o.drop(r,e):void 0;(function(e){gN(void 0===e||yN(e),"Drop result must either be an object or undefined.")})(a),void 0===a&&(a=0===t?{}:r.getDropResult());return a}(o,a,r,n),s={type:SN,payload:{dropResult:ON({},t,i)}};e.dispatch(s)})}}function RN(e){return function(){const t=e.getMonitor(),n=e.getRegistry();!function(e){gN(e.isDragging(),"Cannot call endDrag while not dragging.")}(t);const r=t.getSourceId();if(null!=r){n.getSource(r,!0).endDrag(t,r),n.unpinSource()}return{type:CN}}}function PN(e,t){return null===t?null===e:Array.isArray(e)?e.some(e=>e===t):e===t}function TN(e){return function(t,{clientOffset:n}={}){!function(e){gN(Array.isArray(e),"Expected targetIds to be an array.")}(t);const r=t.slice(0),o=e.getMonitor(),a=e.getRegistry();return function(e,t,n){for(let r=e.length-1;r>=0;r--){const o=e[r];PN(t.getTargetType(o),n)||e.splice(r,1)}}(r,a,o.getItemType()),function(e,t,n){gN(t.isDragging(),"Cannot call hover while not dragging."),gN(!t.didDrop(),"Cannot call hover after drop.");for(let t=0;t<e.length;t++){const r=e[t];gN(e.lastIndexOf(r)===t,"Expected targetIds to be unique in the passed array.");gN(n.getTarget(r),"Expected targetIds to be registered.")}}(r,o,a),function(e,t,n){e.forEach(function(e){n.getTarget(e).hover(t,e)})}(r,o,a),{type:xN,payload:{targetIds:r,clientOffset:n||null}}}}function DN(e){return function(){if(e.getMonitor().isDragging())return{type:wN}}}class MN{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:t}=this.store;const n=function(e){return{beginDrag:EN(e),publishDragSource:DN(e),hover:TN(e),drop:NN(e),endDrag:RN(e)}}(this);return Object.keys(n).reduce((r,o)=>{const a=n[o];var i;return r[o]=(i=a,(...n)=>{const r=i.apply(e,n);void 0!==r&&t(r)}),r},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{const e=this.store.getState().refCount>0;this.backend&&(e&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!e&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}}function IN(e,t){return{x:e.x-t.x,y:e.y-t.y}}const AN=[],FN=[];AN.__IS_NONE__=!0,FN.__IS_ALL__=!0;class LN{subscribeToStateChange(e,t={}){const{handlerIds:n}=t;gN("function"==typeof e,"listener must be a function."),gN(void 0===n||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let r=this.store.getState().stateId;return this.store.subscribe(()=>{const t=this.store.getState(),o=t.stateId;try{const a=o===r||o===r+1&&!function(e,t){return e!==AN&&(e===FN||void 0===t||(n=e,t.filter(e=>n.indexOf(e)>-1)).length>0);var n}(t.dirtyHandlerIds,n);a||e()}finally{r=o}})}subscribeToOffsetChange(e){gN("function"==typeof e,"listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{const n=this.store.getState().dragOffset;n!==t&&(t=n,e())})}canDragSource(e){if(!e)return!1;const t=this.registry.getSource(e);return gN(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()&&t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const t=this.registry.getTarget(e);if(gN(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;return PN(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(e){if(!e)return!1;const t=this.registry.getSource(e,!0);if(gN(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;return this.registry.getSourceType(e)===this.getItemType()&&t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;const{shallow:n}=t;if(!this.isDragging())return!1;const r=this.registry.getTargetType(e),o=this.getItemType();if(o&&!PN(r,o))return!1;const a=this.getTargetIds();if(!a.length)return!1;const i=a.indexOf(e);return n?i===a.length-1:i>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return function(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return t&&n&&r?IN(function(e,t){return{x:e.x+t.x,y:e.y+t.y}}(t,r),n):null}(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return function(e){const{clientOffset:t,initialClientOffset:n}=e;return t&&n?IN(t,n):null}(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}}const zN="undefined"!=typeof global?global:self,$N=zN.MutationObserver||zN.WebKitMutationObserver;function HN(e){return function(){const t=setTimeout(r,0),n=setInterval(r,50);function r(){clearTimeout(t),clearInterval(n),e()}}}const VN="function"==typeof $N?function(e){let t=1;const n=new $N(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}:HN;class BN{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}}const UN=new class{enqueueTask(e){const{queue:t,requestFlush:n}=this;t.length||(n(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:e}=this;for(;this.index<e.length;){const t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let t=0,n=e.length-this.index;t<n;t++)e[t]=e[t+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=VN(this.flush),this.requestErrorThrow=HN(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},WN=new class{create(e){const t=this.freeTasks,n=t.length?t.pop():new BN(this.onError,e=>t[t.length]=e);return n.task=e,n}constructor(e){this.onError=e,this.freeTasks=[]}}(UN.registerPendingError);const qN="dnd-core/ADD_SOURCE",YN="dnd-core/ADD_TARGET",GN="dnd-core/REMOVE_SOURCE",KN="dnd-core/REMOVE_TARGET";function QN(e,t){t&&Array.isArray(e)?e.forEach(e=>QN(e,!1)):gN("string"==typeof e||"symbol"==typeof e,t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var XN;!function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"}(XN||(XN={}));let ZN=0;function JN(e){const t=(ZN++).toString();switch(e){case XN.SOURCE:return`S${t}`;case XN.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function eR(e){switch(e[0]){case"S":return XN.SOURCE;case"T":return XN.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function tR(e,t){const n=e.entries();let r=!1;do{const{done:e,value:[,o]}=n.next();if(o===t)return!0;r=!!e}while(!r);return!1}class nR{addSource(e,t){QN(e),function(e){gN("function"==typeof e.canDrag,"Expected canDrag to be a function."),gN("function"==typeof e.beginDrag,"Expected beginDrag to be a function."),gN("function"==typeof e.endDrag,"Expected endDrag to be a function.")}(t);const n=this.addHandler(XN.SOURCE,e,t);return this.store.dispatch(function(e){return{type:qN,payload:{sourceId:e}}}(n)),n}addTarget(e,t){QN(e,!0),function(e){gN("function"==typeof e.canDrop,"Expected canDrop to be a function."),gN("function"==typeof e.hover,"Expected hover to be a function."),gN("function"==typeof e.drop,"Expected beginDrag to be a function.")}(t);const n=this.addHandler(XN.TARGET,e,t);return this.store.dispatch(function(e){return{type:YN,payload:{targetId:e}}}(n)),n}containsHandler(e){return tR(this.dragSources,e)||tR(this.dropTargets,e)}getSource(e,t=!1){gN(this.isSourceId(e),"Expected a valid source ID.");return t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return gN(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return gN(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return gN(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return eR(e)===XN.SOURCE}isTargetId(e){return eR(e)===XN.TARGET}removeSource(e){var t;gN(this.getSource(e),"Expected an existing source."),this.store.dispatch(function(e){return{type:GN,payload:{sourceId:e}}}(e)),t=()=>{this.dragSources.delete(e),this.types.delete(e)},UN.enqueueTask(WN.create(t))}removeTarget(e){gN(this.getTarget(e),"Expected an existing target."),this.store.dispatch(function(e){return{type:KN,payload:{targetId:e}}}(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const t=this.getSource(e);gN(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){gN(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,n){const r=JN(e);return this.types.set(r,t),e===XN.SOURCE?this.dragSources.set(r,n):e===XN.TARGET&&this.dropTargets.set(r,n),r}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const rR=(e,t)=>e===t;function oR(e=AN,t){switch(t.type){case xN:break;case qN:case YN:case KN:case GN:return AN;default:return FN}const{targetIds:n=[],prevTargetIds:r=[]}=t.payload,o=function(e,t){const n=new Map,r=e=>{n.set(e,n.has(e)?n.get(e)+1:1)};e.forEach(r),t.forEach(r);const o=[];return n.forEach((e,t)=>{1===e&&o.push(t)}),o}(n,r),a=o.length>0||!function(e,t,n=rR){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!n(e[r],t[r]))return!1;return!0}(n,r);if(!a)return AN;const i=r[r.length-1],s=n[n.length-1];return i!==s&&(i&&o.push(i),s&&o.push(s)),o}function aR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const iR={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function sR(e=iR,t){const{payload:n}=t;switch(t.type){case vN:case bN:return{initialSourceClientOffset:n.sourceClientOffset,initialClientOffset:n.clientOffset,clientOffset:n.clientOffset};case xN:return r=e.clientOffset,o=n.clientOffset,!r&&!o||r&&o&&r.x===o.x&&r.y===o.y?e:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){aR(e,t,n[t])})}return e}({},e,{clientOffset:n.clientOffset});case CN:case SN:return iR;default:return e}var r,o}function lR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){lR(e,t,n[t])})}return e}const cR={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function dR(e=cR,t){const{payload:n}=t;switch(t.type){case bN:return uR({},e,{itemType:n.itemType,item:n.item,sourceId:n.sourceId,isSourcePublic:n.isSourcePublic,dropResult:null,didDrop:!1});case wN:return uR({},e,{isSourcePublic:!0});case xN:return uR({},e,{targetIds:n.targetIds});case KN:return-1===e.targetIds.indexOf(n.targetId)?e:uR({},e,{targetIds:(r=e.targetIds,o=n.targetId,r.filter(e=>e!==o))});case SN:return uR({},e,{dropResult:n.dropResult,didDrop:!0,targetIds:[]});case CN:return uR({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}var r,o}function fR(e=0,t){switch(t.type){case qN:case YN:return e+1;case GN:case KN:return e-1;default:return e}}function pR(e=0){return e+1}function hR(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mR(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){hR(e,t,n[t])})}return e}function gR(e={},t){return{dirtyHandlerIds:oR(e.dirtyHandlerIds,{type:t.type,payload:mR({},t.payload,{prevTargetIds:(n=e,r="dragOperation.targetIds",o=[],r.split(".").reduce((e,t)=>e&&e[t]?e[t]:o||null,n))})}),dragOffset:sR(e.dragOffset,t),refCount:fR(e.refCount,t),dragOperation:dR(e.dragOperation,t),stateId:pR(e.stateId)};var n,r,o}function yR(e,t=void 0,n={},r=!1){const o=function(e){const t="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__;return mN(gR,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}(r),a=new LN(o,new nR(o)),i=new MN(o,a),s=e(i,t,n);return i.receiveBackend(s),i}function vR(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}let bR=0;const wR=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var xR,SR,CR=D.memo(function(e){var{children:t}=e,n=vR(e,["children"]);const[r,o]=function(e){if("manager"in e){return[{dragDropManager:e.manager},!1]}const t=function(e,t=kR(),n,r){const o=t;o[wR]||(o[wR]={dragDropManager:yR(e,t,n,r)});return o[wR]}(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}(n);return D.useEffect(()=>{if(o){const e=kR();return++bR,()=>{0===--bR&&(e[wR]=null)}}},[]),m.jsx(cN.Provider,{value:r,children:t})});function kR(){return"undefined"!=typeof global?global:window}var _R=(SR||(SR=1,xR=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,a;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!==o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(a=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!==o--;)if(!Object.prototype.hasOwnProperty.call(n,a[o]))return!1;for(o=r;0!==o--;){var i=a[o];if(!e(t[i],n[i]))return!1}return!0}return t!=t&&n!=n}),xR),ER=n(_R);const jR="undefined"!=typeof window?D.useLayoutEffect:D.useEffect;function OR(e,t,n){const[r,o]=function(e,t,n){const[r,o]=D.useState(()=>t(e)),a=D.useCallback(()=>{const a=t(e);ER(r,a)||(o(a),n&&n())},[r,e,n]);return jR(a),[r,a]}(e,t,n);return jR(function(){const t=e.getHandlerId();if(null!=t)return e.subscribeToStateChange(o,{handlerIds:[t]})},[e,o]),r}function NR(e,t,n){return OR(t,e||(()=>({})),()=>n.reconnect())}function RR(e,t){const n=[...t||[]];return null==t&&"function"!=typeof e&&n.push(e),D.useMemo(()=>"function"==typeof e?e():e,n)}function PR(e){return D.useMemo(()=>e.hooks.dragSource(),[e])}function TR(e){return D.useMemo(()=>e.hooks.dragPreview(),[e])}let DR=!1,MR=!1;class IR{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){gN(!DR,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return DR=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{DR=!1}}isDragging(){if(!this.sourceId)return!1;gN(!MR,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return MR=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{MR=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}}let AR=!1;class FR{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;gN(!AR,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return AR=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{AR=!1}}isOver(e){return!!this.targetId&&this.internalMonitor.isOverTarget(this.targetId,e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}}function LR(e,t,n,r){let o;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;const a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;const s=Object.prototype.hasOwnProperty.bind(t);for(let n=0;n<a.length;n++){const r=a[n];if(!s(r))return!1;const i=e[r],l=t[r];if(o=void 0,!1===o||void 0===o&&i!==l)return!1}return!0}function zR(e){return null!==e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function $R(e){return(t=null,n=null)=>{if(!D.isValidElement(t)){const r=t;return e(r,n),r}const r=t;!function(e){if("string"==typeof e.type)return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}(r);const o=n?t=>e(t,n):e;return function(e,t){const n=e.ref;return gN("string"!=typeof n,"Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?D.cloneElement(e,{ref:e=>{VR(n,e),VR(t,e)}}):D.cloneElement(e,{ref:t})}(r,o)}}function HR(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const e=$R(r);t[n]=()=>e}}),t}function VR(e,t){"function"==typeof e?e(t):e.current=t}class BR{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){const e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){const e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){const t=this.dragPreview,n=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();n&&this.disconnectDragPreview(),this.handlerId&&(t?n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions)):this.lastConnectedDragPreview=t)}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!LR(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!LR(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=HR({dragSource:(e,t)=>{this.clearDragSource(),this.dragSourceOptions=t||null,zR(e)?this.dragSourceRef=e:this.dragSourceNode=e,this.reconnectDragSource()},dragPreview:(e,t)=>{this.clearDragPreview(),this.dragPreviewOptions=t||null,zR(e)?this.dragPreviewRef=e:this.dragPreviewNode=e,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}}class UR{get connectTarget(){return this.dropTarget}reconnect(){const e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();const t=this.dropTarget;this.handlerId&&(t?e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions)):this.lastConnectedDropTarget=t)}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!LR(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=HR({dropTarget:(e,t)=>{this.clearDropTarget(),this.dropTargetOptions=t,zR(e)?this.dropTargetRef=e:this.dropTargetNode=e,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}}function WR(){const{dragDropManager:e}=D.useContext(cN);return gN(null!=e,"Expected drag drop context"),e}class qR{beginDrag(){const e=this.spec,t=this.monitor;let n=null;return n="object"==typeof e.item?e.item:"function"==typeof e.item?e.item(t):{},null!=n?n:null}canDrag(){const e=this.spec,t=this.monitor;return"boolean"==typeof e.canDrag?e.canDrag:"function"!=typeof e.canDrag||e.canDrag(t)}isDragging(e,t){const n=this.spec,r=this.monitor,{isDragging:o}=n;return o?o(r):t===e.getSourceId()}endDrag(){const e=this.spec,t=this.monitor,n=this.connector,{end:r}=e;r&&r(t.getItem(),t),n.reconnect()}constructor(e,t,n){this.spec=e,this.monitor=t,this.connector=n}}function YR(e,t,n){const r=WR(),o=function(e,t,n){const r=D.useMemo(()=>new qR(e,t,n),[t,n]);return D.useEffect(()=>{r.spec=e},[e]),r}(e,t,n),a=function(e){return D.useMemo(()=>{const t=e.type;return gN(null!=t,"spec.type must be defined"),t},[e])}(e);jR(function(){if(null!=a){const[e,i]=function(e,t,n){const r=n.getRegistry(),o=r.addSource(e,t);return[o,()=>r.removeSource(o)]}(a,o,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),i}},[r,t,n,o,a])}function GR(e,t){const n=RR(e,t);gN(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=function(){const e=WR();return D.useMemo(()=>new IR(e),[e])}(),o=function(e,t){const n=WR(),r=D.useMemo(()=>new BR(n.getBackend()),[n]);return jR(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),jR(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}(n.options,n.previewOptions);return YR(n,r,o),[NR(n.collect,r,o),PR(o),TR(o)]}function KR(e){return D.useMemo(()=>e.hooks.dropTarget(),[e])}class QR{canDrop(){const e=this.spec,t=this.monitor;return!e.canDrop||e.canDrop(t.getItem(),t)}hover(){const e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){const e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}}function XR(e,t,n){const r=WR(),o=function(e,t){const n=D.useMemo(()=>new QR(e,t),[t]);return D.useEffect(()=>{n.spec=e},[e]),n}(e,t),a=function(e){const{accept:t}=e;return D.useMemo(()=>(gN(null!=e.accept,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}(e);jR(function(){const[e,i]=function(e,t,n){const r=n.getRegistry(),o=r.addTarget(e,t);return[o,()=>r.removeTarget(o)]}(a,o,r);return t.receiveHandlerId(e),n.receiveHandlerId(e),i},[r,t,o,n,a.map(e=>e.toString()).join("|")])}function ZR(e,t){const n=RR(e,t),r=function(){const e=WR();return D.useMemo(()=>new FR(e),[e])}(),o=function(e){const t=WR(),n=D.useMemo(()=>new UR(t.getBackend()),[t]);return jR(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}(n.options);return XR(n,r,o),[NR(n.collect,r,o),KR(o)]}function JR(e){let t=null;return()=>(null==t&&(t=e()),t)}class eP{enter(e){const t=this.entered.length;return this.entered=function(e,t){const n=new Set,r=e=>n.add(e);e.forEach(r),t.forEach(r);const o=[];return n.forEach(e=>o.push(e)),o}(this.entered.filter(t=>this.isNodeInDocument(t)&&(!t.contains||t.contains(e))),[e]),0===t&&this.entered.length>0}leave(e){const t=this.entered.length;var n,r;return this.entered=(n=this.entered.filter(this.isNodeInDocument),r=e,n.filter(e=>e!==r)),t>0&&0===this.entered.length}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}}class tP{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get:()=>(console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null)})})}loadDataTransfer(e){if(e){const t={};Object.keys(this.config.exposeProperties).forEach(n=>{const r=this.config.exposeProperties[n];null!=r&&(t[n]={value:r(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}}const nP="__NATIVE_FILE__",rP="__NATIVE_URL__",oP="__NATIVE_TEXT__",aP="__NATIVE_HTML__";var iP=Object.freeze({__proto__:null,FILE:nP,HTML:aP,TEXT:oP,URL:rP});function sP(e,t,n){const r=t.reduce((t,n)=>t||e.getData(n),"");return null!=r?r:n}const lP={[nP]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[aP]:{exposeProperties:{html:(e,t)=>sP(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[rP]:{exposeProperties:{urls:(e,t)=>sP(e,t,"").split("\n"),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[oP]:{exposeProperties:{text:(e,t)=>sP(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function uP(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(lP).filter(e=>{const n=lP[e];return!!(null==n?void 0:n.matchesTypes)&&n.matchesTypes.some(e=>t.indexOf(e)>-1)})[0]||null}const cP=JR(()=>/firefox/i.test(navigator.userAgent)),dP=JR(()=>Boolean(window.safari));class fP{interpolate(e){const{xs:t,ys:n,c1s:r,c2s:o,c3s:a}=this;let i=t.length-1;if(e===t[i])return n[i];let s,l=0,u=a.length-1;for(;l<=u;){s=Math.floor(.5*(l+u));const r=t[s];if(r<e)l=s+1;else{if(!(r>e))return n[s];u=s-1}}i=Math.max(0,u);const c=e-t[i],d=c*c;return n[i]+r[i]*c+o[i]*d+a[i]*c*d}constructor(e,t){const{length:n}=e,r=[];for(let e=0;e<n;e++)r.push(e);r.sort((t,n)=>e[t]<e[n]?-1:1);const o=[],a=[];let i,s;for(let r=0;r<n-1;r++)i=e[r+1]-e[r],s=t[r+1]-t[r],o.push(i),a.push(s/i);const l=[a[0]];for(let e=0;e<o.length-1;e++){const t=a[e],n=a[e+1];if(t*n<=0)l.push(0);else{i=o[e];const r=o[e+1],a=i+r;l.push(3*a/((a+r)/t+(a+i)/n))}}l.push(a[a.length-1]);const u=[],c=[];let d;for(let e=0;e<l.length-1;e++){d=a[e];const t=l[e],n=1/o[e],r=t+l[e+1]-d-d;u.push((d-t-r)*n),c.push(r*n*n)}this.xs=e,this.ys=t,this.c1s=l,this.c2s=u,this.c3s=c}}function pP(e){const t=1===e.nodeType?e:e.parentElement;if(!t)return null;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function hP(e){return{x:e.clientX,y:e.clientY}}function mP(e,t,n,r,o){const a=function(e){var t;return"IMG"===e.nodeName&&(cP()||!(null===(t=document.documentElement)||void 0===t?void 0:t.contains(e)))}(t),i=pP(a?e:t),s={x:n.x-i.x,y:n.y-i.y},{offsetWidth:l,offsetHeight:u}=e,{anchorX:c,anchorY:d}=r,{dragPreviewWidth:f,dragPreviewHeight:p}=function(e,t,n,r){let o=e?t.width:n,a=e?t.height:r;return dP()&&e&&(a/=window.devicePixelRatio,o/=window.devicePixelRatio),{dragPreviewWidth:o,dragPreviewHeight:a}}(a,t,l,u),{offsetX:h,offsetY:m}=o,g=0===m||m;return{x:0===h||h?h:new fP([0,.5,1],[s.x,s.x/l*f,s.x+f-l]).interpolate(c),y:g?m:(()=>{let e=new fP([0,.5,1],[s.y,s.y/u*p,s.y+p-u]).interpolate(d);return dP()&&a&&(e+=(window.devicePixelRatio-1)*p),e})()}}class gP{get window(){return this.globalContext?this.globalContext:"undefined"!=typeof window?window:void 0}get document(){var e;return(null===(e=this.globalContext)||void 0===e?void 0:e.document)?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var e;return(null===(e=this.optionsArgs)||void 0===e?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}}function yP(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vP(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){yP(e,t,n[t])})}return e}class bP{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:(null===(e=this.dragStartSourceIds)||void 0===e?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:(null===(t=this.dragOverTargetIds)||void 0===t?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){const e=this.rootElement;if(void 0!==e){if(e.__isReactDndBackendSetUp)throw new Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){const e=this.rootElement;var t;void 0!==e&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId&&(null===(t=this.window)||void 0===t||t.cancelAnimationFrame(this.asyncEndDragFrameId)))}connectDragPreview(e,t,n){return this.sourcePreviewNodeOptions.set(e,n),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,n){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,n);const r=t=>this.handleDragStart(t,e),o=e=>this.handleSelectStart(e);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",r),t.addEventListener("selectstart",o),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",r),t.removeEventListener("selectstart",o),t.setAttribute("draggable","false")}}connectDropTarget(e,t){const n=t=>this.handleDragEnter(t,e),r=t=>this.handleDragOver(t,e),o=t=>this.handleDrop(t,e);return t.addEventListener("dragenter",n),t.addEventListener("dragover",r),t.addEventListener("drop",o),()=>{t.removeEventListener("dragenter",n),t.removeEventListener("dragover",r),t.removeEventListener("drop",o)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return vP({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const e=this.monitor.getSourceId();return vP({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){const e=this.monitor.getItemType();return Object.keys(iP).some(t=>iP[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=function(e,t){const n=lP[e];if(!n)throw new Error(`native type ${e} has no configuration`);const r=new tP(n);return r.loadDataTransfer(t),r}(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e;this.mouseMoveTimeoutTimer=setTimeout(()=>{var e;return null===(e=this.rootElement)||void 0===e?void 0:e.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){var e;if(this.currentDragSourceNode=null,this.rootElement)null===(e=this.window)||void 0===e||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0);return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){null===this.dragOverTargetIds&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,n){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=e=>{const t=this.sourceNodes.get(e);return t&&pP(t)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=e=>Boolean(e&&this.document&&this.document.body&&this.document.body.contains(e)),this.endDragIfSourceWasRemovedFromDOM=()=>{const e=this.currentDragSourceNode;null==e||this.isNodeInDocument(e)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=e=>{null===this.hoverRafId&&"undefined"!=typeof requestAnimationFrame&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(e||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{null!==this.hoverRafId&&"undefined"!=typeof cancelAnimationFrame&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=e=>{if(e.defaultPrevented)return;const{dragStartSourceIds:t}=this;this.dragStartSourceIds=null;const n=hP(e);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(t||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:n});const{dataTransfer:r}=e,o=uP(r);if(this.monitor.isDragging()){if(r&&"function"==typeof r.setDragImage){const e=this.monitor.getSourceId(),t=this.sourceNodes.get(e),o=this.sourcePreviewNodes.get(e)||t;if(o){const{anchorX:e,anchorY:a,offsetX:i,offsetY:s}=this.getCurrentSourcePreviewNodeOptions(),l=mP(t,o,n,{anchorX:e,anchorY:a},{offsetX:i,offsetY:s});r.setDragImage(o,l.x,l.y)}}try{null==r||r.setData("application/json",{})}catch(e){}this.setCurrentDragSourceNode(e.target);const{captureDraggingState:t}=this.getCurrentSourcePreviewNodeOptions();t?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(o)this.beginDragNativeItem(o);else{if(r&&!r.types&&(e.target&&!e.target.hasAttribute||!e.target.hasAttribute("draggable")))return;e.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=e=>{var t;(this.dragEnterTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer));if(!this.enterLeaveCounter.enter(e.target)||this.monitor.isDragging())return;const{dataTransfer:n}=e,r=uP(n);r&&this.beginDragNativeItem(r,n)},this.handleTopDragEnter=e=>{const{dragEnterTargetIds:t}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=e.altKey,t.length>0&&this.actions.hover(t,{clientOffset:hP(e)});t.some(e=>this.monitor.canDropOnTarget(e))&&(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=e=>{var t;(this.dragOverTargetIds=[],this.isDraggingNativeItem())&&(null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer))},this.handleTopDragOver=e=>{const{dragOverTargetIds:t}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging())return e.preventDefault(),void(e.dataTransfer&&(e.dataTransfer.dropEffect="none"));this.altKeyPressed=e.altKey,this.lastClientOffset=hP(e),this.scheduleHover(t);(t||[]).some(e=>this.monitor.canDropOnTarget(e))?(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?e.preventDefault():(e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=e=>{this.isDraggingNativeItem()&&e.preventDefault();this.enterLeaveCounter.leave(e.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=e=>{var t;(this.dropTargetIds=[],this.isDraggingNativeItem())?(e.preventDefault(),null===(t=this.currentNativeSource)||void 0===t||t.loadDataTransfer(e.dataTransfer)):uP(e.dataTransfer)&&e.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=e=>{const{dropTargetIds:t}=this;this.dropTargetIds=[],this.actions.hover(t,{clientOffset:hP(e)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=e=>{const t=e.target;"function"==typeof t.dragDrop&&("INPUT"===t.tagName||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable||(e.preventDefault(),t.dragDrop()))},this.options=new gP(t,n),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new eP(this.isNodeInDocument)}}const wP=function(e,t,n){return new bP(e,t,n)};var xP,SP,CP=Object.create,kP=Object.defineProperty,_P=Object.getOwnPropertyDescriptor,EP=Object.getOwnPropertyNames,jP=Object.getPrototypeOf,OP=Object.prototype.hasOwnProperty,NP=(e,t,n)=>(n=null!=e?CP(jP(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of EP(t))OP.call(e,o)||o===n||kP(e,o,{get:()=>t[o],enumerable:!(r=_P(t,o))||r.enumerable});return e})(kP(n,"default",{value:e,enumerable:!0}),e)),RP=(xP={"node_modules/classnames/index.js"(e,t){!function(){var e={}.hasOwnProperty;function n(){for(var t=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var a=typeof o;if("string"===a||"number"===a)t.push(o);else if(Array.isArray(o)){if(o.length){var i=n.apply(null,o);i&&t.push(i)}}else if("object"===a){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){t.push(o.toString());continue}for(var s in o)e.call(o,s)&&o[s]&&t.push(s)}}}return t.join(" ")}void 0!==t&&t.exports?(n.default=n,t.exports=n):"function"==typeof define&&"object"==typeof define.amd&&define.amd?define("classnames",[],function(){return n}):window.classNames=n}()}},function(){return SP||(0,xP[EP(xP)[0]])((SP={exports:{}}).exports,SP),SP.exports}),PP=NP(RP()),TP="object"==typeof global&&global&&global.Object===Object&&global,DP="object"==typeof self&&self&&self.Object===Object&&self,MP=TP||DP||Function("return this")(),IP=MP.Symbol,AP=Object.prototype,FP=AP.hasOwnProperty,LP=AP.toString,zP=IP?IP.toStringTag:void 0;var $P=function(e){var t=FP.call(e,zP),n=e[zP];try{e[zP]=void 0;var r=!0}catch(e){}var o=LP.call(e);return r&&(t?e[zP]=n:delete e[zP]),o},HP=Object.prototype.toString;var VP=function(e){return HP.call(e)},BP=IP?IP.toStringTag:void 0;var UP=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":BP&&BP in Object(e)?$P(e):VP(e)};var WP=function(e){return null!=e&&"object"==typeof e};var qP=function(e){return"symbol"==typeof e||WP(e)&&"[object Symbol]"==UP(e)};var YP=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},GP=Array.isArray,KP=IP?IP.prototype:void 0,QP=KP?KP.toString:void 0;var XP=function e(t){if("string"==typeof t)return t;if(GP(t))return YP(t,e)+"";if(qP(t))return QP?QP.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var ZP=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var JP,eT=function(e){if(!ZP(e))return!1;var t=UP(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},tT=MP["__core-js_shared__"],nT=(JP=/[^.]+$/.exec(tT&&tT.keys&&tT.keys.IE_PROTO||""))?"Symbol(src)_1."+JP:"";var rT=function(e){return!!nT&&nT in e},oT=Function.prototype.toString;var aT=function(e){if(null!=e){try{return oT.call(e)}catch(e){}try{return e+""}catch(e){}}return""},iT=/^\[object .+?Constructor\]$/,sT=Function.prototype,lT=Object.prototype,uT=sT.toString,cT=lT.hasOwnProperty,dT=RegExp("^"+uT.call(cT).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var fT=function(e){return!(!ZP(e)||rT(e))&&(eT(e)?dT:iT).test(aT(e))};var pT=function(e,t){return null==e?void 0:e[t]};var hT=function(e,t){var n=pT(e,t);return fT(n)?n:void 0},mT=hT(MP,"WeakMap");var gT=function(){};var yT=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1};var vT=function(e){return e!=e};var bT=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1};var wT=function(e,t,n){return t==t?bT(e,t,n):yT(e,vT,n)};var xT=function(e,t){return!!(null==e?0:e.length)&&wT(e,t,0)>-1},ST=/^(?:0|[1-9]\d*)$/;var CT=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ST.test(e))&&e>-1&&e%1==0&&e<t};var kT=function(e,t){return e===t||e!=e&&t!=t};var _T=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991};var ET=function(e){return null!=e&&_T(e.length)&&!eT(e)},jT=Object.prototype;var OT=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||jT)};var NT=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var RT=function(e){return WP(e)&&"[object Arguments]"==UP(e)},PT=Object.prototype,TT=PT.hasOwnProperty,DT=PT.propertyIsEnumerable,MT=RT(function(){return arguments}())?RT:function(e){return WP(e)&&TT.call(e,"callee")&&!DT.call(e,"callee")},IT=MT;var AT=function(){return!1},FT="object"==typeof e&&e&&!e.nodeType&&e,LT=FT&&"object"==typeof module&&module&&!module.nodeType&&module,zT=LT&&LT.exports===FT?MP.Buffer:void 0,$T=(zT?zT.isBuffer:void 0)||AT,HT={};HT["[object Float32Array]"]=HT["[object Float64Array]"]=HT["[object Int8Array]"]=HT["[object Int16Array]"]=HT["[object Int32Array]"]=HT["[object Uint8Array]"]=HT["[object Uint8ClampedArray]"]=HT["[object Uint16Array]"]=HT["[object Uint32Array]"]=!0,HT["[object Arguments]"]=HT["[object Array]"]=HT["[object ArrayBuffer]"]=HT["[object Boolean]"]=HT["[object DataView]"]=HT["[object Date]"]=HT["[object Error]"]=HT["[object Function]"]=HT["[object Map]"]=HT["[object Number]"]=HT["[object Object]"]=HT["[object RegExp]"]=HT["[object Set]"]=HT["[object String]"]=HT["[object WeakMap]"]=!1;var VT=function(e){return WP(e)&&_T(e.length)&&!!HT[UP(e)]};var BT=function(e){return function(t){return e(t)}},UT="object"==typeof e&&e&&!e.nodeType&&e,WT=UT&&"object"==typeof module&&module&&!module.nodeType&&module,qT=WT&&WT.exports===UT&&TP.process,YT=function(){try{var e=WT&&WT.require&&WT.require("util").types;return e||qT&&qT.binding&&qT.binding("util")}catch(e){}}(),GT=YT&&YT.isTypedArray,KT=GT?BT(GT):VT,QT=Object.prototype.hasOwnProperty;var XT=function(e,t){var n=GP(e),r=!n&&IT(e),o=!n&&!r&&$T(e),a=!n&&!r&&!o&&KT(e),i=n||r||o||a,s=i?NT(e.length,String):[],l=s.length;for(var u in e)!t&&!QT.call(e,u)||i&&("length"==u||o&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||CT(u,l))||s.push(u);return s};var ZT=function(e,t){return function(n){return e(t(n))}},JT=ZT(Object.keys,Object),eD=Object.prototype.hasOwnProperty;var tD=function(e){if(!OT(e))return JT(e);var t=[];for(var n in Object(e))eD.call(e,n)&&"constructor"!=n&&t.push(n);return t};var nD=function(e){return ET(e)?XT(e):tD(e)},rD=hT(Object,"create");var oD=function(){this.__data__=rD?rD(null):{},this.size=0};var aD=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},iD=Object.prototype.hasOwnProperty;var sD=function(e){var t=this.__data__;if(rD){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return iD.call(t,e)?t[e]:void 0},lD=Object.prototype.hasOwnProperty;var uD=function(e){var t=this.__data__;return rD?void 0!==t[e]:lD.call(t,e)};var cD=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=rD&&void 0===t?"__lodash_hash_undefined__":t,this};function dD(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}dD.prototype.clear=oD,dD.prototype.delete=aD,dD.prototype.get=sD,dD.prototype.has=uD,dD.prototype.set=cD;var fD=dD;var pD=function(){this.__data__=[],this.size=0};var hD=function(e,t){for(var n=e.length;n--;)if(kT(e[n][0],t))return n;return-1},mD=Array.prototype.splice;var gD=function(e){var t=this.__data__,n=hD(t,e);return!(n<0)&&(n==t.length-1?t.pop():mD.call(t,n,1),--this.size,!0)};var yD=function(e){var t=this.__data__,n=hD(t,e);return n<0?void 0:t[n][1]};var vD=function(e){return hD(this.__data__,e)>-1};var bD=function(e,t){var n=this.__data__,r=hD(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function wD(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}wD.prototype.clear=pD,wD.prototype.delete=gD,wD.prototype.get=yD,wD.prototype.has=vD,wD.prototype.set=bD;var xD=wD,SD=hT(MP,"Map");var CD=function(){this.size=0,this.__data__={hash:new fD,map:new(SD||xD),string:new fD}};var kD=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var _D=function(e,t){var n=e.__data__;return kD(t)?n["string"==typeof t?"string":"hash"]:n.map};var ED=function(e){var t=_D(this,e).delete(e);return this.size-=t?1:0,t};var jD=function(e){return _D(this,e).get(e)};var OD=function(e){return _D(this,e).has(e)};var ND=function(e,t){var n=_D(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function RD(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}RD.prototype.clear=CD,RD.prototype.delete=ED,RD.prototype.get=jD,RD.prototype.has=OD,RD.prototype.set=ND;var PD=RD;var TD=function(e){return null==e?"":XP(e)};var DD=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e};var MD=function(e){return function(t){return null==e?void 0:e[t]}};var ID=function(){this.__data__=new xD,this.size=0};var AD=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var FD=function(e){return this.__data__.get(e)};var LD=function(e){return this.__data__.has(e)};var zD=function(e,t){var n=this.__data__;if(n instanceof xD){var r=n.__data__;if(!SD||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new PD(r)}return n.set(e,t),this.size=n.size,this};function $D(e){var t=this.__data__=new xD(e);this.size=t.size}$D.prototype.clear=ID,$D.prototype.delete=AD,$D.prototype.get=FD,$D.prototype.has=LD,$D.prototype.set=zD;var HD=$D;var VD=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a};var BD=function(){return[]},UD=Object.prototype.propertyIsEnumerable,WD=Object.getOwnPropertySymbols,qD=WD?function(e){return null==e?[]:(e=Object(e),VD(WD(e),function(t){return UD.call(e,t)}))}:BD;var YD=function(e,t,n){var r=t(e);return GP(e)?r:DD(r,n(e))};var GD=function(e){return YD(e,nD,qD)},KD=hT(MP,"DataView"),QD=hT(MP,"Promise"),XD=hT(MP,"Set"),ZD="[object Map]",JD="[object Promise]",eM="[object Set]",tM="[object WeakMap]",nM="[object DataView]",rM=aT(KD),oM=aT(SD),aM=aT(QD),iM=aT(XD),sM=aT(mT),lM=UP;(KD&&lM(new KD(new ArrayBuffer(1)))!=nM||SD&&lM(new SD)!=ZD||QD&&lM(QD.resolve())!=JD||XD&&lM(new XD)!=eM||mT&&lM(new mT)!=tM)&&(lM=function(e){var t=UP(e),n="[object Object]"==t?e.constructor:void 0,r=n?aT(n):"";if(r)switch(r){case rM:return nM;case oM:return ZD;case aM:return JD;case iM:return eM;case sM:return tM}return t});var uM=lM,cM=MP.Uint8Array;var dM=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var fM=function(e){return this.__data__.has(e)};function pM(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new PD;++t<n;)this.add(e[t])}pM.prototype.add=pM.prototype.push=dM,pM.prototype.has=fM;var hM=pM;var mM=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var gM=function(e,t){return e.has(t)};var yM=function(e,t,n,r,o,a){var i=1&n,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var u=a.get(e),c=a.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,p=2&n?new hM:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var h=e[d],m=t[d];if(r)var g=i?r(m,h,d,t,e,a):r(h,m,d,e,t,a);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!mM(t,function(e,t){if(!gM(p,t)&&(h===e||o(h,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(h!==m&&!o(h,m,n,r,a)){f=!1;break}}return a.delete(e),a.delete(t),f};var vM=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n};var bM=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n},wM=IP?IP.prototype:void 0,xM=wM?wM.valueOf:void 0;var SM=function(e,t,n,r,o,a,i){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new cM(e),new cM(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return kT(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=vM;case"[object Set]":var l=1&r;if(s||(s=bM),e.size!=t.size&&!l)return!1;var u=i.get(e);if(u)return u==t;r|=2,i.set(e,t);var c=yM(s(e),s(t),r,o,a,i);return i.delete(e),c;case"[object Symbol]":if(xM)return xM.call(e)==xM.call(t)}return!1},CM=Object.prototype.hasOwnProperty;var kM=function(e,t,n,r,o,a){var i=1&n,s=GD(e),l=s.length;if(l!=GD(t).length&&!i)return!1;for(var u=l;u--;){var c=s[u];if(!(i?c in t:CM.call(t,c)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var h=i;++u<l;){var m=e[c=s[u]],g=t[c];if(r)var y=i?r(g,m,c,t,e,a):r(m,g,c,e,t,a);if(!(void 0===y?m===g||o(m,g,n,r,a):y)){p=!1;break}h||(h="constructor"==c)}if(p&&!h){var v=e.constructor,b=t.constructor;v==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof b&&b instanceof b||(p=!1)}return a.delete(e),a.delete(t),p},_M="[object Arguments]",EM="[object Array]",jM="[object Object]",OM=Object.prototype.hasOwnProperty;var NM=function(e,t,n,r,o,a){var i=GP(e),s=GP(t),l=i?EM:uM(e),u=s?EM:uM(t),c=(l=l==_M?jM:l)==jM,d=(u=u==_M?jM:u)==jM,f=l==u;if(f&&$T(e)){if(!$T(t))return!1;i=!0,c=!1}if(f&&!c)return a||(a=new HD),i||KT(e)?yM(e,t,n,r,o,a):SM(e,t,l,n,r,o,a);if(!(1&n)){var p=c&&OM.call(e,"__wrapped__"),h=d&&OM.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,g=h?t.value():t;return a||(a=new HD),o(m,g,n,r,a)}}return!!f&&(a||(a=new HD),kM(e,t,n,r,o,a))};var RM=function e(t,n,r,o,a){return t===n||(null==t||null==n||!WP(t)&&!WP(n)?t!=t&&n!=n:NM(t,n,r,o,e,a))};var PM=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},TM=MD({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),DM=/[&<>"']/g,MM=RegExp(DM.source);var IM=function(e){return(e=TD(e))&&MM.test(e)?e.replace(DM,TM):e},AM=/[\\^$.*+?()[\]{}|]/g,FM=RegExp(AM.source);var LM=function(e){return(e=TD(e))&&FM.test(e)?e.replace(AM,"\\$&"):e};var zM=function(e,t){return RM(e,t)},$M=XD&&1/bM(new XD([,-0]))[1]==1/0?function(e){return new XD(e)}:gT,HM=$M;var VM=function(e,t,n){var r=-1,o=xT,a=e.length,i=!0,s=[],l=s;if(n)i=!1,o=PM;else if(a>=200){var u=t?null:HM(e);if(u)return bM(u);i=!1,o=gM,l=new hM}else l=t?[]:s;e:for(;++r<a;){var c=e[r],d=t?t(c):c;if(c=n||0!==c?c:0,i&&d==d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(c)}else o(l,d,n)||(l!==s&&l.push(d),s.push(c))}return s};var BM=function(e){return e&&e.length?VM(e):[]},UM={ENTER:[10,13],TAB:9,BACKSPACE:8,UP_ARROW:38,DOWN_ARROW:40,SPACE:32},WM={ENTER:"Enter",TAB:"Tab",COMMA:",",SPACE:" ",SEMICOLON:";"},qM="Press enter to add new tag",YM="text",GM={tags:"ReactTags__tags",tagInput:"ReactTags__tagInput",tagInputField:"ReactTags__tagInputField",selected:"ReactTags__selected",tag:"ReactTags__tag",remove:"ReactTags__remove",suggestions:"ReactTags__suggestions",activeSuggestion:"ReactTags__activeSuggestion",editTagInput:"ReactTags__editTagInput",editTagInputField:"ReactTags__editTagInputField",clearAll:"ReactTags__clearAll"},KM="inline",QM="top",XM="bottom",ZM="Tag limit reached!";function JM(e){const{moveTag:t,readOnly:n,allowDragDrop:r}=e;return void 0!==t&&!n&&r}var eI=e=>{const{readOnly:t,removeComponent:n,onRemove:r,className:o,tag:a,index:i}=e,s=e=>{if(UM.ENTER.includes(e.keyCode)||e.keyCode===UM.SPACE)return e.preventDefault(),void e.stopPropagation();e.keyCode===UM.BACKSPACE&&r(e)};if(t)return m.jsx("span",{});const l=`Tag at index ${i} with value ${a.id} focussed. Press backspace to remove`;if(n){const e=n;return m.jsx(e,{"data-testid":"remove",onRemove:r,onKeyDown:s,className:o,"aria-label":l,tag:a,index:i})}return m.jsx("button",{"data-testid":"remove",onClick:r,onKeyDown:s,className:o,type:"button","aria-label":l,children:m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",height:"12",width:"12",fill:"#fff",children:m.jsx("path",{d:"M376.6 84.5c11.3-13.6 9.5-33.8-4.1-45.1s-33.8-9.5-45.1 4.1L192 206 56.6 43.5C45.3 29.9 25.1 28.1 11.5 39.4S-3.9 70.9 7.4 84.5L150.3 256 7.4 427.5c-11.3 13.6-9.5 33.8 4.1 45.1s33.8 9.5 45.1-4.1L192 306 327.4 468.5c11.3 13.6 31.5 15.4 45.1 4.1s15.4-31.5 4.1-45.1L233.7 256 376.6 84.5z"})})})},tI="tag",nI=e=>{const t=D.useRef(null),{readOnly:n=!1,tag:r,classNames:o,index:a,moveTag:i,allowDragDrop:s=!0,labelField:l="text",tags:u}=e,[{isDragging:c},d]=GR(()=>({type:tI,collect:e=>({isDragging:!!e.isDragging()}),item:e,canDrag:()=>JM({moveTag:i,readOnly:n,allowDragDrop:s})}),[u]),[,f]=ZR(()=>({accept:tI,drop:t=>{const n=t.index,r=a;n!==r&&e?.moveTag?.(n,r)},canDrop:e=>function(e){const{readOnly:t,allowDragDrop:n}=e;return!t&&n}(e)}),[u]);d(f(t));const p=e.tag[l],{className:h=""}=r,g=c?0:1;return m.jsxs("span",{ref:t,className:(0,PP.default)("tag-wrapper",o.tag,h),style:{opacity:g,cursor:JM({moveTag:i,readOnly:n,allowDragDrop:s})?"move":"auto"},"data-testid":"tag",onClick:e.onTagClicked,onTouchStart:e.onTagClicked,children:[p,m.jsx(eI,{tag:e.tag,className:o.remove,removeComponent:e.removeComponent,onRemove:e.onDelete,readOnly:n,index:a})]})},rI=e=>m.jsx("button",{"aria-label":e["aria-label"],className:e.classNames.clearAll,onClick:e.onClick,children:"Clear all"}),oI=(e,t,n,r)=>"function"==typeof r?r(e):e.length>=t&&n,aI=D.memo(e=>{const t=D.createRef(),{labelField:n,minQueryLength:r,isFocused:o,classNames:a,selectedIndex:i,query:s}=e;D.useEffect(()=>{if(!t.current)return;const e=t.current.querySelector(`.${a.activeSuggestion}`);e&&((e,t)=>{const n=t.offsetHeight,r=e.offsetHeight,o=e.offsetTop-t.scrollTop;o+r>=n?t.scrollTop+=o-n+r:o<0&&(t.scrollTop+=o)})(e,t.current)},[i]);const l=(e,t)=>{const r=t.trim().replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&"),{[n]:o}=e;return{__html:o.replace(RegExp(r,"gi"),e=>`<mark>${IM(e)}</mark>`)}},u=(t,n)=>"function"==typeof e.renderSuggestion?e.renderSuggestion(t,n):m.jsx("span",{dangerouslySetInnerHTML:l(t,n)}),c=e.suggestions.map((t,n)=>m.jsx("li",{onMouseDown:e.handleClick.bind(null,n),onTouchStart:e.handleClick.bind(null,n),onMouseOver:e.handleHover.bind(null,n),className:n===e.selectedIndex?e.classNames.activeSuggestion:"",children:u(t,e.query)},n));return 0!==c.length&&oI(s,r||2,o,e.shouldRenderSuggestions)?m.jsx("div",{ref:t,className:a.suggestions,"data-testid":"suggestions",children:m.jsxs("ul",{children:[" ",c," "]})}):null},(e,t)=>{const{query:n,minQueryLength:r=2,isFocused:o,suggestions:a}=t;return!(e.isFocused!==o||!zM(e.suggestions,a)||oI(n,r,o,t.shouldRenderSuggestions)!==oI(e.query,e.minQueryLength??2,e.isFocused,e.shouldRenderSuggestions)||e.selectedIndex!==t.selectedIndex)}),iI=aI,sI=NP(RP()),lI=e=>{const{autofocus:t,autoFocus:n,readOnly:r,labelField:o,allowDeleteFromEmptyInput:a,allowAdditionFromPaste:i,allowDragDrop:s,minQueryLength:l,shouldRenderSuggestions:u,removeComponent:c,autocomplete:d,inline:f,maxTags:p,allowUnique:h,editable:g,placeholder:y,delimiters:v,separators:b,tags:w,inputFieldPosition:x,inputProps:S,classNames:C,maxLength:k,inputValue:_,clearAll:E,ariaAttrs:j}=e,[O,N]=D.useState(e.suggestions),[R,P]=D.useState(""),[T,M]=D.useState(!1),[I,A]=D.useState(-1),[F,L]=D.useState(!1),[z,$]=D.useState(""),[H,V]=D.useState(-1),[B,U]=D.useState(""),W=D.createRef(),q=D.useRef(null),Y=D.useRef(null);D.useEffect(()=>{v.length&&console.warn("[Deprecation] The delimiters prop is deprecated and will be removed in v7.x.x, please use separators instead. If you have any concerns regarding this, please share your thoughts in https://github.com/react-tags/react-tags/issues/960")},[]),D.useEffect(()=>{void 0!==f&&console.warn("[Deprecation] The inline attribute is deprecated and will be removed in v7.x.x, please use inputFieldPosition instead.")},[f]),D.useEffect(()=>{void 0!==t&&console.warn("[Deprecated] autofocus prop will be removed in 7.x so please migrate to autoFocus prop."),(t||n&&!1!==t)&&!r&&Q()},[n,n,r]),D.useEffect(()=>{ee()},[R,e.suggestions]);const G=t=>{let n=e.suggestions.slice();if(h){const e=w.map(e=>e.id.trim().toLowerCase());n=n.filter(t=>!e.includes(t.id.toLowerCase()))}if(e.handleFilterSuggestions)return e.handleFilterSuggestions(t,n);const r=n.filter(e=>0===K(t,e)),o=n.filter(e=>K(t,e)>0);return r.concat(o)},K=(e,t)=>t[o].toLowerCase().indexOf(e.toLowerCase()),Q=()=>{P(""),q.current&&(q.current.value="",q.current.focus())},X=(t,n)=>{n.preventDefault(),n.stopPropagation();const r=w.slice();0!==r.length&&(U(""),e?.handleDelete?.(t,n),Z(t,r))},Z=(e,t)=>{if(!W?.current)return;const n=W.current.querySelectorAll(".ReactTags__remove");let r="";0===e&&t.length>1?(r=`Tag at index ${e} with value ${t[e].id} deleted. Tag at index 0 with value ${t[1].id} focussed. Press backspace to remove`,n[0].focus()):e>0?(r=`Tag at index ${e} with value ${t[e].id} deleted. Tag at index ${e-1} with value ${t[e-1].id} focussed. Press backspace to remove`,n[e-1].focus()):(r=`Tag at index ${e} with value ${t[e].id} deleted. Input focussed. Press enter to add a new tag`,q.current?.focus()),$(r)},J=t=>{e.handleInputChange&&e.handleInputChange(t.target.value,t);const n=t.target.value.trim();P(n)},ee=()=>{const e=G(R);N(e),A(I>=e.length?e.length-1:I)},te=t=>{const n=t.target.value;e.handleInputFocus&&e.handleInputFocus(n,t),M(!0)},ne=t=>{const n=t.target.value;e.handleInputBlur&&(e.handleInputBlur(n,t),q.current&&(q.current.value="")),M(!1),V(-1)},re=e=>{if(!e.nativeEvent.isComposing){if("Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),A(-1),L(!1),N([]),V(-1)),(-1!==b.indexOf(e.key)||-1!==v.indexOf(e.keyCode))&&!e.shiftKey){e.keyCode===UM.TAB&&""===R||e.preventDefault();const t=F&&-1!==I?O[I]:{id:R.trim(),[o]:R.trim(),className:""};Object.keys(t)&&ie(t)}"Backspace"!==e.key||""!==R||!a&&x!==KM||X(w.length-1,e),e.keyCode===UM.UP_ARROW&&(e.preventDefault(),A(I<=0?O.length-1:I-1),L(!0)),e.keyCode===UM.DOWN_ARROW&&(e.preventDefault(),L(!0),0===O.length?A(-1):A((I+1)%O.length))}},oe=()=>p&&w.length>=p,ae=t=>{if(!i)return;if(oe())return U(ZM),void Q();U(""),t.preventDefault();const n=t.clipboardData||window.clipboardData,r=n.getData("text"),{maxLength:a=r.length}=e,s=Math.min(a,r.length),l=n.getData("text").substr(0,s);let u=v;b.length&&(u=[],b.forEach(e=>{const t=function(e){switch(e){case WM.ENTER:return[10,13];case WM.TAB:return 9;case WM.COMMA:return 188;case WM.SPACE:return 32;case WM.SEMICOLON:return 186;default:return 0}}(e);Array.isArray(t)?u=[...u,...t]:u.push(t)}));const c=function(e){const t=e.map(e=>{const t=e-48*Math.floor(e/48);return String.fromCharCode(96<=e?t:e)}).join(""),n=LM(t);return new RegExp(`[${n}]+`)}(u),d=l.split(c).map(e=>e.trim());BM(d).forEach(e=>ie({id:e.trim(),[o]:e.trim(),className:""}))},ie=t=>{if(!t.id||!t[o])return;if(-1===H){if(oe())return U(ZM),void Q();U("")}const n=w.map(e=>e.id.toLowerCase());if(!(h&&n.indexOf(t.id.trim().toLowerCase())>=0)){if(d){const e=G(t[o]);console.warn("[Deprecation] The autocomplete prop will be removed in 7.x to simplify the integration and make it more intutive. If you have any concerns regarding this, please share your thoughts in https://github.com/react-tags/react-tags/issues/949"),(1===d&&1===e.length||!0===d&&e.length)&&(t=e[0])}-1!==H&&e.onTagUpdate?e.onTagUpdate(H,t):e?.handleAddition?.(t),P(""),L(!1),A(-1),V(-1),Q()}},se=(t,n)=>{const r=w[t];e?.handleDrag?.(r,t,n)},le=(()=>{const t={...GM,...e.classNames};return w.map((n,a)=>m.jsx(D.Fragment,{children:H===a?m.jsx("div",{className:t.editTagInput,children:m.jsx("input",{ref:e=>{Y.current=e},onFocus:te,value:R,onChange:J,onKeyDown:re,onBlur:ne,className:t.editTagInputField,onPaste:ae,"data-testid":"tag-edit"})}):m.jsx(nI,{index:a,tag:n,tags:w,labelField:o,onDelete:e=>X(a,e),moveTag:s?se:void 0,removeComponent:c,onTagClicked:t=>((t,n,a)=>{r||(g&&(V(t),P(n[o]),Y.current?.focus()),e.handleTagClick?.(t,a))})(a,n,t),readOnly:r,classNames:t,allowDragDrop:s})},a))})(),ue={...GM,...C},{name:ce,id:de}=e,fe=!1===f?XM:x,pe=r?null:m.jsxs("div",{className:ue.tagInput,children:[m.jsx("input",{...S,ref:e=>{q.current=e},className:ue.tagInputField,type:"text",placeholder:y,"aria-label":y,onFocus:te,onBlur:ne,onChange:J,onKeyDown:re,onPaste:ae,name:ce,id:de,maxLength:k,value:_,"data-automation":"input","data-testid":"input"}),m.jsx(iI,{query:R.trim(),suggestions:O,labelField:o,selectedIndex:I,handleClick:e=>{ie(O[e])},handleHover:e=>{A(e),L(!0)},minQueryLength:l,shouldRenderSuggestions:u,isFocused:T,classNames:ue,renderSuggestion:e.renderSuggestion}),E&&w.length>0&&m.jsx(rI,{"aria-label":j?.clearAllLabel,classNames:ue,onClick:()=>{e.onClearAll&&e.onClearAll(),U(""),Q()}}),B&&m.jsxs("div",{"data-testid":"error",className:"ReactTags__error",children:[m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",height:"24",width:"24",fill:"#e03131",children:m.jsx("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"})}),B]})]});return m.jsxs("div",{className:(0,sI.default)(ue.tags,"react-tags-wrapper"),ref:W,children:[m.jsx("p",{role:"alert",className:"sr-only",style:{position:"absolute",overflow:"hidden",clip:"rect(0 0 0 0)",margin:"-1px",padding:0,width:"1px",height:"1px",border:0},children:z}),fe===QM&&pe,m.jsxs("div",{className:ue.selected,children:[le,fe===KM&&pe]}),fe===XM&&pe]})},uI=e=>{const{placeholder:t=qM,labelField:n=YM,suggestions:r=[],delimiters:o=[],separators:a=(e.delimiters?.length?[]:[WM.ENTER,WM.TAB]),autofocus:i,autoFocus:s=!0,inline:l,inputFieldPosition:u="inline",allowDeleteFromEmptyInput:c=!1,allowAdditionFromPaste:d=!0,autocomplete:f=!1,readOnly:p=!1,allowUnique:h=!0,allowDragDrop:g=!0,tags:y=[],inputProps:v={},editable:b=!1,clearAll:w=!1,ariaAttrs:x={clearAllLabel:"clear all tags"},handleDelete:S,handleAddition:C,onTagUpdate:k,handleDrag:_,handleFilterSuggestions:E,handleTagClick:j,handleInputChange:O,handleInputFocus:N,handleInputBlur:R,minQueryLength:P,shouldRenderSuggestions:T,removeComponent:D,onClearAll:M,classNames:I,name:A,id:F,maxLength:L,inputValue:z,maxTags:$,renderSuggestion:H}=e;return m.jsx(lI,{placeholder:t,labelField:n,suggestions:r,delimiters:o,separators:a,autofocus:i,autoFocus:s,inline:l,inputFieldPosition:u,allowDeleteFromEmptyInput:c,allowAdditionFromPaste:d,autocomplete:f,readOnly:p,allowUnique:h,allowDragDrop:g,tags:y,inputProps:v,editable:b,clearAll:w,ariaAttrs:x,handleDelete:S,handleAddition:C,onTagUpdate:k,handleDrag:_,handleFilterSuggestions:E,handleTagClick:j,handleInputChange:O,handleInputFocus:N,handleInputBlur:R,minQueryLength:P,shouldRenderSuggestions:T,removeComponent:D,onClearAll:M,classNames:I,name:A,id:F,maxLength:L,inputValue:z,maxTags:$,renderSuggestion:H})},cI=({...e})=>m.jsx(CR,{backend:wP,children:m.jsx(uI,{...e})});
224
224
  /*! Bundled license information:
225
225
 
226
226
  classnames/index.js:
@@ -241,5 +241,5 @@ to {
241
241
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
242
242
  *)
243
243
  */
244
- function dI({label:e,labelClass:t,required:n,info:r,placeholder:o,setTagArray:a,values:i=[]}){const s=i?.map(e=>({id:"1",text:e??"example",className:""})),[l,u]=D.useState(s);return D.useEffect(()=>{const e=l.map(e=>e.text);a&&a(e)},[l]),m.jsxs("div",{className:"space-y-3",children:[e&&m.jsxs("label",{className:Ko("text-dark flex items-center gap-1 first-letter:uppercase text-sm font-medium",t),children:[e," ",n&&m.jsx("span",{className:"text-[#E12D39]",children:e&&"*"}),r&&m.jsx(kv,{fieldName:e,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:r})})]}),m.jsx("div",{className:"border rounded-md px-4 py-2 bg-white border-gray-300",children:m.jsx(cI,{tags:l,handleDelete:e=>{u(l.filter((t,n)=>n!==e))},separators:[WM.ENTER,WM.COMMA],onTagUpdate:(e,t)=>{const n=[...l];n.splice(e,1,t),u(n)},editable:!0,placeholder:o,allowDeleteFromEmptyInput:!0,allowDragDrop:!1,onClearAll:()=>{u([])},handleAddition:e=>{u([...l,e])},handleTagClick:e=>{console.log("The tag at index "+e+" was clicked")},inputFieldPosition:"inline"})})]})}function fI({isOpen:e,onClose:t}){const{mutate:n,isPending:r}=ex(),[o,a]=D.useState([]),i=En();return m.jsx(XC,{isOpen:e,onClose:t,title:"New Tag",className:"w-[425px] pb-5",children:m.jsxs("form",{className:"space-y-5",onSubmit:e=>{e.preventDefault(),n({url:"/inventory_metas/tags/create",payload:{names:o}},{onSuccess:()=>{i.invalidateQueries({queryKey:["itemtags"]}),t&&t()}})},action:"",children:[m.jsx("div",{className:"px-5 space-y-5",children:m.jsx(dI,{info:"Enter a name for the tag. Tags help categorize items and make them easier to search for.",label:"Tag names ",required:!0,values:o||[],setTagArray:a})}),m.jsx(gS,{}),m.jsxs("div",{className:"flex justify-end gap-2.5 px-5",children:[m.jsx(IE,{label:"Dismiss",className:"px-4 bg-gray-300 text-gray-900 hover:bg-gray-400",onClick:t,disabled:r}),m.jsx(IE,{loading:r,label:"Create",className:"px-4",type:"submit"})]})]})})}function pI({isOpen:e,onClose:t}){const{mutate:n,isPending:r}=ex(),[o,a]=D.useState(""),{apiKey:i}=Dn(),[s,l]=D.useState({name:"",description:"",abbreviation:"",item_type_uuid:"",is_decimal:!!o.match("yes")}),u=(e,t)=>{l({...s,[e]:t})},{data:c}=Jw(["itemtypes",i],"/inventory_metas/types",{enabled:!!i}),d=c?.data?.data?.filter(e=>"products"===e.name||"services"===e.name)?.map(e=>({label:e.name,value:e.uuid})),f=En();return m.jsx(XC,{isOpen:e,onClose:t,title:"New Unit",className:"w-[425px]",children:m.jsxs("div",{className:"px-5 space-y-5 pb-5",children:[m.jsx(iO,{type:"text",placeholder:"e.g Kilogram",info:"Enter the name of the unit used to measure this item (e.g., pieces, kg, liters). This helps in tracking inventory accurately.",label:"Unit name ",labelClass:"text-dark font-semibold first-letter:uppercase text-[15px]",value:s.name,onChange:e=>u("name",e.target.value)}),m.jsx(WC,{options:d,label:"Item type",placeholder:"select type",value:s.item_type_uuid,onValueChange:e=>u("item_type_uuid",e),info:"Select the type of item you are adding (e.g., product, service). This helps in categorizing and managing inventory efficiently.",labelClass:"text-dark font-bold"}),m.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[m.jsx(iO,{type:"text",placeholder:"e.g KG",info:"Enter a short form or symbol for the unit name (e.g., kg for kilograms, pcs for pieces). This will be used for display in reports and transactions.",label:"Abbreviation",labelClass:"text-dark font-semibold first-letter:uppercase text-[15px]",value:s.abbreviation,onChange:e=>u("abbreviation",e.target.value)}),m.jsx(WC,{options:[{label:"Yes ",value:"yes"},{label:"No ",value:"no"}],label:"Allow decimal",placeholder:"Yes/ No",value:o,onValueChange:e=>a(e),info:"Enable this option if the unit can have decimal values (e.g., 2.5 kg, 1.75 liters). Disable it for whole number quantities only.",infoAlignment:"end",labelClass:"text-dark font-semibold text-[15px]",showSearch:!1})]}),m.jsx("div",{className:"flex justify-end gap-2.5",children:m.jsx(IE,{onClick:()=>{n({url:"/inventory_metas/units/create",payload:s},{onSuccess:()=>{f.invalidateQueries({queryKey:["itemunits"]}),l({name:"",description:"",abbreviation:"",item_type_uuid:"",is_decimal:!!o.match("yes")}),t&&t()}})},loading:r,label:"Create",className:"px-4"})})]})})}function hI({isOpen:e,onClose:t}){const{mutate:n,isPending:r}=ex(),o=En(),{apiKey:a}=Dn(),{data:i}=Jw(["categories",a],"/inventory_metas/categories",{enabled:!!a}),{data:s}=Jw(["itemunits",a],"/inventory_metas/units",{enabled:!!a}),{data:l}=Jw(["itemtags",a],"/inventory_metas/tags",{enabled:!!a}),{data:u}=Jw(["itemtypes",a],"/inventory_metas/types",{enabled:!!a}),c=i?.data?.data?.map(e=>({label:e.name,value:e.uuid,subOptions:e.subCategories.map(e=>({label:e.name,value:e.uuid}))}))||[],d=s?.data?.data?.map(e=>({label:e.name,value:e.uuid}))||[],f=l?.data?.data?.map(e=>({label:e.name,value:e.uuid})),p=u?.data?.data?.filter(e=>"products"===e.name||"services"===e.name).map(e=>({label:e.name,value:e.uuid}))||[],[h,g]=D.useState(""),[y,v]=M.useState([]),[b,w]=D.useState(p?.[0]?.value||"");D.useEffect(()=>{const e=p.find(e=>e?.value===b)?.label||"";g(e)},[b]);const[x,S]=D.useState([]),[C,k]=D.useState([{name:"",itemunit_id:d?.[0]?.value||"",quantity:"",cost_price:"",selling_price:"",barcode:""}]),_=(e,t,n)=>{const r=[...C];r[n]={...r[n],[e]:t},k(r)},E={itemtype_id:b,itemcategory_id:y,tags:x,items:C},j=["Item name","Item unit",..."services"!==h?["Quantity","Barcode"]:[],"Cost price (₦)","Selling price (₦)"],[O,N]=D.useState(!1),[R,P]=D.useState(!1);return m.jsxs(XC,{isOpen:e,onClose:t,title:"Quick create multiple items",className:"max-w-5xl",children:[m.jsxs("div",{className:"px-5 space-y-7 pb-5",children:[m.jsxs("div",{className:"grid grid-cols-3 gap-5 bg-gray-100 rounded-xl p-4",children:[m.jsx(WC,{label:"Item type",options:p,placeholder:"select item type",value:b,onValueChange:e=>w(e),required:!0,info:"Select the type of item you're creating (e.g., product, service, variations, kits ). This classification helps determine how the item is managed, displayed, or fulfilled."}),m.jsx(kO,{placeholder:"select categories",label:"Category",options:c,values:y,onChange:e=>v(e),showMultiSelectValues:!1,showCount:!0,info:"Select the category that best describes this item(s) (e.g., electronics, clothing, food). Categorizing items helps in organizing inventory and simplifies product management."}),m.jsx(uN,{label:"Item tag",placeholder:"Search and Select item tags",info:"Enter relevant keywords or labels for this item(s). Tags help in categorizing and making the item easier to find through search filters.",labelClass:"text-dark text-sm",options:f,values:x,onChange:S,showSearch:!0,showCount:!0,showMultiSelectValues:!1,actionLabel:"Create a new tag",actionLabelInfo:"Enter a new tag to help categorize the item. Tags are useful for organizing and making items easily searchable by specific attributes or keywords.",actionLabelAction:()=>N(!0)})]}),m.jsxs("div",{className:"space-y-2 overflow-auto",children:[m.jsxs("table",{className:"table-auto w-full border-separate border-spacing-x-4 border-spacing-y-4",children:[m.jsx("thead",{children:m.jsx("tr",{children:j.map((e,t)=>m.jsx("th",{className:"text-dark text-sm font-medium text-left",children:m.jsxs("p",{className:"flex gap-1",children:[e,1===t?m.jsx(IE,{mode:"text",label:"",left_addon:Jy.plus_squared2,onClick:()=>P(!0),className:" text-sm"}):null]})},t))})}),m.jsx("tbody",{className:"text-dark text-[15px] ",children:C.map((e,t)=>m.jsxs("tr",{children:[m.jsx("td",{className:"",children:m.jsx(iO,{type:"text",placeholder:"Enter item name",value:e.name,onChange:e=>_("name",e.target.value,t)})}),m.jsx("td",{children:m.jsx(WC,{options:d,placeholder:"select item unit",value:e.itemunit_id,onValueChange:e=>_("itemunit_id",e,t)})}),"services"!==h?m.jsxs(m.Fragment,{children:[m.jsx("td",{className:"",children:m.jsx(iO,{type:"number",placeholder:"0",value:e.quantity,onChange:e=>_("quantity",e.target.value,t)})}),m.jsx("td",{className:"",children:m.jsx(iO,{type:"text",placeholder:"Enter barcode",value:e.barcode,onChange:e=>_("barcode",e.target.value,t)})})]}):null,m.jsx("td",{className:"",children:m.jsx(iO,{type:"number",placeholder:"0.00",value:e.cost_price,onChange:e=>_("cost_price",e.target.value,t)})}),m.jsx("td",{className:"",children:m.jsx(iO,{type:"number",placeholder:"0.00",value:e.selling_price,onChange:e=>_("selling_price",e.target.value,t)})}),m.jsx("td",{className:"",children:m.jsx("button",{onClick:()=>(e=>{const t=C.filter((t,n)=>n!==e);k(t)})(t),disabled:1===C.length,className:"disabled:cursor-not-allowed disabled:opacity-70",children:Jy.trash2})})]},t))})]}),m.jsx("div",{className:"flex justify-between items-center gap-3",children:m.jsx(IE,{mode:"text",label:"Add more",left_addon:Jy.plus_squared2,onClick:()=>{k(e=>[...e,{name:"",itemunit_id:d?.[0]?.value||"",quantity:"",cost_price:"",selling_price:"",barcode:""}])},className:"font-medium text-sm ml-4"})})]})]}),m.jsxs("div",{className:"flex justify-between items-center px-5 sticky bottom-0 bg-white py-5 border-t ",children:[m.jsxs("button",{className:"text-primary text-sm font-medium flex items-center gap-1",children:[Jy.question," Need help?"]}),m.jsxs("div",{className:"flex justify-end gap-2.5",children:[m.jsx(IE,{label:"Cancel",className:"bg-[#F1F1F2] text-[#181C32] hover:bg-[#F1F1F2]/90",onClick:t}),m.jsx(IE,{label:"Create Items",onClick:()=>{n({url:"/items/create_multiple",payload:E},{onSuccess:()=>{o.invalidateQueries({queryKey:["items"]}),t&&t()}})},loading:r})]})]}),m.jsx(fI,{isOpen:O,onClose:()=>N(!1)}),m.jsx(pI,{isOpen:R,onClose:()=>P(!1)})]})}function mI({isOpen:e,onClose:t,currentTab:n,loading:r,filter:o,setFiltering:a}){const[i,s]=D.useState(""),[l]=CO(i,1e3),{apiKey:u}=Dn(),{data:c}=Jw(["categories",u],"/inventory_metas/categories",{enabled:!!u}),{data:d}=Jw(["itemtypes",u],"/inventory_metas/types",{enabled:!!u}),{data:f}=Jw(["itemunits",u],"/inventory_metas/units",{enabled:!!u}),{data:p}=Jw(["suppliers",l],i?`/suppliers/search/${i}/all`:"/suppliers",{enabled:!!u}),{data:h}=Jw(["itembrands"],"/inventory_metas/brands",{enabled:!!u}),g=p?.data?.data?.map(e=>({label:e?.name,value:e?.uuid})),y=h?.data?.data?.map(e=>({label:e.name,value:e.uuid})),[v,b]=D.useState(""),[w]=CO(v,1e3),{data:x}=Jw(["itemtags",u,w],"/inventory_metas/tags",{enabled:!!u&&!!w}),S=x?.data?.data?.map(e=>({label:e.name,value:e.uuid})),C=c?.data?.data.map(e=>({label:e.name,value:e.uuid,subOptions:e.subCategories.map(e=>({label:e.name,value:e.uuid}))})),k=d?.data?.data?.map(e=>({label:e.name,value:e.uuid})),_=f?.data?.data?.map(e=>({label:e.name,value:e.uuid}))||[],[E,j]=D.useState({for:n,category:[],supplier:[],tags:[],brands:[],type:[],unit:[]}),O=(e,t)=>{j(n=>({...n,[e]:t}))};return m.jsx(XC,{isOpen:e,onClose:t,children:m.jsxs("div",{className:"px-7.5",children:[m.jsxs("div",{className:"flex justify-between items-center sticky top-0 py-5 bg-white",children:[m.jsx("h1",{className:"text-gray-900 font-semibold text-lg",children:"Item Filter"}),m.jsxs("button",{className:"text-danger text-sm font-medium inline-flex items-center",onClick:()=>{j({for:n,category:[],supplier:[],tags:[],brands:[],type:[],unit:[]}),a(!1),t&&t()},children:[m.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M11.175 9.99997L14.1667 7.0333C14.3258 6.87196 14.4143 6.65401 14.4128 6.42741C14.4112 6.2008 14.3197 5.98409 14.1583 5.82497C13.997 5.66584 13.779 5.57731 13.5524 5.57888C13.3258 5.58044 13.1091 5.67196 12.95 5.8333L10 8.82497L7.05 5.89163C6.89387 5.73642 6.68266 5.6493 6.4625 5.6493C6.24235 5.6493 6.03114 5.73642 5.875 5.89163C5.79689 5.9691 5.7349 6.06127 5.69259 6.16282C5.65028 6.26437 5.6285 6.37329 5.6285 6.4833C5.6285 6.59331 5.65028 6.70223 5.69259 6.80378C5.7349 6.90533 5.79689 6.9975 5.875 7.07497L8.825 9.99997L5.83333 12.9666C5.6742 13.128 5.58568 13.3459 5.58725 13.5725C5.58881 13.7991 5.68033 14.0158 5.84167 14.175C6.00301 14.3341 6.22095 14.4226 6.44756 14.4211C6.67417 14.4195 6.89087 14.328 7.05 14.1666L10 11.175L12.95 14.1083C13.1061 14.2635 13.3173 14.3506 13.5375 14.3506C13.7577 14.3506 13.9689 14.2635 14.125 14.1083C14.2031 14.0308 14.2651 13.9387 14.3074 13.8371C14.3497 13.7356 14.3715 13.6266 14.3715 13.5166C14.3715 13.4066 14.3497 13.2977 14.3074 13.1962C14.2651 13.0946 14.2031 13.0024 14.125 12.925L11.175 9.99997Z",fill:"#F1416C"})}),"Reset"," "]})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-5",children:[m.jsx(kO,{options:C,label:"Categories",placeholder:"Select categories",values:E.category,onChange:e=>O("category",e),labelClass:"text-dark font-medium",className:"col-span-2",showMultiSelectValues:!1,showCount:!0}),m.jsx(uN,{options:g,label:"Supplier",placeholder:"Select Suppliers",values:E.supplier,onChange:e=>O("supplier",e),labelClass:"text-dark font-medium",className:"col-span-2",showMultiSelectValues:!1,showCount:!0,onChangeSearch:e=>s(e.target.value)}),m.jsx(uN,{options:k,label:"Item types",placeholder:"Select types",values:E.type,onChange:e=>O("type",e),labelClass:"text-dark font-medium",showMultiSelectValues:!1,showCount:!0}),m.jsx(uN,{options:_,label:"Item units",placeholder:"Select item unit",values:E.unit,onChange:e=>O("unit",e),labelClass:"text-dark font-medium",showMultiSelectValues:!1,showCount:!0}),m.jsx(uN,{options:y,label:"Item brands",placeholder:"Select item brands",values:E.brands,onChange:e=>O("brands",e),labelClass:"text-dark font-medium",showMultiSelectValues:!1,showCount:!0}),m.jsx(uN,{options:S,label:"Item tag",placeholder:"Select item tag",values:E.tags,onChange:e=>O("tags",e),labelClass:"text-dark font-medium",showMultiSelectValues:!1,showCount:!0,onChangeSearch:e=>b(e.target.value)})]}),m.jsxs("div",{className:"flex justify-end gap-2.5 sticky bottom-0 py-5 bg-white",children:[m.jsx(IE,{label:"Cancel",className:"bg-[#F1F1F2] text-[#181C32] hover:bg-[#F1F1F2]/90",onClick:t,disabled:r}),m.jsx(IE,{label:"Apply filter",onClick:()=>o(E),loading:r})]})]})})}let gI={};function yI(e){gI=e}const vI={inventory:({showStats:e=!0})=>{const[t,n]=M.useState(),{currentPage:r,perview:o,inline_update:a}=ne(e=>e.app),[i,s]=D.useState("all"),[l,u]=D.useState(!1),[c,d]=D.useState("all"),[f,p]=D.useState(""),[h]=CO(f,1e3),[g,y]=D.useState(!1),{apiKey:v}=Dn(),{mutate:b,isPending:w}=ex(),{data:x,isFetching:S}=Jw(["items",o.toString(),r?.toString(),i,h,v],h?`/items/search?page=${r}&paginate=${o}&param=${h}&for=${i}&filter=all`:`/items?page=${r}&paginate=${o}&status=${i}`,{enabled:!!v}),[C,k]=D.useState(),_=e=>{y(!0),b({url:`/inventory/item/filter?page=${r}&perview=${o}`,payload:e},{onSuccess(e,t,n){k(e),u(!1)}})},[E,j]=D.useState({for:i,category:[],supplier:[],tags:[],brands:[],type:[],unit:[]});M.useEffect(()=>{g&&!f&&_(E)},[f,a,o,r,S]);const O=g?C?.data[0]:x?.data?.[0]||[],N=O?.data?.map(e=>({item_description:e?.name,all_quantity:+e?.all_quantity,other_locations:e?.other_locations,itemcode:e?.itemcode,quantity:+e?.quantity,type:e?.item_type?.name,selling_price:+e?.selling_price,categories:e?.category||[],tags:e?.item_tags?.map(e=>e.name)||[],status:e?.status?"published":"draft",sku:e?.sku,item_image:e.images?.length>0?e.images?.[0].image:rS,barcode:e?.barcode,expired:e?.expired,expiring:e?.expiring,unit:e?.item_unit,uuid:e?.uuid,item_type_id:e?.item_type?.uuid,reorder_level:e?.reorder_level,fullData:e}))||[],{data:R,isFetching:P}=Jw(["items-tab"],"/items/count",{enabled:!!v}),T=R?.data,I=[{label:"all",count:T?.all||0,action:()=>s("all")},{label:"published",count:T?.published||0,action:()=>s("published")},{label:"out of stock",count:T?.out_of_stock||0,action:()=>s("out_of_stock")},{label:"draft",count:T?.draft||0,action:()=>s("draft")},{label:"expiring",count:T?.expiring||0,action:()=>s("expiring")},{label:"expired",count:T?.expired||0,action:()=>s("expired")}],[A,F]=D.useState(!1);return m.jsxs(tS,{className:"px-4 py-6 flex flex-col gap-8",children:[m.jsx(KC,{tabs:I,loading:S}),m.jsxs("div",{className:" flex items-center justify-between flex-wrap gap-4",children:[m.jsxs("div",{className:"flex items-center gap-2.5",children:[m.jsx(xO,{placeholder:"Search Item name, barcode or sku",value:f,onChange:e=>p(e.target.value)}),S?m.jsx(na,{className:"w-20 h-6"}):m.jsxs("p",{className:"text-dark text-sm font-medium",children:[O?.meta?.total??0," ",m.jsx("span",{className:"text-gray-700",children:"Items"})]})]}),m.jsxs("div",{className:"flex gap-4",children:[m.jsx(IE,{label:"Filter",left_addon:M.cloneElement(Jy.filter_edit,{fill:"#5E6278"}),onClick:()=>u(!0),className:"font-medium bg-gray-200 hover:bg-gray-300 text-gray-700 text-sm h-12"}),m.jsx(IE,{label:"Create New",left_addon:Jy.plus_squared,className:"font-medium text-sm h-12",onClick:()=>F(!0)})]})]}),e?m.jsx(wO,{loading:S,data:x?.data?.[1],meta:O?.meta}):null,m.jsx(nv,{loading:S,columns:lO,data:N,emptyData:0===N.length,emptyProps:{header:"No item yet",subText:"Add new item to start managing your inventory."},tHeadClass:"whitespace-nowrap",tbCellClass:"text-dark font-semibold",meta:O?.meta}),m.jsx(mI,{isOpen:l,onClose:()=>u(!1),currentTab:i,loading:w,filter:e=>{_(e),j(e)},setFiltering:y}),A?m.jsx(hI,{isOpen:A,onClose:()=>F(!1)}):null]})}};async function bI(e,t,n={}){const r=vI[e];if(!r)return void console.error(`SimpooSDK: Widget "${e}" not found.`);const o=document.querySelector(t);if(!o)throw new Error(`Container "${t}" not found!`);try{await new Promise((e,t)=>{const n=document.querySelector("#simpoo-sdk-styles");if(n)return e(n);const r=document.createElement("link");r.id="simpoo-sdk-styles",r.rel="stylesheet",r.href="https://unpkg.com/@simpoobusiness/sdk/dist/simpoo-sdk.css",r.onload=()=>e(r),r.onerror=()=>{document.querySelector(`#${r.id}`)||document.head.appendChild(r),e(r)};const o=setTimeout(()=>{document.querySelector(`#${r.id}`)||document.head.appendChild(r),e(r)},5e3);document.head.appendChild(r),r.addEventListener("load",()=>clearTimeout(o)),r.addEventListener("error",()=>clearTimeout(o))})}catch(e){console.warn("SimpooSDK: stylesheet failed to load, continuing to render.",e)}const a=document.createElement("div");a.className="simpoo-sdk",o.appendChild(a);T.createRoot(a).render(m.jsx(Mn,{apiKey:gI.apiKey||"",children:m.jsx(r,{...n})}))}"undefined"!=typeof window&&(window.SimpooSDK={init:yI,renderWidget:bI}),e.init=yI,e.renderWidget=bI});
244
+ function dI({label:e,labelClass:t,required:n,info:r,placeholder:o,setTagArray:a,values:i=[]}){const s=i?.map(e=>({id:"1",text:e??"example",className:""})),[l,u]=D.useState(s);return D.useEffect(()=>{const e=l.map(e=>e.text);a&&a(e)},[l]),m.jsxs("div",{className:"space-y-3",children:[e&&m.jsxs("label",{className:Ko("text-dark flex items-center gap-1 first-letter:uppercase text-sm font-medium",t),children:[e," ",n&&m.jsx("span",{className:"text-[#E12D39]",children:e&&"*"}),r&&m.jsx(kv,{fieldName:e,children:m.jsx("p",{className:"font-normal first-letter:uppercase",children:r})})]}),m.jsx("div",{className:"border rounded-md px-4 py-2 bg-white border-gray-300",children:m.jsx(cI,{tags:l,handleDelete:e=>{u(l.filter((t,n)=>n!==e))},separators:[WM.ENTER,WM.COMMA],onTagUpdate:(e,t)=>{const n=[...l];n.splice(e,1,t),u(n)},editable:!0,placeholder:o,allowDeleteFromEmptyInput:!0,allowDragDrop:!1,onClearAll:()=>{u([])},handleAddition:e=>{u([...l,e])},handleTagClick:e=>{console.log("The tag at index "+e+" was clicked")},inputFieldPosition:"inline"})})]})}function fI({isOpen:e,onClose:t}){const{mutate:n,isPending:r}=ex(),[o,a]=D.useState([]),i=En();return m.jsx(XC,{isOpen:e,onClose:t,title:"New Tag",className:"w-[425px] pb-5",children:m.jsxs("form",{className:"space-y-5",onSubmit:e=>{e.preventDefault(),n({url:"/inventory_metas/tags/create",payload:{names:o}},{onSuccess:()=>{i.invalidateQueries({queryKey:["itemtags"]}),t&&t()}})},action:"",children:[m.jsx("div",{className:"px-5 space-y-5",children:m.jsx(dI,{info:"Enter a name for the tag. Tags help categorize items and make them easier to search for.",label:"Tag names ",required:!0,values:o||[],setTagArray:a})}),m.jsx(gS,{}),m.jsxs("div",{className:"flex justify-end gap-2.5 px-5",children:[m.jsx(IE,{label:"Dismiss",className:"px-4 bg-gray-300 text-gray-900 hover:bg-gray-400",onClick:t,disabled:r}),m.jsx(IE,{loading:r,label:"Create",className:"px-4",type:"submit"})]})]})})}function pI({isOpen:e,onClose:t}){const{mutate:n,isPending:r}=ex(),[o,a]=D.useState(""),{apiKey:i}=Dn(),[s,l]=D.useState({name:"",description:"",abbreviation:"",item_type_uuid:"",is_decimal:!!o.match("yes")}),u=(e,t)=>{l({...s,[e]:t})},{data:c}=Jw(["itemtypes",i],"/inventory_metas/types",{enabled:!!i}),d=c?.data?.data?.filter(e=>"products"===e.name||"services"===e.name)?.map(e=>({label:e.name,value:e.uuid})),f=En();return m.jsx(XC,{isOpen:e,onClose:t,title:"New Unit",className:"w-[425px]",children:m.jsxs("div",{className:"px-5 space-y-5 pb-5",children:[m.jsx(iO,{type:"text",placeholder:"e.g Kilogram",info:"Enter the name of the unit used to measure this item (e.g., pieces, kg, liters). This helps in tracking inventory accurately.",label:"Unit name ",labelClass:"text-dark font-semibold first-letter:uppercase text-[15px]",value:s.name,onChange:e=>u("name",e.target.value)}),m.jsx(WC,{options:d,label:"Item type",placeholder:"select type",value:s.item_type_uuid,onValueChange:e=>u("item_type_uuid",e),info:"Select the type of item you are adding (e.g., product, service). This helps in categorizing and managing inventory efficiently.",labelClass:"text-dark font-bold"}),m.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[m.jsx(iO,{type:"text",placeholder:"e.g KG",info:"Enter a short form or symbol for the unit name (e.g., kg for kilograms, pcs for pieces). This will be used for display in reports and transactions.",label:"Abbreviation",labelClass:"text-dark font-semibold first-letter:uppercase text-[15px]",value:s.abbreviation,onChange:e=>u("abbreviation",e.target.value)}),m.jsx(WC,{options:[{label:"Yes ",value:"yes"},{label:"No ",value:"no"}],label:"Allow decimal",placeholder:"Yes/ No",value:o,onValueChange:e=>a(e),info:"Enable this option if the unit can have decimal values (e.g., 2.5 kg, 1.75 liters). Disable it for whole number quantities only.",infoAlignment:"end",labelClass:"text-dark font-semibold text-[15px]",showSearch:!1})]}),m.jsx("div",{className:"flex justify-end gap-2.5",children:m.jsx(IE,{onClick:()=>{n({url:"/inventory_metas/units/create",payload:s},{onSuccess:()=>{f.invalidateQueries({queryKey:["itemunits"]}),l({name:"",description:"",abbreviation:"",item_type_uuid:"",is_decimal:!!o.match("yes")}),t&&t()}})},loading:r,label:"Create",className:"px-4"})})]})})}function hI({isOpen:e,onClose:t}){const{mutate:n,isPending:r}=ex(),o=En(),{apiKey:a}=Dn(),{data:i}=Jw(["categories",a],"/inventory_metas/categories",{enabled:!!a}),{data:s}=Jw(["itemunits",a],"/inventory_metas/units",{enabled:!!a}),{data:l}=Jw(["itemtags",a],"/inventory_metas/tags",{enabled:!!a}),{data:u}=Jw(["itemtypes",a],"/inventory_metas/types",{enabled:!!a}),c=i?.data?.data?.map(e=>({label:e.name,value:e.uuid,subOptions:e.subCategories.map(e=>({label:e.name,value:e.uuid}))}))||[],d=s?.data?.data?.map(e=>({label:e.name,value:e.uuid}))||[],f=l?.data?.data?.map(e=>({label:e.name,value:e.uuid})),p=u?.data?.data?.filter(e=>"products"===e.name||"services"===e.name).map(e=>({label:e.name,value:e.uuid}))||[],[h,g]=D.useState(""),[y,v]=M.useState([]),[b,w]=D.useState(p?.[0]?.value||"");D.useEffect(()=>{const e=p.find(e=>e?.value===b)?.label||"";g(e)},[b]);const[x,S]=D.useState([]),[C,k]=D.useState([{name:"",itemunit_id:d?.[0]?.value||"",quantity:"",cost_price:"",selling_price:"",barcode:""}]),_=(e,t,n)=>{const r=[...C];r[n]={...r[n],[e]:t},k(r)},E={itemtype_id:b,itemcategory_id:y,tags:x,items:C},j=["Item name","Item unit",..."services"!==h?["Quantity","Barcode"]:[],"Cost price (₦)","Selling price (₦)"],[O,N]=D.useState(!1),[R,P]=D.useState(!1);return m.jsxs(XC,{isOpen:e,onClose:t,title:"Quick create multiple items",className:"max-w-5xl",children:[m.jsxs("div",{className:"px-5 space-y-7 pb-5",children:[m.jsxs("div",{className:"grid grid-cols-3 gap-5 bg-gray-100 rounded-xl p-4",children:[m.jsx(WC,{label:"Item type",options:p,placeholder:"select item type",value:b,onValueChange:e=>w(e),required:!0,info:"Select the type of item you're creating (e.g., product, service, variations, kits ). This classification helps determine how the item is managed, displayed, or fulfilled."}),m.jsx(kO,{placeholder:"select categories",label:"Category",options:c,values:y,onChange:e=>v(e),showMultiSelectValues:!1,showCount:!0,info:"Select the category that best describes this item(s) (e.g., electronics, clothing, food). Categorizing items helps in organizing inventory and simplifies product management."}),m.jsx(uN,{label:"Item tag",placeholder:"Search and Select item tags",info:"Enter relevant keywords or labels for this item(s). Tags help in categorizing and making the item easier to find through search filters.",labelClass:"text-dark text-sm",options:f,values:x,onChange:S,showSearch:!0,showCount:!0,showMultiSelectValues:!1,actionLabel:"Create a new tag",actionLabelInfo:"Enter a new tag to help categorize the item. Tags are useful for organizing and making items easily searchable by specific attributes or keywords.",actionLabelAction:()=>N(!0)})]}),m.jsxs("div",{className:"space-y-2 overflow-auto",children:[m.jsxs("table",{className:"table-auto w-full border-separate border-spacing-x-4 border-spacing-y-4",children:[m.jsx("thead",{children:m.jsx("tr",{children:j.map((e,t)=>m.jsx("th",{className:"text-dark text-sm font-medium text-left",children:m.jsxs("p",{className:"flex gap-1",children:[e,1===t?m.jsx(IE,{mode:"text",label:"",left_addon:Jy.plus_squared2,onClick:()=>P(!0),className:" text-sm"}):null]})},t))})}),m.jsx("tbody",{className:"text-dark text-[15px] ",children:C.map((e,t)=>m.jsxs("tr",{children:[m.jsx("td",{className:"",children:m.jsx(iO,{type:"text",placeholder:"Enter item name",value:e.name,onChange:e=>_("name",e.target.value,t)})}),m.jsx("td",{children:m.jsx(WC,{options:d,placeholder:"select item unit",value:e.itemunit_id,onValueChange:e=>_("itemunit_id",e,t)})}),"services"!==h?m.jsxs(m.Fragment,{children:[m.jsx("td",{className:"",children:m.jsx(iO,{type:"number",placeholder:"0",value:e.quantity,onChange:e=>_("quantity",e.target.value,t)})}),m.jsx("td",{className:"",children:m.jsx(iO,{type:"text",placeholder:"Enter barcode",value:e.barcode,onChange:e=>_("barcode",e.target.value,t)})})]}):null,m.jsx("td",{className:"",children:m.jsx(iO,{type:"number",placeholder:"0.00",value:e.cost_price,onChange:e=>_("cost_price",e.target.value,t)})}),m.jsx("td",{className:"",children:m.jsx(iO,{type:"number",placeholder:"0.00",value:e.selling_price,onChange:e=>_("selling_price",e.target.value,t)})}),m.jsx("td",{className:"",children:m.jsx("button",{onClick:()=>(e=>{const t=C.filter((t,n)=>n!==e);k(t)})(t),disabled:1===C.length,className:"disabled:cursor-not-allowed disabled:opacity-70",children:Jy.trash2})})]},t))})]}),m.jsx("div",{className:"flex justify-between items-center gap-3",children:m.jsx(IE,{mode:"text",label:"Add more",left_addon:Jy.plus_squared2,onClick:()=>{k(e=>[...e,{name:"",itemunit_id:d?.[0]?.value||"",quantity:"",cost_price:"",selling_price:"",barcode:""}])},className:"font-medium text-sm ml-4"})})]})]}),m.jsxs("div",{className:"flex justify-between items-center px-5 sticky bottom-0 bg-white py-5 border-t ",children:[m.jsxs("button",{className:"text-primary text-sm font-medium flex items-center gap-1",children:[Jy.question," Need help?"]}),m.jsxs("div",{className:"flex justify-end gap-2.5",children:[m.jsx(IE,{label:"Cancel",className:"bg-[#F1F1F2] text-[#181C32] hover:bg-[#F1F1F2]/90",onClick:t}),m.jsx(IE,{label:"Create Items",onClick:()=>{n({url:"/items/create_multiple",payload:E},{onSuccess:()=>{o.invalidateQueries({queryKey:["items"]}),t&&t()}})},loading:r})]})]}),m.jsx(fI,{isOpen:O,onClose:()=>N(!1)}),m.jsx(pI,{isOpen:R,onClose:()=>P(!1)})]})}function mI({isOpen:e,onClose:t,currentTab:n,loading:r,filter:o,setFiltering:a}){const[i,s]=D.useState(""),[l]=CO(i,1e3),{apiKey:u}=Dn(),{data:c}=Jw(["categories",u],"/inventory_metas/categories",{enabled:!!u}),{data:d}=Jw(["itemtypes",u],"/inventory_metas/types",{enabled:!!u}),{data:f}=Jw(["itemunits",u],"/inventory_metas/units",{enabled:!!u}),{data:p}=Jw(["suppliers",l],i?`/suppliers/search/${i}/all`:"/suppliers",{enabled:!!u}),{data:h}=Jw(["itembrands"],"/inventory_metas/brands",{enabled:!!u}),g=p?.data?.data?.map(e=>({label:e?.name,value:e?.uuid})),y=h?.data?.data?.map(e=>({label:e.name,value:e.uuid})),[v,b]=D.useState(""),[w]=CO(v,1e3),{data:x}=Jw(["itemtags",u,w],"/inventory_metas/tags",{enabled:!!u&&!!w}),S=x?.data?.data?.map(e=>({label:e.name,value:e.uuid})),C=c?.data?.data.map(e=>({label:e.name,value:e.uuid,subOptions:e.subCategories.map(e=>({label:e.name,value:e.uuid}))})),k=d?.data?.data?.map(e=>({label:e.name,value:e.uuid})),_=f?.data?.data?.map(e=>({label:e.name,value:e.uuid}))||[],[E,j]=D.useState({for:n,category:[],supplier:[],tags:[],brands:[],type:[],unit:[]}),O=(e,t)=>{j(n=>({...n,[e]:t}))};return m.jsx(XC,{isOpen:e,onClose:t,children:m.jsxs("div",{className:"px-7.5",children:[m.jsxs("div",{className:"flex justify-between items-center sticky top-0 py-5 bg-white",children:[m.jsx("h1",{className:"text-gray-900 font-semibold text-lg",children:"Item Filter"}),m.jsxs("button",{className:"text-danger text-sm font-medium inline-flex items-center",onClick:()=>{j({for:n,category:[],supplier:[],tags:[],brands:[],type:[],unit:[]}),a(!1),t&&t()},children:[m.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:m.jsx("path",{d:"M11.175 9.99997L14.1667 7.0333C14.3258 6.87196 14.4143 6.65401 14.4128 6.42741C14.4112 6.2008 14.3197 5.98409 14.1583 5.82497C13.997 5.66584 13.779 5.57731 13.5524 5.57888C13.3258 5.58044 13.1091 5.67196 12.95 5.8333L10 8.82497L7.05 5.89163C6.89387 5.73642 6.68266 5.6493 6.4625 5.6493C6.24235 5.6493 6.03114 5.73642 5.875 5.89163C5.79689 5.9691 5.7349 6.06127 5.69259 6.16282C5.65028 6.26437 5.6285 6.37329 5.6285 6.4833C5.6285 6.59331 5.65028 6.70223 5.69259 6.80378C5.7349 6.90533 5.79689 6.9975 5.875 7.07497L8.825 9.99997L5.83333 12.9666C5.6742 13.128 5.58568 13.3459 5.58725 13.5725C5.58881 13.7991 5.68033 14.0158 5.84167 14.175C6.00301 14.3341 6.22095 14.4226 6.44756 14.4211C6.67417 14.4195 6.89087 14.328 7.05 14.1666L10 11.175L12.95 14.1083C13.1061 14.2635 13.3173 14.3506 13.5375 14.3506C13.7577 14.3506 13.9689 14.2635 14.125 14.1083C14.2031 14.0308 14.2651 13.9387 14.3074 13.8371C14.3497 13.7356 14.3715 13.6266 14.3715 13.5166C14.3715 13.4066 14.3497 13.2977 14.3074 13.1962C14.2651 13.0946 14.2031 13.0024 14.125 12.925L11.175 9.99997Z",fill:"#F1416C"})}),"Reset"," "]})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-5",children:[m.jsx(kO,{options:C,label:"Categories",placeholder:"Select categories",values:E.category,onChange:e=>O("category",e),labelClass:"text-dark font-medium",className:"col-span-2",showMultiSelectValues:!1,showCount:!0}),m.jsx(uN,{options:g,label:"Supplier",placeholder:"Select Suppliers",values:E.supplier,onChange:e=>O("supplier",e),labelClass:"text-dark font-medium",className:"col-span-2",showMultiSelectValues:!1,showCount:!0,onChangeSearch:e=>s(e.target.value)}),m.jsx(uN,{options:k,label:"Item types",placeholder:"Select types",values:E.type,onChange:e=>O("type",e),labelClass:"text-dark font-medium",showMultiSelectValues:!1,showCount:!0}),m.jsx(uN,{options:_,label:"Item units",placeholder:"Select item unit",values:E.unit,onChange:e=>O("unit",e),labelClass:"text-dark font-medium",showMultiSelectValues:!1,showCount:!0}),m.jsx(uN,{options:y,label:"Item brands",placeholder:"Select item brands",values:E.brands,onChange:e=>O("brands",e),labelClass:"text-dark font-medium",showMultiSelectValues:!1,showCount:!0}),m.jsx(uN,{options:S,label:"Item tag",placeholder:"Select item tag",values:E.tags,onChange:e=>O("tags",e),labelClass:"text-dark font-medium",showMultiSelectValues:!1,showCount:!0,onChangeSearch:e=>b(e.target.value)})]}),m.jsxs("div",{className:"flex justify-end gap-2.5 sticky bottom-0 py-5 bg-white",children:[m.jsx(IE,{label:"Cancel",className:"bg-[#F1F1F2] text-[#181C32] hover:bg-[#F1F1F2]/90",onClick:t,disabled:r}),m.jsx(IE,{label:"Apply filter",onClick:()=>o(E),loading:r})]})]})})}let gI={};function yI(e){gI=e}const vI={inventory:({showStats:e=!0})=>{const[t,n]=M.useState(),{currentPage:r,perview:o,inline_update:a}=ne(e=>e.app),[i,s]=D.useState("all"),[l,u]=D.useState(!1),[c,d]=D.useState("all"),[f,p]=D.useState(""),[h]=CO(f,1e3),[g,y]=D.useState(!1),{apiKey:v}=Dn(),{mutate:b,isPending:w}=ex(),{data:x,isFetching:S}=Jw(["items",o.toString(),r?.toString(),i,h,v],h?`/items/search?page=${r}&paginate=${o}&param=${h}&for=${i}&filter=all`:`/items?page=${r}&paginate=${o}&status=${i}`,{enabled:!!v}),[C,k]=D.useState(),_=e=>{y(!0),b({url:`/inventory/item/filter?page=${r}&perview=${o}`,payload:e},{onSuccess(e,t,n){k(e),u(!1)}})},[E,j]=D.useState({for:i,category:[],supplier:[],tags:[],brands:[],type:[],unit:[]});M.useEffect(()=>{g&&!f&&_(E)},[f,a,o,r,S]);const O=g?C?.data[0]:x?.data?.[0]||[],N=O?.data?.map(e=>({item_description:e?.name,all_quantity:+e?.all_quantity,other_locations:e?.other_locations,itemcode:e?.itemcode,quantity:+e?.quantity,type:e?.item_type?.name,selling_price:+e?.selling_price,categories:e?.category||[],tags:e?.item_tags?.map(e=>e.name)||[],status:e?.status?"published":"draft",sku:e?.sku,item_image:e.images?.length>0?e.images?.[0].image:rS,barcode:e?.barcode,expired:e?.expired,expiring:e?.expiring,unit:e?.item_unit,uuid:e?.uuid,item_type_id:e?.item_type?.uuid,reorder_level:e?.reorder_level,fullData:e}))||[],{data:R,isFetching:P}=Jw(["items-tab"],"/items/count",{enabled:!!v}),T=R?.data,I=[{label:"all",count:T?.all||0,action:()=>s("all")},{label:"published",count:T?.published||0,action:()=>s("published")},{label:"out of stock",count:T?.out_of_stock||0,action:()=>s("out_of_stock")},{label:"draft",count:T?.draft||0,action:()=>s("draft")},{label:"expiring",count:T?.expiring||0,action:()=>s("expiring")},{label:"expired",count:T?.expired||0,action:()=>s("expired")}],[A,F]=D.useState(!1);return m.jsxs(tS,{className:"px-4 py-6 flex flex-col gap-8",children:[m.jsx(KC,{tabs:I,loading:S}),m.jsxs("div",{className:" flex items-center justify-between flex-wrap gap-4",children:[m.jsxs("div",{className:"flex items-center gap-2.5",children:[m.jsx(xO,{placeholder:"Search Item name, barcode or sku",value:f,onChange:e=>p(e.target.value)}),S?m.jsx(na,{className:"w-20 h-6"}):m.jsxs("p",{className:"text-dark text-sm font-medium",children:[O?.meta?.total??0," ",m.jsx("span",{className:"text-gray-700",children:"Items"})]})]}),m.jsxs("div",{className:"flex gap-4",children:[m.jsx(IE,{label:"Filter",left_addon:M.cloneElement(Jy.filter_edit,{fill:"#5E6278"}),onClick:()=>u(!0),className:"font-medium bg-gray-200 hover:bg-gray-300 text-gray-700 text-sm h-12"}),m.jsx(IE,{label:"Create New",left_addon:Jy.plus_squared,className:"font-medium text-sm h-12",onClick:()=>F(!0)})]})]}),e?m.jsx(wO,{loading:S,data:x?.data?.[1],meta:O?.meta}):null,m.jsx(nv,{loading:S,columns:lO,data:N,emptyData:0===N.length,emptyProps:{header:"No item yet",subText:"Add new item to start managing your inventory."},tHeadClass:"whitespace-nowrap",tbCellClass:"text-dark font-semibold",meta:O?.meta}),m.jsx(mI,{isOpen:l,onClose:()=>u(!1),currentTab:i,loading:w,filter:e=>{_(e),j(e)},setFiltering:y}),A?m.jsx(hI,{isOpen:A,onClose:()=>F(!1)}):null]})}};async function bI(e,t,n={}){const r=vI[e];if(!r)return void console.error(`SimpooSDK: Widget "${e}" not found.`);const o=document.querySelector(t);if(!o)throw new Error(`Container "${t}" not found!`);try{await new Promise((e,t)=>{const n=document.querySelector("#simpoo-sdk-styles");if(n)return e(n);const r=document.createElement("link");r.id="simpoo-sdk-styles",r.rel="stylesheet",r.href="https://unpkg.com/@simpoobusiness/sdk/dist/simpoo-sdk.css",r.onload=()=>e(r),r.onerror=()=>{document.querySelector(`#${r.id}`)||document.head.appendChild(r),e(r)};const o=setTimeout(()=>{document.querySelector(`#${r.id}`)||document.head.appendChild(r),e(r)},5e3);document.head.appendChild(r),r.addEventListener("load",()=>clearTimeout(o)),r.addEventListener("error",()=>clearTimeout(o))})}catch(e){console.warn("SimpooSDK: stylesheet failed to load, continuing to render.",e)}const a=document.createElement("div");a.className="simpoo",o.appendChild(a);T.createRoot(a).render(m.jsx(Mn,{apiKey:gI.apiKey||"",children:m.jsx(r,{...n})}))}"undefined"!=typeof window&&(window.SimpooSDK={init:yI,renderWidget:bI}),e.init=yI,e.renderWidget=bI});
245
245
  //# sourceMappingURL=simpoo-sdk.js.map