simple-table-core 1.8.7 → 1.8.9

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.
Files changed (36) hide show
  1. package/dist/{Animate-33b73a7f.js → Animate-2b4177d4.js} +2 -2
  2. package/dist/Animate-2b4177d4.js.map +1 -0
  3. package/dist/{DatePicker-90d135e4.js → DatePicker-b28d8e22.js} +2 -2
  4. package/dist/DatePicker-b28d8e22.js.map +1 -0
  5. package/dist/cjs/{Animate-b61de94e.js → Animate-5b511261.js} +2 -2
  6. package/dist/cjs/Animate-5b511261.js.map +1 -0
  7. package/dist/cjs/{DatePicker-4cd71e3e.js → DatePicker-59c069e5.js} +2 -2
  8. package/dist/cjs/DatePicker-59c069e5.js.map +1 -0
  9. package/dist/cjs/components/simple-table/SimpleTable.d.ts +2 -0
  10. package/dist/cjs/context/TableContext.d.ts +3 -0
  11. package/dist/cjs/index-185a7b0e.js +2 -0
  12. package/dist/cjs/index-185a7b0e.js.map +1 -0
  13. package/dist/cjs/index.d.ts +2 -1
  14. package/dist/cjs/index.js +1 -1
  15. package/dist/cjs/styles.css +1 -1
  16. package/dist/cjs/types/OnRowGroupExpandProps.d.ts +12 -0
  17. package/dist/cjs/utils/rowUtils.d.ts +8 -0
  18. package/dist/components/simple-table/SimpleTable.d.ts +2 -0
  19. package/dist/context/TableContext.d.ts +3 -0
  20. package/dist/index-76da1a62.js +2 -0
  21. package/dist/index-76da1a62.js.map +1 -0
  22. package/dist/index.d.ts +2 -1
  23. package/dist/index.es.js +1 -1
  24. package/dist/styles.css +1 -1
  25. package/dist/types/OnRowGroupExpandProps.d.ts +12 -0
  26. package/dist/utils/rowUtils.d.ts +8 -0
  27. package/package.json +1 -1
  28. package/src/styles/base.css +0 -2
  29. package/dist/Animate-33b73a7f.js.map +0 -1
  30. package/dist/DatePicker-90d135e4.js.map +0 -1
  31. package/dist/cjs/Animate-b61de94e.js.map +0 -1
  32. package/dist/cjs/DatePicker-4cd71e3e.js.map +0 -1
  33. package/dist/cjs/index-61d26e91.js +0 -2
  34. package/dist/cjs/index-61d26e91.js.map +0 -1
  35. package/dist/index-bda88aae.js +0 -2
  36. package/dist/index-bda88aae.js.map +0 -1
@@ -1,2 +0,0 @@
1
- import{jsx as e,Fragment as n,jsxs as r}from"react/jsx-runtime";import t,{useEffect as o,useState as i,useRef as a,useMemo as u,useCallback as l,createContext as c,useContext as s,lazy as d,Suspense as f,Fragment as v,cloneElement as h,forwardRef as w,useImperativeHandle as p,isValidElement as m,useLayoutEffect as g,useReducer as b}from"react";var I=function(){return I=Object.assign||function(e){for(var n,r=1,t=arguments.length;t>r;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},I.apply(this,arguments)};function x(e,n){var r={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&0>n.indexOf(t)&&(r[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);t.length>o;o++)0>n.indexOf(t[o])&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(r[t[o]]=e[t[o]])}return r}function C(e,n,r,t){return new(r||(r=Promise))(function(o,i){function a(e){try{l(t.next(e))}catch(e){i(e)}}function u(e){try{l(t.throw(e))}catch(e){i(e)}}function l(e){var n;e.done?o(e.value):(n=e.value,n instanceof r?n:new r(function(e){e(n)})).then(a,u)}l((t=t.apply(e,n||[])).next())})}function y(e,n){var r,t,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=u(0),a.throw=u(1),a.return=u(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(l){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(r=1,t&&(o=2&u[0]?t.return:u[0]?t.throw||((o=t.return)&&o.call(t),0):t.next)&&!(o=o.call(t,u[1])).done)return o;switch(t=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,t=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&o[3]>u[1])){i.label=u[1];break}if(6===u[0]&&o[1]>i.label){i.label=o[1],o=u;break}if(o&&o[2]>i.label){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=n.call(e,i)}catch(e){u=[6,e],t=0}finally{r=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,l])}}}function R(e,n,r){if(r||2===arguments.length)for(var t,o=0,i=n.length;i>o;o++)!t&&o in n||(t||(t=Array.prototype.slice.call(n,0,o)),t[o]=n[o]);return e.concat(t||Array.prototype.slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var S=1,N=function(e){return Math.ceil(800/(e+1))},A=function(e){return 480>e?.3:768>e?.4:.8},M="parentExpanded",k=function(e,n){if(!e.children||0===e.children.length)return[n];var r=[],t=function(e,n){if(!e.children||0===e.children.length)return r.push(n),n+1;for(var o=n,i=0,a=e.children;a.length>i;i++)o=t(a[i],o);return o};return t(e,n),r},E=function(e){return e.flatMap(function(e){var n=[e];return e.children&&e.children.length>0&&n.push.apply(n,E(e.children)),n})},H=function(e){return void 0===e&&(e=0),e?e+1:0},T=function(e){var n=e.accessor;return"".concat(e.rowId,"-").concat(n)},F=function(e){var n=e.header,r=e.pinned,t=e.headers,o=e.collapsedHeaders;return n.hide||n.excludeFromRender||(r||n.pinned)&&n.pinned!==r?null:!(t&&o&&function(e,n,r){var t=function(e,n){for(var r=0,t=E(e);t.length>r;r++){var o=t[r];if(o.children&&o.children.length>0&&o.children.some(function(e){return e.accessor===n}))return o}return null}(n,e.accessor);if(t){var o=r.has(t.accessor),i=e.showWhen||M;return o?"parentExpanded"===i:"parentCollapsed"===i}return!1}(n,t,o))||null},D=function(e){var n=e.accessor;return"".concat(e.rowId,"-").concat(n)},O=function(e,n){return e.hide?[]:e.children&&0!==e.children.length?n&&n.has(e.accessor)?e.children.filter(function(e){var n=e.showWhen||M;return"parentCollapsed"===n||"always"===n}).flatMap(function(e){return O(e,n)}):e.children.filter(function(e){var n=e.showWhen||M;return"parentExpanded"===n||"always"===n}).flatMap(function(e){return O(e,n)}):[e]},L=function(e){if(e.hide)return 0;if("number"==typeof e.width)return e.width;if("string"==typeof e.width&&e.width.endsWith("px"))return parseFloat(e.width);var n=document.getElementById(T({accessor:e.accessor,rowId:"header"}));return(null==n?void 0:n.offsetWidth)||150},P=function(e){var n,r=e.width;"string"==typeof r&&r.includes("fr")&&(e.width=(null===(n=document.getElementById(T({accessor:e.accessor,rowId:"header"})))||void 0===n?void 0:n.offsetWidth)||150),e.children&&e.children.length>0&&e.children.forEach(function(e){P(e)})},B=function(e){return"number"==typeof e.minWidth?e.minWidth:40},W=function(e,n){return n.includes(".")?(n+"").split(".").reduce(function(e,n){return null==e?void 0:e[n]},e):e[n]},q=function(e,n,r){if("string"!=typeof n||n.includes(".")){for(var t=(n+"").split("."),o=e,i=0;t.length-1>i;i++){var a=t[i];null!=o[a]&&"object"==typeof o[a]||(o[a]={}),o=o[a]}o[t[t.length-1]]=r}else e[n]=r},z=function(e){return Array.isArray(e)&&e.length>0&&"object"==typeof e[0]&&null!==e[0]},j=function(e){return e.row[e.rowIdAccessor]},_=function(e){var n=e.contentHeight,r=e.scrollTop,t=e.tableRows,o=e.scrollDirection,i=void 0===o?"none":o,a=e.rowHeight+1,u=e.bufferRowCount*a,l=u,c=u;"down"===i?(l=Math.max(a,.1*u),c=.9*u):"up"===i&&(l=.9*u,c=Math.max(a,.1*u));var s=r+n+c,d=Math.max(0,Math.floor(Math.max(0,r-l)/a)),f=Math.min(t.length,Math.ceil(s/a)),v=r+n,h=Math.max(0,Math.ceil(r/a)),w=Math.min(t.length,Math.floor(v/a)),p=r+n,m=Math.max(0,Math.floor(r/a)),g=Math.min(t.length,Math.ceil(p/a));return{rendered:{startIndex:d,endIndex:f,rows:t.slice(d,f)},fullyVisible:{startIndex:h,endIndex:w,rows:t.slice(h,w)},partiallyVisible:{startIndex:m,endIndex:g,rows:t.slice(m,g)}}},U=function(e){return _({bufferRowCount:e.bufferRowCount,contentHeight:e.contentHeight,rowHeight:e.rowHeight,scrollTop:e.scrollTop,tableRows:e.tableRows,scrollDirection:e.scrollDirection}).rendered.rows},V=function(e){return e.position*(e.rowHeight+1)-1},G=function(e){return e.position*(e.rowHeight+1)},K=function(e,n,r){var t=e.getBoundingClientRect(),o=n.getBoundingClientRect(),i=10;if(o.top+i>t.top?n.scrollTop-=o.top-t.top+i:t.bottom>o.bottom-i&&(n.scrollTop+=t.bottom-o.bottom+i),r){var a=r.getBoundingClientRect();a.left+i>t.left?r.scrollLeft-=a.left-t.left+i:t.right>a.right-i&&(r.scrollLeft+=t.right-a.right+i)}},J=function(e,n,r){var t=document.querySelector(".st-body-container"),o=document.querySelector(".st-body-main");if(t){var i=n+1,a=document.querySelector('.st-cell[data-row-index="'.concat(e.rowIndex,'"][data-col-index="').concat(e.colIndex,'"][data-row-id="').concat(e.rowId,'"]'));if(a&&r){var u=function(e,n,r,t){var o=_({bufferRowCount:0,contentHeight:n.clientHeight,rowHeight:r,scrollTop:n.scrollTop,tableRows:t,scrollDirection:"none"}).fullyVisible;return e>=o.startIndex&&o.endIndex>e}(e.rowIndex,t,n,r);if(u)return void K(a,t,o)}if(!a)return t.scrollTop=Math.max(0,e.rowIndex*i-t.clientHeight/3),void setTimeout(function(){var n=document.querySelector('.st-cell[data-row-index="'.concat(e.rowIndex,'"][data-col-index="').concat(e.colIndex,'"][data-row-id="').concat(e.rowId,'"]'));n&&K(n,t,o)},100);K(a,t,o)}},X=function(e){var n=e.colIndex,r=e.rowId;return"".concat(e.rowIndex,"-").concat(n,"-").concat(r)},Y=c(void 0),$=function(n){return e(Y.Provider,I({value:n.value},{children:n.children}))},Z=function(){var e=s(Y);if(void 0===e)throw Error("useTableContext must be used within a TableProvider");return e},Q=function(t){var o=t.currentPage,a=t.footerRenderer,u=t.hideFooter,l=t.onPageChange,c=t.onNextPage,s=t.onUserPageChange,d=t.rowsPerPage,f=t.shouldPaginate,v=t.totalPages,h=t.totalRows,w=Z(),p=w.nextIcon,m=w.prevIcon,g=i(!0),b=g[0],x=g[1],R=o>1,S=v>o,N=o===v,A=Math.min((o-1)*d+1,h),M=Math.min(o*d,h),k=!R,E=!S&&!c||!b&&N,H=function(){return C(void 0,void 0,void 0,function(){var e;return y(this,function(n){switch(n.label){case 0:return 1>(e=o-1)?[3,2]:(l(e),s?[4,s(e)]:[3,2]);case 1:n.sent(),n.label=2;case 2:return[2]}})})},T=function(){return C(void 0,void 0,void 0,function(){var e,n;return y(this,function(r){switch(r.label){case 0:return e=o===v,n=o+1,c&&e?[4,c(o)]:[3,2];case 1:if(!r.sent())return x(!1),[2];r.label=2;case 2:return n>v&&!c?[3,4]:(l(n),s?[4,s(n)]:[3,4]);case 3:r.sent(),r.label=4;case 4:return[2]}})})},F=function(e){return C(void 0,void 0,void 0,function(){return y(this,function(n){switch(n.label){case 0:return 1>e||e>v?[3,2]:(l(e),s?[4,s(e)]:[3,2]);case 1:n.sent(),n.label=2;case 2:return[2]}})})};if(u||!f)return null;if(a)return e(n,{children:a({currentPage:o,totalPages:v,rowsPerPage:d,totalRows:h,startRow:A,endRow:M,onPageChange:F,onNextPage:T,onPrevPage:H,hasNextPage:!E,hasPrevPage:!k,nextIcon:p,prevIcon:m})});var D=function(){if(15>=v)return Array.from({length:v},function(e,n){return n+1});var e,n,r=[];o>8?v-7>o?(e=o-7,n=o+7):(e=Math.max(1,v-15+1),n=v):(e=1,n=14);for(var t=e;n>=t;t++)r.push(t);return v-1>n&&(r.push(-1),r.push(v)),r}();return r("div",I({className:"st-footer"},{children:[e("div",I({className:"st-footer-info"},{children:r("span",I({className:"st-footer-results-text"},{children:["Showing ",A," to ",M," of ",h.toLocaleString()," results"]}))})),r("div",I({className:"st-footer-pagination"},{children:[D.map(function(n,r){return 0>n?e("span",I({className:"st-page-ellipsis"},{children:"..."}),r):e("button",I({onClick:function(){return F(n)},className:"st-page-btn ".concat(o===n?"active":"")},{children:n}),r)}),e("button",I({className:"st-next-prev-btn ".concat(k?"disabled":""),onClick:H,disabled:k},{children:m})),e("button",I({className:"st-next-prev-btn ".concat(E?"disabled":""),onClick:T,disabled:E},{children:p}))]}))]}))},ee=function(n){return e("svg",I({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M5.41 7.59L10 12.17l4.59-4.58L16 9l-6 6-6-6z"})}))},ne=function(n){return e("svg",I({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})}))},re=function(n){return e("svg",I({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M8.59 16.59L10 18l6-6-6-6-1.41 1.41L13.17 12z"})}))},te=function(n){return e("svg",I({className:n.className,viewBox:"0 0 24 24",width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M5.41 11.41L10 6.83l4.59 4.58L16 10l-6-6-6 6z"})}))},oe=function(n){return e("svg",I({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:n.className,style:{height:"1em"}},{children:e("path",{d:"M298 177.5c3.8-8.8 2-19-4.6-26l-116-144C172.9 2.7 166.6 0 160 0s-12.9 2.7-17.4 7.5l-116 144c-6.6 7-8.4 17.2-4.6 26S34.4 192 44 192l72 0 0 288c0 17.7 14.3 32 32 32l24 0c17.7 0 32-14.3 32-32l0-288 72 0c9.6 0 18.2-5.7 22-14.5z"})}))},ie=function(n){return e("svg",I({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",className:n.className,style:I({height:"10px"},n.style)},{children:e("path",{d:"M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"})}))},ae=function(n){return e("svg",I({"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",className:n.className,style:{height:"1em"}},{children:e("path",{d:"M22 334.5c-3.8 8.8-2 19 4.6 26l116 144c4.5 4.8 10.8 7.5 17.4 7.5s12.9-2.7 17.4-7.5l116-144c6.6-7 8.4-17.2 4.6-26s-12.5-14.5-22-14.5l-72 0 0-288c0-17.7-14.3-32-32-32L148 0C130.3 0 116 14.3 116 32l0 288-72 0c-9.6 0-18.2 5.7-22 14.5z"})}))},ue=function(n){return e("svg",I({"aria-hidden":"true",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",className:n.className,style:I({height:"1em"},n.style)},{children:e("path",{d:"M3.9 54.9C10.5 40.9 24.5 32 40 32l432 0c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9 320 448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6l0-79.1L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"})}))},le=function(){return e("svg",I({className:"st-custom-select-arrow",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:e("path",{d:"M3 4.5L6 7.5L9 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}))},ce=function(e){var n=e.headerContainerRef,r=e.mainSectionRef,t=e.scrollbarWidth,a=i(!1),u=a[0],l=a[1];return o(function(){var e=null==n?void 0:n.current;if(u&&e)return e.classList.add("st-header-scroll-padding"),e.style.setProperty("--st-after-width","".concat(t,"px")),function(){e.classList.remove("st-header-scroll-padding")}},[n,u,t]),o(function(){var e=null==r?void 0:r.current;if(e&&(null==n?void 0:n.current)){var t=function(){e&&l(e.scrollHeight>e.clientHeight)};t();var o=new ResizeObserver(function(){t()});return o.observe(e),function(){e&&o.unobserve(e)}}},[n,r]),{isMainSectionScrollable:u}},se=function(n){var r=n.children,t=n.onClose,u=n.open,l=n.overflow,c=void 0===l?"auto":l,s=n.setOpen,d=n.width,f=n.containerRef,v=n.positioning,h=void 0===v?"fixed":v,w=Z().mainBodyRef,p=a(null),m=a(null),g=i("bottom-left"),b=g[0],x=g[1],C=i({}),y=C[0],R=C[1],S=i(!1),N=S[0],A=S[1];return o(function(){u&&p.current?(A(!1),!m.current&&p.current.parentElement&&(m.current=p.current.parentElement),requestAnimationFrame(function(){if(p.current&&m.current){var e,n=p.current,r=m.current.getBoundingClientRect(),t=n.offsetHeight,o=d||n.offsetWidth,i=(e=(null==f?void 0:f.current)?f.current.getBoundingClientRect():(null==w?void 0:w.current)?w.current.getBoundingClientRect():{top:0,right:window.innerWidth,bottom:window.innerHeight,left:0,width:window.innerWidth,height:window.innerHeight,x:0,y:0,toJSON:function(){}}).bottom-r.bottom,a=r.top-e.top,u="bottom",l={};(t>i&&a>=t||t>i&&a>i)&&(u="top");var c="left";o>e.right-r.right+r.width&&(c="right"),"fixed"===h?("bottom"===u?l.top=r.bottom+4:l.bottom=window.innerHeight-r.top+4,"left"===c?l.left=r.left:l.right=window.innerWidth-r.right):("bottom"===u?l.top=r.height+4:l.bottom=r.height+4,"left"===c?l.left=0:l.right=0),x("".concat(u,"-").concat(c)),R(l),A(!0)}})):u||A(!1)},[u,d,f,w,h]),o(function(){var e=function(e){u&&p.current&&p.current&&!p.current.contains(e.target)&&(s(!1),null==t||t())};return u&&window.addEventListener("scroll",e,!0),function(){window.removeEventListener("scroll",e,!0)}},[u,t,s]),o(function(){var e=function(e){if(p.current&&!p.current.contains(e.target)){var n=p.current.parentElement;n&&!n.contains(e.target)&&(s(!1),null==t||t())}};return u&&document.addEventListener("mousedown",e,!0),function(){document.removeEventListener("mousedown",e,!0)}},[t,u,s]),o(function(){var e=function(e){"Escape"===e.key&&u&&(s(!1),null==t||t())};return u&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}},[t,u,s]),u?e("div",I({ref:p,className:"st-dropdown-content st-dropdown-".concat(b),onClick:function(e){return e.stopPropagation()},style:I(I({position:h,width:d?"".concat(d,"px"):"auto",visibility:N?"visible":"hidden"},y),{overflow:c})},{children:r})):null},de=function(n){var r=n.children,t=n.onClick,o=n.isSelected,i=void 0!==o&&o,a=n.disabled,u=void 0!==a&&a,l=n.className,c=void 0===l?"":l;return e("div",I({className:"st-dropdown-item ".concat(i?"selected":""," ").concat(u?"disabled":""," ").concat(c),onClick:function(){!u&&t&&t()},role:"option","aria-selected":i,"aria-disabled":u},{children:r}))},fe=function(n){var t=n.onBlur,o=n.onChange,a=n.open,u=n.setOpen,l=i(n.value),c=l[0],s=l[1],d=function(e){s(e),o(e),u(!1),t()};return r(se,I({open:a,onClose:function(){t()},setOpen:u,width:120},{children:[e(de,I({isSelected:!0===c,onClick:function(){return d(!0)}},{children:"True"})),e(de,I({isSelected:!1===c,onClick:function(){return d(!1)}},{children:"False"}))]}))},ve=function(n){var r=n.defaultValue,t=n.onBlur,o=n.onChange,i=a(null);return e("input",{className:"editable-cell-input",ref:i,autoFocus:!0,type:"text",defaultValue:null!=r?r:"",onBlur:t,onChange:function(e){o(e.target.value)},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key&&"Escape"!==e.key||t()},onMouseDown:function(e){e.stopPropagation()}})},he=function(n){var r=n.defaultValue,t=n.onBlur,o=n.onChange,i=a(null);return e("input",{className:"editable-cell-input",ref:i,autoFocus:!0,defaultValue:""+r,onBlur:t,onChange:function(e){var n=e.target.value;/^\d*\.?\d*$/.test(n)&&o(n)},onKeyDown:function(e){e.stopPropagation(),"Enter"!==e.key&&"Escape"!==e.key||t()},onMouseDown:function(e){e.stopPropagation()}})},we=d(function(){return import("./Animate-33b73a7f.js")}),pe=d(function(){return import("./DatePicker-90d135e4.js")}),me=d(function(){return Promise.resolve().then(function(){return Xn})}),ge=d(function(){return Promise.resolve().then(function(){return $n})}),be=function(n){var r=x(n,["parentRef","tableRow"]);return e(f,I({fallback:e("div",I({},r))},{children:e(we,I({},n))}))},Ie=function(n){return e(f,I({fallback:e("div",I({style:{padding:"20px",textAlign:"center"}},{children:"Loading..."}))},{children:e(pe,I({},n))}))},xe=function(n){var r=n.width,t=n.height;return e(f,I({fallback:e("div",{style:{width:void 0===r?100:r,height:void 0===t?30:t,background:"#f3f4f6"}})},{children:e(me,I({},n))}))},Ce=function(n){var r=n.width,t=n.height;return e(f,I({fallback:e("div",{style:{width:void 0===r?100:r,height:void 0===t?30:t,background:"#f3f4f6"}})},{children:e(ge,I({},n))}))},ye=function(e){if(!e)return new Date;if(/^\d{4}-\d{2}-\d{2}$/.test(e)){var n=e.split("-").map(Number);return new Date(n[0],n[1]-1,n[2],12,0,0)}var r=new Date(e);return isNaN(r.getTime())?new Date:new Date(r.getFullYear(),r.getMonth(),r.getDate(),12,0,0)},Re=function(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),12,0,0)},Se=function(e){if(!e)return new Date;if("string"==typeof e)return ye(e);if("number"==typeof e){var n=new Date(e);return isNaN(n.getTime())?new Date:Re(n)}return e instanceof Date?Re(e):new Date},Ne=function(e){return e?ye(""+e):new Date},Ae=function(n){var r=n.onBlur,t=n.onChange,i=n.open,a=n.setOpen,u=n.value;o(function(){var e=setTimeout(function(){var e=document.querySelector(".st-dropdown-container");e instanceof HTMLElement&&e.focus()},0);return function(){return clearTimeout(e)}},[]);var l=function(){r()};return e(se,I({open:i,onClose:l,setOpen:a,width:280},{children:e(Ie,{value:Ne(u),onChange:function(e){var n=e.toISOString().split("T")[0];t(n),a(!1),r()},onClose:l})}))},Me=function(n){var r=n.onBlur,t=n.onChange,o=n.open,a=n.options,u=n.setOpen,l=i(n.value||""),c=l[0],s=l[1];return e(se,I({open:o,onClose:function(){r()},setOpen:u,width:150},{children:e("div",I({className:"st-enum-dropdown-content"},{children:a.map(function(n){return e(de,I({isSelected:c===n.value,onClick:function(){return s(e=n.value),t(e),u(!1),void r();var e}},{children:n.label}),n.value)})}))}))},ke=function(n){var r=n.enumOptions,t=void 0===r?[]:r,o=n.onChange,i=n.setIsEditing,a=n.type,u=void 0===a?"string":a,l=n.value,c=function(){i(!1)};return"boolean"===u&&"boolean"==typeof l?e(fe,{onBlur:c,onChange:function(e){return o(e)},open:!0,setOpen:i,value:l}):"date"===u?e(Ae,{onBlur:c,onChange:o,open:!0,setOpen:i,value:l}):"enum"===u?e(Me,{onBlur:c,onChange:o,open:!0,options:t,setOpen:i,value:"string"==typeof l?l:""}):"number"===u&&"number"==typeof l?e(he,{defaultValue:l,onBlur:c,onChange:function(e){var n=""===e?0:parseFloat(e);o(isNaN(n)?0:n)}}):e(ve,{defaultValue:null==l?"":l+"",onBlur:c,onChange:o})},Ee=0,He=function(){return function(e){var n=e.callback,r=e.callbackProps,t=e.limit,o=Date.now();0!==Ee&&t>o-Ee||(Ee=o,n(r))}},Te=function(e){var n=a(e);return o(function(){JSON.stringify(n.current)!==JSON.stringify(e)&&(n.current=e)},[e]),n.current},Fe=function(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Fe);var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Fe(e[r]));return n},De=function(e,n){return e.filter(function(e){return e.pinned===n}).some(function(e){return!e.hide})},Oe=Date.now(),Le={screenX:0,screenY:0},Pe=function(e,n,r){void 0===r&&(r=[]);for(var t=0;e.length>t;t++){var o=e[t];if(o.accessor===n)return R(R([],r,!0),[t],!1);if(o.children&&o.children.length>0){var i=Pe(o.children,n,R(R([],r,!0),[t],!1));if(i)return i}}return null},Be=function(e){return"left"===e.pinned?"left":"right"===e.pinned?"right":"main"};var We=function(e){var n=e.draggedHeaderRef,r=e.headers,t=e.hoveredHeaderRef,o=e.onColumnOrderChange,i=e.onTableHeaderDragEnd,a=Z().setHeaders,u=Te(r);return{handleDragStart:function(e){n.current=e,Oe=Date.now()},handleDragOver:function(e){var o=e.event,a=e.hoveredHeader;if(o.preventDefault(),r&&n.current){var l=o.currentTarget.getAnimations().some(function(e){return"running"===e.playState}),c=o.screenX,s=o.screenY,d=Math.sqrt(Math.pow(c-Le.screenX,2)+Math.pow(s-Le.screenY,2));t.current=a;var f,v=n.current,h=!1;if(Be(v)!==Be(a))f=(y=function(e,n,r){var t,o,i=Fe(e),a=!1;try{var u=Be(r),l=i.findIndex(function(e){return e.accessor===n.accessor}),c=i.findIndex(function(e){return e.accessor===r.accessor});if(-1===l||-1===c)return{newHeaders:i,emergencyBreak:a=!0};var s=i.splice(l,1)[0],d=(t=u,o=I({},s),"left"===t?o.pinned="left":"right"===t?o.pinned="right":delete o.pinned,o);i.splice(c,0,d)}catch(e){console.error("Error in insertHeaderAcrossSections:",e),a=!0}return{newHeaders:i,emergencyBreak:a}}(r,v,a)).newHeaders,h=y.emergencyBreak;else{var w=r,p=Pe(w,v.accessor),m=Pe(w,a.accessor);if(!p||!m)return;var g=p.length,b=m.length,x=m;if(g!==b){var C=b-g;C>0&&(x=m.slice(0,-C))}var y=function(e,n,r){var t=Fe(e),o=!1;function i(e,n){for(var r=e,t=0;n.length-1>t;t++)r=r[n[t]].children;return r[n[n.length-1]]}function a(e,n,r){for(var t=e,i=0;n.length-1>i;i++){if(!t[n[i]].children){o=!0;break}t=t[n[i]].children}t[n[n.length-1]]=r}var u=i(t,n);return a(t,n,i(t,r)),a(t,r,u),{newHeaders:t,emergencyBreak:o}}(w,p,x);f=y.newHeaders,h=y.emergencyBreak}if(!(l||a.accessor===v.accessor||10>d||JSON.stringify(f)===JSON.stringify(r)||h)){var R=Date.now();JSON.stringify(f)===JSON.stringify(u)&&(1500>R-Oe||40>d)||(Oe=R,Le={screenX:c,screenY:s},i(f))}}},handleDragEnd:function(){n.current=null,t.current=null,setTimeout(function(){a(function(e){return R([],e,!0)}),null==o||o(r)},10)}}},qe=function(n){var t=n.checked,o=void 0!==t&&t,i=n.children,a=n.onChange;return r("label",I({className:"st-checkbox-label"},{children:[e("input",{checked:o,className:"st-checkbox-input",onChange:function(){a&&a(!o)},type:"checkbox"}),e("span",I({className:"st-checkbox-custom ".concat(o?"st-checked":"")},{children:o&&e(ie,{className:"st-checkbox-checkmark"})})),i]}))},ze=function(n){var r,t=n.content,o=n.header;return o.valueFormatter?o.valueFormatter({accessor:o.accessor,colIndex:n.colIndex,row:n.row,rowIndex:n.rowIndex,value:t}):"lineAreaChart"===o.type&&Array.isArray(t)?(r=t.filter(function(e){return"number"==typeof e})).length>0?e(xe,I({data:r},o.chartOptions)):null:"barChart"===o.type&&Array.isArray(t)?(r=t.filter(function(e){return"number"==typeof e})).length>0?e(Ce,I({data:r},o.chartOptions)):null:"boolean"==typeof t?t?"True":"False":Array.isArray(t)?0===t.length?"[]":t.map(function(e){return"object"==typeof e&&null!==e?JSON.stringify(e):e+""}).join(", "):"date"===o.type&&null!==t&&("string"==typeof t||"number"==typeof t||"object"==typeof t&&t instanceof Date)?Se(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}):t},je=t.memo(function(n){var t=n.borderClass,c=n.colIndex,s=n.displayRowNumber,d=n.header,f=n.isHighlighted,v=n.isInitialFocused,h=n.nestedIndex,w=n.parentHeader,p=n.rowIndex,m=n.tableRow,g=Z(),b=g.cellRegistry,x=g.cellUpdateFlash,C=g.columnBorders,y=g.draggedHeaderRef,R=g.enableRowSelection,S=g.expandIcon,N=g.handleMouseDown,A=g.handleMouseOver,M=g.handleRowSelect,k=g.headers,E=g.hoveredHeaderRef,H=g.isCopyFlashing,F=g.isLoading,O=g.isRowSelected,L=g.isWarningFlashing,P=g.onCellEdit,B=g.onCellClick,_=g.onTableHeaderDragEnd,U=g.rowButtons,V=g.rowGrouping,G=g.rowIdAccessor,K=g.rowsWithSelectedCells,J=g.selectedColumns,X=g.setUnexpandedRows,Y=g.tableBodyContainerRef,$=g.theme,Q=g.unexpandedRows,ee=g.useOddColumnBackground,ne=m.depth,re=m.row,te=i(W(re,d.accessor)),oe=te[0],ie=te[1],ae=i(!1),ue=ae[0],le=ae[1],ce=i(!1),se=ce[0],de=ce[1],fe=i(!1),ve=fe[0],he=fe[1],we=a(null),pe=j({row:re,rowIdAccessor:G}),me=V&&V[ne],ge=!!me&&function(e,n){return!!n&&z(e[n])}(re,me),Ie=!Q.has(pe+""),xe=H({rowIndex:p,colIndex:c,rowId:pe}),Ce=L({rowIndex:p,colIndex:c,rowId:pe}),ye=u(function(){var e,n,r;if(!C)return!1;var t=k.filter(function(e){return"left"===e.pinned}),o=k.filter(function(e){return!e.pinned}),i=k.filter(function(e){return"right"===e.pinned});return"left"===d.pinned?(null===(e=t[t.length-1])||void 0===e?void 0:e.accessor)===d.accessor:"right"===d.pinned?(null===(n=i[i.length-1])||void 0===n?void 0:n.accessor)===d.accessor:(null===(r=o[o.length-1])||void 0===r?void 0:r.accessor)===d.accessor},[C,k,d.accessor,d.pinned]),Re=We({draggedHeaderRef:y,headers:k,hoveredHeaderRef:E,onTableHeaderDragEnd:_}).handleDragOver,Se=He(),Ne=T({accessor:d.accessor,rowId:pe}),Ae=D({rowId:pe,accessor:d.accessor}),Me=d.isSelectionColumn&&R;o(function(){if(b){var e="".concat(pe,"-").concat(d.accessor);return b.set(e,{updateContent:function(e){oe!==e?(ie(e),x&&(de(!0),we.current&&clearTimeout(we.current),we.current=setTimeout(function(){de(!1)},800))):ie(e)}}),function(){b.delete(e),we.current&&clearTimeout(we.current)}}},[b,x,pe,d.accessor,oe]),o(function(){if(se){var e=setTimeout(function(){de(!1)},850);return function(){return clearTimeout(e)}}},[se]),o(function(){ie(W(re,d.accessor))},[re,d.accessor]);var Ee="boolean"===d.type||"date"===d.type||"enum"===d.type,Te=!!(null==d?void 0:d.isEditable),Fe=J.has(c),De=f&&!Fe,Oe=u(function(){return!!Me&&K.has(pe+"")},[Me,K,pe]),Le=null==w?void 0:w.singleRowChildren,Pe="st-cell ".concat(ne>0&&d.expandable?"st-cell-depth-".concat(ne):""," ").concat(De?v?"st-cell-selected-first ".concat(t):"st-cell-selected ".concat(t):""," ").concat(Fe?v?"st-cell-column-selected-first":"st-cell-column-selected":""," ").concat(Te?"clickable":""," ").concat(se?v?"st-cell-updating-first":"st-cell-updating":""," ").concat(xe?v?"st-cell-copy-flash-first":"st-cell-copy-flash":""," ").concat(Ce?v?"st-cell-warning-flash-first":"st-cell-warning-flash":""," ").concat(ee?h%2==0?"even-column":"odd-column":""," ").concat(Me?"st-selection-cell":""," ").concat(Oe?"st-selection-has-highlighted-cell":""," ").concat(ye?"st-last-column":""," ").concat(Le?"st-sub-cell":""),Be=l(function(e){null==e&&(e="number"===d.type?0:"boolean"!==d.type&&""),ie(e),q(re,d.accessor,e),null==P||P({accessor:d.accessor,newValue:e,row:re,rowIndex:p})},[d.accessor,d.type,P,re,p]),je=l(function(){X(function(e){var n=new Set(e),r=pe+"";return n.has(r)?n.delete(r):n.add(r),n})},[pe,X]);return F?e("div",I({className:Pe},{children:e("span",I({className:"st-cell-content ".concat("right"===d.align?"right-aligned":"center"===d.align?"center-aligned":"left-aligned")},{children:e("div",{className:"st-loading-skeleton"})}))})):!ue||Ee||Me?r(be,I({className:Pe,"data-accessor":d.accessor,"data-col-index":c,"data-row-id":pe,"data-row-index":p,id:Ne,onClick:function(){B&&!Me&&B({accessor:d.accessor,colIndex:c,row:re,rowId:pe,rowIndex:p,value:oe})},onDoubleClick:function(){return d.isEditable&&!Me&&le(!0)},onDragOver:function(e){Me||Se({callback:Re,callbackProps:{event:e,hoveredHeader:d},limit:50})},onKeyDown:function(e){ue||Me||"F2"!==e.key&&"Enter"!==e.key||!d.isEditable||ue||(e.preventDefault(),le(!0))},onMouseDown:function(){ue||Me||N({rowIndex:p,colIndex:c,rowId:pe})},onMouseEnter:function(){he(!0)},onMouseLeave:function(){he(!1)},onMouseOver:function(){ue||Me||A({rowIndex:p,colIndex:c,rowId:pe})},parentRef:Y,tableRow:m},{children:[d.expandable&&ge?e("div",I({className:"st-icon-container st-expand-icon-container ".concat(Ie?"expanded":"collapsed"),onClick:je},{children:S})):null,e("span",I({className:"st-cell-content ".concat("right"===d.align?"right-aligned":"center"===d.align?"center-aligned":"left-aligned")},{children:F?e("div",{className:"st-loading-skeleton"}):e("span",{children:Me?r("div",I({className:"st-selection-cell-content"},{children:[e("div",I({className:"st-selection-control"},{children:ve||O&&O(pe+"")?e(qe,{checked:!!O&&O(pe+""),onChange:function(e){M&&M(pe+"",e)}}):e("span",I({className:"st-row-number"},{children:s+1}))})),function(){if(!U||!Me||0===U.length)return null;if(!(ve||O&&O(pe+"")))return null;var n={row:re};return e("div",I({className:"st-row-buttons"},{children:U.map(function(r,t){return e("span",I({className:"st-row-button"},{children:r(n)}),t)})}))}()]})):d.cellRenderer?function(){var e;return d.cellRenderer({accessor:d.accessor,colIndex:c,row:re,theme:$,value:oe,formattedValue:null===(e=null==d?void 0:d.valueFormatter)||void 0===e?void 0:e.call(d,{accessor:d.accessor,colIndex:c,row:re,rowIndex:p,value:oe})})}():ze({content:oe,header:d,colIndex:c,row:re,rowIndex:p})})})),!F&&ue&&Ee&&!Me&&e(ke,{enumOptions:d.enumOptions,onChange:Be,setIsEditing:le,type:d.type,value:oe})]}),Ae):e("div",I({className:"st-cell-editing",id:T({accessor:d.accessor,rowId:pe}),onMouseDown:function(e){return e.stopPropagation()},onKeyDown:function(e){return e.stopPropagation()}},{children:e(ke,{enumOptions:d.enumOptions,onChange:Be,setIsEditing:le,type:d.type,value:oe})}))},function(e,n){if(e.rowIndex!==n.rowIndex||e.colIndex!==n.colIndex||e.isHighlighted!==n.isHighlighted||e.isInitialFocused!==n.isInitialFocused||e.borderClass!==n.borderClass)return!1;if(e.tableRow!==n.tableRow){if(e.tableRow.row!==n.tableRow.row)return!1;if(e.tableRow.position!==n.tableRow.position||e.tableRow.displayPosition!==n.tableRow.displayPosition)return!1}return(e.header===n.header||e.header.accessor===n.header.accessor&&e.header.isEditable===n.header.isEditable&&e.header.type===n.header.type&&e.header.cellRenderer===n.header.cellRenderer&&e.header.valueFormatter===n.header.valueFormatter)&&e.parentHeader===n.parentHeader&&e.displayRowNumber===n.displayRowNumber&&e.nestedIndex===n.nestedIndex}),_e=function(n){var t=n.columnIndices,o=n.displayRowNumber,i=n.header,a=n.headers,u=n.nestedIndex,l=n.parentHeader,c=n.pinned,s=n.rowIndex,d=n.rowIndices,f=n.tableRow,h=t[i.accessor],w=Z(),p=w.getBorderClass,m=w.isSelected,g=w.isInitialFocusedCell,b=w.collapsedHeaders,I=j({row:f.row,rowIdAccessor:w.rowIdAccessor});if(i.children&&i.children.length>0){var x=i.children.filter(function(e){return F({header:e,pinned:c,headers:a,collapsedHeaders:b})});if(i.singleRowChildren){var C={rowIndex:s,colIndex:h,rowId:I},y=p(C),R=m(C),S=g(C),N=T({accessor:i.accessor,rowId:I});return r(v,{children:[e(je,{borderClass:y,colIndex:h,displayRowNumber:o,header:i,isHighlighted:R,isInitialFocused:S,nestedIndex:u,parentHeader:l,rowIndex:s,tableRow:f},N),x.map(function(n){var r=T({accessor:n.accessor,rowId:I});return e(_e,{columnIndices:t,displayRowNumber:o,header:n,headers:a,nestedIndex:u,parentHeader:i,pinned:c,rowIndex:s,rowIndices:d,tableRow:f},r)})]})}return e(v,{children:x.map(function(n){var r=T({accessor:n.accessor,rowId:I});return e(_e,{columnIndices:t,displayRowNumber:o,header:n,headers:a,nestedIndex:u,parentHeader:i,pinned:c,rowIndex:s,rowIndices:d,tableRow:f},r)})})}var A={rowIndex:s,colIndex:h,rowId:I},M=p(A),k=m(A),E=g(A),H=T({accessor:i.accessor,rowId:I});return e(je,{borderClass:M,colIndex:h,displayRowNumber:o,header:i,isHighlighted:k,isInitialFocused:E,nestedIndex:u,parentHeader:l,rowIndex:s,tableRow:f},H)},Ue=t.memo(function(r){var t=r.columnIndexStart,o=r.columnIndices,i=r.headers,a=r.pinned,u=r.rowIndex,l=r.displayRowNumber,c=r.rowIndices,s=r.tableRow,d=Z(),f=d.rowIdAccessor,v=d.collapsedHeaders,h=i.filter(function(e){return F({header:e,pinned:a,headers:i,collapsedHeaders:v})});return e(n,{children:h.map(function(n,r){var d=j({row:s.row,rowIdAccessor:f}),v=T({accessor:n.accessor,rowId:d});return e(_e,{columnIndices:o,displayRowNumber:l,header:n,headers:i,nestedIndex:r+(null!=t?t:0),pinned:a,rowIndex:u,rowIndices:c,tableRow:s},v)})})},function(e,n){return e.rowIndex===n.rowIndex&&e.displayRowNumber===n.displayRowNumber&&e.columnIndexStart===n.columnIndexStart&&(e.tableRow===n.tableRow||e.tableRow.row===n.tableRow.row)&&e.pinned===n.pinned&&e.headers===n.headers&&e.columnIndices===n.columnIndices&&e.rowIndices===n.rowIndices}),Ve=t.memo(function(n){var r=n.columnIndices,t=n.columnIndexStart,o=n.gridTemplateColumns,i=n.headers,a=n.index,u=n.pinned,l=n.rowHeight,c=n.rowIndices,s=n.setHoveredIndex,d=n.tableRow,f=Z(),v=f.useHoverRowBackground,h=f.isAnimating,w=f.isRowSelected,p=f.useOddEvenRowBackground,m=d.position,g=d.displayPosition,b=m%2==0,x=j({row:d.row,rowIdAccessor:f.rowIdAccessor}),C=!!w&&w(x+"");return e("div",I({className:"st-row ".concat(p?b?"even":"odd":""," ").concat(C?"selected":""),"data-index":a,onMouseEnter:function(){!h&&v&&s(a)},style:{gridTemplateColumns:o,transform:"translate3d(0, ".concat(G({position:m,rowHeight:l}),"px, 0)"),height:"".concat(l,"px")}},{children:e(Ue,{columnIndexStart:t,columnIndices:r,displayRowNumber:g,headers:i,pinned:u,rowIndex:m,rowIndices:c,tableRow:d},x)}))},function(e,n){return e.index===n.index&&e.tableRow.position===n.tableRow.position&&e.tableRow.displayPosition===n.tableRow.displayPosition&&e.tableRow.row===n.tableRow.row&&e.rowHeight===n.rowHeight&&e.gridTemplateColumns===n.gridTemplateColumns&&e.pinned===n.pinned&&e.headers===n.headers&&e.columnIndices===n.columnIndices&&e.rowIndices===n.rowIndices&&e.columnIndexStart===n.columnIndexStart}),Ge=function(n){var r=n.displayStrongBorder,t=n.position,o=n.rowHeight,i=n.templateColumns,u=a(null);return e("div",I({className:"st-row-separator ".concat(r?"st-last-group-row":""),onMouseDown:function(e){var n=e.currentTarget,r=n.style.pointerEvents;n.style.pointerEvents="none";var t=document.elementFromPoint(e.clientX,e.clientY);if(n.style.pointerEvents=r,t){var o=t.closest(".st-cell");if(o instanceof HTMLElement){u.current=o;var i=o.getBoundingClientRect(),a=new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window,button:0,clientX:e.clientX,clientY:i.top+i.height/2});o.dispatchEvent(a)}}},onMouseUp:function(e){if(u.current){var n=u.current.getBoundingClientRect(),r=new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,view:window,button:0,clientX:e.clientX,clientY:n.top+n.height/2});u.current.dispatchEvent(r),u.current=null}},style:{gridTemplateColumns:i,transform:"translate3d(0, ".concat(V({position:t,rowHeight:o}),"px, 0)")}},{children:e("div",{style:{gridColumn:"1 / -1"}})}))},Ke=c(void 0),Je=function(e){var n=e.childRef,r=e.children,t=e.group,i=void 0===t?"default":t,a=function(){var e=s(Ke);if(!e)throw Error("useScrollSyncContext must be used within a ScrollSyncProvider");return e}(),u=a.registerPane,l=a.unregisterPane;return o(function(){var e=[i];return n.current&&u(n.current,e),function(){n.current&&l(n.current,e)}},[n,u,l,i]),h(r,{ref:function(e){n.current=e}})},Xe=w(function(n,t){var o=n.columnIndexStart,i=n.columnIndices,l=n.headers,c=n.pinned,s=n.rowHeight,d=n.rowIndices,f=n.setHoveredIndex,h=n.templateColumns,w=n.totalHeight,m=n.rowsToRender,g=n.width,b=c?"st-body-pinned-".concat(c):"st-body-main",x=Z().rowIdAccessor,C=a(null);return p(t,function(){return C.current},[]),u(function(){return De(l,c)},[l,c])?e(Je,I({childRef:C,group:c?"pinned-".concat(c):"default"},{children:e("div",I({className:b,ref:C,style:I({position:"relative",height:"".concat(w,"px"),width:g},!c&&{flexGrow:1})},{children:m.map(function(n,t){var a=j({row:n.row,rowIdAccessor:x});return r(v,{children:[0!==t&&e(Ge,{displayStrongBorder:n.isLastGroupRow,position:n.position,rowHeight:s,templateColumns:h,rowIndex:t-1}),e(Ve,{columnIndexStart:o,columnIndices:i,gridTemplateColumns:h,headers:l,index:t,pinned:c,rowHeight:s,rowIndices:d,setHoveredIndex:f,tableRow:n},a)]},a)})}))})):null});function Ye(e){var n=e.headers,r=e.pinnedLeftColumns,t=e.pinnedRightColumns,o=e.collapsedHeaders,i={},a=0,u=R(R(R([],r,!0),n,!0),t,!0),l=function(e,n){void 0===n&&(n=!1),n||a++,i[e.accessor]=a,e.children&&e.children.length>0&&e.children.filter(function(e){return F({header:e,headers:u,collapsedHeaders:o})}).forEach(function(n,r){l(n,!e.singleRowChildren&&0===r)})};return r.forEach(function(e,n){l(e,0===n)}),n.filter(function(e){return!e.pinned&&F({header:e,headers:u,collapsedHeaders:o})}).forEach(function(e,n){l(e,0===n&&0===r.length)}),t.forEach(function(e){l(e,!1)}),i}Xe.displayName="TableSection";var $e=function(n){var t=n.mainTemplateColumns,c=n.pinnedLeftColumns,s=n.pinnedLeftTemplateColumns,d=n.pinnedLeftWidth,f=n.pinnedRightColumns,v=n.pinnedRightTemplateColumns,h=n.pinnedRightWidth,w=n.rowsToRender,p=n.setScrollTop,m=n.setScrollDirection,g=n.tableRows,b=Z(),x=b.collapsedHeaders,C=b.headerContainerRef,y=b.headers,R=b.isAnimating,S=b.mainBodyRef,N=b.onLoadMore,A=b.rowHeight,M=b.rowIdAccessor,k=b.scrollbarWidth,E=b.setIsScrolling,H=b.shouldPaginate,T=b.tableBodyContainerRef,F=i(!1),D=F[0],O=F[1],L=a(new Set),P=l(function(e){L.current.forEach(function(e){return e.classList.remove("hovered")}),L.current.clear(),null!==e&&document.querySelectorAll('.st-body-container .st-row[data-index="'.concat(e,'"]')).forEach(function(e){e.classList.add("hovered"),L.current.add(e)})},[]);o(function(){R&&P(null)},[R,P]),ce({headerContainerRef:C,mainSectionRef:T,scrollbarWidth:k}),o(function(){return function(){W.current&&clearTimeout(W.current)}},[]);var B=a(null),W=a(null),q=a(0),z=function(e){return e.length}(g),_=z*(A+1)-1,U=u(function(){return Ye({headers:y,pinnedLeftColumns:c,pinnedRightColumns:f,collapsedHeaders:x})},[y,c,f,x]),V=u(function(){var e={};return w.forEach(function(n,r){var t=j({row:n.row,rowIdAccessor:M})+"";e[t]=r}),e},[w,M]),G=l(function(e,n){!N||H||D||200>=e.scrollHeight-(n+e.clientHeight)&&n>q.current&&(O(!0),N(),setTimeout(function(){O(!1)},1e3))},[N,H,D]),K={columnIndices:U,headerContainerRef:C,headers:y,rowHeight:A,rowIndices:V,rowsToRender:w,setHoveredIndex:P};return r("div",I({className:"st-body-container",onMouseLeave:function(){return P(null)},onScroll:function(e){var n=e.currentTarget,r=n.scrollTop;E(!0),W.current&&clearTimeout(W.current),W.current=setTimeout(function(){E(!1)},150),B.current&&cancelAnimationFrame(B.current),B.current=requestAnimationFrame(function(){var e=q.current,t=r>e?"down":e>r?"up":"none";p(r),m(t),G(n,r),q.current=r})},ref:T},{children:[e(Xe,I({},K,{pinned:"left",templateColumns:s,totalHeight:_,width:d})),e(Xe,I({},K,{columnIndexStart:c.length,ref:S,templateColumns:t,totalHeight:_})),e(Xe,I({},K,{columnIndexStart:c.length+t.length,pinned:"right",templateColumns:v,totalHeight:_,width:h}))]}))},Ze=function(e){var n=e.event,r=e.header,t=e.headers,o=e.setHeaders,i=e.setIsResizing,a=e.startWidth,u=e.collapsedHeaders;n.preventDefault();var l="clientX"in n?n.clientX:n.touches[0].clientX,c="touches"in n;if(r&&!r.hide){i(!0);var s,d=B(r);if(r.children&&r.children.length>0){var f=O(r,u);s=f.length>0?f:[r]}else s=[r];var v=function(e){var n="right"===r.pinned?l-e:e-l,i=function(e){var n=e.header,r=e.headers,t=e.collapsedHeaders,o=document.querySelector(".st-body-container");if(!o||0===o.clientWidth)return 1e3;var i=o.clientWidth,a=i*A(window.innerWidth);if(!n.pinned)return Math.max(.6*i,600);var u=a-r.filter(function(e){return e.pinned===n.pinned&&e.accessor!==n.accessor}).reduce(function(e,n){return n.hide?e:e+O(n,t).reduce(function(e,n){return e+L(n)},0)},0),l=B(n);return l>u?(console.warn("Header ".concat(n.accessor," exceeds pinned section width limit")),l):u}({header:r,headers:t,collapsedHeaders:u});s.length>1?Qe({delta:n,leafHeaders:s,minWidth:d,startWidth:a,maxWidth:i}):s[0].width=Math.max(Math.min(a+n,i),d),t.forEach(function(e){P(e)});var c=R([],t,!0);o(c)};if(c){var h=function(e){v(e.touches[0].clientX)},w=function(){document.removeEventListener("touchmove",h),document.removeEventListener("touchend",w),i(!1)};document.addEventListener("touchmove",h),document.addEventListener("touchend",w)}else{var p=function(e){v(e.clientX)},m=function(){document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",m),i(!1)};document.addEventListener("mousemove",p),document.addEventListener("mouseup",m)}}},Qe=function(e){var n=e.delta,r=e.leafHeaders,t=e.minWidth,o=e.startWidth,i=e.maxWidth,a=r.reduce(function(e,n){return Math.min(e,B(n))},40),u=r.reduce(function(e,n){return e+("number"==typeof n.width?n.width:150)},0),l=Math.max(Math.min(o+n,i),a)-u;r.forEach(function(e){var n="number"==typeof e.width?e.width:150;e.width=Math.max(n+l*(n/u),t)})},en={equals:"Equals",notEquals:"Not equals",contains:"Contains",notContains:"Does not contain",startsWith:"Starts with",endsWith:"Ends with",greaterThan:"Greater than",lessThan:"Less than",greaterThanOrEqual:"Greater than or equal",lessThanOrEqual:"Less than or equal",between:"Between",notBetween:"Not between",before:"Before",after:"After",in:"Is one of",notIn:"Is not one of",isEmpty:"Is empty",isNotEmpty:"Is not empty"},nn=function(e){switch(e){case"string":return["equals","notEquals","contains","notContains","startsWith","endsWith","isEmpty","isNotEmpty"];case"number":return["equals","notEquals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","between","notBetween","isEmpty","isNotEmpty"];case"boolean":return["equals","isEmpty","isNotEmpty"];case"date":return["equals","notEquals","before","after","between","notBetween","isEmpty","isNotEmpty"];case"enum":return["in","notIn","isEmpty","isNotEmpty"];default:return["equals","notEquals","isEmpty","isNotEmpty"]}},rn=function(e){return!["between","notBetween","in","notIn","isEmpty","isNotEmpty"].includes(e)},tn=function(e){return["between","notBetween","in","notIn"].includes(e)},on=function(e){return["isEmpty","isNotEmpty"].includes(e)},an=function(n){return e("div",I({className:"st-filter-container"},{children:n.children}))},un=function(n){var t=n.value,u=n.onChange,l=n.options,c=n.placeholder,s=void 0===c?"Select...":c,d=n.className,f=void 0===d?"":d,v=n.disabled,h=void 0!==v&&v,w=i(!1),p=w[0],m=w[1],g=i(-1),b=g[0],x=g[1],C=a(null),y=l.find(function(e){return e.value===t});return o(function(){var e=function(e){if(p)switch(e.key){case"ArrowDown":e.preventDefault(),x(function(e){return l.length-1>e?e+1:0});break;case"ArrowUp":e.preventDefault(),x(function(e){return e>0?e-1:l.length-1});break;case"Enter":e.preventDefault(),0>b||(u(l[b].value),m(!1),x(-1));break;case"Escape":e.preventDefault(),m(!1),x(-1)}};if(p)return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}},[p,b,l,u]),r("div",I({ref:C,className:"st-custom-select ".concat(f," ").concat(h?"st-custom-select-disabled":""," ").concat(p?"st-custom-select-open":"").trim()},{children:[r("button",I({type:"button",className:"st-custom-select-trigger",onClick:function(){if(!h)if(m(!p),p)x(-1);else{var e=l.findIndex(function(e){return e.value===t});x(0>e?0:e)}},disabled:h,"aria-haspopup":"listbox","aria-expanded":p,"aria-labelledby":"select-label"},{children:[e("span",I({className:"st-custom-select-value"},{children:y?y.label:s})),e(le,{})]})),e(se,I({open:p,setOpen:m,onClose:function(){m(!1),x(-1)},positioning:"absolute",overflow:"auto"},{children:e("div",I({className:"st-custom-select-options",role:"listbox"},{children:l.map(function(n,r){return e("div",I({className:"st-custom-select-option ".concat(n.value===t?"st-custom-select-option-selected":""," ").concat(r===b?"st-custom-select-option-focused":"").trim(),role:"option","aria-selected":n.value===t,onClick:function(){return u(n.value),m(!1),void x(-1)}},{children:n.label}),r)})}))}))]}))},ln=function(n){var r=n.value,t=n.onChange,o=n.operators.map(function(e){return{value:e,label:en[e]}});return e("div",I({className:"st-filter-section"},{children:e(un,{value:r,onChange:function(e){t(e)},options:o})}))},cn=function(n){var r=n.type,t=n.onChange,o=n.autoFocus,i=n.className,a=n.onEnterPress;return e("input",{type:void 0===r?"text":r,value:n.value,onChange:function(e){return t(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&a&&a()},placeholder:n.placeholder,autoFocus:void 0!==o&&o,className:"st-filter-input ".concat(void 0===i?"":i).trim()})},sn=function(n){var r=n.children,t=n.className;return e("div",I({className:"st-filter-section ".concat(void 0===t?"":t).trim()},{children:r}))},dn=function(n){var t=n.onClear,o=n.canApply,i=n.showClear;return r("div",I({className:"st-filter-actions"},{children:[e("button",I({onClick:n.onApply,disabled:!o,className:"st-filter-button st-filter-button-apply ".concat(o?"":"st-filter-button-disabled")},{children:"Apply"})),i&&t&&e("button",I({onClick:t,className:"st-filter-button st-filter-button-clear"},{children:"Clear"}))]}))},fn=function(n){var t=n.header,a=n.currentFilter,u=n.onApplyFilter,l=n.onClearFilter,c=i((null==a?void 0:a.operator)||"contains"),s=c[0],d=c[1],f=i(((null==a?void 0:a.value)||"")+""),v=f[0],h=f[1],w=nn("string");o(function(){a?(d(a.operator),h((a.value||"")+"")):(d("contains"),h(""))},[a]);var p=function(){var e=I({accessor:t.accessor,operator:s},rn(s)&&{value:v});u(e)},m=on(s)||v.trim();return r(an,{children:[e(ln,{value:s,onChange:d,operators:w}),rn(s)&&e(sn,{children:e(cn,{type:"text",value:v,onChange:h,placeholder:"Filter...",autoFocus:!0,onEnterPress:p})}),e(dn,{onApply:p,onClear:l,canApply:!!m,showClear:!!a})]})},vn=function(n){var t,a,u=n.header,l=n.currentFilter,c=n.onApplyFilter,s=n.onClearFilter,d=i((null==l?void 0:l.operator)||"equals"),f=d[0],v=d[1],h=i(((null==l?void 0:l.value)||"")+""),w=h[0],p=h[1],m=i(((null===(t=null==l?void 0:l.values)||void 0===t?void 0:t[0])||"")+""),g=m[0],b=m[1],I=i(((null===(a=null==l?void 0:l.values)||void 0===a?void 0:a[1])||"")+""),x=I[0],C=I[1],y=nn("number");o(function(){var e,n;l?(v(l.operator),p((l.value||"")+""),b(((null===(e=l.values)||void 0===e?void 0:e[0])||"")+""),C(((null===(n=l.values)||void 0===n?void 0:n[1])||"")+"")):(v("equals"),p(""),b(""),C(""))},[l]);var R=function(){var e={accessor:u.accessor,operator:f};rn(f)?e.value=parseFloat(w):tn(f)&&(e.values=[parseFloat(""+g),parseFloat(""+x)]),c(e)};return r(an,{children:[e(ln,{value:f,onChange:v,operators:y}),rn(f)&&e(sn,{children:e(cn,{type:"number",value:w,onChange:p,placeholder:"Enter number...",autoFocus:!0,onEnterPress:R})}),tn(f)&&r(sn,{children:[e(cn,{type:"number",value:g,onChange:b,placeholder:"From...",autoFocus:!0,className:"st-filter-input-range-from",onEnterPress:R}),e(cn,{type:"number",value:x,onChange:C,placeholder:"To...",onEnterPress:R})]}),e(dn,{onApply:R,onClear:s,canApply:!!on(f)||(rn(f)?""!==w.trim():!!tn(f)&&""!==(g+"").trim()&&""!==(x+"").trim()),showClear:!!l})]})},hn=function(n){var r=n.className;return e(un,{value:n.value,onChange:n.onChange,options:n.options,className:void 0===r?"":r,placeholder:n.placeholder})},wn=function(n){var t=n.header,a=n.currentFilter,u=n.onApplyFilter,l=n.onClearFilter,c=i((null==a?void 0:a.operator)||"equals"),s=c[0],d=c[1],f=i(void 0!==(null==a?void 0:a.value)?a.value+"":"true"),v=f[0],h=f[1],w=nn("boolean");o(function(){a?(d(a.operator),h(void 0!==a.value?a.value+"":"true")):(d("equals"),h("true"))},[a]);var p=on(s)||""!==v;return r(an,{children:[e(ln,{value:s,onChange:d,operators:w}),rn(s)&&e(sn,{children:e(hn,{value:v,onChange:h,options:[{value:"true",label:"True"},{value:"false",label:"False"}]})}),e(dn,{onApply:function(){var e={accessor:t.accessor,operator:s};rn(s)&&(e.value="true"===v),u(e)},onClear:l,canApply:p,showClear:!!a})]})},pn=function(n){var t,u,l=n.header,c=n.currentFilter,s=n.onApplyFilter,d=n.onClearFilter,f=i((null==c?void 0:c.operator)||"equals"),v=f[0],h=f[1],w=i((null==c?void 0:c.value)?c.value+"":""),p=w[0],m=w[1],g=i((null===(t=null==c?void 0:c.values)||void 0===t?void 0:t[0])?c.values[0]+"":""),b=g[0],x=g[1],C=i(((null===(u=null==c?void 0:c.values)||void 0===u?void 0:u[1])||"")+""),y=C[0],R=C[1],S=nn("date");o(function(){var e,n;c?(h(c.operator),m((c.value||"")+""),x(((null===(e=c.values)||void 0===e?void 0:e[0])||"")+""),R(((null===(n=c.values)||void 0===n?void 0:n[1])||"")+"")):(h("equals"),m(""),x(""),R(""))},[c]);var N=function(n){var t=n.value,u=n.onChange,l=n.placeholder,c=n.autoFocus,s=n.className,d=i(!1),f=d[0],v=d[1],h=i(""),w=h[0],p=h[1],m=a(null);o(function(){if(t){var e=Se(t);isNaN(e.getTime())||p(e.toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}))}else p("")},[t]),o(function(){c&&m.current&&m.current.focus()},[c]);var g=t?Se(t):new Date;return r("div",I({className:"st-date-input-container",style:{position:"relative"}},{children:[e("input",{ref:m,type:"text",value:w,placeholder:l,onClick:function(){v(!f)},onKeyDown:function(e){"Enter"===e.key||" "===e.key?(e.preventDefault(),v(!f)):"Escape"===e.key&&v(!1)},readOnly:!0,className:"st-filter-input ".concat(s||""),style:{cursor:"pointer"}}),e(se,I({open:f,setOpen:v,onClose:function(){v(!1)},positioning:"absolute",overflow:"visible"},{children:e(Ie,{value:g,onChange:function(e){var n=e.toISOString().split("T")[0];u(n),v(!1)},onClose:function(){return v(!1)}})}))]}))};return r(an,{children:[e(ln,{value:v,onChange:h,operators:S}),rn(v)&&e(sn,{children:e(N,{value:p,onChange:m,placeholder:"Select date...",autoFocus:!0})}),tn(v)&&r(sn,{children:[e(N,{value:b,onChange:x,placeholder:"From date...",autoFocus:!0,className:"st-filter-input-range-from"}),e(N,{value:y,onChange:R,placeholder:"To date..."})]}),e(dn,{onApply:function(){var e={accessor:l.accessor,operator:v};rn(v)?e.value=p:tn(v)&&(e.values=[b,y]),s(e)},onClear:d,canApply:!!on(v)||(rn(v)?""!==p.trim():!!tn(v)&&""!==b.trim()&&""!==y.trim()),showClear:!!c})]})},mn=function(n){var t=n.header,a=n.currentFilter,l=n.onApplyFilter,c=n.onClearFilter,s=u(function(){return t.enumOptions||[]},[t.enumOptions]),d=u(function(){return s.map(function(e){return e.value})},[s]),f=i((null==a?void 0:a.values)?a.values.map(String):d),v=f[0],h=f[1],w=i(""),p=w[0],m=w[1],g=u(function(){if(!p)return s;var e=p.toLowerCase();return s.filter(function(n){return n.label.toLowerCase().includes(e)})},[s,p]);o(function(){h(a?a.values?a.values.map(String):[]:d)},[a,d]);var b=s.length>10;return r(an,{children:[e(sn,{children:r("div",I({className:"st-enum-filter-options"},{children:[e("div",I({className:"st-enum-select-all"},{children:e(qe,I({checked:v.length===d.length,onChange:function(e){h(e?d:[])}},{children:e("span",I({className:"st-enum-option-label st-enum-select-all-label"},{children:"Select All"}))}))})),b&&e("div",I({className:"st-enum-search"},{children:e(cn,{type:"text",value:p,onChange:m,placeholder:"Search..."})})),g.map(function(n,r){return e(qe,I({checked:v.includes(n.value),onChange:function(){return e=n.value,void h(function(n){return n.includes(e)?n.filter(function(n){return n!==e}):R(R([],n,!0),[e],!1)});var e}},{children:e("span",I({className:"st-enum-option-label"},{children:n.label}))}),r)}),p&&0===g.length&&e("div",I({className:"st-enum-no-results"},{children:"No matching options"}))]}))}),e(dn,{onApply:function(){v.length!==d.length?l({accessor:t.accessor,operator:"in",values:v}):c()},onClear:c,canApply:0!==v.length&&v.length!==d.length,showClear:!!a})]})},gn=function(r){var t=r.header,o=r.currentFilter,i=r.onApplyFilter,a=r.onClearFilter;return e(n,{children:function(){switch(t.type){case"number":return e(vn,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"boolean":return e(wn,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"date":return e(pn,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a});case"enum":return e(mn,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a});default:return e(fn,{header:t,currentFilter:o,onApplyFilter:i,onClearFilter:a})}}()})},bn=function(t){var u=t.content,l=t.children,c=t.delay,s=void 0===c?500:c,d=i(!1),f=d[0],v=d[1],w=i({top:0,left:0}),p=w[0],g=w[1],b=a(null),x=a(null);if(o(function(){return function(){b.current&&clearTimeout(b.current)}},[]),!u||!m(l))return e(n,{children:l});var C=h(l,{ref:x,onMouseEnter:function(){b.current=setTimeout(function(){if(x.current&&u.trim()){var e=x.current.getBoundingClientRect();if(e.width>0&&e.height>0){var n=e.left+e.width/2-100,r=e.bottom+8;8>n?n=8:n+200>window.innerWidth-8&&(n=window.innerWidth-200-8),r+40>window.innerHeight-8&&(r=e.top-40-8),g({top:r,left:n}),v(!0)}}},s)},onMouseLeave:function(){b.current&&(clearTimeout(b.current),b.current=null),v(!1)}});return r(n,{children:[C,f&&e("div",I({className:"st-tooltip",style:{position:"fixed",top:"".concat(p.top,"px"),left:"".concat(p.left,"px"),zIndex:1e4}},{children:u}))]})},In=function(n){var t,c,s=n.colIndex,d=n.gridColumnEnd,f=n.gridColumnStart,v=n.gridRowEnd,w=n.gridRowStart,p=n.header,m=n.parentHeader,g=n.reverse,b=n.sort,x=i(!1),C=x[0],y=x[1],S=i(!1),N=S[0],A=S[1],E=i(p.label||""),H=E[0],F=E[1],D=Z(),O=D.activeHeaderDropdown,L=D.areAllRowsSelected,P=D.collapsedHeaders,B=D.columnBorders,W=D.columnReordering,q=D.columnResizing,z=D.columnsWithSelectedCells,j=D.draggedHeaderRef,_=D.enableHeaderEditing,U=D.filterIcon,V=D.handleApplyFilter,G=D.handleClearFilter,K=D.handleSelectAll,J=D.headerCollapseIcon,X=D.headerDropdown,Y=D.headerExpandIcon,$=D.headerRegistry,Q=D.headers,ee=D.hoveredHeaderRef,ne=D.onColumnOrderChange,re=D.onColumnSelect,te=D.onHeaderEdit,oe=D.onSort,ie=D.onTableHeaderDragEnd,ae=D.headerHeight,ue=D.selectColumns,le=D.selectableColumns,ce=D.selectedColumns,de=D.setActiveHeaderDropdown,fe=D.setCollapsedHeaders,he=D.setHeaders,we=D.setInitialFocusedCell,pe=D.setIsResizing,me=D.setSelectedCells,ge=D.setSelectedColumns,Ie=D.sortDownIcon,xe=D.sortUpIcon,Ce=!!(null==p?void 0:p.isSortable),ye=!!(null==p?void 0:p.filterable),Re=D.filters[p.accessor],Se=(null==O?void 0:O.accessor)===p.accessor,Ne=p.isSelectionColumn&&D.enableRowSelection,Ae=function(e){var n;return!(!(null===(n=e.children)||void 0===n?void 0:n.length)||!e.collapsible)}(p),Me=P.has(p.accessor),ke=function(e){var n=e.isOpen,r=e.estimatedHeight,t=void 0===r?200:r,u=e.estimatedWidth,l=void 0===u?250:u,c=e.margin,s=void 0===c?4:c,d=a(null),f=i({}),v=f[0],h=f[1];return o(function(){if(n&&d.current){var e=function(){if(d.current){var e=d.current.getBoundingClientRect(),n=window.innerHeight-e.bottom,r=window.innerWidth-e.right,o="bottom",i={};t>n&&e.top>=t&&(o="top");var a="left";l>r+e.width&&(a="right"),"bottom"===o?i.top=e.bottom+s:i.bottom=window.innerHeight-e.top+s,"left"===a?i.left=e.left:i.right=window.innerWidth-e.right,h(i)}};requestAnimationFrame(e);var r=function(){return requestAnimationFrame(e)},o=function(){return requestAnimationFrame(e)};return window.addEventListener("resize",r),window.addEventListener("scroll",o,!0),function(){window.removeEventListener("resize",r),window.removeEventListener("scroll",o,!0)}}h({})},[n,t,l,s]),{triggerRef:d,position:v}}({isOpen:Se,estimatedHeight:200,estimatedWidth:250,margin:4}),Ee=ke.triggerRef,Te=ke.position,Fe=u(function(){var e,n,r;if(!B)return!1;var t=Q.filter(function(e){return"left"===e.pinned}),o=Q.filter(function(e){return!e.pinned}),i=Q.filter(function(e){return"right"===e.pinned});return"left"===p.pinned?(null===(e=t[t.length-1])||void 0===e?void 0:e.accessor)===p.accessor:"right"===p.pinned?(null===(n=i[i.length-1])||void 0===n?void 0:n.accessor)===p.accessor:(null===(r=o[o.length-1])||void 0===r?void 0:r.accessor)===p.accessor},[B,Q,p.accessor,p.pinned]),De=u(function(){return!(!le||Ne)&&k(p,s).some(function(e){return ce.has(e)})},[le,Ne,p,s,ce]),Oe=u(function(){return!Ne&&k(p,s).some(function(e){return z.has(e)})},[Ne,p,s,z]),Le=u(function(){return!(!p.children||0===p.children.length)&&(!Me||p.children.some(function(e){var n=e.showWhen||M;return"parentCollapsed"===n||"always"===n}))},[p.children,Me]),Pe=null==m?void 0:m.singleRowChildren,Be=Le&&!p.singleRowChildren,ze="st-header-cell ".concat(p.accessor===(null===(t=ee.current)||void 0===t?void 0:t.accessor)?"st-hovered":""," ").concat((null===(c=j.current)||void 0===c?void 0:c.accessor)===p.accessor?"st-dragging":""," ").concat(Ce?"clickable":""," ").concat(W&&!Ce?"columnReordering":""," ").concat(Be?"parent":""," ").concat(Pe?"st-sub-header":""," ").concat(Fe?"st-last-column":""," ").concat(_&&!Ne?"st-header-editable":""," ").concat(De?"st-header-selected":""," ").concat(Oe&&!De?"st-header-has-highlighted-cell":""),je=We({draggedHeaderRef:j,headers:Q,hoveredHeaderRef:ee,onColumnOrderChange:ne,onTableHeaderDragEnd:ie}),_e=je.handleDragStart,Ue=je.handleDragEnd,Ve=je.handleDragOver,Ge=He();o(function(){if($&&!p.isSelectionColumn){var e=p.accessor+"";return $.set(e,{setEditing:function(e){A(e)}}),function(){$.delete(e)}}},[$,p.accessor,p.isSelectionColumn]),o(function(){F(p.label||"")},[p.label]);var Ke=l(function(e){F(e);var n=Q.map(function(n){return n.accessor===p.accessor?I(I({},n),{label:e}):n});he(n),te&&te(p,e)},[Q,he,te,p]),Je=l(function(){de&&de(null)},[de]),Xe=l(function(e){e.stopPropagation(),fe(function(e){var n=new Set(e);return Me?n.delete(p.accessor):n.add(p.accessor),n})},[fe,Me,p.accessor]),Ye=function(e){var n=e.event,r=e.header;if(!r.isSelectionColumn){if(le){var t=k(r,s),o=t.some(function(e){return ce.has(e)});if(_&&o&&!n.shiftKey)return X&&Se&&Je(),void A(!0);n.shiftKey&&ue?ge(function(e){if(0===e.size)return new Set(t);var n=t[0],r=Array.from(e).sort(function(e,n){return e-n}),o=r[0],i=Math.abs(n-o);r.forEach(function(e){var r=Math.abs(n-e);i>r&&(i=r,o=e)});var a,u,l,c=R(R([],(l=Math.min(a=o,u=n),Array.from({length:Math.max(a,u)-l+1},function(e,n){return l+n})),!0),t,!0);return new Set(R(R([],Array.from(e),!0),c,!0))}):ue&&ue(t),me(new Set),we(null)}re&&re(r),!le&&r.isSortable&&oe(r.accessor)}};if(o(function(){var e=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move"};return document.addEventListener("dragover",e),function(){document.removeEventListener("dragover",e)}},[]),!p)return null;var $e=q&&!Ne&&e("div",I({className:"st-header-resize-handle-container",onMouseDown:function(e){var n,r=null===(n=document.getElementById(T({accessor:p.accessor,rowId:"header"})))||void 0===n?void 0:n.offsetWidth;Ge({callback:Ze,callbackProps:{event:e.nativeEvent,gridColumnEnd:d,gridColumnStart:f,header:p,headers:Q,setHeaders:he,setIsResizing:pe,startWidth:r,collapsedHeaders:P},limit:10})},onTouchStart:function(e){var n,r=null===(n=document.getElementById(T({accessor:p.accessor,rowId:"header"})))||void 0===n?void 0:n.offsetWidth;Ge({callback:Ze,callbackProps:{event:e,gridColumnEnd:d,gridColumnStart:f,header:p,headers:Q,setHeaders:he,setIsResizing:pe,startWidth:r,collapsedHeaders:P},limit:10})}},{children:e("div",{className:"st-header-resize-handle"})})),Qe=b&&b.key.accessor===p.accessor&&r("div",I({className:"st-icon-container",onClick:function(e){return Ye({event:e,header:p})}},{children:["ascending"===b.direction&&xe&&xe,"descending"===b.direction&&Ie&&Ie]})),en=ye&&U&&r("div",I({className:"st-icon-container",onClick:function(e){e.stopPropagation(),y(!C)}},{children:[h(U,{style:{fill:Re?"var(--st-button-active-background-color)":"var(--st-header-icon-color)"}}),e(se,I({open:C,overflow:"visible",setOpen:y,onClose:function(){return y(!1)}},{children:e(gn,{header:p,currentFilter:Re,onApplyFilter:function(e){V(e),y(!1)},onClearFilter:function(){G(p.accessor),y(!1)}})}))]})),nn=Ae&&!Ne&&e("div",I({className:"st-icon-container st-collapse-icon-container",onClick:Xe},{children:Me?J:Y}));return r(be,I({className:ze,id:T({accessor:p.accessor,rowId:"header"}),onDragOver:function(e){Ne||Ge({callback:Ve,callbackProps:{event:e,hoveredHeader:p},limit:50})},style:I({gridRowStart:w,gridRowEnd:v,gridColumnStart:f,gridColumnEnd:d},v-w>1?{}:{height:ae})},{children:[g&&$e,"right"===p.align&&nn,"right"===p.align&&en,"right"===p.align&&Qe,e("div",I({ref:Ee,className:"st-header-label",draggable:W&&!p.disableReorder&&!Ne,onClick:function(e){Ne||Ye({event:e,header:p})},onDoubleClick:function(e){Ne||function(e){var n=e.header;n.isSelectionColumn||le&&n.isSortable&&oe(n.accessor)}({event:e,header:p})},onDragEnd:Ne?void 0:function(e){e.preventDefault(),Ue()},onDragStart:Ne?void 0:function(e){W&&p&&function(e){_e(e)}(p)}},{children:e(bn,I({content:p.tooltip||""},{children:e("span",I({className:"st-header-label-text ".concat("right"===p.align?"right-aligned":"center"===p.align?"center-aligned":"left-aligned")},{children:Ne?e(qe,{checked:!!L&&L(),onChange:function(e){K&&K(e)}}):N?e(ve,{defaultValue:H,onBlur:function(){return A(!1)},onChange:Ke}):p.headerRenderer?p.headerRenderer({accessor:p.accessor,colIndex:s,header:p}):H||(null==p?void 0:p.label)}))}))})),"right"!==p.align&&Qe,"right"!==p.align&&en,"right"!==p.align&&nn,!g&&$e,X&&!Ne&&e("div",I({className:"st-header-dropdown-container"},{children:X({accessor:p.accessor,colIndex:s,header:p,isOpen:Se,onClose:Je,position:Te})}))]}))},xn=function(r){var t=r.columnIndices,o=r.gridTemplateColumns,i=r.handleScroll,a=r.headers,l=r.maxDepth,c=r.pinned,s=r.sectionRef,d=r.sort,f=r.width,v=Z().collapsedHeaders,h=u(function(){var e=[],n=1,r=function(o,i,u,s){var d,f;if(void 0===u&&(u=!1),!F({header:o,pinned:c,headers:a,collapsedHeaders:v}))return 0;u||n++;var h,w,p=null!==(f=null===(d=o.children)||void 0===d?void 0:d.filter(function(e){return F({header:e,pinned:c,headers:a,collapsedHeaders:v})}).length)&&void 0!==f?f:0,m=n;if(o.singleRowChildren&&p>0?(h=m+1,w=l+1):p>0?(h=m+p,w=i+1):(h=m+1,w=l+1),e.push({header:o,gridColumnStart:m,gridColumnEnd:h,gridRowStart:i,gridRowEnd:w,colIndex:t[o.accessor],parentHeader:s}),o.children&&o.children.length>0){var g=o.singleRowChildren?i:i+1,b=!o.singleRowChildren;o.children.forEach(function(e){F({header:e,pinned:c,headers:a,collapsedHeaders:v})&&(r(e,g,b,o),b=!1)})}return h-m},o=a.filter(function(e){return F({header:e,pinned:c,headers:a,collapsedHeaders:v})}),i=!0;return o.forEach(function(e){r(e,1,i),i=!1}),e},[a,l,c,t,v]);return e(Je,I({childRef:s,group:c?"pinned-".concat(c):"default"},{children:e("div",I({className:"st-header-".concat(c?"pinned-".concat(c):"main")},i&&{onScroll:i},{ref:s,style:{gridTemplateColumns:o,width:f,position:"relative"}},{children:e(n,{children:h.map(function(n){return e(In,{colIndex:n.colIndex,gridColumnEnd:n.gridColumnEnd,gridColumnStart:n.gridColumnStart,gridRowEnd:n.gridRowEnd,gridRowStart:n.gridRowStart,header:n.header,parentHeader:n.parentHeader,reverse:"right"===c,sort:d},n.header.accessor)})})}))}))},Cn=function(e){var n,r;return e.singleRowChildren&&(null===(n=e.children)||void 0===n?void 0:n.length)?1:(null===(r=e.children)||void 0===r?void 0:r.length)?1+Math.max.apply(Math,e.children.map(Cn)):1},yn=function(n){var t=n.centerHeaderRef,o=n.headers,i=n.mainTemplateColumns,a=n.pinnedLeftColumns,l=n.pinnedLeftTemplateColumns,c=n.pinnedRightColumns,s=n.pinnedRightTemplateColumns,d=n.sort,f=n.pinnedLeftWidth,v=n.pinnedRightWidth,h=Z(),w=h.headerContainerRef,p=h.pinnedLeftRef,m=h.pinnedRightRef,g=h.collapsedHeaders,b=u(function(){return Ye({headers:o,pinnedLeftColumns:a,pinnedRightColumns:c,collapsedHeaders:g})},[o,a,c,g]),x=u(function(){var e=0,n=R(R(R([],a,!0),o,!0),c,!0);return o.forEach(function(r){if(F({header:r,headers:n,collapsedHeaders:g})){var t=Cn(r);e=Math.max(e,t)}}),{maxDepth:e}},[o,a,c,g]).maxDepth;return r("div",I({className:"st-header-container",ref:w},{children:[De(o,"left")&&e(xn,{columnIndices:b,gridTemplateColumns:l,handleScroll:void 0,headers:o,maxDepth:x,pinned:"left",sectionRef:p,sort:d,width:f}),e(xn,{columnIndices:b,gridTemplateColumns:i,handleScroll:void 0,headers:o,maxDepth:x,sectionRef:t,sort:d}),De(o,"right")&&e(xn,{columnIndices:b,gridTemplateColumns:s,handleScroll:void 0,headers:o,maxDepth:x,pinned:"right",sectionRef:m,sort:d,width:v})]}))},Rn=function(e){var n=e.collapsedHeaders,r=function(e){var t=e.flattenedHeaders;return e.headers.forEach(function(e){if(!e.hide&&!e.excludeFromRender)if(e.children&&e.children.length>0)if(n&&n.has(e.accessor)){var o=e.children.filter(function(e){var n=e.showWhen||M;return"parentCollapsed"===n||"always"===n});e.singleRowChildren&&t.push(e),o.length>0?r({headers:o,flattenedHeaders:t}):e.singleRowChildren||t.push(e)}else{var i=e.children.filter(function(e){var n=e.showWhen||M;return"parentExpanded"===n||"always"===n});e.singleRowChildren&&t.push(e),r({headers:i,flattenedHeaders:t})}else t.push(e)}),t},t=r({headers:e.headers,flattenedHeaders:[]});return"".concat(t.map(function(e){return function(e){var n=e.minWidth,r=e.width;return"number"==typeof r&&(r="".concat(r,"px")),n&&"number"==typeof n&&(n="".concat(n,"px")),void 0!==n?"string"==typeof r&&r.endsWith("fr")?"minmax(".concat(n,", ").concat(r,")"):"max(".concat(n,", ").concat(r,")"):r}(e)}).join(" "))},Sn=function(n){var t=n.pinnedLeftWidth,o=n.pinnedRightWidth,i=n.setScrollTop,l=n.setScrollDirection,c=n.sort,s=n.tableRows,d=n.rowsToRender,f=Z(),v=f.columnResizing,h=f.editColumns,w=f.headers,p=f.collapsedHeaders,m=a(null),g=w.filter(function(e){return!e.pinned}),b=w.filter(function(e){return"left"===e.pinned}),x=w.filter(function(e){return"right"===e.pinned}),C=u(function(){return Rn({headers:b,collapsedHeaders:p})},[b,p]),y=u(function(){return Rn({headers:g,collapsedHeaders:p})},[g,p]),R=u(function(){return Rn({headers:x,collapsedHeaders:p})},[x,p]),S={centerHeaderRef:m,headers:w,mainTemplateColumns:y,pinnedLeftColumns:b,pinnedLeftTemplateColumns:C,pinnedRightColumns:x,pinnedRightTemplateColumns:R,sort:c,pinnedLeftWidth:t,pinnedRightWidth:o},N={tableRows:s,mainTemplateColumns:y,pinnedLeftColumns:b,pinnedLeftTemplateColumns:C,pinnedLeftWidth:t,pinnedRightColumns:x,pinnedRightTemplateColumns:R,pinnedRightWidth:o,setScrollTop:i,setScrollDirection:l,rowsToRender:d};return r("div",I({className:"st-content ".concat(v?"st-resizeable":"st-not-resizeable"),style:{width:h?"calc(100% - 27.5px)":"100%"}},{children:[e(yn,I({},S)),e($e,I({},N))]}))},Nn=function(n){var t=n.mainBodyWidth,u=n.mainBodyRef,l=n.pinnedLeftWidth,c=n.pinnedRightWidth,s=n.pinnedLeftContentWidth,d=n.pinnedRightContentWidth,f=n.tableBodyContainerRef,v=Z().editColumns,h=i(!1),w=h[0],p=h[1],m=a(null),g=a(null),b=a(null),x=v?28:0,C=(v?c+1:c)+(f.current&&f.current&&f.current.scrollHeight>f.current.clientHeight?f.current.offsetWidth-f.current.clientWidth:0);return o(function(){setTimeout(function(){u.current&&p(t>u.current.clientWidth)},1)},[u,t]),w?r("div",I({className:"st-horizontal-scrollbar-container"},{children:[l>0&&e(Je,I({childRef:g,group:"pinned-left"},{children:e("div",I({className:"st-horizontal-scrollbar-left",ref:g,style:{width:l}},{children:e("div",{style:{width:s}})}))})),t>0&&e(Je,I({childRef:m},{children:e("div",I({className:"st-horizontal-scrollbar-middle",ref:m},{children:e("div",{style:{width:t}})}))})),c>0&&e(Je,I({childRef:b,group:"pinned-right"},{children:e("div",I({className:"st-horizontal-scrollbar-right",ref:b,style:{width:C}},{children:e("div",{style:{width:d}})}))})),x>0&&e("div",{style:{width:x-1.5,height:"100%",flexShrink:0}})]})):null},An={string:function(e,n,r){if(e===n)return 0;var t=e.localeCompare(n);return"ascending"===r?t:-t},number:function(e,n,r){if(e===n)return 0;var t=e-n;return"ascending"===r?t:-t},boolean:function(e,n,r){if(e===n)return 0;var t=e===n?0:e?-1:1;return"ascending"===r?t:-t},date:function(e,n,r){var t=new Date(e),o=new Date(n);if(t.getTime()===o.getTime())return 0;var i=t.getTime()-o.getTime();return"ascending"===r?i:-i},enum:function(e,n,r){return An.string(e,n,r)},default:function(e,n,r){return e===n?0:null==e?"ascending"===r?-1:1:null==n?"ascending"===r?1:-1:"string"==typeof e&&"string"==typeof n?An.string(e,n,r):"number"==typeof e&&"number"==typeof n?An.number(e,n,r):"boolean"==typeof e&&"boolean"==typeof n?An.boolean(e,n,r):An.string(e+"",n+"",r)}},Mn=function(e){return function(e){var n=e.rows,r=e.sortColumn,t=function(e,n){for(var r=0,o=e;o.length>r;r++){var i=o[r];if(i.accessor===n)return i;if(i.children&&i.children.length>0){var a=t(i.children,n);if(a)return a}}},o=t(e.headers,r.key.accessor),i=(null==o?void 0:o.type)||"string",a=r.direction;return R([],n,!0).sort(function(e,t){if(null==o?void 0:o.comparator)return o.comparator({rowA:e,rowB:t,direction:a});var u,l,c=r.key.accessor;if(null==o?void 0:o.valueGetter){var s=n.indexOf(e),d=n.indexOf(t);u=o.valueGetter({accessor:c,row:e,rowIndex:s}),l=o.valueGetter({accessor:c,row:t,rowIndex:d})}else u=W(e,c),l=W(t,c);return function(e,n,r,t){if(void 0===r&&(r="string"),null==e||""===e)return"ascending"===t?-1:1;if(null==n||""===n)return"ascending"===t?1:-1;if("number"===r){var o=function(e){var n;if("number"==typeof e)return e;var r=e+"";if("string"==typeof r){var t=r.replace(/[$,]/g,"").match(/^([-+]?\d*\.?\d+)([TBMKtbmk])?/);if(t){var o=parseFloat(t[1]),i=null===(n=t[2])||void 0===n?void 0:n.toUpperCase();return"T"===i?o*=1e12:"B"===i?o*=1e9:"M"===i?o*=1e6:"K"===i&&(o*=1e3),o}}return parseFloat(r)||0},i=o(e),a=o(n);return An.number(i,a,t)}return"date"===r?An.date(e+"",n+"",t):"boolean"===r?An.boolean(!!e,!!n,t):"enum"===r?An.enum(e+"",n+"",t):An.string(e+"",n+"",t)}(u,l,i,a)})}({rows:e.rows,sortColumn:e.sortColumn,headers:e.headers})},kn=function(e){var n=e.tableRows,r=e.sortColumn,t=e.rowGrouping,o=e.headers;return e.externalSortHandling?n:r?t&&t.length>0?(0,e.sortNestedRows)({groupingKeys:t,headers:o,rows:n,sortColumn:r}):Mn({headers:o,rows:n,sortColumn:r}):n},En=function(e,n,r){void 0===r&&(r=new Set);for(var t=0,o=e;o.length>t;t++){var i=o[t];if(!r.has(i.accessor)&&(r.add(i.accessor),i.children&&i.children.length>0)){var a=i.children.some(function(e){return e.accessor===n}),u=!1;if(!a)for(var l=0,c=i.children;c.length>l;l++){var s=c[l];if(En([s],n,r),!1===s.hide){u=!0;break}}(a||u)&&(i.hide=!1)}}},Hn=function(e){return e.every(function(e){return e.hide})},Tn=function(e){e.forEach(function(e){e.children&&e.children.length>0&&(Tn(e.children),Hn(e.children)&&(e.hide=!0))})},Fn=function(t){var o=t.allHeaders,a=t.depth,u=void 0===a?0:a,l=t.doesAnyHeaderHaveChildren,c=t.header,s=t.isCheckedOverride,d=i(!0),f=d[0],v=d[1],h=Z(),w=h.expandIcon,p=h.headers,m=h.setHeaders,g=l?"".concat(16*u,"px"):"8px",b=c.children&&c.children.length>0,x=null!=s?s:c.hide||b&&c.children&&Hn(c.children);return r(n,{children:[r("div",I({className:"st-header-checkbox-item",style:{paddingLeft:g}},{children:[l&&e("div",I({className:"st-header-icon-container"},{children:b?e("div",I({className:"st-collapsible-header-icon st-expand-icon-container ".concat(f?"expanded":"collapsed"),onClick:function(e){e.stopPropagation(),v(!f)}},{children:w})):null})),e(qe,I({checked:x,onChange:function(e){c.hide=e,e?Tn(o):(En(o,c.accessor),b&&c.children&&c.children.length>0&&c.children.every(function(e){return!0===e.hide})&&c.children[0]&&(c.children[0].hide=!1,En(o,c.children[0].accessor))),m(R([],p,!0))}},{children:c.label}))]})),b&&f&&c.children&&e("div",I({className:"st-nested-headers"},{children:c.children.map(function(n,r){return e(Fn,{allHeaders:o,depth:u+1,doesAnyHeaderHaveChildren:l,header:n,isCheckedOverride:!!x||void 0},"".concat(n.accessor,"-").concat(r))})}))]})},Dn=function(n){var r=n.headers,t=n.open,o="left"===n.position?"left":"",i=u(function(){return r.some(function(e){return e.children&&e.children.length>0})},[r]);return e("div",I({className:"st-column-editor-popout ".concat(t?"open":""," ").concat(o),onClick:function(e){return e.stopPropagation()}},{children:e("div",I({className:"st-column-editor-popout-content"},{children:r.map(function(n,t){return n.isSelectionColumn?null:e(Fn,{doesAnyHeaderHaveChildren:i,header:n,allHeaders:r},"".concat(n.accessor,"-").concat(t))})}))}))},On=function(n){var t=n.columnEditorText,o=n.editColumns,a=n.headers,u=n.position,l=void 0===u?"right":u,c=i(n.editColumnsInitOpen),s=c[0],d=c[1];return o?r("div",I({className:"st-column-editor ".concat(s?"open":""," ").concat(l),onClick:function(){return function(e){d(e)}(!s)},style:{width:28}},{children:[e("div",I({className:"st-column-editor-text"},{children:t})),e(Dn,{headers:a,open:s,position:l})]})):null},Ln=function(n){var r=n.children,o=a({}),i=l(function(e,n){return!!o.current[n]&&o.current[n].find(function(n){return n===e})},[]),u=l(function(e,n){e.scrollWidth-e.clientWidth>0&&(n.scrollLeft=e.scrollLeft)},[]),c=l(function(e){e.onscroll=null},[]),s=l(function(e,n){e.onscroll=function(){window.requestAnimationFrame(function(){n.forEach(function(n){var r;null===(r=o.current[n])||void 0===r||r.forEach(function(n){e!==n&&(c(n),u(e,n),window.requestAnimationFrame(function(){var e=Object.keys(o.current).filter(function(e){return o.current[e].includes(n)});s(n,e)}))})})})}},[c,u]),d=l(function(e,n){n.forEach(function(n){o.current[n]||(o.current[n]=[]),i(e,n)||(o.current[n].length>0&&u(o.current[n][0],e),o.current[n].push(e))}),s(e,n)},[i,u,s]),f=l(function(e,n){n.forEach(function(n){if(i(e,n)){c(e);var r=o.current[n].indexOf(e);-1!==r&&o.current[n].splice(r,1)}})},[i,c]);return e(Ke.Provider,I({value:{registerPane:d,unregisterPane:f}},{children:t.Children.only(r)}))},Pn=function(e){var n=e.tableRows,r=e.filterState;return e.externalFilterHandling?n:r&&0!==Object.keys(r).length?n.filter(function(e){return Object.values(r).every(function(n){try{return function(e,n){var r=n.operator,t=n.value,o=n.values;if(null==e)return"isEmpty"===r;if("isEmpty"===r)return!e||""===(e+"").trim();if("isNotEmpty"===r)return e&&""!==(e+"").trim();if("string"==typeof e||"contains"===r||"notContains"===r||"startsWith"===r||"endsWith"===r){var i=(e+"").toLowerCase(),a=t?(t+"").toLowerCase():"";switch(r){case"equals":return i===a;case"notEquals":return i!==a;case"contains":return i.includes(a);case"notContains":return!i.includes(a);case"startsWith":return i.startsWith(a);case"endsWith":return i.endsWith(a)}}if("number"==typeof e||!isNaN(+e)){var u=+e,l=+t;switch(r){case"equals":return u===l;case"notEquals":return u!==l;case"greaterThan":return u>l;case"lessThan":return l>u;case"greaterThanOrEqual":return u>=l;case"lessThanOrEqual":return l>=u;case"between":if(o&&2===o.length){var c=o.map(Number),s=c[1];return u>=c[0]&&s>=u}return!1;case"notBetween":if(o&&2===o.length){var d=o.map(Number);return s=d[1],d[0]>u||u>s}return!0}}if(e instanceof Date||!isNaN(Date.parse(e))){var f=Se(e),v=Se((t||"")+""),h=Re(f),w=Re(v);switch(r){case"equals":return h.getTime()===w.getTime();case"notEquals":return h.getTime()!==w.getTime();case"before":return w>h;case"after":return h>w;case"between":if(o&&2===o.length){var p=o.map(function(e){return Re(Se((e||"")+""))}),m=p[1];return h>=p[0]&&m>=h}return!1;case"notBetween":if(o&&2===o.length){var g=o.map(function(e){return Re(Se((e||"")+""))});return m=g[1],g[0]>h||h>m}return!0}}if("boolean"==typeof e&&"equals"===r)return e===!!t;if(Array.isArray(e)){var b=e.map(function(e){return"object"==typeof e&&null!==e?JSON.stringify(e):e+""}).join(", ");e=b}if("in"===r||"notIn"===r){if(o&&Array.isArray(o)){var I=o.includes(e+"");return"in"===r?I:!I}return!1}var x=(e+"").toLowerCase(),C=t?(t+"").toLowerCase():"";switch(r){case"equals":return x===C;case"notEquals":return x!==C;default:return!0}}(W(e,n.accessor),n)}catch(e){return console.warn("Filter error for accessor ".concat(n.accessor,":"),e),!0}})}):n},Bn=function(e,n,r,t){var o=[],i=function(e){e.forEach(function(e){var r=t?e[t]:void 0;if(t&&r&&z(r))i(r);else{var a=W(e,n);null!=a&&o.push(a)}})};if(i(e),0!==o.length){if("custom"===r.type&&r.customFn)return r.customFn(o);var a,u=r.parseValue?o.map(r.parseValue).filter(function(e){return!isNaN(e)}):o.map(function(e){return"number"==typeof e?e:"string"==typeof e?parseFloat(e):NaN}).filter(function(e){return!isNaN(e)});if(0===u.length)return"count"===r.type?o.length:void 0;switch(r.type){case"sum":a=u.reduce(function(e,n){return e+n},0);break;case"average":a=u.reduce(function(e,n){return e+n},0)/u.length;break;case"count":a=o.length;break;case"min":a=Math.min.apply(Math,u);break;case"max":a=Math.max.apply(Math,u);break;default:return}return r.formatResult?r.formatResult(a):a}},Wn=function(e){if(null==e)return"";var n=e+"";if(n.includes(",")||n.includes('"')||n.includes("\n")||n.includes("\r")){var r=n.replace(/"/g,'""');return'"'.concat(r,'"')}return n},qn=function(){return"undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches},zn={COLUMN_REORDER:{duration:180,easing:"cubic-bezier(0.2, 0.0, 0.2, 1)",delay:0},ROW_REORDER:{duration:200,easing:"cubic-bezier(0.2, 0.0, 0.2, 1)",delay:0},REDUCED_MOTION:{duration:150,easing:"ease-out",delay:0}},jn=function(e){e.style.transition="",e.style.transitionDelay="",e.style.transform="",e.style.top="",e.style.willChange="",e.style.backfaceVisibility="",e.classList.remove("st-animating")},_n=function(e,n,r,t){return void 0===r&&(r={}),new Promise(function(t){e.style.transition="transform ".concat(n.duration,"ms ").concat(n.easing),n.delay&&(e.style.transitionDelay="".concat(n.delay,"ms")),e.style.transform="translate3d(0, 0, 0)";var o=function(){jn(e),e.removeEventListener("transitionend",o),r.onComplete&&r.onComplete(),t()};e.addEventListener("transitionend",o),setTimeout(o,n.duration+(n.delay||0)+50)})},Un=function(e){var n=e.element,r=e.finalConfig,t=e.fromBounds,o=e.toBounds;return C(void 0,void 0,void 0,function(){var e,i;return y(this,function(a){switch(a.label){case 0:return e=function(e,n){return{x:("x"in e?e.x:e.left)-n.x,y:("y"in e?e.y:e.top)-n.y}}(t,o),0===e.x&&0===e.y||qn()&&!1!==r.respectReducedMotion?[2]:(u=r,l=Math.abs(e.x)>Math.abs(e.y)?"column":"row",void 0===u&&(u={}),i=qn()?I(I({},zn.REDUCED_MOTION),u):I(I({},"column"===l?zn.COLUMN_REORDER:zn.ROW_REORDER),u),jn(n),function(e,n){e.style.transform="translate3d(".concat(n.x,"px, ").concat(n.y,"px, 0)"),e.style.transition="none",e.style.willChange="transform",e.style.backfaceVisibility="hidden",e.classList.add("st-animating")}(n,e),[4,_n(n,i,r)]);case 1:return a.sent(),[2]}var u,l})})},Vn=function(e){var n=e.element,r=e.options;return C(void 0,void 0,void 0,function(){var e,t,o,i,a,u,l,c,s,d,f,v,h,w,p,m;return y(this,function(g){return e=r.startY,t=r.endY,o=r.finalY,a=void 0===(i=r.duration)?300:i,l=void 0===(u=r.easing)?"cubic-bezier(0.2, 0.0, 0.2, 1)":u,s=void 0===(c=r.delay)?0:c,d=r.onComplete,v=void 0===(f=r.respectReducedMotion)||f,qn()&&v?(void 0!==o&&(n.style.transform="",n.style.top="".concat(o,"px")),d&&d(),[2]):(h=n.getBoundingClientRect(),p=e-(w=h.top),m=t-w,[2,new Promise(function(e){n.style.transition="",n.style.transitionDelay="",n.style.transform="",n.style.willChange="",n.style.backfaceVisibility="",n.classList.remove("st-animating"),n.style.transform="translate3d(0, ".concat(p,"px, 0)"),n.style.transition="none",n.style.willChange="transform",n.style.backfaceVisibility="hidden",n.classList.add("st-animating"),n.style.transition="transform ".concat(a,"ms ").concat(l),s&&(n.style.transitionDelay="".concat(s,"ms")),n.style.transform="translate3d(0, ".concat(m,"px, 0)");var r=function(){n.style.transition="",n.style.transitionDelay="",n.style.transform="",n.style.willChange="",n.style.backfaceVisibility="",n.classList.remove("st-animating"),void 0!==o&&(n.style.top="".concat(o,"px")),n.removeEventListener("transitionend",r),d&&d(),e()};n.addEventListener("transitionend",r),setTimeout(r,a+(s||0)+50)})])})})},Gn=function(n){var r=i(!1),t=r[0],a=r[1];return o(function(){a(!0)},[]),t?e(Kn,I({},n)):null},Kn=function(n){var t=n.allowAnimations,c=void 0!==t&&t,s=n.cellUpdateFlash,d=void 0!==s&&s,f=n.className,v=n.columnBorders,h=void 0!==v&&v,w=n.columnEditorPosition,p=void 0===w?"right":w,m=n.columnEditorText,x=void 0===m?"Columns":m,S=n.columnReordering,M=void 0!==S&&S,k=n.columnResizing,T=void 0!==k&&k,F=n.defaultHeaders,P=n.editColumns,B=void 0!==P&&P,_=n.editColumnsInitOpen,V=void 0!==_&&_,G=n.enableHeaderEditing,K=void 0!==G&&G,Y=n.enableRowSelection,Z=void 0!==Y&&Y,ee=n.expandAll,te=void 0===ee||ee,ie=n.expandIcon,le=void 0===ie?e(re,{className:"st-expand-icon"}):ie,se=n.externalFilterHandling,de=void 0!==se&&se,fe=n.externalSortHandling,ve=void 0!==fe&&fe,he=n.filterIcon,we=void 0===he?e(ue,{className:"st-header-icon"}):he,pe=n.footerRenderer,me=n.headerCollapseIcon,ge=void 0===me?e(re,{className:"st-header-icon"}):me,be=n.headerExpandIcon,Ie=void 0===be?e(ne,{className:"st-header-icon"}):be,xe=n.headerDropdown,Ce=n.headerHeight,ye=n.height,Re=n.hideFooter,Se=void 0!==Re&&Re,Ne=n.initialSortColumn,Ae=n.initialSortDirection,Me=void 0===Ae?"ascending":Ae,ke=n.isLoading,Ee=void 0!==ke&&ke,He=n.nextIcon,Fe=void 0===He?e(re,{className:"st-next-prev-icon"}):He,De=n.onCellEdit,Oe=n.onCellClick,Le=n.onColumnOrderChange,Pe=n.onColumnSelect,Be=n.onFilterChange,We=n.onGridReady,qe=n.onHeaderEdit,ze=n.onLoadMore,je=n.onNextPage,_e=n.onPageChange,Ue=n.onRowSelectionChange,Ve=n.onSortChange,Ge=n.prevIcon,Ke=void 0===Ge?e(ne,{className:"st-next-prev-icon"}):Ge,Je=n.rowButtons,Xe=n.rowGrouping,Ye=n.rowHeight,$e=void 0===Ye?32:Ye,Ze=n.rowIdAccessor,Qe=n.rows,en=n.selectionColumnWidth,nn=void 0===en?42:en,rn=n.rowsPerPage,tn=void 0===rn?10:rn,on=n.selectableCells,an=void 0!==on&&on,un=n.selectableColumns,ln=void 0!==un&&un,cn=n.serverSidePagination,sn=void 0!==cn&&cn,dn=n.shouldPaginate,fn=void 0!==dn&&dn,vn=n.sortDownIcon,hn=void 0===vn?e(ae,{className:"st-header-icon"}):vn,wn=n.sortUpIcon,pn=void 0===wn?e(oe,{className:"st-header-icon"}):wn,mn=n.tableRef,gn=n.theme,bn=void 0===gn?"light":gn,In=n.totalRowCount,xn=n.useHoverRowBackground,Cn=void 0===xn||xn,yn=n.useOddEvenRowBackground,Rn=void 0!==yn&&yn,An=n.useOddColumnBackground,En=void 0!==An&&An;En&&(Rn=!1),h&&(Cn=!1);var Hn=a(null),Tn=a(null),Fn=a(null),Dn=a(null),qn=a(null),jn=a(null),_n=a(null),Un=function(e){var n=e.tableBodyContainerRef,r=i(0),t=r[0],o=r[1];return g(function(){n.current&&o(n.current.offsetWidth-n.current.clientWidth)},[n]),{setScrollbarWidth:o,scrollbarWidth:t,tableBodyContainerRef:n}}({tableBodyContainerRef:jn}),Vn=Un.scrollbarWidth,Gn=Un.setScrollbarWidth,Kn=ce({headerContainerRef:_n,mainSectionRef:jn,scrollbarWidth:Vn}).isMainSectionScrollable,Jn=u(function(){if(Ee&&0===Qe.length){var e=fn?tn:10;Kn&&(e+=1);var n=Array.from({length:e},function(e,n){var r;return(r={})[Ze]="loading-".concat(n),r});return n}return Qe},[Ee,Qe,Ze,tn,Kn,fn]),Xn=b(function(e){return e+1},0)[1],Yn=i(1),$n=Yn[0],Zn=Yn[1],Qn=i(F),er=Qn[0],nr=Qn[1],rr=i(!1),tr=rr[0],or=rr[1],ir=i(!1),ar=ir[0],ur=ir[1],lr=i(null),cr=lr[0],sr=lr[1],dr=l(function(){var e=new Set,n=function(r){r.forEach(function(r){r.collapseDefault&&r.collapsible&&e.add(r.accessor),r.children&&n(r.children)})};return n(F),e},[F]),fr=i(dr),vr=fr[0],hr=fr[1];o(function(){nr(F)},[F]);var wr=function(e){var n=e.rows,r=e.rowIdAccessor,t=e.onRowSelectionChange,o=e.enableRowSelection,a=void 0!==o&&o,c=i(new Set),s=c[0],d=c[1],f=l(function(e){return!!a&&function(e,n){return n.has(e)}(e,s)},[s,a]),v=l(function(){return!!a&&function(e,n,r){return 0!==e.length&&e.every(function(e){return r.has(e[n]+"")})}(n,r,s)},[n,r,s,a]),h=u(function(){return a?function(e){return e.size}(s):0},[s,a]),w=u(function(){return a?function(e,n,r){return e.filter(function(e){return r.has(e[n]+"")})}(n,r,s):[]},[n,r,s,a]),p=l(function(e,o){if(a){var i=function(e,n){var r=new Set(n);return r.has(e)?r.delete(e):r.add(e),r}(e,s);if(d(i),t){var u=n.find(function(n){return n[r]+""===e});u&&t({row:u,isSelected:o,selectedRows:i})}}},[s,n,r,t,a]),m=l(function(e){var o;a&&(e?(o=function(e,n){return new Set(e.map(function(e){return e[n]+""}))}(n,r),t&&n.forEach(function(e){return t({row:e,isSelected:!0,selectedRows:o})})):(o=new Set,t&&s.forEach(function(e){var i=n.find(function(n){return n[r]+""===e});i&&t({row:i,isSelected:!1,selectedRows:o})})),d(o))},[n,r,t,s,a]),g=l(function(e){if(a){var n=f(e);p(e,!n)}},[f,p,a]),b=l(function(){if(a){if(t){var e=new Set;s.forEach(function(o){var i=n.find(function(e){return e[r]+""===o});i&&t({row:i,isSelected:!1,selectedRows:e})})}d(new Set)}},[s,n,r,t,a]);return{selectedRows:s,setSelectedRows:d,isRowSelected:f,areAllRowsSelected:v,selectedRowCount:h,selectedRowsData:w,handleRowSelect:p,handleSelectAll:m,handleToggleRow:g,clearSelection:b}}({rows:Jn,rowIdAccessor:Ze,onRowSelectionChange:Ue,enableRowSelection:Z}),pr=wr.selectedRows,mr=wr.setSelectedRows,gr=wr.isRowSelected,br=wr.areAllRowsSelected,Ir=wr.selectedRowCount,xr=wr.selectedRowsData,Cr=wr.handleRowSelect,yr=wr.handleSelectAll,Rr=wr.handleToggleRow,Sr=wr.clearSelection,Nr=u(function(){var e,n=R([],er,!0);return Z&&!(null===(e=null==er?void 0:er[0])||void 0===e?void 0:e.isSelectionColumn)&&(n=R([{accessor:"__row_selection__",label:"",width:nn,isEditable:!1,type:"boolean",pinned:"left",isSelectionColumn:!0,isSortable:!1,filterable:!1,align:"center"}],n,!0)),n},[Z,er,nn]),Ar=i(0),Mr=Ar[0],kr=Ar[1],Er=i("none"),Hr=Er[0],Tr=Er[1],Fr=i(new Set),Dr=Fr[0],Or=Fr[1],Lr=i(0),Pr=Lr[0],Br=Lr[1];g(function(){var e=function(){jn.current&&Br(jn.current.clientWidth)};e();var n=null;return jn.current&&(n=new ResizeObserver(e)).observe(jn.current),function(){n&&n.disconnect()}},[]);var Wr=u(function(){var e=A(window.innerWidth),n=function(e){var n=e.containerWidth,r=e.maxPinnedWidthPercent,t=void 0===r?.8:r,o=e.collapsedHeaders,i=0,a=0,u=0;e.headers.forEach(function(e){if(!e.hide){var n=O(e,o).reduce(function(e,n){return e+L(n)},0);"left"===e.pinned?i+=n:"right"===e.pinned?a+=n:u+=n}});var l=i,c=a;if(n&&n>0){var s=n*t;i>s&&(i=s),a>s&&(a=s)}return{leftWidth:H(i),rightWidth:H(a),mainWidth:u,leftContentWidth:l,rightContentWidth:c}}({headers:Nr,containerWidth:Pr,maxPinnedWidthPercent:e,collapsedHeaders:vr});return{mainBodyWidth:n.mainWidth,pinnedLeftWidth:n.leftWidth,pinnedRightWidth:n.rightWidth,pinnedLeftContentWidth:n.leftContentWidth,pinnedRightContentWidth:n.rightContentWidth}},[Nr,Pr,vr]),qr=Wr.mainBodyWidth,zr=Wr.pinnedLeftWidth,jr=Wr.pinnedRightWidth,_r=Wr.pinnedLeftContentWidth,Ur=Wr.pinnedRightContentWidth,Vr=function(e){var n=e.height,r=e.rowHeight,t=e.shouldPaginate,o=e.rowsPerPage;return u(function(){var e;if(!n&&t&&o)return r*(o+1);if(!n)return window.innerHeight-r;var i,a=document.querySelector(".simple-table-root");return i="string"==typeof n?n.endsWith("px")?parseInt(n,10):n.endsWith("vh")?window.innerHeight*parseInt(n,10)/100:n.endsWith("%")?((null===(e=null==a?void 0:a.parentElement)||void 0===e?void 0:e.clientHeight)||window.innerHeight)*parseInt(n,10)/100:window.innerHeight:n,Math.max(0,i-r)},[n,r,t,o])}({height:ye,rowHeight:$e,shouldPaginate:fn,rowsPerPage:tn}),Gr=function(e){var n=e.rows,r=e.headers,t=e.rowGrouping;return u(function(){if(!t||0===t.length)return n;var e=function(e){return E(e).filter(function(e){return e.aggregation})}(r);if(0===e.length)return n;var o=JSON.parse(JSON.stringify(n)),i=function(n,r){return void 0===r&&(r=0),n.map(function(n){var o=t[r],a=t[r+1],u=n[o];if(u&&z(u)){var l=i(u,r+1),c=I({},n);return c[o]=l,e.forEach(function(e){var n=Bn(l,e.accessor,e.aggregation,a);void 0!==n&&q(c,e.accessor,n)}),c}return n})};return i(o)},[n,r,t])}({rows:Jn,headers:er,rowGrouping:Xe}),Kr=function(e){var n=e.rows,r=e.externalFilterHandling,t=e.onFilterChange,o=i({}),a=o[0],c=o[1],s=u(function(){return Pn({externalFilterHandling:r,tableRows:n,filterState:a})},[n,a,r]),d=l(function(e){var n,r=I(I({},a),((n={})[e.accessor]=e,n));c(r),null==t||t(r)},[a,t]),f=l(function(e){var n=I({},a);delete n[e],c(n),null==t||t(n)},[a,t]),v=l(function(){c({}),null==t||t({})},[t]),h=l(function(e){var t,o=I(I({},a),((t={})[e.accessor]=e,t));return Pn({externalFilterHandling:r,tableRows:n,filterState:o})},[a,n,r]);return{filteredRows:s,updateFilter:d,clearFilter:f,clearAllFilters:v,filters:a,computeFilteredRowsPreview:h}}({rows:Gr,externalFilterHandling:de,onFilterChange:Be}),Jr=Kr.filters,Xr=Kr.updateFilter,Yr=Kr.clearFilter,$r=Kr.clearAllFilters,Zr=Kr.computeFilteredRowsPreview,Qr=function(e){var n=e.headers,r=e.tableRows,t=e.externalSortHandling,o=e.onSortChange,a=e.rowGrouping,c=e.initialSortColumn,s=e.initialSortDirection,d=l(function(){if(!c)return null;var e=function(n){for(var r=0,t=n;t.length>r;r++){var o=t[r];if(o.accessor===c)return o;if(o.children&&o.children.length>0){var i=e(o.children);if(i)return i}}},r=e(n);return r?{key:r,direction:s||"ascending"}:null},[n,c,s]),f=i(d),v=f[0],h=f[1],w=l(function(e){var n=e.groupingKeys,r=e.headers,t=e.sortColumn,o=Mn({headers:r,rows:e.rows,sortColumn:t});return n&&0!==n.length?o.map(function(e){var o,i=n[0],a=e[i];if(z(a)){var u=w({rows:a,sortColumn:t,headers:r,groupingKeys:n.slice(1)});return I(I({},e),((o={})[i]=u,o))}return e}):o},[]),p=u(function(){return kn({externalSortHandling:t,tableRows:r,sortColumn:v,rowGrouping:a,headers:n,sortNestedRows:w})},[r,v,n,t,a,w]),m=l(function(e){var r=function(n){for(var t=0,o=n;o.length>t;t++){var i=o[t];if(i.accessor===e)return i;if(i.children&&i.children.length>0){var a=r(i.children);if(a)return a}}},t=r(n);if(t){var i=null;v&&v.key.accessor===e?"ascending"===v.direction&&(i={key:t,direction:"descending"}):i={key:t,direction:"ascending"},h(i),null==o||o(i)}},[v,n,o]),g=l(function(e){var o=function(n){for(var r=0,t=n;t.length>r;r++){var i=t[r];if(i.accessor===e)return i;if(i.children&&i.children.length>0){var a=o(i.children);if(a)return a}}},i=o(n);if(!i)return r;var u=null;return v&&v.key.accessor===e?"ascending"===v.direction&&(u={key:i,direction:"descending"}):u={key:i,direction:"ascending"},kn({externalSortHandling:t,tableRows:r,sortColumn:u,rowGrouping:a,headers:n,sortNestedRows:w})},[v,n,r,t,a,w]);return{sort:v,sortedRows:p,updateSort:m,computeSortedRowsPreview:g}}({headers:er,tableRows:Kr.filteredRows,externalSortHandling:ve,onSortChange:Ve,rowGrouping:Xe,initialSortColumn:Ne,initialSortDirection:Me}),et=Qr.sort,nt=Qr.sortedRows,rt=Qr.updateSort,tt=function(e){var n=e.allowAnimations,r=e.sortedRows,t=e.originalRows,o=e.currentPage,c=e.rowsPerPage,s=e.shouldPaginate,d=e.serverSidePagination,f=e.rowGrouping,v=e.rowIdAccessor,h=e.unexpandedRows,w=e.expandAll,p=e.contentHeight,m=e.rowHeight,b=e.scrollTop,x=e.scrollDirection,C=void 0===x?"none":x,y=e.computeFilteredRowsPreview,S=e.computeSortedRowsPreview,A=i(!1),M=A[0],k=A[1],E=i([]),H=E[0],T=E[1],F=a([]),D=a([]),O=u(function(){return N(m)},[m]),L=a(new Map),P=a(null),B=l(function(e){var n=s&&!d?e.slice((o-1)*c,o*c):e,r=s?(o-1)*c:0;return f&&0!==f.length?function(e){var n=e.depth,r=e.expandAll,t=void 0!==r&&r,o=e.unexpandedRows,i=e.rowGrouping,a=void 0===i?[]:i,u=e.rowIdAccessor,l=e.displayPositionOffset,c=void 0===l?0:l,s=[],d=function(e,n,r,i){void 0===r&&(r=0),void 0===i&&(i=c);var l=r,f=i;return e.forEach(function(r,i){var c=j({row:r,rowIdAccessor:u}),v=a[n];s.push({row:r,depth:n,displayPosition:f,groupingKey:v,position:l,isLastGroupRow:0===n&&i===e.length-1}),l++,f++;var h=c+"";if((t?!o.has(h):o.has(h))&&a.length>n){var w=function(e,n){var r=e[n];return z(r)?r:[]}(r,v);w.length>0&&(l=d(w,n+1,l,f))}}),l};return d(e.rows,void 0===n?0:n,0,c),s}({rows:n,rowGrouping:f,rowIdAccessor:v,unexpandedRows:h,expandAll:w,displayPositionOffset:r}):n.map(function(e,n){return{row:e,depth:0,displayPosition:r+n,groupingKey:void 0,position:n,isLastGroupRow:!1}})},[o,c,s,d,f,v,h,w]);u(function(){if(0===L.current.size){var e=B(t),n=new Map;e.forEach(function(e){var r=j({row:e.row,rowIdAccessor:v})+"";n.set(r,e.position)}),L.current=n}},[t,B,v]);var W=u(function(){return B(r)},[r,B]),q=u(function(){return U({bufferRowCount:O,contentHeight:p,tableRows:W,rowHeight:m,scrollTop:b,scrollDirection:C})},[W,p,m,b,C,O]),_=l(function(e,n){var r=new Set(e.map(function(e){return j({row:e.row,rowIdAccessor:v})+""})),t=new Set(n.map(function(e){return j({row:e.row,rowIdAccessor:v})+""}));return{staying:n.filter(function(e){var n=j({row:e.row,rowIdAccessor:v})+"";return r.has(n)}),entering:n.filter(function(e){var n=j({row:e.row,rowIdAccessor:v})+"";return!r.has(n)}),leaving:e.filter(function(e){var n=j({row:e.row,rowIdAccessor:v})+"";return!t.has(n)})}},[v]),V=u(function(){if(0===F.current.length)return!1;var e=W.map(function(e){return j({row:e.row,rowIdAccessor:v})+""}),n=F.current.map(function(e){return j({row:e.row,rowIdAccessor:v})+""});return e.length!==n.length||!e.every(function(e,r){return e===n[r]})},[W,v]);g(function(){if(!M){if(!n||s)return T([]),F.current=W,void(D.current=q);if(0===F.current.length)return T([]),F.current=W,void(D.current=q);if(!V)return T([]),F.current=W,void(D.current=q);P.current={tableRows:W,visibleRows:q},k(!0)}},[n,W,V,M,s,q]),g(function(){if(M&&P.current&&H.length>0){var e=setTimeout(function(){var e=P.current;k(!1),T([]),F.current=e.tableRows,D.current=e.visibleRows,P.current=null},zn.ROW_REORDER.duration+100);return function(){return clearTimeout(e)}}},[M,H.length]);var G=u(function(){if(!n||s)return q;if(H.length>0){var e=new Map,r=new Map;return W.forEach(function(n){var t=j({row:n.row,rowIdAccessor:v})+"";e.set(t,n.position),r.set(t,n.displayPosition)}),H.map(function(n){var t=j({row:n.row,rowIdAccessor:v})+"",o=e.get(t),i=r.get(t);return void 0!==o&&void 0!==i?I(I({},n),{position:o,displayPosition:i}):n})}return q},[q,H,W,n,s,v]),K=l(function(e){if(n&&!s){var r=y(e),t=B(r),o=U({bufferRowCount:O,contentHeight:p,tableRows:t,rowHeight:m,scrollTop:b,scrollDirection:C}),i=_(q,o).entering.map(function(e){var n=j({row:e.row,rowIdAccessor:v})+"";return W.find(function(e){return j({row:e.row,rowIdAccessor:v})+""===n})||e}).filter(Boolean);i.length>0&&T(R(R([],q,!0),i,!0))}},[n,s,y,B,p,m,b,C,_,W,q,v,O]),J=l(function(e){if(n&&!s){var r=S(e),t=B(r),o=U({bufferRowCount:O,contentHeight:p,tableRows:t,rowHeight:m,scrollTop:b,scrollDirection:C}),i=_(q,o).entering.map(function(e){var n=j({row:e.row,rowIdAccessor:v})+"";return W.find(function(e){return j({row:e.row,rowIdAccessor:v})+""===n})||e}).filter(Boolean);i.length>0&&T(R(R([],q,!0),i,!0))}},[n,s,S,B,p,m,b,C,_,W,q,v,O]);return{currentTableRows:W,currentVisibleRows:q,isAnimating:M,prepareForFilterChange:K,prepareForSortChange:J,rowsToRender:G}}({allowAnimations:c,sortedRows:nt,originalRows:Gr,currentPage:$n,rowsPerPage:tn,shouldPaginate:fn,serverSidePagination:sn,rowGrouping:Xe,rowIdAccessor:Ze,unexpandedRows:Dr,expandAll:te,contentHeight:Vr,rowHeight:$e,scrollTop:Mr,scrollDirection:Hr,computeFilteredRowsPreview:Zr,computeSortedRowsPreview:Qr.computeSortedRowsPreview}),ot=tt.currentTableRows,it=tt.rowsToRender,at=tt.prepareForFilterChange,ut=tt.prepareForSortChange,lt=tt.isAnimating,ct=a(new Map),st=a(new Map),dt=function(e){var n=e.selectableCells,r=e.headers,t=e.tableRows,c=e.rowIdAccessor,s=e.onCellEdit,d=e.cellRegistry,f=e.collapsedHeaders,v=e.rowHeight,h=e.enableRowSelection,w=void 0!==h&&h,p=i(new Set),m=p[0],g=p[1],b=i(new Set),I=b[0],x=b[1],R=i(null),S=R[0],N=R[1],A=i(null),M=A[0],k=A[1],E=i(new Set),H=E[0],T=E[1],F=i(new Set),D=F[0],L=F[1],P=i(!1),B=P[0],z=P[1],_=a(!1),U=a(null),V=u(function(){var e=new Set;return m.forEach(function(n){var r=n.split("-");if(r.length>=2){var t=parseInt(r[1],10);isNaN(t)||e.add(t)}}),I.forEach(function(n){e.add(n)}),e},[m,I]),G=u(function(){var e=new Set;return m.forEach(function(n){var r=n.split("-");if(r.length>=3){var t=r.slice(2).join("-");e.add(t)}}),I.size>0&&t.forEach(function(n){var r=j({row:n.row,rowIdAccessor:c});e.add(r+"")}),e},[m,I,t,c]),K=u(function(){return r.flatMap(function(e){return O(e,f)})},[r,f]),Y=l(function(){if(0!==m.size){var e=function(e,n,r){var t=n.filter(function(e){return!e.hide}),o=new Map,i=new Map;t.forEach(function(e,n){o.set(n,e.accessor),i.set(n,e)});var a=Array.from(e).reduce(function(e,n){var t,a=n.split("-").map(Number),u=a[0],l=a[1];e[u]||(e[u]=[]);var c=o.get(l),s=i.get(l);if(c&&(null===(t=r[u])||void 0===t?void 0:t.row)){var d=r[u].row,f=W(d,c);if(!1!==(null==s?void 0:s.useFormattedValueForClipboard)&&(null==s?void 0:s.valueFormatter)){var v=s.valueFormatter({accessor:c,colIndex:l,row:d,rowIndex:u,value:f});e[u][l]=v}else e[u][l]=!s||"lineAreaChart"!==s.type&&"barChart"!==s.type?f:Array.isArray(f)?f.join(", "):""}else e[u][l]="";return e},{});return Object.values(a).map(function(e){return Object.values(e).join("\t")}).join("\n")}(m,K,t);navigator.clipboard.writeText(e),T(new Set(m)),setTimeout(function(){return T(new Set)},800)}},[m,K,t]),$=l(function(){return C(void 0,void 0,void 0,function(){var e,n,r,o,i;return y(this,function(a){switch(a.label){case 0:if(!M)return[2];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,navigator.clipboard.readText()];case 2:return(e=a.sent())?(n=function(e,n,r,t,o,i,a){var u=new Set,l=new Set,c=e.split("\n").filter(function(e){return e.length>0});if(0===c.length)return{updatedCells:u,warningCells:l};var s=r.filter(function(e){return!e.hide}),d=n.rowIndex,f=n.colIndex;return c.forEach(function(e,n){e.split("\t").forEach(function(e,r){var c=d+n,v=f+r;if(t.length>c&&s.length>v){var h=t[c],w=s[v],p=j({row:h.row,rowIdAccessor:o});if(null==w?void 0:w.isEditable){var m=e;if("number"===w.type){var g=+e;isNaN(g)||(m=g)}else if("boolean"===w.type)m="true"===e.toLowerCase()||"1"===e;else if("date"===w.type){var b=new Date(e);isNaN(b.getTime())||(m=b)}else"lineAreaChart"!==w.type&&"barChart"!==w.type||(m=e.split(",").map(function(e){var n=+e.trim();return isNaN(n)?0:n}));if(q(h.row,w.accessor,m),a){var I="".concat(p,"-").concat(w.accessor),x=a.get(I);x&&x.updateContent(m)}null==i||i({accessor:w.accessor,newValue:m,row:h.row,rowIndex:c});var C="".concat(c,"-").concat(v,"-").concat(p);u.add(C)}else{var y="".concat(c,"-").concat(v,"-").concat(p);l.add(y)}}})}),{updatedCells:u,warningCells:l}}(e,M,K,t,c,s,d),o=n.warningCells,(r=n.updatedCells).size>0&&(T(r),setTimeout(function(){return T(new Set)},800)),o.size>0&&(L(o),setTimeout(function(){return L(new Set)},800)),[3,4]):[2];case 3:return i=a.sent(),console.warn("Failed to paste from clipboard:",i),[3,4];case 4:return[2]}})})},[M,K,t,c,s,d]),Z=l(function(){if(0!==m.size){var e=function(e,n,r,t,o,i){var a=new Set,u=new Set,l=n.filter(function(e){return!e.hide}),c=new Map;return l.forEach(function(e,n){c.set(n,e.accessor)}),Array.from(e).forEach(function(e){var n=e.split("-").map(Number),c=n[0],s=n[1];if(r.length>c&&l.length>s){var d=r[c],f=l[s],v=j({row:d.row,rowIdAccessor:t});if(null==f?void 0:f.isEditable){var h;if(h="string"===f.type?"":"number"===f.type?null:"boolean"!==f.type&&("date"===f.type?null:"lineAreaChart"===f.type||"barChart"===f.type||Array.isArray(W(d.row,f.accessor))?[]:""),q(d.row,f.accessor,h),i){var w="".concat(v,"-").concat(f.accessor),p=i.get(w);p&&p.updateContent(h)}null==o||o({accessor:f.accessor,newValue:h,row:d.row,rowIndex:c}),a.add(e)}else u.add(e)}}),{deletedCells:a,warningCells:u}}(m,K,t,c,s,d),n=e.deletedCells,r=e.warningCells;n.size>0&&(T(n),setTimeout(function(){return T(new Set)},800)),r.size>0&&(L(r),setTimeout(function(){return L(new Set)},800))}},[m,K,t,c,s,d]),Q=l(function(e,n){for(var r=new Set,o=Math.min(e.rowIndex,n.rowIndex),i=Math.max(e.rowIndex,n.rowIndex),a=Math.min(e.colIndex,n.colIndex),u=Math.max(e.colIndex,n.colIndex),l=o;i>=l;l++)for(var s=a;u>=s;s++)if(l>=0&&t.length>l){if(w&&0===s)continue;var d=j({row:t[l].row,rowIdAccessor:c});r.add(X({colIndex:s,rowIndex:l,rowId:d}))}x(new Set),N(null),g(r),k(n),setTimeout(function(){return J(n,v)},0)},[t,c,v,w]),ee=l(function(e){if(e.rowIndex>=0&&t.length>e.rowIndex&&e.colIndex>=0&&(w?K.length:K.length-1)>=e.colIndex){var n=X(e);x(new Set),N(null),g(new Set([n])),k(e),setTimeout(function(){return J(e,v)},0)}},[K.length,t.length,v,w]),ne=l(function(e,n){void 0===n&&(n=!1),g(new Set),k(null),x(function(r){var t=new Set(n?r:[]);return e.forEach(function(e){return t.add(e)}),t}),e.length>0&&N(e[e.length-1])},[]);!function(e){var n=e.selectableCells,r=e.initialFocusedCell,t=e.tableRows,i=e.leafHeaders,a=e.rowIdAccessor,u=e.selectSingleCell,l=e.selectCellRange,c=e.setSelectedCells,s=e.setSelectedColumns,d=e.setLastSelectedColumnIndex,f=e.copyToClipboard,v=e.pasteFromClipboard,h=e.deleteSelectedCells,w=e.startCell,p=e.enableRowSelection,m=void 0!==p&&p;o(function(){var e=function(e){var u;if(n&&r){var l=r.rowIndex,R=r.colIndex,S=r.rowId;if(!e.ctrlKey&&!e.metaKey||"c"!==e.key){if((e.ctrlKey||e.metaKey)&&"v"===e.key)return e.preventDefault(),void v();if((e.ctrlKey||e.metaKey)&&"a"===e.key){e.preventDefault();for(var N=new Set,A=0;t.length>A;A++)for(var M=0;i.length>M;M++){var k=m?M+1:M,E=j({row:t[A].row,rowIdAccessor:a});N.add("".concat(A,"-").concat(k,"-").concat(E))}return c(N),s(new Set),void d(null)}if("Delete"===e.key||"Backspace"===e.key)return e.preventDefault(),void h();if(j({row:null===(u=t[l])||void 0===u?void 0:u.row,rowIdAccessor:a})!==S){var H=t.findIndex(function(e){return j({row:e.row,rowIdAccessor:a})===S});if(-1===H)return;l=H}var T=function(e,n,r){var o=e,a=n;return"up"===r?o=0:"down"===r?o=t.length-1:"left"===r?a=m?1:0:"right"===r&&(a=m?i.length:i.length-1),{rowIndex:o,colIndex:a}};"ArrowUp"===e.key?(e.preventDefault(),o(e,l,R,T)):"ArrowDown"===e.key?(e.preventDefault(),p(e,l,R,T)):"ArrowLeft"===e.key||"Tab"===e.key&&e.shiftKey?(e.preventDefault(),g(e,l,R,T)):"ArrowRight"===e.key||"Tab"===e.key?(e.preventDefault(),b(e,l,R,T)):"Home"===e.key?(e.preventDefault(),I(e,l)):"End"===e.key?(e.preventDefault(),x(e,l)):"PageUp"===e.key?(e.preventDefault(),C(e,l,R)):"PageDown"===e.key?(e.preventDefault(),y(e,l,R)):"Escape"===e.key&&(c(new Set),s(new Set),d(null),w.current=null)}else f()}},o=function(e,n,o,i){if(e.shiftKey){w.current||(w.current=r);var c=n-1;if((e.ctrlKey||e.metaKey)&&(c=i(n,o,"up").rowIndex),c>=0){var s=j({row:t[c].row,rowIdAccessor:a});l(w.current,{rowIndex:c,colIndex:o,rowId:s})}}else n>0&&(c=n-1,(e.ctrlKey||e.metaKey)&&(c=i(n,o,"up").rowIndex),s=j({row:t[c].row,rowIdAccessor:a}),u({rowIndex:c,colIndex:o,rowId:s}),w.current=null)},p=function(e,n,o,i){if(e.shiftKey){w.current||(w.current=r);var c=n+1;if((e.ctrlKey||e.metaKey)&&(c=i(n,o,"down").rowIndex),t.length>c){var s=j({row:t[c].row,rowIdAccessor:a});l(w.current,{rowIndex:c,colIndex:o,rowId:s})}}else t.length-1>n&&(c=n+1,(e.ctrlKey||e.metaKey)&&(c=i(n,o,"down").rowIndex),s=j({row:t[c].row,rowIdAccessor:a}),u({rowIndex:c,colIndex:o,rowId:s}),w.current=null)},g=function(e,n,o,i){if(e.shiftKey&&"ArrowLeft"===e.key){w.current||(w.current=r);var c=o-1;if(e.ctrlKey||e.metaKey)c=i(n,o,"left").colIndex;else if(m&&0===c)return;if(c>=0){var s=j({row:t[n].row,rowIdAccessor:a});l(w.current,{rowIndex:n,colIndex:c,rowId:s})}}else if(o>0){if(c=o-1,(e.ctrlKey||e.metaKey)&&"ArrowLeft"===e.key)c=i(n,o,"left").colIndex;else if(m&&0===c)return;0>c||(s=j({row:t[n].row,rowIdAccessor:a}),u({rowIndex:n,colIndex:c,rowId:s}),w.current=null)}},b=function(e,n,o,c){var s=m?i.length:i.length-1;if(e.shiftKey&&"ArrowRight"===e.key){w.current||(w.current=r);var d=o+1;if((e.ctrlKey||e.metaKey)&&(d=c(n,o,"right").colIndex),s>=d){var f=j({row:t[n].row,rowIdAccessor:a});l(w.current,{rowIndex:n,colIndex:d,rowId:f})}}else s>o&&(d=o+1,(e.ctrlKey||e.metaKey)&&"ArrowRight"===e.key&&(d=c(n,o,"right").colIndex),d>s||(f=j({row:t[n].row,rowIdAccessor:a}),u({rowIndex:n,colIndex:d,rowId:f}),w.current=null))},I=function(e,n,o){if(e.shiftKey){w.current||(w.current=r);var i=n,c=m?1:0;(e.ctrlKey||e.metaKey)&&(i=0);var s=j({row:t[i].row,rowIdAccessor:a});l(w.current,{rowIndex:i,colIndex:c,rowId:s})}else i=n,c=m?1:0,(e.ctrlKey||e.metaKey)&&(i=0),s=j({row:t[i].row,rowIdAccessor:a}),u({rowIndex:i,colIndex:c,rowId:s}),w.current=null},x=function(e,n,o){if(e.shiftKey){w.current||(w.current=r);var c=n,s=m?i.length:i.length-1;(e.ctrlKey||e.metaKey)&&(c=t.length-1);var d=j({row:t[c].row,rowIdAccessor:a});l(w.current,{rowIndex:c,colIndex:s,rowId:d})}else c=n,s=m?i.length:i.length-1,(e.ctrlKey||e.metaKey)&&(c=t.length-1),d=j({row:t[c].row,rowIdAccessor:a}),u({rowIndex:c,colIndex:s,rowId:d}),w.current=null},C=function(e,n,o){var i=Math.max(0,n-10);if(e.shiftKey){w.current||(w.current=r);var c=j({row:t[i].row,rowIdAccessor:a});l(w.current,{rowIndex:i,colIndex:o,rowId:c})}else c=j({row:t[i].row,rowIdAccessor:a}),u({rowIndex:i,colIndex:o,rowId:c}),w.current=null},y=function(e,n,o){var i=Math.min(t.length-1,n+10);if(e.shiftKey){w.current||(w.current=r);var c=j({row:t[i].row,rowIdAccessor:a});l(w.current,{rowIndex:i,colIndex:o,rowId:c})}else c=j({row:t[i].row,rowIdAccessor:a}),u({rowIndex:i,colIndex:o,rowId:c}),w.current=null};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}},[n,r,t,i,a,u,l,c,s,d,f,v,h,w,m])}({selectableCells:n,initialFocusedCell:M,tableRows:t,leafHeaders:K,rowIdAccessor:c,selectSingleCell:ee,selectCellRange:Q,setSelectedCells:g,setSelectedColumns:x,setLastSelectedColumnIndex:N,copyToClipboard:Y,pasteFromClipboard:$,deleteSelectedCells:Z,startCell:U,enableRowSelection:w});var re=l(function(e,n){var r=new Set,o=new Map;t.forEach(function(e,n){var r=j({row:e.row,rowIdAccessor:c});o.set(r+"",n)});for(var i=o.get(e.rowId+""),a=o.get(n.rowId+""),u=void 0!==i?i:e.rowIndex,l=void 0!==a?a:n.rowIndex,s=Math.min(u,l),d=Math.max(u,l),f=Math.min(e.colIndex,n.colIndex),v=Math.max(e.colIndex,n.colIndex),h=s;d>=h;h++)for(var p=f;v>=p;p++)if(h>=0&&t.length>h){if(w&&0===p)continue;var m=j({row:t[h].row,rowIdAccessor:c});r.add(X({colIndex:p,rowIndex:h,rowId:m}))}g(r)},[t,c,w]),te=l(function(e,n){var r=document.querySelector(".st-body-container");if(!r)return null;var t=r.getBoundingClientRect(),o=Array.from(document.querySelectorAll(".st-cell[data-row-index][data-col-index]:not(.st-selection-cell)"));if(0===o.length)return null;var i=Math.max(t.left,Math.min(t.right,e)),a=Math.max(t.top,Math.min(t.bottom,n)),u=null,l=1/0;if(o.forEach(function(e){if(e instanceof HTMLElement){var n=e,r=n.getBoundingClientRect(),t=r.top+r.height/2,o=Math.sqrt(Math.pow(r.left+r.width/2-i,2)+Math.pow(t-a,2));l>o&&(l=o,u=n)}}),null!==u){var c=u,s=parseInt(c.getAttribute("data-row-index")||"-1",10),d=parseInt(c.getAttribute("data-col-index")||"-1",10),f=c.getAttribute("data-row-id");if(s>=0&&d>=0&&null!==f)return{rowIndex:s,colIndex:d,rowId:f}}return null},[]),oe=l(function(e,n){var r=document.elementFromPoint(e,n);if(!r)return null;var t=r.closest(".st-cell");if(t instanceof HTMLElement){var o=parseInt(t.getAttribute("data-row-index")||"-1",10),i=parseInt(t.getAttribute("data-col-index")||"-1",10),a=t.getAttribute("data-row-id");if(o>=0&&i>=0&&null!==a)return{rowIndex:o,colIndex:i,rowId:a}}return te(e,n)},[te]),ie=l(function(e,n){var r=document.querySelector(".st-body-container");if(r){var t=r.getBoundingClientRect();t.top+50>n?r.scrollTop-=10*Math.min(3,1+Math.max(0,t.top-n)/100):n>t.bottom-50&&(r.scrollTop+=10*Math.min(3,1+Math.max(0,n-t.bottom)/100));var o=document.querySelector(".st-body-main");o&&(t.left+50>e?o.scrollLeft-=10*Math.min(3,1+Math.max(0,t.left-e)/100):e>t.right-50&&(o.scrollLeft+=10*Math.min(3,1+Math.max(0,e-t.right)/100)))}},[]),ae=l(function(e){var n=e.colIndex,r=X({colIndex:n,rowIndex:e.rowIndex,rowId:e.rowId}),t=m.has(r),o=I.has(n);return t||o},[m,I]),ue=l(function(e){var n=e.colIndex,r=e.rowIndex,o=e.rowId;if(B)return"";var i=[],a=t[r-1]?j({row:t[r-1].row,rowIdAccessor:c}):null,u=t[r+1]?j({row:t[r+1].row,rowIdAccessor:c}):null,l=null!==a?{colIndex:n,rowIndex:r-1,rowId:a}:null,s=null!==u?{colIndex:n,rowIndex:r+1,rowId:u}:null,d={colIndex:n-1,rowIndex:r,rowId:o},f={colIndex:n+1,rowIndex:r,rowId:o};return(!l||!ae(l)||I.has(n)&&0===r)&&i.push("st-selected-top-border"),(!s||!ae(s)||I.has(n)&&r===t.length-1)&&i.push("st-selected-bottom-border"),ae(d)||i.push("st-selected-left-border"),ae(f)||i.push("st-selected-right-border"),i.join(" ")},[B,ae,t,I,c]),le=u(function(){return M?function(e){return e.rowIndex===M.rowIndex&&e.colIndex===M.colIndex&&e.rowId===M.rowId}:function(){return!1}},[M]),ce=l(function(e){var n=X({colIndex:e.colIndex,rowIndex:e.rowIndex,rowId:e.rowId});return H.has(n)},[H]),se=l(function(e){var n=X({colIndex:e.colIndex,rowIndex:e.rowIndex,rowId:e.rowId});return D.has(n)},[D]);return{getBorderClass:ue,handleMouseDown:function(e){var r=e.colIndex,t=e.rowIndex,o=e.rowId;if(n){_.current=!0,z(!0),U.current={rowIndex:t,colIndex:r,rowId:o},setTimeout(function(){x(new Set),N(null);var e=X({colIndex:r,rowIndex:t,rowId:o});g(new Set([e])),k({rowIndex:t,colIndex:r,rowId:o})},0);var i=null,a=null,u=null,l=0,c=function(){if(_.current&&U.current){if(null!==i&&null!==a){ie(i,a);var e=Date.now();if(e-l>=16){var n=oe(i,a);n&&re(U.current,n),l=e}}u=requestAnimationFrame(c)}else null!==u&&(cancelAnimationFrame(u),u=null)},s=function(e){_.current&&U.current&&(i=e.clientX,a=e.clientY)},d=function(){_.current=!1,z(!1),null!==u&&(cancelAnimationFrame(u),u=null),document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",d)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",d),u=requestAnimationFrame(c)}},handleMouseOver:function(e){n&&_.current&&U.current&&re(U.current,{colIndex:e.colIndex,rowIndex:e.rowIndex,rowId:e.rowId})},isCopyFlashing:ce,isWarningFlashing:se,isInitialFocusedCell:le,isSelected:ae,lastSelectedColumnIndex:S,pasteFromClipboard:$,selectColumns:ne,selectedCells:m,selectedColumns:I,setInitialFocusedCell:k,setSelectedCells:g,setSelectedColumns:x,deleteSelectedCells:Z,columnsWithSelectedCells:V,rowsWithSelectedCells:G}}({selectableCells:an,headers:er,tableRows:ot,rowIdAccessor:Ze,onCellEdit:De,cellRegistry:ct.current,collapsedHeaders:vr,rowHeight:$e,enableRowSelection:Z}),ft=dt.getBorderClass,vt=dt.handleMouseDown,ht=dt.handleMouseOver,wt=dt.isCopyFlashing,pt=dt.isInitialFocusedCell,mt=dt.isSelected,gt=dt.isWarningFlashing,bt=dt.selectColumns,It=dt.selectedCells,xt=dt.selectedColumns,Ct=dt.setInitialFocusedCell,yt=dt.setSelectedCells,Rt=dt.setSelectedColumns,St=dt.columnsWithSelectedCells,Nt=dt.rowsWithSelectedCells,At=l(function(e){ut(e),setTimeout(function(){rt(e)},0)},[ut,rt]),Mt=l(function(e){nr(e)},[]);!function(e){var n=e.selectableColumns,r=e.selectedCells,t=e.selectedColumns,i=e.setSelectedCells,a=e.setSelectedColumns,u=e.activeHeaderDropdown,l=e.setActiveHeaderDropdown;o(function(){var e=function(e){var o=e.target;o.closest(".editable-cell-input")&&o.closest(".st-header-cell")||(u&&l&&(o.closest(".st-header-cell")||o.closest(".dropdown-content")||l(null)),o.closest(".st-cell")||n&&(o.classList.contains("st-header-cell")||o.classList.contains("st-header-label")||o.classList.contains("st-header-label-text"))||(r.size>0&&i(new Set),t.size>0&&a(new Set)))};return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}},[n,r,t,i,a,u,l])}({selectableColumns:ln,selectedCells:It,selectedColumns:xt,setSelectedCells:yt,setSelectedColumns:Rt,activeHeaderDropdown:cr,setActiveHeaderDropdown:sr}),function(e){var n=e.forceUpdate,r=e.tableBodyContainerRef,t=e.setScrollbarWidth;g(function(){var e=function(){n(),r.current&&t(r.current.offsetWidth-r.current.clientWidth)};return window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[n,r,t])}({forceUpdate:Xn,tableBodyContainerRef:jn,setScrollbarWidth:Gn}),function(e){var n=e.onGridReady;o(function(){null==n||n()},[n])}({onGridReady:We}),function(e){var n=e.cellRegistryRef,r=e.currentTableRows,t=e.headerRegistryRef,i=e.headers,a=e.rowIdAccessor,u=e.rows,l=e.tableRef,c=e.visibleRows;o(function(){l&&(l.current={updateData:function(e){var r=e.accessor,t=e.newValue,o=null==u?void 0:u[e.rowIndex];if(o){var i=j({row:o,rowIdAccessor:a}),l=D({rowId:i,accessor:r}),c=n.current.get(l);c&&c.updateContent(t),void 0!==W(o,r)&&q(o,r,t)}},setHeaderRename:function(e){var n=t.current.get(e.accessor+"");n&&n.setEditing(!0)},getVisibleRows:function(){return c},exportToCSV:function(e){!function(e,n,r){var t=function(e,n){var r=function(e){var n=[],r=function(e){for(var t=0,o=e;o.length>t;t++){var i=o[t];i.hide||i.isSelectionColumn||i.excludeFromCsv||(i.children&&i.children.length>0?r(i.children):n.push(i))}};return r(e),n}(n);return R([r.map(function(e){return Wn(e.label)}).join(",")],e.map(function(e,n){var t=e.row;return r.map(function(e,r){var o=W(t,e.accessor);if(e.exportValueGetter){var i=e.valueFormatter?e.valueFormatter({accessor:e.accessor,colIndex:r,row:t,rowIndex:n,value:o}):void 0,a=e.exportValueGetter({accessor:e.accessor,colIndex:r,row:t,rowIndex:n,value:o,formattedValue:i});return Wn(a)}return!1!==e.useFormattedValueForCSV&&e.valueFormatter?(i=e.valueFormatter({accessor:e.accessor,colIndex:r,row:t,rowIndex:n,value:o}),Wn(i)):Wn(o)}).join(",")}),!0).join("\n")}(e,n);!function(e,n){void 0===n&&(n="table-export.csv");var r=new Blob([e],{type:"text/csv;charset=utf-8;"}),t=document.createElement("a"),o=URL.createObjectURL(r);t.setAttribute("href",o),t.setAttribute("download",n),t.style.visibility="hidden",document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(o)}(t,r)}(r,i,(void 0===e?{}:e).filename)}})},[n,r,t,i,a,u,l,c])}({cellRegistryRef:ct,currentTableRows:ot,headerRegistryRef:st,headers:Nr,rowIdAccessor:Ze,rows:Jn,tableRef:mn,visibleRows:it}),function(e){var n=e.filters,r=e.onFilterChange;o(function(){null==r||r(n)},[n,r])}({filters:Jr,onFilterChange:Be}),function(e){var n=e.sort,r=e.onSortChange,t=Te(n);o(function(){!n||(null==t?void 0:t.key.accessor)===n.key.accessor&&(null==t?void 0:t.direction)===n.direction?!n&&t&&(null==r||r(null)):null==r||r(n)},[n,t,r])}({sort:et,onSortChange:Ve});var kt=l(function(e){at(e),setTimeout(function(){Xr(e)},0)},[at,Xr]);return e($,I({value:{allowAnimations:c,areAllRowsSelected:br,cellRegistry:ct.current,cellUpdateFlash:d,clearSelection:Sr,collapsedHeaders:vr,columnBorders:h,columnReordering:M,columnResizing:T,draggedHeaderRef:Hn,editColumns:B,enableHeaderEditing:K,enableRowSelection:Z,expandIcon:le,filterIcon:we,filters:Jr,forceUpdate:Xn,getBorderClass:ft,handleApplyFilter:kt,handleClearAllFilters:$r,handleClearFilter:Yr,handleMouseDown:vt,handleMouseOver:ht,handleRowSelect:Cr,handleSelectAll:yr,handleToggleRow:Rr,headerCollapseIcon:ge,headerContainerRef:_n,headerDropdown:xe,headerExpandIcon:Ie,headerRegistry:st.current,headers:Nr,hoveredHeaderRef:Tn,isAnimating:lt,isCopyFlashing:wt,isInitialFocusedCell:pt,isLoading:Ee,isResizing:tr,isRowSelected:gr,isScrolling:ar,isSelected:mt,isWarningFlashing:gt,mainBodyRef:Fn,nextIcon:Fe,onCellEdit:De,onCellClick:Oe,onColumnOrderChange:Le,onColumnSelect:Pe,onLoadMore:ze,onSort:At,onTableHeaderDragEnd:Mt,pinnedLeftRef:Dn,pinnedRightRef:qn,prevIcon:Ke,rowButtons:Je,rowGrouping:Xe,rowHeight:$e,headerHeight:null!=Ce?Ce:$e,rowIdAccessor:Ze,scrollbarWidth:Vn,selectColumns:bt,selectableColumns:ln,selectedColumns:xt,columnsWithSelectedCells:St,rowsWithSelectedCells:Nt,selectedRows:pr,selectedRowCount:Ir,selectedRowsData:xr,setCollapsedHeaders:hr,setHeaders:nr,setInitialFocusedCell:Ct,setIsResizing:or,setIsScrolling:ur,setSelectedCells:yt,setSelectedColumns:Rt,setSelectedRows:mr,setUnexpandedRows:Or,shouldPaginate:fn,sortDownIcon:hn,sortUpIcon:pn,tableBodyContainerRef:jn,tableRows:ot,theme:bn,unexpandedRows:Dr,useHoverRowBackground:Cn,useOddColumnBackground:En,useOddEvenRowBackground:Rn,activeHeaderDropdown:cr,setActiveHeaderDropdown:sr,onHeaderEdit:qe}},{children:e("div",I({className:"simple-table-root st-wrapper theme-".concat(bn," ").concat(null!=f?f:""," ").concat(h?"st-column-borders":""),style:ye?{height:ye}:{}},{children:e(Ln,{children:r("div",I({className:"st-wrapper-container"},{children:[r("div",I({className:"st-content-wrapper"},{children:[e(Sn,{pinnedLeftWidth:zr,pinnedRightWidth:jr,setScrollTop:kr,setScrollDirection:Tr,sort:et,tableRows:ot,rowsToRender:it}),e(On,{columnEditorText:x,editColumns:B,editColumnsInitOpen:V,headers:er,position:p})]})),e(Nn,{mainBodyRef:Fn,mainBodyWidth:qr,pinnedLeftWidth:zr,pinnedRightWidth:jr,pinnedLeftContentWidth:_r,pinnedRightContentWidth:Ur,tableBodyContainerRef:jn}),e(Q,{currentPage:$n,footerRenderer:pe,hideFooter:Se,onPageChange:Zn,onNextPage:je,onUserPageChange:_e,rowsPerPage:tn,shouldPaginate:fn,totalPages:Math.ceil((null!=In?In:nt.length)/tn),totalRows:null!=In?In:nt.length})]}))})}))}))},Jn=function(n){var t=n.data,o=n.width,i=void 0===o?"100%":o,a=n.height,u=void 0===a?30:a,l=n.color,c=n.fillColor,s=n.fillOpacity,d=void 0===s?.2:s,f=n.strokeWidth,v=void 0===f?2:f,h=n.className,w=void 0===h?"":h,p=n.min,m=n.max;if(!t||0===t.length)return null;var g=void 0!==p?p:Math.min.apply(Math,t),b=(void 0!==m?m:Math.max.apply(Math,t))-g||1,x=u,C=t.map(function(e,n){return{x:n/(t.length-1)*100,y:x-(e-g)/b*x}}).map(function(e,n){return"".concat(0===n?"M":"L"," ").concat(e.x,",").concat(e.y)}).join(" "),y="\n ".concat(C,"\n L ").concat(100,",").concat(x,"\n L 0,").concat(x,"\n Z\n ");return r("svg",I({width:i,height:u,viewBox:"0 0 100 ".concat(x),preserveAspectRatio:"none",className:"st-line-area-chart ".concat(w),style:{display:"block"}},{children:[e("path",{d:y,fill:c||"var(--st-chart-fill-color)",fillOpacity:d,stroke:"none",vectorEffect:"non-scaling-stroke"}),e("path",{d:C,fill:"none",stroke:l||"var(--st-chart-color)",strokeWidth:v,strokeLinecap:"round",strokeLinejoin:"round",vectorEffect:"non-scaling-stroke"})]}))},Xn=Object.freeze({__proto__:null,default:Jn}),Yn=function(n){var r=n.data,t=n.width,o=void 0===t?"100%":t,i=n.height,a=void 0===i?30:i,u=n.color,l=n.gap,c=void 0===l?2:l,s=n.className,d=void 0===s?"":s,f=n.min,v=n.max;if(!r||0===r.length)return null;var h=void 0!==f?f:Math.min.apply(Math,r),w=void 0!==v?v:Math.max.apply(Math,r),p=w-h||1,m=a,g=(100-c*(r.length-1))/r.length,b=0>h,x=b?m*(w/p):m;return e("svg",I({width:o,height:a,viewBox:"0 0 100 ".concat(m),preserveAspectRatio:"none",className:"st-bar-chart ".concat(d),style:{display:"block"}},{children:r.map(function(n,r){var t=r*(g+c),o=(n-h)/p*m,i=m-o,a=o;return b&&(0>n?(a=Math.abs(n)/p*m,i=x):i=x-(a=n/p*m)),e("rect",{x:t,y:i,width:g,height:a,fill:u||"var(--st-chart-color)",rx:1},r)})}))},$n=Object.freeze({__proto__:null,default:Yn});export{zn as A,Yn as B,ie as C,ae as D,ue as F,Jn as L,S as R,Gn as S,x as _,Te as a,I as b,N as c,Vn as d,ee as e,Un as f,ne as g,re as h,te as i,oe as j,le as k,Z as u};
2
- //# sourceMappingURL=index-bda88aae.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-bda88aae.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}