/*! For license information please see 7764-jjlXmjpLAEE.js.LICENSE.txt */
(()=>{"use strict";const e=Symbol("Comlink.proxy"),t=Symbol("Comlink.endpoint"),n=Symbol("Comlink.releaseProxy"),r=Symbol("Comlink.finalizer"),a=Symbol("Comlink.thrown"),s=e=>"object"==typeof e&&null!==e||"function"==typeof e,i=new Map([["proxy",{canHandle:t=>s(t)&&t[e],serialize(e){const{port1:t,port2:n}=new MessageChannel;return o(e,t),[n,[n]]},deserialize(e){return e.start(),m(e,[],t);var t}}],["throw",{canHandle:e=>s(e)&&a in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function o(t,n=globalThis,s=["*"]){n.addEventListener("message",(function i(u){if(!u||!u.data)return;if(!function(e,t){for(const n of e){if(t===n||"*"===n)return!0;if(n instanceof RegExp&&n.test(t))return!0}return!1}(s,u.origin))return void console.warn(`Invalid origin '${u.origin}' for comlink proxy`);const{id:c,type:p,path:f}=Object.assign({path:[]},u.data),m=(u.data.argumentList||[]).map(v);let g;try{const n=f.slice(0,-1).reduce(((e,t)=>e[t]),t),r=f.reduce(((e,t)=>e[t]),t);switch(p){case"GET":g=r;break;case"SET":n[f.slice(-1)[0]]=v(u.data.value),g=!0;break;case"APPLY":g=r.apply(n,m);break;case"CONSTRUCT":g=function(t){return Object.assign(t,{[e]:!0})}(new r(...m));break;case"ENDPOINT":{const{port1:e,port2:n}=new MessageChannel;o(t,n),g=function(e,t){return y.set(e,t),e}(e,[e])}break;case"RELEASE":g=void 0;break;default:return}}catch(e){g={value:e,[a]:0}}Promise.resolve(g).catch((e=>({value:e,[a]:0}))).then((e=>{const[a,s]=d(e);n.postMessage(Object.assign(Object.assign({},a),{id:c}),s),"RELEASE"===p&&(n.removeEventListener("message",i),l(n),r in t&&"function"==typeof t[r]&&t[r]())})).catch((e=>{const[t,r]=d({value:new TypeError("Unserializable return value"),[a]:0});n.postMessage(Object.assign(Object.assign({},t),{id:c}),r)}))})),n.start&&n.start()}function l(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function u(e){if(e)throw new Error("Proxy has been released and is not useable")}function c(e){return h(e,{type:"RELEASE"}).then((()=>{l(e)}))}const p=new WeakMap,f="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const t=(p.get(e)||0)-1;p.set(e,t),0===t&&c(e)}));function m(e,r=[],a=function(){}){let s=!1;const i=new Proxy(a,{get(t,a){if(u(s),a===n)return()=>{!function(e){f&&f.unregister(e)}(i),c(e),s=!0};if("then"===a){if(0===r.length)return{then:()=>i};const t=h(e,{type:"GET",path:r.map((e=>e.toString()))}).then(v);return t.then.bind(t)}return m(e,[...r,a])},set(t,n,a){u(s);const[i,o]=d(a);return h(e,{type:"SET",path:[...r,n].map((e=>e.toString())),value:i},o).then(v)},apply(n,a,i){u(s);const o=r[r.length-1];if(o===t)return h(e,{type:"ENDPOINT"}).then(v);if("bind"===o)return m(e,r.slice(0,-1));const[l,c]=g(i);return h(e,{type:"APPLY",path:r.map((e=>e.toString())),argumentList:l},c).then(v)},construct(t,n){u(s);const[a,i]=g(n);return h(e,{type:"CONSTRUCT",path:r.map((e=>e.toString())),argumentList:a},i).then(v)}});return function(e,t){const n=(p.get(t)||0)+1;p.set(t,n),f&&f.register(e,t,e)}(i,e),i}function g(e){const t=e.map(d);return[t.map((e=>e[0])),(n=t.map((e=>e[1])),Array.prototype.concat.apply([],n))];var n}const y=new WeakMap;function d(e){for(const[t,n]of i)if(n.canHandle(e)){const[r,a]=n.serialize(e);return[{type:"HANDLER",name:t,value:r},a]}return[{type:"RAW",value:e},y.get(e)||[]]}function v(e){switch(e.type){case"HANDLER":return i.get(e.name).deserialize(e.value);case"RAW":return e.value}}function h(e,t,n){return new Promise((r=>{const a=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");e.addEventListener("message",(function t(n){n.data&&n.data.id&&n.data.id===a&&(e.removeEventListener("message",t),r(n.data))})),e.start&&e.start(),e.postMessage(Object.assign({id:a},t),n)}))}o({filterData:(e,t,n)=>(n=n.toUpperCase(),e.filter((e=>Object.entries(t).some((t=>{const[r,a]=t;return!(!a.filterable||!String(a.filterKey?e[a.valueColumn||r][a.filterKey]:e[a.valueColumn||r]).toUpperCase().includes(n))}))))),sortData:(e,t,n,r)=>e.sort(((e,a)=>{let s=1;"desc"===n&&(s=-1);let i=t.filterKey?e[t.valueColumn||r][t.filterKey]:e[t.valueColumn||r],o=t.filterKey?a[t.valueColumn||r][t.filterKey]:a[t.valueColumn||r];return"numeric"===t.type?(i=isNaN(i)?void 0:Number(i),o=isNaN(o)?void 0:Number(o)):("string"==typeof i&&(i=i.toUpperCase()),"string"==typeof o&&(o=o.toUpperCase())),null==i&&null!=o?1:null==o&&null!=i?-1:i<o?-1*s:i>o?1*s:0}))})})();
//# sourceMappingURL=7764-jjlXmjpLAEE.js.map