@datagrok/helm 2.1.34 → 2.2.1

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,n)=>{"use strict";n.d(e,{wW:()=>d});var r,s,i,o,l,a,u,h=n(888);n(200);class c{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,r=c._createBuffer(n);if(e)for(let t=0;t<r.length;t++)r[t]=-1;this._data=r,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,r){if(t<e||t>n)throw new Error(`Argument ${r} (${t}) out of range (${e}, ${n})`)}copy(t,e,n){for(let r=0;r<n;r++)e[r]=t[r]}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 c(t._length);n._length=t._length,n._data=c._createBuffer(n._length),n._version=0;const r=t.lengthInInts;for(let s=0;s<r;s++)n._data[s]=t._data[s]&e._data[s];return n}static _createBuffer(t){return new Uint32Array(Math.floor((t+31)/32))}static fromValues(t){const e=new c(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 c(t);for(let r=0;r<t;++r)n.setBit(r,e(r));return n._version=0,n}static fromString(t){return c.fromSeq(t.length,(e=>"1"==t.charAt(e)))}static fromUint32Array(t,e){const n=new c(t);return n._data=e,n}static fromBytes(t){const e=t.length,n=new c(8*e);n._data=new Uint32Array(Math.floor((e+3)/4)),n._length=8*e;let r=0,s=0;for(;e-s>=4;)n._data[r++]=255&t[s]|(255&t[s+1])<<8|(255&t[s+2])<<16|(255&t[s+3])<<24,s+=4;return e-s==3&&(n._data[r]=(255&t[s+2])<<16),e-s==2&&(n._data[r]|=(255&t[s+1])<<8),e-s==1&&(n._data[r]|=255&t[s]),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 c(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,r=this.lengthInInts;for(let t=0;t<r;t++)this._data[t]=n;this.incrementVersion(e)}setIndexes(t,e=!0,n=!0,r=!0){n&&this.setAll(!e,!1);for(const n of t)this.setFast(n,e);this.incrementVersion(r)}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,r=!0,s=!0){if(n&&s&&this.setAll(!e,!1),s)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(r)}getRange(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const n=[];for(let r=t;r<e;++r)n.push(this.getBit(r));return c.fromValues(n)}getRangeAsList(t,e){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length,"to");const n=[];for(let r=t;r<e;++r)n.push(this.getBit(r));return n}setRange(t,e,n,r=!0){this.assureInRange(t,0,this._length-1,"from"),this.assureInRange(e,0,this._length-1,"to");const s=Math.min(t,e),i=Math.max(t,e);if(n)for(let t=s;t<=i;t++)this.setTrue(t);else for(let t=s;t<=i;t++)this.setFalse(t);return this.incrementVersion(r),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 r=this._length;this.setLength(this._length+e);for(let n=r-1;n>=t;n--)this.setBit(n+e,this.getBit(n));for(let r=t;r<t+e;r++)this.setBit(r,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 r=-1;-1!=(r=t.findNext(r,!e));)this.setFast(n++,this.getBit(r));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+=c._onBitCount[255&t];let n=this._data[e];const r=31&this._length;for(0!=r&&(n&=~(4294967295<<r));0!=n;n>>>=8)this._selectedCount+=c._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 r=this.lengthInInts;let s=0;for(;s<r-1;s++)for(let e=this._data[s]&t._data[s];0!=e;e>>>=8)n+=c._onBitCount[255&e];let i=this._data[s]&t._data[s];const o=31&this._length;for(0!=o&&(i&=~(4294967295<<o));0!=i;i>>>=8)n+=c._onBitCount[255&i];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 r=this.lengthInInts;for(let s=Math.floor(t/32);s<r;s++){let r=e?this._data[s]:~this._data[s];if(0!=n)r&=4294967295<<n&4294967295,n=0;else if(!e&&-4294967296==r)continue;for(let e=0;0!=r;e+=8,r>>>=8){const n=c._firstOnBit[255&r];if(n>=0)return(t=n+32*s+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 r=Math.floor(t/32);r>=0;r--){let t=e?this._data[r]:~this._data[r];0!=n&&(t&=~(4294967295<<n),n=0);for(let e=24;0!=t;e-=8,t<<=8){const n=c._lastOnBit[t>>>24];if(n>=0)return n+32*r+e}}return-1}}c._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]),c._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]),c._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"}(r||(r={})),function(t){t.Euclidean="Euclidean"}(s||(s={})),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"}(i||(i={})),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"}(l||(l={})),function(t){t.Difference="Difference"}(a||(a={})),function(t){t.CommonItems="Common Items"}(u||(u={}));var g=n(384);async function d(){const t=h.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()}i.Tanimoto,i.Dice,i.Asymmetric,i.BraunBlanquet,i.Cosine,i.Kulczynski,i.McConnaughey,i.RogotGoldberg,i.Russel,i.Sokal,i.Hamming,i.Euclidean,i.Tanimoto,i.Dice,i.Asymmetric,i.BraunBlanquet,i.Cosine,i.Kulczynski,i.McConnaughey,i.RogotGoldberg,i.Russel,i.Sokal,i.Hamming,i.Euclidean,i.Tanimoto,i.Dice,i.Cosine,i.Tanimoto,i.Asymmetric,i.Cosine,i.Sokal,g.Y.HAMMING,g.Y.LEVENSHTEIN,g.Y.MONOMER_CHEMICAL_DISTANCE,g.Y.NEEDLEMANN_WUNSCH,n(852),n(923),n(688)},516:(t,e,n)=>{"use strict";function r(t){let e;switch(t){case"HELM_BASE":case"HELM_SUGAR":case"HELM_LINKER":case"HELM_NUCLETIDE":case"nucleotide":e="RNA";break;case"HELM_AA":e="PEPTIDE";break;case"HELM_CHEM":e="CHEM";break;case"HELM_BLOB":e="BLOB";break;default:e="PEPTIDE",console.warn(`Unexpected HelmType '${t}'`)}return e}n.d(e,{y:()=>r})},248:(t,e,n)=>{"use strict";n.d(e,{I5:()=>h,_m:()=>l,y4:()=>u});var r=n(888),s=n(304),i=n(872),o=n(544);class l{constructor(t,e,n){this.backColor=t,this.width=e,this.height=n}}class a{constructor(t,e,n,r){this.name=t,this.props=e,this.onAfterRender=n,this.isPriority=r}}class u{constructor(t,e=3,n=0,r=3,s=1e3){this.logger=t,this.retryLimit=e,this._errorCount=n,this.errorLimit=r,this.taskTimout=s,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,n,r=0){const s=`${this.toLog()}.render()`;if(this.logger.debug(`${s}, start key: ${n?.toString()}`),void 0!==n){if(n in this._queueDict){const t=this._queue.findIndex((t=>t.key===n));this._queue.splice(t,1)}this.logger.debug(`${s}, _queueDict[ key: ${n?.toString()} ] = <task>`),this._queueDict[n]=e}return this.logger.debug(`${s}, _queue.push(), key: ${n?.toString()}`),null===t&&(t=++this.consumerCounter),this._queue.push({consumerId:t,key:n,task:e,tryCount:r,dt:window.performance.now()}),this._busy||(this._sweepToggle(this._busy=!0),this.logger.debug(`${s}, window.requestAnimationFrame() -> this._processQueue() `),window.requestAnimationFrame((()=>{this._processQueue()}))),t}isBusy(t){return this._queue.some((e=>e.consumerId===t))}getTask(){if(0==this._queue.length)return;let t;const e=this._queue[0];if(e.task.isPriority&&!e.task.isPriority()){let n=null;for(let t=0;t<this._queue.length;++t){const r=this._queue[t];if(r.consumerId===e.consumerId&&r.task.isPriority){if(r.task.isPriority()){n=t;break}{const e=this._queue.splice(t);this._queue.push(...e)}}}null!==n&&(t=this._queue.splice(n,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 n=n=>{const r=`${t}.finallyProcessQueue( <- ${n} )`;e&&e.unsubscribe(),this._queue.length>0?(this.logger.debug(`${r}, window.requestAnimationFrame() -> this._processQueue() `),window.requestAnimationFrame((()=>{this._processQueue()}))):(this.logger.debug(`${r}, this._busy = false`),this._sweepToggle(this._busy=!1))},r=this.getTask();if(!r)return this.logger.error(`${t}, queueItem = undefined `),void n("no queue item");const{consumerId:s,key:o,task:l,tryCount:a,dt:u}=r;if(void 0!==o&&(this.logger.debug(`${t}, key: ${o.toString()}`),delete this._queueDict[o]),a>this.retryLimit)return this.logger.warning(`${t}, skip task, key: ${o?.toString()}, tryCount: ${a}`),void n("try count limit");let h,c=!1;const g=window.setTimeout((()=>{c||(this.logger.warning(`${t}.timeoutHandle(), not handled, key: ${o?.toString()}.\n The .requestRender() overridden method must call renderHandler callback from args.`),this._errorCount+=1,this.render(s,l,o,a+1),n("timeout"))}),1e3);this.requestRender(o,l,(e=>{this.logger.debug(`${t}.renderHandler(), key: ${o?.toString()}`),this.onRendered(o,l,h,e)&&(c=!0,window.clearTimeout(g),n("render"))})).then((n=>{const r=`${t}, requestRender().then()`;e=n[0],h=n[1];const s=n[2];void 0===h&&console.warn(`${r}, this.requestRender.then() emptyCanvasHash undefined`),s()})).catch((e=>{const r=`${t}, requestRender().catch()`,[u,h]=(0,i.g$)(e);this.logger.error(u,void 0,h),window.clearTimeout(g),this._errorCount+=1,this.render(s,l,o,a+1),n(`${r}`)}))}_sweepQueue(){const t=`${this.toLog()}._sweepQueue()`,e=window.performance.now();let n=0;for(let r=this._queue.length-1;r>=0;r--){const{key:s,task:i,dt:o}=this._queue[r];e-o>this.taskTimout&&(this.logger.warning(`${t}, remove task key = ${s?.toString()}`),this._queue.splice(r),delete this._queueDict[s],++n)}this._sweepToggle(this._busy=this._queue.length>0),!this._busy&&n&&this.logger.warning(`${t}, ${n} 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 h extends o.W{constructor(t,e,n,r=!0){super(t,e,n),this.cacheEnabled=r,this.taskQueueMap=new Map,this.imageCache=new Map,this.consumerId=null}reset(){this.imageCache,this.imageCache=new Map}render(t,e,n,i,o,l,u){const h=window.devicePixelRatio,c=this.getRenderService();if(null==l.tableRowIndex)return;const g=l.tableRowIndex;this.logger.debug(`PdbRenderer.render() start rowIdx=${g}`),t.save();try{const d=this.imageCache.has(g)?this.imageCache.get(g):null,m=new r.Rect(e,n,i,o);let p,f,C;if(this.gridCol?(p=l.gridColumn.width*h-2,f=l.grid.props.rowHeight*h-2,C=u?u.backColor:null,C=C??(this.gridCol?this.gridCol.grid.props.backColor:null),C=C??r.Color.argb(0,0,0,0)):(p=i*h-2,f=o*h-2,C=r.Color.argb(0,0,0,0)),!this.cacheEnabled||!d||Math.abs(d.width/h-p)>.5||Math.abs(d.height/h-f)>.5){let u=!0;if(d&&(u=this.renderCellImageData(t,m,l,d)),!u)return;const h=new a(l.cell.rowIndex.toString(),this.getRenderTaskProps(l,C,p,f),((a,u)=>{this.storeAux(l,u),t.save();try{this.logger.debug(`PdbRenderer.render() onAfterRender() rowIdx = ${g}`);let u=a.getContext("2d");u||(u=s.canvas(a.width,a.height).getContext("2d"),u.drawImage(a,0,0));const h=u.getImageData(0,0,a.width,a.height);this.renderOnGrid(t,new r.Rect(e,n,i,o),l,h),this.imageCache.set(g,h)}finally{t.restore(),this.taskQueueMap.delete(g),0===this.taskQueueMap.size&&this._onRendered.next()}}),this.gridCol?()=>{const t=l.grid;return t.vertScroll.min-1<=l.gridRow&&l.gridRow<=t.vertScroll.max}:void 0);this.taskQueueMap.set(g,h),this.consumerId=c.render(this.consumerId,h,g)}else this.logger.debug(`PdbRenderer.render(), from imageCache[${g}]`),this.renderOnGrid(t,m,l,d);this.consumerId&&c.isBusy(this.consumerId)||this._onRendered.next()}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,n,r){const i=window.devicePixelRatio,o=s.canvas(r.width,r.height);o.getContext("2d").putImageData(r,0,0);const l=(e.width-1)*i,a=(e.height-1)*i,u=s.canvas(l,a),h=Math.min(l/r.width,a/r.height),c=(l-r.width*h)/2,g=(a-r.height*h)/2,d=u.getContext("2d");d.transform(h,0,0,h,c,g),d.drawImage(o,0,0);const m=d.getImageData(0,0,l,a);return this.renderOnGrid(t,e,n,m),!0}renderOnGrid(t,e,n,s){const i=`renderOnGridCell( gRow = ${n.gridRow} )`,o=`${this.toLog()}.${i}`,l=window.devicePixelRatio;this.logger.debug(`${o}, start`),t.save();try{if(t.resetTransform(),this.gridCol){const t=this.gridCol.grid,r=Math.floor(t.vertScroll.min);e.y=((n.gridRow-r)*t.props.rowHeight+t.colHeaderHeight)*l;let s=0;for(let e=0;e<this.gridCol.idx;e++){const n=t.columns.byIndex(e);s+=n.visible?n.width:0}e.x=(s-t.horzScroll.min)*l}const i=new r.Rect(e.x+l,e.y+l,(e.width-1)*l,(e.height-1)*l);t.beginPath(),t.rect(i.x,i.y,i.width,i.height),t.clip(),t.putImageData(s,e.x+l,e.y+l)}finally{t.restore()}}}},544:(t,e,n)=>{"use strict";n.d(e,{M:()=>o,W:()=>l});var r=n(200),s=n(468),i=n(272);function o(t){let e=null,n=null;try{n=t.dart?t.gridColumn:null,e=n?n.temp:null}catch{[n,e]=[null,null]}const r=t.cell.column;if(e=e??r.temp,!e)throw new Error("Grid cell renderer back store (GridColumn or Column) not found.");return[n,r,e]}class l{constructor(t,e,n){this.gridCol=t,this.tableCol=e,this.logger=n,this.subs=[],this.destroyed=!1,this.viewerId=++l.viewerCounter,this.errors=[],this._onRendered=new s.Subject,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(r.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(r.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()}get onRendered(){return this._onRendered}invalidate(t){this.invalidateGrid()}async awaitRendered(t=1e4,e=`${t} timeout`){const n=`${this.toLog()}.awaitRendered()`;if(this.logger.debug(`${n}, start, testEvent before`),await(0,i.SG)(this._onRendered,(()=>{}),(()=>{this.invalidate()}),t,`${n}, ${e}`),this.errors.length>0){const t=this.errors[0];throw this.errors=[],t}this.logger.debug(`${n}, end`)}}l.viewerCounter=-1},852:(t,e,n)=>{"use strict";n.d(e,{E1:()=>r,cT:()=>s});const r="p",s=new RegExp(`[rd]\\((\\w)\\)${r}?`,"g")},872:(t,e,n)=>{"use strict";function r(t){return"string"==typeof t||t instanceof String?t:"StateError"===t.constructor.name?t.message:"StateError"===t.constructor.name&&"$thrownJsError"in t?r(t.$thrownJsError):t instanceof Error?t.message:t.toString()}function s(t){return t instanceof Error?t.stack:"StateError"===t.constructor.name&&"$thrownJsError"in t?s(t.$thrownJsError):void 0}function i(t){return[r(t),s(t)]}n.d(e,{g$:()=>i})},136:(t,e,n)=>{"use strict";n.d(e,{YF:()=>i,eQ:()=>o,qD:()=>r,y6:()=>a});var r,s=n(923);!function(t){t.FASTA="fasta",t.SEPARATOR="separator",t.HELM="helm"}(r||(r={}));const i=", ",o=/(?:\[([A-Za-z0-9_\-,()]+)\])|([A-Za-z\-])/g,l=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"])}}},a=[new s._u("PT",l.fasta.peptide,.5),new s._u("DNA",l.fasta.dna,.55),new s._u("RNA",l.fasta.rna,.55)]},736:(t,e,n)=>{"use strict";n.d(e,{YF:()=>r.YF,g9:()=>s.g9,gX:()=>s.gX,oB:()=>s.oB,qD:()=>r.qD,y6:()=>r.y6});var r=n(136),s=n(502)},923:(t,e,n)=>{"use strict";n.d(e,{AD:()=>i,_u:()=>s,yK:()=>r});const r="";class s{constructor(t,e,n){this.name=t,this.alphabet=e,this.cutoff=n}}class i extends s{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:()=>O,gX:()=>E,oB:()=>A,lh:()=>x,g9:()=>T});var r=n(888),s=n(848),i=n.n(s),o=n(923),l=n(136),a=n(688);class u extends Float32Array{}function h(t){let e=0;for(let n=0;n<t.length;n++)e+=t[n]*t[n];return Math.sqrt(e)}class c{static makePalette(t,e=!1,n=c){const r={};return t.forEach((t=>{const n=t[0],s=t[1];n.forEach(((t,n)=>{r[t]=this.colourPalette[s][e?0:n]}))})),new n(r)}constructor(t){this._palette=t}get(t){return this._palette[t]}}c.undefinedColor="rgb(100,100,100)",c.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 c{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,n="",r="";for(const s of t)"("==s?e++:")"==s?e--:e?n+=s:r+=s;return isNaN(parseInt(n))?[r,n]:[r,""]}static getColorAAPivot(t="",e="grok"){const n=this.getPalette(e);let[r,s]=this.getInnerOuter(t);if(r=r.length>6?`${r.slice(0,3)}...`:r,s=s.length>6?`${s.slice(0,3)}...`:s,1==t.length||"("==t[1]){const e=t[0]?.toUpperCase();return e in n?[n.get(e),e,s,1]:[this.undefinedColor,r,s,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,s,2]:[this.undefinedColor,r,s,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,s,3]:[this.undefinedColor,r,s,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,s,4]:[this.undefinedColor,r,s,4]}return[this.undefinedColor,r,s,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 m{}m.SemType="Nucleotides",m.SemTypeMultipleAlignment="NucleotidesMultipleAlignment",m.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 f{}class C extends f{static buildPalette(){return[].concat(...Object.values(c.colourPalette))}get(t){const e=p.hashCode(t)%C.palette.length;return function(t){if(null==t)return"rgb(100,100,100)";const e=r.Color.fromHtml(t),n=r.Color.g(e),s=r.Color.r(e),i=r.Color.b(e),o=Math.sqrt(Math.pow(0-s,2)+Math.pow(0-n,2)+Math.pow(0-i,2));return o>210?`rgb(${s/o*210},${n/o*210},${i/o*210})`:r.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 b{get length(){return this.seqS.length}get canonicals(){return this.seqS}get originals(){return this.seqS}isGap(t){return this.getOriginal(t)===a.oh[l.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=i()(t.toString().matchAll(l.eQ)).map((t=>t[2]??t[1])).toArray();return new y(e,a.oh[l.qD.FASTA])},x=t=>t?new b(t):new y([],a.oh[l.qD.FASTA]);function E(t,e=void 0){return n=>{if(n){let r;const s=new RegExp(String.raw`"-"|'-'|[^${t}]+`,"g");if(void 0!==e){s.lastIndex=0,r=new Array(e);let t=null,i=0;for(;null!==(t=s.exec(n))&&i<e;)r[i++]=t[0].replace('"-"',"").replace("'-'","");r.splice(i)}else r=n.replaceAll('"-"',"").replaceAll("'-'","").split(t,e);return new y(r,a.oh[l.qD.SEPARATOR])}return new y([],a.oh[l.qD.SEPARATOR])}}const _=/(PEPTIDE1|DNA1|RNA1)\{([^}]+)}/g,w=/\[([^\[\]]+)]/g,T=t=>{_.lastIndex=0;const e=_.exec(t.toString()),n=e?e[2]:null,r=n?n.split("."):[];return new y(r.map((t=>{w.lastIndex=0;const e=w.exec(t);return e&&e.length>=2?e[1]:t})),a.oh[l.qD.HELM])};function O(t,e,n="-"){const r=e.map((e=>{const r=function(t,e,n="-"){const r=new Set([...new Set(Object.keys(t)),...e]);r.delete(n);const s=[],i=[];for(const n of r)s.push(n in t?t[n]:0),i.push(e.has(n)?1:0);const o=new u(s),l=new u(i);return function(t,e){if(t.length!=e.length)throw new Error("The dimensionality of the vectors must match");let n=0;for(let r=0;r<t.length;r++)n+=t[r]*e[r];return n}(o,l)/(h(o)*h(l))}(t,e.alphabet,n);return new o.AD(e,t,r)}));let s;const i=Math.max(...r.map((t=>t.similarity>t.cutoff?t.similarity:-1)));return s=i>0?r.find((t=>t.similarity===i)).name:"UN",s}},688:(t,e,n)=>{"use strict";n.d(e,{YL:()=>m,oh:()=>d});var r=n(888),s=n(848),i=n.n(s),o=n(736),l=n(923),a=n(502),u=n(384),h=n(460),c=n(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 m{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!==r.TYPE.STRING)throw new Error(`Unexpected column type '${t.type}', must be '${r.TYPE.STRING}'.`);this._column=t;const e=this._column.getTag(r.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())m.setUnitsToFastaColumn(this);else if(this.isSeparator()){const e=t.getTag("separator");m.setUnitsToSeparatorColumn(this,e)}else{if(!this.isHelm())throw new Error(`Unexpected units '${this.column.getTag(r.TAGS.UNITS)}'.`);m.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!==r.SEMTYPE.MACROMOLECULE||t.column.getTag(r.TAGS.UNITS)!==o.qD.FASTA)throw new Error(`The column of notation '${o.qD.FASTA}' must be '${r.SEMTYPE.MACROMOLECULE}'.`);t.column.setTag(r.TAGS.UNITS,o.qD.FASTA),m.setTags(t)}static setUnitsToSeparatorColumn(t,e){if(t.column.semType!==r.SEMTYPE.MACROMOLECULE||t.column.getTag(r.TAGS.UNITS)!==o.qD.SEPARATOR)throw new Error(`The column of notation '${o.qD.SEPARATOR}' must be '${r.SEMTYPE.MACROMOLECULE}'.`);if(!e)throw new Error(`The column of notation '${o.qD.SEPARATOR}' must have the separator tag.`);t.column.setTag(r.TAGS.UNITS,o.qD.SEPARATOR),t.column.setTag("separator",e),m.setTags(t)}static setUnitsToHelmColumn(t){if(t.column.semType!==r.SEMTYPE.MACROMOLECULE)throw new Error(`The column of notation '${o.qD.HELM}' must be '${r.SEMTYPE.MACROMOLECULE}'`);t.column.setTag(r.TAGS.UNITS,o.qD.HELM),m.setTags(t)}static setTags(t){const e=t.column.getTag(r.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 r=t.column.getTag("alphabet");if(null===r&&(r=(0,a.o5)(n.freq,o.y6),t.column.setTag("alphabet",r)),"UN"===r){const e=Object.keys(n.freq).length,r=Object.keys(n.freq).some((t=>t.length>1));t.column.setTag(".alphabetSize",e.toString()),t.column.setTag(".alphabetIsMultichar",r?"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,e){if(this.cached&&void 0===e){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 n=this.column.get(t);return this.getSplitter(e)(n)}}get stats(){if(null===this._stats){const t={};let e=!0,n=null;const r=this.column.length;for(let s=0;s<r;++s){const r=this.getSplitted(s);null==n?n=r.length:r.length!==n&&(e=!1);for(const e of r.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(...i().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())):i().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,s){const i=this.column,l=t.toLowerCase()+"("+i.name+")",a=n??i.dataFrame.columns.getUnusedName(l),u=r.Column.fromList("string",a,s??new Array(this.column.length).fill(""));if(u.semType=r.SEMTYPE.MACROMOLECULE,u.setTag(r.TAGS.UNITS,t),t===o.qD.SEPARATOR){if(!e)throw new Error(`Notation '${o.qD.SEPARATOR}' requires separator value.`);u.setTag("separator",e)}u.setTag(r.TAGS.CELL_RENDERER,"sequence");const h=i.getTag("aligned");h&&u.setTag("aligned",h);let c=i.getTag("alphabet");c||this.notation!==o.qD.HELM||t===o.qD.HELM||(c="UN"),null!=c&&u.setTag("alphabet",c);let g=i.getTag(".alphabetSize");null!=c&&g&&u.setTag(".alphabetSize",g);const d=i.getTag(".alphabetIsMultichar");return null!=c&&void 0!==d&&u.setTag(".alphabetIsMultichar",d),t==o.qD.HELM&&(g=this.getAlphabetSize().toString(),u.setTag(".alphabetSize",g)),u}getNewColumnFromList(t,e){return this.getNewColumn(this.notation,this.separator,t,e)}static getNewColumn(t){const e=m.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(!m.unitsStringIsValid(n))throw new Error("Invalid format of 'units' parameter");const s=r.Column.fromList("string",e,new Array(t).fill(""));return s.semType=r.SEMTYPE.MACROMOLECULE,s.setTag(r.TAGS.UNITS,n),s}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:a.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()?u.Y.HAMMING:(this.alphabet,u.Y.LEVENSHTEIN)}getDistanceFunction(){return u.S[this.getDistanceFunctionName()]()}async checkHelmCompatibility(){if(this.column.tags.has(".isHelmCompatible"))return"true"===this.column.getTag(".isHelmCompatible");const t=(await(0,h.wW)()).getBioLib().getMonomerSymbolsByType("PEPTIDE"),e=new Set(t),n=((0,o.gX)(this.separator),new Set),r=this.column.length,s=this.column.getRawData();for(let t=0;t<r;++t){const r=s[t];if(!(r in n)){n.add(r);const s=this.getSplitted(t);for(const t of s.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,r){r||(r=this.toFasta(e)?d[o.qD.FASTA]:d[o.qD.SEPARATOR]),n||(n=this.toFasta(e)?"":this.separator);const s=t.startsWith("RNA"),i=this.splitter(t),l=[];for(let t=0;t<i.length;++t){let n=i.getOriginal(t);if(s&&(n=n.replace(c.cT,"")),n===d[o.qD.HELM])l.push(r);else if(this.toFasta(e)&&n.length>1){const t="["+n+"]";l.push(t)}else l.push(n)}return l.join(n)}convert(t,e){const n=this.getJoiner({notation:t,separator:e}),r=this.getNewColumn(t,e);return r.init((t=>{const e=this.getSplitted(t);return n(e)})),r}getRegion(t,e,n){const r=this.getNewColumn(this.notation,this.separator);r.name=n;const s=t??0,i=e??this.maxLength-1,l=this.getJoiner(),u=i-s+1,h=d[this.notation];r.init((t=>{const e=this.getSplitted(t),n=new Array(u);for(let t=0;t<u;++t){const r=s+t;n[t]=r<e.length?e.getOriginal(r):h}return l(new a.Mx(n,h))}));const c=t=>{const e=t.split(",").map((t=>t.trim())),n=new Array(u);for(let t=0;t<u;++t){const r=s+t;n[t]=r<e.length?e[r]:"?"}return n.join(o.YF)},g=this.column.getTag(".positionNames");g&&r.setTag(".positionNames",c(g));const m=this.column.getTag(".positionLabels");return m&&r.setTag(".positionLabels",c(m)),r}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 r;const s=this;switch(e){case o.qD.FASTA:r=function(t){return s.joinToFasta(t,s.isHelm())};break;case o.qD.SEPARATOR:if(!n)throw new Error(`Separator is mandatory for notation '${e}'.`);r=function(t){return p(t,n,s.isHelm())};break;case o.qD.HELM:{const t="DNA"===s.alphabet||"RNA"===s.alphabet,e=s.getHelmWrappers();r=function(n){return f(n,e,t)};break}default:throw new Error(`Unexpected notation '${e}'.`)}return r}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 m(t)),e}joinToFasta(t,e){const n=new Array(t.length);for(let r=0;r<t.length;++r){const s=t.getOriginal(r);let i=t.getOriginal(r);e&&(i=i.replace(c.cT,"$1")),s===l.yK?i=d[o.qD.FASTA]:s===c.E1?i="":i.length>1&&(i="["+i+"]"),n[r]=i}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 f(this.splitter(t),e,n)}splitterAsHelmNucl(t){const e=this.splitter(t),n=new Array(e.length),r=t.startsWith("DNA"),s=t.startsWith("RNA");for(let t=0;t<e.length;++t){let i=e.getOriginal(t);(r||s)&&(i=i.replace(c.cT,"$1"),i=i===c.E1?null:i),n[t]=i||null}return new a.Mx(n.filter((t=>!!t)),d[o.qD.HELM])}}function p(t,e,n){const r=new Array(t.length);for(let e=0;e<t.length;++e){const s=t.getCanonical(e);let i=t.getOriginal(e);n&&(i=i.replace(c.cT,"$1")),s===l.yK?i=d[o.qD.SEPARATOR]:s===c.E1&&(i=""),r[e]=i}return r.join(e)}function f(t,e,n){const[r,s,i,a]=e,u=new Array(t.length);for(let e=0;e<t.length;++e){const r=t.getCanonical(e);let a=t.getOriginal(e);r===l.yK?a=d[o.qD.HELM]:(n&&(a=a.replace(c.cT,"$1")),a=1===a.length?`${s}${a}${i}`:`${s}[${a}]${i}`),u[e]=a}return`${r}${u.join(".")}${a}`}},824:(t,e,n)=>{"use strict";n.d(e,{Cu:()=>o,cF:()=>l,st:()=>i});var r=n(888),s=n(248);class i extends s._m{constructor(t,e,n,r){super(e,n,r),this.helm=t}}class o extends s.y4{}async function l(){const t=r.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,n)=>{"use strict";function r(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,r=Math.min(...Object.keys(e).map((t=>t.charCodeAt(0))))+1,s=new Float32Array((n.length+r)*(n.length+r));return Object.entries(e).forEach((([t,r])=>{const i=n[r];Object.entries(e).forEach((([e,r])=>{s[t.charCodeAt(0)*n.length+e.charCodeAt(0)]=i[r]}))})),(t,e)=>1-s[t.charCodeAt(0)*n.length+e.charCodeAt(0)]}(),n=t?.threshold??0;return(t,r)=>{let s=0;const i=t.length,o=r.length,l=Math.ceil(Math.max(i,o)*(1-n));i!==o&&(s=Math.abs(i-o));let a=0;for(let n=0;n<Math.min(i,o);n++)if(t[n]!==r[n]&&(a+=e(t[n],r[n]),a>l))return 1;return a+=s,a/=Math.max(i,o),a}}n.d(e,{Y:()=>o,S:()=>l});const s=new Uint32Array(65536),i={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 l={[o.HAMMING]:r,[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,r=e.length,i=1<<n-1;let o=-1,l=0,a=n,u=n;for(;u--;)s[t.charCodeAt(u)]|=1<<u;for(u=0;u<r;u++){let t=s[e.charCodeAt(u)];const n=t|l;t|=(t&o)+o^o,l|=~(t|o),o&=t,l&i&&a++,o&i&&a--,l=l<<1|1,o=o<<1|~(n|l),l&=n}for(u=n;u--;)s[t.charCodeAt(u)]=0;return a})(t,e):((t,e)=>{const n=e.length,r=t.length,i=[],o=[],l=Math.ceil(n/32),a=Math.ceil(r/32);for(let t=0;t<l;t++)o[t]=-1,i[t]=0;let u=0;for(;u<a-1;u++){let l=0,a=-1;const h=32*u,c=Math.min(32,r)+h;for(let e=h;e<c;e++)s[t.charCodeAt(e)]|=1<<e;for(let t=0;t<n;t++){const n=s[e.charCodeAt(t)],r=o[t/32|0]>>>t&1,u=i[t/32|0]>>>t&1,h=n|l,c=((n|u)&a)+a^a|n|u;let g=l|~(c|a),d=a&c;g>>>31^r&&(o[t/32|0]^=1<<t),d>>>31^u&&(i[t/32|0]^=1<<t),g=g<<1|r,d=d<<1|u,a=d|~(h|g),l=g&h}for(let e=h;e<c;e++)s[t.charCodeAt(e)]=0}let h=0,c=-1;const g=32*u,d=Math.min(32,r-g)+g;for(let e=g;e<d;e++)s[t.charCodeAt(e)]|=1<<e;let m=r;for(let t=0;t<n;t++){const n=s[e.charCodeAt(t)],l=o[t/32|0]>>>t&1,a=i[t/32|0]>>>t&1,u=n|h,g=((n|a)&c)+c^c|n|a;let d=h|~(g|c),p=c&g;m+=d>>>r-1&1,m-=p>>>r-1&1,d>>>31^l&&(o[t/32|0]^=1<<t),p>>>31^a&&(i[t/32|0]^=1<<t),d=d<<1|l,p=p<<1|a,c=p|~(u|d),h=d&u}for(let e=g;e<d;e++)s[t.charCodeAt(e)]=0;return m})(t,e)})(t,e)/Math.max(t.length,e.length)},[o.NEEDLEMANN_WUNSCH]:function(t){const e=new Uint16Array(65536),{gapOpen:n,gapExtend:r,scoringMatrix:s,alphabetIndexes:o}={...i,...t};Object.entries(o).forEach((([t,n])=>e[t.charCodeAt(0)]=n));const l=[new Float32Array(1e4),new Float32Array(1e4)];return(t,i)=>{const o=new Array(t.length+1).fill(!1),a=new Array(t.length+1).fill(!1);let u=0,h=1;for(let e=1;e<t.length+1;e++)l[0][e]=-n-(e-1)*r,l[1][e]=0;l[0][0]=0;for(let c=1;c<i.length+1;c++){l[h][0]=-n-(c-1)*r;for(let g=1;g<t.length+1;g++){const d=l[u][g-1]+s[e[t.charCodeAt(g-1)]][e[i.charCodeAt(c-1)]],m=l[u][g]-(o[g]?r:n),p=l[h][g-1]-(a[g-1]?r:n);l[h][g]=Math.max(d,p,m),l[h][g]===d?(o[g]=!1,a[g]=!1):l[h][g]===p?(o[g]=!1,a[g]=!0):(o[g]=!0,a[g]=!1)}u=h,h=(h+1)%2}const c=Math.max(t.length,i.length);return(c-l[u][t.length])/c}},[o.MONOMER_CHEMICAL_DISTANCE]:r}},272:(t,e,n)=>{"use strict";n.d(e,{iV:()=>L,sN:()=>$,a8:()=>I,Gu:()=>R,oL:()=>P,ct:()=>T,gz:()=>N,UZ:()=>O,o1:()=>M,Md:()=>v,GM:()=>w,SG:()=>_,ui:()=>d});var r=n(200),s=n(888);n(8);const i=s.DataFrame.fromCsv('countries,fasta,smiles,molregno,LON,Zip Code,Street Address Line 1,ImageUrl,user_id,error_message,xray,flag,magnitude,CS-id,pdb_id,accel_a,time_offset,chart,fit,Questions,empty_number,empty_string\nBelgium,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C(=O)OCCCc1cccnc1)c2cccc(c2)C(=O)c3ccccc3,1480014,36.276729583740234,995042300,14016 ROUTE 31W,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,1,1,1QBS,1,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.497360340644872, 1.7058694986686864, 5.278052678195135, 0.16000320889028383],""points"":[{""x"":0.10000000149011612,""y"":2.374499797821045},{""x"":0.6000000238418579,""y"":2.6242473125457764},{""x"":1.100000023841858,""y"":2.367267608642578},{""x"":1.600000023841858,""y"":2.6723148822784424},{""x"":2.0999999046325684,""y"":2.6537344455718994},{""x"":2.5999999046325684,""y"":2.3651671409606934},{""x"":3.0999999046325684,""y"":2.5654284954071045},{""x"":3.5999999046325684,""y"":2.4160959720611572},{""x"":4.099999904632568,""y"":2.286726713180542},{""x"":4.599999904632568,""y"":2.5100042819976807},{""x"":5.099999904632568,""y"":1.6676985025405884},{""x"":5.599999904632568,""y"":0.680136501789093},{""x"":6.099999904632568,""y"":0.3391543924808502},{""x"":6.599999904632568,""y"":0.09038983285427094},{""x"":7.099999904632568,""y"":0.19802775979042053}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[7.525235855508179, 1.3186911876809984, 5.335672608564294, 0.7860743343958098],""points"":[{""x"":0.10000000149011612,""y"":7.988070487976074},{""x"":0.6000000238418579,""y"":7.018453121185303},{""x"":1.100000023841858,""y"":8.115279197692871},{""x"":1.600000023841858,""y"":7.486658096313477},{""x"":2.0999999046325684,""y"":7.396438121795654},{""x"":2.5999999046325684,""y"":7.477052211761475},{""x"":3.0999999046325684,""y"":6.913095474243164},{""x"":3.5999999046325684,""y"":8.01385498046875},{""x"":4.099999904632568,""y"":6.985900402069092},{""x"":4.599999904632568,""y"":6.970335960388184},{""x"":5.099999904632568,""y"":5.448817253112793},{""x"":5.599999904632568,""y"":2.5534818172454834},{""x"":6.099999904632568,""y"":1.893947958946228},{""x"":6.599999904632568,""y"":0.6340042352676392},{""x"":7.099999904632568,""y"":0.8403874039649963}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,100,abc\nBurundi,MDYKETLLMPKTDFPMRGGLPNKEPQIQEKW,COc1ccc2cc(ccc2c1)C(C)C(=O)Oc3ccc(C)cc3OC,1480015,36.276729583740234,995073444,80 STATE HIGHWAY 310,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,2,2,1ZP8,2,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.431460753103398, 2.1691498799246745, 5.266445597102774, 0.7825762827017926],""points"":[{""x"":0.10000000149011612,""y"":4.751083850860596},{""x"":0.6000000238418579,""y"":4.203000068664551},{""x"":1.100000023841858,""y"":4.415858745574951},{""x"":1.600000023841858,""y"":4.68414306640625},{""x"":2.0999999046325684,""y"":4.198400974273682},{""x"":2.5999999046325684,""y"":4.179222106933594},{""x"":3.0999999046325684,""y"":4.638473987579346},{""x"":3.5999999046325684,""y"":4.708553314208984},{""x"":4.099999904632568,""y"":4.291589260101318},{""x"":4.599999904632568,""y"":4.038082599639893},{""x"":5.099999904632568,""y"":3.4349939823150635},{""x"":5.599999904632568,""y"":1.2194708585739136},{""x"":6.099999904632568,""y"":1.1920831203460693},{""x"":6.599999904632568,""y"":0.5352635979652405},{""x"":7.099999904632568,""y"":0.3346920311450958}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.339458017970126, -1.0734184310171178, 4.746332950550934, 0.2482416857595658],""points"":[{""x"":0.10000000149011612,""y"":0.2139337658882141},{""x"":0.6000000238418579,""y"":0.4269562065601349},{""x"":1.100000023841858,""y"":0.2441573292016983},{""x"":1.600000023841858,""y"":0.146635964512825},{""x"":2.0999999046325684,""y"":0.08818462491035461},{""x"":2.5999999046325684,""y"":0.2560656666755676},{""x"":3.0999999046325684,""y"":0.42434045672416687},{""x"":3.5999999046325684,""y"":0.37111231684684753},{""x"":4.099999904632568,""y"":0.5581737160682678},{""x"":4.599999904632568,""y"":1.183590054512024},{""x"":5.099999904632568,""y"":1.5629843473434448},{""x"":5.599999904632568,""y"":2.3211288452148438},{""x"":6.099999904632568,""y"":2.229961633682251},{""x"":6.599999904632568,""y"":2.2560226917266846},{""x"":7.099999904632568,""y"":2.2142398357391357}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCameroon,MIEVFLFGIVLGLIPITLAGLFVTAYLQYRRGDQLDL,COc1ccc2cc(ccc2c1)C(C)C(=O)OCCCc3cccnc3,1480016,36.26095962524414,995153596,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,3,3,2BDJ,3,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[4.6760652578642325, 0.9046956320756703, 5.651408971856738, 0.07738846012184185],""points"":[{""x"":0.10000000149011612,""y"":4.32425594329834},{""x"":0.6000000238418579,""y"":4.668442249298096},{""x"":1.100000023841858,""y"":4.379785060882568},{""x"":1.600000023841858,""y"":5.0345139503479},{""x"":2.0999999046325684,""y"":4.878653526306152},{""x"":2.5999999046325684,""y"":4.3451313972473145},{""x"":3.0999999046325684,""y"":4.336992263793945},{""x"":3.5999999046325684,""y"":5.037430286407471},{""x"":4.099999904632568,""y"":5.0092692375183105},{""x"":4.599999904632568,""y"":4.151902675628662},{""x"":5.099999904632568,""y"":3.4066951274871826},{""x"":5.599999904632568,""y"":2.3732759952545166},{""x"":6.099999904632568,""y"":1.673728108406067},{""x"":6.599999904632568,""y"":0.48574790358543396},{""x"":7.099999904632568,""y"":0.2783052325248718}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[2.938395863010111, -1.4658480661392117, 5.462702751996584, 0.3473139023615039],""points"":[{""x"":0.10000000149011612,""y"":0.4941710829734802},{""x"":0.6000000238418579,""y"":0.15323974192142487},{""x"":1.100000023841858,""y"":0.46373432874679565},{""x"":1.600000023841858,""y"":0.3370431363582611},{""x"":2.0999999046325684,""y"":0.5179030299186707},{""x"":2.5999999046325684,""y"":0.27899765968322754},{""x"":3.0999999046325684,""y"":0.22075064480304718},{""x"":3.5999999046325684,""y"":0.5789918899536133},{""x"":4.099999904632568,""y"":0.21169911324977875},{""x"":4.599999904632568,""y"":0.27857646346092224},{""x"":5.099999904632568,""y"":1.0906332731246948},{""x"":5.599999904632568,""y"":1.8520300388336182},{""x"":6.099999904632568,""y"":2.7177059650421143},{""x"":6.599999904632568,""y"":2.8680918216705322},{""x"":7.099999904632568,""y"":3.2413077354431152}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCanada,MMELVLKTIIGPIVVGVVLRIVDKWLNKDK,CC(C(=O)NCCS)c1cccc(c1)C(=O)c2ccccc2,1480017,36.26095962524414,99515,30-56 WHITESTONE EXPY,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,4,4,1IAN,4,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[0.8597390975430008, 1.0957625732481946, 5.260537067987958, 0.07974187998177736],""points"":[{""x"":0.10000000149011612,""y"":0.8190152645111084},{""x"":0.6000000238418579,""y"":0.8421689867973328},{""x"":1.100000023841858,""y"":0.8740922212600708},{""x"":1.600000023841858,""y"":0.8924275040626526},{""x"":2.0999999046325684,""y"":0.8249067664146423},{""x"":2.5999999046325684,""y"":0.9327669143676758},{""x"":3.0999999046325684,""y"":0.8522974252700806},{""x"":3.5999999046325684,""y"":0.8174492716789246},{""x"":4.099999904632568,""y"":0.8394647240638733},{""x"":4.599999904632568,""y"":0.7139387726783752},{""x"":5.099999904632568,""y"":0.5561167597770691},{""x"":5.599999904632568,""y"":0.3276226818561554},{""x"":6.099999904632568,""y"":0.12479474395513535},{""x"":6.599999904632568,""y"":0.13006797432899475},{""x"":7.099999904632568,""y"":0.059702079743146896}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.760930219582546, 1.6591793293833013, 4.667155929720851, 0.7858109544121652],""points"":[{""x"":0.10000000149011612,""y"":6.156993389129639},{""x"":0.6000000238418579,""y"":5.236701965332031},{""x"":1.100000023841858,""y"":6.010560512542725},{""x"":1.600000023841858,""y"":5.495512962341309},{""x"":2.0999999046325684,""y"":6.087770462036133},{""x"":2.5999999046325684,""y"":5.79986572265625},{""x"":3.0999999046325684,""y"":5.597546577453613},{""x"":3.5999999046325684,""y"":5.520902156829834},{""x"":4.099999904632568,""y"":5.360654354095459},{""x"":4.599999904632568,""y"":3.5539746284484863},{""x"":5.099999904632568,""y"":1.577236294746399},{""x"":5.599999904632568,""y"":1.0001264810562134},{""x"":6.099999904632568,""y"":0.9305797815322876},{""x"":6.599999904632568,""y"":0.6033638715744019},{""x"":7.099999904632568,""y"":0.4203685522079468}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nColombia,MDRTDEVSNHTHDKPTLTWFEEIFEEYHSPFHN,FC(F)(F)c1ccc(OC2CCNCC2)cc1,1480029,36.3309440612793,995152050,1 COURT HOUSE SQUARE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,5,5,4UJ1,5,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[6.4995088314153655, 2.4270351004539914, 5.178659535348579, 0.625653346241577],""points"":[{""x"":0.10000000149011612,""y"":6.496231555938721},{""x"":0.6000000238418579,""y"":6.42543363571167},{""x"":1.100000023841858,""y"":7.040063858032227},{""x"":1.600000023841858,""y"":6.1115403175354},{""x"":2.0999999046325684,""y"":6.680728435516357},{""x"":2.5999999046325684,""y"":6.406774520874023},{""x"":3.0999999046325684,""y"":6.611269474029541},{""x"":3.5999999046325684,""y"":5.889094352722168},{""x"":4.099999904632568,""y"":6.75344705581665},{""x"":4.599999904632568,""y"":6.361435890197754},{""x"":5.099999904632568,""y"":4.1666975021362305},{""x"":5.599999904632568,""y"":1.172118902206421},{""x"":6.099999904632568,""y"":0.801048994064331},{""x"":6.599999904632568,""y"":0.4640021026134491},{""x"":7.099999904632568,""y"":0.0010357667924836278}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[1.4734381347446401, 1.1649805188074196, 4.82958608866421, 0.09500545496710007],""points"":[{""x"":0.10000000149011612,""y"":1.5279096364974976},{""x"":0.6000000238418579,""y"":1.3559974431991577},{""x"":1.100000023841858,""y"":1.5246378183364868},{""x"":1.600000023841858,""y"":1.5567657947540283},{""x"":2.0999999046325684,""y"":1.4114240407943726},{""x"":2.5999999046325684,""y"":1.4045010805130005},{""x"":3.0999999046325684,""y"":1.4769829511642456},{""x"":3.5999999046325684,""y"":1.4875500202178955},{""x"":4.099999904632568,""y"":1.2991987466812134},{""x"":4.599999904632568,""y"":0.922961413860321},{""x"":5.099999904632568,""y"":0.6520044803619385},{""x"":5.599999904632568,""y"":0.15350978076457977},{""x"":6.099999904632568,""y"":0.1078903079032898},{""x"":6.599999904632568,""y"":0.17276449501514435},{""x"":7.099999904632568,""y"":0.14066608250141144}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCosta Rica,MKSTKEEIQTIKTLLKDSRTAKYHKRLQIVL,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCCc3ccccc3,1480018,36.3309440612793,995084218,4041 SOUTHWESTERN BLVD,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,6,6,2BPW,6,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.4833641843311227, -1.8945978742090062, 4.671127708092568, 0.24159861311815153],""points"":[{""x"":0.10000000149011612,""y"":0.0969524160027504},{""x"":0.6000000238418579,""y"":0.028483040630817413},{""x"":1.100000023841858,""y"":0.22087176144123077},{""x"":1.600000023841858,""y"":0.0068915546871721745},{""x"":2.0999999046325684,""y"":0.4305879771709442},{""x"":2.5999999046325684,""y"":0.44774115085601807},{""x"":3.0999999046325684,""y"":0.45346319675445557},{""x"":3.5999999046325684,""y"":0.2370593100786209},{""x"":4.099999904632568,""y"":0.4657953977584839},{""x"":4.599999904632568,""y"":1.155200719833374},{""x"":5.099999904632568,""y"":2.2294070720672607},{""x"":5.599999904632568,""y"":2.4311530590057373},{""x"":6.099999904632568,""y"":2.33846116065979},{""x"":6.599999904632568,""y"":2.608201026916504},{""x"":7.099999904632568,""y"":2.8136143684387207}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.224573521642033, 1.4454033924198528, 5.6014197746076535, 0.2823216054197577],""points"":[{""x"":0.10000000149011612,""y"":4.95027494430542},{""x"":0.6000000238418579,""y"":5.1754679679870605},{""x"":1.100000023841858,""y"":5.276752948760986},{""x"":1.600000023841858,""y"":5.589294910430908},{""x"":2.0999999046325684,""y"":5.616994857788086},{""x"":2.5999999046325684,""y"":5.120813846588135},{""x"":3.0999999046325684,""y"":5.340766906738281},{""x"":3.5999999046325684,""y"":4.876471042633057},{""x"":4.099999904632568,""y"":4.94999361038208},{""x"":4.599999904632568,""y"":5.162564754486084},{""x"":5.099999904632568,""y"":4.399557590484619},{""x"":5.599999904632568,""y"":2.7977969646453857},{""x"":6.099999904632568,""y"":1.0229872465133667},{""x"":6.599999904632568,""y"":0.48275601863861084},{""x"":7.099999904632568,""y"":0.10408931970596313}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nCuba,MHAILRYFIRRLFYHIFYKIYSLISKKHQSLPSDVRQF,COc1ccc2c(c1)c(CC(=O)N3CCCC3C(=O)Oc4ccc(C)cc4OC)c(C)n2C(=O)c5ccc(Cl)cc5,1480019,36.33115768432617,995081928,1227 US HIGHWAY 11,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,7,7,1QBS,7,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.320838679713925, -1.2421619987316728, 4.831325425225256, 0.3236011098403072],""points"":[{""x"":0.10000000149011612,""y"":0.3727470338344574},{""x"":0.6000000238418579,""y"":0.12365014106035233},{""x"":1.100000023841858,""y"":0.48422467708587646},{""x"":1.600000023841858,""y"":0.2264465093612671},{""x"":2.0999999046325684,""y"":0.16821794211864471},{""x"":2.5999999046325684,""y"":0.3879014551639557},{""x"":3.0999999046325684,""y"":0.5470244884490967},{""x"":3.5999999046325684,""y"":0.3419053554534912},{""x"":4.099999904632568,""y"":0.7655120491981506},{""x"":4.599999904632568,""y"":1.2346516847610474},{""x"":5.099999904632568,""y"":2.453336715698242},{""x"":5.599999904632568,""y"":2.9565491676330566},{""x"":6.099999904632568,""y"":3.335299491882324},{""x"":6.599999904632568,""y"":3.240290880203247},{""x"":7.099999904632568,""y"":3.1107218265533447}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.6401853521511094, 1.26211588875013, 5.399028074402744, 0.5089580830068091],""points"":[{""x"":0.10000000149011612,""y"":3.8585598468780518},{""x"":0.6000000238418579,""y"":3.6077206134796143},{""x"":1.100000023841858,""y"":3.855252265930176},{""x"":1.600000023841858,""y"":3.619039297103882},{""x"":2.0999999046325684,""y"":3.839388370513916},{""x"":2.5999999046325684,""y"":3.335283041000366},{""x"":3.0999999046325684,""y"":3.571141481399536},{""x"":3.5999999046325684,""y"":3.4155046939849854},{""x"":4.099999904632568,""y"":3.7316646575927734},{""x"":4.599999904632568,""y"":3.0680155754089355},{""x"":5.099999904632568,""y"":2.891066551208496},{""x"":5.599999904632568,""y"":1.6022753715515137},{""x"":6.099999904632568,""y"":0.7652576565742493},{""x"":6.599999904632568,""y"":0.6875326037406921},{""x"":7.099999904632568,""y"":0.5828871726989746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nItaly,MSNFHNEHVMQFYRNNLKTKGVFGRQ,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO[N+](=O)[O-],1480020,36.33115768432617,99502,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,8,8,1ZP8,8,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[2.293592105923809, 1.3781586549141835, 5.1025898038676605, 0.03493851245291291],""points"":[{""x"":0.10000000149011612,""y"":2.1287283897399902},{""x"":0.6000000238418579,""y"":2.267972230911255},{""x"":1.100000023841858,""y"":2.398442506790161},{""x"":1.600000023841858,""y"":2.5130622386932373},{""x"":2.0999999046325684,""y"":2.3255116939544678},{""x"":2.5999999046325684,""y"":2.127340793609619},{""x"":3.0999999046325684,""y"":2.47259783744812},{""x"":3.5999999046325684,""y"":2.131181478500366},{""x"":4.099999904632568,""y"":2.090421438217163},{""x"":4.599999904632568,""y"":2.02299165725708},{""x"":5.099999904632568,""y"":1.1105059385299683},{""x"":5.599999904632568,""y"":0.4494485855102539},{""x"":6.099999904632568,""y"":0.1375635862350464},{""x"":6.599999904632568,""y"":0.036351121962070465},{""x"":7.099999904632568,""y"":0.1619771122932434}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.953125499439879, 1.2528620255306528, 5.187637440149802, 0.3110348753260886],""points"":[{""x"":0.10000000149011612,""y"":5.6585283279418945},{""x"":0.6000000238418579,""y"":5.911152362823486},{""x"":1.100000023841858,""y"":5.924920082092285},{""x"":1.600000023841858,""y"":5.8469438552856445},{""x"":2.0999999046325684,""y"":5.929472923278809},{""x"":2.5999999046325684,""y"":6.190037727355957},{""x"":3.0999999046325684,""y"":6.236179828643799},{""x"":3.5999999046325684,""y"":6.141019344329834},{""x"":4.099999904632568,""y"":5.295210838317871},{""x"":4.599999904632568,""y"":5.265801906585693},{""x"":5.099999904632568,""y"":3.3722851276397705},{""x"":5.599999904632568,""y"":1.8299226760864258},{""x"":6.099999904632568,""y"":0.32690900564193726},{""x"":6.599999904632568,""y"":0.6274543404579163},{""x"":7.099999904632568,""y"":0.8441857099533081}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nRwanda,MPNSEPASLLELFNSIATQGELVRSLKAGNASK,CC(C)Cc1ccc(cc1)C(C)C(=O)N2CCCC2C(=O)OCCO,1480021,36.33137130737305,995037247,"168-46 91ST AVE., 2ND FLR",https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,9,2BDJ,9,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[3.8209972202654474, 1.3779216716448506, 5.299882228439686, 0.06040645519069608],""points"":[{""x"":0.10000000149011612,""y"":3.7821109294891357},{""x"":0.6000000238418579,""y"":3.542433023452759},{""x"":1.100000023841858,""y"":3.7008674144744873},{""x"":1.600000023841858,""y"":3.717301607131958},{""x"":2.0999999046325684,""y"":4.024452209472656},{""x"":2.5999999046325684,""y"":4.013899326324463},{""x"":3.0999999046325684,""y"":3.945094347000122},{""x"":3.5999999046325684,""y"":3.866621971130371},{""x"":4.099999904632568,""y"":3.7461626529693604},{""x"":4.599999904632568,""y"":3.3454740047454834},{""x"":5.099999904632568,""y"":2.61944317817688},{""x"":5.599999904632568,""y"":0.999405026435852},{""x"":6.099999904632568,""y"":0.46259793639183044},{""x"":6.599999904632568,""y"":0.054134611040353775},{""x"":7.099999904632568,""y"":0.05711187422275543}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[5.6318079657726035, 1.8495493770000595, 5.391793312471116, 0.17060707587348442],""points"":[{""x"":0.10000000149011612,""y"":5.458079814910889},{""x"":0.6000000238418579,""y"":5.554427146911621},{""x"":1.100000023841858,""y"":5.799983024597168},{""x"":1.600000023841858,""y"":5.364140033721924},{""x"":2.0999999046325684,""y"":5.864485740661621},{""x"":2.5999999046325684,""y"":5.4509806632995605},{""x"":3.0999999046325684,""y"":5.702574729919434},{""x"":3.5999999046325684,""y"":5.7314534187316895},{""x"":4.099999904632568,""y"":5.5123443603515625},{""x"":4.599999904632568,""y"":5.724395751953125},{""x"":5.099999904632568,""y"":4.354506969451904},{""x"":5.599999904632568,""y"":1.7307666540145874},{""x"":6.099999904632568,""y"":0.6305936574935913},{""x"":6.599999904632568,""y"":0.035183437168598175},{""x"":7.099999904632568,""y"":0.7575169205665588}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\nSwitzerland,IRVVGRYLIEVWKAAGMDMDKVLFLWSSDEI,CN1CCC(CC1)Oc2ccc(cc2)C(F)(F)F,1480028,36.33137130737305,99504,92-11 179TH PLACE,https://datagrok.ai/img/slides/access-db-connect.png,id,ErrorMessage,"COMPND \nATOM \nEND",flag,9,10,1IAN,10,1.23,<chart></chart>,"{""series"":[{""name"":""Run:2023-08-08"",""fitFunction"":""sigmoid"",""fitLineColor"":""#1f77b4"",""pointColor"":""#1f77b4"",""showPoints"":""points"",""parameters"":[1.1190255865097471, 2.3163895161544437, 5.4968866182279195, 0.2035204047289052],""points"":[{""x"":0.10000000149011612,""y"":1.1057683229446411},{""x"":0.6000000238418579,""y"":1.1019697189331055},{""x"":1.100000023841858,""y"":1.0818607807159424},{""x"":1.600000023841858,""y"":1.062997817993164},{""x"":2.0999999046325684,""y"":1.046447515487671},{""x"":2.5999999046325684,""y"":1.1217249631881714},{""x"":3.0999999046325684,""y"":1.2166996002197266},{""x"":3.5999999046325684,""y"":1.215477705001831},{""x"":4.099999904632568,""y"":1.0581893920898438},{""x"":4.599999904632568,""y"":1.1747995615005493},{""x"":5.099999904632568,""y"":1.0181127786636353},{""x"":5.599999904632568,""y"":0.5344523191452026},{""x"":6.099999904632568,""y"":0.2569526433944702},{""x"":6.599999904632568,""y"":0.1912207305431366},{""x"":7.099999904632568,""y"":0.15060538053512573}]},{""name"":""Run:2023-08-08"",""fitLineColor"":""#ffbb78"",""pointColor"":""#ffbb78"",""showPoints"":""points"",""parameters"":[3.1038581025805785, 2.0032224204185245, 5.087602825989163, 0.13277988512492753],""points"":[{""x"":0.10000000149011612,""y"":3.0498509407043457},{""x"":0.6000000238418579,""y"":2.805217742919922},{""x"":1.100000023841858,""y"":3.3415253162384033},{""x"":1.600000023841858,""y"":3.0549843311309814},{""x"":2.0999999046325684,""y"":3.250074863433838},{""x"":2.5999999046325684,""y"":3.0432586669921875},{""x"":3.0999999046325684,""y"":3.265852451324463},{""x"":3.5999999046325684,""y"":2.9475724697113037},{""x"":4.099999904632568,""y"":3.1929898262023926},{""x"":4.599999904632568,""y"":2.7460060119628906},{""x"":5.099999904632568,""y"":1.6175861358642578},{""x"":5.599999904632568,""y"":0.3006608486175537},{""x"":6.099999904632568,""y"":0.3444803059101105},{""x"":6.599999904632568,""y"":0.015537971630692482},{""x"":7.099999904632568,""y"":0.5527358055114746}]}],""chartOptions"":{""xAxisName"":""Conc."",""yAxisName"":""Activity"",""title"":""Dose-Response curves""}}",text,,\n,,,,,,,,,,,,,,,,,,,,,');i.columns.add(s.Column.fromList(s.TYPE.BYTE_ARRAY,"BinaryImage",Array.from(new Uint8Array(11))));var o=function(t,e,n,r){return new(n||(n=Promise))((function(s,i){function o(t){try{a(r.next(t))}catch(t){i(t)}}function l(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?s(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,l)}a((r=r.apply(t,e||[])).next())}))};const l=3e4,a=108e5,u=console.log.bind(console),h=console.info.bind(console),c=console.warn.bind(console),g=console.error.bind(console),d={},m="Auto Tests",p="Demo",f="Detectors",C="Core",y={};let b;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 E{constructor(t,e,n,r){var s;this.category=t,this.name=e,null!=r||(r={}),null!==(s=r.timeout)&&void 0!==s||(r.timeout=l),this.options=r,this.test=()=>o(this,void 0,void 0,(function*(){return new Promise(((t,e)=>o(this,void 0,void 0,(function*(){let r="";try{r=yield n()}catch(t){e(t)}t(r)}))))}))}}function _(t,e,n,r=0,s="timeout"){return o(this,void 0,void 0,(function*(){return new Promise(((i,o)=>{const l=t.subscribe((t=>{try{e(t),i("OK")}catch(t){o(t)}finally{l.unsubscribe(),clearTimeout(a)}})),a=setTimeout((()=>{l.unsubscribe(),o(s)}),r);n()}))}))}function w(t,e,n){null==d[b]&&(d[b]={}),null==d[b].tests&&(d[b].tests=[]),d[b].tests.push(new E(b,t,e,n))}function T(t,e=!0,n){if(n=n?`${n}, `:"",t!==e)throw new Error(`${n}Expected "${e}", got "${t}"`)}function O(t,e,n=.001,r){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 s=Math.abs(t-e)<n;if(T(s,!0,`${null!=r?r:""} (tolerance = ${n})`),!s)throw new Error(`Expected ${e}, got ${t} (tolerance = ${n})`)}function M(t,e){for(const[n,r]of Object.entries(e)){if(!t.hasOwnProperty(n))throw new Error(`Expected property "${n}" not found`);const e=t[n];if(e instanceof Array&&r instanceof Array)N(e,r);else if(e instanceof Object&&r instanceof Object)M(e,r);else if(Number.isFinite(e)&&Number.isFinite(r))O(e,r);else if(e!=r)throw new Error(`Expected (${r}) for key '${n}', got (${e})`)}}function N(t,e){const n=t.length,r=e.length;if(n!=r)throw new Error(`Arrays are of different length: actual array length is ${n} and expected array length is ${r}`);for(let r=0;r<n;r++)if(t[r]instanceof Array&&e[r]instanceof Array)N(t[r],e[r]);else if(t[r]instanceof Object&&e[r]instanceof Object)M(t[r],e[r]);else if(t[r]!=e[r])throw new Error(`Expected ${e[r]} at position ${r}, got ${t[r]}`)}function R(t,e,n){var r;b=t,e(),d[b]&&(d[b].clear=null===(r=null==n?void 0:n.clear)||void 0===r||r,d[b].timeout=null==n?void 0:n.timeout)}function I(t){null==d[b]&&(d[b]={}),d[b].before=t}function L(t){null==d[b]&&(d[b]={}),d[b].after=t}function S(t,e){return t.replace(new RegExp(e.name,"gi"),e.nqName)}function v(t){var e,n,l,a,b,A,_;return o(this,void 0,void 0,(function*(){const w=null===(n=null===(e=r.functions.getCurrentCall())||void 0===e?void 0:e.func)||void 0===n?void 0:n.package;yield function(t,e){var n;return o(this,void 0,void 0,(function*(){const e=t.id;if(y[e])return;const l=d;if(void 0!==l[m]||void 0!==l[p]||Object.keys(l).find((t=>t.startsWith(m)||t.startsWith(C))))return void(y[e]=!0);if("DevTools"===t.name){const t=s.Func.find({tags:["dartTest"]});for(const e of t){const t=e.name.split(/\s*\|\s*/g),r=null!==(n=t.pop())&&void 0!==n?n:e.name,s=t.length?C+": "+t.join(": "):C;void 0===l[s]&&(l[s]={tests:[],clear:!0}),l[s].tests.push(new E(s,r,(()=>o(this,void 0,void 0,(function*(){return yield e.apply()}))),{isAggregated:e.outputs.length>0,timeout:3e5}))}}const a=[],u=[],h=[],c=yield r.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 c){const e=t.options.test,n=t.options.demoPath;if(e&&Array.isArray(e)&&e.length)for(let n=0;n<e.length;n++){const s=e[n].matchAll(g),i={};Array.from(s).forEach((t=>{t[0].startsWith("skip")?i.skip=t[1]:t[0].startsWith("wait")?i.wait=parseInt(t[2]):t[0].startsWith("cat")?i.cat=t[3]:t[0].startsWith("timeout")&&(i.timeout=parseInt(t[4]))}));const u=new E(m,1===e.length?t.name:`${t.name} ${n+1}`,(()=>o(this,void 0,void 0,(function*(){const s=yield r.functions.eval(S(e[n],t));if(i.wait&&(yield P(i.wait)),"boolean"==typeof s&&!s)throw`Failed: ${e[n]}, expected true, got ${s}`}))),{skipReason:i.skip,timeout:i.timeout});if(i.cat){const t=m+": "+i.cat;u.category=t,void 0===l[t]&&(l[t]={tests:[],clear:!0}),l[t].tests.push(u)}else a.push(u)}if(n){const e=t.options.demoWait?parseInt(t.options.demoWait):void 0,n=new E(p,t.friendlyName,(()=>o(this,void 0,void 0,(function*(){if(r.shell.lastError="",yield t.apply(),yield P(e||2e3),r.shell.lastError)throw new Error(r.shell.lastError)}))),{skipReason:t.options.demoSkip});u.push(n)}if(t.hasTag("semTypeDetector")){const e=new E(f,t.friendlyName,(()=>o(this,void 0,void 0,(function*(){const e=[];for(const n of i.clone().columns){const r=yield t.apply([n]);e.push(r||n.semType)}T(e.filter((t=>t)).length,1)}))),{skipReason:t.options.skipTest});h.push(e)}}y[e]=!0,a.length&&(l[m]={tests:a,clear:!0}),u.length&&(l[p]={tests:u,clear:!0}),h.length&&(l[f]={tests:h,clear:!1})}))}(w);const O=[];console.log("Running tests"),null!=t||(t={}),null!==(l=(_=t).testContext)&&void 0!==l||(_.testContext=new x),r.shell.lastError="";const M=[],N=function(){const t=[];return console.log=(...e)=>{t.push(...e),u(...e)},console.info=(...e)=>{t.push(...e),h(...e)},console.warn=(...e)=>{t.push(...e),c(...e)},console.error=(...e)=>{t.push(...e),g(...e)},t}();try{for(const[e,n]of Object.entries(d)){if((null==t?void 0:t.category)&&!e.toLowerCase().startsWith(null==t?void 0:t.category.toLowerCase())||(null===(a=t.exclude)||void 0===a?void 0:a.some((t=>e.startsWith(t)))))continue;u(`Started ${e} category`),M.push(e);const i=null===(b=n.tests)||void 0===b?void 0:b.every((t=>{var e;return null===(e=t.options)||void 0===e?void 0:e.skipReason}));try{n.before&&!i&&(yield n.before())}catch(t){n.beforeStatus=yield H(t)}const o=null!==(A=n.tests)&&void 0!==A?A:[],l=[];if(n.clear)for(let e=0;e<o.length;e++)l.push(yield D(o[e],null==t?void 0:t.test,N,n.timeout,w.name,t.verbose)),r.shell.closeAll(),s.Balloon.closeAll();else for(let e=0;e<o.length;e++)l.push(yield D(o[e],null==t?void 0:t.test,N,n.timeout,w.name,t.verbose));const h=l.filter((t=>"skipped"!=t.result));try{n.after&&!i&&(yield n.after())}catch(t){n.afterStatus=yield H(t)}n.afterStatus&&h.push({category:e,name:"after",result:n.afterStatus,success:!1,ms:0,skipped:!1}),n.beforeStatus&&h.push({category:e,name:"before",result:n.beforeStatus,success:!1,ms:0,skipped:!1}),O.push(...h)}}finally{console.log=u,console.info=h,console.warn=c,console.error=g}if(t.testContext.catchUnhandled&&(yield P(1e3),r.shell.lastError.length>0&&O.push({category:"Unhandled exceptions",name:"exceptions",result:r.shell.lastError,success:!1,ms:0,skipped:!1})),!t.test&&O.length){const e=O.filter((t=>t.success)).length,n=O.filter((t=>t.skipped)).length,i=O.filter((t=>!t.success)),o=w.name;for(const t of M){const e=O.filter((e=>e.category===t)),n=e.filter((t=>!t.success)).length,s={success:0===n,passed:e.filter((t=>t.success)).length,skipped:e.filter((t=>t.skipped)).length,failed:n,type:"package",packageName:o,category:t};r.log.usage(`${o}: ${t}`,s,`category-package ${o}: ${t}`)}if(!t.category){const t={success:0===i.length,passed:e,skipped:n,failed:i.length,type:"package",packageName:o};r.log.usage(o,t,`package-package ${o}`)}if(t.testContext.report){const t=new s.Logger,r="Package @package tested: @successful successful, @skipped skipped, @failed failed tests",o={successful:e,skipped:n,failed:i.length,package:w};for(const t of i)Object.assign(o,{[`${t.category} | ${t.name}`]:t.result});t.log(r,o,"package-tested")}}return O}))}function H(t){return o(this,void 0,void 0,(function*(){return`${t.toString()}\n${t.stack?yield s.Logger.translateStackTrace(t.stack):""}`}))}function D(t,e,n,i,h,c){var d,m,p,f,C,y;return o(this,void 0,void 0,(function*(){let o;n.length=0;let b="package";const A=null!=e&&t.name.toLowerCase()!==e.toLowerCase(),x=(null===(d=t.options)||void 0===d?void 0:d.skipReason)||A,E=A?"skipped":null===(m=t.options)||void 0===m?void 0:m.skipReason;x||u(`Started ${t.category} ${t.name}`);const _=Date.now();try{if(x)o={success:!0,result:E,ms:0,skipped:!0};else{let e=(null===(p=t.options)||void 0===p?void 0:p.timeout)===l&&i?i:null===(f=t.options)||void 0===f?void 0:f.timeout;e=s.Test.isInBenchmark&&e===l?a:e,o={success:!0,result:null!==(C=yield k(t.test,e))&&void 0!==C?C:"OK",ms:0,skipped:!1}}}catch(t){g(t),o={success:!1,result:yield H(t),ms:0,skipped:!1}}if((null===(y=t.options)||void 0===y?void 0:y.isAggregated)&&o.result.constructor===s.DataFrame){const t=o.result.col("success");if(b="core",t&&(o.success=t.stats.sum===t.length),!c){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=n.join("\n"),o.ms=Date.now()-_,x||u(`Finished ${t.category} ${t.name} for ${o.ms} ms`),o.category=t.category,o.name=t.name,!A){let e={success:o.success,result:o.result,ms:o.ms,skipped:o.skipped,type:b,packageName:h,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)}r.log.usage(`${h}: ${t.category}: ${t.name}`,e,`test-${b} ${h}: ${t.category}: ${t.name}`)}return o}))}function P(t){return o(this,void 0,void 0,(function*(){yield new Promise((e=>setTimeout(e,t)))}))}function $(t,e="Timeout exceeded",n=500,r=50){return o(this,void 0,void 0,(function*(){return new Promise(((s,i)=>{setTimeout((()=>{clearInterval(o),i(new Error(e))}),n);const o=setInterval((()=>{t()&&(clearInterval(o),s())}),r)}))}))}function k(t,e){return o(this,void 0,void 0,(function*(){let n=null;const r=new Promise(((t,r)=>{n=setTimeout((()=>{r("EXECUTION TIMEOUT")}),e)}));try{return yield Promise.race([t(),r])}finally{n&&clearTimeout(n)}}))}s.DataFrame.fromColumns([s.Column.fromStrings("col",["val1","val2","val3"])])},8:function(t,e,n){var r;!function(e,s){var i={};!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,r,s,i){for(var o,l,a,u,h,c,g,d,m,p,f,C,y;i>=64;){for(o=n[0],l=n[1],a=n[2],u=n[3],h=n[4],c=n[5],g=n[6],d=n[7],p=0;p<16;p++)f=s+4*p,t[p]=(255&r[f])<<24|(255&r[f+1])<<16|(255&r[f+2])<<8|255&r[f+3];for(p=16;p<64;p++)C=((m=t[p-2])>>>17|m<<15)^(m>>>19|m<<13)^m>>>10,y=((m=t[p-15])>>>7|m<<25)^(m>>>18|m<<14)^m>>>3,t[p]=(C+t[p-7]|0)+(y+t[p-16]|0);for(p=0;p<64;p++)C=(((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&c^~h&g)|0)+(d+(e[p]+t[p]|0)|0)|0,y=((o>>>2|o<<30)^(o>>>13|o<<19)^(o>>>22|o<<10))+(o&l^o&a^l&a)|0,d=g,g=c,c=h,h=u+C|0,u=a,a=l,l=o,o=C+y|0;n[0]+=o,n[1]+=l,n[2]+=a,n[3]+=u,n[4]+=h,n[5]+=c,n[6]+=g,n[7]+=d,s+=64,i-=64}return s}var r=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 r=0;if(this.bytesHashed+=e,this.bufferLength>0){for(;this.bufferLength<64&&e>0;)this.buffer[this.bufferLength++]=t[r++],e--;64===this.bufferLength&&(n(this.temp,this.state,this.buffer,0,64),this.bufferLength=0)}for(e>=64&&(r=n(this.temp,this.state,t,r,e),e%=64);e>0;)this.buffer[this.bufferLength++]=t[r++],e--;return this},e.prototype.finish=function(t){if(!this.finished){var e=this.bytesHashed,r=this.bufferLength,s=e/536870912|0,i=e<<3,o=e%64<56?64:128;this.buffer[r]=128;for(var l=r+1;l<o-8;l++)this.buffer[l]=0;this.buffer[o-8]=s>>>24&255,this.buffer[o-7]=s>>>16&255,this.buffer[o-6]=s>>>8&255,this.buffer[o-5]=s>>>0&255,this.buffer[o-4]=i>>>24&255,this.buffer[o-3]=i>>>16&255,this.buffer[o-2]=i>>>8&255,this.buffer[o-1]=i>>>0&255,n(this.temp,this.state,this.buffer,0,o),this.finished=!0}for(l=0;l<8;l++)t[4*l+0]=this.state[l]>>>24&255,t[4*l+1]=this.state[l]>>>16&255,t[4*l+2]=this.state[l]>>>8&255,t[4*l+3]=this.state[l]>>>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=r;var s=function(){function t(t){this.inner=new r,this.outer=new r,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var e=new Uint8Array(this.blockSize);if(t.length>this.blockSize)(new r).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 i(t){var e=(new r).update(t),n=e.digest();return e.clean(),n}function o(t,e){var n=new s(t).update(e),r=n.digest();return n.clean(),r}function l(t,e,n,r){var s=r[0];if(0===s)throw new Error("hkdf: cannot expand more");e.reset(),s>1&&e.update(t),n&&e.update(n),e.update(r),e.finish(t),r[0]++}t.HMAC=s,t.hash=i,t.default=i,t.hmac=o;var a=new Uint8Array(t.digestLength);t.hkdf=function(t,e,n,r){void 0===e&&(e=a),void 0===r&&(r=32);for(var i=new Uint8Array([1]),u=o(e,t),h=new s(u),c=new Uint8Array(h.digestLength),g=c.length,d=new Uint8Array(r),m=0;m<r;m++)g===c.length&&(l(c,h,n,i),g=0),d[m]=c[g++];return h.clean(),c.fill(0),i.fill(0),d},t.pbkdf2=function(t,e,n,r){for(var i=new s(t),o=i.digestLength,l=new Uint8Array(4),a=new Uint8Array(o),u=new Uint8Array(o),h=new Uint8Array(r),c=0;c*o<r;c++){var g=c+1;l[0]=g>>>24&255,l[1]=g>>>16&255,l[2]=g>>>8&255,l[3]=g>>>0&255,i.reset(),i.update(e),i.update(l),i.finish(u);for(var d=0;d<o;d++)a[d]=u[d];for(d=2;d<=n;d++){i.reset(),i.update(u).finish(u);for(var m=0;m<o;m++)a[m]^=u[m]}for(d=0;d<o&&c*o+d<r;d++)h[c*o+d]=a[d]}for(c=0;c<o;c++)a[c]=u[c]=0;for(c=0;c<4;c++)l[c]=0;return i.clean(),h}}(i);var o=i.default;for(var l in i)o[l]=i[l];"object"==typeof t.exports?t.exports=o:void 0===(r=function(){return o}.call(i,n,i,t))||(t.exports=r)}()},368:(t,e,n)=>{"use strict";n.d(e,{_package:()=>g,getMonomerLib:()=>d}),n(200),n(304);var r=n(888),s=n(482),i=n(372);n(924),n(592),n(736),n(688),n(980);var o=n(248),l=n(824);n(516);var a=n(872);n(468),n(272),l.Cu;var u=n(696);class h extends r.Package{initHelmPatchPistoia(t,e){const n="Helm: initHelmPatchPistoia()",r=i.helm.webeditor.Monomers;this.getMonomerOriginal=r.getMonomer.bind(r),this.logger.debug(`${n}, this.getMonomerOriginal stored`),this.alertOriginal=s.Utils.alert,i.helm.webeditor.Monomers.getMonomer=(r,s)=>{const i=`${n}, org.helm.webeditor.Monomers.getMonomer()`;try{return(0,u.aO)(t,r,s)}catch(t){const[n,r]=(0,a.g$)(t);throw e.error(`${i}, Error: ${n}`,void 0,r),t}},s.Utils.alert=t=>{e.warning(`${n}, scil.Utils.alert() s = 's'.`)},i.helm.webeditor.Monomers=new class{constructor(t){return new Proxy(t,{get:(t,e,n)=>t[e],set:(t,e,n,r)=>(t[e]=n,!0),apply:(t,e,n)=>t[e](...n)})}}(i.helm.webeditor.Monomers),i.helm.webeditor=new class{constructor(t){return new Proxy(t,{get:(t,e,n)=>t[e],set:(t,e,n,r)=>(t[e]=n,!0),apply:(t,e,n)=>t[e](...n)})}}(i.helm.webeditor)}}n(544),o.I5,r.GridCellRenderer,n(543),n(460);let c=null;const g=new h;function d(){return c}},543:(t,e,n)=>{"use strict";n.d(e,{Mp:()=>r,iu:()=>o,uM:()=>i});class r{get rs(){return Object.keys(this.at).length}constructor(t,e,n,r,s,i,o){this.id=t,this.m=e,this.n=n,this.na=r,this.type=s,this.mt=i,this.at=o}static fromMonomer(t,e){let n={};const s=e.smiles;if(e.rgroups.length>0)e.rgroups.forEach((t=>{n[t.label]=t.capGroupName}));else{if(!s)return new l(t,e.symbol);n=function(t){const e=t.match(/(?<=\[)[^\][]*(?=])/gm),n={};let r,s="";if(e)for(let t=0;t<e.length;t++)if(null!=e[t]&&/\d/.test(e[t])){r=e[t][e[t].length-1],e[t]=e[t].replace(/[0-9]/g,"");for(let n=0;n<e[t].length;n++)":"!=e[t][n]&&(s+=e[t][n]);n["R"+r]=s,s=""}return n}(s)}return new r(e.symbol,e.molfile,e.name,e.naturalAnalog,e.polymerType,e.monomerType,n)}}class s{get rs(){return Object.keys(this.at).length}constructor(t,e,n="missing",r=void 0,i=void 0,o=void 0){if(this.biotype=t,this.id=e,this.n=n,this.m=r,this.type=i,this.mt=o,this.at={R1:"H",R2:"H",R3:"H",R4:"H",R5:"H",R6:"H",R7:"H",R8:"H",R9:"H"},this.objId=++s.objCounter,this.className="DummyWebEditorMonomer",!this.id)throw new Error("Invalid arg undefined [id].")}toLog(){return`Helm: ${this.className}<${this.objId}>`}}s.objCounter=-1;class i extends s{constructor(t,e){super(t,e,"gap"),this.backgroundcolor="#FFFFFF",this.linecolor="#808080",this.textcolor="#808080"}}class o extends s{constructor(t,e){super(t,e,"ambiguous"),this.backgroundcolor="#808080",this.linecolor="#000000",this.textcolor="#000000"}}class l extends s{constructor(t,e){super(t,e,"broken"),this.backgroundcolor="#FFFF44",this.linecolor="#800000",this.textcolor="#000000"}}},696:(t,e,n)=>{"use strict";n.d(e,{aO:()=>u,g7:()=>a});var r=n(372),s=(n(482),n(516)),i=n(543);const o=/[\w()]+/,l=RegExp(String.raw`\(${o}(,${o})+\)`);function a(t,e){let n,s;return"ATOM"===t.T?(n=t.biotype(),s=t.elem):(n=t,s=r.helm.webeditor.IO.trimBracket(e)),[n,s]}function u(t,e,n){const[r,o]=a(e,n),u=(0,s.y)(r);let h=t.getMonomer(u,o);if(h&&"HELM_LINKER"==r&&2!=h.rgroups.length)return null;if(h&&"HELM_SUGAR"==r&&3!=h.rgroups.length)return null;h||(h=t.addMissingMonomer(u,o));let c=h.wem;return c||("*"===o?c=h.wem=new i.uM(r,o):("HELM_NUCLETIDE"===r&&"N"===o||"HELM_AA"===r&&"X"===o||l.test(o))&&(c=h.wem=new i.iu(r,o)),c||(c=h.wem=i.Mp.fromMonomer(r,h))),c}},788:(t,e,n)=>{"use strict";n.d(e,{__:()=>c,a6:()=>h,aY:()=>a,kR:()=>u});var r=n(482),s=n(372);const i=/\{(\*\.)+/g,o=/\.(\*\.)+/g,l=/(\.\*)+\}/g;function a(t){return t.replaceAll(i,"{").replaceAll(o,".").replaceAll(l,"}").replace("{*}","{}")}function u(t,e){const n=[];for(let r=0;r<(t??[]).length;++r){const s=e.indexOf(t[r]),i=e.slice(0,s);n.push(i),n.push(t[r]),e=e.substring(s+t[r].length)}return n.push(e),n}function h(t){t=m(t,"$")[0];const e=[];if(!r.Utils.isNullOrEmpty(t)){const n=m(t,"|");for(let r=0;r<n.length;++r){let s=(t=p(n[r]).str).indexOf("{");s=(t=t.substring(s+1)).indexOf("}");const i=m(t=t.substring(0,s),".");for(const t of i)if(t&&""!==t)if(t.startsWith("[")&&t.includes("]")){const n=g(t,1,"[","]"),r=t.substring(1,n);e.push(r);const s=t.substring(n+1);i.push(s)}else if(t.includes("[")&&t.endsWith("]")){const n=d(t,t.length-2,"[","]"),r=t.substring(n+1,t.length-1);e.push(r);const s=t.substring(0,n);i.push(s)}else if(t.includes("(")&&t.includes(")")){const e=t.substring(0,t.indexOf("(")),n=t.substring(t.lastIndexOf(")")+1),r=[e,t.substring(e.length+1,t.length-n.length-1),n];for(const t of r)i.push(t)}else e.push(t)}}return e}function c(t){const e=Object.keys(s.helm.webeditor.monomerTypeList()),n=[],r=[];for(let t=0;t<e.length;t++)n.push(new s.helm.webeditor.Monomers.getMonomerSet(e[t])),Object.keys(n[t]).forEach((e=>{r.push(n[t][e].id)}));return new Set(t.filter((t=>!r.includes(t))))}function g(t,e,n,r){let s=e,i=0;for(;s<t.length;){if(t[s]===n&&i++,t[s]===r){if(0===i)return s;i--}s++}return-1}function d(t,e,n,r){let s=e,i=0;for(;s>=0;){if(t[s]===r&&i++,t[s]===n){if(0===i)return s;i--}s--}return-1}function m(t,e){const n=[];let r="",s=0,i=0,o=0,l=0;for(let a=0;a<t.length;++a){let u=t.substring(a,a+1);if(u==e&&0==i&&0==s&&0==o&&0==l)n.push(r),r="";else{if(r+=u,l>0&&"\\"==u&&a+1<t.length){++a;const e=t.substring(a,a+1);r+=e,u+=e}'"'==u?a>0&&"\\"==t.substring(a-1,a)||(l=0==l?1:0):"["==u?++i:"]"==u?--i:"("==u?++s:")"==u?--s:"{"==u?++o:"}"==u&&--o}}return n.push(r),n}function p(t){const e=f(t,'"');if(null!=e.tag)return e;const n=f(t,"'");return{tag:e.tag,repeat:n.tag,str:n.str}}function f(t,e){let n=null;if(r.Utils.endswith(t,e)){let r=t.length-1;for(;r>0&&(r=t.lastIndexOf(e,r-1),!(r<=0||"\\"!=t.substring(r-1,r))););r>0&&r<t.length-1&&(n=t.substring(r+1,t.length-1),t=t.substring(0,r))}return null!=n&&(n=function(t){return r.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:()=>a});var r=n(304),s=(n(888),n(592)),i=n.n(s),o=(n(688),n(736)),l=n(788);function a(t,e){const n=e.isHelm()?t:e.getConverter(o.qD.HELM)(t),s=(0,l.aY)(n),a=r.div([],{style:{width:"0",height:"0"}});document.documentElement.appendChild(a);try{const t=new JSDraw2.Editor(a,{viewonly:!0});t.setHelm(s);const e=t.getFormula(!0),n=Math.round(100*t.getMolWeight())/100,r=Math.round(100*t.getExtinctionCoefficient(!0))/100;return{formula:e.replace(/<sub>/g,"").replace(/<\/sub>/g,""),"molecular weight":n,"extinction coefficient":r}}finally{i()(a).empty(),a.remove()}}},592:t=>{"use strict";t.exports=$},888:t=>{"use strict";t.exports=DG},924:t=>{"use strict";t.exports=JSDraw2},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 n(r){var s=e[r];if(void 0!==s)return s.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.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 r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},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 r={};(()=>{"use strict";n.r(r),n.d(r,{_package:()=>V,test:()=>U,tests:()=>e.ui});var t=n(888),e=n(272),s=n(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"]],n=["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"]],n=["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 r=0;r<n.length;++r){const i=new Set((0,s.a6)(n[r])),o=Array.from(i);(0,e.ct)(JSON.stringify(o),JSON.stringify(t[r]))}})),["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(((r,i)=>{(0,e.GM)(n[i],(async()=>{const n=(0,s.a6)(r);n.sort();const o=t[i];o.sort(),(0,e.gz)(n,o)}))}))}));var i=n(460),o=n(200);const l="Libraries",a={explicit:["HELMCoreLibrary.json"],exclude:[]};let u=Promise.resolve();async function h(){let t;return u=u.then((async()=>{const e=await o.dapi.userDataStorage.getValue(l,"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 u,t}async function c(t){u=u.then((async()=>{console.debug(`Bio: setUserLibSettings()\n${JSON.stringify(t,void 0,2)}`),await o.dapi.userDataStorage.postValue(l,"Settings",JSON.stringify(t),!0)})),await u}async function g(){await c(a)}(0,e.Gu)("findMonomers",(()=>{let t,n;(0,e.a8)((async()=>{t=await(0,i.wW)(),n=await h(),await g(),await t.loadLibraries(!0)})),(0,e.iV)((async()=>{await c(n),await t.loadLibraries(!0)}));const r={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,n]of Object.entries(r))(0,e.GM)(t,(async()=>{o(n.test,n.tgt)}));function o(t,n){const r=(0,s.a6)(t),i=(0,s.__)(r);(0,e.o1)(i,n)}}));var d=n(468),m=n(824);(0,e.Gu)("HelmService",(()=>{let n,r,s;(0,e.a8)((async()=>{const t="Helm: tests: HelmService: before";V.logger.debug(`${t}, start`);try{n=await(0,i.wW)(),r=await h(),await(0,e.oL)(1e3),await g(),await n.loadLibraries(!0),n.getBioLib().getSummary(),s=await(0,m.cF)(),await s.reset(),V.logger.debug(`${t}, end`)}finally{V.logger.debug(`${t}, fina`)}})),(0,e.iV)((async()=>{const t="Helm: tests: HelmService: after";V.logger.debug(`${t}, start`),await s.reset(),await c(r),await n.loadLibraries(!0),V.logger.debug(`${t}, end`)})),(0,e.GM)("helm",(async()=>{const n="Helm: tests: HelmService: helm";V.logger.debug(`${n}, start`);let r=null,i=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)=>{i=e,o.next()}};s.reset(),r=s.render(r,e,0)}),7e3),(0,e.ct)(null!==i,!0,"Helm task aux is null"),(0,e.ct)(i.mol.atoms.length>0,!0,"Polymer mol atoms empty"),(0,e.ct)(i.mol.atoms.length,8),(0,e.ct)(i.mol.bonds.length,7),(0,e.ct)(s.errorCount,0,"There was errors in NglGlService."),(0,e.ct)(null!==r,!0,"consumerId not assigned"),V.logger.debug(`${n}, end`)}),{timeout:1e4})}));var p,f=n(304),C=n(592),y=n.n(C),b=n(736);async function A(t,n=5e3){await(0,e.oL)(100),await(0,e.SG)(t.onAfterDrawContent,(()=>{}),(()=>{t.invalidate()}),n)}(0,e.Gu)("renderers",(()=>{let n,r;(0,e.a8)((async()=>{n=await(0,i.wW)(),r=await h(),await g(),await n.loadLibraries(!0)})),(0,e.iV)((async()=>{await c(r),await n.loadLibraries(!0)})),(0,e.GM)("missedInLib",(async()=>{await async function(){const n=await o.dapi.files.readCsv("System:AppData/Helm/tests/sample_HELM-missedInLib.csv"),r=n.getCol("HELM"),s=o.shell.addTableView(n);await(0,e.sN)((()=>y()(s.root).find(".d4-grid canvas").length>0),"Table view canvas not found",100),(0,e.ct)(r.semType,t.SEMTYPE.MACROMOLECULE),(0,e.ct)(r.getTag(t.TAGS.UNITS),b.qD.HELM),(0,e.ct)(r.getTag(t.TAGS.CELL_RENDERER),"helm");const i=r.getTag(".cell-renderer.render.error");if(i){const t=JSON.parse(i),e=new Error(t.message);throw e.stack=t.stack,e}}()})),(0,e.GM)("scatterPlotTooltip",(async()=>{await async function(){const n=t.DataFrame.fromCsv(s);n.currentRowIdx=0;const r=o.shell.addTableView(n),i=n.plot.scatter({x:"x",y:"y"});r.dockManager.dock(i,t.DOCK_TYPE.RIGHT,null),await Promise.all([(0,e.SG)(i.onAfterDrawScene,(()=>{}),(()=>{i.invalidateCanvas()}),1e3),A(r.grid,500)]);const l=i.root.getBoundingClientRect(),a=i.worldToScreen(1,0),u=new MouseEvent("mousemove",{cancelable:!0,bubbles:!0,view:window,button:0,clientX:l.left+a.x,clientY:l.top+a.y}),h=y()(i.root).find("canvas").get()[0];await(0,e.SG)((0,d.fromEvent)(h,"mousemove"),(()=>{V.logger.debug(`Test: event, currentRowIdx=${n.currentRowIdx}`),(0,e.ct)(y()(f.tooltip.root).find("div table.d4-row-tooltip-table tr td canvas").length,1),(0,e.ct)(i.hitTest(a.x,a.y),1)}),(()=>{h.dispatchEvent(u)}),500),await A(r.grid,500)}()}));const s="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 x{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 r=this.isWhitespace(n)?e:e-1;for(let t=0;t<r;t++)n=this.getNextColumnIdx(n);return n}parseAtomTypes(){const t=this.atomCount,e=new Array(t);let n=this.getAtomBlockIdx();for(let r=0;r<t;r++)n=this.shiftIdxToAtomType(n),e[r]=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 r=this.getAtomBlockIdx();for(let s=0;s<this.atomCount;s++){r=this.shiftIdxToXColumn(r);for(const i of[t,e,n])i[s]=this.parseFloatValue(r),r=this.getNextColumnIdx(r);r=this.getNextLineIdx(r)}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 r=new Uint16Array(2);r[0]=this.parseIntValue(e),e=this.getNextColumnIdx(e),r[1]=this.parseIntValue(e),t[n]=r,e=this.getNextLineIdx(e)}return t}parseBondTypes(){const t=this.bondCount,e=new Uint16Array(t);let n=this.getBondBlockIdx();for(let r=0;r<t;r++)n=this.shiftIdxToBondType(n),e[r]=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 E extends x{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 r=0;r<e;r++){if(n=this.shiftIdxToAtomType(n),t(this.fileContent.charCodeAt(n),n))return!0;n=this.getNextLineIdx(n)}return!1}}class _ extends E{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 n=this.getAtomIdxToRgpIdxList(e);for(const[e,r]of n){if(t.has(e))throw new Error(`R group ${e} is already in the map`);t.set(e,r)}}));const n=e.map(((t,e)=>{if(t.startsWith(p.ATOM_ALIAS_LINE_START))return e})).filter((t=>void 0!==t)),r=n.map((t=>e[t])),s=n.map((t=>e[t+1]));r.forEach(((e,n)=>{const r=parseInt(e.split(/\s+/)[1])-1,i=parseInt(s[n].substring(1));if(t.has(i))throw new Error(`R group ${i} is already in the map`);t.set(i,r)}));const i=this.getRGroupAtomicIndices().filter((e=>!Array.from(t.values()).includes(e)));if(0!==i.length)throw new Error(`Unaccounted R group indices: ${i}`);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(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 n=parseInt(this.fileContent.substring(t,e));return t=e,e+=p.NUM_OF_COUNTS_DIGITS,{atomCount:n,bondCount:parseInt(this.fileContent.substring(t,e))}}}class w extends E{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 r=e.match(/RGROUPS=\(([\d\s]+)\)/);if(r){const e=r[1].split(/\s+/).map((t=>parseInt(t)));if(e.length>2)throw new Error(`R group data ${e} has more than 2 elements`);const s=e[1];if(t.has(s))throw new Error(`R group ${s} is already in the map`);t.set(s,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 T{constructor(){}static getInstance(t){if(T.isMolfileV2K(t))return new _(t);if(T.isMolfileV3K(t))return new w(t);throw new Error("Malformed molfile")}static isMolfileV2K(t){return _.isValidMolfile(t)}static isMolfileV3K(t){return w.isValidMolfile(t)}}(0,e.Gu)("getMolfiles",(()=>{let n,r;(0,e.a8)((async()=>{n=await(0,i.wW)(),r=await h(),await g(),await n.loadLibraries(!0)})),(0,e.iV)((async()=>{await c(r),await n.loadLibraries(!0)})),(0,e.GM)("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"),r=n.getCol("Helm"),s=o.shell.addTableView(n);V.logger.debug("Helm/getMolfiles/linear1, grid awaiting 1"),await A(s.grid,5e3),V.logger.debug("Helm/getMolfiles/linear1, grid awaited 1");const i=await o.functions.call("Helm:getMolfiles",{col:r});(0,e.ct)(i.length,r.length);const l=i.toList().map((t=>T.getInstance(t)));(0,e.gz)(l.map((t=>t.atomCount)),n.getCol("atoms").toList()),(0,e.gz)(l.map((t=>t.bondCount)),n.getCol("bonds").toList()),V.logger.debug("Helm/getMolfiles/linear1, grid awaiting 2"),await A(s.grid,5e3),V.logger.debug("Helm/getMolfiles/linear1, grid awaited 2")}))}));var O=n(688),M=n(980);const N={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:b.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:b.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:b.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:b.qD.SEPARATOR,separator:"/",alphabet:"UN",res:{formula:"C44H72N9O14P","molecular weight":982.07,"extinction coefficient":1.49}},"fasta-PT":{seq:"IHACTTAY",units:b.qD.FASTA,alphabet:"PT",res:{formula:"C38H58N10O12S","molecular weight":878.99,"extinction coefficient":1.55}},"fasta-DNA":{seq:"ACGTATTCC",units:b.qD.FASTA,alphabet:"DNA",res:{formula:"C87H113N30O56P9","molecular weight":2753.76,"extinction coefficient":91.74}}};function R(n,r,s,i,o){const l=t.Column.fromStrings("seq",[n]);l.semType=t.SEMTYPE.MACROMOLECULE,l.setTag(t.TAGS.UNITS,r),s&&l.setTag("separator",s),i&&l.setTag("alphabet",i);const a=O.YL.forColumn(l),u=(0,M.C)(n,a);(0,e.o1)(u,o)}(0,e.Gu)("properties-widget",(()=>{let t,n=null;(0,e.a8)((async()=>{t=await(0,i.wW)(),n=h(),await g(),await t.loadLibraries(!0)})),(0,e.iV)((async()=>{await c(n),await t.loadLibraries(!0)}));for(const[t,n]of Object.entries(N))(0,e.GM)(t,(async()=>{R(n.seq,n.units,n.separator,n.alphabet,n.res)}))}));var I=n(848),L=n.n(I),S=n(544);async function v(t,n){const r=function(t){const e=t?(0,s.a6)(t):[];return t?(0,s.kR)(e,t):[]}(t);(0,e.gz)(r,n)}n(368),S.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[n,r]of Object.entries(t))(0,e.GM)(`${n}`,(async()=>{await v(r.seq,r.tgt)}))}));var H=n(372),D=n(924),P=n(872);const $={PEPTIDE:322,RNA:383,CHEM:0};function k(t,n){const r=n??$,s=t.getSummaryObj();for(const t in r)r[t]||delete r[t];for(const t in s)s[t]||delete s[t];if(0==Object.keys(r).length&&0!=Object.keys(s).length)throw new Error("Expected empty monomer lib, actual is not.");if(0!=Object.keys(r).length&&0==Object.keys(s).length)throw new Error("Expected non-empty monomer lib, actual is empty.");try{(0,e.o1)(s,r),(0,e.o1)(r,s)}catch(t){throw new Error(`Expected monomer lib ${JSON.stringify(r)} does not match actual ${JSON.stringify(s)}.`)}}var F=n(696);const G={t0:{args:{a:"HELM_BASE",name:"A"},tgt:{id:"A",m:"HELM Core Monomer library\n Ketcher 10131612512D 1 1.00000 0.00000 0\n\n 11 12 0 0 0 999 V2000\n 0.9632 -3.5449 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 0.0970 -4.0450 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 0.0970 -5.0451 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 0.9630 -5.5451 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 1.8291 -5.0452 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1.8293 -4.0451 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n -0.8536 -5.3539 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n -1.4413 -4.5449 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -0.8535 -3.7357 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 0.9632 -2.5448 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n -1.1626 -6.3051 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1 10 1 0 0 0\n 1 6 2 0 0 0\n 1 2 1 0 0 0\n 9 2 1 0 0 0\n 2 3 2 0 0 0\n 7 3 1 0 0 0\n 3 4 1 0 0 0\n 4 5 2 0 0 0\n 5 6 1 0 0 0\n 7 8 1 0 0 0\n 7 11 1 0 0 0\n 8 9 2 0 0 0\nA 11\nR1\nM END\n",n:"Adenine",na:"A",rs:1,at:{R1:"H"}}},t1:{args:{a:"HELM_BASE",name:"C"},tgt:{id:"C",m:"HELM Core Monomer library\nHELMMonomers071816.sdf \n\n 9 9 0 0 0 0 0 0 0 0999 V2000\n 10.7683 -10.8385 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 10.7683 -12.3385 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 9.4733 -13.0885 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 8.1683 -12.3385 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 8.1683 -10.8385 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 9.4733 -10.0885 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 9.4733 -8.5885 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 9.4733 -14.5885 0.0000 R1 0 0 0 0 0 0 0 0 0 0 0 0\n 12.0673 -13.0885 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0\n 2 3 1 0 0\n 3 4 1 0 0\n 4 5 2 0 0\n 5 6 1 0 0\n 1 6 2 0 0\n 6 7 1 0 0\n 3 8 1 0 0\n 2 9 2 0 0\nA 8\nR1\nM END\n",n:"Cytosine",na:"C",rs:1,at:{R1:"H"}}},t2:{args:{a:"HELM_BASE",name:"G"},tgt:{id:"G",m:"HELM Core Monomer library\nHELMMonomers071816.sdf \n\n 12 13 0 0 0 0 0 0 0 0999 V2000\n 12.7698 -10.2854 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 12.7698 -11.7854 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 11.4733 -12.5380 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 10.1698 -11.7854 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 10.1698 -10.2854 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 11.4748 -9.5354 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 7.8623 -11.0354 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 8.7448 -9.8154 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 11.4748 -8.0354 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 14.0689 -12.5354 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 8.7448 -12.2479 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 8.2789 -13.6737 0.0000 R1 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0\n 2 3 2 0 0\n 3 4 1 0 0\n 4 5 2 0 0\n 5 6 1 0 0\n 1 6 1 0 0\n 7 8 2 0 0\n 5 8 1 0 0\n 6 9 2 0 0\n 2 10 1 0 0\n 4 11 1 0 0\n 7 11 1 0 0\n 11 12 1 0 0\nA 12\nR1\nM END\n",n:"Guanine",na:"G",rs:1,at:{R1:"H"}}},t3:{args:{a:"HELM_LINKER",name:"p"},tgt:{id:"p",m:"HELM Core Monomer library\n Ketcher 10061618102D 1 1.00000 0.00000 0\n\n 5 4 0 0 0 999 V2000\n 15.7527 -12.0837 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 15.7527 -13.0837 0.0000 P 0 0 0 0 0 0 0 0 0 0 0 0\n 16.6188 -13.5837 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 15.2527 -13.9496 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 14.7868 -12.8248 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 2 4 2 0 0 0\n 2 5 1 0 0 0\nA 1\nR1\nA 3\nR2\nM END\n",n:"Phosphate",na:"p",rs:2,at:{R1:"OH",R2:"OH"}}},t4:{args:{a:"HELM_SUGAR",name:"p"},tgt:null},t5:{args:{a:"HELM_SUGAR",name:"r"},tgt:{id:"r",m:"HELM Core Monomer library\n Ketcher 10111608242D 1 1.00000 0.00000 0\n\n 12 12 0 0 0 999 V2000\n -31.2431 12.8416 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.9523 11.8849 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.9523 11.8659 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.6254 12.8108 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.4231 13.4140 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -32.1882 13.1686 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5552 11.0872 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5220 10.0877 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.3803 11.0458 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -28.6686 13.1017 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -32.3775 14.1506 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -33.2435 14.6506 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 3 4 1 0 0 0\n 4 5 1 0 0 0\n 5 1 1 0 0 0\n 1 6 1 1 0 0\n 2 7 1 6 0 0\n 7 8 1 0 0 0\n 3 9 1 6 0 0\n 4 10 1 1 0 0\n 6 11 1 0 0 0\n 11 12 1 0 0 0\nA 8\nR2\nA 10\nR3\nA 12\nR1\nM END\n",n:"Ribose",na:"r",rs:3,at:{R1:"H",R2:"H",R3:"OH"}}},t6:{args:{a:{T:"ATOM",p:{x:144,y:0},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_SUGAR",id:null,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"r",color:null,hcount:null,selected:!1,f:null,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,_parent:"[object Object]",_aaid:4}},tgt:{id:"r",m:"HELM Core Monomer library\n Ketcher 10111608242D 1 1.00000 0.00000 0\n\n 12 12 0 0 0 999 V2000\n -31.2431 12.8416 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.9523 11.8849 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.9523 11.8659 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.6254 12.8108 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.4231 13.4140 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -32.1882 13.1686 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5552 11.0872 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5220 10.0877 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.3803 11.0458 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -28.6686 13.1017 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -32.3775 14.1506 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -33.2435 14.6506 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 3 4 1 0 0 0\n 4 5 1 0 0 0\n 5 1 1 0 0 0\n 1 6 1 1 0 0\n 2 7 1 6 0 0\n 7 8 1 0 0 0\n 3 9 1 6 0 0\n 4 10 1 1 0 0\n 6 11 1 0 0 0\n 11 12 1 0 0 0\nA 8\nR2\nA 10\nR3\nA 12\nR1\nM END\n",n:"Ribose",na:"r",rs:3,at:{R1:"H",R2:"H",R3:"OH"}}},t7:{args:{a:{T:"ATOM",p:{x:144,y:0},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_SUGAR",id:null,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"r",color:null,hcount:null,selected:!1,f:null,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,tag:null,_parent:"[object Object]",_aaid:4}},tgt:{id:"r",m:"HELM Core Monomer library\n Ketcher 10111608242D 1 1.00000 0.00000 0\n\n 12 12 0 0 0 999 V2000\n -31.2431 12.8416 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.9523 11.8849 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.9523 11.8659 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.6254 12.8108 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.4231 13.4140 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -32.1882 13.1686 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5552 11.0872 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5220 10.0877 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.3803 11.0458 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -28.6686 13.1017 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -32.3775 14.1506 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -33.2435 14.6506 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 3 4 1 0 0 0\n 4 5 1 0 0 0\n 5 1 1 0 0 0\n 1 6 1 1 0 0\n 2 7 1 6 0 0\n 7 8 1 0 0 0\n 3 9 1 6 0 0\n 4 10 1 1 0 0\n 6 11 1 0 0 0\n 11 12 1 0 0 0\nA 8\nR2\nA 10\nR3\nA 12\nR1\nM END\n",n:"Ribose",na:"r",rs:3,at:{R1:"H",R2:"H",R3:"OH"}}},t8:{args:{a:{T:"ATOM",p:{x:144,y:48},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_BASE",id:null,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"G",color:null,hcount:null,selected:!1,f:null,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,tag:null,_parent:"[object Object]",_aaid:5}},tgt:{id:"G",m:"HELM Core Monomer library\nHELMMonomers071816.sdf \n\n 12 13 0 0 0 0 0 0 0 0999 V2000\n 12.7698 -10.2854 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 12.7698 -11.7854 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 11.4733 -12.5380 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 10.1698 -11.7854 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 10.1698 -10.2854 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 11.4748 -9.5354 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 7.8623 -11.0354 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 8.7448 -9.8154 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 11.4748 -8.0354 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 14.0689 -12.5354 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 8.7448 -12.2479 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 8.2789 -13.6737 0.0000 R1 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0\n 2 3 2 0 0\n 3 4 1 0 0\n 4 5 2 0 0\n 5 6 1 0 0\n 1 6 1 0 0\n 7 8 2 0 0\n 5 8 1 0 0\n 6 9 2 0 0\n 2 10 1 0 0\n 4 11 1 0 0\n 7 11 1 0 0\n 11 12 1 0 0\nA 12\nR1\nM END\n",n:"Guanine",na:"G",rs:1,at:{R1:"H"}}},t9:{args:{a:{T:"ATOM",p:{x:192,y:0},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_LINKER",id:null,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"p",color:null,hcount:null,selected:!1,f:null,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,_parent:"[object Object]",_aaid:6}},tgt:{id:"p",m:"HELM Core Monomer library\n Ketcher 10061618102D 1 1.00000 0.00000 0\n\n 5 4 0 0 0 999 V2000\n 15.7527 -12.0837 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 15.7527 -13.0837 0.0000 P 0 0 0 0 0 0 0 0 0 0 0 0\n 16.6188 -13.5837 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 15.2527 -13.9496 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 14.7868 -12.8248 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 2 4 2 0 0 0\n 2 5 1 0 0 0\nA 1\nR1\nA 3\nR2\nM END\n",n:"Phosphate",na:"p",rs:2,at:{R1:"OH",R2:"OH"}}},t10:{args:{a:{T:"ATOM",p:{x:192,y:0},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_LINKER",id:null,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"p",color:null,hcount:null,selected:!1,f:null,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,tag:null,_parent:"[object Object]",_aaid:6}},tgt:{id:"p",m:"HELM Core Monomer library\n Ketcher 10061618102D 1 1.00000 0.00000 0\n\n 5 4 0 0 0 999 V2000\n 15.7527 -12.0837 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 15.7527 -13.0837 0.0000 P 0 0 0 0 0 0 0 0 0 0 0 0\n 16.6188 -13.5837 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 15.2527 -13.9496 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 14.7868 -12.8248 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 2 4 2 0 0 0\n 2 5 1 0 0 0\nA 1\nR1\nA 3\nR2\nM END\n",n:"Phosphate",na:"p",rs:2,at:{R1:"OH",R2:"OH"}}},t11:{args:{a:{T:"ATOM",p:{x:205,y:136},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_SUGAR",id:null,ambiguity:null,annotation:"5'",annotationshowright:null},locked:!1,hidden:null,_rect:null,elem:"r",color:null,hcount:null,selected:!1,f:0,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,_parent:"[object Object]",_aaid:1,ringclosures:null,_outside:!1,_haslabel:!1},name:"r"},tgt:{id:"r",m:"HELM Core Monomer library\n Ketcher 10111608242D 1 1.00000 0.00000 0\n\n 12 12 0 0 0 999 V2000\n -31.2431 12.8416 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.9523 11.8849 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.9523 11.8659 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.6254 12.8108 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.4231 13.4140 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -32.1882 13.1686 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5552 11.0872 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5220 10.0877 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.3803 11.0458 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -28.6686 13.1017 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -32.3775 14.1506 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -33.2435 14.6506 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 3 4 1 0 0 0\n 4 5 1 0 0 0\n 5 1 1 0 0 0\n 1 6 1 1 0 0\n 2 7 1 6 0 0\n 7 8 1 0 0 0\n 3 9 1 6 0 0\n 4 10 1 1 0 0\n 6 11 1 0 0 0\n 11 12 1 0 0 0\nA 8\nR2\nA 10\nR3\nA 12\nR1\nM END\n",n:"Ribose",na:"r",rs:3,at:{R1:"H",R2:"H",R3:"OH"}}},t12:{args:{a:{T:"ATOM",p:{x:205,y:184},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_BASE",id:1,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"A",color:null,hcount:null,selected:!1,f:0,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,tag:null,_parent:"[object Object]",_aaid:2,ringclosures:null,_outside:!1,_haslabel:!1},name:"A"},tgt:{id:"A",m:"HELM Core Monomer library\n Ketcher 10131612512D 1 1.00000 0.00000 0\n\n 11 12 0 0 0 999 V2000\n 0.9632 -3.5449 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 0.0970 -4.0450 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 0.0970 -5.0451 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 0.9630 -5.5451 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 1.8291 -5.0452 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1.8293 -4.0451 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n -0.8536 -5.3539 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n -1.4413 -4.5449 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -0.8535 -3.7357 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 0.9632 -2.5448 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n -1.1626 -6.3051 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1 10 1 0 0 0\n 1 6 2 0 0 0\n 1 2 1 0 0 0\n 9 2 1 0 0 0\n 2 3 2 0 0 0\n 7 3 1 0 0 0\n 3 4 1 0 0 0\n 4 5 2 0 0 0\n 5 6 1 0 0 0\n 7 8 1 0 0 0\n 7 11 1 0 0 0\n 8 9 2 0 0 0\nA 11\nR1\nM END\n",n:"Adenine",na:"A",rs:1,at:{R1:"H"}}},t13:{args:{a:{T:"ATOM",p:{x:240,y:0},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_SUGAR",id:null,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"r",color:null,hcount:null,selected:!1,f:null,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,_parent:"[object Object]",_aaid:7}},tgt:{id:"r",m:"HELM Core Monomer library\n Ketcher 10111608242D 1 1.00000 0.00000 0\n\n 12 12 0 0 0 999 V2000\n -31.2431 12.8416 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.9523 11.8849 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.9523 11.8659 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.6254 12.8108 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.4231 13.4140 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -32.1882 13.1686 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5552 11.0872 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5220 10.0877 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.3803 11.0458 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -28.6686 13.1017 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -32.3775 14.1506 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -33.2435 14.6506 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 3 4 1 0 0 0\n 4 5 1 0 0 0\n 5 1 1 0 0 0\n 1 6 1 1 0 0\n 2 7 1 6 0 0\n 7 8 1 0 0 0\n 3 9 1 6 0 0\n 4 10 1 1 0 0\n 6 11 1 0 0 0\n 11 12 1 0 0 0\nA 8\nR2\nA 10\nR3\nA 12\nR1\nM END\n",n:"Ribose",na:"r",rs:3,at:{R1:"H",R2:"H",R3:"OH"}}},t14:{args:{a:{T:"ATOM",p:{x:240,y:0},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_SUGAR",id:null,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"r",color:null,hcount:null,selected:!1,f:null,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,tag:null,_parent:"[object Object]",_aaid:7}},tgt:{id:"r",m:"HELM Core Monomer library\n Ketcher 10111608242D 1 1.00000 0.00000 0\n\n 12 12 0 0 0 999 V2000\n -31.2431 12.8416 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.9523 11.8849 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.9523 11.8659 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.6254 12.8108 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.4231 13.4140 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -32.1882 13.1686 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5552 11.0872 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5220 10.0877 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.3803 11.0458 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -28.6686 13.1017 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -32.3775 14.1506 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -33.2435 14.6506 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 3 4 1 0 0 0\n 4 5 1 0 0 0\n 5 1 1 0 0 0\n 1 6 1 1 0 0\n 2 7 1 6 0 0\n 7 8 1 0 0 0\n 3 9 1 6 0 0\n 4 10 1 1 0 0\n 6 11 1 0 0 0\n 11 12 1 0 0 0\nA 8\nR2\nA 10\nR3\nA 12\nR1\nM END\n",n:"Ribose",na:"r",rs:3,at:{R1:"H",R2:"H",R3:"OH"}}},t15:{args:{a:{T:"ATOM",p:{x:240,y:48},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_BASE",id:null,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"C",color:null,hcount:null,selected:!1,f:null,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,tag:null,_parent:"[object Object]",_aaid:8}},tgt:{id:"C",m:"HELM Core Monomer library\nHELMMonomers071816.sdf \n\n 9 9 0 0 0 0 0 0 0 0999 V2000\n 10.7683 -10.8385 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 10.7683 -12.3385 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 9.4733 -13.0885 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 8.1683 -12.3385 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 8.1683 -10.8385 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 9.4733 -10.0885 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 9.4733 -8.5885 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 9.4733 -14.5885 0.0000 R1 0 0 0 0 0 0 0 0 0 0 0 0\n 12.0673 -13.0885 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0\n 2 3 1 0 0\n 3 4 1 0 0\n 4 5 2 0 0\n 5 6 1 0 0\n 1 6 2 0 0\n 6 7 1 0 0\n 3 8 1 0 0\n 2 9 2 0 0\nA 8\nR1\nM END\n",n:"Cytosine",na:"C",rs:1,at:{R1:"H"}}},t16:{args:{a:{T:"ATOM",p:{x:253,y:136},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_LINKER",id:null,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"p",color:null,hcount:null,selected:!1,f:0,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,_parent:"[object Object]",_aaid:3,ringclosures:null,_outside:!1,_haslabel:!1},name:"p"},tgt:{id:"p",m:"HELM Core Monomer library\n Ketcher 10061618102D 1 1.00000 0.00000 0\n\n 5 4 0 0 0 999 V2000\n 15.7527 -12.0837 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 15.7527 -13.0837 0.0000 P 0 0 0 0 0 0 0 0 0 0 0 0\n 16.6188 -13.5837 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 15.2527 -13.9496 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 14.7868 -12.8248 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 2 4 2 0 0 0\n 2 5 1 0 0 0\nA 1\nR1\nA 3\nR2\nM END\n",n:"Phosphate",na:"p",rs:2,at:{R1:"OH",R2:"OH"}}},t17:{args:{a:{T:"ATOM",p:{x:288,y:0},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_LINKER",id:null,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"p",color:null,hcount:null,selected:!1,f:null,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,tag:null,_parent:"[object Object]",_aaid:9}},tgt:{id:"p",m:"HELM Core Monomer library\n Ketcher 10061618102D 1 1.00000 0.00000 0\n\n 5 4 0 0 0 999 V2000\n 15.7527 -12.0837 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 15.7527 -13.0837 0.0000 P 0 0 0 0 0 0 0 0 0 0 0 0\n 16.6188 -13.5837 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 15.2527 -13.9496 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 14.7868 -12.8248 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 2 4 2 0 0 0\n 2 5 1 0 0 0\nA 1\nR1\nA 3\nR2\nM END\n",n:"Phosphate",na:"p",rs:2,at:{R1:"OH",R2:"OH"}}},t18:{args:{a:{T:"ATOM",p:{x:301,y:136},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_SUGAR",id:null,ambiguity:null,annotation:null},locked:!1,hidden:null,_rect:null,elem:"r",color:null,hcount:null,selected:!1,f:0,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,_parent:"[object Object]",_aaid:1,ringclosures:null,_outside:!1,_haslabel:!1},name:"r"},tgt:{id:"r",m:"HELM Core Monomer library\n Ketcher 10111608242D 1 1.00000 0.00000 0\n\n 12 12 0 0 0 999 V2000\n -31.2431 12.8416 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.9523 11.8849 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.9523 11.8659 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.6254 12.8108 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.4231 13.4140 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -32.1882 13.1686 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5552 11.0872 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5220 10.0877 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.3803 11.0458 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -28.6686 13.1017 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -32.3775 14.1506 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -33.2435 14.6506 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 3 4 1 0 0 0\n 4 5 1 0 0 0\n 5 1 1 0 0 0\n 1 6 1 1 0 0\n 2 7 1 6 0 0\n 7 8 1 0 0 0\n 3 9 1 6 0 0\n 4 10 1 1 0 0\n 6 11 1 0 0 0\n 11 12 1 0 0 0\nA 8\nR2\nA 10\nR3\nA 12\nR1\nM END\n",n:"Ribose",na:"r",rs:3,at:{R1:"H",R2:"H",R3:"OH"}}},t19:{args:{a:{T:"ATOM",p:{x:301,y:184},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_BASE",id:2,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"G",color:null,hcount:null,selected:!1,f:0,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,tag:null,_parent:"[object Object]",_aaid:2,ringclosures:null,_outside:!1,_haslabel:!1},name:"G"},tgt:{id:"G",m:"HELM Core Monomer library\nHELMMonomers071816.sdf \n\n 12 13 0 0 0 0 0 0 0 0999 V2000\n 12.7698 -10.2854 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 12.7698 -11.7854 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 11.4733 -12.5380 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 10.1698 -11.7854 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 10.1698 -10.2854 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 11.4748 -9.5354 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 7.8623 -11.0354 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 8.7448 -9.8154 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 11.4748 -8.0354 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 14.0689 -12.5354 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 8.7448 -12.2479 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 8.2789 -13.6737 0.0000 R1 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0\n 2 3 2 0 0\n 3 4 1 0 0\n 4 5 2 0 0\n 5 6 1 0 0\n 1 6 1 0 0\n 7 8 2 0 0\n 5 8 1 0 0\n 6 9 2 0 0\n 2 10 1 0 0\n 4 11 1 0 0\n 7 11 1 0 0\n 11 12 1 0 0\nA 12\nR1\nM END\n",n:"Guanine",na:"G",rs:1,at:{R1:"H"}}},t20:{args:{a:{T:"ATOM",p:{x:349,y:136},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_LINKER",id:null,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"p",color:null,hcount:null,selected:!1,f:0,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,_parent:"[object Object]",_aaid:6,ringclosures:null,_outside:!1,_haslabel:!1},name:"p"},tgt:{id:"p",m:"HELM Core Monomer library\n Ketcher 10061618102D 1 1.00000 0.00000 0\n\n 5 4 0 0 0 999 V2000\n 15.7527 -12.0837 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 15.7527 -13.0837 0.0000 P 0 0 0 0 0 0 0 0 0 0 0 0\n 16.6188 -13.5837 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 15.2527 -13.9496 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 14.7868 -12.8248 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 2 4 2 0 0 0\n 2 5 1 0 0 0\nA 1\nR1\nA 3\nR2\nM END\n",n:"Phosphate",na:"p",rs:2,at:{R1:"OH",R2:"OH"}}},t21:{args:{a:{T:"ATOM",p:{x:397,y:136},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_SUGAR",id:null,ambiguity:null,annotation:null},locked:!1,hidden:null,_rect:null,elem:"r",color:null,hcount:null,selected:!1,f:0,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,_parent:"[object Object]",_aaid:1,ringclosures:null,_outside:!1,_haslabel:!1},name:"r"},tgt:{id:"r",m:"HELM Core Monomer library\n Ketcher 10111608242D 1 1.00000 0.00000 0\n\n 12 12 0 0 0 999 V2000\n -31.2431 12.8416 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.9523 11.8849 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.9523 11.8659 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.6254 12.8108 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.4231 13.4140 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -32.1882 13.1686 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5552 11.0872 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5220 10.0877 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.3803 11.0458 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -28.6686 13.1017 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -32.3775 14.1506 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -33.2435 14.6506 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 3 4 1 0 0 0\n 4 5 1 0 0 0\n 5 1 1 0 0 0\n 1 6 1 1 0 0\n 2 7 1 6 0 0\n 7 8 1 0 0 0\n 3 9 1 6 0 0\n 4 10 1 1 0 0\n 6 11 1 0 0 0\n 11 12 1 0 0 0\nA 8\nR2\nA 10\nR3\nA 12\nR1\nM END\n",n:"Ribose",na:"r",rs:3,at:{R1:"H",R2:"H",R3:"OH"}}},t22:{args:{a:{T:"ATOM",p:{x:397,y:184},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_BASE",id:3,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"C",color:null,hcount:null,selected:!1,f:0,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,tag:null,_parent:"[object Object]",_aaid:2,ringclosures:null,_outside:!1,_haslabel:!1},name:"C"},tgt:{id:"C",m:"HELM Core Monomer library\nHELMMonomers071816.sdf \n\n 9 9 0 0 0 0 0 0 0 0999 V2000\n 10.7683 -10.8385 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 10.7683 -12.3385 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 9.4733 -13.0885 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 8.1683 -12.3385 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 8.1683 -10.8385 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 9.4733 -10.0885 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 9.4733 -8.5885 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 9.4733 -14.5885 0.0000 R1 0 0 0 0 0 0 0 0 0 0 0 0\n 12.0673 -13.0885 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0\n 2 3 1 0 0\n 3 4 1 0 0\n 4 5 2 0 0\n 5 6 1 0 0\n 1 6 2 0 0\n 6 7 1 0 0\n 3 8 1 0 0\n 2 9 2 0 0\nA 8\nR1\nM END\n",n:"Cytosine",na:"C",rs:1,at:{R1:"H"}}},t23:{args:{a:{T:"ATOM",p:{x:445,y:136},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_LINKER",id:null,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"p",color:null,hcount:null,selected:!1,f:0,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,_parent:"[object Object]",_aaid:9,ringclosures:null,_outside:!1,_haslabel:!1},name:"p"},tgt:{id:"p",m:"HELM Core Monomer library\n Ketcher 10061618102D 1 1.00000 0.00000 0\n\n 5 4 0 0 0 999 V2000\n 15.7527 -12.0837 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 15.7527 -13.0837 0.0000 P 0 0 0 0 0 0 0 0 0 0 0 0\n 16.6188 -13.5837 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 15.2527 -13.9496 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 14.7868 -12.8248 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 2 4 2 0 0 0\n 2 5 1 0 0 0\nA 1\nR1\nA 3\nR2\nM END\n",n:"Phosphate",na:"p",rs:2,at:{R1:"OH",R2:"OH"}}},t24:{args:{a:{T:"ATOM",p:{x:48,y:0},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_SUGAR",id:null,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"r",color:null,hcount:null,selected:!1,f:null,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,_parent:"[object Object]",_aaid:1}},tgt:{id:"r",m:"HELM Core Monomer library\n Ketcher 10111608242D 1 1.00000 0.00000 0\n\n 12 12 0 0 0 999 V2000\n -31.2431 12.8416 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.9523 11.8849 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.9523 11.8659 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.6254 12.8108 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.4231 13.4140 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -32.1882 13.1686 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5552 11.0872 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5220 10.0877 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.3803 11.0458 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -28.6686 13.1017 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -32.3775 14.1506 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -33.2435 14.6506 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 3 4 1 0 0 0\n 4 5 1 0 0 0\n 5 1 1 0 0 0\n 1 6 1 1 0 0\n 2 7 1 6 0 0\n 7 8 1 0 0 0\n 3 9 1 6 0 0\n 4 10 1 1 0 0\n 6 11 1 0 0 0\n 11 12 1 0 0 0\nA 8\nR2\nA 10\nR3\nA 12\nR1\nM END\n",n:"Ribose",na:"r",rs:3,at:{R1:"H",R2:"H",R3:"OH"}}},t25:{args:{a:{T:"ATOM",p:{x:48,y:0},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_SUGAR",id:null,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"r",color:null,hcount:null,selected:!1,f:null,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,tag:null,_parent:"[object Object]",_aaid:1}},tgt:{id:"r",m:"HELM Core Monomer library\n Ketcher 10111608242D 1 1.00000 0.00000 0\n\n 12 12 0 0 0 999 V2000\n -31.2431 12.8416 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.9523 11.8849 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.9523 11.8659 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.6254 12.8108 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -30.4231 13.4140 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -32.1882 13.1686 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5552 11.0872 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -31.5220 10.0877 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -29.3803 11.0458 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -28.6686 13.1017 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -32.3775 14.1506 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n -33.2435 14.6506 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 3 4 1 0 0 0\n 4 5 1 0 0 0\n 5 1 1 0 0 0\n 1 6 1 1 0 0\n 2 7 1 6 0 0\n 7 8 1 0 0 0\n 3 9 1 6 0 0\n 4 10 1 1 0 0\n 6 11 1 0 0 0\n 11 12 1 0 0 0\nA 8\nR2\nA 10\nR3\nA 12\nR1\nM END\n",n:"Ribose",na:"r",rs:3,at:{R1:"H",R2:"H",R3:"OH"}}},t26:{args:{a:{T:"ATOM",p:{x:48,y:48},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_BASE",id:null,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"A",color:null,hcount:null,selected:!1,f:null,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,tag:null,_parent:"[object Object]",_aaid:2}},tgt:{id:"A",m:"HELM Core Monomer library\n Ketcher 10131612512D 1 1.00000 0.00000 0\n\n 11 12 0 0 0 999 V2000\n 0.9632 -3.5449 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 0.0970 -4.0450 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 0.0970 -5.0451 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 0.9630 -5.5451 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 1.8291 -5.0452 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1.8293 -4.0451 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n -0.8536 -5.3539 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n -1.4413 -4.5449 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n -0.8535 -3.7357 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n 0.9632 -2.5448 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0\n -1.1626 -6.3051 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 1 10 1 0 0 0\n 1 6 2 0 0 0\n 1 2 1 0 0 0\n 9 2 1 0 0 0\n 2 3 2 0 0 0\n 7 3 1 0 0 0\n 3 4 1 0 0 0\n 4 5 2 0 0 0\n 5 6 1 0 0 0\n 7 8 1 0 0 0\n 7 11 1 0 0 0\n 8 9 2 0 0 0\nA 11\nR1\nM END\n",n:"Adenine",na:"A",rs:1,at:{R1:"H"}}},t27:{args:{a:{T:"ATOM",p:{x:96,y:0},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_LINKER",id:null,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"p",color:null,hcount:null,selected:!1,f:null,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,_parent:"[object Object]",_aaid:3}},tgt:{id:"p",m:"HELM Core Monomer library\n Ketcher 10061618102D 1 1.00000 0.00000 0\n\n 5 4 0 0 0 999 V2000\n 15.7527 -12.0837 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 15.7527 -13.0837 0.0000 P 0 0 0 0 0 0 0 0 0 0 0 0\n 16.6188 -13.5837 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 15.2527 -13.9496 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 14.7868 -12.8248 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 2 4 2 0 0 0\n 2 5 1 0 0 0\nA 1\nR1\nA 3\nR2\nM END\n",n:"Phosphate",na:"p",rs:2,at:{R1:"OH",R2:"OH"}}},t28:{args:{a:{T:"ATOM",p:{x:96,y:0},charge:0,isotope:null,radical:null,group:null,alias:null,superatom:null,attachpoints:[],rgroup:null,bio:{type:"HELM_LINKER",id:null,ambiguity:null},locked:!1,hidden:null,_rect:null,elem:"p",color:null,hcount:null,selected:!1,f:null,bonds:null,id:null,atommapid:null,query:null,hasError:null,hs:null,val:null,tag:null,_parent:"[object Object]",_aaid:3}},tgt:{id:"p",m:"HELM Core Monomer library\n Ketcher 10061618102D 1 1.00000 0.00000 0\n\n 5 4 0 0 0 999 V2000\n 15.7527 -12.0837 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 15.7527 -13.0837 0.0000 P 0 0 0 0 0 0 0 0 0 0 0 0\n 16.6188 -13.5837 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0\n 15.2527 -13.9496 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 14.7868 -12.8248 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0\n 1 2 1 0 0 0\n 2 3 1 0 0 0\n 2 4 2 0 0 0\n 2 5 1 0 0 0\nA 1\nR1\nA 3\nR2\nM END\n",n:"Phosphate",na:"p",rs:2,at:{R1:"OH",R2:"OH"}}}};function q(t){let e;const n=t;return e="ATOM"===n.T?new D.Atom(n.p,n.elem,n.bio):t,e}function B(t,n){if(null!=t||null!=n){if(null==t&&null!=n)throw new Error("actual is null, but expected is not null");if(null!=t&&null==n)throw new Error("actual is not null, but expected is null");for(const[r,s]of Object.entries(n)){if(!(r in t)&&!t.hasOwnProperty(r))throw new Error(`Expected property "${r}" not found`);const n=t[r];if(n instanceof Array&&s instanceof Array)(0,e.gz)(n,s);else if(n instanceof Object&&s instanceof Object)B(n,s);else if(Number.isFinite(n)&&Number.isFinite(s))(0,e.UZ)(n,s);else if(n!=s)throw new Error(`Expected (${s}) for key '${r}', got (${n})`)}}}(0,e.Gu)("getMonomer",(()=>{let n,r;function s(e,r){const s=t.DataFrame.fromColumns([t.Column.fromStrings("subTest",[]),t.Column.fromList(t.COLUMN_TYPE.BOOL,"success",[]),t.Column.fromStrings("res",[]),t.Column.fromStrings("tgt",[]),t.Column.fromStrings("error",[]),t.Column.fromStrings("stack",[])]),i=s.rows.addNew().idx;s.set("subTest",i,"Monomer lib"),s.set("res",i,""),s.set("tgt",i,"");try{k(n.getBioLib()),s.set("success",i,!0)}catch(t){const[e,n]=(0,P.g$)(t);s.set("error",i,e),s.set("stack",i,n),s.set("success",i,!1)}for(const[[t,n],i]of L().enumerate(Object.entries(G))){const i=q(n.args.a),[o,l]=(0,F.g7)(i,n.args.name),a=n.tgt,u=s.rows.addNew().idx;s.set("subTest",u,`${e}-${t}-${o}-${l}`),s.set("tgt",u,JSON.stringify(a?{id:a.id,n:a.n,rs:a.rs}:null));try{const t=r(i,n.args.name);s.set("res",u,JSON.stringify(t?{id:t.id,n:t.n,rs:t.rs}:null)),B(t,a),s.set("success",u,!0)}catch(t){const[e,n]=(0,P.g$)(t);s.set("error",u,e),s.set("stack",u,n),s.set("success",u,!1)}}return s}(0,e.a8)((async()=>{n=await(0,i.wW)(),r=await h(),await g(),await n.awaitLoaded(),await n.loadLibraries(!0)})),(0,e.iV)((async()=>{await c(r),await n.loadLibraries(!0)})),(0,e.GM)("original",(async()=>{const n=await async function(){const e="Helm",n=t.Func.find({package:e,name:"getHelmHelper"});if(0===n.length)throw new Error(`Package '${e}' must be installed for HelmHelper.`);return(await n[0].prepare().call()).getOutputParamValue()}();return(0,e.ct)(null!=n,!0),s("original",helm._package.getMonomerOriginal)}),{isAggregated:!0}),(0,e.GM)("monomerLib",(async()=>(k(n.getBioLib()),s("monomerLib",H.helm.webeditor.Monomers.getMonomer))),{isAggregated:!0}),(0,e.GM)("missing",(async()=>{k(n.getBioLib()),new D.Editor(f.div(),{viewonly:!0}).setHelm("PEPTIDE1{[mis1].R.[mis2].T.C.F}$$$$;");const t=JSON.parse(JSON.stringify($));t.PEPTIDE+=2,k(n.getBioLib(),t)}))}));const V=new t.Package;async function U(n,r,s){const i=await(0,e.Md)({category:n,test:r,testContext:s,verbose:!0});return t.DataFrame.fromObjects(i)}})(),helm_test=r})();
2
2
  //# sourceMappingURL=package-test.js.map