mantine-datatable 1.8.6 → 1.8.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.
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableEmptyState.d.ts","sourceRoot":"","sources":["../DataTableEmptyState.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA2BvC,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,wBAAwB,eAkB7G"}
1
+ {"version":3,"file":"DataTableEmptyState.d.ts","sourceRoot":"","sources":["../DataTableEmptyState.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA0BvC,KAAK,wBAAwB,GAAG;IAC9B,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,wBAAwB,eAkB7G"}
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableHeaderCell.d.ts","sourceRoot":"","sources":["../DataTableHeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,YAAY,EAAE,KAAK,EAAE,EAAE,MAAM,eAAe,CAAC;AAC7F,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAmCpE,KAAK,mBAAmB,CAAC,CAAC,IAAI;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,EAAE,CAAC;IACR,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,iBAAiB,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK,MAAM,CAAC,GAAG,SAAS,CAAC;IAC1E,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,UAAU,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAC5C,kBAAkB,EAAE,CAAC,CAAC,UAAU,EAAE,mBAAmB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC7E,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,eAAe,GAAG,OAAO,CAAC,CAAC;AAElF,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,CAAC,EAAE,EAC7C,SAAS,EACT,EAAE,EACF,KAAK,EACL,QAAQ,EACR,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,aAAa,EACb,KAAK,EACL,UAAU,EACV,kBAAkB,GACnB,EAAE,mBAAmB,CAAC,CAAC,CAAC,sBAwDxB"}
1
+ {"version":3,"file":"DataTableHeaderCell.d.ts","sourceRoot":"","sources":["../DataTableHeaderCell.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,YAAY,EAAE,KAAK,EAAE,EAAE,MAAM,eAAe,CAAC;AAE7F,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAsCpE,KAAK,mBAAmB,CAAC,CAAC,IAAI;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,EAAE,CAAC;IACR,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,iBAAiB,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK,MAAM,CAAC,GAAG,SAAS,CAAC;IAC1E,KAAK,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,UAAU,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAC5C,kBAAkB,EAAE,CAAC,CAAC,UAAU,EAAE,mBAAmB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC7E,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,eAAe,GAAG,OAAO,CAAC,CAAC;AAElF,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,CAAC,EAAE,EAC7C,SAAS,EACT,EAAE,EACF,KAAK,EACL,QAAQ,EACR,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,aAAa,EACb,KAAK,EACL,UAAU,EACV,kBAAkB,GACnB,EAAE,mBAAmB,CAAC,CAAC,CAAC,sBAwDxB"}
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var Io=Object.create;var ke=Object.defineProperty;var zo=Object.getOwnPropertyDescriptor;var qo=Object.getOwnPropertyNames;var Vo=Object.getPrototypeOf,Go=Object.prototype.hasOwnProperty;var Uo=(e,r)=>{for(var o in r)ke(e,o,{get:r[o],enumerable:!0})},Hr=(e,r,o,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of qo(r))!Go.call(e,t)&&t!==o&&ke(e,t,{get:()=>r[t],enumerable:!(a=zo(r,t))||a.enumerable});return e};var Pe=(e,r,o)=>(o=e!=null?Io(Vo(e)):{},Hr(r||!e||!e.__esModule?ke(o,"default",{value:e,enumerable:!0}):o,e)),Zo=e=>Hr(ke({},"__esModule",{value:!0}),e);var xa={};Uo(xa,{DataTable:()=>br});module.exports=Zo(xa);var p=Pe(require("react"),1);var X=require("@mantine/core"),he=require("@mantine/hooks"),ro=require("react");var Nr=require("@mantine/core"),er=require("react/jsx-runtime"),Xo=(0,Nr.createStyles)({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function rr(){let{classes:e}=Xo();return(0,er.jsx)("tr",{className:e.root,children:(0,er.jsx)("td",{})})}var le=require("@mantine/core");function V(){return V=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var o=arguments[r];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},V.apply(this,arguments)}function $o(e,r){if(e==null)return{};var o={},a=Object.keys(e),t,f;for(f=0;f<a.length;f++)t=a[f],!(r.indexOf(t)>=0)&&(o[t]=e[t]);return o}function ae(e,r){if(e==null)return{};var o=$o(e,r),a,t;if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(e);for(t=0;t<f.length;t++)a=f[t],!(r.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var te=Pe(require("react")),Ko=["size","color"];function or(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=ae(e,Ko);return te.default.createElement("svg",V({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-arrow-down",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),te.default.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),te.default.createElement("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),te.default.createElement("line",{x1:"18",y1:"13",x2:"12",y2:"19"}),te.default.createElement("line",{x1:"6",y1:"13",x2:"12",y2:"19"}))}var fe=Pe(require("react")),Yo=["size","color"];function ar(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=ae(e,Yo);return fe.default.createElement("svg",V({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-arrows-vertical",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),fe.default.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),fe.default.createElement("polyline",{points:"8 7 12 3 16 7"}),fe.default.createElement("polyline",{points:"8 17 12 21 16 17"}),fe.default.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"21"}))}var j=Pe(require("react")),Qo=["size","color"];function tr(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=ae(e,Qo);return j.default.createElement("svg",V({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-database-off",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),j.default.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),j.default.createElement("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"}),j.default.createElement("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"}),j.default.createElement("path",{d:"M4 12v6c0 1.657 3.582 3 8 3c3.217 0 5.991 -.712 7.261 -1.74m.739 -3.26v-4"}),j.default.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}))}var N=require("react/jsx-runtime"),jo=(0,le.createStyles)(e=>({root:{position:"absolute",top:0,right:0,bottom:0,left:0,flexDirection:"column",pointerEvents:"none",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[6],opacity:0,transition:"opacity .15s ease"},active:{opacity:1},standardIcon:{fontSize:0,borderRadius:"50%",padding:e.spacing.xs,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[2]}}));function fr({icon:e,text:r,pt:o,pb:a,active:t,children:f}){let{classes:d,cx:u}=jo();return(0,N.jsx)(le.Center,{pt:o,pb:a,className:u(d.root,{[d.active]:t}),children:f||(0,N.jsxs)(N.Fragment,{children:[e||(0,N.jsx)("div",{className:d.standardIcon,children:(0,N.jsx)(tr,{})}),(0,N.jsx)(le.Text,{size:"sm",color:"dimmed",children:r})]})})}var G=require("@mantine/core"),Er=require("react");var k=require("@mantine/core"),L=require("react/jsx-runtime"),Fr={xs:22,sm:26,md:32,lg:38,xl:44};function lr({size:e,label:r,values:o,value:a,onChange:t,color:f}){return(0,L.jsxs)(k.Group,{spacing:"xs",children:[(0,L.jsx)(k.Text,{size:e,children:r}),(0,L.jsxs)(k.Menu,{withinPortal:!0,withArrow:!0,children:[(0,L.jsx)(k.Menu.Target,{children:(0,L.jsx)(k.Button,{size:e,variant:"default",sx:[{fontWeight:"normal"},d=>({height:Fr[e],paddingLeft:d.spacing[e],paddingRight:d.spacing[e]})],children:a})}),(0,L.jsx)(k.Menu.Dropdown,{children:o.map(d=>{let u=d===a;return(0,L.jsx)(k.Menu.Item,{sx:[{height:Fr[e]},i=>({"&&":{color:u?i.white:void 0},background:u?i.colors[f||i.primaryColor][6]:void 0})],disabled:u,onClick:()=>t(d),children:(0,L.jsx)(k.Text,{size:e,children:d})},d)})})]})]})}var se=require("react/jsx-runtime"),Jo=(0,G.createStyles)((e,{topBorderColor:r,paginationWrapBreakpoint:o})=>({root:{background:e.colorScheme==="dark"?e.colors.dark[7]:e.white,borderTop:`1px solid ${typeof r=="function"?r(e):r}`,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"space-between",gap:e.spacing.xs,[e.fn.largerThan(o)]:{flexDirection:"row"}},text:{flex:"1 1 auto"},pagination:{opacity:1,transition:"opacity .15s ease"},paginationFetching:{opacity:0}})),Wr=(0,Er.forwardRef)(function({className:r,style:o,topBorderColor:a,fetching:t,page:f,onPageChange:d,paginationColor:u,paginationSize:i,loadingText:x,noRecordsText:l,paginationText:c,totalRecords:n,recordsPerPage:s,onRecordsPerPageChange:g,recordsPerPageLabel:C,recordsPerPageOptions:S,recordsLength:y,horizontalSpacing:$,paginationWrapBreakpoint:v},w){let O;if(t)O=x;else if(!n)O=l;else{let z=(f-1)*s+1,me=z+y-1;O=c({from:z,to:me,totalRecords:n})}let{classes:D,cx:P}=Jo({topBorderColor:a,paginationWrapBreakpoint:v});return(0,se.jsxs)(G.Box,{ref:w,px:$??"xs",py:"xs",className:P(D.root,r),style:o,children:[(0,se.jsx)(G.Text,{className:D.text,size:i,children:O}),S&&(0,se.jsx)(lr,{size:i,label:C,values:S,value:s,onChange:g}),(0,se.jsx)(G.Pagination,{color:u,className:P(D.pagination,{[D.paginationFetching]:t||!y}),page:f,onChange:d,size:i,total:Math.ceil(n/s)})]})});var ve=require("@mantine/core"),Vr=require("react");var M=require("@mantine/core");var Ir=require("@mantine/core"),zr=require("@mantine/hooks");function Le(e){let r=(0,Ir.useMantineTheme)(),o=typeof e=="function"?e(r):e;return(0,zr.useMediaQuery)(o||"",!0)}function Me(e){let r=e.replace(/([a-z\d])([A-Z]+)/g,"$1 $2").replace(/\W|_/g," ").trim().toLowerCase();return`${r.charAt(0).toUpperCase()}${r.slice(1)}`}function qr(e,r,o){return e.filter(a=>!r.map(o).includes(o(a)))}function Ae(e,r){return e.filter((o,a,t)=>a===t.findIndex(f=>r(o)===r(f)))}function b(e,r){return r?r.match(/([^[.\]])+/g).reduce((a,t)=>a&&a[t],e):void 0}var F=require("react/jsx-runtime"),_o=(0,M.createStyles)(e=>({sortableColumnHeader:{cursor:"pointer",transition:"background .15s ease","&:hover":{background:e.colorScheme==="dark"?e.colors.dark[6]:e.colors.gray[0]}},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:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5],transition:"color .15s ease","th:hover &":{color:e.colorScheme==="dark"?e.colors.dark[2]:e.colors.gray[6]}}}));function sr({className:e,sx:r,style:o,accessor:a,visibleMediaQuery:t,title:f,sortable:d,textAlignment:u,width:i,sortStatus:x,onSortStatusChange:l}){let{cx:c,classes:n}=_o();if(!Le(t))return null;let s=f??Me(a),g=typeof s=="string"?s:void 0;return(0,F.jsx)(M.Box,{component:"th",className:c({[n.sortableColumnHeader]:d},e),sx:[{"&&":{textAlign:u},width:i,minWidth:i,maxWidth:i},r],style:o,role:d?"button":void 0,onClick:d&&l?()=>{l({columnAccessor:a,direction:x?.direction==="asc"?"desc":"asc"})}:void 0,children:d||x?.columnAccessor===a?(0,F.jsxs)(M.Group,{position:"apart",noWrap:!0,spacing:"xs",children:[(0,F.jsx)(M.Box,{className:c(n.columnHeaderText,n.sortableColumnHeaderText),title:g,children:s}),(0,F.jsx)(M.Center,{children:x?.columnAccessor===a?(0,F.jsx)(or,{className:c(n.sortableColumnHeaderIcon,{[n.sortableColumnHeaderIconRotated]:x.direction==="desc"}),size:14}):(0,F.jsx)(ar,{className:n.sortableColumnHeaderNeutralIcon,size:14})})]}):(0,F.jsx)(M.Box,{className:n.columnHeaderText,title:g,children:s})})}var J=require("react/jsx-runtime"),ea=(0,ve.createStyles)(e=>{let r=e.colorScheme==="dark"?.5:.05;return{root:{zIndex:2,position:"sticky",top:0,background:e.colorScheme==="dark"?e.colors.dark[7]:e.white},textSelectionDisabled:{userSelect:"none"},selectorColumnHeader:{position:"sticky",width:0,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-e.spacing.sm,bottom:0,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},selectorColumnHeaderWithRightShadow:{"&::after":{opacity:1}},selectionCheckboxInput:{cursor:"pointer"}}}),Gr=(0,Vr.forwardRef)(function({className:r,style:o,sortStatus:a,onSortStatusChange:t,columns:f,selectionVisible:d,selectionChecked:u,selectionIndeterminate:i,onSelectionChange:x,leftShadowVisible:l},c){let{classes:n,cx:s}=ea();return(0,J.jsx)("thead",{className:s(n.root,r),style:o,ref:c,children:(0,J.jsxs)("tr",{children:[d&&(0,J.jsx)("th",{className:s(n.selectorColumnHeader,{[n.selectorColumnHeaderWithRightShadow]:l}),children:(0,J.jsx)(ve.Checkbox,{classNames:{input:n.selectionCheckboxInput},checked:u,indeterminate:i,disabled:!x,onChange:x})}),f.map(({accessor:g,hidden:C,visibleMediaQuery:S,textAlignment:y,width:$,title:v,sortable:w,titleClassName:O,titleStyle:D,titleSx:P})=>C?null:(0,J.jsx)(sr,{className:O,style:D,sx:P,accessor:g,visibleMediaQuery:S,textAlignment:y,width:$,title:v,sortable:w,sortStatus:a,onSortStatusChange:t},g))]})})});var de=require("@mantine/core"),dr=require("react/jsx-runtime"),ra=(0,de.createStyles)(e=>({root:{zIndex:3,position:"absolute",top:0,left:0,right:0,bottom:0,pointerEvents:"none",background:e.fn.rgba(e.colorScheme==="dark"?e.colors.dark[8]:e.white,.75),opacity:0,transition:"opacity .15s ease"},fetching:{pointerEvents:"all",opacity:1}}));function ur({pt:e,pb:r,fetching:o,customContent:a,backgroundBlur:t,size:f,variant:d,color:u}){let{classes:i,cx:x}=ra();return(0,dr.jsx)(de.Center,{pt:e,pb:r,className:x(i.root,{[i.fetching]:o}),sx:t?{backdropFilter:`blur(${t}px)`}:void 0,children:o&&(a||(0,dr.jsx)(de.Loader,{size:f,variant:d,color:u}))})}var Ie=require("@mantine/core");var He=require("@mantine/core");var Ur=require("react/jsx-runtime"),oa=(0,He.createStyles)({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function pr({className:e,sx:r,style:o,visibleMediaQuery:a,record:t,recordIndex:f,onClick:d,noWrap:u,ellipsis:i,textAlignment:x,width:l,accessor:c,render:n,defaultRender:s,customCellAttributes:g}){let{cx:C,classes:S}=oa();return Le(a)?(0,Ur.jsx)(He.Box,{component:"td",className:C({[S.noWrap]:u||i,[S.ellipsis]:i,[S.withPointerCursor]:d},e),sx:[{width:l,minWidth:l,maxWidth:l,textAlign:x},r],style:o,onClick:d,...g?.(t,f),children:n?n(t,f):s?s(t,f,c):b(t,c)}):null}var Ee=require("@mantine/core");var U=require("@mantine/hooks"),A=require("react");var Ne=200,Fe={leading:!0};function Zr(){let[e,r]=(0,U.useDebouncedState)(!0,Ne,Fe),[o,a]=(0,U.useDebouncedState)(!0,Ne,Fe),[t,f]=(0,U.useDebouncedState)(!0,Ne,Fe),[d,u]=(0,U.useDebouncedState)(!0,Ne,Fe);return{scrolledToTop:e,setScrolledToTop:r,scrolledToBottom:o,setScrolledToBottom:a,scrolledToLeft:t,setScrolledToLeft:f,scrolledToRight:d,setScrolledToRight:u}}function Xr(e){let[r,o]=(0,A.useState)(null),a=e?.join(":")||"";return(0,A.useEffect)(()=>{o(null)},[a]),{lastSelectionChangeIndex:r,setLastSelectionChangeIndex:o}}function $r(e){let[r,o]=(0,A.useState)(null);return(0,A.useEffect)(()=>{e&&o(null)},[e]),{rowContextMenuInfo:r,setRowContextMenuInfo:o}}function Kr({rowExpansion:e,records:r,idAccessor:o}){let a=[];if(e&&r){let{trigger:u,allowMultiple:i,initiallyExpanded:x}=e;r&&u==="always"?a=r.map(l=>b(l,o)):x&&(a=r.filter(x).map(l=>b(l,o)),i||(a=[a[0]]))}let t,f,d=(0,A.useState)(a);if(e){let{trigger:u,allowMultiple:i,collapseProps:x,content:l}=e;e.expanded?{recordIds:t,onRecordIdsChange:f}=e.expanded:[t,f]=d;let c=n=>f(t.filter(s=>s!==b(n,o)));return{expandOnClick:u!=="always"&&u!=="never",isRowExpanded:n=>u==="always"?!0:t.includes(b(n,o)),expandRow:n=>{let s=b(n,o);f(i?[...t,s]:[s])},collapseRow:c,collapseProps:x,content:(n,s)=>()=>l({record:n,recordIndex:s,collapse:()=>c(n)})}}}function Yr(e,r){let[o,a]=(0,A.useState)(e),[t,f]=(0,A.useState)(e),d=(0,U.useTimeout)(()=>a(!0),0),u=(0,U.useTimeout)(()=>f(!1),r||200);return(0,A.useEffect)(()=>{e?(u.clear(),f(!0),d.start()):(d.clear(),a(!1),u.start())},[d,u,e]),{expanded:o,visible:t}}var E=require("react/jsx-runtime"),aa=(0,Ee.createStyles)({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function mr({open:e,colSpan:r,content:o,collapseProps:a}){let{expanded:t,visible:f}=Yr(e,a?.transitionDuration),{cx:d,classes:u}=aa();return f?(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]:t}),colSpan:r,children:(0,E.jsx)(Ee.Collapse,{in:t,...a,children:o()})})})]}):null}var We=require("@mantine/core"),xr=require("react/jsx-runtime"),ta=(0,We.createStyles)(e=>{let r=e.colorScheme==="dark"?.5:.05;return{root:{position:"sticky",zIndex:1,left:0,background:"inherit","&::after":{content:'""',position:"absolute",top:0,right:-e.spacing.sm,bottom:0,borderLeft:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`,pointerEvents:"none",opacity:0,transition:"opacity .15s ease"}},withRightShadow:{"&::after":{opacity:1}},checkbox:{cursor:"pointer"}}});function nr({withRightShadow:e,...r}){let{cx:o,classes:a}=ta();return(0,xr.jsx)("td",{className:o(a.root,{[a.withRightShadow]:e}),children:(0,xr.jsx)(We.Checkbox,{classNames:{input:a.checkbox},...r,onClick:t=>t.stopPropagation()})})}var W=require("react/jsx-runtime"),fa=(0,Ie.createStyles)(e=>{let r=e.colors[e.primaryColor][6];return{withPointerCursor:{cursor:"pointer"},selected:{"&&":{"tr&":{background:e.colorScheme==="dark"?e.fn.darken(r,.6):e.fn.lighten(r,.9)},"table[data-striped] tbody &:nth-of-type(odd)":{background:e.colorScheme==="dark"?e.fn.darken(r,.55):e.fn.lighten(r,.85)}}},contextMenuVisible:{"&&":{"tr&":{background:e.colorScheme==="dark"?e.fn.darken(r,.5):e.fn.lighten(r,.7)},"table[data-striped] tbody &:nth-of-type(odd)":{background:e.colorScheme==="dark"?e.fn.darken(r,.45):e.fn.lighten(r,.65)}}}}});function ir({record:e,recordIndex:r,columns:o,defaultColumnRender:a,selectionVisible:t,selectionChecked:f,onSelectionChange:d,isRecordSelectable:u,onClick:i,onCellClick:x,onContextMenu:l,expansion:c,customRowAttributes:n,className:s,style:g,sx:C,contextMenuVisible:S,leftShadowVisible:y}){let{cx:$,classes:v}=fa();return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(Ie.Box,{component:"tr",className:$({[v.withPointerCursor]:i||c?.expandOnClick,[v.selected]:f,[v.contextMenuVisible]:S},typeof s=="function"?s(e,r):s),onClick:w=>{if(c){let{isRowExpanded:O,expandOnClick:D,expandRow:P,collapseRow:z}=c;D&&(O(e)?z(e):P(e))}i?.(w)},style:typeof g=="function"?g(e,r):g,sx:C,...n?.(e,r),onContextMenu:l,children:[t&&(0,W.jsx)(nr,{withRightShadow:y,checked:f,disabled:!d||(u?!u(e,r):!1),onChange:d}),o.map((w,O)=>{let{accessor:D,hidden:P,visibleMediaQuery:z,textAlignment:me,noWrap:ze,ellipsis:qe,width:Ve,render:Ge,cellsClassName:xe,cellsStyle:ne,cellsSx:Ue,customCellAttributes:Ze}=w,Be;return x&&(Be=()=>x({record:e,recordIndex:r,column:w,columnIndex:O})),P?null:(0,W.jsx)(pr,{className:typeof xe=="function"?xe(e,r):xe,style:typeof ne=="function"?ne(e,r):ne,sx:Ue,visibleMediaQuery:z,record:e,recordIndex:r,onClick:Be,accessor:D,textAlignment:me,noWrap:ze,ellipsis:qe,width:Ve,render:Ge,defaultRender:a,customCellAttributes:Ze},D)})]}),c&&(0,W.jsx)(mr,{colSpan:o.filter(w=>!w.hidden).length+(t?1:0),open:c.isRowExpanded(e),content:c.content(e,r),collapseProps:c.collapseProps})]})}var ue=require("@mantine/core"),I=require("@mantine/hooks"),Qr=require("react/jsx-runtime"),la=(0,ue.createStyles)(e=>({root:{position:"fixed",border:`1px solid ${e.colorScheme==="dark"?e.colors.dark[4]:e.colors.gray[3]}`,overflow:"hidden",transition:"all .15s ease"}}));function cr({borderRadius:e="xs",shadow:r="sm",zIndex:o=3,y:a,x:t,onDestroy:f,children:d}){(0,I.useWindowEvent)("resize",f),(0,I.useWindowEvent)("scroll",f);let u=(0,I.useClickOutside)(f),{ref:i,width:x,height:l}=(0,I.useElementSize)(),c=(0,I.useMergedRef)(u,i),{dir:n,spacing:{md:s}}=(0,ue.useMantineTheme)(),{innerWidth:g,innerHeight:C}=window,{classes:S}=la();return(0,Qr.jsx)(ue.Paper,{ref:c,shadow:r,radius:e,className:S.root,sx:{zIndex:o,top:a+l+s>C?C-l-s:a,left:n==="ltr"?t+x+s>g?g-x-s:t:g-s-(t-x-s<0?x+s:t)},children:d})}var jr=require("@mantine/core"),Jr=require("react/jsx-runtime"),sa=(0,jr.createStyles)(e=>({root:{height:1,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}}));function gr(){let{classes:e}=sa();return(0,Jr.jsx)("div",{className:e.root})}var Z=require("@mantine/core"),Se=require("react/jsx-runtime"),da=(0,Z.createStyles)((e,{color:r})=>{let o=e.spacing.sm/2;return{root:{width:"100%",display:"flex",alignItems:"center",paddingTop:o,paddingBottom:o,paddingLeft:e.spacing.sm,paddingRight:e.spacing.sm,color:r&&e.colors[r][6],transition:"background .15s ease","&[disabled]":{cursor:"not-allowed",color:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[5]},"&:hover:not([disabled])":{background:e.fn.rgba(r?e.colors[r][6]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],r?e.colorScheme==="dark"?.15:.08:.25)},"&:active:not([disabled])":{background:e.fn.rgba(r?e.colors[r][6]:e.colorScheme==="dark"?e.colors.dark[3]:e.colors.gray[4],r?e.colorScheme==="dark"?.3:.2:.5)}},icon:{fontSize:0,marginRight:e.spacing.xs},title:{whiteSpace:"nowrap"}}});function Cr({icon:e,title:r,color:o,disabled:a,onClick:t}){let{classes:f}=da({color:o});return(0,Se.jsxs)(Z.UnstyledButton,{className:f.root,disabled:a,onClick:t,children:[e&&(0,Se.jsx)(Z.Box,{className:f.icon,children:e}),(0,Se.jsx)(Z.Text,{className:f.title,size:"sm",children:r})]})}var pe=require("@mantine/core"),_r=require("react"),_=require("react/jsx-runtime"),ua=(0,pe.createStyles)(e=>{let r=e.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:e.spacing.sm,background:`linear-gradient(${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},leftShadow:{zIndex:3,top:0,left:0,bottom:0,width:e.spacing.sm,background:`linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to right, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},rightShadow:{zIndex:2,top:0,bottom:0,right:0,width:e.spacing.sm,background:`linear-gradient(to left, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)}), linear-gradient(to left, ${e.fn.rgba(e.black,r)}, ${e.fn.rgba(e.black,0)} 30%)`},bottomShadow:{zIndex:2,left:0,right:0,bottom:0,height:e.spacing.sm,background:`linear-gradient(${e.fn.rgba(e.black,0)}, ${e.fn.rgba(e.black,r)}), linear-gradient(${e.fn.rgba(e.black,0)} 30%, ${e.fn.rgba(e.black,r)})`},shadowVisible:{opacity:1}}}),eo=(0,_r.forwardRef)(function({topShadowVisible:r,leftShadowVisible:o,rightShadowVisible:a,bottomShadowVisible:t,headerHeight:f,onScrollPositionChange:d,children:u},i){let{cx:x,classes:l}=ua();return(0,_.jsxs)(pe.ScrollArea,{viewportRef:i,classNames:{root:l.root,scrollbar:l.scrollbar,thumb:l.thumb,corner:l.corner},styles:{scrollbar:{marginTop:f}},onScrollPositionChange:d,children:[u,(0,_.jsx)(pe.Box,{className:x(l.shadow,l.topShadow,{[l.shadowVisible]:r}),sx:{top:f}}),(0,_.jsx)("div",{className:x(l.shadow,l.leftShadow,{[l.shadowVisible]:o})}),(0,_.jsx)("div",{className:x(l.shadow,l.rightShadow,{[l.shadowVisible]:a})}),(0,_.jsx)("div",{className:x(l.shadow,l.bottomShadow,{[l.shadowVisible]:t})})]})});var B=require("react/jsx-runtime"),pa={},ma=(0,X.createStyles)((e,{borderColor:r,rowBorderColor:o})=>{let a=typeof r=="function"?r(e):r,t=typeof o=="function"?o(e):o;return{root:{position:"relative",display:"flex",flexDirection:"column",overflow:"hidden",tr:{backgroundColor:e.colorScheme==="dark"?e.colors.dark[7]:e.white},"&&":{"thead tr th":{borderBottomColor:a},"tbody tr td":{borderTopColor:t}}},lastRowBorderBottomVisible:{"tbody tr:last-of-type td":{borderBottom:`1px solid ${t}`}},textSelectionDisabled:{userSelect:"none"},table:{borderCollapse:"separate",borderSpacing:0},tableWithBorder:{border:`1px solid ${a}`},tableWithColumnBorders:{"&&":{"th, td":{":not(:first-of-type)":{borderLeft:`1px solid ${t}`}}}},verticalAlignmentTop:{td:{verticalAlign:"top"}},verticalAlignmentBottom:{td:{verticalAlign:"bottom"}}}});function br({withBorder:e,borderRadius:r,borderColor:o=h=>h.colorScheme==="dark"?h.colors.dark[4]:h.colors.gray[3],rowBorderColor:a=h=>h.fn.rgba(h.colorScheme==="dark"?h.colors.dark[4]:h.colors.gray[3],.65),withColumnBorders:t,textSelectionDisabled:f,height:d="100%",minHeight:u,shadow:i,verticalAlignment:x="center",fetching:l,columns:c,defaultColumnRender:n,idAccessor:s="id",records:g,selectedRecords:C,onSelectedRecordsChange:S,isRecordSelectable:y,sortStatus:$,onSortStatusChange:v,horizontalSpacing:w,page:O,onPageChange:D,totalRecords:P,recordsPerPage:z,onRecordsPerPageChange:me,recordsPerPageOptions:ze,recordsPerPageLabel:qe="Records per page",paginationColor:Ve,paginationSize:Ge="sm",paginationText:xe=({from:h,to:ie,totalRecords:ee})=>`${h} - ${ie} / ${ee}`,paginationWrapBreakpoint:ne="sm",loaderBackgroundBlur:Ue,customLoader:Ze,loaderSize:Be,loaderVariant:oo,loaderColor:ao,loadingText:to="...",emptyState:fo,noRecordsText:Sr="No records",noRecordsIcon:lo,striped:so,onRowClick:Xe,onCellClick:uo,rowContextMenu:H,rowExpansion:po,rowClassName:mo,rowStyle:xo,rowSx:no,customRowAttributes:io,bodyRef:co,m:go,my:Co,mx:bo,mt:So,mb:ho,ml:Bo,mr:yo,sx:To,className:wo,classNames:$e,style:Oo,styles:Ke,...Do}){let{ref:h,width:ie,height:ee}=(0,he.useElementSize)(),{ref:Ro,height:Ye}=(0,he.useElementSize)(),{ref:ko,width:Qe,height:ye}=(0,he.useElementSize)(),{ref:Po,height:hr}=(0,he.useElementSize)(),{scrolledToTop:Lo,setScrolledToTop:Br,scrolledToBottom:Mo,setScrolledToBottom:yr,scrolledToLeft:Tr,setScrolledToLeft:wr,scrolledToRight:Ao,setScrolledToRight:Or}=Zr(),{rowContextMenuInfo:K,setRowContextMenuInfo:ce}=$r(l),vo=Kr({rowExpansion:po,records:g,idAccessor:s}),Dr=()=>{if(!l&&H&&ce(null),l||ye<=ee)Br(!0),yr(!0);else{let m=h.current.scrollTop;Br(m===0),yr(Math.round(ye-m)===Math.round(ee))}if(l||Qe===ie)wr(!0),Or(!0);else{let m=h.current.scrollLeft;wr(m===0),Or(Math.round(Qe-m)===Math.round(ie))}};(0,ro.useEffect)(Dr,[l,ee,h,ie,ye,Qe]);let Ho=m=>{h.current.scrollTo({top:0,left:0}),D(m)},Te=g?.length,Rr=g?.map(m=>b(m,s)),ge=C?.map(m=>b(m,s)),kr=Rr!==void 0&&ge!==void 0&&ge.length>0,Pr=y?g?.filter(y):g,je=Pr?.map(m=>b(m,s)),Je=kr&&je.every(m=>ge.includes(m)),No=kr&&je.some(m=>ge.includes(m)),Lr;S&&(Lr=()=>{S(Je?C.filter(m=>!je.includes(b(m,s))):Ae([...C,...Pr],m=>b(m,s)))});let{lastSelectionChangeIndex:we,setLastSelectionChangeIndex:Fo}=Xr(Rr),Mr=!!C&&!Tr,{cx:Ar,classes:q,theme:Eo}=ma({borderColor:o,rowBorderColor:a}),Wo={m:go,my:Co,mx:bo,mt:So,mb:ho,ml:Bo,mr:yo},_e=typeof Ke=="function"?Ke(Eo,pa):Ke;return(0,B.jsxs)(X.Box,{...Wo,className:Ar(q.root,{[q.tableWithBorder]:e},wo,$e?.root),sx:[m=>({borderRadius:m.radius[r]||r,boxShadow:m.shadows[i]||i,height:d,minHeight:u}),...(0,X.packSx)(To)],style:{..._e?.root,...Oo},children:[(0,B.jsx)(eo,{ref:h,topShadowVisible:!Lo,leftShadowVisible:!(C||Tr),rightShadowVisible:!Ao,bottomShadowVisible:!Mo,headerHeight:Ye,onScrollPositionChange:Dr,children:(0,B.jsxs)(X.Table,{ref:ko,horizontalSpacing:w,className:Ar(q.table,{[q.tableWithColumnBorders]:t,[q.lastRowBorderBottomVisible]:ye<ee,[q.textSelectionDisabled]:f,[q.verticalAlignmentTop]:x==="top",[q.verticalAlignmentBottom]:x==="bottom"}),striped:Te?so:!1,...Do,children:[(0,B.jsx)(Gr,{ref:Ro,className:$e?.header,style:_e?.header,columns:c,sortStatus:$,onSortStatusChange:v,selectionVisible:!!C,selectionChecked:Je,selectionIndeterminate:No&&!Je,onSelectionChange:Lr,leftShadowVisible:Mr}),(0,B.jsx)("tbody",{ref:co,children:Te?g.map((m,T)=>{let re=b(m,s),Ce=ge?.includes(re)||!1,Oe=!1,De=!1;if(H){let{hidden:R}=H;(!R||!(typeof R=="function"?R(m,T):R))&&(H.trigger==="click"?Oe=!0:De=!0)}let Re;S&&(Re=R=>{if(R.nativeEvent.shiftKey&&we!==null){let oe=g.filter(T>we?(Y,Q)=>Q>=we&&Q<=T&&(y?y(Y,Q):!0):(Y,Q)=>Q>=T&&Q<=we&&(y?y(Y,Q):!0));S(Ce?qr(C,oe,Y=>b(Y,s)):Ae([...C,...oe],Y=>b(Y,s)))}else S(Ce?C.filter(oe=>b(oe,s)!==re):Ae([...C,m],oe=>b(oe,s)));Fo(T)});let be;Oe?be=R=>{ce({y:R.clientY,x:R.clientX,record:m,recordIndex:T}),Xe?.(m,T)}:Xe&&(be=()=>{Xe(m,T)});let vr;return De&&(vr=R=>{R.preventDefault(),ce({y:R.clientY,x:R.clientX,record:m,recordIndex:T})}),(0,B.jsx)(ir,{record:m,recordIndex:T,columns:c,defaultColumnRender:n,selectionVisible:!!C,selectionChecked:Ce,onSelectionChange:Re,isRecordSelectable:y,onClick:be,onCellClick:uo,onContextMenu:vr,contextMenuVisible:K?b(K.record,s)===re:!1,expansion:vo,className:mo,style:xo,sx:no,customRowAttributes:io,leftShadowVisible:Mr},re)}):(0,B.jsx)(rr,{})})]})}),O&&(0,B.jsx)(Wr,{ref:Po,className:$e?.pagination,style:_e?.pagination,topBorderColor:o,horizontalSpacing:w,fetching:l,page:O,onPageChange:Ho,totalRecords:P,recordsPerPage:z,onRecordsPerPageChange:me,recordsPerPageOptions:ze,recordsPerPageLabel:qe,paginationColor:Ve,paginationSize:Ge,paginationText:xe,paginationWrapBreakpoint:ne,noRecordsText:Sr,loadingText:to,recordsLength:Te}),(0,B.jsx)(ur,{pt:Ye,pb:hr,fetching:l,backgroundBlur:Ue,customContent:Ze,size:Be,variant:oo,color:ao}),(0,B.jsx)(fr,{pt:Ye,pb:hr,icon:lo,text:Sr,active:!l&&!Te,children:fo}),H&&K&&(0,B.jsx)(cr,{zIndex:H.zIndex,borderRadius:H.borderRadius,shadow:H.shadow,y:K.y,x:K.x,onDestroy:()=>ce(null),children:H.items(K.record,K.recordIndex).map(({divider:m,key:T,title:re,icon:Ce,color:Oe,hidden:De,disabled:Re,onClick:be})=>m?(0,B.jsx)(gr,{},T):De?null:(0,B.jsx)(Cr,{title:re??Me(T),icon:Ce,color:Oe,disabled:Re,onClick:()=>{ce(null),be()}},T))})]})}
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();
2
2
  //# sourceMappingURL=index.cjs.map