var chem;(()=>{"use strict";var e,t,r={3778:(e,t,r)=>{var n=r(6066);const o=e=>null==e;var a=r(2780),s=r(8774);onmessage=async e=>{const{values:t,startIdx:r,endIdx:l,sampleLength:c,fnNames:i,opts:h,weights:p,aggregationMethod:f}=e.data;try{let e=new Float32Array(c);const u=l-r,g=function(e,t){return e===n.G.MANHATTAN?e=>e.reduce((e,r,n)=>e+r*t[n],0):e=>{const r=e.reduce((e,r,n)=>e+(r*t[n])**2,0);return Math.sqrt(r)}}(f,p);t.forEach((e,r)=>{if((0,a.lW)(i[r]))for(let n=0;n<e.length;++n)o(e[n])||(t[r][n]=new s.A(t[r][n]._data,t[r][n]._length))});let v=0;const m=Math.floor(u/c),d=new Array(i.length).fill(null).map((e,t)=>new a.t$(i[t]).getMeasure(h[t])),b=t[0].length-2-Math.floor(Math.sqrt(-8*r+4*t[0].length*(t[0].length-1)-7)/2-.5),w=r-t[0].length*b+Math.floor((b+1)*(b+2)/2);let y=b,x=w,M=0;for(;v<u&&M<c;){const r=d.map((e,r)=>o(t[r][y])||o(t[r][x])?1:e(t[r][y],t[r][x])),n=1===r.length?r[0]:g(r);for(e[M]=n,M++,v+=m,x+=m;x>=t[0].length&&v<u;)y++,x=y+1+(x-t[0].length)}M<c&&(e=e.slice(0,M)),postMessage({distance:e})}catch(e){postMessage({error:e})}}}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={exports:{}};return r[e](a,a.exports,o),a.exports}o.m=r,o.x=()=>{var e=o.O(void 0,[242,589],()=>o(3778));return o.O(e)},e=[],o.O=(t,r,n,a)=>{if(!r){var s=1/0;for(h=0;h<e.length;h++){for(var[r,n,a]=e[h],l=!0,c=0;c<r.length;c++)(!1&a||s>=a)&&Object.keys(o.O).every(e=>o.O[e](r[c]))?r.splice(c--,1):(l=!1,a<s&&(s=a));if(l){e.splice(h--,1);var i=n();void 0!==i&&(t=i)}}return t}a=a||0;for(var h=e.length;h>0&&e[h-1][2]>a;h--)e[h]=e[h-1];e[h]=[r,n,a]},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce((t,r)=>(o.f[r](e,t),t),[])),o.u=e=>e+".js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{var e={778:1};o.f.i=(t,r)=>{e[t]||importScripts(o.p+o.u(t))};var t=self.webpackChunkchem=self.webpackChunkchem||[],r=t.push.bind(t);t.push=t=>{var[n,a,s]=t;for(var l in a)o.o(a,l)&&(o.m[l]=a[l]);for(s&&s(o);n.length;)e[n.pop()]=1;r(t)}})(),t=o.x,o.x=()=>Promise.all([o.e(242),o.e(589)]).then(t);var a=o.x();chem=a})();
//# sourceMappingURL=778.js.map