mantine-datatable 1.8.8 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 Ionuț-Cristian Florescu
3
+ Copyright (c) 2022-2023 Ionuț-Cristian Florescu
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -72,6 +72,7 @@ export default function GettingStartedExample() {
72
72
  );
73
73
  }
74
74
  ```
75
+
75
76
  Have a look at the available [component properties](https://icflorescu.github.io/mantine-datatable/component-properties) and make sure to browse the comprehensive list of [usage examples](https://icflorescu.github.io/mantine-datatable/examples/basic-usage).
76
77
 
77
78
  ## Code contributors
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableRowMenu.d.ts","sourceRoot":"","sources":["../DataTableRowMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAEjH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWvC,KAAK,qBAAqB,GAAG;IAC3B,YAAY,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC5C,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,YAAmB,EACnB,MAAa,EACb,MAAU,EACV,CAAC,EAAE,QAAQ,EACX,CAAC,EAAE,QAAQ,EACX,SAAS,EACT,QAAQ,GACT,EAAE,qBAAqB,eAoCvB"}
1
+ {"version":3,"file":"DataTableRowMenu.d.ts","sourceRoot":"","sources":["../DataTableRowMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,iBAAiB,EAAE,KAAK,aAAa,EAAE,MAAM,eAAe,CAAC;AAErH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAWvC,KAAK,qBAAqB,GAAG;IAC3B,YAAY,EAAE,iBAAiB,GAAG,SAAS,CAAC;IAC5C,MAAM,EAAE,aAAa,GAAG,SAAS,CAAC;IAClC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,YAAmB,EACnB,MAAa,EACb,MAAU,EACV,CAAC,EAAE,QAAQ,EACX,CAAC,EAAE,QAAQ,EACX,SAAS,EACT,QAAQ,GACT,EAAE,qBAAqB,eAkCvB"}
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableRowMenuItem.d.ts","sourceRoot":"","sources":["../DataTableRowMenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2C,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAC3F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA2CvC,KAAK,yBAAyB,GAAG;IAC/B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,yBAAyB,eAUhH"}
1
+ {"version":3,"file":"DataTableRowMenuItem.d.ts","sourceRoot":"","sources":["../DataTableRowMenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+C,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAC/F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA2CvC,KAAK,yBAAyB,GAAG;IAC/B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,yBAAyB,eAUhH"}
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var jr=Object.create;var Do=Object.defineProperty;var oa=Object.getOwnPropertyDescriptor;var ea=Object.getOwnPropertyNames;var ra=Object.getPrototypeOf,aa=Object.prototype.hasOwnProperty;var ta=(o,e)=>()=>(o&&(e=o(o=0)),e);var oe=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),fa=(o,e)=>{for(var r in e)Do(o,r,{get:e[r],enumerable:!0})},ve=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of ea(e))!aa.call(o,f)&&f!==r&&Do(o,f,{get:()=>e[f],enumerable:!(t=oa(e,f))||t.enumerable});return o};var He=(o,e,r)=>(r=o!=null?jr(ra(o)):{},ve(e||!o||!o.__esModule?Do(r,"default",{value:o,enumerable:!0}):r,o)),na=o=>ve(Do({},"__esModule",{value:!0}),o);var c,a=ta(()=>{"use strict";c=He(require("react"),1)});var qe=oe((va,Ee)=>{"use strict";a();var da="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Ee.exports=da});var Ue=oe((Na,Ve)=>{"use strict";a();var sa=qe();function We(){}function ze(){}ze.resetWarningCache=We;Ve.exports=function(){function o(t,f,n,d,u,m){if(m!==sa){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}o.isRequired=o;function e(){return o}var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:e,element:o,elementType:o,instanceOf:e,node:o,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:ze,resetWarningCache:We};return r.PropTypes=r,r}});var Xe=oe((za,Ge)=>{a();Ge.exports=Ue()();var qa,Wa});var ka={};fa(ka,{DataTable:()=>Se});module.exports=na(ka);a();a();var K=require("@mantine/core"),ho=require("@mantine/hooks"),ir=require("react");a();var Ne=require("@mantine/core"),ee=require("react/jsx-runtime"),la=(0,Ne.createStyles)({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function re(){let{classes:o}=la();return(0,ee.jsx)("tr",{className:o.root,children:(0,ee.jsx)("td",{})})}a();var to=require("@mantine/core");a();a();var Co=require("react"),U=He(Xe());a();var Ze={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var ca=Object.defineProperty,ua=Object.defineProperties,pa=Object.getOwnPropertyDescriptors,Fo=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,Ke=(o,e,r)=>e in o?ca(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,$e=(o,e)=>{for(var r in e||(e={}))_e.call(e,r)&&Ke(o,r,e[r]);if(Fo)for(var r of Fo(e))Ye.call(e,r)&&Ke(o,r,e[r]);return o},ma=(o,e)=>ua(o,pa(e)),xa=(o,e)=>{var r={};for(var t in o)_e.call(o,t)&&e.indexOf(t)<0&&(r[t]=o[t]);if(o!=null&&Fo)for(var t of Fo(o))e.indexOf(t)<0&&Ye.call(o,t)&&(r[t]=o[t]);return r},ao=(o,e,r)=>{let t=(0,Co.forwardRef)((f,n)=>{var d=f,{color:u="currentColor",size:m=24,stroke:p=2,children:l}=d,i=xa(d,["color","size","stroke","children"]);return(0,Co.createElement)("svg",$e(ma($e({ref:n},Ze),{width:m,height:m,stroke:u,strokeWidth:p,className:`tabler-icon tabler-icon-${o}`}),i),[...r.map(([x,s])=>(0,Co.createElement)(x,s)),...l||[]])});return t.propTypes={color:U.default.string,size:U.default.oneOfType([U.default.string,U.default.number]),stroke:U.default.oneOfType([U.default.string,U.default.number])},t.displayName=`${e}`,t};a();var ae=ao("arrow-up","IconArrowUp",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]]);a();var te=ao("arrows-vertical","IconArrowsVertical",[["path",{d:"M8 7l4 -4l4 4",key:"svg-0"}],["path",{d:"M8 17l4 4l4 -4",key:"svg-1"}],["path",{d:"M12 3l0 18",key:"svg-2"}]]);a();var fe=ao("database-off","IconDatabaseOff",[["path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74",key:"svg-0"}],["path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6",key:"svg-1"}],["path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]]);var H=require("react/jsx-runtime"),Ia=(0,to.createStyles)(o=>({root:{position:"absolute",top:0,right:0,bottom:0,left:0,flexDirection:"column",pointerEvents:"none",color:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[6],opacity:0,transition:"opacity .15s ease"},active:{opacity:1},standardIcon:{fontSize:0,borderRadius:"50%",padding:o.spacing.xs,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[2]}}));function ne({icon:o,text:e,pt:r,pb:t,active:f,children:n}){let{classes:d,cx:u}=Ia();return(0,H.jsx)(to.Center,{pt:r,pb:t,className:u(d.root,{[d.active]:f}),children:n||(0,H.jsxs)(H.Fragment,{children:[o||(0,H.jsx)("div",{className:d.standardIcon,children:(0,H.jsx)(fe,{})}),(0,H.jsx)(to.Text,{size:"sm",color:"dimmed",children:e})]})})}a();var G=require("@mantine/core"),Je=require("react");a();var F=require("@mantine/core"),A=require("react/jsx-runtime"),Qe={xs:22,sm:26,md:32,lg:38,xl:44};function le({size:o,label:e,values:r,value:t,onChange:f,color:n}){return(0,A.jsxs)(F.Group,{spacing:"xs",children:[(0,A.jsx)(F.Text,{size:o,children:e}),(0,A.jsxs)(F.Menu,{withinPortal:!0,withArrow:!0,children:[(0,A.jsx)(F.Menu.Target,{children:(0,A.jsx)(F.Button,{size:o,variant:"default",sx:[{fontWeight:"normal"},d=>({height:Qe[o],paddingLeft:d.spacing[o],paddingRight:d.spacing[o]})],children:t})}),(0,A.jsx)(F.Menu.Dropdown,{children:r.map(d=>{let u=d===t;return(0,A.jsx)(F.Menu.Item,{sx:[{height:Qe[o]},m=>({"&&":{color:u?m.white:void 0},background:u?m.colors[n||m.primaryColor][6]:void 0})],disabled:u,onClick:()=>f(d),children:(0,A.jsx)(F.Text,{size:o,children:d})},d)})})]})]})}var fo=require("react/jsx-runtime"),ia=(0,G.createStyles)((o,{topBorderColor:e,paginationWrapBreakpoint:r})=>({root:{background:o.colorScheme==="dark"?o.colors.dark[7]:o.white,borderTop:`1px solid ${typeof e=="function"?e(o):e}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",gap:o.spacing.xs,[o.fn.largerThan(r)]:{flexDirection:"row"}},text:{flex:"1 1 auto"},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}})),je=(0,Je.forwardRef)(function({className:e,style:r,topBorderColor:t,fetching:f,page:n,onPageChange:d,paginationColor:u,paginationSize:m,loadingText:p,noRecordsText:l,paginationText:i,totalRecords:x,recordsPerPage:s,onRecordsPerPageChange:g,recordsPerPageLabel:C,recordsPerPageOptions:h,recordsLength:y,horizontalSpacing:$,paginationWrapBreakpoint:M},w){let R;if(f)R=p;else if(!x)R=l;else{let z=(n-1)*s+1,co=z+y-1;R=i({from:z,to:co,totalRecords:x})}let{classes:O,cx:k}=ia({topBorderColor:t,paginationWrapBreakpoint:M});return(0,fo.jsxs)(G.Box,{ref:w,px:$??"xs",py:"xs",className:k(O.root,e),style:r,children:[(0,fo.jsx)(G.Text,{className:O.text,size:m,children:R}),h&&(0,fo.jsx)(le,{size:m,label:C,values:h,value:s,onChange:g}),(0,fo.jsx)(G.Pagination,{color:u,className:k(O.pagination,{[O.paginationFetching]:f||!y}),page:n,onChange:d,size:m,total:Math.ceil(x/s)})]})});a();var Lo=require("@mantine/core"),ar=require("react");a();var P=require("@mantine/core");a();var or=require("@mantine/core"),er=require("@mantine/hooks");function ko(o){let e=(0,or.useMantineTheme)(),r=typeof o=="function"?o(e):o;return(0,er.useMediaQuery)(r||"",!0)}function Ao(o){let e=o.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}function rr(o,e,r){return o.filter(t=>!e.map(r).includes(r(t)))}function Po(o,e){return o.filter((r,t,f)=>t===f.findIndex(n=>e(r)===e(n)))}function S(o,e){return e?e.match(/([^[.\]])+/g).reduce((t,f)=>t&&t[f],o):void 0}var N=require("react/jsx-runtime"),ga=(0,P.createStyles)(o=>({sortableColumnHeader:{cursor:"pointer",transition:"background .15s ease","&:hover":{background:o.colorScheme==="dark"?o.colors.dark[6]:o.colors.gray[0]}},sortableColumnHeaderGroup:{gap:"0.25em"},columnHeaderText:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},sortableColumnHeaderText:{minWidth:0,flexGrow:1},sortableColumnHeaderIcon:{transition:"transform .15s ease"},sortableColumnHeaderIconRotated:{transform:"rotate3d(0, 0, 1, 180deg)"},sortableColumnHeaderNeutralIcon:{color:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[5],transition:"color .15s ease","th:hover &":{color:o.colorScheme==="dark"?o.colors.dark[2]:o.colors.gray[6]}}}));function de({className:o,sx:e,style:r,accessor:t,visibleMediaQuery:f,title:n,sortable:d,textAlignment:u,width:m,sortStatus:p,onSortStatusChange:l}){let{cx:i,classes:x}=ga();if(!ko(f))return null;let s=n??Ao(t),g=typeof s=="string"?s:void 0;return(0,N.jsx)(P.Box,{component:"th",className:i({[x.sortableColumnHeader]:d},o),sx:[{"&&":{textAlign:u},width:m,minWidth:m,maxWidth:m},e],style:r,role:d?"button":void 0,onClick:d&&l?()=>{l({columnAccessor:t,direction:p?.direction==="asc"?"desc":"asc"})}:void 0,children:d||p?.columnAccessor===t?(0,N.jsxs)(P.Group,{className:x.sortableColumnHeaderGroup,position:"apart",noWrap:!0,children:[(0,N.jsx)(P.Box,{className:i(x.columnHeaderText,x.sortableColumnHeaderText),title:g,children:s}),(0,N.jsx)(P.Center,{children:p?.columnAccessor===t?(0,N.jsx)(ae,{className:i(x.sortableColumnHeaderIcon,{[x.sortableColumnHeaderIconRotated]:p.direction==="desc"}),size:14}):(0,N.jsx)(te,{className:x.sortableColumnHeaderNeutralIcon,size:14})})]}):(0,N.jsx)(P.Box,{className:x.columnHeaderText,title:g,children:s})})}var J=require("react/jsx-runtime"),Ca=(0,Lo.createStyles)(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{zIndex:2,position:"sticky",top:0,background:o.colorScheme==="dark"?o.colors.dark[7]:o.white},textSelectionDisabled:{userSelect:"none"},selectorColumnHeader:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-o.spacing.sm,bottom:0,borderLeft:`1px solid ${o.colorScheme==="dark"?o.colors.dark[4]:o.colors.gray[3]}`,width:o.spacing.sm,background:`linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},selectorColumnHeaderWithRightShadow:{"&::after":{opacity:1}},selectionCheckboxInput:{cursor:"pointer"}}}),tr=(0,ar.forwardRef)(function({className:e,style:r,sortStatus:t,onSortStatusChange:f,columns:n,selectionVisible:d,selectionChecked:u,selectionIndeterminate:m,onSelectionChange:p,leftShadowVisible:l},i){let{classes:x,cx:s}=Ca();return(0,J.jsx)("thead",{className:s(x.root,e),style:r,ref:i,children:(0,J.jsxs)("tr",{children:[d&&(0,J.jsx)("th",{className:s(x.selectorColumnHeader,{[x.selectorColumnHeaderWithRightShadow]:l}),children:(0,J.jsx)(Lo.Checkbox,{classNames:{input:x.selectionCheckboxInput},checked:u,indeterminate:m,disabled:!p,onChange:p})}),n.map(({accessor:g,hidden:C,visibleMediaQuery:h,textAlignment:y,width:$,title:M,sortable:w,titleClassName:R,titleStyle:O,titleSx:k})=>C?null:(0,J.jsx)(de,{className:R,style:O,sx:k,accessor:g,visibleMediaQuery:h,textAlignment:y,width:$,title:M,sortable:w,sortStatus:t,onSortStatusChange:f},g))]})})});a();var no=require("@mantine/core"),se=require("react/jsx-runtime"),Sa=(0,no.createStyles)(o=>({root:{zIndex:3,position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",background:o.fn.rgba(o.colorScheme==="dark"?o.colors.dark[8]:o.white,.75),opacity:0,transition:"opacity .15s ease"},fetching:{pointerEvents:"all",opacity:1}}));function ce({pt:o,pb:e,fetching:r,customContent:t,backgroundBlur:f,size:n,variant:d,color:u}){let{classes:m,cx:p}=Sa();return(0,se.jsx)(no.Center,{pt:o,pb:e,className:p(m.root,{[m.fetching]:r}),sx:f?{backdropFilter:`blur(${f}px)`}:void 0,children:r&&(t||(0,se.jsx)(no.Loader,{size:n,variant:d,color:u}))})}a();var qo=require("@mantine/core");a();var Mo=require("@mantine/core");var fr=require("react/jsx-runtime"),ha=(0,Mo.createStyles)({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function ue({className:o,sx:e,style:r,visibleMediaQuery:t,record:f,recordIndex:n,onClick:d,noWrap:u,ellipsis:m,textAlignment:p,width:l,accessor:i,render:x,defaultRender:s,customCellAttributes:g}){let{cx:C,classes:h}=ha();return ko(t)?(0,fr.jsx)(Mo.Box,{component:"td",className:C({[h.noWrap]:u||m,[h.ellipsis]:m,[h.withPointerCursor]:d},o),sx:[{width:l,minWidth:l,maxWidth:l,textAlign:p},e],style:r,onClick:d,...g?.(f,n),children:x?x(f,n):s?s(f,n,i):S(f,i)}):null}a();var No=require("@mantine/core");a();var X=require("@mantine/hooks"),L=require("react");var vo=200,Ho={leading:!0};function nr(){let[o,e]=(0,X.useDebouncedState)(!0,vo,Ho),[r,t]=(0,X.useDebouncedState)(!0,vo,Ho),[f,n]=(0,X.useDebouncedState)(!0,vo,Ho),[d,u]=(0,X.useDebouncedState)(!0,vo,Ho);return{scrolledToTop:o,setScrolledToTop:e,scrolledToBottom:r,setScrolledToBottom:t,scrolledToLeft:f,setScrolledToLeft:n,scrolledToRight:d,setScrolledToRight:u}}function lr(o){let[e,r]=(0,L.useState)(null),t=o?.join(":")||"";return(0,L.useEffect)(()=>{r(null)},[t]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:r}}function dr(o){let[e,r]=(0,L.useState)(null);return(0,L.useEffect)(()=>{o&&r(null)},[o]),{rowContextMenuInfo:e,setRowContextMenuInfo:r}}function sr({rowExpansion:o,records:e,idAccessor:r}){let t=[];if(o&&e){let{trigger:u,allowMultiple:m,initiallyExpanded:p}=o;e&&u==="always"?t=e.map(l=>S(l,r)):p&&(t=e.filter(p).map(l=>S(l,r)),m||(t=[t[0]]))}let f,n,d=(0,L.useState)(t);if(o){let{trigger:u,allowMultiple:m,collapseProps:p,content:l}=o;o.expanded?{recordIds:f,onRecordIdsChange:n}=o.expanded:[f,n]=d;let i=x=>n(f.filter(s=>s!==S(x,r)));return{expandOnClick:u!=="always"&&u!=="never",isRowExpanded:x=>u==="always"?!0:f.includes(S(x,r)),expandRow:x=>{let s=S(x,r);n(m?[...f,s]:[s])},collapseRow:i,collapseProps:p,content:(x,s)=>()=>l({record:x,recordIndex:s,collapse:()=>i(x)})}}}function cr(o,e){let[r,t]=(0,L.useState)(o),[f,n]=(0,L.useState)(o),d=(0,X.useTimeout)(()=>t(!0),0),u=(0,X.useTimeout)(()=>n(!1),e||200);return(0,L.useEffect)(()=>{o?(u.clear(),n(!0),d.start()):(d.clear(),t(!1),u.start())},[d,u,o]),{expanded:r,visible:f}}var E=require("react/jsx-runtime"),ba=(0,No.createStyles)({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function pe({open:o,colSpan:e,content:r,collapseProps:t}){let{expanded:f,visible:n}=cr(o,t?.transitionDuration),{cx:d,classes:u}=ba();return n?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)("tr",{}),(0,E.jsx)("tr",{children:(0,E.jsx)("td",{className:d(u.cell,{[u.expandedCell]:f}),colSpan:e,children:(0,E.jsx)(No.Collapse,{in:f,...t,children:r()})})})]}):null}a();var Eo=require("@mantine/core"),me=require("react/jsx-runtime"),Ba=(0,Eo.createStyles)(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",zIndex:1,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-o.spacing.sm,bottom:0,borderLeft:`1px solid ${o.colorScheme==="dark"?o.colors.dark[4]:o.colors.gray[3]}`,width:o.spacing.sm,background:`linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},withRightShadow:{"&::after":{opacity:1}},checkbox:{cursor:"pointer"}}});function xe({withRightShadow:o,...e}){let{cx:r,classes:t}=Ba();return(0,me.jsx)("td",{className:r(t.root,{[t.withRightShadow]:o}),children:(0,me.jsx)(Eo.Checkbox,{classNames:{input:t.checkbox},...e,onClick:f=>f.stopPropagation()})})}var q=require("react/jsx-runtime"),ya=(0,qo.createStyles)(o=>{let e=o.colors[o.primaryColor][6];return{withPointerCursor:{cursor:"pointer"},selected:{"&&":{"tr&":{background:o.colorScheme==="dark"?o.fn.darken(e,.6):o.fn.lighten(e,.9)},"table[data-striped] tbody &:nth-of-type(odd)":{background:o.colorScheme==="dark"?o.fn.darken(e,.55):o.fn.lighten(e,.85)}}},contextMenuVisible:{"&&":{"tr&":{background:o.colorScheme==="dark"?o.fn.darken(e,.5):o.fn.lighten(e,.7)},"table[data-striped] tbody &:nth-of-type(odd)":{background:o.colorScheme==="dark"?o.fn.darken(e,.45):o.fn.lighten(e,.65)}}}}});function Ie({record:o,recordIndex:e,columns:r,defaultColumnRender:t,selectionVisible:f,selectionChecked:n,onSelectionChange:d,isRecordSelectable:u,onClick:m,onCellClick:p,onContextMenu:l,expansion:i,customRowAttributes:x,className:s,style:g,sx:C,contextMenuVisible:h,leftShadowVisible:y}){let{cx:$,classes:M}=ya();return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(qo.Box,{component:"tr",className:$({[M.withPointerCursor]:m||i?.expandOnClick,[M.selected]:n,[M.contextMenuVisible]:h},typeof s=="function"?s(o,e):s),onClick:w=>{if(i){let{isRowExpanded:R,expandOnClick:O,expandRow:k,collapseRow:z}=i;O&&(R(o)?z(o):k(o))}m?.(w)},style:typeof g=="function"?g(o,e):g,sx:C,...x?.(o,e),onContextMenu:l,children:[f&&(0,q.jsx)(xe,{withRightShadow:y,checked:n,disabled:!d||(u?!u(o,e):!1),onChange:d}),r.map((w,R)=>{let{accessor:O,hidden:k,visibleMediaQuery:z,textAlignment:co,noWrap:Wo,ellipsis:zo,width:Vo,render:Uo,cellsClassName:uo,cellsStyle:po,cellsSx:Go,customCellAttributes:Xo}=w,bo;return p&&(bo=()=>p({record:o,recordIndex:e,column:w,columnIndex:R})),k?null:(0,q.jsx)(ue,{className:typeof uo=="function"?uo(o,e):uo,style:typeof po=="function"?po(o,e):po,sx:Go,visibleMediaQuery:z,record:o,recordIndex:e,onClick:bo,accessor:O,textAlignment:co,noWrap:Wo,ellipsis:zo,width:Vo,render:Uo,defaultRender:t,customCellAttributes:Xo},O)})]}),i&&(0,q.jsx)(pe,{colSpan:r.filter(w=>!w.hidden).length+(f?1:0),open:i.isRowExpanded(o),content:i.content(o,e),collapseProps:i.collapseProps})]})}a();var lo=require("@mantine/core"),W=require("@mantine/hooks"),ur=require("react/jsx-runtime"),Ta=(0,lo.createStyles)(o=>({root:{position:"fixed",border:`1px solid ${o.colorScheme==="dark"?o.colors.dark[4]:o.colors.gray[3]}`,overflow:"hidden",transition:"all .15s ease"}}));function ie({borderRadius:o="xs",shadow:e="sm",zIndex:r=3,y:t,x:f,onDestroy:n,children:d}){(0,W.useWindowEvent)("resize",n),(0,W.useWindowEvent)("scroll",n);let u=(0,W.useClickOutside)(n),{ref:m,width:p,height:l}=(0,W.useElementSize)(),i=(0,W.useMergedRef)(u,m),{dir:x,spacing:{md:s}}=(0,lo.useMantineTheme)(),{innerWidth:g,innerHeight:C}=window,{classes:h}=Ta();return(0,ur.jsx)(lo.Paper,{ref:i,shadow:e,radius:o,className:h.root,sx:{zIndex:r,top:t+l+s>C?C-l-s:t,left:x==="ltr"?f+p+s>g?g-p-s:f:g-s-(f-p-s<0?p+s:f)},children:d})}a();var pr=require("@mantine/core"),mr=require("react/jsx-runtime"),wa=(0,pr.createStyles)(o=>({root:{height:1,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[1]}}));function ge(){let{classes:o}=wa();return(0,mr.jsx)("div",{className:o.root})}a();var Z=require("@mantine/core"),So=require("react/jsx-runtime"),Ra=(0,Z.createStyles)((o,{color:e})=>{let r=o.spacing.sm/2;return{root:{width:"100%",display:"flex",alignItems:"center",paddingTop:r,paddingBottom:r,paddingLeft:o.spacing.sm,paddingRight:o.spacing.sm,color:e&&o.colors[e][6],transition:"background .15s ease","&[disabled]":{cursor:"not-allowed",color:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[5]},"&:hover:not([disabled])":{background:o.fn.rgba(e?o.colors[e][6]:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[4],e?o.colorScheme==="dark"?.15:.08:.25)},"&:active:not([disabled])":{background:o.fn.rgba(e?o.colors[e][6]:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[4],e?o.colorScheme==="dark"?.3:.2:.5)}},icon:{fontSize:0,marginRight:o.spacing.xs},title:{whiteSpace:"nowrap"}}});function Ce({icon:o,title:e,color:r,disabled:t,onClick:f}){let{classes:n}=Ra({color:r});return(0,So.jsxs)(Z.UnstyledButton,{className:n.root,disabled:t,onClick:f,children:[o&&(0,So.jsx)(Z.Box,{className:n.icon,children:o}),(0,So.jsx)(Z.Text,{className:n.title,size:"sm",children:e})]})}a();var so=require("@mantine/core"),xr=require("react"),j=require("react/jsx-runtime"),Oa=(0,so.createStyles)(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{flex:"1 1 100%"},scrollbar:{'&[data-state="visible"]':{background:"transparent"},"div::before":{pointerEvents:"none"}},corner:{background:"transparent"},thumb:{zIndex:3},shadow:{position:"absolute",pointerEvents:"none",opacity:0,transition:"opacity .15s ease"},topShadow:{zIndex:2,top:0,left:0,right:0,height:o.spacing.sm,background:`linear-gradient(${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`},leftShadow:{zIndex:3,top:0,left:0,bottom:0,width:o.spacing.sm,background:`linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`},rightShadow:{zIndex:2,top:0,bottom:0,right:0,width:o.spacing.sm,background:`linear-gradient(to left, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to left, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`},bottomShadow:{zIndex:2,left:0,right:0,bottom:0,height:o.spacing.sm,background:`linear-gradient(${o.fn.rgba(o.black,0)}, ${o.fn.rgba(o.black,e)}), linear-gradient(${o.fn.rgba(o.black,0)} 30%, ${o.fn.rgba(o.black,e)})`},shadowVisible:{opacity:1}}}),Ir=(0,xr.forwardRef)(function({topShadowVisible:e,leftShadowVisible:r,rightShadowVisible:t,bottomShadowVisible:f,headerHeight:n,onScrollPositionChange:d,children:u},m){let{cx:p,classes:l}=Oa();return(0,j.jsxs)(so.ScrollArea,{viewportRef:m,classNames:{root:l.root,scrollbar:l.scrollbar,thumb:l.thumb,corner:l.corner},styles:{scrollbar:{marginTop:n}},onScrollPositionChange:d,children:[u,(0,j.jsx)(so.Box,{className:p(l.shadow,l.topShadow,{[l.shadowVisible]:e}),sx:{top:n}}),(0,j.jsx)("div",{className:p(l.shadow,l.leftShadow,{[l.shadowVisible]:r})}),(0,j.jsx)("div",{className:p(l.shadow,l.rightShadow,{[l.shadowVisible]:t})}),(0,j.jsx)("div",{className:p(l.shadow,l.bottomShadow,{[l.shadowVisible]:f})})]})});var B=require("react/jsx-runtime"),Da={},Fa=(0,K.createStyles)((o,{borderColor:e,rowBorderColor:r})=>{let t=typeof e=="function"?e(o):e,f=typeof r=="function"?r(o):r;return{root:{position:"relative",display:"flex",flexDirection:"column",overflow:"hidden",tr:{backgroundColor:o.colorScheme==="dark"?o.colors.dark[7]:o.white},"&&":{"thead tr th":{borderBottomColor:t},"tbody tr td":{borderTopColor:f}}},lastRowBorderBottomVisible:{"tbody tr:last-of-type td":{borderBottom:`1px solid ${f}`}},textSelectionDisabled:{userSelect:"none"},table:{borderCollapse:"separate",borderSpacing:0},tableWithBorder:{border:`1px solid ${t}`},tableWithColumnBorders:{"&&":{"th, td":{":not(:first-of-type)":{borderLeft:`1px solid ${f}`}}}},verticalAlignmentTop:{td:{verticalAlign:"top"}},verticalAlignmentBottom:{td:{verticalAlign:"bottom"}}}});function Se({withBorder:o,borderRadius:e,borderColor:r=b=>b.colorScheme==="dark"?b.colors.dark[4]:b.colors.gray[3],rowBorderColor:t=b=>b.fn.rgba(b.colorScheme==="dark"?b.colors.dark[4]:b.colors.gray[3],.65),withColumnBorders:f,textSelectionDisabled:n,height:d="100%",minHeight:u,shadow:m,verticalAlignment:p="center",fetching:l,columns:i,defaultColumnRender:x,idAccessor:s="id",records:g,selectedRecords:C,onSelectedRecordsChange:h,isRecordSelectable:y,sortStatus:$,onSortStatusChange:M,horizontalSpacing:w,page:R,onPageChange:O,totalRecords:k,recordsPerPage:z,onRecordsPerPageChange:co,recordsPerPageOptions:Wo,recordsPerPageLabel:zo="Records per page",paginationColor:Vo,paginationSize:Uo="sm",paginationText:uo=({from:b,to:mo,totalRecords:oo})=>`${b} - ${mo} / ${oo}`,paginationWrapBreakpoint:po="sm",loaderBackgroundBlur:Go,customLoader:Xo,loaderSize:bo,loaderVariant:gr,loaderColor:Cr,loadingText:Sr="...",emptyState:hr,noRecordsText:he="No records",noRecordsIcon:br,striped:Br,onRowClick:Zo,onCellClick:yr,rowContextMenu:v,rowExpansion:Tr,rowClassName:wr,rowStyle:Rr,rowSx:Or,customRowAttributes:Dr,bodyRef:Fr,m:kr,my:Ar,mx:Pr,mt:Lr,mb:Mr,ml:vr,mr:Hr,sx:Nr,className:Er,classNames:Ko,style:qr,styles:$o,...Wr}){let{ref:b,width:mo,height:oo}=(0,ho.useElementSize)(),{ref:zr,height:_o}=(0,ho.useElementSize)(),{ref:Vr,width:Yo,height:Bo}=(0,ho.useElementSize)(),{ref:Ur,height:be}=(0,ho.useElementSize)(),{scrolledToTop:Gr,setScrolledToTop:Be,scrolledToBottom:Xr,setScrolledToBottom:ye,scrolledToLeft:Te,setScrolledToLeft:we,scrolledToRight:Zr,setScrolledToRight:Re}=nr(),{rowContextMenuInfo:_,setRowContextMenuInfo:xo}=dr(l),Kr=sr({rowExpansion:Tr,records:g,idAccessor:s}),Oe=()=>{if(!l&&v&&xo(null),l||Bo<=oo)Be(!0),ye(!0);else{let I=b.current.scrollTop;Be(I===0),ye(Math.round(Bo-I)===Math.round(oo))}if(l||Yo===mo)we(!0),Re(!0);else{let I=b.current.scrollLeft;we(I===0),Re(Math.round(Yo-I)===Math.round(mo))}};(0,ir.useEffect)(Oe,[l,oo,b,mo,Bo,Yo]);let $r=I=>{b.current.scrollTo({top:0,left:0}),O(I)},yo=g?.length,De=g?.map(I=>S(I,s)),Io=C?.map(I=>S(I,s)),Fe=De!==void 0&&Io!==void 0&&Io.length>0,ke=y?g?.filter(y):g,Qo=ke?.map(I=>S(I,s)),Jo=Fe&&Qo.every(I=>Io.includes(I)),_r=Fe&&Qo.some(I=>Io.includes(I)),Ae;h&&(Ae=()=>{h(Jo?C.filter(I=>!Qo.includes(S(I,s))):Po([...C,...ke],I=>S(I,s)))});let{lastSelectionChangeIndex:To,setLastSelectionChangeIndex:Yr}=lr(De),Pe=!!C&&!Te,{cx:Le,classes:V,theme:Qr}=Fa({borderColor:r,rowBorderColor:t}),Jr={m:kr,my:Ar,mx:Pr,mt:Lr,mb:Mr,ml:vr,mr:Hr},jo=typeof $o=="function"?$o(Qr,Da):$o;return(0,B.jsxs)(K.Box,{...Jr,className:Le(V.root,{[V.tableWithBorder]:o},Er,Ko?.root),sx:[I=>({borderRadius:I.radius[e]||e,boxShadow:I.shadows[m]||m,height:d,minHeight:u}),...(0,K.packSx)(Nr)],style:{...jo?.root,...qr},children:[(0,B.jsx)(Ir,{ref:b,topShadowVisible:!Gr,leftShadowVisible:!(C||Te),rightShadowVisible:!Zr,bottomShadowVisible:!Xr,headerHeight:_o,onScrollPositionChange:Oe,children:(0,B.jsxs)(K.Table,{ref:Vr,horizontalSpacing:w,className:Le(V.table,{[V.tableWithColumnBorders]:f,[V.lastRowBorderBottomVisible]:Bo<oo,[V.textSelectionDisabled]:n,[V.verticalAlignmentTop]:p==="top",[V.verticalAlignmentBottom]:p==="bottom"}),striped:yo?Br:!1,...Wr,children:[(0,B.jsx)(tr,{ref:zr,className:Ko?.header,style:jo?.header,columns:i,sortStatus:$,onSortStatusChange:M,selectionVisible:!!C,selectionChecked:Jo,selectionIndeterminate:_r&&!Jo,onSelectionChange:Ae,leftShadowVisible:Pe}),(0,B.jsx)("tbody",{ref:Fr,children:yo?g.map((I,T)=>{let eo=S(I,s),io=Io?.includes(eo)||!1,wo=!1,Ro=!1;if(v){let{hidden:D}=v;(!D||!(typeof D=="function"?D(I,T):D))&&(v.trigger==="click"?wo=!0:Ro=!0)}let Oo;h&&(Oo=D=>{if(D.nativeEvent.shiftKey&&To!==null){let ro=g.filter(T>To?(Y,Q)=>Q>=To&&Q<=T&&(y?y(Y,Q):!0):(Y,Q)=>Q>=T&&Q<=To&&(y?y(Y,Q):!0));h(io?rr(C,ro,Y=>S(Y,s)):Po([...C,...ro],Y=>S(Y,s)))}else h(io?C.filter(ro=>S(ro,s)!==eo):Po([...C,I],ro=>S(ro,s)));Yr(T)});let go;wo?go=D=>{xo({y:D.clientY,x:D.clientX,record:I,recordIndex:T}),Zo?.(I,T)}:Zo&&(go=()=>{Zo(I,T)});let Me;return Ro&&(Me=D=>{D.preventDefault(),xo({y:D.clientY,x:D.clientX,record:I,recordIndex:T})}),(0,B.jsx)(Ie,{record:I,recordIndex:T,columns:i,defaultColumnRender:x,selectionVisible:!!C,selectionChecked:io,onSelectionChange:Oo,isRecordSelectable:y,onClick:go,onCellClick:yr,onContextMenu:Me,contextMenuVisible:_?S(_.record,s)===eo:!1,expansion:Kr,className:wr,style:Rr,sx:Or,customRowAttributes:Dr,leftShadowVisible:Pe},eo)}):(0,B.jsx)(re,{})})]})}),R&&(0,B.jsx)(je,{ref:Ur,className:Ko?.pagination,style:jo?.pagination,topBorderColor:r,horizontalSpacing:w,fetching:l,page:R,onPageChange:$r,totalRecords:k,recordsPerPage:z,onRecordsPerPageChange:co,recordsPerPageOptions:Wo,recordsPerPageLabel:zo,paginationColor:Vo,paginationSize:Uo,paginationText:uo,paginationWrapBreakpoint:po,noRecordsText:he,loadingText:Sr,recordsLength:yo}),(0,B.jsx)(ce,{pt:_o,pb:be,fetching:l,backgroundBlur:Go,customContent:Xo,size:bo,variant:gr,color:Cr}),(0,B.jsx)(ne,{pt:_o,pb:be,icon:br,text:he,active:!l&&!yo,children:hr}),v&&_&&(0,B.jsx)(ie,{zIndex:v.zIndex,borderRadius:v.borderRadius,shadow:v.shadow,y:_.y,x:_.x,onDestroy:()=>xo(null),children:v.items(_.record,_.recordIndex).map(({divider:I,key:T,title:eo,icon:io,color:wo,hidden:Ro,disabled:Oo,onClick:go})=>I?(0,B.jsx)(ge,{},T):Ro?null:(0,B.jsx)(Ce,{title:eo??Ao(T),icon:io,color:wo,disabled:Oo,onClick:()=>{xo(null),go()}},T))})]})}a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();
1
+ "use strict";var oa=Object.create;var Do=Object.defineProperty;var ea=Object.getOwnPropertyDescriptor;var ra=Object.getOwnPropertyNames;var aa=Object.getPrototypeOf,ta=Object.prototype.hasOwnProperty;var fa=(o,e)=>()=>(o&&(e=o(o=0)),e);var oe=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),na=(o,e)=>{for(var r in e)Do(o,r,{get:e[r],enumerable:!0})},ve=(o,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of ra(e))!ta.call(o,f)&&f!==r&&Do(o,f,{get:()=>e[f],enumerable:!(t=ea(e,f))||t.enumerable});return o};var He=(o,e,r)=>(r=o!=null?oa(aa(o)):{},ve(e||!o||!o.__esModule?Do(r,"default",{value:o,enumerable:!0}):r,o)),la=o=>ve(Do({},"__esModule",{value:!0}),o);var s,a=fa(()=>{"use strict";s=He(require("react"),1)});var qe=oe((va,Ee)=>{"use strict";a();var sa="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";Ee.exports=sa});var Ue=oe((Na,Ve)=>{"use strict";a();var ca=qe();function We(){}function ze(){}ze.resetWarningCache=We;Ve.exports=function(){function o(t,f,n,d,c,m){if(m!==ca){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}o.isRequired=o;function e(){return o}var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:e,element:o,elementType:o,instanceOf:e,node:o,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:ze,resetWarningCache:We};return r.PropTypes=r,r}});var Xe=oe((za,Ge)=>{a();Ge.exports=Ue()();var qa,Wa});var ka={};na(ka,{DataTable:()=>Se});module.exports=la(ka);a();a();var $=require("@mantine/core"),ho=require("@mantine/hooks"),gr=require("react");a();var Ne=require("@mantine/core"),ee=require("react/jsx-runtime"),da=(0,Ne.createStyles)({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function re(){let{classes:o}=da();return(0,ee.jsx)("tr",{className:o.root,children:(0,ee.jsx)("td",{})})}a();var fo=require("@mantine/core");a();a();var Co=require("react"),G=He(Xe());a();var Ze={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var ua=Object.defineProperty,pa=Object.defineProperties,ma=Object.getOwnPropertyDescriptors,Fo=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,Ke=(o,e,r)=>e in o?ua(o,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):o[e]=r,$e=(o,e)=>{for(var r in e||(e={}))_e.call(e,r)&&Ke(o,r,e[r]);if(Fo)for(var r of Fo(e))Ye.call(e,r)&&Ke(o,r,e[r]);return o},xa=(o,e)=>pa(o,ma(e)),Ia=(o,e)=>{var r={};for(var t in o)_e.call(o,t)&&e.indexOf(t)<0&&(r[t]=o[t]);if(o!=null&&Fo)for(var t of Fo(o))e.indexOf(t)<0&&Ye.call(o,t)&&(r[t]=o[t]);return r},to=(o,e,r)=>{let t=(0,Co.forwardRef)((f,n)=>{var d=f,{color:c="currentColor",size:m=24,stroke:p=2,children:l}=d,g=Ia(d,["color","size","stroke","children"]);return(0,Co.createElement)("svg",$e(xa($e({ref:n},Ze),{width:m,height:m,stroke:c,strokeWidth:p,className:`tabler-icon tabler-icon-${o}`}),g),[...r.map(([x,u])=>(0,Co.createElement)(x,u)),...l||[]])});return t.propTypes={color:G.default.string,size:G.default.oneOfType([G.default.string,G.default.number]),stroke:G.default.oneOfType([G.default.string,G.default.number])},t.displayName=`${e}`,t};a();var ae=to("arrow-up","IconArrowUp",[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M18 11l-6 -6",key:"svg-1"}],["path",{d:"M6 11l6 -6",key:"svg-2"}]]);a();var te=to("arrows-vertical","IconArrowsVertical",[["path",{d:"M8 7l4 -4l4 4",key:"svg-0"}],["path",{d:"M8 17l4 4l4 -4",key:"svg-1"}],["path",{d:"M12 3l0 18",key:"svg-2"}]]);a();var fe=to("database-off","IconDatabaseOff",[["path",{d:"M12.983 8.978c3.955 -.182 7.017 -1.446 7.017 -2.978c0 -1.657 -3.582 -3 -8 -3c-1.661 0 -3.204 .19 -4.483 .515m-2.783 1.228c-.471 .382 -.734 .808 -.734 1.257c0 1.22 1.944 2.271 4.734 2.74",key:"svg-0"}],["path",{d:"M4 6v6c0 1.657 3.582 3 8 3c.986 0 1.93 -.067 2.802 -.19m3.187 -.82c1.251 -.53 2.011 -1.228 2.011 -1.99v-6",key:"svg-1"}],["path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]]);var N=require("react/jsx-runtime"),ia=(0,fo.createStyles)(o=>({root:{position:"absolute",top:0,right:0,bottom:0,left:0,flexDirection:"column",pointerEvents:"none",color:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[6],opacity:0,transition:"opacity .15s ease"},active:{opacity:1},standardIcon:{fontSize:0,borderRadius:"50%",padding:o.spacing.xs,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[2]}}));function ne({icon:o,text:e,pt:r,pb:t,active:f,children:n}){let{classes:d,cx:c}=ia();return(0,N.jsx)(fo.Center,{pt:r,pb:t,className:c(d.root,{[d.active]:f}),children:n||(0,N.jsxs)(N.Fragment,{children:[o||(0,N.jsx)("div",{className:d.standardIcon,children:(0,N.jsx)(fe,{})}),(0,N.jsx)(fo.Text,{size:"sm",color:"dimmed",children:e})]})})}a();var X=require("@mantine/core"),Je=require("react");a();var F=require("@mantine/core"),A=require("react/jsx-runtime"),Qe={xs:22,sm:26,md:32,lg:38,xl:44};function le({size:o,label:e,values:r,value:t,onChange:f,color:n}){return(0,A.jsxs)(F.Group,{spacing:"xs",children:[(0,A.jsx)(F.Text,{size:o,children:e}),(0,A.jsxs)(F.Menu,{withinPortal:!0,withArrow:!0,children:[(0,A.jsx)(F.Menu.Target,{children:(0,A.jsx)(F.Button,{size:o,variant:"default",sx:[{fontWeight:"normal"},d=>({height:Qe[o],paddingLeft:d.spacing[o],paddingRight:d.spacing[o]})],children:t})}),(0,A.jsx)(F.Menu.Dropdown,{children:r.map(d=>{let c=d===t;return(0,A.jsx)(F.Menu.Item,{sx:[{height:Qe[o]},m=>({"&&":{color:c?m.white:void 0},background:c?m.colors[n||m.primaryColor][6]:void 0})],disabled:c,onClick:()=>f(d),children:(0,A.jsx)(F.Text,{size:o,children:d})},d)})})]})]})}var no=require("react/jsx-runtime"),ga=(0,X.createStyles)((o,{topBorderColor:e,paginationWrapBreakpoint:r})=>({root:{background:o.colorScheme==="dark"?o.colors.dark[7]:o.white,borderTop:`1px solid ${typeof e=="function"?e(o):e}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",gap:o.spacing.xs,[o.fn.largerThan(r)]:{flexDirection:"row"}},text:{flex:"1 1 auto"},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}})),je=(0,Je.forwardRef)(function({className:e,style:r,topBorderColor:t,fetching:f,page:n,onPageChange:d,paginationColor:c,paginationSize:m,loadingText:p,noRecordsText:l,paginationText:g,totalRecords:x,recordsPerPage:u,onRecordsPerPageChange:i,recordsPerPageLabel:C,recordsPerPageOptions:h,recordsLength:b,horizontalSpacing:_,paginationWrapBreakpoint:v},w){let R;if(f)R=p;else if(!x)R=l;else{let V=(n-1)*u+1,co=V+b-1;R=g({from:V,to:co,totalRecords:x})}let{classes:O,cx:k}=ga({topBorderColor:t,paginationWrapBreakpoint:v});return(0,no.jsxs)(X.Box,{ref:w,px:_??"xs",py:"xs",className:k(O.root,e),style:r,children:[(0,no.jsx)(X.Text,{className:O.text,size:m,children:R}),h&&(0,no.jsx)(le,{size:m,label:C,values:h,value:u,onChange:i}),(0,no.jsx)(X.Pagination,{color:c,className:k(O.pagination,{[O.paginationFetching]:f||!b}),value:n,onChange:d,size:m,total:Math.ceil(x/u)})]})});a();var Lo=require("@mantine/core"),ar=require("react");a();var P=require("@mantine/core");a();var or=require("@mantine/core"),er=require("@mantine/hooks");function ko(o){let e=(0,or.useMantineTheme)(),r=typeof o=="function"?o(e):o;return(0,er.useMediaQuery)(r||"",!0)}function Ao(o){let e=o.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}function rr(o,e,r){return o.filter(t=>!e.map(r).includes(r(t)))}function Po(o,e){return o.filter((r,t,f)=>t===f.findIndex(n=>e(r)===e(n)))}function S(o,e){return e?e.match(/([^[.\]])+/g).reduce((t,f)=>t&&t[f],o):void 0}var E=require("react/jsx-runtime"),Ca=(0,P.createStyles)(o=>({sortableColumnHeader:{cursor:"pointer",transition:"background .15s ease","&:hover":{background:o.colorScheme==="dark"?o.colors.dark[6]:o.colors.gray[0]}},sortableColumnHeaderGroup:{gap:"0.25em"},columnHeaderText:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},sortableColumnHeaderText:{minWidth:0,flexGrow:1},sortableColumnHeaderIcon:{transition:"transform .15s ease"},sortableColumnHeaderIconRotated:{transform:"rotate3d(0, 0, 1, 180deg)"},sortableColumnHeaderNeutralIcon:{color:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[5],transition:"color .15s ease","th:hover &":{color:o.colorScheme==="dark"?o.colors.dark[2]:o.colors.gray[6]}}}));function de({className:o,sx:e,style:r,accessor:t,visibleMediaQuery:f,title:n,sortable:d,textAlignment:c,width:m,sortStatus:p,onSortStatusChange:l}){let{cx:g,classes:x}=Ca();if(!ko(f))return null;let u=n??Ao(t),i=typeof u=="string"?u:void 0;return(0,E.jsx)(P.Box,{component:"th",className:g({[x.sortableColumnHeader]:d},o),sx:[{"&&":{textAlign:c},width:m,minWidth:m,maxWidth:m},e],style:r,role:d?"button":void 0,onClick:d&&l?()=>{l({columnAccessor:t,direction:p?.direction==="asc"?"desc":"asc"})}:void 0,children:d||p?.columnAccessor===t?(0,E.jsxs)(P.Group,{className:x.sortableColumnHeaderGroup,position:"apart",noWrap:!0,children:[(0,E.jsx)(P.Box,{className:g(x.columnHeaderText,x.sortableColumnHeaderText),title:i,children:u}),(0,E.jsx)(P.Center,{children:p?.columnAccessor===t?(0,E.jsx)(ae,{className:g(x.sortableColumnHeaderIcon,{[x.sortableColumnHeaderIconRotated]:p.direction==="desc"}),size:14}):(0,E.jsx)(te,{className:x.sortableColumnHeaderNeutralIcon,size:14})})]}):(0,E.jsx)(P.Box,{className:x.columnHeaderText,title:i,children:u})})}var j=require("react/jsx-runtime"),Sa=(0,Lo.createStyles)(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{zIndex:2,position:"sticky",top:0,background:o.colorScheme==="dark"?o.colors.dark[7]:o.white},textSelectionDisabled:{userSelect:"none"},selectorColumnHeader:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-o.spacing.sm,bottom:0,borderLeft:`1px solid ${o.colorScheme==="dark"?o.colors.dark[4]:o.colors.gray[3]}`,width:o.spacing.sm,background:`linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},selectorColumnHeaderWithRightShadow:{"&::after":{opacity:1}},selectionCheckboxInput:{cursor:"pointer"}}}),tr=(0,ar.forwardRef)(function({className:e,style:r,sortStatus:t,onSortStatusChange:f,columns:n,selectionVisible:d,selectionChecked:c,selectionIndeterminate:m,onSelectionChange:p,leftShadowVisible:l},g){let{classes:x,cx:u}=Sa();return(0,j.jsx)("thead",{className:u(x.root,e),style:r,ref:g,children:(0,j.jsxs)("tr",{children:[d&&(0,j.jsx)("th",{className:u(x.selectorColumnHeader,{[x.selectorColumnHeaderWithRightShadow]:l}),children:(0,j.jsx)(Lo.Checkbox,{classNames:{input:x.selectionCheckboxInput},checked:c,indeterminate:m,disabled:!p,onChange:p})}),n.map(({accessor:i,hidden:C,visibleMediaQuery:h,textAlignment:b,width:_,title:v,sortable:w,titleClassName:R,titleStyle:O,titleSx:k})=>C?null:(0,j.jsx)(de,{className:R,style:O,sx:k,accessor:i,visibleMediaQuery:h,textAlignment:b,width:_,title:v,sortable:w,sortStatus:t,onSortStatusChange:f},i))]})})});a();var lo=require("@mantine/core"),se=require("react/jsx-runtime"),ha=(0,lo.createStyles)(o=>({root:{zIndex:3,position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",background:o.fn.rgba(o.colorScheme==="dark"?o.colors.dark[8]:o.white,.75),opacity:0,transition:"opacity .15s ease"},fetching:{pointerEvents:"all",opacity:1}}));function ce({pt:o,pb:e,fetching:r,customContent:t,backgroundBlur:f,size:n,variant:d,color:c}){let{classes:m,cx:p}=ha();return(0,se.jsx)(lo.Center,{pt:o,pb:e,className:p(m.root,{[m.fetching]:r}),sx:f?{backdropFilter:`blur(${f}px)`}:void 0,children:r&&(t||(0,se.jsx)(lo.Loader,{size:n,variant:d,color:c}))})}a();var qo=require("@mantine/core");a();var Mo=require("@mantine/core");var fr=require("react/jsx-runtime"),ba=(0,Mo.createStyles)({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function ue({className:o,sx:e,style:r,visibleMediaQuery:t,record:f,recordIndex:n,onClick:d,noWrap:c,ellipsis:m,textAlignment:p,width:l,accessor:g,render:x,defaultRender:u,customCellAttributes:i}){let{cx:C,classes:h}=ba();return ko(t)?(0,fr.jsx)(Mo.Box,{component:"td",className:C({[h.noWrap]:c||m,[h.ellipsis]:m,[h.withPointerCursor]:d},o),sx:[{width:l,minWidth:l,maxWidth:l,textAlign:p},e],style:r,onClick:d,...i?.(f,n),children:x?x(f,n):u?u(f,n,g):S(f,g)}):null}a();var No=require("@mantine/core");a();var Z=require("@mantine/hooks"),L=require("react");var vo=200,Ho={leading:!0};function nr(){let[o,e]=(0,Z.useDebouncedState)(!0,vo,Ho),[r,t]=(0,Z.useDebouncedState)(!0,vo,Ho),[f,n]=(0,Z.useDebouncedState)(!0,vo,Ho),[d,c]=(0,Z.useDebouncedState)(!0,vo,Ho);return{scrolledToTop:o,setScrolledToTop:e,scrolledToBottom:r,setScrolledToBottom:t,scrolledToLeft:f,setScrolledToLeft:n,scrolledToRight:d,setScrolledToRight:c}}function lr(o){let[e,r]=(0,L.useState)(null),t=o?.join(":")||"";return(0,L.useEffect)(()=>{r(null)},[t]),{lastSelectionChangeIndex:e,setLastSelectionChangeIndex:r}}function dr(o){let[e,r]=(0,L.useState)(null);return(0,L.useEffect)(()=>{o&&r(null)},[o]),{rowContextMenuInfo:e,setRowContextMenuInfo:r}}function sr({rowExpansion:o,records:e,idAccessor:r}){let t=[];if(o&&e){let{trigger:c,allowMultiple:m,initiallyExpanded:p}=o;e&&c==="always"?t=e.map(l=>S(l,r)):p&&(t=e.filter(p).map(l=>S(l,r)),m||(t=[t[0]]))}let f,n,d=(0,L.useState)(t);if(o){let{trigger:c,allowMultiple:m,collapseProps:p,content:l}=o;o.expanded?{recordIds:f,onRecordIdsChange:n}=o.expanded:[f,n]=d;let g=x=>n(f.filter(u=>u!==S(x,r)));return{expandOnClick:c!=="always"&&c!=="never",isRowExpanded:x=>c==="always"?!0:f.includes(S(x,r)),expandRow:x=>{let u=S(x,r);n(m?[...f,u]:[u])},collapseRow:g,collapseProps:p,content:(x,u)=>()=>l({record:x,recordIndex:u,collapse:()=>g(x)})}}}function cr(o,e){let[r,t]=(0,L.useState)(o),[f,n]=(0,L.useState)(o),d=(0,Z.useTimeout)(()=>t(!0),0),c=(0,Z.useTimeout)(()=>n(!1),e||200);return(0,L.useEffect)(()=>{o?(c.clear(),n(!0),d.start()):(d.clear(),t(!1),c.start())},[d,c,o]),{expanded:r,visible:f}}var q=require("react/jsx-runtime"),Ba=(0,No.createStyles)({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function pe({open:o,colSpan:e,content:r,collapseProps:t}){let{expanded:f,visible:n}=cr(o,t?.transitionDuration),{cx:d,classes:c}=Ba();return n?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)("tr",{}),(0,q.jsx)("tr",{children:(0,q.jsx)("td",{className:d(c.cell,{[c.expandedCell]:f}),colSpan:e,children:(0,q.jsx)(No.Collapse,{in:f,...t,children:r()})})})]}):null}a();var Eo=require("@mantine/core"),me=require("react/jsx-runtime"),ya=(0,Eo.createStyles)(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",zIndex:1,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-o.spacing.sm,bottom:0,borderLeft:`1px solid ${o.colorScheme==="dark"?o.colors.dark[4]:o.colors.gray[3]}`,width:o.spacing.sm,background:`linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},withRightShadow:{"&::after":{opacity:1}},checkbox:{cursor:"pointer"}}});function xe({withRightShadow:o,...e}){let{cx:r,classes:t}=ya();return(0,me.jsx)("td",{className:r(t.root,{[t.withRightShadow]:o}),children:(0,me.jsx)(Eo.Checkbox,{classNames:{input:t.checkbox},...e,onClick:f=>f.stopPropagation()})})}var W=require("react/jsx-runtime"),Ta=(0,qo.createStyles)(o=>{let e=o.colors[o.primaryColor][6];return{withPointerCursor:{cursor:"pointer"},selected:{"&&":{"tr&":{background:o.colorScheme==="dark"?o.fn.darken(e,.6):o.fn.lighten(e,.9)},"table[data-striped] tbody &:nth-of-type(odd)":{background:o.colorScheme==="dark"?o.fn.darken(e,.55):o.fn.lighten(e,.85)}}},contextMenuVisible:{"&&":{"tr&":{background:o.colorScheme==="dark"?o.fn.darken(e,.5):o.fn.lighten(e,.7)},"table[data-striped] tbody &:nth-of-type(odd)":{background:o.colorScheme==="dark"?o.fn.darken(e,.45):o.fn.lighten(e,.65)}}}}});function Ie({record:o,recordIndex:e,columns:r,defaultColumnRender:t,selectionVisible:f,selectionChecked:n,onSelectionChange:d,isRecordSelectable:c,onClick:m,onCellClick:p,onContextMenu:l,expansion:g,customRowAttributes:x,className:u,style:i,sx:C,contextMenuVisible:h,leftShadowVisible:b}){let{cx:_,classes:v}=Ta();return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(qo.Box,{component:"tr",className:_({[v.withPointerCursor]:m||g?.expandOnClick,[v.selected]:n,[v.contextMenuVisible]:h},typeof u=="function"?u(o,e):u),onClick:w=>{if(g){let{isRowExpanded:R,expandOnClick:O,expandRow:k,collapseRow:V}=g;O&&(R(o)?V(o):k(o))}m?.(w)},style:typeof i=="function"?i(o,e):i,sx:C,...x?.(o,e),onContextMenu:l,children:[f&&(0,W.jsx)(xe,{withRightShadow:b,checked:n,disabled:!d||(c?!c(o,e):!1),onChange:d}),r.map((w,R)=>{let{accessor:O,hidden:k,visibleMediaQuery:V,textAlignment:co,noWrap:Wo,ellipsis:zo,width:Vo,render:Uo,cellsClassName:uo,cellsStyle:po,cellsSx:Go,customCellAttributes:Xo}=w,bo;return p&&(bo=()=>p({record:o,recordIndex:e,column:w,columnIndex:R})),k?null:(0,W.jsx)(ue,{className:typeof uo=="function"?uo(o,e):uo,style:typeof po=="function"?po(o,e):po,sx:Go,visibleMediaQuery:V,record:o,recordIndex:e,onClick:bo,accessor:O,textAlignment:co,noWrap:Wo,ellipsis:zo,width:Vo,render:Uo,defaultRender:t,customCellAttributes:Xo},O)})]}),g&&(0,W.jsx)(pe,{colSpan:r.filter(w=>!w.hidden).length+(f?1:0),open:g.isRowExpanded(o),content:g.content(o,e),collapseProps:g.collapseProps})]})}a();var K=require("@mantine/core"),z=require("@mantine/hooks"),ur=require("react/jsx-runtime"),wa=(0,K.createStyles)(o=>({root:{position:"fixed",border:`1px solid ${o.colorScheme==="dark"?o.colors.dark[4]:o.colors.gray[3]}`,overflow:"hidden",transition:"all .15s ease"}}));function ie({borderRadius:o="xs",shadow:e="sm",zIndex:r=3,y:t,x:f,onDestroy:n,children:d}){(0,z.useWindowEvent)("resize",n),(0,z.useWindowEvent)("scroll",n);let c=(0,z.useClickOutside)(n),{ref:m,width:p,height:l}=(0,z.useElementSize)(),g=(0,z.useMergedRef)(c,m),{dir:x,spacing:u}=(0,K.useMantineTheme)(),i=(0,K.px)(u.md),{innerWidth:C,innerHeight:h}=window,{classes:b}=wa();return(0,ur.jsx)(K.Paper,{ref:g,shadow:e,radius:o,className:b.root,sx:{zIndex:r,top:t+l+i>h?h-l-i:t,left:x==="ltr"?f+p+i>C?C-p-i:f:C-i-(f-p-i<0?p+i:f)},children:d})}a();var pr=require("@mantine/core"),mr=require("react/jsx-runtime"),Ra=(0,pr.createStyles)(o=>({root:{height:1,background:o.colorScheme==="dark"?o.colors.dark[5]:o.colors.gray[1]}}));function ge(){let{classes:o}=Ra();return(0,mr.jsx)("div",{className:o.root})}a();var M=require("@mantine/core"),So=require("react/jsx-runtime"),Oa=(0,M.createStyles)((o,{color:e})=>{let r=(0,M.px)(o.spacing.sm)/2;return{root:{width:"100%",display:"flex",alignItems:"center",paddingTop:r,paddingBottom:r,paddingLeft:o.spacing.sm,paddingRight:o.spacing.sm,color:e&&o.colors[e][6],transition:"background .15s ease","&[disabled]":{cursor:"not-allowed",color:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[5]},"&:hover:not([disabled])":{background:o.fn.rgba(e?o.colors[e][6]:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[4],e?o.colorScheme==="dark"?.15:.08:.25)},"&:active:not([disabled])":{background:o.fn.rgba(e?o.colors[e][6]:o.colorScheme==="dark"?o.colors.dark[3]:o.colors.gray[4],e?o.colorScheme==="dark"?.3:.2:.5)}},icon:{fontSize:0,marginRight:o.spacing.xs},title:{whiteSpace:"nowrap"}}});function Ce({icon:o,title:e,color:r,disabled:t,onClick:f}){let{classes:n}=Oa({color:r});return(0,So.jsxs)(M.UnstyledButton,{className:n.root,disabled:t,onClick:f,children:[o&&(0,So.jsx)(M.Box,{className:n.icon,children:o}),(0,So.jsx)(M.Text,{className:n.title,size:"sm",children:e})]})}a();var so=require("@mantine/core"),xr=require("react"),oo=require("react/jsx-runtime"),Da=(0,so.createStyles)(o=>{let e=o.colorScheme==="dark"?.5:.05;return{root:{flex:"1 1 100%"},scrollbar:{'&[data-state="visible"]':{background:"transparent"},"div::before":{pointerEvents:"none"}},corner:{background:"transparent"},thumb:{zIndex:3},shadow:{position:"absolute",pointerEvents:"none",opacity:0,transition:"opacity .15s ease"},topShadow:{zIndex:2,top:0,left:0,right:0,height:o.spacing.sm,background:`linear-gradient(${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`},leftShadow:{zIndex:3,top:0,left:0,bottom:0,width:o.spacing.sm,background:`linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to right, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`},rightShadow:{zIndex:2,top:0,bottom:0,right:0,width:o.spacing.sm,background:`linear-gradient(to left, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)}), linear-gradient(to left, ${o.fn.rgba(o.black,e)}, ${o.fn.rgba(o.black,0)} 30%)`},bottomShadow:{zIndex:2,left:0,right:0,bottom:0,height:o.spacing.sm,background:`linear-gradient(${o.fn.rgba(o.black,0)}, ${o.fn.rgba(o.black,e)}), linear-gradient(${o.fn.rgba(o.black,0)} 30%, ${o.fn.rgba(o.black,e)})`},shadowVisible:{opacity:1}}}),Ir=(0,xr.forwardRef)(function({topShadowVisible:e,leftShadowVisible:r,rightShadowVisible:t,bottomShadowVisible:f,headerHeight:n,onScrollPositionChange:d,children:c},m){let{cx:p,classes:l}=Da();return(0,oo.jsxs)(so.ScrollArea,{viewportRef:m,classNames:{root:l.root,scrollbar:l.scrollbar,thumb:l.thumb,corner:l.corner},styles:{scrollbar:{marginTop:n}},onScrollPositionChange:d,children:[c,(0,oo.jsx)(so.Box,{className:p(l.shadow,l.topShadow,{[l.shadowVisible]:e}),sx:{top:n}}),(0,oo.jsx)("div",{className:p(l.shadow,l.leftShadow,{[l.shadowVisible]:r})}),(0,oo.jsx)("div",{className:p(l.shadow,l.rightShadow,{[l.shadowVisible]:t})}),(0,oo.jsx)("div",{className:p(l.shadow,l.bottomShadow,{[l.shadowVisible]:f})})]})});var y=require("react/jsx-runtime"),ir={},Fa=(0,$.createStyles)((o,{borderColor:e,rowBorderColor:r})=>{let t=typeof e=="function"?e(o):e,f=typeof r=="function"?r(o):r;return{root:{position:"relative",display:"flex",flexDirection:"column",overflow:"hidden",tr:{backgroundColor:o.colorScheme==="dark"?o.colors.dark[7]:o.white},"&&":{"thead tr th":{borderBottomColor:t},"tbody tr td":{borderTopColor:f}}},lastRowBorderBottomVisible:{"tbody tr:last-of-type td":{borderBottom:`1px solid ${f}`}},textSelectionDisabled:{userSelect:"none"},table:{borderCollapse:"separate",borderSpacing:0},tableWithBorder:{border:`1px solid ${t}`},tableWithColumnBorders:{"&&":{"th, td":{":not(:first-of-type)":{borderLeft:`1px solid ${f}`}}}},verticalAlignmentTop:{td:{verticalAlign:"top"}},verticalAlignmentBottom:{td:{verticalAlign:"bottom"}}}});function Se({withBorder:o,borderRadius:e,borderColor:r=B=>B.colorScheme==="dark"?B.colors.dark[4]:B.colors.gray[3],rowBorderColor:t=B=>B.fn.rgba(B.colorScheme==="dark"?B.colors.dark[4]:B.colors.gray[3],.65),withColumnBorders:f,textSelectionDisabled:n,height:d="100%",minHeight:c,shadow:m,verticalAlignment:p="center",fetching:l,columns:g,defaultColumnRender:x,idAccessor:u="id",records:i,selectedRecords:C,onSelectedRecordsChange:h,isRecordSelectable:b,sortStatus:_,onSortStatusChange:v,horizontalSpacing:w,page:R,onPageChange:O,totalRecords:k,recordsPerPage:V,onRecordsPerPageChange:co,recordsPerPageOptions:Wo,recordsPerPageLabel:zo="Records per page",paginationColor:Vo,paginationSize:Uo="sm",paginationText:uo=({from:B,to:mo,totalRecords:eo})=>`${B} - ${mo} / ${eo}`,paginationWrapBreakpoint:po="sm",loaderBackgroundBlur:Go,customLoader:Xo,loaderSize:bo,loaderVariant:Cr,loaderColor:Sr,loadingText:hr="...",emptyState:br,noRecordsText:he="No records",noRecordsIcon:Br,striped:yr,onRowClick:Zo,onCellClick:Tr,rowContextMenu:H,rowExpansion:wr,rowClassName:Rr,rowStyle:Or,rowSx:Dr,customRowAttributes:Fr,bodyRef:kr,m:Ar,my:Pr,mx:Lr,mt:Mr,mb:vr,ml:Hr,mr:Nr,sx:Er,className:qr,classNames:Ko,style:Wr,styles:$o,...zr}){let{ref:B,width:mo,height:eo}=(0,ho.useElementSize)(),{ref:Vr,height:_o}=(0,ho.useElementSize)(),{ref:Ur,width:Yo,height:Bo}=(0,ho.useElementSize)(),{ref:Gr,height:be}=(0,ho.useElementSize)(),{scrolledToTop:Xr,setScrolledToTop:Be,scrolledToBottom:Zr,setScrolledToBottom:ye,scrolledToLeft:Te,setScrolledToLeft:we,scrolledToRight:Kr,setScrolledToRight:Re}=nr(),{rowContextMenuInfo:Y,setRowContextMenuInfo:xo}=dr(l),$r=sr({rowExpansion:wr,records:i,idAccessor:u}),Oe=()=>{if(!l&&H&&xo(null),l||Bo<=eo)Be(!0),ye(!0);else{let I=B.current.scrollTop;Be(I===0),ye(Math.round(Bo-I)===Math.round(eo))}if(l||Yo===mo)we(!0),Re(!0);else{let I=B.current.scrollLeft;we(I===0),Re(Math.round(Yo-I)===Math.round(mo))}};(0,gr.useEffect)(Oe,[l,eo,B,mo,Bo,Yo]);let _r=I=>{B.current.scrollTo({top:0,left:0}),O(I)},yo=i?.length,De=i?.map(I=>S(I,u)),Io=C?.map(I=>S(I,u)),Fe=De!==void 0&&Io!==void 0&&Io.length>0,ke=b?i?.filter(b):i,Qo=ke?.map(I=>S(I,u)),Jo=Fe&&Qo.every(I=>Io.includes(I)),Yr=Fe&&Qo.some(I=>Io.includes(I)),Ae;h&&(Ae=()=>{h(Jo?C.filter(I=>!Qo.includes(S(I,u))):Po([...C,...ke],I=>S(I,u)))});let{lastSelectionChangeIndex:To,setLastSelectionChangeIndex:Qr}=lr(De),Pe=!!C&&!Te,{cx:Le,classes:U,theme:Jr}=Fa({borderColor:r,rowBorderColor:t}),jr={m:Ar,my:Pr,mx:Lr,mt:Mr,mb:vr,ml:Hr,mr:Nr},jo=typeof $o=="function"?$o(Jr,ir,ir):$o;return(0,y.jsxs)($.Box,{...jr,className:Le(U.root,{[U.tableWithBorder]:o},qr,Ko?.root),sx:[I=>({borderRadius:I.radius[e]||e,boxShadow:I.shadows[m]||m,height:d,minHeight:c}),...(0,$.packSx)(Er)],style:{...jo?.root,...Wr},children:[(0,y.jsx)(Ir,{ref:B,topShadowVisible:!Xr,leftShadowVisible:!(C||Te),rightShadowVisible:!Kr,bottomShadowVisible:!Zr,headerHeight:_o,onScrollPositionChange:Oe,children:(0,y.jsxs)($.Table,{ref:Ur,horizontalSpacing:w,className:Le(U.table,{[U.tableWithColumnBorders]:f,[U.lastRowBorderBottomVisible]:Bo<eo,[U.textSelectionDisabled]:n,[U.verticalAlignmentTop]:p==="top",[U.verticalAlignmentBottom]:p==="bottom"}),striped:yo?yr:!1,...zr,children:[(0,y.jsx)(tr,{ref:Vr,className:Ko?.header,style:jo?.header,columns:g,sortStatus:_,onSortStatusChange:v,selectionVisible:!!C,selectionChecked:Jo,selectionIndeterminate:Yr&&!Jo,onSelectionChange:Ae,leftShadowVisible:Pe}),(0,y.jsx)("tbody",{ref:kr,children:yo?i.map((I,T)=>{let ro=S(I,u),io=Io?.includes(ro)||!1,wo=!1,Ro=!1;if(H){let{hidden:D}=H;(!D||!(typeof D=="function"?D(I,T):D))&&(H.trigger==="click"?wo=!0:Ro=!0)}let Oo;h&&(Oo=D=>{if(D.nativeEvent.shiftKey&&To!==null){let ao=i.filter(T>To?(Q,J)=>J>=To&&J<=T&&(b?b(Q,J):!0):(Q,J)=>J>=T&&J<=To&&(b?b(Q,J):!0));h(io?rr(C,ao,Q=>S(Q,u)):Po([...C,...ao],Q=>S(Q,u)))}else h(io?C.filter(ao=>S(ao,u)!==ro):Po([...C,I],ao=>S(ao,u)));Qr(T)});let go;wo?go=D=>{xo({y:D.clientY,x:D.clientX,record:I,recordIndex:T}),Zo?.(I,T)}:Zo&&(go=()=>{Zo(I,T)});let Me;return Ro&&(Me=D=>{D.preventDefault(),xo({y:D.clientY,x:D.clientX,record:I,recordIndex:T})}),(0,y.jsx)(Ie,{record:I,recordIndex:T,columns:g,defaultColumnRender:x,selectionVisible:!!C,selectionChecked:io,onSelectionChange:Oo,isRecordSelectable:b,onClick:go,onCellClick:Tr,onContextMenu:Me,contextMenuVisible:Y?S(Y.record,u)===ro:!1,expansion:$r,className:Rr,style:Or,sx:Dr,customRowAttributes:Fr,leftShadowVisible:Pe},ro)}):(0,y.jsx)(re,{})})]})}),R&&(0,y.jsx)(je,{ref:Gr,className:Ko?.pagination,style:jo?.pagination,topBorderColor:r,horizontalSpacing:w,fetching:l,page:R,onPageChange:_r,totalRecords:k,recordsPerPage:V,onRecordsPerPageChange:co,recordsPerPageOptions:Wo,recordsPerPageLabel:zo,paginationColor:Vo,paginationSize:Uo,paginationText:uo,paginationWrapBreakpoint:po,noRecordsText:he,loadingText:hr,recordsLength:yo}),(0,y.jsx)(ce,{pt:_o,pb:be,fetching:l,backgroundBlur:Go,customContent:Xo,size:bo,variant:Cr,color:Sr}),(0,y.jsx)(ne,{pt:_o,pb:be,icon:Br,text:he,active:!l&&!yo,children:br}),H&&Y&&(0,y.jsx)(ie,{zIndex:H.zIndex,borderRadius:H.borderRadius,shadow:H.shadow,y:Y.y,x:Y.x,onDestroy:()=>xo(null),children:H.items(Y.record,Y.recordIndex).map(({divider:I,key:T,title:ro,icon:io,color:wo,hidden:Ro,disabled:Oo,onClick:go})=>I?(0,y.jsx)(ge,{},T):Ro?null:(0,y.jsx)(Ce,{title:ro??Ao(T),icon:io,color:wo,disabled:Oo,onClick:()=>{xo(null),go()}},T))})]})}a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();a();
2
2
  //# sourceMappingURL=index.cjs.map