@simpoobusiness/sdk 1.0.7 → 1.0.8

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.
@@ -127,5 +127,5 @@ function(e,t){return qm(e,t)}(e,{shouldForwardProp:g,label:lh(),...u}),h=e=>{if(
127
127
  animation-iteration-count: infinite;
128
128
  animation-delay: 200ms;
129
129
  }
130
- `,tb=o.forwardRef(function(e,t){const n=jy({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:a,...s}=n,[l,c]=o.useState([]),u=o.useRef(0),d=o.useRef(null);o.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const p=o.useRef(!1),g=Ky(),m=o.useRef(null),h=o.useRef(null),y=o.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;c(e=>[...e,f.jsx(eb,{classes:{ripple:Co(i.ripple,Xy.ripple),rippleVisible:Co(i.rippleVisible,Xy.rippleVisible),ripplePulsate:Co(i.ripplePulsate,Xy.ripplePulsate),child:Co(i.child,Xy.child),childLeaving:Co(i.childLeaving,Xy.childLeaving),childPulsate:Co(i.childPulsate,Xy.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},u.current)]),u.current+=1,d.current=a},[i]),b=o.useCallback((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:i=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===e?.type&&p.current)return void(p.current=!1);"touchstart"===e?.type&&(p.current=!0);const s=a?null:h.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}e?.touches?null===m.current&&(m.current=()=>{y({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})},g.start(80,()=>{m.current&&(m.current(),m.current=null)})):y({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})},[r,y,g]),v=o.useCallback(()=>{b({},{pulsate:!0})},[b]),w=o.useCallback((e,t)=>{if(g.clear(),"touchend"===e?.type&&m.current)return m.current(),m.current=null,void g.start(0,()=>{w(e,t)});m.current=null,c(e=>e.length>0?e.slice(1):e),d.current=t},[g]);return o.useImperativeHandle(t,()=>({pulsate:v,start:b,stop:w}),[v,b,w]),f.jsx(Qy,{className:Co(Xy.root,i.root,a),ref:h,...s,children:f.jsx(Uy,{component:null,exit:!0,children:l})})});function nb(e){return kf("MuiButtonBase",e)}const rb=Ef("MuiButtonBase",["root","disabled","focusVisible"]),ob=Ty("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"},[`&.${rb.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ib=o.forwardRef(function(e,t){const n=jy({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:p=!1,focusVisibleClassName:g,LinkComponent:m="a",onBlur:h,onClick:y,onContextMenu:b,onDragLeave:v,onFocus:w,onFocusVisible:x,onKeyDown:S,onKeyUp:C,onMouseDown:R,onMouseLeave:k,onMouseUp:E,onTouchEnd:_,onTouchMove:P,onTouchStart:O,tabIndex:A=0,TouchRippleProps:M,touchRippleRef:T,type:j,...N}=n,F=o.useRef(null),I=Ly.use(),D=Ny(I.ref,T),[L,$]=o.useState(!1);c&&L&&$(!1),o.useImperativeHandle(r,()=>({focusVisible:()=>{$(!0),F.current.focus()}}),[]);const z=I.shouldMount&&!u&&!c;o.useEffect(()=>{L&&p&&!u&&I.pulsate()},[u,p,L,I]);const B=ab(I,"start",R,d),V=ab(I,"stop",b,d),H=ab(I,"stop",v,d),G=ab(I,"stop",E,d),U=ab(I,"stop",e=>{L&&e.preventDefault(),k&&k(e)},d),W=ab(I,"start",O,d),q=ab(I,"stop",_,d),K=ab(I,"stop",P,d),X=ab(I,"stop",e=>{Wf(e.target)||$(!1),h&&h(e)},!1),Y=Fy(e=>{F.current||(F.current=e.currentTarget),Wf(e.target)&&($(!0),x&&x(e)),w&&w(e)}),J=()=>{const e=F.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},Z=Fy(e=>{p&&!e.repeat&&L&&" "===e.key&&I.stop(e,()=>{I.start(e)}),e.target===e.currentTarget&&J()&&" "===e.key&&e.preventDefault(),S&&S(e),e.target===e.currentTarget&&J()&&"Enter"===e.key&&!c&&(e.preventDefault(),y&&y(e))}),Q=Fy(e=>{p&&" "===e.key&&L&&!e.defaultPrevented&&I.stop(e,()=>{I.pulsate(e)}),C&&C(e),y&&e.target===e.currentTarget&&J()&&" "===e.key&&!e.defaultPrevented&&y(e)});let ee=l;"button"===ee&&(N.href||N.to)&&(ee=m);const te={};"button"===ee?(te.type=void 0===j?"button":j,te.disabled=c):(N.href||N.to||(te.role="button"),c&&(te["aria-disabled"]=c));const ne=Ny(t,F),re={...n,centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:p,tabIndex:A,focusVisible:L},oe=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=xf({root:["root",t&&"disabled",n&&"focusVisible"]},nb,o);return n&&r&&(i.root+=` ${r}`),i})(re);return f.jsxs(ob,{as:ee,className:Co(oe.root,s),ownerState:re,onBlur:X,onClick:y,onContextMenu:V,onFocus:Y,onKeyDown:Z,onKeyUp:Q,onMouseDown:B,onMouseLeave:U,onMouseUp:G,onDragLeave:H,onTouchEnd:q,onTouchMove:K,onTouchStart:W,ref:ne,tabIndex:c?-1:A,type:j,...te,...N,children:[a,z?f.jsx(tb,{ref:D,center:i,...M}):null]})});function ab(e,t,n,r=!1){return Fy(o=>(n&&n(o),r||e[t](o),!0))}function sb(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 lb=function(e){let t,n;return function(r){let o=t;return void 0!==o&&r.theme===n||(gh.theme=r.theme,o=th(e(gh)),t=o,n=r.theme),o}};function cb(e){return kf("MuiSvgIcon",e)}Ef("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const ub=Ty("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${qf(n.color)}`],t[`fontSize${qf(n.fontSize)}`]]}})(lb(({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}}]}))),db=o.forwardRef(function(e,t){const n=jy({props:e,name:"MuiSvgIcon"}),{children:r,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:p="0 0 24 24",...g}=n,m=o.isValidElement(r)&&"svg"===r.type,h={...n,color:a,component:s,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:p,hasSvgAsChild:m},y={};u||(y.viewBox=p);const b=(e=>{const{color:t,fontSize:n,classes:r}=e;return xf({root:["root","inherit"!==t&&`color${qf(t)}`,`fontSize${qf(n)}`]},cb,r)})(h);return f.jsxs(ub,{as:s,className:Co(b.root,i),focusable:"false",color:c,"aria-hidden":!d||void 0,role:d?"img":void 0,ref:t,...y,...g,...m&&r.props,ownerState:h,children:[m?r.props.children:r,d?f.jsx("title",{children:d}):null]})});function fb(e,t){function n(t,n){return f.jsx(db,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=db.muiName,o.memo(o.forwardRef(n))}db.muiName="SvgIcon";var pb=fb(f.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"})),gb=fb(f.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"})),mb=fb(f.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),hb=fb(f.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}));function yb(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 bb(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const e=Co(n?.className,i,o?.className,r?.className),t={...n?.style,...o?.style,...r?.style},a={...n,...o,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=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=yb(r),l=yb(o),c=t(a),u=Co(c?.className,n?.className,i,o?.className,r?.className),d={...c?.style,...n?.style,...o?.style,...r?.style},f={...c,...n,...l,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function vb(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=i,p=u[e]||r,g=function(e,t,n){return"function"==typeof e?e(t,n):e}(d[e],o),{props:{component:m,...h},internalRef:y}=bb({className:n,...l,externalForwardedProps:"root"===e?f:void 0,externalSlotProps:g}),b=Ny(y,g?.ref,t.ref),v="root"===e?m||c:m,w=function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}(p,{..."root"===e&&!c&&!u[e]&&a,..."root"!==e&&!u[e]&&a,...h,...v&&!s&&{as:v},...v&&s&&{component:v},ref:b},o);return[p,w]}const wb=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${qf(n.size)}`],"text"===n.variant&&t[`text${qf(n.color)}`],"outlined"===n.variant&&t[`outlined${qf(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]},xb=Ty("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:wb})(lb(({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",[`&.${Uf.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)}}]}))),Sb=Ty(ib,{name:"MuiPaginationItem",slot:"Root",overridesResolver:wb})(lb(({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,[`&.${Uf.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Uf.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"}},[`&.${Uf.selected}`]:{backgroundColor:(e.vars||e).palette.action.selected,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:If(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Uf.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:If(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},[`&.${Uf.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 rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${Uf.selected}`]:{[`&.${Uf.disabled}`]:{borderColor:(e.vars||e).palette.action.disabledBackground,color:(e.vars||e).palette.action.disabled}}}},{props:{variant:"text"},style:{[`&.${Uf.selected}`]:{[`&.${Uf.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}},...Object.entries(e.palette).filter(sb(["dark","contrastText"])).map(([t])=>({props:{variant:"text",color:t},style:{[`&.${Uf.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}},[`&.${Uf.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark},[`&.${Uf.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}})),...Object.entries(e.palette).filter(sb(["light"])).map(([t])=>({props:{variant:"outlined",color:t},style:{[`&.${Uf.selected}`]:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:If(e.palette[t].main,.5)}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.activatedOpacity})`:If(e.palette[t].main,e.palette.action.activatedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:If(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Uf.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:If(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity)}}}}))]}))),Cb=Ty("div",{name:"MuiPaginationItem",slot:"Icon"})(lb(({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)}}]}))),Rb=o.forwardRef(function(e,t){const n=jy({props:e,name:"MuiPaginationItem"}),{className:r,color:i="standard",component:a,components:s={},disabled:l=!1,page:c,selected:u=!1,shape:d="circular",size:p="medium",slots:g={},slotProps:m={},type:h="page",variant:y="text",...b}=n,v={...n,color:i,disabled:l,selected:u,shape:d,size:p,type:h,variant:y},w=o.useContext(Hf)??!1,x=(e=>{const{classes:t,color:n,disabled:r,selected:o,size:i,shape:a,type:s,variant:l}=e;return xf({root:["root",`size${qf(i)}`,l,a,"standard"!==n&&`color${qf(n)}`,"standard"!==n&&`${l}${qf(n)}`,r&&"disabled",o&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]},Gf,t)})(v),S={slots:{previous:g.previous??s.previous,next:g.next??s.next,first:g.first??s.first,last:g.last??s.last},slotProps:m},[C,R]=vb("previous",{elementType:mb,externalForwardedProps:S,ownerState:v}),[k,E]=vb("next",{elementType:hb,externalForwardedProps:S,ownerState:v}),[_,P]=vb("first",{elementType:pb,externalForwardedProps:S,ownerState:v}),[O,A]=vb("last",{elementType:gb,externalForwardedProps:S,ownerState:v}),M=w?{previous:"next",next:"previous",first:"last",last:"first"}[h]:h,T={previous:C,next:k,first:_,last:O}[M],j={previous:R,next:E,first:P,last:A}[M];return"start-ellipsis"===h||"end-ellipsis"===h?f.jsx(xb,{ref:t,ownerState:v,className:Co(x.root,r),children:"…"}):f.jsxs(Sb,{ref:t,ownerState:v,component:a,disabled:l,className:Co(x.root,r),...b,children:["page"===h&&c,T?f.jsx(Cb,{...j,className:x.icon,as:T}):null]})}),kb=Ty("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),Eb=Ty("ul",{name:"MuiPagination",slot:"Ul"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function _b(e,t,n){return"page"===e?`${n?"":"Go to "}page ${t}`:`Go to ${e} page`}const Pb=o.forwardRef(function(e,t){const n=jy({props:e,name:"MuiPagination"}),{boundaryCount:r=1,className:o,color:i="standard",count:a=1,defaultPage:s=1,disabled:l=!1,getItemAriaLabel:c=_b,hideNextButton:u=!1,hidePrevButton:d=!1,onChange:p,page:g,renderItem:m=e=>f.jsx(Rb,{...e}),shape:h="circular",showFirstButton:y=!1,showLastButton:b=!1,siblingCount:v=1,size:w="medium",variant:x="text",...S}=n,{items:C}=Pf({...n,componentName:"Pagination"}),R={...n,boundaryCount:r,color:i,count:a,defaultPage:s,disabled:l,getItemAriaLabel:c,hideNextButton:u,hidePrevButton:d,renderItem:m,shape:h,showFirstButton:y,showLastButton:b,siblingCount:v,size:w,variant:x},k=(e=>{const{classes:t,variant:n}=e;return xf({root:["root",n],ul:["ul"]},_f,t)})(R);return f.jsx(kb,{"aria-label":"pagination navigation",className:Co(k.root,o),ownerState:R,ref:t,...S,children:f.jsx(Eb,{className:k.ul,ownerState:R,children:C.map((e,t)=>f.jsx("li",{children:m({...e,color:i,"aria-label":c(e.type,e.page,e.selected),shape:h,size:w,variant:x})},t))})})}),Ob={arrow:f.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.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:f.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.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"}),f.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"}),f.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"})]})};function Ab({showBulkActions:e=!0,meta:n}){const r=A(),{currentPage:o,perview:i}=j(e=>e.app);return t.useEffect(()=>{n&&o>n?.last_page&&r(Xe(1))},[n?.per_page]),f.jsxs("div",{className:Ai("flex items-center justify-between gap-4 flex-wrap",n&&n?.total>0?null:"hidden"),children:[e?f.jsxs("div",{className:"flex items-center gap-2.5 shrink-0",children:[f.jsxs(yf,{children:[f.jsx(bf,{asChild:!0,children:f.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:[i,f.jsx("span",{className:"rotate-90",children:Ob.arrow})]})}),f.jsx(vf,{align:"center",className:"flex flex-col gap-2.5 rounded-xl border-gray-200 py-2.5",children:[7,10,20].map((e,t)=>f.jsx(wf,{className:`capitalize focus:bg-primary_light rounded-md focus:text-primary font-semibold text-sm cursor-pointer px-[15px] flex items-center gap-[5px] ${i===e?"bg-primary_light text-primary":"text-gray-700"} `,onClick:()=>r(Ye(e)),children:e},t))})]}),f.jsxs("p",{className:"font-normal text-gray-600 text-[15px]",children:["Showing ",n?.from," - ",n?.to," of ",n?.total]})]}):null,f.jsx(Pb,{count:n?.last_page||1,page:n?.current_page??1,shape:"rounded",color:"primary",onChange:(e,t)=>{r(Xe(t))}})]})}function Mb({props:e={}}){return f.jsxs("div",{className:"flex flex-col gap-3 items-center py-24",children:[f.jsx("p",{className:"font-bold text-sm",children:e.header??"No item attached"}),f.jsx("p",{className:"font-bold text-[13px] text-gray-700",children:e.subText??"Add a new item to start managing your orders."})]})}function Tb({columns:e,data:n,tbhRowClass:r,tHeadClass:i,tbCellClass:a,meta:s,showBulkActions:l,showPaginate:c=!0,emptyData:u,emptyProps:d,loading:p,accordionData:g,hasAccordion:m,bodyRowClass:h,tableContainerClass:y,firstCellClass:b,lastCellClass:v,showAccordionDropdown:w=!0,onToggleAccordion:x}){const[S,C]=t.useState(null),R=function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=o.useState(()=>({current:wo(t)})),[r,i]=o.useState(()=>n.current.initialState);return n.current.setOptions(t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{i(t),null==e.onStateChange||e.onStateChange(t)}})),n.current}({data:n,columns:e,getCoreRowModel:e=>Pr(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(t,o,i){void 0===o&&(o=0);const a=[];for(let l=0;l<t.length;l++){const c=Nr(e,e._getRowId(t[l],l,i),t[l],l,o,0,null==i?void 0:i.id);var s;n.flatRows.push(c),n.rowsById[c.id]=c,a.push(c),e.options.getSubRows&&(c.originalSubRows=e.options.getSubRows(t[l],l),null!=(s=c.originalSubRows)&&s.length&&(c.subRows=r(c.originalSubRows,o+1,c)))}return a};return n.rows=r(t),n},Or(e.options,"debugTable",0,()=>e._autoResetPageIndex()))});return f.jsxs("div",{className:"flex flex-col gap-[30px]",children:[f.jsx("div",{className:`shadow-[0_3px_4px_0_#00000008] ${y}`,children:f.jsxs(Mi,{children:[f.jsx(Ti,{children:R.getHeaderGroups().map(e=>f.jsx(Ni,{className:Ai("border-gray-300 bg-gray-100 hover:!bg-gray-100 rounded-xl",r),children:e.headers.map(e=>f.jsx(Fi,{className:Ai("text-dark text-sm capitalize font-bold",i),children:e.isPlaceholder?null:xo(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),f.jsx(ji,{children:p?Array(5).fill(null).map((e,n)=>f.jsx(t.Fragment,{children:R.getHeaderGroups().map(e=>f.jsx(Ni,{className:Ai("border-gray-300 hover:!bg-gray-100 rounded-xl"),children:e.headers.map(e=>f.jsx(Ii,{children:f.jsx(Di,{className:"w-full h-6 rounded-lg"})},e.id))},e.id))},n)):R?.getRowModel().rows?.length?R?.getRowModel().rows.map((e,n)=>f.jsx(t.Fragment,{children:f.jsx(Ni,{onClick:()=>((e,t)=>{C(t=>t===e?null:e),x?.(e,t)})(n,e.original),"data-state":e.getIsSelected()&&"selected",className:`border-gray-300 hover:!bg-gray-100 data-[state=selected]:bg-gray-100 ${h} `,children:e.getVisibleCells().map((t,r)=>f.jsx(Ii,{className:Ai("text-gray-500 text-sm font-bold",a,0===r&&b,r===e.getVisibleCells().length-1&&v),children:f.jsxs("div",{className:"flex",children:[m&&w&&0===r&&f.jsx("div",{className:"cursor-pointer inline",children:f.jsx("div",{className:"transform transition-transform duration-200 "+(S===n?"-rotate-90":"rotate-90"),children:Ob.arrow})})," ",f.jsx("div",{children:xo(t.column.columnDef.cell,t.getContext())})]})},t.id))},e.id)},e.id)):f.jsx(Ni,{children:f.jsx(Ii,{colSpan:e.length,className:"h-24 text-center hover:bg-gray-100",children:u?f.jsx(Mb,{props:d}):"No results found."})})})]})}),c&&f.jsx(Ab,{showBulkActions:l,meta:s})]})}function jb(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 Nb(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 Fb,Ib="HoverCard",[Db,Lb]=Vi(Ib,[_l]),$b=_l(),[zb,Bb]=Db(Ib),Vb=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:a,openDelay:s=700,closeDelay:l=300}=e,c=$b(t),u=o.useRef(0),d=o.useRef(0),p=o.useRef(!1),g=o.useRef(!1),[m,h]=Wi({prop:r,defaultProp:i??!1,onChange:a,caller:Ib}),y=o.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>h(!0),s)},[s,h]),b=o.useCallback(()=>{clearTimeout(u.current),p.current||g.current||(d.current=window.setTimeout(()=>h(!1),l))},[l,h]),v=o.useCallback(()=>h(!1),[h]);return o.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),f.jsx(zb,{scope:t,open:m,onOpenChange:h,onOpen:y,onClose:b,onDismiss:v,hasSelectionRef:p,isPointerDownOnContentRef:g,children:f.jsx(Hl,{...c,children:n})})};Vb.displayName=Ib;var Hb="HoverCardTrigger",Gb=o.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Bb(Hb,n),i=$b(n);return f.jsx(Gl,{asChild:!0,...i,children:f.jsx(oa.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:Li(e.onPointerEnter,Yb(o.onOpen)),onPointerLeave:Li(e.onPointerLeave,Yb(o.onClose)),onFocus:Li(e.onFocus,o.onOpen),onBlur:Li(e.onBlur,o.onClose),onTouchStart:Li(e.onTouchStart,e=>e.preventDefault())})})});Gb.displayName=Hb;var[Ub,Wb]=Db("HoverCardPortal",{forceMount:void 0}),qb="HoverCardContent",Kb=o.forwardRef((e,t)=>{const n=Wb(qb,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,i=Bb(qb,e.__scopeHoverCard);return f.jsx(Kl,{present:r||i.open,children:f.jsx(Xb,{"data-state":i.open?"open":"closed",...o,onPointerEnter:Li(e.onPointerEnter,Yb(i.onOpen)),onPointerLeave:Li(e.onPointerLeave,Yb(i.onClose)),ref:t})})});Kb.displayName=qb;var Xb=o.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,...l}=e,c=Bb(qb,n),u=$b(n),d=o.useRef(null),p=Bi(t,d),[g,m]=o.useState(!1);return o.useEffect(()=>{if(g){const e=document.body;return Fb=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=Fb,e.style.webkitUserSelect=Fb}}},[g]),o.useEffect(()=>{if(d.current){const e=()=>{m(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{""!==document.getSelection()?.toString()&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),o.useEffect(()=>{if(d.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}(d.current);e.forEach(e=>e.setAttribute("tabindex","-1"))}}),f.jsx(ma,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:s,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:Li(a,e=>{e.preventDefault()}),onDismiss:c.onDismiss,children:f.jsx(Ul,{...u,...l,onPointerDown:Li(l.onPointerDown,e=>{e.currentTarget.contains(e.target)&&m(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:p,style:{...l.style,userSelect:g?"text":void 0,WebkitUserSelect:g?"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 Yb(e){return t=>"touch"===t.pointerType?void 0:e()}o.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=$b(n);return f.jsx(Wl,{...o,...r,ref:t})}).displayName="HoverCardArrow";var Jb=Kb;const Zb=Vb,Qb=Gb,ev=o.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>f.jsx(Jb,{ref:o,align:t,sideOffset:n,className:Ai("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 tv({children:e,trigger:t,fieldName:n,align:r="start"}){return f.jsxs(Zb,{children:[f.jsx(Qb,{className:"cursor-pointer",children:t??Ob.info_input}),f.jsxs(ev,{align:r,className:"bg-[#0A0D14] text-[#CDD0D5] text-xs font-normal border-none",children:[n?f.jsx("p",{className:"text-sm font-medium text-white first-letter:uppercase",children:n}):null,e]})]})}function nv({status:e}){return f.jsx("span",{className:Ai("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("_"," ")})}ev.displayName=Jb.displayName;const rv=[{accessorKey:"item_description",header:"item description",cell:({row:e})=>{const t=e.original;return f.jsxs("div",{className:"flex items-center gap-5",children:[f.jsx("div",{className:"w-[50px] h-[50px] rounded-2xl relative bg-gray-100",children:f.jsx("img",{src:t.item_image,alt:"item image",className:"rounded-2xl object-cover w-full h-full",draggable:!1})}),f.jsxs("div",{className:"space-y-1 max-w-[265px]",children:[f.jsx(ov,{title:t.item_description,item_uuid:t.uuid,item_type_id:t.item_type_id,data:t.fullData}),f.jsxs("p",{className:"text-dark text-xs font-normal flex items-center gap-1",children:[f.jsx("span",{className:"uppercase whitespace-nowrap",children:t.sku}),t.barcode?.length>0?f.jsxs(f.Fragment,{children:[f.jsx("span",{children:"|"}),t.barcode?.[0]?.barcode,t.barcode.length>1?f.jsxs("span",{className:"rounded bg-[#9747FF1A] px-[5px] flex items-center text-[#7239EA] font-semibold text-[11px] h-[18px]",children:["+",t.barcode?.length-1]}):null]}):null,t.expired?f.jsxs(f.Fragment,{children:[f.jsx("span",{children:"|"}),"Expired",f.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?f.jsxs(f.Fragment,{children:[f.jsx("span",{children:"|"}),"Expiring",f.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:()=>f.jsx("p",{children:"quantity"}),cell:({row:e})=>{const t=e.original;return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:Ai("flex items-center",t.quantity<=0?"text-danger":Number(t.reorder_level)==t.quantity?"text-orange":null),children:f.jsx("p",{children:Nb(t.quantity)+t.unit})}),t.all_quantity===t.quantity?null:f.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 f.jsx("p",{className:"capitalize",children:t.type})}},{accessorKey:"selling_price",header:"Selling Price (₦)",cell:({row:e})=>{const t=e.original;return f.jsx("p",{children:jb(t.selling_price??0)})}},{accessorKey:"categories",header:"categories/Tags",cell:({row:e})=>{const t=e.original;return f.jsxs(f.Fragment,{children:[" ",f.jsxs("div",{className:"flex items-center gap-2 capitalize",children:[t.categories&&t.categories?.length>0?t.categories?.[0]?.name:"...",t.categories.length>1?f.jsx(tv,{align:"center",fieldName:"Categories",trigger:f.jsxs("button",{className:"rounded bg-[#9747FF1A] px-[5px] flex items-center text-[#7239EA] font-semibold text-[11px] h-[18px]",children:["+",t.categories.length-1]}),children:f.jsx("ul",{className:"list-disc pl-4",children:t.categories.map((e,t)=>f.jsx("li",{children:e.name},t))})}):null]}),f.jsxs("div",{className:"text-gray-700 flex items-center gap-2 capitalize",children:[t.tags?.[0],t.tags?.length>1?f.jsx(tv,{align:"center",fieldName:"Tags",trigger:f.jsxs("button",{className:"rounded bg-[#9747FF1A] px-[5px] flex items-center text-[#7239EA] font-semibold text-[11px] h-[18px]",children:["+",t.tags.length-1]}),children:f.jsx("ul",{className:"list-disc pl-4",children:t.tags.map((e,t)=>f.jsx("li",{children:e},t))})}):null]})]})}},{accessorKey:"status",cell:({row:e})=>{const t=e.getValue("status");return f.jsx(nv,{status:t})}}],ov=({title:e,item_uuid:n,item_type_id:r,data:o})=>{const[i,a]=t.useState(!1),[s,l]=t.useState(!1),[c,u]=t.useState(!1);return f.jsx(f.Fragment,{children:f.jsx("button",{className:Ai("text-primary font-bold text-sm first-letter:uppercase truncate max-w-[265px]",o.expired?"text-danger":""),title:e,children:e})})},iv=()=>{const{apiKey:e}=(()=>{const e=t.useContext(Ze);if(!e)throw new Error("useSDK must be used within SDKProvider");return e})(),[n,r]=t.useState([]),[o,i]=t.useState(null),[a,s]=t.useState(!1),{currentPage:l,perview:c}=j(e=>e.app);t.useEffect(()=>{const t=(e=>{e||console.warn("⚠️ No API key provided to createApiClient");const t=lr.create({baseURL:"https://biz.api.simpoocodes.com/api/gateway/v1",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})(e||"");e&&(async()=>{s(!0);try{const e=await t.get(`/outbound/items?page=${l}&paginate=${c}&status=all`);if(200===e.status&&"object"==typeof e.data&&null!==e.data&&"status"in e.data&&"success"===e.data.status&&"data"in e.data){const t=e.data.data?.[0];r(t?.data||[]),i(t?.meta||null)}}catch(e){console.error(e)}finally{s(!1),console.log("request completed.")}})()},[e,c,l]);const u=n.map(e=>({item_description:e?.name,all_quantity:+e?.all_quantity,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:"",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}));return f.jsx(Tb,{loading:a,columns:rv,data:u||[],emptyData:0===u.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})};let av={};function sv(e){av=e}function lv(e){const t=document.querySelector(e);if(!t)throw new Error(`Container "${e}" not found!`);n.createRoot(t).render(f.jsx(Qe,{apiKey:av.apiKey||"",children:f.jsx(iv,{})}))}window.SimpooSDK={init:sv,renderInventory:lv},e.init=sv,e.renderInventory=lv});
130
+ `,tb=o.forwardRef(function(e,t){const n=jy({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:a,...s}=n,[l,c]=o.useState([]),u=o.useRef(0),d=o.useRef(null);o.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const p=o.useRef(!1),g=Ky(),m=o.useRef(null),h=o.useRef(null),y=o.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;c(e=>[...e,f.jsx(eb,{classes:{ripple:Co(i.ripple,Xy.ripple),rippleVisible:Co(i.rippleVisible,Xy.rippleVisible),ripplePulsate:Co(i.ripplePulsate,Xy.ripplePulsate),child:Co(i.child,Xy.child),childLeaving:Co(i.childLeaving,Xy.childLeaving),childPulsate:Co(i.childPulsate,Xy.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},u.current)]),u.current+=1,d.current=a},[i]),b=o.useCallback((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:i=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===e?.type&&p.current)return void(p.current=!1);"touchstart"===e?.type&&(p.current=!0);const s=a?null:h.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}e?.touches?null===m.current&&(m.current=()=>{y({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})},g.start(80,()=>{m.current&&(m.current(),m.current=null)})):y({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})},[r,y,g]),v=o.useCallback(()=>{b({},{pulsate:!0})},[b]),w=o.useCallback((e,t)=>{if(g.clear(),"touchend"===e?.type&&m.current)return m.current(),m.current=null,void g.start(0,()=>{w(e,t)});m.current=null,c(e=>e.length>0?e.slice(1):e),d.current=t},[g]);return o.useImperativeHandle(t,()=>({pulsate:v,start:b,stop:w}),[v,b,w]),f.jsx(Qy,{className:Co(Xy.root,i.root,a),ref:h,...s,children:f.jsx(Uy,{component:null,exit:!0,children:l})})});function nb(e){return kf("MuiButtonBase",e)}const rb=Ef("MuiButtonBase",["root","disabled","focusVisible"]),ob=Ty("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"},[`&.${rb.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),ib=o.forwardRef(function(e,t){const n=jy({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:p=!1,focusVisibleClassName:g,LinkComponent:m="a",onBlur:h,onClick:y,onContextMenu:b,onDragLeave:v,onFocus:w,onFocusVisible:x,onKeyDown:S,onKeyUp:C,onMouseDown:R,onMouseLeave:k,onMouseUp:E,onTouchEnd:_,onTouchMove:P,onTouchStart:O,tabIndex:A=0,TouchRippleProps:M,touchRippleRef:T,type:j,...N}=n,F=o.useRef(null),I=Ly.use(),D=Ny(I.ref,T),[L,$]=o.useState(!1);c&&L&&$(!1),o.useImperativeHandle(r,()=>({focusVisible:()=>{$(!0),F.current.focus()}}),[]);const z=I.shouldMount&&!u&&!c;o.useEffect(()=>{L&&p&&!u&&I.pulsate()},[u,p,L,I]);const B=ab(I,"start",R,d),V=ab(I,"stop",b,d),H=ab(I,"stop",v,d),G=ab(I,"stop",E,d),U=ab(I,"stop",e=>{L&&e.preventDefault(),k&&k(e)},d),W=ab(I,"start",O,d),q=ab(I,"stop",_,d),K=ab(I,"stop",P,d),X=ab(I,"stop",e=>{Wf(e.target)||$(!1),h&&h(e)},!1),Y=Fy(e=>{F.current||(F.current=e.currentTarget),Wf(e.target)&&($(!0),x&&x(e)),w&&w(e)}),J=()=>{const e=F.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},Z=Fy(e=>{p&&!e.repeat&&L&&" "===e.key&&I.stop(e,()=>{I.start(e)}),e.target===e.currentTarget&&J()&&" "===e.key&&e.preventDefault(),S&&S(e),e.target===e.currentTarget&&J()&&"Enter"===e.key&&!c&&(e.preventDefault(),y&&y(e))}),Q=Fy(e=>{p&&" "===e.key&&L&&!e.defaultPrevented&&I.stop(e,()=>{I.pulsate(e)}),C&&C(e),y&&e.target===e.currentTarget&&J()&&" "===e.key&&!e.defaultPrevented&&y(e)});let ee=l;"button"===ee&&(N.href||N.to)&&(ee=m);const te={};"button"===ee?(te.type=void 0===j?"button":j,te.disabled=c):(N.href||N.to||(te.role="button"),c&&(te["aria-disabled"]=c));const ne=Ny(t,F),re={...n,centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:p,tabIndex:A,focusVisible:L},oe=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=xf({root:["root",t&&"disabled",n&&"focusVisible"]},nb,o);return n&&r&&(i.root+=` ${r}`),i})(re);return f.jsxs(ob,{as:ee,className:Co(oe.root,s),ownerState:re,onBlur:X,onClick:y,onContextMenu:V,onFocus:Y,onKeyDown:Z,onKeyUp:Q,onMouseDown:B,onMouseLeave:U,onMouseUp:G,onDragLeave:H,onTouchEnd:q,onTouchMove:K,onTouchStart:W,ref:ne,tabIndex:c?-1:A,type:j,...te,...N,children:[a,z?f.jsx(tb,{ref:D,center:i,...M}):null]})});function ab(e,t,n,r=!1){return Fy(o=>(n&&n(o),r||e[t](o),!0))}function sb(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 lb=function(e){let t,n;return function(r){let o=t;return void 0!==o&&r.theme===n||(gh.theme=r.theme,o=th(e(gh)),t=o,n=r.theme),o}};function cb(e){return kf("MuiSvgIcon",e)}Ef("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const ub=Ty("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${qf(n.color)}`],t[`fontSize${qf(n.fontSize)}`]]}})(lb(({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}}]}))),db=o.forwardRef(function(e,t){const n=jy({props:e,name:"MuiSvgIcon"}),{children:r,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:p="0 0 24 24",...g}=n,m=o.isValidElement(r)&&"svg"===r.type,h={...n,color:a,component:s,fontSize:l,instanceFontSize:e.fontSize,inheritViewBox:u,viewBox:p,hasSvgAsChild:m},y={};u||(y.viewBox=p);const b=(e=>{const{color:t,fontSize:n,classes:r}=e;return xf({root:["root","inherit"!==t&&`color${qf(t)}`,`fontSize${qf(n)}`]},cb,r)})(h);return f.jsxs(ub,{as:s,className:Co(b.root,i),focusable:"false",color:c,"aria-hidden":!d||void 0,role:d?"img":void 0,ref:t,...y,...g,...m&&r.props,ownerState:h,children:[m?r.props.children:r,d?f.jsx("title",{children:d}):null]})});function fb(e,t){function n(t,n){return f.jsx(db,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=db.muiName,o.memo(o.forwardRef(n))}db.muiName="SvgIcon";var pb=fb(f.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"})),gb=fb(f.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"})),mb=fb(f.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),hb=fb(f.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}));function yb(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 bb(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const e=Co(n?.className,i,o?.className,r?.className),t={...n?.style,...o?.style,...r?.style},a={...n,...o,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=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=yb(r),l=yb(o),c=t(a),u=Co(c?.className,n?.className,i,o?.className,r?.className),d={...c?.style,...n?.style,...o?.style,...r?.style},f={...c,...n,...l,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function vb(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=i,p=u[e]||r,g=function(e,t,n){return"function"==typeof e?e(t,n):e}(d[e],o),{props:{component:m,...h},internalRef:y}=bb({className:n,...l,externalForwardedProps:"root"===e?f:void 0,externalSlotProps:g}),b=Ny(y,g?.ref,t.ref),v="root"===e?m||c:m,w=function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}(p,{..."root"===e&&!c&&!u[e]&&a,..."root"!==e&&!u[e]&&a,...h,...v&&!s&&{as:v},...v&&s&&{component:v},ref:b},o);return[p,w]}const wb=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${qf(n.size)}`],"text"===n.variant&&t[`text${qf(n.color)}`],"outlined"===n.variant&&t[`outlined${qf(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]},xb=Ty("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:wb})(lb(({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",[`&.${Uf.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)}}]}))),Sb=Ty(ib,{name:"MuiPaginationItem",slot:"Root",overridesResolver:wb})(lb(({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,[`&.${Uf.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Uf.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"}},[`&.${Uf.selected}`]:{backgroundColor:(e.vars||e).palette.action.selected,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:If(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Uf.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:If(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},[`&.${Uf.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 rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:"1px solid "+("light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"),[`&.${Uf.selected}`]:{[`&.${Uf.disabled}`]:{borderColor:(e.vars||e).palette.action.disabledBackground,color:(e.vars||e).palette.action.disabled}}}},{props:{variant:"text"},style:{[`&.${Uf.selected}`]:{[`&.${Uf.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}},...Object.entries(e.palette).filter(sb(["dark","contrastText"])).map(([t])=>({props:{variant:"text",color:t},style:{[`&.${Uf.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}},[`&.${Uf.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark},[`&.${Uf.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}})),...Object.entries(e.palette).filter(sb(["light"])).map(([t])=>({props:{variant:"outlined",color:t},style:{[`&.${Uf.selected}`]:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:If(e.palette[t].main,.5)}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.activatedOpacity})`:If(e.palette[t].main,e.palette.action.activatedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:If(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Uf.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:If(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity)}}}}))]}))),Cb=Ty("div",{name:"MuiPaginationItem",slot:"Icon"})(lb(({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)}}]}))),Rb=o.forwardRef(function(e,t){const n=jy({props:e,name:"MuiPaginationItem"}),{className:r,color:i="standard",component:a,components:s={},disabled:l=!1,page:c,selected:u=!1,shape:d="circular",size:p="medium",slots:g={},slotProps:m={},type:h="page",variant:y="text",...b}=n,v={...n,color:i,disabled:l,selected:u,shape:d,size:p,type:h,variant:y},w=o.useContext(Hf)??!1,x=(e=>{const{classes:t,color:n,disabled:r,selected:o,size:i,shape:a,type:s,variant:l}=e;return xf({root:["root",`size${qf(i)}`,l,a,"standard"!==n&&`color${qf(n)}`,"standard"!==n&&`${l}${qf(n)}`,r&&"disabled",o&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]},Gf,t)})(v),S={slots:{previous:g.previous??s.previous,next:g.next??s.next,first:g.first??s.first,last:g.last??s.last},slotProps:m},[C,R]=vb("previous",{elementType:mb,externalForwardedProps:S,ownerState:v}),[k,E]=vb("next",{elementType:hb,externalForwardedProps:S,ownerState:v}),[_,P]=vb("first",{elementType:pb,externalForwardedProps:S,ownerState:v}),[O,A]=vb("last",{elementType:gb,externalForwardedProps:S,ownerState:v}),M=w?{previous:"next",next:"previous",first:"last",last:"first"}[h]:h,T={previous:C,next:k,first:_,last:O}[M],j={previous:R,next:E,first:P,last:A}[M];return"start-ellipsis"===h||"end-ellipsis"===h?f.jsx(xb,{ref:t,ownerState:v,className:Co(x.root,r),children:"…"}):f.jsxs(Sb,{ref:t,ownerState:v,component:a,disabled:l,className:Co(x.root,r),...b,children:["page"===h&&c,T?f.jsx(Cb,{...j,className:x.icon,as:T}):null]})}),kb=Ty("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),Eb=Ty("ul",{name:"MuiPagination",slot:"Ul"})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function _b(e,t,n){return"page"===e?`${n?"":"Go to "}page ${t}`:`Go to ${e} page`}const Pb=o.forwardRef(function(e,t){const n=jy({props:e,name:"MuiPagination"}),{boundaryCount:r=1,className:o,color:i="standard",count:a=1,defaultPage:s=1,disabled:l=!1,getItemAriaLabel:c=_b,hideNextButton:u=!1,hidePrevButton:d=!1,onChange:p,page:g,renderItem:m=e=>f.jsx(Rb,{...e}),shape:h="circular",showFirstButton:y=!1,showLastButton:b=!1,siblingCount:v=1,size:w="medium",variant:x="text",...S}=n,{items:C}=Pf({...n,componentName:"Pagination"}),R={...n,boundaryCount:r,color:i,count:a,defaultPage:s,disabled:l,getItemAriaLabel:c,hideNextButton:u,hidePrevButton:d,renderItem:m,shape:h,showFirstButton:y,showLastButton:b,siblingCount:v,size:w,variant:x},k=(e=>{const{classes:t,variant:n}=e;return xf({root:["root",n],ul:["ul"]},_f,t)})(R);return f.jsx(kb,{"aria-label":"pagination navigation",className:Co(k.root,o),ownerState:R,ref:t,...S,children:f.jsx(Eb,{className:k.ul,ownerState:R,children:C.map((e,t)=>f.jsx("li",{children:m({...e,color:i,"aria-label":c(e.type,e.page,e.selected),shape:h,size:w,variant:x})},t))})})}),Ob={arrow:f.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:f.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:f.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.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"}),f.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"}),f.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"})]})};function Ab({showBulkActions:e=!0,meta:n}){const r=A(),{currentPage:o,perview:i}=j(e=>e.app);return t.useEffect(()=>{n&&o>n?.last_page&&r(Xe(1))},[n?.per_page]),f.jsxs("div",{className:Ai("flex items-center justify-between gap-4 flex-wrap",n&&n?.total>0?null:"hidden"),children:[e?f.jsxs("div",{className:"flex items-center gap-2.5 shrink-0",children:[f.jsxs(yf,{children:[f.jsx(bf,{asChild:!0,children:f.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:[i,f.jsx("span",{className:"rotate-90",children:Ob.arrow})]})}),f.jsx(vf,{align:"center",className:"flex flex-col gap-2.5 rounded-xl border-gray-200 py-2.5",children:[7,10,20].map((e,t)=>f.jsx(wf,{className:`capitalize focus:bg-primary_light rounded-md focus:text-primary font-semibold text-sm cursor-pointer px-[15px] flex items-center gap-[5px] ${i===e?"bg-primary_light text-primary":"text-gray-700"} `,onClick:()=>r(Ye(e)),children:e},t))})]}),f.jsxs("p",{className:"font-normal text-gray-600 text-[15px]",children:["Showing ",n?.from," - ",n?.to," of ",n?.total]})]}):null,f.jsx(Pb,{count:n?.last_page||1,page:n?.current_page??1,shape:"rounded",color:"primary",onChange:(e,t)=>{r(Xe(t))}})]})}function Mb({props:e={}}){return f.jsxs("div",{className:"flex flex-col gap-3 items-center py-24",children:[f.jsx("p",{className:"font-bold text-sm",children:e.header??"No item attached"}),f.jsx("p",{className:"font-bold text-[13px] text-gray-700",children:e.subText??"Add a new item to start managing your orders."})]})}function Tb({columns:e,data:n,tbhRowClass:r,tHeadClass:i,tbCellClass:a,meta:s,showBulkActions:l,showPaginate:c=!0,emptyData:u,emptyProps:d,loading:p,accordionData:g,hasAccordion:m,bodyRowClass:h,tableContainerClass:y,firstCellClass:b,lastCellClass:v,showAccordionDropdown:w=!0,onToggleAccordion:x}){const[S,C]=t.useState(null),R=function(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=o.useState(()=>({current:wo(t)})),[r,i]=o.useState(()=>n.current.initialState);return n.current.setOptions(t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{i(t),null==e.onStateChange||e.onStateChange(t)}})),n.current}({data:n,columns:e,getCoreRowModel:e=>Pr(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(t,o,i){void 0===o&&(o=0);const a=[];for(let l=0;l<t.length;l++){const c=Nr(e,e._getRowId(t[l],l,i),t[l],l,o,0,null==i?void 0:i.id);var s;n.flatRows.push(c),n.rowsById[c.id]=c,a.push(c),e.options.getSubRows&&(c.originalSubRows=e.options.getSubRows(t[l],l),null!=(s=c.originalSubRows)&&s.length&&(c.subRows=r(c.originalSubRows,o+1,c)))}return a};return n.rows=r(t),n},Or(e.options,"debugTable",0,()=>e._autoResetPageIndex()))});return f.jsxs("div",{className:"flex flex-col gap-[30px]",children:[f.jsx("div",{className:`shadow-[0_3px_4px_0_#00000008] ${y}`,children:f.jsxs(Mi,{children:[f.jsx(Ti,{children:R.getHeaderGroups().map(e=>f.jsx(Ni,{className:Ai("border-gray-300 bg-gray-100 hover:!bg-gray-100 rounded-xl",r),children:e.headers.map(e=>f.jsx(Fi,{className:Ai("text-dark text-sm capitalize font-bold",i),children:e.isPlaceholder?null:xo(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),f.jsx(ji,{children:p?Array(5).fill(null).map((e,n)=>f.jsx(t.Fragment,{children:R.getHeaderGroups().map(e=>f.jsx(Ni,{className:Ai("border-gray-300 hover:!bg-gray-100 rounded-xl"),children:e.headers.map(e=>f.jsx(Ii,{children:f.jsx(Di,{className:"w-full h-6 rounded-lg"})},e.id))},e.id))},n)):R?.getRowModel().rows?.length?R?.getRowModel().rows.map((e,n)=>f.jsx(t.Fragment,{children:f.jsx(Ni,{onClick:()=>((e,t)=>{C(t=>t===e?null:e),x?.(e,t)})(n,e.original),"data-state":e.getIsSelected()&&"selected",className:`border-gray-300 hover:!bg-gray-100 data-[state=selected]:bg-gray-100 ${h} `,children:e.getVisibleCells().map((t,r)=>f.jsx(Ii,{className:Ai("text-gray-500 text-sm font-bold",a,0===r&&b,r===e.getVisibleCells().length-1&&v),children:f.jsxs("div",{className:"flex",children:[m&&w&&0===r&&f.jsx("div",{className:"cursor-pointer inline",children:f.jsx("div",{className:"transform transition-transform duration-200 "+(S===n?"-rotate-90":"rotate-90"),children:Ob.arrow})})," ",f.jsx("div",{children:xo(t.column.columnDef.cell,t.getContext())})]})},t.id))},e.id)},e.id)):f.jsx(Ni,{children:f.jsx(Ii,{colSpan:e.length,className:"h-24 text-center hover:bg-gray-100",children:u?f.jsx(Mb,{props:d}):"No results found."})})})]})}),c&&f.jsx(Ab,{showBulkActions:l,meta:s})]})}function jb(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 Nb(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 Fb,Ib="HoverCard",[Db,Lb]=Vi(Ib,[_l]),$b=_l(),[zb,Bb]=Db(Ib),Vb=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:a,openDelay:s=700,closeDelay:l=300}=e,c=$b(t),u=o.useRef(0),d=o.useRef(0),p=o.useRef(!1),g=o.useRef(!1),[m,h]=Wi({prop:r,defaultProp:i??!1,onChange:a,caller:Ib}),y=o.useCallback(()=>{clearTimeout(d.current),u.current=window.setTimeout(()=>h(!0),s)},[s,h]),b=o.useCallback(()=>{clearTimeout(u.current),p.current||g.current||(d.current=window.setTimeout(()=>h(!1),l))},[l,h]),v=o.useCallback(()=>h(!1),[h]);return o.useEffect(()=>()=>{clearTimeout(u.current),clearTimeout(d.current)},[]),f.jsx(zb,{scope:t,open:m,onOpenChange:h,onOpen:y,onClose:b,onDismiss:v,hasSelectionRef:p,isPointerDownOnContentRef:g,children:f.jsx(Hl,{...c,children:n})})};Vb.displayName=Ib;var Hb="HoverCardTrigger",Gb=o.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Bb(Hb,n),i=$b(n);return f.jsx(Gl,{asChild:!0,...i,children:f.jsx(oa.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:Li(e.onPointerEnter,Yb(o.onOpen)),onPointerLeave:Li(e.onPointerLeave,Yb(o.onClose)),onFocus:Li(e.onFocus,o.onOpen),onBlur:Li(e.onBlur,o.onClose),onTouchStart:Li(e.onTouchStart,e=>e.preventDefault())})})});Gb.displayName=Hb;var[Ub,Wb]=Db("HoverCardPortal",{forceMount:void 0}),qb="HoverCardContent",Kb=o.forwardRef((e,t)=>{const n=Wb(qb,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,i=Bb(qb,e.__scopeHoverCard);return f.jsx(Kl,{present:r||i.open,children:f.jsx(Xb,{"data-state":i.open?"open":"closed",...o,onPointerEnter:Li(e.onPointerEnter,Yb(i.onOpen)),onPointerLeave:Li(e.onPointerLeave,Yb(i.onClose)),ref:t})})});Kb.displayName=qb;var Xb=o.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,...l}=e,c=Bb(qb,n),u=$b(n),d=o.useRef(null),p=Bi(t,d),[g,m]=o.useState(!1);return o.useEffect(()=>{if(g){const e=document.body;return Fb=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=Fb,e.style.webkitUserSelect=Fb}}},[g]),o.useEffect(()=>{if(d.current){const e=()=>{m(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{""!==document.getSelection()?.toString()&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),o.useEffect(()=>{if(d.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}(d.current);e.forEach(e=>e.setAttribute("tabindex","-1"))}}),f.jsx(ma,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:s,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:Li(a,e=>{e.preventDefault()}),onDismiss:c.onDismiss,children:f.jsx(Ul,{...u,...l,onPointerDown:Li(l.onPointerDown,e=>{e.currentTarget.contains(e.target)&&m(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:p,style:{...l.style,userSelect:g?"text":void 0,WebkitUserSelect:g?"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 Yb(e){return t=>"touch"===t.pointerType?void 0:e()}o.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=$b(n);return f.jsx(Wl,{...o,...r,ref:t})}).displayName="HoverCardArrow";var Jb=Kb;const Zb=Vb,Qb=Gb,ev=o.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>f.jsx(Jb,{ref:o,align:t,sideOffset:n,className:Ai("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 tv({children:e,trigger:t,fieldName:n,align:r="start"}){return f.jsxs(Zb,{children:[f.jsx(Qb,{className:"cursor-pointer",children:t??Ob.info_input}),f.jsxs(ev,{align:r,className:"bg-[#0A0D14] text-[#CDD0D5] text-xs font-normal border-none",children:[n?f.jsx("p",{className:"text-sm font-medium text-white first-letter:uppercase",children:n}):null,e]})]})}function nv({status:e}){return f.jsx("span",{className:Ai("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("_"," ")})}ev.displayName=Jb.displayName;const rv=[{accessorKey:"item_description",header:"item description",cell:({row:e})=>{const t=e.original;return f.jsxs("div",{className:"flex items-center gap-5",children:[f.jsx("div",{className:"w-[50px] h-[50px] rounded-2xl relative bg-gray-100",children:f.jsx("img",{src:t.item_image,alt:"item image",className:"rounded-2xl object-cover w-full h-full",draggable:!1})}),f.jsxs("div",{className:"space-y-1 max-w-[265px]",children:[f.jsx(ov,{title:t.item_description,item_uuid:t.uuid,item_type_id:t.item_type_id,data:t.fullData}),f.jsxs("p",{className:"text-dark text-xs font-normal flex items-center gap-1",children:[f.jsx("span",{className:"uppercase whitespace-nowrap",children:t.sku}),t.barcode?.length>0?f.jsxs(f.Fragment,{children:[f.jsx("span",{children:"|"}),t.barcode?.[0]?.barcode,t.barcode.length>1?f.jsxs("span",{className:"rounded bg-[#9747FF1A] px-[5px] flex items-center text-[#7239EA] font-semibold text-[11px] h-[18px]",children:["+",t.barcode?.length-1]}):null]}):null,t.expired?f.jsxs(f.Fragment,{children:[f.jsx("span",{children:"|"}),"Expired",f.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?f.jsxs(f.Fragment,{children:[f.jsx("span",{children:"|"}),"Expiring",f.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:()=>f.jsx("p",{children:"quantity"}),cell:({row:e})=>{const t=e.original;return f.jsxs(f.Fragment,{children:[f.jsx("div",{className:Ai("flex items-center",t.quantity<=0?"text-danger":Number(t.reorder_level)==t.quantity?"text-orange":null),children:f.jsx("p",{children:Nb(t.quantity)+t.unit})}),t.all_quantity===t.quantity?null:f.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 f.jsx("p",{className:"capitalize",children:t.type})}},{accessorKey:"selling_price",header:"Selling Price (₦)",cell:({row:e})=>{const t=e.original;return f.jsx("p",{children:jb(t.selling_price??0)})}},{accessorKey:"categories",header:"categories/Tags",cell:({row:e})=>{const t=e.original;return f.jsxs(f.Fragment,{children:[" ",f.jsxs("div",{className:"flex items-center gap-2 capitalize",children:[t.categories&&t.categories?.length>0?t.categories?.[0]?.name:"...",t.categories.length>1?f.jsx(tv,{align:"center",fieldName:"Categories",trigger:f.jsxs("button",{className:"rounded bg-[#9747FF1A] px-[5px] flex items-center text-[#7239EA] font-semibold text-[11px] h-[18px]",children:["+",t.categories.length-1]}),children:f.jsx("ul",{className:"list-disc pl-4",children:t.categories.map((e,t)=>f.jsx("li",{children:e.name},t))})}):null]}),f.jsxs("div",{className:"text-gray-700 flex items-center gap-2 capitalize",children:[t.tags?.[0],t.tags?.length>1?f.jsx(tv,{align:"center",fieldName:"Tags",trigger:f.jsxs("button",{className:"rounded bg-[#9747FF1A] px-[5px] flex items-center text-[#7239EA] font-semibold text-[11px] h-[18px]",children:["+",t.tags.length-1]}),children:f.jsx("ul",{className:"list-disc pl-4",children:t.tags.map((e,t)=>f.jsx("li",{children:e},t))})}):null]})]})}},{accessorKey:"status",cell:({row:e})=>{const t=e.getValue("status");return f.jsx(nv,{status:t})}}],ov=({title:e,item_uuid:n,item_type_id:r,data:o})=>{const[i,a]=t.useState(!1),[s,l]=t.useState(!1),[c,u]=t.useState(!1);return f.jsx(f.Fragment,{children:f.jsx("button",{className:Ai("text-primary font-bold text-sm first-letter:uppercase truncate max-w-[265px]",o.expired?"text-danger":""),title:e,children:e})})},iv=()=>{const{apiKey:e}=(()=>{const e=t.useContext(Ze);if(!e)throw new Error("useSDK must be used within SDKProvider");return e})(),[n,r]=t.useState([]),[o,i]=t.useState(null),[a,s]=t.useState(!1),{currentPage:l,perview:c}=j(e=>e.app);t.useEffect(()=>{const t=(e=>{e||console.warn("⚠️ No API key provided to createApiClient");const t=lr.create({baseURL:"https://biz.api.simpoocodes.com/api/gateway/v1",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})(e||"");e&&(async()=>{s(!0);try{const e=await t.get(`/outbound/items?page=${l}&paginate=${c}&status=all`);if(200===e.status&&"object"==typeof e.data&&null!==e.data&&"status"in e.data&&"success"===e.data.status&&"data"in e.data){const t=e.data.data?.[0];r(t?.data||[]),i(t?.meta||null)}}catch(e){console.error(e)}finally{s(!1),console.log("request completed.")}})()},[e,c,l]);const u=n.map(e=>({item_description:e?.name,all_quantity:+e?.all_quantity,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:"",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}));return f.jsx(Tb,{loading:a,columns:rv,data:u||[],emptyData:0===u.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})};let av={};function sv(e){av=e}function lv(e){const t=document.querySelector(e);if(!t)throw new Error(`Container "${e}" not found!`);n.createRoot(t).render(f.jsx(Qe,{apiKey:av.apiKey||"",children:f.jsx(iv,{})}))}"undefined"!=typeof window&&(window.SimpooSDK={init:sv,renderInventory:lv}),e.init=sv,e.renderInventory=lv});
131
131
  //# sourceMappingURL=simpoo-sdk.js.map