mantine-datatable 1.8.6 → 1.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import*as p from"react";import{Box as qa,createStyles as Va,packSx as Ga,Table as Ua}from"@mantine/core";import{useElementSize as he}from"@mantine/hooks";import{useEffect as Za}from"react";import{createStyles as So}from"@mantine/core";import{jsx as cr}from"react/jsx-runtime";var ho=So({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function Ne(){let{classes:e}=ho();return cr("tr",{className:e.root,children:cr("td",{})})}import{Center as Oo,createStyles as Do,Text as Ro}from"@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 Bo(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 q(e,r){if(e==null)return{};var o=Bo(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}import _ from"react";var yo=["size","color"];function Fe(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=q(e,yo);return _.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),_.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),_.createElement("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),_.createElement("line",{x1:"18",y1:"13",x2:"12",y2:"19"}),_.createElement("line",{x1:"6",y1:"13",x2:"12",y2:"19"}))}import ee from"react";var To=["size","color"];function Ee(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=q(e,To);return ee.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),ee.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),ee.createElement("polyline",{points:"8 7 12 3 16 7"}),ee.createElement("polyline",{points:"8 17 12 21 16 17"}),ee.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"21"}))}import V from"react";var wo=["size","color"];function We(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=q(e,wo);return V.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),V.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),V.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"}),V.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"}),V.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"}),V.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}))}import{Fragment as Po,jsx as ue,jsxs as Lo}from"react/jsx-runtime";var ko=Do(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 Ie({icon:e,text:r,pt:o,pb:a,active:t,children:f}){let{classes:d,cx:u}=ko();return ue(Oo,{pt:o,pb:a,className:u(d.root,{[d.active]:t}),children:f||Lo(Po,{children:[e||ue("div",{className:d.standardIcon,children:ue(We,{})}),ue(Ro,{size:"sm",color:"dimmed",children:r})]})})}import{Box as vo,createStyles as Ho,Pagination as No,Text as Fo}from"@mantine/core";import{forwardRef as Eo}from"react";import{Button as Mo,Group as Ao,Menu as pe,Text as gr}from"@mantine/core";import{jsx as G,jsxs as br}from"react/jsx-runtime";var Cr={xs:22,sm:26,md:32,lg:38,xl:44};function ze({size:e,label:r,values:o,value:a,onChange:t,color:f}){return br(Ao,{spacing:"xs",children:[G(gr,{size:e,children:r}),br(pe,{withinPortal:!0,withArrow:!0,children:[G(pe.Target,{children:G(Mo,{size:e,variant:"default",sx:[{fontWeight:"normal"},d=>({height:Cr[e],paddingLeft:d.spacing[e],paddingRight:d.spacing[e]})],children:a})}),G(pe.Dropdown,{children:o.map(d=>{let u=d===a;return G(pe.Item,{sx:[{height:Cr[e]},i=>({"&&":{color:u?i.white:void 0},background:u?i.colors[f||i.primaryColor][6]:void 0})],disabled:u,onClick:()=>t(d),children:G(gr,{size:e,children:d})},d)})})]})]})}import{jsx as qe,jsxs as Io}from"react/jsx-runtime";var Wo=Ho((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}})),Sr=Eo(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:B,horizontalSpacing:H,paginationWrapBreakpoint:P},T){let w;if(t)w=x;else if(!n)w=l;else{let M=(f-1)*s+1,Z=M+B-1;w=c({from:M,to:Z,totalRecords:n})}let{classes:O,cx:k}=Wo({topBorderColor:a,paginationWrapBreakpoint:P});return Io(vo,{ref:T,px:H??"xs",py:"xs",className:k(O.root,r),style:o,children:[qe(Fo,{className:O.text,size:i,children:w}),S&&qe(ze,{size:i,label:C,values:S,value:s,onChange:g}),qe(No,{color:u,className:k(O.pagination,{[O.paginationFetching]:t||!B}),page:f,onChange:d,size:i,total:Math.ceil(n/s)})]})});import{Checkbox as $o,createStyles as Ko}from"@mantine/core";import{forwardRef as Yo}from"react";import{Box as Ve,Center as Vo,createStyles as Go,Group as Uo}from"@mantine/core";import{useMantineTheme as zo}from"@mantine/core";import{useMediaQuery as qo}from"@mantine/hooks";function me(e){let r=zo(),o=typeof e=="function"?e(r):e;return qo(o||"",!0)}function xe(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 hr(e,r,o){return e.filter(a=>!r.map(o).includes(o(a)))}function ne(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}import{jsx as U,jsxs as Xo}from"react/jsx-runtime";var Zo=Go(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 Ge({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}=Zo();if(!me(t))return null;let s=f??xe(a),g=typeof s=="string"?s:void 0;return U(Ve,{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?Xo(Uo,{position:"apart",noWrap:!0,spacing:"xs",children:[U(Ve,{className:c(n.columnHeaderText,n.sortableColumnHeaderText),title:g,children:s}),U(Vo,{children:x?.columnAccessor===a?U(Fe,{className:c(n.sortableColumnHeaderIcon,{[n.sortableColumnHeaderIconRotated]:x.direction==="desc"}),size:14}):U(Ee,{className:n.sortableColumnHeaderNeutralIcon,size:14})})]}):U(Ve,{className:n.columnHeaderText,title:g,children:s})})}import{jsx as ie,jsxs as jo}from"react/jsx-runtime";var Qo=Ko(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"}}}),Br=Yo(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}=Qo();return ie("thead",{className:s(n.root,r),style:o,ref:c,children:jo("tr",{children:[d&&ie("th",{className:s(n.selectorColumnHeader,{[n.selectorColumnHeaderWithRightShadow]:l}),children:ie($o,{classNames:{input:n.selectionCheckboxInput},checked:u,indeterminate:i,disabled:!x,onChange:x})}),f.map(({accessor:g,hidden:C,visibleMediaQuery:S,textAlignment:B,width:H,title:P,sortable:T,titleClassName:w,titleStyle:O,titleSx:k})=>C?null:ie(Ge,{className:w,style:O,sx:k,accessor:g,visibleMediaQuery:S,textAlignment:B,width:H,title:P,sortable:T,sortStatus:a,onSortStatusChange:t},g))]})})});import{Center as Jo,createStyles as _o,Loader as ea}from"@mantine/core";import{jsx as yr}from"react/jsx-runtime";var ra=_o(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 Ue({pt:e,pb:r,fetching:o,customContent:a,backgroundBlur:t,size:f,variant:d,color:u}){let{classes:i,cx:x}=ra();return yr(Jo,{pt:e,pb:r,className:x(i.root,{[i.fetching]:o}),sx:t?{backdropFilter:`blur(${t}px)`}:void 0,children:o&&(a||yr(ea,{size:f,variant:d,color:u}))})}import{Box as ia,createStyles as ca}from"@mantine/core";import{Box as oa,createStyles as aa}from"@mantine/core";import{jsx as fa}from"react/jsx-runtime";var ta=aa({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function Ze({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}=ta();return me(a)?fa(oa,{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}import{Collapse as la,createStyles as sa}from"@mantine/core";import{useDebouncedState as ce,useTimeout as Tr}from"@mantine/hooks";import{useEffect as Xe,useState as re}from"react";var ge=200,Ce={leading:!0};function wr(){let[e,r]=ce(!0,ge,Ce),[o,a]=ce(!0,ge,Ce),[t,f]=ce(!0,ge,Ce),[d,u]=ce(!0,ge,Ce);return{scrolledToTop:e,setScrolledToTop:r,scrolledToBottom:o,setScrolledToBottom:a,scrolledToLeft:t,setScrolledToLeft:f,scrolledToRight:d,setScrolledToRight:u}}function Or(e){let[r,o]=re(null),a=e?.join(":")||"";return Xe(()=>{o(null)},[a]),{lastSelectionChangeIndex:r,setLastSelectionChangeIndex:o}}function Dr(e){let[r,o]=re(null);return Xe(()=>{e&&o(null)},[e]),{rowContextMenuInfo:r,setRowContextMenuInfo:o}}function Rr({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=re(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 kr(e,r){let[o,a]=re(e),[t,f]=re(e),d=Tr(()=>a(!0),0),u=Tr(()=>f(!1),r||200);return Xe(()=>{e?(u.clear(),f(!0),d.start()):(d.clear(),a(!1),u.start())},[d,u,e]),{expanded:o,visible:t}}import{Fragment as ua,jsx as be,jsxs as pa}from"react/jsx-runtime";var da=sa({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function $e({open:e,colSpan:r,content:o,collapseProps:a}){let{expanded:t,visible:f}=kr(e,a?.transitionDuration),{cx:d,classes:u}=da();return f?pa(ua,{children:[be("tr",{}),be("tr",{children:be("td",{className:d(u.cell,{[u.expandedCell]:t}),colSpan:r,children:be(la,{in:t,...a,children:o()})})})]}):null}import{Checkbox as ma,createStyles as xa}from"@mantine/core";import{jsx as Pr}from"react/jsx-runtime";var na=xa(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 Ke({withRightShadow:e,...r}){let{cx:o,classes:a}=na();return Pr("td",{className:o(a.root,{[a.withRightShadow]:e}),children:Pr(ma,{classNames:{input:a.checkbox},...r,onClick:t=>t.stopPropagation()})})}import{Fragment as Ca,jsx as Ye,jsxs as Lr}from"react/jsx-runtime";var ga=ca(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 Qe({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:B}){let{cx:H,classes:P}=ga();return Lr(Ca,{children:[Lr(ia,{component:"tr",className:H({[P.withPointerCursor]:i||c?.expandOnClick,[P.selected]:f,[P.contextMenuVisible]:S},typeof s=="function"?s(e,r):s),onClick:T=>{if(c){let{isRowExpanded:w,expandOnClick:O,expandRow:k,collapseRow:M}=c;O&&(w(e)?M(e):k(e))}i?.(T)},style:typeof g=="function"?g(e,r):g,sx:C,...n?.(e,r),onContextMenu:l,children:[t&&Ye(Ke,{withRightShadow:B,checked:f,disabled:!d||(u?!u(e,r):!1),onChange:d}),o.map((T,w)=>{let{accessor:O,hidden:k,visibleMediaQuery:M,textAlignment:Z,noWrap:Be,ellipsis:ye,width:Te,render:we,cellsClassName:X,cellsStyle:$,cellsSx:Oe,customCellAttributes:De}=T,oe;return x&&(oe=()=>x({record:e,recordIndex:r,column:T,columnIndex:w})),k?null:Ye(Ze,{className:typeof X=="function"?X(e,r):X,style:typeof $=="function"?$(e,r):$,sx:Oe,visibleMediaQuery:M,record:e,recordIndex:r,onClick:oe,accessor:O,textAlignment:Z,noWrap:Be,ellipsis:ye,width:Te,render:we,defaultRender:a,customCellAttributes:De},O)})]}),c&&Ye($e,{colSpan:o.filter(T=>!T.hidden).length+(t?1:0),open:c.isRowExpanded(e),content:c.content(e,r),collapseProps:c.collapseProps})]})}import{createStyles as ba,Paper as Sa,useMantineTheme as ha}from"@mantine/core";import{useClickOutside as Ba,useElementSize as ya,useMergedRef as Ta,useWindowEvent as Mr}from"@mantine/hooks";import{jsx as Oa}from"react/jsx-runtime";var wa=ba(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 je({borderRadius:e="xs",shadow:r="sm",zIndex:o=3,y:a,x:t,onDestroy:f,children:d}){Mr("resize",f),Mr("scroll",f);let u=Ba(f),{ref:i,width:x,height:l}=ya(),c=Ta(u,i),{dir:n,spacing:{md:s}}=ha(),{innerWidth:g,innerHeight:C}=window,{classes:S}=wa();return Oa(Sa,{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})}import{createStyles as Da}from"@mantine/core";import{jsx as ka}from"react/jsx-runtime";var Ra=Da(e=>({root:{height:1,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}}));function Je(){let{classes:e}=Ra();return ka("div",{className:e.root})}import{Box as Pa,createStyles as La,Text as Ma,UnstyledButton as Aa}from"@mantine/core";import{jsx as Ar,jsxs as Ha}from"react/jsx-runtime";var va=La((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 _e({icon:e,title:r,color:o,disabled:a,onClick:t}){let{classes:f}=va({color:o});return Ha(Aa,{className:f.root,disabled:a,onClick:t,children:[e&&Ar(Pa,{className:f.icon,children:e}),Ar(Ma,{className:f.title,size:"sm",children:r})]})}import{Box as Na,createStyles as Fa,ScrollArea as Ea}from"@mantine/core";import{forwardRef as Wa}from"react";import{jsx as Se,jsxs as za}from"react/jsx-runtime";var Ia=Fa(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}}}),vr=Wa(function({topShadowVisible:r,leftShadowVisible:o,rightShadowVisible:a,bottomShadowVisible:t,headerHeight:f,onScrollPositionChange:d,children:u},i){let{cx:x,classes:l}=Ia();return za(Ea,{viewportRef:i,classNames:{root:l.root,scrollbar:l.scrollbar,thumb:l.thumb,corner:l.corner},styles:{scrollbar:{marginTop:f}},onScrollPositionChange:d,children:[u,Se(Na,{className:x(l.shadow,l.topShadow,{[l.shadowVisible]:r}),sx:{top:f}}),Se("div",{className:x(l.shadow,l.leftShadow,{[l.shadowVisible]:o})}),Se("div",{className:x(l.shadow,l.rightShadow,{[l.shadowVisible]:a})}),Se("div",{className:x(l.shadow,l.bottomShadow,{[l.shadowVisible]:t})})]})});import{jsx as R,jsxs as Hr}from"react/jsx-runtime";var Xa={},$a=Va((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 Nr({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:B,sortStatus:H,onSortStatusChange:P,horizontalSpacing:T,page:w,onPageChange:O,totalRecords:k,recordsPerPage:M,onRecordsPerPageChange:Z,recordsPerPageOptions:Be,recordsPerPageLabel:ye="Records per page",paginationColor:Te,paginationSize:we="sm",paginationText:X=({from:h,to:K,totalRecords:W})=>`${h} - ${K} / ${W}`,paginationWrapBreakpoint:$="sm",loaderBackgroundBlur:Oe,customLoader:De,loaderSize:oe,loaderVariant:Fr,loaderColor:Er,loadingText:Wr="...",emptyState:Ir,noRecordsText:er="No records",noRecordsIcon:zr,striped:qr,onRowClick:Re,onCellClick:Vr,rowContextMenu:L,rowExpansion:Gr,rowClassName:Ur,rowStyle:Zr,rowSx:Xr,customRowAttributes:$r,bodyRef:Kr,m:Yr,my:Qr,mx:jr,mt:Jr,mb:_r,ml:eo,mr:ro,sx:oo,className:ao,classNames:ke,style:to,styles:Pe,...fo}){let{ref:h,width:K,height:W}=he(),{ref:lo,height:Le}=he(),{ref:so,width:Me,height:ae}=he(),{ref:uo,height:rr}=he(),{scrolledToTop:po,setScrolledToTop:or,scrolledToBottom:mo,setScrolledToBottom:ar,scrolledToLeft:tr,setScrolledToLeft:fr,scrolledToRight:xo,setScrolledToRight:lr}=wr(),{rowContextMenuInfo:N,setRowContextMenuInfo:Y}=Dr(l),no=Rr({rowExpansion:Gr,records:g,idAccessor:s}),sr=()=>{if(!l&&L&&Y(null),l||ae<=W)or(!0),ar(!0);else{let m=h.current.scrollTop;or(m===0),ar(Math.round(ae-m)===Math.round(W))}if(l||Me===K)fr(!0),lr(!0);else{let m=h.current.scrollLeft;fr(m===0),lr(Math.round(Me-m)===Math.round(K))}};Za(sr,[l,W,h,K,ae,Me]);let io=m=>{h.current.scrollTo({top:0,left:0}),O(m)},te=g?.length,dr=g?.map(m=>b(m,s)),Q=C?.map(m=>b(m,s)),ur=dr!==void 0&&Q!==void 0&&Q.length>0,pr=B?g?.filter(B):g,Ae=pr?.map(m=>b(m,s)),ve=ur&&Ae.every(m=>Q.includes(m)),co=ur&&Ae.some(m=>Q.includes(m)),mr;S&&(mr=()=>{S(ve?C.filter(m=>!Ae.includes(b(m,s))):ne([...C,...pr],m=>b(m,s)))});let{lastSelectionChangeIndex:fe,setLastSelectionChangeIndex:go}=Or(dr),xr=!!C&&!tr,{cx:nr,classes:A,theme:Co}=$a({borderColor:o,rowBorderColor:a}),bo={m:Yr,my:Qr,mx:jr,mt:Jr,mb:_r,ml:eo,mr:ro},He=typeof Pe=="function"?Pe(Co,Xa):Pe;return Hr(qa,{...bo,className:nr(A.root,{[A.tableWithBorder]:e},ao,ke?.root),sx:[m=>({borderRadius:m.radius[r]||r,boxShadow:m.shadows[i]||i,height:d,minHeight:u}),...Ga(oo)],style:{...He?.root,...to},children:[R(vr,{ref:h,topShadowVisible:!po,leftShadowVisible:!(C||tr),rightShadowVisible:!xo,bottomShadowVisible:!mo,headerHeight:Le,onScrollPositionChange:sr,children:Hr(Ua,{ref:so,horizontalSpacing:T,className:nr(A.table,{[A.tableWithColumnBorders]:t,[A.lastRowBorderBottomVisible]:ae<W,[A.textSelectionDisabled]:f,[A.verticalAlignmentTop]:x==="top",[A.verticalAlignmentBottom]:x==="bottom"}),striped:te?qr:!1,...fo,children:[R(Br,{ref:lo,className:ke?.header,style:He?.header,columns:c,sortStatus:H,onSortStatusChange:P,selectionVisible:!!C,selectionChecked:ve,selectionIndeterminate:co&&!ve,onSelectionChange:mr,leftShadowVisible:xr}),R("tbody",{ref:Kr,children:te?g.map((m,y)=>{let I=b(m,s),j=Q?.includes(I)||!1,le=!1,se=!1;if(L){let{hidden:D}=L;(!D||!(typeof D=="function"?D(m,y):D))&&(L.trigger==="click"?le=!0:se=!0)}let de;S&&(de=D=>{if(D.nativeEvent.shiftKey&&fe!==null){let z=g.filter(y>fe?(F,E)=>E>=fe&&E<=y&&(B?B(F,E):!0):(F,E)=>E>=y&&E<=fe&&(B?B(F,E):!0));S(j?hr(C,z,F=>b(F,s)):ne([...C,...z],F=>b(F,s)))}else S(j?C.filter(z=>b(z,s)!==I):ne([...C,m],z=>b(z,s)));go(y)});let J;le?J=D=>{Y({y:D.clientY,x:D.clientX,record:m,recordIndex:y}),Re?.(m,y)}:Re&&(J=()=>{Re(m,y)});let ir;return se&&(ir=D=>{D.preventDefault(),Y({y:D.clientY,x:D.clientX,record:m,recordIndex:y})}),R(Qe,{record:m,recordIndex:y,columns:c,defaultColumnRender:n,selectionVisible:!!C,selectionChecked:j,onSelectionChange:de,isRecordSelectable:B,onClick:J,onCellClick:Vr,onContextMenu:ir,contextMenuVisible:N?b(N.record,s)===I:!1,expansion:no,className:Ur,style:Zr,sx:Xr,customRowAttributes:$r,leftShadowVisible:xr},I)}):R(Ne,{})})]})}),w&&R(Sr,{ref:uo,className:ke?.pagination,style:He?.pagination,topBorderColor:o,horizontalSpacing:T,fetching:l,page:w,onPageChange:io,totalRecords:k,recordsPerPage:M,onRecordsPerPageChange:Z,recordsPerPageOptions:Be,recordsPerPageLabel:ye,paginationColor:Te,paginationSize:we,paginationText:X,paginationWrapBreakpoint:$,noRecordsText:er,loadingText:Wr,recordsLength:te}),R(Ue,{pt:Le,pb:rr,fetching:l,backgroundBlur:Oe,customContent:De,size:oe,variant:Fr,color:Er}),R(Ie,{pt:Le,pb:rr,icon:zr,text:er,active:!l&&!te,children:Ir}),L&&N&&R(je,{zIndex:L.zIndex,borderRadius:L.borderRadius,shadow:L.shadow,y:N.y,x:N.x,onDestroy:()=>Y(null),children:L.items(N.record,N.recordIndex).map(({divider:m,key:y,title:I,icon:j,color:le,hidden:se,disabled:de,onClick:J})=>m?R(Je,{},y):se?null:R(_e,{title:I??xe(y),icon:j,color:le,disabled:de,onClick:()=>{Y(null),J()}},y))})]})}export{Nr as DataTable};
1
+ import*as p from"react";import{Box as qa,createStyles as Va,packSx as Ga,Table as Ua}from"@mantine/core";import{useElementSize as he}from"@mantine/hooks";import{useEffect as Za}from"react";import{createStyles as So}from"@mantine/core";import{jsx as cr}from"react/jsx-runtime";var ho=So({root:{"&&":{background:"transparent",":last-of-type td":{borderBottom:"none"}}}});function Ne(){let{classes:e}=ho();return cr("tr",{className:e.root,children:cr("td",{})})}import{Center as Oo,createStyles as Do,Text as Ro}from"@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 Bo(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 q(e,r){if(e==null)return{};var o=Bo(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}import _ from"react";var yo=["size","color"];function Fe(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=q(e,yo);return _.createElement("svg",v({xmlns:"http://www.w3.org/2000/svg",className:"icon icon-tabler icon-tabler-arrow-up",width:o,height:o,viewBox:"0 0 24 24",stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"},f),_.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),_.createElement("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),_.createElement("line",{x1:"18",y1:"11",x2:"12",y2:"5"}),_.createElement("line",{x1:"6",y1:"11",x2:"12",y2:"5"}))}import ee from"react";var To=["size","color"];function Ee(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=q(e,To);return ee.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),ee.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),ee.createElement("polyline",{points:"8 7 12 3 16 7"}),ee.createElement("polyline",{points:"8 17 12 21 16 17"}),ee.createElement("line",{x1:"12",y1:"3",x2:"12",y2:"21"}))}import V from"react";var wo=["size","color"];function We(e){var r=e.size,o=r===void 0?24:r,a=e.color,t=a===void 0?"currentColor":a,f=q(e,wo);return V.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),V.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),V.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"}),V.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"}),V.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"}),V.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"}))}import{Fragment as Po,jsx as ue,jsxs as Lo}from"react/jsx-runtime";var ko=Do(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 Ie({icon:e,text:r,pt:o,pb:a,active:t,children:f}){let{classes:d,cx:u}=ko();return ue(Oo,{pt:o,pb:a,className:u(d.root,{[d.active]:t}),children:f||Lo(Po,{children:[e||ue("div",{className:d.standardIcon,children:ue(We,{})}),ue(Ro,{size:"sm",color:"dimmed",children:r})]})})}import{Box as vo,createStyles as Ho,Pagination as No,Text as Fo}from"@mantine/core";import{forwardRef as Eo}from"react";import{Button as Mo,Group as Ao,Menu as pe,Text as gr}from"@mantine/core";import{jsx as G,jsxs as br}from"react/jsx-runtime";var Cr={xs:22,sm:26,md:32,lg:38,xl:44};function ze({size:e,label:r,values:o,value:a,onChange:t,color:f}){return br(Ao,{spacing:"xs",children:[G(gr,{size:e,children:r}),br(pe,{withinPortal:!0,withArrow:!0,children:[G(pe.Target,{children:G(Mo,{size:e,variant:"default",sx:[{fontWeight:"normal"},d=>({height:Cr[e],paddingLeft:d.spacing[e],paddingRight:d.spacing[e]})],children:a})}),G(pe.Dropdown,{children:o.map(d=>{let u=d===a;return G(pe.Item,{sx:[{height:Cr[e]},i=>({"&&":{color:u?i.white:void 0},background:u?i.colors[f||i.primaryColor][6]:void 0})],disabled:u,onClick:()=>t(d),children:G(gr,{size:e,children:d})},d)})})]})]})}import{jsx as qe,jsxs as Io}from"react/jsx-runtime";var Wo=Ho((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}})),Sr=Eo(function({className:r,style:o,topBorderColor:a,fetching:t,page:f,onPageChange:d,paginationColor:u,paginationSize:i,loadingText:n,noRecordsText:l,paginationText:c,totalRecords:m,recordsPerPage:s,onRecordsPerPageChange:g,recordsPerPageLabel:C,recordsPerPageOptions:S,recordsLength:B,horizontalSpacing:H,paginationWrapBreakpoint:P},T){let w;if(t)w=n;else if(!m)w=l;else{let M=(f-1)*s+1,Z=M+B-1;w=c({from:M,to:Z,totalRecords:m})}let{classes:O,cx:k}=Wo({topBorderColor:a,paginationWrapBreakpoint:P});return Io(vo,{ref:T,px:H??"xs",py:"xs",className:k(O.root,r),style:o,children:[qe(Fo,{className:O.text,size:i,children:w}),S&&qe(ze,{size:i,label:C,values:S,value:s,onChange:g}),qe(No,{color:u,className:k(O.pagination,{[O.paginationFetching]:t||!B}),page:f,onChange:d,size:i,total:Math.ceil(m/s)})]})});import{Checkbox as $o,createStyles as Ko}from"@mantine/core";import{forwardRef as Yo}from"react";import{Box as Ve,Center as Vo,createStyles as Go,Group as Uo}from"@mantine/core";import{useMantineTheme as zo}from"@mantine/core";import{useMediaQuery as qo}from"@mantine/hooks";function me(e){let r=zo(),o=typeof e=="function"?e(r):e;return qo(o||"",!0)}function xe(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 hr(e,r,o){return e.filter(a=>!r.map(o).includes(o(a)))}function ne(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}import{jsx as U,jsxs as Xo}from"react/jsx-runtime";var Zo=Go(e=>({sortableColumnHeader:{cursor:"pointer",transition:"background .15s ease","&:hover":{background:e.colorScheme==="dark"?e.colors.dark[6]:e.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: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 Ge({className:e,sx:r,style:o,accessor:a,visibleMediaQuery:t,title:f,sortable:d,textAlignment:u,width:i,sortStatus:n,onSortStatusChange:l}){let{cx:c,classes:m}=Zo();if(!me(t))return null;let s=f??xe(a),g=typeof s=="string"?s:void 0;return U(Ve,{component:"th",className:c({[m.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:n?.direction==="asc"?"desc":"asc"})}:void 0,children:d||n?.columnAccessor===a?Xo(Uo,{className:m.sortableColumnHeaderGroup,position:"apart",noWrap:!0,children:[U(Ve,{className:c(m.columnHeaderText,m.sortableColumnHeaderText),title:g,children:s}),U(Vo,{children:n?.columnAccessor===a?U(Fe,{className:c(m.sortableColumnHeaderIcon,{[m.sortableColumnHeaderIconRotated]:n.direction==="desc"}),size:14}):U(Ee,{className:m.sortableColumnHeaderNeutralIcon,size:14})})]}):U(Ve,{className:m.columnHeaderText,title:g,children:s})})}import{jsx as ie,jsxs as jo}from"react/jsx-runtime";var Qo=Ko(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"}}}),Br=Yo(function({className:r,style:o,sortStatus:a,onSortStatusChange:t,columns:f,selectionVisible:d,selectionChecked:u,selectionIndeterminate:i,onSelectionChange:n,leftShadowVisible:l},c){let{classes:m,cx:s}=Qo();return ie("thead",{className:s(m.root,r),style:o,ref:c,children:jo("tr",{children:[d&&ie("th",{className:s(m.selectorColumnHeader,{[m.selectorColumnHeaderWithRightShadow]:l}),children:ie($o,{classNames:{input:m.selectionCheckboxInput},checked:u,indeterminate:i,disabled:!n,onChange:n})}),f.map(({accessor:g,hidden:C,visibleMediaQuery:S,textAlignment:B,width:H,title:P,sortable:T,titleClassName:w,titleStyle:O,titleSx:k})=>C?null:ie(Ge,{className:w,style:O,sx:k,accessor:g,visibleMediaQuery:S,textAlignment:B,width:H,title:P,sortable:T,sortStatus:a,onSortStatusChange:t},g))]})})});import{Center as Jo,createStyles as _o,Loader as ea}from"@mantine/core";import{jsx as yr}from"react/jsx-runtime";var ra=_o(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 Ue({pt:e,pb:r,fetching:o,customContent:a,backgroundBlur:t,size:f,variant:d,color:u}){let{classes:i,cx:n}=ra();return yr(Jo,{pt:e,pb:r,className:n(i.root,{[i.fetching]:o}),sx:t?{backdropFilter:`blur(${t}px)`}:void 0,children:o&&(a||yr(ea,{size:f,variant:d,color:u}))})}import{Box as ia,createStyles as ca}from"@mantine/core";import{Box as oa,createStyles as aa}from"@mantine/core";import{jsx as fa}from"react/jsx-runtime";var ta=aa({withPointerCursor:{cursor:"pointer"},noWrap:{whiteSpace:"nowrap"},ellipsis:{overflow:"hidden",textOverflow:"ellipsis"}});function Ze({className:e,sx:r,style:o,visibleMediaQuery:a,record:t,recordIndex:f,onClick:d,noWrap:u,ellipsis:i,textAlignment:n,width:l,accessor:c,render:m,defaultRender:s,customCellAttributes:g}){let{cx:C,classes:S}=ta();return me(a)?fa(oa,{component:"td",className:C({[S.noWrap]:u||i,[S.ellipsis]:i,[S.withPointerCursor]:d},e),sx:[{width:l,minWidth:l,maxWidth:l,textAlign:n},r],style:o,onClick:d,...g?.(t,f),children:m?m(t,f):s?s(t,f,c):b(t,c)}):null}import{Collapse as la,createStyles as sa}from"@mantine/core";import{useDebouncedState as ce,useTimeout as Tr}from"@mantine/hooks";import{useEffect as Xe,useState as re}from"react";var ge=200,Ce={leading:!0};function wr(){let[e,r]=ce(!0,ge,Ce),[o,a]=ce(!0,ge,Ce),[t,f]=ce(!0,ge,Ce),[d,u]=ce(!0,ge,Ce);return{scrolledToTop:e,setScrolledToTop:r,scrolledToBottom:o,setScrolledToBottom:a,scrolledToLeft:t,setScrolledToLeft:f,scrolledToRight:d,setScrolledToRight:u}}function Or(e){let[r,o]=re(null),a=e?.join(":")||"";return Xe(()=>{o(null)},[a]),{lastSelectionChangeIndex:r,setLastSelectionChangeIndex:o}}function Dr(e){let[r,o]=re(null);return Xe(()=>{e&&o(null)},[e]),{rowContextMenuInfo:r,setRowContextMenuInfo:o}}function Rr({rowExpansion:e,records:r,idAccessor:o}){let a=[];if(e&&r){let{trigger:u,allowMultiple:i,initiallyExpanded:n}=e;r&&u==="always"?a=r.map(l=>b(l,o)):n&&(a=r.filter(n).map(l=>b(l,o)),i||(a=[a[0]]))}let t,f,d=re(a);if(e){let{trigger:u,allowMultiple:i,collapseProps:n,content:l}=e;e.expanded?{recordIds:t,onRecordIdsChange:f}=e.expanded:[t,f]=d;let c=m=>f(t.filter(s=>s!==b(m,o)));return{expandOnClick:u!=="always"&&u!=="never",isRowExpanded:m=>u==="always"?!0:t.includes(b(m,o)),expandRow:m=>{let s=b(m,o);f(i?[...t,s]:[s])},collapseRow:c,collapseProps:n,content:(m,s)=>()=>l({record:m,recordIndex:s,collapse:()=>c(m)})}}}function kr(e,r){let[o,a]=re(e),[t,f]=re(e),d=Tr(()=>a(!0),0),u=Tr(()=>f(!1),r||200);return Xe(()=>{e?(u.clear(),f(!0),d.start()):(d.clear(),a(!1),u.start())},[d,u,e]),{expanded:o,visible:t}}import{Fragment as ua,jsx as be,jsxs as pa}from"react/jsx-runtime";var da=sa({cell:{"&&":{borderBottomWidth:0,padding:0}},expandedCell:{"&&":{borderBottomWidth:1}}});function $e({open:e,colSpan:r,content:o,collapseProps:a}){let{expanded:t,visible:f}=kr(e,a?.transitionDuration),{cx:d,classes:u}=da();return f?pa(ua,{children:[be("tr",{}),be("tr",{children:be("td",{className:d(u.cell,{[u.expandedCell]:t}),colSpan:r,children:be(la,{in:t,...a,children:o()})})})]}):null}import{Checkbox as ma,createStyles as xa}from"@mantine/core";import{jsx as Pr}from"react/jsx-runtime";var na=xa(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 Ke({withRightShadow:e,...r}){let{cx:o,classes:a}=na();return Pr("td",{className:o(a.root,{[a.withRightShadow]:e}),children:Pr(ma,{classNames:{input:a.checkbox},...r,onClick:t=>t.stopPropagation()})})}import{Fragment as Ca,jsx as Ye,jsxs as Lr}from"react/jsx-runtime";var ga=ca(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 Qe({record:e,recordIndex:r,columns:o,defaultColumnRender:a,selectionVisible:t,selectionChecked:f,onSelectionChange:d,isRecordSelectable:u,onClick:i,onCellClick:n,onContextMenu:l,expansion:c,customRowAttributes:m,className:s,style:g,sx:C,contextMenuVisible:S,leftShadowVisible:B}){let{cx:H,classes:P}=ga();return Lr(Ca,{children:[Lr(ia,{component:"tr",className:H({[P.withPointerCursor]:i||c?.expandOnClick,[P.selected]:f,[P.contextMenuVisible]:S},typeof s=="function"?s(e,r):s),onClick:T=>{if(c){let{isRowExpanded:w,expandOnClick:O,expandRow:k,collapseRow:M}=c;O&&(w(e)?M(e):k(e))}i?.(T)},style:typeof g=="function"?g(e,r):g,sx:C,...m?.(e,r),onContextMenu:l,children:[t&&Ye(Ke,{withRightShadow:B,checked:f,disabled:!d||(u?!u(e,r):!1),onChange:d}),o.map((T,w)=>{let{accessor:O,hidden:k,visibleMediaQuery:M,textAlignment:Z,noWrap:Be,ellipsis:ye,width:Te,render:we,cellsClassName:X,cellsStyle:$,cellsSx:Oe,customCellAttributes:De}=T,oe;return n&&(oe=()=>n({record:e,recordIndex:r,column:T,columnIndex:w})),k?null:Ye(Ze,{className:typeof X=="function"?X(e,r):X,style:typeof $=="function"?$(e,r):$,sx:Oe,visibleMediaQuery:M,record:e,recordIndex:r,onClick:oe,accessor:O,textAlignment:Z,noWrap:Be,ellipsis:ye,width:Te,render:we,defaultRender:a,customCellAttributes:De},O)})]}),c&&Ye($e,{colSpan:o.filter(T=>!T.hidden).length+(t?1:0),open:c.isRowExpanded(e),content:c.content(e,r),collapseProps:c.collapseProps})]})}import{createStyles as ba,Paper as Sa,useMantineTheme as ha}from"@mantine/core";import{useClickOutside as Ba,useElementSize as ya,useMergedRef as Ta,useWindowEvent as Mr}from"@mantine/hooks";import{jsx as Oa}from"react/jsx-runtime";var wa=ba(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 je({borderRadius:e="xs",shadow:r="sm",zIndex:o=3,y:a,x:t,onDestroy:f,children:d}){Mr("resize",f),Mr("scroll",f);let u=Ba(f),{ref:i,width:n,height:l}=ya(),c=Ta(u,i),{dir:m,spacing:{md:s}}=ha(),{innerWidth:g,innerHeight:C}=window,{classes:S}=wa();return Oa(Sa,{ref:c,shadow:r,radius:e,className:S.root,sx:{zIndex:o,top:a+l+s>C?C-l-s:a,left:m==="ltr"?t+n+s>g?g-n-s:t:g-s-(t-n-s<0?n+s:t)},children:d})}import{createStyles as Da}from"@mantine/core";import{jsx as ka}from"react/jsx-runtime";var Ra=Da(e=>({root:{height:1,background:e.colorScheme==="dark"?e.colors.dark[5]:e.colors.gray[1]}}));function Je(){let{classes:e}=Ra();return ka("div",{className:e.root})}import{Box as Pa,createStyles as La,Text as Ma,UnstyledButton as Aa}from"@mantine/core";import{jsx as Ar,jsxs as Ha}from"react/jsx-runtime";var va=La((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 _e({icon:e,title:r,color:o,disabled:a,onClick:t}){let{classes:f}=va({color:o});return Ha(Aa,{className:f.root,disabled:a,onClick:t,children:[e&&Ar(Pa,{className:f.icon,children:e}),Ar(Ma,{className:f.title,size:"sm",children:r})]})}import{Box as Na,createStyles as Fa,ScrollArea as Ea}from"@mantine/core";import{forwardRef as Wa}from"react";import{jsx as Se,jsxs as za}from"react/jsx-runtime";var Ia=Fa(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}}}),vr=Wa(function({topShadowVisible:r,leftShadowVisible:o,rightShadowVisible:a,bottomShadowVisible:t,headerHeight:f,onScrollPositionChange:d,children:u},i){let{cx:n,classes:l}=Ia();return za(Ea,{viewportRef:i,classNames:{root:l.root,scrollbar:l.scrollbar,thumb:l.thumb,corner:l.corner},styles:{scrollbar:{marginTop:f}},onScrollPositionChange:d,children:[u,Se(Na,{className:n(l.shadow,l.topShadow,{[l.shadowVisible]:r}),sx:{top:f}}),Se("div",{className:n(l.shadow,l.leftShadow,{[l.shadowVisible]:o})}),Se("div",{className:n(l.shadow,l.rightShadow,{[l.shadowVisible]:a})}),Se("div",{className:n(l.shadow,l.bottomShadow,{[l.shadowVisible]:t})})]})});import{jsx as R,jsxs as Hr}from"react/jsx-runtime";var Xa={},$a=Va((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 Nr({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:n="center",fetching:l,columns:c,defaultColumnRender:m,idAccessor:s="id",records:g,selectedRecords:C,onSelectedRecordsChange:S,isRecordSelectable:B,sortStatus:H,onSortStatusChange:P,horizontalSpacing:T,page:w,onPageChange:O,totalRecords:k,recordsPerPage:M,onRecordsPerPageChange:Z,recordsPerPageOptions:Be,recordsPerPageLabel:ye="Records per page",paginationColor:Te,paginationSize:we="sm",paginationText:X=({from:h,to:K,totalRecords:W})=>`${h} - ${K} / ${W}`,paginationWrapBreakpoint:$="sm",loaderBackgroundBlur:Oe,customLoader:De,loaderSize:oe,loaderVariant:Fr,loaderColor:Er,loadingText:Wr="...",emptyState:Ir,noRecordsText:er="No records",noRecordsIcon:zr,striped:qr,onRowClick:Re,onCellClick:Vr,rowContextMenu:L,rowExpansion:Gr,rowClassName:Ur,rowStyle:Zr,rowSx:Xr,customRowAttributes:$r,bodyRef:Kr,m:Yr,my:Qr,mx:jr,mt:Jr,mb:_r,ml:eo,mr:ro,sx:oo,className:ao,classNames:ke,style:to,styles:Pe,...fo}){let{ref:h,width:K,height:W}=he(),{ref:lo,height:Le}=he(),{ref:so,width:Me,height:ae}=he(),{ref:uo,height:rr}=he(),{scrolledToTop:po,setScrolledToTop:or,scrolledToBottom:mo,setScrolledToBottom:ar,scrolledToLeft:tr,setScrolledToLeft:fr,scrolledToRight:xo,setScrolledToRight:lr}=wr(),{rowContextMenuInfo:N,setRowContextMenuInfo:Y}=Dr(l),no=Rr({rowExpansion:Gr,records:g,idAccessor:s}),sr=()=>{if(!l&&L&&Y(null),l||ae<=W)or(!0),ar(!0);else{let x=h.current.scrollTop;or(x===0),ar(Math.round(ae-x)===Math.round(W))}if(l||Me===K)fr(!0),lr(!0);else{let x=h.current.scrollLeft;fr(x===0),lr(Math.round(Me-x)===Math.round(K))}};Za(sr,[l,W,h,K,ae,Me]);let io=x=>{h.current.scrollTo({top:0,left:0}),O(x)},te=g?.length,dr=g?.map(x=>b(x,s)),Q=C?.map(x=>b(x,s)),ur=dr!==void 0&&Q!==void 0&&Q.length>0,pr=B?g?.filter(B):g,Ae=pr?.map(x=>b(x,s)),ve=ur&&Ae.every(x=>Q.includes(x)),co=ur&&Ae.some(x=>Q.includes(x)),mr;S&&(mr=()=>{S(ve?C.filter(x=>!Ae.includes(b(x,s))):ne([...C,...pr],x=>b(x,s)))});let{lastSelectionChangeIndex:fe,setLastSelectionChangeIndex:go}=Or(dr),xr=!!C&&!tr,{cx:nr,classes:A,theme:Co}=$a({borderColor:o,rowBorderColor:a}),bo={m:Yr,my:Qr,mx:jr,mt:Jr,mb:_r,ml:eo,mr:ro},He=typeof Pe=="function"?Pe(Co,Xa):Pe;return Hr(qa,{...bo,className:nr(A.root,{[A.tableWithBorder]:e},ao,ke?.root),sx:[x=>({borderRadius:x.radius[r]||r,boxShadow:x.shadows[i]||i,height:d,minHeight:u}),...Ga(oo)],style:{...He?.root,...to},children:[R(vr,{ref:h,topShadowVisible:!po,leftShadowVisible:!(C||tr),rightShadowVisible:!xo,bottomShadowVisible:!mo,headerHeight:Le,onScrollPositionChange:sr,children:Hr(Ua,{ref:so,horizontalSpacing:T,className:nr(A.table,{[A.tableWithColumnBorders]:t,[A.lastRowBorderBottomVisible]:ae<W,[A.textSelectionDisabled]:f,[A.verticalAlignmentTop]:n==="top",[A.verticalAlignmentBottom]:n==="bottom"}),striped:te?qr:!1,...fo,children:[R(Br,{ref:lo,className:ke?.header,style:He?.header,columns:c,sortStatus:H,onSortStatusChange:P,selectionVisible:!!C,selectionChecked:ve,selectionIndeterminate:co&&!ve,onSelectionChange:mr,leftShadowVisible:xr}),R("tbody",{ref:Kr,children:te?g.map((x,y)=>{let I=b(x,s),j=Q?.includes(I)||!1,le=!1,se=!1;if(L){let{hidden:D}=L;(!D||!(typeof D=="function"?D(x,y):D))&&(L.trigger==="click"?le=!0:se=!0)}let de;S&&(de=D=>{if(D.nativeEvent.shiftKey&&fe!==null){let z=g.filter(y>fe?(F,E)=>E>=fe&&E<=y&&(B?B(F,E):!0):(F,E)=>E>=y&&E<=fe&&(B?B(F,E):!0));S(j?hr(C,z,F=>b(F,s)):ne([...C,...z],F=>b(F,s)))}else S(j?C.filter(z=>b(z,s)!==I):ne([...C,x],z=>b(z,s)));go(y)});let J;le?J=D=>{Y({y:D.clientY,x:D.clientX,record:x,recordIndex:y}),Re?.(x,y)}:Re&&(J=()=>{Re(x,y)});let ir;return se&&(ir=D=>{D.preventDefault(),Y({y:D.clientY,x:D.clientX,record:x,recordIndex:y})}),R(Qe,{record:x,recordIndex:y,columns:c,defaultColumnRender:m,selectionVisible:!!C,selectionChecked:j,onSelectionChange:de,isRecordSelectable:B,onClick:J,onCellClick:Vr,onContextMenu:ir,contextMenuVisible:N?b(N.record,s)===I:!1,expansion:no,className:Ur,style:Zr,sx:Xr,customRowAttributes:$r,leftShadowVisible:xr},I)}):R(Ne,{})})]})}),w&&R(Sr,{ref:uo,className:ke?.pagination,style:He?.pagination,topBorderColor:o,horizontalSpacing:T,fetching:l,page:w,onPageChange:io,totalRecords:k,recordsPerPage:M,onRecordsPerPageChange:Z,recordsPerPageOptions:Be,recordsPerPageLabel:ye,paginationColor:Te,paginationSize:we,paginationText:X,paginationWrapBreakpoint:$,noRecordsText:er,loadingText:Wr,recordsLength:te}),R(Ue,{pt:Le,pb:rr,fetching:l,backgroundBlur:Oe,customContent:De,size:oe,variant:Fr,color:Er}),R(Ie,{pt:Le,pb:rr,icon:zr,text:er,active:!l&&!te,children:Ir}),L&&N&&R(je,{zIndex:L.zIndex,borderRadius:L.borderRadius,shadow:L.shadow,y:N.y,x:N.x,onDestroy:()=>Y(null),children:L.items(N.record,N.recordIndex).map(({divider:x,key:y,title:I,icon:j,color:le,hidden:se,disabled:de,onClick:J})=>x?R(Je,{},y):se?null:R(_e,{title:I??xe(y),icon:j,color:le,disabled:de,onClick:()=>{Y(null),J()}},y))})]})}export{Nr as DataTable};
2
2
  //# sourceMappingURL=index.mjs.map