var L=Object.create;var H=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,$=Object.prototype.hasOwnProperty;var z=(r,o)=>()=>(r&&(o=r(r=0)),o);var M=(r,o)=>()=>(o||r((o={exports:{}}).exports,o),o.exports);var P=(r,o,n,u)=>{if(o&&typeof o=="object"||typeof o=="function")for(let l of K(o))!$.call(r,l)&&l!==n&&H(r,l,{get:()=>o[l],enumerable:!(u=F(o,l))||u.enumerable});return r};var N=(r,o,n)=>(n=r!=null?L(O(r)):{},P(o||!r||!r.__esModule?H(n,"default",{value:r,enumerable:!0}):n,r));var T=M((D,A)=>{g();(function(){function r(t,s){if(!(this instanceof r))return new r(t,s);if(!t||t.tagName!=="TABLE")throw new Error("Element must be a table");this.init(t,s||{})}var o=[],n=function(t){var s;return!window.CustomEvent||typeof window.CustomEvent!="function"?(s=document.createEvent("CustomEvent"),s.initCustomEvent(t,!1,!1,void 0)):s=new CustomEvent(t),s},u=function(t,s){return t.getAttribute(s.sortAttribute||"data-sort")||t.textContent||t.innerText||""},l=function(t,s){return t=t.trim().toLowerCase(),s=s.trim().toLowerCase(),t===s?0:t<s?1:-1},p=function(t,s){return[].slice.call(t).find(function(e){return e.getAttribute("data-sort-column-key")===s})},B=function(t,s){return function(e,a){var c=t(e.td,a.td);return c===0?s?a.index-e.index:e.index-a.index:c}};r.extend=function(t,s,e){if(typeof s!="function"||typeof e!="function")throw new Error("Pattern and sort must be a function");o.push({name:t,pattern:s,sort:e})},r.prototype={init:function(t,s){var e=this,a,c,d,i;if(e.table=t,e.thead=!1,e.options=s,t.rows&&t.rows.length>0)if(t.tHead&&t.tHead.rows.length>0){for(d=0;d<t.tHead.rows.length;d++)if(t.tHead.rows[d].getAttribute("data-sort-method")==="thead"){a=t.tHead.rows[d];break}a||(a=t.tHead.rows[t.tHead.rows.length-1]),e.thead=!0}else a=t.rows[0];if(a){var b=function(){e.current&&e.current!==this&&e.current.removeAttribute("aria-sort"),e.current=this,e.sortTable(this)};for(d=0;d<a.cells.length;d++)i=a.cells[d],i.setAttribute("role","columnheader"),i.getAttribute("data-sort-method")!=="none"&&(i.tabindex=0,i.addEventListener("click",b,!1),i.getAttribute("data-sort-default")!==null&&(c=i));c&&(e.current=c,e.sortTable(c))}},sortTable:function(t,s){var e=this,a=t.getAttribute("data-sort-column-key"),c=t.cellIndex,d=l,i="",b=[],f=e.thead?0:1,y=t.getAttribute("data-sort-method"),v=t.getAttribute("aria-sort");if(e.table.dispatchEvent(n("beforeSort")),s||(v==="ascending"?v="descending":v==="descending"?v="ascending":v=e.options.descending?"descending":"ascending",t.setAttribute("aria-sort",v)),!(e.table.rows.length<2)){if(!y){for(var m;b.length<3&&f<e.table.tBodies[0].rows.length;)a?m=p(e.table.tBodies[0].rows[f].cells,a):m=e.table.tBodies[0].rows[f].cells[c],i=m?u(m,e.options):"",i=i.trim(),i.length>0&&b.push(i),f++;if(!b)return}for(f=0;f<o.length;f++)if(i=o[f],y){if(i.name===y){d=i.sort;break}}else if(b.every(i.pattern)){d=i.sort;break}for(e.col=c,f=0;f<e.table.tBodies.length;f++){var x=[],C={},h,E=0,k=0;if(!(e.table.tBodies[f].rows.length<2)){for(h=0;h<e.table.tBodies[f].rows.length;h++){var m;i=e.table.tBodies[f].rows[h],i.getAttribute("data-sort-method")==="none"?C[E]=i:(a?m=p(i.cells,a):m=i.cells[e.col],x.push({tr:i,td:m?u(m,e.options):"",index:E})),E++}for(v==="descending"?x.sort(B(d,!0)):(x.sort(B(d,!1)),x.reverse()),h=0;h<E;h++)C[h]?(i=C[h],k++):i=x[h-k].tr,e.table.tBodies[f].appendChild(i)}}e.table.dispatchEvent(n("afterSort"))}},refresh:function(){this.current!==void 0&&this.sortTable(this.current,!0)}},typeof A<"u"&&A.exports?A.exports=r:window.Tablesort=r})()});var w,g=z(()=>{"use strict";w=N(T())});g();var I=N(T());g();w.default.extend("dotsep",function(r){return/^(\d+\.)+\d+$/.test(r)},function(r,o){r=r.split("."),o=o.split(".");for(var n=0,u=r.length,l,p;n<u;n++)if(l=parseInt(r[n],10),p=parseInt(o[n],10),l!==p){if(l>p)return-1;if(l<p)return 1}return 0});g();(function(){var r=function(n){return n.replace(/[^\-?0-9.]/g,"")},o=function(n,u){return n=parseFloat(n),u=parseFloat(u),n=isNaN(n)?0:n,u=isNaN(u)?0:u,n-u};w.default.extend("number",function(n){return n.match(/^[-+]?[£\x24Û¢´€]?\d+\s*([,\.]\d{0,2})/)||n.match(/^[-+]?\d+\s*([,\.]\d{0,2})?[£\x24Û¢´€]/)||n.match(/^[-+]?(\d)*-?([,\.]){0,1}-?(\d)+([E,e][\-+][\d]+)?%?$/)},function(n,u){return n=r(n),u=r(u),o(u,n)})})();var W=I.default;export{W as default};
