@datagrok/helm 2.1.34 → 2.2.0

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.
@@ -1,2 +1,2 @@
1
- var helm_test;(()=>{var t={460:(t,e,n)=>{"use strict";n.d(e,{wW:()=>f});var s,i,r,o,a,l,h,c=n(888);n(200),n(852),n(923),n(688);class u{constructor(t,e=!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 t){const n=t,s=u._createBuffer(n);if(e)for(let t=0;t<s.length;t++)s[t]=-1;this._data=s,this._length=n}else{if(!(t instanceof Uint32Array))throw new Error("Invalid constructor");this._data=t,this._length=e}}getRawData(){return this._data}assureGoez(t,e){if(t<0)throw new Error(`${e} should be greater than zero`)}assureInRange(t,e,n,s){if(t<e||t>n)throw new Error(`Argument ${s} (${t}) out of range (${e}, ${n})`)}copy(t,e,n){for(let s=0;s<n;s++)e[s]=t[s]}copyFrom(t){if(this._length!=t._length)throw new Error(`Lengths differ (${this._length} != ${t._length})`);this.copy(t._data,this._data,this.lengthInInts),this._version++}get length(){return this._length}get buffer(){return this._data}set buffer(t){this._data=t,this._version++}get version(){return this._version}set version(t){this._version=t}incrementVersion(t=!0){this._version++}get lengthInInts(){return Math.floor((this._length+31)/32)}get versionedName(){return this._version==this._versionedNameVersion?this._versionedName:""}set versionedName(t){this._versionedName=t,this._versionedNameVersion=this._version}get self(){return this}setLength(t){if(t<0)throw new Error("should be >= 0");if(t==this._length)return;const e=Math.floor((t+31)/32);if(e>this._data.length||e+this.SHRINK_THRESHOLD<this._data.length){const t=new Uint32Array(e);this.copy(this._data,t,e>this._data.length?this._data.length:e),this._data=t}t>this._length&&(this._length%32>0&&(this._data[this.lengthInInts-1]&=(1<<(this._length%32&31))-1),this._data.fill(0,this.lengthInInts,e)),this._length=t,this._version++}static fromAnd(t,e){if(t._length!=e._length)throw new Error(`Lengths differ (${t._length} != ${e._length})`);const n=new u(t._length);n._length=t._length,n._data=u._createBuffer(n._length),n._version=0;const s=t.lengthInInts;for(let i=0;i<s;i++)n._data[i]=t._data[i]&e._data[i];return n}static _createBuffer(t){return new Uint32Array(Math.floor((t+31)/32))}static fromValues(t){const e=new u(t.length);e._version=0;for(let n=0;n<e._length;n++)t[n]&&(e._data[Math.floor(n/32)]|=1<<(n%32&31));return e}static fromSeq(t,e){const n=new u(t);for(let s=0;s<t;++s)n.setBit(s,e(s));return n._version=0,n}static fromString(t){return u.fromSeq(t.length,(e=>"1"==t.charAt(e)))}static fromUint32Array(t,e){const n=new u(t);return n._data=e,n}static fromBytes(t){const e=t.length,n=new u(8*e);n._data=new Uint32Array(Math.floor((e+3)/4)),n._length=8*e;let s=0,i=0;for(;e-i>=4;)n._data[s++]=255&t[i]|(255&t[i+1])<<8|(255&t[i+2])<<16|(255&t[i+3])<<24,i+=4;return e-i==3&&(n._data[s]=(255&t[i+2])<<16),e-i==2&&(n._data[s]|=(255&t[i+1])<<8),e-i==1&&(n._data[s]|=255&t[i]),n._version=0,n}toString(){return`${this._length} bits, ${this.countBits(!0)} set`}equals(t){if(this==t)return!0;if(null==t)return!1;if(this._length!=t._length)return!1;if(0==this._length)return!0;for(let e=0;e<this._data.length-1;e++)if(this._data[e]!=t._data[e])return!1;for(let e=8*(this._data.length-1);e<this._length;e++)if(this.getBit(e)!=t.getBit(e))return!1;return!0}clone(){const t=new u(0,!1);return t._data=Uint32Array.from(this._data),t._length=this._length,t._version=this._version,t}init(t,e){this.setAll(!1,!1);for(let e=0;e<this._length;e++)t(e)&&(this._data[Math.floor(e/32)]|=1<<(e%32&31));return this.incrementVersion(e),this}invert(t=!0){for(let t=0;t<this._data.length;t++)this._data[t]^=-1;this.incrementVersion(t)}setAll(t,e=!1){const n=t?-1:0,s=this.lengthInInts;for(let t=0;t<s;t++)this._data[t]=n;this.incrementVersion(e)}setIndexes(t,e=!0,n=!0,s=!0){n&&this.setAll(!e,!1);for(const n of t)this.setFast(n,e);this.incrementVersion(s)}everyIndex(t,e=!0){for(const n of t)if(this.getBit(n)!=e)return!1;return!0}anyIndex(t,e=!0){for(const n of t)if(this.getBit(n)==e)return!0;return!1}setWhere(t,e=!0,n=!0,s=!0,i=!0){if(n&&i&&this.setAll(!e,!1),i)for(let n=0;n<this._length;n++)t(n)&&this.setFast(n,e);else for(let n=0;n<this._length;n++)this.setFast(n,t(n)?e:!e);this.incrementVersion(s)}getRange(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const n=[];for(let s=t;s<e;++s)n.push(this.getBit(s));return u.fromValues(n)}getRangeAsList(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const n=[];for(let s=t;s<e;++s)n.push(this.getBit(s));return n}setRange(t,e,n,s=!0){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length-1,"to");const i=Math.min(t,e),r=Math.max(t,e);if(n)for(let t=i;t<=r;t++)this.setTrue(t);else for(let t=i;t<=r;t++)this.setFalse(t);return this.incrementVersion(s),this}setRandom(t,e,n=!0){if(t<0||t>this._length)throw new Error("n must be >= 0 && <= Count");t>this._length/2&&this.setRandom(this._length-t,!e),this.setAll(!e);for(let n=0;n<t;){const t=Math.floor(Math.random()*this._length);this.getBit(t)!=e&&(this.setFast(t,e),n++)}this.incrementVersion(n)}and(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]&=t._data[e];return this.incrementVersion(e),this}andNot(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");const n=this.lengthInInts;for(let e=0;e<n;e++)this._data[e]&=~t._data[e];return this.incrementVersion(e),this}notAnd(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]=~this._data[e]&t._data[e];return this.incrementVersion(e),this}not(t=!0){for(let t=0,e=this.lengthInInts;t<e;t++)this._data[t]=~this._data[t];return this.incrementVersion(t),this}or(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]|=t._data[e];return this.incrementVersion(e),this}xor(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,n=this.lengthInInts;e<n;e++)this._data[e]^=t._data[e];return this.incrementVersion(e),this}insertAt(t,e,n=!1){if(this.assureInRange(t,0,this._length,"pos"),0==e)return;const s=this._length;this.setLength(this._length+e);for(let n=s-1;n>=t;n--)this.setBit(n+e,this.getBit(n));for(let s=t;s<t+e;s++)this.setBit(s,n)}removeAt(t,e=1){if(e<0)throw new Error("n cannot be negative");if(this.assureInRange(t,0,this._length-e,"pos"),this.contains(!0))for(let n=t;n<this._length-e;n++)this.setBit(n,this.getBit(n+e));this.setLength(this._length-e)}removeByMask(t,e=!0){if(this._length!=t.length)throw new Error("length != mask.length");if(t==this)this.setLength(t.countBits(!e)),this.setAll(!e);else{let n=0;for(let s=-1;-1!=(s=t.findNext(s,!e));)this.setFast(n++,this.getBit(s));this._length=n,this._version++}return this}getBit(t){return 0!=(this._data[Math.floor(t/32)]&1<<(31&t))}setBit(t,e,n=!0){this.setFast(t,e),this._version++}setFast(t,e){e?this._data[Math.floor(t/32)]|=1<<(31&t):this._data[Math.floor(t/32)]&=~(1<<(31&t))}setTrue(t){this._data[Math.floor(t/32)]|=1<<(31&t)}setFalse(t){this._data[Math.floor(t/32)]&=~(1<<(31&t))}trueCount(){return this.countBits(!0)}falseCount(){return this.countBits(!1)}countBits(t){if(0==this._length)return 0;if(this._selectedCountVersion!=this._version){this._selectedCount=0;const t=this.lengthInInts;let e=0;for(;e<t-1;e++)for(let t=this._data[e];0!=t;t>>>=8)this._selectedCount+=u._onBitCount[255&t];let n=this._data[e];const s=31&this._length;for(0!=s&&(n&=~(4294967295<<s));0!=n;n>>>=8)this._selectedCount+=u._onBitCount[255&n];this._selectedCountVersion=this._version}return t?this._selectedCount:this._length-this._selectedCount}countWhere(t){let e=0;if(this.trueCount()==this._length)for(let n=0;n<this._length;n++)e+=t(n)?1:0;else for(let n=-1;-1!=(n=this.findNext(n,!0));)e+=t(n)?1:0;return e}andWithCountBits(t,e){if(0==this._length)return 0;let n=0;const s=this.lengthInInts;let i=0;for(;i<s-1;i++)for(let e=this._data[i]&t._data[i];0!=e;e>>>=8)n+=u._onBitCount[255&e];let r=this._data[i]&t._data[i];const o=31&this._length;for(0!=o&&(r&=~(4294967295<<o));0!=r;r>>>=8)n+=u._onBitCount[255&r];return e?n:this._length-n}clear(){this.setLength(0)}contains(t){return this.findNext(-1,t)>=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(t,e=!0){if(this.assureInRange(t,-1,this._length,"index"),t>=this._length-1)return-1;let n=31&(t=t<0?0:t+1);const s=this.lengthInInts;for(let i=Math.floor(t/32);i<s;i++){let s=e?this._data[i]:~this._data[i];if(0!=n)s&=4294967295<<n&4294967295,n=0;else if(!e&&-4294967296==s)continue;for(let e=0;0!=s;e+=8,s>>>=8){const n=u._firstOnBit[255&s];if(n>=0)return(t=n+32*i+e)>=this._length?-1:t}}return-1}findPrev(t,e=!0){if(0==t)return-1;this.assureInRange(t,-1,this._length,"index");let n=1+(t=t<0?this._length-1:t-1)&31;for(let s=Math.floor(t/32);s>=0;s--){let t=e?this._data[s]:~this._data[s];0!=n&&(t&=~(4294967295<<n),n=0);for(let e=24;0!=t;e-=8,t<<=8){const n=u._lastOnBit[t>>>24];if(n>=0)return n+32*s+e}}return-1}}u._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]),u._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]),u._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]),function(t){t.Levenshtein="Levenshtein",t.JaroWinkler="Jaro-Winkler",t.Manhattan="Manhattan",t.Onehot="One-Hot"}(s||(s={})),function(t){t.Euclidean="Euclidean"}(i||(i={})),function(t){t.Tanimoto="Tanimoto",t.Dice="Dice",t.Asymmetric="Asymmetric",t.BraunBlanquet="Braun-Blanquet",t.Cosine="Cosine",t.Kulczynski="Kulczynski",t.McConnaughey="Mc-Connaughey",t.RogotGoldberg="Rogot-Goldberg",t.Russel="Russel",t.Sokal="Sokal",t.Hamming="Hamming",t.Euclidean="Euclidean"}(r||(r={})),function(t){t.TanimotoIntArray="TanimotoIntArray"}(o||(o={})),function(t){t.Vector="Vector",t.String="String",t.BitArray="BitArray",t.MacroMolecule="MacroMolecule",t.Number="Number",t.IntArray="IntArray",t.NumberArray="NumberArray"}(a||(a={})),function(t){t.Difference="Difference"}(l||(l={})),function(t){t.CommonItems="Common Items"}(h||(h={}));var g=n(384);async function f(){const t=c.Func.find({package:"Bio",name:"getMonomerLibHelper"});if(0===t.length)throw new Error('Package "Bio" must be installed for MonomerLibHelper.');return(await t[0].prepare().call()).getOutputParamValue()}r.Tanimoto,r.Dice,r.Asymmetric,r.BraunBlanquet,r.Cosine,r.Kulczynski,r.McConnaughey,r.RogotGoldberg,r.Russel,r.Sokal,r.Hamming,r.Euclidean,r.Tanimoto,r.Dice,r.Asymmetric,r.BraunBlanquet,r.Cosine,r.Kulczynski,r.McConnaughey,r.RogotGoldberg,r.Russel,r.Sokal,r.Hamming,r.Euclidean,r.Tanimoto,r.Dice,r.Cosine,r.Tanimoto,r.Asymmetric,r.Cosine,r.Sokal,g.Y.HAMMING,g.Y.LEVENSHTEIN,g.Y.MONOMER_CHEMICAL_DISTANCE,g.Y.NEEDLEMANN_WUNSCH},852:(t,e,n)=>{"use strict";n.d(e,{E1:()=>s,cT:()=>i});const s="p",i=new RegExp(`[rd]\\((\\w)\\)${s}?`,"g")},136:(t,e,n)=>{"use strict";n.d(e,{YF:()=>r,eQ:()=>o,qD:()=>s,y6:()=>l});var s,i=n(923);!function(t){t.FASTA="fasta",t.SEPARATOR="separator",t.HELM="helm"}(s||(s={}));const r=", ",o=/(?:\[([A-Za-z0-9_\-,()]+)\])|([A-Za-z\-])/g,a=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"])}}},l=[new i._u("PT",a.fasta.peptide,.5),new i._u("DNA",a.fasta.dna,.55),new i._u("RNA",a.fasta.rna,.55)]},736:(t,e,n)=>{"use strict";n.d(e,{YF:()=>s.YF,g9:()=>i.g9,gX:()=>i.gX,oB:()=>i.oB,qD:()=>s.qD,y6:()=>s.y6});var s=n(136),i=n(502)},923:(t,e,n)=>{"use strict";n.d(e,{AD:()=>r,_u:()=>i,yK:()=>s});const s="";class i{constructor(t,e,n){this.name=t,this.alphabet=e,this.cutoff=n}}class r extends i{constructor(t,e,n){super(t.name,t.alphabet,t.cutoff),this.freq=e,this.similarity=n}}},502:(t,e,n)=>{"use strict";n.d(e,{Mx:()=>y,o5:()=>I,gX:()=>b,uw:()=>O,oB:()=>x,lh:()=>T,g9:()=>w});var s=n(888),i=n(848),r=n.n(i),o=n(923),a=n(136),l=n(688);class h extends Float32Array{}function c(t){let e=0;for(let n=0;n<t.length;n++)e+=t[n]*t[n];return Math.sqrt(e)}class u{static makePalette(t,e=!1,n=u){const s={};return t.forEach((t=>{const n=t[0],i=t[1];n.forEach(((t,n)=>{s[t]=this.colourPalette[i][e?0:n]}))})),new n(s)}constructor(t){this._palette=t}get(t){return this._palette[t]}}u.undefinedColor="rgb(100,100,100)",u.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)"]};class g extends u{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,g)),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,g)),this.grokGroups}static get RasMol(){return void 0===this.rasMol&&(this.rasMol=new g({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(t){const e=t in g.aaSynonyms?g.aaSynonyms[t]:t;return super.get(e)}}g.aaSynonyms={MeNle:"L",MeA:"A",MeG:"G",MeF:"F"};class f{static getPalette(t="grok"){switch(t){case"grok":return g.GrokGroups;case"lesk":return g.Lesk;default:throw new Error(`ChemPalette: scheme \`${t}\` does not exist`)}}static getInnerOuter(t){let e=0,n="",s="";for(const i of t)"("==i?e++:")"==i?e--:e?n+=i:s+=i;return isNaN(parseInt(n))?[s,n]:[s,""]}static getColorAAPivot(t="",e="grok"){const n=this.getPalette(e);let[s,i]=this.getInnerOuter(t);if(s=s.length>6?`${s.slice(0,3)}...`:s,i=i.length>6?`${i.slice(0,3)}...`:i,1==t.length||"("==t[1]){const e=t[0]?.toUpperCase();return e in n?[n.get(e),e,i,1]:[this.undefinedColor,s,i,1]}if("d"==t[0]&&t[1]in n&&(2==t.length||"("==t[2])){const e=t[1]?.toUpperCase();return e in n?[n.get(e),e,i,2]:[this.undefinedColor,s,i,2]}if(t.substring(0,3)in this.AAFullNames&&(3==t.length||"("==t[3])){const e=this.AAFullNames[t.substring(0,3)];return e in n?[n.get(e),e,i,3]:[this.undefinedColor,s,i,3]}if(t[0]?.toLowerCase()==t[0]&&t.substring(1,3)in this.AAFullNames&&(4==t.length||"("==t[4])){const e=this.AAFullNames[t.substring(1,3)];return e in n?[n.get(e),e,i,4]:[this.undefinedColor,s,i,4]}return[this.undefinedColor,s,i,0]}}f.SemType="Aminoacids",f.SemTypeMultipleAlignment="AminoacidsMultipleAlignment",f.undefinedColor="rgb(100,100,100)",f.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"},f.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"},f.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(*)*"},f.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"};class d{}d.SemType="Nucleotides",d.SemTypeMultipleAlignment="NucleotidesMultipleAlignment",d.Names={A:"Adenine",C:"Cytosine",G:"Guanine",T:"Thymine",U:"Uracil"};class p{static hashCode(t){let e=0;if(0===t.length)return e;for(let n=0;n<t.length;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e}}class m{}class C extends m{static buildPalette(){return[].concat(...Object.values(u.colourPalette))}get(t){const e=p.hashCode(t)%C.palette.length;return function(t){if(null==t)return"rgb(100,100,100)";const e=s.Color.fromHtml(t),n=s.Color.g(e),i=s.Color.r(e),r=s.Color.b(e),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(e)}(C.palette[e])}}C.palette=C.buildPalette();class y{get length(){return this.mList.length}get canonicals(){return this.mList}get originals(){return this.mList}isGap(t){return this.getOriginal(t)===this.gapOriginalMonomer}getCanonical(t){if(this.length<=t)throw new Error("Index out of bounds");return this.mList[t]}getOriginal(t){if(this.length<=t)throw new Error("Index out of bounds");return this.mList[t]}constructor(t,e){this.mList=t,this.gapOriginalMonomer=e}}class A{get length(){return this.seqS.length}get canonicals(){return this.seqS}get originals(){return this.seqS}isGap(t){return this.getOriginal(t)===l.oh[a.qD.FASTA]}getCanonical(t){if(this.length<=t)throw new Error("Index out of bounds");return this.isGap(t)?o.yK:this.seqS[t]}getOriginal(t){if(this.length<=t)throw new Error("Index out of bounds");return this.seqS[t]}constructor(t){this.seqS=t}}const x=t=>{const e=r()(t.toString().matchAll(a.eQ)).map((t=>t[2]??t[1])).toArray();return new y(e,l.oh[a.qD.FASTA])},T=t=>t?new A(t):new y([],l.oh[a.qD.FASTA]);function b(t,e=void 0){return n=>{if(n){const s=n.replaceAll('"-"',"").replaceAll("'-'","").split(t,e);return new y(s,l.oh[a.qD.SEPARATOR])}return new y([],l.oh[a.qD.SEPARATOR])}}const E=/(PEPTIDE1|DNA1|RNA1)\{([^}]+)}/g,_=/\[([^\[\]]+)]/g,w=t=>{E.lastIndex=0;const e=E.exec(t.toString()),n=e?e[2]:null,s=n?n.split("."):[];return new y(s.map((t=>{_.lastIndex=0;const e=_.exec(t);return e&&e.length>=2?e[1]:t})),l.oh[a.qD.HELM])},N=/([^\W_]+)/g;function O(t,e){if(t.length<=e)return t;const n=t.match(N),s=t.length>e||(n?.length??0)>1,i=n?.[0]??" ";return s?i.substring(0,e-1)+"…":i}function I(t,e,n="-"){const s=e.map((e=>{const s=function(t,e,n="-"){const s=new Set([...new Set(Object.keys(t)),...e]);s.delete(n);const i=[],r=[];for(const n of s)i.push(n in t?t[n]:0),r.push(e.has(n)?1:0);const o=new h(i),a=new h(r);return function(t,e){if(t.length!=e.length)throw new Error("The dimensionality of the vectors must match");let n=0;for(let s=0;s<t.length;s++)n+=t[s]*e[s];return n}(o,a)/(c(o)*c(a))}(t,e.alphabet,n);return new o.AD(e,t,s)}));let i;const r=Math.max(...s.map((t=>t.similarity>t.cutoff?t.similarity:-1)));return i=r>0?s.find((t=>t.similarity===r)).name:"UN",i}},688:(t,e,n)=>{"use strict";n.d(e,{YL:()=>d,oh:()=>f});var s=n(888),i=n(848),r=n.n(i),o=n(736),a=n(923),l=n(502),h=n(384),c=n(460),u=n(852);const g=new class{constructor(){this.seqHandler="seq-handler",this.notationProvider="seq-handler.notation-provider"}},f={[o.qD.FASTA]:"-",[o.qD.SEPARATOR]:"",[o.qD.HELM]:"*"};class d{constructor(t){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,t.type!==s.TYPE.STRING)throw new Error(`Unexpected column type '${t.type}', must be '${s.TYPE.STRING}'.`);this._column=t;const e=this._column.getTag(s.TAGS.UNITS);if(null==e)throw new Error("Units are not specified in column");if(this._units=e,this._notation=this.getNotation(),this._defaultGapOriginal=this.isFasta()?f[o.qD.FASTA]:this.isHelm()?f[o.qD.HELM]:f[o.qD.SEPARATOR],!this.column.tags.has("aligned")||!this.column.tags.has("alphabet")||!this.column.tags.has(".alphabetIsMultichar")&&!this.isHelm()&&"UN"===this.alphabet)if(this.isFasta())d.setUnitsToFastaColumn(this);else if(this.isSeparator()){const e=t.getTag("separator");d.setUnitsToSeparatorColumn(this,e)}else{if(!this.isHelm())throw new Error(`Unexpected units '${this.column.getTag(s.TAGS.UNITS)}'.`);d.setUnitsToHelmColumn(this)}if(!this.column.tags.has(".alphabetIsMultichar"))if(this.isHelm())this.column.setTag(".alphabetIsMultichar","true");else if(["UN"].includes(this.alphabet))throw new Error(`For column '${this.column.name}' of alphabet '${this.alphabet}' tag '.alphabetIsMultichar' is mandatory.`);this.notationProvider=this.column.temp[g.notationProvider]??null,this.columnVersion=this.column.version}static setUnitsToFastaColumn(t){if(t.column.semType!==s.SEMTYPE.MACROMOLECULE||t.column.getTag(s.TAGS.UNITS)!==o.qD.FASTA)throw new Error(`The column of notation '${o.qD.FASTA}' must be '${s.SEMTYPE.MACROMOLECULE}'.`);t.column.setTag(s.TAGS.UNITS,o.qD.FASTA),d.setTags(t)}static setUnitsToSeparatorColumn(t,e){if(t.column.semType!==s.SEMTYPE.MACROMOLECULE||t.column.getTag(s.TAGS.UNITS)!==o.qD.SEPARATOR)throw new Error(`The column of notation '${o.qD.SEPARATOR}' must be '${s.SEMTYPE.MACROMOLECULE}'.`);if(!e)throw new Error(`The column of notation '${o.qD.SEPARATOR}' must have the separator tag.`);t.column.setTag(s.TAGS.UNITS,o.qD.SEPARATOR),t.column.setTag("separator",e),d.setTags(t)}static setUnitsToHelmColumn(t){if(t.column.semType!==s.SEMTYPE.MACROMOLECULE)throw new Error(`The column of notation '${o.qD.HELM}' must be '${s.SEMTYPE.MACROMOLECULE}'`);t.column.setTag(s.TAGS.UNITS,o.qD.HELM),d.setTags(t)}static setTags(t){const e=t.column.getTag(s.TAGS.UNITS),n=t.stats;if(Object.keys(n.freq).some((t=>t.length>1)),[o.qD.FASTA,o.qD.SEPARATOR].includes(e)){if(!t.column.getTag("alphabet")&&0===Object.keys(n.freq).length)throw new Error("Alphabet is empty and not annotated.");let e=t.column.getTag("aligned");null===e&&(e=n.sameLength?"SEQ.MSA":"SEQ",t.column.setTag("aligned",e));let s=t.column.getTag("alphabet");if(null===s&&(s=(0,l.o5)(n.freq,o.y6),t.column.setTag("alphabet",s)),"UN"===s){const e=Object.keys(n.freq).length,s=Object.keys(n.freq).some((t=>t.length>1));t.column.setTag(".alphabetSize",e.toString()),t.column.setTag(".alphabetIsMultichar",s?"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 t=this.column.getTag("separator")??void 0;if(this.notation===o.qD.SEPARATOR&&void 0===t)throw new Error(`Separator is mandatory for column '${this.column.name}' of notation '${this.notation}'.`);return t}get aligned(){const t=this.column.getTag("aligned");if(!t&&(this.isFasta()||this.isSeparator()))throw new Error("Tag aligned not set");return t}get alphabet(){const t=this.column.getTag("alphabet");if(!t&&(this.isFasta()||this.isSeparator()))throw new Error("Tag alphabet not set");return t}get helmCompatible(){return this.column.getTag(".isHelmCompatible")}getAlphabetSize(){if(this.notation==o.qD.HELM||"UN"==this.alphabet){const t=this.column.getTag(".alphabetSize");let e;if(t)e=parseInt(t);else{const t=this.stats;e=Object.keys(t.freq).length}return e}switch(this.alphabet){case"PT":return 20;case"DNA":case"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.qD.HELM||"UN"===this.alphabet&&"true"===this.column.getTag(".alphabetIsMultichar")}getSplitted(t){if(this.cached){this.column.version===this.columnVersion&&null!==this._splitted||(this.columnVersion=this.column.version,this._splitted=new Array(this.column.length));let e=this._splitted[t]?this._splitted[t].deref():void 0;if(!e){const n=this.column.get(t);e=this.splitter(n),this._splitted[t]=new WeakRef(e)}return e}{const e=this.column.get(t);return this.splitter(e)}}get stats(){if(null===this._stats){const t={};let e=!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&&(e=!1);for(const e of s.canonicals)e in t||(t[e]=0),t[e]+=1}this._stats={freq:t,sameLength:e}}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((t=>this.getSplitted(t).length)))),this._maxLength}get posList(){if(null===this._posList){const t=this.column.getTag(".positionNames");this._posList=t?t.split(o.YF).map((t=>t.trim())):r().count(1).take(this.maxLength).map((t=>t.toString())).toArray()}return this._posList}isFasta(){return this.notation===o.qD.FASTA}isSeparator(){return this.notation===o.qD.SEPARATOR}isHelm(){return this.notation===o.qD.HELM}isRna(){return"RNA"===this.alphabet}isDna(){return"DNA"===this.alphabet}isPeptide(){return"PT"===this.alphabet}isMsa(){return!!this.aligned&&this.aligned.toUpperCase().includes("MSA")}isHelmCompatible(){return"true"===this.helmCompatible}isGap(t){return!t||t===this._defaultGapOriginal}getNotation(){if(this.units.toLowerCase().startsWith(o.qD.FASTA))return o.qD.FASTA;if(this.units.toLowerCase().startsWith(o.qD.SEPARATOR))return o.qD.SEPARATOR;if(this.units.toLowerCase().startsWith(o.qD.HELM))return o.qD.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(t,e,n,i){const r=this.column,a=t.toLowerCase()+"("+r.name+")",l=n??r.dataFrame.columns.getUnusedName(a),h=s.Column.fromList("string",l,i??new Array(this.column.length).fill(""));if(h.semType=s.SEMTYPE.MACROMOLECULE,h.setTag(s.TAGS.UNITS,t),t===o.qD.SEPARATOR){if(!e)throw new Error(`Notation '${o.qD.SEPARATOR}' requires separator value.`);h.setTag("separator",e)}h.setTag(s.TAGS.CELL_RENDERER,"sequence");const c=r.getTag("aligned");c&&h.setTag("aligned",c);let u=r.getTag("alphabet");u||this.notation!==o.qD.HELM||t===o.qD.HELM||(u="UN"),null!=u&&h.setTag("alphabet",u);let g=r.getTag(".alphabetSize");null!=u&&g&&h.setTag(".alphabetSize",g);const f=r.getTag(".alphabetIsMultichar");return null!=u&&void 0!==f&&h.setTag(".alphabetIsMultichar",f),t==o.qD.HELM&&(g=this.getAlphabetSize().toString(),h.setTag(".alphabetSize",g)),h}getNewColumnFromList(t,e){return this.getNewColumn(this.notation,this.separator,t,e)}static getNewColumn(t){const e=d.forColumn(t),n=e.notation;return e.getNewColumn(n)}static unitsStringIsValid(t){return t=t.toLowerCase(),[o.qD.FASTA,o.qD.SEPARATOR,o.qD.HELM].some((e=>t.startsWith(e.toLowerCase())))}static getNewColumnFromParams(t,e,n){if(!d.unitsStringIsValid(n))throw new Error("Invalid format of 'units' parameter");const i=s.Column.fromList("string",e,new Array(t).fill(""));return i.semType=s.SEMTYPE.MACROMOLECULE,i.setTag(s.TAGS.UNITS,n),i}getSplitter(t){let e=null;if(e=this.notationProvider?this.notationProvider.splitter:null,e)return e;if(this.units.toLowerCase().startsWith(o.qD.FASTA))return null===this.column.getTag("alphabet")||this.getAlphabetIsMultichar()?o.oB:l.lh;if(this.units.toLowerCase().startsWith(o.qD.SEPARATOR))return(0,o.gX)(this.separator,t);if(this.units.toLowerCase().startsWith(o.qD.HELM))return o.g9;throw new Error(`Unexpected units ${this.units} .`)}split(t){return this.splitter(t)}getDistanceFunctionName(){if(!this.isFasta())throw new Error("Only FASTA notation is supported");return this.isMsa()?h.Y.HAMMING:(this.alphabet,h.Y.LEVENSHTEIN)}getDistanceFunction(){return h.S[this.getDistanceFunctionName()]()}async checkHelmCompatibility(){if(this.column.tags.has(".isHelmCompatible"))return"true"===this.column.getTag(".isHelmCompatible");const t=(await(0,c.wW)()).getBioLib().getMonomerSymbolsByType("PEPTIDE".toString()),e=new Set(t),n=((0,o.gX)(this.separator),new Set),s=this.column.length,i=this.column.getRawData();for(let t=0;t<s;++t){const s=i[t];if(!(s in n)){n.add(s);const i=this.getSplitted(t);for(const t of i.canonicals)if(!e.has(t))return this.column.setTag(".isHelmCompatible","false"),!1}}return this.column.setTag(".isHelmCompatible","true"),!0}get splitter(){return null===this._splitter&&(this._splitter=this.getSplitter()),this._splitter}toFasta(t){return t===o.qD.FASTA}toSeparator(t){return t===o.qD.SEPARATOR}toHelm(t){return t===o.qD.HELM}convertHelmToFastaSeparator(t,e,n,s){s||(s=this.toFasta(e)?f[o.qD.FASTA]:f[o.qD.SEPARATOR]),n||(n=this.toFasta(e)?"":this.separator);const i=t.startsWith("RNA"),r=this.splitter(t),a=[];for(let t=0;t<r.length;++t){let n=r.getOriginal(t);if(i&&(n=n.replace(u.cT,"")),n===f[o.qD.HELM])a.push(s);else if(this.toFasta(e)&&n.length>1){const t="["+n+"]";a.push(t)}else a.push(n)}return a.join(n)}convert(t,e){const n=this.getJoiner({notation:t,separator:e}),s=this.getNewColumn(t,e);return s.init((t=>{const e=this.getSplitted(t);return n(e)})),s}getRegion(t,e,n){const s=this.getNewColumn(this.notation,this.separator);s.name=n;const i=t??0,r=e??this.maxLength-1,a=this.getJoiner(),h=r-i+1,c=f[this.notation];s.init((t=>{const e=this.getSplitted(t),n=new Array(h);for(let t=0;t<h;++t){const s=i+t;n[t]=s<e.length?e.getOriginal(s):c}return a(new l.Mx(n,c))}));const u=t=>{const e=t.split(",").map((t=>t.trim())),n=new Array(h);for(let t=0;t<h;++t){const s=i+t;n[t]=s<e.length?e[s]:"?"}return n.join(o.YF)},g=this.column.getTag(".positionNames");g&&s.setTag(".positionNames",u(g));const d=this.column.getTag(".positionLabels");return d&&s.setTag(".positionLabels",u(d)),s}get joiner(){return this._joiner||(this._joiner=this.getJoiner()),this._joiner}getJoiner(t){const e=t?t.notation:this.notation,n=t?t.separator:this.separator;let s;const i=this;switch(e){case o.qD.FASTA:s=function(t){return i.joinToFasta(t,i.isHelm())};break;case o.qD.SEPARATOR:if(!n)throw new Error(`Separator is mandatory for notation '${e}'.`);s=function(t){return p(t,n,i.isHelm())};break;case o.qD.HELM:{const t="DNA"===i.alphabet||"RNA"===i.alphabet,e=i.getHelmWrappers();s=function(n){return m(n,e,t)};break}default:throw new Error(`Unexpected notation '${e}'.`)}return s}getConverter(t,e=void 0){if(t===o.qD.SEPARATOR&&!e)throw new Error(`Target separator is not specified for target units '${o.qD.SEPARATOR}'.`);const n=this;if(t===o.qD.FASTA)return function(t){return n.convertToFasta(t)};if(t===o.qD.HELM)return function(t){return n.convertToHelm(t)};if(t===o.qD.SEPARATOR)return function(t){return n.convertToSeparator(t,e)};throw new Error}static forColumn(t){let e=t.temp[g.seqHandler];return e&&e.columnVersion===t.version||(e=t.temp[g.seqHandler]=new d(t)),e}joinToFasta(t,e){const n=new Array(t.length);for(let s=0;s<t.length;++s){const i=t.getOriginal(s);let r=t.getOriginal(s);e&&(r=r.replace(u.cT,"$1")),i===a.yK?r=f[o.qD.FASTA]:i===u.E1?r="":r.length>1&&(r="["+r+"]"),n[s]=r}return n.join("")}convertToFasta(t){const e=this.splitter,n=this.isHelm()?this.splitterAsHelmNucl(t):e(t);return this.joinToFasta(n,this.isHelm())}convertToSeparator(t,e){return p(this.isHelm()?this.splitterAsHelmNucl(t):this.splitter(t),e,this.isHelm())}convertToHelm(t){const e=this.getHelmWrappers(),n=t.startsWith("DNA")||t.startsWith("RNA");return m(this.splitter(t),e,n)}splitterAsHelmNucl(t){const e=this.splitter(t),n=new Array(e.length),s=t.startsWith("DNA"),i=t.startsWith("RNA");for(let t=0;t<e.length;++t){let r=e.getOriginal(t);(s||i)&&(r=r.replace(u.cT,"$1"),r=r===u.E1?null:r),n[t]=r||null}return new l.Mx(n.filter((t=>!!t)),f[o.qD.HELM])}}function p(t,e,n){const s=new Array(t.length);for(let e=0;e<t.length;++e){const i=t.getCanonical(e);let r=t.getOriginal(e);n&&(r=r.replace(u.cT,"$1")),i===a.yK?r=f[o.qD.SEPARATOR]:i===u.E1&&(r=""),s[e]=r}return s.join(e)}function m(t,e,n){const[s,i,r,l]=e,h=new Array(t.length);for(let e=0;e<t.length;++e){const s=t.getCanonical(e);let l=t.getOriginal(e);s===a.yK?l=f[o.qD.HELM]:(n&&(l=l.replace(u.cT,"$1")),l=1===l.length?`${i}${l}${r}`:`${i}[${l}]${r}`),h[e]=l}return`${s}${h.join(".")}${l}`}},384:(t,e,n)=>{"use strict";function s(t={}){const e=function(){if(!t||!t.scoringMatrix||!t.alphabetIndexes)return(t,e)=>t===e?0:1;if(t.scoringMatrix.length!==Object.keys(t.alphabetIndexes).length)throw new Error("Scoring matrix and alphabet indexes should have the same length");const e=t.alphabetIndexes,n=t.scoringMatrix,s=Math.min(...Object.keys(e).map((t=>t.charCodeAt(0))))+1,i=new Float32Array((n.length+s)*(n.length+s));return Object.entries(e).forEach((([t,s])=>{const r=n[s];Object.entries(e).forEach((([e,s])=>{i[t.charCodeAt(0)*n.length+e.charCodeAt(0)]=r[s]}))})),(t,e)=>1-i[t.charCodeAt(0)*n.length+e.charCodeAt(0)]}(),n=t?.threshold??0;return(t,s)=>{let i=0;const r=t.length,o=s.length,a=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(t[n]!==s[n]&&(l+=e(t[n],s[n]),l>a))return 1;return l+=i,l/=Math.max(r,o),l}}n.d(e,{Y:()=>o,S:()=>a});const i=new Uint32Array(65536),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(t){t.HAMMING="Hamming",t.LEVENSHTEIN="Levenshtein",t.NEEDLEMANN_WUNSCH="Needlemann-Wunsch",t.MONOMER_CHEMICAL_DISTANCE="Monomer chemical distance"}(o||(o={}));const a={[o.HAMMING]:s,[o.LEVENSHTEIN]:function(){return(t,e)=>((t,e)=>{if(t.length<e.length){const n=e;e=t,t=n}return 0===e.length?t.length:t.length<=32?((t,e)=>{const n=t.length,s=e.length,r=1<<n-1;let o=-1,a=0,l=n,h=n;for(;h--;)i[t.charCodeAt(h)]|=1<<h;for(h=0;h<s;h++){let t=i[e.charCodeAt(h)];const n=t|a;t|=(t&o)+o^o,a|=~(t|o),o&=t,a&r&&l++,o&r&&l--,a=a<<1|1,o=o<<1|~(n|a),a&=n}for(h=n;h--;)i[t.charCodeAt(h)]=0;return l})(t,e):((t,e)=>{const n=e.length,s=t.length,r=[],o=[],a=Math.ceil(n/32),l=Math.ceil(s/32);for(let t=0;t<a;t++)o[t]=-1,r[t]=0;let h=0;for(;h<l-1;h++){let a=0,l=-1;const c=32*h,u=Math.min(32,s)+c;for(let e=c;e<u;e++)i[t.charCodeAt(e)]|=1<<e;for(let t=0;t<n;t++){const n=i[e.charCodeAt(t)],s=o[t/32|0]>>>t&1,h=r[t/32|0]>>>t&1,c=n|a,u=((n|h)&l)+l^l|n|h;let g=a|~(u|l),f=l&u;g>>>31^s&&(o[t/32|0]^=1<<t),f>>>31^h&&(r[t/32|0]^=1<<t),g=g<<1|s,f=f<<1|h,l=f|~(c|g),a=g&c}for(let e=c;e<u;e++)i[t.charCodeAt(e)]=0}let c=0,u=-1;const g=32*h,f=Math.min(32,s-g)+g;for(let e=g;e<f;e++)i[t.charCodeAt(e)]|=1<<e;let d=s;for(let t=0;t<n;t++){const n=i[e.charCodeAt(t)],a=o[t/32|0]>>>t&1,l=r[t/32|0]>>>t&1,h=n|c,g=((n|l)&u)+u^u|n|l;let f=c|~(g|u),p=u&g;d+=f>>>s-1&1,d-=p>>>s-1&1,f>>>31^a&&(o[t/32|0]^=1<<t),p>>>31^l&&(r[t/32|0]^=1<<t),f=f<<1|a,p=p<<1|l,u=p|~(h|f),c=f&h}for(let e=g;e<f;e++)i[t.charCodeAt(e)]=0;return d})(t,e)})(t,e)/Math.max(t.length,e.length)},[o.NEEDLEMANN_WUNSCH]:function(t){const e=new Uint16Array(65536),{gapOpen:n,gapExtend:s,scoringMatrix:i,alphabetIndexes:o}={...r,...t};Object.entries(o).forEach((([t,n])=>e[t.charCodeAt(0)]=n));const a=[new Float32Array(1e4),new Float32Array(1e4)];return(t,r)=>{const o=new Array(t.length+1).fill(!1),l=new Array(t.length+1).fill(!1);let h=0,c=1;for(let e=1;e<t.length+1;e++)a[0][e]=-n-(e-1)*s,a[1][e]=0;a[0][0]=0;for(let u=1;u<r.length+1;u++){a[c][0]=-n-(u-1)*s;for(let g=1;g<t.length+1;g++){const f=a[h][g-1]+i[e[t.charCodeAt(g-1)]][e[r.charCodeAt(u-1)]],d=a[h][g]-(o[g]?s:n),p=a[c][g-1]-(l[g-1]?s:n);a[c][g]=Math.max(f,p,d),a[c][g]===f?(o[g]=!1,l[g]=!1):a[c][g]===p?(o[g]=!1,l[g]=!0):(o[g]=!0,l[g]=!1)}h=c,c=(c+1)%2}const u=Math.max(t.length,r.length);return(u-a[h][t.length])/u}},[o.MONOMER_CHEMICAL_DISTANCE]:s}},24:(t,e,n)=>{"use strict";function s(t){var e;return"string"==typeof t||t instanceof String?t:("object"==typeof t||t instanceof Object)&&"$thrownJsError"in t?s(t.$thrownJsError):t instanceof Error?null!==(e=t.stack)&&void 0!==e?e:t.message:t.toString()}n.d(e,{v:()=>s})},8:function(t,e,n){var s;!function(e,i){var r={};!function(t){"use strict";t.__esModule=!0,t.digestLength=32,t.blockSize=64;var e=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function n(t,n,s,i,r){for(var o,a,l,h,c,u,g,f,d,p,m,C,y;r>=64;){for(o=n[0],a=n[1],l=n[2],h=n[3],c=n[4],u=n[5],g=n[6],f=n[7],p=0;p<16;p++)m=i+4*p,t[p]=(255&s[m])<<24|(255&s[m+1])<<16|(255&s[m+2])<<8|255&s[m+3];for(p=16;p<64;p++)C=((d=t[p-2])>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,y=((d=t[p-15])>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,t[p]=(C+t[p-7]|0)+(y+t[p-16]|0);for(p=0;p<64;p++)C=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&u^~c&g)|0)+(f+(e[p]+t[p]|0)|0)|0,y=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&a^o&l^a&l)|0,f=g,g=u,u=c,c=h+C|0,h=l,l=a,a=o,o=C+y|0;n[0]+=o,n[1]+=a,n[2]+=l,n[3]+=h,n[4]+=c,n[5]+=u,n[6]+=g,n[7]+=f,i+=64,r-=64}return i}var s=function(){function e(){this.digestLength=t.digestLength,this.blockSize=t.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return e.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},e.prototype.clean=function(){for(var t=0;t<this.buffer.length;t++)this.buffer[t]=0;for(t=0;t<this.temp.length;t++)this.temp[t]=0;this.reset()},e.prototype.update=function(t,e){if(void 0===e&&(e=t.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var s=0;if(this.bytesHashed+=e,this.bufferLength>0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=t[s++],e--;64===this.bufferLength&&(n(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(s=n(this.temp,this.state,t,s,e),e%=64);e>0;)this.buffer[this.bufferLength++]=t[s++],e--;return this},e.prototype.finish=function(t){if(!this.finished){var e=this.bytesHashed,s=this.bufferLength,i=e/536870912|0,r=e<<3,o=e%64<56?64:128;this.buffer[s]=128;for(var a=s+1;a<o-8;a++)this.buffer[a]=0;this.buffer[o-8]=i>>>24&255,this.buffer[o-7]=i>>>16&255,this.buffer[o-6]=i>>>8&255,this.buffer[o-5]=i>>>0&255,this.buffer[o-4]=r>>>24&255,this.buffer[o-3]=r>>>16&255,this.buffer[o-2]=r>>>8&255,this.buffer[o-1]=r>>>0&255,n(this.temp,this.state,this.buffer,0,o),this.finished=!0}for(a=0;a<8;a++)t[4*a+0]=this.state[a]>>>24&255,t[4*a+1]=this.state[a]>>>16&255,t[4*a+2]=this.state[a]>>>8&255,t[4*a+3]=this.state[a]>>>0&255;return this},e.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},e.prototype._saveState=function(t){for(var e=0;e<this.state.length;e++)t[e]=this.state[e]},e.prototype._restoreState=function(t,e){for(var n=0;n<this.state.length;n++)this.state[n]=t[n];this.bytesHashed=e,this.finished=!1,this.bufferLength=0},e}();t.Hash=s;var i=function(){function t(t){this.inner=new s,this.outer=new s,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var e=new Uint8Array(this.blockSize);if(t.length>this.blockSize)(new s).update(t).finish(e).clean();else for(var n=0;n<t.length;n++)e[n]=t[n];for(n=0;n<e.length;n++)e[n]^=54;for(this.inner.update(e),n=0;n<e.length;n++)e[n]^=106;for(this.outer.update(e),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate),n=0;n<e.length;n++)e[n]=0}return t.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},t.prototype.clean=function(){for(var t=0;t<this.istate.length;t++)this.ostate[t]=this.istate[t]=0;this.inner.clean(),this.outer.clean()},t.prototype.update=function(t){return this.inner.update(t),this},t.prototype.finish=function(t){return this.outer.finished?this.outer.finish(t):(this.inner.finish(t),this.outer.update(t,this.digestLength).finish(t)),this},t.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},t}();function r(t){var e=(new s).update(t),n=e.digest();return e.clean(),n}function o(t,e){var n=new i(t).update(e),s=n.digest();return n.clean(),s}function a(t,e,n,s){var i=s[0];if(0===i)throw new Error("hkdf: cannot expand more");e.reset(),i>1&&e.update(t),n&&e.update(n),e.update(s),e.finish(t),s[0]++}t.HMAC=i,t.hash=r,t.default=r,t.hmac=o;var l=new Uint8Array(t.digestLength);t.hkdf=function(t,e,n,s){void 0===e&&(e=l),void 0===s&&(s=32);for(var r=new Uint8Array([1]),h=o(e,t),c=new i(h),u=new Uint8Array(c.digestLength),g=u.length,f=new Uint8Array(s),d=0;d<s;d++)g===u.length&&(a(u,c,n,r),g=0),f[d]=u[g++];return c.clean(),u.fill(0),r.fill(0),f},t.pbkdf2=function(t,e,n,s){for(var r=new i(t),o=r.digestLength,a=new Uint8Array(4),l=new Uint8Array(o),h=new Uint8Array(o),c=new Uint8Array(s),u=0;u*o<s;u++){var g=u+1;a[0]=g>>>24&255,a[1]=g>>>16&255,a[2]=g>>>8&255,a[3]=g>>>0&255,r.reset(),r.update(e),r.update(a),r.finish(h);for(var f=0;f<o;f++)l[f]=h[f];for(f=2;f<=n;f++){r.reset(),r.update(h).finish(h);for(var d=0;d<o;d++)l[d]^=h[d]}for(f=0;f<o&&u*o+f<s;f++)c[u*o+f]=l[f]}for(u=0;u<o;u++)l[u]=h[u]=0;for(u=0;u<4;u++)a[u]=0;return r.clean(),c}}(r);var o=r.default;for(var a in r)o[a]=r[a];"object"==typeof t.exports?t.exports=o:void 0===(s=function(){return o}.call(r,n,r,t))||(t.exports=s)}()},52:(t,e,n)=>{"use strict";n.d(e,{S:()=>l,w:()=>h});var s=n(200),i=n(848),r=n.n(i),o=n(788),a=n(48);class l{constructor(t,e){this.gridCol=t,this.col=e,this.monomerCharWidth=7,this.leftPadding=5,this.monomerTextSizeMap={},this.subs=[],this.grid=this.gridCol?this.gridCol.grid:null,this.reset(),this.grid&&(this.subs.push(this.col.dataFrame.onDataChanged.subscribe((()=>{try{this.reset()}catch(t){console.error(t)}}))),this.subs.push(s.events.onViewRemoved.subscribe((t=>{try{this.grid&&this.grid.view?.id===t.id&&this.destroy()}catch(t){console.error(t)}})))),this.monomerLib=(0,a.getMonomerLib)(),this.subs.push(this.monomerLib.onChanged.subscribe(this.monomerLibOnChanged.bind(this)))}reset(){this._allPartsList=new Array(this.col.length).fill(null),this._lengthsList=new Array(this.col.length).fill(null),this._editorList=new Array(this.col.length).fill(null)}destroy(){for(const t of this.subs)t.unsubscribe()}skipCell(t){this._allPartsList[t]=[],this._lengthsList[t]=[]}getCellAllPartsLengths(t){const[e,n]=this.getCellMonomerLengthsForSeq(t),s=new Array(n.length+1);s[0]=this.leftPadding;for(let t=1;t<s.length;t++)s[t]=s[t-1]+n[t-1];return[e,n,s]}getCellMonomerLengthsForSeq(t){let e=this._allPartsList[t];if(null===e){const n=this.col.get(t);e=this._allPartsList[t]=h(n)}let n=this._lengthsList[t];if(null===n){n=this._lengthsList[t]=new Array(e.length);for(const[t,s]of r().enumerate(e)){const e=t.length*this.monomerCharWidth;n[s]=e}}return[e,n]}getMonomer(t){let e=null;if(t.polymerType)e=this.monomerLib.getMonomer(t.polymerType,t.symbol);else for(const n of this.monomerLib.getPolymerTypes())if(e=this.monomerLib.getMonomer(n,t.symbol),e)break;return e}monomerLibOnChanged(t){this.reset(),this.grid&&this.grid.invalidate()}setEditor(t,e){this._editorList[t]=e}getEditor(t){return this._editorList[t]}}function h(t){const e=t?(0,o.a6)(t):[];return t?(0,o.kR)(e,t):[]}},48:(t,e,n)=>{"use strict";n.d(e,{getMonomerLib:()=>a}),n(200),n(304);var s,i,r=n(888);(n(592),n(736),n(688),n(848),n(502)).uw,function(t){t.maxMonomerLength=".mm.cellRenderer.maxMonomerLength"}(s||(s={})),function(t){t.MSA="MSA",t.classic="classic"}(i||(i={})),n(24),n(788),n(52),r.GridCellRenderer,n(980);let o=null;function a(){return o}new r.Package},788:(t,e,n)=>{"use strict";n.d(e,{__:()=>h,a6:()=>l,aY:()=>o,kR:()=>a});const s=/\{(\*\.)+/g,i=/\.(\*\.)+/g,r=/(\.\*)+\}/g;function o(t){return t.replaceAll(s,"{").replaceAll(i,".").replaceAll(r,"}").replace("{*}","{}")}function a(t,e){const n=[];for(let s=0;s<(t??[]).length;++s){const i=e.indexOf(t[s]),r=e.slice(0,i);n.push(r),n.push(t[s]),e=e.substring(i+t[s].length)}return n.push(e),n}function l(t){t=g(t,"$")[0];const e=[];if(!scil.Utils.isNullOrEmpty(t)){const n=g(t,"|");for(let s=0;s<n.length;++s){let i=(t=f(n[s]).str).indexOf("{");i=(t=t.substring(i+1)).indexOf("}");const r=g(t=t.substring(0,i),".");for(const t of r)if(t&&""!==t)if(t.startsWith("[")&&t.includes("]")){const n=c(t,1,"[","]"),s=t.substring(1,n);e.push(s);const i=t.substring(n+1);r.push(i)}else if(t.includes("[")&&t.endsWith("]")){const n=u(t,t.length-2,"[","]"),s=t.substring(n+1,t.length-1);e.push(s);const i=t.substring(0,n);r.push(i)}else if(t.includes("(")&&t.includes(")")){const e=t.substring(0,t.indexOf("(")),n=t.substring(t.lastIndexOf(")")+1),s=[e,t.substring(e.length+1,t.length-n.length-1),n];for(const t of s)r.push(t)}else e.push(t)}}return e}function h(t){const e=Object.keys(org.helm.webeditor.monomerTypeList()),n=[],s=[];for(let t=0;t<e.length;t++)n.push(new scil.helm.Monomers.getMonomerSet(e[t])),Object.keys(n[t]).forEach((e=>{s.push(n[t][e].id)}));return new Set(t.filter((t=>!s.includes(t))))}function c(t,e,n,s){let i=e,r=0;for(;i<t.length;){if(t[i]===n&&r++,t[i]===s){if(0===r)return i;r--}i++}return-1}function u(t,e,n,s){let i=e,r=0;for(;i>=0;){if(t[i]===s&&r++,t[i]===n){if(0===r)return i;r--}i--}return-1}function g(t,e){const n=[];let s="",i=0,r=0,o=0,a=0;for(let l=0;l<t.length;++l){let h=t.substring(l,l+1);if(h==e&&0==r&&0==i&&0==o&&0==a)n.push(s),s="";else{if(s+=h,a>0&&"\\"==h&&l+1<t.length){++l;const e=t.substring(l,l+1);s+=e,h+=e}'"'==h?l>0&&"\\"==t.substring(l-1,l)||(a=0==a?1:0):"["==h?++r:"]"==h?--r:"("==h?++i:")"==h?--i:"{"==h?++o:"}"==h&&--o}}return n.push(s),n}function f(t){const e=d(t,'"');if(null!=e.tag)return e;const n=d(t,"'");return{tag:e.tag,repeat:n.tag,str:n.str}}function d(t,e){let n=null;if(scil.Utils.endswith(t,e)){let s=t.length-1;for(;s>0&&(s=t.lastIndexOf(e,s-1),!(s<=0||"\\"!=t.substring(s-1,s))););s>0&&s<t.length-1&&(n=t.substring(s+1,t.length-1),t=t.substring(0,s))}return null!=n&&(n=function(t){return scil.Utils.isNullOrEmpty(t)?t:t.replace(/[\\]./g,(function(t){switch(t){case"\\r":return"\r";case"\\n":return"\n";case"\\t":return"\t";default:return t.substring(1)}}))}(n.replace(new RegExp("\\"+e,"g"),e))),{tag:n,str:t}}},980:(t,e,n)=>{"use strict";n.d(e,{C:()=>l});var s=n(304),i=(n(888),n(592)),r=n.n(i),o=(n(688),n(736)),a=n(788);function l(t,e){const n=e.isHelm()?t:e.getConverter(o.qD.HELM)(t),i=(0,a.aY)(n),l=s.div([],{style:{width:"0",height:"0"}});document.documentElement.appendChild(l);try{const t=new JSDraw2.Editor(l,{viewonly:!0});t.setHelm(i);const e=t.getFormula(!0),n=Math.round(100*t.getMolWeight())/100,s=Math.round(100*t.getExtinctionCoefficient(!0))/100;return{formula:e.replace(/<sub>/g,"").replace(/<\/sub>/g,""),"molecular weight":n,"extinction coefficient":s}}finally{r()(l).empty(),l.remove()}}},592:t=>{"use strict";t.exports=$},888:t=>{"use strict";t.exports=DG},200:t=>{"use strict";t.exports=grok},304:t=>{"use strict";t.exports=ui},848:t=>{"use strict";t.exports=wu}},e={};function n(s){var i=e[s];if(void 0!==i)return i.exports;var r=e[s]={exports:{}};return t[s].call(r.exports,r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var s in e)n.o(e,s)&&!n.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};(()=>{"use strict";n.r(s),n.d(s,{_package:()=>rt,test:()=>ot,tests:()=>g});var t=n(888),e=n(200);n(8);const i=t.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,,,,,,,,,,,,,,,,,,,,,');i.columns.add(t.Column.fromList(t.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))));var r=function(t,e,n,s){return new(n||(n=Promise))((function(i,r){function o(t){try{l(s.next(t))}catch(t){r(t)}}function a(t){try{l(s.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,a)}l((s=s.apply(t,e||[])).next())}))};const o=3e4,a=108e5,l=console.log.bind(console),h=console.info.bind(console),c=console.warn.bind(console),u=console.error.bind(console),g={},f="Auto Tests",d="Demo",p="Detectors",m="Core",C={};let y;var A;!function(t){t.notNull=function(t,e){if(null==t)throw new Error(`${null==e?"Value":e} not defined`)}}(A||(A={}));class x{constructor(t,e){this.catchUnhandled=!0,this.report=!1,void 0!==t&&(this.catchUnhandled=t),void 0!==e&&(this.report=e)}}class T{constructor(t,e,n,s){var i;this.category=t,this.name=e,null!=s||(s={}),null!==(i=s.timeout)&&void 0!==i||(s.timeout=o),this.options=s,this.test=()=>r(this,void 0,void 0,(function*(){return new Promise(((t,e)=>r(this,void 0,void 0,(function*(){let s="";try{s=yield n()}catch(t){e(t)}t(s)}))))}))}}function b(t,e,n){null==g[y]&&(g[y]={}),null==g[y].tests&&(g[y].tests=[]),g[y].tests.push(new T(y,t,e,n))}function E(t,e=!0,n){if(n=n?`${n}, `:"",t!==e)throw new Error(`${n}Expected "${e}", got "${t}"`)}function _(t,e,n=.001,s){if(t===Number.POSITIVE_INFINITY&&e===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY&&e===Number.NEGATIVE_INFINITY||t===Number.NaN&&e===Number.NaN||isNaN(t)&&isNaN(e))return;const i=Math.abs(t-e)<n;if(E(i,!0,`${null!=s?s:""} (tolerance = ${n})`),!i)throw new Error(`Expected ${e}, got ${t} (tolerance = ${n})`)}function w(t,e){for(const[n,s]of Object.entries(e)){if(!t.hasOwnProperty(n))throw new Error(`Expected property "${n}" not found`);const e=t[n];if(e instanceof Array&&s instanceof Array)N(e,s);else if(e instanceof Object&&s instanceof Object)w(e,s);else if(Number.isFinite(e)&&Number.isFinite(s))_(e,s);else if(e!=s)throw new Error(`Expected (${s}) for key '${n}', got (${e})`)}}function N(t,e){const n=t.length,s=e.length;if(n!=s)throw new Error(`Arrays are of different length: actual array length is ${n} and expected array length is ${s}`);for(let s=0;s<n;s++)if(t[s]instanceof Array&&e[s]instanceof Array)N(t[s],e[s]);else if(t[s]instanceof Object&&e[s]instanceof Object)w(t[s],e[s]);else if(t[s]!=e[s])throw new Error(`Expected ${e[s]} at position ${s}, got ${t[s]}`)}function O(t,e,n){var s;y=t,e(),g[y]&&(g[y].clear=null===(s=null==n?void 0:n.clear)||void 0===s||s,g[y].timeout=null==n?void 0:n.timeout)}function I(t){null==g[y]&&(g[y]={}),g[y].before=t}function S(t){null==g[y]&&(g[y]={}),g[y].after=t}function L(t,e){return t.replace(new RegExp(e.name,"gi"),e.nqName)}function M(e){return`${e.toString()}\n${e.stack?t.Logger.translateStackTrace(e.stack):""}`}function v(n,s,i,h,c,u){var g,f,d,p,m,C;return r(this,void 0,void 0,(function*(){let r;i.length=0;let y="package";const A=null!=s&&n.name.toLowerCase()!==s.toLowerCase(),x=(null===(g=n.options)||void 0===g?void 0:g.skipReason)||A,T=A?"skipped":null===(f=n.options)||void 0===f?void 0:f.skipReason;x||l(`Started ${n.category} ${n.name}`);const b=Date.now();try{if(x)r={success:!0,result:T,ms:0,skipped:!0};else{let e=(null===(d=n.options)||void 0===d?void 0:d.timeout)===o&&h?h:null===(p=n.options)||void 0===p?void 0:p.timeout;e=t.Test.isInBenchmark&&e===o?a:e,r={success:!0,result:null!==(m=yield R(n.test,e))&&void 0!==m?m:"OK",ms:0,skipped:!1}}}catch(t){r={success:!1,result:M(t),ms:0,skipped:!1}}if((null===(C=n.options)||void 0===C?void 0:C.isAggregated)&&r.result.constructor===t.DataFrame){const t=r.result.col("success");if(y="core",t&&(r.success=t.stats.sum===t.length),!u){const t=r.result;t.columns.remove("stack"),t.rows.removeWhere((t=>t.get("success"))),r.result=t}r.result=r.result.toCsv()}if(r.logs=i.join("\n"),r.ms=Date.now()-b,x||l(`Finished ${n.category} ${n.name} for ${r.ms} ms`),r.category=n.category,r.name=n.name,!A){let t={success:r.success,result:r.result,ms:r.ms,skipped:r.skipped,type:y,packageName:c,category:n.category,test:n.name,logs:r.logs};if(r.result.constructor==Object){const e=Object.keys(r.result).reduce(((t,e)=>Object.assign(Object.assign({},t),{["result."+e]:r.result[e]})),{});t=Object.assign(Object.assign({},t),e)}e.log.usage(`${c}: ${n.category}: ${n.name}`,t,`test-${y} ${c}: ${n.category}: ${n.name}`)}return r}))}function P(t){return r(this,void 0,void 0,(function*(){yield new Promise((e=>setTimeout(e,t)))}))}function R(t,e){return r(this,void 0,void 0,(function*(){let n=null;const s=new Promise(((t,s)=>{n=setTimeout((()=>{s("EXECUTION TIMEOUT")}),e)}));try{return yield Promise.race([t(),s])}finally{n&&clearTimeout(n)}}))}t.DataFrame.fromColumns([t.Column.fromStrings("col",["val1","val2","val3"])]);var D=n(788);O("Helm",(()=>{const t=[["L-hArg(Et,Et)","E","F","G","C","E"],["L-hArg(Et,Et)","L-hArg(Et,Et)","E","F","G"],["dhp","m1A","p","r","T","p","r","T","p","r","G","p"],["r","mo6pur","p","r","T","p","r","T","p","r","G","p"],["afhna","mo6pur","36SS","r","T","p"]],e=["comples-monomer","complex-monomer+side-chain","complex-monomer+side-chain-RNA","complex-side-chain","complex+side-chain+linker"];b("parseHelm",(async()=>{const t=[["meI","hHis","Aca","N","T","dK","Thr_PO3H2","D-Tyr_Et","Aze","dV","E","Phe_4Me"],["A","C","T","G","W","E","Q"],["R","U","P","T","A"],["A","*","G","C"]],e=["PEPTIDE1{meI.hHis.Aca.N.T.dK.Thr_PO3H2.Aca.D-Tyr_Et.Aze.dV.E.N.dV.Phe_4Me}$$$","PEPTIDE1{A.C.T.G.C.T.W.G.T.W.E.C.W.C.Q.W}|PEPTIDE2{A.C.T.G.C.T.W.G.T.W.E.Q}$PEPTIDE1,PEPTIDE1,5:R3-14:R3|PEPTIDE2,PEPTIDE1,2:R3-12:R3$$$","RNA1{R(U)P.R(T)P}|RNA2{P.R(A)P.R(A)}$RNA1,RNA2,2:pair-6:pair|RNA1,RNA2,5:pair-3:pair$$$","PEPTIDE1{A.*.G.C}$$$$V2.0"];for(let n=0;n<e.length;++n){const s=new Set((0,D.a6)(e[n])),i=Array.from(s);E(JSON.stringify(i),JSON.stringify(t[n]))}})),["PEPTIDE1{[L-hArg(Et,Et)].E.F.G}|PEPTIDE2{C.E}$PEPTIDE1,PEPTIDE2,2:R3-1:R1$$$V2.0","PEPTIDE1{[L-hArg(Et,Et)]([L-hArg(Et,Et)]).E.F.G}$$$$","RNA1{[dhp]([m1A])p.r(T)p.r(T)p.r(G)p}$$$$V2.0","RNA1{r([mo6pur])p.r(T)p.r(T)p.r(G)p}$$$$V2.0","RNA1{[afhna]([mo6pur])[36SS].r(T)p}$$$$V2.0"].forEach(((n,s)=>{b(e[s],(async()=>{const e=(0,D.a6)(n);e.sort();const i=t[s];i.sort(),N(e,i)}))}))}));var H=n(460);const $="Libraries",F={explicit:["HELMCoreLibrary.json"],exclude:[]};let k=Promise.resolve();async function B(){let t;return k=k.then((async()=>{const n=await e.dapi.userDataStorage.getValue($,"Settings",!0);t=n?JSON.parse(n):{exclude:[],explicit:[]},t.exclude=t.exclude instanceof Array?t.exclude:[],t.explicit=t.explicit instanceof Array?t.explicit:[],console.debug(`Bio: getUserLibSettings()\n${JSON.stringify(t,void 0,2)}`)})),await k,t}async function U(t){k=k.then((async()=>{console.debug(`Bio: setUserLibSettings()\n${JSON.stringify(t,void 0,2)}`),await e.dapi.userDataStorage.postValue($,"Settings",JSON.stringify(t),!0)})),await k}async function V(){await U(F)}O("findMonomers",(()=>{let t,e;I((async()=>{t=await(0,H.wW)(),e=await B(),await V(),await t.loadLibraries(!0)})),S((async()=>{await U(e),await t.loadLibraries(!0)}));const n={withoutMissed:{test:"PEPTIDE1{meI.hHis.Aca.N.T.dE.Thr_PO3H2.Aca.D-Tyr_Et}$$$$",tgt:new Set},withMissed:{test:"PEPTIDE1{meI.missed2.Aca.N.T.dE.Thr_PO3H2.Aca.D-Tyr_Et}$$$$",tgt:new Set(["missed2"])}};for(const[t,e]of Object.entries(n))b(t,(async()=>{s(e.test,e.tgt)}));function s(t,e){const n=(0,D.a6)(t);w((0,D.__)(n),e)}}));var q,G=n(592),W=n.n(G),Y=n(736);O("renderers",(()=>{b("missedInLib",(async()=>{await async function(){const n=await e.dapi.files.readCsv("System:AppData/Helm/tests/sample_HELM-missedInLib.csv"),s=n.getCol("HELM"),i=e.shell.addTableView(n);await function(t,e="Timeout exceeded",n=500,s=50){return r(this,void 0,void 0,(function*(){return new Promise(((i,r)=>{setTimeout((()=>{clearInterval(o),r(new Error(e))}),n);const o=setInterval((()=>{t()&&(clearInterval(o),i())}),s)}))}))}((()=>W()(i.root).find(".d4-grid canvas").length>0),"Table view canvas not found",100),E(s.semType,t.SEMTYPE.MACROMOLECULE),E(s.getTag(t.TAGS.UNITS),Y.qD.HELM),E(s.getTag(t.TAGS.CELL_RENDERER),"helm");const o=s.getTag(".cell-renderer.render.error");if(o){const t=JSON.parse(o),e=new Error(t.message);throw e.stack=t.stack,e}}()}))})),function(t){t.TYPE="V2000",t[t.NUM_OF_HEADER_LINES=3]="NUM_OF_HEADER_LINES",t[t.NUM_OF_COUNTS_DIGITS=3]="NUM_OF_COUNTS_DIGITS",t[t.ATOM_TYPE_COL=4]="ATOM_TYPE_COL",t[t.FIRST_BONDED_ATOM_COL=1]="FIRST_BONDED_ATOM_COL",t[t.BOND_TYPE_COL=3]="BOND_TYPE_COL",t[t.RGP_SHIFT=8]="RGP_SHIFT",t[t.MAX_ATOM_COUNT=999]="MAX_ATOM_COUNT",t.RGP_LINE_START="M RGP",t.ATOM_ALIAS_LINE_START="A ",t.END="M END"}(q||(q={}));class K{constructor(t){this.init(t)}init(t){this.fileContent=t.replace(/\r/g,""),this._atomCount=void 0,this._atomTypes=void 0,this._bondCount=void 0,this._bondTypes=void 0,this.xyzAtomCoordinates=void 0,this._pairsOfBondedAtoms=void 0}get atomCount(){return void 0===this._atomCount&&this.setAtomAndBondCounts(),this._atomCount}get bondCount(){return void 0===this._bondCount&&this.setAtomAndBondCounts(),this._bondCount}get x(){var t;return null!==(t=this.xyzAtomCoordinates)&&void 0!==t||(this.xyzAtomCoordinates=this.parseAtomCoordinates()),this.xyzAtomCoordinates.x}get y(){var t;return null!==(t=this.xyzAtomCoordinates)&&void 0!==t||(this.xyzAtomCoordinates=this.parseAtomCoordinates()),this.xyzAtomCoordinates.y}get z(){var t;return null!==(t=this.xyzAtomCoordinates)&&void 0!==t||(this.xyzAtomCoordinates=this.parseAtomCoordinates()),this.xyzAtomCoordinates.z}get atomTypes(){var t;return null!==(t=this._atomTypes)&&void 0!==t||(this._atomTypes=this.parseAtomTypes()),this._atomTypes}get pairsOfBondedAtoms(){var t;return null!==(t=this._pairsOfBondedAtoms)&&void 0!==t||(this._pairsOfBondedAtoms=this.parseBondedAtomPairs()),this._pairsOfBondedAtoms}get bondTypes(){var t;return null!==(t=this._bondTypes)&&void 0!==t||(this._bondTypes=this.parseBondTypes()),this._bondTypes}setAtomAndBondCounts(){const{atomCount:t,bondCount:e}=this.parseAtomAndBondCounts();this._atomCount=t,this._bondCount=e}getNextColumnIdx(t){for(;!this.isWhitespace(t);)++t;for(;this.isWhitespace(t);)++t;return t}shiftIdxToSpecifiedColumn(t,e){let n=t;const s=this.isWhitespace(n)?e:e-1;for(let t=0;t<s;t++)n=this.getNextColumnIdx(n);return n}parseAtomTypes(){const t=this.atomCount,e=new Array(t);let n=this.getAtomBlockIdx();for(let s=0;s<t;s++)n=this.shiftIdxToAtomType(n),e[s]=this.parseAtomType(n),n=this.getNextLineIdx(n);return e}parseAtomCoordinates(){const t=new Float32Array(this.atomCount),e=new Float32Array(this.atomCount),n=new Float32Array(this.atomCount);let s=this.getAtomBlockIdx();for(let i=0;i<this.atomCount;i++){s=this.shiftIdxToXColumn(s);for(const r of[t,e,n])r[i]=this.parseFloatValue(s),s=this.getNextColumnIdx(s);s=this.getNextLineIdx(s)}return{x:t,y:e,z:n}}parseBondedAtomPairs(){const t=new Array(this.bondCount);let e=this.getBondBlockIdx();for(let n=0;n<this.bondCount;n++){e=this.shiftIdxToBondedAtomsPair(e);const s=new Uint16Array(2);s[0]=this.parseIntValue(e),e=this.getNextColumnIdx(e),s[1]=this.parseIntValue(e),t[n]=s,e=this.getNextLineIdx(e)}return t}parseBondTypes(){const t=this.bondCount,e=new Uint16Array(t);let n=this.getBondBlockIdx();for(let s=0;s<t;s++)n=this.shiftIdxToBondType(n),e[s]=this.parseIntValue(n),n=this.getNextLineIdx(n);return e}isWhitespace(t){const e=this.fileContent[t];return" "===e||"\t"===e}getNextLineIdx(t){return"\n"!==this.fileContent[t]?this.fileContent.indexOf("\n",t)+1:t+1}parseFloatValue(t){return this.parseNumericValue(parseFloat,t)}parseIntValue(t){return this.parseNumericValue(parseInt,t)}parseNumericValue(t,e){let n=e+1;for(;!this.isWhitespace(n);)++n;return t(this.fileContent.substring(e,n))}}class j extends K{constructor(t){super(t),this.init(t)}init(t){super.init(t)}parseAtomType(t){let e=t,n=e;return this.isQuote(e)?(n=this.getNextIdenticalChar(e),e++):n=this.fileContent.indexOf(" ",n),this.fileContent.substring(e,n)}isQuote(t){const e=this.fileContent[t].charCodeAt(0);return 39===e||34===e}getNextIdenticalChar(t){const e=this.fileContent[t];return e?this.fileContent.indexOf(e,t+1):-1}isQuery(){return this.isQueryOrFragment(((t,e)=>{return 39===t||34===t||76===t&&!((n=this.fileContent.charCodeAt(e+1))>64&&n<91||n>96&&n<123);var n}))}isFragment(){return this.isQueryOrFragment((t=>82===t||42===t))}isQueryOrFragment(t){const e=this.atomCount;let n=this.getAtomBlockIdx();for(let s=0;s<e;s++){if(n=this.shiftIdxToAtomType(n),t(this.fileContent.charCodeAt(n),n))return!0;n=this.getNextLineIdx(n)}return!1}}class z extends j{constructor(t){super(t)}getAtomLines(){const t=this.getAtomBlockIdx(),e=this.getBondBlockIdx();return this.fileContent.substring(t,e).split("\n").slice(0,this.atomCount)}getBondLines(){const t=this.getBondBlockIdx();return this.fileContent.substring(t).split("\n").slice(0,this.bondCount)}getRGroupIdToAtomicIdxMap(){const t=new Map,e=this.fileContent.split("\n");e.filter((t=>t.startsWith(q.RGP_LINE_START))).forEach((e=>{const n=this.getAtomIdxToRgpIdxList(e);for(const[e,s]of n){if(t.has(e))throw new Error(`R group ${e} is already in the map`);t.set(e,s)}}));const n=e.map(((t,e)=>{if(t.startsWith(q.ATOM_ALIAS_LINE_START))return e})).filter((t=>void 0!==t)),s=n.map((t=>e[t])),i=n.map((t=>e[t+1]));s.forEach(((e,n)=>{const s=parseInt(e.split(/\s+/)[1])-1,r=parseInt(i[n].substring(1));if(t.has(r))throw new Error(`R group ${r} is already in the map`);t.set(r,s)}));const r=this.getRGroupAtomicIndices().filter((e=>!Array.from(t.values()).includes(e)));if(0!==r.length)throw new Error(`Unaccounted R group indices: ${r}`);return t}getAtomIdxToRgpIdxList(t){const e=t.split(/\s+/).filter((t=>t)).slice(3).map((t=>parseInt(t))),n=new Array(e.length/2);for(let t=0;t<e.length;t+=2)n[t/2]=[e[t+1],e[t]-1];return n}getRGroupAtomicIndices(){return this.atomTypes.map(((t,e)=>{if(t.includes("R#"))return e})).filter((t=>void 0!==t))}static isValidMolfile(t){return-1!==t.indexOf(q.TYPE)&&-1!==t.indexOf(q.END)}shiftIdxToAtomType(t){return this.shiftIdxToSpecifiedColumn(t,q.ATOM_TYPE_COL)}getCountsLineIdx(){let t=0;for(let e=0;e<q.NUM_OF_HEADER_LINES;++e)t=this.getNextLineIdx(t);return t}getAtomBlockIdx(){let t=this.getCountsLineIdx();return t=this.getNextLineIdx(t),t}shiftIdxToXColumn(t){return this.getNextColumnIdx(t)}shiftIdxToBondedAtomsPair(t){return this.shiftIdxToSpecifiedColumn(t,q.FIRST_BONDED_ATOM_COL)}shiftIdxToBondType(t){return this.shiftIdxToSpecifiedColumn(t,q.BOND_TYPE_COL)}getBondBlockIdx(){let t=this.getAtomBlockIdx();for(let e=0;e<this.atomCount;e++)t=this.getNextLineIdx(t);return t}parseAtomAndBondCounts(){let t=this.getCountsLineIdx(),e=t+q.NUM_OF_COUNTS_DIGITS;const n=parseInt(this.fileContent.substring(t,e));return t=e,e+=q.NUM_OF_COUNTS_DIGITS,{atomCount:n,bondCount:parseInt(this.fileContent.substring(t,e))}}}class Q extends j{constructor(t){super(t),this.init(t)}getAtomLines(){const t=this.getAtomBlockIdx(),e=this.getBondBlockIdx();return this.fileContent.substring(t,e).split("\n").slice(0,this.atomCount)}getBondLines(){const t=this.getBondBlockIdx();return this.fileContent.substring(t).split("\n").slice(0,this.bondCount)}getRGroupIdToAtomicIdxMap(){const t=new Map;return this.getAtomLines().forEach(((e,n)=>{const s=e.match(/RGROUPS=\(([\d\s]+)\)/);if(s){const e=s[1].split(/\s+/).map((t=>parseInt(t)));if(e.length>2)throw new Error(`R group data ${e} has more than 2 elements`);const i=e[1];if(t.has(i))throw new Error(`R group ${i} is already in the map`);t.set(i,n)}})),t}shiftIdxToAtomType(t){return this.shiftIdxToSpecifiedColumn(t,4)}getCountsLineIdx(){return this.fileContent.indexOf("M V30 COUNTS ")}getAtomBlockIdx(){let t=this.fileContent.indexOf("M V30 BEGIN ATOM");return t=this.getNextLineIdx(t),t}shiftIdxToXColumn(t){let e=this.shiftIdxToAtomType(t);return this.isQuote(e)?(e=this.getNextIdenticalChar(e),e=this.getNextColumnIdx(e),e):this.shiftIdxToSpecifiedColumn(t,5)}shiftIdxToBondedAtomsPair(t){return this.shiftIdxToSpecifiedColumn(t,5)}shiftIdxToBondType(t){return this.shiftIdxToSpecifiedColumn(t,4)}getBondBlockIdx(){return this.getNextLineIdx(this.fileContent.indexOf("M V30 BEGIN BOND"))}static isValidMolfile(t){return-1!==t.indexOf("V3000")&&-1!==t.indexOf("M END")}parseAtomAndBondCounts(){let t=this.fileContent.indexOf("M V30 COUNTS ")+14,e=this.fileContent.indexOf(" ",t+1);const n=parseInt(this.fileContent.substring(t,e));return t=e+1,e=this.fileContent.indexOf(" ",t+1),{atomCount:n,bondCount:parseInt(this.fileContent.substring(t,e))}}}class J{constructor(){}static getInstance(t){if(J.isMolfileV2K(t))return new z(t);if(J.isMolfileV3K(t))return new Q(t);throw new Error("Malformed molfile")}static isMolfileV2K(t){return z.isValidMolfile(t)}static isMolfileV3K(t){return Q.isValidMolfile(t)}}async function X(t,e=5e3){await P(100),await function(t,e,n,s=0,i="timeout"){return r(this,void 0,void 0,(function*(){return new Promise(((r,o)=>{const a=t.subscribe((t=>{try{e(t),r("OK")}catch(t){o(t)}a.unsubscribe(),clearTimeout(l)})),l=setTimeout((()=>{a.unsubscribe(),o(i)}),s);n()}))}))}(t.onAfterDrawContent,(()=>{}),(()=>{t.invalidate()}),e)}O("getMolfiles",(()=>{let n,s;I((async()=>{n=await(0,H.wW)(),s=await B(),await V(),await n.loadLibraries(!0)})),S((async()=>{await U(s),await n.loadLibraries(!0)})),b("linear1",(async()=>{const n=t.DataFrame.fromCsv("Helm, atoms, bonds\nPEPTIDE1{meI.hHis.Aca.N.T.dE.Thr_PO3H2.Aca.D-Tyr_Et.Tyr_ab-dehydroMe.dV}$$$$,11,10\nPEPTIDE1{meI.hHis.Aca.Cys_SEt.T.dK.Thr_PO3H2.Aca.Tyr_PO3H2.D-Chg.dV}$$$$,11,10\nPEPTIDE1{Lys_Boc.hHis.Aca.Cys_SEt.T.dK.Thr_PO3H2.Aca.Tyr_PO3H2}$$$$,9,8"),s=n.getCol("Helm"),i=e.shell.addTableView(n);rt.logger.debug("Helm/getMolfiles/linear1, grid awaiting 1"),await X(i.grid,5e3),rt.logger.debug("Helm/getMolfiles/linear1, grid awaited 1");const r=await e.functions.call("Helm:getMolfiles",{col:s});E(r.length,s.length);const o=r.toList().map((t=>J.getInstance(t)));N(o.map((t=>t.atomCount)),n.getCol("atoms").toList()),N(o.map((t=>t.bondCount)),n.getCol("bonds").toList()),rt.logger.debug("Helm/getMolfiles/linear1, grid awaiting 2"),await X(i.grid,5e3),rt.logger.debug("Helm/getMolfiles/linear1, grid awaited 2")}))}));var Z=n(688),tt=n(980);const et={Helm:{seq:"PEPTIDE1{I.H.A.C.T.[Thr_PO3H2].[Aca].[D-Tyr_Et]}|PEPTIDE2{E.A.[meG]}$PEPTIDE1,PEPTIDE2,4:R3-1:R1$$$V2.0",units:Y.qD.HELM,res:{formula:"C58H94N13O21SP","molecular weight":1372.48,"extinction coefficient":1.55}},separator:{seq:"I/H/A/C/T/Thr_PO3H2/Aca/D-Tyr_Et",units:Y.qD.SEPARATOR,separator:"/",alphabet:"UN",res:{formula:"C47H77N10O15SP","molecular weight":1085.21,"extinction coefficient":1.55}},separator2:{seq:"meI/hHis/Aca/N/T/dK/Thr_PO3H2/Aca/D-Tyr_Et/Aze/dV/E/N////Phe_4Me",units:Y.qD.SEPARATOR,separator:"/",alphabet:"UN",res:{formula:"C91H146N19O25P","molecular weight":1937.21,"extinction coefficient":1.49}},"separator-gaps":{seq:"I/H/A//T/Thr_PO3H2/Aca/D-Tyr_Et",units:Y.qD.SEPARATOR,separator:"/",alphabet:"UN",res:{formula:"C44H72N9O14P","molecular weight":982.07,"extinction coefficient":1.49}},"fasta-PT":{seq:"IHACTTAY",units:Y.qD.FASTA,alphabet:"PT",res:{formula:"C38H58N10O12S","molecular weight":878.99,"extinction coefficient":1.55}},"fasta-DNA":{seq:"ACGTATTCC",units:Y.qD.FASTA,alphabet:"DNA",res:{formula:"C87H113N30O56P9","molecular weight":2753.76,"extinction coefficient":91.74}}};function nt(e,n,s,i,r){const o=t.Column.fromList(t.COLUMN_TYPE.STRING,"seq",[e]);o.semType=t.SEMTYPE.MACROMOLECULE,o.setTag(t.TAGS.UNITS,n),s&&o.setTag("separator",s),i&&o.setTag("alphabet",i);const a=Z.YL.forColumn(o);w((0,tt.C)(e,a),r)}O("properties-widget",(()=>{let t,e=null;I((async()=>{t=await(0,H.wW)(),e=B(),await V(),await t.loadLibraries(!0)})),S((async()=>{await U(e),await t.loadLibraries(!0)}));for(const[t,e]of Object.entries(et))b(t,(async()=>{nt(e.seq,e.units,e.separator,e.alphabet,e.res)}))}));var st=n(52);async function it(t,e){N((0,st.w)(t),e)}O("getAllParts",(()=>{const t={peptideSimpleSingleChar:{seq:"PEPTIDE1{L.V.A}$$$$",tgt:["PEPTIDE1{","L",".","V",".","A","}$$$$"]},peptideSimpleMultiChar:{seq:"PEPTIDE1{[Ac].V.A}$$$$",tgt:["PEPTIDE1{[","Ac","].","V",".","A","}$$$$"]}};for(const[e,n]of Object.entries(t))b(`${e}`,(async()=>{await it(n.seq,n.tgt)}))}));const rt=new t.Package;async function ot(n,s,o){const a=await function(n){var s,o,a,y,A,b,_;return r(this,void 0,void 0,(function*(){const w=null===(o=null===(s=e.functions.getCurrentCall())||void 0===s?void 0:s.func)||void 0===o?void 0:o.package;yield function(n,s){var o;return r(this,void 0,void 0,(function*(){const s=n.id;if(C[s])return;const a=g;if(void 0!==a[f]||void 0!==a[d]||Object.keys(a).find((t=>t.startsWith(f)||t.startsWith(m))))return void(C[s]=!0);if("DevTools"===n.name){const e=t.Func.find({tags:["dartTest"]});for(const t of e){const e=t.name.split(/\s*\|\s*/g),n=null!==(o=e.pop())&&void 0!==o?o:t.name,s=e.length?m+": "+e.join(": "):m;void 0===a[s]&&(a[s]={tests:[],clear:!0}),a[s].tests.push(new T(s,n,(()=>r(this,void 0,void 0,(function*(){return yield t.apply()}))),{isAggregated:t.outputs.length>0,timeout:3e5}))}}const l=[],h=[],c=[],u=yield e.dapi.functions.filter(`package.id = "${s}"`).list(),y=new RegExp(/skip:\s*([^,\s]+)|wait:\s*(\d+)|cat:\s*([^,\s]+)|timeout:\s*(\d+)/g);for(const t of u){const n=t.options.test,s=t.options.demoPath;if(n&&Array.isArray(n)&&n.length)for(let s=0;s<n.length;s++){const i=n[s].matchAll(y),o={};Array.from(i).forEach((t=>{t[0].startsWith("skip")?o.skip=t[1]:t[0].startsWith("wait")?o.wait=parseInt(t[2]):t[0].startsWith("cat")?o.cat=t[3]:t[0].startsWith("timeout")&&(o.timeout=parseInt(t[4]))}));const h=new T(f,1===n.length?t.name:`${t.name} ${s+1}`,(()=>r(this,void 0,void 0,(function*(){const i=yield e.functions.eval(L(n[s],t));if(o.wait&&(yield P(o.wait)),"boolean"==typeof i&&!i)throw`Failed: ${n[s]}, expected true, got ${i}`}))),{skipReason:o.skip,timeout:o.timeout});if(o.cat){const t=f+": "+o.cat;h.category=t,void 0===a[t]&&(a[t]={tests:[],clear:!0}),a[t].tests.push(h)}else l.push(h)}if(s){const n=t.options.demoWait?parseInt(t.options.demoWait):void 0,s=new T(d,t.friendlyName,(()=>r(this,void 0,void 0,(function*(){if(e.shell.lastError="",yield t.apply(),yield P(n||2e3),e.shell.lastError)throw new Error(e.shell.lastError)}))),{skipReason:t.options.demoSkip});h.push(s)}if(t.hasTag("semTypeDetector")){const e=new T(p,t.friendlyName,(()=>r(this,void 0,void 0,(function*(){const e=[];for(const n of i.clone().columns){const s=yield t.apply([n]);e.push(s||n.semType)}E(e.filter((t=>t)).length,1)}))),{skipReason:t.options.skipTest});c.push(e)}}C[s]=!0,l.length&&(a[f]={tests:l,clear:!0}),h.length&&(a[d]={tests:h,clear:!0}),c.length&&(a[p]={tests:c,clear:!1})}))}(w);const N=[];console.log("Running tests"),null!=n||(n={}),null!==(a=(_=n).testContext)&&void 0!==a||(_.testContext=new x),e.shell.lastError="";const O=[],I=function(){const t=[];return console.log=(...e)=>{t.push(...e),l(...e)},console.info=(...e)=>{t.push(...e),h(...e)},console.warn=(...e)=>{t.push(...e),c(...e)},console.error=(...e)=>{t.push(...e),u(...e)},t}();try{for(const[s,i]of Object.entries(g)){if((null==n?void 0:n.category)&&!s.toLowerCase().startsWith(null==n?void 0:n.category.toLowerCase())||(null===(y=n.exclude)||void 0===y?void 0:y.some((t=>s.startsWith(t)))))continue;l(`Started ${s} category`),O.push(s);const r=null===(A=i.tests)||void 0===A?void 0:A.every((t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.skipReason}));try{i.before&&!r&&(yield i.before())}catch(t){i.beforeStatus=M(t)}const o=null!==(b=i.tests)&&void 0!==b?b:[],a=[];if(i.clear)for(let s=0;s<o.length;s++)a.push(yield v(o[s],null==n?void 0:n.test,I,i.timeout,w.name,n.verbose)),e.shell.closeAll(),t.Balloon.closeAll();else for(let t=0;t<o.length;t++)a.push(yield v(o[t],null==n?void 0:n.test,I,i.timeout,w.name,n.verbose));const h=a.filter((t=>"skipped"!=t.result));try{i.after&&!r&&(yield i.after())}catch(t){i.afterStatus=M(t)}i.afterStatus&&h.push({category:s,name:"after",result:i.afterStatus,success:!1,ms:0,skipped:!1}),i.beforeStatus&&h.push({category:s,name:"before",result:i.beforeStatus,success:!1,ms:0,skipped:!1}),N.push(...h)}}finally{console.log=l,console.info=h,console.warn=c,console.error=u}if(n.testContext.catchUnhandled&&(yield P(1e3),e.shell.lastError.length>0&&N.push({category:"Unhandled exceptions",name:"exceptions",result:e.shell.lastError,success:!1,ms:0,skipped:!1})),!n.test&&N.length){const s=N.filter((t=>t.success)).length,i=N.filter((t=>t.skipped)).length,r=N.filter((t=>!t.success)),o=w.name;for(const t of O){const n=N.filter((e=>e.category===t)),s=n.filter((t=>!t.success)).length,i={success:0===s,passed:n.filter((t=>t.success)).length,skipped:n.filter((t=>t.skipped)).length,failed:s,type:"package",packageName:o,category:t};e.log.usage(`${o}: ${t}`,i,`category-package ${o}: ${t}`)}if(!n.category){const t={success:0===r.length,passed:s,skipped:i,failed:r.length,type:"package",packageName:o};e.log.usage(o,t,`package-package ${o}`)}if(n.testContext.report){const e=new t.Logger,n="Package @package tested: @successful successful, @skipped skipped, @failed failed tests",o={successful:s,skipped:i,failed:r.length,package:w};for(const t of r)Object.assign(o,{[`${t.category} | ${t.name}`]:t.result});e.log(n,o,"package-tested")}}return N}))}({category:n,test:s,testContext:o});return t.DataFrame.fromObjects(a)}})(),helm_test=s})();
1
+ var helm_test;(()=>{var t={460:(t,e,s)=>{"use strict";s.d(e,{wW:()=>d});var n,i,r,o,a,l,h,c=s(888);s(200),s(852),s(923),s(688);class u{constructor(t,e=!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 t){const s=t,n=u._createBuffer(s);if(e)for(let t=0;t<n.length;t++)n[t]=-1;this._data=n,this._length=s}else{if(!(t instanceof Uint32Array))throw new Error("Invalid constructor");this._data=t,this._length=e}}getRawData(){return this._data}assureGoez(t,e){if(t<0)throw new Error(`${e} should be greater than zero`)}assureInRange(t,e,s,n){if(t<e||t>s)throw new Error(`Argument ${n} (${t}) out of range (${e}, ${s})`)}copy(t,e,s){for(let n=0;n<s;n++)e[n]=t[n]}copyFrom(t){if(this._length!=t._length)throw new Error(`Lengths differ (${this._length} != ${t._length})`);this.copy(t._data,this._data,this.lengthInInts),this._version++}get length(){return this._length}get buffer(){return this._data}set buffer(t){this._data=t,this._version++}get version(){return this._version}set version(t){this._version=t}incrementVersion(t=!0){this._version++}get lengthInInts(){return Math.floor((this._length+31)/32)}get versionedName(){return this._version==this._versionedNameVersion?this._versionedName:""}set versionedName(t){this._versionedName=t,this._versionedNameVersion=this._version}get self(){return this}setLength(t){if(t<0)throw new Error("should be >= 0");if(t==this._length)return;const e=Math.floor((t+31)/32);if(e>this._data.length||e+this.SHRINK_THRESHOLD<this._data.length){const t=new Uint32Array(e);this.copy(this._data,t,e>this._data.length?this._data.length:e),this._data=t}t>this._length&&(this._length%32>0&&(this._data[this.lengthInInts-1]&=(1<<(this._length%32&31))-1),this._data.fill(0,this.lengthInInts,e)),this._length=t,this._version++}static fromAnd(t,e){if(t._length!=e._length)throw new Error(`Lengths differ (${t._length} != ${e._length})`);const s=new u(t._length);s._length=t._length,s._data=u._createBuffer(s._length),s._version=0;const n=t.lengthInInts;for(let i=0;i<n;i++)s._data[i]=t._data[i]&e._data[i];return s}static _createBuffer(t){return new Uint32Array(Math.floor((t+31)/32))}static fromValues(t){const e=new u(t.length);e._version=0;for(let s=0;s<e._length;s++)t[s]&&(e._data[Math.floor(s/32)]|=1<<(s%32&31));return e}static fromSeq(t,e){const s=new u(t);for(let n=0;n<t;++n)s.setBit(n,e(n));return s._version=0,s}static fromString(t){return u.fromSeq(t.length,(e=>"1"==t.charAt(e)))}static fromUint32Array(t,e){const s=new u(t);return s._data=e,s}static fromBytes(t){const e=t.length,s=new u(8*e);s._data=new Uint32Array(Math.floor((e+3)/4)),s._length=8*e;let n=0,i=0;for(;e-i>=4;)s._data[n++]=255&t[i]|(255&t[i+1])<<8|(255&t[i+2])<<16|(255&t[i+3])<<24,i+=4;return e-i==3&&(s._data[n]=(255&t[i+2])<<16),e-i==2&&(s._data[n]|=(255&t[i+1])<<8),e-i==1&&(s._data[n]|=255&t[i]),s._version=0,s}toString(){return`${this._length} bits, ${this.countBits(!0)} set`}equals(t){if(this==t)return!0;if(null==t)return!1;if(this._length!=t._length)return!1;if(0==this._length)return!0;for(let e=0;e<this._data.length-1;e++)if(this._data[e]!=t._data[e])return!1;for(let e=8*(this._data.length-1);e<this._length;e++)if(this.getBit(e)!=t.getBit(e))return!1;return!0}clone(){const t=new u(0,!1);return t._data=Uint32Array.from(this._data),t._length=this._length,t._version=this._version,t}init(t,e){this.setAll(!1,!1);for(let e=0;e<this._length;e++)t(e)&&(this._data[Math.floor(e/32)]|=1<<(e%32&31));return this.incrementVersion(e),this}invert(t=!0){for(let t=0;t<this._data.length;t++)this._data[t]^=-1;this.incrementVersion(t)}setAll(t,e=!1){const s=t?-1:0,n=this.lengthInInts;for(let t=0;t<n;t++)this._data[t]=s;this.incrementVersion(e)}setIndexes(t,e=!0,s=!0,n=!0){s&&this.setAll(!e,!1);for(const s of t)this.setFast(s,e);this.incrementVersion(n)}everyIndex(t,e=!0){for(const s of t)if(this.getBit(s)!=e)return!1;return!0}anyIndex(t,e=!0){for(const s of t)if(this.getBit(s)==e)return!0;return!1}setWhere(t,e=!0,s=!0,n=!0,i=!0){if(s&&i&&this.setAll(!e,!1),i)for(let s=0;s<this._length;s++)t(s)&&this.setFast(s,e);else for(let s=0;s<this._length;s++)this.setFast(s,t(s)?e:!e);this.incrementVersion(n)}getRange(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const s=[];for(let n=t;n<e;++n)s.push(this.getBit(n));return u.fromValues(s)}getRangeAsList(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const s=[];for(let n=t;n<e;++n)s.push(this.getBit(n));return s}setRange(t,e,s,n=!0){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length-1,"to");const i=Math.min(t,e),r=Math.max(t,e);if(s)for(let t=i;t<=r;t++)this.setTrue(t);else for(let t=i;t<=r;t++)this.setFalse(t);return this.incrementVersion(n),this}setRandom(t,e,s=!0){if(t<0||t>this._length)throw new Error("n must be >= 0 && <= Count");t>this._length/2&&this.setRandom(this._length-t,!e),this.setAll(!e);for(let s=0;s<t;){const t=Math.floor(Math.random()*this._length);this.getBit(t)!=e&&(this.setFast(t,e),s++)}this.incrementVersion(s)}and(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,s=this.lengthInInts;e<s;e++)this._data[e]&=t._data[e];return this.incrementVersion(e),this}andNot(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");const s=this.lengthInInts;for(let e=0;e<s;e++)this._data[e]&=~t._data[e];return this.incrementVersion(e),this}notAnd(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,s=this.lengthInInts;e<s;e++)this._data[e]=~this._data[e]&t._data[e];return this.incrementVersion(e),this}not(t=!0){for(let t=0,e=this.lengthInInts;t<e;t++)this._data[t]=~this._data[t];return this.incrementVersion(t),this}or(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,s=this.lengthInInts;e<s;e++)this._data[e]|=t._data[e];return this.incrementVersion(e),this}xor(t,e=!0){if(this._length!=t._length)throw new Error("Array lengths differ.");for(let e=0,s=this.lengthInInts;e<s;e++)this._data[e]^=t._data[e];return this.incrementVersion(e),this}insertAt(t,e,s=!1){if(this.assureInRange(t,0,this._length,"pos"),0==e)return;const n=this._length;this.setLength(this._length+e);for(let s=n-1;s>=t;s--)this.setBit(s+e,this.getBit(s));for(let n=t;n<t+e;n++)this.setBit(n,s)}removeAt(t,e=1){if(e<0)throw new Error("n cannot be negative");if(this.assureInRange(t,0,this._length-e,"pos"),this.contains(!0))for(let s=t;s<this._length-e;s++)this.setBit(s,this.getBit(s+e));this.setLength(this._length-e)}removeByMask(t,e=!0){if(this._length!=t.length)throw new Error("length != mask.length");if(t==this)this.setLength(t.countBits(!e)),this.setAll(!e);else{let s=0;for(let n=-1;-1!=(n=t.findNext(n,!e));)this.setFast(s++,this.getBit(n));this._length=s,this._version++}return this}getBit(t){return 0!=(this._data[Math.floor(t/32)]&1<<(31&t))}setBit(t,e,s=!0){this.setFast(t,e),this._version++}setFast(t,e){e?this._data[Math.floor(t/32)]|=1<<(31&t):this._data[Math.floor(t/32)]&=~(1<<(31&t))}setTrue(t){this._data[Math.floor(t/32)]|=1<<(31&t)}setFalse(t){this._data[Math.floor(t/32)]&=~(1<<(31&t))}trueCount(){return this.countBits(!0)}falseCount(){return this.countBits(!1)}countBits(t){if(0==this._length)return 0;if(this._selectedCountVersion!=this._version){this._selectedCount=0;const t=this.lengthInInts;let e=0;for(;e<t-1;e++)for(let t=this._data[e];0!=t;t>>>=8)this._selectedCount+=u._onBitCount[255&t];let s=this._data[e];const n=31&this._length;for(0!=n&&(s&=~(4294967295<<n));0!=s;s>>>=8)this._selectedCount+=u._onBitCount[255&s];this._selectedCountVersion=this._version}return t?this._selectedCount:this._length-this._selectedCount}countWhere(t){let e=0;if(this.trueCount()==this._length)for(let s=0;s<this._length;s++)e+=t(s)?1:0;else for(let s=-1;-1!=(s=this.findNext(s,!0));)e+=t(s)?1:0;return e}andWithCountBits(t,e){if(0==this._length)return 0;let s=0;const n=this.lengthInInts;let i=0;for(;i<n-1;i++)for(let e=this._data[i]&t._data[i];0!=e;e>>>=8)s+=u._onBitCount[255&e];let r=this._data[i]&t._data[i];const o=31&this._length;for(0!=o&&(r&=~(4294967295<<o));0!=r;r>>>=8)s+=u._onBitCount[255&r];return e?s:this._length-s}clear(){this.setLength(0)}contains(t){return this.findNext(-1,t)>=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(t,e=!0){if(this.assureInRange(t,-1,this._length,"index"),t>=this._length-1)return-1;let s=31&(t=t<0?0:t+1);const n=this.lengthInInts;for(let i=Math.floor(t/32);i<n;i++){let n=e?this._data[i]:~this._data[i];if(0!=s)n&=4294967295<<s&4294967295,s=0;else if(!e&&-4294967296==n)continue;for(let e=0;0!=n;e+=8,n>>>=8){const s=u._firstOnBit[255&n];if(s>=0)return(t=s+32*i+e)>=this._length?-1:t}}return-1}findPrev(t,e=!0){if(0==t)return-1;this.assureInRange(t,-1,this._length,"index");let s=1+(t=t<0?this._length-1:t-1)&31;for(let n=Math.floor(t/32);n>=0;n--){let t=e?this._data[n]:~this._data[n];0!=s&&(t&=~(4294967295<<s),s=0);for(let e=24;0!=t;e-=8,t<<=8){const s=u._lastOnBit[t>>>24];if(s>=0)return s+32*n+e}}return-1}}u._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]),u._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]),u._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]),function(t){t.Levenshtein="Levenshtein",t.JaroWinkler="Jaro-Winkler",t.Manhattan="Manhattan",t.Onehot="One-Hot"}(n||(n={})),function(t){t.Euclidean="Euclidean"}(i||(i={})),function(t){t.Tanimoto="Tanimoto",t.Dice="Dice",t.Asymmetric="Asymmetric",t.BraunBlanquet="Braun-Blanquet",t.Cosine="Cosine",t.Kulczynski="Kulczynski",t.McConnaughey="Mc-Connaughey",t.RogotGoldberg="Rogot-Goldberg",t.Russel="Russel",t.Sokal="Sokal",t.Hamming="Hamming",t.Euclidean="Euclidean"}(r||(r={})),function(t){t.TanimotoIntArray="TanimotoIntArray"}(o||(o={})),function(t){t.Vector="Vector",t.String="String",t.BitArray="BitArray",t.MacroMolecule="MacroMolecule",t.Number="Number",t.IntArray="IntArray",t.NumberArray="NumberArray"}(a||(a={})),function(t){t.Difference="Difference"}(l||(l={})),function(t){t.CommonItems="Common Items"}(h||(h={}));var g=s(384);async function d(){const t=c.Func.find({package:"Bio",name:"getMonomerLibHelper"});if(0===t.length)throw new Error('Package "Bio" must be installed for MonomerLibHelper.');return(await t[0].prepare().call()).getOutputParamValue()}r.Tanimoto,r.Dice,r.Asymmetric,r.BraunBlanquet,r.Cosine,r.Kulczynski,r.McConnaughey,r.RogotGoldberg,r.Russel,r.Sokal,r.Hamming,r.Euclidean,r.Tanimoto,r.Dice,r.Asymmetric,r.BraunBlanquet,r.Cosine,r.Kulczynski,r.McConnaughey,r.RogotGoldberg,r.Russel,r.Sokal,r.Hamming,r.Euclidean,r.Tanimoto,r.Dice,r.Cosine,r.Tanimoto,r.Asymmetric,r.Cosine,r.Sokal,g.Y.HAMMING,g.Y.LEVENSHTEIN,g.Y.MONOMER_CHEMICAL_DISTANCE,g.Y.NEEDLEMANN_WUNSCH},248:(t,e,s)=>{"use strict";s.d(e,{I5:()=>g,_m:()=>h,y4:()=>u});var n=s(888),i=s(304),r=s(468),o=s(308),a=s(872),l=s(924);class h{constructor(t,e,s){this.backColor=t,this.width=e,this.height=s}}class c{constructor(t,e,s,n){this.name=t,this.props=e,this.onAfterRender=s,this.isPriority=n}}class u{constructor(t,e=3,s=0,n=3,i=1e3){this.logger=t,this.retryLimit=e,this._errorCount=s,this.errorLimit=n,this.taskTimout=i,this.consumerCounter=0,this._busy=!1,this._sweeperHandle=null,this.viewerId=++u.viewerCounter,this._queue=[],this._queueDict={},this._sweepToggle(!1)}toLog(){return`${this.constructor.name}<${this.viewerId}>`}get errorCount(){return this._errorCount}render(t,e,s,n=0){const i=`${this.toLog()}.render()`;if(this.logger.debug(`${i}, start key: ${s?.toString()}`),void 0!==s){if(s in this._queueDict){const t=this._queue.findIndex((t=>t.key===s));this._queue.splice(t,1)}this.logger.debug(`${i}, _queueDict[ key: ${s?.toString()} ] = <task>`),this._queueDict[s]=e}return this.logger.debug(`${i}, _queue.push(), key: ${s?.toString()}`),null===t&&(t=++this.consumerCounter),this._queue.push({consumerId:t,key:s,task:e,tryCount:n,dt:window.performance.now()}),this._busy||(this._sweepToggle(this._busy=!0),this.logger.debug(`${i}, window.setTimeout() -> this._processQueue() `),window.setTimeout((()=>{this._processQueue()}),0)),t}getTask(){if(0==this._queue.length)return;let t;const e=this._queue[0];if(e.task.isPriority&&!e.task.isPriority()){let s=null;for(let t=0;t<this._queue.length;++t){const n=this._queue[t];if(n.consumerId===e.consumerId&&n.task.isPriority){if(n.task.isPriority()){s=t;break}{const e=this._queue.splice(t);this._queue.push(...e)}}}null!==s&&(t=this._queue.splice(s,1)[0])}return t||(t=this._queue.shift()),t}_processQueue(){const t=`${this.toLog()}._processQueue()`;if(0===this._queue.length)return;this.logger.debug(`${t}, queue: ${JSON.stringify(this._queue.map((t=>t.key)))}`);let e=null;const s=s=>{const n=`${t}.finallyProcessQueue( <- ${s} )`;e&&e.unsubscribe(),this._queue.length>0?(this.logger.debug(`${n}, window.setTimeout() -> this._processQueue() `),window.setTimeout((()=>{this._processQueue()}),0)):(this.logger.debug(`${n}, this._busy = false`),this._sweepToggle(this._busy=!1))},n=this.getTask();if(!n)return this.logger.error(`${t}, queueItem = undefined `),void s("no queue item");const{consumerId:i,key:r,task:o,tryCount:l,dt:h}=n;if(void 0!==r&&(this.logger.debug(`${t}, key: ${r.toString()}`),delete this._queueDict[r]),l>this.retryLimit)return this.logger.warning(`${t}, skip task, key: ${r?.toString()}, tryCount: ${l}`),void s("try count limit");let c,u=!1;const g=window.setTimeout((()=>{u||(this.logger.warning(`${t}.timeoutHandle(), not handled, key: ${r?.toString()}.\n The .requestRender() overridden method must call renderHandler callback from args.`),this._errorCount+=1,this.render(i,o,r,l+1),s("timeout"))}),1e3);this.requestRender(r,o,(e=>{this.logger.debug(`${t}.renderHandler(), key: ${r?.toString()}`),this.onRendered(r,o,c,e)&&(u=!0,window.clearTimeout(g),s("render"))})).then((s=>{const n=`${t}, requestRender().then()`;e=s[0],c=s[1];const i=s[2];void 0===c&&console.warn(`${n}, this.requestRender.then() emptyCanvasHash undefined`),i()})).catch((e=>{const n=`${t}, requestRender().catch()`,[h,c]=(0,a.g$)(e);this.logger.error(h,void 0,c),window.clearTimeout(g),this._errorCount+=1,this.render(i,o,r,l+1),s(`${n}`)}))}_sweepQueue(){const t=`${this.toLog()}._sweepQueue()`,e=window.performance.now();let s=0;for(let n=this._queue.length-1;n>=0;n--){const{key:i,task:r,dt:o}=this._queue[n];e-o>this.taskTimout&&(this.logger.warning(`${t}, remove task key = ${i?.toString()}`),this._queue.splice(n),delete this._queueDict[i],++s)}this._sweepToggle(this._busy=this._queue.length>0),!this._busy&&s&&this.logger.warning(`${t}, ${s} task(s) had been swept`)}_sweepToggle(t){const e=`${this.toLog()}._sweepToggle( busy = ${t} )`;return t&&null!==this._sweeperHandle&&(this.logger.debug(`${e}, disable queue sweeper`),window.clearInterval(this._sweeperHandle),this._sweeperHandle=null),t||null!==this._sweeperHandle||(this.logger.debug(`${e}, enable queue sweeper`),this._sweeperHandle=window.setInterval((()=>{this._sweepQueue()}),500)),t}}u.viewerCounter=-1;class g extends l.W{constructor(t,e,s,n=!0){super(t,e,s),this.cacheEnabled=n,this.taskQueueMap=new Map,this.imageCache=new Map,this.consumerId=null,this._onRendered=new r.Subject}reset(){this.imageCache,this.imageCache=new Map}render(t,e,s,r,o,a,l){const h=window.devicePixelRatio,u=this.getRenderService();if(null==a.tableRowIndex)return;const g=a.tableRowIndex;this.logger.debug(`PdbRenderer.render() start rowIdx=${g}`),t.save();try{const d=this.imageCache.has(g)?this.imageCache.get(g):null,f=new n.Rect(e,s,r,o);let p,m,y;if(this.gridCol?(p=a.gridColumn.width*h-2,m=a.grid.props.rowHeight*h-2,y=l?l.backColor:null,y=y??(this.gridCol?this.gridCol.grid.props.backColor:null),y=y??n.Color.argb(0,0,0,0)):(p=r*h-2,m=o*h-2,y=n.Color.argb(0,0,0,0)),!this.cacheEnabled||!d||Math.abs(d.width/h-p)>.5||Math.abs(d.height/h-m)>.5){let l=!0;if(d&&(l=this.renderCellImageData(t,f,a,d)),!l)return;const h=new c(a.cell.rowIndex.toString(),this.getRenderTaskProps(a,y,p,m),((l,h)=>{this.storeAux(a,h),t.save();try{this.logger.debug(`PdbRenderer.render() onAfterRender() rowIdx = ${g}`);let h=l.getContext("2d");h||(h=i.canvas(l.width,l.height).getContext("2d"),h.drawImage(l,0,0));const c=h.getImageData(0,0,l.width,l.height);this.renderOnGrid(t,new n.Rect(e,s,r,o),a,c),this.imageCache.set(g,c)}finally{t.restore(),this.taskQueueMap.delete(g),0===this.taskQueueMap.size&&this._onRendered.next()}}),this.gridCol?()=>{const t=a.grid;return t.vertScroll.min-1<=a.gridRow&&a.gridRow<=t.vertScroll.max}:void 0);this.taskQueueMap.set(g,h),this.consumerId=u.render(this.consumerId,h,g)}else this.logger.debug(`PdbRenderer.render(), from imageCache[${g}]`),this.renderOnGrid(t,f,a,d)}catch(t){const e=t instanceof Error?t.message:t.toString();this.logger.error(`BsV:PdbGridCellRenderer.render() no rethrown error: ${e}`,void 0,t instanceof Error?t.stack:void 0)}finally{t.restore()}}renderCellImageData(t,e,s,n){const r=window.devicePixelRatio,o=i.canvas(n.width,n.height);o.getContext("2d").putImageData(n,0,0);const a=(e.width-1)*r,l=(e.height-1)*r,h=i.canvas(a,l),c=Math.min(a/n.width,l/n.height),u=(a-n.width*c)/2,g=(l-n.height*c)/2,d=h.getContext("2d");d.transform(c,0,0,c,u,g),d.drawImage(o,0,0);const f=d.getImageData(0,0,a,l);return this.renderOnGrid(t,e,s,f),!0}renderOnGrid(t,e,s,i){const r=`renderOnGridCell( gRow = ${s.gridRow} )`,o=`${this.toLog()}.${r}`,a=window.devicePixelRatio;this.logger.debug(`${o}, start`),t.save();try{if(t.resetTransform(),this.gridCol){const t=this.gridCol.grid,n=Math.floor(t.vertScroll.min);e.y=((s.gridRow-n)*t.props.rowHeight+t.colHeaderHeight)*a;let i=0;for(let e=0;e<this.gridCol.idx;e++){const s=t.columns.byIndex(e);i+=s.visible?s.width:0}e.x=(i-t.horzScroll.min)*a}const r=new n.Rect(e.x+a,e.y+a,(e.width-1)*a,(e.height-1)*a);t.beginPath(),t.rect(r.x,r.y,r.width,r.height),t.clip(),t.putImageData(i,e.x+a,e.y+a)}finally{t.restore()}}get onRendered(){return this._onRendered}invalidate(t){this.invalidateGrid()}async awaitRendered(t=1e4,e=`await rendered ${t} timeout`){await(0,o.SG)(this._onRendered,(()=>{}),(()=>{this.invalidate()}),t,e)}}},924:(t,e,s)=>{"use strict";s.d(e,{M:()=>i,W:()=>r});var n=s(200);function i(t){let e=null,s=null;try{s=t.dart?t.gridColumn:null,e=s?s.temp:null}catch{[s,e]=[null,null]}const n=t.cell.column;if(e=e??n.temp,!e)throw new Error("Grid cell renderer back store (GridColumn or Column) not found.");return[s,n,e]}class r{constructor(t,e,s){this.gridCol=t,this.tableCol=e,this.logger=s,this.subs=[],this.destroyed=!1,this.viewerId=++r.viewerCounter,this.reset(),this.tableCol&&this.tableCol.dataFrame&&this.subs.push(this.tableCol.dataFrame.onDataChanged.subscribe((()=>{try{this.reset()}catch(t){this.logger.error(t)}}))),this.tableCol&&this.subs.push(n.events.onTableRemoved.subscribe((t=>{try{const e=t.args.dataFrame;this.tableCol?.dataFrame.id!==e.id||this.destroyed||this.destroy()}catch(t){this.logger.error(t)}}))),this.gridCol&&this.subs.push(n.events.onViewRemoving.subscribe((t=>{try{const e=t.args.view;this.gridCol?.dart&&this.gridCol.grid&&this.gridCol?.grid?.dart&&this.gridCol?.grid?.view?.id===e.id&&!this.destroyed&&this.destroy()}catch(t){this.logger.error(t)}})))}toLog(){return`${this.constructor.name}<${this.viewerId}>`}destroy(){for(const t of this.subs)t.unsubscribe();this.destroyed=!0}invalidateGrid(){this.gridCol&&this.gridCol.dart&&this.gridCol.grid?.invalidate()}}r.viewerCounter=-1},852:(t,e,s)=>{"use strict";s.d(e,{E1:()=>n,cT:()=>i});const n="p",i=new RegExp(`[rd]\\((\\w)\\)${n}?`,"g")},872:(t,e,s)=>{"use strict";function n(t){return"string"==typeof t||t instanceof String?t:"StateError"===t.constructor.name?t.message:"StateError"===t.constructor.name&&"$thrownJsError"in t?n(t.$thrownJsError):t instanceof Error?t.message:t.toString()}function i(t){return t instanceof Error?t.stack:"StateError"===t.constructor.name&&"$thrownJsError"in t?i(t.$thrownJsError):void 0}function r(t){return[n(t),i(t)]}s.d(e,{g$:()=>r})},136:(t,e,s)=>{"use strict";s.d(e,{YF:()=>r,eQ:()=>o,qD:()=>n,y6:()=>l});var n,i=s(923);!function(t){t.FASTA="fasta",t.SEPARATOR="separator",t.HELM="helm"}(n||(n={}));const r=", ",o=/(?:\[([A-Za-z0-9_\-,()]+)\])|([A-Za-z\-])/g,a=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"])}}},l=[new i._u("PT",a.fasta.peptide,.5),new i._u("DNA",a.fasta.dna,.55),new i._u("RNA",a.fasta.rna,.55)]},736:(t,e,s)=>{"use strict";s.d(e,{YF:()=>n.YF,g9:()=>i.g9,gX:()=>i.gX,oB:()=>i.oB,qD:()=>n.qD,y6:()=>n.y6});var n=s(136),i=s(502)},923:(t,e,s)=>{"use strict";s.d(e,{AD:()=>r,_u:()=>i,yK:()=>n});const n="";class i{constructor(t,e,s){this.name=t,this.alphabet=e,this.cutoff=s}}class r extends i{constructor(t,e,s){super(t.name,t.alphabet,t.cutoff),this.freq=e,this.similarity=s}}},502:(t,e,s)=>{"use strict";s.d(e,{Mx:()=>C,o5:()=>I,gX:()=>w,oB:()=>A,lh:()=>b,g9:()=>_});var n=s(888),i=s(848),r=s.n(i),o=s(923),a=s(136),l=s(688);class h extends Float32Array{}function c(t){let e=0;for(let s=0;s<t.length;s++)e+=t[s]*t[s];return Math.sqrt(e)}class u{static makePalette(t,e=!1,s=u){const n={};return t.forEach((t=>{const s=t[0],i=t[1];s.forEach(((t,s)=>{n[t]=this.colourPalette[i][e?0:s]}))})),new s(n)}constructor(t){this._palette=t}get(t){return this._palette[t]}}u.undefinedColor="rgb(100,100,100)",u.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)"]};class g extends u{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,g)),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,g)),this.grokGroups}static get RasMol(){return void 0===this.rasMol&&(this.rasMol=new g({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(t){const e=t in g.aaSynonyms?g.aaSynonyms[t]:t;return super.get(e)}}g.aaSynonyms={MeNle:"L",MeA:"A",MeG:"G",MeF:"F"};class d{static getPalette(t="grok"){switch(t){case"grok":return g.GrokGroups;case"lesk":return g.Lesk;default:throw new Error(`ChemPalette: scheme \`${t}\` does not exist`)}}static getInnerOuter(t){let e=0,s="",n="";for(const i of t)"("==i?e++:")"==i?e--:e?s+=i:n+=i;return isNaN(parseInt(s))?[n,s]:[n,""]}static getColorAAPivot(t="",e="grok"){const s=this.getPalette(e);let[n,i]=this.getInnerOuter(t);if(n=n.length>6?`${n.slice(0,3)}...`:n,i=i.length>6?`${i.slice(0,3)}...`:i,1==t.length||"("==t[1]){const e=t[0]?.toUpperCase();return e in s?[s.get(e),e,i,1]:[this.undefinedColor,n,i,1]}if("d"==t[0]&&t[1]in s&&(2==t.length||"("==t[2])){const e=t[1]?.toUpperCase();return e in s?[s.get(e),e,i,2]:[this.undefinedColor,n,i,2]}if(t.substring(0,3)in this.AAFullNames&&(3==t.length||"("==t[3])){const e=this.AAFullNames[t.substring(0,3)];return e in s?[s.get(e),e,i,3]:[this.undefinedColor,n,i,3]}if(t[0]?.toLowerCase()==t[0]&&t.substring(1,3)in this.AAFullNames&&(4==t.length||"("==t[4])){const e=this.AAFullNames[t.substring(1,3)];return e in s?[s.get(e),e,i,4]:[this.undefinedColor,n,i,4]}return[this.undefinedColor,n,i,0]}}d.SemType="Aminoacids",d.SemTypeMultipleAlignment="AminoacidsMultipleAlignment",d.undefinedColor="rgb(100,100,100)",d.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"},d.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"},d.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(*)*"},d.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"};class f{}f.SemType="Nucleotides",f.SemTypeMultipleAlignment="NucleotidesMultipleAlignment",f.Names={A:"Adenine",C:"Cytosine",G:"Guanine",T:"Thymine",U:"Uracil"};class p{static hashCode(t){let e=0;if(0===t.length)return e;for(let s=0;s<t.length;s++)e=(e<<5)-e+t.charCodeAt(s),e|=0;return e}}class m{}class y extends m{static buildPalette(){return[].concat(...Object.values(u.colourPalette))}get(t){const e=p.hashCode(t)%y.palette.length;return function(t){if(null==t)return"rgb(100,100,100)";const e=n.Color.fromHtml(t),s=n.Color.g(e),i=n.Color.r(e),r=n.Color.b(e),o=Math.sqrt(Math.pow(0-i,2)+Math.pow(0-s,2)+Math.pow(0-r,2));return o>210?`rgb(${i/o*210},${s/o*210},${r/o*210})`:n.Color.toRgb(e)}(y.palette[e])}}y.palette=y.buildPalette();class C{get length(){return this.mList.length}get canonicals(){return this.mList}get originals(){return this.mList}isGap(t){return this.getOriginal(t)===this.gapOriginalMonomer}getCanonical(t){if(this.length<=t)throw new Error("Index out of bounds");return this.mList[t]}getOriginal(t){if(this.length<=t)throw new Error("Index out of bounds");return this.mList[t]}constructor(t,e){this.mList=t,this.gapOriginalMonomer=e}}class x{get length(){return this.seqS.length}get canonicals(){return this.seqS}get originals(){return this.seqS}isGap(t){return this.getOriginal(t)===l.oh[a.qD.FASTA]}getCanonical(t){if(this.length<=t)throw new Error("Index out of bounds");return this.isGap(t)?o.yK:this.seqS[t]}getOriginal(t){if(this.length<=t)throw new Error("Index out of bounds");return this.seqS[t]}constructor(t){this.seqS=t}}const A=t=>{const e=r()(t.toString().matchAll(a.eQ)).map((t=>t[2]??t[1])).toArray();return new C(e,l.oh[a.qD.FASTA])},b=t=>t?new x(t):new C([],l.oh[a.qD.FASTA]);function w(t,e=void 0){return s=>{if(s){const n=s.replaceAll('"-"',"").replaceAll("'-'","").split(t,e);return new C(n,l.oh[a.qD.SEPARATOR])}return new C([],l.oh[a.qD.SEPARATOR])}}const T=/(PEPTIDE1|DNA1|RNA1)\{([^}]+)}/g,E=/\[([^\[\]]+)]/g,_=t=>{T.lastIndex=0;const e=T.exec(t.toString()),s=e?e[2]:null,n=s?s.split("."):[];return new C(n.map((t=>{E.lastIndex=0;const e=E.exec(t);return e&&e.length>=2?e[1]:t})),l.oh[a.qD.HELM])};function I(t,e,s="-"){const n=e.map((e=>{const n=function(t,e,s="-"){const n=new Set([...new Set(Object.keys(t)),...e]);n.delete(s);const i=[],r=[];for(const s of n)i.push(s in t?t[s]:0),r.push(e.has(s)?1:0);const o=new h(i),a=new h(r);return function(t,e){if(t.length!=e.length)throw new Error("The dimensionality of the vectors must match");let s=0;for(let n=0;n<t.length;n++)s+=t[n]*e[n];return s}(o,a)/(c(o)*c(a))}(t,e.alphabet,s);return new o.AD(e,t,n)}));let i;const r=Math.max(...n.map((t=>t.similarity>t.cutoff?t.similarity:-1)));return i=r>0?n.find((t=>t.similarity===r)).name:"UN",i}},688:(t,e,s)=>{"use strict";s.d(e,{YL:()=>f,oh:()=>d});var n=s(888),i=s(848),r=s.n(i),o=s(736),a=s(923),l=s(502),h=s(384),c=s(460),u=s(852);const g=new class{constructor(){this.seqHandler="seq-handler",this.notationProvider="seq-handler.notation-provider"}},d={[o.qD.FASTA]:"-",[o.qD.SEPARATOR]:"",[o.qD.HELM]:"*"};class f{constructor(t){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,t.type!==n.TYPE.STRING)throw new Error(`Unexpected column type '${t.type}', must be '${n.TYPE.STRING}'.`);this._column=t;const e=this._column.getTag(n.TAGS.UNITS);if(null==e)throw new Error("Units are not specified in column");if(this._units=e,this._notation=this.getNotation(),this._defaultGapOriginal=this.isFasta()?d[o.qD.FASTA]:this.isHelm()?d[o.qD.HELM]:d[o.qD.SEPARATOR],!this.column.tags.has("aligned")||!this.column.tags.has("alphabet")||!this.column.tags.has(".alphabetIsMultichar")&&!this.isHelm()&&"UN"===this.alphabet)if(this.isFasta())f.setUnitsToFastaColumn(this);else if(this.isSeparator()){const e=t.getTag("separator");f.setUnitsToSeparatorColumn(this,e)}else{if(!this.isHelm())throw new Error(`Unexpected units '${this.column.getTag(n.TAGS.UNITS)}'.`);f.setUnitsToHelmColumn(this)}if(!this.column.tags.has(".alphabetIsMultichar"))if(this.isHelm())this.column.setTag(".alphabetIsMultichar","true");else if(["UN"].includes(this.alphabet))throw new Error(`For column '${this.column.name}' of alphabet '${this.alphabet}' tag '.alphabetIsMultichar' is mandatory.`);this.notationProvider=this.column.temp[g.notationProvider]??null,this.columnVersion=this.column.version}static setUnitsToFastaColumn(t){if(t.column.semType!==n.SEMTYPE.MACROMOLECULE||t.column.getTag(n.TAGS.UNITS)!==o.qD.FASTA)throw new Error(`The column of notation '${o.qD.FASTA}' must be '${n.SEMTYPE.MACROMOLECULE}'.`);t.column.setTag(n.TAGS.UNITS,o.qD.FASTA),f.setTags(t)}static setUnitsToSeparatorColumn(t,e){if(t.column.semType!==n.SEMTYPE.MACROMOLECULE||t.column.getTag(n.TAGS.UNITS)!==o.qD.SEPARATOR)throw new Error(`The column of notation '${o.qD.SEPARATOR}' must be '${n.SEMTYPE.MACROMOLECULE}'.`);if(!e)throw new Error(`The column of notation '${o.qD.SEPARATOR}' must have the separator tag.`);t.column.setTag(n.TAGS.UNITS,o.qD.SEPARATOR),t.column.setTag("separator",e),f.setTags(t)}static setUnitsToHelmColumn(t){if(t.column.semType!==n.SEMTYPE.MACROMOLECULE)throw new Error(`The column of notation '${o.qD.HELM}' must be '${n.SEMTYPE.MACROMOLECULE}'`);t.column.setTag(n.TAGS.UNITS,o.qD.HELM),f.setTags(t)}static setTags(t){const e=t.column.getTag(n.TAGS.UNITS),s=t.stats;if(Object.keys(s.freq).some((t=>t.length>1)),[o.qD.FASTA,o.qD.SEPARATOR].includes(e)){if(!t.column.getTag("alphabet")&&0===Object.keys(s.freq).length)throw new Error("Alphabet is empty and not annotated.");let e=t.column.getTag("aligned");null===e&&(e=s.sameLength?"SEQ.MSA":"SEQ",t.column.setTag("aligned",e));let n=t.column.getTag("alphabet");if(null===n&&(n=(0,l.o5)(s.freq,o.y6),t.column.setTag("alphabet",n)),"UN"===n){const e=Object.keys(s.freq).length,n=Object.keys(s.freq).some((t=>t.length>1));t.column.setTag(".alphabetSize",e.toString()),t.column.setTag(".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 t=this.column.getTag("separator")??void 0;if(this.notation===o.qD.SEPARATOR&&void 0===t)throw new Error(`Separator is mandatory for column '${this.column.name}' of notation '${this.notation}'.`);return t}get aligned(){const t=this.column.getTag("aligned");if(!t&&(this.isFasta()||this.isSeparator()))throw new Error("Tag aligned not set");return t}get alphabet(){const t=this.column.getTag("alphabet");if(!t&&(this.isFasta()||this.isSeparator()))throw new Error("Tag alphabet not set");return t}get helmCompatible(){return this.column.getTag(".isHelmCompatible")}getAlphabetSize(){if(this.notation==o.qD.HELM||"UN"==this.alphabet){const t=this.column.getTag(".alphabetSize");let e;if(t)e=parseInt(t);else{const t=this.stats;e=Object.keys(t.freq).length}return e}switch(this.alphabet){case"PT":return 20;case"DNA":case"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.qD.HELM||"UN"===this.alphabet&&"true"===this.column.getTag(".alphabetIsMultichar")}getSplitted(t){if(this.cached){this.column.version===this.columnVersion&&null!==this._splitted||(this.columnVersion=this.column.version,this._splitted=new Array(this.column.length));let e=this._splitted[t]?this._splitted[t].deref():void 0;if(!e){const s=this.column.get(t);e=this.splitter(s),this._splitted[t]=new WeakRef(e)}return e}{const e=this.column.get(t);return this.splitter(e)}}get stats(){if(null===this._stats){const t={};let e=!0,s=null;const n=this.column.length;for(let i=0;i<n;++i){const n=this.getSplitted(i);null==s?s=n.length:n.length!==s&&(e=!1);for(const e of n.canonicals)e in t||(t[e]=0),t[e]+=1}this._stats={freq:t,sameLength:e}}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((t=>this.getSplitted(t).length)))),this._maxLength}get posList(){if(null===this._posList){const t=this.column.getTag(".positionNames");this._posList=t?t.split(o.YF).map((t=>t.trim())):r().count(1).take(this.maxLength).map((t=>t.toString())).toArray()}return this._posList}isFasta(){return this.notation===o.qD.FASTA}isSeparator(){return this.notation===o.qD.SEPARATOR}isHelm(){return this.notation===o.qD.HELM}isRna(){return"RNA"===this.alphabet}isDna(){return"DNA"===this.alphabet}isPeptide(){return"PT"===this.alphabet}isMsa(){return!!this.aligned&&this.aligned.toUpperCase().includes("MSA")}isHelmCompatible(){return"true"===this.helmCompatible}isGap(t){return!t||t===this._defaultGapOriginal}getNotation(){if(this.units.toLowerCase().startsWith(o.qD.FASTA))return o.qD.FASTA;if(this.units.toLowerCase().startsWith(o.qD.SEPARATOR))return o.qD.SEPARATOR;if(this.units.toLowerCase().startsWith(o.qD.HELM))return o.qD.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(t,e,s,i){const r=this.column,a=t.toLowerCase()+"("+r.name+")",l=s??r.dataFrame.columns.getUnusedName(a),h=n.Column.fromList("string",l,i??new Array(this.column.length).fill(""));if(h.semType=n.SEMTYPE.MACROMOLECULE,h.setTag(n.TAGS.UNITS,t),t===o.qD.SEPARATOR){if(!e)throw new Error(`Notation '${o.qD.SEPARATOR}' requires separator value.`);h.setTag("separator",e)}h.setTag(n.TAGS.CELL_RENDERER,"sequence");const c=r.getTag("aligned");c&&h.setTag("aligned",c);let u=r.getTag("alphabet");u||this.notation!==o.qD.HELM||t===o.qD.HELM||(u="UN"),null!=u&&h.setTag("alphabet",u);let g=r.getTag(".alphabetSize");null!=u&&g&&h.setTag(".alphabetSize",g);const d=r.getTag(".alphabetIsMultichar");return null!=u&&void 0!==d&&h.setTag(".alphabetIsMultichar",d),t==o.qD.HELM&&(g=this.getAlphabetSize().toString(),h.setTag(".alphabetSize",g)),h}getNewColumnFromList(t,e){return this.getNewColumn(this.notation,this.separator,t,e)}static getNewColumn(t){const e=f.forColumn(t),s=e.notation;return e.getNewColumn(s)}static unitsStringIsValid(t){return t=t.toLowerCase(),[o.qD.FASTA,o.qD.SEPARATOR,o.qD.HELM].some((e=>t.startsWith(e.toLowerCase())))}static getNewColumnFromParams(t,e,s){if(!f.unitsStringIsValid(s))throw new Error("Invalid format of 'units' parameter");const i=n.Column.fromList("string",e,new Array(t).fill(""));return i.semType=n.SEMTYPE.MACROMOLECULE,i.setTag(n.TAGS.UNITS,s),i}getSplitter(t){let e=null;if(e=this.notationProvider?this.notationProvider.splitter:null,e)return e;if(this.units.toLowerCase().startsWith(o.qD.FASTA))return null===this.column.getTag("alphabet")||this.getAlphabetIsMultichar()?o.oB:l.lh;if(this.units.toLowerCase().startsWith(o.qD.SEPARATOR))return(0,o.gX)(this.separator,t);if(this.units.toLowerCase().startsWith(o.qD.HELM))return o.g9;throw new Error(`Unexpected units ${this.units} .`)}split(t){return this.splitter(t)}getDistanceFunctionName(){if(!this.isFasta())throw new Error("Only FASTA notation is supported");return this.isMsa()?h.Y.HAMMING:(this.alphabet,h.Y.LEVENSHTEIN)}getDistanceFunction(){return h.S[this.getDistanceFunctionName()]()}async checkHelmCompatibility(){if(this.column.tags.has(".isHelmCompatible"))return"true"===this.column.getTag(".isHelmCompatible");const t=(await(0,c.wW)()).getBioLib().getMonomerSymbolsByType("PEPTIDE".toString()),e=new Set(t),s=((0,o.gX)(this.separator),new Set),n=this.column.length,i=this.column.getRawData();for(let t=0;t<n;++t){const n=i[t];if(!(n in s)){s.add(n);const i=this.getSplitted(t);for(const t of i.canonicals)if(!e.has(t))return this.column.setTag(".isHelmCompatible","false"),!1}}return this.column.setTag(".isHelmCompatible","true"),!0}get splitter(){return null===this._splitter&&(this._splitter=this.getSplitter()),this._splitter}toFasta(t){return t===o.qD.FASTA}toSeparator(t){return t===o.qD.SEPARATOR}toHelm(t){return t===o.qD.HELM}convertHelmToFastaSeparator(t,e,s,n){n||(n=this.toFasta(e)?d[o.qD.FASTA]:d[o.qD.SEPARATOR]),s||(s=this.toFasta(e)?"":this.separator);const i=t.startsWith("RNA"),r=this.splitter(t),a=[];for(let t=0;t<r.length;++t){let s=r.getOriginal(t);if(i&&(s=s.replace(u.cT,"")),s===d[o.qD.HELM])a.push(n);else if(this.toFasta(e)&&s.length>1){const t="["+s+"]";a.push(t)}else a.push(s)}return a.join(s)}convert(t,e){const s=this.getJoiner({notation:t,separator:e}),n=this.getNewColumn(t,e);return n.init((t=>{const e=this.getSplitted(t);return s(e)})),n}getRegion(t,e,s){const n=this.getNewColumn(this.notation,this.separator);n.name=s;const i=t??0,r=e??this.maxLength-1,a=this.getJoiner(),h=r-i+1,c=d[this.notation];n.init((t=>{const e=this.getSplitted(t),s=new Array(h);for(let t=0;t<h;++t){const n=i+t;s[t]=n<e.length?e.getOriginal(n):c}return a(new l.Mx(s,c))}));const u=t=>{const e=t.split(",").map((t=>t.trim())),s=new Array(h);for(let t=0;t<h;++t){const n=i+t;s[t]=n<e.length?e[n]:"?"}return s.join(o.YF)},g=this.column.getTag(".positionNames");g&&n.setTag(".positionNames",u(g));const f=this.column.getTag(".positionLabels");return f&&n.setTag(".positionLabels",u(f)),n}get joiner(){return this._joiner||(this._joiner=this.getJoiner()),this._joiner}getJoiner(t){const e=t?t.notation:this.notation,s=t?t.separator:this.separator;let n;const i=this;switch(e){case o.qD.FASTA:n=function(t){return i.joinToFasta(t,i.isHelm())};break;case o.qD.SEPARATOR:if(!s)throw new Error(`Separator is mandatory for notation '${e}'.`);n=function(t){return p(t,s,i.isHelm())};break;case o.qD.HELM:{const t="DNA"===i.alphabet||"RNA"===i.alphabet,e=i.getHelmWrappers();n=function(s){return m(s,e,t)};break}default:throw new Error(`Unexpected notation '${e}'.`)}return n}getConverter(t,e=void 0){if(t===o.qD.SEPARATOR&&!e)throw new Error(`Target separator is not specified for target units '${o.qD.SEPARATOR}'.`);const s=this;if(t===o.qD.FASTA)return function(t){return s.convertToFasta(t)};if(t===o.qD.HELM)return function(t){return s.convertToHelm(t)};if(t===o.qD.SEPARATOR)return function(t){return s.convertToSeparator(t,e)};throw new Error}static forColumn(t){let e=t.temp[g.seqHandler];return e&&e.columnVersion===t.version||(e=t.temp[g.seqHandler]=new f(t)),e}joinToFasta(t,e){const s=new Array(t.length);for(let n=0;n<t.length;++n){const i=t.getOriginal(n);let r=t.getOriginal(n);e&&(r=r.replace(u.cT,"$1")),i===a.yK?r=d[o.qD.FASTA]:i===u.E1?r="":r.length>1&&(r="["+r+"]"),s[n]=r}return s.join("")}convertToFasta(t){const e=this.splitter,s=this.isHelm()?this.splitterAsHelmNucl(t):e(t);return this.joinToFasta(s,this.isHelm())}convertToSeparator(t,e){return p(this.isHelm()?this.splitterAsHelmNucl(t):this.splitter(t),e,this.isHelm())}convertToHelm(t){const e=this.getHelmWrappers(),s=t.startsWith("DNA")||t.startsWith("RNA");return m(this.splitter(t),e,s)}splitterAsHelmNucl(t){const e=this.splitter(t),s=new Array(e.length),n=t.startsWith("DNA"),i=t.startsWith("RNA");for(let t=0;t<e.length;++t){let r=e.getOriginal(t);(n||i)&&(r=r.replace(u.cT,"$1"),r=r===u.E1?null:r),s[t]=r||null}return new l.Mx(s.filter((t=>!!t)),d[o.qD.HELM])}}function p(t,e,s){const n=new Array(t.length);for(let e=0;e<t.length;++e){const i=t.getCanonical(e);let r=t.getOriginal(e);s&&(r=r.replace(u.cT,"$1")),i===a.yK?r=d[o.qD.SEPARATOR]:i===u.E1&&(r=""),n[e]=r}return n.join(e)}function m(t,e,s){const[n,i,r,l]=e,h=new Array(t.length);for(let e=0;e<t.length;++e){const n=t.getCanonical(e);let l=t.getOriginal(e);n===a.yK?l=d[o.qD.HELM]:(s&&(l=l.replace(u.cT,"$1")),l=1===l.length?`${i}${l}${r}`:`${i}[${l}]${r}`),h[e]=l}return`${n}${h.join(".")}${l}`}},824:(t,e,s)=>{"use strict";s.d(e,{Cu:()=>o,cF:()=>a,st:()=>r});var n=s(888),i=s(248);class r extends i._m{constructor(t,e,s,n){super(e,s,n),this.helm=t}}class o extends i.y4{}async function a(){const t=n.Func.find({package:"Helm",name:"getHelmService"});if(0===t.length)throw new Error('Package "Helm" must be installed for Helm services.');return(await t[0].prepare().call()).getOutputParamValue()}},384:(t,e,s)=>{"use strict";function n(t={}){const e=function(){if(!t||!t.scoringMatrix||!t.alphabetIndexes)return(t,e)=>t===e?0:1;if(t.scoringMatrix.length!==Object.keys(t.alphabetIndexes).length)throw new Error("Scoring matrix and alphabet indexes should have the same length");const e=t.alphabetIndexes,s=t.scoringMatrix,n=Math.min(...Object.keys(e).map((t=>t.charCodeAt(0))))+1,i=new Float32Array((s.length+n)*(s.length+n));return Object.entries(e).forEach((([t,n])=>{const r=s[n];Object.entries(e).forEach((([e,n])=>{i[t.charCodeAt(0)*s.length+e.charCodeAt(0)]=r[n]}))})),(t,e)=>1-i[t.charCodeAt(0)*s.length+e.charCodeAt(0)]}(),s=t?.threshold??0;return(t,n)=>{let i=0;const r=t.length,o=n.length,a=Math.ceil(Math.max(r,o)*(1-s));r!==o&&(i=Math.abs(r-o));let l=0;for(let s=0;s<Math.min(r,o);s++)if(t[s]!==n[s]&&(l+=e(t[s],n[s]),l>a))return 1;return l+=i,l/=Math.max(r,o),l}}s.d(e,{Y:()=>o,S:()=>a});const i=new Uint32Array(65536),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(t){t.HAMMING="Hamming",t.LEVENSHTEIN="Levenshtein",t.NEEDLEMANN_WUNSCH="Needlemann-Wunsch",t.MONOMER_CHEMICAL_DISTANCE="Monomer chemical distance"}(o||(o={}));const a={[o.HAMMING]:n,[o.LEVENSHTEIN]:function(){return(t,e)=>((t,e)=>{if(t.length<e.length){const s=e;e=t,t=s}return 0===e.length?t.length:t.length<=32?((t,e)=>{const s=t.length,n=e.length,r=1<<s-1;let o=-1,a=0,l=s,h=s;for(;h--;)i[t.charCodeAt(h)]|=1<<h;for(h=0;h<n;h++){let t=i[e.charCodeAt(h)];const s=t|a;t|=(t&o)+o^o,a|=~(t|o),o&=t,a&r&&l++,o&r&&l--,a=a<<1|1,o=o<<1|~(s|a),a&=s}for(h=s;h--;)i[t.charCodeAt(h)]=0;return l})(t,e):((t,e)=>{const s=e.length,n=t.length,r=[],o=[],a=Math.ceil(s/32),l=Math.ceil(n/32);for(let t=0;t<a;t++)o[t]=-1,r[t]=0;let h=0;for(;h<l-1;h++){let a=0,l=-1;const c=32*h,u=Math.min(32,n)+c;for(let e=c;e<u;e++)i[t.charCodeAt(e)]|=1<<e;for(let t=0;t<s;t++){const s=i[e.charCodeAt(t)],n=o[t/32|0]>>>t&1,h=r[t/32|0]>>>t&1,c=s|a,u=((s|h)&l)+l^l|s|h;let g=a|~(u|l),d=l&u;g>>>31^n&&(o[t/32|0]^=1<<t),d>>>31^h&&(r[t/32|0]^=1<<t),g=g<<1|n,d=d<<1|h,l=d|~(c|g),a=g&c}for(let e=c;e<u;e++)i[t.charCodeAt(e)]=0}let c=0,u=-1;const g=32*h,d=Math.min(32,n-g)+g;for(let e=g;e<d;e++)i[t.charCodeAt(e)]|=1<<e;let f=n;for(let t=0;t<s;t++){const s=i[e.charCodeAt(t)],a=o[t/32|0]>>>t&1,l=r[t/32|0]>>>t&1,h=s|c,g=((s|l)&u)+u^u|s|l;let d=c|~(g|u),p=u&g;f+=d>>>n-1&1,f-=p>>>n-1&1,d>>>31^a&&(o[t/32|0]^=1<<t),p>>>31^l&&(r[t/32|0]^=1<<t),d=d<<1|a,p=p<<1|l,u=p|~(h|d),c=d&h}for(let e=g;e<d;e++)i[t.charCodeAt(e)]=0;return f})(t,e)})(t,e)/Math.max(t.length,e.length)},[o.NEEDLEMANN_WUNSCH]:function(t){const e=new Uint16Array(65536),{gapOpen:s,gapExtend:n,scoringMatrix:i,alphabetIndexes:o}={...r,...t};Object.entries(o).forEach((([t,s])=>e[t.charCodeAt(0)]=s));const a=[new Float32Array(1e4),new Float32Array(1e4)];return(t,r)=>{const o=new Array(t.length+1).fill(!1),l=new Array(t.length+1).fill(!1);let h=0,c=1;for(let e=1;e<t.length+1;e++)a[0][e]=-s-(e-1)*n,a[1][e]=0;a[0][0]=0;for(let u=1;u<r.length+1;u++){a[c][0]=-s-(u-1)*n;for(let g=1;g<t.length+1;g++){const d=a[h][g-1]+i[e[t.charCodeAt(g-1)]][e[r.charCodeAt(u-1)]],f=a[h][g]-(o[g]?n:s),p=a[c][g-1]-(l[g-1]?n:s);a[c][g]=Math.max(d,p,f),a[c][g]===d?(o[g]=!1,l[g]=!1):a[c][g]===p?(o[g]=!1,l[g]=!0):(o[g]=!0,l[g]=!1)}h=c,c=(c+1)%2}const u=Math.max(t.length,r.length);return(u-a[h][t.length])/u}},[o.MONOMER_CHEMICAL_DISTANCE]:n}},308:(t,e,s)=>{"use strict";s.d(e,{iV:()=>M,sN:()=>H,a8:()=>v,Gu:()=>O,oL:()=>$,ct:()=>_,gz:()=>S,o1:()=>N,Md:()=>L,GM:()=>E,SG:()=>T,ui:()=>d});var n=s(200),i=s(888);s(8);const r=i.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,,,,,,,,,,,,,,,,,,,,,');r.columns.add(i.Column.fromList(i.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))));var o=function(t,e,s,n){return new(s||(s=Promise))((function(i,r){function o(t){try{l(n.next(t))}catch(t){r(t)}}function a(t){try{l(n.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(o,a)}l((n=n.apply(t,e||[])).next())}))};const a=3e4,l=108e5,h=console.log.bind(console),c=console.info.bind(console),u=console.warn.bind(console),g=console.error.bind(console),d={},f="Auto Tests",p="Demo",m="Detectors",y="Core",C={};let x;var A;!function(t){t.notNull=function(t,e){if(null==t)throw new Error(`${null==e?"Value":e} not defined`)}}(A||(A={}));class b{constructor(t,e){this.catchUnhandled=!0,this.report=!1,void 0!==t&&(this.catchUnhandled=t),void 0!==e&&(this.report=e)}}class w{constructor(t,e,s,n){var i;this.category=t,this.name=e,null!=n||(n={}),null!==(i=n.timeout)&&void 0!==i||(n.timeout=a),this.options=n,this.test=()=>o(this,void 0,void 0,(function*(){return new Promise(((t,e)=>o(this,void 0,void 0,(function*(){let n="";try{n=yield s()}catch(t){e(t)}t(n)}))))}))}}function T(t,e,s,n=0,i="timeout"){return o(this,void 0,void 0,(function*(){return new Promise(((r,o)=>{const a=t.subscribe((t=>{try{e(t),r("OK")}catch(t){o(t)}a.unsubscribe(),clearTimeout(l)})),l=setTimeout((()=>{a.unsubscribe(),o(i)}),n);s()}))}))}function E(t,e,s){null==d[x]&&(d[x]={}),null==d[x].tests&&(d[x].tests=[]),d[x].tests.push(new w(x,t,e,s))}function _(t,e=!0,s){if(s=s?`${s}, `:"",t!==e)throw new Error(`${s}Expected "${e}", got "${t}"`)}function I(t,e,s=.001,n){if(t===Number.POSITIVE_INFINITY&&e===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY&&e===Number.NEGATIVE_INFINITY||t===Number.NaN&&e===Number.NaN||isNaN(t)&&isNaN(e))return;const i=Math.abs(t-e)<s;if(_(i,!0,`${null!=n?n:""} (tolerance = ${s})`),!i)throw new Error(`Expected ${e}, got ${t} (tolerance = ${s})`)}function N(t,e){for(const[s,n]of Object.entries(e)){if(!t.hasOwnProperty(s))throw new Error(`Expected property "${s}" not found`);const e=t[s];if(e instanceof Array&&n instanceof Array)S(e,n);else if(e instanceof Object&&n instanceof Object)N(e,n);else if(Number.isFinite(e)&&Number.isFinite(n))I(e,n);else if(e!=n)throw new Error(`Expected (${n}) for key '${s}', got (${e})`)}}function S(t,e){const s=t.length,n=e.length;if(s!=n)throw new Error(`Arrays are of different length: actual array length is ${s} and expected array length is ${n}`);for(let n=0;n<s;n++)if(t[n]instanceof Array&&e[n]instanceof Array)S(t[n],e[n]);else if(t[n]instanceof Object&&e[n]instanceof Object)N(t[n],e[n]);else if(t[n]!=e[n])throw new Error(`Expected ${e[n]} at position ${n}, got ${t[n]}`)}function O(t,e,s){var n;x=t,e(),d[x]&&(d[x].clear=null===(n=null==s?void 0:s.clear)||void 0===n||n,d[x].timeout=null==s?void 0:s.timeout)}function v(t){null==d[x]&&(d[x]={}),d[x].before=t}function M(t){null==d[x]&&(d[x]={}),d[x].after=t}function R(t,e){return t.replace(new RegExp(e.name,"gi"),e.nqName)}function L(t){var e,s,a,l,x,A,T;return o(this,void 0,void 0,(function*(){const E=null===(s=null===(e=n.functions.getCurrentCall())||void 0===e?void 0:e.func)||void 0===s?void 0:s.package;yield function(t,e){var s;return o(this,void 0,void 0,(function*(){const e=t.id;if(C[e])return;const a=d;if(void 0!==a[f]||void 0!==a[p]||Object.keys(a).find((t=>t.startsWith(f)||t.startsWith(y))))return void(C[e]=!0);if("DevTools"===t.name){const t=i.Func.find({tags:["dartTest"]});for(const e of t){const t=e.name.split(/\s*\|\s*/g),n=null!==(s=t.pop())&&void 0!==s?s:e.name,i=t.length?y+": "+t.join(": "):y;void 0===a[i]&&(a[i]={tests:[],clear:!0}),a[i].tests.push(new w(i,n,(()=>o(this,void 0,void 0,(function*(){return yield e.apply()}))),{isAggregated:e.outputs.length>0,timeout:3e5}))}}const l=[],h=[],c=[],u=yield n.dapi.functions.filter(`package.id = "${e}"`).list(),g=new RegExp(/skip:\s*([^,\s]+)|wait:\s*(\d+)|cat:\s*([^,\s]+)|timeout:\s*(\d+)/g);for(const t of u){const e=t.options.test,s=t.options.demoPath;if(e&&Array.isArray(e)&&e.length)for(let s=0;s<e.length;s++){const i=e[s].matchAll(g),r={};Array.from(i).forEach((t=>{t[0].startsWith("skip")?r.skip=t[1]:t[0].startsWith("wait")?r.wait=parseInt(t[2]):t[0].startsWith("cat")?r.cat=t[3]:t[0].startsWith("timeout")&&(r.timeout=parseInt(t[4]))}));const h=new w(f,1===e.length?t.name:`${t.name} ${s+1}`,(()=>o(this,void 0,void 0,(function*(){const i=yield n.functions.eval(R(e[s],t));if(r.wait&&(yield $(r.wait)),"boolean"==typeof i&&!i)throw`Failed: ${e[s]}, expected true, got ${i}`}))),{skipReason:r.skip,timeout:r.timeout});if(r.cat){const t=f+": "+r.cat;h.category=t,void 0===a[t]&&(a[t]={tests:[],clear:!0}),a[t].tests.push(h)}else l.push(h)}if(s){const e=t.options.demoWait?parseInt(t.options.demoWait):void 0,s=new w(p,t.friendlyName,(()=>o(this,void 0,void 0,(function*(){if(n.shell.lastError="",yield t.apply(),yield $(e||2e3),n.shell.lastError)throw new Error(n.shell.lastError)}))),{skipReason:t.options.demoSkip});h.push(s)}if(t.hasTag("semTypeDetector")){const e=new w(m,t.friendlyName,(()=>o(this,void 0,void 0,(function*(){const e=[];for(const s of r.clone().columns){const n=yield t.apply([s]);e.push(n||s.semType)}_(e.filter((t=>t)).length,1)}))),{skipReason:t.options.skipTest});c.push(e)}}C[e]=!0,l.length&&(a[f]={tests:l,clear:!0}),h.length&&(a[p]={tests:h,clear:!0}),c.length&&(a[m]={tests:c,clear:!1})}))}(E);const I=[];console.log("Running tests"),null!=t||(t={}),null!==(a=(T=t).testContext)&&void 0!==a||(T.testContext=new b),n.shell.lastError="";const N=[],S=function(){const t=[];return console.log=(...e)=>{t.push(...e),h(...e)},console.info=(...e)=>{t.push(...e),c(...e)},console.warn=(...e)=>{t.push(...e),u(...e)},console.error=(...e)=>{t.push(...e),g(...e)},t}();try{for(const[e,s]of Object.entries(d)){if((null==t?void 0:t.category)&&!e.toLowerCase().startsWith(null==t?void 0:t.category.toLowerCase())||(null===(l=t.exclude)||void 0===l?void 0:l.some((t=>e.startsWith(t)))))continue;h(`Started ${e} category`),N.push(e);const r=null===(x=s.tests)||void 0===x?void 0:x.every((t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.skipReason}));try{s.before&&!r&&(yield s.before())}catch(t){s.beforeStatus=P(t)}const o=null!==(A=s.tests)&&void 0!==A?A:[],a=[];if(s.clear)for(let e=0;e<o.length;e++)a.push(yield D(o[e],null==t?void 0:t.test,S,s.timeout,E.name,t.verbose)),n.shell.closeAll(),i.Balloon.closeAll();else for(let e=0;e<o.length;e++)a.push(yield D(o[e],null==t?void 0:t.test,S,s.timeout,E.name,t.verbose));const c=a.filter((t=>"skipped"!=t.result));try{s.after&&!r&&(yield s.after())}catch(t){s.afterStatus=P(t)}s.afterStatus&&c.push({category:e,name:"after",result:s.afterStatus,success:!1,ms:0,skipped:!1}),s.beforeStatus&&c.push({category:e,name:"before",result:s.beforeStatus,success:!1,ms:0,skipped:!1}),I.push(...c)}}finally{console.log=h,console.info=c,console.warn=u,console.error=g}if(t.testContext.catchUnhandled&&(yield $(1e3),n.shell.lastError.length>0&&I.push({category:"Unhandled exceptions",name:"exceptions",result:n.shell.lastError,success:!1,ms:0,skipped:!1})),!t.test&&I.length){const e=I.filter((t=>t.success)).length,s=I.filter((t=>t.skipped)).length,r=I.filter((t=>!t.success)),o=E.name;for(const t of N){const e=I.filter((e=>e.category===t)),s=e.filter((t=>!t.success)).length,i={success:0===s,passed:e.filter((t=>t.success)).length,skipped:e.filter((t=>t.skipped)).length,failed:s,type:"package",packageName:o,category:t};n.log.usage(`${o}: ${t}`,i,`category-package ${o}: ${t}`)}if(!t.category){const t={success:0===r.length,passed:e,skipped:s,failed:r.length,type:"package",packageName:o};n.log.usage(o,t,`package-package ${o}`)}if(t.testContext.report){const t=new i.Logger,n="Package @package tested: @successful successful, @skipped skipped, @failed failed tests",o={successful:e,skipped:s,failed:r.length,package:E};for(const t of r)Object.assign(o,{[`${t.category} | ${t.name}`]:t.result});t.log(n,o,"package-tested")}}return I}))}function P(t){return`${t.toString()}\n${t.stack?i.Logger.translateStackTrace(t.stack):""}`}function D(t,e,s,r,c,u){var g,d,f,p,m,y;return o(this,void 0,void 0,(function*(){let o;s.length=0;let C="package";const x=null!=e&&t.name.toLowerCase()!==e.toLowerCase(),A=(null===(g=t.options)||void 0===g?void 0:g.skipReason)||x,b=x?"skipped":null===(d=t.options)||void 0===d?void 0:d.skipReason;A||h(`Started ${t.category} ${t.name}`);const w=Date.now();try{if(A)o={success:!0,result:b,ms:0,skipped:!0};else{let e=(null===(f=t.options)||void 0===f?void 0:f.timeout)===a&&r?r:null===(p=t.options)||void 0===p?void 0:p.timeout;e=i.Test.isInBenchmark&&e===a?l:e,o={success:!0,result:null!==(m=yield k(t.test,e))&&void 0!==m?m:"OK",ms:0,skipped:!1}}}catch(t){o={success:!1,result:P(t),ms:0,skipped:!1}}if((null===(y=t.options)||void 0===y?void 0:y.isAggregated)&&o.result.constructor===i.DataFrame){const t=o.result.col("success");if(C="core",t&&(o.success=t.stats.sum===t.length),!u){const t=o.result;t.columns.remove("stack"),t.rows.removeWhere((t=>t.get("success"))),o.result=t}o.result=o.result.toCsv()}if(o.logs=s.join("\n"),o.ms=Date.now()-w,A||h(`Finished ${t.category} ${t.name} for ${o.ms} ms`),o.category=t.category,o.name=t.name,!x){let e={success:o.success,result:o.result,ms:o.ms,skipped:o.skipped,type:C,packageName:c,category:t.category,test:t.name,logs:o.logs};if(o.result.constructor==Object){const t=Object.keys(o.result).reduce(((t,e)=>Object.assign(Object.assign({},t),{["result."+e]:o.result[e]})),{});e=Object.assign(Object.assign({},e),t)}n.log.usage(`${c}: ${t.category}: ${t.name}`,e,`test-${C} ${c}: ${t.category}: ${t.name}`)}return o}))}function $(t){return o(this,void 0,void 0,(function*(){yield new Promise((e=>setTimeout(e,t)))}))}function H(t,e="Timeout exceeded",s=500,n=50){return o(this,void 0,void 0,(function*(){return new Promise(((i,r)=>{setTimeout((()=>{clearInterval(o),r(new Error(e))}),s);const o=setInterval((()=>{t()&&(clearInterval(o),i())}),n)}))}))}function k(t,e){return o(this,void 0,void 0,(function*(){let s=null;const n=new Promise(((t,n)=>{s=setTimeout((()=>{n("EXECUTION TIMEOUT")}),e)}));try{return yield Promise.race([t(),n])}finally{s&&clearTimeout(s)}}))}i.DataFrame.fromColumns([i.Column.fromStrings("col",["val1","val2","val3"])])},8:function(t,e,s){var n;!function(e,i){var r={};!function(t){"use strict";t.__esModule=!0,t.digestLength=32,t.blockSize=64;var e=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function s(t,s,n,i,r){for(var o,a,l,h,c,u,g,d,f,p,m,y,C;r>=64;){for(o=s[0],a=s[1],l=s[2],h=s[3],c=s[4],u=s[5],g=s[6],d=s[7],p=0;p<16;p++)m=i+4*p,t[p]=(255&n[m])<<24|(255&n[m+1])<<16|(255&n[m+2])<<8|255&n[m+3];for(p=16;p<64;p++)y=((f=t[p-2])>>>17|f<<15)^(f>>>19|f<<13)^f>>>10,C=((f=t[p-15])>>>7|f<<25)^(f>>>18|f<<14)^f>>>3,t[p]=(y+t[p-7]|0)+(C+t[p-16]|0);for(p=0;p<64;p++)y=(((c>>>6|c<<26)^(c>>>11|c<<21)^(c>>>25|c<<7))+(c&u^~c&g)|0)+(d+(e[p]+t[p]|0)|0)|0,C=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&a^o&l^a&l)|0,d=g,g=u,u=c,c=h+y|0,h=l,l=a,a=o,o=y+C|0;s[0]+=o,s[1]+=a,s[2]+=l,s[3]+=h,s[4]+=c,s[5]+=u,s[6]+=g,s[7]+=d,i+=64,r-=64}return i}var n=function(){function e(){this.digestLength=t.digestLength,this.blockSize=t.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return e.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},e.prototype.clean=function(){for(var t=0;t<this.buffer.length;t++)this.buffer[t]=0;for(t=0;t<this.temp.length;t++)this.temp[t]=0;this.reset()},e.prototype.update=function(t,e){if(void 0===e&&(e=t.length),this.finished)throw new Error("SHA256: can't update because hash was finished.");var n=0;if(this.bytesHashed+=e,this.bufferLength>0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=t[n++],e--;64===this.bufferLength&&(s(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(n=s(this.temp,this.state,t,n,e),e%=64);e>0;)this.buffer[this.bufferLength++]=t[n++],e--;return this},e.prototype.finish=function(t){if(!this.finished){var e=this.bytesHashed,n=this.bufferLength,i=e/536870912|0,r=e<<3,o=e%64<56?64:128;this.buffer[n]=128;for(var a=n+1;a<o-8;a++)this.buffer[a]=0;this.buffer[o-8]=i>>>24&255,this.buffer[o-7]=i>>>16&255,this.buffer[o-6]=i>>>8&255,this.buffer[o-5]=i>>>0&255,this.buffer[o-4]=r>>>24&255,this.buffer[o-3]=r>>>16&255,this.buffer[o-2]=r>>>8&255,this.buffer[o-1]=r>>>0&255,s(this.temp,this.state,this.buffer,0,o),this.finished=!0}for(a=0;a<8;a++)t[4*a+0]=this.state[a]>>>24&255,t[4*a+1]=this.state[a]>>>16&255,t[4*a+2]=this.state[a]>>>8&255,t[4*a+3]=this.state[a]>>>0&255;return this},e.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},e.prototype._saveState=function(t){for(var e=0;e<this.state.length;e++)t[e]=this.state[e]},e.prototype._restoreState=function(t,e){for(var s=0;s<this.state.length;s++)this.state[s]=t[s];this.bytesHashed=e,this.finished=!1,this.bufferLength=0},e}();t.Hash=n;var i=function(){function t(t){this.inner=new n,this.outer=new n,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var e=new Uint8Array(this.blockSize);if(t.length>this.blockSize)(new n).update(t).finish(e).clean();else for(var s=0;s<t.length;s++)e[s]=t[s];for(s=0;s<e.length;s++)e[s]^=54;for(this.inner.update(e),s=0;s<e.length;s++)e[s]^=106;for(this.outer.update(e),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate),s=0;s<e.length;s++)e[s]=0}return t.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},t.prototype.clean=function(){for(var t=0;t<this.istate.length;t++)this.ostate[t]=this.istate[t]=0;this.inner.clean(),this.outer.clean()},t.prototype.update=function(t){return this.inner.update(t),this},t.prototype.finish=function(t){return this.outer.finished?this.outer.finish(t):(this.inner.finish(t),this.outer.update(t,this.digestLength).finish(t)),this},t.prototype.digest=function(){var t=new Uint8Array(this.digestLength);return this.finish(t),t},t}();function r(t){var e=(new n).update(t),s=e.digest();return e.clean(),s}function o(t,e){var s=new i(t).update(e),n=s.digest();return s.clean(),n}function a(t,e,s,n){var i=n[0];if(0===i)throw new Error("hkdf: cannot expand more");e.reset(),i>1&&e.update(t),s&&e.update(s),e.update(n),e.finish(t),n[0]++}t.HMAC=i,t.hash=r,t.default=r,t.hmac=o;var l=new Uint8Array(t.digestLength);t.hkdf=function(t,e,s,n){void 0===e&&(e=l),void 0===n&&(n=32);for(var r=new Uint8Array([1]),h=o(e,t),c=new i(h),u=new Uint8Array(c.digestLength),g=u.length,d=new Uint8Array(n),f=0;f<n;f++)g===u.length&&(a(u,c,s,r),g=0),d[f]=u[g++];return c.clean(),u.fill(0),r.fill(0),d},t.pbkdf2=function(t,e,s,n){for(var r=new i(t),o=r.digestLength,a=new Uint8Array(4),l=new Uint8Array(o),h=new Uint8Array(o),c=new Uint8Array(n),u=0;u*o<n;u++){var g=u+1;a[0]=g>>>24&255,a[1]=g>>>16&255,a[2]=g>>>8&255,a[3]=g>>>0&255,r.reset(),r.update(e),r.update(a),r.finish(h);for(var d=0;d<o;d++)l[d]=h[d];for(d=2;d<=s;d++){r.reset(),r.update(h).finish(h);for(var f=0;f<o;f++)l[f]^=h[f]}for(d=0;d<o&&u*o+d<n;d++)c[u*o+d]=l[d]}for(u=0;u<o;u++)l[u]=h[u]=0;for(u=0;u<4;u++)a[u]=0;return r.clean(),c}}(r);var o=r.default;for(var a in r)o[a]=r[a];"object"==typeof t.exports?t.exports=o:void 0===(n=function(){return o}.call(r,s,r,t))||(t.exports=n)}()},408:(t,e,s)=>{"use strict";s.d(e,{_package:()=>l,getMonomerLib:()=>h}),s(200),s(304);var n=s(888);s(482),s(372),JSDraw2,s(592),s(736),s(688),s(788),s(980);var i=s(248),r=s(824);s(468),s(308);class o{constructor(t,e,s="missing",n){if(this.biotype=t,this.id=e,this.n=s,this.m=n,this.backgroundcolor="#FF4444",this.linecolor="#800000",this.textcolor="#FFFFFF",this.at={R1:"H",R2:"H",R3:"H",R4:"H",R5:"H",R6:"H",R7:"H",R8:"H",R9:"H"},this.objId=++o.objCounter,!this.id)throw new Error("Not supported undefined [id].");return new Proxy(this,{get:(t,e,s)=>{const n=`${this.toLog()}.proxy.get( '${String(e)}' )`;switch(e){case"id":case"at":case"na":case"nature":case"backgroundcolor":case"linecolor":case"textcolor":return t[e];case"rs":throw new Error('Not supported get "rs" attribute.');default:return l.logger.warning(`${n}`),t[e]}},set:(t,e,s,n)=>{throw new Error(`Not supported set '${String(e)}' attribute, any.`)},apply:(t,e,s)=>{throw new Error(`Not supported call (apply) '${e.toString()}' method, any.`)}})}toLog(){return`Helm: DummyWebEditorMonomer<${this.objId}>`}}o.objCounter=-1,r.Cu,s(872),s(924),i.I5,n.GridCellRenderer;let a=null;const l=new n.Package;function h(){return a}},788:(t,e,s)=>{"use strict";s.d(e,{__:()=>u,a6:()=>c,aY:()=>l,kR:()=>h});var n=s(482),i=s(372);const r=/\{(\*\.)+/g,o=/\.(\*\.)+/g,a=/(\.\*)+\}/g;function l(t){return t.replaceAll(r,"{").replaceAll(o,".").replaceAll(a,"}").replace("{*}","{}")}function h(t,e){const s=[];for(let n=0;n<(t??[]).length;++n){const i=e.indexOf(t[n]),r=e.slice(0,i);s.push(r),s.push(t[n]),e=e.substring(i+t[n].length)}return s.push(e),s}function c(t){t=f(t,"$")[0];const e=[];if(!n.Utils.isNullOrEmpty(t)){const s=f(t,"|");for(let n=0;n<s.length;++n){let i=(t=p(s[n]).str).indexOf("{");i=(t=t.substring(i+1)).indexOf("}");const r=f(t=t.substring(0,i),".");for(const t of r)if(t&&""!==t)if(t.startsWith("[")&&t.includes("]")){const s=g(t,1,"[","]"),n=t.substring(1,s);e.push(n);const i=t.substring(s+1);r.push(i)}else if(t.includes("[")&&t.endsWith("]")){const s=d(t,t.length-2,"[","]"),n=t.substring(s+1,t.length-1);e.push(n);const i=t.substring(0,s);r.push(i)}else if(t.includes("(")&&t.includes(")")){const e=t.substring(0,t.indexOf("(")),s=t.substring(t.lastIndexOf(")")+1),n=[e,t.substring(e.length+1,t.length-s.length-1),s];for(const t of n)r.push(t)}else e.push(t)}}return e}function u(t){const e=Object.keys(i.helm.webeditor.monomerTypeList()),s=[],n=[];for(let t=0;t<e.length;t++)s.push(new i.helm.webeditor.Monomers.getMonomerSet(e[t])),Object.keys(s[t]).forEach((e=>{n.push(s[t][e].id)}));return new Set(t.filter((t=>!n.includes(t))))}function g(t,e,s,n){let i=e,r=0;for(;i<t.length;){if(t[i]===s&&r++,t[i]===n){if(0===r)return i;r--}i++}return-1}function d(t,e,s,n){let i=e,r=0;for(;i>=0;){if(t[i]===n&&r++,t[i]===s){if(0===r)return i;r--}i--}return-1}function f(t,e){const s=[];let n="",i=0,r=0,o=0,a=0;for(let l=0;l<t.length;++l){let h=t.substring(l,l+1);if(h==e&&0==r&&0==i&&0==o&&0==a)s.push(n),n="";else{if(n+=h,a>0&&"\\"==h&&l+1<t.length){++l;const e=t.substring(l,l+1);n+=e,h+=e}'"'==h?l>0&&"\\"==t.substring(l-1,l)||(a=0==a?1:0):"["==h?++r:"]"==h?--r:"("==h?++i:")"==h?--i:"{"==h?++o:"}"==h&&--o}}return s.push(n),s}function p(t){const e=m(t,'"');if(null!=e.tag)return e;const s=m(t,"'");return{tag:e.tag,repeat:s.tag,str:s.str}}function m(t,e){let s=null;if(n.Utils.endswith(t,e)){let n=t.length-1;for(;n>0&&(n=t.lastIndexOf(e,n-1),!(n<=0||"\\"!=t.substring(n-1,n))););n>0&&n<t.length-1&&(s=t.substring(n+1,t.length-1),t=t.substring(0,n))}return null!=s&&(s=function(t){return n.Utils.isNullOrEmpty(t)?t:t.replace(/[\\]./g,(function(t){switch(t){case"\\r":return"\r";case"\\n":return"\n";case"\\t":return"\t";default:return t.substring(1)}}))}(s.replace(new RegExp("\\"+e,"g"),e))),{tag:s,str:t}}},980:(t,e,s)=>{"use strict";s.d(e,{C:()=>l});var n=s(304),i=(s(888),s(592)),r=s.n(i),o=(s(688),s(736)),a=s(788);function l(t,e){const s=e.isHelm()?t:e.getConverter(o.qD.HELM)(t),i=(0,a.aY)(s),l=n.div([],{style:{width:"0",height:"0"}});document.documentElement.appendChild(l);try{const t=new JSDraw2.Editor(l,{viewonly:!0});t.setHelm(i);const e=t.getFormula(!0),s=Math.round(100*t.getMolWeight())/100,n=Math.round(100*t.getExtinctionCoefficient(!0))/100;return{formula:e.replace(/<sub>/g,"").replace(/<\/sub>/g,""),"molecular weight":s,"extinction coefficient":n}}finally{r()(l).empty(),l.remove()}}},592:t=>{"use strict";t.exports=$},888:t=>{"use strict";t.exports=DG},200:t=>{"use strict";t.exports=grok},372:t=>{"use strict";t.exports=org},468:t=>{"use strict";t.exports=rxjs},482:t=>{"use strict";t.exports=scil},304:t=>{"use strict";t.exports=ui},848:t=>{"use strict";t.exports=wu}},e={};function s(n){var i=e[n];if(void 0!==i)return i.exports;var r=e[n]={exports:{}};return t[n].call(r.exports,r,r.exports,s),r.exports}s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var n in e)s.o(e,n)&&!s.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";s.r(n),s.d(n,{_package:()=>R,test:()=>L,tests:()=>e.ui});var t=s(888),e=s(308),i=s(788);(0,e.Gu)("Helm",(()=>{const t=[["L-hArg(Et,Et)","E","F","G","C","E"],["L-hArg(Et,Et)","L-hArg(Et,Et)","E","F","G"],["dhp","m1A","p","r","T","p","r","T","p","r","G","p"],["r","mo6pur","p","r","T","p","r","T","p","r","G","p"],["afhna","mo6pur","36SS","r","T","p"]],s=["comples-monomer","complex-monomer+side-chain","complex-monomer+side-chain-RNA","complex-side-chain","complex+side-chain+linker"];(0,e.GM)("parseHelm",(async()=>{const t=[["meI","hHis","Aca","N","T","dK","Thr_PO3H2","D-Tyr_Et","Aze","dV","E","Phe_4Me"],["A","C","T","G","W","E","Q"],["R","U","P","T","A"],["A","*","G","C"]],s=["PEPTIDE1{meI.hHis.Aca.N.T.dK.Thr_PO3H2.Aca.D-Tyr_Et.Aze.dV.E.N.dV.Phe_4Me}$$$","PEPTIDE1{A.C.T.G.C.T.W.G.T.W.E.C.W.C.Q.W}|PEPTIDE2{A.C.T.G.C.T.W.G.T.W.E.Q}$PEPTIDE1,PEPTIDE1,5:R3-14:R3|PEPTIDE2,PEPTIDE1,2:R3-12:R3$$$","RNA1{R(U)P.R(T)P}|RNA2{P.R(A)P.R(A)}$RNA1,RNA2,2:pair-6:pair|RNA1,RNA2,5:pair-3:pair$$$","PEPTIDE1{A.*.G.C}$$$$V2.0"];for(let n=0;n<s.length;++n){const r=new Set((0,i.a6)(s[n])),o=Array.from(r);(0,e.ct)(JSON.stringify(o),JSON.stringify(t[n]))}})),["PEPTIDE1{[L-hArg(Et,Et)].E.F.G}|PEPTIDE2{C.E}$PEPTIDE1,PEPTIDE2,2:R3-1:R1$$$V2.0","PEPTIDE1{[L-hArg(Et,Et)]([L-hArg(Et,Et)]).E.F.G}$$$$","RNA1{[dhp]([m1A])p.r(T)p.r(T)p.r(G)p}$$$$V2.0","RNA1{r([mo6pur])p.r(T)p.r(T)p.r(G)p}$$$$V2.0","RNA1{[afhna]([mo6pur])[36SS].r(T)p}$$$$V2.0"].forEach(((n,r)=>{(0,e.GM)(s[r],(async()=>{const s=(0,i.a6)(n);s.sort();const o=t[r];o.sort(),(0,e.gz)(s,o)}))}))}));var r=s(460),o=s(200);const a="Libraries",l={explicit:["HELMCoreLibrary.json"],exclude:[]};let h=Promise.resolve();async function c(){let t;return h=h.then((async()=>{const e=await o.dapi.userDataStorage.getValue(a,"Settings",!0);t=e?JSON.parse(e):{exclude:[],explicit:[]},t.exclude=t.exclude instanceof Array?t.exclude:[],t.explicit=t.explicit instanceof Array?t.explicit:[],console.debug(`Bio: getUserLibSettings()\n${JSON.stringify(t,void 0,2)}`)})),await h,t}async function u(t){h=h.then((async()=>{console.debug(`Bio: setUserLibSettings()\n${JSON.stringify(t,void 0,2)}`),await o.dapi.userDataStorage.postValue(a,"Settings",JSON.stringify(t),!0)})),await h}async function g(){await u(l)}(0,e.Gu)("findMonomers",(()=>{let t,s;(0,e.a8)((async()=>{t=await(0,r.wW)(),s=await c(),await g(),await t.loadLibraries(!0)})),(0,e.iV)((async()=>{await u(s),await t.loadLibraries(!0)}));const n={withoutMissed:{test:"PEPTIDE1{meI.hHis.Aca.N.T.dE.Thr_PO3H2.Aca.D-Tyr_Et}$$$$",tgt:new Set},withMissed:{test:"PEPTIDE1{meI.missed2.Aca.N.T.dE.Thr_PO3H2.Aca.D-Tyr_Et}$$$$",tgt:new Set(["missed2"])}};for(const[t,s]of Object.entries(n))(0,e.GM)(t,(async()=>{o(s.test,s.tgt)}));function o(t,s){const n=(0,i.a6)(t),r=(0,i.__)(n);(0,e.o1)(r,s)}}));var d=s(468),f=s(824);(0,e.Gu)("HelmService",(()=>{let s,n,i;(0,e.a8)((async()=>{const t="Helm: tests: HelmService: before";R.logger.debug(`${t}, start`);try{s=await(0,r.wW)(),n=await c(),await(0,e.oL)(1e3),await g(),await s.loadLibraries(!0),s.getBioLib().getSummary(),i=await(0,f.cF)(),await i.reset(),R.logger.debug(`${t}, end`)}finally{R.logger.debug(`${t}, fina`)}})),(0,e.iV)((async()=>{const t="Helm: tests: HelmService: after";R.logger.debug(`${t}, start`),await i.reset(),await u(n),await s.loadLibraries(!0),R.logger.debug(`${t}, end`)})),(0,e.GM)("helm",(async()=>{const s="Helm: tests: HelmService: helm";R.logger.debug(`${s}, start`);let n=null,r=null;const o=new d.Subject;await(0,e.SG)(o,(()=>{}),(()=>{const e={name:"test1",props:{helm:"PEPTIDE1{I.H.A.N.T.Thr_PO3H2.Aca.D-Tyr_Et}$$$$",backColor:t.Color.fromHtml("#FFFFFF"),width:300,height:100},onAfterRender:(t,e)=>{r=e,o.next()}};i.reset(),n=i.render(n,e,0)}),7e3),(0,e.ct)(null!==r,!0,"Helm task aux is null"),(0,e.ct)(r.mol.atoms.length>0,!0,"Polymer mol atoms empty"),(0,e.ct)(r.mol.atoms.length,8),(0,e.ct)(r.mol.bonds.length,7),(0,e.ct)(i.errorCount,0,"There was errors in NglGlService."),(0,e.ct)(null!==n,!0,"consumerId not assigned"),R.logger.debug(`${s}, end`)}),{timeout:1e4})}));var p,m=s(304),y=s(592),C=s.n(y),x=s(736);async function A(t,s=5e3){await(0,e.oL)(100),await(0,e.SG)(t.onAfterDrawContent,(()=>{}),(()=>{t.invalidate()}),s)}(0,e.Gu)("renderers",(()=>{let s,n;(0,e.a8)((async()=>{s=await(0,r.wW)(),n=await c(),await g(),await s.loadLibraries(!0)})),(0,e.iV)((async()=>{await u(n),await s.loadLibraries(!0)})),(0,e.GM)("missedInLib",(async()=>{await async function(){const s=await o.dapi.files.readCsv("System:AppData/Helm/tests/sample_HELM-missedInLib.csv"),n=s.getCol("HELM"),i=o.shell.addTableView(s);await(0,e.sN)((()=>C()(i.root).find(".d4-grid canvas").length>0),"Table view canvas not found",100),(0,e.ct)(n.semType,t.SEMTYPE.MACROMOLECULE),(0,e.ct)(n.getTag(t.TAGS.UNITS),x.qD.HELM),(0,e.ct)(n.getTag(t.TAGS.CELL_RENDERER),"helm");const r=n.getTag(".cell-renderer.render.error");if(r){const t=JSON.parse(r),e=new Error(t.message);throw e.stack=t.stack,e}}()})),(0,e.GM)("scatterPlotTooltip",(async()=>{await async function(){const s=t.DataFrame.fromCsv(i);s.currentRowIdx=0;const n=o.shell.addTableView(s),r=s.plot.scatter({x:"x",y:"y"});n.dockManager.dock(r,t.DOCK_TYPE.RIGHT,null),await Promise.all([(0,e.SG)(r.onAfterDrawScene,(()=>{}),(()=>{r.invalidateCanvas()}),1e3),A(n.grid,500)]);const a=r.root.getBoundingClientRect(),l=r.worldToScreen(1,0),h=new MouseEvent("mousemove",{cancelable:!0,bubbles:!0,view:window,button:0,clientX:a.left+l.x,clientY:a.top+l.y}),c=C()(r.root).find("canvas").get()[0];await(0,e.SG)((0,d.fromEvent)(c,"mousemove"),(()=>{R.logger.debug(`Test: event, currentRowIdx=${s.currentRowIdx}`),(0,e.ct)(C()(m.tooltip.root).find("div table.d4-row-tooltip-table tr td canvas").length,1),(0,e.ct)(r.hitTest(l.x,l.y),1)}),(()=>{c.dispatchEvent(h)}),500),await A(n.grid,500)}()}));const i="seq,x,y\nPEPTIDE1{I.H.A.N.T.Thr_PO3H2.Aca.D-Tyr_Et}$$$$,0,0\nRNA1{r(A)p.r(C)p.r(G)p.r(U)p}$$$$,1,0\nRNA1{d(A)p.d(C)p.d(G)p.d(U)p}|PEPTIDE1{I.H.A.N.T.Thr_PO3H2}$$$$,0,1\n"})),function(t){t.TYPE="V2000",t[t.NUM_OF_HEADER_LINES=3]="NUM_OF_HEADER_LINES",t[t.NUM_OF_COUNTS_DIGITS=3]="NUM_OF_COUNTS_DIGITS",t[t.ATOM_TYPE_COL=4]="ATOM_TYPE_COL",t[t.FIRST_BONDED_ATOM_COL=1]="FIRST_BONDED_ATOM_COL",t[t.BOND_TYPE_COL=3]="BOND_TYPE_COL",t[t.RGP_SHIFT=8]="RGP_SHIFT",t[t.MAX_ATOM_COUNT=999]="MAX_ATOM_COUNT",t.RGP_LINE_START="M RGP",t.ATOM_ALIAS_LINE_START="A ",t.END="M END"}(p||(p={}));class b{constructor(t){this.init(t)}init(t){this.fileContent=t.replace(/\r/g,""),this._atomCount=void 0,this._atomTypes=void 0,this._bondCount=void 0,this._bondTypes=void 0,this.xyzAtomCoordinates=void 0,this._pairsOfBondedAtoms=void 0}get atomCount(){return void 0===this._atomCount&&this.setAtomAndBondCounts(),this._atomCount}get bondCount(){return void 0===this._bondCount&&this.setAtomAndBondCounts(),this._bondCount}get x(){var t;return null!==(t=this.xyzAtomCoordinates)&&void 0!==t||(this.xyzAtomCoordinates=this.parseAtomCoordinates()),this.xyzAtomCoordinates.x}get y(){var t;return null!==(t=this.xyzAtomCoordinates)&&void 0!==t||(this.xyzAtomCoordinates=this.parseAtomCoordinates()),this.xyzAtomCoordinates.y}get z(){var t;return null!==(t=this.xyzAtomCoordinates)&&void 0!==t||(this.xyzAtomCoordinates=this.parseAtomCoordinates()),this.xyzAtomCoordinates.z}get atomTypes(){var t;return null!==(t=this._atomTypes)&&void 0!==t||(this._atomTypes=this.parseAtomTypes()),this._atomTypes}get pairsOfBondedAtoms(){var t;return null!==(t=this._pairsOfBondedAtoms)&&void 0!==t||(this._pairsOfBondedAtoms=this.parseBondedAtomPairs()),this._pairsOfBondedAtoms}get bondTypes(){var t;return null!==(t=this._bondTypes)&&void 0!==t||(this._bondTypes=this.parseBondTypes()),this._bondTypes}setAtomAndBondCounts(){const{atomCount:t,bondCount:e}=this.parseAtomAndBondCounts();this._atomCount=t,this._bondCount=e}getNextColumnIdx(t){for(;!this.isWhitespace(t);)++t;for(;this.isWhitespace(t);)++t;return t}shiftIdxToSpecifiedColumn(t,e){let s=t;const n=this.isWhitespace(s)?e:e-1;for(let t=0;t<n;t++)s=this.getNextColumnIdx(s);return s}parseAtomTypes(){const t=this.atomCount,e=new Array(t);let s=this.getAtomBlockIdx();for(let n=0;n<t;n++)s=this.shiftIdxToAtomType(s),e[n]=this.parseAtomType(s),s=this.getNextLineIdx(s);return e}parseAtomCoordinates(){const t=new Float32Array(this.atomCount),e=new Float32Array(this.atomCount),s=new Float32Array(this.atomCount);let n=this.getAtomBlockIdx();for(let i=0;i<this.atomCount;i++){n=this.shiftIdxToXColumn(n);for(const r of[t,e,s])r[i]=this.parseFloatValue(n),n=this.getNextColumnIdx(n);n=this.getNextLineIdx(n)}return{x:t,y:e,z:s}}parseBondedAtomPairs(){const t=new Array(this.bondCount);let e=this.getBondBlockIdx();for(let s=0;s<this.bondCount;s++){e=this.shiftIdxToBondedAtomsPair(e);const n=new Uint16Array(2);n[0]=this.parseIntValue(e),e=this.getNextColumnIdx(e),n[1]=this.parseIntValue(e),t[s]=n,e=this.getNextLineIdx(e)}return t}parseBondTypes(){const t=this.bondCount,e=new Uint16Array(t);let s=this.getBondBlockIdx();for(let n=0;n<t;n++)s=this.shiftIdxToBondType(s),e[n]=this.parseIntValue(s),s=this.getNextLineIdx(s);return e}isWhitespace(t){const e=this.fileContent[t];return" "===e||"\t"===e}getNextLineIdx(t){return"\n"!==this.fileContent[t]?this.fileContent.indexOf("\n",t)+1:t+1}parseFloatValue(t){return this.parseNumericValue(parseFloat,t)}parseIntValue(t){return this.parseNumericValue(parseInt,t)}parseNumericValue(t,e){let s=e+1;for(;!this.isWhitespace(s);)++s;return t(this.fileContent.substring(e,s))}}class w extends b{constructor(t){super(t),this.init(t)}init(t){super.init(t)}parseAtomType(t){let e=t,s=e;return this.isQuote(e)?(s=this.getNextIdenticalChar(e),e++):s=this.fileContent.indexOf(" ",s),this.fileContent.substring(e,s)}isQuote(t){const e=this.fileContent[t].charCodeAt(0);return 39===e||34===e}getNextIdenticalChar(t){const e=this.fileContent[t];return e?this.fileContent.indexOf(e,t+1):-1}isQuery(){return this.isQueryOrFragment(((t,e)=>{return 39===t||34===t||76===t&&!((s=this.fileContent.charCodeAt(e+1))>64&&s<91||s>96&&s<123);var s}))}isFragment(){return this.isQueryOrFragment((t=>82===t||42===t))}isQueryOrFragment(t){const e=this.atomCount;let s=this.getAtomBlockIdx();for(let n=0;n<e;n++){if(s=this.shiftIdxToAtomType(s),t(this.fileContent.charCodeAt(s),s))return!0;s=this.getNextLineIdx(s)}return!1}}class T extends w{constructor(t){super(t)}getAtomLines(){const t=this.getAtomBlockIdx(),e=this.getBondBlockIdx();return this.fileContent.substring(t,e).split("\n").slice(0,this.atomCount)}getBondLines(){const t=this.getBondBlockIdx();return this.fileContent.substring(t).split("\n").slice(0,this.bondCount)}getRGroupIdToAtomicIdxMap(){const t=new Map,e=this.fileContent.split("\n");e.filter((t=>t.startsWith(p.RGP_LINE_START))).forEach((e=>{const s=this.getAtomIdxToRgpIdxList(e);for(const[e,n]of s){if(t.has(e))throw new Error(`R group ${e} is already in the map`);t.set(e,n)}}));const s=e.map(((t,e)=>{if(t.startsWith(p.ATOM_ALIAS_LINE_START))return e})).filter((t=>void 0!==t)),n=s.map((t=>e[t])),i=s.map((t=>e[t+1]));n.forEach(((e,s)=>{const n=parseInt(e.split(/\s+/)[1])-1,r=parseInt(i[s].substring(1));if(t.has(r))throw new Error(`R group ${r} is already in the map`);t.set(r,n)}));const r=this.getRGroupAtomicIndices().filter((e=>!Array.from(t.values()).includes(e)));if(0!==r.length)throw new Error(`Unaccounted R group indices: ${r}`);return t}getAtomIdxToRgpIdxList(t){const e=t.split(/\s+/).filter((t=>t)).slice(3).map((t=>parseInt(t))),s=new Array(e.length/2);for(let t=0;t<e.length;t+=2)s[t/2]=[e[t+1],e[t]-1];return s}getRGroupAtomicIndices(){return this.atomTypes.map(((t,e)=>{if(t.includes("R#"))return e})).filter((t=>void 0!==t))}static isValidMolfile(t){return-1!==t.indexOf(p.TYPE)&&-1!==t.indexOf(p.END)}shiftIdxToAtomType(t){return this.shiftIdxToSpecifiedColumn(t,p.ATOM_TYPE_COL)}getCountsLineIdx(){let t=0;for(let e=0;e<p.NUM_OF_HEADER_LINES;++e)t=this.getNextLineIdx(t);return t}getAtomBlockIdx(){let t=this.getCountsLineIdx();return t=this.getNextLineIdx(t),t}shiftIdxToXColumn(t){return this.getNextColumnIdx(t)}shiftIdxToBondedAtomsPair(t){return this.shiftIdxToSpecifiedColumn(t,p.FIRST_BONDED_ATOM_COL)}shiftIdxToBondType(t){return this.shiftIdxToSpecifiedColumn(t,p.BOND_TYPE_COL)}getBondBlockIdx(){let t=this.getAtomBlockIdx();for(let e=0;e<this.atomCount;e++)t=this.getNextLineIdx(t);return t}parseAtomAndBondCounts(){let t=this.getCountsLineIdx(),e=t+p.NUM_OF_COUNTS_DIGITS;const s=parseInt(this.fileContent.substring(t,e));return t=e,e+=p.NUM_OF_COUNTS_DIGITS,{atomCount:s,bondCount:parseInt(this.fileContent.substring(t,e))}}}class E extends w{constructor(t){super(t),this.init(t)}getAtomLines(){const t=this.getAtomBlockIdx(),e=this.getBondBlockIdx();return this.fileContent.substring(t,e).split("\n").slice(0,this.atomCount)}getBondLines(){const t=this.getBondBlockIdx();return this.fileContent.substring(t).split("\n").slice(0,this.bondCount)}getRGroupIdToAtomicIdxMap(){const t=new Map;return this.getAtomLines().forEach(((e,s)=>{const n=e.match(/RGROUPS=\(([\d\s]+)\)/);if(n){const e=n[1].split(/\s+/).map((t=>parseInt(t)));if(e.length>2)throw new Error(`R group data ${e} has more than 2 elements`);const i=e[1];if(t.has(i))throw new Error(`R group ${i} is already in the map`);t.set(i,s)}})),t}shiftIdxToAtomType(t){return this.shiftIdxToSpecifiedColumn(t,4)}getCountsLineIdx(){return this.fileContent.indexOf("M V30 COUNTS ")}getAtomBlockIdx(){let t=this.fileContent.indexOf("M V30 BEGIN ATOM");return t=this.getNextLineIdx(t),t}shiftIdxToXColumn(t){let e=this.shiftIdxToAtomType(t);return this.isQuote(e)?(e=this.getNextIdenticalChar(e),e=this.getNextColumnIdx(e),e):this.shiftIdxToSpecifiedColumn(t,5)}shiftIdxToBondedAtomsPair(t){return this.shiftIdxToSpecifiedColumn(t,5)}shiftIdxToBondType(t){return this.shiftIdxToSpecifiedColumn(t,4)}getBondBlockIdx(){return this.getNextLineIdx(this.fileContent.indexOf("M V30 BEGIN BOND"))}static isValidMolfile(t){return-1!==t.indexOf("V3000")&&-1!==t.indexOf("M END")}parseAtomAndBondCounts(){let t=this.fileContent.indexOf("M V30 COUNTS ")+14,e=this.fileContent.indexOf(" ",t+1);const s=parseInt(this.fileContent.substring(t,e));return t=e+1,e=this.fileContent.indexOf(" ",t+1),{atomCount:s,bondCount:parseInt(this.fileContent.substring(t,e))}}}class _{constructor(){}static getInstance(t){if(_.isMolfileV2K(t))return new T(t);if(_.isMolfileV3K(t))return new E(t);throw new Error("Malformed molfile")}static isMolfileV2K(t){return T.isValidMolfile(t)}static isMolfileV3K(t){return E.isValidMolfile(t)}}(0,e.Gu)("getMolfiles",(()=>{let s,n;(0,e.a8)((async()=>{s=await(0,r.wW)(),n=await c(),await g(),await s.loadLibraries(!0)})),(0,e.iV)((async()=>{await u(n),await s.loadLibraries(!0)})),(0,e.GM)("linear1",(async()=>{const s=t.DataFrame.fromCsv("Helm, atoms, bonds\nPEPTIDE1{meI.hHis.Aca.N.T.dE.Thr_PO3H2.Aca.D-Tyr_Et.Tyr_ab-dehydroMe.dV}$$$$,11,10\nPEPTIDE1{meI.hHis.Aca.Cys_SEt.T.dK.Thr_PO3H2.Aca.Tyr_PO3H2.D-Chg.dV}$$$$,11,10\nPEPTIDE1{Lys_Boc.hHis.Aca.Cys_SEt.T.dK.Thr_PO3H2.Aca.Tyr_PO3H2}$$$$,9,8"),n=s.getCol("Helm"),i=o.shell.addTableView(s);R.logger.debug("Helm/getMolfiles/linear1, grid awaiting 1"),await A(i.grid,5e3),R.logger.debug("Helm/getMolfiles/linear1, grid awaited 1");const r=await o.functions.call("Helm:getMolfiles",{col:n});(0,e.ct)(r.length,n.length);const a=r.toList().map((t=>_.getInstance(t)));(0,e.gz)(a.map((t=>t.atomCount)),s.getCol("atoms").toList()),(0,e.gz)(a.map((t=>t.bondCount)),s.getCol("bonds").toList()),R.logger.debug("Helm/getMolfiles/linear1, grid awaiting 2"),await A(i.grid,5e3),R.logger.debug("Helm/getMolfiles/linear1, grid awaited 2")}))}));var I=s(688),N=s(980);const S={Helm:{seq:"PEPTIDE1{I.H.A.C.T.[Thr_PO3H2].[Aca].[D-Tyr_Et]}|PEPTIDE2{E.A.[meG]}$PEPTIDE1,PEPTIDE2,4:R3-1:R1$$$V2.0",units:x.qD.HELM,res:{formula:"C58H94N13O21SP","molecular weight":1372.48,"extinction coefficient":1.55}},separator:{seq:"I/H/A/C/T/Thr_PO3H2/Aca/D-Tyr_Et",units:x.qD.SEPARATOR,separator:"/",alphabet:"UN",res:{formula:"C47H77N10O15SP","molecular weight":1085.21,"extinction coefficient":1.55}},separator2:{seq:"meI/hHis/Aca/N/T/dK/Thr_PO3H2/Aca/D-Tyr_Et/Aze/dV/E/N////Phe_4Me",units:x.qD.SEPARATOR,separator:"/",alphabet:"UN",res:{formula:"C91H146N19O25P","molecular weight":1937.21,"extinction coefficient":1.49}},"separator-gaps":{seq:"I/H/A//T/Thr_PO3H2/Aca/D-Tyr_Et",units:x.qD.SEPARATOR,separator:"/",alphabet:"UN",res:{formula:"C44H72N9O14P","molecular weight":982.07,"extinction coefficient":1.49}},"fasta-PT":{seq:"IHACTTAY",units:x.qD.FASTA,alphabet:"PT",res:{formula:"C38H58N10O12S","molecular weight":878.99,"extinction coefficient":1.55}},"fasta-DNA":{seq:"ACGTATTCC",units:x.qD.FASTA,alphabet:"DNA",res:{formula:"C87H113N30O56P9","molecular weight":2753.76,"extinction coefficient":91.74}}};function O(s,n,i,r,o){const a=t.Column.fromStrings("seq",[s]);a.semType=t.SEMTYPE.MACROMOLECULE,a.setTag(t.TAGS.UNITS,n),i&&a.setTag("separator",i),r&&a.setTag("alphabet",r);const l=I.YL.forColumn(a),h=(0,N.C)(s,l);(0,e.o1)(h,o)}(0,e.Gu)("properties-widget",(()=>{let t,s=null;(0,e.a8)((async()=>{t=await(0,r.wW)(),s=c(),await g(),await t.loadLibraries(!0)})),(0,e.iV)((async()=>{await u(s),await t.loadLibraries(!0)}));for(const[t,s]of Object.entries(S))(0,e.GM)(t,(async()=>{O(s.seq,s.units,s.separator,s.alphabet,s.res)}))})),s(848);var v=s(924);async function M(t,s){const n=function(t){const e=t?(0,i.a6)(t):[];return t?(0,i.kR)(e,t):[]}(t);(0,e.gz)(n,s)}s(408),v.W,(0,e.Gu)("getAllParts",(()=>{const t={peptideSimpleSingleChar:{seq:"PEPTIDE1{L.V.A}$$$$",tgt:["PEPTIDE1{","L",".","V",".","A","}$$$$"]},peptideSimpleMultiChar:{seq:"PEPTIDE1{[Ac].V.A}$$$$",tgt:["PEPTIDE1{[","Ac","].","V",".","A","}$$$$"]}};for(const[s,n]of Object.entries(t))(0,e.GM)(`${s}`,(async()=>{await M(n.seq,n.tgt)}))}));const R=new t.Package;async function L(s,n,i){const r=await(0,e.Md)({category:s,test:n,testContext:i});return t.DataFrame.fromObjects(r)}})(),helm_test=n})();
2
2
  //# sourceMappingURL=package-test.js.map