@datagrok/bio 2.13.5 → 2.13.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/package.js CHANGED
@@ -1,4 +1,4 @@
1
- var bio;(()=>{var e={8924:(e,t,n)=>{"use strict";n.d(t,{X:()=>i});var s=n(7362);class i extends s.e{static get Lesk(){return void 0===this.lesk&&(this.lesk=this.makePalette([[["G","A","S","T"],"orange"],[["C","V","I","L","P","F","Y","M","W"],"all_green"],[["N","Q","H"],"magenta"],[["D","E"],"red"],[["K","R"],"all_blue"]],!1,i)),this.lesk}static get GrokGroups(){return void 0===this.grokGroups&&(this.grokGroups=this.makePalette([[["C","U"],"yellow"],[["G","P"],"red"],[["A","V","I","L","M","F","Y","W"],"all_green"],[["R","H","K"],"light_blue"],[["D","E"],"dark_blue"],[["S","T","N","Q"],"orange"]],!1,i)),this.grokGroups}static get RasMol(){return void 0===this.rasMol&&(this.rasMol=new i({D:"#E60A0A",E:"#E60A0A",C:"#E6E600",M:"#E6E600",K:"#145AFF",R:"#145AFF",S:"#FA9600",T:"#FA9600",F:"#3232AA",Y:"#3232AA",N:"#00DCDC",Q:"#00DCDC",G:"#EBEBEB",L:"#0F820F",V:"#0F820F",I:"#0F820F",A:"#C8C8C8",W:"#B45AB4",H:"#8282D2",P:"#DC9682",others:"#BEA06E"})),this.rasMol}get(e){const t=e in i.aaSynonyms?i.aaSynonyms[e]:e;return super.get(t)}}i.aaSynonyms={MeNle:"L",MeA:"A",MeG:"G",MeF:"F"};class r{static getPalette(e="grok"){switch(e){case"grok":return i.GrokGroups;case"lesk":return i.Lesk;default:throw new Error(`ChemPalette: scheme \`${e}\` does not exist`)}}static getInnerOuter(e){let t=0,n="",s="";for(const i of e)"("==i?t++:")"==i?t--:t?n+=i:s+=i;return isNaN(parseInt(n))?[s,n]:[s,""]}static getColorAAPivot(e="",t="grok"){const n=this.getPalette(t);let[s,i]=this.getInnerOuter(e);if(s=s.length>6?`${s.slice(0,3)}...`:s,i=i.length>6?`${i.slice(0,3)}...`:i,1==e.length||"("==e[1]){const t=e[0]?.toUpperCase();return t in n?[n.get(t),t,i,1]:[this.undefinedColor,s,i,1]}if("d"==e[0]&&e[1]in n&&(2==e.length||"("==e[2])){const t=e[1]?.toUpperCase();return t in n?[n.get(t),t,i,2]:[this.undefinedColor,s,i,2]}if(e.substring(0,3)in this.AAFullNames&&(3==e.length||"("==e[3])){const t=this.AAFullNames[e.substring(0,3)];return t in n?[n.get(t),t,i,3]:[this.undefinedColor,s,i,3]}if(e[0]?.toLowerCase()==e[0]&&e.substring(1,3)in this.AAFullNames&&(4==e.length||"("==e[4])){const t=this.AAFullNames[e.substring(1,3)];return t in n?[n.get(t),t,i,4]:[this.undefinedColor,s,i,4]}return[this.undefinedColor,s,i,0]}}r.SemType="Aminoacids",r.SemTypeMultipleAlignment="AminoacidsMultipleAlignment",r.undefinedColor="rgb(100,100,100)",r.Names={G:"Glycine",L:"Leucine",Y:"Tyrosine",S:"Serine",E:"Glutamic acid",Q:"Glutamine",D:"Aspartic acid",N:"Asparagine",F:"Phenylalanine",A:"Alanine",K:"Lysine",R:"Arginine",H:"Histidine",C:"Cysteine",V:"Valine",P:"Proline",W:"Tryptophan",I:"Isoleucine",M:"Methionine",T:"Threonine"},r.AASmiles={G:"NCC(=O)O",L:"N[C@H](CC(C)C)C(=O)O",Y:"NC(CC1=CC=C(O)C=C1)C(=O)O",S:"NC(CO)C(=O)O",E:"N[C@@H](CCC(O)=O)C(=O)O",Q:"N[C@@H](CCC(N)=O)C(=O)O",D:"N[C@@H](CC(O)=O)C(=O)O",N:"N[C@@H](CC(N)=O)C(=O)O",F:"NC(CC1=CC=CC=C1)C(=O)O",A:"N[C@H](C)C(=O)O",K:"NC(CCCCN)C(=O)O",R:"N[C@H](CCCNC(=N)C)C(=O)O",H:"NC(CC1=CN=C[N]1)C(=O)O",C:"N[C@@H](CS)C(=O)O",V:"NC(C(C)C)C(=O)O",P:"N(CCC1)C1C(=O)O",W:"N[C@@H](Cc1c2ccccc2n([H])c1)C(=O)O",I:"N[C@H]([C@H](C)CC)C(=O)O",M:"NC(CCSC)C(=O)O",T:"NC(C(O)C)C(=O)O"},r.AASmilesTruncated={G:"*C*",L:"CC(C)C[C@H](*)*",Y:"C1=CC(=CC=C1CC(*)*)O",S:"OCC(*)C*",E:"*[C@@H](CCC(O)=O)*",Q:"*N[C@@H](CCC(N)=O)*",D:"*[C@@H](CC(O)=O)*",N:"*[C@@H](CC(N)=O)*",F:"C1=CC=C(C=C1)CC(*)*",A:"C[C@H](*)*",K:"C(CCN)CC(*)*",R:"*[C@H](CCCNC(=N)C)*",H:"C1=C(NC=N1)CC(*)*",C:"C([C@@H](*)*)S",V:"CC(C)C(*)*",P:"C1CCN(*)C1*",W:"*[C@@H](Cc1c2ccccc2n([H])c1)*",I:"CC[C@H](C)[C@H](*)*",M:"CSCCC(*)*",T:"CC(O)C(*)*"},r.AAFullNames={Ala:"A",Arg:"R",Asn:"N",Asp:"D",Cys:"C",Gln:"Q",Glu:"E",Gly:"G",His:"H",Ile:"I",Leu:"L",Lys:"K",Met:"M",Phe:"F",Pro:"P",Ser:"S",Thr:"T",Trp:"W",Tyr:"Y",Val:"V"}},9124:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var s=n(7389),i=n(6082);async function r(){const e="Helm",t=i.Func.find({package:e,name:"getHelmHelper"});if(0===t.length)throw new Error(`Package '${e}' must be installed for HelmHelper.`);return(await t[0].prepare().call()).getOutputParamValue()}s.input.helmAsync=async function(e,t){return(await r()).createHelmInput(e,t)}},4356:(e,t,n)=>{"use strict";n.d(t,{Eu:()=>l,so:()=>r,ub:()=>a});var s=n(4328);const i="Libraries",r="System:AppData/Bio/monomer-libraries/";let o=Promise.resolve();async function a(){let e;return o=o.then((async()=>{const t=await s.dapi.userDataStorage.getValue(i,"Settings",!0);e=t?JSON.parse(t):{exclude:[],explicit:[]},e.exclude=e.exclude instanceof Array?e.exclude:[],e.explicit=e.explicit instanceof Array?e.explicit:[],console.debug(`Bio: getUserLibSettings()\n${JSON.stringify(e,void 0,2)}`)})),await o,e}async function l(e){o=o.then((async()=>{console.debug(`Bio: setUserLibSettings()\n${JSON.stringify(e,void 0,2)}`),await s.dapi.userDataStorage.postValue(i,"Settings",JSON.stringify(e),!0)})),await o}},6718:(e,t,n)=>{"use strict";n.d(t,{A7:()=>m,pj:()=>u,uL:()=>h,uX:()=>c});var s=n(6082),i=n(4328),r=n(6295),o=n(3151),a=n(2738),l=(n(826),n(3077));function c(e){const t=[];for(let n=0;n<e.rowCount;n++){const s={};Object.keys(o.Ec).forEach((t=>{if("symbol"===t){const i=e.get(o.Ec[t],n);s[t]="."===i?e.get(o.yw,n):i}else if("rgroups"===t){const i=e.get(o.Ec[t],n).split("\n"),r=[];i.forEach((e=>{const t={},n=e.substring(e.lastIndexOf("]")+1),s=e.match(/\[R(\d+)\]/)[1];t.capGroupSmiles="H"===n?`[*:${s}][H]`:`O[*:${s}]`,t.alternateId="H"===n?`R${s}-H`:`R${s}-OH`,t.capGroupName="H"===n?"H":"OH",t.label=`R${s}`,r.push(t)})),s[t]=r}else o.Ec[t]&&(s[t]=e.get(o.Ec[t],n))})),s.author??(s.author=""),s.id??(s.id=0),s.smiles??(s.smiles=""),s.monomerType??(s.monomerType="Backbone"),s.createDate??(s.createDate=null),t.push(s)}return t}async function u(){const e=s.Func.find({package:"Bio",name:"getMonomerLibHelper"});if(0===e.length)throw new Error('Package "Bio" must be installed for MonomerLibHelper.');return(await e[0].prepare().call()).getOutputParamValue()}async function h(e,t){e instanceof s.Column&&(e=(0,l.R)(e).columns.toList());const n=(await u()).getBioLib(),r=new Array(e.length),o=e[0].length,c=new Float32Array(o);for(let l=0;l<e.length;++l){const u=l<t.length?t.getCanonical(l):a._S,h=n.getMonomer("PEPTIDE",u)?.smiles??"",d=e[l],m=d.getRawData(),p=d.categories,f=p.indexOf("");if(r[l]={categories:p,data:m,emptyIndex:f},void 0===u)continue;const g=s.Column.fromStrings("smiles",p.map((e=>n.getMonomer("PEPTIDE",e)?.smiles??""))),y=(s.DataFrame.fromColumns([g]),await i.chem.getSimilarities(g,h)),b=y?y.getRawData():null;for(let e=0;e<o;++e){const t=m[e];u!==a._S&&t!==f?c[e]+=b[t]:u===a._S&&t===f&&(c[e]+=1)}}for(let n=0;n<c.length;++n){let i=c[n]/t.length;for(let o=0;o<e.length;++o){const e=r[o];if(o>=t.length&&e.data[n]!==e.emptyIndex||e.data[n]===e.emptyIndex&&o<t.length){i=s.FLOAT_NULL;break}}c[n]=i}return s.Column.fromFloat32Array("Similarity",c)}async function d(e){const t=(await u()).getBioLib(),n=[],r={},o=e.map((e=>t.getMonomer("PEPTIDE",e)?.smiles??"")),a=s.Column.fromStrings("smiles",o);for(let t=0;t<o.length;++t){r[e[t]]=t;const s=o[t],l=""===s?new Array(o.length).fill(0):(await i.chem.getSimilarities(a,s)).getRawData();l[t]=1,n[t]=Array.from(l)}return{scoringMatrix:n,alphabetIndexes:r}}async function m(e,t="Morgan"){const n=(await u()).getBioLib(),i=new Array(e.length).fill(0).map((()=>new Array(e.length).fill(0))),o={},a=e.map((e=>n.getMonomer("PEPTIDE",e)?.smiles??"")),l=s.Func.find({package:"Chem",name:"getFingerprints"})[0];if(!l)return console.warn('Function "Chem:getFingerprints" is not found in chem package. falling back to Morgan fingerprints'),await d(e);const c=s.Column.fromStrings("smiles",a),h=(s.DataFrame.fromColumns([c]),(await l.apply({col:c,fingerprintType:t}))?.entries);if(!h)return console.warn(`${t} Fingerprints could not be calculated for monomers from chem package.\n falling back to Morgan fingerprints`),await d(e);for(let t=0;t<h.length;++t)if(i[t][t]=1,o[e[t]]=t,h[t])for(let e=t+1;e<h.length;++e)h[e]&&(i[t][e]=i[e][t]=(0,r.$1)(h[t],h[e]));return{scoringMatrix:i,alphabetIndexes:o}}},7384:(e,t,n)=>{"use strict";n.d(t,{C4:()=>d});var s=n(4328),i=n(6082),r=n(1991),o=n.n(r),a=n(439),l=n(826);const c={V2K_RGP_SHIFT:8,V2K_RGP_LINE:"M RGP",V2K_A_LINE:"A ",V3K_COUNTS_SHIFT:14,V3K_IDX_SHIFT:7,V3K_HEADER_FIRST_LINE:"\nDatagrok macromolecule handler\n\n",V3K_HEADER_SECOND_LINE:" 0 0 0 0 0 0 999 V3000\n",V3K_BEGIN_CTAB_BLOCK:"M V30 BEGIN CTAB\n",V3K_END_CTAB_BLOCK:"M V30 END CTAB\n",V3K_BEGIN_COUNTS_LINE:"M V30 COUNTS ",V3K_COUNTS_LINE_ENDING:" 0 0 0\n",V3K_BEGIN_ATOM_BLOCK:"M V30 BEGIN ATOM\n",V3K_END_ATOM_BLOCK:"M V30 END ATOM\n",V3K_BEGIN_BOND_BLOCK:"M V30 BEGIN BOND\n",V3K_END_BOND_BLOCK:"M V30 END BOND\n",V3K_BOND_CONFIG:" CFG=",V3K_BEGIN_DATA_LINE:"M V30 ",V3K_END:"M END",PRECISION_FACTOR:1e4,DEOXYRIBOSE:"d",RIBOSE:"r",PHOSPHATE:"p",OXYGEN:"O",HYDROGEN:"H"};var u=n(3151);function h(e){return Math.round(c.PRECISION_FACTOR*e)/c.PRECISION_FACTOR}async function d(e,t,r){if(0===i.Func.find({package:"Chem",name:"getRdKitModule"}).length)return{col:null,warnings:['Transformation to atomic level requires the package "Chem" installed.']};if(t.semType!==i.SEMTYPE.MACROMOLECULE)return{col:null,warnings:[`Only the ${i.SEMTYPE.MACROMOLECULE} columns can be converted to atomic level, the chosen column has semType '${t.semType}'`]};let h=t;const d=l.GO.forColumn(t);d.isHelm()&&(h=d.convert(a.Hi.SEPARATOR,"."),h.name=t.name);const p=l.GO.forColumn(h).alphabet;let f;if(p===a.YI.PT||p===a.YI.UN)f="PEPTIDE";else{if(p!==a.YI.RNA&&p!==a.YI.DNA)return{col:null,warnings:[`Unexpected column's '${h.name}' alphabet '${p}'.`]};f="RNA"}const g=function(e){const t=e.length,n=new Array(t),i=l.GO.forColumn(e);let r=!1;for(let e=0;e<t;++e){const t=i.getSplitted(e);r||(r=0===t.length),n[e]=o()(t.canonicals).filter((e=>!i.isGap(e))).map((e=>e)).toArray()}return r&&s.shell.warning(`Some values in the "${e.name}" column are empty`),n}(h),y=await async function(e,t,n,i){const r=function(e,t,n){const s=new Map;for(const i of e.getMonomerSymbolsByType(t)){const r=e.getMonomer(t,i);if("RNA"===t&&("Branch"===r.monomerType||n===a.YI.DNA&&r.symbol===c.DEOXYRIBOSE||n===a.YI.RNA&&r.symbol===c.RIBOSE||r.symbol===c.PHOSPHATE)||"PEPTIDE"===t&&"Branch"!==r.monomerType){const e={};u.f6.forEach((t=>{e[t]=r[t]})),s.set(r.symbol,e)}}return s}(t,n,i),o=new Map,l=await s.functions.call("Chem:getRdKitModule"),h={value:null};if("RNA"===n){const e=i===a.YI.RNA?[c.RIBOSE,c.PHOSPHATE]:[c.DEOXYRIBOSE,c.PHOSPHATE];for(const t of e)m(o,t,r,l,n,h)}for(let t=0;t<e.length;++t){const s=e[t];for(const e of s)if(""!==e)try{m(o,e,r,l,n,h)}catch(t){const n=t instanceof Error?t.message:t.toString(),s=t instanceof Error?t.stack:void 0;throw console.error(`bio lib: getMonomersDictFromLib() sym='${e}', error:\n${n}\n${s}`),new Error(`Can't get monomer '${e}' from library: ${n}`)}}return o}(g,r,f,p),b=h.length,{molfileList:v,molfileWarningList:w}=await async function(e,t,s,i,r){const o=Math.max(navigator.hardwareConcurrency-2,1),a=new Array(o).fill(null).map((()=>new Worker(new URL(n.p+n.u(248),n.b)))),l=r/o;let c=[],u=[];const h=new Array(o);for(let n=0;n<o;n++){const c=Math.floor(n*l),u=n===o-1?r:Math.floor((n+1)*l);a[n].postMessage({monomerSequencesArray:e,monomersDict:t,alphabet:s,polymerType:i,start:c,end:u}),h[n]=new Promise((e=>{a[n].onmessage=({data:{molfileList:t,molfileWarningList:n}})=>{e({molfileList:t,molfileWarningList:n})}}))}return(await Promise.all(h)).forEach((e=>{c=c.concat(...e.molfileList),u=u.concat(...e.molfileWarningList)})),setTimeout((()=>{a.forEach((e=>{e.terminate()}))}),0),{molfileList:c,molfileWarningList:u}}(g,y,p,f,b);if(w.length>.05*b)throw new Error("Too many errors getting molfiles.");const C=`molfile(${h.name})`,A=e.columns.getUnusedName(C),S=i.Column.fromStrings(A,v);return S.semType=i.SEMTYPE.MOLECULE,S.meta.units=i.UNITS.Molecule.MOLBLOCK,{col:S,warnings:w}}function m(e,t,n,s,i,r){if(!e.has(t)){const o=function(e,t,n,s,i){if(t.has(e)){const o=t.get(e),a=function(e){const t=[];for(const n of e){let e=n.capGroupSmiles;e||(e=n.capGroupSMILES),e=e.replace(/(\[|\]|\*|:|\d)/g,""),t.push(e)}return t}(o.rgroups),l=(r=o.molfile).includes("V3000")?function(e){const t=new Map,n=/M V30 (\d+) R#.+RGROUPS=\((\d+) (\d+)\).*/gm;let s;for(;null!==(s=n.exec(e));)s.index===n.lastIndex&&n.lastIndex++,t.set(parseInt(s[1]),parseInt(s[3]));return t}(r):function(e){const t=new Map;let n=e.indexOf(c.V2K_A_LINE,0),s=n;for(;-1!==n;){s=e.indexOf("\n",n);const i=parseInt(e.substring(n,s).replace(/^A\s+/,""));n=e.indexOf("R",s),s=e.indexOf("\n",n);const r=parseInt(e.substring(n,s).replace(/^R/,""));t.set(i,r),n=e.indexOf(c.V2K_A_LINE,s)}for(n=e.indexOf(c.V2K_RGP_LINE,0),s=e.indexOf("\n",n);-1!==n;){n+=c.V2K_RGP_SHIFT,s=e.indexOf("\n",n);const i=e.substring(n,s).replaceAll(/\s+/g," ").split(" ").map((e=>parseInt(e))).slice(1);for(let e=0;e<i.length;e+=2){if(t.has(i[e])&&t.get(i[e])!==i[e+1])throw new Error(`r-group index ${i[e]} has already been added with a different value`);t.set(i[e],i[e+1])}n=e.indexOf(c.V2K_RGP_LINE,s)}return t}(r),u=o.molfile.includes("V3000")?o.molfile:function(e,t){const n=t.get_mol(e),s=n.get_v3Kmolblock();return n.delete(),s}(function(e){let t=e.indexOf(c.V2K_A_LINE,0);-1===t&&(t=e.indexOf(c.V2K_RGP_LINE));const n=e.indexOf(c.V3K_END,t);return e.substring(0,t)+e.substring(n)}(o.molfile),n),d=function(e){let t=(e=e.replaceAll("\r","")).indexOf(c.V3K_BEGIN_COUNTS_LINE)+c.V3K_COUNTS_SHIFT,n=e.indexOf(" ",t+1);const s=parseInt(e.substring(t,n));return t=n+1,n=e.indexOf(" ",t+1),{atomCount:s,bondCount:parseInt(e.substring(t,n))}}(u),m=function(e,t){const n=new Array(t),s=new Float32Array(t),i=new Float32Array(t),r=new Array(t);let o=e.indexOf(c.V3K_BEGIN_ATOM_BLOCK);o=e.indexOf("\n",o);let a=o;for(let l=0;l<t;l++){o=e.indexOf(c.V3K_BEGIN_DATA_LINE,o)+c.V3K_IDX_SHIFT,a=e.indexOf(" ",o),o=a+1,a=e.indexOf(" ",o),n[l]=e.substring(o,a);const t=new Array(2);for(let n=0;n<2;++n)o=a+1,a=e.indexOf(" ",o),t[n]=parseFloat(e.substring(o,a));s[l]=t[0],i[l]=t[1],o=a,a=e.indexOf("\n",o)+1,r[l]=e.slice(o,a),o=a}return{atomTypes:n,x:s,y:i,kwargs:r}}(u,d.atomCount),g=function(e,t){const n=new Uint32Array(t),s=new Array(t),i=new Map,r=new Map;let o=e.indexOf(c.V3K_BEGIN_BOND_BLOCK);o=e.indexOf("\n",o);let a=o;for(let l=0;l<t;++l){const t=new Array(3);o=e.indexOf(c.V3K_BEGIN_DATA_LINE,a)+c.V3K_IDX_SHIFT,a=e.indexOf(" ",o);for(let n=0;n<3;++n)o=a+1,a=Math.min(e.indexOf("\n",o),e.indexOf(" ",o)),t[n]=parseInt(e.slice(o,a));n[l]=t[0],s[l]=t.slice(1);const u=e.indexOf("\n",o);let h=e.slice(a,u),d=h.indexOf(c.V3K_BOND_CONFIG);if(-1!==d){d=h.indexOf("=",d)+1;let e=h.indexOf(" ",d);-1===e&&(e=h.length);const t=parseInt(h.slice(d,e));i.set(l,t);const n=c.V3K_BOND_CONFIG+t.toString();h=h.replace(n,"")}h||r.set(l,h)}return{bondTypes:n,atomPairs:s,bondConfiguration:i,kwargs:r}}(u,d.bondCount),b=function(e,t,n,s){const i={backboneShift:null,branchShift:null,terminalNodes:[],rNodes:[]};return function(e,t,n){for(const[s,i]of n)e.atomTypes[s-1]=t[i-1]}(e,n,s),function(e,t){t.rNodes=Array.from(e.keys());for(let n=0;n<t.rNodes.length;n++)for(const s of[1,2])if(e.get(t.rNodes[n])===s){const e=t.rNodes[s-1];t.rNodes[s-1]=t.rNodes[n],t.rNodes[n]=e}}(s,i),p(t,i),i}(m,g,a,l),S=function(e){let t=[],n=e.indexOf("M V30 MDLV30/STEABS ATOMS=(");for(;-1!==n;){n+=28;const s=e.indexOf(")",n);t=t.concat(e.substring(n,s).split(" ").slice(1).map((e=>parseInt(e)))),n=s,n=e.indexOf("M V30 MDLV30/STEABS ATOMS=(",n)}return t}(u),x={atoms:m,bonds:g,meta:b,stereoAtoms:S};return"PEPTIDE"===s?function(e){const t=e.meta.terminalNodes[0]-1,n=e.meta.rNodes[0]-1,s=e.atoms.x,i=e.atoms.y;A(e,-s[t],-i[t]);const r=v(s[n],i[n]);w(e.atoms,-r),s[e.meta.rNodes[1]-1]<0&&function(e){C(e,!1)}(e);const o=function(e){const t=function(e){const t=new Map;for(const n of e.bonds.atomPairs)for(let e=0;e<2;e++){const s=n[e],i=n[(e+1)%2];t.has(s)?t.get(s)?.push(i):t.set(s,new Array(1).fill(i))}return t}(e);let n=0;const s=e.atoms.atomTypes.length;let i=0;for(;0===n;){const r=t.get(e.meta.terminalNodes[1])[i];if(e.atoms.atomTypes[r-1]===c.OXYGEN&&r!==e.meta.rNodes[1]&&(n=r),i++,i>s)throw new Error(`Search for double-bonded Oxygen in ${e} has exceeded the limit of ${s}`)}return n}(e);!function(e,t){e.atoms.y[e.meta.rNodes[1]-1]<0&&e.atoms.y[t-1]<0&&(function(e){C(e,!0)}(e),w(e.atoms,-function(e,t){return v(e,t)+Math.PI/2}(e.atoms.x[e.meta.terminalNodes[1]-1],e.atoms.y[e.meta.terminalNodes[1]-1])))}(e,o),function(e,t){const n=e.atoms.x;n[e.meta.rNodes[1]-1]>n[t-1]&&function(e,t,n){const s=t-1,i=n-1,r=e.atoms.x,o=e.atoms.y,a=r[s],l=o[s];r[s]=r[i],o[s]=o[i],r[i]=a,o[i]=l}(e,t,e.meta.rNodes[1])}(e,o)}(x):e===c.RIBOSE||e===c.DEOXYRIBOSE?function(e,t){const n=e.atoms.x,s=e.atoms.y;let i=e.meta.terminalNodes[0]-1;const r=e.meta.rNodes[1]-1;A(e,-n[i],-s[i]);const o=v(n[r],s[r]);w(e.atoms,3*Math.PI/2-o),t.value=function(e){const t=e.atoms.x,n=e.atoms.y,s=e.meta.rNodes[2]-1,i=e.meta.terminalNodes[2]-1,r=t[s]-t[i],o=n[s]-n[i];return Math.atan(o/r)+Math.PI/2}(e),i=e.meta.terminalNodes[0]-1,A(e,-n[i],-s[i])}(x,i):e===c.PHOSPHATE?function(e){const t=e.meta.terminalNodes[0]-1,n=e.meta.rNodes[0]-1,s=e.atoms.x,i=e.atoms.y;A(e,-s[t],-i[t]);const r=v(s[n],i[n]);w(e.atoms,Math.PI/2-r)}(x):function(e,t){const n=e.atoms.x,s=e.atoms.y,i=e.meta.terminalNodes[0]-1,r=e.meta.rNodes[0]-1;A(e,-n[i],-s[i]);const o=v(n[r],s[r]),a=t.value;if(!a)throw new Error("The value of sugarBranchToOYAngle is null");w(e.atoms,Math.PI-o+a);const l=function(e,t){return h(Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2))}({x:n[e.meta.rNodes[0]-1],y:s[e.meta.rNodes[0]-1]},{x:n[e.meta.terminalNodes[0]-1],y:s[e.meta.terminalNodes[0]-1]});if(1!=l)for(let e=0;e<n.length;++e)n[e]=h(n[e]/l),s[e]=h(s[e]/l)}(x,i),function(e,t,n){"PEPTIDE"===e?(f(t,e),y(t,t.meta.rNodes[1])):n===c.RIBOSE||n===c.DEOXYRIBOSE?(y(t,t.meta.rNodes[1]),t.meta.rNodes[1]=t.meta.terminalNodes[1],p(t.bonds,t.meta),f(t,e),y(t,t.meta.rNodes[1]),y(t,t.meta.rNodes[0]),y(t,t.meta.rNodes[2])):n===c.PHOSPHATE&&(t.meta.terminalNodes[0]=t.meta.rNodes[0],A(t,-t.atoms.x[t.meta.terminalNodes[0]-1],-t.atoms.y[t.meta.terminalNodes[0]-1]),f(t,e),y(t,t.meta.rNodes[1]))}(s,x,e),function(e){let t=0;for(;t<e.atoms.atomTypes.length;)e.atoms.atomTypes[t]===c.HYDROGEN&&(y(e,t+1),--t),++t}(x),x}var r;return null}(t,n,s,i,r);if(!o)throw new Error(`Monomer with symbol '${t}' is absent the monomer library`);e.set(t,o)}}function p(e,t){const n=t.rNodes;t.terminalNodes=new Array(n.length).fill(0);const s=t.terminalNodes,i=e.atomPairs;let r=0,o=0;for(;r<i.length&&o<s.length;){for(let e=0;e<s.length;++e)for(let t=0;t<2;++t)i[r][t]===n[e]&&(s[e]=i[r][(t+1)%2],n.length,++o);++r}}function f(e,t){e.meta.rNodes.length>1&&(e.meta.backboneShift=g(e,e.meta.rNodes[1]-1,e.meta.terminalNodes[0]-1)),"RNA"===t&&e.meta.rNodes.length>2&&(e.meta.branchShift=g(e,e.meta.rNodes[2]-1,e.meta.terminalNodes[0]-1))}function g(e,t,n){return[h(e.atoms.x[t]-e.atoms.x[n]),h(e.atoms.y[t]-e.atoms.y[n])]}function y(e,t){if(void 0!==t){const n=t-1,s=e.atoms,i=e.bonds,r=e.meta;s.atomTypes.splice(n,1),s.x=b(Float32Array,s.x,n,1),s.y=b(Float32Array,s.y,n,1),s.kwargs.splice(n,1);for(let e=0;e<r.terminalNodes.length;++e)r.terminalNodes[e]>t?--r.terminalNodes[e]:r.terminalNodes[e]===t&&(r.terminalNodes[e]=-1);for(let e=0;e<r.rNodes.length;++e)r.rNodes[e]>t?--r.rNodes[e]:r.rNodes[e]===t&&(r.rNodes[e]=-1);let o=0;for(;o<i.atomPairs.length;){const e=i.atomPairs[o][0],n=i.atomPairs[o][1];e===t||n===t?(i.atomPairs.splice(o,1),i.bondTypes=b(Uint32Array,i.bondTypes,o,1),i.bondConfiguration.has(o)&&i.bondConfiguration.delete(o),i.kwargs.has(o)&&i.kwargs.delete(o),--o):(i.atomPairs[o][0]=e>t?e-1:e,i.atomPairs[o][1]=n>t?n-1:n),++o}let a=Array.from(i.bondConfiguration.keys());a.forEach((e=>{if(i.bondConfiguration.has(e)&&e>n){const t=i.bondConfiguration.get(e);i.bondConfiguration.delete(e),i.bondConfiguration.set(e-1,t)}})),a=Array.from(i.kwargs.keys()),a.forEach((e=>{if(i.kwargs.has(e)&&e>n){const t=i.kwargs.get(e);i.kwargs.delete(e),i.kwargs.set(e-1,t)}}))}}function b(e,t,n,s){const i=new e(t.length-s);let r=0,o=0;for(;r<t.length;)r===n&&(r+=s),i[o]=t[r],++o,++r;return i}function v(e,t){let n;if(0===e)n=t>0?0:Math.PI;else if(0===t)n=e>0?-Math.PI/2:Math.PI/2;else{const s=t/e,i=Math.atan(s);n=e<0?Math.PI/2+i:-Math.PI/2+i}return n}function w(e,t){if(0!==t){const n=e.x,s=e.y,i=Math.cos(t),r=Math.sin(t);for(let e=0;e<n.length;++e){const t=n[e];n[e]=h(t*i-s[e]*r),s[e]=h(t*r+s[e]*i)}}}function C(e,t){if(t){const t=e.atoms.y;for(let e=0;e<t.length;e++)t[e]=-t[e]}else{const t=e.atoms.x;for(let e=0;e<t.length;e++)t[e]=-t[e]}const n=e.bonds.bondConfiguration;for(const[e,t]of n){const s=1===t?3:1;n.set(e,s)}}function A(e,t,n){const s=e.atoms.x,i=e.atoms.y;for(let e=0;e<s.length;++e)s[e]=h(s[e]+t),void 0!==n&&(i[e]=h(i[e]+n))}},1093:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var s=n(7362);class i extends s.e{static get Chromatogram(){return void 0===this.chromatogram&&(this.chromatogram=new i({A:"green",C:"blue",G:"black",T:"red",U:"red",others:"gray"})),this.chromatogram}}class r{}r.SemType="Nucleotides",r.SemTypeMultipleAlignment="NucleotidesMultipleAlignment",r.Names={A:"Adenine",C:"Cytosine",G:"Guanine",T:"Thymine",U:"Uracil"}},7362:(e,t,n)=>{"use strict";n.d(t,{e:()=>s});class s{static makePalette(e,t=!1,n=s){const i={};return e.forEach((e=>{const n=e[0],s=e[1];n.forEach(((e,n)=>{i[e]=this.colourPalette[s][t?0:n]}))})),new n(i)}constructor(e){this._palette=e}get(e){return this._palette[e]}}s.undefinedColor="rgb(100,100,100)",s.colourPalette={orange:["rgb(255,187,120)","rgb(245,167,100)","rgb(235,137,70)","rgb(205, 111, 71)"],all_green:["rgb(44,160,44)","rgb(74,160,74)","rgb(23,103,57)","rgb(30,110,96)","rgb(60,131,95)","rgb(24,110,79)","rgb(152,223,138)","rgb(182, 223, 138)","rgb(152, 193, 138)"],all_blue:["rgb(31,119,180)","rgb(23,190,207)","rgb(122, 102, 189)","rgb(158,218,229)","rgb(141, 124, 217)","rgb(31, 120, 150)"],magenta:["rgb(162,106,192)","rgb(197,165,224)","rgb(208,113,218)"],red:["rgb(214,39,40)","rgb(255,152,150)"],st_blue:["rgb(23,190,207)","rgb(158,218,229)","rgb(31,119,180)"],dark_blue:["rgb(31,119,180)","rgb(31, 120, 150)"],light_blue:["rgb(23,190,207)","rgb(158,218,229)","rgb(108, 218, 229)","rgb(23,190,227)"],lilac_blue:["rgb(124,102,211)","rgb(149,134,217)","rgb(97, 81, 150)"],dark_green:["rgb(23,103,57)","rgb(30,110,96)","rgb(60,131,95)","rgb(24,110,79)"],green:["rgb(44,160,44)","rgb(74,160,74)"],light_green:["rgb(152,223,138)","rgb(182, 223, 138)","rgb(152, 193, 138)"],st_green:["rgb(44,160,44)","rgb(152,223,138)","rgb(39, 174, 96)","rgb(74,160,74)"],pink:["rgb(247,182,210)"],brown:["rgb(140,86,75)","rgb(102, 62, 54)"],gray:["rgb(127,127,127)","rgb(199,199,199)","rgb(196,156,148)","rgb(222, 222, 180)"],yellow:["rgb(188,189,34)"],white:["rgb(230,230,230)"]}},4152:(e,t,n)=>{"use strict";n.d(t,{oT:()=>c});var s=n(6082),i=n(7362);class r{static hashCode(e){let t=0;if(0===e.length)return t;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}}class o{}class a extends o{get(e){return"#666666"}}class l extends o{static buildPalette(){return[].concat(...Object.values(i.e.colourPalette))}get(e){const t=r.hashCode(e)%l.palette.length;return function(e){if(null==e)return"rgb(100,100,100)";const t=s.Color.fromHtml(e),n=s.Color.g(t),i=s.Color.r(t),r=s.Color.b(t),o=Math.sqrt(Math.pow(0-i,2)+Math.pow(0-n,2)+Math.pow(0-r,2));return o>210?`rgb(${i/o*210},${n/o*210},${r/o*210})`:s.Color.toRgb(t)}(l.palette[t])}}l.palette=l.buildPalette();class c extends i.e{static get Gray(){return void 0===this.gray&&(this.gray=new a),this.gray}static get Color(){return void 0===this.color&&(this.color=new l),this.color}}},6642:(e,t,n)=>{"use strict";n.d(t,{h:()=>o,s:()=>a});var s=n(4328),i=n(1858),r=n(8070);function o(e){let t=null,n=null;try{n=e.dart?e.gridColumn:null,t=n?n.temp:null}catch{[n,t]=[null,null]}const s=e.cell.column;if(t=t??s.temp,!t)throw new Error("Grid cell renderer back store (GridColumn or Column) not found.");return[n,s,t]}class a{constructor(e,t,n){this.gridCol=e,this.tableCol=t,this.logger=n,this.subs=[],this.destroyed=!1,this.viewerId=++a.viewerCounter,this.errors=[],this._onRendered=new i.Subject,this.reset(),this.tableCol&&this.tableCol.dataFrame&&this.subs.push(this.tableCol.dataFrame.onDataChanged.subscribe((()=>{try{this.reset()}catch(e){this.logger.error(e)}}))),this.tableCol&&this.subs.push(s.events.onTableRemoved.subscribe((e=>{try{const t=e.args.dataFrame;this.tableCol?.dataFrame.id!==t.id||this.destroyed||this.destroy()}catch(e){this.logger.error(e)}}))),this.gridCol&&this.subs.push(s.events.onViewRemoving.subscribe((e=>{try{const t=e.args.view;this.gridCol?.dart&&this.gridCol.grid&&this.gridCol?.grid?.dart&&this.gridCol?.grid?.view?.id===t.id&&!this.destroyed&&this.destroy()}catch(e){this.logger.error(e)}})))}toLog(){return`${this.constructor.name}<${this.viewerId}>`}destroy(){for(const e of this.subs)e.unsubscribe();this.destroyed=!0}invalidateGrid(){this.gridCol&&this.gridCol.dart&&this.gridCol.grid?.invalidate()}get onRendered(){return this._onRendered}invalidate(e){this.invalidateGrid()}async awaitRendered(e=1e4,t=`${e} timeout`){const n=`${this.toLog()}.awaitRendered()`;if(this.logger.debug(`${n}, start, testEvent before`),await(0,r.PE)(this._onRendered,(()=>{}),(()=>{this.invalidate()}),e,`${n}, ${t}`),this.errors.length>0){const e=this.errors[0];throw this.errors=[],e}this.logger.debug(`${n}, end`)}}a.viewerCounter=-1},6882:(e,t,n)=>{"use strict";n.d(t,{J:()=>c});var s=n(6082),i=n(1991),r=n.n(i),o=n(826),a=n(6642),l=n(6718);class c extends a.s{constructor(e,t,n,i,r){super(e,t,n),this.monomerLengthLimit=i,this.propsProvider=r,this.colWidth=0,this._monomerLengthList=null,this.separatorWidth=5,this._processedMaxVisibleSeqLength=0,this._monomerLengthMap={},this._monomerStructureMap={},this.props=this.propsProvider(),this._processedRows=s.BitSet.create(this.tableCol.length),this.gridCol&&this.subs.push(this.gridCol.grid.onAfterDrawContent.subscribe((()=>{this._onRendered.next()}))),(0,l.pj)().then((e=>{if(this.destroyed)return;const t=e.getBioLib();this.subs.push(t.onChanged.subscribe((()=>{this.reset(),this.gridCol?.grid?.invalidate()})))}))}reset(){this.propsProvider&&(this.props=this.propsProvider()),this._processedRows=s.BitSet.create(this.tableCol.length),this._monomerLengthList=null,this._monomerLengthMap={},this._monomerStructureMap={}}getCellMonomerLengths(e,t){this.colWidth<t&&(this.colWidth=t,this.reset());const n=this.props.seqHandler.isMsa()?this.getCellMonomerLengthsForSeqMsa():this.getCellMonomerLengthsForSeq(e),s=new Array(n.length+1);s[0]=5;for(let e=1;e<s.length;e++)s[e]=s[e-1]+n[e-1];return[n,s]}getCellMonomerLengthsForSeq(e){this.toLog(),null===this._monomerLengthList&&(this._monomerLengthList=new Array(this.tableCol.length).fill(null));const t=this.props.separatorWidth+1*this.props.monomerCharWidth,n=Math.ceil(this.colWidth/t),s=o.GO.forColumn(this.tableCol).getSplitted(e).originals,i=Math.min(n,s.length);let r=this._monomerLengthList[e];if(null===r||r.length<i){r=this._monomerLengthList[e]=new Array(s.length);let t=0;for(let e=0;e<i;++e){const n=s[e],i=this.props.monomerToShort(n,this.monomerLengthLimit),o=(this.props.seqHandler.isSeparator()?this.separatorWidth:this.props.separatorWidth)+i.length*this.props.monomerCharWidth;if(r[e]=o,t+=o,t>this.colWidth)break}}return r}getCellMonomerLengthsForSeqMsa(){var e;this.toLog(),null===this._monomerLengthList&&(this._monomerLengthList=new Array(1).fill(null)),(e=this._monomerLengthList)[0]??(e[0]=new Array(0));const t=this._monomerLengthList[0],{startIdx:n,endIdx:s}=(()=>{try{const e=this.gridCol&&this.gridCol.dart?this.gridCol.grid:null;return e&&e.dart?{startIdx:Math.max(Math.floor((e?.vertScroll.min??0)-10),0),endIdx:Math.min(Math.ceil((e?.vertScroll.max??0)+10),this.tableCol.length)}:{startIdx:0,endIdx:Math.min(this.tableCol.length,10)}}catch(e){return{startIdx:0,endIdx:Math.min(this.tableCol.length,10)}}})(),i=this.props.separatorWidth+1*this.props.monomerCharWidth,r=Math.ceil(this.colWidth/i);for(let e=n;e<s;e++){if(this._processedRows.get(e)&&r<=this._processedMaxVisibleSeqLength)continue;const n=o.GO.forColumn(this.tableCol).getSplitted(e,r).originals,s=Math.min(r,n.length);s>t.length&&t.push(...new Array(s-t.length).fill(i));let a=0;for(let e=0;e<s;++e){const s=n[e],i=this.props.monomerToShort(s,this.monomerLengthLimit),r=this.props.separatorWidth+i.length*this.props.monomerCharWidth;if(t[e]=Math.max(t[e]??0,r),a+=r,a>=this.colWidth)break}this._processedMaxVisibleSeqLength=Math.max(this._processedMaxVisibleSeqLength,r)}return t}getPosition(e,t,n){const[s,i]=this.getCellMonomerLengths(e,n),a=o.GO.forColumn(this.tableCol);return 0===r()(a.getSplitted(e).originals).toArray().length?null:function(e,t){let n,s=100,i=0,r=e.length-1;for(;i<=r;){if(n=Math.floor((r+i)/2),e[n]<=t&&t<e[n+1])return n;if(t<e[n]?r=n-1:i=n+1,--s<=0)throw new Error(`Get position for pointer x = ${t} searching has not converged on ${JSON.stringify(e)}. `)}return null}(i,t)}setMonomerLengthLimit(e){this.monomerLengthLimit=e,this.reset()}setSeparatorWidth(e){this.props.separatorWidth=e,this.reset()}isMsa(){return this.props.seqHandler.isMsa()}}},3151:(e,t,n)=>{"use strict";n.d(t,{EK:()=>a,Ec:()=>r,f6:()=>s,q7:()=>o,yw:()=>i});const s=["symbol","molfile","rgroups","name"],i="MonomerName",r={monomerType:null,smiles:null,name:"Name",author:null,molfile:"molecule",naturalAnalog:"MonomerNaturalAnalogCode",rgroups:"MonomerCaps",createDate:null,id:null,polymerType:"MonomerType",symbol:"MonomerName"},o="p",a=new RegExp(`[rd]\\((\\w)\\)${o}?`,"g")},9192:(e,t,n)=>{"use strict";function s(e){return"string"==typeof e||e instanceof String?e:"StateError"===e.constructor.name?e.message:"StateError"===e.constructor.name&&"$thrownJsError"in e?s(e.$thrownJsError):e instanceof Error?e.message:e.toString()}function i(e){return e instanceof Error?e.stack:"StateError"===e.constructor.name&&"$thrownJsError"in e?i(e.$thrownJsError):void 0}function r(e){return[s(e),i(e)]}n.d(t,{AP:()=>r})},3516:(e,t,n)=>{"use strict";n.d(t,{m:()=>o});var s=n(6082),i=n(826),r=n(439);class o{get descriptionsArray(){return this._descriptionsArray}get sequencesArray(){return this._sequencesArray}parseMacromolecule(e,t){return this._fileContent.slice(e,t).split(/\s/).join("")}parseColumns(){const e=/^>(.*)$/gm;let t,n=0;for(;t=e.exec(this._fileContent);){const s=this._fileContent.substring(t.index+1,e.lastIndex);this._descriptionsArray.push(s),0!==n&&this._sequencesArray.push(this.parseMacromolecule(n,t.index)),n=e.lastIndex+1}this._sequencesArray.push(this.parseMacromolecule(n,-1))}importFasta(){const e=s.Column.fromStrings("description",this.descriptionsArray),t=s.Column.fromStrings("sequence",this.sequencesArray);return t.semType=s.SEMTYPE.MACROMOLECULE,t.meta.units=r.Hi.FASTA,i.GO.forColumn(t),[s.DataFrame.fromColumns([e,t])]}constructor(e){this._descriptionsArray=[],this._sequencesArray=[],this._fileContent=e,this.parseColumns()}}},6873:(e,t,n)=>{"use strict";n.d(t,{Hx:()=>u,dW:()=>c});var s=n(6082),i=n(1991),r=n.n(i),o=n(2003),a=n(826),l=n(9322);function c(e=10**5){const t="meI/hHis/Aca/N//dE/Thr_PO3H2/Aca/D-Tyr_Et/Tyr_ab-dehydroMe".repeat(Math.ceil(e/10)).slice(0,-1),n=s.Column.fromList(s.COLUMN_TYPE.STRING,"MSA",new Array(100).fill(t));n.semType=s.SEMTYPE.MACROMOLECULE,n.meta.units=o.Hi.SEPARATOR,n.setTag(o.gp.separator,"/"),n.setTag(o.gp.alphabet,o.YI.UN),n.setTag(o.gp.alphabetIsMultichar,"true");const i=[];return i.push(n),i.push(s.Column.fromList(s.COLUMN_TYPE.FLOAT,"Activity",new Array(100).fill(7.30751))),i}function u(e=o.Hi.SEPARATOR,t=o.YI.PT,n=(e===o.Hi.SEPARATOR?"-":void 0),i=void 0,c="seq",u=100,h=10**6){const d=t===o.YI.UN?i?.getMonomerSymbolsByType("PEPTIDE")??[]:Array.from((0,o.Qf)(t)),m=d.length,p=s.Column.fromType(s.COLUMN_TYPE.STRING,c,u);p.semType=s.SEMTYPE.MACROMOLECULE,p.meta.units=e,p.setTag(o.gp.alphabet,t),e==o.Hi.SEPARATOR&&p.setTag(o.gp.separator,n);const f=a.GO.forColumn(p);for(let t=0;t<u;t++){const n=r().count(0).take(h).map((e=>d[Math.floor(Math.random()*m)])).toArray(),s=f.joiner(new l.Mu(n,a.b9[e]));p.set(t,s)}return p}},439:(e,t,n)=>{"use strict";n.d(t,{B5:()=>l,Hi:()=>s,Vl:()=>c,YI:()=>i,gp:()=>r,q7:()=>u,z1:()=>a});var s,i,r,o=n(2738);!function(e){e.FASTA="fasta",e.SEPARATOR="separator",e.HELM="helm"}(s||(s={})),function(e){e.DNA="DNA",e.RNA="RNA",e.PT="PT",e.UN="UN"}(i||(i={})),function(e){e.aligned="aligned",e.alphabet="alphabet",e.alphabetSize=".alphabetSize",e.alphabetIsMultichar=".alphabetIsMultichar",e.separator="separator",e.isHelmCompatible=".isHelmCompatible",e.positionNames=".positionNames",e.positionLabels=".positionLabels",e.regions=".regions"}(r||(r={}));const a=", ",l=/(?:\[([A-Za-z0-9_\-,()]+)\])|([A-Za-z\-])/g,c=new class{constructor(){this.fasta={peptide:new Set(["G","L","Y","S","E","Q","D","N","F","A","K","R","H","C","V","P","W","I","M","T"]),dna:new Set(["A","C","G","T"]),rna:new Set(["A","C","G","U"])}}},u=[new o.aD(i.PT,c.fasta.peptide,.5),new o.aD(i.DNA,c.fasta.dna,.55),new o.aD(i.RNA,c.fasta.rna,.55)]},2003:(e,t,n)=>{"use strict";n.d(t,{Hi:()=>s.Hi,J9:()=>i.J9,Qf:()=>i.Qf,SM:()=>i.SM,YI:()=>s.YI,dh:()=>i.dh,gp:()=>s.gp,mn:()=>i.mn,ny:()=>i.ny,q7:()=>s.q7,qp:()=>i.qp,z1:()=>s.z1,zS:()=>i.zS});var s=n(439),i=n(9322)},2738:(e,t,n)=>{"use strict";n.d(t,{XN:()=>r,_S:()=>s,aD:()=>i});const s="";class i{constructor(e,t,n){this.name=e,this.alphabet=t,this.cutoff=n}}class r extends i{constructor(e,t,n){super(e.name,e.alphabet,e.cutoff),this.freq=t,this.similarity=n}}},9322:(e,t,n)=>{"use strict";n.d(t,{Mu:()=>p,pc:()=>_,Qf:()=>E,ny:()=>T,Iv:()=>A,dh:()=>b,zS:()=>x,SM:()=>I,mn:()=>M,J9:()=>g,tm:()=>y,qp:()=>C});var s=n(6082),i=n(1991),r=n.n(i),o=n(2738),a=n(439),l=n(826);class c extends Float32Array{}var u=n(3629),h=n(8924),d=n(1093),m=n(4152);class p{get length(){return this.mList.length}get canonicals(){return this.mList}get originals(){return this.mList}isGap(e){return this.getOriginal(e)===this.gapOriginalMonomer}getCanonical(e){if(this.length<=e)throw new Error("Index out of bounds");return this.mList[e]}getOriginal(e){if(this.length<=e)throw new Error("Index out of bounds");return this.mList[e]}constructor(e,t){this.mList=e,this.gapOriginalMonomer=t}}class f{get length(){return this.seqS.length}get canonicals(){return this.seqS}get originals(){return this.seqS}isGap(e){return this.getOriginal(e)===l.b9[a.Hi.FASTA]}getCanonical(e){if(this.length<=e)throw new Error("Index out of bounds");return this.isGap(e)?o._S:this.seqS[e]}getOriginal(e){if(this.length<=e)throw new Error("Index out of bounds");return this.seqS[e]}constructor(e){this.seqS=e}}const g=e=>{const t=r()(e.toString().matchAll(a.B5)).map((e=>e[2]??e[1])).toArray();return new p(t,l.b9[a.Hi.FASTA])},y=e=>e?new f(e):new p([],l.b9[a.Hi.FASTA]);function b(e,t=void 0){return n=>{if(n){let s;const i=new RegExp(String.raw`"-"|'-'|[^${e}]+`,"g");if(void 0!==t){i.lastIndex=0,s=new Array(Math.ceil(t));let e=null,r=0;for(;null!==(e=i.exec(n))&&r<t;)s[r++]=e[0].replace('"-"',"").replace("'-'","");s.splice(r)}else s=n.replaceAll('"-"',"").replaceAll("'-'","").split(e,t);return new p(s,l.b9[a.Hi.SEPARATOR])}return new p([],l.b9[a.Hi.SEPARATOR])}}const v=/(PEPTIDE1|DNA1|RNA1)\{([^}]+)}/g,w=/\[([^\[\]]+)]/g,C=e=>{v.lastIndex=0;const t=v.exec(e.toString()),n=t?t[2]:null,s=n?n.split("."):[];return new p(s.map((e=>{w.lastIndex=0;const t=w.exec(e);return t&&t.length>=2?t[1]:e})),l.b9[a.Hi.HELM])};function A(e,t,n=void 0){if(e.toLowerCase().startsWith(a.Hi.FASTA))return g;if(e.toLowerCase().startsWith(a.Hi.SEPARATOR))return b(t,n);if(e.toLowerCase().startsWith(a.Hi.HELM))return C;throw new Error(`Unexpected units ${e} .`)}const S=/([^\W_]+)/g;function x(e,t){if(e.length<=t)return e;const n=e.match(S),s=e.length>t||(n?.length??0)>1,i=n?.[0]??" ";return s?i.substring(0,t-1)+"…":i}function E(e){switch(e){case a.YI.DNA:return a.Vl.fasta.dna;case a.YI.RNA:return a.Vl.fasta.rna;case a.YI.PT:return a.Vl.fasta.peptide;default:throw new Error(`Unsupported alphabet '${e}'.`)}}function _(e,t,n="-"){const s=t.map((t=>{const s=function(e,t,n="-"){const s=new Set([...new Set(Object.keys(e)),...t]);s.delete(n);const i=[],r=[];for(const n of s)i.push(n in e?e[n]:0),r.push(t.has(n)?1:0);const o=new c(i),a=new c(r);return(0,u.KE)(o,a)/((0,u.wQ)(o)*(0,u.wQ)(a))}(e,t.alphabet,n);return new o.XN(t,e,s)}));let i;const r=Math.max(...s.map((e=>e.similarity>e.cutoff?e.similarity:-1)));return i=r>0?s.find((e=>e.similarity===r)).name:a.YI.UN,i}function I(e,t=5){let n;if(e.semType==s.SEMTYPE.MACROMOLECULE)n=l.GO.forColumn(e).alphabet;else{const s=function(e,t,n){const s=e.categories;return function(e,t){const n={};let s=!0,i=null;for(const r of e)if(null==i?i=r.length:r.length!==i&&(s=!1),r.length>=t)for(const e of r.canonicals)e in n||(n[e]=0),n[e]+=1;return{freq:n,sameLength:s}}(r().enumerate(e.getRawData()).map((([e,t])=>n(s[e]))),t)}(e,t,g);n=_(s.freq,a.q7)}return T(n)}function T(e){switch(e){case a.YI.PT:return h.X.GrokGroups;case a.YI.DNA:case a.YI.RNA:return d.A.Chromatogram;default:return m.oT.Color}}function M(e){const t=e.columns.bySemTypeAll(s.SEMTYPE.MACROMOLECULE);let n=t.find((e=>{const t=e.meta.units;return!!t&&-1!==t.indexOf("MSA")}))??null;return!n&&t.length>0&&(n=t[0]),n}},826:(e,t,n)=>{"use strict";n.d(t,{GO:()=>p,b9:()=>m,j8:()=>d});var s=n(6082),i=n(1991),r=n.n(i),o=n(2003),a=n(2738),l=n(9322),c=n(6863),u=n(6718),h=n(3151);const d=new class{constructor(){this.seqHandler="seq-handler",this.notationProvider="seq-handler.notation-provider"}},m={[o.Hi.FASTA]:"-",[o.Hi.SEPARATOR]:"",[o.Hi.HELM]:"*"};class p{constructor(e){if(this._splitter=null,this.cached=!0,this._splitted=null,this.columnVersion=null,this._stats=null,this._maxLength=null,this._posList=null,this._joiner=void 0,e.type!==s.TYPE.STRING)throw new Error(`Unexpected column type '${e.type}', must be '${s.TYPE.STRING}'.`);this._column=e;const t=this._column.meta.units;if(null==t)throw new Error("Units are not specified in column");if(this._units=t,this._notation=this.getNotation(),this._defaultGapOriginal=this.isFasta()?m[o.Hi.FASTA]:this.isHelm()?m[o.Hi.HELM]:m[o.Hi.SEPARATOR],!this.column.tags.has(o.gp.aligned)||!this.column.tags.has(o.gp.alphabet)||!this.column.tags.has(o.gp.alphabetIsMultichar)&&!this.isHelm()&&this.alphabet===o.YI.UN)if(this.isFasta())p.setUnitsToFastaColumn(this);else if(this.isSeparator()){const t=e.getTag(o.gp.separator);p.setUnitsToSeparatorColumn(this,t)}else{if(!this.isHelm())throw new Error(`Unexpected units '${this.column.meta.units}'.`);p.setUnitsToHelmColumn(this)}if(!this.column.tags.has(o.gp.alphabetIsMultichar))if(this.isHelm())this.column.setTag(o.gp.alphabetIsMultichar,"true");else if(["UN"].includes(this.alphabet))throw new Error(`For column '${this.column.name}' of alphabet '${this.alphabet}' tag '${o.gp.alphabetIsMultichar}' is mandatory.`);this.notationProvider=this.column.temp[d.notationProvider]??null,this.columnVersion=this.column.version}static setUnitsToFastaColumn(e){if(e.column.semType!==s.SEMTYPE.MACROMOLECULE||e.column.meta.units!==o.Hi.FASTA)throw new Error(`The column of notation '${o.Hi.FASTA}' must be '${s.SEMTYPE.MACROMOLECULE}'.`);e.column.meta.units=o.Hi.FASTA,p.setTags(e)}static setUnitsToSeparatorColumn(e,t){if(e.column.semType!==s.SEMTYPE.MACROMOLECULE||e.column.meta.units!==o.Hi.SEPARATOR)throw new Error(`The column of notation '${o.Hi.SEPARATOR}' must be '${s.SEMTYPE.MACROMOLECULE}'.`);if(!t)throw new Error(`The column of notation '${o.Hi.SEPARATOR}' must have the separator tag.`);e.column.meta.units=o.Hi.SEPARATOR,e.column.setTag(o.gp.separator,t),p.setTags(e)}static setUnitsToHelmColumn(e){if(e.column.semType!==s.SEMTYPE.MACROMOLECULE)throw new Error(`The column of notation '${o.Hi.HELM}' must be '${s.SEMTYPE.MACROMOLECULE}'`);e.column.meta.units=o.Hi.HELM,p.setTags(e)}static setTags(e){const t=e.column.meta.units;if([o.Hi.FASTA,o.Hi.SEPARATOR].includes(t)){if(!e.column.getTag(o.gp.alphabet)&&0===Object.keys(e.stats.freq).length)throw new Error("Alphabet is empty and not annotated.");let t=e.column.getTag(o.gp.aligned);null===t&&(t=e.stats.sameLength?"SEQ.MSA":"SEQ",e.column.setTag(o.gp.aligned,t));let n=e.column.getTag(o.gp.alphabet);if(null===n&&(n=(0,l.pc)(e.stats.freq,o.q7),e.column.setTag(o.gp.alphabet,n)),n===o.YI.UN){const t=Object.keys(e.stats.freq).length,n=Object.keys(e.stats.freq).some((e=>e.length>1));e.column.setTag(o.gp.alphabetSize,t.toString()),e.column.setTag(o.gp.alphabetIsMultichar,n?"true":"false")}}}get column(){return this._column}get length(){return this._column.length}get units(){return this._units}get notation(){return this._notation}get defaultGapOriginal(){return this._defaultGapOriginal}get separator(){const e=this.column.getTag(o.gp.separator)??void 0;if(this.notation===o.Hi.SEPARATOR&&void 0===e)throw new Error(`Separator is mandatory for column '${this.column.name}' of notation '${this.notation}'.`);return e}get aligned(){const e=this.column.getTag(o.gp.aligned);if(!e&&(this.isFasta()||this.isSeparator()))throw new Error("Tag aligned not set");return e}get alphabet(){const e=this.column.getTag(o.gp.alphabet);if(!e&&(this.isFasta()||this.isSeparator()))throw new Error("Tag alphabet not set");return e}get helmCompatible(){return this.column.getTag(o.gp.isHelmCompatible)}getAlphabetSize(){if(this.notation==o.Hi.HELM||this.alphabet==o.YI.UN){const e=this.column.getTag(o.gp.alphabetSize);let t;if(e)t=parseInt(e);else{const e=this.stats;t=Object.keys(e.freq).length}return t}switch(this.alphabet){case o.YI.PT:return 20;case o.YI.DNA:case o.YI.RNA:return 4;case"NT":return console.warn("Unexpected alphabet 'NT'."),4;default:throw new Error(`Unexpected alphabet '${this.alphabet}'.`)}}getAlphabetIsMultichar(){return this.notation===o.Hi.HELM||this.alphabet===o.YI.UN&&"true"===this.column.getTag(o.gp.alphabetIsMultichar)}getSplitted(e,t){if(this.cached&&void 0===t){this.column.version===this.columnVersion&&null!==this._splitted||(this.columnVersion=this.column.version,this._splitted=new Array(this.column.length));let t=this._splitted[e]?this._splitted[e].deref():void 0;if(!t){const n=this.column.get(e);t=this.splitter(n),this._splitted[e]=new WeakRef(t)}return t}{const n=this.column.get(e);return this.getSplitter(t)(n)}}get stats(){if(null===this._stats){const e={};let t=!0,n=null;const s=this.column.length;for(let i=0;i<s;++i){const s=this.getSplitted(i);null==n?n=s.length:s.length!==n&&(t=!1);for(const t of s.canonicals)t in e||(e[t]=0),e[t]+=1}this._stats={freq:e,sameLength:t}}return this._stats}get maxLength(){return null===this._maxLength&&(this._maxLength=0===this.column.length?0:Math.max(...r().count(0).take(this.column.length).map((e=>this.getSplitted(e).length)))),this._maxLength}get posList(){if(null===this._posList){const e=this.column.getTag(o.gp.positionNames);this._posList=e?e.split(o.z1).map((e=>e.trim())):r().count(1).take(this.maxLength).map((e=>e.toString())).toArray()}return this._posList}isFasta(){return this.notation===o.Hi.FASTA}isSeparator(){return this.notation===o.Hi.SEPARATOR}isHelm(){return this.notation===o.Hi.HELM}isRna(){return this.alphabet===o.YI.RNA}isDna(){return this.alphabet===o.YI.DNA}isPeptide(){return this.alphabet===o.YI.PT}isMsa(){return!!this.aligned&&this.aligned.toUpperCase().includes("MSA")}isHelmCompatible(){return"true"===this.helmCompatible}isGap(e){return!e||e===this._defaultGapOriginal}getNotation(){if(this.units.toLowerCase().startsWith(o.Hi.FASTA))return o.Hi.FASTA;if(this.units.toLowerCase().startsWith(o.Hi.SEPARATOR))return o.Hi.SEPARATOR;if(this.units.toLowerCase().startsWith(o.Hi.HELM))return o.Hi.HELM;throw new Error(`Column '${this.column.name}' has unexpected notation '${this.units}'.`)}getHelmWrappers(){return[this.isDna()||this.isRna()||this.isHelmCompatible()?"RNA1{":"PEPTIDE1{",this.isDna()?"d(":this.isRna()?"r(":"",this.isDna()||this.isRna()?")p":"","}$$$$"]}getNewColumn(e,t,n,i){const r=this.column,a=e.toLowerCase()+"("+r.name+")",l=n??r.dataFrame.columns.getUnusedName(a),c=s.Column.fromList("string",l,i??new Array(this.column.length).fill(""));if(c.semType=s.SEMTYPE.MACROMOLECULE,c.meta.units=e,e===o.Hi.SEPARATOR){if(!t)throw new Error(`Notation '${o.Hi.SEPARATOR}' requires separator value.`);c.setTag(o.gp.separator,t)}c.setTag(s.TAGS.CELL_RENDERER,e===o.Hi.HELM?"helm":"sequence");const u=r.getTag(o.gp.aligned);u&&c.setTag(o.gp.aligned,u);let h=r.getTag(o.gp.alphabet);h||this.notation!==o.Hi.HELM||e===o.Hi.HELM||(h=o.YI.UN),null!=h&&c.setTag(o.gp.alphabet,h);let d=r.getTag(o.gp.alphabetSize);null!=h&&d&&c.setTag(o.gp.alphabetSize,d);const m=r.getTag(o.gp.alphabetIsMultichar);return null!=h&&void 0!==m&&c.setTag(o.gp.alphabetIsMultichar,m),e==o.Hi.HELM&&(d=this.getAlphabetSize().toString(),c.setTag(o.gp.alphabetSize,d)),c}getNewColumnFromList(e,t){return this.getNewColumn(this.notation,this.separator,e,t)}static getNewColumn(e){const t=p.forColumn(e),n=t.notation;return t.getNewColumn(n)}static unitsStringIsValid(e){return e=e.toLowerCase(),[o.Hi.FASTA,o.Hi.SEPARATOR,o.Hi.HELM].some((t=>e.startsWith(t.toLowerCase())))}static getNewColumnFromParams(e,t,n){if(!p.unitsStringIsValid(n))throw new Error("Invalid format of 'units' parameter");const i=s.Column.fromList("string",t,new Array(e).fill(""));return i.semType=s.SEMTYPE.MACROMOLECULE,i.meta.units=n,i}getSplitter(e){let t=null;if(t=this.notationProvider?this.notationProvider.splitter:null,t)return t;if(this.units.toLowerCase().startsWith(o.Hi.FASTA))return null===this.column.getTag(o.gp.alphabet)||this.getAlphabetIsMultichar()?o.J9:l.tm;if(this.units.toLowerCase().startsWith(o.Hi.SEPARATOR))return(0,o.dh)(this.separator,e);if(this.units.toLowerCase().startsWith(o.Hi.HELM))return o.qp;throw new Error(`Unexpected units ${this.units} .`)}split(e){return this.splitter(e)}getDistanceFunctionName(){if(!this.isFasta())throw new Error("Only FASTA notation is supported");if(this.isMsa())return c.Z.HAMMING;switch(this.alphabet){case o.YI.DNA:case o.YI.RNA:case o.YI.PT:}return c.Z.LEVENSHTEIN}getDistanceFunction(){return c.V[this.getDistanceFunctionName()]()}async checkHelmCompatibility(){if(this.column.tags.has(o.gp.isHelmCompatible))return"true"===this.column.getTag(o.gp.isHelmCompatible);const e=(await(0,u.pj)()).getBioLib().getMonomerSymbolsByType("PEPTIDE"),t=new Set(e),n=((0,o.dh)(this.separator),new Set),s=this.column.length,i=this.column.getRawData();for(let e=0;e<s;++e){const s=i[e];if(!(s in n)){n.add(s);const i=this.getSplitted(e);for(const e of i.canonicals)if(!t.has(e))return this.column.setTag(o.gp.isHelmCompatible,"false"),!1}}return this.column.setTag(o.gp.isHelmCompatible,"true"),!0}get splitter(){return null===this._splitter&&(this._splitter=this.getSplitter()),this._splitter}toFasta(e){return e===o.Hi.FASTA}toSeparator(e){return e===o.Hi.SEPARATOR}toHelm(e){return e===o.Hi.HELM}convertHelmToFastaSeparator(e,t,n,s){s||(s=this.toFasta(t)?m[o.Hi.FASTA]:m[o.Hi.SEPARATOR]),n||(n=this.toFasta(t)?"":this.separator);const i=e.startsWith("RNA"),r=this.splitter(e),a=[];for(let e=0;e<r.length;++e){let n=r.getOriginal(e);if(i&&(n=n.replace(h.EK,"")),n===m[o.Hi.HELM])a.push(s);else if(this.toFasta(t)&&n.length>1){const e="["+n+"]";a.push(e)}else a.push(n)}return a.join(n)}convert(e,t){const n=this.getJoiner({notation:e,separator:t}),s=this.getNewColumn(e,t);return s.init((e=>{const t=this.getSplitted(e);return n(t)})),s}getRegion(e,t,n){const s=this.getNewColumn(this.notation,this.separator);s.name=n;const i=e??0,r=t??this.maxLength-1,a=this.getJoiner(),c=r-i+1,u=m[this.notation];s.init((e=>{const t=this.getSplitted(e),n=new Array(c);for(let e=0;e<c;++e){const s=i+e;n[e]=s<t.length?t.getOriginal(s):u}return a(new l.Mu(n,u))}));const h=e=>{const t=e.split(",").map((e=>e.trim())),n=new Array(c);for(let e=0;e<c;++e){const s=i+e;n[e]=s<t.length?t[s]:"?"}return n.join(o.z1)},d=this.column.getTag(o.gp.positionNames);d&&s.setTag(o.gp.positionNames,h(d));const p=this.column.getTag(o.gp.positionLabels);return p&&s.setTag(o.gp.positionLabels,h(p)),s}get joiner(){return this._joiner||(this._joiner=this.getJoiner()),this._joiner}getJoiner(e){const t=e?e.notation:this.notation,n=e?e.separator:this.separator;let s;const i=this;switch(t){case o.Hi.FASTA:s=function(e){return i.joinToFasta(e,i.isHelm())};break;case o.Hi.SEPARATOR:if(!n)throw new Error(`Separator is mandatory for notation '${t}'.`);s=function(e){return f(e,n,i.isHelm())};break;case o.Hi.HELM:{const e=i.alphabet===o.YI.DNA||i.alphabet===o.YI.RNA,t=i.getHelmWrappers();s=function(n){return g(n,t,e)};break}default:throw new Error(`Unexpected notation '${t}'.`)}return s}getConverter(e,t=void 0){if(e===o.Hi.SEPARATOR&&!t)throw new Error(`Target separator is not specified for target units '${o.Hi.SEPARATOR}'.`);const n=this;if(e===o.Hi.FASTA)return function(e){return n.convertToFasta(e)};if(e===o.Hi.HELM)return function(e){return n.convertToHelm(e)};if(e===o.Hi.SEPARATOR)return function(e){return n.convertToSeparator(e,t)};throw new Error}static forColumn(e){let t=e.temp[d.seqHandler];return t&&t.columnVersion===e.version||(t=e.temp[d.seqHandler]=new p(e)),t}joinToFasta(e,t){const n=new Array(e.length);for(let s=0;s<e.length;++s){const i=e.getOriginal(s);let r=e.getOriginal(s);t&&(r=r.replace(h.EK,"$1")),i===a._S?r=m[o.Hi.FASTA]:i===h.q7?r="":r.length>1&&(r="["+r+"]"),n[s]=r}return n.join("")}convertToFasta(e){const t=this.splitter,n=this.isHelm()?this.splitterAsHelmNucl(e):t(e);return this.joinToFasta(n,this.isHelm())}convertToSeparator(e,t){return f(this.isHelm()?this.splitterAsHelmNucl(e):this.splitter(e),t,this.isHelm())}convertToHelm(e){const t=this.getHelmWrappers(),n=e.startsWith("DNA")||e.startsWith("RNA");return g(this.splitter(e),t,n)}splitterAsHelmNucl(e){const t=this.splitter(e),n=new Array(t.length),s=e.startsWith("DNA"),i=e.startsWith("RNA");for(let e=0;e<t.length;++e){let r=t.getOriginal(e);(s||i)&&(r=r.replace(h.EK,"$1"),r=r===h.q7?null:r),n[e]=r||null}return new l.Mu(n.filter((e=>!!e)),m[o.Hi.HELM])}}function f(e,t,n){const s=new Array(e.length);for(let t=0;t<e.length;++t){const i=e.getCanonical(t);let r=e.getOriginal(t);n&&(r=r.replace(h.EK,"$1")),i===a._S?r=m[o.Hi.SEPARATOR]:i===h.q7&&(r=""),s[t]=r}return s.join(t)}function g(e,t,n){const[s,i,r,l]=t,c=new Array(e.length);for(let t=0;t<e.length;++t){const s=e.getCanonical(t);let l=e.getOriginal(t);s===a._S?l=m[o.Hi.HELM]:(n&&(l=l.replace(h.EK,"$1")),l=1===l.length?`${i}${l}${r}`:`${i}[${l}]${r}`),c[t]=l}return`${s}${c.join(".")}${l}`}},3077:(e,t,n)=>{"use strict";n.d(t,{R:()=>r});var s=n(6082),i=n(826);function r(e){const t=e=>{const t=o.columns.addNewString((e+1).toString());return n.push(t),t},n=[],r=e.length,o=s.DataFrame.create(r),a=i.GO.forColumn(e);for(let e=0;e<r;++e){const s=a.getSplitted(e);for(let i=0;i<s.length;++i){const r=s.getOriginal(i);((n[i]??null)||t(i)).set(e,r,!1)}}return o}},7602:(e,t,n)=>{"use strict";n.d(t,{g:()=>r});var s,i=n(9192);!function(e){e[e.error=0]="error",e[e.warning=1]="warning",e[e.info=2]="info",e[e.debug=3]="debug"}(s||(s={}));class r{constructor(e){this.logger=e,this.promise=Promise.resolve(),this.errors=[],this.syncCounter=0}sync(e,t){const n=++this.syncCounter;this.logger.debug(`${e}, SYNC syncId = ${n}, IN `),this.promise=this.promise.then((async()=>{this.logger.debug(`${e}, SYNC syncId = ${n}, START `),await t(),this.logger.debug(`${e}, SYNC syncId = ${n}, END `)})).catch((t=>{const[s,r]=(0,i.AP)(t);this.logger.error(`${e}, SYNC syncId = ${n}, ERROR:\n${s}`,void 0,r),this.errors.push(t)}))}resetErrors(){const e=this.errors;return this.errors=[],e}}},4326:(e,t,n)=>{"use strict";n.d(t,{Fo:()=>u,Lp:()=>r,P4:()=>o,fH:()=>i,gp:()=>s,lT:()=>l,mH:()=>a});var s,i,r,o,a,l,c=n(6082);!function(e){e.tooltipWebLogo=".tooltipWebLogo"}(s||(s={})),function(e){e.Entropy="Entropy",e.full="100%"}(i||(i={})),function(e){e.TOP="top",e.MIDDLE="middle",e.BOTTOM="bottom"}(r||(r={})),function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right"}(o||(o={})),function(e){e.AUTO="auto",e.ON="on",e.OFF="off"}(a||(a={})),function(e){e.Filtered="Filtered",e.Selected="Selected"}(l||(l={}));const u=new class{constructor(){this.sequenceColumnName=null,this.valueAggrType=c.AGG.TOTAL_COUNT,this.valueColumnName="Activity",this.startPositionName=null,this.endPositionName=null,this.skipEmptySequences=!0,this.skipEmptyPositions=!1,this.shrinkEmptyTail=!0,this.backgroundColor=4294967295,this.positionHeight=i.Entropy,this.positionWidth=16,this.verticalAlignment=r.MIDDLE,this.horizontalAlignment=o.CENTER,this.fixWidth=!1,this.fitArea=!0,this.minHeight=50,this.maxHeight=100,this.showPositionLabels=!0,this.positionMarginState=a.AUTO,this.positionMargin=0,this.filterSource=l.Filtered}}},5540:(e,t,n)=>{"use strict";e=n.hmd(e);var s,i=(s="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var t,n,i=void 0!==e?e:{};i.ready=new Promise((function(e,s){t=e,n=s}));var r,o=Object.assign({},i),a="object"==typeof window,l="function"==typeof importScripts,c=("object"==typeof process&&"object"==typeof process.versions&&process.versions.node,"");(a||l)&&(l?c=self.location.href:"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),s&&(c=s),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",l&&(r=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),i.print||console.log.bind(console);var u,h,d=i.printErr||console.warn.bind(console);Object.assign(i,o),o=null,i.arguments&&i.arguments,i.thisProgram&&i.thisProgram,i.quit&&i.quit,i.wasmBinary&&(u=i.wasmBinary),i.noExitRuntime,"object"!=typeof WebAssembly&&x("no native wasm support detected");var m,p,f,g=!1;function y(){var e=h.buffer;i.HEAP8=m=new Int8Array(e),i.HEAP16=new Int16Array(e),i.HEAP32=new Int32Array(e),i.HEAPU8=p=new Uint8Array(e),i.HEAPU16=new Uint16Array(e),i.HEAPU32=f=new Uint32Array(e),i.HEAPF32=new Float32Array(e),i.HEAPF64=new Float64Array(e)}var b=[],v=[],w=[],C=0,A=null,S=null;function x(e){i.onAbort&&i.onAbort(e),d(e="Aborted("+e+")"),g=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}var E,_;function I(e){return e.startsWith("data:application/octet-stream;base64,")}function T(e){try{if(e==E&&u)return new Uint8Array(u);if(r)return r(e);throw"both async and sync fetching of the wasm failed"}catch(e){x(e)}}function M(e,t,n){return function(e){return u||!a&&!l||"function"!=typeof fetch?Promise.resolve().then((function(){return T(e)})):fetch(e,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((function(){return T(e)}))}(e).then((function(e){return WebAssembly.instantiate(e,t)})).then((function(e){return e})).then(n,(function(e){d("failed to asynchronously prepare wasm: "+e),x(e)}))}function $(e){for(;e.length>0;)e.shift()(i)}function L(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){f[this.ptr+4>>2]=e},this.get_type=function(){return f[this.ptr+4>>2]},this.set_destructor=function(e){f[this.ptr+8>>2]=e},this.get_destructor=function(){return f[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,m[this.ptr+12|0]=e},this.get_caught=function(){return 0!=m[this.ptr+12|0]},this.set_rethrown=function(e){e=e?1:0,m[this.ptr+13|0]=e},this.get_rethrown=function(){return 0!=m[this.ptr+13|0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){f[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return f[this.ptr+16>>2]},this.get_exception_ptr=function(){if(D(this.get_type()))return f[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}function N(e){var t=h.buffer;try{return h.grow(e-t.byteLength+65535>>>16),y(),1}catch(e){}}function P(e){return i["_"+e]}I(E="wasmDbscan.wasm")||(_=E,E=i.locateFile?i.locateFile(_,c):c+_);var R="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function O(e,t,n,s,i){var r={string:e=>{var t=0;return null!=e&&0!==e&&(t=function(e){var t=function(e){for(var t=0,n=0;n<e.length;++n){var s=e.charCodeAt(n);s<=127?t++:s<=2047?t+=2:s>=55296&&s<=57343?(t+=4,++n):t+=3}return t}(e)+1,n=B(t);return function(e,t,n){!function(e,t,n,s){if(!(s>0))return 0;for(var i=n+s-1,r=0;r<e.length;++r){var o=e.charCodeAt(r);if(o>=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++r)),o<=127){if(n>=i)break;t[n++]=o}else if(o<=2047){if(n+1>=i)break;t[n++]=192|o>>6,t[n++]=128|63&o}else if(o<=65535){if(n+2>=i)break;t[n++]=224|o>>12,t[n++]=128|o>>6&63,t[n++]=128|63&o}else{if(n+3>=i)break;t[n++]=240|o>>18,t[n++]=128|o>>12&63,t[n++]=128|o>>6&63,t[n++]=128|63&o}}t[n]=0}(e,p,t,n)}(e,n,t),n}(e)),t},array:e=>{var t,n,s=B(e.length);return t=e,n=s,m.set(t,n),s}},o=P(e),a=[],l=0;if(s)for(var c=0;c<s.length;c++){var u=r[n[c]];u?(0===l&&(l=G()),a[c]=u(s[c])):a[c]=s[c]}var h=o.apply(null,a);return function(e){return 0!==l&&H(l),function(e){return"string"===t?(n=e)?function(e,t,n){for(var s=t+n,i=t;e[i]&&!(i>=s);)++i;if(i-t>16&&e.buffer&&R)return R.decode(e.subarray(t,i));for(var r="";t<i;){var o=e[t++];if(128&o){var a=63&e[t++];if(192!=(224&o)){var l=63&e[t++];if((o=224==(240&o)?(15&o)<<12|a<<6|l:(7&o)<<18|a<<12|l<<6|63&e[t++])<65536)r+=String.fromCharCode(o);else{var c=o-65536;r+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else r+=String.fromCharCode((31&o)<<6|a)}else r+=String.fromCharCode(o)}return r}(p,n,s):"":"boolean"===t?Boolean(e):e;var n,s}(e)}(h)}var k,F={__cxa_throw:function(e,t,n){throw new L(e).init(t,n),e},abort:function(){x("")},emscripten_memcpy_big:function(e,t,n){p.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){var t,n=p.length,s=2147483648;if((e>>>=0)>s)return!1;for(var i=1;i<=4;i*=2){var r=n*(1+.2/i);if(r=Math.min(r,e+100663296),N(Math.min(s,(t=Math.max(e,r))+(65536-t%65536)%65536)))return!0}return!1}},G=(function(){var e,t,s,r,o={env:F,wasi_snapshot_preview1:F};function a(e,t){var n,s=e.exports;return i.asm=s,h=i.asm.memory,y(),i.asm.__indirect_function_table,n=i.asm.__wasm_call_ctors,v.unshift(n),function(){if(C--,i.monitorRunDependencies&&i.monitorRunDependencies(C),0==C&&(null!==A&&(clearInterval(A),A=null),S)){var e=S;S=null,e()}}(),s}if(C++,i.monitorRunDependencies&&i.monitorRunDependencies(C),i.instantiateWasm)try{return i.instantiateWasm(o,a)}catch(e){d("Module.instantiateWasm callback failed with error: "+e),n(e)}(e=u,t=E,s=o,r=function(e){a(e.instance)},e||"function"!=typeof WebAssembly.instantiateStreaming||I(t)||"function"!=typeof fetch?M(t,s,r):fetch(t,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,s).then(r,(function(e){return d("wasm streaming compile failed: "+e),d("falling back to ArrayBuffer instantiation"),M(t,s,r)}))}))).catch(n)}(),i._dbscan=function(){return(i._dbscan=i.asm.dbscan).apply(null,arguments)},i._malloc=function(){return(i._malloc=i.asm.malloc).apply(null,arguments)},i._free=function(){return(i._free=i.asm.free).apply(null,arguments)},function(){return(G=i.asm.stackSave).apply(null,arguments)}),H=function(){return(H=i.asm.stackRestore).apply(null,arguments)},B=function(){return(B=i.asm.stackAlloc).apply(null,arguments)},D=function(){return(D=i.asm.__cxa_is_pointer_type).apply(null,arguments)};function V(){function e(){k||(k=!0,i.calledRun=!0,g||($(v),t(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)e=i.postRun.shift(),w.unshift(e);var e;$(w)}()))}C>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)e=i.preRun.shift(),b.unshift(e);var e;$(b)}(),C>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e()))}if(i.ccall=O,i.cwrap=function(e,t,n,s){var i=!n||n.every((e=>"number"===e||"boolean"===e));return"string"!==t&&i&&!s?P(e):function(){return O(e,t,n,arguments)}},S=function e(){k||V(),k||(S=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return V(),e.ready});"object"==typeof exports?e.exports=i:"function"==typeof define&&n.amdO?define([],(function(){return i})):"object"==typeof exports&&(exports.exportCppDbscanLib=i)},6295:(e,t,n)=>{"use strict";n.d(t,{$1:()=>a,Hr:()=>S,Ii:()=>p,T6:()=>A,TK:()=>w,a4:()=>d,be:()=>m,gt:()=>y,iS:()=>o,ij:()=>b,lO:()=>h,lP:()=>g,rR:()=>f,tO:()=>l,v_:()=>c,yK:()=>v,zn:()=>u});var s=n(8774),i=n(8498),r=n(6863);i.aT.Tanimoto,i.aT.Dice,i.aT.Asymmetric,i.aT.BraunBlanquet,i.aT.Cosine,i.aT.Kulczynski,i.aT.McConnaughey,i.aT.RogotGoldberg,i.aT.Russel,i.aT.Sokal,i.aT.Hamming,i.aT.Euclidean,i.aT.Tanimoto,i.aT.Dice,i.aT.Asymmetric,i.aT.BraunBlanquet,i.aT.Cosine,i.aT.Kulczynski,i.aT.McConnaughey,i.aT.RogotGoldberg,i.aT.Russel,i.aT.Sokal,i.aT.Hamming,i.aT.Euclidean;const o=[i.aT.Tanimoto,i.aT.Dice,i.aT.Cosine];function a(e,t){const n=e.trueCount()+t.trueCount();if(0==n)return 1;const s=e.andWithCountBits(t,!0);return s/(n-s)}function l(e,t){return 1-a(e,t)}function c(e,t){return C(a(new s.A(e,32*e.length),new s.A(t,32*t.length)))}function u(e,t){return 1-function(e,t){const n=e.trueCount()+t.trueCount();return 0==n?0:2*e.andWithCountBits(t,!0)/n}(e,t)}function h(e,t){return 1-function(e,t){const n=e.trueCount()*t.trueCount();return 0==n?0:e.andWithCountBits(t,!0)/Math.sqrt(n)}(e,t)}function d(e,t){return Math.sqrt(e.trueCount()+t.trueCount()-2*e.andWithCountBits(t,!0))}function m(e,t){return e.trueCount()+t.trueCount()-2*e.andWithCountBits(t,!0)}function p(e,t){return 1-function(e,t){const n=e.trueCount()+t.trueCount(),s=e.andWithCountBits(t,!0);return s/(2*n-3*s)}(e,t)}function f(e,t){return C(function(e,t){const n=e.trueCount()+t.trueCount(),s=e.trueCount()*t.trueCount();return 0==s?0:e.andWithCountBits(t,!0)*n/(2*s)}(e,t))}function g(e,t){return C(function(e,t){const n=e.trueCount()+t.trueCount(),s=e.trueCount()*t.trueCount();return 0==s?0:(e.andWithCountBits(t,!0)*n-s)/s}(e,t))}function y(e,t){return 1-function(e,t){const n=Math.min(e.trueCount(),t.trueCount());return 0==n?0:e.andWithCountBits(t,!0)/n}(e,t)}function b(e,t){return C(function(e,t){const n=Math.max(e.trueCount(),t.trueCount());return 0==n?0:e.andWithCountBits(t,!0)/n}(e,t))}function v(e,t){return C(function(e,t){return 0==e.length?0:e.andWithCountBits(t,!0)/e.length}(e,t))}function w(e,t){return C(function(e,t){const n=e.andWithCountBits(t,!0),s=e.countBits(!0)+t.countBits(!0),i=e.length,r=i-s+n;return n==i||r==i?1:n/s+r/(2*i-s)}(e,t))}function C(e){return 0===e?3402823e32:1/e-1}function A(e){if(e&&null!=e.range&&e.range>0){const t=e.range;return(e,n)=>Math.abs(e-n)/t}return(e,t)=>Math.abs(e-t)}function S(e){const t=function(e){const t=e?.mostCommon??new Set;return(e,n)=>{const s=e.length,i=n.length;let r=0,o=0,a=0;for(;o<s&&a<i;)e[o]===n[a]?(t?.has(e[o])||++r,++o,++a):e[o]<n[a]?++o:++a;return r}}(e);return(e,n)=>0===n.length||0===e.length?1e4:Math.min(e.length,n.length)/(t(e,n)+1e-4)}i.aT.Tanimoto,i.aT.Asymmetric,i.aT.Cosine,i.aT.Sokal,r.Z.HAMMING,r.Z.LEVENSHTEIN,r.Z.MONOMER_CHEMICAL_DISTANCE,r.Z.NEEDLEMANN_WUNSCH},684:(e,t,n)=>{"use strict";n.d(t,{C0:()=>r,GP:()=>s,Gi:()=>a,YP:()=>c,_X:()=>o,n3:()=>i,vb:()=>l});const s="dim-red-preprocessing-function",i="supportedSemTypes",r="supportedTypes",o="supportedUnits",a="supportedDistanceFunctions",l="bypassLargeDataWarning",c="show-scatterplot-progress"},6863:(e,t,n)=>{"use strict";function s(e={}){const t=function(){if(!e||!e.scoringMatrix||!e.alphabetIndexes)return(e,t)=>e===t?0:1;if(e.scoringMatrix.length!==Object.keys(e.alphabetIndexes).length)throw new Error("Scoring matrix and alphabet indexes should have the same length");const t=e.alphabetIndexes,n=e.scoringMatrix,s=Math.min(...Object.keys(t).map((e=>e.charCodeAt(0))))+1,i=new Float32Array((n.length+s)*(n.length+s));return Object.entries(t).forEach((([e,s])=>{const r=n[s];Object.entries(t).forEach((([t,s])=>{i[e.charCodeAt(0)*n.length+t.charCodeAt(0)]=r[s]}))})),(e,t)=>1-i[e.charCodeAt(0)*n.length+t.charCodeAt(0)]}(),n=e?.threshold??0;return(e,s)=>{let i=0;const r=e.length,o=s.length,a=Math.ceil(Math.max(r,o)*(1-n));r!==o&&(i=Math.abs(r-o));let l=0;for(let n=0;n<Math.min(r,o);n++)if(e[n]!==s[n]&&(l+=t(e[n],s[n]),l>a))return 1;return l+=i,l/=Math.max(r,o),l}}n.d(t,{Z:()=>o,V:()=>a});var i=n(2787);const r={gapOpen:1,gapExtend:.6,scoringMatrix:[[4,-1,-2,-2,0,-1,-1,0,-2,-1,-1,-1,-1,-2,-1,1,0,-3,-2,0,-2,-1,0,-4],[-1,5,0,-2,-3,1,0,-2,0,-3,-2,2,-1,-3,-2,-1,-1,-3,-2,-3,-1,0,-1,-4],[-2,0,6,1,-3,0,0,0,1,-3,-3,0,-2,-3,-2,1,0,-4,-2,-3,3,0,-1,-4],[-2,-2,1,6,-3,0,2,-1,-1,-3,-4,-1,-3,-3,-1,0,-1,-4,-3,-3,4,1,-1,-4],[0,-3,-3,-3,9,-3,-4,-3,-3,-1,-1,-3,-1,-2,-3,-1,-1,-2,-2,-1,-3,-3,-2,-4],[-1,1,0,0,-3,5,2,-2,0,-3,-2,1,0,-3,-1,0,-1,-2,-1,-2,0,3,-1,-4],[-1,0,0,2,-4,2,5,-2,0,-3,-3,1,-2,-3,-1,0,-1,-3,-2,-2,1,4,-1,-4],[0,-2,0,-1,-3,-2,-2,6,-2,-4,-4,-2,-3,-3,-2,0,-2,-2,-3,-3,-1,-2,-1,-4],[-2,0,1,-1,-3,0,0,-2,8,-3,-3,-1,-2,-1,-2,-1,-2,-2,2,-3,0,0,-1,-4],[-1,-3,-3,-3,-1,-3,-3,-4,-3,4,2,-3,1,0,-3,-2,-1,-3,-1,3,-3,-3,-1,-4],[-1,-2,-3,-4,-1,-2,-3,-4,-3,2,4,-2,2,0,-3,-2,-1,-2,-1,1,-4,-3,-1,-4],[-1,2,0,-1,-3,1,1,-2,-1,-3,-2,5,-1,-3,-1,0,-1,-3,-2,-2,0,1,-1,-4],[-1,-1,-2,-3,-1,0,-2,-3,-2,1,2,-1,5,0,-2,-1,-1,-1,-1,1,-3,-1,-1,-4],[-2,-3,-3,-3,-2,-3,-3,-3,-1,0,0,-3,0,6,-4,-2,-2,1,3,-1,-3,-3,-1,-4],[-1,-2,-2,-1,-3,-1,-1,-2,-2,-3,-3,-1,-2,-4,7,-1,-1,-4,-3,-2,-2,-1,-2,-4],[1,-1,1,0,-1,0,0,0,-1,-2,-2,0,-1,-2,-1,4,1,-3,-2,-2,0,0,0,-4],[0,-1,0,-1,-1,-1,-1,-2,-2,-1,-1,-1,-1,-2,-1,1,5,-2,-2,0,-1,-1,0,-4],[-3,-3,-4,-4,-2,-2,-3,-2,-2,-3,-2,-3,-1,1,-4,-3,-2,11,2,-3,-4,-3,-2,-4],[-2,-2,-2,-3,-2,-1,-2,-3,2,-1,-1,-2,-1,3,-3,-2,-2,2,7,-1,-3,-2,-1,-4],[0,-3,-3,-3,-1,-2,-2,-3,-3,3,1,-2,1,-1,-2,-2,0,-3,-1,4,-3,-2,-1,-4],[-2,-1,3,4,-3,0,1,-1,0,-3,-4,0,-3,-3,-2,0,-1,-4,-3,-3,4,1,-1,-4],[-1,0,0,1,-3,3,4,-2,0,-3,-3,1,-1,-3,-1,0,-1,-3,-2,-2,1,4,-1,-4],[0,-1,-1,-1,-2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-2,0,0,-2,-1,-1,-1,-1,-1,-4],[-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,1]],alphabetIndexes:{A:0,R:1,N:2,D:3,C:4,Q:5,E:6,G:7,H:8,I:9,L:10,K:11,M:12,F:13,P:14,S:15,T:16,W:17,Y:18,V:19,B:20,Z:21,X:22,"*":23}};var o;!function(e){e.HAMMING="Hamming",e.LEVENSHTEIN="Levenshtein",e.NEEDLEMANN_WUNSCH="Needlemann-Wunsch",e.MONOMER_CHEMICAL_DISTANCE="Monomer chemical distance"}(o||(o={}));const a={[o.HAMMING]:s,[o.LEVENSHTEIN]:function(){return(e,t)=>(0,i.I)(e,t)/Math.max(e.length,t.length)},[o.NEEDLEMANN_WUNSCH]:function(e){const t=new Uint16Array(65536),{gapOpen:n,gapExtend:s,scoringMatrix:i,alphabetIndexes:o}={...r,...e};Object.entries(o).forEach((([e,n])=>t[e.charCodeAt(0)]=n));const a=[new Float32Array(1e4),new Float32Array(1e4)];return(e,r)=>{const o=new Array(e.length+1).fill(!1),l=new Array(e.length+1).fill(!1);let c=0,u=1;for(let t=1;t<e.length+1;t++)a[0][t]=-n-(t-1)*s,a[1][t]=0;a[0][0]=0;for(let h=1;h<r.length+1;h++){a[u][0]=-n-(h-1)*s;for(let d=1;d<e.length+1;d++){const m=a[c][d-1]+i[t[e.charCodeAt(d-1)]][t[r.charCodeAt(h-1)]],p=a[c][d]-(o[d]?s:n),f=a[u][d-1]-(l[d-1]?s:n);a[u][d]=Math.max(m,f,p),a[u][d]===m?(o[d]=!1,l[d]=!1):a[u][d]===f?(o[d]=!1,l[d]=!0):(o[d]=!0,l[d]=!1)}c=u,u=(u+1)%2}const h=Math.max(e.length,r.length);return(h-a[c][e.length])/h}},[o.MONOMER_CHEMICAL_DISTANCE]:s}},9039:(e,t,n)=>{"use strict";var s;n.d(t,{c:()=>s}),function(e){e.UMAP="UMAP",e.T_SNE="t-SNE"}(s||(s={}))},8498:(e,t,n)=>{"use strict";var s,i,r,o,a,l,c;n.d(t,{EG:()=>a,Pn:()=>i,RR:()=>l,Wn:()=>c,aT:()=>r,m6:()=>o,xL:()=>s}),function(e){e.Levenshtein="Levenshtein",e.JaroWinkler="Jaro-Winkler",e.Manhattan="Manhattan",e.Onehot="One-Hot"}(s||(s={})),function(e){e.Euclidean="Euclidean"}(i||(i={})),function(e){e.Tanimoto="Tanimoto",e.Dice="Dice",e.Asymmetric="Asymmetric",e.BraunBlanquet="Braun-Blanquet",e.Cosine="Cosine",e.Kulczynski="Kulczynski",e.McConnaughey="Mc-Connaughey",e.RogotGoldberg="Rogot-Goldberg",e.Russel="Russel",e.Sokal="Sokal",e.Hamming="Hamming",e.Euclidean="Euclidean"}(r||(r={})),function(e){e.TanimotoIntArray="TanimotoIntArray"}(o||(o={})),function(e){e.Vector="Vector",e.String="String",e.BitArray="BitArray",e.MacroMolecule="MacroMolecule",e.Number="Number",e.IntArray="IntArray",e.NumberArray="NumberArray"}(a||(a={})),function(e){e.Difference="Difference"}(l||(l={})),function(e){e.CommonItems="Common Items"}(c||(c={}))},2780:(e,t,n)=>{"use strict";n.d(t,{xL:()=>s.xL});var s=n(8498);n(9336)},9336:(e,t,n)=>{"use strict";var s=n(2787),i=n(944),r=n(6295),o=n(3629),a=n(6863),l=n(8498);const c={[l.Pn.Euclidean]:o.ou},u={[l.xL.Levenshtein]:s.I,[l.xL.JaroWinkler]:i.Vb,[l.xL.Manhattan]:function(e,t){if(e.length!==t.length)return 1;{let n=0;for(let s=1;s<e.length;s++)n+=e[s]==t[s]?0:1;return n/e.length}},[l.xL.Onehot]:function(e,t){return e===t?0:1}},h={[l.aT.Tanimoto]:r.tO,[l.aT.Dice]:r.zn,[l.aT.Asymmetric]:r.gt,[l.aT.BraunBlanquet]:r.ij,[l.aT.Cosine]:r.lO,[l.aT.Kulczynski]:r.rR,[l.aT.McConnaughey]:r.lP,[l.aT.RogotGoldberg]:r.TK,[l.aT.Russel]:r.yK,[l.aT.Sokal]:r.Ii,[l.aT.Hamming]:r.be,[l.aT.Euclidean]:r.a4},d={[l.m6.TanimotoIntArray]:r.v_},m={[l.RR.Difference]:r.T6},p={[l.Wn.CommonItems]:r.Hr},f={[l.EG.Vector]:{[l.Pn.Euclidean]:c[l.Pn.Euclidean]},[l.EG.String]:{[l.xL.Levenshtein]:u[l.xL.Levenshtein],[l.xL.JaroWinkler]:u[l.xL.JaroWinkler],[l.xL.Manhattan]:u[l.xL.Manhattan],[l.xL.Onehot]:u[l.xL.Onehot]},[l.EG.BitArray]:{[l.aT.Tanimoto]:h[l.aT.Tanimoto],[l.aT.Dice]:h[l.aT.Dice],[l.aT.Asymmetric]:h[l.aT.Asymmetric],[l.aT.BraunBlanquet]:h[l.aT.BraunBlanquet],[l.aT.Cosine]:h[l.aT.Cosine],[l.aT.Kulczynski]:h[l.aT.Kulczynski],[l.aT.McConnaughey]:h[l.aT.McConnaughey],[l.aT.RogotGoldberg]:h[l.aT.RogotGoldberg],[l.aT.Russel]:h[l.aT.Russel],[l.aT.Sokal]:h[l.aT.Sokal]},[l.EG.MacroMolecule]:{[a.Z.HAMMING]:a.V[a.Z.HAMMING],[a.Z.LEVENSHTEIN]:a.V[a.Z.LEVENSHTEIN],[a.Z.NEEDLEMANN_WUNSCH]:a.V[a.Z.NEEDLEMANN_WUNSCH],[a.Z.MONOMER_CHEMICAL_DISTANCE]:a.V[a.Z.MONOMER_CHEMICAL_DISTANCE]},[l.EG.Number]:{[l.RR.Difference]:m[l.RR.Difference]},[l.EG.IntArray]:{[l.m6.TanimotoIntArray]:d[l.m6.TanimotoIntArray]},[l.EG.NumberArray]:{[l.Wn.CommonItems]:p[l.Wn.CommonItems]}};Object.keys(f).reduce(((e,t)=>{for(const n of Object.keys(f[t]))e[n]=t;return e}),{})},8774:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});class s{constructor(e,t=!1){if(this._length=0,this._version=0,this._updateLevel=0,this._selectedCount=0,this._selectedCountVersion=-1,this._selectedIndexesVersion=-1,this._versionedName="",this._versionedNameVersion=-1,this.SHRINK_THRESHOLD=256,"number"==typeof e){const n=e,i=s._createBuffer(n);if(t)for(let e=0;e<i.length;e++)i[e]=-1;this._data=i,this._length=n}else{if(!(e instanceof Uint32Array))throw new Error("Invalid constructor");this._data=e,this._length=t}}getRawData(){return this._data}assureGoez(e,t){if(e<0)throw new Error(`${t} should be greater than zero`)}assureInRange(e,t,n,s){if(e<t||e>n)throw new Error(`Argument ${s} (${e}) out of range (${t}, ${n})`)}copy(e,t,n){for(let s=0;s<n;s++)t[s]=e[s]}copyFrom(e){if(this._length!=e._length)throw new Error(`Lengths differ (${this._length} != ${e._length})`);this.copy(e._data,this._data,this.lengthInInts),this._version++}get length(){return this._length}get buffer(){return this._data}set buffer(e){this._data=e,this._version++}get version(){return this._version}set version(e){this._version=e}incrementVersion(e=!0){this._version++}get lengthInInts(){return Math.floor((this._length+31)/32)}get versionedName(){return this._version==this._versionedNameVersion?this._versionedName:""}set versionedName(e){this._versionedName=e,this._versionedNameVersion=this._version}get self(){return this}setLength(e){if(e<0)throw new Error("should be >= 0");if(e==this._length)return;const t=Math.floor((e+31)/32);if(t>this._data.length||t+this.SHRINK_THRESHOLD<this._data.length){const e=new Uint32Array(t);this.copy(this._data,e,t>this._data.length?this._data.length:t),this._data=e}e>this._length&&(this._length%32>0&&(this._data[this.lengthInInts-1]&=(1<<(this._length%32&31))-1),this._data.fill(0,this.lengthInInts,t)),this._length=e,this._version++}static fromAnd(e,t){if(e._length!=t._length)throw new Error(`Lengths differ (${e._length} != ${t._length})`);const n=new s(e._length);n._length=e._length,n._data=s._createBuffer(n._length),n._version=0;const i=e.lengthInInts;for(let s=0;s<i;s++)n._data[s]=e._data[s]&t._data[s];return n}static _createBuffer(e){return new Uint32Array(Math.floor((e+31)/32))}static fromValues(e){const t=new s(e.length);t._version=0;for(let n=0;n<t._length;n++)e[n]&&(t._data[Math.floor(n/32)]|=1<<(n%32&31));return t}static fromSeq(e,t){const n=new s(e);for(let s=0;s<e;++s)n.setBit(s,t(s));return n._version=0,n}static fromString(e){return s.fromSeq(e.length,(t=>"1"==e.charAt(t)))}static fromUint32Array(e,t){const n=new s(e);return n._data=t,n}static fromBytes(e){const t=e.length,n=new s(8*t);n._data=new Uint32Array(Math.floor((t+3)/4)),n._length=8*t;let i=0,r=0;for(;t-r>=4;)n._data[i++]=255&e[r]|(255&e[r+1])<<8|(255&e[r+2])<<16|(255&e[r+3])<<24,r+=4;return t-r==3&&(n._data[i]=(255&e[r+2])<<16),t-r==2&&(n._data[i]|=(255&e[r+1])<<8),t-r==1&&(n._data[i]|=255&e[r]),n._version=0,n}toString(){return`${this._length} bits, ${this.countBits(!0)} set`}equals(e){if(this==e)return!0;if(null==e)return!1;if(this._length!=e._length)return!1;if(0==this._length)return!0;for(let t=0;t<this._data.length-1;t++)if(this._data[t]!=e._data[t])return!1;for(let t=8*(this._data.length-1);t<this._length;t++)if(this.getBit(t)!=e.getBit(t))return!1;return!0}clone(){const e=new s(0,!1);return e._data=Uint32Array.from(this._data),e._length=this._length,e._version=this._version,e}init(e,t){this.setAll(!1,!1);for(let t=0;t<this._length;t++)e(t)&&(this._data[Math.floor(t/32)]|=1<<(t%32&31));return this.incrementVersion(t),this}invert(e=!0){for(let e=0;e<this._data.length;e++)this._data[e]^=-1;this.incrementVersion(e)}setAll(e,t=!1){const n=e?-1:0,s=this.lengthInInts;for(let e=0;e<s;e++)this._data[e]=n;this.incrementVersion(t)}setIndexes(e,t=!0,n=!0,s=!0){n&&this.setAll(!t,!1);for(const n of e)this.setFast(n,t);this.incrementVersion(s)}everyIndex(e,t=!0){for(const n of e)if(this.getBit(n)!=t)return!1;return!0}anyIndex(e,t=!0){for(const n of e)if(this.getBit(n)==t)return!0;return!1}setWhere(e,t=!0,n=!0,s=!0,i=!0){if(n&&i&&this.setAll(!t,!1),i)for(let n=0;n<this._length;n++)e(n)&&this.setFast(n,t);else for(let n=0;n<this._length;n++)this.setFast(n,e(n)?t:!t);this.incrementVersion(s)}getRange(e,t){this.assureInRange(e,0,this._length-1,"from"),this.assureInRange(t,0,this._length,"to");const n=[];for(let s=e;s<t;++s)n.push(this.getBit(s));return s.fromValues(n)}getRangeAsList(e,t){this.assureInRange(e,0,this._length-1,"from"),this.assureInRange(t,0,this._length,"to");const n=[];for(let s=e;s<t;++s)n.push(this.getBit(s));return n}setRange(e,t,n,s=!0){this.assureInRange(e,0,this._length-1,"from"),this.assureInRange(t,0,this._length-1,"to");const i=Math.min(e,t),r=Math.max(e,t);if(n)for(let e=i;e<=r;e++)this.setTrue(e);else for(let e=i;e<=r;e++)this.setFalse(e);return this.incrementVersion(s),this}setRandom(e,t,n=!0){if(e<0||e>this._length)throw new Error("n must be >= 0 && <= Count");e>this._length/2&&this.setRandom(this._length-e,!t),this.setAll(!t);for(let n=0;n<e;){const e=Math.floor(Math.random()*this._length);this.getBit(e)!=t&&(this.setFast(e,t),n++)}this.incrementVersion(n)}and(e,t=!0){if(this._length!=e._length)throw new Error("Array lengths differ.");for(let t=0,n=this.lengthInInts;t<n;t++)this._data[t]&=e._data[t];return this.incrementVersion(t),this}andNot(e,t=!0){if(this._length!=e._length)throw new Error("Array lengths differ.");const n=this.lengthInInts;for(let t=0;t<n;t++)this._data[t]&=~e._data[t];return this.incrementVersion(t),this}notAnd(e,t=!0){if(this._length!=e._length)throw new Error("Array lengths differ.");for(let t=0,n=this.lengthInInts;t<n;t++)this._data[t]=~this._data[t]&e._data[t];return this.incrementVersion(t),this}not(e=!0){for(let e=0,t=this.lengthInInts;e<t;e++)this._data[e]=~this._data[e];return this.incrementVersion(e),this}or(e,t=!0){if(this._length!=e._length)throw new Error("Array lengths differ.");for(let t=0,n=this.lengthInInts;t<n;t++)this._data[t]|=e._data[t];return this.incrementVersion(t),this}xor(e,t=!0){if(this._length!=e._length)throw new Error("Array lengths differ.");for(let t=0,n=this.lengthInInts;t<n;t++)this._data[t]^=e._data[t];return this.incrementVersion(t),this}insertAt(e,t,n=!1){if(this.assureInRange(e,0,this._length,"pos"),0==t)return;const s=this._length;this.setLength(this._length+t);for(let n=s-1;n>=e;n--)this.setBit(n+t,this.getBit(n));for(let s=e;s<e+t;s++)this.setBit(s,n)}removeAt(e,t=1){if(t<0)throw new Error("n cannot be negative");if(this.assureInRange(e,0,this._length-t,"pos"),this.contains(!0))for(let n=e;n<this._length-t;n++)this.setBit(n,this.getBit(n+t));this.setLength(this._length-t)}removeByMask(e,t=!0){if(this._length!=e.length)throw new Error("length != mask.length");if(e==this)this.setLength(e.countBits(!t)),this.setAll(!t);else{let n=0;for(let s=-1;-1!=(s=e.findNext(s,!t));)this.setFast(n++,this.getBit(s));this._length=n,this._version++}return this}getBit(e){return!!(this._data[Math.floor(e/32)]&1<<(31&e))}setBit(e,t,n=!0){this.setFast(e,t),this._version++}setFast(e,t){t?this._data[Math.floor(e/32)]|=1<<(31&e):this._data[Math.floor(e/32)]&=~(1<<(31&e))}setTrue(e){this._data[Math.floor(e/32)]|=1<<(31&e)}setFalse(e){this._data[Math.floor(e/32)]&=~(1<<(31&e))}trueCount(){return this.countBits(!0)}falseCount(){return this.countBits(!1)}countBits(e){if(0==this._length)return 0;if(this._selectedCountVersion!=this._version){this._selectedCount=0;const e=this.lengthInInts;let t=0;for(;t<e-1;t++)for(let e=this._data[t];0!=e;e>>>=8)this._selectedCount+=s._onBitCount[255&e];let n=this._data[t];const i=31&this._length;for(0!=i&&(n&=~(4294967295<<i));0!=n;n>>>=8)this._selectedCount+=s._onBitCount[255&n];this._selectedCountVersion=this._version}return e?this._selectedCount:this._length-this._selectedCount}countWhere(e){let t=0;if(this.trueCount()==this._length)for(let n=0;n<this._length;n++)t+=e(n)?1:0;else for(let n=-1;-1!=(n=this.findNext(n,!0));)t+=e(n)?1:0;return t}andWithCountBits(e,t){if(0==this._length)return 0;let n=0;const i=this.lengthInInts;let r=0;for(;r<i-1;r++)for(let t=this._data[r]&e._data[r];0!=t;t>>>=8)n+=s._onBitCount[255&t];let o=this._data[r]&e._data[r];const a=31&this._length;for(0!=a&&(o&=~(4294967295<<a));0!=o;o>>>=8)n+=s._onBitCount[255&o];return t?n:this._length-n}clear(){this.setLength(0)}contains(e){return this.findNext(-1,e)>=0}get allTrue(){return this.countBits(!0)==this._length}get allFalse(){return this.countBits(!1)==this._length}get anyTrue(){return this.countBits(!0)>0}get anyFalse(){return this.countBits(!1)>0}findNext(e,t=!0){if(this.assureInRange(e,-1,this._length,"index"),e>=this._length-1)return-1;let n=31&(e=e<0?0:e+1);const i=this.lengthInInts;for(let r=Math.floor(e/32);r<i;r++){let i=t?this._data[r]:~this._data[r];if(0!=n)i&=4294967295<<n&4294967295,n=0;else if(!t&&-4294967296==i)continue;for(let t=0;0!=i;t+=8,i>>>=8){const n=s._firstOnBit[255&i];if(n>=0)return(e=n+32*r+t)>=this._length?-1:e}}return-1}findPrev(e,t=!0){if(0==e)return-1;this.assureInRange(e,-1,this._length,"index");let n=1+(e=e<0?this._length-1:e-1)&31;for(let i=Math.floor(e/32);i>=0;i--){let e=t?this._data[i]:~this._data[i];0!=n&&(e&=~(4294967295<<n),n=0);for(let t=24;0!=e;t-=8,e<<=8){const n=s._lastOnBit[e>>>24];if(n>=0)return n+32*i+t}}return-1}}s._onBitCount=Int8Array.from([0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8]),s._firstOnBit=Int8Array.from([-1,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0]),s._lastOnBit=Int8Array.from([-1,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7])},8070:(e,t,n)=>{"use strict";n.d(t,{cb:()=>a,PE:()=>o}),n(4328);var s=n(6082);n(9982),s.DataFrame.fromCsv('countries,fasta,smiles,molregno,LON,Zip Code,Street Address Line 1,ImageUrl,user_id,error_message,xray,flag,magnitude,CS-id,pdb_id,accel_a,time_offset,chart,fit,Questions,empty_number,empty_string\nBelgium,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C(=O)OCCCc1cccnc1)c2cccc(c2)C(=O)c3ccccc3,1480014,36.276729583740234,995042300,14016 ROUTE 31W,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,1,1,1QBS,1,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.497360340644872, 1.7058694986686864, 5.278052678195135, 0.16000320889028383],""points"":[{""x"":0.10000000149011612,""y"":2.374499797821045},{""x"":0.6000000238418579,""y"":2.6242473125457764},{""x"":1.100000023841858,""y"":2.367267608642578},{""x"":1.600000023841858,""y"":2.6723148822784424},{""x"":2.0999999046325684,""y"":2.6537344455718994},{""x"":2.5999999046325684,""y"":2.3651671409606934},{""x"":3.0999999046325684,""y"":2.5654284954071045},{""x"":3.5999999046325684,""y"":2.4160959720611572},{""x"":4.099999904632568,""y"":2.286726713180542},{""x"":4.599999904632568,""y"":2.5100042819976807},{""x"":5.099999904632568,""y"":1.6676985025405884},{""x"":5.599999904632568,""y"":0.680136501789093},{""x"":6.099999904632568,""y"":0.3391543924808502},{""x"":6.599999904632568,""y"":0.09038983285427094},{""x"":7.099999904632568,""y"":0.19802775979042053}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[7.525235855508179, 1.3186911876809984, 5.335672608564294, 0.7860743343958098],""points"":[{""x"":0.10000000149011612,""y"":7.988070487976074},{""x"":0.6000000238418579,""y"":7.018453121185303},{""x"":1.100000023841858,""y"":8.115279197692871},{""x"":1.600000023841858,""y"":7.486658096313477},{""x"":2.0999999046325684,""y"":7.396438121795654},{""x"":2.5999999046325684,""y"":7.477052211761475},{""x"":3.0999999046325684,""y"":6.913095474243164},{""x"":3.5999999046325684,""y"":8.01385498046875},{""x"":4.099999904632568,""y"":6.985900402069092},{""x"":4.599999904632568,""y"":6.970335960388184},{""x"":5.099999904632568,""y"":5.448817253112793},{""x"":5.599999904632568,""y"":2.5534818172454834},{""x"":6.099999904632568,""y"":1.893947958946228},{""x"":6.599999904632568,""y"":0.6340042352676392},{""x"":7.099999904632568,""y"":0.8403874039649963}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,100,abc\nBurundi,MDYKETLLMPKTDFPMRGGLPNKEPQIQEKW,COc1ccc2cc(ccc2c1)C(C)C(=O)Oc3ccc(C)cc3OC,1480015,36.276729583740234,995073444,80 STATE HIGHWAY 310,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,2,2,1ZP8,2,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.431460753103398, 2.1691498799246745, 5.266445597102774, 0.7825762827017926],""points"":[{""x"":0.10000000149011612,""y"":4.751083850860596},{""x"":0.6000000238418579,""y"":4.203000068664551},{""x"":1.100000023841858,""y"":4.415858745574951},{""x"":1.600000023841858,""y"":4.68414306640625},{""x"":2.0999999046325684,""y"":4.198400974273682},{""x"":2.5999999046325684,""y"":4.179222106933594},{""x"":3.0999999046325684,""y"":4.638473987579346},{""x"":3.5999999046325684,""y"":4.708553314208984},{""x"":4.099999904632568,""y"":4.291589260101318},{""x"":4.599999904632568,""y"":4.038082599639893},{""x"":5.099999904632568,""y"":3.4349939823150635},{""x"":5.599999904632568,""y"":1.2194708585739136},{""x"":6.099999904632568,""y"":1.1920831203460693},{""x"":6.599999904632568,""y"":0.5352635979652405},{""x"":7.099999904632568,""y"":0.3346920311450958}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.339458017970126, -1.0734184310171178, 4.746332950550934, 0.2482416857595658],""points"":[{""x"":0.10000000149011612,""y"":0.2139337658882141},{""x"":0.6000000238418579,""y"":0.4269562065601349},{""x"":1.100000023841858,""y"":0.2441573292016983},{""x"":1.600000023841858,""y"":0.146635964512825},{""x"":2.0999999046325684,""y"":0.08818462491035461},{""x"":2.5999999046325684,""y"":0.2560656666755676},{""x"":3.0999999046325684,""y"":0.42434045672416687},{""x"":3.5999999046325684,""y"":0.37111231684684753},{""x"":4.099999904632568,""y"":0.5581737160682678},{""x"":4.599999904632568,""y"":1.183590054512024},{""x"":5.099999904632568,""y"":1.5629843473434448},{""x"":5.599999904632568,""y"":2.3211288452148438},{""x"":6.099999904632568,""y"":2.229961633682251},{""x"":6.599999904632568,""y"":2.2560226917266846},{""x"":7.099999904632568,""y"":2.2142398357391357}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCameroon,MIEVFLFGIVLGLIPITLAGLFVTAYLQYRRGDQLDL,COc1ccc2cc(ccc2c1)C(C)C(=O)OCCCc3cccnc3,1480016,36.26095962524414,995153596,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,3,3,2BDJ,3,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.6760652578642325, 0.9046956320756703, 5.651408971856738, 0.07738846012184185],""points"":[{""x"":0.10000000149011612,""y"":4.32425594329834},{""x"":0.6000000238418579,""y"":4.668442249298096},{""x"":1.100000023841858,""y"":4.379785060882568},{""x"":1.600000023841858,""y"":5.0345139503479},{""x"":2.0999999046325684,""y"":4.878653526306152},{""x"":2.5999999046325684,""y"":4.3451313972473145},{""x"":3.0999999046325684,""y"":4.336992263793945},{""x"":3.5999999046325684,""y"":5.037430286407471},{""x"":4.099999904632568,""y"":5.0092692375183105},{""x"":4.599999904632568,""y"":4.151902675628662},{""x"":5.099999904632568,""y"":3.4066951274871826},{""x"":5.599999904632568,""y"":2.3732759952545166},{""x"":6.099999904632568,""y"":1.673728108406067},{""x"":6.599999904632568,""y"":0.48574790358543396},{""x"":7.099999904632568,""y"":0.2783052325248718}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.938395863010111, -1.4658480661392117, 5.462702751996584, 0.3473139023615039],""points"":[{""x"":0.10000000149011612,""y"":0.4941710829734802},{""x"":0.6000000238418579,""y"":0.15323974192142487},{""x"":1.100000023841858,""y"":0.46373432874679565},{""x"":1.600000023841858,""y"":0.3370431363582611},{""x"":2.0999999046325684,""y"":0.5179030299186707},{""x"":2.5999999046325684,""y"":0.27899765968322754},{""x"":3.0999999046325684,""y"":0.22075064480304718},{""x"":3.5999999046325684,""y"":0.5789918899536133},{""x"":4.099999904632568,""y"":0.21169911324977875},{""x"":4.599999904632568,""y"":0.27857646346092224},{""x"":5.099999904632568,""y"":1.0906332731246948},{""x"":5.599999904632568,""y"":1.8520300388336182},{""x"":6.099999904632568,""y"":2.7177059650421143},{""x"":6.599999904632568,""y"":2.8680918216705322},{""x"":7.099999904632568,""y"":3.2413077354431152}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCanada,MMELVLKTIIGPIVVGVVLRIVDKWLNKDK,CC(C(=O)NCCS)c1cccc(c1)C(=O)c2ccccc2,1480017,36.26095962524414,99515,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,4,4,1IAN,4,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[0.8597390975430008, 1.0957625732481946, 5.260537067987958, 0.07974187998177736],""points"":[{""x"":0.10000000149011612,""y"":0.8190152645111084},{""x"":0.6000000238418579,""y"":0.8421689867973328},{""x"":1.100000023841858,""y"":0.8740922212600708},{""x"":1.600000023841858,""y"":0.8924275040626526},{""x"":2.0999999046325684,""y"":0.8249067664146423},{""x"":2.5999999046325684,""y"":0.9327669143676758},{""x"":3.0999999046325684,""y"":0.8522974252700806},{""x"":3.5999999046325684,""y"":0.8174492716789246},{""x"":4.099999904632568,""y"":0.8394647240638733},{""x"":4.599999904632568,""y"":0.7139387726783752},{""x"":5.099999904632568,""y"":0.5561167597770691},{""x"":5.599999904632568,""y"":0.3276226818561554},{""x"":6.099999904632568,""y"":0.12479474395513535},{""x"":6.599999904632568,""y"":0.13006797432899475},{""x"":7.099999904632568,""y"":0.059702079743146896}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.760930219582546, 1.6591793293833013, 4.667155929720851, 0.7858109544121652],""points"":[{""x"":0.10000000149011612,""y"":6.156993389129639},{""x"":0.6000000238418579,""y"":5.236701965332031},{""x"":1.100000023841858,""y"":6.010560512542725},{""x"":1.600000023841858,""y"":5.495512962341309},{""x"":2.0999999046325684,""y"":6.087770462036133},{""x"":2.5999999046325684,""y"":5.79986572265625},{""x"":3.0999999046325684,""y"":5.597546577453613},{""x"":3.5999999046325684,""y"":5.520902156829834},{""x"":4.099999904632568,""y"":5.360654354095459},{""x"":4.599999904632568,""y"":3.5539746284484863},{""x"":5.099999904632568,""y"":1.577236294746399},{""x"":5.599999904632568,""y"":1.0001264810562134},{""x"":6.099999904632568,""y"":0.9305797815322876},{""x"":6.599999904632568,""y"":0.6033638715744019},{""x"":7.099999904632568,""y"":0.4203685522079468}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nColombia,MDRTDEVSNHTHDKPTLTWFEEIFEEYHSPFHN,FC(F)(F)c1ccc(OC2CCNCC2)cc1,1480029,36.3309440612793,995152050,1 COURT HOUSE SQUARE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,5,5,4UJ1,5,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[6.4995088314153655, 2.4270351004539914, 5.178659535348579, 0.625653346241577],""points"":[{""x"":0.10000000149011612,""y"":6.496231555938721},{""x"":0.6000000238418579,""y"":6.42543363571167},{""x"":1.100000023841858,""y"":7.040063858032227},{""x"":1.600000023841858,""y"":6.1115403175354},{""x"":2.0999999046325684,""y"":6.680728435516357},{""x"":2.5999999046325684,""y"":6.406774520874023},{""x"":3.0999999046325684,""y"":6.611269474029541},{""x"":3.5999999046325684,""y"":5.889094352722168},{""x"":4.099999904632568,""y"":6.75344705581665},{""x"":4.599999904632568,""y"":6.361435890197754},{""x"":5.099999904632568,""y"":4.1666975021362305},{""x"":5.599999904632568,""y"":1.172118902206421},{""x"":6.099999904632568,""y"":0.801048994064331},{""x"":6.599999904632568,""y"":0.4640021026134491},{""x"":7.099999904632568,""y"":0.0010357667924836278}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[1.4734381347446401, 1.1649805188074196, 4.82958608866421, 0.09500545496710007],""points"":[{""x"":0.10000000149011612,""y"":1.5279096364974976},{""x"":0.6000000238418579,""y"":1.3559974431991577},{""x"":1.100000023841858,""y"":1.5246378183364868},{""x"":1.600000023841858,""y"":1.5567657947540283},{""x"":2.0999999046325684,""y"":1.4114240407943726},{""x"":2.5999999046325684,""y"":1.4045010805130005},{""x"":3.0999999046325684,""y"":1.4769829511642456},{""x"":3.5999999046325684,""y"":1.4875500202178955},{""x"":4.099999904632568,""y"":1.2991987466812134},{""x"":4.599999904632568,""y"":0.922961413860321},{""x"":5.099999904632568,""y"":0.6520044803619385},{""x"":5.599999904632568,""y"":0.15350978076457977},{""x"":6.099999904632568,""y"":0.1078903079032898},{""x"":6.599999904632568,""y"":0.17276449501514435},{""x"":7.099999904632568,""y"":0.14066608250141144}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCosta Rica,MKSTKEEIQTIKTLLKDSRTAKYHKRLQIVL,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCCc3ccccc3,1480018,36.3309440612793,995084218,4041 SOUTHWESTERN BLVD,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,6,6,2BPW,6,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.4833641843311227, -1.8945978742090062, 4.671127708092568, 0.24159861311815153],""points"":[{""x"":0.10000000149011612,""y"":0.0969524160027504},{""x"":0.6000000238418579,""y"":0.028483040630817413},{""x"":1.100000023841858,""y"":0.22087176144123077},{""x"":1.600000023841858,""y"":0.0068915546871721745},{""x"":2.0999999046325684,""y"":0.4305879771709442},{""x"":2.5999999046325684,""y"":0.44774115085601807},{""x"":3.0999999046325684,""y"":0.45346319675445557},{""x"":3.5999999046325684,""y"":0.2370593100786209},{""x"":4.099999904632568,""y"":0.4657953977584839},{""x"":4.599999904632568,""y"":1.155200719833374},{""x"":5.099999904632568,""y"":2.2294070720672607},{""x"":5.599999904632568,""y"":2.4311530590057373},{""x"":6.099999904632568,""y"":2.33846116065979},{""x"":6.599999904632568,""y"":2.608201026916504},{""x"":7.099999904632568,""y"":2.8136143684387207}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.224573521642033, 1.4454033924198528, 5.6014197746076535, 0.2823216054197577],""points"":[{""x"":0.10000000149011612,""y"":4.95027494430542},{""x"":0.6000000238418579,""y"":5.1754679679870605},{""x"":1.100000023841858,""y"":5.276752948760986},{""x"":1.600000023841858,""y"":5.589294910430908},{""x"":2.0999999046325684,""y"":5.616994857788086},{""x"":2.5999999046325684,""y"":5.120813846588135},{""x"":3.0999999046325684,""y"":5.340766906738281},{""x"":3.5999999046325684,""y"":4.876471042633057},{""x"":4.099999904632568,""y"":4.94999361038208},{""x"":4.599999904632568,""y"":5.162564754486084},{""x"":5.099999904632568,""y"":4.399557590484619},{""x"":5.599999904632568,""y"":2.7977969646453857},{""x"":6.099999904632568,""y"":1.0229872465133667},{""x"":6.599999904632568,""y"":0.48275601863861084},{""x"":7.099999904632568,""y"":0.10408931970596313}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCuba,MHAILRYFIRRLFYHIFYKIYSLISKKHQSLPSDVRQF,COc1ccc2c(c1)c(CC(=O)N3CCCC3C(=O)Oc4ccc(C)cc4OC)c(C)n2C(=O)c5ccc(Cl)cc5,1480019,36.33115768432617,995081928,1227 US HIGHWAY 11,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,7,7,1QBS,7,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.320838679713925, -1.2421619987316728, 4.831325425225256, 0.3236011098403072],""points"":[{""x"":0.10000000149011612,""y"":0.3727470338344574},{""x"":0.6000000238418579,""y"":0.12365014106035233},{""x"":1.100000023841858,""y"":0.48422467708587646},{""x"":1.600000023841858,""y"":0.2264465093612671},{""x"":2.0999999046325684,""y"":0.16821794211864471},{""x"":2.5999999046325684,""y"":0.3879014551639557},{""x"":3.0999999046325684,""y"":0.5470244884490967},{""x"":3.5999999046325684,""y"":0.3419053554534912},{""x"":4.099999904632568,""y"":0.7655120491981506},{""x"":4.599999904632568,""y"":1.2346516847610474},{""x"":5.099999904632568,""y"":2.453336715698242},{""x"":5.599999904632568,""y"":2.9565491676330566},{""x"":6.099999904632568,""y"":3.335299491882324},{""x"":6.599999904632568,""y"":3.240290880203247},{""x"":7.099999904632568,""y"":3.1107218265533447}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.6401853521511094, 1.26211588875013, 5.399028074402744, 0.5089580830068091],""points"":[{""x"":0.10000000149011612,""y"":3.8585598468780518},{""x"":0.6000000238418579,""y"":3.6077206134796143},{""x"":1.100000023841858,""y"":3.855252265930176},{""x"":1.600000023841858,""y"":3.619039297103882},{""x"":2.0999999046325684,""y"":3.839388370513916},{""x"":2.5999999046325684,""y"":3.335283041000366},{""x"":3.0999999046325684,""y"":3.571141481399536},{""x"":3.5999999046325684,""y"":3.4155046939849854},{""x"":4.099999904632568,""y"":3.7316646575927734},{""x"":4.599999904632568,""y"":3.0680155754089355},{""x"":5.099999904632568,""y"":2.891066551208496},{""x"":5.599999904632568,""y"":1.6022753715515137},{""x"":6.099999904632568,""y"":0.7652576565742493},{""x"":6.599999904632568,""y"":0.6875326037406921},{""x"":7.099999904632568,""y"":0.5828871726989746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nItaly,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO[N+](=O)[O-],1480020,36.33115768432617,99502,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,8,8,1ZP8,8,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.293592105923809, 1.3781586549141835, 5.1025898038676605, 0.03493851245291291],""points"":[{""x"":0.10000000149011612,""y"":2.1287283897399902},{""x"":0.6000000238418579,""y"":2.267972230911255},{""x"":1.100000023841858,""y"":2.398442506790161},{""x"":1.600000023841858,""y"":2.5130622386932373},{""x"":2.0999999046325684,""y"":2.3255116939544678},{""x"":2.5999999046325684,""y"":2.127340793609619},{""x"":3.0999999046325684,""y"":2.47259783744812},{""x"":3.5999999046325684,""y"":2.131181478500366},{""x"":4.099999904632568,""y"":2.090421438217163},{""x"":4.599999904632568,""y"":2.02299165725708},{""x"":5.099999904632568,""y"":1.1105059385299683},{""x"":5.599999904632568,""y"":0.4494485855102539},{""x"":6.099999904632568,""y"":0.1375635862350464},{""x"":6.599999904632568,""y"":0.036351121962070465},{""x"":7.099999904632568,""y"":0.1619771122932434}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.953125499439879, 1.2528620255306528, 5.187637440149802, 0.3110348753260886],""points"":[{""x"":0.10000000149011612,""y"":5.6585283279418945},{""x"":0.6000000238418579,""y"":5.911152362823486},{""x"":1.100000023841858,""y"":5.924920082092285},{""x"":1.600000023841858,""y"":5.8469438552856445},{""x"":2.0999999046325684,""y"":5.929472923278809},{""x"":2.5999999046325684,""y"":6.190037727355957},{""x"":3.0999999046325684,""y"":6.236179828643799},{""x"":3.5999999046325684,""y"":6.141019344329834},{""x"":4.099999904632568,""y"":5.295210838317871},{""x"":4.599999904632568,""y"":5.265801906585693},{""x"":5.099999904632568,""y"":3.3722851276397705},{""x"":5.599999904632568,""y"":1.8299226760864258},{""x"":6.099999904632568,""y"":0.32690900564193726},{""x"":6.599999904632568,""y"":0.6274543404579163},{""x"":7.099999904632568,""y"":0.8441857099533081}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nRwanda,MPNSEPASLLELFNSIATQGELVRSLKAGNASK,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO,1480021,36.33137130737305,995037247,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,9,2BDJ,9,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.8209972202654474, 1.3779216716448506, 5.299882228439686, 0.06040645519069608],""points"":[{""x"":0.10000000149011612,""y"":3.7821109294891357},{""x"":0.6000000238418579,""y"":3.542433023452759},{""x"":1.100000023841858,""y"":3.7008674144744873},{""x"":1.600000023841858,""y"":3.717301607131958},{""x"":2.0999999046325684,""y"":4.024452209472656},{""x"":2.5999999046325684,""y"":4.013899326324463},{""x"":3.0999999046325684,""y"":3.945094347000122},{""x"":3.5999999046325684,""y"":3.866621971130371},{""x"":4.099999904632568,""y"":3.7461626529693604},{""x"":4.599999904632568,""y"":3.3454740047454834},{""x"":5.099999904632568,""y"":2.61944317817688},{""x"":5.599999904632568,""y"":0.999405026435852},{""x"":6.099999904632568,""y"":0.46259793639183044},{""x"":6.599999904632568,""y"":0.054134611040353775},{""x"":7.099999904632568,""y"":0.05711187422275543}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.6318079657726035, 1.8495493770000595, 5.391793312471116, 0.17060707587348442],""points"":[{""x"":0.10000000149011612,""y"":5.458079814910889},{""x"":0.6000000238418579,""y"":5.554427146911621},{""x"":1.100000023841858,""y"":5.799983024597168},{""x"":1.600000023841858,""y"":5.364140033721924},{""x"":2.0999999046325684,""y"":5.864485740661621},{""x"":2.5999999046325684,""y"":5.4509806632995605},{""x"":3.0999999046325684,""y"":5.702574729919434},{""x"":3.5999999046325684,""y"":5.7314534187316895},{""x"":4.099999904632568,""y"":5.5123443603515625},{""x"":4.599999904632568,""y"":5.724395751953125},{""x"":5.099999904632568,""y"":4.354506969451904},{""x"":5.599999904632568,""y"":1.7307666540145874},{""x"":6.099999904632568,""y"":0.6305936574935913},{""x"":6.599999904632568,""y"":0.035183437168598175},{""x"":7.099999904632568,""y"":0.7575169205665588}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nSwitzerland,IRVVGRYLIEVWKAAGMDMDKVLFLWSSDEI,CN1CCC(CC1)Oc2ccc(cc2)C(F)(F)F,1480028,36.33137130737305,99504,92-11 179TH PLACE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,10,1IAN,10,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[1.1190255865097471, 2.3163895161544437, 5.4968866182279195, 0.2035204047289052],""points"":[{""x"":0.10000000149011612,""y"":1.1057683229446411},{""x"":0.6000000238418579,""y"":1.1019697189331055},{""x"":1.100000023841858,""y"":1.0818607807159424},{""x"":1.600000023841858,""y"":1.062997817993164},{""x"":2.0999999046325684,""y"":1.046447515487671},{""x"":2.5999999046325684,""y"":1.1217249631881714},{""x"":3.0999999046325684,""y"":1.2166996002197266},{""x"":3.5999999046325684,""y"":1.215477705001831},{""x"":4.099999904632568,""y"":1.0581893920898438},{""x"":4.599999904632568,""y"":1.1747995615005493},{""x"":5.099999904632568,""y"":1.0181127786636353},{""x"":5.599999904632568,""y"":0.5344523191452026},{""x"":6.099999904632568,""y"":0.2569526433944702},{""x"":6.599999904632568,""y"":0.1912207305431366},{""x"":7.099999904632568,""y"":0.15060538053512573}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.1038581025805785, 2.0032224204185245, 5.087602825989163, 0.13277988512492753],""points"":[{""x"":0.10000000149011612,""y"":3.0498509407043457},{""x"":0.6000000238418579,""y"":2.805217742919922},{""x"":1.100000023841858,""y"":3.3415253162384033},{""x"":1.600000023841858,""y"":3.0549843311309814},{""x"":2.0999999046325684,""y"":3.250074863433838},{""x"":2.5999999046325684,""y"":3.0432586669921875},{""x"":3.0999999046325684,""y"":3.265852451324463},{""x"":3.5999999046325684,""y"":2.9475724697113037},{""x"":4.099999904632568,""y"":3.1929898262023926},{""x"":4.599999904632568,""y"":2.7460060119628906},{""x"":5.099999904632568,""y"":1.6175861358642578},{""x"":5.599999904632568,""y"":0.3006608486175537},{""x"":6.099999904632568,""y"":0.3444803059101105},{""x"":6.599999904632568,""y"":0.015537971630692482},{""x"":7.099999904632568,""y"":0.5527358055114746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\n,,,,,,,,,,,,,,,,,,,,,').columns.add(s.Column.fromList(s.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))));var i,r=function(e,t,n,s){return new(n||(n=Promise))((function(i,r){function o(e){try{l(s.next(e))}catch(e){r(e)}}function a(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((s=s.apply(e,t||[])).next())}))};function o(e,t,n,s=0,i="timeout"){return r(this,void 0,void 0,(function*(){return new Promise(((r,o)=>{const a=e.subscribe((e=>{try{t(e),r("OK")}catch(e){o(e)}finally{a.unsubscribe(),clearTimeout(l)}})),l=setTimeout((()=>{a.unsubscribe(),o(i)}),s);n()}))}))}function a(e){return r(this,void 0,void 0,(function*(){yield new Promise((t=>setTimeout(t,e)))}))}console.log.bind(console),console.info.bind(console),console.warn.bind(console),console.error.bind(console),function(e){e.notNull=function(e,t){if(null==e)throw new Error(`${null==t?"Value":t} not defined`)}}(i||(i={})),s.DataFrame.fromColumns([s.Column.fromStrings("col",["val1","val2","val3"])])},3629:(e,t,n)=>{"use strict";function s(e=!1,t="Assertion error."){if(!e)throw new Error(t)}function i(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n]*e[n];return Math.sqrt(t)}function r(e,t){if(e.length!=t.length)throw new Error("The dimensionality of the vectors must match");let n=0;for(let s=0;s<e.length;s++)n+=e[s]*t[s];return n}function o(e,t){let n=0;const s=e.length;if(s!==t.length)throw new Error("The dimensionality of the vectors must match");for(let i=0;i<s;++i)n+=Math.pow(e[i]-t[i],2);return Math.sqrt(n)}function a(e){const t=e.length;let n=0,s=0;for(let i=0;i<t;++i)n+=e[i],s+=Math.pow(e[i],2);const i=n/t,r=1/Math.sqrt(s/t-Math.pow(i,2));for(let n=0;n<t;++n)e[n]=(e[n]-i)*r;return e}n.d(t,{KE:()=>r,S8:()=>a,ou:()=>o,vA:()=>s,wQ:()=>i})},1913:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=n(3282),i=n(9029),r=n(1520),o=n(2586),a=n(8708),l=n(2023),c="errorMessage",u=new s.Name("emUsed"),h={required:"missingProperty",dependencies:"property",dependentRequired:"property"},d=/\$\{[^}]+\}/,m=/\$\{([^}]+)\}/g,p=/^""\s*\+\s*|\s*\+\s*""$/g;const f=(e,t={})=>{if(!e.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(e.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return e.addKeyword(function(e){return{keyword:c,schemaType:["string","object"],post:!0,code(t){const{gen:n,data:f,schema:g,schemaValue:y,it:b}=t;if(!1===b.createErrors)return;const v=g,w=i.strConcat(l.default.instancePath,b.errorPath);function C(e,t){return i.and(s._`${e}.keyword !== ${c}`,s._`!${e}.${u}`,s._`${e}.instancePath === ${w}`,s._`${e}.keyword in ${t}`,s._`${e}.schemaPath.indexOf(${b.errSchemaPath}) === 0`,s._`/^\\/[^\\/]*$/.test(${e}.schemaPath.slice(${b.errSchemaPath.length}))`)}function A(e,t){const s=[];for(const n in e){const e=t[n];d.test(e)&&s.push([n,x(e)])}return n.object(...s)}function S(e){return d.test(e)?new r._Code(r.safeStringify(e).replace(m,((e,t)=>`" + JSON.stringify(${o.getData(t,b)}) + "`)).replace(p,"")):s.stringify(e)}function x(e){return s._`function(){return ${S(e)}}`}n.if(s._`${l.default.errors} > 0`,(()=>{if("object"==typeof v){const[r,o]=function(e){let t,n;for(const s in e){if("properties"===s||"items"===s)continue;const i=e[s];if("object"==typeof i){t||(t={});const e=t[s]={};for(const t in i)e[t]=[]}else n||(n={}),n[s]=[]}return[t,n]}(v);o&&function(i){const r=n.const("emErrors",s.stringify(i)),o=n.const("templates",A(i,g));n.forOf("err",l.default.vErrors,(e=>n.if(C(e,r),(()=>n.code(s._`${r}[${e}.keyword].push(${e})`).assign(s._`${e}.${u}`,!0)))));const{singleError:c}=e;if(c){const e=n.let("message",s._`""`),i=n.let("paramsErrors",s._`[]`);h((t=>{n.if(e,(()=>n.code(s._`${e} += ${"string"==typeof c?c:";"}`))),n.code(s._`${e} += ${d(t)}`),n.assign(i,s._`${i}.concat(${r}[${t}])`)})),a.reportError(t,{message:e,params:s._`{errors: ${i}}`})}else h((e=>a.reportError(t,{message:d(e),params:s._`{errors: ${r}[${e}]}`})));function h(e){n.forIn("key",r,(t=>n.if(s._`${r}[${t}].length`,(()=>e(t)))))}function d(e){return s._`${e} in ${o} ? ${o}[${e}]() : ${y}[${e}]`}}(o),r&&function(e){const i=n.const("emErrors",s.stringify(e)),r=[];for(const t in e)r.push([t,A(e[t],g[t])]);const o=n.const("templates",n.object(...r)),c=n.scopeValue("obj",{ref:h,code:s.stringify(h)}),d=n.let("emPropParams"),m=n.let("emParamsErrors");n.forOf("err",l.default.vErrors,(e=>n.if(C(e,i),(()=>{n.assign(d,s._`${c}[${e}.keyword]`),n.assign(m,s._`${i}[${e}.keyword][${e}.params[${d}]]`),n.if(m,(()=>n.code(s._`${m}.push(${e})`).assign(s._`${e}.${u}`,!0)))})))),n.forIn("key",i,(e=>n.forIn("keyProp",s._`${i}[${e}]`,(r=>{n.assign(m,s._`${i}[${e}][${r}]`),n.if(s._`${m}.length`,(()=>{const i=n.const("tmpl",s._`${o}[${e}] && ${o}[${e}][${r}]`);a.reportError(t,{message:s._`${i} ? ${i}() : ${y}[${e}][${r}]`,params:s._`{errors: ${m}}`})}))}))))}(r),function(e){const{props:r,items:o}=e;if(!r&&!o)return;const h=s._`typeof ${f} == "object"`,d=s._`Array.isArray(${f})`,m=n.let("emErrors");let p,b;const v=n.let("templates");function C(e,t){n.assign(m,s.stringify(e)),n.assign(v,A(e,t))}r&&o?(p=n.let("emChildKwd"),n.if(h),n.if(d,(()=>{C(o,g.items),n.assign(p,s.str`items`)}),(()=>{C(r,g.properties),n.assign(p,s.str`properties`)})),b=s._`[${p}]`):o?(n.if(d),C(o,g.items),b=s._`.items`):r&&(n.if(i.and(h,i.not(d))),C(r,g.properties),b=s._`.properties`),n.forOf("err",l.default.vErrors,(e=>function(e,t,r){n.if(i.and(s._`${e}.keyword !== ${c}`,s._`!${e}.${u}`,s._`${e}.instancePath.indexOf(${w}) === 0`),(()=>{const i=n.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:s._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),o=n.const("emMatches",s._`${i}.exec(${e}.instancePath.slice(${w}.length))`),a=n.const("emChild",s._`${o} && ${o}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);n.if(s._`${a} !== undefined && ${a} in ${t}`,(()=>r(a)))}))}(e,m,(t=>n.code(s._`${m}[${t}].push(${e})`).assign(s._`${e}.${u}`,!0))))),n.forIn("key",m,(e=>n.if(s._`${m}[${e}].length`,(()=>{a.reportError(t,{message:s._`${e} in ${v} ? ${v}[${e}]() : ${y}${b}[${e}]`,params:s._`{errors: ${m}[${e}]}`}),n.assign(s._`${l.default.vErrors}[${l.default.errors}-1].instancePath`,s._`${w} + "/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),n.endIf()}(function({properties:e,items:t}){const n={};if(e){n.props={};for(const t in e)n.props[t]=[]}if(t){n.items={};for(let e=0;e<t.length;e++)n.items[e]=[]}return n}(v))}const r="string"==typeof v?v:v._;r&&function(e){const r=n.const("emErrs",s._`[]`);n.forOf("err",l.default.vErrors,(e=>n.if(function(e){return i.and(s._`${e}.keyword !== ${c}`,s._`!${e}.${u}`,i.or(s._`${e}.instancePath === ${w}`,i.and(s._`${e}.instancePath.indexOf(${w}) === 0`,s._`${e}.instancePath[${w}.length] === "/"`)),s._`${e}.schemaPath.indexOf(${b.errSchemaPath}) === 0`,s._`${e}.schemaPath[${b.errSchemaPath}.length] === "/"`)}(e),(()=>n.code(s._`${r}.push(${e})`).assign(s._`${e}.${u}`,!0))))),n.if(s._`${r}.length`,(()=>a.reportError(t,{message:S(e),params:s._`{errors: ${r}}`})))}(r),e.keepErrors||function(){const e=n.const("emErrs",s._`[]`);n.forOf("err",l.default.vErrors,(t=>n.if(s._`!${t}.${u}`,(()=>n.code(s._`${e}.push(${t})`))))),n.assign(l.default.vErrors,e).assign(l.default.errors,s._`${e}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}(t))};t.default=f,e.exports=f,e.exports.default=f},7433:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const s=n(4042),i=n(6105),r=n(6653),o=n(9572),a="https://json-schema.org/draft/2020-12/schema";class l extends s.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:e,meta:t}=this.opts;t&&(o.default.call(this,e),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv2020=l,e.exports=t=l,e.exports.Ajv2020=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var c=n(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=n(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var h=n(3558);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var d=n(4551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})},3282:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const s=n(4042),i=n(6144),r=n(6653),o=n(2079),a=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends s.default{_addVocabularies(){super._addVocabularies(),i.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(e,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=n(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var h=n(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}});var d=n(3558);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var m=n(4551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})},1520:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class n{}t._CodeOrName=n,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class s extends n{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=s;class i extends n{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof s&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function r(e,...t){const n=[e[0]];let s=0;for(;s<t.length;)l(n,t[s]),n.push(e[++s]);return new i(n)}t._Code=i,t.nil=new i(""),t._=r;const o=new i("+");function a(e,...t){const n=[u(e[0])];let s=0;for(;s<t.length;)n.push(o),l(n,t[s]),n.push(o,u(e[++s]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===o){const n=c(e[t-1],e[t+1]);if(void 0!==n){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}(n),new i(n)}function l(e,t){var n;t instanceof i?e.push(...t._items):t instanceof s?e.push(t):e.push("number"==typeof(n=t)||"boolean"==typeof n||null===n?n:u(Array.isArray(n)?n.join(","):n))}function c(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof s||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof s?void 0:`"${e}${t.slice(1)}`}function u(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=a,t.addCodeArg=l,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:a`${e}${t}`},t.stringify=function(e){return new i(u(e))},t.safeStringify=u,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new i(`.${e}`):r`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new i(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new i(e.toString())}},9029:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const s=n(1520),i=n(7845);var r=n(1520);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}});var o=n(7845);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),t.operators={GT:new s._Code(">"),GTE:new s._Code(">="),LT:new s._Code("<"),LTE:new s._Code("<="),EQ:new s._Code("==="),NEQ:new s._Code("!=="),NOT:new s._Code("!"),OR:new s._Code("||"),AND:new s._Code("&&"),ADD:new s._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class l extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){const n=e?i.varKinds.var:this.varKind,s=void 0===this.rhs?"":` = ${this.rhs}`;return`${n} ${this.name}${s};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=L(this.rhs,e,t)),this}get names(){return this.rhs instanceof s._CodeOrName?this.rhs.names:{}}}class c extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof s.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=L(this.rhs,e,t),this}get names(){return $(this.lhs instanceof s.Name?{}:{...this.lhs.names},this.rhs)}}class u extends c{constructor(e,t,n,s){super(e,n,s),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class h extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class d extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class m extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class p extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=L(this.code,e,t),this}get names(){return this.code instanceof s._CodeOrName?this.code.names:{}}}class f extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,n)=>t+n.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:n}=this;let s=n.length;for(;s--;){const i=n[s];i.optimizeNames(e,t)||(N(e,i.names),n.splice(s,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>M(e,t.names)),{})}}class g extends f{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class y extends f{}class b extends g{}b.kind="else";class v extends g{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new b(e):e}return t?!1===e?t instanceof v?t:t.nodes:this.nodes.length?this:new v(P(e),t instanceof v?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var n;if(this.else=null===(n=this.else)||void 0===n?void 0:n.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=L(this.condition,e,t),this}get names(){const e=super.names;return $(e,this.condition),this.else&&M(e,this.else.names),e}}v.kind="if";class w extends g{}w.kind="for";class C extends w{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=L(this.iteration,e,t),this}get names(){return M(super.names,this.iteration.names)}}class A extends w{constructor(e,t,n,s){super(),this.varKind=e,this.name=t,this.from=n,this.to=s}render(e){const t=e.es5?i.varKinds.var:this.varKind,{name:n,from:s,to:r}=this;return`for(${t} ${n}=${s}; ${n}<${r}; ${n}++)`+super.render(e)}get names(){const e=$(super.names,this.from);return $(e,this.to)}}class S extends w{constructor(e,t,n,s){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=s}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=L(this.iterable,e,t),this}get names(){return M(super.names,this.iterable.names)}}class x extends g{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}x.kind="func";class E extends f{render(e){return"return "+super.render(e)}}E.kind="return";class _ extends g{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var n,s;return super.optimizeNames(e,t),null===(n=this.catch)||void 0===n||n.optimizeNames(e,t),null===(s=this.finally)||void 0===s||s.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&M(e,this.catch.names),this.finally&&M(e,this.finally.names),e}}class I extends g{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}I.kind="catch";class T extends g{render(e){return"finally"+super.render(e)}}function M(e,t){for(const n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function $(e,t){return t instanceof s._CodeOrName?M(e,t.names):e}function L(e,t,n){return e instanceof s.Name?r(e):(i=e)instanceof s._Code&&i._items.some((e=>e instanceof s.Name&&1===t[e.str]&&void 0!==n[e.str]))?new s._Code(e._items.reduce(((e,t)=>(t instanceof s.Name&&(t=r(t)),t instanceof s._Code?e.push(...t._items):e.push(t),e)),[])):e;var i;function r(e){const s=n[e.str];return void 0===s||1!==t[e.str]?e:(delete t[e.str],s)}}function N(e,t){for(const n in t)e[n]=(e[n]||0)-(t[n]||0)}function P(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:s._`!${F(e)}`}T.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new i.Scope({parent:e}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,s){const i=this._scope.toName(t);return void 0!==n&&s&&(this._constants[i.str]=n),this._leafNode(new l(e,i,n)),i}const(e,t,n){return this._def(i.varKinds.const,e,t,n)}let(e,t,n){return this._def(i.varKinds.let,e,t,n)}var(e,t,n){return this._def(i.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new c(e,t,n))}add(e,n){return this._leafNode(new u(e,t.operators.ADD,n))}code(e){return"function"==typeof e?e():e!==s.nil&&this._leafNode(new p(e)),this}object(...e){const t=["{"];for(const[n,i]of e)t.length>1&&t.push(","),t.push(n),(n!==i||this.opts.es5)&&(t.push(":"),(0,s.addCodeArg)(t,i));return t.push("}"),new s._Code(t)}if(e,t,n){if(this._blockNode(new v(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new v(e))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(v,b)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new C(e),t)}forRange(e,t,n,s,r=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const o=this._scope.toName(e);return this._for(new A(r,o,t,n),(()=>s(o)))}forOf(e,t,n,r=i.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=t instanceof s.Name?t:this.var("_arr",t);return this.forRange("_i",0,s._`${e}.length`,(t=>{this.var(o,s._`${e}[${t}]`),n(o)}))}return this._for(new S("of",r,o,t),(()=>n(o)))}forIn(e,t,n,r=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,s._`Object.keys(${t})`,n);const o=this._scope.toName(e);return this._for(new S("in",r,o,t),(()=>n(o)))}endFor(){return this._endBlockNode(w)}label(e){return this._leafNode(new h(e))}break(e){return this._leafNode(new d(e))}return(e){const t=new E;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');const s=new _;if(this._blockNode(s),this.code(e),t){const e=this.name("e");this._currNode=s.catch=new I(e),t(e)}return n&&(this._currNode=s.finally=new T,this.code(n)),this._endBlockNode(I,T)}throw(e){return this._leafNode(new m(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const n=this._nodes.length-t;if(n<0||void 0!==e&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=s.nil,n,i){return this._blockNode(new x(e,t,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(x)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=P;const R=k(t.operators.AND);t.and=function(...e){return e.reduce(R)};const O=k(t.operators.OR);function k(e){return(t,n)=>t===s.nil?n:n===s.nil?t:s._`${F(t)} ${e} ${F(n)}`}function F(e){return e instanceof s.Name?e:s._`(${e})`}t.or=function(...e){return e.reduce(O)}},7845:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const s=n(1520);class i extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var r;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(r||(t.UsedValueState=r={})),t.varKinds={const:new s.Name("const"),let:new s.Name("let"),var:new s.Name("var")};class o{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof s.Name?e:this.name(e)}name(e){return new s.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,n;if((null===(n=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===n?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=o;class a extends s.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=s._`.${new s.Name(t)}[${n}]`}}t.ValueScopeName=a;const l=s._`\n`;t.ValueScope=class extends o{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?l:s.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var n;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const s=this.toName(e),{prefix:i}=s,r=null!==(n=t.key)&&void 0!==n?n:t.ref;let o=this._values[i];if(o){const e=o.get(r);if(e)return e}else o=this._values[i]=new Map;o.set(r,s);const a=this._scope[i]||(this._scope[i]=[]),l=a.length;return a[l]=t.ref,s.setValue(t,{property:i,itemIndex:l}),s}getValue(e,t){const n=this._values[e];if(n)return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return s._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,n){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,n)}_reduceValues(e,n,o={},a){let l=s.nil;for(const c in e){const u=e[c];if(!u)continue;const h=o[c]=o[c]||new Map;u.forEach((e=>{if(h.has(e))return;h.set(e,r.Started);let o=n(e);if(o){const n=this.opts.es5?t.varKinds.var:t.varKinds.const;l=s._`${l}${n} ${e} = ${o};${this.opts._n}`}else{if(!(o=null==a?void 0:a(e)))throw new i(e);l=s._`${l}${o}${this.opts._n}`}h.set(e,r.Completed)}))}return l}}},8708:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const s=n(9029),i=n(4227),r=n(2023);function o(e,t){const n=e.const("err",t);e.if(s._`${r.default.vErrors} === null`,(()=>e.assign(r.default.vErrors,s._`[${n}]`)),s._`${r.default.vErrors}.push(${n})`),e.code(s._`${r.default.errors}++`)}function a(e,t){const{gen:n,validateName:i,schemaEnv:r}=e;r.$async?n.throw(s._`new ${e.ValidationError}(${t})`):(n.assign(s._`${i}.errors`,t),n.return(!1))}t.keywordError={message:({keyword:e})=>s.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?s.str`"${e}" keyword must be ${t} ($data)`:s.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,n=t.keywordError,i,r){const{it:l}=e,{gen:u,compositeRule:h,allErrors:d}=l,m=c(e,n,i);(null!=r?r:h||d)?o(u,m):a(l,s._`[${m}]`)},t.reportExtraError=function(e,n=t.keywordError,s){const{it:i}=e,{gen:l,compositeRule:u,allErrors:h}=i;o(l,c(e,n,s)),u||h||a(i,r.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(r.default.errors,t),e.if(s._`${r.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(s._`${r.default.vErrors}.length`,t)),(()=>e.assign(r.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:n,data:i,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const l=e.name("err");e.forRange("i",o,r.default.errors,(o=>{e.const(l,s._`${r.default.vErrors}[${o}]`),e.if(s._`${l}.instancePath === undefined`,(()=>e.assign(s._`${l}.instancePath`,(0,s.strConcat)(r.default.instancePath,a.errorPath)))),e.assign(s._`${l}.schemaPath`,s.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(s._`${l}.schema`,n),e.assign(s._`${l}.data`,i))}))};const l={keyword:new s.Name("keyword"),schemaPath:new s.Name("schemaPath"),params:new s.Name("params"),propertyName:new s.Name("propertyName"),message:new s.Name("message"),schema:new s.Name("schema"),parentSchema:new s.Name("parentSchema")};function c(e,t,n){const{createErrors:i}=e.it;return!1===i?s._`{}`:function(e,t,n={}){const{gen:i,it:o}=e,a=[u(o,n),h(e,n)];return function(e,{params:t,message:n},i){const{keyword:o,data:a,schemaValue:c,it:u}=e,{opts:h,propertyName:d,topSchemaRef:m,schemaPath:p}=u;i.push([l.keyword,o],[l.params,"function"==typeof t?t(e):t||s._`{}`]),h.messages&&i.push([l.message,"function"==typeof n?n(e):n]),h.verbose&&i.push([l.schema,c],[l.parentSchema,s._`${m}${p}`],[r.default.data,a]),d&&i.push([l.propertyName,d])}(e,t,a),i.object(...a)}(e,t,n)}function u({errorPath:e},{instancePath:t}){const n=t?s.str`${e}${(0,i.getErrorPath)(t,i.Type.Str)}`:e;return[r.default.instancePath,(0,s.strConcat)(r.default.instancePath,n)]}function h({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:r}){let o=r?t:s.str`${t}/${e}`;return n&&(o=s.str`${o}${(0,i.getErrorPath)(n,i.Type.Str)}`),[l.schemaPath,o]}},3835:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const s=n(9029),i=n(3558),r=n(2023),o=n(6939),a=n(4227),l=n(2586);class c{constructor(e){var t;let n;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,o.normalizeId)(null==n?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==n?void 0:n.$async,this.refs={}}}function u(e){const t=d.call(this,e);if(t)return t;const n=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:c}=this.opts.code,{ownProperties:u}=this.opts,h=new s.CodeGen(this.scope,{es5:a,lines:c,ownProperties:u});let m;e.$async&&(m=h.scopeValue("Error",{ref:i.default,code:s._`require("ajv/dist/runtime/validation_error").default`}));const p=h.scopeName("validate");e.validateName=p;const f={gen:h,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[s.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:h.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,s.stringify)(e.schema)}:{ref:e.schema}),validateName:p,ValidationError:m,schema:e.schema,schemaEnv:e,rootId:n,baseId:e.baseId||n,schemaPath:s.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:s._`""`,opts:this.opts,self:this};let g;try{this._compilations.add(e),(0,l.validateFunctionCode)(f),h.optimize(this.opts.code.optimize);const t=h.toString();g=`${h.scopeRefs(r.default.scope)}return ${t}`,this.opts.code.process&&(g=this.opts.code.process(g,e));const n=new Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(p,{ref:n}),n.errors=null,n.schema=e.schema,n.schemaEnv=e,e.$async&&(n.$async=!0),!0===this.opts.code.source&&(n.source={validateName:p,validateCode:t,scopeValues:h._values}),this.opts.unevaluated){const{props:e,items:t}=f;n.evaluated={props:e instanceof s.Name?void 0:e,items:t instanceof s.Name?void 0:t,dynamicProps:e instanceof s.Name,dynamicItems:t instanceof s.Name},n.source&&(n.source.evaluated=(0,s.stringify)(n.evaluated))}return e.validate=n,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error("Error compiling schema, function code:",g),t}finally{this._compilations.delete(e)}}function h(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u.call(this,e)}function d(e){for(const s of this._compilations)if(n=e,(t=s).schema===n.schema&&t.root===n.root&&t.baseId===n.baseId)return s;var t,n}function m(e,t){let n;for(;"string"==typeof(n=this.refs[t]);)t=n;return n||this.schemas[t]||p.call(this,e,t)}function p(e,t){const n=this.opts.uriResolver.parse(t),s=(0,o._getFullPath)(this.opts.uriResolver,n);let i=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&s===i)return g.call(this,n,e);const r=(0,o.normalizeId)(s),a=this.refs[r]||this.schemas[r];if("string"==typeof a){const t=p.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return g.call(this,n,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||u.call(this,a),r===(0,o.normalizeId)(t)){const{schema:t}=a,{schemaId:n}=this.opts,s=t[n];return s&&(i=(0,o.resolveUrl)(this.opts.uriResolver,i,s)),new c({schema:t,schemaId:n,root:e,baseId:i})}return g.call(this,n,a)}}t.SchemaEnv=c,t.compileSchema=u,t.resolveRef=function(e,t,n){var s;n=(0,o.resolveUrl)(this.opts.uriResolver,t,n);const i=e.refs[n];if(i)return i;let r=m.call(this,e,n);if(void 0===r){const i=null===(s=e.localRefs)||void 0===s?void 0:s[n],{schemaId:o}=this.opts;i&&(r=new c({schema:i,schemaId:o,root:e,baseId:t}))}return void 0!==r?e.refs[n]=h.call(this,r):void 0},t.getCompilingSchema=d,t.resolveSchema=p;const f=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(e,{baseId:t,schema:n,root:s}){var i;if("/"!==(null===(i=e.fragment)||void 0===i?void 0:i[0]))return;for(const s of e.fragment.slice(1).split("/")){if("boolean"==typeof n)return;const e=n[(0,a.unescapeFragment)(s)];if(void 0===e)return;const i="object"==typeof(n=e)&&n[this.opts.schemaId];!f.has(s)&&i&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,i))}let r;if("boolean"!=typeof n&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){const e=(0,o.resolveUrl)(this.opts.uriResolver,t,n.$ref);r=p.call(this,s,e)}const{schemaId:l}=this.opts;return r=r||new c({schema:n,schemaId:l,root:s,baseId:t}),r.schema!==r.root.schema?r:void 0}},2023:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=n(9029),i={data:new s.Name("data"),valCxt:new s.Name("valCxt"),instancePath:new s.Name("instancePath"),parentData:new s.Name("parentData"),parentDataProperty:new s.Name("parentDataProperty"),rootData:new s.Name("rootData"),dynamicAnchors:new s.Name("dynamicAnchors"),vErrors:new s.Name("vErrors"),errors:new s.Name("errors"),this:new s.Name("this"),self:new s.Name("self"),scope:new s.Name("scope"),json:new s.Name("json"),jsonPos:new s.Name("jsonPos"),jsonLen:new s.Name("jsonLen"),jsonPart:new s.Name("jsonPart")};t.default=i},4551:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=n(6939);class i extends Error{constructor(e,t,n,i){super(i||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,s.resolveUrl)(e,t,n),this.missingSchema=(0,s.normalizeId)((0,s.getFullPath)(e,this.missingRef))}}t.default=i},6939:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const s=n(4227),i=n(2017),r=n(7106),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!l(e):!!t&&c(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(e){for(const t in e){if(a.has(t))return!0;const n=e[t];if(Array.isArray(n)&&n.some(l))return!0;if("object"==typeof n&&l(n))return!0}return!1}function c(e){let t=0;for(const n in e){if("$ref"===n)return 1/0;if(t++,!o.has(n)&&("object"==typeof e[n]&&(0,s.eachItem)(e[n],(e=>t+=c(e))),t===1/0))return 1/0}return t}function u(e,t="",n){!1!==n&&(t=m(t));const s=e.parse(t);return h(e,s)}function h(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=h;const d=/#\/?$/;function m(e){return e?e.replace(d,""):""}t.normalizeId=m,t.resolveUrl=function(e,t,n){return n=m(n),e.resolve(t,n)};const p=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:n,uriResolver:s}=this.opts,o=m(e[n]||t),a={"":o},l=u(s,o,!1),c={},h=new Set;return r(e,{allKeys:!0},((e,t,s,i)=>{if(void 0===i)return;const r=l+t;let o=a[i];function u(t){const n=this.opts.uriResolver.resolve;if(t=m(o?n(o,t):t),h.has(t))throw f(t);h.add(t);let s=this.refs[t];return"string"==typeof s&&(s=this.refs[s]),"object"==typeof s?d(e,s.schema,t):t!==m(r)&&("#"===t[0]?(d(e,c[t],t),c[t]=e):this.refs[t]=r),t}function g(e){if("string"==typeof e){if(!p.test(e))throw new Error(`invalid anchor "${e}"`);u.call(this,`#${e}`)}}"string"==typeof e[n]&&(o=u.call(this,e[n])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),a[t]=o})),c;function d(e,t,n){if(void 0!==t&&!i(e,t))throw f(n)}function f(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},396:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const n=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&n.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},4227:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const s=n(9029),i=n(1520);function r(e,t=e.schema){const{opts:n,self:s}=e;if(!n.strictSchema)return;if("boolean"==typeof t)return;const i=s.RULES.keywords;for(const n in t)i[n]||p(e,`unknown keyword: "${n}"`)}function o(e,t){if("boolean"==typeof e)return!e;for(const n in e)if(t[n])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function l(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:i}){return(r,o,a,l)=>{const c=void 0===a?o:a instanceof s.Name?(o instanceof s.Name?e(r,o,a):t(r,o,a),a):o instanceof s.Name?(t(r,a,o),o):n(o,a);return l!==s.Name||c instanceof s.Name?c:i(r,c)}}function u(e,t){if(!0===t)return e.var("props",!0);const n=e.var("props",s._`{}`);return void 0!==t&&h(e,n,t),n}function h(e,t,n){Object.keys(n).forEach((n=>e.assign(s._`${t}${(0,s.getProperty)(n)}`,!0)))}t.toHash=function(e){const t={};for(const n of e)t[n]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(r(e,t),!o(t,e.self.RULES.all))},t.checkUnknownRules=r,t.schemaHasRules=o,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const n in e)if("$ref"!==n&&t.all[n])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},n,i,r){if(!r){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return s._`${n}`}return s._`${e}${t}${(0,s.getProperty)(i)}`},t.unescapeFragment=function(e){return l(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=l,t.eachItem=function(e,t){if(Array.isArray(e))for(const n of e)t(n);else t(e)},t.mergeEvaluated={props:c({mergeNames:(e,t,n)=>e.if(s._`${n} !== true && ${t} !== undefined`,(()=>{e.if(s._`${t} === true`,(()=>e.assign(n,!0)),(()=>e.assign(n,s._`${n} || {}`).code(s._`Object.assign(${n}, ${t})`)))})),mergeToName:(e,t,n)=>e.if(s._`${n} !== true`,(()=>{!0===t?e.assign(n,!0):(e.assign(n,s._`${n} || {}`),h(e,n,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:c({mergeNames:(e,t,n)=>e.if(s._`${n} !== true && ${t} !== undefined`,(()=>e.assign(n,s._`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`))),mergeToName:(e,t,n)=>e.if(s._`${n} !== true`,(()=>e.assign(n,!0===t||s._`${n} > ${t} ? ${n} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=u,t.setEvaluated=h;const d={};var m;function p(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,!0===n)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:d[t.code]||(d[t.code]=new i._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(m||(t.Type=m={})),t.getErrorPath=function(e,t,n){if(e instanceof s.Name){const i=t===m.Num;return n?i?s._`"[" + ${e} + "]"`:s._`"['" + ${e} + "']"`:i?s._`"/" + ${e}`:s._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,s.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=p},7887:(e,t)=>{"use strict";function n(e,t){return t.rules.some((t=>s(e,t)))}function s(e,t){var n;return void 0!==e[t.keyword]||(null===(n=t.definition.implements)||void 0===n?void 0:n.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},s){const i=t.RULES.types[s];return i&&!0!==i&&n(e,i)},t.shouldUseGroup=n,t.shouldUseRule=s},8727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const s=n(8708),i=n(9029),r=n(2023),o={message:"boolean schema is false"};function a(e,t){const{gen:n,data:i}=e,r={gen:n,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,s.reportError)(r,o,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:n,validateName:s}=e;!1===n?a(e,!1):"object"==typeof n&&!0===n.$async?t.return(r.default.data):(t.assign(i._`${s}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:n,schema:s}=e;!1===s?(n.var(t,!1),a(e)):n.var(t,!0)}},208:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const s=n(396),i=n(7887),r=n(8708),o=n(9029),a=n(4227);var l;function c(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(s.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(l||(t.DataType=l={})),t.getSchemaTypes=function(e){const t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=c,t.coerceAndCheckDataType=function(e,t){const{gen:n,data:s,opts:r}=e,a=function(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,r.coerceTypes),c=t.length>0&&!(0===a.length&&1===t.length&&(0,i.schemaHasRulesForType)(e,t[0]));if(c){const i=d(t,s,r.strictNumbers,l.Wrong);n.if(i,(()=>{a.length?function(e,t,n){const{gen:s,data:i,opts:r}=e,a=s.let("dataType",o._`typeof ${i}`),l=s.let("coerced",o._`undefined`);"array"===r.coerceTypes&&s.if(o._`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,(()=>s.assign(i,o._`${i}[0]`).assign(a,o._`typeof ${i}`).if(d(t,i,r.strictNumbers),(()=>s.assign(l,i))))),s.if(o._`${l} !== undefined`);for(const e of n)(u.has(e)||"array"===e&&"array"===r.coerceTypes)&&c(e);function c(e){switch(e){case"string":return void s.elseIf(o._`${a} == "number" || ${a} == "boolean"`).assign(l,o._`"" + ${i}`).elseIf(o._`${i} === null`).assign(l,o._`""`);case"number":return void s.elseIf(o._`${a} == "boolean" || ${i} === null
1
+ var bio;(()=>{var e={8924:(e,t,n)=>{"use strict";n.d(t,{X:()=>i});var s=n(7362);class i extends s.e{static get Lesk(){return void 0===this.lesk&&(this.lesk=this.makePalette([[["G","A","S","T"],"orange"],[["C","V","I","L","P","F","Y","M","W"],"all_green"],[["N","Q","H"],"magenta"],[["D","E"],"red"],[["K","R"],"all_blue"]],!1,i)),this.lesk}static get GrokGroups(){return void 0===this.grokGroups&&(this.grokGroups=this.makePalette([[["C","U"],"yellow"],[["G","P"],"red"],[["A","V","I","L","M","F","Y","W"],"all_green"],[["R","H","K"],"light_blue"],[["D","E"],"dark_blue"],[["S","T","N","Q"],"orange"]],!1,i)),this.grokGroups}static get RasMol(){return void 0===this.rasMol&&(this.rasMol=new i({D:"#E60A0A",E:"#E60A0A",C:"#E6E600",M:"#E6E600",K:"#145AFF",R:"#145AFF",S:"#FA9600",T:"#FA9600",F:"#3232AA",Y:"#3232AA",N:"#00DCDC",Q:"#00DCDC",G:"#EBEBEB",L:"#0F820F",V:"#0F820F",I:"#0F820F",A:"#C8C8C8",W:"#B45AB4",H:"#8282D2",P:"#DC9682",others:"#BEA06E"})),this.rasMol}get(e){const t=e in i.aaSynonyms?i.aaSynonyms[e]:e;return super.get(t)}}i.aaSynonyms={MeNle:"L",MeA:"A",MeG:"G",MeF:"F"};class r{static getPalette(e="grok"){switch(e){case"grok":return i.GrokGroups;case"lesk":return i.Lesk;default:throw new Error(`ChemPalette: scheme \`${e}\` does not exist`)}}static getInnerOuter(e){let t=0,n="",s="";for(const i of e)"("==i?t++:")"==i?t--:t?n+=i:s+=i;return isNaN(parseInt(n))?[s,n]:[s,""]}static getColorAAPivot(e="",t="grok"){const n=this.getPalette(t);let[s,i]=this.getInnerOuter(e);if(s=s.length>6?`${s.slice(0,3)}...`:s,i=i.length>6?`${i.slice(0,3)}...`:i,1==e.length||"("==e[1]){const t=e[0]?.toUpperCase();return t in n?[n.get(t),t,i,1]:[this.undefinedColor,s,i,1]}if("d"==e[0]&&e[1]in n&&(2==e.length||"("==e[2])){const t=e[1]?.toUpperCase();return t in n?[n.get(t),t,i,2]:[this.undefinedColor,s,i,2]}if(e.substring(0,3)in this.AAFullNames&&(3==e.length||"("==e[3])){const t=this.AAFullNames[e.substring(0,3)];return t in n?[n.get(t),t,i,3]:[this.undefinedColor,s,i,3]}if(e[0]?.toLowerCase()==e[0]&&e.substring(1,3)in this.AAFullNames&&(4==e.length||"("==e[4])){const t=this.AAFullNames[e.substring(1,3)];return t in n?[n.get(t),t,i,4]:[this.undefinedColor,s,i,4]}return[this.undefinedColor,s,i,0]}}r.SemType="Aminoacids",r.SemTypeMultipleAlignment="AminoacidsMultipleAlignment",r.undefinedColor="rgb(100,100,100)",r.Names={G:"Glycine",L:"Leucine",Y:"Tyrosine",S:"Serine",E:"Glutamic acid",Q:"Glutamine",D:"Aspartic acid",N:"Asparagine",F:"Phenylalanine",A:"Alanine",K:"Lysine",R:"Arginine",H:"Histidine",C:"Cysteine",V:"Valine",P:"Proline",W:"Tryptophan",I:"Isoleucine",M:"Methionine",T:"Threonine"},r.AASmiles={G:"NCC(=O)O",L:"N[C@H](CC(C)C)C(=O)O",Y:"NC(CC1=CC=C(O)C=C1)C(=O)O",S:"NC(CO)C(=O)O",E:"N[C@@H](CCC(O)=O)C(=O)O",Q:"N[C@@H](CCC(N)=O)C(=O)O",D:"N[C@@H](CC(O)=O)C(=O)O",N:"N[C@@H](CC(N)=O)C(=O)O",F:"NC(CC1=CC=CC=C1)C(=O)O",A:"N[C@H](C)C(=O)O",K:"NC(CCCCN)C(=O)O",R:"N[C@H](CCCNC(=N)C)C(=O)O",H:"NC(CC1=CN=C[N]1)C(=O)O",C:"N[C@@H](CS)C(=O)O",V:"NC(C(C)C)C(=O)O",P:"N(CCC1)C1C(=O)O",W:"N[C@@H](Cc1c2ccccc2n([H])c1)C(=O)O",I:"N[C@H]([C@H](C)CC)C(=O)O",M:"NC(CCSC)C(=O)O",T:"NC(C(O)C)C(=O)O"},r.AASmilesTruncated={G:"*C*",L:"CC(C)C[C@H](*)*",Y:"C1=CC(=CC=C1CC(*)*)O",S:"OCC(*)C*",E:"*[C@@H](CCC(O)=O)*",Q:"*N[C@@H](CCC(N)=O)*",D:"*[C@@H](CC(O)=O)*",N:"*[C@@H](CC(N)=O)*",F:"C1=CC=C(C=C1)CC(*)*",A:"C[C@H](*)*",K:"C(CCN)CC(*)*",R:"*[C@H](CCCNC(=N)C)*",H:"C1=C(NC=N1)CC(*)*",C:"C([C@@H](*)*)S",V:"CC(C)C(*)*",P:"C1CCN(*)C1*",W:"*[C@@H](Cc1c2ccccc2n([H])c1)*",I:"CC[C@H](C)[C@H](*)*",M:"CSCCC(*)*",T:"CC(O)C(*)*"},r.AAFullNames={Ala:"A",Arg:"R",Asn:"N",Asp:"D",Cys:"C",Gln:"Q",Glu:"E",Gly:"G",His:"H",Ile:"I",Leu:"L",Lys:"K",Met:"M",Phe:"F",Pro:"P",Ser:"S",Thr:"T",Trp:"W",Tyr:"Y",Val:"V"}},9124:(e,t,n)=>{"use strict";n.d(t,{b:()=>r});var s=n(7389),i=n(6082);async function r(){const e="Helm",t=i.Func.find({package:e,name:"getHelmHelper"});if(0===t.length)throw new Error(`Package '${e}' must be installed for HelmHelper.`);return(await t[0].prepare().call()).getOutputParamValue()}s.input.helmAsync=async function(e,t){return(await r()).createHelmInput(e,t)}},4356:(e,t,n)=>{"use strict";n.d(t,{Eu:()=>l,so:()=>r,ub:()=>a});var s=n(4328);const i="Libraries",r="System:AppData/Bio/monomer-libraries/";let o=Promise.resolve();async function a(){let e;return o=o.then((async()=>{const t=await s.dapi.userDataStorage.getValue(i,"Settings",!0);e=t?JSON.parse(t):{exclude:[],explicit:[]},e.exclude=e.exclude instanceof Array?e.exclude:[],e.explicit=e.explicit instanceof Array?e.explicit:[],console.debug(`Bio: getUserLibSettings()\n${JSON.stringify(e,void 0,2)}`)})),await o,e}async function l(e){o=o.then((async()=>{console.debug(`Bio: setUserLibSettings()\n${JSON.stringify(e,void 0,2)}`),await s.dapi.userDataStorage.postValue(i,"Settings",JSON.stringify(e),!0)})),await o}},6718:(e,t,n)=>{"use strict";n.d(t,{A7:()=>m,pj:()=>u,uL:()=>h,uX:()=>c});var s=n(6082),i=n(4328),r=n(6295),o=n(3151),a=n(2738),l=(n(826),n(3077));function c(e){const t=[];for(let n=0;n<e.rowCount;n++){const s={};Object.keys(o.Ec).forEach((t=>{if("symbol"===t){const i=e.get(o.Ec[t],n);s[t]="."===i?e.get(o.yw,n):i}else if("rgroups"===t){const i=e.get(o.Ec[t],n).split("\n"),r=[];i.forEach((e=>{const t={},n=e.substring(e.lastIndexOf("]")+1),s=e.match(/\[R(\d+)\]/)[1];t.capGroupSmiles="H"===n?`[*:${s}][H]`:`O[*:${s}]`,t.alternateId="H"===n?`R${s}-H`:`R${s}-OH`,t.capGroupName="H"===n?"H":"OH",t.label=`R${s}`,r.push(t)})),s[t]=r}else o.Ec[t]&&(s[t]=e.get(o.Ec[t],n))})),s.author??(s.author=""),s.id??(s.id=0),s.smiles??(s.smiles=""),s.monomerType??(s.monomerType="Backbone"),s.createDate??(s.createDate=null),t.push(s)}return t}async function u(){const e=s.Func.find({package:"Bio",name:"getMonomerLibHelper"});if(0===e.length)throw new Error('Package "Bio" must be installed for MonomerLibHelper.');return(await e[0].prepare().call()).getOutputParamValue()}async function h(e,t){e instanceof s.Column&&(e=(0,l.R)(e).columns.toList());const n=(await u()).getBioLib(),r=new Array(e.length),o=e[0].length,c=new Float32Array(o);for(let l=0;l<e.length;++l){const u=l<t.length?t.getCanonical(l):a._S,h=n.getMonomer("PEPTIDE",u)?.smiles??"";h||i.shell.warning(`Reference monomer ${u} not found in monomer library`);const d=e[l],m=d.getRawData(),p=d.categories,f=p.indexOf("");if(r[l]={categories:p,data:m,emptyIndex:f},void 0===u)continue;const g=s.Column.fromStrings("smiles",p.map((e=>n.getMonomer("PEPTIDE",e)?.smiles??""))),y=(s.DataFrame.fromColumns([g]),await i.chem.getSimilarities(g,h)),b=y?y.getRawData():null;if(b)for(let e=0;e<o;++e){const t=m[e];u!==a._S&&t!==f?c[e]+=b[t]:u===a._S&&t===f&&(c[e]+=1)}}for(let n=0;n<c.length;++n){let i=c[n]/t.length;for(let o=0;o<e.length;++o){const e=r[o];if(o>=t.length&&e.data[n]!==e.emptyIndex||e.data[n]===e.emptyIndex&&o<t.length){i=s.FLOAT_NULL;break}}c[n]=i}return s.Column.fromFloat32Array("Similarity",c)}async function d(e){const t=(await u()).getBioLib(),n=[],r={},o=e.map((e=>t.getMonomer("PEPTIDE",e)?.smiles??"")),a=s.Column.fromStrings("smiles",o);for(let t=0;t<o.length;++t){r[e[t]]=t;const s=o[t],l=""===s?new Array(o.length).fill(0):(await i.chem.getSimilarities(a,s)).getRawData();l[t]=1,n[t]=Array.from(l)}return{scoringMatrix:n,alphabetIndexes:r}}async function m(e,t="Morgan"){const n=(await u()).getBioLib(),i=new Array(e.length).fill(0).map((()=>new Array(e.length).fill(0))),o={},a=e.map((e=>n.getMonomer("PEPTIDE",e)?.smiles??"")),l=s.Func.find({package:"Chem",name:"getFingerprints"})[0];if(!l)return console.warn('Function "Chem:getFingerprints" is not found in chem package. falling back to Morgan fingerprints'),await d(e);const c=s.Column.fromStrings("smiles",a),h=(s.DataFrame.fromColumns([c]),(await l.apply({col:c,fingerprintType:t}))?.entries);if(!h)return console.warn(`${t} Fingerprints could not be calculated for monomers from chem package.\n falling back to Morgan fingerprints`),await d(e);for(let t=0;t<h.length;++t)if(i[t][t]=1,o[e[t]]=t,h[t])for(let e=t+1;e<h.length;++e)h[e]&&(i[t][e]=i[e][t]=(0,r.$1)(h[t],h[e]));return{scoringMatrix:i,alphabetIndexes:o}}},7384:(e,t,n)=>{"use strict";n.d(t,{C4:()=>d});var s=n(4328),i=n(6082),r=n(1991),o=n.n(r),a=n(439),l=n(826);const c={V2K_RGP_SHIFT:8,V2K_RGP_LINE:"M RGP",V2K_A_LINE:"A ",V3K_COUNTS_SHIFT:14,V3K_IDX_SHIFT:7,V3K_HEADER_FIRST_LINE:"\nDatagrok macromolecule handler\n\n",V3K_HEADER_SECOND_LINE:" 0 0 0 0 0 0 999 V3000\n",V3K_BEGIN_CTAB_BLOCK:"M V30 BEGIN CTAB\n",V3K_END_CTAB_BLOCK:"M V30 END CTAB\n",V3K_BEGIN_COUNTS_LINE:"M V30 COUNTS ",V3K_COUNTS_LINE_ENDING:" 0 0 0\n",V3K_BEGIN_ATOM_BLOCK:"M V30 BEGIN ATOM\n",V3K_END_ATOM_BLOCK:"M V30 END ATOM\n",V3K_BEGIN_BOND_BLOCK:"M V30 BEGIN BOND\n",V3K_END_BOND_BLOCK:"M V30 END BOND\n",V3K_BOND_CONFIG:" CFG=",V3K_BEGIN_DATA_LINE:"M V30 ",V3K_END:"M END",PRECISION_FACTOR:1e4,DEOXYRIBOSE:"d",RIBOSE:"r",PHOSPHATE:"p",OXYGEN:"O",HYDROGEN:"H"};var u=n(3151);function h(e){return Math.round(c.PRECISION_FACTOR*e)/c.PRECISION_FACTOR}async function d(e,t,r){if(0===i.Func.find({package:"Chem",name:"getRdKitModule"}).length)return{col:null,warnings:['Transformation to atomic level requires the package "Chem" installed.']};if(t.semType!==i.SEMTYPE.MACROMOLECULE)return{col:null,warnings:[`Only the ${i.SEMTYPE.MACROMOLECULE} columns can be converted to atomic level, the chosen column has semType '${t.semType}'`]};let h=t;const d=l.GO.forColumn(t);d.isHelm()&&(h=d.convert(a.Hi.SEPARATOR,"."),h.name=t.name);const p=l.GO.forColumn(h).alphabet;let f;if(p===a.YI.PT||p===a.YI.UN)f="PEPTIDE";else{if(p!==a.YI.RNA&&p!==a.YI.DNA)return{col:null,warnings:[`Unexpected column's '${h.name}' alphabet '${p}'.`]};f="RNA"}const g=function(e){const t=e.length,n=new Array(t),i=l.GO.forColumn(e);let r=!1;for(let e=0;e<t;++e){const t=i.getSplitted(e);r||(r=0===t.length),n[e]=o()(t.canonicals).filter((e=>!i.isGap(e))).map((e=>e)).toArray()}return r&&s.shell.warning(`Some values in the "${e.name}" column are empty`),n}(h),y=await async function(e,t,n,i){const r=function(e,t,n){const s=new Map;for(const i of e.getMonomerSymbolsByType(t)){const r=e.getMonomer(t,i);if("RNA"===t&&("Branch"===r.monomerType||n===a.YI.DNA&&r.symbol===c.DEOXYRIBOSE||n===a.YI.RNA&&r.symbol===c.RIBOSE||r.symbol===c.PHOSPHATE)||"PEPTIDE"===t&&"Branch"!==r.monomerType){const e={};u.f6.forEach((t=>{e[t]=r[t]})),s.set(r.symbol,e)}}return s}(t,n,i),o=new Map,l=await s.functions.call("Chem:getRdKitModule"),h={value:null};if("RNA"===n){const e=i===a.YI.RNA?[c.RIBOSE,c.PHOSPHATE]:[c.DEOXYRIBOSE,c.PHOSPHATE];for(const t of e)m(o,t,r,l,n,h)}for(let t=0;t<e.length;++t){const s=e[t];for(const e of s)if(""!==e)try{m(o,e,r,l,n,h)}catch(t){const n=t instanceof Error?t.message:t.toString(),s=t instanceof Error?t.stack:void 0;throw console.error(`bio lib: getMonomersDictFromLib() sym='${e}', error:\n${n}\n${s}`),new Error(`Can't get monomer '${e}' from library: ${n}`)}}return o}(g,r,f,p),b=h.length,{molfileList:v,molfileWarningList:w}=await async function(e,t,s,i,r){const o=Math.max(navigator.hardwareConcurrency-2,1),a=new Array(o).fill(null).map((()=>new Worker(new URL(n.p+n.u(248),n.b)))),l=r/o;let c=[],u=[];const h=new Array(o);for(let n=0;n<o;n++){const c=Math.floor(n*l),u=n===o-1?r:Math.floor((n+1)*l);a[n].postMessage({monomerSequencesArray:e,monomersDict:t,alphabet:s,polymerType:i,start:c,end:u}),h[n]=new Promise((e=>{a[n].onmessage=({data:{molfileList:t,molfileWarningList:n}})=>{e({molfileList:t,molfileWarningList:n})}}))}return(await Promise.all(h)).forEach((e=>{c=c.concat(...e.molfileList),u=u.concat(...e.molfileWarningList)})),setTimeout((()=>{a.forEach((e=>{e.terminate()}))}),0),{molfileList:c,molfileWarningList:u}}(g,y,p,f,b);if(w.length>.05*b)throw new Error("Too many errors getting molfiles.");const C=`molfile(${h.name})`,A=e.columns.getUnusedName(C),S=i.Column.fromStrings(A,v);return S.semType=i.SEMTYPE.MOLECULE,S.meta.units=i.UNITS.Molecule.MOLBLOCK,{col:S,warnings:w}}function m(e,t,n,s,i,r){if(!e.has(t)){const o=function(e,t,n,s,i){if(t.has(e)){const o=t.get(e),a=function(e){const t=[];for(const n of e){let e=n.capGroupSmiles;e||(e=n.capGroupSMILES),e=e.replace(/(\[|\]|\*|:|\d)/g,""),t.push(e)}return t}(o.rgroups),l=(r=o.molfile).includes("V3000")?function(e){const t=new Map,n=/M V30 (\d+) R#.+RGROUPS=\((\d+) (\d+)\).*/gm;let s;for(;null!==(s=n.exec(e));)s.index===n.lastIndex&&n.lastIndex++,t.set(parseInt(s[1]),parseInt(s[3]));return t}(r):function(e){const t=new Map;let n=e.indexOf(c.V2K_A_LINE,0),s=n;for(;-1!==n;){s=e.indexOf("\n",n);const i=parseInt(e.substring(n,s).replace(/^A\s+/,""));n=e.indexOf("R",s),s=e.indexOf("\n",n);const r=parseInt(e.substring(n,s).replace(/^R/,""));t.set(i,r),n=e.indexOf(c.V2K_A_LINE,s)}for(n=e.indexOf(c.V2K_RGP_LINE,0),s=e.indexOf("\n",n);-1!==n;){n+=c.V2K_RGP_SHIFT,s=e.indexOf("\n",n);const i=e.substring(n,s).replaceAll(/\s+/g," ").split(" ").map((e=>parseInt(e))).slice(1);for(let e=0;e<i.length;e+=2){if(t.has(i[e])&&t.get(i[e])!==i[e+1])throw new Error(`r-group index ${i[e]} has already been added with a different value`);t.set(i[e],i[e+1])}n=e.indexOf(c.V2K_RGP_LINE,s)}return t}(r),u=o.molfile.includes("V3000")?o.molfile:function(e,t){const n=t.get_mol(e),s=n.get_v3Kmolblock();return n.delete(),s}(function(e){let t=e.indexOf(c.V2K_A_LINE,0);-1===t&&(t=e.indexOf(c.V2K_RGP_LINE));const n=e.indexOf(c.V3K_END,t);return e.substring(0,t)+e.substring(n)}(o.molfile),n),d=function(e){let t=(e=e.replaceAll("\r","")).indexOf(c.V3K_BEGIN_COUNTS_LINE)+c.V3K_COUNTS_SHIFT,n=e.indexOf(" ",t+1);const s=parseInt(e.substring(t,n));return t=n+1,n=e.indexOf(" ",t+1),{atomCount:s,bondCount:parseInt(e.substring(t,n))}}(u),m=function(e,t){const n=new Array(t),s=new Float32Array(t),i=new Float32Array(t),r=new Array(t);let o=e.indexOf(c.V3K_BEGIN_ATOM_BLOCK);o=e.indexOf("\n",o);let a=o;for(let l=0;l<t;l++){o=e.indexOf(c.V3K_BEGIN_DATA_LINE,o)+c.V3K_IDX_SHIFT,a=e.indexOf(" ",o),o=a+1,a=e.indexOf(" ",o),n[l]=e.substring(o,a);const t=new Array(2);for(let n=0;n<2;++n)o=a+1,a=e.indexOf(" ",o),t[n]=parseFloat(e.substring(o,a));s[l]=t[0],i[l]=t[1],o=a,a=e.indexOf("\n",o)+1,r[l]=e.slice(o,a),o=a}return{atomTypes:n,x:s,y:i,kwargs:r}}(u,d.atomCount),g=function(e,t){const n=new Uint32Array(t),s=new Array(t),i=new Map,r=new Map;let o=e.indexOf(c.V3K_BEGIN_BOND_BLOCK);o=e.indexOf("\n",o);let a=o;for(let l=0;l<t;++l){const t=new Array(3);o=e.indexOf(c.V3K_BEGIN_DATA_LINE,a)+c.V3K_IDX_SHIFT,a=e.indexOf(" ",o);for(let n=0;n<3;++n)o=a+1,a=Math.min(e.indexOf("\n",o),e.indexOf(" ",o)),t[n]=parseInt(e.slice(o,a));n[l]=t[0],s[l]=t.slice(1);const u=e.indexOf("\n",o);let h=e.slice(a,u),d=h.indexOf(c.V3K_BOND_CONFIG);if(-1!==d){d=h.indexOf("=",d)+1;let e=h.indexOf(" ",d);-1===e&&(e=h.length);const t=parseInt(h.slice(d,e));i.set(l,t);const n=c.V3K_BOND_CONFIG+t.toString();h=h.replace(n,"")}h||r.set(l,h)}return{bondTypes:n,atomPairs:s,bondConfiguration:i,kwargs:r}}(u,d.bondCount),b=function(e,t,n,s){const i={backboneShift:null,branchShift:null,terminalNodes:[],rNodes:[]};return function(e,t,n){for(const[s,i]of n)e.atomTypes[s-1]=t[i-1]}(e,n,s),function(e,t){t.rNodes=Array.from(e.keys());for(let n=0;n<t.rNodes.length;n++)for(const s of[1,2])if(e.get(t.rNodes[n])===s){const e=t.rNodes[s-1];t.rNodes[s-1]=t.rNodes[n],t.rNodes[n]=e}}(s,i),p(t,i),i}(m,g,a,l),S=function(e){let t=[],n=e.indexOf("M V30 MDLV30/STEABS ATOMS=(");for(;-1!==n;){n+=28;const s=e.indexOf(")",n);t=t.concat(e.substring(n,s).split(" ").slice(1).map((e=>parseInt(e)))),n=s,n=e.indexOf("M V30 MDLV30/STEABS ATOMS=(",n)}return t}(u),x={atoms:m,bonds:g,meta:b,stereoAtoms:S};return"PEPTIDE"===s?function(e){const t=e.meta.terminalNodes[0]-1,n=e.meta.rNodes[0]-1,s=e.atoms.x,i=e.atoms.y;A(e,-s[t],-i[t]);const r=v(s[n],i[n]);w(e.atoms,-r),s[e.meta.rNodes[1]-1]<0&&function(e){C(e,!1)}(e);const o=function(e){const t=function(e){const t=new Map;for(const n of e.bonds.atomPairs)for(let e=0;e<2;e++){const s=n[e],i=n[(e+1)%2];t.has(s)?t.get(s)?.push(i):t.set(s,new Array(1).fill(i))}return t}(e);let n=0;const s=e.atoms.atomTypes.length;let i=0;for(;0===n;){const r=t.get(e.meta.terminalNodes[1])[i];if(e.atoms.atomTypes[r-1]===c.OXYGEN&&r!==e.meta.rNodes[1]&&(n=r),i++,i>s)throw new Error(`Search for double-bonded Oxygen in ${e} has exceeded the limit of ${s}`)}return n}(e);!function(e,t){e.atoms.y[e.meta.rNodes[1]-1]<0&&e.atoms.y[t-1]<0&&(function(e){C(e,!0)}(e),w(e.atoms,-function(e,t){return v(e,t)+Math.PI/2}(e.atoms.x[e.meta.terminalNodes[1]-1],e.atoms.y[e.meta.terminalNodes[1]-1])))}(e,o),function(e,t){const n=e.atoms.x;n[e.meta.rNodes[1]-1]>n[t-1]&&function(e,t,n){const s=t-1,i=n-1,r=e.atoms.x,o=e.atoms.y,a=r[s],l=o[s];r[s]=r[i],o[s]=o[i],r[i]=a,o[i]=l}(e,t,e.meta.rNodes[1])}(e,o)}(x):e===c.RIBOSE||e===c.DEOXYRIBOSE?function(e,t){const n=e.atoms.x,s=e.atoms.y;let i=e.meta.terminalNodes[0]-1;const r=e.meta.rNodes[1]-1;A(e,-n[i],-s[i]);const o=v(n[r],s[r]);w(e.atoms,3*Math.PI/2-o),t.value=function(e){const t=e.atoms.x,n=e.atoms.y,s=e.meta.rNodes[2]-1,i=e.meta.terminalNodes[2]-1,r=t[s]-t[i],o=n[s]-n[i];return Math.atan(o/r)+Math.PI/2}(e),i=e.meta.terminalNodes[0]-1,A(e,-n[i],-s[i])}(x,i):e===c.PHOSPHATE?function(e){const t=e.meta.terminalNodes[0]-1,n=e.meta.rNodes[0]-1,s=e.atoms.x,i=e.atoms.y;A(e,-s[t],-i[t]);const r=v(s[n],i[n]);w(e.atoms,Math.PI/2-r)}(x):function(e,t){const n=e.atoms.x,s=e.atoms.y,i=e.meta.terminalNodes[0]-1,r=e.meta.rNodes[0]-1;A(e,-n[i],-s[i]);const o=v(n[r],s[r]),a=t.value;if(!a)throw new Error("The value of sugarBranchToOYAngle is null");w(e.atoms,Math.PI-o+a);const l=function(e,t){return h(Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2))}({x:n[e.meta.rNodes[0]-1],y:s[e.meta.rNodes[0]-1]},{x:n[e.meta.terminalNodes[0]-1],y:s[e.meta.terminalNodes[0]-1]});if(1!=l)for(let e=0;e<n.length;++e)n[e]=h(n[e]/l),s[e]=h(s[e]/l)}(x,i),function(e,t,n){"PEPTIDE"===e?(f(t,e),y(t,t.meta.rNodes[1])):n===c.RIBOSE||n===c.DEOXYRIBOSE?(y(t,t.meta.rNodes[1]),t.meta.rNodes[1]=t.meta.terminalNodes[1],p(t.bonds,t.meta),f(t,e),y(t,t.meta.rNodes[1]),y(t,t.meta.rNodes[0]),y(t,t.meta.rNodes[2])):n===c.PHOSPHATE&&(t.meta.terminalNodes[0]=t.meta.rNodes[0],A(t,-t.atoms.x[t.meta.terminalNodes[0]-1],-t.atoms.y[t.meta.terminalNodes[0]-1]),f(t,e),y(t,t.meta.rNodes[1]))}(s,x,e),function(e){let t=0;for(;t<e.atoms.atomTypes.length;)e.atoms.atomTypes[t]===c.HYDROGEN&&(y(e,t+1),--t),++t}(x),x}var r;return null}(t,n,s,i,r);if(!o)throw new Error(`Monomer with symbol '${t}' is absent the monomer library`);e.set(t,o)}}function p(e,t){const n=t.rNodes;t.terminalNodes=new Array(n.length).fill(0);const s=t.terminalNodes,i=e.atomPairs;let r=0,o=0;for(;r<i.length&&o<s.length;){for(let e=0;e<s.length;++e)for(let t=0;t<2;++t)i[r][t]===n[e]&&(s[e]=i[r][(t+1)%2],n.length,++o);++r}}function f(e,t){e.meta.rNodes.length>1&&(e.meta.backboneShift=g(e,e.meta.rNodes[1]-1,e.meta.terminalNodes[0]-1)),"RNA"===t&&e.meta.rNodes.length>2&&(e.meta.branchShift=g(e,e.meta.rNodes[2]-1,e.meta.terminalNodes[0]-1))}function g(e,t,n){return[h(e.atoms.x[t]-e.atoms.x[n]),h(e.atoms.y[t]-e.atoms.y[n])]}function y(e,t){if(void 0!==t){const n=t-1,s=e.atoms,i=e.bonds,r=e.meta;s.atomTypes.splice(n,1),s.x=b(Float32Array,s.x,n,1),s.y=b(Float32Array,s.y,n,1),s.kwargs.splice(n,1);for(let e=0;e<r.terminalNodes.length;++e)r.terminalNodes[e]>t?--r.terminalNodes[e]:r.terminalNodes[e]===t&&(r.terminalNodes[e]=-1);for(let e=0;e<r.rNodes.length;++e)r.rNodes[e]>t?--r.rNodes[e]:r.rNodes[e]===t&&(r.rNodes[e]=-1);let o=0;for(;o<i.atomPairs.length;){const e=i.atomPairs[o][0],n=i.atomPairs[o][1];e===t||n===t?(i.atomPairs.splice(o,1),i.bondTypes=b(Uint32Array,i.bondTypes,o,1),i.bondConfiguration.has(o)&&i.bondConfiguration.delete(o),i.kwargs.has(o)&&i.kwargs.delete(o),--o):(i.atomPairs[o][0]=e>t?e-1:e,i.atomPairs[o][1]=n>t?n-1:n),++o}let a=Array.from(i.bondConfiguration.keys());a.forEach((e=>{if(i.bondConfiguration.has(e)&&e>n){const t=i.bondConfiguration.get(e);i.bondConfiguration.delete(e),i.bondConfiguration.set(e-1,t)}})),a=Array.from(i.kwargs.keys()),a.forEach((e=>{if(i.kwargs.has(e)&&e>n){const t=i.kwargs.get(e);i.kwargs.delete(e),i.kwargs.set(e-1,t)}}))}}function b(e,t,n,s){const i=new e(t.length-s);let r=0,o=0;for(;r<t.length;)r===n&&(r+=s),i[o]=t[r],++o,++r;return i}function v(e,t){let n;if(0===e)n=t>0?0:Math.PI;else if(0===t)n=e>0?-Math.PI/2:Math.PI/2;else{const s=t/e,i=Math.atan(s);n=e<0?Math.PI/2+i:-Math.PI/2+i}return n}function w(e,t){if(0!==t){const n=e.x,s=e.y,i=Math.cos(t),r=Math.sin(t);for(let e=0;e<n.length;++e){const t=n[e];n[e]=h(t*i-s[e]*r),s[e]=h(t*r+s[e]*i)}}}function C(e,t){if(t){const t=e.atoms.y;for(let e=0;e<t.length;e++)t[e]=-t[e]}else{const t=e.atoms.x;for(let e=0;e<t.length;e++)t[e]=-t[e]}const n=e.bonds.bondConfiguration;for(const[e,t]of n){const s=1===t?3:1;n.set(e,s)}}function A(e,t,n){const s=e.atoms.x,i=e.atoms.y;for(let e=0;e<s.length;++e)s[e]=h(s[e]+t),void 0!==n&&(i[e]=h(i[e]+n))}},1093:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var s=n(7362);class i extends s.e{static get Chromatogram(){return void 0===this.chromatogram&&(this.chromatogram=new i({A:"green",C:"blue",G:"black",T:"red",U:"red",others:"gray"})),this.chromatogram}}class r{}r.SemType="Nucleotides",r.SemTypeMultipleAlignment="NucleotidesMultipleAlignment",r.Names={A:"Adenine",C:"Cytosine",G:"Guanine",T:"Thymine",U:"Uracil"}},7362:(e,t,n)=>{"use strict";n.d(t,{e:()=>s});class s{static makePalette(e,t=!1,n=s){const i={};return e.forEach((e=>{const n=e[0],s=e[1];n.forEach(((e,n)=>{i[e]=this.colourPalette[s][t?0:n]}))})),new n(i)}constructor(e){this._palette=e}get(e){return this._palette[e]}}s.undefinedColor="rgb(100,100,100)",s.colourPalette={orange:["rgb(255,187,120)","rgb(245,167,100)","rgb(235,137,70)","rgb(205, 111, 71)"],all_green:["rgb(44,160,44)","rgb(74,160,74)","rgb(23,103,57)","rgb(30,110,96)","rgb(60,131,95)","rgb(24,110,79)","rgb(152,223,138)","rgb(182, 223, 138)","rgb(152, 193, 138)"],all_blue:["rgb(31,119,180)","rgb(23,190,207)","rgb(122, 102, 189)","rgb(158,218,229)","rgb(141, 124, 217)","rgb(31, 120, 150)"],magenta:["rgb(162,106,192)","rgb(197,165,224)","rgb(208,113,218)"],red:["rgb(214,39,40)","rgb(255,152,150)"],st_blue:["rgb(23,190,207)","rgb(158,218,229)","rgb(31,119,180)"],dark_blue:["rgb(31,119,180)","rgb(31, 120, 150)"],light_blue:["rgb(23,190,207)","rgb(158,218,229)","rgb(108, 218, 229)","rgb(23,190,227)"],lilac_blue:["rgb(124,102,211)","rgb(149,134,217)","rgb(97, 81, 150)"],dark_green:["rgb(23,103,57)","rgb(30,110,96)","rgb(60,131,95)","rgb(24,110,79)"],green:["rgb(44,160,44)","rgb(74,160,74)"],light_green:["rgb(152,223,138)","rgb(182, 223, 138)","rgb(152, 193, 138)"],st_green:["rgb(44,160,44)","rgb(152,223,138)","rgb(39, 174, 96)","rgb(74,160,74)"],pink:["rgb(247,182,210)"],brown:["rgb(140,86,75)","rgb(102, 62, 54)"],gray:["rgb(127,127,127)","rgb(199,199,199)","rgb(196,156,148)","rgb(222, 222, 180)"],yellow:["rgb(188,189,34)"],white:["rgb(230,230,230)"]}},4152:(e,t,n)=>{"use strict";n.d(t,{oT:()=>c});var s=n(6082),i=n(7362);class r{static hashCode(e){let t=0;if(0===e.length)return t;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}}class o{}class a extends o{get(e){return"#666666"}}class l extends o{static buildPalette(){return[].concat(...Object.values(i.e.colourPalette))}get(e){const t=r.hashCode(e)%l.palette.length;return function(e){if(null==e)return"rgb(100,100,100)";const t=s.Color.fromHtml(e),n=s.Color.g(t),i=s.Color.r(t),r=s.Color.b(t),o=Math.sqrt(Math.pow(0-i,2)+Math.pow(0-n,2)+Math.pow(0-r,2));return o>210?`rgb(${i/o*210},${n/o*210},${r/o*210})`:s.Color.toRgb(t)}(l.palette[t])}}l.palette=l.buildPalette();class c extends i.e{static get Gray(){return void 0===this.gray&&(this.gray=new a),this.gray}static get Color(){return void 0===this.color&&(this.color=new l),this.color}}},6642:(e,t,n)=>{"use strict";n.d(t,{h:()=>o,s:()=>a});var s=n(4328),i=n(1858),r=n(8070);function o(e){let t=null,n=null;try{n=e.dart?e.gridColumn:null,t=n?n.temp:null}catch{[n,t]=[null,null]}const s=e.cell.column;if(t=t??s.temp,!t)throw new Error("Grid cell renderer back store (GridColumn or Column) not found.");return[n,s,t]}class a{constructor(e,t,n){this.gridCol=e,this.tableCol=t,this.logger=n,this.subs=[],this.destroyed=!1,this.viewerId=++a.viewerCounter,this.errors=[],this._onRendered=new i.Subject,this.reset(),this.tableCol&&this.tableCol.dataFrame&&this.subs.push(this.tableCol.dataFrame.onDataChanged.subscribe((()=>{try{this.reset()}catch(e){this.logger.error(e)}}))),this.tableCol&&this.subs.push(s.events.onTableRemoved.subscribe((e=>{try{const t=e.args.dataFrame;this.tableCol?.dataFrame.id!==t.id||this.destroyed||this.destroy()}catch(e){this.logger.error(e)}}))),this.gridCol&&this.subs.push(s.events.onViewRemoving.subscribe((e=>{try{const t=e.args.view;this.gridCol?.dart&&this.gridCol.grid&&this.gridCol?.grid?.dart&&this.gridCol?.grid?.view?.id===t.id&&!this.destroyed&&this.destroy()}catch(e){this.logger.error(e)}})))}toLog(){return`${this.constructor.name}<${this.viewerId}>`}destroy(){for(const e of this.subs)e.unsubscribe();this.destroyed=!0}invalidateGrid(){this.gridCol&&this.gridCol.dart&&this.gridCol.grid?.invalidate()}get onRendered(){return this._onRendered}invalidate(e){this.invalidateGrid()}async awaitRendered(e=1e4,t=`${e} timeout`){const n=`${this.toLog()}.awaitRendered()`;if(this.logger.debug(`${n}, start, testEvent before`),await(0,r.PE)(this._onRendered,(()=>{}),(()=>{this.invalidate()}),e,`${n}, ${t}`),this.errors.length>0){const e=this.errors[0];throw this.errors=[],e}this.logger.debug(`${n}, end`)}}a.viewerCounter=-1},6882:(e,t,n)=>{"use strict";n.d(t,{J:()=>c});var s=n(6082),i=n(1991),r=n.n(i),o=n(826),a=n(6642),l=n(6718);class c extends a.s{constructor(e,t,n,i,r){super(e,t,n),this.monomerLengthLimit=i,this.propsProvider=r,this.colWidth=0,this._monomerLengthList=null,this.separatorWidth=5,this._processedMaxVisibleSeqLength=0,this._monomerLengthMap={},this._monomerStructureMap={},this.props=this.propsProvider(),this._processedRows=s.BitSet.create(this.tableCol.length),this.gridCol&&this.subs.push(this.gridCol.grid.onAfterDrawContent.subscribe((()=>{this._onRendered.next()}))),(0,l.pj)().then((e=>{if(this.destroyed)return;const t=e.getBioLib();this.subs.push(t.onChanged.subscribe((()=>{this.reset(),this.gridCol?.grid?.invalidate()})))}))}reset(){this.propsProvider&&(this.props=this.propsProvider()),this._processedRows=s.BitSet.create(this.tableCol.length),this._monomerLengthList=null,this._monomerLengthMap={},this._monomerStructureMap={}}getCellMonomerLengths(e,t){this.colWidth<t&&(this.colWidth=t,this.reset());const n=this.props.seqHandler.isMsa()?this.getCellMonomerLengthsForSeqMsa():this.getCellMonomerLengthsForSeq(e),s=new Array(n.length+1);s[0]=5;for(let e=1;e<s.length;e++)s[e]=s[e-1]+n[e-1];return[n,s]}getCellMonomerLengthsForSeq(e){this.toLog(),null===this._monomerLengthList&&(this._monomerLengthList=new Array(this.tableCol.length).fill(null));const t=this.props.separatorWidth+1*this.props.monomerCharWidth,n=Math.ceil(this.colWidth/t),s=o.GO.forColumn(this.tableCol).getSplitted(e).originals,i=Math.min(n,s.length);let r=this._monomerLengthList[e];if(null===r||r.length<i){r=this._monomerLengthList[e]=new Array(s.length);let t=0;for(let e=0;e<i;++e){const n=s[e],i=this.props.monomerToShort(n,this.monomerLengthLimit),o=(this.props.seqHandler.isSeparator()?this.separatorWidth:this.props.separatorWidth)+i.length*this.props.monomerCharWidth;if(r[e]=o,t+=o,t>this.colWidth)break}}return r}getCellMonomerLengthsForSeqMsa(){var e;this.toLog(),null===this._monomerLengthList&&(this._monomerLengthList=new Array(1).fill(null)),(e=this._monomerLengthList)[0]??(e[0]=new Array(0));const t=this._monomerLengthList[0],{startIdx:n,endIdx:s}=(()=>{try{const e=this.gridCol&&this.gridCol.dart?this.gridCol.grid:null;return e&&e.dart?{startIdx:Math.max(Math.floor((e?.vertScroll.min??0)-10),0),endIdx:Math.min(Math.ceil((e?.vertScroll.max??0)+10),this.tableCol.length)}:{startIdx:0,endIdx:Math.min(this.tableCol.length,10)}}catch(e){return{startIdx:0,endIdx:Math.min(this.tableCol.length,10)}}})(),i=this.props.separatorWidth+1*this.props.monomerCharWidth,r=Math.ceil(this.colWidth/i);for(let e=n;e<s;e++){if(this._processedRows.get(e)&&r<=this._processedMaxVisibleSeqLength)continue;const n=o.GO.forColumn(this.tableCol).getSplitted(e,r).originals,s=Math.min(r,n.length);s>t.length&&t.push(...new Array(s-t.length).fill(i));let a=0;for(let e=0;e<s;++e){const s=n[e],i=this.props.monomerToShort(s,this.monomerLengthLimit),r=this.props.separatorWidth+i.length*this.props.monomerCharWidth;if(t[e]=Math.max(t[e]??0,r),a+=r,a>=this.colWidth)break}this._processedMaxVisibleSeqLength=Math.max(this._processedMaxVisibleSeqLength,r)}return t}getPosition(e,t,n){const[s,i]=this.getCellMonomerLengths(e,n),a=o.GO.forColumn(this.tableCol);return 0===r()(a.getSplitted(e).originals).toArray().length?null:function(e,t){let n,s=100,i=0,r=e.length-1;for(;i<=r;){if(n=Math.floor((r+i)/2),e[n]<=t&&t<e[n+1])return n;if(t<e[n]?r=n-1:i=n+1,--s<=0)throw new Error(`Get position for pointer x = ${t} searching has not converged on ${JSON.stringify(e)}. `)}return null}(i,t)}setMonomerLengthLimit(e){this.monomerLengthLimit=e,this.reset()}setSeparatorWidth(e){this.props.separatorWidth=e,this.reset()}isMsa(){return this.props.seqHandler.isMsa()}}},3151:(e,t,n)=>{"use strict";n.d(t,{EK:()=>a,Ec:()=>r,f6:()=>s,q7:()=>o,yw:()=>i});const s=["symbol","molfile","rgroups","name"],i="MonomerName",r={monomerType:null,smiles:null,name:"Name",author:null,molfile:"molecule",naturalAnalog:"MonomerNaturalAnalogCode",rgroups:"MonomerCaps",createDate:null,id:null,polymerType:"MonomerType",symbol:"MonomerName"},o="p",a=new RegExp(`[rd]\\((\\w)\\)${o}?`,"g")},9192:(e,t,n)=>{"use strict";function s(e){return"string"==typeof e||e instanceof String?e:"StateError"===e.constructor.name?e.message:"StateError"===e.constructor.name&&"$thrownJsError"in e?s(e.$thrownJsError):e instanceof Error?e.message:e.toString()}function i(e){return e instanceof Error?e.stack:"StateError"===e.constructor.name&&"$thrownJsError"in e?i(e.$thrownJsError):void 0}function r(e){return[s(e),i(e)]}n.d(t,{AP:()=>r})},3516:(e,t,n)=>{"use strict";n.d(t,{m:()=>o});var s=n(6082),i=n(826),r=n(439);class o{get descriptionsArray(){return this._descriptionsArray}get sequencesArray(){return this._sequencesArray}parseMacromolecule(e,t){return this._fileContent.slice(e,t).split(/\s/).join("")}parseColumns(){const e=/^>(.*)$/gm;let t,n=0;for(;t=e.exec(this._fileContent);){const s=this._fileContent.substring(t.index+1,e.lastIndex);this._descriptionsArray.push(s),0!==n&&this._sequencesArray.push(this.parseMacromolecule(n,t.index)),n=e.lastIndex+1}this._sequencesArray.push(this.parseMacromolecule(n,-1))}importFasta(){const e=s.Column.fromStrings("description",this.descriptionsArray),t=s.Column.fromStrings("sequence",this.sequencesArray);return t.semType=s.SEMTYPE.MACROMOLECULE,t.meta.units=r.Hi.FASTA,i.GO.forColumn(t),[s.DataFrame.fromColumns([e,t])]}constructor(e){this._descriptionsArray=[],this._sequencesArray=[],this._fileContent=e,this.parseColumns()}}},6873:(e,t,n)=>{"use strict";n.d(t,{Hx:()=>u,dW:()=>c});var s=n(6082),i=n(1991),r=n.n(i),o=n(2003),a=n(826),l=n(9322);function c(e=10**5){const t="meI/hHis/Aca/N//dE/Thr_PO3H2/Aca/D-Tyr_Et/Tyr_ab-dehydroMe".repeat(Math.ceil(e/10)).slice(0,-1),n=s.Column.fromList(s.COLUMN_TYPE.STRING,"MSA",new Array(100).fill(t));n.semType=s.SEMTYPE.MACROMOLECULE,n.meta.units=o.Hi.SEPARATOR,n.setTag(o.gp.separator,"/"),n.setTag(o.gp.alphabet,o.YI.UN),n.setTag(o.gp.alphabetIsMultichar,"true");const i=[];return i.push(n),i.push(s.Column.fromList(s.COLUMN_TYPE.FLOAT,"Activity",new Array(100).fill(7.30751))),i}function u(e=o.Hi.SEPARATOR,t=o.YI.PT,n=(e===o.Hi.SEPARATOR?"-":void 0),i=void 0,c="seq",u=100,h=10**6){const d=t===o.YI.UN?i?.getMonomerSymbolsByType("PEPTIDE")??[]:Array.from((0,o.Qf)(t)),m=d.length,p=s.Column.fromType(s.COLUMN_TYPE.STRING,c,u);p.semType=s.SEMTYPE.MACROMOLECULE,p.meta.units=e,p.setTag(o.gp.alphabet,t),e==o.Hi.SEPARATOR&&p.setTag(o.gp.separator,n);const f=a.GO.forColumn(p);for(let t=0;t<u;t++){const n=r().count(0).take(h).map((e=>d[Math.floor(Math.random()*m)])).toArray(),s=f.joiner(new l.Mu(n,a.b9[e]));p.set(t,s)}return p}},439:(e,t,n)=>{"use strict";n.d(t,{B5:()=>l,Hi:()=>s,Vl:()=>c,YI:()=>i,gp:()=>r,q7:()=>u,z1:()=>a});var s,i,r,o=n(2738);!function(e){e.FASTA="fasta",e.SEPARATOR="separator",e.HELM="helm"}(s||(s={})),function(e){e.DNA="DNA",e.RNA="RNA",e.PT="PT",e.UN="UN"}(i||(i={})),function(e){e.aligned="aligned",e.alphabet="alphabet",e.alphabetSize=".alphabetSize",e.alphabetIsMultichar=".alphabetIsMultichar",e.separator="separator",e.isHelmCompatible=".isHelmCompatible",e.positionNames=".positionNames",e.positionLabels=".positionLabels",e.regions=".regions"}(r||(r={}));const a=", ",l=/(?:\[([A-Za-z0-9_\-,()]+)\])|([A-Za-z\-])/g,c=new class{constructor(){this.fasta={peptide:new Set(["G","L","Y","S","E","Q","D","N","F","A","K","R","H","C","V","P","W","I","M","T"]),dna:new Set(["A","C","G","T"]),rna:new Set(["A","C","G","U"])}}},u=[new o.aD(i.PT,c.fasta.peptide,.5),new o.aD(i.DNA,c.fasta.dna,.55),new o.aD(i.RNA,c.fasta.rna,.55)]},2003:(e,t,n)=>{"use strict";n.d(t,{Hi:()=>s.Hi,J9:()=>i.J9,Qf:()=>i.Qf,SM:()=>i.SM,YI:()=>s.YI,dh:()=>i.dh,gp:()=>s.gp,mn:()=>i.mn,ny:()=>i.ny,q7:()=>s.q7,qp:()=>i.qp,z1:()=>s.z1,zS:()=>i.zS});var s=n(439),i=n(9322)},2738:(e,t,n)=>{"use strict";n.d(t,{XN:()=>r,_S:()=>s,aD:()=>i});const s="";class i{constructor(e,t,n){this.name=e,this.alphabet=t,this.cutoff=n}}class r extends i{constructor(e,t,n){super(e.name,e.alphabet,e.cutoff),this.freq=t,this.similarity=n}}},9322:(e,t,n)=>{"use strict";n.d(t,{Mu:()=>p,pc:()=>_,Qf:()=>E,ny:()=>T,Iv:()=>A,dh:()=>b,zS:()=>x,SM:()=>I,mn:()=>M,J9:()=>g,tm:()=>y,qp:()=>C});var s=n(6082),i=n(1991),r=n.n(i),o=n(2738),a=n(439),l=n(826);class c extends Float32Array{}var u=n(3629),h=n(8924),d=n(1093),m=n(4152);class p{get length(){return this.mList.length}get canonicals(){return this.mList}get originals(){return this.mList}isGap(e){return this.getOriginal(e)===this.gapOriginalMonomer}getCanonical(e){if(this.length<=e)throw new Error("Index out of bounds");return this.mList[e]}getOriginal(e){if(this.length<=e)throw new Error("Index out of bounds");return this.mList[e]}constructor(e,t){this.mList=e,this.gapOriginalMonomer=t}}class f{get length(){return this.seqS.length}get canonicals(){return this.seqS}get originals(){return this.seqS}isGap(e){return this.getOriginal(e)===l.b9[a.Hi.FASTA]}getCanonical(e){if(this.length<=e)throw new Error("Index out of bounds");return this.isGap(e)?o._S:this.seqS[e]}getOriginal(e){if(this.length<=e)throw new Error("Index out of bounds");return this.seqS[e]}constructor(e){this.seqS=e}}const g=e=>{const t=r()(e.toString().matchAll(a.B5)).map((e=>e[2]??e[1])).toArray();return new p(t,l.b9[a.Hi.FASTA])},y=e=>e?new f(e):new p([],l.b9[a.Hi.FASTA]);function b(e,t=void 0){return n=>{if(n){let s;const i=new RegExp(String.raw`"-"|'-'|[^${e}]+`,"g");if(void 0!==t){i.lastIndex=0,s=new Array(Math.ceil(t));let e=null,r=0;for(;null!==(e=i.exec(n))&&r<t;)s[r++]=e[0].replace('"-"',"").replace("'-'","");s.splice(r)}else s=n.replaceAll('"-"',"").replaceAll("'-'","").split(e,t);return new p(s,l.b9[a.Hi.SEPARATOR])}return new p([],l.b9[a.Hi.SEPARATOR])}}const v=/(PEPTIDE1|DNA1|RNA1)\{([^}]+)}/g,w=/\[([^\[\]]+)]/g,C=e=>{v.lastIndex=0;const t=v.exec(e.toString()),n=t?t[2]:null,s=n?n.split("."):[];return new p(s.map((e=>{w.lastIndex=0;const t=w.exec(e);return t&&t.length>=2?t[1]:e})),l.b9[a.Hi.HELM])};function A(e,t,n=void 0){if(e.toLowerCase().startsWith(a.Hi.FASTA))return g;if(e.toLowerCase().startsWith(a.Hi.SEPARATOR))return b(t,n);if(e.toLowerCase().startsWith(a.Hi.HELM))return C;throw new Error(`Unexpected units ${e} .`)}const S=/([^\W_]+)/g;function x(e,t){if(e.length<=t)return e;const n=e.match(S),s=e.length>t||(n?.length??0)>1,i=n?.[0]??" ";return s?i.substring(0,t-1)+"…":i}function E(e){switch(e){case a.YI.DNA:return a.Vl.fasta.dna;case a.YI.RNA:return a.Vl.fasta.rna;case a.YI.PT:return a.Vl.fasta.peptide;default:throw new Error(`Unsupported alphabet '${e}'.`)}}function _(e,t,n="-"){const s=t.map((t=>{const s=function(e,t,n="-"){const s=new Set([...new Set(Object.keys(e)),...t]);s.delete(n);const i=[],r=[];for(const n of s)i.push(n in e?e[n]:0),r.push(t.has(n)?1:0);const o=new c(i),a=new c(r);return(0,u.KE)(o,a)/((0,u.wQ)(o)*(0,u.wQ)(a))}(e,t.alphabet,n);return new o.XN(t,e,s)}));let i;const r=Math.max(...s.map((e=>e.similarity>e.cutoff?e.similarity:-1)));return i=r>0?s.find((e=>e.similarity===r)).name:a.YI.UN,i}function I(e,t=5){let n;if(e.semType==s.SEMTYPE.MACROMOLECULE)n=l.GO.forColumn(e).alphabet;else{const s=function(e,t,n){const s=e.categories;return function(e,t){const n={};let s=!0,i=null;for(const r of e)if(null==i?i=r.length:r.length!==i&&(s=!1),r.length>=t)for(const e of r.canonicals)e in n||(n[e]=0),n[e]+=1;return{freq:n,sameLength:s}}(r().enumerate(e.getRawData()).map((([e,t])=>n(s[e]))),t)}(e,t,g);n=_(s.freq,a.q7)}return T(n)}function T(e){switch(e){case a.YI.PT:return h.X.GrokGroups;case a.YI.DNA:case a.YI.RNA:return d.A.Chromatogram;default:return m.oT.Color}}function M(e){const t=e.columns.bySemTypeAll(s.SEMTYPE.MACROMOLECULE);let n=t.find((e=>{const t=e.meta.units;return!!t&&-1!==t.indexOf("MSA")}))??null;return!n&&t.length>0&&(n=t[0]),n}},826:(e,t,n)=>{"use strict";n.d(t,{GO:()=>p,b9:()=>m,j8:()=>d});var s=n(6082),i=n(1991),r=n.n(i),o=n(2003),a=n(2738),l=n(9322),c=n(6863),u=n(6718),h=n(3151);const d=new class{constructor(){this.seqHandler="seq-handler",this.notationProvider="seq-handler.notation-provider"}},m={[o.Hi.FASTA]:"-",[o.Hi.SEPARATOR]:"",[o.Hi.HELM]:"*"};class p{constructor(e){if(this._splitter=null,this.cached=!0,this._splitted=null,this.columnVersion=null,this._stats=null,this._maxLength=null,this._posList=null,this._joiner=void 0,e.type!==s.TYPE.STRING)throw new Error(`Unexpected column type '${e.type}', must be '${s.TYPE.STRING}'.`);this._column=e;const t=this._column.meta.units;if(null==t)throw new Error("Units are not specified in column");if(this._units=t,this._notation=this.getNotation(),this._defaultGapOriginal=this.isFasta()?m[o.Hi.FASTA]:this.isHelm()?m[o.Hi.HELM]:m[o.Hi.SEPARATOR],!this.column.tags.has(o.gp.aligned)||!this.column.tags.has(o.gp.alphabet)||!this.column.tags.has(o.gp.alphabetIsMultichar)&&!this.isHelm()&&this.alphabet===o.YI.UN)if(this.isFasta())p.setUnitsToFastaColumn(this);else if(this.isSeparator()){const t=e.getTag(o.gp.separator);p.setUnitsToSeparatorColumn(this,t)}else{if(!this.isHelm())throw new Error(`Unexpected units '${this.column.meta.units}'.`);p.setUnitsToHelmColumn(this)}if(!this.column.tags.has(o.gp.alphabetIsMultichar))if(this.isHelm())this.column.setTag(o.gp.alphabetIsMultichar,"true");else if(["UN"].includes(this.alphabet))throw new Error(`For column '${this.column.name}' of alphabet '${this.alphabet}' tag '${o.gp.alphabetIsMultichar}' is mandatory.`);this.notationProvider=this.column.temp[d.notationProvider]??null,this.columnVersion=this.column.version}static setUnitsToFastaColumn(e){if(e.column.semType!==s.SEMTYPE.MACROMOLECULE||e.column.meta.units!==o.Hi.FASTA)throw new Error(`The column of notation '${o.Hi.FASTA}' must be '${s.SEMTYPE.MACROMOLECULE}'.`);e.column.meta.units=o.Hi.FASTA,p.setTags(e)}static setUnitsToSeparatorColumn(e,t){if(e.column.semType!==s.SEMTYPE.MACROMOLECULE||e.column.meta.units!==o.Hi.SEPARATOR)throw new Error(`The column of notation '${o.Hi.SEPARATOR}' must be '${s.SEMTYPE.MACROMOLECULE}'.`);if(!t)throw new Error(`The column of notation '${o.Hi.SEPARATOR}' must have the separator tag.`);e.column.meta.units=o.Hi.SEPARATOR,e.column.setTag(o.gp.separator,t),p.setTags(e)}static setUnitsToHelmColumn(e){if(e.column.semType!==s.SEMTYPE.MACROMOLECULE)throw new Error(`The column of notation '${o.Hi.HELM}' must be '${s.SEMTYPE.MACROMOLECULE}'`);e.column.meta.units=o.Hi.HELM,p.setTags(e)}static setTags(e){const t=e.column.meta.units;if([o.Hi.FASTA,o.Hi.SEPARATOR].includes(t)){if(!e.column.getTag(o.gp.alphabet)&&0===Object.keys(e.stats.freq).length)throw new Error("Alphabet is empty and not annotated.");let t=e.column.getTag(o.gp.aligned);null===t&&(t=e.stats.sameLength?"SEQ.MSA":"SEQ",e.column.setTag(o.gp.aligned,t));let n=e.column.getTag(o.gp.alphabet);if(null===n&&(n=(0,l.pc)(e.stats.freq,o.q7),e.column.setTag(o.gp.alphabet,n)),n===o.YI.UN){const t=Object.keys(e.stats.freq).length,n=Object.keys(e.stats.freq).some((e=>e.length>1));e.column.setTag(o.gp.alphabetSize,t.toString()),e.column.setTag(o.gp.alphabetIsMultichar,n?"true":"false")}}}get column(){return this._column}get length(){return this._column.length}get units(){return this._units}get notation(){return this._notation}get defaultGapOriginal(){return this._defaultGapOriginal}get separator(){const e=this.column.getTag(o.gp.separator)??void 0;if(this.notation===o.Hi.SEPARATOR&&void 0===e)throw new Error(`Separator is mandatory for column '${this.column.name}' of notation '${this.notation}'.`);return e}get aligned(){const e=this.column.getTag(o.gp.aligned);if(!e&&(this.isFasta()||this.isSeparator()))throw new Error("Tag aligned not set");return e}get alphabet(){const e=this.column.getTag(o.gp.alphabet);if(!e&&(this.isFasta()||this.isSeparator()))throw new Error("Tag alphabet not set");return e}get helmCompatible(){return this.column.getTag(o.gp.isHelmCompatible)}getAlphabetSize(){if(this.notation==o.Hi.HELM||this.alphabet==o.YI.UN){const e=this.column.getTag(o.gp.alphabetSize);let t;if(e)t=parseInt(e);else{const e=this.stats;t=Object.keys(e.freq).length}return t}switch(this.alphabet){case o.YI.PT:return 20;case o.YI.DNA:case o.YI.RNA:return 4;case"NT":return console.warn("Unexpected alphabet 'NT'."),4;default:throw new Error(`Unexpected alphabet '${this.alphabet}'.`)}}getAlphabetIsMultichar(){return this.notation===o.Hi.HELM||this.alphabet===o.YI.UN&&"true"===this.column.getTag(o.gp.alphabetIsMultichar)}getSplitted(e,t){if(this.cached&&void 0===t){this.column.version===this.columnVersion&&null!==this._splitted||(this.columnVersion=this.column.version,this._splitted=new Array(this.column.length));let t=this._splitted[e]?this._splitted[e].deref():void 0;if(!t){const n=this.column.get(e);t=this.splitter(n),this._splitted[e]=new WeakRef(t)}return t}{const n=this.column.get(e);return this.getSplitter(t)(n)}}get stats(){if(null===this._stats){const e={};let t=!0,n=null;const s=this.column.length;for(let i=0;i<s;++i){const s=this.getSplitted(i);null==n?n=s.length:s.length!==n&&(t=!1);for(const t of s.canonicals)t in e||(e[t]=0),e[t]+=1}this._stats={freq:e,sameLength:t}}return this._stats}get maxLength(){return null===this._maxLength&&(this._maxLength=0===this.column.length?0:Math.max(...r().count(0).take(this.column.length).map((e=>this.getSplitted(e).length)))),this._maxLength}get posList(){if(null===this._posList){const e=this.column.getTag(o.gp.positionNames);this._posList=e?e.split(o.z1).map((e=>e.trim())):r().count(1).take(this.maxLength).map((e=>e.toString())).toArray()}return this._posList}isFasta(){return this.notation===o.Hi.FASTA}isSeparator(){return this.notation===o.Hi.SEPARATOR}isHelm(){return this.notation===o.Hi.HELM}isRna(){return this.alphabet===o.YI.RNA}isDna(){return this.alphabet===o.YI.DNA}isPeptide(){return this.alphabet===o.YI.PT}isMsa(){return!!this.aligned&&this.aligned.toUpperCase().includes("MSA")}isHelmCompatible(){return"true"===this.helmCompatible}isGap(e){return!e||e===this._defaultGapOriginal}getNotation(){if(this.units.toLowerCase().startsWith(o.Hi.FASTA))return o.Hi.FASTA;if(this.units.toLowerCase().startsWith(o.Hi.SEPARATOR))return o.Hi.SEPARATOR;if(this.units.toLowerCase().startsWith(o.Hi.HELM))return o.Hi.HELM;throw new Error(`Column '${this.column.name}' has unexpected notation '${this.units}'.`)}getHelmWrappers(){return[this.isDna()||this.isRna()||this.isHelmCompatible()?"RNA1{":"PEPTIDE1{",this.isDna()?"d(":this.isRna()?"r(":"",this.isDna()||this.isRna()?")p":"","}$$$$"]}getNewColumn(e,t,n,i){const r=this.column,a=e.toLowerCase()+"("+r.name+")",l=n??r.dataFrame.columns.getUnusedName(a),c=s.Column.fromList("string",l,i??new Array(this.column.length).fill(""));if(c.semType=s.SEMTYPE.MACROMOLECULE,c.meta.units=e,e===o.Hi.SEPARATOR){if(!t)throw new Error(`Notation '${o.Hi.SEPARATOR}' requires separator value.`);c.setTag(o.gp.separator,t)}c.setTag(s.TAGS.CELL_RENDERER,e===o.Hi.HELM?"helm":"sequence");const u=r.getTag(o.gp.aligned);u&&c.setTag(o.gp.aligned,u);let h=r.getTag(o.gp.alphabet);h||this.notation!==o.Hi.HELM||e===o.Hi.HELM||(h=o.YI.UN),null!=h&&c.setTag(o.gp.alphabet,h);let d=r.getTag(o.gp.alphabetSize);null!=h&&d&&c.setTag(o.gp.alphabetSize,d);const m=r.getTag(o.gp.alphabetIsMultichar);return null!=h&&void 0!==m&&c.setTag(o.gp.alphabetIsMultichar,m),e==o.Hi.HELM&&(d=this.getAlphabetSize().toString(),c.setTag(o.gp.alphabetSize,d)),c}getNewColumnFromList(e,t){return this.getNewColumn(this.notation,this.separator,e,t)}static getNewColumn(e){const t=p.forColumn(e),n=t.notation;return t.getNewColumn(n)}static unitsStringIsValid(e){return e=e.toLowerCase(),[o.Hi.FASTA,o.Hi.SEPARATOR,o.Hi.HELM].some((t=>e.startsWith(t.toLowerCase())))}static getNewColumnFromParams(e,t,n){if(!p.unitsStringIsValid(n))throw new Error("Invalid format of 'units' parameter");const i=s.Column.fromList("string",t,new Array(e).fill(""));return i.semType=s.SEMTYPE.MACROMOLECULE,i.meta.units=n,i}getSplitter(e){let t=null;if(t=this.notationProvider?this.notationProvider.splitter:null,t)return t;if(this.units.toLowerCase().startsWith(o.Hi.FASTA))return null===this.column.getTag(o.gp.alphabet)||this.getAlphabetIsMultichar()?o.J9:l.tm;if(this.units.toLowerCase().startsWith(o.Hi.SEPARATOR))return(0,o.dh)(this.separator,e);if(this.units.toLowerCase().startsWith(o.Hi.HELM))return o.qp;throw new Error(`Unexpected units ${this.units} .`)}split(e){return this.splitter(e)}getDistanceFunctionName(){if(!this.isFasta())throw new Error("Only FASTA notation is supported");if(this.isMsa())return c.Z.HAMMING;switch(this.alphabet){case o.YI.DNA:case o.YI.RNA:case o.YI.PT:}return c.Z.LEVENSHTEIN}getDistanceFunction(){return c.V[this.getDistanceFunctionName()]()}async checkHelmCompatibility(){if(this.column.tags.has(o.gp.isHelmCompatible))return"true"===this.column.getTag(o.gp.isHelmCompatible);const e=(await(0,u.pj)()).getBioLib().getMonomerSymbolsByType("PEPTIDE"),t=new Set(e),n=((0,o.dh)(this.separator),new Set),s=this.column.length,i=this.column.getRawData();for(let e=0;e<s;++e){const s=i[e];if(!(s in n)){n.add(s);const i=this.getSplitted(e);for(const e of i.canonicals)if(!t.has(e))return this.column.setTag(o.gp.isHelmCompatible,"false"),!1}}return this.column.setTag(o.gp.isHelmCompatible,"true"),!0}get splitter(){return null===this._splitter&&(this._splitter=this.getSplitter()),this._splitter}toFasta(e){return e===o.Hi.FASTA}toSeparator(e){return e===o.Hi.SEPARATOR}toHelm(e){return e===o.Hi.HELM}convertHelmToFastaSeparator(e,t,n,s){s||(s=this.toFasta(t)?m[o.Hi.FASTA]:m[o.Hi.SEPARATOR]),n||(n=this.toFasta(t)?"":this.separator);const i=e.startsWith("RNA"),r=this.splitter(e),a=[];for(let e=0;e<r.length;++e){let n=r.getOriginal(e);if(i&&(n=n.replace(h.EK,"")),n===m[o.Hi.HELM])a.push(s);else if(this.toFasta(t)&&n.length>1){const e="["+n+"]";a.push(e)}else a.push(n)}return a.join(n)}convert(e,t){const n=this.getJoiner({notation:e,separator:t}),s=this.getNewColumn(e,t);return s.init((e=>{const t=this.getSplitted(e);return n(t)})),s}getRegion(e,t,n){const s=this.getNewColumn(this.notation,this.separator);s.name=n;const i=e??0,r=t??this.maxLength-1,a=this.getJoiner(),c=r-i+1,u=m[this.notation];s.init((e=>{const t=this.getSplitted(e),n=new Array(c);for(let e=0;e<c;++e){const s=i+e;n[e]=s<t.length?t.getOriginal(s):u}return a(new l.Mu(n,u))}));const h=e=>{const t=e.split(",").map((e=>e.trim())),n=new Array(c);for(let e=0;e<c;++e){const s=i+e;n[e]=s<t.length?t[s]:"?"}return n.join(o.z1)},d=this.column.getTag(o.gp.positionNames);d&&s.setTag(o.gp.positionNames,h(d));const p=this.column.getTag(o.gp.positionLabels);return p&&s.setTag(o.gp.positionLabels,h(p)),s}get joiner(){return this._joiner||(this._joiner=this.getJoiner()),this._joiner}getJoiner(e){const t=e?e.notation:this.notation,n=e?e.separator:this.separator;let s;const i=this;switch(t){case o.Hi.FASTA:s=function(e){return i.joinToFasta(e,i.isHelm())};break;case o.Hi.SEPARATOR:if(!n)throw new Error(`Separator is mandatory for notation '${t}'.`);s=function(e){return f(e,n,i.isHelm())};break;case o.Hi.HELM:{const e=i.alphabet===o.YI.DNA||i.alphabet===o.YI.RNA,t=i.getHelmWrappers();s=function(n){return g(n,t,e)};break}default:throw new Error(`Unexpected notation '${t}'.`)}return s}getConverter(e,t=void 0){if(e===o.Hi.SEPARATOR&&!t)throw new Error(`Target separator is not specified for target units '${o.Hi.SEPARATOR}'.`);const n=this;if(e===o.Hi.FASTA)return function(e){return n.convertToFasta(e)};if(e===o.Hi.HELM)return function(e){return n.convertToHelm(e)};if(e===o.Hi.SEPARATOR)return function(e){return n.convertToSeparator(e,t)};throw new Error}static forColumn(e){let t=e.temp[d.seqHandler];return t&&t.columnVersion===e.version||(t=e.temp[d.seqHandler]=new p(e)),t}joinToFasta(e,t){const n=new Array(e.length);for(let s=0;s<e.length;++s){const i=e.getOriginal(s);let r=e.getOriginal(s);t&&(r=r.replace(h.EK,"$1")),i===a._S?r=m[o.Hi.FASTA]:i===h.q7?r="":r.length>1&&(r="["+r+"]"),n[s]=r}return n.join("")}convertToFasta(e){const t=this.splitter,n=this.isHelm()?this.splitterAsHelmNucl(e):t(e);return this.joinToFasta(n,this.isHelm())}convertToSeparator(e,t){return f(this.isHelm()?this.splitterAsHelmNucl(e):this.splitter(e),t,this.isHelm())}convertToHelm(e){const t=this.getHelmWrappers(),n=e.startsWith("DNA")||e.startsWith("RNA");return g(this.splitter(e),t,n)}splitterAsHelmNucl(e){const t=this.splitter(e),n=new Array(t.length),s=e.startsWith("DNA"),i=e.startsWith("RNA");for(let e=0;e<t.length;++e){let r=t.getOriginal(e);(s||i)&&(r=r.replace(h.EK,"$1"),r=r===h.q7?null:r),n[e]=r||null}return new l.Mu(n.filter((e=>!!e)),m[o.Hi.HELM])}}function f(e,t,n){const s=new Array(e.length);for(let t=0;t<e.length;++t){const i=e.getCanonical(t);let r=e.getOriginal(t);n&&(r=r.replace(h.EK,"$1")),i===a._S?r=m[o.Hi.SEPARATOR]:i===h.q7&&(r=""),s[t]=r}return s.join(t)}function g(e,t,n){const[s,i,r,l]=t,c=new Array(e.length);for(let t=0;t<e.length;++t){const s=e.getCanonical(t);let l=e.getOriginal(t);s===a._S?l=m[o.Hi.HELM]:(n&&(l=l.replace(h.EK,"$1")),l=1===l.length?`${i}${l}${r}`:`${i}[${l}]${r}`),c[t]=l}return`${s}${c.join(".")}${l}`}},3077:(e,t,n)=>{"use strict";n.d(t,{R:()=>r});var s=n(6082),i=n(826);function r(e){const t=e=>{const t=o.columns.addNewString((e+1).toString());return n.push(t),t},n=[],r=e.length,o=s.DataFrame.create(r),a=i.GO.forColumn(e);for(let e=0;e<r;++e){const s=a.getSplitted(e);for(let i=0;i<s.length;++i){const r=s.getOriginal(i);((n[i]??null)||t(i)).set(e,r,!1)}}return o}},7602:(e,t,n)=>{"use strict";n.d(t,{g:()=>r});var s,i=n(9192);!function(e){e[e.error=0]="error",e[e.warning=1]="warning",e[e.info=2]="info",e[e.debug=3]="debug"}(s||(s={}));class r{constructor(e){this.logger=e,this.promise=Promise.resolve(),this.errors=[],this.syncCounter=0}sync(e,t){const n=++this.syncCounter;this.logger.debug(`${e}, SYNC syncId = ${n}, IN `),this.promise=this.promise.then((async()=>{this.logger.debug(`${e}, SYNC syncId = ${n}, START `),await t(),this.logger.debug(`${e}, SYNC syncId = ${n}, END `)})).catch((t=>{const[s,r]=(0,i.AP)(t);this.logger.error(`${e}, SYNC syncId = ${n}, ERROR:\n${s}`,void 0,r),this.errors.push(t)}))}resetErrors(){const e=this.errors;return this.errors=[],e}}},4326:(e,t,n)=>{"use strict";n.d(t,{Fo:()=>u,Lp:()=>r,P4:()=>o,fH:()=>i,gp:()=>s,lT:()=>l,mH:()=>a});var s,i,r,o,a,l,c=n(6082);!function(e){e.tooltipWebLogo=".tooltipWebLogo"}(s||(s={})),function(e){e.Entropy="Entropy",e.full="100%"}(i||(i={})),function(e){e.TOP="top",e.MIDDLE="middle",e.BOTTOM="bottom"}(r||(r={})),function(e){e.LEFT="left",e.CENTER="center",e.RIGHT="right"}(o||(o={})),function(e){e.AUTO="auto",e.ON="on",e.OFF="off"}(a||(a={})),function(e){e.Filtered="Filtered",e.Selected="Selected"}(l||(l={}));const u=new class{constructor(){this.sequenceColumnName=null,this.valueAggrType=c.AGG.TOTAL_COUNT,this.valueColumnName="Activity",this.startPositionName=null,this.endPositionName=null,this.skipEmptySequences=!0,this.skipEmptyPositions=!1,this.shrinkEmptyTail=!0,this.backgroundColor=4294967295,this.positionHeight=i.Entropy,this.positionWidth=16,this.verticalAlignment=r.MIDDLE,this.horizontalAlignment=o.CENTER,this.fixWidth=!1,this.fitArea=!0,this.minHeight=50,this.maxHeight=100,this.showPositionLabels=!0,this.positionMarginState=a.AUTO,this.positionMargin=0,this.filterSource=l.Filtered}}},5540:(e,t,n)=>{"use strict";e=n.hmd(e);var s,i=(s="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e={}){var t,n,i=void 0!==e?e:{};i.ready=new Promise((function(e,s){t=e,n=s}));var r,o=Object.assign({},i),a="object"==typeof window,l="function"==typeof importScripts,c=("object"==typeof process&&"object"==typeof process.versions&&process.versions.node,"");(a||l)&&(l?c=self.location.href:"undefined"!=typeof document&&document.currentScript&&(c=document.currentScript.src),s&&(c=s),c=0!==c.indexOf("blob:")?c.substr(0,c.replace(/[?#].*/,"").lastIndexOf("/")+1):"",l&&(r=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)})),i.print||console.log.bind(console);var u,h,d=i.printErr||console.warn.bind(console);Object.assign(i,o),o=null,i.arguments&&i.arguments,i.thisProgram&&i.thisProgram,i.quit&&i.quit,i.wasmBinary&&(u=i.wasmBinary),i.noExitRuntime,"object"!=typeof WebAssembly&&x("no native wasm support detected");var m,p,f,g=!1;function y(){var e=h.buffer;i.HEAP8=m=new Int8Array(e),i.HEAP16=new Int16Array(e),i.HEAP32=new Int32Array(e),i.HEAPU8=p=new Uint8Array(e),i.HEAPU16=new Uint16Array(e),i.HEAPU32=f=new Uint32Array(e),i.HEAPF32=new Float32Array(e),i.HEAPF64=new Float64Array(e)}var b=[],v=[],w=[],C=0,A=null,S=null;function x(e){i.onAbort&&i.onAbort(e),d(e="Aborted("+e+")"),g=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}var E,_;function I(e){return e.startsWith("data:application/octet-stream;base64,")}function T(e){try{if(e==E&&u)return new Uint8Array(u);if(r)return r(e);throw"both async and sync fetching of the wasm failed"}catch(e){x(e)}}function M(e,t,n){return function(e){return u||!a&&!l||"function"!=typeof fetch?Promise.resolve().then((function(){return T(e)})):fetch(e,{credentials:"same-origin"}).then((function(t){if(!t.ok)throw"failed to load wasm binary file at '"+e+"'";return t.arrayBuffer()})).catch((function(){return T(e)}))}(e).then((function(e){return WebAssembly.instantiate(e,t)})).then((function(e){return e})).then(n,(function(e){d("failed to asynchronously prepare wasm: "+e),x(e)}))}function $(e){for(;e.length>0;)e.shift()(i)}function L(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){f[this.ptr+4>>2]=e},this.get_type=function(){return f[this.ptr+4>>2]},this.set_destructor=function(e){f[this.ptr+8>>2]=e},this.get_destructor=function(){return f[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,m[this.ptr+12|0]=e},this.get_caught=function(){return 0!=m[this.ptr+12|0]},this.set_rethrown=function(e){e=e?1:0,m[this.ptr+13|0]=e},this.get_rethrown=function(){return 0!=m[this.ptr+13|0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t)},this.set_adjusted_ptr=function(e){f[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return f[this.ptr+16>>2]},this.get_exception_ptr=function(){if(D(this.get_type()))return f[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}function N(e){var t=h.buffer;try{return h.grow(e-t.byteLength+65535>>>16),y(),1}catch(e){}}function P(e){return i["_"+e]}I(E="wasmDbscan.wasm")||(_=E,E=i.locateFile?i.locateFile(_,c):c+_);var R="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function O(e,t,n,s,i){var r={string:e=>{var t=0;return null!=e&&0!==e&&(t=function(e){var t=function(e){for(var t=0,n=0;n<e.length;++n){var s=e.charCodeAt(n);s<=127?t++:s<=2047?t+=2:s>=55296&&s<=57343?(t+=4,++n):t+=3}return t}(e)+1,n=B(t);return function(e,t,n){!function(e,t,n,s){if(!(s>0))return 0;for(var i=n+s-1,r=0;r<e.length;++r){var o=e.charCodeAt(r);if(o>=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++r)),o<=127){if(n>=i)break;t[n++]=o}else if(o<=2047){if(n+1>=i)break;t[n++]=192|o>>6,t[n++]=128|63&o}else if(o<=65535){if(n+2>=i)break;t[n++]=224|o>>12,t[n++]=128|o>>6&63,t[n++]=128|63&o}else{if(n+3>=i)break;t[n++]=240|o>>18,t[n++]=128|o>>12&63,t[n++]=128|o>>6&63,t[n++]=128|63&o}}t[n]=0}(e,p,t,n)}(e,n,t),n}(e)),t},array:e=>{var t,n,s=B(e.length);return t=e,n=s,m.set(t,n),s}},o=P(e),a=[],l=0;if(s)for(var c=0;c<s.length;c++){var u=r[n[c]];u?(0===l&&(l=G()),a[c]=u(s[c])):a[c]=s[c]}var h=o.apply(null,a);return function(e){return 0!==l&&H(l),function(e){return"string"===t?(n=e)?function(e,t,n){for(var s=t+n,i=t;e[i]&&!(i>=s);)++i;if(i-t>16&&e.buffer&&R)return R.decode(e.subarray(t,i));for(var r="";t<i;){var o=e[t++];if(128&o){var a=63&e[t++];if(192!=(224&o)){var l=63&e[t++];if((o=224==(240&o)?(15&o)<<12|a<<6|l:(7&o)<<18|a<<12|l<<6|63&e[t++])<65536)r+=String.fromCharCode(o);else{var c=o-65536;r+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else r+=String.fromCharCode((31&o)<<6|a)}else r+=String.fromCharCode(o)}return r}(p,n,s):"":"boolean"===t?Boolean(e):e;var n,s}(e)}(h)}var k,F={__cxa_throw:function(e,t,n){throw new L(e).init(t,n),e},abort:function(){x("")},emscripten_memcpy_big:function(e,t,n){p.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){var t,n=p.length,s=2147483648;if((e>>>=0)>s)return!1;for(var i=1;i<=4;i*=2){var r=n*(1+.2/i);if(r=Math.min(r,e+100663296),N(Math.min(s,(t=Math.max(e,r))+(65536-t%65536)%65536)))return!0}return!1}},G=(function(){var e,t,s,r,o={env:F,wasi_snapshot_preview1:F};function a(e,t){var n,s=e.exports;return i.asm=s,h=i.asm.memory,y(),i.asm.__indirect_function_table,n=i.asm.__wasm_call_ctors,v.unshift(n),function(){if(C--,i.monitorRunDependencies&&i.monitorRunDependencies(C),0==C&&(null!==A&&(clearInterval(A),A=null),S)){var e=S;S=null,e()}}(),s}if(C++,i.monitorRunDependencies&&i.monitorRunDependencies(C),i.instantiateWasm)try{return i.instantiateWasm(o,a)}catch(e){d("Module.instantiateWasm callback failed with error: "+e),n(e)}(e=u,t=E,s=o,r=function(e){a(e.instance)},e||"function"!=typeof WebAssembly.instantiateStreaming||I(t)||"function"!=typeof fetch?M(t,s,r):fetch(t,{credentials:"same-origin"}).then((function(e){return WebAssembly.instantiateStreaming(e,s).then(r,(function(e){return d("wasm streaming compile failed: "+e),d("falling back to ArrayBuffer instantiation"),M(t,s,r)}))}))).catch(n)}(),i._dbscan=function(){return(i._dbscan=i.asm.dbscan).apply(null,arguments)},i._malloc=function(){return(i._malloc=i.asm.malloc).apply(null,arguments)},i._free=function(){return(i._free=i.asm.free).apply(null,arguments)},function(){return(G=i.asm.stackSave).apply(null,arguments)}),H=function(){return(H=i.asm.stackRestore).apply(null,arguments)},B=function(){return(B=i.asm.stackAlloc).apply(null,arguments)},D=function(){return(D=i.asm.__cxa_is_pointer_type).apply(null,arguments)};function V(){function e(){k||(k=!0,i.calledRun=!0,g||($(v),t(i),i.onRuntimeInitialized&&i.onRuntimeInitialized(),function(){if(i.postRun)for("function"==typeof i.postRun&&(i.postRun=[i.postRun]);i.postRun.length;)e=i.postRun.shift(),w.unshift(e);var e;$(w)}()))}C>0||(function(){if(i.preRun)for("function"==typeof i.preRun&&(i.preRun=[i.preRun]);i.preRun.length;)e=i.preRun.shift(),b.unshift(e);var e;$(b)}(),C>0||(i.setStatus?(i.setStatus("Running..."),setTimeout((function(){setTimeout((function(){i.setStatus("")}),1),e()}),1)):e()))}if(i.ccall=O,i.cwrap=function(e,t,n,s){var i=!n||n.every((e=>"number"===e||"boolean"===e));return"string"!==t&&i&&!s?P(e):function(){return O(e,t,n,arguments)}},S=function e(){k||V(),k||(S=e)},i.preInit)for("function"==typeof i.preInit&&(i.preInit=[i.preInit]);i.preInit.length>0;)i.preInit.pop()();return V(),e.ready});"object"==typeof exports?e.exports=i:"function"==typeof define&&n.amdO?define([],(function(){return i})):"object"==typeof exports&&(exports.exportCppDbscanLib=i)},6295:(e,t,n)=>{"use strict";n.d(t,{$1:()=>a,Hr:()=>S,Ii:()=>p,T6:()=>A,TK:()=>w,a4:()=>d,be:()=>m,gt:()=>y,iS:()=>o,ij:()=>b,lO:()=>h,lP:()=>g,rR:()=>f,tO:()=>l,v_:()=>c,yK:()=>v,zn:()=>u});var s=n(8774),i=n(8498),r=n(6863);i.aT.Tanimoto,i.aT.Dice,i.aT.Asymmetric,i.aT.BraunBlanquet,i.aT.Cosine,i.aT.Kulczynski,i.aT.McConnaughey,i.aT.RogotGoldberg,i.aT.Russel,i.aT.Sokal,i.aT.Hamming,i.aT.Euclidean,i.aT.Tanimoto,i.aT.Dice,i.aT.Asymmetric,i.aT.BraunBlanquet,i.aT.Cosine,i.aT.Kulczynski,i.aT.McConnaughey,i.aT.RogotGoldberg,i.aT.Russel,i.aT.Sokal,i.aT.Hamming,i.aT.Euclidean;const o=[i.aT.Tanimoto,i.aT.Dice,i.aT.Cosine];function a(e,t){const n=e.trueCount()+t.trueCount();if(0==n)return 1;const s=e.andWithCountBits(t,!0);return s/(n-s)}function l(e,t){return 1-a(e,t)}function c(e,t){return C(a(new s.A(e,32*e.length),new s.A(t,32*t.length)))}function u(e,t){return 1-function(e,t){const n=e.trueCount()+t.trueCount();return 0==n?0:2*e.andWithCountBits(t,!0)/n}(e,t)}function h(e,t){return 1-function(e,t){const n=e.trueCount()*t.trueCount();return 0==n?0:e.andWithCountBits(t,!0)/Math.sqrt(n)}(e,t)}function d(e,t){return Math.sqrt(e.trueCount()+t.trueCount()-2*e.andWithCountBits(t,!0))}function m(e,t){return e.trueCount()+t.trueCount()-2*e.andWithCountBits(t,!0)}function p(e,t){return 1-function(e,t){const n=e.trueCount()+t.trueCount(),s=e.andWithCountBits(t,!0);return s/(2*n-3*s)}(e,t)}function f(e,t){return C(function(e,t){const n=e.trueCount()+t.trueCount(),s=e.trueCount()*t.trueCount();return 0==s?0:e.andWithCountBits(t,!0)*n/(2*s)}(e,t))}function g(e,t){return C(function(e,t){const n=e.trueCount()+t.trueCount(),s=e.trueCount()*t.trueCount();return 0==s?0:(e.andWithCountBits(t,!0)*n-s)/s}(e,t))}function y(e,t){return 1-function(e,t){const n=Math.min(e.trueCount(),t.trueCount());return 0==n?0:e.andWithCountBits(t,!0)/n}(e,t)}function b(e,t){return C(function(e,t){const n=Math.max(e.trueCount(),t.trueCount());return 0==n?0:e.andWithCountBits(t,!0)/n}(e,t))}function v(e,t){return C(function(e,t){return 0==e.length?0:e.andWithCountBits(t,!0)/e.length}(e,t))}function w(e,t){return C(function(e,t){const n=e.andWithCountBits(t,!0),s=e.countBits(!0)+t.countBits(!0),i=e.length,r=i-s+n;return n==i||r==i?1:n/s+r/(2*i-s)}(e,t))}function C(e){return 0===e?3402823e32:1/e-1}function A(e){if(e&&null!=e.range&&e.range>0){const t=e.range;return(e,n)=>Math.abs(e-n)/t}return(e,t)=>Math.abs(e-t)}function S(e){const t=function(e){const t=e?.mostCommon??new Set;return(e,n)=>{const s=e.length,i=n.length;let r=0,o=0,a=0;for(;o<s&&a<i;)e[o]===n[a]?(t?.has(e[o])||++r,++o,++a):e[o]<n[a]?++o:++a;return r}}(e);return(e,n)=>0===n.length||0===e.length?1e4:Math.min(e.length,n.length)/(t(e,n)+1e-4)}i.aT.Tanimoto,i.aT.Asymmetric,i.aT.Cosine,i.aT.Sokal,r.Z.HAMMING,r.Z.LEVENSHTEIN,r.Z.MONOMER_CHEMICAL_DISTANCE,r.Z.NEEDLEMANN_WUNSCH},684:(e,t,n)=>{"use strict";n.d(t,{C0:()=>r,GP:()=>s,Gi:()=>a,YP:()=>c,_X:()=>o,n3:()=>i,vb:()=>l});const s="dim-red-preprocessing-function",i="supportedSemTypes",r="supportedTypes",o="supportedUnits",a="supportedDistanceFunctions",l="bypassLargeDataWarning",c="show-scatterplot-progress"},6863:(e,t,n)=>{"use strict";function s(e={}){const t=function(){if(!e||!e.scoringMatrix||!e.alphabetIndexes)return(e,t)=>e===t?0:1;if(e.scoringMatrix.length!==Object.keys(e.alphabetIndexes).length)throw new Error("Scoring matrix and alphabet indexes should have the same length");const t=e.alphabetIndexes,n=e.scoringMatrix,s=Math.min(...Object.keys(t).map((e=>e.charCodeAt(0))))+1,i=new Float32Array((n.length+s)*(n.length+s));return Object.entries(t).forEach((([e,s])=>{const r=n[s];Object.entries(t).forEach((([t,s])=>{i[e.charCodeAt(0)*n.length+t.charCodeAt(0)]=r[s]}))})),(e,t)=>1-i[e.charCodeAt(0)*n.length+t.charCodeAt(0)]}(),n=e?.threshold??0;return(e,s)=>{let i=0;const r=e.length,o=s.length,a=Math.ceil(Math.max(r,o)*(1-n));r!==o&&(i=Math.abs(r-o));let l=0;for(let n=0;n<Math.min(r,o);n++)if(e[n]!==s[n]&&(l+=t(e[n],s[n]),l>a))return 1;return l+=i,l/=Math.max(r,o),l}}n.d(t,{Z:()=>o,V:()=>a});var i=n(2787);const r={gapOpen:1,gapExtend:.6,scoringMatrix:[[4,-1,-2,-2,0,-1,-1,0,-2,-1,-1,-1,-1,-2,-1,1,0,-3,-2,0,-2,-1,0,-4],[-1,5,0,-2,-3,1,0,-2,0,-3,-2,2,-1,-3,-2,-1,-1,-3,-2,-3,-1,0,-1,-4],[-2,0,6,1,-3,0,0,0,1,-3,-3,0,-2,-3,-2,1,0,-4,-2,-3,3,0,-1,-4],[-2,-2,1,6,-3,0,2,-1,-1,-3,-4,-1,-3,-3,-1,0,-1,-4,-3,-3,4,1,-1,-4],[0,-3,-3,-3,9,-3,-4,-3,-3,-1,-1,-3,-1,-2,-3,-1,-1,-2,-2,-1,-3,-3,-2,-4],[-1,1,0,0,-3,5,2,-2,0,-3,-2,1,0,-3,-1,0,-1,-2,-1,-2,0,3,-1,-4],[-1,0,0,2,-4,2,5,-2,0,-3,-3,1,-2,-3,-1,0,-1,-3,-2,-2,1,4,-1,-4],[0,-2,0,-1,-3,-2,-2,6,-2,-4,-4,-2,-3,-3,-2,0,-2,-2,-3,-3,-1,-2,-1,-4],[-2,0,1,-1,-3,0,0,-2,8,-3,-3,-1,-2,-1,-2,-1,-2,-2,2,-3,0,0,-1,-4],[-1,-3,-3,-3,-1,-3,-3,-4,-3,4,2,-3,1,0,-3,-2,-1,-3,-1,3,-3,-3,-1,-4],[-1,-2,-3,-4,-1,-2,-3,-4,-3,2,4,-2,2,0,-3,-2,-1,-2,-1,1,-4,-3,-1,-4],[-1,2,0,-1,-3,1,1,-2,-1,-3,-2,5,-1,-3,-1,0,-1,-3,-2,-2,0,1,-1,-4],[-1,-1,-2,-3,-1,0,-2,-3,-2,1,2,-1,5,0,-2,-1,-1,-1,-1,1,-3,-1,-1,-4],[-2,-3,-3,-3,-2,-3,-3,-3,-1,0,0,-3,0,6,-4,-2,-2,1,3,-1,-3,-3,-1,-4],[-1,-2,-2,-1,-3,-1,-1,-2,-2,-3,-3,-1,-2,-4,7,-1,-1,-4,-3,-2,-2,-1,-2,-4],[1,-1,1,0,-1,0,0,0,-1,-2,-2,0,-1,-2,-1,4,1,-3,-2,-2,0,0,0,-4],[0,-1,0,-1,-1,-1,-1,-2,-2,-1,-1,-1,-1,-2,-1,1,5,-2,-2,0,-1,-1,0,-4],[-3,-3,-4,-4,-2,-2,-3,-2,-2,-3,-2,-3,-1,1,-4,-3,-2,11,2,-3,-4,-3,-2,-4],[-2,-2,-2,-3,-2,-1,-2,-3,2,-1,-1,-2,-1,3,-3,-2,-2,2,7,-1,-3,-2,-1,-4],[0,-3,-3,-3,-1,-2,-2,-3,-3,3,1,-2,1,-1,-2,-2,0,-3,-1,4,-3,-2,-1,-4],[-2,-1,3,4,-3,0,1,-1,0,-3,-4,0,-3,-3,-2,0,-1,-4,-3,-3,4,1,-1,-4],[-1,0,0,1,-3,3,4,-2,0,-3,-3,1,-1,-3,-1,0,-1,-3,-2,-2,1,4,-1,-4],[0,-1,-1,-1,-2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-2,0,0,-2,-1,-1,-1,-1,-1,-4],[-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,-4,1]],alphabetIndexes:{A:0,R:1,N:2,D:3,C:4,Q:5,E:6,G:7,H:8,I:9,L:10,K:11,M:12,F:13,P:14,S:15,T:16,W:17,Y:18,V:19,B:20,Z:21,X:22,"*":23}};var o;!function(e){e.HAMMING="Hamming",e.LEVENSHTEIN="Levenshtein",e.NEEDLEMANN_WUNSCH="Needlemann-Wunsch",e.MONOMER_CHEMICAL_DISTANCE="Monomer chemical distance"}(o||(o={}));const a={[o.HAMMING]:s,[o.LEVENSHTEIN]:function(){return(e,t)=>(0,i.I)(e,t)/Math.max(e.length,t.length)},[o.NEEDLEMANN_WUNSCH]:function(e){const t=new Uint16Array(65536),{gapOpen:n,gapExtend:s,scoringMatrix:i,alphabetIndexes:o}={...r,...e};Object.entries(o).forEach((([e,n])=>t[e.charCodeAt(0)]=n));const a=[new Float32Array(1e4),new Float32Array(1e4)];return(e,r)=>{const o=new Array(e.length+1).fill(!1),l=new Array(e.length+1).fill(!1);let c=0,u=1;for(let t=1;t<e.length+1;t++)a[0][t]=-n-(t-1)*s,a[1][t]=0;a[0][0]=0;for(let h=1;h<r.length+1;h++){a[u][0]=-n-(h-1)*s;for(let d=1;d<e.length+1;d++){const m=a[c][d-1]+i[t[e.charCodeAt(d-1)]][t[r.charCodeAt(h-1)]],p=a[c][d]-(o[d]?s:n),f=a[u][d-1]-(l[d-1]?s:n);a[u][d]=Math.max(m,f,p),a[u][d]===m?(o[d]=!1,l[d]=!1):a[u][d]===f?(o[d]=!1,l[d]=!0):(o[d]=!0,l[d]=!1)}c=u,u=(u+1)%2}const h=Math.max(e.length,r.length);return(h-a[c][e.length])/h}},[o.MONOMER_CHEMICAL_DISTANCE]:s}},9039:(e,t,n)=>{"use strict";var s;n.d(t,{c:()=>s}),function(e){e.UMAP="UMAP",e.T_SNE="t-SNE"}(s||(s={}))},8498:(e,t,n)=>{"use strict";var s,i,r,o,a,l,c;n.d(t,{EG:()=>a,Pn:()=>i,RR:()=>l,Wn:()=>c,aT:()=>r,m6:()=>o,xL:()=>s}),function(e){e.Levenshtein="Levenshtein",e.JaroWinkler="Jaro-Winkler",e.Manhattan="Manhattan",e.Onehot="One-Hot"}(s||(s={})),function(e){e.Euclidean="Euclidean"}(i||(i={})),function(e){e.Tanimoto="Tanimoto",e.Dice="Dice",e.Asymmetric="Asymmetric",e.BraunBlanquet="Braun-Blanquet",e.Cosine="Cosine",e.Kulczynski="Kulczynski",e.McConnaughey="Mc-Connaughey",e.RogotGoldberg="Rogot-Goldberg",e.Russel="Russel",e.Sokal="Sokal",e.Hamming="Hamming",e.Euclidean="Euclidean"}(r||(r={})),function(e){e.TanimotoIntArray="TanimotoIntArray"}(o||(o={})),function(e){e.Vector="Vector",e.String="String",e.BitArray="BitArray",e.MacroMolecule="MacroMolecule",e.Number="Number",e.IntArray="IntArray",e.NumberArray="NumberArray"}(a||(a={})),function(e){e.Difference="Difference"}(l||(l={})),function(e){e.CommonItems="Common Items"}(c||(c={}))},2780:(e,t,n)=>{"use strict";n.d(t,{xL:()=>s.xL});var s=n(8498);n(9336)},9336:(e,t,n)=>{"use strict";var s=n(2787),i=n(944),r=n(6295),o=n(3629),a=n(6863),l=n(8498);const c={[l.Pn.Euclidean]:o.ou},u={[l.xL.Levenshtein]:s.I,[l.xL.JaroWinkler]:i.Vb,[l.xL.Manhattan]:function(e,t){if(e.length!==t.length)return 1;{let n=0;for(let s=1;s<e.length;s++)n+=e[s]==t[s]?0:1;return n/e.length}},[l.xL.Onehot]:function(e,t){return e===t?0:1}},h={[l.aT.Tanimoto]:r.tO,[l.aT.Dice]:r.zn,[l.aT.Asymmetric]:r.gt,[l.aT.BraunBlanquet]:r.ij,[l.aT.Cosine]:r.lO,[l.aT.Kulczynski]:r.rR,[l.aT.McConnaughey]:r.lP,[l.aT.RogotGoldberg]:r.TK,[l.aT.Russel]:r.yK,[l.aT.Sokal]:r.Ii,[l.aT.Hamming]:r.be,[l.aT.Euclidean]:r.a4},d={[l.m6.TanimotoIntArray]:r.v_},m={[l.RR.Difference]:r.T6},p={[l.Wn.CommonItems]:r.Hr},f={[l.EG.Vector]:{[l.Pn.Euclidean]:c[l.Pn.Euclidean]},[l.EG.String]:{[l.xL.Levenshtein]:u[l.xL.Levenshtein],[l.xL.JaroWinkler]:u[l.xL.JaroWinkler],[l.xL.Manhattan]:u[l.xL.Manhattan],[l.xL.Onehot]:u[l.xL.Onehot]},[l.EG.BitArray]:{[l.aT.Tanimoto]:h[l.aT.Tanimoto],[l.aT.Dice]:h[l.aT.Dice],[l.aT.Asymmetric]:h[l.aT.Asymmetric],[l.aT.BraunBlanquet]:h[l.aT.BraunBlanquet],[l.aT.Cosine]:h[l.aT.Cosine],[l.aT.Kulczynski]:h[l.aT.Kulczynski],[l.aT.McConnaughey]:h[l.aT.McConnaughey],[l.aT.RogotGoldberg]:h[l.aT.RogotGoldberg],[l.aT.Russel]:h[l.aT.Russel],[l.aT.Sokal]:h[l.aT.Sokal]},[l.EG.MacroMolecule]:{[a.Z.HAMMING]:a.V[a.Z.HAMMING],[a.Z.LEVENSHTEIN]:a.V[a.Z.LEVENSHTEIN],[a.Z.NEEDLEMANN_WUNSCH]:a.V[a.Z.NEEDLEMANN_WUNSCH],[a.Z.MONOMER_CHEMICAL_DISTANCE]:a.V[a.Z.MONOMER_CHEMICAL_DISTANCE]},[l.EG.Number]:{[l.RR.Difference]:m[l.RR.Difference]},[l.EG.IntArray]:{[l.m6.TanimotoIntArray]:d[l.m6.TanimotoIntArray]},[l.EG.NumberArray]:{[l.Wn.CommonItems]:p[l.Wn.CommonItems]}};Object.keys(f).reduce(((e,t)=>{for(const n of Object.keys(f[t]))e[n]=t;return e}),{})},8774:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});class s{constructor(e,t=!1){if(this._length=0,this._version=0,this._updateLevel=0,this._selectedCount=0,this._selectedCountVersion=-1,this._selectedIndexesVersion=-1,this._versionedName="",this._versionedNameVersion=-1,this.SHRINK_THRESHOLD=256,"number"==typeof e){const n=e,i=s._createBuffer(n);if(t)for(let e=0;e<i.length;e++)i[e]=-1;this._data=i,this._length=n}else{if(!(e instanceof Uint32Array))throw new Error("Invalid constructor");this._data=e,this._length=t}}getRawData(){return this._data}assureGoez(e,t){if(e<0)throw new Error(`${t} should be greater than zero`)}assureInRange(e,t,n,s){if(e<t||e>n)throw new Error(`Argument ${s} (${e}) out of range (${t}, ${n})`)}copy(e,t,n){for(let s=0;s<n;s++)t[s]=e[s]}copyFrom(e){if(this._length!=e._length)throw new Error(`Lengths differ (${this._length} != ${e._length})`);this.copy(e._data,this._data,this.lengthInInts),this._version++}get length(){return this._length}get buffer(){return this._data}set buffer(e){this._data=e,this._version++}get version(){return this._version}set version(e){this._version=e}incrementVersion(e=!0){this._version++}get lengthInInts(){return Math.floor((this._length+31)/32)}get versionedName(){return this._version==this._versionedNameVersion?this._versionedName:""}set versionedName(e){this._versionedName=e,this._versionedNameVersion=this._version}get self(){return this}setLength(e){if(e<0)throw new Error("should be >= 0");if(e==this._length)return;const t=Math.floor((e+31)/32);if(t>this._data.length||t+this.SHRINK_THRESHOLD<this._data.length){const e=new Uint32Array(t);this.copy(this._data,e,t>this._data.length?this._data.length:t),this._data=e}e>this._length&&(this._length%32>0&&(this._data[this.lengthInInts-1]&=(1<<(this._length%32&31))-1),this._data.fill(0,this.lengthInInts,t)),this._length=e,this._version++}static fromAnd(e,t){if(e._length!=t._length)throw new Error(`Lengths differ (${e._length} != ${t._length})`);const n=new s(e._length);n._length=e._length,n._data=s._createBuffer(n._length),n._version=0;const i=e.lengthInInts;for(let s=0;s<i;s++)n._data[s]=e._data[s]&t._data[s];return n}static _createBuffer(e){return new Uint32Array(Math.floor((e+31)/32))}static fromValues(e){const t=new s(e.length);t._version=0;for(let n=0;n<t._length;n++)e[n]&&(t._data[Math.floor(n/32)]|=1<<(n%32&31));return t}static fromSeq(e,t){const n=new s(e);for(let s=0;s<e;++s)n.setBit(s,t(s));return n._version=0,n}static fromString(e){return s.fromSeq(e.length,(t=>"1"==e.charAt(t)))}static fromUint32Array(e,t){const n=new s(e);return n._data=t,n}static fromBytes(e){const t=e.length,n=new s(8*t);n._data=new Uint32Array(Math.floor((t+3)/4)),n._length=8*t;let i=0,r=0;for(;t-r>=4;)n._data[i++]=255&e[r]|(255&e[r+1])<<8|(255&e[r+2])<<16|(255&e[r+3])<<24,r+=4;return t-r==3&&(n._data[i]=(255&e[r+2])<<16),t-r==2&&(n._data[i]|=(255&e[r+1])<<8),t-r==1&&(n._data[i]|=255&e[r]),n._version=0,n}toString(){return`${this._length} bits, ${this.countBits(!0)} set`}equals(e){if(this==e)return!0;if(null==e)return!1;if(this._length!=e._length)return!1;if(0==this._length)return!0;for(let t=0;t<this._data.length-1;t++)if(this._data[t]!=e._data[t])return!1;for(let t=8*(this._data.length-1);t<this._length;t++)if(this.getBit(t)!=e.getBit(t))return!1;return!0}clone(){const e=new s(0,!1);return e._data=Uint32Array.from(this._data),e._length=this._length,e._version=this._version,e}init(e,t){this.setAll(!1,!1);for(let t=0;t<this._length;t++)e(t)&&(this._data[Math.floor(t/32)]|=1<<(t%32&31));return this.incrementVersion(t),this}invert(e=!0){for(let e=0;e<this._data.length;e++)this._data[e]^=-1;this.incrementVersion(e)}setAll(e,t=!1){const n=e?-1:0,s=this.lengthInInts;for(let e=0;e<s;e++)this._data[e]=n;this.incrementVersion(t)}setIndexes(e,t=!0,n=!0,s=!0){n&&this.setAll(!t,!1);for(const n of e)this.setFast(n,t);this.incrementVersion(s)}everyIndex(e,t=!0){for(const n of e)if(this.getBit(n)!=t)return!1;return!0}anyIndex(e,t=!0){for(const n of e)if(this.getBit(n)==t)return!0;return!1}setWhere(e,t=!0,n=!0,s=!0,i=!0){if(n&&i&&this.setAll(!t,!1),i)for(let n=0;n<this._length;n++)e(n)&&this.setFast(n,t);else for(let n=0;n<this._length;n++)this.setFast(n,e(n)?t:!t);this.incrementVersion(s)}getRange(e,t){this.assureInRange(e,0,this._length-1,"from"),this.assureInRange(t,0,this._length,"to");const n=[];for(let s=e;s<t;++s)n.push(this.getBit(s));return s.fromValues(n)}getRangeAsList(e,t){this.assureInRange(e,0,this._length-1,"from"),this.assureInRange(t,0,this._length,"to");const n=[];for(let s=e;s<t;++s)n.push(this.getBit(s));return n}setRange(e,t,n,s=!0){this.assureInRange(e,0,this._length-1,"from"),this.assureInRange(t,0,this._length-1,"to");const i=Math.min(e,t),r=Math.max(e,t);if(n)for(let e=i;e<=r;e++)this.setTrue(e);else for(let e=i;e<=r;e++)this.setFalse(e);return this.incrementVersion(s),this}setRandom(e,t,n=!0){if(e<0||e>this._length)throw new Error("n must be >= 0 && <= Count");e>this._length/2&&this.setRandom(this._length-e,!t),this.setAll(!t);for(let n=0;n<e;){const e=Math.floor(Math.random()*this._length);this.getBit(e)!=t&&(this.setFast(e,t),n++)}this.incrementVersion(n)}and(e,t=!0){if(this._length!=e._length)throw new Error("Array lengths differ.");for(let t=0,n=this.lengthInInts;t<n;t++)this._data[t]&=e._data[t];return this.incrementVersion(t),this}andNot(e,t=!0){if(this._length!=e._length)throw new Error("Array lengths differ.");const n=this.lengthInInts;for(let t=0;t<n;t++)this._data[t]&=~e._data[t];return this.incrementVersion(t),this}notAnd(e,t=!0){if(this._length!=e._length)throw new Error("Array lengths differ.");for(let t=0,n=this.lengthInInts;t<n;t++)this._data[t]=~this._data[t]&e._data[t];return this.incrementVersion(t),this}not(e=!0){for(let e=0,t=this.lengthInInts;e<t;e++)this._data[e]=~this._data[e];return this.incrementVersion(e),this}or(e,t=!0){if(this._length!=e._length)throw new Error("Array lengths differ.");for(let t=0,n=this.lengthInInts;t<n;t++)this._data[t]|=e._data[t];return this.incrementVersion(t),this}xor(e,t=!0){if(this._length!=e._length)throw new Error("Array lengths differ.");for(let t=0,n=this.lengthInInts;t<n;t++)this._data[t]^=e._data[t];return this.incrementVersion(t),this}insertAt(e,t,n=!1){if(this.assureInRange(e,0,this._length,"pos"),0==t)return;const s=this._length;this.setLength(this._length+t);for(let n=s-1;n>=e;n--)this.setBit(n+t,this.getBit(n));for(let s=e;s<e+t;s++)this.setBit(s,n)}removeAt(e,t=1){if(t<0)throw new Error("n cannot be negative");if(this.assureInRange(e,0,this._length-t,"pos"),this.contains(!0))for(let n=e;n<this._length-t;n++)this.setBit(n,this.getBit(n+t));this.setLength(this._length-t)}removeByMask(e,t=!0){if(this._length!=e.length)throw new Error("length != mask.length");if(e==this)this.setLength(e.countBits(!t)),this.setAll(!t);else{let n=0;for(let s=-1;-1!=(s=e.findNext(s,!t));)this.setFast(n++,this.getBit(s));this._length=n,this._version++}return this}getBit(e){return!!(this._data[Math.floor(e/32)]&1<<(31&e))}setBit(e,t,n=!0){this.setFast(e,t),this._version++}setFast(e,t){t?this._data[Math.floor(e/32)]|=1<<(31&e):this._data[Math.floor(e/32)]&=~(1<<(31&e))}setTrue(e){this._data[Math.floor(e/32)]|=1<<(31&e)}setFalse(e){this._data[Math.floor(e/32)]&=~(1<<(31&e))}trueCount(){return this.countBits(!0)}falseCount(){return this.countBits(!1)}countBits(e){if(0==this._length)return 0;if(this._selectedCountVersion!=this._version){this._selectedCount=0;const e=this.lengthInInts;let t=0;for(;t<e-1;t++)for(let e=this._data[t];0!=e;e>>>=8)this._selectedCount+=s._onBitCount[255&e];let n=this._data[t];const i=31&this._length;for(0!=i&&(n&=~(4294967295<<i));0!=n;n>>>=8)this._selectedCount+=s._onBitCount[255&n];this._selectedCountVersion=this._version}return e?this._selectedCount:this._length-this._selectedCount}countWhere(e){let t=0;if(this.trueCount()==this._length)for(let n=0;n<this._length;n++)t+=e(n)?1:0;else for(let n=-1;-1!=(n=this.findNext(n,!0));)t+=e(n)?1:0;return t}andWithCountBits(e,t){if(0==this._length)return 0;let n=0;const i=this.lengthInInts;let r=0;for(;r<i-1;r++)for(let t=this._data[r]&e._data[r];0!=t;t>>>=8)n+=s._onBitCount[255&t];let o=this._data[r]&e._data[r];const a=31&this._length;for(0!=a&&(o&=~(4294967295<<a));0!=o;o>>>=8)n+=s._onBitCount[255&o];return t?n:this._length-n}clear(){this.setLength(0)}contains(e){return this.findNext(-1,e)>=0}get allTrue(){return this.countBits(!0)==this._length}get allFalse(){return this.countBits(!1)==this._length}get anyTrue(){return this.countBits(!0)>0}get anyFalse(){return this.countBits(!1)>0}findNext(e,t=!0){if(this.assureInRange(e,-1,this._length,"index"),e>=this._length-1)return-1;let n=31&(e=e<0?0:e+1);const i=this.lengthInInts;for(let r=Math.floor(e/32);r<i;r++){let i=t?this._data[r]:~this._data[r];if(0!=n)i&=4294967295<<n&4294967295,n=0;else if(!t&&-4294967296==i)continue;for(let t=0;0!=i;t+=8,i>>>=8){const n=s._firstOnBit[255&i];if(n>=0)return(e=n+32*r+t)>=this._length?-1:e}}return-1}findPrev(e,t=!0){if(0==e)return-1;this.assureInRange(e,-1,this._length,"index");let n=1+(e=e<0?this._length-1:e-1)&31;for(let i=Math.floor(e/32);i>=0;i--){let e=t?this._data[i]:~this._data[i];0!=n&&(e&=~(4294967295<<n),n=0);for(let t=24;0!=e;t-=8,e<<=8){const n=s._lastOnBit[e>>>24];if(n>=0)return n+32*i+t}}return-1}}s._onBitCount=Int8Array.from([0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,5,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,6,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,3,4,4,5,4,5,5,6,4,5,5,6,5,6,6,7,4,5,5,6,5,6,6,7,5,6,6,7,6,7,7,8]),s._firstOnBit=Int8Array.from([-1,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0]),s._lastOnBit=Int8Array.from([-1,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7])},8070:(e,t,n)=>{"use strict";n.d(t,{cb:()=>a,PE:()=>o}),n(4328);var s=n(6082);n(9982),s.DataFrame.fromCsv('countries,fasta,smiles,molregno,LON,Zip Code,Street Address Line 1,ImageUrl,user_id,error_message,xray,flag,magnitude,CS-id,pdb_id,accel_a,time_offset,chart,fit,Questions,empty_number,empty_string\nBelgium,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C(=O)OCCCc1cccnc1)c2cccc(c2)C(=O)c3ccccc3,1480014,36.276729583740234,995042300,14016 ROUTE 31W,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,1,1,1QBS,1,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.497360340644872, 1.7058694986686864, 5.278052678195135, 0.16000320889028383],""points"":[{""x"":0.10000000149011612,""y"":2.374499797821045},{""x"":0.6000000238418579,""y"":2.6242473125457764},{""x"":1.100000023841858,""y"":2.367267608642578},{""x"":1.600000023841858,""y"":2.6723148822784424},{""x"":2.0999999046325684,""y"":2.6537344455718994},{""x"":2.5999999046325684,""y"":2.3651671409606934},{""x"":3.0999999046325684,""y"":2.5654284954071045},{""x"":3.5999999046325684,""y"":2.4160959720611572},{""x"":4.099999904632568,""y"":2.286726713180542},{""x"":4.599999904632568,""y"":2.5100042819976807},{""x"":5.099999904632568,""y"":1.6676985025405884},{""x"":5.599999904632568,""y"":0.680136501789093},{""x"":6.099999904632568,""y"":0.3391543924808502},{""x"":6.599999904632568,""y"":0.09038983285427094},{""x"":7.099999904632568,""y"":0.19802775979042053}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[7.525235855508179, 1.3186911876809984, 5.335672608564294, 0.7860743343958098],""points"":[{""x"":0.10000000149011612,""y"":7.988070487976074},{""x"":0.6000000238418579,""y"":7.018453121185303},{""x"":1.100000023841858,""y"":8.115279197692871},{""x"":1.600000023841858,""y"":7.486658096313477},{""x"":2.0999999046325684,""y"":7.396438121795654},{""x"":2.5999999046325684,""y"":7.477052211761475},{""x"":3.0999999046325684,""y"":6.913095474243164},{""x"":3.5999999046325684,""y"":8.01385498046875},{""x"":4.099999904632568,""y"":6.985900402069092},{""x"":4.599999904632568,""y"":6.970335960388184},{""x"":5.099999904632568,""y"":5.448817253112793},{""x"":5.599999904632568,""y"":2.5534818172454834},{""x"":6.099999904632568,""y"":1.893947958946228},{""x"":6.599999904632568,""y"":0.6340042352676392},{""x"":7.099999904632568,""y"":0.8403874039649963}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,100,abc\nBurundi,MDYKETLLMPKTDFPMRGGLPNKEPQIQEKW,COc1ccc2cc(ccc2c1)C(C)C(=O)Oc3ccc(C)cc3OC,1480015,36.276729583740234,995073444,80 STATE HIGHWAY 310,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,2,2,1ZP8,2,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.431460753103398, 2.1691498799246745, 5.266445597102774, 0.7825762827017926],""points"":[{""x"":0.10000000149011612,""y"":4.751083850860596},{""x"":0.6000000238418579,""y"":4.203000068664551},{""x"":1.100000023841858,""y"":4.415858745574951},{""x"":1.600000023841858,""y"":4.68414306640625},{""x"":2.0999999046325684,""y"":4.198400974273682},{""x"":2.5999999046325684,""y"":4.179222106933594},{""x"":3.0999999046325684,""y"":4.638473987579346},{""x"":3.5999999046325684,""y"":4.708553314208984},{""x"":4.099999904632568,""y"":4.291589260101318},{""x"":4.599999904632568,""y"":4.038082599639893},{""x"":5.099999904632568,""y"":3.4349939823150635},{""x"":5.599999904632568,""y"":1.2194708585739136},{""x"":6.099999904632568,""y"":1.1920831203460693},{""x"":6.599999904632568,""y"":0.5352635979652405},{""x"":7.099999904632568,""y"":0.3346920311450958}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.339458017970126, -1.0734184310171178, 4.746332950550934, 0.2482416857595658],""points"":[{""x"":0.10000000149011612,""y"":0.2139337658882141},{""x"":0.6000000238418579,""y"":0.4269562065601349},{""x"":1.100000023841858,""y"":0.2441573292016983},{""x"":1.600000023841858,""y"":0.146635964512825},{""x"":2.0999999046325684,""y"":0.08818462491035461},{""x"":2.5999999046325684,""y"":0.2560656666755676},{""x"":3.0999999046325684,""y"":0.42434045672416687},{""x"":3.5999999046325684,""y"":0.37111231684684753},{""x"":4.099999904632568,""y"":0.5581737160682678},{""x"":4.599999904632568,""y"":1.183590054512024},{""x"":5.099999904632568,""y"":1.5629843473434448},{""x"":5.599999904632568,""y"":2.3211288452148438},{""x"":6.099999904632568,""y"":2.229961633682251},{""x"":6.599999904632568,""y"":2.2560226917266846},{""x"":7.099999904632568,""y"":2.2142398357391357}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCameroon,MIEVFLFGIVLGLIPITLAGLFVTAYLQYRRGDQLDL,COc1ccc2cc(ccc2c1)C(C)C(=O)OCCCc3cccnc3,1480016,36.26095962524414,995153596,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,3,3,2BDJ,3,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.6760652578642325, 0.9046956320756703, 5.651408971856738, 0.07738846012184185],""points"":[{""x"":0.10000000149011612,""y"":4.32425594329834},{""x"":0.6000000238418579,""y"":4.668442249298096},{""x"":1.100000023841858,""y"":4.379785060882568},{""x"":1.600000023841858,""y"":5.0345139503479},{""x"":2.0999999046325684,""y"":4.878653526306152},{""x"":2.5999999046325684,""y"":4.3451313972473145},{""x"":3.0999999046325684,""y"":4.336992263793945},{""x"":3.5999999046325684,""y"":5.037430286407471},{""x"":4.099999904632568,""y"":5.0092692375183105},{""x"":4.599999904632568,""y"":4.151902675628662},{""x"":5.099999904632568,""y"":3.4066951274871826},{""x"":5.599999904632568,""y"":2.3732759952545166},{""x"":6.099999904632568,""y"":1.673728108406067},{""x"":6.599999904632568,""y"":0.48574790358543396},{""x"":7.099999904632568,""y"":0.2783052325248718}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.938395863010111, -1.4658480661392117, 5.462702751996584, 0.3473139023615039],""points"":[{""x"":0.10000000149011612,""y"":0.4941710829734802},{""x"":0.6000000238418579,""y"":0.15323974192142487},{""x"":1.100000023841858,""y"":0.46373432874679565},{""x"":1.600000023841858,""y"":0.3370431363582611},{""x"":2.0999999046325684,""y"":0.5179030299186707},{""x"":2.5999999046325684,""y"":0.27899765968322754},{""x"":3.0999999046325684,""y"":0.22075064480304718},{""x"":3.5999999046325684,""y"":0.5789918899536133},{""x"":4.099999904632568,""y"":0.21169911324977875},{""x"":4.599999904632568,""y"":0.27857646346092224},{""x"":5.099999904632568,""y"":1.0906332731246948},{""x"":5.599999904632568,""y"":1.8520300388336182},{""x"":6.099999904632568,""y"":2.7177059650421143},{""x"":6.599999904632568,""y"":2.8680918216705322},{""x"":7.099999904632568,""y"":3.2413077354431152}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCanada,MMELVLKTIIGPIVVGVVLRIVDKWLNKDK,CC(C(=O)NCCS)c1cccc(c1)C(=O)c2ccccc2,1480017,36.26095962524414,99515,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,4,4,1IAN,4,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[0.8597390975430008, 1.0957625732481946, 5.260537067987958, 0.07974187998177736],""points"":[{""x"":0.10000000149011612,""y"":0.8190152645111084},{""x"":0.6000000238418579,""y"":0.8421689867973328},{""x"":1.100000023841858,""y"":0.8740922212600708},{""x"":1.600000023841858,""y"":0.8924275040626526},{""x"":2.0999999046325684,""y"":0.8249067664146423},{""x"":2.5999999046325684,""y"":0.9327669143676758},{""x"":3.0999999046325684,""y"":0.8522974252700806},{""x"":3.5999999046325684,""y"":0.8174492716789246},{""x"":4.099999904632568,""y"":0.8394647240638733},{""x"":4.599999904632568,""y"":0.7139387726783752},{""x"":5.099999904632568,""y"":0.5561167597770691},{""x"":5.599999904632568,""y"":0.3276226818561554},{""x"":6.099999904632568,""y"":0.12479474395513535},{""x"":6.599999904632568,""y"":0.13006797432899475},{""x"":7.099999904632568,""y"":0.059702079743146896}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.760930219582546, 1.6591793293833013, 4.667155929720851, 0.7858109544121652],""points"":[{""x"":0.10000000149011612,""y"":6.156993389129639},{""x"":0.6000000238418579,""y"":5.236701965332031},{""x"":1.100000023841858,""y"":6.010560512542725},{""x"":1.600000023841858,""y"":5.495512962341309},{""x"":2.0999999046325684,""y"":6.087770462036133},{""x"":2.5999999046325684,""y"":5.79986572265625},{""x"":3.0999999046325684,""y"":5.597546577453613},{""x"":3.5999999046325684,""y"":5.520902156829834},{""x"":4.099999904632568,""y"":5.360654354095459},{""x"":4.599999904632568,""y"":3.5539746284484863},{""x"":5.099999904632568,""y"":1.577236294746399},{""x"":5.599999904632568,""y"":1.0001264810562134},{""x"":6.099999904632568,""y"":0.9305797815322876},{""x"":6.599999904632568,""y"":0.6033638715744019},{""x"":7.099999904632568,""y"":0.4203685522079468}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nColombia,MDRTDEVSNHTHDKPTLTWFEEIFEEYHSPFHN,FC(F)(F)c1ccc(OC2CCNCC2)cc1,1480029,36.3309440612793,995152050,1 COURT HOUSE SQUARE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,5,5,4UJ1,5,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[6.4995088314153655, 2.4270351004539914, 5.178659535348579, 0.625653346241577],""points"":[{""x"":0.10000000149011612,""y"":6.496231555938721},{""x"":0.6000000238418579,""y"":6.42543363571167},{""x"":1.100000023841858,""y"":7.040063858032227},{""x"":1.600000023841858,""y"":6.1115403175354},{""x"":2.0999999046325684,""y"":6.680728435516357},{""x"":2.5999999046325684,""y"":6.406774520874023},{""x"":3.0999999046325684,""y"":6.611269474029541},{""x"":3.5999999046325684,""y"":5.889094352722168},{""x"":4.099999904632568,""y"":6.75344705581665},{""x"":4.599999904632568,""y"":6.361435890197754},{""x"":5.099999904632568,""y"":4.1666975021362305},{""x"":5.599999904632568,""y"":1.172118902206421},{""x"":6.099999904632568,""y"":0.801048994064331},{""x"":6.599999904632568,""y"":0.4640021026134491},{""x"":7.099999904632568,""y"":0.0010357667924836278}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[1.4734381347446401, 1.1649805188074196, 4.82958608866421, 0.09500545496710007],""points"":[{""x"":0.10000000149011612,""y"":1.5279096364974976},{""x"":0.6000000238418579,""y"":1.3559974431991577},{""x"":1.100000023841858,""y"":1.5246378183364868},{""x"":1.600000023841858,""y"":1.5567657947540283},{""x"":2.0999999046325684,""y"":1.4114240407943726},{""x"":2.5999999046325684,""y"":1.4045010805130005},{""x"":3.0999999046325684,""y"":1.4769829511642456},{""x"":3.5999999046325684,""y"":1.4875500202178955},{""x"":4.099999904632568,""y"":1.2991987466812134},{""x"":4.599999904632568,""y"":0.922961413860321},{""x"":5.099999904632568,""y"":0.6520044803619385},{""x"":5.599999904632568,""y"":0.15350978076457977},{""x"":6.099999904632568,""y"":0.1078903079032898},{""x"":6.599999904632568,""y"":0.17276449501514435},{""x"":7.099999904632568,""y"":0.14066608250141144}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCosta Rica,MKSTKEEIQTIKTLLKDSRTAKYHKRLQIVL,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCCc3ccccc3,1480018,36.3309440612793,995084218,4041 SOUTHWESTERN BLVD,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,6,6,2BPW,6,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.4833641843311227, -1.8945978742090062, 4.671127708092568, 0.24159861311815153],""points"":[{""x"":0.10000000149011612,""y"":0.0969524160027504},{""x"":0.6000000238418579,""y"":0.028483040630817413},{""x"":1.100000023841858,""y"":0.22087176144123077},{""x"":1.600000023841858,""y"":0.0068915546871721745},{""x"":2.0999999046325684,""y"":0.4305879771709442},{""x"":2.5999999046325684,""y"":0.44774115085601807},{""x"":3.0999999046325684,""y"":0.45346319675445557},{""x"":3.5999999046325684,""y"":0.2370593100786209},{""x"":4.099999904632568,""y"":0.4657953977584839},{""x"":4.599999904632568,""y"":1.155200719833374},{""x"":5.099999904632568,""y"":2.2294070720672607},{""x"":5.599999904632568,""y"":2.4311530590057373},{""x"":6.099999904632568,""y"":2.33846116065979},{""x"":6.599999904632568,""y"":2.608201026916504},{""x"":7.099999904632568,""y"":2.8136143684387207}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.224573521642033, 1.4454033924198528, 5.6014197746076535, 0.2823216054197577],""points"":[{""x"":0.10000000149011612,""y"":4.95027494430542},{""x"":0.6000000238418579,""y"":5.1754679679870605},{""x"":1.100000023841858,""y"":5.276752948760986},{""x"":1.600000023841858,""y"":5.589294910430908},{""x"":2.0999999046325684,""y"":5.616994857788086},{""x"":2.5999999046325684,""y"":5.120813846588135},{""x"":3.0999999046325684,""y"":5.340766906738281},{""x"":3.5999999046325684,""y"":4.876471042633057},{""x"":4.099999904632568,""y"":4.94999361038208},{""x"":4.599999904632568,""y"":5.162564754486084},{""x"":5.099999904632568,""y"":4.399557590484619},{""x"":5.599999904632568,""y"":2.7977969646453857},{""x"":6.099999904632568,""y"":1.0229872465133667},{""x"":6.599999904632568,""y"":0.48275601863861084},{""x"":7.099999904632568,""y"":0.10408931970596313}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCuba,MHAILRYFIRRLFYHIFYKIYSLISKKHQSLPSDVRQF,COc1ccc2c(c1)c(CC(=O)N3CCCC3C(=O)Oc4ccc(C)cc4OC)c(C)n2C(=O)c5ccc(Cl)cc5,1480019,36.33115768432617,995081928,1227 US HIGHWAY 11,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,7,7,1QBS,7,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.320838679713925, -1.2421619987316728, 4.831325425225256, 0.3236011098403072],""points"":[{""x"":0.10000000149011612,""y"":0.3727470338344574},{""x"":0.6000000238418579,""y"":0.12365014106035233},{""x"":1.100000023841858,""y"":0.48422467708587646},{""x"":1.600000023841858,""y"":0.2264465093612671},{""x"":2.0999999046325684,""y"":0.16821794211864471},{""x"":2.5999999046325684,""y"":0.3879014551639557},{""x"":3.0999999046325684,""y"":0.5470244884490967},{""x"":3.5999999046325684,""y"":0.3419053554534912},{""x"":4.099999904632568,""y"":0.7655120491981506},{""x"":4.599999904632568,""y"":1.2346516847610474},{""x"":5.099999904632568,""y"":2.453336715698242},{""x"":5.599999904632568,""y"":2.9565491676330566},{""x"":6.099999904632568,""y"":3.335299491882324},{""x"":6.599999904632568,""y"":3.240290880203247},{""x"":7.099999904632568,""y"":3.1107218265533447}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.6401853521511094, 1.26211588875013, 5.399028074402744, 0.5089580830068091],""points"":[{""x"":0.10000000149011612,""y"":3.8585598468780518},{""x"":0.6000000238418579,""y"":3.6077206134796143},{""x"":1.100000023841858,""y"":3.855252265930176},{""x"":1.600000023841858,""y"":3.619039297103882},{""x"":2.0999999046325684,""y"":3.839388370513916},{""x"":2.5999999046325684,""y"":3.335283041000366},{""x"":3.0999999046325684,""y"":3.571141481399536},{""x"":3.5999999046325684,""y"":3.4155046939849854},{""x"":4.099999904632568,""y"":3.7316646575927734},{""x"":4.599999904632568,""y"":3.0680155754089355},{""x"":5.099999904632568,""y"":2.891066551208496},{""x"":5.599999904632568,""y"":1.6022753715515137},{""x"":6.099999904632568,""y"":0.7652576565742493},{""x"":6.599999904632568,""y"":0.6875326037406921},{""x"":7.099999904632568,""y"":0.5828871726989746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nItaly,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO[N+](=O)[O-],1480020,36.33115768432617,99502,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,8,8,1ZP8,8,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.293592105923809, 1.3781586549141835, 5.1025898038676605, 0.03493851245291291],""points"":[{""x"":0.10000000149011612,""y"":2.1287283897399902},{""x"":0.6000000238418579,""y"":2.267972230911255},{""x"":1.100000023841858,""y"":2.398442506790161},{""x"":1.600000023841858,""y"":2.5130622386932373},{""x"":2.0999999046325684,""y"":2.3255116939544678},{""x"":2.5999999046325684,""y"":2.127340793609619},{""x"":3.0999999046325684,""y"":2.47259783744812},{""x"":3.5999999046325684,""y"":2.131181478500366},{""x"":4.099999904632568,""y"":2.090421438217163},{""x"":4.599999904632568,""y"":2.02299165725708},{""x"":5.099999904632568,""y"":1.1105059385299683},{""x"":5.599999904632568,""y"":0.4494485855102539},{""x"":6.099999904632568,""y"":0.1375635862350464},{""x"":6.599999904632568,""y"":0.036351121962070465},{""x"":7.099999904632568,""y"":0.1619771122932434}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.953125499439879, 1.2528620255306528, 5.187637440149802, 0.3110348753260886],""points"":[{""x"":0.10000000149011612,""y"":5.6585283279418945},{""x"":0.6000000238418579,""y"":5.911152362823486},{""x"":1.100000023841858,""y"":5.924920082092285},{""x"":1.600000023841858,""y"":5.8469438552856445},{""x"":2.0999999046325684,""y"":5.929472923278809},{""x"":2.5999999046325684,""y"":6.190037727355957},{""x"":3.0999999046325684,""y"":6.236179828643799},{""x"":3.5999999046325684,""y"":6.141019344329834},{""x"":4.099999904632568,""y"":5.295210838317871},{""x"":4.599999904632568,""y"":5.265801906585693},{""x"":5.099999904632568,""y"":3.3722851276397705},{""x"":5.599999904632568,""y"":1.8299226760864258},{""x"":6.099999904632568,""y"":0.32690900564193726},{""x"":6.599999904632568,""y"":0.6274543404579163},{""x"":7.099999904632568,""y"":0.8441857099533081}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nRwanda,MPNSEPASLLELFNSIATQGELVRSLKAGNASK,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO,1480021,36.33137130737305,995037247,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,9,2BDJ,9,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.8209972202654474, 1.3779216716448506, 5.299882228439686, 0.06040645519069608],""points"":[{""x"":0.10000000149011612,""y"":3.7821109294891357},{""x"":0.6000000238418579,""y"":3.542433023452759},{""x"":1.100000023841858,""y"":3.7008674144744873},{""x"":1.600000023841858,""y"":3.717301607131958},{""x"":2.0999999046325684,""y"":4.024452209472656},{""x"":2.5999999046325684,""y"":4.013899326324463},{""x"":3.0999999046325684,""y"":3.945094347000122},{""x"":3.5999999046325684,""y"":3.866621971130371},{""x"":4.099999904632568,""y"":3.7461626529693604},{""x"":4.599999904632568,""y"":3.3454740047454834},{""x"":5.099999904632568,""y"":2.61944317817688},{""x"":5.599999904632568,""y"":0.999405026435852},{""x"":6.099999904632568,""y"":0.46259793639183044},{""x"":6.599999904632568,""y"":0.054134611040353775},{""x"":7.099999904632568,""y"":0.05711187422275543}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.6318079657726035, 1.8495493770000595, 5.391793312471116, 0.17060707587348442],""points"":[{""x"":0.10000000149011612,""y"":5.458079814910889},{""x"":0.6000000238418579,""y"":5.554427146911621},{""x"":1.100000023841858,""y"":5.799983024597168},{""x"":1.600000023841858,""y"":5.364140033721924},{""x"":2.0999999046325684,""y"":5.864485740661621},{""x"":2.5999999046325684,""y"":5.4509806632995605},{""x"":3.0999999046325684,""y"":5.702574729919434},{""x"":3.5999999046325684,""y"":5.7314534187316895},{""x"":4.099999904632568,""y"":5.5123443603515625},{""x"":4.599999904632568,""y"":5.724395751953125},{""x"":5.099999904632568,""y"":4.354506969451904},{""x"":5.599999904632568,""y"":1.7307666540145874},{""x"":6.099999904632568,""y"":0.6305936574935913},{""x"":6.599999904632568,""y"":0.035183437168598175},{""x"":7.099999904632568,""y"":0.7575169205665588}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nSwitzerland,IRVVGRYLIEVWKAAGMDMDKVLFLWSSDEI,CN1CCC(CC1)Oc2ccc(cc2)C(F)(F)F,1480028,36.33137130737305,99504,92-11 179TH PLACE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,10,1IAN,10,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[1.1190255865097471, 2.3163895161544437, 5.4968866182279195, 0.2035204047289052],""points"":[{""x"":0.10000000149011612,""y"":1.1057683229446411},{""x"":0.6000000238418579,""y"":1.1019697189331055},{""x"":1.100000023841858,""y"":1.0818607807159424},{""x"":1.600000023841858,""y"":1.062997817993164},{""x"":2.0999999046325684,""y"":1.046447515487671},{""x"":2.5999999046325684,""y"":1.1217249631881714},{""x"":3.0999999046325684,""y"":1.2166996002197266},{""x"":3.5999999046325684,""y"":1.215477705001831},{""x"":4.099999904632568,""y"":1.0581893920898438},{""x"":4.599999904632568,""y"":1.1747995615005493},{""x"":5.099999904632568,""y"":1.0181127786636353},{""x"":5.599999904632568,""y"":0.5344523191452026},{""x"":6.099999904632568,""y"":0.2569526433944702},{""x"":6.599999904632568,""y"":0.1912207305431366},{""x"":7.099999904632568,""y"":0.15060538053512573}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.1038581025805785, 2.0032224204185245, 5.087602825989163, 0.13277988512492753],""points"":[{""x"":0.10000000149011612,""y"":3.0498509407043457},{""x"":0.6000000238418579,""y"":2.805217742919922},{""x"":1.100000023841858,""y"":3.3415253162384033},{""x"":1.600000023841858,""y"":3.0549843311309814},{""x"":2.0999999046325684,""y"":3.250074863433838},{""x"":2.5999999046325684,""y"":3.0432586669921875},{""x"":3.0999999046325684,""y"":3.265852451324463},{""x"":3.5999999046325684,""y"":2.9475724697113037},{""x"":4.099999904632568,""y"":3.1929898262023926},{""x"":4.599999904632568,""y"":2.7460060119628906},{""x"":5.099999904632568,""y"":1.6175861358642578},{""x"":5.599999904632568,""y"":0.3006608486175537},{""x"":6.099999904632568,""y"":0.3444803059101105},{""x"":6.599999904632568,""y"":0.015537971630692482},{""x"":7.099999904632568,""y"":0.5527358055114746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\n,,,,,,,,,,,,,,,,,,,,,').columns.add(s.Column.fromList(s.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))));var i,r=function(e,t,n,s){return new(n||(n=Promise))((function(i,r){function o(e){try{l(s.next(e))}catch(e){r(e)}}function a(e){try{l(s.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((s=s.apply(e,t||[])).next())}))};function o(e,t,n,s=0,i="timeout"){return r(this,void 0,void 0,(function*(){return new Promise(((r,o)=>{const a=e.subscribe((e=>{try{t(e),r("OK")}catch(e){o(e)}finally{a.unsubscribe(),clearTimeout(l)}})),l=setTimeout((()=>{a.unsubscribe(),o(i)}),s);n()}))}))}function a(e){return r(this,void 0,void 0,(function*(){yield new Promise((t=>setTimeout(t,e)))}))}console.log.bind(console),console.info.bind(console),console.warn.bind(console),console.error.bind(console),function(e){e.notNull=function(e,t){if(null==e)throw new Error(`${null==t?"Value":t} not defined`)}}(i||(i={})),s.DataFrame.fromColumns([s.Column.fromStrings("col",["val1","val2","val3"])])},3629:(e,t,n)=>{"use strict";function s(e=!1,t="Assertion error."){if(!e)throw new Error(t)}function i(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n]*e[n];return Math.sqrt(t)}function r(e,t){if(e.length!=t.length)throw new Error("The dimensionality of the vectors must match");let n=0;for(let s=0;s<e.length;s++)n+=e[s]*t[s];return n}function o(e,t){let n=0;const s=e.length;if(s!==t.length)throw new Error("The dimensionality of the vectors must match");for(let i=0;i<s;++i)n+=Math.pow(e[i]-t[i],2);return Math.sqrt(n)}function a(e){const t=e.length;let n=0,s=0;for(let i=0;i<t;++i)n+=e[i],s+=Math.pow(e[i],2);const i=n/t,r=1/Math.sqrt(s/t-Math.pow(i,2));for(let n=0;n<t;++n)e[n]=(e[n]-i)*r;return e}n.d(t,{KE:()=>r,S8:()=>a,ou:()=>o,vA:()=>s,wQ:()=>i})},1913:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=n(3282),i=n(9029),r=n(1520),o=n(2586),a=n(8708),l=n(2023),c="errorMessage",u=new s.Name("emUsed"),h={required:"missingProperty",dependencies:"property",dependentRequired:"property"},d=/\$\{[^}]+\}/,m=/\$\{([^}]+)\}/g,p=/^""\s*\+\s*|\s*\+\s*""$/g;const f=(e,t={})=>{if(!e.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(e.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return e.addKeyword(function(e){return{keyword:c,schemaType:["string","object"],post:!0,code(t){const{gen:n,data:f,schema:g,schemaValue:y,it:b}=t;if(!1===b.createErrors)return;const v=g,w=i.strConcat(l.default.instancePath,b.errorPath);function C(e,t){return i.and(s._`${e}.keyword !== ${c}`,s._`!${e}.${u}`,s._`${e}.instancePath === ${w}`,s._`${e}.keyword in ${t}`,s._`${e}.schemaPath.indexOf(${b.errSchemaPath}) === 0`,s._`/^\\/[^\\/]*$/.test(${e}.schemaPath.slice(${b.errSchemaPath.length}))`)}function A(e,t){const s=[];for(const n in e){const e=t[n];d.test(e)&&s.push([n,x(e)])}return n.object(...s)}function S(e){return d.test(e)?new r._Code(r.safeStringify(e).replace(m,((e,t)=>`" + JSON.stringify(${o.getData(t,b)}) + "`)).replace(p,"")):s.stringify(e)}function x(e){return s._`function(){return ${S(e)}}`}n.if(s._`${l.default.errors} > 0`,(()=>{if("object"==typeof v){const[r,o]=function(e){let t,n;for(const s in e){if("properties"===s||"items"===s)continue;const i=e[s];if("object"==typeof i){t||(t={});const e=t[s]={};for(const t in i)e[t]=[]}else n||(n={}),n[s]=[]}return[t,n]}(v);o&&function(i){const r=n.const("emErrors",s.stringify(i)),o=n.const("templates",A(i,g));n.forOf("err",l.default.vErrors,(e=>n.if(C(e,r),(()=>n.code(s._`${r}[${e}.keyword].push(${e})`).assign(s._`${e}.${u}`,!0)))));const{singleError:c}=e;if(c){const e=n.let("message",s._`""`),i=n.let("paramsErrors",s._`[]`);h((t=>{n.if(e,(()=>n.code(s._`${e} += ${"string"==typeof c?c:";"}`))),n.code(s._`${e} += ${d(t)}`),n.assign(i,s._`${i}.concat(${r}[${t}])`)})),a.reportError(t,{message:e,params:s._`{errors: ${i}}`})}else h((e=>a.reportError(t,{message:d(e),params:s._`{errors: ${r}[${e}]}`})));function h(e){n.forIn("key",r,(t=>n.if(s._`${r}[${t}].length`,(()=>e(t)))))}function d(e){return s._`${e} in ${o} ? ${o}[${e}]() : ${y}[${e}]`}}(o),r&&function(e){const i=n.const("emErrors",s.stringify(e)),r=[];for(const t in e)r.push([t,A(e[t],g[t])]);const o=n.const("templates",n.object(...r)),c=n.scopeValue("obj",{ref:h,code:s.stringify(h)}),d=n.let("emPropParams"),m=n.let("emParamsErrors");n.forOf("err",l.default.vErrors,(e=>n.if(C(e,i),(()=>{n.assign(d,s._`${c}[${e}.keyword]`),n.assign(m,s._`${i}[${e}.keyword][${e}.params[${d}]]`),n.if(m,(()=>n.code(s._`${m}.push(${e})`).assign(s._`${e}.${u}`,!0)))})))),n.forIn("key",i,(e=>n.forIn("keyProp",s._`${i}[${e}]`,(r=>{n.assign(m,s._`${i}[${e}][${r}]`),n.if(s._`${m}.length`,(()=>{const i=n.const("tmpl",s._`${o}[${e}] && ${o}[${e}][${r}]`);a.reportError(t,{message:s._`${i} ? ${i}() : ${y}[${e}][${r}]`,params:s._`{errors: ${m}}`})}))}))))}(r),function(e){const{props:r,items:o}=e;if(!r&&!o)return;const h=s._`typeof ${f} == "object"`,d=s._`Array.isArray(${f})`,m=n.let("emErrors");let p,b;const v=n.let("templates");function C(e,t){n.assign(m,s.stringify(e)),n.assign(v,A(e,t))}r&&o?(p=n.let("emChildKwd"),n.if(h),n.if(d,(()=>{C(o,g.items),n.assign(p,s.str`items`)}),(()=>{C(r,g.properties),n.assign(p,s.str`properties`)})),b=s._`[${p}]`):o?(n.if(d),C(o,g.items),b=s._`.items`):r&&(n.if(i.and(h,i.not(d))),C(r,g.properties),b=s._`.properties`),n.forOf("err",l.default.vErrors,(e=>function(e,t,r){n.if(i.and(s._`${e}.keyword !== ${c}`,s._`!${e}.${u}`,s._`${e}.instancePath.indexOf(${w}) === 0`),(()=>{const i=n.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:s._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),o=n.const("emMatches",s._`${i}.exec(${e}.instancePath.slice(${w}.length))`),a=n.const("emChild",s._`${o} && ${o}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);n.if(s._`${a} !== undefined && ${a} in ${t}`,(()=>r(a)))}))}(e,m,(t=>n.code(s._`${m}[${t}].push(${e})`).assign(s._`${e}.${u}`,!0))))),n.forIn("key",m,(e=>n.if(s._`${m}[${e}].length`,(()=>{a.reportError(t,{message:s._`${e} in ${v} ? ${v}[${e}]() : ${y}${b}[${e}]`,params:s._`{errors: ${m}[${e}]}`}),n.assign(s._`${l.default.vErrors}[${l.default.errors}-1].instancePath`,s._`${w} + "/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`)})))),n.endIf()}(function({properties:e,items:t}){const n={};if(e){n.props={};for(const t in e)n.props[t]=[]}if(t){n.items={};for(let e=0;e<t.length;e++)n.items[e]=[]}return n}(v))}const r="string"==typeof v?v:v._;r&&function(e){const r=n.const("emErrs",s._`[]`);n.forOf("err",l.default.vErrors,(e=>n.if(function(e){return i.and(s._`${e}.keyword !== ${c}`,s._`!${e}.${u}`,i.or(s._`${e}.instancePath === ${w}`,i.and(s._`${e}.instancePath.indexOf(${w}) === 0`,s._`${e}.instancePath[${w}.length] === "/"`)),s._`${e}.schemaPath.indexOf(${b.errSchemaPath}) === 0`,s._`${e}.schemaPath[${b.errSchemaPath}.length] === "/"`)}(e),(()=>n.code(s._`${r}.push(${e})`).assign(s._`${e}.${u}`,!0))))),n.if(s._`${r}.length`,(()=>a.reportError(t,{message:S(e),params:s._`{errors: ${r}}`})))}(r),e.keepErrors||function(){const e=n.const("emErrs",s._`[]`);n.forOf("err",l.default.vErrors,(t=>n.if(s._`!${t}.${u}`,(()=>n.code(s._`${e}.push(${t})`))))),n.assign(l.default.vErrors,e).assign(l.default.errors,s._`${e}.length`)}()}))},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}(t))};t.default=f,e.exports=f,e.exports.default=f},7433:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const s=n(4042),i=n(6105),r=n(6653),o=n(9572),a="https://json-schema.org/draft/2020-12/schema";class l extends s.default{constructor(e={}){super({...e,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:e,meta:t}=this.opts;t&&(o.default.call(this,e),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv2020=l,e.exports=t=l,e.exports.Ajv2020=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var c=n(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=n(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var h=n(3558);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return h.default}});var d=n(4551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})},3282:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const s=n(4042),i=n(6144),r=n(6653),o=n(2079),a=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends s.default{_addVocabularies(){super._addVocabularies(),i.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(e,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=n(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var h=n(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return h._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return h.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return h.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return h.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return h.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return h.CodeGen}});var d=n(3558);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var m=n(4551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})},1520:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class n{}t._CodeOrName=n,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class s extends n{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=s;class i extends n{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof s&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function r(e,...t){const n=[e[0]];let s=0;for(;s<t.length;)l(n,t[s]),n.push(e[++s]);return new i(n)}t._Code=i,t.nil=new i(""),t._=r;const o=new i("+");function a(e,...t){const n=[u(e[0])];let s=0;for(;s<t.length;)n.push(o),l(n,t[s]),n.push(o,u(e[++s]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===o){const n=c(e[t-1],e[t+1]);if(void 0!==n){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}(n),new i(n)}function l(e,t){var n;t instanceof i?e.push(...t._items):t instanceof s?e.push(t):e.push("number"==typeof(n=t)||"boolean"==typeof n||null===n?n:u(Array.isArray(n)?n.join(","):n))}function c(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof s||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof s?void 0:`"${e}${t.slice(1)}`}function u(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=a,t.addCodeArg=l,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:a`${e}${t}`},t.stringify=function(e){return new i(u(e))},t.safeStringify=u,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new i(`.${e}`):r`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new i(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new i(e.toString())}},9029:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const s=n(1520),i=n(7845);var r=n(1520);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}});var o=n(7845);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),t.operators={GT:new s._Code(">"),GTE:new s._Code(">="),LT:new s._Code("<"),LTE:new s._Code("<="),EQ:new s._Code("==="),NEQ:new s._Code("!=="),NOT:new s._Code("!"),OR:new s._Code("||"),AND:new s._Code("&&"),ADD:new s._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class l extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){const n=e?i.varKinds.var:this.varKind,s=void 0===this.rhs?"":` = ${this.rhs}`;return`${n} ${this.name}${s};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=L(this.rhs,e,t)),this}get names(){return this.rhs instanceof s._CodeOrName?this.rhs.names:{}}}class c extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof s.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=L(this.rhs,e,t),this}get names(){return $(this.lhs instanceof s.Name?{}:{...this.lhs.names},this.rhs)}}class u extends c{constructor(e,t,n,s){super(e,n,s),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class h extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class d extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class m extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class p extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=L(this.code,e,t),this}get names(){return this.code instanceof s._CodeOrName?this.code.names:{}}}class f extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,n)=>t+n.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:n}=this;let s=n.length;for(;s--;){const i=n[s];i.optimizeNames(e,t)||(N(e,i.names),n.splice(s,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>M(e,t.names)),{})}}class g extends f{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class y extends f{}class b extends g{}b.kind="else";class v extends g{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new b(e):e}return t?!1===e?t instanceof v?t:t.nodes:this.nodes.length?this:new v(P(e),t instanceof v?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var n;if(this.else=null===(n=this.else)||void 0===n?void 0:n.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=L(this.condition,e,t),this}get names(){const e=super.names;return $(e,this.condition),this.else&&M(e,this.else.names),e}}v.kind="if";class w extends g{}w.kind="for";class C extends w{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=L(this.iteration,e,t),this}get names(){return M(super.names,this.iteration.names)}}class A extends w{constructor(e,t,n,s){super(),this.varKind=e,this.name=t,this.from=n,this.to=s}render(e){const t=e.es5?i.varKinds.var:this.varKind,{name:n,from:s,to:r}=this;return`for(${t} ${n}=${s}; ${n}<${r}; ${n}++)`+super.render(e)}get names(){const e=$(super.names,this.from);return $(e,this.to)}}class S extends w{constructor(e,t,n,s){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=s}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=L(this.iterable,e,t),this}get names(){return M(super.names,this.iterable.names)}}class x extends g{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}x.kind="func";class E extends f{render(e){return"return "+super.render(e)}}E.kind="return";class _ extends g{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var n,s;return super.optimizeNames(e,t),null===(n=this.catch)||void 0===n||n.optimizeNames(e,t),null===(s=this.finally)||void 0===s||s.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&M(e,this.catch.names),this.finally&&M(e,this.finally.names),e}}class I extends g{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}I.kind="catch";class T extends g{render(e){return"finally"+super.render(e)}}function M(e,t){for(const n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function $(e,t){return t instanceof s._CodeOrName?M(e,t.names):e}function L(e,t,n){return e instanceof s.Name?r(e):(i=e)instanceof s._Code&&i._items.some((e=>e instanceof s.Name&&1===t[e.str]&&void 0!==n[e.str]))?new s._Code(e._items.reduce(((e,t)=>(t instanceof s.Name&&(t=r(t)),t instanceof s._Code?e.push(...t._items):e.push(t),e)),[])):e;var i;function r(e){const s=n[e.str];return void 0===s||1!==t[e.str]?e:(delete t[e.str],s)}}function N(e,t){for(const n in t)e[n]=(e[n]||0)-(t[n]||0)}function P(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:s._`!${F(e)}`}T.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new i.Scope({parent:e}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,s){const i=this._scope.toName(t);return void 0!==n&&s&&(this._constants[i.str]=n),this._leafNode(new l(e,i,n)),i}const(e,t,n){return this._def(i.varKinds.const,e,t,n)}let(e,t,n){return this._def(i.varKinds.let,e,t,n)}var(e,t,n){return this._def(i.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new c(e,t,n))}add(e,n){return this._leafNode(new u(e,t.operators.ADD,n))}code(e){return"function"==typeof e?e():e!==s.nil&&this._leafNode(new p(e)),this}object(...e){const t=["{"];for(const[n,i]of e)t.length>1&&t.push(","),t.push(n),(n!==i||this.opts.es5)&&(t.push(":"),(0,s.addCodeArg)(t,i));return t.push("}"),new s._Code(t)}if(e,t,n){if(this._blockNode(new v(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new v(e))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(v,b)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new C(e),t)}forRange(e,t,n,s,r=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const o=this._scope.toName(e);return this._for(new A(r,o,t,n),(()=>s(o)))}forOf(e,t,n,r=i.varKinds.const){const o=this._scope.toName(e);if(this.opts.es5){const e=t instanceof s.Name?t:this.var("_arr",t);return this.forRange("_i",0,s._`${e}.length`,(t=>{this.var(o,s._`${e}[${t}]`),n(o)}))}return this._for(new S("of",r,o,t),(()=>n(o)))}forIn(e,t,n,r=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,s._`Object.keys(${t})`,n);const o=this._scope.toName(e);return this._for(new S("in",r,o,t),(()=>n(o)))}endFor(){return this._endBlockNode(w)}label(e){return this._leafNode(new h(e))}break(e){return this._leafNode(new d(e))}return(e){const t=new E;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');const s=new _;if(this._blockNode(s),this.code(e),t){const e=this.name("e");this._currNode=s.catch=new I(e),t(e)}return n&&(this._currNode=s.finally=new T,this.code(n)),this._endBlockNode(I,T)}throw(e){return this._leafNode(new m(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const n=this._nodes.length-t;if(n<0||void 0!==e&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=s.nil,n,i){return this._blockNode(new x(e,t,n)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(x)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=P;const R=k(t.operators.AND);t.and=function(...e){return e.reduce(R)};const O=k(t.operators.OR);function k(e){return(t,n)=>t===s.nil?n:n===s.nil?t:s._`${F(t)} ${e} ${F(n)}`}function F(e){return e instanceof s.Name?e:s._`(${e})`}t.or=function(...e){return e.reduce(O)}},7845:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const s=n(1520);class i extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var r;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(r||(t.UsedValueState=r={})),t.varKinds={const:new s.Name("const"),let:new s.Name("let"),var:new s.Name("var")};class o{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof s.Name?e:this.name(e)}name(e){return new s.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,n;if((null===(n=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===n?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=o;class a extends s.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=s._`.${new s.Name(t)}[${n}]`}}t.ValueScopeName=a;const l=s._`\n`;t.ValueScope=class extends o{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?l:s.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var n;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const s=this.toName(e),{prefix:i}=s,r=null!==(n=t.key)&&void 0!==n?n:t.ref;let o=this._values[i];if(o){const e=o.get(r);if(e)return e}else o=this._values[i]=new Map;o.set(r,s);const a=this._scope[i]||(this._scope[i]=[]),l=a.length;return a[l]=t.ref,s.setValue(t,{property:i,itemIndex:l}),s}getValue(e,t){const n=this._values[e];if(n)return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return s._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,n){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,n)}_reduceValues(e,n,o={},a){let l=s.nil;for(const c in e){const u=e[c];if(!u)continue;const h=o[c]=o[c]||new Map;u.forEach((e=>{if(h.has(e))return;h.set(e,r.Started);let o=n(e);if(o){const n=this.opts.es5?t.varKinds.var:t.varKinds.const;l=s._`${l}${n} ${e} = ${o};${this.opts._n}`}else{if(!(o=null==a?void 0:a(e)))throw new i(e);l=s._`${l}${o}${this.opts._n}`}h.set(e,r.Completed)}))}return l}}},8708:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const s=n(9029),i=n(4227),r=n(2023);function o(e,t){const n=e.const("err",t);e.if(s._`${r.default.vErrors} === null`,(()=>e.assign(r.default.vErrors,s._`[${n}]`)),s._`${r.default.vErrors}.push(${n})`),e.code(s._`${r.default.errors}++`)}function a(e,t){const{gen:n,validateName:i,schemaEnv:r}=e;r.$async?n.throw(s._`new ${e.ValidationError}(${t})`):(n.assign(s._`${i}.errors`,t),n.return(!1))}t.keywordError={message:({keyword:e})=>s.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?s.str`"${e}" keyword must be ${t} ($data)`:s.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,n=t.keywordError,i,r){const{it:l}=e,{gen:u,compositeRule:h,allErrors:d}=l,m=c(e,n,i);(null!=r?r:h||d)?o(u,m):a(l,s._`[${m}]`)},t.reportExtraError=function(e,n=t.keywordError,s){const{it:i}=e,{gen:l,compositeRule:u,allErrors:h}=i;o(l,c(e,n,s)),u||h||a(i,r.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(r.default.errors,t),e.if(s._`${r.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(s._`${r.default.vErrors}.length`,t)),(()=>e.assign(r.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:n,data:i,errsCount:o,it:a}){if(void 0===o)throw new Error("ajv implementation error");const l=e.name("err");e.forRange("i",o,r.default.errors,(o=>{e.const(l,s._`${r.default.vErrors}[${o}]`),e.if(s._`${l}.instancePath === undefined`,(()=>e.assign(s._`${l}.instancePath`,(0,s.strConcat)(r.default.instancePath,a.errorPath)))),e.assign(s._`${l}.schemaPath`,s.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(s._`${l}.schema`,n),e.assign(s._`${l}.data`,i))}))};const l={keyword:new s.Name("keyword"),schemaPath:new s.Name("schemaPath"),params:new s.Name("params"),propertyName:new s.Name("propertyName"),message:new s.Name("message"),schema:new s.Name("schema"),parentSchema:new s.Name("parentSchema")};function c(e,t,n){const{createErrors:i}=e.it;return!1===i?s._`{}`:function(e,t,n={}){const{gen:i,it:o}=e,a=[u(o,n),h(e,n)];return function(e,{params:t,message:n},i){const{keyword:o,data:a,schemaValue:c,it:u}=e,{opts:h,propertyName:d,topSchemaRef:m,schemaPath:p}=u;i.push([l.keyword,o],[l.params,"function"==typeof t?t(e):t||s._`{}`]),h.messages&&i.push([l.message,"function"==typeof n?n(e):n]),h.verbose&&i.push([l.schema,c],[l.parentSchema,s._`${m}${p}`],[r.default.data,a]),d&&i.push([l.propertyName,d])}(e,t,a),i.object(...a)}(e,t,n)}function u({errorPath:e},{instancePath:t}){const n=t?s.str`${e}${(0,i.getErrorPath)(t,i.Type.Str)}`:e;return[r.default.instancePath,(0,s.strConcat)(r.default.instancePath,n)]}function h({keyword:e,it:{errSchemaPath:t}},{schemaPath:n,parentSchema:r}){let o=r?t:s.str`${t}/${e}`;return n&&(o=s.str`${o}${(0,i.getErrorPath)(n,i.Type.Str)}`),[l.schemaPath,o]}},3835:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const s=n(9029),i=n(3558),r=n(2023),o=n(6939),a=n(4227),l=n(2586);class c{constructor(e){var t;let n;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,o.normalizeId)(null==n?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==n?void 0:n.$async,this.refs={}}}function u(e){const t=d.call(this,e);if(t)return t;const n=(0,o.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:c}=this.opts.code,{ownProperties:u}=this.opts,h=new s.CodeGen(this.scope,{es5:a,lines:c,ownProperties:u});let m;e.$async&&(m=h.scopeValue("Error",{ref:i.default,code:s._`require("ajv/dist/runtime/validation_error").default`}));const p=h.scopeName("validate");e.validateName=p;const f={gen:h,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[s.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:h.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,s.stringify)(e.schema)}:{ref:e.schema}),validateName:p,ValidationError:m,schema:e.schema,schemaEnv:e,rootId:n,baseId:e.baseId||n,schemaPath:s.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:s._`""`,opts:this.opts,self:this};let g;try{this._compilations.add(e),(0,l.validateFunctionCode)(f),h.optimize(this.opts.code.optimize);const t=h.toString();g=`${h.scopeRefs(r.default.scope)}return ${t}`,this.opts.code.process&&(g=this.opts.code.process(g,e));const n=new Function(`${r.default.self}`,`${r.default.scope}`,g)(this,this.scope.get());if(this.scope.value(p,{ref:n}),n.errors=null,n.schema=e.schema,n.schemaEnv=e,e.$async&&(n.$async=!0),!0===this.opts.code.source&&(n.source={validateName:p,validateCode:t,scopeValues:h._values}),this.opts.unevaluated){const{props:e,items:t}=f;n.evaluated={props:e instanceof s.Name?void 0:e,items:t instanceof s.Name?void 0:t,dynamicProps:e instanceof s.Name,dynamicItems:t instanceof s.Name},n.source&&(n.source.evaluated=(0,s.stringify)(n.evaluated))}return e.validate=n,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error("Error compiling schema, function code:",g),t}finally{this._compilations.delete(e)}}function h(e){return(0,o.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u.call(this,e)}function d(e){for(const s of this._compilations)if(n=e,(t=s).schema===n.schema&&t.root===n.root&&t.baseId===n.baseId)return s;var t,n}function m(e,t){let n;for(;"string"==typeof(n=this.refs[t]);)t=n;return n||this.schemas[t]||p.call(this,e,t)}function p(e,t){const n=this.opts.uriResolver.parse(t),s=(0,o._getFullPath)(this.opts.uriResolver,n);let i=(0,o.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&s===i)return g.call(this,n,e);const r=(0,o.normalizeId)(s),a=this.refs[r]||this.schemas[r];if("string"==typeof a){const t=p.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return g.call(this,n,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||u.call(this,a),r===(0,o.normalizeId)(t)){const{schema:t}=a,{schemaId:n}=this.opts,s=t[n];return s&&(i=(0,o.resolveUrl)(this.opts.uriResolver,i,s)),new c({schema:t,schemaId:n,root:e,baseId:i})}return g.call(this,n,a)}}t.SchemaEnv=c,t.compileSchema=u,t.resolveRef=function(e,t,n){var s;n=(0,o.resolveUrl)(this.opts.uriResolver,t,n);const i=e.refs[n];if(i)return i;let r=m.call(this,e,n);if(void 0===r){const i=null===(s=e.localRefs)||void 0===s?void 0:s[n],{schemaId:o}=this.opts;i&&(r=new c({schema:i,schemaId:o,root:e,baseId:t}))}return void 0!==r?e.refs[n]=h.call(this,r):void 0},t.getCompilingSchema=d,t.resolveSchema=p;const f=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(e,{baseId:t,schema:n,root:s}){var i;if("/"!==(null===(i=e.fragment)||void 0===i?void 0:i[0]))return;for(const s of e.fragment.slice(1).split("/")){if("boolean"==typeof n)return;const e=n[(0,a.unescapeFragment)(s)];if(void 0===e)return;const i="object"==typeof(n=e)&&n[this.opts.schemaId];!f.has(s)&&i&&(t=(0,o.resolveUrl)(this.opts.uriResolver,t,i))}let r;if("boolean"!=typeof n&&n.$ref&&!(0,a.schemaHasRulesButRef)(n,this.RULES)){const e=(0,o.resolveUrl)(this.opts.uriResolver,t,n.$ref);r=p.call(this,s,e)}const{schemaId:l}=this.opts;return r=r||new c({schema:n,schemaId:l,root:s,baseId:t}),r.schema!==r.root.schema?r:void 0}},2023:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=n(9029),i={data:new s.Name("data"),valCxt:new s.Name("valCxt"),instancePath:new s.Name("instancePath"),parentData:new s.Name("parentData"),parentDataProperty:new s.Name("parentDataProperty"),rootData:new s.Name("rootData"),dynamicAnchors:new s.Name("dynamicAnchors"),vErrors:new s.Name("vErrors"),errors:new s.Name("errors"),this:new s.Name("this"),self:new s.Name("self"),scope:new s.Name("scope"),json:new s.Name("json"),jsonPos:new s.Name("jsonPos"),jsonLen:new s.Name("jsonLen"),jsonPart:new s.Name("jsonPart")};t.default=i},4551:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=n(6939);class i extends Error{constructor(e,t,n,i){super(i||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,s.resolveUrl)(e,t,n),this.missingSchema=(0,s.normalizeId)((0,s.getFullPath)(e,this.missingRef))}}t.default=i},6939:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const s=n(4227),i=n(2017),r=n(7106),o=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!l(e):!!t&&c(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(e){for(const t in e){if(a.has(t))return!0;const n=e[t];if(Array.isArray(n)&&n.some(l))return!0;if("object"==typeof n&&l(n))return!0}return!1}function c(e){let t=0;for(const n in e){if("$ref"===n)return 1/0;if(t++,!o.has(n)&&("object"==typeof e[n]&&(0,s.eachItem)(e[n],(e=>t+=c(e))),t===1/0))return 1/0}return t}function u(e,t="",n){!1!==n&&(t=m(t));const s=e.parse(t);return h(e,s)}function h(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=h;const d=/#\/?$/;function m(e){return e?e.replace(d,""):""}t.normalizeId=m,t.resolveUrl=function(e,t,n){return n=m(n),e.resolve(t,n)};const p=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:n,uriResolver:s}=this.opts,o=m(e[n]||t),a={"":o},l=u(s,o,!1),c={},h=new Set;return r(e,{allKeys:!0},((e,t,s,i)=>{if(void 0===i)return;const r=l+t;let o=a[i];function u(t){const n=this.opts.uriResolver.resolve;if(t=m(o?n(o,t):t),h.has(t))throw f(t);h.add(t);let s=this.refs[t];return"string"==typeof s&&(s=this.refs[s]),"object"==typeof s?d(e,s.schema,t):t!==m(r)&&("#"===t[0]?(d(e,c[t],t),c[t]=e):this.refs[t]=r),t}function g(e){if("string"==typeof e){if(!p.test(e))throw new Error(`invalid anchor "${e}"`);u.call(this,`#${e}`)}}"string"==typeof e[n]&&(o=u.call(this,e[n])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),a[t]=o})),c;function d(e,t,n){if(void 0!==t&&!i(e,t))throw f(n)}function f(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},396:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const n=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&n.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},4227:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const s=n(9029),i=n(1520);function r(e,t=e.schema){const{opts:n,self:s}=e;if(!n.strictSchema)return;if("boolean"==typeof t)return;const i=s.RULES.keywords;for(const n in t)i[n]||p(e,`unknown keyword: "${n}"`)}function o(e,t){if("boolean"==typeof e)return!e;for(const n in e)if(t[n])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function l(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:n,resultToName:i}){return(r,o,a,l)=>{const c=void 0===a?o:a instanceof s.Name?(o instanceof s.Name?e(r,o,a):t(r,o,a),a):o instanceof s.Name?(t(r,a,o),o):n(o,a);return l!==s.Name||c instanceof s.Name?c:i(r,c)}}function u(e,t){if(!0===t)return e.var("props",!0);const n=e.var("props",s._`{}`);return void 0!==t&&h(e,n,t),n}function h(e,t,n){Object.keys(n).forEach((n=>e.assign(s._`${t}${(0,s.getProperty)(n)}`,!0)))}t.toHash=function(e){const t={};for(const n of e)t[n]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(r(e,t),!o(t,e.self.RULES.all))},t.checkUnknownRules=r,t.schemaHasRules=o,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const n in e)if("$ref"!==n&&t.all[n])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},n,i,r){if(!r){if("number"==typeof n||"boolean"==typeof n)return n;if("string"==typeof n)return s._`${n}`}return s._`${e}${t}${(0,s.getProperty)(i)}`},t.unescapeFragment=function(e){return l(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=l,t.eachItem=function(e,t){if(Array.isArray(e))for(const n of e)t(n);else t(e)},t.mergeEvaluated={props:c({mergeNames:(e,t,n)=>e.if(s._`${n} !== true && ${t} !== undefined`,(()=>{e.if(s._`${t} === true`,(()=>e.assign(n,!0)),(()=>e.assign(n,s._`${n} || {}`).code(s._`Object.assign(${n}, ${t})`)))})),mergeToName:(e,t,n)=>e.if(s._`${n} !== true`,(()=>{!0===t?e.assign(n,!0):(e.assign(n,s._`${n} || {}`),h(e,n,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:c({mergeNames:(e,t,n)=>e.if(s._`${n} !== true && ${t} !== undefined`,(()=>e.assign(n,s._`${t} === true ? true : ${n} > ${t} ? ${n} : ${t}`))),mergeToName:(e,t,n)=>e.if(s._`${n} !== true`,(()=>e.assign(n,!0===t||s._`${n} > ${t} ? ${n} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=u,t.setEvaluated=h;const d={};var m;function p(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,!0===n)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:d[t.code]||(d[t.code]=new i._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(m||(t.Type=m={})),t.getErrorPath=function(e,t,n){if(e instanceof s.Name){const i=t===m.Num;return n?i?s._`"[" + ${e} + "]"`:s._`"['" + ${e} + "']"`:i?s._`"/" + ${e}`:s._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return n?(0,s.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=p},7887:(e,t)=>{"use strict";function n(e,t){return t.rules.some((t=>s(e,t)))}function s(e,t){var n;return void 0!==e[t.keyword]||(null===(n=t.definition.implements)||void 0===n?void 0:n.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},s){const i=t.RULES.types[s];return i&&!0!==i&&n(e,i)},t.shouldUseGroup=n,t.shouldUseRule=s},8727:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const s=n(8708),i=n(9029),r=n(2023),o={message:"boolean schema is false"};function a(e,t){const{gen:n,data:i}=e,r={gen:n,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,s.reportError)(r,o,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:n,validateName:s}=e;!1===n?a(e,!1):"object"==typeof n&&!0===n.$async?t.return(r.default.data):(t.assign(i._`${s}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:n,schema:s}=e;!1===s?(n.var(t,!1),a(e)):n.var(t,!0)}},208:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const s=n(396),i=n(7887),r=n(8708),o=n(9029),a=n(4227);var l;function c(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(s.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(l||(t.DataType=l={})),t.getSchemaTypes=function(e){const t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=c,t.coerceAndCheckDataType=function(e,t){const{gen:n,data:s,opts:r}=e,a=function(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,r.coerceTypes),c=t.length>0&&!(0===a.length&&1===t.length&&(0,i.schemaHasRulesForType)(e,t[0]));if(c){const i=d(t,s,r.strictNumbers,l.Wrong);n.if(i,(()=>{a.length?function(e,t,n){const{gen:s,data:i,opts:r}=e,a=s.let("dataType",o._`typeof ${i}`),l=s.let("coerced",o._`undefined`);"array"===r.coerceTypes&&s.if(o._`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,(()=>s.assign(i,o._`${i}[0]`).assign(a,o._`typeof ${i}`).if(d(t,i,r.strictNumbers),(()=>s.assign(l,i))))),s.if(o._`${l} !== undefined`);for(const e of n)(u.has(e)||"array"===e&&"array"===r.coerceTypes)&&c(e);function c(e){switch(e){case"string":return void s.elseIf(o._`${a} == "number" || ${a} == "boolean"`).assign(l,o._`"" + ${i}`).elseIf(o._`${i} === null`).assign(l,o._`""`);case"number":return void s.elseIf(o._`${a} == "boolean" || ${i} === null
2
2
  || (${a} == "string" && ${i} && ${i} == +${i})`).assign(l,o._`+${i}`);case"integer":return void s.elseIf(o._`${a} === "boolean" || ${i} === null
3
3
  || (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(l,o._`+${i}`);case"boolean":return void s.elseIf(o._`${i} === "false" || ${i} === 0 || ${i} === null`).assign(l,!1).elseIf(o._`${i} === "true" || ${i} === 1`).assign(l,!0);case"null":return s.elseIf(o._`${i} === "" || ${i} === 0 || ${i} === false`),void s.assign(l,null);case"array":s.elseIf(o._`${a} === "string" || ${a} === "number"
4
4
  || ${a} === "boolean" || ${i} === null`).assign(l,o._`[${i}]`)}}s.else(),p(e),s.endIf(),s.if(o._`${l} !== undefined`,(()=>{s.assign(i,l),function({gen:e,parentData:t,parentDataProperty:n},s){e.if(o._`${t} !== undefined`,(()=>e.assign(o._`${t}[${n}]`,s)))}(e,l)}))}(e,t,a):p(e)}))}return c};const u=new Set(["string","number","integer","boolean","null"]);function h(e,t,n,s=l.Correct){const i=s===l.Correct?o.operators.EQ:o.operators.NEQ;let r;switch(e){case"null":return o._`${t} ${i} null`;case"array":r=o._`Array.isArray(${t})`;break;case"object":r=o._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":r=a(o._`!(${t} % 1) && !isNaN(${t})`);break;case"number":r=a();break;default:return o._`typeof ${t} ${i} ${e}`}return s===l.Correct?r:(0,o.not)(r);function a(e=o.nil){return(0,o.and)(o._`typeof ${t} == "number"`,e,n?o._`isFinite(${t})`:o.nil)}}function d(e,t,n,s){if(1===e.length)return h(e[0],t,n,s);let i;const r=(0,a.toHash)(e);if(r.array&&r.object){const e=o._`typeof ${t} != "object"`;i=r.null?e:o._`!${t} || ${e}`,delete r.null,delete r.array,delete r.object}else i=o.nil;r.number&&delete r.integer;for(const e in r)i=(0,o.and)(i,h(e,t,n,s));return i}t.checkDataType=h,t.checkDataTypes=d;const m={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?o._`{type: ${e}}`:o._`{type: ${t}}`};function p(e){const t=function(e){const{gen:t,data:n,schema:s}=e,i=(0,a.schemaRefOrVal)(e,s,"type");return{gen:t,keyword:"type",data:n,schema:s.type,schemaCode:i,schemaValue:i,parentSchema:s,params:{},it:e}}(e);(0,r.reportError)(t,m)}t.reportTypeError=p},7870:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const s=n(9029),i=n(4227);function r(e,t,n){const{gen:r,compositeRule:o,data:a,opts:l}=e;if(void 0===n)return;const c=s._`${a}${(0,s.getProperty)(t)}`;if(o)return void(0,i.checkStrictMode)(e,`default is ignored for: ${c}`);let u=s._`${c} === undefined`;"empty"===l.useDefaults&&(u=s._`${u} || ${c} === null || ${c} === ""`),r.if(u,s._`${c} = ${(0,s.stringify)(n)}`)}t.assignDefaults=function(e,t){const{properties:n,items:s}=e.schema;if("object"===t&&n)for(const t in n)r(e,t,n[t].default);else"array"===t&&Array.isArray(s)&&s.forEach(((t,n)=>r(e,n,t.default)))}},2586:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const s=n(8727),i=n(208),r=n(7887),o=n(208),a=n(7870),l=n(3673),c=n(4495),u=n(9029),h=n(2023),d=n(6939),m=n(4227),p=n(8708);function f({gen:e,validateName:t,schema:n,schemaEnv:s,opts:i},r){i.code.es5?e.func(t,u._`${h.default.data}, ${h.default.valCxt}`,s.$async,(()=>{e.code(u._`"use strict"; ${g(n,i)}`),function(e,t){e.if(h.default.valCxt,(()=>{e.var(h.default.instancePath,u._`${h.default.valCxt}.${h.default.instancePath}`),e.var(h.default.parentData,u._`${h.default.valCxt}.${h.default.parentData}`),e.var(h.default.parentDataProperty,u._`${h.default.valCxt}.${h.default.parentDataProperty}`),e.var(h.default.rootData,u._`${h.default.valCxt}.${h.default.rootData}`),t.dynamicRef&&e.var(h.default.dynamicAnchors,u._`${h.default.valCxt}.${h.default.dynamicAnchors}`)}),(()=>{e.var(h.default.instancePath,u._`""`),e.var(h.default.parentData,u._`undefined`),e.var(h.default.parentDataProperty,u._`undefined`),e.var(h.default.rootData,h.default.data),t.dynamicRef&&e.var(h.default.dynamicAnchors,u._`{}`)}))}(e,i),e.code(r)})):e.func(t,u._`${h.default.data}, ${function(e){return u._`{${h.default.instancePath}="", ${h.default.parentData}, ${h.default.parentDataProperty}, ${h.default.rootData}=${h.default.data}${e.dynamicRef?u._`, ${h.default.dynamicAnchors}={}`:u.nil}}={}`}(i)}`,s.$async,(()=>e.code(g(n,i)).code(r)))}function g(e,t){const n="object"==typeof e&&e[t.schemaId];return n&&(t.code.source||t.code.process)?u._`/*# sourceURL=${n} */`:u.nil}function y({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const n in e)if(t.RULES.all[n])return!0;return!1}function b(e){return"boolean"!=typeof e.schema}function v(e){(0,m.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:n,opts:s,self:i}=e;t.$ref&&s.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${n}"`)}(e)}function w(e,t){if(e.opts.jtd)return A(e,[],!1,t);const n=(0,i.getSchemaTypes)(e.schema);A(e,n,!(0,i.coerceAndCheckDataType)(e,n),t)}function C({gen:e,schemaEnv:t,schema:n,errSchemaPath:s,opts:i}){const r=n.$comment;if(!0===i.$comment)e.code(u._`${h.default.self}.logger.log(${r})`);else if("function"==typeof i.$comment){const n=u.str`${s}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code(u._`${h.default.self}.opts.$comment(${r}, ${n}, ${i}.schema)`)}}function A(e,t,n,s){const{gen:i,schema:a,data:l,allErrors:c,opts:d,self:p}=e,{RULES:f}=p;function g(m){(0,r.shouldUseGroup)(a,m)&&(m.type?(i.if((0,o.checkDataType)(m.type,l,d.strictNumbers)),S(e,m),1===t.length&&t[0]===m.type&&n&&(i.else(),(0,o.reportTypeError)(e)),i.endIf()):S(e,m),c||i.if(u._`${h.default.errors} === ${s||0}`))}!a.$ref||!d.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(a,f)?(d.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{x(e.dataTypes,t)||E(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const n=[];for(const s of e.dataTypes)x(t,s)?n.push(s):t.includes("integer")&&"number"===s&&n.push("integer");e.dataTypes=n}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&E(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const n=e.self.RULES.all;for(const s in n){const i=n[s];if("object"==typeof i&&(0,r.shouldUseRule)(e.schema,i)){const{type:n}=i.definition;n.length&&!n.some((e=>{return s=e,(n=t).includes(s)||"number"===s&&n.includes("integer");var n,s}))&&E(e,`missing type "${n.join(",")}" for keyword "${s}"`)}}}(e,e.dataTypes))}(e,t),i.block((()=>{for(const e of f.rules)g(e);g(f.post)}))):i.block((()=>I(e,"$ref",f.all.$ref.definition)))}function S(e,t){const{gen:n,schema:s,opts:{useDefaults:i}}=e;i&&(0,a.assignDefaults)(e,t.type),n.block((()=>{for(const n of t.rules)(0,r.shouldUseRule)(s,n)&&I(e,n.keyword,n.definition,t.type)}))}function x(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function E(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,m.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){b(e)&&(v(e),y(e))?function(e){const{schema:t,opts:n,gen:s}=e;f(e,(()=>{n.$comment&&t.$comment&&C(e),function(e){const{schema:t,opts:n}=e;void 0!==t.default&&n.useDefaults&&n.strictSchema&&(0,m.checkStrictMode)(e,"default is ignored in the schema root")}(e),s.let(h.default.vErrors,null),s.let(h.default.errors,0),n.unevaluated&&function(e){const{gen:t,validateName:n}=e;e.evaluated=t.const("evaluated",u._`${n}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,(()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`))),t.if(u._`${e.evaluated}.dynamicItems`,(()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`)))}(e),w(e),function(e){const{gen:t,schemaEnv:n,validateName:s,ValidationError:i,opts:r}=e;n.$async?t.if(u._`${h.default.errors} === 0`,(()=>t.return(h.default.data)),(()=>t.throw(u._`new ${i}(${h.default.vErrors})`))):(t.assign(u._`${s}.errors`,h.default.vErrors),r.unevaluated&&function({gen:e,evaluated:t,props:n,items:s}){n instanceof u.Name&&e.assign(u._`${t}.props`,n),s instanceof u.Name&&e.assign(u._`${t}.items`,s)}(e),t.return(u._`${h.default.errors} === 0`))}(e)}))}(e):f(e,(()=>(0,s.topBoolOrEmptySchema)(e)))};class _{constructor(e,t,n){if((0,l.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,m.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",$(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,l.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",h.default.errors))}result(e,t,n){this.failResult((0,u.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,u.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(u._`${t} !== undefined && (${(0,u.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t)return this.setParams(t),this._error(e,n),void this.setParams({});this._error(e,n)}_error(e,t){(e?p.reportExtraError:p.reportError)(this,this.def.error,t)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=u.nil){this.gen.block((()=>{this.check$data(e,n),t()}))}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:n,schemaCode:s,schemaType:i,def:r}=this;n.if((0,u.or)(u._`${s} === undefined`,t)),e!==u.nil&&n.assign(e,!0),(i.length||r.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&n.assign(e,!1)),n.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:n,def:s,it:i}=this;return(0,u.or)(function(){if(n.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(n)?n:[n];return u._`${(0,o.checkDataTypes)(e,t,i.opts.strictNumbers,o.DataType.Wrong)}`}return u.nil}(),function(){if(s.validateSchema){const n=e.scopeValue("validate$data",{ref:s.validateSchema});return u._`!${n}(${t})`}return u.nil}())}subschema(e,t){const n=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(n,this.it,e),(0,c.extendSubschemaMode)(n,e);const i={...this.it,...n,items:void 0,props:void 0};return function(e,t){b(e)&&(v(e),y(e))?function(e,t){const{schema:n,gen:s,opts:i}=e;i.$comment&&n.$comment&&C(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,d.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const r=s.const("_errs",h.default.errors);w(e,r),s.var(t,u._`${r} === ${h.default.errors}`)}(e,t):(0,s.boolOrEmptySchema)(e,t)}(i,t),i}mergeEvaluated(e,t){const{it:n,gen:s}=this;n.opts.unevaluated&&(!0!==n.props&&void 0!==e.props&&(n.props=m.mergeEvaluated.props(s,e.props,n.props,t)),!0!==n.items&&void 0!==e.items&&(n.items=m.mergeEvaluated.items(s,e.items,n.items,t)))}mergeValidEvaluated(e,t){const{it:n,gen:s}=this;if(n.opts.unevaluated&&(!0!==n.props||!0!==n.items))return s.if(t,(()=>this.mergeEvaluated(e,u.Name))),!0}}function I(e,t,n,s){const i=new _(e,n,t);"code"in n?n.code(i,s):i.$data&&n.validate?(0,l.funcKeywordCode)(i,n):"macro"in n?(0,l.macroKeywordCode)(i,n):(n.compile||n.validate)&&(0,l.funcKeywordCode)(i,n)}t.KeywordCxt=_;const T=/^\/(?:[^~]|~0|~1)*$/,M=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function $(e,{dataLevel:t,dataNames:n,dataPathArr:s}){let i,r;if(""===e)return h.default.rootData;if("/"===e[0]){if(!T.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,r=h.default.rootData}else{const o=M.exec(e);if(!o)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+o[1];if(i=o[2],"#"===i){if(a>=t)throw new Error(l("property/index",a));return s[t-a]}if(a>t)throw new Error(l("data",a));if(r=n[t-a],!i)return r}let o=r;const a=i.split("/");for(const e of a)e&&(r=u._`${r}${(0,u.getProperty)((0,m.unescapeJsonPointer)(e))}`,o=u._`${o} && ${r}`);return o;function l(e,n){return`Cannot access ${e} ${n} levels up, current level is ${t}`}}t.getData=$},3673:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const s=n(9029),i=n(2023),r=n(5765),o=n(8708);function a(e){const{gen:t,data:n,it:i}=e;t.if(i.parentData,(()=>t.assign(n,s._`${i.parentData}[${i.parentDataProperty}]`)))}function l(e,t,n){if(void 0===n)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:(0,s.stringify)(n)})}t.macroKeywordCode=function(e,t){const{gen:n,keyword:i,schema:r,parentSchema:o,it:a}=e,c=t.macro.call(a.self,r,o,a),u=l(n,i,c);!1!==a.opts.validateSchema&&a.self.validateSchema(c,!0);const h=n.name("valid");e.subschema({schema:c,schemaPath:s.nil,errSchemaPath:`${a.errSchemaPath}/${i}`,topSchemaRef:u,compositeRule:!0},h),e.pass(h,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var n;const{gen:c,keyword:u,schema:h,parentSchema:d,$data:m,it:p}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(p,t);const f=!m&&t.compile?t.compile.call(p.self,h,d,p):t.validate,g=l(c,u,f),y=c.let("valid");function b(n=(t.async?s._`await `:s.nil)){const o=p.opts.passContext?i.default.this:i.default.self,a=!("compile"in t&&!m||!1===t.schema);c.assign(y,s._`${n}${(0,r.callValidateCode)(e,g,o,a)}`,t.modifying)}function v(e){var n;c.if((0,s.not)(null!==(n=t.valid)&&void 0!==n?n:y),e)}e.block$data(y,(function(){if(!1===t.errors)b(),t.modifying&&a(e),v((()=>e.error()));else{const n=t.async?function(){const e=c.let("ruleErrs",null);return c.try((()=>b(s._`await `)),(t=>c.assign(y,!1).if(s._`${t} instanceof ${p.ValidationError}`,(()=>c.assign(e,s._`${t}.errors`)),(()=>c.throw(t))))),e}():function(){const e=s._`${g}.errors`;return c.assign(e,null),b(s.nil),e}();t.modifying&&a(e),v((()=>function(e,t){const{gen:n}=e;n.if(s._`Array.isArray(${t})`,(()=>{n.assign(i.default.vErrors,s._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,s._`${i.default.vErrors}.length`),(0,o.extendErrors)(e)}),(()=>e.error()))}(e,n)))}})),e.ok(null!==(n=t.valid)&&void 0!==n?n:y)},t.validSchemaType=function(e,t,n=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||n&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:n,errSchemaPath:s},i,r){if(Array.isArray(i.keyword)?!i.keyword.includes(r):i.keyword!==r)throw new Error("ajv implementation error");const o=i.dependencies;if(null==o?void 0:o.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${r}: ${o.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[r])){const e=`keyword "${r}" value is invalid at path "${s}": `+n.errorsText(i.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);n.logger.error(e)}}},4495:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const s=n(9029),i=n(4227);t.getSubschema=function(e,{keyword:t,schemaProp:n,schema:r,schemaPath:o,errSchemaPath:a,topSchemaRef:l}){if(void 0!==t&&void 0!==r)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const r=e.schema[t];return void 0===n?{schema:r,schemaPath:s._`${e.schemaPath}${(0,s.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:r[n],schemaPath:s._`${e.schemaPath}${(0,s.getProperty)(t)}${(0,s.getProperty)(n)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(n)}`}}if(void 0!==r){if(void 0===o||void 0===a||void 0===l)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:r,schemaPath:o,topSchemaRef:l,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:n,dataPropType:r,data:o,dataTypes:a,propertyName:l}){if(void 0!==o&&void 0!==n)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==n){const{errorPath:o,dataPathArr:a,opts:l}=t;u(c.let("data",s._`${t.data}${(0,s.getProperty)(n)}`,!0)),e.errorPath=s.str`${o}${(0,i.getErrorPath)(n,r,l.jsPropertySyntax)}`,e.parentDataProperty=s._`${n}`,e.dataPathArr=[...a,e.parentDataProperty]}function u(n){e.data=n,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,n]}void 0!==o&&(u(o instanceof s.Name?o:c.let("data",o,!0)),void 0!==l&&(e.propertyName=l)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:n,compositeRule:s,createErrors:i,allErrors:r}){void 0!==s&&(e.compositeRule=s),void 0!==i&&(e.createErrors=i),void 0!==r&&(e.allErrors=r),e.jtdDiscriminator=t,e.jtdMetadata=n}},4042:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var s=n(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return s.KeywordCxt}});var i=n(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});const r=n(3558),o=n(4551),a=n(396),l=n(3835),c=n(9029),u=n(6939),h=n(208),d=n(4227),m=n(3837),p=n(5944),f=(e,t)=>new RegExp(e,t);f.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function w(e){var t,n,s,i,r,o,a,l,c,u,h,d,m,g,y,b,v,w,C,A,S,x,E,_,I;const T=e.strict,M=null===(t=e.code)||void 0===t?void 0:t.optimize,$=!0===M||void 0===M?1:M||0,L=null!==(s=null===(n=e.code)||void 0===n?void 0:n.regExp)&&void 0!==s?s:f,N=null!==(i=e.uriResolver)&&void 0!==i?i:p.default;return{strictSchema:null===(o=null!==(r=e.strictSchema)&&void 0!==r?r:T)||void 0===o||o,strictNumbers:null===(l=null!==(a=e.strictNumbers)&&void 0!==a?a:T)||void 0===l||l,strictTypes:null!==(u=null!==(c=e.strictTypes)&&void 0!==c?c:T)&&void 0!==u?u:"log",strictTuples:null!==(d=null!==(h=e.strictTuples)&&void 0!==h?h:T)&&void 0!==d?d:"log",strictRequired:null!==(g=null!==(m=e.strictRequired)&&void 0!==m?m:T)&&void 0!==g&&g,code:e.code?{...e.code,optimize:$,regExp:L}:{optimize:$,regExp:L},loopRequired:null!==(y=e.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===(w=e.messages)||void 0===w||w,inlineRefs:null===(C=e.inlineRefs)||void 0===C||C,schemaId:null!==(A=e.schemaId)&&void 0!==A?A:"$id",addUsedSchema:null===(S=e.addUsedSchema)||void 0===S||S,validateSchema:null===(x=e.validateSchema)||void 0===x||x,validateFormats:null===(E=e.validateFormats)||void 0===E||E,unicodeRegExp:null===(_=e.unicodeRegExp)||void 0===_||_,int32range:null===(I=e.int32range)||void 0===I||I,uriResolver:N}}class C{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...w(e)};const{es5:t,lines:n}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:y,es5:t,lines:n}),this.logger=function(e){if(!1===e)return T;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const s=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),A.call(this,b,e,"NOT SUPPORTED"),A.call(this,v,e,"DEPRECATED","warn"),this._metaOpts=I.call(this),e.formats&&E.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&_.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),x.call(this),e.validateFormats=s}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:n}=this.opts;let s=m;"id"===n&&(s={...m},s.id=s.$id,delete s.$id),t&&e&&this.addMetaSchema(s,s[n],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let n;if("string"==typeof e){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);const s=n(t);return"$async"in n||(this.errors=n.errors),s}compile(e,t){const n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:n}=this.opts;return s.call(this,e,t);async function s(e,t){await i.call(this,e.$schema);const n=this._addSchema(e,t);return n.validate||r.call(this,n)}async function i(e){e&&!this.getSchema(e)&&await s.call(this,{$ref:e},!0)}async function r(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof o.default))throw t;return a.call(this,t),await l.call(this,t.missingSchema),r.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function l(e){const n=await c.call(this,e);this.refs[e]||await i.call(this,n.$schema),this.refs[e]||this.addSchema(n,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=n(e))}finally{delete this._loading[e]}}}addSchema(e,t,n,s=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,n,s);return this}let i;if("object"==typeof e){const{schemaId:t}=this.opts;if(i=e[t],void 0!==i&&"string"!=typeof i)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,s,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let n;if(n=e.$schema,void 0!==n&&"string"!=typeof n)throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const s=this.validate(n,e);if(!s&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return s}getSchema(e){let t;for(;"string"==typeof(t=S.call(this,e));)e=t;if(void 0===t){const{schemaId:n}=this.opts,s=new l.SchemaEnv({schema:{},schemaId:n});if(t=l.resolveSchema.call(this,s,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=S.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,u.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if("string"==typeof e)n=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(n=(t=e).keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if($.call(this,n,t),!t)return(0,d.eachItem)(n,(e=>L.call(this,e))),this;P.call(this,t);const s={...t,type:(0,h.getJSONTypes)(t.type),schemaType:(0,h.getJSONTypes)(t.schemaType)};return(0,d.eachItem)(n,0===s.type.length?e=>L.call(this,e,s):e=>s.type.forEach((t=>L.call(this,e,s,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const n of t.rules){const t=n.rules.findIndex((t=>t.keyword===e));t>=0&&n.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){return e&&0!==e.length?e.map((e=>`${n}${e.instancePath} ${e.message}`)).reduce(((e,n)=>e+t+n)):"No errors"}$dataMetaSchema(e,t){const n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const s of t){const t=s.split("/").slice(1);let i=e;for(const e of t)i=i[e];for(const e in n){const t=n[e];if("object"!=typeof t)continue;const{$data:s}=t.definition,r=i[e];s&&r&&(i[e]=O(r))}}return e}_removeAllSchemas(e,t){for(const n in e){const s=e[n];t&&!t.test(n)||("string"==typeof s?delete e[n]:s&&!s.meta&&(this._cache.delete(s.schema),delete e[n]))}}_addSchema(e,t,n,s=this.opts.validateSchema,i=this.opts.addUsedSchema){let r;const{schemaId:o}=this.opts;if("object"==typeof e)r=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;n=(0,u.normalizeId)(r||n);const c=u.getSchemaRefs.call(this,e,n);return a=new l.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:n,localRefs:c}),this._cache.set(a.schema,a),i&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=a),s&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):l.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,e)}finally{this.opts=t}}}function A(e,t,n,s="error"){for(const i in e){const r=i;r in t&&this.logger[s](`${n}: option ${i}. ${e[r]}`)}}function S(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function x(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function E(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function _(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const n=e[t];n.keyword||(n.keyword=t),this.addKeyword(n)}}}function I(){const e={...this.opts};for(const t of g)delete e[t];return e}C.ValidationError=r.default,C.MissingRefError=o.default,t.default=C;const T={log(){},warn(){},error(){}},M=/^[a-z_$][a-z0-9_$:-]*$/i;function $(e,t){const{RULES:n}=this;if((0,d.eachItem)(e,(e=>{if(n.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!M.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function L(e,t,n){var s;const i=null==t?void 0:t.post;if(n&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:r}=this;let o=i?r.post:r.rules.find((({type:e})=>e===n));if(o||(o={type:n,rules:[]},r.rules.push(o)),r.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,h.getJSONTypes)(t.type),schemaType:(0,h.getJSONTypes)(t.schemaType)}};t.before?N.call(this,o,a,t.before):o.rules.push(a),r.all[e]=a,null===(s=t.implements)||void 0===s||s.forEach((e=>this.addKeyword(e)))}function N(e,t,n){const s=e.rules.findIndex((e=>e.keyword===n));s>=0?e.rules.splice(s,0,t):(e.rules.push(t),this.logger.warn(`rule ${n} is not defined`))}function P(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=O(t)),e.validateSchema=this.compile(t,!0))}const R={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function O(e){return{anyOf:[e,R]}}},9572:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=n(1678),i=n(7216),r=n(9547),o=n(8226),a=n(518),l=n(4588),c=n(5707),u=n(7082),h=["/properties"];t.default=function(e){return[s,i,r,o,a,t(this,l),c,t(this,u)].forEach((e=>this.addMetaSchema(e,void 0,!1))),this;function t(t,n){return e?t.$dataMetaSchema(n,h):n}}},6250:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=n(2017);s.code='require("ajv/dist/runtime/equal").default',t.default=s},3853:(e,t)=>{"use strict";function n(e){const t=e.length;let n,s=0,i=0;for(;i<t;)s++,n=e.charCodeAt(i++),n>=55296&&n<=56319&&i<t&&(n=e.charCodeAt(i),56320==(64512&n)&&i++);return s}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n,n.code='require("ajv/dist/runtime/ucs2length").default'},5944:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=n(8343);s.code='require("ajv/dist/runtime/uri").default',t.default=s},3558:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=n},5457:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const s=n(9029),i=n(4227),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>s.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>s._`{limit: ${e}}`},code(e){const{parentSchema:t,it:n}=e,{items:s}=t;Array.isArray(s)?o(e,s):(0,i.checkStrictMode)(n,'"additionalItems" is ignored when "items" is not an array of schemas')}};function o(e,t){const{gen:n,schema:r,data:o,keyword:a,it:l}=e;l.items=!0;const c=n.const("len",s._`${o}.length`);if(!1===r)e.setParams({len:t.length}),e.pass(s._`${c} <= ${t.length}`);else if("object"==typeof r&&!(0,i.alwaysValidSchema)(l,r)){const r=n.var("valid",s._`${c} <= ${t.length}`);n.if((0,s.not)(r),(()=>function(r){n.forRange("i",t.length,c,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:i.Type.Num},r),l.allErrors||n.if((0,s.not)(r),(()=>n.break()))}))}(r))),e.ok(r)}}t.validateAdditionalItems=o,t.default=r},8660:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=n(5765),i=n(9029),r=n(2023),o=n(4227),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>i._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:n,parentSchema:a,data:l,errsCount:c,it:u}=e;if(!c)throw new Error("ajv implementation error");const{allErrors:h,opts:d}=u;if(u.props=!0,"all"!==d.removeAdditional&&(0,o.alwaysValidSchema)(u,n))return;const m=(0,s.allSchemaProperties)(a.properties),p=(0,s.allSchemaProperties)(a.patternProperties);function f(e){t.code(i._`delete ${l}[${e}]`)}function g(s){if("all"===d.removeAdditional||d.removeAdditional&&!1===n)f(s);else{if(!1===n)return e.setParams({additionalProperty:s}),e.error(),void(h||t.break());if("object"==typeof n&&!(0,o.alwaysValidSchema)(u,n)){const n=t.name("valid");"failing"===d.removeAdditional?(y(s,n,!1),t.if((0,i.not)(n),(()=>{e.reset(),f(s)}))):(y(s,n),h||t.if((0,i.not)(n),(()=>t.break())))}}}function y(t,n,s){const i={keyword:"additionalProperties",dataProp:t,dataPropType:o.Type.Str};!1===s&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,n)}t.forIn("key",l,(n=>{m.length||p.length?t.if(function(n){let r;if(m.length>8){const e=(0,o.schemaRefOrVal)(u,a.properties,"properties");r=(0,s.isOwnProperty)(t,e,n)}else r=m.length?(0,i.or)(...m.map((e=>i._`${n} === ${e}`))):i.nil;return p.length&&(r=(0,i.or)(r,...p.map((t=>i._`${(0,s.usePattern)(e,t)}.test(${n})`)))),(0,i.not)(r)}(n),(()=>g(n))):g(n)})),e.ok(i._`${c} === ${r.default.errors}`)}};t.default=a},5844:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=n(4227),i={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:n,it:i}=e;if(!Array.isArray(n))throw new Error("ajv implementation error");const r=t.name("valid");n.forEach(((t,n)=>{if((0,s.alwaysValidSchema)(i,t))return;const o=e.subschema({keyword:"allOf",schemaProp:n},r);e.ok(r),e.mergeEvaluated(o)}))}};t.default=i},6505:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:n(5765).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=s},2661:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const s=n(9029),i=n(4227),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?s.str`must contain at least ${e} valid item(s)`:s.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?s._`{minContains: ${e}}`:s._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:n,parentSchema:r,data:o,it:a}=e;let l,c;const{minContains:u,maxContains:h}=r;a.opts.next?(l=void 0===u?1:u,c=h):l=1;const d=t.const("len",s._`${o}.length`);if(e.setParams({min:l,max:c}),void 0===c&&0===l)return void(0,i.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&l>c)return(0,i.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,i.alwaysValidSchema)(a,n)){let t=s._`${d} >= ${l}`;return void 0!==c&&(t=s._`${t} && ${d} <= ${c}`),void e.pass(t)}a.items=!0;const m=t.name("valid");function p(){const e=t.name("_valid"),n=t.let("count",0);f(e,(()=>t.if(e,(()=>function(e){t.code(s._`${e}++`),void 0===c?t.if(s._`${e} >= ${l}`,(()=>t.assign(m,!0).break())):(t.if(s._`${e} > ${c}`,(()=>t.assign(m,!1).break())),1===l?t.assign(m,!0):t.if(s._`${e} >= ${l}`,(()=>t.assign(m,!0))))}(n)))))}function f(n,s){t.forRange("i",0,d,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:i.Type.Num,compositeRule:!0},n),s()}))}void 0===c&&1===l?f(m,(()=>t.if(m,(()=>t.break())))):0===l?(t.let(m,!0),void 0!==c&&t.if(s._`${o}.length > 0`,p)):(t.let(m,!1),p()),e.result(m,(()=>e.reset()))}};t.default=r},3025:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const s=n(9029),i=n(4227),r=n(5765);t.error={message:({params:{property:e,depsCount:t,deps:n}})=>{const i=1===t?"property":"properties";return s.str`must have ${i} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:n,missingProperty:i}})=>s._`{property: ${e},