(function(qa,sb,tb,ub,w,vb,m,C,x,r,s,F,wb,u,A,E,D,M,G,N,K,O,I,$,T,R,fa,z,ma,xa,ba,sa,ya,da,Ca,S,ta,Oa,bb,cb,db,Pa,eb,fb,gb,hb,ib,jb,kb,Qa,Ra,lb,Sa,mb,xb,c,f,Y,Ia){Jmol.___JmolDate="$Date: 2026-08-14 08:51:03 -0600 (Fri, 14 Aug 2026) $";Jmol.___fullJmolProperties="src/org/jmol/viewer/Jmol.properties";Jmol.___JmolVersion="16.4.19";(function(b){b._Loader.registerPackages("java",["io","lang","lang.reflect","util"]);var a=java.util;b._Loader.ignore("net.sf.j2s.ajax.HttpRequest java.util.MapEntry.Type java.net.UnknownServiceException java.lang.Runtime java.security.AccessController java.security.PrivilegedExceptionAction java.io.File java.io.FileInputStream java.io.FileWriter java.io.OutputStreamWriter java.util.concurrent.Executors".split(" "));
Math.rint=Math.round;Math.log10||(Math.log10=function(a){return Math.log(a)/2.302585092994046});Math.signum||(Math.signum=function(a){return 0==a||isNaN(a)?a:0>a?-1:1});if(b._supportsNativeObject)for(var d=0;d<b._extendedObjectMethods.length-2;d++){var h=b._extendedObjectMethods[d];Array.prototype[h]=b._O.prototype[h];Number.prototype[h]=b._O.prototype[h]}java.lang.Number=Number;Number.__CLASS_NAME__="Number";Ca(Number,java.io.Serializable);Number.equals=b._innerFunctions.equals;Number.getName=b._innerFunctions.getName;
Number.prototype.compareTo=function(a){var d=this.value;a=a.value;return d<a?-1:d==a?0:1};c(Number,"shortValue",function(){var a=Math.round(this)&65535;return 0>this&&0<a?a-65536:a});c(Number,"byteValue",function(){var a=Math.round(this)&255;return 0>this&&0<a?a-256:a});c(Number,"intValue",function(){return Math.round(this)&4294967295});c(Number,"longValue",function(){return Math.round(this)});c(Number,"floatValue",function(){return this.valueOf()});c(Number,"doubleValue",function(){return parseFloat(this.valueOf())});
f(Number,"hashCode",function(){return this.valueOf()});java.lang.Integer=Integer=function(){r(this,arguments)};sa(Integer,"Integer",Number,Comparable,null,!0);Integer.prototype.valueOf=function(){return 0};Integer.toString=Integer.prototype.toString=function(){return 0!=arguments.length?""+arguments[0]:this===Integer?"class java.lang.Integer":""+this.valueOf()};ta(Integer,function(a){null==a&&(a=0);"number"!=typeof a&&(a=Integer.parseIntRadix(a,10));this.valueOf=function(){return a}});Integer.MIN_VALUE=
Integer.prototype.MIN_VALUE=-2147483648;Integer.MAX_VALUE=Integer.prototype.MAX_VALUE=2147483647;Integer.TYPE=Integer.prototype.TYPE=Integer;Integer.compare=c(Integer,"compare",function(a,d){return a<d?-1:a>d?1:0},"Number,Number");c(Integer,"bitCount",function(a){a-=a>>>1&1431655765;a=(a&858993459)+(a>>>2&858993459);a=a+(a>>>4)&252645135;a+=a>>>8;return a+(a>>>16)&63},"Number");Integer.bitCount=Integer.prototype.bitCount;c(Integer,"numberOfLeadingZeros",function(a){if(0==a)return 32;var d=1;0==a>>>
16&&(d+=16,a<<=16);0==a>>>24&&(d+=8,a<<=8);0==a>>>28&&(d+=4,a<<=4);0==a>>>30&&(d+=2,a<<=2);return d-(a>>>31)},"Number");Integer.numberOfLeadingZeros=Integer.prototype.numberOfLeadingZeros;c(Integer,"numberOfTrailingZeros",function(a){if(0==a)return 32;var d=31,h=a<<16;0!=h&&(d-=16,a=h);h=a<<8;0!=h&&(d-=8,a=h);h=a<<4;0!=h&&(d-=4,a=h);h=a<<2;0!=h&&(d-=2,a=h);return d-(a<<1>>>31)},"Number");Integer.numberOfTrailingZeros=Integer.prototype.numberOfTrailingZeros;c(Integer,"parseIntRadix",function(a,d){if(null==
a)throw new NumberFormatException("null");if(2>d)throw new NumberFormatException("radix "+d+" less than Character.MIN_RADIX");if(36<d)throw new NumberFormatException("radix "+d+" greater than Character.MAX_RADIX");if(10==d)for(var h=a.length;0<=--h;){var b=a.charCodeAt(h);if(!(48<=b&&57>=b)&&(0<h||43!=b&&45!=b))throw new NumberFormatException("Not a Number : "+a);}h=parseInt(a,d);if(isNaN(h))throw new NumberFormatException("Not a Number : "+a);return h},"String, Number");Integer.parseIntRadix=Integer.prototype.parseIntRadix;
c(Integer,"parseInt",function(a){return Integer.parseIntRadix(a,10)},"String");Integer.parseInt=Integer.prototype.parseInt;f(Integer,"$valueOf",function(a){return new Integer(a)});Integer.$valueOf=Integer.prototype.$valueOf;f(Integer,"equals",function(a){return null==a||!C(a,Integer)?!1:a.valueOf()==this.valueOf()},"Object");Integer.toHexString=Integer.prototype.toHexString=function(a){a.valueOf&&(a=a.valueOf());if(0>a){var d=a&16777215;return(a>>24&255)._numberToString(16)+(d="000000"+d._numberToString(16)).substring(d.length-
6)}return a._numberToString(16)};Integer.toOctalString=Integer.prototype.toOctalString=function(a){a.valueOf&&(a=a.valueOf());return a._numberToString(8)};Integer.toBinaryString=Integer.prototype.toBinaryString=function(a){a.valueOf&&(a=a.valueOf());return a._numberToString(2)};Integer.decodeRaw=c(Integer,"decodeRaw",function(a){0<=a.indexOf(".")&&(a="");var d=a.startsWith("-")?1:0;a=a.replace(/\#/,"0x").toLowerCase();d=a.startsWith("0x",d)?16:a.startsWith("0",d)?8:10;a=Number(a)&4294967295;return 8==
d?parseInt(a,8):a},"~S");Integer.decode=c(Integer,"decode",function(a){a=Integer.decodeRaw(a);if(isNaN(a)||a<Integer.MIN_VALUE||a>Integer.MAX_VALUE)throw new NumberFormatException("Invalid Integer");return new Integer(a)},"~S");f(Integer,"hashCode",function(){return this.valueOf()});java.lang.Long=Long=function(){r(this,arguments)};sa(Long,"Long",Number,Comparable,null,!0);Long.prototype.valueOf=function(){return 0};Long.toString=Long.prototype.toString=function(){return 0!=arguments.length?""+arguments[0]:
this===Long?"class java.lang.Long":""+this.valueOf()};ta(Long,function(a){null==a&&(a=0);a="number"==typeof a?Math.round(a):Integer.parseIntRadix(a,10);this.valueOf=function(){return a}});Long.TYPE=Long.prototype.TYPE=Long;c(Long,"parseLong",function(a,d){return Integer.parseInt(a,d||10)});Long.parseLong=Long.prototype.parseLong;f(Long,"$valueOf",function(a){return new Long(a)});Long.$valueOf=Long.prototype.$valueOf;f(Long,"equals",function(a){return null==a||!C(a,Long)?!1:a.valueOf()==this.valueOf()},
"Object");Long.toHexString=Long.prototype.toHexString=function(a){return a.toString(16)};Long.toOctalString=Long.prototype.toOctalString=function(a){return a.toString(8)};Long.toBinaryString=Long.prototype.toBinaryString=function(a){return a.toString(2)};Long.decode=c(Long,"decode",function(a){a=Integer.decodeRaw(a);if(isNaN(a))throw new NumberFormatException("Invalid Long");return new Long(a)},"~S");java.lang.Short=Short=function(){r(this,arguments)};sa(Short,"Short",Number,Comparable,null,!0);Short.prototype.valueOf=
function(){return 0};Short.toString=Short.prototype.toString=function(){return 0!=arguments.length?""+arguments[0]:this===Short?"class java.lang.Short":""+this.valueOf()};ta(Short,function(a){null==a&&(a=0);"number"!=typeof a&&(a=Integer.parseIntRadix(a,10));a=a.shortValue();this.valueOf=function(){return a}});Short.MIN_VALUE=Short.prototype.MIN_VALUE=-32768;Short.MAX_VALUE=Short.prototype.MAX_VALUE=32767;Short.TYPE=Short.prototype.TYPE=Short;c(Short,"parseShortRadix",function(a,d){return Integer.parseIntRadix(a,
d).shortValue()},"String, Number");Short.parseShortRadix=Short.prototype.parseShortRadix;c(Short,"parseShort",function(a){return Short.parseShortRadix(a,10)},"String");Short.parseShort=Short.prototype.parseShort;f(Short,"$valueOf",function(a){return new Short(a)});Short.$valueOf=Short.prototype.$valueOf;f(Short,"equals",function(a){return null==a||!C(a,Short)?!1:a.valueOf()==this.valueOf()},"Object");Short.toHexString=Short.prototype.toHexString=function(a){return a.toString(16)};Short.toOctalString=
Short.prototype.toOctalString=function(a){return a.toString(8)};Short.toBinaryString=Short.prototype.toBinaryString=function(a){return a.toString(2)};Short.decode=c(Short,"decode",function(a){a=Integer.decodeRaw(a);if(isNaN(a)||-32768>a||32767<a)throw new NumberFormatException("Invalid Short");return new Short(a)},"~S");java.lang.Byte=Byte=function(){r(this,arguments)};sa(Byte,"Byte",Number,Comparable,null,!0);Byte.prototype.valueOf=function(){return 0};Byte.toString=Byte.prototype.toString=function(){return 0!=
arguments.length?""+arguments[0]:this===Byte?"class java.lang.Byte":""+this.valueOf()};u(Byte,function(a){"number"!=typeof a&&(a=Integer.parseIntRadix(a,10));a=a.byteValue();this.valueOf=function(){return a}});Byte.serialVersionUID=Byte.prototype.serialVersionUID=-0x63b19f7b11af0c00;Byte.MIN_VALUE=Byte.prototype.MIN_VALUE=-128;Byte.MAX_VALUE=Byte.prototype.MAX_VALUE=127;Byte.SIZE=Byte.prototype.SIZE=8;Byte.TYPE=Byte.prototype.TYPE=Byte;c(Byte,"parseByteRadix",function(a,d){return Integer.parseIntRadix(a,
d).byteValue()},"String, Number");Byte.parseByteRadix=Byte.prototype.parseByteRadix;c(Byte,"parseByte",function(a){return Byte.parseByte(a,10)},"String");Byte.parseByte=Byte.prototype.parseByte;f(Byte,"$valueOf",function(a){return new Byte(a)});Byte.$valueOf=Byte.prototype.$valueOf;f(Byte,"equals",function(a){return null==a||!C(a,Byte)?!1:a.valueOf()==this.valueOf()},"Object");Byte.toHexString=Byte.prototype.toHexString=function(a){return a.toString(16)};Byte.toOctalString=Byte.prototype.toOctalString=
function(a){return a.toString(8)};Byte.toBinaryString=Byte.prototype.toBinaryString=function(a){return a.toString(2)};Byte.decode=c(Byte,"decode",function(a){a=Integer.decodeRaw(a);if(isNaN(a)||-128>a||127<a)throw new NumberFormatException("Invalid Byte");return new Byte(a)},"~S");b._floatToString=function(a){a=""+a;0>a.indexOf(".")&&(0>a.indexOf("e")&&"NaN"!=a)&&(a+=".0");return a};java.lang.Float=Float=function(){r(this,arguments)};sa(Float,"Float",Number,Comparable,null,!0);Float.prototype.valueOf=
function(){return 0};Float.toString=Float.prototype.toString=function(){return 0!=arguments.length?b._floatToString(arguments[0]):this===Float?"class java.lang.Float":b._floatToString(this.valueOf())};b._a32=null;Float.floatToIntBits=function(a){var d=b._a32||(b._a32=new Float32Array(1));d[0]=a;return(new Int32Array(d.buffer))[0]};ta(Float,function(a){null==a&&(a=0);"number"!=typeof a&&(a=Number(a));this.valueOf=function(){return a}});Float.serialVersionUID=Float.prototype.serialVersionUID=-0x2512365d24c31000;
Float.MIN_VALUE=Float.prototype.MIN_VALUE=1.4E-45;Float.MAX_VALUE=Float.prototype.MAX_VALUE=3.4028235E38;Float.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;Float.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;Float.NaN=Number.NaN;Float.TYPE=Float.prototype.TYPE=Float;c(Float,"parseFloat",function(a){if(null==a)throw new NumberFormatException("null");if("number"==typeof a)return a;var d=Number(a);if(isNaN(d))throw new NumberFormatException("Not a Number : "+a);return d},"String");Float.parseFloat=Float.prototype.parseFloat;
f(Float,"$valueOf",function(a){return new Float(a)});Float.$valueOf=Float.prototype.$valueOf;c(Float,"isNaN",function(a){return isNaN(1==arguments.length?a:this.valueOf())},"Number");Float.isNaN=Float.prototype.isNaN;c(Float,"isInfinite",function(a){return!isFinite(1==arguments.length?a:this.valueOf())},"Number");Float.isInfinite=Float.prototype.isInfinite;f(Float,"equals",function(a){return null==a||!C(a,Float)?!1:a.valueOf()==this.valueOf()},"Object");java.lang.Double=Double=function(){r(this,arguments)};
sa(Double,"Double",Number,Comparable,null,!0);Double.prototype.valueOf=function(){return 0};Double.toString=Double.prototype.toString=function(){return 0!=arguments.length?b._floatToString(arguments[0]):this===Double?"class java.lang.Double":b._floatToString(this.valueOf())};ta(Double,function(a){null==a&&(a=0);"number"!=typeof a&&(a=Double.parseDouble(a));this.valueOf=function(){return a}});Double.serialVersionUID=Double.prototype.serialVersionUID=-0x7f4c3db5d6940400;Double.MIN_VALUE=Double.prototype.MIN_VALUE=
4.9E-324;Double.MAX_VALUE=Double.prototype.MAX_VALUE=1.7976931348623157E308;Double.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY;Double.POSITIVE_INFINITY=Number.POSITIVE_INFINITY;Double.NaN=Number.NaN;Double.TYPE=Double.prototype.TYPE=Double;c(Double,"isNaN",function(a){return isNaN(1==arguments.length?a:this.valueOf())},"Number");Double.isNaN=Double.prototype.isNaN;c(Double,"isInfinite",function(a){return!isFinite(1==arguments.length?a:this.valueOf())},"Number");Double.isInfinite=Double.prototype.isInfinite;
c(Double,"parseDouble",function(a){if(null==a)throw new NumberFormatException("null");if("number"==typeof a)return a;var d=Number(a);if(isNaN(d))throw new NumberFormatException("Not a Number : "+a);return d},"String");Double.parseDouble=Double.prototype.parseDouble;c(Double,"$valueOf",function(a){return new Double(a)},"Number");Double.$valueOf=Double.prototype.$valueOf;f(Double,"equals",function(a){return null==a||!C(a,Double)?!1:a.valueOf()==this.valueOf()},"Object");Boolean=java.lang.Boolean=Boolean||
function(){r(this,arguments)};if(b._supportsNativeObject)for(d=0;d<b._extendedObjectMethods.length;d++)h=b._extendedObjectMethods[d],Boolean.prototype[h]=b._O.prototype[h];Boolean.__CLASS_NAME__="Boolean";Ca(Boolean,[java.io.Serializable,java.lang.Comparable]);Boolean.equals=b._innerFunctions.equals;Boolean.getName=b._innerFunctions.getName;Boolean.serialVersionUID=Boolean.prototype.serialVersionUID=-0x32df8d7f2a630600;ta(Boolean,function(a){var d=("string"==typeof a?Boolean.toBoolean(a):a)?!0:!1;
this.valueOf=function(){return d}},"~O");Boolean.parseBoolean=c(Boolean,"parseBoolean",function(a){return Boolean.toBoolean(a)},"~S");c(Boolean,"booleanValue",function(){return this.valueOf()});Boolean.$valueOf=f(Boolean,"$valueOf",function(a){return("string"==typeof a?"true".equalsIgnoreCase(a):a)?Boolean.TRUE:Boolean.FALSE});f(Boolean,"toString",function(){return this.valueOf()?"true":"false"});f(Boolean,"hashCode",function(){return this.valueOf()?1231:1237});f(Boolean,"equals",function(a){return C(a,
Boolean)?this.booleanValue()==a.booleanValue():!1},"~O");Boolean.getBoolean=c(Boolean,"getBoolean",function(a){var d=!1;try{d=Boolean.toBoolean(System.getProperty(a))}catch(h){if(!C(h,IllegalArgumentException)&&!C(h,NullPointerException))throw h;}return d},"~S");f(Boolean,"compareTo",function(a){return a.value==this.value?0:this.value?1:-1},"Boolean");Boolean.toBoolean=c(Boolean,"toBoolean",($fz=function(a){return null!=a&&a.equalsIgnoreCase("true")},$fz.isPrivate=!0,$fz),"~S");Boolean.TRUE=Boolean.prototype.TRUE=
new Boolean(!0);Boolean.FALSE=Boolean.prototype.FALSE=new Boolean(!1);Boolean.TYPE=Boolean.prototype.TYPE=Boolean;b._Encoding={};(function(a){a.UTF8="utf-8";a.UTF16="utf-16";a.ASCII="ascii";a.guessEncoding=function(d){return 239==d.charCodeAt(0)&&187==d.charCodeAt(1)&&191==d.charCodeAt(2)?a.UTF8:255==d.charCodeAt(0)&&254==d.charCodeAt(1)?a.UTF16:a.ASCII};a.guessEncodingArray=function(d){return 239==d[0]&&187==d[1]&&191==d[2]?a.UTF8:255==d[0]&&254==d[1]?a.UTF16:a.ASCII};a.readUTF8=function(d){if("string"!=
typeof d)return a.readUTF8Array(d);var h=a.guessEncoding(d),b=0;h==a.UTF8?b=3:h==a.UTF16&&(b=2);for(h=[];b<d.length;b++){var e=d.charCodeAt(b);if(128>e)h[h.length]=d.charAt(b);else if(192<e&&224>e){e&=31;b++;var c=d.charCodeAt(b)&63,e=(e<<6)+c;h[h.length]=String.fromCharCode(e)}else if(224<=e){e&=15;b++;c=d.charCodeAt(b)&63;b++;var g=d.charCodeAt(b)&63,e=(e<<12)+(c<<6)+g;h[h.length]=String.fromCharCode(e)}}return h.join("")};a.readUTF8Array=function(d){var h=a.guessEncodingArray(d),b=0;h==a.UTF8?
b=3:h==a.UTF16&&(b=2);for(h=[];b<d.length;b++){var e=d[b];if(128>e)h[h.length]=String.fromCharCode(e);else if(192<e&&224>e){var e=e&31,c=d[++b]&63,e=(e<<6)+c;h[h.length]=String.fromCharCode(e)}else if(224<=e){var e=e&15,c=d[++b]&63,g=d[++b]&63,e=(e<<12)+(c<<6)+g;h[h.length]=String.fromCharCode(e)}}return h.join("")};a.convert2UTF8=function(d){var h=this.guessEncoding(d),b=0;if(h==a.UTF8)return d;h==a.UTF16&&(b=2);for(var h=Array(0+d.length-b),e=b;e<d.length;e++){var c=d.charCodeAt(e);if(128>c)h[0+
e-b]=d.charAt(e);else if(2047>=c){var g=192+((c&1984)>>6),j=128+(c&63);h[0+e-b]=String.fromCharCode(g)+String.fromCharCode(j)}else g=224+((c&61440)>>12),j=128+((c&4032)>>6),c=128+(c&63),h[0+e-b]=String.fromCharCode(g)+String.fromCharCode(j)+String.fromCharCode(c)}return h.join("")};a.base64Chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");a.encodeBase64=function(d){if(null==d||0==d.length)return d;for(var h=a.base64Chars,b=d.length,e=0,c=[],g,j;e<b;)g=d.charCodeAt(e++),
c[c.length]=h[g>>2],e<b?(j=d.charCodeAt(e++),c[c.length]=h[g<<4&48|j>>4],e<b?(g=d.charCodeAt(e++),c[c.length]=h[j<<2&60|g>>6],c[c.length]=h[g&63]):(c[c.length]=h[j<<2&60],c[c.length]="=")):(c[c.length]=h[g<<4&48],c[c.length]="=",c[c.length]="=");return c.join("")};a.decodeBase64=function(d){if(null==d||0==d.length)return d;var h=a.base64Chars,b=a.xBase64Chars;if(null==a.xBase64Chars){for(var b={},e=0;e<h.length;e++)b[h[e]]=e;a.xBase64Chars=b}for(var h=d.length,e=0,c=[],g,j,f,L,w=0;e<h&&6E4>w++;)g=
b[d.charAt(e++)],j=b[d.charAt(e++)],f=b[d.charAt(e++)],L=b[d.charAt(e++)],c[c.length]=String.fromCharCode(g<<2&255|j>>4),null!=f&&(c[c.length]=String.fromCharCode(j<<4&255|f>>2),null!=L&&(c[c.length]=String.fromCharCode(f<<6&255|L)));return c.join("")};if(null==String.prototype.$replace){java.lang.String=String;b._setDeclared("String",String);if(b._supportsNativeObject)for(var d=0;d<b._extendedObjectMethods.length;d++){var h=b._extendedObjectMethods[d];"to$tring"==h||("toString"==h||"equals"==h||
"hashCode"==h)||(String.prototype[h]=b._O.prototype[h])}Ca(String,[java.io.Serializable,CharSequence,Comparable]);String.getName=b._innerFunctions.getName;String.serialVersionUID=String.prototype.serialVersionUID=-0x5f0f5bc785c44c00;(function(d){d.$replace=function(a,d){if(a==d||0>this.indexOf(a))return""+this;1==a.length?0<="\\$.*+|?^{}()[]".indexOf(a)&&(a="\\"+a):a=a.replace(/([\\\$\.\*\+\|\?\^\{\}\(\)\[\]])/g,function(a,d){return"\\"+d});var h=d.indexOf("$");(h=0<=h&&h<d.length-1)&&(d=d.split("$").join("\ufffd"));
var b=this.replace(RegExp(a,"gm"),d);h&&(b=b.split("\ufffd").join("$"));return b};d.$generateExpFunction=function(a){var d=[],h=[],b=0;d[0]="";for(var p=0;p<a.length;p++){var e=a.charAt(p);p!=a.length-1&&"\\"==e?(p++,e=a.charAt(p),"\\"==e&&(d[b]+="\\"),d[b]+=e):p!=a.length-1&&"$"==e?(p++,h[b]=parseInt(a.charAt(p)),b++,d[b]=""):d[b]="\r"==e?d[b]+"\\r":"\n"==e?d[b]+"\\n":"\t"==e?d[b]+"\\t":'"'==e?d[b]+'\\"':d[b]+e}a="f = function (";b=Math.max.apply({},h);for(p=0;p<=b;p++)a+="$"+p,p!=b&&(a+=", ");a+=
") { return ";for(p=0;p<d.length-1;p++)a+='"'+d[p]+'" + $'+h[p]+" + ";a+='"'+d[p]+'"; }';return eval(a)};d.replaceAll=function(a,d){return this.replace(RegExp(a,"gm"),this.$generateExpFunction(d))};d.replaceFirst=function(a,d){return this.replace(RegExp(a,"m"),this.$generateExpFunction(d))};d.matches=function(a){null!=a&&(a="^("+a+")$");a=this.match(RegExp(a,"gm"));return null!=a&&0!=a.length};d.regionMatches=function(a,d,h,b,p){if("number"==typeof a||!0!=a&&!1!=a)p=b,b=h,h=d,d=a,a=!1;if(0>b||0>d||
d>this.length-p||b>h.length-p)return!1;d=this.substring(d,d+p);h=h.substring(b,b+p);a&&(d=d.toLowerCase(),h=h.toLowerCase());return d==h};d.$plit=function(a,d){if(!d&&" "==a)return this.split(a);if(null!=d&&0<d){if(1==d)return this;var h=RegExp("("+a+")","gm"),b=1,p=this.replace(h,function(a){b++;return b==d?"@@_@@":a}),h=RegExp(a,"gm"),h=this.split(h);h.length>d&&(h[d-1]=p.substring(p.indexOf("@@_@@")+5),h.length=d);return h}h=RegExp(a,"gm");return this.split(h)};d.trim||(d.trim=function(){return this.replace(/^\s+/g,
"").replace(/\s+$/g,"")});if(!d.startsWith||!d.endsWith){var h=function(a,d,h){var b=h,p=0,e=d.length;if(0>h||h>a.length-e)return!1;for(;0<=--e;)if(a.charAt(b++)!=d.charAt(p++))return!1;return!0};d.startsWith=function(a){return 1==arguments.length?h(this,arguments[0],0):2==arguments.length?h(this,arguments[0],arguments[1]):!1};d.endsWith=function(a){return h(this,a,this.length-a.length)}}d.equals=function(a){return this.valueOf()==a};d.equalsIgnoreCase=function(a){return null==a?!1:this==a||this.toLowerCase()==
a.toLowerCase()};d.hash=0;d.hashCode=function(){var a=this.hash;if(0==a){for(var d=0,h=this.length,b=0;b<h;b++)a=31*a+this.charCodeAt(d++),a&=4294967295;this.hash=a}return a};d.getBytes=function(){if(4==arguments.length)return this.getChars(arguments[0],arguments[1],arguments[2],arguments[3]);var d=this;if(1==arguments.length){for(var h=arguments[0].toString().toLowerCase(),b="utf-8 UTF8 us-ascii iso-8859-1 8859_1 gb2312 gb18030 gbk".split(" "),e=!1,c=0;c<b.length;c++)if(b[c]==h){e=!0;break}if(!e)throw new java.io.UnsupportedEncodingException;
if("utf-8"==h||"utf8"==h)d=a.convert2UTF8(this)}h=Array(d.length);for(c=e=b=0;c<d.length;c++)b=d.charCodeAt(c),255<b?(h[e]=26,h[e+1]=b&255,h[e+2]=(b&65280)>>8,e+=2):h[e]=b,e++;return O(h)};d.contains=function(a){return 0<=this.indexOf(a)};d.compareTo=function(a){return this>a?1:this<a?-1:0};d.toCharArray=function(){for(var a=Array(this.length),d=0;d<this.length;d++)a[d]=this.charAt(d);return a};String.value0f=String.valueOf;String.valueOf=function(a){if("undefined"==a)return String.value0f();if(a instanceof
Array){if(1==arguments.length)return a.join("");for(var d=arguments[1],h=arguments[2],b=Array(h),p=0;p<h;p++)b[p]=a[d+p];return b.join("")}return""+a};d.subSequence=function(a,d){return this.substring(a,d)};d.compareToIgnoreCase=function(a){if(null==a)throw new NullPointerException;var d=this.toUpperCase(),h=a.toUpperCase();if(d==h)return 0;d=this.toLowerCase();h=a.toLowerCase();return d==h?0:d>h?1:-1};d.contentEquals=function(a){if(this.length!=a.length())return!1;a=a.getValue();for(var d=0,h=0,
b=this.length;0!=b--;)if(this.charCodeAt(d++)!=a[h++])return!1;return!0};d.getChars=function(a,d,h,b){if(0>a)throw new StringIndexOutOfBoundsException(a);if(d>this.length)throw new StringIndexOutOfBoundsException(d);if(a>d)throw new StringIndexOutOfBoundsException(d-a);if(null==h)throw new NullPointerException;for(var p=0;p<d-a;p++)h[b+p]=this.charAt(a+p)};d.$lastIndexOf=d.lastIndexOf;d.lastIndexOf=function(a,d){return null!=d&&0>=d+this.length?-1:null!=d?this.$lastIndexOf(a,d):this.$lastIndexOf(a)};
d.intern=function(){return this.valueOf()};String.copyValueOf=d.copyValueOf=function(){return 1==arguments.length?String.instantialize(arguments[0]):String.instantialize(arguments[0],arguments[1],arguments[2])};d.codePointAt||(d.codePointAt=d.charCodeAt)})(String.prototype);var c=new TextDecoder;String.instantialize=function(){switch(arguments.length){case 0:return new String;case 1:var a=arguments[0];return a.BYTES_PER_ELEMENT?0==a.length?"":"number"==typeof a[0]?c.decode(a):a.join(""):a instanceof
Array?0==a.length?"":"number"==typeof a[0]?c.decode(new Uint8Array(a)):a.join(""):"string"==typeof a||a instanceof String?new String(a):""+a;case 2:var a=arguments[0],d=arguments[1];return"string"==typeof d?String.instantialize(a,0,a.length,d):String.instantialize(a,d,0,a.length);case 3:var a=arguments[0],h=arguments[1],d=arguments[2];arguments[2]instanceof Array&&(a=arguments[2],h=arguments[0],d=arguments[1]);var b=Array(d);if(0>h||d+h>a.length)throw new IndexOutOfBoundsException;if(0<d)if(null!=
a[h].length)for(var p=0;p<d;p++)b[p]=a[h+p];else for(p=0;p<d;p++)b[p]=String.fromCharCode(a[h+p]);return b.join("");case 4:a=arguments[0];h=arguments[3];if("string"==typeof h||h instanceof String){h=arguments[1];d=arguments[2];b=new Uint8Array(d);for(p=0;p<d;p++)b[p]=a[h+p];return c.decode(b)}p=arguments[3];h=arguments[2];d=arguments[1];b=Array(p);if(0==d)for(;0<p--;)b[p]=String.fromCharCode(a[p+h]&255);else for(d<<=8;0<p--;)b[p]=String.fromCharCode(d|a[p+h]&255);return b.join("");default:a="";for(p=
0;p<arguments.length;p++)a+=arguments[p];return a}};-1!=navigator.userAgent.toLowerCase().indexOf("chrome")&&(String.prototype.toString=function(){return this.valueOf()})}})(b._Encoding);d=s(function(){this.value=0;r(this,arguments)},java.lang,"Character",null,[java.io.Serializable,Comparable]);u(d,function(a){this.value=a},"~N");c(d,"charValue",function(){return this.value});f(d,"hashCode",function(){return this.value.charCodeAt(0)});f(d,"equals",function(a){return C(a,Character)?this.value.charCodeAt(0)==
a.charValue().charCodeAt(0):!1},"~O");f(d,"compareTo",function(a){return this.value.charCodeAt(0)-a.value.charCodeAt(0)},"Character");d.toLowerCase=c(d,"toLowerCase",function(a){return(""+a).toLowerCase().charAt(0)},"~N");d.toUpperCase=c(d,"toUpperCase",function(a){return(""+a).toUpperCase().charAt(0)},"~N");d.isDigit=c(d,"isDigit",function(a){a=a.charCodeAt(0);return 48<=a&&57>=a},"~N");d.isUpperCase=c(d,"isUpperCase",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a},"~N");d.isLowerCase=c(d,"isLowerCase",
function(a){a=a.charCodeAt(0);return 97<=a&&122>=a},"~N");d.isWhitespace=c(d,"isWhitespace",function(a){a=a.charCodeAt(0);return 28<=a&&32>=a||9<=a&&13>=a||5760==a||8192<=a&&8199!=a&&(8203>=a||8232==a||8233==a||12288==a)},"~N");d.isLetter=c(d,"isLetter",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a},"~N");d.isLetterOrDigit=c(d,"isLetterOrDigit",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a||48<=a&&57>=a},"~N");d.isSpaceChar=c(d,"isSpaceChar",function(a){a=a.charCodeAt(0);
return 32==a||160==a||5760==a?!0:8192>a?!1:8203>=a||8232==a||8233==a||8239==a||12288==a},"~N");d.digit=c(d,"digit",function(a,d){var h=a.charCodeAt(0);if(2<=d&&36>=d&&128>h){var b=-1;48<=h&&57>=h?b=h-48:97<=h&&122>=h?b=h-87:65<=h&&90>=h&&(b=h-55);return b<d?b:-1}return-1},"~N,~N");f(d,"toString",function(){return String.valueOf([this.value])});d.toString=f(d,"toString",function(a){return this===Character?"class java.lang.Character":String.valueOf(a)},"~N");d.TYPE=d;b._ArrayWrapper=function(a,d){return{a:a,
__CLASS_NAME__:"Array",superClazz:Array,getComponentType:function(){return d},instanceOf:function(a){return C(d,a)},getName:function(){return this.__CLASS_NAME__}}};d=G(java.lang.reflect,"Array");d.newInstance=c(d,"newInstance",function(a,d){var h=z(d);h.getClass=function(){return new b._ArrayWrapper(this,a)};return h},"Class,~N");d.getLength=function(a){return a.length};d.get=function(a,d){return a[d]};a.Date=Date;Date.TYPE="javautil.Date";Date.__CLASS_NAME__="Date";b._setDeclared("java.util.Date",
Date);b._setDeclared("Date",Date);Ca(Date,[java.io.Serializable,java.lang.Comparable]);c(a.Date,"clone",function(){return new Date(this.getTime())});c(a.Date,"before",function(a){return this.getTime()<a.getTime()},"javautil.Date");c(a.Date,"after",function(a){return this.getTime()>a.getTime()},"javautil.Date");c(a.Date,"equals",function(d){return C(d,a.Date)&&this.getTime()==d.getTime()},"Object");c(a.Date,"compareTo",function(a){if(null==a)return 1;var d=this.getTime();a=a.getTime();return d<a?-1:
d==a?0:1},"Object");f(a.Date,"hashCode",function(){var a=this.getTime();return parseInt(a)^parseInt(a>>32)});d=s(function(){this.source=null;r(this,arguments)},a,"EventObject",null,java.io.Serializable);u(d,function(a){if(null!=a)this.source=a;else throw new IllegalArgumentException;},"~O");c(d,"getSource",function(){return this.source});f(d,"toString",function(){return this.getClass().getName()+"[source="+String.valueOf(this.source)+"]"});I(a,"EventListener");d=s(function(){this.listener=null;r(this,
arguments)},a,"EventListenerProxy",null,a.EventListener);u(d,function(a){this.listener=a},"javautil.EventListener");c(d,"getListener",function(){return this.listener});I(a,"Iterator");I(a,"ListIterator",a.Iterator);I(a,"Enumeration");I(a,"Collection",Iterable);I(a,"Set",a.Collection);I(a,"Map");I(a.Map,"Entry");I(a,"List",a.Collection);I(a,"Queue",a.Collection);I(a,"RandomAccess");d=s(function(){this.stackTrace=this.cause=this.detailMessage=null;r(this,arguments)},java.lang,"Throwable",null,java.io.Serializable);
N(d,function(){this.cause=this});u(d,function(){this.fillInStackTrace()});u(d,function(a,d){this.fillInStackTrace();!d&&"object"==typeof a&&(d=a,a=d.toString());d&&(this.cause=d);this.detailMessage=a},"~S,Throwable");c(d,"getMessage",function(){return this.message||this.detailMessage||this.toString()});c(d,"getLocalizedMessage",function(){return this.getMessage()});c(d,"getCause",function(){return this.cause===this?null:this.cause});c(d,"initCause",function(a){if(this.cause!==this)throw new IllegalStateException("Can't overwrite cause");
if(a===this)throw new IllegalArgumentException("Self-causation not permitted");this.cause=a;return this},"Throwable");f(d,"toString",function(){var a=this.getClass().getName(),d=this.message||this.detailMessage;return d?a+": "+d:a});c(d,"printStackTrace",function(){System.err.println(this.getStackTrace?this.getStackTrace():this.message+" "+Sa())});c(d,"getStackTrace",function(){for(var a=""+this+"\n",d=0;d<this.stackTrace.length;d++){var h=this.stackTrace[d],b=h.methodName.indexOf("(");if("construct"!=
h.methodName.substring(0,b).replace(/\s+/g,"")||null==h.nativeClazz||0>cb(h.nativeClazz,Throwable))a+=h+"\n"}return a});c(d,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintStream");c(d,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintWriter");c(d,"fillInStackTrace",function(){this.stackTrace=[];for(var a=arguments.callee.caller,d=null,h=[],c=b._callingStackTraces.length-1,k=!0;-1<c||null!=a;){var l=null;if(!k||a==lb||a==ba||null==a){if(0>c)break;k=!0;d=b._callingStackTraces[c].caller;
l=b._callingStackTraces[c].owner;c--}else d=a,null!=d.claxxOwner?l=d.claxxOwner:null!=d.exClazz&&(l=d.exClazz);a=new StackTraceElement(null!=l&&0!=l.__CLASS_NAME__.length?l.__CLASS_NAME__:"anonymous",(null==d.exName?"anonymous":d.exName)+" ("+db(d.arguments)+")",null,-1);a.nativeClazz=l;this.stackTrace[this.stackTrace.length]=a;for(l=0;l<h.length;l++)h[l]==d&&(a=new StackTraceElement("lost","missing",null,-3),a.nativeClazz=null,this.stackTrace[this.stackTrace.length]=a,k=!1);null!=d&&(h[h.length]=
d);a=d.arguments.callee.caller}b._initializingException=!1;return this});c(d,"setStackTrace",function(a){a=a.clone();for(var d=0;d<a.length;d++)if(null==a[d])throw new NullPointerException("stackTrace["+d+"]");this.stackTrace=a},"~A");d=s(function(){this.fileName=this.methodName=this.declaringClass=null;this.lineNumber=0;r(this,arguments)},java.lang,"StackTraceElement",null,java.io.Serializable);u(d,function(a,d,h,b){if(null==a||null==d)throw new NullPointerException;this.declaringClass=a;this.methodName=
d;this.fileName=h;this.lineNumber=b},"~S,~S,~S,~N");f(d,"equals",function(a){if(!C(a,StackTraceElement)||(null==this.methodName||null==a.methodName)||!this.getMethodName().equals(a.getMethodName())||!this.getClassName().equals(a.getClassName()))return!1;var d=this.getFileName();if(null==d){if(null!=a.getFileName())return!1}else if(!d.equals(a.getFileName()))return!1;return this.getLineNumber()!=a.getLineNumber()?!1:!0},"~O");c(d,"getClassName",function(){return null==this.declaringClass?"<unknown class>":
this.declaringClass});c(d,"getFileName",function(){return this.fileName});c(d,"getLineNumber",function(){return this.lineNumber});c(d,"getMethodName",function(){return null==this.methodName?"<unknown method>":this.methodName});f(d,"hashCode",function(){return null==this.methodName?0:this.methodName.hashCode()^this.declaringClass.hashCode()});c(d,"isNativeMethod",function(){return-2==this.lineNumber});f(d,"toString",function(){var a=this.getClassName()+"."+this.getMethodName();if(this.isNativeMethod())a+=
"(Native Method)";else{var d=this.getFileName();if(null==d)a+="(Unknown Source)";else{var h=this.getLineNumber(),a=a+"("+d;0<=h&&(a+=":",a+=h);a+=")"}}return a});TypeError.prototype.getMessage||(TypeError.prototype.getMessage=function(){return(this.message||this.toString())+(this.getStackTrace?this.getStackTrace():Sa())});Clazz_Error=Error;Clazz_declareTypeError=function(a,d,h,b,c){return s(function(){r(this,arguments);return Clazz_Error()},a,d,h,b,c)};b._Error||(b._Error=Error);s(function(){r(this,
arguments);return b._Error()},java.lang,"Error",Throwable);d=G(java.lang,"LinkageError",Error);d=G(java.lang,"IncompatibleClassChangeError",LinkageError);d=G(java.lang,"AbstractMethodError",IncompatibleClassChangeError);d=G(java.lang,"AssertionError",Error);u(d,function(a){K(this,AssertionError,[""+a,C(a,Throwable)?a:null])},"~O");d=G(java.lang,"ClassCircularityError",LinkageError);d=G(java.lang,"ClassFormatError",LinkageError);d=s(function(){this.exception=null;r(this,arguments)},java.lang,"ExceptionInInitializerError",
LinkageError);u(d,function(){K(this,ExceptionInInitializerError);this.initCause(null)});u(d,function(a){K(this,ExceptionInInitializerError,[a]);this.initCause(null)},"~S");u(d,function(a){K(this,ExceptionInInitializerError);this.exception=a;this.initCause(a)},"Throwable");c(d,"getException",function(){return this.exception});f(d,"getCause",function(){return this.exception});d=G(java.lang,"IllegalAccessError",IncompatibleClassChangeError);d=G(java.lang,"InstantiationError",IncompatibleClassChangeError);
d=G(java.lang,"VirtualMachineError",Error);d=G(java.lang,"InternalError",VirtualMachineError);d=G(java.lang,"NoClassDefFoundError",LinkageError);d=G(java.lang,"NoSuchFieldError",IncompatibleClassChangeError);d=G(java.lang,"NoSuchMethodError",IncompatibleClassChangeError);d=G(java.lang,"OutOfMemoryError",VirtualMachineError);d=G(java.lang,"StackOverflowError",VirtualMachineError);d=G(java.lang,"UnknownError",VirtualMachineError);d=G(java.lang,"UnsatisfiedLinkError",LinkageError);d=G(java.lang,"UnsupportedClassVersionError",
ClassFormatError);d=G(java.lang,"VerifyError",LinkageError);d=G(java.lang,"ThreadDeath",Error);u(d,function(){K(this,ThreadDeath,[])});d=G(java.lang,"Exception",Throwable);d=G(java.lang,"RuntimeException",Exception);d=G(java.lang,"ArithmeticException",RuntimeException);d=G(java.lang,"IndexOutOfBoundsException",RuntimeException);d=G(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException);u(d,function(a){K(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+a])},"~N");d=
G(java.lang,"ArrayStoreException",RuntimeException);d=G(java.lang,"ClassCastException",RuntimeException);d=s(function(){this.ex=null;r(this,arguments)},java.lang,"ClassNotFoundException",Exception);u(d,function(){K(this,ClassNotFoundException,[ma("Throwable")])});u(d,function(a){K(this,ClassNotFoundException,[a,null])},"~S");u(d,function(a,d){K(this,ClassNotFoundException,[a]);this.ex=d},"~S,Throwable");c(d,"getException",function(){return this.ex});f(d,"getCause",function(){return this.ex});d=G(java.lang,
"CloneNotSupportedException",Exception);d=G(java.lang,"IllegalAccessException",Exception);d=G(java.lang,"IllegalArgumentException",RuntimeException);u(d,function(a){K(this,IllegalArgumentException,[null==a?null:a.toString(),a])},"Throwable");d=G(java.lang,"IllegalMonitorStateException",RuntimeException);d=G(java.lang,"IllegalStateException",RuntimeException);u(d,function(a){K(this,IllegalStateException,[null==a?null:a.toString(),a])},"Throwable");d=G(java.lang,"IllegalThreadStateException",IllegalArgumentException);
d=G(java.lang,"InstantiationException",Exception);d=G(java.lang,"InterruptedException",Exception);d=G(java.lang,"NegativeArraySizeException",RuntimeException);d=G(java.lang,"NoSuchFieldException",Exception);d=G(java.lang,"NoSuchMethodException",Exception);d=G(java.lang,"NullPointerException",RuntimeException);d=G(java.lang,"NumberFormatException",IllegalArgumentException);d=G(java.lang,"SecurityException",RuntimeException);u(d,function(a){K(this,SecurityException,[null==a?null:a.toString(),a])},"Throwable");
d=G(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException);u(d,function(a){K(this,StringIndexOutOfBoundsException,["String index out of range: "+a])},"~N");d=G(java.lang,"UnsupportedOperationException",RuntimeException);u(d,function(){K(this,UnsupportedOperationException,[])});u(d,function(a){K(this,UnsupportedOperationException,[null==a?null:a.toString(),a])},"Throwable");d=s(function(){this.target=null;r(this,arguments)},java.lang.reflect,"InvocationTargetException",Exception);u(d,
function(){K(this,java.lang.reflect.InvocationTargetException,[ma("Throwable")])});u(d,function(a){K(this,java.lang.reflect.InvocationTargetException,[null,a]);this.target=a},"Throwable");u(d,function(a,d){K(this,java.lang.reflect.InvocationTargetException,[d,a]);this.target=a},"Throwable,~S");c(d,"getTargetException",function(){return this.target});f(d,"getCause",function(){return this.target});d=s(function(){this.undeclaredThrowable=null;r(this,arguments)},java.lang.reflect,"UndeclaredThrowableException",
RuntimeException);u(d,function(a){K(this,java.lang.reflect.UndeclaredThrowableException);this.undeclaredThrowable=a;this.initCause(a)},"Throwable");u(d,function(a,d){K(this,java.lang.reflect.UndeclaredThrowableException,[d]);this.undeclaredThrowable=a;this.initCause(a)},"Throwable,~S");c(d,"getUndeclaredThrowable",function(){return this.undeclaredThrowable});f(d,"getCause",function(){return this.undeclaredThrowable});d=G(java.io,"IOException",Exception);d=G(java.io,"CharConversionException",java.io.IOException);
d=G(java.io,"EOFException",java.io.IOException);d=G(java.io,"FileNotFoundException",java.io.IOException);d=s(function(){this.bytesTransferred=0;r(this,arguments)},java.io,"InterruptedIOException",java.io.IOException);d=G(java.io,"SyncFailedException",java.io.IOException);d=G(java.io,"UnsupportedEncodingException",java.io.IOException);d=G(java.io,"UTFDataFormatException",java.io.IOException);c(d,"getMessage",function(){var a=ba(this,java.io.WriteAbortedException,"getMessage",[]);return this.detail?
a+"; "+this.detail.toString():a});f(d,"getCause",function(){return this.detail});d=G(a,"ConcurrentModificationException",RuntimeException);u(d,function(){K(this,a.ConcurrentModificationException,[])});d=G(a,"EmptyStackException",RuntimeException);d=s(function(){this.key=this.className=null;r(this,arguments)},a,"MissingResourceException",RuntimeException);u(d,function(d,h,b){K(this,a.MissingResourceException,[d]);this.className=h;this.key=b},"~S,~S,~S");c(d,"getClassName",function(){return this.className});
c(d,"getKey",function(){return this.key});d=G(a,"NoSuchElementException",RuntimeException);d=G(a,"TooManyListenersException",Exception);d=G(java.lang,"Void");d.TYPE=d;I(java.lang.reflect,"GenericDeclaration");I(java.lang.reflect,"AnnotatedElement");d=G(java.lang.reflect,"AccessibleObject",null,java.lang.reflect.AnnotatedElement);u(d,function(){});c(d,"isAccessible",function(){return!1});d.setAccessible=c(d,"setAccessible",function(){},"~A,~B");c(d,"setAccessible",function(){},"~B");f(d,"isAnnotationPresent",
function(){return!1},"Class");f(d,"getDeclaredAnnotations",function(){return[]});f(d,"getAnnotations",function(){return[]});f(d,"getAnnotation",function(){return null},"Class");d.marshallArguments=c(d,"marshallArguments",function(){return null},"~A,~A");c(d,"invokeV",function(){},"~O,~A");c(d,"invokeL",function(){return null},"~O,~A");c(d,"invokeI",function(){return 0},"~O,~A");c(d,"invokeJ",function(){return 0},"~O,~A");c(d,"invokeF",function(){return 0},"~O,~A");c(d,"invokeD",function(){return 0},
"~O,~A");d.emptyArgs=d.prototype.emptyArgs=[];I(java.lang.reflect,"InvocationHandler");d=I(java.lang.reflect,"Member");d=G(java.lang.reflect,"Modifier");u(d,function(){});d.isAbstract=c(d,"isAbstract",function(a){return 0!=(a&1024)},"~N");d.isFinal=c(d,"isFinal",function(a){return 0!=(a&16)},"~N");d.isInterface=c(d,"isInterface",function(a){return 0!=(a&512)},"~N");d.isNative=c(d,"isNative",function(a){return 0!=(a&256)},"~N");d.isPrivate=c(d,"isPrivate",function(a){return 0!=(a&2)},"~N");d.isProtected=
c(d,"isProtected",function(a){return 0!=(a&4)},"~N");d.isPublic=c(d,"isPublic",function(a){return 0!=(a&1)},"~N");d.isStatic=c(d,"isStatic",function(a){return 0!=(a&8)},"~N");d.isStrict=c(d,"isStrict",function(a){return 0!=(a&2048)},"~N");d.isSynchronized=c(d,"isSynchronized",function(a){return 0!=(a&32)},"~N");d.isTransient=c(d,"isTransient",function(a){return 0!=(a&128)},"~N");d.isVolatile=c(d,"isVolatile",function(a){return 0!=(a&64)},"~N");d.toString=c(d,"toString",function(a){var d=[];java.lang.reflect.Modifier.isPublic(a)&&
(d[d.length]="public");java.lang.reflect.Modifier.isProtected(a)&&(d[d.length]="protected");java.lang.reflect.Modifier.isPrivate(a)&&(d[d.length]="private");java.lang.reflect.Modifier.isAbstract(a)&&(d[d.length]="abstract");java.lang.reflect.Modifier.isStatic(a)&&(d[d.length]="static");java.lang.reflect.Modifier.isFinal(a)&&(d[d.length]="final");java.lang.reflect.Modifier.isTransient(a)&&(d[d.length]="transient");java.lang.reflect.Modifier.isVolatile(a)&&(d[d.length]="volatile");java.lang.reflect.Modifier.isSynchronized(a)&&
(d[d.length]="synchronized");java.lang.reflect.Modifier.isNative(a)&&(d[d.length]="native");java.lang.reflect.Modifier.isStrict(a)&&(d[d.length]="strictfp");java.lang.reflect.Modifier.isInterface(a)&&(d[d.length]="interface");return 0<d.length?d.join(" "):""},"~N");d=s(function(){this.exceptionTypes=this.parameterTypes=this.clazz=null;this.modifiers=0;r(this,arguments)},java.lang.reflect,"Constructor",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);
u(d,function(a,d,h,b){K(this,java.lang.reflect.Constructor,[]);this.clazz=a;this.parameterTypes=d;this.exceptionTypes=h;this.modifiers=b},"Class,~A,~A,~N");f(d,"getTypeParameters",function(){return null});c(d,"toGenericString",function(){return null});c(d,"getGenericParameterTypes",function(){return null});c(d,"getGenericExceptionTypes",function(){return null});c(d,"getParameterAnnotations",function(){return null});c(d,"isVarArgs",function(){return!1});f(d,"isSynthetic",function(){return!1});f(d,
"equals",function(a){if(null!=a&&C(a,java.lang.reflect.Constructor)&&this.getDeclaringClass()===a.getDeclaringClass()){var d=this.parameterTypes;a=a.parameterTypes;if(d.length==a.length){for(var h=0;h<d.length;h++)if(d[h]!==a[h])return!1;return!0}}return!1},"~O");f(d,"getDeclaringClass",function(){return this.clazz});c(d,"getExceptionTypes",function(){return this.exceptionTypes});f(d,"getModifiers",function(){return this.modifiers});f(d,"getName",function(){return this.getDeclaringClass().getName()});
c(d,"getParameterTypes",function(){return this.parameterTypes});f(d,"hashCode",function(){return this.getDeclaringClass().getName().hashCode()});c(d,"newInstance",function(a){var d=new this.clazz(mb);r(d,a);return d},"~A");f(d,"toString",function(){return null});d=G(java.lang.reflect,"Field",java.lang.reflect.AccessibleObject,java.lang.reflect.Member);f(d,"isSynthetic",function(){return!1});c(d,"toGenericString",function(){return null});c(d,"isEnumConstant",function(){return!1});c(d,"getGenericType",
function(){return null});f(d,"equals",function(){return!1},"~O");f(d,"getDeclaringClass",function(){return null});f(d,"getName",function(){return null});c(d,"getType",function(){return null});f(d,"hashCode",function(){return 0});f(d,"toString",function(){return null});d=s(function(){this.exceptionTypes=this.parameterTypes=this.returnType=this.name=this.clazz=null;this.modifiers=0;r(this,arguments)},java.lang.reflect,"Method",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,
java.lang.reflect.Member]);u(d,function(a,d,h,b,c,l){K(this,java.lang.reflect.Method,[]);this.clazz=a;this.name=d;this.parameterTypes=h;this.returnType=b;this.exceptionTypes=c;this.modifiers=l},"Class,~S,~A,Class,~A,~N");f(d,"getTypeParameters",function(){return null});c(d,"toGenericString",function(){return null});c(d,"getGenericParameterTypes",function(){return null});c(d,"getGenericExceptionTypes",function(){return null});c(d,"getGenericReturnType",function(){return null});c(d,"getParameterAnnotations",
function(){return null});c(d,"isVarArgs",function(){return!1});c(d,"isBridge",function(){return!1});f(d,"isSynthetic",function(){return!1});c(d,"getDefaultValue",function(){return null});f(d,"equals",function(a){if(null!=a&&C(a,java.lang.reflect.Method)&&this.getDeclaringClass()===a.getDeclaringClass()&&this.getName()===a.getName()){var d=this.parameterTypes;a=a.parameterTypes;if(d.length==a.length){for(var h=0;h<d.length;h++)if(d[h]!==a[h])return!1;return!0}}return!1},"~O");f(d,"getDeclaringClass",
function(){return this.clazz});c(d,"getExceptionTypes",function(){return this.exceptionTypes});f(d,"getModifiers",function(){return this.modifiers});f(d,"getName",function(){return this.name});c(d,"getParameterTypes",function(){return this.parameterTypes});c(d,"getReturnType",function(){return this.returnType});f(d,"hashCode",function(){return this.getDeclaringClass().getName().hashCode()^this.getName().hashCode()});c(d,"invoke",function(a,d){var h=this.clazz.prototype[this.getName()];null==h&&(h=
this.clazz[this.getName()]);null!=h&&h.apply(a,d)},"~O,~A");f(d,"toString",function(){return null})})(qa);if(!Jmol._debugCode){m("J.adapter.readers.more");x(["J.adapter.readers.molxyz.MolReader","J.api.JmolJDXMOLReader","JU.Lst"],"J.adapter.readers.more.JcampdxReader","JU.BS $.PT $.Rdr J.adapter.smarter.SmarterJmolAdapter J.jsv.JDXMOLParser JU.Logger".split(" "),function(){var b=s(function(){this.selectedModel=0;this.acdMolFile=this.mpr=null;this.nPeaks=0;this.title=this.acdAssignments=null;this.nucleus=
"";this.firstModel=this.type=null;this.doStartJSV=!1;this.allTypes=this.peakData=null;r(this,arguments)},J.adapter.readers.more,"JcampdxReader",J.adapter.readers.molxyz.MolReader,J.api.JmolJDXMOLReader);N(b,function(){this.peakData=new JU.Lst});f(b,"initializeReader",function(){this.vwr.setBooleanProperty("_JSV",!0);this.isTrajectory&&(JU.Logger.warn("TRAJECTORY keyword ignored"),this.isTrajectory=!1);this.reverseModels&&(JU.Logger.warn("REVERSE keyword ignored"),this.reverseModels=!1);this.selectedModel=
this.desiredModelNumber;this.desiredModelNumber=-2147483648;this.doStartJSV=!this.checkFilterKey("NOSYNC")});f(b,"checkLine",function(){var a=this.line.indexOf("=");if(0>a||!this.line.startsWith("##"))return!0;var d=JU.PT.replaceAllCharacters(this.line.substring(0,a).trim()," ","").toUpperCase();12<d.length&&(d=d.substring(0,12));d="##$MODELS   ##$PEAKS    ##$SIGNALS  ##$MOLFILE  ##NPOINTS   ##TITLE     ##PEAKASSIGN##$UVIR_ASSI##$MS_FRAGME##.OBSERVENU##DATATYPE  ".indexOf(d);if(0>d)return!0;null==
this.mpr&&(this.mpr=(new J.jsv.JDXMOLParser).set(this,this.filePath,this.htParams));a=this.line.substring(a+1).trim();this.mpr.setLine(a);switch(d){case 0:this.mpr.readModels();break;case 12:case 24:this.mpr.readPeaks(24==d,-1);a=this.mpr.getFirstModelWithPeaks();null!=a&&null==this.firstModel&&(this.firstModel=a);break;case 36:this.acdMolFile=this.mpr.readACDMolFile();this.processModelData(this.acdMolFile,this.title+" (assigned)","MOL","mol","",0.01,NaN,!0);if(null!=this.asc.errorMessage)return this.continuing=
!1;break;case 48:this.nPeaks=JU.PT.parseInt(a);break;case 60:this.title=JU.PT.split(a,"$$")[0].trim();break;case 72:case 84:case 96:return this.acdAssignments=new JU.Lst,this.mpr.readACDAssignments(this.nPeaks,72==d,this.acdAssignments);case 108:this.nucleus=a.substring(1);break;case 120:if(this.type=a,0<=(d=this.type.indexOf(" ")))this.type=this.type.substring(0,d)}return!0});f(b,"finalizeSubclassReader",function(){null!=this.mpr&&this.processPeakData();this.finalizeReaderMR()});f(b,"processModelData",
function(a,d,h,b,e,c,j,k){for(var l=this.asc.iSet,f=null,n=!Float.isNaN(c);;){f=J.adapter.smarter.SmarterJmolAdapter.staticGetAtomSetCollectionReader(this.filePath,h,JU.Rdr.getBR(a),this.htParams);if("string"==typeof f){JU.Logger.warn(""+f);f.startsWith("File reader was not found:")&&(this.asc.errorMessage=f);break}f=J.adapter.smarter.SmarterJmolAdapter.staticGetAtomSetCollection(f);if("string"==typeof f){JU.Logger.warn(""+f);break}0==b.length&&(b=e);if(0!=b.length&&(a=this.findModelById(b),0<=a)){this.asc.setModelInfoForSet("jdxModelID",
b,a);for(e=f.atomSetCount;0<=--e;)f.setModelInfoForSet("jdxBaseModel",b,e);0==f.bondCount&&this.setBonding(f,a)}if(!Float.isNaN(j)){JU.Logger.info("JcampdxReader applying vibration scaling of "+j+" to "+f.ac+" atoms");b=f.atoms;for(e=f.ac;0<=--e;)null!=b[e].vib&&!Float.isNaN(b[e].vib.z)&&b[e].vib.scale(j)}n&&0<f.bondCount&&(j=f.bonds[0],0.5<f.atoms[j.atomIndex1].distance(f.atoms[j.atomIndex2])&&(n=!1));if(n){JU.Logger.info("JcampdxReader applying model scaling of "+c+" to "+f.ac+" atoms");b=f.atoms;
for(e=f.ac;0<=--e;)b[e].scale(c)}JU.Logger.info("jdx model="+d+" type="+f.fileTypeName);this.asc.appendAtomSetCollection(-1,f);break}this.updateModelIDs(d,l,k)},"~S,~S,~S,~S,~S,~N,~N,~B");c(b,"setBonding",function(a,d){var h=this.asc.getAtomSetAtomCount(d),b=a.ac;if(0!=b%h)JU.Logger.warn("atom count in secondary model ("+b+") is not a multiple of "+h+" -- bonding ignored");else{for(var b=this.asc.bonds,e=0,c=0;c<d;c++)e+=this.asc.getAtomSetBondCount(c);for(var j=e+this.asc.getAtomSetBondCount(d),
k=this.asc.getAtomSetAtomIndex(d),l=a.atomSetCount,f=0;f<l;f++){var n=a.getAtomSetAtomIndex(f)-k;if(a.getAtomSetAtomCount(f)!=h){JU.Logger.warn("atom set atom count in secondary model ("+a.getAtomSetAtomCount(f)+") is not equal to "+h+" -- bonding ignored");break}for(c=e;c<j;c++)a.addNewBondWithOrder(b[c].atomIndex1+n,b[c].atomIndex2+n,b[c].order)}}},"J.adapter.smarter.AtomSetCollection,~N");c(b,"updateModelIDs",function(a,d,h){var b=this.asc.atomSetCount;if(h&&b==d+2)this.asc.setCurrentModelInfo("modelID",
a);else for(h=0;++d<b;)this.asc.setModelInfoForSet("modelID",a+"."+ ++h,d)},"~S,~N,~B");f(b,"addPeakData",function(a){this.peakData.addLast(a)},"~S");c(b,"processPeakData",function(){if(null!=this.acdAssignments)try{this.mpr.setACDAssignments(this.title,this.nucleus+this.type,0,this.acdAssignments,this.acdMolFile)}catch(a){if(!E(a,Exception))throw a;}var d=this.peakData.size();if(0!=d){for(var h=new JU.BS,b=0<d,e=0;e<d;e++){this.line=this.peakData.get(e);var c=this.mpr.getAttribute(this.line,"type"),
j=this.mpr.getAttribute(this.line,"model"),k=this.findModelById(j);if(0>k)JU.Logger.warn("cannot find model "+j+" required for "+this.line);else{this.addType(k,c);var j=c+": "+this.mpr.getAttribute(this.line,"title"),l="jdxAtomSelect_"+this.mpr.getAttribute(this.line,"type");h.set(k);0!=this.mpr.getAttribute(this.line,"atoms").length?(this.processPeakSelectModel(k,j),this.processPeakSelectAtom(k,l,this.line),c+=": "):c=this.processPeakSelectModel(k,j)?"model: ":"ignored: ";JU.Logger.info(c+this.line)}}for(k=
d=this.asc.atomSetCount;0<=--k;)j=this.asc.getAtomSetAuxiliaryInfoValue(k,"modelID"),b&&(!h.get(k)&&0<=j.indexOf("."))&&(this.asc.removeAtomSet(k),d--);if(-2147483648==this.selectedModel)null!=this.allTypes&&this.appendLoadNote(this.allTypes);else{0==this.selectedModel&&(this.selectedModel=d-1);for(k=this.asc.atomSetCount;0<=--k;)k+1!=this.selectedModel&&this.asc.removeAtomSet(k);0<d&&this.appendLoadNote(this.asc.getAtomSetAuxiliaryInfoValue(0,"name"));this.firstModel=this.asc.getAtomSetAuxiliaryInfoValue(0,
"modelID")}this.doStartJSV&&(this.addJmolScript("sync on;"),this.asc.setInfo("_startJSpecView",Boolean.TRUE),null!=this.firstModel&&this.addJmolScript("sync > 'JSpecView:';model "+JU.PT.esc(this.firstModel)));for(k=this.asc.atomSetCount;0<=--k;)this.asc.setAtomSetNumber(k,k+1);this.asc.centralize()}});c(b,"findModelById",function(a){for(var d=this.asc.atomSetCount;0<=--d;){var h=this.asc.getAtomSetAuxiliaryInfoValue(d,"modelID");if(a.equals(h))return d}return-1},"~S");c(b,"addType",function(a,d){var h=
this.addTypeStr(this.asc.getAtomSetAuxiliaryInfoValue(a,"spectrumTypes"),d);null!=h&&(this.asc.setModelInfoForSet("spectrumTypes",h,a),h=this.addTypeStr(this.allTypes,d),null!=h&&(this.allTypes=h))},"~N,~S");c(b,"addTypeStr",function(a,d){return null!=a&&a.contains(d)?null:(null==a?"":a+",")+d},"~S,~S");c(b,"processPeakSelectAtom",function(a,d,h){var b=this.asc.getAtomSetAuxiliaryInfoValue(a,d);null==b&&this.asc.setModelInfoForSet(d,b=new JU.Lst,a);b.addLast(h)},"~N,~S,~S");c(b,"processPeakSelectModel",
function(a,d){if(null!=this.asc.getAtomSetAuxiliaryInfoValue(a,"jdxModelSelect"))return!1;this.asc.setModelInfoForSet("name",d,a);this.asc.setModelInfoForSet("jdxModelSelect",this.line,a);return!0},"~N,~S");f(b,"setSpectrumPeaks",function(){},"~N,~S,~S")});m("J.api");I(J.api,"JmolJSpecView");m("J.thread");x(["J.thread.JmolThread"],"J.thread.VibrationThread",null,function(){var b=s(function(){this.transformManager=null;r(this,arguments)},J.thread,"VibrationThread",J.thread.JmolThread);f(b,"setManager",
function(a,d){this.transformManager=a;this.setViewer(d,"VibrationThread");return 0},"~O,JV.Viewer,~O");f(b,"run1",function(a){for(;;)switch(a){case -1:this.lastRepaintTime=this.startTime=System.currentTimeMillis();this.vwr.startHoverWatcher(!1);this.haveReference=!0;a=0;break;case 0:a=System.currentTimeMillis()-this.lastRepaintTime;this.sleepTime=33-a;if(!this.runSleep(this.sleepTime,1))return;a=1;break;case 1:this.lastRepaintTime=System.currentTimeMillis();a=this.lastRepaintTime-this.startTime;0==
this.transformManager.vibrationPeriodMs?a=-2:(this.transformManager.setVibrationT(a%this.transformManager.vibrationPeriodMs/this.transformManager.vibrationPeriodMs),this.vwr.refresh(3,"VibrationThread"),a=this.checkInterrupted(this.transformManager.vibrationThread)?-2:0);break;case -2:this.vwr.startHoverWatcher(!0);return}},"~N")});var ha=s(function(){this.$name=null;this.$ordinal=0;r(this,arguments)},java.lang,"Enum",null,[Comparable,java.io.Serializable]);u(ha,function(b,a){this.$name=b;this.$ordinal=
a},"~S,~N");c(ha,"name",function(){return this.$name});c(ha,"ordinal",function(){return this.$ordinal});f(ha,"toString",function(){return this.$name});f(ha,"equals",function(b){return this===b},"~O");f(ha,"clone",function(){throw new CloneNotSupportedException;});f(ha,"compareTo",function(b){if(this.getClass()!==b.getClass()&&this.getDeclaringClass()!==b.getDeclaringClass())throw new ClassCastException;return this.$ordinal-b.$ordinal},"~O");c(ha,"getDeclaringClass",function(){var b=this.getClass(),
a=b.getSuperclass();return a===Enum?b:a});ha.$valueOf=c(ha,"$valueOf",function(b,a){var d=null,d=b.$clazz$[a];if(null!=d)return d;if(null==a)throw new NullPointerException("Name is null");throw new IllegalArgumentException("No enum const "+b+"."+a);},"Class,~S");f(ha,"finalize",function(){});x(null,"java.lang.Thread",["java.util.Date"],function(){var b=s(function(){this.name=this.group=this.target=null;this.priority=0;r(this,arguments)},java.lang,"Thread",null,Runnable);u(b,function(a){this.init(null,
a,"Thread-"+(new java.util.Date).getTime()+Math.random(),0)},"Runnable");u(b,function(a,d){this.init(a,d,"Thread-"+(new java.util.Date).getTime()+Math.random(),0)},"ThreadGroup,Runnable");u(b,function(a){this.init(null,null,a,0)},"~S");u(b,function(a,d){this.init(a,null,d,0)},"ThreadGroup,~S");u(b,function(a,d){this.init(null,a,d,0)},"Runnable,~S");u(b,function(a,d,h){this.init(a,d,h,0)},"ThreadGroup,Runnable,~S");u(b,function(a,d,h,b){this.init(a,d,h,b)},"ThreadGroup,Runnable,~S,~N");b.currentThread=
c(b,"currentThread",function(){null==Thread.J2S_THREAD&&(Thread.J2S_THREAD=new Thread);return Thread.J2S_THREAD});b.sleep=c(b,"sleep",function(){alert("Thread.sleep is not implemented in Java2Script!")},"~N");c(b,"init",function(a,d,h){null==a&&(a=new ThreadGroup);this.group=a;this.target=d;this.name=h;this.priority=5},"ThreadGroup,Runnable,~S,~N");c(b,"start",function(){this.startT()});c(b,"startT",function(){window.setTimeout(function(a){return function(){a.run()}}(this),0)});c(b,"run",function(){null!=
this.target&&this.target.run()});c(b,"setPriority",function(a){if(10<a||1>a)throw new IllegalArgumentException;this.priority=a},"~N");c(b,"getPriority",function(){return this.priority});c(b,"setName",function(a){this.name=a},"~S");c(b,"getName",function(){return String.valueOf(this.name)});c(b,"getThreadGroup",function(){return this.group});f(b,"toString",function(){var a=this.getThreadGroup();return null!=a?"Thread["+this.getName()+","+this.getPriority()+","+a.getName()+"]":"Thread["+this.getName()+
","+this.getPriority()+",]"});b.J2S_THREAD=null});var ua=s(function(){this.name=this.parent=null;this.maxPriority=0;r(this,arguments)},java.lang,"ThreadGroup",null);u(ua,function(){this.name="system";this.maxPriority=10});u(ua,function(b){this.construct(Thread.currentThread().getThreadGroup(),b)},"~S");u(ua,function(b,a){if(null==b)throw new NullPointerException;this.name=a;this.parent=b;this.maxPriority=10},"ThreadGroup,~S");c(ua,"getName",function(){return this.name});c(ua,"getParent",function(){return this.parent});
c(ua,"getMaxPriority",function(){return this.maxPriority});x(["java.io.FilterInputStream"],"java.io.BufferedInputStream",null,function(){var b=s(function(){this.buf=null;this.pos=this.count=0;this.markpos=-1;this.marklimit=0;r(this,arguments)},java.io,"BufferedInputStream",java.io.FilterInputStream);u(b,function(a){K(this,java.io.BufferedInputStream,[a]);this.buf=O(8192,0)},"java.io.InputStream");c(b,"getInIfOpen",function(){var a=this.$in;if(null==a)throw new java.io.IOException("Stream closed");
return a});c(b,"getBufIfOpen",function(){var a=this.buf;if(null==a)throw new java.io.IOException("Stream closed");return a});f(b,"resetStream",function(){});c(b,"fill",function(){var a=this.getBufIfOpen();if(0>this.markpos)this.pos=0;else if(this.pos>=a.length)if(0<this.markpos){var d=this.pos-this.markpos;System.arraycopy(a,this.markpos,a,0,d);this.pos=d;this.markpos=0}else a.length>=this.marklimit?(this.markpos=-1,this.pos=0):(d=2*this.pos,d>this.marklimit&&(d=this.marklimit),d=O(d,0),System.arraycopy(a,
0,d,0,this.pos),a=this.buf=d);this.count=this.pos;a=this.isRead(a,this.pos,a.length-this.pos);0<a&&(this.count=a+this.pos)});f(b,"readByteAsInt",function(){return this.pos>=this.count&&(this.fill(),this.pos>=this.count)?-1:this.getBufIfOpen()[this.pos++]&255});c(b,"read1",function(a,d,h){var b=this.count-this.pos;if(0>=b){if(h>=this.getBufIfOpen().length&&0>this.markpos)return this.isRead(a,d,h);this.fill();b=this.count-this.pos;if(0>=b)return-1}h=b<h?b:h;System.arraycopy(this.getBufIfOpen(),this.pos,
a,d,h);this.pos+=h;return h},"~A,~N,~N");c(b,"isRead",function(a,d,h){var b=this.getInIfOpen();return b.readBAIS?b.readBAIS(a,d,h):b.read(a,d,h)},"~A,~N,~N");f(b,"read",function(a,d,h){return this.readBIS(a,d,h)},"~A,~N,~N");c(b,"readBIS",function(a,d,h){this.getBufIfOpen();if(0>(d|h|d+h|a.length-(d+h)))throw new IndexOutOfBoundsException;if(0==h)return 0;for(var b=0;;){var e=this.read1(a,d+b,h-b);if(0>=e)return 0==b?e:b;b+=e;if(b>=h)return b;e=this.$in;if(null!=e&&0>=e.available())return b}},"~A,~N,~N");
f(b,"skip",function(a){this.getBufIfOpen();if(0>=a)return 0;var d=this.count-this.pos;if(0>=d){if(0>this.markpos)return this.getInIfOpen().skip(a);this.fill();d=this.count-this.pos;if(0>=d)return 0}a=d<a?d:a;this.pos+=a;return a},"~N");f(b,"available",function(){var a=this.count-this.pos,d=this.getInIfOpen().available();return a>2147483647-d?2147483647:a+d});f(b,"mark",function(a){this.marklimit=a;this.markpos=this.pos},"~N");f(b,"reset",function(){this.getBufIfOpen();if(0>this.markpos)throw new java.io.IOException("Resetting to invalid mark");
this.pos=this.markpos});f(b,"markSupported",function(){return!0});f(b,"close",function(){var a=this.$in;this.$in=null;null!=a&&a.close()})});x(["java.io.Reader"],"java.io.BufferedReader",null,function(){var b=s(function(){this.cb=this.$in=null;this.nextChar=this.nChars=0;this.markedChar=-1;this.readAheadLimit=0;this.markedSkipLF=this.skipLF=!1;r(this,arguments)},java.io,"BufferedReader",java.io.Reader);u(b,function(a){K(this,java.io.BufferedReader,[a]);this.$in=a;this.setSize(8192)},"java.io.Reader");
c(b,"setSize",function(a){if(0>=a)throw new IllegalArgumentException("Buffer size <= 0");this.cb=da(a,"\x00");this.nextChar=this.nChars=0},"~N");c(b,"ensureOpen",function(){if(null==this.$in)throw new java.io.IOException("Stream closed");});c(b,"fill",function(){var a;if(-1>=this.markedChar)a=0;else{var d=this.nextChar-this.markedChar;d>=this.readAheadLimit?(this.markedChar=-2,a=this.readAheadLimit=0):(this.readAheadLimit<=this.cb.length?System.arraycopy(this.cb,this.markedChar,this.cb,0,d):(a=da(this.readAheadLimit,
"\x00"),System.arraycopy(this.cb,this.markedChar,a,0,d),this.cb=a),this.markedChar=0,this.nextChar=this.nChars=a=d)}do d=this.$in.read(this.cb,a,this.cb.length-a);while(0==d);0<d&&(this.nChars=a+d,this.nextChar=a)});c(b,"read1",function(a,d,h){if(this.nextChar>=this.nChars){if(h>=this.cb.length&&-1>=this.markedChar&&!this.skipLF)return this.$in.read(a,d,h);this.fill()}if(this.nextChar>=this.nChars||this.skipLF&&(this.skipLF=!1,"\n"==this.cb[this.nextChar]&&(this.nextChar++,this.nextChar>=this.nChars&&
this.fill(),this.nextChar>=this.nChars)))return-1;h=Math.min(h,this.nChars-this.nextChar);System.arraycopy(this.cb,this.nextChar,a,d,h);this.nextChar+=h;return h},"~A,~N,~N");c(b,"read",function(a,d,h){this.ensureOpen();if(0>d||d>a.length||0>h||d+h>a.length||0>d+h)throw new IndexOutOfBoundsException;if(0==h)return 0;var b=this.read1(a,d,h);if(0>=b)return b;for(;b<h&&this.$in.ready();){var e=this.read1(a,d+b,h-b);if(0>=e)break;b+=e}return b},"~A,~N,~N");c(b,"readLine1",function(a){var d=null,h;this.ensureOpen();
for(a=a||this.skipLF;;){this.nextChar>=this.nChars&&this.fill();if(this.nextChar>=this.nChars)return null!=d&&0<d.length?d.toString():null;var b=!1,e=String.fromCharCode(0),c;a&&"\n"==this.cb[this.nextChar]&&this.nextChar++;a=this.skipLF=!1;c=this.nextChar;a:for(;c<this.nChars;c++)if(e=this.cb[c],"\n"==e||"\r"==e){b=!0;break a}h=this.nextChar;this.nextChar=c;h=String.instantialize(this.cb,h,c-h);if(b)return null!=d&&(h=d+=h),this.nextChar++,"\r"==e&&(this.skipLF=!0),h;null==d&&(d="");d+=h}},"~B");
c(b,"readLine",function(){return this.readLine1(!1)});f(b,"skip",function(a){if(0>a)throw new IllegalArgumentException("skip value is negative");this.ensureOpen();for(var d=a;0<d;){this.nextChar>=this.nChars&&this.fill();if(this.nextChar>=this.nChars)break;this.skipLF&&(this.skipLF=!1,"\n"==this.cb[this.nextChar]&&this.nextChar++);var h=this.nChars-this.nextChar;if(d<=h){this.nextChar+=d;d=0;break}d-=h;this.nextChar=this.nChars}return a-d},"~N");c(b,"ready",function(){this.ensureOpen();this.skipLF&&
(this.nextChar>=this.nChars&&this.$in.ready()&&this.fill(),this.nextChar<this.nChars&&("\n"==this.cb[this.nextChar]&&this.nextChar++,this.skipLF=!1));return this.nextChar<this.nChars||this.$in.ready()});f(b,"markSupported",function(){return!0});f(b,"mark",function(a){if(0>a)throw new IllegalArgumentException("Read-ahead limit < 0");this.ensureOpen();this.readAheadLimit=a;this.markedChar=this.nextChar;this.markedSkipLF=this.skipLF},"~N");f(b,"reset",function(){this.ensureOpen();if(0>this.markedChar)throw new java.io.IOException(-2==
this.markedChar?"Mark invalid":"Stream not marked");this.nextChar=this.markedChar;this.skipLF=this.markedSkipLF});c(b,"close",function(){null!=this.$in&&(this.$in.close(),this.cb=this.$in=null)})});x(["java.io.Writer"],"java.io.BufferedWriter",null,function(){var b=s(function(){this.buf=this.out=null;this.pos=0;this.lineSeparator="\r\n";r(this,arguments)},java.io,"BufferedWriter",java.io.Writer);u(b,function(a){K(this,java.io.BufferedWriter,[a]);this.out=a;this.buf=da(8192,"\x00")},"java.io.Writer");
u(b,function(a,d){K(this,java.io.BufferedWriter,[a]);if(0<d)this.out=a,this.buf=da(d,"\x00");else throw new IllegalArgumentException("K0058");},"java.io.Writer,~N");c(b,"close",function(){this.isOpen()&&(this.flush(),this.out.close(),this.out=this.buf=null)});c(b,"flush",function(){if(this.isOpen())0<this.pos&&this.out.write(this.buf,0,this.pos),this.pos=0,this.out.flush();else throw new java.io.IOException("K005d");});c(b,"isOpen",function(){return null!=this.out});c(b,"newLine",function(){this.write("\r\n",
0,2)});c(b,"write",function(a,d,h){if(!this.isOpen())throw new java.io.IOException("K005d");if(0>d||d>a.length-h||0>h)throw new IndexOutOfBoundsException;if(0==this.pos&&h>=this.buf.length)this.out.write(a,d,h);else{var b=this.buf.length-this.pos;h<b&&(b=h);0<b&&(System.arraycopy(a,d,this.buf,this.pos,b),this.pos+=b);this.pos==this.buf.length&&(this.out.write(this.buf,0,this.buf.length),this.pos=0,h>b&&(d+=b,b=h-b,b>=this.buf.length?this.out.write(a,d,b):(System.arraycopy(a,d,this.buf,this.pos,b),
this.pos+=b)))}},"~A,~N,~N");c(b,"write",function(a){if(this.isOpen())this.pos>=this.buf.length&&(this.out.write(this.buf,0,this.buf.length),this.pos=0),this.buf[this.pos++]=String.fromCharCode(a);else throw new java.io.IOException("K005d");},"~N");c(b,"write",function(a,d,h){if(!this.isOpen())throw new java.io.IOException("K005d");if(!(0>=h)){if(d>a.length-h||0>d)throw new StringIndexOutOfBoundsException;if(0==this.pos&&h>=this.buf.length){var b=da(h,"\x00");a.getChars(d,d+h,b,0);this.out.write(b,
0,h)}else{var e=this.buf.length-this.pos;h<e&&(e=h);0<e&&(a.getChars(d,d+e,this.buf,this.pos),this.pos+=e);this.pos==this.buf.length&&(this.out.write(this.buf,0,this.buf.length),this.pos=0,h>e&&(d+=e,e=h-e,e>=this.buf.length?(b=da(h,"\x00"),a.getChars(d,d+e,b,0),this.out.write(b,0,e)):(a.getChars(d,d+e,this.buf,this.pos),this.pos+=e)))}}},"~S,~N,~N")});x(["java.io.InputStream"],"java.io.ByteArrayInputStream",null,function(){var b=s(function(){this.buf=null;this.count=this.$mark=this.pos=0;r(this,
arguments)},java.io,"ByteArrayInputStream",java.io.InputStream);u(b,function(a){K(this,java.io.ByteArrayInputStream,[]);this.buf=a;this.pos=0;this.count=a.length},"~A");f(b,"readByteAsInt",function(){return this.pos<this.count?this.buf[this.pos++]&255:-1});f(b,"read",function(a,d,h){return this.readBAIS(a,d,h)},"~A,~N,~N");c(b,"readBAIS",function(a,d,h){if(null==a)throw new NullPointerException;if(0>d||0>h||h>a.length-d)throw new IndexOutOfBoundsException;if(this.pos>=this.count)return-1;var b=this.count-
this.pos;h>b&&(h=b);if(0>=h)return 0;System.arraycopy(this.buf,this.pos,a,d,h);this.pos+=h;return h},"~A,~N,~N");f(b,"skip",function(a){var d=this.count-this.pos;a<d&&(d=0>a?0:a);this.pos+=d;return d},"~N");f(b,"available",function(){return this.count-this.pos});f(b,"markSupported",function(){return!0});f(b,"mark",function(){this.$mark=this.pos},"~N");f(b,"resetStream",function(){});f(b,"reset",function(){this.pos=this.$mark});f(b,"close",function(){})});x(["java.io.OutputStream"],"java.io.ByteArrayOutputStream",
null,function(){var b=s(function(){this.buf=null;this.count=0;r(this,arguments)},java.io,"ByteArrayOutputStream",java.io.OutputStream);u(b,function(){this.construct(32)});u(b,function(a){K(this,java.io.ByteArrayOutputStream,[]);if(0>a)throw new IllegalArgumentException("Negative initial size: "+a);this.buf=O(a,0)},"~N");c(b,"ensureCapacity",function(a){0<a-this.buf.length&&this.grow(a)},"~N");c(b,"grow",function(a){var d=this.buf.length<<1;0>d-a&&(d=a);if(0>d){if(0>a)throw new OutOfMemoryError;d=
a}this.buf=java.io.ByteArrayOutputStream.arrayCopyByte(this.buf,d)},"~N");b.arrayCopyByte=c(b,"arrayCopyByte",function(a,d){var h=O(d,0);System.arraycopy(a,0,h,0,a.length<d?a.length:d);return h},"~A,~N");f(b,"writeByteAsInt",function(a){this.ensureCapacity(this.count+1);this.buf[this.count]=a;this.count+=1},"~N");c(b,"write",function(a,d,h){if(0>d||d>a.length||0>h||0<d+h-a.length)throw new IndexOutOfBoundsException;this.ensureCapacity(this.count+h);System.arraycopy(a,d,this.buf,this.count,h);this.count+=
h},"~A,~N,~N");c(b,"writeTo",function(a){a.write(this.buf,0,this.count)},"java.io.OutputStream");c(b,"reset",function(){this.count=0});c(b,"toByteArray",function(){return this.count==this.buf.length?this.buf:java.io.ByteArrayOutputStream.arrayCopyByte(this.buf,this.count)});c(b,"size",function(){return this.count});f(b,"toString",function(){return String.instantialize(this.buf,0,this.count)});f(b,"close",function(){})});x(["java.io.InputStream"],"java.io.FilterInputStream",null,function(){var b=s(function(){this.$in=
null;r(this,arguments)},java.io,"FilterInputStream",java.io.InputStream);u(b,function(a){K(this,java.io.FilterInputStream,[]);this.$in=a},"java.io.InputStream");c(b,"readByteAsInt",function(){return this.$in.readByteAsInt()});f(b,"read",function(a,d,h){return this.$in.read(a,d,h)},"~A,~N,~N");c(b,"skip",function(a){return this.$in.skip(a)},"~N");c(b,"available",function(){return this.$in.available()});c(b,"close",function(){this.$in.close()});c(b,"mark",function(a){this.$in.mark(a)},"~N");c(b,"reset",
function(){this.$in.reset()});c(b,"markSupported",function(){return this.$in.markSupported()})});x(["java.io.Closeable"],"java.io.InputStream",null,function(){var b=G(java.io,"InputStream",null,java.io.Closeable);c(b,"read",function(a,d,h){if(null==a)throw new NullPointerException;if(0>d||0>h||h>a.length-d)throw new IndexOutOfBoundsException;if(0==h)return 0;var b=this.readByteAsInt();if(-1==b)return-1;a[d]=b;var e=1;try{for(;e<h;e++){b=this.readByteAsInt();if(-1==b)break;a[d+e]=b}}catch(c){if(!E(c,
"java.io.IOException"))throw c;}return e},"~A,~N,~N");c(b,"skip",function(a){var d=a,h;null==java.io.InputStream.skipBuffer&&(java.io.InputStream.skipBuffer=O(2048,0));var b=java.io.InputStream.skipBuffer;if(0>=a)return 0;for(;0<d;){h=this.read(b,0,Math.min(2048,d));if(0>h)break;d-=h}return a-d},"~N");c(b,"available",function(){return 0});f(b,"close",function(){});c(b,"mark",function(){},"~N");c(b,"reset",function(){throw new java.io.IOException("mark/reset not supported");});c(b,"markSupported",
function(){return!1});c(b,"resetStream",function(){});b.skipBuffer=null});x(["java.io.Reader"],"java.io.InputStreamReader",null,function(){var b=s(function(){this.$in=null;this.isOpen=!0;this.charsetName=null;this.isUTF8=!1;this.bytearr=null;this.pos=0;r(this,arguments)},java.io,"InputStreamReader",java.io.Reader);u(b,function(a,d){K(this,java.io.InputStreamReader,[a]);this.$in=a;this.charsetName=d;if(!(this.isUTF8="UTF-8".equals(d))&&!"ISO-8859-1".equals(d))throw new NullPointerException("charsetName");
},"java.io.InputStream,~S");c(b,"getEncoding",function(){return this.charsetName});f(b,"read",function(a,d,h){if(null==this.bytearr||this.bytearr.length<h)this.bytearr=O(h,0);var b,e,c=0,j=d,k=this.$in.read(this.bytearr,this.pos,h-this.pos),l=this.$in.available();if(0>k)return-1;for(var f=k;c<f;){h=this.bytearr[c]&255;if(this.isUTF8)switch(h>>4){case 12:case 13:if(c+1>=k){if(1<=l){f=c;continue}}else if(128==((b=this.bytearr[c+1])&192)){a[j++]=String.fromCharCode((h&31)<<6|b&63);c+=2;continue}this.isUTF8=
!1;break;case 14:if(c+2>=k){if(2<=l){f=c;continue}}else if(128==((b=this.bytearr[c+1])&192)&&128==((e=this.bytearr[c+2])&192)){a[j++]=String.fromCharCode((h&15)<<12|(b&63)<<6|e&63);c+=3;continue}this.isUTF8=!1}c++;a[j++]=String.fromCharCode(h)}this.pos=k-c;for(a=0;a<this.pos;a++)this.bytearr[a]=this.bytearr[c++];return j-d},"~A,~N,~N");f(b,"ready",function(){return this.isOpen});f(b,"close",function(){this.$in.close();this.isOpen=!1})});x(["java.io.Closeable","$.Flushable"],"java.io.OutputStream",
null,function(){var b=G(java.io,"OutputStream",null,[java.io.Closeable,java.io.Flushable]);c(b,"write",function(a,d,h){if(null==a)throw new NullPointerException;if(0>d||d>a.length||0>h||d+h>a.length||0>d+h)throw new IndexOutOfBoundsException;if(0!=h)for(var b=0;b<h;b++)this.writeByteAsInt(a[d+b])},"~A,~N,~N");f(b,"flush",function(){});f(b,"close",function(){})});x(["java.io.Closeable"],"java.io.Reader",null,function(){var b=s(function(){this.lock=null;this.skipBuffer=String.fromCharCode(null);r(this,
arguments)},java.io,"Reader",null,java.io.Closeable);u(b,function(a){if(null==a)throw new NullPointerException;this.lock=a},"~O");c(b,"skip",function(a){if(0>a)throw new IllegalArgumentException("skip value is negative");var d=Math.min(a,8192);if(null==this.skipBuffer||this.skipBuffer.length<d)this.skipBuffer=da(d,"\x00");for(var h=a;0<h;){var b=this.read(this.skipBuffer,0,Math.min(h,d));if(-1==b)break;h-=b}return a-h},"~N");c(b,"ready",function(){return!1});c(b,"markSupported",function(){return!1});
c(b,"mark",function(){throw new java.io.IOException("mark() not supported");},"~N");c(b,"reset",function(){throw new java.io.IOException("reset() not supported");})});x(["java.io.Reader"],"java.io.StringReader",null,function(){var b=s(function(){this.str=null;this.$mark=this.next=this.length=0;r(this,arguments)},java.io,"StringReader",java.io.Reader);u(b,function(a){K(this,java.io.StringReader,[a]);this.str=a;this.length=a.length},"~S");c(b,"ensureOpen",function(){if(null==this.str)throw new java.io.IOException("Stream closed");
});f(b,"read",function(a,d,h){this.ensureOpen();if(0>d||d>a.length||0>h||d+h>a.length||0>d+h)throw new IndexOutOfBoundsException;if(0==h)return 0;if(this.next>=this.length)return-1;h=Math.min(this.length-this.next,h);this.str.getChars(this.next,this.next+h,a,d);this.next+=h;return h},"~A,~N,~N");f(b,"skip",function(a){this.ensureOpen();if(this.next>=this.length)return 0;a=Math.min(this.length-this.next,a);a=Math.max(-this.next,a);this.next+=a;return a},"~N");f(b,"ready",function(){this.ensureOpen();
return!0});f(b,"markSupported",function(){return!0});f(b,"mark",function(a){if(0>a)throw new IllegalArgumentException("Read-ahead limit < 0");this.ensureOpen();this.$mark=this.next},"~N");f(b,"reset",function(){this.ensureOpen();this.next=this.$mark});f(b,"close",function(){this.str=null})});x(["java.io.Closeable","$.Flushable","java.lang.Appendable"],"java.io.Writer",null,function(){var b=s(function(){this.lock=null;r(this,arguments)},java.io,"Writer",null,[Appendable,java.io.Closeable,java.io.Flushable]);
u(b,function(){this.lock=this});u(b,function(a){if(null!=a)this.lock=a;else throw new NullPointerException;},"~O");c(b,"write",function(a){this.write(a,0,a.length)},"~A");c(b,"write",function(a){var d=da(1,"\x00");d[0]=String.fromCharCode(a);this.write(d)},"~N");c(b,"write",function(a){var d=da(a.length,"\x00");a.getChars(0,d.length,d,0);this.write(d)},"~S");c(b,"write",function(a,d,h){if(0<=h){var b=da(h,"\x00");a.getChars(d,d+h,b,0);this.write(b)}else throw new StringIndexOutOfBoundsException;},
"~S,~N,~N");c(b,"append",function(a){this.write(a.charCodeAt(0));return this},"~S");c(b,"append",function(a){null==a?this.write("null"):this.write(a.toString());return this},"CharSequence");c(b,"append",function(a,d,h){null==a?this.write("null".substring(d,h)):this.write(a.subSequence(d,h).toString());return this},"CharSequence,~N,~N")});m("java.net");x(["java.io.IOException"],"java.net.MalformedURLException",null,function(){var b=G(java.net,"MalformedURLException",java.io.IOException);u(b,function(){K(this,
java.net.MalformedURLException,[])})});m("java.net");x(["java.io.IOException"],"java.net.UnknownServiceException",null,function(){var b=G(java.net,"UnknownServiceException",java.io.IOException);u(b,function(){K(this,java.net.UnknownServiceException,[])})});m("java.net");x(["java.util.Hashtable"],"java.net.URL",null,function(){var b=s(function(){this.host=this.protocol=null;this.port=-1;this.handler=this.ref=this.userInfo=this.path=this.authority=this.query=this.file=null;this.$hashCode=-1;r(this,
arguments)},java.net,"URL",null);u(b,function(a,d,h){switch(arguments.length){case 1:d=a;a=h=null;break;case 2:h=null;break;case 3:if(null==a||C(a,java.net.URL))break;default:alert("java.net.URL constructor format not supported")}a&&a.valueOf&&null==a.valueOf()&&(a=null);var b=d,e,c,j,k=0,l=null,f=!1,n=!1;try{for(c=d.length;0<c&&" ">=d.charAt(c-1);)c--;for(;k<c&&" ">=d.charAt(k);)k++;d.regionMatches(!0,k,"url:",0,4)&&(k+=4);k<d.length&&"#"==d.charAt(k)&&(f=!0);for(e=k;!f&&e<c&&47!=(j=d.charAt(e).charCodeAt(0));e++)if(58==
j){var q=d.substring(k,e).toLowerCase();this.isValidProtocol(q)&&(l=q,k=e+1);break}this.protocol=l;if(null!=a&&(null==l||l.equalsIgnoreCase(a.protocol)))null==h&&(h=a.handler),null!=a.path&&a.path.startsWith("/")&&(l=null),null==l&&(this.protocol=a.protocol,this.authority=a.authority,this.userInfo=a.userInfo,this.host=a.host,this.port=a.port,this.file=a.file,this.path=a.path,n=!0);if(null==this.protocol)throw new java.net.MalformedURLException("no protocol: "+b);if(null==h&&null==(h=java.net.URL.getURLStreamHandler(this.protocol)))throw new java.net.MalformedURLException("unknown protocol: "+
this.protocol);this.handler=h;e=d.indexOf("#",k);0<=e&&(this.ref=d.substring(e+1,c),c=e);n&&k==c&&(this.query=a.query,null==this.ref&&(this.ref=a.ref));h.parseURL(this,d,k,c)}catch(v){if(E(v,"java.net.MalformedURLException"))throw v;if(E(v,Exception))throw b=v,e=new java.net.MalformedURLException(b.getMessage()),e.initCause(b),e;throw v;}},"java.net.URL,~S,java.net.URLStreamHandler");c(b,"isValidProtocol",function(a){var d=a.length;if(1>d)return!1;var h=a.charAt(0);if(!Character.isLetter(h))return!1;
for(var b=1;b<d;b++)if(h=a.charAt(b),!Character.isLetterOrDigit(h)&&"."!=h&&"+"!=h&&"-"!=h)return!1;return!0},"~S");c(b,"set5",function(a,d,h,b,e){this.protocol=a;this.host=d;this.authority=-1==h?d:d+":"+h;this.port=h;this.file=b;this.ref=e;this.$hashCode=-1;a=b.lastIndexOf("?");-1!=a?(this.query=b.substring(a+1),this.path=b.substring(0,a)):this.path=b},"~S,~S,~N,~S,~S");c(b,"set",function(a,d,h,b,e,c,j,k){this.protocol=a;this.host=d;this.port=h;this.file=null==j?c:c+"?"+j;this.userInfo=e;this.path=
c;this.ref=k;this.$hashCode=-1;this.query=j;this.authority=b},"~S,~S,~N,~S,~S,~S,~S,~S");c(b,"getQuery",function(){return this.query});c(b,"getPath",function(){return this.path});c(b,"getUserInfo",function(){return this.userInfo});c(b,"getAuthority",function(){return this.authority});c(b,"getPort",function(){return this.port});c(b,"getDefaultPort",function(){return this.handler.getDefaultPort()});c(b,"getProtocol",function(){return this.protocol});c(b,"getHost",function(){return this.host});c(b,"getFile",
function(){return this.file});c(b,"getRef",function(){return this.ref});f(b,"equals",function(a){return!C(a,"java.net.URL")?!1:this.handler.equals2(this,a)},"~O");f(b,"hashCode",function(){return-1!=this.$hashCode?this.$hashCode:this.$hashCode=this.handler.hashCode(this)});c(b,"sameFile",function(a){return this.handler.sameFile(this,a)},"java.net.URL");f(b,"toString",function(){return this.toExternalForm()});c(b,"toExternalForm",function(){return this.handler.toExternalForm(this)});c(b,"openConnection",
function(){return this.handler.openConnection(this)});c(b,"openStream",function(){return this.openConnection().getInputStream()});c(b,"getContent",function(){return this.openConnection().getInputStream()});b.setURLStreamHandlerFactory=c(b,"setURLStreamHandlerFactory",function(a){if(null!=java.net.URL.factory)throw Error("factory already defined");var d=System.getSecurityManager();null!=d&&d.checkSetFactory();java.net.URL.handlers.clear();java.net.URL.factory=a},"java.net.URLStreamHandlerFactory");
b.getURLStreamHandler=c(b,"getURLStreamHandler",function(a){var d=java.net.URL.handlers.get(a);null==d&&null!=java.net.URL.factory&&(d=java.net.URL.factory.createURLStreamHandler(a));return d},"~S");b.factory=null;b.handlers=new java.util.Hashtable;b.streamHandlerLock=new qa._O});m("java.net");x(null,"java.net.URLConnection",["java.util.ArrayList"],function(){var b=s(function(){this.url=null;this.doInput=!0;this.connected=this.doOutput=!1;this.requests=null;r(this,arguments)},java.net,"URLConnection",
null);u(b,function(a){this.url=a},"java.net.URL");c(b,"setDoInput",function(a){if(this.connected)throw new IllegalStateException("Already connected");this.doInput=a},"~B");c(b,"getDoInput",function(){return this.doInput});c(b,"setDoOutput",function(a){if(this.connected)throw new IllegalStateException("Already connected");this.doOutput=a},"~B");c(b,"getDoOutput",function(){return this.doOutput});c(b,"getURL",function(){return this.url});c(b,"getInputStream",function(){throw new java.net.UnknownServiceException("protocol doesn't support input");
});c(b,"getOutputStream",function(){throw new java.net.UnknownServiceException("protocol doesn't support output");});c(b,"setRequestProperty",function(a,d){if(this.connected)throw new IllegalStateException("Already connected");if(null==a)throw new NullPointerException("key is null");null==this.requests&&(this.requests=new java.util.ArrayList);for(var h=this.requests.size();0<=--h;)if(this.requests.get(h)[0].equals(a)){this.requests.get(h)[1]=d;return}this.requests.add(z(-1,[a,d]))},"~S,~S")});m("java.net");
var Ta=G(java.net,"URLEncoder",null);Ta.encode=c(Ta,"encode",function(b){return encodeURIComponent(b)},"~S");m("java.net");var ia=G(java.net,"URLStreamHandler",null);c(ia,"openConnectionProxy",function(){throw new UnsupportedOperationException("Method not implemented.");},"java.net.URL,java.net.Proxy");c(ia,"parseURL",function(b,a,d,h){var p=b.getProtocol(),e=b.getAuthority(),c=b.getUserInfo(),j=b.getHost(),k=b.getPort(),l=b.getPath(),f=b.getQuery(),n=b.getRef(),q=!1,v=!1;if(d<h){var B=a.indexOf("?"),
v=B==d;-1!=B&&B<h&&(f=a.substring(B+1,h),h>B&&(h=B),a=a.substring(0,B))}var H=0;if(!(d<=h-4&&"/"==a.charAt(d)&&"/"==a.charAt(d+1)&&"/"==a.charAt(d+2)&&"/"==a.charAt(d+3))&&d<=h-2&&"/"==a.charAt(d)&&"/"==a.charAt(d+1)){d+=2;H=a.indexOf("/",d);0>H&&(H=a.indexOf("?",d),0>H&&(H=h));j=e=a.substring(d,H);B=e.indexOf("@");-1!=B?(c=e.substring(0,B),j=e.substring(B+1)):c=null;if(null!=j){if(0<j.length&&"["==j.charAt(0))throw new IllegalArgumentException("Invalid host: "+j);B=j.indexOf(":");k=-1;0<=B&&(j.length>
B+1&&(k=Integer.parseInt(j.substring(B+1))),j=j.substring(0,B))}else j="";if(-1>k)throw new IllegalArgumentException("Invalid port number :"+k);d=H;0<e.length&&(l="")}null==j&&(j="");d<h?"/"==a.charAt(d)?l=a.substring(d,h):null!=l&&0<l.length?(q=!0,B=l.lastIndexOf("/"),v="",-1==B&&null!=e&&(v="/"),l=l.substring(0,B+1)+v+a.substring(d,h)):l=(null!=e?"/":"")+a.substring(d,h):v&&null!=l&&(B=l.lastIndexOf("/"),0>B&&(B=0),l=l.substring(0,B)+"/");null==l&&(l="");if(q){for(;0<=(H=l.indexOf("/./"));)l=l.substring(0,
H)+l.substring(H+2);for(H=0;0<=(H=l.indexOf("/../",H));)0<H&&0<=(h=l.lastIndexOf("/",H-1))&&0!=l.indexOf("/../",h)?(l=l.substring(0,h)+l.substring(H+3),H=0):H+=3;for(;l.endsWith("/..");)if(H=l.indexOf("/.."),0<=(h=l.lastIndexOf("/",H-1)))l=l.substring(0,h+1);else break;l.startsWith("./")&&2<l.length&&(l=l.substring(2));l.endsWith("/.")&&(l=l.substring(0,l.length-1))}this.setURL(b,p,j,k,e,c,l,f,n)},"java.net.URL,~S,~N,~N");c(ia,"getDefaultPort",function(){return-1});c(ia,"equals2",function(b,a){var d=
b.getRef(),h=a.getRef();return(d===h||null!=d&&d.equals(h))&&this.sameFile(b,a)},"java.net.URL,java.net.URL");c(ia,"hashCode",function(b){var a=0,d=b.getProtocol();null!=d&&(a+=d.hashCode());a+=b.toString().hashCode();d=b.getFile();null!=d&&(a+=d.hashCode());a=-1==b.getPort()?a+this.getDefaultPort():a+b.getPort();b=b.getRef();null!=b&&(a+=b.hashCode());return a},"java.net.URL");c(ia,"sameFile",function(b,a){if(!(b.getProtocol()===a.getProtocol()||null!=b.getProtocol()&&b.getProtocol().equalsIgnoreCase(a.getProtocol()))||
!(b.getFile()===a.getFile()||null!=b.getFile()&&b.getFile().equals(a.getFile())))return!1;var d,h;d=-1!=b.getPort()?b.getPort():b.handler.getDefaultPort();h=-1!=a.getPort()?a.getPort():a.handler.getDefaultPort();return d!=h||!this.hostsEqual(b,a)?!1:!0},"java.net.URL,java.net.URL");c(ia,"hostsEqual",function(b,a){return null!=b.getHost()&&null!=a.getHost()?b.getHost().equalsIgnoreCase(a.getHost()):null==b.getHost()&&null==a.getHost()},"java.net.URL,java.net.URL");c(ia,"toExternalForm",function(){return""},
"java.net.URL");c(ia,"setURL",function(b,a,d,h,p,e,c,j,k){if(this!==b.handler)throw new SecurityException("handler for url different from this handler");b.set(b.getProtocol(),d,h,p,e,c,j,k)},"java.net.URL,~S,~S,~N,~S,~S,~S,~S,~S");c(ia,"setURLDeprecated",function(b,a,d,h,p,e){var c=null,j=null;if(null!=d&&0!=d.length){var c=-1==h?d:d+":"+h,k=d.lastIndexOf("@");-1!=k&&(j=d.substring(0,k),d=d.substring(k+1))}var l=null,k=null;null!=p&&(l=p.lastIndexOf("?"),-1!=l?(k=p.substring(l+1),l=p.substring(0,
l)):l=p);this.setURL(b,a,d,h,c,j,l,k,e)},"java.net.URL,~S,~S,~N,~S,~S");m("java.net");I(java.net,"URLStreamHandlerFactory");m("java.text");var za=s(function(){this.pattern=null;r(this,arguments)},java.text,"MessageFormat",null);u(za,function(b){this.pattern=b},"~S");u(za,function(b){this.pattern=b},"~S,java.util.Locale");za.format=c(za,"format",function(b,a){return b.replace(/\{(\d+)\}/g,function(d,h){var b=parseInt(h);return null==a?null:a[b]})},"~S,~A");c(za,"format",function(b){return java.text.MessageFormat.format(this.pattern,
z(-1,[b]))},"~O");var ja=s(function(){this.haveNextNextGaussian=!1;this.nextNextGaussian=this.seed=0;r(this,arguments)},java.util,"Random",null,java.io.Serializable);u(ja,function(){var b=-2147483648;1==arguments.length&&(b=arguments[0]);-2147483648==b&&(b=System.currentTimeMillis());this.setSeed(b)});c(ja,"next",function(b){this.seed=25214903917*this.seed+11&0xffffffffffff;return this.seed>>>48-b},"~N");c(ja,"nextBoolean",function(){return 0.5<Math.random()});c(ja,"nextBytes",function(b){for(var a=
0,d=0,h=0;d<b.length;)0==h?(a=this.nextInt(),h=3):h--,b[d++]=a,a>>=8},"~A");c(ja,"nextDouble",function(){return Math.random()});c(ja,"nextFloat",function(){return Math.random()});c(ja,"nextGaussian",function(){if(this.haveNextNextGaussian)return this.haveNextNextGaussian=!1,this.nextNextGaussian;var b,a,d;do b=2*this.nextDouble()-1,a=2*this.nextDouble()-1,d=b*b+a*a;while(1<=d);d=Math.sqrt(-2*Math.log(d)/d);this.nextNextGaussian=a*d;this.haveNextNextGaussian=!0;return b*d});c(ja,"nextInt",function(b){if(0==
arguments.length)return 4294967296*Math.random()|0;if(0>=b)throw new IllegalArgumentException;return Math.random()*b|0},"~N");c(ja,"nextLong",function(){return(this.next(32)<<32)+this.next(32)});c(ja,"setSeed",function(b){Math.seedrandom(b)},"~N");var Da=[],Aa=Math,Ea=52,Ua=void 0,Va=void 0,nb=function(b){var a,d,h=this,p=b.length,e=0,c=h.i=h.j=h.m=0;h.S=[];h.c=[];for(p||(b=[p++]);256>e;)h.S[e]=e++;for(e=0;256>e;e++)a=h.S[e],c=c+a+b[e%p]&255,d=h.S[c],h.S[e]=d,h.S[c]=a;h.g=function(a){var d=h.S,b=
h.i+1&255,p=d[b],e=h.j+p&255,c=d[e];d[b]=c;d[e]=p;for(var g=d[p+c&255];--a;)b=b+1&255,p=d[b],e=e+p&255,c=d[e],d[b]=c,d[e]=p,g=256*g+d[p+c&255];h.i=b;h.j=e;return g};h.g(256)},Wa=function(b,a,d,h){d=[];if(a&&"object"==typeof b)for(h in b)if(5>h.indexOf("S"))try{d.push(Wa(b[h],a-1))}catch(p){}return d.length?d:""+b},Ja=function(b,a,d,h){b+="";for(h=d=0;h<b.length;h++){var p=a,e=h&255,c=(d^=19*a[h&255])+b.charCodeAt(h);p[e]=c&255}b="";for(h in a)b+=String.fromCharCode(a[h]);return b};Aa.seedrandom=function(b,
a){var d=[],h;b=Ja(Wa(a?[b,Da]:arguments.length?b:[(new Date).getTime(),Da,window],3),d);h=new nb(d);Ja(h.S,Da);Aa.random=function(){for(var a=h.g(6),d=Va,b=0;a<Ea;)a=256*(a+b),d*=256,b=h.g(1);for(;a>=Ua;)a/=2,d/=2,b>>>=1;return(a+b)/d};return b};Va=Aa.pow(256,6);Ea=Aa.pow(2,Ea);Ua=2*Ea;Ja(Aa.random(),Da);x(["java.util.Collection"],"java.util.AbstractCollection",["java.lang.reflect.Array"],function(){var b=G(java.util,"AbstractCollection",null,java.util.Collection);f(b,"add",function(){throw new UnsupportedOperationException;
},"~O");f(b,"addAll",function(a){var d=!1;for(a=a.iterator();a.hasNext();)this.add(a.next())&&(d=!0);return d},"java.util.Collection");f(b,"clear",function(){for(var a=this.iterator();a.hasNext();)a.next(),a.remove()});f(b,"contains",function(a){var d=this.iterator();if(null!=a)for(;d.hasNext();){if(a.equals(d.next()))return!0}else for(;d.hasNext();)if(null==d.next())return!0;return!1},"~O");f(b,"containsAll",function(a){for(a=a.iterator();a.hasNext();)if(!this.contains(a.next()))return!1;return!0},
"java.util.Collection");f(b,"isEmpty",function(){return 0==this.size()});f(b,"remove",function(a){var d=this.iterator();if(null!=a)for(;d.hasNext();){if(a.equals(d.next()))return d.remove(),!0}else for(;d.hasNext();)if(null==d.next())return d.remove(),!0;return!1},"~O");f(b,"removeAll",function(a){for(var d=!1,h=this.iterator();h.hasNext();)a.contains(h.next())&&(h.remove(),d=!0);return d},"java.util.Collection");f(b,"retainAll",function(a){for(var d=!1,h=this.iterator();h.hasNext();)a.contains(h.next())||
(h.remove(),d=!0);return d},"java.util.Collection");c(b,"toArray",function(){for(var a=this.size(),d=0,h=this.iterator(),b=Array(a);d<a;)b[d++]=h.next();return b});c(b,"toArray",function(a){var d=this.size(),h=0;d>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,d));for(var b,d=this.iterator();d.hasNext()&&((b=d.next())||1);)a[h++]=b;h<a.length&&(a[h]=null);return a},"~A");f(b,"toString",function(){if(this.isEmpty())return"[]";for(var a="[",d=this.iterator();d.hasNext();){var h=
d.next(),a=h!==this?a+h:a+"(this Collection)";d.hasNext()&&(a+=", ")}return a+"]"})});x(["java.util.AbstractCollection","$.Iterator","$.List","$.ListIterator","$.RandomAccess"],"java.util.AbstractList",null,function(){var b=s(function(){this.modCount=0;r(this,arguments)},java.util,"AbstractList",java.util.AbstractCollection,java.util.List);c(b,"add",function(){throw new UnsupportedOperationException;},"~N,~O");c(b,"add",function(a){this.add(this.size(),a);return!0},"~O");c(b,"addAll",function(a,d){for(var h=
d.iterator();h.hasNext();)this.add(a++,h.next());return!d.isEmpty()},"~N,java.util.Collection");f(b,"clear",function(){this.removeRange(0,this.size())});f(b,"equals",function(a){if(this===a)return!0;if(C(a,"java.util.List")){if(a.size()!=this.size())return!1;var d=this.iterator();for(a=a.iterator();d.hasNext();){var h=d.next(),b=a.next();if(!(null==h?null==b:h.equals(b)))return!1}return!0}return!1},"~O");f(b,"hashCode",function(){for(var a=1,d=this.iterator();d.hasNext();)var h=d.next(),a=31*a+(null==
h?0:h.hashCode());return a});f(b,"indexOf",function(a){var d=this.listIterator();if(null!=a)for(;d.hasNext();){if(a.equals(d.next()))return d.previousIndex()}else for(;d.hasNext();)if(null==d.next())return d.previousIndex();return-1},"~O");f(b,"iterator",function(){return new java.util.AbstractList.SimpleListIterator(this)});f(b,"lastIndexOf",function(a){var d=this.listIterator(this.size());if(null!=a)for(;d.hasPrevious();){if(a.equals(d.previous()))return d.nextIndex()}else for(;d.hasPrevious();)if(null==
d.previous())return d.nextIndex();return-1},"~O");c(b,"listIterator",function(){return this.listIterator(0)});c(b,"listIterator",function(a){return new java.util.AbstractList.FullListIterator(this,a)},"~N");c(b,"remove",function(){throw new UnsupportedOperationException;},"~N");c(b,"removeRange",function(a,d){for(var h=this.listIterator(a),b=a;b<d;b++)h.next(),h.remove()},"~N,~N");f(b,"set",function(){throw new UnsupportedOperationException;},"~N,~O");f(b,"subList",function(a,d){if(0<=a&&d<=this.size()){if(a<=
d)return C(this,"java.util.RandomAccess")?new java.util.AbstractList.SubAbstractListRandomAccess(this,a,d):new java.util.AbstractList.SubAbstractList(this,a,d);throw new IllegalArgumentException;}throw new IndexOutOfBoundsException;},"~N,~N");b=s(function(){this.pos=-1;this.expectedModCount=0;this.lastPosition=-1;this.list=null;r(this,arguments)},java.util.AbstractList,"SimpleListIterator",null,java.util.Iterator);u(b,function(a){this.list=a;this.expectedModCount=a.modCount},"java.util.AbstractList");
f(b,"hasNext",function(){return this.pos+1<this.list.size()});f(b,"next",function(){if(this.expectedModCount==this.list.modCount)try{var a=this.list.get(this.pos+1);this.lastPosition=++this.pos;return a}catch(d){if(E(d,"IndexOutOfBoundsException"))throw new java.util.NoSuchElementException;throw d;}throw new java.util.ConcurrentModificationException;});f(b,"remove",function(){if(this.expectedModCount==this.list.modCount){try{this.list.remove(this.lastPosition)}catch(a){if(E(a,"IndexOutOfBoundsException"))throw new IllegalStateException;
throw a;}this.list.modCount!=this.expectedModCount&&this.expectedModCount++;this.pos==this.lastPosition&&this.pos--;this.lastPosition=-1}else throw new java.util.ConcurrentModificationException;});b=G(java.util.AbstractList,"FullListIterator",java.util.AbstractList.SimpleListIterator,java.util.ListIterator);u(b,function(a,d){K(this,java.util.AbstractList.FullListIterator,[a]);if(0<=d&&d<=a.size())this.pos=d-1;else throw new IndexOutOfBoundsException;},"java.util.AbstractList,~N");f(b,"add",function(a){if(this.expectedModCount==
this.list.modCount){try{this.list.add(this.pos+1,a)}catch(d){if(E(d,"IndexOutOfBoundsException"))throw new java.util.NoSuchElementException;throw d;}this.pos++;this.lastPosition=-1;this.list.modCount!=this.expectedModCount&&this.expectedModCount++}else throw new java.util.ConcurrentModificationException;},"~O");f(b,"hasPrevious",function(){return 0<=this.pos});f(b,"nextIndex",function(){return this.pos+1});f(b,"previous",function(){if(this.expectedModCount==this.list.modCount)try{var a=this.list.get(this.pos);
this.lastPosition=this.pos;this.pos--;return a}catch(d){if(E(d,"IndexOutOfBoundsException"))throw new java.util.NoSuchElementException;throw d;}throw new java.util.ConcurrentModificationException;});f(b,"previousIndex",function(){return this.pos});f(b,"set",function(a){if(this.expectedModCount==this.list.modCount)try{this.list.set(this.lastPosition,a)}catch(d){if(E(d,"IndexOutOfBoundsException"))throw new IllegalStateException;throw d;}else throw new java.util.ConcurrentModificationException;},"~O");
G(java.util.AbstractList,"SubAbstractListRandomAccess",java.util.AbstractList.SubAbstractList,java.util.RandomAccess);b=s(function(){this.fullList=null;this.$size=this.offset=0;r(this,arguments)},java.util.AbstractList,"SubAbstractList",java.util.AbstractList);u(b,function(a,d,h){K(this,java.util.AbstractList.SubAbstractList);this.fullList=a;this.modCount=this.fullList.modCount;this.offset=d;this.$size=h-d},"java.util.AbstractList,~N,~N");c(b,"add",function(a,d){if(this.modCount==this.fullList.modCount)if(0<=
a&&a<=this.$size)this.fullList.add(a+this.offset,d),this.$size++,this.modCount=this.fullList.modCount;else throw new IndexOutOfBoundsException;else throw new java.util.ConcurrentModificationException;},"~N,~O");c(b,"addAll",function(a,d){if(this.modCount==this.fullList.modCount){if(0<=a&&a<=this.$size){var h=this.fullList.addAll(a+this.offset,d);h&&(this.$size+=d.size(),this.modCount=this.fullList.modCount);return h}throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;
},"~N,java.util.Collection");c(b,"addAll",function(a){if(this.modCount==this.fullList.modCount){var d=this.fullList.addAll(this.offset+this.$size,a);d&&(this.$size+=a.size(),this.modCount=this.fullList.modCount);return d}throw new java.util.ConcurrentModificationException;},"java.util.Collection");c(b,"get",function(a){if(this.modCount==this.fullList.modCount){if(0<=a&&a<this.$size)return this.fullList.get(a+this.offset);throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;
},"~N");f(b,"iterator",function(){return this.listIterator(0)});c(b,"listIterator",function(a){if(this.modCount==this.fullList.modCount){if(0<=a&&a<=this.$size)return new java.util.AbstractList.SubAbstractList.SubAbstractListIterator(this.fullList.listIterator(a+this.offset),this,this.offset,this.$size);throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;},"~N");c(b,"remove",function(a){if(this.modCount==this.fullList.modCount){if(0<=a&&a<this.$size)return a=this.fullList.remove(a+
this.offset),this.$size--,this.modCount=this.fullList.modCount,a;throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;},"~N");c(b,"removeRange",function(a,d){if(a!=d)if(this.modCount==this.fullList.modCount)this.fullList.removeRange(a+this.offset,d+this.offset),this.$size-=d-a,this.modCount=this.fullList.modCount;else throw new java.util.ConcurrentModificationException;},"~N,~N");c(b,"set",function(a,d){if(this.modCount==this.fullList.modCount){if(0<=a&&a<this.$size)return this.fullList.set(a+
this.offset,d);throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;},"~N,~O");f(b,"size",function(){return this.$size});c(b,"sizeChanged",function(a){a?this.$size++:this.$size--;this.modCount=this.fullList.modCount},"~B");b=s(function(){this.iterator=this.subList=null;this.end=this.start=0;r(this,arguments)},java.util.AbstractList.SubAbstractList,"SubAbstractListIterator",null,java.util.ListIterator);u(b,function(a,d,h,b){this.iterator=a;this.subList=d;this.start=
h;this.end=this.start+b},"java.util.ListIterator,java.util.AbstractList.SubAbstractList,~N,~N");c(b,"add",function(a){this.iterator.add(a);this.subList.sizeChanged(!0);this.end++},"~O");f(b,"hasNext",function(){return this.iterator.nextIndex()<this.end});f(b,"hasPrevious",function(){return this.iterator.previousIndex()>=this.start});c(b,"next",function(){if(this.iterator.nextIndex()<this.end)return this.iterator.next();throw new java.util.NoSuchElementException;});c(b,"nextIndex",function(){return this.iterator.nextIndex()-
this.start});c(b,"previous",function(){if(this.iterator.previousIndex()>=this.start)return this.iterator.previous();throw new java.util.NoSuchElementException;});c(b,"previousIndex",function(){var a=this.iterator.previousIndex();return a>=this.start?a-this.start:-1});c(b,"remove",function(){this.iterator.remove();this.subList.sizeChanged(!1);this.end--});c(b,"set",function(a){this.iterator.set(a)},"~O")});x(["java.util.Map"],"java.util.AbstractMap",["java.util.AbstractCollection","$.AbstractSet",
"$.Iterator"],function(){var b=s(function(){this.$values=this.$keySet=null;r(this,arguments)},java.util,"AbstractMap",null,java.util.Map);f(b,"clear",function(){this.entrySet().clear()});f(b,"containsKey",function(a){var d=this.entrySet().iterator();if(null!=a)for(;d.hasNext();){if(a.equals(d.next().getKey()))return!0}else for(;d.hasNext();)if(null==d.next().getKey())return!0;return!1},"~O");f(b,"containsValue",function(a){var d=this.entrySet().iterator();if(null!=a)for(;d.hasNext();){if(a.equals(d.next().getValue()))return!0}else for(;d.hasNext();)if(null==
d.next().getValue())return!0;return!1},"~O");f(b,"equals",function(a){if(this===a)return!0;if(C(a,"java.util.Map")){if(this.size()!=a.size())return!1;a=a.entrySet();for(var d=this.entrySet().iterator();d.hasNext();)if(!a.contains(d.next()))return!1;return!0}return!1},"~O");f(b,"get",function(a){var d=this.entrySet().iterator();if(null!=a)for(;d.hasNext();){var h=d.next();if(a.equals(h.getKey()))return h.getValue()}else for(;d.hasNext();)if(h=d.next(),null==h.getKey())return h.getValue();return null},
"~O");f(b,"hashCode",function(){for(var a=0,d=this.entrySet().iterator();d.hasNext();)a+=d.next().hashCode();return a});f(b,"isEmpty",function(){return 0==this.size()});f(b,"keySet",function(){null==this.$keySet&&(this.$keySet=(R("java.util.AbstractMap$1")?0:java.util.AbstractMap.$AbstractMap$1$(),T(java.util.AbstractMap$1,this,null)));return this.$keySet});f(b,"put",function(){throw new UnsupportedOperationException;},"~O,~O");f(b,"putAll",function(a){this.putAllAM(a)},"java.util.Map");c(b,"putAllAM",
function(a){if(!a.isEmpty()){var d;for(a=a.entrySet().iterator();a.hasNext()&&((d=a.next())||1);)this.put(d.getKey(),d.getValue())}},"java.util.Map");f(b,"remove",function(a){var d=this.entrySet().iterator();if(null!=a)for(;d.hasNext();){var h=d.next();if(a.equals(h.getKey()))return d.remove(),h.getValue()}else for(;d.hasNext();)if(h=d.next(),null==h.getKey())return d.remove(),h.getValue();return null},"~O");f(b,"size",function(){return this.entrySet().size()});f(b,"toString",function(){if(this.isEmpty())return"{}";
for(var a="{",d=this.entrySet().iterator();d.hasNext();){var h=d.next(),b=h.getKey(),a=b!==this?a+b:a+"(this Map)",a=a+"=",h=h.getValue(),a=h!==this?a+h:a+"(this Map)";d.hasNext()&&(a+=", ")}return a+"}"});f(b,"values",function(){null==this.$values&&(this.$values=(R("java.util.AbstractMap$2")?0:java.util.AbstractMap.$AbstractMap$2$(),T(java.util.AbstractMap$2,this,null)));return this.$values});c(b,"clone",function(){return this.cloneAM()});c(b,"cloneAM",function(){var a;a=Oa(this);a.$keySet=null;
a.$values=null;return a});b.$AbstractMap$1$=function(){var a=Y(java.util,"AbstractMap$1",java.util.AbstractSet);f(a,"contains",function(a){return this.b$["java.util.AbstractMap"].containsKey(a)},"~O");f(a,"size",function(){return this.b$["java.util.AbstractMap"].size()});f(a,"iterator",function(){return R("java.util.AbstractMap$1$1")?0:java.util.AbstractMap.$AbstractMap$1$1$(),T(java.util.AbstractMap$1$1,this,null)})};b.$AbstractMap$1$1$=function(){var a=s(function(){fa(this,arguments);this.setIterator=
null;r(this,arguments)},java.util,"AbstractMap$1$1",null,java.util.Iterator);N(a,function(){this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator()});f(a,"hasNext",function(){return this.setIterator.hasNext()});f(a,"next",function(){return this.setIterator.next().getKey()});f(a,"remove",function(){this.setIterator.remove()})};b.$AbstractMap$2$=function(){var a=Y(java.util,"AbstractMap$2",java.util.AbstractCollection);f(a,"size",function(){return this.b$["java.util.AbstractMap"].size()});
f(a,"contains",function(a){return this.b$["java.util.AbstractMap"].containsValue(a)},"~O");f(a,"iterator",function(){return R("java.util.AbstractMap$2$1")?0:java.util.AbstractMap.$AbstractMap$2$1$(),T(java.util.AbstractMap$2$1,this,null)})};b.$AbstractMap$2$1$=function(){var a=s(function(){fa(this,arguments);this.setIterator=null;r(this,arguments)},java.util,"AbstractMap$2$1",null,java.util.Iterator);N(a,function(){this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator()});f(a,"hasNext",
function(){return this.setIterator.hasNext()});f(a,"next",function(){return this.setIterator.next().getValue()});f(a,"remove",function(){this.setIterator.remove()})}});x(["java.util.AbstractCollection","$.Set"],"java.util.AbstractSet",null,function(){var b=G(java.util,"AbstractSet",java.util.AbstractCollection,java.util.Set);f(b,"equals",function(a){return this===a?!0:C(a,"java.util.Set")?this.size()==a.size()&&this.containsAll(a):!1},"~O");f(b,"hashCode",function(){for(var a=0,d=this.iterator();d.hasNext();)var h=
d.next(),a=a+(null==h?0:h.hashCode());return a});f(b,"removeAll",function(a){var d=!1;if(this.size()<=a.size())for(var h=this.iterator();h.hasNext();)a.contains(h.next())&&(h.remove(),d=!0);else for(h=a.iterator();h.hasNext();)d=this.remove(h.next())||d;return d},"java.util.Collection")});x(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.ArrayList",["java.util.Arrays"],function(){var b=s(function(){this.lastIndex=this.firstIndex=0;this.array=null;r(this,arguments)},java.util,"ArrayList",
java.util.AbstractList,[java.util.List,Cloneable,java.io.Serializable,java.util.RandomAccess]);u(b,function(){K(this,java.util.ArrayList,[]);this.setCapacity(0)});u(b,function(a){K(this,java.util.ArrayList,[]);this.setCapacity(a)},"~N");u(b,function(a){this.firstIndex=this.lastIndex=0;var d=-1;a?"number"==typeof a&&(d=a):d=0;0<=d?this.setCapacity(d):(d=a.size(),this.array=this.newElementArray(d+w(d/10)),this.addAll(a))},"java.util.Collection");c(b,"setCapacity",function(a){try{this.array=this.newElementArray(a)}catch(d){if(E(d,
"NegativeArraySizeException"))throw new IllegalArgumentException;throw d;}},"~N");c(b,"newElementArray",function(a){return Array(a)},"~N");c(b,"add",function(a,d){this.add2(a,d)},"~N,~O");c(b,"add2",function(a,d){var h=this.size();if(0<a&&a<h){if(0==this.firstIndex&&this.lastIndex==this.array.length)this.growForInsert(a,1);else if(a<w(h/2)&&0<this.firstIndex||this.lastIndex==this.array.length)System.arraycopy(this.array,this.firstIndex,this.array,--this.firstIndex,a);else{var b=a+this.firstIndex;
System.arraycopy(this.array,b,this.array,b+1,h-a);this.lastIndex++}this.array[a+this.firstIndex]=d}else if(0==a)0==this.firstIndex&&this.growAtFront(1),this.array[--this.firstIndex]=d;else if(a==h)this.lastIndex==this.array.length&&this.growAtEnd(1),this.array[this.lastIndex++]=d;else throw new IndexOutOfBoundsException;this.modCount++},"~N,~O");c(b,"add",function(a){return this.add1(a)},"~O");c(b,"add1",function(a){this.lastIndex==this.array.length&&this.growAtEnd(1);this.array[this.lastIndex++]=
a;this.modCount++;return!0},"~O");c(b,"addAll",function(a,d){var h=this.size();if(0>a||a>h)throw new IndexOutOfBoundsException;var b=d.size();if(0<a&&a<h)if(this.array.length-h<b)this.growForInsert(a,b);else if(a<w(h/2)&&0<this.firstIndex||this.lastIndex>this.array.length-b){var e=this.firstIndex-b;if(0>e){var c=a+this.firstIndex;System.arraycopy(this.array,c,this.array,c-e,h-a);this.lastIndex-=e;e=0}System.arraycopy(this.array,this.firstIndex,this.array,e,a);this.firstIndex=e}else c=a+this.firstIndex,
System.arraycopy(this.array,c,this.array,c+b,h-a),this.lastIndex+=b;else 0==a?(this.growAtFront(b),this.firstIndex-=b):a==h&&(this.lastIndex>this.array.length-b&&this.growAtEnd(b),this.lastIndex+=b);if(0<b){h=d.iterator();c=a+this.firstIndex;for(b=c+b;c<b;)this.array[c++]=h.next();this.modCount++;return!0}return!1},"~N,java.util.Collection");c(b,"addAll",function(a){var d=a.size();if(0<d){this.lastIndex>this.array.length-d&&this.growAtEnd(d);a=a.iterator();for(d=this.lastIndex+d;this.lastIndex<d;)this.array[this.lastIndex++]=
a.next();this.modCount++;return!0}return!1},"java.util.Collection");f(b,"clear",function(){this.firstIndex!=this.lastIndex&&(java.util.Arrays.fill(this.array,this.firstIndex,this.lastIndex,null),this.firstIndex=this.lastIndex=0,this.modCount++)});c(b,"clone",function(){try{var a=ba(this,java.util.ArrayList,"clone",[]);a.array=this.array.clone();return a}catch(d){if(E(d,"CloneNotSupportedException"))return null;throw d;}});f(b,"contains",function(a){if(null!=a)for(var d=this.firstIndex;d<this.lastIndex;d++){if(a.equals(this.array[d]))return!0}else for(d=
this.firstIndex;d<this.lastIndex;d++)if(null==this.array[d])return!0;return!1},"~O");c(b,"ensureCapacity",function(a){this.array.length<a&&(0<this.firstIndex?this.growAtFront(a-this.array.length):this.growAtEnd(a-this.array.length))},"~N");f(b,"get",function(a){if(0<=a&&a<this.size())return this.array[this.firstIndex+a];throw new IndexOutOfBoundsException;},"~N");c(b,"growAtEnd",function(a){var d=this.size();if(this.firstIndex>=a-(this.array.length-this.lastIndex))a=this.lastIndex-this.firstIndex,
0<d&&(System.arraycopy(this.array,this.firstIndex,this.array,0,d),java.util.Arrays.fill(this.array,a<this.firstIndex?this.firstIndex:a,this.array.length,null)),this.firstIndex=0,this.lastIndex=a;else{var h=w(d/2);a>h&&(h=a);12>h&&(h=12);a=this.newElementArray(d+h);0<d&&System.arraycopy(this.array,this.firstIndex,a,this.firstIndex,d);this.array=a}},"~N");c(b,"growAtFront",function(a){var d=this.size();if(this.array.length-this.lastIndex>=a)a=this.array.length-d,0<d&&(System.arraycopy(this.array,this.firstIndex,
this.array,a,d),java.util.Arrays.fill(this.array,this.firstIndex,this.firstIndex+d>a?a:this.firstIndex+d,null)),this.firstIndex=a,this.lastIndex=this.array.length;else{var h=w(d/2);a>h&&(h=a);12>h&&(h=12);a=this.newElementArray(d+h);0<d&&System.arraycopy(this.array,this.firstIndex,a,a.length-d,d);this.firstIndex=a.length-d;this.lastIndex=a.length;this.array=a}},"~N");c(b,"growForInsert",function(a,d){var h=this.size(),b=w(h/2);d>b&&(b=d);12>b&&(b=12);var e=this.newElementArray(h+b);if(a<w(h/2)){var c=
e.length-(h+d);System.arraycopy(this.array,a,e,a+b,h-a);System.arraycopy(this.array,this.firstIndex,e,c,a);this.firstIndex=c;this.lastIndex=e.length}else System.arraycopy(this.array,this.firstIndex,e,0,a),System.arraycopy(this.array,a,e,a+d,h-a),this.firstIndex=0,this.lastIndex+=d;this.array=e},"~N,~N");f(b,"indexOf",function(a){if(null!=a)for(var d=this.firstIndex;d<this.lastIndex;d++){if(a.equals(this.array[d]))return d-this.firstIndex}else for(d=this.firstIndex;d<this.lastIndex;d++)if(null==this.array[d])return d-
this.firstIndex;return-1},"~O");f(b,"isEmpty",function(){return this.lastIndex==this.firstIndex});f(b,"lastIndexOf",function(a){if(null!=a)for(var d=this.lastIndex-1;d>=this.firstIndex;d--){if(a.equals(this.array[d]))return d-this.firstIndex}else for(d=this.lastIndex-1;d>=this.firstIndex;d--)if(null==this.array[d])return d-this.firstIndex;return-1},"~O");c(b,"remove",function(a){return this._removeItemAt(a)},"~N");c(b,"_removeObject",function(a){a=this.indexOf(a);if(0>a)return!1;this._removeItemAt(a);
return!0},"~O");c(b,"_removeItemAt",function(a){var d,h=this.size();if(0<=a&&a<h)if(a==h-1)d=this.array[--this.lastIndex],this.array[this.lastIndex]=null;else if(0==a)d=this.array[this.firstIndex],this.array[this.firstIndex++]=null;else{var b=this.firstIndex+a;d=this.array[b];a<w(h/2)?(System.arraycopy(this.array,this.firstIndex,this.array,this.firstIndex+1,a),this.array[this.firstIndex++]=null):(System.arraycopy(this.array,b+1,this.array,b,h-a-1),this.array[--this.lastIndex]=null)}else throw new IndexOutOfBoundsException;
this.modCount++;return d},"~N");f(b,"removeRange",function(a,d){if(0<=a&&a<=d&&d<=this.size()){if(a!=d){var h=this.size();d==h?(java.util.Arrays.fill(this.array,this.firstIndex+a,this.lastIndex,null),this.lastIndex=this.firstIndex+a):0==a?(java.util.Arrays.fill(this.array,this.firstIndex,this.firstIndex+d,null),this.firstIndex+=d):(System.arraycopy(this.array,this.firstIndex+d,this.array,this.firstIndex+a,h-d),h=this.lastIndex+a-d,java.util.Arrays.fill(this.array,h,this.lastIndex,null),this.lastIndex=
h);this.modCount++}}else throw new IndexOutOfBoundsException;},"~N,~N");f(b,"set",function(a,d){if(0<=a&&a<this.size()){var h=this.array[this.firstIndex+a];this.array[this.firstIndex+a]=d;return h}throw new IndexOutOfBoundsException;},"~N,~O");f(b,"size",function(){return this.lastIndex-this.firstIndex});f(b,"toArray",function(a){var d=this.size();if(null==a||d>a.length)return this.array.slice(this.firstIndex,this.firstIndex+d);System.arraycopy(this.array,this.firstIndex,a,0,d);d<a.length&&(a[d]=
null);return a},"~A");c(b,"trimToSize",function(){var a=this.size(),d=this.newElementArray(a);System.arraycopy(this.array,this.firstIndex,d,0,a);this.array=d;this.firstIndex=0;this.lastIndex=this.array.length})});x(["java.util.AbstractList","$.RandomAccess"],"java.util.Arrays",null,function(){var b=G(java.util,"Arrays",null);b.fill=c(b,"fill",function(a,h,b,e){2==arguments.length&&(e=arguments[1],h=0,b=a.length);java.util.Arrays.rangeCheck(a.length,h,b);for(var c=h;c<b;c++)a[c]=e},"~A,~N,~N,~O");
b.asList=c(b,"asList",function(a){return new java.util.Arrays.ArrayList(a)},"~A");b.rangeCheck=c(b,"rangeCheck",function(a,h,b){if(h>b)throw new IllegalArgumentException("fromIndex("+h+") > toIndex("+b+")");if(0>h)throw new ArrayIndexOutOfBoundsException(h);if(b>a)throw new ArrayIndexOutOfBoundsException(b);},"~N,~N,~N");b.binarySearch=c(b,"binarySearch",function(a,h){for(var b=0,e=a.length-1;b<=e;){var c=b+e>>1,j=a[c];if(j<h)b=c+1;else if(j>h)e=c-1;else return c}return-(b+1)},"~A,~N");b.binarySearch=
c(b,"binarySearch",function(a,h){for(var b=0,e=a.length-1;b<=e;){var c=b+e>>1,j=a[c].compareTo(h);if(0>j)b=c+1;else if(0<j)e=c-1;else return c}return-(b+1)},"~A,~O");b.binarySearch=c(b,"binarySearch",function(a,h,b){if(null==b)return java.util.Arrays.binarySearch(a,h);for(var e=0,c=a.length-1;e<=c;){var j=e+c>>1,k=b.compare(a[j],h);if(0>k)e=j+1;else if(0<k)c=j-1;else return j}return-(e+1)},"~A,~O,java.util.Comparator");b.equals=c(b,"equals",function(a,h){if(a===h)return!0;if(null==a||null==h)return!1;
var b=a.length;if(h.length!=b)return!1;for(var e=0;e<b;e++){var c=a[e],j=h[e];if(!(null==c?null==j:null==c.equals?c==j:c.equals(j)))return!1}return!0},"~A,~A");b.sort=c(b,"sort",function(a,h,b,c){if(!(2>a.length)){var g=0,j=null,g=arguments.length,j=h,k=a,l=null;switch(g){case 1:j=null;case 2:h=0;b=a.length;break;case 3:c=null;case 4:j=c,0==h&&b==a.length?k=a:(k=a.slice(h,b),l=a)}java.util.Arrays.rangeCheck(a.length,h,b);null==j&&(j=java.util.Arrays.comp);c=j;k.sort(function(a,d){return c.compare(a,
d)});null!=l&&System.arraycopy(k,0,l,h,b)}},"~A,~N,~N,java.util.Comparator");var a=s(function(){this.a=null;r(this,arguments)},java.util.Arrays,"ArrayList",java.util.AbstractList,[java.util.RandomAccess,java.io.Serializable]);u(a,function(a){K(this,java.util.Arrays.ArrayList,[]);if(null==a)throw new NullPointerException;this.a=a},"~A");f(a,"size",function(){return this.a.length});c(a,"toArray",function(){return this.a.clone()});f(a,"get",function(a){return this.a[a]},"~N");f(a,"set",function(a,h){var b=
this.a[a];this.a[a]=h;return b},"~N,~O");f(a,"indexOf",function(a){if(null==a)for(var h=0;h<this.a.length;h++){if(null==this.a[h])return h}else for(h=0;h<this.a.length;h++)if(a.equals(this.a[h]))return h;return-1},"~O");f(a,"contains",function(a){return-1!=this.indexOf(a)},"~O");b.comp=null;b.comp={compare:function(a,h){return null==a?null==h?0:-1:null==h?1:"number"==typeof a?a-h:a.compareTo(h)}}});x("java.util.AbstractList $.AbstractMap $.AbstractSet $.Collection $.Enumeration $.Iterator $.List $.ListIterator $.Map $.RandomAccess $.Set $.SortedMap $.SortedSet java.lang.reflect.Array".split(" "),
"java.util.Collections",["java.util.ArrayList","$.Arrays","java.util.Map.Entry","java.util.Random"],function(){var b=G(java.util,"Collections",null);b.emptyEnumeration=c(b,"emptyEnumeration",function(){null==java.util.Collections.EMPTY_ENUMERATION&&(java.util.Collections.EMPTY_ENUMERATION=new java.util.Collections.EmptyEnumeration);return java.util.Collections.EMPTY_ENUMERATION});b.emptyIterator=c(b,"emptyIterator",function(){null==java.util.Collections.EMPTY_ITERATOR&&(java.util.Collections.EMPTY_ITERATOR=
new java.util.Collections.EmptyIterator);return java.util.Collections.EMPTY_ITERATOR});b.binarySearch=c(b,"binarySearch",function(a,h){if(null==a)throw new NullPointerException;if(a.isEmpty())return-1;if(!C(a,"java.util.RandomAccess")){for(var b=a.listIterator();b.hasNext();){var c;if(0>=(c=h.compareTo(b.next())))return 0==c?b.previousIndex():-b.previousIndex()-1}return-a.size()-1}var b=0,g=a.size(),j=g-1;for(c=-1;b<=j;)if(g=b+j>>1,0<(c=h.compareTo(a.get(g))))b=g+1;else{if(0==c)return g;j=g-1}return-g-
(0>c?1:2)},"java.util.List,~O");b.binarySearch=c(b,"binarySearch",function(a,h,b){if(null==b)return java.util.Collections.binarySearch(a,h);if(!C(a,"java.util.RandomAccess")){for(var c=a.listIterator();c.hasNext();){var g;if(0>=(g=b.compare(h,c.next())))return 0==g?c.previousIndex():-c.previousIndex()-1}return-a.size()-1}var c=0,j=a.size(),k=j-1;for(g=-1;c<=k;)if(j=c+k>>1,0<(g=b.compare(h,a.get(j))))c=j+1;else{if(0==g)return j;k=j-1}return-j-(0>g?1:2)},"java.util.List,~O,java.util.Comparator");b.copy=
c(b,"copy",function(a,h){if(a.size()<h.size())throw new ArrayIndexOutOfBoundsException;for(var b=h.iterator(),c=a.listIterator();b.hasNext();){try{c.next()}catch(g){if(E(g,"java.util.NoSuchElementException"))throw new ArrayIndexOutOfBoundsException;throw g;}c.set(b.next())}},"java.util.List,java.util.List");b.enumeration=c(b,"enumeration",function(a){return R("java.util.Collections$1")?0:java.util.Collections.$Collections$1$(),T(java.util.Collections$1,this,Ia("c",a))},"java.util.Collection");b.fill=
c(b,"fill",function(a,h){for(var b=a.listIterator();b.hasNext();)b.next(),b.set(h)},"java.util.List,~O");b.max=c(b,"max",function(a){a=a.iterator();for(var h=a.next();a.hasNext();){var b=a.next();0>h.compareTo(b)&&(h=b)}return h},"java.util.Collection");b.max=c(b,"max",function(a,h){for(var b=a.iterator(),c=b.next();b.hasNext();){var g=b.next();0>h.compare(c,g)&&(c=g)}return c},"java.util.Collection,java.util.Comparator");b.min=c(b,"min",function(a){a=a.iterator();for(var h=a.next();a.hasNext();){var b=
a.next();0<h.compareTo(b)&&(h=b)}return h},"java.util.Collection");b.min=c(b,"min",function(a,h){for(var b=a.iterator(),c=b.next();b.hasNext();){var g=b.next();0<h.compare(c,g)&&(c=g)}return c},"java.util.Collection,java.util.Comparator");b.nCopies=c(b,"nCopies",function(a,h){return new java.util.Collections.CopiesList(a,h)},"~N,~O");b.reverse=c(b,"reverse",function(a){var h=a.size(),b=a.listIterator();a=a.listIterator(h);for(var c=0;c<w(h/2);c++){var g=b.next(),j=a.previous();b.set(j);a.set(g)}},
"java.util.List");b.reverseOrder=c(b,"reverseOrder",function(){return new java.util.Collections.ReverseComparator});b.reverseOrder=c(b,"reverseOrder",function(a){return null==a?java.util.Collections.reverseOrder():new java.util.Collections.ReverseComparatorWithComparator(a)},"java.util.Comparator");b.shuffle=c(b,"shuffle",function(a){java.util.Collections.shuffle(a,new java.util.Random)},"java.util.List");b.shuffle=c(b,"shuffle",function(a,h){if(C(a,"java.util.RandomAccess"))for(c=a.size()-1;0<c;c--)g=
h.nextInt()%(c+1),0>g&&(g=-g),a.set(g,a.set(c,a.get(g)));else{for(var b=a.toArray(),c=b.length-1;0<c;c--){var g=h.nextInt()%(c+1);0>g&&(g=-g);var j=b[c];b[c]=b[g];b[g]=j}c=0;for(g=a.listIterator();g.hasNext();)g.next(),g.set(b[c++])}},"java.util.List,java.util.Random");b.singleton=c(b,"singleton",function(a){return new java.util.Collections.SingletonSet(a)},"~O");b.singletonList=c(b,"singletonList",function(a){return new java.util.Collections.SingletonList(a)},"~O");b.singletonMap=c(b,"singletonMap",
function(a,h){return new java.util.Collections.SingletonMap(a,h)},"~O,~O");b.sort=c(b,"sort",function(a){var h=a.toArray();java.util.Arrays.sort(h);var b=0;for(a=a.listIterator();a.hasNext();)a.next(),a.set(h[b++])},"java.util.List");b.sort=c(b,"sort",function(a,h){var b=a.toArray(Array(a.size()));java.util.Arrays.sort(b,h);for(var c=0,g=a.listIterator();g.hasNext();)g.next(),g.set(b[c++])},"java.util.List,java.util.Comparator");b.swap=c(b,"swap",function(a,h,b){if(null==a)throw new NullPointerException;
h!=b&&a.set(b,a.set(h,a.get(b)))},"java.util.List,~N,~N");b.replaceAll=c(b,"replaceAll",function(a,h,b){for(var c,g=!1;-1<(c=a.indexOf(h));)g=!0,a.set(c,b);return g},"java.util.List,~O,~O");b.rotate=c(b,"rotate",function(a,h){var b=a.size();if(0!=b){var c;c=0<h?h%b:b- -1*(h%b);if(!(0==c||c==b))if(C(a,"java.util.RandomAccess"))for(var g=a.get(0),j=0,k=0,l=0;l<b;l++)j=(j+c)%b,g=a.set(j,g),j==k&&(j=++k,g=a.get(k));else g=(b-c)%b,c=a.subList(0,g),b=a.subList(g,b),java.util.Collections.reverse(c),java.util.Collections.reverse(b),
java.util.Collections.reverse(a)}},"java.util.List,~N");b.indexOfSubList=c(b,"indexOfSubList",function(a,h){var b=a.size(),c=h.size();if(c>b)return-1;if(0==c)return 0;var g=h.get(0),j=a.indexOf(g);if(-1==j)return-1;for(;j<b&&b-j>=c;){var k=a.listIterator(j);if(null==g?null==k.next():g.equals(k.next())){for(var l=h.listIterator(1),f=!1;l.hasNext();){var n=l.next();if(!k.hasNext())return-1;if(null==n?null!=k.next():!n.equals(k.next())){f=!0;break}}if(!f)return j}j++}return-1},"java.util.List,java.util.List");
b.lastIndexOfSubList=c(b,"lastIndexOfSubList",function(a,h){var b=h.size(),c=a.size();if(b>c)return-1;if(0==b)return c;for(var c=h.get(b-1),g=a.lastIndexOf(c);-1<g&&g+1>=b;){var j=a.listIterator(g+1);if(null==c?null==j.previous():c.equals(j.previous())){for(var k=h.listIterator(b-1),l=!1;k.hasPrevious();){var f=k.previous();if(!j.hasPrevious())return-1;if(null==f?null!=j.previous():!f.equals(j.previous())){l=!0;break}}if(!l)return j.nextIndex()}g--}return-1},"java.util.List,java.util.List");b.list=
c(b,"list",function(a){for(var h=new java.util.ArrayList;a.hasMoreElements();)h.add(a.nextElement());return h},"java.util.Enumeration");b.synchronizedCollection=c(b,"synchronizedCollection",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedCollection(a)},"java.util.Collection");b.synchronizedList=c(b,"synchronizedList",function(a){if(null==a)throw new NullPointerException;return C(a,"java.util.RandomAccess")?new java.util.Collections.SynchronizedRandomAccessList(a):
new java.util.Collections.SynchronizedList(a)},"java.util.List");b.synchronizedMap=c(b,"synchronizedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedMap(a)},"java.util.Map");b.synchronizedSet=c(b,"synchronizedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSet(a)},"java.util.Set");b.synchronizedSortedMap=c(b,"synchronizedSortedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSortedMap(a)},
"java.util.SortedMap");b.synchronizedSortedSet=c(b,"synchronizedSortedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSortedSet(a)},"java.util.SortedSet");b.unmodifiableCollection=c(b,"unmodifiableCollection",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableCollection(a)},"java.util.Collection");b.unmodifiableList=c(b,"unmodifiableList",function(a){if(null==a)throw new NullPointerException;return C(a,
"java.util.RandomAccess")?new java.util.Collections.UnmodifiableRandomAccessList(a):new java.util.Collections.UnmodifiableList(a)},"java.util.List");b.unmodifiableMap=c(b,"unmodifiableMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableMap(a)},"java.util.Map");b.unmodifiableSet=c(b,"unmodifiableSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSet(a)},"java.util.Set");b.unmodifiableSortedMap=
c(b,"unmodifiableSortedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSortedMap(a)},"java.util.SortedMap");b.unmodifiableSortedSet=c(b,"unmodifiableSortedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSortedSet(a)},"java.util.SortedSet");b.frequency=c(b,"frequency",function(a,h){if(null==a)throw new NullPointerException;if(a.isEmpty())return 0;for(var b=0,c=a.iterator();c.hasNext();){var g=
c.next();(null==h?null==g:h.equals(g))&&b++}return b},"java.util.Collection,~O");b.emptyList=c(b,"emptyList",function(){return java.util.Collections.EMPTY_LIST});b.emptySet=c(b,"emptySet",function(){return java.util.Collections.EMPTY_SET});b.emptyMap=c(b,"emptyMap",function(){return java.util.Collections.EMPTY_MAP});b.checkedCollection=c(b,"checkedCollection",function(a,h){return new java.util.Collections.CheckedCollection(a,h)},"java.util.Collection,Class");b.checkedMap=c(b,"checkedMap",function(a,
h,b){return new java.util.Collections.CheckedMap(a,h,b)},"java.util.Map,Class,Class");b.checkedList=c(b,"checkedList",function(a,h){return C(a,"java.util.RandomAccess")?new java.util.Collections.CheckedRandomAccessList(a,h):new java.util.Collections.CheckedList(a,h)},"java.util.List,Class");b.checkedSet=c(b,"checkedSet",function(a,h){return new java.util.Collections.CheckedSet(a,h)},"java.util.Set,Class");b.checkedSortedMap=c(b,"checkedSortedMap",function(a,h,b){return new java.util.Collections.CheckedSortedMap(a,
h,b)},"java.util.SortedMap,Class,Class");b.checkedSortedSet=c(b,"checkedSortedSet",function(a,h){return new java.util.Collections.CheckedSortedSet(a,h)},"java.util.SortedSet,Class");b.addAll=c(b,"addAll",function(a,h){for(var b=!1,c=0;c<h.length;c++)b=(new Boolean(b|a.add(h[c]))).valueOf();return b},"java.util.Collection,~A");b.disjoint=c(b,"disjoint",function(a,h){if(C(a,"java.util.Set")&&!C(h,"java.util.Set")||h.size()>a.size()){var b=a;a=h;h=b}for(b=a.iterator();b.hasNext();)if(h.contains(b.next()))return!1;
return!0},"java.util.Collection,java.util.Collection");b.checkType=c(b,"checkType",function(a,h){if(!h.isInstance(a))throw new ClassCastException("Attempt to insert "+a.getClass()+" element into collection with element type "+h);return a},"~O,Class");b.$Collections$1$=function(){var a=s(function(){fa(this,arguments);this.it=null;r(this,arguments)},java.util,"Collections$1",null,java.util.Enumeration);N(a,function(){this.it=this.f$.c.iterator()});c(a,"hasMoreElements",function(){return this.it.hasNext()});
c(a,"nextElement",function(){return this.it.next()})};var a=G(java.util.Collections,"EmptyEnumeration",null,java.util.Enumeration);f(a,"hasMoreElements",function(){return!1});f(a,"nextElement",function(){throw new java.util.NoSuchElementException;});a=G(java.util.Collections,"EmptyIterator",null,java.util.Iterator);f(a,"hasNext",function(){return!1});f(a,"next",function(){throw new java.util.NoSuchElementException;});f(a,"remove",function(){throw new IllegalStateException;});a=s(function(){this.n=
0;this.element=null;r(this,arguments)},java.util.Collections,"CopiesList",java.util.AbstractList,java.io.Serializable);u(a,function(a,h){K(this,java.util.Collections.CopiesList,[]);if(0>a)throw new IllegalArgumentException;this.n=a;this.element=h},"~N,~O");f(a,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");f(a,"size",function(){return this.n});f(a,"get",function(a){if(0<=a&&a<this.n)return this.element;throw new IndexOutOfBoundsException;},"~N");a=G(java.util.Collections,
"EmptyList",java.util.AbstractList,java.io.Serializable);f(a,"contains",function(){return!1},"~O");f(a,"size",function(){return 0});f(a,"get",function(){throw new IndexOutOfBoundsException;},"~N");a=G(java.util.Collections,"EmptySet",java.util.AbstractSet,java.io.Serializable);f(a,"contains",function(){return!1},"~O");f(a,"size",function(){return 0});f(a,"iterator",function(){return R("java.util.Collections$EmptySet$1")?0:java.util.Collections.EmptySet.$Collections$EmptySet$1$(),T(java.util.Collections$EmptySet$1,
this,null)});a.$Collections$EmptySet$1$=function(){var a=Y(java.util,"Collections$EmptySet$1",null,java.util.Iterator);f(a,"hasNext",function(){return!1});f(a,"next",function(){throw new java.util.NoSuchElementException;});f(a,"remove",function(){throw new UnsupportedOperationException;})};a=G(java.util.Collections,"EmptyMap",java.util.AbstractMap,java.io.Serializable);f(a,"containsKey",function(){return!1},"~O");f(a,"containsValue",function(){return!1},"~O");f(a,"entrySet",function(){return java.util.Collections.EMPTY_SET});
f(a,"get",function(){return null},"~O");f(a,"keySet",function(){return java.util.Collections.EMPTY_SET});f(a,"values",function(){return java.util.Collections.EMPTY_LIST});a=G(java.util.Collections,"ReverseComparator",null,[java.util.Comparator,java.io.Serializable]);f(a,"compare",function(a,h){return h.compareTo(a)},"~O,~O");a=s(function(){this.comparator=null;r(this,arguments)},java.util.Collections,"ReverseComparatorWithComparator",null,[java.util.Comparator,java.io.Serializable]);u(a,function(a){this.comparator=
a},"java.util.Comparator");c(a,"compare",function(a,h){return this.comparator.compare(h,a)},"~O,~O");a=s(function(){this.element=null;r(this,arguments)},java.util.Collections,"SingletonSet",java.util.AbstractSet,java.io.Serializable);u(a,function(a){K(this,java.util.Collections.SingletonSet,[]);this.element=a},"~O");f(a,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");f(a,"size",function(){return 1});f(a,"iterator",function(){return R("java.util.Collections$SingletonSet$1")?
0:java.util.Collections.SingletonSet.$Collections$SingletonSet$1$(),T(java.util.Collections$SingletonSet$1,this,null)});a.$Collections$SingletonSet$1$=function(){var a=s(function(){fa(this,arguments);this.$hasNext=!0;r(this,arguments)},java.util,"Collections$SingletonSet$1",null,java.util.Iterator);f(a,"hasNext",function(){return this.$hasNext});f(a,"next",function(){if(this.$hasNext)return this.$hasNext=!1,this.b$["java.util.Collections.SingletonSet"].element;throw new java.util.NoSuchElementException;
});f(a,"remove",function(){throw new UnsupportedOperationException;})};a=s(function(){this.element=null;r(this,arguments)},java.util.Collections,"SingletonList",java.util.AbstractList,java.io.Serializable);u(a,function(a){K(this,java.util.Collections.SingletonList,[]);this.element=a},"~O");f(a,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");f(a,"get",function(a){if(0==a)return this.element;throw new IndexOutOfBoundsException;},"~N");f(a,"size",function(){return 1});
a=s(function(){this.v=this.k=null;r(this,arguments)},java.util.Collections,"SingletonMap",java.util.AbstractMap,java.io.Serializable);u(a,function(a,h){K(this,java.util.Collections.SingletonMap,[]);this.k=a;this.v=h},"~O,~O");f(a,"containsKey",function(a){return null==this.k?null==a:this.k.equals(a)},"~O");f(a,"containsValue",function(a){return null==this.v?null==a:this.v.equals(a)},"~O");f(a,"get",function(a){return this.containsKey(a)?this.v:null},"~O");f(a,"size",function(){return 1});f(a,"entrySet",
function(){return R("java.util.Collections$SingletonMap$1")?0:java.util.Collections.SingletonMap.$Collections$SingletonMap$1$(),T(java.util.Collections$SingletonMap$1,this,null)});a.$Collections$SingletonMap$1$=function(){var a=Y(java.util,"Collections$SingletonMap$1",java.util.AbstractSet);f(a,"contains",function(a){return C(a,"java.util.Map.Entry")?this.b$["java.util.Collections.SingletonMap"].containsKey(a.getKey())&&this.b$["java.util.Collections.SingletonMap"].containsValue(a.getValue()):!1},
"~O");f(a,"size",function(){return 1});f(a,"iterator",function(){return R("java.util.Collections$SingletonMap$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$(),T(java.util.Collections$SingletonMap$1$1,this,null)})};a.$Collections$SingletonMap$1$1$=function(){var a=s(function(){fa(this,arguments);this.$hasNext=!0;r(this,arguments)},java.util,"Collections$SingletonMap$1$1",null,java.util.Iterator);f(a,"hasNext",function(){return this.$hasNext});f(a,"next",function(){if(this.$hasNext)return this.$hasNext=
!1,R("java.util.Collections$SingletonMap$1$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$1$(),T(java.util.Collections$SingletonMap$1$1$1,this,null);throw new java.util.NoSuchElementException;});f(a,"remove",function(){throw new UnsupportedOperationException;})};a.$Collections$SingletonMap$1$1$1$=function(){var a=Y(java.util,"Collections$SingletonMap$1$1$1",null,java.util.Map.Entry);f(a,"equals",function(a){return this.b$["java.util.Collections$SingletonMap$1"].contains(a)},"~O");f(a,
"getKey",function(){return this.b$["java.util.Collections.SingletonMap"].k});f(a,"getValue",function(){return this.b$["java.util.Collections.SingletonMap"].v});f(a,"hashCode",function(){return(null==this.b$["java.util.Collections.SingletonMap"].k?0:this.b$["java.util.Collections.SingletonMap"].k.hashCode())^(null==this.b$["java.util.Collections.SingletonMap"].v?0:this.b$["java.util.Collections.SingletonMap"].v.hashCode())});f(a,"setValue",function(){throw new UnsupportedOperationException;},"~O")};
a=s(function(){this.mutex=this.c=null;r(this,arguments)},java.util.Collections,"SynchronizedCollection",null,[java.util.Collection,java.io.Serializable]);u(a,function(a){this.c=a;this.mutex=this},"java.util.Collection");u(a,function(a,h){this.c=a;this.mutex=h},"java.util.Collection,~O");c(a,"add",function(a){return this.c.add(a)},"~O");c(a,"addAll",function(a){return this.c.addAll(a)},"java.util.Collection");c(a,"clear",function(){this.c.clear()});c(a,"contains",function(a){return this.c.contains(a)},
"~O");c(a,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");c(a,"isEmpty",function(){return this.c.isEmpty()});c(a,"iterator",function(){return this.c.iterator()});c(a,"remove",function(a){return this.c.remove(a)},"~O");c(a,"removeAll",function(a){return this.c.removeAll(a)},"java.util.Collection");c(a,"retainAll",function(a){return this.c.retainAll(a)},"java.util.Collection");c(a,"size",function(){return this.c.size()});c(a,"toArray",function(){return this.c.toArray()});
c(a,"toString",function(){return this.c.toString()});c(a,"toArray",function(a){return this.c.toArray(a)},"~A");a=G(java.util.Collections,"SynchronizedRandomAccessList",java.util.Collections.SynchronizedList,java.util.RandomAccess);f(a,"subList",function(a,h){return new java.util.Collections.SynchronizedRandomAccessList(this.list.subList(a,h),this.mutex)},"~N,~N");a=s(function(){this.list=null;r(this,arguments)},java.util.Collections,"SynchronizedList",java.util.Collections.SynchronizedCollection,
java.util.List);u(a,function(a){K(this,java.util.Collections.SynchronizedList,[a]);this.list=a},"java.util.List");u(a,function(a,h){K(this,java.util.Collections.SynchronizedList,[a,h]);this.list=a},"java.util.List,~O");c(a,"add",function(a,h){this.list.add(a,h)},"~N,~O");c(a,"addAll",function(a,h){return this.list.addAll(a,h)},"~N,java.util.Collection");c(a,"equals",function(a){return this.list.equals(a)},"~O");c(a,"get",function(a){return this.list.get(a)},"~N");c(a,"hashCode",function(){return this.list.hashCode()});
c(a,"indexOf",function(a){return this.list.indexOf(a)},"~O");c(a,"lastIndexOf",function(a){return this.list.lastIndexOf(a)},"~O");c(a,"listIterator",function(){return this.list.listIterator()});c(a,"listIterator",function(a){return this.list.listIterator(a)},"~N");c(a,"remove",function(a){return this.list.remove(a)},"~N");c(a,"set",function(a,h){return this.list.set(a,h)},"~N,~O");c(a,"subList",function(a,h){return new java.util.Collections.SynchronizedList(this.list.subList(a,h),this.mutex)},"~N,~N");
a=s(function(){this.mutex=this.m=null;r(this,arguments)},java.util.Collections,"SynchronizedMap",null,[java.util.Map,java.io.Serializable]);u(a,function(a){this.m=a;this.mutex=this},"java.util.Map");u(a,function(a,h){this.m=a;this.mutex=h},"java.util.Map,~O");c(a,"clear",function(){this.m.clear()});c(a,"containsKey",function(a){return this.m.containsKey(a)},"~O");c(a,"containsValue",function(a){return this.m.containsValue(a)},"~O");c(a,"entrySet",function(){return new java.util.Collections.SynchronizedSet(this.m.entrySet(),
this.mutex)});c(a,"equals",function(a){return this.m.equals(a)},"~O");c(a,"get",function(a){return this.m.get(a)},"~O");c(a,"hashCode",function(){return this.m.hashCode()});c(a,"isEmpty",function(){return this.m.isEmpty()});c(a,"keySet",function(){return new java.util.Collections.SynchronizedSet(this.m.keySet(),this.mutex)});c(a,"put",function(a,h){return this.m.put(a,h)},"~O,~O");c(a,"putAll",function(a){this.m.putAll(a)},"java.util.Map");c(a,"remove",function(a){return this.m.remove(a)},"~O");c(a,
"size",function(){return this.m.size()});c(a,"values",function(){return new java.util.Collections.SynchronizedCollection(this.m.values(),this.mutex)});c(a,"toString",function(){return this.m.toString()});a=G(java.util.Collections,"SynchronizedSet",java.util.Collections.SynchronizedCollection,java.util.Set);f(a,"equals",function(a){return this.c.equals(a)},"~O");f(a,"hashCode",function(){return this.c.hashCode()});a=s(function(){this.sm=null;r(this,arguments)},java.util.Collections,"SynchronizedSortedMap",
java.util.Collections.SynchronizedMap,java.util.SortedMap);u(a,function(a){K(this,java.util.Collections.SynchronizedSortedMap,[a]);this.sm=a},"java.util.SortedMap");u(a,function(a,h){K(this,java.util.Collections.SynchronizedSortedMap,[a,h]);this.sm=a},"java.util.SortedMap,~O");c(a,"comparator",function(){return this.sm.comparator()});c(a,"firstKey",function(){return this.sm.firstKey()});c(a,"headMap",function(a){return new java.util.Collections.SynchronizedSortedMap(this.sm.headMap(a),this.mutex)},
"~O");c(a,"lastKey",function(){return this.sm.lastKey()});c(a,"subMap",function(a,h){return new java.util.Collections.SynchronizedSortedMap(this.sm.subMap(a,h),this.mutex)},"~O,~O");c(a,"tailMap",function(a){return new java.util.Collections.SynchronizedSortedMap(this.sm.tailMap(a),this.mutex)},"~O");a=s(function(){this.ss=null;r(this,arguments)},java.util.Collections,"SynchronizedSortedSet",java.util.Collections.SynchronizedSet,java.util.SortedSet);u(a,function(a){K(this,java.util.Collections.SynchronizedSortedSet,
[a]);this.ss=a},"java.util.SortedSet");u(a,function(a,h){K(this,java.util.Collections.SynchronizedSortedSet,[a,h]);this.ss=a},"java.util.SortedSet,~O");c(a,"comparator",function(){return this.ss.comparator()});c(a,"first",function(){return this.ss.first()});c(a,"headSet",function(a){return new java.util.Collections.SynchronizedSortedSet(this.ss.headSet(a),this.mutex)},"~O");c(a,"last",function(){return this.ss.last()});c(a,"subSet",function(a,h){return new java.util.Collections.SynchronizedSortedSet(this.ss.subSet(a,
h),this.mutex)},"~O,~O");c(a,"tailSet",function(a){return new java.util.Collections.SynchronizedSortedSet(this.ss.tailSet(a),this.mutex)},"~O");a=s(function(){this.c=null;r(this,arguments)},java.util.Collections,"UnmodifiableCollection",null,[java.util.Collection,java.io.Serializable]);u(a,function(a){this.c=a},"java.util.Collection");f(a,"add",function(){throw new UnsupportedOperationException;},"~O");f(a,"addAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");f(a,"clear",
function(){throw new UnsupportedOperationException;});c(a,"contains",function(a){return this.c.contains(a)},"~O");c(a,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");c(a,"isEmpty",function(){return this.c.isEmpty()});c(a,"iterator",function(){return R("java.util.Collections$UnmodifiableCollection$1")?0:java.util.Collections.UnmodifiableCollection.$Collections$UnmodifiableCollection$1$(),T(java.util.Collections$UnmodifiableCollection$1,this,null)});f(a,"remove",function(){throw new UnsupportedOperationException;
},"~O");f(a,"removeAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");f(a,"retainAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");c(a,"size",function(){return this.c.size()});c(a,"toArray",function(){return this.c.toArray()});c(a,"toArray",function(a){return this.c.toArray(a)},"~A");c(a,"toString",function(){return this.c.toString()});a.$Collections$UnmodifiableCollection$1$=function(){var a=s(function(){fa(this,arguments);this.iterator=
null;r(this,arguments)},java.util,"Collections$UnmodifiableCollection$1",null,java.util.Iterator);N(a,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableCollection"].c.iterator()});c(a,"hasNext",function(){return this.iterator.hasNext()});c(a,"next",function(){return this.iterator.next()});f(a,"remove",function(){throw new UnsupportedOperationException;})};a=G(java.util.Collections,"UnmodifiableRandomAccessList",java.util.Collections.UnmodifiableList,java.util.RandomAccess);f(a,"subList",
function(a,h){return new java.util.Collections.UnmodifiableRandomAccessList(this.list.subList(a,h))},"~N,~N");a=s(function(){this.list=null;r(this,arguments)},java.util.Collections,"UnmodifiableList",java.util.Collections.UnmodifiableCollection,java.util.List);u(a,function(a){K(this,java.util.Collections.UnmodifiableList,[a]);this.list=a},"java.util.List");c(a,"add",function(){throw new UnsupportedOperationException;},"~N,~O");c(a,"addAll",function(){throw new UnsupportedOperationException;},"~N,java.util.Collection");
c(a,"equals",function(a){return this.list.equals(a)},"~O");c(a,"get",function(a){return this.list.get(a)},"~N");c(a,"hashCode",function(){return this.list.hashCode()});c(a,"indexOf",function(a){return this.list.indexOf(a)},"~O");c(a,"lastIndexOf",function(a){return this.list.lastIndexOf(a)},"~O");c(a,"listIterator",function(){return this.listIterator(0)});c(a,"listIterator",function(a){return R("java.util.Collections$UnmodifiableList$1")?0:java.util.Collections.UnmodifiableList.$Collections$UnmodifiableList$1$(),
T(java.util.Collections$UnmodifiableList$1,this,Ia("location",a))},"~N");c(a,"remove",function(){throw new UnsupportedOperationException;},"~N");f(a,"set",function(){throw new UnsupportedOperationException;},"~N,~O");c(a,"subList",function(a,h){return new java.util.Collections.UnmodifiableList(this.list.subList(a,h))},"~N,~N");a.$Collections$UnmodifiableList$1$=function(){var a=s(function(){fa(this,arguments);this.iterator=null;r(this,arguments)},java.util,"Collections$UnmodifiableList$1",null,java.util.ListIterator);
N(a,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableList"].list.listIterator(this.f$.location)});f(a,"add",function(){throw new UnsupportedOperationException;},"~O");c(a,"hasNext",function(){return this.iterator.hasNext()});c(a,"hasPrevious",function(){return this.iterator.hasPrevious()});c(a,"next",function(){return this.iterator.next()});c(a,"nextIndex",function(){return this.iterator.nextIndex()});c(a,"previous",function(){return this.iterator.previous()});c(a,"previousIndex",
function(){return this.iterator.previousIndex()});f(a,"remove",function(){throw new UnsupportedOperationException;});f(a,"set",function(){throw new UnsupportedOperationException;},"~O")};a=s(function(){this.m=null;r(this,arguments)},java.util.Collections,"UnmodifiableMap",null,[java.util.Map,java.io.Serializable]);u(a,function(a){this.m=a},"java.util.Map");f(a,"clear",function(){throw new UnsupportedOperationException;});c(a,"containsKey",function(a){return this.m.containsKey(a)},"~O");c(a,"containsValue",
function(a){return this.m.containsValue(a)},"~O");c(a,"entrySet",function(){return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet(this.m.entrySet())});c(a,"equals",function(a){return this.m.equals(a)},"~O");c(a,"get",function(a){return this.m.get(a)},"~O");c(a,"hashCode",function(){return this.m.hashCode()});c(a,"isEmpty",function(){return this.m.isEmpty()});c(a,"keySet",function(){return new java.util.Collections.UnmodifiableSet(this.m.keySet())});f(a,"put",function(){throw new UnsupportedOperationException;
},"~O,~O");f(a,"putAll",function(){throw new UnsupportedOperationException;},"java.util.Map");f(a,"remove",function(){throw new UnsupportedOperationException;},"~O");c(a,"size",function(){return this.m.size()});c(a,"values",function(){return new java.util.Collections.UnmodifiableCollection(this.m.values())});c(a,"toString",function(){return this.m.toString()});a=G(java.util.Collections.UnmodifiableMap,"UnmodifiableEntrySet",java.util.Collections.UnmodifiableSet);f(a,"iterator",function(){return R("java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1")?
0:java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$(),T(java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1,this,null)});c(a,"toArray",function(){for(var a=this.c.size(),h=Array(a),b=this.iterator();0<=--a;)h[a]=b.next();return h});c(a,"toArray",function(a){var h=this.c.size(),b=0,c=this.iterator();h>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,h));for(;b<h;)a[b++]=c.next();b<a.length&&(a[b]=
null);return a},"~A");a.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$=function(){var a=s(function(){fa(this,arguments);this.iterator=null;r(this,arguments)},java.util,"Collections$UnmodifiableMap$UnmodifiableEntrySet$1",null,java.util.Iterator);N(a,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet"].c.iterator()});c(a,"hasNext",function(){return this.iterator.hasNext()});c(a,"next",function(){return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableMapEntry(this.iterator.next())});
f(a,"remove",function(){throw new UnsupportedOperationException;})};a=s(function(){this.mapEntry=null;r(this,arguments)},java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet,"UnmodifiableMapEntry",null,java.util.Map.Entry);u(a,function(a){this.mapEntry=a},"java.util.Map.Entry");c(a,"equals",function(a){return this.mapEntry.equals(a)},"~O");c(a,"getKey",function(){return this.mapEntry.getKey()});c(a,"getValue",function(){return this.mapEntry.getValue()});c(a,"hashCode",function(){return this.mapEntry.hashCode()});
f(a,"setValue",function(){throw new UnsupportedOperationException;},"~O");c(a,"toString",function(){return this.mapEntry.toString()});a=G(java.util.Collections,"UnmodifiableSet",java.util.Collections.UnmodifiableCollection,java.util.Set);f(a,"equals",function(a){return this.c.equals(a)},"~O");f(a,"hashCode",function(){return this.c.hashCode()});a=s(function(){this.sm=null;r(this,arguments)},java.util.Collections,"UnmodifiableSortedMap",java.util.Collections.UnmodifiableMap,java.util.SortedMap);u(a,
function(a){K(this,java.util.Collections.UnmodifiableSortedMap,[a]);this.sm=a},"java.util.SortedMap");c(a,"comparator",function(){return this.sm.comparator()});c(a,"firstKey",function(){return this.sm.firstKey()});c(a,"headMap",function(a){return new java.util.Collections.UnmodifiableSortedMap(this.sm.headMap(a))},"~O");c(a,"lastKey",function(){return this.sm.lastKey()});c(a,"subMap",function(a,h){return new java.util.Collections.UnmodifiableSortedMap(this.sm.subMap(a,h))},"~O,~O");c(a,"tailMap",
function(a){return new java.util.Collections.UnmodifiableSortedMap(this.sm.tailMap(a))},"~O");a=s(function(){this.ss=null;r(this,arguments)},java.util.Collections,"UnmodifiableSortedSet",java.util.Collections.UnmodifiableSet,java.util.SortedSet);u(a,function(a){K(this,java.util.Collections.UnmodifiableSortedSet,[a]);this.ss=a},"java.util.SortedSet");c(a,"comparator",function(){return this.ss.comparator()});c(a,"first",function(){return this.ss.first()});c(a,"headSet",function(a){return new java.util.Collections.UnmodifiableSortedSet(this.ss.headSet(a))},
"~O");c(a,"last",function(){return this.ss.last()});c(a,"subSet",function(a,h){return new java.util.Collections.UnmodifiableSortedSet(this.ss.subSet(a,h))},"~O,~O");c(a,"tailSet",function(a){return new java.util.Collections.UnmodifiableSortedSet(this.ss.tailSet(a))},"~O");a=s(function(){this.type=this.c=null;r(this,arguments)},java.util.Collections,"CheckedCollection",null,[java.util.Collection,java.io.Serializable]);u(a,function(a,h){if(null==a||null==h)throw new NullPointerException;this.c=a;this.type=
h},"java.util.Collection,Class");c(a,"size",function(){return this.c.size()});c(a,"isEmpty",function(){return this.c.isEmpty()});c(a,"contains",function(a){return this.c.contains(a)},"~O");c(a,"iterator",function(){var a=this.c.iterator();C(a,"java.util.ListIterator")&&(a=new java.util.Collections.CheckedListIterator(a,this.type));return a});c(a,"toArray",function(){return this.c.toArray()});c(a,"toArray",function(a){return this.c.toArray(a)},"~A");c(a,"add",function(a){return this.c.add(java.util.Collections.checkType(a,
this.type))},"~O");c(a,"remove",function(a){return this.c.remove(a)},"~O");c(a,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");f(a,"addAll",function(a){var h=a.size();if(0==h)return!1;var b=Array(h),c=a.iterator();for(a=0;a<h;a++)b[a]=java.util.Collections.checkType(c.next(),this.type);c=!1;for(a=0;a<h;a++)c=(new Boolean(c|this.c.add(b[a]))).valueOf();return c},"java.util.Collection");c(a,"removeAll",function(a){return this.c.removeAll(a)},"java.util.Collection");c(a,
"retainAll",function(a){return this.c.retainAll(a)},"java.util.Collection");c(a,"clear",function(){this.c.clear()});c(a,"toString",function(){return this.c.toString()});a=s(function(){this.type=this.i=null;r(this,arguments)},java.util.Collections,"CheckedListIterator",null,java.util.ListIterator);u(a,function(a,h){this.i=a;this.type=h},"java.util.ListIterator,Class");c(a,"hasNext",function(){return this.i.hasNext()});c(a,"next",function(){return this.i.next()});c(a,"remove",function(){this.i.remove()});
c(a,"hasPrevious",function(){return this.i.hasPrevious()});c(a,"previous",function(){return this.i.previous()});c(a,"nextIndex",function(){return this.i.nextIndex()});c(a,"previousIndex",function(){return this.i.previousIndex()});c(a,"set",function(a){this.i.set(java.util.Collections.checkType(a,this.type))},"~O");c(a,"add",function(a){this.i.add(java.util.Collections.checkType(a,this.type))},"~O");a=s(function(){this.l=null;r(this,arguments)},java.util.Collections,"CheckedList",java.util.Collections.CheckedCollection,
java.util.List);u(a,function(a,h){K(this,java.util.Collections.CheckedList,[a,h]);this.l=a},"java.util.List,Class");c(a,"addAll",function(a,h){var b=h.size();if(0==b)return!1;for(var c=Array(b),g=h.iterator(),j=0;j<b;j++)c[j]=java.util.Collections.checkType(g.next(),this.type);return this.l.addAll(a,java.util.Arrays.asList(c))},"~N,java.util.Collection");c(a,"get",function(a){return this.l.get(a)},"~N");c(a,"set",function(a,h){return this.l.set(a,java.util.Collections.checkType(h,this.type))},"~N,~O");
c(a,"add",function(a,h){this.l.add(a,java.util.Collections.checkType(h,this.type))},"~N,~O");c(a,"remove",function(a){return this.l.remove(a)},"~N");c(a,"indexOf",function(a){return this.l.indexOf(a)},"~O");c(a,"lastIndexOf",function(a){return this.l.lastIndexOf(a)},"~O");c(a,"listIterator",function(){return new java.util.Collections.CheckedListIterator(this.l.listIterator(),this.type)});c(a,"listIterator",function(a){return new java.util.Collections.CheckedListIterator(this.l.listIterator(a),this.type)},
"~N");c(a,"subList",function(a,h){return java.util.Collections.checkedList(this.l.subList(a,h),this.type)},"~N,~N");c(a,"equals",function(a){return this.l.equals(a)},"~O");c(a,"hashCode",function(){return this.l.hashCode()});G(java.util.Collections,"CheckedRandomAccessList",java.util.Collections.CheckedList,java.util.RandomAccess);a=G(java.util.Collections,"CheckedSet",java.util.Collections.CheckedCollection,java.util.Set);f(a,"equals",function(a){return this.c.equals(a)},"~O");f(a,"hashCode",function(){return this.c.hashCode()});
a=s(function(){this.valueType=this.keyType=this.m=null;r(this,arguments)},java.util.Collections,"CheckedMap",null,[java.util.Map,java.io.Serializable]);u(a,function(a,h,b){if(null==a||null==h||null==b)throw new NullPointerException;this.m=a;this.keyType=h;this.valueType=b},"java.util.Map,Class,Class");c(a,"size",function(){return this.m.size()});c(a,"isEmpty",function(){return this.m.isEmpty()});c(a,"containsKey",function(a){return this.m.containsKey(a)},"~O");c(a,"containsValue",function(a){return this.m.containsValue(a)},
"~O");c(a,"get",function(a){return this.m.get(a)},"~O");c(a,"put",function(a,h){return this.m.put(java.util.Collections.checkType(a,this.keyType),java.util.Collections.checkType(h,this.valueType))},"~O,~O");c(a,"remove",function(a){return this.m.remove(a)},"~O");f(a,"putAll",function(a){var h=a.size();if(0!=h){var b=Array(h);a=a.entrySet().iterator();for(var c=0;c<h;c++){var g=a.next();java.util.Collections.checkType(g.getKey(),this.keyType);java.util.Collections.checkType(g.getValue(),this.valueType);
b[c]=g}for(c=0;c<h;c++)this.m.put(b[c].getKey(),b[c].getValue())}},"java.util.Map");c(a,"clear",function(){this.m.clear()});c(a,"keySet",function(){return this.m.keySet()});c(a,"values",function(){return this.m.values()});c(a,"entrySet",function(){return new java.util.Collections.CheckedMap.CheckedEntrySet(this.m.entrySet(),this.valueType)});c(a,"equals",function(a){return this.m.equals(a)},"~O");c(a,"hashCode",function(){return this.m.hashCode()});c(a,"toString",function(){return this.m.toString()});
a=s(function(){this.valueType=this.e=null;r(this,arguments)},java.util.Collections.CheckedMap,"CheckedEntry",null,java.util.Map.Entry);u(a,function(a,h){if(null==a)throw new NullPointerException;this.e=a;this.valueType=h},"java.util.Map.Entry,Class");c(a,"getKey",function(){return this.e.getKey()});c(a,"getValue",function(){return this.e.getValue()});c(a,"setValue",function(a){return this.e.setValue(java.util.Collections.checkType(a,this.valueType))},"~O");c(a,"equals",function(a){return this.e.equals(a)},
"~O");c(a,"hashCode",function(){return this.e.hashCode()});a=s(function(){this.valueType=this.s=null;r(this,arguments)},java.util.Collections.CheckedMap,"CheckedEntrySet",null,java.util.Set);u(a,function(a,h){this.s=a;this.valueType=h},"java.util.Set,Class");c(a,"iterator",function(){return new java.util.Collections.CheckedMap.CheckedEntrySet.CheckedEntryIterator(this.s.iterator(),this.valueType)});c(a,"toArray",function(){for(var a=this.size(),h=Array(a),b=this.iterator(),c=0;c<a;c++)h[c]=b.next();
return h});c(a,"toArray",function(a){var h=this.size();a.length<h&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,h));for(var b=this.iterator(),c=0;c<h;c++)a[c]=b.next();h<a.length&&(a[h]=null);return a},"~A");c(a,"retainAll",function(a){return this.s.retainAll(a)},"java.util.Collection");c(a,"removeAll",function(a){return this.s.removeAll(a)},"java.util.Collection");c(a,"containsAll",function(a){return this.s.containsAll(a)},"java.util.Collection");f(a,"addAll",function(){throw new UnsupportedOperationException;
},"java.util.Collection");c(a,"remove",function(a){return this.s.remove(a)},"~O");c(a,"contains",function(a){return this.s.contains(a)},"~O");f(a,"add",function(){throw new UnsupportedOperationException;},"java.util.Map.Entry");c(a,"isEmpty",function(){return this.s.isEmpty()});c(a,"clear",function(){this.s.clear()});c(a,"size",function(){return this.s.size()});c(a,"hashCode",function(){return this.s.hashCode()});c(a,"equals",function(a){return this.s.equals(a)},"~O");a=s(function(){this.valueType=
this.i=null;r(this,arguments)},java.util.Collections.CheckedMap.CheckedEntrySet,"CheckedEntryIterator",null,java.util.Iterator);u(a,function(a,h){this.i=a;this.valueType=h},"java.util.Iterator,Class");c(a,"hasNext",function(){return this.i.hasNext()});c(a,"remove",function(){this.i.remove()});c(a,"next",function(){return new java.util.Collections.CheckedMap.CheckedEntry(this.i.next(),this.valueType)});a=s(function(){this.ss=null;r(this,arguments)},java.util.Collections,"CheckedSortedSet",java.util.Collections.CheckedSet,
java.util.SortedSet);u(a,function(a,h){K(this,java.util.Collections.CheckedSortedSet,[a,h]);this.ss=a},"java.util.SortedSet,Class");c(a,"comparator",function(){return this.ss.comparator()});c(a,"subSet",function(a,h){return new java.util.Collections.CheckedSortedSet(this.ss.subSet(a,h),this.type)},"~O,~O");c(a,"headSet",function(a){return new java.util.Collections.CheckedSortedSet(this.ss.headSet(a),this.type)},"~O");c(a,"tailSet",function(a){return new java.util.Collections.CheckedSortedSet(this.ss.tailSet(a),
this.type)},"~O");c(a,"first",function(){return this.ss.first()});c(a,"last",function(){return this.ss.last()});a=s(function(){this.sm=null;r(this,arguments)},java.util.Collections,"CheckedSortedMap",java.util.Collections.CheckedMap,java.util.SortedMap);u(a,function(a,h,b){K(this,java.util.Collections.CheckedSortedMap,[a,h,b]);this.sm=a},"java.util.SortedMap,Class,Class");c(a,"comparator",function(){return this.sm.comparator()});c(a,"subMap",function(a,h){return new java.util.Collections.CheckedSortedMap(this.sm.subMap(a,
h),this.keyType,this.valueType)},"~O,~O");c(a,"headMap",function(a){return new java.util.Collections.CheckedSortedMap(this.sm.headMap(a),this.keyType,this.valueType)},"~O");c(a,"tailMap",function(a){return new java.util.Collections.CheckedSortedMap(this.sm.tailMap(a),this.keyType,this.valueType)},"~O");c(a,"firstKey",function(){return this.sm.firstKey()});c(a,"lastKey",function(){return this.sm.lastKey()});b.EMPTY_ENUMERATION=null;b.EMPTY_ITERATOR=null;b.EMPTY_LIST=new java.util.Collections.EmptyList;
b.EMPTY_SET=new java.util.Collections.EmptySet;b.EMPTY_MAP=new java.util.Collections.EmptyMap});G(java.util,"Dictionary",null);x("java.util.AbstractCollection $.AbstractSet $.Dictionary $.Enumeration $.Iterator $.Map".split(" "),"java.util.Hashtable",["java.util.Collections"],function(){var b=s(function(){this.table=null;this.modCount=this.loadFactor=this.threshold=this.count=0;this.__m=this.$values=this.$entrySet=this.$keySet=null;this.__allowJS=!1;r(this,arguments)},java.util,"Hashtable",java.util.Dictionary,
[java.util.Map,Cloneable]);u(b,function(){this.initHT()});c(b,"initHT",function(a,h){var b=null,c=11,g=0.75,c=a,g=h;"object"==typeof c?(b=c,c=Math.max(2*t.size(),11),this.__allowJS=b.__allowJS):this.__allowJS=!0;c=c||11;g=g||0.75;if(0>c)throw new IllegalArgumentException("Illegal Capacity: "+c);if(0>=g||Float.isNaN(g))throw new IllegalArgumentException("Illegal Load: "+g);0==c&&(c=1);this.loadFactor=g;this.table=Array(c);this.threshold=F(Math.min(c*g,2147483640));this.__setJS();null!=b&&this.putAll(b)});
f(b,"size",function(){var a=this.count;return a=this.__m&&this.__m.size||a});f(b,"isEmpty",function(){return 0==this.size()});f(b,"keys",function(){return this.getEnumeration(0)});f(b,"elements",function(){return this.getEnumeration(1)});c(b,"contains",function(a){if(null==a)throw new NullPointerException;if(0==this.size())return!1;if(java.util.Hashtable.__isSimple(this))for(var h=this.__m.values(),b=h.next();!b.done;b=h.next()){if(b.value==a||b.value.equals(a))return!0}else{h=this.table;for(b=h.length;0<
b--;)for(var c=h[b];null!=c;c=c.next_)if(c.value.equals(a))return!0}return!1},"~O");f(b,"containsValue",function(a){return this.contains(a)},"~O");f(b,"containsKey",function(a){switch(java.util.Hashtable.__hasKey(this,a)){case 1:java.util.Hashtable.__ensureJavaMap(this);break;case 2:return!1;case 3:return!0}for(var h=this.table,b=a.hashCode(),h=h[(b&2147483647)%h.length];null!=h;h=h.next_)if(h.hash==b&&h.key.equals(a))return!0;return!1},"~O");f(b,"get",function(a){if(null==a)return null;switch(java.util.Hashtable.__hasKey(this,
a)){case 1:java.util.Hashtable.__ensureJavaMap(this);break;case 2:return null;case 3:var h=null;return h=this.__m.get(a)}for(var b=this.table,h=a.hashCode(),b=b[(h&2147483647)%b.length];null!=b;b=b.next_)if(b.hash==h&&b.key.equals(a))return b.value;return null},"~O");c(b,"rehash",function(){var a=this.table.length,h=this.table,b=(a<<1)+1;if(0<b-2147483639){if(2147483639==a)return;b=2147483639}var c=Array(b);this.modCount++;this.threshold=F(Math.min(b*this.loadFactor,2147483640));for(this.table=c;0<
a--;)for(var g=h[a];null!=g;){var j=g,g=g.next_,k=(j.hash&2147483647)%b;j.next_=c[k];c[k]=j}});c(b,"addEntry",function(a,h,b,c){this.modCount++;var g=this.table;this.count>=this.threshold&&(this.rehash(),g=this.table,a=h.hashCode(),c=(a&2147483647)%g.length);g[c]=new java.util.Hashtable.Entry(a,h,b,g[c]);this.count++},"~N,~O,~O,~N");f(b,"put",function(a,h){if(null==h)throw new NullPointerException;switch(java.util.Hashtable.__hasKey(this,a)){case 1:java.util.Hashtable.__ensureJavaMap(this);break;
case 2:return this.__m.set(a,h),++this.modCount,null;case 3:var b=null,b=this.__m.get(a);this.__m.set(a,h);++this.modCount;return b}for(var c=this.table,b=a.hashCode(),g=(b&2147483647)%c.length,c=c[g];null!=c;c=c.next_)if(c.hash==b&&c.key.equals(a))return b=c.value,c.value=h,b;this.addEntry(b,a,h,g);return null},"~O,~O");f(b,"remove",function(a){if(null==a)throw new NullPointerException("Hashtable key may not be null");switch(java.util.Hashtable.__hasKey(this,a)){case 1:java.util.Hashtable.__ensureJavaMap(this);
break;case 2:return null;case 3:var h=null,h=this.__m.get(a);this.__m["delete"](a);++this.modCount;return h}for(var b=this.table,c=a.hashCode(),g=(c&2147483647)%b.length,h=b[g],j=null;null!=h;j=h,h=h.next_)if(h.hash==c&&h.key.equals(a))return this.modCount++,null!=j?j.next_=h.next_:b[g]=h.next_,this.count--,a=h.value,h.value=null,a;return null},"~O");f(b,"putAll",function(a){if(java.util.Hashtable.__isSimple(a)){var h=this;a.__m.forEach(function(a,d){h.put(d,a)})}else{var b;for(a=a.entrySet().iterator();a.hasNext()&&
((b=a.next())||1);)this.put(b.getKey(),b.getValue())}},"java.util.Map");f(b,"clear",function(){var a=this.table;this.modCount++;java.util.Hashtable.__isSimple(this)&&this.__m.clear();this.__setJS();for(var h=a.length;0<=--h;)a[h]=null;this.count=0});c(b,"clone",function(){try{var a=ba(this,java.util.Hashtable,"clone",[]);a.table=Array(this.table.length);for(var h=this.table.length;0<h--;)a.table[h]=null!=this.table[h]?this.table[h].clone():null;a.$keySet=null;a.$entrySet=null;a.$values=null;a.modCount=
0;java.util.Hashtable.__isSimple(this)?(a.__setJS(),this.__m.forEach(function(h,b){a.__m.set(b,h);a.modCount++})):a.__m=null;return a}catch(b){if(E(b,"CloneNotSupportedException"))throw new InternalError(b);throw b;}});f(b,"toString",function(){var a=this.size()-1;if(-1==a)return"{}";for(var h=this.entrySet().iterator(),b="{",c=0;;c++){var g=h.next(),j=g.getKey(),g=g.getValue(),b=b+(j===this?"(this Map)":j.toString()),b=b+"=",b=b+(g===this?"(this Map)":g.toString());if(c==a)return b+"}";b+=", "}});
f(b,"equals",function(a){if(a===this)return!0;if(!C(a,"java.util.Map")||a.size()!=this.size())return!1;try{for(var h=this.entrySet().iterator();h.hasNext();){var b=h.next(),c=b.getKey(),g=b.getValue();if(null==g){if(!(null==a.get(c)&&a.containsKey(c)))return!1}else if(!g.equals(a.get(c)))return!1}}catch(j){if(E(j,"ClassCastException")||E(j,NullPointerException))return!1;throw j;}return!0},"~O");f(b,"hashCode",function(){var a=0;if(0==this.count||0>this.loadFactor)return a;this.loadFactor=-this.loadFactor;
for(var h,b=0,c=this.table;b<c.length&&((h=c[b])||1);b++)for(;null!=h;)a+=h.hashCode(),h=h.next_;this.loadFactor=-this.loadFactor;return a});c(b,"getEnumeration",function(a){return 0==this.size()?java.util.Collections.emptyEnumeration():new java.util.Hashtable.Enumerator(this,a,!1)},"~N");c(b,"getIterator",function(a){return 0==this.size()?java.util.Collections.emptyIterator():new java.util.Hashtable.Enumerator(this,a,!0)},"~N");f(b,"keySet",function(){null==this.$keySet&&(this.$keySet=new java.util.Hashtable.KeySet(this));
return this.$keySet});f(b,"entrySet",function(){null==this.$entrySet&&(this.$entrySet=new java.util.Hashtable.EntrySet(this));return this.$entrySet});f(b,"values",function(){null==this.$values&&(this.$values=new java.util.Hashtable.ValueCollection(this));return this.$values});c(b,"__setJS",function(){if(this.__allowJS&&java.util.Hashtable.USE_SIMPLE){var a=null;this.__m=a=new Map}else this.__m=null});b.__get=c(b,"__get",function(a,h){return a.__m.get(null==h?null:h+"")},"~O,~O");b.__set=c(b,"__set",
function(a,h,b){a.__m.set(null==h?null:h+"",b)},"java.util.Map,~O,~O");b.__hasKey=c(b,"__hasKey",function(a,h){return!a.__m?0:null!=h&&"string"!=typeof h?1:a.__m.has(h)?3:2},"java.util.Map,~O");b.__isSimple=c(b,"__isSimple",function(a){return!!a.__m},"java.util.Map");b.__ensureJavaMap=c(b,"__ensureJavaMap",function(a){if(a.__m){var h=a.__m;a.__m=null;h.forEach(function(h,b){a.put(b,h)});h.clear()}},"java.util.Map");var a=s(function(){this.hash=0;this.next_=this.value=this.key=null;r(this,arguments)},
java.util.Hashtable,"Entry",null,java.util.Map.Entry);u(a,function(a,h,b,c){this.hash=a;this.key=h;this.value=b;this.next_=c},"~N,~O,~O,java.util.Hashtable.Entry");f(a,"clone",function(){return new java.util.Hashtable.Entry(this.hash,this.key,this.value,null==this.next_?null:this.next_.clone())});f(a,"getKey",function(){return this.key});f(a,"getValue",function(){return this.value});f(a,"setValue",function(a){if(null==a)throw new NullPointerException;var h=this.value;this.value=a;return h},"~O");
f(a,"equals",function(a){return!C(a,"java.util.Map.Entry")?!1:(null==this.key?null==a.getKey():this.key.equals(a.getKey()))&&(null==this.value?null==a.getValue():this.value.equals(a.getValue()))},"~O");f(a,"hashCode",function(){return this.hash^(null==this.value?0:this.value.hashCode())});c(a,"toString",function(){return this.key.toString()+"="+this.value.toString()});a=s(function(){this.ht=null;r(this,arguments)},java.util.Hashtable,"KeySet",java.util.AbstractSet);u(a,function(a){K(this,java.util.Hashtable.KeySet,
[]);this.ht=a},"java.util.Hashtable");f(a,"iterator",function(){return this.ht.getIterator(0)});f(a,"size",function(){return this.ht.size()});f(a,"contains",function(a){return this.ht.containsKey(a)},"~O");f(a,"remove",function(a){return null!=this.ht.remove(a)},"~O");f(a,"clear",function(){this.ht.clear()});a=s(function(){this.ht=null;r(this,arguments)},java.util.Hashtable,"EntrySet",java.util.AbstractSet);u(a,function(a){K(this,java.util.Hashtable.EntrySet,[]);this.ht=a},"java.util.Hashtable");
f(a,"iterator",function(){return this.ht.getIterator(2)});f(a,"contains",function(a){if(!C(a,"java.util.Map.Entry"))return!1;var h=a.getKey();switch(java.util.Hashtable.__hasKey(this.ht,h)){case 1:java.util.Hashtable.__ensureJavaMap(this.ht);break;case 3:a=a.getValue();var b=this.ht.get(h);return a===b||null!=a&&a.equals(h);case 2:return!1}b=this.ht.table;h=h.hashCode();for(b=b[(h&2147483647)%b.length];null!=b;b=b.next_)if(b.hash==h&&b.equals(a))return!0;return!1},"~O");f(a,"remove",function(a){if(!C(a,
"java.util.Map.Entry"))return!1;var h=a.getKey();switch(java.util.Hashtable.__hasKey(this.ht,h)){case 1:java.util.Hashtable.__ensureJavaMap(this.ht);break;case 3:a=a.getValue();if(null==a)return!1;var b=this.ht.get(h);return b===a||b.equals(a)?(this.ht.remove(h),!0):!1;case 2:return!1}for(var b=this.ht.table,h=h.hashCode(),c=(h&2147483647)%b.length,g=b[c],j=null;null!=g;j=g,g=g.next_)if(g.hash==h&&g.equals(a))return this.ht.modCount++,null!=j?j.next_=g.next_:b[c]=g.next_,this.ht.count--,g.value=null,
!0;return!1},"~O");f(a,"size",function(){return this.ht.size()});f(a,"clear",function(){this.ht.clear()});a=s(function(){this.ht=null;r(this,arguments)},java.util.Hashtable,"ValueCollection",java.util.AbstractCollection);u(a,function(a){K(this,java.util.Hashtable.ValueCollection,[]);this.ht=a},"java.util.Hashtable");f(a,"iterator",function(){return this.ht.getIterator(1)});f(a,"size",function(){return this.ht.size()});f(a,"contains",function(a){return this.ht.containsValue(a)},"~O");f(a,"clear",function(){this.ht.clear()});
a=s(function(){this.table=null;this.index=0;this.current=this.next_=null;this.type=0;this.ht=this.jsMapIterator=null;this.isIterator=!1;this.expectedModCount=0;r(this,arguments)},java.util.Hashtable,"Enumerator",null,[java.util.Enumeration,java.util.Iterator]);u(a,function(a,h,b){this.ht=a;this.table=a.table;this.index=a.table.length;this.type=h;this.isIterator=b;this.expectedModCount=a.modCount;java.util.Hashtable.__isSimple(a)&&(this.jsMapIterator=a.__m.entries(),this.next_=this.jsMapIterator.next())},
"java.util.Hashtable,~N,~B");f(a,"hasMoreElements",function(){if(java.util.Hashtable.__isSimple(this.ht)){var a=!1;return a=this.next_&&!this.next_.done}for(var a=this.next_,h=this.index,b=this.table;null==a&&0<h;)a=b[--h];this.next_=a;this.index=h;return null!=a});f(a,"nextElement",function(){var a=this.next_;if(java.util.Hashtable.__isSimple(this.ht)){var h=this.type;this.current=a;var b=null;this.next_=b=this.jsMapIterator.next()||null;if(null!=a){var c=b=null,g=!1,g=a.done;if(!g){if(2>h)return a.value[h];
b=a.value[0];c=a.value[1]}if(!g)return R("java.util.Hashtable$Enumerator$1")?0:java.util.Hashtable.Enumerator.$Hashtable$Enumerator$1$(),T(java.util.Hashtable$Enumerator$1,this,null,0,b,c,null)}}else{b=this.index;for(h=this.table;null==a&&0<b;)a=h[--b];this.next_=a;this.index=b;if(null!=a)return a=this.current=this.next_,this.next_=a.next_,0==this.type?a.key:1==this.type?a.value:a}throw new java.util.NoSuchElementException("Hashtable Enumerator");});f(a,"hasNext",function(){return this.hasMoreElements()});
f(a,"next",function(){if(this.ht.modCount!=this.expectedModCount)throw new java.util.ConcurrentModificationException;return this.nextElement()});f(a,"remove",function(){if(!this.isIterator)throw new UnsupportedOperationException;var a=this.current;if(null==a)throw new IllegalStateException("Hashtable Enumerator");if(this.ht.modCount!=this.expectedModCount)throw new java.util.ConcurrentModificationException;if(java.util.Hashtable.__isSimple(this.ht)){var h=null,h=a.value[0];this.ht.remove(h);this.expectedModCount++}else{for(var a=
this.ht.table,h=(this.current.hash&2147483647)%a.length,b=a[h],c=null;null!=b;c=b,b=b.next_)if(b===this.current){this.ht.modCount++;this.expectedModCount++;null==c?a[h]=b.next_:c.next_=b.next_;this.ht.count--;this.current=null;return}throw new java.util.ConcurrentModificationException;}});a.$Hashtable$Enumerator$1$=function(){var a=Y(java.util,"Hashtable$Enumerator$1",java.util.Hashtable.Entry);f(a,"setValue",function(a){var d=this.b$["java.util.Hashtable.Enumerator"].ht.modCount;a=this.b$["java.util.Hashtable.Enumerator"].ht.put(this.getKey(),
a);this.b$["java.util.Hashtable.Enumerator"].ht.modCount=d;return a},"~O")};b.USE_SIMPLE=!0});x(["java.util.Map"],"java.util.MapEntry",null,function(){var b=s(function(){this.value=this.key=null;r(this,arguments)},java.util,"MapEntry",null,[java.util.Map.Entry,Cloneable]);u(b,function(a){this.key=a},"~O");u(b,function(a,d){this.key=a;this.value=d},"~O,~O");c(b,"clone",function(){try{return ba(this,java.util.MapEntry,"clone",[])}catch(a){if(E(a,"CloneNotSupportedException"))return null;throw a;}});
f(b,"equals",function(a){return this===a?!0:C(a,"java.util.Map.Entry")?(null==this.key?null==a.getKey():this.key.equals(a.getKey()))&&(null==this.value?null==a.getValue():this.value.equals(a.getValue())):!1},"~O");f(b,"getKey",function(){return this.key});f(b,"getValue",function(){return this.value});f(b,"hashCode",function(){return(null==this.key?0:this.key.hashCode())^(null==this.value?0:this.value.hashCode())});f(b,"setValue",function(a){var d=this.value;this.value=a;return d},"~O");f(b,"toString",
function(){return this.key+"="+this.value});I(java.util.MapEntry,"Type")});x(["java.util.Hashtable"],"java.util.Properties",null,function(){var b=s(function(){this.defaults=this.builder=null;r(this,arguments)},java.util,"Properties",java.util.Hashtable);u(b,function(){K(this,java.util.Properties,[])});u(b,function(a){this.initHT();this.defaults=null==a?null:a},"java.util.Properties");c(b,"dumpString",function(a,d,h){var b=0;!h&&(b<d.length&&" "==d.charAt(b))&&(a+="\\ ",b++);for(;b<d.length;b++){var c=
d.charAt(b);switch(c.charCodeAt(0)){case 9:a+="\\t";break;case 10:a+="\\n";break;case 12:a+="\\f";break;case 13:a+="\\r";break;default:if(0<="\\#!=:".indexOf(c)||h&&" "==c)a+="\\";if(!(" "<=c&&"~">=c)){c=Integer.toHexString(c.charCodeAt(0));a+="\\u";for(var g=0;g<4-c.length;g++)a+="0"}a+=c}}return a},"~S,~S,~B");c(b,"getProperty",function(a){var d=this.get(a),d="string"==typeof d?d:null;null==d&&null!=this.defaults&&(d=this.defaults.getProperty(a));return d},"~S");c(b,"getProperty",function(a,d){var h=
this.get(a),h="string"==typeof h?h:null;null==h&&null!=this.defaults&&(h=this.defaults.getProperty(a));return null==h?d:h},"~S,~S");c(b,"list",function(a){if(null==a)throw new NullPointerException;for(var d="",h=this.propertyNames();h.hasMoreElements();){for(var b=h.nextElement(),d=d+b,d=d+"=",c=this.get(b),g=this.defaults;null==c;)c=g.get(b),g=g.defaults;40<c.length?(d+=c.substring(0,37),d+="..."):d+=c;a.println(d.toString());d=""}},"java.io.PrintStream");c(b,"list",function(a){if(null==a)throw new NullPointerException;
for(var d="",h=this.propertyNames();h.hasMoreElements();){for(var b=h.nextElement(),d=d+b,d=d+"=",c=this.get(b),g=this.defaults;null==c;)c=g.get(b),g=g.defaults;40<c.length?(d+=c.substring(0,37),d+="..."):d+=c;a.println(d.toString());d=""}},"java.io.PrintWriter");c(b,"load",function(){},"java.io.InputStream");c(b,"propertyNames",function(){if(null==this.defaults)return this.keys();for(var a=new java.util.Hashtable(this.defaults.size()+this.size()),d=this.defaults.propertyNames();d.hasMoreElements();)a.put(d.nextElement(),
a);for(d=this.keys();d.hasMoreElements();)a.put(d.nextElement(),a);return a.keys()});c(b,"save",function(a,d){try{this.store(a,d)}catch(h){if(!E(h,"java.io.IOException"))throw h;}},"java.io.OutputStream,~S");c(b,"setProperty",function(a,d){return this.put(a,d)},"~S,~S");c(b,"store",function(){},"java.io.OutputStream,~S");c(b,"loadFromXML",function(){},"java.io.InputStream");c(b,"storeToXML",function(){},"java.io.OutputStream,~S");c(b,"storeToXML",function(){},"java.io.OutputStream,~S,~S");c(b,"substitutePredefinedEntries",
function(a){return a.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll("'","&apos;").replaceAll('"',"&quot;")},"~S");b.lineSeparator=null});I(java.util,"SortedMap",java.util.Map);I(java.util,"SortedSet",java.util.Set);x(["java.util.Enumeration"],"java.util.StringTokenizer",null,function(){var b=s(function(){this.delimiters=this.string=null;this.returnDelimiters=!1;this.position=0;r(this,arguments)},java.util,"StringTokenizer",null,java.util.Enumeration);u(b,function(a,
d,h){switch(arguments.length){case 1:d=" \t\n\r\f";case 2:h=!1}if(null==a)throw new NullPointerException;this.string=a;this.delimiters=d;this.returnDelimiters=h;this.position=0},"~S,~S,~B");c(b,"countTokens",function(){for(var a=0,d=!1,h=this.position,b=this.string.length;h<b;h++)0<=this.delimiters.indexOf(this.string.charAt(h),0)?(this.returnDelimiters&&a++,d&&(a++,d=!1)):d=!0;d&&a++;return a});f(b,"hasMoreElements",function(){return this.hasMoreTokens()});c(b,"hasMoreTokens",function(){var a=this.string.length;
if(this.position<a){if(this.returnDelimiters)return!0;for(var d=this.position;d<a;d++)if(-1==this.delimiters.indexOf(this.string.charAt(d),0))return!0}return!1});f(b,"nextElement",function(){return this.nextToken()});c(b,"nextToken",function(){1==arguments.length&&(this.delimiters=arguments[0]);var a=this.position,d=this.string.length;if(a<d){if(this.returnDelimiters){if(0<=this.delimiters.indexOf(this.string.charAt(this.position),0))return String.valueOf(this.string.charAt(this.position++));for(this.position++;this.position<
d;this.position++)if(0<=this.delimiters.indexOf(this.string.charAt(this.position),0))return this.string.substring(a,this.position);return this.string.substring(a)}for(;a<d&&0<=this.delimiters.indexOf(this.string.charAt(a),0);)a++;this.position=a;if(a<d){for(this.position++;this.position<d;this.position++)if(0<=this.delimiters.indexOf(this.string.charAt(this.position),0))return this.string.substring(a,this.position);return this.string.substring(a)}}throw new java.util.NoSuchElementException;})});m("javajs.api");
I(javajs.api,"BytePoster");m("javajs.api");I(javajs.api,"GenericColor");m("J.api");I(J.api,"GenericFileInterface");m("javajs.api");I(javajs.api,"GenericOutputChannel");m("javajs.api");I(javajs.api,"JSInterface");m("javajs.api");I(javajs.api,"JSONEncodable");m("javajs.api");I(javajs.api,"ZInputStream");m("javajs.api.js");I(javajs.api.js,"J2SObjectInterface");m("J.api");I(J.api,"GenericMouseInterface");m("J.api");x(["J.api.FontManager"],"J.api.GenericPlatform",null,function(){I(J.api,"GenericPlatform",
J.api.FontManager)});m("J.api");I(J.api,"PlatformViewer");m("J.api");I(J.api,"EventManager");m("J.api");I(J.api,"FontManager");m("JU");x(null,"JU.Font",["JU.AU"],function(){var b=s(function(){this.fid=0;this.fontStyle=this.fontFace=null;this.fontSize=this.idFontStyle=this.idFontFace=this.fontSizeNominal=0;this.manager=this.fontMetrics=this.font=null;this.descent=this.ascent=0;this.isItalic=this.isBold=!1;this.fontSizeAngstroms=0;r(this,arguments)},JU,"Font",null);u(b,function(a,d,h,b,c,g,j,k){this.manager=
a;this.fid=d;this.fontFace=JU.Font.fontFaces[h];this.fontStyle=JU.Font.fontStyles[b];this.idFontFace=h;this.idFontStyle=b;this.fontSize=c;this.fontSizeAngstroms=j;this.isBold=1==(b&1);this.isItalic=2==(b&2);this.fontSizeNominal=g;this.font=a.newFont(JU.Font.fontFaces[h],this.isBold,this.isItalic,c);this.fontMetrics=a.getFontMetrics(this,k);this.descent=a.getFontDescent(this.fontMetrics);this.ascent=a.getFontAscent(this.fontMetrics)},"J.api.FontManager,~N,~N,~N,~N,~N,~N,~O");b.getFont3D=c(b,"getFont3D",
function(a){return JU.Font.font3ds[a]},"~N");b.createFont3D=c(b,"createFont3D",function(a,d,h,b,c,g,j){255<h&&(h=255);0>h&&(c=-h,b=h=10);for(var k=F(h)<<4,k=a&3|(d&3)<<2|k<<4,l=JU.Font.fontkeyCount;0<--l;)if(k==JU.Font.fontkeys[l]&&JU.Font.font3ds[l].fontSizeNominal==b)return JU.Font.font3ds[l];l=JU.Font.fontkeyCount++;l==JU.Font.fontkeys.length&&(JU.Font.fontkeys=JU.AU.arrayCopyI(JU.Font.fontkeys,l+8),JU.Font.font3ds=JU.AU.arrayCopyObject(JU.Font.font3ds,l+8));a=new JU.Font(g,l,a,d,h,b,c,j);JU.Font.font3ds[l]=
a;JU.Font.fontkeys[l]=k;return a},"~N,~N,~N,~N,~N,J.api.FontManager,~O");b.getFontFaceID=c(b,"getFontFaceID",function(a){return"Monospaced".equalsIgnoreCase(a)?2:"Serif".equalsIgnoreCase(a)?1:0},"~S");b.getFontStyleID=c(b,"getFontStyleID",function(a){for(var d=4;0<=--d;)if(JU.Font.fontStyles[d].equalsIgnoreCase(a))return d;return-1},"~S");c(b,"getAscent",function(){return this.ascent});c(b,"getDescent",function(){return this.descent});c(b,"getHeight",function(){return this.getAscent()+this.getDescent()});
c(b,"getFontMetrics",function(){return this.fontMetrics});c(b,"stringWidth",function(a){return this.manager.fontStringWidth(this,a)},"~S");c(b,"getInfo",function(){return(0<this.fontSizeAngstroms?-this.fontSizeAngstroms:this.fontSizeNominal)+" "+this.fontFace+" "+this.fontStyle});f(b,"toString",function(){return"["+this.getInfo()+"]"});b.fontkeyCount=1;b.fontkeys=D(8,0);b.font3ds=Array(8);b.fontFaces=z(-1,["SansSerif","Serif","Monospaced",""]);b.fontStyles=z(-1,["Plain","Bold","Italic","BoldItalic"])});
m("JS");x(["javajs.api.GenericColor"],"JS.Color",null,function(){var b=s(function(){this.argb=0;r(this,arguments)},JS,"Color",null,javajs.api.GenericColor);f(b,"addAlpha",function(a){if(255!=this.getOpacity255())return this;var d=new JS.Color;d.argb=this.argb&16777215|a<<24;return d},"~N");f(b,"getRGB",function(){return this.argb&16777215});f(b,"getOpacity255",function(){return this.argb>>24&255});b.get1=c(b,"get1",function(a){var d=new JS.Color;d.argb=a|4278190080;return d},"~N");b.get3=c(b,"get3",
function(a,d,h){return(new JS.Color).set4(a,d,h,255)},"~N,~N,~N");b.get4=c(b,"get4",function(a,d,h,b){return(new JS.Color).set4(a,d,h,b)},"~N,~N,~N,~N");c(b,"set4",function(a,d,h,b){this.argb=(b<<24|a<<16|d<<8|h)&4294967295;return this},"~N,~N,~N,~N");f(b,"toString",function(){var a="00000000"+Integer.toHexString(this.argb);return"[0x"+a.substring(a.length-8,a.length)+"]"})});m("JS");var Xa=s(function(){this.height=this.width=0;r(this,arguments)},JS,"Dimension",null);u(Xa,function(b,a){this.set(b,
a)},"~N,~N");c(Xa,"set",function(b,a){this.width=b;this.height=a;return this},"~N,~N");m("J.awtjs");G(J.awtjs,"Event",null);m("J.api");I(J.api,"GenericMenuInterface");m("JU");x(["JU.P3"],"JU.A4",["JU.T3"],function(){var b=s(function(){this.angle=0;r(this,arguments)},JU,"A4",JU.P3);u(b,function(){K(this,JU.A4,[]);this.z=1});b.new4=c(b,"new4",function(a,d,h,b){var c=new JU.A4;c.set4(a,d,h,b);return c},"~N,~N,~N,~N");b.newAA=c(b,"newAA",function(a){var d=new JU.A4;d.set4(a.x,a.y,a.z,a.angle);return d},
"JU.A4");b.newVA=c(b,"newVA",function(a,d){var h=new JU.A4;h.setVA(a,d);return h},"JU.V3,~N");c(b,"setVA",function(a,d){this.x=a.x;this.y=a.y;this.z=a.z;this.angle=d},"JU.V3,~N");c(b,"set4",function(a,d,h,b){this.x=a;this.y=d;this.z=h;this.angle=b},"~N,~N,~N,~N");c(b,"setAA",function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.angle=a.angle},"JU.A4");c(b,"setM",function(a){this.setFromMat(a.m00,a.m01,a.m02,a.m10,a.m11,a.m12,a.m20,a.m21,a.m22)},"JU.M3");c(b,"setFromMat",function(a,d,h,b,c,g,j,k,l){a=
0.5*(a+c+l-1);this.x=k-g;this.y=h-j;this.z=b-d;d=0.5*Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z);0==d&&1==a?(this.x=this.y=0,this.z=1,this.angle=0):this.angle=Math.atan2(d,a)},"~N,~N,~N,~N,~N,~N,~N,~N,~N");f(b,"hashCode",function(){return JU.T3.floatToIntBits(this.x)^JU.T3.floatToIntBits(this.y)^JU.T3.floatToIntBits(this.z)^JU.T3.floatToIntBits(this.angle)});f(b,"equals",function(a){return!C(a,"JU.A4")?!1:this.x==a.x&&this.y==a.y&&this.z==a.z&&this.angle==a.angle},"~O");f(b,"toString",function(){return"("+
this.x+", "+this.y+", "+this.z+", "+this.angle+")"});f(b,"toJSON",function(){return"["+this.x+","+this.y+","+this.z+","+180*this.angle/3.141592653589793+"]"})});m("JU");x(["java.net.URLConnection"],"JU.AjaxURLConnection",["JU.AU","$.Rdr"],function(){var b=s(function(){this.bytesOut=null;this.postOut="";r(this,arguments)},JU,"AjaxURLConnection",java.net.URLConnection);c(b,"doAjax",function(){var a=null,a=Jmol;return a.doAjax(this.url,this.postOut,this.bytesOut,!1)});f(b,"connect",function(){});c(b,
"outputBytes",function(a){this.bytesOut=a},"~A");c(b,"outputString",function(a){this.postOut=a},"~S");f(b,"getInputStream",function(){var a=null,d=this.doAjax();JU.AU.isAB(d)?a=JU.Rdr.getBIS(d):C(d,"JU.SB")?a=JU.Rdr.getBIS(JU.Rdr.getBytesFromSB(d)):"string"==typeof d&&(a=JU.Rdr.getBIS(d.getBytes()));return a});c(b,"getContents",function(){return this.doAjax()})});m("JU");x(["java.net.URLStreamHandler"],"JU.AjaxURLStreamHandler",["JU.AjaxURLConnection","$.SB"],function(){var b=s(function(){this.protocol=
null;r(this,arguments)},JU,"AjaxURLStreamHandler",java.net.URLStreamHandler);u(b,function(a){K(this,JU.AjaxURLStreamHandler,[]);this.protocol=a},"~S");c(b,"openConnection",function(a){return new JU.AjaxURLConnection(a)},"java.net.URL");f(b,"toExternalForm",function(a){var d=new JU.SB;d.append(a.getProtocol());d.append(":");null!=a.getAuthority()&&0<a.getAuthority().length&&(d.append("//"),d.append(a.getAuthority()));null!=a.getPath()&&d.append(a.getPath());null!=a.getQuery()&&(d.append("?"),d.append(a.getQuery()));
null!=a.getRef()&&(d.append("#"),d.append(a.getRef()));return d.toString()},"java.net.URL")});m("JU");x(["java.net.URLStreamHandlerFactory","java.util.Hashtable"],"JU.AjaxURLStreamHandlerFactory",["JU.AjaxURLStreamHandler"],function(){var b=s(function(){this.htFactories=null;r(this,arguments)},JU,"AjaxURLStreamHandlerFactory",null,java.net.URLStreamHandlerFactory);N(b,function(){this.htFactories=new java.util.Hashtable});f(b,"createURLStreamHandler",function(a){var d=this.htFactories.get(a);null==
d&&this.htFactories.put(a,d=new JU.AjaxURLStreamHandler(a));return null==d.protocol?null:d},"~S")});m("JU");x(null,"JU.AU",["java.lang.reflect.Array","java.util.Arrays","JU.Lst"],function(){var b=G(JU,"AU",null);b.ensureLength=c(b,"ensureLength",function(a,d){return null!=a&&JU.AU.getLength(a)>=d?a:JU.AU.arrayCopyObject(a,d)},"~O,~N");b.ensureLengthS=c(b,"ensureLengthS",function(a,d){return null!=a&&a.length>=d?a:JU.AU.arrayCopyS(a,d)},"~A,~N");b.ensureLengthA=c(b,"ensureLengthA",function(a,d){return null!=
a&&a.length>=d?a:JU.AU.arrayCopyF(a,d)},"~A,~N");b.ensureLengthI=c(b,"ensureLengthI",function(a,d){return null!=a&&a.length>=d?a:JU.AU.arrayCopyI(a,d)},"~A,~N");b.ensureLengthShort=c(b,"ensureLengthShort",function(a,d){return null!=a&&a.length>=d?a:JU.AU.arrayCopyShort(a,d)},"~A,~N");b.ensureLengthByte=c(b,"ensureLengthByte",function(a,d){return null!=a&&a.length>=d?a:JU.AU.arrayCopyByte(a,d)},"~A,~N");b.doubleLength=c(b,"doubleLength",function(a){return JU.AU.arrayCopyObject(a,null==a?16:2*JU.AU.getLength(a))},
"~O");b.doubleLengthS=c(b,"doubleLengthS",function(a){return JU.AU.arrayCopyS(a,null==a?16:2*a.length)},"~A");b.doubleLengthF=c(b,"doubleLengthF",function(a){return JU.AU.arrayCopyF(a,null==a?16:2*a.length)},"~A");b.doubleLengthI=c(b,"doubleLengthI",function(a){return JU.AU.arrayCopyI(a,null==a?16:2*a.length)},"~A");b.doubleLengthShort=c(b,"doubleLengthShort",function(a){return JU.AU.arrayCopyShort(a,null==a?16:2*a.length)},"~A");b.doubleLengthByte=c(b,"doubleLengthByte",function(a){return JU.AU.arrayCopyByte(a,
null==a?16:2*a.length)},"~A");b.doubleLengthBool=c(b,"doubleLengthBool",function(a){return JU.AU.arrayCopyBool(a,null==a?16:2*a.length)},"~A");b.deleteElements=c(b,"deleteElements",function(a,d,h){if(0==h||null==a)return a;var b=JU.AU.getLength(a);if(d>=b)return a;b-=d+h;0>b&&(b=0);var c=JU.AU.newInstanceO(a,d+b);0<d&&System.arraycopy(a,0,c,0,d);0<b&&System.arraycopy(a,d+h,c,d,b);return c},"~O,~N,~N");b.arrayCopyObject=c(b,"arrayCopyObject",function(a,d){var h=null==a?-1:JU.AU.getLength(a);0>d&&(d=
h);if(d==h)return a;if(d<h)return z(-1,a,0,d);var b=JU.AU.newInstanceO(a,d);0<h&&System.arraycopy(a,0,b,0,h<d?h:d);return b},"~O,~N");b.newInstanceO=c(b,"newInstanceO",function(a,d){return JU.AU.isAI(a)?D(d,0):!a.getClass||!a.getClass().getComponentType?Array(d):java.lang.reflect.Array.newInstance(a.getClass().getComponentType(),d)},"~O,~N");b.getLength=c(b,"getLength",function(a){return a.length},"~O");b.arrayCopyS=c(b,"arrayCopyS",function(a,d){var h=null==a?-1:a.length;0>d&&(d=h);if(d<h)return z(-1,
a,0,d);var b=Array(d);null!=a&&System.arraycopy(a,0,b,0,h<d?h:d);return b},"~A,~N");b.arrayCopyII=c(b,"arrayCopyII",function(a,d){var h=JU.AU.newInt2(d);if(null!=a){var b=a.length;System.arraycopy(a,0,h,0,b<d?b:d)}return h},"~A,~N");b.arrayCopyPt=c(b,"arrayCopyPt",function(a,d){0>d&&(d=a.length);var h=Array(d);if(null!=a){var b=a.length;System.arraycopy(a,0,h,0,b<d?b:d)}return h},"~A,~N");b.arrayCopyF=c(b,"arrayCopyF",function(a,d){var h=null==a?-1:a.length;0>d&&(d=h);if(d<h)return z(-1,a,0,d);var b=
M(d,0);null!=a&&System.arraycopy(a,0,b,0,h<d?h:d);return b},"~A,~N");b.arrayCopyI=c(b,"arrayCopyI",function(a,d){var h=null==a?-1:a.length;0>d&&(d=h);if(d<h)return z(-1,a,0,d);var b=D(d,0);null!=a&&System.arraycopy(a,0,b,0,h<d?h:d);return b},"~A,~N");b.arrayCopyRangeI=c(b,"arrayCopyRangeI",function(a,d,h){if(null==a)return null;var b=a.length;-1==h&&(h=b);-2==h&&(h=w(b/2));return z(-1,a,d,h)},"~A,~N,~N");b.arrayCopyRangeRevI=c(b,"arrayCopyRangeRevI",function(a,d,h){return null==a?null:z(-1,a,d,h).reverse()},
"~A,~N,~N");b.arrayCopyShort=c(b,"arrayCopyShort",function(a,d){var h=null==a?-1:a.length;0>d&&(d=h);if(d<h)return z(-1,a,0,d);var b=$(d,0);null!=a&&System.arraycopy(a,0,b,0,h<d?h:d);return b},"~A,~N");b.arrayCopyByte=c(b,"arrayCopyByte",function(a,d){var h=null==a?-1:a.length;0>d&&(d=h);if(d<h)return z(-1,a,0,d);var b=O(d,0);null!=a&&System.arraycopy(a,0,b,0,h<d?h:d);return b},"~A,~N");b.arrayCopyBool=c(b,"arrayCopyBool",function(a,d){var h=null==a?-1:a.length;0>d&&(d=h);if(d<h)return z(-1,a,0,d);
var b=ya(d,!1);null!=a&&System.arraycopy(a,0,b,0,h<d?h:d);return b},"~A,~N");b.swapInt=c(b,"swapInt",function(a,d,h){var b=a[d];a[d]=a[h];a[h]=b},"~A,~N,~N");b.dumpArray=c(b,"dumpArray",function(a,d,h,b,c,g){a="dumpArray: "+a+"\n";for(var j=h;j<=b;j++)a+="\t*"+j+"*";for(;g>=c;g--){a+="\n*"+g+"*";for(j=h;j<=b;j++)a+="\t"+(j<d.length&&g<d[j].length?d[j][g]:NaN)}return a},"~S,~A,~N,~N,~N,~N");b.dumpIntArray=c(b,"dumpIntArray",function(a,d){for(var h="",b=0;b<d;b++)h+=" "+a[b];return h},"~A,~N");b.sortedItem=
c(b,"sortedItem",function(a,d){if(0==a.size())return null;if(1==a.size())return a.get(0);var h=a.toArray(Array(a.size()));java.util.Arrays.sort(h);return h[d%h.length]},"JU.Lst,~N");b.createArrayOfArrayList=c(b,"createArrayOfArrayList",function(a){return Array(a)},"~N");b.createArrayOfHashtable=c(b,"createArrayOfHashtable",function(a){return Array(a)},"~N");b.swap=c(b,"swap",function(a,d,h){var b=a[d];a[d]=a[h];a[h]=b},"~A,~N,~N");b.newFloat2=c(b,"newFloat2",function(a){return z(a,null)},"~N");b.newInt2=
c(b,"newInt2",function(a){return z(a,null)},"~N");b.newInt3=c(b,"newInt3",function(a){return z(a,null)},"~N,~N");b.newFloat3=c(b,"newFloat3",function(a){return z(a,null)},"~N,~N");b.newInt4=c(b,"newInt4",function(a){return z(a,null)},"~N");b.newShort2=c(b,"newShort2",function(a){return z(a,null)},"~N");b.newByte2=c(b,"newByte2",function(a){return z(a,null)},"~N");b.newDouble2=c(b,"newDouble2",function(a){return z(a,null)},"~N");b.newDouble3n=c(b,"newDouble3n",function(a){return S(a,0)},"~N");b.removeMapKeys=
c(b,"removeMapKeys",function(a,d){for(var h=new JU.Lst,b,c=a.keySet().iterator();c.hasNext()&&((b=c.next())||1);)b.startsWith(d)&&h.addLast(b);for(b=h.size();0<=--b;)a.remove(h.get(b));return h.size()},"java.util.Map,~S");b.isAS=c(b,"isAS",function(a){return gb(a)},"~O");b.isASS=c(b,"isASS",function(a){return hb(a)},"~O");b.isAP=c(b,"isAP",function(a){return ib(a)},"~O");b.isAF=c(b,"isAF",function(a){return Pa(a)},"~O");b.isAFloat=c(b,"isAFloat",function(a){return jb(a)},"~O");b.isAD=c(b,"isAD",function(a){return Pa(a)},
"~O");b.isADD=c(b,"isADD",function(a){return Qa(a)},"~O");b.isADDD=c(b,"isADDD",function(a){return Ra(a)},"~O");b.isAB=c(b,"isAB",function(a){return eb(a)},"~O");b.isAI=c(b,"isAI",function(a){return fb(a)},"~O");b.isAII=c(b,"isAII",function(a){return kb(a)},"~O");b.isAFF=c(b,"isAFF",function(a){return Qa(a)},"~O");b.isAFFF=c(b,"isAFFF",function(a){return Ra(a)},"~O");b.ensureSignedBytes=c(b,"ensureSignedBytes",function(a){if(null!=a)for(var d=a.length;0<=--d;){var h=a[d]&255;128<=h&&(h-=256);a[d]=
h}return a},"~A")});m("JU");x(null,"JU.Base64",["JU.SB"],function(){var b=G(JU,"Base64",null);b.getBytes64=c(b,"getBytes64",function(a){return JU.Base64.getBase64(a).toBytes(0,-1)},"~A");b.getBase64=c(b,"getBase64",function(a){var d=a.length,h=new JU.SB;if(0==d)return h;for(var b=0,c=0;b<d&&0==c;){0==b%75&&0!=b&&h.append("\r\n");var c=b+2==d?1:b+1==d?2:0,g=a[b++]<<16&16711680|(2==c?0:a[b++]<<8)&65280|(1<=c?0:a[b++])&255;h.appendC(JU.Base64.base64.charAt(g>>18&63));h.appendC(JU.Base64.base64.charAt(g>>
12&63));h.appendC(2==c?"=":JU.Base64.base64.charAt(g>>6&63));h.appendC(1<=c?"=":JU.Base64.base64.charAt(g&63))}return h},"~A");b.decodeBase64=c(b,"decodeBase64",function(a){var d=0,h,b=a.indexOf(";base64,")+1;0<b&&(b+=7);a=a.toCharArray();var c=a.length;if(0==c)return O(0,0);for(var g=c;--g>=b;)d+=65==(h=a[g].charCodeAt(0)&127)||0<JU.Base64.decode64[h]?3:0;for(var d=d>>2,j=O(d,0),k=18,g=b,l=b=0;g<c;g++)if(0<JU.Base64.decode64[h=a[g].charCodeAt(0)&127]||65==h||61==h)l|=JU.Base64.decode64[h]<<k,k-=
6,0>k&&(j[b++]=(l&16711680)>>16,b<d&&(j[b++]=(l&65280)>>8),b<d&&(j[b++]=l&255),k=18,l=0);return j},"~S");b.base64="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";b.decode64=D(-1,[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,62,0,62,0,63,52,53,54,55,56,57,58,59,60,61,0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,0,0,0,0,63,0,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,0,
0,0,0,0])});m("JU");x(["javajs.api.JSONEncodable"],"JU.BS",["JU.PT","$.SB"],function(){var b=s(function(){this.words=null;this.wordsInUse=0;this.sizeIsSticky=!1;r(this,arguments)},JU,"BS",null,[Cloneable,javajs.api.JSONEncodable]);u(b,function(){this.initWords(32);this.sizeIsSticky=!1});b.wordIndex=c(b,"wordIndex",function(a){return a>>5},"~N");c(b,"recalculateWordsInUse",function(){var a;for(a=this.wordsInUse-1;0<=a&&0==this.words[a];a--);this.wordsInUse=a+1});b.newN=c(b,"newN",function(a){var d=
new JU.BS;d.init(a);return d},"~N");c(b,"init",function(a){if(0>a)throw new NegativeArraySizeException("nbits < 0: "+a);this.initWords(a);this.sizeIsSticky=!0},"~N");c(b,"initWords",function(a){this.words=D(JU.BS.wordIndex(a-1)+1,0)},"~N");c(b,"ensureCapacity",function(a){this.words.length<a&&(a=Math.max(2*this.words.length,a),this.setLength(a),this.sizeIsSticky=!1)},"~N");c(b,"expandTo",function(a){a+=1;this.wordsInUse<a&&(this.ensureCapacity(a),this.wordsInUse=a)},"~N");c(b,"set",function(a){if(0>
a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var d=JU.BS.wordIndex(a);this.expandTo(d);this.words[d]|=1<<a},"~N");c(b,"setBitTo",function(a,d){d?this.set(a):this.clear(a)},"~N,~B");c(b,"setBits",function(a,d){if(a!=d){var h=JU.BS.wordIndex(a),b=JU.BS.wordIndex(d-1);this.expandTo(b);var c=-1<<a,g=-1>>>-d;if(h==b)this.words[h]|=c&g;else{this.words[h]|=c;for(h+=1;h<b;h++)this.words[h]=-1;this.words[b]|=g}}},"~N,~N");c(b,"clear",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+
a);var d=JU.BS.wordIndex(a);d>=this.wordsInUse||(this.words[d]&=~(1<<a),this.recalculateWordsInUse())},"~N");c(b,"clearBits",function(a,d){if(a!=d){var h=JU.BS.wordIndex(a);if(!(h>=this.wordsInUse)){var b=JU.BS.wordIndex(d-1);b>=this.wordsInUse&&(d=this.length(),b=this.wordsInUse-1);var c=-1<<a,g=-1>>>-d;if(h==b)this.words[h]&=~(c&g);else{this.words[h]&=~c;for(h+=1;h<b;h++)this.words[h]=0;this.words[b]&=~g}this.recalculateWordsInUse()}}},"~N,~N");c(b,"clearAll",function(){for(;0<this.wordsInUse;)this.words[--this.wordsInUse]=
0});c(b,"get",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var d=JU.BS.wordIndex(a);return d<this.wordsInUse&&0!=(this.words[d]&1<<a)},"~N");c(b,"nextSetBit",function(a){if(0>a)throw new IndexOutOfBoundsException("fromIndex < 0: "+a);var d=JU.BS.wordIndex(a);if(d>=this.wordsInUse)return-1;for(a=this.words[d]&-1<<a;;){if(0!=a)return 32*d+Integer.numberOfTrailingZeros(a);if(++d==this.wordsInUse)return-1;a=this.words[d]}},"~N");c(b,"nextClearBit",function(a){if(0>a)throw new IndexOutOfBoundsException("fromIndex < 0: "+
a);var d=JU.BS.wordIndex(a);if(d>=this.wordsInUse)return a;for(a=~this.words[d]&-1<<a;;){if(0!=a)return 32*d+Integer.numberOfTrailingZeros(a);if(++d==this.wordsInUse)return 32*this.wordsInUse;a=~this.words[d]}},"~N");c(b,"length",function(){return 0==this.wordsInUse?0:32*(this.wordsInUse-1)+(32-Integer.numberOfLeadingZeros(this.words[this.wordsInUse-1]))});c(b,"isEmpty",function(){return 0==this.wordsInUse});c(b,"intersects",function(a){for(var d=Math.min(this.wordsInUse,a.wordsInUse)-1;0<=d;d--)if(0!=
(this.words[d]&a.words[d]))return!0;return!1},"JU.BS");c(b,"cardinality",function(){for(var a=0,d=0;d<this.wordsInUse;d++)a+=Integer.bitCount(this.words[d]);return a});c(b,"and",function(a){if(this!==a){for(;this.wordsInUse>a.wordsInUse;)this.words[--this.wordsInUse]=0;for(var d=0;d<this.wordsInUse;d++)this.words[d]&=a.words[d];this.recalculateWordsInUse()}},"JU.BS");c(b,"or",function(a){if(this!==a){var d=Math.min(this.wordsInUse,a.wordsInUse);this.wordsInUse<a.wordsInUse&&(this.ensureCapacity(a.wordsInUse),
this.wordsInUse=a.wordsInUse);for(var h=0;h<d;h++)this.words[h]|=a.words[h];d<a.wordsInUse&&System.arraycopy(a.words,d,this.words,d,this.wordsInUse-d)}},"JU.BS");c(b,"xor",function(a){var d=Math.min(this.wordsInUse,a.wordsInUse);this.wordsInUse<a.wordsInUse&&(this.ensureCapacity(a.wordsInUse),this.wordsInUse=a.wordsInUse);for(var h=0;h<d;h++)this.words[h]^=a.words[h];d<a.wordsInUse&&System.arraycopy(a.words,d,this.words,d,a.wordsInUse-d);this.recalculateWordsInUse()},"JU.BS");c(b,"andNot",function(a){for(var d=
Math.min(this.wordsInUse,a.wordsInUse)-1;0<=d;d--)this.words[d]&=~a.words[d];this.recalculateWordsInUse()},"JU.BS");f(b,"hashCode",function(){for(var a=1234,d=this.wordsInUse;0<=--d;)a^=this.words[d]*(d+1);return a>>32^a});c(b,"size",function(){return 32*this.words.length});f(b,"equals",function(a){if(!C(a,"JU.BS"))return!1;if(this===a)return!0;if(this.wordsInUse!=a.wordsInUse)return!1;for(var d=0;d<this.wordsInUse;d++)if(this.words[d]!=a.words[d])return!1;return!0},"~O");f(b,"clone",function(){!this.sizeIsSticky&&
this.wordsInUse!=this.words.length&&this.setLength(this.wordsInUse);return JU.BS.copy(this)});c(b,"setLength",function(a){a!=this.words.length&&(a==this.wordsInUse?this.words=z(-1,this.words,0,a):(a=D(a,0),System.arraycopy(this.words,0,a,0,this.wordsInUse),this.words=a))},"~N");f(b,"toString",function(){return JU.BS.escape(this,"(",")")});b.copy=c(b,"copy",function(a){var d;d=Oa(a);var h=a.wordsInUse;d.words=0==h?JU.BS.emptyBitmap:z(-1,a.words,0,d.wordsInUse=h);return d},"JU.BS");c(b,"cardinalityN",
function(a){for(var d=this.cardinality(),h=this.length();--h>=a;)this.get(h)&&d--;return d},"~N");f(b,"toJSON",function(){var a=128<this.wordsInUse?this.cardinality():32*this.wordsInUse,a=JU.SB.newN(6*a+2);a.appendC("[");var d=this.nextSetBit(0);if(-1!=d){a.appendI(d);for(d=this.nextSetBit(d+1);0<=d;d=this.nextSetBit(d+1)){var h=this.nextClearBit(d);do a.append(", ").appendI(d);while(++d<h)}}a.appendC("]");return a.toString()});b.escape=c(b,"escape",function(a,d,h){if(null==a)return d+"{}"+h;var b=
new JU.SB;b.append(d+"{");d=a.length();for(var c=-1,g=-2,j=-1;++j<=d;){var k=a.get(j);if(j==d||0<=c&&!k){0<=c&&g!=c&&b.append((g==c-1?" ":":")+c);if(j==d)break;c=-1}a.get(j)&&(0>c&&(b.append((-2==g?"":" ")+j),g=j),c=j)}b.append("}").appendC(h);return b.toString()},"JU.BS,~S,~S");b.unescape=c(b,"unescape",function(a){var d,h;if(null==a||4>(h=(a=a.trim()).length)||a.equalsIgnoreCase("({null})")||"("!=(d=a.charAt(0))&&"["!=d||a.charAt(h-1)!=("("==d?")":"]")||"{"!=a.charAt(1)||a.indexOf("}")!=h-2)return null;
for(var b=h-=2;2<=--b;)if(!JU.PT.isDigit(d=a.charAt(b))&&" "!=d&&"\t"!=d&&":"!=d)return null;for(var c=h;JU.PT.isDigit(a.charAt(--c)););if(++c==h)c=0;else try{c=Integer.parseInt(a.substring(c,h))}catch(g){if(E(g,"NumberFormatException"))return null;throw g;}for(var j=JU.BS.newN(c),k=c=-1,l=-2,b=2;b<=h;b++)switch((d=a.charAt(b)).charCodeAt(0)){case 9:case 32:case 125:if(0>l)break;if(l<c)return null;c=l;0>k&&(k=l);j.setBits(k,l+1);k=-1;l=-2;break;case 58:k=c=l;l=-2;break;default:JU.PT.isDigit(d)&&(0>
l&&(l=0),l=10*l+(d.charCodeAt(0)-48))}return 0<=k?null:j},"~S");b.emptyBitmap=D(0,0)});m("JU");x(["java.util.Hashtable"],"JU.CU",["JU.P3","$.PT"],function(){var b=G(JU,"CU",null);b.toRGBHexString=c(b,"toRGBHexString",function(a){var d=a.getRGB();if(0==d)return"000000";a="00"+Integer.toHexString(d>>16&255);a=a.substring(a.length-2);var h="00"+Integer.toHexString(d>>8&255),h=h.substring(h.length-2),d="00"+Integer.toHexString(d&255),d=d.substring(d.length-2);return a+h+d},"javajs.api.GenericColor");
b.toCSSString=c(b,"toCSSString",function(a){var d=a.getOpacity255();if(255==d)return"#"+JU.CU.toRGBHexString(a);a=a.getRGB();return"rgba("+(a>>16&255)+","+(a>>8&255)+","+(a&255)+","+d/255+")"},"javajs.api.GenericColor");b.getArgbFromString=c(b,"getArgbFromString",function(a){var d=0;if(null==a||0==(d=a.length))return 0;a=a.toLowerCase();if("["==a.charAt(0)&&"]"==a.charAt(d-1)){var h;if(0<=a.indexOf(",")){h=JU.PT.split(a.substring(1,a.length-1),",");if(3!=h.length)return 0;a=JU.PT.parseFloat(h[0]);
d=JU.PT.parseFloat(h[1]);h=JU.PT.parseFloat(h[2]);return JU.CU.colorTriadToFFRGB(a,d,h)}switch(d){case 9:h="x";break;case 10:h="0x";break;default:return 0}if(1!=a.indexOf(h))return 0;a="#"+a.substring(d-7,d-1);d=7}if(7==d&&"#"==a.charAt(0))try{return JU.PT.parseIntRadix(a.substring(1,7),16)|4278190080}catch(b){if(E(b,Exception))return 0;throw b;}a=JU.CU.mapJavaScriptColors.get(a);return null==a?0:a.intValue()},"~S");b.colorTriadToFFRGB=c(b,"colorTriadToFFRGB",function(a,d,h){1>=a&&(1>=d&&1>=h)&&(0<
a&&(a=256*a-1),0<d&&(d=256*d-1),0<h&&(h=256*h-1));return JU.CU.rgb(F(a),F(d),F(h))},"~N,~N,~N");b.rgb=c(b,"rgb",function(a,d,h){return 4278190080|a<<16|d<<8|h},"~N,~N,~N");b.colorPtFromString=c(b,"colorPtFromString",function(a){return JU.CU.colorPtFromInt(JU.CU.getArgbFromString(a),null)},"~S");b.colorPtFromInt=c(b,"colorPtFromInt",function(a,d){null==d&&(d=new JU.P3);d.set(a>>16&255,a>>8&255,a&255);return d},"~N,JU.P3");b.colorPtToFFRGB=c(b,"colorPtToFFRGB",function(a){return JU.CU.colorTriadToFFRGB(a.x,
a.y,a.z)},"JU.T3");b.toRGB3f=c(b,"toRGB3f",function(a,d){d[0]=(a>>16&255)/255;d[1]=(a>>8&255)/255;d[2]=(a&255)/255},"~N,~A");b.toFFGGGfromRGB=c(b,"toFFGGGfromRGB",function(a){a=w((2989*(a>>16&255)+5870*(a>>8&255)+1140*(a&255)+5E3)/1E4)&16777215;return JU.CU.rgb(a,a,a)},"~N");b.rgbToHSL=c(b,"rgbToHSL",function(a,d){var h=a.x/255,b=a.y/255,c=a.z/255,g=Math.min(h,Math.min(b,c)),j=Math.max(h,Math.max(b,c)),k=j+g,g=j-g,h=60*(0==g?0:j==h?(b-c)/g+6:j==b?(c-h)/g+2:(h-b)/g+4)%360,b=g/(0==g?1:1>=k?k:2-k);return d?
JU.P3.new3(Math.round(10*h)/10,Math.round(1E3*b)/10,Math.round(500*k)/10):JU.P3.new3(h,100*b,50*k)},"JU.P3,~B");b.hslToRGB=c(b,"hslToRGB",function(a){var d=Math.max(0,Math.min(360,a.x))/60,h=Math.max(0,Math.min(100,a.y))/100;a=Math.max(0,Math.min(100,a.z))/100;var h=a-(0.5>a?a:1-a)*h,b=2*(a-h);a=JU.CU.toRGB(h,b,d+2);var c=JU.CU.toRGB(h,b,d),d=JU.CU.toRGB(h,b,d-2);return JU.P3.new3(Math.round(255*a),Math.round(255*c),Math.round(255*d))},"JU.P3");b.toRGB=c(b,"toRGB",function(a,d,h){return 1>(h+=0>h?
6:6<h?-6:0)?a+d*h:3>h?a+d:4>h?a+d*(4-h):a},"~N,~N,~N");b.colorNames=z(-1,"contrast black pewhite pecyan pepurple pegreen peblue peviolet pebrown pepink peyellow pedarkgreen peorange pelightblue pedarkcyan pedarkgray aliceblue antiquewhite aqua aquamarine azure beige bisque blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkkhaki darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen darkslateblue darkslategray darkturquoise darkviolet deeppink deepskyblue dimgray dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green greenyellow honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan lightgoldenrodyellow lightgreen lightgrey lightgray lightpink lightsalmon lightseagreen lightskyblue lightslategray lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum powderblue purple red rosybrown royalblue saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue slateblue slategray snow springgreen steelblue tan teal thistle tomato turquoise violet wheat white whitesmoke yellow yellowgreen bluetint greenblue greentint grey gray pinktint redorange yellowtint".split(" "));
b.colorArgbs=D(-1,[4294892730,4278190080,4294967295,4278255615,4291830015,4278255360,4284506367,4294934720,4288946216,4294957272,4294967040,4278239232,4294946816,4289769727,4278231200,4284506208,4293982463,4294634455,4278255615,4286578644,4293984255,4294309340,4294960324,4294962125,4278190335,4287245282,4289014314,4292786311,4284456608,4286578432,4291979550,4294934352,4284782061,4294965468,4292613180,4278255615,4278190219,4278225803,4290283019,4289309097,4278215680,4290623339,4287299723,4283788079,
4294937600,4288230092,4287299584,4293498490,4287609999,4282924427,4281290575,4278243025,4287889619,4294907027,4278239231,4285098345,4280193279,4289864226,4294966E3,4280453922,4294902015,4292664540,4294506751,4294956800,4292519200,4286611584,4278222848,4289593135,4293984240,4294928820,4291648604,4283105410,4294967280,4293977740,4293322490,4294963445,4286381056,4294965965,4289583334,4293951616,4292935679,4294638290,4287688336,4292072403,4292072403,4294948545,4294942842,4280332970,4287090426,4286023833,
4289774814,4294967264,4278255360,4281519410,4294635750,4294902015,4286578688,4284927402,4278190285,4290401747,4287852763,4282168177,4286277870,4278254234,4282962380,4291237253,4279834992,4294311930,4294960353,4294960309,4294958765,4278190208,4294833638,4286611456,4285238819,4294944E3,4294919424,4292505814,4293847210,4288215960,4289720046,4292571283,4294963157,4294957753,4291659071,4294951115,4292714717,4289781990,4286578816,4294901760,4290547599,4282477025,4287317267,4294606962,4294222944,4281240407,
4294964718,4288696877,4290822336,4287090411,4285160141,4285563024,4294966010,4278255487,4282811060,4291998860,4278222976,4292394968,4294927175,4282441936,4293821166,4294303411,4294967295,4294309365,4294967040,4288335154,4289714175,4281240407,4288217011,4286611584,4286611584,4294945723,4294919424,4294375029]);b.mapJavaScriptColors=new java.util.Hashtable;for(b=JU.CU.colorNames.length;0<=--b;)JU.CU.mapJavaScriptColors.put(JU.CU.colorNames[b],Integer.$valueOf(JU.CU.colorArgbs[b]))});m("JU");x(null,"JU.DF",
["JU.PT","$.SB"],function(){var b=G(JU,"DF",null);b.setUseNumberLocalization=c(b,"setUseNumberLocalization",function(a){JU.DF.useNumberLocalization[0]=a?Boolean.TRUE:Boolean.FALSE},"~B");b.formatDecimalDbl=c(b,"formatDecimalDbl",function(a,d){return 2147483647==d||-Infinity==a||Infinity==a||Double.isNaN(a)?""+a:JU.DF.formatDecimal(a,d)},"~N,~N");b.formatDecimal=c(b,"formatDecimal",function(a,d){if(-Infinity==a||(Infinity==a||Double.isNaN(a))||2147483647==d)return""+a;var h=0>a;h&&(a=-a);var b;if(0>
d){d=-d;d>JU.DF.formattingStrings.length&&(d=JU.DF.formattingStrings.length);if(0==a)return JU.DF.formattingStrings[d-1]+"E+0";var c;1>Math.abs(a)?(b=100,c=1E-100*a):(b=-100,c=1E100*a);c=(""+c).toUpperCase();var g=c.indexOf("E");0>g?c=""+a:(b=JU.PT.parseInt(c.substring(g+(c.indexOf("E+")==g?2:1)))+b,c=JU.PT.parseFloat(c.substring(0,g)),c=JU.DF.formatDecimal(c,d-1),c.startsWith("10.")&&(c=JU.DF.formatDecimal(1,d-1),b++));return(h?"-":"")+c+"E"+(0<=b?"+":"")+b}d>=JU.DF.formattingStrings.length&&(d=
JU.DF.formattingStrings.length-1);c=(""+a).toUpperCase();b=c.indexOf(".");if(0>b)return(h?"-":"")+c+JU.DF.formattingStrings[d].substring(1);g=c.indexOf("E-");0<g&&(b=JU.PT.parseInt(c.substring(g+1)),c="0."+"0000000000000000000000000000000000000000".substring(0,-b-1)+c.substring(0,1)+c.substring(2,g),b=1);g=c.indexOf("E");0<g&&(b=JU.PT.parseInt(c.substring(g+1)),c=c.substring(0,1)+c.substring(2,g)+"0000000000000000000000000000000000000000",c=c.substring(0,b+1)+"."+c.substring(b+1),b=c.indexOf("."));
var g=c.length,j=d+b+1;if(j<g&&"5"<=c.charAt(j))return JU.DF.formatDecimal((h?-1:1)*(a+JU.DF.formatAdds[d]),d);var k=c.substring(0,0==d?b:++b),j=JU.SB.newS(k);h&&(k.equals("0.")&&d+2<=g&&c.substring(2,2+d).equals("0000000000000000000000000000000000000000".substring(0,d)))&&(h=!1);for(k=0;k<d;k++,b++)b<g?j.appendC(c.charAt(b)):j.appendC("0");c=(h?"-":"")+j;return Boolean.TRUE.equals(JU.DF.useNumberLocalization[0])?c:c.$replace(",",".")},"~N,~N");b.formatDecimalTrimmed=c(b,"formatDecimalTrimmed",function(a,
d){for(var h=JU.DF.formatDecimalDbl(a,d),b=h.length-1;0<=b&&"0"==h.charAt(b);)b--;return h.substring(0,b+1)},"~N,~N");b.formatDecimalTrimmed0=c(b,"formatDecimalTrimmed0",function(a,d){for(var h=JU.DF.formatDecimalDbl(a,d),b=h.length-1,c=h.indexOf(".")+1;b>c&&"0"==h.charAt(b);)b--;return h.substring(0,b+1)},"~N,~N");b.formattingStrings=z(-1,"0 0.0 0.00 0.000 0.0000 0.00000 0.000000 0.0000000 0.00000000 0.000000000 0.0000000000 0.00000000000 0.000000000000".split(" "));b.formatAdds=S(-1,[0.5,0.05,0.005,
5E-4,5E-5,5E-6,5E-7,5E-8,5E-9,5E-10,5E-11,5E-12,5E-13]);b.useNumberLocalization=z(-1,[Boolean.TRUE])});m("JU");x(["java.lang.Enum"],"JU.Encoding",null,function(){var b=G(JU,"Encoding",Enum);A(b,"NONE",0,[]);A(b,"UTF8",1,[]);A(b,"UTF_16BE",2,[]);A(b,"UTF_16LE",3,[]);A(b,"UTF_32BE",4,[]);A(b,"UTF_32LE",5,[])});m("JU");x(["java.util.ArrayList"],"JU.Lst",null,function(){var b=G(JU,"Lst",java.util.ArrayList);c(b,"addLast",function(a){return this.add1(a)},"~O");f(b,"add",function(a,d){return this.add2(a,
d)},"~N,~O");c(b,"removeItemAt",function(a){return this._removeItemAt(a)},"~N");c(b,"removeObj",function(a){return this._removeObject(a)},"~O")});m("JU");var Z=s(function(){this.m22=this.m21=this.m20=this.m12=this.m11=this.m10=this.m02=this.m01=this.m00=0;r(this,arguments)},JU,"M34",null);c(Z,"setAA33",function(b){var a=b.x,d=b.y,h=b.z;b=b.angle;var p=Math.sqrt(a*a+d*d+h*h),p=1/p,a=a*p,d=d*p,h=h*p,c=Math.cos(b);b=Math.sin(b);p=1-c;this.m00=c+a*a*p;this.m11=c+d*d*p;this.m22=c+h*h*p;var c=a*d*p,g=h*
b;this.m01=c-g;this.m10=c+g;c=a*h*p;g=d*b;this.m02=c+g;this.m20=c-g;c=d*h*p;g=a*b;this.m12=c-g;this.m21=c+g},"JU.A4");c(Z,"rotate",function(b){this.rotate2(b,b)},"JU.T3");c(Z,"rotate2",function(b,a){a.set(this.m00*b.x+this.m01*b.y+this.m02*b.z,this.m10*b.x+this.m11*b.y+this.m12*b.z,this.m20*b.x+this.m21*b.y+this.m22*b.z)},"JU.T3,JU.T3");c(Z,"setM33",function(b){this.m00=b.m00;this.m01=b.m01;this.m02=b.m02;this.m10=b.m10;this.m11=b.m11;this.m12=b.m12;this.m20=b.m20;this.m21=b.m21;this.m22=b.m22},"JU.M34");
c(Z,"clear33",function(){this.m00=this.m01=this.m02=this.m10=this.m11=this.m12=this.m20=this.m21=this.m22=0});c(Z,"set33",function(b,a,d){switch(b){case 0:switch(a){case 0:this.m00=d;return;case 1:this.m01=d;return;case 2:this.m02=d;return}break;case 1:switch(a){case 0:this.m10=d;return;case 1:this.m11=d;return;case 2:this.m12=d;return}break;case 2:switch(a){case 0:this.m20=d;return;case 1:this.m21=d;return;case 2:this.m22=d;return}}this.err()},"~N,~N,~N");c(Z,"get33",function(b,a){switch(b){case 0:switch(a){case 0:return this.m00;
case 1:return this.m01;case 2:return this.m02}break;case 1:switch(a){case 0:return this.m10;case 1:return this.m11;case 2:return this.m12}break;case 2:switch(a){case 0:return this.m20;case 1:return this.m21;case 2:return this.m22}}this.err();return 0},"~N,~N");c(Z,"setRow33",function(b,a){switch(b){case 0:this.m00=a[0];this.m01=a[1];this.m02=a[2];break;case 1:this.m10=a[0];this.m11=a[1];this.m12=a[2];break;case 2:this.m20=a[0];this.m21=a[1];this.m22=a[2];break;default:this.err()}},"~N,~A");c(Z,"getRow33",
function(b,a){switch(b){case 0:a[0]=this.m00;a[1]=this.m01;a[2]=this.m02;return;case 1:a[0]=this.m10;a[1]=this.m11;a[2]=this.m12;return;case 2:a[0]=this.m20;a[1]=this.m21;a[2]=this.m22;return}this.err()},"~N,~A");c(Z,"setColumn33",function(b,a){switch(b){case 0:this.m00=a[0];this.m10=a[1];this.m20=a[2];break;case 1:this.m01=a[0];this.m11=a[1];this.m21=a[2];break;case 2:this.m02=a[0];this.m12=a[1];this.m22=a[2];break;default:this.err()}},"~N,~A");c(Z,"getColumn33",function(b,a){switch(b){case 0:a[0]=
this.m00;a[1]=this.m10;a[2]=this.m20;break;case 1:a[0]=this.m01;a[1]=this.m11;a[2]=this.m21;break;case 2:a[0]=this.m02;a[1]=this.m12;a[2]=this.m22;break;default:this.err()}},"~N,~A");c(Z,"add33",function(b){this.m00+=b.m00;this.m01+=b.m01;this.m02+=b.m02;this.m10+=b.m10;this.m11+=b.m11;this.m12+=b.m12;this.m20+=b.m20;this.m21+=b.m21;this.m22+=b.m22},"JU.M34");c(Z,"sub33",function(b){this.m00-=b.m00;this.m01-=b.m01;this.m02-=b.m02;this.m10-=b.m10;this.m11-=b.m11;this.m12-=b.m12;this.m20-=b.m20;this.m21-=
b.m21;this.m22-=b.m22},"JU.M34");c(Z,"mul33",function(b){this.m00*=b;this.m01*=b;this.m02*=b;this.m10*=b;this.m11*=b;this.m12*=b;this.m20*=b;this.m21*=b;this.m22*=b},"~N");c(Z,"transpose33",function(){var b=this.m01;this.m01=this.m10;this.m10=b;b=this.m02;this.m02=this.m20;this.m20=b;b=this.m12;this.m12=this.m21;this.m21=b});c(Z,"setXRot",function(b){var a=Math.cos(b);b=Math.sin(b);this.m00=1;this.m10=this.m02=this.m01=0;this.m11=a;this.m12=-b;this.m20=0;this.m21=b;this.m22=a},"~N");c(Z,"setYRot",
function(b){var a=Math.cos(b);b=Math.sin(b);this.m00=a;this.m01=0;this.m02=b;this.m10=0;this.m11=1;this.m12=0;this.m20=-b;this.m21=0;this.m22=a},"~N");c(Z,"setZRot",function(b){var a=Math.cos(b);b=Math.sin(b);this.m00=a;this.m01=-b;this.m02=0;this.m10=b;this.m11=a;this.m21=this.m20=this.m12=0;this.m22=1},"~N");c(Z,"determinant3",function(){return this.m00*(this.m11*this.m22-this.m21*this.m12)-this.m01*(this.m10*this.m22-this.m20*this.m12)+this.m02*(this.m10*this.m21-this.m20*this.m11)});c(Z,"err",
function(){throw new ArrayIndexOutOfBoundsException("matrix column/row out of bounds");});m("JU");x(["JU.M34"],"JU.M3",["JU.T3"],function(){var b=G(JU,"M3",JU.M34,java.io.Serializable);b.newA9=c(b,"newA9",function(a){var d=new JU.M3;d.setA(a);return d},"~A");b.newM3=c(b,"newM3",function(a){var d=new JU.M3;if(null==a)return d.setScale(1),d;d.m00=a.m00;d.m01=a.m01;d.m02=a.m02;d.m10=a.m10;d.m11=a.m11;d.m12=a.m12;d.m20=a.m20;d.m21=a.m21;d.m22=a.m22;return d},"JU.M3");c(b,"setScale",function(a){this.clear33();
this.m00=this.m11=this.m22=a},"~N");c(b,"setM3",function(a){this.setM33(a)},"JU.M34");c(b,"setA",function(a){this.m00=a[0];this.m01=a[1];this.m02=a[2];this.m10=a[3];this.m11=a[4];this.m12=a[5];this.m20=a[6];this.m21=a[7];this.m22=a[8]},"~A");c(b,"setElement",function(a,d,h){this.set33(a,d,h)},"~N,~N,~N");c(b,"getElement",function(a,d){return this.get33(a,d)},"~N,~N");c(b,"setRow",function(a,d,h,b){switch(a){case 0:this.m00=d;this.m01=h;this.m02=b;break;case 1:this.m10=d;this.m11=h;this.m12=b;break;
case 2:this.m20=d;this.m21=h;this.m22=b;break;default:this.err()}},"~N,~N,~N,~N");c(b,"setRowV",function(a,d){switch(a){case 0:this.m00=d.x;this.m01=d.y;this.m02=d.z;break;case 1:this.m10=d.x;this.m11=d.y;this.m12=d.z;break;case 2:this.m20=d.x;this.m21=d.y;this.m22=d.z;break;default:this.err()}},"~N,JU.T3");c(b,"setRowA",function(a,d){this.setRow33(a,d)},"~N,~A");f(b,"getRow",function(a,d){this.getRow33(a,d)},"~N,~A");c(b,"setColumn3",function(a,d,h,b){switch(a){case 0:this.m00=d;this.m10=h;this.m20=
b;break;case 1:this.m01=d;this.m11=h;this.m21=b;break;case 2:this.m02=d;this.m12=h;this.m22=b;break;default:this.err()}},"~N,~N,~N,~N");c(b,"setColumnV",function(a,d){switch(a){case 0:this.m00=d.x;this.m10=d.y;this.m20=d.z;break;case 1:this.m01=d.x;this.m11=d.y;this.m21=d.z;break;case 2:this.m02=d.x;this.m12=d.y;this.m22=d.z;break;default:this.err()}},"~N,JU.T3");c(b,"getColumnV",function(a,d){switch(a){case 0:d.x=this.m00;d.y=this.m10;d.z=this.m20;break;case 1:d.x=this.m01;d.y=this.m11;d.z=this.m21;
break;case 2:d.x=this.m02;d.y=this.m12;d.z=this.m22;break;default:this.err()}},"~N,JU.T3");c(b,"setColumnA",function(a,d){this.setColumn33(a,d)},"~N,~A");c(b,"getColumn",function(a,d){this.getColumn33(a,d)},"~N,~A");c(b,"add",function(a){this.add33(a)},"JU.M3");c(b,"sub",function(a){this.sub33(a)},"JU.M3");c(b,"transpose",function(){this.transpose33()});c(b,"transposeM",function(a){this.setM33(a);this.transpose33()},"JU.M3");c(b,"invertM",function(a){this.setM33(a);this.invert()},"JU.M3");c(b,"invert",
function(){var a=this.determinant3();0!=a&&(a=1/a,this.set9(this.m11*this.m22-this.m12*this.m21,this.m02*this.m21-this.m01*this.m22,this.m01*this.m12-this.m02*this.m11,this.m12*this.m20-this.m10*this.m22,this.m00*this.m22-this.m02*this.m20,this.m02*this.m10-this.m00*this.m12,this.m10*this.m21-this.m11*this.m20,this.m01*this.m20-this.m00*this.m21,this.m00*this.m11-this.m01*this.m10),this.scale(a))});c(b,"setAsXRotation",function(a){this.setXRot(a);return this},"~N");c(b,"setAsYRotation",function(a){this.setYRot(a);
return this},"~N");c(b,"setAsZRotation",function(a){this.setZRot(a);return this},"~N");c(b,"scale",function(a){this.mul33(a)},"~N");c(b,"mul",function(a){this.mul2(this,a)},"JU.M3");c(b,"mul2",function(a,d){this.set9(a.m00*d.m00+a.m01*d.m10+a.m02*d.m20,a.m00*d.m01+a.m01*d.m11+a.m02*d.m21,a.m00*d.m02+a.m01*d.m12+a.m02*d.m22,a.m10*d.m00+a.m11*d.m10+a.m12*d.m20,a.m10*d.m01+a.m11*d.m11+a.m12*d.m21,a.m10*d.m02+a.m11*d.m12+a.m12*d.m22,a.m20*d.m00+a.m21*d.m10+a.m22*d.m20,a.m20*d.m01+a.m21*d.m11+a.m22*d.m21,
a.m20*d.m02+a.m21*d.m12+a.m22*d.m22)},"JU.M3,JU.M3");f(b,"equals",function(a){return!C(a,"JU.M3")?!1:this.m00==a.m00&&this.m01==a.m01&&this.m02==a.m02&&this.m10==a.m10&&this.m11==a.m11&&this.m12==a.m12&&this.m20==a.m20&&this.m21==a.m21&&this.m22==a.m22},"~O");f(b,"hashCode",function(){return JU.T3.floatToIntBits(this.m00)^JU.T3.floatToIntBits(this.m01)^JU.T3.floatToIntBits(this.m02)^JU.T3.floatToIntBits(this.m10)^JU.T3.floatToIntBits(this.m11)^JU.T3.floatToIntBits(this.m12)^JU.T3.floatToIntBits(this.m20)^
JU.T3.floatToIntBits(this.m21)^JU.T3.floatToIntBits(this.m22)});c(b,"setZero",function(){this.clear33()});c(b,"set9",function(a,d,h,b,c,g,j,k,l){this.m00=a;this.m01=d;this.m02=h;this.m10=b;this.m11=c;this.m12=g;this.m20=j;this.m21=k;this.m22=l},"~N,~N,~N,~N,~N,~N,~N,~N,~N");f(b,"toString",function(){return"[["+this.m00+"\t"+this.m01+"\t"+this.m02+"]\n  ["+this.m10+"\t"+this.m11+"\t"+this.m12+"]\n  ["+this.m20+"\t"+this.m21+"\t"+this.m22+"]]"});c(b,"setAA",function(a){this.setAA33(a);return this},
"JU.A4");c(b,"setAsBallRotation",function(a,d,h){var b=Math.sqrt(d*d+h*h),c=b*a;if(0==c)return this.setScale(1),!1;a=Math.cos(c);c=Math.sin(c);h=-h/b;d/=b;b=a-1;this.m00=1+b*h*h;this.m01=this.m10=b*h*d;this.m20=-(this.m02=c*h);this.m11=1+b*d*d;this.m21=-(this.m12=c*d);this.m22=a;return!0},"~N,~N,~N");c(b,"isRotation",function(){return 0.001>Math.abs(this.determinant3()-1)})});m("JU");x(["JU.M34"],"JU.M4",["JU.T3"],function(){var b=s(function(){this.m33=this.m32=this.m31=this.m30=this.m23=this.m13=
this.m03=0;r(this,arguments)},JU,"M4",JU.M34);b.newA16=c(b,"newA16",function(a){var d=new JU.M4;d.m00=a[0];d.m01=a[1];d.m02=a[2];d.m03=a[3];d.m10=a[4];d.m11=a[5];d.m12=a[6];d.m13=a[7];d.m20=a[8];d.m21=a[9];d.m22=a[10];d.m23=a[11];d.m30=a[12];d.m31=a[13];d.m32=a[14];d.m33=a[15];return d},"~A");b.newM4=c(b,"newM4",function(a){var d=new JU.M4;if(null==a)return d.setIdentity(),d;d.setToM3(a);d.m03=a.m03;d.m13=a.m13;d.m23=a.m23;d.m30=a.m30;d.m31=a.m31;d.m32=a.m32;d.m33=a.m33;return d},"JU.M4");b.newMV=
c(b,"newMV",function(a,d){var h=new JU.M4;h.setMV(a,d);return h},"JU.M3,JU.T3");c(b,"setZero",function(){this.clear33();this.m03=this.m13=this.m23=this.m30=this.m31=this.m32=this.m33=0});c(b,"setIdentity",function(){this.setZero();this.m00=this.m11=this.m22=this.m33=1});c(b,"setM4",function(a){this.setM33(a);this.m03=a.m03;this.m13=a.m13;this.m23=a.m23;this.m30=a.m30;this.m31=a.m31;this.m32=a.m32;this.m33=a.m33;return this},"JU.M4");c(b,"setMV",function(a,d){this.setM33(a);this.setTranslation(d);
this.m33=1},"JU.M3,JU.T3");c(b,"setToM3",function(a){this.setM33(a);this.m03=this.m13=this.m23=this.m30=this.m31=this.m32=0;this.m33=1},"JU.M34");c(b,"setToAA",function(a){this.setIdentity();this.setAA33(a)},"JU.A4");c(b,"setA",function(a){this.m00=a[0];this.m01=a[1];this.m02=a[2];this.m03=a[3];this.m10=a[4];this.m11=a[5];this.m12=a[6];this.m13=a[7];this.m20=a[8];this.m21=a[9];this.m22=a[10];this.m23=a[11];this.m30=a[12];this.m31=a[13];this.m32=a[14];this.m33=a[15]},"~A");c(b,"setTranslation",function(a){this.m03=
a.x;this.m13=a.y;this.m23=a.z},"JU.T3");c(b,"setElement",function(a,d,h){if(3>a&&3>d)this.set33(a,d,h);else{(3<a||3<d)&&this.err();switch(a){case 0:this.m03=h;return;case 1:this.m13=h;return;case 2:this.m23=h;return}switch(d){case 0:this.m30=h;break;case 1:this.m31=h;break;case 2:this.m32=h;break;case 3:this.m33=h}}},"~N,~N,~N");c(b,"getElement",function(a,d){if(3>a&&3>d)return this.get33(a,d);if(3<a||3<d)return this.err(),0;switch(a){case 0:return this.m03;case 1:return this.m13;case 2:return this.m23;
default:switch(d){case 0:return this.m30;case 1:return this.m31;case 2:return this.m32;default:return this.m33}}},"~N,~N");c(b,"getTranslation",function(a){a.x=this.m03;a.y=this.m13;a.z=this.m23},"JU.T3");c(b,"getRotationScale",function(a){a.m00=this.m00;a.m01=this.m01;a.m02=this.m02;a.m10=this.m10;a.m11=this.m11;a.m12=this.m12;a.m20=this.m20;a.m21=this.m21;a.m22=this.m22},"JU.M3");c(b,"setRotationScale",function(a){this.m00=a.m00;this.m01=a.m01;this.m02=a.m02;this.m10=a.m10;this.m11=a.m11;this.m12=
a.m12;this.m20=a.m20;this.m21=a.m21;this.m22=a.m22},"JU.M3");c(b,"setRowA",function(a,d){3>a&&this.setRow33(a,d);switch(a){case 0:this.m03=d[3];return;case 1:this.m13=d[3];return;case 2:this.m23=d[3];return;case 3:this.m30=d[0];this.m31=d[1];this.m32=d[2];this.m33=d[3];return}this.err()},"~N,~A");f(b,"getRow",function(a,d){3>a&&this.getRow33(a,d);switch(a){case 0:d[3]=this.m03;return;case 1:d[3]=this.m13;return;case 2:d[3]=this.m23;return;case 3:d[0]=this.m30;d[1]=this.m31;d[2]=this.m32;d[3]=this.m33;
return}this.err()},"~N,~A");c(b,"setColumn4",function(a,d,h,b,c){0==a?(this.m00=d,this.m10=h,this.m20=b,this.m30=c):1==a?(this.m01=d,this.m11=h,this.m21=b,this.m31=c):2==a?(this.m02=d,this.m12=h,this.m22=b,this.m32=c):3==a?(this.m03=d,this.m13=h,this.m23=b,this.m33=c):this.err()},"~N,~N,~N,~N,~N");c(b,"setColumnA",function(a,d){3>a&&this.setColumn33(a,d);switch(a){case 0:this.m30=d[3];break;case 1:this.m31=d[3];break;case 2:this.m32=d[3];break;case 3:this.m03=d[0];this.m13=d[1];this.m23=d[2];this.m33=
d[3];break;default:this.err()}},"~N,~A");c(b,"getColumn",function(a,d){3>a&&this.getColumn33(a,d);switch(a){case 0:d[3]=this.m30;break;case 1:d[3]=this.m31;break;case 2:d[3]=this.m32;break;case 3:d[0]=this.m03;d[1]=this.m13;d[2]=this.m23;d[3]=this.m33;break;default:this.err()}},"~N,~A");c(b,"sub",function(a){this.sub33(a);this.m03-=a.m03;this.m13-=a.m13;this.m23-=a.m23;this.m30-=a.m30;this.m31-=a.m31;this.m32-=a.m32;this.m33-=a.m33},"JU.M4");c(b,"add",function(a){this.m03+=a.x;this.m13+=a.y;this.m23+=
a.z},"JU.T3");c(b,"transpose",function(){this.transpose33();var a=this.m03;this.m03=this.m30;this.m30=a;a=this.m13;this.m13=this.m31;this.m31=a;a=this.m23;this.m23=this.m32;this.m32=a});c(b,"invert",function(){var a=this.determinant4();if(0==a)return this;a=1/a;this.set(this.m11*(this.m22*this.m33-this.m23*this.m32)+this.m12*(this.m23*this.m31-this.m21*this.m33)+this.m13*(this.m21*this.m32-this.m22*this.m31),this.m21*(this.m02*this.m33-this.m03*this.m32)+this.m22*(this.m03*this.m31-this.m01*this.m33)+
this.m23*(this.m01*this.m32-this.m02*this.m31),this.m31*(this.m02*this.m13-this.m03*this.m12)+this.m32*(this.m03*this.m11-this.m01*this.m13)+this.m33*(this.m01*this.m12-this.m02*this.m11),this.m01*(this.m13*this.m22-this.m12*this.m23)+this.m02*(this.m11*this.m23-this.m13*this.m21)+this.m03*(this.m12*this.m21-this.m11*this.m22),this.m12*(this.m20*this.m33-this.m23*this.m30)+this.m13*(this.m22*this.m30-this.m20*this.m32)+this.m10*(this.m23*this.m32-this.m22*this.m33),this.m22*(this.m00*this.m33-this.m03*
this.m30)+this.m23*(this.m02*this.m30-this.m00*this.m32)+this.m20*(this.m03*this.m32-this.m02*this.m33),this.m32*(this.m00*this.m13-this.m03*this.m10)+this.m33*(this.m02*this.m10-this.m00*this.m12)+this.m30*(this.m03*this.m12-this.m02*this.m13),this.m02*(this.m13*this.m20-this.m10*this.m23)+this.m03*(this.m10*this.m22-this.m12*this.m20)+this.m00*(this.m12*this.m23-this.m13*this.m22),this.m13*(this.m20*this.m31-this.m21*this.m30)+this.m10*(this.m21*this.m33-this.m23*this.m31)+this.m11*(this.m23*this.m30-
this.m20*this.m33),this.m23*(this.m00*this.m31-this.m01*this.m30)+this.m20*(this.m01*this.m33-this.m03*this.m31)+this.m21*(this.m03*this.m30-this.m00*this.m33),this.m33*(this.m00*this.m11-this.m01*this.m10)+this.m30*(this.m01*this.m13-this.m03*this.m11)+this.m31*(this.m03*this.m10-this.m00*this.m13),this.m03*(this.m11*this.m20-this.m10*this.m21)+this.m00*(this.m13*this.m21-this.m11*this.m23)+this.m01*(this.m10*this.m23-this.m13*this.m20),this.m10*(this.m22*this.m31-this.m21*this.m32)+this.m11*(this.m20*
this.m32-this.m22*this.m30)+this.m12*(this.m21*this.m30-this.m20*this.m31),this.m20*(this.m02*this.m31-this.m01*this.m32)+this.m21*(this.m00*this.m32-this.m02*this.m30)+this.m22*(this.m01*this.m30-this.m00*this.m31),this.m30*(this.m02*this.m11-this.m01*this.m12)+this.m31*(this.m00*this.m12-this.m02*this.m10)+this.m32*(this.m01*this.m10-this.m00*this.m11),this.m00*(this.m11*this.m22-this.m12*this.m21)+this.m01*(this.m12*this.m20-this.m10*this.m22)+this.m02*(this.m10*this.m21-this.m11*this.m20));this.scale(a);
return this});c(b,"set",function(a,d,h,b,c,g,j,k,l,f,n,q,v,B,H,L){this.m00=a;this.m01=d;this.m02=h;this.m03=b;this.m10=c;this.m11=g;this.m12=j;this.m13=k;this.m20=l;this.m21=f;this.m22=n;this.m23=q;this.m30=v;this.m31=B;this.m32=H;this.m33=L},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");c(b,"determinant4",function(){return(this.m00*this.m11-this.m01*this.m10)*(this.m22*this.m33-this.m23*this.m32)-(this.m00*this.m12-this.m02*this.m10)*(this.m21*this.m33-this.m23*this.m31)+(this.m00*this.m13-
this.m03*this.m10)*(this.m21*this.m32-this.m22*this.m31)+(this.m01*this.m12-this.m02*this.m11)*(this.m20*this.m33-this.m23*this.m30)-(this.m01*this.m13-this.m03*this.m11)*(this.m20*this.m32-this.m22*this.m30)+(this.m02*this.m13-this.m03*this.m12)*(this.m20*this.m31-this.m21*this.m30)});c(b,"scale",function(a){this.mul33(a);this.m03*=a;this.m13*=a;this.m23*=a;this.m30*=a;this.m31*=a;this.m32*=a;this.m33*=a},"~N");c(b,"mul",function(a){this.mul2(this,a)},"JU.M4");c(b,"mul2",function(a,d){this.set(a.m00*
d.m00+a.m01*d.m10+a.m02*d.m20+a.m03*d.m30,a.m00*d.m01+a.m01*d.m11+a.m02*d.m21+a.m03*d.m31,a.m00*d.m02+a.m01*d.m12+a.m02*d.m22+a.m03*d.m32,a.m00*d.m03+a.m01*d.m13+a.m02*d.m23+a.m03*d.m33,a.m10*d.m00+a.m11*d.m10+a.m12*d.m20+a.m13*d.m30,a.m10*d.m01+a.m11*d.m11+a.m12*d.m21+a.m13*d.m31,a.m10*d.m02+a.m11*d.m12+a.m12*d.m22+a.m13*d.m32,a.m10*d.m03+a.m11*d.m13+a.m12*d.m23+a.m13*d.m33,a.m20*d.m00+a.m21*d.m10+a.m22*d.m20+a.m23*d.m30,a.m20*d.m01+a.m21*d.m11+a.m22*d.m21+a.m23*d.m31,a.m20*d.m02+a.m21*d.m12+a.m22*
d.m22+a.m23*d.m32,a.m20*d.m03+a.m21*d.m13+a.m22*d.m23+a.m23*d.m33,a.m30*d.m00+a.m31*d.m10+a.m32*d.m20+a.m33*d.m30,a.m30*d.m01+a.m31*d.m11+a.m32*d.m21+a.m33*d.m31,a.m30*d.m02+a.m31*d.m12+a.m32*d.m22+a.m33*d.m32,a.m30*d.m03+a.m31*d.m13+a.m32*d.m23+a.m33*d.m33)},"JU.M4,JU.M4");c(b,"transform",function(a){this.transform2(a,a)},"JU.T4");c(b,"transform2",function(a,d){d.set4(this.m00*a.x+this.m01*a.y+this.m02*a.z+this.m03*a.w,this.m10*a.x+this.m11*a.y+this.m12*a.z+this.m13*a.w,this.m20*a.x+this.m21*a.y+
this.m22*a.z+this.m23*a.w,this.m30*a.x+this.m31*a.y+this.m32*a.z+this.m33*a.w)},"JU.T4,JU.T4");c(b,"rotTrans",function(a){this.rotTrans2(a,a)},"JU.T3");c(b,"rotTrans2",function(a,d){d.set(this.m00*a.x+this.m01*a.y+this.m02*a.z+this.m03,this.m10*a.x+this.m11*a.y+this.m12*a.z+this.m13,this.m20*a.x+this.m21*a.y+this.m22*a.z+this.m23);return d},"JU.T3,JU.T3");c(b,"setAsXYRotation",function(a){this.setIdentity();var d=Math.cos(a);a=Math.sin(a);this.m22=d;this.m23=-a;this.m32=a;this.m33=d;return this},
"~N");c(b,"setAsYZRotation",function(a){this.setIdentity();var d=Math.cos(a);a=Math.sin(a);this.m00=d;this.m03=-a;this.m30=a;this.m33=d;return this},"~N");c(b,"setAsXZRotation",function(a){this.setIdentity();var d=Math.cos(a);a=Math.sin(a);this.m11=d;this.m13=-a;this.m31=a;this.m33=d;return this},"~N");f(b,"equals",function(a){return!C(a,"JU.M4")?!1:this.m00==a.m00&&this.m01==a.m01&&this.m02==a.m02&&this.m03==a.m03&&this.m10==a.m10&&this.m11==a.m11&&this.m12==a.m12&&this.m13==a.m13&&this.m20==a.m20&&
this.m21==a.m21&&this.m22==a.m22&&this.m23==a.m23&&this.m30==a.m30&&this.m31==a.m31&&this.m32==a.m32&&this.m33==a.m33},"~O");f(b,"hashCode",function(){return JU.T3.floatToIntBits(this.m00)^JU.T3.floatToIntBits(this.m01)^JU.T3.floatToIntBits(this.m02)^JU.T3.floatToIntBits(this.m03)^JU.T3.floatToIntBits(this.m10)^JU.T3.floatToIntBits(this.m11)^JU.T3.floatToIntBits(this.m12)^JU.T3.floatToIntBits(this.m13)^JU.T3.floatToIntBits(this.m20)^JU.T3.floatToIntBits(this.m21)^JU.T3.floatToIntBits(this.m22)^JU.T3.floatToIntBits(this.m23)^
JU.T3.floatToIntBits(this.m30)^JU.T3.floatToIntBits(this.m31)^JU.T3.floatToIntBits(this.m32)^JU.T3.floatToIntBits(this.m33)});f(b,"toString",function(){return"[["+this.m00+"\t"+this.m01+"\t"+this.m02+"\t"+this.m03+"]\n  ["+this.m10+"\t"+this.m11+"\t"+this.m12+"\t"+this.m13+"]\n  ["+this.m20+"\t"+this.m21+"\t"+this.m22+"\t"+this.m23+"]\n  ["+this.m30+"\t"+this.m31+"\t"+this.m32+"\t"+this.m33+"]]"});c(b,"round",function(a){this.m00=this.rnd(this.m00,a);this.m01=this.rnd(this.m01,a);this.m02=this.rnd(this.m02,
a);this.m03=this.rnd(this.m03,a);this.m10=this.rnd(this.m10,a);this.m11=this.rnd(this.m11,a);this.m12=this.rnd(this.m12,a);this.m13=this.rnd(this.m13,a);this.m20=this.rnd(this.m20,a);this.m21=this.rnd(this.m21,a);this.m22=this.rnd(this.m22,a);this.m23=this.rnd(this.m23,a);this.m30=this.rnd(this.m30,a);this.m31=this.rnd(this.m31,a);this.m32=this.rnd(this.m32,a);this.m33=this.rnd(this.m33,a);return this},"~N");c(b,"rnd",function(a,d){return Math.abs(a)<d?0:a},"~N,~N")});m("JU");x(["java.io.OutputStream",
"javajs.api.GenericOutputChannel"],"JU.OC",["java.io.BufferedWriter","$.ByteArrayOutputStream","$.OutputStreamWriter","JU.Base64","$.SB"],function(){var b=s(function(){this.bw=this.fileName=this.bytePoster=null;this.isLocalFile=!1;this.byteCount=0;this.closed=this.isCanceled=!1;this.type=this.sb=this.os=null;this.$isBase64=!1;this.bytes=this.os0=null;this.bigEndian=!0;r(this,arguments)},JU,"OC",java.io.OutputStream,javajs.api.GenericOutputChannel);u(b,function(){K(this,JU.OC,[])});u(b,function(a){K(this,
JU.OC,[]);this.setParams(null,a,!1,null)},"~S");c(b,"setParams",function(a,d,h,b){this.bytePoster=a;if(this.$isBase64=";base64,".equals(d))d=null,this.os0=b,b=null;this.fileName=d;this.os=b;this.isLocalFile=null!=d&&!JU.OC.isRemote(d);h&&(!this.$isBase64&&null!=b)&&(this.bw=new java.io.BufferedWriter(new java.io.OutputStreamWriter(b)));return this},"javajs.api.BytePoster,~S,~B,java.io.OutputStream");f(b,"isBigEndian",function(){return this.bigEndian});c(b,"setBigEndian",function(a){this.bigEndian=
a},"~B");c(b,"setBytes",function(a){this.bytes=a;return this},"~A");c(b,"getFileName",function(){return this.fileName});c(b,"getName",function(){return null==this.fileName?null:this.fileName.substring(this.fileName.lastIndexOf("/")+1)});c(b,"getByteCount",function(){return this.byteCount});c(b,"setType",function(a){this.type=a},"~S");c(b,"getType",function(){return this.type});c(b,"append",function(a){try{if(null!=this.bw)this.bw.write(a);else if(null==this.os)null==this.sb&&(this.sb=new JU.SB),this.sb.append(a);
else{var d=a.getBytes();this.os.write(d,0,d.length);this.byteCount+=d.length;return this}}catch(h){if(!E(h,"java.io.IOException"))throw h;}this.byteCount+=a.length;return this},"~S");f(b,"reset",function(){this.sb=null;this.initOS()});c(b,"initOS",function(){if(null!=this.sb){var a=this.sb.toString();this.reset();this.append(a)}else{try{this.os=null,null==this.os&&(this.os=new java.io.ByteArrayOutputStream),null!=this.bw&&(this.bw.close(),this.bw=new java.io.BufferedWriter(new java.io.OutputStreamWriter(this.os)))}catch(d){if(E(d,
Exception))System.out.println(d.toString());else throw d;}this.byteCount=0}});f(b,"writeByteAsInt",function(a){null==this.os&&this.initOS();this.os.writeByteAsInt(a);this.byteCount++},"~N");f(b,"write",function(a,d,h){null==this.os&&this.initOS();0>h&&(h=a.length-d);try{this.os.write(a,d,h)}catch(b){if(!E(b,"java.io.IOException"))throw b;}this.byteCount+=h},"~A,~N,~N");f(b,"writeShort",function(a){this.isBigEndian()?(this.writeByteAsInt(a>>8),this.writeByteAsInt(a)):(this.writeByteAsInt(a),this.writeByteAsInt(a>>
8))},"~N");f(b,"writeLong",function(a){this.isBigEndian()?(this.writeInt(a>>32&4294967295),this.writeInt(a&4294967295)):(this.writeByteAsInt(a>>56),this.writeByteAsInt(a>>48),this.writeByteAsInt(a>>40),this.writeByteAsInt(a>>32),this.writeByteAsInt(a>>24),this.writeByteAsInt(a>>16),this.writeByteAsInt(a>>8),this.writeByteAsInt(a))},"~N");c(b,"write",function(a){this.write(a,0,a.length)},"~A");c(b,"cancel",function(){this.isCanceled=!0;this.closeChannel()});f(b,"closeChannel",function(){if(this.closed)return null;
try{null!=this.bw?(this.bw.flush(),this.bw.close()):null!=this.os&&(this.os.flush(),this.os.close()),null!=this.os0&&this.isCanceled&&(this.os0.flush(),this.os0.close())}catch(a){if(!E(a,Exception))throw a;}if(this.isCanceled)return this.closed=!0,null;if(null==this.fileName){if(this.$isBase64){var d=this.getBase64();null!=this.os0&&(this.os=this.os0,this.append(d));this.sb=new JU.SB;this.sb.append(d);this.$isBase64=!1;return this.closeChannel()}return null==this.sb?null:this.sb.toString()}this.closed=
!0;if(!this.isLocalFile){d=this.postByteArray();if(null==d||d.startsWith("java.net"))this.byteCount=-1;return d}var h=d=null,d=self.J2S||Jmol,h="function"==typeof this.fileName?this.fileName:null;if(null!=d){var b=null==this.sb?this.toByteArray():this.sb.toString();null==h?d.doAjax(this.fileName,null,b,null==this.sb):d.applyFunc(this.fileName,b)}return null});c(b,"isBase64",function(){return this.$isBase64});c(b,"getBase64",function(){return JU.Base64.getBase64(this.toByteArray()).toString()});c(b,
"toByteArray",function(){return null!=this.bytes?this.bytes:C(this.os,"java.io.ByteArrayOutputStream")?this.os.toByteArray():null});c(b,"close",function(){this.closeChannel()});f(b,"toString",function(){if(null!=this.bw)try{this.bw.flush()}catch(a){if(!E(a,"java.io.IOException"))throw a;}return null!=this.sb?this.closeChannel():this.byteCount+" bytes"});c(b,"postByteArray",function(){var a=null==this.sb?this.toByteArray():this.sb.toString().getBytes();return this.bytePoster.postByteArray(this.fileName,
a)});b.isRemote=c(b,"isRemote",function(a){if(null==a)return!1;a=JU.OC.urlTypeIndex(a);return 0<=a&&4>a},"~S");b.isLocal=c(b,"isLocal",function(a){return null!=a&&!JU.OC.isRemote(a)},"~S");b.urlTypeIndex=c(b,"urlTypeIndex",function(a){if(null==a)return-2;for(var d=0;d<JU.OC.urlPrefixes.length;++d)if(a.startsWith(JU.OC.urlPrefixes[d]))return d;return-1},"~S");f(b,"writeInt",function(a){this.bigEndian?(this.writeByteAsInt(a>>24),this.writeByteAsInt(a>>16),this.writeByteAsInt(a>>8),this.writeByteAsInt(a)):
(this.writeByteAsInt(a),this.writeByteAsInt(a>>8),this.writeByteAsInt(a>>16),this.writeByteAsInt(a>>24))},"~N");c(b,"writeFloat",function(a){this.writeInt(0==a?0:Float.floatToIntBits(a))},"~N");b.urlPrefixes=z(-1,"http: https: sftp: ftp: file: cache:".split(" "))});m("JU");x(["JU.T3"],"JU.P3",null,function(){var b=G(JU,"P3",JU.T3);b.newP=c(b,"newP",function(a){var d=new JU.P3;d.x=a.x;d.y=a.y;d.z=a.z;return d},"JU.T3");b.getUnlikely=c(b,"getUnlikely",function(){return null==JU.P3.unlikely?JU.P3.unlikely=
JU.P3.new3(3.141592653589793,2.718281828459045,8.539734222673566):JU.P3.unlikely});b.new3=c(b,"new3",function(a,d,h){var b=new JU.P3;b.x=a;b.y=d;b.z=h;return b},"~N,~N,~N");b.newA=c(b,"newA",function(a){return JU.P3.new3(a[0],a[1],a[2])},"~A");b.unlikely=null});m("JU");x(["JU.T3i"],"JU.P3i",null,function(){var b=G(JU,"P3i",JU.T3i);b.new3=c(b,"new3",function(a,d,h){var b=new JU.P3i;b.x=a;b.y=d;b.z=h;return b},"~N,~N,~N")});m("JU");x(["JU.T4"],"JU.P4",null,function(){var b=G(JU,"P4",JU.T4);b.new4=c(b,
"new4",function(a,d,h,b){var c=new JU.P4;c.set4(a,d,h,b);return c},"~N,~N,~N,~N");b.newPt=c(b,"newPt",function(a){var d=new JU.P4;d.set4(a.x,a.y,a.z,a.w);return d},"JU.P4");c(b,"distance4",function(a){var d=this.x-a.x,h=this.y-a.y,b=this.z-a.z;a=this.w-a.w;return Math.sqrt(d*d+h*h+b*b+a*a)},"JU.P4")});m("JU");x(null,"JU.PT",["java.util.Arrays","JU.AU","$.DF","$.SB"],function(){var b=G(JU,"PT",null);b.parseInt=c(b,"parseInt",function(a){return JU.PT.parseIntNext(a,D(-1,[0]))},"~S");b.parseIntNext=
c(b,"parseIntNext",function(a,d){var h=a.length;return 0>d[0]||d[0]>=h?-2147483648:JU.PT.parseIntChecked(a,h,d)},"~S,~A");b.parseIntChecked=c(b,"parseIntChecked",function(a,d,h){var b=!1,c=0,g=h[0];if(0>g)return-2147483648;for(var j;g<d&&JU.PT.isWhiteSpace(a,g);)++g;var k=!1;g<d&&45==a.charAt(g).charCodeAt(0)&&(k=!0,++g);for(;g<d&&48<=(j=a.charAt(g).charCodeAt(0))&&57>=j;)c=10*c+(j-48),b=!0,++g;b?k&&(c=-c):c=-2147483648;h[0]=g;return c},"~S,~N,~A");b.isWhiteSpace=c(b,"isWhiteSpace",function(a,d){var h;
return 0<=d&&(" "==(h=a.charAt(d))||"\t"==h||"\n"==h)},"~S,~N");b.parseFloatChecked=c(b,"parseFloatChecked",function(a,d,h,b){var c=!1,g=h[0];if(b&&a.indexOf("\n")!=a.lastIndexOf("\n"))return NaN;for(;g<d&&JU.PT.isWhiteSpace(a,g);)++g;var j=!1;g<d&&"-"==a.charAt(g)&&(++g,j=!0);for(var k=0,l=0,f=0;g<d&&48<=(k=a.charAt(g).charCodeAt(0))&&57>=k;)l=10*l+1*(k-48),++g,c=!0;var n=!1,q=0,v=0==l?-1:0;if(46==k)for(n=!0;++g<d&&48<=(k=a.charAt(g).charCodeAt(0))&&57>=k;){c=!0;if(0>v){if(48==k){v--;continue}v=
-v}q<JU.PT.decimalScale.length&&(f=10*f+1*(k-48),q++)}c?0<f?(c=f*JU.PT.decimalScale[q-1],c=1<v?v-2<JU.PT.decimalScale.length?c*JU.PT.decimalScale[v-2]:c*Math.pow(10,1-v):c+l):c=l:c=NaN;l=!1;if(g<d&&(69==k||101==k||68==k)){l=!0;if(++g>=d)return NaN;k=a.charAt(g).charCodeAt(0);if(43==k&&++g>=d)return NaN;h[0]=g;g=JU.PT.parseIntChecked(a,d,h);if(-2147483648==g)return NaN;0<g&&g<=JU.PT.tensScale.length?c*=JU.PT.tensScale[g-1]:0>g&&-g<=JU.PT.decimalScale.length?c*=JU.PT.decimalScale[-g-1]:0!=g&&(c*=Math.pow(10,
g))}else h[0]=g;j&&(c=-c);Infinity==c&&(c=3.4028235E38);return!b||(!l||n)&&JU.PT.checkTrailingText(a,h[0],d)?c:NaN},"~S,~N,~A,~B");b.checkTrailingText=c(b,"checkTrailingText",function(a,d,h){for(var b;d<h&&(JU.PT.isWhitespace(b=a.charAt(d))||";"==b);)++d;return d==h},"~S,~N,~N");b.parseFloatArray=c(b,"parseFloatArray",function(a){return JU.PT.parseFloatArrayNext(a,D(1,0),null,null,null)},"~S");b.parseFloatArrayInfested=c(b,"parseFloatArrayInfested",function(a,d){for(var h=d.length,b=a.length,c=0,
g=0,j=0;0<=j&&j<h&&c<b;j++){for(var k;Float.isNaN(k=JU.PT.parseFloat(a[c++]))&&c<b;);Float.isNaN(k)||(d[g=j]=k);if(c==b)break}return g+1},"~A,~A");b.parseFloatArrayNext=c(b,"parseFloatArrayNext",function(a,d,h,b,c){var g=0,j=d[0];0<=j&&(null!=b&&(g=a.indexOf(b,j),0<=g&&(d[0]=g+b.length)),a=a.substring(d[0]),j=null==c?-1:a.indexOf(c),0>j?j=a.length:a=a.substring(0,j),d[0]+=j+1,a=JU.PT.getTokens(a),null==h&&(h=M(a.length,0)),g=JU.PT.parseFloatArrayInfested(a,h));if(null==h)return M(0,0);for(a=g;a<h.length;a++)h[a]=
NaN;return h},"~S,~A,~A,~S,~S");b.parseFloatRange=c(b,"parseFloatRange",function(a,d,h){var b=a.length;d>b&&(d=b);return 0>h[0]||h[0]>=d?NaN:JU.PT.parseFloatChecked(a,d,h,!1)},"~S,~N,~A");b.parseFloatNext=c(b,"parseFloatNext",function(a,d){var h=null==a?-1:a.length;return 0>d[0]||d[0]>=h?NaN:JU.PT.parseFloatChecked(a,h,d,!1)},"~S,~A");b.parseFloatStrict=c(b,"parseFloatStrict",function(a){var d=a.length;return 0==d?NaN:JU.PT.parseFloatChecked(a,d,D(-1,[0]),!0)},"~S");b.parseFloat=c(b,"parseFloat",
function(a){return JU.PT.parseFloatNext(a,D(-1,[0]))},"~S");b.parseIntRadix=c(b,"parseIntRadix",function(a,d){return Integer.parseIntRadix(a,d)},"~S,~N");b.getTokens=c(b,"getTokens",function(a){return JU.PT.getTokensAt(a,0)},"~S");b.parseToken=c(b,"parseToken",function(a){return JU.PT.parseTokenNext(a,D(-1,[0]))},"~S");b.parseTrimmed=c(b,"parseTrimmed",function(a){return JU.PT.parseTrimmedRange(a,0,a.length)},"~S");b.parseTrimmedAt=c(b,"parseTrimmedAt",function(a,d){return JU.PT.parseTrimmedRange(a,
d,a.length)},"~S,~N");b.parseTrimmedRange=c(b,"parseTrimmedRange",function(a,d,h){var b=a.length;h<b&&(b=h);return b<d?"":JU.PT.parseTrimmedChecked(a,d,b)},"~S,~N,~N");b.getTokensAt=c(b,"getTokensAt",function(a,d){if(null==a)return null;var h=a.length;if(0>d||d>h)return null;var b=JU.PT.countTokens(a,d),c=Array(b),g=D(1,0);g[0]=d;for(var j=0;j<b;++j)c[j]=JU.PT.parseTokenChecked(a,h,g);return c},"~S,~N");b.countChar=c(b,"countChar",function(a,d){for(var h=0,b=a.lastIndexOf(d)+1;0<=--b;)a.charAt(b)==
d&&h++;return h},"~S,~S");b.countTokens=c(b,"countTokens",function(a,d){var h=0;if(null!=a)for(var b=a.length;;){for(;d<b&&JU.PT.isWhiteSpace(a,d);)++d;if(d==b)break;++h;do++d;while(d<b&&!JU.PT.isWhiteSpace(a,d))}return h},"~S,~N");b.parseTokenNext=c(b,"parseTokenNext",function(a,d){var h=a.length;return 0>d[0]||d[0]>=h?null:JU.PT.parseTokenChecked(a,h,d)},"~S,~A");b.parseTokenRange=c(b,"parseTokenRange",function(a,d,h){var b=a.length;d>b&&(d=b);return 0>h[0]||h[0]>=d?null:JU.PT.parseTokenChecked(a,
d,h)},"~S,~N,~A");b.parseTokenChecked=c(b,"parseTokenChecked",function(a,d,h){for(var b=h[0];b<d&&JU.PT.isWhiteSpace(a,b);)++b;for(var c=b;b<d&&!JU.PT.isWhiteSpace(a,b);)++b;h[0]=b;return c==b?null:a.substring(c,b)},"~S,~N,~A");b.parseTrimmedChecked=c(b,"parseTrimmedChecked",function(a,d,h){for(;d<h&&JU.PT.isWhiteSpace(a,d);)++d;for(h-=1;h>=d&&JU.PT.isWhiteSpace(a,h);)--h;return h<d?"":a.substring(d,h+1)},"~S,~N,~N");b.dVal=c(b,"dVal",function(a){if(null==a)throw new NumberFormatException("null");
var d=parseFloat(a);if(isNaN(d))throw new NumberFormatException("Not a Number : "+a);return d},"~S");b.fVal=c(b,"fVal",function(a){return this.dVal(a)},"~S");b.parseIntRange=c(b,"parseIntRange",function(a,d,h){var b=a.length;d>b&&(d=b);return 0>h[0]||h[0]>=d?-2147483648:JU.PT.parseIntChecked(a,d,h)},"~S,~N,~A");b.parseFloatArrayData=c(b,"parseFloatArrayData",function(a,d){JU.PT.parseFloatArrayDataN(a,d,d.length)},"~A,~A");b.parseFloatArrayDataN=c(b,"parseFloatArrayDataN",function(a,d,h){for(;0<=--h;)d[h]=
h>=a.length?NaN:JU.PT.parseFloat(a[h])},"~A,~A,~N");b.split=c(b,"split",function(a,d){if(0==a.length)return[];var h=1,b=a.indexOf(d),c,g=d.length;if(0>b||0==g)return c=Array(1),c[0]=a,c;for(var j=a.length-g;0<=b&&b<j;h++)b=a.indexOf(d,b+g);c=Array(h);for(var k=b=0,l=0;0<=(k=a.indexOf(d,b))&&l+1<h;)c[l++]=a.substring(b,k),b=k+g;a.indexOf(d,j)!=j&&(j+=g);c[l]=a.substring(b,j);return c},"~S,~S");b.getQuotedStringAt=c(b,"getQuotedStringAt",function(a,d){var h=D(-1,[d]);return JU.PT.getQuotedStringNext(a,
h)},"~S,~N");b.getQuotedStringNext=c(b,"getQuotedStringNext",function(a,d){var h=d[0];if(0>h||0>(h=a.indexOf('"',h)))return"";for(var b=h+1,c=a.length;++h<c&&'"'!=a.charAt(h);)"\\"==a.charAt(h)&&h++;d[0]=h+1;return a.substring(b,h)},"~S,~A");b.getQuotedOrUnquotedAttribute=c(b,"getQuotedOrUnquotedAttribute",function(a,d){if(null==a||null==d)return null;var h=a.toLowerCase().indexOf(d.toLowerCase()+"=");if(0>h||(h=h+d.length+1)>=a.length)return"";var b=a.charAt(h);switch(b.charCodeAt(0)){case 39:case 34:h++;
break;default:b=" ",a+=" "}b=a.indexOf(b,h);return 0>b?null:a.substring(h,b)},"~S,~S");b.getCSVString=c(b,"getCSVString",function(a,d){var h=d[1];if(0>h||0>(h=a.indexOf('"',h)))return null;for(var b=d[0]=h,c=a.length,g=!1,j=!1;++h<c&&('"'!=a.charAt(h)||(g=h+1<c&&'"'==a.charAt(h+1)));)g&&(g=!1,j=!0,h++);if(h>=c)return d[1]=-1,null;d[1]=h+1;h=a.substring(b+1,h);return j?JU.PT.rep(JU.PT.rep(h,'""',"\x00"),"\x00",'"'):h},"~S,~A");b.isOneOf=c(b,"isOneOf",function(a,d){if(0==d.length||0<=a.indexOf(";"))return!1;
";"!=d.charAt(0)&&(d=";"+d+";");return 0<=d.indexOf(";"+a+";")},"~S,~S");b.getQuotedAttribute=c(b,"getQuotedAttribute",function(a,d){var h=a.indexOf(d+"=");return 0>h?null:JU.PT.getQuotedStringAt(a,h)},"~S,~S");b.approx=c(b,"approx",function(a,d){return Math.round(a*d)/d},"~N,~N");b.rep=c(b,"rep",function(a,d,h){if(null==a||0==d.length||0>a.indexOf(d))return a;var b=0<=h.indexOf(d);do a=a.$replace(d,h);while(!b&&0<=a.indexOf(d));return a},"~S,~S,~S");b.formatF=c(b,"formatF",function(a,d,h,b,c){return JU.PT.formatS(JU.DF.formatDecimal(a,
h),d,0,b,c)},"~N,~N,~N,~B,~B");b.formatD=c(b,"formatD",function(a,d,h,b,c){return JU.PT.formatS(JU.DF.formatDecimal(a,-1-h),d,0,b,c)},"~N,~N,~N,~B,~B");b.formatS=c(b,"formatS",function(a,d,h,b,c){if(null==a)return"";var g=a.length;2147483647!=h&&0<h&&h<g?a=a.substring(0,h):0>h&&0<=g+h&&(a=a.substring(g+h+1));h=d-a.length;if(0>=h)return a;d=c&&!b&&"-"==a.charAt(0);c=c?"0":" ";var j=d?"-":c,g=new JU.SB;b&&g.append(a);for(g.appendC(j);0<--h;)g.appendC(c);b||g.append(d?c+a.substring(1):a);return g.toString()},
"~S,~N,~N,~B,~B");b.replaceWithCharacter=c(b,"replaceWithCharacter",function(a,d,h){if(null==a)return null;for(var b=d.length;0<=--b;)a=a.$replace(d.charAt(b),h);return a},"~S,~S,~S");b.replaceAllCharacters=c(b,"replaceAllCharacters",function(a,d,h){for(var b=d.length;0<=--b;){var c=d.substring(b,b+1);a=JU.PT.rep(a,c,h)}return a},"~S,~S,~S");b.trim=c(b,"trim",function(a,d){if(null==a||0==a.length)return a;if(0==d.length)return a.trim();for(var h=a.length,b=0;b<h&&0<=d.indexOf(a.charAt(b));)b++;for(h=
a.length-1;h>b&&0<=d.indexOf(a.charAt(h));)h--;return a.substring(b,h+1)},"~S,~S");b.trimQuotes=c(b,"trimQuotes",function(a){return null!=a&&1<a.length&&a.startsWith('"')&&a.endsWith('"')?a.substring(1,a.length-1):a},"~S");b.isNonStringPrimitive=c(b,"isNonStringPrimitive",function(a){return"number"==typeof a||"boolean"==typeof a?!0:C(a,Number)||C(a,Boolean)},"~O");b.toJSON=c(b,"toJSON",function(a,d){if(null==d)return JU.PT.packageJSON(a,null);if(JU.PT.isNonStringPrimitive(d))return JU.PT.packageJSON(a,
d.toString());for(var h=null,b=null;;){if("string"==typeof d){h=d;"undefined"==typeof h&&(h="null");0!=h.indexOf('{"')&&(h=JU.PT.esc(h));break}if(C(d,"javajs.api.JSONEncodable")){if(null==(h=d.toJSON()))h="null";break}b=new JU.SB;if(C(d,"java.util.Map")){b.append("{ ");var c="",g=d.keySet(),j=g.toArray(Array(g.size()));java.util.Arrays.sort(j);for(var g=0,k=j.length;g<k;g++){var l=j[g];null==l&&(l="null");b.append(c).append(JU.PT.packageJSON(l,JU.PT.toJSON(null,d.get(l))));c=","}b.append(" }");break}if(C(d,
"JU.Lst")){b.append("[ ");k=d.size();for(g=0;g<k;g++)0<g&&b.appendC(","),b.append(JU.PT.toJSON(null,d.get(g)));b.append(" ]");break}if(C(d,"JU.M34")){c=C(d,"JU.M4")?4:3;k=M(c,0);j=d;b.appendC("[");for(g=0;g<c;g++)0<g&&b.appendC(","),j.getRow(g,k),b.append(JU.PT.toJSON(null,k));b.appendC("]");break}h=JU.PT.nonArrayString(d);if(null==h){b.append("[");k=JU.AU.getLength(d);g=null;g=d[0];"number"!=typeof g&&(g=null);if(null!=g)b.appendO(d);else for(g=0;g<k;g++)0<g&&b.appendC(","),b.append(JU.PT.toJSON(null,
JU.PT.arrayGet(d,g)));b.append("]");break}d=d.toString()}return JU.PT.packageJSON(a,null==h?b.toString():h)},"~S,~O");b.arrayGet=c(b,"arrayGet",function(a,d){return a[d]},"~O,~N");b.nonArrayString=c(b,"nonArrayString",function(a){return a.constructor==Array||a.BYTES_PER_ELEMENT?null:a.toString()},"~O");b.byteArrayToJSON=c(b,"byteArrayToJSON",function(a){var d=new JU.SB;d.append("[");for(var h=a.length,b=0;b<h;b++)0<b&&d.appendC(","),d.appendI(a[b]&255);d.append("]");return d.toString()},"~A");b.packageJSON=
c(b,"packageJSON",function(a,d){return null==a?d:'"'+a+'": '+d},"~S,~S");b.escapeUrl=c(b,"escapeUrl",function(a){a=JU.PT.rep(a,"\n","");a=JU.PT.rep(a,"%","%25");a=JU.PT.rep(a,"#","%23");a=JU.PT.rep(a,"[","%5B");a=JU.PT.rep(a,"\\","%5C");a=JU.PT.rep(a,"]","%5D");return a=JU.PT.rep(a," ","%20")},"~S");b.esc=c(b,"esc",function(a){if(null==a||0==a.length)return'""';for(var d=!1,h=0;10>h;h+=2)if(0<=a.indexOf('\\\\\tt\rr\nn""'.charAt(h))){d=!0;break}if(d)for(;10>h;){for(var d=-1,b='\\\\\tt\rr\nn""'.charAt(h++),
c='\\\\\tt\rr\nn""'.charAt(h++),g=new JU.SB,j=0;0<=(d=a.indexOf(b,d+1));)g.append(a.substring(j,d)).appendC("\\").appendC(c),j=d+1;g.append(a.substring(j,a.length));a=g.toString()}return'"'+JU.PT.escUnicode(a)+'"'},"~S");b.escUnicode=c(b,"escUnicode",function(a){for(var d=a.length;0<=--d;)if(127<a.charAt(d).charCodeAt(0)){var h="0000"+Integer.toHexString(a.charAt(d).charCodeAt(0));a=a.substring(0,d)+"\\u"+h.substring(h.length-4)+a.substring(d+1)}return a},"~S");b.escF=c(b,"escF",function(a){a=""+
a;0>a.indexOf(".")&&(0>a.indexOf("e")&&0>a.indexOf("N")&&0>a.indexOf("n"))&&(a+=".0");return a},"~N");b.join=c(b,"join",function(a,d,h){if(a.length<h)return null;var b=new JU.SB;for(b.append(a[h++]);h<a.length;h++)b.appendC(d).append(a[h]);return b.toString()},"~A,~S,~N");b.isLike=c(b,"isLike",function(a,d){var h=a.equals(d);if(h)return!0;var b=d.startsWith("*"),c=d.endsWith("*");return!b&&!c?h:b&&c?1==d.length||a.contains(d.substring(1,d.length-1)):b?a.endsWith(d.substring(1)):a.startsWith(d.substring(0,
d.length-1))},"~S,~S");b.getMapValueNoCase=c(b,"getMapValueNoCase",function(a,d){if("this".equals(d))return a;var h=a.get(d);if(null==h)for(var b,c=a.entrySet().iterator();c.hasNext()&&((b=c.next())||1);)if(b.getKey().equalsIgnoreCase(d))return b.getValue();return h},"java.util.Map,~S");b.clean=c(b,"clean",function(a){return JU.PT.rep(JU.PT.replaceAllCharacters(a," \t\n\r"," "),"  "," ").trim()},"~S");b.fdup=c(b,"fdup",function(a,d,h){for(var b,c=0,g=d;1<=--g;)if(!JU.PT.isDigit(b=a.charAt(g)))switch(b.charCodeAt(0)){case 46:if(0!=
c++)return a;continue;case 45:if(1!=g&&"."!=a.charAt(g-1))return a;continue;default:return a}b=a.substring(0,d+1);c=new JU.SB;for(g=0;g<h;g++)c.append(b);c.append(a.substring(d+1));return c.toString()},"~S,~N,~N");b.formatString=c(b,"formatString",function(a,d,h,b,c,g){if(null==a)return null;if("".equals(a))return"";var j=d.length;if(0>a.indexOf("%")||0==j||0>a.indexOf(d))return a;var k="",l,f,n;for(l=0;0<=(f=a.indexOf("%",l))&&0<=(n=a.indexOf(d,f+1));)if(l!=f&&(k+=a.substring(l,f)),l=f+1,n>f+6)k+=
"%";else try{var q=!1;"-"==a.charAt(l)&&(q=!0,++l);var v=!1;"0"==a.charAt(l)&&(v=!0,++l);for(var B,H=0;"0"<=(B=a.charAt(l))&&"9">=B;)H=10*H+(B.charCodeAt(0)-48),++l;var L=2147483647,w=!1;if("."==a.charAt(l)){++l;if("-"==(B=a.charAt(l)))w=!0,++l;if("0"<=(B=a.charAt(l))&&"9">=B)if(L=B.charCodeAt(0)-48,++l,"0"<=(B=a.charAt(l))&&"9">=B)L=10*L+(B.charCodeAt(0)-48),++l;w&&(L=-L)}if(a.substring(l,l+j).equals(d)){if(l+=j,Float.isNaN(b)?null!=h?k+=JU.PT.formatS(h,H,0>L?L-1:L,q,v):Double.isNaN(c)||(k+=JU.PT.formatD(c,
H,L-1,q,v)):k+=JU.PT.formatF(b,H,L,q,v),g)break}else l=f+1,k+="%"}catch(m){if(E(m,"IndexOutOfBoundsException")){l=f;break}else throw m;}return k+=a.substring(l)},"~S,~S,~S,~N,~N,~B");b.formatStringS=c(b,"formatStringS",function(a,d,h){return JU.PT.formatString(a,d,h,NaN,NaN,!1)},"~S,~S,~S");b.formatStringF=c(b,"formatStringF",function(a,d,h){return JU.PT.formatString(a,d,null,h,NaN,!1)},"~S,~S,~N");b.formatStringI=c(b,"formatStringI",function(a,d,h){return JU.PT.formatString(a,d,""+h,NaN,NaN,!1)},
"~S,~S,~N");b.sprintf=c(b,"sprintf",function(a,d,h){if(null==h)return a;var b=d.length;if(b==h.length)try{for(var c=0;c<b;c++)if(null!=h[c])switch(d.charAt(c).charCodeAt(0)){case 115:a=JU.PT.formatString(a,"s",h[c],NaN,NaN,!0);break;case 102:a=JU.PT.formatString(a,"f",null,h[c].floatValue(),NaN,!0);break;case 105:a=JU.PT.formatString(a,"d",""+h[c],NaN,NaN,!0);a=JU.PT.formatString(a,"i",""+h[c],NaN,NaN,!0);break;case 100:a=JU.PT.formatString(a,"e",null,NaN,h[c].doubleValue(),!0);break;case 112:var g=
h[c];a=JU.PT.formatString(a,"p",null,g.x,NaN,!0);a=JU.PT.formatString(a,"p",null,g.y,NaN,!0);a=JU.PT.formatString(a,"p",null,g.z,NaN,!0);break;case 113:var j=h[c];a=JU.PT.formatString(a,"q",null,j.x,NaN,!0);a=JU.PT.formatString(a,"q",null,j.y,NaN,!0);a=JU.PT.formatString(a,"q",null,j.z,NaN,!0);a=JU.PT.formatString(a,"q",null,j.w,NaN,!0);break;case 83:for(var k=h[c],l=0;l<k.length;l++)a=JU.PT.formatString(a,"s",k[l],NaN,NaN,!0);break;case 70:for(var f=h[c],l=0;l<f.length;l++)a=JU.PT.formatString(a,
"f",null,f[l],NaN,!0);break;case 73:for(var n=h[c],l=0;l<n.length;l++)a=JU.PT.formatString(a,"d",""+n[l],NaN,NaN,!0);for(l=0;l<n.length;l++)a=JU.PT.formatString(a,"i",""+n[l],NaN,NaN,!0);break;case 68:for(var q=h[c],l=0;l<q.length;l++)a=JU.PT.formatString(a,"e",null,NaN,q[l],!0)}return JU.PT.rep(a,"%%","%")}catch(v){if(!E(v,Exception))throw v;}System.out.println("TextFormat.sprintf error "+d+" "+a);return JU.PT.rep(a,"%","?")},"~S,~S,~A");b.formatCheck=c(b,"formatCheck",function(a){if(null==a||0>
a.indexOf("p")&&0>a.indexOf("q"))return a;a=JU.PT.rep(a,"%%","\u0001");a=JU.PT.rep(a,"%p","%6.2p");a=JU.PT.rep(a,"%q","%6.2q");a=JU.PT.split(a,"%");var d=new JU.SB;d.append(a[0]);for(var h=1;h<a.length;h++){var b="%"+a[h],c;if(3<=b.length){if(0<=(c=b.indexOf("p")))b=JU.PT.fdup(b,c,3);if(0<=(c=b.indexOf("q")))b=JU.PT.fdup(b,c,4)}d.append(b)}return d.toString().$replace("\u0001","%")},"~S");b.leftJustify=c(b,"leftJustify",function(a,d,h){a.append(h);h=d.length-h.length;0<h&&a.append(d.substring(0,h))},
"JU.SB,~S,~S");b.rightJustify=c(b,"rightJustify",function(a,d,h){var b=d.length-h.length;0<b&&a.append(d.substring(0,b));a.append(h)},"JU.SB,~S,~S");b.safeTruncate=c(b,"safeTruncate",function(a,d){-0.001<a&&0.001>a&&(a=0);return(a+"         ").substring(0,d)},"~N,~N");b.isWild=c(b,"isWild",function(a){return null!=a&&(0<=a.indexOf("*")||0<=a.indexOf("?"))},"~S");b.isMatch=c(b,"isMatch",function(a,d,h,b){if(a.equals(d))return!0;var c=d.length;if(0==c)return!1;var g=h&&b?"*"==d.charAt(0):!1;if(1==c&&
g)return!0;var j=h&&d.endsWith("*");if(!(0<=d.indexOf("?"))){if(g)return j?3>c||0<=a.indexOf(d.substring(1,c-1)):a.endsWith(d.substring(1));if(j)return a.startsWith(d.substring(0,c-1))}for(var k=a.length,l="????",f=4;f<k;)l+=l,f*=2;h&&(g&&(d=l+d.substring(1),c+=f-1),j&&(d=d.substring(0,c-1)+l,c+=f-1));if(c<k)return!1;for(h=0;c>k;){if(b&&"?"==d.charAt(h))++h;else if("?"!=d.charAt(h+c-1))return!1;--c}for(b=k;0<=--b;)if(c=d.charAt(h+b),"?"!=c&&(k=a.charAt(b),c!=k&&("\u0001"!=c||"?"!=k)))return!1;return!0},
"~S,~S,~B,~B");b.replaceQuotedStrings=c(b,"replaceQuotedStrings",function(a,d,h){for(var b=d.size(),c=0;c<b;c++){var g=d.get(c),j=h.get(c);j.equals(g)||(a=JU.PT.rep(a,'"'+g+'"','"'+j+'"'))}return a},"~S,JU.Lst,JU.Lst");b.replaceStrings=c(b,"replaceStrings",function(a,d,h){for(var b=d.size(),c=0;c<b;c++){var g=d.get(c),j=h.get(c);j.equals(g)||(a=JU.PT.rep(a,g,j))}return a},"~S,JU.Lst,JU.Lst");b.isDigit=c(b,"isDigit",function(a){a=a.charCodeAt(0);return 48<=a&&57>=a},"~S");b.isUpperCase=c(b,"isUpperCase",
function(a){a=a.charCodeAt(0);return 65<=a&&90>=a},"~S");b.isLowerCase=c(b,"isLowerCase",function(a){a=a.charCodeAt(0);return 97<=a&&122>=a},"~S");b.isLetter=c(b,"isLetter",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a},"~S");b.isLetterOrDigit=c(b,"isLetterOrDigit",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a||48<=a&&57>=a},"~S");b.isWhitespace=c(b,"isWhitespace",function(a){a=a.charCodeAt(0);return 28<=a&&32>=a||9<=a&&13>=a},"~S");b.fixPtFloats=c(b,"fixPtFloats",
function(a,d){a.x=Math.round(a.x*d)/d;a.y=Math.round(a.y*d)/d;a.z=Math.round(a.z*d)/d},"JU.T3,~N");b.fixFloat=c(b,"fixFloat",function(a,d){return Math.round(a*d)/d},"~N,~N");b.fixDouble=c(b,"fixDouble",function(a,d){return Math.round(a*d)/d},"~N,~N");b.parseFloatFraction=c(b,"parseFloatFraction",function(a){var d=a.indexOf("/");return 0>d?JU.PT.parseFloat(a):JU.PT.parseFloat(a.substring(0,d))/JU.PT.parseFloat(a.substring(d+1))},"~S");b.tensScale=M(-1,[10,100,1E3,1E4,1E5,1E6]);b.decimalScale=M(-1,
[0.1,0.01,0.001,1E-4,1E-5,1E-6,1E-7,1E-8,1E-9,1E-10,1E-11,1E-12,1E-13,1E-14,1E-15])});m("JU");var P=s(function(){this.s=this.sb=null;r(this,arguments)},JU,"SB",null);u(P,function(){this.s=""});P.newN=c(P,"newN",function(){return new JU.SB},"~N");P.newS=c(P,"newS",function(b){var a=new JU.SB;a.s=b;return a},"~S");c(P,"append",function(b){this.s+=b;return this},"~S");c(P,"appendC",function(b){this.s+=b;return this},"~S");c(P,"appendI",function(b){this.s+=b;return this},"~N");c(P,"appendB",function(b){this.s+=
b;return this},"~B");c(P,"appendF",function(b){b=""+b;0>b.indexOf(".")&&0>b.indexOf("e")&&(b+=".0");this.s+=b;return this},"~N");c(P,"appendD",function(b){b=""+b;0>b.indexOf(".")&&0>b.indexOf("e")&&(b+=".0");this.s+=b;return this},"~N");c(P,"appendSB",function(b){this.s+=b.s;return this},"JU.SB");c(P,"appendO",function(b){null!=b&&(this.s+=b.toString());return this},"~O");c(P,"appendCB",function(b,a,d){this.s+=b.slice(a,a+d).join("")},"~A,~N,~N");f(P,"toString",function(){return this.s});c(P,"length",
function(){return this.s.length});c(P,"indexOf",function(b){return this.s.indexOf(b)},"~S");c(P,"charAt",function(b){return this.s.charAt(b)},"~N");c(P,"charCodeAt",function(b){return this.s.charCodeAt(b)},"~N");c(P,"setLength",function(b){this.s=this.s.substring(0,b)},"~N");c(P,"lastIndexOf",function(b){return this.s.lastIndexOf(b)},"~S");c(P,"indexOf2",function(b,a){return this.s.indexOf(b,a)},"~S,~N");c(P,"substring",function(b){return this.s.substring(b)},"~N");c(P,"substring2",function(b,a){return this.s.substring(b,
a)},"~N,~N");c(P,"toBytes",function(b,a){return 0==a?O(0,0):(0<a?this.substring2(b,b+a):0==b?this.toString():this.substring2(b,this.length()-b)).getBytes("UTF-8")},"~N,~N");c(P,"replace",function(b,a,d){this.s=this.s.substring(0,b)+d+this.s.substring(a)},"~N,~N,~S");c(P,"insert",function(b,a){this.replace(b,b,a)},"~N,~S");m("JU");x(["javajs.api.JSONEncodable"],"JU.T3",null,function(){var b=s(function(){this.z=this.y=this.x=0;r(this,arguments)},JU,"T3",null,[javajs.api.JSONEncodable,java.io.Serializable]);
c(b,"set",function(a,d,h){this.x=a;this.y=d;this.z=h},"~N,~N,~N");c(b,"setA",function(a){this.x=a[0];this.y=a[1];this.z=a[2]},"~A");c(b,"setT",function(a){this.x=a.x;this.y=a.y;this.z=a.z},"JU.T3");c(b,"add2",function(a,d){this.x=a.x+d.x;this.y=a.y+d.y;this.z=a.z+d.z},"JU.T3,JU.T3");c(b,"add",function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},"JU.T3");c(b,"distanceSquared",function(a){var d=this.x-a.x,h=this.y-a.y;a=this.z-a.z;return d*d+h*h+a*a},"JU.T3");c(b,"distance",function(a){return Math.sqrt(this.distanceSquared(a))},
"JU.T3");c(b,"sub2",function(a,d){this.x=a.x-d.x;this.y=a.y-d.y;this.z=a.z-d.z},"JU.T3,JU.T3");c(b,"sub",function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},"JU.T3");c(b,"scale",function(a){this.x*=a;this.y*=a;this.z*=a},"~N");c(b,"add3",function(a,d,h){this.x+=a;this.y+=d;this.z+=h},"~N,~N,~N");c(b,"scaleT",function(a){this.x*=a.x;this.y*=a.y;this.z*=a.z},"JU.T3");c(b,"scaleAdd2",function(a,d,h){this.x=a*d.x+h.x;this.y=a*d.y+h.y;this.z=a*d.z+h.z},"~N,JU.T3,JU.T3");c(b,"ave",function(a,d){this.x=(a.x+
d.x)/2;this.y=(a.y+d.y)/2;this.z=(a.z+d.z)/2},"JU.T3,JU.T3");c(b,"dot",function(a){return this.x*a.x+this.y*a.y+this.z*a.z},"JU.T3");c(b,"lengthSquared",function(){return this.x*this.x+this.y*this.y+this.z*this.z});c(b,"length",function(){return Math.sqrt(this.lengthSquared())});c(b,"normalize",function(){var a=this.length();this.x/=a;this.y/=a;this.z/=a});c(b,"cross",function(a,d){this.set(a.y*d.z-a.z*d.y,a.z*d.x-a.x*d.z,a.x*d.y-a.y*d.x)},"JU.T3,JU.T3");f(b,"hashCode",function(){var a;a=31+JU.T3.floatToIntBits(this.x);
a=31*a+JU.T3.floatToIntBits(this.y);a=31*a+JU.T3.floatToIntBits(this.z);return a^a>>32});b.floatToIntBits=c(b,"floatToIntBits",function(a){return 0==a?0:Float.floatToIntBits(a)},"~N");f(b,"equals",function(a){return!C(a,"JU.T3")?!1:this.x==a.x&&this.y==a.y&&this.z==a.z},"~O");f(b,"toString",function(){return"{"+this.x+", "+this.y+", "+this.z+"}"});f(b,"toJSON",function(){return"["+this.x+","+this.y+","+this.z+"]"});c(b,"setP",function(a){this.set(a.x,a.y,a.z);return this},"JU.T3");c(b,"putP",function(a){a.set(this.x,
this.y,this.z);return a},"JU.T3")});m("JU");var pa=s(function(){this.z=this.y=this.x=0;r(this,arguments)},JU,"T3i",null,java.io.Serializable);c(pa,"set",function(b,a,d){this.x=b;this.y=a;this.z=d},"~N,~N,~N");c(pa,"setT",function(b){this.x=b.x;this.y=b.y;this.z=b.z},"JU.T3i");c(pa,"add",function(b){this.x+=b.x;this.y+=b.y;this.z+=b.z},"JU.T3i");c(pa,"scaleAdd",function(b,a,d){this.x=b*a.x+d.x;this.y=b*a.y+d.y;this.z=b*a.z+d.z},"~N,JU.T3i,JU.T3i");f(pa,"hashCode",function(){return this.x^this.y^this.z});
f(pa,"equals",function(b){return!C(b,"JU.T3i")?!1:this.x==b.x&&this.y==b.y&&this.z==b.z},"~O");c(pa,"asString",function(){return"("+this.x+", "+this.y+", "+this.z+")"});f(pa,"toString",function(){return this.asString()});m("JU");x(["JU.T3"],"JU.T4",null,function(){var b=s(function(){this.w=0;r(this,arguments)},JU,"T4",JU.T3);c(b,"set4",function(a,d,h,b){this.x=a;this.y=d;this.z=h;this.w=b},"~N,~N,~N,~N");c(b,"scale4",function(a){this.scale(a);this.w*=a},"~N");f(b,"hashCode",function(){return JU.T3.floatToIntBits(this.x)^
JU.T3.floatToIntBits(this.y)^JU.T3.floatToIntBits(this.z)^JU.T3.floatToIntBits(this.w)});f(b,"equals",function(a){return!C(a,"JU.T4")?!1:this.x==a.x&&this.y==a.y&&this.z==a.z&&this.w==a.w},"~O");f(b,"toString",function(){return"{"+this.x+", "+this.y+", "+this.z+", "+this.w+"}"});f(b,"toJSON",function(){return"["+this.x+", "+this.y+", "+this.z+", "+this.w+"]"})});m("JU");x(["JU.T3"],"JU.V3",null,function(){var b=G(JU,"V3",JU.T3);b.newV=c(b,"newV",function(a){return JU.V3.new3(a.x,a.y,a.z)},"JU.T3");
b.newVsub=c(b,"newVsub",function(a,d){return JU.V3.new3(a.x-d.x,a.y-d.y,a.z-d.z)},"JU.T3,JU.T3");b.new3=c(b,"new3",function(a,d,h){var b=new JU.V3;b.x=a;b.y=d;b.z=h;return b},"~N,~N,~N");c(b,"angle",function(a){var d=this.y*a.z-this.z*a.y,h=this.z*a.x-this.x*a.z,b=this.x*a.y-this.y*a.x,d=Math.sqrt(d*d+h*h+b*b);return Math.abs(Math.atan2(d,this.dot(a)))},"JU.V3")});m("javajs.api");I(javajs.api,"GenericBinaryDocument",javajs.api.GenericBinaryDocumentReader);m("javajs.api");I(javajs.api,"GenericBinaryDocumentReader");
m("javajs.api");I(javajs.api,"GenericZipTools");m("javajs.api");I(javajs.api,"GenericLineReader");m("javajs.api");I(javajs.api,"GenericCifDataParser");m("javajs.api");var Fa=G(javajs.api,"Interface",null);Fa.getInterface=c(Fa,"getInterface",function(b){try{var a=qa._4Name(b);return null==a?null:a.newInstance()}catch(d){if(E(d,Exception))return System.out.println("Interface.java Error creating instance for "+b+": \n"+d),null;throw d;}},"~S");Fa.getInstanceWithParams=c(Fa,"getInstanceWithParams",function(b,
a,d){try{return qa._4Name(b).getConstructor(a).newInstance(d)}catch(h){if(E(h,Exception))return System.out.println("Interface.getInterfaceWithParams Error creating instance for "+b+": \n"+h),null;throw h;}},"~S,~A,~A");m("JU");var Ga=s(function(){this.data=null;r(this,arguments)},JU,"BArray",null);u(Ga,function(b){this.data=b},"~A");f(Ga,"equals",function(b){if(C(b,"JU.BArray")&&(b=b.data,b.length==this.data.length)){for(var a=0;a<b.length;a++)if(b[a]!=this.data[a])return!1;return!0}return!1},"~O");
c(Ga,"hashCode",function(){return this.data.hashCode()});f(Ga,"toString",function(){return String.instantialize(this.data)});m("JU");var Ka=s(function(){this.buf=null;this.ichCurrent=this.cchBuf=0;r(this,arguments)},JU,"LimitedLineReader",null);u(Ka,function(b,a){b.mark(a+1);this.buf=da(a,"\x00");this.cchBuf=Math.max(b.read(this.buf,0,a),0);this.ichCurrent=0;b.reset()},"java.io.BufferedReader,~N");c(Ka,"getHeader",function(b){return 0==b?String.instantialize(this.buf):String.instantialize(this.buf,
0,Math.min(this.cchBuf,b))},"~N");c(Ka,"readLineWithNewline",function(){for(;this.ichCurrent<this.cchBuf;){for(var b=this.ichCurrent,a=String.fromCharCode(0);this.ichCurrent<this.cchBuf&&"\r"!=(a=this.buf[this.ichCurrent++])&&"\n"!=a;);"\r"==a&&(this.ichCurrent<this.cchBuf&&"\n"==this.buf[this.ichCurrent])&&++this.ichCurrent;a=this.ichCurrent-b;if("#"!=this.buf[b])return String.instantialize(this.buf,b,a)}return""});m("JU");var W=s(function(){this.a=null;this.n=this.m=0;R("JU.Matrix.LUDecomp")||JU.Matrix.$Matrix$LUDecomp$();
r(this,arguments)},JU,"Matrix",null,Cloneable);u(W,function(b,a,d){this.a=null==b?S(a,d,0):b;this.m=a;this.n=d},"~A,~N,~N");c(W,"getRowDimension",function(){return this.m});c(W,"getColumnDimension",function(){return this.n});c(W,"getArray",function(){return this.a});c(W,"getArrayCopy",function(){for(var b=S(this.m,this.n,0),a=this.m;0<=--a;)for(var d=this.n;0<=--d;)b[a][d]=this.a[a][d];return b});c(W,"copy",function(){for(var b=new JU.Matrix(null,this.m,this.n),a=b.a,d=this.m;0<=--d;)for(var h=this.n;0<=
--h;)a[d][h]=this.a[d][h];return b});f(W,"clone",function(){return this.copy()});c(W,"getSubmatrix",function(b,a,d,h){for(var p=new JU.Matrix(null,d,h),c=p.a;0<=--d;)for(var g=h;0<=--g;)c[d][g]=this.a[b+d][a+g];return p},"~N,~N,~N,~N");c(W,"getMatrixSelected",function(b,a){for(var d=new JU.Matrix(null,b.length,a),h=d.a,p=b.length;0<=--p;)for(var c=this.a[b[p]],g=a;0<=--g;)h[p][g]=c[g];return d},"~A,~N");c(W,"transpose",function(){for(var b=new JU.Matrix(null,this.n,this.m),a=b.a,d=this.m;0<=--d;)for(var h=
this.n;0<=--h;)a[h][d]=this.a[d][h];return b});c(W,"add",function(b){return this.scaleAdd(b,1)},"JU.Matrix");c(W,"sub",function(b){return this.scaleAdd(b,-1)},"JU.Matrix");c(W,"scaleAdd",function(b,a){for(var d=new JU.Matrix(null,this.m,this.n),h=d.a,p=b.a,c=this.m;0<=--c;)for(var g=this.n;0<=--g;)h[c][g]=p[c][g]*a+this.a[c][g];return d},"JU.Matrix,~N");c(W,"mul",function(b){if(b.m!=this.n)return null;var a=new JU.Matrix(null,this.m,b.n),d=a.a,h=b.a;for(b=b.n;0<=--b;)for(var p=this.m;0<=--p;){for(var c=
this.a[p],g=0,j=this.n;0<=--j;)g+=c[j]*h[j][b];d[p][b]=g}return a},"JU.Matrix");c(W,"inverse",function(){return T(JU.Matrix.LUDecomp,this,null,this.m,this.n).solve(JU.Matrix.identity(this.m,this.m),this.n)});c(W,"trace",function(){for(var b=0,a=Math.min(this.m,this.n);0<=--a;)b+=this.a[a][a];return b});W.identity=c(W,"identity",function(b,a){for(var d=new JU.Matrix(null,b,a),h=d.a,p=Math.min(b,a);0<=--p;)h[p][p]=1;return d},"~N,~N");c(W,"getRotation",function(){return this.getSubmatrix(0,0,this.m-
1,this.n-1)});c(W,"getTranslation",function(){return this.getSubmatrix(0,this.n-1,this.m-1,1)});W.newT=c(W,"newT",function(b,a){return a?new JU.Matrix(z(-1,[S(-1,[b.x]),S(-1,[b.y]),S(-1,[b.z])]),3,1):new JU.Matrix(z(-1,[S(-1,[b.x,b.y,b.z])]),1,3)},"JU.T3,~B");f(W,"toString",function(){for(var b="[\n",a=0;a<this.m;a++){for(var b=b+"  [",d=0;d<this.n;d++)b+=" "+this.a[a][d];b+="]\n"}return b+"]"});W.$Matrix$LUDecomp$=function(){var b=s(function(){fa(this,arguments);this.piv=this.LU=null;this.pivsign=
0;r(this,arguments)},JU.Matrix,"LUDecomp",null);u(b,function(a,d){this.LU=this.b$["JU.Matrix"].getArrayCopy();this.piv=D(a,0);for(var h=a;0<=--h;)this.piv[h]=h;this.pivsign=1;for(var b,c=S(a,0),g=0;g<d;g++){for(h=a;0<=--h;)c[h]=this.LU[h][g];for(h=a;0<=--h;){b=this.LU[h];for(var j=0,k=Math.min(h,g);0<=--k;)j+=b[k]*c[k];b[g]=c[h]-=j}b=g;for(h=a;--h>g;)Math.abs(c[h])>Math.abs(c[b])&&(b=h);if(b!=g){for(k=d;0<=--k;)h=this.LU[b][k],this.LU[b][k]=this.LU[g][k],this.LU[g][k]=h;k=this.piv[b];this.piv[b]=
this.piv[g];this.piv[g]=k;this.pivsign=-this.pivsign}if((new Boolean(g<a&0!=this.LU[g][g])).valueOf())for(h=a;--h>g;)this.LU[h][g]/=this.LU[g][g]}},"~N,~N");c(b,"solve",function(a,d){for(var h=0;h<d;h++)if(0==this.LU[h][h])return null;for(var b=a.n,c=a.getMatrixSelected(this.piv,b),g=c.a,j=0;j<d;j++)for(var k=j+1;k<d;k++)for(h=0;h<b;h++)g[k][h]-=g[j][h]*this.LU[k][j];for(j=d;0<=--j;){for(h=b;0<=--h;)g[j][h]/=this.LU[j][j];for(k=j;0<=--k;)for(h=b;0<=--h;)g[k][h]-=g[j][h]*this.LU[k][j]}return c},"JU.Matrix,~N")};
m("JU");x(["JU.P4"],"JU.Quat",["JU.A4","$.M3","$.V3"],function(){var b=s(function(){this.q3=this.q2=this.q1=this.q0=0;this.mat=null;r(this,arguments)},JU,"Quat",null);u(b,function(){this.q0=1});b.newQ=c(b,"newQ",function(a){var d=new JU.Quat;d.set(a);return d},"JU.Quat");b.newVA=c(b,"newVA",function(a,d){var h=new JU.Quat;h.setTA(a,d);return h},"JU.T3,~N");b.newM=c(b,"newM",function(a){var d=new JU.Quat;d.setM(JU.M3.newM3(a));return d},"JU.M3");b.newAA=c(b,"newAA",function(a){var d=new JU.Quat;d.setAA(a);
return d},"JU.A4");b.newP4=c(b,"newP4",function(a){var d=new JU.Quat;d.setP4(a);return d},"JU.P4");b.new4=c(b,"new4",function(a,d,h,b){var c=new JU.Quat;if(-1>b)return c.q0=-1,c;if(1<b)return c.q0=1,c;c.q0=b;c.q1=a;c.q2=d;c.q3=h;return c},"~N,~N,~N,~N");c(b,"set",function(a){this.q0=a.q0;this.q1=a.q1;this.q2=a.q2;this.q3=a.q3},"JU.Quat");c(b,"setP4",function(a){var d=null==a?0:a.distance4(JU.Quat.qZero);0==d?this.q0=1:(this.q0=a.w/d,this.q1=a.x/d,this.q2=a.y/d,this.q3=a.z/d)},"JU.P4");c(b,"setTA",
function(a,d){if(0==a.x&&0==a.y&&0==a.z)this.q0=1;else{var h=Math.sin(0.017453292519943295*(d/2))/Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z);this.q0=Math.cos(0.017453292519943295*(d/2));this.q1=a.x*h;this.q2=a.y*h;this.q3=a.z*h}},"JU.T3,~N");c(b,"setAA",function(a){a=JU.A4.newAA(a);0==a.angle&&(a.y=1);this.setM((new JU.M3).setAA(a))},"JU.A4");c(b,"setM",function(a){this.mat=a;var d=a.m00+a.m11+a.m22,h,b,c;0.5<=d?(d=Math.sqrt(1+d),h=(a.m21-a.m12)/d,b=(a.m02-a.m20)/d,c=(a.m10-a.m01)/d):0.5<=(h=a.m00+a.m00-
d)?(h=Math.sqrt(1+h),d=(a.m21-a.m12)/h,b=(a.m10+a.m01)/h,c=(a.m20+a.m02)/h):0.5<=(h=a.m11+a.m11-d)||a.m11>a.m22?(b=Math.sqrt(1+h),d=(a.m02-a.m20)/b,h=(a.m10+a.m01)/b,c=(a.m21+a.m12)/b):(c=Math.sqrt(1+a.m22+a.m22-d),d=(a.m10-a.m01)/c,h=(a.m20+a.m02)/c,b=(a.m21+a.m12)/c);this.q0=0.5*d;this.q1=0.5*h;this.q2=0.5*b;this.q3=0.5*c},"JU.M3");c(b,"setRef",function(a){null==a?this.mul(this.getFixFactor()):0<=this.dot(a)||(this.q0*=-1,this.q1*=-1,this.q2*=-1,this.q3*=-1)},"JU.Quat");b.getQuaternionFrame=c(b,
"getQuaternionFrame",function(a,d,h){d=JU.V3.newV(d);h=JU.V3.newV(h);null!=a&&(d.sub(a),h.sub(a));return JU.Quat.getQuaternionFrameV(d,h,null,!1)},"JU.P3,JU.T3,JU.T3");b.getQuaternionFrameV=c(b,"getQuaternionFrameV",function(a,d,h,b){null==h&&(h=new JU.V3,h.cross(a,d),b&&a.cross(d,h));d=new JU.V3;d.cross(h,a);a.normalize();d.normalize();h.normalize();b=new JU.M3;b.setColumnV(0,a);b.setColumnV(1,d);b.setColumnV(2,h);return JU.Quat.newM(b)},"JU.V3,JU.V3,JU.V3,~B");c(b,"getMatrix",function(){null==this.mat&&
this.setMatrix();return this.mat});c(b,"setMatrix",function(){this.mat=new JU.M3;this.mat.m00=this.q0*this.q0+this.q1*this.q1-this.q2*this.q2-this.q3*this.q3;this.mat.m01=2*this.q1*this.q2-2*this.q0*this.q3;this.mat.m02=2*this.q1*this.q3+2*this.q0*this.q2;this.mat.m10=2*this.q1*this.q2+2*this.q0*this.q3;this.mat.m11=this.q0*this.q0-this.q1*this.q1+this.q2*this.q2-this.q3*this.q3;this.mat.m12=2*this.q2*this.q3-2*this.q0*this.q1;this.mat.m20=2*this.q1*this.q3-2*this.q0*this.q2;this.mat.m21=2*this.q2*
this.q3+2*this.q0*this.q1;this.mat.m22=this.q0*this.q0-this.q1*this.q1-this.q2*this.q2+this.q3*this.q3});c(b,"add",function(a){return JU.Quat.newVA(this.getNormal(),this.getTheta()+a)},"~N");c(b,"mul",function(a){return 1==a?JU.Quat.new4(this.q1,this.q2,this.q3,this.q0):JU.Quat.newVA(this.getNormal(),this.getTheta()*a)},"~N");c(b,"mulQ",function(a){return JU.Quat.new4(this.q0*a.q1+this.q1*a.q0+this.q2*a.q3-this.q3*a.q2,this.q0*a.q2+this.q2*a.q0+this.q3*a.q1-this.q1*a.q3,this.q0*a.q3+this.q3*a.q0+
this.q1*a.q2-this.q2*a.q1,this.q0*a.q0-this.q1*a.q1-this.q2*a.q2-this.q3*a.q3)},"JU.Quat");c(b,"divLeft",function(a){return this.inv().mulQ(a)},"JU.Quat");c(b,"dot",function(a){return this.q0*a.q0+this.q1*a.q1+this.q2*a.q2+this.q3*a.q3},"JU.Quat");c(b,"inv",function(){return JU.Quat.new4(-this.q1,-this.q2,-this.q3,this.q0)});c(b,"negate",function(){return JU.Quat.new4(-this.q1,-this.q2,-this.q3,-this.q0)});c(b,"getFixFactor",function(){return 0>this.q0||0==this.q0&&(0>this.q1||0==this.q1&&(0>this.q2||
0==this.q2&&0>this.q3))?-1:1});c(b,"getVector",function(a){return this.getVectorScaled(a,1)},"~N");c(b,"getVectorScaled",function(a,d){if(-1==a)return d*=this.getFixFactor(),JU.V3.new3(this.q1*d,this.q2*d,this.q3*d);null==this.mat&&this.setMatrix();var h=new JU.V3;this.mat.getColumnV(a,h);1!=d&&h.scale(d);return h},"~N,~N");c(b,"getNormal",function(){var a=JU.Quat.getRawNormal(this);a.scale(this.getFixFactor());return a});b.getRawNormal=c(b,"getRawNormal",function(a){a=JU.V3.new3(a.q1,a.q2,a.q3);
if(0==a.length())return JU.V3.new3(0,0,1);a.normalize();return a},"JU.Quat");c(b,"getTheta",function(){return 360*Math.acos(Math.abs(this.q0))/3.141592653589793});c(b,"getThetaRadians",function(){return 2*Math.acos(Math.abs(this.q0))});c(b,"getNormalDirected",function(a){var d=this.getNormal();0>d.x*a.x+d.y*a.y+d.z*a.z&&d.scale(-1);return d},"JU.V3");c(b,"get3dProjection",function(a){a.set(this.q1,this.q2,this.q3);return a},"JU.V3");c(b,"getThetaDirected",function(a){var d=this.getTheta(),h=this.getNormal();
0>a.x*this.q1+a.y*this.q2+a.z*this.q3&&(h.scale(-1),d=-d);a.set4(h.x,h.y,h.z,d);return a},"JU.P4");c(b,"getThetaDirectedV",function(a){var d=this.getTheta(),h=this.getNormal();0>a.x*this.q1+a.y*this.q2+a.z*this.q3&&(h.scale(-1),d=-d);return d},"JU.V3");c(b,"toPoint4f",function(){return JU.P4.new4(this.q1,this.q2,this.q3,this.q0)});c(b,"toAxisAngle4f",function(){var a=2*Math.acos(Math.abs(this.q0)),d=Math.sin(a/2),h=this.getNormal();0>d&&(h.scale(-1),a=3.141592653589793-a);return JU.A4.newVA(h,a)});
c(b,"transform2",function(a,d){null==this.mat&&this.setMatrix();this.mat.rotate2(a,d);return d},"JU.T3,JU.T3");c(b,"leftDifference",function(a){a=0>this.dot(a)?a.negate():a;return this.inv().mulQ(a)},"JU.Quat");c(b,"rightDifference",function(a){a=0>this.dot(a)?a.negate():a;return this.mulQ(a.inv())},"JU.Quat");f(b,"toString",function(){return"{"+this.q1+" "+this.q2+" "+this.q3+" "+this.q0+"}"});c(b,"div",function(a){return this.mulQ(a.inv())},"JU.Quat");b.arrayDiv=c(b,"arrayDiv",function(a,d,h,b){var c;
if(null==a||null==d||0==(c=Math.min(a.length,d.length)))return null;0<h&&c>h&&(c=h);h=Array(c);for(var g=0;g<c;g++){if(null==a[g]||null==d[g])return null;h[g]=b?a[g].divLeft(d[g]):a[g].div(d[g])}return h},"~A,~A,~N,~B");b.sphereMean=c(b,"sphereMean",function(a,d,h){if(null==a||0==a.length)return new JU.Quat;null==d&&(d=M(1,0));if(1==a.length)return d[0]=0,JU.Quat.newQ(a[0]);for(var b=3.4028235E38,c=3.4028235E38,g=JU.Quat.simpleAverage(a);b>h&&0!=c;)g=JU.Quat.newMean(a,g),d[0]=JU.Quat.stdDev(a,g),
b=Math.abs(d[0]-c),c=d[0];return g},"~A,~A,~N");b.simpleAverage=c(b,"simpleAverage",function(a){var d=JU.V3.new3(0,0,1),h=a[0].getNormal();d.add(h);for(var b=a.length;0<=--b;)d.add(a[b].getNormalDirected(d));d.sub(h);d.normalize();for(var c=0,b=a.length;0<=--b;)c+=Math.abs(a[b].get3dProjection(h).dot(d));0!=c&&d.scale(c/a.length);c=Math.sqrt(1-d.lengthSquared());Float.isNaN(c)&&(c=0);return JU.Quat.newP4(JU.P4.new4(d.x,d.y,d.z,c))},"~A");b.newMean=c(b,"newMean",function(a,d){for(var h=new JU.V3,b,
c,g=a.length;0<=--g;)b=a[g],c=b.div(d),b=c.getNormal(),b.scale(c.getTheta()),h.add(b);h.scale(1/a.length);return JU.Quat.newVA(h,h.length()).mulQ(d)},"~A,JU.Quat");b.stdDev=c(b,"stdDev",function(a,d){for(var h=0,b=a.length,c=b;0<=--c;)var g=a[c].div(d).getTheta(),h=h+g*g;return Math.sqrt(h/b)},"~A,JU.Quat");c(b,"getEulerZYZ",function(){var a,d,h;if(0==this.q1&&0==this.q2)return a=this.getTheta(),M(-1,[0>this.q3?-a:a,0,0]);a=Math.atan2(2*(this.q2*this.q3+this.q0*this.q1),2*(-this.q1*this.q3+this.q0*
this.q2));d=Math.acos(this.q3*this.q3-this.q2*this.q2-this.q1*this.q1+this.q0*this.q0);h=Math.atan2(2*(this.q2*this.q3-this.q0*this.q1),2*(this.q0*this.q2+this.q1*this.q3));return M(-1,[a/0.017453292519943295,d/0.017453292519943295,h/0.017453292519943295])});c(b,"getEulerZXZ",function(){var a,d,h;if(0==this.q1&&0==this.q2)return a=this.getTheta(),M(-1,[0>this.q3?-a:a,0,0]);a=Math.atan2(2*(this.q1*this.q3-this.q0*this.q2),2*(this.q0*this.q1+this.q2*this.q3));d=Math.acos(this.q3*this.q3-this.q2*this.q2-
this.q1*this.q1+this.q0*this.q0);h=Math.atan2(2*(this.q1*this.q3+this.q0*this.q2),2*(-this.q2*this.q3+this.q0*this.q1));return M(-1,[a/0.017453292519943295,d/0.017453292519943295,h/0.017453292519943295])});b.qZero=new JU.P4});m("JU");x(["java.io.BufferedReader","javajs.api.GenericLineReader"],"JU.Rdr","java.io.BufferedInputStream $.ByteArrayInputStream $.InputStreamReader $.StringReader JU.AU $.Base64 $.Encoding $.SB".split(" "),function(){var b=s(function(){this.reader=null;r(this,arguments)},JU,
"Rdr",null,javajs.api.GenericLineReader);u(b,function(a){this.reader=a},"java.io.BufferedReader");f(b,"readNextLine",function(){return this.reader.readLine()});b.readCifData=c(b,"readCifData",function(a,h,b){a.set(null,h,!1);return null==b?a.getAllCifData():a.getAllCifDataType(b)},"javajs.api.GenericCifDataParser,java.io.BufferedReader,~A");b.fixUTF=c(b,"fixUTF",function(a){var h=JU.Rdr.getUTFEncoding(a);if(h!==JU.Encoding.NONE)try{var b=String.instantialize(a,h.name().$replace("_","-"));switch(h){case JU.Encoding.UTF8:case JU.Encoding.UTF_16BE:case JU.Encoding.UTF_16LE:b=
b.substring(1)}return b}catch(c){if(E(c,"java.io.UnsupportedEncodingException"))System.out.println(c);else throw c;}return String.instantialize(a)},"~A");b.getUTFEncoding=c(b,"getUTFEncoding",function(a){return 3<=a.length&&239==(a[0]&255)&&187==(a[1]&255)&&191==(a[2]&255)?JU.Encoding.UTF8:4<=a.length&&0==(a[0]&255)&&0==(a[1]&255)&&254==(a[2]&255)&&255==(a[3]&255)?JU.Encoding.UTF_32BE:4<=a.length&&255==(a[0]&255)&&254==(a[1]&255)&&0==(a[2]&255)&&0==(a[3]&255)?JU.Encoding.UTF_32LE:2<=a.length&&255==
(a[0]&255)&&254==(a[1]&255)?JU.Encoding.UTF_16LE:2<=a.length&&254==(a[0]&255)&&255==(a[1]&255)?JU.Encoding.UTF_16BE:JU.Encoding.NONE},"~A");b.getUTFEncodingForStream=c(b,"getUTFEncodingForStream",function(a){a.resetStream();var h=O(4,0);h[3]=1;try{a.mark(5)}catch(b){if(E(b,Exception))return JU.Encoding.NONE;throw b;}a.read(h,0,4);a.reset();return JU.Rdr.getUTFEncoding(h)},"java.io.BufferedInputStream");b.isBase64=c(b,"isBase64",function(a){return 0==a.indexOf(";base64,")},"JU.SB");b.isCompoundDocumentS=
c(b,"isCompoundDocumentS",function(a){return JU.Rdr.isCompoundDocumentB(JU.Rdr.getMagic(a,8))},"java.io.InputStream");b.isCompoundDocumentB=c(b,"isCompoundDocumentB",function(a){return 8<=a.length&&208==(a[0]&255)&&207==(a[1]&255)&&17==(a[2]&255)&&224==(a[3]&255)&&161==(a[4]&255)&&177==(a[5]&255)&&26==(a[6]&255)&&225==(a[7]&255)},"~A");b.isBZip2S=c(b,"isBZip2S",function(a){return JU.Rdr.isBZip2B(JU.Rdr.getMagic(a,3))},"java.io.InputStream");b.isGzipS=c(b,"isGzipS",function(a){return JU.Rdr.isGzipB(JU.Rdr.getMagic(a,
2))},"java.io.InputStream");b.isBZip2B=c(b,"isBZip2B",function(a){return null!=a&&3<=a.length&&66==(a[0]&255)&&90==(a[1]&255)&&104==(a[2]&255)},"~A");b.isGzipB=c(b,"isGzipB",function(a){return null!=a&&2<=a.length&&31==(a[0]&255)&&139==(a[1]&255)},"~A");b.isPickleS=c(b,"isPickleS",function(a){return JU.Rdr.isPickleB(JU.Rdr.getMagic(a,2))},"java.io.InputStream");b.isPickleB=c(b,"isPickleB",function(a){return null!=a&&2<=a.length&&125==(a[0]&255)&&113==(a[1]&255)},"~A");b.isMessagePackS=c(b,"isMessagePackS",
function(a){return JU.Rdr.isMessagePackB(JU.Rdr.getMagic(a,2))},"java.io.InputStream");b.isMessagePackB=c(b,"isMessagePackB",function(a){var h;return null!=a&&1<=a.length&&(222==(h=a[0]&255)||128==(h&224)&&80!=a[1])},"~A");b.isPngZipStream=c(b,"isPngZipStream",function(a){return JU.Rdr.isPngZipB(JU.Rdr.getMagic(a,55))},"java.io.InputStream");b.isPngZipB=c(b,"isPngZipB",function(a){return 0==a[50]&&80==a[51]&&78==a[52]&&71==a[53]&&74==a[54]},"~A");b.isZipS=c(b,"isZipS",function(a){return JU.Rdr.isZipB(JU.Rdr.getMagic(a,
4))},"java.io.InputStream");b.isZipB=c(b,"isZipB",function(a){return 4<=a.length&&80==a[0]&&75==a[1]&&3==a[2]&&4==a[3]},"~A");b.getMagic=c(b,"getMagic",function(a,h){var b=264<h?O(h,0):null==JU.Rdr.b264?JU.Rdr.b264=O(265,0):JU.Rdr.b264;a.resetStream();try{b[264]=-1,a.mark(h+1),a.read(b,0,h)<h&&(b[0]=b[264]=0)}catch(c){if(!E(c,"java.io.IOException"))throw c;}try{a.reset()}catch(g){if(!E(g,"java.io.IOException"))throw g;}return b},"java.io.InputStream,~N");b.guessMimeTypeForBytes=c(b,"guessMimeTypeForBytes",
function(a){switch(2>a.length?-1:a[1]){case 0:return"image/jpg";case 73:return"image/gif";case 77:return"image/BMP";case 80:return"image/png";default:return"image/unknown"}},"~A");b.getBIS=c(b,"getBIS",function(a){return new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(a))},"~A");b.getBR=c(b,"getBR",function(a){return new java.io.BufferedReader(new java.io.StringReader(a))},"~S");b.getUnzippedInputStream=c(b,"getUnzippedInputStream",function(a,h){for(;JU.Rdr.isGzipS(h);)h=new java.io.BufferedInputStream(a.newGZIPInputStream(h));
return h},"javajs.api.GenericZipTools,java.io.BufferedInputStream");b.getUnzippedInputStreamBZip2=c(b,"getUnzippedInputStreamBZip2",function(a,h){for(;JU.Rdr.isBZip2S(h);)h=new java.io.BufferedInputStream(a.newBZip2InputStream(h));return h},"javajs.api.GenericZipTools,java.io.BufferedInputStream");b.getBytesFromSB=c(b,"getBytesFromSB",function(a){return JU.Rdr.isBase64(a)?JU.Base64.decodeBase64(a.substring(8)):a.toBytes(0,-1)},"JU.SB");b.getStreamAsBytes=c(b,"getStreamAsBytes",function(a,h){for(var b=
O(1024,0),c=null==h?O(4096,0):null,g=0,j=0;0<(g=a.read(b,0,1024));)j+=g,null==h?(j>=c.length&&(c=JU.AU.ensureLengthByte(c,2*j)),System.arraycopy(b,0,c,j-g,g)):h.write(b,0,g);a.close();return null==h?JU.AU.arrayCopyByte(c,j):j+" bytes"},"java.io.BufferedInputStream,JU.OC");b.getBufferedReader=c(b,"getBufferedReader",function(a,h){if(JU.Rdr.getUTFEncodingForStream(a)===JU.Encoding.NONE)return new JU.Rdr.StreamReader(a,h);var b=JU.Rdr.getLimitedStreamBytes(a,-1);a.close();return JU.Rdr.getBR(null==h?
JU.Rdr.fixUTF(b):String.instantialize(b,h))},"java.io.BufferedInputStream,~S");b.getLimitedStreamBytes=c(b,"getLimitedStreamBytes",function(a,h){var b=0<h&&1024>h?h:1024,c=O(b,0),g=O(0>h?4096:h,0),j=0,k=0;for(0>h&&(h=2147483647);k<h&&0<(j=a.read(c,0,b));)k+=j,k>g.length&&(g=JU.AU.ensureLengthByte(g,2*k)),System.arraycopy(c,0,g,k-j,j),2147483647!=h&&k+b>g.length&&(b=g.length-k);if(k==g.length)return g;c=O(k,0);System.arraycopy(g,0,c,0,k);return c},"java.io.InputStream,~N");b.streamToUTF8String=c(b,
"streamToUTF8String",function(a){var h=Array(1);try{JU.Rdr.readAllAsString(JU.Rdr.getBufferedReader(a,"UTF-8"),-1,!0,h,0)}catch(b){if(!E(b,"java.io.IOException"))throw b;}return h[0]},"java.io.BufferedInputStream");b.readAllAsString=c(b,"readAllAsString",function(a,h,b,c,g){try{var j=JU.SB.newN(8192),k;if(0>h){if(k=a.readLine(),b||null!=k&&0>k.indexOf("\x00")&&(4!=k.length||65533!=k.charAt(0).charCodeAt(0)||1!=k.indexOf("PNG")))for(j.append(k).appendC("\n");null!=(k=a.readLine());)j.append(k).appendC("\n")}else{b=
0;for(var l;b<h&&null!=(k=a.readLine());){if(h-b<(l=k.length)+1)k=k.substring(0,h-b-1);j.append(k).appendC("\n");b+=l+1}}a.close();c[g]=j.toString();return!0}catch(f){if(E(f,Exception))return c[g]=f.toString(),!1;throw f;}},"java.io.BufferedReader,~N,~B,~A,~N");b.getPngZipPointAndCount=c(b,"getPngZipPointAndCount",function(a,h){a.mark(75);try{var b=JU.Rdr.getLimitedStreamBytes(a,74);a.reset();for(var c=0,g=64,j=1;54<--g;j*=10)c+=(b[g]-48)*j;for(var k=0,g=74,j=1;64<--g;j*=10)k+=(b[g]-48)*j;h[0]=c;
h[1]=k}catch(l){h[1]=0}},"java.io.BufferedInputStream,~A");b.getPngZipStream=c(b,"getPngZipStream",function(a,h){if(!JU.Rdr.isPngZipStream(a))return a;var b=O(0,0);a.mark(75);try{var c=D(2,0);JU.Rdr.getPngZipPointAndCount(a,c);if(0!=c[1]){for(var g=c[0];0<g;)g-=a.skip(g);if(!h)return a;b=JU.Rdr.getLimitedStreamBytes(a,c[1])}}catch(j){}finally{try{h&&a.close()}catch(k){if(!E(k,Exception))throw k;}}return JU.Rdr.getBIS(b)},"java.io.BufferedInputStream,~B");b.getZipRoot=c(b,"getZipRoot",function(a){var h=
a.indexOf("|");return 0>h?a:a.substring(0,h)},"~S");b.isTar=c(b,"isTar",function(a){a=JU.Rdr.getMagic(a,264);return-1==a[264]&&117==(a[257]&255)&&115==(a[258]&255)&&116==(a[259]&255)&&97==(a[260]&255)&&114==(a[261]&255)},"java.io.BufferedInputStream");b.streamToBytes=c(b,"streamToBytes",function(a){var h=JU.Rdr.getLimitedStreamBytes(a,-1);a.close();return h},"java.io.InputStream");b.streamToString=c(b,"streamToString",function(a){return String.instantialize(JU.Rdr.streamToBytes(a))},"java.io.InputStream");
b.isBinary=c(b,"isBinary",function(a,h){var b=JU.Rdr.getMagic(a,h);if(-1==JU.Rdr.b264[264])for(var c=0;c<h;c++)if(9>b[c])return!0;return!1},"java.io.BufferedInputStream,~N");var a=s(function(){this.stream=null;r(this,arguments)},JU.Rdr,"StreamReader",java.io.BufferedReader);u(a,function(a,h){K(this,JU.Rdr.StreamReader,[new java.io.InputStreamReader(a,null==h?"UTF-8":h)]);this.stream=a},"java.io.BufferedInputStream,~S");c(a,"getStream",function(){try{this.stream.reset()}catch(a){if(!E(a,"java.io.IOException"))throw a;
}return this.stream});b.b264=null});m("JU");var ea=s(function(){this.z=this.y=this.x=0;r(this,arguments)},JU,"T3d",null,java.io.Serializable);c(ea,"set",function(b,a,d){this.x=b;this.y=a;this.z=d},"~N,~N,~N");c(ea,"setA",function(b){this.x=b[0];this.y=b[1];this.z=b[2]},"~A");c(ea,"setT",function(b){this.x=b.x;this.y=b.y;this.z=b.z},"JU.T3d");c(ea,"add2",function(b,a){this.x=b.x+a.x;this.y=b.y+a.y;this.z=b.z+a.z},"JU.T3d,JU.T3d");c(ea,"add",function(b){this.x+=b.x;this.y+=b.y;this.z+=b.z},"JU.T3d");
c(ea,"sub2",function(b,a){this.x=b.x-a.x;this.y=b.y-a.y;this.z=b.z-a.z},"JU.T3d,JU.T3d");c(ea,"sub",function(b){this.x-=b.x;this.y-=b.y;this.z-=b.z},"JU.T3d");c(ea,"scale",function(b){this.x*=b;this.y*=b;this.z*=b},"~N");c(ea,"scaleAdd",function(b,a,d){this.x=b*a.x+d.x;this.y=b*a.y+d.y;this.z=b*a.z+d.z},"~N,JU.T3d,JU.T3d");c(ea,"scaleAdd2",function(b,a,d){this.x=b*a.x+d.x;this.y=b*a.y+d.y;this.z=b*a.z+d.z},"~N,JU.T3d,JU.T3d");f(ea,"hashCode",function(){var b=JU.T3d.doubleToLongBits0(this.x),a=JU.T3d.doubleToLongBits0(this.y),
d=JU.T3d.doubleToLongBits0(this.z);return b^b>>32^a^a>>32^d^d>>32});ea.doubleToLongBits0=c(ea,"doubleToLongBits0",function(b){return 0==b?0:Double.doubleToLongBits(b)},"~N");f(ea,"equals",function(b){return!C(b,"JU.T3d")?!1:this.x==b.x&&this.y==b.y&&this.z==b.z},"~O");f(ea,"toString",function(){return"{"+this.x+", "+this.y+", "+this.z+"}"});m("JU");x(["JU.T3d"],"JU.V3d",null,function(){var b=G(JU,"V3d",JU.T3d);c(b,"cross",function(a,d){this.set(a.y*d.z-a.z*d.y,a.z*d.x-a.x*d.z,a.x*d.y-a.y*d.x)},"JU.V3d,JU.V3d");
c(b,"normalize",function(){var a=this.length();this.x/=a;this.y/=a;this.z/=a});c(b,"angle",function(a){var d=this.y*a.z-this.z*a.y,h=this.z*a.x-this.x*a.z,b=this.x*a.y-this.y*a.x,d=Math.sqrt(d*d+h*h+b*b);return Math.abs(Math.atan2(d,this.dot(a)))},"JU.V3d");c(b,"dot",function(a){return this.x*a.x+this.y*a.y+this.z*a.z},"JU.V3d");c(b,"lengthSquared",function(){return this.x*this.x+this.y*this.y+this.z*this.z});c(b,"length",function(){return Math.sqrt(this.lengthSquared())})});m("J.adapter.readers.molxyz");
x(["J.adapter.smarter.AtomSetCollectionReader"],"J.adapter.readers.molxyz.MolReader","java.util.Hashtable JU.BS $.Lst $.PT J.adapter.smarter.Atom J.api.JmolAdapter JU.Logger".split(" "),function(){var b=s(function(){this.haveAtomSerials=!1;this.allow2D=!0;this.iatom0=0;this.vr=null;this.atomCount=0;this.bsDeleted=this.atomData=null;this.is3D=this.fixN=this.haveNonzeroZ=!1;this.nC=this.nH=this.nDouble=0;r(this,arguments)},J.adapter.readers.molxyz,"MolReader",J.adapter.smarter.AtomSetCollectionReader);
f(b,"initializeReader",function(){this.fixN=this.checkFilterKey("FIXN")});f(b,"checkLine",function(){var a=this.line.startsWith("$MDL");if(a){if(this.discardLinesUntilStartsWith("$HDR"),this.rd(),null==this.line)return JU.Logger.warn("$HDR not found in MDL RG file"),this.continuing=!1}else if(this.line.equals("M  END"))return!0;if(this.doGetModel(++this.modelNumber,null)&&(this.iatom0=this.asc.ac,this.processMolSdHeader(),this.processCtab(a),this.vr=null,this.isLastModel(this.modelNumber)))return this.continuing=
!1;null!=this.line&&0>this.line.indexOf("$$$$")&&this.discardLinesUntilStartsWith("$$$$");return!0});f(b,"finalizeSubclassReader",function(){this.finalizeReaderMR()});c(b,"finalizeReaderMR",function(){this.fixN&&this.addJmolScript("{search('[Nv4+0,nv4+0]')}.formalCharge=1;{search('{[Ov1-0]}[Nv4+1,nv4+1]')}.formalCharge=-1;");this.check2D3D();null!=this.bsDeleted&&this.asc.getBSAtoms(-1).andNot(this.bsDeleted);this.isTrajectory=!1;this.finalizeReaderASCR()});c(b,"check2D3D",function(){this.haveNonzeroZ?
this.is2D&&(this.is2D=this.optimize2D=!1):!this.is2D&&!this.is3D&&(0<this.nC&&0==this.nH&&0!=this.nDouble)&&(this.is2D=!0);if(this.is2D){if(!this.allow2D)throw new Exception("File is 2D, not 3D");this.set2D()}});c(b,"processMolSdHeader",function(){var a=this.line.trim();this.asc.setCollectionName(a);var d=this.line+"\n";this.rd();if(null!=this.line){var d=d+(this.line+"\n"),h=22<=this.line.length?this.line.substring(20,22):null;this.is3D="3D".equals(h);this.is2D=!this.is3D&&("2D".equals(h)||this.line.startsWith("JME "));
this.rd();null!=this.line&&(this.line=this.line.trim(),d+=this.line+"\n",JU.Logger.info(d),this.checkCurrentLineForScript(),this.asc.setInfo("fileHeader",d),this.newAtomSet(a))}});c(b,"processCtab",function(a){a&&this.discardLinesUntilStartsWith("$CTAB");null!=this.rd()&&(0<=this.line.indexOf("V3000")?(this.optimize2D=this.is2D&&!this.noHydrogens,this.vr=this.getInterface("J.adapter.readers.molxyz.V3000Rdr").set(this),this.discardLinesUntilContains("COUNTS"),this.vr.readAtomsAndBonds(this.getTokens())):
this.readAtomsAndBonds(this.parseIntRange(this.line,0,3),this.parseIntRange(this.line,3,6)),this.applySymmetryAndSetTrajectory())},"~B");c(b,"readAtomsAndBonds",function(a,d){this.atomCount=a;for(var h=0;h<a;++h){this.rd();var b=this.line.length,c,g,j,k,l=0,f=0,n=-2147483648;g=this.parseFloatRange(this.line,0,10);j=this.parseFloatRange(this.line,10,20);k=this.parseFloatRange(this.line,20,30);34>b?c=this.line.substring(31).trim():(c=this.line.substring(31,34).trim(),c.equals("H1")&&(c="H",f=1),39<=
b&&(b=this.parseIntRange(this.line,36,39),1<=b&&7>=b&&(l=4-b),b=this.parseIntRange(this.line,34,36),0!=b&&(-3<=b&&4>=b)&&(f=J.api.JmolAdapter.getNaturalIsotope(J.api.JmolAdapter.getElementNumber(c))+b),-2147483648==n&&this.haveAtomSerials&&(n=h+1)));this.addMolAtom(n,f,c,l,g,j,k)}this.asc.setModelInfoForSet("dimension",this.is2D?"2D":"3D",this.asc.iSet);this.rd();this.line.startsWith("V  ")&&this.readAtomValues();0==d&&this.asc.setNoAutoBond();for(h=0;h<d;++h)0<h&&this.rd(),j=0,c=this.line.substring(0,
3).trim(),g=this.line.substring(3,6).trim(),k=this.parseIntRange(this.line,6,9),1==k&&12<=this.line.length&&(j=this.parseIntRange(this.line,9,12)),0!=j&&!this.is3D&&(this.is2D=!0),k=this.fixOrder(k,j),this.haveAtomSerials?this.asc.addNewBondFromNames(c,g,k):this.asc.addNewBondWithOrder(this.iatom0+this.parseIntStr(c)-1,this.iatom0+this.parseIntStr(g)-1,k);h=new java.util.Hashtable;c=new JU.Lst;for(this.rd();null!=this.line&&0!=this.line.indexOf("$$$$");)0==this.line.indexOf(">")?this.readMolData(h,
c):this.line.startsWith("M  ISO")?this.readIsotopes():this.line.startsWith("M  CHG")?this.readCharges():this.rd();null!=this.atomData&&(g=h.get("atom_value_name"),h.put(null==g?"atom_values":g.toString(),this.atomData));h.isEmpty()||(this.asc.setCurrentModelInfo("molDataKeys",c),this.asc.setCurrentModelInfo("molData",h))},"~N,~N");c(b,"readAtomValues",function(){this.atomData=Array(this.atomCount);for(var a=this.atomData.length;0<=--a;)this.atomData[a]="";for(;0==this.line.indexOf("V  ");){a=this.parseIntAt(this.line,
3);if(1>a||a>this.atomCount){JU.Logger.error("V  nnn does not evalute to a valid atom number: "+a);break}var d=this.line.substring(6).trim();this.atomData[a-1]=d;this.rd()}});c(b,"readIsotopes",function(){try{for(var a=this.parseIntAt(this.line,6),d=this.asc.getLastAtomSetAtomIndex(),h=0,b=9;h<a;h++){var c=this.parseIntAt(this.line,b),g=this.asc.atoms[c+d-1],j=this.parseIntAt(this.line,b+4),b=b+8,k=JU.PT.replaceAllCharacters(g.elementSymbol,"0123456789","");17==j&&k.equals("C")?g.elementSymbol="N":
5==j&&k.equals("H")?this.deleteAtom(g):g.elementSymbol=""+j+k}}catch(l){}this.rd()});c(b,"readCharges",function(){try{for(var a=this.parseIntAt(this.line,6),d=this.asc.getLastAtomSetAtomIndex(),h=this.asc.ac;--h>=d;)this.asc.atoms[h].formalCharge=0;for(var h=0,b=9;h<a;h++,b+=8)this.asc.atoms[this.parseIntAt(this.line,b)+d-1].formalCharge=this.parseIntAt(this.line,b+4)}catch(c){}this.rd()});c(b,"deleteAtom",function(a){null==this.bsDeleted&&(this.bsDeleted=new JU.BS);this.bsDeleted.set(a.index)},"J.adapter.smarter.Atom");
c(b,"readMolData",function(a,d){for(var h=this.asc.atoms,b=JU.PT.trim(this.line,"> <").toLowerCase(),c="",g=null;null!=this.rd()&&!this.line.equals("$$$$")&&0<this.line.length;)c+=81==this.line.length&&"+"==this.line.charAt(80)?this.line.substring(0,80):this.line+"\n";c=JU.PT.trim(c,"\n");JU.Logger.info(b+":"+JU.PT.esc(c));a.put(b,c);d.addLast(b);var j=0;if(b.toUpperCase().contains("_PARTIAL_CHARGES")){try{for(var g=JU.PT.parseFloatArray(c),k=this.asc.getLastAtomSetAtomIndex(),l=this.asc.ac;k<l;k++)h[k].partialCharge=
0;for(var f=0,k=F(g[f++]);0<=--k;){var n=F(g[f++])+this.iatom0-1,q=g[f++];h[n].partialCharge=q;j++}}catch(v){k=this.asc.getLastAtomSetAtomIndex();for(l=this.asc.ac;k<l;k++)h[k].partialCharge=0;JU.Logger.error("error reading "+b+" field -- partial charges cleared")}JU.Logger.info(j+" partial charges read")}else if(b.toUpperCase().contains("ATOM_NAMES")){j=0;try{for(var B=JU.PT.getTokens(c),f=0,k=this.parseIntStr(B[f++]);0<=--k;){for(var H;-2147483648==(H=this.parseIntStr(B[f++])););var n=H+this.iatom0-
1,L=B[f++];L.equals(".")||(h[n].atomName=L);j++}}catch(w){JU.Logger.error("error reading "+b+" field")}JU.Logger.info(j+" atom names read")}},"java.util.Map,JU.Lst");c(b,"addMolAtom",function(a,d,h,b,c,g,j){"H".equals(h)?this.nH++:"C".equals(h)&&this.nC++;this.haveNonzeroZ=(new Boolean(this.haveNonzeroZ|0.001<Math.abs(j))).valueOf();switch(d){case 0:break;case 1:h="1H";break;case 2:h="2H";break;case 3:h="3H";break;default:h=d+h}d=new J.adapter.smarter.Atom;d.elementSymbol=h;d.formalCharge=b;this.setAtomCoordXYZ(d,
c,g,j);-2147483648==a?this.asc.addAtom(d):(this.haveAtomSerials=!0,d.atomSerial=a,this.asc.addAtomWithMappedSerialNumber(d));return d},"~N,~N,~S,~N,~N,~N,~N");c(b,"fixOrder",function(a,d){switch(a){default:case 0:case -10:return 1;case 1:switch(d){case 1:return this.is2D=!0,1025;case 3:case 6:return this.is2D=!0,1041;case 2:case 4:return this.is2D=!0,1057}break;case 2:case 3:this.nDouble++;break;case 4:return 515;case 5:return 66;case 6:return 513;case 7:return 514;case 8:case 9:return 33;case 14:return 4;
case 15:return 5;case 16:return 6}return a},"~N,~N");c(b,"addMolBond",function(a,d,h,b){h=this.fixOrder(h,b);return this.haveAtomSerials?this.asc.addNewBondFromNames(a,d,h):this.asc.addNewBondWithOrder(this.iatom0+this.parseIntStr(a)-1,this.iatom0+this.parseIntStr(d)-1,h)},"~S,~S,~N,~N")});m("J.adapter.readers.molxyz");x(["J.adapter.smarter.AtomSetCollectionReader"],"J.adapter.readers.molxyz.XyzReader",["JU.Logger"],function(){var b=G(J.adapter.readers.molxyz,"XyzReader",J.adapter.smarter.AtomSetCollectionReader);
f(b,"checkLine",function(){var a=this.parseIntStr(this.line);if(-2147483648==a)return this.continuing=!1;this.vibrationNumber=++this.modelNumber;if(0>=this.desiredVibrationNumber?this.doGetModel(this.modelNumber,null):this.doGetVibration(this.vibrationNumber)){this.rd();this.checkCurrentLineForScript();this.asc.newAtomSet();var d=this.line.trim();this.readAtoms(a);this.applySymmetryAndSetTrajectory();this.asc.setAtomSetName(d);if(this.isLastModel(this.modelNumber))return this.continuing=!1}else this.skipAtomSet(a);
this.discardLinesUntilNonBlank();return!1});f(b,"finalizeSubclassReader",function(){this.isTrajectory=!1;this.finalizeReaderASCR()});c(b,"skipAtomSet",function(a){for(this.rd();0<=--a;)this.rd()},"~N");c(b,"readAtoms",function(a){for(var d=0;d<a;++d){this.rd();var h=this.getTokens();if(4>h.length)JU.Logger.warn("line cannot be read for XYZ atom data: "+this.line);else{var b=this.addAtomXYZSymName(h,1,null,null);this.setElementAndIsotope(b,h[0]);var c=4;switch(h.length){case 4:continue;case 5:case 6:case 8:case 9:if(0<=
h[4].indexOf("."))b.partialCharge=this.parseFloatStr(h[4]);else{var g=this.parseIntStr(h[4]);-2147483648!=g&&(b.formalCharge=g)}switch(h.length){case 5:continue;case 6:b.radius=this.parseFloatStr(h[5]);continue;case 9:b.atomSerial=this.parseIntStr(h[8])}c++;default:var g=this.parseFloatStr(h[c++]),j=this.parseFloatStr(h[c++]),h=this.parseFloatStr(h[c++]);if(Float.isNaN(g)||Float.isNaN(j)||Float.isNaN(h))continue;this.asc.addVibrationVector(b.index,g,j,h)}}}},"~N")});m("J.adapter.smarter");x(["JU.P3"],
"J.adapter.smarter.Atom",["JU.AU","$.Lst","$.V3"],function(){var b=s(function(){this.index=this.atomSetIndex=0;this.bsSymmetry=null;this.atomSite=0;this.elementSymbol=null;this.elementNumber=-1;this.atomName=null;this.formalCharge=-2147483648;this.partialCharge=NaN;this.vib=null;this.bfactor=NaN;this.foccupancy=1;this.radius=NaN;this.isHetero=!1;this.atomSerial=-2147483648;this.seqIdOrWyckoffCode=this.chainID=0;this.bondingRadius=NaN;this.altLoc="\x00";this.group3=null;this.sequenceNumber=-2147483648;
this.insertionCode="\x00";this.typeSymbol=this.tensors=this.anisoBorU=null;this.part=0;r(this,arguments)},J.adapter.smarter,"Atom",JU.P3,Cloneable);u(b,function(){K(this,J.adapter.smarter.Atom,[]);this.set(NaN,NaN,NaN)});c(b,"addTensor",function(a,d,h){if(null==a)return null;if(h||null==this.tensors)this.tensors=new JU.Lst;this.tensors.addLast(a);null!=d&&a.setType(d);return a},"JU.Tensor,~S,~B");c(b,"getClone",function(){var a;try{a=this.clone()}catch(d){if(E(d,"CloneNotSupportedException"))return null;
throw d;}null!=this.vib&&(a.vib=C(this.vib,"JU.Vibration")?this.vib.clone():JU.V3.newV(a.vib));null!=this.anisoBorU&&(a.anisoBorU=JU.AU.arrayCopyF(this.anisoBorU,-1));if(null!=this.tensors){a.tensors=new JU.Lst;for(var h=this.tensors.size();0<=--h;)a.tensors.addLast(this.tensors.get(h).copyTensor())}return a});c(b,"getElementSymbol",function(){if(null==this.elementSymbol&&null!=this.atomName){for(var a=this.atomName.length,d=0,h=String.fromCharCode(0);d<a&&!J.adapter.smarter.Atom.isValidSymChar1(h=
this.atomName.charAt(d));)++d;switch(a-d){case 0:break;default:if(a=this.atomName.charAt(d+1),J.adapter.smarter.Atom.isValidSymNoCase(h,a)){this.elementSymbol=""+h+a;break}case 1:J.adapter.smarter.Atom.isValidSym1(h)&&(this.elementSymbol=""+h)}}return this.elementSymbol});b.isValidSym1=c(b,"isValidSym1",function(a){return"A"<=a&&"Z">=a&&0>J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-65]},"~S");b.isValidSym2=c(b,"isValidSym2",function(a,d){return"A"<=a&&"Z">=a&&"a"<=d&&"z">=d&&0!=(J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-
65]>>d.charCodeAt(0)-97&1)},"~S,~S");b.isValidSymNoCase=c(b,"isValidSymNoCase",function(a,d){return J.adapter.smarter.Atom.isValidSym2(a,"a">d?String.fromCharCode(d.charCodeAt(0)+32):d)},"~S,~S");b.isValidSymChar1=c(b,"isValidSymChar1",function(a){return"A"<=a&&"Z">=a&&0!=J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-65]},"~S");c(b,"copyTo",function(a,d){var h=d.newCloneAtom(this);h.setT(a);return h},"JU.P3,J.adapter.smarter.AtomSetCollection");c(b,"getMult",function(){return this.seqIdOrWyckoffCode>>
16&61439});b.elementCharMasks=D(-1,[1972292,-2147351151,-2146019271,-2130706430,1441792,-2147348464,25,-2147205008,-2147344384,0,-2147352576,1179905,548936,-2147434213,-2147221504,-2145759221,0,1056947,-2147339946,-2147477097,-2147483648,-2147483648,-2147483648,8388624,-2147483646,139264])});m("J.adapter.smarter");x(["J.api.JmolAdapterAtomIterator"],"J.adapter.smarter.AtomIterator",["J.api.JmolAdapter"],function(){var b=s(function(){this.iatom=0;this.atom=null;this.ac=0;this.bsAtoms=this.atoms=null;
r(this,arguments)},J.adapter.smarter,"AtomIterator",null,J.api.JmolAdapterAtomIterator);u(b,function(a){this.ac=a.ac;this.atoms=a.atoms;this.bsAtoms=a.bsAtoms;this.iatom=0},"J.adapter.smarter.AtomSetCollection");f(b,"hasNext",function(){if(this.iatom==this.ac)return!1;for(;null==(this.atom=this.atoms[this.iatom++])||null!=this.bsAtoms&&!this.bsAtoms.get(this.atom.index);)if(this.iatom==this.ac)return!1;this.atoms[this.iatom-1]=null;return!0});f(b,"getAtomSetIndex",function(){return this.atom.atomSetIndex});
f(b,"getSymmetry",function(){return this.atom.bsSymmetry});f(b,"getAtomSite",function(){return this.atom.atomSite+1});f(b,"getUniqueID",function(){return Integer.$valueOf(this.atom.index)});f(b,"getElementNumber",function(){return 0<this.atom.elementNumber?this.atom.elementNumber:J.api.JmolAdapter.getElementNumber(this.atom.getElementSymbol())});f(b,"getAtomName",function(){return this.atom.atomName});f(b,"getFormalCharge",function(){return-2147483648==this.atom.formalCharge?0:this.atom.formalCharge});
f(b,"getPartialCharge",function(){return this.atom.partialCharge});f(b,"getTensors",function(){return this.atom.tensors});f(b,"getRadius",function(){return this.atom.radius});f(b,"getBondRadius",function(){return this.atom.bondingRadius});f(b,"getVib",function(){return null==this.atom.vib||Float.isNaN(this.atom.vib.z)?null:this.atom.vib});f(b,"getSeqID",function(){return-2147483648==(this.atom.seqIdOrWyckoffCode&-2147483648)?this.atom.seqIdOrWyckoffCode&2147483647:0});f(b,"getBfactor",function(){return this.atom.bfactor});
f(b,"getOccupancy",function(){return 100*this.atom.foccupancy});f(b,"getIsHetero",function(){return this.atom.isHetero});f(b,"getSerial",function(){return this.atom.atomSerial});f(b,"getChainID",function(){return this.atom.chainID});f(b,"getAltLoc",function(){return J.api.JmolAdapter.canonizeAlternateLocationID(this.atom.altLoc)});f(b,"getGroup3",function(){return this.atom.group3});f(b,"getSequenceNumber",function(){return this.atom.sequenceNumber});f(b,"getInsertionCode",function(){return J.api.JmolAdapter.canonizeInsertionCode(this.atom.insertionCode)});
f(b,"getXYZ",function(){return this.atom});f(b,"getElement",function(){return this.getElementNumber()&127});f(b,"getIsotope",function(){return this.getElementNumber()>>7});f(b,"getPart",function(){return this.atom.part})});m("J.adapter.smarter");x(["java.util.Hashtable"],"J.adapter.smarter.AtomSetCollection","java.util.Collections $.Properties JU.AU $.BS $.Lst $.P3 $.V3 J.adapter.smarter.Atom $.Bond $.SmarterJmolAdapter J.api.Interface JU.BSUtil $.Logger JV.JC".split(" "),function(){var b=s(function(){this.atoms=
this.atomSetInfo=this.collectionName=this.fileTypeName=this.bsAtoms=this.reader=null;this.ac=0;this.bonds=null;this.bondCount=0;this.structures=null;this.atomSetCount=this.structureCount=0;this.iSet=-1;this.errorMessage=this.atomSetAuxiliaryInfo=this.atomSetBondCounts=this.atomSetAtomCounts=this.atomSetAtomIndexes=this.atomSetNumbers=null;this.isTrajectory=this.coordinatesAreFractional=!1;this.trajectoryStepCount=0;this.trajectoryNames=this.vibrationSteps=this.trajectorySteps=null;this.allowMultiple=
this.doFixPeriodic=!1;this.readerList=null;this.atomMapAnyCase=!1;this.fixedSite=0;this.bsStructuredModels=null;this.haveAnisou=!1;this.baseSymmetryAtomCount=0;this.crystalReaderLatticeOpsOnly=!1;this.xtalSymmetry=null;this.bondIndex0=0;this.atomSymbolicMap=null;this.haveUnitCell=!1;this.vibScale=0;this.firstAtomToBond=-1;this.isConSurf=null;r(this,arguments)},J.adapter.smarter,"AtomSetCollection",null);N(b,function(){this.atomSetInfo=new java.util.Hashtable;this.atoms=Array(256);this.bonds=Array(256);
this.structures=Array(16);this.atomSetNumbers=D(16,0);this.atomSetAtomIndexes=D(16,0);this.atomSetAtomCounts=D(16,0);this.atomSetBondCounts=D(16,0);this.atomSetAuxiliaryInfo=Array(16);this.atomSymbolicMap=new java.util.Hashtable});u(b,function(a,d,h,b){this.fileTypeName=a;this.reader=d;this.allowMultiple=null==d||0>d.desiredVibrationNumber;a=new java.util.Properties;a.put("PATH_KEY",".PATH");a.put("PATH_SEPARATOR",J.adapter.smarter.SmarterJmolAdapter.PATH_SEPARATOR);this.setInfo("properties",a);null!=
d&&(a=d.htParams.get("appendToModelIndex"),null!=a&&this.setInfo("appendToModelIndex",a),a=d.htParams.get("fixedSite"),null!=a&&(this.fixedSite=a.intValue()));if(null!=h){d=0;this.readerList=new JU.Lst;for(b=0;b<h.length;b++)null!=h[b]&&(0<h[b].ac||null!=h[b].reader&&h[b].reader.mustFinalizeModelSet)&&this.appendAtomSetCollection(d++,h[b]);1<d&&this.setInfo("isMultiFile",Boolean.TRUE)}else null!=b&&(this.setInfo("isMultiFile",Boolean.TRUE),this.appendAtomSetCollectionList(b))},"~S,J.adapter.smarter.AtomSetCollectionReader,~A,JU.Lst");
c(b,"setCollectionName",function(a){if(null!=a&&0<(a=a.trim()).length)this.collectionName=a},"~S");c(b,"clearGlobalBoolean",function(a){this.atomSetInfo.remove(JV.JC.getBoolName(a))},"~N");c(b,"setGlobalBoolean",function(a){this.setInfo(JV.JC.getBoolName(a),Boolean.TRUE)},"~N");c(b,"getGlobalBoolean",function(a){return this.atomSetInfo.get(JV.JC.getBoolName(a))===Boolean.TRUE},"~N");c(b,"appendAtomSetCollectionList",function(a){var d=a.size();if(0==d)this.errorMessage="No file found!";else for(var h=
0;h<d;h++){var b=a.get(h);C(b,"JU.Lst")?this.appendAtomSetCollectionList(b):this.appendAtomSetCollection(h,b)}},"JU.Lst");c(b,"setTrajectory",function(){this.isTrajectory||(this.trajectorySteps=new JU.Lst);this.isTrajectory=!0;var a=null==this.bsAtoms?this.ac:this.bsAtoms.cardinality();if(!(1>=a)){for(var d=Array(a),h=0<a&&null!=this.atoms[0].vib&&!Float.isNaN(this.atoms[0].vib.z),a=h?Array(a):null,b=0==this.trajectoryStepCount?null:this.trajectorySteps.get(this.trajectoryStepCount-1),c=0,g=0;c<this.ac;c++)if(null==
this.bsAtoms||this.bsAtoms.get(c)){var j=JU.P3.newP(this.atoms[c]);this.doFixPeriodic&&null!=b&&(j=J.adapter.smarter.AtomSetCollection.fixPeriodic(j,b[c]));d[g]=j;h&&(a[g]=this.atoms[c].vib);g++}if(h){if(null==this.vibrationSteps){this.vibrationSteps=new JU.Lst;for(c=0;c<this.trajectoryStepCount;c++)this.vibrationSteps.addLast(null)}this.vibrationSteps.addLast(a)}this.trajectorySteps.addLast(d);this.trajectoryStepCount++}});c(b,"appendAtomSetCollection",function(a,d){null!=d.reader&&d.reader.mustFinalizeModelSet&&
this.readerList.addLast(d.reader);var h=this.ac;this.setInfo("loadState",d.atomSetInfo.get("loadState"));if(null!=d.bsAtoms){this.getBSAtoms(0);for(var b=d.bsAtoms.nextSetBit(0);0<=b;b=d.bsAtoms.nextSetBit(b+1))this.bsAtoms.set(h+b)}for(var b=0,c=this.atomSetCount,g=0;g<d.atomSetCount;g++){this.newAtomSet();var j=(this.atomSetAuxiliaryInfo[this.iSet]=d.atomSetAuxiliaryInfo[g]).get("PDB_CONECT_firstAtom_count_max");null!=j&&(j[0]+=h);this.setCurrentModelInfo("title",d.collectionName);this.setAtomSetName(d.getAtomSetName(g));
for(j=0;j<d.atomSetAtomCounts[g];j++)null!=this.bsAtoms&&this.bsAtoms.set(this.ac),this.newCloneAtom(d.atoms[b]),b++;this.atomSetNumbers[this.iSet]=0>a?this.iSet+1:1E6*(a+1)+d.atomSetNumbers[g]}for(b=0;b<d.bondCount;b++)g=d.bonds[b],this.addNewBondWithOrder(g.atomIndex1+h,g.atomIndex2+h,g.order);for(b=JV.JC.globalBooleans.length;0<=--b;)d.getGlobalBoolean(b)&&this.setGlobalBoolean(b);for(b=0;b<d.structureCount;b++)h=d.structures[b],this.addStructure(h),h.modelStartEnd[0]+=c,h.modelStartEnd[1]+=c},
"~N,J.adapter.smarter.AtomSetCollection");c(b,"setNoAutoBond",function(){this.setInfo("noAutoBond",Boolean.TRUE)});c(b,"freeze",function(a){1==this.atomSetCount&&null==this.collectionName&&(this.collectionName=this.getAtomSetAuxiliaryInfoValue(0,"name"));a&&this.reverseAtomSets();1<this.trajectoryStepCount&&this.finalizeTrajectory();this.getList(!0);this.getList(!1);for(a=0;a<this.atomSetCount;a++)this.setModelInfoForSet("initialAtomCount",Integer.$valueOf(this.atomSetAtomCounts[a]),a),this.setModelInfoForSet("initialBondCount",
Integer.$valueOf(this.atomSetBondCounts[a]),a)},"~B");c(b,"reverseAtomSets",function(){this.reverseArray(this.atomSetAtomIndexes);this.reverseArray(this.atomSetNumbers);this.reverseArray(this.atomSetAtomCounts);this.reverseArray(this.atomSetBondCounts);J.adapter.smarter.AtomSetCollection.reverseList(this.trajectorySteps);J.adapter.smarter.AtomSetCollection.reverseList(this.trajectoryNames);J.adapter.smarter.AtomSetCollection.reverseList(this.vibrationSteps);this.reverseObject(this.atomSetAuxiliaryInfo);
for(var a=0;a<this.ac;a++)this.atoms[a].atomSetIndex=this.atomSetCount-1-this.atoms[a].atomSetIndex;for(a=0;a<this.structureCount;a++){var d=this.structures[a].modelStartEnd[0];0<=d&&(this.structures[a].modelStartEnd[0]=this.atomSetCount-1-this.structures[a].modelStartEnd[1],this.structures[a].modelStartEnd[1]=this.atomSetCount-1-d)}for(a=0;a<this.bondCount;a++)this.bonds[a].atomSetIndex=this.atomSetCount-1-this.atoms[this.bonds[a].atomIndex1].atomSetIndex;this.reverseSets(this.bonds,this.bondCount);
for(var h=JU.AU.createArrayOfArrayList(this.atomSetCount),a=0;a<this.atomSetCount;a++)h[a]=new JU.Lst;for(a=0;a<this.ac;a++)h[this.atoms[a].atomSetIndex].addLast(this.atoms[a]);for(var d=D(this.ac,0),b=this.ac,a=this.atomSetCount;0<=--a;)for(var c=h[a].size();0<=--c;){var g=this.atoms[--b]=h[a].get(c);d[g.index]=b;g.index=b}for(a=0;a<this.bondCount;a++)this.bonds[a].atomIndex1=d[this.bonds[a].atomIndex1],this.bonds[a].atomIndex2=d[this.bonds[a].atomIndex2];for(a=0;a<this.atomSetCount;a++)h=this.getAtomSetAuxiliaryInfoValue(a,
"PDB_CONECT_firstAtom_count_max"),null!=h&&(h[0]=d[h[0]],h[1]=this.atomSetAtomCounts[a])});c(b,"reverseSets",function(a,d){for(var h=JU.AU.createArrayOfArrayList(this.atomSetCount),b=0;b<this.atomSetCount;b++)h[b]=new JU.Lst;for(b=0;b<d;b++){if(0>a[b].atomSetIndex)return;h[a[b].atomSetIndex].addLast(a[b])}for(b=this.atomSetCount;0<=--b;)for(var c=h[b].size();0<=--c;)a[--d]=h[b].get(c)},"~A,~N");c(b,"reverseObject",function(a){for(var d=this.atomSetCount,h=w(d/2);0<=--h;)JU.AU.swap(a,h,d-1-h)},"~A");
b.reverseList=c(b,"reverseList",function(a){null!=a&&java.util.Collections.reverse(a)},"JU.Lst");c(b,"reverseArray",function(a){for(var d=this.atomSetCount,h=w(d/2);0<=--h;)JU.AU.swapInt(a,h,d-1-h)},"~A");c(b,"getList",function(a){var d;for(d=this.ac;0<=--d&&!(null!=this.atoms[d]&&"\x00"!=(a?this.atoms[d].altLoc:this.atoms[d].insertionCode)););if(!(0>d)){var h=Array(this.atomSetCount);for(d=0;d<this.atomSetCount;d++)h[d]="";var b;for(d=0;d<this.ac;d++)if(null!=this.atoms[d]){var c=a?this.atoms[d].altLoc:
this.atoms[d].insertionCode;if("\x00"!=c&&0>h[b=this.atoms[d].atomSetIndex].indexOf(c))h[b]+=c}a=a?"altLocs":"insertionCodes";for(d=0;d<this.atomSetCount;d++)0<h[d].length&&this.setModelInfoForSet(a,h[d],d)}},"~B");c(b,"finish",function(){if(null!=this.reader)this.reader.finalizeModelSet();else if(null!=this.readerList)for(var a=0;a<this.readerList.size();a++)this.readerList.get(a).finalizeModelSet();this.atoms=null;this.atomSetAtomCounts=D(16,0);this.atomSetAuxiliaryInfo=Array(16);this.atomSetInfo=
new java.util.Hashtable;this.atomSetCount=0;this.atomSetNumbers=D(16,0);this.atomSymbolicMap=new java.util.Hashtable;this.bonds=null;this.iSet=-1;this.xtalSymmetry=this.readerList=null;this.structures=Array(16);this.structureCount=0;this.vibrationSteps=this.trajectorySteps=null});c(b,"discardPreviousAtoms",function(){for(var a=this.ac;0<=--a;)this.atoms[a]=null;this.ac=0;this.clearMap();this.atomSetCount=0;this.iSet=-1;for(a=this.atomSetAuxiliaryInfo.length;0<=--a;)this.atomSetAtomCounts[a]=0,this.atomSetBondCounts[a]=
0,this.atomSetAuxiliaryInfo[a]=null});c(b,"removeCurrentAtomSet",function(){if(!(0>this.iSet)){var a=this.atomSetAtomIndexes[this.iSet];null!=this.bsAtoms&&this.bsAtoms.clearBits(a,this.ac);this.ac=a;this.atomSetAtomCounts[this.iSet]=0;this.iSet--;this.atomSetCount--;this.reader.doCheckUnitCell=!1}});c(b,"getHydrogenAtomCount",function(){for(var a=0,d=0;d<this.ac;d++)(1==this.atoms[d].elementNumber||this.atoms[d].elementSymbol.equals("H"))&&a++;return a});c(b,"newCloneAtom",function(a){a=a.getClone();
this.addAtom(a);return a},"J.adapter.smarter.Atom");c(b,"cloneFirstAtomSet",function(a){if(!this.allowMultiple)return 0;this.newAtomSet();0==a&&(a=this.atomSetAtomCounts[0]);for(var d=0;d<a;++d)this.newCloneAtom(this.atoms[d]);return this.ac},"~N");c(b,"cloneAtomSetWithBonds",function(a){var d=this.atomSetBondCounts[a?this.iSet:0];a=a?this.cloneLastAtomSet():this.cloneFirstAtomSet(0);if(0<a)for(var h=0;h<d;h++){var b=this.bonds[this.bondCount-d];this.addNewBondWithOrder(b.atomIndex1+a,b.atomIndex2+
a,b.order)}},"~B");c(b,"cloneLastAtomSet",function(){return this.cloneLastAtomSetFromPoints(0,null)});c(b,"cloneLastAtomSetFromPoints",function(a,d){if(!this.allowMultiple)return 0;var h=0<a?a:this.getLastAtomSetAtomCount(),b=this.getLastAtomSetAtomIndex();this.newAtomSet();for(var c=0;c<h;++c){var g=this.newCloneAtom(this.atoms[b++]);null!=d&&g.setT(d[c])}return h},"~N,~A");c(b,"getLastAtomSetAtomCount",function(){return this.atomSetAtomCounts[this.iSet]});c(b,"getLastAtomSetAtomIndex",function(){return this.ac-
this.atomSetAtomCounts[this.iSet]});c(b,"addNewAtom",function(){return this.addAtom(new J.adapter.smarter.Atom)});c(b,"addAtom",function(a){this.ac==this.atoms.length&&(this.atoms=2E5<this.ac?JU.AU.ensureLength(this.atoms,this.ac+5E4):JU.AU.doubleLength(this.atoms));0==this.atomSetCount&&this.newAtomSet();a.index=this.ac;this.atoms[this.ac++]=a;a.atomSetIndex=this.iSet;a.atomSite=0<this.fixedSite?this.fixedSite-1:this.atomSetAtomCounts[this.iSet]++;return a},"J.adapter.smarter.Atom");c(b,"addAtomWithMappedName",
function(a){var d=this.addAtom(a).atomName;null!=d&&this.atomSymbolicMap.put(d,a)},"J.adapter.smarter.Atom");c(b,"addAtomWithMappedSerialNumber",function(a){var d=this.addAtom(a).atomSerial;-2147483648!=d&&this.atomSymbolicMap.put(""+d,a)},"J.adapter.smarter.Atom");c(b,"getAtomFromName",function(a){return this.atomSymbolicMap.get(a)},"~S");c(b,"setAtomMapAnyCase",function(){this.atomMapAnyCase=!0;var a=new java.util.Hashtable;a.putAll(this.atomSymbolicMap);for(var d,h=this.atomSymbolicMap.entrySet().iterator();h.hasNext()&&
((d=h.next())||1);){var b=d.getKey(),c=b.toUpperCase();c.equals(b)||a.put(c,d.getValue())}this.atomSymbolicMap=a});c(b,"getAtomIndex",function(a){var d=this.atomSymbolicMap.get(a);null==d&&this.atomMapAnyCase&&(d=this.atomSymbolicMap.get(a.toUpperCase()));return null==d?-1:d.index},"~S");c(b,"addNewBondWithOrder",function(a,d,h){var b=null;0<=a&&(a<this.ac&&0<=d&&d<this.ac&&a!=d)&&(b=new J.adapter.smarter.Bond(a,d,h),this.addBond(b));return b},"~N,~N,~N");c(b,"addNewBondFromNames",function(a,d,h){return this.addNewBondWithOrderA(this.getAtomFromName(a),
this.getAtomFromName(d),h)},"~S,~S,~N");c(b,"addNewBondWithOrderA",function(a,d,h){return null!=a&&null!=d?this.addNewBondWithOrder(a.index,d.index,h):null},"J.adapter.smarter.Atom,J.adapter.smarter.Atom,~N");c(b,"addBond",function(a){0<this.trajectoryStepCount||(0>a.atomIndex1||0>a.atomIndex2||0>a.order||a.atomIndex1==a.atomIndex2||this.atoms[a.atomIndex1].atomSetIndex!=this.atoms[a.atomIndex2].atomSetIndex?JU.Logger.debugging&&JU.Logger.debug(">>>>>>BAD BOND:"+a.atomIndex1+"-"+a.atomIndex2+" order="+
a.order):this.addBondNoCheck(a))},"J.adapter.smarter.Bond");c(b,"addBondNoCheck",function(a){this.bondCount==this.bonds.length&&(this.bonds=JU.AU.arrayCopyObject(this.bonds,this.bondCount+1024));this.bonds[this.bondCount++]=a;this.atomSetBondCounts[this.iSet]++},"J.adapter.smarter.Bond");c(b,"finalizeStructures",function(){if(0!=this.structureCount){this.bsStructuredModels=new JU.BS;for(var a=new java.util.Hashtable,d=0;d<this.structureCount;d++){var h=this.structures[d];-1==h.modelStartEnd[0]&&(h.modelStartEnd[0]=
0,h.modelStartEnd[1]=this.atomSetCount-1);this.bsStructuredModels.setBits(h.modelStartEnd[0],h.modelStartEnd[1]+1);if(0!=h.strandCount){var h=h.structureID+" "+h.modelStartEnd[0],b=a.get(h),b=(null==b?0:b.intValue())+1;a.put(h,Integer.$valueOf(b))}}for(d=0;d<this.structureCount;d++)h=this.structures[d],1==h.strandCount&&(h.strandCount=a.get(h.structureID+" "+h.modelStartEnd[0]).intValue())}});c(b,"addStructure",function(a){this.structureCount==this.structures.length&&(this.structures=JU.AU.arrayCopyObject(this.structures,
this.structureCount+32));this.structures[this.structureCount++]=a},"J.adapter.smarter.Structure");c(b,"addVibrationVectorWithSymmetry",function(a,d,h,b,c){if(c){c=this.atoms[a].atomSite;for(var g=this.atoms[a].atomSetIndex;a<this.ac&&this.atoms[a].atomSetIndex==g;a++)this.atoms[a].atomSite==c&&this.addVibrationVector(a,d,h,b)}else this.addVibrationVector(a,d,h,b)},"~N,~N,~N,~N,~B");c(b,"addVibrationVector",function(a,d,h,b){this.allowMultiple||(a%=this.ac);return this.atoms[a].vib=JU.V3.new3(d,h,
b)},"~N,~N,~N,~N");c(b,"setCoordinatesAreFractional",function(a){this.coordinatesAreFractional=a;this.setCurrentModelInfo("coordinatesAreFractional",Boolean.$valueOf(a));a&&this.setGlobalBoolean(0)},"~B");c(b,"setAnisoBorU",function(a,d,h){this.haveAnisou=!0;a.anisoBorU=d;d[6]=h},"J.adapter.smarter.Atom,~A,~N");c(b,"setU",function(a,d,h){var b=a.anisoBorU;null==b&&this.setAnisoBorU(a,b=M(8,0),8);b[d]=h},"J.adapter.smarter.Atom,~N,~N");c(b,"getXSymmetry",function(){null==this.xtalSymmetry&&(this.xtalSymmetry=
J.api.Interface.getOption("adapter.smarter.XtalSymmetry",this.reader.vwr,"file").set(this.reader));return this.xtalSymmetry});c(b,"getSymmetry",function(){return this.getXSymmetry().getFileSymmetry()});c(b,"setSymmetryFromAuditBlock",function(a){return null==a?null:this.getXSymmetry().setSymmetryFromAuditBlock(a)},"J.adapter.smarter.XtalSymmetry.FileSymmetry");c(b,"newFileSymmetry",function(){return this.getXSymmetry().newFileSymmetry()});c(b,"setTensors",function(){this.haveAnisou&&this.getXSymmetry().setTensors(this.isConSurf!==
Boolean.TRUE)});c(b,"setInfo",function(a,d){null==d?this.atomSetInfo.remove(a):this.atomSetInfo.put(a,d)},"~S,~O");c(b,"setAtomSetCollectionPartialCharges",function(a){if(!this.atomSetInfo.containsKey(a))return!1;for(var d=this.atomSetInfo.get(a),h=d.size(),b=this.ac;0<=--b;)this.atoms[b].partialCharge=d.get(b%h).floatValue();JU.Logger.info("Setting partial charges type "+a);return!0},"~S");c(b,"mapPartialCharge",function(a,d){this.getAtomFromName(a).partialCharge=d},"~S,~N");b.fixPeriodic=c(b,"fixPeriodic",
function(a,d){a.x=J.adapter.smarter.AtomSetCollection.fixPoint(a.x,d.x);a.y=J.adapter.smarter.AtomSetCollection.fixPoint(a.y,d.y);a.z=J.adapter.smarter.AtomSetCollection.fixPoint(a.z,d.z);return a},"JU.P3,JU.P3");b.fixPoint=c(b,"fixPoint",function(a,d){for(;0.9<a-d;)a-=1;for(;-0.9>a-d;)a+=1;return a},"~N,~N");c(b,"finalizeTrajectoryAs",function(a,d){this.trajectorySteps=a;this.vibrationSteps=d;this.trajectoryStepCount=a.size();this.finalizeTrajectory()},"JU.Lst,JU.Lst");c(b,"finalizeTrajectory",function(){if(0!=
this.trajectoryStepCount){var a=this.trajectorySteps.get(0),d=null==this.vibrationSteps?null:this.vibrationSteps.get(0),h=null==this.bsAtoms?this.ac:this.bsAtoms.cardinality();if(null!=this.vibrationSteps&&null!=d&&d.length<h||a.length<h)this.errorMessage="File cannot be loaded as a trajectory";else{for(var h=new JU.V3,b=0,c=0;b<this.ac;b++)if(null==this.bsAtoms||this.bsAtoms.get(b))null!=this.vibrationSteps&&(this.atoms[b].vib=null==d?h:d[c]),null!=a[c]&&this.atoms[b].setT(a[c]),c++;this.setInfo("trajectorySteps",
this.trajectorySteps);null!=this.vibrationSteps&&this.setInfo("vibrationSteps",this.vibrationSteps);0==this.ac&&(this.ac=a.length)}}});c(b,"newAtomSet",function(){this.newAtomSetClear(!0)});c(b,"newAtomSetClear",function(a){!this.allowMultiple&&0<=this.iSet&&this.reader.discardPreviousAtoms();this.bondIndex0=this.bondCount;this.isTrajectory&&this.reader.discardPreviousAtoms();this.iSet=this.atomSetCount++;this.atomSetCount>this.atomSetNumbers.length&&(this.atomSetAtomIndexes=JU.AU.doubleLengthI(this.atomSetAtomIndexes),
this.atomSetAtomCounts=JU.AU.doubleLengthI(this.atomSetAtomCounts),this.atomSetBondCounts=JU.AU.doubleLengthI(this.atomSetBondCounts),this.atomSetAuxiliaryInfo=JU.AU.doubleLength(this.atomSetAuxiliaryInfo));this.atomSetAtomIndexes[this.iSet]=this.ac;this.atomSetCount+this.trajectoryStepCount>this.atomSetNumbers.length&&(this.atomSetNumbers=JU.AU.doubleLengthI(this.atomSetNumbers));this.isTrajectory?this.atomSetNumbers[this.iSet+this.trajectoryStepCount]=this.atomSetCount+this.trajectoryStepCount:
this.atomSetNumbers[this.iSet]=this.atomSetCount;a&&this.clearMap();this.setCurrentModelInfo("title",this.collectionName)},"~B");c(b,"clearMap",function(){this.atomSymbolicMap.clear();this.atomMapAnyCase=!1});c(b,"getAtomSetAtomIndex",function(a){return this.atomSetAtomIndexes[a]},"~N");c(b,"getAtomSetAtomCount",function(a){return this.atomSetAtomCounts[a]},"~N");c(b,"getAtomSetBondCount",function(a){return this.atomSetBondCounts[a]},"~N");c(b,"setAtomSetName",function(a){if(null!=a)if(this.isTrajectory)this.setTrajectoryName(a);
else{var d=0>this.iSet?null:this.getAtomSetName(this.iSet);this.setModelInfoForSet("name",a,this.iSet);null!=this.reader&&(0<a.length&&!a.equals(d))&&this.reader.appendLoadNote(a);this.allowMultiple||this.setCollectionName(a)}},"~S");c(b,"setTrajectoryName",function(a){if(0!=this.trajectoryStepCount){null==this.trajectoryNames&&(this.trajectoryNames=new JU.Lst);for(var d=this.trajectoryNames.size();d<this.trajectoryStepCount;d++)this.trajectoryNames.addLast(null);this.trajectoryNames.set(this.trajectoryStepCount-
1,a)}},"~S");c(b,"setCurrentAtomSetNumber",function(a){this.setAtomSetNumber(this.iSet+(this.isTrajectory?this.trajectoryStepCount:0),a)},"~N");c(b,"setAtomSetNumber",function(a,d){this.atomSetNumbers[a]=d},"~N,~N");c(b,"setAtomSetModelProperty",function(a,d){this.setAtomSetModelPropertyForSet(a,d,this.iSet)},"~S,~S");c(b,"setAtomSetModelPropertyForSet",function(a,d,h){var b=this.getAtomSetAuxiliaryInfoValue(h,"modelProperties");null==b&&this.setModelInfoForSet("modelProperties",b=new java.util.Properties,
h);b.put(a,d);a.startsWith(".")&&b.put(a.substring(1),d)},"~S,~S,~N");c(b,"setAtomProperties",function(a,d,h){"string"==typeof d&&!d.endsWith("\n")&&(d+="\n");0>h&&(h=this.iSet);var b=this.getAtomSetAuxiliaryInfoValue(h,"atomProperties");null==b&&this.setModelInfoForSet("atomProperties",b=new java.util.Hashtable,h);b.put(a,d)},"~S,~O,~N,~B");c(b,"setAtomSetPartialCharges",function(a){if(!this.atomSetAuxiliaryInfo[this.iSet].containsKey(a))return!1;a=this.getAtomSetAuxiliaryInfoValue(this.iSet,a);
for(var d=a.size();0<=--d;)this.atoms[d].partialCharge=a.get(d).floatValue();return!0},"~S");c(b,"getAtomSetAuxiliaryInfoValue",function(a,d){return this.atomSetAuxiliaryInfo[0<=a?a:this.iSet].get(d)},"~N,~S");c(b,"setCurrentModelInfo",function(a,d){this.setModelInfoForSet(a,d,this.iSet)},"~S,~O");c(b,"setModelInfoForSet",function(a,d,h){0>h||(null==this.atomSetAuxiliaryInfo[h]&&(this.atomSetAuxiliaryInfo[h]=new java.util.Hashtable),null==d?this.atomSetAuxiliaryInfo[h].remove(a):this.atomSetAuxiliaryInfo[h].put(a,
d))},"~S,~O,~N");c(b,"getAtomSetNumber",function(a){return this.atomSetNumbers[a>=this.atomSetCount?0:a]},"~N");c(b,"getAtomSetName",function(a){if(null!=this.trajectoryNames&&a<this.trajectoryNames.size())return this.trajectoryNames.get(a);a>=this.atomSetCount&&(a=this.atomSetCount-1);return this.getAtomSetAuxiliaryInfoValue(a,"name")},"~N");c(b,"getAtomSetAuxiliaryInfo",function(a){a=a>=this.atomSetCount?this.atomSetCount-1:a;return 0>a?null:this.atomSetAuxiliaryInfo[a]},"~N");c(b,"setAtomSetEnergy",
function(a,d){0>this.iSet||(JU.Logger.info("Energy for model "+(this.iSet+1)+" = "+a),this.setCurrentModelInfo("EnergyString",a),this.setCurrentModelInfo("Energy",Float.$valueOf(d)),this.setAtomSetModelProperty("Energy",""+d))},"~S,~N");c(b,"setAtomSetFrequency",function(a,d,h,b,c){this.setAtomSetModelProperty("FreqValue",b);b+=" "+(null==c?"cm^-1":c);c=(null==h?"":h+" ")+b;this.setAtomSetName(c);this.setAtomSetModelProperty("Frequency",b);this.setAtomSetModelProperty("Mode",""+a);this.setModelInfoForSet("vibrationalMode",
Integer.$valueOf(a),this.iSet);null!=h&&this.setAtomSetModelProperty("FrequencyLabel",h);this.setAtomSetModelProperty(".PATH",(null==d?"":d+J.adapter.smarter.SmarterJmolAdapter.PATH_SEPARATOR+"Frequencies")+"Frequencies");return c},"~N,~S,~S,~S,~S");c(b,"getBondList",function(){for(var a=Array(this.bondCount),d=0;d<this.bondCount;d++)a[d]=z(-1,[this.atoms[this.bonds[d].atomIndex1].atomName,this.atoms[this.bonds[d].atomIndex2].atomName,""+this.bonds[d].order]);return a});c(b,"centralize",function(){for(var a=
new JU.P3,d=0;d<this.atomSetCount;d++){var h=this.atomSetAtomCounts[d],b=this.atomSetAtomIndexes[d];a.set(0,0,0);for(var c=b+h;--c>=b;)a.add(this.atoms[c]);a.scale(1/h);for(c=b+h;--c>=b;)this.atoms[c].sub(a)}});c(b,"mergeTrajectories",function(a){if(this.isTrajectory&&a.isTrajectory&&null==this.vibrationSteps){for(var d=0;d<a.trajectoryStepCount;d++)this.trajectorySteps.add(this.trajectoryStepCount++,a.trajectorySteps.get(d));this.setInfo("trajectorySteps",this.trajectorySteps);this.setInfo("ignoreUnitCell",
a.atomSetInfo.get("ignoreUnitCell"))}},"J.adapter.smarter.AtomSetCollection");c(b,"removeAtomSet",function(a){null==this.bsAtoms&&(this.bsAtoms=JU.BSUtil.newBitSet2(0,this.ac));var d=this.atomSetAtomIndexes[a],h=d+this.atomSetAtomCounts[a];this.bsAtoms.clearBits(d,h);for(d=h;d<this.ac;d++)this.atoms[d].atomSetIndex--;for(d=a+1;d<this.atomSetCount;d++)this.atomSetAuxiliaryInfo[d-1]=this.atomSetAuxiliaryInfo[d],this.atomSetAtomIndexes[d-1]=this.atomSetAtomIndexes[d],this.atomSetBondCounts[d-1]=this.atomSetBondCounts[d],
this.atomSetAtomCounts[d-1]=this.atomSetAtomCounts[d],this.atomSetNumbers[d-1]=this.atomSetNumbers[d];for(d=0;d<this.bondCount;d++)this.bonds[d].atomSetIndex=this.atoms[this.bonds[d].atomIndex1].atomSetIndex;this.atomSetAuxiliaryInfo[--this.atomSetCount]=null;for(d=h=0;d<this.structureCount;d++){var b=this.structures[d];b.modelStartEnd[0]==a&&b.modelStartEnd[1]==a&&(this.structures[d]=null,h++)}if(0<h){a=Array(this.structureCount-h);for(h=d=0;d<this.structureCount;d++)null!=this.structures[d]&&(a[h++]=
this.structures[d]);this.structures=a}},"~N");c(b,"removeLastUnselectedAtoms",function(){for(var a=this.ac,d=0,h=this.getLastAtomSetAtomIndex(),b=0,c=h;c<a;c++)this.bsAtoms.get(c)?(0<d&&(this.atoms[this.atoms[c].index=c-d]=this.atoms[c],this.atoms[c]=null),b++):(d++,this.ac--,this.atoms[c]=null);this.atomSetAtomCounts[this.iSet]=b;0==b?(this.iSet--,this.atomSetCount--):this.bsAtoms.setBits(h,h+b)});c(b,"checkNoEmptyModel",function(){for(;0<this.atomSetCount&&0==this.atomSetAtomCounts[this.atomSetCount-
1];)this.atomSetCount--});c(b,"getBSAtoms",function(a){null==this.bsAtoms&&(this.bsAtoms=new JU.BS,0!=a&&this.bsAtoms.setBits(0,0>a?this.ac:a));return this.bsAtoms},"~N");c(b,"setBSAtomsForSet",function(a){if(null!=this.bsAtoms){0>a&&(a=this.iSet);var d=this.atomSetAtomIndexes[a];0>this.bsAtoms.nextSetBit(d)&&this.bsAtoms.setBits(d,d+this.atomSetAtomCounts[a])}},"~N");c(b,"fix2Stereo",function(){this.getBSAtoms(-1);for(var a=this.bondCount;0<=--a;){var d=this.bonds[a];this.atoms[d.atomIndex2].elementSymbol.equals("H")&&
1025!=d.order&&1041!=d.order&&this.atoms[d.atomIndex1].elementSymbol.equals("C")?this.bsAtoms.clear(d.atomIndex2):this.atoms[d.atomIndex1].elementSymbol.equals("H")&&this.atoms[d.atomIndex2].elementSymbol.equals("C")&&this.bsAtoms.clear(d.atomIndex1)}})});m("J.adapter.smarter");x(["javajs.api.GenericLineReader","JU.SB","JV.Viewer"],"J.adapter.smarter.AtomSetCollectionReader","JU.BS $.Lst $.M3 $.P3 $.PT $.Quat $.V3 J.adapter.smarter.Atom $.AtomSetCollection J.api.Interface $.JmolAdapter JU.BSUtil $.Logger $.SimpleUnitCell JV.FileManager $.JC".split(" "),
function(){var b=s(function(){this.requiresBSFilter=this.debugging=this.isBinary=!1;this.dssr=this.validation=this.domains=this.trajectorySteps=this.htParams=this.readerName=this.binaryDoc=this.reader=this.asc=this.primitiveToCrystal=null;this.isConcatenated=this.openVarna=!1;this.lstNCS=this.thisBiomolecule=this.addedDataKey=this.addedData=null;this.floatifyJavaDouble=!0;this.next=this.prevline=this.line=null;this.ptLine=0;this.checkNearAtoms=!0;this.fillRange=this.latticeCells=this.latticeType=
null;this.iHaveSymmetryOperators=this.iHaveUnitCell=this.doProcessLines=!1;this.continuing=!0;this.vwr=null;this.isMolecular=this.is2D=this.noMinimize=this.noHydrogens=this.optimize2D=this.isSequential=this.getHeader=this.doCheckUnitCell=this.applySymmetryToBonds=this.isTrajectory=this.ignoreFileSymmetryOperators=this.doApplySymmetry=!1;this.vibrationNumber=this.modelNumber=this.templateAtomCount=0;this.desiredVibrationNumber=-2147483648;this.bsModels=null;this.havePartialChargeFilter=this.useFileModelNumbers=
!1;this.calculationType="?";this.sgName=null;this.ignoreFileSpaceGroupName=this.ignoreFileUnitCell=!1;this.unitCellParams=null;this.desiredModelNumber=-2147483648;this.out=this.symmetry=null;this.doPackUnitCell=this.iHaveFractionalCoordinates=!1;this.ptSupercell=null;this.forcePacked=this.mustFinalizeModelSet=!1;this.packingRange=null;this.cellSlop=1E-4;this.isPrimitive=this.rotateHexCell=!1;this.modDim=0;this.highprecision0=this.lowPrecision=!1;this.loadNote=null;this.merging=this.fileCoordinatesAreFractional=
this.doConvertToFractional=!1;this.symmetryRange=0;this.firstLastStep=null;this.lastModelNumber=2147483647;this.desiredSpaceGroupIndex=-1;this.latticeScaling=NaN;this.unitCellOffset=null;this.unitCellOffsetFractional=!1;this.paramsLattice=this.moreUnitCellInfo=null;this.paramsPacked=this.paramsCentroid=!1;this.fileName=this.filePath=this.fileOffsetFractional=this.fileOffset=this.fileScaling=null;this.baseBondIndex=this.baseAtomIndex=0;this.stateScriptVersionInt=2147483647;this.isSUPERCELL=this.noPack=
this.isFinalized=!1;this.precision=0;this.haveModel=!1;this.previousUnitCell=this.previousSpaceGroup=null;this.nMatrixElements=0;this.filterCased=this.filter=this.bsFilter=this.matUnitCellOrientation=this.ucItems=null;this.filterAtomType=this.filterAtomName=this.filterChain=this.filterGroup3=this.filterAltLoc=this.haveAtomFilter=!1;this.filterAtomTypeStr=null;this.filterAtomNameTerminator=";";this.filterEveryNth=this.filterAllHetero=this.filterHetero=this.filterElement=!1;this.filterSymop=null;this.nFiltered=
this.filterN=0;this.reverseModels=this.doReadMolecularOrbitals=this.allowPDBFilter=this.isDSSP1=this.ignoreStructure=this.useAltNames=this.addVibrations=this.doCentralize=this.doSetOrientation=!1;this.modelNameRequired=null;this.centroidPacked=this.doCentroidUnitCell=!1;this.strSupercell=null;this.filteredPrecision=this.polymerX=this.slabXY=this.allow_a_len_1=!1;this.ms=this.matRot=this.filter2Cased=this.filter1Cased=this.filter2=this.filter1=null;this.vibsFractional=!1;this.siteScript=this.previousScript=
null;r(this,arguments)},J.adapter.smarter,"AtomSetCollectionReader",null,javajs.api.GenericLineReader);N(b,function(){this.next=D(1,0);this.highprecision0=JV.Viewer.isHighPrecision;this.loadNote=new JU.SB});c(b,"getPackingRangeValue",function(a){return null!=this.packingRange?this.packingRange.floatValue():0!=a?a:0.02},"~N");c(b,"setup",function(a,d,h){this.setupASCR(a,d,h)},"~S,java.util.Map,~O");c(b,"setupASCR",function(a,d,h){null!=a&&(this.debugging=JU.Logger.debugging,this.htParams=d,this.filePath=
JV.FileManager.stripTypePrefix(""+d.get("fullPathName")),a=this.filePath.lastIndexOf("/"),this.fileName=this.filePath.substring(a+1),C(h,"java.io.BufferedReader")?this.reader=h:C(h,"javajs.api.GenericBinaryDocument")&&(this.binaryDoc=h))},"~S,java.util.Map,~O");c(b,"readData",function(){this.initialize();this.asc=new J.adapter.smarter.AtomSetCollection(this.readerName,this,null,null);try{this.initializeReader();if(null==this.binaryDoc)for(null==this.line&&this.continuing&&this.rd();null!=this.line&&
this.continuing;)this.checkLine()&&this.rd();else this.binaryDoc.setOutputChannel(this.out),this.processBinaryDocument();this.finalizeSubclassReader();this.isFinalized||this.finalizeReaderASCR()}catch(a){JU.Logger.info("Reader error: "+a),a.printStackTrace(),this.setError(a)}null!=this.reader&&this.reader.close();null!=this.binaryDoc&&this.binaryDoc.close();return this.finish()});c(b,"fixBaseIndices",function(){try{var a=this.htParams.get("baseModelIndex");if(null!=a){var d=a.intValue();this.baseAtomIndex+=
this.asc.ac;this.baseBondIndex+=this.asc.bondCount;d+=this.asc.atomSetCount;this.htParams.put("baseAtomIndex",Integer.$valueOf(this.baseAtomIndex));this.htParams.put("baseBondIndex",Integer.$valueOf(this.baseBondIndex));this.htParams.put("baseModelIndex",Integer.$valueOf(d))}}catch(h){if(!E(h,Exception))throw h;}});c(b,"readDataObject",function(a){this.initialize();this.asc=new J.adapter.smarter.AtomSetCollection(this.readerName,this,null,null);this.initializeReader();this.processDOM(a);return this.finish()},
"~O");c(b,"processDOM",function(){},"~O");c(b,"processBinaryDocument",function(){});c(b,"initializeReader",function(){});c(b,"checkLine",function(){return!0});c(b,"checkLastModel",function(){if(this.isLastModel(this.modelNumber)&&this.doProcessLines)return this.continuing=this.doProcessLines=!1;this.doProcessLines=!1;return!0});c(b,"isLastModel",function(a){return 0<this.desiredModelNumber||a>=this.lastModelNumber},"~N");c(b,"appendLoadNote",function(a){null==a?this.loadNote=new JU.SB:(this.loadNote.append(a).append("\n"),
JU.Logger.info(a))},"~S");c(b,"initializeTrajectoryFile",function(){this.asc.addAtom(new J.adapter.smarter.Atom);this.trajectorySteps=this.htParams.get("trajectorySteps");null==this.trajectorySteps&&this.htParams.put("trajectorySteps",this.trajectorySteps=new JU.Lst)});c(b,"finalizeSubclassReader",function(){});c(b,"finalizeReaderASCR",function(){this.isFinalized=!0;if(0<this.asc.atomSetCount){1==this.asc.atomSetCount&&(this.asc.setCurrentModelInfo("dbName",this.htParams.get("dbName")),this.asc.setCurrentModelInfo("auxFiles",
this.htParams.get("auxFiles")));this.applySymmetryAndSetTrajectory();this.asc.finalizeStructures();this.doCentralize&&this.asc.centralize();null!=this.fillRange&&this.asc.setInfo("boundbox",this.fillRange);var a=this.asc.getAtomSetAuxiliaryInfo(0);if(null!=a){if(null!=this.domains){this.asc.setGlobalBoolean(5);var d=this.domains.getMapKeys(2,!0),h=d.indexOf("{ ",2);0<=h&&(d=d.substring(h+2));h=d.indexOf("_metadata");0>h&&(h=d.indexOf("metadata"));0<=h&&(d=d.substring(0,h));d=JU.PT.rep(JU.PT.replaceAllCharacters(d,
"{}","").trim(),"\n","\n  ")+"\n\nUse SHOW DOMAINS for details.";this.appendLoadNote("\nDomains loaded:\n   "+d);for(d=this.asc.atomSetCount;0<=--d;)a=this.asc.getAtomSetAuxiliaryInfo(d),a.put("domains",this.domains)}if(null!=this.validation)for(d=this.asc.atomSetCount;0<=--d;)a=this.asc.getAtomSetAuxiliaryInfo(d),a.put("validation",this.validation);null!=this.dssr?(a.put("dssrJSON",Boolean.TRUE),a.put("dssr",this.dssr),this.openVarna&&this.vwr.plugin("VARNA","show","dssr"),this.addJmolScript("set cartoonblocks;cartoons only;color structure")):
this.openVarna&&this.addJmolScript("calculate structure dssr;set cartoonblocks;cartoons only;color structure")}}this.floatifyJavaDouble||this.asc.setInfo("highPrecision",Boolean.TRUE);this.setLoadNote()});c(b,"setLoadNote",function(){var a=this.loadNote.toString();0<this.loadNote.length()&&this.asc.setInfo("modelLoadNote",a);return a});c(b,"setIsPDB",function(){this.asc.setGlobalBoolean(4);null!=this.htParams.get("pdbNoHydrogens")&&this.asc.setInfo("pdbNoHydrogens",this.htParams.get("pdbNoHydrogens"));
this.checkFilterKey("ADDHYDROGENS")&&this.asc.setInfo("pdbAddHydrogens",Boolean.TRUE)});c(b,"setModelPDB",function(a){a?this.asc.setGlobalBoolean(4):this.asc.clearGlobalBoolean(4);this.asc.setCurrentModelInfo(JV.JC.getBoolName(4),a?Boolean.TRUE:null)},"~B");c(b,"finish",function(){!1!=this.highprecision0&&this.vwr.setBooleanPropertyTok("doubleprecision",603979831,this.highprecision0);var a=this.htParams.get("loadState");this.asc.setInfo("loadState",null==a?"":a);a=this.htParams.get("smilesString");
null!=a&&this.asc.setInfo("smilesString",a);this.htParams.containsKey("templateAtomCount")||this.htParams.put("templateAtomCount",Integer.$valueOf(this.asc.ac));null!=this.bsFilter&&(this.htParams.put("filteredAtomCount",Integer.$valueOf(JU.BSUtil.cardinalityOf(this.bsFilter))),this.htParams.put("bsFilter",this.bsFilter));this.calculationType.equals("?")||this.asc.setInfo("calculationType",this.calculationType);var d=a=this.asc.fileTypeName;0<=d.indexOf("(")&&(d=d.substring(0,d.indexOf("(")));for(var h=
this.asc.atomSetCount;0<=--h;)this.asc.setModelInfoForSet("fileName",this.filePath,h),this.asc.setModelInfoForSet("fileType",d,h);this.asc.freeze(this.reverseModels);if(null!=this.asc.errorMessage)return this.asc.errorMessage+"\nfor file "+this.filePath+"\ntype "+a;if(!this.merging&&(null==this.asc.bsAtoms?0==this.asc.ac:0>this.asc.bsAtoms.nextSetBit(0))&&0>d.indexOf("DataOnly")&&null==this.asc.atomSetInfo.get("dataOnly"))return"No atoms found\nfor file "+this.filePath+"\ntype "+a;this.fixBaseIndices();
return this.asc});c(b,"setError",function(a){var d=a.getMessage();this.asc.errorMessage=null==this.line?"Error reading file at end of file \n"+d:"Error reading file at line "+this.ptLine+":\n"+this.line+"\n"+d;a.printStackTrace()},"Throwable");c(b,"initialize",function(){this.htParams.containsKey("baseAtomIndex")&&(this.baseAtomIndex=this.htParams.get("baseAtomIndex").intValue());this.htParams.containsKey("baseBondIndex")&&(this.baseBondIndex=this.htParams.get("baseBondIndex").intValue());this.initializeSymmetry();
this.vwr=this.htParams.remove("vwr");this.htParams.containsKey("stateScriptVersionInt")&&(this.stateScriptVersionInt=this.htParams.get("stateScriptVersionInt").intValue());this.packingRange=this.htParams.get("packingRange");var a=null!=this.htParams.get("highPrecision");null==this.packingRange&&a&&(this.floatifyJavaDouble=!1,this.packingRange=Float.$valueOf(1E-4));this.merging=this.htParams.containsKey("merging");this.getHeader=this.htParams.containsKey("getHeader");this.isSequential=this.htParams.containsKey("isSequential");
this.readerName=this.htParams.get("readerName");this.htParams.containsKey("outputChannel")&&(this.out=this.htParams.get("outputChannel"));this.htParams.containsKey("vibrationNumber")?this.desiredVibrationNumber=this.htParams.get("vibrationNumber").intValue():this.htParams.containsKey("modelNumber")&&(this.desiredModelNumber=this.htParams.get("modelNumber").intValue());this.applySymmetryToBonds=this.htParams.containsKey("applySymmetryToBonds");this.bsFilter=this.requiresBSFilter?this.htParams.get("bsFilter"):
null;this.setFilter(null);this.fillRange=this.htParams.get("fillRange");this.paramsLattice=this.htParams.get("lattice");a=this.htParams.get("supercell");null!=this.strSupercell&&!this.noPack&&(this.forcePacked=!0);C(a,"JU.P3")?(a=this.ptSupercell=a,1!=a.length()&&(this.strSupercell=F(a.x)+"a,"+F(a.y)+"b,"+F(a.z)+"c",this.isSUPERCELL=!0)):"string"==typeof a&&(this.strSupercell=a,this.isSUPERCELL=!0);a=this.htParams.containsKey("ptFile")?this.htParams.get("ptFile").intValue():-1;this.isTrajectory=this.htParams.containsKey("isTrajectory");
0<a&&this.htParams.containsKey("firstLastSteps")?(a=this.htParams.get("firstLastSteps").get(a-1),C(a,"JU.BS")?this.bsModels=a:this.firstLastStep=a):this.htParams.containsKey("firstLastStep")?this.firstLastStep=this.htParams.get("firstLastStep"):this.htParams.containsKey("bsModels")&&(this.bsModels=this.htParams.get("bsModels"));this.useFileModelNumbers=this.htParams.containsKey("useFileModelNumbers")||this.checkFilterKey("USEFILEMODELNUMBERS");this.htParams.containsKey("templateAtomCount")&&(this.templateAtomCount=
this.htParams.get("templateAtomCount").intValue());if(null!=this.bsModels||null!=this.firstLastStep)this.desiredModelNumber=-2147483648;if(null==this.bsModels&&null!=this.firstLastStep){0>this.firstLastStep[0]&&(this.firstLastStep[0]=0);if(0==this.firstLastStep[2]||this.firstLastStep[1]<this.firstLastStep[0])this.firstLastStep[1]=-1;1>this.firstLastStep[2]&&(this.firstLastStep[2]=1);this.bsModels=JU.BSUtil.newAndSetBit(this.firstLastStep[0]);if(this.firstLastStep[1]>this.firstLastStep[0])for(a=this.firstLastStep[0];a<=
this.firstLastStep[1];a+=this.firstLastStep[2])this.bsModels.set(a)}if(null!=this.bsModels&&(null==this.firstLastStep||-1!=this.firstLastStep[1]))this.lastModelNumber=this.bsModels.length();this.symmetryRange=this.htParams.containsKey("symmetryRange")?this.htParams.get("symmetryRange").floatValue():0;this.paramsCentroid=this.htParams.containsKey("centroid");this.paramsPacked=this.htParams.containsKey("packed");this.initializeSymmetryOptions();this.htParams.containsKey("spaceGroupIndex")&&(this.desiredSpaceGroupIndex=
this.htParams.get("spaceGroupIndex").intValue(),-2==this.desiredSpaceGroupIndex&&(this.sgName=this.htParams.get("spaceGroupName")),this.ignoreFileSpaceGroupName=-2==this.desiredSpaceGroupIndex||0<=this.desiredSpaceGroupIndex,this.ignoreFileSymmetryOperators=-1!=this.desiredSpaceGroupIndex);this.htParams.containsKey("unitCellOffset")&&(this.fileScaling=JU.P3.new3(1,1,1),this.fileOffset=this.htParams.get("unitCellOffset"),this.fileOffsetFractional=JU.P3.newP(this.fileOffset),this.unitCellOffsetFractional=
this.htParams.containsKey("unitCellOffsetFractional"));this.htParams.containsKey("unitcell")&&(a=this.htParams.get("unitcell"),this.merging&&this.setFractionalCoordinates(!0),9==a.length?(this.addExplicitLatticeVector(0,a,0),this.addExplicitLatticeVector(1,a,3),this.addExplicitLatticeVector(2,a,6)):this.setUnitCell(a[0],a[1],a[2],a[3],a[4],a[5]),this.ignoreFileUnitCell=this.iHaveUnitCell,this.merging&&!this.iHaveUnitCell&&this.setFractionalCoordinates(!1));this.domains=this.htParams.get("domains");
this.validation=this.htParams.get("validation");this.dssr=this.htParams.get("dssr");this.isConcatenated=this.htParams.containsKey("concatenate")});c(b,"parsePrecision",function(a){if(!this.filteredPrecision){var d=a.indexOf(".")+1;if(0<=d){var h=a.indexOf("(");0>h?this.precision=Math.max(this.precision,a.length-1-d):(0==this.precision&&(this.precision=h),this.precision=Math.min(this.precision,h-1-d))}}return this.parseFloatStr(a)},"~S");c(b,"setLowPrecision",function(){this.lowPrecision=!0;this.cellSlop=
1E-4;null==this.packingRange&&(this.packingRange=Double.$valueOf(1E-4))});c(b,"setPrecision",function(){var a;if(this.lowPrecision)a=!1,this.precision=4;else if(this.precision=1E3<this.precision?this.precision-1E3:Math.min(12,Math.max(4,this.precision)),a=7<=this.precision)this.vwr.setBooleanProperty("doubleprecision",!0),JV.Viewer.isHighPrecision?(this.cellSlop=1E-12,this.paramsPacked||(this.packingRange=Double.$valueOf(this.cellSlop)),this.asc.setInfo("highPrecision",Boolean.TRUE)):(a=!1,this.precision=
6,this.appendLoadNote("Structure read has high precision but this version of Jmol uses float precision.\nUse JmolD.jar or JavaScript for full precision."));!a&&10>this.precision&&(this.cellSlop=Math.pow(10,-this.precision));this.symmetry.setPrecision(this.cellSlop);this.unitCellParams[26]=this.cellSlop;if(this.fileCoordinatesAreFractional){a=this.asc.ac;for(var d=this.asc.getLastAtomSetAtomIndex();--a>=d;)this.symmetry.twelfthify(this.asc.atoms[a])}this.appendLoadNote("Precision set to "+this.precision+
"; packing set to "+(null==this.packingRange?0.02:this.packingRange.floatValue()))});c(b,"initializeSymmetryOptions",function(){this.latticeCells=D(4,0);this.doApplySymmetry=!1;var a=this.paramsLattice;if(null==a||0==a.length()){if(!this.forcePacked&&null==this.strSupercell)return;a=JU.P3.new3(1,1,1)}this.latticeCells[0]=F(a.x);this.latticeCells[1]=F(a.y);this.latticeCells[2]=F(a.z);C(a,"JU.T4")&&(this.latticeCells[3]=F(a.w));if((this.doCentroidUnitCell=this.paramsCentroid)&&(-1==this.latticeCells[2]||
0==this.latticeCells[2]))this.latticeCells[2]=1;a=this.forcePacked||this.paramsPacked;this.centroidPacked=this.doCentroidUnitCell&&a;this.doPackUnitCell=!this.doCentroidUnitCell&&(a||0>this.latticeCells[2]);this.doApplySymmetry=0<this.latticeCells[0]&&0<this.latticeCells[1];this.doApplySymmetry||(this.latticeCells=D(3,0))});c(b,"doGetModel",function(a,d){if(null!=d&&null!=this.modelNameRequired&&0<this.modelNameRequired.length&&0>d.toUpperCase().indexOf(this.modelNameRequired))return!1;var h=null==
this.bsModels?1>this.desiredModelNumber||a==this.desiredModelNumber:a>this.lastModelNumber?!1:0<a&&this.bsModels.get(a-1)||this.haveModel&&null!=this.firstLastStep&&0>this.firstLastStep[1]&&(2>this.firstLastStep[2]||0==(a-1-this.firstLastStep[0])%this.firstLastStep[2]);h&&0==this.desiredModelNumber&&this.discardPreviousAtoms();this.haveModel=(new Boolean(this.haveModel|h)).valueOf();h&&(this.doProcessLines=!0);return h},"~N,~S");c(b,"discardPreviousAtoms",function(){this.asc.discardPreviousAtoms()});
c(b,"initializeSymmetry",function(){this.previousSpaceGroup=this.sgName;this.previousUnitCell=this.unitCellParams;this.iHaveUnitCell=this.ignoreFileUnitCell;if(!this.ignoreFileUnitCell){this.unitCellParams=M(27,0);for(var a=27;0<=--a;)this.unitCellParams[a]=NaN;this.unitCellParams[25]=this.latticeScaling;this.unitCellParams[26]=this.cellSlop;this.symmetry=null}this.ignoreFileSpaceGroupName||(this.sgName="unspecified!");this.doCheckUnitCell=!1});c(b,"newAtomSet",function(a){0<=this.asc.iSet?(this.asc.newAtomSet(),
this.asc.setCollectionName("<collection of "+(this.asc.iSet+1)+" models>")):this.asc.setCollectionName(a);this.asc.setModelInfoForSet("name",a,Math.max(0,this.asc.iSet));this.asc.setAtomSetName(a)},"~S");c(b,"cloneLastAtomSet",function(a,d){var h=this.asc.getLastAtomSetAtomCount();this.asc.cloneLastAtomSetFromPoints(a,d);this.asc.haveUnitCell&&(this.doCheckUnitCell=this.iHaveUnitCell=!0,this.sgName=this.previousSpaceGroup,this.unitCellParams=this.previousUnitCell);return h},"~N,~A");c(b,"setSpaceGroupName",
function(a){this.ignoreFileSpaceGroupName||null==a||(a=a.trim(),0==a.length||(a.equals("HM:")||a.equals(this.sgName))||(a.equals("P1")||JU.Logger.info("Setting space group name to "+a),this.sgName=a))},"~S");c(b,"setSymmetryOperator",function(a){if(this.ignoreFileSymmetryOperators)return-1;var d=this.asc.getXSymmetry().addSpaceGroupOperation(a,!0);0>d&&this.warnSkippingOperation(a);this.iHaveSymmetryOperators=!0;return d},"~S");c(b,"warnSkippingOperation",function(a){JU.Logger.warn("Skipping symmetry operation "+
a)},"~S");c(b,"initializeCartesianToFractional",function(){for(var a=0;16>a;a++)if(!Float.isNaN(this.unitCellParams[6+a]))return;for(a=0;16>a;a++)this.unitCellParams[6+a]=0==a%5?1:0;this.nMatrixElements=0});c(b,"clearUnitCell",function(){if(!this.ignoreFileUnitCell){for(var a=6;22>a;a++)this.unitCellParams[a]=NaN;this.checkUnitCell(6)}});c(b,"setUnitCellItem",function(a,d){this.ignoreFileUnitCell||(0==a&&1==d&&!this.allow_a_len_1||3==a&&0==d?(null==this.ucItems&&(this.ucItems=M(6,0)),this.ucItems[a]=
d):(null!=this.ucItems&&6>a&&(this.ucItems[a]=d),!Float.isNaN(d)&&(6<=a&&Float.isNaN(this.unitCellParams[6]))&&this.initializeCartesianToFractional(),this.unitCellParams[a]=d,this.debugging&&JU.Logger.debug("setunitcellitem "+a+" "+d),6>a||Float.isNaN(d)?this.iHaveUnitCell=this.checkUnitCell(6):12==++this.nMatrixElements&&(this.iHaveUnitCell=this.checkUnitCell(22))))},"~N,~N");c(b,"setUnitCell",function(a,d,h,b,c,g){this.ignoreFileUnitCell||(this.clearUnitCell(),this.unitCellParams[0]=a,this.unitCellParams[1]=
d,this.unitCellParams[2]=h,0!=b&&(this.unitCellParams[3]=b),0!=c&&(this.unitCellParams[4]=c),0!=g&&(this.unitCellParams[5]=g),this.iHaveUnitCell=this.checkUnitCell(6))},"~N,~N,~N,~N,~N,~N");c(b,"addExplicitLatticeVector",function(a,d,h){if(!this.ignoreFileUnitCell){if(0==a)for(var b=0;6>b;b++)this.unitCellParams[b]=0;a=6+3*a;this.unitCellParams[a++]=d[h++];this.unitCellParams[a++]=d[h++];this.unitCellParams[a]=d[h];if(Float.isNaN(this.unitCellParams[0]))for(a=0;6>a;a++)this.unitCellParams[a]=-1;if(this.iHaveUnitCell=
this.checkUnitCell(15)){if(this.slabXY||this.polymerX)this.unitCellParams[2]=-1;this.polymerX&&(this.unitCellParams[1]=-1)}}},"~N,~A,~N");c(b,"checkUnitCell",function(a){for(var d=0;d<a;d++)if(Float.isNaN(this.unitCellParams[d]))return!1;this.fixFloatA(this.unitCellParams);if(22==a&&1==this.unitCellParams[0]&&1==this.unitCellParams[1]&&1==this.unitCellParams[2]&&1==this.unitCellParams[6]&&1==this.unitCellParams[11]&&1==this.unitCellParams[16])return!1;6==a&&Float.isNaN(this.unitCellParams[6])&&(this.slabXY&&
0<this.unitCellParams[2]?(JU.SimpleUnitCell.addVectors(this.unitCellParams),this.unitCellParams[2]=-1):this.polymerX&&0<this.unitCellParams[1]&&(JU.SimpleUnitCell.addVectors(this.unitCellParams),this.unitCellParams[1]=this.unitCellParams[2]=-1));this.doApplySymmetry&&(this.getSymmetry(),this.doConvertToFractional=!this.fileCoordinatesAreFractional);return!0},"~N");c(b,"getSymmetry",function(){if(!this.iHaveUnitCell)return null;null==this.symmetry&&((this.symmetry=this.asc.newFileSymmetry()).setUnitCellFromParams(this.unitCellParams,
!1,this.cellSlop),this.checkUnitCellOffset());null==this.symmetry?this.iHaveUnitCell=!1:this.symmetry.setSpaceGroupName(this.sgName);return this.symmetry});c(b,"checkUnitCellOffset",function(){null==this.fileOffsetFractional||null==this.symmetry||(this.fileOffset.setT(this.fileOffsetFractional),this.unitCellOffsetFractional!=this.fileCoordinatesAreFractional&&(this.unitCellOffsetFractional?this.symmetry.toCartesian(this.fileOffset,!1):this.symmetry.toFractional(this.fileOffset,!1)))});c(b,"fractionalizeCoordinates",
function(a){if(null!=this.getSymmetry()){var d=this.asc.atoms;if(a)for(var h=this.asc.ac;0<=--h;)this.symmetry.toFractional(d[h],!1);else for(h=this.asc.ac;0<=--h;)this.symmetry.toCartesian(d[h],!1);this.setFractionalCoordinates(a)}},"~B");c(b,"setFractionalCoordinates",function(a){this.iHaveFractionalCoordinates=this.fileCoordinatesAreFractional=a;this.checkUnitCellOffset()},"~B");c(b,"setFilterAtomTypeStr",function(a){this.filterAtomTypeStr=a;this.filterAtomNameTerminator="\x00"},"~S");c(b,"setFilter",
function(a){null==a?a=this.htParams.get("filter"):this.filterCased=this.bsFilter=null;null==this.filterCased&&(this.filterCased=null==a?null:a+";");null!=a&&(a=a.toUpperCase());this.filter=a;null!=this.filter&&(this.checkFilterKeys(),this.filterSymmetry(),this.filterModelName(),this.filterAtoms(),a=this.getFilter("FILESCALING="),null!=a&&(a=this.parseFloatStr(a),this.fileScaling=JU.P3.new3(a,a,a),this.fileOffset=new JU.P3))},"~S");c(b,"filterAtoms",function(){this.checkFilterKey("HETATM")&&(this.filterHetero=
!0,this.filter=JU.PT.rep(this.filter,"HETATM","HETATM-Y"),this.filterCased=JU.PT.rep(this.filterCased,"HETATM","HETATM-Y"));this.checkFilterKey("ATOM")&&(this.filterHetero=!0,this.filter=JU.PT.rep(this.filter,"ATOM","HETATM-N"),this.filterCased=JU.PT.rep(this.filterCased,"ATOM","HETATM-N"));this.filterAtomName=this.checkFilterKey("*.")||this.checkFilterKey("!.");if(this.filter.startsWith("_")||this.filter.startsWith("!_")||0<=this.filter.indexOf(";_"))this.filterElement=this.checkFilterKey("_");this.filterGroup3=
this.checkFilterKey("[");this.filterChain=this.checkFilterKey(":");this.filterAltLoc=this.checkFilterKey("%");this.filterEveryNth=this.checkFilterKey("/=");this.filterAllHetero=this.checkFilterKey("ALLHET");if(this.filterEveryNth)this.filterN=this.parseIntAt(this.filter,this.filter.indexOf("/=")+2);else if(this.filter.startsWith("=")||0<=this.filter.indexOf(";="))this.filterAtomType=this.checkFilterKey("=");-2147483648==this.filterN&&(this.filterEveryNth=!1);this.haveAtomFilter=this.filterAtomName||
this.filterAtomType||this.filterElement||this.filterGroup3||this.filterChain||this.filterAltLoc||this.filterHetero||this.filterEveryNth||this.checkFilterKey("/=");if(null==this.bsFilter&&(this.bsFilter=new JU.BS,this.htParams.put("bsFilter",this.bsFilter),this.haveAtomFilter)){var a;this.filter1Cased=this.filterCased;this.filter2Cased="";if(0<=(a=this.filter.indexOf("|")))this.filter1Cased=this.filter.substring(0,a).trim()+";",this.filter2Cased=";"+this.filter.substring(a).trim();this.filter1=this.filter1Cased.toUpperCase();
this.filter2=0==this.filter2Cased.length?null:this.filter2Cased.toUpperCase()}});c(b,"filterModelName",function(){this.modelNameRequired=JU.PT.getQuotedAttribute(this.filter,"NAME");null!=this.modelNameRequired&&(0==this.modelNameRequired.length&&(this.modelNameRequired=this.getFilter("NAME="),this.modelNameRequired.startsWith("'")&&(this.modelNameRequired=JU.PT.split(this.modelNameRequired,"'")[1])),this.filter=JU.PT.rep(this.filter,this.modelNameRequired,""),this.filter=JU.PT.rep(this.filter,"NAME=",
""),this.filter=JU.PT.rep(this.filter,'""',""),this.filter=JU.PT.rep(this.filter,"''",""))});c(b,"filterSymmetry",function(){this.checkFilterKey("CELL=")&&(this.strSupercell=this.filter.substring(this.filter.indexOf("CELL=")+5).toLowerCase());this.filter=";"+this.filter+";";JU.Logger.info("filtering with "+this.filter);var a=this.getFilter("SYMOP=");null!=a&&(this.filterSymop=" "+a.$replace(","," ")+" ");this.filter=this.filter.$replace(",",";");a=this.getFilter("PRECISION=");null!=a&&(a=JU.PT.parseInt(a),
0<a&&16>=a&&(this.precision=1E3+a,this.filteredPrecision=!0));a=this.getFilter("LATTICESCALING=");null!=a&&25<this.unitCellParams.length&&(this.unitCellParams[25]=this.latticeScaling=this.parseFloatStr(a))});c(b,"checkFilterKeys",function(){this.doSetOrientation=!this.checkFilterKey("NOORIENT");this.doCentralize=!this.checkFilterKey("NOCENTER")&&this.checkFilterKey("CENTER");this.addVibrations=!this.checkFilterKey("NOVIB");this.ignoreStructure=this.checkFilterKey("DSSP");this.isDSSP1=this.checkFilterKey("DSSP1");
this.doReadMolecularOrbitals=!this.checkFilterKey("NOMO");this.useAltNames=this.checkFilterKey("ALTNAME");this.reverseModels=this.checkFilterKey("REVERSEMODELS");this.allow_a_len_1=this.checkFilterKey("TOPOS");this.slabXY=this.checkFilterKey("SLABXY");this.polymerX=!this.slabXY&&this.checkFilterKey("POLYMERX");this.noHydrogens=this.checkFilterKey("NOH");this.noMinimize=this.checkFilterKey("NOMIN");this.optimize2D=this.checkFilterKey("2D")&&!this.noHydrogens&&!this.noMinimize;this.noPack=this.checkFilterKey("NOPACK");
this.openVarna=this.checkFilterKey("VARNA");this.checkFilterKey("LOWPRECISION")&&this.setLowPrecision();this.checkFilterKey("HETATM")&&(this.filterHetero=!0,this.filter=JU.PT.rep(this.filter,"HETATM","HETATM-Y"),this.filterCased=JU.PT.rep(this.filterCased,"HETATM","HETATM-Y"));this.checkFilterKey("ATOM")&&(this.filterHetero=!0,this.filter=JU.PT.rep(this.filter,"ATOM","HETATM-N"),this.filterCased=JU.PT.rep(this.filterCased,"ATOM","HETATM-N"))});c(b,"getFilterWithCase",function(a){var d=null==this.filterCased?
-1:this.filterCased.toUpperCase().indexOf(a.toUpperCase());return 0>d?null:this.filterCased.substring(d+a.length,this.filterCased.indexOf(";",d))},"~S");c(b,"getFilter",function(a){var d=null==this.filter?-1:this.filter.indexOf(a);return 0>d?null:this.filter.substring(d+a.length,this.filter.indexOf(";",d))},"~S");c(b,"checkFilterKey",function(a){return null!=this.filter&&0<=this.filter.indexOf(a)},"~S");c(b,"checkAndRemoveFilterKey",function(a){if(!this.checkFilterKey(a))return!1;this.filter=JU.PT.rep(this.filter,
a,"");3>this.filter.length&&(this.filter=null);return!0},"~S");c(b,"filterAtom",function(a,d){if(!this.haveAtomFilter)return!0;var h=this.checkFilter(a,this.filter1,this.filter1Cased);null!=this.filter2&&(h=(new Boolean(h|this.checkFilter(a,this.filter2,this.filter2Cased))).valueOf());if(h&&this.filterEveryNth&&(!a.isHetero||!this.filterAllHetero))h=0==this.nFiltered++%this.filterN;this.bsFilter.setBitTo(0<=d?d:this.asc.ac,h);return h},"J.adapter.smarter.Atom,~N");c(b,"checkFilter",function(a,d,h){return a.isHetero&&
this.filterAllHetero?!0:(!this.filterGroup3||null==a.group3||!this.filterReject(d,"[",a.group3.toUpperCase()+"]"))&&(!this.filterAtomName||this.allowAtomName(a.atomName,d))&&(null==this.filterAtomTypeStr||null==a.atomName||0<=a.atomName.toUpperCase().indexOf("\x00"+this.filterAtomTypeStr))&&(!this.filterElement||null==a.elementSymbol||!this.filterReject(d,"_",a.elementSymbol.toUpperCase()+";"))&&(!this.filterChain||0==a.chainID||!this.filterReject(h,":",""+this.vwr.getChainIDStr(a.chainID)))&&(!this.filterAltLoc||
"\x00"==a.altLoc||!this.filterReject(d,"%",""+a.altLoc))&&(!this.filterHetero||!this.allowPDBFilter||!this.filterReject(d,"HETATM",a.isHetero?"-Y":"-N"))},"J.adapter.smarter.Atom,~S,~S");c(b,"rejectAtomName",function(a){return this.filterAtomName&&!this.allowAtomName(a,this.filter)},"~S");c(b,"allowAtomName",function(a,d){return null==a||!this.filterReject(d,".",a.toUpperCase()+this.filterAtomNameTerminator)},"~S,~S");c(b,"filterReject",function(a,d,h){return 0<=a.indexOf(d)&&0<=a.indexOf("!"+d)==
0<=a.indexOf(d+h)},"~S,~S,~S");c(b,"set2D",function(){this.asc.setInfo("is2D",Boolean.TRUE);this.asc.getBSAtoms(-1);this.noHydrogens&&(this.asc.setInfo("noHydrogen",Boolean.TRUE),this.optimize2D=!1);this.optimize2D?(this.asc.fix2Stereo(),this.asc.setInfo("doMinimize",Boolean.TRUE),this.appendLoadNote("This model is 2D. Its 3D structure was generated.")):(this.appendLoadNote('This model is 2D. Its 3D structure has not been generated; use LOAD "" FILTER "2D" to optimize 3D.'),this.addJmolScript("select thismodel;wireframe only"))});
c(b,"doGetVibration",function(a){return this.addVibrations&&(0>=this.desiredVibrationNumber||a==this.desiredVibrationNumber)},"~N");c(b,"setTransform",function(a,d,h,b,c,g,j,k,l){null==this.matRot&&this.doSetOrientation&&(this.matRot=new JU.M3,a=JU.V3.new3(a,d,h),a.normalize(),this.matRot.setColumnV(0,a),a.set(b,c,g),a.normalize(),this.matRot.setColumnV(1,a),a.set(j,k,l),a.normalize(),this.matRot.setColumnV(2,a),this.asc.setInfo("defaultOrientationMatrix",JU.M3.newM3(this.matRot)),b=JU.Quat.newM(this.matRot),
this.asc.setInfo("defaultOrientationQuaternion",b),JU.Logger.info("defaultOrientationMatrix = "+this.matRot))},"~N,~N,~N,~N,~N,~N,~N,~N,~N");c(b,"setAtomCoordXYZ",function(a,d,h,b){a.set(d,h,b);this.setAtomCoord(a)},"J.adapter.smarter.Atom,~N,~N,~N");c(b,"setAtomCoordScaled",function(a,d,h,b){null==a&&(a=this.asc.addNewAtom());this.setAtomCoordXYZ(a,this.parsePrecision(d[h])*b,this.parsePrecision(d[h+1])*b,this.parsePrecision(d[h+2])*b);return a},"J.adapter.smarter.Atom,~A,~N,~N");c(b,"setAtomCoordTokens",
function(a,d,h){this.setAtomCoordXYZ(a,this.parsePrecision(d[h]),this.parsePrecision(d[h+1]),this.parsePrecision(d[h+2]))},"J.adapter.smarter.Atom,~A,~N");c(b,"addAtomXYZSymName",function(a,d,h,b){var c=this.asc.addNewAtom();null!=h&&(c.elementSymbol=h);null!=b&&(c.atomName=b);this.setAtomCoordTokens(c,a,d);return c},"~A,~N,~S,~S");c(b,"setAtomCoord",function(a){var d=this.doConvertToFractional&&!this.fileCoordinatesAreFractional&&null!=this.getSymmetry();null!=this.fileScaling&&(a.x=a.x*this.fileScaling.x+
this.fileOffset.x,a.y=a.y*this.fileScaling.y+this.fileOffset.y,a.z=a.z*this.fileScaling.z+this.fileOffset.z);d&&(this.symmetry.haveUnitCell()||this.symmetry.setUnitCellFromParams(this.unitCellParams,!1,NaN),this.symmetry.toFractional(a,!1),this.iHaveFractionalCoordinates=!0);this.floatifyJavaDouble&&this.fileCoordinatesAreFractional&&this.fixFloatPt(a,1E5);this.doCheckUnitCell=!0},"J.adapter.smarter.Atom");c(b,"addSites",function(a){this.asc.setCurrentModelInfo("pdbSites",a);var d="",h;for(a=a.entrySet().iterator();a.hasNext()&&
((h=a.next())||1);){for(var b=h.getKey(),c=h.getValue(),g,j=b.length;0<=--j;)if(!JU.PT.isLetterOrDigit(g=b.charAt(j))&&"'"!=g)b=b.substring(0,j)+"_"+b.substring(j+1);c=c.get("groups");0!=c.length&&(this.addSiteScript("@site_"+b+" "+c),this.addSiteScript("site_"+b+' = ["'+JU.PT.rep(c,",",'","')+'"]'),d+=',"site_'+b+'"')}0<d.length&&this.addSiteScript("site_list = ["+d.substring(1)+"]")},"java.util.Map");c(b,"applySymmetryAndSetTrajectory",function(){this.applySymTrajASCR()});c(b,"applySymTrajASCR",
function(){this.forcePacked&&this.initializeSymmetryOptions();var a=null;this.iHaveUnitCell&&this.doCheckUnitCell?(a=this.getSymmetry(),this.setPrecision(),a=this.asc.getXSymmetry().applySymmetryFromReader(a)):this.asc.setTensors();this.isTrajectory&&this.asc.setTrajectory();null!=this.moreUnitCellInfo&&(this.setMoreInfo(),this.moreUnitCellInfo=null);this.finalizeSubclassSymmetry(null!=a);this.merging&&(null!=a&&this.iHaveFractionalCoordinates&&this.iHaveUnitCell&&this.iHaveSymmetryOperators)&&(this.fractionalizeCoordinates(!1),
this.addJmolScript("modelkit spacegroup P1"));this.initializeSymmetry();return a});c(b,"setMoreInfo",function(){this.asc.setCurrentModelInfo("moreUnitCellInfo",this.moreUnitCellInfo);for(var a=this.moreUnitCellInfo.size();0<=--a;){var d=this.moreUnitCellInfo.get(a).$plit("=");this.asc.setCurrentModelInfo(d[0],d[1])}});c(b,"finalizeSubclassSymmetry",function(){},"~B");c(b,"doPreSymmetry",function(){},"~B");c(b,"finalizeMOData",function(a){this.asc.setCurrentModelInfo("moData",a);null!=a&&(a=a.get("mos"),
null!=a&&JU.Logger.info(a.size()+" molecular orbitals read in model "+this.asc.atomSetCount))},"java.util.Map");b.getElementSymbol=c(b,"getElementSymbol",function(a){return J.api.JmolAdapter.getElementSymbol(a)},"~N");c(b,"fillDataBlock",function(a,d){for(var h=a.length,b=0;b<h;b++)a[b]=JU.PT.getTokens(this.discardLinesUntilNonBlank()),a[b].length<d&&--b},"~A,~N");c(b,"fill3x3",function(a,d){for(var h=S(3,3,0),b=null==a,c=d,g=0;3>g;g++){if(b||d>=a.length){for(;3>(a=JU.PT.getTokens(this.rd())).length;);
d=0>c?a.length+c:c}for(var j=0;3>j;j++)h[g][j]=Double.$valueOf(a[d++]).doubleValue()}return h},"~A,~N");c(b,"fillFloatArray",function(a,d,h){for(var b=[],c=0,g=0;g<h.length;g++){for(;null!=b&&c>=b.length;){null==a&&(a=this.rd());if(0==d)b=JU.PT.getTokens(a);else{b=Array(w(a.length/d));for(c=0;c<b.length;c++)b[c]=a.substring(c*d,(c+1)*d)}a=null;c=0}if(null==b)break;h[g]=this.parseFloatStr(b[c++])}return h},"~S,~N,~A");c(b,"fillFrequencyData",function(a,d,h,b,c,g,j,k,l,f){var n=0!=d&&h!=d&&null==f;
0==d&&null!=k&&(d=k.length);d=c?d:3*d;var q=b.length;if(null==f)f=Array(d),this.fillDataBlockFixed(f,g,j,l);else if(!c){this.fillDataBlockFixed(f,g,j,-l);if(null==f[0])return;a+=this.parseIntAt(this.line,l-5)-1}for(j=g=0;g<d;g++,j++){l=f[g];for(var v=c?null:f[++g],B=c?null:f[++g],H=l.length-(c?3*q:q)-1,L=0,w=0;w<q;w++){++H;var m=l[H];")"==m.charAt(0)&&(m=m.substring(1));var m=this.parseFloatStr(m),r=this.parseFloatStr(c?l[++H]:v[H]),s=this.parseFloatStr(c?l[++H]:B[H]);if(!b[w]){var u=null==k?j:k[j];
0>u||(u+=a+h*L++,this.debugging&&JU.Logger.debug("atom "+u+" vib"+L+": "+m+" "+r+" "+s),this.asc.addVibrationVectorWithSymmetry(u,m,r,s,n))}}}},"~N,~N,~N,~A,~B,~N,~N,~A,~N,~A");c(b,"fillDataBlockFixed",function(a,d,h,b){if(0==h)this.fillDataBlock(a,b);else for(var c=a.length,g=0;g<c;g++){this.discardLinesUntilNonBlank();if(0>b&&" "==this.line.charAt(-b)){a[0]=null;break}var j=w((this.line.length-d+1)/h);a[g]=Array(j);for(var k=0,l=d;k<j;k++,l+=h)a[g][k]=this.line.substring(l,Math.min(this.line.length,
l+h))}},"~A,~N,~N,~N");c(b,"readLines",function(a){for(;0<=--a;)this.rd();return this.line},"~N");c(b,"discardLinesUntilStartsWith",function(a){for(;null!=this.rd()&&!this.line.startsWith(a););return this.line},"~S");c(b,"discardLinesUntilContains",function(a){for(;null!=this.rd()&&0>this.line.indexOf(a););return this.line},"~S");c(b,"discardLinesUntilContains2",function(a,d){for(;null!=this.rd()&&0>this.line.indexOf(a)&&0>this.line.indexOf(d););return this.line},"~S,~S");c(b,"discardLinesUntilBlank",
function(){for(;null!=this.rd()&&0!=this.line.trim().length;);return this.line});c(b,"discardLinesUntilNonBlank",function(){for(;null!=this.rd()&&0==this.line.trim().length;);return this.line});c(b,"checkLineForScript",function(a){this.line=a;this.checkCurrentLineForScript()},"~S");c(b,"checkCurrentLineForScript",function(){this.line.endsWith("#noautobond")&&(this.line=this.line.substring(0,this.line.lastIndexOf("#")).trim(),this.asc.setNoAutoBond());var a=this.line.indexOf("jmolscript:");if(0<=a){var d=
this.line.substring(a+11,this.line.length);0<=d.indexOf("#")&&(d=d.substring(0,d.indexOf("#")));this.addJmolScript(d);this.line=this.line.substring(0,a).trim()}});c(b,"addJmolScript",function(a){JU.Logger.info("#jmolScript: "+a);null==this.previousScript?this.previousScript="":this.previousScript.endsWith(";")||(this.previousScript+=";");this.previousScript+=a;this.asc.setInfo("jmolscript",this.previousScript)},"~S");c(b,"addSiteScript",function(a){null==this.siteScript?this.siteScript="":this.siteScript.endsWith(";")||
(this.siteScript+=";");this.siteScript+=a;this.asc.setInfo("sitescript",this.siteScript)},"~S");c(b,"rd",function(){return this.RL()});c(b,"RL",function(){this.prevline=this.line;this.line=this.reader.readLine();null!=this.out&&null!=this.line&&this.out.append(this.line).append("\n");this.ptLine++;this.debugging&&null!=this.line&&JU.Logger.info(this.line);return this.line});b.getStrings=c(b,"getStrings",function(a,d,h){for(var b=Array(d),c=0,g=0;c<d;c++,g+=h)b[c]=a.substring(g,g+h);return b},"~S,~N,~N");
c(b,"getTokens",function(){return JU.PT.getTokens(this.line)});b.getTokensFloat=c(b,"getTokensFloat",function(a,d,h){null==d&&(d=M(h,0));JU.PT.parseFloatArrayDataN(JU.PT.getTokens(a),d,h);return d},"~S,~A,~N");c(b,"parseFloat",function(){return JU.PT.parseFloatNext(this.line,this.next)});c(b,"parseFloatStr",function(a){this.next[0]=0;return JU.PT.parseFloatNext(a,this.next)},"~S");c(b,"parseFloatRange",function(a,d,h){this.next[0]=d;return JU.PT.parseFloatRange(a,h,this.next)},"~S,~N,~N");c(b,"parseInt",
function(){return JU.PT.parseIntNext(this.line,this.next)});c(b,"parseIntStr",function(a){this.next[0]=0;return JU.PT.parseIntNext(a,this.next)},"~S");c(b,"parseIntAt",function(a,d){this.next[0]=d;return JU.PT.parseIntNext(a,this.next)},"~S,~N");c(b,"parseIntRange",function(a,d,h){this.next[0]=d;return JU.PT.parseIntRange(a,h,this.next)},"~S,~N,~N");c(b,"parseToken",function(){return JU.PT.parseTokenNext(this.line,this.next)});c(b,"parseTokenStr",function(a){this.next[0]=0;return JU.PT.parseTokenNext(a,
this.next)},"~S");c(b,"parseTokenNext",function(a){return JU.PT.parseTokenNext(a,this.next)},"~S");c(b,"parseTokenRange",function(a,d,h){this.next[0]=d;return JU.PT.parseTokenRange(a,h,this.next)},"~S,~N,~N");b.getFortranFormatLengths=c(b,"getFortranFormatLengths",function(a){var d=new JU.Lst,h=0,b=0,c=1,g=!1,j=!0;a+=",";for(var k=0;k<a.length;k++){var l=a.charAt(k);switch(l.charCodeAt(0)){case 46:g=!1;continue;case 44:for(g=0;g<b;g++)d.addLast(Integer.$valueOf(h*c));g=!1;j=!0;b=0;continue;case 88:h=
b;b=1;c=-1;continue}JU.PT.isDigit(l)?g?h=10*h+l.charCodeAt(0)-48:j&&(b=10*b+l.charCodeAt(0)-48):JU.PT.isLetter(l)?(h=0,g=!0,j=!1,c=1):g=!1}return d},"~S");c(b,"read3Vectors",function(a){for(var d=Array(3),h=M(3,0),b=0;3>b;b++){if(0<b||Float.isNaN(this.parseFloatStr(this.line)))if(this.rd(),0==b&&null!=this.line){b=-1;continue}this.fillFloatArray(this.line,0,h);d[b]=new JU.V3;d[b].setA(h);a&&d[b].scale(0.5291772)}return d},"~B");c(b,"setElementAndIsotope",function(a,d){var h=this.parseIntStr(d);-2147483648==
h?a.elementSymbol=d:(d=d.substring((""+h).length),a.elementNumber=0==d.length?h:(h<<7)+J.api.JmolAdapter.getElementNumber(d))},"J.adapter.smarter.Atom,~S");c(b,"finalizeModelSet",function(){});c(b,"setChainID",function(a,d){a.chainID=this.vwr.getChainID(d,!0)},"J.adapter.smarter.Atom,~S");f(b,"readNextLine",function(){null!=this.rd()&&0<=this.line.indexOf("#jmolscript:")&&this.checkCurrentLineForScript();return this.line});c(b,"addMoreUnitCellInfo",function(a){null==this.moreUnitCellInfo&&(this.moreUnitCellInfo=
new JU.Lst);this.moreUnitCellInfo.addLast(a)},"~S");c(b,"getInterface",function(a){a=J.api.Interface.getInterface(a,this.vwr,"file");if(null==a)throw new NullPointerException("Interface");return a},"~S");c(b,"forceSymmetry",function(a){a&&(this.doPackUnitCell=a);this.doApplySymmetry||(this.doApplySymmetry=!0,this.latticeCells[0]=this.latticeCells[1]=this.latticeCells[2]=1)},"~B");c(b,"fixFloatA",function(a){if(this.floatifyJavaDouble)for(var d=a.length;0<=--d;)Float.isNaN(a[d])||(a[d]=JU.PT.fixFloat(a[d],
1E5))},"~A");c(b,"fixDoubleA",function(a){if(this.floatifyJavaDouble)for(var d=a.length;0<=--d;)Double.isNaN(a[d])||(a[d]=JU.PT.fixDouble(a[d],1E5))},"~A");c(b,"fixFloatPt",function(a,d){this.floatifyJavaDouble&&JU.PT.fixPtFloats(a,d)},"JU.P3,~N")});m("J.adapter.smarter");s(function(){this.atomSetIndex=0;r(this,arguments)},J.adapter.smarter,"AtomSetObject",null);m("J.adapter.smarter");x(["J.adapter.smarter.AtomSetObject"],"J.adapter.smarter.Bond",null,function(){var b=s(function(){this.order=this.atomIndex2=
this.atomIndex1=0;this.uniqueID=this.colix=this.pymolRadius=-1;this.distance=0;r(this,arguments)},J.adapter.smarter,"Bond",J.adapter.smarter.AtomSetObject);u(b,function(a,d,h){K(this,J.adapter.smarter.Bond,[]);this.atomIndex1=a;this.atomIndex2=d;this.order=h},"~N,~N,~N");f(b,"toString",function(){return"[Bond "+this.atomIndex1+" "+this.atomIndex2+" "+this.order+"]"})});m("J.adapter.smarter");x(["J.api.JmolAdapterBondIterator"],"J.adapter.smarter.BondIterator",null,function(){var b=s(function(){this.bonds=
this.bsAtoms=null;this.ibond=0;this.bond=null;this.bondCount=0;r(this,arguments)},J.adapter.smarter,"BondIterator",J.api.JmolAdapterBondIterator);u(b,function(a){K(this,J.adapter.smarter.BondIterator,[]);this.bsAtoms=a.bsAtoms;this.bonds=a.bonds;this.bondCount=a.bondCount;this.ibond=0},"J.adapter.smarter.AtomSetCollection");f(b,"hasNext",function(){if(this.ibond==this.bondCount)return!1;for(;null==(this.bond=this.bonds[this.ibond++])||null!=this.bsAtoms&&(!this.bsAtoms.get(this.bond.atomIndex1)||
!this.bsAtoms.get(this.bond.atomIndex2));)if(this.ibond==this.bondCount)return!1;return!0});f(b,"getAtomUniqueID1",function(){return Integer.$valueOf(this.bond.atomIndex1)});f(b,"getAtomUniqueID2",function(){return Integer.$valueOf(this.bond.atomIndex2)});f(b,"getEncodedOrder",function(){return this.bond.order});f(b,"getPymolRadius",function(){return this.bond.pymolRadius});f(b,"getColix",function(){return this.bond.colix})});m("J.adapter.smarter");x(null,"J.adapter.smarter.Resolver","java.io.BufferedInputStream java.util.StringTokenizer JU.LimitedLineReader $.PT $.Rdr J.adapter.smarter.AtomSetCollectionReader $.SmarterJmolAdapter J.api.Interface JU.Logger".split(" "),
function(){var b=G(J.adapter.smarter,"Resolver",null);b.getReaderClassBase=c(b,"getReaderClassBase",function(a){var d=a+"Reader";if(a.startsWith("Xml"))return"J.adapter.readers.xml."+d;a=";"+a+";";for(var h=1;h<J.adapter.smarter.Resolver.readerSets.length;h+=2)if(0<=J.adapter.smarter.Resolver.readerSets[h].indexOf(a))return"J.adapter.readers."+J.adapter.smarter.Resolver.readerSets[h-1]+d;return"J.adapter.readers.???."+d},"~S");b.getFileType=c(b,"getFileType",function(a){try{return J.adapter.smarter.Resolver.determineAtomSetCollectionReader(a,
null)}catch(d){if(E(d,Exception))return null;throw d;}},"java.io.BufferedReader");b.getAtomCollectionReader=c(b,"getAtomCollectionReader",function(a,d,h,b,c){var g;a=J.adapter.smarter.Resolver.fixDOSName(a);var j=null;null==d&&(d=J.adapter.smarter.Resolver.getFileTypefromFilter(b.get("filter")));null!=d?(g=J.adapter.smarter.Resolver.getReaderFromType(d),null==g&&(g=J.adapter.smarter.Resolver.getReaderFromType("Xml"+d)),null==g?j="unrecognized file format type "+d+" file="+a:JU.Logger.info("The Resolver assumes "+
g+" file="+a)):(g=J.adapter.smarter.Resolver.determineAtomSetCollectionReader(h,b),"\n"==g.charAt(0)&&(d=null==b?null:b.get("defaultType"),null!=d&&(d=J.adapter.smarter.Resolver.getReaderFromType(d),null!=d&&(g=d))),"\n"==g.charAt(0)?j="unrecognized file format for file\n"+a+"\n"+J.adapter.smarter.Resolver.split(g,50):g.equals("spt")?j="NOTE: file recognized as a script file: "+a+"\n":a.equals("ligand")||JU.Logger.info("The Resolver thinks "+g));if(null!=j)return J.adapter.smarter.SmarterJmolAdapter.close(h),
JU.Logger.error(j),j;b.put("ptFile",Integer.$valueOf(c));0>=c&&b.put("readerName",g);return J.adapter.smarter.Resolver.getReader(g,b)},"~S,~S,~O,java.util.Map,~N");b.getReader=c(b,"getReader",function(a){var d=null,h=null,d=null,h=J.adapter.smarter.Resolver.getReaderClassBase(a);if(null==(d=J.api.Interface.getInterface(h,null,"reader")))d="File reader was not found:"+h,JU.Logger.error(d);return d},"~S,java.util.Map");b.getReaderFromType=c(b,"getReaderFromType",function(a){a.endsWith("(XML)")&&(a=
"Xml"+a.substring(0,a.length-5));a=";"+a.toLowerCase()+";";if(0<=";zmatrix;cfi;c;vfi;v;mnd;jag;gms;g;gau;mp;nw;orc;pqs;qc;".indexOf(a))return"Input";for(var d,h,b=J.adapter.smarter.Resolver.readerSets.length;0<=--b;)if(0<=(h=(d=J.adapter.smarter.Resolver.readerSets[b--]).toLowerCase().indexOf(a)))return d.substring(h+1,d.indexOf(";",h+2));return null},"~S");b.split=c(b,"split",function(a,d){for(var h="",b=a.length,c=0,g=0;c<b;c=g)h+=a.substring(c,g=Math.min(c+d,b))+"\n";return h},"~S,~N");b.DOMResolve=
c(b,"DOMResolve",function(a){var d=J.adapter.smarter.Resolver.getXmlType(a.get("nameSpaceInfo"));JU.Logger.debugging&&JU.Logger.debug("The Resolver thinks "+d);a.put("readerName",d);return J.adapter.smarter.Resolver.getReader("XmlReader",a)},"java.util.Map");b.determineAtomSetCollectionReader=c(b,"determineAtomSetCollectionReader",function(a,d){var h;if(C(a,"javajs.api.GenericBinaryDocument"))return h=J.adapter.smarter.Resolver.getBinaryType(a.getInputStream()),null==h?"binary file type not recognized":
h;if(C(a,"java.io.InputStream")){h=J.adapter.smarter.Resolver.getBinaryType(a);if(null!=h)return h;a=JU.Rdr.getBufferedReader(new java.io.BufferedInputStream(a),null)}var b=a,c=new JU.LimitedLineReader(b,16384),g=c.getHeader(64).trim();if(0==g.length)throw new java.io.EOFException("File contains no data.");if(1==g.indexOf("PNG")&&0<=g.indexOf("PNGJ"))return"pngj";if(1==g.indexOf("PNG")||1==g.indexOf("JPG")||6==g.indexOf("JFIF"))return"spt";if(0<=g.indexOf('"num_pairs"'))return"dssr";if(0<=g.indexOf("output.31\n"))return"GenNBO|output.31";
if(null!=(h=J.adapter.smarter.Resolver.checkFileStart(g)))return h.equals("Xml")?J.adapter.smarter.Resolver.getXmlType(c.getHeader(0)):h;var j="{"==g.charAt(0);if(j&&null!=(h=J.adapter.smarter.Resolver.checkJsonHeader(g)))return h;for(var k=Array(16),l=h=0;l<k.length;++l)k[l]=c.readLineWithNewline(),0<k[l].length&&h++;if(null!=(h=J.adapter.smarter.Resolver.checkSpecial1(h,k,g))||null!=(h=J.adapter.smarter.Resolver.checkLineStarts(k))||null!=(h=J.adapter.smarter.Resolver.checkHeaderContains(c.getHeader(0)))||
null!=(h=J.adapter.smarter.Resolver.checkSpecial2(k)))return h;if(j){b=b.readLine();if(null!=(h=J.adapter.smarter.Resolver.checkJSONContains(b)))return null!=d&&d.put("fileData",b),h;b=null==d?null:b.substring(0,Math.min(100,b.length))}else b=null==d?null:"\n"+k[0]+"\n"+k[1]+"\n"+k[2]+"\n";return b},"~O,java.util.Map");b.checkJsonHeader=c(b,"checkJsonHeader",function(a){return a.startsWith('{"SSG_international_symbol')?"FSGOutput":null},"~S");b.getBinaryType=c(b,"getBinaryType",function(a){a=JU.Rdr.getMagic(a,
100);var d=a[0]&255;return JU.Rdr.isPickleB(a)?"PyMOL":222==d?J.adapter.smarter.Resolver.bytesMatch(a,4,J.adapter.smarter.Resolver.mmtfMagic)?"MMTF":null:131==d?J.adapter.smarter.Resolver.checkBCIF(a,!0)?"BCIF":null:J.adapter.smarter.Resolver.bytesMatch(a,0,J.adapter.smarter.Resolver.cdxMagic)?"CDX":J.adapter.smarter.Resolver.bytesMatch(a,0,J.adapter.smarter.Resolver.cmdfMagic)?"Cmdf":J.adapter.smarter.Resolver.bytesMatch(a,0,J.adapter.smarter.Resolver.cmdxMagic)?"Cmdx":null},"java.io.InputStream");
b.checkBCIF=c(b,"checkBCIF",function(a,d){return J.adapter.smarter.Resolver.bytesMatch(a,10,J.adapter.smarter.Resolver.bcifMolstarMagic)||J.adapter.smarter.Resolver.bytesMatch(a,10,J.adapter.smarter.Resolver.bcifModelMagic)||J.adapter.smarter.Resolver.bytesMatch(a,10,J.adapter.smarter.Resolver.bcifModelMagic)||J.adapter.smarter.Resolver.bytesMatch(a,10,J.adapter.smarter.Resolver.bcifCoordMagic)?d:J.adapter.smarter.Resolver.bytesMatch(a,10,J.adapter.smarter.Resolver.bcifDensityMagic)||J.adapter.smarter.Resolver.bytesMatch(a,
10,J.adapter.smarter.Resolver.bcifVolumeMagic)?!d:0>J.adapter.smarter.Resolver.findBytes(a,J.adapter.smarter.Resolver.bcifServerMagic)==d},"~A,~B");b.findBytes=c(b,"findBytes",function(a,d){var h=a.length-d.length;a:for(;0<=--h;){for(var b=d.length;0<=--b;)if(a[h+b]!=d[b])continue a;return h}return-1},"~A,~A");b.bytesMatch=c(b,"bytesMatch",function(a,d,h){if(h.length>a.length-d)return!1;for(var b=h.length;0<=--b;)if(a[d+b]!=h[b])return!1;return!0},"~A,~N,~A");b.checkFileStart=c(b,"checkFileStart",
function(a){for(var d=0;d<J.adapter.smarter.Resolver.fileStartsWithRecords.length;++d)for(var h=J.adapter.smarter.Resolver.fileStartsWithRecords[d],b=1;b<h.length;++b)if(a.startsWith(h[b]))return h[0];return null},"~S");b.checkSpecial1=c(b,"checkSpecial1",function(a,d,h){if(1==a&&0<d[0].length&&JU.PT.isDigit(d[0].charAt(0)))return"Jme";if(J.adapter.smarter.Resolver.checkMopacGraphf(d))return"MopacGraphf";if(J.adapter.smarter.Resolver.checkOdyssey(d))return"Odyssey";switch(J.adapter.smarter.Resolver.checkMol(d)){case 1:case 3:case 2E3:case 3E3:return"Mol"}switch(J.adapter.smarter.Resolver.checkXyz(d)){case 1:return"Xyz";
case 2:return"Bilbao";case 3:return"PWmat"}return J.adapter.smarter.Resolver.checkAlchemy(d[0])?"Alchemy":J.adapter.smarter.Resolver.checkFoldingXyz(d)?"FoldingXyz":J.adapter.smarter.Resolver.checkXSF(d)?"Xcrysden":J.adapter.smarter.Resolver.checkCube(d)?"Cube":J.adapter.smarter.Resolver.checkWien2k(d)?"Wien2k":J.adapter.smarter.Resolver.checkAims(d)?"Aims":J.adapter.smarter.Resolver.checkGenNBO(d,h)?"GenNBO":null},"~N,~A,~S");b.checkXSF=c(b,"checkXSF",function(a){for(var d=0;0==a[d].length;)d++;
return a[d].startsWith("ANIMSTEPS ")||a[d].equals("ATOMS\n")&&0<JU.PT.parseInt(a[d+1])},"~A");b.checkAims=c(b,"checkAims",function(a){for(var d=0;d<a.length&&!a[d].startsWith("mol 1");d++){var h=JU.PT.getTokens(a[d]);if(0!=h.length&&(h[0].startsWith("atom")&&4<h.length&&Float.isNaN(JU.PT.parseFloat(h[4]))||h[0].startsWith("multipole")&&6<=h.length||h[0].startsWith("lattice_vector")&&4<=h.length))return!0}return!1},"~A");b.checkAlchemy=c(b,"checkAlchemy",function(a){var d;return 0<(d=a.indexOf("ATOMS"))&&
a.indexOf("BONDS")>d?0<JU.PT.parseInt(a.substring(0,d).trim()):!1},"~S");b.isInt=c(b,"isInt",function(a){J.adapter.smarter.Resolver.n[0]=0;a=a.trim();return 0<a.length&&-2147483648!=JU.PT.parseIntNext(a,J.adapter.smarter.Resolver.n)&&J.adapter.smarter.Resolver.n[0]==a.length},"~S");b.isFloat=c(b,"isFloat",function(a){return!Float.isNaN(JU.PT.parseFloat(a))},"~S");b.checkCube=c(b,"checkCube",function(a){for(var d=2;5>=d;d++){var h=new java.util.StringTokenizer(a[d]),b=h.countTokens();if(!(4==b||2==
d&&5==b)||!J.adapter.smarter.Resolver.isInt(h.nextToken()))return!1;for(var c=3;0<=--c;)if(!J.adapter.smarter.Resolver.isFloat(h.nextToken()))return!1;if(5==b&&!J.adapter.smarter.Resolver.isInt(h.nextToken()))return!1}return!0},"~A");b.checkFoldingXyz=c(b,"checkFoldingXyz",function(a){var d=new java.util.StringTokenizer(a[0].trim()," \t");if(2>d.countTokens()||!J.adapter.smarter.Resolver.isInt(d.nextToken().trim()))return!1;d=a[1].trim();0==d.length&&(d=a[2].trim());d=new java.util.StringTokenizer(d,
" \t");return 0<d.countTokens()&&J.adapter.smarter.Resolver.isInt(d.nextToken().trim())},"~A");b.checkGenNBO=c(b,"checkGenNBO",function(a,d){return 0<=d.indexOf("$GENNBO")||a[1].startsWith(" Basis set information needed for plotting orbitals")||0<=a[1].indexOf("s in the AO basis:")||0<=a[1].indexOf("***** NBO ")||0<=a[2].indexOf(" N A T U R A L   A T O M I C   O R B I T A L")},"~A,~S");b.checkMol=c(b,"checkMol",function(a){var d=("X"+a[3]).trim().toUpperCase();if(7>d.length||0<=d.indexOf(".")||a[0].startsWith("data_"))return 0;
if(d.endsWith("V2000"))return 2E3;if(d.endsWith("V3000"))return 3E3;var d=JU.PT.parseInt(a[3].substring(0,3).trim()),h=JU.PT.parseInt(a[3].substring(3,6).trim());return 0<d&&0<=h&&0!=a[0].indexOf("@<TRIPOS>")&&0!=a[1].indexOf("@<TRIPOS>")&&0!=a[2].indexOf("@<TRIPOS>")?3:0},"~A");b.checkMopacGraphf=c(b,"checkMopacGraphf",function(a){return 2<a[0].indexOf("MOPAC-Graphical data")},"~A");b.checkOdyssey=c(b,"checkOdyssey",function(a){var d;for(d=0;d<a.length&&(a[d].startsWith("C ")||0==a[d].length);d++);
if(d>=a.length||" "!=a[d].charAt(0)||(d+=2)+1>=a.length)return!1;var h=a[d];if(3>h.length)return!1;var b=JU.PT.parseInt(h.substring(2).trim()),c=JU.PT.parseInt(h.substring(0,2).trim());if(2>(h=a[d+1]).length)return!1;a=JU.PT.parseInt(h.substring(0,2).trim());if(0>b||5<b||0>=a||-2147483648==c||5<c)return!1;h=J.adapter.smarter.AtomSetCollectionReader.getTokensFloat(h,null,5);return!Float.isNaN(h[1])&&!Float.isNaN(h[2])&&!Float.isNaN(h[3])&&Float.isNaN(h[4])},"~A");b.checkWien2k=c(b,"checkWien2k",function(a){return a[2].startsWith("MODE OF CALC=")||
a[2].startsWith("             RELA")||a[2].startsWith("             NREL")},"~A");b.checkXyz=c(b,"checkXyz",function(a){var d=!1,h=JU.PT.parseInt(a[0]);if(0<=h&&a[0].trim().equals(""+h)){if(J.adapter.smarter.Resolver.isInt(a[2]))return 2;d=!0}if(0<=a[0].indexOf("Bilbao Crys"))return 2;var b;return(d||5<a.length&&0<h)&&((b=a[1].trim().toUpperCase()).startsWith("LATTICE VECTOR")||b.equals("LATTICE"))?3:d?1:0},"~A");b.checkLineStarts=c(b,"checkLineStarts",function(a){for(var d=0;d<J.adapter.smarter.Resolver.lineStartsWithRecords.length;++d)for(var h=
J.adapter.smarter.Resolver.lineStartsWithRecords[d],b=1;b<h.length;++b)for(var c=h[b],g=0;g<a.length;g++)if(a[g].startsWith(c))return h[0];return null},"~A");b.checkHeaderContains=c(b,"checkHeaderContains",function(a){for(var d=0;d<J.adapter.smarter.Resolver.headerContainsRecords.length;++d){var h=J.adapter.smarter.Resolver.checkHeaderRecords(a,J.adapter.smarter.Resolver.headerContainsRecords[d]);if(null!=h)return h}return null},"~S");b.checkJSONContains=c(b,"checkJSONContains",function(a){for(var d=
0;d<J.adapter.smarter.Resolver.jsonContainsRecords.length;++d){var h=J.adapter.smarter.Resolver.checkHeaderRecords(a,J.adapter.smarter.Resolver.jsonContainsRecords[d]);if(null!=h)return h}return null},"~S");b.checkHeaderRecords=c(b,"checkHeaderRecords",function(a,d){for(var h=1;h<d.length;++h)if(!(0>a.indexOf(d[h])))return h=d[0],!h.equals("Xml")?h:0<=a.indexOf("/AFLOWDATA/")||0<=a.indexOf("-- Structure PRE --")?"AFLOW":0>a.indexOf("<!DOCTYPE HTML PUBLIC")&&0>a.indexOf("XHTML")&&(0>a.indexOf("xhtml")||
0<=a.indexOf("<cml"))?J.adapter.smarter.Resolver.getXmlType(a):null;return null},"~S,~A");b.getXmlType=c(b,"getXmlType",function(a){return 0<=a.indexOf("http://www.molpro.net/")?"XmlMolpro":0<=a.indexOf("odyssey")?"XmlOdyssey":0<=a.indexOf("C3XML")?"XmlChem3d":0<=a.indexOf("CDXML")?"XmlCdx":0<=a.indexOf("arguslab")?"XmlArgus":0<=a.indexOf("jvxl")||0<=a.indexOf("http://www.xml-cml.org/schema")||0<=a.indexOf("cml:")||0<=a.indexOf("<cml>")?"XmlCml":0<=a.indexOf("<nmrML")?"XmlNmrml":0<=a.indexOf("XSD")?
"XmlXsd":0<=a.indexOf(">vasp")?"XmlVasp":0<=a.indexOf("<GEOMETRY_INFO>")?"XmlQE":"XmlCml(unidentified)"},"~S");b.checkSpecial2=c(b,"checkSpecial2",function(a){if(J.adapter.smarter.Resolver.checkGromacs(a))return"Gromacs";if(J.adapter.smarter.Resolver.checkCrystal(a))return"Crystal";if(J.adapter.smarter.Resolver.checkFAH(a))return"FAH";a=J.adapter.smarter.Resolver.checkCastepVaspSiesta(a);return null!=a?a:null},"~A");b.checkFAH=c(b,"checkFAH",function(a){return(a[0].trim()+a[2].trim()).equals('{"atoms": [')},
"~A");b.checkCrystal=c(b,"checkCrystal",function(a){var d=a[1].trim();if(d.equals("SLAB")||d.equals("MOLECULE")||d.equals("CRYSTAL")||d.equals("POLYMER")||(d=a[3]).equals("SLAB")||d.equals("MOLECULE")||d.equals("POLYMER"))return!0;for(d=0;d<a.length;d++)if(a[d].trim().equals("OPTGEOM")||a[d].trim().equals("FREQCALC")||a[d].contains("DOVESI")||a[d].contains("TORINO")||a[d].contains("http://www.crystal.unito.it")||a[d].contains("Pcrystal")||a[d].contains("MPPcrystal")||a[d].contains("crystal executable"))return!0;
return!1},"~A");b.checkGromacs=c(b,"checkGromacs",function(a){if(-2147483648==JU.PT.parseInt(a[1]))return!1;for(var d=-1,h=2;16>h&&0!=d;h++)if(69!=(d=a[h].length)&&45!=d&&0!=d)return!1;return!0},"~A");b.checkCastepVaspSiesta=c(b,"checkCastepVaspSiesta",function(a){for(var d=0;d<a.length;d++){var h=a[d].toUpperCase();if(1==h.indexOf("FREQUENCIES IN         CM-1")||h.contains("CASTEP")||h.startsWith("%BLOCK LATTICE_ABC")||h.startsWith("%BLOCK LATTICE_CART")||h.startsWith("%BLOCK POSITIONS_FRAC")||h.startsWith("%BLOCK POSITIONS_ABS")||
h.contains("<-- E"))return"Castep";if(h.contains("%BLOCK"))return"Siesta";if(6<=d&&10>d&&(h.startsWith("DIRECT")||h.startsWith("CARTESIAN")))return"VaspPoscar"}return null},"~A");b.getFileTypefromFilter=c(b,"getFileTypefromFilter",function(a){var d=null==a?-1:a.toLowerCase().indexOf("filetype");return 0>d?null:a.substring(d+8,(a+";").indexOf(";",d)).$replace("="," ").trim()},"~S");b.fixDOSName=c(b,"fixDOSName",function(a){return 0<=a.indexOf(":\\")?a.$replace("\\","/"):a},"~S");b.readerSets=z(-1,
"cif. ;Cif;Cif2;MMCif;MMTF;MagCif;BCIF; molxyz. ;Mol3D;Mol;Xyz; more. ;AFLOW;BinaryDcd;CDX;Gromacs;Jcampdx;MdCrd;MdTop;Mol2;TlsDataOnly; quantum. ;Adf;Csf;Dgrid;GamessUK;GamessUS;Gaussian;GaussianFchk;GaussianWfn;Jaguar;Molden;MopacGraphf;GenNBO;NWChem;Psi;Qchem;QCJSON;WebMO;Orca;MO;Ams; pdb. ;Pdb;Pqr;P2n;JmolData; pymol. ;PyMOL; simple. ;Alchemy;Ampac;Cube;FoldingXyz;GhemicalMM;HyperChem;Jme;JSON;Mopac;MopacArchive;Tinker;Input;FAH; spartan. ;Spartan;SpartanSmol;Odyssey; xtal. ;Abinit;Aims;Bilbao;Castep;Cgd;Crystal;Dmol;Espresso;Gulp;Jana;Magres;Shelx;Siesta;VaspOutcar;VaspPoscar;Wien2k;Xcrysden;PWmat;Optimade;Cmdf;Cmdx;FSGOutput; xml. ;XmlCdx;XmlArgus;XmlCml;XmlChem3d;XmlMolpro;XmlNmrml;XmlOdyssey;XmlXsd;XmlVasp;XmlQE;".split(" "));
b.cdxMagic=O(-1,[86,106,67,68]);b.cmdfMagic=O(-1,[67,77,68,70]);b.cmdxMagic=O(-1,[67,77,68,88]);b.mmtfMagic=O(-1,[109,109,116,102]);b.bcifMolstarMagic=O(-1,[109,111,108,42]);b.bcifDensityMagic=O(-1,[68,101,110,115]);b.bcifVolumeMagic=O(-1,[86,111,108,117]);b.bcifModelMagic=O(-1,[77,111,100,101]);b.bcifCoordMagic=O(-1,[67,111,111,114,100]);b.bcifServerMagic=O(-1,[83,69,82,86,69,82]);b.sptRecords=z(-1,["spt","# Jmol state","# Jmol script","JmolManifest"]);b.m3dStartRecords=z(-1,["Alchemy","STRUCTURE  1.00     1"]);
b.cubeFileStartRecords=z(-1,["Cube","JVXL","#JVXL"]);b.mol2Records=z(-1,["Mol2","mol2","@<TRIPOS>"]);b.webmoFileStartRecords=z(-1,["WebMO","[HEADER]"]);b.moldenFileStartRecords=z(-1,["Molden","[Molden","MOLDEN","[MOLDEN"]);b.dcdFileStartRecords=z(-1,["BinaryDcd","T\x00\x00\x00CORD","\x00\x00\x00TCORD"]);b.tlsDataOnlyFileStartRecords=z(-1,["TlsDataOnly","REFMAC\n\nTL","REFMAC\r\n\r\n","REFMAC\r\rTL"]);b.inputFileStartRecords=z(-1,["Input","#ZMATRIX","%mem=","AM1","$rungauss"]);b.magresFileStartRecords=
z(-1,["Magres","#$magres","# magres"]);b.pymolStartRecords=z(-1,["PyMOL","}q"]);b.janaStartRecords=z(-1,["Jana","Version Jana"]);b.jsonStartRecords=z(-1,["JSON",'{"mol":']);b.jcampdxStartRecords=z(-1,["Jcampdx","##TITLE"]);b.jmoldataStartRecords=z(-1,["JmolData","REMARK   6 Jmol"]);b.pqrStartRecords=z(-1,["Pqr","REMARK   1 PQR","REMARK    The B-factors"]);b.p2nStartRecords=z(-1,["P2n","REMARK   1 P2N"]);b.cif2StartRecords=z(-1,["Cif2","#\\#CIF_2","\u00ef\u00bb\u00bf#\\#CIF_2"]);b.xmlStartRecords=
z(-1,["Xml","<?xml"]);b.cfiStartRecords=z(-1,["Input","$CFI"]);b.fileStartsWithRecords=z(-1,[J.adapter.smarter.Resolver.xmlStartRecords,J.adapter.smarter.Resolver.sptRecords,J.adapter.smarter.Resolver.m3dStartRecords,J.adapter.smarter.Resolver.cubeFileStartRecords,J.adapter.smarter.Resolver.mol2Records,J.adapter.smarter.Resolver.webmoFileStartRecords,J.adapter.smarter.Resolver.moldenFileStartRecords,J.adapter.smarter.Resolver.dcdFileStartRecords,J.adapter.smarter.Resolver.tlsDataOnlyFileStartRecords,
J.adapter.smarter.Resolver.inputFileStartRecords,J.adapter.smarter.Resolver.magresFileStartRecords,J.adapter.smarter.Resolver.pymolStartRecords,J.adapter.smarter.Resolver.janaStartRecords,J.adapter.smarter.Resolver.jsonStartRecords,J.adapter.smarter.Resolver.jcampdxStartRecords,J.adapter.smarter.Resolver.jmoldataStartRecords,J.adapter.smarter.Resolver.pqrStartRecords,J.adapter.smarter.Resolver.p2nStartRecords,J.adapter.smarter.Resolver.cif2StartRecords,J.adapter.smarter.Resolver.cfiStartRecords]);
b.n=D(1,0);b.mmcifLineStartRecords=z(-1,"MMCif _entry.id _database_PDB_ _pdbx_ _chem_comp.pdbx_type _audit_author.name _atom_site.".split(" "));b.cifLineStartRecords=z(-1,["Cif","data_","_publ"]);b.pdbLineStartRecords=z(-1,"Pdb;HEADER;OBSLTE;TITLE ;CAVEAT;COMPND;SOURCE;KEYWDS;EXPDTA;AUTHOR;REVDAT;SPRSDE;JRNL  ;REMARK ;DBREF ;SEQADV;SEQRES;MODRES;HELIX ;SHEET ;TURN  ;CRYST1;ORIGX1;ORIGX2;ORIGX3;SCALE1;SCALE2;SCALE3;ATOM  ;HETATM;MODEL ;LINK  ;USER  MOD ".split(";"));b.cgdLineStartRecords=z(-1,["Cgd",
"EDGE ","edge "]);b.shelxLineStartRecords=z(-1,"Shelx;TITL ;ZERR ;LATT ;SYMM ;CELL ;TITL\t".split(";"));b.ghemicalMMLineStartRecords=z(-1,["GhemicalMM","!Header mm1gp","!Header gpr"]);b.jaguarLineStartRecords=z(-1,["Jaguar","  |  Jaguar version"]);b.mdlLineStartRecords=z(-1,["Mol","$MDL "]);b.spartanSmolLineStartRecords=z(-1,["SpartanSmol","INPUT="]);b.csfLineStartRecords=z(-1,["Csf","local_transform"]);b.mdTopLineStartRecords=z(-1,["MdTop","%FLAG TITLE"]);b.hyperChemLineStartRecords=z(-1,["HyperChem",
"mol 1"]);b.vaspOutcarLineStartRecords=z(-1,["VaspOutcar"," vasp."," INCAR:"]);b.orcaInputLineStartRecords=z(-1,["Orca","* xyz","*xyz"]);b.lineStartsWithRecords=z(-1,[J.adapter.smarter.Resolver.mmcifLineStartRecords,J.adapter.smarter.Resolver.cifLineStartRecords,J.adapter.smarter.Resolver.pdbLineStartRecords,J.adapter.smarter.Resolver.cgdLineStartRecords,J.adapter.smarter.Resolver.shelxLineStartRecords,J.adapter.smarter.Resolver.ghemicalMMLineStartRecords,J.adapter.smarter.Resolver.jaguarLineStartRecords,
J.adapter.smarter.Resolver.mdlLineStartRecords,J.adapter.smarter.Resolver.spartanSmolLineStartRecords,J.adapter.smarter.Resolver.csfLineStartRecords,J.adapter.smarter.Resolver.mol2Records,J.adapter.smarter.Resolver.mdTopLineStartRecords,J.adapter.smarter.Resolver.hyperChemLineStartRecords,J.adapter.smarter.Resolver.vaspOutcarLineStartRecords,J.adapter.smarter.Resolver.orcaInputLineStartRecords]);b.bilbaoContainsRecords=z(-1,["Bilbao",">Bilbao Crystallographic Server<"]);b.xmlContainsRecords=z(-1,
'Xml <?xml <atom <molecule <reaction <cml <bond .dtd" <list> <entry <identifier http://www.xml-cml.org/schema/cml2/core'.split(" "));b.gaussianContainsRecords=z(-1,["Gaussian","Entering Gaussian System","Entering Link 1","1998 Gaussian, Inc."]);b.ampacContainsRecords=z(-1,["Ampac","AMPAC Version"]);b.mopacContainsRecords=z(-1,"Mopac;MOPAC 93 (c) Fujitsu;MOPAC FOR LINUX (PUBLIC DOMAIN VERSION);MOPAC:  VERSION  6;MOPAC   7;MOPAC2;MOPAC (PUBLIC;MOPAC v".split(";"));b.qchemContainsRecords=z(-1,["Qchem",
"Welcome to Q-Chem","A Quantum Leap Into The Future Of Chemistry"]);b.gamessUKContainsRecords=z(-1,["GamessUK","GAMESS-UK","G A M E S S - U K"]);b.gamessUSContainsRecords=z(-1,["GamessUS","GAMESS","$CONTRL"]);b.spartanBinaryContainsRecords=z(-1,["SpartanSmol","|PropertyArchive","_spartan","spardir","BEGIN Directory Entry Molecule"]);b.spartanContainsRecords=z(-1,["Spartan","Spartan","converted archive file"]);b.adfContainsRecords=z(-1,["Adf","Amsterdam Density Functional"]);b.amsContainsRecords=z(-1,
["Ams","Amsterdam Modeling Suite"]);b.psiContainsRecords=z(-1,["Psi","    PSI  3","PSI3:"]);b.nwchemContainsRecords=z(-1,["NWChem"," argument  1 = "]);b.uicrcifContainsRecords=z(-1,["Cif","Crystallographic Information File"]);b.dgridContainsRecords=z(-1,["Dgrid","BASISFILE   created by DGrid"]);b.crystalContainsRecords=z(-1,["Crystal","*                                CRYSTAL","TORINO","DOVESI"]);b.dmolContainsRecords=z(-1,["Dmol","DMol^3"]);b.gulpContainsRecords=z(-1,["Gulp","GENERAL UTILITY LATTICE PROGRAM"]);
b.espressoContainsRecords=z(-1,["Espresso","Program PWSCF","Program PHONON"]);b.siestaContainsRecords=z(-1,["Siesta","MD.TypeOfRun","SolutionMethod","MeshCutoff","WELCOME TO SIESTA"]);b.xcrysDenContainsRecords=z(-1,["Xcrysden","PRIMVEC","CONVVEC","PRIMCOORD","ANIMSTEP"]);b.mopacArchiveContainsRecords=z(-1,["MopacArchive","SUMMARY OF PM"]);b.abinitContainsRecords=z(-1,["Abinit","http://www.abinit.org","Catholique","Louvain"]);b.qcJsonContainsRecords=z(-1,["QCJSON",'"QCJSON']);b.optimadeContainsRecords=
z(-1,["Optimade",'"cartesian_site_positions":','"api_version":',"optimade"]);b.jsonArrayContainsRecords=z(-1,["JSON",'"atomArray":[','"atomArray" : [']);b.orcaContainsRecords=z(-1,["Orca","* O   R   C   A *"]);b.gaussianFchkContainsRecords=z(-1,["GaussianFchk","Number of point charges in /Mol/"]);b.inputContainsRecords=z(-1,"Input; ATOMS cartesian;$molecule;&zmat;geometry={;$DATA;%coords;GEOM=PQS;geometry units angstroms".split(";"));b.aflowContainsRecords=z(-1,["AFLOW","/AFLOWDATA/"]);b.magCifContainsRecords=
z(-1,["MagCif","_space_group_magn"]);b.headerContainsRecords=z(-1,[J.adapter.smarter.Resolver.sptRecords,J.adapter.smarter.Resolver.bilbaoContainsRecords,J.adapter.smarter.Resolver.xmlContainsRecords,J.adapter.smarter.Resolver.gaussianContainsRecords,J.adapter.smarter.Resolver.ampacContainsRecords,J.adapter.smarter.Resolver.mopacContainsRecords,J.adapter.smarter.Resolver.gamessUKContainsRecords,J.adapter.smarter.Resolver.gamessUSContainsRecords,J.adapter.smarter.Resolver.qchemContainsRecords,J.adapter.smarter.Resolver.spartanBinaryContainsRecords,
J.adapter.smarter.Resolver.spartanContainsRecords,J.adapter.smarter.Resolver.mol2Records,J.adapter.smarter.Resolver.adfContainsRecords,J.adapter.smarter.Resolver.psiContainsRecords,J.adapter.smarter.Resolver.nwchemContainsRecords,J.adapter.smarter.Resolver.uicrcifContainsRecords,J.adapter.smarter.Resolver.dgridContainsRecords,J.adapter.smarter.Resolver.crystalContainsRecords,J.adapter.smarter.Resolver.dmolContainsRecords,J.adapter.smarter.Resolver.gulpContainsRecords,J.adapter.smarter.Resolver.espressoContainsRecords,
J.adapter.smarter.Resolver.siestaContainsRecords,J.adapter.smarter.Resolver.xcrysDenContainsRecords,J.adapter.smarter.Resolver.mopacArchiveContainsRecords,J.adapter.smarter.Resolver.abinitContainsRecords,J.adapter.smarter.Resolver.gaussianFchkContainsRecords,J.adapter.smarter.Resolver.inputContainsRecords,J.adapter.smarter.Resolver.aflowContainsRecords,J.adapter.smarter.Resolver.magCifContainsRecords,J.adapter.smarter.Resolver.qcJsonContainsRecords,J.adapter.smarter.Resolver.optimadeContainsRecords,
J.adapter.smarter.Resolver.orcaContainsRecords,J.adapter.smarter.Resolver.jsonArrayContainsRecords,J.adapter.smarter.Resolver.amsContainsRecords]);b.jsonContainsRecords=z(-1,[J.adapter.smarter.Resolver.optimadeContainsRecords])});m("J.adapter.smarter");x(["J.api.JmolAdapter"],"J.adapter.smarter.SmarterJmolAdapter","java.io.BufferedReader $.StringReader java.util.Hashtable JU.PT $.Rdr J.adapter.smarter.AtomIterator $.AtomSetCollection $.BondIterator $.Resolver $.StructureIterator J.api.Interface JS.SV JU.BSUtil $.Logger".split(" "),
function(){var b=G(J.adapter.smarter,"SmarterJmolAdapter",J.api.JmolAdapter);u(b,function(){K(this,J.adapter.smarter.SmarterJmolAdapter,[])});f(b,"getFileTypeName",function(a){if("string"==typeof a)return J.adapter.smarter.Resolver.getFileTypefromFilter(a);if(C(a,"J.adapter.smarter.AtomSetCollection"))return a.fileTypeName;if(C(a,"java.io.BufferedReader"))return J.adapter.smarter.Resolver.getFileType(a);if(C(a,"java.io.BufferedInputStream")){var d=J.adapter.smarter.Resolver.getBinaryType(a);if(null==
d)try{d=J.adapter.smarter.Resolver.getFileType(JU.Rdr.getBufferedReader(a,null))}catch(h){if(!E(h,Exception))throw h;}return d}return null},"~O");f(b,"getAtomSetCollectionReader",function(a,d,h,b){return J.adapter.smarter.SmarterJmolAdapter.staticGetAtomSetCollectionReader(a,d,h,b)},"~S,~S,~O,java.util.Map");b.staticGetAtomSetCollectionReader=c(b,"staticGetAtomSetCollectionReader",function(a,d,h,b){null==b&&(b=new java.util.Hashtable);try{var c=J.adapter.smarter.Resolver.getAtomCollectionReader(a,
d,h,b,-1);if("string"==typeof c)try{J.adapter.smarter.SmarterJmolAdapter.close(h)}catch(g){if(!E(g,Exception))throw g;}else c.setup(a,b,h);return c}catch(j){try{J.adapter.smarter.SmarterJmolAdapter.close(h)}catch(k){if(!E(k,Exception))throw k;}JU.Logger.error(""+j);return""+j}},"~S,~S,~O,java.util.Map");f(b,"getAtomSetCollectionFromReader",function(a,d,h){var b=J.adapter.smarter.Resolver.getAtomCollectionReader(a,null,d,h,-1);return C(b,"J.adapter.smarter.AtomSetCollectionReader")?(C(d,"java.io.BufferedInputStream")&&
(d=null!=J.adapter.smarter.Resolver.getBinaryType(d)?J.api.Interface.getInterface("JU.BinaryDocument",null,"JmolAdapter").setStream(d,!1):JU.Rdr.getBufferedReader(d,null)),b.setup(a,h,d),b.readData()):""+b},"~S,~O,java.util.Map");f(b,"getAtomSetCollection",function(a){return J.adapter.smarter.SmarterJmolAdapter.staticGetAtomSetCollection(a)},"~O");b.staticGetAtomSetCollection=c(b,"staticGetAtomSetCollection",function(a){var d=null;try{var d=a.reader,h=a.readData();return!C(h,"J.adapter.smarter.AtomSetCollection")?
h:null!=h.errorMessage?h.errorMessage:h}catch(b){try{JU.Logger.info(b.toString())}catch(c){if(E(c,Exception))JU.Logger.error(b.toString());else throw c;}try{d.close()}catch(g){if(!E(g,Exception))throw g;}JU.Logger.error(""+b);return""+b}},"J.adapter.smarter.AtomSetCollectionReader");f(b,"getAtomSetCollectionReaders",function(a,d,h,b,c){var g=b.get("vwr"),j=d.length,k=null;if(b.containsKey("concatenate")){for(var k="",l=0;l<j;l++){var f=d[l],n=g.getFileAsString3(f,!1,null);if(0<l&&3>=j&&n.startsWith("{"))f=
n.contains('version":"DSSR')?"dssr":n.contains("/outliers/")?"validation":"domains",n=g.parseJSONMap(n),null!=n&&b.put(f,f.equals("dssr")?n:JS.SV.getVariableMap(n));else{n.startsWith("java.net.")&&System.err.println(n+" reading "+f);0<=f.indexOf("|")&&(f=JU.PT.rep(f,"_","/"));if(1==l){if(0<=f.indexOf("/rna3dhub/")){k+="\n_rna3d \n;"+n+"\n;\n";continue}if(0<=f.indexOf("/dssr/")){k+="\n_dssr \n;"+n+"\n;\n";continue}}k+=n;k.endsWith("\n")||(k+="\n")}}j=1;k=JU.Rdr.getBR(k)}for(var n=c?Array(j):null,f=
c?null:Array(j),q=null,l=0;l<j;l++)try{b.put("vwr",g);null==k&&(k=a.getBufferedReaderOrBinaryDocument(l,!1));if(!C(k,"java.io.BufferedReader")&&!C(k,"javajs.api.GenericBinaryDocument"))return k;b.put("fullPathName",d[l]);var v=J.adapter.smarter.Resolver.getAtomCollectionReader(d[l],null==h?null:h[l],k,b,l);if(!C(v,"J.adapter.smarter.AtomSetCollectionReader"))return v;q=v;q.setup(null,null,null);q.isBinary?q.setup(d[l],b,a.getBufferedReaderOrBinaryDocument(l,!0)):q.setup(d[l],b,k);k=null;if(c)n[l]=
q;else{v=q.readData();if(!C(v,"J.adapter.smarter.AtomSetCollection"))return v;f[l]=v;if(null!=f[l].errorMessage)return f[l].errorMessage}}catch(B){return JU.Logger.error(""+B),B.printStackTrace(),""+B}return c?n:this.getAtomSetCollectionFromSet(n,f,b)},"J.api.JmolFilesReaderInterface,~A,~A,java.util.Map,~B");f(b,"getAtomSetCollectionFromSet",function(a,d,h){var b=null==d?Array(a.length):d;if(null==d)for(d=0;d<a.length;d++)if(null!=a[d])try{var c=a[d].readData();if(!C(c,"J.adapter.smarter.AtomSetCollection"))return c;
b[d]=c;if(null!=b[d].errorMessage)return b[d].errorMessage}catch(g){return JU.Logger.error(""+g),""+g}if(h.containsKey("trajectorySteps")){a=b[0];try{1<b.length&&b[0].setInfo("ignoreUnitCell",b[1].atomSetInfo.get("ignoreUnitCell")),a.finalizeTrajectoryAs(h.get("trajectorySteps"),h.get("vibrationSteps"))}catch(j){if(E(j,Exception))null==a.errorMessage&&(a.errorMessage=""+j);else throw j;}}else if(b[0].isTrajectory){a=b[0];for(d=1;d<b.length;d++)b[0].mergeTrajectories(b[d])}else a=1==b.length?b[0]:
new J.adapter.smarter.AtomSetCollection("Array",null,b,null);return null==a.errorMessage?a:a.errorMessage},"~O,~O,java.util.Map");f(b,"getAtomSetCollectionFromDOM",function(){throw new UnsupportedOperationException;},"~O,java.util.Map");f(b,"finish",function(a){a.finish()},"~O");f(b,"getAtomSetCollectionName",function(a){return a.collectionName},"~O");f(b,"getAtomSetCollectionAuxiliaryInfo",function(a){return a.atomSetInfo},"~O");f(b,"getAtomSetCount",function(a){return a.atomSetCount},"~O");f(b,
"getAtomSetNumber",function(a,d){return a.getAtomSetNumber(d)},"~O,~N");f(b,"getAtomSetName",function(a,d){return a.getAtomSetName(d)},"~O,~N");f(b,"getAtomSetAuxiliaryInfo",function(a,d){return a.getAtomSetAuxiliaryInfo(d)},"~O,~N");f(b,"getHydrogenAtomCount",function(a){return a.getHydrogenAtomCount()},"~O");f(b,"getBondList",function(a){return a.getBondList()},"~O");f(b,"getAtomCount",function(a,d){if(0>d)return null==a.bsAtoms?a.ac:a.bsAtoms.cardinality();if(null==a.bsAtoms)return a.getAtomSetAtomCount(d);
var h=JU.BSUtil.copy(a.bsAtoms),b=a.getAtomSetAtomIndex(d);h.and(JU.BSUtil.newBitSet2(b,b+a.getAtomSetAtomCount(d)));return h.cardinality()},"~O,~N");f(b,"coordinatesAreFractional",function(a){return a.coordinatesAreFractional},"~O");f(b,"getAtomIterator",function(a){return new J.adapter.smarter.AtomIterator(a)},"~O");f(b,"getBondIterator",function(a){return 0==a.bondCount?null:new J.adapter.smarter.BondIterator(a)},"~O");f(b,"getStructureIterator",function(a){return 0==a.structureCount?null:new J.adapter.smarter.StructureIterator(a)},
"~O");b.close=c(b,"close",function(a){C(a,"java.io.BufferedReader");a.close()},"~O");f(b,"getAtomSetCollectionInline",function(a){var d=null;try{if("string"==typeof a)d=new java.io.BufferedReader(new java.io.StringReader(a));else if(C(a,"java.io.InputStream"))d=a;else return null;var h=this.getAtomSetCollectionReader("String",null,d,null);return"string"==typeof h?h:this.getAtomSetCollection(h)}finally{try{C(d,"java.io.BufferedReader"),d.close()}catch(b){if(!E(b,"java.io.IOException"))throw b;}}},
"~O,java.util.Map");b.PATH_SEPARATOR=System.getProperty("path.separator","/")});m("J.adapter.smarter");x(["J.api.JmolAdapterStructureIterator"],"J.adapter.smarter.StructureIterator",["J.api.JmolAdapter"],function(){var b=s(function(){this.structureCount=0;this.structure=this.structures=null;this.istructure=0;this.bsModelsDefined=null;r(this,arguments)},J.adapter.smarter,"StructureIterator",J.api.JmolAdapterStructureIterator);u(b,function(a){K(this,J.adapter.smarter.StructureIterator,[]);this.structureCount=
a.structureCount;this.structures=a.structures;this.istructure=0;this.bsModelsDefined=a.bsStructuredModels},"J.adapter.smarter.AtomSetCollection");f(b,"hasNext",function(){if(this.istructure==this.structureCount)return!1;this.structure=this.structures[this.istructure++];return!0});f(b,"getStructureType",function(){return this.structure.structureType});f(b,"getSubstructureType",function(){return this.structure.substructureType});f(b,"getStructureID",function(){return this.structure.structureID});f(b,
"getStrandID",function(){return this.structure.strandID});f(b,"getStartChainID",function(){return this.structure.startChainID});f(b,"getStartSequenceNumber",function(){return this.structure.startSequenceNumber});f(b,"getStartInsertionCode",function(){return J.api.JmolAdapter.canonizeInsertionCode(this.structure.startInsertionCode)});f(b,"getEndChainID",function(){return this.structure.endChainID});f(b,"getEndSequenceNumber",function(){return this.structure.endSequenceNumber});f(b,"getEndInsertionCode",
function(){return this.structure.endInsertionCode});f(b,"getStrandCount",function(){return this.structure.strandCount});f(b,"getStructuredModels",function(){return this.bsModelsDefined});f(b,"getAtomIndices",function(){return this.structure.atomStartEnd});f(b,"getModelIndices",function(){return this.structure.modelStartEnd});f(b,"getBSAll",function(){return this.structure.bsAll})});m("J.api");I(J.api,"AtomIndexIterator");m("J.api");x(null,"J.api.Interface",["JU.Logger"],function(){var b=G(J.api,"Interface",
null);b.getInstance=c(b,"getInstance",function(a){return J.api.Interface.getInterface(a,null,"")},"~S,~B");b.getInterface=c(b,"getInterface",function(a){try{var d=qa._4Name(a);return null==d?null:d.newInstance()}catch(h){if(E(h,Exception))return JU.Logger.error("Interface.java Error creating instance for "+a+": \n"+h),null;throw h;}},"~S,JV.Viewer,~S");b.getOption=c(b,"getOption",function(a,d,h){return J.api.Interface.getInterface("J."+a,d,h)},"~S,JV.Viewer,~S");b.getUtil=c(b,"getUtil",function(a,
d,h){return J.api.Interface.getInterface("JU."+a,d,h)},"~S,JV.Viewer,~S");b.getSymmetry=c(b,"getSymmetry",function(a,d){return J.api.Interface.getInterface("JS.Symmetry",a,d).setViewer(a,d)},"JV.Viewer,~S")});m("J.api");x(null,"J.api.JmolAdapter",["JU.PT","J.api.JmolViewer","JU.Elements"],function(){var b=G(J.api,"JmolAdapter",null);b.getElementSymbol=c(b,"getElementSymbol",function(a){return JU.Elements.elementSymbolFromNumber(a)},"~N");b.getElementNumber=c(b,"getElementNumber",function(a){return JU.Elements.elementNumberFromSymbol(a,
!1)},"~S");b.getNaturalIsotope=c(b,"getNaturalIsotope",function(a){return JU.Elements.getNaturalIsotope(a)},"~N");b.getBondingRadius=c(b,"getBondingRadius",function(a,d){return JU.Elements.getBondingRadius(a,d)},"~N,~N");c(b,"getAtomSetCollectionFromReaderType",function(a,d,h,b){a=this.getAtomSetCollectionReader(a,d,h,J.api.JmolViewer.allocateViewer(null,this).setLoadParameters(b,!1));return"string"==typeof a?a:this.getAtomSetCollection(a)},"~S,~S,~O,java.util.Map");c(b,"openBufferedReader",function(a,
d){return this.getAtomSetCollectionFromReaderType(a,null,d,null)},"~S,java.io.BufferedReader");c(b,"openBufferedReader",function(a,d,h){return this.getAtomSetCollectionFromReaderType(a,null,d,h)},"~S,java.io.BufferedReader,java.util.Map");c(b,"openBufferedReader",function(a,d,h){return this.getAtomSetCollectionFromReaderType(a,d,h,null)},"~S,~S,java.io.BufferedReader");b.canonizeAlphaDigit=c(b,"canonizeAlphaDigit",function(a){return JU.PT.isLetterOrDigit(a)?a:"\x00"},"~S");b.canonizeInsertionCode=
c(b,"canonizeInsertionCode",function(a){return J.api.JmolAdapter.canonizeAlphaDigit(a)},"~S");b.canonizeAlternateLocationID=c(b,"canonizeAlternateLocationID",function(a){return J.api.JmolAdapter.canonizeAlphaDigit(a)},"~S");b.cellParamNames=z(-1,"_cell_length_a _cell_length_b _cell_length_c _cell_angle_alpha _cell_angle_beta _cell_angle_gamma".split(" "))});m("J.api");I(J.api,"JmolAdapterAtomIterator");m("J.api");G(J.api,"JmolAdapterBondIterator",null);m("J.api");G(J.api,"JmolAdapterStructureIterator",
null);m("J.api");I(J.api,"JmolAppConsoleInterface");m("J.api");I(J.api,"JmolAppletInterface",J.api.JmolSyncInterface);m("J.api");I(J.api,"JmolCallbackListener");m("J.api");I(J.api,"JmolAnnotationParser");m("J.api");I(J.api,"JmolGraphicsInterface");m("J.api");I(J.api,"JmolMeasurementClient");m("J.api");I(J.api,"JmolModulationSet");m("J.api");I(J.api,"JmolNavigatorInterface",Runnable);m("J.api");I(J.api,"JmolRendererInterface",J.api.JmolGraphicsInterface);m("J.api");I(J.api,"JmolRepaintManager");m("J.api");
I(J.api,"JmolStatusListener",J.api.JmolCallbackListener);m("J.api");I(J.api,"JmolSyncInterface");m("J.api");x(null,"J.api.JmolViewer",["java.util.Hashtable","JV.JC"],function(){var b=s(function(){this.apiPlatform=this.menuStructure=null;r(this,arguments)},J.api,"JmolViewer",null);b.allocateViewer=c(b,"allocateViewer",function(a,d,h,b,c,g,j,k){var l=new java.util.Hashtable;null!=a&&l.put("display",a);null!=d&&l.put("adapter",d);null!=j&&l.put("statuslistener",j);null!=k&&l.put("platform",k);null!=
g&&l.put("options",g);null!=h&&l.put("fullname",h);null!=b&&l.put("documentbase",b);null!=c&&l.put("codebase",c);l.put("isApp",Boolean.TRUE);return new JV.Viewer(l)},"~O,J.api.JmolAdapter,~S,java.net.URL,java.net.URL,~S,J.api.JmolStatusListener,J.api.GenericPlatform");b.allocateViewer=c(b,"allocateViewer",function(a,d){return J.api.JmolViewer.allocateViewer(a,d,null,null,null,null,null,null)},"~O,J.api.JmolAdapter");b.allocateViewer=c(b,"allocateViewer",function(a,d,h,b,c,g,j){return J.api.JmolViewer.allocateViewer(a,
d,h,b,c,g,j,null)},"~O,J.api.JmolAdapter,~S,java.net.URL,java.net.URL,~S,J.api.JmolStatusListener");c(b,"setConsole",function(a){this.getProperty("DATA_API","getAppConsole",a)},"J.api.JmolAppConsoleInterface");b.getJmolVersion=c(b,"getJmolVersion",function(){return JV.Viewer.getJmolVersion()});b.getJmolVersionNoDate=c(b,"getJmolVersionNoDate",function(){return JV.JC.version});c(b,"openReader",function(a,d){return this.openReader(null==a?"String":a,null,d)},"~S,~O");c(b,"openFileAsync",function(a){this.openFileAsyncSpecial(a,
0)},"~S");c(b,"renderScreenImage",function(a,d){this.apiPlatform.renderScreenImage(a,d)},"~O,~O,~O");c(b,"runScriptCautiously",function(){return null},"~S");c(b,"dispose",function(){})});m("J.api");I(J.api,"SymmetryInterface");m("J.api");I(J.api,"Translator");m("J.appletjs");x(["JU.GenericApplet"],"J.appletjs.Jmol",["java.util.Hashtable"],function(){var b=G(J.appletjs,"Jmol",JU.GenericApplet);u(b,function(a){K(this,J.appletjs.Jmol,[]);this.htParams=new java.util.Hashtable;null==a&&(a=new java.util.Hashtable);
this.vwrOptions=a;for(var d,h=a.entrySet().iterator();h.hasNext()&&((d=h.next())||1);)this.htParams.put(d.getKey().toLowerCase(),d.getValue());this.documentBase=""+a.get("documentBase");this.codeBase=""+a.get("codePath");JU.GenericApplet.isJS=!0;this.init(this)},"java.util.Map")});m("J.atomdata");x(null,"J.atomdata.AtomData",["JU.P3","JU.BSUtil"],function(){var b=s(function(){this.modelName=this.fileName=this.programInfo=null;this.modelIndex=0;this.radiusData=this.bsMolecules=this.bsIgnored=this.bsSelected=
null;this.hAtomRadius=this.lastModelIndex=this.firstModelIndex=this.firstAtomIndex=0;this.hAtoms=this.atomMolecule=this.atomicNumber=this.atomRadius=this.xyz=this.atoms=this.atomIndex=null;this.adpMode=this.hydrogenAtomCount=this.ac=0;r(this,arguments)},J.atomdata,"AtomData",null);c(b,"transformXYZ",function(a,d){var h=Array(this.xyz.length);null==d&&(d=JU.BSUtil.newBitSet2(0,this.xyz.length));for(var b=d.nextSetBit(0);0<=b;b=d.nextSetBit(b+1))null!=this.xyz[b]&&(h[b]=JU.P3.newP(this.xyz[b]),a.rotTrans(h[b]));
this.xyz=h},"JU.M4,JU.BS")});m("J.atomdata");I(J.atomdata,"AtomDataServer");m("J.atomdata");x(["java.lang.Enum","J.c.VDW"],"J.atomdata.RadiusData",["JU.SB"],function(){var b=s(function(){this.vdwType=this.factorType=this.info=null;this.value=NaN;this.valueExtended=0;this.values=null;r(this,arguments)},J.atomdata,"RadiusData",null);N(b,function(){this.factorType=J.atomdata.RadiusData.EnumType.ABSOLUTE;this.vdwType=J.c.VDW.AUTO});u(b,function(a,d,h,b){null!=a?(this.values=a,this.value=2147483647):null!=
h&&(this.factorType=h,this.value=d,null!=b&&(this.vdwType=b))},"~A,~N,J.atomdata.RadiusData.EnumType,J.c.VDW");f(b,"toString",function(){if(Float.isNaN(this.value))return"";var a=new JU.SB;switch(this.factorType){case J.atomdata.RadiusData.EnumType.ABSOLUTE:a.appendF(this.value);break;case J.atomdata.RadiusData.EnumType.OFFSET:a.append(0<this.value?"+":"").appendF(this.value);break;case J.atomdata.RadiusData.EnumType.FACTOR:a.appendI(F(100*this.value)).append("%");this.vdwType!==J.c.VDW.AUTO&&a.append(this.vdwType.getVdwLabel());
break;case J.atomdata.RadiusData.EnumType.SCREEN:a.appendI(F(this.value))}return a.toString()});b=G(J.atomdata.RadiusData,"EnumType",Enum);A(b,"ABSOLUTE",0,[]);A(b,"OFFSET",1,[]);A(b,"FACTOR",2,[]);A(b,"SCREEN",3,[])});m("J.awtjs");x(["J.awtjs2d.Platform"],"J.awtjs.Platform",null,function(){var b=G(J.awtjs,"Platform",J.awtjs2d.Platform);f(b,"drawImage",function(){},"~O,~O,~N,~N,~N,~N,~B");f(b,"getTextPixels",function(){return null},"~S,JU.Font,~O,~O,~N,~N,~N");f(b,"getGraphics",function(){return null},
"~O");f(b,"getStaticGraphics",function(){return null},"~O,~B");f(b,"newBufferedImage",function(){return null},"~O,~N,~N");f(b,"newOffScreenImage",function(){return null},"~N,~N")});m("J.awtjs2d");x(null,"J.awtjs2d.Display",["JU.PT"],function(){var b=G(J.awtjs2d,"Display",null);b.getFullScreenDimensions=c(b,"getFullScreenDimensions",function(a,d){d[0]=a.width;d[1]=a.height},"~O,~A");b.hasFocus=c(b,"hasFocus",function(){return!0},"~O");b.requestFocusInWindow=c(b,"requestFocusInWindow",function(){},
"~O");b.renderScreenImage=c(b,"renderScreenImage",function(){},"J.api.PlatformViewer,~O,~O");b.prompt=c(b,"prompt",function(a,d,h,b,c){if(!c)return""+(null==h?alert(d):prompt(d,h));null!=h&&(b=JU.PT.split(h,"|"));a=a.eval.promptAsync(d,b);if(null!=a){if(null==h)for(d=0;d<b.length;d++)if(b[d].equals(h))return""+d;return a}return"null"},"J.api.PlatformViewer,~S,~S,~A,~B");b.convertPointFromScreen=c(b,"convertPointFromScreen",function(){},"~O,JU.P3");b.drawImage=c(b,"drawImage",function(a,d,h,b,c,g,
j){b=d.buf8;g=d.buf32;var k=d.width*d.height,l=1;if(j){var f=c%2;c=Math.floor(c/2);l=Math.floor(d.width/c)}j=4*(d.width-c||h);var n=0,q=0;for(h*=4;n<k;)b[h++]=g[n]>>16&255,b[h++]=g[n]>>8&255,b[h++]=g[n]&255,b[h++]=255,n+=l,0==++q%c&&(f&&(n+=1,b[h]=0,b[h+1]=0,b[h+2]=0,b[h+3]=0),h+=j);a.putImageData(d.imgdata,0,0)},"~O,~O,~N,~N,~N,~N,~B")});m("J.awtjs2d");x(null,"J.awtjs2d.Image",["J.awtjs2d.Platform"],function(){var b=G(J.awtjs2d,"Image",null);b.getWidth=c(b,"getWidth",function(a){return a.imageWidth?
a.imageWidth:a.width},"~O");b.getHeight=c(b,"getHeight",function(a){return a.imageHeight?a.imageHeight:a.height},"~O");b.grabPixels=c(b,"grabPixels",function(a,d,h){var b=null,b=a.getImageData(0,0,d,h).data;return J.awtjs2d.Image.toIntARGB(b)},"~O,~N,~N");b.toIntARGB=c(b,"toIntARGB",function(a){for(var d=w(a.length/4),h=D(d,0),b=0,c=0;b<d;)h[b++]=a[c++]<<16|a[c++]<<8|a[c++]|a[c++]<<24;return h},"~A");b.getTextPixels=c(b,"getTextPixels",function(a,d,h,b,c,g){h.fillStyle="#000000";h.fillRect(0,0,b,
c);h.fillStyle="#FFFFFF";h.font=d.font;h.fillText(a,0,g);return J.awtjs2d.Image.grabPixels(h,b,c)},"~S,JU.Font,~O,~N,~N,~N");b.allocateRgbImage=c(b,"allocateRgbImage",function(a,d,h,b,c,g){null==g&&(g={width:a,height:d});g.buf32=h;return g},"~N,~N,~A,~N,~B,~O");b.getImageDialog=c(b,"getImageDialog",function(a,d,h){return J.awtjs2d.Platform.Jmol().consoleGetImageDialog(a,d,h)},"JV.Viewer,~S,java.util.Map")});m("J.awtjs2d");x(["J.api.GenericFileInterface"],"J.awtjs2d.JSFile",["JU.OC","$.PT","JV.Viewer"],
function(){var b=s(function(){this.fullName=this.name=null;r(this,arguments)},J.awtjs2d,"JSFile",null,J.api.GenericFileInterface);u(b,function(a){this.name=a.$replace("\\","/");this.fullName=a;!this.fullName.startsWith("/")&&0>JU.OC.urlTypeIndex(a)&&(this.fullName=JV.Viewer.jsDocumentBase+"/"+this.fullName);this.fullName=JU.PT.rep(this.fullName,"/./","/");a.substring(a.lastIndexOf("/")+1)},"~S");b.newFile=c(b,"newFile",function(a){return new J.awtjs2d.JSFile(a)},"~S");f(b,"getParentAsFile",function(){var a=
this.fullName.lastIndexOf("/");return 0>a?null:new J.awtjs2d.JSFile(this.fullName.substring(0,a))});f(b,"getFullPath",function(){return this.fullName});f(b,"getName",function(){return this.name});f(b,"isDirectory",function(){return this.fullName.endsWith("/")});f(b,"length",function(){return 0});b.getURLContents=c(b,"getURLContents",function(a,d,h){try{var b=a.openConnection();null!=d?b.outputBytes(d):null!=h&&b.outputString(h);return b.getContents()}catch(c){if(E(c,Exception))return c.toString();
throw c;}},"java.net.URL,~A,~S");f(b,"toString",function(){return this.fullName})});m("J.awtjs2d");var ka=G(J.awtjs2d,"JSFont",null);ka.newFont=c(ka,"newFont",function(b,a,d,h,p){b=b.equals("Monospaced")?"Courier":b.startsWith("Sans")?"Helvetica Neue, Sans-serif":"Serif";return(a?"bold ":"")+(d?"italic ":"")+h+p+" "+b},"~S,~B,~B,~N,~S");ka.getFontMetrics=c(ka,"getFontMetrics",function(b,a){a.font!=b.font&&(a.font=b.font,b.font=a.font,a._fontAscent=Math.ceil(b.fontSize),a._fontDescent=Math.ceil(0.25*
b.fontSize));return a},"JU.Font,~O");ka.getAscent=c(ka,"getAscent",function(b){return Math.ceil(b._fontAscent)},"~O");ka.getDescent=c(ka,"getDescent",function(b){return Math.ceil(b._fontDescent)},"~O");ka.stringWidth=c(ka,"stringWidth",function(b,a,d){a.font=b.font;return Math.ceil(a.measureText(d).width)},"JU.Font,~O,~S");m("J.awtjs2d");x(["J.api.GenericMouseInterface"],"J.awtjs2d.Mouse",["JU.PT","$.V3","JU.Logger"],function(){var b=s(function(){this.manager=this.vwr=null;this.keyBuffer="";this.wheeling=
this.isMouseDown=!1;this.modifiersWhenPressed10=this.yWhenPressed=this.xWhenPressed=this.modifiersDown=0;r(this,arguments)},J.awtjs2d,"Mouse",null,J.api.GenericMouseInterface);u(b,function(a,d){this.vwr=d;this.manager=this.vwr.acm},"~N,JV.Viewer,~O");f(b,"clear",function(){});f(b,"dispose",function(){});f(b,"processEvent",function(a,d,h,b,c){507!=a&&(b=J.awtjs2d.Mouse.applyLeftMouse(b));switch(a){case 507:this.wheeled(c,d,b);break;case 501:this.xWhenPressed=d;this.yWhenPressed=h;this.modifiersWhenPressed10=
b;this.pressed(c,d,h,b,!1);break;case 506:this.dragged(c,d,h);break;case 504:this.entry(c,d,h,!1);break;case 505:this.entry(c,d,h,!0);break;case 503:this.moved(c,d,h,b);break;case 502:this.released(c,d,h,b);d==this.xWhenPressed&&(h==this.yWhenPressed&&b==this.modifiersWhenPressed10)&&this.clicked(c,d,h,b,1);break;default:return!1}return!0},"~N,~N,~N,~N,~N");f(b,"processTwoPointGesture",function(a){if(!(2>a[0].length)){var d=a[0],h=a[1],b=d[0],c=d[h.length-1];a=b[0];var g=c[0],b=b[1],c=c[1],j=JU.V3.new3(g-
a,c-b,0),k=j.length(),l=h[0],f=h[h.length-1],h=l[0],n=f[0],l=l[1],f=f[1],q=JU.V3.new3(n-h,f-l,0),v=q.length();1>k||1>v||(j.normalize(),q.normalize(),j=j.dot(q),0.8<j?(a=F(g-d[d.length-2][0]),d=F(c-d[d.length-2][1]),this.vwr.translateXYBy(a,d)):-0.8>j&&(j=JU.V3.new3(h-a,l-b,0),q=JU.V3.new3(n-g,f-c,0),d=q.length()-j.length(),this.wheeled(System.currentTimeMillis(),0>d?-1:1,32)))}},"~A");c(b,"mouseClicked",function(a){this.clicked(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.getClickCount())},"java.awt.event.MouseEvent");
c(b,"mouseEntered",function(a){this.entry(a.getWhen(),a.getX(),a.getY(),!1)},"java.awt.event.MouseEvent");c(b,"mouseExited",function(a){this.entry(a.getWhen(),a.getX(),a.getY(),!0)},"java.awt.event.MouseEvent");c(b,"mousePressed",function(a){this.pressed(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.isPopupTrigger())},"java.awt.event.MouseEvent");c(b,"mouseReleased",function(a){this.released(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(b,"mouseDragged",function(a){a.getModifiers();
this.dragged(a.getWhen(),a.getX(),a.getY())},"java.awt.event.MouseEvent");c(b,"mouseMoved",function(a){this.moved(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(b,"mouseWheelMoved",function(a){a.consume();this.wheeled(a.getWhen(),a.getWheelRotation(),a.getModifiers())},"java.awt.event.MouseWheelEvent");c(b,"keyTyped",function(a){a.consume();if(this.vwr.menuEnabled()){var d=a.getKeyChar(),h=a.getModifiers();JU.Logger.debuggingHigh&&JU.Logger.debug("MouseManager keyTyped: "+
d+" "+(0+d.charCodeAt(0))+" "+h);if(0!=h&&1!=h)switch(d.charCodeAt(0)){case String.fromCharCode(11):case 107:a=!this.vwr.getBooleanProperty("allowKeyStrokes");switch(h){case 2:this.vwr.setBooleanProperty("allowKeyStrokes",a);this.vwr.setBooleanProperty("showKeyStrokes",!0);break;case 10:case 1:this.vwr.setBooleanProperty("allowKeyStrokes",a),this.vwr.setBooleanProperty("showKeyStrokes",!1)}this.clearKeyBuffer();this.vwr.refresh(3,"showkey");break;case 26:case 122:switch(h){case 2:this.vwr.undoMoveAction(4165,
1);break;case 3:this.vwr.undoMoveAction(4140,1)}break;case 25:case 121:switch(h){case 2:this.vwr.undoMoveAction(4140,1)}}else this.vwr.getBooleanProperty("allowKeyStrokes")&&this.addKeyBuffer(1==a.getModifiers()?Character.toUpperCase(d):d)}},"java.awt.event.KeyEvent");c(b,"keyPressed",function(a){this.vwr.isApplet&&a.consume();this.manager.keyPressed(a.getKeyCode(),a.getModifiers())},"java.awt.event.KeyEvent");c(b,"keyReleased",function(a){a.consume();this.manager.keyReleased(a.getKeyCode())},"java.awt.event.KeyEvent");
c(b,"clearKeyBuffer",function(){0!=this.keyBuffer.length&&(this.keyBuffer="",this.vwr.getBooleanProperty("showKeyStrokes")&&this.vwr.evalStringQuietSync('!set echo _KEYSTROKES; set echo bottom left;echo ""',!0,!0))});c(b,"addKeyBuffer",function(a){10==a.charCodeAt(0)?this.sendKeyBuffer():(8==a.charCodeAt(0)?0<this.keyBuffer.length&&(this.keyBuffer=this.keyBuffer.substring(0,this.keyBuffer.length-1)):this.keyBuffer+=a,this.vwr.getBooleanProperty("showKeyStrokes")&&this.vwr.evalStringQuietSync("!set echo _KEYSTROKES; set echo bottom left;echo "+
JU.PT.esc("\u0001"+this.keyBuffer),!0,!0))},"~S");c(b,"sendKeyBuffer",function(){var a=this.keyBuffer;this.vwr.getBooleanProperty("showKeyStrokes")&&this.vwr.evalStringQuietSync("!set echo _KEYSTROKES; set echo bottom left;echo "+JU.PT.esc(this.keyBuffer),!0,!0);this.clearKeyBuffer();this.vwr.evalStringQuietSync(a,!1,!0)});c(b,"entry",function(a,d,h,b){this.isMouseDown=this.wheeling=!1;this.modifiersDown=0;this.manager.mouseEnterExit(a,d,h,b)},"~N,~N,~N,~B");c(b,"clicked",function(a,d,h,b){this.clearKeyBuffer();
this.manager.mouseAction(2,a,d,h,1,b)},"~N,~N,~N,~N,~N");c(b,"moved",function(a,d,h,b){this.clearKeyBuffer();this.isMouseDown?this.manager.mouseAction(1,a,d,h,0,this.modifiersDown):this.manager.mouseAction(0,a,d,h,0,b)},"~N,~N,~N,~N");c(b,"wheeled",function(a,d,h){this.clearKeyBuffer();this.wheeling=!0;this.manager.mouseAction(3,a,0,d,0,h&-29|32)},"~N,~N,~N");c(b,"pressed",function(a,d,h,b){this.clearKeyBuffer();this.isMouseDown=!0;this.modifiersDown=b;this.wheeling=!1;this.manager.mouseAction(4,
a,d,h,0,b)},"~N,~N,~N,~N,~B");c(b,"released",function(a,d,h,b){this.isMouseDown=!1;this.modifiersDown=0;this.wheeling=!1;this.manager.mouseAction(5,a,d,h,0,b)},"~N,~N,~N,~N");c(b,"dragged",function(a,d,h){this.wheeling||(20==(this.modifiersDown&20)&&(this.modifiersDown=this.modifiersDown&-5|2),this.manager.mouseAction(1,a,d,h,0,this.modifiersDown))},"~N,~N,~N");b.applyLeftMouse=c(b,"applyLeftMouse",function(a){return 0==(a&28)?a|16:a},"~N");f(b,"processKeyEvent",function(a){switch(a.getID()){case 401:this.keyPressed(a);
break;case 402:this.keyReleased(a);break;case 400:this.keyTyped(a)}},"~O")});m("J.awtjs2d");x(["J.api.GenericPlatform"],"J.awtjs2d.Platform","java.net.URL java.util.Date JU.AjaxURLStreamHandlerFactory $.Rdr J.api.Interface J.awtjs2d.Display $.Image $.JSFile $.JSFont $.Mouse".split(" "),function(){var b=s(function(){this.context=this.vwr=this.canvas=null;r(this,arguments)},J.awtjs2d,"Platform",null,J.api.GenericPlatform);f(b,"setViewer",function(a,d){this.vwr=a;null==d?(d=document.createElement("canvas"),
this.context=d.getContext("2d")):(this.context=d.getContext("2d"),d.imgdata=this.context.getImageData(0,0,d.width,d.height),d.buf8=d.imgdata.data);this.canvas=d;try{java.net.URL.setURLStreamHandlerFactory(new JU.AjaxURLStreamHandlerFactory)}catch(h){}},"J.api.PlatformViewer,~O");f(b,"isSingleThreaded",function(){return!0});f(b,"getJsObjectInfo",function(a,d,h){return null==d?null:"localName"==d?a[0].nodeName:null==h?a[0][d]:a[0][d](h[0])},"~A,~S,~A");f(b,"isHeadless",function(){return!1});f(b,"getMouseManager",
function(a,d){return new J.awtjs2d.Mouse(a,this.vwr,d)},"~N,~O");f(b,"convertPointFromScreen",function(a,d){J.awtjs2d.Display.convertPointFromScreen(a,d)},"~O,JU.P3");f(b,"getFullScreenDimensions",function(a,d){J.awtjs2d.Display.getFullScreenDimensions(a,d)},"~O,~A");f(b,"getMenuPopup",function(a,d){var h="j"==d?"awtjs2d.JSJmolPopup":"awtjs2d.JSModelKitPopup",b=J.api.Interface.getOption(h,this.vwr,"popup");try{null!=b&&b.jpiInitialize(this.vwr,a)}catch(c){if(E(c,Exception))return System.out.println("Exception creating "+
h+":"+c),null;throw c;}return b},"~S,~S");f(b,"hasFocus",function(a){return J.awtjs2d.Display.hasFocus(a)},"~O");f(b,"prompt",function(a,d,h,b){return J.awtjs2d.Display.prompt(this.vwr,a,d,h,b)},"~S,~S,~A,~B");f(b,"renderScreenImage",function(a,d){J.awtjs2d.Display.renderScreenImage(this.vwr,a,d)},"~O,~O");f(b,"drawImage",function(a,d,h,b,c,g,j){J.awtjs2d.Display.drawImage(a,d,h,b,c,g,j)},"~O,~O,~N,~N,~N,~N,~B");f(b,"requestFocusInWindow",function(a){J.awtjs2d.Display.requestFocusInWindow(a)},"~O");
f(b,"repaint",function(){var a=null,a=self.Jmol&&Jmol.repaint?Jmol:null;null!=a&&a.repaint(this.vwr.html5Applet,!0)},"~O");f(b,"setTransparentCursor",function(){},"~O");f(b,"setCursor",function(a){J.awtjs2d.Platform.Jmol().setCursor(this.vwr.html5Applet,a)},"~N,~O");f(b,"allocateRgbImage",function(a,d,h,b,c,g){null==h&&(h=this.grabPixels(null,0,0,null),a=this.canvas.width,d=this.canvas.height);return J.awtjs2d.Image.allocateRgbImage(a,d,h,b,c,g?null:this.canvas)},"~N,~N,~A,~N,~B,~B");f(b,"notifyEndOfRendering",
function(){});f(b,"disposeGraphics",function(){},"~O");f(b,"grabPixels",function(a,d,h){var b=null,c=null==a;c&&(this.canvas=a=Jmol.loadImage(this,"webgl",""+System.currentTimeMillis(),this.vwr.html5Applet._canvas.toDataURL(),null,null),d=a.imageWidth,h=a.imageHeight,a.imageWidth=0);a.image&&(d!=a.width||h!=a.height)&&Jmol.setCanvasImage(a,d,h);if(a.buf32)return a.buf32;b=a.getContext("2d");d=J.awtjs2d.Image.grabPixels(b,d,h);a.buf32=d;if(c)for(a=d.length;0<=--a;)0==d[a]&&(d[a]=-1);return d},"~O,~N,~N,~A");
f(b,"drawImageToBuffer",function(a,d,h,b,c){return this.grabPixels(h,b,c,null)},"~O,~O,~O,~N,~N,~N");f(b,"getTextPixels",function(a,d,h,b,c,g,j){return J.awtjs2d.Image.getTextPixels(a,d,h,c,g,j)},"~S,JU.Font,~O,~O,~N,~N,~N");f(b,"flushImage",function(){},"~O");f(b,"getGraphics",function(a){return null==a?this.context:a.getContext("2d")},"~O");f(b,"getImageHeight",function(a){return null==a?-1:J.awtjs2d.Image.getHeight(a)},"~O");f(b,"getImageWidth",function(a){return null==a?-1:J.awtjs2d.Image.getWidth(a)},
"~O");f(b,"getStaticGraphics",function(a){return this.getGraphics(a)},"~O,~B");f(b,"newBufferedImage",function(a,d,h){return J.awtjs2d.Platform.Jmol().getHiddenCanvas(this.vwr.html5Applet,"stereoImage",d,h)},"~O,~N,~N");f(b,"newOffScreenImage",function(a,d){return J.awtjs2d.Platform.Jmol().getHiddenCanvas(this.vwr.html5Applet,"textImage",a,d)},"~N,~N");f(b,"waitForDisplay",function(){return!1},"~O,~O");f(b,"createImage",function(a){var d=a[0],h=a[1];a=a[2];var b=this.vwr,c=null==a?b.getEvalContextAndHoldQueue(b.eval):
null,g=null,g=function(a,h){b.loadImageData(a,h,d,c)};return J.awtjs2d.Platform.Jmol().loadImage(this,d,h,a,g)},"~O");f(b,"fontStringWidth",function(a,d){return J.awtjs2d.JSFont.stringWidth(a,this.context,d)},"JU.Font,~S");f(b,"getFontAscent",function(a){return J.awtjs2d.JSFont.getAscent(a)},"~O");f(b,"getFontDescent",function(a){return J.awtjs2d.JSFont.getDescent(a)},"~O");f(b,"getFontMetrics",function(a,d){return J.awtjs2d.JSFont.getFontMetrics(a,null==d?this.context:d)},"JU.Font,~O");f(b,"newFont",
function(a,d,h,b){return J.awtjs2d.JSFont.newFont(a,d,h,b,"px")},"~S,~B,~B,~N");f(b,"getDateFormat",function(a){if(null!=a&&a.contains("32000"))return"D:"+this.getDateFormat("8224")+"'00'";var d=new java.util.Date;if(null!=a){if(0<=a.indexOf("8601")){a=d.toString().split(" ");if(1==a.length)return a;var h="0"+(1+d.getMonth()),h=h.substring(h.length-2),d="0"+d.getDate(),d=d.substring(d.length-2);return a[3]+"-"+h+"-"+d+"T"+a[4]}if(0<=a.indexOf("8824"))return a=d.toString().split(" "),h="0"+(1+d.getMonth()),
h=h.substring(h.length-2),d="0"+d.getDate(),d=d.substring(d.length-2),a[3]+h+d+a[4].replace(/\:/g,"")+a[5].substring(3,6)+"'"+a[5].substring(6,8)+"'"}return d.toUTCString()},"~S");f(b,"newFile",function(a){return new J.awtjs2d.JSFile(a)},"~S");f(b,"getBufferedFileInputStream",function(){return null},"~S");f(b,"getURLContents",function(a,d,h,b){return J.awtjs2d.Platform.getURLContentsStatic(a,d,h,b)},"java.net.URL,~A,~S,~B");b.getURLContentsStatic=c(b,"getURLContentsStatic",function(a,d,h,b){a=J.awtjs2d.JSFile.getURLContents(a,
d,h);try{return!b?a:"string"==typeof a?a:C(a,"JU.SB")?a.toString():C(a,Array)?String.instantialize(a):String.instantialize(JU.Rdr.getStreamAsBytes(a,null))}catch(c){if(E(c,Exception))return""+c;throw c;}},"java.net.URL,~A,~S,~B");f(b,"getLocalUrl",function(){return null},"~S");f(b,"getImageDialog",function(a,d){return J.awtjs2d.Image.getImageDialog(this.vwr,a,d)},"~S,java.util.Map");b.Jmol=c(b,"Jmol",function(){return Jmol});f(b,"forceAsyncLoad",function(a){return J.awtjs2d.Platform.Jmol().isBinaryUrl(a)},
"~S");f(b,"getInChI",function(){return null==J.awtjs2d.Platform.inchi?J.awtjs2d.Platform.inchi=J.api.Interface.getInterface("J.inchi.InChIJS",this.vwr,"platform"):J.awtjs2d.Platform.inchi});f(b,"confirm",function(a,d){var h=!1;null!=d&&(h=!1);return h?1:2},"~S,~S");b.inchi=null});m("J.bspt");x(null,"J.bspt.Bspf",["JU.AU","J.bspt.Bspt"],function(){var b=s(function(){this.dimMax=0;this.bspts=null;this.isValid=!1;this.cubeIterators=this.bsptsValid=null;r(this,arguments)},J.bspt,"Bspf",null);u(b,function(a){this.dimMax=
a;this.bspts=Array(1);this.bsptsValid=ya(1,!1);this.cubeIterators=[]},"~N");c(b,"validateModel",function(a,d){this.bsptsValid[a]=d},"~N,~B");c(b,"isInitializedIndex",function(a){return this.bspts.length>a&&null!=this.bspts[a]&&this.bsptsValid[a]},"~N");c(b,"addTuple",function(a,d){a>=this.bspts.length&&(this.bspts=JU.AU.arrayCopyObject(this.bspts,a+1),this.bsptsValid=JU.AU.arrayCopyBool(this.bsptsValid,a+1));var h=this.bspts[a];null==h&&(h=this.bspts[a]=new J.bspt.Bspt(this.dimMax,a));h.addTuple(d)},
"~N,JU.P3");c(b,"stats",function(){for(var a=0;a<this.bspts.length;++a)null!=this.bspts[a]&&this.bspts[a].stats()});c(b,"getCubeIterator",function(a){if(0>a)return this.getNewCubeIterator(-1-a);a>=this.cubeIterators.length&&(this.cubeIterators=JU.AU.arrayCopyObject(this.cubeIterators,a+1));null==this.cubeIterators[a]&&null!=this.bspts[a]&&(this.cubeIterators[a]=this.getNewCubeIterator(a));this.cubeIterators[a].set(this.bspts[a]);return this.cubeIterators[a]},"~N");c(b,"getNewCubeIterator",function(a){return this.bspts[a].allocateCubeIterator()},
"~N");c(b,"initialize",function(a,d,h){null!=this.bspts[a]&&this.bspts[a].reset();for(var b=h.nextSetBit(0);0<=b;b=h.nextSetBit(b+1))this.addTuple(a,d[b]);this.bsptsValid[a]=!0},"~N,~A,JU.BS")});m("J.bspt");x(null,"J.bspt.Bspt",["J.bspt.CubeIterator","$.Leaf"],function(){var b=s(function(){this.index=this.dimMax=this.treeDepth=0;this.eleRoot=null;r(this,arguments)},J.bspt,"Bspt",null);u(b,function(a,d){this.dimMax=a;this.index=d;this.reset()},"~N,~N");c(b,"reset",function(){this.eleRoot=new J.bspt.Leaf(this,
null,0);this.treeDepth=1});c(b,"addTuple",function(a){this.eleRoot=this.eleRoot.addTuple(0,a)},"JU.T3");c(b,"stats",function(){});c(b,"allocateCubeIterator",function(){return new J.bspt.CubeIterator(this)})});m("J.bspt");var na=s(function(){this.stack=this.bspt=null;this.leafIndex=this.sp=0;this.leaf=null;this.dz=this.dy=this.dx=this.cz=this.cy=this.cx=this.radius=0;this.tHemisphere=!1;r(this,arguments)},J.bspt,"CubeIterator",null);u(na,function(b){this.set(b)},"J.bspt.Bspt");c(na,"set",function(b){this.bspt=
b;this.stack=Array(b.treeDepth)},"J.bspt.Bspt");c(na,"initialize",function(b,a,d){this.radius=a;this.tHemisphere=!1;this.cx=b.x;this.cy=b.y;this.cz=b.z;this.leaf=null;this.stack.length<this.bspt.treeDepth&&this.set(this.bspt);this.stack[0]=this.bspt.eleRoot;this.sp=1;this.findLeftLeaf();this.tHemisphere=d},"JU.T3,~N,~B");c(na,"release",function(){this.set(this.bspt)});c(na,"hasMoreElements",function(){for(;null!=this.leaf;){for(;this.leafIndex<this.leaf.count;++this.leafIndex)if(this.isWithinRadius(this.leaf.tuples[this.leafIndex]))return!0;
this.findLeftLeaf()}return!1});c(na,"nextElement",function(){return this.leaf.tuples[this.leafIndex++]});c(na,"foundDistance2",function(){return this.dx*this.dx+this.dy*this.dy+this.dz*this.dz});c(na,"findLeftLeaf",function(){this.leaf=null;if(0!=this.sp){for(var b=this.stack[--this.sp];C(b,"J.bspt.Node");){var a;switch(b.dim){case 0:a=this.cx;break;case 1:a=this.cy;break;default:a=this.cz}var d=a+this.radius;if(!this.tHemisphere||0!=b.dim)a-=this.radius;if(a<=b.maxLeft&&d>=b.minLeft)d>=b.minRight&&
a<=b.maxRight&&(this.stack[this.sp++]=b.eleRight),b=b.eleLeft;else if(d>=b.minRight&&a<=b.maxRight)b=b.eleRight;else{if(0==this.sp)return;b=this.stack[--this.sp]}}this.leaf=b;this.leafIndex=0}});c(na,"isWithinRadius",function(b){this.dx=b.x-this.cx;return(!this.tHemisphere||0<=this.dx)&&(this.dx=Math.abs(this.dx))<=this.radius&&(this.dy=Math.abs(b.y-this.cy))<=this.radius&&(this.dz=Math.abs(b.z-this.cz))<=this.radius},"JU.T3");m("J.bspt");s(function(){this.bspt=null;this.count=0;r(this,arguments)},
J.bspt,"Element",null);m("J.bspt");x(["J.bspt.Element"],"J.bspt.Leaf",["J.bspt.Node"],function(){var b=s(function(){this.tuples=null;r(this,arguments)},J.bspt,"Leaf",J.bspt.Element);u(b,function(a,d,h){this.bspt=a;this.count=0;this.tuples=Array(2);if(null!=d){for(a=h;2>a;++a)this.tuples[this.count++]=d.tuples[a],d.tuples[a]=null;d.count=h}},"J.bspt.Bspt,J.bspt.Leaf,~N");c(b,"sort",function(a){for(var d=this.count;0<--d;)for(var h=this.tuples[d],b=J.bspt.Node.getDimensionValue(h,a),c=d;0<=--c;){var g=
this.tuples[c],j=J.bspt.Node.getDimensionValue(g,a);j>b&&(this.tuples[d]=g,this.tuples[c]=h,h=g,b=j)}},"~N");f(b,"addTuple",function(a,d){return 2>this.count?(this.tuples[this.count++]=d,this):(new J.bspt.Node(this.bspt,a,this)).addTuple(a,d)},"~N,JU.T3")});m("J.bspt");x(["J.bspt.Element"],"J.bspt.Node",["J.bspt.Leaf"],function(){var b=s(function(){this.maxLeft=this.minLeft=this.dim=0;this.eleLeft=null;this.maxRight=this.minRight=0;this.eleRight=null;r(this,arguments)},J.bspt,"Node",J.bspt.Element);
u(b,function(a,d,h){this.bspt=a;d==a.treeDepth&&(a.treeDepth=d+1);if(2!=h.count)throw new NullPointerException;this.dim=d%a.dimMax;h.sort(this.dim);a=new J.bspt.Leaf(a,h,1);this.minLeft=J.bspt.Node.getDimensionValue(h.tuples[0],this.dim);this.maxLeft=J.bspt.Node.getDimensionValue(h.tuples[h.count-1],this.dim);this.minRight=J.bspt.Node.getDimensionValue(a.tuples[0],this.dim);this.maxRight=J.bspt.Node.getDimensionValue(a.tuples[a.count-1],this.dim);this.eleLeft=h;this.eleRight=a;this.count=2},"J.bspt.Bspt,~N,J.bspt.Leaf");
c(b,"addTuple",function(a,d){var h=J.bspt.Node.getDimensionValue(d,this.dim);++this.count;h<this.maxLeft||(h>this.minRight?0:h==this.maxLeft?h==this.minRight?this.eleLeft.count<this.eleRight.count:1:h==this.minRight?0:this.eleLeft.count<this.eleRight.count)?(h<this.minLeft?this.minLeft=h:h>this.maxLeft&&(this.maxLeft=h),this.eleLeft=this.eleLeft.addTuple(a+1,d)):(h<this.minRight?this.minRight=h:h>this.maxRight&&(this.maxRight=h),this.eleRight=this.eleRight.addTuple(a+1,d));return this},"~N,JU.T3");
b.getDimensionValue=c(b,"getDimensionValue",function(a,d){null==a&&System.out.println("bspt.Node ???");switch(d){case 0:return a.x;case 1:return a.y;default:return a.z}},"JU.T3,~N")});m("J.c");x(["java.lang.Enum"],"J.c.CBK",["JU.SB"],function(){var b=G(J.c,"CBK",Enum);b.getCallback=c(b,"getCallback",function(a){a=a.toUpperCase();var d=a.indexOf("CALLBACK");0<d&&(a=a.substring(0,d));for(var h,d=0,b=J.c.CBK.values();d<b.length&&((h=b[d])||1);d++)if(h.name().equalsIgnoreCase(a))return h;return null},
"~S");b.getNameList=c(b,"getNameList",function(){if(null==J.c.CBK.nameList){for(var a=new JU.SB,d,h=0,b=J.c.CBK.values();h<b.length&&((d=b[h])||1);h++)a.append(d.name().toLowerCase()).append("Callback;");J.c.CBK.nameList=a.toString()}return J.c.CBK.nameList});b.nameList=null;A(b,"ANIMFRAME",0,[]);A(b,"APPLETREADY",1,[]);A(b,"ATOMMOVED",2,[]);A(b,"AUDIO",3,[]);A(b,"CALCULATION",4,[]);A(b,"CLICK",5,[]);A(b,"DRAGDROP",6,[]);A(b,"ECHO",7,[]);A(b,"ERROR",8,[]);A(b,"EVAL",9,[]);A(b,"HOVER",10,[]);A(b,"IMAGE",
11,[]);A(b,"LOADSTRUCT",12,[]);A(b,"MEASURE",13,[]);A(b,"MESSAGE",14,[]);A(b,"MINIMIZATION",15,[]);A(b,"MODELKIT",16,[]);A(b,"PICK",17,[]);A(b,"RESIZE",18,[]);A(b,"SCRIPT",19,[]);A(b,"SELECT",20,[]);A(b,"SERVICE",21,[]);A(b,"STRUCTUREMODIFIED",22,[]);A(b,"SYNC",23,[])});m("J.c");x(["java.lang.Enum"],"J.c.FIL",null,function(){var b=s(function(){this.code=0;r(this,arguments)},J.c,"FIL",Enum);c(b,"getCode",function(){return this.code});u(b,function(a){this.code=a},"~N");A(b,"DELETED",0,[5]);A(b,"CREATED",
1,[3]);A(b,"CREATING_MODELSET",2,[2]);A(b,"ZAPPED",3,[0]);A(b,"NOT_LOADED",4,[-1])});m("J.c");x(["java.lang.Enum"],"J.c.PAL",null,function(){var b=s(function(){this.$$name=null;this.id=0;r(this,arguments)},J.c,"PAL",Enum);u(b,function(a,d){this.$$name=a;this.id=d},"~S,~N");b.pidOf=c(b,"pidOf",function(a){return C(a,"J.c.PAL")?a.id:C(a,Byte)?a.byteValue():J.c.PAL.UNKNOWN.id},"~O");b.isPaletteVariable=c(b,"isPaletteVariable",function(a){return 0!=(a&64)},"~N");b.getPalette=c(b,"getPalette",function(a){if(0>
a.indexOf("_"))for(var d,h=0,b=J.c.PAL.values();h<b.length&&((d=b[h])||1);h++)if(a.equalsIgnoreCase(d.$$name))return d;return 0==a.indexOf("property_")?J.c.PAL.PROPERTY:J.c.PAL.UNKNOWN},"~S");b.getPaletteID=c(b,"getPaletteID",function(a){if(0>a.indexOf("_"))for(var d,h=0,b=J.c.PAL.values();h<b.length&&((d=b[h])||1);h++)if(a.equalsIgnoreCase(d.$$name))return d.id;return 0==a.indexOf("property_")?J.c.PAL.PROPERTY.id:J.c.PAL.UNKNOWN.id},"~S");b.getPaletteName=c(b,"getPaletteName",function(a){for(var d,
h=0,b=J.c.PAL.values();h<b.length&&((d=b[h])||1);h++)if(d.id==a)return d.$$name;return null},"~N");b.PALETTE_VOLATILE=64;b.PALETTE_NONE=0;b.PALETTE_CPK=1;b.PALETTE_PARTIAL_CHARGE=2;b.PALETTE_FORMAL_CHARGE=3;b.PALETTE_TEMP=68;b.PALETTE_FIXEDTEMP=5;b.PALETTE_SURFACE=70;b.PALETTE_STRUCTURE=7;b.PALETTE_DSSR_BASEPAIR=8;b.PALETTE_AMINO=9;b.PALETTE_SHAPELY=10;b.PALETTE_CHAIN=11;b.PALETTE_GROUP=76;b.PALETTE_MONOMER=77;b.PALETTE_MOLECULE=78;b.PALETTE_ALTLOC=15;b.PALETTE_INSERTION=16;b.PALETTE_JMOL=17;b.PALETTE_RASMOL=
18;b.PALETTE_TYPE=19;b.PALETTE_ENERGY=20;b.PALETTE_PROPERTY=85;b.PALETTE_VARIABLE=86;b.PALETTE_STRAIGHTNESS=87;b.PALETTE_POLYMER=88;b.PALETTE_NUCLEIC=25;b.argbsCpkRasmol=D(-1,[16716947,33554431,50315467,62005794,83951360,113821896,126849023,149946368,165324064,184549631,203590434,226525328,249210144,268412160,285198386,285277952,343965840,377520272,411074704,427851920,452961536,480586282,497363498,514140714,598026794,796950672,899686640,956278016,1339729184]);b.argbsCpk=D(-1,[4294907027,4294967295,
4292476927,4291592447,4290969344,4294948277,4287664272,4281356536,4294905101,4287684688,4289979381,4289420530,4287299328,4290750118,4293970080,4294934528,4294967088,4280283167,4286632419,4287578324,4282253056,4293322470,4290757319,4289111723,4287273415,4288445127,4292896307,4293955744,4283486288,4291330099,4286415024,4290940815,4284911503,4290609379,4294942976,4289079593,4284266705,4285542064,4278255360,4287954943,4287946976,4285776585,4283741621,4282097310,4280586127,4278877580,4278217093,4290822336,
4294957455,4289099123,4284907648,4288570293,4292114944,4287889556,4282556080,4283897743,4278241536,4285584639,4294967239,4292476871,4291297223,4288937927,4287627207,4284612551,4282777543,4281401287,4280287175,4278255516,4278249077,4278244434,4278239032,4278233892,4283286271,4283279103,4280390870,4280712619,4280706710,4279719047,4291875040,4294955299,4290296016,4289090637,4283914593,4288565173,4289420288,4285878085,4282548886,4282515558,4278222080,4285574138,4278237951,4278231551,4278226943,4278223103,
4278217727,4283718898,4286078179,4287254499,4288755412,4289929172,4289929146,4289924518,4290579847,4291231846,4291559513,4291887183,4292411461,4292870200,4293263406,4293591078]);A(b,"UNKNOWN",0,[null,255]);A(b,"NONE",1,["none",0]);A(b,"CPK",2,["cpk",1]);A(b,"PARTIAL_CHARGE",3,["partialcharge",2]);A(b,"FORMAL_CHARGE",4,["formalcharge",3]);A(b,"TEMP",5,["temperature",68]);A(b,"FIXEDTEMP",6,["fixedtemperature",5]);A(b,"SURFACE",7,["surfacedistance",70]);A(b,"STRUCTURE",8,["structure",7]);A(b,"DSSR_BASEPAIR",
9,["basepairtype",8]);A(b,"AMINO",10,["amino",9]);A(b,"SHAPELY",11,["shapely",10]);A(b,"CHAIN",12,["chain",11]);A(b,"GROUP",13,["group",76]);A(b,"MONOMER",14,["monomer",77]);A(b,"MOLECULE",15,["molecule",78]);A(b,"ALTLOC",16,["altloc",15]);A(b,"INSERTION",17,["insertion",16]);A(b,"JMOL",18,["jmol",17]);A(b,"RASMOL",19,["rasmol",18]);A(b,"TYPE",20,["type",19]);A(b,"ENERGY",21,["energy",20]);A(b,"PROPERTY",22,["property",85]);A(b,"VARIABLE",23,["variable",86]);A(b,"STRAIGHTNESS",24,["straightness",
87]);A(b,"POLYMER",25,["polymer",88]);A(b,"NUCLEIC",26,["nucleic",25])});m("J.c");x(["java.lang.Enum"],"J.c.STER",null,function(){var b=s(function(){this.$$name=null;this.$isBiColor=!1;r(this,arguments)},J.c,"STER",Enum);u(b,function(a,d){this.$$name=a;this.$isBiColor=d},"~S,~B");c(b,"getName",function(){return this.$$name});c(b,"isBiColor",function(){return this.$isBiColor});b.getStereoMode=c(b,"getStereoMode",function(a){for(var d,h=0,b=J.c.STER.values();h<b.length&&((d=b[h])||1);h++)if(d.$$name.equalsIgnoreCase(a))return d;
return null},"~S");A(b,"NONE",0,["OFF",!1]);A(b,"DOUBLE",1,["",!1]);A(b,"REDCYAN",2,["REDCYAN",!0]);A(b,"REDBLUE",3,["REDBLUE",!0]);A(b,"REDGREEN",4,["REDGREEN",!0]);A(b,"DTI",5,["DTI",!1]);A(b,"CUSTOM",6,["",!0])});m("J.c");x(["java.lang.Enum"],"J.c.STR",null,function(){var b=s(function(){this.color=this.id=0;r(this,arguments)},J.c,"STR",Enum);u(b,function(a,d){this.id=a;this.color=d},"~N,~N");c(b,"getId",function(){return this.id});c(b,"getColor",function(){return this.color});b.getProteinStructureType=
c(b,"getProteinStructureType",function(a){for(var d,h=0,b=J.c.STR.values();h<b.length&&((d=b[h])||1);h++)if(a.equalsIgnoreCase(d.name()))return d.isProtein()?d:J.c.STR.NOT;return J.c.STR.NOT},"~S");c(b,"getBioStructureTypeName",function(a){return 0>this.id?"":a&&this.isProtein()?"protein":this.name()},"~B");c(b,"isProtein",function(){return 0<=this.id&&3>=this.id||7<=this.id});A(b,"NOT",0,[-1,4286611584]);A(b,"NONE",1,[0,4294967295]);A(b,"TURN",2,[1,4284514559]);A(b,"SHEET",3,[2,4294952960]);A(b,
"HELIX",4,[3,4294901888]);A(b,"DNA",5,[4,4289593598]);A(b,"RNA",6,[5,4294771042]);A(b,"CARBOHYDRATE",7,[6,4289111802]);A(b,"HELIX310",8,[7,4288675968]);A(b,"HELIXALPHA",9,[8,4294901888]);A(b,"HELIXPI",10,[9,4284481664]);A(b,"DSSRINTERNALLOOP",11,[10,13676784]);A(b,"DSSRHAIRPINLOOP",12,[11,41200]);A(b,"DSSRBULGELOOP",13,[12,61680]);A(b,"DSSRJUNCTIONLOOP",14,[13,10526960]);A(b,"DSSRSTEM",15,[14,16776960]);A(b,"ANNOTATION",16,[-2,0])});m("J.c");x(["java.lang.Enum"],"J.c.VDW",null,function(){var b=s(function(){this.pt=
0;this.type2=this.type=null;r(this,arguments)},J.c,"VDW",Enum);u(b,function(a,d,h){this.pt=a;this.type=d;this.type2=h},"~N,~S,~S");c(b,"getVdwLabel",function(){return null==this.type?this.type2:this.type});b.getVdwType=c(b,"getVdwType",function(a){if(null!=a)for(var d,h=0,b=J.c.VDW.values();h<b.length&&((d=b[h])||1);h++)if(a.equalsIgnoreCase(d.type))return d;return null},"~S");b.getVdwType2=c(b,"getVdwType2",function(a){if(null!=a)for(var d,h=0,b=J.c.VDW.values();h<b.length&&((d=b[h])||1);h++)if(a.equalsIgnoreCase(d.type2))return d;
return null},"~S");A(b,"JMOL",0,[0,"Jmol",null]);A(b,"BABEL",1,[1,"Babel",null]);A(b,"RASMOL",2,[2,"RasMol",null]);A(b,"BABEL21",3,[3,"Babel21",null]);A(b,"AUTO_JMOL",4,[0,null,"Jmol"]);A(b,"AUTO_BABEL",5,[1,null,"Babel"]);A(b,"AUTO_RASMOL",6,[2,null,"RasMol"]);A(b,"AUTO",7,[0,"Auto",null]);A(b,"USER",8,[-1,"User",null]);A(b,"ADPMAX",9,[-1,null,"adpmax"]);A(b,"ADPMIN",10,[-1,null,"adpmin"]);A(b,"HYDRO",11,[-1,null,"hydrophobic"]);A(b,"BONDING",12,[-1,null,"bondingradius"]);A(b,"TEMP",13,[-1,null,
"temperature"]);A(b,"NOJMOL",14,[-1,null,null]);A(b,"NADA",15,[-1,null,null])});m("J.g3d");x(["JU.P3i"],"J.g3d.CylinderRenderer",["JU.AU","$.P3"],function(){var b=s(function(){this.shader=this.line3d=this.g3d=null;this.colixB=this.colixA=0;this.shadesB=this.shadesA=null;this.dzBf=this.dyBf=this.dxBf=this.zAf=this.yAf=this.xAf=this.dzB=this.dyB=this.dxB=this.zAend=this.yAend=this.xAend=this.zA=this.yA=this.xA=0;this.tEvenDiameter=!1;this.endcaps=this.diameter=0;this.endCapHidden=!1;this.sinPhi=this.cosPhi=
this.cosTheta=this.radius2=this.radius=this.endcapShadeIndex=this.colixEndcap=this.argbEndcap=this.zEndcap=this.yEndcap=this.xEndcap=0;this.clipped=!1;this.rasterCount=0;this.ptB0i=this.ptA0i=this.ptB0=this.ptA0=this.xyzfRaster=this.xyztRaster=null;this.zTip=this.yTip=this.xTip=0;r(this,arguments)},J.g3d,"CylinderRenderer",null);N(b,function(){this.xyztRaster=z(-1,[M(32,0),M(32,0),M(32,0),M(32,0)]);this.xyzfRaster=z(-1,[D(32,0),D(32,0),D(32,0),D(32,0)]);this.ptA0i=new JU.P3i;this.ptB0i=new JU.P3i});
u(b,function(a){this.g3d=a;this.line3d=a.line3d;this.shader=a.shader},"J.g3d.Graphics3D");c(b,"renderOld",function(a,d,h,b,c,g,j,k,l,f,n){var q=w(c/2)+1,v=this.g3d,B=v.clipCode3(g-q,j-q,k-q),H=v.clipCode3(g+q,j+q,k+q),L=v.clipCode3(l-q,f-q,n-q),q=v.clipCode3(l+q,f+q,n+q),m=B|H|L|q;this.clipped=0!=m;if(!(-1==m||0!=(B&q&H&L)))if(this.dxB=l-g,this.dyB=f-j,this.dzB=n-k,1>=c)this.line3d.plotLineDeltaOld(v.getColorArgbOrGray(a),v.getColorArgbOrGray(d),g,j,k,this.dxB,this.dyB,this.dzB,this.clipped);else{l=
0==h&&(this.clipped||2==b||0==b);this.diameter=c;this.xA=g;this.yA=j;this.zA=k;this.endcaps=b;this.shadesA=v.getShades(this.colixA=a);this.shadesB=v.getShades(this.colixB=d);this.calcArgbEndcap(!0,!1);this.calcCosSin(this.dxB,this.dyB,this.dzB);this.calcPoints(3,!1);this.interpolate(0,1,this.xyzfRaster,this.xyztRaster);this.interpolate(1,2,this.xyzfRaster,this.xyztRaster);k=this.xyzfRaster;2==b&&this.renderFlatEndcap(!0,!1,k);v.setZMargin(5);a=v.width;d=v.zbuf;c=k[0];g=k[1];j=k[2];k=k[3];f=v.pixel;
for(n=this.rasterCount;0<=--n;)B=k[n]>>8,H=B>>1,L=c[n],q=g[n],m=j[n],this.endCapHidden&&0!=this.argbEndcap&&(this.clipped?(v.plotPixelClippedArgb(this.argbEndcap,this.xEndcap+L,this.yEndcap+q,this.zEndcap-m-1,a,d,f),v.plotPixelClippedArgb(this.argbEndcap,this.xEndcap-L,this.yEndcap-q,this.zEndcap+m-1,a,d,f)):(v.plotPixelUnclipped(this.argbEndcap,this.xEndcap+L,this.yEndcap+q,this.zEndcap-m-1,a,d,f),v.plotPixelUnclipped(this.argbEndcap,this.xEndcap-L,this.yEndcap-q,this.zEndcap+m-1,a,d,f))),this.line3d.plotLineDeltaAOld(this.shadesA,
this.shadesB,h,B,this.xA+L,this.yA+q,this.zA-m,this.dxB,this.dyB,this.dzB,this.clipped),l&&this.line3d.plotLineDeltaOld(this.shadesA[H],this.shadesB[H],this.xA-L,this.yA-q,this.zA+m,this.dxB,this.dyB,this.dzB,this.clipped);v.setZMargin(0);3==b&&this.renderSphericalEndcaps()}},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");c(b,"renderBitsFloat",function(a,d,h,b,c,g,j){var k=this.g3d;null==this.ptA0&&(this.ptA0=new JU.P3,this.ptB0=new JU.P3);this.ptA0.setT(g);var l=w(c/2)+1,f=Math.round(g.x),n=Math.round(g.y),
q=Math.round(g.z),v=Math.round(j.x),B=Math.round(j.y),H=Math.round(j.z),L=k.clipCode3(f-l,n-l,q-l),f=k.clipCode3(f+l,n+l,q+l),n=k.clipCode3(v-l,B-l,H-l),l=k.clipCode3(v+l,B+l,H+l),v=L|f|n|l;this.clipped=0!=v;if(!(-1==v||0!=(L&l&f&n))){this.dxBf=j.x-g.x;this.dyBf=j.y-g.y;this.dzBf=j.z-g.z;0<c&&(this.diameter=c,this.xAf=g.x,this.yAf=g.y,this.zAf=g.z);g=0==h&&(this.clipped||2==b||0==b);this.xA=F(this.xAf);this.yA=F(this.yAf);this.zA=F(this.zAf);this.dxB=F(this.dxBf);this.dyB=F(this.dyBf);this.dzB=F(this.dzBf);
this.shadesA=k.getShades(this.colixA=a);this.shadesB=k.getShades(this.colixB=d);this.endcaps=b;this.calcArgbEndcap(!0,!0);v=this.xyzfRaster;0<c&&this.generateBaseEllipsePrecisely(!1);2==b&&this.renderFlatEndcap(!0,!0,v);this.line3d.setLineBits(this.dxBf,this.dyBf);k.setZMargin(5);c=k.pixel;a=k.width;d=k.zbuf;j=v[0];L=v[1];l=v[2];v=v[3];for(B=this.rasterCount;0<=--B;){var H=v[B]>>8,f=H>>1,n=j[B],q=L[B],m=l[B];this.endCapHidden&&0!=this.argbEndcap&&(this.clipped?(k.plotPixelClippedArgb(this.argbEndcap,
this.xEndcap+n,this.yEndcap+q,this.zEndcap-m-1,a,d,c),k.plotPixelClippedArgb(this.argbEndcap,this.xEndcap-n,this.yEndcap-q,this.zEndcap+m-1,a,d,c)):(k.plotPixelUnclipped(this.argbEndcap,this.xEndcap+n,this.yEndcap+q,this.zEndcap-m-1,a,d,c),k.plotPixelUnclipped(this.argbEndcap,this.xEndcap-n,this.yEndcap-q,this.zEndcap+m-1,a,d,c)));this.ptA0.set(this.xA+n,this.yA+q,this.zA-m);this.ptB0.setT(this.ptA0);this.ptB0.x+=this.dxB;this.ptB0.y+=this.dyB;this.ptB0.z+=this.dzB;this.line3d.plotLineDeltaABitsFloat(this.shadesA,
this.shadesB,H,this.ptA0,this.ptB0,h,this.clipped);g&&(this.ptA0.set(this.xA-n,this.yA-q,this.zA+m),this.ptB0.setT(this.ptA0),this.ptB0.x+=this.dxB,this.ptB0.y+=this.dyB,this.ptB0.z+=this.dzB,this.line3d.plotLineDeltaABitsFloat(this.shadesA,this.shadesB,f,this.ptA0,this.ptB0,h,this.clipped))}k.setZMargin(0);3==b&&this.renderSphericalEndcaps();this.xAf+=this.dxBf;this.yAf+=this.dyBf;this.zAf+=this.dzBf}},"~N,~N,~N,~N,~N,JU.P3,JU.P3");c(b,"renderBits",function(a,d,h,b,c,g,j){var k=this.g3d;if(0==c||
1==c)this.line3d.plotLineBits(k.getColorArgbOrGray(a),k.getColorArgbOrGray(d),g,j,0,0,!1);else{this.ptA0i.setT(g);var l=w(c/2)+1,f=g.x,n=g.y,q=g.z,v=j.x,B=j.y,H=j.z,L=k.clipCode3(f-l,n-l,q-l),f=k.clipCode3(f+l,n+l,q+l),n=k.clipCode3(v-l,B-l,H-l),l=k.clipCode3(v+l,B+l,H+l),v=L|f|n|l;this.clipped=0!=v;if(!(-1==v||0!=(L&l&f&n))){this.dxBf=j.x-g.x;this.dyBf=j.y-g.y;this.dzBf=j.z-g.z;0<c&&(this.diameter=c,this.xAf=g.x,this.yAf=g.y,this.zAf=g.z);g=0==h&&(this.clipped||2==b||0==b);this.xA=F(this.xAf);this.yA=
F(this.yAf);this.zA=F(this.zAf);this.dxB=F(this.dxBf);this.dyB=F(this.dyBf);this.dzB=F(this.dzBf);this.shadesA=k.getShades(this.colixA=a);this.shadesB=k.getShades(this.colixB=d);this.endcaps=b;this.calcArgbEndcap(!0,!0);v=this.xyzfRaster;0<c&&this.generateBaseEllipsePrecisely(!1);2==b&&this.renderFlatEndcap(!0,!0,v);this.line3d.setLineBits(this.dxBf,this.dyBf);k.setZMargin(5);c=k.pixel;a=k.width;d=k.zbuf;j=v[0];L=v[1];l=v[2];v=v[3];for(B=this.rasterCount;0<=--B;){var H=v[B]>>8,f=H>>1,n=j[B],q=L[B],
m=l[B];this.endCapHidden&&0!=this.argbEndcap&&(this.clipped?(k.plotPixelClippedArgb(this.argbEndcap,this.xEndcap+n,this.yEndcap+q,this.zEndcap-m-1,a,d,c),k.plotPixelClippedArgb(this.argbEndcap,this.xEndcap-n,this.yEndcap-q,this.zEndcap+m-1,a,d,c)):(k.plotPixelUnclipped(this.argbEndcap,this.xEndcap+n,this.yEndcap+q,this.zEndcap-m-1,a,d,c),k.plotPixelUnclipped(this.argbEndcap,this.xEndcap-n,this.yEndcap-q,this.zEndcap+m-1,a,d,c)));this.ptA0i.set(this.xA+n,this.yA+q,this.zA-m);this.ptB0i.setT(this.ptA0i);
this.ptB0i.x+=this.dxB;this.ptB0i.y+=this.dyB;this.ptB0i.z+=this.dzB;this.line3d.plotLineDeltaABitsInt(this.shadesA,this.shadesB,H,this.ptA0i,this.ptB0i,h,this.clipped);g&&(this.ptA0i.set(this.xA-n,this.yA-q,this.zA+m),this.ptB0i.setT(this.ptA0i),this.ptB0i.x+=this.dxB,this.ptB0i.y+=this.dyB,this.ptB0i.z+=this.dzB,this.line3d.plotLineDeltaABitsInt(this.shadesA,this.shadesB,f,this.ptA0i,this.ptB0i,h,this.clipped))}k.setZMargin(0);3==b&&this.renderSphericalEndcaps();this.xAf+=this.dxBf;this.yAf+=this.dyBf;
this.zAf+=this.dzBf}}},"~N,~N,~N,~N,~N,JU.P3i,JU.P3i");c(b,"renderConeOld",function(a,d,h,b,c,g,j,k,l,f,n){this.dxBf=j-(this.xAf=b);this.dyBf=k-(this.yAf=c);this.dzBf=l-(this.zAf=g);this.xA=w(Math.floor(this.xAf));this.yA=w(Math.floor(this.yAf));this.zA=w(Math.floor(this.zAf));this.dxB=w(Math.floor(this.dxBf));this.dyB=w(Math.floor(this.dyBf));this.dzB=w(Math.floor(this.dzBf));this.xTip=j;this.yTip=k;this.zTip=l;this.shadesA=this.g3d.getShades(this.colixA=a);var q=this.shader.getShadeIndex(this.dxB,
this.dyB,-this.dzB);a=this.g3d;b=a.pixel;c=a.width;g=a.zbuf;a.plotPixelClippedArgb(this.shadesA[q],F(j),F(k),F(l),c,g,b);this.diameter=h;if(1>=h)1==h&&this.line3d.plotLineDeltaOld(this.colixA,this.colixA,this.xA,this.yA,this.zA,this.dxB,this.dyB,this.dzB,this.clipped);else{this.endcaps=d;this.calcArgbEndcap(!1,!0);this.generateBaseEllipsePrecisely(n);!n&&2==this.endcaps&&this.renderFlatEndcap(!1,!0,this.xyzfRaster);a.setZMargin(5);d=this.xyztRaster[0];h=this.xyztRaster[1];j=this.xyztRaster[2];k=this.xyzfRaster[3];
l=this.shadesA;for(var q=this.endCapHidden&&0!=this.argbEndcap,v=this.rasterCount;0<=--v;){var B=d[v],H=h[v],L=j[v],m=k[v]>>8,r=this.xAf+B,s=this.yAf+H,u=this.zAf-L,B=this.xAf-B,H=this.yAf-H,L=this.zAf+L,z=l[0];q&&(a.plotPixelClippedArgb(this.argbEndcap,F(r),F(s),F(u),c,g,b),a.plotPixelClippedArgb(this.argbEndcap,F(B),F(H),F(L),c,g,b));0!=z&&(this.line3d.plotLineDeltaAOld(l,l,0,m,F(r),F(s),F(u),w(Math.ceil(this.xTip-r)),w(Math.ceil(this.yTip-s)),w(Math.ceil(this.zTip-u)),!0),f&&(this.line3d.plotLineDeltaAOld(l,
l,0,m,F(r),F(s)+1,F(u),w(Math.ceil(this.xTip-r)),w(Math.ceil(this.yTip-s))+1,w(Math.ceil(this.zTip-u)),!0),this.line3d.plotLineDeltaAOld(l,l,0,m,F(r)+1,F(s),F(u),w(Math.ceil(this.xTip-r))+1,w(Math.ceil(this.yTip-s)),w(Math.ceil(this.zTip-u)),!0)),!n&&!(2!=this.endcaps&&0<this.dzB)&&this.line3d.plotLineDeltaOld(z,z,F(B),F(H),F(L),w(Math.ceil(this.xTip-B)),w(Math.ceil(this.yTip-H)),w(Math.ceil(this.zTip-L)),!0))}a.setZMargin(0)}},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~B,~B");c(b,"generateBaseEllipsePrecisely",
function(a){this.calcCosSin(this.dxBf,this.dyBf,this.dzBf);this.calcPoints(a?2:3,!0);this.interpolatePrecisely(0,1,this.xyzfRaster,this.xyztRaster);a||this.interpolatePrecisely(1,2,this.xyzfRaster,this.xyztRaster);for(a=3;0<=--a;)for(var d=this.rasterCount;0<=--d;)this.xyzfRaster[a][d]=w(Math.floor(this.xyztRaster[a][d]))},"~B");c(b,"calcPoints",function(a,d){this.calcRotatedPoint(0,0,d,this.xyzfRaster,this.xyztRaster);this.calcRotatedPoint(0.5,1,d,this.xyzfRaster,this.xyztRaster);3==(this.rasterCount=
a)&&this.calcRotatedPoint(1,2,d,this.xyzfRaster,this.xyztRaster)},"~N,~B");c(b,"calcCosSin",function(a,d,h){var b=a*a+d*d;if(0==b)this.cosPhi=this.cosTheta=1,this.sinPhi=0;else{var c=Math.sqrt(b),b=Math.sqrt(b+h*h);this.cosTheta=h/b;this.cosPhi=a/c;this.sinPhi=d/c}},"~N,~N,~N");c(b,"calcRotatedPoint",function(a,d,h,b,c){c[3][d]=a;a*=3.141592653589793;var g=Math.sin(a)*this.cosTheta,j=Math.cos(a);a=this.radius*(g*this.cosPhi-j*this.sinPhi);g=this.radius*(g*this.sinPhi+j*this.cosPhi);j=this.radius2-
(a*a+g*g);j=0<j?Math.sqrt(j):0;h?(c[0][d]=a,c[1][d]=g,c[2][d]=j):(this.tEvenDiameter?(b[0][d]=w(a-0.5),b[1][d]=w(g-0.5)):(b[0][d]=w(a),b[1][d]=w(g)),b[2][d]=w(j+0.5));b[3][d]=this.shader.getShadeFp8(a,g,j)},"~N,~N,~B,~A,~A");c(b,"allocRaster",function(a,d,h){if(this.rasterCount>=d[0].length)for(;this.rasterCount>=d[0].length;){for(var b=4;0<=--b;)d[b]=JU.AU.doubleLengthI(d[b]);h[3]=JU.AU.doubleLengthF(h[3])}if(a)for(;this.rasterCount>=h[0].length;)for(b=3;0<=--b;)h[b]=JU.AU.doubleLengthF(h[b]);return this.rasterCount++},
"~B,~A,~A");c(b,"interpolate",function(a,d,h,b){var c=h[0],g=h[1],c=c[d]-c[a];0>c&&(c=-c);g=g[d]-g[a];0>g&&(g=-g);if(!(1>=c+g)){for(var j=this.allocRaster(!1,h,b),c=h[0],g=h[1],k=h[3],l=b[3][a],f=b[3][d],n=4;0<=--n;){var q=(l+f)/2;this.calcRotatedPoint(q,j,!1,h,b);if(c[j]==c[a]&&g[j]==g[a])k[a]=k[a]+k[j]>>>1,l=q;else if(c[j]==c[d]&&g[j]==g[d])k[d]=k[d]+k[j]>>>1,f=q;else{this.interpolate(a,j,h,b);this.interpolate(j,d,h,b);return}}c[j]=c[a];g[j]=g[d]}},"~N,~N,~A,~A");c(b,"interpolatePrecisely",function(a,
d,h,b){var c=b[0],g=b[1],j=w(Math.floor(c[d]))-w(Math.floor(c[a]));0>j&&(j=-j);g=w(Math.floor(g[d]))-w(Math.floor(g[a]));0>g&&(g=-g);if(!(1>=j+g)){for(var g=b[3],j=g[a],k=g[d],l=this.allocRaster(!0,h,b),c=b[0],g=b[1],f=h[3],n=4;0<=--n;){var q=(j+k)/2;this.calcRotatedPoint(q,l,!0,h,b);if(w(Math.floor(c[l]))==w(Math.floor(c[a]))&&w(Math.floor(g[l]))==w(Math.floor(g[a])))f[a]=f[a]+f[l]>>>1,j=q;else if(w(Math.floor(c[l]))==w(Math.floor(c[d]))&&w(Math.floor(g[l]))==w(Math.floor(g[d])))f[d]=f[d]+f[l]>>>
1,k=q;else{this.interpolatePrecisely(a,l,h,b);this.interpolatePrecisely(l,d,h,b);return}}c[l]=c[a];g[l]=g[d]}},"~N,~N,~A,~A");c(b,"renderFlatEndcap",function(a,d,h){var b,c;if(d){if(0==this.dzBf||0==this.colixEndcap||!this.g3d.setC(this.colixEndcap))return;d=this.xAf;b=this.yAf;c=this.zAf;a&&0>this.dzBf&&(d+=this.dxBf,b+=this.dyBf,c+=this.dzBf);d=F(d);b=F(b);c=F(c)}else{if(0==this.dzB||0==this.colixEndcap||!this.g3d.setC(this.colixEndcap))return;d=this.xAend;b=this.yAend;c=this.zAend;a&&0>this.dzB&&
(d+=this.dxB,b+=this.dyB,c+=this.dzB)}var g=h[1][0];a=h[1][0];var j=0,k=0,l=h[0],f=h[1];h=h[2];for(var n=this.rasterCount;0<--n;){var q=f[n];q<g?g=q:q>a?a=q:(q=-q,q<g?g=q:q>a&&(a=q))}for(q=g;q<=a;++q){for(var g=2147483647,v=-2147483648,n=this.rasterCount;0<=--n;){if(f[n]==q){var B=l[n];B<g&&(g=B,j=h[n]);B>v&&(v=B,k=h[n])}f[n]==-q&&(B=-l[n],B<g&&(g=B,j=-h[n]),B>v&&(v=B,k=-h[n]))}n=v-g+1;this.g3d.setColorNoisy(this.endcapShadeIndex);this.g3d.plotPixelsClippedRaster(n,d+g,b+q,c-j-1,c-k-1,null,null)}},
"~B,~B,~A");c(b,"renderSphericalEndcaps",function(){0!=this.colixA&&this.g3d.setC(this.colixA)&&this.g3d.fillSphereXYZ(this.diameter,this.xA,this.yA,this.zA+1);0!=this.colixB&&this.g3d.setC(this.colixB)&&this.g3d.fillSphereXYZ(this.diameter,this.xA+this.dxB,this.yA+this.dyB,this.zA+this.dzB+1)});c(b,"calcArgbEndcap",function(a,d){this.tEvenDiameter=0==(this.diameter&1);this.radius=this.diameter/2;this.radius2=this.radius*this.radius;this.endCapHidden=!1;var h=d?this.dzBf:this.dzB;if(!(3==this.endcaps||
0==h)){this.xEndcap=this.xAend=this.xA;this.yEndcap=this.yAend=this.yA;this.zEndcap=this.zAend=this.zA;var b=d?this.dxBf:this.dxB,c=d?this.dyBf:this.dyB;0<=h||!a?(this.endcapShadeIndex=this.shader.getShadeIndex(-b,-c,h),0==this.colixA?(this.xAend+=w(this.dxB/2),this.yAend+=w(this.dyB/2),this.zAend+=w(this.dzB/2),this.colixEndcap=this.colixB):this.colixEndcap=this.colixA):(this.endcapShadeIndex=this.shader.getShadeIndex(b,c,-h),0==this.colixB?(this.colixEndcap=this.colixA,this.xAend-=w(this.dxB/2),
this.yAend-=w(this.dyB/2),this.zAend-=w(this.dzB/2)):(this.colixEndcap=this.colixB,this.xEndcap+=this.dxB,this.yEndcap+=this.dyB,this.zEndcap+=this.dzB));h=this.colixEndcap==this.colixA?this.shadesA:this.shadesB;56<this.endcapShadeIndex&&(this.endcapShadeIndex=56);this.argbEndcap=h[this.endcapShadeIndex];this.endCapHidden=1==this.endcaps}},"~B,~B")});m("J.g3d");I(J.g3d,"G3DRenderer");m("J.g3d");x(["J.api.JmolRendererInterface","JU.GData","JU.P3i","$.V3"],"J.g3d.Graphics3D","java.util.Arrays JU.AU J.api.Interface J.c.STER J.g3d.CylinderRenderer $.LineRenderer $.Pixelator $.PixelatorScreened $.PixelatorShaded $.PixelatorT $.Platform3D $.SphereRenderer $.TextRenderer $.TextString JU.C $.Normix".split(" "),
function(){var b=s(function(){this.hermite3d=this.circle3d=this.triangle3d=this.cylinder3d=this.sphere3d=this.line3d=this.platform=null;this.antialias2=this.isFullSceneAntialiasingEnabled=!1;this.strings=null;this.stringCount=0;this.anaglyphChannelBytes=null;this.$haveTranslucentObjects=this.twoPass=!1;this.zbufT=this.zbuf=this.pbufT=this.pbuf=null;this.translucencyMask=0;this.renderLow=!1;this.shadesCurrent=null;this.anaglyphLength=0;this.pixelShaded=this.pixelScreened=this.pixelT0=this.pixel0=this.pixel=
null;this.zMargin=0;this.aobuf=null;this.translucencyLog=this.lastRawColor=this.currentShadeIndex=0;this.wasScreened=!1;this.saveDiffuse=this.saveAmbient=0;this.shadeIndexes2Sided=this.shadeIndexes=this.vectorNormal=this.vectorAC=this.vectorAB=this.sC=this.sB=this.sA=null;this.pass2Flag01=0;r(this,arguments)},J.g3d,"Graphics3D",JU.GData,J.api.JmolRendererInterface);N(b,function(){this.sA=new JU.P3i;this.sB=new JU.P3i;this.sC=new JU.P3i;this.vectorAB=new JU.V3;this.vectorAC=new JU.V3;this.vectorNormal=
new JU.V3;this.shadeIndexes=O(JU.GData.normixCount,0);this.shadeIndexes2Sided=O(JU.GData.normixCount,0)});u(b,function(){K(this,J.g3d.Graphics3D,[]);for(var a=JU.GData.normixCount;0<=--a;)this.transformedVectors[a]=new JU.V3});f(b,"isWebGL",function(){return!1});f(b,"clear",function(){this.stringCount=0;this.strings=null;J.g3d.TextRenderer.clearFontCache()});f(b,"destroy",function(){this.releaseBuffers();this.graphicsForMetrics=this.pixelScreened=this.pixelT0=this.pixel=this.pixel0=this.pixelShaded=
this.platform=null});c(b,"setZMargin",function(a){this.zMargin=a},"~N");f(b,"initialize",function(a,d){this.vwr=a;this.apiPlatform=d;this.platform=new J.g3d.Platform3D(d);this.pixel=this.pixel0=new J.g3d.Pixelator(this);this.graphicsForMetrics=this.platform.getGraphicsForMetrics();this.line3d=new J.g3d.LineRenderer(this);this.sphere3d=new J.g3d.SphereRenderer(this);this.cylinder3d=new J.g3d.CylinderRenderer(this)},"JV.Viewer,J.api.GenericPlatform");f(b,"addRenderer",function(a){switch(a){case 1073741880:null==
this.circle3d&&(this.circle3d=this.getRenderer("Circle"));break;case 553648143:null==this.hermite3d&&(this.hermite3d=this.getRenderer("Hermite"));case 1073742182:null==this.triangle3d&&(this.triangle3d=this.getRenderer("Triangle"),this.triangle3d.isOrthographic=!this.vwr.tm.perspectiveDepth)}},"~N");c(b,"getRenderer",function(a){a=J.api.Interface.getOption("g3d."+a+"Renderer",this.vwr,"render");if(null==a)throw new NullPointerException("Interface");a.set(this,this);return a},"~S");f(b,"setWindowParameters",
function(a,d,h){this.setWinParams(a,d,h);this.currentlyRendering&&this.endRendering()},"~N,~N,~B");f(b,"checkTranslucent",function(a){a&&(this.$haveTranslucentObjects=!0);return!this.twoPass||this.twoPass&&this.isPass2==a},"~B");f(b,"beginRendering",function(a,d,h,b){this.currentlyRendering&&this.endRendering();this.renderLow=b;if(this.windowWidth!=this.newWindowWidth||this.windowHeight!=this.newWindowHeight||this.newAntialiasing!=this.isFullSceneAntialiasingEnabled)this.windowWidth=this.newWindowWidth,
this.windowHeight=this.newWindowHeight,this.isFullSceneAntialiasingEnabled=this.newAntialiasing,this.releaseBuffers();this.setRotationMatrix(a);this.line3d.isOrthographic=!this.vwr.tm.perspectiveDepth;null!=this.triangle3d&&(this.triangle3d.isOrthographic=!this.vwr.tm.perspectiveDepth);this.antialiasEnabled=this.antialiasThisFrame=this.newAntialiasing;this.currentlyRendering=!0;if(null!=this.strings)for(a=Math.min(this.strings.length,this.stringCount);0<=--a;)this.strings[a]=null;this.stringCount=
0;this.twoPass=!0;this.isPass2=!1;this.colixCurrent=this.pass2Flag01=0;this.$haveTranslucentObjects=this.wasScreened=!1;this.pixel=this.pixel0;this.pixel.bgcolor=this.bgcolor;this.contrastColix=JU.C.getBgContrast(this.bgcolor);this.translucentCoverOnly=!d;null==this.pbuf&&(this.platform.allocateBuffers(this.windowWidth,this.windowHeight,this.antialiasThisFrame,h),this.pbuf=this.platform.pBuffer,this.zbuf=this.platform.zBuffer,this.aobuf=null,this.pixel0.setBuf(),null!=this.pixelT0&&this.pixelT0.setBuf(),
null!=this.pixelShaded&&this.pixelShaded.setBuf());this.setWidthHeight(this.antialiasThisFrame);null!=this.pixelScreened&&(this.pixelScreened.width=this.width);this.platform.clearBuffer();null!=this.backgroundImage&&this.plotImage(-2147483648,0,-2147483648,this.backgroundImage,null,0,0,0);this.textY=0},"JU.M3,~B,~B,~B");f(b,"setBackgroundTransparent",function(a){null!=this.platform&&this.platform.setBackgroundTransparent(a)},"~B");c(b,"releaseBuffers",function(){this.aobuf=this.zbufT=this.pbufT=this.zbuf=
this.pbuf=null;this.platform.releaseBuffers();this.line3d.clearLineCache()});f(b,"setPass2",function(a){if(!this.$haveTranslucentObjects||!this.currentlyRendering)return!1;this.isPass2=!0;this.pass2Flag01=1;this.colixCurrent=0;if(null==this.pbufT||this.antialias2!=a)this.platform.allocateTBuffers(a),this.pbufT=this.platform.pBufferT,this.zbufT=this.platform.zBufferT;this.antialias2=a;this.antialiasThisFrame&&!this.antialias2&&this.downsampleFullSceneAntialiasing(!0);this.platform.clearTBuffer();null==
this.pixelT0&&(this.pixelT0=new J.g3d.PixelatorT(this));null==this.pixel.p0?this.pixel=this.pixelT0:this.pixel.p0=this.pixelT0;return!0},"~B");f(b,"endRendering",function(){if(this.currentlyRendering){if(null!=this.pbuf){if(this.isPass2&&null!=this.pbufT)for(var a=this.pbufT.length;0<=--a;)this.pbuf[a]=J.g3d.Graphics3D.mergeBufferPixel(this.pbuf[a],this.pbufT[a],this.bgcolor);this.pixel===this.pixelShaded&&0==this.pixelShaded.zShadePower&&this.pixelShaded.showZBuffer();this.antialiasThisFrame&&this.downsampleFullSceneAntialiasing(!1)}this.platform.setBackgroundColor(this.bgcolor);
this.platform.notifyEndOfRendering();this.currentlyRendering=this.isPass2=!1}});b.mergeBufferPixel=c(b,"mergeBufferPixel",function(a,d,h){if(0==d||a==d)return a;0==a&&(a=h);h=a&16711935;a&=65280;var b=d&16711935,c=d&65280;switch(d>>24&15){case 0:h=b;a=c;break;case 1:h=(b<<2)+(b<<1)+b+h>>3&16711935;a=(c<<2)+ +(c<<1)+c+a>>3&65280;break;case 2:h=(b<<1)+b+h>>2&16711935;a=(c<<1)+c+a>>2&65280;break;case 3:h=(b<<2)+b+(h<<1)+h>>3&16711935;a=(c<<2)+c+(a<<1)+a>>3&65280;break;case 4:h=h+b>>1&16711935;a=a+c>>
1&65280;break;case 5:h=(b<<1)+b+(h<<2)+h>>3&16711935;a=(c<<1)+c+(a<<2)+a>>3&65280;break;case 6:h=(h<<1)+h+b>>2&16711935;a=(a<<1)+a+c>>2&65280;break;case 7:h=(h<<2)+(h<<1)+h+b>>3&16711935,a=(a<<2)+(a<<1)+a+c>>3&65280}return 4278190080|h|a},"~N,~N,~N");f(b,"getScreenImage",function(a){var d=this.platform.bufferedImage;a&&this.releaseBuffers();return d},"~B");f(b,"applyAnaglygh",function(a,d){switch(a){case J.c.STER.REDCYAN:for(var h=this.anaglyphLength;0<=--h;){var b=this.anaglyphChannelBytes[h]&255;
this.pbuf[h]=this.pbuf[h]&4294901760|b<<8|b}break;case J.c.STER.CUSTOM:for(var b=d[0],c=d[1]&16777215,h=this.anaglyphLength;0<=--h;){var g=this.anaglyphChannelBytes[h]&255,g=(g|(g|g<<8)<<8)&c;this.pbuf[h]=this.pbuf[h]&b|g}break;case J.c.STER.REDBLUE:for(h=this.anaglyphLength;0<=--h;)b=this.anaglyphChannelBytes[h]&255,this.pbuf[h]=this.pbuf[h]&4294901760|b;break;case J.c.STER.REDGREEN:for(h=this.anaglyphLength;0<=--h;)this.pbuf[h]=this.pbuf[h]&4294901760|(this.anaglyphChannelBytes[h]&255)<<8}},"J.c.STER,~A");
f(b,"snapshotAnaglyphChannelBytes",function(){if(this.currentlyRendering)throw new NullPointerException;this.anaglyphLength=this.windowWidth*this.windowHeight;if(null==this.anaglyphChannelBytes||this.anaglyphChannelBytes.length!=this.anaglyphLength)this.anaglyphChannelBytes=O(this.anaglyphLength,0);for(var a=this.anaglyphLength;0<=--a;)this.anaglyphChannelBytes[a]=this.pbuf[a]});f(b,"releaseScreenImage",function(){this.platform.clearScreenBufferThreaded()});f(b,"haveTranslucentObjects",function(){return this.$haveTranslucentObjects});
f(b,"setSlabAndZShade",function(a,d,h,b,c){this.setSlab(a);this.setDepth(d);h<b?(null==this.pixelShaded&&(this.pixelShaded=new J.g3d.PixelatorShaded(this)),this.pixel=this.pixelShaded.set(h,b,c)):this.pixel=this.pixel0},"~N,~N,~N,~N,~N");c(b,"downsampleFullSceneAntialiasing",function(a){var d=this.bgcolor;a&&(d+=255==(d&255)?-1:1);J.g3d.Graphics3D.downsample2d(this.pbuf,this.windowWidth,this.windowHeight,d);a&&(J.g3d.Graphics3D.downsample2dZ(this.pbuf,this.zbuf,this.windowWidth,this.windowHeight,
d),this.antialiasThisFrame=!1,this.setWidthHeight(!1))},"~B");b.downsample2d=c(b,"downsample2d",function(a,d,h,b){var c=d<<1;if(0!=b){b&=16777215;for(var g=a.length;0<=--g;)0==a[g]&&(a[g]=b)}for(var j=(b>>2&1061109567)<<2,j=j+((j&3233857728)>>6),k=0,l=0,g=h;0<=--g;l+=c)for(h=d;0<=--h;++k){var f=(a[l]>>2&1061109567)+(a[l++ +c]>>2&1061109567)+(a[l]>>2&1061109567)+(a[l++ +c]>>2&1061109567),f=f+((f&3233857728)>>6);f==j&&(f=b);a[k]=f&16777215|4278190080}},"~A,~N,~N,~N");b.downsample2dZ=c(b,"downsample2dZ",
function(a,d,h,b,c){for(var g=h<<1,j=0,k=0;0<=--b;k+=g)for(var l=h;0<=--l;++j,++k){var f=Math.min(d[k],d[k+g]),f=Math.min(f,d[++k]),f=Math.min(f,d[k+g]);2147483647!=f&&(f>>=1);d[j]=a[j]==c?2147483647:f}},"~A,~A,~N,~N,~N");c(b,"hasContent",function(){return this.platform.hasContent()});f(b,"setC",function(a){var d=JU.C.isColixLastAvailable(a);if(!d&&a==this.colixCurrent&&-1==this.currentShadeIndex)return!0;var h=a&30720;if(16384==h)return!1;this.renderLow&&(h=0);var b=0!=h,c=b&&30720==h;this.setScreened(c);
if(!this.checkTranslucent(b&&!c))return!1;this.isPass2?(this.translucencyMask=h<<13|16777215,this.translucencyLog=h>>11):this.translucencyLog=0;this.colixCurrent=a;d&&this.argbCurrent!=this.lastRawColor&&(0==this.argbCurrent&&(this.argbCurrent=4294967295),this.lastRawColor=this.argbCurrent,this.shader.setLastColix(this.argbCurrent,this.inGreyscaleMode));this.shadesCurrent=this.getShades(a);this.currentShadeIndex=-1;this.setColor(this.getColorArgbOrGray(a));return!0},"~N");c(b,"setScreened",function(a){this.wasScreened!=
a&&((this.wasScreened=a)?(null==this.pixelScreened&&(this.pixelScreened=new J.g3d.PixelatorScreened(this,this.pixel0)),null==this.pixel.p0?this.pixel=this.pixelScreened:this.pixel.p0=this.pixelScreened):null==this.pixel.p0||this.pixel===this.pixelScreened?this.pixel=this.isPass2?this.pixelT0:this.pixel0:this.pixel.p0=this.isPass2?this.pixelT0:this.pixel0);return this.pixel},"~B");f(b,"drawFilledCircle",function(a,d,h,b,c,g){if(!this.isClippedZ(g)){var j=w((h+1)/2),j=b<j||b+j>=this.width||c<j||c+j>=
this.height;if(!j||!this.isClippedXY(h,b,c))0!=a&&this.setC(a)&&(j?this.isClippedXY(h,b,c)||this.circle3d.plotCircleCenteredClipped(b,c,g,h):this.circle3d.plotCircleCenteredUnclipped(b,c,g,h)),0!=d&&this.setC(d)&&(j?this.circle3d.plotFilledCircleCenteredClipped(b,c,g,h):this.circle3d.plotFilledCircleCenteredUnclipped(b,c,g,h))}},"~N,~N,~N,~N,~N,~N");f(b,"volumeRender4",function(a,d,h,b){if(1==a)this.plotPixelClippedArgb(this.argbCurrent,d,h,b,this.width,this.zbuf,this.pixel);else if(!this.isClippedZ(b)){var c=
w((a+1)/2),c=d<c||d+c>=this.width||h<c||h+c>=this.height;if(!c||!this.isClippedXY(a,d,h))c?this.circle3d.plotFilledCircleCenteredClipped(d,h,b,a):this.circle3d.plotFilledCircleCenteredUnclipped(d,h,b,a)}},"~N,~N,~N,~N");f(b,"fillSphereXYZ",function(a,d,h,b){switch(a){case 1:this.plotPixelClippedArgb(this.argbCurrent,d,h,b,this.width,this.zbuf,this.pixel);return;case 0:return}a<=(this.antialiasThisFrame?2E3:1E3)&&this.sphere3d.render(this.shadesCurrent,a,d,h,b,null,null,null,-1,null)},"~N,~N,~N,~N");
f(b,"volumeRender",function(a){a?(this.saveAmbient=this.getAmbientPercent(),this.saveDiffuse=this.getDiffusePercent(),this.setAmbientPercent(100),this.setDiffusePercent(0),this.addRenderer(1073741880)):(this.setAmbientPercent(this.saveAmbient),this.setDiffusePercent(this.saveDiffuse))},"~B");f(b,"fillSphereI",function(a,d){this.fillSphereXYZ(a,d.x,d.y,d.z)},"~N,JU.P3i");f(b,"fillSphereBits",function(a,d){this.fillSphereXYZ(a,Math.round(d.x),Math.round(d.y),Math.round(d.z))},"~N,JU.P3");f(b,"fillEllipsoid",
function(a,d,h,b,c,g,j,k,l,f,n){switch(g){case 1:this.plotPixelClippedArgb(this.argbCurrent,h,b,c,this.width,this.zbuf,this.pixel);return;case 0:return}g<=(this.antialiasThisFrame?2E3:1E3)&&this.sphere3d.render(this.shadesCurrent,g,h,b,c,j,k,l,f,n)},"JU.P3,~A,~N,~N,~N,~N,JU.M3,~A,JU.M4,~N,~A");f(b,"drawRect",function(a,d,h,b,c,g){if(!(0!=b&&this.isClippedZ(b))){b=c-1;g-=1;c=a+b;var j=d+g;0<=d&&d<this.height&&this.drawHLine(a,d,h,b);0<=j&&j<this.height&&this.drawHLine(a,j,h,b);0<=a&&a<this.width&&
this.drawVLine(a,d,h,g);0<=c&&c<this.width&&this.drawVLine(c,d,h,g)}},"~N,~N,~N,~N,~N,~N");c(b,"drawHLine",function(a,d,h,b){0>b&&(a+=b,b=-b);0>a&&(b+=a,a=0);a+b>=this.width&&(b=this.width-1-a);var c=this.pixel,g=this.argbCurrent;a+=this.width*d;for(d=0;d<=b;d++)h<this.zbuf[a]&&c.addPixel(a,h,g),a++},"~N,~N,~N,~N");c(b,"drawVLine",function(a,d,h,b){0>b&&(d+=b,b=-b);0>d&&(b+=d,d=0);d+b>=this.height&&(b=this.height-1-d);a+=this.width*d;d=this.pixel;for(var c=this.argbCurrent,g=0;g<=b;g++)h<this.zbuf[a]&&
d.addPixel(a,h,c),a+=this.width},"~N,~N,~N,~N");f(b,"fillTextRect",function(a,d,h,b,c,g){if(!this.isClippedZ(b)){b=this.width;if(0>a){c+=a;if(0>=c)return;a=0}if(a+c>b&&(c=b-a,0>=c))return;if(0>d){g+=d;if(0>=g)return;d=0}d+g>this.height&&(g=this.height-d);var j=this.argbCurrent;this.isAntialiased()&&(j=J.g3d.Graphics3D.fixTextImageRGB(j));for(var k=this.zbuf,l=this.pixel;0<=--g;)this.plotPixelsUnclippedCount(j,c,a,d++,h,b,k,l)}},"~N,~N,~N,~N,~N,~N");f(b,"drawString",function(a,d,h,b,c,g,j){this.currentShadeIndex=
0;null!=a&&(this.isClippedZ(g)||this.drawStringNoSlab(a,d,h,b,c,j))},"~S,JU.Font,~N,~N,~N,~N,~N");f(b,"drawStringNoSlab",function(a,d,h,b,c,g){if(null!=a){null==this.strings&&(this.strings=Array(10));this.stringCount==this.strings.length&&(this.strings=JU.AU.doubleLength(this.strings));var j=new J.g3d.TextString;j.setText(a,null==d?this.currentFont:this.currentFont=d,this.argbCurrent,JU.C.isColixTranslucent(g)?this.getColorArgbOrGray(g)&16777215|(g&30720)<<13:0,h,b,c);this.strings[this.stringCount++]=
j}},"~S,JU.Font,~N,~N,~N,~N");f(b,"renderAllStrings",function(a){if(null!=this.strings){2<=this.stringCount&&(null==J.g3d.Graphics3D.sort&&(J.g3d.Graphics3D.sort=new J.g3d.TextString),java.util.Arrays.sort(this.strings,J.g3d.Graphics3D.sort));for(var d=0;d<this.stringCount;d++){var h=this.strings[d];this.plotText(h.x,h.y,h.z,h.argb,h.bgargb,h.text,h.font,a)}this.strings=null;this.stringCount=0}},"~O");f(b,"plotText",function(a,d,h,b,c,g,j,k){J.g3d.TextRenderer.plot(a,d,h,b,c,g,j,this,k,this.antialiasThisFrame)},
"~N,~N,~N,~N,~N,~S,JU.Font,J.api.JmolRendererInterface");f(b,"drawImage",function(a,d,h,b,c,g,j,k){null!=a&&(0<j&&0<k&&!this.isClippedZ(c))&&this.plotImage(d,h,b,a,null,g,j,k)},"~O,~N,~N,~N,~N,~N,~N,~N");f(b,"plotImage",function(a,d,h,b,c,g,j,k){this.setC(g);this.isPass2||(this.translucencyMask=-1);0==g&&(this.argbCurrent=0);var l=-2147483648==a;g=l?this.bgcolor:this.argbCurrent;l&&(a=0,h=2147483646,j=this.width,k=this.height);if(!(0>=a+j||a>=this.width||0>=d+k||d>=this.height))if(b=this.apiPlatform.drawImageToBuffer(null,
this.platform.offscreenImage,b,j,k,l?g:0),null!=b){var l=this.zbuf,f=this.width,n=this.pixel,q=this.height,v=this.translucencyLog;if(null==c&&0<=a&&a+j<=f&&0<=d&&d+k<=q){var B=0,H=0;for(a=d*f+a;B<k;B++,a+=f-j)for(var L=0;L<j;L++,H++,a++)if(h<l[a]){var m=b[H];-16777216==(m&4278190080)&&n.addPixel(a,h,m)}}else{null==c&&(c=this);for(H=B=0;B<k;B++)for(L=0;L<j;L++)m=b[H++],-16777216==(m&4278190080)&&c.plotImagePixel(m,a+L,d+B,h,8,g,f,q,l,n,v)}}},"~N,~N,~N,~O,J.api.JmolRendererInterface,~N,~N,~N");f(b,
"setFont",function(a){this.currentFont=a},"JU.Font");f(b,"drawPixel",function(a,d,h){this.plotPixelClippedArgb(this.argbCurrent,a,d,h,this.width,this.zbuf,this.pixel)},"~N,~N,~N");f(b,"drawPoints",function(a,d,h){if(1<h)for(var b=0.8*h*h,c=-h;c<h;c++)for(var g=-h;g<h;g++)c*c+g*g>b||(this.plotPoints(a,d,c,g),this.plotPoints(a,d,c,g));else this.plotPoints(a,d,0,0)},"~N,~A,~N");f(b,"drawDashedLineBits",function(a,d,h,b){this.isAntialiased()&&(a+=a,d+=d);this.setScreeni(h,this.sA);this.setScreeni(b,this.sB);
this.drawLineABBits(a,d,!0)},"~N,~N,JU.P3,JU.P3");c(b,"drawLineABBits",function(a,d,h){this.line3d.plotLineBits(this.argbCurrent,this.argbCurrent,this.sA,this.sB,a,d,h);Math.abs(this.sA.x-this.sB.x)<Math.abs(this.sA.y-this.sB.y)?(this.sA.x+=1,this.sB.x+=1):(this.sA.y+=1,this.sB.y+=1);this.line3d.plotLineBits(this.argbCurrent,this.argbCurrent,this.sA,this.sB,a,d,h)},"~N,~N,~B");c(b,"setScreeni",function(a,d){d.x=Math.round(a.x);d.y=Math.round(a.y);d.z=Math.round(a.z)},"JU.P3,JU.P3i");f(b,"drawLineXYZ",
function(a,d,h,b,c,g){this.line3d.plotLineInt(this.argbCurrent,this.argbCurrent,a,d,h,b,c,g)},"~N,~N,~N,~N,~N,~N");f(b,"drawLine",function(a,d,h,b,c,g,j,k){this.setC(a)||(a=0);var l=this.argbCurrent;this.setC(d)||(d=0);(0!=a||0!=d)&&this.line3d.plotLineInt(l,this.argbCurrent,h,b,c,g,j,k)},"~N,~N,~N,~N,~N,~N,~N,~N");f(b,"drawLineBits",function(a,d,h,b){this.setC(a)||(a=0);var c=this.argbCurrent;this.setC(d)||(d=0);if(0!=a||0!=d)this.setScreeni(h,this.sA),this.setScreeni(b,this.sB),this.line3d.plotLineBits(c,
this.argbCurrent,this.sA,this.sB,0,0,!1)},"~N,~N,JU.P3,JU.P3");f(b,"drawLinePixels",function(a,d,h,b){this.sA.setT(a);this.sB.setT(d);this.sA.z=this.sB.z=h;a=this.slab;-2147483648==b&&(this.slab=0);this.drawLineABBits(0,0,!1);this.slab=a},"JU.P3i,JU.P3i,~N,~N");f(b,"drawLineAB",function(a,d){this.setScreeni(a,this.sA);this.setScreeni(d,this.sB);this.line3d.plotLineBits(this.argbCurrent,this.argbCurrent,this.sA,this.sB,0,0,!1)},"JU.P3,JU.P3");f(b,"fillCylinderXYZ",function(a,d,h,b,c,g,j,k,l,f){if(!(b>
this.ht3)){var n=0;this.currentShadeIndex=0;this.setC(d)||(d=0);this.wasScreened&&(n=2);this.setC(a)||(a=0);this.wasScreened&&(n+=1);0==a&&0==d||this.cylinder3d.renderOld(a,d,n,h,b,c,g,j,k,l,f)}},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");f(b,"fillCylinderScreen3I",function(a,d,h,b){d<=this.ht3&&this.cylinder3d.renderOld(this.colixCurrent,this.colixCurrent,0,a,d,F(h.x),F(h.y),F(h.z),F(b.x),F(b.y),F(b.z))},"~N,~N,JU.P3,JU.P3,JU.P3,JU.P3,~N");f(b,"fillCylinder",function(a,d,h,b){d<=this.ht3&&this.cylinder3d.renderOld(this.colixCurrent,
this.colixCurrent,0,a,d,h.x,h.y,h.z,b.x,b.y,b.z)},"~N,~N,JU.P3i,JU.P3i");f(b,"fillCylinderBits",function(a,d,h,b){d<=this.ht3&&(1!=h.z&&1!=b.z)&&(0==d||1==d?(this.setScreeni(h,this.sA),this.setScreeni(b,this.sB),this.line3d.plotLineBits(this.getColorArgbOrGray(this.colixCurrent),this.getColorArgbOrGray(this.colixCurrent),this.sA,this.sB,0,0,!1)):this.cylinder3d.renderBitsFloat(this.colixCurrent,this.colixCurrent,0,a,d,h,b))},"~N,~N,JU.P3,JU.P3");f(b,"fillCylinderBits2",function(a,d,h,b,c,g){if(!(b>
this.ht3)){var j=0;this.currentShadeIndex=0;this.setC(d)||(d=0);this.wasScreened&&(j=2);this.setC(a)||(a=0);this.wasScreened&&(j+=1);0==a&&0==d||(this.setScreeni(c,this.sA),this.setScreeni(g,this.sB),this.cylinder3d.renderBits(a,d,j,h,b,this.sA,this.sB))}},"~N,~N,~N,~N,JU.P3,JU.P3");f(b,"fillConeScreen3f",function(a,d,h,b,c){d<=this.ht3&&this.cylinder3d.renderConeOld(this.colixCurrent,a,d,h.x,h.y,h.z,b.x,b.y,b.z,!0,c)},"~N,~N,JU.P3,JU.P3,~B");f(b,"drawHermite4",function(a,d,h,b,c){this.hermite3d.renderHermiteRope(!1,
a,0,0,0,d,h,b,c)},"~N,JU.P3,JU.P3,JU.P3,JU.P3");f(b,"drawHermite7",function(a,d,h,b,c,g,j,k,l,f,n,q,v){if(0==v)this.hermite3d.renderHermiteRibbon(a,d,h,b,c,g,j,k,l,f,n,q,0);else{this.hermite3d.renderHermiteRibbon(a,d,h,b,c,g,j,k,l,f,n,q,1);var B=this.colixCurrent;this.setC(v);this.hermite3d.renderHermiteRibbon(a,d,h,b,c,g,j,k,l,f,n,q,-1);this.setC(B)}},"~B,~B,~N,JU.P3,JU.P3,JU.P3,JU.P3,JU.P3,JU.P3,JU.P3,JU.P3,~N,~N");f(b,"fillHermite",function(a,d,h,b,c,g,j,k){this.hermite3d.renderHermiteRope(!0,
a,d,h,b,c,g,j,k)},"~N,~N,~N,~N,JU.P3,JU.P3,JU.P3,JU.P3");f(b,"drawTriangle3C",function(a,d,h,b,c,g,j){1==(j&1)&&this.drawLine(d,b,a.x,a.y,a.z,h.x,h.y,h.z);2==(j&2)&&this.drawLine(b,g,h.x,h.y,h.z,c.x,c.y,c.z);4==(j&4)&&this.drawLine(d,g,a.x,a.y,a.z,c.x,c.y,c.z)},"JU.P3i,~N,JU.P3i,~N,JU.P3i,~N,~N");f(b,"fillTriangleTwoSided",function(a,d,h,b){this.setColorNoisy(this.getShadeIndex(a));this.fillTriangleP3f(d,h,b,!1)},"~N,JU.P3,JU.P3,JU.P3");c(b,"fillTriangleP3f",function(a,d,h,b){this.setScreeni(a,this.sA);
this.setScreeni(d,this.sB);this.setScreeni(h,this.sC);this.triangle3d.fillTriangle(this.sA,this.sB,this.sC,b)},"JU.P3,JU.P3,JU.P3,~B");f(b,"fillTriangle3f",function(a,d,h,b){var c=this.getShadeIndexP3(a,d,h,b);0>c||(b?this.setColorNoisy(c):this.setColor(this.shadesCurrent[c]),this.fillTriangleP3f(a,d,h,!1))},"JU.P3,JU.P3,JU.P3,~B");f(b,"fillTriangle3i",function(a,d,h,b,c,g,j){j&&(b=this.vectorAB,b.set(d.x-a.x,d.y-a.y,d.z-a.z),null==h?b=this.shader.getShadeIndex(-b.x,-b.y,b.z):(this.vectorAC.set(h.x-
a.x,h.y-a.y,h.z-a.z),b.cross(b,this.vectorAC),b=0<=b.z?this.shader.getShadeIndex(-b.x,-b.y,b.z):this.shader.getShadeIndex(b.x,b.y,-b.z)),56<b&&(b=56),this.setColorNoisy(b));this.fillTriangleP3f(a,d,h,!1)},"JU.P3,JU.P3,JU.P3,JU.T3,JU.T3,JU.T3,~B");f(b,"fillTriangle3CN",function(a,d,h,b,c,g,j,k,l){this.triangle3d.fillTriangle(a,b,j,this.checkGouraud(d,c,k,h,g,l))},"JU.P3i,~N,~N,JU.P3i,~N,~N,JU.P3i,~N,~N");f(b,"fillTriangle3CNBits",function(a,d,h,b,c,g,j,k,l){this.fillTriangleP3f(a,b,j,this.checkGouraud(d,
c,k,h,g,l))},"JU.P3,~N,~N,JU.P3,~N,~N,JU.P3,~N,~N,~B");c(b,"checkGouraud",function(a,d,h,b,c,g){if(!this.isPass2&&b==c&&b==g&&a==d&&a==h){d=this.getShadeIndex(b);if(a!=this.colixCurrent||this.currentShadeIndex!=d)this.currentShadeIndex=-1,this.setC(a),this.setColorNoisy(d);return!1}this.setTriangleTranslucency(a,d,h);this.triangle3d.setGouraud(this.getShades(a)[this.getShadeIndex(b)],this.getShades(d)[this.getShadeIndex(c)],this.getShades(h)[this.getShadeIndex(g)]);return!0},"~N,~N,~N,~N,~N,~N");
c(b,"getShadeIndex",function(a){return-1E4==a||9999==a?J.g3d.Graphics3D.nullShadeIndex:0>a?this.shadeIndexes2Sided[~a]:this.shadeIndexes[a]},"~N");c(b,"setTriangleTranslucency",function(a,d,h){this.isPass2&&(a&=14336,d&=14336,h&=14336,this.translucencyMask=(JU.GData.roundInt(w((a+d+h)/3))&30720)<<13|16777215)},"~N,~N,~N");f(b,"fillQuadrilateral",function(a,d,h,b,c){c=this.getShadeIndexP3(a,d,h,c);0>c||(this.setColorNoisy(c),this.fillTriangleP3f(a,d,h,!1),this.fillTriangleP3f(a,h,b,!1))},"JU.P3,JU.P3,JU.P3,JU.P3,~B");
f(b,"drawSurface",function(){},"JU.MeshSurface,~N");f(b,"plotPixelClippedP3i",function(a){this.plotPixelClippedArgb(this.argbCurrent,a.x,a.y,a.z,this.width,this.zbuf,this.pixel)},"JU.P3i");c(b,"plotPixelClippedArgb",function(a,d,h,b,c,g,j){this.isClipped3(d,h,b)||(d=h*c+d,b<g[d]&&j.addPixel(d,b,a))},"~N,~N,~N,~N,~N,~A,J.g3d.Pixelator");c(b,"plotPixelUnclipped",function(a,d,h,b,c,g,j){d=h*c+d;b<g[d]&&j.addPixel(d,b,a)},"~N,~N,~N,~N,~N,~A,J.g3d.Pixelator");c(b,"plotImagePixel",function(a,d,h,b,c,g,
j,k,l,f,n){0>d||(d>=j||0>h||h>=k)||f.addImagePixel(c,n,h*j+d,b,a,g)},"~N,~N,~N,~N,~N,~N,~N,~N,~A,~O,~N");c(b,"plotPixelsClippedRaster",function(a,d,h,b,c,g,j){var k,l;if(!(0>=a||0>h||h>=this.height||d>=this.width||b<(l=this.slab)&&c<l||b>(k=this.depth)&&c>k)){var f=this.zbuf,n=(d<<16)+(h<<1)^858993459,q=(b<<10)+512;b=c-b;c=w(a/2);b=JU.GData.roundInt(w(((b<<10)+(0<=b?c:-c))/a));if(0>d){d=-d;q+=b*d;a-=d;if(0>=a)return;d=0}a+d>this.width&&(a=this.width-d);d=h*this.width+d;h=this.pixel;if(null==g){g=
this.argbNoisyDn;c=this.argbNoisyUp;for(var v=this.argbCurrent;0<=--a;){j=q>>10;if(j>=l&&j<=k&&j<f[d]){var n=(n<<16)+(n<<1)+n&2147483647,B=n>>16&7;h.addPixel(d,j,0==B?g:1==B?c:v)}++d;q+=b}}else{n=g.r<<8;c=w((j.r-g.r<<8)/a);v=g.g;B=w((j.g-v)/a);g=g.b;for(var H=w((j.b-g)/a);0<=--a;)j=q>>10,j>=l&&(j<=k&&j<f[d])&&h.addPixel(d,j,4278190080|n&16711680|v&65280|g>>8&255),++d,q+=b,n+=c,v+=B,g+=H}}},"~N,~N,~N,~N,~N,JU.Rgb16,JU.Rgb16");c(b,"plotPixelsUnclippedRaster",function(a,d,h,b,c,g,j){if(!(0>=a)){var k=
((d<<16)+(h<<1)^858993459)&2147483647,l=(b<<10)+512;b=c-b;c=w(a/2);b=JU.GData.roundInt(w(((b<<10)+(0<=b?c:-c))/a));d=h*this.width+d;h=this.zbuf;c=this.pixel;if(null==g){g=this.argbNoisyDn;for(var f=this.argbNoisyUp,n=this.argbCurrent;0<=--a;){j=l>>10;if(j<h[d]){var k=(k<<16)+(k<<1)+k&2147483647,q=k>>16&7;c.addPixel(d,j,0==q?g:1==q?f:n)}++d;l+=b}}else{k=g.r<<8;f=JU.GData.roundInt(w((j.r-g.r<<8)/a));n=g.g;q=JU.GData.roundInt(w((j.g-n)/a));g=g.b;for(var v=JU.GData.roundInt(w((j.b-g)/a));0<=--a;)j=l>>
10,j<h[d]&&c.addPixel(d,j,4278190080|k&16711680|n&65280|g>>8&255),++d,l+=b,k+=f,n+=q,g+=v}}},"~N,~N,~N,~N,~N,JU.Rgb16,JU.Rgb16");c(b,"plotPixelsClippedRasterBits",function(a,d,h,b,c,g,j,k,l){var f,n;if(!(0>=a||0>h||h>=this.height||d>=this.width||b<(n=this.slab)&&c<n||b>(f=this.depth)&&c>f)){b=this.zbuf;var q=(d<<16)+(h<<1)^858993459;if(0>d){a-=-d;if(0>=a)return;d=0}a+d>this.width&&(a=this.width-d);h=h*this.width+d;c=this.pixel;if(null==g){g=this.argbNoisyDn;for(var v=this.argbNoisyUp,B=this.argbCurrent;0<=
--a;){j=this.line3d.getZCurrent(k,l,d++);if(j>=n&&j<=f&&j<b[h]){var q=(q<<16)+(q<<1)+q&2147483647,H=q>>16&7;c.addPixel(h,j,2>H?g:6>H?v:B)}++h}}else{q=g.r<<8;v=w((j.r-g.r<<8)/a);B=g.g;H=w((j.g-B)/a);g=g.b;for(var L=w((j.b-g)/a);0<=--a;)j=this.line3d.getZCurrent(k,l,d++),j>=n&&(j<=f&&j<b[h])&&c.addPixel(h,j,4278190080|q&16711680|B&65280|g>>8&255),++h,q+=v,B+=H,g+=L}}},"~N,~N,~N,~N,~N,JU.Rgb16,JU.Rgb16,~N,~N");c(b,"plotPixelsUnclippedRasterBits",function(a,d,h,b,c,g,j){if(!(0>=a)){var k=((d<<16)+(h<<
1)^858993459)&2147483647;h=h*this.width+d;var l=this.zbuf,f=this.pixel;if(null==b)for(var n=this.argbNoisyDn,q=this.argbNoisyUp,v=this.argbCurrent;0<=--a;)c=this.line3d.getZCurrent(g,j,d++),c<l[h]&&(k=(k<<16)+(k<<1)+k&2147483647,b=k>>16&7,f.addPixel(h,c,0==b?n:1==b?q:v)),++h;else{k=b.r<<8;n=JU.GData.roundInt(w((c.r-b.r<<8)/a));q=b.g;v=JU.GData.roundInt(w((c.g-q)/a));b=b.b;for(var B=JU.GData.roundInt(w((c.b-b)/a));0<=--a;)c=this.line3d.getZCurrent(g,j,d++),c<l[h]&&f.addPixel(h,c,4278190080|k&16711680|
q&65280|b>>8&255),++h,k+=n,q+=v,b+=B}}},"~N,~N,~N,JU.Rgb16,JU.Rgb16,~N,~N");c(b,"plotPixelsUnclippedCount",function(a,d,h,b,c,g,j,k){for(h=b*g+h;0<=--d;)c<j[h]&&k.addPixel(h,c,a),++h},"~N,~N,~N,~N,~N,~N,~A,J.g3d.Pixelator");c(b,"plotPoints",function(a,d,h,b){var c=this.pixel,g=this.argbCurrent,j=this.zbuf,k=this.width,l=this.antialiasThisFrame;for(a*=3;0<a;){var f=d[--a],n=d[--a]+b,q=d[--a]+h;if(!this.isClipped3(q,n,f)){var v=n*k+q++;f<j[v]&&c.addPixel(v,f,g);l&&(v=n*k+q,!this.isClipped3(q,n,f)&&
f<j[v]&&c.addPixel(v,f,g),v=++n*k+q,!this.isClipped3(q,n,f)&&f<j[v]&&c.addPixel(v,f,g),v=n*k+--q,!this.isClipped3(q,n,f)&&f<j[v]&&c.addPixel(v,f,g))}}},"~N,~A,~N,~N");c(b,"setColorNoisy",function(a){this.currentShadeIndex=a;this.argbCurrent=this.shadesCurrent[a];this.argbNoisyUp=this.shadesCurrent[63>a?a+1:63];this.argbNoisyDn=this.shadesCurrent[0<a?a-1:0]},"~N");c(b,"getShadeIndexP3",function(a,d,h,b){this.vectorAB.sub2(d,a);this.vectorAC.sub2(h,a);a=this.vectorNormal;a.cross(this.vectorAB,this.vectorAC);
return 0>a.z?this.shader.getShadeIndex(a.x,a.y,-a.z):b?-1:this.shader.getShadeIndex(-a.x,-a.y,a.z)},"JU.P3,JU.P3,JU.P3,~B");f(b,"renderBackground",function(a){null!=this.backgroundImage&&this.plotImage(-2147483648,0,-2147483648,this.backgroundImage,a,0,0,0)},"J.api.JmolRendererInterface");f(b,"drawAtom",function(a){this.fillSphereXYZ(a.sD,a.sX,a.sY,a.sZ)},"JM.Atom,~N");f(b,"getExportType",function(){return 0});f(b,"getExportName",function(){return null});c(b,"canDoTriangles",function(){return!0});
c(b,"isCartesianExport",function(){return!1});f(b,"initializeExporter",function(){return null},"JV.Viewer,~N,JU.GData,java.util.Map");f(b,"finalizeOutput",function(){return null});f(b,"drawBond",function(){},"JU.P3,JU.P3,~N,~N,~N,~N,~N");f(b,"drawEllipse",function(){return!1},"JU.P3,JU.P3,JU.P3,~B,~B");c(b,"getPrivateKey",function(){return 0});f(b,"clearFontCache",function(){J.g3d.TextRenderer.clearFontCache()});c(b,"setRotationMatrix",function(a){for(var d=JU.Normix.getVertexVectors(),h=JU.GData.normixCount;0<=
--h;){var b=this.transformedVectors[h];a.rotate2(d[h],b);this.shadeIndexes[h]=this.shader.getShadeB(b.x,-b.y,b.z);this.shadeIndexes2Sided[h]=0<=b.z?this.shadeIndexes[h]:this.shader.getShadeB(-b.x,b.y,-b.z)}},"JU.M3");f(b,"renderCrossHairs",function(a,d,h,b,c){d=this.isAntialiased();this.setC(0>c?10:100<c?11:23);c=Math.max(Math.min(this.width,Math.round(b.x)),0);h=Math.max(Math.min(this.height,Math.round(b.y)),0);var g=Math.round(b.z)+1,j=d?8:4,k=d?20:10;d=d?2:1;this.drawRect(c-j,h,g,0,k,d);this.drawRect(c,
h-j,g,0,d,k);this.drawRect(c-j,h-j,g,0,k,k);j=k;k>>=1;this.setC(a[1]<b.x?21:11);this.drawRect(c-j,h,g,0,k,d);this.setC(a[0]>b.x?21:11);this.drawRect(c+k,h,g,0,k,d);this.setC(a[3]<b.y?21:11);this.drawRect(c,h-j,g,0,d,k);this.setC(a[2]>b.y?21:11);this.drawRect(c,h+k,g,0,d,k)},"~A,~N,~N,JU.P3,~N");f(b,"initializeOutput",function(){return!1},"JV.Viewer,~N,java.util.Map");b.fixTextImageRGB=c(b,"fixTextImageRGB",function(a){return 0==(a&12632256)?a|263172:a},"~N");b.sort=null;b.nullShadeIndex=50});m("J.g3d");
x(["J.g3d.PrecisionRenderer","java.util.Hashtable","JU.BS"],"J.g3d.LineRenderer",null,function(){var b=s(function(){this.lineBits=this.shader=this.g3d=null;this.lineTypeX=!1;this.nBits=0;this.lineCache=null;this.z2t=this.y2t=this.x2t=this.z1t=this.y1t=this.x1t=0;r(this,arguments)},J.g3d,"LineRenderer",J.g3d.PrecisionRenderer);N(b,function(){this.lineBits=new JU.BS;this.lineCache=new java.util.Hashtable});u(b,function(a){K(this,J.g3d.LineRenderer,[]);this.g3d=a;this.shader=a.shader},"J.g3d.Graphics3D");
c(b,"setLineBits",function(a,d){var h=Math.abs(a),b=Math.abs(d),c;if(1>h&&0>b)this.lineBits=J.g3d.LineRenderer.lbNone;else{0==h?c=0<=d?3.4028235E38:-3.4028235E38:(c=d/a,1E5<c?c=3.4028235E38:-1E5>c&&(c=-3.4028235E38));this.nBits=(this.lineTypeX=1>=c&&-1<=c)?this.g3d.width:this.g3d.height;c=Integer.$valueOf(Math.round(1E4*c));var g=this.lineCache.get(c);if(null==g){1E4<this.lineCache.size()&&this.lineCache.clear();g=JU.BS.newN(this.nBits);if(b>h)var j=h,h=b,b=j;for(var j=0,k=h+h,b=b+b,l=0;l<this.nBits;l++)j+=
b,j>h&&(g.set(l),j-=k);this.lineCache.put(c,g)}this.lineBits=g}},"~N,~N");c(b,"clearLineCache",function(){this.lineCache.clear()});c(b,"plotLineInt",function(a,d,h,b,c,g,j,k){this.x1t=h;this.x2t=g;this.y1t=b;this.y2t=j;this.z1t=c;this.z2t=k;var l=!0;switch(this.getTrimmedLineImpl()){case 0:l=!1;break;case 2:return}this.plotLineClippedOld(a,d,h,b,c,g-h,j-b,k-c,l,0,0)},"~N,~N,~N,~N,~N,~N,~N,~N");c(b,"plotLineDeltaOld",function(a,d,h,b,c,g,j,k,l){this.x1t=h;this.x2t=h+g;this.y1t=b;this.y2t=b+j;this.z1t=
c;this.z2t=c+k;if(l)switch(this.getTrimmedLineImpl()){case 2:return;case 0:l=!1}this.plotLineClippedOld(a,d,h,b,c,g,j,k,l,0,0)},"~N,~N,~N,~N,~N,~N,~N,~N,~B");c(b,"plotLineDeltaAOld",function(a,d,h,b,c,g,j,k,l,f,n){this.x1t=c;this.x2t=c+k;this.y1t=g;this.y2t=g+l;this.z1t=j;this.z2t=j+f;if(n)switch(this.getTrimmedLineImpl()){case 2:return;case 0:n=!1}var q=this.g3d.zbuf,v=this.g3d.width,B=0,H=g*v+c,L=this.g3d.bufferSize,m=63>b?b+1:b,r=0<b?b-1:b,s=a[m],u=a[r],z=d[b],m=d[m];d=d[r];a=a[b];b=this.g3d.pixel;
0!=h&&(b=this.g3d.setScreened(1==(h&1)),this.g3d.currentShadeIndex=0);0!=a&&(!n&&0<=H&&H<L&&j<q[H])&&b.addPixel(H,j,a);if(!(0==k&&0==l)){n=1;r=v;c+=k;var A=g+l;0>k&&(k=-k,n=-1);0>l&&(l=-l,r=-v);v=k+k;g=l+l;j<<=10;if(l<=k){var x=k-1;0>f&&(x=-x);f=w(((f<<10)+x)/k);l=0;x=Math.abs(c-this.x2t)-1;c=Math.abs(c-this.x1t)-1;for(var A=k-1,C=w(A/2);--A>=x;){if(A==C){a=z;if(0==a)break;s=m;u=d;0!=h%3&&(b=this.g3d.setScreened(2==(h&2)),this.g3d.currentShadeIndex=0)}H+=n;j+=f;l+=g;l>k&&(H+=r,l-=v);if(0!=a&&A<c&&
0<=H&&H<L&&2147483647>B){var E=j>>10;if(E<q[H]){var F=this.shader.nextRandom8Bit();b.addPixel(H,E,85>F?u:170<F?s:a)}}B=(B+1)%1}}else{x=l-1;0>f&&(x=-x);f=w(((f<<10)+x)/l);k=0;x=Math.abs(A-this.y2t)-1;c=Math.abs(A-this.y1t)-1;A=l-1;for(C=w(A/2);--A>=x;){if(A==C){a=z;if(0==a)break;s=m;u=d;0!=h%3&&(b=this.g3d.setScreened(2==(h&2)),this.g3d.currentShadeIndex=0)}H+=r;j+=f;k+=v;k>l&&(H+=n,k-=g);0!=a&&(A<c&&0<=H&&H<L&&2147483647>B)&&(E=j>>10,E<q[H]&&(F=this.g3d.shader.nextRandom8Bit(),b.addPixel(H,E,85>F?
u:170<F?s:a)));B=(B+1)%1}}}},"~A,~A,~N,~N,~N,~N,~N,~N,~N,~N,~B");c(b,"plotLineDeltaABitsFloat",function(a,d,h,b,c,g,j){var k=Math.round(b.x),l=Math.round(b.y),f=Math.round(b.z),n=Math.round(c.x),q=Math.round(c.y),v=Math.round(c.z),B=n-k,H=q-l;this.x1t=k;this.x2t=n;this.y1t=l;this.y2t=q;this.z1t=f;this.z2t=v;if(!(j&&2==this.getTrimmedLineImpl())){j=this.g3d.zbuf;var L=this.g3d.width,n=0,v=63>h?h+1:h,q=0<h?h-1:h,m=a[h],r=a[v],s=a[q];h=d[h];a=d[v];d=d[q];var q=l*L+k,v=this.g3d.bufferSize,u,A,z,x;this.lineTypeX?
(u=k,A=this.x1t,z=this.x2t,k+=w(B/2),x=l=0<=B?1:-1,B=0<=H?L:-L,this.setRastABFloat(b.x,b.z,c.x,c.z)):(u=l,A=this.y1t,z=this.y2t,k=l+w(H/2),l=0<=H?1:-1,x=0<=H?L:-L,B=0<=B?1:-1,this.setRastABFloat(b.y,b.z,c.y,c.z));b=f;c=m;f=r;H=s;r=!1;s=this.g3d.pixel;0!=g&&(s=this.g3d.setScreened(1==(g&1)),this.g3d.currentShadeIndex=0);for(m=u;;m+=l,u+=l){m==A&&(r=!0);if(m==k){c=h;if(0==c)break;f=a;H=d;0!=g%3&&(s=this.g3d.setScreened(2==(g&2)),this.g3d.currentShadeIndex=0)}0!=c&&(r&&0<=q&&q<v&&2147483647>n)&&(b=this.getZCurrent(this.a,
this.b,m),b<j[q]&&(L=this.shader.nextRandom8Bit(),s.addPixel(q,F(b),85>L?H:170<L?f:c)));if(m==z)break;n=(n+1)%1;for(q+=x;0>u;)u+=this.nBits;this.lineBits.get(u%this.nBits)&&(q+=B)}}},"~A,~A,~N,JU.P3,JU.P3,~N,~B");c(b,"plotLineDeltaABitsInt",function(a,d,h,b,c,g,j){var k=b.x,l=b.y,f=b.z,n=c.x,q=c.y,v=c.z,B=n-k,H=q-l;this.x1t=k;this.x2t=n;this.y1t=l;this.y2t=q;this.z1t=f;this.z2t=v;if(!(j&&2==this.getTrimmedLineImpl())){j=this.g3d.zbuf;var L=this.g3d.width,n=0,v=63>h?h+1:h,q=0<h?h-1:h,m=a[h],r=a[v],
s=a[q];h=d[h];a=d[v];d=d[q];var q=l*L+k,v=this.g3d.bufferSize,u,A,z,x;this.lineTypeX?(u=k,A=this.x1t,z=this.x2t,k+=w(B/2),x=l=0<=B?1:-1,B=0<=H?L:-L,this.setRastAB(b.x,b.z,c.x,c.z)):(u=l,A=this.y1t,z=this.y2t,k=l+w(H/2),l=0<=H?1:-1,x=0<=H?L:-L,B=0<=B?1:-1,this.setRastAB(b.y,b.z,c.y,c.z));b=f;c=m;f=r;H=s;r=!1;s=this.g3d.pixel;0!=g&&(s=this.g3d.setScreened(1==(g&1)),this.g3d.currentShadeIndex=0);for(m=u;;m+=l,u+=l){m==A&&(r=!0);if(m==k){c=h;if(0==c)break;f=a;H=d;0!=g%3&&(s=this.g3d.setScreened(2==(g&
2)),this.g3d.currentShadeIndex=0)}0!=c&&(r&&0<=q&&q<v&&2147483647>n)&&(b=this.getZCurrent(this.a,this.b,m),b<j[q]&&(L=this.shader.nextRandom8Bit(),s.addPixel(q,F(b),85>L?H:170<L?f:c)));if(m==z)break;n=(n+1)%1;for(q+=x;0>u;)u+=this.nBits;this.lineBits.get(u%this.nBits)&&(q+=B)}}},"~A,~A,~N,JU.P3i,JU.P3i,~N,~B");c(b,"plotLineBits",function(a,d,h,b,c,g,j){if(!(1>=h.z||1>=b.z)){var k=!0;this.x1t=h.x;this.y1t=h.y;this.z1t=h.z;this.x2t=b.x;this.y2t=b.y;this.z2t=b.z;switch(this.getTrimmedLineImpl()){case 2:return;
case 0:k=!1;break;default:j&&(h.set(this.x1t,this.y1t,this.z1t),b.set(this.x2t,this.y2t,this.z2t))}j=this.g3d.zbuf;var l=this.g3d.width,f=0;0==c&&(g=2147483647,c=1);var n=h.x,q=h.y,v=h.z,B=b.x-n,H=n+B,L=b.y-q,m=q+L,r=q*l+n,s=this.g3d.bufferSize,u=this.g3d.pixel;0!=a&&(!k&&0<=r&&r<s&&v<j[r])&&u.addPixel(r,v,a);if(!(0==B&&0==L)){var A=k=1,v=l;0>B&&(B=-B,k=-1);0>L&&(L=-L,v=-l,A=-1);var l=B+B,z=L+L;if(L<=B){this.setRastAB(h.x,h.z,b.x,b.z);q=0;h=Math.abs(H-this.x2t)-1;H=Math.abs(H-this.x1t)-1;m=B-1;for(b=
w(m/2);--m>=h&&!(m==b&&(a=d,0==a));){r+=k;n+=k;q+=z;q>B&&(r+=v,q-=l);if(0!=a&&m<H&&0<=r&&r<s&&f<g){var x=this.getZCurrent(this.a,this.b,n);x<j[r]&&u.addPixel(r,x,a)}f=(f+1)%c}}else{this.setRastAB(h.y,h.z,b.y,b.z);n=0;h=Math.abs(m-this.y2t)-1;H=Math.abs(m-this.y1t)-1;m=L-1;for(b=w(m/2);--m>=h&&!(m==b&&(a=d,0==a));)r+=v,q+=A,n+=l,n>L&&(r+=k,n-=z),0!=a&&(m<H&&0<=r&&r<s&&f<g)&&(x=this.getZCurrent(this.a,this.b,q),x<j[r]&&u.addPixel(r,x,a)),f=(f+1)%c}}}},"~N,~N,JU.P3i,JU.P3i,~N,~N,~B");c(b,"getTrimmedLineImpl",
function(){var a=this.g3d.clipCode3(this.x1t,this.y1t,this.z1t),d=this.g3d.clipCode3(this.x2t,this.y2t,this.z2t);if(0==(a|d))return 0;if(-1==(a|d))return 2;var h=this.g3d.xLast,b=this.g3d.yLast,c=this.g3d.slab,g=this.g3d.depth;do{if(0!=(a&d))return 2;var j=this.x2t-this.x1t,k=this.y2t-this.y1t,l=this.z2t-this.z1t;0!=a?(0!=(a&8)?(this.y1t+=F(-this.x1t*k/j),this.z1t+=F(-this.x1t*l/j),this.x1t=0):0!=(a&4)?(this.y1t+=F((h-this.x1t)*k/j),this.z1t+=F((h-this.x1t)*l/j),this.x1t=h):0!=(a&2)?(this.x1t+=F(-this.y1t*
j/k),this.z1t+=F(-this.y1t*l/k),this.y1t=0):0!=(a&1)?(this.x1t+=F((b-this.y1t)*j/k),this.z1t+=F((b-this.y1t)*l/k),this.y1t=b):0!=(a&32)?(this.x1t+=F((c-this.z1t)*j/l),this.y1t+=F((c-this.z1t)*k/l),this.z1t=c):(this.x1t+=F((g-this.z1t)*j/l),this.y1t+=F((g-this.z1t)*k/l),this.z1t=g),a=this.g3d.clipCode3(this.x1t,this.y1t,this.z1t)):(0!=(d&8)?(this.y2t+=F(-this.x2t*k/j),this.z2t+=F(-this.x2t*l/j),this.x2t=0):0!=(d&4)?(this.y2t+=F((h-this.x2t)*k/j),this.z2t+=F((h-this.x2t)*l/j),this.x2t=h):0!=(d&2)?(this.x2t+=
F(-this.y2t*j/k),this.z2t+=F(-this.y2t*l/k),this.y2t=0):0!=(d&1)?(this.x2t+=F((b-this.y2t)*j/k),this.z2t+=F((b-this.y2t)*l/k),this.y2t=b):0!=(d&32)?(this.x2t+=F((c-this.z2t)*j/l),this.y2t+=F((c-this.z2t)*k/l),this.z2t=c):(this.x2t+=F((g-this.z2t)*j/l),this.y2t+=F((g-this.z2t)*k/l),this.z2t=g),d=this.g3d.clipCode3(this.x2t,this.y2t,this.z2t))}while(0!=(a|d));return 1});c(b,"plotLineClippedOld",function(a,d,h,b,c,g,j,k,l,f,n){var q=this.g3d.zbuf,v=this.g3d.width,B=0;0==f&&(n=2147483647,f=1);var H=b*
v+h,L=this.g3d.bufferSize,m=this.g3d.pixel;0!=a&&(!l&&0<=H&&H<L&&c<q[H])&&m.addPixel(H,c,a);if(!(0==g&&0==j)){l=1;var r=v;h+=g;var s=b+j;0>g&&(g=-g,l=-1);0>j&&(j=-j,r=-v);v=g+g;b=j+j;c<<=10;if(j<=g){var u=g-1;0>k&&(u=-u);k=w(((k<<10)+u)/g);j=0;u=Math.abs(h-this.x2t)-1;h=Math.abs(h-this.x1t)-1;for(var s=g-1,A=w(s/2);--s>=u&&!(s==A&&(a=d,0==a));){H+=l;c+=k;j+=b;j>g&&(H+=r,j-=v);if(0!=a&&s<h&&0<=H&&H<L&&B<n){var z=c>>10;z<q[H]&&m.addPixel(H,z,a)}B=(B+1)%f}}else{u=j-1;0>k&&(u=-u);k=w(((k<<10)+u)/j);g=
0;u=Math.abs(s-this.y2t)-1;h=Math.abs(s-this.y1t)-1;s=j-1;for(A=w(s/2);--s>=u&&!(s==A&&(a=d,0==a));)H+=r,c+=k,g+=v,g>j&&(H+=l,g-=b),0!=a&&(s<h&&0<=H&&H<L&&B<n)&&(z=c>>10,z<q[H]&&m.addPixel(H,z,a)),B=(B+1)%f}}},"~N,~N,~N,~N,~N,~N,~N,~N,~B,~N,~N");b.lbNone=new JU.BS});m("J.g3d");x(null,"J.g3d.Pixelator",["J.g3d.Graphics3D"],function(){var b=s(function(){this.pb=this.zb=this.p0=this.g=null;this.bgcolor=this.width=0;r(this,arguments)},J.g3d,"Pixelator",null);u(b,function(a){this.g=a;this.bgcolor=this.g.bgcolor;
this.setBuf()},"J.g3d.Graphics3D");c(b,"setBuf",function(){this.zb=this.g.zbuf;this.pb=this.g.pbuf});c(b,"clearPixel",function(a,d){this.zb[a]>d&&(this.zb[a]=2147483647)},"~N,~N");c(b,"addPixel",function(a,d,h){this.zb[a]=d;this.pb[a]=h},"~N,~N,~N");c(b,"addImagePixel",function(a,d,h,b,c,g){if(b<this.zb[h])switch(a){case 0:break;case 8:this.addPixel(h,b,c);break;default:a+=d,7>=a&&(d=this.pb[h],0!=g&&(d=J.g3d.Graphics3D.mergeBufferPixel(d,g,g)),d=J.g3d.Graphics3D.mergeBufferPixel(d,c&16777215|a<<
24,this.bgcolor),this.addPixel(h,b,d))}},"~N,~N,~N,~N,~N,~N")});m("J.g3d");x(["J.g3d.Pixelator"],"J.g3d.PixelatorT",["J.g3d.Graphics3D"],function(){var b=G(J.g3d,"PixelatorT",J.g3d.Pixelator);f(b,"clearPixel",function(){},"~N,~N");f(b,"addPixel",function(a,d,h){var b=this.g.zbufT[a];if(d<b){var c=this.g.pbufT[a];!this.g.translucentCoverOnly&&(0!=c&&b-d>this.g.zMargin)&&(this.pb[a]=J.g3d.Graphics3D.mergeBufferPixel(this.pb[a],c,this.g.bgcolor));this.g.zbufT[a]=d;this.g.pbufT[a]=h&this.g.translucencyMask}else d!=
b&&!this.g.translucentCoverOnly&&d-b>this.g.zMargin&&(this.pb[a]=J.g3d.Graphics3D.mergeBufferPixel(this.pb[a],h&this.g.translucencyMask,this.g.bgcolor))},"~N,~N,~N")});m("J.g3d");x(["J.g3d.Pixelator"],"J.g3d.PixelatorShaded",null,function(){var b=s(function(){this.tmp=this.bgRGB=null;this.zShadePower=this.zDepth=this.zSlab=0;r(this,arguments)},J.g3d,"PixelatorShaded",J.g3d.Pixelator);u(b,function(a){K(this,J.g3d.PixelatorShaded,[a]);this.tmp=D(3,0)},"J.g3d.Graphics3D");c(b,"set",function(a,d,h){this.bgcolor=
this.g.bgcolor;this.bgRGB=D(-1,[this.bgcolor&255,this.bgcolor>>8&255,this.g.bgcolor>>16&255]);this.zSlab=0>a?0:a;this.zDepth=0>d?0:d;this.zShadePower=h;this.p0=this.g.pixel0;return this},"~N,~N,~N");f(b,"addPixel",function(a,d,h){if(!(d>this.zDepth)){if(d>=this.zSlab&&0<this.zShadePower){var b=this.tmp,c=this.bgRGB;b[0]=h;b[1]=h>>8;b[2]=h>>16;var g=(this.zDepth-d)/(this.zDepth-this.zSlab);if(1<this.zShadePower)for(var j=0;j<this.zShadePower;j++)g*=g;for(j=0;3>j;j++)b[j]=c[j]+F(g*((b[j]&255)-c[j]));
h=b[2]<<16|b[1]<<8|b[0]|h&4278190080}this.p0.addPixel(a,d,h)}},"~N,~N,~N");c(b,"showZBuffer",function(){for(var a=this.p0.zb.length;0<=--a;)if(0!=this.p0.pb[a]){var d=F(Math.min(255,Math.max(0,255*(this.zDepth-this.p0.zb[a])/(this.zDepth-this.zSlab))));this.p0.pb[a]=4278190080|d|d<<8|d<<16}})});m("J.g3d");x(["J.g3d.Pixelator"],"J.g3d.PixelatorScreened",null,function(){var b=G(J.g3d,"PixelatorScreened",J.g3d.Pixelator);u(b,function(a,d){K(this,J.g3d.PixelatorScreened,[a]);this.width=a.width;this.p0=
d},"J.g3d.Graphics3D,J.g3d.Pixelator");f(b,"addPixel",function(a,d,h){a%this.width%2==w(a/this.width)%2&&this.p0.addPixel(a,d,h)},"~N,~N,~N")});m("J.g3d");var ca=s(function(){this.bufferSizeT=this.bufferSize=this.bufferHeight=this.bufferWidth=this.windowSize=this.windowHeight=this.windowWidth=0;this.zBufferT=this.zBuffer=this.pBufferT=this.pBuffer=this.bufferedImage=null;this.heightOffscreen=this.widthOffscreen=0;this.apiPlatform=this.graphicsForTextOrImage=this.offscreenImage=null;r(this,arguments)},
J.g3d,"Platform3D",null);u(ca,function(b){this.apiPlatform=b},"J.api.GenericPlatform");c(ca,"getGraphicsForMetrics",function(){return this.apiPlatform.getGraphics(this.allocateOffscreenImage(1,1))});c(ca,"allocateTBuffers",function(b){this.bufferSizeT=b?this.bufferSize:this.windowSize;this.zBufferT=D(this.bufferSizeT,0);this.pBufferT=D(this.bufferSizeT,0)},"~B");c(ca,"allocateBuffers",function(b,a,d,h){this.windowWidth=b;this.windowHeight=a;this.windowSize=b*a;d&&(b*=2,a*=2);this.bufferWidth=b;this.bufferHeight=
a;this.bufferSize=this.bufferWidth*this.bufferHeight;this.zBuffer=D(this.bufferSize,0);this.pBuffer=D(this.bufferSize,0);this.bufferedImage=this.apiPlatform.allocateRgbImage(this.windowWidth,this.windowHeight,this.pBuffer,this.windowSize,J.g3d.Platform3D.backgroundTransparent,h)},"~N,~N,~B,~B");c(ca,"releaseBuffers",function(){this.windowWidth=this.windowHeight=this.bufferWidth=this.bufferHeight=this.bufferSize=-1;null!=this.bufferedImage&&(this.apiPlatform.flushImage(this.bufferedImage),this.bufferedImage=
null);this.zBufferT=this.pBufferT=this.zBuffer=this.pBuffer=null});c(ca,"hasContent",function(){for(var b=this.bufferSize;0<=--b;)if(2147483647!=this.zBuffer[b])return!0;return!1});c(ca,"clearScreenBuffer",function(){for(var b=this.bufferSize;0<=--b;)this.zBuffer[b]=2147483647,this.pBuffer[b]=0});c(ca,"setBackgroundColor",function(b){if(null!=this.pBuffer)for(var a=this.bufferSize;0<=--a;)0==this.pBuffer[a]&&(this.pBuffer[a]=b)},"~N");c(ca,"clearTBuffer",function(){for(var b=this.bufferSizeT;0<=--b;)this.zBufferT[b]=
2147483647,this.pBufferT[b]=0});c(ca,"clearBuffer",function(){this.clearScreenBuffer()});c(ca,"clearScreenBufferThreaded",function(){});c(ca,"notifyEndOfRendering",function(){this.apiPlatform.notifyEndOfRendering()});c(ca,"getGraphicsForTextOrImage",function(b,a){if(b>this.widthOffscreen||a>this.heightOffscreen)null!=this.offscreenImage&&(this.apiPlatform.disposeGraphics(this.graphicsForTextOrImage),this.apiPlatform.flushImage(this.offscreenImage)),b>this.widthOffscreen&&(this.widthOffscreen=b),a>
this.heightOffscreen&&(this.heightOffscreen=a),this.offscreenImage=this.allocateOffscreenImage(this.widthOffscreen,this.heightOffscreen),this.graphicsForTextOrImage=this.apiPlatform.getStaticGraphics(this.offscreenImage,J.g3d.Platform3D.backgroundTransparent);return this.graphicsForTextOrImage},"~N,~N");c(ca,"allocateOffscreenImage",function(b,a){return this.apiPlatform.newOffScreenImage(b,a)},"~N,~N");c(ca,"setBackgroundTransparent",function(b){J.g3d.Platform3D.backgroundTransparent=b},"~B");ca.backgroundTransparent=
!1;m("J.g3d");var La=s(function(){this.b=this.a=0;this.isOrthographic=!1;r(this,arguments)},J.g3d,"PrecisionRenderer",null);c(La,"getZCurrent",function(b,a,d){return Math.round(1.4E-45==b?a:this.isOrthographic?b*d+a:b/(a-d))},"~N,~N,~N");c(La,"setRastABFloat",function(b,a,d,h){var c=h-a,e=d-b;0==c||0==e?(this.a=1.4E-45,this.b=a):this.isOrthographic?(this.a=c/e,this.b=a-this.a*b):(this.a=e*a*(h/c),this.b=(d*h-b*a)/c)},"~N,~N,~N,~N");c(La,"setRastAB",function(b,a,d,h){var c=h-a,e=d-b;1.4E-45==b||0==
c||0==e?(this.a=1.4E-45,this.b=h):this.isOrthographic?(this.a=c/e,this.b=a-this.a*b):(this.a=e*a*(h/c),this.b=(d*h-b*a)/c)},"~N,~N,~N,~N");m("J.g3d");x(["JU.P3"],"J.g3d.SphereRenderer",null,function(){var b=s(function(){this.mDeriv=this.coef=this.mat=this.zroot=this.shader=this.g3d=null;this.planeShade=this.selectedOctant=0;this.zbuf=null;this.offsetPbufBeginLine=this.slab=this.depth=this.height=this.width=0;this.dxyz=this.planeShades=this.ptTemp=null;r(this,arguments)},J.g3d,"SphereRenderer",null);
N(b,function(){this.zroot=S(2,0);this.ptTemp=new JU.P3;this.planeShades=D(3,0);this.dxyz=M(3,3,0)});u(b,function(a){this.g3d=a;this.shader=a.shader},"J.g3d.Graphics3D");c(b,"render",function(a,d,h,b,c,g,j,k,l,f){if(1!=c&&(49<d&&(d&=-2),!this.g3d.isClippedXY(d,h,b))){this.slab=this.g3d.slab;this.depth=this.g3d.depth;var n=d+1>>1,q=c-n;if(!(c+n<this.slab||q>this.depth)){var v=h-n,B=h+n,H=b-n,L=b+n;this.shader.nOut=this.shader.nIn=0;this.zbuf=this.g3d.zbuf;this.height=this.g3d.height;this.width=this.g3d.width;
this.offsetPbufBeginLine=this.width*b+h;var m=this.shader;this.mat=g;if(null!=g&&(this.coef=j,this.mDeriv=k,this.selectedOctant=l,null==m.ellipsoidShades&&m.createEllipsoidShades(),null!=f)){this.planeShade=-1;for(j=0;3>j;j++)if(n=this.dxyz[j][0]=f[j].x-h,k=this.dxyz[j][1]=f[j].y-b,l=this.dxyz[j][2]=f[j].z-c,this.planeShades[j]=m.getShadeIndex(n,k,-l),0==n&&0==k){this.planeShade=this.planeShades[j];break}}if(null!=g||128<d)this.renderQuadrant(-1,-1,h,b,c,d,a),this.renderQuadrant(-1,1,h,b,c,d,a),this.renderQuadrant(1,
-1,h,b,c,d,a),this.renderQuadrant(1,1,h,b,c,d,a),null!=g&&(this.mDeriv=this.coef=this.mat=null);else{var r=m.sphereShapeCache[d-1];if(null==r){r=0;g=0!=(d&1);f=d/2;k=f*f;n=w((d+1)/2);l=g?0:0.5;for(j=0;j<n;++j,++l)for(var s=l*l,u=g?0:0.5,A=0;A<n;++A,++u){var z=u*u,z=k-s-z;0<=z&&++r}var r=D(r,0),x=0;l=g?0:0.5;for(j=0;j<n;++j,++l){s=l*l;u=g?0:0.5;for(A=0;A<n;++A,++u)if(z=u*u,z=k-s-z,0<=z){var C=Math.sqrt(z),z=F(C),E=m.getShadeN(u,l,C,f),G=m.getShadeN(-u,l,C,f),K=m.getShadeN(u,-l,C,f),C=m.getShadeN(-u,
-l,C,f),z=z|E<<7|G<<13|K<<19|C<<25;r[x++]=z}r[x-1]|=2147483648}m.sphereShapeCache[d-1]=r}0>v||B>=this.width||0>H||L>=this.height||q<this.slab||c>this.depth?this.renderSphereClipped(r,h,b,c,d,a):this.renderSphereUnclipped(r,c,d,a)}this.zbuf=null}}},"~A,~N,~N,~N,~N,JU.M3,~A,JU.M4,~N,~A");c(b,"renderSphereUnclipped",function(a,d,h,b){var c=0,g=1-(h&1),j=this.offsetPbufBeginLine,k=j-g*this.width;h=w((h+1)/2);var l=this.zbuf,f=this.width,n=this.g3d.pixel;do{var q=j,v=j-g,B=k,H=k-g,L;do{L=a[c++];var m=
d-(L&127);m<l[q]&&n.addPixel(q,m,b[L>>7&63]);m<l[v]&&n.addPixel(v,m,b[L>>13&63]);m<l[B]&&n.addPixel(B,m,b[L>>19&63]);m<l[H]&&n.addPixel(H,m,b[L>>25&63]);++q;--v;++B;--H}while(0<=L);j+=f;k-=f}while(0<--h)},"~A,~N,~N,~A");c(b,"renderSphereClipped",function(a,d,h,b,c,g){var j=this.width,k=this.height,l=0,f=1-(c&1),n=this.offsetPbufBeginLine,q=n-f*j;c=w((c+1)/2);var v=h,B=h-f;h=(d<<16)+(h<<1)^858993459;var H=this.zbuf,m=this.g3d.pixel,r=this.slab,u=this.depth;do{var s=0<=v&&v<k,z=0<=B&&B<k,A=n,x=n-f,
C=q,E=q-f,F,D=d,G=d-f;do{var K=0<=G&&G<j,M=0<=D&&D<j;F=a[l++];var I;I=F&127;var N;b<r?(N=b+I,I=N>=r):(N=b-I,I=N<r);I&&(N=r);if(N>=r&&N<=u){if(s){if(M&&N<H[A]){var O=I?44+(h>>7&7):F>>7&63;m.addPixel(A,N,g[O])}K&&N<H[x]&&(O=I?44+(h>>13&7):F>>13&63,m.addPixel(x,N,g[O]))}z&&(M&&N<H[C]&&(O=I?44+(h>>19&7):F>>19&63,m.addPixel(C,N,g[O])),K&&N<H[E]&&(O=I?44+(h>>25&7):F>>25&63,m.addPixel(E,N,g[O])))}++A;--x;++C;--E;++D;--G;I&&(h=(h<<16)+(h<<1)+h&2147483647)}while(0<=F);n+=j;q-=j;++v;--B}while(0<--c)},"~A,~N,~N,~N,~N,~A");
c(b,"renderQuadrant",function(a,d,h,b,c,g,j){g=w(g/2);var k=h+g*a,l=(0>h?-1:h<this.width?0:1)+(0>k?-2:k<this.width?0:2);-3==l||3==l||(k=b+g*d,k=(0>b?-1:b<this.height?0:1)+(0>k?-2:k<this.height?0:2),-3==k||3==k||(null==this.mat&&0==l&&0==k&&c-g>=this.slab&&c<=this.depth?this.renderQuadrantUnclipped(g,a,d,c,j):this.renderQuadrantClipped(g,a,d,h,b,c,j)))},"~N,~N,~N,~N,~N,~N,~A");c(b,"renderQuadrantUnclipped",function(a,d,h,b,c){for(var g=a*a,j=2*a+1,k=0>h?-this.width:this.width,l=this.offsetPbufBeginLine,
f=this.zbuf,n=this.g3d.pixel,q=this.shader.sphereShadeIndexes,v=0,B=0;B<=g;B+=v+ ++v,l+=k)for(var H=l,m=g-B,r=b-a,u=w((v*h+a<<8)/j),s=0,z=0;z<=m;z+=s+ ++s,H+=d)if(!(f[H]<=r)&&(r=w(Math.sqrt(m-z)),r=b-r,!(f[H]<=r))){var A=w((s*d+a<<8)/j);n.addPixel(H,r,c[q[(u<<8)+A]])}},"~N,~N,~N,~N,~A");c(b,"renderQuadrantClipped",function(a,d,h,b,c,g,j){for(var k=null!=this.mat,l=0<=this.selectedOctant,f=a*a,n=2*a+1,q=0>h?-this.width:this.width,v=this.offsetPbufBeginLine,B=(b<<16)+(c<<1)^858993459,H=0,m=0,r=this.g3d.pixel,
s=0,u=this.height,z=this.width,A=this.zbuf,x=this.dxyz,C=this.slab,E=this.depth,F=this.ptTemp,D=this.coef,G=this.zroot,K=this.selectedOctant,I=this.shader,M=this.planeShades,N=I.sphereShadeIndexes,O=this.planeShade,T=this.mat,R=0,S=0,P=c;S<=f;S+=R+ ++R,v+=q,P+=h)if(0>P){if(0>h)break}else if(P>=u){if(0<h)break}else{var W=f-(k?0:S);k||(H=w((R*h+a<<8)/n));for(var B=(B<<16)+(B<<1)+B&2147483647,Q=b,Z=0,X=0,$=-1,V=1,Y=v;X<=W;X+=Z+ ++Z,Y+=d,Q+=d)if(0>Q){if(0>d)break}else if(Q>=z){if(0<d)break}else{var U;
if(k){U=(D[4]*Q+D[5]*P+D[8])/D[2]/2;var aa=U*U-(D[0]*Q*Q+D[1]*P*P+D[3]*Q*P+D[6]*Q+D[7]*P-1)/D[2];if(0>aa){if(0<=$)break;continue}aa=Math.sqrt(aa);G[0]=-U-aa;G[1]=-U+aa;$=g<C?1:0;if(0==(U=w(G[$])))U=g;V=2;s=U;if(l){F.set(Q-b,P-c,U-g);T.rotate(F);aa=0;0>F.x&&(aa|=1);0>F.y&&(aa|=2);0>F.z&&(aa|=4);if(aa==K){if(0<=O)m=O;else{V=3;m=3.4028235E38;for(U=0;3>U;U++)if(0!=(aa=x[U][2]))aa=g+(-x[U][0]*(Q-b)-x[U][1]*(P-c))/aa,aa<m&&(m=aa,V=U);3==V&&(V=0,m=g);G[0]=m;m=M[V]}U=w(G[0]);V=3}if(aa=g<C?U>=C:U<C)s=U=C,
V=0}if(U<C||U>E||A[Y]<=s)continue}else{U=w(Math.sqrt(W-X));U=g+(g<C?U:-U);if(aa=g<C?U>=C:U<C)U=C,V=0;if(U<C||U>E||A[Y]<=U)continue}switch(V){case 0:m=44+(B>>8&7);B=(B<<16)+(B<<1)+B&2147483647;V=1;break;case 2:m=I.getEllipsoidShade(Q,P,G[$],a,this.mDeriv);break;case 3:r.clearPixel(Y,s);break;default:m=w((Z*d+a<<8)/n),m=N[(H<<8)+m]}r.addPixel(Y,U,j[m])}B=(B+Q+P|1)&2147483647}},"~N,~N,~N,~N,~N,~N,~A")});m("J.g3d");x(["java.util.Hashtable"],"J.g3d.TextRenderer",["JU.CU","J.g3d.Graphics3D"],function(){var b=
s(function(){this.size=this.mapWidth=this.width=this.ascent=this.height=0;this.tmap=null;this.isInvalid=!1;r(this,arguments)},J.g3d,"TextRenderer",null);u(b,function(a,d){this.ascent=d.getAscent();this.height=d.getHeight();this.width=d.stringWidth(a);0!=this.width&&(this.mapWidth=this.width,this.size=this.mapWidth*this.height)},"~S,JU.Font");b.clearFontCache=c(b,"clearFontCache",function(){J.g3d.TextRenderer.working||(J.g3d.TextRenderer.htFont3d.clear(),J.g3d.TextRenderer.htFont3dAntialias.clear())});
b.plot=c(b,"plot",function(a,d,h,b,c,g,j,k,l,f){if(0==g.length)return 0;if(0<=g.indexOf("<su")||0<=g.indexOf("<color"))return J.g3d.TextRenderer.plotByCharacter(a,d,h,b,c,g,j,k,l,f);var n=j.getAscent();d-=n;g=J.g3d.TextRenderer.getPlotText3D(a,d,k,g,j,f);if(g.isInvalid)return g.width;f&&(b=J.g3d.Graphics3D.fixTextImageRGB(b));f=g.height;j=g.width;var n=g.tmap,q=k.width,v=k.height,B=k.zbuf,H=k.pixel,m=k.translucencyLog;if(null!=l||(0>a||a+g.width>q||0>d||d+g.height>v)&&null!=(l=k))for(var r=k=0;r<
f;r++)for(var s=0;s<j;s++){var w=n[k++];0!=w&&l.plotImagePixel(b,a+s,d+r,h,w,c,q,v,B,H,m)}else{k=r=0;for(a=d*q+a;r<f;r++,a+=q-j)for(s=0;s<j;s++)H.addImagePixel(n[k++],m,a++,h,b,c)}return g.width},"~N,~N,~N,~N,~N,~S,JU.Font,J.g3d.Graphics3D,J.api.JmolRendererInterface,~B");b.plotByCharacter=c(b,"plotByCharacter",function(a,d,h,b,c,g,j,k,l,f){for(var n=0,q=g.length,v=Math.round(0.25*j.getHeight()),B=-Math.round(0.3*j.getHeight()),H=0,m=0;m<q;m++){if("<"==g.charAt(m)){if(m+5<q&&g.substring(m,m+6).equals("<color")){var H=
b,r=g.indexOf(">",m);if(0>r)continue;b=JU.CU.getArgbFromString(g.substring(m+7,r).trim());m=r;continue}if(m+7<q&&g.substring(m,m+8).equals("</color>")){m+=7;b=H;continue}if(m+4<q&&g.substring(m,m+5).equals("<sub>")){m+=4;d+=v;continue}if(m+4<q&&g.substring(m,m+5).equals("<sup>")){m+=4;d+=B;continue}if(m+5<q&&g.substring(m,m+6).equals("</sub>")){m+=5;d-=v;continue}if(m+5<q&&g.substring(m,m+6).equals("</sup>")){m+=5;d-=B;continue}}r=J.g3d.TextRenderer.plot(a+n,d,h,b,c,g.substring(m,m+1),j,k,l,f);n+=
r}return n},"~N,~N,~N,~N,~N,~S,JU.Font,J.g3d.Graphics3D,J.api.JmolRendererInterface,~B");b.getPlotText3D=c(b,"getPlotText3D",function(a,d,h,b,c,g){J.g3d.TextRenderer.working=!0;g=g?J.g3d.TextRenderer.htFont3dAntialias:J.g3d.TextRenderer.htFont3d;var j=g.get(c),k=null,l=!1,f=!1;null!=j?k=j.get(b):(j=new java.util.Hashtable,l=!0);null==k&&(k=new J.g3d.TextRenderer(b,c),f=!0);k.isInvalid=0==k.width||0>=a+k.width||a>=h.width||0>=d+k.height||d>=h.height;if(k.isInvalid)return k;l&&g.put(c,j);f&&(k.setTranslucency(b,
c,h),j.put(b,k));J.g3d.TextRenderer.working=!1;return k},"~N,~N,J.g3d.Graphics3D,~S,JU.Font,~B");c(b,"setTranslucency",function(a,d,h){a=h.apiPlatform.getTextPixels(a,d,h.platform.getGraphicsForTextOrImage(this.mapWidth,this.height),h.platform.offscreenImage,this.mapWidth,this.height,this.ascent);if(null!=a){this.tmap=O(this.size,0);for(d=a.length;0<=--d;)h=a[d]&255,0!=h&&(this.tmap[d]=J.g3d.TextRenderer.translucency[h>>5])}},"~S,JU.Font,J.g3d.Graphics3D");b.translucency=O(-1,[7,6,5,4,3,2,1,8]);b.working=
!1;b.htFont3d=new java.util.Hashtable;b.htFont3dAntialias=new java.util.Hashtable});m("J.g3d");x(["JU.P3i"],"J.g3d.TextString",null,function(){var b=s(function(){this.font=this.text=null;this.bgargb=this.argb=0;r(this,arguments)},J.g3d,"TextString",JU.P3i,java.util.Comparator);c(b,"setText",function(a,d,h,b,c,g,j){this.text=a;this.font=d;this.argb=h;this.bgargb=b;this.x=c;this.y=g;this.z=j},"~S,JU.Font,~N,~N,~N,~N,~N");f(b,"compare",function(a,d){return null==a||null==d?0:a.z>d.z?-1:a.z<d.z?1:0},
"J.g3d.TextString,J.g3d.TextString");f(b,"toString",function(){return this.asString()+" "+this.text})});m("J.g3d");x(["J.g3d.G3DRenderer","$.PrecisionRenderer","JU.Rgb16"],"J.g3d.TriangleRenderer",["JU.GData"],function(){var b=s(function(){this.rgb16t2=this.rgb16t1=this.rgb16sGouraud=this.rgb16sE=this.rgb16sW=this.azE=this.axE=this.azW=this.axW=this.bb=this.aa=this.az=this.ay=this.ax=this.g3d=null;r(this,arguments)},J.g3d,"TriangleRenderer",J.g3d.PrecisionRenderer,J.g3d.G3DRenderer);N(b,function(){this.ax=
D(3,0);this.ay=D(3,0);this.az=D(3,0);this.aa=M(64,0);this.bb=M(64,0);this.axW=D(64,0);this.azW=D(64,0);this.axE=D(64,0);this.azE=D(64,0);this.rgb16t1=new JU.Rgb16;this.rgb16t2=new JU.Rgb16});u(b,function(){K(this,J.g3d.TriangleRenderer,[])});f(b,"set",function(a){try{this.rgb16sW=Array(64);this.rgb16sE=Array(64);for(var d=64;0<=--d;)this.rgb16sW[d]=new JU.Rgb16,this.rgb16sE[d]=new JU.Rgb16;this.g3d=a;this.rgb16sGouraud=Array(3);for(d=3;0<=--d;)this.rgb16sGouraud[d]=new JU.Rgb16}catch(h){if(!E(h,Exception))throw h;
}return this},"J.api.JmolRendererInterface,JU.GData");c(b,"reallocRgb16s",function(a,d){var h=Array(d);System.arraycopy(a,0,h,0,a.length);for(var b=a.length;b<d;++b)h[b]=new JU.Rgb16;return h},"~A,~N");c(b,"setGouraud",function(a,d,h){this.rgb16sGouraud[0].setInt(a);this.rgb16sGouraud[1].setInt(d);this.rgb16sGouraud[2].setInt(h)},"~N,~N,~N");c(b,"fillTriangle",function(a,d,h,b){this.ax[0]=a.x;this.ax[1]=d.x;this.ax[2]=h.x;this.ay[0]=a.y;this.ay[1]=d.y;this.ay[2]=h.y;this.az[0]=a.z;this.az[1]=d.z;
this.az[2]=h.z;if(!(1>=this.az[0]||1>=this.az[1]||1>=this.az[2])){d=this.g3d.clipCode3(this.ax[0],this.ay[0],this.az[0]);h=this.g3d.clipCode3(this.ax[1],this.ay[1],this.az[1]);var c=this.g3d.clipCode3(this.ax[2],this.ay[2],this.az[2]),g=d|h|c;a=0!=g;if(!a||!(-1==g||0!=(d&h&c))){c=0;this.ay[1]<this.ay[c]&&(c=1);this.ay[2]<this.ay[c]&&(c=2);var g=(c+1)%3,j=(c+2)%3;if(this.ay[g]>this.ay[j])var k=g,g=j,j=k;d=this.ay[c];var l=this.ay[g],f=this.ay[j];h=f-d+1;if(!(h>3*this.g3d.height)){if(h>this.axW.length){var n=
h+31&-32;this.axW=D(n,0);this.azW=D(n,0);this.axE=D(n,0);this.azE=D(n,0);this.aa=M(n,0);this.bb=M(n,0);this.rgb16sW=this.reallocRgb16s(this.rgb16sW,n);this.rgb16sE=this.reallocRgb16s(this.rgb16sE,n)}var q;b?(n=this.rgb16sW,q=this.rgb16sE):n=q=null;k=l-d;0==k?(this.ax[g]<this.ax[c]&&(k=g,g=c,c=k),this.generateRaster(h,c,j,this.axW,this.azW,0,n),this.generateRaster(h,g,j,this.axE,this.azE,0,q)):l==f?(this.ax[j]<this.ax[g]&&(k=g,g=j,j=k),this.generateRaster(h,c,g,this.axW,this.azW,0,n),this.generateRaster(h,
c,j,this.axE,this.azE,0,q)):(l=this.ax[j]-this.ax[c],f=JU.GData.roundInt(w(h/2)),0>l&&(f=-f),this.ax[c]+w((l*k+f)/h)<this.ax[g]?(this.generateRaster(h,c,j,this.axW,this.azW,0,n),this.generateRaster(k+1,c,g,this.axE,this.azE,0,q),this.generateRaster(h-k,g,j,this.axE,this.azE,k,q)):(this.generateRaster(k+1,c,g,this.axW,this.azW,0,n),this.generateRaster(h-k,g,j,this.axW,this.azW,k,n),this.generateRaster(h,c,j,this.axE,this.azE,0,q)));this.g3d.setZMargin(5);c=this.g3d.pass2Flag01;g=1-c;j=0;0>d&&(h+=d,
j-=d,d=0);d+h>this.g3d.height&&(h=this.g3d.height-d);if(b)if(a)for(;--h>=c;++d,++j)a=this.axE[j]-(b=this.axW[j])+g,0<a&&this.g3d.plotPixelsClippedRaster(a,b,d,this.azW[j],this.azE[j],this.rgb16sW[j],this.rgb16sE[j]);else for(;--h>=c;++d,++j)a=this.axE[j]-(b=this.axW[j])+g,1==c&&0>a&&(a=1,b--),0<a&&this.g3d.plotPixelsUnclippedRaster(a,b,d,this.azW[j],this.azE[j],this.rgb16sW[j],this.rgb16sE[j]);else if(a)for(;--h>=c;++d,++j)a=this.axE[j]-(b=this.axW[j])+g,0<a&&this.g3d.plotPixelsClippedRasterBits(a,
b,d,this.azW[j],this.azE[j],null,null,this.aa[j],this.bb[j]);else for(;--h>=c;++d,++j)a=this.axE[j]-(b=this.axW[j])+g,1==c&&0>a&&(a=1,b--),0<a&&this.g3d.plotPixelsUnclippedRasterBits(a,b,d,null,null,this.aa[j],this.bb[j]);this.g3d.setZMargin(0)}}}},"JU.P3i,JU.P3i,JU.P3i,~B");c(b,"generateRaster",function(a,d,h,b,c,g,j){var k=this.ax[d],l=this.ax[h]-k,f,n,q;0<=l?(f=1,n=l,q=0):(f=-1,n=-l,q=1-a);var v;n<=a?v=0:(v=JU.GData.roundInt(w(l/a)),n%=a);this.setRastAB(this.ay[d],this.az[d],this.ay[h],this.az[h]);
for(var B=this.a,m=this.b,r=b===this.axE,s=0,u=this.ay[d],z=a-1,l=g;s<=z;++l,++s,++u){if(0==l||l>g)b[l]=s==z?this.ax[h]:k,c[l]=this.getZCurrent(B,m,u),r&&(this.setRastAB(this.axW[l],this.azW[l],b[l],c[l]),this.aa[l]=this.a,this.bb[l]=this.b);k+=v;q+=n;0<q&&(k+=f,q-=a)}if(null!=j){b=this.rgb16t1;b.setRgb(this.rgb16sGouraud[d]);d=this.rgb16t2;d.diffDiv(this.rgb16sGouraud[h],b,a);l=g;for(a=g+a;l<a;++l)j[l].setAndIncrement(b,d)}},"~N,~N,~N,~A,~A,~N,~A")});m("J.i18n");x("J.api.Translator java.text.MessageFormat java.util.Hashtable JU.PT J.i18n.Language $.Resource".split(" "),
"J.i18n.GT",["JU.Logger"],function(){var b=s(function(){this.resources=null;this.resourceCount=0;this.doTranslate=!0;this.language=null;r(this,arguments)},J.i18n,"GT",null,J.api.Translator);u(b,function(a,d){this.resources=null;this.resourceCount=0;J.i18n.GT.$getTextWrapper=this;null!=d&&0==d.length&&(d="none");null!=d&&(this.language=d);"none".equals(this.language)&&(this.language=null);null==this.language&&(this.language=J.i18n.Resource.getLanguage());null==this.language&&(this.language="en");var h=
this.language,b=null,c=null,g=this.language.indexOf("_");if(0<=g&&(h=h.substring(0,g),b=this.language,0<=(g=b.indexOf("_",++g))))b=b.substring(0,g),c=this.language;if(null==(this.language=this.getSupported(c))&&null==(this.language=this.getSupported(b))&&null==(this.language=this.getSupported(h)))this.language="en",System.out.println(this.language+" not supported -- using en");else{b=c=null;switch(this.language.length){default:c=this.language;b=this.language.substring(0,5);h=this.language.substring(0,
2);break;case 5:b=this.language;h=this.language.substring(0,2);break;case 2:h=this.language}b=this.getSupported(b);h=this.getSupported(h);if(h===b||"en_US".equals(h))h=null;b===c&&(b=null);"en_US".equals(b)||(J.i18n.GT.allowDebug&&JU.Logger.debugging&&JU.Logger.debug("Instantiating gettext wrapper for "+this.language+" using files for language:"+h+" country:"+b+" variant:"+c),J.i18n.GT.$ignoreApplicationBundle||this.addBundles(a,"Jmol",c,null,null),this.addBundles(a,"JmolApplet",c,null,null),J.i18n.GT.$ignoreApplicationBundle||
this.addBundles(a,"Jmol",null,b,null),this.addBundles(a,"JmolApplet",null,b,null),J.i18n.GT.$ignoreApplicationBundle||this.addBundles(a,"Jmol",null,null,h),this.addBundles(a,"JmolApplet",null,null,h))}},"JV.Viewer,~S");f(b,"translate",function(a){return J.i18n.GT.$(a)},"~S");b.getLanguageList=c(b,"getLanguageList",function(a){null==J.i18n.GT.languageList&&(null==a&&(a=J.i18n.GT.getTextWrapper()),a.createLanguageList());return J.i18n.GT.languageList},"J.i18n.GT");b.getLanguage=c(b,"getLanguage",function(){return J.i18n.GT.getTextWrapper().language});
b.ignoreApplicationBundle=c(b,"ignoreApplicationBundle",function(){J.i18n.GT.$ignoreApplicationBundle=!0});b.setDoTranslate=c(b,"setDoTranslate",function(a){var d=J.i18n.GT.getDoTranslate();J.i18n.GT.getTextWrapper().doTranslate=a;return d},"~B");b.getDoTranslate=c(b,"getDoTranslate",function(){return J.i18n.GT.getTextWrapper().doTranslate});b.$=c(b,"$",function(a){return J.i18n.GT.getTextWrapper().getString(a)},"~S");b.o=c(b,"o",function(a,d){if(C(d,Array)){if(1!=d.length)return java.text.MessageFormat.format(a,
d);d=d[0]}return JU.PT.rep(a,"{0}",d.toString())},"~S,~O");b.i=c(b,"i",function(a,d){return JU.PT.rep(a,"{0}",""+d)},"~S,~N");b.escapeHTML=c(b,"escapeHTML",function(a){for(var d,h=a.length;0<=--h;)if(127<(d=a.charAt(h)).charCodeAt(0))a=a.substring(0,h)+"&#"+d.charCodeAt(0)+";"+a.substring(h+1);return a},"~S");b.getTextWrapper=c(b,"getTextWrapper",function(){return null==J.i18n.GT.$getTextWrapper?J.i18n.GT.$getTextWrapper=new J.i18n.GT(null,null):J.i18n.GT.$getTextWrapper});c(b,"createLanguageList",
function(){var a=this.doTranslate;this.doTranslate=!1;J.i18n.GT.languageList=J.i18n.Language.getLanguageList();this.doTranslate=a});c(b,"getSupported",function(a){if(null==a)return null;var d=J.i18n.GT.htLanguages.get(a);if(null!=d)return 0==d.length?null:d;d=J.i18n.Language.getSupported(J.i18n.GT.getLanguageList(this),a);J.i18n.GT.htLanguages.put(a,null==d?"":d);return d},"~S");c(b,"addBundles",function(a,d,h,b,c){try{d="J.translation."+d+".",null!=h&&this.addBundle(a,d,h),null!=b&&this.addBundle(a,
d,b),null!=c&&this.addBundle(a,d,c)}catch(g){if(E(g,Exception))J.i18n.GT.allowDebug&&JU.Logger.errorEx("Some exception occurred!",g),this.resources=null,this.resourceCount=0;else throw g;}},"JV.Viewer,~S,~S,~S,~S");c(b,"addBundle",function(a,d,h){a=J.i18n.Resource.getResource(a,d,h);null!=a&&(null==this.resources&&(this.resources=Array(8),this.resourceCount=0),this.resources[this.resourceCount]=a,this.resourceCount++,J.i18n.GT.allowDebug&&JU.Logger.debug("GT adding "+d))},"JV.Viewer,~S,~S");c(b,"getString",
function(a){var d=null;if(this.doTranslate){for(var h=0;h<this.resourceCount;h++)if(d=this.resources[h].getString(a),null!=d){a=d;break}0<this.resourceCount&&(null==d&&J.i18n.GT.allowDebug&&JU.Logger.debugging)&&JU.Logger.debug("No trans, using default: "+a)}null==d&&(a.startsWith("[")?a=a.substring(a.indexOf("]")+1):a.endsWith("]")&&(a=a.substring(0,a.indexOf("["))));return a},"~S");b.$ignoreApplicationBundle=!1;b.$getTextWrapper=null;b.languageList=null;b.allowDebug=!1;b.vwr=null;b.htLanguages=
new java.util.Hashtable});m("J.i18n");x(null,"J.i18n.Language",["J.i18n.GT"],function(){var b=s(function(){this.nativeLanguage=this.language=this.code=null;this.display=!1;r(this,arguments)},J.i18n,"Language",null);u(b,function(a,d,h,b){this.code=a;this.language=d;this.nativeLanguage=h;this.display=b},"~S,~S,~S,~B");b.getLanguageList=c(b,"getLanguageList",function(){return z(-1,[new J.i18n.Language("ar",J.i18n.GT.$("Arabic"),"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",!1),new J.i18n.Language("ast",
J.i18n.GT.$("Asturian"),"Asturian",!1),new J.i18n.Language("az",J.i18n.GT.$("Azerbaijani"),"az\u0259rbaycan dili",!1),new J.i18n.Language("bs",J.i18n.GT.$("Bosnian"),"bosanski jezik",!1),new J.i18n.Language("ca",J.i18n.GT.$("Catalan"),"Catal\u00e0",!0),new J.i18n.Language("cs",J.i18n.GT.$("Czech"),"\u010ce\u0161tina",!0),new J.i18n.Language("da",J.i18n.GT.$("Danish"),"Dansk",!0),new J.i18n.Language("de",J.i18n.GT.$("German"),"Deutsch",!0),new J.i18n.Language("el",J.i18n.GT.$("Greek"),"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
!1),new J.i18n.Language("en_AU",J.i18n.GT.$("Australian English"),"Australian English",!1),new J.i18n.Language("en_GB",J.i18n.GT.$("British English"),"British English",!0),new J.i18n.Language("en_US",J.i18n.GT.$("American English"),"American English",!0),new J.i18n.Language("es",J.i18n.GT.$("Spanish"),"Espa\u00f1ol",!0),new J.i18n.Language("et",J.i18n.GT.$("Estonian"),"Eesti",!1),new J.i18n.Language("eu",J.i18n.GT.$("Basque"),"Euskara",!0),new J.i18n.Language("fi",J.i18n.GT.$("Finnish"),"Suomi",!0),
new J.i18n.Language("fo",J.i18n.GT.$("Faroese"),"F\u00f8royskt",!1),new J.i18n.Language("fr",J.i18n.GT.$("French"),"Fran\u00e7ais",!0),new J.i18n.Language("fy",J.i18n.GT.$("Frisian"),"Frysk",!1),new J.i18n.Language("gl",J.i18n.GT.$("Galician"),"Galego",!1),new J.i18n.Language("hr",J.i18n.GT.$("Croatian"),"Hrvatski",!1),new J.i18n.Language("hu",J.i18n.GT.$("Hungarian"),"Magyar",!0),new J.i18n.Language("hy",J.i18n.GT.$("Armenian"),"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",!1),new J.i18n.Language("id",
J.i18n.GT.$("Indonesian"),"Indonesia",!0),new J.i18n.Language("it",J.i18n.GT.$("Italian"),"Italiano",!0),new J.i18n.Language("ja",J.i18n.GT.$("Japanese"),"\u65e5\u672c\u8a9e",!0),new J.i18n.Language("jv",J.i18n.GT.$("Javanese"),"Basa Jawa",!1),new J.i18n.Language("ko",J.i18n.GT.$("Korean"),"\ud55c\uad6d\uc5b4",!0),new J.i18n.Language("ms",J.i18n.GT.$("Malay"),"Bahasa Melayu",!0),new J.i18n.Language("nb",J.i18n.GT.$("Norwegian Bokmal"),"Norsk Bokm\u00e5l",!1),new J.i18n.Language("nl",J.i18n.GT.$("Dutch"),
"Nederlands",!0),new J.i18n.Language("oc",J.i18n.GT.$("Occitan"),"Occitan",!1),new J.i18n.Language("pl",J.i18n.GT.$("Polish"),"Polski",!1),new J.i18n.Language("pt",J.i18n.GT.$("Portuguese"),"Portugu\u00eas",!1),new J.i18n.Language("pt_BR",J.i18n.GT.$("Brazilian Portuguese"),"Portugu\u00eas brasileiro",!0),new J.i18n.Language("ru",J.i18n.GT.$("Russian"),"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",!0),new J.i18n.Language("sl",J.i18n.GT.$("Slovenian"),"Sloven\u0161\u010dina",!1),new J.i18n.Language("sr",
J.i18n.GT.$("Serbian"),"\u0441\u0440\u043f\u0441\u043a\u0438 \u0458\u0435\u0437\u0438\u043a",!1),new J.i18n.Language("sv",J.i18n.GT.$("Swedish"),"Svenska",!0),new J.i18n.Language("ta",J.i18n.GT.$("Tamil"),"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",!1),new J.i18n.Language("te",J.i18n.GT.$("Telugu"),"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",!1),new J.i18n.Language("tr",J.i18n.GT.$("Turkish"),"T\u00fcrk\u00e7e",!0),new J.i18n.Language("ug",J.i18n.GT.$("Uyghur"),"Uy\u01a3urq\u0259",!1),new J.i18n.Language("uk",J.i18n.GT.$("Ukrainian"),
"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",!0),new J.i18n.Language("uz",J.i18n.GT.$("Uzbek"),"O'zbek",!1),new J.i18n.Language("zh_CN",J.i18n.GT.$("Simplified Chinese"),"\u7b80\u4f53\u4e2d\u6587",!0),new J.i18n.Language("zh_TW",J.i18n.GT.$("Traditional Chinese"),"\u7e41\u9ad4\u4e2d\u6587",!0)])});b.getSupported=c(b,"getSupported",function(a,d){for(var h=a.length;0<=--h;)if(a[h].code.equalsIgnoreCase(d))return a[h].code;for(h=a.length;0<=--h;)if(a[h].code.startsWith(d))return a[h].code;
return null},"~A,~S")});m("J.i18n");x(null,"J.i18n.Resource","java.util.Hashtable JU.PT $.Rdr J.translation.PO JU.Logger JV.FileManager".split(" "),function(){var b=s(function(){this.resourceMap=this.resource=null;r(this,arguments)},J.i18n,"Resource",null);u(b,function(a,d){null==d?this.resourceMap=a:this.resource=a},"~O,~S");b.getResource=c(b,"getResource",function(a,d,h){try{var b=JV.FileManager.getBufferedReaderForResource(a,J.translation.PO,"J/translation/",(0<=d.indexOf("Applet")?"JmolApplet/":
"Jmol/")+h+".po"),c=Array(1);JU.Rdr.readAllAsString(b,2147483647,!1,c,0);return J.i18n.Resource.getResourceFromPO(c[0])}catch(g){if(E(g,"java.io.IOException"))return null;throw g;}},"JV.Viewer,~S,~S");c(b,"getString",function(a){try{return null==this.resource?this.resourceMap.get(a):this.resource.getString(a)}catch(d){if(E(d,Exception))return null;throw d;}},"~S");b.getLanguage=c(b,"getLanguage",function(){var a=null;return a=Jmol.featureDetection.getDefaultLanguage().replace(/-/g,"_")});b.getResourceFromPO=
c(b,"getResourceFromPO",function(a){if(null==a||0==a.length)return null;var d=new java.util.Hashtable;try{var h=JU.PT.split(a,"\n");a=0;for(var b="",c="",g=0;g<h.length;g++){var j=h[g];2>=j.length?(2==a&&(0!=b.length&&0!=c.length)&&d.put(c,b),a=0):0==j.indexOf("msgid")?(a=1,c=J.i18n.Resource.fix(j)):0==j.indexOf("msgstr")?(a=2,b=J.i18n.Resource.fix(j)):1==a?c+=J.i18n.Resource.fix(j):2==a&&(b+=J.i18n.Resource.fix(j))}}catch(k){if(!E(k,Exception))throw k;}JU.Logger.info(d.size()+" translations loaded");
return 0==d.size()?null:new J.i18n.Resource(d,null)},"~S");b.fix=c(b,"fix",function(a){0<=a.indexOf('\\"')&&(a=JU.PT.rep(a,'\\"','"'));return JU.PT.rep(a.substring(a.indexOf('"')+1,a.lastIndexOf('"')),"\\n","\n")},"~S")});m("J.io");x(null,"J.io.FileReader","java.io.BufferedReader JU.AU $.PT $.Rdr J.api.Interface JU.Logger".split(" "),function(){var b=s(function(){this.htParams=this.readerOrDocument=this.atomSetCollection=this.fileTypeIn=this.nameAsGivenIn=this.fullPathNameIn=this.fileNameIn=this.vwr=
null;this.isAppend=!1;this.bytesOrStream=null;r(this,arguments)},J.io,"FileReader",null);u(b,function(a,d,h,b,c,g,j,k){this.vwr=a;this.fileNameIn=null==d?h:d;this.fullPathNameIn=null==h?this.fileNameIn:h;this.nameAsGivenIn=null==b?this.fileNameIn:b;this.fileTypeIn=c;null!=g&&(JU.AU.isAB(g)||C(g,"java.io.BufferedInputStream")?(this.bytesOrStream=g,g=null):C(g,"java.io.Reader")&&!C(g,"java.io.BufferedReader")&&(g=new java.io.BufferedReader(g)));this.readerOrDocument=g;this.htParams=j;this.isAppend=
k},"JV.Viewer,~S,~S,~S,~S,~O,java.util.Map,~B");c(b,"run",function(){!this.isAppend&&this.vwr.displayLoadErrors&&this.vwr.zap(!1,!0,!1);var a=null,d=null;this.fullPathNameIn.contains("#_DOCACHE_")&&(this.readerOrDocument=J.io.FileReader.getChangeableReader(this.vwr,this.nameAsGivenIn,this.fullPathNameIn));if(null==this.readerOrDocument){d=this.vwr.fm.getUnzippedReaderOrStreamFromName(this.fullPathNameIn,this.bytesOrStream,!0,!1,!1,!0,this.htParams);if(null==d||"string"==typeof d){a=null==d?"error opening:"+
this.nameAsGivenIn:d;a.startsWith("NOTE:")||JU.Logger.error("file ERROR: "+this.fullPathNameIn+"\n"+a);this.atomSetCollection=a;return}if(C(d,"java.io.BufferedReader"))this.readerOrDocument=d;else if(C(d,"javajs.api.ZInputStream")){var a=this.fullPathNameIn,h=null,a=a.$replace("\\","/");0<=a.indexOf("|")&&!a.endsWith(".zip")&&(h=JU.PT.split(a,"|"),a=h[0]);null!=h&&this.htParams.put("subFileList",h);h=d;d=this.vwr.fm.getZipDirectory(a,!0,!0);this.atomSetCollection=d=this.vwr.fm.getJzu().getAtomSetCollectionOrBufferedReaderFromZip(this.vwr,
h,a,d,this.htParams,1,!1);try{h.close()}catch(b){if(!E(b,Exception))throw b;}}}C(d,"java.io.BufferedInputStream")&&(this.readerOrDocument=J.api.Interface.getInterface("JU.BinaryDocument",this.vwr,"file").setStream(d,!this.htParams.containsKey("isLittleEndian")));if(null!=this.readerOrDocument){this.atomSetCollection=this.vwr.getModelAdapter().getAtomSetCollectionReader(this.fullPathNameIn,this.fileTypeIn,this.readerOrDocument,this.htParams);"string"!=typeof this.atomSetCollection&&(this.atomSetCollection=
this.vwr.getModelAdapter().getAtomSetCollection(this.atomSetCollection));try{C(this.readerOrDocument,"java.io.BufferedReader")?this.readerOrDocument.close():C(this.readerOrDocument,"javajs.api.GenericBinaryDocument")&&this.readerOrDocument.close()}catch(c){if(!E(c,"java.io.IOException"))throw c;}}"string"!=typeof this.atomSetCollection&&(!this.isAppend&&!this.vwr.displayLoadErrors&&this.vwr.zap(!1,!0,!1),this.vwr.fm.setFileInfo(z(-1,[this.fullPathNameIn,this.fileNameIn,this.nameAsGivenIn])))});b.getChangeableReader=
c(b,"getChangeableReader",function(a,d,h){return JU.Rdr.getBR(a.getLigandModel(d,h,"_file",null))},"JV.Viewer,~S,~S");c(b,"getAtomSetCollection",function(){return this.atomSetCollection})});m("J.render");x(["J.render.CageRenderer","JU.P3"],"J.render.AxesRenderer",["JV.JC"],function(){var b=s(function(){this.pt000=this.colixes=this.originScreen=null;this.modelIndex=0;this.isDataSpin=!1;this.ptTemp=null;r(this,arguments)},J.render,"AxesRenderer",J.render.CageRenderer);N(b,function(){this.originScreen=
new JU.P3;this.colixes=$(3,0);this.ptTemp=new JU.P3});f(b,"initRenderer",function(){this.endcap=2;this.draw000=!1});f(b,"render",function(){if(this.vwr.ms!==this.ms)return!1;var a=this.shape,d=this.vwr.getObjectMad10(1),h=0!=a.axisXY.z;if(0==d||!this.g3d.checkTranslucent(!1)||(h?1==this.exportType:this.tm.isNavigating()&&this.vwr.getBoolean(603979890)))return!1;this.modelIndex=this.vwr.am.cmi;var b=null;this.isDataSpin=!1;var c=603979808==this.vwr.g.axesMode;if(this.ms.isJmolDataFrame(this.modelIndex))switch(this.ms.getJmolFrameTypeInt(this.modelIndex)){case 1095241729:b=
this.ms.am[this.modelIndex];this.isDataSpin=null!=b.uvw;c=!0;break;case 134221834:break;default:return!1}var g=c?this.vwr.getCurrentUnitCell():null;if(!this.isDataSpin&&c&&(null==g||0>this.modelIndex))return!1;this.imageFontScaling=this.vwr.imageFontScaling;!this.isDataSpin&&this.vwr.areAxesTainted()&&a.reinitShape();this.font3d=this.vwr.gdata.getFont3DScaled(a.font3d,this.imageFontScaling);var j=(c=c&&null!=g)?a.axisType:null,k=h&&c&&null!=a.axes2;this.isPolymer=c&&g.isPolymer();this.isSlab=c&&g.isSlab();
this.nDims=c?g.getDimensionality():3;this.periodicity=c?g.getPeriodicity():7;this.setShifts();g=a.scale;k?("xyzabc".equals(a.axes2)&&this.render1(a,d,!1,j,c,2,null,null),"abc".equals(a.axes2)||this.vwr.setBooleanProperty("axesmolecular",!0),a.reinitShape(),this.render1(a,d,!0,null,!1,g,a.axes2,null),this.vwr.setBooleanProperty("axesunitcell",!0)):this.isDataSpin?(this.pt0.set(0,0,0),this.render1(null,25E3,!1,null,!0,1,null,b.uvw)):this.render1(a,d,h,j,c,g,null,null);return!0});c(b,"render1",function(a,
d,h,b,c,g,j,k){var l=this.vwr.isJmolDataFrame();this.pt000=l?this.pt0:a.originPoint;var f=6,n=0;c?(f=3,n=this.isDataSpin?21:6):h?(f=3,n=9):603979809==this.vwr.g.axesMode&&(f=6,n=this.vwr.getBoolean(603979806)?15:9);null!=a&&null!=a.labels&&(3!=f&&(f=6>a.labels.length?3:6),n=-1);var q=this.vwr.gdata.slab,v=d,B=!1;this.ptTemp.setT(this.originScreen);var m=null==j&&null!=b&&(h||0!=this.vwr.getFloat(570425345)||null!=a.fixedOrigin);if(h){20<=d&&(v=500<d?3:w(d/200),0==v&&(v=2));this.g3d.isAntialiased()&&
(v+=v);this.g3d.setSlab(0);this.ptTemp.setT(a.axisXY);this.pt0i.setT(this.tm.transformPt2D(this.ptTemp));if(0>this.ptTemp.x){k=F(this.ptTemp.x);var r=F(this.ptTemp.x);this.pointT.setT(this.pt000);for(d=0;3>d;d++)this.pointT.add(a.getAxisPoint(d,!1,this.ptTemp));this.pt0i.setT(this.tm.transformPt(this.pt000));this.pt2i.scaleAdd(-1,this.pt0i,this.tm.transformPt(this.pointT));0>this.pt2i.x&&(k=-k);0>this.pt2i.y&&(r=-r);this.pt0i.x+=k;this.pt0i.y+=r}this.ptTemp.set(this.pt0i.x,this.pt0i.y,this.pt0i.z);
k=this.vwr.getScreenDim()/10*g;this.g3d.isAntialiased()&&(k*=2);if((c||"abc".equals(a.axes2))&&h)k/=2;for(d=0;3>d;d++)r=this.p3Screens[d],this.tm.rotatePoint(a.getAxisPoint(d,!1,this.pointT),r),r.z*=-1,r.scaleAdd2(k,r,this.ptTemp)}else{if(B=null!=a&&null!=a.tickInfos)this.checkTickTemps(),this.tickA.setT(this.pt000);this.tm.transformPtNoClip(this.pt000,this.ptTemp);v=this.getDiameter(F(this.ptTemp.z),d);for(d=f;0<=--d;){var s=null==k?a.getAxisPoint(d,!l,this.pointT):k[d];this.tm.transformPtNoClip(s,
this.p3Screens[d])}this.shifting&&(null==this.vvert&&(this.vvert=z(-1,[new JU.P3,new JU.P3,new JU.P3,new JU.P3,new JU.P3,new JU.P3])),this.shiftA&&this.setVVert(a,0),this.shiftB&&this.setVVert(a,1),this.shiftC&&this.setVVert(a,2))}k=this.ptTemp.x;r=this.ptTemp.y;this.colixes[0]=this.vwr.getObjectColix(1);this.colixes[1]=this.vwr.getObjectColix(2);this.colixes[2]=this.vwr.getObjectColix(3);g=3==this.nDims&&!h&&3==f&&(2==g||c&&!this.isDataSpin);2==this.nDims&&(f=2);for(d=f;0<=--d;)if(!(null!=j&&d>=
j.length||m&&!b.contains(JV.JC.axesTypes[d])||1!=this.exportType&&2>=Math.abs(k-this.p3Screens[d].x)+Math.abs(r-this.p3Screens[d].y)&&!(g=!1))){this.colix=this.colixes[d%3];this.g3d.setC(this.colix);f=null!=j?j.substring(d,d+1):null==a||null==a.labels?JV.JC.axisLabels[d+n]:d<a.labels.length?a.labels[d]:null;null!=f&&0<f.length&&(s=0==d&&this.shiftA?this.vvert[1]:1==d&&this.shiftB?this.vvert[3]:2==d&&this.shiftC?this.vvert[5]:this.p3Screens[d],this.renderLabel(f,s.x,s.y,s.z,k,r));B&&(this.tickInfo=
a.tickInfos[d%3+1],null==this.tickInfo&&(this.tickInfo=a.tickInfos[0]),null!=this.tickInfo&&(this.tickB.setT(a.getAxisPoint(d,l||c,this.pointT)),this.tickInfo.first=0,this.tickInfo.signFactor=3<=d%6?-1:1));var f=this.isSlab&&2==d||this.isPolymer&&0<d?-4:v,s=this.ptTemp,u=this.p3Screens[d];2==d&&this.shiftC?(s=this.vvert[4],u=this.vvert[5]):1==d&&this.shiftB?(s=this.vvert[2],u=this.vvert[3]):0==d&&this.shiftA&&(s=this.vvert[0],u=this.vvert[1]);this.renderLine(s,u,f,B&&null!=this.tickInfo)}g&&(a=null==
a.labels||3==a.labels.length||null==a.labels[3]?"0":a.labels[3],null!=a&&0!=a.length&&(this.colix=this.vwr.cm.colixBackgroundContrast,this.g3d.setC(this.colix),this.renderLabel(a,k,r,this.ptTemp.z,k,r)));h&&this.g3d.setSlab(q)},"J.shape.Axes,~N,~B,~S,~B,~N,~S,~A");c(b,"setVVert",function(a,d){var h=2*d;this.vvert[h].setT(a.originPoint);a.getAxisPoint(d,!1,this.pt);this.vvert[h].sub(this.pt);this.pt.add(a.originPoint);this.tm.transformPtNoClip(this.vvert[h],this.vvert[h]);this.tm.transformPtNoClip(this.pt,
this.vvert[h+1])},"J.shape.Axes,~N");c(b,"renderLabel",function(a,d,h,b,c,g){var j=this.font3d.getAscent(),k=this.font3d.stringWidth(a);c=d-c;g=h-g;if(0!=c||0!=g){var l=Math.sqrt(c*c+g*g);d+=0.75*k*c/l;h+=0.75*j*g/l}h=Math.floor(h+j/2);this.g3d.drawString(a,this.font3d,w(Math.floor(d-k/2)),w(h),F(b),F(b),0)},"~S,~N,~N,~N,~N,~N")});m("J.render");x(["J.render.ShapeRenderer"],"J.render.BallsRenderer",["J.shape.Shape"],function(){var b=G(J.render,"BallsRenderer",J.render.ShapeRenderer);f(b,"render",function(){var a=
!1;if(this.isExport||this.vwr.checkMotionRendering(1153433601))for(var d=this.ms.at,h=this.shape.colixes,b=this.vwr.shm.bsRenderableAtoms,c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1)){var g=d[c];0<g.sD&&0!=(g.shapeVisibilityFlags&this.myVisibilityFlag)&&(this.g3d.setC(null==h?g.colixAtom:J.shape.Shape.getColix(h,c,g))?this.g3d.drawAtom(g,0):a=!0)}return a})});m("J.render");x(["J.render.FontLineShapeRenderer","JU.P3"],"J.render.CageRenderer",["JU.BS","$.Measure","JU.BoxInfo"],function(){var b=s(function(){this.tickEdges=
this.p3Screens=null;this.isPolymer=this.isSlab=!1;this.periodicity=7;this.nDims=3;this.vvert=this.pt=this.bsPeriod=null;this.shifting=this.shiftC=this.shiftB=this.shiftA=!1;r(this,arguments)},J.render,"CageRenderer",J.render.FontLineShapeRenderer);N(b,function(){this.p3Screens=Array(8);for(var a=8;0<=--a;)this.p3Screens[a]=new JU.P3;this.pt=new JU.P3});c(b,"setPeriodicity",function(){},"~A,~N");c(b,"renderCage",function(a,d,h,b,c,g,j,k){this.g3d.setC(this.colix);var l=this.shape,f=null!=h;this.imageFontScaling=
this.vwr.imageFontScaling;this.font3d=this.vwr.gdata.getFont3DScaled(l.font3d,this.imageFontScaling);for(var n=0,q=8;0<=--q;)this.pt.setT(d[q]),1!=k&&(this.pt.sub(d[0]),this.pt.scaleAdd2(k,this.pt,d[0])),this.tm.transformPtNoClip(this.pt,this.p3Screens[q]),n+=this.p3Screens[q].z;this.setPeriodicity(d,k);k=null;if(f){k=new JU.BS;for(q=12;0<=--q;){var v=h[q];JU.Measure.getNormalThroughPoints(this.p3Screens[v[0]],this.p3Screens[v[1]],this.p3Screens[v[2]],this.pt1,this.pt);0>=this.pt1.z&&(k.set(v[0]),
k.set(v[1]),k.set(v[2]))}}a=this.getDiameter(w(Math.floor(n/8)),a);h=2;n=String.fromCharCode(0);g&=this.isPolymer?1:this.isSlab?85:255;j&=this.isPolymer?16:this.isSlab?85:255;this.setBSPeriod();for(q=2*c;24>q;q+=2)if(null==this.bsPeriod||this.bsPeriod.get(q)){c=a;var v=JU.BoxInfo.edges[q],B=JU.BoxInfo.edges[q+1];if(f&&(!k.get(v)||!k.get(B)))c=-Math.abs(a);null!=b&&0==v&&this.tm.transformPtNoClip(b[h--],this.p3Screens[0]);if(!(0==(g&1<<v)||0==(j&1<<B))){var m=null!=l.tickInfos&&0!=(n=this.tickEdges[q>>
1]).charCodeAt(0);if(m){this.checkTickTemps();this.tickA.setT(d[v]);this.tickB.setT(d[B]);var r=0;if(C(this.shape,"J.shape.Bbcage"))switch(n.charCodeAt(0)){case 120:r=this.tickA.x;break;case 121:r=this.tickA.y;break;case 122:r=this.tickA.z}this.tickInfo=l.tickInfos["xyz".indexOf(n)+1];null==this.tickInfo&&(this.tickInfo=l.tickInfos[0]);null==this.tickInfo?m=!1:this.tickInfo.first=r}this.renderCageLine(q,v,B,c,m)}}},"~N,~A,~A,~A,~N,~N,~N,~N");c(b,"renderCageLine",function(a,d,h,b,c){this.renderLine(this.p3Screens[d],
this.p3Screens[h],b,c)},"~N,~N,~N,~N,~B");c(b,"setBSPeriod",function(){});c(b,"setShifts",function(){this.shiftA=0==(this.periodicity&1);this.shiftB=0==(this.periodicity&2);this.shiftC=0==(this.periodicity&4);this.shifting=this.shiftA||this.shiftB||this.shiftC})});m("J.render");x(["J.render.ShapeRenderer","JU.P3","$.P3i","$.V3"],"J.render.FontLineShapeRenderer",["JU.PT"],function(){var b=s(function(){this.colixB=this.colixA=0;this.dotsOrDashes=!1;this.dashDots=null;this.asLineOnly=!1;this.imageFontScaling=
0;this.tickInfo=this.vectorT3=this.vectorT2=this.vectorT=this.pointT3=this.pointT2=this.pointT=this.s2=this.s1=this.pt2i=this.pt0i=this.font3d=this.tickBs=this.tickAs=this.tickB=this.tickA=null;this.draw000=!0;this.width=0;this.endcap=3;this.pt1=this.pt0=null;r(this,arguments)},J.render,"FontLineShapeRenderer",J.render.ShapeRenderer);N(b,function(){this.pt0i=new JU.P3i;this.pt2i=new JU.P3i;this.s1=new JU.P3i;this.s2=new JU.P3i;this.pointT=new JU.P3;this.pointT2=new JU.P3;this.pointT3=new JU.P3;this.vectorT=
new JU.V3;this.vectorT2=new JU.V3;this.vectorT3=new JU.V3;this.pt0=new JU.P3;this.pt1=new JU.P3});c(b,"getDiameter",function(a,d){var h;h=20<d;switch(this.exportType){case 1:h=h?d:w(Math.floor(1E3*this.vwr.tm.unscaleToScreen(a,2*d/10)));break;default:h?h=F(this.vwr.tm.scaleToScreen(a,w(d/10))):(this.g3d.isAntialiased()&&(d+=d),h=d)}return h},"~N,~N");c(b,"renderLine",function(a,d,h,b){0>h?this.g3d.drawDashedLineBits(8,4,a,d):this.g3d.fillCylinderBits(this.endcap,1==this.exportType?-h:h,a,d);b&&null!=
this.tickInfo&&(this.checkTickTemps(),this.tickAs.setT(a),this.tickBs.setT(d),this.drawTicks(h,!0))},"JU.P3,JU.P3,~N,~B");c(b,"checkTickTemps",function(){null==this.tickA&&(this.tickA=new JU.P3,this.tickB=new JU.P3,this.tickAs=new JU.P3,this.tickBs=new JU.P3)});c(b,"drawTicks",function(a,d){Float.isNaN(this.tickInfo.first)&&(this.tickInfo.first=0);this.drawTicks2(this.tickInfo.ticks.x,8,a,!d?null:null==this.tickInfo.tickLabelFormats?z(-1,["%0.2f"]):this.tickInfo.tickLabelFormats);this.drawTicks2(this.tickInfo.ticks.y,
4,a,null);this.drawTicks2(this.tickInfo.ticks.z,2,a,null)},"~N,~B");c(b,"drawTicks2",function(a,d,h,b){if(0!=a&&(this.g3d.isAntialiased()&&(d*=2),this.vectorT2.set(this.tickBs.x,this.tickBs.y,0),this.vectorT.set(this.tickAs.x,this.tickAs.y,0),this.vectorT2.sub(this.vectorT),!(50>this.vectorT2.length()))){var c=this.tickInfo.signFactor;this.vectorT.sub2(this.tickB,this.tickA);var g=this.vectorT.length();if(null!=this.tickInfo.scale)if(Float.isNaN(this.tickInfo.scale.x)){var j=this.vwr.getUnitCellInfo(0);
Float.isNaN(j)||this.vectorT.set(this.vectorT.x/j,this.vectorT.y/this.vwr.getUnitCellInfo(1),this.vectorT.z/this.vwr.getUnitCellInfo(2))}else this.vectorT.set(this.vectorT.x*this.tickInfo.scale.x,this.vectorT.y*this.tickInfo.scale.y,this.vectorT.z*this.tickInfo.scale.z);j=this.vectorT.length()+1E-4*a;if(!(j<a)){this.vectorT.scale(a/j*g/j);var g=(this.tickBs.z-this.tickAs.z)/(j/a),j=j+this.tickInfo.first,k=w(Math.floor(this.tickInfo.first/a))*a-this.tickInfo.first;this.pointT.scaleAdd2(k/a,this.vectorT,
this.tickA);var k=k+this.tickInfo.first,l=this.tickAs.z;0>h&&(h=1);this.vectorT2.set(-this.vectorT2.y,this.vectorT2.x,0);this.vectorT2.scale(d/this.vectorT2.length());d=this.tickInfo.reference;null==d?(this.pointT3.setT(this.vwr.getBoundBoxCenter()),603979809==this.vwr.g.axesMode&&this.pointT3.add3(1,1,1)):this.pointT3.setT(d);this.tm.transformPtScr(this.pointT3,this.pt2i);d=0.2>Math.abs(this.vectorT2.x/this.vectorT2.y);for(var f=!d,n=!d&&0>this.vectorT2.x,q=null!=b&&0<b.length,v,B,m=Array(1),r=this.draw000?
0:-1;k<j;){if(k>=this.tickInfo.first&&(this.pointT2.setT(this.pointT),this.tm.transformPt3f(this.pointT2,this.pointT2),this.drawLine(w(Math.floor(this.pointT2.x)),w(Math.floor(this.pointT2.y)),F(l),v=w(Math.floor(this.pointT2.x+this.vectorT2.x)),B=w(Math.floor(this.pointT2.y+this.vectorT2.y)),F(l),h),q&&(this.draw000||0!=k))){m[0]=Float.$valueOf(0==k?0:k*c);var s=JU.PT.sprintf(b[r%b.length],"f",m);this.drawString(v,B,F(l),4,n,d,f,w(Math.floor(this.pointT2.y)),s)}this.pointT.add(this.vectorT);k+=a;
l+=g;r++}}}},"~N,~N,~N,~A");c(b,"drawLine",function(a,d,h,b,c,g,j){return this.drawLine2(this.g3d,a,d,h,b,c,g,j)},"~N,~N,~N,~N,~N,~N,~N");c(b,"drawLine2",function(a,d,h,b,c,g,j,k){this.pt0.set(d,h,b);this.pt1.set(c,g,j);if(this.dotsOrDashes)null!=this.dashDots&&J.render.FontLineShapeRenderer.drawDashedCylinder(a,d,h,b,c,g,j,this.dashDots,this.width,this.colixA,this.colixB,!this.isExport||1==this.mad?this.width:this.mad,this.asLineOnly,this.s1);else{if(0>k)return a.drawDashedLineBits(8,4,this.pt0,
this.pt1),1;a.fillCylinderBits(2,k,this.pt0,this.pt1)}return w((k+1)/2)},"J.api.JmolRendererInterface,~N,~N,~N,~N,~N,~N,~N");c(b,"drawString",function(a,d,h,b,c,g,j,k,l){if(null!=l){var f=this.font3d.stringWidth(l),n=this.font3d.getAscent();a=c?a-(w(b/2)+2+f):g?a-(w(b/2)+2+w(f/2)):a+(w(b/2)+2);c=d;c=j?c+w(n/2):0==k||k<d?c+n:c-w(b/2);d=h-b-2;1>d&&(d=1);this.g3d.drawString(l,this.font3d,a,c,d,d,0)}},"~N,~N,~N,~N,~B,~B,~B,~N,~S");b.drawDashedCylinder=c(b,"drawDashedCylinder",function(a,d,h,b,c,g,j,k,
l,f,n,q,v,B){if(!(null==k||0>l)){var m=k[0];c-=d;g-=h;j-=b;var r=0,s=k===J.render.FontLineShapeRenderer.ndots,u=s||k===J.render.FontLineShapeRenderer.sixdots;if(u){null==B&&(B=new JU.P3i);var z=(c*c+g*g)/(l*l);s?(m=Math.sqrt(z)/1.5,r=F(m)+2):8>z?k=J.render.FontLineShapeRenderer.twodots:32>z&&(k=J.render.FontLineShapeRenderer.fourdots)}var z=k[1],A=k[2],x=f,C=0==A?n:f;0==r&&(r=k.length);for(var E=0,D=3;D<r;D++){var E=s?E+1:k[D],G=w(Math.floor(d+c*E/m)),K=w(Math.floor(h+g*E/m)),I=w(Math.floor(b+j*E/
m));if(u)B.set(G,K,I),D==z?a.setC(f):D==A&&a.setC(n),a.fillSphereI(l,B);else{D==z&&(x=n);E=k[++D];D==A&&(C=n);var M=w(Math.floor(d+c*E/m)),N=w(Math.floor(h+g*E/m)),O=w(Math.floor(b+j*E/m));J.render.FontLineShapeRenderer.fillCylinder(a,x,C,2,G,K,I,M,N,O,q,v)}}}},"J.api.JmolRendererInterface,~N,~N,~N,~N,~N,~N,~A,~N,~N,~N,~N,~B,JU.P3i");b.fillCylinder=c(b,"fillCylinder",function(a,d,h,b,c,g,j,k,l,f,n,q){q?a.drawLine(d,h,c,g,j,k,l,f):a.fillCylinderXYZ(d,h,b,n,c,g,j,k,l,f)},"J.api.JmolRendererInterface,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~B");
b.dashes=D(-1,[12,0,0,2,5,7,10]);b.hDashes=D(-1,[10,7,6,1,3,4,6,7,9]);b.pymoldashes=D(-1,[30,0,0,2,4,7,9,12,14,17,19,22,24,27,30]);b.ndots=D(-1,[0,3,1E3]);b.sixdots=D(-1,[12,3,6,1,3,5,7,9,11]);b.fourdots=D(-1,[13,3,5,2,5,8,11]);b.twodots=D(-1,[12,3,4,3,9])});m("J.render");x(["J.render.ShapeRenderer"],"J.render.FrankRenderer",["J.shape.Frank","JV.Viewer"],function(){var b=G(J.render,"FrankRenderer",J.render.ShapeRenderer);f(b,"render",function(){if(this.isExport||!this.vwr.getShowFrank()||!this.g3d.setC(this.colix)||
this.vwr.frankOn&&!this.vwr.noFrankEcho||0==this.vwr.tm.splitFrameCurrentlyRendering)return!1;var a=this.shape,d=this.vwr.getBooleanProperty("allowKeyStrokes"),h=this.vwr.getBoolean(603983903);this.colix=h&&!this.vwr.getModelkit(!1).isHidden()?20:this.vwr.isSignedApplet?d||(JV.Viewer.isJS||JV.Viewer.isSwingJS)&&!this.vwr.isWebGL?5:10:d?7:12;this.colix==this.vwr.getObjectColix(0)&&(this.colix=4);this.vwr.noFrankEcho=!0;d=this.vwr.imageFontScaling;a.getFont(d);d=F(a.frankWidth+4*d);this.g3d.drawStringNoSlab(J.shape.Frank.frankString,
a.font3d,this.vwr.gdata.width-d,this.vwr.gdata.height-a.frankDescent,0,0);a=h?this.vwr.getModelkit(!1):null;h&&!a.isHidden()&&(this.g3d.setC(12),this.g3d.fillTextRect(0,0,1,0,10,104),h=a.getActiveMenu(),null!=h&&("atomMenu".equals(h)?(this.g3d.setC(21),this.g3d.fillTextRect(0,0,0,0,10,26)):"bondMenu".equals(h)?(this.g3d.setC(7),this.g3d.fillTextRect(0,26,0,0,10,26)):"xtalMenu".equals(h)&&(this.g3d.setC(8),this.g3d.fillTextRect(0,52,0,0,10,26))));return!1})});m("J.render");x(["J.api.JmolRepaintManager",
"JU.BS"],"J.render.RepaintManager",["J.api.Interface","JU.Logger","JV.JC","$.Viewer"],function(){var b=s(function(){this.bsTranslucent=this.renderers=this.shapeManager=this.vwr=null;this.holdRepaint=0;this.repaintPending=!1;r(this,arguments)},J.render,"RepaintManager",null,J.api.JmolRepaintManager);N(b,function(){this.bsTranslucent=JU.BS.newN(37)});u(b,function(){});f(b,"set",function(a,d){this.vwr=a;this.shapeManager=d},"JV.Viewer,JV.ShapeManager");f(b,"isRepaintPending",function(){return this.repaintPending});
f(b,"pushHoldRepaint",function(){++this.holdRepaint},"~S");f(b,"popHoldRepaint",function(a,d){null!=d&&d.startsWith("CLEAR HOLD")&&(this.holdRepaint=0);--this.holdRepaint;0>=this.holdRepaint&&(this.holdRepaint=0,a&&(this.repaintPending=!0,this.repaintNow(d)))},"~B,~S");f(b,"requestRepaintAndWait",function(a){var d=null;JV.Viewer.isJS&&!JV.Viewer.isSwingJS&&(d=self.Jmol&&Jmol.repaint?Jmol:null);if(null==d)try{this.repaintNow(a),JV.Viewer.isJS||this.wait(this.vwr.g.repaintWaitMs),this.repaintPending&&
(JU.Logger.error("repaintManager requestRepaintAndWait timeout"),this.repaintDone())}catch(h){if(E(h,"InterruptedException"))System.out.println("repaintManager requestRepaintAndWait interrupted thread="+Thread.currentThread().getName());else throw h;}else d.repaint(this.vwr.html5Applet,!1),this.repaintDone()},"~S");f(b,"repaintIfReady",function(a){if(this.repaintPending)return!1;this.repaintPending=!0;0==this.holdRepaint&&this.repaintNow(a);return!0},"~S");c(b,"repaintNow",function(){this.vwr.haveDisplay&&
this.vwr.apiPlatform.repaint(this.vwr.display)},"~S");f(b,"repaintDone",function(){this.repaintPending=!1});f(b,"clear",function(a){if(null!=this.renderers)if(0<=a)this.renderers[a]=null;else for(a=0;37>a;++a)this.renderers[a]=null},"~N");c(b,"getRenderer",function(a){if(null!=this.renderers[a])return this.renderers[a];var d=JV.JC.getShapeClassName(a,!0)+"Renderer";if(null==(d=J.api.Interface.getInterface(d,this.vwr,"render")))return null;d.setViewerG3dShapeID(this.vwr,a);return this.renderers[a]=
d},"~N");f(b,"render",function(a,d,h,b){null==this.renderers&&(this.renderers=Array(37));this.getAllRenderers();try{var c=this.vwr.getBoolean(603979934);a.renderBackground(null);if(h){this.bsTranslucent.clearAll();null!=b&&a.renderCrossHairs(b,this.vwr.getScreenWidth(),this.vwr.getScreenHeight(),this.vwr.tm.getNavigationOffset(),this.vwr.tm.navigationDepthPercent);var g=this.vwr.getRubberBandSelection();null!=g&&a.setC(this.vwr.cm.colixRubberband)&&a.drawRect(g.x,g.y,0,0,g.width,g.height);this.vwr.noFrankEcho=
!0}b=null;var j=this.shapeManager.getShape(1);j.haveStrutPoints=!1;for(g=0;37>g&&a.currentlyRendering;++g){var k=this.shapeManager.getShape(g);null!=k&&(c&&(b="rendering "+JV.JC.getShapeClassName(g,!1),JU.Logger.startTimer(b)),(h||this.bsTranslucent.get(g))&&this.getRenderer(g).renderShape(a,d,k,0)&&this.bsTranslucent.set(g),c&&JU.Logger.checkTimer(b,!1))}j.haveStrutPoints&&this.getRenderer(1).renderShape(a,d,j,1);a.renderAllStrings(null)}catch(l){if(E(l,Exception)){l.printStackTrace();if(this.vwr.async&&
"Interface".equals(l.getMessage()))throw new NullPointerException;JU.Logger.error("rendering error? "+l)}else throw l;}},"JU.GData,JM.ModelSet,~B,~A");c(b,"getAllRenderers",function(){for(var a=!0,d=0;37>d;++d)null==this.shapeManager.getShape(d)||null!=this.getRenderer(d)||(a=this.repaintPending=!this.vwr.async);if(!a)throw new NullPointerException;});f(b,"renderExport",function(a,d,h){this.shapeManager.finalizeAtoms(null,!0);a=this.vwr.initializeExporter(h);if(null==a)return JU.Logger.error("Cannot export "+
h.get("type")),null;null==this.renderers&&(this.renderers=Array(37));this.getAllRenderers();h=null;try{var b=this.vwr.getBoolean(603979934);a.renderBackground(a);var c=this.shapeManager.getShape(1);c.haveStrutPoints=!1;for(var g=0;37>g;++g){var j=this.shapeManager.getShape(g);null!=j&&(b&&(h="rendering "+JV.JC.getShapeClassName(g,!1),JU.Logger.startTimer(h)),this.getRenderer(g).renderShape(a,d,j,0),b&&JU.Logger.checkTimer(h,!1))}c.haveStrutPoints&&this.getRenderer(1).renderShape(a,d,c,1);a.renderAllStrings(a);
h=a.finalizeOutput()}catch(k){if(E(k,Exception))k.printStackTrace(),JU.Logger.error("rendering error? "+k);else throw k;}return h},"JU.GData,JM.ModelSet,java.util.Map")});m("J.render");x(null,"J.render.ShapeRenderer",["JV.JC"],function(){var b=s(function(){this.shape=this.ms=this.g3d=this.tm=this.vwr=null;this.exportType=this.mad=this.colix=this.shapeID=this.myVisibilityFlag=0;this.isExport=!1;this.flags=0;r(this,arguments)},J.render,"ShapeRenderer",null);c(b,"initRenderer",function(){});c(b,"setViewerG3dShapeID",
function(a,d){this.vwr=a;this.tm=a.tm;this.shapeID=d;this.myVisibilityFlag=JV.JC.getShapeVisibilityFlag(d);this.initRenderer()},"JV.Viewer,~N");c(b,"renderShape",function(a,d,h,b){this.setup(a,d,h);this.flags=b;a=this.render();this.exportType=0;this.isExport=!1;return a},"J.api.JmolRendererInterface,JM.ModelSet,J.shape.Shape,~N");c(b,"setup",function(a,d,h){this.g3d=a;this.ms=d;this.shape=h;this.exportType=a.getExportType();this.isExport=0!=this.exportType},"J.api.JmolRendererInterface,JM.ModelSet,J.shape.Shape");
c(b,"isVisibleForMe",function(a){return null!=a&&a.isVisible(this.myVisibilityFlag|9)},"JM.Atom")});m("J.render");x(["J.render.FontLineShapeRenderer","JU.BS","$.P3","$.V3"],"J.render.SticksRenderer",["JU.A4","$.M3","J.c.PAL","JU.C","$.Edge"],function(){var b=s(function(){this.showMultipleBonds=!1;this.multipleBondRadiusFactor=this.multipleBondSpacing=0;this.useBananas=this.bondsPerp=!1;this.modeMultipleBond=0;this.isCartesian=!1;this.endcaps=0;this.hbondsSolid=this.bondsBackbone=this.hbondsBackbone=
this.ssbondsBackbone=!1;this.bond=this.pb=this.pa=this.b=this.a=null;this.bondOrder=this.mag2d=this.dy=this.dx=this.zB=this.yB=this.xB=this.zA=this.yA=this.xA=0;this.slabByAtom=this.slabbing=this.isAntialiased=this.wireframeOnly=!1;this.bsForPass2=this.p2=this.p1=this.z=this.y=this.x=null;this.strutsOnly=this.isPymol=this.isPass2=!1;this.dyStep=this.dxStep=this.yAxis2=this.xAxis2=this.yAxis1=this.xAxis1=0;this.a4=this.rot=null;r(this,arguments)},J.render,"SticksRenderer",J.render.FontLineShapeRenderer);
N(b,function(){this.x=new JU.V3;this.y=new JU.V3;this.z=new JU.V3;this.p1=new JU.P3;this.p2=new JU.P3;this.bsForPass2=JU.BS.newN(64)});f(b,"render",function(){var a=this.ms.bo;if(null==a)return!1;(this.isPass2=this.vwr.gdata.isPass2)||this.bsForPass2.clearAll();this.slabbing=this.tm.slabEnabled;this.slabByAtom=this.vwr.getBoolean(603979939);this.endcaps=3;this.dashDots=this.vwr.getBoolean(603979893)?J.render.FontLineShapeRenderer.sixdots:J.render.FontLineShapeRenderer.dashes;this.isCartesian=1==this.exportType;
this.getMultipleBondSettings(0);this.wireframeOnly=!this.vwr.checkMotionRendering(1677721602);this.ssbondsBackbone=this.vwr.getBoolean(603979952);this.hbondsBackbone=this.vwr.getBoolean(603979852);this.bondsBackbone=(new Boolean(this.hbondsBackbone|this.ssbondsBackbone)).valueOf();this.hbondsSolid=this.vwr.getBoolean(603979854);this.isAntialiased=this.g3d.isAntialiased();this.strutsOnly=0!=(this.flags&1);var d=!1;if(this.isPass2)for(var h=this.bsForPass2.nextSetBit(0);0<=h;h=this.bsForPass2.nextSetBit(h+
1))this.bond=a[h],null!=this.bond&&this.renderBond(h);else for(h=this.ms.bondCount;0<=--h;)this.bond=a[h],null!=this.bond&&(0!=(this.bond.shapeVisibilityFlags&this.myVisibilityFlag)&&this.renderBond(h))&&(d=!0,this.bsForPass2.set(h));return d});c(b,"renderBond",function(){var a,d;this.a=a=this.bond.atom1;this.b=d=this.bond.atom2;var h=this.bond.order&131071;this.bondsBackbone&&(this.ssbondsBackbone&&0!=(h&256)?(this.a=this.a.group.getLeadAtomOr(this.a),this.b=this.b.group.getLeadAtomOr(this.b)):this.hbondsBackbone&&
JU.Edge.isOrderH(h)&&(this.a=this.a.group.getLeadAtomOr(this.a),this.b=this.b.group.getLeadAtomOr(this.b)));if(!this.isPass2&&(!this.a.isVisible(9)||!this.b.isVisible(9)||!this.g3d.isInDisplayRange(this.a.sX,this.a.sY)||!this.g3d.isInDisplayRange(this.b.sX,this.b.sY)))return!1;if(this.slabbing){var b=this.vwr.gdata.isClippedZ(this.a.sZ);if(b&&this.vwr.gdata.isClippedZ(this.b.sZ)||this.slabByAtom&&(b||this.vwr.gdata.isClippedZ(this.b.sZ)))return!1}this.zA=this.a.sZ;this.zB=this.b.sZ;if(1==this.zA||
1==this.zB)return!1;this.colixA=a.colixAtom;this.colixB=d.colixAtom;2==((this.colix=this.bond.colix)&-30721)?(this.colix&=30720,this.colixA=JU.C.getColixInherited(this.colix|this.vwr.cm.getColixAtomPalette(a,J.c.PAL.CPK.id),this.colixA),this.colixB=JU.C.getColixInherited(this.colix|this.vwr.cm.getColixAtomPalette(d,J.c.PAL.CPK.id),this.colixB)):(this.colixA=JU.C.getColixInherited(this.colix,this.colixA),this.colixB=JU.C.getColixInherited(this.colix,this.colixB));d=a=!1;this.bondOrder=h&131071;b=32768==
this.bondOrder;this.strutsOnly!=b&&(b&&(this.shape.haveStrutPoints=!0,this.isPass2||(this.a.group.unsetStrutPoint(),this.b.group.unsetStrutPoint())),d=!0);if(!this.isExport&&!this.isPass2){var c=!JU.C.renderPass2(this.colixA),g=!JU.C.renderPass2(this.colixB);if(!c||!g){if(b||!c&&!g)d=!0;this.g3d.setC(!c?this.colixB:this.colixA);a=!0}}if(d)return a;c=this.bond.isPartial();if(!c&&(0!=(this.bondOrder&256)&&(this.bondOrder&=-257),0!=(this.bondOrder&1023)&&(!this.showMultipleBonds||2==this.modeMultipleBond&&
1E3<this.mad||65536==(this.bondOrder&98304))))this.bondOrder=1;this.pa=this.a;this.pb=this.b;d=0;switch(this.bondOrder){case 1025:case 1041:case 1057:this.bondOrder=1;case 1:case 2:case 3:case 4:case 5:case 6:break;case 17:case 513:this.bondOrder=1;d=513==h?0:1;break;case 515:case 514:this.bondOrder=2;d=515==h?this.getAromaticDottedBondMask():0;break;default:98304==(this.bondOrder&98304)?(this.getMultipleBondSettings(this.bondOrder),this.bondOrder&=3,d=-2):c?(this.bondOrder=JU.Edge.getPartialBondOrder(h),
d=JU.Edge.getPartialBondDotted(h)):JU.Edge.isOrderH(this.bondOrder)?(this.bondOrder=1,this.hbondsSolid||(d=-1)):b&&(this.bondOrder=1,h=this.b.group.strutPoint,this.pa=this.setStrutPoint(this.a.group.strutPoint,this.pa),this.pb=this.setStrutPoint(h,this.pb),this.zA=this.pa.sZ,this.zB=this.pb.sZ)}this.xA=this.pa.sX;this.yA=this.pa.sY;this.xB=this.pb.sX;this.yB=this.pb.sY;this.mad=this.bond.mad;0<this.multipleBondRadiusFactor&&1<this.bondOrder&&(this.mad*=this.multipleBondRadiusFactor);this.dx=this.xB-
this.xA;this.dy=this.yB-this.yA;this.width=F(this.vwr.tm.scaleToScreen(w((this.zA+this.zB)/2),this.mad));this.wireframeOnly&&0<this.width&&(this.width=1);if(!this.isCartesian&&(this.asLineOnly=1>=this.width)&&this.isAntialiased)this.width=3,this.asLineOnly=!1;h=!this.isExport||1==this.mad?this.width:this.mad;switch(d){case -2:this.drawBond(0);this.getMultipleBondSettings(0);break;case -1:J.render.FontLineShapeRenderer.drawDashedCylinder(this.g3d,this.xA,this.yA,this.zA,this.xB,this.yB,this.zB,J.render.FontLineShapeRenderer.hDashes,
this.width,this.colixA,this.colixB,h,this.asLineOnly,this.s1);break;default:switch(this.bondOrder){case 4:this.bondOrder=2;h=this.multipleBondRadiusFactor;0==h&&1<this.width&&(this.width=w(0.5*this.width));h=this.multipleBondSpacing;0>h&&(this.multipleBondSpacing=0.3);this.drawBond(d);this.bondsPerp=!this.bondsPerp;this.bondOrder=2;this.drawBond(d>>2);this.bondsPerp=!this.bondsPerp;this.multipleBondSpacing=h;this.isPymol=!1;break;case 5:this.bondOrder=3;h=this.multipleBondRadiusFactor;0==h&&1<this.width&&
(this.width=w(0.5*this.width));h=this.multipleBondSpacing;0>h&&(this.multipleBondSpacing=0.2);this.drawBond(d);this.bondsPerp=!this.bondsPerp;this.bondOrder=2;this.multipleBondSpacing*=1.5;this.drawBond(d>>3);this.bondsPerp=!this.bondsPerp;this.multipleBondSpacing=h;this.isPymol=!1;break;case 6:this.bondOrder=4;h=this.multipleBondRadiusFactor;0==h&&1<this.width&&(this.width=w(0.5*this.width));h=this.multipleBondSpacing;0>h&&(this.multipleBondSpacing=0.15);this.drawBond(d);this.bondsPerp=!this.bondsPerp;
this.bondOrder=2;this.multipleBondSpacing*=1.5;this.drawBond(d>>4);this.bondsPerp=!this.bondsPerp;this.multipleBondSpacing=h;this.isPymol=!1;break;default:this.drawBond(d)}}return a},"~N");c(b,"setStrutPoint",function(a,d){if(-2147483648==a.sX)return d;var h=this.vwr.tm.transformPt(a);a.sX=h.x;a.sY=h.y;a.sZ=h.z;return a},"JU.Point3fi,JU.Point3fi");c(b,"getMultipleBondSettings",function(a){if(this.isPymol=0!=a){this.bondsPerp=!1;var d=(a>>2&63)/50;this.showMultipleBonds=0!=d;this.multipleBondRadiusFactor=
2*d/(3*(a&3)-1);this.multipleBondSpacing=3*this.multipleBondRadiusFactor/2*w(this.bond.mad/1E3)}else this.useBananas=this.vwr.getBoolean(603979886)&&!this.isPymol,this.multipleBondSpacing=this.vwr.getFloat(570425370),this.multipleBondRadiusFactor=this.vwr.getFloat(570425369),this.bondsPerp=this.useBananas||0<this.multipleBondSpacing&&0>this.multipleBondRadiusFactor,this.useBananas&&(this.multipleBondSpacing=0>this.multipleBondSpacing?0.4*-this.multipleBondSpacing:this.multipleBondSpacing),this.multipleBondRadiusFactor=
Math.abs(this.multipleBondRadiusFactor),0==this.multipleBondSpacing&&this.isCartesian&&(this.multipleBondSpacing=0.2);this.modeMultipleBond=this.vwr.g.modeMultipleBond;this.showMultipleBonds=0!=this.multipleBondSpacing&&0!=this.modeMultipleBond&&this.vwr.getBoolean(603979928)},"~N");c(b,"drawBond",function(a){var d=0!=(a&1),h=16384==(this.colixA&30720)||16384==(this.colixB&30720)?2:this.endcaps;if(this.isCartesian&&1==this.bondOrder&&!d)this.g3d.drawBond(this.pa,this.pb,this.colixA,this.colixB,h,
this.mad,-1);else{var b=0==this.dx&&0==this.dy;if(!b||!this.asLineOnly||this.isCartesian){var c=!this.isExport||1==this.mad?this.width:this.mad,g=1<this.bondOrder&&(this.isPymol||0<this.multipleBondSpacing),j=g&&(null!=this.vwr.getHybridizationAndAxes(this.a.i,this.z,this.x,"pz")||null!=this.vwr.getHybridizationAndAxes(this.b.i,this.z,this.x,"pz"))&&!Float.isNaN(this.x.x);if(b&&!g){a=w(this.width/8)+3;a=this.width+a;d=this.yA-w((this.bondOrder-1)*a/2);do J.render.FontLineShapeRenderer.fillCylinder(this.g3d,
this.colixA,this.colixB,h,this.xA,d,this.zA,this.xB,d,this.zB,c,this.asLineOnly),d+=a;while(0<--this.bondOrder)}else if(1==this.bondOrder)d?J.render.FontLineShapeRenderer.drawDashedCylinder(this.g3d,this.xA,this.yA,this.zA,this.xB,this.yB,this.zB,this.dashDots,this.width,this.colixA,this.colixB,c,this.asLineOnly,this.s1):J.render.FontLineShapeRenderer.fillCylinder(this.g3d,this.colixA,this.colixB,h,this.xA,this.yA,this.zA,this.xB,this.yB,this.zB,c,this.asLineOnly);else if(g)if(j||this.z.setT(JU.P3.getUnlikely()),
this.x.sub2(this.b,this.a),this.y.cross(this.x,this.z),this.y.normalize(),Float.isNaN(this.y.x)&&(this.z.setT(JU.P3.getUnlikely()),this.y.cross(this.x,this.z),this.y.cross(this.y,this.x),this.y.normalize()),this.bondsPerp&&this.y.cross(this.y,this.x),this.y.scale(this.multipleBondSpacing),this.x.setT(this.y),this.x.scale((this.bondOrder-1)/2),this.useBananas)switch(this.drawBanana(this.a,this.b,this.x,0),this.bondOrder){case 4:this.drawBanana(this.a,this.b,this.x,90),this.drawBanana(this.a,this.b,
this.x,-90);default:this.drawBanana(this.a,this.b,this.x,180);break;case 3:this.drawBanana(this.a,this.b,this.x,120),this.drawBanana(this.a,this.b,this.x,-120)}else{this.p1.sub2(this.a,this.x);for(this.p2.sub2(this.b,this.x);;){this.isCartesian?this.g3d.drawBond(this.p1,this.p2,this.colixA,this.colixB,h,this.mad,-2):(this.tm.transformPtScr(this.p1,this.s1),this.tm.transformPtScr(this.p2,this.s2),d?J.render.FontLineShapeRenderer.drawDashedCylinder(this.g3d,this.s1.x,this.s1.y,this.s1.z,this.s2.x,this.s2.y,
this.s2.z,this.dashDots,this.width,this.colixA,this.colixB,c,this.asLineOnly,this.s1):J.render.FontLineShapeRenderer.fillCylinder(this.g3d,this.colixA,this.colixB,h,this.s1.x,this.s1.y,this.s1.z,this.s2.x,this.s2.y,this.s2.z,c,this.asLineOnly));a>>=1;d=0!=(a&1);if(0>=--this.bondOrder)break;this.p1.add(this.y);this.p2.add(this.y);this.stepAxisCoordinates()}}else if(this.mag2d=Math.round(Math.sqrt(this.dx*this.dx+this.dy*this.dy)),this.resetAxisCoordinates(),this.isCartesian&&3==this.bondOrder)J.render.FontLineShapeRenderer.fillCylinder(this.g3d,
this.colixA,this.colixB,h,this.xAxis1,this.yAxis1,this.zA,this.xAxis2,this.yAxis2,this.zB,c,this.asLineOnly),this.stepAxisCoordinates(),this.x.sub2(this.b,this.a),this.x.scale(0.05),this.p1.sub2(this.a,this.x),this.p2.add2(this.b,this.x),this.g3d.drawBond(this.p1,this.p2,this.colixA,this.colixB,h,this.mad,-2),this.stepAxisCoordinates(),J.render.FontLineShapeRenderer.fillCylinder(this.g3d,this.colixA,this.colixB,h,this.xAxis1,this.yAxis1,this.zA,this.xAxis2,this.yAxis2,this.zB,c,this.asLineOnly);else for(;;){0!=
(a&1)?J.render.FontLineShapeRenderer.drawDashedCylinder(this.g3d,this.xAxis1,this.yAxis1,this.zA,this.xAxis2,this.yAxis2,this.zB,this.dashDots,this.width,this.colixA,this.colixB,c,this.asLineOnly,this.s1):J.render.FontLineShapeRenderer.fillCylinder(this.g3d,this.colixA,this.colixB,h,this.xAxis1,this.yAxis1,this.zA,this.xAxis2,this.yAxis2,this.zB,c,this.asLineOnly);a>>=1;if(0>=--this.bondOrder)break;this.stepAxisCoordinates()}}}},"~N");c(b,"resetAxisCoordinates",function(){var a=this.mag2d>>3;-1!=
this.multipleBondSpacing&&0>this.multipleBondSpacing&&(a*=-this.multipleBondSpacing);a=this.width+a;this.dxStep=w(a*this.dy/this.mag2d);this.dyStep=w(a*-this.dx/this.mag2d);this.xAxis1=this.xA;this.yAxis1=this.yA;this.xAxis2=this.xB;this.yAxis2=this.yB;a=this.bondOrder-1;this.xAxis1-=w(this.dxStep*a/2);this.yAxis1-=w(this.dyStep*a/2);this.xAxis2-=w(this.dxStep*a/2);this.yAxis2-=w(this.dyStep*a/2)});c(b,"stepAxisCoordinates",function(){this.xAxis1+=this.dxStep;this.yAxis1+=this.dyStep;this.xAxis2+=
this.dxStep;this.yAxis2+=this.dyStep});c(b,"getAromaticDottedBondMask",function(){var a=this.b.findAromaticNeighbor(this.a.i);return null==a?1:0>this.dx*(a.sY-this.yA)-this.dy*(a.sX-this.xA)?2:1});c(b,"drawBanana",function(a,d,h,b){this.g3d.addRenderer(553648143);this.vectorT.sub2(d,a);null==this.rot&&(this.rot=new JU.M3,this.a4=new JU.A4);this.a4.setVA(this.vectorT,3.141592653589793*b/180);this.rot.setAA(this.a4);this.pointT.setT(a);this.pointT3.setT(d);this.pointT2.ave(a,d);this.rot.rotate2(h,this.vectorT);
this.pointT2.add(this.vectorT);this.tm.transformPtScrT3(a,this.pointT);this.tm.transformPtScrT3(this.pointT2,this.pointT2);this.tm.transformPtScrT3(d,this.pointT3);a=Math.max(this.width,1);this.g3d.setC(this.colixA);this.g3d.fillHermite(5,a,a,a,this.pointT,this.pointT,this.pointT2,this.pointT3);this.g3d.setC(this.colixB);this.g3d.fillHermite(5,a,a,a,this.pointT,this.pointT2,this.pointT3,this.pointT3)},"JM.Atom,JM.Atom,JU.V3,~N")});m("J.render");x(["J.render.CageRenderer","JU.P3"],"J.render.UccageRenderer",
"JU.BS $.DF JU.BSUtil $.BoxInfo $.C $.SimpleUnitCell".split(" "),function(){var b=s(function(){this.unitcell=this.offsetT=this.offset=this.cellRange=this.vvertA=this.verticesT=null;this.ypos=this.xpos=this.lineheight=0;this.isPlanarGroup=!1;this.bsVerticals=null;r(this,arguments)},J.render,"UccageRenderer",J.render.CageRenderer);N(b,function(){this.verticesT=Array(8);this.cellRange=z(-1,[new JU.P3,new JU.P3]);this.offset=new JU.P3;this.offsetT=new JU.P3});f(b,"initRenderer",function(){for(var a=8;0<=
--a;)this.verticesT[a]=new JU.P3;this.tickEdges=JU.BoxInfo.uccageTickEdges;this.draw000=!1});f(b,"setPeriodicity",function(a,d){this.setShifts();var h;if(this.shifting){if(null==this.vvert){this.vvert=Array(8);for(var b=8;0<=--b;)this.vvert[b]=new JU.P3}if(this.shiftC&&1==this.periodicity){if(null==this.vvertA){this.vvertA=Array(8);for(b=8;0<=--b;)this.vvertA[b]=new JU.P3}h=JU.P3.newP(a[1]);h.sub(a[0]);h.scale(0.5);for(b=8;0<=--b;)this.pt.setT(a[b]),this.pt.sub(a[0]),this.pt.scaleAdd2(d,this.pt,a[0]),
this.pt.sub(h),this.tm.transformPtNoClip(this.pt,this.vvertA[b])}else if(this.shiftA){if(null==this.vvertA){this.vvertA=Array(8);for(b=8;0<=--b;)this.vvertA[b]=new JU.P3}h=JU.P3.newP(a[4]);h.sub(a[0]);h.scale(0.5);for(b=8;0<=--b;)this.pt.setT(a[b]),this.pt.sub(a[0]),this.pt.scaleAdd2(d,this.pt,a[0]),this.pt.sub(h),this.tm.transformPtNoClip(this.pt,this.vvertA[b])}else this.vvertA=null;h=JU.P3.newP(a[this.shiftB?2:1]);h.sub(a[0]);h.scale(0.5);for(b=8;0<=--b;)this.pt.setT(a[b]),this.pt.sub(a[0]),this.pt.scaleAdd2(d,
this.pt,a[0]),this.pt.sub(h),this.tm.transformPtNoClip(this.pt,this.vvert[b])}},"~A,~N");f(b,"render",function(){this.imageFontScaling=this.vwr.imageFontScaling;this.font3d=this.vwr.gdata.getFont3DScaled(this.shape.font3d,this.imageFontScaling);var a=this.vwr.getObjectMad10(5);if(0==a||this.vwr.isJmolDataFrame()||this.tm.isNavigating()&&this.vwr.getBoolean(603979890))return!1;this.colix=this.vwr.getObjectColix(5);var d=JU.C.renderPass2(this.colix);if(!this.isExport&&d!=this.vwr.gdata.isPass2)return d;
this.render1(a);return!1});c(b,"render1",function(a){this.g3d.setC(this.colix);this.unitcell=this.vwr.getCurrentUnitCell();if(null!=this.unitcell){this.isPolymer=this.unitcell.isPolymer();this.isSlab=this.unitcell.isSlab();this.periodicity=this.unitcell.getPeriodicity();this.nDims=this.unitcell.getDimensionality();this.isPlanarGroup=3==this.periodicity&&2==this.nDims;var d=this.unitcell.getUnitCellVerticesNoOffset();this.offset.setT(this.unitcell.getCartesianOffset());this.offsetT.setT(this.unitcell.getFractionalOrigin());
this.unitcell.toCartesian(this.offsetT,!0);this.offset.sub(this.offsetT);var h=this.vwr.getBoolean(603979856),b=this.unitcell.getUnitCellMultiplier(),c=null!=b&&!b.equals(J.render.UccageRenderer.fset0);c||(b=J.render.UccageRenderer.fset0);JU.SimpleUnitCell.getCellRange(b,this.cellRange);var g,j,k=Math.abs(b.z),l=this.vwr.shm.getShape(34);null!=l&&this.vwr.areAxesTainted()&&l.reinitShape();var f=null==l||0==this.vwr.getObjectMad10(1)||0!=l.axisXY.z&&(null==l.axes2||3==l.axes2.length)||null!=l.fixedOrigin||
0<l.fixedOriginUC.lengthSquared()?null:l.axisPoints,n=this.isExport||0==this.vwr.getObjectMad10(1)||2>this.vwr.getFloat(570425346)||null==f,l=f,h=h?JU.BoxInfo.facePoints:null;if(0==b.z){this.offsetT.setT(this.cellRange[0]);this.unitcell.toCartesian(this.offsetT,!0);this.offsetT.add(this.offset);l=0==this.cellRange[0].x&&0==this.cellRange[0].y&&0==this.cellRange[0].z?f:null;b=0;j=g=255;for(var d=JU.BoxInfo.unitCubePoints,q=8;0<=--q;)c=JU.P3.new3(d[q].x*(this.cellRange[1].x-this.cellRange[0].x),d[q].y*
(this.cellRange[1].y-this.cellRange[0].y),d[q].z*(this.cellRange[1].z-this.cellRange[0].z)),this.unitcell.toCartesian(c,!0),this.verticesT[q].add2(c,this.offsetT);this.renderCage(a,this.verticesT,h,l,b,g,j,1)}else for(var v=F(this.cellRange[0].x);v<this.cellRange[1].x;v++)for(var B=F(this.cellRange[0].y);B<this.cellRange[1].y;B++)for(var m=F(this.cellRange[0].z);m<this.cellRange[1].z;m++){c?(this.offsetT.set(v,B,m),this.offsetT.scale(k),this.unitcell.toCartesian(this.offsetT,!0),this.offsetT.add(this.offset),
l=0==v&&0==B&&0==m?f:null,b=n||null==l?0:3):(this.offsetT.setT(this.offset),b=n?0:3);j=g=255;for(q=8;0<=--q;)this.verticesT[q].add2(d[q],this.offsetT);this.renderCage(a,this.verticesT,h,l,b,g,j,k)}this.renderInfo()}},"~N");f(b,"renderCageLine",function(a,d,h,b,c){null!=this.bsVerticals&&this.bsVerticals.get(a)?null!=this.vvertA&&(4==a||8==a||12==a||16==a||0==a&&2!=this.periodicity)?(a=this.vvertA[d],h=this.vvertA[h]):(a=this.vvert[d],h=this.vvert[h]):(a=this.p3Screens[d],h=this.p3Screens[h]);this.renderLine(a,
h,b,c)},"~N,~N,~N,~N,~B");f(b,"setBSPeriod",function(){var a;null!=this.bsVerticals&&this.bsVerticals.clearAll();null!=this.bsPeriod&&this.bsPeriod.clearAll();switch(this.periodicity){case 3:a=null==this.bsPeriod?this.bsPeriod=new JU.BS:this.bsPeriod;3==this.nDims&&(a.set(0),a.set(10),a.set(16),a.set(22),null==this.bsVerticals&&(this.bsVerticals=new JU.BS),JU.BSUtil.copy2(a,this.bsVerticals));a.set(2);a.set(4);a.set(12);a.set(18);break;case 4:a=null==this.bsPeriod?this.bsPeriod=new JU.BS:this.bsPeriod;
a.set(2);a.set(6);a.set(4);a.set(8);null==this.bsVerticals&&(this.bsVerticals=new JU.BS);JU.BSUtil.copy2(a,this.bsVerticals);a.set(0);break;case 1:a=null==this.bsPeriod?this.bsPeriod=new JU.BS:this.bsPeriod;a.set(2);a.set(18);3==this.nDims&&(a.set(0),a.set(16));null==this.bsVerticals&&(this.bsVerticals=new JU.BS);JU.BSUtil.copy2(a,this.bsVerticals);a.set(4);break;case 2:a=null==this.bsPeriod?this.bsPeriod=new JU.BS:this.bsPeriod,a.set(0),a.set(4),a.set(12),a.set(10),null==this.bsVerticals&&(this.bsVerticals=
new JU.BS),JU.BSUtil.copy2(a,this.bsVerticals),a.set(2)}});c(b,"renderInfo",function(){var a=this.vwr.getBoolean(603979937);if(!this.isExport&&this.vwr.getBoolean(603979828)&&!this.vwr.isPreviewOnly&&this.vwr.gdata.setC(this.vwr.cm.colixBackgroundContrast)&&0==this.vwr.gdata.getTextPosition()){this.vwr.gdata.setFontBold("Monospaced",14*this.imageFontScaling);this.xpos=w(Math.floor(10*this.imageFontScaling));this.ypos=this.lineheight=w(Math.floor(15*this.imageFontScaling));if(!this.unitcell.isSimple()){var d=
this.unitcell.getUnitCellDisplayName();null!=d&&this.drawInfo(d,0,null);d=this.unitcell.getMoreInfo();if(null!=d)for(var h=0;h<d.size();h++)this.drawInfo(d.get(h),0,null);if(!a)return}this.drawInfo("a=",0,"\u00c5");this.isPolymer||this.drawInfo("b=",1,"\u00c5");!this.isPolymer&&(!this.isSlab&&!this.isPlanarGroup)&&this.drawInfo("c=",2,"\u00c5");this.isPolymer||(!this.isSlab&&!this.isPlanarGroup&&(this.drawInfo("\u03b1=",3,"\u00b0"),this.drawInfo("\u03b2=",4,"\u00b0")),this.drawInfo("\u03b3=",5,"\u00b0"))}});
c(b,"drawInfo",function(a,d,h){this.ypos+=this.lineheight;null!=h&&(a+=JU.DF.formatDecimal(this.unitcell.getUnitCellInfoType(d),3)+h);this.g3d.drawStringNoSlab(a,null,this.xpos,this.ypos,0,0)},"~S,~N,~S");b.fset0=JU.P3.new3(555,555,1)});m("JS");x(["JS.T"],"JS.ContextToken",["java.util.Hashtable","JS.SV"],function(){var b=s(function(){this.name0=this.forVars=this.contextVariables=null;r(this,arguments)},JS,"ContextToken",JS.T);b.newContext=c(b,"newContext",function(a){a=a?JS.ContextToken.newCmd(1275335685,
"{"):JS.ContextToken.newCmd(1275334681,"}");a.intValue=0;return a},"~B");b.newCmd=c(b,"newCmd",function(a,d){var h=new JS.ContextToken;h.tok=a;h.value=d;return h},"~N,~O");c(b,"addName",function(a){null==this.contextVariables&&(this.contextVariables=new java.util.Hashtable);this.contextVariables.put(a,JS.SV.newS("").setName(a))},"~S")});m("JS");x(null,"JS.ScriptContext",["java.util.Hashtable","JS.SV"],function(){var b=s(function(){this.aatoken=null;this.chk=this.allowJSThreads=!1;this.contextPath=
" >> ";this.vars=null;this.displayLoadErrorsSave=!1;this.errorType=this.errorMessageUntranslated=this.errorMessage=null;this.isEditorScript=this.isEditor=this.executionStepping=this.executionPaused=!1;this.functionName=null;this.iCommandError=-1;this.id=0;this.isComplete=!0;this.isTryCatch=this.isStateScript=this.isJSThread=this.isFunction=!1;this.forVars=null;this.iToken=0;this.lineEnd=2147483647;this.lineNumbers=this.lineIndices=null;this.mustResumeEval=!1;this.parentContext=this.parallelProcessor=
this.outputBuffer=null;this.pc0=this.pc=0;this.pcEnd=2147483647;this.scriptFileName=this.scriptExtensions=this.script=null;this.scriptLevel=0;this.htFileCache=this.statement=null;this.statementLength=0;this.token=null;this.tryPt=0;this.theToken=null;this.theTok=0;this.privateFuncs=this.why=this.pointers=null;r(this,arguments)},JS,"ScriptContext",null);u(b,function(){this.id=++JS.ScriptContext.contextCount});c(b,"setMustResume",function(){for(var a=this;null!=a;)a.mustResumeEval=!0,a.pc=a.pc0,a=a.parentContext});
c(b,"getVariable",function(a){for(var d=this,h;null!=d&&!d.isFunction;){if(null!=d.vars&&null!=(h=d.vars.get(a)))return h;d=d.parentContext}return null},"~S");c(b,"getFullMap",function(){var a=new java.util.Hashtable,d=this;for(null!=this.contextPath&&a.put("_path",JS.SV.newS(this.contextPath));null!=d&&!d.isFunction;){if(null!=d.vars)for(var h,b=d.vars.keySet().iterator();b.hasNext()&&((h=b.next())||1);)if(!a.containsKey(h)){var c=d.vars.get(h);(2!=c.tok||2147483647!=c.intValue)&&a.put(h,c)}d=d.parentContext}return a});
c(b,"saveTokens",function(a){this.aatoken=a;if(null==a)this.pointers=null;else{this.pointers=D(a.length,0);for(var d=this.pointers.length;0<=--d;)this.pointers[d]=null==a[d]?-1:a[d][0].intValue}},"~A");c(b,"restoreTokens",function(){if(null!=this.pointers)for(var a=this.pointers.length;0<=--a;)null!=this.aatoken[a]&&(this.aatoken[a][0].intValue=this.pointers[a]);return this.aatoken});c(b,"getTokenCount",function(){return null==this.aatoken?-1:this.aatoken.length});c(b,"getToken",function(a){return this.aatoken[a]},
"~N");b.contextCount=0});m("JS");x(["java.lang.Exception"],"JS.ScriptException",null,function(){var b=s(function(){this.untranslated=this.message=this.eval=null;this.isError=!1;r(this,arguments)},JS,"ScriptException",Exception);u(b,function(a,d,h,b){this.eval=a;this.message=d;(this.isError=b)&&this.eval.setException(this,d,h)},"JS.ScriptError,~S,~S,~B");c(b,"getErrorMessageUntranslated",function(){return this.untranslated});f(b,"getMessage",function(){return this.message});f(b,"toString",function(){return this.message})});
m("JS");x(["javajs.api.JSONEncodable","JS.T","JU.P3"],"JS.SV","java.util.Arrays $.Collections $.Hashtable JU.AU $.BArray $.BS $.Base64 $.Lst $.Measure $.PT $.SB J.api.Interface JM.BondSet JU.BSUtil $.Escape JV.Viewer".split(" "),function(){var b=s(function(){this.index=2147483647;this.myName=null;R("JS.SV.Sort")||JS.SV.$SV$Sort$();r(this,arguments)},JS,"SV",JS.T,javajs.api.JSONEncodable);b.newV=c(b,"newV",function(a,d){var h=new JS.SV;h.tok=a;h.value=d;return h},"~N,~O");b.newI=c(b,"newI",function(a){var d=
new JS.SV;d.tok=2;d.intValue=a;return d},"~N");b.newF=c(b,"newF",function(a){if(a!=a)return JS.SV.vNaN;var d=new JS.SV;d.tok=3;d.value=Float.$valueOf(a);return d},"~N");b.newS=c(b,"newS",function(a){return JS.SV.newV(4,a)},"~S");b.newT=c(b,"newT",function(a){return JS.SV.newSV(a.tok,a.intValue,a.value)},"JS.T");b.newSV=c(b,"newSV",function(a,d,h){a=JS.SV.newV(a,h);a.intValue=d;return a},"~N,~N,~O");c(b,"setv",function(a){this.index=a.index;this.intValue=a.intValue;this.tok=a.tok;this.value=a.value;
return this},"JS.SV");b.copySafely=c(b,"copySafely",function(a){return null==a.myName?a:(new JS.SV).setv(a)},"JS.SV");b.sizeOf=c(b,"sizeOf",function(a){switch(null==a?0:a.tok){case 10:return JS.SV.bsSelectToken(a).cardinality();case 15:return a.value.data.length;case 4:return a.value.length;case 7:return 2147483647==a.intValue?a.getList().size():JS.SV.sizeOf(JS.SV.selectItemTok(a,-2147483648));case 6:return a.value.size();case 14:return a.value.getFullMap().size();case 1073742335:case 1073742334:return-1;
case 2:return-2;case 3:return-4;case 8:return-8;case 9:return-16;case 11:return-32;case 12:return-64;default:return 0}},"JS.T");b.isVariableType=c(b,"isVariableType",function(a){return C(a,"JS.SV")||C(a,Boolean)||C(a,Integer)||C(a,Float)||"string"==typeof a||C(a,"JU.T3")||C(a,"JU.BS")||C(a,"JU.P4")||C(a,"JU.Quat")||C(a,"JU.M34")||C(a,"java.util.Map")||C(a,"JU.Lst")||C(a,"JU.BArray")||C(a,"JS.ScriptContext")||JS.SV.isArray(a)},"~O");b.isArray=c(b,"isArray",function(a){return C(a,Array)},"~O");b.getVariable=
c(b,"getVariable",function(a){return null==a?JS.SV.newS(""):C(a,"JS.SV")?a:C(a,Boolean)?JS.SV.getBoolean(a.booleanValue()):C(a,Integer)?JS.SV.newI(a.intValue()):C(a,Float)?JS.SV.newV(3,a):"string"==typeof a?(a=JS.SV.unescapePointOrBitsetAsVariable(a),C(a,"JS.SV")?a:JS.SV.newV(4,a)):C(a,"JU.P3")?JS.SV.newV(8,a):C(a,"JU.V3")?JS.SV.newV(8,JU.P3.newP(a)):C(a,"JU.BS")?JS.SV.newV(10,a):C(a,"JU.P4")?JS.SV.newV(9,a):C(a,"JU.Quat")?JS.SV.newV(9,a.toPoint4f()):C(a,"JU.M34")?JS.SV.newV(C(a,"JU.M4")?12:11,a):
C(a,"java.util.Map")?JS.SV.getVariableMap(a):C(a,"JU.Lst")?JS.SV.getVariableList(a):C(a,"JU.BArray")?JS.SV.newV(15,a):C(a,"JS.ScriptContext")?JS.SV.newV(14,a):JS.SV.isASV(a)?JS.SV.getVariableAV(a):JU.AU.isAI(a)?JS.SV.getVariableAI(a):JU.AU.isAB(a)?JS.SV.getVariableAB(a):JU.AU.isAF(a)?JS.SV.getVariableAF(a):JU.AU.isAD(a)?JS.SV.getVariableAD(a):JU.AU.isAS(a)?JS.SV.getVariableAS(a):JU.AU.isAP(a)?JS.SV.getVariableAP(a):JU.AU.isAII(a)?JS.SV.getVariableAII(a):JU.AU.isAFF(a)?JS.SV.getVariableAFF(a):JU.AU.isASS(a)?
JS.SV.getVariableASS(a):JU.AU.isADD(a)?JS.SV.getVariableADD(a):JU.AU.isAFloat(a)?JS.SV.newV(13,a):JS.SV.newJSVar(a)},"~O");b.isASV=c(b,"isASV",function(a){return!JV.Viewer.isSwingJS?a&&a[0]&&"JS.SV"==a[0].__CLASS_NAME__:C(a,Array)},"~O");b.newJSVar=c(b,"newJSVar",function(a){var d,h,b,c,g;switch(a.BYTES_PER_ELEMENT?Array:a.constructor){case Boolean:d=0;h=a;break;case Number:d=1;b=a;break;case Array:d=2;c=a;break;case Object:d=3,c=a,g=Object.keys(a)}switch(d){case 0:return h?JS.SV.vT:JS.SV.vF;case 1:return 2147483647<
b||b!=Math.floor(b)?JS.SV.newF(b):JS.SV.newI(F(b));case 2:g=new JU.Lst;a=0;for(d=c.length;a<d;a++)g.addLast(JS.SV.newJSVar(c[a]));return JS.SV.getVariableList(g);case 3:d=new java.util.Hashtable;for(a=g.length;0<=--a;)h=null,h=c[g[a]],d.put(g[a],JS.SV.newJSVar(h));return JS.SV.getVariableMap(d)}return JS.SV.newS(a.toString())},"~O");b.getVariableMap=c(b,"getVariableMap",function(a){for(var d=a,h=null,b,c=d.values().iterator();c.hasNext()&&((b=c.next())||1);){h=b;break}if(!C(h,"JS.SV")){a=new java.util.Hashtable;
for(var g,d=d.entrySet().iterator();d.hasNext()&&((g=d.next())||1);)a.put(g.getKey(),JS.SV.getVariable(g.getValue()))}return JS.SV.newV(6,a)},"java.util.Map");b.getVariableList=c(b,"getVariableList",function(a){var d=a.size();if(0<d&&C(a.get(0),"JS.SV"))return JS.SV.newV(7,a);for(var h=new JU.Lst,b=0;b<d;b++)h.addLast(JS.SV.getVariable(a.get(b)));return JS.SV.newV(7,h)},"JU.Lst");b.getVariableAV=c(b,"getVariableAV",function(a){for(var d=new JU.Lst,h=0;h<a.length;h++)d.addLast(a[h]);return JS.SV.newV(7,
d)},"~A");b.getVariableAD=c(b,"getVariableAD",function(a){for(var d=new JU.Lst,h=0;h<a.length;h++)d.addLast(JS.SV.newV(3,Float.$valueOf(a[h])));return JS.SV.newV(7,d)},"~A");b.getVariableAO=c(b,"getVariableAO",function(a){for(var d=new JU.Lst,h=0;h<a.length;h++)d.addLast(JS.SV.getVariable(a[h]));return JS.SV.newV(7,d)},"~A");b.getVariableAS=c(b,"getVariableAS",function(a){for(var d=new JU.Lst,h=0;h<a.length;h++)d.addLast(JS.SV.newV(4,a[h]));return JS.SV.newV(7,d)},"~A");b.getVariableAP=c(b,"getVariableAP",
function(a){for(var d=new JU.Lst,h=0;h<a.length;h++)d.addLast(JS.SV.newV(8,a[h]));return JS.SV.newV(7,d)},"~A");b.getVariableAFF=c(b,"getVariableAFF",function(a){for(var d=new JU.Lst,h=0;h<a.length;h++)d.addLast(JS.SV.getVariableAF(a[h]));return JS.SV.newV(7,d)},"~A");b.getVariableADD=c(b,"getVariableADD",function(a){for(var d=new JU.Lst,h=0;h<a.length;h++)d.addLast(JS.SV.getVariableAD(a[h]));return JS.SV.newV(7,d)},"~A");b.getVariableASS=c(b,"getVariableASS",function(a){for(var d=new JU.Lst,h=0;h<
a.length;h++)d.addLast(JS.SV.getVariableAS(a[h]));return JS.SV.newV(7,d)},"~A");b.getVariableAII=c(b,"getVariableAII",function(a){for(var d=new JU.Lst,h=0;h<a.length;h++)d.addLast(JS.SV.getVariableAI(a[h]));return JS.SV.newV(7,d)},"~A");b.getVariableAF=c(b,"getVariableAF",function(a){for(var d=new JU.Lst,h=0;h<a.length;h++)d.addLast(JS.SV.newV(3,Float.$valueOf(a[h])));return JS.SV.newV(7,d)},"~A");b.getVariableAI=c(b,"getVariableAI",function(a){for(var d=new JU.Lst,h=0;h<a.length;h++)d.addLast(JS.SV.newI(a[h]));
return JS.SV.newV(7,d)},"~A");b.getVariableAB=c(b,"getVariableAB",function(a){for(var d=new JU.Lst,h=0;h<a.length;h++)d.addLast(JS.SV.newI(a[h]));return JS.SV.newV(7,d)},"~A");c(b,"setName",function(a){this.myName=a;return this},"~S");c(b,"increment",function(a){switch(this.tok){case 2:return this.intValue+=a,!0;case 3:return this.value=Float.$valueOf(this.value.floatValue()+a),!0;default:return!1}},"~N");c(b,"asBoolean",function(){return JS.SV.bValue(this)});c(b,"asInt",function(){return JS.SV.iValue(this)});
c(b,"asFloat",function(){return JS.SV.fValue(this)});c(b,"asString",function(){return JS.SV.sValue(this)});b.oValue=c(b,"oValue",function(a){if(!C(a,"JS.SV"))return a;switch(a.tok){case 1073742335:return Boolean.TRUE;case 0:case 1073742334:return Boolean.FALSE;case 2:return Integer.$valueOf(a.intValue);case 10:case 1275068418:return JS.SV.selectItemVar(a).value;default:return a.value}},"~O");b.nValue=c(b,"nValue",function(a){switch(null==a?0:a.tok){case 3:return a.value;case 2:a=a.intValue;break;
case 4:if(0<=a.value.indexOf("."))return Float.$valueOf(JS.SV.toFloat(a.value));a=F(JS.SV.toFloat(a.value));break;case 8:return Float.$valueOf(a.value.length());default:a=0}return Integer.$valueOf(a)},"JS.T");b.bValue=c(b,"bValue",function(a){switch(null==a?0:a.tok){case 1073742335:case 14:return!0;case 1073742334:return!1;case 2:return 0!=a.intValue;case 3:case 4:case 7:return 0!=JS.SV.fValue(a);case 10:case 15:return 0!=JS.SV.iValue(a);case 8:case 9:case 11:case 12:return 1E-4<Math.abs(JS.SV.fValue(a));
case 6:return!a.getMap().isEmpty();default:return!1}},"JS.T");b.iValue=c(b,"iValue",function(a){switch(null==a?0:a.tok){case 1073742335:return 1;case 1073742334:return 0;case 2:return a.intValue;case 3:case 7:case 4:case 8:case 9:case 11:case 12:case 134221850:return F(JS.SV.fValue(a));case 10:return JS.SV.bsSelectToken(a).cardinality();case 15:return a.value.data.length;default:return 0}},"JS.T");b.fValue=c(b,"fValue",function(a){switch(null==a?0:a.tok){case 1073742335:return 1;case 1073742334:return 0;
case 2:return a.intValue;case 3:return a.value.floatValue();case 7:if(2147483647==a.intValue)return a.getList().size();case 4:return JS.SV.toFloat(JS.SV.sValue(a));case 10:case 15:return JS.SV.iValue(a);case 8:return a.value.length();case 9:return JU.Measure.distanceToPlane(a.value,JS.SV.pt0);case 11:var d=new JU.P3;a.value.rotate(d);return d.length();case 12:return d=new JU.P3,a.value.rotTrans(d),d.length();default:return 0}},"JS.T");b.sValue=c(b,"sValue",function(a){if(null==a)return"";var d;switch(a.tok){case 1073742335:return"true";
case 1073742334:return"false";case 2:return""+a.intValue;case 10:return d=JS.SV.bsSelectToken(a),C(a.value,"JM.BondSet")?JU.Escape.eBond(d):JU.Escape.eBS(d);case 7:var h=a.getList();d=a.intValue;0>=d&&(d=h.size()-d);if(2147483647!=d)return 1>d||d>h.size()?"":JS.SV.sValue(h.get(d-1));case 6:case 14:if("string"==typeof a.value)return a.value;d=new JU.SB;JS.SV.sValueArray(d,a,"","",!1,!0,!0,2147483647,!1);return JU.PT.rep(d.toString(),"\n\x00"," ");case 4:return h=a.value,d=a.intValue,0>=d&&(d=h.length-
d),2147483647==d?h:1>d||d>h.length?"":""+h.charAt(d-1);case 8:return JU.Escape.eP(a.value);case 9:return JU.Escape.eP4(a.value);case 11:case 12:return JU.Escape.e(a.value);default:return a.value.toString()}},"JS.T");b.sValueArray=c(b,"sValueArray",function(a,d,h,b,c,g,j,k,l){switch(d.tok){case 6:case 14:case 7:var f=";"+d.hashCode()+";";if(0<=h.indexOf(f)){a.append(c?7==d.tok?"[ ]":"{ }":(7==d.tok?"":"\x00")+'"<'+(null==d.myName?"circular reference":d.myName)+'>"');break}h+=f;if(7==d.tok){if(!j)break;
g||a.append(c?"[ ":b+"[\n");d=d.getList();for(f=0;f<d.size();f++){c&&0<f&&a.append(",");var n=d.get(f);JS.SV.sValueArray(a,n,h,b+"  ",c,0==b.length&&!c&&JS.SV.isRawType(n.tok),j,k,l);c||a.append("\n")}g||a.append(c?" ]":b+"]")}else 0<=--k&&(g=14==d.tok?d.value.getFullMap():d.getMap(),JS.SV.sValueAddKeys(a,h,g,b,c,j,k,l));break;default:if(!j)break;!g&&!c&&a.append(b);a.append(c?d.escape():JS.SV.sValue(d))}},"JU.SB,JS.SV,~S,~S,~B,~B,~B,~N,~B");b.sValueAddKeys=c(b,"sValueAddKeys",function(a,d,h,b,c,
g,j,k){if(!(0>j)){var l=h.keySet(),l=h.keySet().toArray(Array(l.size()));java.util.Arrays.sort(l);if(c){a.append("{ ");for(var f="",n=0;n<l.length;n++){c=l[n];var q=h.get(c);if(!k||!(7==q.tok&&0==q.getList().size()||6==q.tok&&q.getMap().isEmpty()))g?a.append(f).append(JU.PT.esc(c)).append(":"):a.appendC(" ").append(c),JS.SV.sValueArray(a,q,d,b+"  ",!0,!1,g,j,k),f=","}a.append(" }");g||a.append("\n")}else{a.append(b).append("{\n");b+="  ";for(n=0;n<l.length;n++)a.append(b),c=l[n],a.append(JU.PT.esc(c)).append("  :"),
f=new JU.SB,C(h.get(c),"JS.SV")||h.put(c,JS.SV.getVariable(h.get(c))),q=h.get(c),c=JS.SV.isRawType(q.tok),JS.SV.sValueArray(f,q,d,b,c,!1,g,j,k),f=f.toString(),c&&g?a.append("  "):a.append("\n"),a.append(f).append("\n");a.append(b.substring(1)).append("}")}}},"JU.SB,~S,java.util.Map,~S,~B,~B,~N,~B");b.isRawType=c(b,"isRawType",function(a){switch(a){case 4:case 3:case 2:case 8:case 9:case 10:case 15:case 1073742335:case 1073742334:return!0}return!1},"~N");b.ptValue=c(b,"ptValue",function(a){switch(a.tok){case 8:return a.value;
case 4:if(a=JU.Escape.uP(a.value),C(a,"JU.P3"))return a}return null},"JS.SV");b.pt4Value=c(b,"pt4Value",function(a){switch(a.tok){case 9:return a.value;case 4:a=JU.Escape.uP(a.value);if(!C(a,"JU.P4"))break;return a}return null},"JS.SV");b.toFloat=c(b,"toFloat",function(a){return a.equalsIgnoreCase("true")?1:0==a.length||a.equalsIgnoreCase("false")?0:JU.PT.parseFloatStrict(JU.PT.trim(a," \t\n"))},"~S");b.concatList=c(b,"concatList",function(a,d,h){var b=a.getList(),c=d.getList();if(!h){if(null==c)b.addLast(JS.SV.newT(d));
else for(h=0;h<c.size();h++)b.addLast(c.get(h));return a}var g=new JU.Lst;if(null==b)g.addLast(a);else for(h=0;h<b.size();h++)g.addLast(b.get(h));if(null==c)g.addLast(d);else for(h=0;h<c.size();h++)g.addLast(c.get(h));return JS.SV.getVariableList(g)},"JS.SV,JS.SV,~B");b.bsSelectToken=c(b,"bsSelectToken",function(a){return JS.SV.selectItemTok(a,-2147483648).value},"JS.T");b.bsSelectRange=c(b,"bsSelectRange",function(a,d){a=JS.SV.selectItemTok(a,-2147483648);a=JS.SV.selectItemTok(a,0>=d?d:1);a=JS.SV.selectItemTok(a,
0>=d?2147483646:d);return a.value},"JS.T,~N");b.selectItemVar=c(b,"selectItemVar",function(a){return 2147483647!=a.index||(7==a.tok||15==a.tok)&&2147483647==a.intValue?a:JS.SV.selectItemTok(a,-2147483648)},"JS.SV");b.selectItemTok=c(b,"selectItemTok",function(a,d){switch(a.tok){case 11:case 12:case 10:case 7:case 15:case 4:break;default:return C(a,"JS.SV")&&null!=a.myName?JS.SV.copySafely(a):a}var h=null,b=null,c=a.intValue,g=-2147483648==d;if(2147483647==c)return g&&4==a.tok?a:JS.SV.newSV(a.tok,
g?c:d,a.value);var j=0,k=C(a,"JS.SV")&&2147483647!=a.index,l=JS.SV.newSV(a.tok,2147483647,null);switch(a.tok){case 10:C(a.value,"JM.BondSet")?(h=JM.BondSet.newBS(a.value),j=h.cardinality()):(h=JU.BSUtil.copy(a.value),j=k?1:h.cardinality());break;case 15:j=a.value.data.length;break;case 7:j=a.getList().size();break;case 4:b=a.value;j=b.length;break;case 11:j=-3;break;case 12:j=-4}if(0>j){j=-j;if(0<c&&Math.abs(c)>j)return l=c%10,c=w((c-l)/10),0<l&&l<=j&&c<=j?JS.SV.newV(3,Float.$valueOf(a.value.getElement(c-
1,l-1))):JS.SV.newV(4,"");if(Math.abs(c)>j)return JS.SV.newV(4,"");h=M(j,0);0>c?a.value.getColumn(-1-c,h):a.value.getRow(c-1,h);return g?JS.SV.getVariableAF(h):1>d||d>j?JS.SV.newV(4,""):JS.SV.newV(3,Float.$valueOf(h[d-1]))}0>=c&&(c=j+c);g||(1>c&&(c=1),0==d?d=j:0>d&&(d=j+d),d<c&&(d=c));switch(a.tok){case 10:l.value=h;if(k){1<c&&h.clearAll();break}if(g){c==j?d=h.length()-1:1==c&&(d=h.nextSetBit(0));if(-1<=d){h.clearAll();0<=d&&h.set(d);break}d=c}j=0;for(g=h.nextSetBit(0);0<=g;g=h.nextSetBit(g+1))(++j<
c||j>d)&&h.clear(g);break;case 4:l.value=0>--c||c>=j?"":g?b.substring(c,c+1):b.substring(c,Math.min(d,j));break;case 7:if(0>--c||c>=j)return JS.SV.newV(4,"");if(g)return a.getList().get(c);h=new JU.Lst;g=a.getList();b=Math.min(d,j)-c;for(j=0;j<b;j++)h.addLast(JS.SV.newT(g.get(j+c)));l.value=h;break;case 15:if(0>--c||c>=j)return JS.SV.newV(4,"");h=a.value.data;if(g)return JS.SV.newI(h[c]);g=O(Math.min(d,j)-c,0);for(j=g.length;0<=--j;)g[j]=h[c+j];l.value=new JU.BArray(g)}return l},"JS.T,~N");c(b,"setSelectedValue",
function(a,d,h){if(2147483647!=a){var b;switch(this.tok){case 11:case 12:b=11==this.tok?3:4;if(2147483647!=d){var c=a;if(0<d&&d<=b&&c<=b){this.value.setElement(c-1,d-1,JS.SV.fValue(h));break}}if(0!=a&&Math.abs(a)<=b&&(11==this.tok&&8==h.tok||12==this.tok&&9==h.tok||7==h.tok)){switch(h.tok){default:case 7:c=h.getList();if(c.size()!=b)return;h=M(b,0);for(d=0;d<b;d++)h[d]=JS.SV.fValue(c.get(d));break;case 8:h=h.value;h=M(-1,[h.x,h.y,h.z]);break;case 9:h=h.value,h=M(-1,[h.x,h.y,h.z,h.w])}0<a?this.value.setRowA(a-
1,h):this.value.setColumnA(-1-a,h);break}break;case 4:b=this.value;c=b.length;0>=a&&(a=c+a);for(0>--a&&(a=0);a>=b.length;)b+=" ";if(2147483647==d)d=a;else for(0>--d&&(d=c+d);d>=b.length;)b+=" ";d>=a&&(this.value=b.substring(0,a)+JS.SV.sValue(h)+b.substring(++d));this.intValue=this.index=2147483647;break;case 7:c=this.value;b=c.size();0>=a&&(a=b+a);0>--a&&(a=0);if(b<=a)for(d=b;d<=a;d++)c.addLast(JS.SV.newV(4,""));c.set(a,h)}}},"~N,~N,JS.SV");c(b,"escape",function(){switch(this.tok){case 4:return JU.PT.esc(this.value);
case 11:case 12:return JU.PT.toJSON(null,this.value);case 7:case 6:case 14:var a=new JU.SB;JS.SV.sValueArray(a,this,"","",!0,!1,!0,2147483647,!1);return a.toString();default:return JS.SV.sValue(this)}});b.getJvxlCoder=c(b,"getJvxlCoder",function(){return null==JS.SV.jvxlCoder?JS.SV.jvxlCoder=J.api.Interface.getInterface("J.jvxl.data.JvxlCoder",null,"script"):JS.SV.jvxlCoder});b.encodeBitSet90_35=c(b,"encodeBitSet90_35",function(a){return JS.SV.getJvxlCoder().jvxlEncodeBitSet90_35(a)},"JU.BS");b.decodeBase90_35=
c(b,"decodeBase90_35",function(a){return JS.SV.getJvxlCoder().jvxlDecodeBitSet90_35(a)},"~S");b.unescapePointOrBitsetAsVariable=c(b,"unescapePointOrBitsetAsVariable",function(a){if(null==a)return a;var d=null,h=null;if(C(a,"JS.SV"))switch(a.tok){case 8:case 9:case 11:case 12:case 10:d=a.value;break;case 4:h=a.value;break;default:h=JS.SV.sValue(a)}else"string"==typeof a&&(h=a);if(null!=h){if(0==h.length)return h;if(h.startsWith(";base90+35,"))return JS.SV.decodeBase90_35(h)}null==d&&(d=JU.Escape.uABsM(h));
return C(d,"JU.P3")?JS.SV.newV(8,d):C(d,"JU.P4")?JS.SV.newV(9,d):C(d,"JU.BS")?(null!=h&&0==h.indexOf("[{")&&(d=JM.BondSet.newBS(d)),JS.SV.newV(10,d)):C(d,"JU.M34")?JS.SV.newV(C(d,"JU.M3")?11:12,d):a},"~O");b.getBoolean=c(b,"getBoolean",function(a){return JS.SV.newT(a?JS.SV.vT:JS.SV.vF)},"~B");b.sprintf=c(b,"sprintf",function(a,d){if(null==d)return a;var h=7==d.tok,b=0<=a.indexOf("d")||0<=a.indexOf("i")?D(1,0):null,c=0<=a.indexOf("f")?M(1,0):null,g=0<=a.indexOf("e")?S(1,0):null,j=0<=a.indexOf("s"),
k=0<=a.indexOf("p")&&(h||8==d.tok),l=0<=a.indexOf("q")&&(h||9==d.tok),f=z(-1,[b,c,g,null,null,null]);if(!h)return JS.SV.sprintf(a,d,f,b,c,g,j,k,l);for(var h=d.getList(),n=Array(h.size()),q=0;q<n.length;q++)n[q]=JS.SV.sprintf(a,h.get(q),f,b,c,g,j,k,l);return n},"~S,JS.SV");b.sprintf=c(b,"sprintf",function(a,d,h,b,c,g,j,k,l){if(6==d.tok){var f=a.indexOf("[");if(0<=f){var n;d=d.getMap().get(a.substring(f+1,n=a.indexOf("]")));a=a.substring(0,f)+a.substring(n+1)}}null!=b&&(b[0]=JS.SV.iValue(d));null!=
c&&(c[0]=JS.SV.fValue(d));null!=g&&(g[0]=JS.SV.fValue(d));j&&(h[3]=JS.SV.sValue(d));k&&(h[4]=d.value);l&&(h[5]=d.value);return JU.PT.sprintf(a,"IFDspq",h)},"~S,JS.SV,~A,~A,~A,~A,~B,~B,~B");b.getFormatType=c(b,"getFormatType",function(a){return 0<=a.indexOf(";")?-1:";json;base64;base90+35;bytearray;array;string;bitset;xyz;abc;uvw;rxyz;".indexOf(";"+a.toLowerCase()+";")},"~S");b.format=c(b,"format",function(a,d){switch(a.length){case 0:return"";case 1:return JS.SV.sValue(a[0]);case 2:if(2147483647==
d&&(d=JS.SV.getFormatType(a[0].asString())),0<=d)return JS.SV.getFormat(a[1],d)}var b=JU.PT.split(JU.PT.rep(JS.SV.sValue(a[0]),"%%","\u0001"),"%");if(0==b.length)return"";var c=new JU.SB;c.append(b[0]);for(var e=1;e<b.length;e++){var g=JS.SV.sprintf(JU.PT.formatCheck("%"+b[e]),6==a[1].tok?a[1]:7==a[1].tok?a[1].getList().get(e-1):e<a.length?a[e]:null);if(JU.AU.isAS(g))for(var j=0;j<g.length;j++)c.append(g[j]).append("\n");else c.append(g)}return c.toString()},"~A,~N");b.getFormat=c(b,"getFormat",function(a,
d){switch(d){case 0:var b=a.myName;a.myName=null;var c=a.toJSON();a.myName=b;return c;case 5:case 22:case 32:case 38:var e;switch(a.tok){case 15:e=JU.AU.arrayCopyByte(a.value.data,-1);break;case 7:b=a.getList();if(32==d){e=new JU.Lst;for(c=b.size();0<=--c;)e.addLast(b.get(c));return e}e=O(b.size(),0);for(c=e.length;0<=--c;)e[c]=b.get(c).asInt();break;default:if(b=a.asString(),b.startsWith(";base64,")){if(5==d)return b;e=JU.Base64.decodeBase64(b)}else{if(38<=d)return b;e=b.getBytes()}}return JS.SV.fromBytes(e,
d)}return null},"JS.SV,~N");b.fromBytes=c(b,"fromBytes",function(a,d){switch(d){case 22:return new JU.BArray(a);case 5:return";base64,"+JU.Base64.getBase64(a).toString();case 32:return JS.SV.getVariable(a);case 38:return String.instantialize(a)}return null},"~A,~N");b.getBitSet=c(b,"getBitSet",function(a,d){switch(a.tok){case 10:return(2147483647==a.index?JS.SV.selectItemTok(a,-2147483648):a).value;case 7:return JS.SV.unEscapeBitSetArray(a.getList(),d);default:return d?null:new JU.BS}},"JS.SV,~B");
b.unEscapeBitSetArray=c(b,"unEscapeBitSetArray",function(a,d){for(var b=new JU.BS,c=0;c<a.size();c++){var e=a.get(c);if(2==e.tok&&0<=e.intValue)b.set(e.intValue);else if(7==e.tok){e=JS.SV.unEscapeBitSetArray(e.getList(),!0);if(null==e)return d?null:new JU.BS;b.or(e)}else if(!JS.SV.unEscapeBitSet(e,b))return d?null:new JU.BS}return b},"JU.Lst,~B");b.areEqual=c(b,"areEqual",function(a,d){if(null==a||null==d)return!1;if(null!=a.value&&a.value===d.value)return!0;if(a.tok==d.tok)switch(a.tok){case 2:if(2==
d.tok)return a.intValue==d.intValue;break;case 4:return a.value.equalsIgnoreCase(d.value);case 10:case 15:case 6:case 7:case 14:return a.equals(d);case 8:return 1E-6>a.value.distance(d.value);case 9:return 1E-6>a.value.distance4(d.value);case 11:return a.value.equals(d.value);case 12:return a.value.equals(d.value)}else if(10==a.tok&&4==d.tok&&d.value.startsWith(";base90+35,"))return a.value.equals(JS.SV.decodeBase90_35(d.value));return a.isNaN()?d.isNaN():1E-6>Math.abs(JS.SV.fValue(a)-JS.SV.fValue(d))},
"JS.SV,JS.SV");b.isLike=c(b,"isLike",function(a,d){return null!=a&&null!=d&&4==a.tok&&4==d.tok&&JU.PT.isLike(a.value,d.value)},"JS.SV,JS.SV");b.contains=c(b,"contains",function(a,d){return null!=a&&null!=d&&4==a.tok&&4==d.tok&&a.value.contains(d.value)},"JS.SV,JS.SV");c(b,"sortOrReverse",function(a){var d=this.getList();if(null!=d&&1<d.size())if(-2147483648==a){a=d.size();for(var b=0;b<a;b++){var c=d.get(b);d.set(b,d.get(--a));d.set(a,c)}}else java.util.Collections.sort(this.getList(),T(JS.SV.Sort,
this,null,--a,null));return this},"~N");c(b,"pushPop",function(a,d){if(null==a){if(4==this.tok){if(null==d){var b=this.value,c=b.length-1;if(0>c)return JS.SV.newS("");var e=b.substring(c);this.value=b.substring(0,c);return JS.SV.newS(e)}this.value+=JS.SV.sValue(d);return this}c=this.getMap();if(null==c){b=this.getList();if(null==d||null==b)return null==b||0==b.size()?JS.SV.newS(""):b.removeItemAt(b.size()-1);b.addLast(JS.SV.copySafely(d))}else null==d?c.clear():(b=d.getMap(),null!=b&&c.putAll(b))}else{c=
this.getMap();if(null==d){b=null;if(null==c){var c=this.getList(),e=c.size(),g=JS.SV.iValue(a)-1;0>g&&(g+=e);0<=g&&g<e&&(b=c.removeItemAt(g))}else b=c.remove(a.asString());return null==b?JS.SV.newS(""):b}null!=c&&this.addToMap(c,a,d)}return this},"JS.SV,JS.SV");c(b,"addToMap",function(a,d,b){a.put(d.asString(),JS.SV.copySafely(b))},"java.util.Map,JS.SV,JS.SV");b.unEscapeBitSet=c(b,"unEscapeBitSet",function(a,d){switch(a.tok){case 4:var b=JU.BS.unescape(a.value);if(null==b)break;d.or(b);return!0;case 10:return d.or(a.value),
!0}return!1},"JS.SV,JU.BS");b.strListValue=c(b,"strListValue",function(a){if(7!=a.tok)return z(-1,[JS.SV.sValue(a)]);a=a.getList();for(var d=Array(a.size()),b=a.size();0<=--b;)d[b]=JS.SV.sValue(a.get(b));return d},"JS.T");b.getArrayDepth=c(b,"getArrayDepth",function(a){for(var d=0,b;7==a.tok&&0<(b=a.getList()).size();)d++,a=b.get(0);return d},"JS.T");b.fflistValue=c(b,"fflistValue",function(a){if(7!=a.tok)return z(-1,[M(-1,[JS.SV.fValue(a)])]);a=a.getList();var d=a.size(),b;b=JU.AU.newFloat2(d);for(var c=
b.length;0<=--c;)b[c]=JS.SV.flistValue(c>=d?null:a.get(c),0);return b},"JS.T,~N");b.flistValue=c(b,"flistValue",function(a,d){if(null==a||7!=a.tok)return M(-1,[JS.SV.fValue(a)]);var b=a.getList(),c;c=M(Math.max(d,b.size()),0);0==d&&(d=c.length);for(var e=Math.min(b.size(),d);0<=--e;)c[e]=JS.SV.fValue(b.get(e));return c},"JS.T,~N");c(b,"toArray",function(){var a,d,b=null,c=null;switch(this.tok){case 10:d=new JU.Lst;a=JS.SV.getBitSet(this,!0);for(var e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))d.addLast(JS.SV.newI(e));
return JS.SV.newV(7,d);case 11:b=this.value;a=3;break;case 12:c=this.value;a=4;break;case 7:return this;case 1275068418:return this.arrayToList(new JS.SV);default:return d=new JU.Lst,d.addLast(this),JS.SV.newV(7,d)}d=new JU.Lst;for(e=0;e<a;e++){var g=M(a,0);null==b?c.getRow(e,g):b.getRow(e,g);d.addLast(JS.SV.getVariableAF(g))}return JS.SV.newV(7,d)});c(b,"arrayToList",function(a){if(1275068418!=this.tok||null==a)return null;for(var d=this.value,b=new JU.Lst,c=0,e=d.length;c<e;c++)b.addLast(JS.SV.getVariable(d[c]));
a.tok=7;a.value=b;return a},"JS.SV");c(b,"mapValue",function(a){switch(this.tok){case 6:var d=this.value.get(a);return null==d&&a.equals("length")&&this.value.containsKey("_DATA_")?(d=this.value.get("_DATA_"),JS.SV.newI(d.value.data.length)):d;case 14:return d=this.value,a.equals("_path")?JS.SV.newS(d.contextPath):d.getVariable(a)}return null},"~S");c(b,"getList",function(){switch(this.tok){case 7:return this.value;case 1275068418:return this.tok=7,this.value=this.toArray().value;default:return null}});
b.isScalar=c(b,"isScalar",function(a){switch(a.tok){case 7:return!1;case 4:return 0>a.value.indexOf("\n");default:return!0}},"JS.SV");f(b,"toJSON",function(){switch(this.tok){case 1073742335:case 1073742334:case 2:case 3:return JS.SV.sValue(this);case 15:return JU.PT.byteArrayToJSON(this.value.data);case 14:return JU.PT.toJSON(null,this.value.getFullMap());case 7:case 6:if(null!=this.myName)return this.myName=null,6==this.tok?"{  }":"[  ]";this.myName="x";var a=JU.PT.toJSON(null,this.value);this.myName=
null;return a;default:return JU.PT.toJSON(null,this.value)}});c(b,"mapGet",function(a){return this.getMap().get(a)},"~S");c(b,"mapPut",function(a,d){switch(this.tok){case 6:case 14:this.getMap().put(a,JS.SV.copySafely(d))}},"~S,JS.SV");c(b,"getMap",function(){switch(this.tok){case 6:return this.value;case 14:return this.value.vars}return null});c(b,"getMapKeys",function(a,d){if(6!=this.tok)return"";var b=new JU.SB;JS.SV.sValueArray(b,this,"","",!0,!1,!1,a+1,d);return b.toString()},"~N,~B");f(b,"toString",
function(){return this.toString2()+"["+this.myName+" index ="+this.index+" intValue="+this.intValue+"]"});c(b,"getKeys",function(a){switch(this.tok){case 6:case 14:case 7:break;default:return null}var d=new JU.Lst;this.getKeyList(a,d,"");a=d.toArray(Array(d.size()));java.util.Arrays.sort(a);return a},"~B");c(b,"getKeyList",function(a,d,b){var c=this.getMap();if(null==c){if(a){var e,g;null!=(e=this.getList())&&0<(g=e.size())&&e.get(g-1).getKeyList(!0,d,b+"."+g+".")}}else for(var j,c=c.entrySet().iterator();c.hasNext()&&
((j=c.next())||1);)e=j.getKey(),a?(g=b.endsWith("."),0==e.length||!JU.PT.isLetter(e.charAt(0))?(g&&(b=b.substring(0,b.length-1)),e="["+JU.PT.esc(e)+"]"):!g&&0<b.length&&(b+="."),d.addLast(b+e),j.getValue().getKeyList(!0,d,b+e+".")):d.addLast(b+e)},"~B,JU.Lst,~S");b.deepCopy=c(b,"deepCopy",function(a,d,b){if(d){d=new java.util.Hashtable;var c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);){var e=c.getValue();d.put(c.getKey(),b?JS.SV.deepCopySV(e):e)}return d}c=new JU.Lst;d=0;for(e=a.size();d<
e;d++){var g=a.get(d);c.addLast(b?JS.SV.deepCopySV(g):g)}return c},"~O,~B,~B");b.deepCopySV=c(b,"deepCopySV",function(a){switch(a.tok){case 6:case 7:if("\r".equals(a.myName))a.myName=null,a=JS.SV.newV(a.tok,6==a.tok?new java.util.Hashtable:new JU.Lst);else{var d=a.myName;a.myName="\r";var b=a;a=JS.SV.newV(a.tok,JS.SV.deepCopy(a.value,6==a.tok,!0));b.myName=d}}return a},"JS.SV");c(b,"sortMapArray",function(a){null!=this.getList()&&java.util.Collections.sort(this.getList(),T(JS.SV.Sort,this,null,0,
a));return this},"~S");b.safeJSON=c(b,"safeJSON",function(a,d){return"{"+(C(d,"JS.SV")?JU.PT.esc(a)+" : "+JS.SV.format(z(-1,[null,d]),0):JU.PT.toJSON(a,d))+"}"},"~S,~O");c(b,"isNaN",function(){return this===JS.SV.vNaN||"NaN".equals(this.value)});b.$SV$Sort$=function(){var a=s(function(){fa(this,arguments);this.arrayPt=0;this.myKey=null;r(this,arguments)},JS.SV,"Sort",null,java.util.Comparator);u(a,function(a,b){this.arrayPt=a;this.myKey=b},"~N,~S");f(a,"compare",function(a,b){if(a.tok!=b.tok){if(3==
a.tok||2==a.tok||3==b.tok||2==b.tok){var c=JS.SV.fValue(a),e=JS.SV.fValue(b);return c<e?-1:c>e?1:0}if(4==a.tok||4==b.tok)return JS.SV.sValue(a).compareTo(JS.SV.sValue(b))}switch(a.tok){case 2:return a.intValue<b.intValue?-1:a.intValue>b.intValue?1:0;case 4:return JS.SV.sValue(a).compareTo(JS.SV.sValue(b));case 7:c=a.getList();e=b.getList();if(c.size()!=e.size())return c.size()<e.size()?-1:1;var g=this.arrayPt;0>g&&(g+=c.size());return 0>g||g>=c.size()?0:this.compare(c.get(g),e.get(g));case 6:if(null!=
this.myKey)return this.compare(a.getMap().get(this.myKey),b.getMap().get(this.myKey));default:return c=JS.SV.fValue(a),e=JS.SV.fValue(b),c<e?-1:c>e?1:0}},"JS.SV,JS.SV")};b.vT=JS.SV.newSV(1073742335,1,"true");b.vF=JS.SV.newSV(1073742334,0,"false");b.vNaN=JS.SV.newSV(3,2147483647,Float.$valueOf(NaN));b.pt0=new JU.P3;b.jvxlCoder=null});m("JS");x(["java.util.Hashtable"],"JS.T",["java.util.Arrays","JU.AU","$.Lst","JU.Logger"],function(){var b=s(function(){this.tok=0;this.value=null;this.intValue=2147483647;
r(this,arguments)},JS,"T",null);b.t=c(b,"t",function(a){var d=new JS.T;d.tok=a;return d},"~N");b.tv=c(b,"tv",function(a,d,b){a=JS.T.t(a);a.intValue=d;a.value=b;return a},"~N,~N,~O");b.o=c(b,"o",function(a,d){var b=JS.T.t(a);b.value=d;return b},"~N,~O");b.n=c(b,"n",function(a,d){var b=JS.T.t(a);b.intValue=d;return b},"~N,~N");b.i=c(b,"i",function(a){var d=JS.T.t(2);d.intValue=a;return d},"~N");b.tokAttr=c(b,"tokAttr",function(a,d){return(a&d)==(d&d)},"~N,~N");b.tokAttrOr=c(b,"tokAttrOr",function(a,
d,b){return(a&d)==(d&d)||(a&b)==(b&b)},"~N,~N,~N");b.getPrecedence=c(b,"getPrecedence",function(a){return a>>9&15},"~N");b.getMaxMathParams=c(b,"getMaxMathParams",function(a){return a>>9&3},"~N");b.addToken=c(b,"addToken",function(a,d){JS.T.tokenMap.put(a,d)},"~S,JS.T");b.getTokenFromName=c(b,"getTokenFromName",function(a){return JS.T.tokenMap.get(a)},"~S");b.getTokFromName=c(b,"getTokFromName",function(a){a=JS.T.getTokenFromName(a.toLowerCase());return null==a?0:a.tok},"~S");b.nameOf=c(b,"nameOf",
function(a){for(var d,b=JS.T.tokenMap.values().iterator();b.hasNext()&&((d=b.next())||1);)if(d.tok==a)return""+d.value;return"0x"+Integer.toHexString(a)},"~N");f(b,"toString",function(){return this.toString2()});c(b,"toString2",function(){return"Token["+JS.T.astrType[16>this.tok?this.tok:16]+"("+this.tok%1E3+"/0x"+Integer.toHexString(this.tok)+")"+(2147483647==this.intValue?"":" intValue="+this.intValue+"(0x"+Integer.toHexString(this.intValue)+")")+(null==this.value?"":"string"==typeof this.value?
' value="'+this.value+'"':C(this.value,"JS.SV")?' value="'+this.value.asString()+'"':" value="+this.value)+"]"});b.getCommandSet=c(b,"getCommandSet",function(a){var d="",b=new java.util.Hashtable,h=0;a=null==a||0==a.length?null:a.toLowerCase();for(var c=null!=a&&1<a.length,p,e=JS.T.tokenMap.entrySet().iterator();e.hasNext()&&((p=e.next())||1);){var g=p.getKey(),j=p.getValue();0!=(j.tok&4096)&&((null==a||0==g.indexOf(a))&&(c||j.value.equals(g)))&&b.put(g,Boolean.TRUE)}for(e=b.entrySet().iterator();e.hasNext()&&
((p=e.next())||1);)if(g=p.getKey(),"s"!=g.charAt(g.length-1)||!b.containsKey(g.substring(0,g.length-1)))d+=(0==h++?"":";")+g;return d},"~S");b.getAtomPropertiesLike=c(b,"getAtomPropertiesLike",function(a){a=a.toLowerCase();for(var d=new JU.Lst,b=0==a.length,h,c=JS.T.tokenMap.entrySet().iterator();c.hasNext()&&((h=c.next())||1);){var p=h.getKey();if("_"!=p.charAt(0)){var e=h.getValue();if(JS.T.tokAttr(e.tok,1077936128)&&(b||p.toLowerCase().startsWith(a))){if(b||!e.value.toLowerCase().startsWith(a))e=
JS.T.o(e.tok,p);d.addLast(e)}}}return 0==d.size()?null:d},"~S");b.getTokensLike=c(b,"getTokensLike",function(a){a=a.equals("setparam")?536870912:a.equals("misc")?1073741824:a.equals("mathfunc")?134217728:4096;for(var d=536870912==a?1610612736:0,b=new JU.Lst,h,c=JS.T.tokenMap.entrySet().iterator();c.hasNext()&&((h=c.next())||1);){var p=h.getKey(),e=h.getValue();JS.T.tokAttr(e.tok,a)&&(0==d||!JS.T.tokAttr(e.tok,d))&&b.addLast(p)}h=b.toArray(Array(b.size()));java.util.Arrays.sort(h);return h},"~S");
b.getSettableTokFromString=c(b,"getSettableTokFromString",function(a){a=JS.T.getTokFromName(a);return 0!=a&&JS.T.tokAttr(a,2048)&&!JS.T.tokAttr(a,1140850688)?a:0},"~S");b.completeCommand=c(b,"completeCommand",function(a,d,b,h,c){null==a?a=JS.T.tokenMap:b=!1;var p=new JU.Lst;h=h.toLowerCase();var e;for(a=a.keySet().iterator();a.hasNext()&&((e=a.next())||1);)if(e.startsWith(h)){var g=JS.T.getTokFromName(e);(b?JS.T.tokAttr(g,4096):d?JS.T.tokAttr(g,536870912)&&!JS.T.tokAttr(g,1610612736):1)&&p.addLast(e)}return JU.AU.sortedItem(p,
c)},"java.util.Map,~B,~B,~S,~N");b.getParamType=c(b,"getParamType",function(a){return!JS.T.tokAttr(a,536870912)?0:a&662700032},"~N");b.getTokensType=c(b,"getTokensType",function(a,d){for(var b,h=JS.T.tokenMap.entrySet().iterator();h.hasNext()&&((b=h.next())||1);){var c=b.getValue();JS.T.tokAttr(c.tok,d)&&a.put(b.getKey(),b.getValue())}},"java.util.Map,~N");b.isIDcmd=c(b,"isIDcmd",function(a){switch(a){case 135180:case 135176:case 135174:case 135188:case 134353926:return!0;default:return!1}},"~N");
c(b,"equals",function(a){if(!C(a,"JS.T"))return!1;if(this.tok==a.tok)return a.intValue==this.intValue&&(2==this.tok||1073742335==this.tok||1073742334==this.tok||a.value.equals(this.value));switch(this.tok){case 2:return 3==a.tok&&a.value.floatValue()==this.intValue;case 3:return 2==a.tok&&this.value.floatValue()==a.intValue;default:return!1}},"~O");JS.T.astrType="nada identifier integer decimal string inscode hash array point point4 bitset matrix3f matrix4f array hash bytearray keyword".$plit(" ");
b.tokenSpaceBeforeSquare=JS.T.o(1073742195," ");b.tokenOn=JS.T.tv(1073742335,1,"on");b.tokenOff=JS.T.tv(1073742334,0,"off");b.tokenAll=JS.T.o(1073742327,"all");b.tokenIf=JS.T.o(134320649,"if");b.tokenAnd=JS.T.o(268438528,"and");b.tokenAndSpec=JS.T.o(268439552,"");b.tokenOr=JS.T.o(268438016,"or");b.tokenAndFALSE=JS.T.o(268438528,"and");b.tokenOrTRUE=JS.T.o(268438016,"or");b.tokenOpIf=JS.T.o(805307393,"?");b.tokenComma=JS.T.o(268436992,",");b.tokenDefineString=JS.T.tv(12290,4,"@");b.tokenPlus=JS.T.o(268440577,
"+");b.tokenMinus=JS.T.o(268440576,"-");b.tokenMul3=JS.T.o(1275068930,"mul3");b.tokenTimes=JS.T.o(268441089,"*");b.tokenDivide=JS.T.o(268441088,"/");b.tokenLength=JS.T.tv(268442113,1275068435,"len3");b.tokenLeftParen=JS.T.o(268435968,"(");b.tokenRightParen=JS.T.o(268435969,")");b.tokenArraySquare=JS.T.o(1275068418,"[");b.tokenArrayOpen=JS.T.o(268437504,"[");b.tokenArrayClose=JS.T.o(268437505,"]");b.tokenLeftBrace=JS.T.o(1073742332,"{");b.tokenExpressionBegin=JS.T.o(1073742325,"expressionBegin");b.tokenExpressionEnd=
JS.T.o(1073742326,"expressionEnd");b.tokenConnected=JS.T.o(134217736,"connected");b.tokenCoordinateBegin=JS.T.o(1073742332,"{");b.tokenRightBrace=JS.T.o(1073742338,"}");b.tokenCoordinateEnd=JS.T.tokenRightBrace;b.tokenColon=JS.T.o(268436482,":");b.tokenSetCmd=JS.T.o(36867,"set");b.tokenSet=JS.T.tv(36867,61,"");b.tokenSetArray=JS.T.tv(36867,91,"");b.tokenSetProperty=JS.T.tv(36867,46,"");b.tokenSetVar=JS.T.tv(36868,61,"var");b.tokenEquals=JS.T.o(268440324,"=");b.tokenScript=JS.T.o(134222850,"script");
b.tokenSwitch=JS.T.o(102410,"switch");b.tokenMap=new java.util.Hashtable;for(var a=z(-1,["(",JS.T.tokenLeftParen,")",JS.T.tokenRightParen,"and",JS.T.tokenAnd,"&",null,"&&",null,"or",JS.T.tokenOr,"|",null,"||",null,"?",JS.T.tokenOpIf,",",JS.T.tokenComma,"=",JS.T.tokenEquals,"==",null,":",JS.T.tokenColon,"+",JS.T.tokenPlus,"-",JS.T.tokenMinus,"*",JS.T.tokenTimes,"/",JS.T.tokenDivide,"script",JS.T.tokenScript,"source",null,"set",JS.T.tokenSetCmd,"switch",JS.T.tokenSwitch,"all",JS.T.tokenAll,"off",JS.T.tokenOff,
"false",null,"on",JS.T.tokenOn,"true",null]),d,b=null,h,p,e=a.length-1,g=0;g<e;g+=2)h=a[g],p=h.toLowerCase(),d=a[g+1],null==d?d=b:null==d.value&&(d.value=h),JS.T.tokenMap.put(p,d),b=d;var a=null,a=z(-1,"+= -= *= /= \\= &= |= not ! xor tog < <= >= > != <> LIKE CONTAINS within . .. [ ] { } $ % ; ++ -- ** \\ animation anim assign axes backbone background bind bondorder boundbox boundingBox break calculate capture cartoon cartoons case catch cd center centre centerat cgo color colour compare configuration conformation config connect console contact contacts continue data default define @ delay delete density depth dipole dipoles display dot dots draw echo ellipsoid ellipsoids else elseif end endif exit eval file files font for format frame frames frank function functions geosurface getProperty goto halo halos helix helixalpha helix310 helixpi hbond hbonds help hide history hover if in initialize invertSelected isosurface javascript label labels lcaoCartoon lcaoCartoons load log loop matrix measure measures monitor monitors meshribbon meshribbons message minimize minimization mo mode2d model models modulation move moveTo mutate navigate navigation nbo origin out parallel pause wait plot private plot3d pmesh polygon polyhedra polyhedron print process prompt quaternion quaternions quit ramachandran rama refresh reset unset restore restrict return ribbon ribbons rocket rockets rotate rotateSelected save select selectionHalos selectionHalo showSelections sheet show slab spacefill cpk spin ssbond ssbonds star stars step steps stereo strand strands structure _structure strucNo struts strut subset subsystem synchronize sync this trace translate translateSelected try unbind unitcell var varna vector vectors vibration while wireframe write zap zoom zoomTo atom atoms axisangle basepair basepairs orientation orientations pdbheader polymer polymers residue residues rotation row sequence seqcode shape state symbol symmetry symmetryHM spaceGroup transform translation url _ abs absolute _args acos add adpmax adpmin align altloc altlocs ambientOcclusion amino angle array as _a atomID _atomID atomIndex atomName atomno atomType atomX atomY atomZ average babel babel21 back backlit backshell balls baseModel best beta bin bondCount bonded bottom branch brillouin bzone cache carbohydrate cell chain chains chainNo chemicalShift cs clash clear clickable clipboard connected context constraint contourLines coord coordinates coords cos cross covalentRadius covalent direction displacement displayed distance div DNA domains dotted DSSP DSSR element elemno _e error exportScale fill find fixedTemperature forcefield formalCharge charge eta front frontlit frontOnly fullylit fx fy fz fxyz fux fuy fuz fuxyz group groups group1 _g groupID _groupID groupIndex hidden highlight hkl hydrophobicity hydrophobic hydro id identify ident image info infoFontSize inline insertion insertions intramolecular intra intermolecular inter bondingRadius ionicRadius ionic isAromatic Jmol JSON join keys last left length lines list magneticShielding ms mass max mep mesh middle min mlp mode modify modifyOrCreate modt modt1 modt2 modt3 modx mody modz modo modxyz molecule molecules modelIndex monomer morph movie mouse mul mul3 nboCharges nci next noDelay noDots noFill noMesh none null inherit normal noBackshell noContourLines notFrontOnly noTriangles now nucleic occupancy omega only opaque options partialCharge pattern phi pivot plane planar play playRev point points pointGroup polymerLength pop previous prev probe property properties protein psi purine push PyMOL pyrimidine random range rasmol replace resno resume rewind reverse right rmsd RNA rna3d rock rubberband rxyz saSurface saved scale scene search smarts selected seqid shapely sidechain sin site size smiles substructure solid sort specialPosition spinOp sqrt split starWidth starScale stddev straightness structureId supercell sub sum sum2 surface surfaceDistance symop symops sx sy sz sxyz tan temperature relativeTemperature tensor theta thisModel ticks top torsion trajectory trajectories translucent transparent triangles trim type ux uy uz uxyz user uvw valence vanderWaals vdw vdwRadius visible volume vx vy vz vxyz xyz w wyckoff wyckoffm x y z addHydrogens allConnected angstroms anisotropy append arc area aromatic arrow async audio auto axis barb binary blockData cancel cap cavity centroid check checkCIR chemical circle collapsed col colorScheme command commands contour contours corners count criterion create crossed curve cutoff cylinder diameter discrete distanceFactor downsample drawing dynamicMeasurements eccentricity ed edges edgesOnly energy exitJmol faceCenterOffset filter first fixed fix flat fps from frontEdges full fullPlane functionXY functionXYZ gridPoints hiddenLinesDashed homo ignore InChI InChIKey increment insideout interior intersection intersect internal lattice line lineData link lobe lonePair lp lumo macro macros manifest mapProperty maxSet menu minSet modelBased molecular mrc msms name nmr noCross noDebug noEdges noHead noLoad noPlane object obj offset offsetSide once orbital atomicOrbital packed palindrome parameters path pdb period periodic perpendicular perp phase planarParam pocket pointsPerAngstrom radical rad reference remove resolution reverseColor rotate45 selection sigma sign silent sphere squared stdInChI stdInChIKey stop title titleFormat to validation value variable variables vertices width wigner wignerSeitz backgroundModel celShading celShadingPower debug debugHigh defaultLattice measurements measurement scale3D toggleLabel userColorScheme throw timeout timeouts window animationMode appletProxy atomTypes axesColor axis1Color axis2Color axis3Color backgroundColor bondmode boundBoxColor boundingBoxColor chirality cipRule currentLocalPath dataSeparator defaultAngleLabel defaultColorScheme defaultColors defaultDirectory defaultDistanceLabel defaultDropScript defaultLabelPDB defaultLabelXYZ defaultLoadFilter defaultLoadScript defaults defaultTorsionLabel defaultVDW drawFontSize eds edsDiff energyUnits fileCacheDirectory fontsize helpPath hoverLabel language loadFormat loadLigandFormat logFile measurementUnits nihResolverFormat nmrPredictFormat nmrUrlFormat pathForAllFiles picking pickingStyle pickLabel platformSpeed propertyColorScheme quaternionFrame smilesUrlFormat smiles2dImageFormat unitCellColor axesOffset axisOffset axesScale axisScale bondTolerance cameraDepth defaultDrawArrowScale defaultTranslucent dipoleScale ellipsoidAxisDiameter gestureSwipeFactor hbondsAngleMinimum hbondHXDistanceMaximum hbondsDistanceMaximum hbondNODistanceMaximum hoverDelay loadAtomDataTolerance minBondDistance minimizationCriterion minimizationMaxAtoms modulationScale mouseDragFactor mouseWheelFactor navFPS navigationDepth navigationSlab navigationSpeed navX navY navZ particleRadius pointGroupDistanceTolerance pointGroupLinearTolerance radius rotationRadius scaleAngstromsPerInch sheetSmoothing slabRange solventProbeRadius spinFPS spinX spinY spinZ stereoDegrees strutDefaultRadius strutLengthMaximum vectorScale vectorsCentered vectorSymmetry vectorTrail vibrationPeriod vibrationScale visualRange ambientPercent ambient animationFps axesMode bondRadiusMilliAngstroms bondingVersion delayMaximumMs diffusePercent diffuse dotDensity dotScale ellipsoidDotCount helixStep hermiteLevel historyLevel labelpointerwidth lighting logLevel meshScale minimizationReportSteps minimizationSteps minPixelSelRadius percentVdwAtom perspectiveModel phongExponent pickingSpinRate propertyAtomNumberField propertyAtomNumberColumnCount propertyDataColumnCount propertyDataField repaintWaitMs ribbonAspectRatio contextDepthMax scriptReportingLevel showScript smallMoleculeMaxAtoms specular specularExponent specularPercent specPercent specularPower specpower strandCount strandCountForMeshRibbon strandCountForStrands strutSpacing zDepth zSlab zshadePower allowEmbeddedScripts allowGestures allowKeyStrokes allowModelKit allowMoveAtoms allowMultiTouch allowRotateSelected antialiasDisplay antialiasImages antialiasTranslucent appendNew applySymmetryToBonds atomPicking allowAudio autobond autoFPS autoplayMovie axesMolecular axesOrientationRasmol axesUnitCell axesWindow bondModeOr bondPicking bonds bond cartoonBaseEdges cartoonBlocks cartoonBlockHeight cartoonsFancy cartoonFancy cartoonLadders cartoonRibose cartoonRockets cartoonSteps chainCaseSensitive cipRule6Full colorRasmol debugScript defaultStructureDssp disablePopupMenu displayCellParameters showUnitcellInfo dotsSelectedOnly dotSurface doublePrecision dragSelected drawHover drawPicking dsspCalculateHydrogenAlways elementKey ellipsoidArcs ellipsoidArrows ellipsoidAxes ellipsoidBall ellipsoidDots ellipsoidFill fileCaching fontCaching fontScaling forceAutoBond fractionalRelative greyscaleRendering hbondsBackbone hbondsRasmol hbondsSolid hetero hideNameInPopup hideNavigationPoint hideNotSelected highResolution hydrogen hydrogens imageState isKiosk isosurfaceKey isosurfacePropertySmoothing isosurfacePropertySmoothingPower jmolInJSpecView justifyMeasurements labelKey languageTranslation leadAtom leadAtoms legacyAutoBonding legacyHAddition legacyJavaFloat logCommands logGestures macroDirectory measureAllModels measurementLabels measurementNumbers messageStyleChime minimizationRefresh minimizationSilent modelkit modelkitMode modulateOccupancy monitorEnergy multiplebondbananas multipleBondRadiusFactor multipleBondSpacing multiProcessor navigationMode navigationPeriodic occupancyThreshold partialDots pdbAddHydrogens pdbGetHeader pdbSequential perspectiveDepth preserveState rangeSelected redo redoMove refreshing ribbonBorder rocketBarrels saveProteinStructureState scriptQueue selectAllModels selectHetero selectHydrogen showAxes showBoundBox showBoundingBox showFrank showHiddenSelectionHalos showHydrogens showKeyStrokes showMeasurements showModulationVectors showMultipleBonds showNavigationPointAlways showTiming showUnitcell showUnitcellDetails slabByAtom slabByMolecule slabEnabled smartAromatic solvent solventProbe ssBondsBackbone statusReporting strutsMultiple syncMouse syncScript testFlag1 testFlag2 testFlag3 testFlag4 traceAlpha twistedSheets undoAuto undo undoMax undoMove useMinimizationThread useNumberLocalization waitForMoveTo windowCentered wireframeRotation zeroBasedXyzRasmol zoomEnabled zoomHeight zoomLarge zShade".split(" ")),
j=D(-1,[268442114,-1,-1,-1,-1,-1,-1,268439040,-1,268438017,268438018,268440323,268440322,268440321,268440320,268440325,-1,268440326,268440327,134217759,1073742336,1073742337,268437504,268437505,1073742332,1073742338,1073742330,268441090,1073742339,268441602,268441601,268441603,268441091,4097,-1,4098,1611272194,1114249217,1610616835,4100,4101,1812599299,-1,102407,4102,4103,1112152066,-1,102411,102412,20488,12289,-1,4105,135174,1765808134,-1,134221831,1094717448,-1,-1,4106,528395,134353926,-1,102408,
134221834,102413,12290,-1,528397,12291,1073741914,554176526,135175,-1,1610625028,1275069444,1112150019,135176,537022465,1112150020,-1,364547,102402,102409,364548,266255,134218759,1228935687,-1,4114,134320648,1287653388,4115,-1,1611272202,134320141,-1,1112150021,1275072526,20500,1112152070,-1,136314895,2097159,2097160,2097162,1613238294,-1,20482,12294,1610616855,544771,134320649,1275068432,4121,4122,135180,134238732,1825200146,-1,135182,-1,134223363,36869,528411,134217766,1745489939,-1,-1,-1,1112152071,
-1,20485,4126,-1,1073877010,603979882,1094717454,-1,1275072532,4128,4129,4130,4131,-1,1073877011,1073742078,1073742079,102436,20487,-1,4133,4134,135190,135188,1073742106,1275203608,-1,36865,102439,134256129,134221850,-1,266281,4138,-1,266284,4141,-1,4142,12295,36866,1112152073,-1,1112152074,-1,528432,4145,4146,1275082241,1611141172,-1,-1,2097184,134222350,554176565,1112152075,-1,1095241729,1611141176,-1,1112152076,-1,266298,-1,528443,1649022989,-1,1639976963,-1,1094713370,659482,-1,2109448,1094713371,
4156,-1,1073742340,1112152078,4160,4162,364558,4163,1814695966,36868,20489,135198,-1,4166,102406,659488,134221856,12297,4168,4170,1153433601,-1,134217731,1073741863,-1,1073742077,-1,1073742088,1094713362,-1,1073742120,-1,1073742132,1275068935,1086324744,1086324747,1086324748,1073742158,1086326798,1088421903,603979956,134217764,1073742176,1073742178,1073742184,1275068446,134218250,1073741826,134217765,134218241,1275069441,1111490561,1111490562,1073741832,1086324739,-1,553648129,2097154,134217729,1275068418,
1073741848,1094713346,-1,-1,1094713347,1086326786,1094715393,1086326785,1111492609,1111492610,1111492611,96,1073741856,1073741857,1073741858,1073741861,1073741862,1073741859,2097200,1073741864,1073741865,1275068420,1228931586,2097155,1073741871,1073742328,1073741872,-1,134221829,2097188,1094713349,1086326788,-1,1094713351,1111490563,-1,1073741881,1073741882,2097190,1073741884,134217736,14,1073741894,1073741898,1073742329,-1,-1,134218245,1275069442,1111490564,-1,1073741918,1073741922,2097192,1275069443,
1275068928,2097156,1073741925,1073741926,1073741915,1111490587,1086326789,1094715402,1094713353,1073741936,570425357,1073741938,1275068427,1073741946,545259560,1631586315,-1,1111490565,1073741954,1073741958,1073741960,1073741964,1111492612,1111492613,1111492614,1145047050,1111492615,1111492616,1111492617,1145047053,1086324742,-1,1086324743,1094713356,-1,-1,1094713357,2097194,536870920,134219777,1113589786,-1,-1,1073741974,1086324745,-1,4120,1073741982,553648145,1073741984,1086324746,-1,1073741989,
-1,1073741990,-1,1111492618,-1,-1,1073742331,1073741991,1073741992,1275069446,1140850706,1073741993,1073741996,1275068435,1140850692,1073742001,1111490566,-1,1111490567,64,1073742016,1073742018,1073742019,32,1073742022,1073742024,1073742025,1073742026,1111490580,-1,1111490581,1111490582,1111490583,1111490584,1111490585,1111490586,1145045008,1094713360,-1,1094713359,1094713361,1073742029,1073742031,1073742030,1275068929,1275068930,603979891,1073742036,1073742037,603979892,1073742042,1073742046,1073742052,
1073742333,-1,-1,1073742056,1073742057,1073742039,1073742058,1073742060,134218760,2097166,1128269825,1111490568,1073742072,1073742074,1073742075,1111492619,134218753,1111490569,1275068725,134217750,-1,1073742096,1073742098,134217751,-1,1275068447,1094713363,1275334681,1073742108,-1,1073742109,1715472409,-1,2097168,1111490570,2097170,1275335685,1073742110,2097172,134219266,1073742114,1073742116,1275068443,1094715412,4143,1073742125,1140850693,1073742126,1073742127,2097174,1073742128,1073742129,1073742134,
1145045003,1073742135,1073742136,536875059,1073742139,134218756,-1,1113589787,1094713368,1073742144,2097178,134218244,1094713369,1140850694,134218757,1237320707,1073742150,1275068444,2097196,1296041985,134218246,1275069447,570425403,-1,192,1111490574,1086324749,1073742163,1275068931,128,160,2097180,1111490575,1296041986,-1,1094713365,1094713366,1094713367,1145047052,134218255,1111492620,-1,1275068445,1111490576,2097182,1073742164,1073742172,1073742174,536870926,-1,1111490588,-1,1073742182,1275068932,
1140850696,1111490577,1111490578,1111490579,1145045006,1073742186,1073742187,1094715420,1648363544,-1,-1,2097198,1312817669,1111492626,1111492627,1111492628,1145047055,1145047049,1140850705,1086324754,1086324755,1111492629,1111492630,1111492631,1073741828,1073741834,1073741836,1073741837,1073741839,1073741840,1073741842,1075838996,1073741846,1073741849,4108,1073741852,1073741854,1073741860,1073741866,1073741868,1073741874,1073741875,1073741876,1094713350,1073741877,603979821,1073741879,1073741880,
1073741886,1275068934,1073741888,1073741890,1073741892,1073741896,1073741900,1073741902,1275068425,1073741905,1073741904,1073741906,1073741908,1073741910,1073741912,1073741917,1073741920,1073741924,1073741928,1073741929,603979836,1073741931,1073741932,1073741933,1073741934,1073741935,266256,1073741937,1073741940,1073741942,12293,-1,1073741948,1073741950,1073741952,1073741956,1073741961,1073741962,1073741966,1073741968,1073741970,603979856,1073741973,1073741976,1275068433,1073741978,1073741981,1073741985,
1073741986,134217763,-1,1073741988,1073741994,1073741998,1073742E3,1073741999,1073742002,1073742004,1073742006,1073742008,4124,-1,1073742010,4125,1073742014,1073742015,1073742020,1073742027,1073742028,1073742032,1073742033,1073742034,1073742038,1073742040,1073742041,1073742044,1073742048,1073742050,1073742054,1073742064,1073742062,1073742066,1073742068,1073742070,1073742076,1073741850,1073742080,1073742082,1073742083,1073742084,1073742086,1073742090,-1,1073742092,-1,1073742094,1073742099,1073742100,
1073742104,1073742112,1073742111,1073742118,1073742119,1073742122,1073742124,1073742130,1073742140,1073742146,1073742147,1073742148,1073742154,1073742156,1073742159,1073742160,1073742162,1073742166,1073742168,1073742170,1073742189,1073742188,1073742190,1073742192,1073742194,1073742196,1073742197,-1,536870914,603979820,553648135,536870916,536870917,536870918,537006096,-1,1610612740,1610612741,536870930,36870,536875070,-1,536870932,545259521,545259522,545259524,545259526,545259528,545259530,545259532,
545259534,1610612737,545259536,-1,1086324752,1086324753,545259538,545259540,545259542,545259545,-1,545259546,545259547,545259548,545259543,545259544,545259549,545259550,545259552,545259554,545259555,570425355,545259556,545259557,545259558,545259559,1610612738,545259561,545259562,545259563,545259564,545259565,545259566,545259568,545259570,545259569,545259571,545259572,545259573,545259574,545259576,553648158,545259578,545259580,545259582,545259584,545259586,570425345,-1,570425346,-1,570425348,570425350,
570425352,570425353,570425354,570425356,570425358,570425359,570425361,570425360,-1,570425362,570425363,570425364,570425365,553648152,570425366,570425367,570425368,570425371,570425372,570425373,570425374,570425376,570425378,570425380,570425381,570425382,570425384,1665140738,570425388,570425390,570425392,570425393,570425394,570425396,570425398,570425400,570425402,570425404,570425406,570425408,1648361473,603979972,603979973,553648185,570425412,570425414,570425416,553648130,-1,553648132,553648133,553648134,
553648136,553648137,553648138,-1,553648139,553648140,553648141,553648142,553648143,553648144,553648147,1073741995,553648148,553648149,553648150,553648151,553648153,553648154,553648155,553648156,553648157,553648160,553648161,553648162,553648164,553648165,553648166,553648167,553648168,536870922,553648170,536870924,553648172,553648174,-1,553648176,-1,553648178,553648180,553648182,553648183,553648186,553648188,553648190,603979778,603979780,603979781,603979782,603979783,603979784,603979785,603979786,603979788,
603979790,603979792,603979794,603979796,603979797,603979798,603979800,603979802,603979804,603979806,603979808,603979809,603979812,603979814,1677721602,-1,603979815,603979810,570425347,603979816,-1,603979817,603979818,603979819,603979811,603979822,603979823,603979824,603979825,603979826,603979827,603979828,-1,603979829,603979830,603979831,603979832,603979833,603979834,603979835,603979838,603979839,603979840,603979841,603979842,603979843,603979844,603979845,603979846,603979847,603979848,603979849,603979850,
603979852,603979853,603979854,1612709894,603979858,603979860,603979862,603979863,1612709900,-1,603979864,603979865,603979866,603979867,553648146,603979868,603979869,603979870,603979871,2097165,-1,603979872,603979873,603979874,603979875,603979876,545259567,603979877,603979878,1610612739,603979879,603979880,603979881,603983903,-1,603979884,603979885,603979886,570425369,570425370,603979887,603979889,603979890,553648159,603979893,603979894,603979895,603979896,603979897,603979898,603979899,4139,4140,603979900,
603979901,603979902,603979903,603979904,603979906,603979908,603979910,603979914,603979916,-1,603979918,603979920,603979922,603979924,603979926,603979927,603979928,603979930,603979934,603979936,603979937,603979939,603979940,603979942,603979944,1612709912,603979948,603979952,603979954,603979955,603979957,603979958,603979960,603979962,603979964,603979965,603979966,603979968,603979969,603984065,553648184,4165,603979970,603979971,603979975,603979976,603979977,603979978,603979980,603979982,603979983,603979984]);
a.length!=j.length&&(JU.Logger.error("sTokens.length ("+a.length+") != iTokens.length! ("+j.length+")"),System.exit(1));e=a.length;for(g=0;g<e;g++)h=a[g],p=h.toLowerCase(),d=j[g],d=b=-1==d?b:JS.T.o(d,h),null!=JS.T.tokenMap.get(p)&&JU.Logger.error("duplicate token definition:"+p),JS.T.tokenMap.put(p,d);j=a=null});m("J.shape");x(["J.shape.Shape"],"J.shape.AtomShape","JU.AU $.BS J.atomdata.RadiusData J.c.PAL $.VDW JU.BSUtil $.C".split(" "),function(){var b=s(function(){this.mad=-1;this.paletteIDs=this.colixes=
this.mads=null;this.isActive=!1;this.rd=null;this.isSet=!1;this.monomerCount=0;this.bsSizeDefault=null;r(this,arguments)},J.shape,"AtomShape",J.shape.Shape);f(b,"initShape",function(){});f(b,"initModelSet",function(){this.isSet=!0;var a=this.ms.ac;null!=this.mads&&(this.mads=JU.AU.arrayCopyShort(this.mads,a));null!=this.colixes&&(this.colixes=JU.AU.arrayCopyShort(this.colixes,a));null!=this.paletteIDs&&(this.paletteIDs=JU.AU.arrayCopyByte(this.paletteIDs,a))});f(b,"getSize",function(a){return null==
this.mads?0:this.mads[a]},"~N");f(b,"setSize",function(a,d){this.setSize2(a,d)},"~N,JU.BS");c(b,"setSize2",function(a,d){0==a?this.setSizeRD(null,d):(null==this.rd?this.rd=new J.atomdata.RadiusData(null,a,J.atomdata.RadiusData.EnumType.SCREEN,null):this.rd.value=a,this.setSizeRD(this.rd,d))},"~N,JU.BS");f(b,"setSizeRD",function(a,d){if(this.isSet){this.isActive=!0;var b=null!=a&&0!=a.value,c=null==d,e=this.ms.ac,g=c?e-1:d.nextSetBit(0);null==this.bsSizeSet&&(this.bsSizeSet=JU.BS.newN(e));null==this.mads&&
0<=g&&(this.mads=$(e,0));for(e=g;0<=e;e=c?e-1:d.nextSetBit(e+1))this.setSizeRD2(e,a,b)}},"J.atomdata.RadiusData,JU.BS");c(b,"setSizeRD2",function(a,d,b){var c=this.ms.at[a];this.mads[a]=c.calculateMad(this.vwr,d);this.bsSizeSet.setBitTo(a,b);c.setShapeVisibility(this.vf,b)},"~N,J.atomdata.RadiusData,~B");c(b,"setPropAS",function(a,d,b){if("color"===a){this.isActive=!0;var c=JU.C.getColixO(d),e=J.c.PAL.pidOf(d);d=this.checkColixLength(c,b.length());for(a=b.nextSetBit(0);0<=a&&a<d;a=b.nextSetBit(a+
1))this.setColixAndPalette(c,e,a)}else if("pymolparams"===a){this.isActive=!0;var e=d[0],g=d[1],j=d[2],k=new J.atomdata.RadiusData(null,0,J.atomdata.RadiusData.EnumType.FACTOR,J.c.VDW.AUTO);null==this.bsColixSet&&(this.bsColixSet=new JU.BS);null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS);a=b.nextSetBit(0);null==this.mads&&0<=a&&(this.mads=$(this.ms.ac,0));d=this.checkColixLength(null==e?0:4,b.length());for(var l=0;0<=a&&a<d;a=b.nextSetBit(a+1),l++){var c=null==e?0:e[l],f=null==g?0:g[l];0.01<f&&(c=
JU.C.getColixTranslucent3(c,!0,f));this.setColixAndPalette(c,J.c.PAL.UNKNOWN.id,a);null!=j&&(c=0<(k.value=j[l]),0==k.value&&this.bsSizeSet.get(a)||this.setSizeRD2(a,k,c))}}else if("translucency"===a){this.isActive=!0;d=d.equals("translucent");this.checkColixLength(4,this.ms.ac);for(a=b.nextSetBit(0);0<=a;a=b.nextSetBit(a+1))this.colixes[a]=JU.C.getColixTranslucent3(this.colixes[a],d,this.translucentLevel),d&&this.bsColixSet.set(a)}else"deleteModelAtoms"===a?(a=d[2],d=a[1],a=a[2],this.mads=JU.AU.deleteElements(this.mads,
d,a),this.colixes=JU.AU.deleteElements(this.colixes,d,a),this.paletteIDs=JU.AU.deleteElements(this.paletteIDs,d,a),JU.BSUtil.deleteBits(this.bsSizeSet,b),JU.BSUtil.deleteBits(this.bsColixSet,b)):this.setPropS(a,d,b)},"~S,~O,JU.BS");c(b,"checkColixLength",function(a,d){d=Math.min(this.ms.ac,d);if(0==a)return null==this.colixes?0:this.colixes.length;if(null==this.colixes||d>this.colixes.length)this.colixes=JU.AU.ensureLengthShort(this.colixes,d),this.paletteIDs=JU.AU.ensureLengthByte(this.paletteIDs,
d);null==this.bsColixSet&&(this.bsColixSet=JU.BS.newN(this.ms.ac));return d},"~N,~N");c(b,"setColixAndPalette",function(a,d,b){null==this.colixes&&this.checkColixLength(-1,this.ms.ac);this.colixes[b]=a=this.getColixI(a,d,b);this.bsColixSet.setBitTo(b,0!=a||0==this.shapeID);this.paletteIDs[b]=d},"~N,~N,~N");f(b,"setAtomClickability",function(){if(this.isActive)for(var a=this.ms.at,d=this.ms.ac;0<=--d;){var b=a[d];null==b||(0==(b.shapeVisibilityFlags&this.vf)||this.ms.isAtomHidden(d))||b.setClickable(this.vf)}});
f(b,"getShapeState",function(){return null})});m("J.shape");x(["J.shape.FontLineShape","JU.P3","$.V3"],"J.shape.Axes",["JU.PT","JU.Escape","JV.JC"],function(){var b=s(function(){this.axisXY=null;this.scale=0;this.corner=this.fixedOriginUC=this.pt0=this.axes2=this.axisType=this.labels=this.axisPoints=this.originPoint=this.fixedOrigin=null;r(this,arguments)},J.shape,"Axes",J.shape.FontLineShape);N(b,function(){this.axisXY=new JU.P3;this.originPoint=new JU.P3;this.axisPoints=Array(6);for(var a=6;0<=
--a;)this.axisPoints[a]=new JU.P3;this.pt0=new JU.P3;this.fixedOriginUC=new JU.P3;this.corner=new JU.V3});f(b,"setProperty",function(a,d){if("position"===a){var b=0==this.axisXY.z&&0!=d.z;this.axisXY=d;this.setScale(b?1:this.scale)}else"origin"===a?(null==d||0==d.length()?this.fixedOrigin=null:(null==this.fixedOrigin&&(this.fixedOrigin=new JU.P3),this.fixedOrigin.setT(d)),this.reinitShape()):"labels"===a?this.labels=d:"labelsOn"===a?this.labels=null:"labelsOff"===a?this.labels=z(-1,["","",""]):("type"===
a&&(this.axisType=d,"abc".equals(this.axisType)&&(this.axisType=null)),"axes2"===a?this.axes2=null==d||d.equals("")?null:d:this.setPropFLS(a,d))},"~S,~O,JU.BS");f(b,"initShape",function(){this.translucentAllowed=!1;this.myType="axes";this.font3d=this.vwr.gdata.getFont3D(16);this.setPoints(this.vwr.g.axesMode)});c(b,"setPoints",function(a){var d;if(603979808!=a||null==(d=this.vwr.getCurrentUnitCell()))this.originPoint.setT(null!=this.fixedOrigin?this.fixedOrigin:603979809==a?this.vwr.getBoundBoxCenter():
this.pt0),this.setScale(this.vwr.getFloat(570425346)/2);else{a=d.getUnitCellMultiplier();d=d.getUnitCellMultiplied();var b=this.vwr.getFloat(570425345);this.fixedOriginUC.set(b,b,b);var c=d.getCartesianOffset(),e=d.getUnitCellVerticesNoOffset();this.originPoint.add2(c,e[0]);0!=b?d.toCartesian(this.fixedOriginUC,!1):null!=this.fixedOrigin&&this.originPoint.setT(this.fixedOrigin);0!=b&&this.originPoint.add(this.fixedOriginUC);d=this.scale=this.vwr.getFloat(570425346)/2;null!=a&&0<a.z&&(d*=Math.abs(a.z));
this.axisPoints[0].scaleAdd2(d,e[4],this.originPoint);this.axisPoints[1].scaleAdd2(d,e[2],this.originPoint);this.axisPoints[2].scaleAdd2(d,e[1],this.originPoint)}},"~N");c(b,"reinitShape",function(){var a=this.font3d;this.initShape();null!=a&&(this.font3d=a)});c(b,"getAxisPoint",function(a,d,b){d?b.setT(this.axisPoints[a]):(b.sub2(this.axisPoints[a],this.originPoint),b.scale(0.5));return b},"~N,~B,JU.P3");f(b,"getProperty",function(a){return"originPoint"===a?this.originPoint:"axisPoints"===a?(this.setPoints(this.vwr.g.axesMode),
this.axisPoints):"axesTypeXY"===a?0==this.axisXY.z?Boolean.FALSE:Boolean.TRUE:"origin"===a?this.fixedOrigin:null},"~S,~N");c(b,"setScale",function(a){this.scale=a;this.corner.setT(this.vwr.getBoundBoxCornerVector());for(var d=6;0<=--d;){var b=this.axisPoints[d];b.setT(JV.JC.unitAxisVectors[d]);1.5>this.corner.x&&(this.corner.x=1.5);1.5>this.corner.y&&(this.corner.y=1.5);1.5>this.corner.z&&(this.corner.z=1.5);0==this.axisXY.z&&(b.x*=this.corner.x*a,b.y*=this.corner.y*a,b.z*=this.corner.z*a);b.add(this.originPoint)}},
"~N");c(b,"getAxesState",function(a){a.append("  axes scale ").appendF(this.vwr.getFloat(570425346)).append(";\n");null!=this.fixedOrigin&&a.append("  axes center ").append(JU.Escape.eP(this.fixedOrigin)).append(";\n");0!=this.axisXY.z&&a.append("  axes position [").appendI(F(this.axisXY.x)).append(" ").appendI(F(this.axisXY.y)).append(" ").append(0>this.axisXY.z?" %":"").append("]");null!=this.axes2&&a.append(" ").append(JU.PT.esc(this.axes2));a.append(";\n");if(null!=this.labels){a.append("  axes labels ");
for(var d=0;d<this.labels.length;d++)null!=this.labels[d]&&a.append(JU.PT.esc(this.labels[d])).append(" ");a.append(";\n")}null!=this.axisType&&a.append("  axes type "+JU.PT.esc(this.axisType));return a.toString()},"JU.SB")});m("J.shape");x(["J.shape.AtomShape"],"J.shape.Balls",["JU.BS","J.c.PAL","JU.C"],function(){var b=G(J.shape,"Balls",J.shape.AtomShape);f(b,"setSize",function(a,d){2147483647==a?(this.isActive=!0,null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS),this.bsSizeSet.or(d)):this.setSize2(a,
d)},"~N,JU.BS");f(b,"setSizeRD",function(a,d){this.isActive=!0;null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS);for(var b=Math.min(this.ms.at.length,d.length()),c=d.nextSetBit(0);0<=c&&c<b;c=d.nextSetBit(c+1))this.ms.at[c].setMadAtom(this.vwr,a),this.bsSizeSet.set(c)},"J.atomdata.RadiusData,JU.BS");f(b,"setProperty",function(a,d,b){if("color"===a){var c=JU.C.getColixO(d);0==c&&(c=2);null==this.bsColixSet&&(this.bsColixSet=new JU.BS);var e=J.c.PAL.pidOf(d);for(a=b.nextSetBit(0);0<=a;a=b.nextSetBit(a+
1)){var g=this.ms.at[a];g.colixAtom=this.getColixA(c,e,g);this.bsColixSet.setBitTo(a,2!=c||e!=J.c.PAL.NONE.id);g.paletteID=e}this.vwr.setModelkitPropertySafely("updateatomkeys",b)}else if("colorValues"===a){if(0!=d.length){null==this.bsColixSet&&(this.bsColixSet=new JU.BS);var j=0,e=null;for(a=b.nextSetBit(0);0<=a&&!(j>=d.length);a=b.nextSetBit(a+1))e=Integer.$valueOf(d[j++]),c=JU.C.getColixO(e),0==c&&(c=2),e=J.c.PAL.pidOf(e),g=this.ms.at[a],g.colixAtom=this.getColixA(c,e,g),this.bsColixSet.setBitTo(a,
2!=c||e!=J.c.PAL.NONE.id),g.paletteID=e}}else if("colors"===a){j=d[0];null==this.bsColixSet&&(this.bsColixSet=new JU.BS);d=this.ms.at;for(a=b.nextSetBit(0);0<=a;a=b.nextSetBit(a+1))if(!(a>=j.length||0==(c=j[a])))d[a].colixAtom=c,d[a].paletteID=J.c.PAL.UNKNOWN.id,this.bsColixSet.set(a)}else if("translucency"===a){c=d.equals("translucent");null==this.bsColixSet&&(this.bsColixSet=new JU.BS);d=this.ms.at;for(a=b.nextSetBit(0);0<=a;a=b.nextSetBit(a+1))d[a].setTranslucent(c,this.translucentLevel),c&&this.bsColixSet.set(a)}else a.startsWith("ball")&&
(a=a.substring(4).intern()),this.setPropAS(a,d,b)},"~S,~O,JU.BS");f(b,"setAtomClickability",function(){for(var a=this.vwr.slm.bsDeleted,d=this.ms.ac;0<=--d;){var b=this.ms.at[d];null!=b&&(b.setClickable(0),null!=a&&a.get(d)||(0==(b.shapeVisibilityFlags&this.vf)||this.ms.isAtomHidden(d))||b.setClickable(this.vf))}})});m("J.shape");x(["J.shape.Shape"],"J.shape.FontLineShape",null,function(){var b=s(function(){this.font3d=this.tickInfos=null;r(this,arguments)},J.shape,"FontLineShape",J.shape.Shape);
f(b,"initShape",function(){this.translucentAllowed=!1});c(b,"setPropFLS",function(a,d){if("tickInfo"===a){var b=d.type;if(null==d.ticks)if(" "==d.type)this.tickInfos=null;else{if(null!=this.tickInfos){for(var b=!1,c=0;4>c;c++)null!=this.tickInfos[c]&&this.tickInfos[c].type==d.type?this.tickInfos[c]=null:b=!0;b||(this.tickInfos=null)}}else null==this.tickInfos&&(this.tickInfos=Array(4)),this.tickInfos["xyz".indexOf(b)+1]=d}else"font"===a&&(this.font3d=d)},"~S,~O");f(b,"getShapeState",function(){return null})});
m("J.shape");x(["J.shape.Shape"],"J.shape.Frank",["J.i18n.GT","JV.Viewer"],function(){var b=s(function(){this.baseFont3d=this.currentMetricsFont3d=null;this.scaling=this.dy=this.dx=this.y=this.x=this.frankDescent=this.frankAscent=this.frankWidth=0;this.font3d=null;r(this,arguments)},J.shape,"Frank",J.shape.Shape);f(b,"initShape",function(){this.myType="frank";this.baseFont3d=this.font3d=this.vwr.gdata.getFont3DFSS("SansSerif","Plain",16);if(JV.Viewer.isJS||JV.Viewer.isSwingJS)J.shape.Frank.frankString=
"JSmol";this.calcMetrics()});f(b,"setProperty",function(a,d){"font"===a&&10<=d.fontSize&&(this.baseFont3d=d,this.scaling=0)},"~S,~O,JU.BS");f(b,"wasClicked",function(a,d){var b=this.vwr.getScreenWidth(),c=this.vwr.getScreenHeight();return 0<b&&0<c&&a>b-this.frankWidth-4&&d>c-this.frankAscent-4},"~N,~N");f(b,"checkObjectHovered",function(a,d){if(!this.vwr.getShowFrank()||!this.wasClicked(a,d)||!this.vwr.menuEnabled())return!1;this.vwr.hoverOnPt(a,d,J.i18n.GT.$("Click for menu..."),null,null);return!0},
"~N,~N,JU.BS");c(b,"calcMetrics",function(){this.font3d!==this.currentMetricsFont3d&&(this.currentMetricsFont3d=this.font3d,this.frankWidth=this.font3d.stringWidth(J.shape.Frank.frankString),this.frankDescent=this.font3d.getDescent(),this.frankAscent=this.font3d.getAscent())});c(b,"getFont",function(a){a!=this.scaling&&(this.scaling=a,this.font3d=this.vwr.gdata.getFont3DScaled(this.baseFont3d,a),this.calcMetrics())},"~N");f(b,"getShapeState",function(){return null});b.frankString="Jmol"});m("J.shape");
x(null,"J.shape.Shape",["J.c.PAL","JU.C","$.Logger","JV.JC"],function(){var b=s(function(){this.ms=this.vwr=this.myType=null;this.translucentLevel=this.vf=this.shapeID=0;this.translucentAllowed=!0;this.isBioShape=!1;this.bsColixSet=this.bsSizeSet=null;r(this,arguments)},J.shape,"Shape",null);c(b,"initializeShape",function(a,d,b){this.vwr=a;this.shapeID=b;this.vf=JV.JC.getShapeVisibilityFlag(b);this.setModelSet(d);this.initShape()},"JV.Viewer,JM.ModelSet,~N");c(b,"setModelVisibilityFlags",function(){},
"JU.BS");c(b,"getSize",function(){return 0},"~N");c(b,"getSizeG",function(){return 0},"JM.Group");c(b,"replaceGroup",function(){},"JM.Group,JM.Group");c(b,"setModelSet",function(a){this.ms=a;this.initModelSet()},"JM.ModelSet");c(b,"initModelSet",function(){});c(b,"setShapeSizeRD",function(a,d,b){null==d?this.setSize(a,b):this.setSizeRD(d,b)},"~N,J.atomdata.RadiusData,JU.BS");c(b,"setSize",function(){},"~N,JU.BS");c(b,"setSizeRD",function(){},"J.atomdata.RadiusData,JU.BS");c(b,"setPropS",function(a,
d){"setProperties"===a?this.setProperties(d):"translucentLevel"===a?this.translucentLevel=d.floatValue():"refreshTrajectories"!==a&&JU.Logger.warn("unassigned "+JV.JC.shapeClassBases[this.shapeID]+" + shape setProperty:"+a+":"+d)},"~S,~O,JU.BS");c(b,"setProperties",function(a){var d=this.vwr.bsA();if(C(a,"JU.Lst"))for(;0<a.size();){var b=a.removeItemAt(0);this.setProperty(b[0].intern(),b[1],d)}else{b=a;a=0;for(var c=b.length;a<c;a++)this.setProperty(b[a][0].intern(),b[a][1],d)}},"~O");c(b,"getPropertyData",
function(a,d){return this.getPropShape(a,d)},"~S,~A");c(b,"getPropShape",function(a,d){if(C(d[1],Integer)){var b=d[1].intValue();d[1]=this.getProperty(a,b);return null!=d[1]}return!1},"~S,~A");c(b,"getProperty",function(){return null},"~S,~N");c(b,"getIndexFromName",function(){return-1},"~S");c(b,"wasClicked",function(){return!1},"~N,~N");c(b,"findNearestAtomIndex",function(){},"~N,~N,~A,JU.BS");c(b,"checkBoundsMinMax",function(){},"JU.P3,JU.P3");c(b,"setAtomClickability",function(){});c(b,"checkObjectClicked",
function(){return null},"~N,~N,~N,JU.BS,~B");c(b,"checkObjectHovered",function(){return!1},"~N,~N,JU.BS");c(b,"checkObjectDragged",function(){return!1},"~N,~N,~N,~N,~N,JU.BS");c(b,"coordinateInRange",function(a,d,b,c,e){this.vwr.tm.transformPtScrSafe(b,e);a=(a-e.x)*(a-e.x)+(d-e.y)*(d-e.y);return a<=c?a:-1},"~N,~N,JU.T3,~N,JU.P3i");c(b,"getColixI",function(a,d,b){return this.getColixA(a,d,this.ms.at[b])},"~N,~N,~N");c(b,"getColixA",function(a,d,b){return 2==a?this.vwr.cm.getColixAtomPalette(b,d):a},
"~N,~N,JM.Atom");c(b,"getColixB",function(a,d,b){return 2==a?this.vwr.cm.getColixBondPalette(b,d):a},"~N,~N,JM.Bond");c(b,"getShapeDetail",function(){return null});b.getColix=c(b,"getColix",function(a,d,b){return JU.C.getColixInherited(null==a||d>=a.length?0:a[d],b.colixAtom)},"~A,~N,JM.Atom");b.getFontCommand=c(b,"getFontCommand",function(a,d){return null==d?"":"font "+a+" "+d.getInfo()},"~S,JU.Font");b.getColorCommandUnk=c(b,"getColorCommandUnk",function(a,d,b){return J.shape.Shape.getColorCommand(a,
J.c.PAL.UNKNOWN.id,d,b)},"~S,~N,~B");b.getColorCommand=c(b,"getColorCommand",function(a,d,b,c){if(d==J.c.PAL.UNKNOWN.id&&0==b)return"";d=d==J.c.PAL.UNKNOWN.id&&0==b?"":(c?J.shape.Shape.getTranslucentLabel(b)+" ":"")+(d!=J.c.PAL.UNKNOWN.id&&!J.c.PAL.isPaletteVariable(d)?J.c.PAL.getPaletteName(d):J.shape.Shape.encodeColor(b));return"color "+a+" "+d},"~S,~N,~N,~B");b.encodeColor=c(b,"encodeColor",function(a){return JU.C.isColixColorInherited(a)?"none":JU.C.getHexCode(a)},"~N");b.getTranslucentLabel=
c(b,"getTranslucentLabel",function(a){return JU.C.isColixTranslucent(a)?JU.C.getColixTranslucencyLabel(a):"opaque"},"~N");b.appendCmd=c(b,"appendCmd",function(a,d){0!=d.length&&a.append("  ").append(d).append(";\n")},"JU.SB,~S")});m("J.shape");x(["J.shape.Shape","JU.P3i"],"J.shape.Sticks","java.util.Hashtable JU.BS $.P3 J.c.PAL JU.BSUtil $.C $.Edge $.Escape".split(" "),function(){var b=s(function(){this.myMask=0;this.haveStrutPoints=this.reportAll=!1;this.ptXY=this.closestAtom=this.selectedBonds=
this.bsOrderSet=null;r(this,arguments)},J.shape,"Sticks",J.shape.Shape);N(b,function(){this.closestAtom=D(1,0);this.ptXY=new JU.P3i});f(b,"initShape",function(){this.myMask=1023;this.reportAll=!1});f(b,"setSize",function(a,d){if(2147483647==a)this.selectedBonds=JU.BSUtil.copy(d);else if(-2147483648==a)null==this.bsOrderSet&&(this.bsOrderSet=new JU.BS),this.bsOrderSet.or(d);else{null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS);for(var b=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):
this.ms.getBondIteratorForType(this.myMask,d);b.hasNext();){this.bsSizeSet.set(b.nextIndex());var c=b.next();null!=c&&c.setMad(a)}}},"~N,JU.BS");f(b,"setProperty",function(a,d,b){if("type"===a)this.myMask=d.intValue();else if("reportAll"===a)this.reportAll=!0;else if("reset"===a)this.selectedBonds=this.bsColixSet=this.bsSizeSet=this.bsOrderSet=null;else if("bondOrder"===a){null==this.bsOrderSet&&(this.bsOrderSet=new JU.BS);a=d.intValue();for(b=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):
this.ms.getBondIteratorForType(65535,b);b.hasNext();)this.bsOrderSet.set(b.nextIndex()),b.next().setOrder(a)}else if("color"===a)if(null==this.bsColixSet&&(this.bsColixSet=new JU.BS),a=JU.C.getColixO(d),d=C(d,"J.c.PAL")?d:null,d===J.c.PAL.TYPE||d===J.c.PAL.ENERGY){var c=d===J.c.PAL.ENERGY;for(b=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):this.ms.getBondIteratorForType(this.myMask,b);b.hasNext();){this.bsColixSet.set(b.nextIndex());var e=b.next();e.colix=c?this.getColixB(a,
d.id,e):JU.C.getColix(JU.Edge.getArgbHbondType(e.order))}}else{if(!(2==a&&d!==J.c.PAL.CPK))for(b=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):this.ms.getBondIteratorForType(this.myMask,b);b.hasNext();)d=b.nextIndex(),b.next().colix=a,this.bsColixSet.setBitTo(d,0!=a&&2!=a)}else if("translucency"===a){null==this.bsColixSet&&(this.bsColixSet=new JU.BS);a=d.equals("translucent");for(b=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):this.ms.getBondIteratorForType(this.myMask,
b);b.hasNext();)this.bsColixSet.set(b.nextIndex()),b.next().setTranslucent(a,this.translucentLevel)}else"deleteModelAtoms"!==a&&this.setPropS(a,d,b)},"~S,~O,JU.BS");f(b,"getProperty",function(a){return a.equals("selectionState")?null!=this.selectedBonds?"select BONDS "+JU.Escape.eBS(this.selectedBonds)+"\n":"":a.equals("sets")?z(-1,[this.bsOrderSet,this.bsSizeSet,this.bsColixSet]):null},"~S,~N");f(b,"setAtomClickability",function(){for(var a=this.ms.bo,d=this.ms.bondCount;0<=--d;){var b=a[d];null==
b||(0==(b.shapeVisibilityFlags&this.vf)||this.ms.isAtomHidden(b.atom1.i)||this.ms.isAtomHidden(b.atom2.i))||(b.atom1.setClickable(this.vf),b.atom2.setClickable(this.vf))}});f(b,"getShapeState",function(){return null});f(b,"checkObjectHovered",function(a,d,b){var c=new JU.P3;b=this.findPickedBond(a,d,b,c,this.closestAtom);if(null==b)return!1;this.vwr.highlightBond(b.index,this.closestAtom[0],a,d);return!0},"~N,~N,JU.BS");f(b,"checkObjectClicked",function(a,d,b,c){b=new JU.P3;a=this.findPickedBond(a,
d,c,b,this.closestAtom);if(null==a)return null;d=a.atom1.mi;c=a.getIdentity();var e=new java.util.Hashtable;e.put("pt",b);e.put("index",Integer.$valueOf(a.index));e.put("modelIndex",Integer.$valueOf(d));e.put("model",this.vwr.getModelNumberDotted(d));e.put("type","bond");e.put("info",c);this.vwr.setStatusAtomPicked(-3,'["bond","'+a.getIdentity()+'",'+b.x+","+b.y+","+b.z+"]",e,!1);return e},"~N,~N,~N,JU.BS,~B");c(b,"findPickedBond",function(a,d,b,c,e){b=100;this.vwr.gdata.isAntialiased()&&(a<<=1,d<<=
1,b<<=1);for(var g=null,j=new JU.P3,k=this.ms.bo,l=this.ms.bondCount;0<=--l;){var f=k[l];if(!(null==f||0==f.shapeVisibilityFlags)){var n=f.atom1,q=f.atom2;if(n.checkVisible()&&q.checkVisible()){j.ave(n,q);var v=this.coordinateInRange(a,d,j,b,this.ptXY);if(0<=v&&40<Math.abs(n.sY-q.sY)+Math.abs(n.sX-q.sX)){var B=1*(this.ptXY.x-n.sX)/(q.sX-n.sX);0.4>B||0.6<B||(b=v,g=f,null!=e&&(e[0]=0.5>B?n.i:q.i),c.setT(j))}}}}return g},"~N,~N,JU.BS,JU.P3,~A")});m("J.shape");x(["J.shape.FontLineShape"],"J.shape.Uccage",
null,function(){var b=G(J.shape,"Uccage",J.shape.FontLineShape);f(b,"setProperty",function(a,d){this.setPropFLS(a,d)},"~S,~O,JU.BS");c(b,"initShape",function(){ba(this,J.shape.Uccage,"initShape",[]);this.font3d=this.vwr.gdata.getFont3D(16);this.myType="unitcell"})});m("J.thread");x(["J.thread.JmolThread"],"J.thread.HoverWatcherThread",null,function(){var b=s(function(){this.moved=this.current=this.actionManager=null;this.hoverDelay=0;r(this,arguments)},J.thread,"HoverWatcherThread",J.thread.JmolThread);
u(b,function(a,d,b,c){this.setViewer(c,"HoverWatcher");this.actionManager=a;this.current=d;this.moved=b;this.start()},"JV.ActionManager,JV.MouseState,JV.MouseState,JV.Viewer");f(b,"run1",function(a){for(;;)switch(a){case -1:this.isJS||Thread.currentThread().setPriority(1);a=0;break;case 0:this.hoverDelay=this.vwr.getHoverDelay();if(this.stopped||0>=this.hoverDelay||!this.runSleep(this.hoverDelay,1))return;a=1;break;case 1:this.moved.is(this.current)&&(this.currentTime=System.currentTimeMillis(),this.currentTime-
this.moved.time>(this.vwr.acm.zoomTrigger?100:this.hoverDelay)&&!this.stopped&&this.actionManager.checkHover()),a=0}},"~N")});m("J.thread");x(["java.lang.Thread"],"J.thread.JmolThread",["JU.Logger","JV.Viewer"],function(){var b=s(function(){this.$name="JmolThread";this.sc=this.eval=this.vwr=null;this.hoverEnabled=this.haveReference=!1;this.sleepTime=this.currentTime=this.lastRepaintTime=this.targetTime=this.startTime=0;this.isReset=this.stopped=this.isJS=!1;this.useTimeout=!0;this.junk=0;r(this,arguments)},
J.thread,"JmolThread",Thread);c(b,"setManager",function(){return 0},"~O,JV.Viewer,~O");c(b,"setViewer",function(a,d){this.setName(d);this.$name=d+"_"+ ++J.thread.JmolThread.threadIndex;this.vwr=a;this.isJS=a.isSingleThreaded},"JV.Viewer,~S");c(b,"setEval",function(a){this.eval=a;this.sc=this.vwr.getEvalContextAndHoldQueue(a);null!=this.sc&&(this.useTimeout=a.getAllowJSThreads())},"J.api.JmolScriptEvaluator");c(b,"resumeEval",function(){if(!(null==this.eval||!this.isJS&&!this.vwr.testAsync||!this.useTimeout)){this.sc.mustResumeEval=
!this.stopped;var a=this.eval,d=this.sc;this.sc=this.eval=null;setTimeout(function(){a.resumeEval(d)},1)}});f(b,"start",function(){this.run()});f(b,"run",function(){this.startTime=System.currentTimeMillis();try{this.run1(-1)}catch(a){if(E(a,"InterruptedException")){var d=a;JU.Logger.debugging&&!C(this,"J.thread.HoverWatcherThread")&&this.oops(d)}else if(E(a,Exception))this.oops(a);else throw a;}});c(b,"oops",function(a){JU.Logger.debug(this.$name+" exception "+a);(!JV.Viewer.isJS||JV.Viewer.isSwingJS)&&
a.printStackTrace();this.vwr.queueOnHold=!1},"Exception");c(b,"runSleep",function(a,d){if(this.isJS&&!this.useTimeout)return!0;var b=this;setTimeout(function(){b.run1(d)},Math.max(a,0));return!1},"~N,~N");c(b,"interrupt",function(){this.stopped=!0;this.vwr.startHoverWatcher(!0);this.isJS||ba(this,J.thread.JmolThread,"interrupt",[])});c(b,"checkInterrupted",function(a){return this.haveReference&&(null==a||!a.$name.equals(this.$name))?!0:this.stopped},"J.thread.JmolThread");c(b,"reset",function(){this.isReset=
!0;this.interrupt()});c(b,"toString",function(){return ba(this,J.thread.JmolThread,"toString",[])+"["+this.$name+"]"});b.threadIndex=0});m("J.thread");x(["J.thread.JmolThread"],"J.thread.TimeoutThread",["JU.SB"],function(){var b=s(function(){this.script=null;this.status=0;this.triggered=!0;r(this,arguments)},J.thread,"TimeoutThread",J.thread.JmolThread);u(b,function(a,d,b,c){this.setViewer(a,d);this.$name=d;this.set(b,c)},"JV.Viewer,~S,~N,~S");c(b,"set",function(a,d){this.sleepTime=a;null!=d&&(this.script=
d)},"~N,~S");f(b,"toString",function(){return"timeout name="+this.$name+" executions="+this.status+" mSec="+this.sleepTime+" secRemaining="+(this.targetTime-System.currentTimeMillis())/1E3+" script="+this.script});f(b,"run1",function(a){for(;;)switch(a){case -1:this.isJS||Thread.currentThread().setPriority(1);this.targetTime=System.currentTimeMillis()+Math.abs(this.sleepTime);a=0;break;case 0:if(this.checkInterrupted(null)||(null==this.script||0==this.script.length)||!this.runSleep(26,1))return;a=
1;break;case 1:a=System.currentTimeMillis()<this.targetTime?0:2;break;case 2:this.currentTime=System.currentTimeMillis();if(null==this.vwr.timeouts.get(this.$name))return;this.status++;(a=0>this.sleepTime)?this.targetTime=System.currentTimeMillis()+Math.abs(this.sleepTime):this.vwr.timeouts.remove(this.$name);this.triggered&&(this.triggered=!1,this.$name.equals("_SET_IN_MOTION_")?this.vwr.checkInMotion(2):this.vwr.evalStringQuiet(a?this.script+';\ntimeout ID "'+this.$name+'";':this.script));a=a?0:
-2;break;case -2:this.vwr.timeouts.remove(this.$name);return}},"~N");b.clear=c(b,"clear",function(a){for(var d,b=a.values().iterator();b.hasNext()&&((d=b.next())||1);){var c=d;c.script.equals("exitJmol")||c.interrupt()}a.clear()},"java.util.Map");b.setTimeout=c(b,"setTimeout",function(a,d,b,c,e){var g=d.get(b);0==c?null!=g&&(g.interrupt(),d.remove(b)):null!=g?g.set(c,e):(g=new J.thread.TimeoutThread(a,b,c,e),d.put(b,g),g.start())},"JV.Viewer,java.util.Map,~S,~N,~S");b.trigger=c(b,"trigger",function(a,
d){var b=a.get(d);null!=b&&(b.triggered=0>b.sleepTime)},"java.util.Map,~S");b.showTimeout=c(b,"showTimeout",function(a,d){var b=new JU.SB;if(null!=a)for(var c,e=a.values().iterator();e.hasNext()&&((c=e.next())||1);){var g=c;(null==d||g.$name.equalsIgnoreCase(d))&&b.append(g.toString()).append("\n")}return 0<b.length()?b.toString():"<no timeouts set>"},"java.util.Map,~S")});m("JM");x(["JU.Node","$.Point3fi","J.c.PAL"],"JM.Atom","JU.BS $.CU $.P3 $.PT $.SB J.atomdata.RadiusData J.c.VDW JM.Group JU.C $.Elements JV.JC".split(" "),
function(){var b=s(function(){this.altloc="\x00";this.atomSite=this.atomID=0;this.group=null;this.atomNumberFlags=this.valence=this.userDefinedVanDerWaalRadius=0;this.atomSymmetry=null;this.paletteID=this.colixAtom=this.madAtom=this.formalChargeAndFlags=0;this.bonds=null;this.shapeVisibilityFlags=this.clickabilityFlags=this.nBackbonesDisplayed=this.nBondsDisplayed=0;r(this,arguments)},JM,"Atom",JU.Point3fi,JU.Node);N(b,function(){this.paletteID=J.c.PAL.CPK.id});f(b,"setAtom",function(a,d,b,c,e,g,
j,k,l){this.mi=a;this.atomSymmetry=e;this.atomSite=g;this.i=d;this.atomNumberFlags=j;l&&(this.formalChargeAndFlags=2);0!=k&&-2147483648!=k&&this.setFormalCharge(k);this.userDefinedVanDerWaalRadius=c;null!=b&&this.setT(b);return this},"~N,~N,JU.P3,~N,JU.BS,~N,~N,~N,~B,~B");c(b,"setShapeVisibility",function(a,d){this.shapeVisibilityFlags=d?this.shapeVisibilityFlags|a:this.shapeVisibilityFlags&~a},"~N,~B");c(b,"isCovalentlyBonded",function(a){if(null!=this.bonds)for(var d=this.bonds.length;0<=--d;)if(this.bonds[d].isCovalent()&&
this.bonds[d].getOtherAtom(this)===a)return!0;return!1},"JM.Atom");c(b,"isBonded",function(a){if(null!=this.bonds)for(var d=this.bonds.length;0<=--d;)if(this.bonds[d].getOtherAtom(this)===a)return!0;return!1},"JM.Atom");c(b,"getBond",function(a){if(null!=this.bonds)for(var d=this.bonds.length;0<=--d;)if(null!=this.bonds[d].getOtherAtom(a))return this.bonds[d];return null},"JM.Atom");c(b,"addDisplayedBond",function(a,d){this.nBondsDisplayed+=d?1:-1;this.setShapeVisibility(a,0<this.nBondsDisplayed)},
"~N,~B");c(b,"deleteBond",function(a){if(null!=this.bonds)for(var d=this.bonds.length;0<=--d;)if(this.bonds[d]===a){this.deleteBondAt(d);break}},"JM.Bond");c(b,"deleteBondAt",function(a){this.setCIPChirality(0);var d=this.bonds.length-1;if(0==d)this.bonds=null;else{for(var b=Array(d),c=0;c<a;++c)b[c]=this.bonds[c];for(;c<d;++c)b[c]=this.bonds[c+1];this.bonds=b}},"~N");f(b,"getBondedAtomIndex",function(a){return this.bonds[a].getOtherAtom(this).i},"~N");c(b,"setMadAtom",function(a,d){this.madAtom=
this.calculateMad(a,d)},"JV.Viewer,J.atomdata.RadiusData");c(b,"calculateMad",function(a,d){if(null==d)return 0;var b=d.value;if(0==b)return 0;switch(d.factorType){case J.atomdata.RadiusData.EnumType.SCREEN:return xa(b);case J.atomdata.RadiusData.EnumType.FACTOR:case J.atomdata.RadiusData.EnumType.OFFSET:var c=0;switch(d.vdwType){case J.c.VDW.TEMP:c=a.ms.getBfactor100Hi();c=0<c?this.getBfactor100()/c:0;break;case J.c.VDW.HYDRO:c=Math.abs(this.getHydrophobicity());break;case J.c.VDW.BONDING:c=this.getBondingRadius();
break;case J.c.VDW.ADPMIN:case J.c.VDW.ADPMAX:c=this.getADPMinMax(d.vdwType===J.c.VDW.ADPMAX);break;default:c=this.getVanderwaalsRadiusFloat(a,d.vdwType)}b=d.factorType===J.atomdata.RadiusData.EnumType.FACTOR?b*c:b+c;break;case J.atomdata.RadiusData.EnumType.ABSOLUTE:if(16.1==b)return 32200}c=xa(0>b?b:2E3*b);0>c&&0<b&&(c=0);return c},"JV.Viewer,J.atomdata.RadiusData");c(b,"getADPMinMax",function(a){var d=this.getTensors();if(null==d)return 0;var b=d[0];if(null==b||1!=b.iType)return 0;this.group.chain.model.ms.isModulated(this.i)&&
b.isUnmodulated&&(b=d[1]);return b.getFactoredValue(a?2:1)},"~B");c(b,"getTensors",function(){return this.group.chain.model.ms.getAtomTensorList(this.i)});c(b,"getRasMolRadius",function(){return Math.abs(w(this.madAtom/8))});f(b,"getEdges",function(){return null==this.bonds?[]:this.bonds});f(b,"getBondCount",function(){return null==this.bonds?0:this.bonds.length});c(b,"setTranslucent",function(a,d){this.colixAtom=JU.C.getColixTranslucent3(this.colixAtom,a,d)},"~B,~N");f(b,"getElementNumber",function(){return JU.Elements.getElementNumber(this.atomNumberFlags)});
f(b,"getIsotopeNumber",function(){return JU.Elements.getIsotopeNumber(this.atomNumberFlags)});f(b,"getAtomicAndIsotopeNumber",function(){return this.atomNumberFlags});c(b,"setAtomicAndIsotopeNumber",function(a){if(0>a||(a&127)>=JU.Elements.elementNumberMax||65535<a)a=0;this.atomNumberFlags=a},"~N");c(b,"getElementSymbolIso",function(a){return JU.Elements.elementSymbolFromNumber(a?this.atomNumberFlags:this.atomNumberFlags&127)},"~B");c(b,"getElementSymbol",function(){return this.getElementSymbolIso(!0)});
c(b,"isHetero",function(){return 0!=(this.formalChargeAndFlags&2)});c(b,"hasVibration",function(){return 0!=(this.formalChargeAndFlags&1)});c(b,"setFormalCharge",function(a){this.formalChargeAndFlags=this.formalChargeAndFlags&15|(-2147483648==a?0:7<a?7:-3>a?-3:a)<<24},"~N");c(b,"setVibrationVector",function(){this.formalChargeAndFlags|=1});c(b,"setNegativeDisorder",function(){this.formalChargeAndFlags|=4});c(b,"isNegativeDisorder",function(){return 0!=(this.formalChargeAndFlags&4)});f(b,"getFormalCharge",
function(){return this.formalChargeAndFlags>>24});c(b,"getOccupancy100",function(){var a=this.group.chain.model.ms.occupancies;return null==a?100:Math.round(a[this.i])});c(b,"isOccupied",function(){var a=this.group.chain.model.ms.occupancies;return null==a||50<=a[this.i]});c(b,"getBfactor100",function(){var a=this.group.chain.model.ms.bfactor100s;return null==a?0:a[this.i]});c(b,"getHydrophobicity",function(){var a=this.group.chain.model.ms.hydrophobicities;return null==a?JU.Elements.getHydrophobicity(this.group.groupID):
a[this.i]});c(b,"setRadius",function(a){return!Float.isNaN(this.userDefinedVanDerWaalRadius=0<a?a:NaN)},"~N");c(b,"$delete",function(a){this.valence=-1;if(null!=this.bonds)for(var d=this.bonds.length;0<=--d;){var b=this.bonds[d];b.getOtherAtom(this).deleteBond(b);a.set(b.index)}this.bonds=null},"JU.BS");f(b,"isDeleted",function(){return 0>this.valence});c(b,"setValence",function(a){this.isDeleted()||(this.valence=0>a?0:127>=a?a:127)},"~N");f(b,"getValence",function(){return this.isDeleted()?-1:0<
this.valence?this.valence:this.getValenceAromatic(!0)});c(b,"getValenceAromatic",function(a){if(this.isDeleted())return-1;var d=this.valence;if(0==d&&null!=this.bonds){for(var b=0,c=this.bonds.length;0<=--c;)d+=this.bonds[c].getValence(),a&&this.bonds[c].is(515)&&b++;0<d&&(3>d&&0!=b)&&d++}return d},"~B");f(b,"getCovalentBondCount",function(){if(null==this.bonds)return 0;for(var a=0,d=this.bonds.length;0<=--d;){var b=this.bonds[d];b.isCovalentNotPartial0()&&!b.getOtherAtom(this).isDeleted()&&++a}return a});
c(b,"getCovalentOrPartialBondCount",function(){if(null==this.bonds)return 0;for(var a=0,d=this.bonds.length;0<=--d;){var b=this.bonds[d];b.isCovalent()&&!b.getOtherAtom(this).isDeleted()&&++a}return a});f(b,"getCovalentHydrogenCount",function(){if(null==this.bonds)return 0;for(var a=0,d=this.bonds.length;0<=--d;)if(this.bonds[d].isCovalentNotPartial0()){var b=this.bonds[d].getOtherAtom(this);0<=b.valence&&1==b.getElementNumber()&&++a}return a});f(b,"getImplicitHydrogenCount",function(){return this.group.chain.model.ms.getMissingHydrogenCount(this,
!1)});f(b,"getTotalHydrogenCount",function(){return this.getCovalentHydrogenCount()+this.getImplicitHydrogenCount()});f(b,"getTotalValence",function(){var a=this.getValence();if(0>a)return a;var d=this.getImplicitHydrogenCount();return a+d+this.group.chain.model.ms.aaRet[4]});f(b,"getCovalentBondCountPlusMissingH",function(){return this.getCovalentBondCount()+this.getImplicitHydrogenCount()});c(b,"getTargetValence",function(){switch(this.getElementNumber()){case 6:case 14:case 32:return 4;case 5:case 7:case 15:return 3;
case 8:case 16:return 2;case 1:case 9:case 17:case 35:case 53:return 1}return-1});c(b,"getDimensionValue",function(a){return 0==a?this.x:1==a?this.y:this.z},"~N");c(b,"getVanderwaalsRadiusFloat",function(a,d){return Float.isNaN(this.userDefinedVanDerWaalRadius)?a.getVanderwaalsMarType(this.atomNumberFlags,this.getVdwType(d))/1E3:this.userDefinedVanDerWaalRadius},"JV.Viewer,J.c.VDW");c(b,"getVdwType",function(a){switch(a){case J.c.VDW.AUTO:a=this.group.chain.model.ms.getDefaultVdwType(this.mi);break;
case J.c.VDW.NOJMOL:a=this.group.chain.model.ms.getDefaultVdwType(this.mi),a===J.c.VDW.AUTO_JMOL&&(a=J.c.VDW.AUTO_BABEL)}return a},"J.c.VDW");c(b,"getBondingRadius",function(){var a=this.group.chain.model.ms.bondingRadii,a=null==a||this.i>=a.length?0:a[this.i];return 0==a?JU.Elements.getBondingRadius(this.atomNumberFlags,this.getFormalCharge()):a});c(b,"getVolume",function(a,d){var b=null==d?this.userDefinedVanDerWaalRadius:NaN;Float.isNaN(b)&&(b=a.getVanderwaalsMarType(this.getElementNumber(),this.getVdwType(d))/
1E3);var c=0;if(null!=this.bonds)for(var e=0;e<this.bonds.length;e++)if(this.bonds[e].isCovalent()){var g=this.bonds[e].getOtherAtom(this),j=null==d?g.userDefinedVanDerWaalRadius:NaN;Float.isNaN(j)&&(j=a.getVanderwaalsMarType(g.getElementNumber(),g.getVdwType(d))/1E3);g=this.distance(g);if(!(g>b+j)){if(g+b<=j)return 0;j=b-(b*b+g*g-j*j)/(2*g);c-=1.0471975511965976*j*j*(3*b-j)}}return c+4.1887902047863905*b*b*b},"JV.Viewer,J.c.VDW");c(b,"getCurrentBondCount",function(){return null==this.bonds?0:this.bonds.length});
c(b,"getRadius",function(){return Math.abs(this.madAtom/2E3)});f(b,"getIndex",function(){return this.i});f(b,"getAtomSite",function(){return this.atomSite});f(b,"getGroupBits",function(a){this.group.setAtomBits(a)},"JU.BS");f(b,"getAtomName",function(){return 0<this.atomID?JM.Group.specialAtomNames[this.atomID]:null==this.group.chain.model.ms.atomNames?"":this.group.chain.model.ms.atomNames[this.i]});f(b,"getAtomType",function(){var a=this.group.chain.model.ms.atomTypes,a=null==a?null:a[this.i];return null==
a?this.getAtomName():a});f(b,"getAtomNumber",function(){var a=this.group.chain.model.ms.atomSerials;return null==a?this.i:a[this.i]});c(b,"getSeqID",function(){var a=this.group.chain.model.ms.atomSeqIDs;return null==a?0:a[this.i]});c(b,"isVisible",function(a){return(this.shapeVisibilityFlags&a)==a},"~N");c(b,"getPartialCharge",function(){var a=this.group.chain.model.ms.partialCharges;return null==a?0:a[this.i]});c(b,"getSymmetryTranslation",function(a,d,b){for(var c=0;c<d.length;c++)if(this.atomSymmetry.get(a+=
b))return d[c];return 0},"~N,~A,~N");c(b,"getCellTranslation",function(a,d,b){for(var c=b,e=0;e<d.length;e++)for(var g=0;g<b;g++,c++)if(this.atomSymmetry.get(c)&&d[e]==a)return d[e];return 0},"~N,~A,~N");c(b,"getSymmetryOperatorList",function(a){var d="",b=this.group.chain.model.ms,c=b.getModelSymmetryCount(this.mi);if(0==c||null==this.atomSymmetry)return"";for(var b=b.getModelCellRange(this.mi),e=c,g=null==b?1:b.length,j=a?null:new JU.BS,k=0;k<g;k++)for(var l=0;l<c;l++)this.atomSymmetry.get(e++)&&
(a?d+=","+(l+1)+(null==b?555:b[k]):j.set(l+1));if(!a)for(k=j.nextSetBit(0);0<=k;k=j.nextSetBit(k+1))d+=","+k;return 0==d.length?"":d.substring(1)},"~B");f(b,"getModelIndex",function(){return this.mi});f(b,"getMoleculeNumber",function(a){return this.group.chain.model.ms.getMoleculeIndex(this.i,a)+1},"~B");c(b,"getFractionalCoord",function(a,d,b,c){c=this.getFractionalCoordPt(a,b,c);return"X"==d?c.x:"Y"==d?c.y:c.z},"~B,~S,~B,JU.P3");f(b,"getXYZ",function(){return this});c(b,"getFractionalCoordPt",function(a,
d,b){var c=this.getUnitCell();null==b?b=JU.P3.newP(this):b.setT(this);null!=c&&(c=c.getUnitCellMultiplied(),c.toFractional(b,d),a&&JU.PT.fixPtFloats(b,1E5));return b},"~B,~B,JU.P3");c(b,"getUnitCell",function(){return this.group.chain.model.ms.getUnitCellForAtom(this.i)});c(b,"getFractionalUnitCoord",function(a,d,b){b=this.getFractionalUnitCoordPt(a,!1,b);return"X"==d?b.x:"Y"==d?b.y:b.z},"~B,~S,JU.P3");c(b,"getFractionalUnitCoordPt",function(a,d,b){var c=this.getUnitCell();null==b?b=JU.P3.newP(this):
b.setT(this);if(null==c)return b;c=c.getUnitCellMultiplied();this.group.chain.model.isJmolDataFrame?(c.toFractional(b,!1),d&&c.toCartesian(b,!1)):(c.toUnitCell(b,null),d||c.toFractional(b,!1));a&&JU.PT.fixPtFloats(b,d?1E4:1E5);return b},"~B,~B,JU.P3");c(b,"getFractionalUnitDistance",function(a,d,b){var c=this.getUnitCell();if(null==c)return this.distance(a);d.setT(this);b.setT(a);this.group.chain.model.isJmolDataFrame?(c.toFractional(d,!0),c.toFractional(b,!0)):(c.toUnitCell(d,null),c.toUnitCell(b,
null));return d.distance(b)},"JU.T3,JU.T3,JU.T3");c(b,"setFractionalCoord",function(a,d,b){var c=this.getUnitCell();null!=c&&c.toFractional(this,b);switch(a){case 1111492615:case 1111492612:this.x=d;break;case 1111492616:case 1111492613:this.y=d;break;case 1111492617:case 1111492614:this.z=d}null!=c&&c.toCartesian(this,b)},"~N,~N,~B");c(b,"setFractionalCoordTo",function(a,d){this.setFractionalCoordPt(this,a,d)},"JU.P3,~B");c(b,"setFractionalCoordPt",function(a,d,b){a.setT(d);d=this.getUnitCell();
null!=d&&d.toCartesian(a,b&&!this.group.chain.model.isJmolDataFrame)},"JU.P3,JU.P3,~B");c(b,"isCursorOnTopOf",function(a,d,b,c){var e=w(this.sD/2);e<b&&(e=b);b=e*e;e=this.sX-a;e*=e;if(e>b)return!1;var g=this.sY-d;b-=e+g*g;if(0>b)return!1;if(null==c)return!0;var e=this.sZ,g=c.sZ,j=w(c.sD/2);if(e<g-j)return!0;a=c.sX-a;d=c.sY-d;d=j*j-(a*a+d*d);return e-Math.sqrt(b)<g-Math.sqrt(d)},"~N,~N,~N,JM.Atom");c(b,"getInfo",function(){return this.getIdentity(2)});c(b,"getIdentityXYZ",function(a,d){a=3==d||this.group.chain.model.isJmolDataFrame?
this.getFractionalCoordPt(!this.group.chain.model.ms.vwr.g.legacyJavaFloat,!1,a):this;return(3==d?"":this.getIdentity(d)+" ")+JU.PT.formatF(a.x,0,3,!0,!0)+" "+JU.PT.formatF(a.y,0,3,!0,!0)+" "+JU.PT.formatF(a.z,0,3,!0,!0)},"JU.P3,~N");c(b,"getIdentity",function(a){var d=new JU.SB,b=this.getGroup3(!0);if(null!=b&&0<b.length&&(!b.equals("UNK")||this.group.chain.model.isBioModel)){d.append("[");d.append(b);d.append("]");b=this.group.getSeqcodeString();null!=b&&d.append(b);b=this.group.chain.chainID;if(0!=
b&&32!=b){d.append(":");var c=this.getChainIDStr();256<=b&&(c=JU.PT.esc(c));d.append(c)}if(2!=a&&5!=a)return d.toString();d.append(".")}d.append(this.getAtomName());0==d.length()&&(d.append(this.getElementSymbolIso(!1)),d.append(" "),d.appendI(this.getAtomNumber()));2==a&&("\x00"!=this.altloc&&(d.append("%"),d.appendC(this.altloc)),1<this.group.chain.model.ms.mc&&!this.group.chain.model.isJmolDataFrame&&(d.append("/"),d.append(this.getModelNumberForLabel())),d.append(" #"),d.appendI(this.getAtomNumber()));
return d.toString()},"~N");f(b,"getGroup3",function(a){var d=this.group.getGroup3();return a||null!=d&&0<d.length?d:"UNK"},"~B");f(b,"getGroup1",function(a){var d=this.group.getGroup1();return"\x00"!=d?""+d:"\x00"!=a?""+a:""},"~S");f(b,"getBioSmilesType",function(){return this.group.isProtein()?"p":this.group.isDna()?"d":this.group.isRna()?"r":this.group.isCarbohydrate()?"c":" "});f(b,"isPurine",function(){return this.group.isPurine()});f(b,"isPyrimidine",function(){return this.group.isPyrimidine()});
f(b,"getResno",function(){return this.group.getResno()});c(b,"isClickable",function(){return this.checkVisible()&&0!=this.clickabilityFlags&&0!=((this.shapeVisibilityFlags|this.group.shapeVisibilityFlags)&this.clickabilityFlags)});c(b,"setClickable",function(a){0==a?this.clickabilityFlags=0:(this.clickabilityFlags|=a,1040384!=a&&(this.shapeVisibilityFlags|=a))},"~N");c(b,"checkVisible",function(){if(this.isVisible(2))return this.isVisible(4);var a=this.isVisible(9);if(a){a=this.shapeVisibilityFlags;
if(0!=this.group.shapeVisibilityFlags&&(8192!=this.group.shapeVisibilityFlags||this.isLeadAtom()))a|=this.group.shapeVisibilityFlags;a&=-10;32==a&&0==this.clickabilityFlags&&(a=0);if(a=0!=a)this.shapeVisibilityFlags|=4}this.shapeVisibilityFlags|=2;return a});f(b,"isLeadAtom",function(){return this.group.isLeadAtom(this.i)});f(b,"getChainID",function(){return this.group.chain.chainID});f(b,"getChainIDStr",function(){return this.group.chain.getIDStr()});c(b,"getSurfaceDistance100",function(){return this.group.chain.model.ms.getSurfaceDistance100(this.i)});
c(b,"getVibrationVector",function(){return this.group.chain.model.ms.getVibration(this.i,!1)});c(b,"getModulation",function(){return this.group.chain.model.ms.getModulation(this.i)});c(b,"getModelNumberForLabel",function(){return this.group.chain.model.ms.getModelNumberForAtomLabel(this.mi)});c(b,"getModelNumber",function(){return this.group.chain.model.ms.getModelNumber(this.mi)%1E6});f(b,"getBioStructureTypeName",function(){return this.group.getBioStructureType().getBioStructureTypeName(!0)});f(b,
"equals",function(a){return this===a},"~O");f(b,"hashCode",function(){return this.i});c(b,"findAromaticNeighbor",function(a){if(null==this.bonds)return null;for(var d=this.bonds.length;0<=--d;){var b=this.bonds[d],c=b.getOtherAtom(this);if(b.isAromatic()&&c.i!=a)return c}return null},"~N");c(b,"atomPropertyInt",function(a,d){switch(d){case 1094715393:return this.getAtomNumber();case 1094713368:return this.getSeqID();case 1094713346:return this.atomID;case 1094713371:return Math.max(0,this.altloc.charCodeAt(0)-
32);case 1094713347:return this.i;case 1228931586:return this.getCovalentBondCount();case 1094713351:return this.group.chain.chainNo;case 1765808134:return a.gdata.getColorArgbOrGray(this.colixAtom);case 1086326789:case 1094715402:return this.getElementNumber();case 1094713353:return this.getAtomicAndIsotopeNumber();case 1228935687:return this.group.chain.model.fileIndex+1;case 1631586315:return this.getFormalCharge();case 1094713356:return this.group.groupID;case 1094713357:return this.group.groupIndex;
case 1094717454:return this.getModelNumber();case -1094717454:return a.ms.modelFileNumbers[this.mi];case 1094713359:return this.mi;case 1094713360:return this.getMoleculeNumber(!0);case 1094713361:return this.group.getMonomerIndex()+1;case 1128269825:return this.getOccupancy100();case 1094713362:return this.group.getBioPolymerIndexInModel()+1;case 1094713363:return this.group.getBioPolymerLength();case 1665140738:return this.getRasMolRadius();case 1094715412:return this.getResno();case 1094713365:return Math.round(a.antialiased?
w(this.sX/2):this.sX);case 1094713366:return Math.round(a.getScreenHeight()-(a.antialiased?w(this.sY/2):this.sY));case 1094713367:return Math.round(a.antialiased?w(this.sZ/2):this.sZ);case 1094713369:return this.getAtomSite();case 1095241729:return this.getSpin();case 1639976963:return this.group.getBioStructureType().getId();case 1237320707:return this.group.getBioStructureSubType(1111490651).getId();case 1094713370:return this.group.getStrucNo();case 1296041986:return this.getSymOp();case 1094715420:return this.getValence()}return 0},
"JV.Viewer,~N");c(b,"getSpin",function(){return this.group.chain.model.ms.getSpin(this.i)});c(b,"getSymOp",function(){return null==this.atomSymmetry?0:this.atomSymmetry.nextSetBit(0)+1});c(b,"atomPropertyFloat",function(a,d,b){switch(d){case 1111490561:return this.getADPMinMax(!0);case 1111490562:return this.getADPMinMax(!1);case 1111492609:case 1111492629:return this.x;case 1111492610:case 1111492630:return this.y;case 1111492611:case 1111492631:return this.z;case 1111490587:return this.group.chain.model.ms.getAtomicDSSRDataFloat("dssr",
this.i);case 1114249217:case 1112152066:case 1112150019:case 1112150020:case 1112150021:case 1112152070:case 1112152071:case 1112152073:case 1112152074:case 1112152076:case 1649022989:case 1112152078:return a.shm.getAtomShapeValue(d,this.group,this.i);case 1111492618:return this.getBondingRadius();case 1111490563:return a.getNMRCalculation().getChemicalShift(this);case 1111490564:return JU.Elements.getCovalentRadius(this.atomNumberFlags);case 1111490565:case 1111490576:case 1111490574:return this.group.getGroupParameter(d);
case 1111492615:case 1111492612:return this.getFractionalCoord(!a.g.legacyJavaFloat,"X",!1,b);case 1111492616:case 1111492613:return this.getFractionalCoord(!a.g.legacyJavaFloat,"Y",!1,b);case 1111492617:case 1111492614:return this.getFractionalCoord(!a.g.legacyJavaFloat,"Z",!1,b);case 1113589786:return this.getHydrophobicity();case 1111490566:return a.getNMRCalculation().getMagneticShielding(this);case 1111490567:return this.getMass();case 1128269825:return this.getOccupancy100()/100;case 1111492619:return this.getPartialCharge();
case 1111490569:case 1111490570:case 1111490568:if(this.group.chain.model.isJmolDataFrame&&4138==this.group.chain.model.jmolFrameTypeInt)switch(d){case 1111490569:return this.getFractionalCoord(!a.g.legacyJavaFloat,"X",!1,b);case 1111490570:return this.getFractionalCoord(!a.g.legacyJavaFloat,"Y",!1,b);case 1111490568:return a=this.getFractionalCoord(!a.g.legacyJavaFloat,"Z",!1,b)-180,-180>a?360+a:a}return this.group.getGroupParameter(d);case 1665140738:case 1112152075:return this.getRadius();case 1113589787:return a.slm.isAtomSelected(this.i)?
1:0;case 1111490575:return a.ms.getSurfaceDistanceMax(),this.getSurfaceDistance100()/100;case 1111492620:return this.getBfactor100()/100;case 1111490588:return JU.C.getColixTranslucencyFractional(this.colixAtom);case 1312817669:return this.getVolume(a,J.c.VDW.AUTO);case 1111490577:return this.getFractionalUnitCoord(!a.g.legacyJavaFloat,"X",b);case 1111490578:return this.getFractionalUnitCoord(!a.g.legacyJavaFloat,"Y",b);case 1111490579:return this.getFractionalUnitCoord(!a.g.legacyJavaFloat,"Z",b);
case 1648363544:return this.getVanderwaalsRadiusFloat(a,J.c.VDW.AUTO);case 1648361473:return d=this.getVibrationVector(),null==d?0:d.length()*a.getFloat(1648361473);case 1111492626:return this.getVib("x");case 1111492627:return this.getVib("y");case 1111492628:return this.getVib("z");case 1111490583:return this.getVib("X");case 1111490584:return this.getVib("Y");case 1111490585:return this.getVib("Z");case 1111490586:return this.getVib("O");case 1111490580:return this.getVib("1");case 1111490581:return this.getVib("2");
case 1111490582:return this.getVib("3");case 1145047050:case 1145047053:case 1145045006:case 1145047052:case 1145047055:case 1145045008:case 1145047049:return a=this.atomPropertyTuple(a,d,b),null==a?-1:a.length()}return this.atomPropertyInt(a,d)},"JV.Viewer,~N,JU.P3");c(b,"getVib",function(a){return this.group.chain.model.ms.getVibCoord(this.i,a)},"~S");c(b,"getNominalMass",function(){var a=this.getIsotopeNumber();return 0<a?a:JU.Elements.getNaturalIsotope(this.getElementNumber())});f(b,"getMass",
function(){var a=this.getIsotopeNumber();return 0<a?a:JU.Elements.getAtomicMass(this.getElementNumber())});c(b,"atomPropertyString",function(a,d){var b;switch(d){case 1153433601:return this.getIdentity(5);case 1086324739:return b=this.altloc,"\x00"==b?"":""+b;case 1086326786:return this.getAtomName();case 1086326785:return this.getAtomType();case 1086326788:return this.getChainIDStr();case 1086324752:return this.getCIPChirality(!0);case 1086324753:return this.getCIPChiralityRule();case 1140850705:case 1086324754:return this.getWyckoffPosition(!1);
case 1086324755:return this.getWyckoffPosition(!0);case 1086324744:return this.getGroup1("?");case 1086324747:return b=this.group.getSeqcodeString(),null==b?"":b;case 1086324743:return this.getGroup1("\x00");case 1086324742:return this.getGroup3(!1);case 1086326789:return this.getElementSymbolIso(!0);case 1086324745:return this.getIdentity(2);case 1086324746:return b=this.group.getInsertionCode(),"\x00"==b?"":""+b;case 1825200146:case 1287653388:return b=a.shm.getShapePropertyIndex(5,"label",this.i),
null==b&&(b=""),b;case 1145045003:return a.getSymStatic().staticToRationalXYZ(this.getFractionalCoordPt(!a.g.legacyJavaFloat,!1,null)," ");case 1639976963:return this.group.getBioStructureType().getBioStructureTypeName(!1);case 1237320707:return this.group.getBioStructureSubType(1111490651).getBioStructureTypeName(!1);case 1086324749:return this.group.getStructureId();case 1086324748:return a.getHybridizationAndAxes(this.i,null,null,"d");case 1086326798:return this.getElementSymbolIso(!1);case 1088421903:return this.getSymmetryOperatorList(!0)}return""},
"JV.Viewer,~N");c(b,"getWyckoffPosition",function(a){var d=this.group.chain.model.ms,b=d.getBasisAtom(this.i,!0).getSeqID();if(0!=b)return(a?""+(b>>16):"")+String.fromCharCode(b&255);var b=this.getUnitCell(),c;if(null==b||null==(c=b.getWyckoffPosition(this,"M")))c="0?";d.setAtomSeqID(this.i,(JU.PT.parseInt(c)<<16)+c.charAt(c.length-1).charCodeAt(0));return a?c:c.substring(c.length-1)},"~B");f(b,"getCIPChirality",function(a){var d=(this.formalChargeAndFlags&496)>>4;0==d&&(1<this.atomNumberFlags&&a)&&
(d=this.group.chain.model.ms.getAtomCIPChiralityCode(this),this.formalChargeAndFlags|=(0==d?3:d)<<4);return JV.JC.getCIPChiralityName(d)},"~B");c(b,"getCIPChiralityRule",function(){var a=0==this.getCIPChirality(!0).length?-1:(this.formalChargeAndFlags&3584)>>9;return JV.JC.getCIPRuleName(a+1)});f(b,"setCIPChirality",function(a){this.formalChargeAndFlags=this.formalChargeAndFlags&-4081|a<<4},"~N");f(b,"getCIPChiralityCode",function(){return(this.formalChargeAndFlags&496)>>4});f(b,"getInsertionCode",
function(){return this.group.getInsertionCode()});c(b,"atomPropertyTuple",function(a,d,b){switch(d){case 1073742329:return JU.P3.newP(this);case 1145047050:return this.getFractionalCoordPt(!a.g.legacyJavaFloat,!1,b);case 1145047053:return this.getFractionalCoordPt(!a.g.legacyJavaFloat,!1,b);case 1145045006:return this.group.chain.model.isJmolDataFrame?this.getFractionalCoordPt(!a.g.legacyJavaFloat,!1,b):this.getFractionalUnitCoordPt(!a.g.legacyJavaFloat,!1,b);case 1145047052:return JU.P3.new3(Math.round(a.antialiased?
w(this.sX/2):this.sX),Math.round(a.getScreenHeight()-(a.antialiased?w(this.sY/2):this.sY)),Math.round(a.antialiased?w(this.sZ/2):this.sZ));case 1145047055:return this.getVibrationVector();case 1145045008:return a=this.getModulation(),null==a?null:a.getV3();case 1145047049:return this;case 1765808134:return JU.CU.colorPtFromInt(this.group.chain.model.ms.vwr.gdata.getColorArgbOrGray(this.colixAtom),b)}return null},"JV.Viewer,~N,JU.P3");f(b,"getOffsetResidueAtom",function(a,d){return this.group.getAtomIndex(a,
d)},"~S,~N");f(b,"isCrossLinked",function(a){return this.group.isCrossLinked(a.group)},"JU.Node");f(b,"getCrossLinkVector",function(a,d,b){return this.group.getCrossLinkVector(a,d,b)},"JU.Lst,~B,~B");f(b,"toString",function(){return this.getInfo()});f(b,"findAtomsLike",function(a){return this.group.chain.model.ms.vwr.getAtomBitSet(a)},"~S");c(b,"getUnitID",function(a){var d=this.group.chain.model;return d.isBioModel?d.getUnitID(this,a):""},"~N");f(b,"getFloatProperty",function(a){a=this.group.chain.model.ms.vwr.getDataObj(a,
null,1);var d=NaN;if(null!=a)try{d=a[this.i]}catch(b){if(!E(b,Exception))throw b;}return d},"~S");f(b,"modelIsRawPDB",function(){var a=this.group.chain.model;return a.isBioModel&&!a.isPdbWithMultipleBonds&&0==a.hydrogenCount});c(b,"setSymop",function(a,d){null==this.atomSymmetry&&(this.atomSymmetry=new JU.BS);d&&this.atomSymmetry.clearAll();0<a&&this.atomSymmetry.set(a-1)},"~N,~B");f(b,"getExplicitHydrogenCount",function(){return 0})});m("JM");x(["JU.V3"],"JM.AtomCollection","java.util.ArrayList $.Arrays $.Hashtable JU.A4 $.AU $.BS $.Lst $.M3 $.Measure $.P3 $.PT $.SB J.api.Interface J.atomdata.RadiusData J.c.PAL $.VDW JM.Group JS.T JU.BSUtil $.Elements $.Logger $.Parser $.Vibration".split(" "),
function(){var b=s(function(){this.at=this.bioModelset=this.g3d=this.vwr=null;this.ac=0;this.labeler=this.pointGroup=this.trajectory=null;this.maxVanderwaalsRadius=this.maxBondingRadius=1.4E-45;this.hasBfactorRange=!1;this.bfactor100Hi=this.bfactor100Lo=0;this.haveBSClickable=this.haveBSVisible=!1;this.bsSurface=null;this.surfaceDistanceMax=this.nSurfaceAtoms=0;this.haveChirality=!1;this.bspf=null;this.canSkipLoad=this.preserveState=!0;this.haveStraightness=!1;this.aaRet=this.bsPartialCharges=this.hydrophobicities=
this.bondingRadii=this.partialCharges=this.bfactor100s=this.occupancies=this.vib=this.vibrations=this.dssrData=this.atomSeqIDs=this.atomResnos=this.atomSerials=this.atomTypes=this.atomNames=this.tainted=this.surfaceDistance100s=this.atomTensors=this.atomTensorList=this.bsModulated=this.bsClickable=this.bsVisible=this.bsHidden=null;R("JM.AtomCollection.AtomSorter")||JM.AtomCollection.$AtomCollection$AtomSorter$();this.atomCapacity=0;r(this,arguments)},JM,"AtomCollection",null);c(b,"getAtom",function(a){return 0<=
a&&a<this.at.length?this.at[a]:null},"~N");c(b,"setupAC",function(){this.bsHidden=new JU.BS;this.bsVisible=new JU.BS;this.bsClickable=new JU.BS;null==JM.AtomCollection.userSettableValues&&(JM.AtomCollection.userSettableValues="atomName atomType coord element formalCharge hydrophobicity ionic occupancy partialCharge temperature valence vanderWaals vibrationVector atomNo seqID resNo chain site".$plit(" "))});c(b,"releaseModelSetAC",function(){this.ac=0;this.bfactor100s=this.occupancies=this.vibrations=
this.atomSeqIDs=this.atomSerials=this.dssrData=this.atomResnos=this.atomTypes=this.atomNames=this.tainted=this.bsSurface=this.surfaceDistance100s=this.bspf=this.g3d=this.vwr=this.at=null;this.resetPartialCharges();this.atomTensors=this.bondingRadii=null});c(b,"mergeAtomArrays",function(a){this.tainted=a.tainted;this.atomNames=a.atomNames;this.atomTypes=a.atomTypes;this.atomResnos=a.atomResnos;this.atomSerials=a.atomSerials;this.atomSeqIDs=a.atomSeqIDs;this.vibrations=a.vibrations;this.occupancies=
a.occupancies;this.bfactor100s=a.bfactor100s;this.bondingRadii=a.bondingRadii;this.partialCharges=a.partialCharges;this.bsPartialCharges=a.bsPartialCharges;this.atomTensors=a.atomTensors;this.atomTensorList=a.atomTensorList;this.bsModulated=a.bsModulated;this.haveStraightness=!1;this.surfaceDistance100s=null},"JM.AtomCollection");c(b,"getAtomPointVector",function(a){var d=new JU.Lst,b=this.ac;if(null!=a)for(var c=a.nextSetBit(0);0<=c&&c<b;c=a.nextSetBit(c+1))d.addLast(this.at[c]);return d},"JU.BS");
c(b,"modelSetHasVibrationVectors",function(){return null!=this.vibrations});c(b,"getAtomTypes",function(){return this.atomTypes});c(b,"getPartialCharges",function(){return this.partialCharges});c(b,"getBondingRadii",function(){return this.bondingRadii});c(b,"getBFactors",function(){return this.bfactor100s});c(b,"getHydrophobicity",function(){return this.hydrophobicities});c(b,"setBsHidden",function(a){this.bsHidden=a},"JU.BS");c(b,"isAtomHidden",function(a){return this.bsHidden.get(a)},"~N");c(b,
"getLabeler",function(){return null==this.labeler?this.labeler=J.api.Interface.getInterface("JM.LabelToken",this.vwr,"ms"):this.labeler});c(b,"getAtomInfo",function(a,d,b){return null==d?this.at[a].getInfo():this.getLabeler().formatLabel(this.vwr,this.at[a],d,b)},"~N,~S,JU.P3");c(b,"getElementName",function(a){return JU.Elements.elementNameFromNumber(this.at[a].getAtomicAndIsotopeNumber())},"~N");c(b,"getQuaternion",function(a,d){return 0>a?null:this.at[a].group.getQuaternion(d)},"~N,~S");c(b,"getFirstAtomIndexFromAtomNumber",
function(a,d){for(var b=0;b<this.ac;b++){var c=this.at[b];if(!JM.AtomCollection.isDeleted(c)&&c.getAtomNumber()==a&&d.get(c.mi))return b}return-1},"~N,JU.BS");c(b,"setFormalCharges",function(a,d){if(null!=a){this.resetPartialCharges();for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))this.at[b].setFormalCharge(d),this.taintAtom(b,4)}},"JU.BS,~N");c(b,"getAtomicCharges",function(){for(var a=M(this.ac,0),d=this.ac;0<=--d;)a[d]=JM.AtomCollection.isDeleted(this.at[d])?0:this.at[d].getElementNumber();
return a});c(b,"getRadiusVdwJmol",function(a){return JU.Elements.getVanderwaalsMar(a.getElementNumber(),J.c.VDW.JMOL)/1E3},"JM.Atom");c(b,"getMaxVanderwaalsRadius",function(){1.4E-45==this.maxVanderwaalsRadius&&this.findMaxRadii();return this.maxVanderwaalsRadius});c(b,"findMaxRadii",function(){for(var a,d=this.ac;0<=--d;){var b=this.at[d];if(!JM.AtomCollection.isDeleted(b)){if((a=b.getBondingRadius())>this.maxBondingRadius)this.maxBondingRadius=a;if((a=b.getVanderwaalsRadiusFloat(this.vwr,J.c.VDW.AUTO))>
this.maxVanderwaalsRadius)this.maxVanderwaalsRadius=a}}});c(b,"clearBfactorRange",function(){this.hasBfactorRange=!1});c(b,"calcBfactorRange",function(a){if(!this.hasBfactorRange){this.bfactor100Lo=2147483647;this.bfactor100Hi=-2147483648;if(null==a)for(var d=0;d<this.ac;d++)this.setBf(d);else for(d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))this.setBf(d);this.hasBfactorRange=!0}},"JU.BS");c(b,"setBf",function(a){JM.AtomCollection.isDeleted(this.at[a])||(a=this.at[a].getBfactor100(),a<this.bfactor100Lo?
this.bfactor100Lo=a:a>this.bfactor100Hi&&(this.bfactor100Hi=a))},"~N");c(b,"getBfactor100Lo",function(){this.hasBfactorRange||(this.vwr.g.rangeSelected?this.calcBfactorRange(this.vwr.bsA()):this.calcBfactorRange(null));return this.bfactor100Lo});c(b,"getBfactor100Hi",function(){this.getBfactor100Lo();return this.bfactor100Hi});c(b,"getSurfaceDistanceMax",function(){null==this.surfaceDistance100s&&this.calcSurfaceDistances();return this.surfaceDistanceMax});c(b,"calculateVolume",function(a,d){var b=
0;if(null!=a)for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))b+=this.at[c].getVolume(this.vwr,d);return b},"JU.BS,J.c.VDW");c(b,"getSurfaceDistance100",function(a){if(0==this.nSurfaceAtoms)return-1;null==this.surfaceDistance100s&&this.calcSurfaceDistances();return this.surfaceDistance100s[a]},"~N");c(b,"calcSurfaceDistances",function(){this.calculateSurface(null,-1)});c(b,"calculateSurface",function(a,d){0>d&&(d=3);var b=J.api.Interface.getOption("geodesic.EnvelopeCalculation",this.vwr,"ms").set(this.vwr,
this.ac,null);b.calculate(new J.atomdata.RadiusData(null,d,J.atomdata.RadiusData.EnumType.ABSOLUTE,null),3.4028235E38,a,JU.BSUtil.copyInvert(a,this.ac),!1,!1,!1,!0);var c=b.getPoints();this.surfaceDistanceMax=0;this.bsSurface=b.getBsSurfaceClone();this.surfaceDistance100s=D(this.ac,0);this.nSurfaceAtoms=JU.BSUtil.cardinalityOf(this.bsSurface);if(0==this.nSurfaceAtoms||null==c||0==c.length)return c;for(var b=3.4028235E38==d?0:d,e=0;e<this.ac;e++)if(this.bsSurface.get(e)||JM.AtomCollection.isDeleted(this.at[e]))this.surfaceDistance100s[e]=
0;else{for(var g=3.4028235E38,j=this.at[e],k=c.length;0<=--k;)g=Math.min(Math.abs(c[k].distance(j)-b),g);g=this.surfaceDistance100s[e]=w(Math.floor(100*g));this.surfaceDistanceMax=Math.max(this.surfaceDistanceMax,g)}return c},"JU.BS,~N");c(b,"setAtomCoord2",function(a,d,b){var c=null,e=null,g=null,j=0,k=1;if(C(b,"JU.P3"))c=b;else if(C(b,"JU.Lst")){g=b;if(0==(k=g.size()))return;j=1}else if(JU.AU.isAP(b)){e=b;if(0==(k=e.length))return;j=2}else return;b=0;if(null!=a)for(var l=a.nextSetBit(0);0<=l;l=
a.nextSetBit(l+1)){switch(j){case 1:if(b>=k)return;c=g.get(b++);break;case 2:if(b>=k)return;c=e[b++]}if(null!=c)switch(d){case 1145047049:this.setAtomCoord(l,c.x,c.y,c.z);break;case 1145047050:case 1145047053:this.at[l].setFractionalCoordTo(c,!1);this.taintAtom(l,2);break;case 1145047055:this.setAtomVibrationVector(l,c)}}},"JU.BS,~N,~O");c(b,"setAtomVibrationVector",function(a,d){this.taintAtom(a,12);return this.setVibrationVector(a,d)},"~N,JU.T3");c(b,"setAtomCoord",function(a,d,b,c){if(!(0>a||a>=
this.ac)){var e=this.at[a];e.set(d,b,c);this.fixTrajectory(e);this.taintAtom(a,2)}},"~N,~N,~N,~N");c(b,"fixTrajectory",function(a){this.isTrajectory(a.mi)&&this.trajectory.fixAtom(a)},"JM.Atom");c(b,"setAtomCoordRelative",function(a,d,b,c){if(!(0>a||a>=this.ac)){var e=this.at[a];e.add3(d,b,c);this.fixTrajectory(e);this.taintAtom(a,2)}},"~N,~N,~N,~N");c(b,"setAtomsCoordRelative",function(a,d,b,c){if(null!=a)for(var e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))this.setAtomCoordRelative(e,d,b,c)},"JU.BS,~N,~N,~N");
c(b,"setAPa",function(a,d,b,c,e,g,j){var k=0;if(!(null!=g&&0==g.length||null==a)){for(var l=null!=g&&g.length==this.ac||null!=j&&j.length==this.ac,f=a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1)){l&&(k=f);if(null!=g){if(k>=g.length)return;c=g[k++];if(Float.isNaN(c))continue;b=F(c)}else if(null!=j){if(k>=j.length)return;e=j[k++]}var n=this.at[f],q;switch(d){case 1086326786:this.setAtomName(f,e,!0);break;case 1086326785:this.setAtomType(f,e);break;case 1086326788:this.setChainID(f,e);break;case 1094715393:this.setAtomNumber(f,
b,!0);break;case 1094713368:this.setAtomSeqID(f,b);break;case 1111492609:case 1111492629:this.setAtomCoord(f,c,n.y,n.z);break;case 1111492610:case 1111492630:this.setAtomCoord(f,n.x,c,n.z);break;case 1111492611:case 1111492631:this.setAtomCoord(f,n.x,n.y,c);break;case 1111492626:case 1111492627:case 1111492628:this.setVibrationVector2(f,d,c);break;case 1111492612:case 1111492613:case 1111492614:case 1111492615:case 1111492616:case 1111492617:n.setFractionalCoord(d,c,!1);this.taintAtom(f,2);break;
case 1094715402:case 1086326789:this.setElement(n,b,!0);break;case 1631586315:this.resetPartialCharges();n.setFormalCharge(b);this.taintAtom(f,4);break;case 1113589786:this.setHydrophobicity(f,c);break;case 1128269825:q=2>c&&0.01<=c?100*c:c;this.setOccupancy(f,q,!0);break;case 1111492619:this.setPartialCharge(f,c,!0);break;case 1111492618:this.setBondingRadius(f,c);break;case 1111492620:this.setBFactor(f,c,!0);break;case 1094715412:this.setAtomResno(f,b);break;case 1825200146:case 1287653388:this.vwr.shm.setAtomLabel(e,
f);break;case 1665140738:case 1112152075:q=c;0>q?q=0:16<q&&(q=16.1);n.madAtom=xa(2E3*q);break;case 1113589787:this.vwr.slm.setSelectedAtom(n.i,0!=c);break;case 1094715420:n.setValence(b);this.taintAtom(f,10);break;case 1648363544:n.setRadius(c)?this.taintAtom(f,11):this.untaint(f,11);break;default:JU.Logger.error("unsettable atom property: "+JS.T.nameOf(d));return}}switch(d){case 1113589787:this.vwr.slm.setSelectedAtom(-1,!1);break;case 1665140738:case 1112152075:this.vwr.setShapeSize(0,2147483647,
a)}}},"JU.BS,~N,~N,~N,~S,~A,~A");c(b,"getVibCoord",function(a,d){var b=null,c=null;switch(d.charCodeAt(0)){case 120:case 121:case 122:c=this.getVibration(a,!1);break;default:b=this.getModulation(a),null!=b&&(c=b.getVibration(!1),null==c&&(c=b))}if(null==c&&null==b)return NaN;switch(d.charCodeAt(0)){case 120:case 88:return c.x;case 121:case 89:return c.y;case 122:case 90:return c.z;case 79:return b.getModulation("O",null,!0).floatValue();case 49:case 50:case 51:return b=b.getModulation("T",null,!0),
b="1"==d?b.x:"2"==d?b.y:b.z,b-Math.floor(b);default:return NaN}},"~N,~S");c(b,"getVibration",function(a,d){var b=null==this.vibrations?null:this.vibrations[a];return C(b,"J.api.JmolModulationSet")?b.getVibration(d):null==b&&d?new JU.Vibration:b},"~N,~B");c(b,"getModulation",function(a){a=null==this.vibrations?null:this.vibrations[a];return null!=a&&0<a.modDim?a:null},"~N");c(b,"setVibrationVector",function(a,d){if(null==d)return null!=this.vibrations&&this.vibrations.length>a&&(this.vibrations[a]=
null),null;if(Double.isNaN(d.x)||(Double.isNaN(d.y)||Double.isNaN(d.z))||a>=this.at.length)return null;null==this.vibrations?this.vibrations=Array(this.at.length):this.vibrations.length<=a&&(this.vibrations=JU.AU.arrayCopyObject(this.vibrations,this.at.length));C(d,"JU.Vibration")?null==this.vibrations[a]?this.vibrations[a]=this.vib=d:(this.vib=this.vibrations[a],this.vib.setXYZ(d)):(null==this.vibrations[a]&&(this.vibrations[a]=new JU.Vibration),this.vibrations[a].setXYZ(d));this.at[a].setVibrationVector();
return this.vibrations[a]},"~N,JU.T3");c(b,"setVibrationVector2",function(a,d,b){var c=this.getVibration(a,!0);if(null!=c){switch(d){case 1111492626:c.x=b;break;case 1111492627:c.y=b;break;case 1111492628:c.z=b}this.setAtomVibrationVector(a,c)}},"~N,~N,~N");c(b,"setAtomName",function(a,d,b){if(!b||!d.equals(this.at[a].getAtomName())){var c=this.am[this.at[a].mi].isBioModel?this.vwr.getJBR().lookupSpecialAtomID(d):0;this.at[a].atomID=c;0>=c&&(null==this.atomNames&&(this.atomNames=Array(this.at.length)),
this.atomNames[a]=d);b&&this.taintAtom(a,0)}},"~N,~S,~B");c(b,"setAtomType",function(a,d){d.equals(this.at[a].getAtomType())||(null==this.atomTypes&&(this.atomTypes=Array(this.at.length)),this.atomTypes[a]=d)},"~N,~S");c(b,"setChainID",function(a,d){if(!d.equals(this.at[a].getChainIDStr())){var b=this.at[a].getChainID(),b=this.getChainBits(b);this.at[a].group.chain.chainID=this.vwr.getChainID(d,!0);for(var c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1))this.taintAtom(c,16)}},"~N,~S");c(b,"setAtomNumber",
function(a,d,b){b&&d==this.at[a].getAtomNumber()||(null==this.atomSerials&&(this.atomSerials=D(this.at.length,0)),this.atomSerials[a]=d,b&&this.taintAtom(a,13))},"~N,~N,~B");c(b,"setElement",function(a,d,b){b&&a.getElementNumber()==d||(a.setAtomicAndIsotopeNumber(d),a.paletteID=J.c.PAL.CPK.id,a.colixAtom=this.vwr.cm.getColixAtomPalette(a,J.c.PAL.CPK.id),this.resetPartialCharges(),b&&this.taintAtom(a.i,3))},"JM.Atom,~N,~B");c(b,"setSite",function(a,d,b){a.atomSite!=d&&(a.atomSite=d,b&&this.taintAtom(a.i,
17))},"JM.Atom,~N,~B");c(b,"resetPartialCharges",function(){this.bsPartialCharges=this.partialCharges=null});c(b,"setAtomResno",function(a,d){d!=this.at[a].getResno()&&(this.at[a].group.setResno(d),null==this.atomResnos&&(this.atomResnos=D(this.at.length,0)),this.atomResnos[a]=d,this.taintAtom(a,15))},"~N,~N");c(b,"setAtomSeqID",function(a,d){d!=this.at[a].getSeqID()&&(null==this.atomSeqIDs&&(this.atomSeqIDs=D(this.at.length,0)),this.atomSeqIDs[a]=d,this.taintAtom(a,14))},"~N,~N");c(b,"setOccupancy",
function(a,d,b){if(!(b&&d==this.at[a].getOccupancy100())){if(null==this.occupancies){if(100==d)return;this.occupancies=M(this.at.length,0);for(var c=this.at.length;0<=--c;)this.occupancies[c]=100}this.occupancies[a]=d;b&&this.taintAtom(a,7)}},"~N,~N,~B");c(b,"getOccupancyFloat",function(a){return null==this.occupancies||a>=this.occupancies.length?100:this.occupancies[a]},"~N");c(b,"setPartialCharge",function(a,d,b){if(!Float.isNaN(d)){if(null==this.partialCharges){this.bsPartialCharges=new JU.BS;
if(0==d)return;this.partialCharges=M(this.at.length,0)}this.bsPartialCharges.set(a);this.partialCharges[a]=d;b&&this.taintAtom(a,8)}},"~N,~N,~B");c(b,"setBondingRadius",function(a,d){Float.isNaN(d)||d==this.at[a].getBondingRadius()||(null==this.bondingRadii?this.bondingRadii=M(this.at.length,0):this.bondingRadii.length<this.at.length&&(this.bondingRadii=JU.AU.ensureLengthA(this.bondingRadii,this.at.length)),this.bondingRadii[a]=d,this.taintAtom(a,6))},"~N,~N");c(b,"setBFactor",function(a,d,b){if(!(Float.isNaN(d)||
b&&d==this.at[a].getBfactor100())){if(null==this.bfactor100s){if(0==d)return;this.bfactor100s=$(this.at.length,0)}this.bfactor100s[a]=bb(100*(-327.68>d?-327.68:327.67<d?327.67:d)+(0>d?-0.5:0.5));b&&this.taintAtom(a,9)}},"~N,~N,~B");c(b,"setHydrophobicity",function(a,d){if(!(Float.isNaN(d)||d==this.at[a].getHydrophobicity())){if(null==this.hydrophobicities){this.hydrophobicities=M(this.at.length,0);for(var b=0;b<this.at.length;b++)this.hydrophobicities[b]=JU.Elements.getHydrophobicity(this.at[b].group.groupID)}this.hydrophobicities[a]=
d;this.taintAtom(a,5)}},"~N,~N");c(b,"setAtomData",function(a,d,b,c){var e=null,g=null;switch(a){case 2:this.loadCoordinates(b,1073742329,!c);return;case 12:this.loadCoordinates(b,4166,!0);return;case 18:e=M(this.ac,0),g=JU.BS.newN(this.ac)}c=JU.Parser.markLines(b,";");var j=0;try{for(var k=JU.PT.parseInt(b.substring(0,c[0]-1)),l=1;l<=k;l++){var f=JU.PT.getTokens(JU.PT.parseTrimmed(b.substring(c[l],c[l+1]-1))),n=JU.PT.parseInt(f[0])-1;if(!(0>n||n>=this.ac)){var q=this.at[n];j++;var v=f.length-1,B=
JU.PT.parseFloat(f[v]);switch(a){case 18:e[n]=B;g.set(n);continue;case 0:this.setAtomName(n,f[v],!0);break;case 13:this.setAtomNumber(n,F(B),!0);break;case 15:this.setAtomResno(n,F(B));break;case 14:this.setAtomSeqID(n,F(B));break;case 1:this.setAtomType(n,f[v]);break;case 16:this.setChainID(n,f[v]);break;case 17:q.atomSite=F(B);break;case 3:q.setAtomicAndIsotopeNumber(F(B));q.paletteID=J.c.PAL.CPK.id;q.colixAtom=this.vwr.cm.getColixAtomPalette(q,J.c.PAL.CPK.id);break;case 4:q.setFormalCharge(F(B));
break;case 5:this.setHydrophobicity(n,B);break;case 6:this.setBondingRadius(n,B);break;case 8:this.setPartialCharge(n,B,!0);break;case 9:this.setBFactor(n,B,!0);break;case 10:q.setValence(F(B));break;case 11:q.setRadius(B)}this.taintAtom(n,a)}}18==a&&0<j&&this.vwr.setData(d,z(-1,[d,e,g,Integer.$valueOf(1)]),0,0,0,0,0)}catch(m){if(E(m,Exception))JU.Logger.error("loadData error: "+m);else throw m;}},"~N,~S,~S,~B");c(b,"loadCoordinates",function(a,d,b){var c=JU.Parser.markLines(a,";"),e=4166==d||1095241729==
d?new JU.V3:null;try{for(var g=JU.PT.parseInt(a.substring(0,c[0]-1)),j=1;j<=g;j++){var k=JU.PT.getTokens(JU.PT.parseTrimmed(a.substring(c[j],c[j+1]))),l=JU.PT.parseInt(k[0])-1,f=k[3].equalsIgnoreCase("1.4E-45")?1.4E-45:JU.PT.parseFloat(k[3]),n=k[4].equalsIgnoreCase("1.4E-45")?1.4E-45:JU.PT.parseFloat(k[4]),q=JU.PT.parseFloat(k[5]);switch(d){case 4166:e.set(f,n,q);var v=this.setAtomVibrationVector(l,e);null!=v&&7<k.length&&(v.modDim=JU.PT.parseInt(k[6]),v.magMoment=JU.PT.parseFloat(k[7]));break;default:this.setAtomCoord(l,
f,n,q),b||this.untaint(l,2)}}}catch(B){if(E(B,Exception))JU.Logger.error("Frame.loadCoordinate error: "+B);else throw B;}},"~S,~N,~B");c(b,"validateBspf",function(a){null!=this.bspf&&(this.bspf.isValid=a)},"~B");c(b,"validateBspfForModel",function(a,d){null!=this.bspf&&this.bspf.validateModel(a,d)},"~N,~B");c(b,"setPreserveState",function(a){this.preserveState=a},"~B");b.getUserSettableType=c(b,"getUserSettableType",function(a){var d=0==a.indexOf("property_");a=d?a.substring(9):a;for(var b=0;18>b;b++)if(JM.AtomCollection.userSettableValues[b].equalsIgnoreCase(a))return b;
return d?18:-1},"~S");c(b,"getTaintedAtoms",function(a){return null==this.tainted?null:this.tainted[a]},"~N");c(b,"taintAtoms",function(a,d){this.canSkipLoad=!1;if(this.preserveState)for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))this.taintAtom(b,d)},"JU.BS,~N");c(b,"taintAtom",function(a,d){this.preserveState&&(null==this.tainted&&(this.tainted=Array(18)),null==this.tainted[d]&&(this.tainted[d]=JU.BS.newN(this.ac)),this.tainted[d].set(a));2==d&&this.taintModelCoord(a)},"~N,~N");c(b,"taintModelCoord",
function(a){a=this.am[this.at[a].mi];this.validateBspfForModel(a.trajectoryBaseIndex,!1);a.isBioModel&&a.resetDSSR(!0);this.pointGroup=null},"~N");c(b,"untaint",function(a,d){this.preserveState&&(null==this.tainted||null==this.tainted[d]||this.tainted[d].clear(a))},"~N,~N");c(b,"setTaintedAtoms",function(a,d){if(this.preserveState){if(null==a){if(null==this.tainted)return;this.tainted[d]=null;return}null==this.tainted&&(this.tainted=Array(18));null==this.tainted[d]&&(this.tainted[d]=JU.BS.newN(this.ac));
JU.BSUtil.copy2(a,this.tainted[d])}if(2==d){var b=a.nextSetBit(0);0<=b&&this.taintModelCoord(b)}},"JU.BS,~N");c(b,"unTaintAtoms",function(a,d){if(!(null==this.tainted||null==this.tainted[d])){for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))this.tainted[d].clear(b);0>this.tainted[d].nextSetBit(0)&&(this.tainted[d]=null)}},"JU.BS,~N");c(b,"findNearest2",function(a,d,b,c,e){for(var g=null,j,k=this.ac;0<=--k;)if(!(null!=c&&c.get(k)||null==(j=this.at[k])))j.isClickable()&&this.isCursorOnTopOf(j,a,d,
e,g)&&(g=j);b[0]=g},"~N,~N,~A,JU.BS,~N");c(b,"isCursorOnTopOf",function(a,d,b,c,e){return 1<a.sZ&&!this.g3d.isClippedZ(a.sZ)&&this.g3d.isInDisplayRange(a.sX,a.sY)&&a.isCursorOnTopOf(d,b,c,e)},"JM.Atom,~N,~N,~N,JM.Atom");c(b,"fillADa",function(a,d){a.xyz=a.atoms=this.at;a.ac=this.ac;a.atomicNumber=D(this.ac,0);var b=0!=(d&2);b&&(a.atomRadius=M(this.ac,0));for(var c=0!=(d&16),e=0;e<this.ac;e++){var g=this.at[e];JM.AtomCollection.isDeleted(g)||!c&&0<=a.modelIndex&&g.mi!=a.firstModelIndex?(null==a.bsIgnored&&
(a.bsIgnored=new JU.BS),a.bsIgnored.set(e)):(a.atomicNumber[e]=g.getElementNumber(),a.lastModelIndex=g.mi,b&&(a.atomRadius[e]=this.getWorkingRadius(g,a)))}},"J.atomdata.AtomData,~N");c(b,"getWorkingRadius",function(a,d){var b=0,c=d.radiusData;switch(c.factorType){case J.atomdata.RadiusData.EnumType.ABSOLUTE:b=c.value;break;case J.atomdata.RadiusData.EnumType.FACTOR:case J.atomdata.RadiusData.EnumType.OFFSET:switch(c.vdwType){case J.c.VDW.BONDING:b=a.getBondingRadius();break;case J.c.VDW.ADPMAX:b=
a.getADPMinMax(!0);break;case J.c.VDW.ADPMIN:b=a.getADPMinMax(!1);break;default:b=a.getVanderwaalsRadiusFloat(this.vwr,d.radiusData.vdwType)}b=c.factorType===J.atomdata.RadiusData.EnumType.FACTOR?b*c.value:b+c.value}return b+c.valueExtended},"JM.Atom,J.atomdata.AtomData");c(b,"calculateHydrogens",function(a,d,b,c){var e=256==(c&256),g=512==(c&512),j=8==(c&8),k=2048==(c&2048);c=4096==(c&4096);var l=new JU.V3,f=new JU.V3,n=Array(this.ac),q=this.vwr.slm.bsDeleted,v,B=d[0]=0;if(null==a)return n;var m=
this.vwr.getOperativeSymmetry();null!=m&&0==this.vwr.getObjectMad10(5)&&(m=null);for(var r=null==m?null:new JU.P3,s=a.nextSetBit(0);0<=s;s=a.nextSetBit(s+1))if(!(null!=q&&q.get(s))){var u=this.at[s],w=u.getElementNumber();if(!(g&&6!=w)){var z=6>=w?1.1:10>=w?1:1.3;switch(w){case 7:case 8:z=1}var A=e||k||c?u.getCovalentHydrogenCount():0;if(!(e&&0<A||k&&0==A)){var x=this.getMissingHydrogenCount(u,!1);if(!(e&&0==x)){k||(A=x);var C=this.aaRet[0];v=this.aaRet[2];var E=this.aaRet[3]-(k?A:0);if(!(0==E&&u.isHetero())){n[s]=
Array(A);x=0;if(0==E)switch(A){case 4:l.set(0.635,0.635,0.635),v=JU.P3.newP(l),v.add(u),x=JM.AtomCollection.addH(n[s],x,v,u,b,m,r);case 3:l.set(-0.635,-0.635,0.635),v=JU.P3.newP(l),v.add(u),x=JM.AtomCollection.addH(n[s],x,v,u,b,m,r);case 2:l.set(-0.635,0.635,-0.635),v=JU.P3.newP(l),v.add(u),x=JM.AtomCollection.addH(n[s],x,v,u,b,m,r);case 1:l.set(0.635,-0.635,-0.635),v=JU.P3.newP(l),v.add(u),x=JM.AtomCollection.addH(n[s],x,v,u,b,m,r)}else switch(A){case 3:this.getHybridizationAndAxes(s,w,l,f,"sp3b",
!1,!0,j,null);v=new JU.P3;v.scaleAdd2(z,l,u);x=JM.AtomCollection.addH(n[s],x,v,u,b,m,r);this.getHybridizationAndAxes(s,w,l,f,"sp3c",!1,!0,j,null);v=new JU.P3;v.scaleAdd2(z,l,u);x=JM.AtomCollection.addH(n[s],x,v,u,b,m,r);this.getHybridizationAndAxes(s,w,l,f,"sp3d",!1,!0,j,null);v=new JU.P3;v.scaleAdd2(z,l,u);x=JM.AtomCollection.addH(n[s],x,v,u,b,m,r);break;case 2:E=2==v||5==w||1==E&&4==C||7==w&&this.isAdjacentSp2(u);this.getHybridizationAndAxes(s,w,l,f,E?"sp2b":3==C?"sp3c":"lpa",!1,!0,j,null);v=JU.P3.newP(l);
v.scaleAdd2(z,l,u);x=JM.AtomCollection.addH(n[s],x,v,u,b,m,r);this.getHybridizationAndAxes(s,w,l,f,E?"sp2c":3==C?"sp3d":"lpb",!1,!0,j,null);v=JU.P3.newP(l);v.scaleAdd2(z,l,u);x=JM.AtomCollection.addH(n[s],x,v,u,b,m,r);break;case 1:switch(C-E){case 1:if(8==w&&u===u.group.getCarbonylOxygenAtom()){n[s]=null;continue}if(null!=this.getHybridizationAndAxes(s,w,l,f,2==v||5==w||6==w&&1==this.aaRet[1]||7==w&&(new Boolean((new Boolean(u.group.getNitrogenAtom()===u&0==u.getFormalCharge())).valueOf()||this.isAdjacentSp2(u))).valueOf()?
"sp2c":"sp3d",!0,!1,j,null))v=JU.P3.newP(l),v.scaleAdd2(z,l,u),x=JM.AtomCollection.addH(n[s],x,v,u,b,m,r);break;case 2:this.getHybridizationAndAxes(s,w,l,f,4==C?"sp2c":"sp2b",!1,!1,j,null);v=JU.P3.newP(l);v.scaleAdd2(z,l,u);x=JM.AtomCollection.addH(n[s],x,v,u,b,m,r);break;case 3:this.getHybridizationAndAxes(s,w,l,f,"spb",!1,!0,j,null),v=JU.P3.newP(l),v.scaleAdd2(z,l,u),x=JM.AtomCollection.addH(n[s],x,v,u,b,m,r)}}if(x<A){u=Array(x);for(w=0;w<x;w++)u[w]=n[s][w];n[s]=u}B+=x}}}}}d[0]=B;return n},"JU.BS,~A,JU.Lst,~N");
b.addH=c(b,"addH",function(a,d,b,c,e,g,j){if(null!=g&&(j.setT(b),g.toFractional(j,!1),!g.isWithinUnitCell(j,1,1,1,NaN)))return d;a[d++]=b;null!=e&&e.addLast(c);return d},"~A,~N,JU.P3,JM.Atom,JU.Lst,J.api.SymmetryInterface,JU.P3");c(b,"isAdjacentSp2",function(a){for(var d=a.bonds,b=0;b<d.length;b++)for(var c=d[b].getOtherAtom(a).bonds,e=0;e<c.length;e++)switch(c[e].getCovalentOrder()){case 2:case 3:return!0}return!1},"JM.Atom");c(b,"getMissingHydrogenCount",function(a,d){null==this.aaRet&&(this.aaRet=
D(5,0));var b=a.getTargetValence();if(0>b)return 0;var c=a.getFormalCharge(),e=a.getValence(),g=this.am[a.mi],g=g.isBioModel&&!g.isPdbWithMultipleBonds?a.group.getGroup3():null;this.aaRet[0]=b;this.aaRet[1]=c;this.aaRet[2]=0;this.aaRet[3]=a.getCovalentBondCount();this.aaRet[4]=null==g?0:e;null!=g&&0==c&&this.bioModelset.getAminoAcidValenceAndCharge(g,a.getAtomName(),this.aaRet)&&(b=this.aaRet[0],c=this.aaRet[1]);0!=c&&(b+=4==b?-Math.abs(c):c,this.aaRet[0]=b);b-=e;return 0>b&&!d?0:b},"JM.Atom,~B");
c(b,"fixFormalCharges",function(a){for(var d=0,b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1)){var c=this.at[b],e=this.getMissingHydrogenCount(c,!0);if(0!=e){var g=c.getFormalCharge(),e=g-e;c.setFormalCharge(e);this.taintAtom(b,4);JU.Logger.debugging&&JU.Logger.debug("atom "+c+" formal charge "+g+" -> "+e);d++}}return d},"JU.BS");c(b,"getHybridizationAndAxes",function(a,d,b,c,e,g,j,k,l){var f=0<e.length&&"-"==e.charAt(0)?e.substring(1):e;if(0<=e.indexOf("d")&&!e.endsWith("sp3d"))return this.getHybridizationAndAxesD(a,
b,c,f);e=this.at[a];0==d&&(d=e.getElementNumber());var n=this.getAttached(e,4,g,k),q=n.length,v=f.charAt(f.length-1).charCodeAt(0)-97;if(0>v||6<v)v=0;b.set(0,0,0);c.set(0,0,0);for(var B=Array(4),m=0;m<q;m++){var r=n[m];if(null==r){q=m;break}B[m]=JU.V3.newVsub(e,r);B[m].normalize();b.add(B[m])}0<q&&c.setT(B[0]);m=!1;a=new JU.V3;if(3<=q){2.9845130209103035>c.angle(B[1])?a.cross(c,B[1]):a.cross(c,B[2]);a.normalize();var s=new JU.V3;2.9845130209103035>B[1].angle(B[2])?s.cross(B[1],B[2]):s.cross(c,B[2]);
s.normalize();m=0.95<=Math.abs(s.dot(a))}var u=0==f.indexOf("sp3"),r=!u&&0==f.indexOf("sp2"),w=!u&&!r&&0==f.indexOf("sp"),z=0==f.indexOf("p"),x=0==f.indexOf("lp"),s=null;if(g){if(0==q)return null;if(u){if(3<v||4<q)return null}else if(r){if(2<v||3<q)return null}else if(w&&(1<v||2<q))return null;switch(q){case 1:if(1==d&&!u)return null;if(u){s="sp3";break}switch(n[0].getCovalentBondCount()){case 1:if(2!=n[0].getValence()){s="sp";break}case 2:s=w?"sp":"sp2";break;case 3:if(!r&&!z)return null;s="sp2"}break;
case 2:if(0.1>b.length()){if(0<=f.indexOf("2")||0<=f.indexOf("3"))return null;s="sp";break}s=u?"sp3":"sp2";if(0==f.indexOf("sp"))break;if(x){s="lp";break}s=f;break;default:if(m&&!k)s="sp2";else{m&&b.setT(a);if(x&&3==q){s="lp";break}s="sp3"}}if(null==s)return null;if(0==f.indexOf("p")){if("sp3"===s)return null}else if(0>f.indexOf(s))return null}if(v<q&&!f.startsWith("p")&&!f.startsWith("l"))return b.sub2(n[v],e),b.normalize(),s;switch(q){case 0:f.equals("sp3c")||f.equals("sp2d")||f.equals("lpa")?b.set(-0.5,
-0.7,1):f.equals("sp3b")||f.equals("lpb")?b.set(0.5,-0.7,-1):f.equals("sp3a")?b.set(0,1,0):b.set(0,0,1);c.set(1,0,0);break;case 1:a.setT(JM.AtomCollection.vRef);c.cross(a,b);if(u){for(m=n[0].getBondCount();0<=--m;)if(n[0].bonds[m].isCovalentNotPartial0()&&n[0].getBondedAtomIndex(m)!=e.i&&(c.sub2(n[0],n[0].bonds[m].getOtherAtom(n[0])),c.cross(b,c),0!=c.length())){c.cross(c,b);break}c.normalize();Float.isNaN(c.x)&&(c.setT(JM.AtomCollection.vRef),c.cross(c,b));a.cross(b,c);a.normalize();b.normalize();
c.scaleAdd2(2.828,c,b);3!=v&&(c.normalize(),(new JU.M3).setAA(JU.A4.new4(b.x,b.y,b.z,2.09439507*(2==v?1:-1))).rotate(c));b.setT(c);c.cross(a,b);break}a.cross(c,b);f=n[0].getCovalentBondCount();switch(f){case 3:if(l!==n[0]){this.getHybridizationAndAxes(n[0].i,0,c,a,"pz",!1,j,k,e);a.setT(c);r?(c.cross(c,b),1==v&&c.scale(-1),c.scale(JM.AtomCollection.sqrt3_2),b.scaleAdd2(0.5,b,c)):w||(a.setT(b),b.setT(c));c.cross(a,b);break}f=2;case 1:if(1==f&&2!=n[0].getValence())break;case 2:j=n[0];c.setT(b);for(a.setT(JM.AtomCollection.vRef);null!=
j&&2==j.getCovalentBondCount();){k=j.bonds;r=null;for(m=0;m<k.length;m++)if(k[m].isCovalentNotPartial0()&&(r=k[m].getOtherAtom(j),r!==e)){a.sub2(r,j);break}a.cross(a,c);if(0.1<a.length()||2!=r.getCovalentBondCount())break;e=j;j=r}w||(0.1<a.length()?(b.cross(a,c),b.normalize(),1==v&&b.scale(-1),b.scale(JM.AtomCollection.sqrt3_2),b.scaleAdd2(0.5,c,b),z&&(a.cross(b,c),b.setT(a),a.setT(c)),c.cross(a,b)):(b.setT(c),c.cross(JM.AtomCollection.vRef,c)))}break;case 2:if(0.1>b.length()){if(!f.equals("pz")){r=
n[0];(l=3==r.getCovalentBondCount())||(l=3==(r=n[1]).getCovalentBondCount());if(l){this.getHybridizationAndAxes(r.i,0,c,b,"pz",!1,j,k,null);f.equals("px")&&c.scale(-1);b.setT(B[0]);break}a.setT(JM.AtomCollection.vRef);b.cross(a,c);a.cross(b,c)}b.setT(c);c.cross(a,b);break}a.cross(b,c);if(r){c.cross(b,a);break}if(u||x){a.normalize();b.normalize();f.equals("lp")||(0==v||2==v?b.scaleAdd2(-1.2,a,b):b.scaleAdd2(1.2,a,b));c.cross(b,a);break}c.cross(b,a);b.setT(a);0>b.z&&(b.scale(-1),c.scale(-1));break;
default:if(u)break;if(!m){c.cross(b,c);break}b.setT(a);0>b.z&&j&&(b.scale(-1),c.scale(-1))}c.normalize();b.normalize();return s},"~N,~N,JU.V3,JU.V3,~S,~B,~B,~B,JU.T3");c(b,"getHybridizationAndAxesD",function(a,d,b,c){c.startsWith("sp3d2")&&(c="d2sp3"+(5==c.length?"a":c.substring(5)));c.startsWith("sp3d")&&(c="dsp3"+(4==c.length?"a":c.substring(4)));if(c.equals("d2sp3")||c.equals("dsp3"))c+="a";var e=c.startsWith("dsp3"),g=c.charAt(c.length-1).charCodeAt(0)-97;if(null!=d&&(!e&&(5<g||!c.startsWith("d2sp3"))||
e&&4<g))return null;a=this.at[a];c=this.getAttached(a,6,!0,!1);if(null==c)return null==d?null:"?";var j=c.length;if(3>j&&null!=d)return null;for(var k=g>=j,l=w(j*(j-1)/2),f=JU.AU.newInt2(l),n=D(3,0),l=D(3,l,0),q=0,v=0,B=0;B<j-1;B++)for(var m=B+1;m<j;m++){var r=JU.Measure.computeAngleABC(c[B],a,c[m],!0),r=105>r?0:150<=r?2:1;l[r][n[r]]=q;n[r]++;f[q++]=D(-1,[B,m]);0==B&&1==r&&v++}q=100*n[0]+10*n[1]+n[2];if(null==d)switch(q){default:return"";case 0:return"";case 1:return"linear";case 100:case 10:return"bent";
case 111:case 201:return"T-shaped";case 30:case 120:case 210:case 300:return 162<Math.abs(JU.Measure.computeTorsion(c[0],a,c[1],c[2],!0))?"trigonal planar":"trigonal pyramidal";case 330:return 1==v%2?"tetrahedral":"uncapped trigonal pyramid";case 60:case 150:case 240:return"tetrahedral";case 402:return"square planar";case 411:case 501:return"see-saw";case 631:return"trigonal bipyramidal";case 802:return"uncapped square pyramid";case 1203:return"octahedral"}switch(q){default:return null;case 201:break;
case 210:case 330:case 411:case 631:if(!e)return null;break;case 300:case 402:case 501:case 802:case 1203:if(e)return null}if(k)if(e)switch(n[1]){case 0:d.sub2(c[f[l[0][0]][0]],a);b.sub2(c[f[l[0][0]][1]],a);d.cross(d,b);d.normalize();4==g&&d.scale(-1);n=this.findNotAttached(j,f,l[2],n[2]);B=n.nextSetBit(0);b.sub2(c[B],a);b.normalize();b.scale(0.5);d.scaleAdd2(JM.AtomCollection.sqrt3_2,d,b);g=-1;break;case 1:4==g?(b=f[l[1][0]],d.add2(c[b[0]],c[b[1]]),d.scaleAdd2(-2,a,d),g=-1):(n=this.findNotAttached(j,
f,l[1],n[1]),g=n.nextSetBit(0));break;default:n=this.findNotAttached(j,f,l[1],n[1]),g=n.nextSetBit(0)}else{q=!1;if(4==j)switch(n[2]){case 1:n=this.findNotAttached(j,f,l[2],n[2]);B=n.nextSetBit(0);g=4==g?B:n.nextSetBit(B+1);break;default:q=!0}else{n=this.findNotAttached(j,f,l[2],n[2]);B=n.nextSetBit(0);for(m=j;m<g&&0<=B;m++)B=n.nextSetBit(B+1);-1==B?q=!0:g=B}q&&(d.sub2(c[f[l[0][0]][0]],a),b.sub2(c[f[l[0][0]][1]],a),d.cross(d,b),4==g&&d.scale(-1),g=-1)}0<=g&&d.sub2(c[g],a);k&&d.scale(-1);d.normalize();
return e?"dsp3":"d2sp3"},"~N,JU.V3,JU.V3,~S");c(b,"getAttached",function(a,d,b,c){var e=a.getCovalentBondCount();if(e>d)return null;d=Array(e);if(0<e){for(var e=a.bonds,g=0,j=0;j<e.length;j++)if(e[j].isCovalentNotPartial0()){var k=e[j].getOtherAtom(a);if(!c||1!=k.getAtomicAndIsotopeNumber())d[g++]=k}b&&!c&&java.util.Arrays.sort(d,T(JM.AtomCollection.AtomSorter,this,null))}return d},"JM.Atom,~N,~B,~B");c(b,"findNotAttached",function(a,d,b,c){var e=JU.BS.newN(a);e.setBits(0,a);for(var g=0;g<a;g++)for(var j=
0;j<c;j++){var k=d[b[j]];(k[0]==g||k[1]==g)&&e.clear(g)}return e},"~N,~A,~A,~N");c(b,"getAtomBitsMDa",function(a,d,b){var c=C(d,Integer)?d.intValue():0;switch(a){case 1086326786:case 1086326785:var e=1086326785==a;d=","+d+",";for(a=this.ac;0<=--a;)if(!JM.AtomCollection.isDeleted(this.at[a])){var g=e?this.at[a].getAtomType():this.at[a].getAtomName();0<=d.indexOf(","+g+",")&&b.set(a)}return b;case 1094715393:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].getAtomNumber()==
c&&b.set(a);return b;case 2097155:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&0<this.at[a].getCovalentBondCount()&&b.set(a);return b;case 2097188:case 2097156:case 136314895:case 2097166:case 2097168:case 2097170:case 2097172:case 2097174:case 2097184:return this.haveBioModels?this.bioModelset.getAtomBitsBS(a,null,b):b;case 1612709900:c=1;case 1094715402:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].getElementNumber()==c&&b.set(a);return b;case 1612709894:for(a=
this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].isHetero()&&b.set(a);return b;case 1073741824:return this.getIdentifierOrNull(d);case 2097165:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].isLeadAtom()&&b.set(a);return b;case 1094713362:case 1639976963:return this.haveBioModels?this.bioModelset.getAtomBitsBS(a,d,b):b;case 1094715412:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].getResno()==c&&b.set(a);return b;case 1612709912:d=
D(2,0);for(a=this.ac;0<=--a;)if(!JM.AtomCollection.isDeleted(this.at[a]))if(c=this.at[a].group.groupID,42<=c&&45>c)b.set(a);else if(8==(g=this.at[a]).getElementNumber()&&2==g.getCovalentBondCount()){for(var c=g.bonds,j=0,k=c.length;0<=--k&&3>j;)if(c[k].isCovalentNotPartial0()&&1==(e=c[k].getOtherAtom(g)).getElementNumber())d[j++%2]=e.i;2==j&&(b.set(d[1]),b.set(d[0]),b.set(a))}return b;case 1073742355:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.isAltLoc(this.at[a].altloc,d)&&
b.set(a);return b;case 1073742356:d=d.toUpperCase();0<=d.indexOf("\\?")&&(d=JU.PT.rep(d,"\\?","\u0001"));(g=d.startsWith("?*"))&&(d=d.substring(1));for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.isAtomNameMatch(this.at[a],d,g,g)&&b.set(a);return b;case 1073742357:return JU.BSUtil.copy(this.getChainBits(c));case 1073742360:return this.getSpecName(d);case 1073742361:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].group.groupID==c&&b.set(a);return b;case 1073742362:return JU.BSUtil.copy(this.getSeqcodeBits(c,
!0));case 5:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].group.getInsCode()==c&&b.set(a);return b;case 1296041986:for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].getSymOp()==c&&b.set(a);return b}g=d.nextSetBit(0);if(0>g)return b;switch(a){case 1094717454:e=JU.BSUtil.copy(d);for(a=g;0<=a;a=e.nextSetBit(a+1))b.or(this.am[this.at[a].mi].bsAtoms),e.andNot(b);return b;case 1086326788:e=JU.BSUtil.copy(d);for(a=g;0<=a;a=e.nextSetBit(a+1))this.at[a].group.chain.setAtomBits(b),
e.andNot(b);return b;case 1086326789:e=new JU.BS;for(a=g;0<=a;a=d.nextSetBit(a+1))e.set(this.at[a].getElementNumber());for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&e.get(this.at[a].getElementNumber())&&b.set(a);return b;case 1086324742:e=JU.BSUtil.copy(d);for(a=g;0<=a;a=e.nextSetBit(a+1))this.at[a].group.setAtomBits(b),e.andNot(b);return b;case 1095241729:for(a=this.ac;0<=--a;)g=this.getVibration(a,!1),null!=g&&-2==g.modDim&&b.set(a);return b;case 1145047055:e=(new JU.SB).append(";");
for(a=g;0<=a;a=d.nextSetBit(a+1))g=this.getVibration(a,!1),null!=g&&(g=";"+g.getApproxString100()+";",0>e.indexOf(g)&&e.append(g));for(a=this.ac;0<=--a;)g=this.getVibration(a,!1),null!=g&&0<=e.indexOf(";"+g.getApproxString100()+";")&&b.set(a);return b;case 1094713369:e=new JU.BS;for(a=g;0<=a;a=d.nextSetBit(a+1))e.set(this.at[a].atomSite);for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&e.get(this.at[a].atomSite)&&b.set(a);return b}JU.Logger.error("MISSING getAtomBits entry for "+JS.T.nameOf(a));
return b},"~N,~O,JU.BS");c(b,"getChainBits",function(a){var d=this.vwr.getBoolean(603979822);d?97<=a&&122>=a&&(a+=159):0<=a&&300>a&&(a=this.chainToUpper(a));for(var b=new JU.BS,c=JU.BS.newN(this.ac),e,g=c.nextClearBit(0);g<this.ac;g=c.nextClearBit(g+1))if(!JM.AtomCollection.isDeleted(this.at[g])){var j=this.at[g].group.chain;a==(e=j.chainID)||!d&&0<=e&&300>e&&a==this.chainToUpper(e)?(j.setAtomBits(b),c.or(b)):j.setAtomBits(c)}return b},"~N");c(b,"chainToUpper",function(a){return 97<=a&&122>=a?a-32:
256<=a&&300>a?a-191:a},"~N");c(b,"isAltLoc",function(a,d){if(null==d)return"\x00"==a;if(1!=d.length)return!1;var b=d.charAt(0);return"*"==b||"?"==b&&"\x00"!=a||a==b},"~S,~S");c(b,"getSeqcodeBits",function(a,d){var b=new JU.BS,c=JM.Group.getSeqNumberFor(a),e=2147483647!=c,g=!0,j=JM.Group.getInsertionCodeChar(a);switch(j.charCodeAt(0)){case 63:for(var k=this.ac;0<=--k;)if(!JM.AtomCollection.isDeleted(this.at[k])){var l=this.at[k].group.seqcode;if((!e||c==JM.Group.getSeqNumberFor(l))&&0!=JM.Group.getInsertionCodeFor(l))b.set(k),
g=!1}break;default:for(k=this.ac;0<=--k;)if(!JM.AtomCollection.isDeleted(this.at[k])&&(l=this.at[k].group.seqcode,a==l||!e&&a==JM.Group.getInsertionCodeFor(l)||"*"==j&&c==JM.Group.getSeqNumberFor(l)))b.set(k),g=!1}return!g||d?b:null},"~N,~B");c(b,"getIdentifierOrNull",function(a){var d=this.getSpecNameOrNull(a,!1);0<=a.indexOf("\\?")&&(a=JU.PT.rep(a,"\\?","\u0001"));return null!=d||0<a.indexOf("?")?d:0<a.indexOf("*")?this.getSpecNameOrNull(a,!0):this.haveBioModels?this.bioModelset.getIdentifierOrNull(a):
null},"~S");c(b,"getSpecName",function(a){var d=this.getSpecNameOrNull(a,!1);if(null!=d)return d;0<a.indexOf("*")&&(d=this.getSpecNameOrNull(a,!0));return null==d?new JU.BS:d},"~S");c(b,"getSpecNameOrNull",function(a,d){var b=null;a=a.toUpperCase();0<=a.indexOf("\\?")&&(a=JU.PT.rep(a,"\\?","\u0001"));var c=a.startsWith("?*");c&&(a=a.substring(1));for(var e=this.ac;0<=--e;)if(!JM.AtomCollection.isDeleted(this.at[e])){var g=this.at[e].getGroup3(!0);if(null!=g&&0<g.length){if(JU.PT.isMatch(g,a,d,!0)){null==
b&&(b=JU.BS.newN(e+1));for(b.set(e);0<=--e;)!JM.AtomCollection.isDeleted(this.at[e])&&this.at[e].getGroup3(!0).equals(g)&&b.set(e);e++}}else this.isAtomNameMatch(this.at[e],a,d,c)&&(null==b&&(b=JU.BS.newN(e+1)),b.set(e))}return b},"~S,~B");c(b,"isAtomNameMatch",function(a,d,b,c){return JU.PT.isMatch(a.getAtomName().toUpperCase(),d,b,c)},"JM.Atom,~S,~B,~B");c(b,"getAtomIndices",function(a){for(var d=0,b=D(this.ac,0),c=a.nextSetBit(0);0<=c&&c<this.ac;c=a.nextSetBit(c+1))b[c]=++d;return b},"JU.BS");
c(b,"getAtomsNearPlane",function(a,d){for(var b=new JU.BS,c=this.ac;0<=--c;){var e=this.at[c];if(!JM.AtomCollection.isDeleted(e)){var g=JU.Measure.distanceToPlane(d,e);(0<a&&-0.1<=g&&g<=a||0>a&&0.1>=g&&g>=a||0==a&&0.01>Math.abs(g))&&b.set(e.i)}}return b},"~N,JU.P4");c(b,"clearVisibleSets",function(){this.haveBSClickable=this.haveBSVisible=!1});c(b,"getAtomsInFrame",function(a){this.clearVisibleSets();a.clearAll();for(var d=this.ac;0<=--d;)!JM.AtomCollection.isDeleted(this.at[d])&&this.at[d].isVisible(1)&&
a.set(d)},"JU.BS");c(b,"getVisibleSet",function(a){if(a)this.vwr.setModelVisibility(),this.vwr.shm.finalizeAtoms(null,!0);else if(this.haveBSVisible)return this.bsVisible;this.bsVisible.clearAll();for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].checkVisible()&&this.bsVisible.set(a);null!=this.vwr.shm.bsSlabbedInternal&&this.bsVisible.andNot(this.vwr.shm.bsSlabbedInternal);this.haveBSVisible=!0;return this.bsVisible},"~B");c(b,"getClickableSet",function(a){if(a)this.vwr.setModelVisibility();
else if(this.haveBSClickable)return this.bsClickable;this.bsClickable.clearAll();for(a=this.ac;0<=--a;)!JM.AtomCollection.isDeleted(this.at[a])&&this.at[a].isClickable()&&this.bsClickable.set(a);this.haveBSClickable=!0;return this.bsClickable},"~B");c(b,"isModulated",function(a){return null!=this.bsModulated&&this.bsModulated.get(a)},"~N");c(b,"deleteModelAtoms",function(a,d,b){this.at=JU.AU.deleteElements(this.at,a,d);this.ac=this.at.length;for(var c=a;c<this.ac;c++)this.at[c].i=c,this.at[c].mi--;
null!=this.bsModulated&&JU.BSUtil.deleteBits(this.bsModulated,b);this.deleteAtomTensors(b);this.atomNames=JU.AU.deleteElements(this.atomNames,a,d);this.atomTypes=JU.AU.deleteElements(this.atomTypes,a,d);this.atomResnos=JU.AU.deleteElements(this.atomResnos,a,d);this.atomSerials=JU.AU.deleteElements(this.atomSerials,a,d);this.atomSeqIDs=JU.AU.deleteElements(this.atomSeqIDs,a,d);this.dssrData=JU.AU.deleteElements(this.dssrData,a,d);this.bfactor100s=JU.AU.deleteElements(this.bfactor100s,a,d);this.hasBfactorRange=
!1;this.occupancies=JU.AU.deleteElements(this.occupancies,a,d);this.resetPartialCharges();this.atomTensorList=JU.AU.deleteElements(this.atomTensorList,a,d);this.vibrations=JU.AU.deleteElements(this.vibrations,a,d);this.nSurfaceAtoms=0;this.surfaceDistance100s=this.bsSurface=null;if(null!=this.tainted)for(a=0;18>a;a++)JU.BSUtil.deleteBits(this.tainted[a],b)},"~N,~N,JU.BS");c(b,"getAtomIdentityInfo",function(a,d,b){d.put("_ipt",Integer.$valueOf(a));d.put("atomIndex",Integer.$valueOf(a));d.put("atomno",
Integer.$valueOf(this.at[a].getAtomNumber()));d.put("info",this.getAtomInfo(a,null,b));d.put("sym",this.at[a].getElementSymbol())},"~N,java.util.Map,JU.P3");c(b,"getAtomTensorList",function(a){return 0>a||null==this.atomTensorList||a>=this.atomTensorList.length?null:this.atomTensorList[a]},"~N");c(b,"deleteAtomTensors",function(a){if(null!=this.atomTensors){for(var d=new JU.Lst,b,c=this.atomTensors.keySet().iterator();c.hasNext()&&((b=c.next())||1);){for(var e=this.atomTensors.get(b),g=e.size();0<=
--g;){var j=e.get(g);(a.get(j.atomIndex1)||0<=j.atomIndex2&&a.get(j.atomIndex2))&&e.removeItemAt(g)}0==e.size()&&d.addLast(b)}for(g=d.size();0<=--g;)this.atomTensors.remove(d.get(g))}},"JU.BS");c(b,"setCapacity",function(a){this.atomCapacity+=a},"~N");c(b,"setAtomTensors",function(a,d){if(!(null==d||0==d.size())){null==this.atomTensors&&(this.atomTensors=new java.util.Hashtable);null==this.atomTensorList&&(this.atomTensorList=Array(this.at.length));this.atomTensorList=JU.AU.ensureLength(this.atomTensorList,
this.at.length);this.atomTensorList[a]=JM.AtomCollection.getTensorList(d);for(var b=d.size();0<=--b;){var c=d.get(b);c.atomIndex1=a;c.atomIndex2=-1;c.modelIndex=this.at[a].mi;this.addTensor(c,c.type);null!=c.altType&&this.addTensor(c,c.altType)}}},"~N,JU.Lst");c(b,"addTensor",function(a,d){d=d.toLowerCase();var b=this.atomTensors.get(d);null==b&&(this.atomTensors.put(d,b=new JU.Lst),b.ensureCapacity(this.atomCapacity));b.addLast(a)},"JU.Tensor,~S");b.getTensorList=c(b,"getTensorList",function(a){for(var d=
-1,b=!1,c=a.size(),e=c;0<=--e;){var g=a.get(e);g.forThermalEllipsoid?d=e:2==g.iType&&(b=!0)}var j=Array((0<=d||!b?0:1)+c);if(0<=d&&(j[0]=a.get(d),1==a.size()))return j;if(b){d=0;for(e=c;0<=--e;)g=a.get(e),g.forThermalEllipsoid||(j[++d]=g)}else for(e=0;e<c;e++)j[e]=a.get(e);return j},"JU.Lst");c(b,"getAtomTensor",function(a,d){var b=this.getAtomTensorList(a);if(null!=b&&null!=d){d=d.toLowerCase();for(var c=0;c<b.length;c++){var e=b[c];if(null!=e&&(d.equals(e.type)||d.equals(e.altType)))return e}}return null},
"~N,~S");c(b,"getAllAtomTensors",function(a){if(null==this.atomTensors)return null;if(null!=a)return this.atomTensors.get(a.toLowerCase());a=new JU.Lst;for(var d,b=this.atomTensors.entrySet().iterator();b.hasNext()&&((d=b.next())||1);)a.addAll(d.getValue());return a},"~S");c(b,"scaleVectorsToMax",function(a){if(null!=this.vibrations){for(var d=0,b=JU.BS.newN(this.ac),c=this.vibrations.length;0<=--c;){var e=this.getVibration(c,!1);if(null!=e&&(-1==e.modDim||-2==e.modDim))e.resetMoment(),d=Math.max(d,
e.length()),b.set(c)}if(!(d==a||0==d)){d=a/d;a=!1;for(c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1)){var e=this.getVibration(c,!1),g=this.getModulation(c);if(null==g){if(0==d)return;e.scale(d)}else g.scaleVibration(d);a||(this.taintAtom(c,12),a=!0)}this.tainted[12].or(b)}}},"~N");c(b,"getAtomsFromAtomNumberInFrame",function(a){for(var d=this.vwr.getVisibleFrameAtomsNoSplitData(),b=d.nextSetBit(0);0<=b;b=d.nextSetBit(b+1))this.at[b].getAtomNumber()!=a&&d.clear(b);return d},"~N");c(b,"generateCrystalClass",
function(a,d){var b=0>a||a>=this.ac?this.vwr.getOperativeSymmetry():this.at[a].getUnitCell(),c=null!=d&&Float.isNaN(d.x),b=null==b?null:b.generateCrystalClass(c?null:null!=d?d:this.at[a]);return null==b?new JU.Lst:b},"~N,JU.P3");b.isDeleted=c(b,"isDeleted",function(a){return null==a||a.isDeleted()},"JM.Atom");c(b,"getGroupsForAtoms",function(a){for(var d=new java.util.ArrayList,b=null,c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1)){var e=this.at[c].group;e!==b&&(b=e,d.add(e))}return d},"JU.BS");b.$AtomCollection$AtomSorter$=
function(){var a=s(function(){fa(this,arguments);r(this,arguments)},JM.AtomCollection,"AtomSorter",null,java.util.Comparator);f(a,"compare",function(a,b){return a.i>b.i?1:a.i<b.i?-1:0},"JM.Atom,JM.Atom")};b.sqrt3_2=Math.sqrt(3)/2;b.vRef=JU.V3.new3(3.14159,2.71828,1.41421);b.userSettableValues=null});m("JM");x(["J.api.AtomIndexIterator"],"JM.AtomIteratorWithinModel",["J.atomdata.RadiusData"],function(){var b=s(function(){this.bspf=this.cubeIterator=null;this.isZeroBased=this.hemisphereOnly=this.threadSafe=
!1;this.modelIndex=2147483647;this.atomIndex=-1;this.distanceSquared=this.zeroBase=0;this.bsSelected=null;this.checkGreater=this.isGreaterOnly=!1;this.radiusData=null;this.vdw1=0;this.isVdw=!1;this.vwr=this.atoms=null;this.iNext=0;r(this,arguments)},JM,"AtomIteratorWithinModel",null,J.api.AtomIndexIterator);c(b,"initialize",function(a,d,b,c,e,g){this.bspf=a;this.bsSelected=d;this.isGreaterOnly=b;this.isZeroBased=c;this.hemisphereOnly=e;this.threadSafe=g;this.cubeIterator=null},"J.bspt.Bspf,JU.BS,~B,~B,~B,~B");
f(b,"setModel",function(a,d,b,c,e,g,j){this.threadSafe&&(d=-1-d);if(d!=this.modelIndex||null==this.cubeIterator)this.cubeIterator=this.bspf.getCubeIterator(d),this.modelIndex=d;this.zeroBase=this.isZeroBased?b:0;if(-2147483648!=g){this.atomIndex=0>g?-1:c;if(this.isVdw=null!=j)this.radiusData=j,this.atoms=a.at,this.vwr=a.vwr,g=j.factorType===J.atomdata.RadiusData.EnumType.OFFSET?5+j.value:5*j.value,this.vdw1=this.atoms[c].getVanderwaalsRadiusFloat(this.vwr,j.vdwType);this.checkGreater=this.isGreaterOnly&&
2147483647!=c;this.setCenter(e,g)}},"JM.ModelSet,~N,~N,~N,JU.T3,~N,J.atomdata.RadiusData");f(b,"setCenter",function(a,d){this.setCenter2(a,d)},"JU.T3,~N");c(b,"setCenter2",function(a,d){null!=this.cubeIterator&&(this.cubeIterator.initialize(a,d,this.hemisphereOnly),this.distanceSquared=d*d)},"JU.T3,~N");f(b,"hasNext",function(){return this.hasNext2()});c(b,"hasNext2",function(){if(0<=this.atomIndex)for(;this.cubeIterator.hasMoreElements();){var a=this.cubeIterator.nextElement();if((this.iNext=a.i)!=
this.atomIndex&&(!this.checkGreater||this.iNext>this.atomIndex)&&(null==this.bsSelected||this.bsSelected.get(this.iNext)))return!0}else if(this.cubeIterator.hasMoreElements())return a=this.cubeIterator.nextElement(),this.iNext=a.i,!0;this.iNext=-1;return!1});f(b,"next",function(){return this.iNext-this.zeroBase});f(b,"foundDistance2",function(){return null==this.cubeIterator?-1:this.cubeIterator.foundDistance2()});f(b,"addAtoms",function(a){for(var d;this.hasNext();)if(0<=(d=this.next())){var b;if(this.isVdw){b=
this.atoms[d].getVanderwaalsRadiusFloat(this.vwr,this.radiusData.vdwType)+this.vdw1;switch(this.radiusData.factorType){case J.atomdata.RadiusData.EnumType.OFFSET:b+=2*this.radiusData.value;break;case J.atomdata.RadiusData.EnumType.FACTOR:b*=this.radiusData.value}b*=b}else b=this.distanceSquared;this.foundDistance2()<=b&&a.set(d)}},"JU.BS");f(b,"release",function(){null!=this.cubeIterator&&(this.cubeIterator.release(),this.cubeIterator=null)});f(b,"getPosition",function(){return null})});m("JM");x(["JM.AtomIteratorWithinModel"],
"JM.AtomIteratorWithinModelSet",null,function(){var b=s(function(){this.center=this.bsModels=null;this.distance=0;r(this,arguments)},JM,"AtomIteratorWithinModelSet",JM.AtomIteratorWithinModel);u(b,function(a){K(this,JM.AtomIteratorWithinModelSet,[]);this.bsModels=a},"JU.BS");f(b,"setCenter",function(a,d){this.center=a;this.distance=d;this.set(0)},"JU.T3,~N");c(b,"set",function(a){if(0>(this.modelIndex=this.bsModels.nextSetBit(a))||null==(this.cubeIterator=this.bspf.getCubeIterator(this.modelIndex)))return!1;
this.setCenter2(this.center,this.distance);return!0},"~N");f(b,"hasNext",function(){return this.hasNext2()?!0:!this.set(this.modelIndex+1)?!1:this.hasNext()})});m("JM");x(["JU.Edge","JV.JC"],"JM.Bond",["JU.C"],function(){var b=s(function(){this.atom2=this.atom1=null;this.shapeVisibilityFlags=this.colix=this.mad=0;r(this,arguments)},JM,"Bond",JU.Edge);u(b,function(a,d,b,c,e){K(this,JM.Bond,[]);this.atom1=a;this.atom2=d;this.colix=e;this.setOrder(b);this.setMad(c)},"JM.Atom,JM.Atom,~N,~N,~N");c(b,"setMad",
function(a){this.mad=a;this.setShapeVisibility(0!=a)},"~N");c(b,"setShapeVisibility",function(a){0!=(this.shapeVisibilityFlags&JM.Bond.myVisibilityFlag)!=a&&(this.atom1.addDisplayedBond(JM.Bond.myVisibilityFlag,a),this.atom2.addDisplayedBond(JM.Bond.myVisibilityFlag,a),this.shapeVisibilityFlags=a?this.shapeVisibilityFlags|JM.Bond.myVisibilityFlag:this.shapeVisibilityFlags&~JM.Bond.myVisibilityFlag)},"~B");c(b,"getIdentity",function(){return this.index+1+" "+JU.Edge.getBondOrderNumberFromOrder(this.order)+
" "+this.atom1.getInfo()+" -- "+this.atom2.getInfo()+" "+this.atom1.distance(this.atom2)});f(b,"isCovalent",function(){return 0!=(this.order&1023)});f(b,"isHydrogen",function(){return JU.Edge.isOrderH(this.order)});c(b,"isAromatic",function(){return 0!=(this.order&512)});c(b,"getEnergy",function(){return 0});c(b,"getValence",function(){return!this.isCovalent()||33==this.order?0:this.is(515)?1:this.order&7});c(b,"deleteAtomReferences",function(){null!=this.atom1&&this.atom1.deleteBond(this);null!=
this.atom2&&this.atom2.deleteBond(this);this.atom1=this.atom2=null});c(b,"setTranslucent",function(a,d){this.colix=JU.C.getColixTranslucent3(this.colix,a,d)},"~B,~N");c(b,"setOrder",function(a){16==this.atom1.getElementNumber()&&16==this.atom2.getElementNumber()&&(a|=256);512==a&&(a=515);this.order=a|this.order&131072},"~N");f(b,"getAtomIndex1",function(){return this.atom1.i});f(b,"getAtomIndex2",function(){return this.atom2.i});f(b,"getCovalentOrder",function(){return JU.Edge.getCovalentBondOrder(this.order)});
c(b,"getOtherAtom",function(a){return this.atom1===a?this.atom2:this.atom2===a?this.atom1:null},"JM.Atom");c(b,"is",function(a){return(this.order&131071)==a},"~N");f(b,"getOtherNode",function(a){return this.atom1===a?this.atom2:this.atom2===a||null==a?this.atom1:null},"JU.SimpleNode");c(b,"setAtropisomerOptions",function(){if(1<this.getCovalentOrder())return!1;var a,d=2147483647,b=this.atom1.bonds;for(a=0;a<b.length;a++){var c=b[a].getOtherAtom(this.atom1);if(c!==this.atom2)break}if(a<b.length){b=
this.atom2.bonds;for(d=0;d<b.length&&!(c=b[d].getOtherAtom(this.atom2),c!==this.atom1);d++);}if(2<a||d>=b.length||2<d)return!1;this.order=JU.Edge.getAtropismOrder(a+1,d+1);return!0});f(b,"getCIPChirality",function(){return""},"~B");f(b,"setCIPChirality",function(){},"~N");f(b,"toString",function(){return this.atom1+" - "+this.atom2});f(b,"getAtom",function(a){return 1==a?this.atom2:this.atom1},"~N");c(b,"isCovalentNotPartial0",function(){return 0!=(this.order&1023)&&33!=this.order});b.myVisibilityFlag=
JV.JC.getShapeVisibilityFlag(1)});m("JM");x(["JM.AtomCollection","JU.V3"],"JM.BondCollection","JU.AU $.BS $.Measure JM.Bond $.BondIteratorSelected $.BondSet $.HBond JU.C $.Edge".split(" "),function(){var b=s(function(){this.bo=null;this.bondCount=0;this.molecules=this.freeBonds=this.numCached=null;this.defaultCovalentMad=this.moleculeCount=0;this.bsAromatic=this.bsAromaticDouble=this.bsAromaticSingle=null;this.haveHiddenBonds=!1;this.v2=this.v1=null;this.haveAtropicBonds=!1;r(this,arguments)},JM,
"BondCollection",JM.AtomCollection);N(b,function(){this.v1=new JU.V3;this.v2=new JU.V3});c(b,"setupBC",function(){this.bsAromatic=new JU.BS;this.numCached=D(5,0);this.freeBonds=Array(5);for(var a=5;0<--a;)this.freeBonds[a]=Array(200);this.setupAC()});c(b,"releaseModelSetBC",function(){this.freeBonds=this.bo=null;this.releaseModelSetAC()});c(b,"getBondIteratorForType",function(a,d){return new JM.BondIteratorSelected(this.bo,this.bondCount,a,d,this.vwr.getBoolean(603979812))},"~N,JU.BS");c(b,"getBondIterator",
function(a){return new JM.BondIteratorSelected(this.bo,this.bondCount,131071,a,!1)},"JU.BS");c(b,"getBondColix1",function(a){return JU.C.getColixInherited(this.bo[a].colix,this.bo[a].atom1.colixAtom)},"~N");c(b,"getBondColix2",function(a){return JU.C.getColixInherited(this.bo[a].colix,this.bo[a].atom2.colixAtom)},"~N");c(b,"getBondCountInModel",function(a){for(var d=0,b=this.bondCount;0<=--b;)null!=this.bo[b]&&this.bo[b].atom1.mi==a&&d++;return d},"~N");c(b,"getBondsForSelectedAtoms",function(a,d){var b=
new JU.BS,c=a.cardinality();switch(c){case 0:return b;case 1:case 2:var e=this.at[a.nextSetBit(0)],g=2==c?this.at[a.nextSetBit(e.i+1)]:null;if(1==c||d){for(c=e.getBondCount();0<=--c;)b.set(e.bonds[c].index);if(null!=g)for(c=g.getBondCount();0<=--c;)b.set(g.bonds[c].index)}else c=e.getBond(g),null!=c&&b.set(c.index);return b}for(e=0;e<this.bondCount;++e)c=this.bo[e],null!=c&&(g=a.get(c.atom1.i),c=a.get(c.atom2.i),(d?g||c:g&&c)&&b.set(e));return b},"JU.BS,~B");c(b,"bondAtoms",function(a,d,b,c,e,g,j,
k){b=this.getOrAddBond(a,d,b,c,e,g,!0);k&&(b.order|=131072,j&&(a.group=d.group,a.group.addAtoms(a.i)));return b},"JM.Atom,JM.Atom,~N,~N,JU.BS,~N,~B,~B");c(b,"getOrAddBond",function(a,d,b,c,e,g,j){if(131071==b||65535==b)b=1;a.isBonded(d)?(a=a.getBond(d).index,j&&(this.bo[a].setOrder(b),this.bo[a].setMad(c),C(this.bo[a],"JM.HBond")&&(this.bo[a].energy=g))):(this.bondCount==this.bo.length&&(this.bo=JU.AU.arrayCopyObject(this.bo,this.bondCount+250)),a=this.setBond(this.bondCount++,this.bondMutually(a,
d,b,c,g)).index);null!=e&&e.set(a);return this.bo[a]},"JM.Atom,JM.Atom,~N,~N,JU.BS,~N,~B");c(b,"setBond",function(a,d){return this.bo[d.index=a]=d},"~N,JM.Bond");c(b,"bondMutually",function(a,d,b,c,e){b=JU.Edge.isOrderH(b)?new JM.HBond(a,d,b,c,0,e):new JM.Bond(a,d,b,c,0);this.addBondToAtom(a,b);this.addBondToAtom(d,b);return b},"JM.Atom,JM.Atom,~N,~N,~N");c(b,"addBondToAtom",function(a,d){null==a.bonds?(a.bonds=Array(1),a.bonds[0]=d):a.bonds=this.addToBonds(d,a.bonds)},"JM.Atom,JM.Bond");c(b,"addToBonds",
function(a,d){var b;if(null==d)b=0<this.numCached[1]?this.freeBonds[1][--this.numCached[1]]:Array(1),b[0]=a;else{var c=d.length;b=c+1;b=5>b&&0<this.numCached[b]?this.freeBonds[b][--this.numCached[b]]:Array(b);b[c]=a;for(var e=c;0<=--e;)b[e]=d[e];5>c&&200>this.numCached[c]&&(this.freeBonds[c][this.numCached[c]++]=d)}return b},"JM.Bond,~A");c(b,"addHBond",function(a,d,b,c){this.bondCount==this.bo.length&&(this.bo=JU.AU.arrayCopyObject(this.bo,this.bondCount+250));return this.setBond(this.bondCount++,
this.bondMutually(a,d,b,1,c)).index},"JM.Atom,JM.Atom,~N,~N");c(b,"deleteAllBonds2",function(){this.vwr.setShapeProperty(1,"reset",null);for(var a=this.bondCount;0<=--a;)null!=this.bo[a]&&(this.bo[a].deleteAtomReferences(),this.bo[a]=null);this.bondCount=0});c(b,"getDefaultMadFromOrder",function(a){return JU.Edge.isOrderH(a)?1:32768==a?w(Math.floor(2E3*this.vwr.getFloat(570425406))):this.defaultCovalentMad},"~N");c(b,"deleteConnections",function(a,d,b,c,e,g,j){var k=0>a,l=0>d,f=k||l;a=this.fixD(a,
k);d=this.fixD(d,l);var n=new JU.BS,q=0,v=b|=131072;!j&&JU.Edge.isOrderH(b)&&(b=30720);if(g)g=c;else{g=new JU.BS;for(var B=c.nextSetBit(0);0<=B;B=c.nextSetBit(B+1)){var m=this.at[B];if(null!=m.bonds)for(var r=m.bonds.length;0<=--r;)e.get(m.getBondedAtomIndex(r))&&g.set(m.bonds[r].index)}}for(B=g.nextSetBit(0);B<this.bondCount&&0<=B;B=g.nextSetBit(B+1))if(c=this.bo[B],null!=c&&this.isInRange(c.atom1,c.atom2,a,d,k,l,f)&&(j||v==(c.order&-257|131072)||0!=(b&c.order&30720)))n.set(B),q++;0<q&&this.deleteBonds(n,
!1);return D(-1,[0,q])},"~N,~N,~N,JU.BS,JU.BS,~B,~B");c(b,"fixD",function(a,d){return d?-a:a*a},"~N,~B");c(b,"isInRange",function(a,d,b,c,e,g,j){var k=a.distanceSquared(d);return j?(j=Math.sqrt(k),a=a.getBondingRadius()+d.getBondingRadius(),(e?j>=a*b:k>=b)&&(g?j<=a*c:k<=c)):k>=b&&k<=c},"JM.Atom,JM.Atom,~N,~N,~B,~B,~B");c(b,"dBb",function(a,d){if(0!=a.cardinality()){this.resetMolecules();for(var b=-1,c=a.nextSetBit(0);0<=c&&c<this.bondCount;c=a.nextSetBit(c+1)){var e=this.bo[c];if(null!=e&&a.get(c)){if(!d){var g=
e.atom1.mi;g!=b&&this.am[b=g].resetBoundCount()}e.deleteAtomReferences();this.bo[c]=null}}b=this.vwr.getShapeProperty(1,"sets");if(null!=b)for(c=0;c<b.length;c++)null!=b[c]&&b[c].andNot(a);this.bsAromatic.andNot(a)}},"JU.BS,~B");c(b,"resetAromatic",function(){for(var a=this.bondCount;0<=--a;){var d=this.bo[a];null!=d&&d.isAromatic()&&d.setOrder(515)}});c(b,"assignAromaticBondsBs",function(a,d){a||(this.bsAromatic=new JU.BS);this.bsAromaticSingle=new JU.BS;this.bsAromaticDouble=new JU.BS;for(var b=
null==d,c=b?this.bondCount-1:d.nextSetBit(0),e=c;0<=e;e=b?e-1:d.nextSetBit(e+1)){var g=this.bo[e];if(null!=g)switch(this.bsAromatic.get(e)&&g.setOrder(515),g.order&131071){case 515:if(!this.assignAromaticMustBeSingle(g.atom1)&&!this.assignAromaticMustBeSingle(g.atom2)){this.bsAromatic.set(e);break}g.order=513;case 513:this.bsAromaticSingle.set(e);break;case 514:this.bsAromaticDouble.set(e)}}for(var c=(b=null==d)?this.bondCount-1:d.nextSetBit(0),j=new JU.BS,e=c;0<=e;e=b?e-1:d.nextSetBit(e+1))if(g=
this.bo[e],!(null==g||!g.is(515)||this.bsAromaticDouble.get(e)||this.bsAromaticSingle.get(e)))if(j.set(e),8==g.atom1.getElementNumber()||8==g.atom2.getElementNumber())this.assignAromaticDouble(g)||this.assignAromaticSingle(g);for(e=j.nextSetBit(0);0<=e;e=j.nextSetBit(e+1))this.assignAromaticDouble(g=this.bo[e])||this.assignAromaticSingle(g);j=new JU.BS;for(e=c;0<=e;e=b?e-1:d.nextSetBit(e+1))if(g=this.bo[e],null!=g)if(this.bsAromaticDouble.get(e))g.is(514)||(this.bsAromatic.set(e),j.set(g.atom1.mi),
g.setOrder(this.isLinear(g,this.v1,this.v2)?3:514));else if((this.bsAromaticSingle.get(e)||g.isAromatic())&&!g.is(513))this.bsAromatic.set(e),g.setOrder(513);b=this.am;for(e=j.nextSetBit(0);0<=e;e=j.nextSetBit(e+1))b[e].isBioModel&&(b[e].isPdbWithMultipleBonds=!0);this.assignAromaticNandO(d);this.bsAromaticDouble=this.bsAromaticSingle=null},"~B,JU.BS");c(b,"isLinear",function(a,d,b){if(3==a.order)return!0;if(2!=a.atom1.getCovalentBondCount()||2!=a.atom2.getCovalentBondCount())return!1;for(var c=a.atom1.getEdges(),
e=c.length;0<=-e;)if(c[e]!==a&&c[e].isCovalent()){if(175>JU.Measure.computeAngle(c[e].getOtherNode(a.atom1),a.atom1,a.atom2,d,b,!0))return!1;break}c=a.atom2.getEdges();for(e=c.length;0<=-e;)if(c[e]!==a&&c[e].isCovalent()){if(175>JU.Measure.computeAngle(c[e].getOtherNode(a.atom2),a.atom2,a.atom1,d,b,!0))return!1;break}return!0},"JM.Bond,JU.V3,JU.V3");c(b,"assignAromaticDouble",function(a){var d=a.index;if(this.bsAromaticSingle.get(d))return!1;if(this.bsAromaticDouble.get(d))return!0;this.bsAromaticDouble.set(d);
return!this.assignAromaticSingleForAtom(a.atom1,d)||!this.assignAromaticSingleForAtom(a.atom2,d)?(this.bsAromaticDouble.clear(d),!1):!0},"JM.Bond");c(b,"assignAromaticSingle",function(a){var d=a.index;if(this.bsAromaticDouble.get(d))return!1;if(this.bsAromaticSingle.get(d))return!0;this.bsAromaticSingle.set(d);return!this.assignAromaticDoubleForAtom(a.atom1)||!this.assignAromaticDoubleForAtom(a.atom2)?(this.bsAromaticSingle.clear(d),!1):!0},"JM.Bond");c(b,"assignAromaticSingleForAtom",function(a,
d){var b=a.bonds;if(null==b)return!1;for(var c=b.length;0<=--c;){var e=b[c],g=e.index;if(!(g==d||!e.isAromatic()||this.bsAromaticSingle.get(g)))if(this.bsAromaticDouble.get(g)||!this.assignAromaticSingle(e))return!1}return!0},"JM.Atom,~N");c(b,"assignAromaticDoubleForAtom",function(a){a=a.bonds;if(null==a)return!1;for(var d=!1,b=-1,c=a.length;0<=--c;)this.bsAromaticDouble.get(a[c].index)&&(d=!0),a[c].isAromatic()&&(b=c);for(c=a.length;0<=--c;){var e=a[c],g=e.index;if(e.isAromatic()&&!this.bsAromaticDouble.get(g)&&
!this.bsAromaticSingle.get(g))if(!d&&this.assignAromaticDouble(e))d=!0;else if((d||c<b)&&!this.assignAromaticSingle(e))return!1}return d},"JM.Atom");c(b,"allowAromaticBond",function(a){if(this.assignAromaticMustBeSingle(a.atom1)||this.assignAromaticMustBeSingle(a.atom2))return!1;switch(a.getCovalentOrder()){case 1:case 2:return 3>=a.atom1.getCovalentBondCount()&&3>=a.atom2.getCovalentBondCount();default:return!1}},"JM.Bond");c(b,"assignAromaticMustBeSingle",function(a){var d=a.getElementNumber();
switch(d){case 6:case 7:case 8:case 16:break;default:return!0}var b=a.getValenceAromatic(!1);switch(d){case 6:return 4==b;case 7:return a.group.getNitrogenAtom()===a||3==b&&1>a.getFormalCharge();case 8:return a.group.getCarbonylOxygenAtom()!==a&&2==b&&1>a.getFormalCharge();case 16:return 5==a.group.groupID||2==b&&1>a.getFormalCharge()}return!1},"JM.Atom");c(b,"assignAromaticNandO",function(a){for(var d,b=null==a,c=b?this.bondCount-1:a.nextSetBit(0);0<=c;c=b?c-1:a.nextSetBit(c+1))if(d=this.bo[c],null!=
d&&d.is(513)){var e,g=d.atom2,j,k=g.getElementNumber();7==k||8==k?(j=k,e=g,g=d.atom1,k=g.getElementNumber()):(e=d.atom1,j=e.getElementNumber());if(!(7!=j&&8!=j)){var l=e.getValence();if(!(0>l)){var f=e.getCovalentBondCount();e=e.getFormalCharge();switch(j){case 7:3==l&&(3==f&&1>e&&6==k&&3==g.getValence())&&d.setOrder(514);break;case 8:1==l&&(0==e&&(14==k||16==k))&&d.setOrder(514)}}}}},"JU.BS");c(b,"getAtomBitsMDb",function(a,d){var b=new JU.BS;switch(a){default:return this.getAtomBitsMDa(a,d,b);case 1677721602:for(var c=
d.nextSetBit(0);0<=c;c=d.nextSetBit(c+1))c<this.bondCount&&null!=this.bo[c]?(b.set(this.bo[c].atom1.i),b.set(this.bo[c].atom2.i)):d.clear(c);return b;case 1073742331:for(c=this.bondCount;0<=--c;)null!=this.bo[c]&&this.bo[c].isAromatic()&&(b.set(this.bo[c].atom1.i),b.set(this.bo[c].atom2.i));return b}},"~N,~O");c(b,"removeUnnecessaryBonds",function(a,d){var b=new JU.BS,c=new JU.BS,e=a.bonds;if(null!=e){for(var g=0;g<e.length;g++)e[g].isCovalent()?1==e[g].getOtherAtom(a).getElementNumber()&&b.set(e[g].getOtherAtom(a).i):
c.set(e[g].index);0<=c.nextSetBit(0)&&this.deleteBonds(c,!1);d&&b.set(a.i);0<=b.nextSetBit(0)&&this.vwr.deleteAtoms(b,!1)}},"JM.Atom,~B");c(b,"displayBonds",function(a,d){d||(this.haveHiddenBonds=!0);for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))b<this.bondCount&&(null!=this.bo[b]&&0!=this.bo[b].mad)&&this.bo[b].setShapeVisibility(d)},"JM.BondSet,~B");c(b,"getAtomsConnected",function(a,d,b,c){for(var e=C(c,"JM.BondSet"),g=e?new JM.BondSet:new JU.BS,j=D(this.ac,0),k,l=30720==b,f=65535==b,n=0;n<
this.bondCount;n++){var q=this.bo[n];if(null!=q&&(f||q.is(b)||l&&q.isHydrogen()))e?g.set(n):(c.get(q.atom1.i)&&(j[k=q.atom2.i]++,g.set(k)),c.get(q.atom2.i)&&(j[k=q.atom1.i]++,g.set(k)))}if(e)return g;b=0==a;for(k=this.ac;0<=--k;)c=j[k],null==this.at[k]||c<a||c>d?g.clear(k):b&&0==c&&g.set(k);return g},"~N,~N,~N,JU.BS");c(b,"addConnectedHAtoms",function(a,d){if(null!=a.bonds)for(var b=a.bonds.length;0<=--b;){var c=a.bonds[b].getOtherAtom(a);1==c.getElementNumber()&&d.set(c.i)}},"JM.Atom,JU.BS")});m("JM");
I(JM,"BondIterator");m("JM");x(["JM.BondIterator"],"JM.BondIteratorSelected",null,function(){var b=s(function(){this.bonds=null;this.iBond=this.bondType=this.bondCount=0;this.bsSelected=null;this.bondSelectionModeOr=!1;r(this,arguments)},JM,"BondIteratorSelected",null,JM.BondIterator);u(b,function(a,d,b,c,e){this.bonds=a;this.bondCount=d;this.bondType=b;this.bsSelected=c;this.bondSelectionModeOr=e},"~A,~N,~N,JU.BS,~B");f(b,"hasNext",function(){if(131071==this.bondType)return this.iBond=this.bsSelected.nextSetBit(this.iBond),
0<=this.iBond&&this.iBond<this.bondCount;for(;this.iBond<this.bondCount;++this.iBond){var a=this.bonds[this.iBond];if(!(null==a||65535!=this.bondType&&0==(a.order&this.bondType))&&!(65535==this.bondType&&32768==a.order)){var d=this.bsSelected.get(a.atom1.i),a=this.bsSelected.get(a.atom2.i);if(!this.bondSelectionModeOr&&d&&a||this.bondSelectionModeOr&&(d||a))return!0}}return!1});f(b,"nextIndex",function(){return this.iBond});f(b,"next",function(){return this.bonds[this.iBond++]})});m("JM");x(["JU.BS"],
"JM.BondSet",["JU.BSUtil"],function(){var b=s(function(){this.associatedAtoms=null;r(this,arguments)},JM,"BondSet",JU.BS);u(b,function(){K(this,JM.BondSet,[])});b.newBS=c(b,"newBS",function(a){var d=new JM.BondSet;JU.BSUtil.copy2(a,d);return d},"JU.BS");c(b,"getAssociatedAtoms",function(a){null==this.associatedAtoms&&(this.associatedAtoms=a.getAtomIndices(a.getAtoms(1677721602,this)));return this.associatedAtoms},"JM.ModelSet")});m("JM");x(["JM.Structure"],"JM.Chain",["JU.AU"],function(){var b=s(function(){this.model=
null;this.chainNo=this.chainID=0;this.groups=null;this.selectedGroupCount=this.groupCount=0;r(this,arguments)},JM,"Chain",null,JM.Structure);u(b,function(a,d,b){this.model=a;this.chainID=d;this.chainNo=b;this.groups=Array(16)},"JM.Model,~N,~N");c(b,"getIDStr",function(){return 0==this.chainID?"":256>this.chainID?""+String.fromCharCode(this.chainID):this.model.ms.vwr.getChainIDStr(this.chainID)});c(b,"calcSelectedGroupsCount",function(a){for(var d=this.selectedGroupCount=0;d<this.groupCount;d++)this.groups[d].selectedIndex=
this.groups[d].isSelected(a)?this.selectedGroupCount++:-1},"JU.BS");c(b,"fixIndices",function(a,d){for(var b=0;b<this.groupCount;b++)this.groups[b].fixIndices(a,d)},"~N,JU.BS");f(b,"setAtomBits",function(a){for(var d=0;d<this.groupCount;d++)this.groups[d].setAtomBits(a)},"JU.BS");f(b,"setAtomBitsAndClear",function(a,d){for(var b=0;b<this.groupCount;b++)this.groups[b].setAtomBitsAndClear(a,d)},"JU.BS,JU.BS");c(b,"addGroup",function(a,d){this.groupCount==this.groups.length&&(this.groups=JU.AU.doubleLength(this.groups));
this.groups[this.groupCount++]=a;a.groupIndex=d;return a},"JM.Group,~N")});m("JM");x(["JM.Structure","java.lang.Short","JV.JC"],"JM.Group","java.util.Hashtable JU.BS $.Quat J.c.STR JU.BSUtil $.Escape $.Logger $.Point3fi".split(" "),function(){var b=s(function(){this.chain=null;this.groupIndex=0;this.group1="\x00";this.leadAtomIndex=this.firstAtomIndex=-1;this.lastAtomIndex=0;this.bsAdded=null;this.shapeVisibilityFlags=this.selectedIndex=this.groupID=this.seqcode=0;this.unitID=this.strutPoint=this.dssrNT=
null;r(this,arguments)},JM,"Group",null,JM.Structure);c(b,"setGroup",function(a,d,b,c,e){this.chain=a;this.seqcode=b;this.firstAtomIndex=c;this.lastAtomIndex=e;null!=d&&0<d.length&&this.setGroupID(d);return this},"JM.Chain,~S,~N,~N,~N");c(b,"setGroupID",function(){},"~S");c(b,"isAdded",function(a){return null!=this.bsAdded&&this.bsAdded.get(a)},"~N");c(b,"addAtoms",function(a){null==this.bsAdded&&(this.bsAdded=new JU.BS);this.bsAdded.set(a)},"~N");f(b,"setAtomBits",function(a){a.setBits(this.firstAtomIndex,
this.lastAtomIndex+1);null!=this.bsAdded&&a.or(this.bsAdded)},"JU.BS");f(b,"setAtomBitsAndClear",function(a,d){a.setBits(this.firstAtomIndex,this.lastAtomIndex+1);d.clearBits(this.firstAtomIndex,this.lastAtomIndex+1);null!=this.bsAdded&&(a.or(this.bsAdded),d.andNot(this.bsAdded))},"JU.BS,JU.BS");c(b,"isSelected",function(a){var d=a.nextSetBit(this.firstAtomIndex);return 0<=d&&d<=this.lastAtomIndex||null!=this.bsAdded&&this.bsAdded.intersects(a)},"JU.BS");c(b,"setShapeVisibility",function(a,d){this.shapeVisibilityFlags=
d?this.shapeVisibilityFlags|a:this.shapeVisibilityFlags&~a},"~N,~B");c(b,"getGroup3",function(){return 1>this.groupID?"":JM.Group.group3Names[this.groupID]});c(b,"getGroup1",function(){return"\x00"==this.group1?"?":this.group1});c(b,"getBioPolymerLength",function(){return 0});c(b,"getMonomerIndex",function(){return-1});c(b,"getStructure",function(){return null});c(b,"getStrucNo",function(){return 0});c(b,"getBioStructureType",function(){return J.c.STR.NOT});c(b,"getBioStructureSubType",function(){return this.getBioStructureType()},
"~N");c(b,"setDSSRStructureSubType",function(){},"J.c.STR");c(b,"setProteinStructureType",function(){return-1},"J.c.STR,~N");c(b,"isProtein",function(){return 1<=this.groupID&&24>this.groupID});c(b,"isNucleic",function(){return 24<=this.groupID&&42>this.groupID});c(b,"isDna",function(){return this.isDnaByID()});c(b,"isRna",function(){return this.isRnaByID()});c(b,"isPurine",function(){return this.isPurineByID()});c(b,"isPurineByID",function(){return this.isNucleic()&&0!=(153957&1<<this.groupID-24)||
0<="AGag".indexOf(this.getGroup1())});c(b,"isPyrimidine",function(){return this.isPyrimidineByID()});c(b,"isPyrimidineByID",function(){return this.isNucleic()&&0!=(108186&1<<this.groupID-24)});c(b,"isRnaByID",function(){return this.isNucleic()&&0!=(196663&1<<this.groupID-24)});c(b,"isDnaByID",function(){return this.isNucleic()&&0!=(65480&1<<this.groupID-24)});c(b,"isCarbohydrate",function(){return!1});c(b,"getResno",function(){return-2147483648==this.seqcode?0:this.seqcode>>8});c(b,"setResno",function(a){this.seqcode=
JM.Group.getSeqcodeFor(a,this.getInsertionCode())},"~N");b.getSeqNumberFor=c(b,"getSeqNumberFor",function(a){return JM.Group.haveSequenceNumber(a)?a>>8:2147483647},"~N");b.haveSequenceNumber=c(b,"haveSequenceNumber",function(a){return 0!=(a&128)},"~N");c(b,"getSeqcodeString",function(){return JM.Group.getSeqcodeStringFor(this.seqcode)});b.getSeqcodeFor=c(b,"getSeqcodeFor",function(a,d){if(-2147483648==a)return a;"A"<=d&&"Z">=d||("a"<=d&&"z">=d||"0"<=d&&"9">=d||"?"==d||"*"==d)||(" "!=d&&"\x00"!=d&&
JU.Logger.warn("unrecognized insertionCode:"+d),d="\x00");return(2147483647==a?0:a<<8|128)+d.charCodeAt(0)},"~N,~S");b.getSeqcodeStringFor=c(b,"getSeqcodeStringFor",function(a){if(-2147483648==a)return null;var d=""+(a>>8);0!=(a&127)&&(d+="^"+String.fromCharCode(a&127));return d},"~N");c(b,"getInsertionCode",function(){return-2147483648==this.seqcode?"\x00":String.fromCharCode(this.seqcode&127)});c(b,"getInsCode",function(){return this.seqcode&127});b.getInsertionCodeFor=c(b,"getInsertionCodeFor",
function(a){return a&127},"~N");b.getInsertionCodeChar=c(b,"getInsertionCodeChar",function(a){return-2147483648==a?"\x00":String.fromCharCode(a&127)},"~N");c(b,"scaleToScreen",function(a,d){return this.chain.model.ms.vwr.tm.scaleToScreen(a,d)},"~N,~N");c(b,"isCursorOnTopOf",function(a,d,b,c,e){return this.chain.model.ms.isCursorOnTopOf(a,d,b,c,e)},"JM.Atom,~N,~N,~N,JM.Atom");c(b,"getModel",function(){return this.chain.model});c(b,"getSelectedMonomerCount",function(){return 0});c(b,"getSelectedMonomerIndex",
function(){return-1});c(b,"isLeadAtom",function(){return!1},"~N");c(b,"getLeadAtom",function(){return null});c(b,"getLeadAtomOr",function(a){var d=this.getLeadAtom();return null==d?a:d},"JM.Atom");c(b,"getLeadOrFirstAtomIndex",function(){return null==this.getLeadAtom()?this.firstAtomIndex:this.leadAtomIndex});c(b,"getQuaternion",function(){return null},"~S");c(b,"getQuaternionFrame",function(a){if(3>this.lastAtomIndex-this.firstAtomIndex)return null;var d=this.firstAtomIndex;return JU.Quat.getQuaternionFrame(a[d],
a[++d],a[++d])},"~A");c(b,"setStrucNo",function(){},"~N");c(b,"getHelixData",function(a){return JU.Escape.escapeHelical(null,a,null,null,null)},"~N,~S,~N");c(b,"isWithinStructure",function(){return!1},"J.c.STR");c(b,"getProteinStructureTag",function(){return null});c(b,"getStructureId",function(){return""});c(b,"getBioPolymerIndexInModel",function(){return-1});c(b,"isCrossLinked",function(){return!1},"JM.Group");c(b,"getCrossLinkVector",function(){return!1},"JU.Lst,~B,~B");c(b,"getNitrogenAtom",function(){return null});
c(b,"getCarbonylOxygenAtom",function(){return null});c(b,"fixIndices",function(a,d){this.firstAtomIndex-=a;this.leadAtomIndex-=a;this.lastAtomIndex-=a;null!=this.bsAdded&&JU.BSUtil.deleteBits(this.bsAdded,d)},"~N,JU.BS");c(b,"getGroupInfo",function(a,d){var b=new java.util.Hashtable;b.put("groupIndex",Integer.$valueOf(a));b.put("groupID",Short.$valueOf(this.groupID));var c=this.getSeqcodeString();null!=c&&b.put("seqCode",c);b.put("_apt1",Integer.$valueOf(this.firstAtomIndex));b.put("_apt2",Integer.$valueOf(this.lastAtomIndex));
null!=this.bsAdded&&b.put("addedAtoms",this.bsAdded);b.put("atomInfo1",this.chain.model.ms.getAtomInfo(this.firstAtomIndex,null,d));b.put("atomInfo2",this.chain.model.ms.getAtomInfo(this.lastAtomIndex,null,d));b.put("visibilityFlags",Integer.$valueOf(this.shapeVisibilityFlags));return b},"~N,JU.P3");c(b,"getMinZ",function(a,d){d[0]=2147483647;for(var b=this.firstAtomIndex;b<=this.lastAtomIndex;b++)this.checkMinZ(a[b],d);if(null!=this.bsAdded)for(b=this.bsAdded.nextSetBit(0);0<=b;b=this.bsAdded.nextSetBit(b+
1))this.checkMinZ(a[b],d)},"~A,~A");c(b,"checkMinZ",function(a,d){var b=a.sZ-w(a.sD/2)-2;b<d[0]&&(d[0]=Math.max(1,b))},"JM.Atom,~A");c(b,"getGroupParameter",function(){return NaN},"~N");c(b,"getAtomIndex",function(){return-1},"~S,~N");c(b,"getBSSideChain",function(){return new JU.BS});f(b,"toString",function(){return"["+this.getGroup3()+"-"+this.getSeqcodeString()+"]"});c(b,"isNucleicMonomer",function(){return!1});c(b,"unsetStrutPoint",function(){null==this.strutPoint&&(this.strutPoint=new JU.Point3fi);
this.strutPoint.sX=-2147483648});c(b,"getUnitID",function(){if(null==this.unitID){var a=this.getLeadOrFirstAtomIndex();this.unitID=this.chain.model.ms.at[a].getUnitID(2)}return this.unitID});b.standardGroupList=null;b.group3Names=Array(128);b.specialAtomNames=null});m("JM");x(["JM.Bond"],"JM.HBond",["JU.Logger"],function(){var b=s(function(){this.energy=0;r(this,arguments)},JM,"HBond",JM.Bond);u(b,function(a,d,b,c,e,g){K(this,JM.HBond,[a,d,b,c,e]);this.energy=g;JU.Logger.debugging&&JU.Logger.debug("HBond energy = "+
g+" #"+this.getIdentity())},"JM.Atom,JM.Atom,~N,~N,~N,~N");f(b,"getEnergy",function(){return this.energy});b.calcEnergy=c(b,"calcEnergy",function(a,d,b,c){return Math.round(-27888/a- -27888/c+-27888/b- -27888/d)},"~N,~N,~N,~N")});m("JM");x(null,"JM.LabelToken","java.util.Hashtable JU.AU $.PT $.SB JS.SV $.T JU.Edge JV.JC".split(" "),function(){var b=s(function(){this.data=this.key=this.text=null;this.tok=0;this.pt=-1;this.ch1="\x00";this.width=0;this.precision=2147483647;this.intAsFloat=this.zeroPad=
this.alignLeft=!1;r(this,arguments)},JM,"LabelToken",null);c(b,"set",function(a,d){this.text=a;this.pt=d;return this},"~S,~N");b.isLabelPropertyTok=c(b,"isLabelPropertyTok",function(a){for(var d=JM.LabelToken.labelTokenIds.length;0<=--d;)if(JM.LabelToken.labelTokenIds[d]==a)return!0;return!1},"~N");b.compile=c(b,"compile",function(a,d,b,c){if(null==d||0==d.length)return null;if(0>d.indexOf("%")||2>d.length)return z(-1,[(new JM.LabelToken).set(d,-1)]);for(var e=0,g=-1,j=d.length;++g<j&&0<=(g=d.indexOf("%",
g));)e++;for(var e=Array(2*e+1),k,l=0,g=0;0<=(k=d.indexOf("%",g));)g!=k&&(e[l++]=(new JM.LabelToken).set(d.substring(g,k),-1)),g=e[l++]=(new JM.LabelToken).set(null,k),a.autoCalculate(g.tok,null),g=JM.LabelToken.setToken(a,d,g,j,b.charCodeAt(0),c);g<j&&(e[l++]=(new JM.LabelToken).set(d.substring(g),-1));return e},"JV.Viewer,~S,~S,java.util.Map");c(b,"formatLabel",function(a,d,b,c){return null==b||0==b.length?null:JM.LabelToken.formatLabelAtomArray(a,d,JM.LabelToken.compile(a,b,"\x00",null),"\x00",
null,c)},"JV.Viewer,JM.Atom,~S,JU.P3");b.formatLabelAtomArray=c(b,"formatLabelAtomArray",function(a,d,b,c,e,g){if(null==d)return null;var j="0"<c?null:new JU.SB;if(null!=b)for(var k=0;k<b.length;k++){var l=b[k];if(null==l)break;"0"<c&&l.ch1!=c||(0>=l.tok||null!=l.key?null!=j&&(j.append(l.text),"\x00"!=l.ch1&&j.appendC(l.ch1)):JM.LabelToken.appendAtomTokenValue(a,d,l,j,e,g))}return null==j?null:j.toString().intern()},"JV.Viewer,JM.Atom,~A,~S,~A,JU.P3");b.getBondLabelValues=c(b,"getBondLabelValues",
function(){var a=new java.util.Hashtable;a.put("#","");a.put("ORDER","");a.put("TYPE","");a.put("LENGTH",Float.$valueOf(0));a.put("ENERGY",Float.$valueOf(0));return a});b.formatLabelBond=c(b,"formatLabelBond",function(a,d,b,c,e,g){c.put("#",""+(d.index+1));c.put("ORDER",""+JU.Edge.getBondOrderNumberFromOrder(d.order));c.put("TYPE",JU.Edge.getBondOrderNameFromOrder(d.order));c.put("LENGTH",Float.$valueOf(d.atom1.distance(d.atom2)));c.put("ENERGY",Float.$valueOf(d.getEnergy()));JM.LabelToken.setValues(b,
c);JM.LabelToken.formatLabelAtomArray(a,d.atom1,b,"1",e,g);JM.LabelToken.formatLabelAtomArray(a,d.atom2,b,"2",e,g);return JM.LabelToken.getLabel(b)},"JV.Viewer,JM.Bond,~A,java.util.Map,~A,JU.P3");b.formatLabelMeasure=c(b,"formatLabelMeasure",function(a,d,b,c,e){var g=new java.util.Hashtable;g.put("#",""+(d.index+1));g.put("VALUE",Float.$valueOf(c));g.put("UNITS",e);b=JM.LabelToken.compile(a,b,"\u0001",g);if(null==b)return"";JM.LabelToken.setValues(b,g);g=d.ms.at;d=d.countPlusIndices;for(c=d[0];1<=
c;--c)0<=d[c]&&JM.LabelToken.formatLabelAtomArray(a,g[d[c]],b,String.fromCharCode(48+c),null,null);b=JM.LabelToken.getLabel(b);return null==b?"":b},"JV.Viewer,JM.Measurement,~S,~N,~S");b.setValues=c(b,"setValues",function(a,d){for(var b=0;b<a.length;b++){var c=a[b];if(null==c)break;if(null!=c.key){var e=d.get(c.key);c.text=C(e,Float)?c.format(e.floatValue(),null,null):c.format(NaN,e,null)}}},"~A,java.util.Map");b.getLabel=c(b,"getLabel",function(a){for(var d=new JU.SB,b=0;b<a.length;b++){var c=a[b];
if(null==c)break;d.append(c.text)}return d.toString()},"~A");b.setToken=c(b,"setToken",function(a,d,b,c,e,g){var j=b.pt+1;if(j>=c)return b.text="%",j;var k;"-"==d.charAt(j)&&(b.alignLeft=!0,++j);j<c&&"0"==d.charAt(j)&&(b.zeroPad=!0,++j);for(;j<c&&JU.PT.isDigit(k=d.charAt(j));)b.width=10*b.width+(k.charCodeAt(0)-48),++j;b.precision=2147483647;var l=!1;if(j<c&&"."==d.charAt(j)){++j;if(j<c&&"-"==(k=d.charAt(j)))l=!0,++j;if(j<c&&JU.PT.isDigit(k=d.charAt(j))){++j;b.precision=k.charCodeAt(0)-48;if(j<c&&
JU.PT.isDigit(k=d.charAt(j)))++j,b.precision=10*b.precision+(k.charCodeAt(0)-48);l&&(b.precision=-1-b.precision)}}if(j<c&&null!=g){var f;for(g=g.keySet().iterator();g.hasNext()&&((f=g.next())||1);)if(d.indexOf(f,j)==j)return j+(b.key=f).length}if(j<c)switch((k=d.charAt(j++)).charCodeAt(0)){case 37:return b.text="%",j;case 91:f=d.indexOf("]",j);if(f<j){j=c;break}j=d.substring(j,f).toLowerCase();j.startsWith("property_")?(b.tok=134221834,b.data=a.getDataObj(j,null,1)):j.startsWith("validation.")?(b.tok=
1073742189,b.data=a.getDataObj("property_"+j.substring(11),null,1)):j.startsWith("unitid")?(b.tok=1073741974,b.data=Integer.$valueOf(JV.JC.getUnitIDFlags(j.substring(6)))):(a=JS.T.getTokenFromName(j),null!=a&&JM.LabelToken.isLabelPropertyTok(a.tok)&&(b.tok=a.tok));j=f+1;break;case 123:f=d.indexOf("}",j);if(f<j){j=c;break}j=d.substring(j,f);b.data=a.getDataObj(j,null,1);null==b.data?(b.data=a.getDataObj(j,null,-1),null!=b.data&&(b.data=b.data[1],"string"==typeof b.data&&(b.data=JU.PT.split(b.data,
"\n")),JU.AU.isAS(b.data)||(b.data=null)),null==b.data?(b.tok=1715472409,b.data=j):b.tok=1275068418):b.tok=134221834;j=f+1;break;default:var n,q;if(j<c&&0<=(n="fuv".indexOf(k))&&0<=(q="xyz".indexOf(d.charAt(j))))b.tok=JM.LabelToken.twoCharLabelTokenIds[3*n+q],j++;else if(0<=(n="AaBbCcDEefGgIiLlMmNnOoPpQqRrSsTtUuVvWwXxxYyyZzz%%%gqW".indexOf(k)))b.tok=JM.LabelToken.labelTokenIds[n]}b.text=d.substring(b.pt,j);if(j<c&&0!=e&&JU.PT.isDigit(k=d.charAt(j)))j++,b.ch1=k,k.charCodeAt(0)!=e&&1!=e&&(b.tok=0);
return j},"JV.Viewer,~S,JM.LabelToken,~N,~N,java.util.Map");b.appendAtomTokenValue=c(b,"appendAtomTokenValue",function(a,d,b,c,e,g){var j=null,k=NaN,l=null;try{switch(b.tok){case 1153433601:j=d.atomPropertyString(a,1153433601);break;case 1094713347:j=""+(null==e?d.i:e[d.i]);break;case 1765808134:l=d.atomPropertyTuple(a,b.tok,g);break;case 1073741974:j=d.getUnitID(b.data.intValue());break;case 134221834:case 1073742189:if(null!=b.data&&(k=b.data[d.i],1073742189==b.tok&&1!=k&&0!=k)){var f=a.getAtomValidation(b.text.substring(13,
b.text.length-1),d);if(null==f)System.out.println("?? o is null ??");else if(1==f.size())k=f.get(0).floatValue();else{k=NaN;j="";a=0;for(var n=f.size();a<n;a++)j+=","+f.get(a);1<j.length&&(j=j.substring(1))}}break;case 1715472409:var q=a.ms.getInfo(d.mi,b.data),v=d.i-a.ms.am[d.mi].firstAtomIndex,f=null;if(0<=v)if(C(q,Array))var B=q,f=v<B.length?B[v]:null;else C(q,"JU.Lst")&&(f=v<q.size()?JS.SV.oValue(q.get(v)):null);null==f?j="":C(f,Float)?k=f.floatValue():C(f,Integer)?k=f.intValue():C(f,"JU.T3")?
l=f:j=f.toString();break;case 1275068418:null!=b.data&&(B=b.data,j=d.i<B.length?B[d.i]:"");break;case 1631586315:var m=d.getFormalCharge(),j=0<m?""+m+"+":0>m?""+-m+"-":"";break;case 1094717454:j=d.getModelNumberForLabel();break;case 1128269825:j=""+d.atomPropertyInt(a,b.tok);break;case 1665140738:k=d.atomPropertyFloat(a,b.tok,g);break;case 1086324749:j=d.group.getStructureId();break;case 1094713370:var r=d.group.getStrucNo(),j=0>=r?"":""+r;break;case 1111490574:if(Float.isNaN(k=d.group.getGroupParameter(1111490574)))j=
"null";break;case 1111492626:case 1111492627:case 1111492628:case 1111490583:case 1111490584:case 1111490585:case 1111490586:k=d.atomPropertyFloat(a,b.tok,g);Float.isNaN(k)&&(j="");break;case 1073877011:j=a.getNBOAtomLabel(d);break;case 1086324747:case 1639976963:case 1237320707:j=d.atomPropertyString(a,b.tok);break;case 1140850705:j=d.getIdentityXYZ(g,1);break;case 1086324754:j=d.getWyckoffPosition(!1);break;case 1086324755:j=d.getWyckoffPosition(!0);break;case 79:j=d.getSymmetryOperatorList(!1);
break;case 81:k=d.getOccupancy100()/100;break;default:switch(b.tok&1136656384){case 1094713344:b.intAsFloat?k=d.atomPropertyInt(a,b.tok):j=""+d.atomPropertyInt(a,b.tok);break;case 1111490560:k=d.atomPropertyFloat(a,b.tok,g);break;case 1086324736:j=d.atomPropertyString(a,b.tok);break;case 1077936128:l=d.atomPropertyTuple(a,b.tok,g);null==l&&(j="");break;default:1145045003==b.tok&&(j=d.atomPropertyString(a,1145045003))}}}catch(s){if(E(s,"IndexOutOfBoundsException"))k=NaN,l=j=null;else throw s;}j=b.format(k,
j,l);null==c?b.text=j:c.append(j)},"JV.Viewer,JM.Atom,JM.LabelToken,JU.SB,~A,JU.P3");c(b,"format",function(a,d,b){return Float.isNaN(a)?null!=d?JU.PT.formatS(d,this.width,this.precision,this.alignLeft,this.zeroPad):null!=b?(0==this.width&&2147483647==this.precision&&(this.width=6,this.precision=2),JU.PT.formatF(b.x,this.width,this.precision,!1,!1)+JU.PT.formatF(b.y,this.width,this.precision,!1,!1)+JU.PT.formatF(b.z,this.width,this.precision,!1,!1)):this.text:JU.PT.formatF(a,this.width,this.precision,
this.alignLeft,this.zeroPad)},"~N,~S,JU.T3");b.labelTokenIds=D(-1,[1086324739,1086326786,1086326785,1111492620,1631586315,1086326788,1094713347,1086324746,1086326789,1111490569,1094713357,1094713361,1111492618,1094715393,1094713363,1094715402,1094717454,1086324743,1094713360,1086324742,79,1088421903,1111492619,1111490570,81,1128269825,1094715412,1086324747,1094713369,1086326788,1111490574,1111492620,1086324745,1111490575,1648363544,1145047055,1140850705,1086324755,1111492612,1111492609,1111492629,
1111492613,1111492610,1111492630,1111492614,1111492611,1111492631,1114249217,1112152066,1112150019,1112150020,1112150021,1112152070,1112152071,1112152073,1112152074,1112152076,1649022989,1112152078,1111490561,1111490562,1153433601,1094713346,1228931586,1765808134,1094713356,1111490564,1228935687,1287653388,1825200146,1111490567,1094713359,1111490565,1111490568,1094713362,1715472409,1665140738,1113589787,1086324748,1086324744,1112152075,1639976963,1237320707,1094713370,1086324749,1086326798,1111490576,
1111490577,1111490578,1111490579,1094715420,1648361473,1111492626,1111492627,1111492628,1312817669,1145045006,1145047050,1145047049,1145047053,1111492615,1111492616,1111492617,1113589786,1094713365,1094713366,1094713367,1145047052,1111490566,1111490563,1094713351,1094713368,1111490583,1111490584,1111490585,1111490586,1145045008,1296041986,1073877011,1086324752,1086324753,1086324754,1145045003,1095241729]);b.twoCharLabelTokenIds=D(-1,[1111492612,1111492613,1111492614,1111490577,1111490578,1111490579,
1111492626,1111492627,1111492628])});m("JM");x(null,"JM.Measurement","JU.Measure $.PT $.SB J.atomdata.RadiusData J.c.VDW JM.LabelToken JU.Escape".split(" "),function(){var b=s(function(){this.thisID=this.ms=null;this.index=0;this.isVisible=!0;this.isTrajectory=this.isHidden=!1;this.$isValid=!0;this.colix=0;this.labelColix=-1;this.mad=0;this.tickInfo=null;this.traceX=-2147483648;this.count=this.traceY=0;this.pts=this.countPlusIndices=null;this.value=0;this.renderArc=this.renderAxis=this.type=this.strMeasurement=
this.vwr=this.text=this.units=this.strFormat=this.property=null;this.fixedValue=NaN;this.inFront=!1;this.modelIndex=0;this.useDefaultLabel=this.tainted=this.isPending=!1;this.newUnits=null;r(this,arguments)},JM,"Measurement",null);N(b,function(){this.countPlusIndices=D(5,0)});c(b,"isTainted",function(){return this.tainted&&!(this.tainted=!1)});c(b,"setM",function(a,d,b,c,e,g){this.ms=a;this.index=g;this.vwr=a.vwr;this.colix=c;this.strFormat=e;null!=d&&(this.modelIndex=d.modelIndex,this.tickInfo=d.tickInfo,
this.pts=d.pts,this.mad=d.mad,this.thisID=d.thisID,this.text=d.text,this.property=d.property,this.units=d.units,null==this.property&&"+hz".equals(this.units)&&(this.property="property_J"),null!=this.thisID&&null!=this.text&&(this.labelColix=this.text.colix));null==this.pts&&(this.pts=Array(4));d=null==d?null:d.countPlusIndices;this.count=null==d?0:d[0];0<this.count&&(System.arraycopy(d,0,this.countPlusIndices,0,this.count+1),this.isTrajectory=a.isTrajectoryMeasurement(this.countPlusIndices));this.value=
(this.isPending=Float.isNaN(b))||this.isTrajectory?this.getMeasurement(null):b;this.formatMeasurement(null);return this},"JM.ModelSet,JM.Measurement,~N,~N,~S,~N");c(b,"setPoints",function(a,d,b,c){this.ms=a;this.countPlusIndices=d;this.count=d[0];this.pts=null==b?Array(4):b;this.vwr=a.vwr;this.tickInfo=c;return this},"JM.ModelSet,~A,~A,JM.TickInfo");c(b,"setCount",function(a){this.setCountM(a)},"~N");c(b,"setCountM",function(a){this.count=this.countPlusIndices[0]=a},"~N");c(b,"getAtomIndex",function(a){return 0<
a&&a<=this.count?this.countPlusIndices[a]:-1},"~N");c(b,"getAtom",function(a){a=this.countPlusIndices[a];return-1>a?this.pts[-2-a]:this.ms.at[a]},"~N");c(b,"getLastIndex",function(){return 0<this.count?this.countPlusIndices[this.count]:-1});c(b,"getString",function(){return this.strMeasurement});f(b,"toString",function(){return this.getString()});c(b,"getStringUsing",function(a,d,b){this.vwr=a;this.value=this.getMeasurement(null);this.formatMeasurementAs(d,b,!0);return null==d?this.getInfoAsString(b):
this.strMeasurement},"JV.Viewer,~S,~S");c(b,"getStringDetail",function(){return(2==this.count?"Distance":3==this.count?"Angle":"Torsion")+this.getMeasurementScript(" - ",!1)+" : "+this.value});c(b,"refresh",function(a){this.value=this.getMeasurement(a);this.isTrajectory=this.ms.isTrajectoryMeasurement(this.countPlusIndices);this.formatMeasurement(null)},"~A");c(b,"getMeasurementScript",function(a,d){for(var b=new JU.SB,c=a.equals(" "),e=1;e<=this.count;e++)b.append(1<e?a:" ").append(this.getLabel(e,
c,d));return b.toString()},"~S,~B");c(b,"formatMeasurementAs",function(a,d,b){null!=a&&0==a.length&&(a=null);if(b||!(null!=a&&0!=a.indexOf(this.countPlusIndices[0]+":")))this.strFormat=a,this.formatMeasurement(d)},"~S,~S,~B");c(b,"formatMeasurement",function(a){this.tainted=!0;switch(Float.isNaN(this.value)?0:this.count){default:this.strMeasurement=null;break;case 2:this.strMeasurement=this.formatDistance(a);break;case 3:case 4:this.strMeasurement=this.formatAngle(this.value)}},"~S");c(b,"reformatDistanceIfSelected",
function(a){if(2==this.count&&this.vwr.slm.isSelected(this.countPlusIndices[1])&&this.vwr.slm.isSelected(this.countPlusIndices[2])){var d;if(this.useDefaultLabel&&null!=this.strFormat&&0<=(d=this.strFormat.indexOf("//")))this.strFormat=this.strFormat.substring(0,d);a&&(this.units=null);this.formatMeasurement(null)}},"~B");c(b,"formatDistance",function(a){var d=this.getLabelString();if(null==d)return"";var b=this.strFormat.indexOf("//");null==a&&(a=this.units,null==a&&(a=0<=b?this.strFormat.substring(b+
2):null==this.property?this.vwr.g.measureDistanceUnits:""));0<=b&&(this.strFormat=this.strFormat.substring(0,b));this.strFormat+="//"+a;a=JM.Measurement.fixUnits(a);b=d.indexOf("//");0<=b&&(d=d.substring(0,b),0==d.length&&(d="%VALUE"));a=this.fixValue(a,0<=d.indexOf("%V"));return this.formatString(a,this.newUnits,d)},"~S");c(b,"fixValue",function(a,d){this.checkJ(a);null!=a&&a.startsWith("+")&&(this.isPending||(this.value=Math.abs(this.value)),a=a.substring(1));this.newUnits=a;if(2!=this.count)return this.value;
var b=this.value;null==a&&null!=this.property&&(a="");if(null!=a){var c=a.equals("%");if(null==this.property&&(c||a.endsWith("hz"))){var e=this.getAtomIndex(1),g=this.getAtomIndex(2);if(0<=e&&0<=g){var e=this.getAtom(1),g=this.getAtom(2),j=JM.Measurement.nmrType(a),k=!c&&1==j;this.type=c?"percent":k?"dipoleCouplingConstant":3==j?"NOE or 3JHH":"J-CouplingConstant";3==j?(e=this.vwr.getNMRCalculation().getNOEorJHH(z(-1,[e,null,null,g]),11),null==e?(b=NaN,this.newUnits=a=""):(b=e[1],a=this.newUnits=2==
e.length?"noe":"hz")):b=c?b/(e.getVanderwaalsRadiusFloat(this.vwr,J.c.VDW.AUTO)+g.getVanderwaalsRadiusFloat(this.vwr,J.c.VDW.AUTO)):k?this.vwr.getNMRCalculation().getDipolarConstantHz(e,g):this.vwr.getNMRCalculation().getIsoOrAnisoHz(!0,e,g,a,null);this.$isValid=!Float.isNaN(b);c&&(a="pm")}}return JM.Measurement.toUnits(b,a,d)}return d?Math.round(100*b)/100:b},"~S,~B");c(b,"checkJ",function(a){null!=this.property||(null!=a||null!=this.units)||(a=this.vwr.g.measureDistanceUnits,"+hz".equals(a)&&(this.property=
"property_J",this.units=a))},"~S");b.nmrType=c(b,"nmrType",function(a){return 0>a.indexOf("hz")?0:a.equals("noe_hz")?3:a.startsWith("dc_")||a.equals("khz")?1:2},"~S");c(b,"formatAngle",function(a){var d=this.getLabelString();0<=d.indexOf("%V")&&(a=Math.round(10*a)/10);return this.formatString(a,"\u00b0",d)},"~N");c(b,"getLabelString",function(){var a=this.countPlusIndices[0]+":",d=null;if(null!=this.strFormat){if(0==this.strFormat.length)return null;d=2<this.strFormat.length&&0==this.strFormat.indexOf(a)?
this.strFormat:null}this.useDefaultLabel=!1;null==d&&(this.strFormat=null,d=this.vwr.getDefaultMeasurementLabel(this.countPlusIndices[0]),this.useDefaultLabel=null==this.units);0==d.indexOf(a)&&(d=d.substring(2));null==this.strFormat&&(this.strFormat=a+d);return d});c(b,"formatString",function(a,d,b){return JM.LabelToken.formatLabelMeasure(this.vwr,this,b,a,d)},"~N,~S,~S");c(b,"sameAsPoints",function(a,d){if(this.count!=a[0])return!1;for(var b=!0,c=1;c<=this.count&&b;c++)b=this.countPlusIndices[c]==
a[c];if(b)for(c=0;c<this.count&&b;c++)null!=d[c]&&(b=0.01>this.pts[c].distance(d[c]));if(b)return!0;switch(this.count){default:return!0;case 2:return this.sameAsIJ(a,d,1,2)&&this.sameAsIJ(a,d,2,1);case 3:return this.sameAsIJ(a,d,1,3)&&this.sameAsIJ(a,d,2,2)&&this.sameAsIJ(a,d,3,1);case 4:return this.sameAsIJ(a,d,1,4)&&this.sameAsIJ(a,d,2,3)&&this.sameAsIJ(a,d,3,2)&&this.sameAsIJ(a,d,4,1)}},"~A,~A");c(b,"sameAsIJ",function(a,d,b,c){b=this.countPlusIndices[b];a=a[c];return 0<=b||0<=a?b==a:0.01>this.pts[-2-
b].distance(d[-2-a])},"~A,~A,~N,~N");c(b,"sameAs",function(a,d){return this.sameAsIJ(this.countPlusIndices,this.pts,a,d)},"~N,~N");c(b,"getPropMeasurement",function(a){if(null==this.countPlusIndices||2!=this.count)return NaN;for(var d=this.count;0<=--d;)if(0>this.countPlusIndices[d+1])return NaN;try{var b=null==a?this.getAtom(1):a[0],c=null==a?this.getAtom(2):a[1],e=this.vwr.getDataObj(this.property,null,2),g=b.i,j=c.i;return null==e||j>=e.length||g>=e.length?NaN:e[g][j]}catch(k){return NaN}},"~A");
c(b,"getMeasurement",function(a){this.checkJ(null);if(!Float.isNaN(this.fixedValue))return this.fixedValue;if(null!=this.property)return this.getPropMeasurement(a);if(null==this.countPlusIndices||2>this.count)return NaN;for(var d=this.count;0<=--d;)if(-1==this.countPlusIndices[d+1])return NaN;var d=null==a?this.getAtom(1):a[0],b=null==a?this.getAtom(2):a[1],c;switch(this.count){case 2:return d.distance(b);case 3:return c=null==a?this.getAtom(3):a[2],JU.Measure.computeAngleABC(d,b,c,!0);case 4:return c=
null==a?this.getAtom(3):a[2],a=null==a?this.getAtom(4):a[3],JU.Measure.computeTorsion(d,b,c,a,!0);default:return NaN}},"~A");c(b,"getLabel",function(a,d,b){var c=this.countPlusIndices[a];return 0>c?(b?"modelIndex "+this.getAtom(a).mi+" ":"")+JU.Escape.eP(this.getAtom(a)):d?"({"+c+"})":this.vwr.getAtomInfo(c)},"~N,~B,~B");c(b,"setModelIndex",function(a){this.modelIndex=a;if(null!=this.pts)for(var d=0;d<this.count;d++)null!=this.pts[d]&&(this.pts[d].mi=a)},"~N");c(b,"isValid",function(){return!(this.sameAs(1,
2)||2<this.count&&this.sameAs(1,3)||4==this.count&&this.sameAs(2,4))});b.find=c(b,"find",function(a,d){for(var b=d.countPlusIndices,c=d.pts,e=a.size();0<=--e;)if(a.get(e).sameAsPoints(b,c))return e;return-1},"JU.Lst,JM.Measurement");c(b,"isConnected",function(a,d){for(var b=-1,c=1;c<=d;c++){var e=this.getAtomIndex(c);if(!(0>e)){if(0<=b&&!a[e].isBonded(a[b]))return!1;b=e}}return!0},"~A,~N");c(b,"getInfoAsString",function(a){var d=this.fixValue(a,!0);a=new JU.SB;a.append(2==this.count?null!=this.property?
this.property:null==this.type?"distance":this.type:3==this.count?"angle":"dihedral");a.append(" \t").appendF(d);a.append(" \t").append(JU.PT.esc(this.strMeasurement));for(d=1;d<=this.count;d++)a.append(" \t").append(this.getLabel(d,!1,!1));null!=this.thisID&&a.append(" \t").append(this.thisID);return a.toString()},"~S");c(b,"isInRange",function(a,d){if(a.factorType===J.atomdata.RadiusData.EnumType.FACTOR){var b=this.getAtom(1),c=this.getAtom(2),b=(b.getVanderwaalsRadiusFloat(this.vwr,a.vdwType)+c.getVanderwaalsRadiusFloat(this.vwr,
a.vdwType))*a.value;return d<=b}return 3.4028235E38==a.values[0]||d>=a.values[0]&&d<=a.values[1]},"J.atomdata.RadiusData,~N");c(b,"isIntramolecular",function(a,d){for(var b=-1,c=1;c<=d;c++){var e=this.getAtomIndex(c);if(!(0>e))if(e=a[e].getMoleculeNumber(!1),0>b)b=e;else if(e!=b)return!1}return!0},"~A,~N");c(b,"isMin",function(a){var d=this.getAtom(1),b=this.getAtom(2),c=F(100*b.distanceSquared(d)),d=d.getAtomName(),b=b.getAtomName(),b=0>d.compareTo(b)?d+b:b+d;a=a.get(b);return null!=a&&c==a.intValue()},
"java.util.Map");b.isUnits=c(b,"isUnits",function(a){return JU.PT.isOneOf((a.startsWith("+")?a.substring(1):a).toLowerCase(),";nm;nanometers;pm;picometers;angstroms;angstroms;ang;\u00c5;au;vanderwaals;vdw;%;noe;")||0>a.indexOf(" ")&&a.endsWith("hz")},"~S");b.toUnits=c(b,"toUnits",function(a,d,b){return Float.isNaN(a)?NaN:d.equals("hz")?b?Math.round(10*a)/10:a:d.equals("nm")?b?Math.round(100*a)/1E3:a/10:d.equals("pm")?b?Math.round(1E3*a)/10:100*a:d.equals("au")?b?Math.round(1E3*(a/0.5291772))/1E3:
a/0.5291772:d.endsWith("khz")?b?Math.round(a/10)/100:a/1E3:b?Math.round(100*a)/100:a},"~N,~S,~B");b.fromUnits=c(b,"fromUnits",function(a,d){return d.equals("nm")?10*a:d.equals("pm")?a/100:d.equals("au")?0.5291772*a:d.equals("\u00c5")?a:0},"~N,~S");b.fixUnits=c(b,"fixUnits",function(a){var d=a.endsWith("s")?a.substring(0,a.length-1):a;return d.equals("nanometer")?"nm":d.equals("bohr")||d.equals("atomicunits")||d.equals("atomic")?"au":d.equals("picometer")?"pm":d.equals("\u00e5")||d.equals("angstrom")||
d.equals("a")||d.equals("ang")?"\u00c5":d.equals("vanderwaal")||d.equals("vdw")?"%":a},"~S");c(b,"getDistanceFormatForState",function(){return this.useDefaultLabel?null:this.strFormat});c(b,"setFromMD",function(a){this.modelIndex=a.modelIndex;null!=a.thisID&&(this.thisID=a.thisID,null!=a.text&&null!=a.text.text&&(this.text=a.text));this.units="default".equals(a.units)?null:a.units;this.property=a.property;this.fixedValue=a.fixedValue;0!=a.colix&&(this.colix=a.colix);0!=a.mad&&(this.mad=a.mad);null!=
a.strFormat&&(this.strFormat=(null==this.strFormat?a.strFormat:this.strFormat.substring(0,2))+a.strFormat.substring(2));null!=a.text&&(null==this.text?this.text=a.text:(null!=a.text.font&&(this.text.setFont(a.text.font,!1),this.text.fontScale=a.text.font.fontSize/a.text.font.fontSizeNominal),this.text.text=null,0!=a.text.align&&(this.text.align=a.text.align),0!=a.colix&&(this.labelColix=this.text.colix=a.text.colix)));this.formatMeasurement(null)},"JM.MeasurementData,~B")});m("JM");x(["J.api.JmolMeasurementClient"],
"JM.MeasurementData",["JU.Lst","JM.Measurement"],function(){var b=s(function(){this.points=this.measurements=this.measurementStrings=this.bsSelected=this.client=null;this.mustNotBeConnected=this.mustBeConnected=!1;this.tickInfo=null;this.tokAction=12290;this.note=this.property=this.strFormat=this.radiusData=null;this.isAll=!1;this.colix=0;this.intramolecular=null;this.mad=0;this.units=this.text=this.thisID=null;this.fixedValue=0;this.ms=this.minArray=this.atoms=null;this.allowSelf=!1;this.vwr=null;
this.iFirstAtom=0;this.justOneModel=!0;this.htMin=null;this.modelIndex=0;r(this,arguments)},JM,"MeasurementData",null,J.api.JmolMeasurementClient);c(b,"init",function(a,d,b){this.vwr=d;this.points=b;this.thisID=a;return this},"~S,JV.Viewer,JU.Lst");c(b,"setModelSet",function(a){this.ms=a;return this},"JM.ModelSet");c(b,"set",function(a,d,b,c,e,g,j,k,l,f,n,q,v,B,m,r){this.ms=this.vwr.ms;this.tokAction=a;2<=this.points.size()&&(C(this.points.get(0),"JU.BS")&&C(this.points.get(1),"JU.BS"))&&(this.justOneModel=
this.vwr.ms.getModelBS(this.points.get(0),!1).equals(this.vwr.ms.getModelBS(this.points.get(1),!1)));this.vwr.am.splitFrame&&(this.justOneModel=!0);this.bsSelected=r;this.htMin=d;this.radiusData=b;this.property=c;this.strFormat=e;this.units=g;this.tickInfo=j;this.mustBeConnected=k;this.mustNotBeConnected=l;this.intramolecular=f;this.isAll=n;this.mad=q;this.colix=v;this.text=B;this.fixedValue=m;return this},"~N,java.util.Map,J.atomdata.RadiusData,~S,~S,~S,JM.TickInfo,~B,~B,Boolean,~B,~N,~N,JM.Text,~N,JU.BS");
c(b,"processNextMeasure",function(a,d){var b=d.getMeasurement(null);if(!(null!=this.htMin&&!d.isMin(this.htMin)||null!=this.radiusData&&!d.isInRange(this.radiusData,b)))if(null==this.measurementStrings&&null==this.measurements){var c=this.minArray[this.iFirstAtom];d.value=b;b=d.fixValue(this.units,!1);this.minArray[this.iFirstAtom]=-Infinity==1/c?b:Math.min(c,b)}else null!=this.measurementStrings?this.measurementStrings.addLast(d.getStringUsing(this.vwr,this.strFormat,this.units)):this.measurements.addLast(Float.$valueOf(d.getMeasurement(null)))},
"JM.MeasurementData,JM.Measurement");c(b,"getMeasurements",function(a,d){if(d){this.minArray=M(this.points.get(0).cardinality(),0);for(var b=0;b<this.minArray.length;b++)this.minArray[b]=-0;this.define(null,this.ms);return this.minArray}if(a)return this.allowSelf=!0,this.measurements=new JU.Lst,this.define(null,this.ms),this.measurements;this.measurementStrings=new JU.Lst;this.define(null,this.ms);return this.measurementStrings},"~B,~B");c(b,"define",function(a,d){this.client=null==a?this:a;this.atoms=
d.at;var b=this.points.size();if(!(2>b)){this.modelIndex=-1;var c=Array(4),e=D(5,0),g=(new JM.Measurement).setPoints(d,e,c,null);g.setCount(b);g.property=this.property;g.strFormat=this.strFormat;g.units=this.units;g.fixedValue=this.fixedValue;for(var j=-1,k=0;k<b;k++){var l=this.points.get(k);if(C(l,"JU.BS")){j=l.cardinality();if(0==j)return;1<j&&(this.modelIndex=0);j=k;0==k&&(this.iFirstAtom=0);e[k+1]=l.nextSetBit(0)}else c[k]=l,e[k+1]=-2-k}this.nextMeasure(0,j,g,this.modelIndex)}},"J.api.JmolMeasurementClient,JM.ModelSet");
c(b,"nextMeasure",function(a,d,b,c){if(a>d)(this.allowSelf&&!this.mustBeConnected&&!this.mustNotBeConnected||b.isValid())&&((!this.mustBeConnected||b.isConnected(this.atoms,a))&&(!this.mustNotBeConnected||!b.isConnected(this.atoms,a))&&(null==this.intramolecular||b.isIntramolecular(this.atoms,a)==this.intramolecular.booleanValue()))&&this.client.processNextMeasure(this,b);else{var e=this.points.get(a),g=b.countPlusIndices,j=0==a?2147483647:g[a];if(0>j)this.nextMeasure(a+1,d,b,c);else{for(var k=!1,
l=e.nextSetBit(0),f=0;0<=l;l=e.nextSetBit(l+1),f++)if(l!=j||this.allowSelf){var n=this.atoms[l].mi;if(0<=c&&this.justOneModel)if(0==a)c=n;else if(c!=n)continue;this.modelIndex=n;g[a+1]=l;0==a&&(this.iFirstAtom=f);k=!0;this.nextMeasure(a+1,d,b,c)}k||this.nextMeasure(a+1,d,b,c)}}},"~N,~N,JM.Measurement,~N")});m("JM");x(["JM.Measurement"],"JM.MeasurementPending",null,function(){var b=s(function(){this.haveModified=this.haveTarget=!1;this.numSet=0;this.lastIndex=-1;r(this,arguments)},JM,"MeasurementPending",
JM.Measurement);c(b,"set",function(a){return this.setM(a,null,NaN,0,null,0)},"JM.ModelSet");c(b,"checkPoint",function(a){for(var d=1;d<=this.numSet;d++)if(this.countPlusIndices[d]==-1-d&&0.01>this.pts[d-1].distance(a))return!1;return!0},"JU.Point3fi");c(b,"getIndexOf",function(a){for(var d=1;d<=this.numSet;d++)if(this.countPlusIndices[d]==a)return d;return 0},"~N");f(b,"setCount",function(a){this.setCountM(a);this.numSet=a},"~N");c(b,"addPoint",function(a,d,b){if(0<=a&&this.ms.vwr.am.splitFrame){var c=
this.ms.at[a].mi;if(0<this.count){if(c!=this.modelIndex)return this.count}else this.modelIndex=c}this.haveModified=a!=this.lastIndex;this.lastIndex=a;if(null==d){if(0<this.getIndexOf(a))return b&&(this.numSet=this.count),this.count;this.haveTarget=0<=a;if(!this.haveTarget)return this.count=this.numSet;this.count=this.numSet+1;this.countPlusIndices[this.count]=a}else{if(!this.checkPoint(d))return b&&(this.numSet=this.count),this.count;a=this.numSet;this.haveModified=this.haveTarget=!0;this.count=this.numSet+
1;this.pts[a]=d;this.countPlusIndices[this.count]=-2-a}this.countPlusIndices[0]=this.count;b&&(this.numSet=this.count);this.value=this.getMeasurement(null);this.strFormat=null;this.formatMeasurement(null);return this.count},"~N,JU.Point3fi,~B")});m("JM");x(null,"JM.Model","java.util.Hashtable JU.AU $.BS $.M3 $.P3 $.SB JS.T JU.BSUtil JV.FileManager".split(" "),function(){var b=s(function(){this.mat4=this.ms=null;this.fileIndex=this.modelIndex=0;this.isModelKit=this.isPdbWithMultipleBonds=this.isBioModel=
!1;this.translation=this.biosymmetry=this.properties=this.auxiliaryInfo=this.orientation=this.annotationCache=this.simpleCage=this.chains=null;this.loadState="";this.loadScript=null;this.isTrajectory=this.isJmolDataFrame=this.structureTainted=this.hasRasmolHBonds=!1;this.act=this.insertionCount=this.altLocCount=this.trajectoryBaseIndex=0;this.bondCount=-1;this.chainCount=0;this.groupCount=-1;this.firstMoleculeIndex=this.firstAtomIndex=this.biosymmetryCount=this.moleculeCount=this.hydrogenCount=0;
this.bsAtomsDeleted=this.bsAtoms=null;this.frameDelay=this.defaultRotationRadius=0;this.selectedTrajectory=-1;this.jmolFrameType=this.jmolData=null;this.jmolFrameTypeInt=0;this.dataFrames=null;this.dataSourceFrame=0;this.bsCheck=this.pdbID=this.uvw0=this.uvw=null;this.hasChirality=!1;this.isOrderly=!0;this.bsAsymmetricUnit=null;r(this,arguments)},JM,"Model",null);u(b,function(){this.setupArrays()});c(b,"setupArrays",function(){this.chains=Array(8);this.loadScript=new JU.SB;this.bsAtoms=new JU.BS;
this.bsAtomsDeleted=new JU.BS});c(b,"set",function(a,d,b,c,e,g){this.ms=a;this.dataSourceFrame=this.modelIndex=d;this.trajectoryBaseIndex=(this.isTrajectory=0<=b)?b:d;null==g&&(g=new java.util.Hashtable);this.auxiliaryInfo=g;a=g.get("biosymmetryCount");null!=a&&(this.biosymmetryCount=a.intValue(),this.biosymmetry=g.get("bioSymmetry"));a=g.get("fileName");null!=a&&g.put("fileName",JV.FileManager.stripTypePrefix(a));this.properties=e;null==c?this.jmolFrameType="modelSet":(e=c.get("header"),this.jmolData=
c,this.isJmolDataFrame=!0,g.put("jmolData",c),g.put("title",e),this.jmolFrameType=0<=e.indexOf("ramachandran")?"ramachandran":0<=e.indexOf("quaternion")?"quaternion":0<=e.indexOf("spin")?"spin":"data",this.jmolFrameTypeInt=JS.T.getTokFromName(this.jmolFrameType),System.out.println("JmolFrameType is "+JS.T.nameOf(this.jmolFrameTypeInt)));return this},"JM.ModelSet,~N,~N,java.util.Map,java.util.Properties,java.util.Map");c(b,"getTrueAtomCount",function(){return JU.BSUtil.andNot(this.bsAtoms,this.bsAtomsDeleted).cardinality()});
c(b,"isContainedIn",function(a){null==this.bsCheck&&(this.bsCheck=new JU.BS);this.bsCheck.clearAll();this.bsCheck.or(a);a=JU.BSUtil.andNot(this.bsAtoms,this.bsAtomsDeleted);this.bsCheck.and(a);return this.bsCheck.equals(a)},"JU.BS");c(b,"resetBoundCount",function(){this.bondCount=-1});c(b,"getBondCount",function(){if(0<=this.bondCount)return this.bondCount;var a=this.ms.bo;this.bondCount=0;for(var d=this.ms.bondCount;0<=--d;)null!=a[d]&&a[d].atom1.mi==this.modelIndex&&this.bondCount++;return this.bondCount});
c(b,"getChainCount",function(a){if(1<this.chainCount&&!a)for(a=0;a<this.chainCount;a++)if(0==this.chains[a].chainID)return this.chainCount-1;return this.chainCount},"~B");c(b,"calcSelectedGroupsCount",function(a){for(var d=this.chainCount;0<=--d;)this.chains[d].calcSelectedGroupsCount(a)},"JU.BS");c(b,"getGroupCount",function(){if(0>this.groupCount){this.groupCount=0;for(var a=this.chainCount;0<=--a;)this.groupCount+=this.chains[a].groupCount}return this.groupCount});c(b,"getChainAt",function(a){return a<
this.chainCount?this.chains[a]:null},"~N");c(b,"getChain",function(a){for(var d=this.chainCount;0<=--d;){var b=this.chains[d];if(b.chainID==a)return b}return null},"~N");c(b,"resetDSSR",function(a){this.annotationCache=null;a&&this.auxiliaryInfo.remove("dssr")},"~B");c(b,"fixIndices",function(a,d,b){this.fixIndicesM(a,d,b)},"~N,~N,JU.BS");c(b,"fixIndicesM",function(a,d,b){this.dataSourceFrame>a&&this.dataSourceFrame--;this.trajectoryBaseIndex>a&&this.trajectoryBaseIndex--;this.firstAtomIndex-=d;for(a=
0;a<this.chainCount;a++)this.chains[a].fixIndices(d,b);JU.BSUtil.deleteBits(this.bsAtoms,b);JU.BSUtil.deleteBits(this.bsAtomsDeleted,b)},"~N,~N,JU.BS");c(b,"freeze",function(){this.freezeM();return!1});c(b,"freezeM",function(){for(var a=0;a<this.chainCount;a++)if(0==this.chains[a].groupCount){for(var d=a+1;d<this.chainCount;d++)this.chains[d-1]=this.chains[d];this.chainCount--}this.chains=JU.AU.arrayCopyObject(this.chains,this.chainCount);this.groupCount=-1;this.getGroupCount();for(a=0;a<this.chainCount;++a)this.chains[a].groups=
JU.AU.arrayCopyObject(this.chains[a].groups,this.chains[a].groupCount)});c(b,"getUVWMatrix",function(a){if(null==this.uvw0)return null;for(var d=new JU.M3,b=0;3>b;b++){var c=JU.P3.newP(a?this.uvw0[b]:this.uvw[b]);c.normalize();d.setColumnV(b,c)}return d},"~B")});m("JM");x(["java.util.Hashtable","JU.BS"],"JM.ModelLoader","java.util.Arrays JU.AU $.Lst $.P3 $.PT $.SB $.V3 J.api.Interface JM.AtomCollection $.Chain $.Group $.Model $.ModelSet JS.T JU.BSUtil $.Elements $.JmolMolecule $.Logger JV.JC".split(" "),
function(){var b=s(function(){this.modelSet0=this.ms=this.vwr=null;this.appendNew=this.merging=!1;this.specialAtomIndexes=this.group3Counts=this.group3Lists=this.jmolData=null;this.doAddPDBHydrogens=this.doMinimize=this.isPyMOLsession=this.isTrajectory=this.isMutate=this.isMOL2D=this.is2D=this.someModelsAreModulated=this.someModelsHaveUnitcells=!1;this.groups=this.jbr=this.fileHeader=null;this.groupCount=0;this.modulationTUV=null;this.noH=!1;this.firstAtomIndexes=this.seqcodes=this.group3Of=this.chainOf=
this.htAtomMap=null;this.iModel=0;this.model=null;this.currentChainID=0;this.isNewChain=!1;this.currentChain=null;this.currentGroupSequenceNumber=0;this.currentGroupInsertionCode="\x00";this.nullGroup=this.currentGroup3=null;this.adapterTrajectoryCount=this.adapterModelCount=this.baseTrajectoryCount=this.baseGroupIndex=this.baseAtomIndex=this.baseModelCount=this.baseModelIndex=0;this.modulationOn=this.noAutoBond=!1;this.$mergeGroups=this.appendToModelIndex=this.htGroup1=null;this.iChain=0;this.vStereo=
null;this.lastModel=-1;this.structuresDefinedInFile=null;r(this,arguments)},JM,"ModelLoader",null);N(b,function(){this.htAtomMap=new java.util.Hashtable;this.structuresDefinedInFile=new JU.BS});u(b,function(a,d,b,c,e,g){this.vwr=a;this.ms=new JM.ModelSet(a,d);var j=a.getModelAdapter();this.modelSet0=e;(this.merging=null!=e&&(0<e.ac||null!=e.vwr.getOperativeSymmetry()))?this.ms.canSkipLoad=!1:a.resetShapes(!1);this.ms.preserveState=a.getPreserveState();this.ms.showRebondTimes=a.getBoolean(603979934);
null==g?(this.initializeInfo(d,null),this.createModelSet(null,null,null),a.setStringProperty("_fileType","")):(this.ms.preserveState||(this.ms.canSkipLoad=!1),d=j.getAtomSetCollectionAuxiliaryInfo(c),d.put("loadScript",b),this.initializeInfo(j.getFileTypeName(c).toLowerCase().intern(),d),this.createModelSet(j,c,g),null!=d.get("lowPrecision")&&a.setBooleanPropertyTok("doublePrecision",603979831,!1),null!=this.jbr&&this.jbr.setLoader(null),this.jbr=null)},"JV.Viewer,~S,JU.SB,~O,JM.ModelSet,JU.BS");
c(b,"initializeInfo",function(a,d){this.ms.g3d=this.vwr.gdata;this.ms.modelSetTypeName=a;this.ms.isXYZ="xyz"===a;this.ms.msInfo=d;this.ms.modelSetProperties=this.ms.getInfoM("properties");this.ms.haveBioModels=this.ms.getMSInfoB(JV.JC.getBoolName(4));this.isMutate=this.ms.getMSInfoB("isMutate");this.ms.haveBioModels&&(this.jbr=this.vwr.getJBR().setLoader(this),this.jbr.carbohydrates=d.get("carbohydrates"));this.jmolData=0==this.adapterModelCount?this.ms.getInfoM("jmolData"):null;this.fileHeader=this.ms.getInfoM("fileHeader");
var b=this.ms.getInfoM("trajectorySteps");if(this.isTrajectory=null!=b)this.ms.trajectory=this.newTrajectory(this.ms,b);this.isPyMOLsession=this.ms.getMSInfoB("isPyMOL");this.doAddPDBHydrogens=null!=this.jbr&&!this.isTrajectory&&!this.isPyMOLsession&&!this.ms.getMSInfoB("pdbNoHydrogens")&&(this.ms.getMSInfoB("pdbAddHydrogens")||this.vwr.getBoolean(603979894));null!=d&&(d.remove("pdbNoHydrogens"),d.remove("pdbAddHydrogens"),d.remove("trajectorySteps"),this.isTrajectory&&(this.ms.vibrationSteps=d.remove("vibrationSteps")),
d.containsKey("highPrecision")&&this.vwr.setBooleanProperty("legacyJavaFloat",!0));this.htGroup1=this.ms.getInfoM("htGroup1");b=this.ms.getInfoM("modulationOn");null!=b&&(this.modulationOn=!0,this.modulationTUV=b===Boolean.TRUE?null:b);this.noAutoBond=this.ms.getMSInfoB("noAutoBond");this.noH=this.ms.getMSInfoB("noHydrogen");this.doMinimize=((this.is2D=this.ms.getMSInfoB("is2D"))&&!this.noH||this.ms.getMSInfoB("minimize3D"))&&this.ms.getMSInfoB("doMinimize");this.adapterTrajectoryCount=this.isTrajectory?
this.ms.trajectory.steps.size():0;this.ms.someModelsHaveSymmetry=this.ms.getMSInfoB(JV.JC.getBoolName(1));this.someModelsHaveUnitcells=this.ms.getMSInfoB(JV.JC.getBoolName(2));this.someModelsAreModulated=this.ms.getMSInfoB(JV.JC.getBoolName(9));this.ms.someModelsHaveFractionalCoordinates=this.ms.getMSInfoB(JV.JC.getBoolName(1));this.merging&&(this.ms.haveBioModels=(new Boolean(this.ms.haveBioModels|this.modelSet0.haveBioModels)).valueOf(),this.ms.bioModelset=this.modelSet0.bioModelset,null!=this.ms.bioModelset&&
this.ms.bioModelset.set(this.vwr,this.ms),this.ms.someModelsHaveSymmetry=(new Boolean(this.ms.someModelsHaveSymmetry|this.modelSet0.getMSInfoB(JV.JC.getBoolName(1)))).valueOf(),this.someModelsHaveUnitcells=(new Boolean(this.someModelsHaveUnitcells|this.modelSet0.getMSInfoB(JV.JC.getBoolName(2)))).valueOf(),this.ms.someModelsHaveFractionalCoordinates=(new Boolean(this.ms.someModelsHaveFractionalCoordinates|this.modelSet0.getMSInfoB(JV.JC.getBoolName(0)))).valueOf(),this.ms.someModelsHaveAromaticBonds=
(new Boolean(this.ms.someModelsHaveAromaticBonds|this.modelSet0.someModelsHaveAromaticBonds)).valueOf(),this.ms.msInfo.put(JV.JC.getBoolName(1),Boolean.$valueOf(this.ms.someModelsHaveSymmetry)),this.ms.msInfo.put(JV.JC.getBoolName(2),Boolean.$valueOf(this.someModelsHaveUnitcells)),this.ms.msInfo.put(JV.JC.getBoolName(0),Boolean.$valueOf(this.ms.someModelsHaveFractionalCoordinates)),this.ms.msInfo.put(JV.JC.getBoolName(8),Boolean.$valueOf(this.ms.someModelsHaveAromaticBonds)))},"~S,java.util.Map");
c(b,"newTrajectory",function(a,d){return J.api.Interface.getInterface("JM.Trajectory",this.vwr,"load").set(this.vwr,a,d)},"JM.ModelSet,JU.Lst");c(b,"getGroup3",function(a){return a>=this.group3Of.length?null:this.group3Of[a]},"~N");c(b,"getFirstAtomIndex",function(a){return this.firstAtomIndexes[a]},"~N");c(b,"getAtomCount",function(){return this.ms.ac});c(b,"createModelSet",function(a,d,b){var c=null==a?0:a.getAtomCount(d,-1);0<c&&JU.Logger.info("reading "+c+" atoms");this.adapterModelCount=null==
a?1:a.getAtomSetCount(d);this.appendToModelIndex=null==this.ms.msInfo?null:this.ms.msInfo.get("appendToModelIndex");this.appendNew=!this.isMutate&&(!this.merging||null==a||1<this.adapterModelCount||this.isTrajectory||this.vwr.getBoolean(603979792)&&null==this.appendToModelIndex);this.htAtomMap.clear();this.chainOf=Array(32);this.group3Of=Array(32);this.seqcodes=D(32,0);this.firstAtomIndexes=D(32,0);this.currentChainID=2147483647;this.currentChain=null;this.currentGroupInsertionCode="\uffff";this.currentGroup3=
"xxxxx";this.iModel=-1;this.model=null;this.merging&&this.mergeTrajAndVib(this.modelSet0,this.ms);this.initializeAtomBondModelCounts(c);!this.noH&&(null!=b&&(this.doMinimize||this.is2D))&&b.setBits(this.baseAtomIndex,this.baseAtomIndex+a.getAtomCount(d,0));if(null==a)this.setModelNameNumberProperties(0,-1,"",1,null,null,null);else{0<this.adapterModelCount&&(JU.Logger.info("ModelSet: haveSymmetry:"+this.ms.someModelsHaveSymmetry+" haveUnitcells:"+this.someModelsHaveUnitcells+" haveFractionalCoord:"+
this.ms.someModelsHaveFractionalCoordinates),JU.Logger.info(this.adapterModelCount+" model"+(1==this.ms.mc?"":"s")+' in this collection. Use getProperty "modelInfo" or getProperty "auxiliaryInfo" to inspect them.'));b=this.ms.getInfoM("defaultOrientationQuaternion");null!=b&&(JU.Logger.info("defaultOrientationQuaternion = "+b),JU.Logger.info('Use "set autoLoadOrientation TRUE" before loading or "restore orientation DEFAULT" after loading to view this orientation.'));this.iterateOverAllNewModels(a,
d);b=a.getBondIterator(d);c=null!=b;this.iterateOverAllNewAtoms(a,d,c);var e=this.vwr.getMadBond();c&&(this.ms.defaultCovalentMad=null==this.jmolData?e:0,this.iterateOverAllNewBonds(b));this.ms.defaultCovalentMad=e;this.merging&&!this.appendNew&&(b=a.getAtomSetAuxiliaryInfo(d,0),this.ms.setInfo(this.baseModelIndex,"initialAtomCount",b.get("initialAtomCount")),this.ms.setInfo(this.baseModelIndex,"initialBondCount",b.get("initialBondCount")));this.initializeUnitCellAndSymmetry();this.initializeBonding()}this.finalizeGroupBuild();
this.is2D&&this.doMinimize&&this.setupMinimization();this.doAddPDBHydrogens&&this.jbr.finalizeHydrogens();null!=a&&(this.ms.calculatePolymers(this.groups,this.groupCount,this.baseGroupIndex,null),null!=this.jbr&&this.jbr.iterateOverAllNewStructures(a,d));this.setDefaultRendering(this.vwr.getInt(553648170));var g=this.vwr.rd;b=this.ms.ac;c=this.ms.at;for(e=this.baseAtomIndex;e<b;e++)c[e].setMadAtom(this.vwr,g);g=this.ms.am;for(e=g[this.baseModelIndex].firstAtomIndex;e<b;e++)null!=c[e]&&g[c[e].mi].bsAtoms.set(e);
this.freeze();this.finalizeShapes();this.vwr.setModelSet(this.ms);this.setAtomProperties();null!=a&&a.finish(d);null!=this.modelSet0&&this.modelSet0.releaseModelSet();this.modelSet0=null},"J.api.JmolAdapter,~O,JU.BS");c(b,"mergeTrajAndVib",function(a,d){this.baseModelCount=a.mc;this.baseTrajectoryCount=0;null==a.trajectory&&this.isTrajectory&&this.newTrajectory(a,new JU.Lst);if(!(null==a.trajectory||0==a.mc)){this.baseTrajectoryCount=a.mc;for(var b=a.trajectory.steps.size(),c=b;c<this.baseTrajectoryCount;c++)a.trajectory.steps.addLast(null);
if(this.isTrajectory){if(null==a.vibrationSteps){a.vibrationSteps=new JU.Lst;for(c=b;0<=--c;)a.vibrationSteps.addLast(null)}b=d.trajectory.steps.size();for(c=0;c<b;c++)a.trajectory.steps.addLast(d.trajectory.steps.get(c)),a.vibrationSteps.addLast(null==d.vibrationSteps?null:d.vibrationSteps.get(c))}else d.trajectory=this.newTrajectory(d,null);d.vibrationSteps=a.vibrationSteps;d.trajectory.steps=a.trajectory.steps;a.trajectory=null}},"JM.ModelSet,JM.ModelSet");c(b,"setDefaultRendering",function(a){if(!this.isPyMOLsession){for(var d=
new JU.SB,b=this.ms.mc,c=this.ms.am,e=this.baseModelIndex;e<b;e++)c[e].isBioModel&&c[e].getDefaultLargePDBRendering(d,a);0!=d.length()&&(d.append("select *;"),a=this.ms.getInfoM("jmolscript"),null==a&&(a=""),d.append(a),this.ms.msInfo.put("jmolscript",d.toString()))}},"~N");c(b,"setAtomProperties",function(){for(var a=this.ms.mc,d=this.baseModelIndex;d<a;d++){var b=this.ms.getInfo(d,"atomProperties");null!=this.jmolData&&this.addJmolDataProperties(this.ms.am[d],this.ms.getInfo(d,"jmolData"));var c=
this.ms.getInfo(d,"groupPropertyList");this.ms.am[d].isBioModel&&null!=this.ms.getInfo(d,"dssr")&&this.vwr.getAnnotationParser(1111490587).setGroup1(this.ms,d);if(null!=b){for(var e,b=b.entrySet().iterator();b.hasNext()&&((e=b.next())||1);){var g=e.getKey(),j=e.getValue(),k=this.ms.getModelAtomBitSetIncludingDeleted(d,!0);if(this.doAddPDBHydrogens)var l=null!=c&&JU.PT.isOneOf(g,c),j=this.jbr.fixPropertyValue(k,j,l);g="property_"+g.toLowerCase();JU.Logger.info("creating "+g+" for model "+this.ms.getModelName(d));
this.vwr.setData(g,z(-1,[g,j,k,Integer.$valueOf(-1),Boolean.FALSE,e]),this.ms.ac,0,0,2147483647,0)}this.ms.setInfo(d,"atomProperties",null)}}});c(b,"initializeAtomBondModelCounts",function(a){var d=this.adapterTrajectoryCount;if(this.merging){if(this.appendNew)this.baseModelIndex=this.baseModelCount,this.ms.mc=this.baseModelCount+this.adapterModelCount;else{this.baseModelIndex=null==this.appendToModelIndex?this.vwr.am.cmi:this.appendToModelIndex.intValue();if(0>this.baseModelIndex||this.baseModelIndex>=
this.baseModelCount)this.baseModelIndex=this.baseModelCount-1;this.ms.mc=this.baseModelCount}this.ms.ac=this.baseAtomIndex=this.modelSet0.ac;this.ms.bondCount=this.modelSet0.bondCount;this.$mergeGroups=this.modelSet0.getGroups();this.groupCount=this.baseGroupIndex=this.$mergeGroups.length;this.ms.mergeModelArrays(this.modelSet0);this.ms.growAtomArrays(this.ms.ac+a)}else this.ms.mc=this.adapterModelCount,this.ms.ac=0,this.ms.bondCount=0,this.ms.at=Array(a),this.ms.bo=Array(250+a);this.doAddPDBHydrogens&&
this.jbr.initializeHydrogenAddition();1<d&&(this.ms.mc+=d-1);this.ms.am=JU.AU.arrayCopyObject(this.ms.am,this.ms.mc);this.ms.modelFileNumbers=JU.AU.arrayCopyI(this.ms.modelFileNumbers,this.ms.mc);this.ms.modelNumbers=JU.AU.arrayCopyI(this.ms.modelNumbers,this.ms.mc);this.ms.modelNumbersForAtomLabel=JU.AU.arrayCopyS(this.ms.modelNumbersForAtomLabel,this.ms.mc);this.ms.modelNames=JU.AU.arrayCopyS(this.ms.modelNames,this.ms.mc);this.ms.frameTitles=JU.AU.arrayCopyS(this.ms.frameTitles,this.ms.mc);if(this.merging)for(a=
0;a<this.modelSet0.mc;a++)(this.ms.am[a]=this.modelSet0.am[a]).ms=this.ms},"~N");c(b,"mergeGroups",function(){var a=this.modelSet0.getModelSetAuxiliaryInfo(null),d=a.get("group3Lists"),a=a.get("group3Counts"),b=null==d?0:d.length;if(null!=d){for(var c=0;c<this.baseModelCount;c++)c<b&&(this.group3Lists[c+1]=d[c+1],this.group3Counts[c+1]=a[c+1]),this.structuresDefinedInFile.set(c);this.group3Lists[0]=d[0];this.group3Counts[0]=a[0]}!this.appendNew&&this.ms.haveBioModels&&this.structuresDefinedInFile.clear(this.baseModelIndex)});
c(b,"iterateOverAllNewModels",function(a,d){this.group3Lists=Array(this.ms.mc+1);this.group3Counts=JU.AU.newInt2(this.ms.mc+1);this.structuresDefinedInFile=new JU.BS;this.merging&&this.mergeGroups();for(var b=this.isTrajectory?this.baseTrajectoryCount:-1,c=this.baseModelIndex,e=0;e<this.adapterModelCount;++e,++c){var g=a.getAtomSetNumber(d,e),j=a.getAtomSetName(d,e),k=a.getAtomSetAuxiliaryInfo(d,e);k.containsKey("modelID")&&k.put("modelID0",k.get("modelID"));var l=k.get("modelProperties");if(!this.merging||
this.appendNew){var f=k.get("fileType");this.vwr.setStringProperty("_fileType",f);this.vwr.fm.setFileType(f)}null==j&&(null!=this.jmolData&&(j=this.jmolData.get("header"),j=2<j.indexOf(";")?j.substring(j.indexOf(":")+2,j.indexOf(";")):null),null==j&&(j=this.appendNew?""+g%1E6:""));this.setModelNameNumberProperties(c,b,j,g,l,k,this.jmolData)}b=this.ms.am[null==this.appendToModelIndex?this.baseModelIndex:this.ms.mc-1];this.vwr.setSmilesString(this.ms.msInfo.get("smilesString"));e=this.ms.msInfo.remove("loadState");
g=this.ms.msInfo.remove("loadScript");if(0>g.indexOf("Viewer.AddHydrogens")||!b.isModelKit){j=JU.PT.split(e,"\n");k=new JU.SB;for(e=0;e<j.length;e++)l=b.loadState.indexOf(j[e]),(0>l||l!=b.loadState.lastIndexOf(j[e]))&&k.append(j[e]).appendC("\n");b.loadState+=b.loadScript.toString()+k.toString();b.loadScript=new JU.SB;if(0<=g.indexOf("load append ")||0<=g.indexOf('data "append '))g.insert(0,";var anew = appendNew;"),g.append(";set appendNew anew");b.loadScript.append("  ").appendSB(g).append(";\n")}if(this.isTrajectory){e=
this.ms.mc-c+1;JU.Logger.info(e+" trajectory steps read");this.ms.setInfo(this.baseModelCount,"trajectoryStepCount",Integer.$valueOf(e));b=this.adapterModelCount;for(e=c;e<this.ms.mc;e++,b++)this.ms.am[e]=this.ms.am[this.baseModelCount],this.ms.modelNumbers[e]=a.getAtomSetNumber(d,b),this.ms.modelNames[e]=a.getAtomSetName(d,b),this.structuresDefinedInFile.set(e)}this.finalizeModels(this.baseModelCount)},"J.api.JmolAdapter,~O");c(b,"setModelNameNumberProperties",function(a,d,b,c,e,g,j){if(this.appendNew){var k=
null!=g&&Boolean.TRUE===g.get(JV.JC.getBoolName(4));this.ms.am[a]=k?this.jbr.getBioModel(a,d,j,e,g):(new JM.Model).set(this.ms,a,d,j,e,g);this.ms.modelNumbers[a]=c;this.ms.modelNames[a]=b;k&&this.jbr.setGroupLists(a)}else d=g.get("PDB_CONECT_firstAtom_count_max"),null!=d&&this.ms.setInfo(a,"PDB_CONECT_firstAtom_count_max",d);d=this.ms.am;c=this.ms.at;d[a].bsAtoms.set(c.length+1);d[a].bsAtoms.clear(c.length+1);c=this.ms.getInfo(a,"altLocs");d[a].altLocCount=null==c?0:c.length;null!=c&&(c=c.toCharArray(),
java.util.Arrays.sort(c),c=String.valueOf(c),this.ms.setInfo(a,"altLocs",c));c=this.ms.getInfo(a,"insertionCodes");d[a].insertionCount=null==c?0:c.length;b=null!=this.ms.modelSetName&&this.ms.modelSetName.startsWith("Jmol Model Kit")||b.startsWith("Jmol Model Kit")||"Jme".equals(this.ms.getInfo(a,"fileType"))&&this.is2D;d[a].isModelKit=b},"~N,~N,~S,~N,java.util.Properties,java.util.Map,java.util.Map");c(b,"finalizeModels",function(a){var d=this.ms.mc;if(d!=a){var b,c=0,e=-1,g=this.ms.modelNumbers,
j=this.ms.modelNames;if(this.isTrajectory)for(var k=a;++k<this.ms.mc;)g[k]=g[k-1]+1;if(0<a){if(1E6>g[0])for(k=0;k<a;k++)0==j[k].length&&(j[k]=""+g[k]),g[k]+=1E6,this.ms.modelNumbersForAtomLabel[k]="1."+(k+1);var f=g[a-1],f=f-f%1E6;1E6>g[a]&&(f+=1E6);for(k=a;k<d;k++)g[k]+=f}for(var y=this.ms.am,k=a;k<d;++k)if(this.ms.setInfo(k,"fileType",this.ms.modelSetTypeName),null!=this.fileHeader&&this.ms.setInfo(k,"fileHeader",this.fileHeader),f=w(g[k]/1E6),f!=e&&(c=0,e=f),c++,0==f?(b=""+this.ms.getModelNumber(k),
f=1):b=f+"."+c,this.ms.modelNumbersForAtomLabel[k]=b,y[k].fileIndex=f-1,this.ms.modelFileNumbers[k]=1E6*f+c,null==j[k]||0==j[k].length)j[k]=b;if(this.merging)for(k=0;k<a;k++)y[k].ms=this.ms;for(k=0;k<d;k++)this.ms.setInfo(k,"modelName",j[k]),this.ms.setInfo(k,"modelNumber",Integer.$valueOf(g[k]%1E6)),this.ms.setInfo(k,"modelFileNumber",Integer.$valueOf(this.ms.modelFileNumbers[k])),this.ms.setInfo(k,"modelNumberDotted",this.ms.getModelNumberDotted(k)),a=this.ms.getInfo(k,"altLocs"),null!=a&&JU.Logger.info("model "+
this.ms.getModelNumberDotted(k)+" alternative locations: "+a)}},"~N");c(b,"iterateOverAllNewAtoms",function(a,d,b){var c=-1,e=0,g=!1,j=!1,k=a.getAtomIterator(d),f=a.getAtomCount(d,-1);this.ms.setCapacity(a.getAtomCount(d,-1));d=0;var y=this.ms.am;0<this.ms.mc&&(this.nullGroup=(new JM.Group).setGroup(new JM.Chain(this.ms.am[this.baseModelIndex],32,0),"",0,-1,-1));for(;k.hasNext();){d++;var n=k.getAtomSetIndex()+this.baseModelIndex;n!=c&&(this.iChain=0,this.iModel=n,this.model=y[n],c=this.model.bsAtoms,
this.merging&&(!this.appendNew&&null!=this.vwr.getOperativeSymmetry())&&(e=this.getAtomSiteBase(c)),this.currentChainID=2147483647,this.isNewChain=!0,c.set(this.ms.ac+f),c.clearAll(),this.model.isOrderly=null==this.appendToModelIndex,g=this.model.isBioModel,c=n,j=g&&this.doAddPDBHydrogens,null!=this.jbr&&this.jbr.setHaveHsAlready(!1));var n=k.getGroup3(),q=k.getChainID();this.checkNewGroup(a,q,n,k.getSequenceNumber(),k.getInsertionCode(),j,!1);q=k.getElementNumber();j&&1==JU.Elements.getElementNumber(q)&&
this.jbr.setHaveHsAlready(!0);var v=k.getAtomName(),B=j?this.getPdbCharge(n,v):k.getFormalCharge(),n=this.addAtom(g,k,v,q,e,B,n);b&&this.htAtomMap.put(k.getUniqueID(),n)}0<this.groupCount&&j&&this.jbr.addImplicitHydrogenAtoms(a,this.groupCount-1,this.isNewChain?1:0);c=-1;a=null;b=this.ms.at;for(e=y[0].firstAtomIndex=0;e<this.ms.ac;e++)null!=b[e]&&b[e].mi>c&&(c=b[e].mi,k=y[c],k.firstAtomIndex=e,k.isOrderly=k.act==k.bsAtoms.length()-e,k=this.ms.getDefaultVdwType(c),k!==a&&(JU.Logger.info("Default Van der Waals type for model set to "+
k.getVdwLabel()),a=k));JU.Logger.info(d+" atoms created")},"J.api.JmolAdapter,~O,~B");c(b,"getAtomSiteBase",function(a){for(var d=0,b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1)){var c=this.ms.at[b];!JM.AtomCollection.isDeleted(c)&&c.atomSite>d&&(d=c.atomSite)}return d},"JU.BS");c(b,"addJmolDataProperties",function(a,d){if(null!=d){var b=d.get("properties");if(!b.containsKey("spinZ"))for(var c=a.bsAtoms,e=c.cardinality(),g,b=b.entrySet().iterator();b.hasNext()&&((g=b.next())||1);){var j=g.getKey(),k=
g.getValue();if(k.length!=e)break;var f=j.startsWith("property_")?1715472409:JS.T.getTokFromName(j);switch(f){default:if(JS.T.tokAttr(f,2048)){this.vwr.setAtomProperty(c,f,0,0,null,k,null);break}case 1111492629:case 1111492630:case 1111492631:j="property_"+j;case 1715472409:this.vwr.setData(j,z(-1,[j,k,c,Integer.$valueOf(1)]),0,0,0,0,0)}}}},"JM.Model,java.util.Map");c(b,"getPdbCharge",function(a,d){return a.equals("ARG")&&d.equals("NH1")||a.equals("LYS")&&d.equals("NZ")||a.equals("HIS")&&d.equals("ND1")?
1:0},"~S,~S");c(b,"addAtom",function(a,d,b,c,e,g,j){var k=d.getSymmetry(),f=d.getAtomSite()+e,y=d.getPartialCharge(),n=d.getTensors(),q=d.getOccupancy(),v=d.getBfactor(),B=d.getXYZ(),m=d.getIsHetero(),r=0>d.getPart(),s=d.getSerial(),u=d.getSeqID(),w=d.getVib();e=d.getAltLoc();var z=d.getRadius();d=d.getBondRadius();var x=0,A=null;if(null!=b){var C;if(0<=(C=b.indexOf("\x00")))A=b.substring(C+1),b=b.substring(0,C);a&&(0<=b.indexOf("*")&&(b=b.$replace("*","'")),x=this.vwr.getJBR().lookupSpecialAtomID(b),
2==x&&"CA".equalsIgnoreCase(j)&&(x=0))}a=this.ms.addAtom(this.iModel,this.nullGroup,c,b,A,s,u,f,B,z,w,g,y,q,v,n,m,r,x,k,d);a.altloc=e;return a},"~B,J.api.JmolAdapterAtomIterator,~S,~N,~N,~N,~S");c(b,"checkNewGroup",function(a,d,b,c,e,g,j){d!=this.currentChainID&&(this.currentChainID=d,this.currentChain=this.getOrAllocateChain(this.model,d),this.currentGroupInsertionCode="\uffff",this.currentGroupSequenceNumber=-1,this.currentGroup3="xxxx",this.isNewChain=!0);d=null==b?null:b.intern();if(c!=this.currentGroupSequenceNumber||
e!=this.currentGroupInsertionCode||d!==this.currentGroup3){0<this.groupCount&&g&&(this.jbr.addImplicitHydrogenAtoms(a,this.groupCount-1,this.isNewChain&&!j?1:0),this.jbr.setHaveHsAlready(!1));this.currentGroupSequenceNumber=c;this.currentGroupInsertionCode=e;for(this.currentGroup3=d;this.groupCount>=this.group3Of.length;)this.chainOf=JU.AU.doubleLength(this.chainOf),this.group3Of=JU.AU.doubleLengthS(this.group3Of),this.seqcodes=JU.AU.doubleLengthI(this.seqcodes),this.firstAtomIndexes=JU.AU.doubleLengthI(this.firstAtomIndexes);
this.firstAtomIndexes[this.groupCount]=this.ms.ac;this.chainOf[this.groupCount]=this.currentChain;this.group3Of[this.groupCount]=b;this.seqcodes[this.groupCount]=JM.Group.getSeqcodeFor(c,e);++this.groupCount}},"J.api.JmolAdapter,~N,~S,~N,~S,~B,~B");c(b,"getOrAllocateChain",function(a,d){var b=a.getChain(d);if(null!=b)return b;a.chainCount==a.chains.length&&(a.chains=0==a.chainCount?Array(2):JU.AU.doubleLength(a.chains));return a.chains[a.chainCount++]=new JM.Chain(a,d,0==d||32==d?0:++this.iChain)},
"JM.Model,~N");c(b,"iterateOverAllNewBonds",function(a){for(var d=this.isMutate&&!this.vwr.getBoolean(603979894),b=!1;a.hasNext();){var c=a.getEncodedOrder(),e=d?1:c,c=this.bondAtoms(a.getAtomUniqueID1(),a.getAtomUniqueID2(),e);null!=c&&(1<e&&(1025!=e&&1041!=e)&&(b=!0),e=a.getPymolRadius(),0<e&&c.setMad(xa(2E3*e)),e=a.getColix(),0<=e&&(c.colix=e))}b&&(this.ms.someModelsHaveSymmetry&&!this.vwr.getBoolean(603979794))&&JU.Logger.info('ModelSet: use "set appletSymmetryToBonds TRUE " to apply the file-based multiple bonds to symmetry-generated atoms.')},
"J.api.JmolAdapterBondIterator");c(b,"bondAtoms",function(a,d,b){var c=this.htAtomMap.get(a);if(null==c)return JU.Logger.error("bondAtoms cannot find atomUid1?:"+a),null;a=this.htAtomMap.get(d);if(null==a)return JU.Logger.error("bondAtoms cannot find atomUid2?:"+d),null;if(c.isBonded(a))return null;1025==b||1041==b?(d=c.getModelIndex(),d!=this.lastModel&&(this.lastModel=d,d=this.ms.getModelAuxiliaryInfo(d),this.isMOL2D=this.is2D||null!=d&&"2D".equals(d.get("dimension"))),b=this.ms.bondMutually(c,
a,this.isMOL2D?b:513,this.ms.getDefaultMadFromOrder(1),0),this.isMOL2D&&(null==this.vStereo&&(this.vStereo=new JU.Lst),this.vStereo.addLast(b))):(b=this.ms.bondMutually(c,a,b,this.ms.getDefaultMadFromOrder(b),0),b.isAromatic()&&(this.ms.someModelsHaveAromaticBonds=!0));this.ms.bondCount==this.ms.bo.length&&(this.ms.bo=JU.AU.arrayCopyObject(this.ms.bo,this.ms.bondCount+250));this.ms.setBond(this.ms.bondCount++,b);return b},"~O,~O,~N");c(b,"initializeUnitCellAndSymmetry",function(){this.someModelsAreModulated&&
null==this.ms.bsModulated&&(this.ms.bsModulated=new JU.BS);var a=null!=this.modelSet0&&null!=this.modelSet0.unitCells;if(this.someModelsHaveUnitcells||a){this.ms.unitCells=Array(this.ms.mc);this.ms.haveUnitCells=!0;for(var d=0,b=0;d<this.ms.mc;d++){var c=this.ms.getModelAuxiliaryInfo(d);if(a&&d<this.baseModelCount)this.ms.unitCells[d]=this.modelSet0.unitCells[d];else if(null!=c.get("spaceGroupIndex")){this.ms.unitCells[d]=J.api.Interface.getSymmetry(this.vwr,"file");c=null;if(this.isTrajectory){var e=
this.ms.getInfoM("unitCells");null!=e&&(c=e.get(b++))}this.ms.unitCells[d].setSymmetryInfoFromFile(this.ms,d,c)}}}if(this.appendNew&&this.ms.someModelsHaveSymmetry){this.ms.getAtoms(1088421903,null);a=this.ms.at;d=this.baseAtomIndex;b=-1;for(c=0;d<this.ms.ac;d++){if(a[d].mi!=b){b=a[d].mi;c=this.baseAtomIndex+this.ms.getInfoI(b,"presymmetryAtomIndex");if(0>c)break;e=this.ms.getInfoI(b,"presymmetryAtomCount");this.ms.am[b].auxiliaryInfo.put("presymmetryAtomIndex",Integer.$valueOf(c));this.ms.setInfo(b,
"asymmetricUnit",this.ms.am[b].bsAsymmetricUnit=JU.BSUtil.newBitSet2(c,c+e));c+=e}d>=c&&this.ms.bsSymmetry.set(d)}}if(this.appendNew&&this.ms.someModelsHaveFractionalCoordinates){a=this.ms.at;b=-1;c=null;e=!1;for(d=this.baseAtomIndex;d<this.ms.ac;d++)if(a[d].mi!=b&&(b=a[d].mi,c=this.ms.getUnitCell(b),e=null!=c&&c.getCoordinatesAreFractional()),e){var g=null==this.ms.getModulation(d)?c:a[d].getUnitCell();g.toCartesian(g.toSupercell(a[d]),!1)}for(d=this.baseModelIndex;d<this.ms.mc;d++)this.ms.isTrajectory(d)&&
this.ms.trajectory.setUnitCell(d)}});c(b,"initializeBonding",function(){var a=this.ms.mc,d=this.ms.am,b=0,c=this.ms.getInfoM("bsExcludeBonding");null==c&&(c=null==this.ms.getInfoM(JV.JC.getBoolName(3))?null:new JU.BS,null!=c&&this.ms.setPdbConectBonding(this.baseAtomIndex,this.baseModelIndex,c));var e=this.vwr.getBoolean(603979794),g=this.vwr.getBoolean(603979798),j=this.vwr.getBoolean(603979848),k=null,f=!1;if(!this.noAutoBond)for(var y=this.baseModelIndex;y<a;y++){var b=d[y].bsAtoms.cardinality(),
n=this.ms.getInfoI(y,"initialBondCount"),q=d[y].isBioModel;0>n&&(n=this.ms.bondCount);if(j||g&&(0==n||q&&null==this.jmolData&&(this.ms.getMSInfoB("havePDBHeaderName")||n<w(b/2))||this.ms.getInfoB(y,"hasSymmetry")&&!e&&!this.ms.getInfoB(y,"hasBonds")))if(f=!0,this.merging||1<a)null==k&&(k=JU.BS.newN(this.ms.ac)),(y==this.baseModelIndex||!this.isTrajectory)&&k.or(d[y].bsAtoms)}this.modulationOn&&this.ms.setModulation(null,!0,this.modulationTUV,!1);f?(this.ms.autoBondBs4(k,k,c,null,this.ms.defaultCovalentMad,
this.vwr.getBoolean(603979872),null),JU.Logger.info("ModelSet: autobonding; use  autobond=false  to not generate bonds automatically")):JU.Logger.info("ModelSet: not autobonding; use  forceAutobond=true  to force automatic bond creation")});c(b,"finalizeGroupBuild",function(){this.groups=Array(this.groupCount);if(this.merging)for(var a=0;a<this.$mergeGroups.length;a++)(this.groups[a]=this.$mergeGroups[a]).chain.model.ms=this.ms;for(a=this.baseGroupIndex;a<this.groupCount;++a)this.distinguishAndPropagateGroup(a,
this.chainOf[a],this.group3Of[a],this.seqcodes[a],this.firstAtomIndexes[a],(a==this.groupCount-1?this.ms.ac:this.firstAtomIndexes[a+1])-1);if(null!=this.group3Lists){this.ms.msInfo.put("group3Lists",this.group3Lists);this.ms.msInfo.put("group3Counts",this.group3Counts);for(a=0;a<this.group3Counts.length;a++)null==this.group3Counts[a]&&(this.group3Counts[a]=D(0,0))}});c(b,"distinguishAndPropagateGroup",function(a,d,b,c,e,g){if(g<e)throw new NullPointerException;var j=null==b||null==this.jbr?null:this.jbr.distinguishAndPropagateGroup(d,
b,c,e,g,this.specialAtomIndexes,this.ms.at);null==j?(j=(new JM.Group).setGroup(d,b,c,e,g),null!=this.jbr&&(j.groupID=this.jbr.getGroupID(b)),c="o>"):c=j.isProtein()?"p>":j.isNucleic()?"n>":j.isCarbohydrate()?"c>":"o>";null!=b&&(this.countGroup(this.ms.at[e].mi,c,b),j.isNucleic()&&(b=null==this.htGroup1?null:this.htGroup1.get(b),null!=b&&(j.group1=b.charAt(0))));this.groups[a]=d.addGroup(j,a);for(a=g+1;--a>=e;)this.ms.at[a].group=j},"~N,JM.Chain,~S,~N,~N,~N");c(b,"countGroup",function(a,d,b){var c=
a+1;if(!(null==this.group3Lists||null==this.group3Lists[c])){var e=(b+"   ").substring(0,3),g=this.group3Lists[c].indexOf(e);0>g&&(this.group3Lists[c]+=",["+e+"]",g=this.group3Lists[c].indexOf(e),this.group3Counts[c]=JU.AU.arrayCopyI(this.group3Counts[c],this.group3Counts[c].length+10));this.group3Counts[c][w(g/6)]++;g=this.group3Lists[c].indexOf(",["+e);0<=g&&(this.group3Lists[c]=this.group3Lists[c].substring(0,g)+d+this.group3Lists[c].substring(g+2));0<=a&&this.countGroup(-1,d,b)}},"~N,~S,~S");
c(b,"freeze",function(){this.htAtomMap.clear();this.ms.ac<this.ms.at.length&&this.ms.growAtomArrays(this.ms.ac);this.ms.bondCount<this.ms.bo.length&&(this.ms.bo=JU.AU.arrayCopyObject(this.ms.bo,this.ms.bondCount));for(var a=5;0<--a;){this.ms.numCached[a]=0;for(var d=this.ms.freeBonds[a],b=d.length;0<=--b;)d[b]=null}this.ms.setAtomNamesAndNumbers(0,this.baseAtomIndex,this.modelSet0,!1);this.findElementsPresent();this.ms.resetMolecules();this.currentChain=this.model=null;!this.ms.haveBioModels||this.isPyMOLsession||
this.isMutate?this.ms.freezeModels():(a=this.vwr.getBoolean(603979826),a=this.ms.calculateStructuresAllExcept(this.structuresDefinedInFile,a,!1,!0,!0,a,1405E3<=JV.JC.versionInt&&null==this.ms.getInfoM("DSSP1")?2:1),0<a.length&&JU.Logger.info(a))});c(b,"findElementsPresent",function(){this.ms.elementsPresent=Array(this.ms.mc);for(var a=0;a<this.ms.mc;a++)this.ms.elementsPresent[a]=JU.BS.newN(64);for(a=this.ms.ac;0<=--a;){var d=this.ms.at[a];if(null!=d){var b=d.getAtomicAndIsotopeNumber();b>=JU.Elements.elementNumberMax&&
(b=JU.Elements.elementNumberMax+JU.Elements.altElementIndexFromNumber(b));this.ms.elementsPresent[d.mi].set(b)}}});c(b,"setupMinimization",function(){this.initialize2DMin();var a=new JU.V3,d=1;if(null!=this.vStereo){var b=this.vStereo.size();a:for(;0<=--b;)for(var c=this.vStereo.get(b),e=c.atom1,g=e.bonds,j=e.getBondCount();0<=--j;){var k=g[j];if(k!==c&&(k=k.getOtherAtom(e),a.sub2(k,e),0.1>Math.abs(a.x))){1025==c.order==0>a.y&&(d=-1);break a}}}this.set2dZ(a,d);if(null!=this.vStereo){a=JU.BSUtil.newBitSet2(this.baseAtomIndex,
this.ms.ac);for(b=this.vStereo.size();0<=--b;){c=this.vStereo.get(b);d=1025==c.order?3:-3;c.order=1;6>c.atom1.getBondCount()&&(c.atom2.z!=c.atom1.z&&0>d==c.atom2.z<c.atom1.z)&&(d/=3);e=JU.JmolMolecule.getBranchBitSet(this.ms.at,c.atom2.i,a,null,c.atom1.i,!1,!0);e.set(c.atom2.i);for(j=e.nextSetBit(0);0<=j;j=e.nextSetBit(j+1))this.ms.at[j].z+=d;c.atom2.x=(c.atom1.x+c.atom2.x)/2;c.atom2.y=(c.atom1.y+c.atom2.y)/2}this.vStereo=null}this.is2D=!1});c(b,"initialize2DMin",function(){for(var a=0,d=0,b=-1,c=
this.baseAtomIndex,e=this.ms.ac,g=c;g<e;g++){var j=this.ms.at[g],k=j.getModelIndex();k!=b&&(b=k,this.ms.setInfo(k,"dimension","3D"));k=j.bonds;if(null!=k)for(var f=k.length;0<=--f;)if(null!=k[f]){var y=k[f].getOtherAtom(j);1!=y.getAtomNumber()&&y.getIndex()>g&&(a+=y.distance(j),d++)}}if(0!=d){a=1.45/(a/d);for(g=c;g<e;g++)this.ms.at[g].scale(a)}});c(b,"set2dZ",function(a,d){var b=this.baseAtomIndex,c=this.ms.ac,e=JU.BS.newN(c),g=new JU.BS,j=JU.V3.new3(0,1,0),k=new JU.V3,f=new JU.BS;for(f.setBits(b,
c);b<c;b++)!e.get(b)&&!g.get(b)&&(g=this.getBranch2dZ(b,-1,f,g,a,j,k,d),e.or(g))},"JU.V3,~N");c(b,"getBranch2dZ",function(a,d,b,c,e,g,j,k){c=JU.BS.newN(this.ms.ac);if(0>a)return c;b=JU.BSUtil.copy(b);0<=d&&b.clear(d);JM.ModelLoader.setBranch2dZ(this.ms.at[a],c,b,e,g,j,k);return c},"~N,~N,JU.BS,JU.BS,JU.V3,JU.V3,JU.V3,~N");b.setBranch2dZ=c(b,"setBranch2dZ",function(a,d,b,c,e,g,j){var k=a.i;if(b.get(k)&&(b.clear(k),d.set(k),null!=a.bonds))for(k=a.bonds.length;0<=--k;){var f=a.bonds[k];f.isHydrogen()||
(f=f.getOtherAtom(a),JM.ModelLoader.setAtom2dZ(a,f,c,e,g,j),JM.ModelLoader.setBranch2dZ(f,d,b,c,e,g,j))}},"JM.Atom,JU.BS,JU.BS,JU.V3,JU.V3,JU.V3,~N");b.setAtom2dZ=c(b,"setAtom2dZ",function(a,d,b,c,e,g){b.sub2(d,a);b.z=0;b.normalize();e.cross(c,b);b=Math.acos(b.dot(c));g=0.4*-g*Math.sin(4*b);d.z=a.z+g},"JM.Atom,JM.Atom,JU.V3,JU.V3,JU.V3,~N");c(b,"finalizeShapes",function(){this.ms.sm=this.vwr.shm;this.ms.sm.setModelSet(this.ms);this.ms.setBsHidden(this.vwr.slm.getHiddenSet());this.merging||this.ms.sm.resetShapes(!1);
this.ms.sm.loadDefaultShapes(this.ms);this.ms.someModelsHaveAromaticBonds&&this.vwr.getBoolean(603979944)&&this.ms.assignAromaticBondsBs(!1,null);this.merging&&1==this.baseModelCount&&this.ms.sm.setShapePropertyBs(6,"clearModelIndex",null,null)});c(b,"undeleteAtom",function(a){this.ms.at[a].valence=0},"~N");b.createAtomDataSet=c(b,"createAtomDataSet",function(a,d,b,c,e){if(null==c)return null;var g=a.getModelAdapter(),j=new JU.P3,k=d.at,f=a.getFloat(570425363);if(null!=d.unitCells)for(var y=e.nextSetBit(0);0<=
y;y=e.nextSetBit(y+1))if(null!=k[y].atomSymmetry){f=-f;break}for(var y=-1,n=0,q=JU.BSUtil.cardinalityOf(e)==a.ms.ac,v=g.getAtomIterator(c);v.hasNext();){var B=v.getXYZ();if(!Float.isNaN(B.x+B.y+B.z))if(1145047049==b){y=e.nextSetBit(y+1);if(0>y)break;n++;JU.Logger.debugging&&JU.Logger.debug("atomIndex = "+y+": "+k[y]+" --\x3e ("+B.x+","+B.y+","+B.z);d.setAtomCoord(y,B.x,B.y,B.z)}else{j.setT(B);B=JU.BS.newN(d.ac);d.getAtomsWithin(f,j,B,-1);B.and(e);if(q)if(n=JU.BSUtil.cardinalityOf(B),0==n){JU.Logger.warn("createAtomDataSet: no atom found at position "+
j);continue}else 1<n&&JU.Logger.debugging&&JU.Logger.debug("createAtomDataSet: "+n+" atoms found at position "+j);switch(b){case 1145047055:var m=v.getVib();if(null==m)continue;JU.Logger.debugging&&JU.Logger.debug("xyz: "+j+" vib: "+m);d.setAtomCoords(B,1145047055,m);break;case 1128269825:d.setAtomProperty(B,b,0,v.getOccupancy(),null,null,null);break;case 1111492619:d.setAtomProperty(B,b,0,v.getPartialCharge(),null,null,null);break;case 1111492620:d.setAtomProperty(B,b,0,v.getBfactor(),null,null,
null)}}}switch(b){case 1145047055:d=g.getAtomSetName(c,0);JU.Logger.info("_vibrationName = "+d);a.setStringProperty("_vibrationName",d);break;case 1145047049:if(JU.Logger.info(n+" atom positions read"),d.recalculateLeadMidpointsAndWingVectors(-1),n==d.ac)return"boundbox {*};reset"}return null},"JV.Viewer,JM.ModelSet,~N,~O,JU.BS")});m("JM");x(["JM.BondCollection"],"JM.ModelSet","java.util.Hashtable JU.A4 $.AU $.BS $.Lst $.M3 $.M4 $.Measure $.P3 $.P4 $.PT $.Quat $.SB $.V3 J.api.Interface J.atomdata.RadiusData J.bspt.Bspf J.c.PAL $.VDW JM.Atom $.AtomIteratorWithinModel $.AtomIteratorWithinModelSet $.HBond $.Model $.StateScript JS.ScriptCompiler JU.BSUtil $.BoxInfo $.Edge $.Elements $.Escape $.JmolMolecule $.Logger JV.JC".split(" "),
function(){var b=s(function(){this.haveBioModels=!1;this.am=this.modelSetName=this.bsSymmetry=null;this.mc=0;this.unitCells=null;this.haveUnitCells=!1;this.elementsPresent=this.frameTitles=this.modelNames=this.modelNumbersForAtomLabel=this.modelFileNumbers=this.modelNumbers=this.closest=null;this.isXYZ=!1;this.msInfo=this.modelSetProperties=null;this.isBbcageDefault=this.someModelsHaveFractionalCoordinates=this.someModelsHaveAromaticBonds=this.someModelsHaveSymmetry=!1;this.stateScripts=this.boxInfo=
this.bboxAtoms=this.bboxModels=null;this.thisStateModel=0;this.selectedMolecules=this.vibrationSteps=null;this.showRebondTimes=!0;this.sm=this.bsAll=null;this.proteinStructureTainted=!1;this.defaultBBox=this.vTemp=this.mat4t=this.mat4=this.matInv=this.matTemp=this.ptTemp2=this.ptTemp1=this.ptTemp=this.vOrientations=this.htPeaks=null;this.echoShapeActive=this.haveJmolDataFrames=!1;this.translations=this.modelSetTypeName=null;this.maxBondWarned=!1;r(this,arguments)},JM,"ModelSet",JM.BondCollection);
u(b,function(a,b){K(this,JM.ModelSet,[]);this.vwr=a;this.modelSetName=b;this.selectedMolecules=new JU.BS;this.stateScripts=new JU.Lst;this.boxInfo=new JU.BoxInfo;this.boxInfo.addBoundBoxPoint(JU.P3.new3(-10,-10,-10));this.boxInfo.addBoundBoxPoint(JU.P3.new3(10,10,10));this.am=Array(1);this.modelNumbers=D(1,0);this.modelFileNumbers=D(1,0);this.modelNumbersForAtomLabel=Array(1);this.modelNames=Array(1);this.frameTitles=Array(1);this.closest=Array(1);this.ptTemp=new JU.P3;this.ptTemp1=new JU.P3;this.ptTemp2=
new JU.P3;this.matTemp=new JU.M3;this.matInv=new JU.M3;this.mat4=new JU.M4;this.mat4t=new JU.M4;this.vTemp=new JU.V3;this.setupBC()},"JV.Viewer,~S");c(b,"getBoxInfo",function(){return this.boxInfo});c(b,"releaseModelSet",function(){this.am=null;this.mc=0;this.unitCells=this.bsAll=this.bsSymmetry=this.am=this.closest[0]=null;this.releaseModelSetBC()});c(b,"getEchoStateActive",function(){return this.echoShapeActive});c(b,"setEchoStateActive",function(a){this.echoShapeActive=a},"~B");c(b,"getModelSetTypeName",
function(){return this.modelSetTypeName});c(b,"getModelNumberIndex",function(a,b,c){if(b){for(b=0;b<this.mc;b++)if(this.modelNumbers[b]==a||1E6>a&&this.modelNumbers[b]==1E6+a)return b;return-1}if(1E6>a)return a;for(b=0;b<this.mc;b++)if(this.modelFileNumbers[b]==a)return c&&this.isTrajectory(b)&&this.setTrajectory(b),b;return-1},"~N,~B,~B");c(b,"getModelDataBaseName",function(a){for(var b=0;b<this.mc;b++)if(a.equals(this.am[b].bsAtoms))return this.getInfo(b,"dbName");return null},"JU.BS");c(b,"setTrajectory",
function(a){0<=a&&(this.isTrajectory(a)&&this.at[this.am[a].firstAtomIndex].mi!=a)&&this.trajectory.setModel(a)},"~N");c(b,"getBitSetTrajectories",function(){return null==this.trajectory?null:this.trajectory.getModelsSelected()});c(b,"setTrajectoryBs",function(a){if(null!=this.trajectory)for(var b=0;b<this.mc;b++)a.get(b)&&this.setTrajectory(b)},"JU.BS");c(b,"morphTrajectories",function(a,b,c){0<=a&&(0<=b&&this.isTrajectory(a)&&this.isTrajectory(b))&&this.trajectory.morph(a,b,c)},"~N,~N,~N");c(b,
"getTranslation",function(a){return null==this.translations||a>=this.translations.length?null:this.translations[a]},"~N");c(b,"translateModel",function(a,b){if(null==b){var c=this.getTranslation(a);null!=c&&(b=JU.P3.newP(c),b.scale(-1),this.translateModel(a,b),this.translations[a]=null)}else{if(null==this.translations||this.translations.length<=a)this.translations=Array(this.mc);null==this.translations[a]&&(this.translations[a]=new JU.P3);this.translations[a].add(b);for(var c=this.am[a].bsAtoms,e=
c.nextSetBit(0);0<=e;e=c.nextSetBit(e+1))this.at[e].add(b)}},"~N,JU.T3");c(b,"getFrameOffsets",function(a,b){if(null==a){if(b)for(var c=this.mc;0<=--c;){var e=this.am[c];!e.isJmolDataFrame&&!e.isTrajectory&&this.translateModel(e.modelIndex,null)}return null}if(0>a.nextSetBit(0))return null;if(b){for(var g=JU.BSUtil.copy(a),j=null,k=new JU.P3,c=0;c<this.mc;c++){e=this.am[c];if(!e.isJmolDataFrame&&!e.isTrajectory){var f=g.nextSetBit(0);e.bsAtoms.get(f)&&(null==j?j=JU.P3.newP(this.at[f]):(k.sub2(j,this.at[f]),
this.translateModel(c,k)))}g.andNot(e.bsAtoms)}return null}g=Array(this.mc);for(c=this.mc;0<=--c;)g[c]=new JU.P3;for(var j=-1,k=0,f=null,y=null!=this.trajectory&&this.trajectory.steps.size()==this.mc,n=y?this.mc:1,e=0;e<n;e++){y&&this.setTrajectory(e);for(c=0;c<=this.ac;c++)if(!(c<this.ac&&JM.AtomCollection.isDeleted(this.at[c]))){if(c==this.ac||this.at[c].mi!=j){0<k&&(f.scale(-1/k),0!=j&&f.sub(g[0]),k=0);if(c==this.ac)break;j=this.at[c].mi;f=g[j]}a.get(c)&&(f.add(this.at[c]),k++)}}g[0].set(0,0,0);
return g},"JU.BS,~B");c(b,"getAtoms",function(a,b){switch(a){default:return JU.BSUtil.andNot(this.getAtomBitsMaybeDeleted(a,b),this.vwr.slm.bsDeleted);case 1073742358:var c=b.intValue(),e=this.getModelNumberIndex(c,!0,!0);return 0>e&&0<c?new JU.BS:this.vwr.getModelUndeletedAtomsBitSet(e);case 1275203608:return c=z(-1,[null,null,null]),this.vwr.shm.getShapePropertyData(21,"getCenters",c),null==c[1]?new JU.BS:c[1]}},"~N,~O");c(b,"findNearestAtomIndex",function(a,b,c,e){if(0==this.ac)return-1;this.closest[0]=
null;if(this.vwr.am.splitFrame){a=this.vwr.am.setSplitFrameMouse(a);var g=this.vwr.am.getSplitFrameAtoms(!1);null==c?c=g:(c=JU.BSUtil.copy(c),c.or(g))}this.g3d.isAntialiased()&&(a<<=1,b<<=1);this.findNearest2(a,b,this.closest,c,e);this.sm.findNearestShapeAtomIndex(a,b,this.closest,c);a=null==this.closest[0]?-1:this.closest[0].i;this.closest[0]=null;return a},"~N,~N,JU.BS,~N");c(b,"calculatePointGroup",function(a,b){return this.calculatePointGroupForFirstModel(a,!1,!1,null,0,0,null,b,null)},"JU.BS,JU.P3");
c(b,"getPointGroupInfo",function(a,b){return this.calculatePointGroupForFirstModel(a,!1,!0,b,0,0,null,null,null)},"JU.BS,~S");c(b,"getPointGroupAsString",function(a,b,c,e,g,j,k){return this.calculatePointGroupForFirstModel(a,!0,!1,b,c,e,g,j,k)},"JU.BS,~S,~N,~N,~A,JU.P3,~S");c(b,"calculatePointGroupForFirstModel",function(a,b,c,e,g,j,k,f,y){var n=this.pointGroup,q=null,v=!1,B=!1,m=!1,r=null!=k,s=this.vwr.am.cmi;if(!r)if(k=null==a?-1:a.nextSetBit(0),0>s&&0<=k&&(s=this.at[k].mi),0>s&&(s=this.vwr.getVisibleFramesBitSet().nextSetBit(0),
a=null),q=this.vwr.getModelUndeletedAtomsBitSet(s),m=null!=a&&q.cardinality()!=a.cardinality(),null!=a&&q.and(a),k=q.nextSetBit(0),0>k&&(q=this.vwr.getModelUndeletedAtomsBitSet(s),k=q.nextSetBit(0)),B=this.vwr.shm.getShapePropertyIndex(18,"mad",k),v=null!=B&&0!=B.intValue()||this.vwr.tm.vibrationOn,B=null!=e&&0<=e.toUpperCase().indexOf(":POLY")){n=z(-1,[Integer.$valueOf(k),null]);this.vwr.shm.getShapePropertyData(21,"points",n);k=n[1];if(null==k)return null;q=null;v=!1;n=null}else k=this.at;var u;
if(null!=e&&0<=(u=e.indexOf(":")))e=e.substring(0,u);if(null!=e&&0<=(u=e.indexOf(".")))g=JU.PT.parseInt(e.substring(u+1)),0>g&&(g=0),e=e.substring(0,u);u=null;if(0>this.getJmolDataFrameInt(g,1095241729)||null==(u=this.getUnitCell(g)))u=J.api.Interface.getSymmetry(this.vwr,"calcPG");n=u.setPointGroup(this.vwr,n,f,k,q,v,r?0:this.vwr.getFloat(570425382),this.vwr.getFloat(570425384),null==q?k.length:q.cardinality(),m);!B&&!r&&(this.pointGroup=n);if(!b&&!c)return n.getPointGroupName();b=n.getPointGroupInfo(s,
y,c,e,g,j);return c?b:(1<this.mc?"frame "+this.getModelNumberDotted(s)+"; ":"")+b},"JU.BS,~B,~B,~S,~N,~N,~A,JU.P3,~S");c(b,"getDefaultStructure",function(a,b){return this.haveBioModels?this.bioModelset.getAllDefaultStructures(a,b):""},"JU.BS,JU.BS");c(b,"deleteModelBonds",function(a){a=this.getModelAtomBitSetIncludingDeleted(a,!1);this.makeConnections(0,3.4028235E38,131071,12291,a,a,null,!1,!1,0)},"~N");c(b,"makeConnections",function(a,b,c,e,g,j,k,f,y,n){this.moleculeCount=0;var q=1073741852==e&&
2048!=c?new JU.SB:null;a=this.makeConnections2(a,b,c,e,g,j,k,f,y,n,q);null!=q&&this.addStateScript(q.toString(),null,null,null,null,!1,!0);return a},"~N,~N,~N,~N,JU.BS,JU.BS,JU.BS,~B,~B,~N");c(b,"setPdbConectBonding",function(a,b,c){for(var e=this.vwr.getMadBond();b<this.mc;b++){var g=this.getInfo(b,"PDB_CONECT_bonds");if(null!=g){var j=g.size();this.setInfo(b,"initialBondCount",Integer.$valueOf(j));var k=this.getInfo(b,"PDB_CONECT_firstAtom_count_max"),f=k[0]+a,y=f+k[1];y>this.atomSerials.length&&
(y=this.atomSerials.length);for(var k=k[2],n=D(k+1,0),q=f;q<y;q++)if(0<(f=this.atomSerials[q]))n[f]=q+1;for(y=0;y<j;y++){var f=g.get(y),q=f[0],v=f[1],f=f[2];if(!(0>q||0>v||q>k||v>k))if(q=n[q]-1,v=n[v]-1,!(0>q||0>v)){var B=this.at[q],m=this.at[v];null!=c&&(B.isHetero()&&c.set(q),m.isHetero()&&c.set(v));if(B.altloc==m.altloc||"\x00"==B.altloc||"\x00"==m.altloc)this.getOrAddBond(B,m,f,2048==f?1:e,null,0,!1)}}}}},"~N,~N,JU.BS");c(b,"deleteAllBonds",function(){this.moleculeCount=0;for(var a=this.stateScripts.size();0<=
--a;)this.stateScripts.get(a).isConnect()&&this.stateScripts.removeItemAt(a);this.deleteAllBonds2()});c(b,"includeAllRelatedFrames",function(a,b){for(var c=0,e=0;e<this.mc;e++){var g=this.isTrajectory(e),j=g&&a.get(c=this.am[e].trajectoryBaseIndex);if(a.get(e)){if(g&&!j){a.set(c);this.includeAllRelatedFrames(a,!1);break}}else g||this.isJmolDataFrame(e)&&a.get(this.am[e].dataSourceFrame)?a.set(e):b&&0<=this.am[e].dataSourceFrame&&a.set(this.am[e].dataSourceFrame)}},"JU.BS,~B");c(b,"deleteModels",function(a){this.includeAllRelatedFrames(a,
!1);var b=a.cardinality();if(0==b)return null;this.moleculeCount=0;null!=this.msInfo&&this.msInfo.remove("models");for(var c=new JU.BS,e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))this.clearDataFrameReference(e),c.or(this.am[e].bsAtoms);var g;if(b==this.mc)return g=this.getModelAtomBitSetIncludingDeleted(-1,!0),this.vwr.zap(!0,!1,!1),g;this.validateBspf(!1);g=new JU.BS;for(var j=!0,k=!1,f=new JU.BS,y=c.nextSetBit(0),e=0;e<this.mc;e++)c=this.am[e],e<this.mc-1&&(j=(new Boolean(j&(c.isOrderly||c.bsAtoms.length()<=
y))).valueOf()),a.get(e)?(0<=c.fileIndex&&f.set(c.fileIndex),g.or(this.getModelAtomBitSetIncludingDeleted(e,!1))):0<=c.fileIndex&&f.get(c.fileIndex)&&(k=!0);if(!j||k)return this.vwr.deleteAtoms(g,!1),null;b=Array(this.mc-b);j=this.am;for(k=e=0;e<this.mc;e++)a.get(e)||(c=this.am[e],c.modelIndex=k,b[k++]=c);this.am=b;c=this.mc;f=this.getBondsForSelectedAtoms(g,!0);this.deleteBonds(f,!0);for(k=e=0;e<c;e++)if(a.get(e)){var n=j[e],y=n.act;if(0!=y){var q=n.bsAtoms,n=n.firstAtomIndex;JU.BSUtil.deleteBits(this.bsSymmetry,
q);this.deleteModel(k,q,f);this.deleteModelAtoms(n,y,q);this.vwr.deleteModelAtoms(k,n,y,q);for(var v=c;--v>e;)j[v].fixIndices(k,y,q);this.vwr.shm.deleteShapeAtoms(z(-1,[b,this.at,D(-1,[k,n,y])]),q);this.mc--}}else k++;this.haveBioModels=!1;for(e=this.mc;0<=--e;)this.am[e].isBioModel&&(this.haveBioModels=!0,this.bioModelset.set(this.vwr,this));this.validateBspf(!1);this.bsAll=null;this.resetMolecules();this.isBbcageDefault=!1;this.calcBoundBoxDimensions(null,1);return g},"JU.BS");c(b,"resetMolecules",
function(){this.molecules=this.bsAll=null;this.moleculeCount=0;this.resetChirality()});c(b,"resetChirality",function(){if(this.haveChirality)for(var a=-1,b=this.ac;0<=--b;){var c=this.at[b];null!=c&&(c.setCIPChirality(0),c.mi!=a&&c.mi<this.am.length&&(this.am[a=c.mi].hasChirality=!1))}});c(b,"deleteModel",function(a,b,c){if(!(0>a)){this.modelNumbers=JU.AU.deleteElements(this.modelNumbers,a,1);this.modelFileNumbers=JU.AU.deleteElements(this.modelFileNumbers,a,1);this.modelNumbersForAtomLabel=JU.AU.deleteElements(this.modelNumbersForAtomLabel,
a,1);this.modelNames=JU.AU.deleteElements(this.modelNames,a,1);this.frameTitles=JU.AU.deleteElements(this.frameTitles,a,1);this.thisStateModel=-1;var e=this.getInfoM("group3Lists"),g=this.getInfoM("group3Counts"),j=a+1;if(null!=e&&null!=e[j])for(var k=w(e[j].length/6);0<=--k;)0<g[j][k]&&(g[0][k]-=g[j][k],0==g[0][k]&&(e[0]=e[0].substring(0,6*k)+",["+e[0].substring(6*k+2)));null!=e&&(this.msInfo.put("group3Lists",JU.AU.deleteElements(e,a,1)),this.msInfo.put("group3Counts",JU.AU.deleteElements(g,a,1)));
null!=this.unitCells&&(this.unitCells=JU.AU.deleteElements(this.unitCells,a,1));for(k=this.stateScripts.size();0<=--k;)this.stateScripts.get(k).deleteAtoms(a,c,b)||this.stateScripts.removeItemAt(k)}},"~N,JU.BS,JU.BS");c(b,"setAtomProperty",function(a,b,c,e,g,j,k){switch(b){case 1114249217:case 1112152066:case 1112152071:case 1112152073:case 1112152074:case 1649022989:case 1112152078:if(4<e&&(e=4),null!=j){c=M(this.ac,0);try{var f=a.nextSetBit(0);for(g=0;0<=f;f=a.nextSetBit(f+1))c[f]=j[g++]}catch(y){if(E(y,
Exception))return;throw y;}j=c}case 1112152070:case 1112152076:f=null;c=0;null==j?(16<e&&(e=16.1),0>e&&(e=0),c=w(Math.floor(2E3*e))):f=new J.atomdata.RadiusData(j,0,null,null);this.sm.setShapeSizeBs(JV.JC.shapeTokenIndex(b),c,f,a);return}this.setAPm(a,b,c,e,g,j,k)},"JU.BS,~N,~N,~N,~S,~A,~A");c(b,"getFileData",function(a){if(0>a)return"";var b=this.getInfo(a,"fileData");if(null!=b)return b;if(!this.getInfoB(a,"isCIF"))return this.getPDBHeader(a);b=this.vwr.getCifData(a);this.setInfo(a,"fileData",b);
return b},"~N");c(b,"addHydrogens",function(a,b){var c=a.get(0).mi,e=new JU.BS;if(this.isTrajectory(c)||1<this.am[c].getGroupCount())return e;this.growAtomArrays(this.ac+b.length);var g=this.vwr.rd,j=this.getDefaultMadFromOrder(1);this.am[c].resetDSSR(!1);for(var k=0,f=this.am[c].act+1;k<a.size();k++,f++){var y=a.get(k),n=this.addAtom(c,y.group,1,"H"+f,null,f,y.getSeqID(),f,b[k],NaN,null,0,0,100,NaN,null,!1,!1,0,null,NaN);n.setMadAtom(this.vwr,g);e.set(n.i);this.bondAtoms(y,n,1,j,null,0,!1,!1)}this.sm.loadDefaultShapes(this);
return e},"JU.Lst,~A");c(b,"mergeModelArrays",function(a){this.at=a.at;this.bo=a.bo;this.stateScripts=a.stateScripts;this.proteinStructureTainted=a.proteinStructureTainted;this.haveJmolDataFrames=a.haveJmolDataFrames;this.thisStateModel=-1;this.bsSymmetry=a.bsSymmetry;this.modelFileNumbers=a.modelFileNumbers;this.modelNumbersForAtomLabel=a.modelNumbersForAtomLabel;this.modelNames=a.modelNames;this.modelNumbers=a.modelNumbers;this.frameTitles=a.frameTitles;this.haveChirality=a.haveChirality;this.boxInfo.setBoundBox(a.boxInfo.bbCorner0,
a.boxInfo.bbCorner1,!0,1);null!=this.msInfo&&this.msInfo.remove("models");this.mergeAtomArrays(a)},"JM.ModelSet");c(b,"getUnitCell",function(a){var b=-2147483648==a,c=!b&&0>a;b?a=this.vwr.am.cmi:c&&(a=-1-a);if(0>a||a>=this.mc)return null;this.isTrajectory(a)&&(a=this.am[a].trajectoryBaseIndex);var e=this.am[a].simpleCage,g=null;null!=this.unitCells&&(a<this.unitCells.length&&null!=this.unitCells[a]&&this.unitCells[a].haveUnitCell())&&(g=this.unitCells[a]);if(null==g&&null==e)b=this.getInfo(a,"unitCellParams"),
null!=b&&this.setModelCage(a,this.vwr.getSymTemp().setUnitCellFromParams(b,!1,NaN),!1);else if(null!=g){if(b)return b=this.vwr.getUnitCellAtomIndex(),0<b&&(g=this.getUnitCellForAtom(b)),null==e?this.setModelCagePts(a,g.getUnitCellVectors(),"cage"):e;if(c)return g}if(null==g||null!=e&&!g.isSymmetryCell(e))g=e;return g},"~N");c(b,"setModelCagePts",function(a,b,c){if(0>a&&0>(a=this.vwr.am.cmi))return null;var e=this.vwr.getSymTemp();try{return this.setModelCage(a,null==b?null:e.getUnitCell(b,!1,c),!0)}catch(g){if(E(g,
Exception))return g.printStackTrace(),null;throw g;}},"~N,~A,~S");c(b,"getModelName",function(a){return 1>this.mc?"":0<=a?this.modelNames[a]:this.modelNumbersForAtomLabel[-1-a]},"~N");c(b,"getModelTitle",function(a){a=this.getJmolDataSourceFrame(a);return this.getInfo(a,"title")},"~N");c(b,"getModelFileName",function(a){a=this.getJmolDataSourceFrame(a);return this.getInfo(a,"fileName")},"~N");c(b,"getModelFileType",function(a){a=this.getJmolDataSourceFrame(a);return this.getInfo(a,"fileType")},"~N");
c(b,"setFrameTitle",function(a,b){if("string"==typeof b)for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))this.frameTitles[c]=b;else for(var c=a.nextSetBit(0),e=0;0<=c;c=a.nextSetBit(c+1))e<b.length&&(this.frameTitles[c]=b[e++])},"JU.BS,~O");c(b,"getFrameTitle",function(a){return 0<=a&&a<this.mc?this.frameTitles[a]:""},"~N");c(b,"getModelNumberForAtomLabel",function(a){return this.modelNumbersForAtomLabel[a]},"~N");c(b,"getGroups",function(){for(var a=0,b=0;b<this.mc;b++)a+=this.am[b].getGroupCount();
for(var a=Array(a),c=b=0;b<this.mc;b++)for(var e=0;e<this.am[b].chainCount;e++)for(var g=0;g<this.am[b].chains[e].groupCount;g++)a[c]=this.am[b].chains[e].groups[g],a[c].groupIndex=c,c++;return a});c(b,"getModelIndexFromFileModel",function(a){for(var b=this.mc;0<=--b;)if(this.modelFileNumbers[b]==a)return b;return-1},"~N");c(b,"setCrystallographicDefaults",function(){return!this.haveBioModels&&(this.someModelsHaveSymmetry&&this.someModelsHaveFractionalCoordinates||null!=this.getUnitCell(this.vwr.am.cmi))});
c(b,"getBoundBoxCenter",function(a){return this.isJmolDataFrame(a)?new JU.P3:(null==this.getDefaultBoundBox()?this.boxInfo:this.defaultBBox).getBoundBoxCenter()},"~N");c(b,"getBoundBoxCornerVector",function(){return this.boxInfo.getBoundBoxCornerVector()});c(b,"getBBoxVertices",function(){return this.boxInfo.getBoundBoxVertices()});c(b,"setBoundBox",function(a,b,c,e){0==e&&null!=this.msInfo&&(this.msInfo.remove("boundbox"),this.defaultBBox=null,this.isBbcageDefault=!1,this.calcBoundBoxDimensions(null,
e=1));this.isBbcageDefault=!1;this.bboxAtoms=this.bboxModels=null;this.boxInfo.setBoundBox(a,b,c,e)},"JU.T3,JU.T3,~B,~N");c(b,"getBoundBoxCommand",function(a){if(!a&&null!=this.bboxAtoms)return"boundbox "+JU.Escape.eBS(this.bboxAtoms);this.ptTemp.setT(this.boxInfo.getBoundBoxCenter());var b=this.boxInfo.getBoundBoxCornerVector();a=a?"boundbox "+JU.Escape.eP(this.ptTemp)+" "+JU.Escape.eP(b)+"\n#or\n":"";this.ptTemp.sub(b);a+="boundbox corners "+JU.Escape.eP(this.ptTemp)+" ";this.ptTemp.scaleAdd2(2,
b,this.ptTemp);b=Math.abs(8*b.x*b.y*b.z);return a+=JU.Escape.eP(this.ptTemp)+" # volume = "+b},"~B");c(b,"findAtomsInRectangle",function(a){for(var b=this.vwr.getVisibleFramesBitSet(),c=new JU.BS,e=this.ac;0<=--e;){var g=this.at[e];JM.AtomCollection.isDeleted(g)||(b.get(g.mi)?g.checkVisible()&&a.contains(g.sX,g.sY)&&c.set(e):e=this.am[g.mi].firstAtomIndex)}return c},"JU.Rectangle");c(b,"getDefaultVdwType",function(a){return!this.am[a].isBioModel?J.c.VDW.AUTO_BABEL:0==this.am[a].hydrogenCount?J.c.VDW.AUTO_JMOL:
J.c.VDW.AUTO_BABEL},"~N");c(b,"setRotationRadius",function(a,b){return this.isJmolDataFrame(a)?(this.am[a].defaultRotationRadius=b,!1):!0},"~N,~N");c(b,"calcRotationRadius",function(a,b,c){if(this.isJmolDataFrame(a))return a=this.am[a].defaultRotationRadius,0==a?10:a;if(c&&null!=this.getDefaultBoundBox())return 1.2*(this.defaultBBox.getMaxDim()/2);if(0==this.ac)return 10;a=-2;c=0;for(var e=this.ac;0<=--e;){var g=this.at[e];if(!JM.AtomCollection.isDeleted(g))if(this.isJmolDataFrameForAtom(g)){for(a=
g.mi;0<=e&&null!=this.at[e]&&this.at[e].mi==a;)e--;e++}else{if(g.mi!=a){a=g.mi;var j=this.am[a].isBioModel?null:this.getUnitCell(a);if(null!=j)for(var k=j.getUnitCellVerticesNoOffset(),j=j.getCartesianOffset(),f=0;8>f;f++)this.ptTemp.setT(k[f]),this.ptTemp.add(j),c=Math.max(c,b.distance(this.ptTemp))}g=b.distance(g)+this.getRadiusVdwJmol(g);g>c&&(c=g)}}return 0==c?10:c},"~N,JU.P3,~B");c(b,"calcBoundBoxDimensions",function(a,b){null!=a&&0>a.nextSetBit(0)&&(a=null);if(!(null==a&&this.isBbcageDefault||
0==this.ac)){if(null==this.getDefaultBoundBox())this.bboxModels=this.getModelBS(this.bboxAtoms=JU.BSUtil.copy(a),!1),this.calcAtomsMinMax(a,this.boxInfo)==this.ac&&(this.isBbcageDefault=!0),null==a&&null!=this.unitCells&&this.calcUnitCellMinMax();else{var c=this.defaultBBox.getBoundBoxVertices();this.boxInfo.reset();for(var e=0;8>e;e++)this.boxInfo.addBoundBoxPoint(c[e])}this.boxInfo.setBbcage(b)}},"JU.BS,~N");c(b,"getDefaultBoundBox",function(){var a=this.getInfoM("boundbox");null==a?this.defaultBBox=
null:(null==this.defaultBBox&&(this.defaultBBox=new JU.BoxInfo),this.defaultBBox.setBoundBoxFromOABC(a));return this.defaultBBox});c(b,"getBoxInfo",function(a,b){if(null==a)return this.boxInfo;var c=new JU.BoxInfo;this.calcAtomsMinMax(a,c);c.setBbcage(b);return c},"JU.BS,~N");c(b,"calcAtomsMinMax",function(a,b){b.reset();for(var c=0,e=null==a,g=e?this.ac-1:a.nextSetBit(0);0<=g;g=e?g-1:a.nextSetBit(g+1)){c++;var j=this.at[g];null!=j&&!this.isJmolDataFrameForAtom(j)&&b.addBoundBoxPoint(j)}return c},
"JU.BS,JU.BoxInfo");c(b,"calcUnitCellMinMax",function(){for(var a=new JU.P3,b=0;b<this.mc;b++){var c=this.unitCells[b];if(null!=c&&c.getCoordinatesAreFractional())for(var e=c.getUnitCellVerticesNoOffset(),c=c.getCartesianOffset(),g=0;8>g;g++)a.add2(c,e[g]),this.boxInfo.addBoundBoxPoint(a)}});c(b,"calcRotationRadiusBs",function(a){for(var b=this.getAtomSetCenter(a),c=0,e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1)){var g=this.at[e],g=b.distance(g)+this.getRadiusVdwJmol(g);g>c&&(c=g)}return 0==c?10:c},
"JU.BS");c(b,"getCenterAndPoints",function(a,b){for(var c,e,g=b?1:0,j=a.size();0<=--j;){var k=a.get(j);c=k[0];C(k[1],"JU.BS")?(e=k[1],g+=Math.min(c.cardinality(),e.cardinality())):g+=Math.min(c.cardinality(),k[1].length)}var f=z(2,g,null);b&&(f[0][0]=new JU.P3,f[1][0]=new JU.P3);for(j=a.size();0<=--j;)if(k=a.get(j),c=k[0],C(k[1],"JU.BS")){e=k[1];for(var k=c.nextSetBit(0),y=e.nextSetBit(0);0<=k&&0<=y;k=c.nextSetBit(k+1),y=e.nextSetBit(y+1))f[0][--g]=this.at[k],f[1][g]=this.at[y],b&&(f[0][0].add(this.at[k]),
f[1][0].add(this.at[y]))}else{e=k[1];for(var n=0,k=c.nextSetBit(0),y=0;0<=k&&y<e.length;k=c.nextSetBit(k+1),y++,n++)b?(f[0][0].add(this.at[k]),f[1][0].add(e[y]),f[0][--g]=this.at[k],f[1][g]=e[y]):(f[0][n]=this.at[k],f[1][n]=e[y])}b&&(f[0][0].scale(1/(f[0].length-1)),f[1][0].scale(1/(f[1].length-1)));return f},"JU.Lst,~B");c(b,"getAtomSetCenter",function(a){for(var b=new JU.P3,c=0,e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))this.isJmolDataFrameForAtom(this.at[e])||(c++,b.add(this.at[e]));1<c&&b.scale(1/
c);return b},"JU.BS");c(b,"getAverageAtomPoint",function(){return this.getAtomSetCenter(this.vwr.bsA())});c(b,"setAPm",function(a,b,c,e,g,j,k){this.setAPa(a,b,c,e,g,j,k);switch(b){case 1094715420:case 1631586315:this.vwr.getBoolean(603979944)&&this.assignAromaticBondsBs(!0,null)}},"JU.BS,~N,~N,~N,~S,~A,~A");c(b,"addStateScript",function(a,b,c,e,g,j,k){var f=this.vwr.am.cmi;j?(this.thisStateModel!=f&&(a="frame "+(0>f?"all #"+f:this.getModelNumberDotted(f))+";\n  "+a),this.thisStateModel=f):this.thisStateModel=
-1;a=new JM.StateScript(this.thisStateModel,a,b,c,e,g,k);a.isValid()&&this.stateScripts.addLast(a);return a},"~S,JU.BS,JU.BS,JU.BS,~S,~B,~B");c(b,"freezeModels",function(){this.haveBioModels=!1;for(var a=this.mc;0<=--a;)this.haveBioModels=(new Boolean(this.haveBioModels|this.am[a].freeze())).valueOf()});c(b,"getStructureList",function(){return this.vwr.getStructureList()});c(b,"getInfoM",function(a){return null==this.msInfo?null:this.msInfo.get(a)},"~S");c(b,"getMSInfoB",function(a){a=this.getInfoM(a);
return C(a,Boolean)&&a.booleanValue()},"~S");c(b,"isTrajectory",function(a){return this.am[a].isTrajectory},"~N");c(b,"isTrajectorySubFrame",function(a){return this.am[a].trajectoryBaseIndex!=a},"~N");c(b,"isTrajectoryMeasurement",function(a){return null!=this.trajectory&&this.trajectory.hasMeasure(a)},"~A");c(b,"getModelBS",function(a,b){var c=new JU.BS,e=0,g=null==a;b=(new Boolean(b&null!=this.trajectory)).valueOf();for(var j=g?0:a.nextSetBit(0);0<=j&&j<this.ac;j=g?j+1:a.nextSetBit(j+1))JM.AtomCollection.isDeleted(this.at[j])||
(c.set(e=this.at[j].mi),b&&this.trajectory.getModelBS(e,c),e=this.am[e],e.isOrderly&&(j=e.firstAtomIndex+e.act-1));return c},"JU.BS,~B");c(b,"getIterativeModels",function(a){for(var b=new JU.BS,c=0;c<this.mc;c++)if(a||!this.isJmolDataFrame(c))this.isTrajectorySubFrame(c)||b.set(c);return b},"~B");c(b,"fillAtomData",function(a,b){if(0!=(b&4)){this.getMolecules();a.bsMolecules=Array(this.molecules.length);a.atomMolecule=D(this.ac,0);for(var c,e=0;e<this.molecules.length;e++){c=a.bsMolecules[e]=this.molecules[e].atomList;
for(var g=c.nextSetBit(0);0<=g;g=c.nextSetBit(g+1))a.atomMolecule[g]=e}}0!=(b&8)?(c=D(1,0),a.hAtomRadius=this.vwr.getVanderwaalsMar(1)/1E3,a.hAtoms=this.calculateHydrogens(a.bsSelected,c,null,512),a.hydrogenAtomCount=c[0]):(a.firstAtomIndex=0>a.modelIndex?null==a.bsSelected?0:Math.max(0,a.bsSelected.nextSetBit(0)):this.am[a.modelIndex].firstAtomIndex,a.lastModelIndex=a.firstModelIndex=0==this.ac?0:this.at[a.firstAtomIndex].mi,a.modelName=this.getModelNumberDotted(a.firstModelIndex),this.fillADa(a,
b))},"J.atomdata.AtomData,~N");c(b,"getModelNumberDotted",function(a){return 1>this.mc||a>=this.mc||0>a?"":JU.Escape.escapeModelFileNumber(this.modelFileNumbers[a])},"~N");c(b,"getModelNumber",function(a){return this.modelNumbers[2147483647==a?this.mc-1:a]},"~N");c(b,"getModelProperty",function(a,b){var c=this.am[a].properties;return null==c?null:c.getProperty(b)},"~N,~S");c(b,"getModelAuxiliaryInfo",function(a){return 0>a?null:this.am[a].auxiliaryInfo},"~N");c(b,"setInfo",function(a,b,c){0<=a&&a<
this.mc&&(null==c?this.am[a].auxiliaryInfo.remove(b):this.am[a].auxiliaryInfo.put(b,c))},"~N,~O,~O");c(b,"getInfo",function(a,b){return 0>a?null:this.am[a].auxiliaryInfo.get(b)},"~N,~S");c(b,"getInfoB",function(a,b){var c=this.am[a].auxiliaryInfo;return null!=c&&c.containsKey(b)&&c.get(b).booleanValue()},"~N,~S");c(b,"getInfoI",function(a,b){var c=this.am[a].auxiliaryInfo;return null!=c&&c.containsKey(b)?c.get(b).intValue():-2147483648},"~N,~S");c(b,"getInsertionCountInModel",function(a){return this.am[a].insertionCount},
"~N");b.modelFileNumberFromFloat=c(b,"modelFileNumberFromFloat",function(a){var b=w(Math.floor(a));for(a=w(Math.floor(1E4*(a-b+1E-5)));0!=a&&0==a%10;)a/=10;return 1E6*b+a},"~N");c(b,"getChainCountInModelWater",function(a,b){if(0>a){for(var c=0,e=this.mc;0<=--e;)c+=this.am[e].getChainCount(b);return c}return this.am[a].getChainCount(b)},"~N,~B");c(b,"getGroupCountInModel",function(a){if(0>a){a=0;for(var b=this.mc;0<=--b;)a+=this.am[b].getGroupCount();return a}return this.am[a].getGroupCount()},"~N");
c(b,"calcSelectedGroupsCount",function(){for(var a=this.vwr.bsA(),b=this.mc;0<=--b;)this.am[b].calcSelectedGroupsCount(a)});c(b,"isJmolDataFrame",function(a){return this.haveJmolDataFrames&&null!=this.am&&0<=a&&a<this.mc&&this.am[a].isJmolDataFrame},"~N");c(b,"isJmolDataFrameForAtom",function(a){return this.haveJmolDataFrames&&this.am[a.mi].isJmolDataFrame},"JM.Atom");c(b,"getJmolDataFrameIndex",function(a,b){if(null==this.am[a].dataFrames)return-1;var c=this.am[a].dataFrames.get(b);return null==
c?-1:c.intValue()},"~N,~S");c(b,"getJmolDataFrameInt",function(a,b){a=this.getJmolDataSourceFrame(a);if(!this.haveJmolDataFrames||null==this.am[a].dataFrames)return-1;for(var c,e=this.am[a].dataFrames.entrySet().iterator();e.hasNext()&&((c=e.next())||1);){var g=c.getValue().intValue();if(this.am[g].jmolFrameTypeInt==b)return g}return-1},"~N,~N");c(b,"clearDataFrameReference",function(a){for(var b=0;b<this.mc;b++){var c=this.am[b].dataFrames;if(null!=c){for(var e=c.values().iterator();e.hasNext();)e.next().intValue()==
a&&e.remove();c.isEmpty()&&(this.am[b].dataFrames=null)}}},"~N");c(b,"getJmolFrameType",function(a){return 0<=a&&a<this.mc?this.am[a].jmolFrameType:"modelSet"},"~N");c(b,"getJmolFrameTypeInt",function(a){return this.haveJmolDataFrames&&0<=a&&a<this.mc?this.am[a].jmolFrameTypeInt:0},"~N");c(b,"getJmolDataSourceFrame",function(a){return 0<=a&&a<this.mc?this.am[a].dataSourceFrame:-1},"~N");c(b,"saveModelOrientation",function(a,b){this.am[a].orientation=b},"~N,JM.Orientation");c(b,"getModelOrientation",
function(a){return this.am[a].orientation},"~N");c(b,"getPDBHeader",function(a){return this.am[a].isBioModel?this.am[a].getFullPDBHeader():this.getFileHeader(a)},"~N");c(b,"getFileHeader",function(a){if(0>a)return"";if(this.am[a].isBioModel)return this.getPDBHeader(a);a=this.getInfo(a,"fileHeader");null==a&&(a=this.modelSetName);return null!=a?a:"no header information found"},"~N");c(b,"getAltLocCountInModel",function(a){return this.am[a].altLocCount},"~N");c(b,"getAltLocIndexInModel",function(a,
b){if("\x00"==b)return 0;var c=this.getAltLocListInModel(a);return 0==c.length?0:c.indexOf(b)+1},"~N,~S");c(b,"getInsertionCodeIndexInModel",function(a,b){if("\x00"==b)return 0;var c=this.getInsertionListInModel(a);return 0==c.length?0:c.indexOf(b)+1},"~N,~S");c(b,"getAltLocListInModel",function(a){a=this.getInfo(a,"altLocs");return null==a?"":a},"~N");c(b,"getInsertionListInModel",function(a){a=this.getInfo(a,"insertionCodes");return null==a?"":a},"~N");c(b,"getModelSymmetryCount",function(a){return 0<
this.am[a].biosymmetryCount?this.am[a].biosymmetryCount:null==this.unitCells||null==this.unitCells[a]?0:this.unitCells[a].getSpaceGroupOperationCount()},"~N");c(b,"getModelCellRange",function(a){return null==this.unitCells?null:this.unitCells[a].getCellRange()},"~N");c(b,"getLastVibrationVector",function(a,b){if(null!=this.vibrations&&a<this.vwr.ms.mc)for(var c,e=0>a||this.isTrajectory(a)||a>=this.mc-1?this.ac:this.am[a+1].firstAtomIndex,g=0>=a?0:this.am[a].firstAtomIndex;--e>=g;)if((0>a||!JM.AtomCollection.isDeleted(this.at[e])&&
this.at[e].mi==a)&&((1275072532==b||0==b)&&null!=(c=this.getModulation(e))||(4166==b||0==b)&&null!=(c=this.getVibration(e,!1)))&&c.isNonzero())return e;return-1},"~N,~N");c(b,"getModulationList",function(a,b,c){var e=new JU.Lst;if(null!=this.vibrations)for(var g=a.nextSetBit(0);0<=g;g=a.nextSetBit(g+1))C(this.vibrations[g],"J.api.JmolModulationSet")?e.addLast(this.vibrations[g].getModulation(b,c,!1)):e.addLast(Float.$valueOf("O"==b?NaN:-1));return e},"JU.BS,~S,JU.P3");c(b,"getElementsPresentBitSet",
function(a){if(0<=a)return this.elementsPresent[a];a=new JU.BS;for(var b=0;b<this.mc;b++)a.or(this.elementsPresent[b]);return a},"~N");c(b,"getMoleculeIndex",function(a,b){0==this.moleculeCount&&this.getMolecules();for(var c=0;c<this.moleculeCount;c++)if(this.molecules[c].atomList.get(a))return b?this.molecules[c].indexInModel:c;return 0},"~N,~B");c(b,"getMoleculeBitSet",function(a){0==this.moleculeCount&&this.getMolecules();var b=JU.BSUtil.copy(a);a=JU.BSUtil.copy(a);for(var c=0,e=new JU.BS;0<=(c=
a.length()-1);)e=this.getMoleculeBitSetForAtom(c),null==e?(a.clear(c),b.clear(c)):(a.andNot(e),b.or(e));return b},"JU.BS");c(b,"getMoleculeBitSetForAtom",function(a){0==this.moleculeCount&&this.getMolecules();for(var b=0;b<this.moleculeCount;b++)if(this.molecules[b].atomList.get(a))return this.molecules[b].atomList;return null},"~N");c(b,"getModelDipole",function(a){if(0>a)return null;var b=this.getInfo(a,"dipole");null==b&&(b=this.getInfo(a,"DIPOLE_VEC"));return b},"~N");c(b,"calculateMolecularDipole",
function(a,b){if(null!=b){var c=b.nextSetBit(0);if(0>c)return null;a=this.at[c].mi}if(0>a)return null;var e=c=0,g=0,j=0,k=new JU.V3,f=new JU.V3;null==b&&(b=this.getModelAtomBitSetIncludingDeleted(-1,!1));this.vwr.getOrCalcPartialCharges(this.am[a].bsAtoms,null);for(var y=b.nextSetBit(0);0<=y;y=b.nextSetBit(y+1))if(!(JM.AtomCollection.isDeleted(this.at[y])||this.at[y].mi!=a)){var n=this.partialCharges[y];0>n?(e++,j+=n,f.scaleAdd2(n,this.at[y],f)):0<n&&(c++,g+=n,k.scaleAdd2(n,this.at[y],k))}if(0.015<
Math.abs(g+j))throw c="Dipole calculation requires balanced charges: "+g+" "+j,JU.Logger.info(c),new RuntimeException(c);if(0==e||0==c)return null;k.add(f);k.scale(4.8);return k},"~N,JU.BS");c(b,"getMoleculeCountInModel",function(a){var b=0;0==this.moleculeCount&&this.getMolecules();if(0>a)return this.moleculeCount;for(var c=0;c<this.mc;c++)a==c&&(b+=this.am[c].moleculeCount);return b},"~N");c(b,"calcSelectedMoleculesCount",function(){var a=this.vwr.bsA();0==this.moleculeCount&&this.getMolecules();
this.selectedMolecules.xor(this.selectedMolecules);for(var b=new JU.BS,c=0;c<this.moleculeCount;c++)JU.BSUtil.copy2(a,b),b.and(this.molecules[c].atomList),0<b.length()&&this.selectedMolecules.set(c)});c(b,"setCentroid",function(a,b){var c=this.getNotInCentroid(a,b);null!=c&&0<=c.nextSetBit(0)&&this.vwr.deleteAtoms(c,!1)},"JU.BS,~A");c(b,"getNotInCentroid",function(a,b){var c=a.nextSetBit(0);if(0>c)return null;c=this.getUnitCell(this.at[c].mi);return null==c?null:c.notInCentroid(this,a,b)},"JU.BS,~A");
c(b,"getMolecules",function(){if(0<this.moleculeCount)return this.molecules;null==this.molecules&&(this.molecules=Array(4));this.moleculeCount=0;for(var a=null,b=Array(this.mc),c=null,e=0;e<this.mc;e++)b[e]=this.vwr.getModelUndeletedAtomsBitSet(e),a=this.am[e],a.moleculeCount=0,c=a.isBioModel?a.getBioBranches(c):null;this.molecules=JU.JmolMolecule.getMolecules(this.at,b,c,null);for(e=this.moleculeCount=this.molecules.length;0<=--e;)a=this.am[this.molecules[e].modelIndex],a.firstMoleculeIndex=e,a.moleculeCount++;
return this.molecules});c(b,"initializeBspf",function(){if(!(null!=this.bspf&&this.bspf.isValid)){this.showRebondTimes&&JU.Logger.startTimer("build bspf");var a=new J.bspt.Bspf(3);JU.Logger.debugging&&JU.Logger.debug("sequential bspt order");for(var b=JU.BS.newN(this.mc),c=this.ac;0<=--c;){var e=this.at[c];!JM.AtomCollection.isDeleted(e)&&!this.isTrajectorySubFrame(e.mi)&&(a.addTuple(this.am[e.mi].trajectoryBaseIndex,e),b.set(e.mi))}this.showRebondTimes&&(JU.Logger.checkTimer("build bspf",!1),a.stats());
for(c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1))a.validateModel(c,!0);a.isValid=!0;this.bspf=a}});c(b,"initializeBspt",function(a){this.initializeBspf();this.bspf.isInitializedIndex(a)||this.bspf.initialize(a,this.at,this.vwr.getModelUndeletedAtomsBitSet(a))},"~N");c(b,"setIteratorForPoint",function(a,b,c,e){0>b?a.setCenter(c,e):(this.initializeBspt(b),a.setModel(this,b,this.am[b].firstAtomIndex,2147483647,c,e,null))},"J.api.AtomIndexIterator,~N,JU.T3,~N");c(b,"setIteratorForAtom",function(a,b,c,e,
g){0>b&&(b=this.at[c].mi);b=this.am[b].trajectoryBaseIndex;this.initializeBspt(b);a.setModel(this,b,this.am[b].firstAtomIndex,c,this.at[c],e,g)},"J.api.AtomIndexIterator,~N,~N,~N,J.atomdata.RadiusData");c(b,"getSelectedAtomIterator",function(a,b,c,e,g){this.initializeBspf();if(g){g=this.getModelBS(a,!1);for(var j=g.nextSetBit(0);0<=j;j=g.nextSetBit(j+1))this.initializeBspt(j);g=new JM.AtomIteratorWithinModelSet(g)}else g=new JM.AtomIteratorWithinModel;g.initialize(this.bspf,a,b,c,e,this.vwr.isParallel());
return g},"JU.BS,~B,~B,~B,~B");f(b,"getBondCountInModel",function(a){return 0>a?this.bondCount:this.am[a].getBondCount()},"~N");c(b,"getAtomCountInModel",function(a){return 0>a?this.ac:this.am[a].act},"~N");c(b,"getModelAtomBitSetIncludingDeletedBs",function(a){var b=new JU.BS;null==a&&null==this.bsAll&&(this.bsAll=JU.BSUtil.setAll(this.ac));if(null==a)b.or(this.bsAll);else for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))b.or(this.getModelAtomBitSetIncludingDeleted(c,!1));return b},"JU.BS");c(b,
"getModelAtomBitSetIncludingDeleted",function(a,b){var c=0>a?this.bsAll:this.am[a].bsAtoms;null==c&&(c=this.bsAll=JU.BSUtil.setAll(this.ac));return b?JU.BSUtil.copy(c):c},"~N,~B");c(b,"getAtomBitsMaybeDeleted",function(a,b){var c;c=null;switch(a){default:return this.getAtomBitsMDa(a,b,new JU.BS);case 1073741925:case 1073742189:case 1111490587:case 1073742128:case 1073741863:case 1086324744:return c=new JU.BS,this.haveBioModels?this.bioModelset.getAtomBitsStr(a,b,c):c;case 1677721602:case 1073742331:return this.getAtomBitsMDb(a,
b);case 1812599299:var e=this.getBoxInfo(b,1);c=this.getAtomsWithin(e.getBoundBoxCornerVector().length()+1E-4,e.getBoundBoxCenter(),null,-1);for(var g=c.nextSetBit(0);0<=g;g=c.nextSetBit(g+1))e.isWithin(this.at[g])||c.clear(g);return c;case 1094713350:c=JU.BSUtil.newBitSet2(0,this.ac);for(var g=b,j=D(-1,[F(g.x)-1,F(g.y)-1,F(g.z)-1,F(g.x),F(g.y),F(g.z),0]),g=this.mc;0<=--g;)e=this.getUnitCell(g),null==e?JU.BSUtil.andNot(c,this.am[g].bsAtoms):c.andNot(e.notInCentroid(this,this.am[g].bsAtoms,j));return c;
case 1094713360:return this.getMoleculeBitSet(b);case 1073742363:return this.getSelectCodeRange(b);case 2097196:c=JU.BS.newN(this.ac);e=-1;j=0;for(g=this.ac;0<=--g;){var k=this.at[g];if(!JM.AtomCollection.isDeleted(k)){var f=k.atomSymmetry;if(null!=f){if(k.mi!=e){e=k.mi;if(null==this.getModelCellRange(e))continue;j=this.getModelSymmetryCount(e)}for(var k=0,y=j;0<=--y;)if(f.get(y)&&1<++k){c.set(g);break}}}}return c;case 1088421903:return JU.BSUtil.copy(null==this.bsSymmetry?this.bsSymmetry=JU.BS.newN(this.ac):
this.bsSymmetry);case 1814695966:g="unitcell".equals(b);e=null==b||g?null:(c=b)[1];g=null!=c&&3==c.length?c[2]:null;k=null==e?NaN:e.floatValue();y=null==g?NaN:g.floatValue();null!=c&&(b=c[0]);if(null==b||C(b,"J.api.SymmetryInterface")){c=new JU.BS;var n=null!=b,e=C(b,"J.api.SymmetryInterface")?b:null;if(n&&null==e)return c;n&&(e=e.getUnitCellMultiplied());j=e;e=-1;for(g=this.ac;0<=--g;)if(null!=this.at[g]){if(!n&&(f=this.at[g].getModelIndex(),f!=e&&(e=f,j=this.getUnitCell(f),null!=j&&(j=j.getUnitCellMultiplied())),
null==j))continue;this.ptTemp1.setT(this.at[g]);j.toFractional(this.ptTemp1,!1);j.checkPeriodic(this.ptTemp1,k,y)&&c.set(g)}return c}"unitcell".equals(b)&&(b=JU.P3.new3(1,1,1));case 1094713349:c=new JU.BS;C(b,"JU.P3")?(e=b,y=NaN,j=k=null):(j=k=b[0],null==b[1]||b[1].floatValue(),g=b,e=JU.P3.newP(g),y=g.w);f=-1;for(g=this.ac;0<=--g;)JM.AtomCollection.isDeleted(this.at[g])||(n=this.at[g].getModelIndex(),null==k&&f!=n&&(f=n,j=this.getUnitCell(f)),null!=j&&(this.ptTemp.setT(this.at[g]),j.toFractional(this.ptTemp,
!1),j.isWithinUnitCell(this.ptTemp,e.x,e.y,e.z,y)&&c.set(g)));return c}},"~N,~O");c(b,"getSelectCodeRange",function(a){var b=new JU.BS,c=a[0],e=a[1];a=a[2];var g=this.vwr.getBoolean(603979822);0<=a&&(300>a&&!g)&&(a=this.chainToUpper(a));for(var j=this.mc;0<=--j;)if(this.am[j].isBioModel)for(var k=this.am[j],f,y=k.chainCount;0<=--y;){var n=k.chains[y];if(-1==a||a==(f=n.chainID)||!g&&0<f&&300>f&&a==this.chainToUpper(f))for(var q=n.groups,n=n.groupCount,v=0;0<=v;)v=JM.ModelSet.selectSeqcodeRange(q,n,
v,c,e,b)}return b},"~A");b.selectSeqcodeRange=c(b,"selectSeqcodeRange",function(a,b,c,e,g,j){var k,f,y,n=!1;for(f=c;f<b&&a[f].seqcode!=e;f++);if(f==b){if(0<c)return-1;n=!0;y=2147483647;for(var q=b;0<=--q;)if((k=a[q].seqcode)>e&&k-e<y)f=q,y=k-e;if(2147483647==y)return-1}if(2147483647==g)e=b-1,n=!0;else{for(e=f;e<b&&a[e].seqcode!=g;e++);if(e==b){if(0<c)return-1;n=!0;y=2147483647;for(q=f;q<b;q++)if((k=a[q].seqcode)<g&&g-k<y)e=q,y=g-k;if(2147483647==y)return-1}}for(q=f;q<=e;++q)a[q].setAtomBits(j);return n?
-1:e+1},"~A,~N,~N,~N,~N,JU.BS");c(b,"getAtomsWithinRadius",function(a,b,c,e,g){var j=new JU.BS;b=JU.BSUtil.andNot(b,this.vwr.slm.bsDeleted);var k=this.getSelectedAtomIterator(g,!1,!1,!1,!1);if(c){c=!this.vwr.g.legacyJavaFloat;var f=new JU.P3;g=null==g?JU.BSUtil.newBitSet2(0,this.mc):this.getModelBS(g,!1);g.and(this.getIterativeModels(!1));for(var y=b.nextSetBit(0);0<=y;y=b.nextSetBit(y+1))for(var n=g.nextSetBit(0);0<=n;n=g.nextSetBit(n+1))0>a?this.getAtomsWithin(a,this.at[y].getFractionalUnitCoordPt(c,
!0,f),j,n):(this.setIteratorForAtom(k,n,y,a,e),k.addAtoms(j))}else{null==g&&j.or(b);for(y=b.nextSetBit(0);0<=y;y=b.nextSetBit(y+1))0>a?this.getAtomsWithin(a,this.at[y],j,this.at[y].mi):(this.setIteratorForAtom(k,-1,y,a,e),k.addAtoms(j))}k.release();return j},"~N,JU.BS,~B,J.atomdata.RadiusData,JU.BS");c(b,"getAtomsWithin",function(a,b,c,e){null==c&&(c=new JU.BS);if(0>a){a=-a;for(var g=this.ac;0<=--g;){var j=this.at[g];JM.AtomCollection.isDeleted(j)||0<=e&&j.mi!=e||!c.get(g)&&j.getFractionalUnitDistance(b,
this.ptTemp1,this.ptTemp2)<=a&&c.set(j.i)}return c}for(var j=this.getSelectedAtomIterator(null,!1,!1,!1,!1),k=0<=e?JU.BSUtil.newAndSetBit(e):this.getIterativeModels(!0),f=k.nextSetBit(0);0<=f;f=k.nextSetBit(f+1))g=this.am[f].bsAtoms.nextSetBit(0),0>g||(this.setIteratorForAtom(j,e,g,-1,null),j.setCenter(b,a),j.addAtoms(c));j.release();return c},"~N,JU.T3,JU.BS,~N");c(b,"deleteBonds",function(a,b){if(!b)for(var c=new JU.BS,e=new JU.BS,g=a.nextSetBit(0);0<=g;g=a.nextSetBit(g+1)){var j=this.bo[g];if(null!=
j){var k=j.atom1;this.am[k.mi].isModelKit||(c.clearAll(),e.clearAll(),c.set(k.i),e.set(j.getAtomIndex2()),this.addStateScript("connect ",null,c,e,"delete",!1,!0))}}this.dBb(a,b)},"JU.BS,~B");c(b,"makeConnections2",function(a,b,c,e,g,j,k,f,y,n,q){null==k&&(k=new JU.BS);var v=65535==c,B=131071==c,m=65537==c;B&&(c=1);var r=JU.Edge.isOrderH(c),s=!1,u=!1,w=!1,z=!1;switch(e){case 12291:return this.deleteConnections(a,b,c,g,j,f,B);case 603979872:case 1073741852:if(515!=c){if(f){a=g;g=new JU.BS;j=new JU.BS;
for(var x=a.nextSetBit(0);0<=x;x=a.nextSetBit(x+1))null!=this.bo[x]&&(g.set(this.bo[x].atom1.i),j.set(this.bo[x].atom2.i))}return D(-1,[r?this.autoHbond(g,j,!1):this.autoBondBs4(g,j,null,k,this.vwr.getMadBond(),603979872==e,q),0])}u=z=!0;break;case 1086324745:s=u=!0;break;case 1073742025:u=!0;break;case 1073741904:w=!0}e=!s&&!v;this.defaultCovalentMad=this.vwr.getMadBond();q=0>a;var B=0>b,A=q||B,C=!f||0.1!=a||1E8!=b;C&&(a=this.fixD(a,q),b=this.fixD(b,B));var F=this.getDefaultMadFromOrder(c),G=0,K=
0,I=null,M=null,N=null,O="\x00",P=c|131072,S=65535!=c&&0!=(c&512);try{for(x=g.nextSetBit(0);0<=x;x=g.nextSetBit(x+1)){if(f){I=this.bo[x];if(null==I)continue;M=I.atom1;N=I.atom2}else{M=this.at[x];if(M.isDeleted())continue;O=this.isModulated(x)?"\x00":M.altloc}for(var Q=f?0:j.nextSetBit(0);0<=Q;Q=j.nextSetBit(Q+1)){if(f)Q=2147483646;else{if(Q==x)continue;N=this.at[Q];if(null==N||M.mi!=N.mi||N.isDeleted())continue;if("\x00"!=O&&O!=N.altloc&&"\x00"!=N.altloc)continue;I=M.getBond(N)}if(!(null==I?u:w)&&
!(C&&!this.isInRange(M,N,a,b,q,B,A)||S&&null!=I&&!this.allowAromaticBond(I)))if(null==I)k.set(this.bondAtoms(M,N,c,F,k,n,y,!0).index),G++;else{if(e){if(m){var T=I.order;I.setOrder(c);I.setAtropisomerOptions()?(this.haveAtropicBonds=!0,K++):I.setOrder(T)}else I.setOrder(c);this.bsAromatic.clear(I.index)}if(v||c==I.order||P==I.order||r&&I.isHydrogen())k.set(I.index),K++}}}}catch(R){if(!E(R,Exception))throw R;}z&&this.assignAromaticBondsBs(!0,k);s||this.sm.setShapeSizeBs(1,-2147483648,null,k);return D(-1,
[G,K])},"~N,~N,~N,~N,JU.BS,JU.BS,JU.BS,~B,~B,~N,JU.SB");c(b,"autoBondBs4",function(a,b,c,e,g,j,k){if(j)return this.autoBond_Pre_11_9_24(a,b,c,e,g);if(0==this.ac)return 0;0==g&&(g=1);1.4E-45==this.maxBondingRadius&&this.findMaxRadii();j=this.vwr.getFloat(570425348);var f=this.vwr.getFloat(570425364),f=f*f,y=0;this.showRebondTimes&&JU.Logger.startTimer("autobond");var n=-1,q=null==a,v,B;q?(B=0,v=null):(a.equals(b)?v=a:(v=JU.BSUtil.copy(a),v.or(b)),B=v.nextSetBit(0));for(var m=this.getSelectedAtomIterator(null,
!1,!1,!0,!1),r=!1;0<=B&&B<this.ac;B=q?B+1:v.nextSetBit(B+1)){var s=q||a.get(B),u=q||b.get(B),w=this.at[B];if(!JM.AtomCollection.isDeleted(w)){var x=w.mi;if(x!=n){n=x;if(this.isJmolDataFrame(x)){B=this.am[x].firstAtomIndex+this.am[x].act-1;continue}r=this.getInfoB(x,"autoBondUsingOccupation")}x=w.getBondingRadius();if(0!=x){var z=w.getFormalCharge(),A=0!=z;A&&(z=Math.signum(z));var C=null!=c&&c.get(B);for(this.setIteratorForAtom(m,-1,B,x+this.maxBondingRadius+j,null);m.hasNext();){var E=this.at[m.next()];
if(!E.isDeleted()){var D=E.i,F=q||a.get(D),G=q||b.get(D);!F&&!G||(!(s&&G||u&&F)||C&&c.get(D)||r&&null!=this.occupancies&&50>this.occupancies[B]!=50>this.occupancies[D]||A&&Math.signum(E.getFormalCharge())==z)||(F=this.isBondable(x,E.getBondingRadius(),m.foundDistance2(),f,j)?1:0,0<F&&this.autoBondCheck(w,E,F,g,e)&&(y++,null!=k&&k.append("connect ({"+B+"}) ({"+D+"});")))}}m.release()}}}this.showRebondTimes&&JU.Logger.checkTimer("autoBond",!1);return y},"JU.BS,JU.BS,JU.BS,JU.BS,~N,~B,JU.SB");c(b,"isBondable",
function(a,b,c,e,g){if(0==a||0==b||c<e)return!1;a=a+b+g;return c<=a*a},"~N,~N,~N,~N,~N");c(b,"autoBondCheck",function(a,b,c,e,g){if(20<a.getCurrentBondCount()||20<b.getCurrentBondCount())return this.maxBondWarned||JU.Logger.warn("maximum auto bond count reached"),this.maxBondWarned=!0,!1;var j=a.getFormalCharge();if(0!=j){var k=b.getFormalCharge();if(0>j&&0>k||0<j&&0<k)return!1}if(a.altloc!=b.altloc&&"\x00"!=a.altloc&&"\x00"!=b.altloc&&null==this.getModulation(a.i))return!1;this.getOrAddBond(a,b,
c,e,g,0,!1);return!0},"JM.Atom,JM.Atom,~N,~N,JU.BS");c(b,"autoBond_Pre_11_9_24",function(a,b,c,e,g){if(0==this.ac)return 0;0==g&&(g=1);1.4E-45==this.maxBondingRadius&&this.findMaxRadii();var j=this.vwr.getFloat(570425348),k=this.vwr.getFloat(570425364),k=k*k,f=0;this.initializeBspf();for(var y=-1,n=this.ac;0<=--n;){var q=this.at[n];if(!JM.AtomCollection.isDeleted(q)){var v=null==a||a.get(n),B=null==b||b.get(n);if((v||B)&&!q.isDeleted()){var m=q.mi;if(m!=y&&(y=m,this.isJmolDataFrame(m))){for(;0<=--n&&
!(JM.AtomCollection.isDeleted(this.at[n])||this.at[n].mi!=m););n++;continue}var r=q.getBondingRadius();if(0!=r){var s=r+this.maxBondingRadius+j;this.initializeBspt(m);m=this.bspf.getCubeIterator(m);for(m.initialize(q,s,!0);m.hasMoreElements();)if(s=m.nextElement(),!(s===q||s.isDeleted())){var u=s.i,w=null==a||a.get(u),x=null==b||b.get(u);if(!(!w&&!x||null!=c&&c.get(u)&&c.get(n)))if(v&&x||B&&w)u=this.isBondable(r,s.getBondingRadius(),m.foundDistance2(),k,j)?1:0,0<u&&this.autoBondCheck(q,s,u,g,e)&&
f++}m.release()}}}}return f},"JU.BS,JU.BS,JU.BS,JU.BS,~N");c(b,"autoHbond",function(a,b,c){if(c){for(var e=this.getModelBS(a,!1),g=e.nextSetBit(0);0<=g&&c;g=e.nextSetBit(g+1))c=!this.am[g].hasRasmolHBonds;if(c)return 0}c=!1;for(g=a.nextSetBit(0);0<=g;g=a.nextSetBit(g+1))if(1==this.at[g].getElementNumber()){c=!0;break}e=new JU.BS;g=this.vwr.getBoolean(603979853);if(null==b||g&&!c)return JU.Logger.info((null==b?"DSSP/DSSR ":"RasMol")+" pseudo-hbond calculation"),this.calcRasmolHydrogenBonds(a,b,null,
!1,2147483647,!1,e),-e.cardinality();JU.Logger.info(c?"Standard Hbond calculation":"Jmol pseudo-hbond calculation");var j=null;if(!c){j=new JU.BS;for(g=a.nextSetBit(0);0<=g;g=a.nextSetBit(g+1))switch(this.at[g].atomID){case 64:case 4:case 14:case 15:case 16:case 17:j.set(g)}}var k,f;c?(k=this.vwr.getFloat(570425361),f=1):(k=this.vwr.getFloat(570425360),f=JM.ModelSet.hbondMinRasmol*JM.ModelSet.hbondMinRasmol);var y=k*k,n=3.141592653589793*this.vwr.getFloat(570425359)/180,q=0,v=0;this.showRebondTimes&&
JU.Logger.debugging&&JU.Logger.startTimer("hbond");var m=null,r=null;b=this.getSelectedAtomIterator(b,!1,!1,!1,!1);for(g=a.nextSetBit(0);0<=g;g=a.nextSetBit(g+1)){var s=this.at[g],u=s.getElementNumber(),w=1==u;if(!(w?!c:c||7!=u&&8!=u)){if(w){u=!1;m=s.bonds;if(null==m)continue;for(var x=!1,r=0;!x&&r<m.length;r++)x=m[r].getOtherAtom(s).getElementNumber(),x=7==x||8==x;if(!x)continue}else u=j.get(g);for(this.setIteratorForAtom(b,-1,s.i,k,null);b.hasNext();)if(x=this.at[b.next()],m=x.getElementNumber(),
!(x===s||(w?1==m:7!=m&&8!=m)||(v=b.foundDistance2())<f||v>y||u&&j.get(x.i)||s.isBonded(x)))if(this.v1.sub2(s,x),null!=(r=JM.ModelSet.checkMinAttachedAngle(s,n,this.v1,this.v2,c)))if(this.v1.scale(-1),null!=(m=JM.ModelSet.checkMinAttachedAngle(x,n,this.v1,this.v2,c))){var z=0,A;w&&!Float.isNaN(m.x)&&!Float.isNaN(r.x)?(A=4096,z=JM.HBond.calcEnergy(Math.sqrt(v),m.distance(s),m.distance(r),x.distance(r))/1E3):A=2048;e.set(this.addHBond(s,x,A,z));q++}}}b.release();this.sm.setShapeSizeBs(1,-2147483648,
null,e);this.showRebondTimes&&JU.Logger.checkTimer("hbond",!1);return c?q:-q},"JU.BS,JU.BS,~B");b.checkMinAttachedAngle=c(b,"checkMinAttachedAngle",function(a,b,c,e,g){var j=a.bonds,k=!0,f=null;if(null!=j&&0<j.length)for(var y=3.4028235E38,n=j.length;0<=--n;)if(j[n].isCovalent()){var k=!1,q=j[n].getOtherAtom(a);if(g||1!=q.getElementNumber()){e.sub2(a,q);var v=e.angle(c);if(v<b)return null;v<y&&(f=q,y=v)}}return k?JU.P3.new3(NaN,0,0):f},"JM.Atom,~N,JU.V3,JU.V3,~B");c(b,"setStructureIndexes",function(){for(var a,
b=0,c=-1,e=-1,g=-1,j=0;j<this.ac;j++)if(!JM.AtomCollection.isDeleted(this.at[j])){if((e=this.at[j].mi)!=g)b=0,g=e,c=-1;if((a=this.at[j].group.getStrucNo())!=c&&0!=a)this.at[j].group.setStrucNo(++b),c=b}});c(b,"getModelInfoAsString",function(){var a=(new JU.SB).append('<models count="');a.appendI(this.mc).append('" modelSetHasVibrationVectors="').append(this.modelSetHasVibrationVectors()+'">\n<properties>');if(null!=this.modelSetProperties){for(var b=this.modelSetProperties.propertyNames();b.hasMoreElements();){var c=
b.nextElement();a.append('\n <property name="').append(c).append('" value=').append(JU.PT.esc(this.modelSetProperties.getProperty(c))).append(" />")}a.append("\n</properties>")}for(b=0;b<this.mc;++b)a.append('\n<model index="').appendI(b).append('" n="').append(this.getModelNumberDotted(b)).append('" id=').append(JU.PT.esc(""+this.getInfo(b,"modelID"))),c=this.vwr.getJDXBaseModelIndex(b),c!=b&&a.append(" baseModelId=").append(JU.PT.esc(this.getInfo(c,"jdxModelID"))),a.append(" name=").append(JU.PT.esc(this.getModelName(b))).append(" title=").append(JU.PT.esc(this.getModelTitle(b))).append(' hasVibrationVectors="').appendB(this.vwr.modelHasVibrationVectors(b)).append('" />');
a.append("\n</models>");return a.toString()});c(b,"getSymmetryInfoAsString",function(){for(var a=(new JU.SB).append("Symmetry Information:"),b=0;b<this.mc;++b){a.append("\nmodel #").append(this.getModelNumberDotted(b)).append("; name=").append(this.getModelName(b)).append("\n");var c=this.getUnitCell(b);a.append(null==c?"no symmetry information":c.getSymmetryInfoStr())}return a.toString()});c(b,"createModels",function(a){a=this.mc+a;var b=JU.AU.arrayCopyObject(this.am,a);this.validateBspf(!1);this.modelNumbers=
JU.AU.arrayCopyI(this.modelNumbers,a);this.modelFileNumbers=JU.AU.arrayCopyI(this.modelFileNumbers,a);this.modelNumbersForAtomLabel=JU.AU.arrayCopyS(this.modelNumbersForAtomLabel,a);this.modelNames=JU.AU.arrayCopyS(this.modelNames,a);this.frameTitles=JU.AU.arrayCopyS(this.frameTitles,a);for(var c=w(this.modelFileNumbers[this.mc-1]/1E6)+1,e=this.mc,g=0;e<a;e++)this.modelNumbers[e]=e+this.mc,this.modelFileNumbers[e]=1E6*c+ ++g,this.modelNumbersForAtomLabel[e]=this.modelNames[e]=c+"."+g;this.thisStateModel=
-1;c=this.getInfoM("group3Lists");null!=c&&(e=this.getInfoM("group3Counts"),c=JU.AU.arrayCopyS(c,a),e=JU.AU.arrayCopyII(e,a),this.msInfo.put("group3Lists",c),this.msInfo.put("group3Counts",e));this.unitCells=null==this.unitCells?Array(a):JU.AU.arrayCopyObject(this.unitCells,a);for(e=this.mc;e<a;e++)b[e]=(new JM.Model).set(this,e,-1,null,null,null),b[e].loadState=" model create #"+e+";";this.am=b;this.mc=a;this.vwr.setAnimationRange(-1,-1)},"~N");c(b,"deleteAtoms",function(a){if(null!=a){for(var b=
this.getModelBS(a,!1),c=new JU.BS,e=a.nextSetBit(0);0<=e&&e<this.ac;e=a.nextSetBit(e+1))JM.AtomCollection.isDeleted(this.at[e])||this.at[e].$delete(c);for(var g=JU.BSUtil.copy(a),e=0;e<this.mc;e++){var j=this.am[e];j.resetDSSR(!1);j.bsAtomsDeleted.or(a);j.bsAtomsDeleted.and(j.bsAtoms);null!=j.bsAsymmetricUnit&&j.bsAsymmetricUnit.andNot(a);b.get(j.modelIndex)&&this.updateBasisFromSite(j.modelIndex);a=JU.BSUtil.andNot(j.bsAtoms,j.bsAtomsDeleted);j.firstAtomIndex=a.nextSetBit(0);j.act=a.cardinality();
j.isOrderly=j.act==j.bsAtoms.length()-j.firstAtomIndex}this.dBb(c,!1);this.vwr.shm.notifyAtoms("atomsDeleted",z(-1,[g,b]));this.validateBspf(!1)}},"JU.BS");c(b,"clearDB",function(a){this.getModelAuxiliaryInfo(this.at[a].mi).remove("dbName")},"~N");c(b,"adjustAtomArrays",function(a,b,c){this.ac=c;for(var e=b;e<c;e++){this.at[e]=this.at[a[e]];this.at[e].i=e;var g=this.am[this.at[e].mi];g.firstAtomIndex==a[e]&&(g.firstAtomIndex=e);g.bsAtoms.set(e)}if(null!=this.vibrations)for(e=b;e<c;e++)this.vibrations[e]=
this.vibrations[a[e]];if(null!=this.atomTensorList)for(e=b;e<c;e++)if(g=this.atomTensorList[e]=this.atomTensorList[a[e]],null!=g)for(var j=g.length;0<=--j;){var k=g[j];null!=k&&(k.atomIndex1=e)}if(null!=this.atomNames)for(e=b;e<c;e++)this.atomNames[e]=this.atomNames[a[e]];if(null!=this.atomTypes)for(e=b;e<c;e++)this.atomTypes[e]=this.atomTypes[a[e]];if(null!=this.atomResnos)for(e=b;e<c;e++)this.atomResnos[e]=this.atomResnos[a[e]];if(null!=this.atomSerials)for(e=b;e<c;e++)this.atomSerials[e]=this.atomSerials[a[e]];
if(null!=this.atomSeqIDs)for(e=b;e<c;e++)this.atomSeqIDs[e]=this.atomSeqIDs[a[e]];if(null!=this.bfactor100s)for(e=b;e<c;e++)this.bfactor100s[e]=this.bfactor100s[a[e]];if(null!=this.occupancies)for(e=b;e<c;e++)this.occupancies[e]=this.occupancies[a[e]];if(null!=this.partialCharges)for(e=b;e<c;e++)this.partialCharges[e]=this.partialCharges[a[e]]},"~A,~N,~N");c(b,"growAtomArrays",function(a){this.at=JU.AU.arrayCopyObject(this.at,a);null!=this.vibrations&&(this.vibrations=JU.AU.arrayCopyObject(this.vibrations,
a));null!=this.occupancies&&(this.occupancies=JU.AU.arrayCopyF(this.occupancies,a));null!=this.bfactor100s&&(this.bfactor100s=JU.AU.arrayCopyShort(this.bfactor100s,a));null!=this.partialCharges&&(this.partialCharges=JU.AU.arrayCopyF(this.partialCharges,a));null!=this.atomTensorList&&(this.atomTensorList=JU.AU.arrayCopyObject(this.atomTensorList,a));null!=this.atomNames&&(this.atomNames=JU.AU.arrayCopyS(this.atomNames,a));null!=this.atomTypes&&(this.atomTypes=JU.AU.arrayCopyS(this.atomTypes,a));null!=
this.atomResnos&&(this.atomResnos=JU.AU.arrayCopyI(this.atomResnos,a));null!=this.atomSerials&&(this.atomSerials=JU.AU.arrayCopyI(this.atomSerials,a));null!=this.atomSeqIDs&&(this.atomSeqIDs=JU.AU.arrayCopyI(this.atomSeqIDs,a))},"~N");c(b,"addAtom",function(a,b,c,e,g,j,k,f,y,n,q,v,m,r,s,u,w,x,z,A,C){f=(new JM.Atom).setAtom(a,this.ac,y,n,A,f,c,v,w,x);this.am[a].act++;this.am[a].bsAtoms.set(this.ac);JU.Elements.isElement(c,1)&&this.am[a].hydrogenCount++;this.ac>=this.at.length&&this.growAtomArrays(this.ac+
100);this.at[this.ac]=f;this.setBFactor(this.ac,s,!1);this.setOccupancy(this.ac,r,!1);this.setPartialCharge(this.ac,m,!1);null!=u&&this.setAtomTensors(this.ac,u);f.group=b;f.colixAtom=this.vwr.cm.getColixAtomPalette(f,J.c.PAL.CPK.id);x&&f.setTranslucent(!0,0.5);null!=e&&(null!=g&&(null==this.atomTypes&&(this.atomTypes=Array(this.at.length)),this.atomTypes[this.ac]=g),f.atomID=z,0==z&&(null==this.atomNames&&(this.atomNames=Array(this.at.length)),this.atomNames[this.ac]=e.intern()));-2147483648!=j&&
(null==this.atomSerials&&(this.atomSerials=D(this.at.length,0)),this.atomSerials[this.ac]=j);0!=k&&(null==this.atomSeqIDs&&(this.atomSeqIDs=D(this.at.length,0)),this.atomSeqIDs[this.ac]=k);null!=q&&this.setVibrationVector(this.ac,q);Float.isNaN(C)||this.setBondingRadius(this.ac,C);this.ac++;return f},"~N,JM.Group,~N,~S,~S,~N,~N,~N,JU.P3,~N,JU.V3,~N,~N,~N,~N,JU.Lst,~B,~B,~N,JU.BS,~N");c(b,"getInlineData",function(a){var b=null;if(0<=a)b=this.am[a].loadScript;else for(a=this.mc;0<=--a&&!(0<(b=this.am[a].loadScript).length()););
a=b.lastIndexOf('data "');if(0>a)return b=JU.PT.getQuotedStringAt(b.toString(),0),JS.ScriptCompiler.unescapeString(b,0,b.length);a=b.indexOf2('"',a+7);var c=b.lastIndexOf('end "');return c<a||0>a?null:b.substring2(a+2,c)},"~N");c(b,"isAtomPDB",function(a){return 0<=a&&this.am[this.at[a].mi].isBioModel},"~N");c(b,"setAtomNamesAndNumbers",function(a,b,c,e){var g=-1;if(e){for(;a<this.ac&&JM.AtomCollection.isDeleted(this.at[a]);)a++;if(a>=this.ac)return;g=this.at[a].mi;a=this.am[g].firstAtomIndex}null==
this.atomSerials&&(this.atomSerials=D(this.ac,0));null==this.atomNames&&(this.atomNames=Array(this.ac));for(var j=this.isXYZ&&this.vwr.getBoolean(603979978),k=2147483647,f=1;a<this.ac;++a){var y=this.at[a];if(!JM.AtomCollection.isDeleted(y)){if(y.mi!=k){if(e&&2147483647!=k&&y.mi!=g)continue;k=y.mi;f=j?0:1}var n=this.atomSerials[a];if(a>=-b){if(0==n||e)this.atomSerials[a]=a<b?c.atomSerials[a]:f;if(null==this.atomNames[a]||e)this.atomNames[a]=(y.getElementSymbol()+this.atomSerials[a]).intern()}else n>
f&&(f=n),e&&(this.atomNames[a]=(y.getElementSymbol()+n).intern());(!this.am[k].isModelKit||0<y.getElementNumber())&&f++}}},"~N,~N,JM.AtomCollection,~B");c(b,"connect",function(a){this.resetMolecules();for(var b=new JU.BS,c=0;c<a.length;c++){var e=a[c];if(!(null==e||2>e.length)){var g=F(e[0]),j=0>g;j&&(g=-1-g);var k=F(e[1]);if(!(0>k||g>=this.ac||k>=this.ac)){var f=2<e.length?F(e[2]):1;0>f&&(f&=65535);var y=3<e.length?xa(1E3*a[c][3]):this.getDefaultMadFromOrder(f);0==f||0==y&&32768!=f&&!JU.Edge.isOrderH(f)?
(e=this.at[g].getBond(this.at[k]),null!=e&&b.set(e.index)):this.bondAtoms(this.at[g],this.at[k],f,y,null,4<e.length?e[4]:0,j,!0)}}}0<=b.nextSetBit(0)&&this.deleteBonds(b,!1)},"~A");c(b,"setFrameDelayMs",function(a,b){for(var c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1))this.am[this.am[c].trajectoryBaseIndex].frameDelay=a},"~N,JU.BS");c(b,"getFrameDelayMs",function(a){return a<this.am.length&&0<=a?this.am[this.am[a].trajectoryBaseIndex].frameDelay:0},"~N");c(b,"getModelIndexFromId",function(a){var b=
0<=a.indexOf("#"),c=a.toLowerCase().endsWith(".basemodel");c&&(a=a.substring(0,a.length-10));for(var e=-1,g=null,j=0;j<this.mc;j++){var k=this.getInfo(j,"modelID"),f=a.startsWith("~")?"~"+this.getModelNumberDotted(j):null;if(!(null==f&&null==k&&null==(k=this.getModelTitle(j)))){b&&(g=this.getModelFileName(j),g.endsWith("#molfile")?k=g:(g+="#",k=g+k));if(a.equalsIgnoreCase(k)||a.equalsIgnoreCase(f))return c?this.vwr.getJDXBaseModelIndex(j):j;null!=g&&a.startsWith(g)&&(e=-2)}}return null==g&&!b?-2:
e},"~S");c(b,"getModelSetAuxiliaryInfo",function(a){var b=this.msInfo;null==b&&(b=new java.util.Hashtable);if(null!=a||!b.containsKey("models")){for(var c=new JU.Lst,e=0;e<this.mc;++e)if(null==a||a.get(e)){var g=this.getModelAuxiliaryInfo(e);g.put("modelIndex",Integer.$valueOf(e));c.addLast(g)}b.put("models",c)}return b},"JU.BS");c(b,"getDihedralMap",function(a){for(var b=new JU.Lst,c=a.length,e=null,g=null,j=null,k=null,f=c-1;0<=--f;)for(var y=c;--y>f;)if(e=this.at[a[f]],g=this.at[a[y]],e.isBonded(g))for(var n=
c;0<=--n;)if(n!=f&&n!=y&&(j=this.at[a[n]]).isBonded(e))for(var q=c;0<=--q;)if(q!=f&&q!=y&&q!=n&&(k=this.at[a[q]]).isBonded(g)){var v=D(4,0);v[0]=j.i;v[1]=e.i;v[2]=g.i;v[3]=k.i;b.addLast(v)}c=b.size();a=JU.AU.newInt2(c);for(f=c;0<=--f;)a[c-f-1]=b.get(f);return a},"~A");c(b,"setModulation",function(a,b,c,e){if(null==this.bsModulated)if(b)this.bsModulated=new JU.BS;else if(null==a)return;null==a&&(a=this.getModelAtomBitSetIncludingDeleted(-1,!1));for(var g=this.vwr.getFloat(1275072532),j=!1,k=a.nextSetBit(0);0<=
k;k=a.nextSetBit(k+1)){var f=this.getModulation(k);null!=f&&(f.setModTQ(this.at[k],b,c,e,g),null!=this.bsModulated&&this.bsModulated.setBitTo(k,b),j=!0)}j||(this.bsModulated=null)},"JU.BS,~B,JU.P3,~B");c(b,"getBoundBoxOrientation",function(a,b,c){var e=0,g=0,j=0,k=null,f=null,y=b.nextSetBit(0),n=0;if(0<=y){if(null==this.vOrientations){for(var q=0,k=new JU.P4,n=Array(3375),e=-7;7>=e;e++)for(g=-7;7>=g;g++)for(j=0;14>=j;j++,q++)1<(n[q]=JU.V3.new3(e/7,g/7,j/14)).length()&&--q;this.vOrientations=Array(q);
for(e=q;0<=--e;)k.set4(n[e].x,n[e].y,n[e].z,0),this.vOrientations[e]=JU.Quat.newP4(k);for(e=q;0<=--e;)q=Math.sqrt(1-n[e].lengthSquared()),Float.isNaN(q)&&(q=0),k.set4(n[e].x,n[e].y,n[e].z,q),this.vOrientations[e]=JU.Quat.newP4(k)}var q=new JU.P3,n=3.4028235E38,j=null,v=new JU.BoxInfo;v.setMargin(1312817669==a?0:0.1);for(e=this.vOrientations.length;0<=--e;){k=this.vOrientations[e];v.reset();if(null==c)for(g=y;0<=g;g=b.nextSetBit(g+1)){var m=k.transform2(this.at[g],q);v.addBoundBoxPoint(m)}else for(g=
c.length;0<=--g;)v.addBoundBoxPoint(k.transform2(c[g],q));switch(a){default:case 1312817669:case 1073741864:case 1814695966:g=(v.bbCorner1.x-v.bbCorner0.x)*(v.bbCorner1.y-v.bbCorner0.y)*(v.bbCorner1.z-v.bbCorner0.z);break;case 1111492629:g=v.bbCorner1.x-v.bbCorner0.x;break;case 1111492630:g=v.bbCorner1.y-v.bbCorner0.y;break;case 1111492631:g=v.bbCorner1.z-v.bbCorner0.z}g<n&&(f=k,j=v,v=new JU.BoxInfo,v.setMargin(0.1),n=g)}switch(a){default:return f;case 1814695966:a=j.getBoundBoxVertices();a=z(-1,
[a[0],a[4],a[2],a[1]]);f=f.inv();for(e=0;4>e;e++)f.transform2(a[e],a[e]),0<e&&a[e].sub(a[0]);return a;case 1312817669:case 1073741864:k=JU.Quat.newQ(f),e=j.bbCorner1.x-j.bbCorner0.x,g=j.bbCorner1.y-j.bbCorner0.y,j=j.bbCorner1.z-j.bbCorner0.z,e<g&&(q.set(0,0,1),k=JU.Quat.newVA(q,90).mulQ(k),f=e,e=g,g=f),g<j&&(j>e&&(q.set(0,1,0),k=JU.Quat.newVA(q,90).mulQ(k),f=e,e=j,j=f),q.set(1,0,0),k=JU.Quat.newVA(q,90).mulQ(k),f=g,g=j,j=f)}}return 1312817669==a?n+"\t{"+e+" "+g+" "+j+"}\t"+b:1814695966==a?null:null==
k||0==k.getTheta()?new JU.Quat:k},"~N,JU.BS,~A");c(b,"getUnitCellForAtom",function(a){if(0>a||a>this.ac||null==this.at[a])return null;if(null!=this.bsModulated){var b=this.getModulation(a),b=null==b?null:b.getSubSystemUnitCell();if(null!=b)return b}return this.getUnitCell(this.at[a].mi)},"~N");c(b,"clearCache",function(){for(var a=this.mc;0<=--a;)this.am[a].resetDSSR(!1)});c(b,"getSymMatrices",function(a){var b=this.getModelSymmetryCount(a);if(0==b)return null;var c=Array(b),e=this.am[a].biosymmetry;
null==e&&(e=this.getUnitCell(a));for(a=b;0<=--a;)c[a]=e.getSpaceGroupOperation(a);return c},"~N");c(b,"getSymmetryInvariant",function(a){a=this.getBasisAtom(a,!0);return null==a?D(0,0):this.getUnitCellForAtom(a.i).getInvariantSymops(a,null)},"~N");c(b,"getBsBranches",function(a){for(var b=w(a.length/6),c=Array(b),e=new java.util.Hashtable,g=0,j=0;g<b;g++,j+=6)if(!(1>Math.abs(a[j+5]-a[j+4]))){var k=F(a[j+1]),f=F(a[j+2]),y=""+k+"_"+f;if(!e.containsKey(y)){e.put(y,Boolean.TRUE);for(var y=this.vwr.getBranchBitSet(f,
k,!0),n=this.at[k].bonds,k=this.at[k],q=0;q<n.length;q++){var v=n[q];if(v.isCovalent()&&(v=v.getOtherAtom(k).i,v!=f&&y.get(v))){y=null;break}}c[g]=y}}return c},"~A");c(b,"recalculatePositionDependentQuantities",function(a,b){null!=this.vwr.shm.getShape(21)&&this.vwr.shm.getShapePropertyData(21,"move",z(-1,[a,b]));this.haveStraightness&&this.calculateStraightnessAll();this.recalculateLeadMidpointsAndWingVectors(-1);for(var c=this.getModelBS(a,!1),e=c.nextSetBit(0);0<=e;e=c.nextSetBit(e+1))if(this.sm.notifyAtomPositionsChanged(e,
a,b),null!=b){var g=this.am[e];g.isContainedIn(a)&&(null==g.mat4&&(g.mat4=JU.M4.newM4(null)),g.mat4.mul2(b,g.mat4))}},"JU.BS,JU.M4");c(b,"moveAtoms",function(a,b,c,e,g,j,k,f){if(null!=a){for(b=g.nextSetBit(0);0<=b;b=g.nextSetBit(b+1))a.rotTrans(this.at[b]),this.taintAtom(b,2);this.mat4.setM4(a);e=null}else if(f)k||(this.matInv.setM3(c),this.matInv.invert(),this.matInv.rotate(e));else{null==b?this.matTemp.setM3(c):(this.ptTemp.set(0,0,0),this.matInv.setM3(c),this.matInv.invert(),this.matTemp.mul2(b,
c),this.matTemp.mul2(this.matInv,this.matTemp));k?(this.vTemp.setT(j),this.mat4.setIdentity(),this.mat4.setTranslation(this.vTemp),this.mat4t.setToM3(this.matTemp),this.mat4.mul(this.mat4t),this.mat4t.setIdentity(),this.vTemp.scale(-1),this.mat4t.setTranslation(this.vTemp),this.mat4.mul(this.mat4t)):this.mat4.setToM3(this.matTemp);for(b=g.nextSetBit(0);0<=b;b=g.nextSetBit(b+1))k?this.mat4.rotTrans(this.at[b]):(this.ptTemp.add(this.at[b]),this.mat4.rotTrans(this.at[b]),this.ptTemp.sub(this.at[b])),
this.taintAtom(b,2);k||(this.ptTemp.scale(1/g.cardinality()),null==e&&(e=new JU.V3),e.add(this.ptTemp))}if(null!=e){for(b=g.nextSetBit(0);0<=b;b=g.nextSetBit(b+1))this.at[b].add(e),this.taintAtom(b,2);f||(this.mat4t.setIdentity(),this.mat4t.setTranslation(e),this.mat4.mul2(this.mat4t,this.mat4))}this.recalculatePositionDependentQuantities(g,this.mat4)},"JU.M4,JU.M3,JU.M3,JU.V3,JU.BS,JU.P3,~B,~B");c(b,"setDihedrals",function(a,b,c){var e=w(a.length/6);1<c&&(c=1);for(var g=0,j=0;g<e;g++,j+=6){var k=
b[g];if(!(null==k||k.isEmpty())){var f=this.at[F(a[j+1])],y=JU.V3.newVsub(this.at[F(a[j+2])],f),y=JU.A4.newVA(y,-((a[j+5]-a[j+4])*c)/57.29577951308232);this.matTemp.setAA(y);this.ptTemp.setT(f);for(f=k.nextSetBit(0);0<=f;f=k.nextSetBit(f+1))this.at[f].sub(this.ptTemp),this.matTemp.rotate(this.at[f]),this.at[f].add(this.ptTemp),this.taintAtom(f,2)}}},"~A,~A,~N");c(b,"setAtomCoordsRelative",function(a,b){this.setAtomsCoordRelative(b,a.x,a.y,a.z);this.mat4.setIdentity();this.vTemp.setT(a);this.mat4.setTranslation(this.vTemp);
this.recalculatePositionDependentQuantities(b,this.mat4)},"JU.T3,JU.BS");c(b,"setAtomCoords",function(a,b,c){this.setAtomCoord2(a,b,c);switch(b){case 1111492626:case 1111492627:case 1111492628:case 1145047055:break;default:this.recalculatePositionDependentQuantities(a,null)}},"JU.BS,~N,~O");c(b,"invertSelected",function(a,b,c,e){this.resetChirality();if(null!=a)for(var g=e.nextSetBit(0);0<=g;g=e.nextSetBit(g+1)){var j=2*(a.x-this.at[g].x);c=2*(a.y-this.at[g].y);var k=2*(a.z-this.at[g].z);this.setAtomCoordRelative(g,
j,c,k)}else if(null!=b){a=JU.V3.new3(b.x,b.y,b.z);a.normalize();for(var f=Math.sqrt(b.x*b.x+b.y*b.y+b.z*b.z),g=e.nextSetBit(0);0<=g;g=e.nextSetBit(g+1))k=2*-JU.Measure.distanceToPlaneD(b,f,this.at[g]),j=a.x*k,c=a.y*k,k*=a.z,this.setAtomCoordRelative(g,j,c,k)}else if(0<=c&&(b=this.at[c],a=b.bonds,null!=a)){j=new JU.BS;k=new JU.Lst;f=this.vwr.getModelUndeletedAtomsBitSet(b.mi);for(g=0;g<a.length;g++){var y=a[g].getOtherAtom(b);e.get(y.i)?j.or(JU.JmolMolecule.getBranchBitSet(this.at,y.i,f,null,c,!0,
!0)):k.addLast(y)}0!=k.size()&&(a=JU.Measure.getCenterAndPoints(k)[0],e=JU.V3.newVsub(b,a),e=JU.Quat.newVA(e,180),this.moveAtoms(null,null,e.getMatrix(),null,j,b,!0,!1))}},"JU.P3,JU.P4,~N,JU.BS");c(b,"getCellWeights",function(a){var b=null,c=a.nextSetBit(0),e=-1,g;if(0<=c&&null!=(g=this.getUnitCell(e=this.at[c].mi))){g=g.getUnitCellMultiplied();this.getModelAtomBitSetIncludingDeleted(e,!0).and(a);for(var b=M(a.cardinality(),0),j=new JU.P3,k=0;0<=c;c=a.nextSetBit(c+1))e=this.at[c],j.setT(e),g.toFractional(j,
!1),g.unitize(j),b[k++]=g.getCellWeight(j)}return b},"JU.BS");c(b,"getAtomGroupQuaternions",function(a,b,c){var e=0,g=new JU.Lst;a=JU.BSUtil.copy(a);for(var j=new JU.BS,k=a.nextSetBit(0);0<=k&&e<b;k=a.nextSetBit(k+1)){var f=this.at[k].group;f.setAtomBits(j);a.andNot(j);var y=f.getQuaternion(c);if(null==y&&(this.am[this.at[k].mi].isBioModel||(y=f.getQuaternionFrame(this.at)),null==y))continue;e++;g.addLast(y)}return g.toArray(Array(g.size()))},"JU.BS,~N,~S");c(b,"getConformation",function(a,b,c,e){for(var g=
new JU.BS,j=this.mc;0<=--j;)if(!(0<=a&&j!=a)){var k=this.am[j],f=this.vwr.getModelUndeletedAtomsBitSet(a);null!=e&&f.and(e);if(!(0>f.nextSetBit(0)))if(b>k.altLocCount)1==b&&g.or(f);else{if(this.am[j].isBioModel){if(-1E3>b){var k=1E3+b,y=this.getAltLocListInModel(j);-32!=k&&0>y.indexOf(String.fromCharCode(-k))&&(k=-2147483648)}else 0>b?(y=this.getAltLocListInModel(j),k=-1-b,k=k>=y.length?-2147483648:-y.charAt(k).charCodeAt(0)):k=b;if(-2147483648==k)continue;this.am[j].getConformation(k,c,f,g)}else{var n=
this.getAltLocCountInModel(j),y=this.getAltLocListInModel(j),q=new JU.BS;if(-1E3>b)var v=String.fromCharCode(-1E3-b),k=y.indexOf(v);else if(0>b)if(k=-b,v=this.vwr.getDataObj("property_part",f,1),null==v)k-=1;else{for(var m=0,r=f.nextSetBit(0);0<=r;r=f.nextSetBit(r+1)){var s=v[m++];0!=s&&(s!=k&&s!=-k)&&f.clear(r)}g.or(f);k=-1}else k=b-1;if(0>k||k>=n)continue;for(v=n;0<=--v;)v!=k&&f.andNot(this.getAtomBitsMDa(1073742355,y.substring(v,v+1),q))}g.or(f)}}return g},"~N,~N,~B,JU.BS");c(b,"getSequenceBits",
function(a,b,c){return this.haveBioModels?this.bioModelset.getAllSequenceBits(a,b,c):c},"~S,JU.BS,JU.BS");c(b,"getBioPolymerCountInModel",function(a){return this.haveBioModels?this.bioModelset.getBioPolymerCountInModel(a):0},"~N");c(b,"getPolymerPointsAndVectors",function(a,b,c,e){this.haveBioModels&&this.bioModelset.getAllPolymerPointsAndVectors(a,b,c,e)},"JU.BS,JU.Lst,~B,~N");c(b,"recalculateLeadMidpointsAndWingVectors",function(a){this.haveBioModels&&this.bioModelset.recalculatePoints(a)},"~N");
c(b,"calcRasmolHydrogenBonds",function(a,b,c,e,g,j,k){this.haveBioModels&&this.bioModelset.calcAllRasmolHydrogenBonds(a,b,c,e,g,j,k,2)},"JU.BS,JU.BS,JU.Lst,~B,~N,~B,JU.BS");c(b,"calculateStraightnessAll",function(){this.haveBioModels&&!this.haveStraightness&&this.bioModelset.calculateStraightnessAll()});c(b,"calculateStruts",function(a,b){return this.haveBioModels?this.bioModelset.calculateStruts(a,b):0},"JU.BS,JU.BS");c(b,"getGroupsWithin",function(a,b){return this.haveBioModels?this.bioModelset.getGroupsWithinAll(a,
b):new JU.BS},"~N,JU.BS");c(b,"getProteinStructureState",function(a,b){return this.haveBioModels?this.bioModelset.getFullProteinStructureState(a,b):""},"JU.BS,~N");c(b,"calculateStructures",function(a,b,c,e,g,j){return this.haveBioModels?this.bioModelset.calculateAllStuctures(a,b,c,e,g,j):""},"JU.BS,~B,~B,~B,~B,~N");c(b,"calculateStructuresAllExcept",function(a,b,c,e,g,j,k){this.freezeModels();return this.haveBioModels?this.bioModelset.calculateAllStructuresExcept(a,b,c,e,g,j,k):""},"JU.BS,~B,~B,~B,~B,~B,~N");
c(b,"recalculatePolymers",function(a){this.bioModelset.recalculateAllPolymers(a,this.getGroups())},"JU.BS");c(b,"calculatePolymers",function(a,b,c,e){null!=this.bioModelset&&this.bioModelset.calculateAllPolymers(a,b,c,e)},"~A,~N,~N,JU.BS");c(b,"calcSelectedMonomersCount",function(){this.haveBioModels&&this.bioModelset.calcSelectedMonomersCount()});c(b,"setProteinType",function(a,b){this.haveBioModels&&this.bioModelset.setAllProteinType(a,b)},"JU.BS,J.c.STR");c(b,"setStructureList",function(a){this.haveBioModels&&
this.bioModelset.setAllStructureList(a)},"java.util.Map");c(b,"setConformation",function(a){this.haveBioModels&&this.bioModelset.setAllConformation(a);return JU.BSUtil.copy(a)},"JU.BS");c(b,"getHeteroList",function(a){a=this.haveBioModels?this.bioModelset.getAllHeteroList(a):null;return null==a?this.getInfoM("hetNames"):a},"~N");c(b,"getUnitCellPointsWithin",function(a,b,c,e){var g=new JU.Lst,j=null,k=null;e&&(j=new java.util.Hashtable,k=new JU.Lst,j.put("atoms",k),j.put("points",g));var f=null==
b?-1:b.nextSetBit(0);b=this.vwr.getModelUndeletedAtomsBitSet(0>f?this.vwr.am.cmi:this.at[f].mi);0>f&&(f=b.nextSetBit(0));if(0<=f){var y=this.getUnitCellForAtom(f);if(null!=y){b=y.getIterator(this.vwr,this.at[f],b,a);for(null!=c&&b.setCenter(c,a);b.hasNext();)f=b.next(),c=b.getPosition(),g.addLast(c),e&&k.addLast(Integer.$valueOf(f))}}return e?j:g},"~N,JU.BS,JU.P3,~B");c(b,"calculateDssrProperty",function(a){null!=this.bioModelset&&this.bioModelset.haveDSSR&&this.bioModelset.getDSSRProperties(a)},
"~S");c(b,"getAtomCIPChiralityCode",function(a){this.haveChirality=!0;var b=this.am[a.mi];b.hasChirality||(this.calculateChiralityForAtoms(b.bsAtoms,!1),b.hasChirality=!0);return a.getCIPChiralityCode()},"JM.Atom");c(b,"calculateChiralityForAtoms",function(a,b){this.haveChirality=!0;for(var c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))this.at[c].setCIPChirality(0);J.api.Interface.getSymmetry(this.vwr,"ms").calculateCIPChiralityForAtoms(this.vwr,a);if(!b)return null;for(var e="",c=a.nextSetBit(0);0<=
c;c=a.nextSetBit(c+1))e+=this.at[c].getCIPChirality(!1);return e},"JU.BS,~B");c(b,"getPointTransf",function(a,b,c,e){this.isTrajectory(0<=a?a:b.mi)?this.trajectory.getFractional(b,e):e.setT(b);null!=c&&c.transform2(e,e)},"~N,JM.Atom,JU.Quat,JU.P3");c(b,"getSymmetryEquivAtoms",function(a,b,c){a=JU.BS.copy(a);var e=JU.BS.copy(a),g=a.nextSetBit(0);null==b&&(b=this.getUnitCellForAtom(g));if(null!=b){null==c&&(c=this.vwr.getModelUndeletedAtomsBitSet(this.at[g].mi));b=JU.BSUtil.copy(c);for(c=a.nextSetBit(0);0<=
c;c=a.nextSetBit(c+1))this.getSymmetryEquivAtomsForAtom(c,a,b,e)}return e},"JU.BS,J.api.SymmetryInterface,JU.BS");c(b,"getSymmetryEquivAtomsForAtom",function(a,b,c,e){a=this.at[a].getAtomSite();if(0<a)for(var g=c.nextSetBit(0);0<=g;g=c.nextSetBit(g+1))this.at[g].getAtomSite()==a&&(e.set(g),null!=b&&(b.clear(g),c.clear(g)))},"~N,JU.BS,JU.BS,JU.BS");c(b,"setSpaceGroup",function(a,b,c){null==this.unitCells&&(this.unitCells=Array(this.mc));this.unitCells[a]=b;this.haveUnitCells=!0;var e=1==b.getSpaceGroupOperationCount(),
g=b.getFinalOperationCount();if(null!=c){var j=c.isEmpty(),k=this.vwr.getModelUndeletedAtomsBitSet(a);j?c=JU.BSUtil.copy(k):this.setAsymmetricUnit(a,k,c,!e);1<g&&this.setModelCage(a,null,!1);if(0<(null==this.atomSeqIDs?0:this.atomSeqIDs.length))for(var f=k.nextSetBit(0);0<=f;f=k.nextSetBit(f+1))this.atomSeqIDs[f]=0;if(e)this.fixP1AtomSites(b,k);else{for(var y=null!=this.occupancies,n=b.getSymmetryOperations(),q=new JU.P3,v=new JU.P3,m=new JU.P3,r=0,s=c.nextSetBit(0);0<=s;s=c.nextSetBit(s+1)){f=this.at[s];
v.setT(f);b.toFractional(v,!1);b.unitize(v);j&&this.setSite(f,++r,!0);r=f.atomSite;k.clear(s);var u=y?this.occupancies[s]:0,f=k.nextSetBit(j?s+1:0);a:for(;0<=f;f=k.nextSetBit(f+1)){var w=this.at[f];if(!(w.atomNumberFlags!=w.atomNumberFlags||y&&u!=this.occupancies[f])){q.setT(w);b.toFractional(q,!1);b.unitize(q);for(var x=0;x<g;x++)if(m.setT(v),n[x].rotTrans(m),b.unitize(m),1.96E-6>m.distanceSquared(q)){this.setSite(w,r,!0);k.clear(f);c.clear(f);continue a}}}}k.isEmpty()||System.err.println("Model basis atoms not found for "+
k);j&&this.setAsymmetricUnit(a,null,c,!e)}}this.setInfo(a,"unitCellParams",b.getUnitCellParams());this.setInfo(a,"spaceGroupAssigned",Boolean.TRUE);this.setInfo(a,"spaceGroupInfo",null);this.setInfo(a,"symmetryOperations",b.getSymopList(!1));this.setInfo(a,"spaceGroup",b.getSpaceGroupName());null!=this.am[a].simpleCage&&(b.getUnitCell(this.am[a].simpleCage.getUnitCellVectors(),!1,null),this.setInfo(a,"unitCellParams",b.getUnitCellParams()));this.setModelCage(a,null,!1)},"~N,J.api.SymmetryInterface,JU.BS");
c(b,"setAsymmetricUnit",function(a,b,c,e){null==b&&(b=this.vwr.getModelUndeletedAtomsBitSet(a));this.am[a].bsAsymmetricUnit=c;null==this.bsSymmetry&&(this.bsSymmetry=JU.BS.newN(this.ac));this.bsSymmetry.or(b);this.bsSymmetry.andNot(c);if(e){a=0;for(e=b.nextSetBit(0);0<=e;e=b.nextSetBit(e+1)){var g=c.get(e);this.at[e].setSymop(g?1:0,!1);g&&this.setSite(this.at[e],++a,!1)}b.andNot(c)}},"~N,JU.BS,JU.BS,~B");c(b,"setModelCage",function(a,b,c){0<=a&&a<this.mc&&(this.am[a].simpleCage=b,null!=b&&c&&this.setInfo(a,
"unitCellParams",b.getUnitCellParams()),this.haveUnitCells=!0);return b},"~N,J.api.SymmetryInterface,~B");c(b,"fixP1AtomSites",function(a,b){if(!(null==a||1!=a.getSpaceGroupOperationCount()))for(var c=b.cardinality(),c=Array(c),e=0,g=a.getPrecision(),g=g*g,j=b.nextSetBit(0);0<=j;j=b.nextSetBit(j+1)){var k=this.at[j],f=new JU.A4;f.setT(k);a.toFractional(f,!1);a.unitize(f);for(var y=!1,n=0;n<e;n++){var q=c[n];if(k.atomNumberFlags==q.angle&&q.distanceSquared(f)<g){y=!0;this.setSite(k,n+1,!0);break}}y||
(f.angle=k.atomNumberFlags,c[e]=f,this.setSite(k,++e,!0))}},"J.api.SymmetryInterface,JU.BS");c(b,"getBasisAtom",function(a,b){var c=this.at[a];if(!b||null!=this.getUnitCellForAtom(a)){var e=c.atomSite;if(0<e){var g=this.am[c.mi].bsAsymmetricUnit;if(null!=g)for(var j=g.nextSetBit(0);0<=j;j=g.nextSetBit(j+1))if(this.at[j].atomSite==e)return this.at[j]}}return c},"~N,~B");c(b,"updateBasisFromSite",function(a){if(null!=this.getUnitCell(a)){var b=this.am[a].bsAsymmetricUnit;if(null!=b){b.clearAll();var c=
new JU.BS;a=this.am[a].bsAtoms;for(var e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))if(!JM.AtomCollection.isDeleted(this.at[e])){var g=this.at[e].atomSite;c.get(g)||(c.set(g),b.set(e))}for(var j=D(c.length(),0),g=0,e=c.nextSetBit(0);0<=e;e=c.nextSetBit(e+1))j[e]=++g;for(e=a.nextSetBit(0);0<=e;e=a.nextSetBit(e+1))JM.AtomCollection.isDeleted(this.at[e])||(g=this.at[e].atomSite,this.setSite(this.at[e],-1,!1),this.setSite(this.at[e],j[g],!0));null==this.bsSymmetry&&(this.bsSymmetry=JU.BS.newN(this.ac));
this.bsSymmetry.or(a);this.bsSymmetry.andNot(b)}}},"~N");c(b,"getConnectingAtoms",function(a,b){for(var c=new JU.BS,e=new JU.BS,g=a.nextSetBit(0);0<=g;g=a.nextSetBit(g+1))for(var j=this.at[g],k=j.bonds,f=0,y=j.getBondCount();0<=--y;)if(k[y].isCovalent()&&!a.get(f=k[y].getOtherAtom(j).i))c.set(g),e.set(f);a.or(e);b.or(e);return c},"JU.BS,JU.BS");c(b,"saveAtomPositions",function(){for(var a=Array(this.at.length),b=a.length;0<=--b;){var c=this.at[b];JM.AtomCollection.isDeleted(c)||(a[b]=JU.P3.newP(c))}return a});
c(b,"restoreAtomPositions",function(a){for(var b=a.length;0<=--b;){var c=this.at[b];JM.AtomCollection.isDeleted(c)||c.setT(a[b])}},"~A");c(b,"clearUnitCell",function(a){if(null!=this.unitCells){if(0>a)for(a=0;a<this.mc;a++)this.clearUnitCell(a);else if(this.am[a].simpleCage=null,a<this.unitCells.length){this.unitCells[a]=null;for(a=this.getModelAuxiliaryInfo(a).entrySet().iterator();a.hasNext();)JV.JC.isSpaceGroupInfoKey(a.next().getKey())&&a.remove();if(1<this.mc)return}this.unitCells=null;this.haveUnitCells=
!1}},"~N");c(b,"fixDeletedBonds",function(a){var b=new JU.BS;if(null==this.bo)return a;for(var c=0,e=0;c<this.bondCount;c++)null!=this.bo[c]&&(0<=e&&b.setBitTo(c,a.get(e)),e++);return b},"JU.BS");c(b,"getEquivalentAtoms",function(a){var b=this.vwr.getModelUndeletedAtomsBitSet(this.at[a].mi);b.and(this.getAtomBitsMaybeDeleted(1094713369,JU.BSUtil.newAndSetBit(a)));return b},"~N");c(b,"morphAtoms",function(a,b,c,e,g){for(var j=a.nextSetBit(0);0<=j;j=a.nextSetBit(j+1),c++){var k=this.vwr.ms.at[j];g.sub2(b[1][c],
b[0][c]);g.scaleAdd2(e,g,b[0][c]);k.setT(g);this.taintAtom(j,2)}},"JU.BS,~A,~N,~N,JU.P3");c(b,"getCurrentSpinAtoms",function(){var a=this.vwr.getVisibleFramesBitSet();this.includeAllRelatedFrames(a,!0);a=this.vwr.getModelUndeletedAtomsBitSetBs(a);a.and(this.getAtoms(1095241729,a));return a});c(b,"getSpin",function(a){var b=this.at[a];if(null==b)return 0;var c=this.vibrations[a];if(null==c||0==c.magMoment)return 0;b=b.getSymOp()-1;if(0>b)return 0;a=this.getUnitCellForAtom(a);return null==a?0:a.getSpinIndex(b)+
1},"~N");c(b,"refreshDataFramePointGroup",function(a){a=this.getUnitCell(-1-a);null!=a&&a.updatePointGroup()},"~N");c(b,"getStructureAssignments",function(){null!=this.bioModelset&&this.bioModelset.haveDSSR&&this.bioModelset.getStructureDSSRAssignments()});c(b,"getAtomicDSSRDataFloat",function(a,b){return null!=this.bioModelset&&this.bioModelset.haveDSSR?this.bioModelset.getAtomicDSSRDataFloat(a,b):NaN},"~S,~N");c(b,"getDSSRProperties",function(a){return null!=this.bioModelset&&this.bioModelset.haveDSSR?
this.bioModelset.getDSSRProperties(a):null},"~S");var a=s(function(){this.isValid=!1;this.parts=this.stringData=this.floatData=this.key=this.dataPath=null;r(this,arguments)},JM.ModelSet,"DataList",null);u(a,function(a){this.dataPath=a;this.parts=a.$plit("\\.")},"~S");c(a,"setFloats",function(a){if(null!=this.floatData&&this.floatData.length>=a)return this.floatData;this.stringData=null;this.floatData=M(a,0);for(var b=0;b<a;b++)this.floatData[b]=NaN;this.isValid=!0;return this.floatData},"~N");c(a,
"setStringData",function(a){if(null!=this.stringData&&this.stringData.length>=a)return this.stringData;this.floatData=null;this.stringData=Array(a);this.isValid=!0;return this.stringData},"~N");c(a,"isFloat",function(){return null!=this.floatData});c(a,"getData",function(){return this.isFloat()?this.floatData:this.stringData});b.hbondMinRasmol=2.5});m("JM");x(["JU.M3","$.P3"],"JM.Orientation",["JU.PT","JU.Escape"],function(){var b=s(function(){this.rotationMatrix=this.saveName=null;this.rotationRadius=
this.zoom=this.yTrans=this.xTrans=0;this.navCenter=this.center=null;this.cameraY=this.cameraX=this.cameraDepth=this.navDepth=this.yNav=this.xNav=NaN;this.navigationMode=this.windowCenteredFlag=!1;this.vwr=this.pymolView=this.moveToText=null;r(this,arguments)},JM,"Orientation",null);N(b,function(){this.rotationMatrix=new JU.M3;this.center=new JU.P3;this.navCenter=new JU.P3});u(b,function(a,d,b){this.vwr=a;null!=b?(this.pymolView=b,this.moveToText="moveTo -1.0 PyMOL "+JU.Escape.eAF(b)):(a.finalizeTransformParameters(),
d?(d=a.ms.getInfoM("defaultOrientationMatrix"),null==d?this.rotationMatrix.setScale(1):this.rotationMatrix.setM3(d)):a.tm.getRotation(this.rotationMatrix),this.xTrans=a.tm.getTranslationXPercent(),this.yTrans=a.tm.getTranslationYPercent(),this.zoom=a.tm.getZoomSetting(),this.center.setT(a.tm.fixedRotationCenter),this.windowCenteredFlag=a.tm.isWindowCentered(),this.rotationRadius=a.getFloat(570425388),this.navigationMode=a.getBoolean(603979889),this.moveToText=a.tm.getMoveToText(-1,!1),this.navigationMode&&
(this.xNav=a.tm.getNavigationOffsetPercent("X"),this.yNav=a.tm.getNavigationOffsetPercent("Y"),this.navDepth=a.tm.navigationDepthPercent,this.navCenter=JU.P3.newP(a.tm.navigationCenter)),0!=a.tm.camera.z&&(this.cameraDepth=a.tm.getCameraDepth(),this.cameraX=a.tm.camera.x,this.cameraY=a.tm.camera.y))},"JV.Viewer,~B,~A");f(b,"toString",function(){return"[Orientation "+this.saveName+" "+this.rotationRadius+"]"});c(b,"getMoveToText",function(a){return a?"   "+this.moveToText+"\n  save orientation "+JU.PT.esc(this.saveName.substring(12))+
";\n":this.moveToText},"~B");c(b,"restore",function(a,d){d?(this.vwr.setBooleanProperty("windowCentered",this.windowCenteredFlag),this.vwr.setBooleanProperty("navigationMode",this.navigationMode),null==this.pymolView?this.vwr.moveTo(null,a,this.center,null,NaN,this.rotationMatrix,this.zoom,this.xTrans,this.yTrans,this.rotationRadius,this.navCenter,this.xNav,this.yNav,this.navDepth,this.cameraDepth,this.cameraX,this.cameraY):this.vwr.tm.moveToPyMOL(this.vwr.eval,a,this.pymolView)):this.vwr.tm.setRotation(this.rotationMatrix);
return!0},"~N,~B")});m("JM");x(null,"JM.StateScript",["JU.SB","JU.BSUtil","$.Escape"],function(){var b=s(function(){this.modelIndex=0;this.script2=this.script1=this.bsAtoms2=this.bsAtoms1=this.bsBonds=null;this.inDefinedStateBlock=!1;r(this,arguments)},JM,"StateScript",null);u(b,function(a,d,b,c,e,g,j){this.modelIndex=a;this.script1=d;this.bsBonds=JU.BSUtil.copy(b);this.bsAtoms1=JU.BSUtil.copy(c);this.bsAtoms2=JU.BSUtil.copy(e);this.script2=g;this.inDefinedStateBlock=j},"~N,~S,JU.BS,JU.BS,JU.BS,~S,~B");
c(b,"isValid",function(){return null!=this.script1&&0<this.script1.length&&(null==this.bsBonds||0<=this.bsBonds.nextSetBit(0))&&(null==this.bsAtoms1||0<=this.bsAtoms1.nextSetBit(0))&&(null==this.bsAtoms2||0<=this.bsAtoms2.nextSetBit(0))});f(b,"toString",function(){if(!this.isValid())return"";var a=JU.SB.newS(this.script1);null!=this.bsBonds&&a.append(" ").append(JU.Escape.eBond(this.bsBonds));null!=this.bsAtoms1&&a.append(" ").append(JU.Escape.eBS(this.bsAtoms1));null!=this.bsAtoms2&&a.append(" ").append(JU.Escape.eBS(this.bsAtoms2));
null!=this.script2&&a.append(" ").append(this.script2);a=a.toString();a.endsWith(";")||(a+=";");return a});c(b,"isConnect",function(){return 0<=this.script1.indexOf("connect")});c(b,"deleteAtoms",function(a,d,b){if(a==this.modelIndex)return!1;if(a>this.modelIndex)return!0;JU.BSUtil.deleteBits(this.bsBonds,d);JU.BSUtil.deleteBits(this.bsAtoms1,b);JU.BSUtil.deleteBits(this.bsAtoms2,b);return this.isValid()},"~N,JU.BS,JU.BS");c(b,"setModelIndex",function(a){this.modelIndex=a},"~N")});m("JM");I(JM,"Structure");
m("JM");var ob=s(function(){this.id="";this.type=" ";this.scale=this.tickLabelFormats=this.ticks=null;this.first=0;this.signFactor=1;this.reference=null;r(this,arguments)},JM,"TickInfo",null);u(ob,function(b){this.ticks=b},"JU.P3");m("JU");x(["JU.P3","$.V3"],"JU.BoxInfo",["java.util.Hashtable","JU.Measure","$.P4","JU.Point3fi"],function(){var b=s(function(){this.bbVertices=this.bbVector=this.bbCenter=this.bbCorner1=this.bbCorner0=null;this.isScaleSet=!1;this.margin=0;r(this,arguments)},JU,"BoxInfo",
null);N(b,function(){this.bbCorner0=new JU.P3;this.bbCorner1=new JU.P3;this.bbCenter=new JU.P3;this.bbVector=new JU.V3;this.bbVertices=Array(8);for(var a=0;8>a;a++)JU.BoxInfo.unitBboxPoints[a]=JU.P3.new3(-1,-1,-1),JU.BoxInfo.unitBboxPoints[a].scaleAdd2(2,JU.BoxInfo.unitCubePoints[a],JU.BoxInfo.unitBboxPoints[a])});u(b,function(){for(var a=8;0<=--a;)this.bbVertices[a]=new JU.Point3fi;this.reset()});c(b,"reset",function(){this.isScaleSet=!1;this.bbCorner0.set(3.4028235E38,3.4028235E38,3.4028235E38);
this.bbCorner1.set(-3.4028235E38,-3.4028235E38,-3.4028235E38)});b.scaleBox=c(b,"scaleBox",function(a,d){if(!(0==d||1==d)){for(var b=new JU.P3,c=new JU.V3,e=0;8>e;e++)b.add(a[e]);b.scale(0.125);for(e=0;8>e;e++)c.sub2(a[e],b),c.scale(d),a[e].add2(b,c)}},"~A,~N");b.getVerticesFromOABC=c(b,"getVerticesFromOABC",function(a){for(var d=Array(8),b=0;7>=b;b++)d[b]=JU.P3.newP(a[0]),4==(b&4)&&d[b].add(a[1]),2==(b&2)&&d[b].add(a[2]),1==(b&1)&&d[b].add(a[3]);return d},"~A");b.getCanonicalCopy=c(b,"getCanonicalCopy",
function(a,d){for(var b=Array(8),c=0;8>c;c++)b[JU.BoxInfo.toCanonical[c]]=JU.P3.newP(a[c]);JU.BoxInfo.scaleBox(b,d);return b},"~A,~N");b.toOABC=c(b,"toOABC",function(a,d){var b=JU.P3.newP(a[0]),c=JU.P3.newP(a[4]),e=JU.P3.newP(a[2]),g=JU.P3.newP(a[1]);c.sub(b);e.sub(b);g.sub(b);null!=d&&b.add(d);return z(-1,[b,c,e,g])},"~A,JU.T3");c(b,"getBoundBoxCenter",function(){this.isScaleSet||this.setBbcage(1);return this.bbCenter});c(b,"getBoundBoxCornerVector",function(){this.isScaleSet||this.setBbcage(1);
return this.bbVector});c(b,"getBoundBoxPoints",function(a){this.isScaleSet||this.setBbcage(1);return a?z(-1,[this.bbCenter,JU.P3.newP(this.bbVector),this.bbCorner0,this.bbCorner1]):z(-1,[this.bbCorner0,this.bbCorner1])},"~B");c(b,"getBoundBoxVertices",function(){this.isScaleSet||this.setBbcage(1);return this.bbVertices});c(b,"setBoundBoxFromOABC",function(a){for(var d=JU.P3.newP(a[0]),b=new JU.P3,c=0;4>c;c++)b.add(a[c]);this.setBoundBox(d,b,!0,1)},"~A");c(b,"setBoundBox",function(a,d,b,c){if(null!=
a){if(0==c)return;if(b){if(0==a.distance(d))return;this.bbCorner0.set(Math.min(a.x,d.x),Math.min(a.y,d.y),Math.min(a.z,d.z));this.bbCorner1.set(Math.max(a.x,d.x),Math.max(a.y,d.y),Math.max(a.z,d.z))}else{if(0==d.x||0==d.y&&0==d.z)return;this.bbCorner0.set(a.x-d.x,a.y-d.y,a.z-d.z);this.bbCorner1.set(a.x+d.x,a.y+d.y,a.z+d.z)}}this.setBbcage(c)},"JU.T3,JU.T3,~B,~N");c(b,"setMargin",function(a){this.margin=a},"~N");c(b,"addBoundBoxPoint",function(a){this.isScaleSet=!1;JU.BoxInfo.addPoint(a,this.bbCorner0,
this.bbCorner1,this.margin)},"JU.T3");b.addPoint=c(b,"addPoint",function(a,d,b,c){a.x-c<d.x&&(d.x=a.x-c);a.x+c>b.x&&(b.x=a.x+c);a.y-c<d.y&&(d.y=a.y-c);a.y+c>b.y&&(b.y=a.y+c);a.z-c<d.z&&(d.z=a.z-c);a.z+c>b.z&&(b.z=a.z+c)},"JU.T3,JU.T3,JU.T3,~N");b.addPointXYZ=c(b,"addPointXYZ",function(a,d,b,c,e,g){a-g<c.x&&(c.x=a-g);a+g>e.x&&(e.x=a+g);d-g<c.y&&(c.y=d-g);d+g>e.y&&(e.y=d+g);b-g<c.z&&(c.z=b-g);b+g>e.z&&(e.z=b+g)},"~N,~N,~N,JU.P3,JU.P3,~N");c(b,"setBbcage",function(a){this.isScaleSet=!0;this.bbCenter.add2(this.bbCorner0,
this.bbCorner1);this.bbCenter.scale(0.5);this.bbVector.sub2(this.bbCorner1,this.bbCenter);0<a?this.bbVector.scale(a):(this.bbVector.x-=a/2,this.bbVector.y-=a/2,this.bbVector.z-=a/2);for(var d=8;0<=--d;){var b=this.bbVertices[d];b.setT(JU.BoxInfo.unitBboxPoints[d]);b.x*=this.bbVector.x;b.y*=this.bbVector.y;b.z*=this.bbVector.z;b.add(this.bbCenter)}1!=a&&(this.bbCorner0.setT(this.bbVertices[0]),this.bbCorner1.setT(this.bbVertices[7]))},"~N");c(b,"isWithin",function(a){this.isScaleSet||this.setBbcage(1);
return a.x>=this.bbCorner0.x&&a.x<=this.bbCorner1.x&&a.y>=this.bbCorner0.y&&a.y<=this.bbCorner1.y&&a.z>=this.bbCorner0.z&&a.z<=this.bbCorner1.z},"JU.P3");c(b,"getMaxDim",function(){return 2*this.bbVector.length()});c(b,"getInfo",function(a){var d=Double.$valueOf(Math.abs(8*this.bbVector.x*this.bbVector.y*this.bbVector.z));if("volume".equals(a))return d;var b=JU.P3.newP(this.bbCenter);return"center".equals(a)?b:null==a||"info".equals(a)?(a=new java.util.Hashtable,a.put("center",b),b=JU.V3.newVsub(this.bbCorner1,
this.bbCorner0),a.put("dimensions",b),a.put("girth",Double.$valueOf(b.x+b.y+b.z)),a.put("area",Double.$valueOf(2*(b.x*b.y+b.x*b.z+b.z*b.y))),a.put("volume",d),a):null},"~S");f(b,"toString",function(){return""+this.bbCorner0+this.bbCorner1});b.getBoxFacesFromOABC=c(b,"getBoxFacesFromOABC",function(a){var d=Array(6),b=new JU.V3,c=new JU.V3,e=new JU.P3,g=new JU.P3,j=new JU.P3;a=null==a?JU.BoxInfo.unitCubePoints:JU.BoxInfo.getVerticesFromOABC(a);for(var k=0;6>k;k++)e.setT(a[JU.BoxInfo.facePoints[k][0]]),
g.setT(a[JU.BoxInfo.facePoints[k][1]]),j.setT(a[JU.BoxInfo.facePoints[k][2]]),d[k]=JU.Measure.getPlaneThroughPoints(e,g,j,b,c,new JU.P4);return d},"~A");b.bbcageTickEdges=da(-1,"z\x00\x00yx\x00\x00\x00\x00\x00\x00\x00".split(""));b.uccageTickEdges=da(-1,"zyx\x00\x00\x00\x00\x00\x00\x00\x00\x00".split(""));b.edges=O(-1,[0,1,0,2,0,4,1,3,1,5,2,3,2,6,3,7,4,5,4,6,5,7,6,7]);b.faceOrder=D(-1,[0,3,5,2,1,4]);b.facePoints=z(-1,[D(-1,[4,0,6]),D(-1,[4,6,5]),D(-1,[5,7,1]),D(-1,[1,3,0]),D(-1,[6,2,7]),D(-1,[1,0,
5]),D(-1,[0,2,6]),D(-1,[6,7,5]),D(-1,[7,3,1]),D(-1,[3,2,0]),D(-1,[2,3,7]),D(-1,[0,4,5])]);b.unitCubePoints=z(-1,[JU.P3.new3(0,0,0),JU.P3.new3(0,0,1),JU.P3.new3(0,1,0),JU.P3.new3(0,1,1),JU.P3.new3(1,0,0),JU.P3.new3(1,0,1),JU.P3.new3(1,1,0),JU.P3.new3(1,1,1)]);b.toCanonical=D(-1,[0,3,4,7,1,2,5,6]);b.unitBboxPoints=Array(8)});m("JU");x(["JU.BS"],"JU.BSUtil",null,function(){var b=G(JU,"BSUtil",null);b.newAndSetBit=c(b,"newAndSetBit",function(a){var d=JU.BS.newN(a+1);d.set(a);return d},"~N");b.areEqual=
c(b,"areEqual",function(a,d){return null==a||null==d?null==a&&null==d:a.equals(d)},"JU.BS,JU.BS");b.haveCommon=c(b,"haveCommon",function(a,d){return null==a||null==d?!1:a.intersects(d)},"JU.BS,JU.BS");b.cardinalityOf=c(b,"cardinalityOf",function(a){return null==a?0:a.cardinality()},"JU.BS");b.newBitSet2=c(b,"newBitSet2",function(a,d){var b=JU.BS.newN(d);b.setBits(a,d);return b},"~N,~N");b.setAll=c(b,"setAll",function(a){var d=JU.BS.newN(a);d.setBits(0,a);return d},"~N");b.andNot=c(b,"andNot",function(a,
d){null!=d&&null!=a&&a.andNot(d);return a},"JU.BS,JU.BS");b.copy=c(b,"copy",function(a){return null==a?null:a.clone()},"JU.BS");b.copy2=c(b,"copy2",function(a,d){if(null==a||null==d)return null;d.clearAll();d.or(a);return d},"JU.BS,JU.BS");b.copyInvert=c(b,"copyInvert",function(a,d){return null==a?null:JU.BSUtil.andNot(JU.BSUtil.setAll(d),a)},"JU.BS,~N");b.invertInPlace=c(b,"invertInPlace",function(a,d){return JU.BSUtil.copy2(JU.BSUtil.copyInvert(a,d),a)},"JU.BS,~N");b.toggleInPlace=c(b,"toggleInPlace",
function(a,d){a.equals(d)?a.clearAll():0==JU.BSUtil.andNot(JU.BSUtil.copy(d),a).length()?JU.BSUtil.andNot(a,d):a.or(d);return a},"JU.BS,JU.BS");b.deleteBits=c(b,"deleteBits",function(a,d){if(null==a||null==d)return a;var b=d.nextSetBit(0);if(0>b)return a;var c=a.length(),e=Math.min(c,d.length()),g;for(g=d.nextClearBit(b);g<e&&0<=g;g=d.nextClearBit(g+1))a.setBitTo(b++,a.get(g));for(g=e;g<c;g++)a.setBitTo(b++,a.get(g));b<c&&a.clearBits(b,c);return a},"JU.BS,JU.BS");b.shiftBits=c(b,"shiftBits",function(a,
d,b,c){if(!(null==a||null==d)){for(var e=d.length(),g=JU.BS.newN(e),j=!1,k=!1,f=b,y=0,n=0;y<e&&n<c;y++)d.get(y)?(k&&g.set(y),f=b,j=!1):a.get(n++)?(g.set(y),f&&(f=!1,k=j=!0)):f&&!j&&(k=!1);a.clearAll();a.or(g)}},"JU.BS,JU.BS,~B,~N");b.offset=c(b,"offset",function(a,d,b){if(null!=a){for(var c=JU.BS.newN(a.length()+b),e=a.nextSetBit(0);e>=d;e=a.nextSetBit(e+1))c.set(e+b);JU.BSUtil.copy2(c,a)}},"JU.BS,~N,~N");b.setMapBitSet=c(b,"setMapBitSet",function(a,d,b,c){var e;a.containsKey(c)?e=a.get(c):a.put(c,
e=new JU.BS);e.setBits(d,b+1)},"java.util.Map,~N,~N,~S");b.emptySet=new JU.BS});m("JU");x(["JU.Int2IntHash"],"JU.C","JU.AU $.CU $.PT $.SB J.c.PAL JU.Escape $.Logger".split(" "),function(){var b=G(JU,"C",null);b.getColix=c(b,"getColix",function(a){if(0==a)return 0;a|=4278190080;var b=JU.C.colixHash.get(a);return(0<b?b:JU.C.allocateColix(a,!1))|0},"~N");b.allocateColix=c(b,"allocateColix",function(a,b){var c;if(b)c=2047;else{if(-74566==a)return 3;for(c=JU.C.colixMax;4<=--c;)if((a&16777215)==(JU.C.argbs[c]&
16777215))return c;c=JU.C.colixMax}if(c>=JU.C.argbs.length){var e=b?c+1:2*JU.C.colixMax;2048<e&&(e=2048);JU.C.argbs=JU.AU.arrayCopyI(JU.C.argbs,e);null!=JU.C.argbsGreyscale&&(JU.C.argbsGreyscale=JU.AU.arrayCopyI(JU.C.argbsGreyscale,e))}JU.C.argbs[c]=a;null!=JU.C.argbsGreyscale&&(JU.C.argbsGreyscale[c]=JU.CU.toFFGGGfromRGB(a));JU.C.colixHash.put(a,c);return 2047>c?JU.C.colixMax++:JU.C.colixMax},"~N,~B");b.setLastGrey=c(b,"setLastGrey",function(a){JU.C.calcArgbsGreyscale();JU.C.argbsGreyscale[2047]=
JU.CU.toFFGGGfromRGB(a)},"~N");b.calcArgbsGreyscale=c(b,"calcArgbsGreyscale",function(){if(null==JU.C.argbsGreyscale){for(var a=D(JU.C.argbs.length,0),b=JU.C.argbs.length;4<=--b;)a[b]=JU.CU.toFFGGGfromRGB(JU.C.argbs[b]);JU.C.argbsGreyscale=a}});b.getArgbGreyscale=c(b,"getArgbGreyscale",function(a){null==JU.C.argbsGreyscale&&JU.C.calcArgbsGreyscale();return JU.C.argbsGreyscale[a&-30721]},"~N");b.getColixO=c(b,"getColixO",function(a){if(null==a)return 0;if(C(a,"J.c.PAL"))return a===J.c.PAL.NONE?0:2;
if(C(a,Integer))return JU.C.getColix(a.intValue());if("string"==typeof a)return JU.C.getColixS(a);if(C(a,Byte))return 0==a.byteValue()?0:2;JU.Logger.debugging&&JU.Logger.debug("?? getColix("+a+")");return 22},"~O");b.getTranslucentFlag=c(b,"getTranslucentFlag",function(a){return 0==a?0:0>a?30720:Float.isNaN(a)||255<=a||1==a?16384:(w(Math.floor(1>a?256*a:15<=a?a:9>=a?w(Math.floor(a-1))<<5:256))>>5&15)<<11},"~N");b.isColixLastAvailable=c(b,"isColixLastAvailable",function(a){return 0<a&&2047==(a&2047)},
"~N");b.getArgb=c(b,"getArgb",function(a){return JU.C.argbs[a&-30721]},"~N");b.isColixColorInherited=c(b,"isColixColorInherited",function(a){switch(a){case 0:case 1:return!0;default:return 1==(a&-30721)}},"~N");b.getColixInherited=c(b,"getColixInherited",function(a,b){switch(a){case 0:return b;case 1:return b&-30721;default:return 1==(a&-30721)?b&-30721|a&30720:a}},"~N,~N");b.renderPass2=c(b,"renderPass2",function(a){a&=30720;return 0!=a&&30720!=a},"~N");b.isColixTranslucent=c(b,"isColixTranslucent",
function(a){return 0!=(a&30720)},"~N");b.getChangeableColixIndex=c(b,"getChangeableColixIndex",function(a){return 0<=a?-1:a&2047},"~N");b.getColixTranslucent3=c(b,"getColixTranslucent3",function(a,b,c){a&=-30721;0==a&&(a=1);return b?a|JU.C.getTranslucentFlag(c):a},"~N,~B,~N");b.copyColixTranslucency=c(b,"copyColixTranslucency",function(a,b){return JU.C.getColixTranslucent3(b,JU.C.isColixTranslucent(a),JU.C.getColixTranslucencyLevel(a))},"~N,~N");b.getColixTranslucencyFractional=c(b,"getColixTranslucencyFractional",
function(a){a=JU.C.getColixTranslucencyLevel(a);return-1==a?0.5:0==a?0:255==a?1:a/256},"~N");b.getColixTranslucencyLabel=c(b,"getColixTranslucencyLabel",function(a){return"translucent "+(30720==(a&30720)?-1:JU.C.getColixTranslucencyFractional(a))},"~N");b.getColixTranslucencyLevel=c(b,"getColixTranslucencyLevel",function(a){a=a>>11&15;switch(a){case 0:return 0;case 1:case 2:case 3:case 4:case 5:case 6:case 7:return a<<5;case 15:return-1;default:return 255}},"~N");b.isTransparent=c(b,"isTransparent",
function(a){return 16384==(a&30720)},"~N");b.getColixS=c(b,"getColixS",function(a){var b=JU.CU.getArgbFromString(a);return 0!=b?JU.C.getColix(b):"none".equalsIgnoreCase(a)?0:"opaque".equalsIgnoreCase(a)?1:2},"~S");b.getColixArray=c(b,"getColixArray",function(a){if(null==a||0==a.length)return null;a=JU.PT.getTokens(a);for(var b=$(a.length,0),c=0;c<a.length;c++)if(b[c]=JU.C.getColix(JU.CU.getArgbFromString(a[c])),0==b[c])return null;return b},"~S");b.getHexCode=c(b,"getHexCode",function(a){return JU.Escape.escapeColor(JU.C.getArgb(a))},
"~N");b.getHexCodes=c(b,"getHexCodes",function(a){if(null==a)return null;for(var b=new JU.SB,c=0;c<a.length;c++)b.append(0==c?"":" ").append(JU.C.getHexCode(a[c]));return b.toString()},"~A");b.getColixTranslucent=c(b,"getColixTranslucent",function(a){var b=a>>24&255;return 255==b?JU.C.getColix(a):JU.C.getColixTranslucent3(JU.C.getColix(a),!0,b/255)},"~N");b.getBgContrast=c(b,"getBgContrast",function(a){return 128>(JU.CU.toFFGGGfromRGB(a)&255)?8:4},"~N");b.getColixShadedRGB=c(b,"getColixShadedRGB",
function(a){return JU.C.getShadedRGB(JU.C.getArgb(a),JU.C.getColixTranslucencyFractional(a))},"~N");b.getShadedRGB=c(b,"getShadedRGB",function(a,b){return 0==b?a:JU.C.getShade(a,b)},"~N,~N");b.getShade=c(b,"getShade",function(a,b){var c=1-b;return JU.C.shade(a,16,c)|JU.C.shade(a,8,c)|JU.C.shade(a,0,c)},"~N,~N");b.shade=c(b,"shade",function(a,b,c){return Math.max(0,Math.min(w(((a>>b&255)-255)*c+255),255))<<b},"~N,~N,~N");b.colixMax=4;b.argbs=D(128,0);JU.C.argbs[3]=-74566;b.argbsGreyscale=null;b.colixHash=
new JU.Int2IntHash(256);for(var b=D(-1,[4278190080,4294944E3,4294951115,4278190335,4294967295,4278255615,4294901760,4278222848,4286611584,4290822336,4278255360,4286578688,4278190208,4286611456,4286578816,4278222976,4294902015,4294967040,4294928820,4294956800]),a=0;a<b.length;++a)JU.C.getColix(b[a])});m("JU");x(null,"JU.ColorEncoder","java.util.Hashtable JU.AU $.CU $.Lst $.PT $.Rdr J.c.PAL JU.C $.Escape $.Logger JV.FileManager $.JC".split(" "),function(){var b=s(function(){this.argbsNucleic=this.argbsAmino=
this.argbsShapely=this.argbsRwb=this.argbsRoygb=this.argbsCpk=this.paletteFriendly=this.paletteWB=this.paletteBW=this.vwr=null;this.ihalf=0;this.schemes=null;this.currentPalette=0;this.currentSegmentCount=1;this.isTranslucent=!1;this.hi=this.lo=0;this.isReversed=!1;this.thisScale=this.userScale=null;this.thisName="scheme";this.isColorIndex=!1;this.ce=null;r(this,arguments)},JU,"ColorEncoder",null);N(b,function(){this.userScale=D(-1,[-8355712]);this.thisScale=D(-1,[-8355712])});u(b,function(a,d){null==
a?(this.vwr=d,this.schemes=new java.util.Hashtable,this.argbsCpk=J.c.PAL.argbsCpk,this.argbsRoygb=JV.JC.argbsRoygbScale,this.argbsRwb=JV.JC.argbsRwbScale,this.argbsAmino=this.argbsNucleic=this.argbsShapely=null,this.ihalf=w(JV.JC.argbsRoygbScale.length/3),this.ce=this):(this.ce=a,this.vwr=a.vwr,this.schemes=a.schemes)},"JU.ColorEncoder,JV.Viewer");c(b,"clearCache",function(){this.schemes.clear()});b.getSchemeIndex=c(b,"getSchemeIndex",function(a){for(var d=0;d<JU.ColorEncoder.colorSchemes.length;d++)if(JU.ColorEncoder.colorSchemes[d].equalsIgnoreCase(a))return 16<=
d?d-16:13>d?d:-d;return-1},"~S");b.fixName=c(b,"fixName",function(a){if(a.equalsIgnoreCase("byelement"))return"byelement_jmol";var d=JU.ColorEncoder.getSchemeIndex(a);return 0<=d?JU.ColorEncoder.colorSchemes[d]:0<=a.indexOf("/")?a:a.toLowerCase()},"~S");c(b,"makeColorScheme",function(a,d,b){a=JU.ColorEncoder.fixName(a);if(null==d){this.schemes.remove(a);a=this.createColorScheme(a,!1,b);if(b)switch(a){case 2147483647:return 0;case 12:this.paletteFriendly=this.getPaletteAC();break;case 10:this.paletteBW=
this.getPaletteBW();break;case 11:this.paletteWB=this.getPaletteWB();break;case 0:case 1:this.argbsRoygb=JV.JC.argbsRoygbScale;break;case 6:case 7:this.argbsRwb=JV.JC.argbsRwbScale;break;case 2:this.argbsCpk=J.c.PAL.argbsCpk;break;case 3:JU.ColorEncoder.getRasmolScale();break;case 17:this.getNucleic();break;case 5:this.getAmino();break;case 4:this.getShapely()}return a}this.schemes.put(a,d);this.setThisScheme(a,d);a=this.createColorScheme(a,!1,b);if(b)switch(a){case 10:this.paletteBW=this.thisScale;
break;case 11:this.paletteWB=this.thisScale;break;case 0:case 1:this.argbsRoygb=this.thisScale;this.ihalf=w(this.argbsRoygb.length/3);break;case 6:case 7:this.argbsRwb=this.thisScale;break;case 2:this.argbsCpk=this.thisScale;break;case 5:this.argbsAmino=this.thisScale;break;case 17:this.argbsNucleic=this.thisScale;break;case 4:this.argbsShapely=this.thisScale}return-1},"~S,~A,~B");c(b,"getShapely",function(){return null==this.argbsShapely?this.argbsShapely=this.vwr.getJBR().getArgbs(1073742144):this.argbsShapely});
c(b,"getAmino",function(){return null==this.argbsAmino?this.argbsAmino=this.vwr.getJBR().getArgbs(2097154):this.argbsAmino});c(b,"getNucleic",function(){return null==this.argbsNucleic?this.argbsNucleic=this.vwr.getJBR().getArgbs(2097166):this.argbsNucleic});c(b,"createColorScheme",function(a,d,b){if(a.equalsIgnoreCase("inherit"))return 15;var c=a.lastIndexOf("="),e=a.indexOf("/"),g=Math.max(c,a.indexOf("[")),c=JU.ColorEncoder.fixName(a),j=JU.ColorEncoder.getSchemeIndex(c);if(-1==j&&(0>g||0<e)){b=
a;e=this.schemes.get(c);if(null==e)try{var k="~"==b.charAt(1);k&&(b=b.substring(1));for(c=null;;){if(0>b.indexOf("/")){0>b.indexOf(".")&&(b+=".lut.txt");var f=Array(1);try{JU.Logger.info("ColorEncoder opening colorschemes/"+b),JU.Rdr.readAllAsString(JV.FileManager.getBufferedReaderForResource(this.vwr,JU.C,"JU/","colorschemes/"+b),-1,!1,f,0)}catch(y){if(E(y,"java.io.IOException")){JU.Logger.info("ColorEncoder "+y);break}else throw y;}b=f[0]}else{b=JU.PT.rep(b," ","%20");JU.Logger.info("ColorEncoder opening "+
b);var n=this.vwr.fm.getFileAsBytes(b,null);if("string"==typeof n){JU.Logger.info("ColorEncoder "+n);break}c=n;JU.Logger.info("ColorEncoder read "+c.length+" bytes");var f=0,q=c.length;if(800==q||802==q)f=32;if(768==q-f||770==q-f)for(var e=D(256,0),q=256+f,v=0;256>v;v++)e[v]=JU.CU.rgb(c[v+f]&255,c[v+f+256]&255,c[v+f+512]&255);else b=String.instantialize(c)}if(null==e)for(var m=JU.PT.split(b.trim(),"\n"),q=m.length,e=D(q,0),r=0<q&&0>m[0].indexOf("."),v=0;v<q;v++){var s=JU.PT.getTokens(m[v]);if(3>s.length){e=
null;break}var u=s.length;e[v]=r?JU.CU.rgb(JU.PT.parseInt(s[u-3]),JU.PT.parseInt(s[u-2]),JU.PT.parseInt(s[u-1])):JU.CU.colorTriadToFFRGB(JU.PT.parseFloat(s[u-3]),JU.PT.parseFloat(s[u-2]),JU.PT.parseFloat(s[u-1]))}if(null!=e&&k){v=0;q=e.length-1;for(k=q+1>>1;v<k;v++){var w=e[v];e[v]=e[q-v];e[q-v]=w}}break}}catch(x){if(E(x,Exception))JU.Logger.info("ColorEncoder "+x),e=null;else throw x;}null==e&&(e=D(-1,[-1]));this.schemes.put(a,e);this.setThisScheme(a,e);return-1}if(0<=g){a=a.toLowerCase();c=JU.PT.replaceAllCharacters(a.substring(0,
g)," =","");0<c.length&&(b=!0);q=0;a.length>g+1&&!a.contains("[")&&(a="["+a.substring(g+1).trim()+"]",a=JU.PT.rep(a.$replace("\n"," "),"  "," "),a=JU.PT.rep(a,", ",",").$replace(" ",","),a=JU.PT.rep(a,",","]["));for(g=-1;0<=(g=a.indexOf("[",g+1));)q++;if(0==q)return this.makeColorScheme(c,null,b);e=D(q,0);for(q=0;0<=(g=a.indexOf("[",g+1));){v=a.indexOf("]",g);0>v&&(v=a.length-1);w=JU.CU.getArgbFromString(a.substring(g,v+1));0==w&&(w=JU.CU.getArgbFromString(a.substring(g+1,v).trim()));if(0==w)return JU.Logger.error("error in color value: "+
a.substring(g,v+1)),0;e[q++]=w}return c.equals("user")?(this.setUserScale(e),-13):this.makeColorScheme(c,e,b)}e=this.schemes.get(c);return null!=e?(this.setThisScheme(c,e),j):-1!=j?j:d?0:2147483647},"~S,~B,~B");c(b,"setUserScale",function(a){this.ce.userScale=a;this.makeColorScheme("user",a,!1)},"~A");c(b,"getColorSchemeArray",function(a){switch(a){case -1:return this.thisScale;case 0:return this.ce.argbsRoygb;case 1:return JU.AU.arrayCopyRangeRevI(this.ce.argbsRoygb,0,-1);case 8:return JU.AU.arrayCopyRangeI(this.ce.argbsRoygb,
0,this.ce.ihalf);case 9:var d=JU.AU.arrayCopyRangeI(this.ce.argbsRoygb,this.ce.argbsRoygb.length-2*this.ce.ihalf,-1);a=D(this.ce.ihalf,0);for(var b=a.length,c=d.length;0<=--b&&0<=--c;)a[b]=d[c--];return a;case 12:return this.getPaletteAC();case 10:return this.getPaletteBW();case 11:return this.getPaletteWB();case 6:return this.ce.argbsRwb;case 7:return JU.AU.arrayCopyRangeRevI(this.ce.argbsRwb,0,-1);case 2:return this.ce.argbsCpk;case 3:return JU.ColorEncoder.getRasmolScale();case 4:return this.ce.getShapely();
case 17:return this.ce.getNucleic();case 5:return this.ce.getAmino();case -13:return this.ce.userScale;case -14:return JU.AU.arrayCopyRangeRevI(this.ce.userScale,0,-1);default:return null}},"~N");c(b,"getColorIndexFromPalette",function(a,d,b,c,e){c=JU.C.getColix(this.getArgbFromPalette(a,d,b,c));e&&(a=(b-a)/(b-d),1<a?a=1:0.125>a&&(a=0.125),c=JU.C.getColixTranslucent3(c,!0,a));return c},"~N,~N,~N,~N,~B");c(b,"getPaletteColorCount",function(a){switch(a){case -1:return this.thisScale.length;case 10:case 11:return this.getPaletteBW().length;
case 0:case 1:return this.ce.argbsRoygb.length;case 8:case 9:return this.ce.ihalf;case 6:case 7:return this.ce.argbsRwb.length;case -13:case -14:return this.ce.userScale.length;case 2:return this.ce.argbsCpk.length;case 3:return JU.ColorEncoder.getRasmolScale().length;case 4:return this.ce.getShapely().length;case 17:return this.ce.getNucleic().length;case 5:return this.ce.getAmino().length;case 12:return this.getPaletteAC().length;default:return 0}},"~N");c(b,"getArgbFromPalette",function(a,d,b,
c){if(Float.isNaN(a))return-8355712;var e=this.getPaletteColorCount(c);switch(c){case -1:return this.isColorIndex&&(d=0,b=this.thisScale.length),this.thisScale[JU.ColorEncoder.quantize4(a,d,b,e)];case 10:return this.getPaletteBW()[JU.ColorEncoder.quantize4(a,d,b,e)];case 11:return this.getPaletteWB()[JU.ColorEncoder.quantize4(a,d,b,e)];case 0:return this.ce.argbsRoygb[JU.ColorEncoder.quantize4(a,d,b,e)];case 1:return this.ce.argbsRoygb[JU.ColorEncoder.quantize4(-a,-b,-d,e)];case 8:return this.ce.argbsRoygb[JU.ColorEncoder.quantize4(a,
d,b,e)];case 9:return this.ce.argbsRoygb[this.ce.ihalf+2*JU.ColorEncoder.quantize4(a,d,b,e)];case 6:return this.ce.argbsRwb[JU.ColorEncoder.quantize4(a,d,b,e)];case 7:return this.ce.argbsRwb[JU.ColorEncoder.quantize4(-a,-b,-d,e)];case -13:return 0==this.ce.userScale.length?-8355712:this.ce.userScale[JU.ColorEncoder.quantize4(a,d,b,e)];case -14:return 0==this.ce.userScale.length?-8355712:this.ce.userScale[JU.ColorEncoder.quantize4(-a,-b,-d,e)];case 2:return this.ce.argbsCpk[JU.ColorEncoder.colorIndex(a,
e)];case 3:return JU.ColorEncoder.getRasmolScale()[JU.ColorEncoder.colorIndex(a,e)];case 4:return this.ce.getShapely()[JU.ColorEncoder.colorIndex(a,e)];case 5:return this.ce.getAmino()[JU.ColorEncoder.colorIndex(a,e)];case 17:return this.ce.getNucleic()[JU.ColorEncoder.colorIndex(a-24+2,e)];case 12:return this.getPaletteAC()[JU.ColorEncoder.colorIndexRepeat(a,e)];default:return-8355712}},"~N,~N,~N,~N");c(b,"setThisScheme",function(a,d){this.thisName=a;this.thisScale=d;a.equals("user")&&(this.userScale=
d);this.isColorIndex=0==a.indexOf("byelement")||0==a.indexOf("byresidue")},"~S,~A");c(b,"getArgb",function(a){return this.isReversed?this.getArgbFromPalette(-a,-this.hi,-this.lo,this.currentPalette):this.getArgbFromPalette(a,this.lo,this.hi,this.currentPalette)},"~N");c(b,"getArgbMinMax",function(a,d,b){return this.isReversed?this.getArgbFromPalette(-a,-b,-d,this.currentPalette):this.getArgbFromPalette(a,d,b,this.currentPalette)},"~N,~N,~N");c(b,"getColorIndex",function(a){return this.isReversed?
this.getColorIndexFromPalette(-a,-this.hi,-this.lo,this.currentPalette,this.isTranslucent):this.getColorIndexFromPalette(a,this.lo,this.hi,this.currentPalette,this.isTranslucent)},"~N");c(b,"getColorKey",function(){for(var a=new java.util.Hashtable,d=this.getPaletteColorCount(this.currentPalette),b=new JU.Lst,c=M(d+1,0),e=(this.hi-this.lo)/d,g=e*(this.isReversed?-0.5:0.5),j=0;j<d;j++)c[j]=this.isReversed?this.hi-j*e:this.lo+j*e,b.addLast(JU.CU.colorPtFromInt(this.getArgb(c[j]+g),null));c[d]=this.isReversed?
this.lo:this.hi;a.put("values",c);a.put("colors",b);a.put("min",Float.$valueOf(this.lo));a.put("max",Float.$valueOf(this.hi));a.put("reversed",Boolean.$valueOf(this.isReversed));a.put("name",this.getCurrentColorSchemeName());return a});c(b,"getColorScheme",function(){return(this.isTranslucent?"translucent ":"")+(0>this.currentPalette?JU.ColorEncoder.getColorSchemeList(this.getColorSchemeArray(this.currentPalette)):this.getColorSchemeName(this.currentPalette))});c(b,"setColorScheme",function(a,d){this.isTranslucent=
d;null!=a&&(this.currentPalette=this.createColorScheme(a,!0,!1))},"~S,~B");c(b,"setRange",function(a,d,b){3.4028235E38==d&&(a=1,d=this.getPaletteColorCount(this.currentPalette)+1);this.lo=Math.min(a,d);this.hi=Math.max(a,d);this.isReversed=b},"~N,~N,~B");c(b,"getCurrentColorSchemeName",function(){return this.getColorSchemeName(this.currentPalette)});c(b,"getColorSchemeName",function(a){var d=Math.abs(a);return-1==a?this.thisName:d<JU.ColorEncoder.colorSchemes.length&&0<=d?JU.ColorEncoder.colorSchemes[d]:
null},"~N");b.getColorSchemeList=c(b,"getColorSchemeList",function(a){if(null==a)return"";for(var d="",b=0;b<a.length;b++)d+=(0==b?"":" ")+JU.Escape.escapeColor(a[b]);return d},"~A");b.getRasmolScale=c(b,"getRasmolScale",function(){if(null!=JU.ColorEncoder.rasmolScale)return JU.ColorEncoder.rasmolScale;JU.ColorEncoder.rasmolScale=D(J.c.PAL.argbsCpk.length,0);for(var a=J.c.PAL.argbsCpkRasmol[0]|4278190080,d=JU.ColorEncoder.rasmolScale.length;0<=--d;)JU.ColorEncoder.rasmolScale[d]=a;for(d=J.c.PAL.argbsCpkRasmol.length;0<=
--d;)a=J.c.PAL.argbsCpkRasmol[d],JU.ColorEncoder.rasmolScale[a>>24]=a|4278190080;return JU.ColorEncoder.rasmolScale});c(b,"getPaletteAC",function(){return null==this.ce.paletteFriendly?this.ce.paletteFriendly=D(-1,[8421504,1067945,11141282,13235712,16753152,2640510,8331387,10467374,12553008,339310,7209065,8626176,10906112,4488148,13907405,14219839,16759360,6984660,13918415,14809713,16764019]):this.ce.paletteFriendly});c(b,"getPaletteWB",function(){if(null!=this.ce.paletteWB)return this.ce.paletteWB;
for(var a=D(JV.JC.argbsRoygbScale.length,0),d=0;d<a.length;d++){var b=1/a.length*(a.length-d);a[d]=JU.CU.colorTriadToFFRGB(b,b,b)}return this.ce.paletteWB=a});b.getPaletteAtoB=c(b,"getPaletteAtoB",function(a,d,b){2>b&&(b=JV.JC.argbsRoygbScale.length);var c=D(b,0),e=M(3,0),g=M(3,0);JU.CU.toRGB3f(a,e);JU.CU.toRGB3f(d,g);a=(g[0]-e[0])/(b-1);d=(g[1]-e[1])/(b-1);for(var g=(g[2]-e[2])/(b-1),j=0;j<b;j++)c[j]=JU.CU.colorTriadToFFRGB(e[0]+a*j,e[1]+d*j,e[2]+g*j);return c},"~N,~N,~N");c(b,"getPaletteBW",function(){if(null!=
this.ce.paletteBW)return this.ce.paletteBW;for(var a=D(JV.JC.argbsRoygbScale.length,0),d=0;d<a.length;d++){var b=1/a.length*d;a[d]=JU.CU.colorTriadToFFRGB(b,b,b)}return this.ce.paletteBW=a});c(b,"quantize",function(a,d){var b=this.getPaletteColorCount(this.currentPalette);a=(F(a*b)+(d?0:1))/b;return 0>=a?this.lo:1<=a?this.hi:this.lo+(this.hi-this.lo)*a},"~N,~B");b.quantize4=c(b,"quantize4",function(a,d,b,c){b-=d;if(0>=b||Float.isNaN(a))return w(c/2);a-=d;if(0>=a)return 0;a=F(a/(b/c)+1E-4);a>=c&&(a=
c-1);return a},"~N,~N,~N,~N");b.colorIndex=c(b,"colorIndex",function(a,d){return w(Math.floor(0>=a||a>=d?0:a))},"~N,~N");b.colorIndexRepeat=c(b,"colorIndexRepeat",function(a,d){return w(Math.floor(0>=a?0:a))%d},"~N,~N");b.colorSchemes=z(-1,"roygb bgyor byelement_jmol byelement_rasmol byresidue_shapely byresidue_amino rwb bwr low high bw wb friendly user resu inherit rgb bgr jmol rasmol byresidue byresidue_nucleic".split(" "));b.rasmolScale=null;b.argbsChainAtom=null;b.argbsChainHetero=null});m("JU");
x(null,"JU.CommandHistory",["JU.Lst"],function(){var b=s(function(){this.commandList=null;this.maxSize=100;this.cursorPos=this.nextCommand=0;this.isOn=!0;this.lstStates=null;r(this,arguments)},JU,"CommandHistory",null);u(b,function(){this.reset(100)});c(b,"clear",function(){this.reset(this.maxSize)});c(b,"reset",function(a){this.maxSize=a;this.commandList=new JU.Lst;this.nextCommand=0;this.commandList.addLast("");this.cursorPos=0},"~N");c(b,"setMaxSize",function(a){if(a!=this.maxSize){for(2>a&&(a=
2);this.nextCommand>a;)this.commandList.removeItemAt(0),this.nextCommand--;this.nextCommand>a&&(this.nextCommand=a-1);this.cursorPos=this.nextCommand;this.maxSize=a}},"~N");c(b,"getCommandUp",function(){if(0>=this.cursorPos)return null;this.cursorPos--;var a=this.getCommand();a.endsWith("#??")&&this.removeCommand(this.cursorPos--);0>this.cursorPos&&(this.cursorPos=0);return a});c(b,"getCommandDown",function(){if(this.cursorPos>=this.nextCommand)return null;this.cursorPos++;return this.getCommand()});
c(b,"getCommand",function(){return this.commandList.get(this.cursorPos)});c(b,"addCommand",function(a){if((this.isOn||a.endsWith("#??"))&&!a.endsWith("#----")){for(var d;0<=(d=a.indexOf("\n"));){var b=a.substring(0,d);0<b.length&&this.addCommandLine(b);a=a.substring(d+1)}0<a.length&&this.addCommandLine(a)}},"~S");c(b,"getSetHistory",function(a){this.isOn=-2==a?this.isOn:!0;switch(a){case 0:return this.isOn=!1,this.clear(),"";case -2147483648:case -2:return this.clear(),"";case -1:return this.getCommandUp();
case 1:return this.getCommandDown();default:if(0>a)return this.setMaxSize(-2-a),"";a=Math.max(this.nextCommand-a,0)}for(var d="";a<this.nextCommand;a++)this.commandList.get(a).toUpperCase().startsWith("WRITE HISTORY")||(d+=this.commandList.get(a)+"\n");return d},"~N");c(b,"find",function(a,d){for(var b=this.cursorPos,c=a;null!=c;){c=this.getSetHistory(d);if(null==c)break;if(c.startsWith(a))return c}this.cursorPos=b;return null},"~S,~N");c(b,"removeCommand",function(){return this.removeCommand(this.nextCommand-
1)});c(b,"removeCommand",function(a){if(0>a||a>=this.nextCommand)return"";a=this.commandList.removeItemAt(a);this.nextCommand--;return a},"~N");c(b,"addCommandLine",function(a){if(!(null==a||0==a.length)&&!a.endsWith("#--"))0<this.nextCommand&&a.equals(this.commandList.get(this.nextCommand-1))?this.cursorPos=this.nextCommand:(this.nextCommand>=this.maxSize&&(this.commandList.removeItemAt(0),this.nextCommand=this.maxSize-1),this.commandList.add(this.nextCommand,a),this.nextCommand++,this.cursorPos=
this.nextCommand,this.commandList.add(this.nextCommand,""))},"~S");c(b,"pushState",function(a){null==this.lstStates&&(this.lstStates=new JU.Lst);this.lstStates.addLast(a)},"~S");c(b,"popState",function(){return null==this.lstStates||0==this.lstStates.size()?null:this.lstStates.removeItemAt(this.lstStates.size()-1)})});m("JU");x(["JU.LoggerInterface"],"JU.DefaultLogger",["JU.Logger"],function(){var b=G(JU,"DefaultLogger",null,JU.LoggerInterface);c(b,"log",function(a,d,b,c){a===System.err&&System.out.flush();
if(null!=a&&(null!=b||null!=c))if(b=(JU.Logger.logLevel()?"["+JU.Logger.getLevel(d)+"] ":"")+(null!=b?b:"")+(null!=c?": "+c.toString():""),a.println(b),null!=c&&(d=c.getStackTrace(),null!=d))for(c=0;c<d.length;c++)a.println(d[c].getClassName()+" - "+d[c].getLineNumber()+" - "+d[c].getMethodName());a===System.err&&System.err.flush();return b},"java.io.PrintStream,~N,~S,Throwable");f(b,"debug",function(a){this.log(System.out,5,a,null)},"~S");f(b,"info",function(a){this.log(System.out,4,a,null)},"~S");
f(b,"warn",function(a){this.log(System.out,3,a,null)},"~S");f(b,"warnEx",function(a,d){this.log(System.out,3,a,d)},"~S,Throwable");f(b,"error",function(a){this.log(System.err,2,a,null)},"~S");f(b,"errorEx",function(a,d){this.log(System.err,2,a,d)},"~S,Throwable");f(b,"fatal",function(a){this.log(System.err,1,a,null)},"~S");f(b,"fatalEx",function(a,d){this.log(System.err,1,a,d)},"~S,Throwable")});m("JU");x(["JU.BS"],"JU.Elements",["java.util.Hashtable","JU.PT","JU.Logger"],function(){var b=G(JU,"Elements",
null);b.getNaturalIsotope=c(b,"getNaturalIsotope",function(a){return JU.Elements.isotopeMass[a&127]},"~N");b.getAtomicMass=c(b,"getAtomicMass",function(a){return 1>a||a>=JU.Elements.atomicMass.length?0:JU.Elements.atomicMass[a]},"~N");b.elementNumberFromSymbol=c(b,"elementNumberFromSymbol",function(a,b){if(null==JU.Elements.htElementMap){for(var c=new java.util.Hashtable,e=JU.Elements.elementNumberMax;0<=--e;){var g=JU.Elements.elementSymbols[e],j=Integer.$valueOf(e);c.put(g,j);2==g.length&&c.put(g.toUpperCase(),
j)}for(e=JU.Elements.altElementMax;4<=--e;)g=JU.Elements.altElementSymbols[e],j=Integer.$valueOf(JU.Elements.altElementNumbers[e]),c.put(g,j),2==g.length&&c.put(g.toUpperCase(),j);c.put("Z",Integer.$valueOf(0));JU.Elements.htElementMap=c}if(null==a)return 0;c=JU.Elements.htElementMap.get(a);if(null!=c)return c.intValue();if(JU.PT.isDigit(a.charAt(0))&&(g=a.length-2,0<=g&&JU.PT.isDigit(a.charAt(g))&&g++,c=0<g?JU.PT.parseInt(a.substring(0,g)):0,0<c&&(g=JU.Elements.elementNumberFromSymbol(a.substring(g),
!0),0<g)))return c=JU.Elements.getAtomicAndIsotopeNumber(g,c),JU.Elements.htElementMap.put(a.toUpperCase(),Integer.$valueOf(c)),c;b||JU.Logger.error("'"+a+"' is not a recognized symbol");return 0},"~S,~B");b.elementSymbolFromNumber=c(b,"elementSymbolFromNumber",function(a){var b=0;if(a>=JU.Elements.elementNumberMax){for(b=JU.Elements.altElementMax;0<=--b;)if(a==JU.Elements.altElementNumbers[b])return JU.Elements.altElementSymbols[b];b=JU.Elements.getIsotopeNumber(a);return""+b+JU.Elements.getElementSymbol(a&
127)}return JU.Elements.getElementSymbol(a)},"~N");b.getElementSymbol=c(b,"getElementSymbol",function(a){if(0>a||a>=JU.Elements.elementNumberMax)a=0;return JU.Elements.elementSymbols[a]},"~N");b.elementNameFromNumber=c(b,"elementNameFromNumber",function(a){if(a>=JU.Elements.elementNumberMax){for(var b=JU.Elements.altElementMax;0<=--b;)if(a==JU.Elements.altElementNumbers[b])return JU.Elements.altElementNames[b];a%=128}if(0>a||a>=JU.Elements.elementNumberMax)a=0;return JU.Elements.elementNames[a]},
"~N");b.elementNumberFromName=c(b,"elementNumberFromName",function(a){for(var b=1;b<JU.Elements.elementNumberMax;b++)if(JU.Elements.elementNames[b].equalsIgnoreCase(a))return b;return-1},"~S");b.altElementNameFromIndex=c(b,"altElementNameFromIndex",function(a){return JU.Elements.altElementNames[a]},"~N");b.altElementNumberFromIndex=c(b,"altElementNumberFromIndex",function(a){return JU.Elements.altElementNumbers[a]},"~N");b.altElementSymbolFromIndex=c(b,"altElementSymbolFromIndex",function(a){return JU.Elements.altElementSymbols[a]},
"~N");b.altIsotopeSymbolFromIndex=c(b,"altIsotopeSymbolFromIndex",function(a){a=JU.Elements.altElementNumbers[a];return(a>>7)+JU.Elements.elementSymbolFromNumber(a&127)},"~N");b.altIsotopeSymbolFromIndex2=c(b,"altIsotopeSymbolFromIndex2",function(a){a=JU.Elements.altElementNumbers[a];return JU.Elements.elementSymbolFromNumber(a&127)+(a>>7)},"~N");b.getElementNumber=c(b,"getElementNumber",function(a){return a&127},"~N");b.getIsotopeNumber=c(b,"getIsotopeNumber",function(a){return(a&32640)>>7},"~N");
b.getAtomicAndIsotopeNumber=c(b,"getAtomicAndIsotopeNumber",function(a,b){return(0>a?0:a)+(0>=b?0:b<<7)},"~N,~N");b.altElementIndexFromNumber=c(b,"altElementIndexFromNumber",function(a){for(var b=0;b<JU.Elements.altElementMax;b++)if(JU.Elements.altElementNumbers[b]==a)return b;return 0},"~N");b.getCommonNMRIsotope=c(b,"getCommonNMRIsotope",function(a){if(JU.PT.isDigit(a.charAt(0)))return a;if(a.equals("D"))return"2H";var b=JU.Elements.commonNmrIsotopes.indexOf(a+",");return 0>b?a:JU.Elements.commonNmrIsotopes.substring(b-
2,b+a.length).trim()},"~S");b.getNmrNucleusFromName=c(b,"getNmrNucleusFromName",function(a){return JU.Elements.getCommonNMRIsotope(JU.Elements.elementSymbolFromNumber(JU.Elements.elementNumberFromName(a)))},"~S");b.isNaturalIsotope=c(b,"isNaturalIsotope",function(a){return 0<="1H,12C,14N".indexOf(a+",")},"~S");b.getBondingRadius=c(b,"getBondingRadius",function(a,b){var c=a&127;return 0<b&&JU.Elements.bsCations.get(c)?JU.Elements.getBondingRadFromTable(c,b,JU.Elements.cationLookupTable):0>b&&JU.Elements.bsAnions.get(c)?
JU.Elements.getBondingRadFromTable(c,b,JU.Elements.anionLookupTable):JU.Elements.defaultBondingMars[(c<<1)+JU.Elements.bondingVersion]/1E3},"~N,~N");b.getCovalentRadius=c(b,"getCovalentRadius",function(a){return JU.Elements.defaultBondingMars[((a&127)<<1)+JU.Elements.covalentVersion]/1E3},"~N");b.getBondingRadFromTable=c(b,"getBondingRadFromTable",function(a,b,c){b=(a<<4)+(b+4);for(var e=0,g=0,j=0,k=w(c.length/2);j!=k;)if(g=w((j+k)/2),e=c[g<<1],e>b)k=g;else if(e<b)j=g+1;else return c[(g<<1)+1]/1E3;
e>b&&g--;e=c[g<<1];a!=e>>4&&g++;return c[(g<<1)+1]/1E3},"~N,~N,~A");b.getVanderwaalsMar=c(b,"getVanderwaalsMar",function(a,b){return JU.Elements.vanderwaalsMars[((a&127)<<2)+b.pt%4]},"~N,J.c.VDW");b.getHydrophobicity=c(b,"getHydrophobicity",function(a){return 1>a||a>=JU.Elements.hydrophobicities.length?0:JU.Elements.hydrophobicities[a]},"~N");b.getAllredRochowElectroNeg=c(b,"getAllredRochowElectroNeg",function(a){return 0<a&&a<JU.Elements.electroNegativities.length?JU.Elements.electroNegativities[a]:
0},"~N");b.isElement=c(b,"isElement",function(a,b){return(a&127)==b},"~N,~N");b.elementSymbols=z(-1,"Xx H He Li Be B C N O F Ne Na Mg Al Si P S Cl Ar K Ca Sc Ti V Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr Rb Sr Y Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I Xe Cs Ba La Ce Pr Nd Pm Sm Eu Gd Tb Dy Ho Er Tm Yb Lu Hf Ta W Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn Fr Ra Ac Th Pa U Np Pu Am Cm Bk Cf Es Fm Md No Lr Rf Db Sg Bh Hs Mt".split(" "));b.atomicMass=M(-1,[0,1.008,4.002,6.9675,9.012,10.8135,12.0106,14.006,15.999,
18.998,20.1797,22.989,24.307,26.981,28.084,30.973,32.059,35.4515,39.948,39.0983,40.078,44.955,47.867,50.9415,51.9961,54.938,55.845,58.933,58.6934,63.546,65.38,69.723,72.63,74.921,78.971,79.904,83.798,85.4678,87.62,88.905,91.224,92.906,95.95,98.91,101.07,102.905,106.42,107.8682,112.414,114.818,118.71,121.76,127.6,126.904,131.293,132.905,137.327,138.905,140.116,140.907,144.242,144.9,150.36,151.964,157.25,158.925,162.5,164.93,167.259,168.934,173.054,174.9668,178.49,180.947,183.84,186.207,190.23,192.217,
195.084,196.966,200.592,204.3835,207.2,208.98,210,210,222,223,226.03,227.03,232.0377,231.035,238.028,237.05,239.1,243.1,247.1,247.1,252.1,252.1,257.1,256.1,259.1,260.1,261,262,263,262,265,268]);b.isotopeMass=D(-1,[0,1,4,7,9,11,12,14,16,19,20,23,24,27,28,31,32,35,40,39,40,45,48,51,52,55,56,59,59,64,65,70,73,75,79,80,84,85,88,89,91,93,96,98,101,103,106,108,112,115,119,122,128,127,131,133,137,139,140,141,144,145,150,152,157,159,163,165,167,169,173,175,179,181,184,186,190,192,195,197,201,204,207,209,
209,210,222,223,226,227,232,231,238,237,244,243,247,247,251,252,257,258,259,260,261,262,263,262,265,268]);b.elementNumberMax=JU.Elements.elementSymbols.length;b.htElementMap=null;b.elementNames=z(-1,"unknown hydrogen helium lithium beryllium boron carbon nitrogen oxygen fluorine neon sodium magnesium aluminum silicon phosphorus sulfur chlorine argon potassium calcium scandium titanium vanadium chromium manganese iron cobalt nickel copper zinc gallium germanium arsenic selenium bromine krypton rubidium strontium yttrium zirconium niobium molybdenum technetium ruthenium rhodium palladium silver cadmium indium tin antimony tellurium iodine xenon cesium barium lanthanum cerium praseodymium neodymium promethium samarium europium gadolinium terbium dysprosium holmium erbium thulium ytterbium lutetium hafnium tantalum tungsten rhenium osmium iridium platinum gold mercury thallium lead bismuth polonium astatine radon francium radium actinium thorium protactinium uranium neptunium plutonium americium curium berkelium californium einsteinium fermium mendelevium nobelium lawrencium rutherfordium dubnium seaborgium bohrium hassium meitnerium".split(" "));
b.commonNmrIsotopes=", 1H, 2H, 6Li, 7Li,10B,13C,15N,17O,19F,";b.altElementNumbers=D(-1,[0,13,16,55,257,385,1414,1670,1798,1927]);b.altElementMax=JU.Elements.altElementNumbers.length;b.altElementSymbols=z(-1,"Xx Al S Cs D T 11C 13C 14C 15N".split(" "));b.altElementNames=z(-1,"dummy aluminium sulphur caesium deuterium tritium    ".split(" "));b.vanderwaalsMars=$(-1,[1E3,1E3,1E3,1E3,1200,1100,1100,1200,1400,1400,2200,1400,1820,1810,1220,2200,1700,1530,628,1900,2080,1920,1548,1800,1950,1700,1548,1700,
1850,1550,1400,1600,1700,1520,1348,1550,1730,1470,1300,1500,1540,1540,2020,1540,2270,2270,2200,2400,1730,1730,1500,2200,2050,1840,1500,2100,2100,2100,2200,2100,2080,1800,1880,1950,2E3,1800,1808,1800,1970,1750,1748,1800,1880,1880,2768,1880,2750,2750,2388,2800,1973,2310,1948,2400,1700,2300,1320,2300,1700,2150,1948,2150,1700,2050,1060,2050,1700,2050,1128,2050,1700,2050,1188,2050,1700,2050,1948,2050,1700,2E3,1128,2E3,1630,2E3,1240,2E3,1400,2E3,1148,2E3,1390,2100,1148,2100,1870,1870,1548,2100,1700,2110,
3996,2100,1850,1850,828,2050,1900,1900,900,1900,2100,1830,1748,1900,2020,2020,1900,2020,1700,3030,2648,2900,1700,2490,2020,2550,1700,2400,1608,2400,1700,2300,1420,2300,1700,2150,1328,2150,1700,2100,1748,2100,1700,2050,1800,2050,1700,2050,1200,2050,1700,2E3,1220,2E3,1630,2050,1440,2050,1720,2100,1548,2100,1580,2200,1748,2200,1930,2200,1448,2200,2170,1930,1668,2250,2200,2170,1120,2200,2060,2060,1260,2100,2150,1980,1748,2100,2160,2160,2100,2160,1700,3430,3008,3E3,1700,2680,2408,2700,1700,2500,1828,2500,
1700,2480,1860,2480,1700,2470,1620,2470,1700,2450,1788,2450,1700,2430,1760,2430,1700,2420,1740,2420,1700,2400,1960,2400,1700,2380,1688,2380,1700,2370,1660,2370,1700,2350,1628,2350,1700,2330,1608,2330,1700,2320,1588,2320,1700,2300,1568,2300,1700,2280,1540,2280,1700,2270,1528,2270,1700,2250,1400,2250,1700,2200,1220,2200,1700,2100,1260,2100,1700,2050,1300,2050,1700,2E3,1580,2E3,1700,2E3,1220,2E3,1720,2050,1548,2050,1660,2100,1448,2100,1550,2050,1980,2050,1960,1960,1708,2200,2020,2020,2160,2300,1700,
2070,1728,2300,1700,1970,1208,2E3,1700,2020,1120,2E3,1700,2200,2300,2E3,1700,3480,3240,2E3,1700,2830,2568,2E3,1700,2E3,2120,2E3,1700,2400,1840,2400,1700,2E3,1600,2E3,1860,2300,1748,2300,1700,2E3,1708,2E3,1700,2E3,1668,2E3,1700,2E3,1660,2E3,1700,2E3,1648,2E3,1700,2E3,1640,2E3,1700,2E3,1628,2E3,1700,2E3,1620,2E3,1700,2E3,1608,2E3,1700,2E3,1600,2E3,1700,2E3,1588,2E3,1700,2E3,1580,2E3,1700,2E3,1600,2E3,1700,2E3,1600,2E3,1700,2E3,1600,2E3,1700,2E3,1600,2E3,1700,2E3,1600,2E3,1700,2E3,1600,2E3]);b.covalentVersion=
1;b.bondingVersion=0;b.defaultBondingMars=$(-1,[0,0,230,320,930,460,680,1330,350,1020,830,850,680,750,680,710,680,630,640,640,1120,670,970,1550,1100,1390,1350,1260,1200,1160,750,1110,1020,1030,990,990,1570,960,1330,1960,990,1710,1440,1480,1470,1360,1330,1340,1350,1220,1350,1190,1340,1160,1330,1110,1500,1100,1520,1120,1450,1180,1220,1240,1170,1210,1210,1210,1220,1160,1210,1140,1910,1170,1470,2100,1120,1850,1780,1630,1560,1540,1480,1470,1470,1380,1350,1280,1400,1250,1450,1250,1500,1200,1590,1280,1690,
1360,1630,1420,1460,1400,1460,1400,1470,1360,1400,1330,1980,1310,1670,2320,1340,1960,1870,1800,1830,1630,1820,1760,1810,1740,1800,1730,1800,1720,1990,1680,1790,1690,1760,1680,1750,1670,1740,1660,1730,1650,1720,1640,1940,1700,1720,1620,1570,1520,1430,1460,1370,1370,1350,1310,1370,1290,1320,1220,1500,1230,1500,1240,1700,1330,1550,1440,1540,1440,1540,1510,1680,1450,1700,1470,2400,1420,2E3,2230,1900,2010,1880,1860,1790,1750,1610,1690,1580,1700,1550,1710,1530,1720,1510,1660,1500,1660,1500,1680,1500,1680,
1500,1650,1500,1670,1500,1730,1500,1760,1500,1610,1600,1570,1600,1490,1600,1430,1600,1410,1600,1340,1600,1290]);b.cationLookupTable=$(-1,[53,680,69,440,70,350,85,350,87,230,104,160,117,680,119,160,121,130,133,220,138,90,155,80,165,1120,181,970,197,820,198,660,215,510,229,650,232,420,247,440,249,350,262,2190,264,370,266,300,281,340,283,270,293,1540,309,1330,325,1180,326,990,343,732,357,960,358,940,359,760,360,680,374,880,375,740,376,630,377,590,389,810,390,890,391,630,394,520,406,800,407,660,408,600,
411,460,422,740,423,640,438,720,439,630,454,690,469,960,470,720,485,880,486,740,501,810,503,620,518,730,520,530,535,580,537,460,549,660,552,500,554,420,569,470,571,390,597,1470,614,1120,631,893,645,1090,648,790,661,1E3,664,740,665,690,677,930,680,700,682,620,699,979,712,670,727,680,742,800,744,650,757,1260,758,890,773,1140,774,970,791,810,806,930,808,710,823,760,825,620,837,820,840,700,842,560,857,620,859,500,885,1670,901,1530,902,1340,917,1390,919,1016,933,1270,935,1034,936,920,951,1013,952,900,
967,995,983,979,999,964,1014,1090,1015,950,1031,938,1047,923,1048,840,1063,908,1079,894,1095,881,1111,870,1126,930,1127,858,1143,850,1160,780,1177,680,1192,700,1194,620,1208,720,1211,560,1224,880,1226,690,1240,680,1254,800,1256,650,1269,1370,1271,850,1285,1270,1286,1100,1301,1470,1303,950,1318,1200,1320,840,1333,980,1335,960,1337,740,1354,670,1371,620,1397,1800,1414,1430,1431,1180,1448,1020,1463,1130,1464,980,1465,890,1480,970,1482,800,1495,1100,1496,950,1499,710,1511,1080,1512,930,1527,1070,1528,
920]);b.anionLookupTable=$(-1,[19,1540,96,2600,113,1710,130,1360,131,680,147,1330,241,2120,258,1840,275,1810,512,2720,529,2220,546,1980,563,1960,800,2940,803,3700,817,2450,834,2110,835,2500,851,2200]);b.bsCations=new JU.BS;b.bsAnions=new JU.BS;for(var a=0;a<JU.Elements.anionLookupTable.length;a+=2)JU.Elements.bsAnions.set(JU.Elements.anionLookupTable[a]>>4);for(a=0;a<JU.Elements.cationLookupTable.length;a+=2)JU.Elements.bsCations.set(JU.Elements.cationLookupTable[a]>>4);b.hydrophobicities=M(-1,[0,
0.62,-2.53,-0.78,-0.9,0.29,-0.85,-0.74,0.48,-0.4,1.38,1.06,-1.5,0.64,1.19,0.12,-0.18,-0.05,0.81,0.26,1.08]);(JU.Elements.elementNames.length!=JU.Elements.elementNumberMax||JU.Elements.vanderwaalsMars.length>>2!=JU.Elements.elementNumberMax||JU.Elements.defaultBondingMars.length>>1!=JU.Elements.elementNumberMax)&&JU.Logger.error("ERROR!!! Element table length mismatch:\n elementSymbols.length="+JU.Elements.elementSymbols.length+"\n elementNames.length="+JU.Elements.elementNames.length+"\n vanderwaalsMars.length="+
JU.Elements.vanderwaalsMars.length+"\n covalentMars.length="+JU.Elements.defaultBondingMars.length);b.electroNegativities=M(-1,[0,2.2,0,0.97,1.47,2.01,2.5,3.07,3.5,4.1,0,1.01,1.23,1.47,1.74,2.06,2.44,2.83,0,0.91,1.04,1.2,1.32,1.45,1.56,1.6,1.64,1.7,1.75,1.75,1.66,1.82,2.02,2.2,2.48,2.74,0,0.89,0.99,1.11,1.22,1.23,1.3,1.36,1.42,1.45,1.35,1.42,1.46,1.49,1.72,1.82,2.01,2.21])});m("JU");x(null,"JU.Escape","JU.AU $.BS $.Lst $.M3 $.M4 $.P3 $.P4 $.PT $.SB $.V3 JS.SV".split(" "),function(){var b=G(JU,"Escape",
null);b.escapeColor=c(b,"escapeColor",function(a){return 0==a?null:"[x"+JU.Escape.getHexColorFromRGB(a)+"]"},"~N");b.getHexColorFromRGB=c(b,"getHexColorFromRGB",function(a){if(0==a)return null;var d="00"+Integer.toHexString(a>>16&255),d=d.substring(d.length-2),b="00"+Integer.toHexString(a>>8&255),b=b.substring(b.length-2);a="00"+Integer.toHexString(a&255);a=a.substring(a.length-2);return d+b+a},"~N");b.eP=c(b,"eP",function(a){return null==a?"null":"{"+a.x+" "+a.y+" "+a.z+"}"},"JU.T3");b.matrixToScript=
c(b,"matrixToScript",function(a){return JU.PT.replaceAllCharacters(a.toString(),"\n\r ","").$replace("\t"," ")},"~O");b.eP4=c(b,"eP4",function(a){return"{"+a.x+" "+a.y+" "+a.z+" "+a.w+"}"},"JU.P4");b.drawQuat=c(b,"drawQuat",function(a,d,b,c,e){c=" VECTOR "+JU.Escape.eP(c)+" ";0==e&&(e=1);return"draw "+d+"x"+b+c+JU.Escape.eP(a.getVectorScaled(0,e))+" color red\ndraw "+d+"y"+b+c+JU.Escape.eP(a.getVectorScaled(1,e))+" color green\ndraw "+d+"z"+b+c+JU.Escape.eP(a.getVectorScaled(2,e))+" color blue\n"},
"JU.Quat,~S,~S,JU.P3,~N");b.e=c(b,"e",function(a){if(null==a)return"null";if(JU.PT.isNonStringPrimitive(a))return a.toString();if("string"==typeof a)return JU.PT.esc(a);if(C(a,"JU.Lst"))return JU.Escape.eV(a);if(C(a,"java.util.Map"))return JU.Escape.escapeMap(a);if(C(a,"JU.BS"))return JU.Escape.eBS(a);if(C(a,"JU.P4"))return JU.Escape.eP4(a);if(C(a,"JU.T3"))return JU.Escape.eP(a);if(JU.AU.isAP(a))return JU.Escape.eAP(a);if(JU.AU.isAS(a))return JU.Escape.eAS(a,!0);if(C(a,"JU.M34"))return JU.PT.rep(JU.PT.rep(a.toString(),
"[\n  ","["),"] ]","]]");if(JU.AU.isAFF(a)){for(var d=(new JU.SB).append("["),b="",c=0;c<a.length;c++)d.append(b).append(JU.Escape.eAF(a[c])),b=",";d.append("]");return d.toString()}if(C(a,"JU.A4"))return"{"+a.x+" "+a.y+" "+a.z+" "+180*a.angle/3.141592653589793+"}";if(C(a,"JU.Quat"))return a.toString();d=JU.PT.nonArrayString(a);return null==d?JU.PT.toJSON(null,a):d},"~O");b.eV=c(b,"eV",function(a){if(null==a)return JU.PT.esc("");var d=new JU.SB;d.append("[");for(var b=0;b<a.size();b++)0<b&&d.append(", "),
d.append(JU.Escape.escapeNice(a.get(b).asString()));d.append("]");return d.toString()},"JU.Lst");b.escapeMap=c(b,"escapeMap",function(a){var d=new JU.SB;d.append("{ ");var b="",c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);){var e=c.getKey();d.append(b).append(JU.PT.esc(e)).appendC(":");b=c.getValue();C(b,"JS.SV")||(b=JS.SV.getVariable(b));d.append(b.escape());b=","}d.append(" }");return d.toString()},"java.util.Map");b.escapeFloatA=c(b,"escapeFloatA",function(a,d){if(d)return JU.PT.toJSON(null,
a);for(var b=new JU.SB,c=0;c<a.length;c++)0<c&&b.appendC("\n"),b.appendF(a[c]);return b.toString()},"~A,~B");b.escapeFloatAA=c(b,"escapeFloatAA",function(a,d){for(var b=new JU.SB,c=d?";\n":"\n",e=0;e<a.length;e++)if(null!=a[e]){0<e&&b.append(c);for(var g=0;g<a[e].length;g++)b.appendF(a[e][g]).appendC("\t")}return b.toString()},"~A,~B");b.escapeFloatAAA=c(b,"escapeFloatAAA",function(a,d){var b=new JU.SB,c=d?";\n":"\n";if(null==a[0]||null==a[0][0])return"0 0 0"+c;b.appendI(a.length).append(" ").appendI(a[0].length).append(" ").appendI(a[0][0].length);
for(var e=0;e<a.length;e++)if(null!=a[e]){b.append(c);for(var g=0;g<a[e].length;g++)if(null!=a[e][g]){b.append(c);for(var j=0;j<a[e][g].length;j++)b.appendF(a[e][g][j]).appendC("\t")}}return b.toString()},"~A,~B");b.eAS=c(b,"eAS",function(a,d){if(null==a)return JU.PT.esc("");var b=new JU.SB;b.append("[");for(var c=0;c<a.length;c++)0<c&&b.append(", "),b.append(d?JU.Escape.escapeNice(a[c]):JU.PT.esc(a[c]));b.append("]");return b.toString()},"~A,~B");b.eAI=c(b,"eAI",function(a){if(null==a)return JU.PT.esc("");
var d=new JU.SB;d.append("[");for(var b=0;b<a.length;b++)0<b&&d.append(", "),d.appendI(a[b]);return d.append("]").toString()},"~A");b.eAD=c(b,"eAD",function(a){if(null==a)return JU.PT.esc("");var d=new JU.SB;d.append("[");for(var b=0;b<a.length;b++)0<b&&d.append(", "),d.appendD(a[b]);return d.append("]").toString()},"~A");b.eAF=c(b,"eAF",function(a){if(null==a)return JU.PT.esc("");var d=new JU.SB;d.append("[");for(var b=0;b<a.length;b++)0<b&&d.append(", "),d.appendF(a[b]);return d.append("]").toString()},
"~A");b.eAP=c(b,"eAP",function(a){if(null==a)return JU.PT.esc("");var d=new JU.SB;d.append("[");for(var b=0;b<a.length;b++)0<b&&d.append(", "),d.append(JU.Escape.eP(a[b]));return d.append("]").toString()},"~A");b.escapeNice=c(b,"escapeNice",function(a){if(null==a)return"null";var d=JU.PT.parseFloatStrict(a);return Float.isNaN(d)?JU.PT.esc(a):a},"~S");b.uABsM=c(b,"uABsM",function(a){return"{"==a.charAt(0)?JU.Escape.uP(a):(JU.Escape.isStringArray(a)||a.startsWith("[{")&&a.indexOf("[{")==a.lastIndexOf("[{"))&&
0>a.indexOf(",")&&0>a.indexOf(".")&&0>a.indexOf("-")?JU.BS.unescape(a):a.startsWith("[[")?JU.Escape.unescapeMatrix(a):a},"~S");b.isStringArray=c(b,"isStringArray",function(a){return a.startsWith("({")&&0==a.lastIndexOf("({")&&a.indexOf("})")==a.length-2},"~S");b.uP=c(b,"uP",function(a){if(null==a||0==a.length)return a;var d=a.$replace("\n"," ").trim();if("{"!=d.charAt(0)||"}"!=d.charAt(d.length-1))return a;for(var b=M(5,0),c=0,d=d.substring(1,d.length-1),e=D(1,0);5>c;c++)if(b[c]=JU.PT.parseFloatNext(d,
e),Float.isNaN(b[c])){if(e[0]>=d.length||","!=d.charAt(e[0]))break;e[0]++;c--}return 3==c?JU.P3.new3(b[0],b[1],b[2]):4==c?JU.P4.new4(b[0],b[1],b[2],b[3]):a},"~S");b.unescapeMatrix=c(b,"unescapeMatrix",function(a){if(null==a||0==a.length)return a;var d=a.$replace("\n"," ").trim();if(0!=d.lastIndexOf("[[")||d.indexOf("]]")!=d.length-2)return a;for(var b=M(16,0),d=d.substring(2,d.length-2).$replace("["," ").$replace("]"," ").$replace(","," "),c=D(1,0),e=0;16>e&&!(b[e]=JU.PT.parseFloatNext(d,c),Float.isNaN(b[e]));e++);
return!Float.isNaN(JU.PT.parseFloatNext(d,c))?a:9==e?JU.M3.newA9(b):16==e?JU.M4.newA16(b):a},"~S");b.eBS=c(b,"eBS",function(a){return JU.BS.escape(a,"(",")")},"JU.BS");b.eBond=c(b,"eBond",function(a){return JU.BS.escape(a,"[","]")},"JU.BS");b.toReadable=c(b,"toReadable",function(a,d){var b=new JU.SB,c="";if(null==d)return"null";if(JU.PT.isNonStringPrimitive(d))return JU.Escape.packageReadable(a,null,d.toString());if("string"==typeof d)return JU.Escape.packageReadable(a,null,JU.PT.esc(d));if(C(d,"JS.SV"))return JU.Escape.packageReadable(a,
null,d.escape());if(JU.AU.isAS(d)){b.append("[");for(var e=d.length,g=0;g<e;g++)b.append(c).append(JU.Escape.toReadable(null,d[g])),c=",";b.append("]");return JU.Escape.packageReadableSb(a,"String["+e+"]",b)}if(JU.AU.isAI(d)){b.append("[");e=d.length;for(g=0;g<e;g++)b.append(c).appendI(d[g]),c=",";b.append("]");return JU.Escape.packageReadableSb(a,"int["+e+"]",b)}if(JU.AU.isAF(d)){b.append("[");e=d.length;for(g=0;g<e;g++)b.append(c).appendF(d[g]),c=",";b.append("]");return JU.Escape.packageReadableSb(a,
"float["+e+"]",b)}if(JU.AU.isAD(d)){b.append("[");e=d.length;for(g=0;g<e;g++)b.append(c).appendD(d[g]),c=",";b.append("]");return JU.Escape.packageReadableSb(a,"double["+e+"]",b)}if(JU.AU.isAP(d)){b.append("[");e=d.length;for(g=0;g<e;g++)b.append(c).append(JU.Escape.eP(d[g])),c=",";b.append("]");return JU.Escape.packageReadableSb(a,"point3f["+e+"]",b)}if(JU.AU.isASS(d)){b.append("[");e=d.length;for(g=0;g<e;g++)b.append(c).append(JU.Escape.toReadable(null,d[g])),c=",\n";b.append("]");return JU.Escape.packageReadableSb(a,
"String["+e+"][]",b)}if(JU.AU.isAII(d)){b.append("[");e=d.length;for(g=0;g<e;g++)b.append(c).append(JU.Escape.toReadable(null,d[g])),c=",";b.append("]");return JU.Escape.packageReadableSb(a,"int["+e+"][]",b)}if(JU.AU.isAFF(d)){b.append("[\n");e=d.length;for(g=0;g<e;g++)b.append(c).append(JU.Escape.toReadable(null,d[g])),c=",\n";b.append("]");return JU.Escape.packageReadableSb(a,"float[][]",b)}if(JU.AU.isADD(d)){b.append("[\n");e=d.length;for(g=0;g<e;g++)b.append(c).append(JU.Escape.toReadable(null,
d[g])),c=",\n";b.append("]");return JU.Escape.packageReadableSb(a,"double[][]",b)}if(C(d,"JU.Lst")){e=d.size();for(g=0;g<e;g++)b.append(JU.Escape.toReadable(a+"["+(g+1)+"]",d.get(g)));return JU.Escape.packageReadableSb(a,"List["+e+"]",b)}if(C(d,"JU.M34")||C(d,"JU.T3")||C(d,"JU.P4")||C(d,"JU.A4"))return b.append(JU.Escape.e(d)),JU.Escape.packageReadableSb(a,null,b);if(C(d,"java.util.Map")){for(c=d.keySet().iterator();c.hasNext();)e=c.next(),b.append(JU.Escape.toReadable((null==a?"":a+".")+e,d.get(e)));
return b.toString()}return JU.Escape.packageReadable(a,null,JU.PT.toJSON(null,d))},"~S,~O");b.packageReadableSb=c(b,"packageReadableSb",function(a,d,b){return JU.Escape.packageReadable(a,d,b.toString())},"~S,~S,JU.SB");b.packageReadable=c(b,"packageReadable",function(a,d,b){return null==a?(null==d?"":d+"\t")+b:"\n"+a+"\t"+(null==d?"":"*"+d+"\t")+b},"~S,~S,~S");b.escapeModelFileNumber=c(b,"escapeModelFileNumber",function(a){return""+w(a/1E6)+"."+a%1E6},"~N");b.encapsulateData=c(b,"encapsulateData",
function(a,d,b){switch(b){case 1:d=JU.Escape.escapeFloatA(d,!1)+";\n";break;case 2:d=JU.Escape.escapeFloatAA(d,!0)+";\n";break;case 3:d=JU.Escape.escapeFloatAAA(d,!0)+";\n";break;default:d=d.toString()}return'  DATA "'+a+'"\n'+d+'    END "'+a+'";\n'},"~S,~O,~N");b.unescapeUnicode=c(b,"unescapeUnicode",function(a){for(var d=a.length,b=JU.SB.newN(d),c=0;c<d;){var e=a.charAt(c++);if("\\"==e&&c<d)switch(e=a.charAt(c++),e.charCodeAt(0)){case 117:if(c<d){for(var e=0,g=4;0<=--g&&c<d;){var j=a.charAt(c),
j=JU.Escape.getHexitValue(j);if(0>j)break;e<<=4;e+=j;++c}e=String.fromCharCode(e)}}b.appendC(e)}return b.toString()},"~S");b.getHexitValue=c(b,"getHexitValue",function(a){return 48<=a.charCodeAt(0)&&57>=a.charCodeAt(0)?a.charCodeAt(0)-48:97<=a.charCodeAt(0)&&102>=a.charCodeAt(0)?10+a.charCodeAt(0)-97:65<=a.charCodeAt(0)&&70>=a.charCodeAt(0)?10+a.charCodeAt(0)-65:-1},"~S");b.unescapeStringArray=c(b,"unescapeStringArray",function(a){if(null==a||!a.startsWith("[")||!a.endsWith("]"))return null;var d=
new JU.Lst,b=D(1,0);for(b[0]=1;b[0]<a.length;){var c=JU.PT.getQuotedStringNext(a,b);if(null==c)return null;for(d.addLast(JU.PT.rep(c,'\\"','"'));b[0]<a.length&&'"'!=a.charAt(b[0]);)b[0]++}return d.toArray(Array(d.size()))},"~S");b.isAV=c(b,"isAV",function(a){return C(a[0],JS.SV)},"~O");b.escapeHelical=c(b,"escapeHelical",function(a,d,b,c,e){switch(d){case 134217751:return null==e?new JU.P3:e[0];case 1073741854:case 1665140738:return null==e?new JU.V3:e[1073741854==d?1:2];case 134217729:return Float.$valueOf(null==
e?NaN:e[3].x);case 135176:return null==e?"":'draw ID "'+a+'" VECTOR '+JU.Escape.eP(e[0])+" "+JU.Escape.eP(e[1])+" color "+(0>e[3].x?"{255.0 200.0 0.0}":"{255.0 0.0 128.0}");case 1745489939:return(null==e?"":"measure "+JU.Escape.eP(b)+JU.Escape.eP(e[0])+JU.Escape.eP(e[4]))+JU.Escape.eP(c);default:return null==e?[]:e}},"~S,~N,JU.P3,JU.P3,~A")});m("JU");x(["J.api.JmolGraphicsInterface","JU.Normix"],"JU.GData","JU.AU $.P3 $.V3 JU.C $.Font $.Shader".split(" "),function(){var b=s(function(){this.apiPlatform=
null;this.antialiasEnabled=this.currentlyRendering=this.translucentCoverOnly=!1;this.displayMaxY2=this.displayMinY2=this.displayMaxX2=this.displayMinX2=this.displayMaxY=this.displayMinY=this.displayMaxX=this.displayMinX=this.windowHeight=this.windowWidth=0;this.inGreyscaleMode=this.antialiasThisFrame=!1;this.backgroundImage=this.changeableColixMap=null;this.newWindowHeight=this.newWindowWidth=0;this.newAntialiasing=!1;this.ht3=this.argbCurrent=this.colixCurrent=this.ambientOcclusion=this.height=this.width=
this.depth=this.slab=this.yLast=this.xLast=this.contrastColix=this.bgcolor=0;this.isPass2=!1;this.bufferSize=this.textY=0;this.currentFont=this.graphicsForMetrics=this.vwr=this.shader=null;this.argbNoisyDn=this.argbNoisyUp=0;this.transformedVectors=null;r(this,arguments)},JU,"GData",null,J.api.JmolGraphicsInterface);N(b,function(){this.changeableColixMap=$(16,0);this.transformedVectors=Array(JU.GData.normixCount)});u(b,function(){this.shader=new JU.Shader});c(b,"initialize",function(a,d){this.vwr=
a;this.apiPlatform=d},"JV.Viewer,J.api.GenericPlatform");c(b,"setDepth",function(a){this.depth=0>a?0:a},"~N");f(b,"setSlab",function(a){this.slab=Math.max(0,a)},"~N");f(b,"setSlabAndZShade",function(a,d){this.setSlab(a);this.setDepth(d)},"~N,~N,~N,~N,~N");c(b,"setAmbientOcclusion",function(a){this.ambientOcclusion=a},"~N");f(b,"isAntialiased",function(){return this.antialiasThisFrame});c(b,"getChangeableColix",function(a,d){a>=this.changeableColixMap.length&&(this.changeableColixMap=JU.AU.arrayCopyShort(this.changeableColixMap,
a+16));0==this.changeableColixMap[a]&&(this.changeableColixMap[a]=JU.C.getColix(d));return a|-32768},"~N,~N");c(b,"changeColixArgb",function(a,d){a<this.changeableColixMap.length&&0!=this.changeableColixMap[a]&&(this.changeableColixMap[a]=JU.C.getColix(d))},"~N,~N");c(b,"getColorArgbOrGray",function(a){if(3==a)return JU.C.getArgb(this.contrastColix);0>a&&(a=this.changeableColixMap[a&2047]);return this.inGreyscaleMode?JU.C.getArgbGreyscale(a):JU.C.getArgb(a)},"~N");c(b,"fixChangeableColix",function(a){return 0<=
a?a:this.changeableColixMap[a&2047]|a&30720},"~N");c(b,"getShades",function(a){0>a&&(a=this.changeableColixMap[a&2047]);return this.inGreyscaleMode?this.shader.getShadesG(a):this.shader.getShades(a)},"~N");c(b,"setGreyscaleMode",function(a){this.inGreyscaleMode=a},"~B");c(b,"getSpecularPower",function(){return this.shader.specularPower});c(b,"setSpecularPower",function(a){0>a?this.setSpecularExponent(-a):this.shader.specularPower!=a&&(this.shader.specularPower=a,this.shader.intenseFraction=a/100,
this.shader.flushCaches())},"~N");c(b,"getSpecularPercent",function(){return this.shader.specularPercent});c(b,"setSpecularPercent",function(a){this.shader.specularPercent!=a&&(this.shader.specularPercent=a,this.shader.specularFactor=a/100,this.shader.flushCaches())},"~N");c(b,"getSpecularExponent",function(){return this.shader.specularExponent});c(b,"setSpecularExponent",function(a){this.shader.specularExponent!=a&&(this.shader.specularExponent=a,this.shader.phongExponent=w(Math.pow(2,a)),this.shader.usePhongExponent=
!1,this.shader.flushCaches())},"~N");c(b,"getPhongExponent",function(){return this.shader.phongExponent});c(b,"setPhongExponent",function(a){this.shader.phongExponent==a&&this.shader.usePhongExponent||(this.shader.phongExponent=a,a=Math.log(a)/Math.log(2),this.shader.usePhongExponent=a!=F(a),this.shader.usePhongExponent||(this.shader.specularExponent=F(a)),this.shader.flushCaches())},"~N");c(b,"getDiffusePercent",function(){return this.shader.diffusePercent});c(b,"setDiffusePercent",function(a){this.shader.diffusePercent!=
a&&(this.shader.diffusePercent=a,this.shader.diffuseFactor=a/100,this.shader.flushCaches())},"~N");c(b,"getAmbientPercent",function(){return this.shader.ambientPercent});c(b,"setAmbientPercent",function(a){this.shader.ambientPercent!=a&&(this.shader.ambientPercent=a,this.shader.ambientFraction=a/100,this.shader.flushCaches())},"~N");c(b,"getSpecular",function(){return this.shader.specularOn});c(b,"setSpecular",function(a){this.shader.specularOn!=a&&(this.shader.specularOn=a,this.shader.flushCaches())},
"~B");c(b,"setCel",function(a){this.shader.setCel(a,this.shader.celPower,this.bgcolor)},"~B");c(b,"getCel",function(){return this.shader.celOn});c(b,"getCelPower",function(){return this.shader.celPower});c(b,"setCelPower",function(a){this.shader.setCel(this.shader.celOn||0==this.shader.celPower,a,this.bgcolor)},"~N");c(b,"getLightSource",function(){return this.shader.lightSource});c(b,"isClipped3",function(a,d,b){return 0>a||a>=this.width||0>d||d>=this.height||b<this.slab||b>this.depth},"~N,~N,~N");
c(b,"isClipped",function(a,d){return 0>a||a>=this.width||0>d||d>=this.height},"~N,~N");f(b,"isInDisplayRange",function(a,d){return a>=this.displayMinX&&a<this.displayMaxX&&d>=this.displayMinY&&d<this.displayMaxY},"~N,~N");f(b,"isClippedXY",function(a,d,b){a=a+1>>1;return d<-a||d>=this.width+a||b<-a||b>=this.height+a},"~N,~N,~N");c(b,"isClippedZ",function(a){return-2147483648!=a&&(a<this.slab||a>this.depth)},"~N");c(b,"clipCode3",function(a,d,b){var c=0;0>a?c|=a<this.displayMinX2?-1:8:a>=this.width&&
(c|=a>this.displayMaxX2?-1:4);0>d?c|=d<this.displayMinY2?-1:2:d>=this.height&&(c|=d>this.displayMaxY2?-1:1);b<this.slab?c|=32:b>this.depth&&(c|=16);return c},"~N,~N,~N");c(b,"clipCode",function(a){var d=0;a<this.slab?d|=32:a>this.depth&&(d|=16);return d},"~N");c(b,"getFont3D",function(a){return JU.Font.createFont3D(0,0,a,a,0,this.apiPlatform,this.graphicsForMetrics)},"~N");c(b,"getFont3DFS",function(a,d){return JU.Font.createFont3D(JU.Font.getFontFaceID(a),0,d,d,0,this.apiPlatform,this.graphicsForMetrics)},
"~S,~N");c(b,"getFontFidFS",function(a,d){return this.getFont3DFSS(a,"Bold",d).fid},"~S,~N");c(b,"getFont3DFSS",function(a,d,b){d=JU.Font.getFontStyleID(d);0>d&&(d=0);return JU.Font.createFont3D(JU.Font.getFontFaceID(a),d,b,b,0,this.apiPlatform,this.graphicsForMetrics)},"~S,~S,~N");c(b,"getFont3DScaled",function(a,d){var b=a.fontSizeNominal*d;return b==a.fontSize?a:JU.Font.createFont3D(a.idFontFace,a.idFontStyle,b,a.fontSizeNominal,a.fontSizeAngstroms,this.apiPlatform,this.graphicsForMetrics)},"JU.Font,~N");
c(b,"getFontFidI",function(a){return this.getFont3D(a).fid},"~N");c(b,"getFont3DCurrent",function(){return this.currentFont});c(b,"setFont",function(){},"JU.Font");c(b,"setFontBold",function(a,d){this.setFont(this.getFont3DFSS(a,"Bold",d))},"~S,~N");c(b,"setBackgroundTransparent",function(){},"~B");c(b,"setBackgroundArgb",function(a){this.bgcolor=a;this.setCel(this.shader.celOn)},"~N");c(b,"setBackgroundImage",function(a){this.backgroundImage=a},"~O");c(b,"setWindowParameters",function(a,d,b){this.setWinParams(a,
d,b)},"~N,~N,~B");c(b,"setWinParams",function(a,d,b){this.newWindowWidth=a;this.newWindowHeight=d;this.newAntialiasing=b},"~N,~N,~B");c(b,"setNewWindowParametersForExport",function(){this.windowWidth=this.newWindowWidth;this.windowHeight=this.newWindowHeight;this.setWidthHeight(!1)});c(b,"setWidthHeight",function(a){this.width=this.windowWidth;this.height=this.windowHeight;a&&(this.width<<=1,this.height<<=1);this.xLast=this.width-1;this.yLast=this.height-1;this.displayMinX=-(this.width>>1);this.displayMaxX=
this.width-this.displayMinX;this.displayMinY=-(this.height>>1);this.displayMaxY=this.height-this.displayMinY;this.displayMinX2=this.displayMinX<<2;this.displayMaxX2=this.displayMaxX<<2;this.displayMinY2=this.displayMinY<<2;this.displayMaxY2=this.displayMaxY<<2;this.ht3=3*this.height;this.bufferSize=this.width*this.height},"~B");c(b,"beginRendering",function(){},"JU.M3,~B,~B,~B");c(b,"endRendering",function(){});c(b,"snapshotAnaglyphChannelBytes",function(){});c(b,"getScreenImage",function(){return null},
"~B");c(b,"releaseScreenImage",function(){});c(b,"applyAnaglygh",function(){},"J.c.STER,~A");c(b,"setPass2",function(){return!1},"~B");c(b,"destroy",function(){});c(b,"clearFontCache",function(){});c(b,"drawQuadrilateralBits",function(a,d,b,c,e,g){a.drawLineBits(d,d,b,c);a.drawLineBits(d,d,c,e);a.drawLineBits(d,d,e,g);a.drawLineBits(d,d,g,b)},"J.api.JmolRendererInterface,~N,JU.P3,JU.P3,JU.P3,JU.P3");c(b,"drawTriangleBits",function(a,d,b,c,e,g,j,k){1==(k&1)&&a.drawLineBits(b,e,d,c);2==(k&2)&&a.drawLineBits(e,
j,c,g);4==(k&4)&&a.drawLineBits(j,b,g,d)},"J.api.JmolRendererInterface,JU.P3,~N,JU.P3,~N,JU.P3,~N,~N");c(b,"plotImage",function(){},"~N,~N,~N,~O,J.api.JmolRendererInterface,~N,~N,~N");c(b,"plotText",function(){},"~N,~N,~N,~N,~N,~S,JU.Font,J.api.JmolRendererInterface");c(b,"renderBackground",function(){},"J.api.JmolRendererInterface");c(b,"setColor",function(a){this.argbCurrent=this.argbNoisyUp=this.argbNoisyDn=a},"~N");c(b,"setC",function(){return!0},"~N");c(b,"isDirectedTowardsCamera",function(a){return 0>
a||0<this.transformedVectors[a].z},"~N");b.roundInt=c(b,"roundInt",function(a){return a},"~N");c(b,"clear",function(){});f(b,"renderAllStrings",function(){},"~O");c(b,"addRenderer",function(){},"~N");b.getHermiteList=c(b,"getHermiteList",function(a,d,b,c,e,g,j,k,f,y){var n=f+1;f-=1;var q=b.x,v=b.y,m=b.z,r=c.x,s=c.y;c=c.z;var u=(r-d.x)*a/8,w=(s-d.y)*a/8;d=(c-d.z)*a/8;var x=(e.x-q)*a/8,z=(e.y-v)*a/8,A=(e.z-m)*a/8,C=(g.x-r)*a/8,E=(g.y-s)*a/8;a=(g.z-c)*a/8;j[k]=b;for(b=0;b<n;b++){var D=b/f;b==n-1&&(q=
r,v=s,m=c,r=e.x,s=e.y,c=e.z,u=x,w=z,d=A,x=C,z=E,A=a,D-=1);var F=D*D,G=F*D;g=2*G-3*F+1;var I=-2*G+3*F,D=G-2*F+D,K=G-F,F=g*q+I*r+D*u+K*x,G=g*v+I*s+D*w+K*z;g=g*m+I*c+D*d+K*A;j[k+b]=y?JU.P3.new3(F,G,g):JU.V3.new3(F,G,g)}},"~N,JU.T3,JU.T3,JU.T3,JU.T3,JU.T3,~A,~N,~N,~B");c(b,"setTextPosition",function(a){this.textY=a},"~N");c(b,"getTextPosition",function(){return this.textY});c(b,"getTransformedVertexVectors",function(){return this.transformedVectors});f(b,"drawLinePixels",function(){},"JU.P3i,JU.P3i,~N,~N");
b.getSlabObjectType=c(b,"getSlabObjectType",function(a,d,b,c){return z(-1,[Integer.$valueOf(a),d,Boolean.$valueOf(b),c])},"~N,~O,~B,~O");b.getSlabWithinRange=c(b,"getSlabWithinRange",function(a,d){return z(-1,[Integer.$valueOf(1073742114),z(-1,[Float.$valueOf(a),Float.$valueOf(d)]),Boolean.FALSE,null])},"~N,~N");b.normixCount=JU.Normix.getNormixCount()});m("JU");x(["javajs.api.JSInterface","J.api.JmolAppletInterface","$.JmolStatusListener"],"JU.GenericApplet","java.net.URL java.util.Hashtable JU.Lst $.PT $.SB J.awtjs2d.Platform J.c.CBK J.i18n.GT JU.Logger $.Parser JV.JC $.Viewer".split(" "),
function(){var b=s(function(){this.documentBase=this.codeBase=null;this.isSigned=!1;this.language=null;this.doTranslate=!0;this.mayScript=this.isStereoSlave=this.haveDocumentAccess=!1;this.vwrOptions=this.b$=this.viewer=this.gRight=this.statusTextarea=this.statusText=this.statusForm=this.fullName=this.htmlName=null;this.haveNotifiedError=!1;this.appletObject=null;this.loading=!1;this.htParams=this.outputBuffer=this.syncId=null;r(this,arguments)},JU,"GenericApplet",null,[javajs.api.JSInterface,J.api.JmolAppletInterface,
J.api.JmolStatusListener]);c(b,"setStereoGraphics",function(a){return a?vwr.apiPlatform.context:null},"~B");f(b,"processMouseEvent",function(a,d,b,c,e){return this.viewer.processMouseEvent(a,d,b,c,e)},"~N,~N,~N,~N,~N");f(b,"processKeyEvent",function(a){this.viewer.processKeyEvent(a)},"~O");f(b,"setDisplay",function(a){this.viewer.setDisplay(a)},"~O");f(b,"setStatusDragDropped",function(a,d,b,c,e){return this.viewer.setStatusDragDropped(a,d,b,c,e)},"~N,~N,~N,~S,~A");f(b,"startHoverWatcher",function(a){this.viewer.startHoverWatcher(a)},
"~B");f(b,"update",function(){this.viewer.updateJS()});f(b,"openFileAsyncSpecial",function(a,d){this.viewer.openFileAsyncSpecial(a,d)},"~S,~N");f(b,"openFileAsyncSpecialType",function(a,d,b){this.viewer.openFileAsyncSpecialType(a,d,b)},"~S,~N,~S");f(b,"processTwoPointGesture",function(a){this.viewer.processTwoPointGesture(a)},"~A");f(b,"setScreenDimension",function(a,d){this.viewer.setScreenDimension(a,d)},"~N,~N");c(b,"resizeDisplay",function(a,d){J.awtjs2d.Platform.Jmol().resizeApplet(this.viewer.html5Applet,
D(-1,[a,d]))},"~N,~N");c(b,"init",function(a){this.b$=new java.util.Hashtable;null==JU.GenericApplet.htRegistry&&(JU.GenericApplet.htRegistry=new java.util.Hashtable);this.appletObject=a;this.htmlName=JU.PT.split(""+this.getJmolParameter("name"),"_object")[0];this.syncId=this.getJmolParameter("syncId");this.fullName=this.htmlName+"__"+this.syncId+"__";System.out.println("Jmol JavaScript applet "+this.fullName+" initializing");a=this.getValue("logLevel",this.getBooleanValue("debug",!1)?"5":"4").charAt(0).charCodeAt(0)-
48;4!=a&&System.out.println("setting logLevel="+a+' -- To change, use script "set logLevel [0-5]"');JU.Logger.setLogLevel(a);J.i18n.GT.ignoreApplicationBundle();this.initOptions();JU.GenericApplet.checkIn(this.fullName,this.appletObject);this.initApplication()},"~O");c(b,"initApplication",function(){this.vwrOptions.put("applet",Boolean.TRUE);null==this.getJmolParameter("statusListener")&&this.vwrOptions.put("statusListener",this);this.language=this.getJmolParameter("language");null!=this.language&&
this.vwrOptions.put("language",this.language);this.viewer=new JV.Viewer(this.vwrOptions);this.viewer.pushHoldRepaint();var a=this.getValueLowerCase("emulate","jmol");this.setStringProperty("defaults",a.equals("chime")?"RasMol":"Jmol");this.setStringProperty("backgroundColor",this.getValue("bgcolor",this.getValue("boxbgcolor","black")));this.viewer.setBooleanProperty("frank",!0);this.loading=!0;for(var d,a=0,b=J.c.CBK.values();a<b.length&&((d=b[a])||1);a++){var c=d.name(),e=this.getValue(c+"Callback",
null);if(null!=e)if("string"==typeof e)this.setStringProperty(c+"Callback",e);else{var g=null,g="Info."+e.name;this.setStringProperty(c+"Callback",g);this.setCallback(c,e)}}this.loading=!1;null!=this.language&&System.out.print("requested language="+this.language+"; ");this.doTranslate=!"none".equals(this.language)&&this.getBooleanValue("doTranslate",!0);this.language=J.i18n.GT.getLanguage();System.out.println("language="+this.language);if(null==this.b$.get(J.c.CBK.SCRIPT)&&null==this.b$.get(J.c.CBK.ERROR)&&
(null!=this.b$.get(J.c.CBK.MESSAGE)||null!=this.statusForm||null!=this.statusText))this.doTranslate&&null==this.getValue("doTranslate",null)&&(this.doTranslate=!1,JU.Logger.warn("Note -- Presence of message callback disables disable translation; to enable message translation use jmolSetTranslation(true) prior to jmolApplet()")),this.doTranslate&&JU.Logger.warn("Note -- Automatic language translation may affect parsing of message callbacks messages; use scriptCallback or errorCallback to process errors");
this.doTranslate||(J.i18n.GT.setDoTranslate(!1),JU.Logger.warn("Note -- language translation disabled"));this.getBooleanValue("popupMenu",!0)||this.viewer.getProperty("DATA_API","disablePopupMenu",null);d=this.getJmolParameter("menuFile");null!=d&&this.viewer.setMenu(d,!0);d=this.getValue("script","");a=this.getValue("loadInline",null);if(null==a){if(null!=(a=this.getValue("load",null)))d='load "'+a+'";'+d;a=null}this.viewer.popHoldRepaint("applet init");null!=a&&null!=this.viewer.loadInline(a)&&
(d="");0<d.length&&this.scriptProcessor(d,null,1);this.viewer.notifyStatusReady(!0)});f(b,"destroy",function(){this.gRight=null;this.viewer.notifyStatusReady(!1);this.viewer=null;JU.GenericApplet.checkOut(this.fullName)});c(b,"getBooleanValue",function(a,d){var b=this.getValue(a,d?"true":"");return b.equalsIgnoreCase("true")||b.equalsIgnoreCase("on")||b.equalsIgnoreCase("yes")},"~S,~B");c(b,"getValue",function(a,d){var b=this.getJmolParameter(a);System.out.println("Jmol getValue "+a+" "+b);return null==
b?d:b},"~S,~S");c(b,"getValueLowerCase",function(a,d){var b=this.getValue(a,d);null!=b&&(b=b.trim().toLowerCase(),0==b.length&&(b=null));return b},"~S,~S");c(b,"setStringProperty",function(a,d){null!=d&&(JU.Logger.info(a+' = "'+d+'"'),this.viewer.setStringProperty(a,d))},"~S,~S");c(b,"scriptProcessor",function(a,d,b){if(null==a||0==a.length)return"";switch(b){case 0:return a=this.viewer.scriptCheck(a),"string"==typeof a?a:"";case 1:return null!=d?this.viewer.scriptWaitStatus(a,d).toString():this.viewer.scriptWait(a);
default:return this.viewer.script(a)}},"~S,~S,~N");f(b,"register",function(a,d){JU.GenericApplet.checkIn(a,d)},"~S,J.api.JmolSyncInterface");c(b,"syncScript",function(a){this.viewer.syncScript(a,"~",0)},"~S");f(b,"handleEvent",function(a){return null==this.viewer?!1:this.viewer.processMouseEvent(a.id,a.x,a.y,a.modifiers,a.when)},"java.awt.Event");f(b,"getAppletInfo",function(){return J.i18n.GT.o(J.i18n.GT.$("Jmol Applet version {0} {1}.\n\nAn OpenScience project.\n\nSee http://www.jmol.org for more information"),
z(-1,[JV.JC.version,JV.JC.date]))+"\nhtmlName = "+JU.PT.esc(this.htmlName)+"\nsyncId = "+JU.PT.esc(this.syncId)+"\ndocumentBase = "+JU.PT.esc(this.documentBase)+"\ncodeBase = "+JU.PT.esc(this.codeBase)});f(b,"script",function(a){this.scriptNoWait(a)},"~S");f(b,"scriptCheck",function(a){return null==a||0==a.length?"":this.scriptProcessor(a,null,0)},"~S");f(b,"scriptNoWait",function(a){return null==a||0==a.length?"":this.scriptProcessor(a,null,2)},"~S");c(b,"scriptWait",function(a){return this.scriptWait(a,
null)},"~S");c(b,"scriptWait",function(a,d){if(null==a||0==a.length)return"";this.outputBuffer=null;return this.scriptProcessor(a,d,1)},"~S,~S");f(b,"scriptWaitOutput",function(a){if(null==a||0==a.length)return"";this.outputBuffer=new JU.SB;this.viewer.scriptWaitStatus(a,"");a=null==this.outputBuffer?"":this.outputBuffer.toString();this.outputBuffer=null;return a},"~S");f(b,"getModelIndexFromId",function(a){return this.viewer.getModelIndexFromId(a)},"~S");c(b,"getProperty",function(a){return this.viewer.getProperty(null,
a,"")},"~S");c(b,"getProperty",function(a,d){d||(d="");return this.viewer.getProperty(null,a,d)},"~S,~S");c(b,"getPropertyAsString",function(a){return this.viewer.getProperty("readable",a,"").toString()},"~S");c(b,"getPropertyAsString",function(a,d){d||(d="");return this.viewer.getProperty("readable",a,d).toString()},"~S,~S");c(b,"getPropertyAsJSON",function(a){return this.viewer.getProperty("JSON",a,"").toString()},"~S");c(b,"getPropertyAsJSON",function(a,d){d||(d="");return this.viewer.getProperty("JSON",
a,d).toString()},"~S,~S");f(b,"loadInlineString",function(a,d,b){a=this.viewer.loadInlineAppend(a,b);null==a&&this.script(d);return a},"~S,~S,~B");f(b,"loadInlineArray",function(a,d,b){if(null==a||0==a.length)return null;a=this.viewer.loadInline(a,b);null==a&&this.script(d);return a},"~A,~S,~B");f(b,"loadDOMNode",function(a){return this.viewer.openDOM(a)},"~O");c(b,"loadInline",function(a){return this.loadInlineString(a,"",!1)},"~S");c(b,"loadInline",function(a,d){return this.loadInlineString(a,d,
!1)},"~S,~S");c(b,"loadInline",function(a){return this.loadInlineArray(a,"",!1)},"~A");c(b,"loadInline",function(a,d){return this.loadInlineArray(a,d,!1)},"~A,~S");c(b,"output",function(a){null!=this.outputBuffer&&null!=a&&this.outputBuffer.append(a).appendC("\n")},"~S");f(b,"setCallback",function(a,d){this.viewer.sm.setCallbackFunction(a,d)},"~S,~O");f(b,"setCallbackFunction",function(a,d){if(a.equalsIgnoreCase("language"))this.consoleMessage(""),this.consoleMessage(null);else{var b=J.c.CBK.getCallback(a);
null!=b&&(this.loading||b!==J.c.CBK.EVAL)?null==d?this.b$.remove(b):this.b$.put(b,d):this.consoleMessage("Available callbacks include: "+J.c.CBK.getNameList().$replace(";"," ").trim())}},"~S,~S");c(b,"consoleMessage",function(a){this.notifyCallback(J.c.CBK.ECHO,z(-1,["",a]))},"~S");f(b,"notifyEnabled",function(a){switch(a){case J.c.CBK.SYNC:if(!JU.GenericApplet.isJS)return!1;case J.c.CBK.ANIMFRAME:case J.c.CBK.DRAGDROP:case J.c.CBK.ECHO:case J.c.CBK.ERROR:case J.c.CBK.EVAL:case J.c.CBK.IMAGE:case J.c.CBK.LOADSTRUCT:case J.c.CBK.MEASURE:case J.c.CBK.MESSAGE:case J.c.CBK.PICK:case J.c.CBK.SCRIPT:return!0}return null!=
this.b$.get(a)},"J.c.CBK");c(b,"notifyCallback",function(a,d){var b=null==a?null:this.b$.get(a),c=null==a||null!=b&&(null==d||null==d[0]),e=!1;null!=d&&(d[0]=this.htmlName);var g=null==d||null==d[1]?null:d[1].toString();if(null!=a)switch(a){case J.c.CBK.APPLETREADY:d[3]=this.appletObject;break;case J.c.CBK.CLICK:"alert".equals(b)&&(g="x="+d[1]+" y="+d[2]+" action="+d[3]+" clickCount="+d[4]);break;case J.c.CBK.ANIMFRAME:var j=d[1],k=j[0],f=j[1],y=j[2],n=j[3],j=j[4],q=-2>=k,v=0>n?-1:1,m=0>j?-1:1;c&&
(d=z(-1,[this.htmlName,Integer.$valueOf(Math.max(k,-2-k)),Integer.$valueOf(f),Integer.$valueOf(y),Integer.$valueOf(Math.abs(n)),Integer.$valueOf(Math.abs(j)),Integer.$valueOf(q?1:0),Integer.$valueOf(v),Integer.$valueOf(m),d[2],d[3]]));break;case J.c.CBK.ECHO:f=(k=2==d.length)||1==d[2].intValue();c||(f&&(e=!0),c=!k&&null!=(b=this.b$.get(a=J.c.CBK.MESSAGE)));e||this.output(g);break;case J.c.CBK.LOADSTRUCT:k=d[4];if(null!=k){k=(0<=k.indexOf("NOTE:")?"":J.i18n.GT.$("File Error:"))+k;this.doShowStatus(k);
this.notifyCallback(J.c.CBK.MESSAGE,z(-1,["",k]));return}break;case J.c.CBK.MEASURE:c||(c=null!=(b=this.b$.get(a=J.c.CBK.MESSAGE)));k=d[3];0<=k.indexOf("Picked")||0<=k.indexOf("Sequence")?(this.doShowStatus(g),e=!0):0<=k.indexOf("Completed")&&(g=k+": "+g,e=!0);break;case J.c.CBK.MESSAGE:e=!c;c=(new Boolean(c&null!=g)).valueOf();e||this.output(g);break;case J.c.CBK.PICK:this.doShowStatus(g);e=!0;break;case J.c.CBK.SCRIPT:!(0<d[3].intValue())&&!c&&(c=null!=(b=this.b$.get(a=J.c.CBK.MESSAGE)));this.output(g);
this.doShowStatus(g);break;case J.c.CBK.SYNC:this.sendScript(g,d[2],!0,c);return}e&&(e=this.viewer.getProperty("DATA_API","getAppConsole",null),null!=e&&(e.notifyCallback(a,d),this.output(g)));if(c&&this.mayScript)try{this.doSendCallback(a,b,d,g)}catch(r){if(E(r,Exception))this.haveNotifiedError||JU.Logger.debugging&&JU.Logger.debug(a.name()+"Callback call error to "+b+": "+r),this.haveNotifiedError=!0;else throw r;}},"J.c.CBK,~A");c(b,"sendScript",function(a,d,b,c){if(!JU.GenericApplet.isJS||c&&
(a=this.notifySync(a,d),null==a||0==a.length||a.equals("0")))return"";var e=new JU.Lst;JU.GenericApplet.findApplets(d,this.syncId,this.fullName,e);var g=e.size();if(0==g)return!c&&!d.equals("*")&&JU.Logger.error(this.fullName+" couldn't find applet "+d),"";d=b?null:new JU.SB;c=b&&a.equals("GET_GRAPHICS");var j=b&&a.equals("SET_GRAPHICS_OFF");c&&this.viewer.setStereo(!1,this.gRight=null);for(var k=0;k<g;k++){var f=e.get(k),y=JU.GenericApplet.htRegistry.get(f);JU.Logger.debugging&&JU.Logger.debug(this.fullName+
" sending to "+f+": "+a);try{if(c||j)return this.viewer.setStereo(this.isStereoSlave=c,this.gRight=y.setStereoGraphics(c)),"";b?y.syncScript(a):d.append(y.scriptWait(a,"output")).append("\n")}catch(n){if(E(n,Exception))f=this.htmlName+" couldn't send to "+f+": "+a+": "+n,JU.Logger.error(f),b||d.append(f);else throw n;}}return b?"":d.toString()},"~S,~S,~B,~B");c(b,"notifySync",function(a,d){var b=this.b$.get(J.c.CBK.SYNC);if(!this.mayScript||null==b)return a;try{return this.doSendCallback(J.c.CBK.SYNC,
b,z(-1,[this.fullName,a,d]),null)}catch(c){if(E(c,Exception))this.haveNotifiedError||JU.Logger.debugging&&JU.Logger.debug("syncCallback call error to "+b+": "+c),this.haveNotifiedError=!0;else throw c;}return a},"~S,~S");f(b,"eval",function(a){var d=a.indexOf("\u0001");return 0<=d?this.sendScript(a.substring(d+1),a.substring(0,d),!1,!1):!this.haveDocumentAccess?"NO EVAL ALLOWED":null!=this.b$.get(J.c.CBK.EVAL)?(this.notifyCallback(J.c.CBK.EVAL,z(-1,[null,a])),""):this.doEval(a)},"~S");f(b,"createImage",
function(){return null},"~S,~S,~O,~N");f(b,"getRegistryInfo",function(){JU.GenericApplet.checkIn(null,null);return JU.GenericApplet.htRegistry});f(b,"showUrl",function(a){JU.Logger.debugging&&JU.Logger.debug("showUrl("+a+")");if(null!=a&&0<a.length)try{this.doShowDocument(new java.net.URL(ma("java.net.URL"),a,null))}catch(d){if(E(d,"java.net.MalformedURLException"))this.consoleMessage("Malformed URL:"+a);else throw d;}},"~S");f(b,"resizeInnerPanel",function(a){var d=M(2,0);JU.Parser.parseStringInfestedFloatArray(a,
null,d);this.resizeDisplay(F(d[0]),F(d[1]));return D(-1,[F(d[0]),F(d[1])])},"~S");b.checkIn=c(b,"checkIn",function(a,d){null!=a&&(JU.Logger.info("AppletRegistry.checkIn("+a+")"),JU.GenericApplet.htRegistry.put(a,d));if(JU.Logger.debugging)for(var b,c=JU.GenericApplet.htRegistry.entrySet().iterator();c.hasNext()&&((b=c.next())||1);){var e=b.getKey();JU.Logger.debug(e+" "+b.getValue())}},"~S,~O");b.checkOut=c(b,"checkOut",function(a){JU.GenericApplet.htRegistry.remove(a)},"~S");b.findApplets=c(b,"findApplets",
function(a,d,b,c){if(null!=a&&0<=a.indexOf(",")){var e=JU.PT.split(a,",");for(a=0;a<e.length;a++)JU.GenericApplet.findApplets(e[a],d,b,c)}else if(d="__"+d+"__",null==a||a.equals("*")||a.equals(">"))for(a=JU.GenericApplet.htRegistry.keySet().iterator();a.hasNext()&&((e=a.next())||1);)!e.equals(b)&&0<e.indexOf(d)&&c.addLast(e);else 0<=b.indexOf("_object")&&0>a.indexOf("_object")&&(a+="_object"),0>a.indexOf("__")&&(a+=d),JU.GenericApplet.htRegistry.containsKey(a)||(a="jmolApplet"+a),!a.equals(b)&&JU.GenericApplet.htRegistry.containsKey(a)&&
c.addLast(a)},"~S,~S,~S,JU.Lst");f(b,"notifyAudioEnded",function(a){a.put("jsEvent","TRUE");this.viewer.sm.notifyAudioStatus(a);a.remove("jsEvent")},"~O");c(b,"setJSOptions",function(a){this.htParams=new java.util.Hashtable;null==a&&(a=new java.util.Hashtable);this.vwrOptions=a;for(var d,b=a.entrySet().iterator();b.hasNext()&&((d=b.next())||1);)this.htParams.put(d.getKey().toLowerCase(),d.getValue());this.documentBase=""+a.get("documentBase");this.codeBase=""+a.get("codePath")},"java.util.Map");c(b,
"initOptions",function(){this.vwrOptions.remove("debug");this.vwrOptions.put("fullName",this.fullName);this.haveDocumentAccess="true".equalsIgnoreCase(""+this.getValue("allowjavascript","true"));this.mayScript=!0});c(b,"getJmolParameter",function(a){a=this.htParams.get(a.toLowerCase());return null==a?null:""+a},"~S");f(b,"functionXY",function(a,d,b){var c=M(Math.abs(d),Math.abs(b),0);if(!this.mayScript||!this.haveDocumentAccess||0==d||0==b)return c;try{if(0<d&&0<b)for(var e=0;e<d;e++)for(var g=0;g<
b;g++)c[e][g]=window.eval(a)(this.htmlName,e,g);else if(0<b){var j;j=window.eval(a)(this.htmlName,d,b);d=Math.abs(d);var k=M(d*b,0);JU.Parser.parseStringInfestedFloatArray(j,null,k);for(a=e=0;e<d;e++)for(g=0;g<b;g++,a++)c[e][g]=k[a]}else window.eval(a)(this.htmlName,d,b,c)}catch(f){if(E(f,Exception))JU.Logger.error("Exception "+f+" with nX, nY: "+d+" "+b);else throw f;}return c},"~S,~N,~N");f(b,"functionXYZ",function(a,d,b,c){var e=M(Math.abs(d),Math.abs(b),Math.abs(c),0);if(!this.mayScript||!this.haveDocumentAccess||
0==d||0==b||0==c)return e;try{window.eval(a)(this.htmlName,d,b,c,e)}catch(g){if(E(g,Exception))JU.Logger.error("Exception "+g+" for "+a+" with nX, nY, nZ: "+d+" "+b+" "+c);else throw g;}return e},"~S,~N,~N,~N");c(b,"doShowDocument",function(a){var d=JU.PT.split(a.toString(),"?POST?");if(1==d.length)window.open(d[0]);else{a="<form id=f method=POST action='"+d[0]+"'>";a+="<input type='hidden' name='name' value='nmr-1h-prediction' id='name'><input type='submit' value='working...'>";for(var d=d[1].$plit("&"),
b=0;b<d.length;b++){var c=d[b],e=c.indexOf("="),g=c.substring(0,e),c=c.substring(e);a=0<=c.indexOf("\n")?a+("<textarea style='display:none' name="+g+">"+c+"</textarea>"):a+("<input type=hidden name="+g+' value="'+c+'">')}a+="</form>";d=window.open("");d.document.write(a);d.document.getElementById("f").submit()}},"java.net.URL");c(b,"doSendCallback",function(a,d,b,c){var e="string"==typeof d;if(!(null==d||e&&0==d.length)){if(e&&"alert".equals(d))return alert(c),"";c=e?JU.PT.split(d,"."):null;try{var g;
if(e){g=window[c[0]];for(var j=1;j<c.length;j++)g=g[c[j]]}else g=d;for(j=0;j<b.length;j++)b[j]&&b[j].booleanValue&&(b[j]=b[j].booleanValue()),b[j]instanceof Number&&(b[j]=+b[j]);return g.apply(this,b)}catch(k){System.out.println("callback "+a+" failed "+k)}}return""},"J.c.CBK,~O,~A,~S");c(b,"doEval",function(a){try{return window.eval(a)}catch(d){JU.Logger.error("# error evaluating "+a+":"+d.toString())}return""},"~S");c(b,"doShowStatus",function(a){try{System.out.println(a)}catch(d){if(!E(d,Exception))throw d;
}},"~S");c(b,"getGLmolView",function(){return this.viewer.getGLmolView()});c(b,"openFile",function(a){return this.viewer.openFile(a)},"~S");f(b,"cacheFileByName",function(a,d){return this.viewer.cacheFileByName(a,d)},"~S,~B");f(b,"cachePut",function(a,d){this.viewer.cachePut(a,d)},"~S,~O");f(b,"getFullName",function(){return this.fullName});f(b,"processPluginRequest",function(){return null},"~S,~S,~O");b.htRegistry=null;b.isJS=!1});m("JU");x(["JU.AU"],"JU.Geodesic",["java.util.Hashtable","JU.V3"],
function(){var b=G(JU,"Geodesic",null);b.getNeighborVertexesArrays=c(b,"getNeighborVertexesArrays",function(){null==JU.Geodesic.vertexCounts&&JU.Geodesic.createGeodesic(3);return JU.Geodesic.neighborVertexesArrays});b.getVertexCount=c(b,"getVertexCount",function(a){null==JU.Geodesic.vertexCounts&&JU.Geodesic.createGeodesic(3);return JU.Geodesic.vertexCounts[a]},"~N");b.getVertexVectors=c(b,"getVertexVectors",function(){null==JU.Geodesic.vertexCounts&&JU.Geodesic.createGeodesic(3);return JU.Geodesic.vertexVectors});
b.getVertexVector=c(b,"getVertexVector",function(a){return JU.Geodesic.vertexVectors[a]},"~N");b.getFaceVertexes=c(b,"getFaceVertexes",function(a){return JU.Geodesic.faceVertexesArrays[a]},"~N");b.createGeodesic=c(b,"createGeodesic",function(a){if(!(a<=JU.Geodesic.currentLevel)){JU.Geodesic.currentLevel=a;var d=$(a+1,0);JU.Geodesic.neighborVertexesArrays=JU.AU.newShort2(a+1);JU.Geodesic.faceVertexesArrays=JU.AU.newShort2(a+1);JU.Geodesic.vertexVectors=Array(12);JU.Geodesic.vertexVectors[0]=JU.V3.new3(0,
0,JU.Geodesic.halfRoot5);for(var b=0;5>b;++b)JU.Geodesic.vertexVectors[b+1]=JU.V3.new3(Math.cos(1.2566370614359172*b),Math.sin(1.2566370614359172*b),0.5),JU.Geodesic.vertexVectors[b+6]=JU.V3.new3(Math.cos(1.2566370614359172*b+0.6283185307179586),Math.sin(1.2566370614359172*b+0.6283185307179586),-0.5);JU.Geodesic.vertexVectors[11]=JU.V3.new3(0,0,-JU.Geodesic.halfRoot5);for(b=12;0<=--b;)JU.Geodesic.vertexVectors[b].normalize();JU.Geodesic.faceVertexesArrays[0]=JU.Geodesic.faceVertexesIcosahedron;JU.Geodesic.neighborVertexesArrays[0]=
JU.Geodesic.neighborVertexesIcosahedron;d[0]=12;for(b=0;b<a;++b)JU.Geodesic.quadruple(b,d);JU.Geodesic.vertexCounts=d}},"~N");b.quadruple=c(b,"quadruple",function(a,d){JU.Geodesic.htVertex=new java.util.Hashtable;var b=JU.Geodesic.vertexVectors.length,c=JU.Geodesic.faceVertexesArrays[a],e=c.length,g=w(e/3),j=b+(b+g-2),g=4*g;JU.Geodesic.vertexVectors=JU.AU.arrayCopyObject(JU.Geodesic.vertexVectors,j);g=$(3*g,0);JU.Geodesic.faceVertexesArrays[a+1]=g;var k=$(6*j,0);JU.Geodesic.neighborVertexesArrays[a+
1]=k;for(var f=k.length;0<=--f;)k[f]=-1;d[a+1]=j;JU.Geodesic.vertexNext=b;for(f=b=0;f<e;){var y=c[f++],n=c[f++],q=c[f++],v=JU.Geodesic.getVertex(y,n),m=JU.Geodesic.getVertex(n,q),r=JU.Geodesic.getVertex(q,y);g[b++]=y;g[b++]=v;g[b++]=r;g[b++]=n;g[b++]=m;g[b++]=v;g[b++]=q;g[b++]=r;g[b++]=m;g[b++]=r;g[b++]=v;g[b++]=m;JU.Geodesic.addNeighboringVertexes(k,v,y);JU.Geodesic.addNeighboringVertexes(k,v,r);JU.Geodesic.addNeighboringVertexes(k,v,m);JU.Geodesic.addNeighboringVertexes(k,v,n);JU.Geodesic.addNeighboringVertexes(k,
m,n);JU.Geodesic.addNeighboringVertexes(k,m,r);JU.Geodesic.addNeighboringVertexes(k,m,q);JU.Geodesic.addNeighboringVertexes(k,r,q);JU.Geodesic.addNeighboringVertexes(k,r,y)}e=JU.Geodesic.vertexVectors.length;if(b!=g.length)throw new NullPointerException;if(JU.Geodesic.vertexNext!=j)throw new NullPointerException;for(f=0;12>f;++f)for(c=0;5>c;++c){b=k[6*f+c];if(0>b)throw new NullPointerException;if(b>=e)throw new NullPointerException;if(-1!=k[6*f+5])throw new NullPointerException;}for(f=72;f<k.length;++f){b=
k[f];if(0>b)throw new NullPointerException;if(b>=e)throw new NullPointerException;}for(f=0;f<j;++f){e=0;for(c=k.length;0<=--c;)k[c]==f&&++e;if(12>f&&5!=e||12<=f&&6!=e)throw new NullPointerException;e=0;for(c=g.length;0<=--c;)g[c]==f&&++e;if(12>f&&5!=e||12<=f&&6!=e)throw new NullPointerException;}JU.Geodesic.htVertex=null},"~N,~A");b.addNeighboringVertexes=c(b,"addNeighboringVertexes",function(a,d,b){for(var c=6*d,e=c+6;c<e;++c){if(a[c]==b)return;if(0>a[c]){a[c]=b;for(var g=6*b,j=g+6;g<j;++g){if(a[g]==
d)return;if(0>a[g]){a[g]=d;return}}}}throw new NullPointerException;},"~A,~N,~N");b.getVertex=c(b,"getVertex",function(a,d){if(a>d){var b=a;a=d;d=b}var b=Integer.$valueOf((a<<16)+d),c=JU.Geodesic.htVertex.get(b);if(null!=c)return c.shortValue();c=JU.Geodesic.vertexVectors[JU.Geodesic.vertexNext]=new JU.V3;c.add2(JU.Geodesic.vertexVectors[a],JU.Geodesic.vertexVectors[d]);c.normalize();JU.Geodesic.htVertex.put(b,Short.$valueOf(JU.Geodesic.vertexNext));return JU.Geodesic.vertexNext++},"~N,~N");b.halfRoot5=
0.5*Math.sqrt(5);b.faceVertexesIcosahedron=$(-1,[0,1,2,0,2,3,0,3,4,0,4,5,0,5,1,1,6,2,2,7,3,3,8,4,4,9,5,5,10,1,6,1,10,7,2,6,8,3,7,9,4,8,10,5,9,11,6,10,11,7,6,11,8,7,11,9,8,11,10,9]);b.neighborVertexesIcosahedron=$(-1,[1,2,3,4,5,-1,0,5,10,6,2,-1,0,1,6,7,3,-1,0,2,7,8,4,-1,0,3,8,9,5,-1,0,4,9,10,1,-1,1,10,11,7,2,-1,2,6,11,8,3,-1,3,7,11,9,4,-1,4,8,11,10,5,-1,5,9,11,6,1,-1,6,7,8,9,10,-1]);b.vertexCounts=null;b.vertexVectors=null;b.faceVertexesArrays=null;b.neighborVertexesArrays=null;b.currentLevel=0;b.vertexNext=
0;b.htVertex=null});m("JU");var Ba=s(function(){this.entryCount=0;this.entries=null;r(this,arguments)},JU,"Int2IntHash",null);u(Ba,function(b){this.entries=Array(b)},"~N");c(Ba,"get",function(b){for(var a=this.entries,a=a[(b&2147483647)%a.length];null!=a;a=a.next)if(a.key==b)return a.value;return-2147483648},"~N");c(Ba,"put",function(b,a){for(var d=this.entries,c=d.length,p=(b&2147483647)%c,e=d[p];null!=e;e=e.next)if(e.key==b){e.value=a;return}if(this.entryCount>c){for(var p=c,c=c+(c+1),g=Array(c),
j=p;0<=--j;)for(e=d[j];null!=e;){var k=e,e=e.next,p=(k.key&2147483647)%c;k.next=g[p];g[p]=k}d=this.entries=g;p=(b&2147483647)%c}d[p]=new JU.Int2IntHashEntry(b,a,d[p]);++this.entryCount},"~N,~N");Ba=s(function(){this.value=this.key=0;this.next=null;r(this,arguments)},JU,"Int2IntHashEntry",null);u(Ba,function(b,a,d){this.key=b;this.value=a;this.next=d},"~N,~N,JU.Int2IntHashEntry");m("JU");x(null,"JU.JSJSONParser",["java.util.Hashtable","JU.JSONException","$.Lst","$.SB"],function(){var b=s(function(){this.str=
null;this.len=this.index=0;this.asHashTable=!1;r(this,arguments)},JU,"JSJSONParser",null);c(b,"parseMap",function(a,d){this.index=0;this.asHashTable=d;this.str=a;this.len=a.length;if("{"!=this.getChar())return null;this.returnChar();return this.getValue(!1)},"~S,~B");c(b,"parse",function(a,d){this.index=0;this.asHashTable=d;this.str=a;this.len=a.length;return this.getValue(!1)},"~S,~B");c(b,"next",function(){return this.index<this.len?this.str.charAt(this.index++):"\x00"});c(b,"returnChar",function(){this.index--});
c(b,"getChar",function(){for(;;){var a=this.next();if(0==a.charCodeAt(0)||" "<a)return a}});c(b,"getValue",function(a){var d=this.index,b=this.getChar();switch(b.charCodeAt(0)){case 0:return null;case 34:case 39:return this.getString(b);case 123:if(!a)return this.getObject();b=String.fromCharCode(0);break;case 91:if(!a)return this.getArray();b=String.fromCharCode(0);break;default:for(this.returnChar();" "<=b&&0>"[,]{:}'\"".indexOf(b);)b=this.next();this.returnChar();a&&":"!=b&&(b=String.fromCharCode(0))}if(a&&
0==b.charCodeAt(0))throw new JU.JSONException("invalid key");d=this.str.substring(d,this.index).trim();if(!a){if(d.equals("true"))return Boolean.TRUE;if(d.equals("false"))return Boolean.FALSE;if(d.equals("null"))return this.asHashTable?d:null}b=d.charAt(0);if("0"<=b&&"9">=b||"-"==b)try{if(0>d.indexOf(".")&&0>d.indexOf("e")&&0>d.indexOf("E"))return new Integer(d);var c=Float.$valueOf(d);if(!c.isInfinite()&&!c.isNaN())return c}catch(e){if(!E(e,Exception))throw e;}System.out.println("JSON parser cannot parse "+
d);throw new JU.JSONException("invalid value");},"~B");c(b,"getString",function(a){for(var d,b=null,c=this.index;;){var e=this.index;switch((d=this.next()).charCodeAt(0)){case 0:case 10:case 13:throw this.syntaxError("Unterminated string");case 92:switch((d=this.next()).charCodeAt(0)){case 34:case 39:case 92:case 47:break;case 98:d="\b";break;case 116:d="\t";break;case 110:d="\n";break;case 102:d="\f";break;case 114:d="\r";break;case 117:var g=this.index;this.index+=4;try{d=String.fromCharCode(Integer.parseInt(this.str.substring(g,
this.index),16))}catch(j){if(E(j,Exception))throw this.syntaxError("Substring bounds error");throw j;}break;default:throw this.syntaxError("Illegal escape.");}break;default:if(d==a)return null==b?this.str.substring(c,e):b.toString()}this.index>e+1&&null==b&&(b=new JU.SB,b.append(this.str.substring(c,e)));null!=b&&b.appendC(d)}},"~S");c(b,"getObject",function(){var a=this.asHashTable?new java.util.Hashtable:new java.util.HashMap,d=null;switch(this.getChar().charCodeAt(0)){case 125:return a;case 0:throw new JU.JSONException("invalid object");
}this.returnChar();for(var b=!1;;)switch(!0==(b=!b)?d=this.getValue(!0).toString():a.put(d,this.getValue(!1)),this.getChar().charCodeAt(0)){case 125:return a;case 58:if(b)continue;b=!0;case 44:if(!b)continue;default:throw this.syntaxError("Expected ',' or ':' or '}'");}});c(b,"getArray",function(){var a=new JU.Lst;switch(this.getChar().charCodeAt(0)){case 93:return a;case 0:throw new JU.JSONException("invalid array");}this.returnChar();for(var d=!1;;)switch(d?(a.addLast(null),d=!1):a.addLast(this.getValue(!1)),
this.getChar().charCodeAt(0)){case 44:switch(this.getChar().charCodeAt(0)){case 93:return a;case 44:d=!0;default:this.returnChar()}continue;case 93:return a;default:throw this.syntaxError("Expected ',' or ']'");}});c(b,"syntaxError",function(a){return new JU.JSONException(a+" for "+this.str.substring(0,Math.min(this.index,this.len)))},"~S")});m("JU");x(["java.lang.RuntimeException"],"JU.JSONException",null,function(){G(JU,"JSONException",RuntimeException)});m("JU");x(["java.util.Hashtable","JU.DefaultLogger"],
"JU.Logger",null,function(){var b=G(JU,"Logger",null);b.getProperty=c(b,"getProperty",function(a,d){try{var b=System.getProperty("jmol.logger."+a,null);if(null!=b)return b.equalsIgnoreCase("true")}catch(c){if(!E(c,Exception))throw c;}return d},"~S,~B");b.setLogger=c(b,"setLogger",function(a){JU.Logger._logger=a;JU.Logger.debugging=JU.Logger.isActiveLevel(5)||JU.Logger.isActiveLevel(6);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6]},"JU.LoggerInterface");b.isActiveLevel=c(b,
"isActiveLevel",function(a){return null!=JU.Logger._logger&&0<=a&&7>a&&JU.Logger._activeLevels[a]},"~N");b.setActiveLevel=c(b,"setActiveLevel",function(a,d){0>a&&(a=0);7<=a&&(a=6);JU.Logger._activeLevels[a]=d;JU.Logger.debugging=JU.Logger.isActiveLevel(5)||JU.Logger.isActiveLevel(6);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6]},"~N,~B");b.setLogLevel=c(b,"setLogLevel",function(a){for(var d=7;0<=--d;)JU.Logger.setActiveLevel(d,d<=a)},"~N");b.getLevel=c(b,"getLevel",function(a){switch(a){case 6:return"DEBUGHIGH";
case 5:return"DEBUG";case 4:return"INFO";case 3:return"WARN";case 2:return"ERROR";case 1:return"FATAL"}return"????"},"~N");b.logLevel=c(b,"logLevel",function(){return JU.Logger._logLevel});b.doLogLevel=c(b,"doLogLevel",function(a){JU.Logger._logLevel=a},"~B");b.debug=c(b,"debug",function(a){if(JU.Logger.debugging)try{JU.Logger._logger.debug(a)}catch(d){}},"~S");b.info=c(b,"info",function(a){try{JU.Logger.isActiveLevel(4)&&JU.Logger._logger.info(a)}catch(d){}},"~S");b.warn=c(b,"warn",function(a){try{JU.Logger.isActiveLevel(3)&&
JU.Logger._logger.warn(a)}catch(d){}},"~S");b.warnEx=c(b,"warnEx",function(a,d){try{JU.Logger.isActiveLevel(3)&&JU.Logger._logger.warnEx(a,d)}catch(b){}},"~S,Throwable");b.error=c(b,"error",function(a){try{JU.Logger.isActiveLevel(2)&&JU.Logger._logger.error(a)}catch(d){}},"~S");b.errorEx=c(b,"errorEx",function(a,d){try{JU.Logger.isActiveLevel(2)&&JU.Logger._logger.errorEx(a,d)}catch(b){}},"~S,Throwable");b.getLogLevel=c(b,"getLogLevel",function(){for(var a=7;0<=--a;)if(JU.Logger.isActiveLevel(a))return a;
return 0});b.fatal=c(b,"fatal",function(a){try{JU.Logger.isActiveLevel(1)&&JU.Logger._logger.fatal(a)}catch(d){}},"~S");b.fatalEx=c(b,"fatalEx",function(a,d){try{JU.Logger.isActiveLevel(1)&&JU.Logger._logger.fatalEx(a,d)}catch(b){}},"~S,Throwable");b.startTimer=c(b,"startTimer",function(a){null!=a&&JU.Logger.htTiming.put(a,Long.$valueOf(System.currentTimeMillis()))},"~S");b.getTimerMsg=c(b,"getTimerMsg",function(a,d){0==d&&(d=JU.Logger.getTimeFrom(a));return"Time for "+a+": "+d+" ms"},"~S,~N");b.getTimeFrom=
c(b,"getTimeFrom",function(a){var d;return null==a||null==(d=JU.Logger.htTiming.get(a))?-1:System.currentTimeMillis()-d.longValue()},"~S");b.checkTimer=c(b,"checkTimer",function(a,d){var b=JU.Logger.getTimeFrom(a);0<=b&&!a.startsWith("(")&&JU.Logger.info(JU.Logger.getTimerMsg(a,b));d&&JU.Logger.startTimer(a);return b},"~S,~B");b.checkMemory=c(b,"checkMemory",function(){JU.Logger.info("Memory: Total-Free=0; Total=0; Free=0; Max=0")});b._logger=new JU.DefaultLogger;b._activeLevels=ya(7,!1);b._logLevel=
!1;b.debugging=!1;b.debuggingHigh=!1;JU.Logger._activeLevels[6]=JU.Logger.getProperty("debugHigh",!1);JU.Logger._activeLevels[5]=JU.Logger.getProperty("debug",!1);JU.Logger._activeLevels[4]=JU.Logger.getProperty("info",!0);JU.Logger._activeLevels[3]=JU.Logger.getProperty("warn",!0);JU.Logger._activeLevels[2]=JU.Logger.getProperty("error",!0);JU.Logger._activeLevels[1]=JU.Logger.getProperty("fatal",!0);JU.Logger._logLevel=JU.Logger.getProperty("logLevel",!1);JU.Logger.debugging=null!=JU.Logger._logger&&
(JU.Logger._activeLevels[5]||JU.Logger._activeLevels[6]);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6];b.htTiming=new java.util.Hashtable});m("JU");I(JU,"LoggerInterface");m("JU");I(JU,"SimpleNode");m("JU");I(JU,"SimpleEdge");m("JU");I(JU,"Node",JU.SimpleNode);m("JU");x(["java.lang.Enum","JU.SimpleEdge"],"JU.Edge",["JU.PT"],function(){var b=s(function(){this.index=-1;this.order=0;r(this,arguments)},JU,"Edge",null,JU.SimpleEdge);c(b,"isPartial",function(){return!this.isPymolMultiple()&&
0!=(this.order&224)&&!this.isStereo()&&!this.isPymolMultiple()});c(b,"isPymolMultiple",function(){return 98304==(this.order&98304)});c(b,"isStereo",function(){return 0!=(this.order&1024)});b.getArgbHbondType=c(b,"getArgbHbondType",function(a){return JU.Edge.argbsHbondType[(a&30720)>>11]},"~N");b.getBondOrderNumberFromOrder=c(b,"getBondOrderNumberFromOrder",function(a){a&=131071;switch(a){case 131071:case 65535:return"0";case 1025:case 1041:return"1";case 32768:break;default:0!=(a&98304)&&(a&=3)}return JU.Edge.isOrderH(a)||
JU.Edge.isAtropism(a)||0!=(a&256)?"1":0!=(a&224)?(a>>5)+"."+(a&31):JU.Edge.EnumBondOrder.getNumberFromCode(a)},"~N");b.getCmlBondOrder=c(b,"getCmlBondOrder",function(a){a=JU.Edge.getBondOrderNameFromOrder(a);switch(a.charAt(0).charCodeAt(0)){case 115:case 100:case 116:return""+a.toUpperCase().charAt(0);case 97:return 0<=a.indexOf("Double")?"D":0<=a.indexOf("Single")?"S":"aromatic";case 112:return 0<=a.indexOf(" ")?a.substring(a.indexOf(" ")+1):"partial12"}return null},"~N");b.getBondOrderNameFromOrder=
c(b,"getBondOrderNameFromOrder",function(a){a&=131071;switch(a){case 65535:case 131071:return"";case 1025:return"near";case 1041:return"far";case 32768:return JU.Edge.EnumBondOrder.STRUT.$$name;case 1:return JU.Edge.EnumBondOrder.SINGLE.$$name;case 2:return JU.Edge.EnumBondOrder.DOUBLE.$$name;default:0!=(a&98304)&&(a&=3)}return 0!=(a&224)?"partial "+JU.Edge.getBondOrderNumberFromOrder(a):JU.Edge.isOrderH(a)?JU.Edge.EnumBondOrder.H_REGULAR.$$name:65537==(a&65537)?(a=JU.Edge.getAtropismCode(a),"atropisomer_"+
w(a/4)+a%4):0!=(a&256)?JU.Edge.EnumBondOrder.SINGLE.$$name:JU.Edge.EnumBondOrder.getNameFromCode(a)},"~N");b.getAtropismOrder=c(b,"getAtropismOrder",function(a,b){return JU.Edge.getAtropismOrder12((a<<2)+b)},"~N,~N");b.getAtropismOrder12=c(b,"getAtropismOrder12",function(a){return a<<11|65537},"~N");b.getAtropismCode=c(b,"getAtropismCode",function(a){return a>>11&15},"~N");b.getAtropismNode=c(b,"getAtropismNode",function(a,b,c){a=a>>11+(c?0:2)&3;return b.getEdges()[a-1].getOtherNode(b)},"~N,JU.Node,~B");
b.isAtropism=c(b,"isAtropism",function(a){return 65537==(a&65537)},"~N");b.isOrderH=c(b,"isOrderH",function(a){return 0!=(a&30720)&&0==(a&65537)},"~N");b.getPartialBondDotted=c(b,"getPartialBondDotted",function(a){return a&31},"~N");b.getPartialBondOrder=c(b,"getPartialBondOrder",function(a){return 0!=(a&1024)?1:(a&131071)>>5},"~N");b.getCovalentBondOrder=c(b,"getCovalentBondOrder",function(a){if(0!=(a&1024))return 1;if(0==(a&1023))return 0;a&=131071;if(0!=(a&224))return JU.Edge.getPartialBondOrder(a);
0!=(a&256)&&(a&=-257);0!=(a&248)&&(a=1);return a&7},"~N");b.getBondOrderFromFloat=c(b,"getBondOrderFromFloat",function(a){switch(F(10*a)){case 10:return 1;case 5:case -10:return 33;case 15:return 515;case -15:return 66;case 20:return 2;case 25:return 97;case -25:return 100;case 30:return 3;case 40:return 4;case 50:return 5;case 60:return 6}return 131071},"~N");b.getBondOrderFromString=c(b,"getBondOrderFromString",function(a){if(0>a.indexOf(" "))if(0<=a.indexOf("."))a="partial "+a;else{if(JU.PT.isOneOf(a,
";1;2;3;4;5;6;"))return a.charAt(0).charCodeAt(0)-48;var b=JU.Edge.EnumBondOrder.getCodeFromName(a);if(131071!=b||!a.toLowerCase().startsWith("atropisomer_")||14!=a.length)return b;try{b=JU.Edge.getAtropismOrder(Integer.parseInt(a.substring(12,13)),Integer.parseInt(a.substring(13,14)))}catch(c){if(!E(c,"NumberFormatException"))throw c;}return b}if(0!=a.toLowerCase().indexOf("partial "))return 131071;a=a.substring(8).trim();return JU.Edge.getPartialBondOrderFromFloatEncodedInt(JU.Edge.getFloatEncodedInt(a))},
"~S");b.getPartialBondOrderFromFloatEncodedInt=c(b,"getPartialBondOrderFromFloatEncodedInt",function(a){return(w(a/1E6)%7<<5)+(a%1E6&31)},"~N");b.getFloatEncodedInt=c(b,"getFloatEncodedInt",function(a){var b=a.indexOf(".");if(1>b||"-"==a.charAt(0)||a.endsWith(".")||a.contains(".0"))return 2147483647;var c=0,e=0;if(0<b)try{c=Integer.parseInt(a.substring(0,b)),0>c&&(c=-c)}catch(g){if(E(g,"NumberFormatException"))c=-1;else throw g;}var j=a.length;if(b<j-1)try{var k=b+Math.min(6,j-b),e=Integer.parseInt(a.substring(b+
1,k))}catch(f){if(!E(f,"NumberFormatException"))throw f;}c=1E6*c+e;return 0>c||2147483647<c?2147483647:c},"~S");f(b,"getBondType",function(){return this.order&131071});c(b,"setCIPChirality",function(){},"~N");c(b,"getCIPChirality",function(){return""},"~B");var a=s(function(){this.code=0;this.$$name=this.number=null;r(this,arguments)},JU.Edge,"EnumBondOrder",Enum);u(a,function(a,b,c){this.code=a;this.number=b;this.$$name=c},"~N,~S,~S");a.getCodeFromName=c(a,"getCodeFromName",function(a){for(var b,
c=0,e=JU.Edge.EnumBondOrder.values();c<e.length&&((b=e[c])||1);c++)if(b.$$name.equalsIgnoreCase(a))return b.code;return 131071},"~S");a.getNameFromCode=c(a,"getNameFromCode",function(a){for(var b,c=0,e=JU.Edge.EnumBondOrder.values();c<e.length&&((b=e[c])||1);c++)if(b.code==a)return b.$$name;return"?"},"~N");a.getNumberFromCode=c(a,"getNumberFromCode",function(a){for(var b,c=0,e=JU.Edge.EnumBondOrder.values();c<e.length&&((b=e[c])||1);c++)if(b.code==a)return b.number;return"?"},"~N");A(a,"SINGLE",
0,[1,"1","single"]);A(a,"DOUBLE",1,[2,"2","double"]);A(a,"TRIPLE",2,[3,"3","triple"]);A(a,"QUADRUPLE",3,[4,"4","quadruple"]);A(a,"QUINTUPLE",4,[5,"5","quintuple"]);A(a,"sextuple",5,[6,"6","sextuple"]);A(a,"AROMATIC",6,[515,"1.5","aromatic"]);A(a,"STRUT",7,[32768,"1","struts"]);A(a,"H_REGULAR",8,[2048,"1","hbond"]);A(a,"PARTIAL01",9,[33,"0.5","partial"]);A(a,"PARTIAL12",10,[66,"1.5","partialDouble"]);A(a,"PARTIAL23",11,[97,"2.5","partialTriple"]);A(a,"PARTIAL32",12,[100,"2.5","partialTriple2"]);A(a,
"AROMATIC_SINGLE",13,[513,"1","aromaticSingle"]);A(a,"AROMATIC_DOUBLE",14,[514,"2","aromaticDouble"]);A(a,"ATROPISOMER",15,[65537,"1","atropisomer"]);A(a,"UNSPECIFIED",16,[17,"1","unspecified"]);b.argbsHbondType=D(-1,[4294928820,4294967040,4294967040,4294967295,4294902015,4294901760,4294944E3,4278255615,4278255360,4294934656])});m("JU");x(["JU.Elements"],"JU.JmolMolecule",["java.util.Hashtable","JU.AU","$.BS","$.PT"],function(){var b=s(function(){this.nodes=null;this.nElements=this.ac=this.firstAtomIndex=
this.indexInModel=this.modelIndex=this.moleculeIndex=0;this.altElementCounts=this.elementCounts=null;this.altElementMax=this.elementNumberMax=0;this.atNos=this.atomList=this.mf=null;r(this,arguments)},JU,"JmolMolecule",null);N(b,function(){this.elementCounts=D(JU.Elements.elementNumberMax,0);this.altElementCounts=D(JU.Elements.altElementMax,0)});u(b,function(){});b.getMolecules=c(b,"getMolecules",function(a,d,b,c){var e=null,g=new JU.BS,j=-1,k=0,f=0,y=Array(4);null==c&&(c=new JU.BS);for(var n=0;n<
a.length;n++)if(!c.get(n)&&!g.get(n)){var q=a[n];null==q||q.isDeleted()?c.set(n):(q=q.getModelIndex(),q!=j&&(j=q,k=0,e=d[q]),g=JU.JmolMolecule.getBranchBitSet(a,n,e,b,-1,!0,!0),0<=g.nextSetBit(0)&&(y=JU.JmolMolecule.addMolecule(y,f++,a,n,g,q,k++,c)))}return JU.JmolMolecule.allocateArray(y,f)},"~A,~A,JU.Lst,JU.BS");b.getBranchBitSet=c(b,"getBranchBitSet",function(a,d,b,c,e,g,j){var k=JU.BS.newN(a.length);if(0>d)return k;0<=e&&b.clear(e);return JU.JmolMolecule.getCovalentlyConnectedBitSet(a,a[d],b,
g,j,c,k,null,null)?k:new JU.BS},"~A,~N,JU.BS,JU.Lst,~N,~B,~B");b.addMolecule=c(b,"addMolecule",function(a,d,b,c,e,g,j,k){k.or(e);d==a.length&&(a=JU.JmolMolecule.allocateArray(a,2*d+1));a[d]=JU.JmolMolecule.initialize(b,d,c,e,g,j);return a},"~A,~N,~A,~N,JU.BS,~N,~N,JU.BS");b.getMolecularFormulaAtoms=c(b,"getMolecularFormulaAtoms",function(a,d,b,c){var e=new JU.JmolMolecule;e.nodes=a;e.atomList=d;return e.getMolecularFormula(!1,b,c)},"~A,JU.BS,~A,~B");c(b,"getMolecularFormula",function(a,d,b){this.getMFArray(a,
d,b);if(0>this.elementCounts[0])return"?";d=a="";for(var c=1;c<=this.elementNumberMax;c++)b=this.elementCounts[c],0!=b&&(a+=d+JU.Elements.elementSymbolFromNumber(c)+" "+b,d=" ");return a},"~B,~A,~B");c(b,"getMFArray",function(a,d,b){null==this.atomList&&(this.atomList=new JU.BS,this.atomList.setBits(0,null==this.atNos?this.nodes.length:this.atNos.length));this.elementCounts=D(JU.Elements.elementNumberMax,0);this.altElementCounts=D(JU.Elements.altElementMax,0);this.ac=this.atomList.cardinality();for(var c=
this.nElements=0,e=this.atomList.nextSetBit(0);0<=e;e=this.atomList.nextSetBit(e+1),c++){var g,j=null;if(null==this.atNos){j=this.nodes[e];if(null==j)continue;g=j.getAtomicAndIsotopeNumber()}else g=this.atNos[e];var k=null==d?1:F(8*d[c]);g<JU.Elements.elementNumberMax?(0==this.elementCounts[g]&&this.nElements++,this.elementCounts[g]+=k,this.elementNumberMax=Math.max(this.elementNumberMax,g)):(g=JU.Elements.altElementIndexFromNumber(g),0==this.altElementCounts[g]&&this.nElements++,this.altElementCounts[g]+=
k,this.altElementMax=Math.max(this.altElementMax,g));a&&(g=Math.max(0,j.getImplicitHydrogenCount())+Math.max(j.getExplicitHydrogenCount(),0),0<g&&(0==this.elementCounts[1]&&this.nElements++,this.elementCounts[1]+=g*k,this.elementNumberMax=Math.max(this.elementNumberMax,1)))}if(null!=d)for(e=1;e<=this.elementNumberMax;e++){var f=w(this.elementCounts[e]/8);if(8*f!=this.elementCounts[e])return this.elementCounts[0]=-1,this.elementCounts;this.elementCounts[e]=f}if(b){d=2;for(a=!0;a;){d=1E5;for(e=1;e<=
this.elementNumberMax;e++)if(0<(f=this.elementCounts[e])&&f<d)d=f;if(1==d)break;for(;1<d;d--){a=!0;for(e=1;e<=this.elementNumberMax&&a;e++)if(w((f=this.elementCounts[e])/d)*d!=f)a=!1;if(a){for(e=1;e<=this.elementNumberMax;e++)this.elementCounts[e]/=d;break}}}}return this.elementCounts},"~B,~A,~B");b.initialize=c(b,"initialize",function(a,d,b,c,e,g){var j=new JU.JmolMolecule;j.nodes=a;j.firstAtomIndex=b;j.atomList=c;j.ac=c.cardinality();j.moleculeIndex=d;j.modelIndex=e;j.indexInModel=g;return j},"~A,~N,~N,JU.BS,~N,~N");
b.getCovalentlyConnectedBitSet=c(b,"getCovalentlyConnectedBitSet",function(a,d,b,c,e,g,j,k,f){var y=d.getIndex();if(!b.get(y)||!e&&0<d.getBioStructureTypeName().length)return c;b.clear(y);if(null!=g&&!j.get(y))for(var n=g.size();0<=--n;){var q=g.get(n);if(q.get(y)){j.or(q);b.andNot(q);for(n=q.nextSetBit(0);0<=n;n=q.nextSetBit(n+1)){var v=a[n];null!=v&&(b.set(n),JU.JmolMolecule.getCovalentlyConnectedBitSet(a,v,b,c,e,g,j,k,d),b.clear(n))}break}}j.set(y);y=d.getEdges();if(null==y)return!0;for(n=y.length;0<=
--n;)if(q=y[n],null!=q&&q.isCovalent()&&(q=q.getOtherNode(d),q!==f&&(q===k||!JU.JmolMolecule.getCovalentlyConnectedBitSet(a,q,b,c,e,g,j,k,d))))return!1;return!0},"~A,JU.Node,JU.BS,~B,~B,JU.Lst,JU.BS,JU.Node,JU.Node");b.allocateArray=c(b,"allocateArray",function(a,d){return d==a.length?a:JU.AU.arrayCopyObject(a,d)},"~A,~N");b.getBitSetForMF=c(b,"getBitSetForMF",function(a,d,b){var c=new java.util.Hashtable,e,g;b=JU.PT.rep(JU.PT.clean(b+"Z")," ","");for(var j=0,k=0,f=0,y=b.length;j<y;j++)if((g=Character.isDigit(e=
b.charAt(j)))||0<j&&Character.isUpperCase(e)){var f=j,n=b.substring(k,f).trim();if(g)for(;j<y&&Character.isDigit(b.charAt(j));)j++;k=j;c.put(n,D(-1,[g?JU.PT.parseInt(b.substring(f,k)):1]))}b=new JU.BS;for(j=d.nextSetBit(0);0<=j;j=d.nextSetBit(j+1))e=a[j].getElementSymbol(),e=c.get(e),null==e||1>e[0]--||b.set(j);var q;for(a=c.values().iterator();a.hasNext()&&((q=a.next())||1);)if(0<q[0])return new JU.BS;return b},"~A,JU.BS,~S");b.getBranchesForInversion=c(b,"getBranchesForInversion",function(a,d,b){for(var c=
new JU.BS,e=a[d],g=e.getEdges(),j=e.getBondCount();0<=--j;)1==g[j].getBondType()&&c.set(g[j].getOtherNode(e).getIndex());if(2>c.cardinality())c.clearAll();else for(j=c.nextSetBit(0);0<=j;j=c.nextSetBit(j+1))1!=a[j].getCovalentBondCount()&&(e=JU.BS.copy(b),e.clear(d),g=JU.BS.newN(a.length),JU.JmolMolecule.getCovalentlyConnectedBitSet(a,a[j],e,!0,!0,null,g,a[d],a[d])||c.clear(j));return c},"~A,~N,JU.BS")});m("JU");x(["java.util.Hashtable","JU.DefaultLogger"],"JU.Logger",null,function(){var b=G(JU,"Logger",
null);b.getProperty=c(b,"getProperty",function(a,d){try{var b=System.getProperty("jmol.logger."+a,null);if(null!=b)return b.equalsIgnoreCase("true")}catch(c){if(!E(c,Exception))throw c;}return d},"~S,~B");b.setLogger=c(b,"setLogger",function(a){JU.Logger._logger=a;JU.Logger.debugging=JU.Logger.isActiveLevel(5)||JU.Logger.isActiveLevel(6);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6]},"JU.LoggerInterface");b.isActiveLevel=c(b,"isActiveLevel",function(a){return null!=JU.Logger._logger&&
0<=a&&7>a&&JU.Logger._activeLevels[a]},"~N");b.setActiveLevel=c(b,"setActiveLevel",function(a,d){0>a&&(a=0);7<=a&&(a=6);JU.Logger._activeLevels[a]=d;JU.Logger.debugging=JU.Logger.isActiveLevel(5)||JU.Logger.isActiveLevel(6);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6]},"~N,~B");b.setLogLevel=c(b,"setLogLevel",function(a){for(var d=7;0<=--d;)JU.Logger.setActiveLevel(d,d<=a)},"~N");b.getLevel=c(b,"getLevel",function(a){switch(a){case 6:return"DEBUGHIGH";case 5:return"DEBUG";
case 4:return"INFO";case 3:return"WARN";case 2:return"ERROR";case 1:return"FATAL"}return"????"},"~N");b.logLevel=c(b,"logLevel",function(){return JU.Logger._logLevel});b.doLogLevel=c(b,"doLogLevel",function(a){JU.Logger._logLevel=a},"~B");b.debug=c(b,"debug",function(a){if(JU.Logger.debugging)try{JU.Logger._logger.debug(a)}catch(d){}},"~S");b.info=c(b,"info",function(a){try{JU.Logger.isActiveLevel(4)&&JU.Logger._logger.info(a)}catch(d){}},"~S");b.warn=c(b,"warn",function(a){try{JU.Logger.isActiveLevel(3)&&
JU.Logger._logger.warn(a)}catch(d){}},"~S");b.warnEx=c(b,"warnEx",function(a,d){try{JU.Logger.isActiveLevel(3)&&JU.Logger._logger.warnEx(a,d)}catch(b){}},"~S,Throwable");b.error=c(b,"error",function(a){try{JU.Logger.isActiveLevel(2)&&JU.Logger._logger.error(a)}catch(d){}},"~S");b.errorEx=c(b,"errorEx",function(a,d){try{JU.Logger.isActiveLevel(2)&&JU.Logger._logger.errorEx(a,d)}catch(b){}},"~S,Throwable");b.getLogLevel=c(b,"getLogLevel",function(){for(var a=7;0<=--a;)if(JU.Logger.isActiveLevel(a))return a;
return 0});b.fatal=c(b,"fatal",function(a){try{JU.Logger.isActiveLevel(1)&&JU.Logger._logger.fatal(a)}catch(d){}},"~S");b.fatalEx=c(b,"fatalEx",function(a,d){try{JU.Logger.isActiveLevel(1)&&JU.Logger._logger.fatalEx(a,d)}catch(b){}},"~S,Throwable");b.startTimer=c(b,"startTimer",function(a){null!=a&&JU.Logger.htTiming.put(a,Long.$valueOf(System.currentTimeMillis()))},"~S");b.getTimerMsg=c(b,"getTimerMsg",function(a,d){0==d&&(d=JU.Logger.getTimeFrom(a));return"Time for "+a+": "+d+" ms"},"~S,~N");b.getTimeFrom=
c(b,"getTimeFrom",function(a){var d;return null==a||null==(d=JU.Logger.htTiming.get(a))?-1:System.currentTimeMillis()-d.longValue()},"~S");b.checkTimer=c(b,"checkTimer",function(a,d){var b=JU.Logger.getTimeFrom(a);0<=b&&!a.startsWith("(")&&JU.Logger.info(JU.Logger.getTimerMsg(a,b));d&&JU.Logger.startTimer(a);return b},"~S,~B");b.checkMemory=c(b,"checkMemory",function(){JU.Logger.info("Memory: Total-Free=0; Total=0; Free=0; Max=0")});b._logger=new JU.DefaultLogger;b._activeLevels=ya(7,!1);b._logLevel=
!1;b.debugging=!1;b.debuggingHigh=!1;JU.Logger._activeLevels[6]=JU.Logger.getProperty("debugHigh",!1);JU.Logger._activeLevels[5]=JU.Logger.getProperty("debug",!1);JU.Logger._activeLevels[4]=JU.Logger.getProperty("info",!0);JU.Logger._activeLevels[3]=JU.Logger.getProperty("warn",!0);JU.Logger._activeLevels[2]=JU.Logger.getProperty("error",!0);JU.Logger._activeLevels[1]=JU.Logger.getProperty("fatal",!0);JU.Logger._logLevel=JU.Logger.getProperty("logLevel",!1);JU.Logger.debugging=null!=JU.Logger._logger&&
(JU.Logger._activeLevels[5]||JU.Logger._activeLevels[6]);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6];b.htTiming=new java.util.Hashtable});m("JU");I(JU,"LoggerInterface");m("JU");x(["JU.V3"],"JU.Measure","javajs.api.Interface JU.Lst $.M3 $.P3 $.P4 $.Quat".split(" "),function(){var b=G(JU,"Measure",null);b.computeAngle=c(b,"computeAngle",function(a,d,b,c,e,g){c.sub2(a,d);e.sub2(b,d);a=c.angle(e);return g?a/0.017453292:a},"JU.T3,JU.T3,JU.T3,JU.V3,JU.V3,~B");b.computeAngleABC=
c(b,"computeAngleABC",function(a,d,b,c){var e=new JU.V3,g=new JU.V3;return JU.Measure.computeAngle(a,d,b,e,g,c)},"JU.T3,JU.T3,JU.T3,~B");b.computeTorsion=c(b,"computeTorsion",function(a,d,b,c,e){if(1E-10>a.distanceSquared(d))return 0;var g=a.x-d.x,j=a.y-d.y;a=a.z-d.z;var k=b.x-d.x,f=b.y-d.y,y=b.z-d.z,n=b.x-c.x,q=b.y-c.y,v=b.z-c.z;c=j*y-a*f;d=a*k-g*y;var m=g*f-j*k;b=f*v-y*q;y=y*n-k*v;k=k*q-f*n;n=1/(b*b+y*y+k*k);f=Math.sqrt(1/(c*c+d*d+m*m));n=Math.sqrt(n);c=(c*b+d*y+m*k)*f*n;1<c&&(c=1);-1>c&&(c=-1);
c=Math.acos(c);g=g*b+j*y+a*k;j=Math.abs(g);c=0<g/j?c:-c;return e?c/0.017453292:c},"JU.T3,JU.T3,JU.T3,JU.T3,~B");b.getPlaneThroughPoints=c(b,"getPlaneThroughPoints",function(a,d,b,c,e,g){null==c&&(c=new JU.V3);null==e&&(e=new JU.V3);a=JU.Measure.getNormalThroughPoints(a,d,b,c,e);g.set4(c.x,c.y,c.z,a);return g},"JU.T3,JU.T3,JU.T3,JU.V3,JU.V3,JU.P4");b.getPlaneThroughPoint=c(b,"getPlaneThroughPoint",function(a,d,b){b.set4(d.x,d.y,d.z,-d.dot(a))},"JU.T3,JU.V3,JU.P4");b.distanceToPlane=c(b,"distanceToPlane",
function(a,d){return null==a?NaN:(a.dot(d)+a.w)/Math.sqrt(a.dot(a))},"JU.P4,JU.T3");b.directedDistanceToPlane=c(b,"directedDistanceToPlane",function(a,d,b){a=d.dot(a)+d.w;b=d.dot(b)+d.w;return Math.signum(b)*a/Math.sqrt(d.dot(d))},"JU.P3,JU.P4,JU.P3");b.distanceToPlaneD=c(b,"distanceToPlaneD",function(a,d,b){return null==a?NaN:(a.dot(b)+a.w)/d},"JU.P4,~N,JU.P3");b.distanceToPlaneV=c(b,"distanceToPlaneV",function(a,d,b){return null==a?NaN:(a.dot(b)+d)/Math.sqrt(a.dot(a))},"JU.V3,~N,JU.P3");b.calcNormalizedNormal=
c(b,"calcNormalizedNormal",function(a,d,b,c,e){e.sub2(d,a);c.sub2(b,a);c.cross(e,c);c.normalize()},"JU.T3,JU.T3,JU.T3,JU.T3,JU.T3");b.getDirectedNormalThroughPoints=c(b,"getDirectedNormalThroughPoints",function(a,d,b,c,e,g){d=JU.Measure.getNormalThroughPoints(a,d,b,e,g);null!=c&&(b=JU.P3.newP(a),b.add(e),g=b.distance(c),b.sub2(a,e),g>b.distance(c)&&(e.scale(-1),d=-d));return d},"JU.T3,JU.T3,JU.T3,JU.T3,JU.V3,JU.V3");b.getNormalThroughPoints=c(b,"getNormalThroughPoints",function(a,d,b,c,e){JU.Measure.calcNormalizedNormal(a,
d,b,c,e);e.setT(a);return-e.dot(c)},"JU.T3,JU.T3,JU.T3,JU.T3,JU.T3");b.getPlaneProjection=c(b,"getPlaneProjection",function(a,d,b,c){var e=JU.Measure.distanceToPlane(d,a);c.set(d.x,d.y,d.z);c.normalize();0<e&&c.scale(-1);b.scaleAdd2(Math.abs(e),c,a);return e},"JU.T3,JU.P4,JU.T3,JU.V3");b.getNormalFromCenter=c(b,"getNormalFromCenter",function(a,d,b,c,e,g,j){d=JU.Measure.getNormalThroughPoints(d,b,c,g,j);a=0<JU.Measure.distanceToPlaneV(g,d,a);a==e&&g.scale(-1);return!a},"JU.P3,JU.P3,JU.P3,JU.P3,~B,JU.V3,JU.V3");
b.getNormalToLine=c(b,"getNormalToLine",function(a,d,b){b.sub2(a,d);b.cross(b,JU.Measure.axisY);b.normalize();Float.isNaN(b.x)&&b.set(1,0,0)},"JU.P3,JU.P3,JU.V3");b.getBisectingPlane=c(b,"getBisectingPlane",function(a,d,b,c,e){b.scaleAdd2(0.5,d,a);c.setT(d);c.normalize();JU.Measure.getPlaneThroughPoint(b,c,e)},"JU.P3,JU.V3,JU.T3,JU.V3,JU.P4");b.projectOntoAxis=c(b,"projectOntoAxis",function(a,d,b,c){c.sub2(a,d);var e=c.dot(b);a.scaleAdd2(e,b,d);c.sub2(a,d);return e},"JU.P3,JU.P3,JU.V3,JU.V3");b.calcBestAxisThroughPoints=
c(b,"calcBestAxisThroughPoints",function(a,d,b,c,e,g){b.setT(a[0]);c.sub2(a[d-1],b);c.normalize();JU.Measure.calcAveragePointN(a,d,b);for(var j=0;j++<g&&0.001<JU.Measure.findAxis(a,d,b,c,e););a=JU.P3.newP(a[0]);JU.Measure.projectOntoAxis(a,b,c,e);b.setT(a)},"~A,~N,JU.P3,JU.V3,JU.V3,~N");b.findAxis=c(b,"findAxis",function(a,d,b,c,e){for(var g=new JU.V3,j=new JU.V3,k=new JU.P3,f=new JU.P3,y=JU.V3.newV(c),n=0;0<=--d;)k.setT(a[d]),f.setT(k),JU.Measure.projectOntoAxis(f,b,c,e),j.sub2(k,f),j.cross(e,j),
g.add(j),n+=e.lengthSquared();a=JU.V3.newV(g);a.scale(1/n);j.cross(a,c);c.add(j);c.normalize();j.sub2(c,y);return j.length()},"~A,~N,JU.P3,JU.V3,JU.V3");b.calcAveragePoint=c(b,"calcAveragePoint",function(a,d,b){b.set((a.x+d.x)/2,(a.y+d.y)/2,(a.z+d.z)/2)},"JU.P3,JU.P3,JU.P3");b.calcAveragePointN=c(b,"calcAveragePointN",function(a,d,b){b.setT(a[0]);for(var c=1;c<d;c++)b.add(a[c]);b.scale(1/d)},"~A,~N,JU.P3");b.transformPoints=c(b,"transformPoints",function(a,d,b){for(var c=new JU.Lst,e=0;e<a.size();e++){var g=
JU.P3.newP(a.get(e));g.sub(b);d.rotTrans(g);g.add(b);c.addLast(g)}return c},"JU.Lst,JU.M4,JU.P3");b.isInTetrahedron=c(b,"isInTetrahedron",function(a,d,b,c,e,g,j,k,f){var y=0<=JU.Measure.distanceToPlane(JU.Measure.getPlaneThroughPoints(c,e,d,j,k,g),a);if(y!=0<=JU.Measure.distanceToPlane(JU.Measure.getPlaneThroughPoints(d,e,b,j,k,g),a)||y!=0<=JU.Measure.distanceToPlane(JU.Measure.getPlaneThroughPoints(b,e,c,j,k,g),a))return!1;a=JU.Measure.distanceToPlane(JU.Measure.getPlaneThroughPoints(d,b,c,j,k,g),
a);if(f)return y==0<=a;e=JU.Measure.distanceToPlane(g,e);return 0>=e*a||Math.abs(e)>Math.abs(a)},"JU.P3,JU.P3,JU.P3,JU.P3,JU.P3,JU.P4,JU.V3,JU.V3,~B");b.getIntersectionPP=c(b,"getIntersectionPP",function(a,d){var b=a.x,c=a.y,e=a.z,g=a.w,j=d.x,k=d.y,f=d.z,y=d.w,n=JU.V3.new3(b,c,e),q=JU.V3.new3(j,k,f),v=new JU.V3;v.cross(n,q);var n=Math.abs(v.x),q=Math.abs(v.y),m=Math.abs(v.z);switch(n>q?n>m?1:3:q>m?2:3){case 1:n=0;q=c*f-k*e;if(0.01>Math.abs(q))return null;e=(e*y-f*g)/q;b=(k*g-y*c)/q;break;case 2:q=
b*f-j*e;if(0.01>Math.abs(q))return null;n=(e*y-f*g)/q;e=0;b=(j*g-y*b)/q;break;default:q=b*k-j*c;if(0.01>Math.abs(q))return null;n=(c*y-k*g)/q;e=(j*g-y*b)/q;b=0}c=new JU.Lst;c.addLast(JU.P3.new3(n,e,b));v.normalize();c.addLast(v);return c},"JU.P4,JU.P4");b.getIntersection=c(b,"getIntersection",function(a,d,b,c,e,g){JU.Measure.getPlaneProjection(a,b,c,e);e.set(b.x,b.y,b.z);e.normalize();null==d&&(d=JU.V3.newV(e));b=d.dot(e);if(0.01>Math.abs(b))return null;g.sub2(c,a);c.scaleAdd2(g.dot(e)/b,d,a);return c},
"JU.P3,JU.V3,JU.P4,JU.P3,JU.V3,JU.V3");b.calculateQuaternionRotation=c(b,"calculateQuaternionRotation",function(a,d){d[1]=NaN;var b=new JU.Quat,c=a[0],e=a[1],g=c.length-1;if(2>g||c.length!=e.length)return b;for(var j=0,k=0,f=0,y=0,n=0,q=0,v=0,m=0,r=0,s=new JU.P3,u=new JU.P3,w=c[0],x=e[0],g=g+1;1<=--g;)s.sub2(c[g],w),u.sub2(e[g],x),j+=s.x*u.x,k+=s.x*u.y,f+=s.x*u.z,y+=s.y*u.x,n+=s.y*u.y,q+=s.y*u.z,v+=s.z*u.x,m+=s.z*u.y,r+=s.z*u.z;d[0]=JU.Measure.getRmsd(a,b);b=S(4,4,0);b[0][0]=j+n+r;b[0][1]=b[1][0]=
q-m;b[0][2]=b[2][0]=v-f;b[0][3]=b[3][0]=k-y;b[1][1]=j-n-r;b[1][2]=b[2][1]=k+y;b[1][3]=b[3][1]=v+f;b[2][2]=-j+n-r;b[2][3]=b[3][2]=q+m;b[3][3]=-j-n+r;j=javajs.api.Interface.getInterface("JU.Eigen").setM(b).getEigenvectorsFloatTransposed()[3];b=JU.Quat.newP4(JU.P4.new4(j[1],j[2],j[3],j[0]));d[1]=JU.Measure.getRmsd(a,b);return b},"~A,~A");b.getTransformMatrix4=c(b,"getTransformMatrix4",function(a,d,b,c){a=JU.Measure.getCenterAndPoints(a);var e=JU.Measure.getCenterAndPoints(d);d=M(2,0);var g=JU.Measure.calculateQuaternionRotation(z(-1,
[a,e]),d).getMatrix();null==c?g.rotate(a[0]):c.setT(a[0]);c=JU.V3.newVsub(e[0],a[0]);b.setMV(g,c);return d[1]},"JU.Lst,JU.Lst,JU.M4,JU.P3");b.getCenterAndPoints=c(b,"getCenterAndPoints",function(a){var d=a.size(),b=Array(d+1);b[0]=new JU.P3;if(0<d){for(var c=0;c<d;c++)b[0].add(b[c+1]=a.get(c));b[0].scale(1/d)}return b},"JU.Lst");b.getRmsd=c(b,"getRmsd",function(a,d){for(var b=0,c=a[0],e=a[1],g=c[0],j=e[0],k=c.length-1,f=new JU.P3,y=k+1;1<=--y;)f.sub2(c[y],g),d.transform2(f,f).add(j),b+=f.distanceSquared(e[y]);
return Math.sqrt(b/k)},"~A,JU.Quat");b.getBestLineThroughPoints=c(b,"getBestLineThroughPoints",function(a,d){0>=d&&(d=a.length);if(2>=d)return a;var b=new JU.P3,c=new JU.V3,e=new JU.V3;JU.Measure.calcBestAxisThroughPoints(a,d,b,c,e,8);return JU.Measure.getProjectedLineSegment(a,d,b,c,e)},"~A,~N");b.getProjectedLineSegment=c(b,"getProjectedLineSegment",function(a,d,b,c,e){null==e&&(e=new JU.V3);for(var g=d=null,j,k=3.4028235E38,f=-3.4028235E38,y=0;y<a.length;y++){JU.Measure.projectOntoAxis(j=JU.P3.newP(a[y]),
b,c,e);var n=c.dot(e);n<k&&(k=n,d=j);n>f&&(f=n,g=j)}return z(-1,[d,g])},"~A,~N,JU.P3,JU.V3,JU.V3");b.isInTriangle=c(b,"isInTriangle",function(a,d,b,c,e,g,j){e.sub2(c,d);g.sub2(b,d);j.sub2(a,d);a=e.dot(e);d=e.dot(g);e=e.dot(j);b=g.dot(g);g=g.dot(j);j=1/(a*b-d*d);b=(b*e-d*g)*j;g=(a*g-d*e)*j;return 0<=b&&0<=g&&1>=b+g},"JU.P3,JU.P3,JU.P3,JU.P3,JU.V3,JU.V3,JU.V3");b.calcBestPlaneThroughPoints=c(b,"calcBestPlaneThroughPoints",function(a,d,b){0>=d&&(d=a.length);if(3==d)return JU.Measure.getPlaneThroughPoints(a[0],
a[1],a[2],null,null,b),0;var c=b,e=new JU.P4,g=JU.Measure.calcPlaneForMode(a,d,b,"z");if(1E-6>g)return g;var j=JU.Measure.calcPlaneForMode(a,d,e,"y");j<g&&(g=j,c=e,e=b);1E-6<=g&&(j=JU.Measure.calcPlaneForMode(a,d,e,"x"),j<g&&(g=j,c=e));c!==b&&(b.setT(c),b.w=c.w);return g},"~A,~N,JU.P4");b.calcPlaneForMode=c(b,"calcPlaneForMode",function(a,d,b,c){for(var e=S(d,3,0),g=S(3,d,0),j=S(3,d,0),k=S(3,3,0),f=S(d,0),y=d;0<=--y;){var n=a[y];e[y][0]=g[0][y]="x"==c?n.z:n.x;e[y][1]=g[1][y]="y"==c?n.z:n.y;e[y][2]=
g[2][y]=1;f[y]=-("y"==c?n.y:"x"==c?n.x:n.z)}for(var q=new JU.M3,y=3;0<=--y;)for(n=3;0<=--n;){for(var v=0,m=d;0<=--m;)v+=g[y][m]*e[m][n];q.set33(y,n,v)}q.invert();for(y=3;0<=--y;)for(n=3;0<=--n;)k[y][n]=q.get33(y,n);for(y=3;0<=--y;)for(m=d;0<=--m;){v=0;for(n=3;0<=--n;)v+=k[y][n]*g[n][m];j[y][m]=v}switch(c.charCodeAt(0)){case 120:b.x=1;break;case 121:b.y=1;break;case 122:b.z=1}y=1;for(n=3;0<=--n;){e=0;for(m=d;0<=--m;)e+=j[n][m]*f[m];switch(n){case 0:y+=e*e;"x"==c?b.z=e:b.x=e;break;case 1:y+=e*e;"y"==
c?b.z=e:b.y=e;break;case 2:b.w=e}}c=Math.sqrt(y);b.scale4((0<1/b.w?1:-1)/c);for(y=c=0;y<d;y++)v=JU.Measure.distanceToPlane(b,a[y]),c+=v*v;return Math.sqrt(c/d)},"~A,~N,JU.P4,~S");b.rndPt=c(b,"rndPt",function(){return JU.P3.new3(20*Math.random(),20*Math.random(),20*Math.random())});b.testRnd=c(b,"testRnd",function(){var a=JU.P4.new4(20*Math.random(),20*Math.random(),20*Math.random(),20*Math.random());a.scale4(1/a.length());System.out.println("\n==========\n ");System.out.println("plane is "+a);for(var d=
new JU.P3,b=new JU.V3,c=Array(4),e=0;e<c.length;e++){c[e]=new JU.P3;var g=JU.Measure.rndPt();JU.Measure.getPlaneProjection(g,a,d,b);c[e].setT(d);g=0.1*Math.random();c[e].scaleAdd2(g,b,d);System.out.println(c[e]+" d="+g)}a=new JU.P4;c=JU.Measure.calcBestPlaneThroughPoints(c,-1,a);System.out.println("found "+a+" rmsd = "+c)});b.test=c(b,"test",function(){for(var a=0;10>a;a++)JU.Measure.testRnd();System.exit(0)});b.getPointsOnPlane=c(b,"getPointsOnPlane",function(a,d){for(var b=new JU.Lst,c=a.length;0<=
--c;)0.001>Math.abs(JU.Measure.distanceToPlane(d,a[c]))&&b.addLast(a[c]);return b},"~A,JU.P4");b.getLatticePoints=c(b,"getLatticePoints",function(a,d,b,c){a.addLast(new JU.P3);d=0==d?1:Math.abs(d);b=0==b?1:Math.abs(b);c=0==c?1:Math.abs(c);for(var e=a.size(),g=-d;g<=d;g++)for(var j=-b;j<=b;j++)for(var k=-c;k<=c;k++)for(var f=0;f<e;f++){var y=JU.P3.new3(g,j,k);y.add(a.get(f));a.addLast(y)}for(f=e;0<=--f;)a.removeItemAt(0);return a},"JU.Lst,~N,~N,~N");b.computeHelicalAxis=c(b,"computeHelicalAxis",function(a,
d,b){var c=new JU.V3;c.sub2(d,a);var e=b.getTheta(),g=b.getNormal(),j=c.dot(g);1E-4>Math.abs(j)&&(j=0);var k=new JU.V3;k.cross(c,g);0!=k.dot(k)&&k.normalize();var f=new JU.V3,y=JU.V3.newV(g);0==j&&(j=1.4E-45);y.scale(j);f.sub2(y,c);f.scale(0.5);k.scale(0==e?0:f.length()/Math.tan(3.141592653589793*(e/2/180)));c=JU.V3.newV(k);0!=e&&c.add(f);f=JU.P3.newP(a);f.sub(c);1.4E-45!=j&&g.scale(j);k=JU.P3.newP(f);k.add(g);e=JU.Measure.computeTorsion(a,f,k,d,!0);if(Float.isNaN(e)||1E-4>c.length())e=b.getThetaDirectedV(g);
a=Math.abs(0==e?0:360/e);j=Math.abs(1.4E-45==j?0:g.length()*(0==e?1:360/e));return z(-1,[f,g,c,JU.P3.new3(e,j,a),k])},"JU.P3,JU.P3,JU.Quat");b.axisY=JU.V3.new3(0,1,0)});m("JU");x(null,"JU.MeshSurface","JU.AU $.P3 J.api.Interface JU.BoxInfo $.C $.GData $.Geodesic".split(" "),function(){var b=s(function(){this.meshType=this.oabc=this.slicer=this.vwr=null;this.vc=0;this.surfaceAtoms=this.vertexSource=this.vvs=this.vs=null;this.pc=0;this.pis=null;this.haveQuads=this.isDrawPolygon=this.colorsExplicit=
!1;this.colixBack=this.colix=0;this.isColorSolid=!0;this.normalsTemp=this.normals=this.vcs=this.pcs=this.altVertices=this.offset=null;this.normixCount=this.normalCount=0;this.vertexSets=this.surfaceSet=this.mat4=this.bsPolygons=null;this.nSets=0;this.dataOnly=!1;this.vertexCount0=this.polygonCount0=this.iC=this.iB=this.iA=this.lastColix=this.lastColor=0;this.bsSlabGhost=this.bsSlabDisplay=null;this.slabColix=this.slabMeshType=0;this.slabOptions=this.bsDisplay=null;this.mergePolygonCount0=this.mergeVertexCount0=
0;this.isMerged=!1;r(this,arguments)},JU,"MeshSurface",null);c(b,"getMeshSlicer",function(){return null==this.slicer?this.slicer=J.api.Interface.getInterface("JU.MeshSlicer",this.vwr,"script").set(this):this.slicer});b.newMesh=c(b,"newMesh",function(a,d,b,c,e,g){var j=new JU.MeshSurface;j.pis=c;a?j.altVertices=d:j.vs=d;j.vc=0==b?d.length:b;j.normals=e;j.normalCount=0==g&&null!=e?e.length:g;return j},"~B,~A,~N,~A,~A,~N");c(b,"getVertices",function(){return null==this.altVertices?this.vs:this.altVertices});
c(b,"getFaces",function(){return this.pis});c(b,"setColix",function(a){this.colix=a},"~N");c(b,"setColixBack",function(a){this.colixBack=a},"~N");c(b,"addV",function(a,d){0==this.vc?this.vs=Array(25):this.vc==this.vs.length&&(this.vs=JU.AU.doubleLength(this.vs));this.vs[this.vc]=d?JU.P3.newP(a):a;return this.vc++},"JU.T3,~B");c(b,"addTriangle",function(a,d,b){this.addPolygon(D(-1,[a,d,b]),null)},"~N,~N,~N");c(b,"addQuad",function(a,d,b,c){this.haveQuads=!0;this.addPolygon(D(-1,[a,d,b,c]),null)},"~N,~N,~N,~N");
c(b,"setPolygonCount",function(a){this.pc=a;if(!(0>a)&&(null==this.pis||a>this.pis.length))this.pis=JU.AU.newInt2(a)},"~N");c(b,"addVCVal",function(a,d,b){0==this.vc?this.vvs=M(25,0):this.vc>=this.vvs.length&&(this.vvs=JU.AU.doubleLengthF(this.vvs));this.vvs[this.vc]=d;return this.addV(a,b)},"JU.T3,~N,~B");c(b,"addTriangleCheck",function(a,d,b,c,e,g){return null==this.vs||null!=this.vvs&&(Float.isNaN(this.vvs[a])||Float.isNaN(this.vvs[d])||Float.isNaN(this.vvs[b]))||Float.isNaN(this.vs[a].x)||Float.isNaN(this.vs[d].x)||
Float.isNaN(this.vs[b].x)?-1:this.addPolygonV3(a,d,b,c,e,g,null)},"~N,~N,~N,~N,~N,~N");c(b,"addPolygonV3",function(a,d,b,c,e,g,j){return this.dataOnly?this.addPolygon(D(-1,[a,d,b,c]),j):this.addPolygonC(D(-1,[a,d,b,c,e]),g,j,0>e)},"~N,~N,~N,~N,~N,~N,JU.BS");c(b,"addPolygonC",function(a,d,b,c){if(0!=d){if(null==this.pcs||0==this.pc)this.lastColor=0;c?this.colorsExplicit=!0:(null==this.pcs?this.pcs=$(25,0):this.pc>=this.pcs.length&&(this.pcs=JU.AU.doubleLengthShort(this.pcs)),this.pcs[this.pc]=c?2047:
d==this.lastColor?this.lastColix:this.lastColix=JU.C.getColix(this.lastColor=d))}return this.addPolygon(a,b)},"~A,~N,JU.BS,~B");c(b,"addPolygon",function(a,d){var b=this.pc;0==b?this.pis=JU.AU.newInt2(25):b==this.pis.length&&(this.pis=JU.AU.doubleLength(this.pis));null!=d&&d.set(b);this.pis[this.pc++]=a;return b},"~A,JU.BS");c(b,"invalidatePolygons",function(){for(var a=this.pc;--a>=this.mergePolygonCount0;)if((null==this.bsSlabDisplay||this.bsSlabDisplay.get(a))&&null==this.setABC(a))this.pis[a]=
null});c(b,"setABC",function(a){if(null!=this.bsSlabDisplay&&!this.bsSlabDisplay.get(a)&&(null==this.bsSlabGhost||!this.bsSlabGhost.get(a)))return null;a=this.pis[a];if(null==a||3>a.length)return null;this.iA=a[0];this.iB=a[1];this.iC=a[2];return null==this.vvs||!Float.isNaN(this.vvs[this.iA])&&!Float.isNaN(this.vvs[this.iB])&&!Float.isNaN(this.vvs[this.iC])?a:null},"~N");c(b,"setTranslucentVertices",function(){},"JU.BS");c(b,"getSlabColor",function(){return null==this.bsSlabGhost?null:JU.C.getHexCode(this.slabColix)});
c(b,"getSlabType",function(){return null!=this.bsSlabGhost&&1073742018==this.slabMeshType?"mesh":null});c(b,"resetSlab",function(){null!=this.slicer&&this.slicer.slabPolygons(JU.GData.getSlabObjectType(1073742333,null,!1,null),!1)});c(b,"slabPolygonsList",function(a,d){this.getMeshSlicer();for(var b=0;b<a.size()&&this.slicer.slabPolygons(a.get(b),d);b++);},"JU.Lst,~B");c(b,"slabBrillouin",function(){},"~A");c(b,"getResolution",function(){return 0});b.getSphereData=c(b,"getSphereData",function(a){JU.Geodesic.createGeodesic(a);
var d=JU.Geodesic.getVertexCount(a),b=JU.Geodesic.getFaceVertexes(a),c=w(b.length/3);a=JU.AU.newInt2(c);for(var e=0,g=0;e<c;e++)a[e]=D(-1,[b[g++],b[g++],b[g++]]);b=Array(d);for(e=0;e<d;e++)b[e]=JU.Geodesic.getVertexVector(e);return JU.MeshSurface.newMesh(!0,b,0,a,b,0)},"~N");c(b,"setBox",function(a,d){a.set(3.4028235E38,3.4028235E38,3.4028235E38);d.set(-3.4028235E38,-3.4028235E38,-3.4028235E38);for(var b=0;b<this.vc;b++){var c=this.vs[b];Float.isNaN(c.x)||JU.BoxInfo.addPoint(c,a,d,0)}},"JU.P3,JU.P3");
c(b,"setBoundingBox",function(){},"~A");b.getSphericalInterpolationFraction=c(b,"getSphericalInterpolationFraction",function(a,d,b,c){d=Math.abs(a+d)/c;b=Math.abs(a+b)/c;a/=c;c=d*d;var e=c-b*b+1;return(e+(d<b?1:-1)*Math.sqrt(e*e+4*(a*a-c)))/2},"~N,~N,~N,~N")});m("JU");x(["JU.Geodesic"],"JU.Normix",["JU.BS"],function(){var b=G(JU,"Normix",null);b.getNormixCount=c(b,"getNormixCount",function(){return 1<JU.Normix.normixCount?JU.Normix.normixCount:JU.Normix.normixCount=JU.Geodesic.getVertexCount(3)});
b.newVertexBitSet=c(b,"newVertexBitSet",function(){return JU.BS.newN(JU.Normix.getNormixCount())});b.getVertexVectors=c(b,"getVertexVectors",function(){null==JU.Normix.vertexVectors&&(JU.Normix.vertexVectors=JU.Geodesic.getVertexVectors());return JU.Normix.vertexVectors});b.setInverseNormixes=c(b,"setInverseNormixes",function(){if(null==JU.Normix.inverseNormixes){JU.Normix.getNormixCount();JU.Normix.getVertexVectors();JU.Normix.inverseNormixes=$(JU.Normix.normixCount,0);for(var a=new JU.BS,d=JU.Normix.normixCount;0<=
--d;){var b=JU.Normix.vertexVectors[d];JU.Normix.inverseNormixes[d]=JU.Normix.getNormix(-b.x,-b.y,-b.z,3,a)}}});b.getInverseNormix=c(b,"getInverseNormix",function(a){return JU.Normix.inverseNormixes[a]},"~N");b.getNeighborVertexArrays=c(b,"getNeighborVertexArrays",function(){null==JU.Normix.neighborVertexesArrays&&(JU.Normix.neighborVertexesArrays=JU.Geodesic.getNeighborVertexesArrays());return JU.Normix.neighborVertexesArrays});b.getNormixV=c(b,"getNormixV",function(a,d){return JU.Normix.getNormix(a.x,
a.y,a.z,3,d)},"JU.V3,JU.BS");b.get2SidedNormix=c(b,"get2SidedNormix",function(a,d){return~JU.Normix.getNormixV(a,d)},"JU.V3,JU.BS");b.getNormix=c(b,"getNormix",function(a,d,b,c,e){var g,j;0<=b?(g=0,j=b-1):(g=11,j=b- -1);e.clearAll();e.set(g);JU.Normix.getVertexVectors();JU.Normix.getNeighborVertexArrays();j=a*a+d*d+j*j;for(var f=0;f<=c;++f)for(var l=JU.Normix.neighborVertexesArrays[f],y=6*g,n=y+(12>g?5:6);--n>=y;){var q=l[n];if(!e.get(q)){e.set(q);var v=JU.Normix.vertexVectors[q],m;m=v.x-a;var r=
m*m;r>=j||(m=v.y-d,r+=m*m,r>=j||(m=v.z-b,r+=m*m,r>=j||(g=q,j=r)))}}return g},"~N,~N,~N,~N,JU.BS");b.normixCount=0;b.vertexVectors=null;b.inverseNormixes=null;b.neighborVertexesArrays=null});m("JU");x(null,"JU.Parser",["JU.PT"],function(){var b=G(JU,"Parser",null);b.parseStringInfestedFloatArray=c(b,"parseStringInfestedFloatArray",function(a,d,b){return JU.Parser.parseFloatArrayBsData(JU.PT.getTokens(a),d,b)},"~S,JU.BS,~A");b.parseStringInfestedIntArray=c(b,"parseStringInfestedIntArray",function(a,
d){for(var b=M(d.length,0),c=JU.Parser.parseStringInfestedFloatArray(a,null,b),e=d.length;0<=--e;)d[e]=F(b[e]);return c},"~S,~A");b.parseFloatArrayBsData=c(b,"parseFloatArrayBsData",function(a,b,c){for(var p=c.length,e=a.length,g=0,j=0,f=null!=b,l=f?b.nextSetBit(0):0;0<=l&&l<p&&g<e;l=f?b.nextSetBit(l+1):l+1){for(var y;Float.isNaN(y=JU.PT.parseFloat(a[g++]))&&g<e;);Float.isNaN(y)||(c[j=l]=y);if(g==e)break}return j+1},"~A,JU.BS,~A");b.parseFloatArrayFromMatchAndField=c(b,"parseFloatArrayFromMatchAndField",
function(a,b,c,p,e,g,j,f,l){var y,n=-1,q=null!=e,m=JU.Parser.markLines(a,0<=a.indexOf("\n")?"\n":";");l=1>=l||l>=m.length?0:l-1;var r=0==l?0:m[l-1],s=m.length;null==f&&(f=M(s-l,0));for(var u=f.length,w=0>=j?Math.max(g,c):Math.max(g+j,c+p)-1,x=null!=b;l<s;l++){var z=a.substring(r,m[l]).trim(),r=m[l],A=0>=j?JU.PT.getTokens(z):null;if(0>=j){if(A.length<w||Float.isNaN(y=JU.PT.parseFloat(A[g-1])))continue}else if(z.length<w||Float.isNaN(y=JU.PT.parseFloat(z.substring(g-1,g+j-1))))continue;if(q){z=JU.PT.parseInt(null==
A?z.substring(c-1,c+p-1):A[c-1]);if(-2147483648==z||0>z||z>=u||0>(z=e[z]))continue;x&&b.set(z)}else{x?n=b.nextSetBit(n+1):n++;if(0>n||n>=u)break;z=n}f[z]=y}return f},"~S,JU.BS,~N,~N,~A,~N,~N,~A,~N");b.fixDataString=c(b,"fixDataString",function(a){a=a.$replace(";",0>a.indexOf("\n")?"\n":" ");a=JU.PT.trim(a,"\n \t");a=JU.PT.rep(a,"\n ","\n");return a=JU.PT.rep(a,"\n\n","\n")},"~S");b.markLines=c(b,"markLines",function(a,b){for(var c=0,p=a.length;0<=--p;)a.charAt(p)==b&&c++;for(var p=D(c+1,0),e=c=0;0<=
(e=a.indexOf(b,e));)p[c++]=++e;p[c]=a.length;return p},"~S,~S")});m("JU");x(["JU.P3"],"JU.Point3fi",null,function(){var b=s(function(){this.mi=-1;this.sZ=this.sY=this.sX=this.i=0;this.sD=-1;r(this,arguments)},JU,"Point3fi",JU.P3,Cloneable);b.newPF=c(b,"newPF",function(a,b){var c=new JU.Point3fi;c.setT(a);c.i=b;return c},"JU.T3,~N");b.new4=c(b,"new4",function(a,b,c,p){var e=new JU.Point3fi;e.set(a,b,c);e.i=p;return e},"~N,~N,~N,~N");c(b,"copy",function(){try{return this.clone()}catch(a){if(E(a,"CloneNotSupportedException"))return null;
throw a;}});c(b,"setPF",function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.i=a.i},"JU.Point3fi")});m("JU");var pb=s(function(){this.height=this.width=this.y=this.x=0;r(this,arguments)},JU,"Rectangle",null);c(pb,"contains",function(b,a){return b>=this.x&&a>=this.y&&b-this.x<this.width&&a-this.y<this.height},"~N,~N");m("JU");x(null,"JU.Rgb16",["JU.SB"],function(){var b=s(function(){this.b=this.g=this.r=0;r(this,arguments)},JU,"Rgb16",null);b.newI=c(b,"newI",function(a){var b=new JU.Rgb16;b.setInt(a);
return b},"~N");c(b,"setInt",function(a){this.r=a>>8&65280|128;this.g=a&65280|128;this.b=a<<8&65280|128},"~N");c(b,"setRgb",function(a){this.r=a.r;this.g=a.g;this.b=a.b},"JU.Rgb16");c(b,"diffDiv",function(a,b,c){this.r=w((a.r-b.r)/c);this.g=w((a.g-b.g)/c);this.b=w((a.b-b.b)/c)},"JU.Rgb16,JU.Rgb16,~N");c(b,"setAndIncrement",function(a,b){this.r=a.r;a.r+=b.r;this.g=a.g;a.g+=b.g;this.b=a.b;a.b+=b.b},"JU.Rgb16,JU.Rgb16");c(b,"getArgb",function(){return 4278190080|this.r<<8&16711680|this.g&65280|this.b>>
8});f(b,"toString",function(){return(new JU.SB).append("Rgb16(").appendI(this.r).appendC(",").appendI(this.g).appendC(",").appendI(this.b).append(" -> ").appendI(this.r>>8&255).appendC(",").appendI(this.g>>8&255).appendC(",").appendI(this.b>>8&255).appendC(")").toString()})});m("JU");x(["JU.AU","$.V3"],"JU.Shader",["JU.CU","JU.C"],function(){var b=s(function(){this.zLight=this.yLight=this.xLight=0;this.lightSource=null;this.specularOn=!0;this.usePhongExponent=!1;this.ambientPercent=45;this.diffusePercent=
84;this.specularExponent=6;this.specularPercent=22;this.specularPower=40;this.phongExponent=64;this.specularFactor=this.intenseFraction=this.diffuseFactor=this.ambientFraction=0;this.ashadesGreyscale=this.ashades=null;this.celOn=!1;this.celPower=10;this.celZ=this.celRGB=0;this.useLight=!1;this.sphereShadeIndexes=null;this.seed=305419897;this.ellipsoidShades=this.sphereShapeCache=null;this.nIn=this.nOut=0;r(this,arguments)},JU,"Shader",null);N(b,function(){this.lightSource=new JU.V3;this.ambientFraction=
this.ambientPercent/100;this.diffuseFactor=this.diffusePercent/100;this.intenseFraction=this.specularPower/100;this.specularFactor=this.specularPercent/100;this.ashades=JU.AU.newInt2(128);this.sphereShadeIndexes=O(65536,0);this.sphereShapeCache=JU.AU.newInt2(128)});u(b,function(){this.setLightSource(-1,-1,2.5)});c(b,"setLightSource",function(a,b,c){this.lightSource.set(a,b,c);this.lightSource.normalize();this.xLight=this.lightSource.x;this.yLight=this.lightSource.y;this.zLight=this.lightSource.z},
"~N,~N,~N");c(b,"setCel",function(a,b,c){a=a&&0!=b;c=JU.C.getArgb(JU.C.getBgContrast(c));c=4278190080==c?4278453252:-1==c?-2:c+1;this.celOn==a&&this.celRGB==c&&this.celPower==b||(this.celOn=a,this.celPower=b,this.useLight=!this.celOn||0<b,this.celZ=1-Math.pow(2,-Math.abs(b)/10),this.celRGB=c,this.flushCaches())},"~B,~N,~N");c(b,"flushCaches",function(){this.checkShades(JU.C.colixMax);for(var a=JU.C.colixMax;0<=--a;)this.ashades[a]=null;this.calcSphereShading();for(a=128;0<=--a;)this.sphereShapeCache[a]=
null;this.ellipsoidShades=null});c(b,"setLastColix",function(a,b){JU.C.allocateColix(a,!0);this.checkShades(2047);b&&JU.C.setLastGrey(a);this.ashades[2047]=this.getShades2(a,!1)},"~N,~B");c(b,"getShades",function(a){this.checkShades(JU.C.colixMax);a&=-30721;var b=this.ashades[a];null==b&&(b=this.ashades[a]=this.getShades2(JU.C.argbs[a],!1));return b},"~N");c(b,"getShadesG",function(a){this.checkShades(JU.C.colixMax);a&=-30721;null==this.ashadesGreyscale&&(this.ashadesGreyscale=JU.AU.newInt2(this.ashades.length));
var b=this.ashadesGreyscale[a];null==b&&(b=this.ashadesGreyscale[a]=this.getShades2(JU.C.argbs[a],!0));return b},"~N");c(b,"checkShades",function(a){null!=this.ashades&&this.ashades.length>=a||(2047==a&&a++,this.ashades=JU.AU.arrayCopyII(this.ashades,a),null!=this.ashadesGreyscale&&(this.ashadesGreyscale=JU.AU.arrayCopyII(this.ashadesGreyscale,a)))},"~N");c(b,"getShades2",function(a,b){var c=D(64,0);if(0==a)return c;for(var p=a>>16&255,e=a>>8&255,g=a&255,j=0,f=0,l=0,y=this.ambientFraction;;)if(j=
p*y+0.5,f=e*y+0.5,l=g*y+0.5,0<y&&4>j&&4>f&&4>l)p++,e++,g++,0.1>y&&(y+=0.1),a=JU.CU.rgb(w(Math.floor(p)),w(Math.floor(e)),w(Math.floor(g)));else break;var n=0,y=(1-y)/52,p=p*y,e=e*y,g=g*y;if(this.celOn){y=JU.CU.rgb(w(Math.floor(j)),w(Math.floor(f)),w(Math.floor(l)));if(0<=this.celPower)for(;32>n;++n)c[n]=y;f+=32*e;l+=32*g;for(y=JU.CU.rgb(w(Math.floor(j+32*p)),w(Math.floor(f)),w(Math.floor(l)));64>n;n++)c[n]=y;c[0]=c[1]=this.celRGB}else{for(;52>n;++n)c[n]=JU.CU.rgb(w(Math.floor(j)),w(Math.floor(f)),
w(Math.floor(l))),j+=p,f+=e,l+=g;c[n++]=a;y=this.intenseFraction/(64-n);p=(255.5-j)*y;e=(255.5-f)*y;for(g=(255.5-l)*y;64>n;n++)j+=p,f+=e,l+=g,c[n]=JU.CU.rgb(w(Math.floor(j)),w(Math.floor(f)),w(Math.floor(l)))}if(b)for(;0<=--n;)c[n]=JU.CU.toFFGGGfromRGB(c[n]);return c},"~N,~B");c(b,"getShadeIndex",function(a,b,c){var p=Math.sqrt(a*a+b*b+c*c);return Math.round(63*this.getShadeF(a/p,b/p,c/p))},"~N,~N,~N");c(b,"getShadeB",function(a,b,c){return Math.round(63*this.getShadeF(a,b,c))},"~N,~N,~N");c(b,"getShadeFp8",
function(a,b,c){var p=Math.sqrt(a*a+b*b+c*c);return w(Math.floor(16128*this.getShadeF(a/p,b/p,c/p)))},"~N,~N,~N");c(b,"getShadeF",function(a,b,c){b=this.useLight?a*this.xLight+b*this.yLight+c*this.zLight:c;if(0>=b)return 0;a=b*this.diffuseFactor;if(this.specularOn&&(b=2*b*c-this.zLight,0<b)){if(this.usePhongExponent)b=Math.pow(b,this.phongExponent);else for(var p=this.specularExponent;0<=--p&&1E-4<b;)b*=b;a+=b*this.specularFactor}return this.celOn&&c<this.celZ?0:1<a?1:a},"~N,~N,~N");c(b,"getShadeN",
function(a,b,c,p){b=w(Math.floor(16128*this.getShadeF(a/p,b/p,c/p)));a=b>>8;if(!this.useLight)return a;(b&255)>this.nextRandom8Bit()&&++a;b=this.seed&65535;21845>b&&0<a?--a:43690<b&&63>a&&++a;return a},"~N,~N,~N,~N");c(b,"calcSphereShading",function(){for(var a=-127.5,b=0;256>b;++a,++b)for(var c=-127.5,p=a*a,e=0;256>e;++c,++e){var g=0,j=16900-p-c*c;0<j&&(g=Math.sqrt(j),g=this.getShadeN(a,c,g,130));this.sphereShadeIndexes[(e<<8)+b]=g}});c(b,"nextRandom8Bit",function(){var a=this.seed;this.seed=a=(a<<
16)+(a<<1)+a&2147483647;return a>>23});c(b,"getEllipsoidShade",function(a,b,c,p,e){var g=e.m00*a+e.m01*b+e.m02*c+e.m03,j=e.m10*a+e.m11*b+e.m12*c+e.m13;a=e.m20*a+e.m21*b+e.m22*c+e.m23;p=Math.min(p/2,45)/Math.sqrt(g*g+j*j+a*a);g=F(-g*p);j=F(-j*p);p=F(a*p);if(a=-20>g||20<=g||-20>j||20<=j||0>p||40<=p){for(;0==g%2&&0==j%2&&0==p%2&&0<g+j+p;)g>>=1,j>>=1,p>>=1;a=-20>g||20<=g||-20>j||20<=j||0>p||40<=p}a?this.nOut++:this.nIn++;return a?this.getShadeIndex(g,j,p):this.ellipsoidShades[g+20][j+20][p]},"~N,~N,~N,~N,JU.M4");
c(b,"createEllipsoidShades",function(){this.ellipsoidShades=O(40,40,40,0);for(var a=0;40>a;a++)for(var b=0;40>b;b++)for(var c=0;40>c;c++)this.ellipsoidShades[a][b][c]=this.getShadeIndex(a-20,b-20,c)})});m("JU");x(["JV.Viewer"],"JU.SimpleUnitCell","JU.AU $.M4 $.P3 $.P4 $.PT $.V3 JU.Escape".split(" "),function(){var b=s(function(){this.unitCellParams=null;this.slop=0;this.matrixFtoCNoOffset=this.matrixCtoFNoOffset=this.matrixFractionalToCartesian=this.matrixCartesianToFractional=null;this.volume=0;
this.dimension=3;this.dimensionType=7;this.fractionalOrigin=null;this.c_=this.b_=this.a_=this.cB_=this.cA_=this.sinGamma=this.cosGamma=this.sinBeta=this.cosBeta=this.sinAlpha=this.cosAlpha=this.gamma=this.beta=this.alpha=this.c=this.b=this.a=this.nc=this.nb=this.na=0;r(this,arguments)},JU,"SimpleUnitCell",null);N(b,function(){this.slop=JV.Viewer.isHighPrecision?1E-12:1E-4});u(b,function(){this.fractionalOrigin=new JU.P3});c(b,"getPrecision",function(){return this.slop});c(b,"setPrecision",function(a){this.unitCellParams[26]=
this.slop=!Float.isNaN(a)?a:!Float.isNaN(this.unitCellParams[26])?this.unitCellParams[26]:JV.Viewer.isHighPrecision?1E-12:1E-4},"~N");c(b,"isSupercell",function(){return 1<this.na||1<this.nb||1<this.nc});b.isValid=c(b,"isValid",function(a){return null!=a&&(0<a[0]||14<a.length&&!Float.isNaN(a[14]))},"~A");b.newA=c(b,"newA",function(a){var b=new JU.SimpleUnitCell;b.init(a);return b},"~A");b.getDimensionFromParams=c(b,"getDimensionFromParams",function(a){return 0>=a[0]?3:0>a[1]?1:0>a[2]?2:3},"~A");c(b,
"init",function(a){null==a&&(a=M(-1,[1,1,1,90,90,90]));if(JU.SimpleUnitCell.isValid(a)){this.unitCellParams=JU.SimpleUnitCell.newParams(a,NaN);var b=!1;this.dimension=JU.SimpleUnitCell.getDimensionFromParams(a);switch(this.dimension){case 1:this.dimensionType=1;break;case 2:this.dimensionType=3;break;case 3:this.dimensionType=7}this.a=a[0];this.b=a[1];this.c=a[2];this.alpha=a[3];this.beta=a[4];this.gamma=a[5];-1==this.gamma&&0<this.c&&(b=!0,this.gamma=120);26<a.length&&(Float.isNaN(a[26])?a[26]=this.slop:
this.slop=a[26]);var c=this.na=Math.max(1,24<a.length&&!Float.isNaN(a[22])?F(a[22]):1),p=this.nb=Math.max(1,24<a.length&&!Float.isNaN(a[23])?F(a[23]):1),e=this.nc=Math.max(1,24<a.length&&!Float.isNaN(a[24])?F(a[24]):1);if(25<a.length&&!Float.isNaN(a[25])){var g=a[25];0<g&&(c*=g,p*=g,e*=g)}else c=p=e=1;if(0>=this.a&&0>=this.c){var g=JU.SimpleUnitCell.newV(a,6),j=JU.SimpleUnitCell.newV(a,9),f=JU.SimpleUnitCell.newV(a,12);this.setABC(g,j,f);0>this.c&&(a=JU.AU.arrayCopyF(a,-1),0>this.b&&(j.set(0,0,1),
j.cross(j,g),0.001>j.length()&&j.set(0,1,0),j.normalize(),a[9]=j.x,a[10]=j.y,a[11]=j.z),0>this.c&&(f.cross(g,j),f.normalize(),a[12]=f.x,a[13]=f.y,a[14]=f.z))}this.a*=c;0>=this.b?this.b=this.c=1:0>=this.c?(this.c=1,this.b*=p):(this.b*=p,this.c*=e);this.setCellParams();if(21<a.length&&!Float.isNaN(a[21])){b=M(16,0);for(g=0;16>g;g++){switch(g%4){case 0:j=c;break;case 1:j=p;break;case 2:j=e;break;default:j=1}b[g]=a[6+g]*j}this.matrixCartesianToFractional=JU.M4.newA16(b);this.matrixCartesianToFractional.getTranslation(this.fractionalOrigin);
this.matrixFractionalToCartesian=JU.M4.newM4(this.matrixCartesianToFractional).invert();1==a[0]&&this.setParamsFromMatrix()}else 14<a.length&&!Float.isNaN(a[14])?(g=this.matrixFractionalToCartesian=new JU.M4,g.setColumn4(0,a[6]*c,a[7]*c,a[8]*c,0),g.setColumn4(1,a[9]*p,a[10]*p,a[11]*p,0),g.setColumn4(2,a[12]*e,a[13]*e,a[14]*e,0),17<a.length&&!Float.isNaN(a[17])?g.setColumn4(3,a[15],a[16],a[17],1):g.setColumn4(3,0,0,0,1)):(g=this.matrixFractionalToCartesian=new JU.M4,b?(g.setColumn4(0,-this.b*this.cosGamma,
-this.b*this.sinGamma,0,0),g.setColumn4(1,-this.b*this.cosGamma,this.b*this.sinGamma,0,0)):(g.setColumn4(0,this.a,0,0,0),g.setColumn4(1,this.b*this.cosGamma,this.b*this.sinGamma,0,0)),g.setColumn4(2,this.c*this.cosBeta,this.c*(this.cosAlpha-this.cosBeta*this.cosGamma)/this.sinGamma,this.volume/(this.a*this.b*this.sinGamma),0),g.setColumn4(3,0,0,0,1)),this.matrixCartesianToFractional=JU.M4.newM4(this.matrixFractionalToCartesian).invert();this.matrixCtoFNoOffset=this.matrixCartesianToFractional;this.matrixFtoCNoOffset=
this.matrixFractionalToCartesian}},"~A");b.newV=c(b,"newV",function(a,b){return JU.V3.new3(a[b++],a[b++],a[b])},"~A,~N");b.newParams=c(b,"newParams",function(a,b){for(var c=M(27,0),p=a.length,e=0;27>e;e++)c[e]=e<p?a[e]:NaN;27>p&&(c[26]=b);return c},"~A,~N");b.addVectors=c(b,"addVectors",function(a){for(var b=JU.SimpleUnitCell.newA(a).matrixFractionalToCartesian,c=0;9>c;c++)a[6+c]=b.getElement(c%3,w(c/3))},"~A");c(b,"setParamsFromMatrix",function(){var a=JU.V3.new3(1,0,0),b=JU.V3.new3(0,1,0),c=JU.V3.new3(0,
0,1);this.matrixFractionalToCartesian.rotate(a);this.matrixFractionalToCartesian.rotate(b);this.matrixFractionalToCartesian.rotate(c);this.setABC(a,b,c);this.setCellParams()});c(b,"setABC",function(a,b,c){JU.SimpleUnitCell.fillParams(a,b,c,this.unitCellParams);a=this.unitCellParams;this.a=a[0];this.b=a[1];this.c=a[2];this.alpha=a[3];this.beta=a[4];this.gamma=a[5]},"JU.V3,JU.V3,JU.V3");b.fillParams=c(b,"fillParams",function(a,b,c,p){null==a&&(a=JU.SimpleUnitCell.newV(p,6),b=JU.SimpleUnitCell.newV(p,
9),c=JU.SimpleUnitCell.newV(p,12));var e=a.length(),g=b.length(),j=c.length();0!=e&&(0==g?g=j=-1:0==j&&(j=-1),p[0]=e,p[1]=g,p[2]=j,p[3]=0>g||0>j?90:b.angle(c)/0.017453292519943295,p[4]=0>j?90:a.angle(c)/0.017453292519943295,p[5]=0>g?90:a.angle(b)/0.017453292519943295)},"JU.V3,JU.V3,JU.V3,~A");c(b,"setCellParams",function(){this.cosAlpha=Math.cos(0.017453292519943295*this.alpha);this.sinAlpha=Math.sin(0.017453292519943295*this.alpha);this.cosBeta=Math.cos(0.017453292519943295*this.beta);this.sinBeta=
Math.sin(0.017453292519943295*this.beta);this.cosGamma=Math.cos(0.017453292519943295*this.gamma);this.sinGamma=Math.sin(0.017453292519943295*this.gamma);var a=Math.sqrt(this.sinAlpha*this.sinAlpha+this.sinBeta*this.sinBeta+this.sinGamma*this.sinGamma+2*this.cosAlpha*this.cosBeta*this.cosGamma-2);this.volume=this.a*this.b*this.c*a;this.cA_=(this.cosAlpha-this.cosBeta*this.cosGamma)/this.sinGamma;this.cB_=a/this.sinGamma;this.a_=this.b*this.c*this.sinAlpha/this.volume;this.b_=this.a*this.c*this.sinBeta/
this.volume;this.c_=this.a*this.b*this.sinGamma/this.volume});c(b,"getFractionalOrigin",function(){return this.fractionalOrigin});c(b,"toSupercell",function(a){a.x/=this.na;a.y/=this.nb;a.z/=this.nc;return a},"JU.P3");c(b,"toCartesian",function(a,b){null!=this.matrixFractionalToCartesian&&(b?this.matrixFtoCNoOffset:this.matrixFractionalToCartesian).rotTrans(a)},"JU.T3,~B");c(b,"toFractionalM",function(a){null!=this.matrixCartesianToFractional&&(a.mul(this.matrixFractionalToCartesian),a.mul2(this.matrixCartesianToFractional,
a))},"JU.M4");c(b,"toFractional",function(a,b){null!=this.matrixCartesianToFractional&&(b?this.matrixCtoFNoOffset:this.matrixCartesianToFractional).rotTrans(a)},"JU.T3,~B");c(b,"isPolymer",function(){return 1==this.dimension});c(b,"isSlab",function(){return 2==this.dimension});c(b,"getUnitCellParams",function(){return this.unitCellParams});c(b,"getUnitCellAsArray",function(a){var b=this.matrixFractionalToCartesian;return a?M(-1,[b.m00,b.m10,b.m20,b.m01,b.m11,b.m21,b.m02,b.m12,b.m22]):M(-1,[this.a,
this.b,this.c,this.alpha,this.beta,this.gamma,b.m00,b.m10,b.m20,b.m01,b.m11,b.m21,b.m02,b.m12,b.m22,this.dimension,this.dimensionType,this.volume])},"~B");c(b,"getInfoStr",function(a){switch(a.toLowerCase()){case "a":a=0;break;case "b":a=1;break;case "c":a=2;break;case "alpha":a=3;break;case "beta":a=4;break;case "gamma":a=5;break;case "dim":a=6;break;case "dimtype":a=7;break;case "volume":a=10;break;default:a=-1}return 0>a?NaN:this.getInfo(a)},"~S");c(b,"getInfo",function(a){switch(a){case 0:return this.a;
case 1:return this.b;case 2:return this.c;case 3:return this.alpha;case 4:return this.beta;case 5:return this.gamma;case 6:return this.dimension;case 7:return this.dimensionType;case 8:return JU.SimpleUnitCell.isHexagonal(this.unitCellParams)?1:0;case 9:return JU.SimpleUnitCell.isRhombohedral(this.unitCellParams)?1:0;case 10:return this.volume}return NaN},"~N");b.getReciprocal=c(b,"getReciprocal",function(a,b,c){var p=4==a.length?1:0,e=Array(4);e[0]=1==p?JU.P3.newP(a[0]):new JU.P3;0==c&&(c=6.283185307179586);
for(var g=0;3>g;g++){var j=e[g+1]=new JU.P3;j.cross(a[(g+1)%3+p],a[(g+2)%3+p]);var f=a[g+p].dot(j);-1==c&&(c=Math.sqrt(f));j.scale(c/f)}if(null==b)return e;for(g=0;4>g;g++)b[g]=e[g];return b},"~A,~A,~N");b.setAbc=c(b,"setAbc",function(a,b,c){if(null!=a&&(null==b&&(b=M(6,0)),a=JU.PT.split(a.$replace(",","="),"="),12<=a.length))for(var p=0;6>p;p++)b[p]=JU.PT.parseFloat(a[2*p+1]);return null==c?null:JU.SimpleUnitCell.setAbcFromParams(b,c)},"~S,~A,~A");b.setAbcFromParams=c(b,"setAbcFromParams",function(a,
b){var c=JU.SimpleUnitCell.newA(a).getUnitCellAsArray(!0);if(null==b[0])for(var p=4;0<=--p;)b[p]=new JU.P3;b[1].set(c[0],c[1],c[2]);b[2].set(c[3],c[4],c[5]);b[3].set(c[6],c[7],c[8]);return b},"~A,~A");c(b,"unitizeDim",function(a,b){switch(a){case 3:b.z=JU.SimpleUnitCell.unitizeX(b.z,this.slop);case 2:b.y=JU.SimpleUnitCell.unitizeX(b.y,this.slop);case 1:b.x=JU.SimpleUnitCell.unitizeX(b.x,this.slop)}},"~N,JU.T3");b.unitizeDimRnd=c(b,"unitizeDimRnd",function(a,b,c){switch(a){case 3:b.z=JU.SimpleUnitCell.unitizeXRnd(b.z,
c);case 2:b.y=JU.SimpleUnitCell.unitizeXRnd(b.y,c);case 1:b.x=JU.SimpleUnitCell.unitizeXRnd(b.x,c)}},"~N,JU.T3,~N");b.unitizeX=c(b,"unitizeX",function(a,b){a-=Math.floor(a);if(a>1-b||a<b)a=0;return a},"~N,~N");b.unitizeXRnd=c(b,"unitizeXRnd",function(a,b){a-=Math.floor(a);if(a>1-b||a<b)a=0;return a},"~N,~N");c(b,"twelfthsOf",function(a){if(0==a)return 0;a=Math.abs(12*a);var b=Math.round(a);return 12>=b&&Math.abs(a-b)<12*this.slop?b:-1},"~N");c(b,"twelfthify",function(a){switch(this.dimension){case 3:a.z=
this.setTwelfths(a.z);case 2:a.y=this.setTwelfths(a.y);case 1:a.x=this.setTwelfths(a.x)}},"JU.P3");c(b,"setTwelfths",function(a){var b=this.twelfthsOf(a);return 0<=b?b/12*(0>a?-1:1):a},"~N");b.ijkToPoint3f=c(b,"ijkToPoint3f",function(a,b,c,p){var e=1E9<a?1E3:1E6<a?100:10,g=e*e;c-=0<=c?w(5*e/10):c;b.x=w(a/g)%e+c;b.y=w(a%g/e)+c;b.z=(0==p?a%e:(-500==c?w(p/e):p)%e)+c},"~N,JU.P3,~N,~N");b.ptToIJK=c(b,"ptToIJK",function(a,b){return 5>=a.x&&5>=a.y&&5>=a.z?JU.P4.new4(555,100*(a.x+4)+10*(a.y+4)+a.z+4,b,0):
JU.P4.new4(1500500500,1500500500+1E6*a.x+1E3*a.y+a.z,b,1500500+a.z)},"JU.T3,~N");b.escapeMultiplier=c(b,"escapeMultiplier",function(a){if(C(a,"JU.P4")){var b=1E3*w(Math.floor(a.x/1E3))+w(Math.floor(a.w/1E3))-1E3,c=1E3*w(Math.floor(a.y/1E3))+w(Math.floor(a.w))%1E3;return"{"+b+" "+c+" "+a.z+"}"}return JU.Escape.eP(a)},"JU.T3");b.setMinMaxLatticeParameters=c(b,"setMinMaxLatticeParameters",function(a,b,c,p){if(c.x<=c.y&&555<=c.y){var e=new JU.P3;JU.SimpleUnitCell.ijkToPoint3f(c.x,e,0,p);b.x=F(e.x);b.y=
F(e.y);b.z=F(e.z);JU.SimpleUnitCell.ijkToPoint3f(c.y,e,1,p);c.x=F(e.x);c.y=F(e.y);c.z=F(e.z)}switch(a){case 1:b.y=0,c.y=1;case 2:b.z=0,c.z=1}},"~N,JU.P3i,JU.P3i,~N");b.isHexagonal=c(b,"isHexagonal",function(a){return JU.SimpleUnitCell.approx0(a[0]-a[1])&&JU.SimpleUnitCell.approx0(a[3]-90)&&JU.SimpleUnitCell.approx0(a[4]-90)&&(JU.SimpleUnitCell.approx0(a[5]-120)||-1==a[5])},"~A");b.isRhombohedral=c(b,"isRhombohedral",function(a){return JU.SimpleUnitCell.approx0(a[0]-a[1])&&JU.SimpleUnitCell.approx0(a[1]-
a[2])&&!JU.SimpleUnitCell.approx0(a[3]-90)&&JU.SimpleUnitCell.approx0(a[3]-a[4])&&JU.SimpleUnitCell.approx0(a[4]-a[5])},"~A");b.approx0=c(b,"approx0",function(a){return 0.001>Math.abs(a)},"~N");b.getCellRange=c(b,"getCellRange",function(a,b){var c=C(a,"JU.T4")?F(a.w):0;JU.SimpleUnitCell.ijkToPoint3f(F(a.x),b[0],0,c);JU.SimpleUnitCell.ijkToPoint3f(F(a.y),b[1],1,c);0>a.z&&(b[0].scale(-1/a.z),b[1].scale(-1/a.z));return c},"JU.T3,~A");b.parseCalc=c(b,"parseCalc",function(a,b){return JU.SimpleUnitCell.parseCalcFunctions(a,
JU.SimpleUnitCell.functions,b)},"JV.Viewer,~S");b.parseCalcFunctions=c(b,"parseCalcFunctions",function(a,b,c){var p;c.startsWith("+")&&(c=c.substring(1));p=JU.PT.parseFloatStrict(c);if(!Float.isNaN(p))return p;c=c.toLowerCase();if(null!=b&&0<=c.indexOf("(")){p=JU.PT.split(c,"(");for(var e=p.length-1;0<=--e;){var g=p[e];if(0!=g.length){for(var j=null,f=b.length;0<=--f;)if(g.endsWith(b[f])){j=b[f];break}null==j&&(System.err.println("Unrecognized function "+c),p[e]+="?")}}c=JU.PT.join(p,"(",0)}if(0<=
c.indexOf("/")){p=JU.PT.split(c,"/");for(e=p.length-1;0<=--e;){g=p[e];c=b=!1;for(f=g.length;0<=--f;){j=g.charAt(f);if("."==j){b=!0;break}else if(")"==j){if(c)return NaN;p[e]+="*1.0";break}if("."==j){b=!0;break}if(!JU.PT.isDigit(j))break;c=!0}c&&!b&&(p[e]+=".0")}c=JU.PT.join(p,"/",0)}return a.evaluateExpressionAsVariable(c).asFloat()},"JV.Viewer,~A,~S");b.parseSimpleMath=c(b,"parseSimpleMath",function(a,b){b=JU.PT.rep(b.toLowerCase()," ","");if(0>b.indexOf("("))return b;var c=b.startsWith("!");c&&
(b=b.substring(1));0<=b.indexOf("pi")&&(b=JU.PT.rep(b,"pi","(180)"));b=JU.PT.rep(b,")(",")*(");for(var p=b.$replace('"'," ").$replace("'"," ").$plit(","),e=0;e<p.length;e++){var g=p[e].trim();if(!(0>g.indexOf("("))){for(var g=","+g,j=g.length,f=j;0<=--j;)switch(g.charAt(j).charCodeAt(0)){case 110:case 111:j--;default:continue;case 93:case 91:case 44:case 97:case 98:case 99:case 117:case 118:case 119:case 120:case 121:case 122:if(f>j+1){var l=g.substring(j+1,f),y=l.lastIndexOf("(");if(0<y){for(;0<
y;){for(;0<=--y;){var n=l.charAt(y);if("0">n)break;if("9">=n){l=l.substring(0,y+1)+"*"+l.substring(y+1);break}}y=l.lastIndexOf("(",y)}l=JU.SimpleUnitCell.parseCalc(a,l);y=1<j&&0<=l?"+":"";g=g.substring(0,j+1)+y+l+g.substring(f)}}f=j}p[e]=g.substring(1)}}return(c?"!":"")+JU.PT.join(p,",",0)},"JV.Viewer,~S");f(b,"toString",function(){return"["+this.a+" "+this.b+" "+this.c+" "+this.alpha+" "+this.beta+" "+this.gamma+"]"});b.functions=z(-1,"sqrt sin cos tan + - * /".split(" "))});m("JU");x(null,"JU.TempArray",
["JU.P3","$.P3i"],function(){var b=s(function(){this.freeEnum=this.lengthsFreeEnum=this.freeScreens=this.lengthsFreeScreens=this.freePoints=this.lengthsFreePoints=null;r(this,arguments)},JU,"TempArray",null);N(b,function(){this.lengthsFreePoints=D(6,0);this.freePoints=Array(6);this.lengthsFreeScreens=D(6,0);this.freeScreens=Array(6);this.lengthsFreeEnum=D(2,0);this.freeEnum=Array(2)});u(b,function(){});c(b,"clear",function(){this.clearTempPoints();this.clearTempScreens()});b.findBestFit=c(b,"findBestFit",
function(a,b){for(var c=-1,p=2147483647,e=b.length;0<=--e;){var g=b[e];g>=a&&g<p&&(p=g,c=e)}0<=c&&(b[c]=0);return c},"~N,~A");b.findShorter=c(b,"findShorter",function(a,b){for(var c=b.length;0<=--c;)if(0==b[c])return b[c]=a,c;for(var p=0,e=b[0],c=b.length;0<--c;)b[c]<e&&(e=b[c],p=c);return e<a?(b[p]=a,p):-1},"~N,~A");c(b,"clearTempPoints",function(){for(var a=0;6>a;a++)this.lengthsFreePoints[a]=0,this.freePoints[a]=null});c(b,"allocTempPoints",function(a){var b;b=JU.TempArray.findBestFit(a,this.lengthsFreePoints);
if(0<b)b=this.freePoints[b];else for(b=Array(a);0<=--a;)b[a]=new JU.P3;return b},"~N");c(b,"freeTempPoints",function(a){for(var b=0;b<this.freePoints.length;b++)if(this.freePoints[b]===a){this.lengthsFreePoints[b]=a.length;return}b=JU.TempArray.findShorter(a.length,this.lengthsFreePoints);0<=b&&(this.freePoints[b]=a)},"~A");c(b,"clearTempScreens",function(){for(var a=0;6>a;a++)this.lengthsFreeScreens[a]=0,this.freeScreens[a]=null});c(b,"allocTempScreens",function(a){var b;b=JU.TempArray.findBestFit(a,
this.lengthsFreeScreens);if(0<b)b=this.freeScreens[b];else for(b=Array(a);0<=--a;)b[a]=new JU.P3i;return b},"~N");c(b,"freeTempScreens",function(a){for(var b=0;b<this.freeScreens.length;b++)if(this.freeScreens[b]===a){this.lengthsFreeScreens[b]=a.length;return}b=JU.TempArray.findShorter(a.length,this.lengthsFreeScreens);0<=b&&(this.freeScreens[b]=a)},"~A");c(b,"allocTempEnum",function(a){var b=JU.TempArray.findBestFit(a,this.lengthsFreeEnum);return 0<b?this.freeEnum[b]:Array(a)},"~N");c(b,"freeTempEnum",
function(a){for(var b=0;b<this.freeEnum.length;b++)if(this.freeEnum[b]===a){this.lengthsFreeEnum[b]=a.length;return}b=JU.TempArray.findShorter(a.length,this.lengthsFreeEnum);0<=b&&(this.freeEnum[b]=a)},"~A")});m("JU");G(JU,"Txt",null);m("JU");x(["JU.V3","$.M3"],"JU.Vibration",["JU.P3","$.Quat","JU.BSUtil"],function(){var b=s(function(){this.modDim=-1;this.modScale=NaN;this.magMoment=0;this.isFractional=this.showTrace=!1;this.v0=null;this.tracePt=0;this.symmform=this.trace=null;this.spin=0;this.isFrom000=
!1;this.matInv=this.matTemp=null;r(this,arguments)},JU,"Vibration",JU.V3);N(b,function(){this.matTemp=new JU.M3;this.matInv=new JU.M3});c(b,"setCalcPoint",function(a,b,c){switch(this.modDim){case -2:case -3:break;default:a.scaleAdd2(Math.cos(6.283185307179586*b.x)*c,this,a)}return a},"JU.T3,JU.T3,~N,~N");c(b,"getInfo",function(a){a.put("vibVector",JU.V3.newV(this));a.put("vibType",-2==this.modDim?"spin":-1==this.modDim?"vib":"mod")},"java.util.Map");f(b,"clone",function(){var a=new JU.Vibration;a.setT(this);
a.modDim=this.modDim;a.magMoment=this.magMoment;a.v0=this.v0;return a});c(b,"setXYZ",function(a){this.setT(a)},"JU.T3");c(b,"setV0",function(){this.v0=JU.V3.newV(this)});c(b,"setType",function(a){this.modDim=a;return this},"~N");c(b,"isNonzero",function(){return 0!=this.x||0!=this.y||0!=this.z});c(b,"getOccupancy100",function(){return-2147483648},"~B");c(b,"startTrace",function(a){this.trace=Array(a);this.tracePt=a},"~N");c(b,"addTracePt",function(a,b){(null==this.trace||0==a||a!=this.trace.length)&&
this.startTrace(a);if(null!=b&&2<a){if(0>=--this.tracePt){for(var c=this.trace[this.trace.length-1],p=this.trace.length;1<=--p;)this.trace[p]=this.trace[p-1];this.trace[1]=c;this.tracePt=1}c=this.trace[this.tracePt];null==c&&(c=this.trace[this.tracePt]=new JU.P3);c.setT(b)}return this.trace},"~N,JU.Point3fi");c(b,"getApproxString100",function(){return Math.round(100*this.x)+","+Math.round(100*this.y)+","+Math.round(100*this.z)});c(b,"rotateSpin",function(a,b,c,p){JU.Vibration.rot(a,b,c,this);this.isFrom000&&
JU.Vibration.rot(a,b,c,p)},"JU.M3,JU.M3,JU.M3,JM.Atom");b.rot=c(b,"rot",function(a,b,c,p){null==a?c.rotate(p):(a.rotate(p),b.rotate(p))},"JU.M3,JU.M3,JU.M3,JU.T3");c(b,"rotateModelSpinVectors",function(a,b,c,p){if(0>b||b>=a.mc||null==a.vibrations)return-1;var e=a.vwr,g=a.am[b];g.isJmolDataFrame&&(b=g.dataSourceFrame);var j=a.getModelAuxiliaryInfo(b);if(null==c&&(c=j.get("spinFrameRotationMatrix"),null==c))return-1;var f=(g=Double.isNaN(c.getElement(0,0)))&&1==c.getElement(2,2),l=g||f?c.getElement(1,
1):0;g&&0!=l&&(c.setElement(1,1,0),this.rotateModelSpinVectors(a,b,c,!1),c.setElement(1,1,l));var y=j.get("spinFrameRotationMatrix"),n=j.get("spinRotationMatrixApplied");null==n&&null==y&&(y=JU.M3.newM3(null),j.put("spinFrameRotationMatrix",y));null==n&&(n=y);g&&(f?(c=JU.P3.new3(0,0,100),g=JU.P3.new3(0,0,200),e.tm.unTransformPoint(c,c),e.tm.unTransformPoint(g,g),c=JU.V3.newVsub(c,g)):c=JU.Quat.newM(n).getNormal(),c=JU.Quat.newVA(c,l).getMatrix());g=JU.BSUtil.newAndSetBit(b);a.includeAllRelatedFrames(g,
!0);l=JU.BSUtil.copy(g);g=e.getModelUndeletedAtomsBitSetBs(g);e=this.matTemp;p?(e.setM3(c),c.mul2(c,n),f=null):(f=this.matInv,f.setM3(n),f.invert());for(p=g.nextSetBit(0);0<=p&&!(p>=a.vibrations.length);p=g.nextSetBit(p+1))n=a.vibrations[p],null==n||!n.isFrom000&&0==n.magMoment||n.rotateSpin(f,c,e,a.at[p]);e=JU.Quat.newM(c).toAxisAngle4f();n=JU.M3.newM3(c);j.put("spinRotationMatrixApplied",n);c=-1;for(p=l.nextSetBit(0);0<=p;p=l.nextSetBit(p+1))g=a.am[p],null!=g.uvw0&&(c=p,n.rotate2(g.uvw0[0],g.uvw[0]),
n.rotate2(g.uvw0[1],g.uvw[1]),n.rotate2(g.uvw0[2],g.uvw[2]));j.put("spinRotationAxisAngleApplied",e);null!=a.unitCells[b]&&a.unitCells[b].setSpinAxisAngle(e);return c},"JM.ModelSet,~N,JU.M3,~B");b.find=c(b,"find",function(a,b,c){if(null!=c)for(var p=b.nextSetBit(0);0<=p;p=b.nextSetBit(p+1)){var e=a.getVibration(p,!1);if(null!=e&&0.1>e.distance(c))return a.at[p]}return null},"JM.ModelSet,JU.BS,JU.Vibration");c(b,"resetMoment",function(){if(0!=this.magMoment){var a=this.lengthSquared();0!=a&&this.scale(this.magMoment/
Math.sqrt(a))}})});m("JV");x(["J.api.EventManager","JU.Rectangle"],["JV.MotionPoint","$.ActionManager","$.Gesture"],"JU.AU $.PT J.api.Interface J.i18n.GT JS.SV $.ScriptEval J.thread.HoverWatcherThread JU.BSUtil $.Escape $.Logger $.Point3fi JV.MouseState $.Viewer JV.binding.Binding $.JmolBinding".split(" "),function(){var b=s(function(){this.vwr=null;this.isMultiTouch=this.haveMultiTouchInput=!1;this.predragBinding=this.rasmolBinding=this.dragBinding=this.pfaatBinding=this.jmolBinding=this.b=null;
this.LEFT_DRAGGED=0;this.dragged=this.pressed=this.clicked=this.moved=this.current=null;this.hoverable=!1;this.dragGesture=this.hoverWatcherThread=null;this.apm=1;this.pickingStyleSelect=this.pickingStyle=this.bondPickingMode=0;this.pickingStyleMeasure=5;this.rootPickingStyle=0;this.mouseDragFactor=this.gestureSwipeFactor=1;this.mouseWheelFactor=1.15;this.clickedCount=this.pressedCount=0;this.dragSelectedMode=this.labelMode=this.drawMode=!1;this.measuresEnabled=!0;this.hoverActive=this.haveSelection=
!1;this.mp=null;this.dragAtomIndex=-1;this.rubberbandSelectionMode=this.mkBondPressed=!1;this.rectRubber=null;this.isAltKeyReleased=!0;this.isMultiTouchServer=this.isMultiTouchClient=this.keyProcessing=!1;this.clickAction=this.dragAction=this.pressAction=0;this.measurementQueued=null;this.selectionWorking=this.zoomTrigger=!1;r(this,arguments)},JV,"ActionManager",null,J.api.EventManager);N(b,function(){this.rectRubber=new JU.Rectangle});c(b,"setViewer",function(a){this.vwr=a;this.current=new JV.MouseState("current");
this.moved=new JV.MouseState("moved");this.clicked=new JV.MouseState("clicked");this.pressed=new JV.MouseState("pressed");this.dragged=new JV.MouseState("dragged");JV.Viewer.isJS||this.createActions();this.setBinding(this.jmolBinding=new JV.binding.JmolBinding);this.LEFT_DRAGGED=JV.binding.Binding.getMouseAction(1,16,1);this.dragGesture=new JV.Gesture(20,a)},"JV.Viewer,~S");c(b,"isHoverable",function(){return this.hoverable});c(b,"checkHover",function(){if(this.zoomTrigger)this.zoomTrigger=!1,8==
this.vwr.currentCursor&&this.vwr.setCursor(0),this.vwr.setInMotion(!1);else if(!this.vwr.getInMotion(!0)&&!this.vwr.tm.spinOn&&!this.vwr.tm.navOn&&!this.vwr.checkObjectHovered(this.current.x,this.current.y)){var a=this.vwr.findNearestAtomIndex(this.current.x,this.current.y);if(!(0>a)){var b=2==this.apm&&this.bnd(JV.binding.Binding.getMouseAction(this.clickedCount,this.moved.modifiers,1),[10]);this.vwr.hoverOn(a,b)}}});c(b,"processMultitouchEvent",function(){},"~N,~N,~N,~N,JU.P3,~N");c(b,"bind",function(a,
b){var c=JV.ActionManager.getActionFromName(b),p=JV.binding.Binding.getMouseActionStr(a);0!=p&&(0<=c?this.b.bindAction(p,c):this.b.bindName(p,b))},"~S,~S");c(b,"clearBindings",function(){this.setBinding(this.jmolBinding=new JV.binding.JmolBinding);this.rasmolBinding=this.dragBinding=this.pfaatBinding=null});c(b,"unbindAction",function(a,b){if(null==a&&null==b)this.clearBindings();else{var c=JV.ActionManager.getActionFromName(b),p=JV.binding.Binding.getMouseActionStr(a);0<=c?this.b.unbindAction(p,
c):0!=p&&this.b.unbindName(p,b);null==b&&this.b.unbindUserAction(a)}},"~S,~S");b.newAction=c(b,"newAction",function(a,b,c){JV.ActionManager.actionInfo[a]=c;JV.ActionManager.actionNames[a]=b},"~N,~S,~S");c(b,"createActions",function(){null==JV.ActionManager.actionInfo[0]&&(JV.ActionManager.newAction(0,"_assignNew",J.i18n.GT.o(J.i18n.GT.$("assign/new atom or bond (requires {0})"),"set picking assignAtom_??/assignBond_?")),JV.ActionManager.newAction(1,"_center",J.i18n.GT.$("center")),JV.ActionManager.newAction(2,
"_clickFrank",J.i18n.GT.$("pop up recent context menu (click on Jmol frank)")),JV.ActionManager.newAction(4,"_deleteAtom",J.i18n.GT.o(J.i18n.GT.$("delete atom (requires {0})"),"set picking DELETE ATOM")),JV.ActionManager.newAction(5,"_deleteBond",J.i18n.GT.o(J.i18n.GT.$("delete bond (requires {0})"),"set picking DELETE BOND")),JV.ActionManager.newAction(6,"_depth",J.i18n.GT.o(J.i18n.GT.$("adjust depth (back plane; requires {0})"),"SLAB ON")),JV.ActionManager.newAction(7,"_dragAtom",J.i18n.GT.o(J.i18n.GT.$("move atom (requires {0})"),
"set picking DRAGATOM")),JV.ActionManager.newAction(8,"_dragDrawObject",J.i18n.GT.o(J.i18n.GT.$("move whole DRAW object (requires {0})"),"set picking DRAW")),JV.ActionManager.newAction(9,"_dragDrawPoint",J.i18n.GT.o(J.i18n.GT.$("move specific DRAW point (requires {0})"),"set picking DRAW")),JV.ActionManager.newAction(10,"_dragLabel",J.i18n.GT.o(J.i18n.GT.$("move label (requires {0})"),"set picking LABEL")),JV.ActionManager.newAction(11,"_dragMinimize",J.i18n.GT.o(J.i18n.GT.$("move atom and minimize molecule (requires {0})"),
"set picking DRAGMINIMIZE")),JV.ActionManager.newAction(12,"_dragMinimizeMolecule",J.i18n.GT.o(J.i18n.GT.$("move and minimize molecule (requires {0})"),"set picking DRAGMINIMIZEMOLECULE")),JV.ActionManager.newAction(13,"_dragSelected",J.i18n.GT.o(J.i18n.GT.$("move selected atoms (requires {0})"),"set DRAGSELECTED")),JV.ActionManager.newAction(14,"_dragZ",J.i18n.GT.o(J.i18n.GT.$("drag atoms in Z direction (requires {0})"),"set DRAGSELECTED")),JV.ActionManager.newAction(15,"_multiTouchSimulation",J.i18n.GT.$("simulate multi-touch using the mouse)")),
JV.ActionManager.newAction(16,"_navTranslate",J.i18n.GT.o(J.i18n.GT.$("translate navigation point (requires {0} and {1})"),z(-1,["set NAVIGATIONMODE","set picking NAVIGATE"]))),JV.ActionManager.newAction(17,"_pickAtom",J.i18n.GT.$("pick an atom")),JV.ActionManager.newAction(3,"_pickConnect",J.i18n.GT.o(J.i18n.GT.$("connect atoms (requires {0})"),"set picking CONNECT")),JV.ActionManager.newAction(18,"_pickIsosurface",J.i18n.GT.o(J.i18n.GT.$("pick an ISOSURFACE point (requires {0}"),"set DRAWPICKING")),
JV.ActionManager.newAction(19,"_pickLabel",J.i18n.GT.o(J.i18n.GT.$("pick a label to toggle it hidden/displayed (requires {0})"),"set picking LABEL")),JV.ActionManager.newAction(20,"_pickMeasure",J.i18n.GT.o(J.i18n.GT.$("pick an atom to include it in a measurement (after starting a measurement or after {0})"),"set picking DISTANCE/ANGLE/TORSION")),JV.ActionManager.newAction(21,"_pickNavigate",J.i18n.GT.o(J.i18n.GT.$("pick a point or atom to navigate to (requires {0})"),"set NAVIGATIONMODE")),JV.ActionManager.newAction(22,
"_pickPoint",J.i18n.GT.o(J.i18n.GT.$("pick a DRAW point (for measurements) (requires {0}"),"set DRAWPICKING")),JV.ActionManager.newAction(23,"_popupMenu",J.i18n.GT.$("pop up the full context menu")),JV.ActionManager.newAction(24,"_reset",J.i18n.GT.$("reset (when clicked off the model)")),JV.ActionManager.newAction(25,"_rotate",J.i18n.GT.$("rotate")),JV.ActionManager.newAction(26,"_rotateBranch",J.i18n.GT.o(J.i18n.GT.$("rotate branch around bond (requires {0})"),"set picking ROTATEBOND")),JV.ActionManager.newAction(27,
"_rotateSelected",J.i18n.GT.o(J.i18n.GT.$("rotate selected atoms (requires {0})"),"set DRAGSELECTED")),JV.ActionManager.newAction(28,"_rotateZ",J.i18n.GT.$("rotate Z")),JV.ActionManager.newAction(29,"_rotateZorZoom",J.i18n.GT.$("rotate Z (horizontal motion of mouse) or zoom (vertical motion of mouse)")),JV.ActionManager.newAction(30,"_select",J.i18n.GT.o(J.i18n.GT.$("select an atom (requires {0})"),"set pickingStyle EXTENDEDSELECT")),JV.ActionManager.newAction(31,"_selectAndDrag",J.i18n.GT.o(J.i18n.GT.$("select and drag atoms (requires {0})"),
"set DRAGSELECTED")),JV.ActionManager.newAction(32,"_selectAndNot",J.i18n.GT.o(J.i18n.GT.$("unselect this group of atoms (requires {0})"),"set pickingStyle DRAG/EXTENDEDSELECT")),JV.ActionManager.newAction(33,"_selectNone",J.i18n.GT.o(J.i18n.GT.$("select NONE (requires {0})"),"set pickingStyle EXTENDEDSELECT")),JV.ActionManager.newAction(34,"_selectOr",J.i18n.GT.o(J.i18n.GT.$("add this group of atoms to the set of selected atoms (requires {0})"),"set pickingStyle DRAG/EXTENDEDSELECT")),JV.ActionManager.newAction(35,
"_selectToggle",J.i18n.GT.o(J.i18n.GT.$("toggle selection (requires {0})"),"set pickingStyle DRAG/EXTENDEDSELECT/RASMOL")),JV.ActionManager.newAction(36,"_selectToggleOr",J.i18n.GT.o(J.i18n.GT.$("if all are selected, unselect all, otherwise add this group of atoms to the set of selected atoms (requires {0})"),"set pickingStyle DRAG")),JV.ActionManager.newAction(37,"_setMeasure",J.i18n.GT.$("pick an atom to initiate or conclude a measurement")),JV.ActionManager.newAction(38,"_slab",J.i18n.GT.o(J.i18n.GT.$("adjust slab (front plane; requires {0})"),
"SLAB ON")),JV.ActionManager.newAction(39,"_slabAndDepth",J.i18n.GT.o(J.i18n.GT.$("move slab/depth window (both planes; requires {0})"),"SLAB ON")),JV.ActionManager.newAction(40,"_slideZoom",J.i18n.GT.$("zoom (along right edge of window)")),JV.ActionManager.newAction(41,"_spinDrawObjectCCW",J.i18n.GT.o(J.i18n.GT.$("click on two points to spin around axis counterclockwise (requires {0})"),"set picking SPIN")),JV.ActionManager.newAction(42,"_spinDrawObjectCW",J.i18n.GT.o(J.i18n.GT.$("click on two points to spin around axis clockwise (requires {0})"),
"set picking SPIN")),JV.ActionManager.newAction(43,"_stopMotion",J.i18n.GT.o(J.i18n.GT.$("stop motion (requires {0})"),"set waitForMoveTo FALSE")),JV.ActionManager.newAction(44,"_swipe",J.i18n.GT.$("spin model (swipe and release button and stop motion simultaneously)")),JV.ActionManager.newAction(45,"_translate",J.i18n.GT.$("translate")),JV.ActionManager.newAction(46,"_wheelZoom",J.i18n.GT.$("zoom")))});b.getActionName=c(b,"getActionName",function(a){return a<JV.ActionManager.actionNames.length?JV.ActionManager.actionNames[a]:
null},"~N");b.getActionFromName=c(b,"getActionFromName",function(a){for(var b=0;b<JV.ActionManager.actionNames.length;b++)if(JV.ActionManager.actionNames[b].equalsIgnoreCase(a))return b;return-1},"~S");c(b,"getBindingInfo",function(a){return this.b.getBindingInfo(JV.ActionManager.actionInfo,JV.ActionManager.actionNames,a)},"~S");c(b,"setBinding",function(a){this.b=a},"JV.binding.Binding");c(b,"bnd",function(a,b){for(var c=b.length;0<=--c;)if(this.b.isBound(a,b[c]))return!0;return!1},"~N,~A");c(b,
"isDrawOrLabelAction",function(a){return this.drawMode&&this.bnd(a,[8,9])||this.labelMode&&this.bnd(a,[10])},"~N");c(b,"getBondPickingMode",function(){return this.bondPickingMode});b.getPickingModeName=c(b,"getPickingModeName",function(a){return 0>a||a>=JV.ActionManager.pickingModeNames.length?"off":JV.ActionManager.pickingModeNames[a]},"~N");b.getPickingMode=c(b,"getPickingMode",function(a){for(var b=JV.ActionManager.pickingModeNames.length;0<=--b;)if(a.equalsIgnoreCase(JV.ActionManager.pickingModeNames[b]))return 38==
b&&(b=6),b;return-1},"~S");b.getPickingStyleName=c(b,"getPickingStyleName",function(a){return 0>a||a>=JV.ActionManager.pickingStyleNames.length?"toggle":JV.ActionManager.pickingStyleNames[a]},"~N");b.getPickingStyleIndex=c(b,"getPickingStyleIndex",function(a){for(var b=JV.ActionManager.pickingStyleNames.length;0<=--b;)if(a.equalsIgnoreCase(JV.ActionManager.pickingStyleNames[b]))return b;return-1},"~S");c(b,"getAtomPickingMode",function(){return this.apm});c(b,"setPickingMode",function(a){var b=!1;
switch(a){case -1:b=!0;this.bondPickingMode=35;a=1;this.vwr.setStringProperty("pickingStyle","toggle");this.vwr.setBooleanProperty("bondPicking",!1);break;case 34:case 33:case 8:this.vwr.getModelkit(!1);case 35:this.vwr.setBooleanProperty("bondPicking",!0);this.bondPickingMode=a;this.resetMeasurement();return}b=(new Boolean(b|this.apm!=a)).valueOf();this.apm=a;b&&this.resetMeasurement()},"~N");c(b,"getPickingState",function(){var a=";set modelkitMode "+this.vwr.getBoolean(603983903)+";set picking "+
JV.ActionManager.getPickingModeName(this.apm);32==this.apm&&(a+="_"+this.vwr.getModelkitPropertySafely("atomtype"));a+=";";0!=this.bondPickingMode&&(a+="set picking "+JV.ActionManager.getPickingModeName(this.bondPickingMode));33==this.bondPickingMode&&(a+="_"+this.vwr.getModelkitPropertySafely("bondtype"));return a+";"});c(b,"getPickingStyle",function(){return this.pickingStyle});c(b,"setPickingStyle",function(a){this.pickingStyle=a;4<=a?(this.pickingStyleMeasure=a,this.resetMeasurement()):(3>a&&
(this.rootPickingStyle=a),this.pickingStyleSelect=a);this.rubberbandSelectionMode=!1;switch(this.pickingStyleSelect){case 2:this.b.name.equals("extendedSelect")||this.setBinding(null==this.pfaatBinding?this.pfaatBinding=JV.binding.Binding.newBinding(this.vwr,"Pfaat"):this.pfaatBinding);break;case 3:this.b.name.equals("drag")||this.setBinding(null==this.dragBinding?this.dragBinding=JV.binding.Binding.newBinding(this.vwr,"Drag"):this.dragBinding);this.rubberbandSelectionMode=!0;break;case 1:this.b.name.equals("selectOrToggle")||
this.setBinding(null==this.rasmolBinding?this.rasmolBinding=JV.binding.Binding.newBinding(this.vwr,"Rasmol"):this.rasmolBinding);break;default:this.b!==this.jmolBinding&&this.setBinding(this.jmolBinding)}this.b.name.equals("drag")||(this.predragBinding=this.b)},"~N");c(b,"setGestureSwipeFactor",function(a){this.gestureSwipeFactor=a},"~N");c(b,"setMouseDragFactor",function(a){this.mouseDragFactor=a},"~N");c(b,"setMouseWheelFactor",function(a){this.mouseWheelFactor=a},"~N");c(b,"setCurrent",function(a,
b,c,p){this.vwr.hoverOff();this.current.set(a,b,c,p)},"~N,~N,~N,~N");c(b,"getCurrentX",function(){return this.current.x});c(b,"getCurrentY",function(){return this.current.y});c(b,"setMouseMode",function(){this.drawMode=this.labelMode=!1;this.dragSelectedMode=this.vwr.getDragSelected();this.measuresEnabled=!this.dragSelectedMode;if(!this.dragSelectedMode)switch(this.apm){default:return;case 32:this.measuresEnabled=!this.vwr.getModelkit(!1).isPickAtomAssignCharge();return;case 4:this.drawMode=!0;this.measuresEnabled=
!1;break;case 2:this.labelMode=!0;this.measuresEnabled=!1;break;case 9:this.measuresEnabled=!1;break;case 19:case 22:case 20:case 21:this.measuresEnabled=!1;return}this.exitMeasurementMode(null)});c(b,"clearMouseInfo",function(){this.pressedCount=this.clickedCount=0;this.dragGesture.setAction(0,0);this.exitMeasurementMode(null)});c(b,"setDragAtomIndex",function(a){this.dragAtomIndex=a;this.setAtomsPicked(JU.BSUtil.newAndSetBit(a),"Label picked for atomIndex = "+a)},"~N");c(b,"isMTClient",function(){return this.isMultiTouchClient});
c(b,"isMTServer",function(){return this.isMultiTouchServer});c(b,"dispose",function(){this.clear()});c(b,"clear",function(){this.startHoverWatcher(!1);null!=this.predragBinding&&(this.b=this.predragBinding);this.vwr.setPickingStyle(null,this.rootPickingStyle);this.isAltKeyReleased=!0});c(b,"startHoverWatcher",function(a){if(!this.vwr.isPreviewOnly)try{a?null==this.hoverWatcherThread&&(this.current.time=-1,this.hoverWatcherThread=new J.thread.HoverWatcherThread(this,this.current,this.moved,this.vwr)):
null!=this.hoverWatcherThread&&(this.current.time=-1,this.hoverWatcherThread.interrupt(),this.hoverWatcherThread=null)}catch(b){if(!E(b,Exception))throw b;}},"~B");c(b,"setModeMouse",function(a){-1==a&&this.startHoverWatcher(!1)},"~N");f(b,"keyPressed",function(a,b){if(this.keyProcessing)return!1;this.keyProcessing=!0;switch(a){case 18:this.dragSelectedMode&&this.isAltKeyReleased&&this.vwr.moveSelectedXY(-2147483648,0,b);this.isAltKeyReleased=!1;this.moved.modifiers|=8;break;case 16:this.moved.keybuf=
0;this.dragged.modifiers|=1;this.moved.modifiers|=1;break;case 17:this.moved.modifiers|=2;break;case 27:this.vwr.hoverOff();this.exitMeasurementMode("escape");break;default:this.vwr.hoverOff()}var c=8464|this.moved.modifiers;!this.labelMode&&!this.b.isUserAction(c)&&this.checkMotionRotateZoom(c,this.current.x,0,0,!1);if(this.vwr.getBoolean(603979889))switch(a){case 38:case 40:case 37:case 39:case 32:case 46:this.vwr.navigate(a,b)}this.keyProcessing=!1;return!0},"~N,~N");f(b,"keyTyped",function(){return!1},
"~N,~N");f(b,"keyReleased",function(a){switch(a){case 18:this.moved.modifiers&=-9;this.dragSelectedMode&&this.vwr.moveSelectedXY(2147483647,0,this.moved.modifiers);this.isAltKeyReleased=!0;break;case 16:this.moved.modifiers&=-2;0<this.moved.keybuf&&this.vwr.isModelKitOpen()&&this.checkKeyBuf(0);break;case 17:this.moved.modifiers&=-3}0==this.moved.modifiers&&this.vwr.setCursor(0);if(65<=a&&this.vwr.isModelKitOpen()&&(this.dragAtomIndex=this.vwr.findNearestAtomIndex(this.current.x,this.current.y),0<=
this.dragAtomIndex)){this.checkKeyBuf(a);return}if(this.vwr.getBoolean(603979889))switch(a){case 38:case 40:case 37:case 39:this.vwr.navigate(0,0)}this.moved.keybuf=0},"~N");c(b,"checkKeyBuf",function(a){var b=0!=(this.moved.modifiers&1);if(0!=a)if(0==this.moved.keybuf){if(this.moved.keybuf=a,b)return}else this.moved.keybuf+=a<<8;0<this.moved.keybuf&&(this.assignNew(this.moved.keybuf),this.moved.keybuf=0)},"~N");f(b,"mouseEnterExit",function(a,b,c,p){b=this.vwr.tm.stereoDoubleDTI?b<<1:this.vwr.am.splitFrame?
this.vwr.am.setSplitFrameMouse(b):b;this.setCurrent(a,b,c,0);p&&this.exitMeasurementMode("mouseExit")},"~N,~N,~N,~B");c(b,"setMouseActions",function(a,b,c){this.pressAction=JV.binding.Binding.getMouseAction(a,b,c?5:4);this.dragAction=JV.binding.Binding.getMouseAction(a,b,1);this.clickAction=JV.binding.Binding.getMouseAction(a,b,2)},"~N,~N,~B");f(b,"mouseAction",function(a,b,c,p,e,g){if(this.vwr.getMouseEnabled())switch(JU.Logger.debuggingHigh&&(0!=a&&this.vwr.getBoolean(603979960))&&this.vwr.showString("mouse action: "+
a+" "+g+" "+JV.binding.Binding.getMouseActionName(JV.binding.Binding.getMouseAction(e,g,a),!1),!1),a){case 0:this.hoverable||(JU.Logger.info("ActionManager: mouse move detected"),this.hoverable=!0);this.setCurrent(b,c,p,g);this.moved.setCurrent(this.current,0);this.moved.keybuf=0;if(null!=this.mp||this.hoverActive){this.clickAction=JV.binding.Binding.getMouseAction(this.clickedCount,g,0);this.checkClickAction(c,p,b,0);break}if(this.isZoomArea(c)){this.checkMotionRotateZoom(this.LEFT_DRAGGED,0,0,0,
!1);break}8==this.vwr.currentCursor&&this.vwr.setCursor(0);break;case 4:this.setMouseMode();this.pressedCount=this.pressed.check(20,c,p,g,b,700)?this.pressedCount+1:1;1==this.pressedCount&&(this.vwr.checkInMotion(1),this.setCurrent(b,c,p,g));this.pressAction=JV.binding.Binding.getMouseAction(this.pressedCount,g,4);this.vwr.setCursor(12);this.pressed.setCurrent(this.current,1);this.vwr.am.setSplitFrameMouse(c);this.pressed.setModelIndex(this.vwr.am.getCurrentSplitModelIndex());this.dragged.setCurrent(this.current,
1);this.vwr.setFocus();this.dragGesture.setAction(this.dragAction,b);this.checkPressedAction(c,p,b);break;case 1:this.setMouseMode();this.setMouseActions(this.pressedCount,g,!1);a=c-this.dragged.x;e=p-this.dragged.y;this.setCurrent(b,c,p,g);this.dragged.setCurrent(this.current,-1);this.dragGesture.add(this.dragAction,c,p,b);this.checkDragWheelAction(this.dragAction,c,p,a,e,b,1);break;case 5:this.pressed.setModelIndex(-1);this.setMouseActions(this.pressedCount,g,!0);this.setCurrent(b,c,p,g);this.vwr.spinXYBy(0,
0,0);g=!this.pressed.check(10,c,p,g,b,9223372036854775E3);this.checkReleaseAction(c,p,b,g);break;case 3:if(this.vwr.isApplet&&!this.vwr.hasFocus())break;this.setCurrent(b,this.current.x,this.current.y,g);this.checkDragWheelAction(JV.binding.Binding.getMouseAction(0,g,3),this.current.x,this.current.y,0,p,b,3);break;case 2:this.setMouseMode();this.clickedCount=1<e?e:this.clicked.check(10,0,0,g,b,700)?this.clickedCount+1:1;1==this.clickedCount&&this.setCurrent(b,c,p,g);this.setMouseActions(this.clickedCount,
g,!1);this.clicked.setCurrent(this.current,this.clickedCount);this.vwr.setFocus();if(9!=this.apm&&this.bnd(JV.binding.Binding.getMouseAction(1,g,4),[31]))break;this.clickAction=JV.binding.Binding.getMouseAction(this.clickedCount,g,2);this.checkClickAction(c,p,b,this.clickedCount)}},"~N,~N,~N,~N,~N,~N");c(b,"checkPressedAction",function(a,b,c){var p=JV.binding.Binding.getButtonMods(this.pressAction),e=this.bnd(JV.binding.Binding.getMouseAction(1,p,4),[31]);if(0!=p){this.pressAction=this.vwr.notifyMouseClicked(a,
b,this.pressAction,4);if(0==this.pressAction)return;p=JV.binding.Binding.getButtonMods(this.pressAction)}this.setMouseActions(this.pressedCount,p,!1);JU.Logger.debuggingHigh&&this.vwr.getBoolean(603979960)&&JU.Logger.debug(JV.binding.Binding.getMouseActionName(this.pressAction,!1));if(!this.isDrawOrLabelAction(this.dragAction)||!this.vwr.checkObjectDragged(-2147483648,0,a,b,this.dragAction)){this.checkUserAction(this.pressAction,a,b,0,0,c,4);c=!1;switch(this.apm){case 32:c=this.bnd(this.clickAction,
[0]);break;case 28:c=this.bnd(this.dragAction,[7,14]);break;case 26:case 36:case 37:case 27:case 40:c=this.bnd(this.dragAction,[7,14,27]);break;case 29:c=this.bnd(this.dragAction,[11,14]);break;case 30:c=this.bnd(this.dragAction,[11,14,27]);break;default:c=34==this.bondPickingMode}if(c){this.dragAtomIndex=this.vwr.findNearestAtomIndexMovable(a,b,!0);a=34==this.bondPickingMode?this.vwr.getModelkit(!1).getRotateBondIndex():-1;if(0<=this.dragAtomIndex&&(0<=a||32==this.apm||31==this.apm))this.enterMeasurementMode(this.dragAtomIndex),
this.mp.addPoint(this.dragAtomIndex,null,!1),0<=a&&this.updateModelkitBranch(a,!0);a=this.vwr.getModelkitPropertySafely("screenxy");this.mkBondPressed=null!=a&&this.pressed.inRange(10,a[0],a[1])}else this.bnd(this.pressAction,[23])?this.doPopup(a,b):this.dragSelectedMode?(this.haveSelection=!e||0<=this.vwr.findNearestAtomIndexMovable(a,b,!0))&&this.bnd(this.dragAction,[13,14])&&this.vwr.moveSelectedXY(-2147483648,0,p):this.checkMotionRotateZoom(this.dragAction,a,0,0,!0)}},"~N,~N,~N");c(b,"checkDragWheelAction",
function(a,b,c,p,e,g,j){var f=JV.binding.Binding.getButtonMods(a);if(0!=f){var l=this.vwr.notifyMouseClicked(b,c,JV.binding.Binding.getMouseAction(this.pressedCount,f,j),j);if(0==l)return;0<l&&(a=l)}if(this.isRubberBandSelect(a))this.calcRectRubberBand(),this.vwr.refresh(3,"rubberBand selection");else if(!this.checkUserAction(a,b,c,p,e,g,j))if(g=34==this.bondPickingMode?this.vwr.getModelkit(!1).getRotateBondIndex():-1,0<=g&&(0<=this.dragAtomIndex||this.mkBondPressed||this.bnd(a,[26])))0<=this.dragAtomIndex&&
this.updateModelkitBranch(g,!1),this.vwr.moveSelected(p,e,-2147483648,b,c,null,null,null,!1,!1,0<=this.dragAtomIndex?0:16);else{if(40==this.apm||this.vwr.am.splitFrame&&this.vwr.ms.isJmolDataFrame(this.pressed.modelIndex)){if(40==this.apm||this.bnd(a,[29])){this.vwr.rotateSpins(p,e);return}if(40==this.apm)return}g=null;if(0<=this.dragAtomIndex&&2!=this.apm)switch(this.apm){case 26:this.dragSelected(a,p,e,!0);return;case 36:case 37:case 27:case 30:g=this.vwr.ms.getAtoms(37==this.apm?1094717454:1094713360,
JU.BSUtil.newAndSetBit(this.dragAtomIndex)),36==this.apm&&g.and(this.vwr.getAtomBitSet("ligand"));case 28:case 29:1==this.dragGesture.getPointCount()&&this.vwr.undoMoveActionClear(this.dragAtomIndex,2,!0);this.setMotion(13,!0);if(this.bnd(a,[27]))this.vwr.rotateSelected(this.getDegrees(p,!0),this.getDegrees(e,!1),g);else{switch(this.apm){case 36:case 37:case 27:case 30:this.vwr.selectStatus(g,!1,0,!0,!0)}this.vwr.moveAtomWithHydrogens(this.dragAtomIndex,p,e,this.bnd(a,[14])?-e:-2147483648,null,g);
this.vwr.checkCoordinatesChanged(null)}return}if(0<=this.dragAtomIndex&&1==j&&this.bnd(this.clickAction,[0])&&32==this.apm)a=this.vwr.findNearestAtomIndexMovable(b,c,!1),0<=a?(null!=this.mp?this.mp.setCount(1):this.measuresEnabled&&this.enterMeasurementMode(a),this.addToMeasurement(a,null,!0),this.mp.colix=20):null!=this.mp&&(this.mp.setCount(1),this.mp.colix=23),null!=this.mp&&(this.vwr.antialiased&&(b<<=1,c<<=1),this.mp.traceX=b,this.mp.traceY=c,this.vwr.refresh(3,"assignNew"));else if(!this.drawMode&&
!this.labelMode&&this.bnd(a,[45]))this.vwr.translateXYBy(p,e);else if(this.dragSelectedMode&&this.haveSelection&&this.bnd(a,[13,27]))b=this.vwr.bsA().nextSetBit(0),0>b||(1==this.dragGesture.getPointCount()?this.vwr.undoMoveActionClear(b,2,!0):this.vwr.moveSelected(2147483647,0,-2147483648,-2147483648,-2147483648,null,null,null,!1,!1,f),this.dragSelected(a,p,e,!1));else{if(this.isDrawOrLabelAction(a)&&(this.setMotion(13,!0),this.vwr.checkObjectDragged(this.dragged.x,this.dragged.y,b,c,a)))return;if(this.checkMotionRotateZoom(a,
b,p,e,!0))this.vwr.tm.slabEnabled&&this.bnd(a,[39])?this.vwr.slabDepthByPixels(e):this.vwr.zoomBy(e);else if(this.bnd(a,[25]))this.vwr.rotateXYBy(this.getDegrees(p,!0),this.getDegrees(e,!1));else if(this.bnd(a,[29]))0==p&&1<Math.abs(e)?(this.setMotion(8,!0),this.vwr.zoomBy(e+(0<e?-1:1))):0==e&&1<Math.abs(p)&&(this.setMotion(13,!0),this.vwr.rotateZBy(-p+(0<p?1:-1),2147483647,2147483647));else{if(this.vwr.tm.slabEnabled){if(this.bnd(a,[6])){this.vwr.depthByPixels(e);return}if(this.bnd(a,[38])){this.vwr.slabByPixels(e);
return}if(this.bnd(a,[39])){this.vwr.slabDepthByPixels(e);return}}this.bnd(a,[46])?this.zoomByFactor(e,2147483647,2147483647):this.bnd(a,[28])&&(this.setMotion(13,!0),this.vwr.rotateZBy(-p,2147483647,2147483647))}}}},"~N,~N,~N,~N,~N,~N,~N");c(b,"updateModelkitBranch",function(a,b){this.vwr.setModelkitPropertySafely(b?"branchatomclicked":"branchatomdragged",Integer.$valueOf(this.dragAtomIndex));null==this.measurementQueued||0==this.measurementQueued.numSet||null==this.mp?this.vwr.setPendingMeasurement(this.vwr.getModelkit(!1).setBondMeasure(a,
this.measurementQueued=this.mp=this.getMP())):this.measurementQueued.refresh(null)},"~N,~B");c(b,"dragSelected",function(a,b,c,p){this.setMotion(13,!0);this.bnd(a,[27])&&this.vwr.getBoolean(603979785)?this.vwr.rotateSelected(this.getDegrees(b,!0),this.getDegrees(c,!1),null):this.vwr.moveSelected(b,c,p&&this.bnd(a,[14])?-c:-2147483648,-2147483648,-2147483648,null,null,null,!0,!1,this.dragged.modifiers)},"~N,~N,~N,~B");c(b,"checkReleaseAction",function(a,b,c,p){JU.Logger.debuggingHigh&&this.vwr.getBoolean(603979960)&&
JU.Logger.debug(JV.binding.Binding.getMouseActionName(this.pressAction,!1));this.vwr.checkInMotion(0);this.vwr.setInMotion(!1);this.vwr.setCursor(0);this.dragGesture.add(this.dragAction,a,b,c);0<=this.dragAtomIndex&&!this.vwr.isModelkitPickingRotateBond()&&(29==this.apm||30==this.apm)&&this.minimize(!0);if(32==this.apm&&this.bnd(this.clickAction,[0]))null==this.mp||0>this.dragAtomIndex?this.exitMeasurementMode(null):34==this.bondPickingMode?(this.vwr.setModelkitPropertySafely("rotatebond",Integer.$valueOf(this.dragAtomIndex)),
this.exitMeasurementMode(null)):this.assignNew(-1);else if(this.dragAtomIndex=-1,this.mkBondPressed=!1,this.isRubberBandSelect(this.dragAction)&&this.selectRb(this.clickAction),this.rubberbandSelectionMode=this.b.name.equals("drag"),this.rectRubber.x=2147483647,p&&this.vwr.notifyMouseClicked(a,b,JV.binding.Binding.getMouseAction(this.pressedCount,0,5),5),this.isDrawOrLabelAction(this.dragAction))this.vwr.checkObjectDragged(2147483647,0,a,b,this.dragAction);else if(this.haveSelection&&(this.dragSelectedMode&&
this.bnd(this.dragAction,[13]))&&this.vwr.moveSelectedXY(2147483647,0,this.dragged.modifiers),(!p||!this.checkUserAction(this.pressAction,a,b,0,0,c,5))&&this.vwr.getBoolean(603979780)&&this.bnd(this.dragAction,[44]))a=this.getExitRate(),0<a&&this.vwr.spinXYBy(this.dragGesture.getDX(4,2),this.dragGesture.getDY(4,2),30*a*this.gestureSwipeFactor),this.vwr.g.logGestures&&this.vwr.log("$NOW$ swipe "+this.dragGesture+" "+a)},"~N,~N,~N,~B");c(b,"checkClickAction",function(a,b,c,p){if(1<p&&(5==this.apm||
6==this.apm))this.resetMeasurement(),this.runScript("draw ID sym* delete;spin off;");else{if(0<p){if(this.checkUserAction(this.clickAction,a,b,0,0,c,32768))return;this.clickAction=this.vwr.notifyMouseClicked(a,b,this.clickAction,32768);if(0==this.clickAction)return}JU.Logger.debuggingHigh&&this.vwr.getBoolean(603979960)&&JU.Logger.debug(JV.binding.Binding.getMouseActionName(this.clickAction,!1));if(this.bnd(this.clickAction,[2])){if(this.vwr.frankClicked(a,b)){this.vwr.popupMenu(-a,b,"j");return}if(this.vwr.frankClickedModelKit(a,
b)){this.vwr.popupMenu(10,0,"m");return}}c=null;var e=!1,g=!1,j=null;if(!this.drawMode&&(j=this.vwr.checkObjectClicked(a,b,this.clickAction),null!=j)){if(this.labelMode){this.pickLabel(j.get("atomIndex").intValue());return}e="bond".equals(j.get("type"));g="isosurface".equals(j.get("type"));c=this.getPoint(j);e&&this.vwr.isModelkitPickingRotateBond()&&this.vwr.highlightBond(j.get("index").intValue(),-1,a,b)}e&&(p=1);if(!(null!=c&&Float.isNaN(c.x))){var f=this.findNearestAtom(a,b,c,0<p);if(this.bnd(this.clickAction,
[23]))this.doPopup(a,b);else if(0==p&&32!=this.apm&&!this.vwr.isModelkitPickingRotateBond()){if(null!=this.mp){if(null!=c||0==this.mp.getIndexOf(f))try{this.mp.addPoint(f,c,!1)}catch(l){if(E(l,Exception)){this.exitMeasurementMode(null);return}throw l;}this.mp.haveModified&&this.vwr.setPendingMeasurement(this.mp);this.vwr.refresh(3,"measurementPending")}}else if(this.setMouseMode(),this.bnd(this.clickAction,[43])&&this.vwr.tm.stopMotion(),this.vwr.getBoolean(603979889)&&23==this.apm&&this.bnd(this.clickAction,
[21]))this.vwr.navTranslatePercent(100*a/this.vwr.getScreenWidth()-50,100*b/this.vwr.getScreenHeight()-50);else{if(e){if(this.bnd(this.clickAction,[34==this.bondPickingMode||33==this.bondPickingMode?0:5])){this.bondPicked(j.get("index").intValue());this.vwr.refresh(1,"bondpicked");return}}else{if(g)return;if(32!=this.apm&&null!=this.mp&&this.bnd(this.clickAction,[20])){this.atomOrPointPicked(f,c);4==this.addToMeasurement(f,c,!1)&&this.toggleMeasurement();return}if(this.bnd(this.clickAction,[37])){null!=
this.mp?(this.addToMeasurement(f,c,!0),this.toggleMeasurement()):!this.drawMode&&(!this.labelMode&&!this.dragSelectedMode&&this.measuresEnabled)&&(this.enterMeasurementMode(f),this.addToMeasurement(f,c,!0));this.atomOrPointPicked(f,c);return}}this.isSelectAction(this.clickAction)?g||this.atomOrPointPicked(f,c):this.bnd(this.clickAction,[24])&&0>f&&this.reset()}}}},"~N,~N,~N,~N");c(b,"doPopup",function(a,b){this.vwr.popupMenu(a,b,this.vwr.isModelKitOpen()?"m":"j")},"~N,~N");c(b,"pickLabel",function(a){var b=
this.vwr.ms.at[a].atomPropertyString(this.vwr,1825200146);2==this.pressedCount?(b=this.vwr.prompt("Set label for atomIndex="+a,b,!1),null!=b&&(this.vwr.shm.setAtomLabel(b,a),this.vwr.refresh(1,"label atom"))):this.setAtomsPicked(JU.BSUtil.newAndSetBit(a),"Label picked for atomIndex = "+a+": "+b)},"~N");c(b,"checkUserAction",function(a,b,c,p,e,g,j){if(!this.b.isUserAction(a))return!1;for(var f=!1,l,y=this.b.getBindings(),n=a+"\t",q,m=y.keySet().iterator();m.hasNext()&&((q=m.next())||1);)if(0==q.indexOf(n)&&
JU.AU.isAS(l=y.get(q))){var r=l[1],s=null;if(0<=r.indexOf("_ATOM")){var u=this.findNearestAtom(b,c,null,!0),r=JU.PT.rep(r,"_ATOM","({"+(0<=u?""+u:"")+"})");0<=u&&(r=JU.PT.rep(r,"_POINT",JU.Escape.eP(this.vwr.ms.at[u])))}if(!this.drawMode&&(0<=r.indexOf("_POINT")||0<=r.indexOf("_OBJECT")||0<=r.indexOf("_BOND"))){u=this.vwr.checkObjectClicked(b,c,a);if(null!=u&&null!=(s=u.get("pt")))u.get("type").equals("bond")&&(r=JU.PT.rep(r,"_BOND","[{"+u.get("index")+"}]")),r=JU.PT.rep(r,"_POINT",JU.Escape.eP(s)),
r=JU.PT.rep(r,"_OBJECT",JU.Escape.escapeMap(u));r=JU.PT.rep(r,"_BOND","[{}]");r=JU.PT.rep(r,"_OBJECT","{}")}r=JU.PT.rep(r,"_POINT","{}");r=JU.PT.rep(r,"_ACTION",""+a);r=JU.PT.rep(r,"_X",""+b);r=JU.PT.rep(r,"_Y",""+(this.vwr.getScreenHeight()-c));r=JU.PT.rep(r,"_DELTAX",""+p);r=JU.PT.rep(r,"_DELTAY",""+e);r=JU.PT.rep(r,"_TIME",""+g);r=JU.PT.rep(r,"_MODE",""+j);r.startsWith("+:")&&(f=!0,r=r.substring(2));this.vwr.evalStringQuiet(r)}return!f},"~N,~N,~N,~N,~N,~N,~N");c(b,"checkMotionRotateZoom",function(a,
b,c,p,e){b=this.bnd(a,[40])&&this.isZoomArea(this.pressed.x);var g=this.bnd(a,[25]),j=this.bnd(a,[29]);if(!b&&!g&&!j)return!1;a=(c=j&&(0==c||Math.abs(p)>5*Math.abs(c)))||this.isZoomArea(this.moved.x)||this.bnd(a,[46])?8:g||j?13:this.bnd(a,[1])?12:0;this.setMotion(a,e);return c||b},"~N,~N,~N,~N,~B");c(b,"getExitRate",function(){var a=this.dragGesture.getTimeDifference(2);return this.isMultiTouch?80<a?0:this.dragGesture.getSpeedPixelsPerMillisecond(2,1):10<a?0:this.dragGesture.getSpeedPixelsPerMillisecond(4,
2)});c(b,"isRubberBandSelect",function(a){return this.rubberbandSelectionMode&&this.bnd(a&-8193|32768,[35,34,32])},"~N");c(b,"getRubberBand",function(){return this.rubberbandSelectionMode&&2147483647!=this.rectRubber.x?this.rectRubber:null});c(b,"calcRectRubberBand",function(){var a=this.vwr.antialiased?2:1;this.current.x<this.pressed.x?(this.rectRubber.x=this.current.x*a,this.rectRubber.width=(this.pressed.x-this.current.x)*a):(this.rectRubber.x=this.pressed.x*a,this.rectRubber.width=(this.current.x-
this.pressed.x)*a);this.current.y<this.pressed.y?(this.rectRubber.y=this.current.y*a,this.rectRubber.height=(this.pressed.y-this.current.y)*a):(this.rectRubber.y=this.pressed.y*a,this.rectRubber.height=(this.current.y-this.pressed.y)*a)});c(b,"getDegrees",function(a,b){return 180*(a/Math.min(500,b?this.vwr.getScreenWidth():this.vwr.getScreenHeight()))*this.mouseDragFactor},"~N,~B");c(b,"isZoomArea",function(a){return a>98*this.vwr.getScreenWidth()*(this.vwr.haveTwoImages()?2:1)/100},"~N");c(b,"getPoint",
function(a){var b=JU.Point3fi.newPF(a.get("pt"),0);b.mi=a.get("modelIndex").intValue();return b},"java.util.Map");c(b,"findNearestAtom",function(a,b,c,p){a=this.drawMode||null!=c?-1:this.vwr.findNearestAtomIndexMovable(a,b,!1);return 0<=a&&(p||null==this.mp)&&!this.vwr.slm.isInSelectionSubset(a)?-1:a},"~N,~N,JU.Point3fi,~B");c(b,"isSelectAction",function(a){return this.bnd(a,[17])||!this.drawMode&&!this.labelMode&&1==this.apm&&this.bnd(a,[1])||this.dragSelectedMode&&this.bnd(this.dragAction,[27,13])||
this.bnd(a,[22,35,32,34,36,30])},"~N");c(b,"enterMeasurementMode",function(a){this.vwr.setPicked(a,!0);this.vwr.setCursor(1);this.vwr.setPendingMeasurement(this.mp=this.getMP());0<=a&&this.mp.setModelIndex(this.vwr.ms.at[a].mi);this.measurementQueued=this.mp},"~N");c(b,"getMP",function(){return J.api.Interface.getInterface("JM.MeasurementPending",this.vwr,"mouse").set(this.vwr.ms)});c(b,"addToMeasurement",function(a,b,c){if(-1==a&&null==b||null==this.mp)return this.exitMeasurementMode(null),0;var p=
this.mp.count;-2147483648!=this.mp.traceX&&2==p&&this.mp.setCount(p=1);return 4==p&&!c?p:this.mp.addPoint(a,b,!0)},"~N,JU.Point3fi,~B");c(b,"resetMeasurement",function(){this.exitMeasurementMode(null);this.measurementQueued=this.getMP()});c(b,"exitMeasurementMode",function(a){null!=this.mp&&(this.vwr.setPendingMeasurement(this.mp=null),this.vwr.setCursor(0),null!=a&&this.vwr.refresh(3,a))},"~S");c(b,"getSequence",function(){var a=this.measurementQueued.getAtomIndex(1),b=this.measurementQueued.getAtomIndex(2);
if(!(0>a||0>b))try{var c=this.vwr.getSmilesOpt(null,a,b,1048576,null);this.vwr.setStatusMeasuring("measureSequence",-2,c,0)}catch(p){if(E(p,Exception))JU.Logger.error(p.toString());else throw p;}});c(b,"minimize",function(a){var b=this.dragAtomIndex;a&&(this.dragAtomIndex=-1,this.mkBondPressed=!1);this.vwr.dragMinimizeAtom(b)},"~B");c(b,"queueAtom",function(a,b){var c=this.measurementQueued.addPoint(a,b,!0);0<=a&&this.vwr.setStatusAtomPicked(a,"Atom #"+c+":"+this.vwr.getAtomInfo(a),null,!1);return c},
"~N,JU.Point3fi");c(b,"setMotion",function(a,b){switch(this.vwr.currentCursor){case 3:break;default:this.vwr.setCursor(a)}b&&this.vwr.setInMotion(!0)},"~N,~B");c(b,"zoomByFactor",function(a,b,c){0!=a&&(this.setMotion(8,!0),this.vwr.zoomByFactor(Math.pow(this.mouseWheelFactor,a),b,c),this.moved.setCurrent(this.current,0),this.vwr.setInMotion(!0),this.zoomTrigger=!0,this.startHoverWatcher(!0))},"~N,~N,~N");c(b,"runScript",function(a){this.vwr.evalStringGUI(a)},"~S");c(b,"atomOrPointPicked",function(a,
b){if(0>a){this.resetMeasurement();if(this.bnd(this.clickAction,[33])){this.runScript("select none");return}if(5!=this.apm&&6!=this.apm)return}var c=2;switch(this.apm){case 28:case 29:return;case 0:return;case 25:case 24:case 8:var c=8==this.apm,p=25==this.apm;if(!this.bnd(this.clickAction,[c?5:3]))return;if(null==this.measurementQueued||0==this.measurementQueued.count||2<this.measurementQueued.count)this.resetMeasurement(),this.enterMeasurementMode(a);this.addToMeasurement(a,b,!0);if(2!=this.queueAtom(a,
b))return;c=c||this.measurementQueued.isConnected(this.vwr.ms.at,2)?" DELETE":p?"STRUTS":"";this.runScript("connect "+this.measurementQueued.getMeasurementScript(" ",!0)+c);this.resetMeasurement();return;case 21:c++;case 20:c++;case 18:case 19:case 22:if(!this.bnd(this.clickAction,[20]))return;if(null==this.measurementQueued||0==this.measurementQueued.count||this.measurementQueued.count>c)this.resetMeasurement(),this.enterMeasurementMode(a);this.addToMeasurement(a,b,!0);this.queueAtom(a,b);p=this.measurementQueued.count;
1==p&&this.vwr.setPicked(a,!0);if(p<c)return;22==this.apm?this.getSequence():(this.vwr.setStatusMeasuring("measurePicked",c,this.measurementQueued.getStringDetail(),this.measurementQueued.value),(18==this.apm||4==this.pickingStyleMeasure)&&this.runScript("measure "+this.measurementQueued.getMeasurementScript(" ",!0)));this.resetMeasurement();return}c=null!=this.mp&&1!=this.apm?1:this.apm;switch(c){case 3:if(!this.bnd(this.clickAction,[17]))return;null==b?this.zoomTo(a):this.runScript("zoomTo "+JU.Escape.eP(b));
return;case 5:case 6:if(this.bnd(this.clickAction,[17])){this.checkTwoAtomAction(b,a);return}}if(null==b){switch(c){case 1:!this.drawMode&&!this.labelMode&&this.bnd(this.clickAction,[1])?this.zoomTo(a):this.bnd(this.clickAction,[17])&&this.vwr.setStatusAtomPicked(a,null,null,!1);return;case 2:this.bnd(this.clickAction,[19])&&(this.runScript("set labeltoggle {atomindex="+a+"}"),this.pickLabel(a));return;case 31:this.bnd(this.clickAction,[0])&&(this.vwr.invertAtomCoord(null,null,null,a,!0),this.vwr.setStatusAtomPicked(a,
"invert stereo for atomIndex="+a,null,!1));return;case 7:this.bnd(this.clickAction,[4])&&(c=JU.BSUtil.newAndSetBit(a),this.vwr.deleteAtoms(c,!1),this.vwr.setStatusAtomPicked(a,"deleted: "+JU.Escape.eBS(c),null,!1));return}c="atomindex="+a;switch(this.apm){default:return;case 9:this.selectAtoms(c);break;case 10:this.selectAtoms("within(group, "+c+")");break;case 11:this.selectAtoms("within(chain, "+c+")");break;case 13:this.selectAtoms("within(polymer, "+c+")");break;case 14:this.selectAtoms("within(structure, "+
c+")");break;case 12:this.selectAtoms("within(molecule, "+c+")");break;case 16:this.selectAtoms("within(model, "+c+")");break;case 17:this.selectAtoms("visible and within(element, "+c+")");break;case 15:this.selectAtoms("visible and within(site, "+c+")");break;case 39:this.selectAtoms("visible and within(vxyz, "+c+")")}this.vwr.clearClickCount();this.vwr.setStatusAtomPicked(a,null,null,!1)}},"~N,JU.Point3fi");c(b,"assignNew",function(a){0>a?this.vwr.getModelkit(!1).handleAssignNew(this.pressed,this.dragged,
this.mp,this.dragAtomIndex,a)||this.exitMeasurementMode("bond dropped"):this.vwr.getModelkit(!1).handleAssignNew(this.current,this.current,null,this.dragAtomIndex,a);this.exitMeasurementMode(null)},"~N");c(b,"bondPicked",function(a){switch(this.bondPickingMode){case 33:this.vwr.undoMoveActionClear(-1,4146,!0);this.vwr.getModelkit(!1).setProperty("assignbond",Integer.$valueOf(a));break;case 8:this.vwr.deleteBonds(JU.BSUtil.newAndSetBit(a))}},"~N");c(b,"checkTwoAtomAction",function(a,b){var c=5==this.apm,
p=6==this.apm;if(c||p)if(this.vwr.tm.spinOn||this.vwr.tm.navOn||null!=this.vwr.getPendingMeasurement())this.resetMeasurement(),this.vwr.tm.spinOn&&this.runScript("spin off");else{2<=this.measurementQueued.count&&this.resetMeasurement();var e=this.measurementQueued.count;if(1==e)if(null==a){if(this.measurementQueued.getAtomIndex(1)==b)return}else if(0==this.measurementQueued.getAtom(1).distance(a))return;if(c||p){if(0<=b||null!=a)e=this.queueAtom(b,a);2>e?c?this.vwr.scriptStatus(1==e?J.i18n.GT.$("pick one more atom in order to spin the model around an axis"):
J.i18n.GT.$("pick two atoms in order to spin the model around an axis")):this.vwr.scriptStatus(1==e?J.i18n.GT.$("pick one more atom in order to display the symmetry relationship"):J.i18n.GT.$("pick two atoms in order to display the symmetry relationship between them")):c?(c=this.measurementQueued.getMeasurementScript(" ",!1),this.resetMeasurement(),this.runScript("spin"+c+" "+this.vwr.getInt(553648157))):(c=this.measurementQueued.getAtomIndex(1),p=this.measurementQueued.getAtomIndex(2),this.resetMeasurement(),
this.vwr.getModelkit(!1).drawSymop(c,p))}}},"JU.Point3fi,~N");c(b,"reset",function(){this.runScript("!reset")});c(b,"selectAtoms",function(a){if(!(null!=this.mp||this.selectionWorking)){this.selectionWorking=!0;var b=this.rubberbandSelectionMode||this.bnd(this.clickAction,[35])?"selected and not ("+a+") or (not selected) and ":this.bnd(this.clickAction,[32])?"selected and not ":this.bnd(this.clickAction,[34])?"selected or ":0==this.clickAction||this.bnd(this.clickAction,[36])?"selected tog ":this.bnd(this.clickAction,
[30])?"":null;if(null!=b)try{var c=this.vwr.getAtomBitSetEval(null,b+("("+a+")"));this.setAtomsPicked(c,"selected: "+JU.Escape.eBS(c));this.vwr.refresh(3,"selections set")}catch(p){if(!E(p,Exception))throw p;}this.selectionWorking=!1}},"~S");c(b,"setAtomsPicked",function(a,b){this.vwr.selectStatus(a,!1,0,!1,!0);this.vwr.setStatusAtomPicked(-1,b,null,!1)},"JU.BS,~S");c(b,"selectRb",function(a){var b=this.vwr.ms.findAtomsInRectangle(this.rectRubber);0<b.length()&&(b=JU.Escape.eBS(b),this.bnd(a,[34])?
this.runScript("selectionHalos on;select selected or "+b):this.bnd(a,[32])?this.runScript("selectionHalos on;select selected and not "+b):this.runScript("selectionHalos on;select selected tog "+b));this.vwr.refresh(3,"mouseReleased")},"~N");c(b,"toggleMeasurement",function(){if(null!=this.mp){var a=this.mp.count;2<=a&&4>=a&&this.runScript("!measure "+this.mp.getMeasurementScript(" ",!0));this.exitMeasurementMode(null)}});c(b,"zoomTo",function(a){this.runScript("zoomTo (atomindex="+a+")");this.vwr.setStatusAtomPicked(a,
null,null,!1)},"~N");c(b,"userActionEnabled",function(a){return this.vwr.isFunction(JV.ActionManager.getActionName(a).toLowerCase())},"~N");c(b,"userAction",function(a,b){if(!this.userActionEnabled(a))return!1;var c=JS.ScriptEval.runUserAction(JV.ActionManager.getActionName(a),b,this.vwr);return!JS.SV.vF.equals(c)},"~N,~A");b.actionInfo=Array(47);b.actionNames=Array(47);JV.ActionManager.pickingModeNames="off identify label center draw spin symmetry deleteatom deletebond atom group chain molecule polymer structure site model element measure distance angle torsion sequence navigate connect struts dragselected dragmolecule dragatom dragminimize dragminimizemolecule invertstereo assignatom assignbond rotatebond identifybond dragligand dragmodel symop vxyz dragspin".$plit(" ");
JV.ActionManager.pickingStyleNames="toggle selectOrToggle extendedSelect drag measure measureoff".$plit(" ");b=s(function(){this.time=this.y=this.x=this.index=0;r(this,arguments)},JV,"MotionPoint",null);c(b,"set",function(a,b,c,p){this.index=a;this.x=b;this.y=c;this.time=p},"~N,~N,~N,~N");f(b,"toString",function(){return"[x = "+this.x+" y = "+this.y+" time = "+this.time+" ]"});b=s(function(){this.action=0;this.nodes=null;this.time0=this.ptNext=0;this.vwr=null;r(this,arguments)},JV,"Gesture",null);
u(b,function(a,b){this.vwr=b;this.nodes=Array(a);for(var c=0;c<a;c++)this.nodes[c]=new JV.MotionPoint},"~N,JV.Viewer");c(b,"setAction",function(a,b){this.action=a;this.ptNext=0;this.time0=b;for(var c=0;c<this.nodes.length;c++)this.nodes[c].index=-1},"~N,~N");c(b,"add",function(a,b,c,p){this.action=a;this.getNode(this.ptNext).set(this.ptNext,b,c,p-this.time0);this.ptNext++;return this.ptNext},"~N,~N,~N,~N");c(b,"getTimeDifference",function(a){a=this.getPointCount2(a,0);if(2>a)return 0;var b=this.getNode(this.ptNext-
1);a=this.getNode(this.ptNext-a);return b.time-a.time},"~N");c(b,"getSpeedPixelsPerMillisecond",function(a,b){a=this.getPointCount2(a,b);if(2>a)return 0;var c=this.getNode(this.ptNext-1-b),p=this.getNode(this.ptNext-a-b),e=360*((c.x-p.x)/this.vwr.getScreenWidth()),g=360*((c.y-p.y)/this.vwr.getScreenHeight());return Math.sqrt(e*e+g*g)/(c.time-p.time)},"~N,~N");c(b,"getDX",function(a,b){a=this.getPointCount2(a,b);if(2>a)return 0;var c=this.getNode(this.ptNext-1-b),p=this.getNode(this.ptNext-a-b);return c.x-
p.x},"~N,~N");c(b,"getDY",function(a,b){a=this.getPointCount2(a,b);if(2>a)return 0;var c=this.getNode(this.ptNext-1-b),p=this.getNode(this.ptNext-a-b);return c.y-p.y},"~N,~N");c(b,"getPointCount",function(){return this.ptNext});c(b,"getPointCount2",function(a,b){a>this.nodes.length-b&&(a=this.nodes.length-b);for(var c=a+1;0<=--c&&!(0<=this.getNode(this.ptNext-c-b).index););return c},"~N,~N");c(b,"getNode",function(a){return this.nodes[(a+this.nodes.length+this.nodes.length)%this.nodes.length]},"~N");
f(b,"toString",function(){return 0==this.nodes.length?""+this:JV.binding.Binding.getMouseActionName(this.action,!1)+" nPoints = "+this.ptNext+" "+this.nodes[0]})});m("JV");x(["JU.BS"],"JV.AnimationManager",["J.api.Interface","JU.BSUtil"],function(){var b=s(function(){this.vwr=this.animationThread=null;this.animationOn=!1;this.lastFrameDelayMs=this.firstFrameDelayMs=this.animationFps=0;this.bsVisibleModels=null;this.animationReplayMode=1073742070;this.animationFrames=this.bsDisplay=null;this.animationPaused=
this.isMovie=!1;this.morphCount=this.caf=this.cmi=0;this.currentDirection=this.animationDirection=1;this.frameStep=this.lastFrameIndex=this.firstFrameIndex=0;this.backgroundModelIndex=-1;this.firstFrameDelay=this.currentMorphModel=0;this.lastFrameDelay=1;this.intAnimThread=this.lastModelPainted=this.lastFramePainted=0;this.cai=-1;this.splitFrame=!1;this.splitFrameOffsetX=0;this.currentSplitFrame=-1;R("JV.AnimationManager.SplitFrame")||JV.AnimationManager.$AnimationManager$SplitFrame$();this.splitFrames=
null;r(this,arguments)},JV,"AnimationManager",null);N(b,function(){this.bsVisibleModels=new JU.BS});u(b,function(a){this.vwr=a},"JV.Viewer");c(b,"setAnimationOn",function(a){a!=this.animationOn&&(!a||this.vwr.headless?this.stopThread(!1):(this.vwr.tm.spinOn||this.vwr.refresh(3,"Anim:setAnimationOn"),this.setAnimationRange(-1,-1),this.resumeAnimation()))},"~B");c(b,"stopThread",function(a){var b=!1;null!=this.animationThread&&(this.animationThread.interrupt(),this.animationThread=null,b=!0);this.animationPaused=
a;b&&!this.vwr.tm.spinOn&&this.vwr.refresh(3,"Viewer:setAnimationOff");this.animation(!1);this.vwr.setStatusFrameChanged(!1,!1)},"~B");c(b,"setAnimationNext",function(){return this.setAnimationRelative(this.animationDirection)});c(b,"currentIsLast",function(){return this.isMovie?this.lastFramePainted==this.caf:this.lastModelPainted==this.cmi});c(b,"currentFrameIs",function(a){var b=this.cmi;return 0==this.morphCount?b==a:0.001>Math.abs(this.currentMorphModel-a)},"~N");c(b,"clear",function(){this.setMovie(null);
this.initializePointers(0);this.setAnimationOn(!1);this.setModel(0,!0);this.currentDirection=1;this.cai=-1;this.setAnimationDirection(1);this.setAnimationFps(10);this.setAnimationReplayMode(1073742070,0,0);this.initializePointers(0);this.setSplitFrame(-1,-1)});c(b,"getModelSpecial",function(a){switch(a){case -1:if(null!=this.animationFrames)return"1";a=this.firstFrameIndex;break;case 0:if(0<this.morphCount)return"-"+(1+this.currentMorphModel);a=this.cmi;break;case 1:if(null!=this.animationFrames)return""+
this.animationFrames.length;a=this.lastFrameIndex}return this.vwr.getModelNumberDotted(a)},"~N");c(b,"setDisplay",function(a){this.bsDisplay=null==a||a.isEmpty()?null:JU.BSUtil.copy(a)},"JU.BS");c(b,"setMorphCount",function(a){this.morphCount=this.isMovie?0:a},"~N");c(b,"morph",function(a){var b=F(a);0.001>Math.abs(b-a)?a=b:0.999<Math.abs(b-a)&&(a=b+=1);a-=b;b-=1;if(0==a)this.currentMorphModel=b,this.setModel(b,!0);else{var c;this.setModel(b,!0);c=b+1;this.currentMorphModel=b+a;c==b||(0>c||0>b)||
this.vwr.ms.morphTrajectories(b,c,a)}},"~N");c(b,"setModel",function(a,b){0>a&&this.stopThread(!1);var c=this.cmi,p=this.vwr.ms,e=null==p?0:p.mc;if(1==e)this.cmi=a=0;else if(0>a||a>=e)a=-1;var p=null,g=!1;if(this.cmi!=a){if(0<e){var e=this.vwr.ms,j=e.isJmolDataFrame(a),f=e.isJmolDataFrame(this.cmi);-1!=this.cmi&&this.vwr.saveModelOrientation(this.cmi);if(f||j)p=e.getJmolFrameType(a)+" "+a+" <--  "+this.cmi+" "+e.getJmolFrameType(this.cmi),g=e.getJmolDataSourceFrame(a)==e.getJmolDataSourceFrame(this.cmi)}this.cmi=
a;null!=p&&(0<=a&&this.vwr.restoreModelOrientation(a),g&&(0<=p.indexOf("quaternion")||0<=p.indexOf("spin")||0>p.indexOf("plot")&&0>p.indexOf("ramachandran")&&0>p.indexOf(" property "))&&this.vwr.restoreModelRotationOnly(c))}this.setViewer(b)},"~N,~B");c(b,"setBackgroundModelIndex",function(a){var b=this.vwr.ms;if(null==b||0>a||a>=b.mc)a=-1;this.backgroundModelIndex=a;0<=a&&this.vwr.ms.setTrajectory(a);this.vwr.setTainted(!0);this.setFrameRangeVisible()},"~N");c(b,"initializePointers",function(a){this.firstFrameIndex=
0;this.lastFrameIndex=(0==a?0:this.getFrameCount())-1;this.frameStep=a;this.vwr.setFrameVariables()},"~N");c(b,"setAnimationDirection",function(a){this.animationDirection=a},"~N");c(b,"setAnimationFps",function(a){1>a&&(a=1);50<a&&(a=50);this.animationFps=a;this.vwr.setFrameVariables()},"~N");c(b,"setAnimationReplayMode",function(a,b,c){this.firstFrameDelay=0<b?b:0;this.firstFrameDelayMs=F(1E3*this.firstFrameDelay);this.lastFrameDelay=0<c?c:0;this.lastFrameDelayMs=F(1E3*this.lastFrameDelay);this.animationReplayMode=
a;this.vwr.setFrameVariables()},"~N,~N,~N");c(b,"setAnimationRange",function(a,b){var c=this.getFrameCount();0>a&&(a=0);0>b&&(b=c);a>=c&&(a=c-1);b>=c&&(b=c-1);this.currentMorphModel=this.firstFrameIndex=a;this.lastFrameIndex=b;this.frameStep=b<a?-1:1;this.rewindAnimation()},"~N,~N");c(b,"pauseAnimation",function(){this.stopThread(!0)});c(b,"reverseAnimation",function(){this.currentDirection=-this.currentDirection;this.animationOn||this.resumeAnimation()});c(b,"repaintDone",function(){this.lastModelPainted=
this.cmi;this.lastFramePainted=this.caf});c(b,"resumeAnimation",function(){0>this.cmi&&this.setAnimationRange(this.firstFrameIndex,this.lastFrameIndex);1>=this.getFrameCount()?this.animation(!1):(this.animation(!0),this.animationPaused=!1,null==this.animationThread&&(this.intAnimThread++,this.animationThread=J.api.Interface.getOption("thread.AnimationThread",this.vwr,"script"),this.animationThread.setManager(this,this.vwr,D(-1,[this.firstFrameIndex,this.lastFrameIndex,this.intAnimThread])),this.animationThread.start()))});
c(b,"setAnimationLast",function(){this.setFrame(0<this.animationDirection?this.lastFrameIndex:this.firstFrameIndex)});c(b,"rewindAnimation",function(){this.setFrame(0<this.animationDirection?this.firstFrameIndex:this.lastFrameIndex);this.currentDirection=1;this.vwr.setFrameVariables()});c(b,"setAnimationPrevious",function(){return this.setAnimationRelative(-this.animationDirection)});c(b,"getAnimRunTimeSeconds",function(){var a=this.getFrameCount();if(this.firstFrameIndex==this.lastFrameIndex||0>
this.lastFrameIndex||0>this.firstFrameIndex||this.lastFrameIndex>=a||this.firstFrameIndex>=a)return 0;for(var b=Math.min(this.firstFrameIndex,this.lastFrameIndex),a=Math.max(this.firstFrameIndex,this.lastFrameIndex),c=1*(a-b)/this.animationFps+this.firstFrameDelay+this.lastFrameDelay;b<=a;b++)c+=this.vwr.ms.getFrameDelayMs(this.modelIndexForFrame(b))/1E3;return c});c(b,"setMovie",function(a){if(this.isMovie=null!=a&&null==a.get("scripts")){this.animationFrames=a.get("frames");if(null==this.animationFrames||
0==this.animationFrames.length)this.isMovie=!1;else if(this.caf=a.get("currentFrame").intValue(),0>this.caf||this.caf>=this.animationFrames.length)this.caf=0;this.setFrame(this.caf)}this.isMovie||(this.animationFrames=null);this.vwr.setBooleanProperty("_ismovie",this.isMovie);this.bsDisplay=null;this.currentMorphModel=this.morphCount=0;this.vwr.setFrameVariables()},"java.util.Map");c(b,"modelIndexForFrame",function(a){return this.isMovie?this.animationFrames[a]-1:a},"~N");c(b,"getFrameCount",function(){return this.isMovie?
this.animationFrames.length:this.vwr.ms.mc});c(b,"setFrame",function(a){try{if(this.isMovie){var b=this.modelIndexForFrame(a);this.caf=a;a=b}else this.caf=a;this.setModel(a,!0)}catch(c){if(!E(c,Exception))throw c;}},"~N");c(b,"getUnitCellAtomIndex",function(){return this.cai});c(b,"setUnitCellAtomIndex",function(a){this.cai=a},"~N");c(b,"setViewer",function(a){this.vwr.ms.setTrajectory(this.cmi);this.vwr.tm.setFrameOffset(this.cmi);-1==this.cmi&&a&&this.setBackgroundModelIndex(-1);this.vwr.setTainted(!0);
a=this.setFrameRangeVisible();1!=this.vwr.tm.splitFrameCurrentlyRendering&&this.vwr.setStatusFrameChanged(!1,!1);this.vwr.g.selectAllModels||this.setSelectAllSubset(2>a)},"~B");c(b,"setSelectAllSubset",function(a){null!=this.vwr.ms&&this.vwr.slm.setSelectionSubset(a?this.vwr.ms.getModelAtomBitSetIncludingDeleted(this.cmi,!0):this.vwr.ms.getModelAtomBitSetIncludingDeletedBs(this.bsVisibleModels))},"~B");c(b,"setFrameRangeVisible",function(){var a=0;this.bsVisibleModels.clearAll();0<=this.backgroundModelIndex&&
(this.bsVisibleModels.set(this.backgroundModelIndex),a=1);if(0<=this.cmi)return this.bsVisibleModels.set(this.cmi),++a;if(0==this.frameStep)return a;for(var b=0,a=0,c=this.firstFrameIndex;c!=this.lastFrameIndex;c+=this.frameStep){var p=this.modelIndexForFrame(c);this.vwr.ms.isJmolDataFrame(p)||(this.bsVisibleModels.set(p),a++,b=c)}p=this.modelIndexForFrame(this.lastFrameIndex);if(this.firstFrameIndex==this.lastFrameIndex||!this.vwr.ms.isJmolDataFrame(p)||0==a)this.bsVisibleModels.set(p),0==a&&(this.firstFrameIndex=
this.lastFrameIndex),a=0;1==a&&0>this.cmi&&this.setFrame(b);return a});c(b,"animation",function(a){this.animationOn=a;this.vwr.setBooleanProperty("_animating",a)},"~B");c(b,"setAnimationRelative",function(a){a=this.getFrameStep(a);var b=(this.isMovie?this.caf:this.cmi)+a,c=0,p=0,e;0<this.morphCount?(c=1/(this.morphCount+1),p=this.currentMorphModel+a*c,e=this.isNotInRange(p)):e=this.isNotInRange(b);if(e)switch(this.animationReplayMode){case 1073742070:return!1;case 528411:p=b=this.animationDirection==
this.currentDirection?this.firstFrameIndex:this.lastFrameIndex;break;case 1073742082:this.currentDirection=-this.currentDirection,b-=2*a,p-=2*a*c}if(1>this.morphCount){if(0>b||b>=this.getFrameCount())return!1;this.setFrame(b);return!0}this.morph(p+1);return!0},"~N");c(b,"isNotInRange",function(a){var b=a-0.001;return b>this.firstFrameIndex&&b>this.lastFrameIndex||(b=a+0.001)<this.firstFrameIndex&&b<this.lastFrameIndex},"~N");c(b,"getFrameStep",function(a){return this.frameStep*a*this.currentDirection},
"~N");c(b,"setSplitFrameOffsetX",function(a){this.splitFrames[1].offsetX=a},"~N");c(b,"setSplitFrame",function(a,b){this.splitFrames=(this.splitFrame=0<=a&&0<=b)?z(-1,[T(JV.AnimationManager.SplitFrame,this,null,0,a),T(JV.AnimationManager.SplitFrame,this,null,1,b)]):null},"~N,~N");c(b,"getSplitFrameModelIndex",function(a){return null==this.splitFrames?-1:this.splitFrames[a].modelIndex},"~N");c(b,"setSplitFrameMouse",function(a){if(!this.splitFrame)return this.currentSplitFrame=-1,a;this.currentSplitFrame=
a>=this.splitFrames[1].offsetX?1:0;return a-this.splitFrames[this.currentSplitFrame].offsetX},"~N");c(b,"getSplitFrameModel",function(){return 0>this.currentSplitFrame?this.cmi:this.splitFrames[this.currentSplitFrame].modelIndex});c(b,"isSplitFrameSelectable",function(a){var b=this.getSplitFrameModel();return 0>b||b==this.vwr.ms.at[a].mi},"~N");c(b,"getSplitFrameAtoms",function(a){return 0>this.currentSplitFrame?null:this.vwr.getModelUndeletedAtomsBitSet(this.splitFrames[a?this.currentSplitFrame:
1-this.currentSplitFrame].modelIndex)},"~B");c(b,"getCurrentSplitModelIndex",function(){return 0>this.currentSplitFrame?this.cmi:this.splitFrames[this.currentSplitFrame].modelIndex});c(b,"getSplitFrameModels",function(){if(!this.splitFrame)return null;var a=new JU.BS;a.set(this.splitFrames[0].modelIndex);a.set(this.splitFrames[1].modelIndex);this.bsVisibleModels.clearAll();this.bsVisibleModels.or(a);return a});b.$AnimationManager$SplitFrame$=function(){var a=s(function(){fa(this,arguments);this.offsetX=
this.modelIndex=this.index=0;r(this,arguments)},JV.AnimationManager,"SplitFrame",null);u(a,function(a,b){this.index=a;this.modelIndex=b},"~N,~N")}});m("JV.binding");x(["java.util.Hashtable"],"JV.binding.Binding","java.util.Arrays JU.AU $.Lst $.PT $.SB J.api.Interface JU.Escape $.Logger".split(" "),function(){var b=s(function(){this.bindings=this.name=null;r(this,arguments)},JV.binding,"Binding",null);N(b,function(){this.bindings=new java.util.Hashtable});u(b,function(){});b.getMouseAction=c(b,"getMouseAction",
function(a,b,c){2<a&&(a=2);switch(a){case 0:break;case 1:a=256;break;default:a=512}switch(c){case 4:c=4096;break;case 1:c=8192;break;case 5:c=16384;break;case 2:c=32768;break;case 3:c=32}return b&63|a|c},"~N,~N,~N");b.getMouseActionStr=c(b,"getMouseActionStr",function(a){if(null==a)return 0;var b=0;a=a.toUpperCase();b=0<=a.indexOf("MIDDLE")?8:0<=a.indexOf("RIGHT")?4:0<=a.indexOf("WHEEL")?32:16;0<=a.indexOf("DOWN")?b|=4096:0<=a.indexOf("DRAG")?b|=8192:0<=a.indexOf("UP")?b|=16384:32!=b&&(b|=32768);
32!=b&&0<=a.indexOf("DOUBLE")?b|=512:0<b&&(b|=256);288!=b&&0<=a.indexOf("ALT")&&(b|=8);0<=a.indexOf("CTRL")&&(b|=2);0<=a.indexOf("SHIFT")&&(b|=1);return b},"~S");b.getButtonMods=c(b,"getButtonMods",function(a){return a&63},"~N");b.getClickCount=c(b,"getClickCount",function(a){return(a&768)>>8},"~N");b.getMouseActionName=c(b,"getMouseActionName",function(a,b){var c=new JU.SB;if(0==a)return"";var p=JV.binding.Binding.includes(a,8)&&!JV.binding.Binding.includes(a,16)&&!JV.binding.Binding.includes(a,
4),e="      ".toCharArray();JV.binding.Binding.includes(a,2)&&(c.append("CTRL+"),e[5]="C");!p&&JV.binding.Binding.includes(a,8)&&(c.append("ALT+"),e[4]="A");JV.binding.Binding.includes(a,1)&&(c.append("SHIFT+"),e[3]="S");JV.binding.Binding.includes(a,16)?(e[2]="L",c.append("LEFT")):JV.binding.Binding.includes(a,4)?(e[2]="R",c.append("RIGHT")):p?(e[2]="M",c.append("MIDDLE")):JV.binding.Binding.includes(a,32)&&(e[2]="W",c.append("WHEEL"));JV.binding.Binding.includes(a,512)&&(c.append("+double"),e[1]=
"2");JV.binding.Binding.includes(a,4096)?(c.append("+down"),e[0]="1"):JV.binding.Binding.includes(a,8192)?(c.append("+drag"),e[0]="2"):JV.binding.Binding.includes(a,16384)?(c.append("+up"),e[0]="3"):JV.binding.Binding.includes(a,32768)&&(c.append("+click"),e[0]="4");return b?String.instantialize(e)+":"+c.toString():c.toString()},"~N,~B");c(b,"getBindings",function(){return this.bindings});c(b,"bindAction",function(a,b){this.addBinding(a+"\t"+b,D(-1,[a,b]))},"~N,~N");c(b,"bindName",function(a,b){this.addBinding(a+
"\t",Boolean.TRUE);this.addBinding(a+"\t"+b,z(-1,[JV.binding.Binding.getMouseActionName(a,!1),b]))},"~N,~S");c(b,"unbindAction",function(a,b){0==a?this.unbindJmolAction(b):this.removeBinding(null,a+"\t"+b)},"~N,~N");c(b,"unbindName",function(a,b){null==b?this.unbindMouseAction(a):this.removeBinding(null,a+"\t"+b)},"~N,~S");c(b,"unbindJmolAction",function(a){var b=this.bindings.keySet().iterator();for(a="\t"+a;b.hasNext();){var c=b.next();c.endsWith(a)&&this.removeBinding(b,c)}},"~N");c(b,"addBinding",
function(a,b){JU.Logger.debugging&&JU.Logger.debug("adding binding "+a+"\t==\t"+JU.Escape.e(b));this.bindings.put(a,b)},"~S,~O");c(b,"removeBinding",function(a,b){JU.Logger.debugging&&JU.Logger.debug("removing binding "+b);null==a?this.bindings.remove(b):a.remove()},"java.util.Iterator,~S");c(b,"unbindUserAction",function(a){var b=this.bindings.keySet().iterator();for(a="\t"+a;b.hasNext();){var c=b.next();c.endsWith(a)&&this.removeBinding(b,c)}},"~S");c(b,"unbindMouseAction",function(a){var b=this.bindings.keySet().iterator();
for(a+="\t";b.hasNext();){var c=b.next();c.startsWith(a)&&this.removeBinding(b,c)}},"~N");c(b,"isBound",function(a,b){return this.bindings.containsKey(a+"\t"+b)},"~N,~N");c(b,"isUserAction",function(a){return this.bindings.containsKey(a+"\t")},"~N");c(b,"getBindingInfo",function(a,b,c){var p=new JU.SB;c=null==c||c.equalsIgnoreCase("all")?null:c.toLowerCase();for(var e=Array(a.length),g=new JU.Lst,j,f=this.bindings.values().iterator();f.hasNext()&&((j=f.next())||1);)if(!C(j,Boolean))if(JU.AU.isAS(j)){var l=
j[0],y=j[1];(null==c||0<=c.indexOf("user")||0<=l.indexOf(c)||0<=y.indexOf(c))&&g.addLast(j)}else y=j,l=y[1],null==e[l]&&(e[l]=new JU.Lst),y=JV.binding.Binding.getMouseActionName(y[0],!0),(null==c||0<=(b[l]+";"+a[l]+";"+y).toLowerCase().indexOf(c))&&e[l].addLast(y);for(l=0;l<a.length;l++){var n;null==e[l]||0==(n=e[l].size())||this.addInfo(p,e[l].toArray(Array(n)),b[l],a[l])}for(l=0;l<g.size();l++)y=g.get(l),this.addInfo(p,z(-1,["USER:::"+y[0]]),"user-defined",y[1]);return p.toString()},"~A,~A,~S");
c(b,"addInfo",function(a,b,c,p){java.util.Arrays.sort(b);JU.PT.leftJustify(a,"                      ",c);a.append("\t");c="";for(var e=a.length(),g=0;g<b.length;g++)a.append(c).append(b[g].substring(7)),c=", ";e=a.length()-e;20>e&&a.append("                 ".substring(0,20-e));a.append("\t").append(p).appendC("\n")},"JU.SB,~A,~S,~S");b.includes=c(b,"includes",function(a,b){return(a&b)==b},"~N,~N");b.newBinding=c(b,"newBinding",function(a,b){return J.api.Interface.getInterface("JV.binding."+b+"Binding",
a,"script")},"JV.Viewer,~S")});m("JV.binding");x(["JV.binding.JmolBinding"],"JV.binding.DragBinding",null,function(){var b=G(JV.binding,"DragBinding",JV.binding.JmolBinding);u(b,function(){K(this,JV.binding.DragBinding,[]);this.set("drag")});f(b,"setSelectBindings",function(){this.bindAction(33040,30);this.bindAction(33041,35);this.bindAction(33048,34);this.bindAction(33049,32);this.bindAction(4368,31);this.bindAction(8464,13);this.bindAction(33040,17)})});m("JV.binding");x(["JV.binding.Binding"],
"JV.binding.JmolBinding",null,function(){var b=G(JV.binding,"JmolBinding",JV.binding.Binding);u(b,function(){K(this,JV.binding.JmolBinding,[]);this.set("toggle")});c(b,"set",function(a){this.name=a;this.setGeneralBindings();this.setSelectBindings()},"~S");c(b,"setSelectBindings",function(){this.bindAction(33296,30);this.bindAction(33040,36)});c(b,"setGeneralBindings",function(){this.bindAction(8474,45);this.bindAction(8454,45);this.bindAction(8721,45);this.bindAction(8712,45);this.bindAction(8464,
25);this.bindAction(8720,25);this.bindAction(8472,28);this.bindAction(8453,28);this.bindAction(8465,29);this.bindAction(8456,29);this.bindAction(288,46);this.bindAction(8464,40);this.bindAction(8464,16);this.bindAction(4370,23);this.bindAction(4356,23);this.bindAction(33040,2);this.bindAction(8467,38);this.bindAction(8723,6);this.bindAction(8475,39);this.bindAction(290,46);this.bindAction(289,46);this.bindAction(291,46);this.bindAction(290,38);this.bindAction(289,6);this.bindAction(291,39);this.bindAction(8464,
44);this.bindAction(8464,41);this.bindAction(8465,42);this.bindAction(8473,13);this.bindAction(8465,14);this.bindAction(8472,27);this.bindAction(8465,26);this.bindAction(8464,10);this.bindAction(8472,9);this.bindAction(8465,8);this.bindAction(33297,24);this.bindAction(33288,24);this.bindAction(33296,43);this.bindAction(8464,7);this.bindAction(8464,11);this.bindAction(8464,12);this.bindAction(33040,17);this.bindAction(33040,22);this.bindAction(33040,19);this.bindAction(33040,20);this.bindAction(33296,
37);this.bindAction(33040,18);this.bindAction(33043,21);this.bindAction(33040,4);this.bindAction(33040,5);this.bindAction(33040,3);this.bindAction(33040,0);this.bindAction(33043,1)})});m("JV");x(null,"JV.ColorManager","JU.AU J.c.PAL JU.C $.ColorEncoder $.Elements $.Logger JV.JC".split(" "),function(){var b=s(function(){this.colorData=this.altArgbsCpk=this.argbsCpk=this.g3d=this.vwr=this.ce=null;this.isDefaultColorRasmol=!1;this.colixRubberband=22;this.colixBackgroundContrast=0;r(this,arguments)},
JV,"ColorManager",null);u(b,function(a,b){this.vwr=a;this.ce=new JU.ColorEncoder(null,a);this.g3d=b;this.argbsCpk=J.c.PAL.argbsCpk;this.altArgbsCpk=JU.AU.arrayCopyRangeI(JV.JC.altArgbsCpk,0,-1)},"JV.Viewer,JU.GData");c(b,"setDefaultColors",function(a){a?(this.isDefaultColorRasmol=!0,this.argbsCpk=JU.AU.arrayCopyI(JU.ColorEncoder.getRasmolScale(),-1)):(this.isDefaultColorRasmol=!1,this.argbsCpk=J.c.PAL.argbsCpk);this.altArgbsCpk=JU.AU.arrayCopyRangeI(JV.JC.altArgbsCpk,0,-1);this.ce.createColorScheme(a?
"Rasmol=":"Jmol=",!0,!0);for(a=J.c.PAL.argbsCpk.length;0<=--a;)this.g3d.changeColixArgb(a,this.argbsCpk[a]);for(a=JV.JC.altArgbsCpk.length;0<=--a;)this.g3d.changeColixArgb(JU.Elements.elementNumberMax+a,this.altArgbsCpk[a])},"~B");c(b,"setRubberbandArgb",function(a){this.colixRubberband=0==a?0:JU.C.getColix(a)},"~N");c(b,"setColixBackgroundContrast",function(a){this.colixBackgroundContrast=JU.C.getBgContrast(a)},"~N");c(b,"getColixBondPalette",function(a,b){switch(b){case 20:return this.ce.getColorIndexFromPalette(a.getEnergy(),
-2.5,-0.5,7,!1)}return 10},"JM.Bond,~N");c(b,"getColixAtomPalette",function(a,b){var c=0,p;p=this.vwr.ms;switch(b){case 85:return null==this.colorData||a.i>=this.colorData.length||Float.isNaN(this.colorData[a.i])?12:this.ce.getColorIndex(this.colorData[a.i]);case 0:case 1:var c=this.argbsCpk,e=p=a.getAtomicAndIsotopeNumber();e>=JU.Elements.elementNumberMax&&(p=JU.Elements.altElementIndexFromNumber(e),0<p?(e=p,p+=JU.Elements.elementNumberMax,c=this.altArgbsCpk):e=p=JU.Elements.getElementNumber(e));
return this.g3d.getChangeableColix(p,c[e]);case 2:return p=JU.ColorEncoder.quantize4(a.getPartialCharge(),-1,1,JV.JC.PARTIAL_CHARGE_RANGE_SIZE),this.g3d.getChangeableColix(JV.JC.PARTIAL_CHARGE_COLIX_RED+p,JV.JC.argbsRwbScale[p]);case 3:return p=a.getFormalCharge()- -4,this.g3d.getChangeableColix(JV.JC.FORMAL_CHARGE_COLIX_RED+p,JV.JC.argbsFormalCharge[p]);case 68:case 5:return 68==b?(p=this.vwr.ms.getBfactor100Lo(),c=this.vwr.ms.getBfactor100Hi()):(p=0,c=1E4),this.ce.getColorIndexFromPalette(a.getBfactor100(),
p,c,7,!1);case 87:return this.ce.getColorIndexFromPalette(a.group.getGroupParameter(1111490574),-1,1,7,!1);case 70:return c=this.vwr.ms.getSurfaceDistanceMax(),this.ce.getColorIndexFromPalette(a.getSurfaceDistance100(),0,c,7,!1);case 25:return p=a.group.groupID,42<=p&&(p=24+"PGCATU".indexOf(Character.toUpperCase(a.group.group1))-1),this.ce.getColorIndexFromPalette(p,0,0,17,!1);case 9:return this.ce.getColorIndexFromPalette(a.group.groupID,0,0,5,!1);case 10:return this.ce.getColorIndexFromPalette(a.group.groupID,
0,0,4,!1);case 76:return this.ce.getColorIndexFromPalette(a.group.selectedIndex,0,a.group.chain.selectedGroupCount-1,1,!1);case 88:return p=this.vwr.ms.am[a.mi],this.ce.getColorIndexFromPalette(a.group.getBioPolymerIndexInModel(),0,(p.isBioModel?p.getBioPolymerCount():0)-1,1,!1);case 77:return this.ce.getColorIndexFromPalette(a.group.getSelectedMonomerIndex(),0,a.group.getSelectedMonomerCount()-1,1,!1);case 78:return this.ce.getColorIndexFromPalette(p.getMoleculeIndex(a.i,!0),0,p.getMoleculeCountInModel(a.mi)-
1,0,!1);case 15:return c=a.mi,this.ce.getColorIndexFromPalette(p.getAltLocIndexInModel(c,a.altloc),0,p.getAltLocCountInModel(c),0,!1);case 16:return c=a.mi,this.ce.getColorIndexFromPalette(p.getInsertionCodeIndexInModel(c,a.group.getInsertionCode()),0,p.getInsertionCountInModel(c),0,!1);case 17:p=a.getAtomicAndIsotopeNumber();c=this.getJmolOrRasmolArgb(p,1073741991);break;case 18:p=a.getAtomicAndIsotopeNumber();c=this.getJmolOrRasmolArgb(p,1073742116);break;case 7:c=a.group.getBioStructureSubType(1111490651).getColor();
break;case 11:p=a.getChainID(),null==JU.ColorEncoder.argbsChainAtom&&(JU.ColorEncoder.argbsChainAtom=this.getArgbs(1153433601),JU.ColorEncoder.argbsChainHetero=this.getArgbs(1612709894)),p=((0>p?0:256<=p?p-256:p)&31)%JU.ColorEncoder.argbsChainAtom.length,c=(a.isHetero()?JU.ColorEncoder.argbsChainHetero:JU.ColorEncoder.argbsChainAtom)[p]}return 0==c?22:JU.C.getColix(c)},"JM.Atom,~N");c(b,"getArgbs",function(a){return this.vwr.getJBR().getArgbs(a)},"~N");c(b,"getJmolOrRasmolArgb",function(a,b){switch(b){case 1073741991:if(a>=
JU.Elements.elementNumberMax)break;return this.ce.getArgbFromPalette(a,0,0,2);case 1073742116:if(a>=JU.Elements.elementNumberMax)break;return this.ce.getArgbFromPalette(a,0,0,3);default:return b}return JV.JC.altArgbsCpk[JU.Elements.altElementIndexFromNumber(a)]},"~N,~N");c(b,"getElementColix",function(a){var b=this.argbsCpk;if(a>JU.Elements.elementNumberMax){var c=JU.Elements.altElementIndexFromNumber(a);0<c?(a=c,b=this.altArgbsCpk):a=JU.Elements.getElementNumber(a)}return JU.C.getColix(b[a])},"~N");
c(b,"setElementArgb",function(a,b){if(!(1073741991==b&&this.argbsCpk===J.c.PAL.argbsCpk)){b=this.getJmolOrRasmolArgb(a,b);this.argbsCpk===J.c.PAL.argbsCpk&&(this.argbsCpk=JU.AU.arrayCopyRangeI(J.c.PAL.argbsCpk,0,-1),this.altArgbsCpk=JU.AU.arrayCopyRangeI(JV.JC.altArgbsCpk,0,-1));var c=a;c<JU.Elements.elementNumberMax?this.argbsCpk[c]=b:(c=JU.Elements.altElementIndexFromNumber(a),this.altArgbsCpk[c]=b,c+=JU.Elements.elementNumberMax);this.g3d.changeColixArgb(c,b);this.vwr.setModelkitPropertySafely("updatemodelkeys",
null)}},"~N,~N");c(b,"getPropertyColorRange",function(){return this.ce.isReversed?M(-1,[this.ce.hi,this.ce.lo]):M(-1,[this.ce.lo,this.ce.hi])});c(b,"setPropertyColorRangeData",function(a,b){this.colorData=a;this.ce.currentPalette=this.ce.createColorScheme(this.vwr.g.propertyColorScheme,!0,!1);this.ce.hi=-3.4028235E38;this.ce.lo=3.4028235E38;if(null!=a){for(var c=null==b,p,e=c?a.length-1:b.nextSetBit(0);0<=e;e=c?e-1:b.nextSetBit(e+1))if(!(e>=a.length||Float.isNaN(p=a[e])))this.ce.hi=Math.max(this.ce.hi,
p),this.ce.lo=Math.min(this.ce.lo,p);this.setPropertyColorRange(this.ce.lo,this.ce.hi)}},"~A,JU.BS");c(b,"setPropertyColorRange",function(a,b){this.ce.setRange(a,b,a>b);JU.Logger.debugging&&JU.Logger.debug('ColorManager: color "'+this.ce.getCurrentColorSchemeName()+'" range '+a+" "+b)},"~N,~N");c(b,"setPropertyColorScheme",function(a,b,c){var p=0==a.length;p&&(a="=");var e=this.getPropertyColorRange();this.ce.currentPalette=this.ce.createColorScheme(a,!0,c);p||this.setPropertyColorRange(e[0],e[1]);
this.ce.isTranslucent=b},"~S,~B,~B");c(b,"getColorSchemeList",function(a){a=null==a||0==a.length?this.ce.currentPalette:this.ce.createColorScheme(a,!0,!1);return JU.ColorEncoder.getColorSchemeList(this.ce.getColorSchemeArray(a))},"~S");c(b,"getColorEncoder",function(a){if(null==a||0==a.length)return this.ce;var b=new JU.ColorEncoder(this.ce,this.vwr);b.currentPalette=b.createColorScheme(a,!1,!0);return 2147483647==b.currentPalette?null:b},"~S")});m("JV");x(["javajs.api.BytePoster","java.util.Hashtable"],
"JV.FileManager","java.net.URL $.URLEncoder JU.AU $.Base64 $.LimitedLineReader $.Lst $.OC $.PT $.Rdr $.SB J.adapter.smarter.Resolver J.api.Interface J.i18n.GT J.io.FileReader JU.Escape $.Logger JV.JC $.JmolAsyncException $.Viewer".split(" "),function(){var b=s(function(){this.jzu=this.spartanDoc=this.vwr=null;this.pathForAllFiles="";this.nameAsGiven="zapped";this.lastFullPathName=this.fullPathName=null;this.lastNameAsGiven="zapped";this.staticJmolDataReader=this.spardirCache=this.pngjCache=this.cache=
this.appletProxy=this.appletDocumentBaseURL=this.lastFileType=this.fileName=null;r(this,arguments)},JV,"FileManager",null,javajs.api.BytePoster);N(b,function(){this.cache=new java.util.Hashtable});u(b,function(a){this.vwr=a;this.clear()},"JV.Viewer");c(b,"spartanUtil",function(){return null==this.spartanDoc?this.spartanDoc=J.api.Interface.getInterface("J.adapter.readers.spartan.SpartanUtil",this.vwr,"fm getSpartanUtil()").set(this):this.spartanDoc});c(b,"getJzu",function(){return null==this.jzu?this.jzu=
J.api.Interface.getOption("io.JmolUtil",this.vwr,"file"):this.jzu});c(b,"clear",function(){this.setFileInfo(z(-1,[this.vwr.getZapName()]));this.spardirCache=null});c(b,"setLoadState",function(a){this.vwr.getPreserveState()&&a.put("loadState",this.vwr.g.getLoadState(a))},"java.util.Map");c(b,"getPathForAllFiles",function(){return this.pathForAllFiles});c(b,"setPathForAllFiles",function(a){0<a.length&&(!a.endsWith("/")&&!a.endsWith("|"))&&(a+="/");return this.pathForAllFiles=a},"~S");c(b,"setFileInfo",
function(a){null==a?(this.fullPathName=this.lastFullPathName,this.nameAsGiven=this.lastNameAsGiven):(this.fullPathName=a[0],this.fileName=a[Math.min(1,a.length-1)],this.nameAsGiven=a[Math.min(2,a.length-1)],this.nameAsGiven.equals("zapped")||(this.lastNameAsGiven=this.nameAsGiven,this.lastFullPathName=this.fullPathName))},"~A");c(b,"getFileInfo",function(){return z(-1,[this.fullPathName,this.fileName,this.nameAsGiven])});c(b,"getFullPathName",function(a){var b=null!=this.fullPathName?this.fullPathName:
this.nameAsGiven;return!a||!b.equals("zapped")&&!b.equals("string")?b:null!=this.lastFullPathName?this.lastFullPathName:this.lastNameAsGiven},"~B");c(b,"getLastReadFileType",function(){return this.lastFileType});c(b,"setFileType",function(a){"JmolData".equals(a)||(this.lastFileType=a)},"~S");c(b,"getFileName",function(){return null!=this.fileName?this.fileName:this.nameAsGiven});c(b,"getAppletDocumentBase",function(){return null==this.appletDocumentBaseURL?"":this.appletDocumentBaseURL.toString()});
c(b,"setAppletContext",function(a){try{System.out.println('setting document base to "'+a+'"'),this.appletDocumentBaseURL=0==a.length?null:new java.net.URL(ma("java.net.URL"),a,null)}catch(b){if(E(b,"java.net.MalformedURLException"))System.out.println("error setting document base to "+a);else throw b;}},"~S");c(b,"setAppletProxy",function(a){this.appletProxy=null==a||0==a.length?null:a},"~S");c(b,"createAtomSetCollectionFromFile",function(a,b,c){null==b.get("atomDataOnly")&&this.setLoadState(b);var p=
a,e=a.indexOf("::");0>e&&(a=this.vwr.resolveDatabaseFormat(a));!p.equals(a)&&(0>p.indexOf("/")&&JV.Viewer.hasDatabasePrefix(p))&&b.put("dbName",p);a.endsWith("%2D%")&&(p=b.get("filter"),b.put("filter",(null==p?"":p)+"2D"),a=a.substring(0,a.length-4));p=0<=e?a.substring(e+2):a;e=0<=e?a.substring(0,e):null;JU.Logger.info("\nFileManager.getAtomSetCollectionFromFile("+p+")"+(a.equals(p)?"":" //"+a));var g=this.getClassifiedName(p,!0);if(1==g.length)return g[0];a=g[0];g=g[1];this.setFileType(e);b.put("fullPathName",
(null==e?"":e+"::")+JV.FileManager.fixDOSName(a));this.vwr.getBoolean(603979879)&&this.vwr.getBoolean(603979825)&&this.vwr.getChimeMessenger().update(a);b=new J.io.FileReader(this.vwr,g,a,p,e,null,b,c);b.run();return b.getAtomSetCollection()},"~S,java.util.Map,~B");c(b,"createAtomSetCollectionFromFiles",function(a,b,c){this.setLoadState(b);for(var p=Array(a.length),e=Array(a.length),g=Array(a.length),j=0;j<a.length;j++){var f=a[j].indexOf("::"),l=0<=f?a[j].substring(f+2):a[j],f=0<=f?a[j].substring(0,
f):null,y=this.getClassifiedName(l,!0);if(1==y.length)return y[0];p[j]=y[0];a[j]=JV.FileManager.fixDOSName(y[0]);g[j]=f;e[j]=l}b.put("fullPathNames",p);b.put("fileTypes",g);a=this.newFilesReader(p,e,g,null,b,c);a.run();return a.getAtomSetCollection()},"~A,java.util.Map,~B");c(b,"createAtomSetCollectionFromString",function(a,b,c){this.setLoadState(b);var p=0<=a.indexOf("Viewer.AddHydrogens")?this.getFileInfo():null;b=new J.io.FileReader(this.vwr,"string",null,null,null,a.startsWith(";base64,")?JU.Base64.decodeBase64(a):
JU.Rdr.getBR(a),b,c);b.run();null!=p&&this.setFileInfo(p);!c&&"string"!=typeof b.getAtomSetCollection()&&this.setFileInfo(z(-1,["5\n\nC 0 0 0\nH .63 .63 .63\nH -.63 -.63 .63\nH -.63 .63 -.63\nH .63 -.63 -.63"===a?"Jmol Model Kit":"string"]));return b.getAtomSetCollection()},"~S,java.util.Map,~B");c(b,"createAtomSeCollectionFromStrings",function(a,b,c,p){if(!c.containsKey("isData")){var e='"'+this.vwr.getDataSeparator()+'"',g='"'+(p?"append":"model")+' inline"',j=new JU.SB;j.append('set dataSeparator "~~~next file~~~";\ndata ').append(g);
for(var f=0;f<a.length;f++)0<f&&j.append("~~~next file~~~"),j.append(a[f]);j.append("end ").append(g).append(";set dataSeparator ").append(e);b.appendSB(j)}this.setLoadState(c);JU.Logger.info("FileManager.getAtomSetCollectionFromStrings(string[])");b=Array(a.length);e=Array(a.length);for(f=0;f<a.length;f++)b[f]="string["+f+"]",e[f]=JV.FileManager.newDataReader(this.vwr,a[f]);a=this.newFilesReader(b,b,null,e,c,p);a.run();return a.getAtomSetCollection()},"~A,JU.SB,java.util.Map,~B");c(b,"createAtomSeCollectionFromArrayData",
function(a,b,c){JU.Logger.info("FileManager.getAtomSetCollectionFromArrayData(Vector)");for(var p=a.size(),e=Array(p),g=Array(p),j=0;j<p;j++)e[j]="String["+j+"]",g[j]=JV.FileManager.newDataReader(this.vwr,a.get(j));a=this.newFilesReader(e,e,null,g,b,c);a.run();return a.getAtomSetCollection()},"JU.Lst,java.util.Map,~B");b.newDataReader=c(b,"newDataReader",function(a,b){var c="string"==typeof b?"String":JU.AU.isAS(b)?"Array":C(b,"JU.Lst")?"List":null;return null==c?null:J.api.Interface.getInterface("JU."+
c+"DataReader",a,"file").setData(b)},"JV.Viewer,~O");c(b,"newFilesReader",function(a,b,c,p,e,g){var j=J.api.Interface.getOption("io.FilesReader",this.vwr,"file");j.set(this,this.vwr,a,b,c,p,e,g);return j},"~A,~A,~A,~A,java.util.Map,~B");c(b,"createAtomSetCollectionFromReader",function(a,b,c,p){a=new J.io.FileReader(this.vwr,b,a,null,null,c,p,!1);a.run();return a.getAtomSetCollection()},"~S,~S,~O,java.util.Map");c(b,"getBufferedInputStream",function(a){a=this.getBufferedReaderOrErrorMessageFromName(a,
Array(2),!0,!0);return C(a,"java.io.BufferedInputStream")?a:null},"~S");c(b,"getBufferedInputStreamOrErrorMessageFromName",function(a,b,c,p,e,g,j){var f=null,l=null;b=(j=j||a.startsWith("cache://"))&&null==e?b=this.getPngjOrDroppedBytes(b,a):null;try{j&&(0<=a.indexOf(".png")&&null==this.pngjCache&&!this.vwr.getBoolean(603979960))&&(this.pngjCache=new java.util.Hashtable);if(null==b){var y=0<=a.indexOf("?POST?_PNGJBIN_"),n=y||0<=a.indexOf("?POST?_PNGJ_");if(0<a.indexOf("?POST?_PNG_")||n){var q=Array(1),
m=this.vwr.getImageAsBytes(n?"PNGJ":"PNG",0,0,-1,q);if(null!=q[0])return q[0];y?(e=m,a=JU.PT.rep(a,"?_","=_")):a=(new JU.SB).append(a).append("=").appendSB(JU.Base64.getBase64(m)).toString()}var r=JU.OC.urlTypeIndex(a),y=0<=r,n=null;if(y&&0<=(r=a.indexOf("?POST?")))n=a.substring(r+6),a=a.substring(0,r);var s=null!=this.appletDocumentBaseURL;if(s||y){s&&(y&&null!=this.appletProxy)&&(a=this.appletProxy+"?url="+this.urlEncode(a));var u=s?new java.net.URL(this.appletDocumentBaseURL,a,null):new java.net.URL(ma("java.net.URL"),
a,null);if(p)return null;a=u.toString();c&&0>a.toLowerCase().indexOf("password")&&JU.Logger.info("FileManager opening url "+a);l=this.vwr.apiPlatform.getURLContents(u,e,n,!1);m=null;if(C(l,"JU.SB")){a=l;if(g&&!JU.Rdr.isBase64(a))return JU.Rdr.getBR(a.toString());m=JU.Rdr.getBytesFromSB(a)}else JU.AU.isAB(l)&&(m=l);null!=m&&(l=JU.Rdr.getBIS(m))}else if(!j||null==(b=this.cacheGet(a,!0)))c&&JU.Logger.info("FileManager opening file "+a),l=this.vwr.apiPlatform.getBufferedFileInputStream(a);if("string"==
typeof l)return l}f=null==b?l:JU.Rdr.getBIS(b);p&&(f.close(),f=null);return f}catch(w){if(E(w,Exception))try{null!=f&&f.close()}catch(x){if(!E(x,"java.io.IOException"))throw x;}else throw w;}return""+w},"~S,~S,~B,~B,~A,~B,~B");b.getBufferedReaderForResource=c(b,"getBufferedReaderForResource",function(a,b,c,p){p=a.vwrOptions.get("codePath")+c+p;if(a.async){a=a.fm.cacheGet(p,!1);if(null==a)throw new JV.JmolAsyncException(p);return JU.Rdr.getBufferedReader(JU.Rdr.getBIS(a),null)}return a.fm.getBufferedReaderOrErrorMessageFromName(p,
z(-1,[null,null]),!1,!0)},"JV.Viewer,Class,~S,~S");c(b,"urlEncode",function(a){try{return java.net.URLEncoder.encode(a,"utf-8")}catch(b){if(E(b,"java.io.UnsupportedEncodingException"))return a;throw b;}},"~S");c(b,"getFullPathNameOrError",function(a,b,c){var p=this.getClassifiedName(JV.JC.fixProtocol(a),!0);if(null==p||null==p[0]||2>p.length)return z(-1,[null,"cannot read file name: "+a]);a=p[0];p=JV.FileManager.fixDOSName(p[0]);a=JU.Rdr.getZipRoot(a);a.endsWith("#_DOCACHE_")&&(a=a.substring(0,a.length-
10));b=this.getBufferedInputStreamOrErrorMessageFromName(a,p,!1,!b,null,!1,!b);c[0]=p;"string"==typeof b&&(c[1]=b);return b},"~S,~B,~A");c(b,"getBufferedReaderOrErrorMessageFromName",function(a,b,c,p){a=JV.JC.fixProtocol(a);var e=this.cacheGet(a,!1),g=JU.AU.isAB(e),j=g?e:null;if(a.startsWith("cache://")){if(null==e)return"cannot read "+a;if(g)j=e;else return JU.Rdr.getBR(e)}e=this.getClassifiedName(a,!0);if(null==e)return"cannot read file name: "+a;null!=b&&(b[0]=JV.FileManager.fixDOSName(e[0]));
return this.getUnzippedReaderOrStreamFromName(e[0],j,!1,c,!1,p,null)},"~S,~A,~B,~B");c(b,"getUnzippedReaderOrStreamFromName",function(a,b,c,p,e,g,j){if(g&&null==b){var f=a.endsWith(".spt")?z(-1,[null,null,null]):0>a.indexOf(".spardir")?null:this.spartanUtil().getFileList(a,e);if(null!=f)return f}a=JV.JC.fixProtocol(a);null==b&&(null!=(b=this.getCachedPngjBytes(a))&&null!=j)&&j.put("sourcePNGJ",Boolean.TRUE);g=a=a.$replace("#_DOCACHE_","");e=null;0<=a.indexOf("|")&&(e=JU.PT.split(a.$replace("\\","/"),
"|"),null==b&&JU.Logger.info("FileManager opening zip "+a),a=e[0]);a=null==b?this.getBufferedInputStreamOrErrorMessageFromName(a,g,!0,!1,null,!p,!0):JU.AU.isAB(b)?JU.Rdr.getBIS(b):b;try{if("string"==typeof a||C(a,"java.io.BufferedReader"))return a;JU.Rdr.isGzipS(a)?a=JU.Rdr.getUnzippedInputStream(this.vwr.getJzt(),a):JU.Rdr.isBZip2S(a)&&(a=JU.Rdr.getUnzippedInputStreamBZip2(this.vwr.getJzt(),a));if(p&&null==e)return a;if(JU.Rdr.isCompoundDocumentS(a)){var l=J.api.Interface.getInterface("JU.CompoundDocument",
this.vwr,"file");l.setDocStream(this.vwr.getJzt(),a);var y=l.getAllDataFiles("Molecule","Input").toString();return p?JU.Rdr.getBIS(y.getBytes()):JU.Rdr.getBR(y)}if(JU.Rdr.isMessagePackS(a)||JU.Rdr.isPickleS(a))return a;a=JU.Rdr.getPngZipStream(a,!0);f=null;if(JU.Rdr.isZipS(a)){if(c)return this.vwr.getJzt().newZipInputStream(a);f=this.vwr.getJzt().getZipFileDirectory(a,e,1,p)}else if(JU.Rdr.isTar(a))f=this.vwr.getJzt().getZipFileDirectory(a,e,1,p);else if(JU.Rdr.isBinary(a,32))return a;if(null!=f){if(!C(f,
"java.io.BufferedInputStream"))return"string"==typeof f?JU.Rdr.getBR(f):f;a=JU.Rdr.getUnzippedInputStream(this.vwr.getJzt(),f)}return p?a:JU.Rdr.getBufferedReader(a,null)}catch(n){if(E(n,Exception))return n.toString();throw n;}},"~S,~O,~B,~B,~B,~B,java.util.Map");c(b,"getZipDirectory",function(a,b,c){a=this.getBufferedInputStreamOrErrorMessageFromName(a,a,!1,!1,null,!1,c);return this.vwr.getJzt().getZipDirectoryAndClose(a,b?"JmolManifest":null)},"~S,~B,~B");c(b,"getFileAsBytes",function(a,b){if(null==
a)return null;var c=a,p=null;0<=a.indexOf("|")&&(p=JU.PT.split(a,"|"),a=p[0]);var e=null!=p?null:this.getPngjOrDroppedBytes(c,a);if(null==e){c=this.getBufferedInputStreamOrErrorMessageFromName(a,c,!1,!1,null,!1,!0);if("string"==typeof c)return"Error:"+c;try{e=null!=b||null==p||1>=p.length||!JU.Rdr.isZipS(c)&&!JU.Rdr.isPngZipStream(c)&&!JU.Rdr.isTar(c)?JU.Rdr.getStreamAsBytes(c,b):this.vwr.getJzt().getZipFileContentsAsBytes(c,p,1),c.close()}catch(g){if(E(g,Exception))return g.toString();throw g;}}if(null==
b||!JU.AU.isAB(e))return e;b.write(e,0,-1);return e.length+" bytes"},"~S,JU.OC");c(b,"getFileAsMap",function(a,b,c){var p=c?null:new java.util.Hashtable,e;if(null==a){e=Array(1);b=this.vwr.getImageAsBytes(b,-1,-1,-1,e);if(null!=e[0]){if(c)return O(0,0);p.put("_ERROR_",e[0]);return p}if(c)return b;e=JU.Rdr.getBIS(b)}else{b=Array(2);e=this.getFullPathNameOrError(a,!0,b);if("string"==typeof e){if(c)return O(0,0);p.put("_ERROR_",e);return p}if(!this.checkSecurity(b[0])){if(c)return O(0,0);p.put("_ERROR_",
"java.io. Security exception: cannot read file "+b[0]);return p}}try{if(c)return JU.Rdr.streamToBytes(e);this.vwr.getJzt().readFileAsMap(e,p,a)}catch(g){if(E(g,Exception)){if(c)return O(0,0);p.clear();p.put("_ERROR_",""+g)}else throw g;}return p},"~S,~S,~B");c(b,"getFileDataAsString",function(a,b,c,p,e){a[1]="";var g=a[0];if(null==g)return!1;c=this.getBufferedReaderOrErrorMessageFromName(g,a,!1,c);if("string"==typeof c)return a[1]=c,!1;if(e&&!this.checkSecurity(a[0]))return a[1]="java.io. Security exception: cannot read file "+
a[0],!1;try{if(C(c,"java.io.BufferedInputStream")&&(g.toUpperCase().endsWith(".PNG")||JV.FileManager.isEmbeddable(g)))c=JU.Rdr.getBufferedReader(c,null);return JU.Rdr.readAllAsString(c,b,p,a,1)}catch(j){if(E(j,Exception))return!1;throw j;}},"~A,~N,~B,~B,~B");c(b,"checkSecurity",function(a){if(!a.startsWith("file:"))return!0;var b=a.lastIndexOf("/");return a.lastIndexOf(":/")==b-1||0<=a.indexOf("/.")||a.lastIndexOf(".")<a.lastIndexOf("/")?!1:!0},"~S");c(b,"loadImage",function(a,b,c){var p=null,e=null,
g=null,j=null!=b&&b.startsWith("\u0001");if(j){if(b.equals("\u0001closeall\u0001null"))return this.vwr.loadImageData(Boolean.TRUE,"\u0001closeall","\u0001closeall",null);if("\u0001close".equals(a))return this.vwr.loadImageData(Boolean.FALSE,"\u0001close",b,null)}C(a,"java.util.Map")&&(a=a.containsKey("_DATA_")?a.get("_DATA_"):a.get("_IMAGE_"));C(a,"JS.SV")&&(a=a.value);var f="string"==typeof a?a:null,l=!1;null!=f&&f.startsWith(";base64,")?g=JU.Base64.decodeBase64(f):C(a,"JU.BArray")?g=a.data:JU.AU.isAB(a)?
g=a:null==b||"string"==typeof a?(f=this.getClassifiedName(a,!0),e=null==f?"cannot read file name: "+a:JV.FileManager.fixDOSName(f[0]),null!=f&&(p=this.getImage(e,b,c)),l=null==p):p=a;null!=g&&(p=this.getImage(g,b,!0),l=!1);"string"==typeof p&&(e=p,p=null);!JV.Viewer.isJS&&(null!=p&&null!=g)&&(e=";base64,"+JU.Base64.getBase64(g).toString());return!JV.Viewer.isJS||j&&null==e||!j&&null!=p?this.vwr.loadImageData(p,e,b,null):l},"~O,~S,~B");c(b,"getImage",function(a,b,c){return this.getJzu().getImage(this.vwr,
a,b,c)},"~O,~S,~B");c(b,"getClassifiedName",function(a,b){if(null==a)return z(-1,[null]);var c=0<this.pathForAllFiles.length;if(a.startsWith("?")||a.startsWith("http://?")||a.startsWith("https://?")){if(!JV.Viewer.isJS&&null==(a=this.vwr.dialogAsk("Load",a,null)))return z(-1,[b?"#CANCELED#":null]);c=!1}var p=null,e=null,g=null;if(a.startsWith("cache://"))return g=Array(3),g[0]=g[2]=a,g[1]=JV.FileManager.stripPath(g[0]),g;a=this.vwr.resolveDatabaseFormat(a);if(null==a)return z(-1,[null]);a.startsWith("file:///")&&
9==a.indexOf("|")&&(a=a.substring(0,9)+":"+a.substring(10));0>a.indexOf(":")&&(0!=a.indexOf("/")&&0!=a.indexOf("\\"))&&(a=JV.FileManager.addDirectory(this.vwr.getDefaultDirectory(),a));if(null==this.appletDocumentBaseURL)if(0<=JU.OC.urlTypeIndex(a)||this.vwr.haveAccess(JV.Viewer.ACCESS.NONE)||this.vwr.haveAccess(JV.Viewer.ACCESS.READSPT)&&!a.endsWith(".spt")&&!a.endsWith("/")||!this.vwr.haveAccessInternal(a))try{e=new java.net.URL(ma("java.net.URL"),a,null)}catch(j){if(E(j,"java.net.MalformedURLException"))return z(-1,
[b?j.toString():null]);throw j;}else var p=this.vwr.apiPlatform.newFile(a),g=p.getFullPath(),f=p.getName(),g=z(-1,[null==g?f:g,f,null==g?f:"file:/"+g.$replace("\\","/")]);else try{if(1==a.indexOf(":\\")||1==a.indexOf(":/"))a="file:/"+a;e=new java.net.URL(this.appletDocumentBaseURL,a,null)}catch(l){if(E(l,"java.net.MalformedURLException"))return z(-1,[b?l.toString():null]);throw l;}null!=e&&(g=Array(3),g[0]=g[2]=e.toString(),g[1]=JV.FileManager.stripPath(g[0]));c&&(c=g[0],g[0]=this.pathForAllFiles+
g[1],JU.Logger.info("FileManager substituting "+c+" --\x3e "+g[0]));c=g[0];b&&(JU.OC.isLocal(c)&&!c.startsWith("file:/"))&&(null==p&&(c=JU.PT.trim(c.substring(c.indexOf(":")+1),"/")),p=c.length-g[1].length-1,0<p&&(c=c.substring(0,p).$replace("|",":"),JV.FileManager.setLocalPath(this.vwr,c,!0)));return g},"~S,~B");b.addDirectory=c(b,"addDirectory",function(a,b){if(0==a.length||a.equals("."))return b;var c=0<b.length?b.charAt(0):" ",p=a.toLowerCase();if((p.endsWith(".zip")||p.endsWith(".tar"))&&"|"!=
c&&"/"!=c)a+="|";return a+("/"==c||"/"==c||"|"==(c=a.charAt(a.length-1))||"/"==c?"":"/")+b},"~S,~S");c(b,"getDefaultDirectory",function(a){a=this.getClassifiedName(a,!0);if(null==a)return"";a=JV.FileManager.fixPath(a[0]);return null==a?"":a.substring(0,a.lastIndexOf("/"))},"~S");b.fixPath=c(b,"fixPath",function(a){a=JV.FileManager.fixDOSName(a);a=JU.PT.rep(a,"/./","/");var b=a.lastIndexOf("//")+1;1>b&&(b=a.indexOf(":/")+1);1>b&&(b=a.indexOf("/"));if(0>b)return null;var c=a.substring(0,b);for(a=a.substring(b);0<=
(b=a.lastIndexOf("/../"));){var p=a.substring(0,b).lastIndexOf("/");if(0>p)return JU.PT.rep(c+a,"/../","/");a=a.substring(0,p)+a.substring(b+3)}0==a.length&&(a="/");return c+a},"~S");c(b,"getFilePath",function(a,b,c){a=this.getClassifiedName(a,!1);return null==a||1==a.length?"":c?a[1]:b?a[2]:null==a[0]?"":JV.FileManager.fixDOSName(a[0])},"~S,~B,~B");b.getLocalDirectory=c(b,"getLocalDirectory",function(a,b){var c=a.getP(b?"currentLocalPath":"defaultDirectoryLocal");b&&0==c.length&&(c=a.getP("defaultDirectoryLocal"));
if(0==c.length)return JV.Viewer.isJS?null:a.apiPlatform.newFile(System.getProperty("user.dir","."));a.isApplet&&0==c.indexOf("file:/")&&(c=c.substring(6));c=a.apiPlatform.newFile(c);try{return c.isDirectory()?c:c.getParentAsFile()}catch(p){if(E(p,Exception))return null;throw p;}},"JV.Viewer,~B");b.setLocalPath=c(b,"setLocalPath",function(a,b,c){for(;b.endsWith("/")||b.endsWith("\\");)b=b.substring(0,b.length-1);a.setStringProperty("currentLocalPath",b);c||a.setStringProperty("defaultDirectoryLocal",
b)},"JV.Viewer,~S,~B");b.getLocalPathForWritingFile=c(b,"getLocalPathForWritingFile",function(a,b,c){if(b.startsWith("http://")||b.startsWith("https://"))return b;b=JU.PT.rep(b,"?","");if(0==b.indexOf("file:/"))return a=b.indexOf("|"),5<a&&10>a&&(b=b.substring(0,a)+":"+b.substring(a+1)),a=b.indexOf(":",5),b.substring(0<a?a-1:5);if(0==b.indexOf("/")||0==b.indexOf("\\")||0<=b.indexOf(":"))return b;var p=null;try{p=JV.FileManager.getLocalDirectory(a,c)}catch(e){if(!E(e,Exception))throw e;}return null==
p?b:JV.FileManager.fixPath(p.toString()+"/"+b)},"JV.Viewer,~S,~B");b.fixDOSName=c(b,"fixDOSName",function(a){return 0<=a.indexOf(":\\")?a.$replace("\\","/"):a},"~S");b.stripPath=c(b,"stripPath",function(a){var b=Math.max(a.lastIndexOf("|"),a.lastIndexOf("/"));return a.substring(b+1)},"~S");b.isScriptType=c(b,"isScriptType",function(a){return JU.PT.isOneOf(a.toLowerCase().substring(a.lastIndexOf(".")+1),";pse;spt;png;pngj;jmol;zip;")},"~S");b.determineSurfaceFileType=c(b,"determineSurfaceFileType",
function(a){var b=null;if(C(a,"JU.Rdr.StreamReader")){var c=a.getStream();if(c.markSupported())try{c.mark(300);var p=O(300,0);c.read(p,0,300);c.reset();if(131==(p[0]&255))return J.adapter.smarter.Resolver.checkBCIF(p,!1)?"BCifDensity":null;if(80==p[0]&&77==p[1]&&1==p[2]&&0==p[3])return"Pmesh";if(77==p[208]&&65==p[209]&&80==p[210])return"Mrc";if(20==p[0]&&0==p[1]&&0==p[2]&&0==p[3])return"DelPhi";if(0==p[36]&&100==p[37])return"Dsn6"}catch(e){if(!E(e,"java.io.IOException"))throw e;}}c=null;try{c=new JU.LimitedLineReader(a,
16E3),b=c.getHeader(0)}catch(g){if(!E(g,Exception))throw g;}if(null==c||null==b||0==b.length)return null;if(0<=b.indexOf("\x00")){if(131==b.charAt(0).charCodeAt(0))return"D"==b.charAt(10)&&"e"==b.charAt(11)&&"n"==b.charAt(12)?"BCifDensity":null;if(0==b.indexOf("PM\u0001\x00"))return"Pmesh";if(208==b.indexOf("MAP "))return"Mrc";if(0==b.indexOf("\u0014\x00\x00\x00"))return"DelPhi";if(37<b.length&&(0==b.charAt(36).charCodeAt(0)&&100==b.charAt(37).charCodeAt(0)||0==b.charAt(36).charCodeAt(0)&&100==b.charAt(37).charCodeAt(0)))return"Dsn6"}switch(b.charAt(0).charCodeAt(0)){case 64:if(0==
b.indexOf("@text"))return"Kinemage";break;case 35:if(0<=b.indexOf(".obj"))return"Obj";if(0<=b.indexOf("MSMS"))return"Msms";if(0<=b.indexOf("Menu"))return"MENU";break;case 60:if(b.startsWith("<?xml")&&0<b.indexOf("<jvxl "))return"JvxlXml";if(0<=b.indexOf("<efvet "))return"Efvet";break;case 38:if(0==b.indexOf("&plot"))return"Jaguar";break;case 13:case 10:if(0<=b.indexOf("ZYX"))return"Xplor"}if(0<=b.indexOf("Here is your gzipped map"))return"UPPSALA"+b;if(b.startsWith("data_SERVER"))return"CifDensity";
if(b.startsWith("4MESHC"))return"Pmesh4";if(0<=b.indexOf("! nspins"))return"CastepDensity";if(0<=b.indexOf("#JVXL+"))return"Jvxl+";if(0<=b.indexOf("#JVXL"))return"Jvxl";if(0<=b.indexOf("#JmolPmesh"))return"Pmesh";if(0<=b.indexOf("#obj")||0<=b.indexOf("#pmesh")||0<=b.indexOf("usemtl"))return"Obj";if(0==b.indexOf("# object with"))return"Nff";if(0<=b.indexOf("PRIMVEC")||0<=b.indexOf("BEGIN_DATAGRID_3D")||0<=b.indexOf("BEGIN_BANDGRID_3D"))return"Xsf";if(0<=b.indexOf("tiles in x, y"))return"Ras3D";if(0<=
b.indexOf(" 0.00000e+00 0.00000e+00      0      0\n"))return"Uhbd";b=c.readLineWithNewline();if(0==b.indexOf("object 1 class gridpositions counts"))return"Apbs";a=JU.PT.getTokens(b);var j=c.readLineWithNewline();if(2==a.length&&(3==JU.PT.parseInt(a[0])&&-2147483648!=JU.PT.parseInt(a[1]))&&(a=JU.PT.getTokens(j),3==a.length&&-2147483648!=JU.PT.parseInt(a[0])&&-2147483648!=JU.PT.parseInt(a[1])&&-2147483648!=JU.PT.parseInt(a[2])))return"PltFormatted";p=c.readLineWithNewline();if(b.startsWith("v ")&&j.startsWith("v ")&&
p.startsWith("v "))return"Obj";j=JU.PT.parseInt(p);if(-2147483648==j)return 0==p.indexOf("+")?"Jvxl+":null;a=JU.PT.getTokens(p);if(0<a[0].indexOf("."))return 60<=p.length||3!=a.length?null:"VaspChgcar";if(0<=j)return 4==a.length||5==a.length&&a[4].equals("1")?"Cube":null;for(a=4+-j;0<=--a;)if(null==(b=c.readLineWithNewline()))return null;b=JU.PT.parseInt(b);return-2147483648==b?null:0>b?"Jvxl":"Cube"},"java.io.BufferedReader");b.getManifestScriptPath=c(b,"getManifestScriptPath",function(a){if(0<=
a.indexOf("$SCRIPT_PATH$"))return"";var b=0<=a.indexOf("\n")?"\n":"\r";if(0<=a.indexOf(".spt")){a=JU.PT.split(a,b);for(b=a.length;0<=--b;)if(0<=a[b].indexOf(".spt"))return"|"+JU.PT.trim(a[b],"\r\n \t")}return null},"~S");b.getFileReferences=c(b,"getFileReferences",function(a,b,c){for(var p=0;p<JV.FileManager.scriptFilePrefixes.length;p++)for(var e=JV.FileManager.scriptFilePrefixes[p],g=-1;0<=(g=a.indexOf(e,g+1));){var j=JU.PT.getQuotedStringAt(a,g);0<=j.indexOf("\\u")&&(j=JU.Escape.unescapeUnicode(j));
b.addLast(j);null!=c&&(0<=j.indexOf("\\u")&&(j=JU.Escape.unescapeUnicode(j)),c.addLast(j))}},"~S,JU.Lst,JU.Lst");b.setScriptFileReferences=c(b,"setScriptFileReferences",function(a,b,c,p){null!=b&&(a=JV.FileManager.setScriptFileRefs(a,b,!0));null!=c&&(a=JV.FileManager.setScriptFileRefs(a,c,!1));a=JU.PT.rep(a,'\u0001"','"');if(null!=p){for(;p.endsWith("/");)p=p.substring(0,p.length-1);for(b=0;b<JV.FileManager.scriptFilePrefixes.length;b++)c=JV.FileManager.scriptFilePrefixes[b],a=JU.PT.rep(a,c+".",c+
p)}return a},"~S,~S,~S,~S");b.setScriptFileRefs=c(b,"setScriptFileRefs",function(a,b,c){if(null==b)return a;var p=0==b.length,e=new JU.Lst;JV.FileManager.getFileReferences(a,e,null);for(var g=new JU.Lst,j=new JU.Lst,f=e.size(),l=0;l<f;l++){var y=e.get(l),n=y,q=n.indexOf("::"),m="";0<=q&&(m=n.substring(q+2),n=n.substring(q+2));c==JU.OC.isLocal(n)&&(q=p?-1:n.indexOf("/"+b+"/"),0<=q?n=n.substring(q+1):(q=n.lastIndexOf("/"),0>q&&!p&&(n="/"+n),(0>q||p)&&q++,n=b+n.substring(q)));n=m+n;JU.Logger.info("FileManager substituting "+
y+" --\x3e "+n);g.addLast('"'+y+'"');j.addLast('\u0001"'+n+'"')}return JU.PT.replaceStrings(a,g,j)},"~S,~S,~B");c(b,"cachePut",function(a,b){a=JV.FileManager.fixDOSName(a);JU.Logger.debugging&&JU.Logger.debug("cachePut "+a);null==b||"".equals(b)?this.cache.remove(a):(this.cache.put(a,b),this.getCachedPngjBytes(a))},"~S,~O");c(b,"cacheGet",function(a,b){a=JV.FileManager.fixDOSName(a);var c=a.indexOf("|");0<=c&&!a.endsWith("##JmolSurfaceInfo##")&&(a=a.substring(0,c));a=this.getFilePath(a,!0,!1);c=null;
(c=Jmol.Cache.get(a))||(c=this.cache.get(a));return b&&"string"==typeof c?null:c},"~S,~B");c(b,"cacheClear",function(){JU.Logger.info("cache cleared");this.cache.clear();null!=this.pngjCache&&(this.pngjCache=null,JU.Logger.info("PNGJ cache cleared"))});c(b,"cacheFileByNameAdd",function(a,b){if(null==a||!b&&a.equalsIgnoreCase(""))return this.cacheClear(),-1;var c;if(b){a=JV.JC.fixProtocol(this.vwr.resolveDatabaseFormat(a));c=this.getFileAsBytes(a,null);if("string"==typeof c)return 0;this.cachePut(a,
c)}else{if(a.endsWith("*"))return JU.AU.removeMapKeys(this.cache,a.substring(0,a.length-1));c=this.cache.remove(JV.FileManager.fixDOSName(a))}return null==c?0:c.length},"~S,~B");c(b,"cacheList",function(){for(var a=new java.util.Hashtable,b,c=this.cache.entrySet().iterator();c.hasNext()&&((b=c.next())||1);)a.put(b.getKey(),Integer.$valueOf(JU.AU.isAB(b.getValue())?b.getValue().length:b.getValue().toString().length));return a});c(b,"getCanonicalName",function(a){var b=this.getClassifiedName(a,!0);
return null==b?a:b[2]},"~S");c(b,"recachePngjBytes",function(a,b){null!=this.pngjCache&&this.pngjCache.containsKey(a)&&(this.pngjCache.put(a,b),JU.Logger.info("PNGJ recaching "+a+" ("+b.length+")"))},"~S,~A");c(b,"getPngjOrDroppedBytes",function(a,b){var c=this.getCachedPngjBytes(a);return null==c?this.cacheGet(b,!0):c},"~S,~S");c(b,"getCachedPngjBytes",function(a){return null==a||null==this.pngjCache||0>a.indexOf(".png")?null:this.getJzu().getCachedPngjBytes(this,a)},"~S");f(b,"postByteArray",function(a,
b){if(a.startsWith("cache://"))return this.cachePut(a,b),"OK "+b.length+"cached";var c=this.getBufferedInputStreamOrErrorMessageFromName(a,null,!1,!1,b,!1,!0);if("string"==typeof c)return c;try{c=JU.Rdr.getStreamAsBytes(c,null)}catch(p){if(E(p,"java.io.IOException"))try{c.close()}catch(e){if(!E(e,"java.io.IOException"))throw e;}else throw p;}return null==c?"":JU.Rdr.fixUTF(c)},"~S,~A");b.isJmolType=c(b,"isJmolType",function(a){return a.equals("PNG")||a.equals("PNGJ")||a.equals("JMOL")||a.equals("ZIP")||
a.equals("ZIPALL")},"~S");b.isEmbeddable=c(b,"isEmbeddable",function(a){var b=a.lastIndexOf(".");0<=b&&(a=a.substring(b+1));a=a.toUpperCase();return JV.FileManager.isJmolType(a)||JU.PT.isOneOf(a,";JPG;JPEG;POV;IDTF;")},"~S");c(b,"getEmbeddedFileState",function(a,b,c){if(!JV.FileManager.isEmbeddable(a))return"";b=this.getZipDirectory(a,!1,b);if(0==b.length)return a=this.vwr.getFileAsString4(a,-1,!1,!0,!1,"file"),0>a.indexOf("**** Jmol Embedded Script ****")?"":JV.FileManager.getEmbeddedScript(a);for(var p=
0;p<b.length;p++)if(0<=b[p].indexOf(c))return a=z(-1,[a+"|"+b[p],null]),this.getFileDataAsString(a,-1,!1,!1,!1),a[1];return""},"~S,~B,~S");b.stripTypePrefix=c(b,"stripTypePrefix",function(a){var b=a.indexOf("::");return 0>b||20<=b?a:a.substring(b+2)},"~S");b.getEmbeddedScript=c(b,"getEmbeddedScript",function(a){if(null==a)return a;var b=a.indexOf("**** Jmol Embedded Script ****");if(0>b)return a;var c=a.lastIndexOf("/*",b),p=a.indexOf(("*"==a.charAt(c+2)?"*":"")+"*/",b);for(0<=c&&p>=b&&(a=a.substring(b+
30,p)+"\n");0<=(c=a.indexOf(" #Jmol...\x00"));)a=a.substring(0,c)+a.substring(c+10+4);JU.Logger.debugging&&JU.Logger.debug(a);return a},"~S");c(b,"isZipStream",function(a){return this.vwr.getJzt().isZipStream(a)},"~O");c(b,"openFileAsync",function(a,b,c){var p=0!=(b&32);!p&&(0!=(b&64)&&JV.FileManager.isEmbeddable(a))&&this.checkResize(a);var e=0!=(b&2),g=0!=(b&8),j=null;a=a.trim().$replace("\\","/");var f=a.startsWith("cache://");this.vwr.isApplet&&0>a.indexOf("://")&&(a="file://"+(a.startsWith("/")?
"":"/")+a);try{if(p)j="script "+JU.PT.esc(a);else if(a.endsWith(".pse"))j=(f?"":"zap;")+"load SYNC "+JU.PT.esc(a)+(this.vwr.isApplet?"":" filter 'DORESIZE'");else{if(a.endsWith(".jvxl"))j="isosurface ";else if(!a.toLowerCase().endsWith(".spt")){null==c?c=this.getDragDropFileTypeName(a):c.endsWith("::")||(c+="::");if(null==c){try{var l=this.vwr.getBufferedInputStream(a);c=JV.FileManager.determineSurfaceFileType(JU.Rdr.getBufferedReader(l,"ISO-8859-1"));if(null==c){j="script "+JU.PT.esc(a);return}}catch(y){if(E(y,
"java.io.IOException"))return;throw y;}j="MENU"===c?"load MENU "+JU.PT.esc(a):"if (_filetype == 'Pdb') { isosurface sigma 1.0 within 2.0 {*} "+JU.PT.esc(a)+" mesh nofill }; else; { isosurface "+JU.PT.esc(a)+"}";return}if(c.equals("spt::")){j="script "+JU.PT.esc(a.startsWith("spt::")?a.substring(5):a);return}if(c.equals("dssr"))j="model {visible} property dssr ";else if(c.equals("Jmol"))j="script ";else if(c.equals("Cube::"))j=0==this.vwr.ms.ac?"load "+JU.PT.esc(a)+";":"",j+="isosurface sign red blue ";
else if(!c.equals("spt")){if(0!=(b&16))switch(b=b&-17|1,0==this.vwr.ms.ac?0:this.vwr.confirm(J.i18n.GT.$("Would you like to replace the current model with the selected model?"),J.i18n.GT.$("Would you like to append?"))){case 2:return;case 0:break;default:b|=4}p=0!=(b&4);b=0!=(b&1)&&!p;if(c.endsWith("::")){var n=c.indexOf("|");0<=n&&(a+=c.substring(n,c.length-2),c="");a=c+a}j=this.vwr.g.defaultDropScript;if(j.equals("zap; load SYNC \"%FILE\";if (%ALLOWCARTOONS && _loadScript == '' && defaultLoadScript == '' && _filetype == 'Pdb') {if ({(protein or nucleic)&*/1.1} && {*/1.1}[1].groupindex != {*/1.1}[0].groupindex){select protein or nucleic;cartoons only;}if ({visible && cartoons > 0}){color structure}else{wireframe -0.1};if (!{visible}){select !visible;wireframe 0.15;color none;select !visible;spacefill 23%};select *}")&&
(!JV.JC.isLikelyPDB(c)||!b))n=j.indexOf("if ("),0<=n&&(j=j.substring(0,n).trim());j=JU.PT.rep(j,"%FILE",a);j=JU.PT.rep(j,"%ALLOWCARTOONS",""+b);if(j.toLowerCase().startsWith("zap")&&(f||p))j=j.substring(3);p&&(j=JU.PT.rep(j,"load SYNC","load append"));return}}null==j&&!e&&this.vwr.scriptEditorVisible?this.vwr.showEditor(z(-1,[a,this.vwr.getFileAsString3(a,!0,null)])):j=(null==j?"script ":j)+JU.PT.esc(a)}}finally{null!=j&&this.vwr.evalString(j+(g?"#!NOAUTOPLAY":""))}},"~S,~N,~S");c(b,"getDragDropFileTypeName",
function(a){var b=a.indexOf("::");if(0<=b)return a.substring(0,b+2);if(a.startsWith("="))return"pdb";if(a.endsWith(".dssr"))return"dssr";var b=this.getUnzippedReaderOrStreamFromName(a,null,!0,!1,!0,!0,null),c=null;if(this.isZipStream(b)){a=this.vwr.getZipDirectoryAsString(a);if(0<=a.indexOf("JmolManifest"))return"Jmol";c=this.getFileTypeName(JU.Rdr.getBR(a))}else if(C(b,"java.io.BufferedReader")||C(b,"java.io.BufferedInputStream"))c=this.getFileTypeName(b);return null!=c?c+"::":JU.AU.isAS(b)?b[0]:
null},"~S");c(b,"checkResize",function(a){try{var b=this.getEmbeddedFileState(a,!1,"state.spt");0<=b.indexOf("preferredWidthHeight")&&this.vwr.sm.resizeInnerPanelString(b)}catch(c){}},"~S");c(b,"getJmolDataReader",function(){null==this.staticJmolDataReader&&(this.staticJmolDataReader=J.adapter.smarter.Resolver.getReader("JmolData",null),this.staticJmolDataReader.vwr=this.vwr);return this.staticJmolDataReader});c(b,"readCifData",function(a,b){var c=null!=a&&0<=a.indexOf("#CIF"),p=null,e=null==a?-1:
a.indexOf(";keys=");0<=e&&(p=a.substring(e+6).$plit(","),a=a.substring(0,e));if(null==b&&null!=a&&0<=a.toUpperCase().indexOf("BCIF")){p=this.getBufferedInputStream(a);try{return J.api.Interface.getInterface("JU.MessagePackReader",this.vwr,"script").getMapForStream(p)}catch(g){if(E(g,Exception))return g.printStackTrace(),new java.util.Hashtable;throw g;}}c=c?a:null==a||0==a.length?this.vwr.getCurrentFileAsString("script"):this.getAsciiFileOrNull(a);if(null==c||2>c.length)return null;c=JU.Rdr.getBR(c);
null==b&&(b=this.getFileTypeName(c));return null==b?null:this.readCifDataKey(c,b,p)},"~S,~S");c(b,"readCifDataKey",function(a,b,c){a=C(a,"java.io.BufferedReader")?a:JU.Rdr.getBR(a);return JU.Rdr.readCifData(J.api.Interface.getInterface("Cif2".equals(b)?"J.adapter.readers.cif.Cif2DataParser":"JU.CifDataParser",this.vwr,"script"),a,c)},"~O,~S,~A");c(b,"getAsciiFileOrNull",function(a){a=z(-1,[a,null]);return this.getFileDataAsString(a,-1,!1,!1,!1)?a[1]:null},"~S");c(b,"getFileTypeName",function(a){return this.vwr.getModelAdapter().getFileTypeName(a)},
"~O");b.SIMULATION_PROTOCOL="http://SIMULATION/";b.scriptFilePrefixes=z(-1,['/*file*/"','FILE0="','FILE1="'])});m("JV");x(["java.util.Hashtable","JU.P3","J.c.CBK"],"JV.GlobalSettings","JU.DF $.PT $.SB J.c.STR JS.SV JU.Escape $.Logger JV.JC $.StateManager $.Viewer".split(" "),function(){var b=s(function(){this.htUserVariables=this.htPropertyFlagsRemoved=this.htBooleanParameterFlags=this.htNonbooleanParameterValues=this.vwr=null;this.zDepth=0;this.zShadePower=3;this.zSlab=50;this.slabByAtom=this.slabByMolecule=
!1;this.appendNew=this.allowEmbeddedScripts=!0;this.appletProxy="";this.applySymmetryToBonds=!1;this.atomTypes="";this.autoBond=!0;this.axesOrientationRasmol=!1;this.bondRadiusMilliAngstroms=150;this.bondTolerance=0.45;this.defaultDirectory="";this.defaultStructureDSSP=!0;this.ptDefaultLattice=null;this.defaultLoadFilter=this.defaultLoadScript="";this.defaultDropScript="zap; load SYNC \"%FILE\";if (%ALLOWCARTOONS && _loadScript == '' && defaultLoadScript == '' && _filetype == 'Pdb') {if ({(protein or nucleic)&*/1.1} && {*/1.1}[1].groupindex != {*/1.1}[0].groupindex){select protein or nucleic;cartoons only;}if ({visible && cartoons > 0}){color structure}else{wireframe -0.1};if (!{visible}){select !visible;wireframe 0.15;color none;select !visible;spacefill 23%};select *}";
this.forceAutoBond=!1;this.fractionalRelative=!0;this.inlineNewlineChar="|";this.resolverResolver=this.macroDirectory=this.pubChemFormat=this.nihResolverFormat=this.smilesUrlFormat=this.nmrPredictFormat=this.nmrUrlFormat=this.pdbLoadLigandFormat=this.pdbLoadFormat=this.loadFormat=null;this.checkCIR=!1;this.minBondDistance=0.4;this.minPixelSelRadius=6;this.pdbSequential=this.pdbGetHeader=this.pdbAddHydrogens=!1;this.percentVdwAtom=23;this.smallMoleculeMaxAtoms=4E4;this.smartAromatic=!0;this.doublePrecision=
this.legacyJavaFloat=this.legacyHAddition=this.legacyAutoBonding=this.zeroBasedXyzRasmol=!1;this.modulateOccupancy=this.jmolInJSpecView=!0;this.dotSolvent=this.allowMoveAtoms=this.allowRotateSelected=!1;this.defaultTorsionLabel=this.defaultDistanceLabel=this.defaultAngleLabel="%VALUE %UNITS";this.measureAllModels=this.justifyMeasurements=!1;this.minimizationSteps=100;this.minimizationRefresh=!0;this.minimizationSilent=!1;this.minimizationCriterion=0.001;this.minimizationMaxAtoms=200;this.minimizationReportSteps=
10;this.infoFontSize=20;this.antialiasDisplay=!1;this.displayCellParameters=this.antialiasTranslucent=this.imageState=this.antialiasImages=!0;this.dotsSelectedOnly=!1;this.dotSurface=!0;this.dotDensity=3;this.meshScale=this.dotScale=1;this.isosurfaceKey=this.greyscaleRendering=this.mode2d=!1;this.isosurfacePropertySmoothing=!0;this.isosurfacePropertySmoothingPower=7;this.platformSpeed=10;this.repaintWaitMs=1E3;this.showHiddenSelectionHalos=!1;this.showMeasurements=this.showKeyStrokes=!0;this.showTiming=
!1;this.zoomLarge=!0;this.zoomHeight=!1;this.backgroundImageFileName=null;this.occupancyThreshold=50;this.hbondsBackbone=this.bondModeOr=this.partialDots=!1;this.hbondsAngleMinimum=90;this.hbondNODistanceMaximum=3.25;this.hbondHXDistanceMaximum=2.5;this.hbondsRasmol=!0;this.hbondsSolid=!1;this.modeMultipleBond=2;this.showMultipleBonds=this.showHydrogens=!0;this.ssbondsBackbone=!1;this.multipleBondSpacing=-1;this.multipleBondRadiusFactor=0;this.multipleBondBananas=!1;this.nboCharges=!0;this.cartoonRockets=
this.cartoonBaseEdges=!1;this.cartoonBlockHeight=0.5;this.cipRule6Full=this.chainCaseSensitive=this.cartoonRibose=this.cartoonLadders=this.cartoonFancy=this.cartoonSteps=this.cartoonBlocks=!1;this.hermiteLevel=0;this.rangeSelected=this.highResolutionFlag=!1;this.rasmolHeteroSetting=this.rasmolHydrogenSetting=!0;this.ribbonAspectRatio=16;this.rocketBarrels=this.ribbonBorder=!1;this.sheetSmoothing=1;this.translucent=this.traceAlpha=!0;this.twistedSheets=!1;this.allowAudio=this.autoplayMovie=!0;this.allowGestures=
!1;this.allowMultiTouch=this.allowModelkit=!0;this.hiddenLinesDashed=this.allowKeyStrokes=!1;this.animationFps=10;this.atomPicking=!0;this.autoFps=!1;this.axesMode=603979809;this.axesScale=2;this.axesOffset=0;this.starWidth=0.05;this.bondPicking=!1;this.dataSeparator="~~~";this.debugScript=!1;this.defaultDrawArrowScale=0.5;this.defaultLabelXYZ="%a";this.defaultLabelPDB="%m%r";this.defaultTranslucent=0.5;this.delayMaximumMs=0;this.dipoleScale=1;this.drawFontSize=16;this.drawPicking=this.drawHover=
this.dragSelected=this.disablePopupMenu=!1;this.dsspCalcHydrogen=!0;this.labelKey=this.elementKey=!1;this.energyUnits="kJ";this.exportScale=0;this.helpPath="https://chemapps.stolaf.edu/jmol/docs/index.htm";this.fontScaling=!1;this.fontCaching=!0;this.forceField="MMFF";this.helixStep=1;this.hideNameInPopup=!1;this.hoverDelayMs=500;this.labelPointerWidth=2;this.loadAtomDataTolerance=0.01;this.logGestures=this.logCommands=!1;this.measureDistanceUnits="nanometers";this.measurementLabels=!0;this.monitorEnergy=
this.messageStyleChime=!1;this.modulationScale=1;this.multiProcessor=!0;this.particleRadius=20;this.pickingSpinRate=10;this.pickLabel="";this.pointGroupDistanceTolerance=0.2;this.pointGroupLinearTolerance=8;this.preserveState=!0;this.propertyColorScheme="roygb";this.quaternionFrame="p";this.saveProteinStructureState=!0;this.showModVecs=!1;this.showUnitCellDetails=!0;this.solventProbeRadius=1.2;this.scriptDelay=0;this.statusReporting=this.selectAllModels=!0;this.strandCountForStrands=5;this.strandCountForMeshRibbon=
7;this.strutSpacing=6;this.strutLengthMaximum=7;this.strutDefaultRadius=0.3;this.symmetryHermannMauguin=this.strutsMultiple=!1;this.waitForMoveTo=this.useScriptQueue=this.useNumberLocalization=this.useMinimizationThread=!0;this.noDelay=!1;this.vectorScale=1;this.vectorsCentered=this.vectorSymmetry=!1;this.vectorTrail=0;this.vibrationScale=this.vibrationPeriod=1;this.navigationPeriodic=this.navigationMode=this.hideNavigationPoint=this.wireframeRotation=!1;this.navigationSpeed=5;this.showNavigationPointAlways=
!1;this.stereoState=null;this.modelKitMode=!1;this.objMad10=this.objStateOn=this.objColors=null;this.ellipsoidFill=this.ellipsoidArrows=this.ellipsoidArcs=this.ellipsoidDots=this.ellipsoidAxes=!1;this.ellipsoidBall=!0;this.ellipsoidDotCount=200;this.ellipsoidAxisDiameter=0.02;this.testFlag4=this.testFlag3=this.testFlag2=this.testFlag1=!1;this.structureList=null;this.haveSetStructureList=!1;this.bondingVersion=0;r(this,arguments)},JV,"GlobalSettings",null);N(b,function(){this.htUserVariables=new java.util.Hashtable;
this.ptDefaultLattice=new JU.P3;this.objColors=D(7,0);this.objStateOn=ya(7,!1);this.objMad10=D(7,0);this.structureList=new java.util.Hashtable;this.structureList.put(J.c.STR.TURN,M(-1,[30,90,-15,95]));this.structureList.put(J.c.STR.SHEET,M(-1,[-180,-10,70,180,-180,-45,-180,-130,140,180,90,180]));this.structureList.put(J.c.STR.HELIX,M(-1,[-160,0,-100,45]))});u(b,function(a,b,c){this.vwr=a;this.htNonbooleanParameterValues=new java.util.Hashtable;this.htBooleanParameterFlags=new java.util.Hashtable;
this.htPropertyFlagsRemoved=new java.util.Hashtable;this.loadFormat=this.pdbLoadFormat=JV.JC.databases.get("pdb");this.pdbLoadLigandFormat=JV.JC.databases.get("ligand");this.nmrUrlFormat=JV.JC.databases.get("nmr");this.nmrPredictFormat=JV.JC.databases.get("nmrdb");this.pubChemFormat=JV.JC.databases.get("pubchem");this.resolverResolver=JV.JC.databases.get("resolverresolver");this.macroDirectory="https://chemapps.stolaf.edu/jmol/macros";null==b?this.setB("undoAuto",!a.isApplet):(this.setB("undoAuto",
a.getBooleanProperty("undoAuto")),c||(this.setO("_pngjFile",b.getParameter("_pngjFile",!1)),this.htUserVariables=b.htUserVariables),this.debugScript=b.debugScript,this.disablePopupMenu=b.disablePopupMenu,this.messageStyleChime=b.messageStyleChime,this.measureDistanceUnits=b.measureDistanceUnits,this.defaultDirectory=b.defaultDirectory,this.autoplayMovie=b.autoplayMovie,this.allowAudio=b.allowAudio,this.allowGestures=b.allowGestures,this.allowModelkit=b.allowModelkit,this.allowMultiTouch=b.allowMultiTouch,
this.allowKeyStrokes=b.allowKeyStrokes,this.legacyAutoBonding=b.legacyAutoBonding,this.legacyHAddition=b.legacyHAddition,this.legacyJavaFloat=b.legacyJavaFloat,this.minimizationReportSteps=b.minimizationReportSteps,this.doublePrecision=b.doublePrecision,this.bondingVersion=b.bondingVersion,this.platformSpeed=b.platformSpeed,this.useScriptQueue=b.useScriptQueue,this.showTiming=b.showTiming,this.wireframeRotation=b.wireframeRotation,this.testFlag1=b.testFlag1,this.testFlag2=b.testFlag2,this.testFlag3=
b.testFlag3,this.testFlag4=b.testFlag4,this.nihResolverFormat=b.nihResolverFormat);null==this.nihResolverFormat&&(this.nihResolverFormat=JV.JC.databases.get("nci"));this.setCIR(this.nihResolverFormat,!1);var p;c=0;for(var e=J.c.CBK.values();c<e.length&&((p=e[c])||1);c++)this.resetValue(p.name()+"Callback",b);this.setF("cameraDepth",3);this.setI("undoMax",a.stm.getUndoMax());this.setI("contextDepthMax",100);this.setI("depth",0);this.setF("gestureSwipeFactor",1);this.setB("hideNotSelected",!1);this.setI("historyLevel",
0);this.setO("hoverLabel","");this.setB("isKiosk",a.isKiosk());this.setO("logFile",a.getLogFileName());this.setI("logLevel",JU.Logger.getLogLevel());this.setF("mouseWheelFactor",1.15);this.setF("mouseDragFactor",1);this.setI("navFps",10);this.setI("navigationDepth",0);this.setI("navigationSlab",0);this.setI("navX",0);this.setI("navY",0);this.setI("navZ",0);this.setO("pathForAllFiles","");this.setB("perspectiveDepth",!0);this.setI("perspectiveModel",11);this.setO("picking","identify");this.setO("pickingStyle",
"toggle");this.setB("refreshing",!0);this.setI("rotationRadius",0);this.setI("scaleAngstromsPerInch",0);this.setI("scriptReportingLevel",0);this.setB("selectionHalos",!1);this.setB("showaxes",!1);this.setB("showboundbox",!1);this.setB("showfrank",!1);this.setB("showUnitcell",!1);this.setI("slab",100);this.setB("slabEnabled",!1);this.setF("slabrange",0);this.setI("spinX",0);this.setI("spinY",30);this.setI("spinZ",0);this.setI("spinFps",30);this.setF("visualRange",5);this.setI("stereoDegrees",-5);this.setB("syncScript",
a.sm.syncingScripts);this.setB("syncMouse",a.sm.syncingMouse);this.setB("syncStereo",a.sm.stereoSync);this.setB("windowCentered",!0);this.setB("zoomEnabled",!0);this.setI("_version",JV.JC.versionInt);this.setO("_versionDate",JV.Viewer.getJmolVersion());this.setB("axesWindow",!0);this.setB("axesMolecular",!1);this.setB("axesPosition",!1);this.setB("axesUnitcell",!1);this.setI("backgroundModel",0);this.setB("colorRasmol",!1);this.setO("currentLocalPath","");this.setO("defaultLattice","{0 0 0}");this.setO("defaultColorScheme",
"Jmol");this.setO("defaultDirectoryLocal","");this.setO("defaults","Jmol");this.setO("defaultVDW","Jmol");this.setO("exportDrivers","Idtf;Maya;Povray;Vrml;X3d;Stl;Tachyon;Obj");this.setI("propertyAtomNumberColumnCount",0);this.setI("propertyAtomNumberField",0);this.setI("propertyDataColumnCount",0);this.setI("propertyDataField",0);this.setI("undoMax",a.stm.getUndoMax());this.setB("allowEmbeddedScripts",this.allowEmbeddedScripts);this.setB("allowGestures",this.allowGestures);this.setB("allowKeyStrokes",
this.allowKeyStrokes);this.setB("allowModelkit",this.allowModelkit);this.setB("allowMultiTouch",this.allowMultiTouch);this.setB("allowRotateSelected",this.allowRotateSelected);this.setB("allowMoveAtoms",this.allowMoveAtoms);this.setI("animationFps",this.animationFps);this.setB("antialiasImages",this.antialiasImages);this.setB("antialiasDisplay",this.antialiasDisplay);this.setB("antialiasTranslucent",this.antialiasTranslucent);this.setB("appendNew",this.appendNew);this.setO("appletProxy",this.appletProxy);
this.setB("applySymmetryToBonds",this.applySymmetryToBonds);this.setB("atomPicking",this.atomPicking);this.setO("atomTypes",this.atomTypes);this.setB("autoBond",this.autoBond);this.setB("autoFps",this.autoFps);this.setI("axesMode",603979808==this.axesMode?2:603979804==this.axesMode?1:0);this.setF("axesScale",this.axesScale);this.setF("axesOffset",this.axesOffset);this.setB("axesOrientationRasmol",this.axesOrientationRasmol);this.setF("cartoonBlockHeight",this.cartoonBlockHeight);this.setB("cartoonBlocks",
this.cartoonBlocks);this.setB("cartoonSteps",this.cartoonSteps);this.setB("bondModeOr",this.bondModeOr);this.setB("bondPicking",this.bondPicking);this.setI("bondRadiusMilliAngstroms",this.bondRadiusMilliAngstroms);this.setF("bondTolerance",this.bondTolerance);this.setB("cartoonBaseEdges",this.cartoonBaseEdges);this.setB("cartoonFancy",this.cartoonFancy);this.setB("cartoonLadders",this.cartoonLadders);this.setB("cartoonLadders",this.cartoonRibose);this.setB("cartoonRockets",this.cartoonRockets);this.setB("chainCaseSensitive",
this.chainCaseSensitive);this.setB("cipRule6Full",this.cipRule6Full);this.setI("bondingVersion",this.bondingVersion);this.setO("dataSeparator",this.dataSeparator);this.setB("debugScript",this.debugScript);this.setO("defaultAngleLabel",this.defaultAngleLabel);this.setF("defaultDrawArrowScale",this.defaultDrawArrowScale);this.setO("defaultDirectory",this.defaultDirectory);this.setO("defaultDistanceLabel",this.defaultDistanceLabel);this.setO("defaultDropScript",this.defaultDropScript);this.setO("defaultLabelPDB",
this.defaultLabelPDB);this.setO("defaultLabelXYZ",this.defaultLabelXYZ);this.setO("defaultLoadFilter",this.defaultLoadFilter);this.setO("defaultLoadScript",this.defaultLoadScript);this.setB("defaultStructureDSSP",this.defaultStructureDSSP);this.setO("defaultTorsionLabel",this.defaultTorsionLabel);this.setF("defaultTranslucent",this.defaultTranslucent);this.setI("delayMaximumMs",this.delayMaximumMs);this.setF("dipoleScale",this.dipoleScale);this.setB("disablePopupMenu",this.disablePopupMenu);this.setB("displayCellParameters",
this.displayCellParameters);this.setI("dotDensity",this.dotDensity);this.setI("dotScale",this.dotScale);this.setB("dotsSelectedOnly",this.dotsSelectedOnly);this.setB("dotSurface",this.dotSurface);this.setB("dragSelected",this.dragSelected);this.setB("drawHover",this.drawHover);this.setF("drawFontSize",this.drawFontSize);this.setB("drawPicking",this.drawPicking);this.setB("dsspCalculateHydrogenAlways",this.dsspCalcHydrogen);this.setB("elementkey",this.elementKey);this.setB("labelkey",this.labelKey);
this.setB("ellipsoidArcs",this.ellipsoidArcs);this.setB("ellipsoidArrows",this.ellipsoidArrows);this.setB("ellipsoidAxes",this.ellipsoidAxes);this.setF("ellipsoidAxisDiameter",this.ellipsoidAxisDiameter);this.setB("ellipsoidBall",this.ellipsoidBall);this.setI("ellipsoidDotCount",this.ellipsoidDotCount);this.setB("ellipsoidDots",this.ellipsoidDots);this.setB("ellipsoidFill",this.ellipsoidFill);this.setO("energyUnits",this.energyUnits);this.setF("exportScale",this.exportScale);this.setB("doublePrecision",
this.doublePrecision);this.setB("fontScaling",this.fontScaling);this.setB("fontCaching",this.fontCaching);this.setB("forceAutoBond",this.forceAutoBond);this.setO("forceField",this.forceField);this.setB("fractionalRelative",this.fractionalRelative);this.setF("particleRadius",this.particleRadius);this.setB("greyscaleRendering",this.greyscaleRendering);this.setF("hbondsAngleMinimum",this.hbondsAngleMinimum);this.setF("hbondHXDistanceMaximum",this.hbondHXDistanceMaximum);this.setF("hbondsDistanceMaximum",
this.hbondNODistanceMaximum);this.setB("hbondsBackbone",this.hbondsBackbone);this.setB("hbondsRasmol",this.hbondsRasmol);this.setB("hbondsSolid",this.hbondsSolid);this.setI("helixStep",this.helixStep);this.setO("helpPath",this.helpPath);this.setI("hermiteLevel",this.hermiteLevel);this.setB("hideNameInPopup",this.hideNameInPopup);this.setB("hideNavigationPoint",this.hideNavigationPoint);this.setB("hiddenLinesDashed",this.hiddenLinesDashed);this.setB("highResolution",this.highResolutionFlag);this.setF("hoverDelay",
this.hoverDelayMs/1E3);this.setB("imageState",this.imageState);this.setI("infoFontSize",this.infoFontSize);this.setB("isosurfaceKey",this.isosurfaceKey);this.setB("isosurfacePropertySmoothing",this.isosurfacePropertySmoothing);this.setI("isosurfacePropertySmoothingPower",this.isosurfacePropertySmoothingPower);this.setB("jmolInJSpecView",this.jmolInJSpecView);this.setI("labelPointerWidth",this.labelPointerWidth);this.setB("justifyMeasurements",this.justifyMeasurements);this.setB("legacyAutoBonding",
this.legacyAutoBonding);this.setB("legacyHAddition",this.legacyHAddition);this.setB("legacyJavaFloat",this.legacyJavaFloat);this.setF("loadAtomDataTolerance",this.loadAtomDataTolerance);this.setO("loadFormat",this.loadFormat);this.setO("loadLigandFormat",this.pdbLoadLigandFormat);this.setB("logCommands",this.logCommands);this.setB("logGestures",this.logGestures);this.setB("measureAllModels",this.measureAllModels);this.setB("measurementLabels",this.measurementLabels);this.setO("measurementUnits",this.measureDistanceUnits);
this.setI("meshScale",this.meshScale);this.setB("messageStyleChime",this.messageStyleChime);this.setF("minBondDistance",this.minBondDistance);this.setI("minPixelSelRadius",this.minPixelSelRadius);this.setI("minimizationReportSteps",this.minimizationReportSteps);this.setI("minimizationSteps",this.minimizationSteps);this.setB("minimizationRefresh",this.minimizationRefresh);this.setB("minimizationSilent",this.minimizationSilent);this.setF("minimizationCriterion",this.minimizationCriterion);this.setB("mode2d",
this.mode2d);this.setB("modelKitMode",this.modelKitMode);this.setF("modulationScale",this.modulationScale);this.setB("monitorEnergy",this.monitorEnergy);this.setF("multipleBondRadiusFactor",this.multipleBondRadiusFactor);this.setB("multipleBondBananas",this.multipleBondBananas);this.setF("multipleBondSpacing",this.multipleBondSpacing);this.setB("multiProcessor",this.multiProcessor&&1<JV.Viewer.nProcessors);this.setB("navigationMode",this.navigationMode);this.setB("navigationPeriodic",this.navigationPeriodic);
this.setF("navigationSpeed",this.navigationSpeed);this.setB("nboCharges",this.nboCharges);this.setB("noDelay",this.noDelay);this.setO("nmrPredictFormat",this.nmrPredictFormat);this.setO("nmrUrlFormat",this.nmrUrlFormat);this.setI("occupancyThreshold",this.occupancyThreshold);this.setB("partialDots",this.partialDots);this.setB("pdbAddHydrogens",this.pdbAddHydrogens);this.setB("pdbGetHeader",this.pdbGetHeader);this.setB("pdbSequential",this.pdbSequential);this.setI("percentVdwAtom",this.percentVdwAtom);
this.setI("pickingSpinRate",this.pickingSpinRate);this.setO("pickLabel",this.pickLabel);this.setI("platformSpeed",this.platformSpeed);this.setF("pointGroupLinearTolerance",this.pointGroupLinearTolerance);this.setF("pointGroupDistanceTolerance",this.pointGroupDistanceTolerance);this.setB("preserveState",this.preserveState);this.setO("propertyColorScheme",this.propertyColorScheme);this.setO("quaternionFrame",this.quaternionFrame);this.setB("rangeSelected",this.rangeSelected);this.setI("repaintWaitMs",
this.repaintWaitMs);this.setI("ribbonAspectRatio",this.ribbonAspectRatio);this.setB("ribbonBorder",this.ribbonBorder);this.setB("rocketBarrels",this.rocketBarrels);this.setB("saveProteinStructureState",this.saveProteinStructureState);this.setB("scriptqueue",this.useScriptQueue);this.setB("selectAllModels",this.selectAllModels);this.setB("selectHetero",this.rasmolHeteroSetting);this.setB("selectHydrogen",this.rasmolHydrogenSetting);this.setF("sheetSmoothing",this.sheetSmoothing);this.setB("showHiddenSelectionHalos",
this.showHiddenSelectionHalos);this.setB("showHydrogens",this.showHydrogens);this.setB("showKeyStrokes",this.showKeyStrokes);this.setB("showMeasurements",this.showMeasurements);this.setB("showModulationVectors",this.showModVecs);this.setB("showMultipleBonds",this.showMultipleBonds);this.setB("showNavigationPointAlways",this.showNavigationPointAlways);this.setI("showScript",this.scriptDelay);this.setB("showtiming",this.showTiming);this.setB("slabByMolecule",this.slabByMolecule);this.setB("slabByAtom",
this.slabByAtom);this.setB("smartAromatic",this.smartAromatic);this.setI("minimizationMaxAtoms",this.minimizationMaxAtoms);this.setI("smallMoleculeMaxAtoms",this.smallMoleculeMaxAtoms);this.setO("smilesUrlFormat",this.smilesUrlFormat);this.setO("macroDirectory",this.macroDirectory);this.setO("nihResolverFormat",this.nihResolverFormat);this.setO("pubChemFormat",this.pubChemFormat);this.setB("showUnitCellDetails",this.showUnitCellDetails);this.setB("solventProbe",this.dotSolvent);this.setF("solventProbeRadius",
this.solventProbeRadius);this.setB("ssbondsBackbone",this.ssbondsBackbone);this.setF("starWidth",this.starWidth);this.setB("statusReporting",this.statusReporting);this.setI("strandCount",this.strandCountForStrands);this.setI("strandCountForStrands",this.strandCountForStrands);this.setI("strandCountForMeshRibbon",this.strandCountForMeshRibbon);this.setF("strutDefaultRadius",this.strutDefaultRadius);this.setF("strutLengthMaximum",this.strutLengthMaximum);this.setI("strutSpacing",this.strutSpacing);
this.setB("strutsMultiple",this.strutsMultiple);this.setB("symmetryhermannmauguin",this.symmetryHermannMauguin);this.setB("testFlag1",this.testFlag1);this.setB("testFlag2",this.testFlag2);this.setB("testFlag3",this.testFlag3);this.setB("testFlag4",this.testFlag4);this.setB("traceAlpha",this.traceAlpha);this.setB("translucent",this.translucent);this.setB("twistedSheets",this.twistedSheets);this.setB("useMinimizationThread",this.useMinimizationThread);this.setB("useNumberLocalization",this.useNumberLocalization);
this.setB("vectorsCentered",this.vectorsCentered);this.setF("vectorScale",this.vectorScale);this.setB("vectorSymmetry",this.vectorSymmetry);this.setI("vectorTrail",this.vectorTrail);this.setF("vibrationPeriod",this.vibrationPeriod);this.setF("vibrationScale",this.vibrationScale);this.setB("waitForMoveTo",this.waitForMoveTo);this.setB("wireframeRotation",this.wireframeRotation);this.setI("zDepth",this.zDepth);this.setB("zeroBasedXyzRasmol",this.zeroBasedXyzRasmol);this.setB("zoomHeight",this.zoomHeight);
this.setB("zoomLarge",this.zoomLarge);this.setI("zShadePower",this.zShadePower);this.setI("zSlab",this.zSlab)},"JV.Viewer,JV.GlobalSettings,~B");c(b,"clear",function(){for(var a=this.htUserVariables.keySet().iterator();a.hasNext();){var b=a.next();("@"==b.charAt(0)||b.startsWith("site_"))&&a.remove()}this.vwr.setPicked(-1,!1);this.setI("_atomhovered",-1);this.setO("_pickinfo","");this.setB("selectionhalos",!1);this.setB("hidenotselected",!1);this.setB("measurementlabels",this.measurementLabels=!0);
this.setB("drawHover",this.drawHover=!1);this.vwr.stm.saveScene("DELETE",null)});c(b,"setUnits",function(a){var b=this.measureDistanceUnits,c=this.energyUnits;a.equalsIgnoreCase("angstroms")?this.measureDistanceUnits="angstroms":a.equalsIgnoreCase("nanometers")||a.equalsIgnoreCase("nm")?this.measureDistanceUnits="nanometers":a.equalsIgnoreCase("picometers")||a.equalsIgnoreCase("pm")?this.measureDistanceUnits="picometers":a.equalsIgnoreCase("bohr")||a.equalsIgnoreCase("au")?this.measureDistanceUnits=
"au":a.equalsIgnoreCase("vanderwaals")||a.equalsIgnoreCase("vdw")?this.measureDistanceUnits="vdw":a.toLowerCase().endsWith("hz")||a.toLowerCase().endsWith("khz")?this.measureDistanceUnits=a.toLowerCase():a.equalsIgnoreCase("kj")?this.energyUnits="kJ":a.equalsIgnoreCase("kcal")&&(this.energyUnits="kcal");b.equalsIgnoreCase(this.measureDistanceUnits)?c.equalsIgnoreCase(this.energyUnits)||this.setO("energyUnits",this.energyUnits):this.setO("measurementUnits",this.measureDistanceUnits)},"~S");c(b,"isJmolVariable",
function(a){return"_"==a.charAt(0)||this.htNonbooleanParameterValues.containsKey(a=a.toLowerCase())||this.htBooleanParameterFlags.containsKey(a)||0<=JV.GlobalSettings.unreportedProperties.indexOf(";"+a+";")},"~S");c(b,"resetValue",function(a,b){this.setO(a,null==b?"":b.getParameter(a,!0))},"~S,JV.GlobalSettings");c(b,"setB",function(a,b){a=a.toLowerCase();this.htNonbooleanParameterValues.containsKey(a)||this.htBooleanParameterFlags.put(a,b?Boolean.TRUE:Boolean.FALSE)},"~S,~B");c(b,"setI",function(a,
b){2147483647!=b&&this.setO(a,Integer.$valueOf(b))},"~S,~N");c(b,"setF",function(a,b){Float.isNaN(b)||this.setO(a,Float.$valueOf(b))},"~S,~N");c(b,"setOrRemoveO",function(a,b){null==b?this.removeParam(a):this.setO(a,b)},"~S,~O");c(b,"setO",function(a,b){a=a.toLowerCase();null==b||this.htBooleanParameterFlags.containsKey(a)||this.htNonbooleanParameterValues.put(a,b)},"~S,~O");c(b,"removeParam",function(a){a=a.toLowerCase();this.htBooleanParameterFlags.containsKey(a)?(this.htBooleanParameterFlags.remove(a),
this.htPropertyFlagsRemoved.containsKey(a)||this.htPropertyFlagsRemoved.put(a,Boolean.FALSE)):this.htNonbooleanParameterValues.containsKey(a)&&this.htNonbooleanParameterValues.remove(a)},"~S");c(b,"setUserVariable",function(a,b){null!=b&&(a=a.toLowerCase(),this.htUserVariables.put(a,b.setName(a)));return b},"~S,JS.SV");c(b,"unsetUserVariable",function(a){a.equals("all")||a.equals("variables")?(this.htUserVariables.clear(),JU.Logger.info("all user-defined variables deleted")):this.htUserVariables.containsKey(a)&&
(JU.Logger.info("variable "+a+" deleted"),this.htUserVariables.remove(a))},"~S");c(b,"removeUserVariable",function(a){this.htUserVariables.remove(a)},"~S");c(b,"getUserVariable",function(a){if(null==a)return null;a=a.toLowerCase();return this.htUserVariables.get(a)},"~S");c(b,"getParameterEscaped",function(a,b){a=a.toLowerCase();if(this.htNonbooleanParameterValues.containsKey(a)){var c=this.htNonbooleanParameterValues.get(a);return JV.StateManager.varClip(a,JU.Escape.e(c),b)}return this.htBooleanParameterFlags.containsKey(a)?
this.htBooleanParameterFlags.get(a).toString():this.htUserVariables.containsKey(a)?this.htUserVariables.get(a).escape():this.htPropertyFlagsRemoved.containsKey(a)?"false":"<not defined>"},"~S,~N");c(b,"getParameter",function(a,b){var c=this.getParam(a,!1);return null==c&&b?"":c},"~S,~B");c(b,"getAndSetNewVariable",function(a,b){if(null==a||0==a.length)a="x";var c=this.getParam(a,!0);return null==c&&b&&"_"!=a.charAt(0)?this.setUserVariable(a,JS.SV.newV(4,"")):JS.SV.getVariable(c)},"~S,~B");c(b,"getParam",
function(a,b){a=a.toLowerCase();if(a.equals("_memory")){var c=JU.DF.formatDecimal(0,1)+"/"+JU.DF.formatDecimal(0,1);this.htNonbooleanParameterValues.put("_memory",c)}return this.htNonbooleanParameterValues.containsKey(a)?this.htNonbooleanParameterValues.get(a):this.htBooleanParameterFlags.containsKey(a)?this.htBooleanParameterFlags.get(a):this.htPropertyFlagsRemoved.containsKey(a)?Boolean.FALSE:this.htUserVariables.containsKey(a)?(c=this.htUserVariables.get(a),b?c:JS.SV.oValue(c)):null},"~S,~B");
c(b,"getVariableList",function(){return JV.StateManager.getVariableList(this.htUserVariables,0,!0,!1)});c(b,"setStructureList",function(a,b){this.haveSetStructureList=!0;this.structureList.put(b,a)},"~A,J.c.STR");c(b,"getStructureList",function(){return this.structureList});b.doReportProperty=c(b,"doReportProperty",function(a){return"_"!=a.charAt(0)&&0>JV.GlobalSettings.unreportedProperties.indexOf(";"+a+";")},"~S");c(b,"getAllVariables",function(){var a=new java.util.Hashtable;a.putAll(this.htBooleanParameterFlags);
a.putAll(this.htNonbooleanParameterValues);a.putAll(this.htUserVariables);return a});c(b,"getLoadState",function(a){var b=new JU.SB;this.app(b,"set allowEmbeddedScripts false");this.allowEmbeddedScripts&&this.setB("allowEmbeddedScripts",!0);this.app(b,"set appendNew "+this.appendNew);this.app(b,"set appletProxy "+JU.PT.esc(this.appletProxy));this.app(b,"set applySymmetryToBonds "+this.applySymmetryToBonds);0<this.atomTypes.length&&this.app(b,"set atomTypes "+JU.PT.esc(this.atomTypes));this.app(b,
"set autoBond "+this.autoBond);this.axesOrientationRasmol&&this.app(b,"set axesOrientationRasmol true");this.app(b,"set bondRadiusMilliAngstroms "+this.bondRadiusMilliAngstroms);this.app(b,"set bondTolerance "+this.bondTolerance);this.app(b,"set defaultLattice "+JU.Escape.eP(this.ptDefaultLattice));this.app(b,"set defaultLoadFilter "+JU.PT.esc(this.defaultLoadFilter));this.app(b,'set defaultLoadScript ""');0<this.defaultLoadScript.length&&this.setO("defaultLoadScript",this.defaultLoadScript);this.app(b,
"set defaultStructureDssp "+this.defaultStructureDSSP);var c=this.vwr.getDefaultVdwNameOrData(-2147483648,null,null);this.app(b,"set defaultVDW "+c);c.equals("User")&&this.app(b,this.vwr.getDefaultVdwNameOrData(2147483647,null,null));this.app(b,"set forceAutoBond "+this.forceAutoBond);this.app(b,"#set defaultDirectory "+JU.PT.esc(this.defaultDirectory));this.app(b,"#set loadFormat "+JU.PT.esc(this.loadFormat));this.app(b,"#set loadLigandFormat "+JU.PT.esc(this.pdbLoadLigandFormat));this.app(b,"#set smilesUrlFormat "+
JU.PT.esc(this.smilesUrlFormat));this.app(b,"#set nihResolverFormat "+JU.PT.esc(this.nihResolverFormat));this.app(b,"#set pubChemFormat "+JU.PT.esc(this.pubChemFormat));this.app(b,"set bondingVersion "+this.bondingVersion);this.app(b,"set legacyAutoBonding "+this.legacyAutoBonding);this.app(b,"set legacyAutoBonding "+this.legacyAutoBonding);this.app(b,"set legacyHAddition "+this.legacyHAddition);this.app(b,"set legacyJavaFloat "+this.legacyJavaFloat);this.app(b,"set minBondDistance "+this.minBondDistance);
this.app(b,"set minimizationCriterion  "+this.minimizationCriterion);this.app(b,"set minimizationSteps  "+this.minimizationSteps);this.app(b,"set multipleBondBananas false");this.app(b,"set pdbAddHydrogens "+(null!=a&&a.get("pdbNoHydrogens")!==Boolean.TRUE?this.pdbAddHydrogens:!1));this.app(b,"set pdbGetHeader "+this.pdbGetHeader);this.app(b,"set pdbSequential "+this.pdbSequential);this.app(b,"set percentVdwAtom "+this.percentVdwAtom);this.app(b,"set smallMoleculeMaxAtoms "+this.smallMoleculeMaxAtoms);
this.app(b,"set smartAromatic "+this.smartAromatic);this.zeroBasedXyzRasmol&&this.app(b,"set zeroBasedXyzRasmol true");return b.toString()},"java.util.Map");c(b,"app",function(a,b){0!=b.length&&a.append("  ").append(b).append(";\n")},"JU.SB,~S");c(b,"setCIR",function(a,b){if(!(null==a||a.equals(this.nihResolverFormat)&&null!=this.smilesUrlFormat)){var c=a.indexOf("/structure");0<c&&(this.nihResolverFormat=a.substring(0,c+10),this.smilesUrlFormat=this.nihResolverFormat+"/%FILE/file?format=sdf&get3d=true",
b&&JU.Logger.info("CIR resolver set to "+this.nihResolverFormat+" template="+a))}},"~S,~B");b.unreportedProperties=(";ambientpercent;animationfps;antialiasdisplay;antialiasimages;antialiastranslucent;appendnew;axescolor;axesposition;axesmolecular;axesorientationrasmol;axesunitcell;axeswindow;axis1color;axis2color;axis3color;backgroundcolor;backgroundmodel;bondsymmetryatoms;boundboxcolor;cameradepth;bondingversion;ciprule6full;contextdepthmax;debug;debugscript;defaultlatttice;defaults;defaultdropscript;diffusepercent;;exportdrivers;exportscale;_filecaching;_filecache;fontcaching;fontscaling;forcefield;language;hbondsDistanceMaximum;hbondsangleminimum;jmolinJSV;legacyautobonding;legacyhaddition;legacyjavafloat;loglevel;logfile;loggestures;logcommands;measurestylechime;loadformat;loadligandformat;macrodirectory;mkaddhydrogens;minimizationmaxatoms;smilesurlformat;pubchemformat;nihresolverformat;edsurlformat;edsurlcutoff;multiprocessor;navigationmode;;nodelay;pathforallfiles;perspectivedepth;phongexponent;perspectivemodel;platformspeed;preservestate;refreshing;repaintwaitms;rotationradius;selectallmodels;showaxes;showaxis1;showaxis2;showaxis3;showboundbox;showfrank;showtiming;showunitcell;slabenabled;slab;slabrange;depth;zshade;zshadepower;specular;specularexponent;specularpercent;celshading;celshadingpower;specularpower;stateversion;statusreporting;stereo;stereostate;vibrationperiod;unitcellcolor;visualrange;windowcentered;zerobasedxyzrasmol;zoomenabled;mousedragfactor;mousewheelfactor;scriptqueue;scriptreportinglevel;syncscript;syncmouse;syncstereo;defaultdirectory;currentlocalpath;defaultdirectorylocal;ambient;bonds;colorrasmol;diffuse;fractionalrelative;frank;hetero;hidenotselected;hoverlabel;hydrogen;languagetranslation;measurementunits;navigationdepth;navigationslab;picking;pickingstyle;propertycolorscheme;radius;rgbblue;rgbgreen;rgbred;scaleangstromsperinch;selectionhalos;showscript;showselections;solvent;strandcount;spinx;spiny;spinz;spinfps;navx;navy;navz;navfps;"+
J.c.CBK.getNameList()+";undo;undoauto;undomax;atompicking;drawpicking;bondpicking;pickspinrate;picklabel;modelkitmode;autoplaymovie;allowaudio;allowgestures;allowkeystrokes;allowmultitouch;allowmodelkit;dodrop;hovered;historylevel;imagestate;iskiosk;useminimizationthread;checkcir;resolverresolver;showkeystrokes;saveproteinstructurestate;testflag1;testflag2;testflag3;testflag4;selecthetero;selecthydrogen;pointgrouplineartolerance;pointgroupdistancetolerance;minimizationreportsteps;labelkey;elementkey;symmetryhermannmauguin;mode2d;percentVdwAtom;").toLowerCase()});
m("JV");x(["java.util.Hashtable","JU.SB","$.V3","JU.Elements"],"JV.JC",["JU.PT","J.i18n.GT","JU.Logger"],function(){var b=G(JV,"JC",null);b.getNBOTypeFromName=c(b,"getNBOTypeFromName",function(a){a=";AO;;;;PNAO;;NAO;;;PNHO;;NHO;;;PNBO;;NBO;;;PNLMO;NLMO;;MO;;;;NO;;;;;;;;;;PRNBO;RNBO;;;;;;;;".indexOf(";"+a+";");return 0>a?a:w(a/6)+31},"~S");b.getCIPChiralityName=c(b,"getCIPChiralityName",function(a){switch(a){case 13:return"Z";case 5:return"z";case 14:return"E";case 6:return"e";case 17:return"M";case 18:return"P";
case 1:return"R";case 2:return"S";case 9:return"r";case 10:return"s";case 25:return"m";case 26:return"p";case 7:return"?";default:return""}},"~N");b.getCIPRuleName=c(b,"getCIPRuleName",function(a){return JV.JC.ruleNames[a]},"~N");b.getCIPChiralityCode=c(b,"getCIPChiralityCode",function(a){switch(a.charCodeAt(0)){case 90:return 13;case 122:return 5;case 69:return 14;case 101:return 6;case 82:return 1;case 83:return 2;case 114:return 9;case 115:return 10;case 63:return 7;default:return 0}},"~S");b.isLikelyPDB=
c(b,"isLikelyPDB",function(a){var b=a.indexOf(":");0<b&&(a=a.substring(0,b));return JU.PT.isOneOf(a,";MMCif;MMTF;BCIF;Pdb;Pqr;P2n;JmolData;PyMOL;")},"~S");b.fixOptimadeCall=c(b,"fixOptimadeCall",function(a){var b=a.indexOf("response_fields=")+16;if(16>b)b=a.indexOf("?"),a+=(0>b?"?":"&")+"response_fields=chemical_formula_descriptive,dimension_types,lattice_vectors,cartesian_site_positions,species_at_sites,species";else{for(var d=","+a.substring(b,(a+"&").indexOf("&",b))+",",c=d.length,h=0,e=0;0<=h;h=
e){e=",chemical_formula_descriptive,dimension_types,lattice_vectors,cartesian_site_positions,species_at_sites,species,".indexOf(",",h+1);if(0>e)break;h=",chemical_formula_descriptive,dimension_types,lattice_vectors,cartesian_site_positions,species_at_sites,species,".substring(h,e+1);0>d.indexOf(h)&&(d+=h.substring(1))}a=a.substring(0,b)+d.substring(1,d.length-1)+a.substring(b+c-2)}return a},"~S");b.resolveDataBase=c(b,"resolveDataBase",function(a,b,d){if(null==d){if(null==(d=JV.JC.databases.get(a.toLowerCase())))return null;
var c=b.indexOf("/");0>c&&(a.equals("pubchem")?b="name/"+b:a.equals("nci")&&(b+="/file?format=sdf&get3d=true"));d.startsWith("'")&&(c=b.indexOf("."),a=0<c?JU.PT.parseInt(b.substring(c+1)):0,0<c&&(b=b.substring(0,c)),d=JU.PT.rep(d,"%n",""+a))}else 0<=b.indexOf(".")&&0<=d.indexOf("%FILE.")&&(d=d.substring(0,d.indexOf("%FILE")));if(0<=d.indexOf("%c")){c=1;for(a=b.length;c<=a;c++)0<=d.indexOf("%c"+c)&&(d=JU.PT.rep(d,"%c"+c,b.substring(c-1,c).toLowerCase()))}return 0<=d.indexOf("%FILE")?JU.PT.rep(d,"%FILE",
b):0<=d.indexOf("%file")?JU.PT.rep(d,"%file",b.toLowerCase()):d+b},"~S,~S,~S");b.fixProtocol=c(b,"fixProtocol",function(a){var b=null!=a&&0<=a.indexOf("http"),b=null==a||!b?a:0==a.indexOf("http://www.rcsb.org/pdb/files/")?JV.JC.resolveDataBase(0<=a.indexOf("/ligand/")?"ligand":"pdb",a.substring(a.lastIndexOf("/")+1),null):0==a.indexOf("http://www.ebi")||0==a.indexOf("http://rruff")||0==a.indexOf("http://pubchem")||0==a.indexOf("http://cactus")||0==a.indexOf("http://www.materialsproject")?"https://"+
a.substring(7):0<a.indexOf("optimade")?JV.JC.fixOptimadeCall(a):a;b!==a&&JU.Logger.info("JC.fixProtocol "+a+" --\x3e "+b);return b},"~S");b.embedScript=c(b,"embedScript",function(a){return"\n/****** Jmol Embedded Script **** \n"+a+"\n**/"},"~S");b.getShapeVisibilityFlag=c(b,"getShapeVisibilityFlag",function(a){return 16<<Math.min(a,26)},"~N");b.shapeTokenIndex=c(b,"shapeTokenIndex",function(a){switch(a){case 1153433601:case 1073741859:return 0;case 1677721602:case 659488:return 1;case 1613238294:return 2;
case 1611141176:return 3;case 659482:return 4;case 1825200146:return 5;case 1745489939:case 537006096:return 6;case 1112152076:return 7;case 1112152070:return 8;case 1114249217:return 9;case 1112152078:return 10;case 1112152066:return 11;case 1649022989:return 12;case 1112152071:return 13;case 1112152073:return 14;case 1112152074:return 15;case 1112150019:return 16;case 135175:return 17;case 135198:return 18;case 1112150021:return 19;case 1112150020:return 20;case 1275203608:return 21;case 135174:return 23;
case 135176:return 22;case 135180:return 24;case 134353926:return 25;case 135182:return 26;case 1073877010:return 27;case 1073877011:return 28;case 135188:return 29;case 135190:return 30;case 537022465:return 31;case 1611272194:return 34;case 1812599299:return 32;case 1814695966:return 33;case 544771:return 35;case 1611272202:return 36}return-1},"~N");b.getShapeClassName=c(b,"getShapeClassName",function(a,b){return 0>a?JV.JC.shapeClassBases[~a]:"J."+(b?"render":"shape")+(9<=a&&16>a?"bio.":16<=a&&
23>a?"special.":24<=a&&30>a?"surface.":23==a?"cgo.":".")+JV.JC.shapeClassBases[a]},"~N,~B");b.getEchoName=c(b,"getEchoName",function(a){return JV.JC.echoNames[a]},"~N");b.setZPosition=c(b,"setZPosition",function(a,b){return a&-49|b},"~N,~N");b.setPointer=c(b,"setPointer",function(a,b){return a&-4|b},"~N,~N");b.getPointer=c(b,"getPointer",function(a){return a&3},"~N");b.getPointerName=c(b,"getPointerName",function(a){return 0==(a&1)?"":0<(a&2)?"background":"on"},"~N");b.isOffsetAbsolute=c(b,"isOffsetAbsolute",
function(a){return 0!=(a&64)},"~N");b.getOffset=c(b,"getOffset",function(a,b,d){a=Math.min(Math.max(a,-500),500);b=Math.min(Math.max(b,-500),500);var c=(a&1023)<<21|(b&1023)<<11|(d?64:0);if(8396800==c)c=0;else if(!d&&(0==a||0==b))c|=256;return c},"~N,~N,~B");b.getXOffset=c(b,"getXOffset",function(a){if(0==a)return 4;a=a>>21&1023;return 500<a?a-1023-1:a},"~N");b.getYOffset=c(b,"getYOffset",function(a){if(0==a)return 4;a=a>>11&1023;return 500<a?a-1023-1:a},"~N");b.getAlignment=c(b,"getAlignment",function(a){return a&
12},"~N");b.setHorizAlignment=c(b,"setHorizAlignment",function(a,b){return a&-13|b},"~N,~N");b.getHorizAlignmentName=c(b,"getHorizAlignmentName",function(a){return JV.JC.hAlignNames[a>>2&3]},"~N");b.isSmilesCanonical=c(b,"isSmilesCanonical",function(a){return null!=a&&JU.PT.isOneOf(a.toLowerCase(),";/cactvs///;/cactus///;/nci///;/canonical///;")},"~S");b.getServiceCommand=c(b,"getServiceCommand",function(a){return 7>a.length?-1:"JSPECVIPEAKS: SELECT:JSVSTR:H1SIMULC13SIMUNBO:MODNBO:RUNNBO:VIENBO:SEANBO:CONNONESIM".indexOf(a.substring(0,
7).toUpperCase())},"~S");b.getUnitIDFlags=c(b,"getUnitIDFlags",function(a){var b=14;0==a.indexOf("-")&&(0<a.indexOf("m")&&(b|=1),0>a.indexOf("a")&&(b^=4),0<a.indexOf("t")&&(b|=16));return b},"~S");b.getBoolName=c(b,"getBoolName",function(a){return JV.JC.globalBooleans[a]},"~N");b.isSpaceGroupInfoKey=c(b,"isSpaceGroupInfoKey",function(a){a=a.toLowerCase();return 0<=a.indexOf("nitcell")||a.equals("coordinatesarerractional")||a.startsWith("spacegroup")||a.startsWith("ssg")||0<=a.indexOf("ymmet")||a.startsWith("f2c")||
a.startsWith("lattice")||a.startsWith("intltable")},"~S");b.getMenuScript=c(b,"getMenuScript",function(a){return"openPDB"===a?"var x__id__ = _modelTitle; if (x__id__.length != 4) { x__id__ = '1crn'};x__id__ = prompt('"+J.i18n.GT.$('Enter a four-digit PDB model ID or "=" and a three-digit ligand ID')+"',x__id__);if (!x__id__ || x__id__=='null') { quit }; load @{'=' + x__id__}":"openMOL"===a?"var x__id__ = _smilesString; if (!x__id__) { x__id__ = 'tylenol'};x__id__ = prompt('"+J.i18n.GT.$('Enter the name or identifier (SMILES, InChI, CAS) of a compound. Preface with ":" to load from PubChem; otherwise Jmol will use the NCI/NIH Resolver.')+
"',x__id__);if (!x__id__ || x__id__=='null') { quit }; load @{(x__id__[1]==':' ? x__id__ : '$' + x__id__)}":null},"~S");b.axisLabels=z(-1,["+X","+Y","+Z",null,null,null,"a","b","c","X","Y","Z",null,null,null,"X",null,"Z",null,"(Y)",null,"u","v","w"]);b.axesTypes=z(-1,"abcxyzuvw".split(""));b.ruleNames=z(-1," 1a 1b 2 3 4a 4b 4c 5 6".split(" "));b.databaseArray=z(-1,"itatable;https://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-getgen?gnum=%FILE&what=gp&list=Standard%2FDefault+Setting;itadiagramita;https://onlinelibrary.wiley.com/iucr/itc/Ac/ch2o3v0001/sgtable2o3o%FILE;itadiagram;http://img.chem.ucl.ac.uk/sgp/large/%FILEaz1.htm;aflowbin;http://aflowlib.mems.duke.edu/users/jmolers/binary_new/%FILE.aflow_binary;aflowlib;https://raw.githubusercontent.com/aflow-org/aflow_prototype_encyclopedia/refs/heads/main/data/%FILE/aflow.cif;aflowpro;$aflowlib;ams;'https://www.rruff.net/AMS/jsmol_search.php?'+(0+'%file'==0? 'mineral':'id')+'=%file&filetype=cif#_DOCACHE_';dssr;https://jmol.x3dna-dssr.org/report.php?id=%FILE;dssrModel;https://jmol.x3dna-dssr.org/report.php?POST?&model=;iucr;http://scripts.iucr.org/cgi-bin/sendcif_yard?%FILE;cod;http://www.crystallography.net/cod/cif/%c1/%c2%c3/%c4%c5/%FILE.cif;nmr;https://www.nmrdb.org/new_predictor?POST?molfile=;nmrdb;https://www.nmrdb.org/service/predictor?POST?molfile=;nmrdb13;https://www.nmrdb.org/service/jsmol13c?POST?molfile=;magndata;http://webbdcrista1.ehu.es/magndata/mcif/%FILE.mcif;rna3d;http://rna.bgsu.edu/rna3dhub/%TYPE/download/%FILE;mmtf;https://mmtf.rcsb.org/v1.0/full/%FILE;bcif;https://models.rcsb.org/%file.bcif;chebi;https://www.ebi.ac.uk/chebi/saveStructure.do?defaultImage=true&chebiId=%file%2D%;ligand;https://files.rcsb.org/ligands/download/%FILE.cif;nci;https://cactus.nci.nih.gov/chemical/structure/;pdb;https://files.rcsb.org/download/%FILE.pdb;pdb0;https://files.rcsb.org/download/%FILE.pdb;pdbe;https://www.ebi.ac.uk/pdbe/entry-files/download/%file.cif;pdbe2;https://www.ebi.ac.uk/pdbe/static/entry/%file_updated.cif;pubchem;https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/%FILE/SDF?record_type=3d;map;https://www.ebi.ac.uk/pdbe/api/%TYPE/%FILE?pretty=false&metadata=true;pdbemap;https://www.ebi.ac.uk/pdbe/coordinates/files/%file.ccp4;pdbemapdiff;https://www.ebi.ac.uk/pdbe/coordinates/files/%file_diff.ccp4;pdbemapserver;https://www.ebi.ac.uk/pdbe/volume-server/x-ray/%file/box/0,0,0/0,0,0?detail=6&space=cartesian&encoding=bcif;pdbemapdiffserver;https://www.ebi.ac.uk/pdbe/volume-server/x-ray/%file/box/0,0,0/0,0,0?detail=6&space=cartesian&encoding=bcif&diff=1;emdbmap;https://www.ebi.ac.uk/pdbe/volume-server/emd/emd-%file/cell?detail=6&space=cartesian&encoding=bcif;emdbquery;https://www.ebi.ac.uk/emdb/api/search/fitted_pdbs:%file?fl=emdb_id,map_contour_level_value&wt=csv;emdbmapserver;https://www.ebi.ac.uk/pdbe/volume-server/emd/emd-%file/box/0,0,0/0,0,0?detail=6&space=cartesian&encoding=bcif;xxxresolverResolver;https://chemapps.stolaf.edu/resolver;smiles2d;https://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf&operator=remove_hydrogens;smiles3d;https://cactus.nci.nih.gov/chemical/structure//%FILE/file?format=sdf&get3d=true".split(";"));
b.databases=new java.util.Hashtable;for(var a=0;a<JV.JC.databaseArray.length;a+=2){var d=JV.JC.databaseArray[a+1];"$"==d.charAt(0)&&(d=JV.JC.databases.get(d.substring(1)));JV.JC.databases.put(JV.JC.databaseArray[a].toLowerCase(),d)}var h=d=b.majorVersion=null,d=Jmol.___JmolVersion,h=Jmol.___JmolDate;null!=h&&(h=h.substring(7,23));JV.JC.version=null!=d?d:"(Unknown_version)";JV.JC.majorVersion=null!=d?d:"(Unknown_version)";JV.JC.date=null!=h?h:"(Unknown_date)";d=-1;try{var p=JV.JC.version,h="",a=p.indexOf(".");
0>a&&(d=1E5*Integer.parseInt(p),p=null);if(null!=p&&(d=1E5*Integer.parseInt(h=p.substring(0,a)),p=p.substring(a+1),a=p.indexOf("."),0>a&&(d+=1E3*Integer.parseInt(p),p=null),null!=p)){var e=p.substring(0,a);JV.JC.majorVersion=h+("."+e);d+=1E3*Integer.parseInt(e);p=p.substring(a+1);a=p.indexOf("_");0<=a&&(p=p.substring(0,a));a=p.indexOf(" ");0<=a&&(p=p.substring(0,a));d+=Integer.parseInt(p)}}catch(g){if(!E(g,"NumberFormatException"))throw g;}JV.JC.versionInt=d;b.center=JU.V3.new3(0,0,0);b.axisX=JU.V3.new3(1,
0,0);b.axisY=JU.V3.new3(0,1,0);b.axisZ=JU.V3.new3(0,0,1);b.axisNX=JU.V3.new3(-1,0,0);b.axisNY=JU.V3.new3(0,-1,0);b.axisNZ=JU.V3.new3(0,0,-1);b.unitAxisVectors=z(-1,[JV.JC.axisX,JV.JC.axisY,JV.JC.axisZ,JV.JC.axisNX,JV.JC.axisNY,JV.JC.axisNZ]);b.altArgbsCpk=D(-1,[4294907027,4290750118,4294967088,4283897743,4294967232,4294967200,4292401368,4283453520,4282400832,4279259216]);b.FORMAL_CHARGE_COLIX_RED=JU.Elements.elementSymbols.length+JV.JC.altArgbsCpk.length;b.argbsFormalCharge=D(-1,[4294901760,4294918208,
4294934656,4294951104,4294967295,4292401407,4290032895,4287664383,4285295871,4282927359,4280558847,4278190335]);b.PARTIAL_CHARGE_COLIX_RED=JV.JC.FORMAL_CHARGE_COLIX_RED+JV.JC.argbsFormalCharge.length;b.argbsRwbScale=D(-1,[4294901760,4294905872,4294909984,4294914096,4294918208,4294922320,4294926432,4294930544,4294934656,4294938768,4294942880,4294946992,4294951104,4294955216,4294959328,4294967295,4292927743,4291875071,4290822399,4289769727,4288717055,4287664383,4286611711,4285559039,4284506367,4283453695,
4282401023,4281348351,4280295679,4279243007,4278190335]);b.PARTIAL_CHARGE_RANGE_SIZE=JV.JC.argbsRwbScale.length;b.argbsRoygbScale=D(-1,[4294901760,4294909952,4294918144,4294926336,4294934528,4294942720,4294950912,4294959104,4294963200,4294967040,4293980160,4292935424,4290838272,4288741120,4286643968,4284546816,4282449664,4280352512,4278255360,4278255392,4278255424,4278255456,4278255488,4278255520,4278255552,4278255584,4278255615,4278247679,4278239487,4278231295,4278223103,4278214911,4278206719,4278198527,
4278190335]);b.predefinedVariable=z(-1,"@_1H _H & !(_2H,_3H);@_12C _C & !(_13C,_14C);@_14N _N & !(_15N);@solvent water, (_g>=45 & _g<48);@ligand _g=0|!(_g<46,protein,nucleic,water);@turn structure=1;@sheet structure=2;@helix structure=3;@helix310 substructure=7;@helixalpha substructure=8;@helixpi substructure=9;@magnetic vxyz>0;@bulges within(dssr,'bulges');@coaxStacks within(dssr,'coaxStacks');@hairpins within(dssr,'hairpins');@hbonds within(dssr,'hbonds');@helices within(dssr,'helices');@iloops within(dssr,'iloops');@isoCanonPairs within(dssr,'isoCanonPairs');@junctions within(dssr,'junctions');@kissingLoops within(dssr,'kissingLoops');@multiplets within(dssr,'multiplets');@nonStack within(dssr,'nonStack');@nts within(dssr,'nts');@pairs within(dssr,'pairs');@ssSegments within(dssr,'ssSegments');@stacks within(dssr,'stacks');@stems within(dssr,'stems')".split(";"));
b.predefinedStatic=z(-1,"@amino _g>0 & _g<=23;@acidic asp,glu;@basic arg,his,lys;@charged acidic,basic;@negative acidic;@positive basic;@neutral amino&!(acidic,basic);@polar amino&!hydrophobic;@peptide protein&within(chain,monomer>1)&!within(chain,monomer>12);@cyclic his,phe,pro,trp,tyr;@acyclic amino&!cyclic;@aliphatic ala,gly,ile,leu,val;@aromatic his,phe,trp,tyr;@cystine within(group,(cys,cyx)&atomname=sg&connected((cys,cyx)&atomname=sg));@buried ala,cys,ile,leu,met,phe,trp,val;@surface amino&!buried;@hydrophobic ala,gly,ile,leu,met,phe,pro,trp,tyr,val;@mainchain backbone;@small ala,gly,ser;@medium asn,asp,cys,pro,thr,val;@large arg,glu,gln,his,ile,leu,lys,met,phe,trp,tyr;@c nucleic & ([C] or [DC] or within(group,_a=42));@g nucleic & ([G] or [DG] or within(group,_a=43));@cg c,g;@a nucleic & ([A] or [DA] or within(group,_a=44));@t nucleic & ([T] or [DT] or within(group,_a=45 | _a=49));@at a,t;@i nucleic & ([I] or [DI] or within(group,_a=46) & !g);@u nucleic & ([U] or [DU] or within(group,_a=47) & !t);@tu nucleic & within(group,_a=48);@ions _g>=46&_g<48;@alpha _a=2;@_bb protein&(_a>=1&_a<6|_a=64) | nucleic&(_a>=6&_a<14|_a>=73&&_a<=79||_a==99||_a=100);@backbone _bb | _H && connected(single, _bb);@spine protein&_a>=1&_a<4|nucleic&(_a>=6&_a<11|_a=13);@sidechain (protein,nucleic) & !backbone;@base nucleic & !backbone;@dynamic_flatring search('[a]');@nonmetal _H,_He,_B,_C,_N,_O,_F,_Ne,_Si,_P,_S,_Cl,_Ar,_As,_Se,_Br,_Kr,_Te,_I,_Xe,_At,_Rn;@metal !nonmetal && !_Xx;@alkaliMetal _Li,_Na,_K,_Rb,_Cs,_Fr;@alkalineEarth _Be,_Mg,_Ca,_Sr,_Ba,_Ra;@nobleGas _He,_Ne,_Ar,_Kr,_Xe,_Rn;@metalloid _B,_Si,_Ge,_As,_Sb,_Te;@transitionMetal elemno>=21&elemno<=30|elemno=57|elemno=89|elemno>=39&elemno<=48|elemno>=72&elemno<=80|elemno>=104&elemno<=112;@lanthanide elemno>57&elemno<=71;@actinide elemno>89&elemno<=103".split(";"));
b.shapeClassBases=z(-1,"Balls Sticks Hsticks Sssticks Struts Labels Measures Stars Halos Backbone Trace Cartoon Strands MeshRibbon Ribbons Rockets Dots Dipoles Vectors GeoSurface Ellipsoids Polyhedra Draw CGO Isosurface Contact LcaoCartoon MolecularOrbital NBO Pmesh Plot3D Echo Bbcage Uccage Axes Hover Frank".split(" "));b.echoNames=z(-1,["top","bottom","middle","xy","xyz"]);b.hAlignNames=z(-1,["","left","center","right"]);b.globalBooleans=z(-1,"someModelsHaveFractionalCoordinates someModelsHaveSymmetry someModelsHaveUnitcells someModelsHaveCONECT isPDB someModelsHaveDomains someModelsHaveValidations isSupercell someModelsHaveAromaticBonds someModelsAreModulated".split(" "))});
m("JV");x(["java.io.IOException"],"JV.JmolAsyncException",null,function(){var b=s(function(){this.fileName=null;r(this,arguments)},JV,"JmolAsyncException",java.io.IOException);u(b,function(a){K(this,JV.JmolAsyncException,[]);this.fileName=a},"~S");c(b,"getFileName",function(){return this.fileName})});m("JV");x(null,"JV.ModelManager",["JM.ModelLoader"],function(){var b=s(function(){this.fileName=this.modelSetPathName=this.modelSet=this.vwr=null;r(this,arguments)},JV,"ModelManager",null);u(b,function(a){this.vwr=
a},"JV.Viewer");c(b,"zap",function(){this.modelSetPathName=this.fileName=null;new JM.ModelLoader(this.vwr,this.vwr.getZapName(),null,null,null,null)});c(b,"createModelSet",function(a,b,c,p,e,g){var j=null;g?(j=this.modelSet.modelSetName,j.equals("zapped")?j=null:0>j.indexOf(" (modified)")&&(j+=" (modified)")):null==p?this.zap():(this.modelSetPathName=a,this.fileName=b);null!=p&&(null==j&&(j=this.vwr.getModelAdapter().getAtomSetCollectionName(p),null!=j&&(j=j.trim(),0==j.length&&(j=null)),null==j&&
(j=JV.ModelManager.reduceFilename(b))),new JM.ModelLoader(this.vwr,j,c,p,g?this.modelSet:null,e));0==this.modelSet.ac&&!this.modelSet.getMSInfoB("isPyMOL")&&this.zap()},"~S,~S,JU.SB,~O,JU.BS,~B");b.reduceFilename=c(b,"reduceFilename",function(a){if(null==a)return null;var b=a.indexOf(".");0<b&&(a=a.substring(0,b));24<a.length&&(a=a.substring(0,20)+" ...");return a},"~S");c(b,"createAtomDataSet",function(a,b){return JM.ModelLoader.createAtomDataSet(this.vwr,this.modelSet,b,a,this.vwr.bsA())},"~O,~N")});
m("JV");var ra=s(function(){this.y=this.x=-1E3;this.modifiers=0;this.time=-1;this.modelIndex=0;this.name=null;this.keybuf=0;r(this,arguments)},JV,"MouseState",null);u(ra,function(b){this.name=b},"~S");c(ra,"setModelIndex",function(b){this.modelIndex=b},"~N");c(ra,"set",function(b,a,d,c){this.time=b;this.x=a;this.y=d;this.modifiers=c},"~N,~N,~N,~N");c(ra,"setCurrent",function(b,a){this.time=b.time;2>a&&(this.x=b.x,this.y=b.y);this.modifiers=b.modifiers},"JV.MouseState,~N");c(ra,"inRange",function(b,
a,d){return Math.abs(this.x-a)<=b&&Math.abs(this.y-d)<=b},"~N,~N,~N");c(ra,"check",function(b,a,d,c,p,e){return this.modifiers==c&&(2147483647<=e?this.inRange(b,a,d):p-this.time<e&&20<p-this.time)},"~N,~N,~N,~N,~N,~N");c(ra,"is",function(b){return b.x==this.x&&b.y==this.y&&b.time==this.time},"JV.MouseState");m("JV");x(["J.api.JmolSelectionListener","JU.BS"],"JV.SelectionManager","JU.AU J.c.PAL J.i18n.GT JU.BSUtil $.C $.Escape".split(" "),function(){var b=s(function(){this.bsSelection=this.listeners=
this.vwr=this.bsFixed=this.bsHidden=this.noneSelected=this.bsDeleted=this.bsSubset=null;this.empty=1;this.hideNotSelected=!1;this.colorer=this.bsTemp=null;r(this,arguments)},JV,"SelectionManager",null);N(b,function(){this.bsHidden=new JU.BS;this.bsFixed=new JU.BS;this.bsSelection=new JU.BS;this.bsTemp=new JU.BS});u(b,function(a){this.vwr=a;this.listeners=[];this.colorer=new JV.SelectionManager.SelectionColorer(a);this.addListener(this.colorer)},"JV.Viewer");c(b,"processDeletedModelAtoms",function(a){JU.BSUtil.deleteBits(this.bsDeleted,
a);JU.BSUtil.deleteBits(this.bsSubset,a);JU.BSUtil.deleteBits(this.bsFixed,a);JU.BSUtil.deleteBits(this.bsHidden,a);var b=JU.BSUtil.copy(this.bsSelection);JU.BSUtil.deleteBits(b,a);this.setSelectionSet(b,0);this.selectionChanged(!1)},"JU.BS");c(b,"clear",function(){this.clearSelection(!0);this.setSelectionSubset(null);this.hide(null,null,0,!0);this.bsDeleted=null;this.setMotionFixedAtoms(null)});c(b,"display",function(a,b,c,p){switch(c){default:c=null==this.bsSubset?null:JU.BSUtil.andNot(JU.BSUtil.copy(this.bsHidden),
this.bsSubset);var e=a.getModelAtomBitSetIncludingDeleted(-1,!1);this.bsHidden.or(e);null!=c&&(this.bsHidden.and(this.bsSubset),this.bsHidden.or(c));case 1275069441:null!=b&&this.bsHidden.andNot(b);break;case 1073742119:null!=b&&this.bsHidden.or(b)}JU.BSUtil.andNot(this.bsHidden,this.bsDeleted);a.setBsHidden(this.bsHidden);p||this.vwr.reportSelection(J.i18n.GT.i(J.i18n.GT.$("{0} atoms hidden"),this.bsHidden.cardinality()))},"JM.ModelSet,JU.BS,~N,~B");c(b,"hide",function(a,b,c,p){var e=0==c||null==
this.bsSubset?null:JU.BSUtil.andNot(JU.BSUtil.copy(this.bsHidden),this.bsSubset);JV.SelectionManager.setBitSet(this.bsHidden,b,c);null!=e&&this.bsHidden.or(e);null!=a&&a.setBsHidden(this.bsHidden);p||this.vwr.reportSelection(J.i18n.GT.i(J.i18n.GT.$("{0} atoms hidden"),this.bsHidden.cardinality()))},"JM.ModelSet,JU.BS,~N,~B");c(b,"setSelectionSet",function(a,b){JV.SelectionManager.setBitSet(this.bsSelection,a,b);this.empty=-1},"JU.BS,~N");b.setBitSet=c(b,"setBitSet",function(a,b,c){switch(c){default:a.clearAll();
case 1275069441:null!=b&&a.or(b);break;case 1073742119:null!=b&&a.andNot(b)}},"JU.BS,JU.BS,~N");c(b,"getHiddenSet",function(){return this.bsHidden});c(b,"getHideNotSelected",function(){return this.hideNotSelected});c(b,"setHideNotSelected",function(a){(this.hideNotSelected=a)&&this.selectionChanged(!1)},"~B");c(b,"isSelected",function(a){return 0<=a&&this.bsSelection.get(a)},"~N");c(b,"select",function(a,b,c){null==a?this.selectAll(!0):this.setSelectionSet(a,b);this.vwr.getBoolean(1612709900)||this.excludeSelectionSet(this.vwr.ms.getAtoms(1612709900,
null));this.vwr.getBoolean(1612709894)||this.excludeSelectionSet(this.vwr.ms.getAtoms(1612709894,null));this.selectionChanged(!1);if((a=this.vwr.getBoolean(603979879))||!c)b=this.getSelectionCount(),a?this.vwr.getChimeMessenger().reportSelection(b):c||this.vwr.reportSelection(J.i18n.GT.i(J.i18n.GT.$("{0} atoms selected"),b))},"JU.BS,~N,~B");c(b,"selectAll",function(a){var b=this.vwr.ms.ac;for(this.empty=0==b?1:0;0<=--b;)this.bsSelection.set(b);JU.BSUtil.andNot(this.bsSelection,this.bsDeleted);this.selectionChanged(a)},
"~B");c(b,"clearSelection",function(a){this.setHideNotSelected(!1);this.bsSelection.clearAll();this.empty=1;this.selectionChanged(a)},"~B");c(b,"isAtomSelected",function(a){return((null==this.bsSubset||this.bsSubset.get(a))&&null==this.bsDeleted||!this.bsDeleted.get(a))&&this.bsSelection.get(a)},"~N");c(b,"setSelectedAtom",function(a,b){0>a?this.selectionChanged(!0):null!=this.bsSubset&&!this.bsSubset.get(a)||null!=this.bsDeleted&&this.bsDeleted.get(a)||(this.bsSelection.setBitTo(a,b),this.empty=
b?0:-1)},"~N,~B");c(b,"setSelectionSubset",function(a){this.bsSubset=a},"JU.BS");c(b,"isInSelectionSubset",function(a){return 0>a||this.vwr.am.splitFrame&&!this.vwr.am.isSplitFrameSelectable(a)||null==this.bsSubset||this.bsSubset.get(a)},"~N");c(b,"invertSelection",function(){JU.BSUtil.invertInPlace(this.bsSelection,this.vwr.ms.ac);this.empty=0<this.bsSelection.length()?0:1;this.selectionChanged(!1)});c(b,"excludeSelectionSet",function(a){null==a||1==this.empty||(this.bsSelection.andNot(a),this.empty=
-1)},"JU.BS");c(b,"getSelectionCount",function(){if(1==this.empty)return 0;this.empty=1;var a;null==this.bsSubset?a=this.bsSelection:(this.bsTemp.clearAll(),this.bsTemp.or(this.bsSubset),this.bsTemp.and(this.bsSelection),a=this.bsTemp);a=a.cardinality();0<a&&(this.empty=0);return a});c(b,"addListener",function(a){for(var b=this.listeners.length;0<=--b;)if(this.listeners[b]===a){this.listeners[b]=null;break}for(var c=this.listeners.length,b=c;0<=--b;)if(null==this.listeners[b]){this.listeners[b]=a;
return}this.listeners=0==this.listeners.length?Array(1):JU.AU.doubleLength(this.listeners);this.listeners[c]=a},"J.api.JmolSelectionListener");c(b,"selectionChanged",function(a){this.hideNotSelected&&this.hide(this.vwr.ms,JU.BSUtil.copyInvert(this.bsSelection,this.vwr.ms.ac),0,a);if(!(a||0==this.listeners.length))for(a=this.listeners.length;0<=--a;)null!=this.listeners[a]&&this.listeners[a].selectionChanged(this.bsSelection)},"~B");c(b,"deleteAtoms",function(a){var b=JU.BSUtil.copy(a);null==this.bsDeleted?
this.bsDeleted=b:(b.andNot(this.bsDeleted),this.bsDeleted.or(a));this.bsHidden.andNot(this.bsDeleted);this.bsSelection.andNot(this.bsDeleted);return b.cardinality()},"JU.BS");c(b,"getSelectedAtoms",function(a){a=a||null!=this.bsSubset?JU.BSUtil.copy(this.bsSelection):this.bsSelection;if(null==this.bsSubset)return a;a.and(this.bsSubset);return a},"~B");c(b,"getSelectedAtomsNoSubset",function(){return JU.BSUtil.copy(this.bsSelection)});c(b,"excludeAtoms",function(a,b){null!=this.bsDeleted&&a.andNot(this.bsDeleted);
!b&&null!=this.bsSubset&&(a=JU.BSUtil.copy(a)).and(this.bsSubset);return a},"JU.BS,~B");c(b,"setMotionFixedAtoms",function(a){this.bsFixed.clearAll();null!=a&&this.bsFixed.or(a)},"JU.BS");c(b,"getMotionFixedAtoms",function(){return this.bsFixed});c(b,"setSelectionColors",function(a,b,c,p){this.colorer.set(a,b,c,p);this.vwr.selectStatus(this.getSelectedAtoms(!0),!1,0,!1,!0);this.colorer.enabled=null!=a||null!=b},"Integer,Integer,~S,~N");c(b,"getSelectionColors",function(){return this.colorer.enabled?
this.colorer.toString():"NULL NULL"});b=s(function(){this.enabled=!1;this.vwr=this.translucentLevel=this.translucency=this.bsColorUnselected=this.bsColorSelected=this.colorUnselected=this.colorSelected=null;r(this,arguments)},JV.SelectionManager,"SelectionColorer",null,J.api.JmolSelectionListener);u(b,function(a){this.vwr=a},"JV.Viewer");f(b,"selectionChanged",function(a){if(this.enabled){var b=this.vwr.getAllAtoms();JU.BSUtil.copy2(a,this.bsColorSelected);JU.BSUtil.copy2(b,this.bsColorUnselected);
this.bsColorUnselected.andNot(this.bsColorSelected);this.vwr.shm.setShapePropertyBs(0,"color",this.colorSelected,this.bsColorSelected);this.vwr.shm.setShapePropertyBs(0,"color",this.colorUnselected,this.bsColorUnselected);null!=this.translucency&&(this.vwr.shm.setShapePropertyBs(0,"translucency",this.translucency,this.bsColorUnselected),this.vwr.shm.setShapePropertyBs(0,"translucentLevel",this.translucentLevel,this.bsColorUnselected))}},"JU.BS");c(b,"colorString",function(a,b){if(null==a||a===J.c.PAL.NONE)return"NULL";
var c=JU.C.getShadedRGB(a.intValue(),b?this.translucentLevel.doubleValue():0);return"#"+JU.Escape.getHexColorFromRGB(c)},"~O,~B");c(b,"set",function(a,b,c,p){null==this.bsColorSelected&&(this.bsColorSelected=new JU.BS,this.bsColorUnselected=new JU.BS);this.colorSelected=null==a?J.c.PAL.NONE:a;this.colorUnselected=null==b?J.c.PAL.NONE:b;1.7976931348623157E308==p?this.translucency=null:(this.translucency=c,this.translucentLevel=Double.$valueOf(p));this.enabled=!0},"Integer,Integer,~S,~N");f(b,"toString",
function(){return this.colorString(this.colorSelected,!1)+" "+this.colorString(this.colorUnselected,null!=this.translucency)})});m("JV");x(null,"JV.ShapeManager","JU.BS $.P3 J.api.Interface J.c.PAL $.VDW J.shape.Shape JU.BSUtil $.C JV.JC".split(" "),function(){var b=s(function(){this.navMinMax=this.bsSlabbedInternal=this.bsRenderableAtoms=this.scaleText=this.vwr=this.shapes=this.ms=null;r(this,arguments)},JV,"ShapeManager",null);N(b,function(){this.navMinMax=D(4,0)});u(b,function(a){this.vwr=a;this.bsRenderableAtoms=
new JU.BS;this.bsSlabbedInternal=new JU.BS},"JV.Viewer");c(b,"findNearestShapeAtomIndex",function(a,b,c,p){if(null!=this.shapes)for(var e=0;e<this.shapes.length&&null==c[0];++e)null!=this.shapes[e]&&this.shapes[e].findNearestAtomIndex(a,b,c,p)},"~N,~N,~A,JU.BS");c(b,"getShapePropertyIndex",function(a,b,c){if(null==this.shapes||null==this.shapes[a])return null;this.vwr.setShapeErrorState(a,"get "+b);a=this.shapes[a].getProperty(b,c);this.vwr.setShapeErrorState(-1,null);return a},"~N,~S,~N");c(b,"getShapePropertyData",
function(a,b,c){if(null==this.shapes||null==this.shapes[a])return!1;this.vwr.setShapeErrorState(a,"get "+b);a=this.shapes[a].getPropertyData(b,c);this.vwr.setShapeErrorState(-1,null);return a},"~N,~S,~A");c(b,"getShapeIdFromObjectName",function(a){if(null!=this.shapes)for(var b=16;30>b;++b)if(null!=this.shapes[b]&&0<=this.shapes[b].getIndexFromName(a))return b;return null!=this.shapes[6]&&0<=this.shapes[6].getIndexFromName(a)?6:-1},"~S");c(b,"loadDefaultShapes",function(a){this.ms=a;if(null!=this.shapes)for(var b=
0;b<this.shapes.length;++b)null!=this.shapes[b]&&this.shapes[b].setModelSet(a);this.loadShape(0);this.loadShape(1)},"JM.ModelSet");c(b,"loadShape",function(a){if(null==this.shapes)return null;if(null!=this.shapes[a])return this.shapes[a];if(2==a||3==a||4==a)return null;var b=JV.JC.getShapeClassName(a,!1);if(null==(b=J.api.Interface.getInterface(b,this.vwr,"shape")))return null;this.vwr.setShapeErrorState(a,"allocate");b.initializeShape(this.vwr,this.ms,a);this.vwr.setShapeErrorState(-1,null);return this.shapes[a]=
b},"~N");c(b,"notifyAtomPositionsChanged",function(a,b,c){var p=Integer.$valueOf(a);a=this.vwr.getModelUndeletedAtomsBitSet(a);for(var e=0;37>e;e++)null!=this.shapes[e]&&this.setShapePropertyBs(e,"refreshTrajectories",z(-1,[p,b,c]),a)},"~N,JU.BS,JU.M4");c(b,"releaseShape",function(a){null!=this.shapes&&(this.shapes[a]=null)},"~N");c(b,"setScale",function(){null!=this.scaleText&&(this.loadShape(31),this.setShapePropertyBs(31,"%SCALE",this.scaleText,null),this.scaleText=null)});c(b,"resetShapes",function(a){a&&
(a=Array(1),this.getShapePropertyData(31,"%SCALE",a),this.scaleText=a[0]);this.shapes=Array(37)},"~B");c(b,"setShapeProperties",function(a,b){this.vwr.setShapeErrorState(a,"set properties");this.loadShape(a).setProperties(b);this.vwr.setShapeErrorState(-1,null)},"~N,~A");c(b,"setShapeSizeBs",function(a,b,c,p){if(null!=this.shapes){if(null==p&&(1!=a||2147483647!=b))p=this.vwr.bsA();null!=c&&(0!=c.value&&c.vdwType===J.c.VDW.TEMP)&&this.ms.getBfactor100Lo();this.vwr.setShapeErrorState(a,"set size");
(null==c?0!=b:0!=c.value)&&this.loadShape(a);null!=this.shapes[a]&&this.shapes[a].setShapeSizeRD(b,c,p);this.vwr.setShapeErrorState(-1,null)}},"~N,~N,J.atomdata.RadiusData,JU.BS");c(b,"setLabel",function(a,b){if(null==a){if(null==this.shapes[5])return}else this.loadShape(5),this.setShapeSizeBs(5,0,null,b);this.setShapePropertyBs(5,"label",a,b)},"~O,JU.BS");c(b,"setShapePropertyBs",function(a,b,c,p){null==this.shapes||null==this.shapes[a]||(null==p&&(p=this.vwr.bsA()),this.vwr.setShapeErrorState(a,
"set "+b),this.shapes[a].setProperty(b.intern(),c,p),this.vwr.setShapeErrorState(-1,null))},"~N,~S,~O,JU.BS");c(b,"checkFrankclicked",function(a,b){var c=this.shapes[36];return null!=c&&c.wasClicked(a,b)},"~N,~N");c(b,"checkObjectClicked",function(a,b,c,p,e){var g,j=null;if(2==this.vwr.getPickingMode())return null==this.shapes[5]?null:this.shapes[5].checkObjectClicked(a,b,c,p,!1);if(0!=c&&this.vwr.getBondsPickable()&&null!=(j=this.shapes[1].checkObjectClicked(a,b,c,p,!1)))return j;for(var f=0;f<JV.ShapeManager.clickableMax;f++)if(null!=
(g=this.shapes[JV.ShapeManager.hoverable[f]])&&null!=(j=g.checkObjectClicked(a,b,c,p,e)))return j;return null},"~N,~N,~N,JU.BS,~B");c(b,"checkObjectDragged",function(a,b,c,p,e,g,j){for(var f=!1,l=0<j?j+1:37;!f&&j<l;++j)null!=this.shapes[j]&&(f=this.shapes[j].checkObjectDragged(a,b,c,p,e,g));return f},"~N,~N,~N,~N,~N,JU.BS,~N");c(b,"checkObjectHovered",function(a,b,c,p){var e=this.shapes[1];if(p&&null!=e&&e.checkObjectHovered(a,b,c))return!0;for(p=0;p<JV.ShapeManager.hoverable.length;p++)if(e=this.shapes[JV.ShapeManager.hoverable[p]],
null!=e&&e.checkObjectHovered(a,b,c))return!0;return!1},"~N,~N,JU.BS,~B");c(b,"deleteShapeAtoms",function(a,b){if(null!=this.shapes)for(var c=0;37>c;c++)null!=this.shapes[c]&&this.setShapePropertyBs(c,"deleteModelAtoms",a,b)},"~A,JU.BS");c(b,"deleteVdwDependentShapes",function(a){null==a&&(a=this.vwr.bsA());this.setShapeAtomsSafely(24,"deleteVdw",a);this.setShapeAtomsSafely(25,"deleteVdw",a)},"JU.BS");c(b,"setShapeAtomsSafely",function(a,b,c){null!=this.shapes[a]&&this.shapes[a].setProperty(b,null,
c)},"~N,~S,JU.BS");c(b,"notifyAtoms",function(a,b){switch(a){case "atomslabeled":this.vwr.setModelkitPropertySafely("updatemodelkeys",b);break;case "atomsDeleted":this.setShapeAtomsSafely(6,a,b[0]);this.vwr.setModelkitPropertySafely("updatemodelkeys",b);break;case "atomsMoved":null!=this.getShape(22)&&this.vwr.setModelkitPropertySafely(a,b[0])}},"~S,~A");c(b,"getAtomShapeValue",function(a,b,c){a=JV.JC.shapeTokenIndex(a);if(0>a||null==this.shapes[a])return 0;c=this.shapes[a].getSize(c);if(0==c){if(0==
(b.shapeVisibilityFlags&this.shapes[a].vf))return 0;c=this.shapes[a].getSizeG(b)}return c/2E3},"~N,JM.Group,~N");c(b,"replaceGroup",function(a,b){if(null!=this.shapes)for(var c=9;16>c;c++)null!=this.shapes[c]&&this.shapes[c].replaceGroup(a,b)},"JM.Group,JM.Group");c(b,"getObjectMap",function(a,b){if(null!=this.shapes)for(var c=Boolean.$valueOf(b),p=16;30>p;++p)this.getShapePropertyData(p,"getNames",z(-1,[a,c]))},"java.util.Map,~B");c(b,"getProperty",function(a){return a.equals("getShapes")?this.shapes:
null},"~O");c(b,"getShape",function(a){return null==this.shapes?null:this.shapes[a]},"~N");c(b,"resetBioshapes",function(a){if(null!=this.shapes)for(var b=0;b<this.shapes.length;++b)null!=this.shapes[b]&&this.shapes[b].isBioShape&&(this.shapes[b].setModelSet(this.ms),this.shapes[b].setShapeSizeRD(0,null,a),this.shapes[b].setProperty("color",J.c.PAL.NONE,a))},"JU.BS");c(b,"setAtomLabel",function(a,b){null!=this.shapes&&(this.shapes[5].setProperty("label:"+a,Integer.$valueOf(b),null),this.vwr.getModelkitPropertySafely(null)===
Boolean.TRUE&&this.notifyAtoms("atomslabeled",z(-1,[null,JU.BSUtil.newAndSetBit(this.vwr.ms.at[b].mi)])))},"~S,~N");c(b,"setModelVisibility",function(a){var b=this.shapes;if(!(null==b||null==b[0])){null==a&&(a=this.vwr.getVisibleFramesBitSet());null!=b[8]&&b[8].setProperty("highlight",null,null);for(var c=8;33>c;c++)null!=b[c]&&b[c].setModelVisibilityFlags(a);var b=this.vwr.getBoolean(603979922),p=this.vwr.slm.bsDeleted,e=this.ms.at;this.ms.clearVisibleSets();if(0<e.length)for(c=this.ms.ac;0<=--c;){var g=
e[c];null!=g&&(g.shapeVisibilityFlags&=-64);if(!(null!=p&&p.get(c))&&a.get(g.mi)){var j=1;if(!this.ms.isAtomHidden(c)&&(b||1!=g.getElementNumber()))j|=8,0!=g.madAtom&&(j|=16),g.setShapeVisibility(j,!0)}}this.setShapeVis()}},"JU.BS");c(b,"setShapeVis",function(){for(var a=0;37>a;++a){var b=this.shapes[a];null!=b&&b.setAtomClickability()}});c(b,"finalizeAtoms",function(a,b){var c=this.vwr,p=c.tm;b&&c.finalizeTransformParameters();if(null!=a){var e=this.ms.getAtomSetCenter(a),g=new JU.P3;p.transformPt3fSafe(e,
g);g.add(p.ptOffset);p.unTransformPoint(g,g);g.sub(e);c.setAtomCoordsRelative(g,a);p.ptOffset.set(0,0,0);p.bsSelectedAtoms=null}e=this.bsRenderableAtoms;this.ms.getAtomsInFrame(e);var j=this.ms.vibrations,f=null!=j&&p.vibrationOn,l=null!=this.ms.bsModulated&&null!=this.ms.occupancies,y=this.ms.at,n,q=c.getInt(553648159),m=!1,r=this.bsSlabbedInternal;r.clearAll();for(var s=e.nextSetBit(0);0<=s;s=e.nextSetBit(s+1)){var g=y[s],u=f&&g.hasVibration()?p.transformPtVibSafe(g,j[s]):p.transformPtSafe(g);1==
u.z&&(p.internalSlab&&p.xyzIsSlabbedInternal(g))&&r.set(s);g.sX=u.x;g.sY=u.y;g.sZ=u.z;var x=Math.abs(g.madAtom);32200==x&&(x=F(2E3*c.getFloat(1153433601)));g.sD=F(c.tm.scaleToScreen(u.z,x));if(l&&null!=j[s]&&-2147483648!=(n=j[s].getOccupancy100(f)))m=!0,g.setShapeVisibility(2,!1),0<=n&&n<q?g.setShapeVisibility(24,!1):g.setShapeVisibility(8|(0<g.madAtom?16:0),!0),this.ms.occupancies[g.i]=Math.abs(n)}m&&this.setShapeVis();n=c.gdata;if(p.slabEnabled){s=c.getBoolean(603979940);p=c.getBoolean(603979939);
j=n.slab;f=n.depth;if(s){l=this.ms.getMolecules();q=this.ms.getMoleculeCountInModel(-1);for(s=0;s<q;s++)if(m=l[s],r=0,g=m.firstAtomIndex,e.get(g)){for(;r<m.ac&&!n.isClippedZ(y[g].sZ-(y[g].sD>>1));r++,g++);if(r!=m.ac){g=m.firstAtomIndex;for(r=0;r<m.ac;r++)e.clear(g),y[g++].sZ=0}}}for(s=e.nextSetBit(0);0<=s;s=e.nextSetBit(s+1))if(g=y[s],n.isClippedZ(g.sZ-(p?y[s].sD>>1:0)))g.setClickable(0),l=w((p?-1:1)*g.sD/2),(g.sZ+l<j||g.sZ-l>f||!n.isInDisplayRange(g.sX,g.sY))&&e.clear(s)}if(0==this.ms.ac||!c.getShowNavigationPoint())return null;
c=2147483647;p=-2147483648;n=2147483647;j=-2147483648;for(s=e.nextSetBit(0);0<=s;s=e.nextSetBit(s+1))g=y[s],g.sX<c&&(c=g.sX),g.sX>p&&(p=g.sX),g.sY<n&&(n=g.sY),g.sY>j&&(j=g.sY);this.navMinMax[0]=c;this.navMinMax[1]=p;this.navMinMax[2]=n;this.navMinMax[3]=j;return this.navMinMax},"JU.BS,~B");c(b,"setModelSet",function(a){this.ms=a},"JM.ModelSet");c(b,"checkInheritedShapes",function(){null!=this.shapes[24]&&this.setShapePropertyBs(24,"remapInherited",null,null)});c(b,"restrictSelected",function(a,b){var c=
this.vwr.slm.getSelectedAtomsNoSubset();if(b){this.vwr.slm.invertSelection();var p=this.vwr.slm.bsSubset;null!=p&&(c=this.vwr.slm.getSelectedAtomsNoSubset(),c.and(p),this.vwr.selectStatus(c,!1,0,!0,!1),JU.BSUtil.invertInPlace(c,this.vwr.ms.ac),c.and(p))}JU.BSUtil.andNot(c,this.vwr.slm.bsDeleted);p=this.vwr.getBoolean(603979812);a||this.vwr.setBooleanProperty("bondModeOr",!0);this.setShapeSizeBs(1,0,null,null);this.setShapePropertyBs(1,"type",Integer.$valueOf(32768),null);this.setShapeSizeBs(1,0,null,
null);this.setShapePropertyBs(1,"type",Integer.$valueOf(1023),null);for(var e=this.vwr.bsA(),g=21;0<=--g;)6!=g&&null!=this.getShape(g)&&this.setShapeSizeBs(g,0,null,e);null!=this.getShape(21)&&this.setShapePropertyBs(21,"off",e,null);this.setLabel(null,e);a||this.vwr.setBooleanProperty("bondModeOr",p);this.vwr.selectStatus(c,!1,0,!0,!1)},"~B,~B");c(b,"getAtomColorRGBShaded",function(a,b){var c=J.shape.Shape.getColix(a,b.i,b);0>c&&(c=this.vwr.gdata.fixChangeableColix(c));return JU.C.getColixShadedRGB(c)},
"~A,JM.Atom");b.hoverable=D(-1,[31,20,25,24,22,23,36]);b.clickableMax=JV.ShapeManager.hoverable.length-1});m("JV");x(["java.util.Hashtable"],["JV.Connection","$.Scene","$.StateManager","$.Connections"],"java.util.Arrays JU.BS $.Lst $.SB JM.Orientation JU.BSUtil $.Escape".split(" "),function(){var b=s(function(){this.maxUndo=20;this.saved=this.vwr=null;this.lastUnitcell=this.lastCoordinates=this.lastShape=this.lastState=this.lastSelected=this.lastScene=this.lastConnections=this.lastContext=this.lastOrientation=
"";this.redoStateStack=this.undoStateStack=null;r(this,arguments)},JV,"StateManager",null);N(b,function(){this.saved=new java.util.Hashtable});u(b,function(a){this.vwr=a},"JV.Viewer");b.getVariableList=c(b,"getVariableList",function(a,b,c,p){var e=new JU.SB,g=0,j=Array(a.size()),f;for(a=a.entrySet().iterator();a.hasNext()&&((f=a.next())||1);){var l=f.getKey(),y=f.getValue();if((c||!l.startsWith("site_"))&&(!p||"@"==l.charAt(0)))j[g++]=l+("@"==l.charAt(0)?" "+y.asString():" = "+JV.StateManager.varClip(l,
y.escape(),b))}java.util.Arrays.sort(j,0,g);for(b=0;b<g;b++)null!=j[b]&&e.append("  ").append(j[b]).append(";\n");0==g&&!p&&e.append("# --no global user variables defined--;\n");return e.toString()},"java.util.Map,~N,~B,~B");b.getObjectIdFromName=c(b,"getObjectIdFromName",function(a){if(null==a)return-1;a="background axis1      axis2      axis3      boundbox   unitcell   frank      ".indexOf(a.toLowerCase());return 0>a?a:w(a/11)},"~S");b.getObjectNameFromId=c(b,"getObjectNameFromId",function(a){return 0>
a||7<=a?null:"background axis1      axis2      axis3      boundbox   unitcell   frank      ".substring(11*a,11*a+11).trim()},"~N");c(b,"clear",function(a){this.vwr.setShowAxes(!1);this.vwr.setShowBbcage(!1);this.vwr.setShowUnitCell(!1);a.clear()},"JV.GlobalSettings");c(b,"resetLighting",function(){this.vwr.setIntProperty("ambientPercent",45);this.vwr.setIntProperty("celShadingPower",10);this.vwr.setIntProperty("diffusePercent",84);this.vwr.setIntProperty("phongExponent",64);this.vwr.setIntProperty("specularExponent",
6);this.vwr.setIntProperty("specularPercent",22);this.vwr.setIntProperty("specularPower",40);this.vwr.setIntProperty("zDepth",0);this.vwr.setIntProperty("zShadePower",3);this.vwr.setIntProperty("zSlab",50);this.vwr.setBooleanProperty("specular",!0);this.vwr.setBooleanProperty("celShading",!1);this.vwr.setBooleanProperty("zshade",!1)});c(b,"setCrystallographicDefaults",function(){this.vwr.setAxesMode(603979808);this.vwr.setShowAxes(!0);this.vwr.setShowUnitCell(!0);this.vwr.setBooleanProperty("perspectiveDepth",
!1)});c(b,"setCommonDefaults",function(){this.vwr.setBooleanProperty("perspectiveDepth",!0);this.vwr.setFloatProperty("bondTolerance",0.45);this.vwr.setFloatProperty("minBondDistance",0.4);this.vwr.setIntProperty("bondingVersion",0);this.vwr.setBooleanProperty("translucent",!0)});c(b,"setJmolDefaults",function(){this.setCommonDefaults();this.vwr.setStringProperty("defaultColorScheme","Jmol");this.vwr.setBooleanProperty("axesOrientationRasmol",!1);this.vwr.setBooleanProperty("zeroBasedXyzRasmol",!1);
this.vwr.setIntProperty("percentVdwAtom",23);this.vwr.setIntProperty("bondRadiusMilliAngstroms",150);this.vwr.setVdwStr("auto")});c(b,"setRasMolDefaults",function(){this.setCommonDefaults();this.vwr.setStringProperty("defaultColorScheme","RasMol");this.vwr.setBooleanProperty("axesOrientationRasmol",!0);this.vwr.setBooleanProperty("zeroBasedXyzRasmol",!0);this.vwr.setIntProperty("percentVdwAtom",0);this.vwr.setIntProperty("bondRadiusMilliAngstroms",1);this.vwr.setVdwStr("Rasmol")});c(b,"setPyMOLDefaults",
function(){this.setCommonDefaults();this.vwr.setStringProperty("measurementUnits","ANGSTROMS");this.vwr.setBooleanProperty("zoomHeight",!0)});b.getNoCase=c(b,"getNoCase",function(a,b){for(var c,p=a.entrySet().iterator();p.hasNext()&&((c=p.next())||1);)if(c.getKey().equalsIgnoreCase(b))return c.getValue();return null},"java.util.Map,~S");c(b,"listSavedStates",function(){for(var a="",b,c=this.saved.keySet().iterator();c.hasNext()&&((b=c.next())||1);)a+="\n"+b;return a});c(b,"deleteSavedType",function(a){for(var b=
this.saved.keySet().iterator();b.hasNext();)b.next().startsWith(a)&&b.remove()},"~S");c(b,"deleteSaved",function(a){for(var b=this.saved.keySet().iterator();b.hasNext();){var c=b.next();(c.startsWith(a)||c.endsWith("_"+a)&&c.indexOf("_")==c.lastIndexOf("_"+a))&&b.remove()}},"~S");c(b,"saveSelection",function(a,b){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Selected_"):(a=this.lastSelected="Selected_"+a,this.saved.put(a,JU.BSUtil.copy(b)))},"~S,JU.BS");c(b,"restoreSelection",function(a){a=JV.StateManager.getNoCase(this.saved,
0<a.length?"Selected_"+a:this.lastSelected);if(null==a)return this.vwr.selectStatus(new JU.BS,!1,0,!1,!1),!1;this.vwr.selectStatus(a,!1,0,!1,!1);return!0},"~S");c(b,"saveUnitCell",function(a){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("unitcell_");else{a=this.lastUnitcell="unitcell_"+a;var b=this.vwr.getCurrentUnitCell();null!=b&&(b="UNITCELL "+JU.Escape.e(b.getUnitCellVectors()),this.saved.put(a,"unitcell reset;"+b))}},"~S");c(b,"getSavedUnitCell",function(a){return JV.StateManager.getNoCase(this.saved,
0<a.length?"unitcell_"+a:this.lastUnitcell)},"~S");c(b,"restoreUnitCell",function(a){a=this.getSavedUnitCell(a);if(null==a)return this.vwr.ms.setModelCagePts(-1,null,null),!1;this.vwr.runScript(a);return!0},"~S");c(b,"saveState",function(a){a.equalsIgnoreCase("DELETE")?(this.deleteSavedType("State_"),this.clearStateStack()):0==a.length?(this.vwr.setBooleanProperty("undoAuto",!1),this.appendState(this.getStack(603984065)),this.redoStateStack.clear()):(a=this.lastState="State_"+a,this.saved.put(a,this.vwr.getStateInfo()))},
"~S");c(b,"getSavedState",function(a){if(0==a.length)return a=this.getStack(603984065),0<a.size()?a.get(a.size()-1):null;a=JV.StateManager.getNoCase(this.saved,0<a.length?"State_"+a:this.lastState);return null==a?"":a},"~S");c(b,"popStack",function(a){var b=this.getStack(a),b=0<b.size()?b.removeItemAt(b.size()-1):null;null!=b&&this.appendState(this.getStack(603984065==a?4139:603984065));this.checkStack(this.getStack(603984065));return b},"~N");c(b,"appendState",function(a){this.checkStack(a);0<this.maxUndo&&
a.addLast(this.vwr.getStateInfo())},"JU.Lst");c(b,"checkStack",function(a){for(;a.size()>this.maxUndo;)a.removeItemAt(0)},"JU.Lst");c(b,"getStack",function(a){null==this.undoStateStack&&(this.undoStateStack=new JU.Lst,this.redoStateStack=new JU.Lst);return 603984065==a?this.undoStateStack:this.redoStateStack},"~N");c(b,"clearStateStack",function(){null!=this.undoStateStack&&(this.undoStateStack.clear(),this.redoStateStack.clear())});c(b,"saveStructure",function(a){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Shape_"):
(a=this.lastShape="Shape_"+a,this.saved.put(a,this.vwr.getStructureState()))},"~S");c(b,"getSavedStructure",function(a){a=JV.StateManager.getNoCase(this.saved,0<a.length?"Shape_"+a:this.lastShape);return null==a?"":a},"~S");c(b,"saveCoordinates",function(a,b){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Coordinates_"):(a=this.lastCoordinates="Coordinates_"+a,this.saved.put(a,this.vwr.getCoordinateState(b)))},"~S,JU.BS");c(b,"getSavedCoordinates",function(a){a=JV.StateManager.getNoCase(this.saved,
0<a.length?"Coordinates_"+a:this.lastCoordinates);return null==a?"":a},"~S");c(b,"getOrientation",function(){return new JM.Orientation(this.vwr,!1,null)});c(b,"getSavedOrientationText",function(a){var b;if(null!=a)return b=this.getOrientationFor(a),null==b?"":b.getMoveToText(!0);a=new JU.SB;for(var c=this.saved.entrySet().iterator();c.hasNext()&&((b=c.next())||1);)b.getKey().startsWith("Orientation_")&&a.append(b.getValue().getMoveToText(!0));return a.toString()},"~S");c(b,"saveScene",function(a,
b){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("Scene_");else{var c=new JV.Scene(b);c.saveName=this.lastScene="Scene_"+a;this.saved.put(c.saveName,c)}},"~S,java.util.Map");c(b,"restoreScene",function(a,b){var c=JV.StateManager.getNoCase(this.saved,0<a.length?"Scene_"+a:this.lastScene);return null!=c&&c.restore(this.vwr,b)},"~S,~N");c(b,"saveOrientation",function(a,b){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("Orientation_");else{var c=new JM.Orientation(this.vwr,a.equalsIgnoreCase("default"),
b);c.saveName=this.lastOrientation="Orientation_"+a;this.saved.put(c.saveName,c)}},"~S,~A");c(b,"restoreOrientation",function(a,b,c){a=this.getOrientationFor(a);return null!=a&&a.restore(b,c)},"~S,~N,~B");c(b,"getOrientationFor",function(a){return JV.StateManager.getNoCase(this.saved,0<a.length?"Orientation_"+a:this.lastOrientation)},"~S");c(b,"saveContext",function(a,b){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Context_"):this.saved.put(this.lastContext="Context_"+a,b)},"~S,~O");c(b,"getContext",
function(a){return this.saved.get(0==a.length?this.lastContext:"Context_"+a)},"~S");c(b,"saveBonds",function(a){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("Bonds_");else{var b=new JV.Connections(this.vwr);b.saveName=this.lastConnections="Bonds_"+a;this.saved.put(b.saveName,b)}},"~S");c(b,"restoreBonds",function(a){this.vwr.clearModelDependentObjects();a=JV.StateManager.getNoCase(this.saved,0<a.length?"Bonds_"+a:this.lastConnections);return null!=a&&a.restore()},"~S");b.varClip=c(b,"varClip",
function(a,b,c){0<c&&b.length>c&&(b=b.substring(0,c)+" #...more ("+b.length+" bytes -- use SHOW "+a+" or MESSAGE @"+a+" to view)");return b},"~S,~S,~N");c(b,"getUndoMax",function(){return this.maxUndo});c(b,"setUndoMax",function(a){this.maxUndo=Math.max(a,0);this.checkStack(this.getStack(603984065));this.checkStack(this.getStack(4139))},"~N");c(b,"getUndoRedoState",function(a){return this.popStack(a)},"~N");c(b,"canDo",function(a){return 0<this.maxUndo&&this.vwr.getBoolean(603979898)&&!this.getStack(a).isEmpty()},
"~N");c(b,"getUndoInfo",function(){var a=this.vwr.getBooleanProperty("undoAuto");return this.vwr.getBoolean(603979898)?"undoAuto="+a+(!a?"; user stack sizes: UNDO="+this.getStack(603984065).size()+", REDO="+this.getStack(4139).size():""):"SET preserveState = FALSE -- undo/redo is disabled"});b=s(function(){this.scene=this.saveName=null;r(this,arguments)},JV,"Scene",null);u(b,function(a){this.scene=a},"java.util.Map");c(b,"restore",function(a,b){var c=this.scene.get("generator");null!=c&&c.generateScene(this.scene);
c=this.scene.get("pymolView");return null!=c&&a.tm.moveToPyMOL(a.eval,b,c)},"JV.Viewer,~N");b=s(function(){this.saveName=null;this.bondCount=0;this.vwr=this.connections=null;r(this,arguments)},JV,"Connections",null);u(b,function(a){var b=a.ms;if(null!=b){this.vwr=a;this.bondCount=b.bondCount;this.connections=Array(this.bondCount+1);a=b.bo;for(b=this.bondCount;0<=--b;){var c=a[b];null!=c&&(this.connections[b]=new JV.Connection(c.atom1.i,c.atom2.i,c.mad,c.colix,c.order,c.getEnergy(),c.shapeVisibilityFlags))}}},
"JV.Viewer");c(b,"restore",function(){var a=this.vwr.ms;if(null==a)return!1;a.deleteAllBonds();for(var b=this.bondCount;0<=--b;){var c=this.connections[b],p=a.ac;c.atomIndex1>=p||c.atomIndex2>=p||(p=a.bondAtoms(a.at[c.atomIndex1],a.at[c.atomIndex2],c.order,c.mad,null,c.energy,!1,!0),p.colix=c.colix,p.shapeVisibilityFlags=c.shapeVisibilityFlags)}c=a.bo;for(b=a.bondCount;0<=--b;)null!=c[b]&&(c[b].index=b);this.vwr.setShapeProperty(1,"reportAll",null);return!0});b=s(function(){this.shapeVisibilityFlags=
this.energy=this.order=this.colix=this.mad=this.atomIndex2=this.atomIndex1=0;r(this,arguments)},JV,"Connection",null);u(b,function(a,b,c,p,e,g,j){this.atomIndex1=a;this.atomIndex2=b;this.mad=c;this.colix=p;this.order=e;this.energy=g;this.shapeVisibilityFlags=j},"~N,~N,~N,~N,~N,~N,~N")});m("JV");x(["java.util.Hashtable"],"JV.StatusManager","JU.Lst $.PT J.api.Interface J.c.CBK JS.SV JU.BSUtil $.Logger JV.JC".split(" "),function(){var b=s(function(){this.cbl=this.jsl=this.vwr=null;this.statusList="";
this.allowStatusReporting=!1;this.messageQueue=null;this.statusPtr=0;this.imageMap=this.jmolScriptCallbacks=null;this.echoing=!1;this.minSyncRepeatMs=100;this.stereoSync=this.syncDisabled=this.isSynced=this.drivingSync=this.syncingMouse=this.syncingScripts=!1;this.qualityPNG=this.qualityJPG=-1;this.audios=this.imageType=null;r(this,arguments)},JV,"StatusManager",null);N(b,function(){this.messageQueue=new java.util.Hashtable;this.jmolScriptCallbacks=new java.util.Hashtable});u(b,function(a){this.vwr=
a},"JV.Viewer");c(b,"recordStatus",function(a){return this.allowStatusReporting&&0<this.statusList.length&&(this.statusList.equals("all")||0<=this.statusList.indexOf(a))},"~S");c(b,"setStatusChanged",function(a,b,c,p){if(this.recordStatus(a)){var e=new JU.Lst;e.addLast(Integer.$valueOf(++this.statusPtr));e.addLast(a);e.addLast(Integer.$valueOf(b));e.addLast(c);b=p?null:this.messageQueue.get(a);null==b?this.messageQueue.put(a,b=new JU.Lst):b.size()==JV.StatusManager.MAXIMUM_QUEUE_LENGTH&&b.removeItemAt(0);
b.addLast(e)}},"~S,~N,~O,~B");c(b,"getStatusChanged",function(a){var b=0<a.length&&"-"==a.charAt(0),c=0<a.length&&"+"==a.charAt(0),p=!1;b?this.statusList=JU.PT.rep(this.statusList,a.substring(1,a.length),""):(a=JU.PT.rep(a,"+",""),this.statusList.equals(a)||c&&0<=this.statusList.indexOf(a)?p=!0:(c||(this.statusList=""),this.statusList+=a,JU.Logger.debugging&&JU.Logger.debug("StatusManager messageQueue = "+this.statusList)));a=new JU.Lst;if(p)for(var e,p=this.messageQueue.entrySet().iterator();p.hasNext()&&
((e=p.next())||1);)a.addLast(e.getValue());this.messageQueue.clear();this.statusPtr=0;return a},"~S");c(b,"setCallbackFunction",function(a,b){var c=J.c.CBK.getCallback(a),p="string"==typeof b?b:null;if(null!=c)if(c=J.c.CBK.getCallback(a).name(),JU.Logger.info("StatusManager "+c+"callback set f="+p),null!=p&&p.startsWith("SYNC:"))if(p.toLowerCase().trim().equals("sync:off"))this.jmolScriptCallbacks.remove("SYNC:"+c),JU.Logger.info("SYNC callback for "+c+" deactivated");else{this.jmolScriptCallbacks.put("SYNC:"+
c,"_");JU.Logger.info("SYNC callback for "+c+" activated");return}else{var e="",g=null==p?0:(e=p.toLowerCase()).startsWith("script:")?7:e.startsWith("jmolscript:")?11:0;if(0==g)null==b&&this.jmolScriptCallbacks.remove(c);else{this.jmolScriptCallbacks.put(c,p.substring(g).trim());return}}null!=this.cbl&&this.cbl.setCallbackFunction(a,b)},"~S,~O");c(b,"notifyEnabled",function(a){return null!=this.cbl&&this.cbl.notifyEnabled(a)},"J.c.CBK");c(b,"getJmolScriptCallback",function(a){return this.jmolScriptCallbacks.get(a.name())},
"J.c.CBK");c(b,"fireJmolScriptCallback",function(a,b,c,p){var e=b.name();if(null!=c[0]){var g=Array(c.length);System.arraycopy(c,0,g,0,c.length);var j="try{\n"+g[0]+"\n}";g[0]=e;this.vwr.evalCallback(j,g,p)}this.jmolScriptCallbacks.containsKey("SYNC:"+b.name())&&(c[0]="SYNC");a&&this.cbl.notifyCallback(b,c)},"~B,J.c.CBK,~A,~B");c(b,"setStatusAppletReady",function(a,b){var c=b?this.getJmolScriptCallback(J.c.CBK.APPLETREADY):null,p=this.notifyEnabled(J.c.CBK.APPLETREADY);(p||null!=c)&&this.fireJmolScriptCallback(p,
J.c.CBK.APPLETREADY,z(-1,[c,a,Boolean.$valueOf(b),null]),!0)},"~S,~B");c(b,"setStatusAtomMoved",function(a){var b=this.getJmolScriptCallback(J.c.CBK.ATOMMOVED);this.setStatusChanged("atomMoved",-1,a,!1);var c=this.notifyEnabled(J.c.CBK.ATOMMOVED);(c||null!=b)&&this.fireJmolScriptCallback(c,J.c.CBK.ATOMMOVED,z(-1,[b,a,Integer.$valueOf(a.cardinality())]),!0)},"JU.BS");c(b,"notifyCalculation",function(a,b,c){var p=this.getJmolScriptCallback(J.c.CBK.CALCULATION),e=this.notifyEnabled(J.c.CBK.CALCULATION);
(e||null!=p)&&this.fireJmolScriptCallback(e,J.c.CBK.CALCULATION,z(-1,[p,b,a,c]),!0)},"~S,JU.BS,~S");c(b,"setStatusSelect",function(a){var b=this.getJmolScriptCallback(J.c.CBK.SELECT);this.setStatusChanged("select",-1,a,!1);var c=this.notifyEnabled(J.c.CBK.SELECT);(c||null!=b)&&this.fireJmolScriptCallback(c,J.c.CBK.SELECT,z(-1,[b,a,Integer.$valueOf(a.cardinality()),Integer.$valueOf(a.nextSetBit(0)),Integer.$valueOf(a.length()),this.vwr.slm.getSelectionColors()]),!0)},"JU.BS");c(b,"setStatusStructureModified",
function(a,b,c,p,e,g){null==g&&(g=0<=a?JU.BSUtil.newAndSetBit(a):this.vwr.bsA());var j=this.getJmolScriptCallback(J.c.CBK.STRUCTUREMODIFIED),f=this.notifyEnabled(J.c.CBK.STRUCTUREMODIFIED);(f||null!=j)&&this.fireJmolScriptCallback(f,J.c.CBK.STRUCTUREMODIFIED,z(-1,[j,Integer.$valueOf(c),Integer.$valueOf(a),Integer.$valueOf(b),p,Integer.$valueOf(e),g]),!0)},"~N,~N,~N,~S,~N,JU.BS");c(b,"setStatusAtomPicked",function(a,b,c){var p=this.getJmolScriptCallback(J.c.CBK.PICK);JU.Logger.info("setStatusAtomPicked("+
a+","+b+")");this.setStatusChanged("atomPicked",a,b,!1);var e=this.notifyEnabled(J.c.CBK.PICK);(e||null!=p)&&this.fireJmolScriptCallback(e,J.c.CBK.PICK,z(-1,[p,b,Integer.$valueOf(a),c]),!0)},"~N,~S,java.util.Map");c(b,"setStatusClicked",function(a,b,c,p,e){var g=this.getJmolScriptCallback(J.c.CBK.CLICK);e=D(-1,[c,e]);var j=this.notifyEnabled(J.c.CBK.CLICK);(j||null!=g)&&this.fireJmolScriptCallback(j,J.c.CBK.CLICK,z(-1,[g,Integer.$valueOf(a),Integer.$valueOf(b),Integer.$valueOf(c),Integer.$valueOf(p),
e]),!0);return e[0]},"~N,~N,~N,~N,~N");c(b,"setStatusResized",function(a,b){var c=this.getJmolScriptCallback(J.c.CBK.RESIZE),p=this.notifyEnabled(J.c.CBK.RESIZE);(p||null!=c)&&this.fireJmolScriptCallback(p,J.c.CBK.RESIZE,z(-1,[c,Integer.$valueOf(a),Integer.$valueOf(b)]),!0)},"~N,~N");c(b,"haveHoverCallback",function(){return this.jmolScriptCallbacks.containsKey(J.c.CBK.HOVER.name())||this.notifyEnabled(J.c.CBK.HOVER)});c(b,"setStatusAtomHovered",function(a,b){var c=this.getJmolScriptCallback(J.c.CBK.HOVER),
p=this.notifyEnabled(J.c.CBK.HOVER);(p||null!=c)&&this.fireJmolScriptCallback(p,J.c.CBK.HOVER,z(-1,[c,b,Integer.$valueOf(a)]),!0)},"~N,~S");c(b,"setStatusObjectHovered",function(a,b,c){var p=this.getJmolScriptCallback(J.c.CBK.HOVER),e=this.notifyEnabled(J.c.CBK.HOVER);(e||null!=p)&&this.fireJmolScriptCallback(e,J.c.CBK.HOVER,z(-1,[p,b,Integer.$valueOf(-1),a,Float.$valueOf(c.x),Float.$valueOf(c.y),Float.$valueOf(c.z)]),!0)},"~S,~S,JU.T3");c(b,"showImage",function(a,b){var c=JU.PT.split(a,"\u0001");
a=2>c.length?"Jmol":3>c.length||c[2].equals("null")?c[1].substring(c[1].lastIndexOf("/")+1):c[2];var c=this.getJmolScriptCallback(J.c.CBK.IMAGE),p=this.notifyEnabled(J.c.CBK.IMAGE);(p||null!=c)&&this.fireJmolScriptCallback(p,J.c.CBK.IMAGE,z(-1,[c,a,b]),!0);if(Boolean.TRUE.equals(b)){if(null!=this.imageMap){for(var c=new JU.Lst,e,p=this.imageMap.keySet().iterator();p.hasNext()&&((e=p.next())||1);)c.addLast(e);for(e=c.size();0<=--e;)this.imageMap.get(c.get(e)).closeMe()}}else null==this.imageMap&&(this.imageMap=
new java.util.Hashtable),e=this.imageMap.get(a),Boolean.FALSE.equals(b)?null!=e&&e.closeMe():(null==e&&null!=b&&(e=this.vwr.apiPlatform.getImageDialog(a,this.imageMap)),null!=e&&(null==b?e.closeMe():e.setImage(b)))},"~S,~O");c(b,"setFileLoadStatus",function(a,b,c,p,e,g,j){null==a&&"resetUndo".equals(b)&&(b=this.vwr.getProperty("DATA_API","getAppConsole",null),null!=b&&b.zap(),b=this.vwr.getZapName());this.setStatusChanged("fileLoaded",e,a,!1);null!=p&&this.setStatusChanged("fileLoadError",e,p,!1);
var f=this.getJmolScriptCallback(J.c.CBK.LOADSTRUCT);if((g=g&&this.notifyEnabled(J.c.CBK.LOADSTRUCT))||null!=f){var l=this.vwr.getP("_smilesString");0!=l.length&&(b=l);this.fireJmolScriptCallback(g,J.c.CBK.LOADSTRUCT,z(-1,[f,a,b,c,p,Integer.$valueOf(e),this.vwr.getP("_modelNumber"),this.vwr.getModelNumberDotted(this.vwr.ms.mc-1),j]),!0)}},"~S,~S,~S,~S,~N,~B,Boolean");c(b,"setStatusModelKit",function(a){var b=1==a?"ON":"OFF";this.setStatusChanged("modelkit",a,b,!1);a=this.getJmolScriptCallback(J.c.CBK.MODELKIT);
var c=this.notifyEnabled(J.c.CBK.MODELKIT);(c||null!=a)&&this.fireJmolScriptCallback(c,J.c.CBK.MODELKIT,z(-1,[a,b]),!0)},"~N");c(b,"setStatusFrameChanged",function(a,b,c,p,e,g,j){if(null!=this.vwr.ms){var f=this.vwr.am.animationOn,l=f?-2-e:e;this.setStatusChanged("frameChanged",l,0<=e?this.vwr.getModelNumberDotted(e):"",!1);var y=this.getJmolScriptCallback(J.c.CBK.ANIMFRAME),n=this.notifyEnabled(J.c.CBK.ANIMFRAME);(n||null!=y)&&this.fireJmolScriptCallback(n,J.c.CBK.ANIMFRAME,z(-1,[y,D(-1,[l,a,b,c,
p,e]),j,Float.$valueOf(g)]),!1);!f&&!this.vwr.isJSNoAWT&&this.vwr.checkMenuUpdate()}},"~N,~N,~N,~N,~N,~N,~S");c(b,"setStatusDragDropped",function(a,b,c,p,e){this.setStatusChanged("dragDrop",0,"",!1);var g=this.getJmolScriptCallback(J.c.CBK.DRAGDROP),j=this.notifyEnabled(J.c.CBK.DRAGDROP);if(j||null!=g)this.fireJmolScriptCallback(j,J.c.CBK.DRAGDROP,z(-1,[g,Integer.$valueOf(a),Integer.$valueOf(b),Integer.$valueOf(c),p,null==e?Array(1):e]),!0);return j},"~N,~N,~N,~S,~A");c(b,"setScriptEcho",function(a,
b){if(!(null==a||this.echoing)){this.echoing=!0;this.setStatusChanged("scriptEcho",0,a,!1);var c=this.getJmolScriptCallback(J.c.CBK.ECHO),p=this.notifyEnabled(J.c.CBK.ECHO);if(p||null!=c)this.fireJmolScriptCallback(p,J.c.CBK.ECHO,z(-1,[c,a,Integer.$valueOf(b?1:0)]),!0);this.echoing=!1}},"~S,~B");c(b,"setStatusMeasuring",function(a,b,c,p){this.setStatusChanged(a,b,c,!1);var e=null;a.equals("measureCompleted")?(JU.Logger.info("measurement["+b+"] = "+c),e=this.getJmolScriptCallback(J.c.CBK.MEASURE)):
a.equals("measurePicked")&&(this.setStatusChanged("measurePicked",b,c,!1),JU.Logger.info("measurePicked "+b+" "+c));var g=this.notifyEnabled(J.c.CBK.MEASURE);(g||null!=e)&&this.fireJmolScriptCallback(g,J.c.CBK.MEASURE,z(-1,[e,c,Integer.$valueOf(b),a,Float.$valueOf(p)]),!0)},"~S,~N,~S,~N");c(b,"notifyError",function(a,b,c){var p=this.getJmolScriptCallback(J.c.CBK.ERROR),e=this.notifyEnabled(J.c.CBK.ERROR);(e||null!=p)&&this.fireJmolScriptCallback(e,J.c.CBK.ERROR,z(-1,[p,a,b,this.vwr.getShapeErrorState(),
c]),!0)},"~S,~S,~S");c(b,"notifyMinimizationStatus",function(a,b,c,p,e){var g=this.getJmolScriptCallback(J.c.CBK.MINIMIZATION),j=this.notifyEnabled(J.c.CBK.MINIMIZATION);(j||null!=g)&&this.fireJmolScriptCallback(j,J.c.CBK.MINIMIZATION,z(-1,[g,a,b,c,p,e]),!0)},"~S,Integer,Float,Float,~S");c(b,"setScriptStatus",function(a,b,c,p){if(-1>c){var e=-2-c;this.setStatusChanged("scriptStarted",e,b,!1);a="script "+e+" started"}else if(null==a)return;var e=0==c?this.getJmolScriptCallback(J.c.CBK.SCRIPT):null,
g="Script completed"===a;if(this.recordStatus("script")){var j=null!=p;this.setStatusChanged(j?"scriptError":"scriptStatus",0,a,!1);if(j||g)this.setStatusChanged("scriptTerminated",1,"Jmol script terminated"+(j?" unsuccessfully: "+a:" successfully"),!1)}g&&(this.vwr.getBoolean(603979879)&&this.vwr.getBoolean(603979825))&&(a=this.vwr.getChimeMessenger().scriptCompleted(this,b,p));b=z(-1,[e,a,b,Integer.$valueOf(g?-1:c),p]);((c=this.notifyEnabled(J.c.CBK.SCRIPT))||null!=e)&&this.fireJmolScriptCallback(c,
J.c.CBK.SCRIPT,b,!0);this.processScript(b)},"~S,~S,~N,~S");c(b,"processScript",function(a){var b=a[3].intValue();this.vwr.notifyScriptEditor(b,a);0==b&&this.vwr.sendConsoleMessage(null==a[1]?null:a[1].toString())},"~A");c(b,"doSync",function(){return this.isSynced&&this.drivingSync&&!this.syncDisabled});c(b,"setSync",function(a){if(this.syncingMouse){if(null!=a){var b=this.getJmolScriptCallback(J.c.CBK.SYNC);null!=b&&this.fireJmolScriptCallback(!1,J.c.CBK.SYNC,z(-1,[b,a,"sending mouseSync"]),!0);
this.syncSend(a,"*",0)}}else this.syncingScripts||this.syncSend("!"+this.vwr.tm.getMoveToText(this.minSyncRepeatMs/1E3,!1),"*",0)},"~S");c(b,"setSyncDriver",function(a){this.stereoSync&&4!=a&&(this.syncSend("SET_GRAPHICS_OFF","*",0),this.stereoSync=!1);switch(a){case 4:if(!this.syncDisabled)return;this.syncDisabled=!1;break;case 3:this.syncDisabled=!0;break;case 5:this.stereoSync=this.isSynced=this.drivingSync=!0;break;case 1:this.isSynced=this.drivingSync=!0;break;case 2:this.drivingSync=!1;this.isSynced=
!0;break;default:this.isSynced=this.drivingSync=!1}JU.Logger.debugging&&JU.Logger.debug(this.vwr.appletName+" sync mode="+a+"; synced? "+this.isSynced+"; driving? "+this.drivingSync+"; disabled? "+this.syncDisabled)},"~N");c(b,"syncSend",function(a,b,c){if(0==c&&!this.notifyEnabled(J.c.CBK.SYNC))return null;a=z(-1,[null,a,b,Integer.$valueOf(c)]);null!=this.cbl&&this.cbl.notifyCallback(J.c.CBK.SYNC,a);return a[0]},"~S,~O,~N");c(b,"processService",function(a){var b=a.get("service");if(null==b||!this.notifyEnabled(J.c.CBK.SERVICE))return null;
if(C(b,"JS.SV")){var b=new java.util.Hashtable,c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);)b.put(c.getKey(),JS.SV.oValue(c.getValue()));a=b}this.cbl.notifyCallback(J.c.CBK.SERVICE,z(-1,[null,a]));return a},"java.util.Map");c(b,"getSyncMode",function(){return!this.isSynced?0:this.drivingSync?1:2});c(b,"showUrl",function(a){null!=this.jsl&&this.jsl.showUrl(a)},"~S");c(b,"clearConsole",function(){this.vwr.sendConsoleMessage(null);null!=this.jsl&&this.cbl.notifyCallback(J.c.CBK.MESSAGE,
null)});c(b,"functionXY",function(a,b,c){return null==this.jsl?M(Math.abs(b),Math.abs(c),0):this.jsl.functionXY(a,b,c)},"~S,~N,~N");c(b,"functionXYZ",function(a,b,c,p){return null==this.jsl?M(Math.abs(b),Math.abs(c),Math.abs(c),0):this.jsl.functionXYZ(a,b,c,p)},"~S,~N,~N,~N");c(b,"jsEval",function(a){return null==this.jsl?"":this.jsl.eval(a)},"~S");c(b,"createImage",function(a,b,c,p,e){return null==this.jsl?null:this.jsl.createImage(a,b,null==c?p:c,e)},"~S,~S,~S,~A,~N");c(b,"getRegistryInfo",function(){return null==
this.jsl?null:this.jsl.getRegistryInfo()});c(b,"dialogAsk",function(a,b,c){var p=a.equals("Save Image"),e=J.api.Interface.getOption("dialog.Dialog",this.vwr,"status");if(null==e)return null;e.setupUI(!1);p&&e.setImageInfo(this.qualityJPG,this.qualityPNG,this.imageType);a=e.getFileNameFromDialog(this.vwr,a,b);p&&null!=a&&(this.qualityJPG=e.getQuality("JPG"),this.qualityPNG=e.getQuality("PNG"),p=e.getType(),null!=c&&(c.put("qualityJPG",Integer.$valueOf(this.qualityJPG)),c.put("qualityPNG",Integer.$valueOf(this.qualityPNG)),
null!=p&&c.put("dialogImageType",p)),null!=p&&(this.imageType=p));return a},"~S,~S,java.util.Map");c(b,"resizeInnerPanel",function(a,b){return null==this.jsl||a==this.vwr.getScreenWidth()&&b==this.vwr.getScreenHeight()?D(-1,[a,b]):this.jsl.resizeInnerPanel("preferredWidthHeight "+a+" "+b+";")},"~N,~N");c(b,"resizeInnerPanelString",function(a){null!=this.jsl&&this.jsl.resizeInnerPanel(a)},"~S");c(b,"registerAudio",function(a,b){this.stopAudio(a);null==this.audios&&(this.audios=new java.util.Hashtable);
null==b?this.audios.remove(a):this.audios.put(a,b.get("audioPlayer"))},"~S,java.util.Map");c(b,"stopAudio",function(a){null!=this.audios&&(null==a?this.closeAllAudio():(a=this.audios.get(a),null!=a&&a.action("kill")))},"~S");c(b,"playAudio",function(a){if(this.vwr.getBoolean(603979797))try{var b=null==a?"close":a.get("action"),c=null==a?null:a.get("id");if(null!=b&&0<b.length){if(null==c||0==c.length){if(null==this.audios||this.audios.isEmpty())return;b.equals("close")&&this.closeAllAudio();return}var p=
null==this.audios?null:this.audios.get(c);if(null!=p){p.action(b);return}}try{J.api.Interface.getInterface("JU.JmolAudio",this.vwr,"script").playAudio(this.vwr,a)}catch(e){if(E(e,Exception))JU.Logger.info(e.getMessage());else throw e;}}catch(g){}else null!=a&&(a.put("status","close"),JU.Logger.info("allowAudio is set false"),this.notifyAudioStatus(a))},"java.util.Map");c(b,"closeAllAudio",function(){for(var a,b=this.audios.keySet().iterator();b.hasNext()&&((a=b.next())||1);)System.out.println("AUDIO "+
a),this.audios.get(a).action("close");this.audios.clear()});c(b,"notifyAudioStatus",function(a){var b=a.get("status"),c=a.get(b);null!=c&&this.vwr.script(c);var c=this.getJmolScriptCallback(J.c.CBK.AUDIO),p=this.notifyEnabled(J.c.CBK.AUDIO);(p||null!=c)&&this.fireJmolScriptCallback(p,J.c.CBK.AUDIO,z(-1,[c,a,b]),!0);"ended"===b&&a.get("autoclose")!==Boolean.FALSE&&this.registerAudio(a.get("id"),null)},"java.util.Map");c(b,"syncScriptErr",function(a){return this.syncScript(a,"?",0)},"~S");c(b,"syncScript",
function(a,b,c){if("GET_GRAPHICS".equalsIgnoreCase(a))return this.setSyncDriver(5),this.syncSend(a,b,0),this.vwr.setBooleanProperty("_syncMouse",!1),this.vwr.setBooleanProperty("_syncScript",!1),null;"=".equals(b)&&(b="~",this.setSyncDriver(2));var p="~".equals(b);if(0<c||!p&&!".".equals(b)){var e=this.syncSend(a,b,c);if(!"*".equals(b)||a.startsWith("{"))return"?".equals(b)?e:null}switch(a.toLowerCase()){case "on":case "true":return this.setSyncDriver(1),null;case "off":case "false":return this.setSyncDriver(0),
null;case "slave":return this.setSyncDriver(2),null}b=this.getSyncMode();if(0==b)return null;1!=b&&(p=!1);JU.Logger.debugging&&JU.Logger.debug(this.vwr.htmlName+" syncing with script: "+a);p&&this.setSyncDriver(3);if(0!=a.indexOf("Mouse: ")){b=JV.JC.getServiceCommand(a);switch(b){case 70:case 42:case 49:case 56:case 63:return this.syncSend(a,".",c),null;case 0:case 77:case 28:case 35:if(p)return null;case 21:case 7:case 14:if(null==(a=this.vwr.getJSV().processSync(a,b)))return null}this.vwr.evalStringQuietSync(a,
!0,!1);return null}this.mouseScript(a);p&&this.vwr.setSyncDriver(4);return null},"~S,~S,~N");c(b,"mouseScript",function(a){var b=JU.PT.getTokens(a),c=b[1];try{switch(c=(c.toLowerCase()+"...............").substring(0,15),"zoombyfactor...zoomby.........rotatezby......rotatexyby.....translatexyby..rotatemolecule.spinxyby.......rotatearcball..".indexOf(c)){case 0:switch(b.length){case 3:this.vwr.zoomByFactor(JU.PT.parseFloat(b[2]),2147483647,2147483647);return;case 5:this.vwr.zoomByFactor(JU.PT.parseFloat(b[2]),
JU.PT.parseInt(b[3]),JU.PT.parseInt(b[4]));return}break;case 15:switch(b.length){case 3:this.vwr.zoomBy(JU.PT.parseInt(b[2]));return}break;case 30:switch(b.length){case 3:this.vwr.rotateZBy(JU.PT.parseInt(b[2]),2147483647,2147483647);return;case 5:this.vwr.rotateZBy(JU.PT.parseInt(b[2]),JU.PT.parseInt(b[3]),JU.PT.parseInt(b[4]))}break;case 45:this.vwr.rotateXYBy(JU.PT.parseFloat(b[2]),JU.PT.parseFloat(b[3]));return;case 60:this.vwr.translateXYBy(JU.PT.parseInt(b[2]),JU.PT.parseInt(b[3]));return;case 75:this.vwr.rotateSelected(JU.PT.parseFloat(b[2]),
JU.PT.parseFloat(b[3]),null);return;case 90:this.vwr.spinXYBy(JU.PT.parseInt(b[2]),JU.PT.parseInt(b[3]),JU.PT.parseFloat(b[4]));return;case 105:this.vwr.rotateXYBy(JU.PT.parseInt(b[2]),JU.PT.parseInt(b[3]));return}}catch(p){if(!E(p,Exception))throw p;}this.vwr.showString("error reading SYNC command: "+a,!1)},"~S");c(b,"processPluginRequest",function(a,b,c){return null==this.jsl?null:this.jsl.processPluginRequest(a,b,c)},"~S,~S,~O");b.MAXIMUM_QUEUE_LENGTH=16});m("JV");x("JU.A4 $.M3 $.M4 $.P3 $.P3i $.V3 J.c.STER JU.Point3fi".split(" "),
"JV.TransformManager","java.util.Hashtable JU.P4 $.Quat $.SB J.api.Interface JU.Escape $.Logger".split(" "),function(){var b=s(function(){this.spinThread=this.vibrationThread=this.movetoThread=this.vwr=null;this.perspectiveModel=11;this.modelRadiusPixels=this.modelRadius=this.modelCenterOffset=this.cameraDistanceFromCenter=this.aperatureAngle=this.referencePlaneOffset=this.cameraScaleFactor=0;this.navigationShiftXY=this.navigationOffset=this.navigationCenter=null;this.navigationDepthPercent=0;this.vectorTemp=
this.matrixTemp=null;this.splitFrameCurrentlyRendering=-1;this.haveNotifiedNaN=!1;this.spinX=0;this.spinY=30;this.spinZ=0;this.spinFps=30;this.navZ=this.navY=this.navX=0;this.navFps=NaN;this.doTransform4D=this.isSpinSelected=this.isSpinFixed=this.isSpinInternal=!1;this.rotationCenterDefault=this.perspectiveShiftXY=this.perspectiveOffset=this.fixedRotationCenter=this.fixedRotationOffset=null;this.rotationRadiusDefault=0;this.internalRotationCenter=this.internalTranslation=this.internalRotationAxis=
this.fixedRotationAxis=null;this.internalRotationAngle=0;this.rotationAxis=this.pointT2=this.vectorT2=this.vectorT=this.axisangleT=this.matrixTemp4=this.matrixTemp3=this.matrixRotate=null;this.rotationRate=0;this.cameraSetting=this.camera=this.fixedTranslation=null;this.yTranslationFraction=this.xTranslationFraction=0.5;this.previousY=this.previousX=this.prevZoomSetting=0;this.zoomEnabled=!0;this.zmPctSet=this.zmPct=100;this.zoomRatio=0;this.internalSlab=this.zShadeEnabled=this.slabEnabled=!1;this.depthValue=
this.slabValue=this.depthPercentSetting=this.slabPercentSetting=0;this.zSlabPercentSetting=50;this.zDepthPercentSetting=0;this.zSlabPoint=null;this.slabRange=this.zDepthValue=this.zSlabValue=0;this.depthPlane=this.slabPlane=null;this.perspectiveDepth=!0;this.scale3D=!1;this.cameraDepthSetting=this.cameraDepth=3;this.visualRangeAngstroms=0;this.cameraDistance=1E3;this.scale3DAngstromsPerInch=this.scaleDefaultPixelsPerAngstrom=this.scalePixelsPerAngstrom=this.screenPixelCount=this.height=this.width=
0;this.zoomHeight=this.useZoomLarge=this.antialias=!1;this.screenHeight=this.screenWidth=0;this.ptVibTempSafe=this.iScrPtSafe=this.fScrPt=this.ptVibTemp=this.iScrPt=this.fScrPtSafe=this.matrixTransformInv=this.matrixTransform=null;this.navigating=!1;this.defaultMode=this.mode=0;this.matrixTest=this.aaTest1=this.ptTest3=this.ptTest2=this.ptTest1=this.untransformedPoint=null;this.vibrationOn=this.spinIsGesture=this.navOn=this.vectorSpinOnly=this.spinOn=!1;this.vibrationScale=this.vibrationPeriodMs=
this.vibrationPeriod=0;this.stereoColors=this.stereoMode=this.vibrationT=null;this.stereoDoubleDTI=this.stereoDoubleFull=!1;this.stereoDegrees=NaN;this.stereoRadians=0;this.stereoFrame=!1;this.matrixStereo=null;this.windowCentered=!1;this.ptOffset=this.bsSelectedAtoms=this.bsFrameOffsets=this.frameOffsets=this.frameOffset=null;this.navMode=1;this.zoomFactor=3.4028235E38;this.navigationSlabOffset=0;this.nav=null;r(this,arguments)},JV,"TransformManager",null);N(b,function(){this.navigationCenter=new JU.P3;
this.navigationOffset=new JU.P3;this.navigationShiftXY=new JU.P3;this.matrixTemp=new JU.M4;this.vectorTemp=new JU.V3;this.fixedRotationOffset=new JU.P3;this.fixedRotationCenter=new JU.P3;this.perspectiveOffset=new JU.P3;this.perspectiveShiftXY=new JU.P3;this.rotationCenterDefault=new JU.P3;this.fixedRotationAxis=new JU.A4;this.internalRotationAxis=new JU.A4;this.internalRotationCenter=JU.P3.new3(0,0,0);this.matrixRotate=new JU.M3;this.matrixTemp3=new JU.M3;this.matrixTemp4=new JU.M4;this.axisangleT=
new JU.A4;this.vectorT=new JU.V3;this.vectorT2=new JU.V3;this.pointT2=new JU.P3;this.rotationAxis=new JU.V3;this.fixedTranslation=new JU.P3;this.camera=new JU.P3;this.cameraSetting=new JU.P3;this.matrixTransform=new JU.M4;this.matrixTransformInv=new JU.M4;this.fScrPtSafe=new JU.P3;this.iScrPt=new JU.P3i;this.ptVibTemp=new JU.Point3fi;this.fScrPt=new JU.P3;this.iScrPtSafe=new JU.P3i;this.ptVibTempSafe=new JU.Point3fi;this.untransformedPoint=new JU.P3;this.ptTest1=new JU.P3;this.ptTest2=new JU.P3;this.ptTest3=
new JU.P3;this.aaTest1=new JU.A4;this.matrixTest=new JU.M3;this.vibrationT=new JU.P3;this.stereoMode=J.c.STER.NONE;this.matrixStereo=new JU.M3;this.frameOffset=new JU.P3;this.ptOffset=new JU.P3});u(b,function(){});b.getTransformManager=c(b,"getTransformManager",function(a,b,c,p){p=p?J.api.Interface.getInterface("JV.TransformManager4D",a,"tm"):new JV.TransformManager;p.vwr=a;p.setScreenParameters(b,c,!0,!1,!0,!0);return p},"JV.Viewer,~N,~N,~B");c(b,"setDefaultPerspective",function(){this.setCameraDepthPercent(3,
!0);this.setPerspectiveDepth(!0);this.setStereoDegrees(-5);this.visualRangeAngstroms=5;this.setSpinOff();this.setVibrationPeriod(0)});c(b,"homePosition",function(a){a&&this.setSpinOff();this.setNavOn(!1);this.navFps=10;this.navX=this.navY=this.navZ=0;this.rotationCenterDefault.setT(this.vwr.getBoundBoxCenter());this.setFixedRotationCenter(this.rotationCenterDefault);this.rotationRadiusDefault=this.setRotationRadius(0,!0);this.windowCentered=!0;this.setRotationCenterAndRadiusXYZ(null,!0);this.resetRotation();
a=this.vwr.ms.getInfoM("defaultOrientationMatrix");null!=a&&this.setRotation(a);this.setZoomEnabled(!0);this.zoomToPercent(this.vwr.g.modelKitMode?50:100);this.zmPct=this.zmPctSet;this.slabReset();this.resetFitToScreen(!0);this.vwr.isJmolDataFrame()?this.fixedRotationCenter.set(0,0,0):this.vwr.g.axesOrientationRasmol&&this.matrixRotate.setAsXRotation(3.141592653589793);this.vwr.stm.saveOrientation("default",null);1==this.mode&&this.setNavigationMode(!0)},"~B");c(b,"setRotation",function(a){a.isRotation()?
this.matrixRotate.setM3(a):this.resetRotation()},"JU.M3");c(b,"resetRotation",function(){this.matrixRotate.setScale(1)});c(b,"clearThreads",function(){this.clearVibration();this.clearSpin();this.setNavOn(!1);this.stopMotion()});c(b,"clear",function(){this.fixedRotationCenter.set(0,0,0);this.navigating=!1;this.zSlabPoint=this.depthPlane=this.slabPlane=null;this.resetNavigationPoint(!0)});c(b,"setFixedRotationCenter",function(a){null!=a&&this.fixedRotationCenter.setT(a)},"JU.T3");c(b,"setRotationPointXY",
function(a){a=this.transformPtSafe(a);this.fixedTranslation.set(a.x,a.y,0)},"JU.P3");c(b,"spinXYBy",function(a,b,c){if(0==a&&0==b)null!=this.spinThread&&this.spinIsGesture&&this.clearSpin();else{this.clearSpin();var p=JU.P3.newP(this.fixedRotationCenter),e=new JU.P3;this.transformPt3fSafe(p,e);a=JU.P3.new3(-b,a,0);a.add(e);this.unTransformPoint(a,a);this.vwr.setInMotion(!1);this.rotateAboutPointsInternal(null,a,p,10*c,NaN,!1,!0,null,!0,null,null,null,null,null,!1,null)}},"~N,~N,~N");c(b,"rotateXYBy",
function(a,b,c){this.vwr.is2D()||this.rotate3DBall(a,b,c)},"~N,~N,JU.BS");c(b,"rotateZBy",function(a,b,c){2147483647!=b&&2147483647!=c&&this.resetXYCenter(b,c);this.rotateZRadians(a/57.29577951308232)},"~N,~N,~N");c(b,"applyRotation",function(a,b,c,p,e,g,j){null==c?this.matrixRotate.mul2(a,this.matrixRotate):(this.vwr.moveAtoms(g,a,this.matrixRotate,p,this.internalRotationCenter,b,c,e,j),null!=p&&this.internalRotationCenter.add(p))},"JU.M3,~B,JU.BS,JU.V3,~B,JU.M4,~B");c(b,"rotate3DBall",function(a,
b,c){this.matrixTemp3.setAsBallRotation(0.017453292519943295,-b,-a)&&this.applyRotation(this.matrixTemp3,!1,c,null,!1,null,!0)},"~N,~N,JU.BS");c(b,"rotateXRadians",function(a,b){this.applyRotation(this.matrixTemp3.setAsXRotation(a),!1,b,null,!1,null,!1)},"~N,JU.BS");c(b,"rotateYRadians",function(a,b){this.applyRotation(this.matrixTemp3.setAsYRotation(a),!1,b,null,!1,null,!1)},"~N,JU.BS");c(b,"rotateZRadians",function(a){this.applyRotation(this.matrixTemp3.setAsZRotation(a),!1,null,null,!1,null,!1)},
"~N");c(b,"rotateAxisAngle",function(a,b){this.axisangleT.setVA(a,b);this.rotateAxisAngle2(this.axisangleT,null)},"JU.V3,~N");c(b,"rotateAxisAngle2",function(a,b){this.applyRotation(this.matrixTemp3.setAA(a),!1,b,null,!1,null,!1)},"JU.A4,JU.BS");c(b,"rotateAxisAngleAtCenter",function(a,b,c,p,e,g,j){null!=b&&this.moveRotationCenter(b,!0);g&&this.setSpinOff();this.setNavOn(!1);if(this.vwr.headless){if(g&&3.4028235E38==e)return!1;g=!1}if(Float.isNaN(p)||0==p||0==e)return!1;null!=b&&this.setRotationPointXY(b);
this.setFixedRotationCenter(b);this.rotationAxis.setT(c);this.rotationRate=p;if(g)return this.fixedRotationAxis.setVA(c,0.017453292519943295*p),this.isSpinInternal=!1,this.isSpinFixed=!0,this.isSpinSelected=null!=j,this.setSpin(a,!0,e,null,null,null,j,!1,null,-1),3.4028235E38!=e;a=0.017453292519943295*e;this.fixedRotationAxis.setVA(c,e);this.rotateAxisAngleRadiansFixed(a,j);return!0},"J.api.JmolScriptEvaluator,JU.P3,JU.V3,~N,~N,~B,JU.BS");c(b,"rotateAxisAngleRadiansFixed",function(a,b){this.axisangleT.setAA(this.fixedRotationAxis);
this.axisangleT.angle=a;this.rotateAxisAngle2(this.axisangleT,b)},"~N,JU.BS");c(b,"rotateAboutPointsInternal",function(a,b,c,p,e,g,j,f,l,y,n,q,m,r,s,u){j&&this.setSpinOff();this.setNavOn(!1);if(null==m&&null==q&&null==u&&(null==y||0.001>y.length())&&(j?Float.isNaN(p)||0==p:0==e))return!1;var x=null;null==q&&null==m&&(x=JU.V3.newVsub(c,b),g&&x.scale(-1),this.internalRotationCenter.setT(b),this.rotationAxis.setT(x),this.internalTranslation=null==y?null:JU.V3.newV(y));b=null!=f;c=-1;if(j)return null==
q&&null==m?(0==e&&(e=NaN),Float.isNaN(e)?this.rotationRate=p:(c=w(Math.abs(e)/Math.abs(p)*this.spinFps+0.5),this.rotationRate=e/c*this.spinFps,null!=y&&this.internalTranslation.scale(1/c)),this.internalRotationAxis.setVA(x,0.017453292519943295*(Float.isNaN(this.rotationRate)?0:this.rotationRate)),this.isSpinInternal=!0,this.isSpinFixed=!1,this.isSpinSelected=b):e=p,this.setSpin(a,!0,e,n,q,m,f,l,u,null==u?-1:c),!Float.isNaN(e);a=0.017453292519943295*e;this.internalRotationAxis.setVA(x,a);this.rotateAxisAngleRadiansInternal(a,
f,r,s);return!1},"J.api.JmolScriptEvaluator,JU.T3,JU.T3,~N,~N,~B,~B,JU.BS,~B,JU.V3,JU.Lst,~A,JU.M3,JU.M4,~B,~A");c(b,"rotateAxisAngleRadiansInternal",function(a,b,c,p){this.internalRotationAngle=a;this.vectorT.set(this.internalRotationAxis.x,this.internalRotationAxis.y,this.internalRotationAxis.z);this.matrixRotate.rotate2(this.vectorT,this.vectorT2);this.axisangleT.setVA(this.vectorT2,a);this.applyRotation(this.matrixTemp3.setAA(this.axisangleT),!0,b,this.internalTranslation,1E6<a,c,p);null==b&&
this.getNewFixedRotationCenter()},"~N,JU.BS,JU.M4,~B");c(b,"getNewFixedRotationCenter",function(){this.axisangleT.setAA(this.internalRotationAxis);this.axisangleT.angle=-this.internalRotationAngle;this.matrixTemp4.setToAA(this.axisangleT);this.vectorT.setT(this.internalRotationCenter);this.pointT2.sub2(this.fixedRotationCenter,this.vectorT);var a=this.matrixTemp4.rotTrans2(this.pointT2,new JU.P3);a.add(this.vectorT);this.setRotationCenterAndRadiusXYZ(a,!1)});c(b,"setTranslationFractions",function(){this.xTranslationFraction=
this.fixedTranslation.x/this.width;this.yTranslationFraction=this.fixedTranslation.y/this.height});c(b,"centerAt",function(a,b,c){null==c?this.translateXYBy(a,b):(this.windowCentered&&this.vwr.setBooleanProperty("windowCentered",!1),this.fixedTranslation.x=a,this.fixedTranslation.y=b,this.setFixedRotationCenter(c))},"~N,~N,JU.P3");c(b,"percentToPixels",function(a,b){switch(a.charCodeAt(0)){case 120:return w(Math.floor(b/100*this.width));case 121:return w(Math.floor(b/100*this.height));case 122:return w(Math.floor(b/
100*this.screenPixelCount))}return 0},"~S,~N");c(b,"angstromsToPixels",function(a){return this.scalePixelsPerAngstrom*a},"~N");c(b,"translateXYBy",function(a,b){this.fixedTranslation.x+=a;this.fixedTranslation.y+=b;this.setTranslationFractions()},"~N,~N");c(b,"setCamera",function(a,b){this.cameraSetting.set(a,b,0==a&&0==b?0:1)},"~N,~N");c(b,"translateToPercent",function(a,b){switch(a.charCodeAt(0)){case 120:this.xTranslationFraction=0.5+b/100;this.fixedTranslation.x=this.width*this.xTranslationFraction;
break;case 121:this.yTranslationFraction=0.5+b/100;this.fixedTranslation.y=this.height*this.yTranslationFraction;break;case 122:1==this.mode&&this.setNavigationDepthPercent(b)}},"~S,~N");c(b,"getTranslationXPercent",function(){return 0==this.width?0:100*(this.fixedTranslation.x-this.width/2)/this.width});c(b,"getTranslationYPercent",function(){return 0==this.height?0:100*(this.fixedTranslation.y-this.height/2)/this.height});c(b,"getTranslationScript",function(){var a="",b=this.getTranslationXPercent();
0!=b&&(a+="translate x "+b+";");b=this.getTranslationYPercent();0!=b&&(a+="translate y "+b+";");return a});c(b,"getOrientationText",function(a,b){switch(a){case 4129:return this.getMoveToText(1,!1);case 1073742132:var c=this.getRotationQ();b&&(c=c.inv());return c.toString();case 1073742178:var c=new JU.SB,p=this.getTranslationXPercent();JV.TransformManager.truncate2(c,b?-p:p);p=this.getTranslationYPercent();JV.TransformManager.truncate2(c,b?-p:p);return c.toString();default:return this.getMoveToText(1,
!0)+"\n#OR\n"+this.getRotateZyzText(!0)}},"~N,~B");c(b,"getRotationQ",function(){return JU.Quat.newM(this.matrixRotate)});c(b,"getOrientationInfo",function(){var a=new java.util.Hashtable;a.put("moveTo",this.getMoveToText(1,!1));a.put("center","center "+this.getCenterText());a.put("centerPt",this.fixedRotationCenter);var b=new JU.A4;b.setM(this.matrixRotate);a.put("axisAngle",b);a.put("quaternion",this.getRotationQ().toPoint4f());a.put("rotationMatrix",this.matrixRotate);a.put("rotateZYZ",this.getRotateZyzText(!1));
a.put("rotateXYZ",this.getRotateXyzText());a.put("transXPercent",Float.$valueOf(this.getTranslationXPercent()));a.put("transYPercent",Float.$valueOf(this.getTranslationYPercent()));a.put("zoom",Float.$valueOf(this.zmPct));a.put("modelRadius",Float.$valueOf(this.modelRadius));1==this.mode&&(a.put("navigationCenter","navigate center "+JU.Escape.eP(this.navigationCenter)),a.put("navigationOffsetXPercent",Float.$valueOf(this.getNavigationOffsetPercent("X"))),a.put("navigationOffsetYPercent",Float.$valueOf(this.getNavigationOffsetPercent("Y"))),
a.put("navigationDepthPercent",Float.$valueOf(this.navigationDepthPercent)));return a});c(b,"getRotation",function(a){a.setM3(this.matrixRotate)},"JU.M3");c(b,"setZoomHeight",function(a,b){this.zoomHeight=a;this.scaleFitToScreen(!1,b,!1,!0)},"~B,~B");c(b,"zoomBy",function(a){20<a?a=20:-20>a&&(a=-20);var b=a*this.zmPctSet/50;0==b&&(b=0<a?1:0>b?-1:0);this.zoomRatio=(b+this.zmPctSet)/this.zmPctSet;this.zmPctSet+=b},"~N");c(b,"zoomByFactor",function(a,b,c){!(0>=a)&&this.zoomEnabled&&(1!=this.mode?(this.zoomRatio=
a,this.zmPctSet*=a,this.resetXYCenter(b,c)):this.getNav()&&this.nav.zoomByFactor(a,b,c))},"~N,~N,~N");c(b,"zoomToPercent",function(a){this.zmPctSet=a;this.zoomRatio=0},"~N");c(b,"translateZBy",function(a){a>=this.screenPixelCount||(a=this.scalePixelsPerAngstrom/(1-1*a/this.screenPixelCount),a>=this.screenPixelCount||(a=100*(a/this.scaleDefaultPixelsPerAngstrom),this.zoomRatio=a/this.zmPctSet,this.zmPctSet=a))},"~N");c(b,"resetXYCenter",function(a,b){if(!(2147483647==a||2147483647==b)){this.windowCentered&&
this.vwr.setBooleanProperty("windowCentered",!1);var c=new JU.P3;this.transformPt3fSafe(this.fixedRotationCenter,c);c.set(a,b,c.z);this.unTransformPoint(c,c);this.fixedTranslation.set(a,b,0);this.setFixedRotationCenter(c)}},"~N,~N");c(b,"zoomByPercent",function(a){var b=a*this.zmPctSet/100;0==b&&(b=0>a?-1:1);this.zoomRatio=(b+this.zmPctSet)/this.zmPctSet;this.zmPctSet+=b},"~N");c(b,"setScaleAngstromsPerInch",function(a){if(this.scale3D=0<a)this.scale3DAngstromsPerInch=a;this.perspectiveDepth=!this.scale3D},
"~N");c(b,"setSlabRange",function(a){this.slabRange=a},"~N");c(b,"setSlabEnabled",function(a){this.vwr.g.setB("slabEnabled",this.slabEnabled=a)},"~B");c(b,"setZShadeEnabled",function(a){this.zShadeEnabled=a;this.vwr.g.setB("zShade",a)},"~B");c(b,"setZoomEnabled",function(a){this.zoomEnabled=a;this.vwr.g.setB("zoomEnabled",a)},"~B");c(b,"slabReset",function(){this.slabToPercent(100);this.depthToPercent(0);this.slabPlane=this.depthPlane=null;this.setSlabEnabled(!1);this.setZShadeEnabled(!1);this.slabDepthChanged()});
c(b,"getSlabPercentSetting",function(){return this.slabPercentSetting});c(b,"slabDepthChanged",function(){this.vwr.g.setI("slab",this.slabPercentSetting);this.vwr.g.setI("depth",this.depthPercentSetting);this.finalizeTransformParameters()});c(b,"slabByPercentagePoints",function(a){this.slabPlane=null;if(!(0>a?this.slabPercentSetting<=Math.max(0,this.depthPercentSetting):100<=this.slabPercentSetting))this.slabPercentSetting+=a,this.slabDepthChanged(),this.depthPercentSetting>=this.slabPercentSetting&&
(this.depthPercentSetting=this.slabPercentSetting-1)},"~N");c(b,"depthByPercentagePoints",function(a){this.depthPlane=null;if(!(0>a?0>=this.depthPercentSetting:this.depthPercentSetting>=Math.min(100,this.slabPercentSetting)))this.depthPercentSetting+=a,this.slabPercentSetting<=this.depthPercentSetting&&(this.slabPercentSetting=this.depthPercentSetting+1),this.slabDepthChanged()},"~N");c(b,"slabDepthByPercentagePoints",function(a){this.depthPlane=this.slabPlane=null;if(!(0>a?this.slabPercentSetting<=
Math.max(0,this.depthPercentSetting):this.depthPercentSetting>=Math.min(100,this.slabPercentSetting)))this.slabPercentSetting+=a,this.depthPercentSetting+=a,this.slabDepthChanged()},"~N");c(b,"slabToPercent",function(a){this.slabPlane=null;this.vwr.setFloatProperty("slabRange",0);this.slabPercentSetting=a;this.depthPercentSetting>=this.slabPercentSetting&&(this.depthPercentSetting=this.slabPercentSetting-1);this.slabDepthChanged()},"~N");c(b,"depthToPercent",function(a){this.depthPlane=null;this.vwr.g.setI("depth",
a);this.depthPercentSetting=a;this.slabPercentSetting<=this.depthPercentSetting&&(this.slabPercentSetting=this.depthPercentSetting+1);this.slabDepthChanged()},"~N");c(b,"zSlabToPercent",function(a){this.zSlabPercentSetting=a;this.zDepthPercentSetting>this.zSlabPercentSetting&&(this.zDepthPercentSetting=a)},"~N");c(b,"zDepthToPercent",function(a){this.zDepthPercentSetting=a;this.zDepthPercentSetting>this.zSlabPercentSetting&&(this.zSlabPercentSetting=a)},"~N");c(b,"slabInternal",function(a,b){b?(this.depthPlane=
a,this.depthPercentSetting=0):(this.slabPlane=a,this.slabPercentSetting=100);this.slabDepthChanged()},"JU.P4,~B");c(b,"setSlabDepthInternal",function(a){a?this.depthPlane=null:this.slabPlane=null;this.finalizeTransformParameters();this.slabInternal(this.getSlabDepthPlane(a),a)},"~B");c(b,"getSlabDepthPlane",function(a){if(a){if(null!=this.depthPlane)return this.depthPlane}else if(null!=this.slabPlane)return this.slabPlane;var b=this.matrixTransform;return JU.P4.new4(-b.m20,-b.m21,-b.m22,-b.m23+(a?
this.depthValue:this.slabValue))},"~B");c(b,"getCameraFactors",function(){this.aperatureAngle=360*Math.atan2(this.screenPixelCount/2,this.referencePlaneOffset)/3.141592653589793;this.cameraDistanceFromCenter=this.referencePlaneOffset/this.scalePixelsPerAngstrom;var a=JU.P3.new3(w(this.screenWidth/2),w(this.screenHeight/2),this.referencePlaneOffset);this.unTransformPoint(a,a);var b=JU.P3.new3(w(this.screenWidth/2),w(this.screenHeight/2),0);this.unTransformPoint(b,b);b.sub(this.fixedRotationCenter);
var c=JU.P3.new3(w(this.screenWidth/2),w(this.screenHeight/2),this.cameraDistanceFromCenter*this.scalePixelsPerAngstrom);this.unTransformPoint(c,c);c.sub(this.fixedRotationCenter);b.add(c);return z(-1,[a,b,this.fixedRotationCenter,JU.P3.new3(this.cameraDistanceFromCenter,this.aperatureAngle,this.scalePixelsPerAngstrom)])});c(b,"setPerspectiveDepth",function(a){this.perspectiveDepth!=a&&(this.perspectiveDepth=a,this.vwr.g.setB("perspectiveDepth",a),this.resetFitToScreen(!1))},"~B");c(b,"getPerspectiveDepth",
function(){return this.perspectiveDepth});c(b,"setCameraDepthPercent",function(a,b){this.resetNavigationPoint(b);var c=0>a?-a/100:a;0!=c&&(this.cameraDepthSetting=c,this.vwr.g.setF("cameraDepth",this.cameraDepthSetting),this.cameraDepth=NaN)},"~N,~B");c(b,"getCameraDepth",function(){return this.cameraDepthSetting});c(b,"setScreenParameters0",function(a,b,c,p,e,g){2147483647!=a&&(this.screenWidth=a,this.screenHeight=b,this.useZoomLarge=c,this.width=(this.antialias=p)?2*a:a,this.height=p?2*b:b,this.scaleFitToScreen(!1,
c,e,g))},"~N,~N,~B,~B,~B,~B");c(b,"setAntialias",function(a){var b=this.antialias!=a;this.width=(this.antialias=a)?2*this.screenWidth:this.screenWidth;this.height=this.antialias?2*this.screenHeight:this.screenHeight;b&&this.scaleFitToScreen(!1,this.useZoomLarge,!1,!1)},"~B");c(b,"defaultScaleToScreen",function(a){return this.screenPixelCount/2/a},"~N");c(b,"resetFitToScreen",function(a){this.scaleFitToScreen(a,this.vwr.g.zoomLarge,!0,!0)},"~B");c(b,"scaleFitToScreen",function(a,b,c,p){0==this.width||
0==this.height?this.screenPixelCount=1:(this.fixedTranslation.set(this.width*(a?0.5:this.xTranslationFraction),this.height*(a?0.5:this.yTranslationFraction),0),this.setTranslationFractions(),a&&this.camera.set(0,0,0),p&&this.resetNavigationPoint(c),this.zoomHeight&&(b=this.height>this.width),this.screenPixelCount=b==this.height>this.width?this.height:this.width);2<this.screenPixelCount&&(this.screenPixelCount-=2);this.scaleDefaultPixelsPerAngstrom=this.defaultScaleToScreen(this.modelRadius)},"~B,~B,~B,~B");
c(b,"scaleToScreen",function(a,b){if(0==b||2>a)return 0;var c=this.scaleToPerspective(a,b*this.scalePixelsPerAngstrom/1E3);return 0<c?c:1},"~N,~N");c(b,"unscaleToScreen",function(a,b){var c=b/this.scalePixelsPerAngstrom;return this.perspectiveDepth?c/this.getPerspectiveFactor(a):c},"~N,~N");c(b,"scaleToPerspective",function(a,b){return this.perspectiveDepth?b*this.getPerspectiveFactor(a):b},"~N,~N");c(b,"setNavigationMode",function(a){var b=this.mode;this.mode=a?1:this.defaultMode;this.resetNavigationPoint(a||
1==b)},"~B");c(b,"isNavigating",function(){return this.navigating||this.navOn});c(b,"finalizeTransformParameters",function(){this.haveNotifiedNaN=!1;this.fixedRotationOffset.setT(this.fixedTranslation);this.camera.setT(this.cameraSetting);this.internalSlab=this.slabEnabled&&(null!=this.slabPlane||null!=this.depthPlane);var a=this.getZoomSetting();this.zmPct!=a&&(this.zmPct=a,this.vwr.g.fontCaching||this.vwr.gdata.clearFontCache());this.calcCameraFactors();this.calcTransformMatrix();1==this.mode?this.calcNavigationPoint():
this.calcSlabAndDepthValues()});c(b,"getZoomSetting",function(){5>this.zmPctSet&&(this.zmPctSet=5);2E5<this.zmPctSet&&(this.zmPctSet=2E5);return this.zoomEnabled||1==this.mode?this.zmPctSet:100});c(b,"calcSlabAndDepthValues",function(){this.slabValue=1>this.slabRange?this.zValueFromPercent(this.slabPercentSetting):w(Math.floor(this.modelCenterOffset*this.slabRange/(2*this.modelRadius)*(this.zmPctSet/100)));this.depthValue=this.zValueFromPercent(this.depthPercentSetting);this.zSlabPercentSetting==
this.zDepthPercentSetting?(this.zSlabValue=this.slabValue,this.zDepthValue=this.depthValue):(this.zSlabValue=this.zValueFromPercent(this.zSlabPercentSetting),this.zDepthValue=this.zValueFromPercent(this.zDepthPercentSetting));if(null!=this.zSlabPoint)try{this.transformPt3fSafe(this.zSlabPoint,this.pointT2),this.zSlabValue=F(this.pointT2.z)}catch(a){if(!E(a,Exception))throw a;}this.vwr.g.setO("_slabPlane",JU.Escape.eP4(this.getSlabDepthPlane(!1)));this.vwr.g.setO("_depthPlane",JU.Escape.eP4(this.getSlabDepthPlane(!0)));
this.slabEnabled||(this.slabValue=0,this.depthValue=2147483647)});c(b,"zValueFromPercent",function(a){return w(Math.floor((1-a/50)*this.modelRadiusPixels+this.modelCenterOffset))},"~N");c(b,"calcTransformMatrix",function(){this.matrixTransform.setIdentity();this.vectorTemp.sub2(this.frameOffset,this.fixedRotationCenter);this.matrixTransform.setTranslation(this.vectorTemp);this.matrixTemp.setToM3(this.stereoFrame?this.matrixStereo:this.matrixRotate);this.matrixTransform.mul2(this.matrixTemp,this.matrixTransform);
this.matrixTemp.setIdentity();this.matrixTemp.m00=this.matrixTemp.m11=this.matrixTemp.m22=this.scalePixelsPerAngstrom;this.matrixTemp.m11=this.matrixTemp.m22=-this.scalePixelsPerAngstrom;this.matrixTransform.mul2(this.matrixTemp,this.matrixTransform);this.matrixTransform.m23+=this.modelCenterOffset;try{this.matrixTransformInv.setM4(this.matrixTransform).invert()}catch(a){if(E(a,Exception))System.out.println("ERROR INVERTING matrixTransform!");else throw a;}});c(b,"rotatePoint",function(a,b){this.matrixRotate.rotate2(a,
b);b.y=-b.y},"JU.T3,JU.T3");c(b,"getScreenTemp",function(a,b){this.matrixTransform.rotTrans2(a,b)},"JU.T3,JU.P3");c(b,"transformPtScr",function(a,b){b.setT(this.transformPt(a))},"JU.T3,JU.P3i");c(b,"transformPtScrSafe",function(a,b){b.setT(this.transformPtSafe(a))},"JU.T3,JU.P3i");c(b,"transformPtScrT3",function(a,b){this.transformPt(a);b.setT(this.fScrPtSafe)},"JU.T3,JU.T3");c(b,"transformPt3f",function(a,b){this.applyPerspective(a,a,this.fScrPtSafe,null);b.setT(this.fScrPtSafe)},"JU.T3,JU.P3");
c(b,"transformPt3fSafe",function(a,b){this.applyPerspective(a,a,this.fScrPt,null);b.setT(this.fScrPt)},"JU.T3,JU.P3");c(b,"transformPtNoClip",function(a,b){this.applyPerspective(a,null,this.fScrPtSafe,null);b.setT(this.fScrPtSafe)},"JU.T3,JU.T3");c(b,"transformPt",function(a){return this.applyPerspective(a,this.internalSlab?a:null,this.fScrPtSafe,this.iScrPt)},"JU.T3");c(b,"transformPtSafe",function(a){return this.applyPerspective(a,this.internalSlab?a:null,this.fScrPt,this.iScrPtSafe)},"JU.T3");
c(b,"transformPtVib",function(a,b){return this.applyPerspective(this.getVibrationPoint(b,this.ptVibTemp.setP(a),NaN),a,this.fScrPtSafe,this.iScrPt)},"JU.P3,JU.Vibration");c(b,"transformPtVibSafe",function(a,b){return this.applyPerspective(this.getVibrationPoint(b,this.ptVibTempSafe.setP(a),NaN),a,this.fScrPt,this.iScrPtSafe)},"JU.P3,JU.Vibration");c(b,"getVibrationPoint",function(a,b,c){return a.setCalcPoint(b,this.vibrationT,Float.isNaN(c)?this.vibrationScale:c,this.vwr.g.modulationScale)},"JU.Vibration,JU.T3,~N");
c(b,"transformPt2D",function(a){-3.4028235E38==a.z?(this.iScrPt.x=w(Math.floor(a.x/100*this.screenWidth)),this.iScrPt.y=w(Math.floor((1-a.y/100)*this.screenHeight))):(this.iScrPt.x=F(a.x),this.iScrPt.y=this.screenHeight-F(a.y));this.antialias&&(this.iScrPt.x<<=1,this.iScrPt.y<<=1);this.matrixTransform.rotTrans2(this.fixedRotationCenter,this.fScrPtSafe);this.iScrPt.z=F(this.fScrPtSafe.z);return this.iScrPt},"JU.T3");c(b,"applyPerspective",function(a,b,c,p){this.getScreenTemp(a,c);a=c.z;Float.isNaN(a)?
(!this.haveNotifiedNaN&&JU.Logger.debugging&&JU.Logger.debug("NaN seen in TransformPoint"),this.haveNotifiedNaN=!0,a=c.z=1):0>=a&&(a=c.z=1);switch(this.mode){case 1:c.x-=this.navigationShiftXY.x;c.y-=this.navigationShiftXY.y;break;case 2:c.x+=this.perspectiveShiftXY.x,c.y+=this.perspectiveShiftXY.y}this.perspectiveDepth&&(a=this.getPerspectiveFactor(a),c.x*=a,c.y*=a);switch(this.mode){case 1:c.x+=this.navigationOffset.x;c.y+=this.navigationOffset.y;break;case 2:c.x-=this.perspectiveShiftXY.x,c.y-=
this.perspectiveShiftXY.y;case 0:c.x+=this.fixedRotationOffset.x,c.y+=this.fixedRotationOffset.y}Float.isNaN(c.x)&&!this.haveNotifiedNaN&&(JU.Logger.debugging&&JU.Logger.debug("NaN found in transformPoint "),this.haveNotifiedNaN=!0);if(b=null!=b&&this.xyzIsSlabbedInternal(b))c.z=1;null!=p&&p.set(F(c.x),F(c.y),b?1:F(c.z));return p},"JU.T3,JU.T3,JU.P3,JU.P3i");c(b,"xyzIsSlabbedInternal",function(a){return null!=this.slabPlane&&0<a.x*this.slabPlane.x+a.y*this.slabPlane.y+a.z*this.slabPlane.z+this.slabPlane.w||
null!=this.depthPlane&&0>a.x*this.depthPlane.x+a.y*this.depthPlane.y+a.z*this.depthPlane.z+this.depthPlane.w},"JU.T3");c(b,"move",function(a,b,c,p,e,g,j){this.movetoThread=J.api.Interface.getOption("thread.MoveToThread",this.vwr,"tm");this.movetoThread.setManager(this,this.vwr,z(-1,[b,p,M(-1,[c,e,g,j])]));0<g&&this.movetoThread.setEval(a);this.movetoThread.run()},"J.api.JmolScriptEvaluator,JU.V3,~N,JU.V3,~N,~N,~N");c(b,"isInPosition",function(a,b){if(Float.isNaN(b))return!0;this.aaTest1.setVA(a,b/
57.29577951308232);this.ptTest1.set(4.321,1.23456,3.14159);this.getRotation(this.matrixTest);this.matrixTest.rotate2(this.ptTest1,this.ptTest2);this.matrixTest.setAA(this.aaTest1).rotate2(this.ptTest1,this.ptTest3);return 0.1>this.ptTest3.distance(this.ptTest2)},"JU.V3,~N");c(b,"moveToPyMOL",function(a,b,c){var p=JU.M3.newA9(c);p.invert();var e=c[9],g=-c[10],j=-c[11],f=JU.P3.new3(c[12],c[13],c[14]),l=c[15],y=c[16],n=c[17];this.setPerspectiveDepth(!(0<=n));var n=Math.abs(n)/2,q=Math.tan(3.141592653589793*
n/180),n=j*q,q=0.5/q-0.5,m=50/n;0<l&&(l=50+F((j-l)*m),j=50+F((j-y)*m),this.setSlabEnabled(!0),this.slabToPercent(l),this.depthToPercent(j),21==c.length&&(y=0!=c[18],m=0!=c[19],c=c[20],this.setZShadeEnabled(y),y&&(m?this.vwr.setIntProperty("zSlab",F(Math.min(100,l+c*(j-l)))):this.vwr.setIntProperty("zSlab",F((l+j)/2)),this.vwr.setIntProperty("zDepth",j))));this.moveTo(a,b,f,null,0,p,100,NaN,NaN,n,null,NaN,NaN,NaN,q,e,g);return!0},"J.api.JmolScriptEvaluator,~N,~A");c(b,"moveTo",function(a,b,c,p,e,g,
j,f,l,y,n,q,m,r,s,u,w){if(null==g)if(g=new JU.M3,p=JU.V3.newV(p),Float.isNaN(e))g.m00=NaN;else if(0.01>e&&-0.01<e)g.setScale(1);else{if(0==p.x&&0==p.y&&0==p.z)return;var x=new JU.A4;x.setVA(p,e/57.29577951308232);g.setAA(x)}u==this.cameraSetting.x&&(u=NaN);w==this.cameraSetting.y&&(w=NaN);s==this.cameraDepth&&(s=NaN);Float.isNaN(u)||(f=50*u/y/this.width*this.screenPixelCount);Float.isNaN(w)||(l=50*w/y/this.height*this.screenPixelCount);e=null==c?this.scaleDefaultPixelsPerAngstrom:this.defaultScaleToScreen(y);
if(0>=b)this.setAll(c,g,n,j,f,l,y,e,r,q,m,s,u,w),this.vwr.moveUpdate(b),this.vwr.finalizeTransformParameters();else try{null==this.movetoThread&&(this.movetoThread=J.api.Interface.getOption("thread.MoveToThread",this.vwr,"tm"));var A=this.movetoThread.setManager(this,this.vwr,z(-1,[c,g,n,M(-1,[b,j,f,l,y,e,r,q,m,s,u,w])]));0>=A||this.vwr.g.waitForMoveTo?(0<A&&this.movetoThread.setEval(null==a?this.vwr.eval:a),this.movetoThread.run(),this.vwr.isSingleThreaded||(this.movetoThread=null)):this.movetoThread.start()}catch(C){if(!E(C,
Exception))throw C;}},"J.api.JmolScriptEvaluator,~N,JU.P3,JU.T3,~N,JU.M3,~N,~N,~N,~N,JU.P3,~N,~N,~N,~N,~N,~N");c(b,"setAll",function(a,b,c,p,e,g,j,f,l,y,n,q,m,r){Float.isNaN(b.m00)||this.setRotation(b);null!=a&&this.moveRotationCenter(a,!this.windowCentered);null!=c&&1==this.mode&&this.navigationCenter.setT(c);Float.isNaN(q)||this.setCameraDepthPercent(q,!1);!Float.isNaN(m)&&!Float.isNaN(r)&&this.setCamera(m,r);Float.isNaN(p)||this.zoomToPercent(p);Float.isNaN(j)||(this.modelRadius=j);Float.isNaN(f)||
(this.scaleDefaultPixelsPerAngstrom=f);!Float.isNaN(e)&&!Float.isNaN(g)&&(this.translateToPercent("x",e),this.translateToPercent("y",g));1==this.mode&&(!Float.isNaN(y)&&!Float.isNaN(n)&&this.navTranslatePercentOrTo(0,y,n),Float.isNaN(l)||this.setNavigationDepthPercent(l))},"JU.P3,JU.M3,JU.P3,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");c(b,"stopMotion",function(){this.movetoThread=null});c(b,"getRotationText",function(){this.axisangleT.setM(this.matrixRotate);var a=57.29577951308232*this.axisangleT.angle,b=
new JU.SB;this.vectorT.set(this.axisangleT.x,this.axisangleT.y,this.axisangleT.z);if(0.01>a)return"{0 0 1 0}";this.vectorT.normalize();this.vectorT.scale(1E3);b.append("{");JV.TransformManager.truncate0(b,this.vectorT.x);JV.TransformManager.truncate0(b,this.vectorT.y);JV.TransformManager.truncate0(b,this.vectorT.z);JV.TransformManager.truncate2(b,a);b.append("}");return b.toString()});c(b,"getMoveToText",function(a,b){this.finalizeTransformParameters();var c=new JU.SB;c.append("moveto ");b&&c.append("/* time, axisAngle */ ");
c.appendF(a);c.append(" ").append(this.getRotationText());b&&c.append(" /* zoom, translation */ ");JV.TransformManager.truncate2(c,this.zmPctSet);JV.TransformManager.truncate2(c,this.getTranslationXPercent());JV.TransformManager.truncate2(c,this.getTranslationYPercent());c.append(" ");b&&c.append(" /* center, rotationRadius */ ");c.append(this.getCenterText());c.append(" ").appendF(this.modelRadius);c.append(this.getNavigationText(b));b&&c.append(" /* cameraDepth, cameraX, cameraY */ ");JV.TransformManager.truncate2(c,
this.cameraDepth);JV.TransformManager.truncate2(c,this.cameraSetting.x);JV.TransformManager.truncate2(c,this.cameraSetting.y);c.append(";");return c.toString()},"~N,~B");c(b,"getCenterText",function(){return JU.Escape.eP(this.fixedRotationCenter)});c(b,"getRotateXyzText",function(){var a=new JU.SB,b=this.matrixRotate.m20,c=-(57.29577951308232*Math.asin(b)),p;0.999<b||-0.999>b?(b=-(57.29577951308232*Math.atan2(this.matrixRotate.m12,this.matrixRotate.m11)),p=0):(b=57.29577951308232*Math.atan2(this.matrixRotate.m21,
this.matrixRotate.m22),p=57.29577951308232*Math.atan2(this.matrixRotate.m10,this.matrixRotate.m00));a.append("reset");a.append(";center ").append(this.getCenterText());0!=b&&(a.append("; rotate x"),JV.TransformManager.truncate2(a,b));0!=c&&(a.append("; rotate y"),JV.TransformManager.truncate2(a,c));0!=p&&(a.append("; rotate z"),JV.TransformManager.truncate2(a,p));a.append(";");this.addZoomTranslationNavigationText(a);return a.toString()});c(b,"addZoomTranslationNavigationText",function(a){100!=this.zmPct&&
(a.append(" zoom"),JV.TransformManager.truncate2(a,this.zmPct),a.append(";"));var b=this.getTranslationXPercent();0!=b&&(a.append(" translate x"),JV.TransformManager.truncate2(a,b),a.append(";"));b=this.getTranslationYPercent();0!=b&&(a.append(" translate y"),JV.TransformManager.truncate2(a,b),a.append(";"));if(this.modelRadius!=this.rotationRadiusDefault||10==this.modelRadius)a.append(" set rotationRadius"),JV.TransformManager.truncate2(a,this.modelRadius),a.append(";");1==this.mode&&(a.append("navigate 0 center ").append(JU.Escape.eP(this.navigationCenter)),
a.append(";navigate 0 translate"),JV.TransformManager.truncate2(a,this.getNavigationOffsetPercent("X")),JV.TransformManager.truncate2(a,this.getNavigationOffsetPercent("Y")),a.append(";navigate 0 depth "),JV.TransformManager.truncate2(a,this.navigationDepthPercent),a.append(";"))},"JU.SB");c(b,"getRotateZyzText",function(a){var b=new JU.SB,c=this.vwr.ms.getInfoM("defaultOrientationMatrix");null==c?c=this.matrixRotate:(c=JU.M3.newM3(c),c.invert(),c.mul2(this.matrixRotate,c));var p=c.m22,e=57.29577951308232*
Math.acos(p);0.999<p||-0.999>p?(p=57.29577951308232*Math.atan2(c.m10,c.m11),c=0):(p=57.29577951308232*Math.atan2(c.m21,-c.m20),c=57.29577951308232*Math.atan2(c.m12,c.m02));0!=p&&(0!=e&&0!=c&&a)&&b.append("#Follows Z-Y-Z convention for Euler angles\n");b.append("reset");b.append(";center ").append(this.getCenterText());0!=p&&(b.append("; rotate z"),JV.TransformManager.truncate2(b,p));0!=e&&(b.append("; rotate y"),JV.TransformManager.truncate2(b,e));0!=c&&(b.append("; rotate z"),JV.TransformManager.truncate2(b,
c));b.append(";");this.addZoomTranslationNavigationText(b);return b.toString()},"~B");b.truncate0=c(b,"truncate0",function(a,b){a.appendC(" ");a.appendI(Math.round(b))},"JU.SB,~N");b.truncate2=c(b,"truncate2",function(a,b){a.appendC(" ");a.appendF(Math.round(100*b)/100)},"JU.SB,~N");c(b,"setSpinXYZ",function(a,b,c){Float.isNaN(a)||(this.spinX=a);Float.isNaN(b)||(this.spinY=b);Float.isNaN(c)||(this.spinZ=c);(this.isSpinInternal||this.isSpinFixed)&&this.clearSpin()},"~N,~N,~N");c(b,"setSpinFps",function(a){0>=
a?a=1:50<a&&(a=50);this.spinFps=a},"~N");c(b,"setNavXYZ",function(a,b,c){Float.isNaN(a)||(this.navX=a);Float.isNaN(b)||(this.navY=b);Float.isNaN(c)||(this.navZ=c)},"~N,~N,~N");c(b,"clearSpin",function(){this.setSpinOff();this.setNavOn(!1);this.vectorSpinOnly=this.isSpinFixed=this.isSpinInternal=!1});c(b,"setSpinOn",function(){this.setSpin(null,!0,3.4028235E38,null,null,null,null,!1,null,-1)});c(b,"setSpinOff",function(){this.setSpin(null,!1,3.4028235E38,null,null,null,null,!1,null,-1)});c(b,"setSpin",
function(a,b,c,p,e,g,j,f,l,m){this.navOn&&b&&this.setNavOn(!1);this.spinOn!=b&&(this.spinOn=b,this.vectorSpinOnly=null!=g,this.vwr.g.setB("_spinning",b),b?null==this.spinThread&&(this.spinThread=J.api.Interface.getOption("thread.SpinThread",this.vwr,"tm"),this.spinThread.setManager(this,this.vwr,z(-1,[Float.$valueOf(c),p,e,g,j,f?Boolean.TRUE:null,l,Integer.$valueOf(m)])),this.spinIsGesture=f,null!=g||Float.isNaN(c)||3.4028235E38==c||!this.vwr.g.waitForMoveTo?this.spinThread.start():(this.spinThread.setEval(a),
this.spinThread.run())):null!=this.spinThread&&(this.spinThread.reset(),this.spinThread=null))},"J.api.JmolScriptEvaluator,~B,~N,JU.Lst,~A,JU.M3,JU.BS,~B,~A,~N");c(b,"setNavOn",function(a){if(!Float.isNaN(this.navFps)){var b=this.navOn;a&&this.spinOn&&this.setSpin(null,!1,0,null,null,null,null,!1,null,-1);this.navOn=a;this.vwr.g.setB("_navigating",a);a||this.navInterrupt();a?(0==this.navX&&(0==this.navY&&0==this.navZ)&&(this.navZ=1),0==this.navFps&&(this.navFps=10),null==this.spinThread&&(this.spinThread=
J.api.Interface.getOption("thread.SpinThread",this.vwr,"tm"),this.spinThread.setManager(this,this.vwr,null),this.spinThread.start())):b&&null!=this.spinThread&&(this.spinThread.interrupt(),this.spinThread=null)}},"~B");c(b,"setVibrationScale",function(a){this.vibrationScale=a},"~N");c(b,"setVibrationPeriod",function(a){if(Float.isNaN(a))a=this.vibrationPeriod;else if(0==a)this.vibrationPeriodMs=this.vibrationPeriod=0;else{this.vibrationPeriod=Math.abs(a);this.vibrationPeriodMs=F(1E3*this.vibrationPeriod);
if(0<a)return;a=-a}this.setVibrationOn(0<a&&0<=this.vwr.ms.getLastVibrationVector(this.vwr.am.cmi,0))},"~N");c(b,"setVibrationT",function(a){this.vibrationT.x=this.vibrationT.y=this.vibrationT.z=a;0==this.vibrationScale&&(this.vibrationScale=this.vwr.g.vibrationScale)},"~N");c(b,"isVibrationOn",function(){return this.vibrationOn});c(b,"setVibrationOn",function(a){a?1>this.vwr.ms.mc?(this.vibrationOn=!1,this.vibrationT.x=this.vibrationT.y=this.vibrationT.z=0):(null==this.vibrationThread&&(this.vibrationThread=
J.api.Interface.getOption("thread.VibrationThread",this.vwr,"tm"),this.vibrationThread.setManager(this,this.vwr,null),this.vibrationThread.start()),this.vibrationOn=!0):(null!=this.vibrationThread&&(this.vibrationThread.interrupt(),this.vibrationThread=null),this.vibrationOn=!1,this.vibrationT.x=this.vibrationT.y=this.vibrationT.z=0)},"~B");c(b,"clearVibration",function(){this.setVibrationOn(!1);this.vibrationScale=0});c(b,"setStereoMode2",function(a){this.stereoMode=J.c.STER.CUSTOM;this.stereoColors=
a},"~A");c(b,"setStereoMode",function(a){this.stereoColors=null;this.stereoMode=a;this.stereoDoubleDTI=a===J.c.STER.DTI;this.stereoDoubleFull=a===J.c.STER.DOUBLE},"J.c.STER");c(b,"setStereoDegrees",function(a){this.stereoDegrees=a;this.stereoRadians=0.017453292519943295*a},"~N");c(b,"getStereoRotationMatrix",function(a){this.stereoFrame=a;if(!a)return this.matrixRotate;this.matrixTemp3.setAsYRotation(-this.stereoRadians);this.matrixStereo.mul2(this.matrixTemp3,this.matrixRotate);return this.matrixStereo},
"~B");c(b,"isWindowCentered",function(){return this.windowCentered});c(b,"setWindowCentered",function(a){this.windowCentered=a;this.resetNavigationPoint(!0)},"~B");c(b,"setRotationRadius",function(a,b){a=this.modelRadius=0>=a?this.vwr.ms.calcRotationRadius(this.vwr.am.cmi,this.fixedRotationCenter,!0):a;b&&this.vwr.setRotationRadius(a,!1);return a},"~N,~B");c(b,"setRotationCenterAndRadiusXYZ",function(a,b){this.resetNavigationPoint(!1);null==a?(this.setFixedRotationCenter(this.rotationCenterDefault),
this.modelRadius=this.rotationRadiusDefault):(this.setFixedRotationCenter(a),b&&this.windowCentered&&(this.modelRadius=this.vwr.ms.calcRotationRadius(this.vwr.am.cmi,this.fixedRotationCenter,!0)))},"JU.T3,~B");c(b,"setNewRotationCenter",function(a,b){null==a&&(a=this.rotationCenterDefault);this.windowCentered?(this.translateToPercent("x",0),this.translateToPercent("y",0),this.setRotationCenterAndRadiusXYZ(a,!0),b&&this.resetFitToScreen(!0)):this.moveRotationCenter(a,!0)},"JU.P3,~B");c(b,"moveRotationCenter",
function(a,b){this.setRotationCenterAndRadiusXYZ(a,!1);b&&this.setRotationPointXY(this.fixedRotationCenter)},"JU.P3,~B");c(b,"setCenter",function(){this.setRotationCenterAndRadiusXYZ(this.fixedRotationCenter,!0)});c(b,"setCenterAt",function(a,b){var c=JU.P3.newP(b);switch(a){case 1073741826:break;case 96:c.add(this.vwr.ms.getAverageAtomPoint());break;case 1812599299:c.add(this.vwr.getBoundBoxCenter());break;default:c.setT(this.rotationCenterDefault)}this.setRotationCenterAndRadiusXYZ(c,!0);this.resetFitToScreen(!0)},
"~N,JU.P3");c(b,"setFrameOffset",function(a){null==this.frameOffsets||0>a||a>=this.frameOffsets.length?this.frameOffset.set(0,0,0):this.frameOffset.setT(this.frameOffsets[a])},"~N");c(b,"setSelectedTranslation",function(a,b,c,p){if(this.perspectiveDepth)switch(this.bsSelectedAtoms=a,b.charCodeAt(0)){case 88:case 120:this.ptOffset.x+=c;break;case 89:case 121:this.ptOffset.y+=c;break;case 90:case 122:this.ptOffset.z+=c}else{c=new JU.V3;switch(b.charCodeAt(0)){case 88:case 120:c.set(p,0,0);break;case 89:case 121:c.set(0,
p,0);break;case 90:case 122:c.set(0,0,p)}this.vwr.moveAtoms(null,null,this.matrixRotate,c,this.internalRotationCenter,!1,a,!0,!1)}},"JU.BS,~S,~N,~N");c(b,"setNavFps",function(a){this.navFps=a},"~N");c(b,"calcCameraFactors",function(){Float.isNaN(this.cameraDepth)&&(this.cameraDepth=this.cameraDepthSetting,this.zoomFactor=3.4028235E38);this.cameraDistance=this.cameraDepth*this.screenPixelCount;this.referencePlaneOffset=this.cameraDistance+this.screenPixelCount/2;this.scalePixelsPerAngstrom=this.scale3D&&
!this.perspectiveDepth&&1!=this.mode?72/this.scale3DAngstromsPerInch*(this.antialias?2:1):this.screenPixelCount/this.visualRangeAngstroms;1!=this.mode&&(this.mode=0==this.camera.z?0:2);this.perspectiveShiftXY.set(0==this.camera.z?0:100*(this.camera.x*this.scalePixelsPerAngstrom/this.screenWidth),0==this.camera.z?0:100*(this.camera.y*this.scalePixelsPerAngstrom/this.screenHeight),0);this.modelRadiusPixels=this.modelRadius*this.scalePixelsPerAngstrom;var a=2*this.modelRadius/this.visualRangeAngstroms*
this.referencePlaneOffset;if(1==this.mode)this.calcNavCameraFactors(a);else{this.zoomFactor=3.4028235E38;this.modelCenterOffset=this.referencePlaneOffset;if(!this.scale3D||this.perspectiveDepth)this.scalePixelsPerAngstrom*=this.modelCenterOffset/a*this.zmPct/100;this.modelRadiusPixels=this.modelRadius*this.scalePixelsPerAngstrom}});c(b,"calcNavCameraFactors",function(a){3.4028235E38==this.zoomFactor?(1E4<this.zmPct&&(this.zmPct=1E4),this.modelCenterOffset=100*a/this.zmPct):this.prevZoomSetting!=this.zmPctSet&&
(this.modelCenterOffset=0==this.zoomRatio?100*a/this.zmPctSet:this.modelCenterOffset+(1-this.zoomRatio)*this.referencePlaneOffset,this.navMode=-1);this.prevZoomSetting=this.zmPctSet;this.zoomFactor=this.modelCenterOffset/this.referencePlaneOffset;this.zmPct=0==this.zoomFactor?1E4:100*(a/this.modelCenterOffset)},"~N");c(b,"getPerspectiveFactor",function(a){return 0>=a?this.referencePlaneOffset:this.referencePlaneOffset/a},"~N");c(b,"unTransformPoint",function(a,b){this.untransformedPoint.setT(a);switch(this.mode){case 1:this.untransformedPoint.x-=
this.navigationOffset.x;this.untransformedPoint.y-=this.navigationOffset.y;break;case 2:this.fScrPtSafe.x+=this.perspectiveShiftXY.x,this.fScrPtSafe.y+=this.perspectiveShiftXY.y;case 0:this.untransformedPoint.x-=this.fixedRotationOffset.x,this.untransformedPoint.y-=this.fixedRotationOffset.y}if(this.perspectiveDepth){var c=this.getPerspectiveFactor(this.untransformedPoint.z);this.untransformedPoint.x/=c;this.untransformedPoint.y/=c}switch(this.mode){case 1:this.untransformedPoint.x+=this.navigationShiftXY.x;
this.untransformedPoint.y+=this.navigationShiftXY.y;break;case 2:this.untransformedPoint.x-=this.perspectiveShiftXY.x,this.untransformedPoint.y-=this.perspectiveShiftXY.y}this.matrixTransformInv.rotTrans2(this.untransformedPoint,b)},"JU.T3,JU.T3");c(b,"resetNavigationPoint",function(a){5>this.zmPct&&1!=this.mode?(this.perspectiveDepth=!0,this.mode=1):(1==this.mode?(this.navMode=1,this.slabPercentSetting=0,this.perspectiveDepth=!0):a&&(this.slabPercentSetting=100),this.vwr.setFloatProperty("slabRange",
0),a&&this.setSlabEnabled(1==this.mode),this.zoomFactor=3.4028235E38,this.zmPctSet=this.zmPct)},"~B");c(b,"setNavigatePt",function(a){this.navigationCenter.setT(a);this.navMode=3;this.navigating=!0;this.finalizeTransformParameters();this.navigating=!1},"JU.P3");c(b,"setNavigationSlabOffsetPercent",function(a){this.vwr.g.setF("navigationSlab",a);this.calcCameraFactors();this.navigationSlabOffset=a/50*this.modelRadiusPixels},"~N");c(b,"getNavigationOffset",function(){this.transformPt3fSafe(this.navigationCenter,
this.navigationOffset);return this.navigationOffset});c(b,"getNavPtHeight",function(){return this.height/2});c(b,"getNavigationOffsetPercent",function(a){this.getNavigationOffset();return 0==this.width||0==this.height?0:"X"==a?100*(this.navigationOffset.x-this.width/2)/this.width:100*(this.navigationOffset.y-this.getNavPtHeight())/this.height},"~S");c(b,"getNavigationText",function(a){a=a?" /* navigation center, translation, depth */ ":" ";if(1!=this.mode)return a+"{0 0 0} 0 0 0";this.getNavigationOffset();
return a+JU.Escape.eP(this.navigationCenter)+" "+this.getNavigationOffsetPercent("X")+" "+this.getNavigationOffsetPercent("Y")+" "+this.navigationDepthPercent},"~B");c(b,"setScreenParameters",function(a,b,c,p,e,g){var j=1==this.mode?JU.P3.newP(this.navigationCenter):null,f=JU.P3.newP(this.navigationOffset);f.x/=this.width;f.y/=this.height;this.setScreenParameters0(a,b,c,p,e,g);null!=j&&(this.navigationCenter.setT(j),this.navTranslatePercentOrTo(-1,f.x*this.width,f.y*this.height),this.setNavigatePt(j))},
"~N,~N,~B,~B,~B,~B");c(b,"navInterrupt",function(){null!=this.nav&&this.nav.interrupt()});c(b,"getNav",function(){if(null!=this.nav)return!0;this.nav=J.api.Interface.getOption("navigate.Navigator",this.vwr,"tm");if(null==this.nav)return!1;this.nav.set(this,this.vwr);return!0});c(b,"navigateList",function(a,b){this.getNav()&&this.nav.navigateList(a,b)},"J.api.JmolScriptEvaluator,JU.Lst");c(b,"navigateAxis",function(a,b){this.getNav()&&this.nav.navigateAxis(a,b)},"JU.V3,~N");c(b,"setNavigationOffsetRelative",
function(){this.getNav()&&this.nav.setNavigationOffsetRelative()});c(b,"navigateKey",function(a,b){this.getNav()&&this.nav.navigateKey(a,b)},"~N,~N");c(b,"setNavigationDepthPercent",function(a){this.getNav()&&this.nav.setNavigationDepthPercent(a)},"~N");c(b,"navTranslatePercentOrTo",function(a,b,c){this.getNav()&&this.nav.navTranslatePercentOrTo(a,b,c)},"~N,~N,~N");c(b,"calcNavigationPoint",function(){this.getNav()&&this.nav.calcNavigationPoint()});c(b,"getNavigationState",function(){return 1==this.mode&&
this.getNav()?this.nav.getNavigationState():""})});m("JV");x("java.lang.Enum J.api.JmolViewer $.PlatformViewer J.atomdata.AtomDataServer java.util.Hashtable JU.P3".split(" "),"JV.Viewer","java.util.Arrays JU.AU $.BS $.Base64 $.CU $.DF $.Lst $.M3 $.P3i $.PT $.Quat $.Rdr $.SB J.adapter.smarter.SmarterJmolAdapter J.api.Interface J.atomdata.RadiusData J.c.FIL $.STER $.VDW J.i18n.GT JM.Measurement $.ModelSet JS.SV $.T J.thread.TimeoutThread JU.BSUtil $.C $.CommandHistory $.Elements $.Escape $.GData $.JmolMolecule $.Logger $.Parser $.TempArray JV.ActionManager $.AnimationManager $.ColorManager $.FileManager $.GlobalSettings $.JC $.ModelManager $.SelectionManager $.ShapeManager $.StateManager $.StatusManager $.TransformManager JV.binding.Binding".split(" "),
function(){var b=s(function(){this.queueOnHold=this.isSingleThreaded=this.isWebGL=this.isJSNoAWT=this.haveDisplay=this.autoExit=this.testAsync=!1;this.fullName="";this.fm=this.ms=this.definedAtomSets=this.compiler=null;this.mustRender=this.listCommands=this.isSyntaxCheck=this.isSyntaxAndFileCheck=this.isJNLP=this.isApplet=!1;this.appletName=this.htmlName="";this.tryPt=0;this.insertedCommand="";this.tm=this.sm=this.g=this.rm=this.slm=this.shm=this.dm=this.cm=this.am=this.acm=this.html5Applet=this.gdata=
null;this.logFilePath=this.syncId="";this.useCommandThread=this.noGraphicsAllowed=this.multiTouch=this.isSilent=this.isSignedAppletLocal=this.isSignedApplet=this.isPrintOnly=this.allowScripting=!1;this.tempArray=this.eval=this.scm=this.stm=this.mm=this.commandHistory=this.internalAccessPath=this.access=this.access0=this.modelAdapter=this.display=this.vwrOptions=this.commandOptions=null;this.async=!1;this.executor=null;this.screenHeight=this.screenWidth=0;this.errorMessageUntranslated=this.errorMessage=
this.chainList=this.chainMap=this.rd=this.defaultVdw=null;this.privateKey=0;this.dataOnly=!1;this.maximumSize=2147483647;this.gRight=null;this.isStereoSlave=!1;this.imageFontScaling=1;this.antialiased=!1;this.prevFrame=-2147483648;this.prevMorphModel=0;this.haveJSV=!1;this.jsv=null;this.systemInfoShown=!1;this.jzt=this.outputManager=null;this.headless=this.isPreviewOnly=!1;this.movableBitSet=null;this.hasSelected=!1;this.lastData=this.jsc=this.smilesMatcher=this.minimizer=this.dssrParser=this.annotationParser=
this.ligandModelSet=this.ligandModels=this.mouse=null;this.motionEventNumber=0;this.inMotion=!1;this.refreshing=!0;this.axesAreTainted=!1;this.jsParams=this.captureParams=null;this.cirChecked=!1;this.hoverAtomIndex=-1;this.hoverText=null;this.hoverLabel="%U";this.hoverEnabled=!0;this.currentCursor=0;this.ptTemp=null;this.selectionHalosEnabled=!1;this.noFrankEcho=this.frankOn=!0;this.scriptEditorVisible=!1;this.pm=this.headlessImageParams=this.modelkit=this.jmolpopup=this.scriptEditor=this.appConsole=
null;this.isTainted=!0;this.showSelected=this.movingSelected=!1;this.ptNew=this.ptScreenNew=this.ptScreen=null;this.atomHighlighted=-1;this.creatingImage=!1;this.userVdwMars=this.userVdws=this.bsUserVdws=null;this.currentShapeID=-1;this.localFunctions=this.currentShapeState=null;this.$isKiosk=!1;this.displayLoadErrors=!0;this.$isParallel=!1;this.stateScriptVersionInt=2147483647;this.timeouts=this.jsExporter3D=null;this.chainCaseSpecified=!1;this.macros=this.nboParser=this.triangulator=this.symStatic=
this.jsonParser=this.jcm=this.jbr=this.logFileName=this.nmrCalculation=null;this.consoleFontScale=1;r(this,arguments)},JV,"Viewer",J.api.JmolViewer,[J.atomdata.AtomDataServer,J.api.PlatformViewer]);N(b,function(){this.ptScreen=new JU.P3;this.ptScreenNew=new JU.P3;this.ptNew=new JU.P3});u(b,function(){K(this,JV.Viewer,[])});u(b,function(a){K(this,JV.Viewer,[]);this.setOptions(a)},"java.util.Map");c(b,"finalize",function(){JU.Logger.debugging&&JU.Logger.debug("vwr finalize "+this);ba(this,JV.Viewer,
"finalize",[])});c(b,"setInsertedCommand",function(a){this.insertedCommand=a},"~S");b.getJmolVersion=f(b,"getJmolVersion",function(){return null==JV.Viewer.version_date?JV.Viewer.version_date=(JV.JC.version+"  "+JV.JC.date+"").trim():JV.Viewer.version_date});b.allocateViewer=c(b,"allocateViewer",function(a,b,c,e,g,j,f,l){var m=new java.util.Hashtable;m.put("display",a);m.put("adapter",b);m.put("statusListener",f);m.put("platform",l);m.put("options",j);m.put("fullName",c);m.put("documentBase",e);m.put("codeBase",
g);return new JV.Viewer(m)},"~O,J.api.JmolAdapter,~S,java.net.URL,java.net.URL,~S,J.api.JmolStatusListener,J.api.GenericPlatform");c(b,"haveAccess",function(a){return this.access===a},"JV.Viewer.ACCESS");f(b,"getModelAdapter",function(){return null==this.modelAdapter?this.modelAdapter=new J.adapter.smarter.SmarterJmolAdapter:this.modelAdapter});f(b,"getSmartsMatch",function(a,b){null==b&&(b=this.bsA());return this.getSmilesMatcher().getSubstructureSet(a,this.ms.at,this.ms.ac,b,2)},"~S,JU.BS");c(b,
"isSubstructure",function(a,b){try{var c=this.getSmilesMatcher().find(a,b,10);return null!=c&&0<c.length}catch(e){if(E(e,Exception))return!1;throw e;}},"~S,~S");c(b,"hasStructure",function(a,b,c){try{return 1==this.getSmilesMatcher().hasStructure(a,z(-1,[b]),(c?2:1)|8)[0]}catch(e){if(E(e,Exception))return!1;throw e;}},"~S,~S,~B");c(b,"getSmartsMatchForNodes",function(a,b){return this.getSmilesMatcher().getSubstructureSet(a,b,b.length,null,2)},"~S,~A");c(b,"getSmartsMap",function(a,b,c){null==b&&(b=
this.bsA());0==c&&(c=2);return this.getSmilesMatcher().getCorrelationMaps(a,this.ms.at,this.ms.ac,b,c)},"~S,JU.BS,~N");c(b,"setOptions",function(a){this.commandHistory=new JU.CommandHistory;this.rd=new J.atomdata.RadiusData(null,0,null,null);this.defaultVdw=J.c.VDW.JMOL;this.localFunctions=new java.util.Hashtable;this.privateKey=Math.random();this.chainMap=new java.util.Hashtable;this.chainList=new JU.Lst;this.vwrOptions=a;JU.Logger.debugging&&JU.Logger.debug("Viewer constructor "+this);this.modelAdapter=
a.get("adapter");var b=a.get("statusListener");this.fullName=a.get("fullName");null==this.fullName&&(this.fullName="");var c=a.get("codePath");null==c&&(c="../java/");JV.Viewer.appletCodeBase=c.toString();JV.Viewer.appletIdiomaBase=JV.Viewer.appletCodeBase.substring(0,JV.Viewer.appletCodeBase.lastIndexOf("/",JV.Viewer.appletCodeBase.length-2)+1)+"idioma";c=a.get("documentBase");JV.Viewer.appletDocumentBase=null==c?"":c.toString();c=a.get("options");this.commandOptions=null==c?"":c.toString();(a.containsKey("debug")||
0<=this.commandOptions.indexOf("-debug"))&&JU.Logger.setLogLevel(5);this.isApplet&&a.containsKey("maximumSize")&&this.setMaximumSize(a.get("maximumSize").intValue());(this.isJNLP=this.checkOption2("isJNLP","-jnlp"))&&JU.Logger.info("setting JNLP mode TRUE");this.isApplet=(this.isSignedApplet=this.isJNLP||this.checkOption2("signedApplet","-signed"))||this.checkOption2("applet","-applet");this.allowScripting=!this.checkOption2("noscripting","-noscripting");var e=this.fullName.indexOf("__");this.htmlName=
0>e?this.fullName:this.fullName.substring(0,e);this.appletName=JU.PT.split(this.htmlName+"_","_")[0];this.syncId=0>e?"":this.fullName.substring(e+2,this.fullName.length-2);this.access=this.access0=this.checkOption2("access:READSPT","-r")?JV.Viewer.ACCESS.READSPT:this.checkOption2("access:NONE","-R")?JV.Viewer.ACCESS.NONE:JV.Viewer.ACCESS.ALL;(this.isPreviewOnly=a.containsKey("previewOnly"))&&a.remove("previewOnly");this.isPrintOnly=this.checkOption2("printOnly","-p");this.dataOnly=this.checkOption2("isDataOnly",
"\x00");this.autoExit=this.checkOption2("exit","-x");c=a.get("platform");e="unknown";null==c&&(c=this.commandOptions.contains("platform=")?this.commandOptions.substring(this.commandOptions.indexOf("platform=")+9):"J.awt.Platform");if("string"==typeof c){e=c;this.isWebGL=0<=e.indexOf(".awtjs.");JV.Viewer.isJS=this.isJSNoAWT=this.isWebGL||0<=e.indexOf(".awtjs2d.");this.async=!this.dataOnly&&!this.autoExit&&(this.testAsync||JV.Viewer.isJS&&a.containsKey("async"));var g=c=null,j="?";self.Jmol&&(g=Jmol,
c=Jmol._applets[this.htmlName.split("_object")[0]],j=Jmol._version);null!=j&&(this.html5Applet=c,JV.Viewer.jmolObject=g,JV.Viewer.strJavaVersion=j,JV.Viewer.strJavaVendor="Java2Script "+(this.isWebGL?"(WebGL)":"(HTML5)"));c=J.api.Interface.getInterface(e,this,"setOptions")}this.apiPlatform=c;this.display=a.get("display");this.isSingleThreaded=this.apiPlatform.isSingleThreaded();this.noGraphicsAllowed=this.checkOption2("noDisplay","-n");this.headless=this.apiPlatform.isHeadless();this.haveDisplay=
this.isWebGL||null!=this.display&&!this.noGraphicsAllowed&&!this.headless&&!this.dataOnly;this.noGraphicsAllowed=(new Boolean(this.noGraphicsAllowed&null==this.display)).valueOf();this.headless=(new Boolean(this.headless|this.noGraphicsAllowed)).valueOf();this.haveDisplay?(this.mustRender=!0,this.multiTouch=this.checkOption2("multiTouch","-multitouch"),this.isWebGL||(this.display=document.getElementById(this.display))):this.display=null;this.apiPlatform.setViewer(this,this.display);c=a.get("graphicsAdapter");
null==c&&!this.isWebGL&&(c=J.api.Interface.getOption("g3d.Graphics3D",this,"setOptions"));this.gdata=null==c&&(this.isWebGL||!JV.Viewer.isJS)?new JU.GData:c;this.gdata.initialize(this,this.apiPlatform);this.stm=new JV.StateManager(this);this.cm=new JV.ColorManager(this,this.gdata);this.sm=new JV.StatusManager(this);e=a.containsKey("4DMouse");this.tm=JV.TransformManager.getTransformManager(this,2147483647,0,e);this.slm=new JV.SelectionManager(this);this.haveDisplay&&(this.acm=this.multiTouch?J.api.Interface.getOption("multitouch.ActionManagerMT",
null,null):new JV.ActionManager,this.acm.setViewer(this,this.commandOptions+"-multitouch-"+a.get("multiTouch")),this.mouse=this.apiPlatform.getMouseManager(this.privateKey,this.display),this.multiTouch&&!this.checkOption2("-simulated","-simulated")&&this.apiPlatform.setTransparentCursor(this.display));this.mm=new JV.ModelManager(this);this.shm=new JV.ShapeManager(this);this.am=new JV.AnimationManager(this);this.tempArray=new JU.TempArray;c=a.get("repaintManager");if(!"NONE".equals(c)&&(null==c&&(c=
J.api.Interface.getOption("render.RepaintManager",this,"setOptions")),JV.Viewer.isJS||null!=c&&!c.equals("")))(this.rm=c).set(this,this.shm);this.ms=new JM.ModelSet(this,null);this.initialize(!0,!1);this.fm=new JV.FileManager(this);this.definedAtomSets=new java.util.Hashtable;this.setJmolStatusListener(b);this.isApplet?(JU.Logger.info("vwrOptions: \n"+JU.Escape.escapeMap(this.vwrOptions)),b=this.vwrOptions.get("documentLocation"),!JV.Viewer.isJS&&(null!=b&&b.startsWith("file:/"))&&(b=b.substring(0,
b.substring(0,(b+"?").indexOf("?")).lastIndexOf("/")),JU.Logger.info("setting current directory to "+b),this.cd(b)),b=JV.Viewer.appletDocumentBase,e=b.indexOf("#"),0<=e&&(b=b.substring(0,e)),e=b.lastIndexOf("?"),0<=e&&(b=b.substring(0,e)),e=b.lastIndexOf("/"),0<=e&&(b=b.substring(0,e)),JV.Viewer.jsDocumentBase=b,this.fm.setAppletContext(JV.Viewer.appletDocumentBase),b=a.get("appletProxy"),null!=b&&this.setStringProperty("appletProxy",b),this.isSignedApplet?(this.showSystemInfo(),this.logFilePath=
JU.PT.rep(JV.Viewer.appletCodeBase,"file://",""),this.logFilePath=JU.PT.rep(this.logFilePath,"file:/",""),0<=this.logFilePath.indexOf("//")?this.logFilePath=null:this.isSignedAppletLocal=!0):JV.Viewer.isJS||(this.logFilePath=null),new J.i18n.GT(this,a.get("language")),JV.Viewer.isJS&&this.haveDisplay&&this.acm.createActions()):(this.gdata.setBackgroundTransparent(this.checkOption2("backgroundTransparent","-b")),(this.isSilent=this.checkOption2("silent","-i"))?JU.Logger.setLogLevel(3):JU.Logger.info("Jmol version "+
JV.Viewer.getJmolVersion()),this.headless&&!this.isSilent&&JU.Logger.info("Operating headless display="+this.display+" nographicsallowed="+this.noGraphicsAllowed),this.isSyntaxCheck=(this.isSyntaxAndFileCheck=this.checkOption2("checkLoad","-C"))||this.checkOption2("check","-c"),this.listCommands=this.checkOption2("listCommands","-l"),this.cd("."),this.headless&&(this.headlessImageParams=a.get("headlessImage"),c=a.get("headlessMaxTimeMs"),null==c&&(c=Integer.$valueOf(6E4)),this.setTimeout(""+Math.random(),
c.intValue(),"exitJmol")));this.useCommandThread=!JV.Viewer.isJS&&!this.headless&&this.checkOption2("useCommandThread","-threaded");this.setStartupBooleans();this.setIntProperty("_nProcessors",JV.Viewer.nProcessors);this.zap(!1,!0,!1);this.g.setO("language",J.i18n.GT.getLanguage());this.g.setO("_hoverLabel",this.hoverLabel);this.stm.setJmolDefaults();JU.Elements.covalentVersion=1;this.allowScripting&&this.getScriptManager()},"java.util.Map");c(b,"setMaximumSize",function(a){this.maximumSize=Math.max(a,
100)},"~N");c(b,"setStereo",function(a,b){this.isStereoSlave=a;this.gRight=b},"~B,~O");c(b,"getMenu",function(a){this.getPopupMenu();return a.equals("\x00")?(this.popupMenu(this.screenWidth-120,0,"j"),"OK"):null==this.jmolpopup?"":this.jmolpopup.jpiGetMenuAsString("Jmol version "+JV.Viewer.getJmolVersion()+"|_GET_MENU|"+a)},"~S");f(b,"resizeInnerPanel",function(a,b){if(!this.autoExit&&this.haveDisplay)return this.sm.resizeInnerPanel(a,b);this.setScreenDimension(a,b);return D(-1,[this.screenWidth,
this.screenHeight])},"~N,~N");f(b,"setScreenDimension",function(a,b){b=Math.min(b,this.maximumSize);a=Math.min(a,this.maximumSize);if(this.tm.stereoDoubleFull||this.am.splitFrame)a=w((a+1)/2);this.screenWidth==a&&this.screenHeight==b||this.resizeImage(a,b,!1,!1,!0)},"~N,~N");c(b,"resizeImage",function(a,b,c,e,g){if(c||!this.creatingImage){var j=this.antialiased;this.antialiased=g?this.g.antialiasDisplay&&this.checkMotionRendering(603979786):c&&!e?this.g.antialiasImages:!1;!e&&(!c&&(0<a||j!=this.antialiased))&&
this.setShapeProperty(5,"clearBoxes",null);this.imageFontScaling=(this.antialiased?2:1)*(g||this.tm.scale3D||0>=a?1:1*(this.g.zoomLarge==b>a?b:a)/this.getScreenDim());0<a?(this.screenWidth=a,this.screenHeight=b,c||(this.g.setI("_width",a),this.g.setI("_height",b))):(a=0==this.screenWidth?this.screenWidth=500:this.screenWidth,b=0==this.screenHeight?this.screenHeight=500:this.screenHeight);this.tm.setScreenParameters(a,b,c||g?this.g.zoomLarge:!1,this.antialiased,!1,!1);this.gdata.setWindowParameters(a,
b,this.antialiased);this.setModelkitPropertySafely("frameresized",null);0<a&&!c&&this.setStatusResized(a,b)}},"~N,~N,~B,~B,~B");f(b,"getScreenWidth",function(){return this.screenWidth});f(b,"getScreenHeight",function(){return this.screenHeight});c(b,"getScreenDim",function(){return this.g.zoomLarge==this.screenHeight>this.screenWidth?this.screenHeight:this.screenWidth});c(b,"setWidthHeightVar",function(){this.g.setI("_width",this.screenWidth);this.g.setI("_height",this.screenHeight)});c(b,"getBoundBoxCenterX",
function(){return w(this.screenWidth/2)});c(b,"getBoundBoxCenterY",function(){return w(this.screenHeight/2)});c(b,"updateWindow",function(a,b){if(!this.refreshing||this.creatingImage)return this.refreshing?!1:!JV.Viewer.isJS;(this.isTainted||this.tm.slabEnabled)&&this.setModelVisibility();this.isTainted=!1;null!=this.rm&&0!=a&&this.setScreenDimension(a,b);return!0},"~N,~N");c(b,"getRenderedImage",function(a,b){var c=null;try{this.beginRendering(a,b),this.render(),this.gdata.endRendering(),c=this.gdata.getScreenImage(b)}catch(e){if(E(e,
Error))this.gdata.getScreenImage(b),this.handleError(e,!1),this.setErrorMessage("Error during rendering: "+e,null);else if(E(e,Exception))System.out.println("render error"+e);else throw e;}return c},"~B,~B");c(b,"beginRendering",function(a,b){this.gdata.beginRendering(this.tm.getStereoRotationMatrix(a),this.g.translucent,b,!this.checkMotionRendering(1111490588))},"~B,~B");c(b,"render",function(){if(!(null==this.mm.modelSet||!this.mustRender||!this.refreshing&&!this.creatingImage||null==this.rm)){var a=
this.antialiased&&this.g.antialiasTranslucent,b=this.shm.finalizeAtoms(this.tm.bsSelectedAtoms,!0);this.isWebGL?(this.rm.renderExport(this.gdata,this.ms,this.jsParams),this.notifyViewerRepaintDone()):(this.rm.render(this.gdata,this.ms,!0,b),this.gdata.setPass2(a)&&(this.tm.setAntialias(a),this.rm.render(this.gdata,this.ms,!1,null),this.tm.setAntialias(this.antialiased)))}});c(b,"drawImage",function(a,b,c,e,g){null!=a&&null!=b&&this.apiPlatform.drawImage(a,b,c,e,this.screenWidth,this.screenHeight,
g);this.gdata.releaseScreenImage()},"~O,~O,~N,~N,~B");c(b,"getScreenImage",function(){return this.getScreenImageBuffer(null,!0)});f(b,"getScreenImageBuffer",function(a,b){if(this.isWebGL)return b?this.apiPlatform.allocateRgbImage(0,0,null,0,!1,!0):null;var c=this.haveTwoImages(),e=this.tm.stereoDoubleDTI,g=this.tm.stereoMode.isBiColor(),j=this.tm.stereoMode!==J.c.STER.NONE,f=null==a&&c;this.tm.splitFrameCurrentlyRendering=-1;g?(this.beginRendering(!0,b),this.render(),this.gdata.endRendering(),this.gdata.snapshotAnaglyphChannelBytes(),
this.beginRendering(!1,b),this.render(),this.gdata.endRendering(),this.gdata.applyAnaglygh(this.tm.stereoMode,this.tm.stereoColors),g=this.gdata.getScreenImage(b)):this.am.splitFrame?(this.setCurrentModelIndex(this.am.getSplitFrameModelIndex(0)),this.tm.splitFrameCurrentlyRendering=0,this.setModelVisibility(),g=this.getRenderedImage(!1,b)):g=this.getRenderedImage(j,b);var l=null;f&&(l=this.apiPlatform.newBufferedImage(g,e?this.screenWidth:this.screenWidth<<1,this.screenHeight),a=this.apiPlatform.getGraphics(l));
if(null==a)return g;e=0;c&&(this.tm.stereoMode===J.c.STER.DTI?(this.drawImage(a,g,this.screenWidth>>1,0,!0),g=this.getRenderedImage(!1,!1),this.drawImage(a,g,0,0,!0),a=null):this.am.splitFrame?(this.drawImage(a,g,0,0,!1),this.setCurrentModelIndex(this.am.getSplitFrameModelIndex(1)),this.tm.splitFrameCurrentlyRendering=1,this.setModelVisibility(),g=this.getRenderedImage(j,!1),this.setCurrentModelIndex(this.am.getSplitFrameModelIndex(0)),this.tm.splitFrameCurrentlyRendering=-1,this.shm.setModelVisibility(this.am.getSplitFrameModels()),
e=this.screenWidth,this.am.setSplitFrameOffsetX(e)):(this.drawImage(a,g,this.screenWidth,0,!1),g=this.getRenderedImage(!1,!1)));null!=a&&this.drawImage(a,g,e,0,!1);return f?l:g},"~O,~B");c(b,"haveTwoImages",function(){return this.tm.stereoDoubleFull||this.tm.stereoDoubleDTI||this.am.splitFrame});c(b,"evalStringWaitStatusQueued",function(a,b,c,e,g){return null==this.getScriptManager()?null:this.scm.evalStringWaitStatusQueued(a,b,c,e,g)},"~S,~S,~S,~B,~B");c(b,"popupMenu",function(a,b,c){if(this.haveDisplay&&
this.refreshing&&!this.isPreviewOnly&&!this.g.disablePopupMenu)switch(c.charCodeAt(0)){case 106:try{this.getPopupMenu(),this.jmolpopup.jpiShow(a,b)}catch(e){JU.Logger.info(e.toString()),this.g.disablePopupMenu=!0}break;case 97:case 98:case 109:if(null==this.getModelkit(!0))break;this.modelkit.showMenu(a,b)}},"~N,~N,~S");c(b,"getModelkit",function(a){null==this.modelkit?(this.modelkit=J.api.Interface.getInterface("J.modelkit.ModelKit",this,"script"),this.headless||!this.haveDisplay?this.modelkit.setProperty("headless",
this):this.modelkit.setMenu(this.apiPlatform.getMenuPopup(null,"m"))):a&&this.modelkit.updateMenu();return this.modelkit},"~B");c(b,"getPopupMenu",function(){if(this.g.disablePopupMenu)return null;if(null==this.jmolpopup&&(this.jmolpopup=this.allowScripting?this.apiPlatform.getMenuPopup(this.menuStructure,"j"):null,null==this.jmolpopup))return this.async||(this.g.disablePopupMenu=!0),null;this.isJSNoAWT&&this.checkMenuUpdate();return this.jmolpopup.jpiGetMenuAsObject()});f(b,"setMenu",function(a,
b){b&&JU.Logger.info("Setting menu "+(0==a.length?"to Jmol defaults":"from file "+a));0==a.length?a=null:b&&(a=this.getFileAsString3(a,!1,null));this.getProperty("DATA_API","setMenu",a);this.sm.setCallbackFunction("menu",a)},"~S,~B");c(b,"setStatusFrameChanged",function(a){a&&(this.prevFrame=-2147483648);this.tm.setVibrationPeriod(NaN);var b=this.am.firstFrameIndex,c=this.am.lastFrameIndex,e=this.am.isMovie;a=this.am.cmi;b==c&&!e&&(a=b);var g=this.getModelFileNumber(a),j=this.am.cmi,f=g,l=g%1E6,m=
e?b:this.getModelFileNumber(b),n=e?c:this.getModelFileNumber(c),q;e?q=""+(j+1):0==f?(q=this.getModelNumberDotted(b),b!=c&&(q+=" - "+this.getModelNumberDotted(c)),w(m/1E6)==w(n/1E6)&&(f=m)):q=this.getModelNumberDotted(a);0!=f&&(f=1E6>f?1:w(f/1E6));e||(this.g.setI("_currentFileNumber",f),this.g.setI("_currentModelNumberInFile",l));b=this.am.currentMorphModel;this.g.setI("_currentFrame",j);this.g.setI("_morphCount",this.am.morphCount);this.g.setF("_currentMorphFrame",b);this.g.setI("_frameID",g);this.g.setI("_modelIndex",
a);this.g.setOrRemoveO("_modelNumber",q);this.g.setOrRemoveO("_modelName",0>a?"":this.getModelName(a));g=0>a?"":this.ms.getModelTitle(a);this.g.setOrRemoveO("_modelTitle",null==g?"":g);this.g.setOrRemoveO("_modelFile",0>a?"":this.ms.getModelFileName(a));this.g.setOrRemoveO("_modelType",0>a?"":this.ms.getModelFileType(a));j==this.prevFrame&&b==this.prevMorphModel||(this.prevFrame=j,this.prevMorphModel=b,g=this.getModelName(j),e?g=""+(""===g?j+1:this.am.caf+1)+": "+g:(e=""+this.getModelNumberDotted(j),
e.equals(g)||(g=e+": "+g)),this.sm.setStatusFrameChanged(f,l,0>this.am.animationDirection?-m:m,0>this.am.currentDirection?-n:n,j,b,g),this.doHaveJSV()&&this.getJSV().setModel(a),JV.Viewer.isJS&&this.updateJSView(a,-1))},"~B,~B");c(b,"doHaveJSV",function(){return this.haveJSV||(this.haveJSV=this.getBooleanProperty("_JSV"))});c(b,"getJSV",function(){null==this.jsv&&(this.jsv=J.api.Interface.getOption("jsv.JSV",this,"script").setViewer(this));return this.jsv});c(b,"getJDXBaseModelIndex",function(a){return!this.doHaveJSV()?
a:this.getJSV().getBaseModelIndex(a)},"~N");c(b,"getJspecViewProperties",function(a){return this.pluginRequest("JSV","property",a)},"~S");c(b,"scriptEcho",function(a){JU.Logger.isActiveLevel(4)&&(JV.Viewer.isJS&&System.out.println(a),this.sm.setScriptEcho(a,this.isScriptQueued()),this.listCommands&&(null!=a&&0==a.indexOf("$["))&&JU.Logger.info(a))},"~S");c(b,"isScriptQueued",function(){return null!=this.scm&&this.scm.isScriptQueued()});c(b,"notifyError",function(a,b,c){this.g.setO("_errormessage",
c);this.sm.notifyError(a,b,c)},"~S,~S,~S");c(b,"jsEval",function(a){return""+this.sm.jsEval(a)},"~S");c(b,"jsEvalSV",function(a){return JS.SV.getVariable(JV.Viewer.isJS?this.sm.jsEval(a):this.jsEval(a))},"~S");c(b,"setFileLoadStatus",function(a,b,c,e,g,j){this.setErrorMessage(g,null);this.g.setI("_loadPoint",a.getCode());var f=a!==J.c.FIL.CREATING_MODELSET;f&&this.setStatusFrameChanged(!1,!1);this.sm.setFileLoadStatus(b,c,e,g,a.getCode(),f,j);f&&(this.doHaveJSV()&&this.getJSV().setModel(this.am.cmi),
JV.Viewer.isJS&&this.updateJSView(this.am.cmi,-2))},"J.c.FIL,~S,~S,~S,~S,Boolean");c(b,"getZapName",function(){return this.g.modelKitMode?"Jmol Model Kit":"zapped"});c(b,"setStatusMeasuring",function(a,b,c,e){this.sm.setStatusMeasuring(a,b,c,e)},"~S,~N,~S,~N");c(b,"notifyMinimizationStatus",function(){var a=this.getP("_minimizationStep"),b=this.getP("_minimizationForceField"),c=this.getP("_minimizationStatus"),e="starting".equals(c),g="done".equals(c)||"failed".equals(c),j=null!=this.minimizer&&(g||
e)?this.minimizer.bsAtoms:null,f=null==j?-1:j.nextSetBit(0),l=0<=f?this.getModelIndexForAtom(f):-1;e&&0<=f&&this.sm.setStatusStructureModified(f,l,3,"minimize:"+c,j.cardinality(),j);this.sm.notifyMinimizationStatus(c,"string"==typeof a?Integer.$valueOf(0):a,this.getP("_minimizationEnergy"),a.toString().equals("0")?Float.$valueOf(0):this.getP("_minimizationEnergyDiff"),b);g&&0<=f&&this.sm.setStatusStructureModified(f,l,-3,"minimize:"+c,j.cardinality(),j)});c(b,"notifyCalculation",function(a,b,c){this.sm.notifyCalculation(a,
b,c)},"~S,JU.BS,~S");c(b,"setStatusAtomPicked",function(a,b,c,e){e&&this.setSelectionSet(JU.BSUtil.newAndSetBit(a));null==b&&(b=this.g.pickLabel,b=0==b.length?this.getAtomInfoXYZ(a,this.g.messageStyleChime?4:2)+(null==this.getOperativeSymmetry()?"":" ("+this.getAtomInfoXYZ(a,3)+")"):this.ms.getAtomInfo(a,b,this.ptTemp));this.setPicked(a,!1);0>a&&(e=this.getPendingMeasurement(),null!=e&&(b=b.substring(0,b.length-1)+',"'+e.getString()+'"]'));this.g.setO("_pickinfo",b);this.sm.setStatusAtomPicked(a,
b,c);0>a||(1==this.sm.getSyncMode()&&this.doHaveJSV()&&this.getJSV().atomPicked(a),JV.Viewer.isJS&&this.updateJSView(this.ms.at[a].mi,a))},"~N,~S,java.util.Map,~B");f(b,"getProperty",function(a,b,c){if(!"DATA_API".equals(a))return this.getPropertyManager().getProperty(a,b,c);switch("scriptCheck.........consoleText.........scriptEditor........scriptEditorState...getAppConsole.......getScriptEditor.....setMenu.............spaceGroupInfo......disablePopupMenu....defaultDirectory....getPopupMenu........shapeManager........getPreference.......".indexOf(b)){case 0:return this.scriptCheckRet(c,
!0);case 20:return null==this.appConsole?"":this.appConsole.getText();case 40:return this.showEditor(c),null;case 60:return this.scriptEditorVisible=c.booleanValue(),null;case 80:return this.$isKiosk?this.appConsole=null:C(c,"J.api.JmolAppConsoleInterface")?this.appConsole=c:null!=c&&!c.booleanValue()?this.appConsole=null:null==this.appConsole&&(null!=c&&c.booleanValue())&&(JV.Viewer.isJS&&(this.appConsole=J.api.Interface.getOption("consolejs.AppletConsole",this,"script")),null!=this.appConsole&&
this.appConsole.start(this)),this.scriptEditor=JV.Viewer.isJS||null==this.appConsole?null:this.appConsole.getScriptEditor(),this.appConsole;case 100:return null==this.appConsole&&(null!=c&&c.booleanValue())&&(this.getProperty("DATA_API","getAppConsole",Boolean.TRUE),this.scriptEditor=null==this.appConsole?null:this.appConsole.getScriptEditor()),this.scriptEditor;case 120:return null!=this.jmolpopup&&this.jmolpopup.jpiDispose(),this.jmolpopup=null,this.menuStructure=c;case 140:return this.getSymTemp().getSpaceGroupInfo(this.ms,
null,-1,!1,null);case 160:return this.g.disablePopupMenu=!0,null;case 180:return this.g.defaultDirectory;case 200:return"string"==typeof c?this.getMenu(c):this.getPopupMenu();case 220:return this.shm.getProperty(c);case 240:return this.sm.syncSend("getPreference",c,1)}JU.Logger.error("ERROR in getProperty DATA_API: "+b);return null},"~S,~S,~O");c(b,"showSystemInfo",function(){!this.isSilent&&!this.systemInfoShown&&JU.Logger.info("(C) 2015 Jmol Development\nJmol Version: "+JV.Viewer.getJmolVersion()+
"\njava.vendor: "+JV.Viewer.strJavaVendor+"\njava.version: "+JV.Viewer.strJavaVersion+"\nos: "+JV.Viewer.strOSName+" "+System.getProperty("os.arch","")+"\nAccess: "+this.access+"\nmemory: "+this.getP("_memory")+"\nprocessors available: "+JV.Viewer.nProcessors+"\nuseCommandThread: "+this.useCommandThread+(!this.isApplet?"":"\nappletId:"+this.htmlName+(this.isSignedApplet?" (signed)":"")))});c(b,"notifyMouseClicked",function(a,b,c,e){var g=JV.binding.Binding.getButtonMods(c),j=JV.binding.Binding.getClickCount(c);
this.g.setI("_mouseX",a);this.g.setI("_mouseY",this.screenHeight-b);this.g.setI("_mouseAction",c);this.g.setI("_mouseModifiers",g);this.g.setI("_clickCount",j);return this.sm.setStatusClicked(a,this.screenHeight-b,c,j,e)},"~N,~N,~N,~N");c(b,"getOutputManager",function(){return null!=this.outputManager?this.outputManager:(this.outputManager=J.api.Interface.getInterface("JV.OutputManager"+(JV.Viewer.isJS?"JS":"Awt"),this,"file")).setViewer(this,this.privateKey)});c(b,"getJzt",function(){return null==
this.jzt?this.jzt=J.api.Interface.getInterface("JU.ZipTools",this,"zip"):this.jzt});c(b,"readFileAsMap",function(a,b,c){this.getJzt().readFileAsMap(a,b,c)},"java.io.BufferedInputStream,java.util.Map,~S");c(b,"getZipDirectoryAsString",function(a){a=this.fm.getBufferedInputStreamOrErrorMessageFromName(a,a,!1,!1,null,!1,!0);return this.getJzt().getZipDirectoryAsStringAndClose(a)},"~S");f(b,"getImageAsBytes",function(a,b,c,e,g){return this.getOutputManager().getImageAsBytes(a,b,c,e,g)},"~S,~N,~N,~N,~A");
f(b,"releaseScreenImage",function(){this.gdata.releaseScreenImage()});c(b,"setDisplay",function(a){this.display=a;this.apiPlatform.setViewer(this,a)},"~O");c(b,"newMeasurementData",function(a,b){return J.api.Interface.getInterface("JM.MeasurementData",this,"script").init(a,this,b)},"~S,JU.Lst");c(b,"getDataManager",function(){return null==this.dm?this.dm=J.api.Interface.getInterface("JV.DataManager",this,"script").set(this):this.dm});c(b,"getScriptManager",function(){if(this.allowScripting&&null==
this.scm){this.scm=J.api.Interface.getInterface("JS.ScriptManager",this,"setOptions");if(JV.Viewer.isJS&&null==this.scm)throw new NullPointerException;if(null==this.scm)return this.allowScripting=!1,null;this.eval=this.scm.setViewer(this);this.useCommandThread&&this.scm.startCommandWatcher(!0)}return this.scm});c(b,"checkOption2",function(a,b){return this.vwrOptions.containsKey(a)&&!this.vwrOptions.get(a).toString().equals("false")||0<=this.commandOptions.indexOf(b)},"~S,~S");c(b,"setStartupBooleans",
function(){this.setBooleanProperty("_applet",this.isApplet);this.setBooleanProperty("_JSV",!1);this.setBooleanProperty("_signedApplet",this.isSignedApplet);this.setBooleanProperty("_headless",this.headless);this.setStringProperty("_restrict",'"'+this.access+'"');this.setBooleanProperty("_useCommandThread",this.useCommandThread);this.setBooleanPropertyTok("doubleprecision",603979831,!1)});c(b,"getExportDriverList",function(){return this.haveAccess(JV.Viewer.ACCESS.ALL)?this.g.getParameter("exportDrivers",
!0):""});f(b,"dispose",function(){this.gRight=null;null!=this.mouse&&(this.acm.dispose(),this.mouse.dispose(),this.mouse=null);this.clearScriptQueue();this.clearThreads();this.haltScriptExecution();null!=this.scm&&this.scm.clear(!0);this.gdata.destroy();null!=this.jmolpopup&&this.jmolpopup.jpiDispose();null!=this.modelkit&&this.modelkit.dispose();try{null!=this.appConsole&&(this.appConsole.dispose(),this.appConsole=null),null!=this.scriptEditor&&(this.scriptEditor.dispose(),this.scriptEditor=null)}catch(a){if(!E(a,
Exception))throw a;}});c(b,"reset",function(a){this.ms.setBoundBox(null,null,!0,0);this.axesAreTainted=!0;this.tm.homePosition(a);this.ms.setCrystallographicDefaults()?(this.stm.setCrystallographicDefaults(),this.setNewRotationCenter(this.getUnitCellCenter())):this.setAxesMode(603979809);this.prevFrame=-2147483648;this.tm.spinOn||this.setSync()},"~B");f(b,"homePosition",function(){this.evalString("reset spin")});c(b,"initialize",function(a,b){this.g=new JV.GlobalSettings(this,this.g,a);this.setStartupBooleans();
this.setWidthHeightVar();this.haveDisplay&&(this.g.setB("_is2D",JV.Viewer.isJS&&!this.isWebGL),this.g.setB("_multiTouchClient",this.acm.isMTClient()),this.g.setB("_multiTouchServer",this.acm.isMTServer()));this.cm.setDefaultColors(!1);this.setObjectColor("background","black");this.setObjectColor("axis1","red");this.setObjectColor("axis2","green");this.setObjectColor("axis3","blue");this.am.setAnimationOn(!1);this.am.setAnimationFps(this.g.animationFps);this.sm.playAudio(null);this.sm.allowStatusReporting=
this.g.statusReporting;this.setBooleanPropertyTok("antialiasDisplay",603979786,b?!0:this.g.antialiasDisplay);this.stm.resetLighting();this.tm.setDefaultPerspective()},"~B,~B");c(b,"saveModelOrientation",function(a){this.ms.saveModelOrientation(a,this.stm.getOrientation())},"~N");c(b,"restoreModelOrientation",function(a){a=this.ms.getModelOrientation(a);null!=a&&a.restore(-1,!0)},"~N");c(b,"restoreModelRotationOnly",function(a){a=this.ms.getModelOrientation(a);null!=a&&a.restore(-1,!1)},"~N");c(b,
"getGLmolView",function(){var a=this.tm,b=a.fixedRotationCenter,c=a.getRotationQ();return{center:b,quaternion:c,xtrans:a.xTranslationFraction,ytrans:a.yTranslationFraction,scale:a.scalePixelsPerAngstrom,zoom:a.zmPctSet,cameraDistance:a.cameraDistance,pixelCount:a.screenPixelCount,perspective:a.perspectiveDepth,width:a.width,height:a.height}});c(b,"setRotationRadius",function(a,b){b&&(a=this.tm.setRotationRadius(a,!1));this.ms.setRotationRadius(this.am.cmi,a)&&this.g.setF("rotationRadius",a)},"~N,~B");
c(b,"setCenterBitSet",function(a,b){this.isJmolDataFrame()||this.tm.setNewRotationCenter(0<JU.BSUtil.cardinalityOf(a)?this.ms.getAtomSetCenter(a):null,b)},"JU.BS,~B");c(b,"setNewRotationCenter",function(a){this.isJmolDataFrame()||this.tm.setNewRotationCenter(a,!0)},"JU.P3");c(b,"navigate",function(a,b){this.isJmolDataFrame()||(this.tm.navigateKey(a,b),!this.tm.vibrationOn&&0!=a&&this.refresh(1,"Viewer:navigate()"))},"~N,~N");c(b,"move",function(a,b,c,e,g,j,f){this.tm.move(a,b,c,e,g,j,f);this.moveUpdate(j)},
"J.api.JmolScriptEvaluator,JU.V3,~N,JU.V3,~N,~N,~N");c(b,"moveTo",function(a,b,c,e,g,j,f,l,m,n,q,v,r,s,u,w,x){this.haveDisplay||(b=0);this.setTainted(!0);this.tm.moveTo(a,b,c,e,g,j,f,l,m,n,q,v,r,s,u,w,x)},"J.api.JmolScriptEvaluator,~N,JU.P3,JU.V3,~N,JU.M3,~N,~N,~N,~N,JU.P3,~N,~N,~N,~N,~N,~N");c(b,"moveUpdate",function(a){0<a?this.requestRepaintAndWait("moveUpdate"):0==a&&this.setSync()},"~N");c(b,"navigatePt",function(a){this.tm.setNavigatePt(a);this.setSync()},"JU.P3");c(b,"navigateAxis",function(a,
b){this.tm.navigateAxis(a,b);this.setSync()},"JU.V3,~N");c(b,"navTranslatePercent",function(a,b){this.isJmolDataFrame()||(this.tm.navTranslatePercentOrTo(0,a,b),this.setSync())},"~N,~N");c(b,"zoomBy",function(a){this.tm.zoomBy(a);this.refresh(2,this.sm.syncingMouse?"Mouse: zoomBy "+a:"")},"~N");c(b,"zoomByFactor",function(a,b,c){this.tm.zoomByFactor(a,b,c);this.refresh(2,!this.sm.syncingMouse?"":"Mouse: zoomByFactor "+a+(2147483647==b?"":" "+b+" "+c))},"~N,~N,~N");c(b,"rotateXYBy",function(a,b){this.tm.rotateXYBy(a,
b,null);this.refresh(2,this.sm.syncingMouse?"Mouse: rotateXYBy "+a+" "+b:"")},"~N,~N");c(b,"spinXYBy",function(a,b,c){this.tm.spinXYBy(a,b,c);0==a&&0==b||this.refresh(2,this.sm.syncingMouse?"Mouse: spinXYBy "+a+" "+b+" "+c:"")},"~N,~N,~N");c(b,"rotateZBy",function(a,b,c){this.tm.rotateZBy(a,b,c);this.refresh(2,this.sm.syncingMouse?"Mouse: rotateZBy "+a+(2147483647==b?"":" "+b+" "+c):"")},"~N,~N,~N");c(b,"rotateSelected",function(a,b,c){this.isJmolDataFrame()||(this.tm.rotateXYBy(a,b,this.setMovableBitSet(c,
!0)),this.refreshMeasures(!0),this.refresh(2,this.sm.syncingMouse?"Mouse: rotateMolecule "+a+" "+b:""))},"~N,~N,JU.BS");c(b,"setMovableBitSet",function(a,b){null==a&&(a=this.bsA());a=JU.BSUtil.copy(a);JU.BSUtil.andNot(a,this.getMotionFixedAtoms(null,null));b&&!this.g.allowMoveAtoms&&(a=this.ms.getMoleculeBitSet(a));return this.movableBitSet=a},"JU.BS,~B");c(b,"translateXYBy",function(a,b){this.tm.translateXYBy(a,b);this.refresh(2,this.sm.syncingMouse?"Mouse: translateXYBy "+a+" "+b:"")},"~N,~N");
f(b,"rotateFront",function(){this.tm.resetRotation();this.refresh(1,"Viewer:rotateFront()")});c(b,"translate",function(a,b,c,e){var g="\x00"==c?b:"%"==c?this.tm.percentToPixels(a,b):this.tm.angstromsToPixels(b*("n"==c?10:1));if(null!=e){if(0==b)return;this.tm.setSelectedTranslation(e,a,g,b)}else switch(a.charCodeAt(0)){case 88:case 120:"\x00"==c?this.tm.translateToPercent("x",b):this.tm.translateXYBy(F(g),0);break;case 89:case 121:"\x00"==c?this.tm.translateToPercent("y",b):this.tm.translateXYBy(0,
F(g));break;case 90:case 122:"\x00"==c?this.tm.translateToPercent("z",b):this.tm.translateZBy(F(g))}this.refresh(1,"Viewer:translate()")},"~S,~N,~S,JU.BS");c(b,"slabByPixels",function(a){this.tm.slabByPercentagePoints(a);this.refresh(3,"slabByPixels")},"~N");c(b,"depthByPixels",function(a){this.tm.depthByPercentagePoints(a);this.refresh(3,"depthByPixels")},"~N");c(b,"slabDepthByPixels",function(a){this.tm.slabDepthByPercentagePoints(a);this.refresh(3,"slabDepthByPixels")},"~N");c(b,"finalizeTransformParameters",
function(){this.tm.finalizeTransformParameters();this.gdata.setSlabAndZShade(this.tm.slabValue,this.tm.depthValue,this.tm.zShadeEnabled?this.tm.zSlabValue:2147483647,this.tm.zDepthValue,this.g.zShadePower)});c(b,"getScalePixelsPerAngstrom",function(a){return this.tm.scalePixelsPerAngstrom*(a||!this.antialiased?1:0.5)},"~B");c(b,"setSpin",function(a,b){if(JU.PT.isOneOf(a,";x;y;z;fps;X;Y;Z;FPS;")){var c="x;y;z;fps;X;Y;Z;FPS".indexOf(a);switch(c){case 0:this.tm.setSpinXYZ(b,NaN,NaN);break;case 2:this.tm.setSpinXYZ(NaN,
b,NaN);break;case 4:this.tm.setSpinXYZ(NaN,NaN,b);break;default:this.tm.setSpinFps(b);break;case 10:this.tm.setNavXYZ(b,NaN,NaN);break;case 12:this.tm.setNavXYZ(NaN,b,NaN);break;case 14:this.tm.setNavXYZ(NaN,NaN,b);break;case 16:this.tm.setNavFps(b)}this.g.setI((10>c?"spin":"nav")+a,b)}},"~S,~N");c(b,"getSpinState",function(){return this.getStateCreator().getSpinState(!1)});c(b,"getOrientation",function(a,b,c,e){switch(a){case 1312817669:case 1814695966:case 1073741864:case 1111492629:case 1111492630:case 1111492631:case 134221850:null==
c&&(c=this.bsA());if(c.isEmpty())return 1312817669==a?"0":1814695966==a||1073741864==a?null:new JU.Quat;c=this.ms.getBoundBoxOrientation(a,c,e);return"best"===b&&1312817669!=a?c.div(this.tm.getRotationQ()):c;case 1073742034:return this.stm.getSavedOrientationText(b);default:return this.tm.getOrientationText(a,"best"===b)}},"~N,~S,JU.BS,~A");c(b,"getCurrentColorRange",function(){return this.cm.getPropertyColorRange()});c(b,"setDefaultColors",function(a){this.cm.setDefaultColors(a);this.g.setB("colorRasmol",
a);this.g.setO("defaultColorScheme",a?"rasmol":"jmol")},"~B");c(b,"setElementArgb",function(a,b){this.g.setO("=color "+JU.Elements.elementNameFromNumber(a),JU.Escape.escapeColor(b));this.cm.setElementArgb(a,b)},"~N,~N");f(b,"setVectorScale",function(a){this.g.setF("vectorScale",a);this.g.vectorScale=a},"~N");f(b,"setVibrationScale",function(a){this.tm.setVibrationScale(a);this.g.vibrationScale=a;this.g.setF("vibrationScale",a)},"~N");f(b,"setVibrationPeriod",function(a){Double.isNaN(a)&&(a=this.g.vibrationPeriod);
this.tm.setVibrationPeriod(a);a=Math.abs(a);this.g.vibrationPeriod=a;this.g.setF("vibrationPeriod",a)},"~N");c(b,"setObjectColor",function(a,b){null==b||0==b.length||this.setObjectArgb(a,JU.CU.getArgbFromString(b))},"~S,~S");c(b,"setObjectVisibility",function(a,b){var c=JV.StateManager.getObjectIdFromName(a);0<=c&&this.setShapeProperty(c,"display",b?Boolean.TRUE:Boolean.FALSE)},"~S,~B");c(b,"setObjectArgb",function(a,b){var c=JV.StateManager.getObjectIdFromName(a);if(0>c)a.equalsIgnoreCase("axes")&&
(this.setObjectArgb("axis1",b),this.setObjectArgb("axis2",b),this.setObjectArgb("axis3",b));else{this.g.objColors[c]=b;switch(c){case 0:this.gdata.setBackgroundArgb(b),this.cm.setColixBackgroundContrast(b)}this.g.setO(a+"Color",JU.Escape.escapeColor(b))}},"~S,~N");c(b,"setBackgroundImage",function(a,b){this.g.backgroundImageFileName=a;this.gdata.setBackgroundImage(b)},"~S,~O");c(b,"getObjectColix",function(a){a=this.g.objColors[a];return 0==a?this.cm.colixBackgroundContrast:JU.C.getColix(a)},"~N");
f(b,"setColorBackground",function(a){this.setObjectColor("background",a)},"~S");f(b,"getBackgroundArgb",function(){return this.g.objColors[0]});c(b,"setObjectMad10",function(a,b,c){var e=JV.StateManager.getObjectIdFromName(b.equalsIgnoreCase("axes")?"axis":b);if(!(0>e)){if(-2==c||-4==c){var g=c+3;c=this.getObjectMad10(e);0==c&&(c=g)}this.g.setB("show"+b,0!=c);this.g.objStateOn[e]=0!=c;0!=c&&(this.g.objMad10[e]=c,this.setShapeSize(a,c,null))}},"~N,~S,~N");c(b,"getObjectMad10",function(a){return this.g.objStateOn[a]?
this.g.objMad10[a]:0},"~N");c(b,"setPropertyColorScheme",function(a,b,c){this.g.propertyColorScheme=a;a.startsWith("translucent ")&&(b=!0,a=a.substring(12).trim());this.cm.setPropertyColorScheme(a,b,c)},"~S,~B,~B");c(b,"getLightingState",function(){return this.getStateCreator().getLightingState(!0)});c(b,"getColorPointForPropertyValue",function(a){return JU.CU.colorPtFromInt(this.gdata.getColorArgbOrGray(this.cm.ce.getColorIndex(a)),null)},"~N");c(b,"select",function(a,b,c,e){b&&(a=this.getUndeletedGroupAtomBits(a));
this.slm.select(a,c,e);this.shm.setShapeSizeBs(1,2147483647,null,null);this.hasSelected=!0},"JU.BS,~B,~N,~B");f(b,"setSelectionSet",function(a){this.selectStatus(a,!1,0,!0,!0)},"JU.BS");c(b,"selectBonds",function(a){this.shm.setShapeSizeBs(1,2147483647,null,a)},"JU.BS");c(b,"displayAtoms",function(a,b,c,e,g){c&&(a=this.getUndeletedGroupAtomBits(a));b?this.slm.display(this.ms,a,e,g):this.slm.hide(this.ms,a,e,g)},"JU.BS,~B,~B,~N,~B");c(b,"getUndeletedGroupAtomBits",function(a){a=this.ms.getAtoms(1086324742,
a);JU.BSUtil.andNot(a,this.slm.bsDeleted);return a},"JU.BS");c(b,"reportSelection",function(a){this.selectionHalosEnabled&&this.setTainted(!0);(this.isScriptQueued()||this.g.debugScript)&&this.scriptStatus(a)},"~S");c(b,"clearAtomSets",function(){this.slm.setSelectionSubset(null);this.definedAtomSets.clear();this.haveDisplay&&this.acm.exitMeasurementMode("clearAtomSets")});c(b,"getDefinedAtomSet",function(a){a=this.definedAtomSets.get(a.toLowerCase());return C(a,"JU.BS")?a:new JU.BS},"~S");f(b,"selectAll",
function(){this.slm.selectAll(!1)});f(b,"clearSelection",function(){this.slm.clearSelection(!0);this.g.setB("hideNotSelected",!1)});c(b,"bsA",function(){return this.slm.getSelectedAtoms(!1)});f(b,"addSelectionListener",function(a){this.slm.addListener(a)},"J.api.JmolSelectionListener");f(b,"removeSelectionListener",function(a){this.slm.addListener(a)},"J.api.JmolSelectionListener");c(b,"getAtomBitSetEval",function(a,b){return this.allowScripting?this.getScriptManager().getAtomBitSetEval(a,b):new JU.BS},
"J.api.JmolScriptEvaluator,~O");c(b,"processTwoPointGesture",function(a){this.mouse.processTwoPointGesture(a)},"~A");c(b,"processMouseEvent",function(a,b,c,e,g){return this.mouse.processEvent(a,b,c,e,g)},"~N,~N,~N,~N,~N");c(b,"processKeyEvent",function(a){this.mouse.processKeyEvent(a)},"~O");c(b,"getRubberBandSelection",function(){return this.haveDisplay?this.acm.getRubberBand():null});c(b,"isBound",function(a,b){return this.haveDisplay&&this.acm.bnd(a,[b])},"~N,~N");c(b,"getCursorX",function(){return this.haveDisplay?
this.am.setSplitFrameMouse(this.acm.getCurrentX()):0});c(b,"getCursorY",function(){return this.haveDisplay?this.acm.getCurrentY():0});c(b,"getDefaultDirectory",function(){return this.g.defaultDirectory});c(b,"getLocalUrl",function(a){return this.apiPlatform.getLocalUrl(a)},"~S");c(b,"getFileAsString",function(a){return this.getAsciiFileOrNull(a)},"~S");f(b,"getBufferedInputStream",function(a){return this.fm.getBufferedInputStream(a)},"~S");c(b,"setLoadParameters",function(a,b){null==a&&(a=new java.util.Hashtable);
a.put("vwr",this);0<this.g.atomTypes.length&&a.put("atomTypes",this.g.atomTypes);a.containsKey("lattice")||a.put("lattice",this.g.ptDefaultLattice);this.g.applySymmetryToBonds&&a.put("applySymmetryToBonds",Boolean.TRUE);this.g.pdbGetHeader&&a.put("getHeader",Boolean.TRUE);this.g.pdbSequential&&a.put("isSequential",Boolean.TRUE);(this.g.legacyJavaFloat||this.g.doublePrecision)&&a.put("highPrecision",Boolean.TRUE);this.g.doublePrecision||a.put("lowPrecision",Boolean.TRUE);a.put("stateScriptVersionInt",
Integer.$valueOf(this.stateScriptVersionInt));if(!a.containsKey("filter")){var c=this.g.defaultLoadFilter;0<c.length&&a.put("filter",c)}c=b&&!this.g.appendNew&&0<this.ms.ac;a.put("baseAtomIndex",Integer.$valueOf(b?this.ms.ac:0));a.put("baseBondIndex",Integer.$valueOf(b?this.ms.bondCount:0));a.put("baseModelIndex",Integer.$valueOf(0==this.ms.ac?0:this.ms.mc+(c?-1:0)));c&&a.put("merging",Boolean.TRUE);return a},"java.util.Map,~B");f(b,"openFileAsyncSpecial",function(a,b){this.fm.openFileAsync(a,b,null)},
"~S,~N");f(b,"openFileAsyncSpecialType",function(a,b,c){this.fm.openFileAsync(a,b,c)},"~S,~N,~S");f(b,"openFile",function(a){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint(null,a,null,null)},"~S");f(b,"openFiles",function(a){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint(null,null,a,null)},"~A");c(b,"openReader",function(a,b,c){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint(a,b,null,c)},"~S,~S,~O");f(b,"openDOM",function(a){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint("?",
"?",null,a)},"~O");c(b,"loadModelFromFileRepaint",function(a,b,c,e){a=this.loadModelFromFile(a,b,c,e,!1,null,null,null,0," ");this.refresh(1,"loadModelFromFileRepaint");return a},"~S,~S,~A,~O");c(b,"loadModelFromFile",function(a,b,c,e,g,j,f,l,m,n){null==j&&(j=this.setLoadParameters(null,g));0!=m&&j.put("dataType",JS.T.nameOf(m));" "!==n&&j.put("concatenate",Boolean.TRUE);var q=this.fm.getFileInfo();if(null!=c){if(null==f){f=(new JU.SB).append("load ").append(g?"append ":"").append("files");for(a=
0;a<c.length;a++)f.append(0==a||null==n?" ":n).append("/*file*/$FILENAME"+(a+1)+"$");0<l.length()&&f.append(" /*options*/ ").append(l.toString())}a=System.currentTimeMillis();l=this.fm.createAtomSetCollectionFromFiles(c,this.setLoadParameters(j,g),g);a=System.currentTimeMillis()-a;JU.Logger.info("openFiles("+c.length+") "+a+" ms");c=j.get("fullPathNames");n=j.get("fileTypes");f=f.toString();for(a=0;a<c.length;a++)b=c[a],null!=n&&null!=n[a]&&(b=n[a]+"::"+b),f=JU.PT.rep(f,"$FILENAME"+(a+1)+"$",JU.PT.esc(JV.FileManager.fixDOSName(b)));
f=(new JU.SB).append(f)}else if(null==e)null==f&&(f=(new JU.SB).append("load /*file*/$FILENAME$")),l=this.openFileFull(b,g,j,f);else if(C(e,"java.io.Reader")||C(e,"java.io.BufferedInputStream")||JU.AU.isAB(e))l=this.fm.createAtomSetCollectionFromReader(a,b,e,this.setLoadParameters(j,g));else return"ERROR - invalid reader";if(0!=m)return this.fm.setFileInfo(q),this.loadAtomDataAndReturnError(l,m);if(j.containsKey("isData"))return l;null!=f&&"string"!=typeof l&&(b=j.get("fullPathName"),null==b&&(b=
""),j.containsKey("loadScript")&&(f=j.get("loadScript")),j.put("loadScript",f=(new JU.SB).append(JU.PT.rep(f.toString(),"$FILENAME$",JU.PT.esc(JV.FileManager.fixDOSName(b))))));return this.createModelSetAndReturnError(l,g,f,j)},"~S,~S,~A,~O,~B,java.util.Map,JU.SB,JU.SB,~N,~S");c(b,"setLigandModel",function(a,b){null==this.ligandModels&&(this.ligandModels=new java.util.Hashtable);this.ligandModels.put(a,b)},"~S,~S");c(b,"getLigandModel",function(a,b,c,e){if(null==a){if(null!=this.ligandModelSet)for(a=
this.ligandModels.entrySet().iterator();a.hasNext();){var g=a.next();C(g.getValue(),Boolean)&&a.remove()}return null}a=a.$replace("\\","/");var j=b.equals("ligand_");a=0<=a.indexOf("/cif")?a:j?a.toUpperCase():a.substring(a.lastIndexOf("/")+1);null==this.ligandModelSet&&(this.ligandModelSet=new java.util.Hashtable);this.ligandModelSet.put(a,Boolean.TRUE);null==this.ligandModels&&(this.ligandModels=new java.util.Hashtable);var f=a.indexOf("|");0<=f&&(a=a.substring(a.indexOf("|")+1));var l=null==e?this.ligandModels.get(a):
null,g=null;if(C(l,Boolean))return null;if(null==l&&(null==e||0<=f))l=this.ligandModels.get(a+c);var f=!1,m=null==l;if(m){if(j){g=this.setLoadFormat(!1,"#"+a,"#",!1);if(0==g.length)return null;this.scriptEcho("fetching "+g);l=this.getFileAsString3(g,!1,null)}else this.scriptEcho("fetching "+b),l=this.getFileAsString3(b,!1,null),e=null==e?-1:l.indexOf(e),0<=e&&(l=l.substring(0,e));(f=0==l.indexOf("java."))||this.ligandModels.put(a+c,l)}if(!j)return m||this.scriptEcho(b+" loaded from cache"),l;!f&&
"string"==typeof l&&(b=l,0!=b.length&&(c=new java.util.Hashtable,c.put("modelOnly",Boolean.TRUE),l=this.getModelAdapter().getAtomSetCollectionReader("ligand",null,JU.Rdr.getBR(b),c),f="string"==typeof l,f||(l=this.getModelAdapter().getAtomSetCollection(l),f="string"==typeof l,null!=g&&!f&&this.scriptEcho(this.getModelAdapter().getAtomSetCollectionAuxiliaryInfo(l).get("modelLoadNote")))));return f?(this.scriptEcho(l.toString()),this.ligandModels.put(a,Boolean.FALSE),null):l},"~S,~S,~S,~S");c(b,"openFileFull",
function(a,b,c,e){if(null==a||a.equals("String[]"))return null;var g,j="openFile("+a+")";JU.Logger.startTimer(j);c=this.setLoadParameters(c,b);var f=a.startsWith("@"),l=c.containsKey("fileData");0==a.indexOf("$")&&c.put("smilesString",a.substring(1));var m=a.equals("string")||a.equals("Jmol Model Kit");g=null;if(l){if(g=c.get("fileData"),c.containsKey("isData"))return j=this.loadInlineScript(g,"\x00",b,c),this.lastData=this.g.preserveState?this.getDataManager().createFileData(g):null,j}else if(m){g=
this.ms.getInlineData(-1);if(null==g)if(this.g.modelKitMode)g="5\n\nC 0 0 0\nH .63 .63 .63\nH -.63 -.63 .63\nH -.63 .63 -.63\nH .63 -.63 -.63";else return"cannot find string data";null!=e&&c.put("loadScript",e=(new JU.SB).append(JU.PT.rep(e.toString(),"/*file*/$FILENAME$",'/*data*/data "model inline"\n'+g+'end "model inline"')))}null!=g?(b||this.zap(!0,!1,!1),!f&&(!l||m)&&this.getStateCreator().getInlineData(e,g,b,c.get("appendToModelIndex"),this.g.defaultLoadFilter),g=this.fm.createAtomSetCollectionFromString(g,
c,b)):g=this.fm.createAtomSetCollectionFromFile(a,c,b);JU.Logger.checkTimer(j,!1);return g},"~S,~B,java.util.Map,JU.SB");f(b,"openStringInline",function(a){a=this.openStringInlineParamsAppend(a,null,!1);this.refresh(1,"openStringInline");return a},"~S");c(b,"loadInline",function(a){return this.loadInlineScriptRepaint(a,this.g.inlineNewlineChar,!1)},"~S");c(b,"loadInline",function(a,b){return this.loadInlineScriptRepaint(a,b,!1)},"~S,~S");f(b,"loadInlineAppend",function(a,b){return this.loadInlineScriptRepaint(a,
"\x00",b)},"~S,~B");c(b,"loadInlineScriptRepaint",function(a,b,c){a=this.loadInlineScript(a,b,c,null);this.refresh(1,"loadInlineScript");return a},"~S,~S,~B");c(b,"loadInline",function(a){return this.loadInline(a,!1)},"~A");c(b,"loadInline",function(a,b){if(null==a||0==a.length)return null;var c=this.openStringsInlineParamsAppend(a,new java.util.Hashtable,b);this.refresh(1,"loadInline String[]");return c},"~A,~B");c(b,"loadInline",function(a,b){if(null==a||0==a.size())return null;b||this.zap(!0,!1,
!1);for(var c=new JU.Lst,e=0;e<a.size();e++)c.addLast(a.get(e));c=this.fm.createAtomSeCollectionFromArrayData(c,this.setLoadParameters(null,b),b);c=this.createModelSetAndReturnError(c,b,null,new java.util.Hashtable);this.refresh(1,"loadInline");return c},"java.util.List,~B");c(b,"loadInlineScript",function(a,b,c,e){if(null==a||0==a.length)return null;if(!a.startsWith(";base64,")){a=JV.Viewer.fixInlineString(a,b);0!=b.charCodeAt(0)&&JU.Logger.info("loading model inline, "+a.length+" bytes, with newLine character "+
b.charCodeAt(0)+" isAppend="+c);JU.Logger.debugging&&JU.Logger.debug(a);b=this.getDataSeparator();var g;if(null!=b&&""!==b&&0<=(g=a.indexOf(b))&&0>a.indexOf("# Jmol state")){for(var j=2;0<=(g=a.indexOf(b,g+1));)j++;var f=Array(j),l=0,m=0;for(g=0;g<j;g++)l=a.indexOf(b,m),0>l&&(l=a.length),f[g]=a.substring(m,l),m=l+b.length;return this.openStringsInlineParamsAppend(f,e,c)}}return this.openStringInlineParamsAppend(a,e,c)},"~S,~S,~B,java.util.Map");b.fixInlineString=c(b,"fixInlineString",function(a,b){var c;
0<=a.indexOf("\\/n")&&(a=JU.PT.rep(a,"\n",""),a=JU.PT.rep(a,"\\/n","\n"),b=String.fromCharCode(0));if(0!=b.charCodeAt(0)&&"\n"!=b){var e=0<=a.indexOf("\n"),g=a.length;for(c=0;c<g&&" "==a.charAt(c);++c);c<g&&a.charAt(c)==b&&(a=a.substring(c+1));a=e?JU.PT.rep(a,""+b,""):a.$replace(b,"\n")}return a},"~S,~S");c(b,"openStringInlineParamsAppend",function(a,b,c){b=this.setLoadParameters(b,c);var e=b.get("loadScript"),g=b.containsKey("isData");if(!a.startsWith(";base64,")){var j=this.getModelAdapter().getFileTypeName(b.get("filter"));
if(null==j&&null==(j=this.getModelAdapter().getFileTypeName(JU.Rdr.getBR(a))))return"unknown file type";if(j.equals("spt"))return"cannot open script inline"}null==e&&(e=new JU.SB);c||this.zap(!0,!1,!1);g||this.getStateCreator().getInlineData(e,a,c,b.get("appendToModelIndex"),this.g.defaultLoadFilter);a=this.fm.createAtomSetCollectionFromString(a,b,c);return this.createModelSetAndReturnError(a,c,e,b)},"~S,java.util.Map,~B");c(b,"openStringsInlineParamsAppend",function(a,b,c){var e=new JU.SB;c||this.zap(!0,
!1,!1);a=this.fm.createAtomSeCollectionFromStrings(a,e,this.setLoadParameters(b,c),c);return this.createModelSetAndReturnError(a,c,e,b)},"~A,java.util.Map,~B");c(b,"getInlineChar",function(){return this.g.inlineNewlineChar});c(b,"getDataSeparator",function(){return this.g.getParameter("dataseparator",!0)});c(b,"createModelSetAndReturnError",function(a,b,c,e){JU.Logger.startTimer("creating model");var g=this.fm.getFullPathName(!1),j=this.fm.getFileName();null==c&&(this.setBooleanPropertyTok("preserveState",
603979898,!1),c=(new JU.SB).append('load "???"'));if("string"==typeof a)return this.setFileLoadStatus(J.c.FIL.NOT_LOADED,g,null,null,a,null),this.displayLoadErrors&&(!b&&!a.equals("#CANCELED#")&&!a.startsWith("File reader was not found:"))&&this.zapMsg(a),a;b?this.clearAtomSets():this.g.modelKitMode&&!j.equals("Jmol Model Kit")&&this.setModelKitMode(!1);this.setFileLoadStatus(J.c.FIL.CREATING_MODELSET,g,j,null,null,null);this.pushHoldRepaintWhy("createModelSet");this.setErrorMessage(null,null);try{var f=
new JU.BS;this.mm.createModelSet(g,j,c,a,f,b);if(!f.isEmpty()){var l=this.ms.getInfoM("jmolscript");if(this.ms.getMSInfoB("doMinimize"))try{var m=e.get("eval"),n=this.getAtomBitSet("_C & connected(3) & !connected(double)");n.and(f);0<=n.nextSetBit(0)&&f.or(this.addHydrogens(n,41));this.minimize(m,2147483647,0,f,null,null,0,185)}catch(q){if(!E(q,Exception))throw q;}else this.addHydrogens(f,9);null!=l&&this.ms.msInfo.put("jmolscript",l)}this.initializeModel(b)}catch(v){if(E(v,Error))this.handleError(v,
!0),a=this.getShapeErrorState(),a="ERROR creating model: "+v+(0==a.length?"":"|"+a),this.zapMsg(a),this.setErrorMessage(a,null);else throw v;}this.popHoldRepaint("createModelSet \u0001## REPAINT_IGNORE ##");a=this.getErrorMessage();this.setFileLoadStatus(J.c.FIL.CREATED,g,j,this.ms.modelSetName,a,e.get("async"));b&&(this.selectAll(),this.setTainted(!0),this.axesAreTainted=!0);JU.Logger.checkTimer("creating model",!1);System.gc();return a},"~O,~B,JU.SB,java.util.Map");c(b,"loadAtomDataAndReturnError",
function(a,b){if("string"==typeof a)return a;this.setErrorMessage(null,null);try{var c=this.mm.createAtomDataSet(a,b);switch(b){case 1145047049:null!=c&&this.runScriptCautiously(c);break;case 4166:this.setStatusFrameChanged(!0,!1);break;case 1648363544:this.shm.deleteVdwDependentShapes(null)}}catch(e){if(E(e,Error))this.handleError(e,!0),c=this.getShapeErrorState(),c="ERROR adding atom data: "+e+(0==c.length?"":"|"+c),this.zapMsg(c),this.setErrorMessage(c,null),this.setParallel(!1);else throw e;}return this.getErrorMessage()},
"~O,~N");c(b,"getCurrentFileAsString",function(a){var b=this.fm.getFullPathName(!1);return b.equals("string")||b.equals("Jmol Model Kit")?this.ms.getInlineData(this.am.cmi):b.equals("String[]")?b:"JSNode"===b?"<DOM NODE>":this.getFileAsString4(b,-1,!0,!1,!1,a)},"~S");c(b,"getFullPathNameOrError",function(a){var b=Array(2);this.fm.getFullPathNameOrError(a,!1,b);return b},"~S");c(b,"getFileAsString3",function(a,b,c){return this.getFileAsString4(a,-1,!1,!1,b,c)},"~S,~B,~S");c(b,"getFileAsString4",function(a,
b,c,e,g,j){if(null==a)return this.getCurrentFileAsString(j);a=z(-1,[a,null]);this.fm.getFileDataAsString(a,b,c,e,g);return a[1]},"~S,~N,~B,~B,~B,~S");c(b,"getAsciiFileOrNull",function(a){return this.fm.getAsciiFileOrNull(a)},"~S");c(b,"autoCalculate",function(a,b){switch(a){case 1111490575:this.ms.getSurfaceDistanceMax();break;case 1111490574:this.ms.calculateStraightnessAll();break;case 1111490587:this.ms.calculateDssrProperty(b)}},"~N,~S");c(b,"calculateStraightness",function(){this.ms.haveStraightness=
!1;this.ms.calculateStraightnessAll()});c(b,"calculateSurface",function(a,b){null==a&&(a=this.bsA());if(3.4028235E38==b||-1==b)this.ms.addStateScript("calculate surfaceDistance "+(3.4028235E38==b?"FROM":"WITHIN"),null,a,null,"",!1,!0);return this.ms.calculateSurface(a,b)},"JU.BS,~N");c(b,"getStructureList",function(){return this.g.getStructureList()});c(b,"setStructureList",function(a,b){this.g.setStructureList(a,b);this.ms.setStructureList(this.getStructureList())},"~A,J.c.STR");c(b,"calculateStructures",
function(a,b,c,e){null==a&&(a=this.bsA());return this.ms.calculateStructures(a,b,!this.am.animationOn,this.g.dsspCalcHydrogen,c,e)},"JU.BS,~B,~B,~N");c(b,"getAnnotationParserIfPresent",function(a){return 1111490587==a?this.dssrParser:this.annotationParser},"~N");c(b,"getAnnotationParser",function(a){return 1111490587==a?null==this.dssrParser?this.dssrParser=J.api.Interface.getOption("dssx.DSSR1",this,"script"):this.dssrParser:null==this.annotationParser?this.annotationParser=J.api.Interface.getOption("dssx.AnnotationParser",
this,"script"):this.annotationParser},"~N");f(b,"getSelectedAtomIterator",function(a,b,c,e){return this.ms.getSelectedAtomIterator(a,b,c,!1,e)},"JU.BS,~B,~B,~B");f(b,"setIteratorForAtom",function(a,b,c){this.ms.setIteratorForAtom(a,-1,b,c,null)},"J.api.AtomIndexIterator,~N,~N");f(b,"setIteratorForPoint",function(a,b,c,e){this.ms.setIteratorForPoint(a,b,c,e)},"J.api.AtomIndexIterator,~N,JU.T3,~N");f(b,"fillAtomData",function(a,b){a.programInfo="Jmol Version "+JV.Viewer.getJmolVersion();a.fileName=
this.fm.getFileName();this.ms.fillAtomData(a,b)},"J.atomdata.AtomData,~N");c(b,"addStateScript",function(a,b,c){return this.ms.addStateScript(a,null,null,null,null,b,c)},"~S,~B,~B");c(b,"getMinimizer",function(a){return null==this.minimizer&&a?(this.minimizer=J.api.Interface.getInterface("JM.Minimizer",this,"script")).setProperty("vwr",this):this.minimizer},"~B");c(b,"getSmilesMatcher",function(){return null==this.smilesMatcher?this.smilesMatcher=J.api.Interface.getInterface("JS.SmilesMatcher",this,
"script"):this.smilesMatcher});c(b,"clearModelDependentObjects",function(){this.setFrameOffsets(null,!1);this.stopMinimization();this.smilesMatcher=this.minimizer=null;null!=this.modelkit&&this.modelkit.clearAtomConstraints()});c(b,"zap",function(a,b,c){this.clearThreads();null==this.mm.modelSet?this.mm.zap():(this.ligandModelSet=null,this.clearModelDependentObjects(),this.fm.clear(),this.clearRepaintManager(-1),this.am.clear(),this.tm.clear(),this.slm.clear(),this.hasSelected=!0,this.clearAllMeasurements(),
this.clearMinimization(),this.gdata.clear(),this.mm.zap(),null!=this.scm&&this.scm.clear(!1),null!=this.nmrCalculation&&this.getNMRCalculation().setChemicalShiftReference(null,0),this.haveDisplay&&(this.mouse.clear(),this.clearTimeouts(),this.acm.clear()),this.stm.clear(this.g),this.tempArray.clear(),this.chainMap.clear(),this.chainList.clear(),this.chainCaseSpecified=!1,this.definedAtomSets.clear(),this.lastData=null,null!=this.dm&&this.dm.clear(),!this.g.doublePrecision&&this.g.legacyJavaFloat&&
this.setBooleanPropertyTok("legacyjavafloat",603979874,!1),b&&(c&&this.g.removeParam("_pngjFile"),c&&this.g.modelKitMode?this.loadDefaultModelKitModel(null):this.setPickingMode(null,1),this.undoMoveAction(4165,-2)),System.gc());this.initializeModel(!1);a&&this.setFileLoadStatus(J.c.FIL.ZAPPED,null,b?"resetUndo":this.getZapName(),null,null,null);JU.Logger.debugging&&JU.Logger.checkMemory()},"~B,~B,~B");c(b,"loadDefaultModelKitModel",function(a){this.getModelkit(!1).isHidden()||null!=this.getOperativeSymmetry()||
(this.openStringInlineParamsAppend(this.getModelkit(!1).getDefaultModel(),a,!0),this.setRotationRadius(5,!0),this.setStringProperty("picking","assignAtom_C"),this.setStringProperty("picking","assignBond_p"))},"java.util.Map");c(b,"zapMsg",function(a){this.zap(!0,!0,!1);this.echoMessage(a)},"~S");c(b,"echoMessage",function(a){this.shm.loadShape(31);this.setShapeProperty(31,"font",this.getFont3D("SansSerif","Plain",20));this.setShapeProperty(31,"target","error");this.setShapeProperty(31,"text",a)},
"~S");c(b,"initializeModel",function(a){this.clearThreads();a?this.am.initializePointers(1):(this.reset(!0),this.selectAll(),this.setModelkitPropertySafely("initializemodel",null),this.movingSelected=!1,this.slm.noneSelected=Boolean.FALSE,this.setHoverEnabled(!0),this.setSelectionHalosEnabled(!1),this.tm.setCenter(),this.am.initializePointers(1),this.setBooleanPropertyTok("multipleBondBananas",603979886,!1),this.ms.getMSInfoB("isPyMOL")||(this.clearAtomSets(),this.setCurrentModelIndex(0)),this.setBackgroundModelIndex(-1),
this.setFrankOn(this.getShowFrank()),this.shm.setScale(),this.startHoverWatcher(!0),this.setTainted(!0),this.finalizeTransformParameters())},"~B");c(b,"startHoverWatcher",function(a){a&&this.inMotion||(!this.haveDisplay||a&&(!this.hoverEnabled&&!this.sm.haveHoverCallback()||this.am.animationOn))||this.acm.startHoverWatcher(a)},"~B");f(b,"getModelSetPathName",function(){return this.mm.modelSetPathName});f(b,"getModelSetFileName",function(){return null==this.mm.fileName?this.getZapName():this.mm.fileName});
c(b,"getUnitCellInfoText",function(){var a=this.getCurrentUnitCell();return null==a?"not applicable":a.getUnitCellInfo(!0)});c(b,"getUnitCellInfo",function(a){var b=this.getCurrentUnitCell();return null==b?NaN:b.getUnitCellInfoType(a)},"~N");c(b,"getUnitCellInfoStr",function(a){var b=this.getCurrentUnitCell();return null==b?NaN:b.getUnitCellInfoStr(a)},"~S");c(b,"getV0abc",function(a,b){var c=0>a?this.getCurrentUnitCell():this.getUnitCell(a);null==c&&(c=this.getSymTemp());return null==c?null:c.getV0abc(b,
null)},"~N,~O");c(b,"getCurrentUnitCell",function(){var a=this.getUnitCell(this.am.cmi);if(null==a)return null;var b=a.getCartesianOffset(),c=this.am.getUnitCellAtomIndex();return 0<=c&&(null==b||0==b.length())?this.ms.getUnitCellForAtom(c):a});c(b,"getUnitCell",function(a){if(0<=a)return this.ms.getUnitCell(a);a=this.getVisibleFramesBitSet();for(var b=null,c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1)){var e=this.ms.getUnitCell(c);if(null!=e)if(null==b)b=e;else if(!b.unitCellEquals(e))return null}return b},
"~N");c(b,"getPolymerPointsAndVectors",function(a,b){this.ms.getPolymerPointsAndVectors(a,b,this.g.traceAlpha,this.g.sheetSmoothing)},"JU.BS,JU.Lst");c(b,"getHybridizationAndAxes",function(a,b,c,e){return this.ms.getHybridizationAndAxes(a,0,b,c,e,!0,!0,!1,null)},"~N,JU.V3,JU.V3,~S");c(b,"getAllAtoms",function(){return this.getModelUndeletedAtomsBitSet(-1)});c(b,"getFrameAtoms",function(){return this.getModelUndeletedAtomsBitSetBs(this.getVisibleFramesBitSet())});c(b,"getVisibleFrameAtomsNoSplitData",
function(){return this.getModelUndeletedAtomsBitSetBs(this.getVisibleFramesBitSetNoJmolData())});f(b,"getVisibleFramesBitSet",function(){var a=JU.BSUtil.copy(this.am.bsVisibleModels);null!=this.ms.trajectory&&this.ms.trajectory.selectDisplayed(a);return a});c(b,"getVisibleFramesBitSetNoJmolData",function(){var a=this.getVisibleFramesBitSet();if(this.am.splitFrame)for(var b=0;2>b;b++){var c=this.am.getSplitFrameModelIndex(b);this.ms.isJmolDataFrame(c)&&a.clear(c)}return a});c(b,"getModelUndeletedAtomsBitSet",
function(a){return this.slm.excludeAtoms(this.ms.getModelAtomBitSetIncludingDeleted(a,!0),!1)},"~N");c(b,"getModelUndeletedAtomsBitSetBs",function(a){return this.slm.excludeAtoms(this.ms.getModelAtomBitSetIncludingDeletedBs(a),!1)},"JU.BS");f(b,"getBoundBoxCenter",function(){return this.ms.getBoundBoxCenter(this.am.cmi)});c(b,"calcBoundBoxDimensions",function(a,b){this.ms.calcBoundBoxDimensions(a,b);this.axesAreTainted=!0},"JU.BS,~N");f(b,"getBoundBoxCornerVector",function(){return this.ms.getBoundBoxCornerVector()});
f(b,"getModelSetProperties",function(){return this.ms.modelSetProperties});f(b,"getModelProperties",function(a){return this.ms.am[a].properties},"~N");c(b,"getModelForAtomIndex",function(a){return this.ms.am[this.ms.at[a].mi]},"~N");c(b,"getModelIndexForAtom",function(a){return this.ms.at[a].mi},"~N");f(b,"getModelSetAuxiliaryInfo",function(){return this.ms.getModelSetAuxiliaryInfo(null)});f(b,"getModelNumber",function(a){return 0>a?a:this.ms.getModelNumber(a)},"~N");c(b,"getModelFileNumber",function(a){return 0>
a?0:this.ms.modelFileNumbers[a]},"~N");f(b,"getModelNumberDotted",function(a){return 0>a?"0":this.ms.getModelNumberDotted(a)},"~N");f(b,"getModelName",function(a){return this.ms.getModelName(a)},"~N");c(b,"modelHasVibrationVectors",function(a){return 0<=this.ms.getLastVibrationVector(a,4166)},"~N");c(b,"getBondsForSelectedAtoms",function(a){return this.ms.getBondsForSelectedAtoms(a,this.g.bondModeOr||1==JU.BSUtil.cardinalityOf(a))},"JU.BS");c(b,"frankClicked",function(a,b){return!this.g.disablePopupMenu&&
this.getShowFrank()&&this.shm.checkFrankclicked(a,b)},"~N,~N");c(b,"frankClickedModelKit",function(a,b){return!this.g.disablePopupMenu&&this.isModelKitOpen()&&0<=a&&0<=b&&40>a&&104>b},"~N,~N");f(b,"findNearestAtomIndex",function(a,b){return this.findNearestAtomIndexMovable(a,b,!1)},"~N,~N");c(b,"findNearestAtomIndexMovable",function(a,b,c){return!this.g.atomPicking?-1:this.ms.findNearestAtomIndex(a,b,c?this.slm.getMotionFixedAtoms():null,this.antialiased?this.g.minPixelSelRadius<<1:this.g.minPixelSelRadius)},
"~N,~N,~B");c(b,"toCartesian",function(a,b){this.toCartesianUC(null,a,b)},"JU.T3,~B");c(b,"toCartesianUC",function(a,b,c){null==a&&(a=this.getCurrentUnitCell());null!=a&&(a.toCartesian(b,c),this.g.legacyJavaFloat||JU.PT.fixPtFloats(b,1E4))},"J.api.SymmetryInterface,JU.T3,~B");c(b,"toFractional",function(a,b){this.toFractionalUC(null,a,b)},"JU.T3,~B");c(b,"toFractionalUC",function(a,b,c){null==a&&(a=this.getCurrentUnitCell());null!=a&&(a.toFractional(b,c),this.g.legacyJavaFloat||JU.PT.fixPtFloats(b,
1E5))},"J.api.SymmetryInterface,JU.T3,~B");c(b,"toUnitCell",function(a,b){var c=this.getCurrentUnitCell();null!=c&&c.toUnitCell(a,b)},"JU.P3,JU.P3");c(b,"setCurrentCage",function(a){a=z(-1,[a,null]);this.shm.getShapePropertyData(24,"unitCell",a);this.ms.setModelCage(this.am.cmi,a[1],!0)},"~S");c(b,"addUnitCellOffset",function(a){var b=this.getCurrentUnitCell();null!=b&&a.add(b.getCartesianOffset())},"JU.P3");c(b,"setAtomData",function(a,b,c,e){this.ms.setAtomData(a,b,c,e);2==a&&this.checkCoordinatesChanged(null);
this.refreshMeasures(!0)},"~N,~S,~S,~B");f(b,"setCenterSelected",function(){this.setCenterBitSet(this.bsA(),!0)});c(b,"setApplySymmetryToBonds",function(a){this.g.applySymmetryToBonds=a},"~B");f(b,"setBondTolerance",function(a){this.g.setF("bondTolerance",a);this.g.bondTolerance=a},"~N");f(b,"setMinBondDistance",function(a){this.g.setF("minBondDistance",a);this.g.minBondDistance=a},"~N");c(b,"getAtomsNearPt",function(a,b,c){null==c&&(c=new JU.BS);this.ms.getAtomsWithin(a,b,c,-1);return c},"~N,JU.P3,JU.BS");
c(b,"getBranchBitSet",function(a,b,c){return 0>a||a>=this.ms.ac?new JU.BS:JU.JmolMolecule.getBranchBitSet(this.ms.at,a,this.getModelUndeletedAtomsBitSet(this.ms.at[a].mi),null,b,c,!0)},"~N,~N,~B");f(b,"getElementsPresentBitSet",function(a){return this.ms.getElementsPresentBitSet(a)},"~N");c(b,"getFileHeader",function(){return this.ms.getFileHeader(this.am.cmi)});c(b,"getFileData",function(){return this.ms.getFileData(this.am.cmi)});c(b,"getCifData",function(a){return this.fm.readCifData(this.ms.getModelFileName(a),
this.ms.getModelFileType(a).toUpperCase())},"~N");f(b,"readCifData",function(a,b,c){null==b&&(b=this.getAsciiFileOrNull(a));return this.fm.readCifDataKey(b,c,null)},"~S,~O,~S");c(b,"getStateCreator",function(){null==this.jsc&&(this.jsc=J.api.Interface.getInterface("JV.StateCreator",this,"script")).setViewer(this);return this.jsc});c(b,"getWrappedStateScript",function(){return this.getOutputManager().getWrappedState(null,null,null,null)});f(b,"getStateInfo",function(){return this.getStateInfo3(null,
0,0)});c(b,"getStateInfo3",function(a,b,c){return this.g.preserveState?this.getStateCreator().getStateScript(a,b,c):""},"~S,~N,~N");c(b,"getStructureState",function(){return this.getStateCreator().getModelState(null,!1,!0)});c(b,"getCoordinateState",function(a){return this.getStateCreator().getAtomicPropertyState(2,a)},"JU.BS");c(b,"setCurrentColorRange",function(a){var b=this.getDataObj(a,null,1);a=null==b?null:this.getDataObj(a,null,-1)[2];null!=a&&this.g.rangeSelected&&a.and(this.bsA());this.cm.setPropertyColorRangeData(b,
a)},"~S");c(b,"setData",function(a,b,c,e,g,j,f){this.getDataManager().setData(a,this.lastData=b,c,this.ms.ac,e,g,j,f)},"~S,~A,~N,~N,~N,~N,~N");c(b,"getDataObj",function(a,b,c){return 4==c?this.ms.getDSSRProperties(a):null==a&&-2==c?this.lastData:this.getDataManager().getData(a,b,c)},"~S,JU.BS,~N");c(b,"autoHbond",function(a,b,c){null==a&&(a=b=this.bsA());return this.ms.autoHbond(a,b,c)},"JU.BS,JU.BS,~B");c(b,"getDefaultMeasurementLabel",function(a){switch(a){case 2:return this.g.defaultDistanceLabel;
case 3:return this.g.defaultAngleLabel;default:return this.g.defaultTorsionLabel}},"~N");f(b,"getMeasurementCount",function(){var a=this.getShapePropertyAsInt(6,"count");return 0>=a?0:a});f(b,"getMeasurementStringValue",function(a){return""+this.shm.getShapePropertyIndex(6,"stringValue",a)},"~N");c(b,"getMeasurementInfoAsString",function(){return this.getShapeProperty(6,"infostring")});f(b,"getMeasurementCountPlusIndices",function(a){return this.shm.getShapePropertyIndex(6,"countPlusIndices",a)},
"~N");c(b,"setPendingMeasurement",function(a){this.shm.loadShape(6);this.setShapeProperty(6,"pending",a)},"JM.MeasurementPending");c(b,"getPendingMeasurement",function(){return this.getShapeProperty(6,"pending")});c(b,"clearAllMeasurements",function(){this.setShapeProperty(6,"clear",null)});f(b,"clearMeasurements",function(){this.evalString("measures delete")});c(b,"setAnimation",function(a){switch(a){case 1073742098:this.am.reverseAnimation();case 1073742096:case 4143:this.am.animationOn||this.am.resumeAnimation();
break;case 20487:this.am.animationOn&&!this.am.animationPaused&&this.am.pauseAnimation();break;case 1073742037:this.am.setAnimationNext();break;case 1073742108:this.am.setAnimationPrevious();break;case 1073741942:case 1073742125:this.am.rewindAnimation();break;case 1073741993:this.am.setAnimationLast()}},"~N");f(b,"setAnimationFps",function(a){this.am.setAnimationFps(a)},"~N");c(b,"setAnimationMode",function(a){a.equalsIgnoreCase("once")?this.am.setAnimationReplayMode(1073742070,0,0):a.equalsIgnoreCase("loop")?
this.am.setAnimationReplayMode(528411,1,1):a.startsWith("pal")&&this.am.setAnimationReplayMode(1073742082,1,1)},"~S");c(b,"setAnimationOn",function(a){a!=this.am.animationOn&&this.am.setAnimationOn(a)},"~B");c(b,"setAnimationRange",function(a,b){this.am.setAnimationRange(a,b)},"~N,~N");c(b,"defineAtomSets",function(a){this.definedAtomSets.putAll(a)},"java.util.Map");c(b,"setAnimDisplay",function(a){this.am.setDisplay(a);this.am.animationOn||this.am.morph(this.am.currentMorphModel+1)},"JU.BS");c(b,
"setCurrentModelIndex",function(a){-2147483648==a?(this.prevFrame=-2147483648,this.setCurrentModelIndexClear(this.am.cmi,!0)):this.am.setModel(a,!0)},"~N");c(b,"getTrajectoryState",function(){return null==this.ms.trajectory?"":this.ms.trajectory.getState()});c(b,"setFrameOffsets",function(a,b){this.tm.bsFrameOffsets=null;b?this.clearModelDependentObjects():this.tm.bsFrameOffsets=a;this.tm.frameOffsets=this.ms.getFrameOffsets(a,b)},"JU.BS,~B");c(b,"setCurrentModelIndexClear",function(a,b){this.am.setModel(a,
b)},"~N,~B");c(b,"haveFileSet",function(){return 1<this.ms.mc&&2E6<this.getModelNumber(2147483647)});c(b,"setBackgroundModelIndex",function(a){this.am.setBackgroundModelIndex(a);this.g.setO("backgroundModel",this.ms.getModelNumberDotted(a))},"~N");c(b,"setFrameVariables",function(){this.g.setO("animationMode",JS.T.nameOf(this.am.animationReplayMode));this.g.setI("animationFps",this.am.animationFps);this.g.setO("_firstFrame",this.am.getModelSpecial(-1));this.g.setO("_lastFrame",this.am.getModelSpecial(1));
this.g.setF("_animTimeSec",this.am.getAnimRunTimeSeconds());this.g.setB("_animMovie",this.am.isMovie)});c(b,"getInMotion",function(a){return this.inMotion||a&&this.am.animationOn},"~B");f(b,"getMotionEventNumber",function(){return this.motionEventNumber});f(b,"setInMotion",function(a){(new Boolean(this.inMotion^a)).valueOf()&&(this.inMotion=a,this.resizeImage(0,0,!1,!1,!0),a?(this.startHoverWatcher(!1),++this.motionEventNumber):(this.startHoverWatcher(!0),this.refresh(3,"vwr setInMotion "+a)))},"~B");
c(b,"setRefreshing",function(a){this.refreshing=a},"~B");c(b,"getRefreshing",function(){return this.refreshing});f(b,"pushHoldRepaint",function(){this.pushHoldRepaintWhy(null)});c(b,"pushHoldRepaintWhy",function(a){null!=this.rm&&this.rm.pushHoldRepaint(a)},"~S");f(b,"popHoldRepaint",function(a){null!=this.rm&&this.rm.popHoldRepaint(0>a.indexOf("\u0001## REPAINT_IGNORE ##"),a)},"~S");f(b,"refresh",function(a,b){if(!(null==this.rm||!this.refreshing||6==a&&this.getInMotion(!0)||!this.isWebGL&&7==a)){if(this.isWebGL)switch(a){case 1:case 2:case 7:this.tm.finalizeTransformParameters();
if(null==this.html5Applet)return;this.html5Applet._refresh();if(7==a)return}else this.rm.repaintIfReady("refresh "+a+" "+b);this.sm.doSync()&&this.sm.setSync(2==a?b:null)}},"~N,~S");c(b,"requestRepaintAndWait",function(a){null!=this.rm&&(this.haveDisplay?(this.rm.requestRepaintAndWait(a),this.setSync()):(this.setModelVisibility(),this.shm.finalizeAtoms(null,!0)))},"~S");c(b,"clearShapeRenderers",function(){this.clearRepaintManager(-1)});c(b,"isRepaintPending",function(){return null==this.rm?!1:this.rm.isRepaintPending()});
f(b,"notifyViewerRepaintDone",function(){null!=this.rm&&this.rm.repaintDone();this.am.repaintDone()});c(b,"areAxesTainted",function(){var a=this.axesAreTainted;this.axesAreTainted=!1;return a});f(b,"generateOutputForExport",function(a){return this.noGraphicsAllowed||null==this.rm?null:this.getOutputManager().getOutputFromExport(a)},"java.util.Map");c(b,"clearRepaintManager",function(a){null!=this.rm&&this.rm.clear(a)},"~N");c(b,"renderScreenImage",function(a,b,c){this.renderScreenImageStereo(a,!1,
b,c)},"~O,~N,~N");c(b,"renderScreenImageStereo",function(a,b,c,e){this.updateWindow(c,e)&&(!b||null==this.gRight?this.getScreenImageBuffer(a,!1):(this.drawImage(this.gRight,this.getRenderedImage(!0,!1),0,0,this.tm.stereoDoubleDTI),this.drawImage(a,this.getRenderedImage(!1,!1),0,0,this.tm.stereoDoubleDTI)));this.isCapturing()&&this.doCapture();this.notifyViewerRepaintDone()},"~O,~B,~N,~N");c(b,"isCapturing",function(){return null!=this.captureParams&&Boolean.FALSE!==this.captureParams.get("captureEnabled")});
c(b,"doCapture",function(){this.captureParams.remove("imagePixels");var a=this.captureParams.get("endTime").longValue();0<a&&System.currentTimeMillis()+50>a&&this.captureParams.put("captureMode","end");this.processWriteOrCapture(this.captureParams)});c(b,"updateJS",function(){this.isWebGL?(null==this.jsParams&&(this.jsParams=new java.util.Hashtable,this.jsParams.put("type","JS")),this.updateWindow(0,0)&&this.render(),this.notifyViewerRepaintDone()):this.isStereoSlave||this.renderScreenImageStereo(this.apiPlatform.getGraphics(null),
!0,0,0)});c(b,"updateJSView",function(a,b){if(null!=this.html5Applet){var c=this.html5Applet,e=!0;(e=null!=c&&null!=c._viewSet)&&this.html5Applet._atomPickedCallback(a,b)}},"~N,~N");f(b,"evalFile",function(a){return this.evalFileArgs(a,null)},"~S");f(b,"evalFileArgs",function(a,b){return this.allowScripting&&null!=this.getScriptManager()?this.scm.evalFileArgs(a,b):null},"~S,~S");c(b,"getInsertedCommand",function(){var a=this.insertedCommand;this.insertedCommand="";JU.Logger.debugging&&""!==a&&JU.Logger.debug("inserting: "+
a);return a});f(b,"script",function(a){return this.evalStringQuietSync(a,!1,!0)},"~S");f(b,"evalString",function(a){return this.evalStringQuietSync(a,!1,!0)},"~S");f(b,"evalStringQuiet",function(a){return this.evalStringQuietSync(a,!0,!0)},"~S");c(b,"evalStringQuietSync",function(a,b,c){return null==this.getScriptManager()?null:this.scm.evalStringQuietSync(a,b,c)},"~S,~B,~B");c(b,"clearScriptQueue",function(){null!=this.scm&&this.scm.clearQueue()});c(b,"setScriptQueue",function(a){(this.g.useScriptQueue=
a)||this.clearScriptQueue()},"~B");f(b,"checkHalt",function(a,b){return null!=this.scm&&this.scm.checkHalt(a,b)},"~S,~B");f(b,"scriptWait",function(a){return this.evalWait("JSON",a,"+scriptStarted,+scriptStatus,+scriptEcho,+scriptTerminated")},"~S");f(b,"scriptWaitStatus",function(a,b){return this.evalWait("object",a,b)},"~S,~S");c(b,"evalWait",function(a,b,c){if(null==this.getScriptManager())return null;this.scm.waitForQueue();var e=J.i18n.GT.setDoTranslate(!1);a=this.evalStringWaitStatusQueued(a,
b,c,!1,!1);J.i18n.GT.setDoTranslate(e);return a},"~S,~S,~S");c(b,"exitJmol",function(){if(!this.isApplet||this.isJNLP){if(null!=this.headlessImageParams)try{this.headless&&this.outputToFile(this.headlessImageParams)}catch(a){if(!E(a,Exception))throw a;}JU.Logger.debugging&&JU.Logger.debug("exitJmol -- exiting");System.out.flush();System.exit(0)}});c(b,"scriptCheckRet",function(a,b){return null==this.getScriptManager()?null:this.scm.scriptCheckRet(a,b)},"~S,~B");f(b,"scriptCheck",function(a){return this.scriptCheckRet(a,
!1)},"~S");f(b,"isScriptExecuting",function(){return null!=this.eval&&this.eval.isExecuting()});f(b,"haltScriptExecution",function(){null!=this.eval&&(this.eval.haltExecution(),this.eval.stopScriptThreads());this.setStringPropertyTok("pathForAllFiles",545259572,"");this.clearTimeouts()});c(b,"pauseScriptExecution",function(){null!=this.eval&&this.eval.pauseExecution(!0)});c(b,"resolveDatabaseFormat",function(a){return JV.Viewer.hasDatabasePrefix(a)||0<=a.indexOf("cactus.nci.nih.gov/chemical/structure")?
this.setLoadFormat(!1,a,a.charAt(0),!1):a},"~S");b.hasDatabasePrefix=c(b,"hasDatabasePrefix",function(a){return 0!=a.length&&JV.Viewer.isDatabaseCode(a.charAt(0))},"~S");b.isDatabaseCode=c(b,"isDatabaseCode",function(a){return"*"==a||"$"==a||"="==a||":"==a},"~S");c(b,"setLoadFormat",function(a,b,c,e){var g=null,j=b.substring(1),f="";b.endsWith("#_DOCACHE_")&&(f="#_DOCACHE_",b=b.substring(0,b.length-f.length),j=j.substring(0,j.length-f.length));switch(c.charCodeAt(0)){case 99:return b+f;case 104:return this.g.checkCIR&&
this.checkCIR(!1),this.g.nihResolverFormat+b.substring(b.indexOf("/structure")+10)+f;case 61:if(b.startsWith("==")){if(j=j.substring(1),j.equals("?")&&null==(j=this.getDBID("chemical component from RCSB")))return null}else{if(j.equals("?")&&null==(j=this.getDBID("PDB ID from RCSB")))return null;if(0<j.indexOf("/")){try{var l=j.indexOf("/"),m=j.substring(0,l),j=j.substring(l+1);m.equalsIgnoreCase("aflowlib")&&(c=1,l=j.indexOf("."),0<=l&&(c=JU.PT.parseInt(j.substring(l+1)),j=j.substring(0,l)),0>j.indexOf("_")&&
(j=this.getSymTemp().getSpaceGroupJSON("AFLOWLIB",j,c)));j=JV.JC.resolveDataBase(m,j,null);null!=j&&j.startsWith("'")&&(j=this.evaluateExpression(j).toString());b=null==j||0==j.length?b:j}catch(n){if(!E(n,Exception))throw n;}return b+f}b=null;!a&&j.endsWith(".bcif")&&(j=j.substring(0,j.indexOf(".bcif")),b=JV.JC.resolveDataBase("bcif",j.toLowerCase(),null));j.endsWith(".mmtf")&&(j=j.substring(0,j.indexOf(".mmtf")),b=JV.JC.resolveDataBase("mmtf",j.toUpperCase(),null));if(null!=b)return b+f;g=this.g.loadFormat}case 35:return null==
g&&(g=this.g.pdbLoadLigandFormat),JV.JC.resolveDataBase(null,j,g)+f;case 42:if(j.equals("?")&&null==(j=this.getDBID("PDB ID from EBI")))return null;c=null;l=b.lastIndexOf("/");b.startsWith("*dom/")?(j=b.substring(l+1),g=4<l?b.substring(5):"mappings",c=JU.PT.rep(JV.JC.resolveDataBase("map",j,null),"%TYPE",g)):b.startsWith("*val/")?(j=b.substring(l+1),g=4<l?b.substring(5):"validation/outliers/all",c=JU.PT.rep(JV.JC.resolveDataBase("map",j,null),"%TYPE",g)):b.startsWith("*rna3d/")?(j=b.substring(l+1),
g=6<l?b.substring(6):"loops",c=JU.PT.rep(JV.JC.resolveDataBase("rna3d",j,null),"%TYPE",g)):b.startsWith("*dssr--")?(j=b.substring(l+1),j=JV.JC.resolveDataBase("dssr",j,null),c=j+"%20"+JU.PT.rep(b.substring(5,l)," ","%20")):b.startsWith("*dssr/")?(j=b.substring(l+1),c=JV.JC.resolveDataBase("dssr",j,null)):b.startsWith("*dssr1/")&&(j=b.substring(l+1),c=JV.JC.resolveDataBase("dssr1",j,null));if(null!=c)return c+f;l="pdbe";5==j.length&&"*"==j.charAt(4)&&(l="pdbe2",j=j.substring(0,4));return JV.JC.resolveDataBase(l,
j,null)+f;case 58:g=this.g.pubChemFormat;if(j.equals("?")&&null==(j=this.getDBID("structure from PubChem")))return null;if(""===j)try{j="smiles:"+this.getOpenSmiles(this.bsA())}catch(q){if(!E(q,Exception))throw q;}l=j.toLowerCase();c=-2147483648;try{c=Integer.parseInt(j)}catch(v){if(!E(v,Exception))throw v;}-2147483648!=c?j="cid/"+c:l.startsWith("smiles:")?(g+="?POST?smiles="+j.substring(7),j="smiles"):j.startsWith("inchi:")?(g+="?POST?inchi="+j.substring(6),j="inchi"):j.startsWith("cid:")||j.startsWith("inchikey:")||
j.startsWith("cas:")?j=j.$replace(":","/"):(l.startsWith("name:")&&(j=j.substring(5)),j="name/"+JU.PT.escapeUrl(j));return JU.PT.formatStringS(g,"FILE",j)+f;case 36:this.checkCIR(!1);if(j.equals("?")&&null==(j=this.getDBID("structure from NCI/CADD")))return null;if(b.equals("$"))try{j=this.getOpenSmiles(this.bsA())}catch(r){if(!E(r,Exception))throw r;}else if(b.startsWith("$$")){j=j.substring(1);if(0==j.length)try{j=this.getOpenSmiles(this.bsA())}catch(s){if(!E(s,Exception))throw s;}j=JU.PT.escapeUrl(j);
return JV.JC.resolveDataBase("smiles2d",j,null)+f}case 77:case 78:case 50:case 73:case 75:case 83:case 84:case 47:j=JU.PT.escapeUrl(j);switch(c.charCodeAt(0)){case 77:case 78:g=this.g.nihResolverFormat+"/%FILE/names";break;case 50:g=this.g.nihResolverFormat+"/%FILE/image";break;case 73:case 84:g=this.g.nihResolverFormat+"/%FILE/file?format=stdinchi";break;case 75:case 83:g=this.g.nihResolverFormat+"/%FILE/stdinchikey";break;case 47:g=this.g.nihResolverFormat+"/%FILE/";break;default:g=this.g.smilesUrlFormat}return(e?
"MOL3D::":"")+JU.PT.formatStringS(g,"FILE",j)+f;case 63:case 45:case 95:(b=j.startsWith("*")||j.startsWith("="))&&(j=j.substring(1));g=null;l=j.indexOf(".");0<=l&&(g=j.substring(l+1),j=j.substring(0,l));(m=j.startsWith("density"))&&(j="em"+j.substring(7));if(j.equals("emdb")||j.equals("em"))j+="/";j.startsWith("em/")&&(j="emdb"+j.substring(2));if(j.startsWith("emdb/")){j=j.substring(5);0==j.length?j="=":j.startsWith("*")&&(j="="+j.substring(1));a="#-sigma=10";if(j.startsWith("=")){j=j.equals("=")?
this.getPdbID():j.substring(1);if(null==j||"?"==c)return j;l=JV.JC.resolveDataBase("emdbquery",j,null);e=this.fm.cacheGet(l,!1);if(null==e){this.showString("retrieving "+l,!1);e=this.getFileAsString(l);if(null==e){this.showString("EM retrieve failed for "+j,!1);if(!m)return null;e="FAILED"}else this.showString(e,!1);this.fm.cachePut(l,e)}l=e.indexOf("EMD-");if(0<=l)j=e.substring(l+4),l=j.indexOf("\n"),0<l&&(j=j.substring(0,l)),l=j.indexOf(","),0<l&&(a="#-cutoff="+j.substring(l+1),j=j.substring(0,
l));else{if(!m)return null;a=null}}if(null!=a)return JV.JC.resolveDataBase("emdbmap"+("-"==c?"server":""),j,null)+a+f}j=JV.JC.resolveDataBase((b?"pdbemapdiff":"pdbemap")+("-"==c?"server":""),j,null);"cif".equals(g)&&(j=j.$replace("bcif","cif"))}return j+f},"~B,~S,~S,~B");c(b,"getDBID",function(a){return this.prompt("load a "+a,"",!1)},"~S");c(b,"checkCIR",function(a){if(!(this.cirChecked&&!a||null==this.g.resolverResolver)){try{this.g.removeParam("_cirStatus");var b=this.getModelSetAuxiliaryInfo();
b.remove("cirInfo");var c=this.parseJSONMap(this.getFileAsString(this.g.resolverResolver));b.put("cirInfo",c);this.ms.msInfo=b;var e=c.get("status");this.g.setO("_cirStatus",e);this.g.setCIR(c.get("rfc6570Template"),!this.isSilent);this.isSilent||JU.Logger.info("Viewer.checkCIR _.cirInfo.status = "+e)}catch(g){System.out.println("Viewer.checkCIR failed at "+this.g.resolverResolver+": "+g)}this.cirChecked=!0}},"~B");c(b,"getStandardLabelFormat",function(a){switch(a){default:case 0:return"%[identify]";
case 1:return this.g.defaultLabelXYZ;case 2:return this.g.defaultLabelPDB}},"~N");c(b,"getAdditionalHydrogens",function(a,b,c){null==a&&(a=this.bsA());var e=D(1,0);a=this.ms.calculateHydrogens(a,e,b,c);e=Array(e[0]);for(c=b=0;b<a.length;b++)if(null!=a[b])for(var g=0;g<a[b].length;g++)e[c++]=a[b][g];return e},"JU.BS,JU.Lst,~N");f(b,"setMarBond",function(a){this.g.bondRadiusMilliAngstroms=a;this.g.setI("bondRadiusMilliAngstroms",a);this.setShapeSize(1,2*a,JU.BSUtil.setAll(this.ms.ac))},"~N");c(b,"setHoverLabel",
function(a){this.shm.loadShape(35);this.setShapeProperty(35,"label",a);this.setHoverEnabled(null!=a);this.g.setO("_hoverLabel",this.hoverLabel=a);!this.hoverEnabled&&!this.sm.haveHoverCallback()&&this.startHoverWatcher(!1)},"~S");c(b,"setHoverEnabled",function(a){this.hoverEnabled=a;this.g.setB("_hoverEnabled",a)},"~B");c(b,"hoverOn",function(a,b){this.hoverOnPtr(a,b,!1)},"~N,~B");c(b,"hoverOnPtr",function(a,b,c){if(0>a)this.hoverOff();else if(this.g.removeParam("_objecthovered"),this.g.setI("_atomhovered",
a),this.g.setO("_hoverLabel",this.hoverLabel),this.g.setUserVariable("hovered",JS.SV.getVariable(JU.BSUtil.newAndSetBit(a))),this.sm.haveHoverCallback()&&this.sm.setStatusAtomHovered(a,this.getAtomInfoXYZ(a,2)),this.hoverEnabled&&!(null!=this.eval&&this.isScriptExecuting()||a==this.hoverAtomIndex||0==this.g.hoverDelayMs||!this.slm.isInSelectionSubset(a))){var e=b?J.i18n.GT.$("Drag to move label"):this.isModelKitOpen()||this.isModelkitPickingActive()?this.getModelkit(!1).setProperty("hoverlabel",Integer.$valueOf(a)):
null;this.shm.loadShape(35);null!=e&&(!b||this.ms.at[a].isVisible(512))&&this.setShapeProperty(35,"specialLabel",e);this.setShapeProperty(35,"pointer",Boolean.$valueOf(c));this.setShapeProperty(35,"text",this.hoverText=null);this.setShapeProperty(35,"target",Integer.$valueOf(this.hoverAtomIndex=a));this.refresh(3,"hover on atom")}},"~N,~B,~B");c(b,"showHover",function(){return!this.tm.isNavigating()&&(!this.am.splitFrame||this.am.currentSplitFrame==this.tm.splitFrameCurrentlyRendering)});c(b,"isModelkitPickingActive",
function(){if(32==this.acm.getAtomPickingMode())return!0;switch(this.acm.getBondPickingMode()){case 34:case 33:case 8:case 35:return this.g.bondPicking}return!1});c(b,"isModelkitPickingRotateBond",function(){return null!=this.acm&&34==this.acm.getBondPickingMode()});c(b,"hoverOnPt",function(a,b,c,e,g){null!=this.eval&&this.isScriptExecuting()||(this.g.setO("_hoverLabel",c),null!=e&&null!=g&&(this.g.setO("_objecthovered",e),this.g.setI("_atomhovered",-1),this.g.setUserVariable("hovered",JS.SV.getVariable(g)),
this.sm.haveHoverCallback()&&this.sm.setStatusObjectHovered(e,c,g)),this.hoverEnabled&&(this.shm.loadShape(35),this.gdata.antialiasEnabled&&(a<<=1,b<<=1),this.setShapeProperty(35,"xy",JU.P3i.new3(a,b,0)),this.setShapeProperty(35,"target",null),this.setShapeProperty(35,"specialLabel",null),this.setShapeProperty(35,"text",c),this.hoverAtomIndex=-1,this.hoverText=c,this.refresh(3,"hover on point")))},"~N,~N,~S,~S,JU.T3");c(b,"hoverOff",function(){try{if((this.isModelKitOpen()||null!=this.modelkit&&this.modelkit.wasRotating())&&
!this.isModelkitPickingRotateBond()&&this.highlight(null),this.hoverEnabled){var a=null!=this.hoverText||0<=this.hoverAtomIndex;0<=this.hoverAtomIndex&&(this.setShapeProperty(35,"target",null),this.hoverAtomIndex=-1,this.sm.haveHoverCallback()&&this.sm.setStatusAtomHovered(-1,null));null!=this.hoverText&&(this.setShapeProperty(35,"text",null),this.hoverText=null);this.setShapeProperty(35,"specialLabel",null);a&&this.refresh(3,"hover off")}}catch(b){if(!E(b,Exception))throw b;}});f(b,"setDebugScript",
function(a){this.g.debugScript=a;this.g.setB("debugScript",a);null!=this.eval&&this.eval.setDebugging()},"~B");c(b,"clearClickCount",function(){this.setTainted(!0)});c(b,"setCursor",function(a){if(!this.$isKiosk&&!(this.currentCursor==a||this.multiTouch||!this.haveDisplay))this.apiPlatform.setCursor(this.currentCursor=a,this.display)},"~N");c(b,"setPickingMode",function(a,b){if(this.haveDisplay){var c=this.acm.getAtomPickingMode();this.showSelected=!1;var e=null;if(null!=a){var g=a.indexOf("_");0<=
g&&(e=a.substring(g+1),a=a.substring(0,g));b=JV.ActionManager.getPickingMode(a)}0>b&&(b=1);this.acm.setPickingMode(b);g=JV.ActionManager.getPickingModeName(this.acm.getAtomPickingMode());this.g.setO("picking",g);if(null!=this.modelkit)switch(this.modelkit.setProperty("atompickingmode",g),this.acm.setPickingMode(b),b){case 1:b!=c&&this.setModelKitMode(!1);break;case 8:case 35:this.modelkit.setProperty("bondpickingmode",a.toLowerCase())}if(!(null==e||0==e.length))switch(e=Character.toUpperCase(e.charAt(0))+
(1==e.length?"":e.substring(1,2)),b){case 32:this.getModelkit(!1).setProperty("atomtype",e);break;case 33:this.setBooleanPropertyTok("bondPicking",603979814,!0);this.getModelkit(!1).setProperty("bondtype",e);break;default:JU.Logger.error("Bad picking mode: "+a+"_"+e)}}},"~S,~N");c(b,"getPickingMode",function(){return this.haveDisplay?this.acm.getAtomPickingMode():0});c(b,"setPickingStyle",function(a,b){this.haveDisplay&&(null!=a&&(b=JV.ActionManager.getPickingStyleIndex(a)),0>b&&(b=0),this.acm.setPickingStyle(b),
this.g.setO("pickingStyle",JV.ActionManager.getPickingStyleName(this.acm.getPickingStyle())))},"~S,~N");c(b,"getDrawHover",function(){return this.haveDisplay&&this.g.drawHover});c(b,"getAtomInfo",function(a){null==this.ptTemp&&(this.ptTemp=new JU.P3);return 0<=a?this.ms.getAtomInfo(a,null,this.ptTemp):this.shm.getShapePropertyIndex(6,"pointInfo",-a)},"~N");c(b,"getAtomInfoXYZ",function(a,b){var c=this.ms.at[a];if(4==b)return this.getChimeMessenger().getInfoXYZ(c);null==this.ptTemp&&(this.ptTemp=new JU.P3);
return c.getIdentityXYZ(this.ptTemp,b)},"~N,~N");c(b,"setSync",function(){this.sm.doSync()&&this.sm.setSync(null)});f(b,"setJmolCallbackListener",function(a){this.sm.cbl=a},"J.api.JmolCallbackListener");f(b,"setJmolStatusListener",function(a){this.sm.cbl=this.sm.jsl=a},"J.api.JmolStatusListener");c(b,"getStatusChanged",function(a){return null==a?null:this.sm.getStatusChanged(a)},"~S");c(b,"menuEnabled",function(){return!this.g.disablePopupMenu&&null!=this.getPopupMenu()});c(b,"setStatusDragDropped",
function(a,b,c,e,g){0==a&&(this.g.setO("_fileDropped",e),this.g.setUserVariable("doDrop",JS.SV.vT),this.g.setUserVariable("dropFileType",JS.SV.newS("")),this.g.setUserVariable("dropFileName",JS.SV.newS(e)));a=this.sm.setStatusDragDropped(a,b,c,e,g);b=this.getP("dropFileType").toString();0<b.length&&null!=g&&(g[0]=b);return!a||this.getP("doDrop").toString().equals("true")},"~N,~N,~N,~S,~A");c(b,"setStatusResized",function(a,b){this.sm.setStatusResized(a,b)},"~N,~N");c(b,"scriptStatus",function(a){this.setScriptStatus(a,
"",0,null)},"~S");c(b,"scriptStatusMsg",function(a,b){this.setScriptStatus(a,b,0,null)},"~S,~S");c(b,"setScriptStatus",function(a,b,c,e){this.sm.setScriptStatus(a,b,c,e)},"~S,~S,~N,~S");f(b,"showUrl",function(a){if(null!=a){if(0>a.indexOf(":")){var b=this.fm.getAppletDocumentBase();""===b&&(b=this.fm.getFullPathName(!1));0<=b.indexOf("/")?b=b.substring(0,b.lastIndexOf("/")+1):0<=b.indexOf("\\")&&(b=b.substring(0,b.lastIndexOf("\\")+1));a=b+a}JU.Logger.info("showUrl:"+a);this.sm.showUrl(a)}},"~S");
c(b,"setMeshCreator",function(a){this.shm.loadShape(24);this.setShapeProperty(24,"meshCreator",a)},"~O");c(b,"showConsole",function(a){if(this.haveDisplay)try{null==this.appConsole&&a&&this.getConsole(),this.appConsole.setVisible(!0)}catch(b){}},"~B");c(b,"getConsole",function(){var a=null==this.sm.cbl&&null==this.appConsole;this.getProperty("DATA_API","getAppConsole",Boolean.TRUE);a&&C(this.appConsole,"J.api.JmolCallbackListener")&&this.setJmolCallbackListener(this.appConsole);return this.appConsole});
f(b,"getParameter",function(a){return this.getP(a)},"~S");c(b,"getP",function(a){return this.g.getParameter(a,!0)},"~S");c(b,"getPOrNull",function(a){return this.g.getParameter(a,!1)},"~S");c(b,"unsetProperty",function(a){a=a.toLowerCase();(a.equals("all")||a.equals("variables"))&&this.fm.setPathForAllFiles("");this.g.unsetUserVariable(a)},"~S");f(b,"notifyStatusReady",function(a){System.out.println("Jmol applet "+this.fullName+(a?" ready":" destroyed"));a||this.dispose();this.sm.setStatusAppletReady(this.fullName,
a)},"~B");f(b,"getBooleanProperty",function(a){a=a.toLowerCase();if(this.g.htBooleanParameterFlags.containsKey(a))return this.g.htBooleanParameterFlags.get(a).booleanValue();if(a.endsWith("p!")){if(null==this.acm)return!1;var b=this.acm.getPickingState().toLowerCase();a=a.substring(0,a.length-2)+";";return 0<=b.indexOf(a)}if(a.equalsIgnoreCase("executionPaused"))return null!=this.eval&&this.eval.isPaused();if(a.equalsIgnoreCase("executionStepping"))return null!=this.eval&&this.eval.isStepping();if(a.equalsIgnoreCase("haveBFactors"))return null!=
this.ms.getBFactors();if(a.equalsIgnoreCase("colorRasmol"))return this.cm.isDefaultColorRasmol;if(a.equalsIgnoreCase("frank"))return this.getShowFrank();if(a.equalsIgnoreCase("spinOn"))return this.tm.spinOn;if(a.equalsIgnoreCase("isNavigating"))return this.tm.isNavigating();if(a.equalsIgnoreCase("showSelections"))return this.selectionHalosEnabled;if(this.g.htUserVariables.containsKey(a)){b=this.g.getUserVariable(a);if(1073742335==b.tok)return!0;if(1073742334==b.tok)return!1}JU.Logger.error("vwr.getBooleanProperty("+
a+") - unrecognized");return!1},"~S");f(b,"getInt",function(a){switch(a){case 553648159:return this.g.occupancyThreshold;case 553648132:return this.am.animationFps;case 553648139:return this.g.dotDensity;case 553648140:return this.g.dotScale;case 553648142:return this.g.helixStep;case 553648145:return this.g.infoFontSize;case 553648147:return this.g.labelPointerWidth;case 553648149:return this.g.meshScale;case 553648150:return this.g.minimizationReportSteps;case 553648153:return this.g.minPixelSelRadius;
case 553648154:return this.g.percentVdwAtom;case 553648157:return this.g.pickingSpinRate;case 553648166:return this.g.ribbonAspectRatio;case 536870922:return this.g.scriptDelay;case 553648152:return this.g.minimizationMaxAtoms;case 553648170:return this.g.smallMoleculeMaxAtoms;case 553648183:return this.g.strutSpacing;case 553648184:return this.stm.getUndoMax();case 553648185:return this.g.vectorTrail}JU.Logger.error("viewer.getInt("+JS.T.nameOf(a)+") - not listed");return 0},"~N");c(b,"getDelayMaximumMs",
function(){return this.haveDisplay?this.g.delayMaximumMs:1});c(b,"getHermiteLevel",function(){return this.tm.spinOn&&0<this.g.hermiteLevel?0:this.g.hermiteLevel});c(b,"getHoverDelay",function(){return this.isModelKitOpen()||this.isModelkitPickingActive()||this.getDrawHover()?20:this.g.hoverDelayMs});f(b,"getBoolean",function(a){switch(a){case 603979970:return this.g.useMinimizationThread;case 603979891:return this.g.nboCharges;case 603979856:return this.g.hiddenLinesDashed;case 1073742086:return this.ms.getMSInfoB(JV.JC.getBoolName(4));
case 603979802:return this.g.autoplayMovie;case 603979797:return!this.headless&&this.g.allowAudio;case 603979780:return this.g.allowGestures;case 603979784:return this.g.allowMultiTouch;case 603979785:return this.g.allowRotateSelected;case 603979792:return this.g.appendNew;case 603979794:return this.g.applySymmetryToBonds;case 603979796:return this.g.atomPicking;case 603979798:return this.g.autoBond;case 603979800:return this.g.autoFps;case 603979806:return this.g.axesOrientationRasmol;case 603979811:return this.g.cartoonSteps;
case 603979810:return this.g.cartoonBlocks;case 603979812:return this.g.bondModeOr;case 603979815:return this.g.cartoonBaseEdges;case 603979816:return this.g.cartoonFancy;case 603979817:return this.g.cartoonLadders;case 603979818:return this.g.cartoonRibose;case 603979819:return this.g.cartoonRockets;case 603979822:return this.g.chainCaseSensitive||this.chainCaseSpecified;case 603979821:return this.g.checkCIR;case 603979823:return this.g.cipRule6Full;case 603979825:return this.g.debugScript;case 603979826:return this.g.defaultStructureDSSP;
case 603979827:return this.g.disablePopupMenu;case 603979828:return this.g.displayCellParameters;case 603979830:return this.g.dotSurface;case 603979829:return this.g.dotsSelectedOnly;case 603979831:return this.g.doublePrecision;case 603979834:return this.g.drawPicking;case 603979838:return this.g.elementKey;case 603979846:return this.g.fontCaching;case 603979847:return this.g.fontScaling;case 603979848:return this.g.forceAutoBond;case 603979849:return!1;case 603979850:return this.g.greyscaleRendering;
case 603979852:return this.g.hbondsBackbone;case 603979853:return this.g.hbondsRasmol;case 603979854:return this.g.hbondsSolid;case 1612709894:return this.g.rasmolHeteroSetting;case 603979858:return this.g.hideNameInPopup;case 603979863:return this.g.highResolutionFlag;case 1612709900:return this.g.rasmolHydrogenSetting;case 603979866:return this.g.isosurfaceKey;case 603979868:return this.g.jmolInJSpecView;case 603979869:return this.g.justifyMeasurements;case 603979872:return this.g.legacyAutoBonding;
case 603979873:return this.g.legacyHAddition;case 603979874:return this.g.legacyJavaFloat;case 603979876:return this.g.logGestures;case 603979877:return this.g.measureAllModels;case 603979878:return this.g.measurementLabels;case 603979879:return this.g.messageStyleChime;case 603979882:return this.g.mode2d;case 603983903:return this.g.modelKitMode;case 603979886:return this.g.multipleBondBananas;case 603979889:return this.g.navigationMode;case 603979890:return this.g.navigationPeriodic;case 603979893:return this.g.partialDots;
case 603979894:return this.g.pdbAddHydrogens;case 603979896:return this.g.pdbSequential;case 603979898:return this.g.preserveState;case 603979900:return this.refreshing;case 603979901:return this.g.ribbonBorder;case 603979902:return this.g.rocketBarrels;case 603979892:return this.g.noDelay;case 603979906:return this.g.selectAllModels;case 603979920:return this.g.showHiddenSelectionHalos;case 603979922:return this.g.showHydrogens;case 603979926:return this.g.showMeasurements;case 603979927:return this.g.showModVecs;
case 603979928:return this.g.showMultipleBonds;case 603979934:return this.g.showTiming;case 603979937:return this.g.showUnitCellDetails;case 603979939:return this.g.slabByAtom;case 603979940:return this.g.slabByMolecule;case 603979944:return this.g.smartAromatic;case 603979948:return this.g.dotSolvent;case 603979952:return this.g.ssbondsBackbone;case 603979955:return this.g.strutsMultiple;case 603979956:return this.g.symmetryHermannMauguin;case 603979960:return this.g.testFlag1;case 603979962:return this.g.testFlag2;
case 603979964:return this.g.testFlag3;case 603979965:return this.g.testFlag4;case 603979966:return this.g.traceAlpha;case 1111490588:return this.g.translucent;case 603979968:return this.g.twistedSheets;case 603979972:return this.g.vectorsCentered;case 603979973:return this.g.vectorSymmetry;case 603979975:return this.g.waitForMoveTo;case 603979978:return this.g.zeroBasedXyzRasmol}JU.Logger.error("viewer.getBoolean("+JS.T.nameOf(a)+") - not listed");return!1},"~N");c(b,"allowEmbeddedScripts",function(){return this.g.allowEmbeddedScripts&&
!this.isPreviewOnly});c(b,"getDragSelected",function(){return this.g.dragSelected&&!this.g.modelKitMode});c(b,"getBondsPickable",function(){return this.g.bondPicking||this.isModelkitPickingActive()||this.isModelKitOpen()&&this.getModelkitPropertySafely("ismolecular")===Boolean.TRUE});c(b,"isModelKitOpen",function(){return this.g.modelKitMode&&null!=this.modelkit&&!this.modelkit.isHidden()});c(b,"useMinimizationThread",function(){return this.g.useMinimizationThread&&!this.autoExit});f(b,"getFloat",
function(a){switch(a){case 1153433601:return this.g.particleRadius;case 570425345:return this.g.axesOffset;case 570425346:return this.g.axesScale;case 570425348:return this.g.bondTolerance;case 570425353:return this.g.defaultTranslucent;case 570425352:return this.g.defaultDrawArrowScale;case 570425354:return this.g.dipoleScale;case 570425355:return this.g.drawFontSize;case 570425357:return this.g.exportScale;case 570425359:return this.g.hbondsAngleMinimum;case 570425361:return this.g.hbondHXDistanceMaximum;
case 570425360:return this.g.hbondNODistanceMaximum;case 570425363:return this.g.loadAtomDataTolerance;case 570425364:return this.g.minBondDistance;case 1275072532:return this.g.modulationScale;case 570425370:return this.g.multipleBondSpacing;case 570425369:return this.g.multipleBondRadiusFactor;case 570425374:return this.g.navigationSpeed;case 570425382:return this.g.pointGroupDistanceTolerance;case 570425384:return this.g.pointGroupLinearTolerance;case 570425388:return this.tm.modelRadius;case 570425392:return this.g.sheetSmoothing;
case 570425394:return this.g.solventProbeRadius;case 570425403:return this.g.starWidth;case 570425406:return this.g.strutDefaultRadius;case 570425408:return this.g.strutLengthMaximum;case 1648361473:return this.g.vectorScale;case 570425412:return this.g.vibrationPeriod;case 570425347:return this.g.cartoonBlockHeight}JU.Logger.error("viewer.getFloat("+JS.T.nameOf(a)+") - not listed");return 0},"~N");f(b,"setStringProperty",function(a,b){if(!(null==b||null==a||0==a.length))if("_"==a.charAt(0))this.g.setO(a,
b);else{var c=JS.T.getTokFromName(a);switch(JS.T.getParamType(c)){case 603979776:this.setBooleanPropertyTok(a,c,JS.SV.newV(4,b).asBoolean());break;case 553648128:this.setIntPropertyTok(a,c,JS.SV.newV(4,b).asInt());break;case 570425344:"NaN".equals(b)||this.setFloatPropertyTok(a,c,JU.PT.parseFloat(b));break;default:this.setStringPropertyTok(a,c,b)}}},"~S,~S");c(b,"setStringPropertyTok",function(a,b,c){switch(b){case 545259567:this.g.macroDirectory=c=null==c||0==c.length?"https://chemapps.stolaf.edu/jmol/macros":
c;this.macros=null;break;case 545259570:this.g.nihResolverFormat=c;break;case 545259521:this.setAnimationMode(c);return;case 545259569:this.g.nmrPredictFormat=c;break;case 545259548:this.g.defaultDropScript=c;break;case 545259572:c=this.fm.setPathForAllFiles(c);break;case 545259558:this.setUnits(c,!1);return;case 545259560:this.g.forceField.equals(c)||(this.g.forceField=c="UFF".equalsIgnoreCase(c)?"UFF":"UFF2D".equalsIgnoreCase(c)?"UFF2D":"MMFF2D".equalsIgnoreCase(c)?"MMFF2D":"MMFF",this.minimizer=
null);break;case 545259571:this.g.nmrUrlFormat=c;break;case 545259568:this.setUnits(c,!0);return;case 545259565:this.g.pdbLoadLigandFormat=c;break;case 545259543:this.g.defaultLabelPDB=c;break;case 545259544:this.g.defaultLabelXYZ=c;break;case 545259549:this.g.defaultLoadFilter=c;break;case 545259566:c=this.getOutputManager().setLogFile(c);if(null==c)return;break;case 545259559:break;case 545259524:this.g.atomTypes=c;break;case 545259538:break;case 545259576:this.g.pickLabel=c;break;case 545259580:this.g.quaternionFrame=
2==c.length&&c.startsWith("R")?c.substring(0,2):""+(c.toLowerCase()+"p").charAt(0);JU.PT.isOneOf(this.g.quaternionFrame,"RC;RP;a;b;c;n;p;q;x;")||(this.g.quaternionFrame="p");this.ms.haveStraightness=!1;break;case 545259555:this.setVdwStr(c);return;case 545259563:new J.i18n.GT(this,c);b=J.i18n.GT.getLanguage();this.modelkit=null;null!=this.jmolpopup&&(this.jmolpopup.jpiDispose(),this.jmolpopup=null,this.getPopupMenu());this.sm.setCallbackFunction("language",b);c=J.i18n.GT.getLanguage();break;case 545259564:this.g.loadFormat=
c;break;case 545259534:this.setObjectColor("background",c);return;case 545259528:this.setObjectColor("axis1",c);return;case 545259530:this.setObjectColor("axis2",c);return;case 545259532:this.setObjectColor("axis3",c);return;case 545259536:this.setObjectColor("boundbox",c);return;case 545259586:this.setObjectColor("unitcell",c);return;case 545259578:this.setPropertyColorScheme(c,!1,!1);break;case 545259562:this.shm.loadShape(35);this.setShapeProperty(35,"atomLabel",c);break;case 545259547:this.g.defaultDistanceLabel=
c;break;case 545259542:this.g.defaultAngleLabel=c;break;case 545259554:this.g.defaultTorsionLabel=c;break;case 545259550:this.g.defaultLoadScript=c;break;case 545259522:this.fm.setAppletProxy(c);break;case 545259546:null==c&&(c="");c=c.$replace("\\","/");this.g.defaultDirectory=c;break;case 545259561:this.g.helpPath=c;break;case 545259552:!c.equalsIgnoreCase("RasMol")&&!c.equalsIgnoreCase("PyMOL")&&(c="Jmol");this.setDefaultsType(c);break;case 545259545:this.setDefaultColors(c.equalsIgnoreCase("rasmol"));
return;case 545259573:this.setPickingMode(c,0);return;case 545259574:this.setPickingStyle(c,0);return;case 545259540:break;default:if(a.toLowerCase().endsWith("callback")){this.sm.setCallbackFunction(a,0==c.length||c.equalsIgnoreCase("none")?null:c);break}if(!this.g.htNonbooleanParameterValues.containsKey(a.toLowerCase())){this.g.setUserVariable(a,JS.SV.newV(4,c));return}}this.g.setO(a,c)},"~S,~N,~S");f(b,"setFloatProperty",function(a,b){if(!(null==a||0==a.length))if("_"==a.charAt(0))this.g.setF(a,
b);else{var c=JS.T.getTokFromName(a);switch(JS.T.getParamType(c)){case 545259520:this.setStringPropertyTok(a,c,""+b);break;case 603979776:this.setBooleanPropertyTok(a,c,0!=b);break;case 553648128:this.setIntPropertyTok(a,c,F(b));break;case 570425344:if(Float.isNaN(b))break;default:this.setFloatPropertyTok(a,c,b)}}},"~S,~N");c(b,"setFloatPropertyTok",function(a,b,c){switch(b){case 570425347:this.g.cartoonBlockHeight=c;break;case 570425366:this.ms.setModulation(null,!1,null,!1);this.g.modulationScale=
c=Math.max(0.1,c);this.ms.setModulation(null,!0,null,!1);break;case 570425381:this.g.particleRadius=Math.abs(c);break;case 570425355:this.g.drawFontSize=c;this.shm.setShapePropertyBs(22,"font",null,null);break;case 570425357:this.g.exportScale=c;break;case 570425403:this.g.starWidth=c;break;case 570425369:this.g.multipleBondRadiusFactor=c;break;case 570425370:this.g.multipleBondSpacing=c;break;case 570425393:this.tm.setSlabRange(c);break;case 570425365:this.g.minimizationCriterion=c;break;case 570425358:this.haveDisplay&&
this.acm.setGestureSwipeFactor(c);break;case 570425367:this.haveDisplay&&this.acm.setMouseDragFactor(c);break;case 570425368:this.haveDisplay&&this.acm.setMouseWheelFactor(c);break;case 570425408:this.g.strutLengthMaximum=c;break;case 570425406:this.g.strutDefaultRadius=c;break;case 570425376:this.setSpin("X",F(c));break;case 570425378:this.setSpin("Y",F(c));break;case 570425380:this.setSpin("Z",F(c));break;case 570425371:if(Float.isNaN(c))return;this.setSpin("FPS",F(c));break;case 570425363:this.g.loadAtomDataTolerance=
c;break;case 570425359:this.g.hbondsAngleMinimum=c;break;case 570425361:this.g.hbondHXDistanceMaximum=c;break;case 570425360:this.g.hbondNODistanceMaximum=c;break;case 570425382:this.g.pointGroupDistanceTolerance=c;break;case 570425384:this.g.pointGroupLinearTolerance=c;break;case 570425356:this.g.ellipsoidAxisDiameter=c;break;case 570425398:this.setSpin("x",F(c));break;case 570425400:this.setSpin("y",F(c));break;case 570425402:this.setSpin("z",F(c));break;case 570425396:this.setSpin("fps",F(c));
break;case 570425352:this.g.defaultDrawArrowScale=c;break;case 570425353:this.g.defaultTranslucent=c;break;case 570425345:this.setAxesScale(b,c);break;case 570425346:this.setAxesScale(b,c);break;case 570425416:this.tm.visualRangeAngstroms=c;this.refresh(1,"set visualRange");break;case 570425372:this.setNavigationDepthPercent(c);break;case 570425374:this.g.navigationSpeed=c;break;case 570425373:this.tm.setNavigationSlabOffsetPercent(c);break;case 570425350:this.tm.setCameraDepthPercent(c,!1);this.refresh(1,
"set cameraDepth");return;case 570425388:this.setRotationRadius(c,!0);return;case 570425362:this.g.hoverDelayMs=F(1E3*c);break;case 570425392:this.g.sheetSmoothing=c;break;case 570425354:c=JV.Viewer.checkFloatRange(c,-10,10);this.g.dipoleScale=c;break;case 570425404:this.tm.setStereoDegrees(c);break;case 1648361473:this.setVectorScale(c);return;case 570425412:this.setVibrationPeriod(c);return;case 570425414:this.setVibrationScale(c);return;case 570425348:this.setBondTolerance(c);return;case 570425364:this.setMinBondDistance(c);
return;case 570425390:this.tm.setScaleAngstromsPerInch(c);break;case 570425394:c=JV.Viewer.checkFloatRange(c,0,10);this.g.solventProbeRadius=c;break;default:if(!this.g.htNonbooleanParameterValues.containsKey(a.toLowerCase())){this.g.setUserVariable(a,JS.SV.newF(c));return}}this.g.setF(a,c)},"~S,~N,~N");f(b,"setIntProperty",function(a,b){if(!(-2147483648==b||null==a||0==a.length))if("_"==a.charAt(0))this.g.setI(a,b);else{var c=JS.T.getTokFromName(a);switch(JS.T.getParamType(c)){case 545259520:this.setStringPropertyTok(a,
c,""+b);break;case 603979776:this.setBooleanPropertyTok(a,c,0!=b);break;case 570425344:this.setFloatPropertyTok(a,c,b);break;default:this.setIntPropertyTok(a,c,b)}}},"~S,~N");c(b,"setIntPropertyTok",function(a,b,c){switch(b){case 553648159:this.g.occupancyThreshold=c;break;case 553648150:this.g.minimizationReportSteps=Math.min(Math.max(c,1),20);break;case 553648184:this.stm.setUndoMax(c);break;case 553648147:this.g.labelPointerWidth=c;break;case 553648152:this.g.minimizationMaxAtoms=c;break;case 553648145:this.g.infoFontSize=
Math.max(0,c);break;case 553648167:case 553648144:case 553648168:c=this.eval.setStatic(b,c);break;case 553648185:this.g.vectorTrail=c;break;case 553648136:c=0==c?0:1;this.g.bondingVersion=JU.Elements.bondingVersion=c;break;case 553648135:this.gdata.setCelPower(c);break;case 553648129:this.gdata.setAmbientOcclusion(c);break;case 553648158:this.g.platformSpeed=Math.min(Math.max(c,0),10);break;case 553648149:this.g.meshScale=c;break;case 553648153:this.g.minPixelSelRadius=c;break;case 553648146:this.g.isosurfacePropertySmoothingPower=
c;break;case 553648165:this.g.repaintWaitMs=c;break;case 553648170:this.g.smallMoleculeMaxAtoms=c;break;case 553648151:this.g.minimizationSteps=c;break;case 553648183:this.g.strutSpacing=c;break;case 553648156:c=JV.Viewer.checkIntRange(c,0,1E3);this.gdata.setPhongExponent(c);break;case 553648142:this.g.helixStep=c;this.ms.haveStraightness=!1;break;case 553648140:this.g.dotScale=c;break;case 553648139:this.g.dotDensity=c;break;case 553648137:this.g.delayMaximumMs=c;break;case 553648148:JU.Logger.setLogLevel(c);
JU.Logger.info("logging level set to "+c);this.g.setI("logLevel",c);null!=this.eval&&this.eval.setDebugging();return;case 553648133:this.setAxesMode(2==c?603979808:1==c?603979804:603979809);return;case 553648178:this.setStrandCount(0,c);return;case 553648182:this.setStrandCount(12,c);return;case 553648180:this.setStrandCount(13,c);return;case 553648155:return;case 536870922:this.g.scriptDelay=c;break;case 553648176:c=0>c?JV.Viewer.checkIntRange(c,-10,-1):JV.Viewer.checkIntRange(c,0,100);this.gdata.setSpecularPower(c);
break;case 553648172:c=JV.Viewer.checkIntRange(-c,-10,-1);this.gdata.setSpecularPower(c);break;case 553648134:this.setMarBond(c);return;case 536870924:this.setBooleanPropertyTok(a,b,1==c);return;case 553648174:c=JV.Viewer.checkIntRange(c,0,100);this.gdata.setSpecularPercent(c);break;case 553648138:c=JV.Viewer.checkIntRange(c,0,100);this.gdata.setDiffusePercent(c);break;case 553648130:c=JV.Viewer.checkIntRange(c,0,100);this.gdata.setAmbientPercent(c);break;case 553648186:this.tm.zDepthToPercent(c);
break;case 553648188:this.tm.zSlabToPercent(c);break;case 554176526:this.tm.depthToPercent(c);break;case 554176565:this.tm.slabToPercent(c);break;case 553648190:this.g.zShadePower=c=Math.max(c,0);break;case 553648166:this.g.ribbonAspectRatio=c;break;case 553648157:this.g.pickingSpinRate=1>c?1:c;break;case 553648132:this.setAnimationFps(c);return;case 553648154:this.setPercentVdwAtom(c);break;case 553648143:this.g.hermiteLevel=c;break;case 553648141:case 553648161:case 553648160:case 553648162:case 553648164:break;
default:if(!this.g.htNonbooleanParameterValues.containsKey(a)){this.g.setUserVariable(a,JS.SV.newI(c));return}}this.g.setI(a,c)},"~S,~N,~N");b.checkIntRange=c(b,"checkIntRange",function(a,b,c){return a<b?b:a>c?c:a},"~N,~N,~N");b.checkFloatRange=c(b,"checkFloatRange",function(a,b,c){return a<b?b:a>c?c:a},"~N,~N,~N");f(b,"setBooleanProperty",function(a,b){if(!(null==a||0==a.length))if("_"==a.charAt(0))this.g.setB(a,b);else{var c=JS.T.getTokFromName(a);switch(JS.T.getParamType(c)){case 545259520:this.setStringPropertyTok(a,
c,"");break;case 553648128:this.setIntPropertyTok(a,c,b?1:0);break;case 570425344:this.setFloatPropertyTok(a,c,b?1:0);break;default:this.setBooleanPropertyTok(a,c,b)}}},"~S,~B");c(b,"setBooleanPropertyTok",function(a,b,c){var e=!0;switch(b){case 603979882:this.g.mode2d=c;break;case 603979870:if(this.g.labelKey=c)this.g.elementKey=!1;this.getModelkit(!1).setProperty("setlabelkey",Boolean.$valueOf(c));break;case 603979838:if(this.g.elementKey=c)this.g.labelKey=!1;this.getModelkit(!1).setProperty("setelementkey",
Boolean.$valueOf(c));break;case 603979956:this.g.symmetryHermannMauguin=c;break;case 603979831:c=(new Boolean(c&JV.Viewer.isJS)).valueOf();this.g.doublePrecision=c;JV.Viewer.isHighPrecision=this.g.doublePrecision;this.setBooleanPropertyTok("legacyJavaFloat",603979874,c);break;case 603979821:(this.g.checkCIR=c)&&this.checkCIR(!0);break;case 603979823:this.g.cipRule6Full=c;break;case 603979802:this.g.autoplayMovie=c;break;case 603979797:c=!1;this.g.allowAudio=c;break;case 603979892:this.g.noDelay=c;
break;case 603979891:this.g.nboCharges=c;break;case 603979856:this.g.hiddenLinesDashed=c;break;case 603979886:this.g.multipleBondBananas=c;break;case 603979884:this.g.modulateOccupancy=c;break;case 603979874:if(c||!this.g.doublePrecision)this.g.legacyJavaFloat=c;c=this.g.legacyJavaFloat;break;case 603979927:this.g.showModVecs=c;break;case 603979937:this.g.showUnitCellDetails=c;break;case 603979849:e=!1;break;case 603979972:this.g.vectorsCentered=c;break;case 603979810:this.g.cartoonBlocks=c;break;
case 603979811:this.g.cartoonSteps=c;break;case 603979818:this.g.cartoonRibose=c;break;case 603979840:this.g.ellipsoidArrows=c;break;case 1111490588:this.g.translucent=c;break;case 603979817:this.g.cartoonLadders=c;break;case 603979968:b=this.g.twistedSheets;this.g.twistedSheets=c;b!=c&&this.checkCoordinatesChanged(null);break;case 603979820:this.gdata.setCel(c);break;case 603979816:this.g.cartoonFancy=c;break;case 603979934:this.g.showTiming=c;break;case 603979973:this.g.vectorSymmetry=c;break;case 603979866:this.g.isosurfaceKey=
c;break;case 603979893:this.g.partialDots=c;break;case 603979872:this.g.legacyAutoBonding=c;break;case 603979826:this.g.defaultStructureDSSP=c;break;case 603979835:this.g.dsspCalcHydrogen=c;break;case 603979782:(this.g.allowModelkit=c)||this.setModelKitMode(!1);break;case 603983903:this.setModelKitMode(c);break;case 603979887:this.g.multiProcessor=c&&1<JV.Viewer.nProcessors;break;case 603979885:this.g.monitorEnergy=c;break;case 603979853:this.g.hbondsRasmol=c;break;case 603979880:this.g.minimizationRefresh=
c;break;case 603979881:this.g.minimizationSilent=c;break;case 603979865:c&&(this.$isKiosk=!0,this.g.disablePopupMenu=!0,null!=this.display&&this.apiPlatform.setTransparentCursor(this.display));break;case 603979975:this.g.waitForMoveTo=c;break;case 603979875:this.g.logCommands=!0;break;case 603979876:this.g.logGestures=!0;break;case 603979784:this.g.allowMultiTouch=c;break;case 603979898:this.g.preserveState=c;this.ms.setPreserveState(c);this.undoMoveAction(4165,-2);break;case 603979955:this.g.strutsMultiple=
c;break;case 603979845:break;case 603979939:this.g.slabByAtom=c;break;case 603979940:this.g.slabByMolecule=c;break;case 603979903:this.g.saveProteinStructureState=c;break;case 603979780:this.g.allowGestures=c;break;case 603979864:this.g.imageState=c;break;case 603979970:this.g.useMinimizationThread=c;break;case 603979781:this.g.allowKeyStrokes=c;break;case 603979832:this.g.dragSelected=c;this.showSelected=!1;break;case 603979924:this.g.showKeyStrokes=c;break;case 603979846:this.g.fontCaching=c;break;
case 603979796:this.g.atomPicking=c;break;case 603979814:this.highlight(null);this.g.bondPicking=c;break;case 603979906:(this.g.selectAllModels=c)?this.slm.setSelectionSubset(null):this.am.setSelectAllSubset(!1);break;case 603979879:this.g.messageStyleChime=c;break;case 603979896:this.g.pdbSequential=c;break;case 603979894:this.g.pdbAddHydrogens=c;break;case 603979895:this.g.pdbGetHeader=c;break;case 603979841:this.g.ellipsoidAxes=c;break;case 603979839:this.g.ellipsoidArcs=c;break;case 603979842:this.g.ellipsoidBall=
c;break;case 603979843:this.g.ellipsoidDots=c;break;case 603979844:this.g.ellipsoidFill=c;break;case 603979847:this.g.fontScaling=c;break;case 603979957:this.setSyncTarget(0,c);break;case 603979958:this.setSyncTarget(1,c);break;case 603979977:this.g.wireframeRotation=c;break;case 603979867:this.g.isosurfacePropertySmoothing=c;break;case 603979834:this.g.drawPicking=c;break;case 603979786:case 603979790:case 603979788:this.setAntialias(b,c);break;case 603979944:this.g.smartAromatic=c;break;case 603979794:this.setApplySymmetryToBonds(c);
break;case 603979792:this.g.appendNew=c;break;case 603979800:this.g.autoFps=c;break;case 603979971:JU.DF.setUseNumberLocalization(this.g.useNumberLocalization=c);break;case 603979918:case 1611272202:a="showFrank";this.setFrankOn(c);break;case 1612709912:a="solventProbe";this.g.dotSolvent=c;break;case 603979948:this.g.dotSolvent=c;break;case 603979785:this.g.allowRotateSelected=c;break;case 603979783:this.g.allowMoveAtoms=c;this.showSelected=!1;break;case 536870922:this.setIntPropertyTok("showScript",
b,c?1:0);return;case 603979778:this.g.allowEmbeddedScripts=c;break;case 603979890:this.g.navigationPeriodic=c;break;case 603979984:this.tm.setZShadeEnabled(c);return;case 603979833:this.haveDisplay&&(this.g.drawHover=c);break;case 603979889:this.setNavigationMode(c);break;case 603979860:this.g.hideNavigationPoint=c;break;case 603979930:this.g.showNavigationPointAlways=c;break;case 603979900:this.setRefreshing(c);break;case 603979868:this.g.jmolInJSpecView=c;break;case 603979869:this.g.justifyMeasurements=
c;break;case 603979952:this.g.ssbondsBackbone=c;break;case 603979852:this.g.hbondsBackbone=c;break;case 603979854:this.g.hbondsSolid=c;break;case 536870924:this.gdata.setSpecular(c);break;case 603979942:this.tm.setSlabEnabled(c);return;case 603979980:this.tm.setZoomEnabled(c);return;case 603979863:this.g.highResolutionFlag=c;break;case 603979966:this.g.traceAlpha=c;break;case 603979983:this.g.zoomLarge=c;this.tm.setZoomHeight(this.g.zoomHeight,c);break;case 603979982:this.g.zoomHeight=c;this.tm.setZoomHeight(c,
this.g.zoomLarge);break;case 603979871:J.i18n.GT.setDoTranslate(c);break;case 603979862:this.slm.setHideNotSelected(c);break;case 603979904:this.setScriptQueue(c);break;case 603979830:this.g.dotSurface=c;break;case 603979829:this.g.dotsSelectedOnly=c;break;case 1611141172:this.setSelectionHalosEnabled(c);break;case 603979910:this.g.rasmolHydrogenSetting=c;break;case 603979908:this.g.rasmolHeteroSetting=c;break;case 603979928:this.g.showMultipleBonds=c;break;case 603979920:this.g.showHiddenSelectionHalos=
c;break;case 603979976:this.tm.setWindowCentered(c);break;case 603979828:this.g.displayCellParameters=c;break;case 603979960:this.g.testFlag1=c;break;case 603979962:this.g.testFlag2=c;break;case 603979964:this.g.testFlag3=c;break;case 603979965:this.jmolTest();this.g.testFlag4=c;break;case 603979901:this.g.ribbonBorder=c;break;case 603979815:this.g.cartoonBaseEdges=c;break;case 603979819:this.g.cartoonRockets=c;break;case 603979902:this.g.rocketBarrels=c;break;case 603979850:this.gdata.setGreyscaleMode(this.g.greyscaleRendering=
c);break;case 603979878:this.g.measurementLabels=c;break;case 603979809:case 603979804:case 603979808:this.setAxesMode(b);return;case 603979806:this.setAxesOrientationRasmol(c);return;case 603979824:this.setStringPropertyTok("defaultcolorscheme",545259545,c?"rasmol":"jmol");return;case 603979825:this.setDebugScript(c);return;case 603979897:this.setPerspectiveDepth(c);return;case 603979798:this.setAutoBond(c);return;case 603979914:this.setShowAxes(c);return;case 603979916:this.setShowBbcage(c);return;
case 603979922:this.setShowHydrogens(c);return;case 603979926:this.setShowMeasurements(c);return;case 603979936:this.setShowUnitCell(c);return;case 603979812:e=!1;this.g.bondModeOr=c;break;case 603979978:e=!1;this.g.zeroBasedXyzRasmol=c;this.reset(!0);break;case 603979899:e=!1;this.g.rangeSelected=c;break;case 603979877:e=!1;this.g.measureAllModels=c;break;case 603979954:e=!1;this.sm.allowStatusReporting=c;break;case 603979822:e=!1;this.g.chainCaseSensitive=c;break;case 603979858:e=!1;this.g.hideNameInPopup=
c;break;case 603979827:e=!1;this.g.disablePopupMenu=c;break;case 603979848:e=!1;this.g.forceAutoBond=c;break;default:if(!this.g.htBooleanParameterFlags.containsKey(a.toLowerCase())){this.g.setUserVariable(a,JS.SV.getBoolean(c));return}}this.g.setB(a,c);e&&this.setTainted(!0)},"~S,~N,~B");c(b,"setModelKitMode",function(a){if(null!=this.acm&&this.allowScripting){if(a||this.g.modelKitMode)this.setPickingMode(null,a?33:1),this.setPickingMode(null,a?32:1);var b=this.g.modelKitMode!=a;this.g.modelKitMode=
a;this.g.setB("modelkitmode",a);this.highlight(null);b&&this.setModelkitPropertySafely("constraint",null);a?(this.setNavigationMode(!1),this.selectAll(),this.setStringProperty("picking","assignAtom_C"),this.setStringProperty("picking","assignBond_p"),this.isApplet||this.popupMenu(10,0,"m"),b&&this.sm.setStatusModelKit(1),this.g.modelKitMode=!0,null==this.getOperativeSymmetry()&&(0==this.ms.ac?this.zap(!1,!0,!0):0<=this.am.cmi&&this.getModelUndeletedAtomsBitSet(this.am.cmi).isEmpty()&&(a=new java.util.Hashtable,
a.put("appendToModelIndex",Integer.$valueOf(this.am.cmi)),this.loadDefaultModelKitModel(a)))):(this.acm.setPickingMode(-1),b?this.sm.setStatusModelKit(0):a||this.getModelkit(!1).setProperty("hidemenu",null))}},"~B");c(b,"setSmilesString",function(a){null==a?this.g.removeParam("_smilesString"):this.g.setO("_smilesString",a)},"~S");c(b,"removeUserVariable",function(a){this.g.removeUserVariable(a);a.endsWith("callback")&&this.sm.setCallbackFunction(a,null)},"~S");c(b,"jmolTest",function(){});c(b,"showParameter",
function(a,b,c){c=""+this.g.getParameterEscaped(a,c);(b||0>c.indexOf("<not defined>"))&&this.showString(a+" = "+c,!1)},"~S,~B,~N");c(b,"showString",function(a,b){!JV.Viewer.isJS&&(this.isScriptQueued()&&(!this.isSilent||b)&&!"\x00".equals(a))&&JU.Logger.warn(a);this.scriptEcho(a)},"~S,~B");c(b,"getAllSettings",function(a){return this.getStateCreator().getAllSettings(a)},"~S");c(b,"getBindingInfo",function(a){return this.haveDisplay?this.acm.getBindingInfo(a):""},"~S");c(b,"getIsosurfacePropertySmoothing",
function(a){return a?this.g.isosurfacePropertySmoothingPower:this.g.isosurfacePropertySmoothing?1:0},"~B");c(b,"setNavigationDepthPercent",function(a){this.tm.setNavigationDepthPercent(a);this.refresh(1,"set navigationDepth")},"~N");c(b,"getShowNavigationPoint",function(){return!this.g.navigationMode?!1:this.tm.isNavigating()&&!this.g.hideNavigationPoint||this.g.showNavigationPointAlways||this.getInMotion(!0)});f(b,"setPerspectiveDepth",function(a){this.tm.setPerspectiveDepth(a)},"~B");f(b,"setAxesOrientationRasmol",
function(a){this.g.setB("axesOrientationRasmol",a);this.g.axesOrientationRasmol=a;this.reset(!0)},"~B");c(b,"setAxesScale",function(a,b){b=JV.Viewer.checkFloatRange(b,-100,100);570425345==a?this.g.axesOffset=b:this.g.axesScale=b;this.axesAreTainted=!0},"~N,~N");c(b,"setAxesMode",function(a){this.g.axesMode=a;this.axesAreTainted=!0;switch(a){case 603979808:this.g.removeParam("axesmolecular");this.g.removeParam("axeswindow");this.g.setB("axesUnitcell",!0);a=2;break;case 603979804:this.g.removeParam("axesunitcell");
this.g.removeParam("axeswindow");this.g.setB("axesMolecular",!0);a=1;break;case 603979809:this.g.removeParam("axesunitcell"),this.g.removeParam("axesmolecular"),this.g.setB("axesWindow",!0),a=0}this.g.setI("axesMode",a)},"~N");c(b,"getSelectionHalosEnabled",function(){return this.selectionHalosEnabled});c(b,"setSelectionHalosEnabled",function(a){this.selectionHalosEnabled!=a&&(this.g.setB("selectionHalos",a),this.shm.loadShape(8),this.selectionHalosEnabled=a)},"~B");c(b,"getShowSelectedOnce",function(){var a=
this.showSelected;this.showSelected=!1;return a});c(b,"setStrandCount",function(a,b){b=JV.Viewer.checkIntRange(b,0,20);switch(a){case 12:this.g.strandCountForStrands=b;break;case 13:this.g.strandCountForMeshRibbon=b;break;default:this.g.strandCountForStrands=b,this.g.strandCountForMeshRibbon=b}this.g.setI("strandCount",b);this.g.setI("strandCountForStrands",this.g.strandCountForStrands);this.g.setI("strandCountForMeshRibbon",this.g.strandCountForMeshRibbon)},"~N,~N");c(b,"getStrandCount",function(a){return 12==
a?this.g.strandCountForStrands:this.g.strandCountForMeshRibbon},"~N");c(b,"setNavigationMode",function(a){this.g.navigationMode=a;this.tm.setNavigationMode(a)},"~B");f(b,"setAutoBond",function(a){this.g.setB("autobond",a);this.g.autoBond=a},"~B");c(b,"makeConnections",function(a,b,c,e,g,j,f,l,m,n){this.clearModelDependentObjects();this.clearMinimization();return this.ms.makeConnections(a,b,c,e,g,j,f,l,m,n)},"~N,~N,~N,~N,JU.BS,JU.BS,JU.BS,~B,~B,~N");f(b,"rebond",function(){this.rebondState(!1)});c(b,
"rebondState",function(a){this.clearModelDependentObjects();this.ms.deleteAllBonds();a=a&&this.g.legacyAutoBonding;this.ms.autoBondBs4(null,null,null,null,this.getMadBond(),a,null);this.addStateScript(a?"set legacyAutoBonding TRUE;connect;set legacyAutoBonding FALSE;":"connect;",!1,!0)},"~B");f(b,"setPercentVdwAtom",function(a){this.g.setI("percentVdwAtom",a);this.g.percentVdwAtom=a;this.rd.value=a/100;this.rd.factorType=J.atomdata.RadiusData.EnumType.FACTOR;this.rd.vdwType=J.c.VDW.AUTO;this.shm.setShapeSizeBs(0,
0,this.rd,null)},"~N");f(b,"getMadBond",function(){return 2*this.g.bondRadiusMilliAngstroms});f(b,"setShowHydrogens",function(a){this.g.setB("showHydrogens",a);this.g.showHydrogens=a},"~B");c(b,"setShowBbcage",function(a){this.setObjectMad10(32,"boundbox",a?-4:0);this.g.setB("showBoundBox",a)},"~B");c(b,"getShowBbcage",function(){return 0!=this.getObjectMad10(4)});c(b,"setShowUnitCell",function(a){this.setObjectMad10(33,"unitcell",a?-2:0);this.g.setB("showUnitCell",a)},"~B");c(b,"getShowUnitCell",
function(){return 0!=this.getObjectMad10(5)});c(b,"setShowAxes",function(a){this.setObjectMad10(34,"axes",a?-2:0);this.g.setB("showAxes",a)},"~B");c(b,"getShowAxes",function(){return 0!=this.getObjectMad10(1)});f(b,"setFrankOn",function(a){this.isPreviewOnly&&(a=!1);this.frankOn=a;this.setObjectMad10(36,"frank",a?1:0)},"~B");c(b,"getShowFrank",function(){return this.isPreviewOnly||this.isApplet&&this.creatingImage?!1:this.isSignedApplet&&!this.isSignedAppletLocal&&!JV.Viewer.isJS||this.frankOn});
f(b,"setShowMeasurements",function(a){this.g.setB("showMeasurements",a);this.g.showMeasurements=a},"~B");c(b,"setUnits",function(a,b){var c="default".equals(a);(!b||!c)&&this.g.setUnits(a);b&&this.setShapeProperty(6,"reformatDistances",a)},"~S,~B");f(b,"setRasmolDefaults",function(){this.setDefaultsType("RasMol")});f(b,"setJmolDefaults",function(){this.setDefaultsType("Jmol")});c(b,"setDefaultsType",function(a){a.equalsIgnoreCase("RasMol")?this.stm.setRasMolDefaults():a.equalsIgnoreCase("PyMOL")?
this.stm.setPyMOLDefaults():(this.stm.setJmolDefaults(),this.setIntProperty("bondingVersion",0),this.shm.setShapeSizeBs(0,0,this.rd,this.getAllAtoms()))},"~S");c(b,"setAntialias",function(a,b){var c=!1;switch(a){case 603979786:c=this.g.antialiasDisplay!=b;this.g.antialiasDisplay=b;break;case 603979790:c=this.g.antialiasTranslucent!=b;this.g.antialiasTranslucent=b;break;case 603979788:this.g.antialiasImages=b;return}c&&(this.resizeImage(0,0,!1,!1,!0),this.refresh(3,"Viewer:setAntialias()"))},"~N,~B");
c(b,"allocTempPoints",function(a){return this.tempArray.allocTempPoints(a)},"~N");c(b,"freeTempPoints",function(a){this.tempArray.freeTempPoints(a)},"~A");c(b,"allocTempScreens",function(a){return this.tempArray.allocTempScreens(a)},"~N");c(b,"freeTempScreens",function(a){this.tempArray.freeTempScreens(a)},"~A");c(b,"allocTempEnum",function(a){return this.tempArray.allocTempEnum(a)},"~N");c(b,"freeTempEnum",function(a){this.tempArray.freeTempEnum(a)},"~A");c(b,"getFont3D",function(a,b,c){return this.gdata.getFont3DFSS(a,
b,c)},"~S,~S,~N");c(b,"getAtomGroupQuaternions",function(a,b){return this.ms.getAtomGroupQuaternions(a,b,this.getQuaternionFrame())},"JU.BS,~N");c(b,"setStereoMode",function(a,b,c){this.setFloatProperty("stereoDegrees",c);this.setBooleanPropertyTok("greyscaleRendering",603979850,b.isBiColor());if(null!=a)this.tm.setStereoMode2(a),this.am.setSplitFrame(-1,-1);else switch(this.tm.setStereoMode(b),b){case J.c.STER.REDBLUE:case J.c.STER.REDCYAN:case J.c.STER.REDGREEN:case J.c.STER.CUSTOM:this.am.setSplitFrame(-1,
-1)}},"~A,J.c.STER,~N");c(b,"getChimeInfo",function(a){return this.getPropertyManager().getChimeInfo(a,this.bsA())},"~N");c(b,"getModelFileInfo",function(){return this.getPropertyManager().getModelFileInfo(this.getVisibleFramesBitSet())});c(b,"getModelFileInfoAll",function(){return this.getPropertyManager().getModelFileInfo(null)});c(b,"showEditor",function(a){var b=this.getProperty("DATA_API","getScriptEditor",Boolean.TRUE);null!=b&&b.show(a)},"~A");c(b,"getPropertyManager",function(){null==this.pm&&
(this.pm=J.api.Interface.getInterface("JV.PropertyManager",this,"prop")).setViewer(this);return this.pm});c(b,"setTainted",function(a){this.isTainted=this.axesAreTainted=a&&(this.refreshing||this.creatingImage)},"~B");c(b,"checkObjectClicked",function(a,b,c){return this.shm.checkObjectClicked(a,b,c,this.getVisibleFramesBitSet(),this.g.drawPicking)},"~N,~N,~N");c(b,"checkObjectHovered",function(a,b){return 0<=a&&null!=this.shm&&this.shm.checkObjectHovered(a,b,this.getClickableFramesBitSet(a),this.getBondsPickable())},
"~N,~N");c(b,"getClickableFramesBitSet",function(a){return this.am.splitFrame?JU.BSUtil.newAndSetBit(this.am.getSplitFrameModelIndex(a<this.screenWidth?0:1)):this.getVisibleFramesBitSet()},"~N");c(b,"checkObjectDragged",function(a,b,c,e,g){var j=0;switch(this.getPickingMode()){case 2:j=5;break;case 4:j=22}return this.shm.checkObjectDragged(a,b,c,e,g,this.getVisibleFramesBitSet(),j)?(this.refresh(1,"checkObjectDragged"),22==j&&this.scriptEcho(this.getShapeProperty(22,"command")),!0):!1},"~N,~N,~N,~N,~N");
c(b,"rotateAxisAngleAtCenter",function(a,b,c,e,g,j,f){(a=this.tm.rotateAxisAngleAtCenter(a,b,c,e,g,j,f))&&this.setSync();return a},"J.api.JmolScriptEvaluator,JU.P3,JU.V3,~N,~N,~B,JU.BS");c(b,"rotateAboutPointsInternal",function(a,b,c,e,g,j,f,l,m,n,q,v,r,s){null==a&&(a=this.eval);if(this.headless){if(j&&3.4028235E38==g)return!1;j=!1}(a=this.tm.rotateAboutPointsInternal(a,b,c,e,g,!1,j,f,!1,l,m,n,q,v,r,s))&&this.setSync();return a},"J.api.JmolScriptEvaluator,JU.P3,JU.P3,~N,~N,~B,JU.BS,JU.V3,JU.Lst,~A,JU.M3,JU.M4,~B,~A");
c(b,"startSpinningAxis",function(a,b,c){this.tm.spinOn||this.tm.navOn?(this.tm.setSpinOff(),this.tm.setNavOn(!1)):this.tm.rotateAboutPointsInternal(null,a,b,this.g.pickingSpinRate,3.4028235E38,c,!0,null,!1,null,null,null,null,null,!1,null)},"JU.T3,JU.T3,~B");c(b,"getModelDipole",function(){return this.ms.getModelDipole(this.am.cmi)});c(b,"calculateMolecularDipole",function(a){try{return this.ms.calculateMolecularDipole(this.am.cmi,a)}catch(b){if(E(b,"JV.JmolAsyncException"))return null!=this.eval&&
this.eval.loadFileResourceAsync(b.getFileName()),null;E(b,"RuntimeException");throw b;}},"JU.BS");c(b,"setDefaultLattice",function(a){Float.isNaN(a.x+a.y+a.z)||this.g.ptDefaultLattice.setT(a);this.g.setO("defaultLattice",JU.Escape.eP(a))},"JU.P3");c(b,"getDefaultLattice",function(){return this.g.ptDefaultLattice});c(b,"getModelExtract",function(a,b,c,e){return this.getPropertyManager().getModelExtract(this.getAtomBitSet(a),b,c,e,!1)},"~O,~B,~B,~S");f(b,"getData",function(a,b){return this.getModelFileData(a,
b,!0)},"~S,~S");c(b,"getModelFileData",function(a,b,c){return this.getPropertyManager().getAtomData(a,b,c)},"~S,~S,~B");c(b,"getModelCml",function(a,b,c,e){return this.getPropertyManager().getModelCml(a,b,c,e,!1)},"JU.BS,~N,~B,~B");c(b,"getPdbAtomData",function(a,b,c,e){return this.getPropertyManager().getPdbAtomData(null==a?this.bsA():a,b,c,e,!1)},"JU.BS,JU.OC,~B,~B");c(b,"isJmolDataFrame",function(){return this.ms.isJmolDataFrame(this.am.cmi)});c(b,"getJmolDataSourceFrame",function(){return this.ms.getJmolDataSourceFrame(this.am.cmi)});
c(b,"getJmolDataFrameTypeInt",function(){return this.ms.getJmolFrameTypeInt(this.am.cmi)});c(b,"setFrameTitle",function(a,b){this.ms.setFrameTitle(JU.BSUtil.newAndSetBit(a),b)},"~N,~S");c(b,"setFrameTitleObj",function(a){this.shm.loadShape(31);this.ms.setFrameTitle(this.getVisibleFramesBitSet(),a)},"~O");c(b,"getFrameTitle",function(){return this.ms.getFrameTitle(this.am.cmi)});c(b,"setAtomProperty",function(a,b,c,e,g,j,f){1648363544==b&&this.shm.deleteVdwDependentShapes(a);this.clearMinimization();
this.ms.setAtomProperty(a,b,c,e,g,j,f);switch(b){case 1086326789:this.setModelkitPropertySafely("updateatomkeys",a);case 1111492609:case 1111492610:case 1111492611:case 1111492612:case 1111492613:case 1111492614:case 1111490577:case 1111490578:case 1111490579:this.refreshMeasures(!0)}},"JU.BS,~N,~N,~N,~S,~A,~A");c(b,"checkCoordinatesChanged",function(a){this.ms.recalculatePositionDependentQuantities(a,null);this.refreshMeasures(!0)},"JU.BS");c(b,"setAtomCoords",function(a,b,c){if(!a.isEmpty()){var e=
this.ms.at[a.nextSetBit(0)],g=a.cardinality();this.sm.setStatusStructureModified(e.i,e.mi,3,"setAtomCoords",g,a);this.ms.setAtomCoords(a,b,c);this.setStatusAtomMoved(!0,a);this.sm.setStatusStructureModified(e.i,e.mi,-3,"OK",g,a)}},"JU.BS,~N,~O");c(b,"setAtomCoordsRelative",function(a,b){null==b&&(b=this.bsA());if(!b.isEmpty()){var c=0!=a.lengthSquared(),e=this.ms.at[b.nextSetBit(0)],g=b.cardinality();c&&this.sm.setStatusStructureModified(e.i,e.mi,3,"setAtomCoords",g,b);this.ms.setAtomCoordsRelative(a,
b);this.checkMinimization();c&&(this.setStatusAtomMoved(!1,b),this.sm.setStatusStructureModified(e.i,e.mi,-3,"OK",g,b))}},"JU.T3,JU.BS");c(b,"invertAtomCoord",function(a,b,c,e,g){if(0<=e){c=JU.JmolMolecule.getBranchesForInversion(this.ms.at,e,this.ms.getMoleculeBitSetForAtom(e));var j=c.cardinality();switch(j){case 0:case 1:return;case 3:case 4:for(var f=D(j,0),l=D(j,0),m=0,n=c.nextSetBit(0);0<=n;n=c.nextSetBit(n+1),m++)f[m]=this.getBranchBitSet(n,e,!0).cardinality(),l[m]=n;for(m=0;m<j-2;m++){for(var q=
-2147483648,v=0,n=0;n<j;n++)f[n]>=q&&c.get(l[n])&&(v=l[n],q=f[n]);c.clear(v)}}g&&!c.isEmpty()&&this.undoMoveActionClear(e,2,!0)}j=c.cardinality();0!=j&&(f=this.ms.at[c.nextSetBit(0)],this.sm.setStatusStructureModified(f.i,f.mi,3,"invertAtomCoords",j,c),this.ms.invertSelected(a,b,e,c),this.setStatusAtomMoved(!0,c),this.sm.setStatusStructureModified(f.i,f.mi,-3,"OK",j,c),g&&this.setStatusAtomPicked(e,"inverted: "+JU.Escape.eBS(c),null,!1))},"JU.P3,JU.P4,JU.BS,~N,~B");c(b,"invertSelected",function(a,
b,c,e){null==e&&(e=this.bsA());e.isEmpty()||(this.ms.invertSelected(a,b,c,e),this.setStatusAtomMoved(!0,e))},"JU.P3,JU.P4,~N,JU.BS");c(b,"moveAtoms",function(a,b,c,e,g,j,f,l,m){if(!f.isEmpty()){var n=this.getMotionFixedAtoms(null,null);if(!f.intersects(n)){m=m?this.getOperativeSymmetry():null;var q=null;null!=m&&(q=this.ms.saveAtomPositions());this.ms.moveAtoms(a,b,c,e,f,g,j,l);null!=m&&this.getModelkit(!1).checkMovedAtoms(n,f,q);this.setStatusAtomMoved(!0,f)}}},"JU.M4,JU.M3,JU.M3,JU.V3,JU.P3,~B,JU.BS,~B,~B");
c(b,"moveSelectedXY",function(a,b,c){this.moveSelected(a,b,-2147483648,-2147483648,-2147483648,null,null,null,!1,!1,c)},"~N,~N,~N");c(b,"moveSelected",function(a,b,c,e,g,j,f,l,m,n,q){if(0==c&&null==l||this.isJmolDataFrame())return 0;if(null==l){-2147483648==e&&null!=this.modelkit&&this.setModelkitPropertySafely("rotatebondindex",Integer.$valueOf(-2147483648));if(-2147483648==a)return this.showSelected=!0,this.movableBitSet=this.setMovableBitSet(null,!n),this.shm.loadShape(8),this.refresh(6,"moveSelected"),
0;if(2147483647==a){if(!this.showSelected)return 0;this.showSelected=!1;this.movableBitSet=null;this.refresh(6,"moveSelected");return 0}}if(this.movingSelected)return 0;this.movingSelected=!0;this.stopMinimization();if(null==l&&-2147483648!=e&&null!=this.modelkit&&null!=this.modelkit.getProperty("rotatebondindex"))this.modelkit.actionRotateBond(a,b,e,g,0!=(q&16));else if(null==j&&(j=this.bsA()),e=j.nextSetBit(0),j=this.setMovableBitSet(j,!n),j.isEmpty())j.set(e),this.sm.setStatusStructureModified(e,
this.getModelIndexForAtom(e),-3,"FAILED",1,j);else if(m){f=null==f?this.ms.getAtomSetCenter(j):f;if(null==l){this.tm.finalizeTransformParameters();l=this.g.antialiasDisplay?2:1;this.tm.transformPt3fSafe(f,this.ptScreen);m=this.getOperativeSymmetry();if(-2147483648!=c){if(null!=m)return 0;this.ptScreenNew.set(this.ptScreen.x,this.ptScreen.y,this.ptScreen.z+c)}else this.ptScreenNew.set(this.ptScreen.x+a*l,this.ptScreen.y+b*l,this.ptScreen.z);this.tm.unTransformPoint(this.ptScreenNew,this.ptNew);l=this.ptNew;
null!=m&&(l.sub(f),l.add(this.ms.at[e]),this.getModelkit(!1).cmdAssignMoveAtoms(j,e,l,null,!0,!n,!1))}Float.isNaN(l.x)||(l.sub(f),this.setAtomCoordsRelative(l,j))}else this.tm.rotateXYBy(a,b,j);this.refresh(2,"");this.movingSelected=!1;return null==j?0:j.cardinality()},"~N,~N,~N,~N,~N,JU.BS,JU.P3,JU.P3,~B,~B,~N");c(b,"warnAtom",function(a){0>a&&0>this.atomHighlighted||(this.atomHighlighted=a,this.shm.loadShape(8),this.setShapeProperty(8,"warnAtom",0<=a?Integer.$valueOf(a):null))},"~N");c(b,"highlightBond",
function(a,b,c,e){if(this.hoverEnabled){b=null;if(0<=a){var g=this.ms.bo[a];b=JU.BSUtil.newAndSetBit(g.atom2.i);b.set(g.atom1.i)}this.highlight(b);this.getModelkit(!1);this.setModelkitPropertySafely("screenxy",D(-1,[c,e]));this.setModelkitPropertySafely("bondindex",Integer.$valueOf(a));a=this.setModelkitPropertySafely("hoverlabel",Integer.$valueOf(-2-a));null!=a&&this.hoverOnPt(c,e,a,null,null);this.refresh(3,"highlightBond")}},"~N,~N,~N,~N");c(b,"highlight",function(a){this.atomHighlighted=null!=
a&&1==a.cardinality()?a.nextSetBit(0):-1;null==a?this.setCursor(0):(this.shm.loadShape(8),this.setCursor(12));this.setModelkitPropertySafely("highlight",a);this.setShapeProperty(8,"highlight",a)},"JU.BS");c(b,"refreshMeasures",function(a){this.setShapeProperty(6,"refresh",null);this.setStatusMeasuring("refreshed",-3,"",0);a&&this.stopMinimization()},"~B");c(b,"functionXY",function(a,b,c){var e=null;if(0==a.indexOf("file:"))e=this.getFileAsString3(a.substring(5),!1,null);else if(0!=a.indexOf("data2d_"))return this.sm.functionXY(a,
b,c);b=Math.abs(b);c=Math.abs(c);if(null==e){a=this.getDataObj(a,null,2);if(null!=a)return a;e=""}a=M(b,c,0);var g=M(b*c,0);JU.Parser.parseStringInfestedFloatArray(e,null,g);for(var j=e=0;e<b;e++)for(var f=0;f<c;f++)a[e][f]=g[j++];return a},"~S,~N,~N");c(b,"functionXYZ",function(a,b,c,e){var g=null;if(0==a.indexOf("file:"))g=this.getFileAsString3(a.substring(5),!1,null);else if(0!=a.indexOf("data3d_"))return this.sm.functionXYZ(a,b,c,e);b=Math.abs(b);c=Math.abs(c);e=Math.abs(e);if(null==g){a=this.getDataObj(a,
null,2);if(null!=a)return a;g=""}a=M(b,c,e,0);var j=M(b*c*e,0);JU.Parser.parseStringInfestedFloatArray(g,null,j);for(var f=g=0;g<b;g++)for(var l=0;l<c;l++)for(var m=0;m<e;m++)a[g][l][m]=j[f++];return a},"~S,~N,~N,~N");f(b,"extractMolData",function(a){if(null==a){a=this.am.cmi;if(0>a||0==this.ms.ac)return null;a=this.getModelNumberDotted(a)}return this.getModelExtract(a,!0,!1,"V2000")},"~S");c(b,"getNMRPredict",function(a){a=a.toUpperCase();if(a.equals("H")||a.equals("1H")||a.equals(""))a="H1";else if(a.equals("C")||
a.equals("13C"))a="C13";if(!a.equals("NONE")){if(!a.equals("C13")&&!a.equals("H1"))return"Type must be H1 or C13";var b=this.getModelExtract("selected",!0,!1,"V2000"),c=b.indexOf("\n");if(0>c)return null;b="Jmol "+JV.Viewer.version_date+b.substring(c);if(this.isApplet)return this.showUrl(this.g.nmrUrlFormat+b),"opening "+this.g.nmrUrlFormat}this.syncScript("true","*",0);this.syncScript(a+"Simulate:",".",0);return"sending request to JSpecView"},"~S");c(b,"getHelp",function(a){0>this.g.helpPath.indexOf("?")?
(0<a.length&&0!=a.indexOf("?")&&(a="?search="+JU.PT.rep(a," ","%20")),a+=(0==a.length?"?ver=":"&ver=")+JV.JC.majorVersion):a="&"+a;this.showUrl(this.g.helpPath+a)},"~S");c(b,"getChemicalInfo",function(a,b,c){b=b.toLowerCase();var e="/";switch(";inchi;inchikey;stdinchi;stdinchikey;name;image;drawing;names;".indexOf(";"+b+";")){case 0:e="I";break;case 6:e="K";break;case 15:e="T";break;case 24:e="S";break;case 36:e="M";break;case 41:case 47:e="2";break;case 55:e="N"}var g=this.setLoadFormat(!1,"_"+a,
e,!1);if("2"==e)return this.fm.loadImage(g,"\u0001"+a,!1),g;"/"==e&&(g=JU.PT.isOneOf(b,";alc;cdxml;cerius;charmm;cif;cml;ctx;gjf;gromacs;hyperchem;jme;maestro;mol;mol2;sybyl2;mrv;pdb;sdf;sdf3000;sln;smiles;xyz")?g+("file?format="+b):g+JU.PT.rep(b," ","%20"));g=this.getFileAsString4(g,-1,!1,!1,!1,"file");switch(e.charCodeAt(0)){case 73:case 84:0<g.indexOf("\t")&&(g=g.substring(0,g.indexOf("\t")));break;case 75:case 77:g.startsWith("InChIKey=")&&(g=g.substring(9));0<g.indexOf("\n")&&(g=g.substring(0,
g.indexOf("\n")));break;default:b.equals("jme")&&(g=this.getPropertyManager().fixJMEFormalCharges(c,g))}return g},"~S,~S,JU.BS");c(b,"addCommand",function(a){if(!this.autoExit&&this.haveDisplay&&this.getPreserveState()){if(a.startsWith("pause ")||a.equals("pause"))a="resume";this.commandHistory.addCommand(JU.PT.replaceAllCharacters(a,"\r\n\t"," "))}},"~S");c(b,"pushState",function(){!this.autoExit&&(this.haveDisplay&&this.getPreserveState())&&this.commandHistory.pushState(this.getStateInfo())});c(b,
"popState",function(){if(!this.autoExit&&this.haveDisplay&&this.getPreserveState()){var a=this.commandHistory.popState();null!=a&&this.evalStringQuiet(a)}});c(b,"removeCommand",function(){return this.commandHistory.removeCommand()});f(b,"getSetHistory",function(a){return this.commandHistory.getSetHistory(a)},"~N");c(b,"historyFind",function(a,b){return this.commandHistory.find(a,b)},"~S,~N");c(b,"setHistory",function(a){this.commandHistory.getSetHistory(-2147483648);this.commandHistory.addCommand(this.getFileAsString4(a,
-1,!1,!1,!0,null))},"~S");c(b,"getOutputChannel",function(a,b){return this.getOutputManager().getOutputChannel(a,b)},"~S,~A");f(b,"writeTextFile",function(a,b){return this.writeFile(a,b,"txt")},"~S,~S");c(b,"writeFile",function(a,b,c){var e=new java.util.Hashtable;e.put("fileName",a);e.put("type",c);e.put("string"==typeof b?"text":"bytes",b);return this.outputToFile(e)},"~S,~O,~S");f(b,"clipImageOrPasteText",function(a){return!this.haveAccess(JV.Viewer.ACCESS.ALL)?"no":this.getOutputManager().clipImageOrPasteText(a)},
"~S");f(b,"getClipboardText",function(){if(!this.haveAccess(JV.Viewer.ACCESS.ALL))return"no";try{return this.getOutputManager().getClipboardText()}catch(a){if(E(a,Error))return J.i18n.GT.$("clipboard is not accessible -- use signed applet");throw a;}});c(b,"processWriteOrCapture",function(a){return this.getOutputManager().processWriteOrCapture(a)},"java.util.Map");c(b,"createZip",function(a,b,c){var e=this.getStateInfo(),g=c.get("data");null!=a&&c.put("fileName",a);c.put("type",b);c.put("text",e);
C(g,Array)?c.put("scripts",g):C(g,"JU.Lst")&&c.put("imageData",g);return this.getOutputManager().outputToFile(c)},"~S,~S,java.util.Map");f(b,"outputToFile",function(a){return this.getOutputManager().outputToFile(a)},"java.util.Map");c(b,"setSyncTarget",function(a,b){switch(a){case 0:this.sm.syncingMouse=b;break;case 1:this.sm.syncingScripts=b;break;case 2:this.sm.syncSend(b?"GET_GRAPHICS":"SET_GRAPHICS_OFF","*",0);Float.isNaN(this.tm.stereoDegrees)&&this.setFloatProperty("stereoDegrees",-5);b&&(this.setBooleanProperty("_syncMouse",
!1),this.setBooleanProperty("_syncScript",!1));return}!this.sm.syncingScripts&&!this.sm.syncingMouse&&this.setSync()},"~N,~B");f(b,"syncScript",function(a,b,c){this.sm.syncScript(a,b,c)},"~S,~S,~N");c(b,"syncScriptErr",function(a){return this.sm.syncScriptErr(a)},"~S");f(b,"getModelIndexFromId",function(a){return this.ms.getModelIndexFromId(a)},"~S");c(b,"setSyncDriver",function(a){this.sm.setSyncDriver(a)},"~N");c(b,"setProteinType",function(a,b){this.ms.setProteinType(null==b?this.bsA():b,a)},"J.c.STR,JU.BS");
c(b,"getVanderwaalsMar",function(a){return this.defaultVdw===J.c.VDW.USER?this.userVdwMars[a]:JU.Elements.getVanderwaalsMar(a,this.defaultVdw)},"~N");c(b,"getVanderwaalsMarType",function(a,b){if(null==b)b=this.defaultVdw;else switch(b){case J.c.VDW.AUTO:case J.c.VDW.AUTO_BABEL:case J.c.VDW.AUTO_JMOL:case J.c.VDW.AUTO_RASMOL:this.defaultVdw!==J.c.VDW.AUTO&&(b=this.defaultVdw)}b===J.c.VDW.USER&&null==this.bsUserVdws&&(b=J.c.VDW.JMOL);return b===J.c.VDW.USER?this.userVdwMars[a&127]:JU.Elements.getVanderwaalsMar(a,
b)},"~N,J.c.VDW");c(b,"setVdwStr",function(a){a=J.c.VDW.getVdwType(a);null==a&&(a=J.c.VDW.AUTO);switch(a){case J.c.VDW.JMOL:case J.c.VDW.BABEL:case J.c.VDW.RASMOL:case J.c.VDW.AUTO:case J.c.VDW.USER:break;default:a=J.c.VDW.JMOL}a!==this.defaultVdw&&(a===J.c.VDW.USER&&null==this.bsUserVdws)&&this.setUserVdw(this.defaultVdw);this.defaultVdw=a;this.g.setO("defaultVDW",a.getVdwLabel())},"~S");c(b,"setUserVdw",function(a){this.userVdwMars=D(JU.Elements.elementNumberMax,0);this.userVdws=M(JU.Elements.elementNumberMax,
0);this.bsUserVdws=new JU.BS;a===J.c.VDW.USER&&(a=J.c.VDW.JMOL);for(var b=1;b<JU.Elements.elementNumberMax;b++)this.userVdwMars[b]=JU.Elements.getVanderwaalsMar(b,a),this.userVdws[b]=this.userVdwMars[b]/1E3},"J.c.VDW");c(b,"getDefaultVdwNameOrData",function(a,b,c){switch(a){case -2147483648:return this.defaultVdw.getVdwLabel();case 2147483647:if(null==(c=this.bsUserVdws))return"";b=J.c.VDW.USER}if(null==b||b===J.c.VDW.AUTO)b=this.defaultVdw;b===J.c.VDW.USER&&null==this.bsUserVdws&&this.setUserVdw(this.defaultVdw);
return this.getDataManager().getDefaultVdwNameOrData(b,c)},"~N,J.c.VDW,JU.BS");c(b,"deleteAtoms",function(a,b){var c=null==a?-1:a.nextSetBit(0);if(0>c)return 0;this.clearModelDependentObjects();var e=this.ms.at[c];if(null==e)return 0;var g=e.mi;if(b)return this.deleteModels(g,a);this.sm.setStatusStructureModified(c,e.mi,4,"deleting atoms "+a,a.cardinality(),a);this.ms.deleteAtoms(a);e=this.slm.deleteAtoms(a);this.setTainted(!0);this.sm.setStatusStructureModified(c,g,-4,"OK",e,a);return e},"JU.BS,~B");
c(b,"deleteModels",function(a,b){var c=null==b?JU.BSUtil.newAndSetBit(a):this.ms.getModelBS(b,!1);this.clearModelDependentObjects();b=this.getModelUndeletedAtomsBitSetBs(c);var e=b.cardinality(),g=this.am.cmi;this.setCurrentModelIndexClear(0,!1);this.am.setAnimationOn(!1);var j=JU.BSUtil.copy(this.slm.bsDeleted),c=this.ms.deleteModels(c);if(null==c)return this.setCurrentModelIndexClear(g,!1),0;this.sm.setStatusStructureModified(-1,a,5,"deleting model "+this.getModelNumberDotted(a),e,b);this.slm.processDeletedModelAtoms(c);
null!=this.eval&&this.eval.deleteAtomsInVariables(c);this.setAnimationRange(0,0);this.clearRepaintManager(-1);this.am.clear();this.am.initializePointers(1);this.setCurrentModelIndexClear(1<this.ms.mc?-1:0,1<this.ms.mc);this.hoverAtomIndex=-1;this.setFileLoadStatus(J.c.FIL.DELETED,null,null,null,null,null);this.refreshMeasures(!0);null!=j&&c.andNot(j);e=JU.BSUtil.cardinalityOf(c);this.sm.setStatusStructureModified(-1,a,-5,"OK",e,c);return e},"~N,JU.BS");c(b,"deleteBonds",function(a){for(var b=this.ms.bondCount,
c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))(c>=b||null==this.ms.bo[c])&&a.clear(c);b=a.nextSetBit(0);0>b||(b=this.ms.bo[b].atom1.mi,this.sm.setStatusStructureModified(-1,b,2,"delete bonds "+JU.Escape.eBond(a),a.cardinality(),a),this.ms.deleteBonds(a,!1),this.sm.setStatusStructureModified(-1,b,-2,"OK",a.cardinality(),a))},"JU.BS");c(b,"deleteModelAtoms",function(a,b,c,e){var g=e.cardinality();0!=g&&(this.sm.setStatusStructureModified(-1,a,7,"delete atoms "+JU.Escape.eBS(e),g,e),JU.BSUtil.deleteBits(this.tm.bsFrameOffsets,
e),this.getDataManager().deleteModelAtoms(b,c,e),this.sm.setStatusStructureModified(-1,a,-7,"OK",g,e))},"~N,~N,~N,JU.BS");c(b,"getQuaternionFrame",function(){return this.g.quaternionFrame.charAt(2==this.g.quaternionFrame.length?1:0)});c(b,"loadImageData",function(a,b,c,e){null==a&&null!=b&&this.scriptEcho(b);null==c?this.setBackgroundImage(null==a?null:b,a):c.startsWith("\u0001")?this.sm.showImage(c,a):c.startsWith("\x00")?null!=a&&this.setWindowDimensions(M(-1,[this.apiPlatform.getImageWidth(a),
this.apiPlatform.getImageHeight(a)])):(this.shm.loadShape(31),this.setShapeProperty(31,"text",b),null!=a&&this.setShapeProperty(31,"image",a));JV.Viewer.isJS&&null!=e&&(e.mustResumeEval=!0,this.eval.resumeEval(e));return!1},"~O,~S,~S,~O");c(b,"cd",function(a){null==a?a=".":0==a.length&&(this.setStringProperty("defaultDirectory",""),a=".");a=this.fm.getDefaultDirectory(a+(a.equals("=")?"":a.endsWith("/")?"X.spt":"/X.spt"));0<a.length&&this.setStringProperty("defaultDirectory",a);this.fm.getFilePath(a+
"/",!0,!1).startsWith("file:/")&&JV.FileManager.setLocalPath(this,a,!1);return a},"~S");c(b,"setErrorMessage",function(a,b){this.errorMessageUntranslated=b;null!=a&&this.eval.stopScriptThreads();return this.errorMessage=a},"~S,~S");f(b,"getErrorMessage",function(){return this.errorMessage});f(b,"getErrorMessageUn",function(){return null==this.errorMessageUntranslated?this.errorMessage:this.errorMessageUntranslated});c(b,"setShapeErrorState",function(a,b){this.currentShapeID=a;this.currentShapeState=
b},"~N,~S");c(b,"getShapeErrorState",function(){if(0>this.currentShapeID)return"";this.shm.releaseShape(this.currentShapeID);this.clearRepaintManager(this.currentShapeID);return JV.JC.getShapeClassName(this.currentShapeID,!1)+" "+this.currentShapeState});c(b,"handleError",function(a,b){try{b&&this.zapMsg(""+a),this.undoMoveAction(4165,-2),0==JU.Logger.getLogLevel()&&JU.Logger.setLogLevel(4),this.setCursor(0),this.setBooleanPropertyTok("refreshing",603979900,!0),this.fm.setPathForAllFiles(""),JU.Logger.error("vwr handling error condition: "+
a+"  "),this.notifyError("Error","doClear="+b+"; "+a,""+a)}catch(c){try{JU.Logger.error("Could not notify error "+a+": due to "+c)}catch(e){}}},"Throwable,~B");c(b,"getFunctions",function(a){return a?JV.Viewer.staticFunctions:this.localFunctions},"~B");c(b,"removeFunction",function(a){a=a.toLowerCase();null!=this.getFunction(a)&&(JV.Viewer.staticFunctions.remove(a),this.localFunctions.remove(a))},"~S");c(b,"getFunction",function(a){if(null==a)return null;a=(JV.Viewer.isStaticFunction(a)?JV.Viewer.staticFunctions:
this.localFunctions).get(a);return null==a||null==a.geTokens()?null:a},"~S");b.isStaticFunction=c(b,"isStaticFunction",function(a){return a.startsWith("static_")},"~S");c(b,"isFunction",function(a){return(JV.Viewer.isStaticFunction(a)?JV.Viewer.staticFunctions:this.localFunctions).containsKey(a)},"~S");c(b,"clearFunctions",function(){JV.Viewer.staticFunctions.clear();this.localFunctions.clear()});c(b,"addFunction",function(a){var b=a.getName();(JV.Viewer.isStaticFunction(b)?JV.Viewer.staticFunctions:
this.localFunctions).put(b,a)},"J.api.JmolScriptFunction");c(b,"getFunctionCalls",function(a){return this.getStateCreator().getFunctionCalls(a)},"~S");c(b,"checkPrivateKey",function(a){return a==this.privateKey},"~N");c(b,"bindAction",function(a,b){this.haveDisplay&&this.acm.bind(a,b)},"~S,~S");c(b,"unBindAction",function(a,b){this.haveDisplay&&this.acm.unbindAction(a,b)},"~S,~S");c(b,"calculateStruts",function(a,b){return this.ms.calculateStruts(null==a?this.bsA():a,null==b?this.bsA():b)},"JU.BS,JU.BS");
c(b,"getPreserveState",function(){return this.g.preserveState&&null!=this.scm});c(b,"isKiosk",function(){return this.$isKiosk});c(b,"hasFocus",function(){return this.haveDisplay&&(this.$isKiosk||this.apiPlatform.hasFocus(this.display))});c(b,"setFocus",function(){this.haveDisplay&&!this.apiPlatform.hasFocus(this.display)&&this.apiPlatform.requestFocusInWindow(this.display)});c(b,"stopMinimization",function(){null!=this.minimizer&&this.minimizer.setProperty("stop",null)});c(b,"clearMinimization",function(){null!=
this.minimizer&&this.minimizer.setProperty("clear",null)});c(b,"getMinimizationInfo",function(){return null==this.minimizer?"":this.minimizer.getProperty("log",0)});c(b,"checkMinimization",function(){this.refreshMeasures(!0);if(this.g.monitorEnergy){try{this.minimize(null,0,0,this.getFrameAtoms(),null,null,0,1)}catch(a){if(!E(a,Exception))throw a;}this.echoMessage(this.getP("_minimizationForceField")+" Energy = "+this.getP("_minimizationEnergy"))}});c(b,"minimize",function(a,b,c,e,g,j,f,l){var m=
null!=e;m&&(l|=2);var n=0!=(l&16),q=0!=(l&256),v=0!=(l&1),r=0!=(l&8),s=0!=(l&64),u=s||0!=(l&32),w=null!=g;this.isModelKitOpen()&&this.setModelkitPropertySafely("constraint",null);null==j&&(j=this.getFrameAtoms());!r&&(!n&&m&&!w&&!u)&&(w=JU.BSUtil.copy(j),g=JU.BSUtil.copy(w),g.andNot(e),e=w,w=!0);m?r||e.and(j):(e=this.getThisModelAtoms(),u&&e.and(this.bsA()));if(!e.isEmpty())if(m=q||!u?JU.BSUtil.copy(this.ms.am[this.ms.at[e.nextSetBit(0)].mi].bsAsymmetricUnit):null,q&&null==m)this.scriptStatusMsg("MODELKIT MINIMIZE is only applicable to crystal structures.",
"minimization: not a crystal structure");else try{if(q)this.getModelkit(!1).cmdMinimize(a,m,b,c,f,l);else{var x=null==m?this.g.forceField:"UFF";this.getModelForAtomIndex(e.nextSetBit(0)).auxiliaryInfo.put("dimension","3D");r&&(j=e);var z=JU.BSUtil.copy(w?g:this.slm.getMotionFixedAtoms()),A=!z.isEmpty();A&&e.andNot(z);var C=null!=m&&q?this.getThisModelAtoms():u||!A?new JU.BS:this.ms.getAtomsWithinRadius(0>=f?5:f,e,!0,null,null);C.andNot(e);A?z.and(C):z=C;z.and(j);l|=(A?4:0)|(this.getBooleanProperty("minimizationSilent")?
1:0);if(!r||!this.getBoolean(603979962)){if(r)try{v||JU.Logger.info("Minimizing "+e.cardinality()+" atoms"),this.getMinimizer(!0).minimize(b,c,e,z,null,l,"UFF")}catch(D){if(E(D,Exception))JU.Logger.error("Minimization error: "+D.toString()),D.printStackTrace();else throw D;}if(n){var F=this.addHydrogens(e,l);r||e.or(F)}var G=e.cardinality();if(x.equals("MMFF")&&G>this.g.minimizationMaxAtoms)this.scriptStatusMsg("Too many atoms for minimization ("+G+">"+this.g.minimizationMaxAtoms+"); use 'set minimizationMaxAtoms' to increase this limit",
"minimization: too many atoms");else if(s&&(z.or(this.ms.getConnectingAtoms(e,z)),e.andNot(z)),v||JU.Logger.info("Minimizing "+e.cardinality()+" atoms"),this.getMinimizer(!0).minimize(b,c,e,z,m,l,r?"MMFF":x),r){this.g.forceField="MMFF";this.setHydrogens(e);var I=this.getMinimizer(!1).getForceFieldUsed();null!=I&&this.showString("Minimized by Jmol using "+I,!1)}}}}catch(K){if(E(K,"JV.JmolAsyncException"))null!=a&&a.loadFileResourceAsync(K.getFileName());else if(E(K,Exception))a=K,JU.Logger.error("Minimization error: "+
a.toString()),a.printStackTrace();else throw K;}},"J.api.JmolScriptEvaluator,~N,~N,JU.BS,JU.BS,JU.BS,~N,~N");c(b,"setHydrogens",function(a){for(var b=D(1,0),b=this.ms.calculateHydrogens(a,b,null,2056),c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1)){var e=b[c];if(!(null==e||0==e.length))for(var g=this.ms.at[c],j=g.bonds,f=0,l=0,m=g.getBondCount();f<m;f++){var n=j[f].getOtherAtom(g);if(1==n.getAtomicAndIsotopeNumber()){var q=e[l++];null!=q&&this.ms.setAtomCoord(n.i,q.x,q.y,q.z)}}}this.ms.resetMolecules()},
"JU.BS");c(b,"setMotionFixedAtoms",function(a){this.slm.setMotionFixedAtoms(a)},"JU.BS");c(b,"setMotionFixed",function(a){this.slm.setMotionFixedAtoms(a)},"JU.BS");c(b,"getMotionFixedAtoms",function(a,b){if(0>this.am.cmi)return new JU.BS;null==b&&(b=new JU.BS);b.or(this.slm.getMotionFixedAtoms());b.and(this.getThisModelAtoms());null==a&&(a=this.getOperativeSymmetry());null!=a&&null!=this.getModelkit(!1)&&this.modelkit.addLockedAtoms(a,b);return b},"J.api.SymmetryInterface,JU.BS");c(b,"getAtomicPropertyState",
function(a,b,c,e,g){this.getStateCreator().getAtomicPropertyStateBuffer(a,b,c,e,g)},"JU.SB,~N,JU.BS,~S,~A");c(b,"getCenterAndPoints",function(a,b){return this.ms.getCenterAndPoints(a,b)},"JU.Lst,~B");c(b,"writeFileData",function(a,b,c,e){return this.getOutputManager().writeFileData(a,b,c,e)},"~S,~S,~N,~A");c(b,"getPdbData",function(a,b,c,e,g,j){return this.getPropertyManager().getPdbData(a,b,null==c?this.bsA():c,e,g,j)},"~N,~S,JU.BS,~A,JU.OC,~B");c(b,"getGroupsWithin",function(a,b){return this.ms.getGroupsWithin(a,
b)},"~N,JU.BS");c(b,"setShapeSize",function(a,b,c){null==c&&(c=this.bsA());this.shm.setShapeSizeBs(a,b,null,c)},"~N,~N,JU.BS");c(b,"setShapeProperty",function(a,b,c){0<=a&&this.shm.setShapePropertyBs(a,b,c,null)},"~N,~S,~O");c(b,"getShapeProperty",function(a,b){return this.shm.getShapePropertyIndex(a,b,-2147483648)},"~N,~S");c(b,"getShapePropertyAsInt",function(a,b){var c=this.getShapeProperty(a,b);return null==c||!C(c,Integer)?-2147483648:c.intValue()},"~N,~S");c(b,"setModelVisibility",function(){null!=
this.shm&&this.shm.setModelVisibility(null)});c(b,"resetShapes",function(a){this.shm.resetShapes(!a);a&&(this.shm.loadDefaultShapes(this.ms),this.clearRepaintManager(-1))},"~B");c(b,"setParallel",function(a){return this.$isParallel=this.g.multiProcessor&&a},"~B");c(b,"isParallel",function(){return this.g.multiProcessor&&this.$isParallel});c(b,"undoMoveAction",function(a,b){return this.g.preserveState?this.getStateCreator().undoMoveAction(a,b):0},"~N,~N");c(b,"undoMoveActionClear",function(a,b,c){this.g.preserveState&&
null==this.getOperativeSymmetry()&&this.getStateCreator().undoMoveActionClear(a,b,c)},"~N,~N,~B");c(b,"moveAtomWithHydrogens",function(a,b,c,e,g,j){this.stopMinimization();var f=null!=g&&0==b,l=this.ms.at[a];null==j&&(j=JU.BSUtil.newAndSetBit(a),(null==this.getOperativeSymmetry()||this.isModelKitOpen()&&!this.modelkit.hasConstraint(a,!0,!1))&&!f&&this.ms.addConnectedHAtoms(l,j));return this.moveSelected(b,c,e,-2147483648,-2147483648,j,l,g,!0,!0,0)},"~N,~N,~N,~N,JU.P3,JU.BS");c(b,"isModelPDB",function(a){return this.ms.am[a].isBioModel},
"~N");f(b,"deleteMeasurement",function(a){this.setShapeProperty(6,"delete",Integer.$valueOf(a))},"~N");f(b,"getSmiles",function(a){return this.getSmilesOpt(a,-1,-1,16|(null==a&&JU.Logger.debugging?131072:0),null)},"JU.BS");f(b,"getOpenSmiles",function(a){return this.getSmilesOpt(a,-1,-1,5|(null==a&&JU.Logger.debugging?131072:0),"/open///")},"JU.BS");c(b,"getBioSmiles",function(a){return this.getSmilesOpt(a,-1,-1,24117248|(JU.Logger.debugging?131072:0),null)},"JU.BS");c(b,"getSmilesOpt",function(a,
b,c,e,g){var j=17825792==(e&17825792)?JV.Viewer.getJmolVersion()+" "+this.getModelName(this.am.cmi):g,f=this.ms.at;null==a&&(0>b||0>c?a=this.bsA():(1048576==(e&1048576)&&(b>c&&(a=b,b=c,c=a),b=f[b].group.firstAtomIndex,c=f[c].group.lastAtomIndex),a=new JU.BS,a.setBits(b,c+1)));e|=this.isModel2D(a)?134217728:0;b=this.getSmilesMatcher();return JV.JC.isSmilesCanonical(g)?(e=b.getSmiles(f,this.ms.ac,a,"/noAromatic/",e),this.getChemicalInfo(e,"smiles",null).trim()):b.getSmiles(f,this.ms.ac,a,j,e)},"JU.BS,~N,~N,~N,~S");
c(b,"isModel2D",function(a){a=this.getModelForAtomIndex(a.nextSetBit(0));return null!=a&&"2D".equals(a.auxiliaryInfo.get("dimension"))},"JU.BS");c(b,"alert",function(a){this.prompt(a,null,!0)},"~S");c(b,"prompt",function(a,b,c){try{return this.promptButtons(a,b,null,c)}catch(e){if(E(e,Exception))return null;throw e;}},"~S,~S,~B");c(b,"promptButtons",function(a,b,c,e){return this.$isKiosk?"null":this.apiPlatform.prompt(a,b,c,e)},"~S,~S,~A,~B");c(b,"dialogAsk",function(a,b){return prompt(a,b)},"~S,~S,java.util.Map");
c(b,"initializeExporter",function(a){var b=a.get("type").equals("JS");if(b){if(null!=this.jsExporter3D)return this.jsExporter3D.initializeOutput(this,this.privateKey,a),this.jsExporter3D}else{var c=a.get("fileName"),e=a.get("fullPath"),c=this.getOutputChannel(c,e);if(null==c)return null;a.put("outputChannel",c)}c=J.api.Interface.getOption("export.Export3D",this,"export");if(null==c)return null;a=c.initializeExporter(this,this.privateKey,this.gdata,a);b&&null!=a&&(this.jsExporter3D=c);return null==
a?null:c},"java.util.Map");c(b,"getMouseEnabled",function(){return this.refreshing&&!this.creatingImage});f(b,"calcAtomsMinMax",function(a,b){this.ms.calcAtomsMinMax(a,b)},"JU.BS,JU.BoxInfo");c(b,"getObjectMap",function(a,b){switch(b.charCodeAt(0)){case 123:null!=this.getScriptManager()&&(null!=this.definedAtomSets&&a.putAll(this.definedAtomSets),JS.T.getTokensType(a,2097152));break;case 36:case 48:this.shm.getObjectMap(a,"$"==b)}},"java.util.Map,~S");c(b,"setPicked",function(a,b){var c=null,e=null;
0<=a&&(b&&this.setPicked(-1,!1),this.g.setI("_atompicked",a),c=this.g.getParam("picked",!0),e=this.g.getParam("pickedList",!0));if(null==c||10!=c.tok)c=JS.SV.newV(10,new JU.BS),e=JS.SV.getVariableList(new JU.Lst),this.g.setUserVariable("picked",c),this.g.setUserVariable("pickedList",e);0>a||(JS.SV.getBitSet(c,!1).set(a),c=e.pushPop(null,null),10==c.tok&&e.pushPop(null,c),(10!=c.tok||!c.value.get(a))&&e.pushPop(null,JS.SV.newV(10,JU.BSUtil.newAndSetBit(a))))},"~N,~B");f(b,"runScript",function(a){return""+
this.evaluateExpression(z(-1,[z(-1,[JS.T.tokenScript,JS.T.tokenLeftParen,JS.SV.newS(a),JS.T.tokenRightParen])]))},"~S");f(b,"runScriptCautiously",function(a){var b=new JU.SB;try{if(null==this.getScriptManager())return null;this.eval.runScriptBuffer(a,b,!1)}catch(c){if(E(c,Exception))return this.eval.getErrorMessage();throw c;}return b.toString()},"~S");c(b,"setFrameDelayMs",function(a){this.ms.setFrameDelayMs(a,this.getVisibleFramesBitSet())},"~N");c(b,"getBaseModelBitSet",function(){return this.ms.getModelAtomBitSetIncludingDeleted(this.getJDXBaseModelIndex(this.am.cmi),
!0)});c(b,"clearTimeouts",function(){null!=this.timeouts&&J.thread.TimeoutThread.clear(this.timeouts)});c(b,"setTimeout",function(a,b,c){this.haveDisplay&&(!this.headless&&!this.autoExit)&&(null==a?this.clearTimeouts():(null==this.timeouts&&(this.timeouts=new java.util.Hashtable),J.thread.TimeoutThread.setTimeout(this,this.timeouts,a,b,c)))},"~S,~N,~S");c(b,"triggerTimeout",function(a){this.haveDisplay&&null!=this.timeouts&&J.thread.TimeoutThread.trigger(this.timeouts,a)},"~S");c(b,"clearTimeout",
function(a){this.setTimeout(a,0,null)},"~S");c(b,"showTimeout",function(a){return this.haveDisplay?J.thread.TimeoutThread.showTimeout(this.timeouts,a):""},"~S");c(b,"getOrCalcPartialCharges",function(a,b){null==a&&(a=this.bsA());a=JU.BSUtil.copy(a);JU.BSUtil.andNot(a,b);JU.BSUtil.andNot(a,this.ms.bsPartialCharges);a.isEmpty()||this.calculatePartialCharges(a);return this.ms.getPartialCharges()},"JU.BS,JU.BS");c(b,"calculatePartialCharges",function(a){if(null==a||a.isEmpty())a=this.getFrameAtoms();
a.isEmpty()||(JU.Logger.info("Calculating MMFF94 partial charges for "+a.cardinality()+" atoms"),this.getMinimizer(!0).calculatePartialCharges(this.ms,a,null))},"JU.BS");c(b,"setCurrentModelID",function(a){var b=this.am.cmi;0<=b&&this.ms.setInfo(b,"modelID",a)},"~S");c(b,"cacheClear",function(){this.fm.cacheClear();this.ligandModels=this.ligandModelSet=null;this.ms.clearCache();this.cm.ce.clearCache()});c(b,"cachePut",function(a,b){JU.Logger.info("Viewer cachePut "+a);this.fm.cachePut(a,b)},"~S,~O");
c(b,"cacheFileByName",function(a,b){return null==a?(this.cacheClear(),-1):this.fm.cacheFileByNameAdd(a,b)},"~S,~B");c(b,"clearThreads",function(){null!=this.eval&&this.eval.stopScriptThreads();this.stopMinimization();this.tm.clearThreads();this.setAnimationOn(!1)});c(b,"getEvalContextAndHoldQueue",function(a){if(null==a||!JV.Viewer.isJS&&!this.testAsync)return null;a.pushContextDown("getEvalContextAndHoldQueue");a=a.getThisContext();a.setMustResume();this.queueOnHold=a.isJSThread=!0;return a},"J.api.JmolScriptEvaluator");
c(b,"getDefaultPropertyParam",function(a){return this.getPropertyManager().getDefaultPropertyParam(a)},"~N");c(b,"getPropertyNumber",function(a){return this.getPropertyManager().getPropertyNumber(a)},"~S");c(b,"checkPropertyParameter",function(a){return this.getPropertyManager().checkPropertyParameter(a)},"~S");c(b,"extractProperty",function(a,b,c){return this.getPropertyManager().extractProperty(a,b,c,null,!1)},"~O,~O,~N");c(b,"addHydrogens",function(a,b){var c=1==(b&1),e=8==(b&8),g=null==a;null==
a&&(a=this.getModelUndeletedAtomsBitSet(this.getVisibleFramesBitSet().length()-1));var j=new JU.BS;if(a.isEmpty())return j;var f=new JU.Lst,g=this.getAdditionalHydrogens(a,f,b|(g?256:0)),l=!1,l=this.g.appendNew;if(0<g.length){this.clearModelDependentObjects();try{j=e&&f.get(0).mi==this.ms.mc-1?this.ms.addHydrogens(f,g):this.addHydrogensInline(a,f,g,null),this.setModelkitPropertySafely("updateatomkeys",a)}catch(m){if(E(m,Exception))System.out.println(m.toString());else throw m;}l&&(this.g.appendNew=
!0)}c||this.scriptStatus(J.i18n.GT.i(J.i18n.GT.$("{0} hydrogens added"),g.length));return j},"JU.BS,~N");c(b,"addHydrogensInline",function(a,b,c,e){return null==this.getScriptManager()?null:this.scm.addHydrogensInline(a,b,c,e)},"JU.BS,JU.Lst,~A,java.util.Map");f(b,"evalFunctionFloat",function(a,b,c){return null==this.getScriptManager()?0:this.eval.evalFunctionFloat(a,b,c)},"~O,~O,~A");c(b,"evalParallel",function(a,b){this.displayLoadErrors=!1;var c=null!=this.getScriptManager()&&this.eval.evalParallel(a,
null==b?this.shm:b);this.displayLoadErrors=!0;return c},"JS.ScriptContext,JV.ShapeManager");f(b,"evaluateExpression",function(a){return null==this.getScriptManager()?null:this.eval.evaluateExpression(a,!1,!1)},"~O");f(b,"evaluateExpressionAsVariable",function(a){return null==this.getScriptManager()?null:this.eval.evaluateExpression(a,!0,!1)},"~O");c(b,"getAtomBitSet",function(a){if(C(a,"JU.BS"))return this.slm.excludeAtoms(a,!1);this.getScriptManager();return this.getAtomBitSetEval(this.eval,a)},
"~O");c(b,"getScriptContext",function(a){return null==this.getScriptManager()?null:this.eval.getScriptContext(a)},"~S");c(b,"getAtomDefs",function(a){var b=new JU.Lst,c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);)C(c.getValue(),"JU.BS")&&b.addLast("{"+c.getKey()+"} <"+c.getValue().cardinality()+" atoms>\n");c=b.size();a=Array(c);b.toArray(a);java.util.Arrays.sort(a);for(var b=new JU.SB,e=0;e<c;e++)b.append(a[e]);return b.append("\n").toString()},"java.util.Map");c(b,"setCGO",function(a){this.shm.loadShape(23);
this.shm.setShapePropertyBs(23,"setCGO",a,null)},"java.util.Map");c(b,"setModelSet",function(a){this.ms=this.mm.modelSet=a},"JM.ModelSet");c(b,"setObjectProp",function(a,b){this.getScriptManager();null==a&&(a="*");return null==this.eval?null:this.eval.setObjectPropSafe(a,b)},"~S,~N");c(b,"setDihedrals",function(a,b,c){null==b&&(b=this.ms.getBsBranches(a));this.ms.setDihedrals(a,b,c)},"~A,~A,~N");c(b,"getChainID",function(a,b){var c=this.chainMap.get(a);if(null!=c)return c.intValue();var e=a.charAt(0).charCodeAt(0);
if(1<a.length)e=300+this.chainList.size();else if((b||this.chainCaseSpecified)&&97<=e&&122>=e)e+=159;if(256<=e){c=this.chainMap.get(a);if(null!=c)return c.intValue();this.chainCaseSpecified=(new Boolean(this.chainCaseSpecified|b)).valueOf();this.chainList.addLast(a)}c=Integer.$valueOf(e);this.chainMap.put(c,a);this.chainMap.put(a,c);return e},"~S,~B");c(b,"getChainIDStr",function(a){return this.chainMap.get(Integer.$valueOf(a))},"~N");c(b,"getScriptQueueInfo",function(){return null!=this.scm&&this.scm.isQueueProcessing()?
Boolean.TRUE:Boolean.FALSE});c(b,"getNMRCalculation",function(){return null==this.nmrCalculation?(this.nmrCalculation=J.api.Interface.getOption("quantum.NMRCalculation",this,"script")).setViewer(this):this.nmrCalculation});c(b,"getDistanceUnits",function(a){null==a&&(a=this.getDefaultMeasurementLabel(2));var b=a.indexOf("//");return 0>b?this.g.measureDistanceUnits:a.substring(b+2)},"~S");c(b,"calculateFormalCharges",function(a){return this.ms.fixFormalCharges(null==a?this.bsA():a)},"JU.BS");c(b,"setModulation",
function(a,b,c,e){e&&this.g.setO("_modt",JU.Escape.eP(c));this.ms.setModulation(null==a?this.getAllAtoms():a,b,c,e);this.refreshMeasures(!0)},"JU.BS,~B,JU.P3,~B");c(b,"checkInMotion",function(a){switch(a){case 0:this.setTimeout("_SET_IN_MOTION_",0,null);break;case 1:this.inMotion||this.setTimeout("_SET_IN_MOTION_",2*this.g.hoverDelayMs,"!setInMotion");break;case 2:this.setInMotion(!0),this.refresh(3,"timeoutThread set in motion")}},"~N");c(b,"checkMotionRendering",function(a){if(!this.getInMotion(!0)&&
!this.tm.spinOn&&!this.tm.vibrationOn&&!this.am.animationOn)return!0;if(this.g.wireframeRotation)return!1;var b=0;switch(a){case 1677721602:case 1153433601:b=2;break;case 1112150020:b=3;break;case 1112150021:b=4;break;case 1112152066:b=5;break;case 1073742018:b=6;break;case 1111490588:b=7;break;case 603979786:b=8}return this.g.platformSpeed>=b},"~N");c(b,"openExportChannel",function(a,b,c){return this.getOutputManager().openOutputChannel(a,b,c,!1)},"~N,~S,~B");f(b,"log",function(a){null!=a&&this.getOutputManager().logToFile(a)},
"~S");c(b,"getLogFileName",function(){return null==this.logFileName?"":this.logFileName});c(b,"getCommands",function(a,b,c){return this.getStateCreator().getCommands(a,b,c)},"java.util.Map,java.util.Map,~S");c(b,"allowCapture",function(){return!this.isApplet||this.isSignedApplet});c(b,"compileExpr",function(a){var b=null==this.getScriptManager()?null:this.eval.evaluateExpression(a,!1,!0);return C(b,Array)?b:z(-1,[JS.T.o(4,a)])},"~S");c(b,"checkSelect",function(a,b){return null!=this.getScriptManager()&&
this.eval.checkSelect(a,b)},"java.util.Map,~A");c(b,"getAnnotationInfo",function(a,b,c){return this.getAnnotationParser(c).getAnnotationInfo(this,a,b,c,this.am.cmi)},"JS.SV,~S,~N");c(b,"getAtomValidation",function(a,b){return this.getAnnotationParser(1073742189).getAtomValidation(this,a,b)},"~S,JM.Atom");c(b,"dragMinimizeAtom",function(a){this.stopMinimization();var b=0,c=this.getOperativeSymmetry();null!=c&&(b=256);c=0!=b?null:this.getMotionFixedAtoms(c,null).isEmpty()?this.ms.getAtoms(this.ms.isAtomPDB(a)?
1086324742:1094713360,JU.BSUtil.newAndSetBit(a)):JU.BSUtil.setAll(this.ms.ac);try{this.minimize(this.eval,2147483647,0,c,null,null,0,b)}catch(e){if(E(e,Exception)){if(this.async){var g=(R("JV.Viewer$1")?0:JV.Viewer.$Viewer$1$(),T(JV.Viewer$1,this,Ia("me",this,"iAtom",a)));setTimeout(function(){g.run()},100)}}else throw e;}},"~N");c(b,"getJBR",function(){return null==this.jbr?this.jbr=J.api.Interface.getInterface("JM.BioResolver",this,"file").setViewer(this):this.jbr});c(b,"checkMenuUpdate",function(){null!=
this.jmolpopup&&this.jmolpopup.jpiUpdateComputedMenus()});c(b,"getChimeMessenger",function(){return null==this.jcm?this.jcm=J.api.Interface.getInterface("JV.ChimeMessenger",this,"script").set(this):this.jcm});c(b,"getModelSetAuxiliaryInfoForAtoms",function(a){return this.ms.getModelSetAuxiliaryInfo(this.ms.getModelBS(this.getAtomBitSet(a),!1))},"~O");c(b,"getJSJSONParser",function(){return null==this.jsonParser?this.jsonParser=J.api.Interface.getInterface("JU.JSJSONParser",this,"script"):this.jsonParser});
c(b,"parseJSON",function(a){return null==a?null:(a=a.trim()).startsWith("{")?this.parseJSONMap(a):this.parseJSONArray(a)},"~S");c(b,"parseJSONMap",function(a){return this.getJSJSONParser().parseMap(a,!0)},"~S");c(b,"parseJSONArray",function(a){return this.getJSJSONParser().parse(a,!0)},"~S");c(b,"getSymTemp",function(){return J.api.Interface.getSymmetry(this,"temp")});c(b,"getSymStatic",function(){return null==this.symStatic?this.symStatic=J.api.Interface.getSymmetry(this,"static"):this.symStatic});
c(b,"setWindowDimensions",function(a){this.resizeInnerPanel(F(a[0]),F(a[1]))},"~A");c(b,"getTriangulator",function(){return null==this.triangulator?this.triangulator=J.api.Interface.getUtil("Triangulator",this,"script"):this.triangulator});c(b,"getCurrentModelAuxInfo",function(){return 0<=this.am.cmi?this.ms.getModelAuxiliaryInfo(this.am.cmi):null});c(b,"connectNBO",function(a){0>this.am.cmi||this.getNBOParser().connectNBO(this.am.cmi,a)},"~S");c(b,"getNBOParser",function(){return null==this.nboParser?
this.nboParser=J.api.Interface.getInterface("J.adapter.readers.quantum.NBOParser",this,"script").set(this):this.nboParser});c(b,"getNBOAtomLabel",function(a){return this.getNBOParser().getNBOAtomLabel(a)},"JM.Atom");c(b,"calculateChirality",function(a){null==a&&(a=this.bsA());return this.ms.calculateChiralityForAtoms(a,!0)},"JU.BS");c(b,"getSubstructureSetArray",function(a,b,c){return this.getSmilesMatcher().getSubstructureSetArray(a,this.ms.at,this.ms.ac,b,null,c)},"~O,JU.BS,~N");c(b,"getSubstructureSetArrayForNodes",
function(a,b,c){return this.getSmilesMatcher().getSubstructureSetArray(a,b,b.length,null,null,c)},"~O,~A,~N");c(b,"getSmilesAtoms",function(a){return this.getSmilesMatcher().getAtoms(a)},"~S");c(b,"calculateChiralityForSmiles",function(a){try{return J.api.Interface.getSymmetry(this,"smiles").calculateCIPChiralityForSmiles(a)}catch(b){if(E(b,Exception))return null;throw b;}},"~S");c(b,"getPdbID",function(){return this.ms.getInfo(this.am.cmi,JV.JC.getBoolName(4))===Boolean.TRUE?this.ms.getInfo(this.am.cmi,
"pdbID"):null});c(b,"getModelInfo",function(a){return this.ms.getInfo(this.am.cmi,a)},"~S");c(b,"notifyScriptEditor",function(a,b){null!=this.scriptEditor&&this.scriptEditor.notify(a,b)},"~N,~A");c(b,"sendConsoleMessage",function(a){null!=this.appConsole&&this.appConsole.sendConsoleMessage(a)},"~S");c(b,"getModelkitPropertySafely",function(a){return null==this.modelkit?null:null==a?Boolean.TRUE:this.modelkit.getProperty(a)},"~S");c(b,"setModelkitPropertySafely",function(a,b){return null==this.modelkit?
null:this.modelkit.setProperty(a,b)},"~S,~O");c(b,"isModelKitOption",function(a,b){return null!=this.modelkit&&this.modelkit.checkOption(a,b)},"~S,~S");c(b,"getSymmetryInfo",function(a,b,c,e,g,j,f,l,m,n,q,v){try{return this.getSymTemp().getSymmetryInfoAtom(this.ms,a,b,c,e,g,j,l,f,m,n,q,v)}catch(r){if(E(r,Exception))return System.out.println("Exception in Viewer.getSymmetryInfo: "+r),JV.Viewer.isJS||r.printStackTrace(),null;throw r;}},"~N,~S,~N,JU.P3,JU.P3,JU.P3,~N,~S,~N,~N,~N,~A");c(b,"getMacro",
function(a){if(null==this.macros||this.macros.isEmpty())try{var b=this.getAsciiFileOrNull(this.g.macroDirectory+"/macros.json");this.macros=this.parseJSON(b)}catch(c){if(E(c,Exception))this.macros=new java.util.Hashtable;else throw c;}if(null==a){var b=new JU.SB,e;for(a=this.macros.keySet().iterator();a.hasNext()&&((e=a.next())||1);){var g=this.macros.get(e);b.append(e).append("\t").appendO(g).append("\n")}return b.toString()}a=a.toLowerCase();return this.macros.containsKey(a)?this.macros.get(a).get("path").toString():
null},"~S");c(b,"getConsoleFontScale",function(){return this.consoleFontScale});c(b,"setConsoleFontScale",function(a){this.consoleFontScale=a},"~N");c(b,"confirm",function(a,b){return this.apiPlatform.confirm(a,b)},"~S,~S");c(b,"evalStringGUI",function(a){this.evalStringQuiet(a+"; ## GUI ##")},"~S");c(b,"selectStatus",function(a,b,c,e,g){this.select(a,b,c,e);g&&this.setStatusSelect(a)},"JU.BS,~B,~N,~B,~B");c(b,"setStatusSelect",function(a){this.hasSelected=!1;this.sm.setStatusSelect(null==a?this.bsA():
a)},"JU.BS");c(b,"wasmInchiHack",function(a){(JV.Viewer.isJS&&(0<=a.indexOf("inchi")||0<=a.indexOf("INCHI"))||0<=a.indexOf("TAUTOMER")||0<=a.indexOf("tautomer"))&&this.getInchi(null,null,null);return a},"~S");c(b,"getInchi",function(a,b,c){try{var e=this.apiPlatform.getInChI();if(null==a&&null==b)return"";if("string"==typeof b){var g=b;g.startsWith("$")||g.startsWith(":")?b=this.getFileAsString4(g,-1,!1,!1,!0,"script"):!g.startsWith("InChI=")&&0>g.indexOf(" ")&&(g=this.setLoadFormat(!1,"$"+b,"$",
!1),b=this.getFileAsString4(g,-1,!1,!1,!0,"script"))}return e.getInchi(this,a,b,c)}catch(j){return""}},"JU.BS,~O,~S");c(b,"findSpaceGroup",function(a,b,c,e,g,j,f){var l=null;if(null==b&&null==c||0!=(f&2))b=this.getThisModelAtoms();null==c?b.isEmpty()||(a=null==a?this.getOperativeSymmetry():a,l=null==a?null:a.findSpaceGroup(b,null,e,null,j,f)):(l=this.getSymTemp(),l.setSpaceGroupTo(a),l=l.findSpaceGroup(b,c,e,g,j,f));return null==l&&0!=(f&1)?"":l},"J.api.SymmetryInterface,JU.BS,~S,~A,JU.T3,~A,~N");
c(b,"restrictToModel",function(a,b){null==a&&(a=this.bsA());var c=a.isEmpty();if(c&&0<=b)return a;-1==b&&(b=this.am.cmi);if(0>b){if(c)return this.getThisModelAtoms();b=this.ms.at[a.nextSetBit(0)].getModelIndex()}c=this.getModelUndeletedAtomsBitSet(b);c.and(a);return c},"JU.BS,~N");c(b,"getThisModelAtoms",function(){return this.getModelUndeletedAtomsBitSet(this.getVisibleFramesBitSet().nextSetBit(0))});c(b,"getSymmetryEquivPoints",function(a,b){var c=this.getCurrentUnitCell();return null==c?new JU.Lst:
c.getEquivPoints(a,b,0)},"JU.Point3fi,~S");c(b,"getSymmetryEquivPointList",function(a,b){var c=this.getCurrentUnitCell();if(null==c)return new JU.Lst;c.getEquivPointList(0,b.toLowerCase(),null,0,a,null);return a},"JU.Lst,~S");c(b,"getOperativeSymmetry",function(){var a=this.getCurrentUnitCell();return null==a||null==a.getSymmetryOperations()?null:a});c(b,"formatText",function(a){if(0>a.indexOf("@{")&&0>a.indexOf("%{"))return a;var b=a,c=0<=b.indexOf("\\");c&&(b=JU.PT.rep(b,"\\%","\u0001"),b=JU.PT.rep(b,
"\\@","\u0002"),c=!b.equals(a));for(var b=JU.PT.rep(b,"%{","@{"),e;0<=(a=b.indexOf("@{"));){a++;var g=a+1;e=b.length;for(var j=1,f="\x00",l="\x00";0<j&&++a<e;){var m=b.charAt(a);if("\x00"!=f)"\\"==l?m="\x00":m==f&&(f="\x00"),l=m;else switch(m.charCodeAt(0)){case 39:case 34:f=m;break;case 123:j++;break;case 125:j--}}if(a>=e)return b;e=b.substring(g,a);if(0==e.length)return b;e=this.evaluateExpression(e);C(e,"JU.P3")&&(e=JU.Escape.eP(e));b=b.substring(0,g-2)+e.toString()+b.substring(a+1)}c&&(b=JU.PT.rep(b,
"\u0002","@"),b=JU.PT.rep(b,"\u0001","%"));return b},"~S");c(b,"getScaleText",function(a,b,c,e){a=JM.Measurement.fixUnits(0<a.length?(a.startsWith("//")?a.substring(2):a).toLowerCase():this.g.measureDistanceUnits.equals("vdw")?"angstroms":this.g.measureDistanceUnits);0==JM.Measurement.fromUnits(1,a)&&(a=JM.Measurement.fixUnits(this.g.measureDistanceUnits));if(null==e)return a;var g=this.tm.modelRadius*this.tm.scaleDefaultPixelsPerAngstrom/this.tm.scalePixelsPerAngstrom/4,j=b?2:1,f=0,l=b=0,m=0;for(c=
2*(c*this.imageFontScaling/j);b<c;)l=JM.Measurement.toUnits(g,a,!1),f=w(Math.floor(Math.log10(l))),m=Math.pow(10,f),l=JM.Measurement.fromUnits(m+1E-6,a),b=F(l*this.tm.scalePixelsPerAngstrom/j),b<c&&(g*=10);c=0<=f?" "+F(m)+" ":" 0."+"000000000".substring(0,-1-f)+"1 ";e[0]=b;e[1]=l;return c+a},"~S,~B,~N,~A");c(b,"setStatusAtomMoved",function(a,b){a&&this.checkMinimization();this.sm.setStatusAtomMoved(b)},"~B,JU.BS");c(b,"getFormulaForAtoms",function(a,b,c){return JU.JmolMolecule.getMolecularFormulaAtoms(this.ms.at,
a,"CELLFORMULA".equals(b)?this.ms.getCellWeights(a):null,c)},"JU.BS,~S,~B");c(b,"evalCallback",function(a,b,c){null!=this.getScriptManager()&&this.scm.evalCallback(a,b,c)},"~S,~A,~B");c(b,"checkConsoleScript",function(a){return 0==a.indexOf("JSCONSOLE")?(this.html5Applet._showInfo(0>a.indexOf("CLOSE")),0<=a.indexOf("CLEAR")&&this.html5Applet._clearConsole(),!0):!1},"~S");c(b,"haveAccessInternal",function(a){if(null==a)return this.access===JV.Viewer.ACCESS.INTERNAL;if(JV.Viewer.isJS)return!0;a=a.$replace("\\",
"/");var b=this.access!==JV.Viewer.ACCESS.NONE&&(null==this.internalAccessPath||this.access!==JV.Viewer.ACCESS.INTERNAL||a.startsWith(this.internalAccessPath));b||System.err.println("Viewer: Internal file access in "+this.internalAccessPath+" denied for "+a);return b},"~S");c(b,"setAccessInternal",function(a){JV.Viewer.isJS||(null==a?this.access=this.access0:this.access!==JV.Viewer.ACCESS.INTERNAL&&(this.access=JV.Viewer.ACCESS.INTERNAL),this.internalAccessPath=a)},"~S");c(b,"getItaNumberFor",function(a){a=
this.getSymStatic().getSpaceGroupInfoObj("itaNumber",a,!1,!1);return null==a?-1:JU.PT.parseInt(a)},"~S");c(b,"is2D",function(){return this.getBoolean(603979882)});c(b,"getUnitCellCenter",function(){var a=this.getCurrentUnitCell();return null==a?new JU.P3:a.getUnitCellCenter()});c(b,"setUnitCellAtomIndex",function(a){var b=this.getCurrentUnitCell();null!=b&&b.setOffsetPt(new JU.P3);this.am.setUnitCellAtomIndex(a)},"~N");c(b,"getUnitCellAtomIndex",function(){return this.am.getUnitCellAtomIndex()});
c(b,"writeBinaryFile",function(a,b){var c=new java.util.Hashtable,e=new JU.Lst;e.addLast(b);c.put("imageData",e);c.put("fileName",a);c.put("type","BINARY");return this.getOutputManager().outputToFile(c)},"~S,~A");c(b,"rotateModelSpinVectors",function(a,b){null!=this.ms.vibrations&&(0>a&&(a=this.am.cmi),0>a||a>=this.ms.mc||(null==b&&this.tm.setSpinOff(),0<=this.ms.vib.rotateModelSpinVectors(this.ms,a,b,!1)&&this.updatePointGroup(a)))},"~N,JU.M3");c(b,"updatePointGroup",function(){},"~N");c(b,"rotateSpins",
function(a,b){if(null!=this.ms.vib){var c=new JU.M3;if(c.setAsBallRotation(0.017453292519943295,-b,-a)){var e=this.am.splitFrame?this.am.getSplitFrameModel():this.am.cmi;0<=this.ms.vib.rotateModelSpinVectors(this.ms,e,c,!0)&&this.updatePointGroup(e);this.refresh(2,this.sm.syncingMouse?"Mouse: rotateSpins "+a+" "+b:"")}}},"~N,~N");c(b,"setSelectionColors",function(a,b,c,e){this.slm.setSelectionColors(a,b,c,e)},"Integer,Integer,~S,~N");c(b,"plugin",function(a,b,c){var e=new java.util.Hashtable;e.put("service",
a);e.put("action",b);e.put("options",c);this.sm.processService(e);return e},"~S,~S,~S");c(b,"isPluginAtive",function(a){return this.pluginRequest(a,"isactive",null).booleanValue()},"~S");c(b,"startPlugin",function(a){this.plugin(a,"start",null)},"~S");c(b,"pluginRequest",function(a,b,c){return this.sm.processPluginRequest(a,b,c)},"~S,~S,~O");c(b,"getCurrentModelFile",function(a,b){null==a&&(a=this.getParameter("_modelFile"));if((""+a).equals("null")){var c=this.ms.getInlineData(this.am.cmi);return!b?
c:c.startsWith(";base64,")?JU.Base64.decodeBase64(c):c.getBytes()}return b?this.fm.getFileAsBytes(a,null):this.getFileAsString(a)},"~S,~B");c(b,"movetoHome",function(a,b){this.moveTo(a,b,null,JV.JC.axisZ,0,null,100,0,0,0,null,NaN,NaN,NaN,NaN,NaN,NaN)},"JS.ScriptEval,~N");b.$Viewer$1$=function(){var a=Y(JV,"Viewer$1",null,Runnable);f(a,"run",function(){this.f$.me.dragMinimizeAtom(this.f$.iAtom)})};var a=G(JV.Viewer,"ACCESS",Enum);A(a,"NONE",0,[]);A(a,"READSPT",1,[]);A(a,"ALL",2,[]);A(a,"INTERNAL",
3,[]);self.Jmol&&Jmol.extend&&Jmol.extend("vwr",JV.Viewer.prototype);b.isJS=!1;b.isSwingJS=!1;b.isJmolSwingJS=!1;b.appletDocumentBase="";b.appletCodeBase="";b.appletIdiomaBase=null;b.jsDocumentBase="";b.jmolObject=null;b.strJavaVendor="Java: "+System.getProperty("java.vendor","j2s");b.strOSName=System.getProperty("os.name","");b.strJavaVersion="Java "+System.getProperty("java.version","");b.version_date=null;b.staticFunctions=new java.util.Hashtable;b.nProcessors=1;b.isHighPrecision=!1});x(["java.util.AbstractMap",
"$.AbstractSet","$.Iterator","$.Map","$.MapEntry"],"java.util.HashMap",["java.util.AbstractCollection","$.Arrays","java.util.MapEntry.Type"],function(){var b=s(function(){this.elementCount=0;this.elementData=null;this.modCount=this.threshold=this.loadFactor=0;this.__m=this.$entrySet=null;this.__allowJS=!1;r(this,arguments)},java.util,"HashMap",java.util.AbstractMap,[java.util.Map,Cloneable,java.io.Serializable]);u(b,function(a,b){this.initHM(a||16,b||0.75)});c(b,"newElementArray",function(a){return Array(a)},
"~N");c(b,"initHM",function(a,b){var c=null;"object"==typeof a?(c=a,this.__allowJS=c.__allowJS,a=6>c.size()?11:2*c.size()):this.__allowJS=!0;!a&&(a=0);!b&&(b=0.75);0==a&&(a=16);if(0<=a)this.elementCount=0,this.elementData=this.newElementArray(0==a?1:a),this.loadFactor=b,this.computeMaxSize();else throw new IllegalArgumentException;this.__setJS();null!=c&&this.putAll(c)},"~N,~N");c(b,"putMapEntries",function(a,b){if(0!=a.size()){var c=null,e=null;if(java.util.HashMap.__isSimple(this)&&java.util.HashMap.__isSimple(a)){var g=
this,j=java.util.HashMap.__hasKey(g,c);a.__m.forEach(function(a,c){g.putJSVal(0,c,a,!1,b,j)})}else if(java.util.HashMap.__isSimple(a))g=this,a.__m.forEach(function(a,b){g.putJavaValue(b,a)});else{this.__m=null;for(var f,l=a.entrySet().iterator();l.hasNext()&&((f=l.next())||1);)c=f.getKey(),e=f.getValue(),this.putJavaValue(c,e)}}},"java.util.Map,~B");c(b,"reinitialize",function(){this.$values=this.$keySet=this.$entrySet=this.elementData=null;this.elementCount=this.threshold=this.modCount=0;this.__setJS()});
f(b,"clear",function(){this.modCount++;java.util.HashMap.__isSimple(this)&&this.__m.clear();this.__setJS();0<this.elementCount&&(this.elementCount=0,java.util.Arrays.fill(this.elementData,null),this.modCount++)});c(b,"clone",function(){var a;try{a=ba(this,java.util.HashMap,"clone",[])}catch(b){if(E(b,"CloneNotSupportedException"))return null;throw b;}a.reinitialize();a.putMapEntries(this,!1);return a});c(b,"computeMaxSize",function(){this.threshold=F(this.elementData.length*this.loadFactor)});f(b,
"containsKey",function(a){switch(java.util.HashMap.__hasKey(this,a)){case 1:java.util.HashMap.__ensureJavaMap(this);break;case 2:return!1;case 3:return!0}return null!=this.getJavaEntry(a)},"~O");c(b,"keysEqual",function(a,b){return(null==a?0:a.hashCode())!=b.origKeyHash?!1:null==a&&null==b.key?!0:a.equals(b.key)},"~O,java.util.HashMap.Entry");f(b,"containsValue",function(a){if(java.util.HashMap.__isSimple(this))for(var b=this.__m.values(),c=b.next();!c.done;c=b.next()){if(c.value==a||c.value.equals$O(a))return!0}else if(null!=
a)for(b=this.elementData.length;0<=--b;)for(c=this.elementData[b];null!=c;){if(a.equals(c.value))return!0;c=c.next}else for(b=this.elementData.length;0<=--b;)for(c=this.elementData[b];null!=c;){if(null==c.value)return!0;c=c.next}return!1},"~O");f(b,"entrySet",function(){var a;return null==(a=this.$entrySet)?this.$entrySet=new java.util.HashMap.HashMapEntrySet(this):a});f(b,"get",function(a){switch(java.util.HashMap.__hasKey(this,a)){case 1:java.util.HashMap.__ensureJavaMap(this);break;case 2:return null;
case 3:var b=null;return b=this.__m.get(a)}a=this.getJavaEntry(a);return null==a?null:a.value},"~O");c(b,"getJavaEntry",function(a){var b=this.getModuloHash(a);return this.findJavaEntry(a,b)},"~O");c(b,"getModuloHash",function(a){return null==a?0:(a.hashCode()&2147483647)%this.elementData.length},"~O");c(b,"findJavaEntry",function(a,b){var c;c=this.elementData[b];if(null!=a)for(;null!=c&&!this.keysEqual(a,c);)c=c.next;else for(;null!=c&&null!=c.key;)c=c.next;return c},"~O,~N");f(b,"isEmpty",function(){return 0==
this.size()});f(b,"keySet",function(){null==this.$keySet&&(this.$keySet=(R("java.util.HashMap$1")?0:java.util.HashMap.$HashMap$1$(),T(java.util.HashMap$1,this,null)));return this.$keySet});f(b,"put",function(a,b){var c=java.util.HashMap.__hasKey(this,a);switch(c){case 1:java.util.HashMap.__ensureJavaMap(this);break;case 2:case 3:return this.putJSVal(1,a,b,!1,!0,c)}return this.putJavaValue(a,b)},"~O,~O");c(b,"putJavaValue",function(a,b){var c=this.getModuloHash(a),e=this.findJavaEntry(a,c);if(null==
e)return this.modCount++,++this.elementCount>this.threshold&&(this.rehash(),c=null==a?0:(a.hashCode()&2147483647)%this.elementData.length),this.createEntry(a,c,b),null;c=e.value;e.value=b;return c},"~O,~O");c(b,"createEntry",function(a,b,c){a=new java.util.HashMap.Entry(a,c);a.next=this.elementData[b];return this.elementData[b]=a},"~O,~N,~O");f(b,"putAll",function(a){if(!a.isEmpty()){var b;for(a=a.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.put(b.getKey(),b.getValue())}},"java.util.Map");
c(b,"putJSVal",function(a,b,c,e,g,j){g=null;switch(j){case 2:this.__m.set(b,c);++this.modCount;break;case 3:0!=a&&(g=this.__m.get(b)||null),(!e||null==g)&&this.__m.set(b,c)}return g},"~N,~O,~O,~B,~B,~N");c(b,"rehashImpl",function(a){a=0==a?1:a<<1;for(var b=this.newElementArray(a),c=0;c<this.elementData.length;c++)for(var e=this.elementData[c];null!=e;){var g=e.key,g=null==g?0:(g.hashCode()&2147483647)%a,j=e.next;e.next=b[g];b[g]=e;e=j}this.elementData=b;this.computeMaxSize()},"~N");c(b,"rehash",function(){this.rehashImpl(this.elementData.length)});
f(b,"remove",function(a){switch(java.util.HashMap.__hasKey(this,a)){case 1:java.util.HashMap.__ensureJavaMap(this);break;case 2:return null;case 3:return this.removeJSNode(1,a,null,!1,!0)}a=this.removeJavaEntry(a);return null==a?null:a.value},"~O");c(b,"removeJSNode",function(a,b,c,e){var g=null;if(1==a||e)g=this.__m.get(b)||null;if(!e||g===c||null!=c&&c.equals(g))switch(this.__m["delete"](b),++this.modCount,a){case 1:return g;case 3:return"true"}return null},"~N,~O,~O,~B,~B");c(b,"removeJavaEntry",
function(a){var b=0,c,e=null;if(null!=a){b=(a.hashCode()&2147483647)%this.elementData.length;for(c=this.elementData[b];null!=c&&!this.keysEqual(a,c);)e=c,c=c.next}else for(c=this.elementData[0];null!=c&&null!=c.key;)e=c,c=c.next;if(null==c)return null;null==e?this.elementData[b]=c.next:e.next=c.next;this.modCount++;this.elementCount--;return c},"~O");f(b,"size",function(){return this.__m?this.__m.size:this.elementCount});f(b,"values",function(){null==this.$values&&(this.$values=(R("java.util.HashMap$2")?
0:java.util.HashMap.$HashMap$2$(),T(java.util.HashMap$2,this,null)));return this.$values});c(b,"__setJS",function(){if(this.__allowJS&&java.util.HashMap.USE_SIMPLE){var a=null;this.__m=a=new Map}else this.__m=null});b.__get=c(b,"__get",function(a,b){return a.__m.get(null==b?null:b+"")},"~O,~O");b.__set=c(b,"__set",function(a,b,c){a.__m.set(null==b?null:b+"",c)},"java.util.Map,~O,~O");b.__hasKey=c(b,"__hasKey",function(a,b){return!a.__m?0:null!=b&&"string"!=typeof b?1:a.__m.has(b)?3:2},"java.util.Map,~O");
b.__isSimple=c(b,"__isSimple",function(a){return!!a.__m},"java.util.Map");b.__ensureJavaMap=c(b,"__ensureJavaMap",function(a){if(a.__m){var b=a.__m;a.__m=null;b.forEach(function(b,c){a.put(c,b)});b.clear()}},"java.util.Map");b.$HashMap$1$=function(){var a=Y(java.util,"HashMap$1",java.util.AbstractSet);f(a,"contains",function(a){return this.b$["java.util.HashMap"].containsKey(a)},"~O");f(a,"size",function(){return this.b$["java.util.HashMap"].size()});f(a,"clear",function(){this.b$["java.util.HashMap"].clear()});
f(a,"remove",function(a){if(!this.b$["java.util.HashMap"].containsKey(a))return!1;this.b$["java.util.HashMap"].remove(a);return!0},"~O");f(a,"iterator",function(){return new java.util.HashMap.HashMapIterator((R("java.util.HashMap$1$1")?0:java.util.HashMap.$HashMap$1$1$(),T(java.util.HashMap$1$1,this,null)),this.b$["java.util.HashMap"])})};b.$HashMap$1$1$=function(){var a=Y(java.util,"HashMap$1$1",null,java.util.MapEntry.Type);f(a,"get",function(a){return java.util.HashMap.__isSimple(this.b$["java.util.HashMap"])?
null==a?null:a.value[0]:a.key},"java.util.MapEntry")};b.$HashMap$2$=function(){var a=Y(java.util,"HashMap$2",java.util.AbstractCollection);f(a,"contains",function(a){return this.b$["java.util.HashMap"].containsValue(a)},"~O");f(a,"size",function(){return this.b$["java.util.HashMap"].size()});f(a,"clear",function(){this.b$["java.util.HashMap"].clear()});f(a,"iterator",function(){return new java.util.HashMap.HashMapIterator((R("java.util.HashMap$2$1")?0:java.util.HashMap.$HashMap$2$1$(),T(java.util.HashMap$2$1,
this,null)),this.b$["java.util.HashMap"])})};b.$HashMap$2$1$=function(){var a=Y(java.util,"HashMap$2$1",null,java.util.MapEntry.Type);f(a,"get",function(a){return java.util.HashMap.__isSimple(this.b$["java.util.HashMap"])?null==a?null:a.value[1]:a.value},"java.util.MapEntry")};var a=s(function(){this.origKeyHash=0;this.next=null;r(this,arguments)},java.util.HashMap,"Entry",java.util.MapEntry);u(a,function(a,b){K(this,java.util.HashMap.Entry,[a,b]);this.origKeyHash=null==a?0:a.hashCode()},"~O,~O");
c(a,"clone",function(){var a=ba(this,java.util.HashMap.Entry,"clone",[]);null!=this.next&&(a.next=this.next.clone());return a});a=s(function(){this.jsMapIterator=null;this.isSimple=!1;this.expectedModCount=this.index=0;this.type=null;this.canRemove=!1;this.associatedMap=this.lastEntry=this.entry=null;r(this,arguments)},java.util.HashMap,"HashMapIterator",null,java.util.Iterator);u(a,function(a,b){this.associatedMap=b;this.type=a;this.expectedModCount=b.modCount;this.lastEntry=this.entry=null;if(this.isSimple=
java.util.HashMap.__isSimple(this.associatedMap))this.jsMapIterator=this.associatedMap.__m.entries(),this.entry=this.jsMapIterator.next()},"java.util.MapEntry.Type,java.util.HashMap");f(a,"hasNext",function(){if(this.isSimple){if(null==this.entry)return!1;var a=!1,a=this.entry.done;return!a}if(null!=this.entry)return!0;for(;this.index<this.associatedMap.elementData.length;)if(null==this.associatedMap.elementData[this.index])this.index++;else return!0;return!1});c(a,"checkConcurrentMod",function(){if(this.expectedModCount!=
this.associatedMap.modCount)throw new java.util.ConcurrentModificationException;});f(a,"next",function(){this.checkConcurrentMod();if(!this.hasNext())throw new java.util.NoSuchElementException;var a=null;this.isSimple?(a=this.entry,this.entry=this.jsMapIterator.next()||null):null==this.entry?(a=this.lastEntry=this.associatedMap.elementData[this.index++],this.entry=this.lastEntry.next):(this.lastEntry.next!==this.entry&&(this.lastEntry=this.lastEntry.next),a=this.entry,this.entry=this.entry.next);
this.canRemove=!0;return this.type.get(a)});f(a,"remove",function(){this.checkConcurrentMod();if(!this.canRemove)throw new IllegalStateException;this.canRemove=!1;this.associatedMap.modCount++;if(this.lastEntry.next===this.entry){for(;null==this.associatedMap.elementData[--this.index];);this.associatedMap.elementData[this.index]=this.associatedMap.elementData[this.index].next;this.entry=null}else this.lastEntry.next=this.entry;this.associatedMap.elementCount--;this.expectedModCount++});a=s(function(){this.associatedMap=
null;r(this,arguments)},java.util.HashMap,"HashMapEntrySet",java.util.AbstractSet);u(a,function(a){K(this,java.util.HashMap.HashMapEntrySet,[]);this.associatedMap=a},"java.util.HashMap");c(a,"hashMap",function(){return this.associatedMap});f(a,"size",function(){return this.associatedMap.elementCount});f(a,"clear",function(){this.associatedMap.clear()});f(a,"remove",function(a){return this.contains(a)?(this.associatedMap.remove(a.getKey()),!0):!1},"~O");f(a,"contains",function(a){if(!C(a,"java.util.Map.Entry"))return!1;
var b=a.getKey();if(!this.associatedMap.containsKey(b))return!1;if(java.util.HashMap.__isSimple(this.associatedMap))return a=a.getValue(),b=this.associatedMap.get(b),a===b||null!=a&&a.equals(b);b=this.associatedMap.getJavaEntry(a.getKey());return a.equals(b)},"~O");f(a,"iterator",function(){return new java.util.HashMap.HashMapIterator((R("java.util.HashMap$HashMapEntrySet$1")?0:java.util.HashMap.HashMapEntrySet.$HashMap$HashMapEntrySet$1$(),T(java.util.HashMap$HashMapEntrySet$1,this,null)),this.associatedMap)});
a.$HashMap$HashMapEntrySet$1$=function(){var a=Y(java.util,"HashMap$HashMapEntrySet$1",null,java.util.MapEntry.Type);f(a,"get",function(a){if(java.util.HashMap.__isSimple(this.b$["java.util.HashMap.HashMapEntrySet"].associatedMap)){var b=null,c=null,b=a.value[0],c=a.value[1];return new java.util.HashMap.Entry(b,c)}return a},"java.util.MapEntry")};b.USE_SIMPLE=!0});x(["java.util.HashMap"],"java.util.LinkedHashMap",["java.util.AbstractCollection","$.AbstractSet","java.util.MapEntry.Type"],function(){var b=
s(function(){this.accessOrder=!1;this.tail=this.head=null;r(this,arguments)},java.util,"LinkedHashMap",java.util.HashMap);u(b,function(){this.construct(16,0.75,!1)});u(b,function(a){this.construct(a,0.75,!1)},"~N");u(b,function(a,b){this.construct(a,b,!1)},"~N,~N");u(b,function(a,b,c){K(this,java.util.LinkedHashMap,[a,b]);this.accessOrder=c;this.tail=this.head=null},"~N,~N,~B");u(b,function(a){K(this,java.util.LinkedHashMap,[]);this.accessOrder=!1;this.tail=this.head=null;this.putAll(a)},"java.util.Map");
f(b,"newElementArray",function(a){return Array(a)},"~N");f(b,"get",function(a){a=this.getJavaEntry(a);if(null==a)return null;if(this.accessOrder&&this.tail!==a){var b=a.chainBackward,c=a.chainForward;c.chainBackward=b;null!=b?b.chainForward=c:this.head=c;a.chainForward=null;a.chainBackward=this.tail;this.tail=this.tail.chainForward=a}return a.value},"~O");f(b,"createEntry",function(a,b,c){a=new java.util.LinkedHashMap.LinkedHashMapEntry(a,c);a.next=this.elementData[b];this.elementData[b]=a;this.linkEntry(a);
return a},"~O,~N,~O");f(b,"put",function(a,b){var c=this.getModuloHash(a),f=this.findJavaEntry(a,c);null==f?(this.modCount++,++this.elementCount>this.threshold&&(this.rehash(),c=null==a?0:(a.hashCode()&2147483647)%this.elementData.length),f=this.createEntry(a,c,null)):this.linkEntry(f);c=f.value;f.value=b;this.removeEldestEntry(this.head)&&this.remove(this.head.key);return c},"~O,~O");c(b,"linkEntry",function(a){if(this.tail!==a)if(null==this.head)this.head=this.tail=a;else{var b=a.chainBackward,
c=a.chainForward;null==b?null!=c?this.accessOrder&&(this.head=c,c.chainBackward=null,a.chainBackward=this.tail,a.chainForward=null,this.tail=this.tail.chainForward=a):(a.chainBackward=this.tail,a.chainForward=null,this.tail=this.tail.chainForward=a):null!=c&&this.accessOrder&&(b.chainForward=c,c.chainBackward=b,a.chainForward=null,a.chainBackward=this.tail,this.tail=this.tail.chainForward=a)}},"java.util.LinkedHashMap.LinkedHashMapEntry");f(b,"entrySet",function(){return new java.util.LinkedHashMap.LinkedHashMapEntrySet(this)});
f(b,"keySet",function(){null==this.$keySet&&(this.$keySet=(R("java.util.LinkedHashMap$1")?0:java.util.LinkedHashMap.$LinkedHashMap$1$(),T(java.util.LinkedHashMap$1,this,null)));return this.$keySet});f(b,"values",function(){null==this.$values&&(this.$values=(R("java.util.LinkedHashMap$2")?0:java.util.LinkedHashMap.$LinkedHashMap$2$(),T(java.util.LinkedHashMap$2,this,null)));return this.$values});f(b,"remove",function(a){a=this.removeJavaEntry(a);if(null==a)return null;var b=a.chainBackward,c=a.chainForward;
null!=b?b.chainForward=c:this.head=c;null!=c?c.chainBackward=b:this.tail=b;return a.value},"~O");c(b,"removeEldestEntry",function(){return!1},"java.util.Map.Entry");c(b,"clear",function(){ba(this,java.util.LinkedHashMap,"clear",[]);this.head=this.tail=null});c(b,"clone",function(){var a=ba(this,java.util.LinkedHashMap,"clone",[]);a.clear();for(var b,c=this.entrySet().iterator();c.hasNext()&&((b=c.next())||1);)a.put(b.getKey(),b.getValue());return a});f(b,"__setJS",function(){this.__m=null});b.$LinkedHashMap$1$=
function(){var a=Y(java.util,"LinkedHashMap$1",java.util.AbstractSet);f(a,"contains",function(a){return this.b$["java.util.LinkedHashMap"].containsKey(a)},"~O");f(a,"size",function(){return this.b$["java.util.LinkedHashMap"].size()});f(a,"clear",function(){this.b$["java.util.LinkedHashMap"].clear()});f(a,"remove",function(a){return this.b$["java.util.LinkedHashMap"].containsKey(a)?(this.b$["java.util.LinkedHashMap"].remove(a),!0):!1},"~O");f(a,"iterator",function(){return new java.util.LinkedHashMap.LinkedHashIterator((R("java.util.LinkedHashMap$1$1")?
0:java.util.LinkedHashMap.$LinkedHashMap$1$1$(),T(java.util.LinkedHashMap$1$1,this,null)),this.b$["java.util.LinkedHashMap"])})};b.$LinkedHashMap$1$1$=function(){var a=Y(java.util,"LinkedHashMap$1$1",null,java.util.MapEntry.Type);f(a,"get",function(a){return a.key},"java.util.MapEntry")};b.$LinkedHashMap$2$=function(){var a=Y(java.util,"LinkedHashMap$2",java.util.AbstractCollection);f(a,"contains",function(a){return this.b$["java.util.LinkedHashMap"].containsValue(a)},"~O");f(a,"size",function(){return this.b$["java.util.LinkedHashMap"].size()});
f(a,"clear",function(){this.b$["java.util.LinkedHashMap"].clear()});f(a,"iterator",function(){return new java.util.LinkedHashMap.LinkedHashIterator((R("java.util.LinkedHashMap$2$1")?0:java.util.LinkedHashMap.$LinkedHashMap$2$1$(),T(java.util.LinkedHashMap$2$1,this,null)),this.b$["java.util.LinkedHashMap"])})};b.$LinkedHashMap$2$1$=function(){var a=Y(java.util,"LinkedHashMap$2$1",null,java.util.MapEntry.Type);f(a,"get",function(a){return a.value},"java.util.MapEntry")};b=G(java.util.LinkedHashMap,
"LinkedHashIterator",java.util.HashMap.HashMapIterator);u(b,function(a,b){K(this,java.util.LinkedHashMap.LinkedHashIterator,[a,b]);this.entry=b.head},"java.util.MapEntry.Type,java.util.LinkedHashMap");f(b,"hasNext",function(){return null!=this.entry});f(b,"next",function(){this.checkConcurrentMod();if(!this.hasNext())throw new java.util.NoSuchElementException;var a=this.type.get(this.entry);this.lastEntry=this.entry;this.entry=this.entry.chainForward;this.canRemove=!0;return a});f(b,"remove",function(){this.checkConcurrentMod();
if(!this.canRemove)throw new IllegalStateException;this.canRemove=!1;this.associatedMap.modCount++;var a=this.associatedMap.getModuloHash(this.lastEntry.key),b=this.associatedMap.elementData[a];if(b===this.lastEntry)this.associatedMap.elementData[a]=this.lastEntry.next;else{for(;null!=b.next&&b.next!==this.lastEntry;)b=b.next;b.next=this.lastEntry.next}var b=this.lastEntry,a=b.chainBackward,b=b.chainForward,c=this.associatedMap;null!=a?(a.chainForward=b,null!=b?b.chainBackward=a:c.tail=a):(c.head=
b,null!=b?b.chainBackward=null:c.tail=null);this.associatedMap.elementCount--;this.expectedModCount++});b=G(java.util.LinkedHashMap,"LinkedHashMapEntrySet",java.util.HashMap.HashMapEntrySet);f(b,"iterator",function(){return new java.util.LinkedHashMap.LinkedHashIterator((R("java.util.LinkedHashMap$LinkedHashMapEntrySet$1")?0:java.util.LinkedHashMap.LinkedHashMapEntrySet.$LinkedHashMap$LinkedHashMapEntrySet$1$(),T(java.util.LinkedHashMap$LinkedHashMapEntrySet$1,this,null)),this.hashMap())});b.$LinkedHashMap$LinkedHashMapEntrySet$1$=
function(){var a=Y(java.util,"LinkedHashMap$LinkedHashMapEntrySet$1",null,java.util.MapEntry.Type);f(a,"get",function(a){return a},"java.util.MapEntry")};b=s(function(){this.chainBackward=this.chainForward=null;r(this,arguments)},java.util.LinkedHashMap,"LinkedHashMapEntry",java.util.HashMap.Entry);u(b,function(a,b){K(this,java.util.LinkedHashMap.LinkedHashMapEntry,[a,b]);this.chainBackward=this.chainForward=null},"~O,~O");c(b,"clone",function(){var a=ba(this,java.util.LinkedHashMap.LinkedHashMapEntry,
"clone",[]);a.chainBackward=this.chainBackward;a.chainForward=this.chainForward;var b=a.next;null!=b&&(a.next=b.clone());return a})});m("J.api");I(J.api,"JmolJDXMOLParser");m("J.api");I(J.api,"JmolJDXMOLReader");m("J.api");I(J.api,"GenericGraphics");m("J.jsv");x(["J.api.JmolJDXMOLParser","java.util.Hashtable"],"J.jsv.JDXMOLParser",["JU.BS","$.Lst","$.PT","$.SB","JU.Logger"],function(){var b=s(function(){this.line=null;this.lastModel="";this.baseModel=this.thisModelID=null;this.vibScale=0;this.mapDup=
this.firstModelWithPeaks=this.peakFilePath=this.peakIndex=this.loader=this.peakYLabel=this.peakXLabel=null;r(this,arguments)},J.jsv,"JDXMOLParser",null,J.api.JmolJDXMOLParser);N(b,function(){this.mapDup=new java.util.Hashtable});u(b,function(){});f(b,"set",function(a,b,c){this.loader=a;this.peakFilePath=b;this.peakIndex=D(1,0);null!=c&&(c.remove("modelNumber"),c.containsKey("zipSet")&&(this.peakIndex=c.get("peakIndex"),null==this.peakIndex&&(this.peakIndex=D(1,0),c.put("peakIndex",this.peakIndex)),
c.containsKey("subFileName")||(this.peakFilePath=JU.PT.split(b,"|")[0])));return this},"J.api.JmolJDXMOLReader,~S,java.util.Map");f(b,"getAttribute",function(a,b){var c=JU.PT.getQuotedAttribute(a,b);return null==c?"":c},"~S,~S");f(b,"getRecord",function(a){if(null==this.line||0>this.line.indexOf(a))return null;for(a=this.line;0>a.indexOf(">");)a+=" "+this.readLine();return this.line=a},"~S");f(b,"readModels",function(){if(!this.findRecord("Models"))return!1;this.thisModelID=this.line="";for(var a=
!0;;){this.line=this.loader.discardLinesUntilNonBlank();if(null==this.getRecord("<ModelData"))break;this.getModelData(a);a=!1}return!0});f(b,"readACDMolFile",function(){var a=new JU.SB;for(a.append(this.line.substring(this.line.indexOf("=")+1)).appendC("\n");null!=this.readLine()&&!this.line.contains("$$$$");)a.append(this.line).appendC("\n");return JU.PT.rep(a.toString(),"  $$ Empty String","")});f(b,"readACDAssignments",function(a,b,c){var f=!1;try{(null==this.line||0<=this.line.indexOf("#"))&&
this.readLine();0>a&&(a=2147483647);for(var e=0;e<a;e++){var g=this.readLine();if(null==g||0==g.indexOf("#")){f=!0;break}if(b){for(;0>g.indexOf(">");)g+=" "+this.readLine();g=g.trim()}g=JU.PT.replaceAllCharacters(g,"()<>"," ").trim();if(0==g.length)break;var j=g.indexOf("'");if(0<=j)var k=g.indexOf("'",j+1),g=g.substring(0,j)+JU.PT.rep(g.substring(j+1,k),",",";")+g.substring(k+1);JU.Logger.info("Peak Assignment: "+g);var l=JU.PT.split(g,",");c.addLast(l)}}catch(m){if(E(m,Exception))JU.Logger.error("Error reading peak assignments at "+
this.line+": "+m);else throw m;}return!f},"~N,~B,JU.Lst");f(b,"setACDAssignments",function(a,b,c,f,e){try{0<=c&&(this.peakIndex=D(-1,[c]));var g=0==b.indexOf("MASS"),j=" file="+JU.PT.esc(this.peakFilePath.$replace("\\","/"));a=" model="+JU.PT.esc(a+" (assigned)");this.peakYLabel=this.peakXLabel="";var k=this.getACDPeakWidth(b)/2,l=new java.util.Hashtable,m=new JU.Lst;c=null;var n,q,v=0;if(g){c=new java.util.Hashtable;for(var r=JU.PT.split(e,"M  ZZC"),s=r.length;1<=--s;){var u=JU.PT.getTokens(r[s]),
v=Math.max(v,JU.PT.parseInt(u[0]));c.put(u[1],u[0])}n=4;q=0}else 0<=b.indexOf("NMR")?(n=0,q=3):(n=0,q=2);for(var w=f.size(),s=0;s<w;s++){var x=f.get(s),z=JU.PT.parseFloat(x[n]),A=x[q],A=g?this.fixACDAtomList(A,c,v):A.$replace(";",",");if(0<=A.indexOf("select")){var C=A.indexOf("select atomno=");if(0>C)continue;A=JU.PT.split(A.substring(C+14)," ")[0]}var F=g?"m/z="+Math.round(z)+": "+x[2]+" ("+x[1]+")":2==q?""+Math.round(10*z)/10:null;this.getStringInfo(j,F,b,a,A,l,""+z,m,' atoms="%ATOMS%" xMin="'+
(z-k)+'" xMax="'+(z+k)+'">')}return this.setPeakData(m,0)}catch(G){if(E(G,Exception))return 0;throw G;}},"~S,~S,~N,JU.Lst,~S");c(b,"fixACDAtomList",function(a,b,c){a=a.trim();a=JU.PT.getTokens(a.$replace(";"," "));for(var f=new JU.BS,e=!1,g=0;g<a.length;g++){var j=a[g];(e=0<=j.indexOf("M"))&&(j="1-"+c);var k=j.indexOf("-");if(0<=k)for(var l=JU.PT.parseInt(j.substring(0,k)),j=JU.PT.parseInt(j.substring(k+1))+1;l<j;l++)f.set(e?l:JU.PT.parseInt(b.get(""+l)));else f.set(JU.PT.parseInt(b.get(j)))}b=f.toJSON();
return b.substring(1,b.length-1)},"~S,java.util.Map,~N");c(b,"getACDPeakWidth",function(a){return 0<=a.indexOf("HNMR")?0.05:0<=a.indexOf("CNMR")?1:0<=a.indexOf("MASS")?1:10},"~S");f(b,"readPeaks",function(a,b){try{0<=b&&(this.peakIndex=D(-1,[b]));var c=a?1:0,f=a?"Signals":"Peaks",e=a?"<Signal":"<PeakData";if(!this.findRecord(f))return 0;var g=" file="+JU.PT.esc(this.peakFilePath.$replace("\\","/")),j=JU.PT.getQuotedAttribute(this.line,"model"),j=this.fixModel(j,!0),j=" model="+JU.PT.esc(null==j?this.thisModelID:
j),k=JU.PT.getQuotedAttribute(this.line,"type");this.peakXLabel=JU.PT.getQuotedAttribute(this.line,"xLabel");this.peakYLabel=JU.PT.getQuotedAttribute(this.line,"yLabel");for(var l=new java.util.Hashtable,m=new JU.Lst;null!=this.readLine()&&!(this.line=this.line.trim()).startsWith("</"+f);)if(this.line.startsWith(e)){this.getRecord(e);JU.Logger.info(this.line);var n=JU.PT.getQuotedAttribute(this.line,"title");null==k&&(k=JU.PT.getQuotedAttribute(this.line,"type"));var q=JU.PT.getQuotedAttribute(this.line,
"atoms"),v=F(100*JU.PT.parseFloat(JU.PT.getQuotedAttribute(this.line,"xMin")))+"_"+F(100*JU.PT.parseFloat(JU.PT.getQuotedAttribute(this.line,"xMax"))),r=JU.PT.getQuotedAttribute(this.line,"model"),s=this.fixModel(r,!0);null==this.firstModelWithPeaks&&(this.firstModelWithPeaks=s);null!=s&&!s.equals(r)&&(this.line=JU.PT.rep(this.line,'model="'+r+'"','model="'+s+'"'),JU.Logger.error("peak model changed from "+r+" for "+this.line));var u=this.line.substring(e.length).trim();this.getStringInfo(g,n,k,null==
r?j:"",q,l,v,m,u)}return this.setPeakData(m,c)}catch(w){if(E(w,Exception))return 0;throw w;}},"~B,~N");c(b,"checkDuplicateModelID",function(){var a=this.mapDup.get(this.thisModelID);if(null==a)this.mapDup.put(this.thisModelID,Integer.$valueOf(1));else{var a=Integer.$valueOf(a.intValue()+1),b=this.thisModelID+a;JU.Logger.error("duplicate model id "+this.thisModelID+" now "+b);this.mapDup.put(this.thisModelID,a);this.thisModelID=b}});c(b,"fixModel",function(a,b){null!=a&&-2147483648!=JU.PT.parseInt(a)&&
(a="_"+a);var c=null==a||!b?null:this.mapDup.get(a);null!=c&&1<c.intValue()&&(a=this.thisModelID);return a},"~S,~B");c(b,"setPeakData",function(a,b){for(var c=0,f=a.size(),e=0;e<f;e++){var g=a.get(e),j=JU.PT.rep(g[0],"%INDEX%",""+ ++this.peakIndex[0]),k=g[1];if(null!=k){for(var g="",l=k.nextSetBit(0);0<=l;l=k.nextSetBit(l+1))g+=","+(l+b);k=k.cardinality();c+=k;j=JU.PT.rep(j,"%ATOMS%",g.substring(1));j=JU.PT.rep(j,"%S%",1==k?"":"s");j=JU.PT.rep(j,"%NATOMS%",""+k)}JU.Logger.info("adding PeakData "+
j);this.loader.addPeakData(j)}this.loader.setSpectrumPeaks(c,this.peakXLabel,this.peakYLabel);return f},"JU.Lst,~N");c(b,"getStringInfo",function(a,b,c,f,e,g,j,k,l){"HNMR".equals(c)?c="1HNMR":"CNMR".equals(c)&&(c="13CNMR");var m=null==c?"":" type="+JU.PT.esc(c);null==b&&(b="1HNMR".equals(c)?"atom%S%: %ATOMS%; integration: %NATOMS%":"");b=" title="+JU.PT.esc(b);a="<PeakData "+a+' index="%INDEX%"'+b+m+f+" "+l;null!=e&&(a=JU.PT.rep(a,'atoms="'+e+'"','atoms="%ATOMS%"'));b=g.get(j);null==b&&(b=z(-1,[a,
null==e?null:new JU.BS]),g.put(j,b),k.addLast(b));null!=e&&(g=b[1],e=e.$replace(","," "),e.equals("*")&&(e="0:1000"),g.or(JU.BS.unescape("({"+e+"})")))},"~S,~S,~S,~S,~S,java.util.Map,~S,JU.Lst,~S");c(b,"getModelData",function(a){this.baseModel=this.fixModel(this.getAttribute(this.line,"baseModel"),!0);this.lastModel=this.thisModelID;this.thisModelID=this.fixModel(this.getAttribute(this.line,"id"),!1);for(this.checkDuplicateModelID();0>this.line.indexOf(">")&&0>this.line.indexOf("type");)this.readLine();
var b=this.getAttribute(this.line,"type").toLowerCase();this.vibScale=JU.PT.parseFloat(this.getAttribute(this.line,"vibrationScale"));b.equals("xyzvib")?b="xyz":0==b.length&&(b=null);for(var c=new JU.SB;null!=this.readLine()&&!this.line.contains("</ModelData>");)c.append(this.line).appendC("\n");this.loader.processModelData(c.toString(),this.thisModelID,b,this.baseModel,this.lastModel,NaN,this.vibScale,a)},"~B");c(b,"findRecord",function(a){null==this.line&&this.readLine();null!=this.line&&0>this.line.indexOf("<"+
a)&&(this.line=this.loader.discardLinesUntilContains2("<"+a,"##"));return null!=this.line&&0<=this.line.indexOf("<"+a)},"~S");c(b,"readLine",function(){return this.line=this.loader.rd()});f(b,"setLine",function(a){this.line=a},"~S");f(b,"getFirstModelWithPeaks",function(){return this.firstModelWithPeaks})});m("J.jsv");x(["J.api.JmolJSpecView"],"J.jsv.JSV","java.util.Hashtable JU.BS $.Lst $.PT JU.Escape $.Logger JV.FileManager".split(" "),function(){var b=s(function(){this.vwr=null;r(this,arguments)},
J.jsv,"JSV",null,J.api.JmolJSpecView);f(b,"setViewer",function(a){this.vwr=a;return this},"JV.Viewer");f(b,"atomPicked",function(a){0>a||(a=this.getPeakAtomRecord(a),null!=a&&this.sendJSpecView(a+' src="JmolAtomSelect"'))},"~N");c(b,"getPeakAtomRecord",function(a){var b=this.vwr.ms.at,c=b[a].mi,f=null;switch(b[a].getElementNumber()){case 1:f="1HNMR";break;case 6:f="13CNMR";break;default:return null}b=this.vwr.ms.getInfo(c,"jdxAtomSelect_"+f);if(null==b)return null;this.vwr.ms.htPeaks=new java.util.Hashtable;
c=this.vwr.ms.htPeaks;for(f=0;f<b.size();f++){var e=b.get(f);System.out.println("Jmol JSpecView.java peak="+e);var g=c.get(e);System.out.println("Jmol JSpecView.java bspeak="+g);if(null==g){c.put(e,g=new JU.BS);var j=JU.PT.getQuotedAttribute(e,"atoms"),k=JU.PT.getQuotedAttribute(e,"select");System.out.println("Jmol JSpecView.java satoms select "+j+" "+k);var l="";null!=j?l+="visible & (atomno="+JU.PT.rep(j,","," or atomno=")+")":null!=k&&(l+="visible & ("+k+")");System.out.println("Jmol JSpecView.java script : "+
l);g.or(this.vwr.getAtomBitSet(l))}System.out.println("Jmol JSpecView bsPeak now : "+g+" "+a);if(g.get(a))return e}return null},"~N");c(b,"sendJSpecView",function(a){var b=JU.PT.getQuotedAttribute(a,"title");null!=b&&this.vwr.scriptEcho(JU.Logger.debugging?a:b);a=this.vwr.fullName+"JSpecView: "+a;JU.Logger.info("Jmol>JSV "+a);this.vwr.sm.syncSend(a,">",0)},"~S");f(b,"setModel",function(a){if(1==(this.vwr.ms.getInfoM("_startJSpecView")===Boolean.TRUE?1:this.vwr.sm.getSyncMode()))a=this.vwr.ms.getInfo(a,
"jdxModelSelect"),null!=a&&this.sendJSpecView(a+' src="Jmol"')},"~N");f(b,"getBaseModelIndex",function(a){var b=this.vwr.ms.getInfo(a,"jdxBaseModel");if(null!=b)for(var c=this.vwr.ms.mc;0<=--c;)if(b.equals(this.vwr.ms.getInfo(c,"jdxModelID")))return c;return a},"~N");f(b,"processSync",function(a,b){JU.Logger.debugging&&JU.Logger.info("J.jsv.JSV jsvMode="+b+" script="+a);System.out.println("JSV processSync "+a+" "+b);switch(b){case 0:case 77:case 28:case 35:return a.startsWith("JSpecView:")||(a="JSpecView:"+
a),a=this.vwr.fullName+a,this.vwr.sm.syncSend(a,">",0),null}switch(b){default:return null;case 21:return null;case 14:var c=JU.PT.getQuotedAttribute(a,"file"),f=null!=c&&c.startsWith(JV.FileManager.SIMULATION_PROTOCOL),e=!f||this.vwr.isApplet?"":JU.PT.getQuotedAttribute(c.$replace("'",'"'),"id"),c=f&&!this.vwr.isApplet&&(c.startsWith(JV.FileManager.SIMULATION_PROTOCOL+"C13/MOL=")||c.startsWith(JV.FileManager.SIMULATION_PROTOCOL+"H1/MOL="))?null:JU.PT.rep(c,"#molfile",""),g=f?"molfile":JU.PT.getQuotedAttribute(a,
"model"),j=JU.PT.getQuotedAttribute(a,"baseModel"),k=JU.PT.getQuotedAttribute(a,"atoms"),l=JU.PT.getQuotedAttribute(a,"select"),m=JU.PT.getQuotedAttribute(a,"script");if(null==e||0==e.length)e=null==g?null:(null==c?"":c+"#")+g;"".equals(j)&&(e+=".baseModel");g=null==e?-3:this.vwr.getModelIndexFromId(e);if(-2==g)return null;if(-1!=g||null==c)a="";else{if(f&&!this.vwr.isApplet)return null;f&&(c+="#molfile");a=0<=g?"":"load "+JU.PT.esc(c)}null!=e&&(a+=";model "+JU.PT.esc(e));null!=k?a+=";select visible & (@"+
JU.PT.rep(k,","," or @")+")":null!=l&&(a+=";select visible & ("+l+")");null!=m&&(a+=";"+m);return a;case 7:c=JU.Escape.unescapeStringArray(a.substring(7));f=new JU.Lst;e="1HNMR";for(k=0;k<c.length;k++)0==k&&0<=c[k].indexOf(JV.FileManager.SIMULATION_PROTOCOL+"C13/")&&(e="13CNMR"),f.addLast(c[k]);this.vwr.ms.setInfo(this.vwr.am.cmi,"jdxAtomSelect_"+e,f);return null}},"~S,~N")});m("JSV.api");I(JSV.api,"AnnotationData");m("JSV.api");I(JSV.api,"AppletFrame");m("JSV.api");I(JSV.api,"JSVAppInterface",JSV.api.JSVAppletInterface);
m("JSV.api");I(JSV.api,"JSVAppletInterface");m("JSV.api");I(JSV.api,"JSVFileHelper");m("JSV.api");I(JSV.api,"JSVMainPanel",JSV.api.JSVViewPanel);m("JSV.api");I(JSV.api,"JSVPanel",JSV.api.JSVViewPanel);m("JSV.api");I(JSV.api,"JSVTree");m("JSV.api");I(JSV.api,"JSVTreeNode");m("JSV.api");I(JSV.api,"JSVTreePath");m("JSV.api");I(JSV.api,"JSVViewPanel");m("JSV.api");I(JSV.api,"JSVZipReader");m("JSV.api");I(JSV.api,"PanelListener");m("JSV.api");I(JSV.api,"ScriptInterface");m("JSV.app");x(["JSV.api.JSVAppInterface",
"$.PanelListener","$.ScriptInterface"],"JSV.app.JSVApp","JU.Lst $.PT JSV.common.Coordinate $.JSVFileManager $.JSVersion $.JSViewer $.ScriptToken JU.Logger".split(" "),function(){var b=s(function(){this.appletFrame=null;this.isNewWindow=!1;this.prevPanel=this.vwr=this.syncCallbackFunctionName=this.peakCallbackFunctionName=this.loadFileCallbackFunctionName=this.coordCallbackFunctionName=this.appletReadyCallbackFunctionName=null;r(this,arguments)},JSV.app,"JSVApp",null,[JSV.api.PanelListener,JSV.api.JSVAppInterface,
JSV.api.ScriptInterface]);u(b,function(a,b){this.appletFrame=a;this.vwr=new JSV.common.JSViewer(this,!0,b,!0);a.setDropTargetListener(this.isSigned(),this.vwr);var c=a.getDocumentBase();JSV.common.JSVFileManager.setDocumentBase(this.vwr,c);this.initParams(a.getParameter("script"))},"JSV.api.AppletFrame,~B");f(b,"isPro",function(){return this.isSigned()});f(b,"isSigned",function(){return!0});c(b,"getAppletFrame",function(){return this.appletFrame});c(b,"dispose",function(){try{this.vwr.dispose()}catch(a){if(E(a,
Exception))a.printStackTrace();else throw a;}});f(b,"getPropertyAsJavaObject",function(a){return this.vwr.getPropertyAsJavaObject(a)},"~S");f(b,"getPropertyAsJSON",function(a){return JU.PT.toJSON(null,this.getPropertyAsJavaObject(a))},"~S");f(b,"getCoordinate",function(){return this.vwr.getCoordinate()});f(b,"loadInline",function(a){this.siOpenDataOrFile(a,"[inline]",null,null,-1,-1,!0,null,null);this.appletFrame.validateContent(3)},"~S");f(b,"exportSpectrum",function(a,b){return this.vwr.$export(a,
b)},"~S,~N");f(b,"setFilePath",function(a){this.runScript("load "+JU.PT.esc(a))},"~S");f(b,"setSpectrumNumber",function(a){this.runScript(JSV.common.ScriptToken.SPECTRUMNUMBER+" "+a)},"~N");f(b,"reversePlot",function(){this.toggle(JSV.common.ScriptToken.REVERSEPLOT)});f(b,"toggleGrid",function(){this.toggle(JSV.common.ScriptToken.GRIDON)});f(b,"toggleCoordinate",function(){this.toggle(JSV.common.ScriptToken.COORDINATESON)});f(b,"togglePointsOnly",function(){this.toggle(JSV.common.ScriptToken.POINTSONLY)});
f(b,"toggleIntegration",function(){this.toggle(JSV.common.ScriptToken.INTEGRATE)});c(b,"toggle",function(a){null!=this.vwr.selectedPanel&&this.runScript(a+" TOGGLE")},"JSV.common.ScriptToken");f(b,"addHighlight",function(a,b,c,f,e,g){this.runScript("HIGHLIGHT "+a+" "+b+" "+c+" "+f+" "+e+" "+g)},"~N,~N,~N,~N,~N,~N");f(b,"removeHighlight",function(a,b){this.runScript("HIGHLIGHT "+a+" "+b+" OFF")},"~N,~N");f(b,"removeAllHighlights",function(){this.runScript("HIGHLIGHT OFF")});f(b,"syncScript",function(a){this.vwr.syncScript(a)},
"~S");f(b,"writeStatus",function(a){JU.Logger.info(a)},"~S");c(b,"initParams",function(a){this.vwr.parseInitScript(a);this.newAppletPanel();this.vwr.setPopupMenu(this.vwr.allowMenu,this.vwr.parameters.getBoolean(JSV.common.ScriptToken.ENABLEZOOM));this.vwr.allowMenu&&this.vwr.closeSource(null);this.runScriptNow(a)},"~S");c(b,"newAppletPanel",function(){JU.Logger.info("newAppletPanel");this.appletFrame.createMainPanel(this.vwr)});f(b,"repaint",function(){var a=null==this.vwr?null:this.vwr.html5Applet;
null==JSV.common.JSViewer.jsmolObject?this.appletFrame.repaint():null!=a&&JSV.common.JSViewer.jsmolObject.repaint(a,!0)});c(b,"updateJS",function(){},"~N,~N");f(b,"runScriptNow",function(a){return this.vwr.runScriptNow(a)},"~S");c(b,"checkCallbacks",function(){if(!(null==this.coordCallbackFunctionName&&null==this.peakCallbackFunctionName)){var a=new JSV.common.Coordinate,b=null==this.peakCallbackFunctionName?null:new JSV.common.Coordinate;if(this.vwr.pd().getPickedCoordinates(a,b)){var c=this.vwr.mainPanel.getCurrentPanelIndex();
null==b?this.appletFrame.callToJavaScript(this.coordCallbackFunctionName,z(-1,[Double.$valueOf(a.getXVal()),Double.$valueOf(a.getYVal()),Integer.$valueOf(c+1)])):this.appletFrame.callToJavaScript(this.peakCallbackFunctionName,z(-1,[Double.$valueOf(a.getXVal()),Double.$valueOf(a.getYVal()),Double.$valueOf(b.getXVal()),Double.$valueOf(b.getYVal()),Integer.$valueOf(c+1)]))}}});c(b,"doAdvanced",function(){},"~S");f(b,"panelEvent",function(a){C(a,"JSV.common.PeakPickEvent")?this.vwr.processPeakPickEvent(a,
!1):C(a,"JSV.common.ZoomEvent")||C(a,"JSV.common.SubSpecChangeEvent")},"~O");f(b,"getSolnColour",function(){return this.vwr.getSolutionColorStr(!0)});c(b,"updateJSView",function(a){var b=this.vwr.html5Applet;b&&null!=b._viewSet&&b._updateView(null==b?null:this.vwr.selectedPanel,a)},"~S");f(b,"syncToJmol",function(a){this.updateJSView(a);null!=this.syncCallbackFunctionName&&(JU.Logger.info("JSVApp.syncToJmol JSV>Jmol "+a),this.appletFrame.callToJavaScript(this.syncCallbackFunctionName,z(-1,[this.vwr.fullName,
a])))},"~S");f(b,"setVisible",function(a){this.appletFrame.setPanelVisible(a)},"~B");f(b,"setCursor",function(a){this.vwr.apiPlatform.setCursor(a,this.appletFrame)},"~N");f(b,"runScript",function(a){this.vwr.runScript(a)},"~S");f(b,"getScriptQueue",function(){return this.vwr.scriptQueue});f(b,"siSetCurrentSource",function(a){this.vwr.currentSource=a},"JSV.source.JDXSource");f(b,"siSendPanelChange",function(){this.vwr.selectedPanel!==this.prevPanel&&(this.prevPanel=this.vwr.selectedPanel,this.vwr.sendPanelChange())});
f(b,"siNewWindow",function(a,b){this.isNewWindow=a;b?null!=this.vwr.jsvpPopupMenu&&this.vwr.jsvpPopupMenu.setSelected("Window",!1):this.appletFrame.newWindow(a)},"~B,~B");f(b,"siValidateAndRepaint",function(){var a=this.vwr.pd();null!=a&&a.setTaintedAll();this.appletFrame.validate();this.repaint()},"~B");f(b,"siSyncLoad",function(a){this.newAppletPanel();JU.Logger.info("JSVP syncLoad reading "+a);this.siOpenDataOrFile(null,null,null,a,-1,-1,!1,null,null);this.appletFrame.validateContent(3)},"~S");
f(b,"siOpenDataOrFile",function(a,b,c,f,e,g,j,k,l){switch(this.vwr.openDataOrFile(a,b,c,f,e,g,j,l)){case 0:null!=k&&this.runScript(k);break;case -1:return;default:this.siSetSelectedPanel(null);return}JU.Logger.info(this.appletFrame.getAppletInfo()+" File "+this.vwr.currentSource.getFilePath()+" Loaded Successfully")},"~O,~S,JU.Lst,~S,~N,~N,~B,~S,~S");f(b,"siProcessCommand",function(a){this.vwr.runScriptNow(a)},"~S");f(b,"siSetSelectedPanel",function(a){this.vwr.mainPanel.setSelectedPanel(this.vwr,
a,this.vwr.panelNodes);this.vwr.spectraTree.setSelectedPanel(this,a);null==a&&(a=this.appletFrame.getJSVPanel(this.vwr,null),this.vwr.mainPanel.setSelectedPanel(this.vwr,a,null));this.appletFrame.validate();null!=a&&(a.setEnabled(!0),a.setFocusable(!0))},"JSV.api.JSVPanel");f(b,"siExecSetCallback",function(a,b){switch(a){case JSV.common.ScriptToken.APPLETREADYCALLBACKFUNCTIONNAME:this.appletReadyCallbackFunctionName=b;break;case JSV.common.ScriptToken.LOADFILECALLBACKFUNCTIONNAME:this.loadFileCallbackFunctionName=
b;break;case JSV.common.ScriptToken.PEAKCALLBACKFUNCTIONNAME:this.peakCallbackFunctionName=b;break;case JSV.common.ScriptToken.SYNCCALLBACKFUNCTIONNAME:this.syncCallbackFunctionName=b;break;case JSV.common.ScriptToken.COORDCALLBACKFUNCTIONNAME:this.coordCallbackFunctionName=b}},"JSV.common.ScriptToken,~S");f(b,"siLoaded",function(a){null!=this.loadFileCallbackFunctionName&&this.appletFrame.callToJavaScript(this.loadFileCallbackFunctionName,z(-1,[this.vwr.appletName,a]));this.updateJSView(null);return null},
"~S");f(b,"siExecHidden",function(){},"~B");f(b,"siExecScriptComplete",function(a,b){b||this.vwr.showMessage(a);this.siValidateAndRepaint(!1)},"~S,~B");f(b,"siUpdateBoolean",function(){},"JSV.common.ScriptToken,~B");f(b,"siCheckCallbacks",function(){this.checkCallbacks()},"~S");f(b,"siNodeSet",function(){this.appletFrame.validateContent(2);this.siValidateAndRepaint(!1)},"JSV.common.PanelNode");f(b,"siSourceClosed",function(){},"JSV.source.JDXSource");f(b,"siGetNewJSVPanel",function(a){if(null==a)return this.vwr.initialEndIndex=
this.vwr.initialStartIndex=-1,null;var b=new JU.Lst;b.addLast(a);a=this.appletFrame.getJSVPanel(this.vwr,b);a.getPanelData().addListener(this);this.vwr.parameters.setFor(a,null,!0);return a},"JSV.common.Spectrum");f(b,"siGetNewJSVPanel2",function(a){if(null==a)return this.vwr.initialEndIndex=this.vwr.initialStartIndex=-1,this.appletFrame.getJSVPanel(this.vwr,null);a=this.appletFrame.getJSVPanel(this.vwr,a);this.vwr.initialEndIndex=this.vwr.initialStartIndex=-1;a.getPanelData().addListener(this);this.vwr.parameters.setFor(a,
null,!0);return a},"JU.Lst");f(b,"siSetPropertiesFromPreferences",function(){this.vwr.checkAutoIntegrate()},"JSV.api.JSVPanel,~B");f(b,"siSetLoaded",function(){},"~S,~S");f(b,"siSetMenuEnables",function(){},"JSV.common.PanelNode,~B");f(b,"siUpdateRecentMenus",function(){},"~S");f(b,"siExecTest",function(){this.loadInline("")},"~S");f(b,"print",function(a){return this.vwr.print(a)},"~S");f(b,"checkScript",function(a){return this.vwr.checkScript(a)},"~S");b.getAppletInfo=c(b,"getAppletInfo",function(){return"JSpecView Applet "+
JSV.common.JSVersion.VERSION+"\n\nAuthors:\nProf. Robert M. Hanson,\nD. Facey, K. Bryan, C. Walters, Prof. Robert J. Lancashire and\nvolunteer developers through sourceforge."})});m("JSV.app");x(["J.api.GenericMouseInterface"],"JSV.app.GenericMouse",["JU.Logger"],function(){var b=s(function(){this.jsvp=this.pd=null;this.modifiersWhenPressed10=this.yWhenPressed=this.xWhenPressed=0;this.disposed=this.isMouseDown=!1;r(this,arguments)},JSV.app,"GenericMouse",null,J.api.GenericMouseInterface);u(b,function(a){this.jsvp=
a;this.pd=a.getPanelData()},"JSV.api.JSVPanel");f(b,"clear",function(){});f(b,"processEvent",function(a,b,c,f,e){if(null==this.pd)return!this.disposed&&(501==a&&0!=(f&4))&&this.jsvp.showMenu(b,c),!0;507!=a&&(f=JSV.app.GenericMouse.applyLeftMouse(f));switch(a){case 507:this.wheeled(e,b,f|32);break;case 501:this.xWhenPressed=b;this.yWhenPressed=c;this.modifiersWhenPressed10=f;this.pressed(e,b,c,f,!1);break;case 506:this.dragged(e,b,c,f);break;case 504:this.entered(e,b,c);break;case 505:this.exited(e,
b,c);break;case 503:this.moved(e,b,c,f);break;case 502:this.released(e,b,c,f);b==this.xWhenPressed&&(c==this.yWhenPressed&&f==this.modifiersWhenPressed10)&&this.clicked(e,b,c,f,1);break;default:return!1}return!0},"~N,~N,~N,~N,~N");c(b,"mouseEntered",function(a){this.entered(a.getWhen(),a.getX(),a.getY())},"java.awt.event.MouseEvent");c(b,"mouseExited",function(a){this.exited(a.getWhen(),a.getX(),a.getY())},"java.awt.event.MouseEvent");c(b,"mouseMoved",function(a){this.moved(a.getWhen(),a.getX(),a.getY(),
a.getModifiers())},"java.awt.event.MouseEvent");c(b,"mousePressed",function(a){this.pressed(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.isPopupTrigger())},"java.awt.event.MouseEvent");c(b,"mouseDragged",function(a){var b=a.getModifiers();0==(b&28)&&(b|=16);this.dragged(a.getWhen(),a.getX(),a.getY(),b)},"java.awt.event.MouseEvent");c(b,"mouseReleased",function(a){this.released(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(b,"mouseClicked",function(a){this.clicked(a.getWhen(),
a.getX(),a.getY(),a.getModifiers(),a.getClickCount())},"java.awt.event.MouseEvent");c(b,"mouseWheelMoved",function(a){a.consume();this.wheeled(a.getWhen(),a.getWheelRotation(),a.getModifiers()|32)},"java.awt.event.MouseWheelEvent");c(b,"keyTyped",function(a){if(null!=this.pd){var b=a.getKeyChar(),c=a.getModifiers();JU.Logger.info("MouseManager keyTyped: "+b+" "+(0+b.charCodeAt(0))+" "+c);this.pd.keyTyped(b.charCodeAt(0),c)&&a.consume()}},"java.awt.event.KeyEvent");c(b,"keyPressed",function(a){null!=
this.pd&&this.pd.keyPressed(a.getKeyCode(),a.getModifiers())&&a.consume()},"java.awt.event.KeyEvent");c(b,"keyReleased",function(a){null!=this.pd&&this.pd.keyReleased(a.getKeyCode())},"java.awt.event.KeyEvent");f(b,"processKeyEvent",function(a){switch(a.getID()){case 401:this.keyPressed(a);break;case 402:this.keyReleased(a);break;case 400:this.keyTyped(a)}},"~O");c(b,"entered",function(a,b,c){null!=this.pd&&this.pd.mouseEnterExit(a,b,c,!1)},"~N,~N,~N");c(b,"exited",function(a,b,c){null!=this.pd&&
this.pd.mouseEnterExit(a,b,c,!0)},"~N,~N,~N");c(b,"clicked",function(a,b,c,f){null!=this.pd&&this.pd.mouseAction(2,a,b,c,1,f)},"~N,~N,~N,~N,~N");c(b,"moved",function(a,b,c,f){null!=this.pd&&(this.isMouseDown?this.pd.mouseAction(1,a,b,c,0,JSV.app.GenericMouse.applyLeftMouse(f)):this.pd.mouseAction(0,a,b,c,0,f&-29))},"~N,~N,~N,~N");c(b,"wheeled",function(a,b,c){null!=this.pd&&this.pd.mouseAction(3,a,0,b,0,c)},"~N,~N,~N");c(b,"pressed",function(a,b,c,f){null==this.pd?this.disposed||this.jsvp.showMenu(b,
c):(this.isMouseDown=!0,this.pd.mouseAction(4,a,b,c,0,f))},"~N,~N,~N,~N,~B");c(b,"released",function(a,b,c,f){null!=this.pd&&(this.isMouseDown=!1,this.pd.mouseAction(5,a,b,c,0,f))},"~N,~N,~N,~N");c(b,"dragged",function(a,b,c,f){null!=this.pd&&(20==(f&20)&&(f=f&-5|2),this.pd.mouseAction(1,a,b,c,0,f))},"~N,~N,~N,~N");b.applyLeftMouse=c(b,"applyLeftMouse",function(a){return 0==(a&28)?a|16:a},"~N");f(b,"processTwoPointGesture",function(){},"~A");f(b,"dispose",function(){this.jsvp=this.pd=null;this.disposed=
!0})});m("JSV.appletjs");x(["javajs.api.JSInterface","JSV.api.AppletFrame","$.JSVAppletInterface"],"JSV.appletjs.JSVApplet","java.net.URL java.util.Hashtable JU.PT JSV.app.JSVApp JSV.js2d.JsMainPanel $.JsPanel JU.Logger".split(" "),function(){var b=s(function(){this.viewer=this.app=null;this.isStandalone=!1;this.htParams=this.viewerOptions=null;r(this,arguments)},JSV.appletjs,"JSVApplet",null,[JSV.api.JSVAppletInterface,JSV.api.AppletFrame,javajs.api.JSInterface]);u(b,function(a){null==a&&(a=new java.util.Hashtable);
this.viewerOptions=a;this.htParams=new java.util.Hashtable;var b;for(a=a.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.htParams.put(b.getKey().toLowerCase(),b.getValue());this.init()},"java.util.Map");c(b,"init",function(){this.app=new JSV.app.JSVApp(this,!0);this.initViewer();null!=this.app.appletReadyCallbackFunctionName&&null!=this.viewer.fullName&&this.callToJavaScript(this.app.appletReadyCallbackFunctionName,z(-1,[this.viewer.appletName,this.viewer.fullName,Boolean.TRUE,this]))});
c(b,"initViewer",function(){this.viewer=this.app.vwr;this.setLogging();this.viewerOptions.remove("debug");var a=this.viewerOptions.get("display"),a=document.getElementById(a);this.viewer.setDisplay(a);JU.Logger.info(this.getAppletInfo())});c(b,"setLogging",function(){var a=this.getValue("logLevel",this.getBooleanValue("debug",!1)?"5":"4").charAt(0).charCodeAt(0)-48;4!=a&&System.out.println("setting logLevel="+a+' -- To change, use script "set logLevel [0-5]"');JU.Logger.setLogLevel(a)});c(b,"getParameter",
function(a){a=this.htParams.get(a.toLowerCase());return null==a?null:a.toString()},"~S");c(b,"getBooleanValue",function(a,b){var c=this.getValue(a,b?"true":"");return c.equalsIgnoreCase("true")||c.equalsIgnoreCase("on")||c.equalsIgnoreCase("yes")},"~S,~B");c(b,"getValue",function(a,b){var c=this.getParameter(a);System.out.println("getValue "+a+" = "+c);return null!=c?c:b},"~S,~S");f(b,"isPro",function(){return this.app.isPro()});f(b,"isSigned",function(){return this.app.isSigned()});f(b,"destroy",
function(){this.app.dispose();this.app=null});c(b,"getParameter",function(a,b){return this.isStandalone?System.getProperty(a,b):null!=this.getParameter(a)?this.getParameter(a):b},"~S,~S");f(b,"getAppletInfo",function(){return JSV.app.JSVApp.getAppletInfo()});f(b,"getSolnColour",function(){return this.app.getSolnColour()});f(b,"getCoordinate",function(){return this.app.getCoordinate()});f(b,"loadInline",function(a){this.app.loadInline(a)},"~S");c(b,"$export",function(a,b){return this.app.exportSpectrum(a,
b)},"~S,~N");f(b,"exportSpectrum",function(a,b){return this.app.exportSpectrum(a,b)},"~S,~N");f(b,"setFilePath",function(a){this.app.setFilePath(a)},"~S");f(b,"setSpectrumNumber",function(a){this.app.setSpectrumNumber(a)},"~N");f(b,"toggleGrid",function(){this.app.toggleGrid()});f(b,"toggleCoordinate",function(){this.app.toggleCoordinate()});f(b,"togglePointsOnly",function(){this.app.togglePointsOnly()});f(b,"toggleIntegration",function(){this.app.toggleIntegration()});f(b,"addHighlight",function(a,
b,c,f,e,g){this.app.addHighlight(a,b,c,f,e,g)},"~N,~N,~N,~N,~N,~N");f(b,"removeAllHighlights",function(){this.app.removeAllHighlights()});f(b,"removeHighlight",function(a,b){this.app.removeHighlight(a,b)},"~N,~N");f(b,"reversePlot",function(){this.app.reversePlot()});c(b,"script",function(a){this.app.initParams(a)},"~S");f(b,"runScript",function(a){this.app.runScript(a)},"~S");f(b,"syncScript",function(a){this.app.syncScript(a)},"~S");f(b,"writeStatus",function(a){this.app.writeStatus(a)},"~S");f(b,
"getPropertyAsJavaObject",function(a){return this.app.getPropertyAsJavaObject(a)},"~S");f(b,"getPropertyAsJSON",function(a){return this.app.getPropertyAsJSON(a)},"~S");f(b,"runScriptNow",function(a){return this.app.runScriptNow(a)},"~S");f(b,"print",function(a){return this.app.print(a)},"~S");f(b,"setDropTargetListener",function(){},"~B,JSV.common.JSViewer");f(b,"validateContent",function(){},"~N");f(b,"createMainPanel",function(a){a.mainPanel=new JSV.js2d.JsMainPanel},"JSV.common.JSViewer");f(b,
"newWindow",function(){},"~B");f(b,"callToJavaScript",function(a,b){var c=JU.PT.split(a,".");try{for(var f=window[c[0]],e=1;e<c.length;e++)f=f[c[e]];return f(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9])}catch(g){System.out.println(a+" failed "+g)}},"~S,~A");f(b,"setPanelVisible",function(){},"~B");f(b,"getJSVPanel",function(a,b){return null==b?JSV.js2d.JsPanel.getEmptyPanel(a):JSV.js2d.JsPanel.getPanelMany(a,b)},"JSV.common.JSViewer,JU.Lst");f(b,"getDocumentBase",function(){try{return new java.net.URL(ma("java.net.URL"),
this.viewerOptions.get("documentBase"),null)}catch(a){if(E(a,"java.net.MalformedURLException"))return null;throw a;}});f(b,"repaint",function(){});f(b,"validate",function(){});f(b,"doExitJmol",function(){});f(b,"getApp",function(){return this.app});f(b,"setStatusDragDropped",function(){return!0},"~N,~N,~N,~S,~A");f(b,"cacheFileByName",function(){return 0},"~S,~B");f(b,"cachePut",function(){},"~S,~O");f(b,"getFullName",function(){return this.app.vwr.fullName});f(b,"processMouseEvent",function(a,b,
c,f,e){return this.app.vwr.processMouseEvent(a,b,c,f,e)},"~N,~N,~N,~N,~N");f(b,"setDisplay",function(a){this.app.vwr.setDisplay(a)},"~O");f(b,"startHoverWatcher",function(){},"~B");f(b,"update",function(){this.app.vwr.updateJS()});c(b,"openFile",function(a){this.app.vwr.openFile(a,!0);return null},"~S");f(b,"openFileAsyncSpecial",function(a,b){this.app.vwr.openFileAsyncSpecial(a,b)},"~S,~N");f(b,"openFileAsyncSpecialType",function(a,b){this.openFileAsyncSpecial(a,b)},"~S,~N,~S");f(b,"processTwoPointGesture",
function(a){this.app.vwr.processTwoPointGesture(a)},"~A");f(b,"setScreenDimension",function(a,b){this.app.vwr.setScreenDimension(a,b)},"~N,~N");f(b,"checkScript",function(a){a=this.app.checkScript(a);null!=a&&System.out.println(a);return a},"~S");f(b,"processKeyEvent",function(){},"~O")});m("JSV.common");x(["java.lang.Enum","JSV.common.Coordinate"],"JSV.common.Annotation",["JU.CU"],function(){var b=s(function(){this.text="";this.is2D=this.$isPixels=!1;this.offsetY=this.offsetX=0;this.spec=null;r(this,
arguments)},JSV.common,"Annotation",JSV.common.Coordinate);c(b,"setA",function(a,b,c,f,e,g,j,k){this.set(a,b);this.spec=c;this.text=f;this.$isPixels=e;this.is2D=g;this.offsetX=j;this.offsetY=k;return this},"~N,~N,JSV.common.Spectrum,~S,~B,~B,~N,~N");c(b,"setSpec",function(a){this.spec=a;return this},"JSV.common.Spectrum");c(b,"addSpecShift",function(a){this.setXVal(this.getXVal()+a)},"~N");c(b,"isPixels",function(){return this.$isPixels});f(b,"toString",function(){return"["+this.getXVal()+", "+this.getYVal()+
","+this.text+"]"});b.getColoredAnnotation=c(b,"getColoredAnnotation",function(a,b,c,f){var e,g=0,j=1,k=2,l=3,m=c.size();try{switch(m){default:return null;case 1:e=c.get(0);g=j=-1;'"'==e.charAt(0)?(l=0,k=-1):(k=0,l=-1);break;case 2:g=j=-1;e=c.get(0);'"'==e.charAt(0)?(l=0,k=1):(k=0,l=1);break;case 3:case 4:e=c.get(2),'"'==e.charAt(0)?(l=2,k=4==m?3:-1):(k=2,l=4==m?3:-1),e=c.get(2),'"'==e.charAt(0)?(l=2,k=-1):(k=2,l=-1)}if(null==f&&(0>g||0>j||0>l||0>k))return null;var n=0>g?f.getXVal():Double.$valueOf(c.get(g)).doubleValue(),
q=0>j?f.getYVal():Double.$valueOf(c.get(j)).doubleValue(),r=0>k?f.getColor():a.getColor1(JU.CU.getArgbFromString(c.get(k))),s;0>l?s=f.text:(s=c.get(l),'"'==s.charAt(0)&&(s=s.substring(1,s.length-1)));return(new JSV.common.ColoredAnnotation).setCA(n,q,b,s,r,!1,!1,0,0)}catch(u){if(E(u,Exception))return null;throw u;}},"J.api.GenericGraphics,JSV.common.Spectrum,JU.Lst,JSV.common.Annotation");b=G(JSV.common.Annotation,"AType",Enum);A(b,"Integration",0,[]);A(b,"PeakList",1,[]);A(b,"Measurements",2,[]);
A(b,"OverlayLegend",3,[]);A(b,"Views",4,[]);A(b,"NONE",5,[])});m("JSV.common");x(["JSV.common.Annotation"],"JSV.common.ColoredAnnotation",null,function(){var b=s(function(){this.color=null;r(this,arguments)},JSV.common,"ColoredAnnotation",JSV.common.Annotation);u(b,function(){K(this,JSV.common.ColoredAnnotation,[])});c(b,"getColor",function(){return this.color});c(b,"setCA",function(a,b,c,f,e,g,j,k,l){this.setA(a,b,c,f,g,j,k,l);this.color=e;return this},"~N,~N,JSV.common.Spectrum,~S,javajs.api.GenericColor,~B,~B,~N,~N")});
m("JSV.common");x(["JSV.common.Parameters"],"JSV.common.ColorParameters",["java.util.Hashtable","$.StringTokenizer","JU.CU","$.Lst","JSV.common.ScriptToken"],function(){var b=s(function(){this.plotColors=this.elementColors=this.displayFontName=this.titleFontName=null;this.isDefault=!1;r(this,arguments)},JSV.common,"ColorParameters",JSV.common.Parameters);u(b,function(){K(this,JSV.common.ColorParameters,[]);JSV.common.ColorParameters.BLACK=this.getColor3(0,0,0);JSV.common.ColorParameters.RED=this.getColor3(255,
0,0);JSV.common.ColorParameters.LIGHT_GRAY=this.getColor3(200,200,200);JSV.common.ColorParameters.DARK_GRAY=this.getColor3(80,80,80);JSV.common.ColorParameters.BLUE=this.getColor3(0,0,255);JSV.common.ColorParameters.WHITE=this.getColor3(255,255,255);this.elementColors=new java.util.Hashtable;this.setColor(JSV.common.ScriptToken.TITLECOLOR,JSV.common.ColorParameters.BLACK);this.setColor(JSV.common.ScriptToken.UNITSCOLOR,JSV.common.ColorParameters.RED);this.setColor(JSV.common.ScriptToken.SCALECOLOR,
JSV.common.ColorParameters.BLACK);this.setColor(JSV.common.ScriptToken.COORDINATESCOLOR,JSV.common.ColorParameters.RED);this.setColor(JSV.common.ScriptToken.GRIDCOLOR,JSV.common.ColorParameters.LIGHT_GRAY);this.setColor(JSV.common.ScriptToken.PLOTCOLOR,JSV.common.ColorParameters.BLUE);this.setColor(JSV.common.ScriptToken.PLOTAREACOLOR,JSV.common.ColorParameters.WHITE);this.setColor(JSV.common.ScriptToken.BACKGROUNDCOLOR,this.getColor3(192,192,192));this.setColor(JSV.common.ScriptToken.INTEGRALPLOTCOLOR,
JSV.common.ColorParameters.RED);this.setColor(JSV.common.ScriptToken.PEAKTABCOLOR,JSV.common.ColorParameters.RED);this.setColor(JSV.common.ScriptToken.PEAKOVERCOLOR,JSV.common.ColorParameters.RED);this.setColor(JSV.common.ScriptToken.HIGHLIGHTCOLOR,JSV.common.ColorParameters.DARK_GRAY);for(var a=0;8>a;a++)JSV.common.ColorParameters.defaultPlotColors[a]=this.getColorFromString(JSV.common.ColorParameters.defaultPlotColorNames[a]);this.plotColors=Array(8);System.arraycopy(JSV.common.ColorParameters.defaultPlotColors,
0,this.plotColors,0,8)});c(b,"setFor",function(a,b,c){null==b&&(b=this);c&&a.getPanelData().setBooleans(b,null);a=a.getPanelData();null!=a.getCurrentPlotColor(1)&&a.setPlotColors(this.plotColors);a.setColorOrFont(b,null)},"JSV.api.JSVPanel,JSV.common.ColorParameters,~B");c(b,"set",function(a,b,c){var f=null;switch(b){default:this.setP(a,b,c);return;case JSV.common.ScriptToken.PLOTCOLORS:null==a?this.getPlotColors(c):a.setPlotColors(this.getPlotColors(c));return;case JSV.common.ScriptToken.BACKGROUNDCOLOR:case JSV.common.ScriptToken.COORDINATESCOLOR:case JSV.common.ScriptToken.GRIDCOLOR:case JSV.common.ScriptToken.HIGHLIGHTCOLOR:case JSV.common.ScriptToken.INTEGRALPLOTCOLOR:case JSV.common.ScriptToken.PEAKOVERCOLOR:case JSV.common.ScriptToken.PEAKTABCOLOR:case JSV.common.ScriptToken.PLOTAREACOLOR:case JSV.common.ScriptToken.PLOTCOLOR:case JSV.common.ScriptToken.SCALECOLOR:case JSV.common.ScriptToken.TITLECOLOR:case JSV.common.ScriptToken.UNITSCOLOR:f=
this.setColorFromString(b,c);break;case JSV.common.ScriptToken.TITLEFONTNAME:case JSV.common.ScriptToken.DISPLAYFONTNAME:f=this.getFontName(b,c)}null!=a&&null!=f&&a.setColorOrFont(this,b)},"JSV.common.PanelData,JSV.common.ScriptToken,~S");c(b,"getElementColor",function(a){return this.elementColors.get(a)},"JSV.common.ScriptToken");c(b,"setColor",function(a,b){null!=b&&this.elementColors.put(a,b);return b},"JSV.common.ScriptToken,javajs.api.GenericColor");c(b,"copy",function(){return this.copy(this.name)});
c(b,"setElementColors",function(a){this.displayFontName=a.displayFontName;var b;for(a=a.elementColors.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.setColor(b.getKey(),b.getValue());return this},"JSV.common.ColorParameters");c(b,"getColorFromString",function(a){return this.getColor1(JU.CU.getArgbFromString(a))},"~S");c(b,"getPlotColors",function(a){if(null==a)return this.plotColors[0]=this.getElementColor(JSV.common.ScriptToken.PLOTCOLOR),this.plotColors;a=new java.util.StringTokenizer(a,
",;.- ");var b=new JU.Lst;try{for(;a.hasMoreTokens();)b.addLast(this.getColorFromString(a.nextToken()))}catch(c){if(E(c,Exception))return null;throw c;}return b.toArray(Array(b.size()))},"~S");c(b,"setColorFromString",function(a,b){return this.setColor(a,this.getColorFromString(b))},"JSV.common.ScriptToken,~S");c(b,"getFontName",function(a,b){var c=this.isValidFontName(b);switch(a){case JSV.common.ScriptToken.TITLEFONTNAME:return c?this.titleFontName=b:this.titleFontName;case JSV.common.ScriptToken.DISPLAYFONTNAME:return c?
this.displayFontName=b:this.displayFontName}return null},"JSV.common.ScriptToken,~S");b.BLACK=null;b.RED=null;b.LIGHT_GRAY=null;b.DARK_GRAY=null;b.BLUE=null;b.WHITE=null;b.defaultPlotColors=Array(8);b.defaultPlotColorNames=z(-1,"black darkGreen darkred orange magenta cyan maroon darkGray".split(" "))});m("JSV.common");var qb=G(JSV.common,"CoordComparator",null,java.util.Comparator);f(qb,"compare",function(b,a){return b.getXVal()>a.getXVal()?1:b.getXVal()<a.getXVal()?-1:0},"JSV.common.Coordinate,JSV.common.Coordinate");
m("JSV.common");x(["JSV.common.CoordComparator"],"JSV.common.Coordinate",["java.util.Arrays","$.StringTokenizer","JU.Lst"],function(){var b=s(function(){this.yVal=this.xVal=0;r(this,arguments)},JSV.common,"Coordinate",null);c(b,"set",function(a,b){this.xVal=a;this.yVal=b;return this},"~N,~N");c(b,"getXVal",function(){return this.xVal});c(b,"getYVal",function(){return this.yVal});c(b,"setXVal",function(a){this.xVal=a},"~N");c(b,"setYVal",function(a){this.yVal=a},"~N");c(b,"copy",function(){return(new JSV.common.Coordinate).set(this.xVal,
this.yVal)});c(b,"equals",function(a){return a.xVal==this.xVal&&a.yVal==this.yVal},"JSV.common.Coordinate");f(b,"toString",function(){return"["+this.xVal+", "+this.yVal+"]"});b.isYInRange=c(b,"isYInRange",function(a,b,c){return JSV.common.Coordinate.getMinY(a,0,a.length-1)>=b&&JSV.common.Coordinate.getMaxY(a,0,a.length-1)>=c},"~A,~N,~N");b.normalise=c(b,"normalise",function(a,b,c){var f=Array(a.length),e=JSV.common.Coordinate.getMinY(a,0,a.length-1);c=(JSV.common.Coordinate.getMaxY(a,0,a.length-1)-
e)/(c-b);for(var g=0;g<a.length;g++)f[g]=(new JSV.common.Coordinate).set(a[g].getXVal(),(a[g].getYVal()-e)/c-b);return f},"~A,~N,~N");b.reverse=c(b,"reverse",function(a){for(var b=a.length,c=0;c<b;c++){var f=a[c];a[c]=a[--b];a[b]=f}return a},"~A");b.parseDSV=c(b,"parseDSV",function(a,b,c){var f,e=f=0,g=new JU.Lst;0<=a.indexOf("(")&&(a=a.$replace("("," ").$replace(")"," ").$replace(","," "));for(a=new java.util.StringTokenizer(a," \t\n\r\f,;");a.hasMoreTokens();)f=a.nextToken().trim(),e=a.nextToken().trim(),
f=Double.parseDouble(f),e=Double.parseDouble(e),f=(new JSV.common.Coordinate).set(f*b,e*c),g.addLast(f);b=Array(g.size());return g.toArray(b)},"~S,~N,~N");b.deltaX=c(b,"deltaX",function(a,b,c){return(a-b)/(c-1)},"~N,~N,~N");b.removeScale=c(b,"removeScale",function(a,b,c){JSV.common.Coordinate.applyScale(a,1/b,1/c)},"~A,~N,~N");b.applyScale=c(b,"applyScale",function(a,b,c){if(1!=b||1!=c)for(var f=0;f<a.length;f++)a[f].setXVal(a[f].getXVal()*b),a[f].setYVal(a[f].getYVal()*c)},"~A,~N,~N");b.getMinX=
c(b,"getMinX",function(a,b,c){for(var f=1.7976931348623157E308;b<=c;b++){var e=a[b].getXVal();e<f&&(f=e)}return f},"~A,~N,~N");b.getMinX=c(b,"getMinX",function(a,b){for(var c=1.7976931348623157E308,f=0;f<a.size();f++){var e=a.get(f).getXYCoords(),e=JSV.common.Coordinate.getMinX(e,b.getStartingPointIndex(f),b.getEndingPointIndex(f));e<c&&(c=e)}return c},"JU.Lst,JSV.common.ViewData");b.getMaxX=c(b,"getMaxX",function(a,b,c){for(var f=-1.7976931348623157E308;b<=c;b++){var e=a[b].getXVal();e>f&&(f=e)}return f},
"~A,~N,~N");b.getMaxX=c(b,"getMaxX",function(a,b){for(var c=-1.7976931348623157E308,f=0;f<a.size();f++){var e=a.get(f).getXYCoords(),e=JSV.common.Coordinate.getMaxX(e,b.getStartingPointIndex(f),b.getEndingPointIndex(f));e>c&&(c=e)}return c},"JU.Lst,JSV.common.ViewData");b.getMinY=c(b,"getMinY",function(a,b,c){for(var f=1.7976931348623157E308;b<=c;b++){var e=a[b].getYVal();e<f&&(f=e)}return f},"~A,~N,~N");b.getMinYUser=c(b,"getMinYUser",function(a,b){for(var c=1.7976931348623157E308,f=0;f<a.size();f++){var e=
a.get(f).getUserYFactor(),g=a.get(f).getYRef(),j=a.get(f).getXYCoords(),e=(JSV.common.Coordinate.getMinY(j,b.getStartingPointIndex(f),b.getEndingPointIndex(f))-g)*e+g;e<c&&(c=e)}return c},"JU.Lst,JSV.common.ViewData");b.getMaxY=c(b,"getMaxY",function(a,b,c){for(var f=-1.7976931348623157E308;b<=c;b++){var e=a[b].getYVal();e>f&&(f=e)}return f},"~A,~N,~N");b.getMaxYUser=c(b,"getMaxYUser",function(a,b){for(var c=-1.7976931348623157E308,f=0;f<a.size();f++){var e=a.get(f).getUserYFactor(),g=a.get(f).getYRef(),
j=a.get(f).getXYCoords(),e=(JSV.common.Coordinate.getMaxY(j,b.getStartingPointIndex(f),b.getEndingPointIndex(f))-g)*e+g;e>c&&(c=e)}return c},"JU.Lst,JSV.common.ViewData");b.getYValueAt=c(b,"getYValueAt",function(a,b){var c=JSV.common.Coordinate.getNearestIndexForX(a,b);if(0==c||c==a.length)return NaN;var f=a[c].getXVal(),e=a[c-1].getXVal(),g=a[c].getYVal(),c=a[c-1].getYVal();return f==e?g:c+(g-c)/(f-e)*(b-e)},"~A,~N");b.intoRange=c(b,"intoRange",function(a,b,c){return Math.max(Math.min(a,c),b)},"~N,~N,~N");
b.getNearestIndexForX=c(b,"getNearestIndexForX",function(a,b){var c=(new JSV.common.Coordinate).set(b,0),c=java.util.Arrays.binarySearch(a,c,JSV.common.Coordinate.c);0>c&&(c=-1-c);return 0>c?0:c>a.length-1?a.length-1:c},"~A,~N");b.findXForPeakNearest=c(b,"findXForPeakNearest",function(a,b,c){b=JSV.common.Coordinate.getNearestIndexForX(a,b);for(c=c?-1:1;b<a.length-1&&0<c*(a[b+1].yVal-a[b].yVal);)b++;for(;1<=b&&0<c*(a[b-1].yVal-a[b].yVal);)b--;return 0==b||b==a.length-1?a[b].xVal:JSV.common.Coordinate.parabolicInterpolation(a,
b)},"~A,~N,~B");b.parabolicInterpolation=c(b,"parabolicInterpolation",function(a,b){var c=a[b-1].yVal,f=a[b+1].yVal;return a[b].xVal+(c-f)/2/(c-2*a[b].yVal+f)*(a[b+1].xVal-a[b].xVal)},"~A,~N");b.getPickedCoordinates=c(b,"getPickedCoordinates",function(a,b,c,f){if(null==b)return!1;var e=b.getXVal();c.setXVal(e);c.setYVal(b.getYVal());if(null==f)return!0;b=JSV.common.Coordinate.getNearestIndexForX(a,e);f.setXVal(a[b].getXVal());f.setYVal(a[b].getYVal());return!0},"~A,JSV.common.Coordinate,JSV.common.Coordinate,JSV.common.Coordinate");
b.shiftX=c(b,"shiftX",function(a,b){for(var c=a.length;0<=--c;)a[c].xVal+=b},"~A,~N");b.getNearestXWithYAbove=c(b,"getNearestXWithYAbove",function(a,b,c,f,e){b=JSV.common.Coordinate.getNearestIndexForX(a,b);var g=f?-1:1;if(e)for(;b<a.length&&0>g*(a[b].yVal-c);)b++;else for(;0<=b&&0>g*(a[b].yVal-c);)b--;return-1==b||b==a.length?NaN:JSV.common.Coordinate.findXForPeakNearest(a,a[b].getXVal(),f)},"~A,~N,~N,~B,~B");b.c=new JSV.common.CoordComparator});m("JSV.common");x(["java.lang.Enum"],"JSV.common.ExportType",
null,function(){var b=G(JSV.common,"ExportType",Enum);b.getType=c(b,"getType",function(a){a=a.toUpperCase();if(a.equalsIgnoreCase("Original..."))return JSV.common.ExportType.SOURCE;if(a.startsWith("XML"))return JSV.common.ExportType.AML;for(var b,c=0,f=JSV.common.ExportType.values();c<f.length&&((b=f[c])||1);c++)if(b.name().equals(a))return b;return JSV.common.ExportType.UNK},"~S");b.isExportMode=c(b,"isExportMode",function(a){return JSV.common.ExportType.getType(a)!==JSV.common.ExportType.UNK},"~S");
A(b,"UNK",0,[]);A(b,"SOURCE",1,[]);A(b,"DIF",2,[]);A(b,"FIX",3,[]);A(b,"SQZ",4,[]);A(b,"PAC",5,[]);A(b,"XY",6,[]);A(b,"DIFDUP",7,[]);A(b,"PNG",8,[]);A(b,"JPG",9,[]);A(b,"SVG",10,[]);A(b,"SVGI",11,[]);A(b,"CML",12,[]);A(b,"AML",13,[]);A(b,"PDF",14,[])});m("JSV.common");x(["JSV.common.XYScaleConverter","java.util.Hashtable","JU.BS","$.Lst","JSV.common.Coordinate"],"JSV.common.GraphSet","JU.DF $.PT JSV.common.Annotation $.ColorParameters $.ColoredAnnotation $.ImageView $.IntegralData $.Measurement $.MeasurementData $.PanelData $.Parameters $.PeakData $.PeakPickEvent $.PlotWidget $.ScaleData $.ScriptToken $.Spectrum $.ViewData JU.Logger".split(" "),
function(){var b=s(function(){this.gs2dLinkedY=this.gs2dLinkedX=null;this.cur1D2Locked=!1;this.spectra=this.highlights=null;this.allowStacking=this.isSplittable=!0;this.widgets=this.graphsTemp=this.pendingIntegral=this.pendingMeasurement=this.lastAnnotation=this.selectedSpectrumIntegrals=this.selectedSpectrumMeasurements=this.annotations=null;this.haveSingleYScale=this.isLinked=!1;this.iSpectrumMovedTo=-1;this.iSpectrumClicked=0;this.iSpectrumSelected=-1;this.stackSelected=!1;this.viewData=this.bsSelected=
null;this.reversePlot=!1;this.nSplit=1;this.yStackOffsetPercent=0;this.showAllStacked=!0;this.pd=this.imageView=this.viewList=null;this.sticky2Dcursor=!1;this.nSpectra=0;this.fracY=this.fracX=1;this.fY0=this.fX0=0;this.cur2Dy=this.cur1D2x2=this.cur1D2x1=this.cur2Dx1=this.cur2Dx0=this.pin2Dy01=this.pin2Dx01=this.pin2Dy1=this.pin2Dy0=this.pin2Dx1=this.pin2Dx0=this.pin1Dy01=this.pin1Dx01=this.pin1Dy1=this.pin1Dy0=this.pin1Dx1=this.pin1Dx0=this.zoomBox2D=this.zoomBox1D=null;this.yHArrows=this.xHArrows=
this.xVArrows=this.xPixels0=this.xPixel10=this.yPixel000=this.yPixel11=this.xPixel11=this.yPixel00=this.xPixel00=this.yPixels=this.xPixels=this.yPixel1=this.xPixel1=this.yPixel0=this.xPixel0=0;this.allowStackedYScale=!0;this.drawXAxisLeftToRight=!1;this.xAxisLeftToRight=!0;this.iPreviousSpectrumClicked=-1;this.zoomEnabled=this.$haveSelectedSpectrum=!1;this.currentZoomIndex=0;this.lastClickX=NaN;this.lastPixelX=2147483647;this.bottom=this.left=this.top=this.right=this.width=this.height=0;this.coordTemp=
this.piMouseOver=null;this.FONT_PLAIN=0;this.FONT_BOLD=1;this.FONT_ITALIC=2;this.is2DSpectrum=!1;this.selectedIntegral=this.selectedMeasurement=null;this.lastXMax=NaN;this.lastSpecClicked=-1;this.inPlotMove=!1;this.xPixelMovedTo2=this.xPixelMovedTo=-1;this.xValueMovedTo=this.yValueMovedTo=0;this.haveLeftRightArrows=!1;this.yPixelPlot1=this.yPixelPlot0=this.xPixelPlot0=this.xPixelPlot1=0;this.nextClickForSetPeak=null;this.splitterY=this.splitterX=this.closerY=this.closerX=0;this.isPrintingOrSaving=
!1;this.mapX=null;R("JSV.common.GraphSet.Highlight")||JSV.common.GraphSet.$GraphSet$Highlight$();this.widgetsAreSet=!0;this.nextClickMode=this.lastIntDragX=0;this.gMain=this.g2d=this.plotColors=this.image2D=this.jsvp=this.aIntegrationRatios=this.dialogs=null;this.COLOR_GREY=-3;this.COLOR_BLACK=-2;this.COLOR_INTEGRAL=-1;r(this,arguments)},JSV.common,"GraphSet",null,JSV.common.XYScaleConverter);N(b,function(){this.highlights=new JU.Lst;this.spectra=new JU.Lst;this.graphsTemp=new JU.Lst;this.bsSelected=
new JU.BS;this.coordTemp=new JSV.common.Coordinate;this.mapX=new java.util.Hashtable});u(b,function(a){this.pd=a;this.jsvp=a.jsvp;this.g2d=a.g2d},"JSV.common.PanelData");c(b,"setSpectrumMovedTo",function(a){return this.iSpectrumMovedTo=a},"~N");c(b,"setSpectrumClicked",function(a){this.stackSelected=this.showAllStacked;if(0>a||this.iSpectrumClicked!=a)this.lastClickX=NaN,this.lastPixelX=2147483647;this.iSpectrumClicked=this.setSpectrumSelected(this.setSpectrumMovedTo(a))},"~N");c(b,"setSpectrumSelected",
function(a){var b=a!=this.iSpectrumSelected;this.iSpectrumSelected=a;b&&this.getCurrentView();return this.iSpectrumSelected},"~N");c(b,"closeDialogsExcept",function(a){if(null!=this.dialogs)for(var b,c=this.dialogs.entrySet().iterator();c.hasNext()&&((b=c.next())||1);){var f=b.getValue();JSV.common.GraphSet.isDialog(f)&&(a===JSV.common.Annotation.AType.NONE||f.getAType()!==a)&&f.setVisible(!1)}},"JSV.common.Annotation.AType");c(b,"dispose",function(){this.widgets=this.graphsTemp=this.imageView=this.pendingMeasurement=
this.lastAnnotation=this.annotations=this.viewList=this.viewData=this.spectra=null;this.disposeImage();if(null!=this.dialogs)for(var a,b=this.dialogs.entrySet().iterator();b.hasNext()&&((a=b.next())||1);){var c=a.getValue();JSV.common.GraphSet.isDialog(c)&&c.dispose()}this.dialogs=null});c(b,"isDrawNoSpectra",function(){return-2147483648==this.iSpectrumSelected});c(b,"getFixedSelectedSpectrumIndex",function(){return Math.max(this.iSpectrumSelected,0)});c(b,"getSpectrum",function(){return this.getSpectrumAt(this.getFixedSelectedSpectrumIndex()).getCurrentSubSpectrum()});
c(b,"getSpectrumAt",function(a){return this.spectra.get(a)},"~N");c(b,"getSpectrumIndex",function(a){for(var b=this.spectra.size();0<=--b;)if(this.spectra.get(b)===a)return b;return-1},"JSV.common.Spectrum");c(b,"addSpec",function(a){this.spectra.addLast(a);this.nSpectra++},"JSV.common.Spectrum");c(b,"splitStack",function(a){a&&this.isSplittable?(this.nSplit=this.nSpectra,this.showAllStacked=!1,this.setSpectrumClicked(this.iSpectrumSelected),this.pd.currentSplitPoint=this.iSpectrumSelected):(this.nSplit=
1,this.showAllStacked=this.allowStacking&&!a,this.setSpectrumClicked(this.iSpectrumSelected));this.stackSelected=!1;JSV.common.GraphSet.setFractionalPositions(this.pd,this.pd.graphSets,JSV.common.PanelData.LinkMode.NONE);this.pd.setTaintedAll()},"~B");c(b,"setPositionForFrame",function(a){0>a&&(a=0);var b=this.height-50;this.xPixel00=w(this.width*this.fX0);this.xPixel11=w(this.xPixel00+this.width*this.fracX-1);this.xHArrows=this.xPixel00+25;this.xVArrows=this.xPixel11-w(this.right/2);this.xPixel0=
this.xPixel00+w(this.left*(1-this.fX0));this.xPixel10=this.xPixel1=this.xPixel11-this.right;this.xPixels0=this.xPixels=this.xPixel1-this.xPixel0+1;this.yPixel000=(this.pd.isPrinting?100:!this.isPrintingOrSaving&&0==this.fY0?25:0)+w(this.height*this.fY0);this.yPixel00=this.yPixel000+w(b*this.fracY*a);this.yPixel11=this.yPixel00+w(b*this.fracY)-1;this.yHArrows=this.yPixel11-12;this.yPixel0=this.yPixel00+w(this.top/2);this.yPixel1=this.yPixel11-w(this.bottom/2);this.yPixels=this.yPixel1-this.yPixel0+
1;null!=this.imageView&&this.is2DSpectrum&&(this.setImageWindow(),this.pd.display1D?(this.xPixels=w(Math.floor(0.8*(this.pd.display1D?1*(this.xPixels0-this.imageView.xPixels)/this.xPixels0:1)*this.xPixels0)),this.xPixel1=this.xPixel0+this.xPixels-1):(this.xPixels=0,this.xPixel1=this.imageView.xPixel0-30))},"~N");c(b,"hasPoint",function(a,b){return a>=this.xPixel00&&a<=this.xPixel11&&b>=this.yPixel000&&b<=this.yPixel11*this.nSplit},"~N,~N");c(b,"isInPlotRegion",function(a,b){return a>=this.xPixel0&&
a<=this.xPixel1&&b>=this.yPixel0&&b<=this.yPixel1},"~N,~N");c(b,"getSplitPoint",function(a){return this.yPixel1==this.yPixel00?0:Math.max(0,Math.min(w((a-this.yPixel000)/(this.yPixel11-this.yPixel00)),this.nSplit-1))},"~N");c(b,"isSplitWidget",function(a,b){return this.isFrameBox(a,b,this.splitterX,this.splitterY)},"~N,~N");c(b,"isCloserWidget",function(a,b){return this.isFrameBox(a,b,this.closerX,this.closerY)},"~N,~N");c(b,"initGraphSet",function(a,b){null==JSV.common.GraphSet.veryLightGrey&&(JSV.common.GraphSet.veryLightGrey=
this.g2d.getColor3(200,200,200));this.setPlotColors(JSV.common.ColorParameters.defaultPlotColors);this.xAxisLeftToRight=this.getSpectrumAt(0).shouldDisplayXAxisIncreasing();this.setDrawXAxis();var c=D(this.nSpectra,0),f=D(this.nSpectra,0);this.bsSelected.setBits(0,this.nSpectra);this.allowStackedYScale=!0;0>=b&&(b=2147483647);this.isSplittable=1<this.nSpectra;this.showAllStacked=(this.allowStacking=this.spectra.get(0).isStackable())&&1<this.nSpectra;for(var e=0;e<this.nSpectra;e++){var g=this.spectra.get(e).getXYCoords().length-
1;c[e]=JSV.common.Coordinate.intoRange(a,0,g);f[e]=JSV.common.Coordinate.intoRange(b,0,g);this.allowStackedYScale=(new Boolean(this.allowStackedYScale&(this.spectra.get(e).getYUnits().equals(this.spectra.get(0).getYUnits())&&this.spectra.get(e).getUserYFactor()==this.spectra.get(0).getUserYFactor()))).valueOf()}this.getView(0,0,0,0,c,f,null,null);this.viewList=new JU.Lst;this.viewList.addLast(this.viewData)},"~N,~N");c(b,"getView",function(a,b,c,f,e,g,j,k){var l=0==this.graphsTemp.size()?this.spectra:
this.graphsTemp,m=this.getSpectrumAt(0).getSubSpectra(),n=null==m||2==m.size()&&m.get(1).isImaginary(),q=!this.getSpectrumAt(0).is1D();n&&c==f?l=this.spectra:c==f&&(this.viewData=new JSV.common.ViewData(m,c,f,this.getSpectrum().isContinuous()),l=null);null!=l&&(this.viewData=new JSV.common.ViewData(l,c,f,e,g,this.getSpectrumAt(0).isContinuous(),q),a!=b&&this.getScale().setXRange(a,b));null!=j&&(JSV.common.ScaleData.copyScaleFactors(j,this.viewData.getScaleData()),null!=k&&JSV.common.ScaleData.copyYScales(k,
this.viewData.getScaleData()),this.getCurrentView())},"~N,~N,~N,~N,~A,~A,~A,~A");c(b,"isNearby",function(a,b,c,f){var e=a.getXVal(),g=c.toPixelX(e);a=this.toPixelY(a.getYVal());e=b.getXVal();c=c.toPixelX(e);b=this.toPixelY(b.getYVal());return Math.abs(g-c)+Math.abs(a-b)<f},"JSV.common.Coordinate,JSV.common.Coordinate,JSV.common.XYScaleConverter,~N");c(b,"setReversePlot",function(a){(this.reversePlot=a)&&this.closeDialogsExcept(JSV.common.Annotation.AType.NONE);this.setDrawXAxis()},"~B");c(b,"setDrawXAxis",
function(){this.drawXAxisLeftToRight=(new Boolean(this.xAxisLeftToRight^this.reversePlot)).valueOf();for(var a=0;a<this.spectra.size();a++)this.spectra.get(a).setExportXAxisDirection(this.drawXAxisLeftToRight)});c(b,"isInTopBar",function(a,b){return a==this.fixX(a)&&b>this.pin1Dx0.yPixel0-2&&b<this.pin1Dx0.yPixel1},"~N,~N");c(b,"isInTopBar2D",function(a,b){return null!=this.imageView&&a==this.imageView.fixX(a)&&b>this.pin2Dx0.yPixel0-2&&b<this.pin2Dx0.yPixel1},"~N,~N");c(b,"isInRightBar",function(a,
b){return b==this.fixY(b)&&a>this.pin1Dy0.xPixel1&&a<this.pin1Dy0.xPixel0+2},"~N,~N");c(b,"isInRightBar2D",function(a,b){return null!=this.imageView&&b==this.fixY(b)&&a>this.pin2Dy0.xPixel1&&a<this.pin2Dy0.xPixel0+2},"~N,~N");c(b,"toX0",function(a){return this.viewList.get(0).getScale().toX0(this.fixX(a),this.xPixel0,this.xPixel1,this.drawXAxisLeftToRight)},"~N");c(b,"toY0",function(a){return this.viewList.get(0).getScale().toY0(this.fixY(a),this.yPixel0,this.yPixel1)},"~N");f(b,"toX",function(a){return null!=
this.imageView&&this.imageView.isXWithinRange(a)?this.imageView.toX(a):this.getScale().toX(this.fixX(a),this.xPixel1,this.drawXAxisLeftToRight)},"~N");f(b,"toY",function(a){return this.getScale().toY(a,this.yPixel0)},"~N");c(b,"toPixelX",function(a){return this.getScale().toPixelX(a,this.xPixel0,this.xPixel1,this.drawXAxisLeftToRight)},"~N");c(b,"toPixelY",function(a){return this.getScale().toPixelY(a,this.yPixel1)},"~N");c(b,"toPixelX0",function(a){return this.viewList.get(0).getScale().toPixelX0(a,
this.xPixel0,this.xPixel1,this.drawXAxisLeftToRight)},"~N");c(b,"toPixelY0",function(a){return this.fixY(this.viewList.get(0).getScale().toPixelY0(a,this.yPixel0,this.yPixel1))},"~N");c(b,"fixX",function(a){return JSV.common.Coordinate.intoRange(a,this.xPixel0,this.xPixel1)},"~N");c(b,"fixY",function(a){return JSV.common.Coordinate.intoRange(a,this.yPixel0,this.yPixel1)},"~N");c(b,"getXPixel0",function(){return this.xPixel0});c(b,"getXPixels",function(){return this.xPixels});f(b,"getYPixels",function(){return this.yPixels});
c(b,"getScale",function(){return this.viewData.getScale()});c(b,"toPixelYint",function(a){return this.yPixel1-w(Double.isNaN(a)?-2147483648:this.yPixels*a)},"~N");c(b,"findAnnotation2D",function(a){for(var b=this.annotations.size();0<=--b;){var c=this.annotations.get(b);if(this.isNearby(c,a,this.imageView,10))return c}return null},"JSV.common.Coordinate");c(b,"addAnnotation",function(a,b){null==this.annotations&&(this.annotations=new JU.Lst);for(var c=!1,f=this.annotations.size();0<=--f;)if(a.is2D?
this.isNearby(this.annotations.get(f),a,this.imageView,10):a.equals(this.annotations.get(f)))c=!0,this.annotations.removeItemAt(f);0<a.text.length&&(!c||!b)&&this.annotations.addLast(a)},"JSV.common.Annotation,~B");c(b,"setImageWindow",function(){this.imageView.setPixelWidthHeight(w((this.pd.display1D?0.6:1)*this.xPixels0),this.yPixels);this.imageView.setXY0(this.getSpectrumAt(0),w(Math.floor(this.xPixel10-this.imageView.xPixels)),this.yPixel0)});c(b,"findNearestMaxMin",function(){if(1<this.nSpectra&&
0>this.iSpectrumClicked)return!1;this.xValueMovedTo=this.getSpectrum().findXForPeakNearest(this.xValueMovedTo);this.setXPixelMovedTo(this.xValueMovedTo,1.7976931348623157E308,0,0);return!Double.isNaN(this.xValueMovedTo)});c(b,"setXPixelMovedTo",function(a,b,c,f){1.7976931348623157E308==a&&1.7976931348623157E308==b?(this.xPixelMovedTo=c,this.xPixelMovedTo2=f,this.isLinked&&this.sticky2Dcursor&&this.pd.setlinkedXMove(this,this.toX(this.xPixelMovedTo),!1)):(1.7976931348623157E308!=a&&(this.xPixelMovedTo=
this.toPixelX(a),this.fixX(this.xPixelMovedTo)!=this.xPixelMovedTo&&(this.xPixelMovedTo=-1),this.xPixelMovedTo2=-1,1E10!=a&&this.setSpectrumClicked(this.getFixedSelectedSpectrumIndex())),1.7976931348623157E308!=b&&(this.xPixelMovedTo2=this.toPixelX(b)))},"~N,~N,~N,~N");c(b,"processPendingMeasurement",function(a,b,c){if(!this.isInPlotRegion(a,b)||this.is2dClick(a,b))this.pendingMeasurement=null;else{var f=this.toX(a),e=this.toY(b),g=f;switch(c){case 0:this.pendingMeasurement.setPt2(this.toX(a),this.toY(b));
break;case 3:case 2:if(0>this.iSpectrumClicked)break;var j=this.spectra.get(this.iSpectrumClicked);this.setScale(this.iSpectrumClicked);3!=c&&(c=this.findMeasurement(this.selectedSpectrumMeasurements,a,b,1),null!=c?(f=c.getXVal(),e=c.getYVal()):null!=(c=this.findMeasurement(this.selectedSpectrumMeasurements,a,b,2))?(f=c.getXVal2(),e=c.getYVal2()):f=this.getNearestPeak(j,f,e));this.pendingMeasurement=(new JSV.common.Measurement).setM1(f,e,j);this.pendingMeasurement.setPt2(g,e);this.pd.setTaintedAll();
this.pd.repaint();break;case 1:case -2:case -3:for(g=null!=this.pendingMeasurement&&this.isVisible(this.getDialog(JSV.common.Annotation.AType.Measurements,-1));g;){this.setScale(this.getSpectrumIndex(this.pendingMeasurement.spec));if(3!=c){if(!this.findNearestMaxMin()){g=!1;break}a=this.xPixelMovedTo}f=this.toX(a);e=this.toY(b);this.pendingMeasurement.setPt2(f,e);if(0==this.pendingMeasurement.text.length){g=!1;break}this.setMeasurement(this.pendingMeasurement);if(1!=c){g=!1;break}this.setSpectrumClicked(this.getSpectrumIndex(this.pendingMeasurement.spec));
this.pendingMeasurement=(new JSV.common.Measurement).setM1(f,e,this.pendingMeasurement.spec);break}g||(this.pendingMeasurement=null);this.pd.setTaintedAll();this.pd.repaint();break;case 5:this.findNearestMaxMin()?(a=this.getFixedSelectedSpectrumIndex(),Double.isNaN(this.lastXMax)||this.lastSpecClicked!=a||null==this.pendingMeasurement?(this.lastXMax=this.xValueMovedTo,this.lastSpecClicked=a,this.pendingMeasurement=(new JSV.common.Measurement).setM1(this.xValueMovedTo,this.yValueMovedTo,this.spectra.get(a))):
(this.pendingMeasurement.setPt2(this.xValueMovedTo,this.yValueMovedTo),0<this.pendingMeasurement.text.length&&this.setMeasurement(this.pendingMeasurement),this.pendingMeasurement=null,this.lastXMax=NaN)):this.lastXMax=NaN}}},"~N,~N,~N");c(b,"checkIntegralNormalizationClick",function(a,b){if(null==this.selectedSpectrumIntegrals)return!1;var c=this.findMeasurement(this.selectedSpectrumIntegrals,a,b,-5);if(null==c)return!1;this.selectedIntegral=c;this.pd.normalizeIntegral();this.updateDialog(JSV.common.Annotation.AType.Integration,
-1);this.setSpectrumClicked(this.getSpectrumIndex(c.spec));return!0},"~N,~N");c(b,"getNearestPeak",function(a,b,c){var f=JSV.common.Coordinate.getNearestXWithYAbove(a.getXYCoords(),b,c,a.isInverted(),!1);a=JSV.common.Coordinate.getNearestXWithYAbove(a.getXYCoords(),b,c,a.isInverted(),!0);return Double.isNaN(f)?a:Double.isNaN(a)?f:Math.abs(f-b)<Math.abs(a-b)?f:a},"JSV.common.Spectrum,~N,~N");c(b,"findMeasurement",function(a,b,c,f){if(null==a||0==a.size())return null;if(0==f){var e=this.findMeasurement(a,
b,c,-1);return null!=e||C(a.get(0),"JSV.common.Integral")?e:this.findMeasurement(a,b,c,-2)}for(var g=a.size();0<=--g;){var e=a.get(g),j,k,l,m;C(e,"JSV.common.Integral")?(j=k=this.toPixelX(e.getXVal2()),l=this.toPixelYint(e.getYVal()),m=this.toPixelYint(e.getYVal2())):(j=this.toPixelX(e.getXVal()),k=this.toPixelX(e.getXVal2()),l=m=-2==f?this.yPixel1-2:this.toPixelY(e.getYVal()));switch(f){case 1:if(4>Math.abs(b-j)+Math.abs(c-l))return e;break;case 2:if(4>Math.abs(b-k)+Math.abs(c-m))return e;break;
case -5:l=m=w((l+m)/2),k=j+20;default:case -1:case -2:if(JSV.common.GraphSet.isOnLine(b,c,j,l,k,m))return e}}return null},"JSV.common.MeasurementData,~N,~N,~N");c(b,"setMeasurement",function(a){var b=this.getSpectrumIndex(a.spec),c=this.getDialog(JSV.common.Annotation.AType.Measurements,b);null==c&&this.addDialog(b,JSV.common.Annotation.AType.Measurements,c=new JSV.common.MeasurementData(JSV.common.Annotation.AType.Measurements,a.spec));c.getData().addLast(a.copyM());this.updateDialog(JSV.common.Annotation.AType.Measurements,
-1)},"JSV.common.Measurement");c(b,"checkArrowUpDownClick",function(a,b){var c=!1,f=this.isArrowClick(a,b,3)?JSV.common.GraphSet.RT2:this.isArrowClick(a,b,4)?1/JSV.common.GraphSet.RT2:0;if(0!=f){1<this.nSplit&&this.setSpectrumSelected(this.iSpectrumMovedTo);if((1==this.nSpectra||0<=this.iSpectrumSelected)&&this.spectra.get(this.getFixedSelectedSpectrumIndex()).isTransmittance())f=1/f;this.viewData.scaleSpectrum(null==this.imageView?this.iSpectrumSelected:-2,f);c=!0}else this.isArrowClick(a,b,-1)&&
(this.resetViewCompletely(),c=!0);c&&(null!=this.imageView&&(this.update2dImage(!1),this.resetPinsFromView()),this.pd.setTaintedAll());return c},"~N,~N");c(b,"resetViewCompletely",function(){this.clearViews();this.showAllStacked&&!this.stackSelected&&this.closeDialogsExcept(JSV.common.Annotation.AType.NONE);this.viewData.resetScaleFactors();this.updateDialogs()});c(b,"checkArrowLeftRightClick",function(a,b){if(this.haveLeftRightArrows){var c=this.isArrowClick(a,b,1)?-1:this.isArrowClick(a,b,2)?1:
0;if(0!=c)return this.setSpectrumClicked((this.iSpectrumSelected+c)%this.nSpectra),!0;if(this.isArrowClick(a,b,0)){if(this.showAllStacked)return this.showAllStacked=!1,this.setSpectrumClicked(this.getFixedSelectedSpectrumIndex()),!0;this.showAllStacked=this.allowStacking;this.setSpectrumSelected(-1);this.stackSelected=!1}}return!1},"~N,~N");c(b,"isArrowClick",function(a,b,c){switch(c){case 3:case 4:case -1:return c=w((this.yPixel00+this.yPixel11)/2)+15*(3==c?-1:4==c?1:0),10>Math.abs(this.xVArrows-
a)&&10>Math.abs(c-b);case 1:case 2:case 0:return c=this.xHArrows+15*(1==c?-1:2==c?1:0),10>Math.abs(c-a)&&10>Math.abs(this.yHArrows-b)}return!1},"~N,~N,~N");c(b,"setWidgetValueByUser",function(a){var b;b=a===this.cur2Dy?""+this.imageView.toSubspectrumIndex(a.yPixel0):a===this.pin1Dx01?""+Math.min(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal())+" - "+Math.max(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal()):a===this.pin1Dy01?""+Math.min(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal())+" - "+Math.max(this.pin1Dy0.getYVal(),
this.pin1Dy1.getYVal()):a===this.pin2Dx01?""+Math.min(this.pin2Dx0.getXVal(),this.pin2Dx1.getXVal())+" - "+Math.max(this.pin2Dx0.getXVal(),this.pin2Dx1.getXVal()):a===this.pin2Dy01?""+w(Math.min(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal()))+" - "+w(Math.max(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal())):""+a.getValue();b=this.pd.getInput("New value?","Set Slider",b);if(null!=b){b=b.trim();try{if(a===this.pin1Dx01||a===this.pin1Dy01||a===this.pin2Dx01||a===this.pin2Dy01){var c=b.indexOf("-",1);
if(!(0>c)){var f=Double.$valueOf(b.substring(0,c)).doubleValue(),e=Double.$valueOf(b.substring(c+1)).doubleValue();a===this.pin1Dx01?this.doZoom(f,this.pin1Dy0.getYVal(),e,this.pin1Dy1.getYVal(),!0,!1,!1,!0,!0):a===this.pin1Dy01?this.doZoom(this.pin1Dx0.getXVal(),f,this.pin1Dx1.getXVal(),e,null==this.imageView,null==this.imageView,!1,!1,!0):a===this.pin2Dx01?(this.imageView.setView0(this.imageView.toPixelX0(f),this.pin2Dy0.yPixel0,this.imageView.toPixelX0(e),this.pin2Dy1.yPixel0),this.doZoom(f,this.pin1Dy0.getYVal(),
e,this.pin1Dy1.getYVal(),!1,!1,!1,!0,!0)):a===this.pin2Dy01&&(this.imageView.setView0(this.pin2Dx0.xPixel0,this.imageView.toPixelY0(f),this.pin2Dx1.xPixel0,this.imageView.toPixelY0(e)),this.doZoom(this.imageView.toX(this.imageView.xPixel0),this.getScale().minY,this.imageView.toX(this.imageView.xPixel0+this.imageView.xPixels-1),this.getScale().maxY,!1,!1,!1,!1,!0))}}else{var g=Double.$valueOf(b).doubleValue();a.isXtype?(e=a===this.pin1Dx0||a===this.cur2Dx0||a===this.pin2Dx0?this.pin1Dx1.getXVal():
this.pin1Dx0.getXVal(),this.doZoom(g,0,e,0,!a.is2D,!1,!1,!0,!0)):a===this.cur2Dy?this.setCurrentSubSpectrum(w(g)):a===this.pin2Dy0||a===this.pin2Dy1?(e=a===this.pin2Dy0?this.pin2Dy1.yPixel0:this.pin2Dy0.yPixel0,this.imageView.setView0(this.pin2Dx0.xPixel0,this.imageView.subIndexToPixelY(w(g)),this.pin2Dx1.xPixel0,e)):(e=a===this.pin1Dy0?this.pin1Dy1.getYVal():this.pin1Dy0.getYVal(),this.doZoom(this.pin1Dx0.getXVal(),g,this.pin1Dx1.getXVal(),e,null==this.imageView,null==this.imageView,!1,!1,!0))}}catch(j){if(!E(j,
Exception))throw j;}}},"JSV.common.PlotWidget");c(b,"removeAllHighlights",function(a){if(null==a)this.highlights.clear();else for(var b=this.highlights.size();0<=--b;)this.highlights.get(b).spectrum===a&&this.highlights.removeItemAt(b)},"JSV.common.Spectrum");c(b,"setCoordClicked",function(a,b,c){0==c&&(this.nextClickForSetPeak=null);if(Double.isNaN(b))return this.pd.coordClicked=null,this.pd.coordsClicked=null;this.pd.coordClicked=(new JSV.common.Coordinate).set(this.lastClickX=b,c);this.pd.coordsClicked=
this.getSpectrum().getXYCoords();this.pd.xPixelClicked=this.lastPixelX=a;return this.pd.coordClicked},"~N,~N,~N");c(b,"setWidgets",function(a,b,c){if(a||null==this.pin1Dx0)null==this.zoomBox1D?this.newPins():this.resetPinPositions();this.setDerivedPins(b);this.setPinSliderPositions(c)},"~B,~N,~B");c(b,"newPins",function(){this.zoomBox1D=new JSV.common.PlotWidget("zoomBox1D");this.pin1Dx0=new JSV.common.PlotWidget("pin1Dx0");this.pin1Dx1=new JSV.common.PlotWidget("pin1Dx1");this.pin1Dy0=new JSV.common.PlotWidget("pin1Dy0");
this.pin1Dy1=new JSV.common.PlotWidget("pin1Dy1");this.pin1Dx01=new JSV.common.PlotWidget("pin1Dx01");this.pin1Dy01=new JSV.common.PlotWidget("pin1Dy01");this.cur1D2x1=new JSV.common.PlotWidget("cur1D2x1");this.cur1D2x1.color=JSV.common.ScriptToken.PEAKTABCOLOR;this.cur1D2x2=new JSV.common.PlotWidget("cur1D2x2");this.cur1D2x2.color=JSV.common.ScriptToken.PEAKTABCOLOR;if(null!=this.imageView){this.zoomBox2D=new JSV.common.PlotWidget("zoomBox2D");this.pin2Dx0=new JSV.common.PlotWidget("pin2Dx0");this.pin2Dx1=
new JSV.common.PlotWidget("pin2Dx1");this.pin2Dy0=new JSV.common.PlotWidget("pin2Dy0");this.pin2Dy1=new JSV.common.PlotWidget("pin2Dy1");this.pin2Dx01=new JSV.common.PlotWidget("pin2Dx01");this.pin2Dy01=new JSV.common.PlotWidget("pin2Dy01");this.cur2Dx0=new JSV.common.PlotWidget("cur2Dx0");this.cur2Dx1=new JSV.common.PlotWidget("cur2Dx1");this.cur2Dy=new JSV.common.PlotWidget("cur2Dy");this.pin2Dy0.setY(0,this.imageView.toPixelY0(0));var a=this.getSpectrumAt(0).getSubSpectra().size();this.pin2Dy1.setY(a,
this.imageView.toPixelY0(a))}this.setWidgetX(this.pin1Dx0,this.getScale().minX);this.setWidgetX(this.pin1Dx1,this.getScale().maxX);this.setWidgetY(this.pin1Dy0,this.getScale().minY);this.setWidgetY(this.pin1Dy1,this.getScale().maxY);this.widgets=z(-1,[this.zoomBox1D,this.zoomBox2D,this.pin1Dx0,this.pin1Dx01,this.pin1Dx1,this.pin1Dy0,this.pin1Dy01,this.pin1Dy1,this.pin2Dx0,this.pin2Dx01,this.pin2Dx1,this.pin2Dy0,this.pin2Dy01,this.pin2Dy1,this.cur2Dx0,this.cur2Dx1,this.cur2Dy,this.cur1D2x1,this.cur1D2x2])});
c(b,"setWidgetX",function(a,b){a.setX(b,this.toPixelX0(b))},"JSV.common.PlotWidget,~N");c(b,"setWidgetY",function(a,b){a.setY(b,this.toPixelY0(b))},"JSV.common.PlotWidget,~N");c(b,"resetPinsFromView",function(){null!=this.pin1Dx0&&(this.setWidgetX(this.pin1Dx0,this.getScale().minXOnScale),this.setWidgetX(this.pin1Dx1,this.getScale().maxXOnScale),this.setWidgetY(this.pin1Dy0,this.getScale().minYOnScale),this.setWidgetY(this.pin1Dy1,this.getScale().maxYOnScale))});c(b,"resetPinPositions",function(){this.resetX(this.pin1Dx0);
this.resetY(this.pin1Dy0);this.resetY(this.pin1Dy1);null==this.imageView?(null!=this.gs2dLinkedX&&this.resetX(this.cur1D2x1),null!=this.gs2dLinkedY&&this.resetX(this.cur1D2x2)):(this.pin2Dy0.setY(this.pin2Dy0.getYVal(),this.imageView.toPixelY0(this.pin2Dy0.getYVal())),this.pin2Dy1.setY(this.pin2Dy1.getYVal(),this.imageView.toPixelY0(this.pin2Dy1.getYVal())))});c(b,"resetX",function(a){this.setWidgetX(a,a.getXVal())},"JSV.common.PlotWidget");c(b,"resetY",function(a){this.setWidgetY(a,a.getYVal())},
"JSV.common.PlotWidget");c(b,"setPinSliderPositions",function(a){this.pin1Dx0.yPixel0=this.pin1Dx1.yPixel0=this.pin1Dx01.yPixel0=this.yPixel0-5;this.pin1Dx0.yPixel1=this.pin1Dx1.yPixel1=this.pin1Dx01.yPixel1=this.yPixel0;this.cur1D2x1.yPixel1=this.cur1D2x2.yPixel1=this.yPixel0-5;this.cur1D2x1.yPixel0=this.cur1D2x2.yPixel0=this.yPixel1+6;null==this.imageView?(this.pin1Dy0.xPixel0=this.pin1Dy1.xPixel0=this.pin1Dy01.xPixel0=this.xPixel1+5,this.pin1Dy0.xPixel1=this.pin1Dy1.xPixel1=this.pin1Dy01.xPixel1=
this.xPixel1):(this.pin1Dy0.xPixel0=this.pin1Dy1.xPixel0=this.pin1Dy01.xPixel0=this.imageView.xPixel1+15,this.pin1Dy0.xPixel1=this.pin1Dy1.xPixel1=this.pin1Dy01.xPixel1=this.imageView.xPixel1+10,this.pin2Dx0.yPixel0=this.pin2Dx1.yPixel0=this.pin2Dx01.yPixel0=this.yPixel0-5,this.pin2Dx0.yPixel1=this.pin2Dx1.yPixel1=this.pin2Dx01.yPixel1=this.yPixel0,this.pin2Dy0.xPixel0=this.pin2Dy1.xPixel0=this.pin2Dy01.xPixel0=this.imageView.xPixel1+5,this.pin2Dy0.xPixel1=this.pin2Dy1.xPixel1=this.pin2Dy01.xPixel1=
this.imageView.xPixel1,this.cur2Dx0.yPixel0=this.cur2Dx1.yPixel0=this.yPixel1+6,this.cur2Dx0.yPixel1=this.cur2Dx1.yPixel1=this.yPixel0-5,this.cur2Dx0.yPixel0=this.cur2Dx1.yPixel0=this.yPixel1+6,this.cur2Dx1.yPixel1=this.cur2Dx1.yPixel1=this.yPixel0-5,this.cur2Dy.xPixel0=a?w((this.xPixel1+this.imageView.xPixel0)/2):this.imageView.xPixel0-6,this.cur2Dy.xPixel1=this.imageView.xPixel1+5)},"~B");c(b,"setDerivedPins",function(a){null!=this.gs2dLinkedX&&this.cur1D2x1.setX(this.cur1D2x1.getXVal(),this.toPixelX(this.cur1D2x1.getXVal()));
null!=this.gs2dLinkedY&&this.cur1D2x2.setX(this.cur1D2x2.getXVal(),this.toPixelX(this.cur1D2x2.getXVal()));this.pin1Dx01.setX(0,w((this.pin1Dx0.xPixel0+this.pin1Dx1.xPixel0)/2));this.pin1Dy01.setY(0,w((this.pin1Dy0.yPixel0+this.pin1Dy1.yPixel0)/2));this.pin1Dx01.setEnabled(Math.min(this.pin1Dx0.xPixel0,this.pin1Dx1.xPixel0)>this.xPixel0||Math.max(this.pin1Dx0.xPixel0,this.pin1Dx1.xPixel0)<this.xPixel1);this.pin1Dy01.setEnabled(Math.min(this.pin1Dy0.yPixel0,this.pin1Dy1.yPixel0)>Math.min(this.toPixelY(this.getScale().minY),
this.toPixelY(this.getScale().maxY))||Math.max(this.pin1Dy0.yPixel0,this.pin1Dy1.yPixel0)<Math.max(this.toPixelY(this.getScale().minY),this.toPixelY(this.getScale().maxY)));if(null!=this.imageView){var b=this.pin1Dx0.getXVal();this.cur2Dx0.setX(b,this.imageView.toPixelX(b));b=this.pin1Dx1.getXVal();this.cur2Dx1.setX(b,this.imageView.toPixelX(b));b=this.imageView.toX(this.imageView.xPixel0);this.pin2Dx0.setX(b,this.imageView.toPixelX0(b));b=this.imageView.toX(this.imageView.xPixel1);this.pin2Dx1.setX(b,
this.imageView.toPixelX0(b));this.pin2Dx01.setX(0,w((this.pin2Dx0.xPixel0+this.pin2Dx1.xPixel0)/2));b=this.imageView.imageHeight-1-this.imageView.yView1;this.pin2Dy0.setY(b,this.imageView.toPixelY0(b));b=this.imageView.imageHeight-1-this.imageView.yView2;this.pin2Dy1.setY(b,this.imageView.toPixelY0(b));this.pin2Dy01.setY(0,w((this.pin2Dy0.yPixel0+this.pin2Dy1.yPixel0)/2));this.cur2Dy.yPixel0=this.cur2Dy.yPixel1=this.imageView.subIndexToPixelY(a);this.pin2Dx01.setEnabled(Math.min(this.pin2Dx0.xPixel0,
this.pin2Dx1.xPixel0)!=this.imageView.xPixel0||Math.max(this.pin2Dx0.xPixel0,this.pin2Dx1.xPixel1)!=this.imageView.xPixel1);this.pin2Dy01.setEnabled(Math.min(this.pin2Dy0.yPixel0,this.pin2Dy1.yPixel0)!=this.yPixel0||Math.max(this.pin2Dy0.yPixel0,this.pin2Dy1.yPixel1)!=this.yPixel1)}},"~N");c(b,"doZoom",function(a,b,c,f,e,g,j,k,l){a==c?(a=this.getScale().minXOnScale,c=this.getScale().maxXOnScale):this.isLinked&&k&&this.pd.doZoomLinked(this,a,c,l,j,e);a>c&&(k=a,a=c,c=k);b>f&&(k=b,b=f,f=k);k=!e&&null!=
this.imageView&&(this.imageView.minZ!=b||this.imageView.maxZ!=f);if(this.zoomEnabled||k){if(j){if(!this.getScale().isInRangeX(a)&&!this.getScale().isInRangeX(c))return;this.getScale().isInRangeX(a)?this.getScale().isInRangeX(c)||(c=this.getScale().maxX):a=this.getScale().minX}this.pd.setTaintedAll();j=this.viewData.getScaleData();var m=D(this.nSpectra,0),n=D(this.nSpectra,0);this.graphsTemp.clear();var q=this.getSpectrumAt(0).getSubSpectra(),q=null==q||2==q.size();if(this.getSpectrumAt(0).is1D()&&
!q){if(this.graphsTemp.addLast(this.getSpectrum()),!JSV.common.ScaleData.setDataPointIndices(this.graphsTemp,a,c,3,m,n))return}else if(!JSV.common.ScaleData.setDataPointIndices(this.spectra,a,c,3,m,n))return;if(q=b==f)e=!k&&e?e=this.getScale().spectrumScaleFactor:1,1E-4>Math.abs(e-1)&&(b=this.getScale().minYOnScale,f=this.getScale().maxYOnScale);e=null;if(q||g)this.getCurrentView(),e=this.viewData.getNewScales(this.iSpectrumSelected,q,b,f);this.getView(a,c,b,f,m,n,j,e);this.setXPixelMovedTo(1E10,
1.7976931348623157E308,0,0);this.setWidgetX(this.pin1Dx0,a);this.setWidgetX(this.pin1Dx1,c);this.setWidgetY(this.pin1Dy0,b);this.setWidgetY(this.pin1Dy1,f);null==this.imageView?this.updateDialogs():(a=this.getSpectrumAt(0).getSubIndex(),c=this.imageView.fixSubIndex(a),c!=a&&this.setCurrentSubSpectrum(c),k&&this.update2dImage(!1));l&&this.addCurrentZoom()}},"~N,~N,~N,~N,~B,~B,~B,~B,~B");c(b,"updateDialogs",function(){this.updateDialog(JSV.common.Annotation.AType.PeakList,-1);this.updateDialog(JSV.common.Annotation.AType.Measurements,
-1)});c(b,"setCurrentSubSpectrum",function(a){var b=this.getSpectrumAt(0);a=b.setCurrentSubSpectrum(a);b.isForcedSubset()&&this.viewData.setXRangeForSubSpectrum(this.getSpectrum().getXYCoords());this.pd.notifySubSpectrumChange(a,this.getSpectrum())},"~N");c(b,"addCurrentZoom",function(){if(this.viewList.size()>this.currentZoomIndex+1)for(var a=this.viewList.size()-1;a>this.currentZoomIndex;a--)this.viewList.removeItemAt(a);this.viewList.addLast(this.viewData);this.currentZoomIndex++});c(b,"setZoomTo",
function(a){this.currentZoomIndex=a;this.viewData=this.viewList.get(a);this.resetPinsFromView()},"~N");c(b,"clearViews",function(){this.isLinked&&this.pd.clearLinkViews(this);this.setZoom(0,0,0,0);for(var a=this.viewList.size();1<=--a;)this.viewList.removeItemAt(a)});c(b,"drawAll",function(a,b,c,f,e,g,j){this.setPositionForFrame(f);this.g2d=this.pd.g2d;this.gMain=a;var k=this.getSpectrumAt(0),l=k.getSubIndex();this.is2DSpectrum=!k.is1D()&&(this.isLinked||this.pd.getBoolean(JSV.common.ScriptToken.DISPLAY2D))&&
(null!=this.imageView||this.get2DImage(k));null!=this.imageView&&g&&(this.isPrintingOrSaving&&this.g2d.newGrayScaleImage(a,this.image2D,this.imageView.imageWidth,this.imageView.imageHeight,this.imageView.getBuffer()),this.is2DSpectrum&&this.setPositionForFrame(f),this.draw2DImage());var m=this.stackSelected||!this.showAllStacked?this.iSpectrumSelected:-1,n=!this.showAllStacked||1==this.nSpectra||0<=m,k=null==this.imageView||this.pd.display1D,q=0<=m?1:0,r=this.getFixedSelectedSpectrumIndex();if(k&&
g&&(this.fillBox(a,this.xPixel0,this.yPixel0,this.xPixel1,this.yPixel1,JSV.common.ScriptToken.PLOTAREACOLOR),0>m)){n=!0;for(m=0;m<this.nSpectra;m++)this.doPlot(m,f)&&0!=q++&&(n=(new Boolean(n&this.viewData.areYScalesSame(m-1,m))).valueOf())}var s=1==this.nSpectra?0:!this.showAllStacked?this.iSpectrumMovedTo:this.iSpectrumSelected;c=c===a?b:c;if(g){var m=this.pd.getCurrentGraphSet()===this&&!this.isLinked&&(!this.isSplittable||1==this.nSplit||this.pd.currentSplitPoint==f),u=this.zoomEnabled&&!this.isPrintingOrSaving&&
!this.isDrawNoSpectra()&&this.pd.isCurrentGraphSet(this)&&this.spectra.get(0).isScalable()&&(m||1==this.nSpectra)&&(1==this.nSplit||this.pd.currentSplitPoint==this.iSpectrumMovedTo);this.drawFrame(a,s,m,this.isSplittable,u)}if(this.pd.isCurrentGraphSet(this)&&f==this.pd.currentSplitPoint&&(2>q||0<=this.iSpectrumSelected))this.$haveSelectedSpectrum=!0;this.haveSingleYScale=this.showAllStacked&&1<this.nSpectra?this.allowStackedYScale&&n:!0;if(k){n=F(this.yPixels*(this.yStackOffsetPercent/100));this.haveLeftRightArrows=
!1;for(q=m=0;m<this.nSpectra;m++)if(this.doPlot(m,f)){var s=this.spectra.get(m),u=s.isContinuous(),w=!this.pd.isPrinting&&0<=this.iSpectrumMovedTo&&(1<this.nSplit?m==this.iSpectrumMovedTo:this.isLinked||m==r),x=this.stackSelected&&0<=this.iSpectrumSelected&&this.iSpectrumSelected!=m,z=!this.reversePlot&&this.getShowAnnotation(JSV.common.Annotation.AType.Integration,m)&&(!this.showAllStacked||this.iSpectrumSelected==m)?this.getDialog(JSV.common.Annotation.AType.Integration,m).getData():null;this.setScale(m);
1<this.nSplit&&(r=m);var A=!x&&(1==this.nSplit||this.showAllStacked||this.iSpectrumSelected==f),C=A&&this.$haveSelectedSpectrum&&m==r;A&&(this.widgetsAreSet=!0,this.resetPinsFromView(),this.drawWidgets(b,c,l,e,k,C,!1));this.haveSingleYScale&&(m==r&&g)&&(this.drawGrid(a),this.pd.isPrinting&&(1==this.nSplit&&1==this.pd.graphSets.size())&&this.drawSpectrumSource(a,m));A&&this.drawWidgets(b,c,l,!1,k,C,!0);!this.isDrawNoSpectra()&&(!this.isPrintingOrSaving&&(1==this.nSpectra||0<=this.iSpectrumSelected)&&
(this.haveSingleYScale&&m==r||this.showAllStacked&&this.stackSelected&&m==this.iSpectrumSelected))&&this.drawHighlightsAndPeakTabs(b,c,m);g&&((w||this.isPrintingOrSaving)&&!this.is2DSpectrum&&this.pd.titleOn&&!this.pd.titleDrawn&&this.drawTitle(m,a),this.haveSingleYScale&&m==r&&this.pd.getBoolean(JSV.common.ScriptToken.YSCALEON)&&this.drawYScale(a,this),this.haveSingleYScale&&30>this.yPixel00&&this.pd.getBoolean(JSV.common.ScriptToken.YUNITSON)&&this.drawYUnits(a));A=!x&&null!=this.pendingIntegral&&
s===this.pendingIntegral.spec;if(g||A)this.drawPlot(A&&!g?b:a,m,s,u,q,x,null,w,A,j);this.drawIntegration(b,m,q,x,z,u&&w);this.drawMeasurements(b,m);null!=this.pendingMeasurement&&this.pendingMeasurement.spec===s&&this.drawMeasurement(b,this.pendingMeasurement);u&&(w&&0<=this.xPixelMovedTo)&&this.drawSpectrumPointer(b,s,q,z);1<this.nSpectra&&(1==this.nSplit&&this.pd.isCurrentGraphSet(this)&&g)&&(this.haveLeftRightArrows=!0,this.isPrintingOrSaving||(this.setScale(0),s=this.iSpectrumSelected,2!=this.nSpectra&&
(this.setPlotColor(a,(s+this.nSpectra-1)%this.nSpectra),this.fillArrow(a,1,this.yHArrows,this.xHArrows-9,!0),this.setCurrentBoxColor(a),this.fillArrow(a,1,this.yHArrows,this.xHArrows-9,!1)),0<=s&&(this.setPlotColor(a,s),this.fillCircle(a,this.xHArrows,this.yHArrows,!0)),this.setCurrentBoxColor(a),this.fillCircle(a,this.xHArrows,this.yHArrows,!1),this.setPlotColor(a,(s+1)%this.nSpectra),this.fillArrow(a,2,this.yHArrows,this.xHArrows+9,!0),this.setCurrentBoxColor(a),this.fillArrow(a,2,this.yHArrows,
this.xHArrows+9,!1)));q-=n}g&&(this.pd.getBoolean(JSV.common.ScriptToken.XSCALEON)&&this.drawXScale(a,this),this.pd.getBoolean(JSV.common.ScriptToken.XUNITSON)&&this.drawXUnits(a))}else g&&(this.pd.getBoolean(JSV.common.ScriptToken.XSCALEON)&&this.drawXScale(a,this.imageView),this.pd.getBoolean(JSV.common.ScriptToken.YSCALEON)&&this.drawYScale(a,this.imageView),0<=l&&this.draw2DUnits(a)),this.drawWidgets(b,c,l,e,k,!0,!1),this.drawWidgets(b,c,l,e,k,!0,!0),this.widgetsAreSet=!0;null!=this.annotations&&
this.drawAnnotations(b,this.annotations,null);this.isPrintingOrSaving=!1},"~O,~O,~O,~N,~B,~B,~B");c(b,"drawTitle",function(a,b){var c=this.getSpectrumAt(a).getPeakTitle();0<c.length&&(this.pd.drawTitle(b,this.isPrintingOrSaving?this.yPixel11+20:this.height,this.width,c),this.pd.titleDrawn=!this.isPrintingOrSaving)},"~N,~O");c(b,"drawSpectrumSource",function(a,b){this.pd.printFilePath(a,this.pd.thisWidth-this.pd.right,this.yPixel0-20,this.spectra.get(b).getFilePath())},"~O,~N");c(b,"doPlot",function(a,
b){var c=this.stackSelected&&0<=this.iSpectrumSelected&&this.iSpectrumSelected!=a,f=this.showAllStacked||-1==this.iSpectrumSelected||this.iSpectrumSelected==a;return 1<this.nSplit?a==b:f&&(!this.pd.isPrinting||!c)},"~N,~N");c(b,"drawSpectrumPointer",function(a,b,c,f){if(!this.isPrintingOrSaving){this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);var e=this.pd.integralShiftMode;null!=f&&((!this.pd.ctrlPressed||this.pd.isIntegralDrag)&&!this.isOnSpectrum(this.pd.mouseX,this.pd.mouseY,-1)?
f=null:0==e&&(e=this.getShiftMode(this.pd.mouseX,this.pd.mouseY),0==e&&(e=2147483647)));var g=this.yValueMovedTo;this.yValueMovedTo=null==f?b.getYValueAt(this.xValueMovedTo):f.getPercentYValueAt(this.xValueMovedTo);this.setCoordStr(this.xValueMovedTo,this.yValueMovedTo);if(0!=e&&(this.setPlotColor(a,2147483647==e?-1:0),(0>e||2147483647==e)&&this.drawHandle(a,this.xPixelPlot1,this.yPixelPlot0,3,!1),0<e&&this.drawHandle(a,this.xPixelPlot0,this.yPixelPlot1,3,!1),2147483647!=e))return;null!=f&&this.g2d.setStrokeBold(a,
!0);Double.isNaN(g)||null!=this.pendingMeasurement?(this.g2d.drawLine(a,this.xPixelMovedTo,this.yPixel0,this.xPixelMovedTo,this.yPixel1),0<=this.xPixelMovedTo2&&this.g2d.drawLine(a,this.xPixelMovedTo2,this.yPixel0,this.xPixelMovedTo2,this.yPixel1),this.yValueMovedTo=NaN):(b=null==f?c+this.toPixelY(this.yValueMovedTo):this.toPixelYint(this.yValueMovedTo/100),b==this.fixY(b)&&this.g2d.drawLine(a,this.xPixelMovedTo,b-10,this.xPixelMovedTo,b+10));null!=f&&this.g2d.setStrokeBold(a,!1)}},"~O,JSV.common.Spectrum,~N,JSV.common.IntegralData");
c(b,"setScale",function(a){this.viewData.setScale(a,this.xPixels,this.yPixels,this.spectra.get(a).isInverted())},"~N");c(b,"draw2DUnits",function(a){var b=this.getSpectrumAt(0).nucleusX,c=this.getSpectrumAt(0).nucleusY;this.setColorFromToken(a,JSV.common.ScriptToken.PLOTCOLOR);this.drawUnits(a,b,this.imageView.xPixel1+5*this.pd.scalingFactor,this.yPixel1,1,1);this.drawUnits(a,c,this.imageView.xPixel0-5*this.pd.scalingFactor,this.yPixel0,1,0)},"~O");c(b,"drawPeakTabs",function(a,b,c){if(!this.isPrintingOrSaving){var f=
1==this.nSpectra||0<=this.iSpectrumSelected?c.getPeakList():null;if(null!=f&&0<f.size()){null!=this.piMouseOver&&this.piMouseOver.spectrum===c&&this.pd.isMouseUp()?(this.setColorFromToken(b,JSV.common.ScriptToken.PEAKOVERCOLOR),this.drawPeak(b,this.piMouseOver,0),c.setHighlightedPeak(this.piMouseOver)):c.setHighlightedPeak(null);this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);for(b=f.size();0<=--b;){var e=f.get(b);this.drawPeak(a,e,e===c.getSelectedPeak()?14:7)}}}},"~O,~O,JSV.common.Spectrum");
c(b,"drawPeak",function(a,b,c){if(!this.isPrintingOrSaving){var f=b.getXMin(),e=b.getXMax();f!=e&&this.drawBar(a,b,f,e,null,c)}},"~O,JSV.common.PeakInfo,~N");c(b,"drawWidgets",function(a,b,c,f,e,g,j){this.setWidgets(f,c,e);if(!this.isPrintingOrSaving||!(null==this.imageView?!this.cur1D2Locked:this.sticky2Dcursor)){!this.pd.isPrinting&&!j&&(e?(this.fillBox(a,this.xPixel0,this.pin1Dx0.yPixel1,this.xPixel1,this.pin1Dx1.yPixel1+2,JSV.common.ScriptToken.GRIDCOLOR),this.fillBox(a,this.pin1Dx0.xPixel0,this.pin1Dx0.yPixel1,
this.pin1Dx1.xPixel0,this.pin1Dx1.yPixel1+2,JSV.common.ScriptToken.PLOTCOLOR)):(this.fillBox(a,this.imageView.xPixel0,this.pin2Dx0.yPixel1,this.imageView.xPixel1,this.pin2Dx0.yPixel1+2,JSV.common.ScriptToken.GRIDCOLOR),this.fillBox(a,this.pin2Dx0.xPixel0,this.pin2Dx0.yPixel1,this.pin2Dx1.xPixel0,this.pin2Dx1.yPixel1+2,JSV.common.ScriptToken.PLOTCOLOR),this.fillBox(a,this.pin2Dy0.xPixel1,this.yPixel1,this.pin2Dy1.xPixel1+2,this.yPixel0,JSV.common.ScriptToken.GRIDCOLOR),this.fillBox(a,this.pin2Dy0.xPixel1,
this.pin2Dy0.yPixel1,this.pin2Dy1.xPixel1+2,this.pin2Dy1.yPixel0,JSV.common.ScriptToken.PLOTCOLOR)),this.fillBox(a,this.pin1Dy0.xPixel1,this.yPixel1,this.pin1Dy1.xPixel1+2,this.yPixel0,JSV.common.ScriptToken.GRIDCOLOR),g&&this.fillBox(a,this.pin1Dy0.xPixel1,this.pin1Dy0.yPixel1,this.pin1Dy1.xPixel1+2,this.pin1Dy1.yPixel0,JSV.common.ScriptToken.PLOTCOLOR));for(c=0;c<this.widgets.length;c++)if(f=this.widgets[c],!(null==f||!f.isPinOrCursor&&!this.zoomEnabled)){var k=f===this.cur1D2x1||f===this.cur1D2x2||
f===this.cur2Dx0||f===this.cur2Dx1||f===this.cur2Dy;if((f.isPin||!f.isPinOrCursor)!=j){if(f.is2D){if(f===this.cur2Dx0&&!e)continue}else{var l=f===this.pin1Dy0||f===this.pin1Dy1||f===this.pin1Dy01;if(null!=this.imageView&&e==l||l&&!g||f===this.cur1D2x1&&null==this.gs2dLinkedX||f===this.cur1D2x2&&null==this.gs2dLinkedY||f===this.zoomBox1D&&(this.pd.isIntegralDrag||0!=this.pd.integralShiftMode))if(!this.isLinked||null!=this.imageView)continue}if(!this.pd.isPrinting||k)f.isPinOrCursor?(this.setColorFromToken(a,
f.color),this.g2d.drawLine(a,f.xPixel0,f.yPixel0,f.xPixel1,f.yPixel1),f.isVisible=!0,f.isPin&&this.drawHandle(a,f.xPixel0,f.yPixel0,2,!f.isEnabled)):f.xPixel1!=f.xPixel0&&this.fillBox(b,f.xPixel0,f.yPixel0,f.xPixel1,f.yPixel1,f===this.zoomBox1D&&this.pd.shiftPressed?JSV.common.ScriptToken.ZOOMBOXCOLOR2:JSV.common.ScriptToken.ZOOMBOXCOLOR)}}}},"~O,~O,~N,~B,~B,~B,~B");c(b,"drawBar",function(a,b,c,f,e,g){c=this.toPixelX(c);f=this.toPixelX(f);if(c>f){var j=c;c=f;f=j}c=this.fixX(c);f=this.fixX(f);3>f-
c&&(c-=2,f+=2);null!=b&&b.setPixelRange(c,f);0==g?this.fillBox(a,c,this.yPixel0,f,this.yPixel0+this.yPixels,e):(this.fillBox(a,c,this.yPixel0+2,f,this.yPixel0+5,e),null!=b&&(c=w((c+f)/2),this.fillBox(a,c-1,this.yPixel0+2,c+1,this.yPixel0+2+g,e)))},"~O,JSV.common.PeakInfo,~N,~N,JSV.common.ScriptToken,~N");c(b,"drawIntegration",function(a,b,c,f,e){null!=e&&(this.haveIntegralDisplayed(b)&&this.drawPlot(a,b,this.spectra.get(b),!0,c,!1,e,!0,!1,!1),this.drawIntegralValues(a,b,c));b=this.getIntegrationRatios(b);
null!=b&&this.drawAnnotations(a,b,JSV.common.ScriptToken.INTEGRALPLOTCOLOR)},"~O,~N,~N,~B,JSV.common.IntegralData,~B");c(b,"getMeasurements",function(a,b){var c=this.getDialog(a,b);return null==c||0==c.getData().size()||!c.getState()?null:c.getData()},"JSV.common.Annotation.AType,~N");c(b,"drawPlot",function(a,b,c,f,e,g,j,k,l,m){var n=null==j?c.getXYCoords():this.getIntegrationGraph(b).getXYCoords(),q=null!=j;j=q?j.getBitSet():null;k=l||null!=c.fillColor&&k;g=g?-2:q?-1:!this.allowStacking?0:b;this.setPlotColor(a,
g);var r=!0,s=this.toPixelY(0);q?k=(new Boolean(k&s==this.fixY(s))).valueOf():s=this.fixY(s);var u=q||k?this.pd.getColor(JSV.common.ScriptToken.INTEGRALPLOTCOLOR):null;c=null==u||null==c.fillColor?u:c.fillColor;u=this.viewData.getStartingPointIndex(b);b=this.viewData.getEndingPointIndex(b);if(f&&!m){b--;(m=(q||null!=this.pendingIntegral)&&this.g2d.canDoLineTo())&&this.g2d.doStroke(a,!0);var w=!1;for(f=u;f<=b;f++){var x=n[f],z=n[f+1],A=q?this.toPixelYint(x.getYVal()):this.toPixelY(x.getYVal());if(-2147483648!=
A){var C=q?this.toPixelYint(z.getYVal()):this.toPixelY(z.getYVal());if(-2147483648!=C){var x=x.getXVal(),E=z.getXVal(),z=this.toPixelX(x),D=this.toPixelX(E),A=this.fixY(e+A),C=this.fixY(e+C);q&&(f==u&&(this.xPixelPlot1=z,this.yPixelPlot0=A),this.xPixelPlot0=D,this.yPixelPlot1=C);if(!(D==z&&A==C))if(k&&l&&this.pendingIntegral.overlaps(x,E))null!=c&&(this.g2d.doStroke(a,!1),this.g2d.setGraphicsColor(a,c)),this.g2d.fillRect(a,Math.min(z,D),Math.min(s,A),Math.max(1,Math.abs(D-z)),Math.abs(s-A)),null!=
c&&(this.g2d.doStroke(a,!1),this.g2d.doStroke(a,!0),w=!1,this.setPlotColor(a,g));else if(!(A==C&&A==this.yPixel0)&&(null!=j&&j.get(f)!=r&&(r=j.get(f),m&&w&&(this.g2d.doStroke(a,!1),this.g2d.doStroke(a,!0),w=!1),!this.pd.isPrinting&&0!=this.pd.integralShiftMode?this.setPlotColor(a,0):r?this.setColorFromToken(a,JSV.common.ScriptToken.INTEGRALPLOTCOLOR):this.setPlotColor(a,-3)),!this.pd.isPrinting||r))w?this.g2d.lineTo(a,D,C):(this.g2d.drawLine(a,z,A,D,C),w=m)}}}m&&this.g2d.doStroke(a,!1)}else{for(f=
u;f<=b;f++)l=n[f],C=this.toPixelY(l.getYVal()),-2147483648!=C&&(z=this.toPixelX(l.getXVal()),A=this.toPixelY(Math.max(this.getScale().minYOnScale,0)),A=this.fixY(e+A),C=this.fixY(e+C),A==C&&(A==this.yPixel0||A==this.yPixel1)||(m?this.g2d.fillRect(a,z-1,C-1,3,3):this.g2d.drawLine(a,z,A,z,C)));!m&&this.getScale().isYZeroOnScale()&&(e+=this.toPixelY(this.getScale().spectrumYRef),e==this.fixY(e)&&this.g2d.drawLine(a,this.xPixel1,e,this.xPixel0,e))}},"~O,~N,JSV.common.Spectrum,~B,~N,~B,JSV.common.IntegralData,~B,~B,~B");
c(b,"drawFrame",function(a,b,c,f,e){if(!this.pd.gridOn||this.isPrintingOrSaving)if(this.setColorFromToken(a,JSV.common.ScriptToken.GRIDCOLOR),this.g2d.drawRect(a,this.xPixel0,this.yPixel0,this.xPixels,this.yPixels),this.isPrintingOrSaving)return;this.setCurrentBoxColor(a);e&&(0<=b&&(this.setPlotColor(a,b),this.fillArrow(a,3,this.xVArrows,w((this.yPixel00+this.yPixel11)/2)-9,!0),this.fillArrow(a,4,this.xVArrows,w((this.yPixel00+this.yPixel11)/2)+9,!0),this.setCurrentBoxColor(a)),this.fillArrow(a,3,
this.xVArrows,w((this.yPixel00+this.yPixel11)/2)-9,!1),this.fillCircle(a,this.xVArrows,w((this.yPixel00+this.yPixel11)/2),!1),this.fillArrow(a,4,this.xVArrows,w((this.yPixel00+this.yPixel11)/2)+9,!1));if(null==this.imageView&&c){b=this.xPixel00+10;c=this.xPixel11-10;e=this.yPixel00+1;var g=this.yPixel11-2;this.g2d.drawLine(a,b,e,c,e);this.g2d.drawLine(a,c,e,c,g);this.g2d.drawLine(a,b,g,c,g);this.splitterX=this.closerX=-2147483648;this.drawBox(a,c-10,e,c,e+10,null);this.g2d.drawLine(a,c-10,e+10,c,
e);this.g2d.drawLine(a,c,e+10,c-10,e);this.closerX=c-10;this.closerY=e;f&&(c-=10,this.fillBox(a,c-10,e,c,e+10,null),this.splitterX=c-10,this.splitterY=e)}},"~O,~N,~B,~B,~B");c(b,"drawGrid",function(a){if(this.pd.gridOn&&null==this.imageView){this.setColorFromToken(a,JSV.common.ScriptToken.GRIDCOLOR);var b;if(Double.isNaN(this.getScale().firstX)){b=this.getScale().maxXOnScale+this.getScale().steps[0]/2;for(var c=this.getScale().minXOnScale;c<b;c+=this.getScale().steps[0]){var f=this.toPixelX(c);this.g2d.drawLine(a,
f,this.yPixel0,f,this.yPixel1)}}else{b=1.0001*this.getScale().maxXOnScale;for(c=this.getScale().firstX;c<=b;c+=this.getScale().steps[0])f=this.toPixelX(c),this.g2d.drawLine(a,f,this.yPixel0,f,this.yPixel1)}for(c=this.getScale().firstY;c<this.getScale().maxYOnScale+this.getScale().steps[1]/2;c+=this.getScale().steps[1])b=this.toPixelY(c),b==this.fixY(b)&&this.g2d.drawLine(a,this.xPixel0,b,this.xPixel1,b)}},"~O");c(b,"drawXScale",function(a,b){this.setColorFromToken(a,JSV.common.ScriptToken.SCALECOLOR);
this.pd.isPrinting&&this.g2d.drawLine(a,b.getXPixel0(),this.yPixel1,b.getXPixel0()+b.getXPixels()-1,this.yPixel1);for(var c=this.getScale().precision[0],f=this.pd.setFont(a,b.getXPixels(),0,this.pd.isPrinting?10:12,!1),e=this.yPixel1,g=this.yPixel1+4*this.pd.scalingFactor,j=this.yPixel1+2*this.pd.scalingFactor,f=f.getHeight(),k=b.toPixelX(this.getScale().steps[0])-b.toPixelX(0),l=Math.abs(0.95*k),m=this.getScale().firstX-this.getScale().steps[0],n=1.0001*(this.getScale().maxXOnScale+this.getScale().steps[0]),
q=0;2>q;q++){1==q&&JSV.common.ScaleData.fixScale(this.mapX);for(var r=1E10,s=m;s<=n;s+=this.getScale().steps[0]){var k=b.toPixelX(s),u=Double.$valueOf(s),x;switch(q){case 0:x=JU.DF.formatDecimalDbl(s,c);this.mapX.put(u,x);this.drawTick(a,k,e,g,b);k=Math.abs(r-s);r=this.getScale().minorTickCounts[0];if(0!=r){k/=r;for(x=1;x<r;x++)this.drawTick(a,b.toPixelX(s-x*k),e,j,b)}r=s;continue;case 1:x=this.mapX.get(u);if(null==x||k!=b.fixX(k))continue;var u=this.pd.getStringWidth(x),z=k+w(u/2)==b.fixX(k+w(u/
2))?2:0;0<z&&this.g2d.drawString(a,x,k-w(u/z),g+f);s+=Math.floor(u/l)*this.getScale().steps[0]}}}this.mapX.clear()},"~O,JSV.common.XYScaleConverter");c(b,"drawTick",function(a,b,c,f,e){b==e.fixX(b)&&this.g2d.drawLine(a,b,c,b,f)},"~O,~N,~N,~N,JSV.common.XYScaleConverter");c(b,"drawYScale",function(a,b){var c=b.getScale(),f=c.precision[1],e=this.pd.setFont(a,b.getXPixels(),0,this.pd.isPrinting?10:12,!1).getHeight(),g=c.maxYOnScale+c.steps[1]/2,j=-2147483648;this.setColorFromToken(a,JSV.common.ScriptToken.SCALECOLOR);
for(var k=0;2>k;k++){1==k&&JSV.common.ScaleData.fixScale(this.mapX);for(var l=c.firstY;l<g;l+=c.steps[1]){var m=Double.$valueOf(l),n=b.getXPixel0(),q=b.toPixelY(l);if(q==b.fixY(q)){var r;0==k&&this.g2d.drawLine(a,n,q,n-3*this.pd.scalingFactor,q);if(!(Math.abs(q-j)<=e))switch(j=q,k){case 0:r=JU.DF.formatDecimalDbl(l,f);this.mapX.put(m,r);break;case 1:r=this.mapX.get(m);if(null==r)continue;r.startsWith("0")&&r.contains("E")&&(r="0");this.g2d.drawString(a,r,n-4*this.pd.scalingFactor-this.pd.getStringWidth(r),
q+w(e/3))}}}}this.mapX.clear()},"~O,JSV.common.XYScaleConverter");c(b,"drawXUnits",function(a){var b=this.spectra.get(0).getAxisLabel(!0);null!=b&&this.drawUnits(a,b,this.xPixel1+25*this.pd.scalingFactor,this.yPixel1+5*this.pd.scalingFactor,1,1)},"~O");c(b,"drawUnits",function(a,b,c,f,e,g){this.setColorFromToken(a,JSV.common.ScriptToken.UNITSCOLOR);this.pd.setFont(a,(null==this.imageView?this:this.imageView).getXPixels(),3,10,!1);this.g2d.drawString(a,b,w(c-this.pd.getStringWidth(b)*e),w(f+this.pd.getFontHeight()*
g))},"~O,~S,~N,~N,~N,~N");c(b,"drawYUnits",function(a){var b=this.spectra.get(0).getAxisLabel(!1);""===b&&(b="ARBITRARY UNITS");null!=b&&!this.pd.unitsDrawn&&this.drawUnits(a,b,(this.pd.isPrinting?30:5)*this.pd.scalingFactor,this.yPixel0+(this.pd.isPrinting?0:5)*this.pd.scalingFactor,0,-1);this.pd.unitsDrawn=!0},"~O");c(b,"drawHighlightsAndPeakTabs",function(a,b,c){var f=this.getMeasurements(JSV.common.Annotation.AType.PeakList,c),e=this.spectra.get(c);if(this.isPrintingOrSaving)null!=f&&(this.setColorFromToken(a,
JSV.common.ScriptToken.PEAKTABCOLOR),this.printPeakList(a,e,f));else{if(null==f){for(var g=0;g<this.highlights.size();g++){var j=this.highlights.get(g);j.spectrum===e&&(this.pd.setHighlightColor(j.color),this.drawBar(b,null,j.x1,j.x2,JSV.common.ScriptToken.HIGHLIGHTCOLOR,0))}this.pd.peakTabsOn&&this.drawPeakTabs(a,b,e)}if(null!=f){b=e.isInverted()?this.yPixel1-10*this.pd.scalingFactor:this.yPixel0;this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);for(g=f.size();0<=--g;)e=f.get(g),e=this.toPixelX(e.getXVal()),
this.g2d.drawLine(a,e,b,e,b+10*this.pd.scalingFactor);this.isVisible(this.getDialog(JSV.common.Annotation.AType.PeakList,c))&&(b=this.toPixelY(f.getThresh()),b==this.fixY(b)&&!this.pd.isPrinting&&this.g2d.drawLine(a,this.xPixel0,b,this.xPixel1,b))}}},"~O,~O,~N");c(b,"printPeakList",function(a,b,c){var f=c.getMeasurementListArray(null);if(0!=f.length){this.pd.setFont(a,this.xPixels,0,8,!1);for(var e=this.pd.getFontHeight(),g=D(c.size(),0),j=D(c.size(),0),k=0,l=5*this.pd.scalingFactor,m=10*this.pd.scalingFactor,
n=15*this.pd.scalingFactor,q=25*this.pd.scalingFactor,r=0;r<f.length;r++)j[r]=this.toPixelX(Double.parseDouble(f[r][1])),0==r?g[r]=j[r]:(g[r]=Math.max(g[r-1]+e,j[r]+e),k+=g[r]-j[r]);k/=2*f.length;g[0]-k<this.xPixel0+q&&(k=g[0]-(this.xPixel0+q));for(r=0;r<f.length;r++)g[r]-=k;r=b.isInverted();b=this.pd.getStringWidth("99.9999");for(var k=6<=f[0].length?this.pd.getStringWidth("99.99"):0,q=r?-1:1,s=(r?this.yPixel1:this.yPixel0)+q*(k+b+n),r=0;r<f.length;r++)this.g2d.drawLine(a,g[r],s,g[r],s+l*q),this.g2d.drawLine(a,
g[r],s+l*q,j[r],s+m*q),this.g2d.drawLine(a,j[r],s+m*q,j[r],s+n*q),0<k&&0<f[r][4].length&&this.g2d.drawLine(a,w((g[r]+g[r-1])/2),s-b+l,w((g[r]+g[r-1])/2),s-b-l);s-=2*q*this.pd.scalingFactor;0<k&&(this.drawStringRotated(a,-90,g[0]-n,s,"  ppm"),this.drawStringRotated(a,-90,g[0]-n,s-b-l," Hz"));for(r=c.size();0<=--r;)this.drawStringRotated(a,-90*q,g[r]+w(q*e/3),s,f[r][1]),0<k&&0<f[r][4].length&&(c=w((g[r]+g[r-1])/2)+w(e/3),this.drawStringRotated(a,-90,c,s-b-l,f[r][4]))}},"~O,JSV.common.Spectrum,JSV.common.PeakData");
c(b,"drawStringRotated",function(a,b,c,f,e){this.g2d.drawStringRotated(a,e,c,f,b)},"~O,~N,~N,~N,~S");c(b,"drawAnnotations",function(a,b,c){this.pd.setFont(a,this.xPixels,1,18,!1);for(var f=b.size();0<=--f;){var e=b.get(f);this.setAnnotationColor(a,e,c);var g=(e.is2D?this.imageView:this).toPixelX(e.getXVal()),j=e.isPixels()?w(this.yPixel0+10+10*this.pd.scalingFactor-e.getYVal()):e.is2D?this.imageView.subIndexToPixelY(w(e.getYVal())):this.toPixelY(e.getYVal());this.g2d.drawString(a,e.text,g+e.offsetX*
this.pd.scalingFactor,j-e.offsetY*this.pd.scalingFactor)}},"~O,JU.Lst,JSV.common.ScriptToken");c(b,"drawIntegralValues",function(a,b,c){var f=this.getMeasurements(JSV.common.Annotation.AType.Integration,b);if(null!=f){this.pd.isPrinting?this.pd.setFont(a,this.xPixels,0,8,!1):this.pd.setFont(a,this.xPixels,1,12,!1);this.setColorFromToken(a,JSV.common.ScriptToken.INTEGRALPLOTCOLOR);var e=this.pd.getFontHeight();this.g2d.setStrokeBold(a,!0);for(var g=f.size();0<=--g;){var j=f.get(g);if(0!=j.getValue()){var k=
this.toPixelX(j.getXVal2()),l=c*this.pd.scalingFactor+this.toPixelYint(j.getYVal()),m=c*this.pd.scalingFactor+this.toPixelYint(j.getYVal2());k!=this.fixX(k)||(l!=this.fixY(l)||m!=this.fixY(m))||(this.pd.isPrinting||this.g2d.drawLine(a,k,l,k,m),this.g2d.drawString(a,"  "+j.text,k,w((l+m)/2)+w(e/3)))}}this.g2d.setStrokeBold(a,!1)}b==this.getFixedSelectedSpectrumIndex()&&(this.selectedSpectrumIntegrals=f)},"~O,~N,~N");c(b,"drawMeasurements",function(a,b){var c=this.getMeasurements(JSV.common.Annotation.AType.Measurements,
b);if(null!=c)for(var f=c.size();0<=--f;)this.drawMeasurement(a,c.get(f));b==this.getFixedSelectedSpectrumIndex()&&(this.selectedSpectrumMeasurements=c)},"~O,~N");c(b,"drawMeasurement",function(a,b){if(!(0==b.text.length&&b!==this.pendingMeasurement)){this.pd.setFont(a,this.xPixels,1,12,!1);this.g2d.setGraphicsColor(a,b===this.pendingMeasurement?this.pd.getColor(JSV.common.ScriptToken.PEAKTABCOLOR):this.pd.BLACK);var c=this.toPixelX(b.getXVal()),f=this.toPixelY(b.getYVal()),e=this.toPixelX(b.getXVal2());
if(!Double.isNaN(b.getXVal())&&!(c!=this.fixX(c)||e!=this.fixX(e))){var g=2<=Math.abs(c-e),j=this.getScale().isYZeroOnScale()&&b.spec.isHNMR(),k=w((c+e)/2);this.g2d.setStrokeBold(a,!0);g&&this.g2d.drawLine(a,c,f,e,f);j&&this.g2d.drawLine(a,c+1,this.yPixel1-1,e,this.yPixel1-1);this.g2d.setStrokeBold(a,!1);g&&this.g2d.drawString(a,b.text,k+b.offsetX,f-b.offsetY);j&&(this.g2d.drawLine(a,c,this.yPixel1,c,this.yPixel1-6*this.pd.scalingFactor),this.g2d.drawLine(a,e,this.yPixel1,e,this.yPixel1-6*this.pd.scalingFactor))}}},
"~O,JSV.common.Measurement");c(b,"getPinSelected",function(a,b){if(null!=this.widgets)for(var c=0;c<this.widgets.length;c++)if(null!=this.widgets[c]&&this.widgets[c].isPinOrCursor&&this.widgets[c].selected(a,b))return this.widgets[c];return null},"~N,~N");c(b,"set2DCrossHairs",function(a,b){var c;if(a==this.imageView.fixX(a)&&b==this.fixY(b)&&(this.pin1Dx1.setX(c=this.imageView.toX(a),this.toPixelX(c)),this.cur2Dx1.setX(c,a),this.setCurrentSubSpectrum(this.imageView.toSubspectrumIndex(b)),this.isLinked)){var f=
this.imageView.toY(b);this.pd.set2DCrossHairsLinked(this,c,f,!this.sticky2Dcursor)}},"~N,~N");c(b,"reset2D",function(a){a?(this.imageView.setView0(this.imageView.xPixel0,this.pin2Dy0.yPixel0,this.imageView.xPixel1,this.pin2Dy1.yPixel0),this.doZoom(0,this.getScale().minY,0,this.getScale().maxY,!0,!1,!1,!1,!0)):this.imageView.setView0(this.pin2Dx0.xPixel0,this.imageView.yPixel0,this.pin2Dx1.xPixel0,this.imageView.yPixel1)},"~B");c(b,"setAnnotationText",function(a){var b=this.pd.getInput("New text?",
"Set Label",a.text);if(null==b)return!1;0==b.length?this.annotations.removeObj(a):a.text=b;return!0},"JSV.common.Annotation");c(b,"checkIntegral",function(a,b,c){var f=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==f)return!1;a=f.getData().addIntegralRegion(a,b);c&&JSV.common.GraphSet.isDialog(f)&&f.update(null,0,0);if(Double.isNaN(b))return!1;this.pendingIntegral=c?null:a;this.pd.isIntegralDrag=!c;this.selectedSpectrumIntegrals=null;return!0},"~N,~N,~B");c(b,"setToolTipForPixels",
function(a,b){if(this.iSpectrumMovedTo!=this.iSpectrumClicked||this.pd.getCurrentGraphSet()!==this)this.pd.setToolTipText("click spectrum to activate");else if(this.isSplitWidget(a,b))this.pd.setToolTipText("click to "+(1<this.nSplit?"combine":"split"));else if(this.isCloserWidget(a,b))this.pd.setToolTipText("click to close");else{var c=this.getPinSelected(a,b),f=this.getScale().precision[0],e=this.getScale().precision[1];if(null!=c)this.setStartupPinTip()||(c===this.pin1Dx01||c===this.pin2Dx01?f=
JU.DF.formatDecimalDbl(Math.min(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal()),f)+" - "+JU.DF.formatDecimalDbl(Math.max(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal()),f):c===this.pin1Dy01?f=JU.DF.formatDecimalDbl(Math.min(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal()),e)+" - "+JU.DF.formatDecimalDbl(Math.max(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal()),e):c===this.cur2Dy?(c=this.imageView.toSubspectrumIndex(c.yPixel0),f=this.get2DYLabel(c,f)):f=c===this.pin2Dy01?""+w(Math.min(this.pin2Dy0.getYVal(),
this.pin2Dy1.getYVal()))+" - "+w(Math.max(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal())):c.isXtype?JU.DF.formatDecimalDbl(c.getXVal(),f):c.is2D?""+w(c.getYVal()):JU.DF.formatDecimalDbl(c.getYVal(),e),this.pd.setToolTipText(f));else{if(null!=this.imageView){if(this.imageView.fixX(a)==a&&this.fixY(b)==b){c=this.imageView.toSubspectrumIndex(b);f="y="+this.get2DYLabel(c,f)+" / x="+JU.DF.formatDecimalDbl(this.imageView.toX(a),f)+" "+this.getSpectrum().getAxisLabel(!0);this.pd.setToolTipText(f);this.pd.coordStr=
f;return}if(!this.pd.display1D){this.pd.setToolTipText("");this.pd.coordStr="";return}}var c=this.toX(this.fixX(a)),f=null!=this.imageView&&this.imageView.isXWithinRange(a)?this.imageView.toSubspectrumIndex(this.fixY(b)):this.toY(this.fixY(b)),e=this.setCoordStr(c,f),g=this.getFixedSelectedSpectrumIndex();this.isInPlotRegion(a,b)?1!=this.nSpectra&&this.haveIntegralDisplayed(g)&&(f=this.getIntegrationGraph(g).getPercentYValueAt(c),e+=", "+JU.DF.formatDecimalDbl(f,1)):f=NaN;this.pd.setToolTipText(null!=
this.selectedIntegral?"click to set value":null!=this.pendingMeasurement||null!=this.selectedMeasurement?this.pd.hasFocus()?"Press ESC to delete "+(null!=this.selectedIntegral?"integral, DEL to delete all visible, or N to normalize":null==this.pendingMeasurement?'"'+this.selectedMeasurement.text+'" or DEL to delete all visible':"measurement"):"":Double.isNaN(f)?null:e)}}},"~N,~N");c(b,"isFrameBox",function(a,b,c,f){return 5>Math.abs(a-(c+5))&&5>Math.abs(b-(f+5))},"~N,~N,~N,~N");c(b,"setCoordStr",
function(a,b){var c=JU.DF.formatDecimalDbl(a,this.getScale().precision[0]);this.pd.coordStr="("+c+(this.haveSingleYScale||0<=this.iSpectrumSelected?", "+JU.DF.formatDecimalDbl(b,this.getScale().precision[1]):"")+")";return c},"~N,~N");c(b,"setStartupPinTip",function(){if(null==this.pd.startupPinTip)return!1;this.pd.setToolTipText(this.pd.startupPinTip);this.pd.startupPinTip=null;return!0});c(b,"get2DYLabel",function(a,b){var c=this.getSpectrumAt(0).getSubSpectra().get(a);return JU.DF.formatDecimalDbl(c.getY2DPPM(),
b)+" PPM"+(c.y2DUnits.equals("HZ")?" ("+JU.DF.formatDecimalDbl(c.getY2D(),b)+" HZ) ":"")},"~N,~N");c(b,"isOnSpectrum",function(a,b,c){var f=null,e=!0,g=0>c;if(g){f=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==f)return!1;f=f.getData().getXYCoords();c=this.getFixedSelectedSpectrumIndex()}else{this.setScale(c);var j=this.spectra.get(c),f=j.xyCoords,e=j.isContinuous()}var j=c*F(this.yPixels*(this.yStackOffsetPercent/100)),k=this.viewData.getStartingPointIndex(c);c=this.viewData.getEndingPointIndex(c);
if(e)for(e=k;e<c;e++){var l=f[e],m=f[e+1],k=this.toPixelX(l.getXVal()),n=this.toPixelX(m.getXVal()),l=g?this.toPixelYint(l.getYVal()):this.toPixelY(l.getYVal()),m=g?this.toPixelYint(m.getYVal()):this.toPixelY(m.getYVal());if(!(-2147483648==l||-2147483648==m))if(l=this.fixY(l)-j,m=this.fixY(m)-j,JSV.common.GraphSet.isOnLine(a,b,k,l,n,m))return!0}else for(e=k;e<=c;e++)if(g=f[e],m=this.toPixelY(g.getYVal()),-2147483648!=m&&(k=this.toPixelX(g.getXVal()),l=this.toPixelY(Math.max(this.getScale().minYOnScale,
0)),l=this.fixY(l),m=this.fixY(m),!(l==m&&(l==this.yPixel0||l==this.yPixel1))&&JSV.common.GraphSet.isOnLine(a,b,k,l,k,m)))return!0;return!1},"~N,~N,~N");b.distance=c(b,"distance",function(a,b){return Math.sqrt(a*a+b*b)},"~N,~N");b.findCompatibleGraphSet=c(b,"findCompatibleGraphSet",function(a,b){for(var c=0;c<a.size();c++)if(JSV.common.Spectrum.areXScalesCompatible(b,a.get(c).getSpectrum(),!1,!1))return a.get(c);return null},"JU.Lst,JSV.common.Spectrum");b.isGoodEvent=c(b,"isGoodEvent",function(a,
b,c){return null==b?5<Math.abs(a.xPixel1-a.xPixel0)&&5<Math.abs(a.yPixel1-a.yPixel0):c?5<Math.abs(a.xPixel0-b.xPixel0):5<Math.abs(a.yPixel0-b.yPixel0)},"JSV.common.PlotWidget,JSV.common.PlotWidget,~B");b.isOnLine=c(b,"isOnLine",function(a,b,c,f,e,g){var j=Math.abs(c-a);if(2>j&&2>Math.abs(f-b))return!0;var k=e-a;if(2>Math.abs(k)&&2>Math.abs(g-b))return!0;var l=f-g;if(2<Math.abs(l)&&f<b==g<b)return!1;var m=c-e;return 2<Math.abs(m)&&c<a==e<a?!1:JSV.common.GraphSet.distance(j,f-b)+JSV.common.GraphSet.distance(k,
b-g)<JSV.common.GraphSet.distance(m,l)+2},"~N,~N,~N,~N,~N,~N");b.setFractionalPositions=c(b,"setFractionalPositions",function(a,b,c){var f=b.size(),e=0,g=0;a.isLinked=c!==JSV.common.PanelData.LinkMode.NONE;if(c===JSV.common.PanelData.LinkMode.NONE){for(var j=0;j<f;j++)c=b.get(j),e+=(c.getSpectrumAt(0).is1D(),1)*c.nSplit;e=1/e;for(j=0;j<f;j++)c=b.get(j),c.isLinked=!1,a=c.getSpectrumAt(0).is1D()?e:1*e,c.fX0=0,c.fY0=g,c.fracX=1,c.fracY=a,g+=a*c.nSplit}else{var e=null,k=-1;if(2==f||3==f)for(j=0;j<f;j++)if(c=
b.get(j),!c.getSpectrum().is1D()){e=c;0<=k&&(j=-2);k=j;break}if(-2==k||-1==k&&2!=f)JSV.common.GraphSet.setFractionalPositions(a,b,JSV.common.PanelData.LinkMode.NONE);else for(j=0;j<f;j++)c=b.get(j),c.isLinked=!0,a=c.getSpectrumAt(0),a.is1D()?(null!=e&&(k=e.getSpectrumAt(0),JSV.common.Spectrum.areLinkableX(a,k)&&(c.gs2dLinkedX=e),JSV.common.Spectrum.areLinkableY(a,k)&&(c.gs2dLinkedY=e)),c.fX0=0,c.fY0=g,c.fracX=null==e?1:0.5,c.fracY=3==f||null==e?0.5:1,g+=0.5):(c.fX0=0.5,c.fY0=0,c.fracX=0.5,c.fracY=
1)}},"JSV.common.PanelData,JU.Lst,JSV.common.PanelData.LinkMode");c(b,"addAnnotation",function(a,b){if(0==a.size()||1==a.size()&&a.get(0).equalsIgnoreCase("none"))return this.lastAnnotation=this.annotations=null;4>a.size()&&null==this.lastAnnotation&&(this.lastAnnotation=this.getAnnotation((this.getScale().maxXOnScale+this.getScale().minXOnScale)/2,(this.getScale().maxYOnScale+this.getScale().minYOnScale)/2,b,!1,!1,0,0));var c=this.getAnnotation(a,this.lastAnnotation);if(null==c)return null;if(null==
this.annotations&&1==a.size()&&'"'==a.get(0).charAt(0))return c=c.text,this.getSpectrum().setTitle(c),c;this.lastAnnotation=c;this.addAnnotation(c,!1);return null},"JU.Lst,~S");c(b,"addHighlight",function(a,b,c,f){null==c&&(c=this.getSpectrumAt(0));a=T(JSV.common.GraphSet.Highlight,this,null,a,b,c,null==f?this.pd.getColor(JSV.common.ScriptToken.HIGHLIGHTCOLOR):f);this.highlights.contains(a)||this.highlights.addLast(a)},"~N,~N,JSV.common.Spectrum,javajs.api.GenericColor");c(b,"addPeakHighlight",function(a){for(var b=
this.spectra.size();0<=--b;){var c=this.spectra.get(b);this.removeAllHighlights(c);if(!(null==a||a.isClearAll()||c!==a.spectrum)){var f=a.toString();if(null!=f){var e=JU.PT.getQuotedAttribute(f,"xMin"),f=JU.PT.getQuotedAttribute(f,"xMax");if(null==e||null==f)break;e=JU.PT.parseFloat(e);f=JU.PT.parseFloat(f);if(Float.isNaN(e)||Float.isNaN(f))break;this.pd.addHighlight(this,e,f,c,200,140,140,100);c.setSelectedPeak(a);!this.getScale().isInRangeX(e)&&!(this.getScale().isInRangeX(f)||e<this.getScale().minX&&
this.getScale().maxX<f)&&this.setZoomTo(0)}}}},"JSV.common.PeakInfo");c(b,"advanceSubSpectrum",function(a){var b=this.getSpectrumAt(0);a=b.advanceSubSpectrum(a);b.isForcedSubset()&&this.viewData.setXRangeForSubSpectrum(this.getSpectrum().getXYCoords());this.pd.notifySubSpectrumChange(a,this.getSpectrum())},"~N");c(b,"checkSpectrumClickedEvent",function(a,b,c){if(null!=this.nextClickForSetPeak||(1<c||null!=this.pendingMeasurement||!this.isInPlotRegion(a,b))||0==c&&(c=this.isOnSpectrum(a,b,-1),this.pd.integralShiftMode=
c?this.getShiftMode(a,b):0,this.pd.isIntegralDrag=0==this.pd.integralShiftMode&&(c||this.haveIntegralDisplayed(-1)&&null!=this.findMeasurement(this.getIntegrationGraph(-1),a,b,0)),0!=this.pd.integralShiftMode)||!this.showAllStacked)return!1;this.stackSelected=!1;for(c=0;c<this.nSpectra;c++)if(this.isOnSpectrum(a,b,c))return this.setSpectrumClicked(this.iPreviousSpectrumClicked=c),!1;if(this.isDialogOpen())return!1;this.setSpectrumClicked(-1);return this.stackSelected=!1},"~N,~N,~N");c(b,"getShiftMode",
function(a,b){return this.isStartEndIntegral(a,!1)?b:this.isStartEndIntegral(a,!0)?-b:0},"~N,~N");c(b,"isDialogOpen",function(){return this.isVisible(this.getDialog(JSV.common.Annotation.AType.Integration,-1))||this.isVisible(this.getDialog(JSV.common.Annotation.AType.Measurements,-1))||this.isVisible(this.getDialog(JSV.common.Annotation.AType.PeakList,-1))});c(b,"isStartEndIntegral",function(a,b){return b?20>this.xPixelPlot1-a:20>a-this.xPixelPlot0},"~N,~B");c(b,"checkWidgetEvent",function(a,b,c){if(!this.widgetsAreSet)return!1;
this.widgetsAreSet=!1;if(c){if(2==this.pd.clickCount&&this.lastIntDragX!=a&&!this.is2dClick(a,b)){if(null==this.pendingMeasurement)return-1==this.iSpectrumClicked&&0<=this.iPreviousSpectrumClicked&&this.setSpectrumClicked(this.iPreviousSpectrumClicked),this.processPendingMeasurement(a,b,2),!0}else if(!this.is2dClick(a,b)&&(this.isOnSpectrum(a,b,-1)&&this.checkIntegral(this.toX(a),NaN,!1),this.lastIntDragX==a&&(this.pd.isIntegralDrag=!0,!this.checkIntegral(this.toX(a),this.toX(a),!1))))return!1;if(null!=
this.pendingMeasurement)return!0;c=this.getPinSelected(a,b);null==c&&(b=this.fixY(b),a<this.xPixel1?(this.pd.shiftPressed&&this.setSpectrumClicked(this.iPreviousSpectrumClicked),a=this.fixX(a),null==this.zoomBox1D&&this.newPins(),this.zoomBox1D.setX(this.toX(a),a),this.zoomBox1D.yPixel0=b,c=this.zoomBox1D):null!=this.imageView&&a<this.imageView.xPixel1&&(this.zoomBox2D.setX(this.imageView.toX(a),this.imageView.fixX(a)),this.zoomBox2D.yPixel0=b,c=this.zoomBox2D));this.pd.thisWidget=c;return!1}this.nextClickForSetPeak=
null;c=this.pd.thisWidget;if(null==c)return!1;if(c===this.zoomBox1D)return this.zoomBox1D.xPixel1=this.fixX(a),this.zoomBox1D.yPixel1=this.fixY(b),this.pd.isIntegralDrag&&this.zoomBox1D.xPixel0!=this.zoomBox1D.xPixel1&&(this.lastIntDragX<=a!=this.zoomBox1D.xPixel0<=a&&(this.zoomBox1D.xPixel0=this.lastIntDragX,this.zoomBox1D.xPixel1=a,this.zoomBox1D.setXVal(this.toX(this.zoomBox1D.xPixel0))),this.lastIntDragX=a,this.checkIntegral(this.zoomBox1D.getXVal(),this.toX(this.zoomBox1D.xPixel1),!1)),!1;if(!this.zoomEnabled)return!1;
if(c===this.zoomBox2D)return this.zoomBox2D.xPixel1=this.imageView.fixX(a),this.zoomBox2D.yPixel1=this.fixY(b),!0;if(c===this.cur2Dy)return b=this.fixY(b),this.cur2Dy.yPixel0=this.cur2Dy.yPixel1=b,this.setCurrentSubSpectrum(this.imageView.toSubspectrumIndex(b)),!0;if(c===this.cur2Dx0||c===this.cur2Dx1)return!1;if(c===this.pin1Dx0||c===this.pin1Dx1||c===this.pin1Dx01){a=this.fixX(a);c.setX(this.toX0(a),a);if(c===this.pin1Dx01){c=a-w((this.pin1Dx0.xPixel0+this.pin1Dx1.xPixel0)/2);a=this.pin1Dx0.xPixel0+
c;b=this.pin1Dx1.xPixel0+c;if(0==c||this.fixX(a)!=a||this.fixX(b)!=b)return!0;this.pin1Dx0.setX(this.toX0(a),a);this.pin1Dx1.setX(this.toX0(b),b)}this.doZoom(this.pin1Dx0.getXVal(),0,this.pin1Dx1.getXVal(),0,!0,!1,!1,!0,!1);return!0}if(c===this.pin1Dy0||c===this.pin1Dy1||c===this.pin1Dy01){b=this.fixY(b);c.setY(this.toY0(b),b);if(c===this.pin1Dy01){c=b-w((this.pin1Dy0.yPixel0+this.pin1Dy1.yPixel0)/2)+1;b=this.pin1Dy0.yPixel0+c;a=this.pin1Dy1.yPixel0+c;c=this.toY0(b);var f=this.toY0(a);if(Math.min(c,
f)==this.getScale().minY||Math.max(c,f)==this.getScale().maxY)return!0;this.pin1Dy0.setY(c,b);this.pin1Dy1.setY(f,a)}this.doZoom(0,this.pin1Dy0.getYVal(),0,this.pin1Dy1.getYVal(),null==this.imageView,null==this.imageView,!1,!1,!1);return!0}if(c===this.pin2Dx0||c===this.pin2Dx1||c===this.pin2Dx01){a=this.imageView.fixX(a);c.setX(this.imageView.toX0(a),a);if(c===this.pin2Dx01){c=a-w((this.pin2Dx0.xPixel0+this.pin2Dx1.xPixel0)/2)+1;a=this.pin2Dx0.xPixel0+c;b=this.pin2Dx1.xPixel0+c;if(this.imageView.fixX(a)!=
a||this.imageView.fixX(b)!=b)return!0;this.pin2Dx0.setX(this.imageView.toX0(a),a);this.pin2Dx1.setX(this.imageView.toX0(b),b)}if(!JSV.common.GraphSet.isGoodEvent(this.pin2Dx0,this.pin2Dx1,!0))return this.reset2D(!0),!0;this.imageView.setView0(this.pin2Dx0.xPixel0,this.pin2Dy0.yPixel0,this.pin2Dx1.xPixel0,this.pin2Dy1.yPixel0);this.doZoom(this.pin2Dx0.getXVal(),this.getScale().minY,this.pin2Dx1.getXVal(),this.getScale().maxY,!1,!1,!1,!0,!1);return!0}if(c===this.pin2Dy0||c===this.pin2Dy1||c===this.pin2Dy01){b=
this.fixY(b);c.setY(this.imageView.toSubspectrumIndex(b),b);if(c===this.pin2Dy01){c=b-w((this.pin2Dy0.yPixel0+this.pin2Dy1.yPixel0)/2)+1;b=this.pin2Dy0.yPixel0+c;a=this.pin2Dy1.yPixel0+c;if(b!=this.fixY(b)||a!=this.fixY(a))return!0;this.pin2Dy0.setY(this.imageView.toSubspectrumIndex(b),b);this.pin2Dy1.setY(this.imageView.toSubspectrumIndex(a),a)}if(!JSV.common.GraphSet.isGoodEvent(this.pin2Dy0,this.pin2Dy1,!1))return this.reset2D(!1),!0;this.imageView.setView0(this.pin2Dx0.xPixel0,this.pin2Dy0.yPixel0,
this.pin2Dx1.xPixel1,this.pin2Dy1.yPixel1);return!0}return!1},"~N,~N,~B");c(b,"clearIntegrals",function(){this.checkIntegral(NaN,0,!1)});c(b,"clearMeasurements",function(){this.removeDialog(this.getFixedSelectedSpectrumIndex(),JSV.common.Annotation.AType.Measurements)});b.createGraphSetsAndSetLinkMode=c(b,"createGraphSetsAndSetLinkMode",function(a,b,c,f,e,g){for(var j=new JU.Lst,k=0;k<c.size();k++){var l=c.get(k),m=g===JSV.common.PanelData.LinkMode.NONE?JSV.common.GraphSet.findCompatibleGraphSet(j,
l):null;null==m&&j.addLast(m=new JSV.common.GraphSet(b.getPanelData()));m.addSpec(l)}JSV.common.GraphSet.setFractionalPositions(a,j,g);for(k=j.size();0<=--k;)j.get(k).initGraphSet(f,e),JU.Logger.info("JSVGraphSet "+(k+1)+" nSpectra = "+j.get(k).nSpectra);return j},"JSV.common.PanelData,JSV.api.JSVPanel,JU.Lst,~N,~N,JSV.common.PanelData.LinkMode");c(b,"drawGraphSet",function(a,b,c,f,e,g,j,k,l,m,n,q){this.zoomEnabled=this.pd.getBoolean(JSV.common.ScriptToken.ENABLEZOOM);this.isPrintingOrSaving=this.pd.isPrinting||
this.pd.creatingImage;this.height=(e-(this.pd.isPrinting?20:0))*this.pd.scalingFactor;this.width=f*this.pd.scalingFactor;this.left=g*this.pd.scalingFactor;this.right=j*this.pd.scalingFactor;this.top=k*this.pd.scalingFactor;this.bottom=l*this.pd.scalingFactor;this.$haveSelectedSpectrum=!1;this.selectedSpectrumMeasurements=this.selectedSpectrumIntegrals=null;if(!this.isPrintingOrSaving&&null!=this.widgets)for(f=0;f<this.widgets.length;f++)null!=this.widgets[f]&&(this.widgets[f].isVisible=!1);for(f=
0;f<this.nSplit;f++)this.drawAll(a,b,c,f,m||1<this.nSplit,n,q);this.setPositionForFrame(1<this.nSplit?this.pd.currentSplitPoint:0)},"~O,~O,~O,~N,~N,~N,~N,~N,~N,~B,~B,~B");c(b,"escapeKeyPressed",function(a){null!=this.zoomBox1D&&(this.zoomBox1D.xPixel0=this.zoomBox1D.xPixel1=0);null!=this.zoomBox2D&&(this.zoomBox2D.xPixel0=this.zoomBox2D.xPixel1=0);this.inPlotMove&&(null!=this.pendingMeasurement?this.pendingMeasurement=null:(this.pendingMeasurement=this.pd.thisWidget=null,null!=this.selectedSpectrumMeasurements&&
null!=this.selectedMeasurement&&(a?this.selectedSpectrumMeasurements.clear(this.getScale().minXOnScale,this.getScale().maxXOnScale):this.selectedSpectrumMeasurements.removeObj(this.selectedMeasurement),this.selectedMeasurement=null,this.updateDialog(JSV.common.Annotation.AType.Measurements,-1)),null!=this.selectedSpectrumIntegrals&&null!=this.selectedIntegral&&(a?this.selectedSpectrumIntegrals.clear(this.getScale().minXOnScale,this.getScale().maxXOnScale):this.selectedSpectrumIntegrals.removeObj(this.selectedIntegral),
this.selectedIntegral=null,this.updateDialog(JSV.common.Annotation.AType.Integration,-1))))},"~B");b.findGraphSet=c(b,"findGraphSet",function(a,b,c){for(var f=a.size();0<=--f;)if(a.get(f).hasPoint(b,c))return a.get(f);return null},"JU.Lst,~N,~N");c(b,"findMatchingPeakInfo",function(a){for(var b=null,c=0;c<this.spectra.size()&&null==(b=this.spectra.get(c).findMatchingPeakInfo(a));c++);return b},"JSV.common.PeakInfo");c(b,"getCurrentSpectrumIndex",function(){return 1==this.nSpectra?0:this.iSpectrumSelected});
c(b,"getSelectedIntegral",function(){return this.selectedIntegral});c(b,"getShowAnnotation",function(a,b){var c=this.getDialog(a,b);return null!=c&&c.getState()},"JSV.common.Annotation.AType,~N");c(b,"hasFileLoaded",function(a){for(var b=this.spectra.size();0<=--b;)if(this.spectra.get(b).getFilePathForwardSlash().equals(a))return!0;return!1},"~S");c(b,"haveSelectedSpectrum",function(){return this.$haveSelectedSpectrum});c(b,"mouseClickedEvent",function(a,b,c,f){this.selectedIntegral=this.selectedMeasurement=
null;var e=this.nextClickForSetPeak;this.nextClickForSetPeak=null;if(!this.checkArrowUpDownClick(a,b)&&!this.checkArrowLeftRightClick(a,b))if(this.lastClickX=NaN,this.lastPixelX=2147483647,this.isSplitWidget(a,b))this.splitStack(1==this.nSplit);else if(this.isCloserWidget(a,b))this.pd.closeSpectrum();else{var g=this.getPinSelected(a,b);if(null!=g)this.setWidgetValueByUser(g);else if(g=this.is2dClick(a,b),2==c&&(-1==this.iSpectrumClicked&&0<=this.iPreviousSpectrumClicked)&&this.setSpectrumClicked(this.iPreviousSpectrumClicked),
!g&&f)this.setSpectrumClicked(this.iPreviousSpectrumClicked),null!=this.pendingMeasurement?this.processPendingMeasurement(a,b,-3):0<=this.iSpectrumClicked&&this.processPendingMeasurement(a,b,3);else if(this.lastXMax=NaN,2==c)g?(this.sticky2Dcursor&&this.addAnnotation(this.getAnnotation(this.imageView.toX(a),this.imageView.toSubspectrumIndex(b),this.pd.coordStr,!1,!0,5,5),!0),this.sticky2Dcursor=!0,this.set2DCrossHairs(a,b)):this.isInTopBar(a,b)?this.doZoom(this.toX0(this.xPixel0),0,this.toX0(this.xPixel1),
0,!0,!1,!1,!0,!0):this.isInRightBar(a,b)?this.doZoom(this.getScale().minXOnScale,this.viewList.get(0).getScale().minYOnScale,this.getScale().maxXOnScale,this.viewList.get(0).getScale().maxYOnScale,!0,!0,!1,!1,!1):this.isInTopBar2D(a,b)?this.reset2D(!0):this.isInRightBar2D(a,b)?this.reset2D(!1):null!=this.pendingMeasurement?this.processPendingMeasurement(a,b,-2):0<=this.iSpectrumClicked&&this.processPendingMeasurement(a,b,2);else if(g){if(null!=this.annotations&&(f=(new JSV.common.Coordinate).set(this.imageView.toX(a),
this.imageView.toSubspectrumIndex(b)),f=this.findAnnotation2D(f),null!=f&&this.setAnnotationText(f)))return;1==c&&(this.sticky2Dcursor=!1);this.set2DCrossHairs(a,b)}else{if(this.isInPlotRegion(a,b)){if(null!=this.selectedSpectrumIntegrals&&this.checkIntegralNormalizationClick(a,b))return;if(null!=this.pendingMeasurement){this.processPendingMeasurement(a,b,1);return}this.setCoordClicked(a,this.toX(a),this.toY(b));this.updateDialog(JSV.common.Annotation.AType.PeakList,-1);if(null!=e){this.nextClickForSetPeak=
e;this.shiftSpectrum(4,NaN,NaN);this.nextClickForSetPeak=null;return}}else this.setCoordClicked(0,NaN,0);this.pd.notifyPeakPickedListeners(null)}}},"~N,~N,~N,~B");c(b,"is2dClick",function(a,b){return null!=this.imageView&&a==this.imageView.fixX(a)&&b==this.fixY(b)},"~N,~N");c(b,"updateDialog",function(a,b){var c=this.getDialog(a,b);if(null!=c&&this.isVisible(c)){var f=this.toX(this.xPixel1)-this.toX(this.xPixel0),e=this.getSpectrum().isInverted()?this.yPixel1-this.pd.mouseY:this.pd.mouseY-this.yPixel0;
c.update(this.pd.coordClicked,f,e)}},"JSV.common.Annotation.AType,~N");c(b,"isVisible",function(a){return JSV.common.GraphSet.isDialog(a)&&a.isVisible()},"JSV.api.AnnotationData");c(b,"mousePressedEvent",function(a,b){this.checkWidgetEvent(a,b,!0)},"~N,~N,~N");c(b,"mouseReleasedEvent",function(a,b){if(null!=this.pendingMeasurement)2>Math.abs(this.toPixelX(this.pendingMeasurement.getXVal())-a)&&(this.pendingMeasurement=null),this.processPendingMeasurement(a,b,-2),this.setToolTipForPixels(a,b);else if(0!=
this.pd.integralShiftMode)this.pd.integralShiftMode=0,this.zoomBox1D.xPixel1=this.zoomBox1D.xPixel0;else{0<=this.iSpectrumMovedTo&&this.setScale(this.iSpectrumMovedTo);var c=this.pd.thisWidget;if(this.pd.isIntegralDrag)JSV.common.GraphSet.isGoodEvent(this.zoomBox1D,null,!0)&&this.checkIntegral(this.toX(this.zoomBox1D.xPixel0),this.toX(this.zoomBox1D.xPixel1),!0),this.zoomBox1D.xPixel1=this.zoomBox1D.xPixel0=0,this.pendingIntegral=null,this.pd.isIntegralDrag=!1;else if(c===this.zoomBox2D)JSV.common.GraphSet.isGoodEvent(this.zoomBox2D,
null,!0)&&(this.imageView.setZoom(this.zoomBox2D.xPixel0,this.zoomBox2D.yPixel0,this.zoomBox2D.xPixel1,this.zoomBox2D.yPixel1),this.zoomBox2D.xPixel1=this.zoomBox2D.xPixel0,this.doZoom(this.imageView.toX(this.imageView.xPixel0),this.getScale().minY,this.imageView.toX(this.imageView.xPixel0+this.imageView.xPixels-1),this.getScale().maxY,!1,!1,!1,!0,!0));else if(c===this.zoomBox1D){if(JSV.common.GraphSet.isGoodEvent(this.zoomBox1D,null,!0)){var c=this.zoomBox1D.xPixel1,f=this.pd.shiftPressed;this.doZoom(this.toX(this.zoomBox1D.xPixel0),
f?this.toY(this.zoomBox1D.yPixel0):0,this.toX(c),f?this.toY(this.zoomBox1D.yPixel1):0,!0,f,!0,!0,!0);this.zoomBox1D.xPixel1=this.zoomBox1D.xPixel0}}else(c===this.pin1Dx0||c===this.pin1Dx1||c===this.cur2Dx0||c===this.cur2Dx1)&&this.addCurrentZoom()}},"~N,~N");c(b,"mouseMovedEvent",function(a,b){if(2147483647==a)return this.iSpectrumMovedTo=-1,this.piMouseOver=null;if(1<this.nSpectra){var c=this.getSplitPoint(b);this.setPositionForFrame(c);this.setSpectrumMovedTo(1<this.nSplit?c:this.iSpectrumSelected);
0<=this.iSpectrumMovedTo&&this.setScale(this.iSpectrumMovedTo)}else this.iSpectrumMovedTo=this.iSpectrumSelected=0;this.inPlotMove=this.isInPlotRegion(a,b);this.setXPixelMovedTo(1.7976931348623157E308,1.7976931348623157E308,this.inPlotMove?a:-1,-1);this.inPlotMove&&(this.xValueMovedTo=this.toX(this.xPixelMovedTo),this.yValueMovedTo=this.getSpectrum().getYValueAt(this.xValueMovedTo));if(0!=this.pd.integralShiftMode){var c=this.getDialog(JSV.common.Annotation.AType.Integration,-1),f=c.getData().getXYCoords(),
f=f[0<this.pd.integralShiftMode?f.length-1:0].getYVal();c.getData().shiftY(this.pd.integralShiftMode,this.toPixelYint(f)+b-(0<this.pd.integralShiftMode?this.yPixelPlot1:this.yPixelPlot0),this.yPixel0,this.yPixels)}else this.pd.isIntegralDrag||(null!=this.pendingMeasurement?(this.processPendingMeasurement(a,b,0),this.setToolTipForPixels(a,b)):(this.selectedMeasurement=this.inPlotMove&&null!=this.selectedSpectrumMeasurements?this.findMeasurement(this.selectedSpectrumMeasurements,a,b,0):null,this.selectedIntegral=
null,this.inPlotMove&&(null!=this.selectedSpectrumIntegrals&&null==this.selectedMeasurement)&&(this.selectedIntegral=this.findMeasurement(this.selectedSpectrumIntegrals,a,b,0),null==this.selectedIntegral&&(this.selectedIntegral=this.findMeasurement(this.selectedSpectrumIntegrals,a,b,-5))),this.setToolTipForPixels(a,b),null==this.imageView?(this.piMouseOver=null,c=1<this.nSplit?this.iSpectrumMovedTo:this.iSpectrumClicked,!this.isDrawNoSpectra()&&0<=c&&(c=this.spectra.get(c),null!=c.getPeakList()&&
(this.coordTemp.setXVal(this.toX(a)),this.coordTemp.setYVal(this.toY(b)),this.piMouseOver=c.findPeakByCoord(a,this.coordTemp)))):!this.pd.display1D&&this.sticky2Dcursor&&this.set2DCrossHairs(a,b)));return this.piMouseOver},"~N,~N");c(b,"nextView",function(){this.currentZoomIndex+1<this.viewList.size()&&this.setZoomTo(this.currentZoomIndex+1)});c(b,"previousView",function(){0<this.currentZoomIndex&&this.setZoomTo(this.currentZoomIndex-1)});c(b,"resetView",function(){this.setZoomTo(0)});c(b,"removeAllHighlights",
function(){this.removeAllHighlights(null)});c(b,"removeHighlight",function(a){this.highlights.removeItemAt(a)},"~N");c(b,"removeHighlight",function(a,b){for(var c=this.highlights.size();0<=--c;){var f=this.highlights.get(c);f.x1==a&&f.x2==b&&this.highlights.removeItemAt(c)}},"~N,~N");c(b,"scaleYBy",function(a){if(null!=this.imageView||this.zoomEnabled)this.viewData.scaleSpectrum(null==this.imageView?this.iSpectrumSelected:-2,a),null!=this.imageView&&(this.update2dImage(!1),this.resetPinsFromView()),
this.pd.refresh()},"~N");c(b,"selectSpectrum",function(a,b,c){for(var f=!1,e=this.spectra.size();0<=--e;)if((null==a||this.getSpectrumAt(e).getFilePathForwardSlash().equals(a))&&this.getSpectrumAt(e).matchesPeakTypeModel(b,c))this.setSpectrumSelected(e),1<this.nSplit&&this.splitStack(!0),f=!0;1<this.nSpectra&&(!f&&0<=this.iSpectrumSelected&&!this.pd.isCurrentGraphSet(this))&&this.setSpectrumSelected(-2147483648);return f},"~S,~S,~S");c(b,"selectPeakByFileIndex",function(a,b,c){for(var f,e=this.spectra.size();0<=
--e;)if(null!=(f=this.getSpectrumAt(e).selectPeakByFileIndex(a,b,c)))return f;return null},"~S,~S,~S");c(b,"setSelected",function(a){0>a?(this.bsSelected.clearAll(),this.setSpectrumClicked(-1)):(this.bsSelected.set(a),this.setSpectrumClicked(1==this.bsSelected.cardinality()?a:-1),1<this.nSplit&&0<=a&&(this.pd.currentSplitPoint=a))},"~N");c(b,"setSelectedIntegral",function(a){var b=this.selectedIntegral.getSpectrum();this.getIntegrationGraph(this.getSpectrumIndex(b)).setSelectedIntegral(this.selectedIntegral,
a)},"~N");c(b,"setShowAnnotation",function(a,b){var c=this.getDialog(a,-1);if(null==c)null!=b&&b!==Boolean.TRUE||(a===JSV.common.Annotation.AType.PeakList||a===JSV.common.Annotation.AType.Integration||a===JSV.common.Annotation.AType.Measurements)&&this.pd.showDialog(a);else if(null==b)JSV.common.GraphSet.isDialog(c)?c.setVisible(!c.isVisible()):this.pd.showDialog(a);else{var f=b.booleanValue();f&&c.setState(f);(f||JSV.common.GraphSet.isDialog(c))&&this.pd.showDialog(a);!f&&JSV.common.GraphSet.isDialog(c)&&
c.setVisible(!1)}},"JSV.common.Annotation.AType,Boolean");c(b,"checkIntegralParams",function(a,b){if(!this.getSpectrum().canIntegrate()||this.reversePlot)return!1;var c=this.getFixedSelectedSpectrumIndex(),f=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==b)return!0;switch(JSV.common.IntegralData.IntMode.getMode(b.toUpperCase())){case JSV.common.IntegralData.IntMode.NA:return!1;case JSV.common.IntegralData.IntMode.CLEAR:this.integrate(c,null);this.integrate(c,a);break;case JSV.common.IntegralData.IntMode.ON:null==
f?this.integrate(c,a):f.setState(!0);break;case JSV.common.IntegralData.IntMode.OFF:null!=f&&f.setState(!1);break;case JSV.common.IntegralData.IntMode.TOGGLE:null==f?this.integrate(c,a):f.setState(!f.getState());break;case JSV.common.IntegralData.IntMode.AUTO:null==f&&(this.checkIntegralParams(a,"ON"),f=this.getDialog(JSV.common.Annotation.AType.Integration,-1));null!=f&&f.getData().autoIntegrate();break;case JSV.common.IntegralData.IntMode.LIST:this.pd.showDialog(JSV.common.Annotation.AType.Integration);
break;case JSV.common.IntegralData.IntMode.MARK:null==f&&(this.checkIntegralParams(a,"ON"),f=this.getDialog(JSV.common.Annotation.AType.Integration,-1));null!=f&&f.getData().addMarks(b.substring(4).trim());break;case JSV.common.IntegralData.IntMode.MIN:if(null!=f)try{var e=Double.parseDouble(JSV.common.ScriptToken.getTokens(b).get(1));f.getData().setMinimumIntegral(e)}catch(g){if(!E(g,Exception))throw g;}break;case JSV.common.IntegralData.IntMode.UPDATE:null!=f&&f.getData().update(a)}this.updateDialog(JSV.common.Annotation.AType.Integration,
-1);return!0},"JSV.common.Parameters,~S");c(b,"setSpectrum",function(a,b){b&&1<this.nSplit?1<this.nSplit&&this.setSpectrumClicked(a):(this.setSpectrumClicked(a),this.showAllStacked=this.stackSelected=!1);0<=a&&this.dialogsToFront(this.getSpectrum())},"~N,~B");c(b,"setSpectrumJDX",function(a){var b=this.getFixedSelectedSpectrumIndex();this.spectra.removeItemAt(b);this.spectra.add(b,a);this.pendingMeasurement=null;this.clearViews();this.viewData.newSpectrum(this.spectra)},"JSV.common.Spectrum");c(b,
"setZoom",function(a,b,c,f){this.setZoomTo(0);0==a&&0==c&&0==b&&0==f?(this.newPins(),this.imageView=null,this.getScale(),this.getScale()):this.doZoom(a,b,c,f,!0,b!=f,!1,!0,!0)},"~N,~N,~N,~N");c(b,"shiftSpectrum",function(a,b,c){var f=this.getSpectrum();if(!f.isNMR()||!f.is1D())return!1;var e=null,e=0;if(1.7976931348623157E308==c)e=-f.addSpecShift(0);else switch(a){case 3:e=c;break;case 1:case 2:this.nextClickMode=a;if(Double.isNaN(b))return e=this.pd.getInput("Click on "+(1==a?"or beside a peak to set its chemical shift":
"the spectrum set the chemical shift at that point")+(-2147483648==c?"":" to "+c)+".","Set Reference "+(1==a?"for Peak":"at Point"),"OK"),this.nextClickForSetPeak="OK".equals(e)?Double.$valueOf(c):null,!1;this.nextClickForSetPeak=null;case 4:null!=this.nextClickForSetPeak&&(c=this.nextClickForSetPeak.doubleValue(),this.nextClickForSetPeak=null);Double.isNaN(b)&&(b=this.lastClickX);1==this.nextClickMode&&(b=this.getNearestPeak(f,b,this.toY(this.pd.mouseY)));if(Double.isNaN(c))try{var g=this.pd.getInput("New chemical shift (set blank to reset)",
"Set Reference",JU.DF.formatDecimalDbl(b,this.getScale().precision[0])).trim();c=0==g.length?b-f.addSpecShift(0):Double.parseDouble(g)}catch(j){if(E(j,Exception))return!1;throw j;}e=c-b}if(0==e)return!1;f.addSpecShift(e);if(null!=this.annotations)for(a=this.annotations.size();0<=--a;)this.annotations.get(a).spec===f&&this.annotations.get(a).addSpecShift(e);if(null!=this.dialogs){var k;for(a=this.dialogs.entrySet().iterator();a.hasNext()&&((k=a.next())||1);)k.getValue().getSpectrum()===f&&k.getValue().setSpecShift(e)}this.getScale().addSpecShift(e);
Double.isNaN(this.lastClickX)||(this.lastClickX+=e);this.updateDialogs();this.doZoom(0,this.getScale().minYOnScale,0,this.getScale().maxYOnScale,!0,!0,!1,!0,!1);this.pd.setTaintedAll();this.pd.repaint();return!0},"~N,~N,~N");c(b,"toPeak",function(a){a*=this.drawXAxisLeftToRight?1:-1;Double.isNaN(this.lastClickX)&&(this.lastClickX=this.lastPixelX=0);var b=this.getSpectrum(),c=this.setCoordClicked(this.lastPixelX,this.lastClickX,0);a=b.setNextPeak(c,a);0>a||(a=b.getPeakList().get(a),b.setSelectedPeak(a),
this.setCoordClicked(a.getXPixel(),a.getX(),0),this.pd.notifyPeakPickedListeners(new JSV.common.PeakPickEvent(this.jsvp,this.pd.coordClicked,a)))},"~N");c(b,"scaleSelectedBy",function(a){for(var b=this.bsSelected.nextSetBit(0);0<=b;b=this.bsSelected.nextSetBit(b+1))this.viewData.scaleSpectrum(b,a)},"~N");f(b,"toString",function(){return"gs: "+this.nSpectra+" "+this.spectra+" "+this.spectra.get(0).getFilePath()});c(b,"setXPointer",function(a,b){null!=a&&this.setSpectrumClicked(this.getSpectrumIndex(a));
this.xValueMovedTo=this.lastClickX=b;this.lastPixelX=this.toPixelX(b);this.setXPixelMovedTo(b,1.7976931348623157E308,0,0);this.yValueMovedTo=NaN},"JSV.common.Spectrum,~N");c(b,"setXPointer2",function(a,b){null!=a&&this.setSpectrumClicked(this.getSpectrumIndex(a));this.setXPixelMovedTo(1.7976931348623157E308,b,0,0)},"JSV.common.Spectrum,~N");c(b,"hasCurrentMeasurement",function(a){return null!=(a===JSV.common.Annotation.AType.Integration?this.selectedSpectrumIntegrals:this.selectedSpectrumMeasurements)},
"JSV.common.Annotation.AType");c(b,"getDialog",function(a,b){-1==b&&(b=this.getCurrentSpectrumIndex());return null==this.dialogs||0>b?null:this.dialogs.get(a+"_"+b)},"JSV.common.Annotation.AType,~N");c(b,"removeDialog",function(a,b){null!=this.dialogs&&0<=a&&this.dialogs.remove(b+"_"+a)},"~N,JSV.common.Annotation.AType");c(b,"addDialog",function(a,b,c){null==this.dialogs&&(this.dialogs=new java.util.Hashtable);a=b+"_"+a;c.setGraphSetKey(a);this.dialogs.put(a,c);return c},"~N,JSV.common.Annotation.AType,JSV.api.AnnotationData");
c(b,"removeDialog",function(a){var b=a.getGraphSetKey();this.dialogs.remove(b);a=a.getData();null!=a&&this.dialogs.put(b,a)},"JSV.dialog.JSVDialog");c(b,"getPeakListing",function(a,b,c){0>a&&(a=this.getCurrentSpectrumIndex());if(0>a)return null;var f=this.getDialog(JSV.common.Annotation.AType.PeakList,-1);if(null==f){if(!c)return null;this.addDialog(a,JSV.common.Annotation.AType.PeakList,f=new JSV.common.PeakData(JSV.common.Annotation.AType.PeakList,this.getSpectrum()))}f.getData().setPeakList(b,
-2147483648,this.viewData.getScale());JSV.common.GraphSet.isDialog(f)&&f.setFields();return f.getData()},"~N,JSV.common.Parameters,~B");c(b,"setPeakListing",function(a){var b=this.getDialog(JSV.common.Annotation.AType.PeakList,-1),c=JSV.common.GraphSet.isDialog(b)?b:null;(null==a?null==c||!c.isVisible():a.booleanValue())?this.pd.showDialog(JSV.common.Annotation.AType.PeakList):JSV.common.GraphSet.isDialog(b)&&b.setVisible(!1)},"Boolean");c(b,"haveIntegralDisplayed",function(a){a=this.getDialog(JSV.common.Annotation.AType.Integration,
a);return null!=a&&a.getState()},"~N");c(b,"getIntegrationGraph",function(a){a=this.getDialog(JSV.common.Annotation.AType.Integration,a);return null==a?null:a.getData()},"~N");c(b,"setIntegrationRatios",function(a){var b=this.getFixedSelectedSpectrumIndex();null==this.aIntegrationRatios&&(this.aIntegrationRatios=Array(this.nSpectra));this.aIntegrationRatios[b]=JSV.common.IntegralData.getIntegrationRatiosFromString(this.getSpectrum(),a)},"~S");c(b,"getIntegrationRatios",function(a){return null==this.aIntegrationRatios?
null:this.aIntegrationRatios[a]},"~N");c(b,"integrate",function(a,b){var c=this.getSpectrumAt(a);if(null==b||!c.canIntegrate())return this.removeDialog(a,JSV.common.Annotation.AType.Integration),!1;this.addDialog(a,JSV.common.Annotation.AType.Integration,new JSV.common.IntegralData(c,b));return!0},"~N,JSV.common.Parameters");c(b,"getIntegration",function(a,b,c){0>a&&(a=this.getCurrentSpectrumIndex());if(0>a)return null;var f=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==f){if(!c)return null;
f=this.addDialog(a,JSV.common.Annotation.AType.Integration,new JSV.common.IntegralData(this.getSpectrum(),b))}return f.getData()},"~N,JSV.common.Parameters,~B");c(b,"getMeasurementInfo",function(a,b){var c;switch(a){case JSV.common.Annotation.AType.PeakList:c=this.getPeakListing(b,null,!1);break;case JSV.common.Annotation.AType.Integration:c=this.getIntegration(b,null,!1);break;default:return null}if(null==c)return null;var f=new java.util.Hashtable;c.getInfo(f);return f},"JSV.common.Annotation.AType,~N");
c(b,"getInfo",function(a,b){var c=new java.util.Hashtable;if("".equals(a))c.put("KEYS","viewInfo spectra");else if("viewInfo".equalsIgnoreCase(a))return this.getScale().getInfo(c);var f=new JU.Lst;c.put("spectra",f);for(var e=0;e<this.nSpectra;e++)if(!(0<=b&&e!=b)){var g=this.spectra.get(e),j=g.getInfo(a);if(0<=b&&null!=a&&(2==j.size()||a.equalsIgnoreCase("id")))return 2==j.size()&&j.remove("id"),j;JSV.common.Parameters.putInfo(a,j,"type",g.getDataType());JSV.common.Parameters.putInfo(a,j,"titleLabel",
g.getTitleLabel());JSV.common.Parameters.putInfo(a,j,"filePath",g.getFilePath().$replace("\\","/"));JSV.common.Parameters.putInfo(a,j,"PeakList",JSV.common.Parameters.isMatch(a,"PeakList")?this.getMeasurementInfo(JSV.common.Annotation.AType.PeakList,e):null);JSV.common.Parameters.putInfo(a,j,"Integration",JSV.common.Parameters.isMatch(a,"Integration")?this.getMeasurementInfo(JSV.common.Annotation.AType.Integration,e):null);if(0<=b)return j;f.addLast(j)}return c},"~S,~N");c(b,"getTitle",function(a){return 1==
this.nSpectra||0<=this.iSpectrumSelected&&(!a||1==this.nSplit)?this.getSpectrum().getTitle():null},"~B");c(b,"getCurrentView",function(){this.setScale(this.getFixedSelectedSpectrumIndex());return this.viewData.getScale()});c(b,"set2DXY",function(a,b,c){var f;null!=this.gs2dLinkedX&&(f=this.toPixelX(a),f!=this.fixX(f)&&(f=-2147483648,a=1.7976931348623157E308),this.cur1D2x1.setX(a,f));null!=this.gs2dLinkedY&&(f=this.toPixelX(b),f!=this.fixX(f)&&(f=-2147483648,b=1.7976931348623157E308),this.cur1D2x2.setX(b,
f));this.cur1D2Locked=c},"~N,~N,~B");c(b,"dialogsToFront",function(a){if(null!=this.dialogs){null==a&&(a=this.getSpectrum());for(var b,c=this.dialogs.entrySet().iterator();c.hasNext()&&((b=c.next())||1);){var f=b.getValue();this.isVisible(f)&&(null==a?f.setVisible(!0):f.setFocus(f.getSpectrum()===a))}}},"JSV.common.Spectrum");c(b,"setPlotColors",function(a){var b=a;if(b.length>this.nSpectra)a=Array(this.nSpectra),System.arraycopy(b,0,a,0,this.nSpectra),b=a;else if(this.nSpectra>b.length){a=Array(this.nSpectra);
var c=this.nSpectra-b.length;System.arraycopy(b,0,a,0,b.length);for(var f=0,b=b.length;f<c;f++,b++)a[b]=this.generateRandomColor();b=a}this.plotColors=b},"~O");c(b,"disposeImage",function(){null!=this.image2D&&this.image2D.parentNode.removeChild(this.image2D);this.plotColors=this.highlights=this.pd=this.jsvp=this.image2D=null});c(b,"generateRandomColor",function(){for(;;){var a=w(255*Math.random()),b=w(255*Math.random()),c=w(255*Math.random()),a=this.g2d.getColor3(a,b,c);if(0!=a.getRGB())return a}});
c(b,"setPlotColor0",function(a){this.plotColors[0]=a},"~O");c(b,"getPlotColor",function(a){return a>=this.plotColors.length?null:this.plotColors[a]},"~N");c(b,"setColorFromToken",function(a,b){null!=b&&this.g2d.setGraphicsColor(a,b===JSV.common.ScriptToken.PLOTCOLOR?this.plotColors[0]:this.pd.getColor(b))},"~O,JSV.common.ScriptToken");c(b,"setPlotColor",function(a,b){var c;switch(b){case -3:c=JSV.common.GraphSet.veryLightGrey;break;case -2:c=this.pd.BLACK;break;case -1:c=this.pd.getColor(JSV.common.ScriptToken.INTEGRALPLOTCOLOR);
break;default:c=this.plotColors[b]}this.g2d.setGraphicsColor(a,c)},"~O,~N");c(b,"draw2DImage",function(){null!=this.imageView&&this.g2d.drawGrayScaleImage(this.gMain,this.image2D,this.imageView.xPixel0,this.imageView.yPixel0,this.imageView.xPixel0+this.imageView.xPixels-1,this.imageView.yPixel0+this.imageView.yPixels-1,this.imageView.xView1,this.imageView.yView1,this.imageView.xView2,this.imageView.yView2)});c(b,"get2DImage",function(){this.imageView=new JSV.common.ImageView;this.imageView.set(this.viewList.get(0).getScale());
if(!this.update2dImage(!0))return!1;this.imageView.resetZoom();return this.sticky2Dcursor=!0},"JSV.common.Spectrum");c(b,"update2dImage",function(a){this.imageView.set(this.viewData.getScale());var b=this.getSpectrumAt(0),c=this.imageView.get2dBuffer(b,!a);if(null==c)return this.imageView=this.image2D=null,!1;a&&(c=this.imageView.adjustView(b,this.viewData),this.imageView.resetView());this.image2D=this.g2d.newGrayScaleImage(this.gMain,this.image2D,this.imageView.imageWidth,this.imageView.imageHeight,
c);this.setImageWindow();return!0},"~B");c(b,"getAnnotation",function(a,b,c,f,e,g,j){return(new JSV.common.ColoredAnnotation).setCA(a,b,this.getSpectrum(),c,this.pd.BLACK,f,e,g,j)},"~N,~N,~S,~B,~B,~N,~N");c(b,"getAnnotation",function(a,b){return JSV.common.Annotation.getColoredAnnotation(this.g2d,this.getSpectrum(),a,b)},"JU.Lst,JSV.common.Annotation");c(b,"fillBox",function(a,b,c,f,e,g){this.setColorFromToken(a,g);this.g2d.fillRect(a,Math.min(b,f),Math.min(c,e),Math.abs(b-f),Math.abs(c-e))},"~O,~N,~N,~N,~N,JSV.common.ScriptToken");
c(b,"drawBox",function(a,b,c,f,e,g){this.setColorFromToken(a,g);this.g2d.drawRect(a,Math.min(b,f),Math.min(c,e),Math.abs(b-f)-1,Math.abs(c-e)-1)},"~O,~N,~N,~N,~N,JSV.common.ScriptToken");c(b,"drawHandle",function(a,b,c,f,e){e?this.g2d.drawRect(a,b-f,c-f,2*f,2*f):this.g2d.fillRect(a,b-f,c-f,2*f+1,2*f+1)},"~O,~N,~N,~N,~B");c(b,"setCurrentBoxColor",function(a){this.g2d.setGraphicsColor(a,this.pd.BLACK)},"~O");c(b,"fillArrow",function(a,b,c,f,e){var g=1;switch(b){case 1:case 3:g=-1}c=D(-1,[c-5,c-5,c+
5,c+5,c+8,c,c-8]);f=D(-1,[f+5*g,f-g,f-g,f+5*g,f+5*g,f+10*g,f+5*g]);switch(b){case 1:case 2:e?this.g2d.fillPolygon(a,f,c,7):this.g2d.drawPolygon(a,f,c,7);break;case 3:case 4:e?this.g2d.fillPolygon(a,c,f,7):this.g2d.drawPolygon(a,c,f,7)}},"~O,~N,~N,~N,~B");c(b,"fillCircle",function(a,b,c,f){f?this.g2d.fillCircle(a,b-4,c-4,8):this.g2d.drawCircle(a,b-4,c-4,8)},"~O,~N,~N,~B");c(b,"setAnnotationColor",function(a,b,c){null!=c?this.setColorFromToken(a,c):(c=null,C(b,"JSV.common.ColoredAnnotation")&&(c=b.getColor()),
null==c&&(c=this.pd.BLACK),this.g2d.setGraphicsColor(a,c))},"~O,JSV.common.Annotation,JSV.common.ScriptToken");c(b,"setSolutionColor",function(a,b,c){for(var f=0;f<this.nSpectra;f++){var e=this.spectra.get(f),g=b||!e.canShowSolutionColor()?-1:a.getColour(e,c);e.setFillColor(-1==g?null:this.pd.vwr.parameters.getColor1(g))}},"JSV.api.VisibleInterface,~B,~B");c(b,"setIRMode",function(a,b){for(var c=0;c<this.nSpectra;c++){var f=this.spectra.get(c);if(f.dataType.equals(b)){var e=JSV.common.Spectrum.taConvert(f,
a);e!==f&&this.pd.setSpecForIRMode(e)}}},"JSV.common.Spectrum.IRMode,~S");c(b,"getSpectrumCount",function(){return 0});c(b,"invertYAxis",function(){this.viewList.get(0).init(null,0,0,this.getSpectrum().invertYAxis().isContinuous());this.resetViewCompletely()});b.isDialog=c(b,"isDialog",function(a){return null!=a&&a.isDialog()},"JSV.api.AnnotationData");b.$GraphSet$Highlight$=function(){var a=s(function(){fa(this,arguments);this.x2=this.x1=0;this.spectrum=this.color=null;r(this,arguments)},JSV.common.GraphSet,
"Highlight",null);u(a,function(a,b,c,e){this.x1=a;this.x2=b;this.color=e;this.spectrum=c},"~N,~N,JSV.common.Spectrum,javajs.api.GenericColor");f(a,"toString",function(){return"highlight "+this.x1+" "+this.x2+" "+this.spectrum});f(a,"equals",function(a){return!C(a,"JSV.common.GraphSet.Highlight")?!1:a.x1==this.x1&&a.x2==this.x2},"~O");f(a,"hashCode",function(){return w(1E3*this.x1+1E6*this.x2)})};b.RT2=Math.sqrt(2);b.veryLightGrey=null});m("JSV.common");x(["JSV.common.XYScaleConverter"],"JSV.common.ImageView",
["JSV.common.Coordinate","$.ScaleData"],function(){var b=s(function(){this.buf2d=null;this.yView2=this.xView2=this.yView1=this.xView1=this.yPixelZoom2=this.xPixelZoom2=this.yPixelZoom1=this.xPixelZoom1=this.yPixels=this.xPixels=this.imageHeight=this.imageWidth=this.yPixel1=this.xPixel1=this.yPixel0=this.xPixel0=this.averageGray=this.grayFactorLast=0;this.minX=NaN;this.maxZ=this.minZ=this.maxY=this.minY=this.maxX=0;this.scaleData=null;r(this,arguments)},JSV.common,"ImageView",null,JSV.common.XYScaleConverter);
c(b,"set",function(a){Double.isNaN(this.minX)&&(this.minX=a.minX,this.maxX=a.maxX);this.minZ=a.minY;this.maxZ=a.maxY;this.scaleData=new JSV.common.ScaleData},"JSV.common.ScaleData");c(b,"setZoom",function(a,b,c,f){this.xPixelZoom1=Math.min(a,c);this.yPixelZoom1=Math.min(b,f);this.xPixelZoom2=Math.max(a,c);this.yPixelZoom2=Math.max(b,f);this.setView()},"~N,~N,~N,~N");c(b,"setXY0",function(a,b,c){this.xPixel0=b;this.yPixel0=c;this.xPixel1=this.xPixel0+this.xPixels-1;this.yPixel1=this.yPixel0+this.yPixels-
1;this.setMinMaxY(a)},"JSV.common.Spectrum,~N,~N");c(b,"setPixelWidthHeight",function(a,b){this.xPixels=a;this.yPixels=b},"~N,~N");c(b,"resetView",function(){this.yView1=this.xView1=0;this.xView2=this.imageWidth-1;this.yView2=this.imageHeight-1});c(b,"setView",function(){0==this.xPixelZoom1&&this.resetZoom();var a=this.toImageX(this.xPixelZoom1),b=this.toImageY(this.yPixelZoom1),c=this.toImageX(this.xPixelZoom2),f=this.toImageY(this.yPixelZoom2);this.xView1=Math.min(a,c);this.yView1=Math.min(b,f);
this.xView2=Math.max(a,c);this.yView2=Math.max(b,f);this.setScaleData();this.resetZoom()});c(b,"resetZoom",function(){this.xPixelZoom1=this.xPixel0;this.yPixelZoom1=this.yPixel0;this.xPixelZoom2=this.xPixel1;this.yPixelZoom2=this.yPixel1});c(b,"toImageX",function(a){return this.xView1+w(Math.floor((a-this.xPixel0)/(this.xPixels-1)*(this.xView2-this.xView1)))},"~N");c(b,"toImageY",function(a){return this.yView1+w(Math.floor((a-this.yPixel0)/(this.yPixels-1)*(this.yView2-this.yView1)))},"~N");c(b,"toImageX0",
function(a){return JSV.common.Coordinate.intoRange(w((1*a-this.xPixel0)/(this.xPixels-1)*(this.imageWidth-1)),0,this.imageWidth-1)},"~N");c(b,"toImageY0",function(a){return JSV.common.Coordinate.intoRange(w((1*a-this.yPixel0)/(this.yPixels-1)*(this.imageHeight-1)),0,this.imageHeight-1)},"~N");c(b,"isXWithinRange",function(a){return a>=this.xPixel0-5&&a<this.xPixel0+this.xPixels+5},"~N");c(b,"toSubspectrumIndex",function(a){return JSV.common.Coordinate.intoRange(this.imageHeight-1-this.toImageY(a),
0,this.imageHeight-1)},"~N");c(b,"toX0",function(a){return this.maxX+(this.minX-this.maxX)*(this.fixX(a)-this.xPixel0)/(this.xPixels-1)},"~N");c(b,"toPixelX0",function(a){return this.xPixel1-w((a-this.minX)/(this.maxX-this.minX)*(this.xPixels-1))},"~N");c(b,"toPixelY0",function(a){return this.yPixel1-w(a/(this.imageHeight-1)*(this.yPixels-1))},"~N");c(b,"subIndexToPixelY",function(a){return this.yPixel0+w(1*(this.imageHeight-1-a-this.yView1)/(this.yView2-this.yView1)*(this.yPixels-1))},"~N");c(b,
"fixSubIndex",function(a){return JSV.common.Coordinate.intoRange(a,this.imageHeight-1-this.yView2,this.imageHeight-1-this.yView1)},"~N");c(b,"setView0",function(a,b,c,f){a=this.toImageX0(a);b=this.toImageY0(b);c=this.toImageX0(c);f=this.toImageY0(f);this.xView1=Math.min(a,c);this.yView1=Math.min(b,f);this.xView2=Math.max(a,c);this.yView2=Math.max(b,f);this.resetZoom()},"~N,~N,~N,~N");c(b,"get2dBuffer",function(a,b){var c=a.getSubSpectra();if(null==c||!c.get(0).isContinuous())return null;var f=a.getXYCoords(),
e=c.size();this.imageWidth=f.length;this.imageHeight=e;var g=255/(this.maxZ-this.minZ);if(!b&&null!=this.buf2d&&g==this.grayFactorLast)return this.buf2d;this.grayFactorLast=g;for(var j=this.imageWidth*this.imageHeight,k=null==this.buf2d||this.buf2d.length!=j?D(j,0):this.buf2d,l=0,m=0;m<e;m++){var n=c.get(m).xyCoords;if(n.length!=f.length)return null;for(var q=0;q<f.length;q++){var r=n[q].getYVal(),r=255-JSV.common.Coordinate.intoRange(w((r-this.minZ)*g),0,255);k[--j]=r;l+=r}}this.averageGray=1-l/
(this.imageWidth*this.imageHeight)/255;System.out.println("Average gray = "+this.averageGray);return this.buf2d=k},"JSV.common.Spectrum,~B");c(b,"adjustView",function(a,b){for(var c=0,f=!1;((f=0.05>this.averageGray)||0.3<this.averageGray)&&10>c++;)b.scaleSpectrum(-2,f?2:0.5),this.set(b.getScale()),this.get2dBuffer(a,!1);return this.buf2d},"JSV.common.Spectrum,JSV.common.ViewData");c(b,"getBuffer",function(){return this.buf2d});c(b,"setMinMaxY",function(a){a=a.getSubSpectra();var b=a.get(0);this.maxY=
b.getY2D();this.minY=a.get(a.size()-1).getY2D();b.y2DUnits.equalsIgnoreCase("Hz")&&(this.maxY/=b.freq2dY,this.minY/=b.freq2dY);this.setScaleData()},"JSV.common.Spectrum");c(b,"setScaleData",function(){this.scaleData.minY=this.minY;this.scaleData.maxY=this.maxY;this.scaleData.setYScale(this.toY(this.yPixel0),this.toY(this.yPixel1),!1,!1)});f(b,"fixX",function(a){return a<this.xPixel0?this.xPixel0:a>this.xPixel1?this.xPixel1:a},"~N");f(b,"fixY",function(a){return JSV.common.Coordinate.intoRange(a,this.yPixel0,
this.yPixel1)},"~N");f(b,"getScale",function(){return this.scaleData});f(b,"toX",function(a){return this.maxX+(this.minX-this.maxX)*this.toImageX(this.fixX(a))/(this.imageWidth-1)},"~N");f(b,"toY",function(a){a=this.toSubspectrumIndex(a);return this.maxY+(this.minY-this.maxY)*a/(this.imageHeight-1)},"~N");f(b,"toPixelX",function(a){var b=this.toX(this.xPixel0),c=this.toX(this.xPixel1);return this.xPixel0+w((a-b)/(c-b)*(this.xPixels-1))},"~N");f(b,"toPixelY",function(a){return w(this.yPixel0+(a-this.scaleData.minYOnScale)/
(this.scaleData.maxYOnScale-this.scaleData.minYOnScale)*this.yPixels)},"~N");f(b,"getXPixels",function(){return this.xPixels});f(b,"getYPixels",function(){return this.yPixels});f(b,"getXPixel0",function(){return this.xPixel0})});m("JSV.common");x(["JSV.common.Measurement"],"JSV.common.Integral",null,function(){var b=G(JSV.common,"Integral",JSV.common.Measurement);c(b,"setInt",function(a,b,c,f,e,g){this.setA(a,b,c,"",!1,!1,0,6);this.setPt2(e,g);this.setValue(f);return this},"~N,~N,JSV.common.Spectrum,~N,~N,~N")});
m("JSV.common");var rb=G(JSV.common,"IntegralComparator",null,java.util.Comparator);f(rb,"compare",function(b,a){return b.getXVal()<a.getXVal()?-1:b.getXVal()>a.getXVal()?1:0},"JSV.common.Measurement,JSV.common.Measurement");m("JSV.common");x(["java.lang.Enum","JSV.common.MeasurementData","$.IntegralComparator"],"JSV.common.IntegralData","java.util.Collections $.StringTokenizer JU.AU $.BS $.DF $.Lst $.PT JSV.common.Annotation $.Coordinate $.Integral $.ScriptToken".split(" "),function(){var b=s(function(){this.intRange=
this.percentOffset=this.percentMinY=0;this.normalizationFactor=1;this.integralTotal=this.offset=this.percentRange=0;this.haveRegions=!1;this.xyCoords=null;r(this,arguments)},JSV.common,"IntegralData",JSV.common.MeasurementData);u(b,function(a,b,c,e){K(this,JSV.common.IntegralData,[JSV.common.Annotation.AType.Integration,e]);this.percentMinY=a;this.percentOffset=b;this.percentRange=c;this.calculateIntegral()},"~N,~N,~N,JSV.common.Spectrum");u(b,function(a,b){K(this,JSV.common.IntegralData,[JSV.common.Annotation.AType.Integration,
a]);null==b?this.autoIntegrate():(this.percentOffset=b.integralOffset,this.percentRange=b.integralRange,this.calculateIntegral())},"JSV.common.Spectrum,JSV.common.Parameters");c(b,"getPercentMinimumY",function(){return this.percentMinY});c(b,"getPercentOffset",function(){return this.percentOffset});c(b,"getIntegralFactor",function(){return this.intRange});c(b,"update",function(a){this.update(a.integralMinY,a.integralOffset,a.integralRange)},"JSV.common.Parameters");c(b,"update",function(a,b,c){var e=
this.percentRange;if(!(0>=c||c==this.percentRange&&b==this.percentOffset)){this.percentOffset=b;this.percentRange=c;this.checkRange();a=c/100/this.integralTotal;b/=100;for(var g=0;g<this.xyCoords.length;g++){var f=this.xyCoords[g].getYVal(),f=(f-this.offset)/this.intRange;this.xyCoords[g].setYVal(f*a+b)}1!=this.normalizationFactor&&(this.normalizationFactor*=e/c);if(this.haveRegions)for(g=this.size();0<=--g;)c=this.get(g),e=this.getYValueAt(c.getXVal()),f=this.getYValueAt(c.getXVal2()),c.setYVal(e),
c.setYVal2(f),c.setValue(100*Math.abs(f-e)*this.normalizationFactor);this.intRange=a;this.offset=b}},"~N,~N,~N");c(b,"getYValueAt",function(a){return JSV.common.Coordinate.getYValueAt(this.xyCoords,a)},"~N");c(b,"addIntegralRegion",function(a,b){if(Double.isNaN(a))return this.haveRegions=!1,this.clear(),null;if(Double.isNaN(b))return this.splitIntegral(a);if(a==b)return null;if(a<b)return this.clear(a,b),null;var c=this.getYValueAt(a),e=this.getYValueAt(b);this.haveRegions=!0;c=(new JSV.common.Integral).setInt(a,
c,this.spec,100*Math.abs(e-c)*this.normalizationFactor,b,e);this.clear(a,b);this.addLast(c);java.util.Collections.sort(this,JSV.common.IntegralData.c);return c},"~N,~N");c(b,"splitIntegral",function(a){var b=this.find(a);if(0>b)return null;var c=this.removeItemAt(b),b=c.getXVal(),c=c.getXVal2();this.addIntegralRegion(b,a);return this.addIntegralRegion(a,c)},"~N");f(b,"setSpecShift",function(a){JSV.common.Coordinate.shiftX(this.xyCoords,a);for(var b=this.size();1<=--b;)this.get(b).addSpecShift(a)},
"~N");c(b,"addMarks",function(a){a=JU.PT.rep(" "+a,","," ");a=JU.PT.rep(a," -"," #");a=JU.PT.rep(a,"--","-#");a=a.$replace("-","^");a=a.$replace("#","-");a=JSV.common.ScriptToken.getTokens(a);for(var b=0;b<a.size();b++)try{var c=a.get(b),e=0,g=c.indexOf("^");if(!(0>g)){var f=c.indexOf(":");f>g&&(e=Double.$valueOf(c.substring(f+1).trim()).doubleValue(),c=c.substring(0,f).trim());var k=Double.$valueOf(c.substring(0,g).trim()).doubleValue(),l=Double.$valueOf(c.substring(g+1).trim()).doubleValue();0==
l&&0==k&&this.clear();if(l!=k){var m=this.addIntegralRegion(Math.max(l,k),Math.min(l,k));null!=m&&0<e&&this.setSelectedIntegral(m,e)}}}catch(n){if(!E(n,Exception))throw n;}},"~S");c(b,"calculateIntegral",function(){var a=this.spec.getXYCoords();this.xyCoords=Array(a.length);this.integralTotal=0;this.checkRange();for(var b=1E100,c=0;c<a.length;c++){var e=a[c].getYVal();e<b&&0<=e&&(b=e)}for(var g=1E100,f=-1E100,c=0;c<a.length;c++)e=a[c].getYVal(),this.integralTotal+=e-b,this.integralTotal<g&&(g=this.integralTotal),
this.integralTotal>f&&(f=this.integralTotal);this.integralTotal=f-g;this.intRange=this.percentRange/100/this.integralTotal;this.offset=this.percentOffset/100;g=0;for(c=a.length;0<=--c;)e=a[c].getYVal(),g+=e-b,this.xyCoords[c]=(new JSV.common.Coordinate).set(a[c].getXVal(),g*this.intRange+this.offset);return this.xyCoords});c(b,"checkRange",function(){this.percentOffset=Math.max(5,this.percentOffset);this.percentRange=Math.max(10,this.percentRange)});b.getIntegrationRatiosFromString=c(b,"getIntegrationRatiosFromString",
function(a,b){for(var c=new JU.Lst,e=new java.util.StringTokenizer(b,",");e.hasMoreTokens();){var g=e.nextToken(),g=new java.util.StringTokenizer(g,":"),g=(new JSV.common.Annotation).setA(Double.parseDouble(g.nextToken()),0,a,g.nextToken(),!0,!1,0,0);c.addLast(g)}return c},"JSV.common.Spectrum,~S");c(b,"getXYCoords",function(){return this.xyCoords});c(b,"getPercentYValueAt",function(a){return 100*this.getYValueAt(a)},"~N");c(b,"dispose",function(){this.xyCoords=this.spec=null});c(b,"setSelectedIntegral",
function(a,b){var c=a.getValue();this.factorAllIntegrals(0>=b?1/this.normalizationFactor:b/c,0>=b)},"JSV.common.Measurement,~N");c(b,"factorAllIntegrals",function(a,b){for(var c=0;c<this.size();c++){var e=this.get(c);e.setValue(a*e.getValue())}this.normalizationFactor=b?1:this.normalizationFactor*a},"~N,~B");c(b,"remove",function(a){return this.removeItemAt(a)},"~N");c(b,"getBitSet",function(){var a=JU.BS.newN(this.xyCoords.length);if(0==this.size())return a.setBits(0,this.xyCoords.length),a;for(var b=
this.size();0<=--b;){var c=this.get(b),e=JSV.common.Coordinate.getNearestIndexForX(this.xyCoords,c.getXVal()),c=JSV.common.Coordinate.getNearestIndexForX(this.xyCoords,c.getXVal2());a.setBits(Math.min(e,c),Math.max(e,c))}return a});f(b,"getMeasurementListArray",function(){for(var a=Array(this.size()),b=0,c=this.size();0<=--c;)a[b++]=z(-1,[""+b,JU.DF.formatDecimalDbl(this.get(c).getXVal(),2),JU.DF.formatDecimalDbl(this.get(c).getXVal2(),2),this.get(c).text]);return a},"~S");f(b,"getMeasurementListArrayReal",
function(){for(var a=JU.AU.newDouble2(this.size()),b=0,c=this.size();0<=--c;b++)a[b]=S(-1,[this.get(c).getXVal(),this.get(c).getXVal2(),this.get(c).getValue()]);return a},"~S");f(b,"getDataHeader",function(){return JSV.common.IntegralData.$HEADER});c(b,"shiftY",function(a,b,c,e){b=w(100*(c+e-b)/e);0>a&&(b-=this.percentOffset);0>a?this.update(0,this.percentOffset,b):this.update(0,b,this.percentRange)},"~N,~N,~N,~N");c(b,"autoIntegrate",function(){null==this.xyCoords&&this.calculateIntegral();if(0!=
this.xyCoords.length){this.clear();for(var a=-1,b=0,c=this.xyCoords[this.xyCoords.length-1].getYVal(),e=this.xyCoords.length-1;0<=--e;){var g=this.xyCoords[e].getYVal();b++;1E-4>g-c&&0>a?g<c&&(c=g,b=0):0>a?(a=e+Math.min(b,20),c=g,b=0):1E-4>g-c?(1==b&&(c=g),20<=b&&(this.addIntegralRegion(this.xyCoords[a].getXVal(),this.xyCoords[e].getXVal()),a=-1,c=g,b=0)):(b=0,c=g)}a=this.spec.getHydrogenCount();0<a&&this.factorAllIntegrals(a/this.percentRange,!1)}});c(b,"getInfo",function(a){a.put("offset",Double.$valueOf(this.myParams.integralOffset));
a.put("range",Double.$valueOf(this.myParams.integralRange));a.put("normalizationFactor",Double.$valueOf(this.normalizationFactor));a.put("integralTotal",Double.$valueOf(this.integralTotal));ba(this,JSV.common.IntegralData,"getInfo",[a])},"java.util.Map");c(b,"setMinimumIntegral",function(a){for(var b=this.size();0<=--b;)this.get(b).getValue()<a&&this.removeItemAt(b)},"~N");var a=G(JSV.common.IntegralData,"IntMode",Enum);a.getMode=c(a,"getMode",function(a){for(var b,c=0,e=JSV.common.IntegralData.IntMode.values();c<
e.length&&((b=e[c])||1);c++)if(a.startsWith(b.name()))return b;return JSV.common.IntegralData.IntMode.NA},"~S");A(a,"OFF",0,[]);A(a,"ON",1,[]);A(a,"TOGGLE",2,[]);A(a,"AUTO",3,[]);A(a,"LIST",4,[]);A(a,"MARK",5,[]);A(a,"MIN",6,[]);A(a,"UPDATE",7,[]);A(a,"CLEAR",8,[]);A(a,"NA",9,[]);b.c=new JSV.common.IntegralComparator;b.$HEADER=z(-1,["peak","start/ppm","end/ppm","value"])});m("JSV.common");x(["java.lang.Enum","JSV.source.JDXDataObject","JU.Lst"],"JSV.common.Spectrum","java.util.Hashtable JU.PT JSV.common.Coordinate $.Parameters $.PeakInfo JSV.source.JDXSourceStreamTokenizer JU.Logger".split(" "),
function(){var b=s(function(){this.id="";this.convertedSpectrum=this.highlightedPeak=this.selectedPeak=this.peakYLabel=this.peakXLabel=this.peakList=this.subSpectra=this.fillColor=null;this.specShift=0;this.userYFactor=1;this.currentSubSpectrumIndex=0;this.exportXAxisLeftToRight=this.$isForcedSubset=!1;this.titleLabel=null;r(this,arguments)},JSV.common,"Spectrum",JSV.source.JDXDataObject);N(b,function(){this.peakList=new JU.Lst});u(b,function(){K(this,JSV.common.Spectrum,[]);this.headerTable=new JU.Lst;
this.xyCoords=[];this.parent=this});c(b,"dispose",function(){});c(b,"isForcedSubset",function(){return this.$isForcedSubset});c(b,"setId",function(a){this.id=a},"~S");c(b,"copy",function(){var a=new JSV.common.Spectrum;this.copyTo(a);a.setPeakList(this.peakList,this.peakXLabel,null);a.fillColor=this.fillColor;return a});c(b,"getXYCoords",function(){return this.getCurrentSubSpectrum().xyCoords});c(b,"getPeakList",function(){return this.peakList});c(b,"setPeakList",function(a,b,c){this.peakList=a;this.peakXLabel=
b;this.peakYLabel=c;for(b=a.size();0<=--b;)this.peakList.get(b).spectrum=this;JU.Logger.debugging&&JU.Logger.info("Spectrum "+this.getTitle()+" peaks: "+a.size());return a.size()},"JU.Lst,~S,~S");c(b,"selectPeakByFileIndex",function(a,b,c){if(null!=this.peakList&&0<this.peakList.size()&&(null==c||this.sourceID.equals(b)))for(var f=0;f<this.peakList.size();f++)if(this.peakList.get(f).checkFileIndex(a,b,c))return System.out.println("JSV.Spectrum selecting peak by FileIndex "+this+" "+this.peakList.get(f)),
this.selectedPeak=this.peakList.get(f);return null},"~S,~S,~S");c(b,"selectPeakByFilePathTypeModel",function(a,b,c){if(null!=this.peakList&&0<this.peakList.size())for(var f=0;f<this.peakList.size();f++)if(this.peakList.get(f).checkFileTypeModel(a,b,c))return System.out.println("JSV.Spectrum selecting peak byFilePathTypeModel "+this+" "+this.peakList.get(f)),this.selectedPeak=this.peakList.get(f);return null},"~S,~S,~S");c(b,"matchesPeakTypeModel",function(a,b){if(a.equals("ID"))return this.sourceID.equalsIgnoreCase(b);
if(null!=this.peakList&&0<this.peakList.size())for(var c=0;c<this.peakList.size();c++)if(this.peakList.get(c).checkTypeModel(a,b))return!0;return!1},"~S,~S");c(b,"setSelectedPeak",function(a){this.selectedPeak=a},"JSV.common.PeakInfo");c(b,"setHighlightedPeak",function(a){this.highlightedPeak=a},"JSV.common.PeakInfo");c(b,"getSelectedPeak",function(){return this.selectedPeak});c(b,"getModelPeakInfoForAutoSelectOnLoad",function(){if(null!=this.peakList)for(var a=0;a<this.peakList.size();a++)if(this.peakList.get(a).autoSelectOnLoad())return this.peakList.get(a);
return null});c(b,"getAssociatedPeakInfo",function(a,b){this.selectedPeak=this.findPeakByCoord(a,b);return null==this.selectedPeak?this.getBasePeakInfo():this.selectedPeak},"~N,JSV.common.Coordinate");c(b,"findPeakByCoord",function(a,b){if(null!=b&&null!=this.peakList&&0<this.peakList.size()){for(var c=b.getXVal(),f=-1,e=1E100,g=0;g<this.peakList.size();g++){var j=this.peakList.get(g).checkRange(a,c);j<e&&(e=j,f=g)}if(0<=f)return this.peakList.get(f)}return null},"~N,JSV.common.Coordinate");c(b,"getPeakTitle",
function(){var a=null;null!=this.highlightedPeak&&(a=this.highlightedPeak.getTitle());if((null==a||0==a.length)&&null!=this.selectedPeak)a=this.selectedPeak.getTitle();if(null==a||0==a.length)a=this.getTitleLabel();return a});c(b,"getTitleLabel",function(){if(null!=this.titleLabel)return this.titleLabel;var a=null==this.peakList||0==this.peakList.size()?this.getQualifiedDataType():this.peakList.get(0).getType();null!=a&&a.startsWith("NMR")&&(a=null!=this.nucleusY&&!this.nucleusY.equals("?")?"2D"+
a:JSV.source.JDXDataObject.getNominalSpecFreq(this.nucleusX,this.getObservedFreq())+" MHz "+this.nucleusX+" "+a);return this.titleLabel=(null!=a&&0<a.length?a+" ":"")+this.getTitle()});c(b,"setNextPeak",function(a,b){if(null==this.peakList||0==this.peakList.size())return-1;for(var c=a.getXVal()+1E-6*b,f=-1,e=-1,g=1.7976931348623157E308*b,j=0,k=this.peakList.size();0<=--k;){var l=this.peakList.get(k).getX();0<b?l>c&&l<g?(f=k,g=l):l<c&&l-c<j&&(e=k,j=l-c):l<c&&l>g?(f=k,g=l):l>c&&l-c>j&&(e=k,j=l-c)}if(0>
f){if(0>e)return-1;f=e}return f},"JSV.common.Coordinate,~N");c(b,"getPercentYValueAt",function(a){return!this.isContinuous()?NaN:this.getYValueAt(a)},"~N");c(b,"getYValueAt",function(a){return JSV.common.Coordinate.getYValueAt(this.xyCoords,a)},"~N");c(b,"setUserYFactor",function(a){this.userYFactor=a},"~N");c(b,"getUserYFactor",function(){return this.userYFactor});c(b,"getConvertedSpectrum",function(){return this.convertedSpectrum});c(b,"setConvertedSpectrum",function(a){this.convertedSpectrum=a},
"JSV.common.Spectrum");b.taConvert=c(b,"taConvert",function(a,b){if(!a.isContinuous())return a;switch(b){case JSV.common.Spectrum.IRMode.NO_CONVERT:return a;case JSV.common.Spectrum.IRMode.TO_ABS:if(!a.isTransmittance())return a;break;case JSV.common.Spectrum.IRMode.TO_TRANS:if(!a.isAbsorbance())return a}var c=a.getConvertedSpectrum();return null!=c?c:a.isAbsorbance()?JSV.common.Spectrum.toT(a):JSV.common.Spectrum.toA(a)},"JSV.common.Spectrum,JSV.common.Spectrum.IRMode");b.toT=c(b,"toT",function(a){if(!a.isAbsorbance())return null;
var b=a.getXYCoords(),c=Array(b.length);JSV.common.Coordinate.isYInRange(b,0,4)||(b=JSV.common.Coordinate.normalise(b,0,4));for(var f=0;f<b.length;f++)c[f]=(new JSV.common.Coordinate).set(b[f].getXVal(),JSV.common.Spectrum.toTransmittance(b[f].getYVal()));return JSV.common.Spectrum.newSpectrum(a,c,"TRANSMITTANCE")},"JSV.common.Spectrum");b.toA=c(b,"toA",function(a){if(!a.isTransmittance())return null;for(var b=a.getXYCoords(),c=Array(b.length),f=JSV.common.Coordinate.isYInRange(b,-2,2),e=0;e<b.length;e++)c[e]=
(new JSV.common.Coordinate).set(b[e].getXVal(),JSV.common.Spectrum.toAbsorbance(b[e].getYVal(),f));return JSV.common.Spectrum.newSpectrum(a,c,"ABSORBANCE")},"JSV.common.Spectrum");b.newSpectrum=c(b,"newSpectrum",function(a,b,c){var f=a.copy();f.setOrigin("JSpecView Converted");f.setOwner("JSpecView Generated");f.setXYCoords(b);f.setYUnits(c);a.setConvertedSpectrum(f);f.setConvertedSpectrum(a);return f},"JSV.common.Spectrum,~A,~S");b.toAbsorbance=c(b,"toAbsorbance",function(a,b){return Math.min(4,
b?2-JSV.common.Spectrum.log10(a):-JSV.common.Spectrum.log10(a))},"~N,~B");b.toTransmittance=c(b,"toTransmittance",function(a){return 0>=a?1:Math.pow(10,-a)},"~N");b.log10=c(b,"log10",function(a){return Math.log(a)/Math.log(10)},"~N");b.process=c(b,"process",function(a,b){if(b===JSV.common.Spectrum.IRMode.TO_ABS||b===JSV.common.Spectrum.IRMode.TO_TRANS)for(var c=0;c<a.size();c++)a.set(c,JSV.common.Spectrum.taConvert(a.get(c),b));return!0},"JU.Lst,JSV.common.Spectrum.IRMode");c(b,"getSubSpectra",function(){return this.subSpectra});
c(b,"getCurrentSubSpectrum",function(){return null==this.subSpectra?this:this.subSpectra.get(this.currentSubSpectrumIndex)});c(b,"advanceSubSpectrum",function(a){return this.setCurrentSubSpectrum(this.currentSubSpectrumIndex+a)},"~N");c(b,"setCurrentSubSpectrum",function(a){return this.currentSubSpectrumIndex=JSV.common.Coordinate.intoRange(a,0,this.subSpectra.size()-1)},"~N");c(b,"addSubSpectrum",function(a,b){if(!b&&(this.is1D()||this.blockID!=a.blockID)||!JSV.common.Spectrum.allowSubSpec(this,
a))return!1;this.$isForcedSubset=b;null==this.subSpectra&&(this.subSpectra=new JU.Lst,this.addSubSpectrum(this,!0));this.subSpectra.addLast(a);a.parent=this;return!0},"JSV.common.Spectrum,~B");c(b,"getSubIndex",function(){return null==this.subSpectra?-1:this.currentSubSpectrumIndex});c(b,"setExportXAxisDirection",function(a){this.exportXAxisLeftToRight=a},"~B");c(b,"isExportXAxisLeftToRight",function(){return this.exportXAxisLeftToRight});c(b,"getInfo",function(a){var b=new java.util.Hashtable;if("id".equalsIgnoreCase(a))return b.put(a,
this.id),b;var c=null;"".equals(a)&&(c="id specShift header");b.put("id",this.id);JSV.common.Parameters.putInfo(a,b,"specShift",Double.$valueOf(this.specShift));var f="header".equals(a);if(!f&&null!=a&&null==c)for(var e=this.headerTable.size();0<=--e;){var g=this.headerTable.get(e);if(g[0].equalsIgnoreCase(a)||g[2].equalsIgnoreCase(a))return b.put(a,g[1]),b}for(var g=new java.util.Hashtable,j=this.getHeaderRowDataAsArray(),e=0;e<j.length;e++){var k=JSV.source.JDXSourceStreamTokenizer.cleanLabel(j[e][0]);
if(null!=c)c+=" "+k;else if(!(null!=a&&!f&&!k.equals(a))){var l=JSV.common.Spectrum.fixInfoValue(j[e][1]);if(null==a){var m=new java.util.Hashtable;m.put("value",l);m.put("index",Integer.$valueOf(e+1));b.put(k,m)}else b.put(k,l)}}0<g.size()&&b.put("header",g);f||(null!=c?c+="  titleLabel type isHZToPPM subSpectrumCount":(JSV.common.Parameters.putInfo(a,b,"titleLabel",this.getTitleLabel()),JSV.common.Parameters.putInfo(a,b,"type",this.getDataType()),JSV.common.Parameters.putInfo(a,b,"isHZToPPM",Boolean.$valueOf(this.isHZtoPPM())),
JSV.common.Parameters.putInfo(a,b,"subSpectrumCount",Integer.$valueOf(null==this.subSpectra?0:this.subSpectra.size()))));null!=c&&b.put("KEYS",c);return b},"~S");b.fixInfoValue=c(b,"fixInfoValue",function(a){try{return Integer.$valueOf(a)}catch(b){if(!E(b,Exception))throw b;}try{return Double.$valueOf(a)}catch(c){if(!E(c,Exception))throw c;}return a},"~S");c(b,"findMatchingPeakInfo",function(a){for(var b=0;b<this.peakList.size();b++)if(this.peakList.get(b).checkTypeMatch(a))return this.peakList.get(b);
return null},"JSV.common.PeakInfo");c(b,"getBasePeakInfo",function(){return 0==this.peakList.size()?new JSV.common.PeakInfo:new JSV.common.PeakInfo(' baseModel="" '+this.peakList.get(0))});c(b,"getAxisLabel",function(a){var b=a?this.peakXLabel:this.peakYLabel;null==b&&(b=a?this.xLabel:this.yLabel);null==b&&(b=a?this.xUnits:this.yUnits);return null==b?"":b.equalsIgnoreCase("WAVENUMBERS")?"1/cm":b.equalsIgnoreCase("nanometers")?"nm":b},"~B");c(b,"findXForPeakNearest",function(a){return JSV.common.Coordinate.findXForPeakNearest(this.xyCoords,
a,this.isInverted())},"~N");c(b,"addSpecShift",function(a){if(0!=a&&(this.specShift+=a,JSV.common.Coordinate.shiftX(this.xyCoords,a),null!=this.subSpectra))for(var b=this.subSpectra.size();0<=--b;){var c=this.subSpectra.get(b);c!==this&&c!==this.parent&&c.addSpecShift(a)}return this.specShift},"~N");b.allowSubSpec=c(b,"allowSubSpec",function(a,b){return a.is1D()==b.is1D()&&a.xUnits.equalsIgnoreCase(b.xUnits)&&a.isHNMR()==b.isHNMR()},"JSV.common.Spectrum,JSV.common.Spectrum");b.areXScalesCompatible=
c(b,"areXScalesCompatible",function(a,b,c,f){var e=a.isNMR();if(e!=b.isNMR()||a.isContinuous()!=b.isContinuous()||!f&&!JSV.common.Spectrum.areUnitsCompatible(a.xUnits,b.xUnits))return!1;if(c){if(a.is1D()!=b.is1D())return!1}else if(f){if(!e)return!0}else if(!a.is1D()||!b.is1D())return!1;return!e||b.is1D()&&a.parent.nucleusX.equals(b.parent.nucleusX)},"JSV.common.Spectrum,JSV.common.Spectrum,~B,~B");b.areUnitsCompatible=c(b,"areUnitsCompatible",function(a,b){if(a.equalsIgnoreCase(b))return!0;a=a.toUpperCase();
b=b.toUpperCase();return a.equals("HZ")&&b.equals("PPM")||a.equals("PPM")&&b.equals("HZ")},"~S,~S");b.areLinkableX=c(b,"areLinkableX",function(a,b){return a.isNMR()&&b.isNMR()&&a.nucleusX.equals(b.nucleusX)},"JSV.common.Spectrum,JSV.common.Spectrum");b.areLinkableY=c(b,"areLinkableY",function(a,b){return a.isNMR()&&b.isNMR()&&a.nucleusX.equals(b.nucleusY)},"JSV.common.Spectrum,JSV.common.Spectrum");c(b,"getPeakWidth",function(){return(this.getLastX()-this.getFirstX())/100});c(b,"setSimulated",function(a){this.isSimulation=
!0;var b=this.sourceID;0==b.length&&(b=JU.PT.rep(a,"http://SIMULATION/",""));0<=b.indexOf("MOL=")&&(b="");this.title="SIMULATED "+JU.PT.rep(b,"$","")},"~S");c(b,"setFillColor",function(a){this.fillColor=a;null!=this.convertedSpectrum&&(this.convertedSpectrum.fillColor=a)},"javajs.api.GenericColor");f(b,"toString",function(){return this.getTitleLabel()+(null==this.xyCoords?"":" xyCoords.length="+this.xyCoords.length)});b=G(JSV.common.Spectrum,"IRMode",Enum);b.getMode=c(b,"getMode",function(a){switch((null==
a?"I":a.toUpperCase().charAt(0)).charCodeAt(0)){case 65:return JSV.common.Spectrum.IRMode.TO_ABS;case 84:return a.equalsIgnoreCase("TOGGLE")?JSV.common.Spectrum.IRMode.TOGGLE:JSV.common.Spectrum.IRMode.TO_TRANS;case 78:return JSV.common.Spectrum.IRMode.NO_CONVERT;default:return JSV.common.Spectrum.IRMode.TOGGLE}},"~S");A(b,"NO_CONVERT",0,[]);A(b,"TO_TRANS",1,[]);A(b,"TO_ABS",2,[]);A(b,"TOGGLE",3,[])});m("JSV.common");G(JSV.common,"JSVersion",null);var va=null,wa=null,va=Jmol.___JmolVersion,wa=Jmol.___JmolDate;
null!=wa&&(wa=wa.substring(7,23));JSV.common.JSVersion.VERSION_SHORT=null!=va?va:"(Unknown_version)";var Ya=null!=va?va:"(Unknown_version)";JSV.common.JSVersion.date=null!=wa?wa:"";JSV.common.JSVersion.VERSION=JSV.common.JSVersion.VERSION_SHORT+(null==JSV.common.JSVersion.date?"":" "+JSV.common.JSVersion.date);var oa=-1;if(null!=va)try{var Q=JSV.common.JSVersion.VERSION_SHORT,Ma="",ga=Q.indexOf(".");0>ga&&(oa=1E5*Integer.parseInt(Q),Q=null);if(null!=Q&&(oa=1E5*Integer.parseInt(Ma=Q.substring(0,ga)),
Q=Q.substring(ga+1),ga=Q.indexOf("."),0>ga&&(oa+=1E3*Integer.parseInt(Q),Q=null),null!=Q)){var Za=Q.substring(0,ga),Ya=Ma+="."+Za,oa=oa+1E3*Integer.parseInt(Za),Q=Q.substring(ga+1),ga=Q.indexOf("_");0<=ga&&(Q=Q.substring(0,ga));ga=Q.indexOf(" ");0<=ga&&(Q=Q.substring(0,ga));oa+=Integer.parseInt(Q)}}catch($a){if(!E($a,"NumberFormatException"))throw $a;}JSV.common.JSVersion.majorVersion=Ya;JSV.common.JSVersion.versionInt=oa;m("JSV.common");x(["java.util.Hashtable"],"JSV.common.JSVFileManager","java.io.BufferedInputStream $.BufferedReader $.File $.InputStreamReader $.StringReader java.net.URL JU.AU $.BS $.Encoding $.JSJSONParser $.P3 $.PT $.SB JSV.common.JSVersion $.JSViewer JSV.exception.JSVException JU.Logger".split(" "),
function(){var b=G(JSV.common,"JSVFileManager",null);c(b,"isApplet",function(){return null!=JSV.common.JSVFileManager.appletDocumentBase});b.getFileAsString=c(b,"getFileAsString",function(a){if(null==a)return null;var b,c=new JU.SB;try{b=JSV.common.JSVFileManager.getBufferedReaderFromName(a);for(var f;null!=(f=b.readLine());)c.append(f),c.appendC("\n");b.close()}catch(e){if(E(e,Exception))return null;throw e;}return c.toString()},"~S");b.getBufferedReaderForInputStream=c(b,"getBufferedReaderForInputStream",
function(a){try{return new java.io.BufferedReader(new java.io.InputStreamReader(a,"UTF-8"))}catch(b){if(E(b,Exception))return null;throw b;}},"java.io.InputStream");b.getBufferedReaderForStringOrBytes=c(b,"getBufferedReaderForStringOrBytes",function(a){return null==a?null:new java.io.BufferedReader(new java.io.StringReader("string"==typeof a?a:String.instantialize(a)))},"~O");b.getBufferedReaderFromName=c(b,"getBufferedReaderFromName",function(a){if(null==a)throw new JSV.exception.JSVException("Cannot find "+
a);JU.Logger.info("JSVFileManager getBufferedReaderFromName "+a);var b=JSV.common.JSVFileManager.getFullPathName(a);b.equals(a)||JU.Logger.info("JSVFileManager getBufferedReaderFromName "+b);return JSV.common.JSVFileManager.getUnzippedBufferedReaderFromName(b)},"~S");b.getFullPathName=c(b,"getFullPathName",function(a){try{if(null==JSV.common.JSVFileManager.appletDocumentBase){if(JSV.common.JSVFileManager.isURL(a)){var b=new java.net.URL(ma("java.net.URL"),a,null);return b.toString()}return JSV.common.JSVFileManager.newFile(a).getFullPath()}if(1==
a.indexOf(":\\")||1==a.indexOf(":/"))a="file:///"+a;else if(a.startsWith("cache://"))return a;b=new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,a,null);return b.toString()}catch(c){if(E(c,Exception))throw new JSV.exception.JSVException("Cannot create path for "+a);throw c;}},"~S");b.isURL=c(b,"isURL",function(a){for(var b=JSV.common.JSVFileManager.urlPrefixes.length;0<=--b;)if(a.startsWith(JSV.common.JSVFileManager.urlPrefixes[b]))return!0;return!1},"~S");b.urlTypeIndex=c(b,"urlTypeIndex",
function(a){for(var b=0;b<JSV.common.JSVFileManager.urlPrefixes.length;++b)if(a.startsWith(JSV.common.JSVFileManager.urlPrefixes[b]))return b;return-1},"~S");b.isLocal=c(b,"isLocal",function(a){if(null==a)return!1;a=JSV.common.JSVFileManager.urlTypeIndex(a);return 0>a||4==a},"~S");b.getUnzippedBufferedReaderFromName=c(b,"getUnzippedBufferedReaderFromName",function(a){var b=null;0<=a.indexOf("|")&&(b=JU.PT.split(a,"|"),null!=b&&0<b.length&&(a=b[0]));if(a.startsWith("http://SIMULATION/"))return JSV.common.JSVFileManager.getSimulationReader(a);
try{var c=JSV.common.JSVFileManager.getInputStream(a,!0,null);if(C(c,"JU.SB")||"string"==typeof c)return new java.io.BufferedReader(new java.io.StringReader(c.toString()));if(JSV.common.JSVFileManager.isAB(c))return new java.io.BufferedReader(new java.io.StringReader(String.instantialize(c)));var f=new java.io.BufferedInputStream(c);a=f;JSV.common.JSVFileManager.isGzip(f)&&(a=JSV.common.JSViewer.getInterface("JSV.common.JSVZipUtil").newGZIPInputStream(a));return new java.io.BufferedReader(new java.io.InputStreamReader(a,
"UTF-8"))}catch(e){throw E(e,Exception),e;}},"~S");b.getAbbrSimulationFileName=c(b,"getAbbrSimulationFileName",function(a){var b=JSV.common.JSVFileManager.getSimulationType(a);return JSV.common.JSVFileManager.getAbbreviatedSimulationName(a,b,!0)},"~S");b.getAbbreviatedSimulationName=c(b,"getAbbreviatedSimulationName",function(a,b,c){return 0<=a.indexOf("MOL=")?(c?"http://SIMULATION/":"")+"MOL="+JSV.common.JSVFileManager.getSimulationHash(a,b):a},"~S,~S,~B");b.getSimulationHash=c(b,"getSimulationHash",
function(a,b){var c=b+Math.abs(a.substring(a.indexOf("V2000")+1).hashCode());JU.Logger.debugging&&System.out.println("JSVFileManager hash for "+a+" = "+c);return c},"~S,~S");b.getSimulationFileData=c(b,"getSimulationFileData",function(a,b){return JSV.common.JSVFileManager.cacheGet(a.startsWith("MOL=")?a.substring(4):JSV.common.JSVFileManager.getAbbreviatedSimulationName(a,b,!1))},"~S,~S");b.cachePut=c(b,"cachePut",function(a,b){JU.Logger.debugging&&JU.Logger.debug("JSVFileManager cachePut "+b+" for "+
a);if(null!=b&&(JSV.common.JSVFileManager.htCorrelationCache.put(a,b),null!=JSV.common.JSVFileManager.cacheDir&&0>a.indexOf(":")))try{(new java.io.File(JSV.common.JSVFileManager.cacheDir)).mkdirs();var c=new java.io.File(JSV.common.JSVFileManager.cacheDir,a),f=new java.io.FileOutputStream(c);f.write(b.getBytes());f.close()}catch(e){if(E(e,"java.io.IOException"))e.printStackTrace();else throw e;}},"~S,~S");b.cacheGet=c(b,"cacheGet",function(a){var b=JSV.common.JSVFileManager.htCorrelationCache.get(a);
JU.Logger.debugging&&JU.Logger.info("JSVFileManager cacheGet "+b+" for "+a);return b},"~S");b.getSimulationReader=c(b,"getSimulationReader",function(a){var b=JSV.common.JSVFileManager.cacheGet(a);null==b&&JSV.common.JSVFileManager.cachePut(a,b=JSV.common.JSVFileManager.getNMRSimulationJCampDX(a.substring(18)));return JSV.common.JSVFileManager.getBufferedReaderForStringOrBytes(b)},"~S");b.isAB=c(b,"isAB",function(a){return JU.AU.isAB(a)},"~O");b.isZipFile=c(b,"isZipFile",function(a){try{var b=O(4,
0);a.mark(5);var c=a.read(b,0,4);a.reset();return 4==c&&80==b[0]&&75==b[1]&&3==b[2]&&4==b[3]}catch(f){if(E(f,Exception))throw new JSV.exception.JSVException(f.toString());throw f;}},"java.io.InputStream");b.isGzip=c(b,"isGzip",function(a){try{var b=O(4,0);a.mark(5);var c=a.read(b,0,4);a.reset();return 4==c&&31==b[0]&&139==b[1]}catch(f){if(E(f,Exception))throw new JSV.exception.JSVException(f.toString());throw f;}},"java.io.InputStream");b.getStreamAsBytes=c(b,"getStreamAsBytes",function(a,b){try{for(var c=
O(1024,0),f=null==b?O(4096,0):null,e=0,g=0;0<(e=a.read(c,0,1024));)g+=e,null==b?(g>=f.length&&(f=JU.AU.ensureLengthByte(f,2*g)),System.arraycopy(c,0,f,g-e,e)):b.write(c,0,e);a.close();return null==b?JU.AU.arrayCopyByte(f,g):g+" bytes"}catch(j){if(E(j,Exception))throw new JSV.exception.JSVException(j.toString());throw j;}},"java.io.BufferedInputStream,JU.OC");b.postByteArray=c(b,"postByteArray",function(a,b){var c=null;try{c=JSV.common.JSVFileManager.getInputStream(a,!1,b)}catch(f){if(E(f,Exception))c=
f.toString();else throw f;}if("string"==typeof c)return c;try{c=JSV.common.JSVFileManager.getStreamAsBytes(c,null)}catch(e){if(E(e,"JSV.exception.JSVException"))try{c.close()}catch(g){if(!E(g,Exception))throw g;}else throw e;}return null==c?"":JSV.common.JSVFileManager.fixUTF(c)},"~S,~A");b.getUTFEncoding=c(b,"getUTFEncoding",function(a){return 3<=a.length&&239==a[0]&&187==a[1]&&191==a[2]?JU.Encoding.UTF8:4<=a.length&&0==a[0]&&0==a[1]&&254==a[2]&&255==a[3]?JU.Encoding.UTF_32BE:4<=a.length&&255==a[0]&&
254==a[1]&&0==a[2]&&0==a[3]?JU.Encoding.UTF_32LE:2<=a.length&&255==a[0]&&254==a[1]?JU.Encoding.UTF_16LE:2<=a.length&&254==a[0]&&255==a[1]?JU.Encoding.UTF_16BE:JU.Encoding.NONE},"~A");b.fixUTF=c(b,"fixUTF",function(a){var b=JSV.common.JSVFileManager.getUTFEncoding(a);if(b!==JU.Encoding.NONE)try{var c=String.instantialize(a,b.name().$replace("_","-"));switch(b){case JU.Encoding.UTF8:case JU.Encoding.UTF_16BE:case JU.Encoding.UTF_16LE:c=c.substring(1)}return c}catch(f){if(E(f,"java.io.IOException"))JU.Logger.error("fixUTF error "+
f);else throw f;}return String.instantialize(a)},"~A");b.getInputStream=c(b,"getInputStream",function(a,b,c){var f=JSV.common.JSVFileManager.isURL(a),e=null!=JSV.common.JSVFileManager.appletDocumentBase,g=null,g=null,j;if(f&&0<=(j=a.indexOf("?POST?")))g=a.substring(j+6),a=a.substring(0,j);if(e||f){var k;try{k=new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,a,null)}catch(l){if(E(l,Exception))throw new JSV.exception.JSVException("Cannot read "+a);throw l;}JU.Logger.info("JSVFileManager opening URL "+
k+(null==g?"":" with POST of "+g.length+" bytes"));g=JSV.common.JSVFileManager.viewer.apiPlatform.getURLContents(k,c,g,!1)}else b&&JU.Logger.info("JSVFileManager opening file "+a),g=JSV.common.JSVFileManager.viewer.apiPlatform.getBufferedFileInputStream(a);if("string"==typeof g)throw new JSV.exception.JSVException("\n"+g);return g},"~S,~B,~A");b.getNMRSimulationJCampDX=c(b,"getNMRSimulationJCampDX",function(a){var b=0,b=null,c=JSV.common.JSVFileManager.getSimulationType(a);a.startsWith(c)&&(a=a.substring(c.length+
1));var f=a.startsWith("MOL=");f&&(a=a.substring(4),b=a.indexOf("/n__Jmol"),0<b&&(a=a.substring(0,b)+JU.PT.rep(a.substring(b),"/n","\n")),b=a=JU.PT.rep(a,"\\n","\n"));var e=""+JSV.common.JSVFileManager.getSimulationHash(a,c);JU.Logger.debugging&&JU.Logger.info("JSVFileManager type="+c+" key="+e+" name="+a);var g=JSV.common.JSVFileManager.cacheGet(e);if(null!=g)return g;g=f?null:JU.PT.rep(JSV.common.JSVFileManager.nciResolver,"%FILE",JU.PT.escapeUrl(a));if(!f&&null==(b=JSV.common.JSVFileManager.getFileAsString(g))||
0<=b.indexOf("<html"))return JU.Logger.error("no MOL data returned by NCI"),null;var j=c.equals("C13"),k;k=j?JSV.common.JSVFileManager.nmrdbServerC13:JSV.common.JSVFileManager.nmrdbServerH1;k=k.$replace("$MOLFILE",b);JSV.common.JSVFileManager.cachePut("url",k);var l=JSV.common.JSVFileManager.getFileAsString(k);if(0<=(null==l?l="Error: Error fetching simulation":l).indexOf("Error:"))return l;var m=(new JU.JSJSONParser).parseMap(l,!0);JSV.common.JSVFileManager.cachePut("json",l);return JSV.common.JSVFileManager.processJSON(e,
g,k,a,c,b,m,j,f)},"~S");b.processJSON=c(b,"processJSON",function(a,b,c,f,e,g,j,k,l){var m=j.get("data");j=m.get("molfile");null==j&&(System.out.println("JSVFileManager: no MOL file returned from EPFL"),j=g);var n=JSV.common.JSVFileManager.getAtomMap(j,g);JSV.common.JSVFileManager.cachePut("mol",g);(j=l||!JSV.common.JSViewer.isJS?null:g.getBytes())&&Jmol.Cache.put("http://SIMULATION/"+e+"/"+f+"#molfile",j);c="<Signals src="+JU.PT.esc(c.substring(0,c.indexOf("?")))+">\n";e=k?"13C":"1HNMR";j=m.get("jcamp");
j=JSV.common.JSVFileManager.hackNewNmriumSimulationJCAMP(j);for(var m=m.get("signals"),q=JSV.common.JSVFileManager.getval(j,"##$BF1"),q=null==q?k?100:400:Float.parseFloat(q),r=new JU.SB,s=m.size();0<=--s;){var u=m.get(s);r.append("<Signal ");JSV.common.JSVFileManager.setAttr(r,"type",e,null);var w=u.get("atoms").get(0);null==n?JSV.common.JSVFileManager.setAttr(r,"atoms",w,null):r.append('atoms="').appendI(n[w.intValue()]).append('" ');JSV.common.JSVFileManager.setAttr(r,"multiplicity","multiplicity",
u);w=u.get("delta");w=JSV.common.JSVFileManager.getSignalMinMax(u,w.floatValue(),q,k);JSV.common.JSVFileManager.setAttr(r,"xMin",""+w[0],null);JSV.common.JSVFileManager.setAttr(r,"xMax",""+w[1],null);JSV.common.JSVFileManager.setAttr(r,"integral","nbAtoms",u);r.append("></Signal>\n")}r.append("</Signals>");c+=r.toString();JU.Logger.debugging&&JU.Logger.info(c);JSV.common.JSVFileManager.cachePut("xml",c);j="##TITLE="+(l?"JMOL SIMULATION/"+e:f)+"\n"+j.substring(j.indexOf("\n##")+1);k=g.indexOf("\n");
k=g.indexOf("\n",k+1);0<k&&k==g.indexOf("\n \n")&&(g=g.substring(0,k+1)+"Created "+JSV.common.JSVFileManager.viewer.apiPlatform.getDateFormat("8824")+" by JSpecView "+JSV.common.JSVersion.VERSION+g.substring(k+1));k=j.indexOf("##.");f=JSV.common.JSVFileManager.getAbbreviatedSimulationName(f,e,!1);n=f.indexOf("id='");l&&0<n&&(f=f.substring(n+4,(f+"'").indexOf("'",n+4)));JSV.common.JSVFileManager.cachePut(e+"-json.jcamp",j);j=j.substring(0,k)+"##$MODELS=\n<Models>\n<ModelData id="+JU.PT.esc(f)+' type="MOL" src='+
JU.PT.esc(b)+">\n"+g+"</ModelData>\n</Models>\n##$SIGNALS=\n"+c+"\n"+j.substring(k);JSV.common.JSVFileManager.cachePut("jcamp",j);JSV.common.JSVFileManager.cachePut(a,j);return j},"~S,~S,~S,~S,~S,~S,java.util.Map,~B,~B");b.getSignalMinMax=c(b,"getSignalMinMax",function(a,b,c,f){var e=M(2,0);if(f)e[0]=b-0.5,e[1]=b+0.5;else{a=a.get("js");f=1;for(var g=a.size();0<=--g;){var j=a.get(g),k=j.get("coupling").floatValue();switch(j.get("multiplicity")){case "d":f+=k/2;break;default:case "t":f+=k}}e[0]=b-f/
c;e[1]=b+f/c}return e},"java.util.Map,~N,~N,~B");b.hackNewNmriumSimulationJCAMP=c(b,"hackNewNmriumSimulationJCAMP",function(a){var b=JSV.common.JSVFileManager.getline(a,"##.SHIFT REFERENCE=INTERNAL"),c=JSV.common.JSVFileManager.getval(a,"##$OFFSET");null!=b&&null!=c&&(b=b.substring(0,b.lastIndexOf(", ")+2)+c,a=JSV.common.JSVFileManager.setline(a,"##$OFFSET",null),a=JSV.common.JSVFileManager.setline(a,"##.SHIFT REFERENCE=INTERNAL",b));return a},"~S");b.getline=c(b,"getline",function(a,b){var c=a.indexOf(b);
return 0>c?null:a.substring(c,a.indexOf("\n",c))},"~S,~S");b.getval=c(b,"getval",function(a,b){var c=a.indexOf(b);if(0>c)return null;var f=a.substring(a.indexOf("=",c)+1,a.indexOf("\n",c)),c=f.indexOf("$$");0<=c&&(f=f.substring(c));return f.trim()},"~S,~S");b.setline=c(b,"setline",function(a,b,c){b=a.indexOf(b);return 0>b?a:null==c?a.substring(0,b)+a.substring(a.indexOf("\n",b)+1):a.substring(0,b)+c+a.substring(a.indexOf("\n",b))},"~S,~S,~S");b.getAtomMap=c(b,"getAtomMap",function(a,b){var c=JSV.common.JSVFileManager.getCoord(a),
f=JSV.common.JSVFileManager.getCoord(b),e=c.length;if(e!=f.length)return null;var g=D(e,0),j=new JU.BS;j.setBits(0,e);for(var k=!1,l=0;l<e;l++)for(var m=c[l],n=j.nextSetBit(0);0<=n;n=j.nextSetBit(n+1))if(0.1>m.distanceSquared(f[n])){j.clear(n);g[l]=n;l!=n&&(k=!0);break}return k?g:null},"~S,~S");b.getCoord=c(b,"getCoord",function(a){a=JU.PT.split(a,"\n");for(var b=M(3,0),c=Integer.parseInt(a[3].substring(0,3).trim()),f=Array(c),e=0;e<c;e++)JU.PT.parseFloatArrayInfested(JU.PT.getTokens(a[4+e].substring(0,
31)),b),f[e]=JU.P3.new3(b[0],b[1],b[2]);return f},"~S");b.setAttr=c(b,"setAttr",function(a,b,c,f){a.append(b+'="').appendO(null==f?c:f.get(c)).append('" ')},"JU.SB,~S,~O,java.util.Map");b.getResource=c(b,"getResource",function(a,b,c){var f=null;try{if(null==(f=a.getClass().getResource(b)))c[0]="Couldn't find file: "+b}catch(e){if(E(e,Exception))c[0]="Exception "+e+" in getResource "+b;else throw e;}return f},"~O,~S,~A");b.getResourceString=c(b,"getResourceString",function(a,b,c){a=JSV.common.JSVFileManager.getResource(a,
b,c);if(null==a)return c[0]="Error loading resource "+b,null;if("string"==typeof a)return JSV.common.JSVFileManager.getFileAsString(a);b=new JU.SB;try{for(var f=new java.io.BufferedReader(new java.io.InputStreamReader(a.getContent(),"UTF-8")),e;null!=(e=f.readLine());)b.append(e).append("\n");f.close()}catch(g){if(E(g,Exception))c[0]=g.toString();else throw g;}return b.toString()},"~O,~S,~A");b.getJmolFilePath=c(b,"getJmolFilePath",function(a){try{a=JSV.common.JSVFileManager.getFullPathName(a)}catch(b){if(E(b,
"JSV.exception.JSVException"))return null;throw b;}return null==JSV.common.JSVFileManager.appletDocumentBase?a.$replace("\\","/"):a},"~S");b.getTagName=c(b,"getTagName",function(a){if(null==a)return"String"+ ++JSV.common.JSVFileManager.stringCount;if(JSV.common.JSVFileManager.isURL(a))try{if(a.startsWith("http://SIMULATION/"))return JSV.common.JSVFileManager.getAbbrSimulationFileName(a);var b=(new java.net.URL(ma("java.net.URL"),a,null)).getFile();return b.substring(b.lastIndexOf("/")+1)}catch(c){if(E(c,
"java.io.IOException"))return null;throw c;}return JSV.common.JSVFileManager.newFile(a).getName()},"~S");b.newFile=c(b,"newFile",function(a){return JSV.common.JSVFileManager.viewer.apiPlatform.newFile(a)},"~S");b.setDocumentBase=c(b,"setDocumentBase",function(a,b){JSV.common.JSVFileManager.viewer=a;JSV.common.JSVFileManager.appletDocumentBase=b},"JSV.common.JSViewer,java.net.URL");b.getSimulationType=c(b,"getSimulationType",function(a){return 0<=a.indexOf("C13/")?"C13":"H1"},"~S");b.appletDocumentBase=
null;b.viewer=null;b.jsDocumentBase="";b.urlPrefixes=z(-1,["http:","https:","ftp:","http://SIMULATION/","file:"]);b.htCorrelationCache=new java.util.Hashtable;b.cacheDir=null;b.nciResolver="https://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf&get3d=True";b.nmrdbServerH1='https://nmr-prediction.service.zakodium.com/v1/predict/proton?POST?{"molfile":"$MOLFILE","includeJDX":true}';b.nmrdbServerC13='https://nmr-prediction.service.zakodium.com/v1/predict/carbon?POST?{"molfile":"$MOLFILE","includeJDX":true}';
b.stringCount=0});m("JSV.common");x(["javajs.api.BytePoster","J.api.PlatformViewer","JSV.common.Spectrum"],"JSV.common.JSViewer","java.io.File java.net.URL java.util.Arrays $.Hashtable JU.CU $.Lst $.OC $.PT $.SB JSV.common.Annotation $.ExportType $.JSVFileManager $.PanelData $.PanelNode $.Parameters $.PeakInfo $.PrintLayout $.RepaintManager $.ScriptToken $.ScriptTokenizer $.SyncManager JSV.source.JDXReader $.JDXSource JSV.tree.SimpleTree JU.Logger".split(" "),function(){var b=s(function(){this.irMode=
this.overlayLegendDialog=this.viewDialog=this.dialogManager=this.jsvpPopupMenu=this.fileHelper=this.scriptQueue=this.properties=this.mainPanel=this.selectedPanel=this.repaintManager=this.parameters=this.panelNodes=this.currentSource=this.spectraTree=this.g2d=this.si=this.parentFrame=null;this.autoShowLegend=this.autoIntegrate=this.interfaceOverlaid=this.loadImaginary=this.isEmbedded=!1;this.obscureTitleFromUser=null;this.allowMenu=!0;this.initialEndIndex=this.initialStartIndex=-1;this.isSigned=this.isApplet=
this.isSingleThreaded=!1;this.recentScript="";this.display=this.html5Applet=this.syncID=this.fullName=this.appletName=null;this.maximumSize=2147483647;this.scriptLevelCount=this.nViews=this.fileCount=this.screenWidth=this.screenHeight=0;this.apiPlatform=this.integrationRatios=null;this.hasDisplay=!1;this.peakInfoModelSentToJmol=null;this.popupZoomEnabled=this.popupAllowMenu=!0;this.defaultLoadScript=null;this.nmrMaxY=NaN;this.recentStackPercent=5;this.lastPrintLayout=null;this.recentOpenURL="http://";
this.recentURL=null;this.recentSimulation="tylenol";r(this,arguments)},JSV.common,"JSViewer",null,[J.api.PlatformViewer,javajs.api.BytePoster]);N(b,function(){this.irMode=JSV.common.Spectrum.IRMode.NO_CONVERT});u(b,function(a,b,c,f){this.si=a;this.isApplet=b;this.hasDisplay=f;JSV.common.JSViewer.isJS=b&&c;c=null;self.Jmol&&(c=Jmol);JSV.common.JSViewer.jsmolObject=c;this.isSigned=a.isSigned();this.apiPlatform=this.getPlatformInterface("Platform");this.apiPlatform.setViewer(this,this.display);this.g2d=
this.getPlatformInterface("G2D");this.spectraTree=new JSV.tree.SimpleTree(this);this.parameters=this.getPlatformInterface("Parameters");this.parameters.setName("applet");this.fileHelper=this.getPlatformInterface("FileHelper").set(this);this.isSingleThreaded=this.apiPlatform.isSingleThreaded();this.panelNodes=new JU.Lst;this.repaintManager=new JSV.common.RepaintManager(this);b||this.setPopupMenu(!0,!0)},"JSV.api.ScriptInterface,~B,~B,~B");c(b,"setParentFrame",function(a){this.parentFrame=a},"javax.swing.JFrame");
c(b,"setProperty",function(a,b){null!=this.properties&&this.properties.setProperty(a,b)},"~S,~S");c(b,"setNode",function(a){a.jsvp!==this.selectedPanel&&this.si.siSetSelectedPanel(a.jsvp);this.si.siSendPanelChange();this.si.siNodeSet(a)},"JSV.common.PanelNode");c(b,"setPopupMenu",function(a,b){this.popupAllowMenu=a;this.popupZoomEnabled=b},"~B,~B");c(b,"showMenu",function(a,b){if(this.popupAllowMenu){if(null==this.jsvpPopupMenu)try{this.jsvpPopupMenu=this.getPlatformInterface("Popup"),this.jsvpPopupMenu.jpiInitialize(this,
this.isApplet?"appletMenu":"appMenu"),this.jsvpPopupMenu.setEnabled(this.popupAllowMenu,this.popupZoomEnabled)}catch(c){if(E(c,Exception)){JU.Logger.error(c+" initializing popup menu");return}throw c;}this.jsvpPopupMenu.jpiShow(a,b)}},"~N,~N");c(b,"runScriptNow",function(a){System.out.println(this.checkScript(a));var b=a.indexOf("JSpecView:");0<=b&&(a=a.substring(b+10));this.scriptLevelCount++;null==a&&(a="");a=a.trim();if(a.startsWith("!"))a=a.substring(1).trim();else if(a.startsWith(">"))return JU.Logger.error(a),
!0;if(0<=a.indexOf("<PeakData"))return this.syncScript(a),!0;JU.Logger.info("RUNSCRIPT "+a);var b=!0,c=10;a=new JSV.common.ScriptTokenizer(a,!0);for(var f=null;null!=a&&a.hasMoreTokens()&&0<c&&b;){var e=a.nextToken(),g=new JSV.common.ScriptTokenizer(e,!1),j=JSV.common.ScriptToken.getKey(g);if(null!=j){var k=JSV.common.ScriptToken.getScriptToken(j),g=JSV.common.ScriptToken.getValue(k,g,e);try{switch(k){case JSV.common.ScriptToken.UNKNOWN:JU.Logger.info("Unrecognized parameter: "+j);--c;break;default:if(null==
this.selectedPanel)break;this.parameters.set(this.pd(),k,g);this.si.siUpdateBoolean(k,JSV.common.Parameters.isTrue(g));break;case JSV.common.ScriptToken.PEAKCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.SYNCCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.COORDCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.LOADFILECALLBACKFUNCTIONNAME:this.si.siExecSetCallback(k,g);break;case JSV.common.ScriptToken.DEFAULTLOADSCRIPT:g=JU.PT.rep(g,"''",'"');this.defaultLoadScript=0<g.length?g:null;break;case JSV.common.ScriptToken.DEFAULTNMRNORMALIZATION:this.nmrMaxY=
JU.PT.parseFloat(g);break;case JSV.common.ScriptToken.AUTOINTEGRATE:this.autoIntegrate=JSV.common.Parameters.isTrue(g);break;case JSV.common.ScriptToken.CLOSE:this.execClose(g);break;case JSV.common.ScriptToken.DEBUG:JU.Logger.setLogLevel(g.toLowerCase().equals("high")?6:JSV.common.Parameters.isTrue(g)?5:4);break;case JSV.common.ScriptToken.GETPROPERTY:var l=null==this.selectedPanel?null:this.getPropertyAsJavaObject(g);null!=l&&this.selectedPanel.showMessage(JU.PT.toJSON(null,l),g);break;case JSV.common.ScriptToken.HELP:this.execHelp(g);
break;case JSV.common.ScriptToken.HIDDEN:this.si.siExecHidden(JSV.common.Parameters.isTrue(g));break;case JSV.common.ScriptToken.INTEGRATIONRATIOS:this.integrationRatios=g;this.execIntegrate(null);break;case JSV.common.ScriptToken.INTERFACE:this.interfaceOverlaid=this.checkOvelayInterface(g);break;case JSV.common.ScriptToken.INTEGRALOFFSET:case JSV.common.ScriptToken.INTEGRALRANGE:this.execSetIntegralParameter(k,Double.parseDouble(g));break;case JSV.common.ScriptToken.INVERTY:this.execZoom("invertY");
break;case JSV.common.ScriptToken.JMOL:this.syncToJmol(g);break;case JSV.common.ScriptToken.JSV:this.syncScript(JU.PT.trimQuotes(g));break;case JSV.common.ScriptToken.LOAD:if(0==g.length){null!=this.defaultLoadScript&&this.runScriptNow(this.defaultLoadScript);break}this.execLoad(g,(null==this.defaultLoadScript?"":this.defaultLoadScript+";")+a.getRemainingScript());f=null==this.selectedPanel?null:this.si.siLoaded(g);a=null;break;case JSV.common.ScriptToken.LOADIMAGINARY:this.loadImaginary=JSV.common.Parameters.isTrue(g);
break;case JSV.common.ScriptToken.PEAK:this.execPeak(g);break;case JSV.common.ScriptToken.PEAKLIST:this.execPeakList(g);break;case JSV.common.ScriptToken.SCALEBY:this.scaleSelectedBy(this.panelNodes,g);break;case JSV.common.ScriptToken.SCRIPT:if(g.equals("")||g.toLowerCase().startsWith("inline"))this.execScriptInline(g);else{var m=JSV.common.JSVFileManager.getFileAsString(g);null!=m&&100>this.scriptLevelCount&&this.runScriptNow(m)}break;case JSV.common.ScriptToken.SELECT:this.execSelect(g);break;
case JSV.common.ScriptToken.SPECTRUM:case JSV.common.ScriptToken.SPECTRUMNUMBER:this.setSpectrum(g)||(b=!1);break;case JSV.common.ScriptToken.STACKOFFSETY:this.execOverlayOffsetY(JU.PT.parseInt(""+JU.PT.parseFloat(g)));break;case JSV.common.ScriptToken.TEST:this.si.siExecTest(g);break;case JSV.common.ScriptToken.OVERLAY:case JSV.common.ScriptToken.VIEW:this.execView(g,!0);break;case JSV.common.ScriptToken.HIGHLIGHT:b=this.highlight(e);break;case JSV.common.ScriptToken.FINDX:case JSV.common.ScriptToken.GETSOLUTIONCOLOR:case JSV.common.ScriptToken.INTEGRATION:case JSV.common.ScriptToken.INTEGRATE:case JSV.common.ScriptToken.IRMODE:case JSV.common.ScriptToken.LABEL:case JSV.common.ScriptToken.LINK:case JSV.common.ScriptToken.OVERLAYSTACKED:case JSV.common.ScriptToken.PRINT:case JSV.common.ScriptToken.SETPEAK:case JSV.common.ScriptToken.SETX:case JSV.common.ScriptToken.SHIFTX:case JSV.common.ScriptToken.SHOWERRORS:case JSV.common.ScriptToken.SHOWMEASUREMENTS:case JSV.common.ScriptToken.SHOWMENU:case JSV.common.ScriptToken.SHOWPEAKLIST:case JSV.common.ScriptToken.SHOWINTEGRATION:case JSV.common.ScriptToken.SHOWPROPERTIES:case JSV.common.ScriptToken.SHOWSOURCE:case JSV.common.ScriptToken.YSCALE:case JSV.common.ScriptToken.WRITE:case JSV.common.ScriptToken.ZOOM:if(this.isClosed()){b=
!1;break}switch(k){case JSV.common.ScriptToken.FINDX:this.pd().findX(null,Double.parseDouble(g));break;case JSV.common.ScriptToken.GETSOLUTIONCOLOR:this.show("solutioncolor"+g.toLowerCase());break;case JSV.common.ScriptToken.INTEGRATION:case JSV.common.ScriptToken.INTEGRATE:this.execIntegrate(g);break;case JSV.common.ScriptToken.IRMODE:this.execIRMode(g);break;case JSV.common.ScriptToken.LABEL:this.pd().addAnnotation(JSV.common.ScriptToken.getTokens(g));break;case JSV.common.ScriptToken.LINK:this.pd().linkSpectra(JSV.common.PanelData.LinkMode.getMode(g));
break;case JSV.common.ScriptToken.OVERLAYSTACKED:this.pd().splitStack(!JSV.common.Parameters.isTrue(g));break;case JSV.common.ScriptToken.PRINT:f=this.execWrite(null);break;case JSV.common.ScriptToken.SETPEAK:case JSV.common.ScriptToken.SETX:case JSV.common.ScriptToken.SHIFTX:this.execShiftSpectrum(k,e);break;case JSV.common.ScriptToken.SHOWERRORS:this.show("errors");break;case JSV.common.ScriptToken.SHOWINTEGRATION:this.pd().showAnnotation(JSV.common.Annotation.AType.Integration,JSV.common.Parameters.getTFToggle(g));
break;case JSV.common.ScriptToken.SHOWMEASUREMENTS:this.pd().showAnnotation(JSV.common.Annotation.AType.Measurements,JSV.common.Parameters.getTFToggle(g));break;case JSV.common.ScriptToken.SHOWMENU:this.showMenu(-2147483648,0);break;case JSV.common.ScriptToken.SHOWPEAKLIST:this.pd().showAnnotation(JSV.common.Annotation.AType.PeakList,JSV.common.Parameters.getTFToggle(g));break;case JSV.common.ScriptToken.SHOWPROPERTIES:this.show("properties");break;case JSV.common.ScriptToken.SHOWSOURCE:this.show("source");
break;case JSV.common.ScriptToken.YSCALE:this.setYScale(g);break;case JSV.common.ScriptToken.WINDOW:this.si.siNewWindow(JSV.common.Parameters.isTrue(g),!1);break;case JSV.common.ScriptToken.WRITE:f=this.execWrite(g);break;case JSV.common.ScriptToken.ZOOM:b=this.execZoom(g)}}}catch(n){if(E(n,Exception))f=n.toString(),JU.Logger.error(n.toString()),b=!1,--c;else throw n;}}}this.scriptLevelCount--;this.si.siExecScriptComplete(f,!0);return b},"~S");c(b,"execShiftSpectrum",function(a,b){var c=JSV.common.ScriptToken.getTokens(b),
f=NaN,e=NaN;switch(c.size()){case 2:e=c.get(1);e.equals("")&&(e="?");e=e.equalsIgnoreCase("NONE")?1.7976931348623157E308:e.equalsIgnoreCase("?")?NaN:Double.parseDouble(e);break;case 3:f=Double.parseDouble(c.get(1));e=Double.parseDouble(c.get(2));break;default:Double.parseDouble("")}c=0;switch(a){case JSV.common.ScriptToken.SETPEAK:c=1;break;case JSV.common.ScriptToken.SETX:c=2;break;case JSV.common.ScriptToken.SHIFTX:c=3;Double.isNaN(e)&&Double.parseDouble("");break;default:return}this.pd().shiftSpectrum(c,
f,e)},"JSV.common.ScriptToken,~S");c(b,"execClose",function(a){var b=!a.startsWith("!");b||(a=a.substring(1));this.close(JU.PT.trimQuotes(a));(!b||0==this.panelNodes.size())&&this.si.siValidateAndRepaint(!0)},"~S");c(b,"checkOvelayInterface",function(a){return a.equalsIgnoreCase("single")||a.equalsIgnoreCase("overlay")},"~S");c(b,"execPeak",function(a){try{var b=JSV.common.ScriptToken.getTokens(JU.PT.rep(a,"#","INDEX="));a=' type="'+b.get(0).toUpperCase()+'" _match="'+JU.PT.trimQuotes(b.get(1).toUpperCase())+
'"';2<b.size()&&b.get(2).equalsIgnoreCase("all")&&(a+=' title="ALL"');this.processPeakPickEvent(new JSV.common.PeakInfo(a),!1)}catch(c){if(!E(c,Exception))throw c;}},"~S");c(b,"execPeakList",function(a){var b=this.parameters,c=JSV.common.Parameters.getTFToggle(a);if(0>a.indexOf("="))this.isClosed()||this.pd().getPeakListing(null,c);else{var c=JSV.common.ScriptToken.getTokens(a),f=b.peakListThreshold,e=b.peakListInterpolation;try{for(var g=c.size();0<=--g;){var j=c.get(g),k=j.indexOf("=");if(!(0>=
k)){var l=j.substring(0,k);a=j.substring(k+1);l.startsWith("thr")?f=Double.$valueOf(a).doubleValue():l.startsWith("int")&&(e=a.equalsIgnoreCase("none")?"NONE":"parabolic")}}b.peakListThreshold=f;b.peakListInterpolation=e;this.isClosed()||this.pd().getPeakListing(b,Boolean.TRUE)}catch(m){if(!E(m,Exception))throw m;}}},"~S");c(b,"highlight",function(a){var b=JSV.common.ScriptToken.getTokens(a),c=b.size();switch(c){case 3:case 5:case 6:case 7:break;case 2:case 4:if(b.get(c-1).equalsIgnoreCase("OFF"))break;
default:return!1}if(!this.isClosed()){a=JU.PT.parseFloat(1<c?b.get(1):"");var f=JU.PT.parseFloat(2<c?b.get(2):""),e=this.getRGB(3<c?b.get(3):"100"),g=this.getRGB(4<c?b.get(4):"100"),j=this.getRGB(5<c?b.get(5):"100"),b=this.getRGB(6<c?b.get(6):"100");Float.isNaN(a)||Float.isNaN(f)?this.pd().removeAllHighlights():(this.pd().removeHighlight(a,f),0>b&&(b=150),0<=e&&(0<=g&&0<=j)&&this.pd().addHighlight(null,a,f,null,e,g,j,b));this.repaint(!0)}return!0},"~S");c(b,"getRGB",function(a){a=JU.PT.parseFloat(a);
return F(Float.isNaN(a)?-1:1<a?a:255*a)},"~S");c(b,"execZoom",function(a){var b=0,c=0,f=0,e=0;a=JU.PT.rep(a," - "," ").$replace(","," ");a=JSV.common.ScriptToken.getTokens(a);switch(a.size()){default:return!1;case 0:return b=this.pd().getCurrentGraphSet().getCurrentView(),a=Math.round(100*b.minXOnScale)/100+","+Math.round(100*b.maxXOnScale)/100,a=this.selectedPanel.getInput("Enter zoom range x1 x2","Zoom",a),null==a||this.execZoom(a);case 1:return a=a.get(0),a.equalsIgnoreCase("next")?this.pd().nextView():
a.toLowerCase().startsWith("prev")?this.pd().previousView():a.equalsIgnoreCase("out")?this.pd().resetView():a.equalsIgnoreCase("clear")?this.pd().clearAllView():a.equalsIgnoreCase("invertY")&&this.pd().getCurrentGraphSet().invertYAxis(),!0;case 2:b=Double.parseDouble(a.get(0));c=Double.parseDouble(a.get(1));break;case 3:var g=a.get(0);g.equalsIgnoreCase("X")?(b=Double.parseDouble(a.get(1)),c=Double.parseDouble(a.get(2))):g.equalsIgnoreCase("Y")&&(f=Double.parseDouble(a.get(1)),e=Double.parseDouble(a.get(2)));
break;case 4:b=Double.parseDouble(a.get(0)),f=Double.parseDouble(a.get(1)),c=Double.parseDouble(a.get(2)),e=Double.parseDouble(a.get(3))}this.pd().setZoom(b,f,c,e);return!0},"~S");c(b,"scaleSelectedBy",function(a,b){try{for(var c=Double.parseDouble(b),f=a.size();0<=--f;)a.get(f).pd().scaleSelectedBy(c)}catch(e){if(!E(e,Exception))throw e;}},"JU.Lst,~S");c(b,"pd",function(){return null==this.selectedPanel?null:this.selectedPanel.getPanelData()});c(b,"isClosed",function(){return null==this.pd()});c(b,
"execSelect",function(a){if(a.startsWith("ID ")){if(!this.isClosed())try{this.pd().selectSpectrum(null,"ID",JU.PT.trimQuotes(a.substring(3)),!0)}catch(b){if(!E(b,Exception))throw b;}}else{var c=a.equalsIgnoreCase("first"),f=a.equalsIgnoreCase("last");if(c||f)a=this.selectedPanel.getPanelData(),f=a.graphSets,null==f||0==f.size()||(c=f.get(c?0:f.size()-1),a.setCurrentGraphSet(c,-1));else{c=this.panelNodes;for(f=c.size();0<=--f;)c.get(f).pd().selectFromEntireSet(-2147483648);c=new JU.Lst;this.fillSpecList(a,
c,!1)}}},"~S");c(b,"execView",function(a,b){if(a.equals(""))this.checkOverlay();else{var c=new JU.Lst,f=this.fillSpecList(a,c,!0);0<c.size()&&this.si.siOpenDataOrFile(null,f,c,f,-1,-1,!1,null,null);b||this.si.siValidateAndRepaint(!1)}},"~S,~B");c(b,"execIRMode",function(a){for(var b=JSV.common.Spectrum.IRMode.getMode(a),c=this.pd().getSpectrum().dataType,f=this.panelNodes.size();0<=--f;)this.panelNodes.get(f).pd().setIRMode(b,c);this.setIRmode(a)},"~S");c(b,"execIntegrate",function(a){this.isClosed()||
(this.pd().checkIntegral(this.parameters,a),null!=this.integrationRatios&&this.pd().setIntegrationRatios(this.integrationRatios),this.integrationRatios=null,this.repaint(!0))},"~S");c(b,"repaint",function(a){this.selectedPanel.doRepaint(a)},"~B");c(b,"execSetIntegralParameter",function(a,b){var c=this.parameters;switch(a){case JSV.common.ScriptToken.INTEGRALRANGE:c.integralRange=b;break;case JSV.common.ScriptToken.INTEGRALOFFSET:c.integralOffset=b}this.isClosed()||this.pd().checkIntegral(this.parameters,
"update")},"JSV.common.ScriptToken,~N");c(b,"setYScale",function(a){var b=JSV.common.ScriptToken.getTokens(a),c=0,f=!1;1<b.size()&&b.get(0).equalsIgnoreCase("ALL")&&(f=!0,c++);a=Double.parseDouble(b.get(c++));b=Double.parseDouble(b.get(c));if(f){f=this.pd().getSpectrum();for(c=this.panelNodes.size();0<=--c;){var e=this.panelNodes.get(c);e.source===this.currentSource&&JSV.common.Spectrum.areXScalesCompatible(f,e.getSpectrum(),!1,!1)&&e.pd().setZoom(0,a,0,b)}}else this.pd().setZoom(0,a,0,b)},"~S");
c(b,"newStructToJmol",function(a){JU.Logger.info("sending new structure to Jmol:\n"+a);this.syncToJmol("struct:"+a)},"~S");c(b,"sendPanelChange",function(){var a=this.pd(),b=a.getSpectrum(),c=b.getSelectedPeak();null==c&&(c=b.getModelPeakInfoForAutoSelectOnLoad());null==c&&(c=b.getBasePeakInfo());a.addPeakHighlight(c);JU.Logger.info(Thread.currentThread()+"JSViewer sendFrameChange "+this.selectedPanel);this.notifyJmol(c)});c(b,"getPropertyAsJavaObject",function(a){var b=new java.util.Hashtable;if("SOURCEID".equalsIgnoreCase(a))return b.put(a,
null==this.pd()?"":this.pd().getSpectrum().sourceID),b;if(null!=a&&a.startsWith("DATA_"))return b.put(a,""+JSV.common.JSVFileManager.cacheGet(a.substring(5))),b;var c=!1;if(null!=a&&a.toUpperCase().startsWith("ALL ")||"all".equalsIgnoreCase(a))a=a.substring(3).trim(),c=!0;"".equals(a)&&(a=null);if("NAMES".equalsIgnoreCase(a)||"KEYS".equalsIgnoreCase(a))a="";var f=this.pd().getInfo(!0,a);if(!c&&null!=f)return f;null!=f&&b.put("current",f);c=new JU.Lst;for(f=0;f<this.panelNodes.size();f++)null!=this.panelNodes.get(f).jsvp&&
c.addLast(this.panelNodes.get(f).getInfo(a));b.put("items",c);return b},"~S");c(b,"getCoordinate",function(){if(!this.isClosed()){var a=this.pd().getClickedCoordinate();if(null!=a)return a.getXVal()+" "+a.getYVal()}return""});c(b,"fillSpecList",function(a,b,c){var f,e=null,g=a.equalsIgnoreCase("NONE");if(g||a.equalsIgnoreCase("all"))a="*";if(0>a.indexOf("*")){f=a.$plit(" ");a=new JU.SB;for(var j=0;j<f.length;j++){var k=f[j].indexOf(".");k!=f[j].lastIndexOf(".")&&(f[j]=f[j].substring(0,k+1)+f[j].substring(k+
1).$replace(".","_"));a.append(f[j]).append(" ")}a=a.toString().trim()}if(a.equals("*"))f=JSV.common.ScriptToken.getTokens(JSV.common.PanelNode.getSpectrumListAsString(this.panelNodes));else if(a.startsWith('"')||a.startsWith("'"))f=JSV.common.ScriptToken.getTokens(a);else if(a=JU.PT.rep(a,"_"," _ "),a=JU.PT.rep(a,"-"," - "),f=JSV.common.ScriptToken.getTokens(a),e=JSV.common.ScriptToken.getTokens(JSV.common.PanelNode.getSpectrumListAsString(this.panelNodes)),0==e.size())return null;var l=this.isClosed()?
"1.":JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes).id,l=l.substring(0,l.indexOf(".")+1);a=new JU.SB;for(var m=f.size(),n=null,j=0;j<m;j++){var q=f.get(j),k=NaN,r=-1;j+1<m&&f.get(j+1).equals("*")?(j+=2,k=Double.parseDouble(f.get(j))):j+1<m&&f.get(j+1).equals("_")&&(j+=2,r=Integer.parseInt(f.get(j)));if(q.equals("-")){null==n&&(n=e.get(0));q=j+1==m?e.get(e.size()-1):f.get(++j);q.contains(".")||(q=l+q);for(k=0;k<e.size()&&!e.get(k).equals(n);)k++;for(k++;k<e.size()&&!n.equals(q);){var s=
JSV.common.PanelNode.findNodeById(n=e.get(k++),this.panelNodes);b.addLast(s.pd().getSpectrumAt(0));a.append(",").append(n)}}else if(q.startsWith("'")&&q.endsWith("'")&&(q='"'+JU.PT.trim(q,"'")+'"'),q.startsWith('"'))for(var q=JU.PT.trim(q,'"'),r=this.panelNodes.size(),u=0;u<r;u++){if(s=this.panelNodes.get(u),null!=s.fileName&&s.fileName.startsWith(q)||null!=s.frameTitle&&s.frameTitle.startsWith(q))this.addSpecToList(s.pd(),k,-1,b,c),a.append(",").append(s.id)}else q.contains(".")||(q=l+q),s=JSV.common.PanelNode.findNodeById(q,
this.panelNodes),null!=s&&(n=q,this.addSpecToList(s.pd(),k,r,b,c),a.append(",").append(q),0<r&&a.append(".").appendI(r))}c&&0<b.size()&&(s=JSV.common.PanelNode.findNodeById(a.substring(1),this.panelNodes),null!=s&&(this.setNode(s),b.clear()));return g?"NONE":0<a.length()?a.toString().substring(1):null},"~S,JU.Lst,~B");c(b,"addSpecToList",function(a,b,c,f,e){e?(a.getSpectrumAt(0).setUserYFactor(Double.isNaN(b)?1:b),a.addToList(c-1,f)):a.selectFromEntireSet(c-1)},"JSV.common.PanelData,~N,~N,JU.Lst,~B");
c(b,"getSolutionColor",function(a){var b=this.pd().getSpectrum(),c=b.canShowSolutionColor()?JSV.common.JSViewer.getInterface("JSV.common.Visible"):null;return null==c?-1:c.getColour(b,a)},"~B");c(b,"openDataOrFile",function(a,b,c,f,e,g,j,k){if("NONE".equals(b))return this.close("View*"),0;this.si.writeStatus("");var l=null,m=null,n=null,q=!1;null!=f&&f.startsWith("cache://")&&(a=Jmol.Cache.get(b=f));var r=null;if(null!=a)try{n=b,m=l=JSV.common.JSVFileManager.getFullPathName(b)}catch(s){if(!E(s,"JSV.exception.JSVException"))throw s;
}else if(null!=c)q=!0,m=n=l="View"+ ++this.nViews;else if(null!=f)try{r=this.apiPlatform.newFile(f),this.recentURL=l=(new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,f,null)).toString(),n=JSV.common.JSVFileManager.getTagName(l)}catch(u){if(E(u,"java.net.MalformedURLException"))n=r.getName(),m=l=r.getFullPath(),this.recentURL=null;else throw u;}b=-1;if(0<=(b=JSV.common.PanelNode.isOpen(this.panelNodes,l))||0<=(b=JSV.common.PanelNode.isOpen(this.panelNodes,f)))return q?(--this.nViews,
this.setNode(this.panelNodes.get(b))):this.si.writeStatus(l+" is already open"),-1;!j&&!q&&this.close("all");this.si.setCursor(3);try{this.si.siSetCurrentSource(q?JSV.source.JDXSource.createView(c):JSV.source.JDXReader.createJDXSource(r,a,l,this.obscureTitleFromUser===Boolean.TRUE,this.loadImaginary,e,g,this.nmrMaxY))}catch(w){if(E(w,Exception))return alert(w.toString()),this.si.setCursor(0),this.isApplet&&this.selectedPanel.showMessage(w.toString(),"Error Opening File"),-3;throw w;}this.si.setCursor(0);
System.gc();null==m?(m=this.currentSource.getFilePath(),null!=m&&(n=m.substring(m.lastIndexOf("/")+1))):this.currentSource.setFilePath(m);null==k&&!q&&(k=m);null!=k&&this.currentSource.setID(k);this.si.siSetLoaded(n,m);a=this.currentSource.getJDXSpectrum(0);if(null==a)return-4;c=this.currentSource.getSpectra();JSV.common.Spectrum.process(c,this.irMode);c=this.interfaceOverlaid||a.isAutoOverlayFromJmolClick();q||c&&this.currentSource.isCompoundSource?this.combineSpectra(q?f:null):this.splitSpectra();
this.pd().setTaintedAll();q||this.si.siUpdateRecentMenus(l);return 0},"~O,~S,JU.Lst,~S,~N,~N,~B,~S");c(b,"close",function(a){var b=0,c=null==a?-2:a.indexOf(">");0<c&&(b=JU.PT.parseInt(a.substring(c+1).trim()),a=a.substring(0,c).trim());"*".equals(a)&&(a="all");var f="all"===a;if(null==a||0==b&&a.equalsIgnoreCase("all"))this.closeSource(null);else{var e=a.equalsIgnoreCase("views"),c=new JU.Lst;a=a.$replace("\\","/");var g=this.panelNodes.size(),b=g-b;if(a.endsWith("*"))for(a=a.substring(0,a.length-
1);0<=--g;)this.panelNodes.get(g).fileName.startsWith(a)&&c.addLast(this.panelNodes.get(g).source);else if(a.equalsIgnoreCase("selected"))for(a=null;0<=--g;)f=this.panelNodes.get(g).source,this.panelNodes.get(g).isSelected&&(null==a||a!==f)&&c.addLast(f),a=f;else if(f||e||a.equalsIgnoreCase("simulations"))for(a=0;0<=--g&&a<b;){if(f||(e?this.panelNodes.get(g).isView:this.panelNodes.get(g).isSimulation))c.addLast(this.panelNodes.get(g).source),a++}else f=0==a.length?this.currentSource:JSV.common.PanelNode.findSourceByNameOrId(a,
this.panelNodes),null!=f&&c.addLast(f);for(g=c.size();0<=--g;)this.closeSource(c.get(g));null==this.selectedPanel&&0<this.panelNodes.size()&&this.si.siSetSelectedPanel(JSV.common.PanelNode.getLastFileFirstNode(this.panelNodes))}},"~S");c(b,"execLoad",function(a,b){var c=JSV.common.ScriptToken.getTokens(a),f=c.get(0),e=null,g=0;f.equalsIgnoreCase("ID")&&(e=JU.PT.trimQuotes(c.get(1)),f=c.get(2),g=2);var j=f.equalsIgnoreCase("APPEND");j&&(g++,0<g&&(f=c.get(g)));var k=f.equalsIgnoreCase("CHECK");k&&g++;
0<g&&(f=c.get(g));null==b&&(b=this.defaultLoadScript);if(f.equals("?"))this.openFileFromDialog(j,!1,null,b);else if(f.equals("http://?"))this.openFileFromDialog(j,!0,null,null);else if(f.equals("$?")||f.equals("$H1?"))this.openFileFromDialog(j,!0,"H1",null);else if(f.equals("$C13?"))this.openFileFromDialog(j,!0,"C13",null);else{var l=f.equalsIgnoreCase("MOL")||f.equalsIgnoreCase("H1"),m=f.equalsIgnoreCase("C13");if(l||m)f="http://SIMULATION/"+(l?"H1/":"C13/")+"MOL="+JU.PT.trimQuotes(c.get(++g));!k&&
!j&&(f.equals('""')&&null!=this.currentSource&&(f=this.currentSource.getFilePath()),this.close("all"));f=JU.PT.trimQuotes(f);if(k=f.startsWith("$"))!f.startsWith("$H1")&&!f.startsWith("$C13")&&(f="$H1/"+f.substring(1)),f="http://SIMULATION/"+f.substring(1);l=g+1<c.size()?Integer.$valueOf(c.get(++g)).intValue():-1;c=g+1<c.size()?Integer.$valueOf(c.get(++g)).intValue():l;this.si.siOpenDataOrFile(null,null,null,f,l,c,j,b,e);k&&(this.close("views"),this.execView("*",!0))}},"~S,~S");c(b,"combineSpectra",
function(a){for(var b=this.currentSource,c=b.getSpectra(),f=!1,e=c.size();0<=--e;)if(c.get(e).isSimulation){f=!0;break}c=this.si.siGetNewJSVPanel2(c);c.setTitle(b.getTitle());c.getTitle().equals("")&&(c.getPanelData().setViewTitle(""),c.setTitle(a));this.si.siSetPropertiesFromPreferences(c,!0);this.spectraTree.createTree(++this.fileCount,b,z(-1,[c])).getPanelNode().isView=!0;b=JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes);b.setFrameTitle(a);b.isView=!0;this.autoShowLegend&&1==
this.pd().getNumberOfGraphSets()&&b.setLegend(this.getDialog(JSV.common.Annotation.AType.OverlayLegend,null));this.si.siSetMenuEnables(b,!1);f&&this.pd().splitStack(!0)},"~S");c(b,"closeSource",function(a){for(var b=this.spectraTree.getRootNode(),c=null==a?null:a.getFilePath(),f=new JU.Lst,b=b.children();b.hasMoreElements();){var e=b.nextElement();if(null==c||e.getPanelNode().source.matchesFilePath(c)){JU.Logger.info("Closing "+e.getPanelNode().source.getFilePath());for(var g=e.children();g.hasMoreElements();){var j=
g.nextElement();f.addLast(j);this.panelNodes.removeObj(j.getPanelNode())}f.addLast(e);if(null!=c)break}}this.spectraTree.deleteNodes(f);null==a&&(null!=this.currentSource&&this.currentSource.dispose(),this.currentSource=null,null!=this.selectedPanel&&this.selectedPanel.dispose());this.currentSource===a&&(this.si.siSetSelectedPanel(null),this.si.siSetCurrentSource(null));for(f=c=0;f<this.panelNodes.size();f++)b=JU.PT.parseFloat(this.panelNodes.get(f).id),b>=c+1&&(c=w(Math.floor(b)));this.fileCount=
c;System.gc();JU.Logger.debugging&&JU.Logger.checkMemory();this.si.siSourceClosed(a)},"JSV.source.JDXSource");c(b,"setFrameAndTreeNode",function(a){null==this.panelNodes||(0>a||a>=this.panelNodes.size())||this.setNode(this.panelNodes.get(a))},"~N");c(b,"selectFrameNode",function(a){a=JSV.common.PanelNode.findNode(a,this.panelNodes);if(null==a)return null;this.spectraTree.setPath(this.spectraTree.newTreePath(a.treeNode.getPath()));return a},"JSV.api.JSVPanel");c(b,"setSpectrum",function(a){if(0<=a.indexOf(".")){a=
JSV.common.PanelNode.findNodeById(a,this.panelNodes);if(null==a)return!1;this.setNode(a)}else{a=JU.PT.parseInt(a);if(0>=a)return this.checkOverlay(),!1;this.setFrameAndTreeNode(a-1)}return!0},"~S");c(b,"splitSpectra",function(){for(var a=this.currentSource,b=a.getSpectra(),c=Array(b.size()),f=null,e=0;e<b.size();e++)f=b.get(e),f=this.si.siGetNewJSVPanel(f),this.si.siSetPropertiesFromPreferences(f,!0),c[e]=f;this.spectraTree.createTree(++this.fileCount,a,c);this.si.siGetNewJSVPanel(null);a=JSV.common.PanelNode.findNode(this.selectedPanel,
this.panelNodes);this.si.siSetMenuEnables(a,!0)});c(b,"selectedTreeNode",function(a){null!=a&&(a.isLeaf()?this.setNode(a.getPanelNode()):System.out.println("not a leaf"),this.si.siSetCurrentSource(a.getPanelNode().source))},"JSV.api.JSVTreeNode");c(b,"dispose",function(){this.fileHelper=null;null!=this.viewDialog&&this.viewDialog.dispose();this.viewDialog=null;null!=this.overlayLegendDialog&&this.overlayLegendDialog.dispose();this.overlayLegendDialog=null;null!=this.jsvpPopupMenu&&(this.jsvpPopupMenu.jpiDispose(),
this.jsvpPopupMenu=null);if(null!=this.panelNodes)for(var a=this.panelNodes.size();0<=--a;)this.panelNodes.get(a).dispose(),this.panelNodes.removeItemAt(a)});c(b,"runScript",function(a){null==this.scriptQueue?this.si.siProcessCommand(a):this.scriptQueue.addLast(a)},"~S");c(b,"requestRepaint",function(){null!=this.selectedPanel&&this.repaintManager.refresh()});c(b,"repaintDone",function(){this.repaintManager.repaintDone()});c(b,"checkOverlay",function(){null!=this.mainPanel&&this.markSelectedPanels(this.panelNodes,
this.mainPanel.getCurrentPanelIndex());this.viewDialog=this.getDialog(JSV.common.Annotation.AType.Views,null)});c(b,"markSelectedPanels",function(a,b){for(var c=a.size();0<=--c;)a.get(c).isSelected=b==c},"JU.Lst,~N");c(b,"execOverlayOffsetY",function(a){if(-2147483648==a){if(null==this.selectedPanel)return;a=this.selectedPanel.getInput("Enter a vertical offset in percent for stacked plots","Overlay",""+this.recentStackPercent);a=JU.PT.parseFloat(a);if(Float.isNaN(a))return;a=F(a)}this.recentStackPercent=
a;this.parameters.viewOffset=a;this.isClosed()&&this.pd().setYStackOffsetPercent(a)},"~N");c(b,"execScriptInline",function(a){0<a.length&&(a=a.substring(6).trim());0==a.length&&(a=this.selectedPanel.getInput("Enter a JSpecView script","Script",this.recentScript));null!=a&&(this.recentScript=a,this.runScriptNow(a))},"~S");c(b,"setDisplay",function(a){this.apiPlatform.setViewer(this,this.display=a);var b=D(2,0);this.apiPlatform.getFullScreenDimensions(a,b);this.setScreenDimension(b[0],b[1])},"~O");
c(b,"setScreenDimension",function(a,b){b=Math.min(b,this.maximumSize);a=Math.min(a,this.maximumSize);this.screenWidth==a&&this.screenHeight==b||this.resizeImage(a,b)},"~N,~N");c(b,"resizeImage",function(a,b){0<a?(this.screenWidth=a,this.screenHeight=b):(a=0==this.screenWidth?this.screenWidth=500:this.screenWidth,b=0==this.screenHeight?this.screenHeight=500:this.screenHeight);this.g2d.setWindowParameters(a,b)},"~N,~N");c(b,"updateJS",function(){null!=this.selectedPanel&&this.selectedPanel.paintComponent(this.apiPlatform.getGraphics(null))});
c(b,"processMouseEvent",function(a,b,c,f,e){return null!=this.selectedPanel&&this.selectedPanel.processMouseEvent(a,b,c,f,e)},"~N,~N,~N,~N,~N");c(b,"processTwoPointGesture",function(a){this.isClosed()||this.selectedPanel.processTwoPointGesture(a)},"~A");c(b,"processKeyEvent",function(a){this.isClosed()||this.selectedPanel.processKeyEvent(a)},"~O");c(b,"getApplet",function(){return this.html5Applet});c(b,"openFileAsyncSpecial",function(a){var b=null==this.currentSource?"NO":this.getDialogManager().getDialogInput(this,
"Do you want to append this file? (Answer NO to replace.)","Drag/Drop Action",3,null,null,"YES");null!=b&&(b=b.toLowerCase().startsWith("y")?"append":"",this.runScript("load "+b+' "'+a+'"'+(""===b?"":"; view *")))},"~S,~N");c(b,"getHeight",function(){return this.screenHeight});c(b,"getWidth",function(){return this.screenWidth});c(b,"getPlatformInterface",function(a){return JSV.common.JSViewer.getInterface("JSV."+(JSV.common.JSViewer.isJS?"js2d.Js":"java.Awt")+a)},"~S");c(b,"getDialogManager",function(){if(null!=
this.dialogManager)return this.dialogManager;this.dialogManager=this.getPlatformInterface("DialogManager");return this.dialogManager.set(this)});c(b,"getDialog",function(a,b){switch(a){case JSV.common.Annotation.AType.Integration:return JSV.common.JSViewer.getInterface("JSV.dialog.IntegrationDialog").setParams("Integration for "+b,this,b);case JSV.common.Annotation.AType.Measurements:return JSV.common.JSViewer.getInterface("JSV.dialog.MeasurementsDialog").setParams("Measurements for "+b,this,b);case JSV.common.Annotation.AType.PeakList:return JSV.common.JSViewer.getInterface("JSV.dialog.PeakListDialog").setParams("Peak List for "+
b,this,b);case JSV.common.Annotation.AType.OverlayLegend:return this.overlayLegendDialog=JSV.common.JSViewer.getInterface("JSV.dialog.OverlayLegendDialog").setParams(this.pd().getViewTitle(),this,null);case JSV.common.Annotation.AType.Views:return this.viewDialog=JSV.common.JSViewer.getInterface("JSV.dialog.ViewsDialog").setParams("View/Combine/Close Spectra",this,null);default:return null}},"JSV.common.Annotation.AType,JSV.common.Spectrum");c(b,"show",function(a){this.getDialogManager();if(a.equals("properties"))this.dialogManager.showProperties(null,
this.pd().getSpectrum());else if(a.equals("errors"))this.dialogManager.showSourceErrors(null,this.currentSource);else if(a.equals("source"))null==this.currentSource?0<this.panelNodes.size()&&this.dialogManager.showMessageDialog(null,"Please Select a Spectrum","Select Spectrum",0):this.dialogManager.showSource(this,this.pd().getSpectrum());else if(a.startsWith("solutioncolorfill"))if(0<=a.indexOf("all"))for(var b=this.panelNodes.size();0<=--b;)this.panelNodes.get(b).pd().setSolutionColor(a);else this.pd().setSolutionColor(a);
else a.startsWith("solutioncolor")&&(a=this.getSolutionColorStr(0>a.indexOf("false")),a="background-color:rgb("+a+")'><br />Predicted Solution Colour- RGB("+a+")<br /><br />",JSV.common.JSViewer.isJS?this.dialogManager.showMessage(this,"<div style='width:100%;height:100%;"+a+"</div>","Predicted Colour"):this.selectedPanel.showMessage("<html><body style='"+a+"</body></html>","Predicted Colour"))},"~S");c(b,"getPrintLayout",function(a){if(!JSV.common.JSViewer.isJS&&this.hasDisplay)try{var b=this.getPlatformInterface("PrintDialog").set(this.parentFrame,
this.lastPrintLayout,a).getPrintLayout();null!=b&&(this.lastPrintLayout=b);return b}catch(c){if(!E(c,Exception))throw c;}return new JSV.common.PrintLayout(this.pd())},"~B");c(b,"setIRmode",function(a){this.irMode=a.equals("AtoT")?JSV.common.Spectrum.IRMode.TO_TRANS:a.equals("TtoA")?JSV.common.Spectrum.IRMode.TO_ABS:JSV.common.Spectrum.IRMode.getMode(a)},"~S");c(b,"getOptionFromDialog",function(a,b,c){return this.getDialogManager().getOptionFromDialog(null,a,this.selectedPanel,b,c)},"~A,~S,~S");c(b,
"print",function(a){return this.execWrite('PDF "'+a+'"')},"~S");c(b,"execWrite",function(a){JSV.common.JSViewer.isJS&&null==a&&(a="PDF");a=JSV.common.JSViewer.getInterface("JSV.export.Exporter").write(this,null==a?null:JSV.common.ScriptToken.getTokens(a),!1);this.si.writeStatus(a);return a},"~S");c(b,"$export",function(a,b){null==a&&(a="XY");var c=this.pd(),f=c.getNumberOfSpectraInCurrentSet();if(-1>b||b>=f)return"Maximum spectrum index (0-based) is "+(f-1)+".";c=0>b?c.getSpectrum():c.getSpectrumAt(b);
try{return JSV.common.JSViewer.getInterface("JSV.export.Exporter").exportTheSpectrum(this,JSV.common.ExportType.getType(a),null,c,0,c.getXYCoords().length-1,null,a.equalsIgnoreCase("PDF"))}catch(e){if(E(e,Exception))return JU.Logger.error(e.toString()),null;throw e;}},"~S,~N");f(b,"postByteArray",function(a,b){return JSV.common.JSVFileManager.postByteArray(a,b)},"~S,~A");c(b,"getOutputChannel",function(a,b){for(;a.startsWith("/");)a=a.substring(1);return(new JU.OC).setParams(this,a,!b,null)},"~S,~B");
b.getInterface=c(b,"getInterface",function(a){try{var b=qa._4Name(a);return null==b?null:b.newInstance()}catch(c){if(E(c,Exception))return JU.Logger.error("Interface.java Error creating instance for "+a+": \n"+c),null;throw c;}},"~S");c(b,"showMessage",function(a){null!=this.selectedPanel&&null!=a&&this.selectedPanel.showMessage(a,null)},"~S");c(b,"openFileFromDialog",function(a,b,c,f){var e=null;if(null!=c){e=this.fileHelper.getUrlFromDialog("Enter the name or identifier of a compound",this.recentSimulation);
if(null==e)return!1;this.recentSimulation=e;if(e.equals("<this structure>"))return this.isEmbedded?(this.syncToJmol('sync . "'+c+'Simulate:";'),!0):!1;e="$"+c+"/"+e}else if(b){e=this.fileHelper.getUrlFromDialog("Enter the URL of a JCAMP-DX File",null==this.recentURL?this.recentOpenURL:this.recentURL);if(null==e)return!1;this.recentOpenURL=e}else b=z(-1,[Boolean.$valueOf(a),f]),b=this.hasDisplay?this.fileHelper.showFileOpenDialog(this.mainPanel,b):null,null!=b&&(e=b.getFullPath());return null!=e?(this.runScriptNow("load "+
(a?"APPEND ":"")+'"'+e+'"'+(null==f?"":";"+f)),!0):!1},"~B,~B,~S,~S");c(b,"openFile",function(a,b){if(b&&null!=this.panelNodes){var c=JSV.common.PanelNode.findSourceByNameOrId((new java.io.File(a)).getAbsolutePath(),this.panelNodes);null!=c&&this.closeSource(c)}this.si.siOpenDataOrFile(null,null,null,a,-1,-1,!0,this.defaultLoadScript,null)},"~S,~B");c(b,"selectPanel",function(a,b){var c=-1;if(null!=b){for(var f=b.size();0<=--f;){var e=b.get(f).jsvp;e===a?c=f:(e.setEnabled(!1),e.setFocusable(!1),e.getPanelData().closeAllDialogsExcept(JSV.common.Annotation.AType.NONE))}this.markSelectedPanels(b,
c);this.selectedPanel=a;null!=a&&a.getPanelData().clearMouseSet(null)}return c},"JSV.api.JSVPanel,JU.Lst");c(b,"checkAutoIntegrate",function(){this.autoIntegrate&&this.pd().integrateAll(this.parameters)});c(b,"parseInitScript",function(a){null==a&&(a="");a=new JSV.common.ScriptTokenizer(a,!0);for(JU.Logger.debugging&&JU.Logger.info("Running in DEBUG mode");a.hasMoreTokens();){var b=a.nextToken(),c=new JSV.common.ScriptTokenizer(b,!1),f=c.nextToken();f.equalsIgnoreCase("SET")&&(f=c.nextToken());var f=
f.toUpperCase(),e=JSV.common.ScriptToken.getScriptToken(f),b=JSV.common.ScriptToken.getValue(e,c,b);JU.Logger.info("KEY-> "+f+" VALUE-> "+b+" : "+e);try{switch(e){default:this.parameters.set(null,e,b);break;case JSV.common.ScriptToken.UNKNOWN:break;case JSV.common.ScriptToken.APPLETID:this.fullName=this.appletName+"__"+(this.appletName=b)+"__";f=null;self.Jmol&&(f=Jmol._applets[b]);this.html5Applet=f;break;case JSV.common.ScriptToken.AUTOINTEGRATE:this.autoIntegrate=JSV.common.Parameters.isTrue(b);
break;case JSV.common.ScriptToken.COMPOUNDMENUON:break;case JSV.common.ScriptToken.APPLETREADYCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.COORDCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.LOADFILECALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.PEAKCALLBACKFUNCTIONNAME:case JSV.common.ScriptToken.SYNCCALLBACKFUNCTIONNAME:this.si.siExecSetCallback(e,b);break;case JSV.common.ScriptToken.ENDINDEX:this.initialEndIndex=Integer.parseInt(b);break;case JSV.common.ScriptToken.INTERFACE:this.checkOvelayInterface(b);
break;case JSV.common.ScriptToken.IRMODE:this.setIRmode(b);break;case JSV.common.ScriptToken.MENUON:this.allowMenu=Boolean.parseBoolean(b);break;case JSV.common.ScriptToken.OBSCURE:null==this.obscureTitleFromUser&&(this.obscureTitleFromUser=Boolean.$valueOf(b));break;case JSV.common.ScriptToken.STARTINDEX:this.initialStartIndex=Integer.parseInt(b);break;case JSV.common.ScriptToken.SYNCID:this.fullName=this.appletName+"__"+(this.syncID=b)+"__"}}catch(g){if(!E(g,Exception))throw g;}}},"~S");c(b,"getSolutionColorStr",
function(a){a=JU.CU.colorPtFromInt(this.getSolutionColor(a),null);return F(a.x)+","+F(a.y)+","+F(a.z)},"~B");c(b,"checkCommandLineForTip",function(a,b,c){var f="\u0001"==a;if(!f&&"\x00"!=a){if("\t"!=a&&("\n"==a||32>a.charCodeAt(0)||126<a.charCodeAt(0)))return null;b+=Character.isISOControl(a)?"":""+a}var e;0<=b.indexOf(";")&&(b=b.substring(b.lastIndexOf(";")+1));for(var g=null;b.startsWith(" ");)b=b.substring(1);if(0==b.length&&!f)e="";else{e=JSV.common.ScriptToken.getTokens(b);if(0==e.size()&&!f)return"";
b=b.endsWith(" ")||1<e.size()&&c;e=JSV.common.ScriptToken.getScriptTokenList(0==e.size()?null:e.get(0),b);switch(e.size()){case 0:e="?";break;case 1:f=e.get(0);e=f.getTip();try{e=0<=e.indexOf("TRUE")?" ("+this.parameters.getBoolean(f)+")":0<=f.name().indexOf("COLOR")?" ("+JU.CU.toRGBHexString(this.parameters.getElementColor(f))+")":""}catch(j){if(E(j,Exception))return null;throw j;}if("\t"==a||b||!c){e=f.name()+" "+f.getTip()+e+" "+f.getDescription();"\t"==a&&(g=f.name()+" ");break}e=f.name()+" "+
e;break;default:e=JSV.common.ScriptToken.getNameList(e)}}c?this.si.writeStatus(e):g=e;return g},"~S,~S,~B");c(b,"checkScript",function(a){return this.checkCommandLineForTip("\x00",a,!1)},"~S");c(b,"execHelp",function(a){var b=this.checkCommandLineForTip("\u0001",a,!1);if(0>b.indexOf(" ")&&0<b.indexOf(",")){var c=JU.PT.split(b,",");java.util.Arrays.sort(c);for(var b="",f=0;f<c.length;f++)var e=JSV.common.ScriptToken.getScriptToken(c[f]),b=b+(c[f]+" "+e.getTip()+"\n  "+e.getDescription()+"\n\n");this.getDialogManager().showMessage(null,
b,"HELP "+a)}else this.selectedPanel.showMessage(b,"Help "+a);System.out.println(b)},"~S");c(b,"setRecentSimulation",function(a){null==a&&(a="<this structure>");this.recentSimulation=a},"~S");c(b,"setCreatingImage",function(a){this.pd().creatingImage=a},"~B");c(b,"checkFileAlreadyLoaded",function(a){if(this.isClosed())return!1;if(this.pd().hasFileLoaded(a))return!0;for(var b=this.panelNodes.size();0<=--b;)if(this.panelNodes.get(b).pd().hasFileLoaded(a))return this.si.siSetSelectedPanel(this.panelNodes.get(b).jsvp),
!0;return!1},"~S");c(b,"advanceSpectrumBy",function(a){for(var b=this.panelNodes.size();0<=--b&&this.panelNodes.get(b).jsvp!==this.selectedPanel;);this.setFrameAndTreeNode(b+a);this.selectedPanel.getFocusNow(!1)},"~N");c(b,"processPeakPickEvent",function(a){if(C(a,"JSV.common.PeakInfo")){var b=this.pd().findMatchingPeakInfo(a);if(null==b){if(!"ALL".equals(a.getTitle()))return;for(var c=null,f=0;f<this.panelNodes.size();f++)if(null!=(b=this.panelNodes.get(f).pd().findMatchingPeakInfo(a))){c=this.panelNodes.get(f);
break}if(null==c)return;this.setNode(c)}a=b}else this.si.siSetSelectedPanel(a.getSource()),a=a.getPeakInfo();this.pd().addPeakHighlight(a);this.notifyJmol(a);a.isClearAll()?this.repaint(!1):this.pd().selectSpectrum(a.getFilePath(),a.getType(),a.getModel(),!0);this.si.siCheckCallbacks(a.getTitle())},"~O,~B");c(b,"syncScript",function(a){JSV.common.SyncManager.syncFromJmol(this,a)},"~S");c(b,"syncToJmol",function(a){this.si.syncToJmol(a)},"~S");c(b,"notifyJmol",function(a){this.repaint(!0);JSV.common.SyncManager.syncToJmol(this,
a)},"JSV.common.PeakInfo");b.isJS=!1;b.isSwingJS=!1;b.jsmolObject=null});m("JSV.common");x(["JSV.common.Annotation","$.Coordinate"],"JSV.common.Measurement",null,function(){var b=s(function(){this.pt2=null;this.value=0;r(this,arguments)},JSV.common,"Measurement",JSV.common.Annotation);N(b,function(){this.pt2=new JSV.common.Coordinate});c(b,"setM1",function(a,b,c){this.setA(a,b,c,"",!1,!1,0,6);this.setPt2(this.getXVal(),this.getYVal());return this},"~N,~N,JSV.common.Spectrum");c(b,"copyM",function(){var a=
new JSV.common.Measurement;a.setA(this.getXVal(),this.getYVal(),this.spec,this.text,!1,!1,this.offsetX,this.offsetY);a.setPt2(this.pt2.getXVal(),this.pt2.getYVal());return a});c(b,"setPt2",function(a,b){this.spec=a;b&&this.setPt2(this.getXVal(),this.getYVal());return this},"JSV.common.Spectrum,~B");c(b,"setPt2",function(a,b){this.pt2.setXVal(a);this.pt2.setYVal(b);this.value=Math.abs(a-this.getXVal());this.text=this.spec.setMeasurementText(this)},"~N,~N");c(b,"getSpectrum",function(){return this.spec});
c(b,"setValue",function(a){this.value=a;this.text=this.spec.setMeasurementText(this)},"~N");c(b,"getValue",function(){return this.value});c(b,"getXVal2",function(){return this.pt2.getXVal()});c(b,"getYVal2",function(){return this.pt2.getYVal()});f(b,"addSpecShift",function(a){this.setXVal(this.getXVal()+a);this.pt2.setXVal(this.pt2.getXVal()+a)},"~N");c(b,"setYVal2",function(a){this.pt2.setYVal(a)},"~N");c(b,"overlaps",function(a,b){return Math.min(this.getXVal(),this.getXVal2())<Math.max(a,b)&&Math.max(this.getXVal(),
this.getXVal2())>Math.min(a,b)},"~N,~N");f(b,"toString",function(){return"["+this.getXVal()+","+this.pt2.getXVal()+"]"})});m("JSV.common");x(["JU.Lst","JSV.api.AnnotationData"],"JSV.common.MeasurementData",["JU.AU","$.DF","JSV.common.Annotation","$.Parameters"],function(){var b=s(function(){this.units=this.spec=this.type=null;this.precision=0;this.myParams=null;this.isON=!0;this.key=null;r(this,arguments)},JSV.common,"MeasurementData",JU.Lst,JSV.api.AnnotationData);u(b,function(a,b){K(this,JSV.common.MeasurementData,
[]);this.type=a;this.spec=b;this.myParams=(new JSV.common.Parameters).setName("MeasurementData")},"JSV.common.Annotation.AType,JSV.common.Spectrum");c(b,"getMeasurements",function(){return this});f(b,"getAType",function(){return this.type});f(b,"getState",function(){return this.isON});f(b,"setState",function(a){this.isON=a},"~B");c(b,"setMeasurements",function(){},"JU.Lst");f(b,"getParameters",function(){return this.myParams});c(b,"getDataHeader",function(){return JSV.common.MeasurementData.HEADER});
c(b,"getMeasurementListArray",function(a){this.units=a;var b=this.getMeasurementListArrayReal(a),c=this.spec.isNMR()?4:2;a=this.spec.isHNMR()&&a.equals("ppm")?4:2;for(var f=Array(this.size()),e=this.size();0<=--e;)f[e]=z(-1,[""+(e+1),JU.DF.formatDecimalDbl(b[e][0],c),JU.DF.formatDecimalDbl(b[e][1],c),JU.DF.formatDecimalDbl(b[e][2],a)]);return f},"~S");c(b,"getMeasurementListArrayReal",function(a){a=this.spec.isNMR()&&a.equalsIgnoreCase("HZ");for(var b=JU.AU.newDouble2(this.size()),c=0,f=this.size();0<=
--f;){var e=this.get(f).getValue();a&&(e*=this.spec.getObservedFreq());b[c++]=S(-1,[this.get(f).getXVal(),this.get(f).getXVal2(),e])}return b},"~S");b.checkParameters=c(b,"checkParameters",function(a,b){if(0==a.size())return!1;var c=a.getParameters();switch(a.getAType()){case JSV.common.Annotation.AType.PeakList:return b.peakListInterpolation.equals(c.peakListInterpolation)&&b.peakListThreshold==c.peakListThreshold}return!1},"JSV.common.MeasurementData,JSV.common.ColorParameters");f(b,"getSpectrum",
function(){return this.spec});f(b,"getData",function(){return this});c(b,"clear",function(a,b){for(var c=this.size();0<=--c;){var f=this.get(c);(0==f.text.length||f.overlaps(a,b))&&this.removeItemAt(c)}},"~N,~N");c(b,"find",function(a){for(var b=this.size();0<=--b;)if(this.get(b).overlaps(a,a))return b;return-1},"~N");f(b,"setSpecShift",function(a){for(var b=this.size();0<=--b;){var c=this.get(b),f=c.getXVal()+a;c.setXVal(f);c.setValue(f);c.text=JU.DF.formatDecimalDbl(f,this.precision)}},"~N");f(b,
"getGraphSetKey",function(){return this.key});f(b,"setGraphSetKey",function(a){this.key=a},"~S");f(b,"isVisible",function(){return!0});c(b,"getInfo",function(a){a.put("header",this.getDataHeader());a.put("table",this.getMeasurementListArrayReal("ppm"));null!=this.units&&a.put("units",this.units)},"java.util.Map");f(b,"isDialog",function(){return!1});b.HEADER=z(-1,["","start","end","value"])});m("JSV.common");x(["java.lang.Enum","J.api.EventManager","java.util.Hashtable","JU.Lst"],"JSV.common.PanelData",
"JU.CU JSV.common.Annotation $.Coordinate $.GraphSet $.JSVFileManager $.JSVersion $.JSViewer $.MeasurementData $.Parameters $.PeakPickEvent $.ScriptToken $.Spectrum $.SubSpecChangeEvent $.ZoomEvent JU.Font $.Logger".split(" "),function(){var b=s(function(){this.graphSets=this.jsvp=this.options=this.currentGraphSet=this.listeners=this.vwr=this.g2d0=this.g2d=null;this.currentSplitPoint=0;this.coordsClicked=this.coordClicked=this.thisWidget=null;this.isIntegralDrag=this.drawXAxisLeftToRight=this.shiftPressed=
this.ctrlPressed=!1;this.xAxisLeftToRight=!0;this.scalingFactor=1;this.integralShiftMode=0;this.left=60;this.right=50;this.coordStr="";this.startupPinTip="Click to set.";this.title=null;this.endIndex=this.startIndex=this.thisHeight=this.thisWidth=this.nSpectra=this.clickCount=0;this.titleFontName=this.displayFontName=this.viewTitle=this.commonFilePath=null;this.creatingImage=this.isPrinting=!1;this.doReset=!0;this.printingFontName=null;this.printGraphPosition="default";this.isLinked=this.display1D=
this.titleDrawn=!1;this.spectra=this.printJobTitle=null;this.taintedAll=!0;this.testingJavaScript=!1;this.mouseState=this.currentFont=null;this.peakTabsOn=this.titleOn=this.gridOn=!0;this.mouseY=this.mouseX=0;this.mousePeak=this.mouseSet=null;this.linking=!1;this.xPixelClicked=0;this.gMain=this.optionsSaved=this.bgcolor=this.BLACK=this.zoomBoxColor2=this.zoomBoxColor=this.highlightColor=this.unitsColor=this.titleColor=this.scaleColor=this.plotAreaColor=this.peakOverColor=this.peakTabColor=this.integralPlotColor=
this.gridColor=this.coordinatesColor=null;this.unitsDrawn=!1;r(this,arguments)},JSV.common,"PanelData",null,J.api.EventManager);N(b,function(){this.listeners=new JU.Lst;this.options=new java.util.Hashtable});u(b,function(a,b){this.vwr=b;this.jsvp=a;this.g2d=this.g2d0=b.g2d;this.BLACK=this.g2d.getColor1(0);this.highlightColor=this.g2d.getColor4(255,0,0,200);this.zoomBoxColor=this.g2d.getColor4(150,150,100,130);this.zoomBoxColor2=this.g2d.getColor4(150,100,100,130)},"JSV.api.JSVPanel,JSV.common.JSViewer");
c(b,"addListener",function(a){this.listeners.contains(a)||this.listeners.addLast(a)},"JSV.api.PanelListener");c(b,"getCurrentGraphSet",function(){return this.currentGraphSet});c(b,"dispose",function(){this.jsvp=null;for(var a=0;a<this.graphSets.size();a++)this.graphSets.get(a).dispose();this.listeners=this.options=this.thisWidget=this.coordsClicked=this.coordClicked=this.currentGraphSet=this.currentFont=this.graphSets=null});c(b,"setViewTitle",function(a){this.viewTitle=a},"~S");c(b,"getViewTitle",
function(){return null==this.viewTitle?this.getTitle():this.viewTitle});c(b,"getInfo",function(a,b){var c=new java.util.Hashtable,f=null;if(a)return this.currentGraphSet.getInfo(b,this.getCurrentSpectrumIndex());var e=this.options.entrySet();if("".equals(b)){for(var f="type title nSets ",g,e=e.iterator();e.hasNext()&&((g=e.next())||1);)f+=g.getKey().name()+" ";c.put("KEYS",f)}else{for(e=e.iterator();e.hasNext()&&((g=e.next())||1);)JSV.common.Parameters.putInfo(b,c,g.getKey().name(),g.getValue());
JSV.common.Parameters.putInfo(b,c,"type",this.getSpectrumAt(0).getDataType());JSV.common.Parameters.putInfo(b,c,"title",this.title);JSV.common.Parameters.putInfo(b,c,"nSets",Integer.$valueOf(this.graphSets.size()))}f=new JU.Lst;for(g=this.graphSets.size();0<=--g;)f.addLast(this.graphSets.get(g).getInfo(b,-1));c.put("sets",f);return c},"~B,~S");c(b,"setBooleans",function(a,b){if(null==b)for(var c,f=a.getBooleans().entrySet().iterator();f.hasNext()&&((c=f.next())||1);)this.setBooleans(a,c.getKey());
else this.setBoolean(b,a.getBoolean(b))},"JSV.common.Parameters,JSV.common.ScriptToken");c(b,"setBoolean",function(a,b){this.setTaintedAll();if(a===JSV.common.ScriptToken.REVERSEPLOT)this.currentGraphSet.setReversePlot(b);else switch(this.options.put(a,Boolean.$valueOf(b)),a){case JSV.common.ScriptToken.DISPLAY1D:case JSV.common.ScriptToken.DISPLAY2D:this.doReset=!0}},"JSV.common.ScriptToken,~B");c(b,"getBoolean",function(a){if(a===JSV.common.ScriptToken.REVERSEPLOT)return this.currentGraphSet.reversePlot;
if(null==this.options)return!1;a=this.options.get(a);return null!=a&&C(a,Boolean)&&a===Boolean.TRUE},"JSV.common.ScriptToken");c(b,"setFontName",function(a,b){switch(a){case JSV.common.ScriptToken.DISPLAYFONTNAME:this.displayFontName=b;break;case JSV.common.ScriptToken.TITLEFONTNAME:this.titleFontName=b}null!=b&&this.options.put(a,b)},"JSV.common.ScriptToken,~S");c(b,"getDisplay1D",function(){return this.display1D});c(b,"setTaintedAll",function(){this.taintedAll=!0});c(b,"initOne",function(a){this.spectra=
new JU.Lst;this.spectra.addLast(a);this.initMany(this.spectra,0,0)},"JSV.common.Spectrum");c(b,"initMany",function(a,b,c){this.startIndex=b;this.endIndex=c;this.nSpectra=a.size();this.spectra=a;this.commonFilePath=a.get(0).getFilePath();for(b=0;b<this.nSpectra;b++)if(!this.commonFilePath.equalsIgnoreCase(a.get(b).getFilePath())){this.commonFilePath=null;break}this.setGraphSets(JSV.common.PanelData.LinkMode.NONE)},"JU.Lst,~N,~N");c(b,"setGraphSets",function(a){this.graphSets=JSV.common.GraphSet.createGraphSetsAndSetLinkMode(this,
this.jsvp,this.spectra,this.startIndex,this.endIndex,a);this.currentGraphSet=this.graphSets.get(0);this.setTitle(this.getSpectrum().getTitleLabel())},"JSV.common.PanelData.LinkMode");c(b,"findMatchingPeakInfo",function(a){for(var b=null,c=0;c<this.graphSets.size()&&null==(b=this.graphSets.get(c).findMatchingPeakInfo(a));c++);return b},"JSV.common.PeakInfo");c(b,"integrateAll",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).integrate(-1,a)},"JSV.common.ColorParameters");c(b,
"getNumberOfGraphSets",function(){return this.graphSets.size()});c(b,"getTitle",function(){return this.title});c(b,"refresh",function(){this.doReset=!0});c(b,"setTitle",function(a){this.title=a},"~S");c(b,"addAnnotation",function(a){a=this.currentGraphSet.addAnnotation(a,this.getTitle());null!=a&&this.setTitle(a)},"JU.Lst");c(b,"addPeakHighlight",function(a){for(var b=0;b<this.graphSets.size();b++)this.graphSets.get(b).addPeakHighlight(a)},"JSV.common.PeakInfo");c(b,"selectPeakByFileIndex",function(a,
b,c){var f=this.currentGraphSet.selectPeakByFileIndex(a,b,c);if(null==f)for(var e=this.graphSets.size();0<=--e&&!(this.graphSets.get(e)!==this.currentGraphSet&&null!=(f=this.graphSets.get(e).selectPeakByFileIndex(a,b,c))););return f},"~S,~S,~S");c(b,"setPlotColors",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).setPlotColors(a)},"~A");c(b,"selectSpectrum",function(a,b,c,f){f&&this.currentGraphSet.selectSpectrum(a,b,c);if("ID".equals(b))this.jumpToSpectrumIndex(this.getCurrentSpectrumIndex(),
!0);else for(f=0;f<this.graphSets.size();f++)this.graphSets.get(f)!==this.currentGraphSet&&this.graphSets.get(f).selectSpectrum(a,b,c)},"~S,~S,~S,~B");c(b,"hasFileLoaded",function(a){for(var b=this.graphSets.size();0<=--b;)if(this.graphSets.get(b).hasFileLoaded(a))return!0;return!1},"~S");c(b,"clearAllView",function(){for(var a=this.graphSets.size();0<=--a;)this.graphSets.get(a).resetViewCompletely()});c(b,"drawGraph",function(a,b,c,f,e,g,j){this.gMain=a;this.display1D=!this.isLinked&&this.getBoolean(JSV.common.ScriptToken.DISPLAY1D);
var k=50,l=this.isPrinting||this.doReset||this.thisWidth!=f||this.thisHeight!=e;l&&this.setTaintedAll();this.taintedAll&&this.g2d.fillBackground(c,this.bgcolor);b!==a&&(this.g2d.fillBackground(b,null),a!==c&&this.g2d.fillBackground(a,null),this.g2d.setStrokeBold(a,!1));this.scalingFactor=1;this.isPrinting?(this.scalingFactor=10,j=!1):j?(k*=2,j=!1):(j=!this.creatingImage&&this.getBoolean(JSV.common.ScriptToken.COORDINATESON),this.titleOn=this.getBoolean(JSV.common.ScriptToken.TITLEON),this.gridOn=
this.getBoolean(JSV.common.ScriptToken.GRIDON),this.peakTabsOn=this.getBoolean(JSV.common.ScriptToken.PEAKTABSON));var m=this.getBoolean(JSV.common.ScriptToken.POINTSONLY);this.unitsDrawn=this.titleDrawn=this.doReset=!1;this.thisWidth=f;this.thisHeight=e;for(var n=this.graphSets.size();0<=--n;)this.graphSets.get(n).drawGraphSet(a,b,c,f,e,this.left,this.right,40,k,l,this.taintedAll,m);if(this.isPrinting||this.creatingImage)this.titleDrawn=!0;this.isPrinting&&(this.titleOn&&!this.titleDrawn&&this.taintedAll)&&
this.drawTitle(a,(e+20)*this.scalingFactor,f*this.scalingFactor,this.getDrawTitle(!0,-1));j&&null!=this.coordStr&&this.drawCoordinates(b,40,this.thisWidth-this.right,20);g&&this.taintedAll&&this.printFilePath(a,this.left,e,null!=this.commonFilePath?this.commonFilePath:1==this.graphSets.size()&&null!=this.currentGraphSet.getTitle(!0)?this.getSpectrum().getFilePath():null);this.isPrinting&&this.printVersion(a,e);!this.testingJavaScript&&(this.isPrinting||a===b)?this.setTaintedAll():this.taintedAll=
!1},"~O,~O,~O,~N,~N,~B,~B");c(b,"drawCoordinates",function(a,b,c,f){this.g2d.setGraphicsColor(a,this.coordinatesColor);b=this.setFont(a,this.jsvp.getWidth(),1,14,!0);this.g2d.drawString(a,this.coordStr,c-b.stringWidth(this.coordStr),f)},"~O,~N,~N,~N");c(b,"setFont",function(a,b,c,f,e){return this.g2d.setFont(a,this.getFont(a,b,c,f,e))},"~O,~N,~N,~N,~B");c(b,"printFilePath",function(a,b,c,f){if(null!=f){b*=this.scalingFactor;c*=this.scalingFactor;0<f.indexOf("?")&&(f=f.substring(f.indexOf("?")+1));
f=f.substring(f.lastIndexOf("/")+1);f=f.substring(f.lastIndexOf("\\")+1);this.g2d.setGraphicsColor(a,this.BLACK);var e=this.setFont(a,1E3,0,9,!0);b!=this.left*this.scalingFactor&&(b-=e.stringWidth(f));this.g2d.drawString(a,f,b,c-e.getHeight())}},"~O,~N,~N,~S");c(b,"printVersion",function(a,b){this.g2d.setGraphicsColor(a,this.BLACK);var c=this.setFont(a,100,0,12,!0),f=this.jsvp.getApiPlatform().getDateFormat(null)+" JSpecView "+JSV.common.JSVersion.VERSION_SHORT,e=c.stringWidth(f);this.g2d.drawString(a,
f,(this.thisWidth-this.right)*this.scalingFactor-e,b*this.scalingFactor+3*c.getHeight())},"~O,~N");c(b,"drawTitle",function(a,b,c,f){var e=this.getFont(a,c,this.isPrinting||this.getBoolean(JSV.common.ScriptToken.TITLEBOLDON)?1:0,14,!0),g=e.stringWidth(f);g>0.5*c&&(e=w(7*c/g),10>e&&(e=10),e=this.getFont(a,c,this.isPrinting||this.getBoolean(JSV.common.ScriptToken.TITLEBOLDON)?1:0,e,!0));this.g2d.setGraphicsColor(a,this.titleColor);this.setCurrentFont(this.g2d.setFont(a,e));b-=w(e.getHeight()*(this.isPrinting?
-0.2:this.creatingImage?1.2:0.4));this.g2d.drawString(a,f,this.isPrinting?this.left*this.scalingFactor:5,b)},"~O,~N,~N,~S");c(b,"setCurrentFont",function(a){this.currentFont=a},"JU.Font");c(b,"getFontHeight",function(){return this.currentFont.getAscent()});c(b,"getStringWidth",function(a){return this.currentFont.stringWidth(a)},"~S");c(b,"selectFromEntireSet",function(a){for(var b=0,c=0;b<this.graphSets.size();b++)if(-2147483648==a)this.graphSets.get(b).setSelected(-1);else for(var f=this.graphSets.get(b).spectra,
e=0;e<f.size();e++,c++)(0>a||a==c)&&this.graphSets.get(b).setSelected(e)},"~N");c(b,"addToList",function(a,b){for(var c=0;c<this.spectra.size();c++)(0>a||c==a)&&b.addLast(this.spectra.get(c))},"~N,JU.Lst");c(b,"scaleSelectedBy",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).scaleSelectedBy(a)},"~N");c(b,"setCurrentGraphSet",function(a,b){var c=1<a.nSplit?a.getSplitPoint(b):a.getCurrentSpectrumIndex(),f=this.currentGraphSet!==a,e=f||this.currentSplitPoint!=c;this.currentGraphSet=
a;this.currentSplitPoint=c;(f||1<a.nSplit&&e)&&this.setSpectrum(c,!0);if(!f){f=a.checkSpectrumClickedEvent(this.mouseX,this.mouseY,this.clickCount);if(!f)return!1;this.currentSplitPoint=c=a.getCurrentSpectrumIndex();this.setSpectrum(c,!0)}this.jumpToSpectrumIndex(c,f||1<a.nSplit&&e);return f},"JSV.common.GraphSet,~N");c(b,"jumpToSpectrum",function(a){a=this.currentGraphSet.getSpectrumIndex(a);this.jumpToSpectrumIndex(a,!0)},"JSV.common.Spectrum");c(b,"jumpToSpectrumIndex",function(a,b){if(!(0>a||
a>=this.currentGraphSet.nSpectra)){this.currentSplitPoint=a;b&&this.setSpectrum(this.currentSplitPoint,1<this.currentGraphSet.nSplit);var c=this.getSpectrum();this.notifySubSpectrumChange(c.getSubIndex(),c)}},"~N,~B");c(b,"splitStack",function(a){this.currentGraphSet.splitStack(a)},"~B");c(b,"getNumberOfSpectraInCurrentSet",function(){return this.currentGraphSet.nSpectra});c(b,"getSourceID",function(){var a=this.getSpectrum().sourceID;return null==a?this.getSpectrumAt(0).sourceID:a});c(b,"getStartingPointIndex",
function(a){return this.currentGraphSet.viewData.getStartingPointIndex(a)},"~N");c(b,"getEndingPointIndex",function(a){return this.currentGraphSet.viewData.getEndingPointIndex(a)},"~N");c(b,"haveSelectedSpectrum",function(){return this.currentGraphSet.haveSelectedSpectrum()});c(b,"getShowAnnotation",function(a){return this.currentGraphSet.getShowAnnotation(a,-1)},"JSV.common.Annotation.AType");c(b,"showAnnotation",function(a,b){this.currentGraphSet.setShowAnnotation(a,b)},"JSV.common.Annotation.AType,Boolean");
c(b,"setYStackOffsetPercent",function(a){this.currentGraphSet.yStackOffsetPercent=a},"~N");c(b,"setSpectrum",function(a,b){this.currentGraphSet.setSpectrum(a,b)},"~N,~B");c(b,"getSpectrum",function(){return this.currentGraphSet.getSpectrum()});c(b,"setSpecForIRMode",function(a){this.setTaintedAll();var b=this.currentGraphSet.getSpectrum();this.currentGraphSet.setSpectrumJDX(a);for(var c=0;c<this.spectra.size();c++)this.spectra.get(c)===b&&this.spectra.set(c,a)},"JSV.common.Spectrum");c(b,"isShowAllStacked",
function(){return this.currentGraphSet.showAllStacked});c(b,"getCurrentSpectrumIndex",function(){return this.currentGraphSet.getCurrentSpectrumIndex()});c(b,"getSpectrumAt",function(a){return null==this.currentGraphSet?null:this.currentGraphSet.getSpectrumAt(a)},"~N");c(b,"addHighlight",function(a,b,c,f,e,g,j,k){(null==a?this.currentGraphSet:a).addHighlight(b,c,f,this.g2d.getColor4(e,g,j,k))},"JSV.common.GraphSet,~N,~N,JSV.common.Spectrum,~N,~N,~N,~N");c(b,"removeHighlight",function(a,b){this.currentGraphSet.removeHighlight(a,
b)},"~N,~N");c(b,"removeAllHighlights",function(){this.currentGraphSet.removeAllHighlights()});c(b,"setZoom",function(a,b,c,f){this.currentGraphSet.setZoom(a,b,c,f);this.doReset=!0;this.setTaintedAll();this.notifyListeners(new JSV.common.ZoomEvent)},"~N,~N,~N,~N");c(b,"resetView",function(){this.currentGraphSet.resetView()});c(b,"previousView",function(){this.currentGraphSet.previousView()});c(b,"nextView",function(){this.currentGraphSet.nextView()});c(b,"getSelectedIntegral",function(){return this.currentGraphSet.getSelectedIntegral()});
c(b,"advanceSubSpectrum",function(a){this.currentGraphSet.advanceSubSpectrum(a)},"~N");c(b,"setSelectedIntegral",function(a){this.currentGraphSet.setSelectedIntegral(a)},"~N");c(b,"scaleYBy",function(a){this.currentGraphSet.scaleYBy(a)},"~N");c(b,"toPeak",function(a){this.currentGraphSet.toPeak(a)},"~N");c(b,"getClickedCoordinate",function(){return this.coordClicked});c(b,"getPickedCoordinates",function(a,b){return JSV.common.Coordinate.getPickedCoordinates(this.coordsClicked,this.coordClicked,a,
b)},"JSV.common.Coordinate,JSV.common.Coordinate");c(b,"shiftSpectrum",function(a,b,c){return this.currentGraphSet.shiftSpectrum(a,b,c)},"~N,~N,~N");c(b,"findX",function(a,b){this.currentGraphSet.setXPointer(a,b)},"JSV.common.Spectrum,~N");c(b,"setXPointers",function(a,b,c,f){this.currentGraphSet.setXPointer(a,b);this.currentGraphSet.setXPointer2(c,f)},"JSV.common.Spectrum,~N,JSV.common.Spectrum,~N");c(b,"isCurrentGraphSet",function(a){return a===this.currentGraphSet},"JSV.common.GraphSet");c(b,"repaint",
function(){this.jsvp.doRepaint(!1)});c(b,"setToolTipText",function(a){this.jsvp.setToolTipText(a)},"~S");c(b,"setHighlightColor",function(a){this.setColor(JSV.common.ScriptToken.HIGHLIGHTCOLOR,a)},"javajs.api.GenericColor");c(b,"getInput",function(a,b,c){return this.jsvp.getInput(a,b,c)},"~S,~S,~S");c(b,"getFont",function(a,b,c,f,e){f*=this.scalingFactor;e?400>b&&(f=b*f/400):250>b&&(f=b*f/250);b=this.jsvp.getFontFaceID(this.isPrinting?this.printingFontName:this.displayFontName);return this.currentFont=
JU.Font.createFont3D(b,c,f,f,0,this.jsvp.getApiPlatform(),a)},"~O,~N,~N,~N,~B");c(b,"notifySubSpectrumChange",function(a,b){this.notifyListeners(new JSV.common.SubSpecChangeEvent(a,null==b?null:b.getTitleLabel()))},"~N,JSV.common.Spectrum");c(b,"notifyPeakPickedListeners",function(a){null==a&&(a=new JSV.common.PeakPickEvent(this.jsvp,this.coordClicked,this.getSpectrum().getAssociatedPeakInfo(this.xPixelClicked,this.coordClicked)));this.notifyListeners(a)},"JSV.common.PeakPickEvent");c(b,"notifyListeners",
function(a){for(var b=0;b<this.listeners.size();b++)null!=this.listeners.get(b)&&this.listeners.get(b).panelEvent(a)},"~O");c(b,"escapeKeyPressed",function(a){this.currentGraphSet.escapeKeyPressed(a)},"~B");c(b,"hasFocus",function(){return this.jsvp.hasFocus()});c(b,"isMouseUp",function(){return this.mouseState===JSV.common.PanelData.Mouse.UP});c(b,"clearMouseSet",function(a){null==a&&(this.mousePeak=null);null!=this.mouseSet&&this.mouseSet!==a&&this.mouseSet.mouseMovedEvent(2147483647,0);this.mouseSet=
a;null==a&&0<this.graphSets.size()&&(this.mouseSet=a=this.graphSets.get(this.graphSets.size()-1)).setSpectrumMovedTo(a.nSpectra-1)},"JSV.common.GraphSet");c(b,"doMouseMoved",function(a,b){this.mouseX=a;this.mouseY=b;this.mouseState=JSV.common.PanelData.Mouse.UP;this.clickCount=0;var c=JSV.common.GraphSet.findGraphSet(this.graphSets,a,b);null!=c&&(this.clearMouseSet(c),c=c.mouseMovedEvent(a,b),this.mousePeak!==c&&(this.mousePeak=c,this.setTaintedAll()))},"~N,~N");c(b,"doMouseClicked",function(a,b,
c){var f=JSV.common.GraphSet.findGraphSet(this.graphSets,a,b);null!=f&&(this.setCurrentGraphSet(f,b),f.mouseClickedEvent(a,b,this.clickCount,c),this.setTaintedAll(),this.repaint())},"~N,~N,~B");c(b,"doMousePressed",function(a,b){this.mouseState=JSV.common.PanelData.Mouse.DOWN;var c=JSV.common.GraphSet.findGraphSet(this.graphSets,a,b);null!=c&&(this.clearMouseSet(c),this.setCurrentGraphSet(c,b),this.clickCount=++this.clickCount%3,this.currentGraphSet.mousePressedEvent(a,b,this.clickCount))},"~N,~N");
c(b,"doMouseDragged",function(a,b){this.isIntegralDrag=(new Boolean(this.isIntegralDrag|this.ctrlPressed)).valueOf();this.mouseState=JSV.common.PanelData.Mouse.DOWN;JSV.common.GraphSet.findGraphSet(this.graphSets,a,b)===this.currentGraphSet&&(this.currentGraphSet.checkWidgetEvent(a,b,!1)&&this.setTaintedAll(),this.currentGraphSet.mouseMovedEvent(a,b))},"~N,~N");c(b,"doMouseReleased",function(a,b,c){this.mouseState=JSV.common.PanelData.Mouse.UP;!(null==this.thisWidget&&null==this.currentGraphSet.pendingMeasurement)&&
c&&(this.currentGraphSet.mouseReleasedEvent(a,b),this.thisWidget=null,this.isIntegralDrag=!1,this.integralShiftMode=0)},"~N,~N,~B");c(b,"hasCurrentMeasurements",function(a){return this.currentGraphSet.hasCurrentMeasurement(a)},"JSV.common.Annotation.AType");c(b,"getDialog",function(a){return this.currentGraphSet.getDialog(a,-1)},"JSV.common.Annotation.AType");c(b,"addDialog",function(a,b,c){this.currentGraphSet.addDialog(a,b,c)},"~N,JSV.common.Annotation.AType,JSV.api.AnnotationData");c(b,"getPeakListing",
function(a,b){null!=a&&this.currentGraphSet.getPeakListing(-1,a,!0);this.currentGraphSet.setPeakListing(b)},"JSV.common.Parameters,Boolean");c(b,"checkIntegral",function(a,b){this.currentGraphSet.checkIntegralParams(a,b)},"JSV.common.Parameters,~S");c(b,"setIntegrationRatios",function(a){this.currentGraphSet.setIntegrationRatios(a)},"~S");c(b,"getView",function(){return this.currentGraphSet.getCurrentView()});c(b,"closeAllDialogsExcept",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).closeDialogsExcept(a)},
"JSV.common.Annotation.AType");c(b,"removeDialog",function(a){this.currentGraphSet.removeDialog(a)},"JSV.dialog.JSVDialog");c(b,"normalizeIntegral",function(){var a=this.getSelectedIntegral();if(null!=a){var b=a.text;0==b.length&&(b=""+a.getValue());a=this.getInput("Enter a new value for this integral","Normalize Integral",b);try{this.setSelectedIntegral(Double.parseDouble(a))}catch(c){if(!E(c,Exception))throw c;}}});c(b,"getDrawTitle",function(a,b){var c=null;a?c=this.printJobTitle:1==this.nSpectra?
c=this.getSpectrum().getPeakTitle():0<=b?c=this.getSpectrumAt(b).getPeakTitle():null!=this.viewTitle?(null!=this.currentGraphSet.getTitle(!1)&&(c=this.getSpectrum().getPeakTitle()),null==c&&(c=this.viewTitle)):c=this.jsvp.getTitle().trim();0<=c.indexOf("\n")&&(c=c.substring(0,c.indexOf("\n")).trim());return c},"~B,~N");c(b,"linkSpectra",function(a){a===JSV.common.PanelData.LinkMode.ALL&&(a=2==this.nSpectra?JSV.common.PanelData.LinkMode.AB:3==this.nSpectra?JSV.common.PanelData.LinkMode.ABC:JSV.common.PanelData.LinkMode.NONE);
a!==JSV.common.PanelData.LinkMode.NONE&&a.toString().length!=this.nSpectra||this.setGraphSets(a)},"JSV.common.PanelData.LinkMode");c(b,"doZoomLinked",function(a,b,c,f,e,g){if(!this.linking){this.linking=!0;for(var j=a.getSpectrumAt(0),k=this.graphSets.size();0<=--k;){var l=this.graphSets.get(k);l!==a&&JSV.common.Spectrum.areXScalesCompatible(j,this.graphSets.get(k).getSpectrumAt(0),!1,!0)&&l.doZoom(b,0,c,0,g,!1,e,!1,f)}this.linking=!1}},"JSV.common.GraphSet,~N,~N,~B,~B,~B");c(b,"clearLinkViews",function(a){if(!this.linking){this.linking=
!0;for(var b=a.getSpectrum(),c=this.graphSets.size();0<=--c;){var f=this.graphSets.get(c);f!==a&&JSV.common.Spectrum.areXScalesCompatible(b,this.graphSets.get(c).getSpectrum(),!1,!0)&&f.clearViews()}this.linking=!1}},"JSV.common.GraphSet");c(b,"setlinkedXMove",function(a,b,c){if(!this.linking){this.linking=!0;for(var f=a.getSpectrum(),e=this.graphSets.size();0<=--e;){var g=this.graphSets.get(e);g!==a&&JSV.common.Spectrum.areXScalesCompatible(f,this.graphSets.get(e).getSpectrum(),!1,!0)&&null==g.imageView&&
(c?g.setXPixelMovedTo(1.7976931348623157E308,b,0,0):g.setXPixelMovedTo(b,1.7976931348623157E308,0,0))}this.linking=!1}},"JSV.common.GraphSet,~N,~B");c(b,"set2DCrossHairsLinked",function(a,b,c,f){for(var e=this.graphSets.size();0<=--e;){var g=this.graphSets.get(e);g!==a&&g.set2DXY(b,c,f)}},"JSV.common.GraphSet,~N,~N,~B");c(b,"dialogsToFront",function(a){this.currentGraphSet.dialogsToFront(a)},"JSV.common.Spectrum");c(b,"setColor",function(a,b){null!=b&&this.options.put(a,JU.CU.toRGBHexString(b));switch(a){case JSV.common.ScriptToken.COORDINATESCOLOR:this.coordinatesColor=
b;return;case JSV.common.ScriptToken.HIGHLIGHTCOLOR:this.highlightColor=b.addAlpha(150);return;case JSV.common.ScriptToken.ZOOMBOXCOLOR:this.zoomBoxColor=b;return;case JSV.common.ScriptToken.ZOOMBOXCOLOR2:this.zoomBoxColor2=b;return;case JSV.common.ScriptToken.BACKGROUNDCOLOR:this.jsvp.setBackgroundColor(this.bgcolor=b);break;case JSV.common.ScriptToken.GRIDCOLOR:this.gridColor=b;break;case JSV.common.ScriptToken.INTEGRALPLOTCOLOR:this.integralPlotColor=b;break;case JSV.common.ScriptToken.PEAKOVERCOLOR:this.peakOverColor=
b.addAlpha(30);break;case JSV.common.ScriptToken.PEAKTABCOLOR:this.peakTabColor=b;break;case JSV.common.ScriptToken.PLOTCOLOR:for(var c=this.graphSets.size();0<=--c;)this.graphSets.get(c).setPlotColor0(b);break;case JSV.common.ScriptToken.PLOTAREACOLOR:this.plotAreaColor=b;break;case JSV.common.ScriptToken.SCALECOLOR:this.scaleColor=b;break;case JSV.common.ScriptToken.TITLECOLOR:this.titleColor=b;break;case JSV.common.ScriptToken.UNITSCOLOR:this.unitsColor=b;break;default:JU.Logger.warn("AwtPanel --- unrecognized color: "+
a);return}this.taintedAll=!0},"JSV.common.ScriptToken,javajs.api.GenericColor");c(b,"getColor",function(a){switch(a){default:return JU.Logger.error("awtgraphset missing color "+a),this.BLACK;case JSV.common.ScriptToken.ZOOMBOXCOLOR2:return this.zoomBoxColor2;case JSV.common.ScriptToken.ZOOMBOXCOLOR:return this.zoomBoxColor;case JSV.common.ScriptToken.HIGHLIGHTCOLOR:return this.highlightColor;case JSV.common.ScriptToken.INTEGRALPLOTCOLOR:return this.integralPlotColor;case JSV.common.ScriptToken.GRIDCOLOR:return this.gridColor;
case JSV.common.ScriptToken.PEAKOVERCOLOR:return this.peakOverColor;case JSV.common.ScriptToken.PEAKTABCOLOR:return this.peakTabColor;case JSV.common.ScriptToken.PLOTAREACOLOR:return this.plotAreaColor;case JSV.common.ScriptToken.SCALECOLOR:return this.scaleColor;case JSV.common.ScriptToken.TITLECOLOR:return this.titleColor;case JSV.common.ScriptToken.UNITSCOLOR:return this.unitsColor}},"JSV.common.ScriptToken");c(b,"getOverlayLegendData",function(){for(var a=this.currentGraphSet.nSpectra,b=Array(a),
c=this.getSpectrumAt(0).getFilePath(),f=this.getSpectrumAt(a-1).getFilePath(),c=null!=c&&null!=f&&!c.equals(f),f=0;f<a;f++){var e=Array(3),g=this.getSpectrumAt(f),j=g.getTitle();c&&(j=JSV.common.JSVFileManager.getTagName(g.getFilePath())+" - "+j);g=this.getCurrentPlotColor(f);e[0]=new Integer(f+1);e[1]=g;e[2]=" "+j;b[f]=e}return b});c(b,"setColorOrFont",function(a,b){if(null==b){for(var c,f=a.elementColors.entrySet().iterator();f.hasNext()&&((c=f.next())||1);)this.setColorOrFont(a,c.getKey());this.setColorOrFont(a,
JSV.common.ScriptToken.DISPLAYFONTNAME);this.setColorOrFont(a,JSV.common.ScriptToken.TITLEFONTNAME)}else{switch(b){case JSV.common.ScriptToken.DISPLAYFONTNAME:this.setFontName(b,a.displayFontName);return;case JSV.common.ScriptToken.TITLEFONTNAME:this.setFontName(b,a.titleFontName);return}this.setColor(b,a.getElementColor(b))}},"JSV.common.ColorParameters,JSV.common.ScriptToken");c(b,"getCurrentPlotColor",function(a){return this.currentGraphSet.getPlotColor(a)},"~N");c(b,"setPrint",function(a,b){null==
a?(this.options.putAll(this.optionsSaved),this.optionsSaved=null):(this.printJobTitle=a.title,this.printingFontName=b,this.printGraphPosition=a.position,this.optionsSaved=new java.util.Hashtable,this.optionsSaved.putAll(this.options),this.gridOn=a.showGrid,this.titleOn=a.showTitles,this.setBoolean(JSV.common.ScriptToken.XSCALEON,a.showXScale),this.setBoolean(JSV.common.ScriptToken.XUNITSON,a.showXScale),this.setBoolean(JSV.common.ScriptToken.YSCALEON,a.showYScale),this.setBoolean(JSV.common.ScriptToken.YUNITSON,
a.showYScale))},"JSV.common.PrintLayout,~S");c(b,"setDefaultPrintOptions",function(a){a.showGrid=this.gridOn;a.showXScale=this.getBoolean(JSV.common.ScriptToken.XSCALEON);a.showYScale=this.getBoolean(JSV.common.ScriptToken.YSCALEON);a.showTitles=this.titleOn},"JSV.common.PrintLayout");c(b,"showDialog",function(a){var b=this.getDialog(a);this.closeAllDialogsExcept(a);if(null!=b&&C(b,"JSV.dialog.JSVDialog"))return b.reEnable();var c=this.getCurrentSpectrumIndex();if(0>c)return this.jsvp.showMessage("To enable "+
a+" first select a spectrum by clicking on it.",""+a),null;var f=this.getSpectrum(),e=this.vwr.getDialog(a,f);null==b&&a===JSV.common.Annotation.AType.Measurements&&(b=new JSV.common.MeasurementData(JSV.common.Annotation.AType.Measurements,f));null!=b&&e.setData(b);this.addDialog(c,a,e);e.reEnable();return e},"JSV.common.Annotation.AType");c(b,"printPdf",function(a,b){var c=!b.layout.equals("landscape");this.print(a,c?b.imageableHeight:b.imageableWidth,c?b.imageableWidth:b.imageableHeight,b.imageableX,
b.imageableY,b.paperHeight,b.paperWidth,c,0)},"J.api.GenericGraphics,JSV.common.PrintLayout");c(b,"print",function(a,b,c,f,e,g,j,k,l){if(0!=l)return 1;this.g2d=this.g2d0;this.isPrinting=!0;C(a,"J.api.GenericGraphics")&&(this.g2d=a,a=this.gMain);this.printGraphPosition.equals("default")?k?(b=450,c=280):(b=280,c=450):this.printGraphPosition.equals("fit to page")||(k?(b=450,c=280,f=w(w(j-c)/2),e=w(w(g-b)/2)):(b=280,c=450,e=w(w(j-280)/2),f=w(w(g-450)/2)));this.setTaintedAll();this.g2d.translateScale(null,
f,e,0.1);null==a&&(a=(new java.awt.image.BufferedImage(w(c),w(b),2)).getGraphics());this.drawGraph(a,a,a,w(c),w(b),!1,!1);this.g2d!==this.g2d0&&a!==this.gMain&&a.dispose();this.g2d=this.g2d0;this.isPrinting=!1;return 0},"~O,~N,~N,~N,~N,~N,~N,~B,~N");f(b,"keyPressed",function(a,b){if(this.isPrinting)return!1;this.checkKeyControl(a,!0);switch(a){case 27:case 127:case 8:return this.escapeKeyPressed(27!=a),this.isIntegralDrag=!1,this.setTaintedAll(),this.repaint(),!0}var c=0,f=!1;if(0==b)switch(a){case 37:case 39:this.doMouseMoved(39==
a?++this.mouseX:--this.mouseX,this.mouseY);this.repaint();f=!0;break;case 33:case 34:c=33==a?JSV.common.GraphSet.RT2:1/JSV.common.GraphSet.RT2;f=!0;break;case 40:case 38:f=40==a?-1:1,null==this.getSpectrumAt(0).getSubSpectra()?this.notifySubSpectrumChange(f,null):(this.advanceSubSpectrum(f),this.setTaintedAll(),this.repaint()),f=!0}else if(this.checkMod(a,2))switch(a){case 40:case 38:case 45:case 61:c=61==a||38==a?JSV.common.GraphSet.RT2:1/JSV.common.GraphSet.RT2;f=!0;break;case 37:case 39:this.toPeak(39==
a?1:-1),f=!0}0!=c&&(this.scaleYBy(c),this.setTaintedAll(),this.repaint());return f},"~N,~N");f(b,"keyReleased",function(a){this.isPrinting||this.checkKeyControl(a,!1)},"~N");f(b,"keyTyped",function(a,b){if(this.isPrinting)return!1;switch(a){case 110:if(0!=b)break;this.normalizeIntegral();return!0;case 26:if(2!=b)break;this.previousView();this.setTaintedAll();this.repaint();return!0;case 25:if(2!=b)break;this.nextView();this.setTaintedAll();this.repaint();return!0}return!1},"~N,~N");f(b,"mouseAction",
function(a,b,c,f,e,g){if(!this.isPrinting)switch(a){case 4:if(!this.checkMod(g,16))break;this.doMousePressed(c,f);break;case 5:this.doMouseReleased(c,f,this.checkMod(g,16));this.setTaintedAll();this.repaint();break;case 1:this.doMouseDragged(c,f);this.repaint();break;case 0:this.jsvp.getFocusNow(!1);if(0!=(g&28)){this.doMouseDragged(c,f);this.repaint();break}this.doMouseMoved(c,f);null!=this.coordStr&&this.repaint();break;case 2:if(this.checkMod(g,4)){this.jsvp.showMenu(c,f);break}this.ctrlPressed=
!1;this.doMouseClicked(c,f,this.updateControlPressed(g))}},"~N,~N,~N,~N,~N,~N");c(b,"checkMod",function(a,b){return(a&b)==b},"~N,~N");c(b,"checkKeyControl",function(a,b){switch(a){case 17:case 157:this.ctrlPressed=b;break;case 16:this.shiftPressed=b}},"~N,~B");c(b,"updateControlPressed",function(a){return this.ctrlPressed=(new Boolean(this.ctrlPressed|(this.checkMod(a,2)||this.checkMod(a,20)))).valueOf()},"~N");f(b,"mouseEnterExit",function(a,b,c,f){if(f)this.thisWidget=null,this.isIntegralDrag=!1,
this.integralShiftMode=0;else try{this.jsvp.getFocusNow(!1)}catch(e){if(E(e,Exception))System.out.println("pd "+this+" cannot focus");else throw e;}},"~N,~N,~N,~B");c(b,"setSolutionColor",function(a){var b=0<=a.indexOf("none"),c=0>a.indexOf("false");if(0>a.indexOf("all"))b=b?-1:this.vwr.getSolutionColor(c),this.getSpectrum().setFillColor(-1==b?null:this.vwr.parameters.getColor1(b));else{a=JSV.common.JSViewer.getInterface("JSV.common.Visible");for(var f=this.graphSets.size();0<=--f;)this.graphSets.get(f).setSolutionColor(a,
b,c)}},"~S");c(b,"setIRMode",function(a,b){for(var c=this.graphSets.size();0<=--c;)this.graphSets.get(c).setIRMode(a,b)},"JSV.common.Spectrum.IRMode,~S");c(b,"closeSpectrum",function(){this.vwr.close("views");this.vwr.close(this.getSourceID());this.vwr.execView("*",!0)});b=G(JSV.common.PanelData,"LinkMode",Enum);b.getMode=c(b,"getMode",function(a){if(a.equals("*"))return JSV.common.PanelData.LinkMode.ALL;for(var b,c=0,f=JSV.common.PanelData.LinkMode.values();c<f.length&&((b=f[c])||1);c++)if(b.name().equalsIgnoreCase(a))return b;
return JSV.common.PanelData.LinkMode.NONE},"~S");A(b,"ALL",0,[]);A(b,"NONE",1,[]);A(b,"AB",2,[]);A(b,"ABC",3,[]);b=G(JSV.common.PanelData,"Mouse",Enum);A(b,"UP",0,[]);A(b,"DOWN",1,[])});m("JSV.common");x(null,"JSV.common.PanelNode",["JU.SB","JSV.common.Parameters"],function(){var b=s(function(){this.legend=this.id=this.jsvp=this.fileName=this.source=this.treeNode=null;this.isSimulation=this.isView=this.isSelected=!1;this.frameTitle=null;r(this,arguments)},JSV.common,"PanelNode",null);u(b,function(a,
b,c,f){this.id=a;this.source=c;this.fileName=b;this.isSimulation=0<=c.getFilePath().indexOf("http://SIMULATION/");this.jsvp=f;null!=f&&(this.pd().getSpectrumAt(0).setId(a),this.frameTitle=f.getTitle())},"~S,~S,JSV.source.JDXSource,JSV.api.JSVPanel");c(b,"setTreeNode",function(a){this.treeNode=a},"JSV.api.JSVTreeNode");c(b,"getTreeNode",function(){return this.treeNode});c(b,"dispose",function(){this.source.dispose();null!=this.jsvp&&this.jsvp.dispose();this.legend=this.jsvp=this.source=null});c(b,
"pd",function(){return this.jsvp.getPanelData()});c(b,"getSpectrum",function(){return this.pd().getSpectrum()});c(b,"setLegend",function(a){null!=this.legend&&this.legend.dispose();return this.legend=a},"JSV.dialog.JSVDialog");f(b,"toString",function(){return(null==this.id?"":this.id+": ")+(null==this.frameTitle?this.fileName:this.frameTitle)});b.findSourceByNameOrId=c(b,"findSourceByNameOrId",function(a,b){for(var c=b.size();0<=--c;){var f=b.get(c);if(a.equals(f.id)||a.equals(f.source.getSpectra().get(0).sourceID)||
f.source.matchesFilePath(a))return f.source}for(c=b.size();0<=--c;)if(f=b.get(c),a.equals(f.fileName))return f.source;return null},"~S,JU.Lst");b.findNodeById=c(b,"findNodeById",function(a,b){if(null!=a)for(var c=b.size();0<=--c;)if(a.equals(b.get(c).id)||a.equals(b.get(c).frameTitle))return b.get(c);return null},"~S,JU.Lst");b.findNode=c(b,"findNode",function(a,b){for(var c=b.size();0<=--c;)if(b.get(c).jsvp===a)return b.get(c);return null},"JSV.api.JSVPanel,JU.Lst");b.getSpectrumListAsString=c(b,
"getSpectrumListAsString",function(a){for(var b=new JU.SB,c=0;c<a.size();c++){var f=a.get(c);f.isView||b.append(" ").append(f.id)}return b.toString().trim()},"JU.Lst");b.isOpen=c(b,"isOpen",function(a,b){if(null!=b)for(var c=a.size();0<=--c;)if(a.get(c).source.matchesFilePath(b)||b.equals(a.get(c).frameTitle))return c;return-1},"JU.Lst,~S");c(b,"setFrameTitle",function(a){this.frameTitle=a},"~S");b.getLastFileFirstNode=c(b,"getLastFileFirstNode",function(a){for(var b=a.size(),c=0==b?null:a.get(b-
1),b=b-1;0<=--b&&a.get(b).source===c.source;)c=a.get(b);return null==c?null:c.jsvp},"JU.Lst");c(b,"getInfo",function(a){var b=this.pd().getInfo(!1,a);JSV.common.Parameters.putInfo(a,b,"panelId",this.id);JSV.common.Parameters.putInfo(a,b,"panelFileName",this.fileName);JSV.common.Parameters.putInfo(a,b,"panelSource",this.source.getFilePath());return b},"~S")});m("JSV.common");x(null,"JSV.common.Parameters",["java.util.Hashtable","JSV.common.ScriptToken"],function(){var b=s(function(){this.name=null;
this.integralMinY=0.1;this.integralRange=50;this.integralOffset=30;this.integralDrawAll=!1;this.viewOffset=0;this.peakListThreshold=NaN;this.peakListInterpolation="parabolic";this.precision=2;this.htBooleans=null;r(this,arguments)},JSV.common,"Parameters",null);u(b,function(){this.htBooleans=new java.util.Hashtable;this.setBoolean(JSV.common.ScriptToken.TITLEON,!0);this.setBoolean(JSV.common.ScriptToken.ENABLEZOOM,!0);this.setBoolean(JSV.common.ScriptToken.DISPLAY2D,!0);this.setBoolean(JSV.common.ScriptToken.COORDINATESON,
!0);this.setBoolean(JSV.common.ScriptToken.PEAKTABSON,!0);this.setBoolean(JSV.common.ScriptToken.POINTSONLY,!1);this.setBoolean(JSV.common.ScriptToken.GRIDON,!0);this.setBoolean(JSV.common.ScriptToken.XSCALEON,!0);this.setBoolean(JSV.common.ScriptToken.YSCALEON,!0);this.setBoolean(JSV.common.ScriptToken.XUNITSON,!0);this.setBoolean(JSV.common.ScriptToken.YUNITSON,!0)});c(b,"setName",function(a){this.name=a;return this},"~S");c(b,"getBooleans",function(){return this.htBooleans});c(b,"setBoolean",function(a,
b){this.htBooleans.put(a,Boolean.$valueOf(b));return b},"JSV.common.ScriptToken,~B");c(b,"getBoolean",function(a){return Boolean.TRUE===this.htBooleans.get(a)},"JSV.common.ScriptToken");b.isTrue=c(b,"isTrue",function(a){return 0==a.length||Boolean.parseBoolean(a)},"~S");b.getTFToggle=c(b,"getTFToggle",function(a){return a.equalsIgnoreCase("TOGGLE")?null:JSV.common.Parameters.isTrue(a)?Boolean.TRUE:Boolean.FALSE},"~S");c(b,"setP",function(a,b,c){switch(b){default:return;case JSV.common.ScriptToken.COORDINATESON:case JSV.common.ScriptToken.DISPLAY1D:case JSV.common.ScriptToken.DISPLAY2D:case JSV.common.ScriptToken.ENABLEZOOM:case JSV.common.ScriptToken.GRIDON:case JSV.common.ScriptToken.POINTSONLY:case JSV.common.ScriptToken.PEAKTABSON:case JSV.common.ScriptToken.REVERSEPLOT:case JSV.common.ScriptToken.TITLEON:case JSV.common.ScriptToken.TITLEBOLDON:case JSV.common.ScriptToken.XSCALEON:case JSV.common.ScriptToken.XUNITSON:case JSV.common.ScriptToken.YSCALEON:case JSV.common.ScriptToken.YUNITSON:c=
JSV.common.Parameters.getTFToggle(c);if(null!=c){this.setBoolean(b,c.booleanValue());break}if(null==a)return;c=!a.getBoolean(b);switch(b){case JSV.common.ScriptToken.XSCALEON:this.setBoolean(JSV.common.ScriptToken.XUNITSON,c);a.setBoolean(JSV.common.ScriptToken.XUNITSON,c);break;case JSV.common.ScriptToken.YSCALEON:this.setBoolean(JSV.common.ScriptToken.YUNITSON,c),a.setBoolean(JSV.common.ScriptToken.YUNITSON,c)}this.setBoolean(b,c)}null!=a&&a.setBooleans(this,b)},"JSV.common.PanelData,JSV.common.ScriptToken,~S");
b.isMatch=c(b,"isMatch",function(a,b){return null==a||b.equalsIgnoreCase(a)},"~S,~S");b.putInfo=c(b,"putInfo",function(a,b,c,f){null!=f&&JSV.common.Parameters.isMatch(a,c)&&b.put(null==a?c:a,f)},"~S,java.util.Map,~S,~O")});m("JSV.common");x(["JSV.common.MeasurementData"],"JSV.common.PeakData",["JU.DF","JSV.common.Coordinate","$.PeakPick"],function(){var b=s(function(){this.maxY=this.minY=this.thresh=0;r(this,arguments)},JSV.common,"PeakData",JSV.common.MeasurementData);c(b,"getThresh",function(){return this.thresh});
f(b,"getDataHeader",function(){return this.spec.isHNMR()?JSV.common.PeakData.HNMR_HEADER:z(-1,["peak",this.spec.getXUnits(),this.spec.getYUnits()])});f(b,"getMeasurementListArray",function(){for(var a=Array(this.size()),b=S(-1,[-1E100,1E100,1E100]),c,f=0,e=this.size();0<=--e;f++)c=this.spec.getPeakListArray(this.get(e),b,this.maxY),a[f]=2==c.length?z(-1,[""+(f+1),JU.DF.formatDecimalDbl(c[0],2),JU.DF.formatDecimalDbl(c[1],4)]):z(-1,[""+(f+1),JU.DF.formatDecimalDbl(c[0],4),JU.DF.formatDecimalDbl(c[1],
4),JU.DF.formatDecimalDbl(c[2],2),0==c[3]?"":JU.DF.formatDecimalDbl(c[3],2),0==c[4]?"":JU.DF.formatDecimalDbl(c[4],2),0==c[5]?"":JU.DF.formatDecimalDbl(c[5],2)]);return a},"~S");f(b,"getMeasurementListArrayReal",function(){for(var a=S(this.size(),0),b=S(-1,[-1E100,1E100,1E100]),c=0,f=this.size();0<=--f;c++)a[c]=this.spec.getPeakListArray(this.get(f),b,this.maxY);return a},"~S");c(b,"getInfo",function(a){a.put("interpolation",this.myParams.peakListInterpolation);a.put("threshold",Double.$valueOf(this.myParams.peakListThreshold));
ba(this,JSV.common.PeakData,"getInfo",[a])},"java.util.Map");c(b,"setPeakList",function(a,b,c){this.precision=-2147483648==b?this.spec.getDefaultUnitPrecision():b;var f=this.spec.getXYCoords();if(!(3>f.length)){this.clear();null!=a&&(this.myParams.peakListInterpolation=a.peakListInterpolation,this.myParams.peakListThreshold=a.peakListThreshold);a=this.myParams.peakListInterpolation.equals("parabolic");var e=this.spec.isInverted();this.minY=c.minYOnScale;this.maxY=c.maxYOnScale;var g=c.minXOnScale;
c=c.maxXOnScale;this.thresh=this.myParams.peakListThreshold;Double.isNaN(this.thresh)&&(this.thresh=this.myParams.peakListThreshold=(this.minY+this.maxY)/2);var j=0,k=S(-1,[f[0].getYVal(),j=f[1].getYVal(),0]),l=0;if(e)for(e=2;e<f.length;e++){var m=k[e%3]=f[e].getYVal();if(j<this.thresh&&(k[(e-2)%3]>j&&j<m)&&(j=a?JSV.common.Coordinate.parabolicInterpolation(f,e-1):f[e-1].getXVal(),j>=g||j<=c))if(j=(new JSV.common.PeakPick).setValue(j,m,this.spec,null,0),this.addLast(j),100==++l)break;j=m}else for(e=
2;e<f.length;e++){m=k[e%3]=f[e].getYVal();if(j>this.thresh&&(k[(e-2)%3]<j&&j>m)&&(j=a?JSV.common.Coordinate.parabolicInterpolation(f,e-1):f[e-1].getXVal(),j>=g&&j<=c&&(j=(new JSV.common.PeakPick).setValue(j,m,this.spec,JU.DF.formatDecimalDbl(j,b),j),this.addLast(j),100==++l)))break;j=m}}},"JSV.common.Parameters,~N,JSV.common.ScaleData");b.HNMR_HEADER=z(-1,"peak shift/ppm intens shift/hz diff/hz 2-diff 3-diff".split(" "))});m("JSV.common");x(null,"JSV.common.PeakInfo",["JU.PT"],function(){var b=s(function(){this.px1=
this.px0=this.yMax=this.yMin=this.xMax=this.xMin=0;this.atomKey=this._match=this.spectrum=this.id=this.atoms=this.model=this.title=this.filePathForwardSlash=this.file=this.index=this.type2=this.type=this.stringInfo=null;r(this,arguments)},JSV.common,"PeakInfo",null);u(b,function(a){if(null!=a){this.stringInfo=a;this.type=JU.PT.getQuotedAttribute(a,"type");null==this.type&&(this.type="");this.type=this.type.toUpperCase();var b=this.type.indexOf("/");this.type2=0>b?"":JSV.common.PeakInfo.fixType(this.type.substring(this.type.indexOf("/")+
1));this.type=0<=b?JSV.common.PeakInfo.fixType(this.type.substring(0,b))+"/"+this.type2:JSV.common.PeakInfo.fixType(this.type);this.id=JU.PT.getQuotedAttribute(a,"id");this.index=JU.PT.getQuotedAttribute(a,"index");this.file=JU.PT.getQuotedAttribute(a,"file");System.out.println("PeakInfo file="+this.file);this.filePathForwardSlash=null==this.file?null:this.file.$replace("\\","/");this.model=JU.PT.getQuotedAttribute(a,"model");a.contains('baseModel=""')||(this.atoms=JU.PT.getQuotedAttribute(a,"atoms"));
this.atomKey=","+this.atoms+",";this.title=JU.PT.getQuotedAttribute(a,"title");this._match=JU.PT.getQuotedAttribute(a,"_match");this.xMax=JU.PT.parseFloat(JU.PT.getQuotedAttribute(a,"xMax"));this.xMin=JU.PT.parseFloat(JU.PT.getQuotedAttribute(a,"xMin"));this.yMax=JU.PT.parseFloat(JU.PT.getQuotedAttribute(a,"yMax"));this.yMin=JU.PT.parseFloat(JU.PT.getQuotedAttribute(a,"yMin"))}},"~S");c(b,"isClearAll",function(){return null==this.spectrum});c(b,"getType",function(){return this.type});c(b,"getAtoms",
function(){return this.atoms});c(b,"getXMax",function(){return this.xMax});c(b,"getXMin",function(){return this.xMin});c(b,"getYMin",function(){return this.yMin});c(b,"getYMax",function(){return this.yMax});c(b,"getX",function(){return(this.xMax+this.xMin)/2});c(b,"getMatch",function(){return this._match});b.fixType=c(b,"fixType",function(a){return a.equals("HNMR")?"1HNMR":a.equals("CNMR")?"13CNMR":a},"~S");f(b,"toString",function(){return this.stringInfo});c(b,"getIndex",function(){return this.index});
c(b,"getTitle",function(){return this.title});c(b,"checkFileIndex",function(a,b,c){return null!=c?0<=this.atomKey.indexOf(c):b.equals(this.index)&&(a.equals(this.file)||a.equals(this.filePathForwardSlash))},"~S,~S,~S");c(b,"checkFileTypeModel",function(a,b,c){return a.equals(this.file)&&this.checkModel(c)&&this.type.endsWith(b)},"~S,~S,~S");c(b,"checkTypeModel",function(a,b){return this.checkType(a)&&this.checkModel(b)},"~S,~S");c(b,"checkModel",function(a){return null!=a&&a.equals(this.model)},"~S");
c(b,"checkType",function(a){return a.endsWith(this.type)},"~S");c(b,"checkTypeMatch",function(a){return this.checkType(a.type)&&(this.checkId(a._match)||this.checkModel(a._match)||0<=this.title.toUpperCase().indexOf(a._match))},"JSV.common.PeakInfo");c(b,"checkId",function(a){return null==a?!1:null!=this.id&&a.toUpperCase().startsWith("ID=")&&a.substring(3).equals(this.id)||(a=a.toUpperCase()).startsWith("INDEX=")&&a.equals("INDEX="+this.index)||a.startsWith("#=")&&a.equals("#="+this.index)},"~S");
c(b,"getModel",function(){return this.model});c(b,"getFilePath",function(){return this.file});c(b,"autoSelectOnLoad",function(){return this.type.startsWith("GC")});c(b,"setPixelRange",function(a,b){this.px0=a;this.px1=b},"~N,~N");c(b,"checkRange",function(a,b){return(2147483647!=a?this.px0<=a&&this.px1>=a:b>=this.xMin&&b<=this.xMax)?Math.abs(b-this.getX()):1E100},"~N,~N");c(b,"getXPixel",function(){return w((this.px0+this.px1)/2)})});m("JSV.common");x(["JSV.common.Measurement"],"JSV.common.PeakPick",
null,function(){var b=G(JSV.common,"PeakPick",JSV.common.Measurement);c(b,"setValue",function(a,b,c,f,e){null==f?(this.set(a,b),this.setPt2(c,!1)):(this.setA(a,b,c,f,!1,!1,0,6),this.value=e,this.setPt2(this.getXVal(),this.getYVal()));return this},"~N,~N,JSV.common.Spectrum,~S,~N")});m("JSV.common");x(["java.util.EventObject"],"JSV.common.PeakPickEvent",null,function(){var b=s(function(){this.peakInfo=this.coord=null;r(this,arguments)},JSV.common,"PeakPickEvent",java.util.EventObject);u(b,function(a,
b,c){K(this,JSV.common.PeakPickEvent,[a]);this.coord=b;this.peakInfo=null==c?null:c},"~O,JSV.common.Coordinate,JSV.common.PeakInfo");c(b,"getCoord",function(){return this.coord});c(b,"getPeakInfo",function(){return this.peakInfo});f(b,"toString",function(){return null==this.peakInfo?null:this.peakInfo.toString()})});m("JSV.common");x(["JSV.common.Coordinate","$.ScriptToken"],"JSV.common.PlotWidget",null,function(){var b=s(function(){this.yPixel1=this.xPixel1=this.yPixel0=this.xPixel0=0;this.is2Donly=
this.is2D=this.isXtype=this.isPinOrCursor=this.isPin=!1;this.isEnabled=!0;this.isVisible=!1;this.color=this.name=null;r(this,arguments)},JSV.common,"PlotWidget",JSV.common.Coordinate);N(b,function(){this.color=JSV.common.ScriptToken.PLOTCOLOR});u(b,function(a){K(this,JSV.common.PlotWidget,[]);this.name=a;this.isPin="p"==a.charAt(0);this.isPinOrCursor="z"!=a.charAt(0);this.isXtype=0<=a.indexOf("x");this.is2Donly=(this.is2D=0<=a.indexOf("2D"))&&"p"==a.charAt(0)},"~S");f(b,"toString",function(){return this.name+
(!this.isPinOrCursor?""+this.xPixel0+" "+this.yPixel0+" / "+this.xPixel1+" "+this.yPixel1:" x="+this.getXVal()+"/"+this.xPixel0+" y="+this.getYVal()+"/"+this.yPixel0)});c(b,"selected",function(a,b){return this.isVisible&&5>Math.abs(a-this.xPixel0)&&5>Math.abs(b-this.yPixel0)},"~N,~N");c(b,"setX",function(a,b){this.setXVal(a);this.xPixel0=this.xPixel1=b},"~N,~N");c(b,"setY",function(a,b){this.setYVal(a);this.yPixel0=this.yPixel1=b},"~N,~N");c(b,"getValue",function(){return this.isXtype?this.getXVal():
this.getYVal()});c(b,"setEnabled",function(a){this.isEnabled=a},"~B")});m("JSV.common");var ab=s(function(){this.imageableWidth=this.imageableHeight=this.paperWidth=this.paperHeight=this.imageableY=this.imageableX=0;this.layout="landscape";this.position="fit to page";this.showTitles=this.showYScale=this.showXScale=this.showGrid=!0;this.font="Helvetica";this.paper=null;this.asPDF=!0;this.date=this.title=null;r(this,arguments)},JSV.common,"PrintLayout",null);N(ab,function(){this.paperHeight=F(72*Math.min(11,
11.69));this.paperWidth=F(72*Math.min(8.5,8.27));this.imageableHeight=this.paperHeight;this.imageableWidth=this.paperWidth});u(ab,function(b){null!=b&&(this.asPDF=!0,b.setDefaultPrintOptions(this))},"JSV.common.PanelData");m("JSV.common");x(null,"JSV.common.RepaintManager",["JSV.common.JSViewer"],function(){var b=s(function(){this.repaintPending=!1;this.vwr=null;r(this,arguments)},JSV.common,"RepaintManager",null);u(b,function(a){this.vwr=a},"JSV.common.JSViewer");c(b,"refresh",function(){if(this.repaintPending)return!1;
this.repaintPending=!0;var a=this.vwr.html5Applet,b=JSV.common.JSViewer.isJS&&!JSV.common.JSViewer.isSwingJS?JSV.common.JSViewer.jsmolObject:null;null==b?this.vwr.selectedPanel.repaint():(b.repaint(a,!1),this.repaintDone());return!0});c(b,"repaintDone",function(){this.repaintPending=!1;this.notify()})});m("JSV.common");x(null,"JSV.common.ScaleData",["JSV.common.Coordinate"],function(){var b=s(function(){this.maxX=this.minX=this.pointCount=this.endDataPointIndex=this.startDataPointIndex=this.initMaxY=
this.initMinY=this.initMaxYOnScale=this.initMinYOnScale=0;this.firstX=NaN;this.specShift=this.maxXOnScale=this.minXOnScale=0;this.minorTickCounts=this.steps=this.exportPrecision=this.precision=null;this.maxY=this.minY=this.maxYOnScale=this.minYOnScale=0;this.isShiftZoomedY=!1;this.spectrumScaleFactor=1;this.spectrumYRef=0;this.userYFactor=1;this.yFactorForScale=this.xFactorForScale=this.maxY2D=this.minY2D=this.firstY=0;r(this,arguments)},JSV.common,"ScaleData",null);N(b,function(){this.precision=
D(2,0);this.exportPrecision=D(2,0);this.steps=S(2,0);this.minorTickCounts=D(2,0)});u(b,function(){});u(b,function(a,b){this.startDataPointIndex=a;this.endDataPointIndex=b;this.pointCount=this.endDataPointIndex-this.startDataPointIndex+1},"~N,~N");u(b,function(a,b,c,f,e){this.minX=JSV.common.Coordinate.getMinX(a,b,c);this.maxX=JSV.common.Coordinate.getMaxX(a,b,c);this.minY=JSV.common.Coordinate.getMinY(a,b,c);0<this.minY&&!f&&(this.minY=0);this.maxY=JSV.common.Coordinate.getMaxY(a,b,c);this.setScale(f,
e)},"~A,~N,~N,~B,~B");c(b,"setScale",function(a,b){this.setXScale();a||(this.maxXOnScale+=this.steps[0]/2);this.setYScale(this.minY,this.maxY,!0,b)},"~B,~B");c(b,"setXScale",function(){var a=this.setScaleParams(this.minX,this.maxX,0);this.firstX=Math.floor(this.minX/a)*a;1E-4<Math.abs((this.minX-this.firstX)/a)&&(this.firstX+=a);this.minXOnScale=this.minX;this.maxXOnScale=this.maxX});c(b,"isYZeroOnScale",function(){return this.minYOnScale<this.spectrumYRef&&this.maxYOnScale>this.spectrumYRef});c(b,
"setYScale",function(a,b,c,f){0==a&&0==b&&(b=1);this.isShiftZoomedY&&(a=this.minYOnScale,b=this.maxYOnScale);var e=this.setScaleParams(a,b,1),g=f?e/2:e/4;f=f?e/4:e/2;this.isShiftZoomedY||(this.minYOnScale=0==a?0:c?g*Math.floor(a/g):a,this.maxYOnScale=c?f*Math.ceil(1.05*b/f):b);this.firstY=0==a?0:Math.floor(a/g)*g;if(0>this.minYOnScale&&0<this.maxYOnScale)for(this.firstY=0;this.firstY-e>this.minYOnScale;)this.firstY-=e;else 0!=this.minYOnScale&&1E-4<Math.abs((a-this.firstY)/g)&&(this.firstY+=g);c&&
(this.initMinYOnScale=this.minYOnScale,this.initMaxYOnScale=this.maxYOnScale,this.initMinY=a,this.initMaxY=b)},"~N,~N,~B,~B");c(b,"scale2D",function(a){var b=this.maxY-this.minY;1==a?(this.maxY=this.initMaxY,this.minY=this.initMinY):this.maxY=this.minY+b/a},"~N");c(b,"setXRange",function(a,b){this.minX=a;this.maxX=b;this.setXScale()},"~N,~N");b.getXRange=c(b,"getXRange",function(a,b,c,f,e,g,j,k){for(var l=0,m=0,l=e;l<=g;l++)if(b[l].getXVal()>=c){j[a]=l;m=1;break}for(;++l<=g&&b[l].getXVal()<=f;)m++;
k[a]=j[a]+m-1;return m},"~N,~A,~N,~N,~N,~N,~A,~A");c(b,"setScaleParams",function(a,b,c){a=b==a?1:Math.abs(b-a)/14;var f=Math.log10(Math.abs(a));b=w(Math.floor(f));this.exportPrecision[c]=b;this.precision[c]=0>=b?Math.min(8,1-b):3<b?-2:0;a=0;for(f=Math.pow(10,f-b);f>JSV.common.ScaleData.NTICKS[a];)a++;this.steps[c]=Math.pow(10,b)*JSV.common.ScaleData.NTICKS[a];f=Math.log10(Math.abs(100010*this.steps[c]));b=f-Math.floor(f);for(a=f=0;a<JSV.common.ScaleData.NTICKS.length;a++)if(0.001>Math.abs(b-JSV.common.ScaleData.LOGTICKS[a])){f=
JSV.common.ScaleData.NTICKS[a];break}this.minorTickCounts[c]=f;return this.steps[c]},"~N,~N,~N");c(b,"isInRangeX",function(a){return a>=this.minX&&a<=this.maxX},"~N");c(b,"addSpecShift",function(a){this.specShift+=a;this.minX+=a;this.maxX+=a;this.minXOnScale+=a;this.maxXOnScale+=a;this.firstX+=a},"~N");c(b,"getInfo",function(a){a.put("specShift",Double.$valueOf(this.specShift));a.put("minX",Double.$valueOf(this.minX));a.put("maxX",Double.$valueOf(this.maxX));a.put("minXOnScale",Double.$valueOf(this.minXOnScale));
a.put("maxXOnScale",Double.$valueOf(this.maxXOnScale));a.put("minY",Double.$valueOf(this.minY));a.put("maxY",Double.$valueOf(this.maxY));a.put("minYOnScale",Double.$valueOf(this.minYOnScale));a.put("maxYOnScale",Double.$valueOf(this.maxYOnScale));a.put("minorTickCountX",Integer.$valueOf(this.minorTickCounts[0]));a.put("xStep",Double.$valueOf(this.steps[0]));return a},"java.util.Map");c(b,"setMinMax",function(a,b,c,f){this.minX=a;this.maxX=b;this.minY=c;this.maxY=f},"~N,~N,~N,~N");c(b,"toX",function(a,
b,c){return this.toXScaled(a,b,c,this.xFactorForScale)},"~N,~N,~B");c(b,"toX0",function(a,b,c,f){return this.toXScaled(a,c,f,(this.maxXOnScale-this.minXOnScale)/(c-b))},"~N,~N,~N,~B");c(b,"toXScaled",function(a,b,c,f){return c?this.maxXOnScale-(b-a)*f:this.minXOnScale+(b-a)*f},"~N,~N,~B,~N");c(b,"toPixelX",function(a,b,c,f){return this.toPixelXScaled(a,b,c,f,this.xFactorForScale)},"~N,~N,~N,~B");c(b,"toPixelX0",function(a,b,c,f){return this.toPixelXScaled(a,b,c,f,(this.maxXOnScale-this.minXOnScale)/
(c-b))},"~N,~N,~N,~B");c(b,"toPixelXScaled",function(a,b,c,f,e){a=w((a-this.minXOnScale)/e);return f?b+a:c-a},"~N,~N,~N,~B,~N");c(b,"toY",function(a,b){return this.maxYOnScale+(b-a)*this.yFactorForScale},"~N,~N");c(b,"toY0",function(a,b,c){return Math.max(this.minYOnScale,Math.min(this.maxYOnScale+(b-a)*((this.maxYOnScale-this.minYOnScale)/(c-b)),this.maxYOnScale))},"~N,~N,~N");c(b,"toPixelY",function(a,b){return Double.isNaN(a)?-2147483648:b-w(((a-this.spectrumYRef)*this.userYFactor+this.spectrumYRef-
this.minYOnScale)/this.yFactorForScale)},"~N,~N");c(b,"toPixelY0",function(a,b,c){return w(b+(this.maxYOnScale-a)/((this.maxYOnScale-this.minYOnScale)/(c-b)))},"~N,~N,~N");c(b,"setXYScale",function(a,b,c){var f=this.spectrumYRef,e=this.spectrumScaleFactor,g=1!=e||this.isShiftZoomedY,j=g?this.initMinYOnScale:this.minY,k=g?this.initMaxYOnScale:this.maxY;g&&f<j&&(f=j);g&&f>k&&(f=k);this.setYScale((j-f)/e+f,(k-f)/e+f,1==e,c);this.xFactorForScale=(this.maxXOnScale-this.minXOnScale)/(a-1);this.yFactorForScale=
(this.maxYOnScale-this.minYOnScale)/(b-1)},"~N,~N,~B");b.copyScaleFactors=c(b,"copyScaleFactors",function(a,b){for(var c=0;c<a.length;c++)b[c].spectrumScaleFactor=a[c].spectrumScaleFactor,b[c].spectrumYRef=a[c].spectrumYRef,b[c].userYFactor=a[c].userYFactor,b[c].specShift=a[c].specShift,b[c].isShiftZoomedY=a[c].isShiftZoomedY},"~A,~A");b.copyYScales=c(b,"copyYScales",function(a,b){for(var c=0;c<a.length;c++)b[c].initMinYOnScale=a[c].initMinYOnScale,b[c].initMaxYOnScale=a[c].initMaxYOnScale,b[c].minY=
a[c].minY,b[c].maxY=a[c].maxY,a[c].isShiftZoomedY&&(b[c].isShiftZoomedY=!0,b[c].minYOnScale=a[c].minYOnScale,b[c].maxYOnScale=a[c].maxYOnScale)},"~A,~A");b.setDataPointIndices=c(b,"setDataPointIndices",function(a,b,c,f,e,g){for(var j=0,k=a.size(),l=0;l<k;l++){var m=a.get(l).getXYCoords();JSV.common.ScaleData.getXRange(l,m,b,c,0,m.length-1,e,g)>=f&&j++}return j==k},"JU.Lst,~N,~N,~N,~A,~A");b.fixScale=c(b,"fixScale",function(a){if(!a.isEmpty())for(;;){for(var b,c=a.entrySet().iterator();c.hasNext()&&
((b=c.next())||1);){var f=b.getValue(),e=f.indexOf("E");0<=e&&(f=f.substring(0,e));if(0>f.indexOf(".")||!f.endsWith("0")&&!f.endsWith("."))return}for(c=a.entrySet().iterator();c.hasNext()&&((b=c.next())||1);)f=b.getValue(),e=f.indexOf("E"),0<=e?b.setValue(f.substring(0,e-1)+f.substring(e)):b.setValue(f.substring(0,f.length-1))}},"java.util.Map");c(b,"scaleBy",function(a){if(this.isShiftZoomedY){var b=this.isYZeroOnScale()?this.spectrumYRef:(this.minYOnScale+this.maxYOnScale)/2;this.minYOnScale=b-
(b-this.minYOnScale)/a;this.maxYOnScale=b-(b-this.maxYOnScale)/a}else this.spectrumScaleFactor*=a},"~N");b.NTICKS=D(-1,[2,5,10,10]);b.LOGTICKS=S(-1,[Math.log10(2),Math.log10(5),0,1])});m("JSV.common");x(["java.lang.Enum"],"JSV.common.ScriptToken",["java.util.Hashtable","JU.Lst","$.PT","$.SB","JSV.common.ScriptTokenizer"],function(){var b=s(function(){this.description=this.tip=null;r(this,arguments)},JSV.common,"ScriptToken",Enum);c(b,"getTip",function(){return"  "+("T"===this.tip?"TRUE/FALSE/TOGGLE":
"TF"===this.tip?"TRUE or FALSE":"C"===this.tip?"COLOR":this.tip)});u(b,function(){});u(b,function(a){this.tip=a;this.description=""},"~S");u(b,function(a,b){this.tip=a;this.description="-- "+b},"~S,~S");b.getParams=c(b,"getParams",function(){if(null==JSV.common.ScriptToken.htParams){JSV.common.ScriptToken.htParams=new java.util.Hashtable;for(var a,b=0,c=JSV.common.ScriptToken.values();b<c.length&&((a=c[b])||1);b++)JSV.common.ScriptToken.htParams.put(a.name(),a)}return JSV.common.ScriptToken.htParams});
b.getScriptToken=c(b,"getScriptToken",function(a){a=JSV.common.ScriptToken.getParams().get(a.toUpperCase());return null==a?JSV.common.ScriptToken.UNKNOWN:a},"~S");b.getScriptTokenList=c(b,"getScriptTokenList",function(a,b){null!=a&&(a=a.toUpperCase());var c=new JU.Lst;if(b){var f=JSV.common.ScriptToken.getScriptToken(a);null!=f&&c.addLast(f)}else for(var e=JSV.common.ScriptToken.getParams().entrySet().iterator();e.hasNext()&&((f=e.next())||1);)(null==a||f.getKey().startsWith(a))&&null!=f.getValue().tip&&
c.addLast(f.getValue());return c},"~S,~B");b.getValue=c(b,"getValue",function(a,b,c){if(!b.hasMoreTokens())return"";switch(a){default:return JSV.common.ScriptTokenizer.nextStringToken(b,!0);case JSV.common.ScriptToken.CLOSE:case JSV.common.ScriptToken.GETPROPERTY:case JSV.common.ScriptToken.INTEGRATION:case JSV.common.ScriptToken.INTEGRATE:case JSV.common.ScriptToken.JMOL:case JSV.common.ScriptToken.LABEL:case JSV.common.ScriptToken.LOAD:case JSV.common.ScriptToken.PEAK:case JSV.common.ScriptToken.PLOTCOLORS:case JSV.common.ScriptToken.YSCALE:case JSV.common.ScriptToken.WRITE:return JSV.common.ScriptToken.removeCommandName(c);
case JSV.common.ScriptToken.SELECT:case JSV.common.ScriptToken.OVERLAY:case JSV.common.ScriptToken.VIEW:case JSV.common.ScriptToken.ZOOM:return JSV.common.ScriptToken.removeCommandName(c).$replace(","," ").trim()}},"JSV.common.ScriptToken,JSV.common.ScriptTokenizer,~S");b.removeCommandName=c(b,"removeCommandName",function(a){var b=a.indexOf(" ");return 0>b?"":a.substring(b).trim()},"~S");b.getKey=c(b,"getKey",function(a){var b=a.nextToken();if(b.startsWith("#")||b.startsWith("//"))return null;b.equalsIgnoreCase("SET")&&
(b=a.nextToken());return b.toUpperCase()},"JSV.common.ScriptTokenizer");b.getTokens=c(b,"getTokens",function(a){a.startsWith("'")&&a.endsWith("'")&&(a='"'+JU.PT.trim(a,"'")+'"');var b=new JU.Lst;for(a=new JSV.common.ScriptTokenizer(a,!1);a.hasMoreTokens();){var c=JSV.common.ScriptTokenizer.nextStringToken(a,!1);if(c.startsWith("//")||c.startsWith("#"))break;b.addLast(c)}return b},"~S");b.getNameList=c(b,"getNameList",function(a){if(0==a.size())return"";for(var b=new JU.SB,c=0;c<a.size();c++)b.append(",").append(a.get(c).toString());
return b.toString().substring(1)},"JU.Lst");c(b,"getDescription",function(){return this.description});b.htParams=null;A(b,"UNKNOWN",0,[]);A(b,"APPLETID",1,[]);A(b,"APPLETREADYCALLBACKFUNCTIONNAME",2,[]);A(b,"AUTOINTEGRATE",3,["TF","automatically integrate an NMR spectrum"]);A(b,"BACKGROUNDCOLOR",4,["C","set the background color"]);A(b,"CLOSE",5,["spectrumId or fileName or ALL or VIEWS or SIMULATIONS","close one or more views or simulations"]);A(b,"COMPOUNDMENUON",6,[]);A(b,"COORDCALLBACKFUNCTIONNAME",
7,[]);A(b,"COORDINATESCOLOR",8,["C","set the color of the coordinates shown in the upper right-hand corner"]);A(b,"COORDINATESON",9,["T","turn on or off the coordinates shown in the upper right-hand corner"]);A(b,"DEBUG",10,["TF","turn debugging on and off"]);A(b,"DEFAULTLOADSCRIPT",11,['"script..."',"set the script to be run after each file is loaded"]);A(b,"DEFAULTNMRNORMALIZATION",12,["maxYvalue","set the value to be given the largest peak in an HMR spectrum"]);A(b,"DISPLAYFONTNAME",13,[]);A(b,
"DISPLAY1D",14,["T","turn on or off display of 1D spectra when 1D and 2D spectra are loaded"]);A(b,"DISPLAY2D",15,["T","turn on or off display of the 2D spectrum when 1D and 2D spectra are loaded"]);A(b,"ENABLEZOOM",16,["T","allow or disallow zooming"]);A(b,"ENDINDEX",17,[]);A(b,"FINDX",18,["value","move the vertical-line cursor to a specific x-axis value"]);A(b,"GETPROPERTY",19,["[propertyName] or ALL or NAMES","get a property value or all property values as key/value pairs, or a list of names"]);
A(b,"GETSOLUTIONCOLOR",20,[" FILL or FILLNONE or FILLALL or FILLALLNONE","estimate the solution color for UV/VIS spectra"]);A(b,"GRIDCOLOR",21,["C","color of the grid"]);A(b,"GRIDON",22,["T","turn the grid lines on or off"]);A(b,"HELP",23,["[command]","get this listing or help for a specific command"]);A(b,"HIDDEN",24,[]);A(b,"HIGHLIGHTCOLOR",25,["C","set the highlight color"]);A(b,"HIGHLIGHT",26,["OFF or X1 X2 [OFF] or X1 X2 r g b [a]","turns on or off a highlight color, possibily setting its color, where r g b a are 0-255 or 0.0-1.0"]);
A(b,"INTEGRALOFFSET",27,["percent","sets the integral offset from baseline"]);A(b,"INTEGRALRANGE",28,["percent","sets the height of the total integration"]);A(b,"INTEGRATE",29,["","see INTEGRATION"]);A(b,"INTEGRATION",30,["ON/OFF/TOGGLE/AUTO/CLEAR/MIN value/MARK ppm1-ppm2:norm,ppm3-ppm4,...","show/hide integration or set integrals (1D 1H NMR only)"]);A(b,"INTEGRALPLOTCOLOR",31,["C","color of the integration line"]);A(b,"INTEGRATIONRATIOS",32,["'x:value,x:value,..'","annotate the spectrum with numbers or text at specific x values"]);
A(b,"INTERFACE",33,["SINGLE or OVERLAY","set how multiple spectra are displayed"]);A(b,"INVERTY",34,["","invert the Y axis"]);A(b,"IRMODE",35,["A or T or TOGGLE","set the IR mode to absorption or transmission"]);A(b,"JMOL",36,["...Jmol command...","send a command to Jmol (if present)"]);A(b,"JSV",37,[]);A(b,"LABEL",38,['x y [color and/or "text"]',"add a text label"]);A(b,"LINK",39,["AB or ABC or NONE or ALL","synchronize the crosshair of a 2D spectrum with 1D cursors"]);A(b,"LOAD",40,['[APPEND] "fileName" [first] [last]; use "" for current file; $H1/name or $C13/name for simulation',
"load a specturm"]);A(b,"LOADFILECALLBACKFUNCTIONNAME",41,[]);A(b,"LOADIMAGINARY",42,["TF","set TRUE to load imaginary NMR component"]);A(b,"MENUON",43,[]);A(b,"OBSCURE",44,[]);A(b,"OVERLAY",45,[]);A(b,"OVERLAYSTACKED",46,["TF","whether viewed spectra are shown separately, in a stack"]);A(b,"PEAK",47,["[IR,CNMR,HNMR,MS] [#nnn or ID=xxx or text] [ALL], for example: PEAK HNMR #3","highlights a peak based on its number or title text, optionally checking all loade spectra"]);A(b,"PEAKCALLBACKFUNCTIONNAME",
48,[]);A(b,"PEAKLIST",49,["[THRESHOLD=n] [INTERPOLATE=PARABOLIC or NONE]","creates a peak list based on a threshold value and parabolic or no interpolation"]);A(b,"PEAKOVERCOLOR",50,["C","sets the color of peak backgrounds when moused over"]);A(b,"PEAKTABCOLOR",51,["C","sets the color of peak marks for a peak listing"]);A(b,"PEAKTABSON",52,["T","show peak tabs for simulated spectra"]);A(b,"PLOTAREACOLOR",53,["C","sets the color of the plot background"]);A(b,"PLOTCOLOR",54,["C","sets the color of the graph line"]);
A(b,"PLOTCOLORS",55,["color,color,color,...","sets the colors of multiple plots"]);A(b,"POINTSONLY",56,["TF","show points only for all data"]);A(b,"PRINT",57,["","prints the current spectrum"]);A(b,"REVERSEPLOT",58,["T","reverses the x-axis of a spectrum"]);A(b,"SCALEBY",59,["factor","multiplies the y-scale of the spectrum by a factor"]);A(b,"SCALECOLOR",60,["C","sets the color of the x-axis and y-axis scales"]);A(b,"SCRIPT",61,["filename.jsv","runs a script from a file"]);A(b,"SELECT",62,["spectrumID, spectrumID,...",
"selects one or more spectra based on IDs"]);A(b,"SETPEAK",63,["xNew, xOld xNew, ?, or NONE","sets nearest peak to xOld ppm to a new value; NONE resets (1D NMR only)"]);A(b,"SETX",64,["xNew, xOld xNew, ?, or NONE","sets an old ppm position in the spectrum to a new value; NONE resets (1D NMR only)"]);A(b,"SHIFTX",65,["dx or NONE","shifts the x-axis of a 1D NMR spectrum by the given ppm; NONE resets (1D NMR only)"]);A(b,"SHOWERRORS",66,["shows recent errors"]);A(b,"SHOWINTEGRATION",67,["T","shows an integration listing"]);
A(b,"SHOWMEASUREMENTS",68,["T","shows a listing of measurements"]);A(b,"SHOWMENU",69,["displays the popup menu"]);A(b,"SHOWPEAKLIST",70,["T","shows a listing for peak picking"]);A(b,"SHOWPROPERTIES",71,["displays the header information of a JDX file"]);A(b,"SHOWSOURCE",72,["displays the source JDX file associated with the selected data"]);A(b,"SPECTRUM",73,["id","displays a specific spectrum, where id is a number 1, 2, 3... or a file.spectrum number such as 2.1"]);A(b,"SPECTRUMNUMBER",74,["n","displays the nth spectrum loaded"]);
A(b,"STACKOFFSETY",75,["percent","sets the y-axis offset of stacked spectra"]);A(b,"STARTINDEX",76,[]);A(b,"SYNCCALLBACKFUNCTIONNAME",77,[]);A(b,"SYNCID",78,[]);A(b,"TEST",79,[]);A(b,"TITLEON",80,["T","turns the title in the bottom left corner on or off"]);A(b,"TITLEBOLDON",81,["T","makes the title bold"]);A(b,"TITLECOLOR",82,["C","sets the color of the title"]);A(b,"TITLEFONTNAME",83,["fontName","sets the title font"]);A(b,"UNITSCOLOR",84,["C","sets the color of the x-axis and y-axis units"]);A(b,
"VERSION",85,[]);A(b,"VIEW",86,['spectrumID, spectrumID, ... Example: VIEW 3.1, 3.2  or  VIEW "acetophenone"',"creates a view of one or more spectra"]);A(b,"XSCALEON",87,["T","set FALSE to turn off the x-axis scale"]);A(b,"XUNITSON",88,["T","set FALSE to turn off the x-axis units"]);A(b,"YSCALE",89,["[ALL] lowValue highValue"]);A(b,"YSCALEON",90,["T","set FALSE to turn off the y-axis scale"]);A(b,"YUNITSON",91,["T","set FALSE to turn off the y-axis units"]);A(b,"WINDOW",92,[]);A(b,"WRITE",93,['[XY,DIF,DIFDUP,PAC,FIX,SQZ,AML,CML,JPG,PDF,PNG,SVG] "filename"',
"writes a file in the specified format"]);A(b,"ZOOM",94,["OUT or PREVIOUS or NEXT or x1,x2 or x1,y1 x2,y2","sets the zoom"]);A(b,"ZOOMBOXCOLOR",95,[]);A(b,"ZOOMBOXCOLOR2",96,[])});m("JSV.common");x(null,"JSV.common.ScriptTokenizer",["JU.PT"],function(){var b=s(function(){this.str=null;this.pt=-1;this.len=0;this.isCmd=!1;this.doCheck=!0;r(this,arguments)},JSV.common,"ScriptTokenizer",null);u(b,function(a,b){this.str=a;this.len=a.length;this.isCmd=b},"~S,~B");b.nextStringToken=c(b,"nextStringToken",
function(a,b){var c=a.nextToken();return b&&'"'==c.charAt(0)&&c.endsWith('"')&&1<c.length?JU.PT.trimQuotes(c):c},"JSV.common.ScriptTokenizer,~B");c(b,"nextToken",function(){this.doCheck&&this.hasMoreTokens();for(var a=this.pt,b='"'==this.str.charAt(this.pt);++this.pt<this.len;){switch(this.str.charAt(this.pt).charCodeAt(0)){case 34:if(b){if(this.isCmd){b=!1;continue}this.pt++;break}this.isCmd&&(b=!0);continue;case 32:if(!this.isCmd&&!b)break;continue;case 59:case 10:if(this.isCmd&&!b)break;continue;
default:continue}break}this.doCheck=!0;return this.str.substring(a,this.pt)});c(b,"hasMoreTokens",function(){for(;++this.pt<this.len;){switch(this.str.charAt(this.pt).charCodeAt(0)){case 32:case 59:case 10:continue}break}this.doCheck=!1;return this.pt<this.len});c(b,"getRemainingScript",function(){return this.str.substring(this.pt)})});m("JSV.common");var Ha=s(function(){this.isub=0;this.title=null;r(this,arguments)},JSV.common,"SubSpecChangeEvent",null);u(Ha,function(b,a){this.isub=b;this.title=
a},"~N,~S");c(Ha,"isValid",function(){return null!=this.title});c(Ha,"getSubIndex",function(){return this.isub});f(Ha,"toString",function(){return this.title});m("JSV.common");x(null,"JSV.common.SyncManager",["JU.PT","$.SB","JSV.common.PanelNode","JU.Logger"],function(){var b=G(JSV.common,"SyncManager",null);b.syncToJmol=c(b,"syncToJmol",function(a,b){a.peakInfoModelSentToJmol=b.getModel();a.si.syncToJmol(JSV.common.SyncManager.jmolSelect(a.pd(),b))},"JSV.common.JSViewer,JSV.common.PeakInfo");b.syncFromJmol=
c(b,"syncFromJmol",function(a,b){b.equals("TEST")&&(b=JSV.common.SyncManager.testScript);if(0>b.indexOf("<PeakData"))b.startsWith("JSVSTR:")?a.si.syncToJmol(b):(a.runScriptNow(b),0<=b.indexOf("#SYNC_PEAKS")&&JSV.common.SyncManager.syncToJmolPeaksAfterSyncScript(a));else{var c=JU.PT.getQuotedAttribute(b,"sourceID"),f,e,g,j,k;if(null==c){g=JU.PT.getQuotedAttribute(b,"file");j=JU.PT.getQuotedAttribute(b,"index");if(null==g||null==j)return;g=JU.PT.rep(g,"#molfile","");e=JU.PT.getQuotedAttribute(b,"model");
c=JU.PT.getQuotedAttribute(b,"src");f=null!=c&&c.startsWith("Jmol")?null:a.peakInfoModelSentToJmol;if(null!=e&&null!=f&&!e.equals(f)){JU.Logger.info("JSV ignoring model "+e+"; should be "+f);return}a.peakInfoModelSentToJmol=null;if(0==a.panelNodes.size()||!a.checkFileAlreadyLoaded(g))JU.Logger.info("file "+g+" not found -- JSViewer closing all and reopening"),a.si.siSyncLoad(g);f=JU.PT.getQuotedAttribute(b,"type");k=null}else g=null,j=e=c,k=","+JU.PT.getQuotedAttribute(b,"atom")+",",f="ID";j=JSV.common.SyncManager.selectPanelByPeak(a,
g,j,k);k=a.pd();k.selectSpectrum(g,f,e,!0);a.si.siSendPanelChange();k.addPeakHighlight(j);a.repaint(!0);(null==c||null!=j&&null!=j.getAtoms())&&a.si.syncToJmol(JSV.common.SyncManager.jmolSelect(a.pd(),j))}},"JSV.common.JSViewer,~S");b.syncToJmolPeaksAfterSyncScript=c(b,"syncToJmolPeaksAfterSyncScript",function(a){var b=a.currentSource;if(null!=b)try{var c="file="+JU.PT.esc(b.getFilePath()),f=b.getSpectra(),e=f.get(f.size()-1).getPeakList(),g=new JU.SB;g.append("[");for(var j=e.size(),b=0;b<j;b++){var k=
e.get(b).toString(),k=k+" "+c;g.append(JU.PT.esc(k));0<b&&g.append(",")}g.append("]");a.si.syncToJmol("Peaks: "+g)}catch(l){if(!E(l,Exception))throw l;}},"JSV.common.JSViewer");b.selectPanelByPeak=c(b,"selectPanelByPeak",function(a,b,c,f){var e=a.panelNodes;if(null==e)return null;for(var g=null,j=e.size();0<=--j;)e.get(j).pd().addPeakHighlight(null);g=a.pd().selectPeakByFileIndex(b,c,f);if(null!=g)a.setNode(JSV.common.PanelNode.findNode(a.selectedPanel,e));else for(j=e.size();0<=--j;){var k=e.get(j);
if(null!=(g=k.pd().selectPeakByFileIndex(b,c,f))){a.setNode(k);break}}return g},"JSV.common.JSViewer,~S,~S,~S");b.jmolSelect=c(b,"jmolSelect",function(a,b){var c="IR".equals(b.getType())||"RAMAN".equals(b.getType())?"vibration ON; selectionHalos OFF;":"vibration OFF; selectionhalos "+(null==b.getAtoms()?"OFF":"ON");return"Select: "+b+' script="'+c+' " sourceID="'+a.getSpectrum().sourceID+'"'},"JSV.common.PanelData,JSV.common.PeakInfo");b.testScript='<PeakData  index="1" title="" model="~1.1" type="1HNMR" xMin="3.2915" xMax="3.2965" atoms="15,16,17,18,19,20" multiplicity="" integral="1"> src="JPECVIEW" file="http://SIMULATION/$caffeine"'});
m("JSV.common");x(null,"JSV.common.ViewData",["JSV.common.Coordinate","$.ScaleData"],function(){var b=s(function(){this.thisScale=this.scaleData=null;this.iThisScale=this.nSpectra=0;this.spectra=null;r(this,arguments)},JSV.common,"ViewData",null);u(b,function(a,b,c,f,e,g,j){this.nSpectra=j?1:a.size();this.scaleData=Array(this.nSpectra);for(j=0;j<this.nSpectra;j++)this.scaleData[j]=new JSV.common.ScaleData(f[j],e[j]);this.init(a,b,c,g)},"JU.Lst,~N,~N,~A,~A,~B,~B");u(b,function(a,b,c,f){this.nSpectra=
a.size();var e=a.get(0).getXYCoords().length;this.scaleData=Array(1);this.scaleData[0]=new JSV.common.ScaleData(0,e-1);this.init(a,b,c,f)},"JU.Lst,~N,~N,~B");c(b,"getScaleData",function(){return this.scaleData});c(b,"getScale",function(){return this.thisScale});c(b,"init",function(a,b,c,f){null==a?a=this.spectra:this.spectra=a;this.thisScale=this.scaleData[this.iThisScale=0];for(var e=0;e<this.scaleData.length;e++)this.scaleData[e].userYFactor=a.get(e).getUserYFactor(),this.scaleData[e].spectrumYRef=
a.get(e).getYRef();this.resetScaleFactors();var g=JSV.common.Coordinate.getMinX(a,this),j=JSV.common.Coordinate.getMaxX(a,this),k=JSV.common.Coordinate.getMinYUser(a,this),l=JSV.common.Coordinate.getMaxYUser(a,this);b!=c&&(k=b,l=c,k>l&&(e=k,k=l,l=e));a=a.get(0).isInverted();for(e=0;e<this.scaleData.length;e++)this.scaleData[e].setMinMax(g,j,k,l),this.scaleData[e].setScale(f,a)},"JU.Lst,~N,~N,~B");c(b,"newSpectrum",function(a){this.init(a,0,0,!1)},"JU.Lst");c(b,"setXRangeForSubSpectrum",function(a){this.setXRange(0,
a,this.scaleData[0].minX,this.scaleData[0].maxX,0,a.length-1)},"~A");c(b,"setXRange",function(a,b,c,f,e,g){for(var j=0,k=0,j=e;j<=g;j++)if(e=b[j].getXVal(),e>=c){this.scaleData[a%this.scaleData.length].startDataPointIndex=j;break}for(;j<=g&&!(e=b[j].getXVal(),k++,e>=f);j++);this.scaleData[a%this.scaleData.length].endDataPointIndex=j;return k},"~N,~A,~N,~N,~N,~N");c(b,"getStartingPointIndex",function(a){return this.scaleData[a%this.scaleData.length].startDataPointIndex},"~N");c(b,"getEndingPointIndex",
function(a){return this.scaleData[a%this.scaleData.length].endDataPointIndex},"~N");c(b,"areYScalesSame",function(a,b){a%=this.scaleData.length;b%=this.scaleData.length;return this.scaleData[a].minYOnScale==this.scaleData[b].minYOnScale&&this.scaleData[a].maxYOnScale==this.scaleData[b].maxYOnScale},"~N,~N");c(b,"setScale",function(a,b,c,f){this.iThisScale=a%this.scaleData.length;this.thisScale=this.scaleData[this.iThisScale];this.thisScale.setXYScale(b,c,f)},"~N,~N,~N,~B");c(b,"resetScaleFactors",
function(){for(var a=0;a<this.scaleData.length;a++)this.scaleData[a].spectrumScaleFactor=1});c(b,"scaleSpectrum",function(a,b){if(!(0>=b||a>=this.nSpectra))if(-2==a)this.thisScale.scale2D(b);else if(0>a)for(a=0;a<this.scaleData.length;a++)this.scaleData[a].scaleBy(b);else this.scaleData[a%this.scaleData.length].scaleBy(b)},"~N,~N");c(b,"getNewScales",function(a,b,c,f){if(b)return this.scaleData;a%=this.scaleData.length;b=(c-this.thisScale.minYOnScale)/(this.thisScale.maxYOnScale-this.thisScale.minYOnScale);
f=(f-this.thisScale.minYOnScale)/(this.thisScale.maxYOnScale-this.thisScale.minYOnScale);c=Array(this.scaleData.length);for(var e=0;e<this.scaleData.length;e++)c[e]=0<=a&&e!=a?this.scaleData[e]:new JSV.common.ScaleData;JSV.common.ScaleData.copyScaleFactors(this.scaleData,c);JSV.common.ScaleData.copyYScales(this.scaleData,c);for(e=0;e<this.scaleData.length;e++)0<=a&&e!=a||(c[e].isShiftZoomedY=!0,c[e].minYOnScale=this.scaleData[e].minYOnScale*(1-b)+b*this.scaleData[e].maxYOnScale,c[e].maxYOnScale=this.scaleData[e].minYOnScale*
(1-f)+f*this.scaleData[e].maxYOnScale);return c},"~N,~B,~N,~N")});m("JSV.common");I(JSV.common,"XYScaleConverter");m("JSV.common");G(JSV.common,"ZoomEvent",null);m("JSV.dialog");x(["JSV.api.AnnotationData","JSV.common.Annotation"],"JSV.dialog.JSVDialog",["JU.DF","$.PT","JSV.common.IntegralData","$.PeakData","JSV.dialog.DialogManager"],function(){var b=s(function(){this.myParams=this.xyData=this.combo1=this.txt3=this.txt2=this.txt1=this.jsvp=this.dialog=this.manager=this.$spec=this.vwr=this.title=
this.type=this.options=this.optionKey=null;this.precision=1;this.showHideButton=this.loc=null;this.defaultVisible=this.isNumeric=this.addApplyBtn=this.addCombo1=this.addClearBtn=!1;this.tableData=this.graphSetKey=this.subType=null;this.addUnits=!1;this.unitPtr=this.formatOptions=this.unitOptions=null;this.isON=!0;this.iSelected=this.iRowColSelected=-1;this.skipCreate=!1;this.iColSelected=this.iRowSelected=-1;r(this,arguments)},JSV.dialog,"JSVDialog",JSV.common.Annotation,JSV.api.AnnotationData);f(b,
"isDialog",function(){return!0});c(b,"setParams",function(a,b,c){this.title=a=JSV.dialog.DialogManager.fixTitle(a);this.vwr=b;this.$spec=c;this.manager=b.getDialogManager();this.jsvp=b.selectedPanel;this.myParams=b.getPlatformInterface("Parameters").setName("dialogParams");this.subType=null==c?"!":c.getTypeLabel();this.optionKey=this.type+"_"+this.subType;this.options=this.manager.getDialogOptions();null!=c&&(a=c.getDefaultAnnotationInfo(this.type),this.options.put(this.optionKey,a),this.unitOptions=
a[0],this.formatOptions=a[1],this.unitPtr=this.options.get(this.optionKey+"_unitPtr"),null==this.unitPtr&&(this.unitPtr=a[2]));switch(this.type){case JSV.common.Annotation.AType.Integration:this.addApplyBtn=this.defaultVisible=this.addClearBtn=this.isNumeric=!0;break;case JSV.common.Annotation.AType.Measurements:this.defaultVisible=this.addCombo1=this.addClearBtn=this.isNumeric=!0;break;case JSV.common.Annotation.AType.PeakList:this.defaultVisible=this.addApplyBtn=this.isNumeric=!0;break;case JSV.common.Annotation.AType.Views:this.defaultVisible=
!0}this.initDialog();return this},"~S,JSV.common.JSViewer,JSV.common.Spectrum");c(b,"initDialog",function(){this.dialog=this.manager.getDialog(this);this.restoreDialogPosition(this.jsvp,this.getPosXY());this.dialog.setTitle(this.title);this.layoutDialog()});c(b,"layoutDialog",function(){this.dialog.startLayout();this.addUniqueControls();this.isNumeric&&(this.getUnitOptions(),this.addCombo1&&(this.combo1=this.dialog.addSelectOption("cmbUnits","Units",this.unitOptions,this.unitPtr.intValue(),this.addUnits)),
this.addApplyBtn&&this.dialog.addButton("btnApply","Apply"),this.showHideButton=this.dialog.addButton("btnShow","Show"),this.addClearBtn&&this.dialog.addButton("btnClear","Clear"));this.dialog.endLayout();this.checkEnables();this.dialog.setVisible(this.defaultVisible)});c(b,"callbackAD",function(a,b){if(a.equals("FOCUS"))this.eventFocus();else if(a.equals("tableSelect"))this.tableSelect(b);else if(a.equals("btnClear"))this.clear();else if(a.equals("btnApply"))this.eventApply();else if(a.equals("btnShow")){var c=
this.dialog.getText(this.showHideButton);this.eventShowHide(c.equals("Show"))}else if(a.equals("cmbUnits"))this.setPrecision(this.dialog.getSelectedIndex(this.combo1));else if(a.startsWith("txt"))this.eventApply();else if(a.equals("windowClosing"))return this.done(),!0;null!=this.jsvp&&this.jsvp.doRepaint(!0);return!0},"~S,~S");c(b,"addUniqueControls",function(){},"JSV.dialog.DialogManager");f(b,"getAType",function(){return this.type});f(b,"getGraphSetKey",function(){return this.graphSetKey});f(b,
"setGraphSetKey",function(a){this.graphSetKey=a},"~S");f(b,"getSpectrum",function(){return this.$spec});f(b,"getState",function(){return this.isON});f(b,"setState",function(a){this.isON=a},"~B");c(b,"checkEnables",function(){var a=this.checkVisible();this.dialog.setText(this.showHideButton,a?"Hide":"Show")});c(b,"createTable",function(a,b,c){this.tableData=a;this.dialog.createTable(a,b,c)},"~A,~A,~A");c(b,"setTableSelectionEnabled",function(a){this.dialog.setCellSelectionEnabled(a)},"~B");c(b,"getParameters",
function(){return this.myParams});c(b,"showMessage",function(a,b,c){this.manager.showMessageDialog(this.dialog,a,b,c)},"~S,~S,~N");c(b,"setThreshold",function(a){this.dialog.setText(this.txt1,this.getThreasholdText(a))},"~N");c(b,"applyFromFields",function(){this.apply(null)});c(b,"reEnable",function(){this.paramsReEnable();return this});c(b,"dispose",function(){this.dialog.dispose()});c(b,"setVisible",function(a){this.dialog.setVisible(a)},"~B");f(b,"isVisible",function(){return this.dialog.isVisible()});
c(b,"selectTableRow",function(a){this.dialog.selectTableRow(a)},"~N");c(b,"repaint",function(){this.dialog.repaint()});c(b,"setFields",function(){switch(this.type){case JSV.common.Annotation.AType.PeakList:this.myParams=this.xyData.getParameters(),this.setThreshold(this.myParams.peakListThreshold),this.dialog.setSelectedIndex(this.combo1,this.myParams.peakListInterpolation.equals("none")?1:0),this.createData()}});c(b,"setFocus",function(a){this.dialog.setFocus(a)},"~B");c(b,"update",function(a,b,
c){this.selectTableRow(-1);switch(this.type){case JSV.common.Annotation.AType.Integration:this.loadData();this.checkEnables();break;case JSV.common.Annotation.AType.Measurements:this.loadData();this.checkEnables();break;case JSV.common.Annotation.AType.PeakList:20<c&&this.applyFromFields();if(null==this.xyData||null==a||20<c)break;c=0;var f=1E100;a=a.getXVal();var e=this.xyData;b=Math.abs(b/20);for(var g=e.size();0<=--g;){var j=Math.abs(a-e.get(g).getXVal());j<f&&(f=j,c=g)}f<b&&(this.selectTableRow(e.size()-
2-c),this.repaint())}},"JSV.common.Coordinate,~N,~N");f(b,"getData",function(){null==this.xyData&&this.createData();return this.xyData});c(b,"setData",function(a){this.myParams=a.getParameters();this.xyData=a},"JSV.api.AnnotationData");f(b,"setSpecShift",function(a){null!=this.xyData&&this.xyData.setSpecShift(a)},"~N");c(b,"apply",function(a){try{switch(this.type){case JSV.common.Annotation.AType.Integration:var b=Double.parseDouble(a[0]),c=Double.parseDouble(a[1]);this.myParams.integralOffset=b;
this.myParams.integralRange=c;this.myParams.integralDrawAll=!1;this.getData().update(this.myParams);break;case JSV.common.Annotation.AType.NONE:return;case JSV.common.Annotation.AType.PeakList:this.skipCreate||(this.setThreshold(NaN),this.createData());this.skipCreate=!1;break;case JSV.common.Annotation.AType.Views:this.vwr.parameters.viewOffset=Double.parseDouble(a[0])}this.loadData();this.checkEnables();this.jsvp.doRepaint(!0)}catch(f){if(!E(f,Exception))throw f;}},"~A");c(b,"done",function(){null!=
this.jsvp&&null!=this.$spec&&this.jsvp.getPanelData().removeDialog(this);null!=this.xyData&&this.xyData.setState(this.isON);this.saveDialogPosition(this.getPosXY());this.dispose();this.jsvp.doRepaint(!0)});c(b,"restoreDialogPosition",function(a,b){if(null!=a){-2147483648==b[0]&&(b[0]=50,b[1]=50);var c=this.manager.getLocationOnScreen(a);a.getHeight();this.loc=D(-1,[Math.max(0,c[0]+b[0]),Math.max(0,c[1]+b[1])]);this.dialog.setIntLocation(this.loc)}},"JSV.api.JSVPanel,~A");c(b,"saveDialogPosition",
function(a){try{var b=this.manager.getLocationOnScreen(this.dialog);a[0]+=b[0]-this.loc[0];a[1]+=b[1]-this.loc[1]}catch(c){if(!E(c,Exception))throw c;}},"~A");c(b,"getThreasholdText",function(a){if(Double.isNaN(a)){a=this.jsvp.getPanelData();var b=a.getSpectrum().isInverted()?0.1:0.9,c=a.getClickedCoordinate();a=null==c?(a.getView().minYOnScale*b+a.getView().maxYOnScale)*(1-b):c.getYVal()}return" "+JU.DF.formatDecimalDbl(a,1E3>a?2:-2)},"~N");c(b,"checkVisible",function(){return this.vwr.pd().getShowAnnotation(this.type)});
c(b,"getUnitOptions",function(){var a=this.optionKey+"_format";null==this.options.get(a)&&this.options.put(a,Integer.$valueOf(this.formatOptions[null==this.unitPtr?0:this.unitPtr.intValue()]))});c(b,"eventFocus",function(){null!=this.$spec&&this.jsvp.getPanelData().jumpToSpectrum(this.$spec);switch(this.type){case JSV.common.Annotation.AType.Integration:0<=this.iRowSelected&&(this.iRowSelected++,this.tableCellSelect(-1,-1));break;case JSV.common.Annotation.AType.PeakList:this.createData(),this.skipCreate=
!0}});c(b,"eventApply",function(){switch(this.type){case JSV.common.Annotation.AType.PeakList:this.createData(),this.skipCreate=!0}this.applyFromFields()});c(b,"eventShowHide",function(a){(this.isON=a)&&this.eventApply();this.jsvp.doRepaint(!0);this.checkEnables()},"~B");c(b,"clear",function(){this.setState(!0);null!=this.xyData&&(this.xyData.clear(),this.applyFromFields())});c(b,"paramsReEnable",function(){switch(this.type){case JSV.common.Annotation.AType.PeakList:this.skipCreate=!0}this.setVisible(!0);
this.isON=!0;this.applyFromFields()});c(b,"tableCellSelect",function(a,b){System.out.println(a+" jSVDial "+b);0>a&&(a=w(this.iRowColSelected/1E3),b=this.iRowColSelected%1E3,this.iRowColSelected=-1);var c=this.tableData[a][1],f=1E3*a+b;if(f!=this.iRowColSelected){this.iRowColSelected=f;System.out.println("Setting rc = "+this.iRowColSelected+" "+this.$spec);this.selectTableRow(this.iRowSelected);try{switch(this.type){case JSV.common.Annotation.AType.Integration:this.callback("SHOWSELECTION",c.toString());
this.checkEnables();break;case JSV.common.Annotation.AType.PeakList:try{switch(b){case 6:case 5:case 4:var e=Double.parseDouble(c),g=Double.parseDouble(this.tableData[a+3-b][1]);this.jsvp.getPanelData().setXPointers(this.$spec,e,this.$spec,g);break;default:this.jsvp.getPanelData().findX(this.$spec,Double.parseDouble(c))}}catch(j){if(E(j,Exception))this.jsvp.getPanelData().findX(this.$spec,1E100);else throw j;}this.jsvp.doRepaint(!1);break;case JSV.common.Annotation.AType.OverlayLegend:this.jsvp.getPanelData().setSpectrum(a,
!1)}}catch(k){if(!E(k,Exception))throw k;}}},"~N,~N");c(b,"loadData",function(){var a,b,c;switch(this.type){case JSV.common.Annotation.AType.Integration:null==this.xyData&&this.createData();this.iSelected=-1;a=this.xyData.getMeasurementListArray(null);b=this.xyData.getDataHeader();c=D(-1,[40,65,65,50]);this.createTable(a,b,c);break;case JSV.common.Annotation.AType.Measurements:if(null==this.xyData)break;a=this.xyData.getMeasurementListArray(this.dialog.getSelectedItem(this.combo1).toString());b=this.xyData.getDataHeader();
c=D(-1,[40,65,65,50]);this.createTable(a,b,c);break;case JSV.common.Annotation.AType.PeakList:null==this.xyData&&this.createData();a=this.xyData.getMeasurementListArray(null);b=this.xyData.getDataHeader();c=D(-1,[40,65,50,50,50,50,50]);this.createTable(a,b,c);this.setTableSelectionEnabled(!0);break;case JSV.common.Annotation.AType.OverlayLegend:b=z(-1,["No.","Plot Color","Title"]),a=this.vwr.selectedPanel.getPanelData().getOverlayLegendData(),c=D(-1,[30,60,250]),this.createTable(a,b,c),this.setTableSelectionEnabled(!0)}});
c(b,"createData",function(){switch(this.type){case JSV.common.Annotation.AType.Integration:this.xyData=new JSV.common.IntegralData(this.$spec,this.myParams);this.iSelected=-1;break;case JSV.common.Annotation.AType.PeakList:try{var a=Double.parseDouble(this.dialog.getText(this.txt1));this.myParams.peakListThreshold=a;this.myParams.peakListInterpolation=this.dialog.getSelectedItem(this.combo1).toString();this.myParams.precision=this.precision;var b=new JSV.common.PeakData(JSV.common.Annotation.AType.PeakList,
this.$spec);b.setPeakList(this.myParams,this.precision,this.jsvp.getPanelData().getView());this.xyData=b;this.loadData()}catch(c){if(!E(c,Exception))throw c;}}});c(b,"setPrecision",function(a){this.precision=this.formatOptions[a]},"~N");c(b,"tableSelect",function(a){if("true".equals(this.getField(a,"adjusting")))this.iColSelected=this.iRowSelected=-1,System.out.println("adjusting"+a);else{var b=JU.PT.parseInt(this.getField(a,"index"));switch("ROW COL ROWCOL".indexOf(this.getField(a,"selector"))){case 8:this.iColSelected=
JU.PT.parseInt(this.getField(a,"index2"));case 0:this.iRowSelected=b;System.out.println("r set to "+b);break;case 4:this.iColSelected=b,System.out.println("c set to "+b)}0<=this.iColSelected&&0<=this.iRowSelected&&this.tableCellSelect(this.iRowSelected,this.iColSelected)}},"~S");c(b,"getField",function(a,b){a+="&";var c="&"+b+"=",f=a.indexOf(c);return 0>f?null:a.substring(f+c.length,a.indexOf("&",f+1))},"~S,~S")});m("JSV.exception");x(["java.lang.Exception"],"JSV.exception.JSVException",null,function(){G(JSV.exception,
"JSVException",Exception)});m("JSV.js2d");var V=G(JSV.js2d,"Display",null);V.getFullScreenDimensions=c(V,"getFullScreenDimensions",function(b,a){a[0]=b.width;a[1]=b.height},"~O,~A");V.hasFocus=c(V,"hasFocus",function(){return!0},"~O");V.requestFocusInWindow=c(V,"requestFocusInWindow",function(){},"~O");V.repaint=c(V,"repaint",function(){},"~O");V.renderScreenImage=c(V,"renderScreenImage",function(){},"J.api.PlatformViewer,~O,~O");V.setTransparentCursor=c(V,"setTransparentCursor",function(){},"~O");
V.setCursor=c(V,"setCursor",function(){},"~N,~O");V.prompt=c(V,"prompt",function(b,a){var c=prompt(b,a);return null!=c?c:"null"},"~S,~S,~A,~B");V.convertPointFromScreen=c(V,"convertPointFromScreen",function(){},"~O,JU.P3");m("JSV.js2d");var X=G(JSV.js2d,"Image",null);X.getWidth=c(X,"getWidth",function(b){return b.imageWidth?b.imageWidth:b.width},"~O");X.getHeight=c(X,"getHeight",function(b){return b.imageHeight?b.imageHeight:b.height},"~O");X.grabPixels=c(X,"grabPixels",function(b,a,c){var h=null;
if(b._buf32)return b._buf32;h=b.getImageData(0,0,a,c).data;return JSV.js2d.Image.toIntARGB(h)},"~O,~N,~N");X.toIntARGB=c(X,"toIntARGB",function(b){for(var a=w(b.length/4),c=D(a,0),h=0,f=0;h<a;f++)c[h++]=b[f++]<<16|b[f++]<<8|b[f++]|4278190080;return c},"~A");X.fromIntARGB=c(X,"fromIntARGB",function(b,a){for(var c=a.length>>2,h=0,f=0;h<c;h++)a[f++]=b[h]>>16&255,a[f++]=b[h]>>8&255,a[f++]=b[h]&255,a[f++]=255},"~A,~A");X.getTextPixels=c(X,"getTextPixels",function(b,a,c,h,f,e){c.fillStyle="#000000";c.fillRect(0,
0,h,f);c.fillStyle="#FFFFFF";c.font=a.font;c.fillText(b,0,e);return JSV.js2d.Image.grabPixels(c,h,f)},"~S,JU.Font,~O,~N,~N,~N");X.allocateRgbImage=c(X,"allocateRgbImage",function(b,a,c,h,f,e){null==e&&(e={width:b,height:a});e.buf32=c},"~N,~N,~A,~N,~B,~O");X.getStaticGraphics=c(X,"getStaticGraphics",function(b){return JSV.js2d.Image.getGraphics(b)},"~O,~B");X.getGraphics=c(X,"getGraphics",function(b){return b.getContext("2d")},"~O");X.drawImage=c(X,"drawImage",function(b,a,c,h){this.fromIntARGB(a.buf32,
a.buf8);b.putImageData(a.imgdata,c,h)},"~O,~O,~N,~N,~N,~N");m("JSV.js2d");x(["J.api.GenericFileInterface"],"JSV.js2d.JsFile",["JU.PT","JSV.common.JSVFileManager"],function(){var b=s(function(){this.fullName=this.name=null;r(this,arguments)},JSV.js2d,"JsFile",null,J.api.GenericFileInterface);u(b,function(a){this.name=a.$replace("\\","/");this.fullName=a;!this.fullName.startsWith("/")&&0>JSV.common.JSVFileManager.urlTypeIndex(a)&&(this.fullName=JSV.common.JSVFileManager.jsDocumentBase+"/"+this.fullName);
this.fullName=JU.PT.rep(this.fullName,"/./","/");a.substring(a.lastIndexOf("/")+1)},"~S");b.newFile=c(b,"newFile",function(a){return new JSV.js2d.JsFile(a)},"~S");f(b,"getParentAsFile",function(){var a=this.fullName.lastIndexOf("/");return 0>a?null:new JSV.js2d.JsFile(this.fullName.substring(0,a))});f(b,"getFullPath",function(){return this.fullName});f(b,"getName",function(){return this.name});f(b,"isDirectory",function(){return this.fullName.endsWith("/")});f(b,"length",function(){return 0});b.getURLContents=
c(b,"getURLContents",function(a,b,c){try{var f=a.openConnection();null!=b?f.outputBytes(b):null!=c&&("{"==c.charAt(0)&&(c=c.$replace("\n","\\n")),f.outputString(c));return f.getContents()}catch(e){if(E(e,Exception))return e.toString();throw e;}},"java.net.URL,~A,~S")});m("JSV.js2d");x(["JSV.api.JSVFileHelper"],"JSV.js2d.JsFileHelper",["JU.PT","JSV.common.JSViewer","JSV.js2d.JsFile"],function(){var b=s(function(){this.vwr=null;r(this,arguments)},JSV.js2d,"JsFileHelper",null,JSV.api.JSVFileHelper);
f(b,"set",function(a){this.vwr=a;return this},"JSV.common.JSViewer");f(b,"getFile",function(a){var b=null;a=JU.PT.rep(a,"=","_");b=prompt("Enter a file name:",a);return null==b?null:new JSV.js2d.JsFile(b)},"~S,~O,~B");f(b,"setDirLastExported",function(a){return a},"~S");f(b,"setFileChooser",function(){},"JSV.common.ExportType");f(b,"showFileOpenDialog",function(a,b){JSV.common.JSViewer.jsmolObject.loadFileAsynchronously(this,this.vwr.html5Applet,"?",b);return null},"~O,~A");c(b,"setData",function(a,
b,c){if(null!=a)if(null==b)this.vwr.selectedPanel.showMessage(a,"File Open Error");else{var f=null==c?null:"",e=!1,e=c[0],f=c[1];this.vwr.si.siOpenDataOrFile(String.instantialize(b),"cache://"+a,null,null,-1,-1,e,null,null);null!=f&&this.vwr.runScript(f)}},"~S,~O,~A");f(b,"getUrlFromDialog",function(a,b){return prompt(a,b)},"~S,~S")});m("JSV.js2d");var la=G(JSV.js2d,"JsFont",null);la.newFont=c(la,"newFont",function(b,a,c,h,f){b=b.equals("Monospaced")?"Courier":b.startsWith("Sans")?"Sans-Serif":"Serif";
return(a?"bold ":"")+(c?"italic ":"")+h+f+" "+b},"~S,~B,~B,~N,~S");la.getFontMetrics=c(la,"getFontMetrics",function(b,a){a.font!=b.font&&(a.font=b.font,b.font=a.font,a._fontAscent=Math.ceil(b.fontSize),a._fontDescent=Math.ceil(0.25*b.fontSize));return a},"JU.Font,~O");la.getAscent=c(la,"getAscent",function(b){return Math.ceil(b._fontAscent)},"~O");la.getDescent=c(la,"getDescent",function(b){return Math.ceil(b._fontDescent)},"~O");la.stringWidth=c(la,"stringWidth",function(b,a){b.fontMetrics.font=
b.font;return Math.ceil(b.fontMetrics.measureText(a).width)},"JU.Font,~S");m("JSV.js2d");x(["J.api.GenericGraphics"],"JSV.js2d.JsG2D",["JU.CU","JSV.common.JSViewer","JS.Color"],function(){var b=s(function(){this.windowHeight=this.windowWidth=0;this.inPath=this.isShifted=!1;r(this,arguments)},JSV.js2d,"JsG2D",null,J.api.GenericGraphics);f(b,"getColor4",function(a,b,c,f){return JS.Color.get4(a,b,c,f)},"~N,~N,~N,~N");f(b,"getColor3",function(a,b,c){return JS.Color.get3(a,b,c)},"~N,~N,~N");f(b,"getColor1",
function(a){return JS.Color.get1(a)},"~N");f(b,"newGrayScaleImage",function(a,b,c,f,e){return JSV.common.JSViewer.jsmolObject.newGrayScaleImage(a,b,c,f,e)},"~O,~O,~N,~N,~A");f(b,"drawGrayScaleImage",function(a,b,c,f,e,g,j,k,l,m){a=e-c+1;g=g-f+1;l=l-j+1;m=m-k+1;e=b.w*a/l;var n=b.h*g/m;b.width=e;b.height=n;var q=b.div;b=b.layer;b.style.left=c+"px";b.style.top=f+"px";b.style.width=a+"px";b.style.height=g+"px";q.style.left=-j*a/l+"px";q.style.top=-k*g/m+"px";q.style.width=e+"px";q.style.height=n+"px"},
"~O,~O,~N,~N,~N,~N,~N,~N,~N,~N");f(b,"drawLine",function(a,b,c,f,e){var g=this.inPath;g||a.beginPath();a.moveTo(b,c);a.lineTo(f,e);g||a.stroke()},"~O,~N,~N,~N,~N");f(b,"drawCircle",function(a,b,c,f){f/=2;a.beginPath();a.arc(b+f,c+f,f,0,2*Math.PI,!1);a.stroke()},"~O,~N,~N,~N");f(b,"drawPolygon",function(a,b,c,f){this.doPoly(a,b,c,f,!1)},"~O,~A,~A,~N");c(b,"doPoly",function(a,b,c,f,e){a.beginPath();a.moveTo(b[0],c[0]);for(var g=1;g<f;g++)a.lineTo(b[g],c[g]);e?a.fill():a.stroke()},"~O,~A,~A,~N,~B");
f(b,"drawRect",function(a,b,c,f,e){a.beginPath();a.rect(b,c,f,e);a.stroke()},"~O,~N,~N,~N,~N");f(b,"drawString",function(a,b,c,f){a.fillText(b,c,f)},"~O,~S,~N,~N");f(b,"drawStringRotated",function(){},"~O,~S,~N,~N,~N");f(b,"fillBackground",function(a,b){null==b?(this.isShifted||(a.translate(-0.5,-0.5),this.isShifted=!0),a.clearRect(0,0,this.windowWidth,this.windowHeight)):(this.setGraphicsColor(a,b),this.fillRect(a,0,0,this.windowWidth,this.windowHeight))},"~O,javajs.api.GenericColor");f(b,"fillCircle",
function(a,b,c,f){f/=2;a.beginPath();a.arc(b+f,c+f,f,0,2*Math.PI,!1);a.fill()},"~O,~N,~N,~N");f(b,"fillPolygon",function(a,b,c,f){this.doPoly(a,b,c,f,!0)},"~O,~A,~A,~N");f(b,"fillRect",function(a,b,c,f,e){a.fillRect(b,c,f,e)},"~O,~N,~N,~N,~N");f(b,"setGraphicsColor",function(a,b){var c=JU.CU.toCSSString(b);a.fillStyle=a.strokeStyle=c},"~O,javajs.api.GenericColor");f(b,"setFont",function(a,b){var c=b.getInfo(),f=c.indexOf(" "),c=c.substring(0,f)+"px"+c.substring(f);a.font=c;return b},"~O,JU.Font");
f(b,"setStrokeBold",function(a,b){a.lineWidth=b?2:1},"~O,~B");f(b,"setWindowParameters",function(a,b){this.windowWidth=a;this.windowHeight=b},"~N,~N");f(b,"translateScale",function(){},"~O,~N,~N,~N");f(b,"canDoLineTo",function(){return!0});f(b,"doStroke",function(a,b){(this.inPath=b)?a.beginPath():a.stroke()},"~O,~B");f(b,"lineTo",function(a,b,c){a.lineTo(b,c)},"~O,~N,~N")});m("JSV.js2d");x(["JSV.api.JSVPanel"],"JSV.js2d.JsPanel",["JSV.common.JSViewer","$.PanelData","JU.Font","$.Logger"],function(){var b=
s(function(){this.bgcolor=this.name=this.vwr=this.mouse=this.pd=this.apiPlatform=null;r(this,arguments)},JSV.js2d,"JsPanel",null,JSV.api.JSVPanel);u(b,function(a,b){this.vwr=a;this.pd=b?new JSV.common.PanelData(this,a):null;this.apiPlatform=a.apiPlatform;this.mouse=this.apiPlatform.getMouseManager(0,this)},"JSV.common.JSViewer,~B");f(b,"getApiPlatform",function(){return this.apiPlatform});f(b,"getPanelData",function(){return this.pd});b.getEmptyPanel=c(b,"getEmptyPanel",function(a){a=new JSV.js2d.JsPanel(a,
!1);a.pd=null;return a},"JSV.common.JSViewer");b.getPanelMany=c(b,"getPanelMany",function(a,b){var c=new JSV.js2d.JsPanel(a,!0);c.pd.initMany(b,a.initialStartIndex,a.initialEndIndex);return c},"JSV.common.JSViewer,JU.Lst");f(b,"getTitle",function(){return this.pd.getTitle()});f(b,"dispose",function(){null!=this.pd&&this.pd.dispose();this.pd=null;this.mouse.dispose();this.mouse=null});f(b,"setTitle",function(a){this.pd.setTitle(a);this.name=a},"~S");c(b,"setColorOrFont",function(a,b){this.pd.setColorOrFont(a,
b)},"JSV.common.ColorParameters,JSV.common.ScriptToken");f(b,"setBackgroundColor",function(a){this.bgcolor=a},"javajs.api.GenericColor");f(b,"getInput",function(a,b,c){b=null;b=prompt(a,c);this.getFocusNow(!0);return b},"~S,~S,~S");f(b,"showMessage",function(a,b){JU.Logger.info(a);this.vwr.html5Applet._showStatus(a,b);this.getFocusNow(!0)},"~S,~S");f(b,"getFocusNow",function(){null!=this.pd&&this.pd.dialogsToFront(null)},"~B");f(b,"getFontFaceID",function(){return JU.Font.getFontFaceID("SansSerif")},
"~S");f(b,"doRepaint",function(a){null!=this.pd&&(a&&this.pd.setTaintedAll(),this.pd.isPrinting||this.vwr.requestRepaint())},"~B");f(b,"paintComponent",function(a){var b=null,c=null,b=a.canvas.frontLayer.getContext("2d"),c=a;null!=this.vwr&&(null==this.pd?(null==this.bgcolor&&(this.bgcolor=this.vwr.g2d.getColor1(-1)),this.vwr.g2d.fillBackground(a,this.bgcolor),this.vwr.g2d.fillBackground(c,this.bgcolor),this.vwr.g2d.fillBackground(b,this.bgcolor)):null==this.pd.graphSets||this.pd.isPrinting||(this.pd.g2d=
this.pd.g2d0,this.pd.drawGraph(a,b,c,this.getWidth(),this.getHeight(),!1,!1),this.vwr.repaintDone()))},"~O");f(b,"printPanel",function(a,b,c){a.title=c;a.date=this.apiPlatform.getDateFormat("8824");this.pd.setPrint(a,"Helvetica");try{JSV.common.JSViewer.getInterface("JSV.common.PDFWriter").createPdfDocument(this,a,b)}catch(f){if(E(f,Exception))this.showMessage(f.toString(),"creating PDF");else throw f;}finally{this.pd.setPrint(null,null)}},"JSV.common.PrintLayout,java.io.OutputStream,~S");f(b,"saveImage",
function(a,b,c){a=b.getName();null!=c&&c.cancel();JSV.common.JSViewer.jsmolObject.saveImage(this.vwr.html5Applet,"png",a);return"OK"},"~S,J.api.GenericFileInterface,JU.OC,~N,~N");f(b,"hasFocus",function(){return!1});f(b,"repaint",function(){});f(b,"setToolTipText",function(a){var b=this.pd.mouseX,c=this.pd.mouseY,f=this.vwr.html5Applet;f._showTooltip&&f._showTooltip(a,b,c)},"~S");f(b,"getHeight",function(){return this.vwr.getHeight()});f(b,"getWidth",function(){return this.vwr.getWidth()});f(b,"isEnabled",
function(){return!1});f(b,"isFocusable",function(){return!1});f(b,"isVisible",function(){return!1});f(b,"setEnabled",function(){},"~B");f(b,"setFocusable",function(){},"~B");f(b,"toString",function(){return null==this.pd?"<closed>":""+this.pd.getSpectrumAt(0)});f(b,"processMouseEvent",function(a,b,c,f,e){return null!=this.mouse&&this.mouse.processEvent(a,b,c,f,e)},"~N,~N,~N,~N,~N");f(b,"processTwoPointGesture",function(a){null!=this.mouse&&this.mouse.processTwoPointGesture(a)},"~A");f(b,"processKeyEvent",
function(a){null!=this.mouse&&this.mouse.processKeyEvent(a)},"~O");f(b,"showMenu",function(a,b){this.vwr.showMenu(a,b)},"~N,~N")});m("JSV.js2d");x(["JSV.common.ColorParameters"],"JSV.js2d.JsParameters",["JS.Color"],function(){var b=G(JSV.js2d,"JsParameters",JSV.common.ColorParameters);u(b,function(){K(this,JSV.js2d.JsParameters,[])});f(b,"isValidFontName",function(){return!0},"~S");f(b,"getColor1",function(a){return JS.Color.get1(a)},"~N");f(b,"getColor3",function(a,b,c){return JS.Color.get3(a,b,
c)},"~N,~N,~N");c(b,"copy",function(a){return(new JSV.js2d.JsParameters).setName(a).setElementColors(this)},"~S")});m("JSV.js2d");x(["J.api.GenericPlatform"],"JSV.js2d.JsPlatform","java.net.URL JU.AjaxURLStreamHandlerFactory $.Rdr JSV.app.GenericMouse JSV.js2d.Display $.Image $.JsFile $.JsFont".split(" "),function(){var b=s(function(){this.context=this.viewer=this.canvas=null;r(this,arguments)},JSV.js2d,"JsPlatform",null,J.api.GenericPlatform);f(b,"setViewer",function(a,b){var c="";this.viewer=a;
this.canvas=b;null!=b&&(c=b.getContext("2d"),b.imgdata=c.getImageData(0,0,b.width,b.height),b.buf8=b.imgdata.data);""!==c&&(this.context=c);try{java.net.URL.setURLStreamHandlerFactory(new JU.AjaxURLStreamHandlerFactory)}catch(f){}},"J.api.PlatformViewer,~O");f(b,"isSingleThreaded",function(){return!0});f(b,"getJsObjectInfo",function(a,b,c){return null==b?null:"localName"==b?a[0].nodeName:null==c?a[0][b]:a[0][b](c[0])},"~A,~S,~A");f(b,"isHeadless",function(){return!1});f(b,"getMouseManager",function(a,
b){return new JSV.app.GenericMouse(b)},"~N,~O");f(b,"convertPointFromScreen",function(a,b){JSV.js2d.Display.convertPointFromScreen(a,b)},"~O,JU.P3");f(b,"getFullScreenDimensions",function(a,b){JSV.js2d.Display.getFullScreenDimensions(a,b)},"~O,~A");f(b,"getMenuPopup",function(){return null},"~S,~S");f(b,"hasFocus",function(a){return JSV.js2d.Display.hasFocus(a)},"~O");f(b,"prompt",function(a,b,c,f){return JSV.js2d.Display.prompt(a,b,c,f)},"~S,~S,~A,~B");f(b,"renderScreenImage",function(a,b){JSV.js2d.Display.renderScreenImage(this.viewer,
a,b)},"~O,~O");f(b,"drawImage",function(a,b,c,f,e,g){JSV.js2d.Image.drawImage(a,b,c,f,e,g)},"~O,~O,~N,~N,~N,~N,~B");f(b,"requestFocusInWindow",function(a){JSV.js2d.Display.requestFocusInWindow(a)},"~O");f(b,"repaint",function(a){JSV.js2d.Display.repaint(a)},"~O");f(b,"setTransparentCursor",function(a){JSV.js2d.Display.setTransparentCursor(a)},"~O");f(b,"setCursor",function(a,b){JSV.js2d.Display.setCursor(a,b)},"~N,~O");f(b,"allocateRgbImage",function(a,b,c,f,e,g){return JSV.js2d.Image.allocateRgbImage(a,
b,c,f,e,g?null:this.canvas)},"~N,~N,~A,~N,~B,~B");f(b,"notifyEndOfRendering",function(){});f(b,"createImage",function(){return null},"~O");f(b,"disposeGraphics",function(){},"~O");f(b,"grabPixels",function(a,b,c){a.image&&(b!=a.width||c!=a.height)&&Jmol._setCanvasImage(a,b,c);if(a.buf32)return a.buf32;b=JSV.js2d.Image.grabPixels(JSV.js2d.Image.getGraphics(a),b,c);return a.buf32=b},"~O,~N,~N,~A");f(b,"drawImageToBuffer",function(a,b,c,f,e){return this.grabPixels(c,f,e,null)},"~O,~O,~O,~N,~N,~N");f(b,
"getTextPixels",function(a,b,c,f,e,g,j){return JSV.js2d.Image.getTextPixels(a,b,c,e,g,j)},"~S,JU.Font,~O,~O,~N,~N,~N");f(b,"flushImage",function(){},"~O");f(b,"getGraphics",function(a){return null==a?this.context:this.context=JSV.js2d.Image.getGraphics(this.canvas=a)},"~O");f(b,"getImageHeight",function(a){return null==a?-1:JSV.js2d.Image.getHeight(a)},"~O");f(b,"getImageWidth",function(a){return null==a?-1:JSV.js2d.Image.getWidth(a)},"~O");f(b,"getStaticGraphics",function(a,b){return JSV.js2d.Image.getStaticGraphics(a,
b)},"~O,~B");f(b,"newBufferedImage",function(a,b,c){return self.Jmol&&Jmol._getHiddenCanvas?Jmol._getHiddenCanvas(this.vwr.html5Applet,"stereoImage",b,c):null},"~O,~N,~N");f(b,"newOffScreenImage",function(a,b){return self.Jmol&&Jmol._getHiddenCanvas?Jmol._getHiddenCanvas(this.vwr.html5Applet,"textImage",a,b):null},"~N,~N");f(b,"waitForDisplay",function(){return!1},"~O,~O");f(b,"fontStringWidth",function(a,b){return JSV.js2d.JsFont.stringWidth(a,b)},"JU.Font,~S");f(b,"getFontAscent",function(a){return JSV.js2d.JsFont.getAscent(a)},
"~O");f(b,"getFontDescent",function(a){return JSV.js2d.JsFont.getDescent(a)},"~O");f(b,"getFontMetrics",function(a,b){return JSV.js2d.JsFont.getFontMetrics(a,b)},"JU.Font,~O");f(b,"newFont",function(a,b,c,f){return JSV.js2d.JsFont.newFont(a,b,c,f,"px")},"~S,~B,~B,~N");f(b,"getDateFormat",function(a){if(null!=a){if(0<=a.indexOf("8824")){var b=new Date;a=b.toString().split(" ");var c="0"+b.getMonth(),c=c.substring(c.length-2),b="0"+b.getDate(),b=b.substring(b.length-2);return a[3]+c+b+a[4].replace(/\:/g,
"")+a[5].substring(3,6)+"'"+a[5].substring(6,8)+"'"}if(0<=a.indexOf("8601"))return b=new Date,a=b.toString().split(" "),c="0"+b.getMonth(),c=c.substring(c.length-2),b="0"+b.getDate(),b=b.substring(b.length-2),a[3]+c+b+a[4].replace(/\:/g,"")+a[5].substring(3,6)+"'"+a[5].substring(6,8)+"'"}return(""+new Date).split(" (")[0]},"~S");f(b,"newFile",function(a){return new JSV.js2d.JsFile(a)},"~S");f(b,"getBufferedFileInputStream",function(){return null},"~S");f(b,"getURLContents",function(a,b,c,f){a=JSV.js2d.JsFile.getURLContents(a,
b,c);try{return!f?a:"string"==typeof a?a:C(a,"JU.SB")?a.toString():C(a,Array)?String.instantialize(a):String.instantialize(JU.Rdr.getStreamAsBytes(a,null))}catch(e){if(E(e,Exception))return""+e;throw e;}},"java.net.URL,~A,~S,~B");f(b,"getLocalUrl",function(){return null},"~S");f(b,"getImageDialog",function(){return null},"~S,java.util.Map");f(b,"forceAsyncLoad",function(){return!1},"~S");f(b,"getInChI",function(){return null});f(b,"confirm",function(a,b){var c=!1;null!=b&&(c=!1);return c?1:2},"~S,~S")});
m("JSV.js2d");x(["JSV.api.JSVMainPanel"],"JSV.js2d.JsMainPanel",null,function(){var b=s(function(){this.mainSelectedPanel=null;this.currentPanelIndex=0;this.title=null;this.enabled=this.focusable=this.visible=!1;r(this,arguments)},JSV.js2d,"JsMainPanel",null,JSV.api.JSVMainPanel);f(b,"getCurrentPanelIndex",function(){return this.currentPanelIndex});f(b,"dispose",function(){});f(b,"getTitle",function(){return this.title});f(b,"setTitle",function(a){this.title=a},"~S");c(b,"getHeight",function(){return null==
this.mainSelectedPanel?0:this.mainSelectedPanel.getHeight()});c(b,"getWidth",function(){return null==this.mainSelectedPanel?0:this.mainSelectedPanel.getWidth()});f(b,"isEnabled",function(){return this.enabled});f(b,"isFocusable",function(){return this.focusable});f(b,"isVisible",function(){return this.visible});f(b,"setEnabled",function(a){this.enabled=a},"~B");f(b,"setFocusable",function(a){this.focusable=a},"~B");f(b,"setSelectedPanel",function(a,b,c){b!==this.mainSelectedPanel&&(this.mainSelectedPanel=
b);a=a.selectPanel(b,c);0<=a&&(this.currentPanelIndex=a);this.visible=!0},"JSV.common.JSViewer,JSV.api.JSVPanel,JU.Lst")});m("JSV.source");x(["JSV.source.JDXHeader","java.util.Hashtable"],"JSV.source.JDXDataObject","JU.DF $.PT JSV.common.Annotation $.Coordinate JSV.exception.JSVException JU.Logger".split(" "),function(){var b=s(function(){this.sourceID="";this.isSimulation=!1;this.blockID=0;this.inlineData=this.filePathForwardSlash=this.filePath=null;this.fileShiftRef=1.7976931348623157E308;this.fileShiftRefDataPt=
this.fileShiftRefType=-1;this.deltaX=this.maxY=this.maxX=this.minY=this.minX=NaN;this.xyCoords=null;this.$isHZtoPPM=this.continuous=!1;this.xIncreases=!0;this.fileLastX=this.fileFirstX=1.7976931348623157E308;this.fileNPoints=-1;this.yFactor=this.xFactor=1.7976931348623157E308;this.nucleusX=null;this.nucleusY="?";this.freq2dY=this.freq2dX=NaN;this.y2DUnits="";this.parent=null;this.yUnits=this.xUnits="";this.yLabel=this.xLabel=null;this.observedNucl=this.varName="";this.observedFreq=1.7976931348623157E308;
this.numDim=1;this.nH=0;this.y2D=NaN;r(this,arguments)},JSV.source,"JDXDataObject",JSV.source.JDXHeader);c(b,"setInlineData",function(a){this.inlineData=a},"~S");c(b,"getInlineData",function(){return this.inlineData});c(b,"setFilePath",function(a){null!=a&&(this.filePathForwardSlash=(this.filePath=a.trim()).$replace("\\","/"))},"~S");c(b,"getFilePath",function(){return this.filePath});c(b,"getFilePathForwardSlash",function(){return this.filePathForwardSlash});c(b,"setBlockID",function(a){this.blockID=
a},"~N");c(b,"checkJDXRequiredTokens",function(){var a=1.7976931348623157E308==this.fileFirstX?"##FIRSTX":1.7976931348623157E308==this.fileLastX?"##LASTX":-1==this.fileNPoints?"##NPOINTS":1.7976931348623157E308==this.xFactor?"##XFACTOR":1.7976931348623157E308==this.yFactor?"##YFACTOR":null;if(null!=a)throw new JSV.exception.JSVException("Error Reading Data Set: "+a+" not found");});c(b,"setXFactor",function(a){this.xFactor=a},"~N");c(b,"getXFactor",function(){return this.xFactor});c(b,"setYFactor",
function(a){this.yFactor=a},"~N");c(b,"getYFactor",function(){return this.yFactor});c(b,"setVarName",function(a){this.varName=a},"~S");c(b,"isImaginary",function(){return this.varName.contains("IMAG")});c(b,"setXUnits",function(a){this.xUnits=a},"~S");c(b,"getXUnits",function(){return this.xUnits});c(b,"setYUnits",function(a){a.equals("PPM")&&(a="ARBITRARY UNITS");this.yUnits=a},"~S");c(b,"getYUnits",function(){return this.yUnits});c(b,"setXLabel",function(a){this.xLabel=a},"~S");c(b,"setYLabel",
function(a){this.yLabel=a},"~S");c(b,"setObservedNucleus",function(a){this.observedNucl=a;this.is1D()&&(this.parent.nucleusX=this.nucleusX=this.fixNucleus(a))},"~S");c(b,"getObservedNucleus",function(){return this.observedNucl});c(b,"setObservedFreq",function(a){this.observedFreq=a},"~N");c(b,"getObservedFreq",function(){return this.observedFreq});c(b,"setHydrogenCount",function(a){this.nH=a},"~N");c(b,"getHydrogenCount",function(){return this.nH});c(b,"is1D",function(){return 1==this.numDim});c(b,
"getNumDim",function(){return this.numDim});c(b,"setNumDim",function(a){this.numDim=a},"~N");c(b,"setY2D",function(a){this.y2D=a},"~N");c(b,"getY2D",function(){return this.y2D});c(b,"setY2DUnits",function(a){this.y2DUnits=a},"~S");c(b,"getY2DPPM",function(){var a=this.y2D;this.y2DUnits.equals("HZ")&&(a/=this.freq2dY);return a});c(b,"setNucleusAndFreq",function(a,b){a=this.fixNucleus(a);b?this.nucleusX=a:this.nucleusY=a;var c;if(0<=this.observedNucl.indexOf(a))c=this.observedFreq;else{c=JSV.source.JDXDataObject.getGyromagneticRatio(this.fixNucleus(this.observedNucl));
var e=JSV.source.JDXDataObject.getGyromagneticRatio(a);c=this.observedFreq*e/c}b?this.freq2dX=c:this.freq2dY=c;JU.Logger.info("Freq for "+a+" = "+c)},"~S,~B");c(b,"fixNucleus",function(a){return JU.PT.rep(JU.PT.trim(a,"[]^<>"),"NUC_","")},"~S");b.getNominalSpecFreq=c(b,"getNominalSpecFreq",function(a,b){var c=JSV.source.JDXDataObject.getSpecFreq(a,b),e=100*Math.round(c/100);return Double.isNaN(c)?-1:2>Math.abs(c-e)?e:Math.round(c)},"~S,~N");b.getSpecFreq=c(b,"getSpecFreq",function(a,b){return b*JSV.source.JDXDataObject.getGyromagneticRatio("1H")/
JSV.source.JDXDataObject.getGyromagneticRatio(a)},"~S,~N");b.getGyromagneticRatio=c(b,"getGyromagneticRatio",function(a){var b=null;try{b=JSV.source.JDXDataObject.gyroMap.get(a);if(null!=b)return b.doubleValue();for(var c=0;c<a.length&&Character.isDigit(a.charAt(c));)c++;b=JSV.source.JDXDataObject.gyroMap.get(a.substring(0,c));null!=b&&JSV.source.JDXDataObject.gyroMap.put(a,b)}catch(e){if(!E(e,Exception))throw e;}return null==b?NaN:b.doubleValue()},"~S");c(b,"isTransmittance",function(){var a=this.yUnits.toLowerCase();
return a.equals("transmittance")||a.contains("trans")||a.equals("t")});c(b,"isAbsorbance",function(){var a=this.yUnits.toLowerCase();return a.equals("absorbance")||a.contains("abs")||a.equals("a")});c(b,"canSaveAsJDX",function(){return this.getDataClass().equals("XYDATA")});c(b,"canIntegrate",function(){return this.continuous&&(this.isHNMR()||this.isGC())&&this.is1D()});c(b,"isAutoOverlayFromJmolClick",function(){return this.isGC()});c(b,"isGC",function(){return this.dataType.startsWith("GC")||this.dataType.startsWith("GAS")});
c(b,"isMS",function(){return this.dataType.startsWith("MASS")||this.dataType.startsWith("MS")});c(b,"isStackable",function(){return!this.isMS()});c(b,"isScalable",function(){return!0});c(b,"getYRef",function(){return!this.isTransmittance()?0:2>JSV.common.Coordinate.getMaxY(this.xyCoords,0,this.xyCoords.length-1)?1:100});c(b,"isInverted",function(){return this.isTransmittance()});c(b,"canConvertTransAbs",function(){return this.continuous&&this.yUnits.toLowerCase().contains("abs")||this.yUnits.toLowerCase().contains("trans")});
c(b,"canShowSolutionColor",function(){return this.isContinuous()&&this.canConvertTransAbs()&&(this.xUnits.toLowerCase().contains("nanometer")||this.xUnits.equalsIgnoreCase("nm"))&&401>this.getFirstX()&&699<this.getLastX()&&30<=this.xyCoords.length});c(b,"isHZtoPPM",function(){return this.$isHZtoPPM});c(b,"setHZtoPPM",function(a){this.$isHZtoPPM=a},"~B");c(b,"setIncreasing",function(a){this.xIncreases=a},"~B");c(b,"isXIncreasing",function(){return this.xIncreases});c(b,"shouldDisplayXAxisIncreasing",
function(){var a=this.dataType.toUpperCase(),b=this.xUnits.toUpperCase();return a.contains("NMR")&&!a.contains("FID")||a.contains("LINK")&&b.contains("CM")||a.startsWith("IR")||a.contains("INFRA")&&b.contains("CM")||a.contains("RAMAN")&&b.contains("CM")?!1:a.contains("VIS")&&b.contains("NANOMETERS")?!0:this.xIncreases});c(b,"setContinuous",function(a){this.continuous=a},"~B");c(b,"isContinuous",function(){return this.continuous});c(b,"getHeaderRowDataAsArray",function(){var a=8;1.7976931348623157E308!=
this.observedFreq&&a++;""!==this.observedNucl&&a++;var b=this.getHeaderRowDataAsArray(!0,a),a=b.length-a;1.7976931348623157E308!=this.observedFreq&&(b[a++]=z(-1,["##.OBSERVE FREQUENCY",""+this.observedFreq]));""!==this.observedNucl&&(b[a++]=z(-1,["##.OBSERVE NUCLEUS",this.observedNucl]));b[a++]=z(-1,["##XUNITS",this.$isHZtoPPM?"HZ":this.xUnits]);b[a++]=z(-1,["##YUNITS",this.yUnits]);var c=this.xIncreases?this.getFirstX():this.getLastX();b[a++]=z(-1,["##FIRSTX",String.valueOf(this.isHZtoPPM()?c*this.observedFreq:
c)]);c=this.xIncreases?this.getLastX():this.getFirstX();b[a++]=z(-1,["##FIRSTY",String.valueOf(this.xIncreases?this.getFirstY():this.getLastY())]);b[a++]=z(-1,["##LASTX",String.valueOf(this.isHZtoPPM()?c*this.observedFreq:c)]);b[a++]=z(-1,["##XFACTOR",String.valueOf(this.getXFactor())]);b[a++]=z(-1,["##YFACTOR",String.valueOf(this.getYFactor())]);b[a++]=z(-1,["##NPOINTS",String.valueOf(this.xyCoords.length)]);return b});c(b,"getDefaultUnitPrecision",function(){return 2});c(b,"setMeasurementText",
function(a){var b=a.getValue();if(Double.isNaN(b))return"";var c=1,e="";if(this.isNMR())if(this.is1D())a=C(a,"JSV.common.Integral"),this.isHNMR()||a?a||(b*=this.observedFreq,e=" Hz"):(e=" ppm",c=2);else return"";return 0.1>b?"":JU.DF.formatDecimalDbl(b,c)+e},"JSV.common.Measurement");c(b,"isNMR",function(){return 0<=this.dataType.toUpperCase().indexOf("NMR")});c(b,"isHNMR",function(){return this.isNMR()&&0<=this.observedNucl.toUpperCase().indexOf("H")});c(b,"setXYCoords",function(a){this.xyCoords=
a},"~A");c(b,"invertYAxis",function(){for(var a=this.xyCoords.length;0<=--a;)this.xyCoords[a].setYVal(-this.xyCoords[a].getYVal());a=this.minY;this.minY=-this.maxY;this.maxY=-a;return this});c(b,"getFirstX",function(){return this.xyCoords[0].getXVal()});c(b,"getFirstY",function(){return this.xyCoords[0].getYVal()});c(b,"getLastX",function(){return this.xyCoords[this.xyCoords.length-1].getXVal()});c(b,"getLastY",function(){return this.xyCoords[this.xyCoords.length-1].getYVal()});c(b,"getMinX",function(){return Double.isNaN(this.minX)?
this.minX=JSV.common.Coordinate.getMinX(this.xyCoords,0,this.xyCoords.length-1):this.minX});c(b,"getMinY",function(){return Double.isNaN(this.minY)?this.minY=JSV.common.Coordinate.getMinY(this.xyCoords,0,this.xyCoords.length-1):this.minY});c(b,"getMaxX",function(){return Double.isNaN(this.maxX)?this.maxX=JSV.common.Coordinate.getMaxX(this.xyCoords,0,this.xyCoords.length-1):this.maxX});c(b,"getMaxY",function(){return Double.isNaN(this.maxY)?this.maxY=JSV.common.Coordinate.getMaxY(this.xyCoords,0,this.xyCoords.length-
1):this.maxY});c(b,"normalizeSimulation",function(a){this.isNMR()&&this.is1D()&&(a/=this.getMaxY(),this.maxY=NaN,JSV.common.Coordinate.applyScale(this.xyCoords,1,a),JU.Logger.info("Y values have been scaled by a factor of "+a))},"~N");c(b,"getDeltaX",function(){return Double.isNaN(this.deltaX)?this.deltaX=JSV.common.Coordinate.deltaX(this.getLastX(),this.getFirstX(),this.xyCoords.length):this.deltaX});c(b,"copyTo",function(a){a.setTitle(this.title);a.setJcampdx(this.jcampdx);a.setOrigin(this.origin);
a.setOwner(this.owner);a.setDataClass(this.dataClass);a.setDataType(this.dataType);a.setHeaderTable(this.headerTable);a.setXFactor(this.xFactor);a.setYFactor(this.yFactor);a.setXUnits(this.xUnits);a.setYUnits(this.yUnits);a.setXLabel(this.xLabel);a.setYLabel(this.yLabel);a.setXYCoords(this.xyCoords);a.setContinuous(this.continuous);a.setIncreasing(this.xIncreases);a.observedFreq=this.observedFreq;a.observedNucl=this.observedNucl;a.fileShiftRef=this.fileShiftRef;a.fileShiftRefDataPt=this.fileShiftRefDataPt;
a.fileShiftRefType=this.fileShiftRefType;a.$isHZtoPPM=this.$isHZtoPPM;a.numDim=this.numDim;a.nucleusX=this.nucleusX;a.nucleusY=this.nucleusY;a.freq2dX=this.freq2dX;a.freq2dY=this.freq2dY;a.setFilePath(this.filePath);a.nH=this.nH},"JSV.source.JDXDataObject");c(b,"getTypeLabel",function(){return this.isNMR()?this.nucleusX+"NMR":this.dataType});c(b,"getDefaultAnnotationInfo",function(a){var b,c=this.isNMR();switch(a){case JSV.common.Annotation.AType.Integration:return z(-1,[null,D(-1,[1]),null]);case JSV.common.Annotation.AType.Measurements:return a=
c?z(-1,["Hz","ppm"]):z(-1,[""]),b=this.isHNMR()?D(-1,[1,4]):D(-1,[1,3]),z(-1,[a,b,Integer.$valueOf(0)]);case JSV.common.Annotation.AType.PeakList:return a=c?z(-1,["Hz","ppm"]):z(-1,[""]),b=this.isHNMR()?D(-1,[1,2]):D(-1,[1,1]),z(-1,[a,b,Integer.$valueOf(c?1:0)])}return null},"JSV.common.Annotation.AType");c(b,"getPeakListArray",function(a,b,c){var e=a.getXVal();a=a.getYVal();this.isNMR()&&(a/=c);c=Math.abs(e-b[0]);b[0]=e;var g=c+b[1];b[1]=c;var f=g+b[2];b[2]=g;return this.isNMR()?S(-1,[e,a,e*this.observedFreq,
20<c*this.observedFreq?0:c*this.observedFreq,20<g*this.observedFreq?0:g*this.observedFreq,20<f*this.observedFreq?0:f*this.observedFreq]):S(-1,[e,a])},"JSV.common.Measurement,~A,~N");c(b,"finalizeCoordinates",function(){var a=Double.isNaN(this.freq2dX)?this.observedFreq:this.freq2dX,b=1.7976931348623157E308!=a&&this.getXUnits().toUpperCase().equals("HZ");1.7976931348623157E308!=this.fileShiftRef&&(1.7976931348623157E308!=a&&this.dataType.toUpperCase().contains("SPECTRUM")&&0>this.jcampdx.indexOf("JEOL"))&&
this.applyShiftReference(b?a:1,this.fileShiftRef);this.fileFirstX>this.fileLastX&&JSV.common.Coordinate.reverse(this.xyCoords);b&&(JSV.common.Coordinate.applyScale(this.xyCoords,1/a,1),this.setXUnits("PPM"),this.setHZtoPPM(!0))});c(b,"setShiftReference",function(a,b,c){this.fileShiftRef=a;this.fileShiftRefDataPt=0<b?b:1;this.fileShiftRefType=c},"~N,~N,~N");c(b,"isShiftTypeSpecified",function(){return-1!=this.fileShiftRefType});c(b,"applyShiftReference",function(a,b){if(!(this.fileShiftRefDataPt>this.xyCoords.length||
0>this.fileShiftRefDataPt)){var c;switch(this.fileShiftRefType){case 0:b=this.xyCoords[this.fileShiftRefDataPt-1].getXVal()-b*a;break;case 1:b=this.fileFirstX-b*a;break;case 2:b=this.fileLastX+b}for(var e=0;e<this.xyCoords.length;e++)c=this.xyCoords[e],c.setXVal(c.getXVal()-b),this.xyCoords[e]=c}},"~N,~N");b.gyroData=S(-1,[1,42.5774806,2,6.53590131,3,45.4148,3,32.436,6,6.2661,7,16.5483,9,5.9842,10,4.5752,11,13.663,13,10.70839657,14,3.07770646,15,4.3172657,17,5.7742,19,40.07757016,21,3.3631,23,11.26952167,
25,2.6083,27,11.1031,29,8.4655,31,17.2514409,33,3.2717,35,4.1765,37,3.4765,37,5.819,39,3.46,39,1.9893,40,2.4737,41,1.0919,43,2.8688,45,10.3591,47,2.4041,49,2.4048,50,4.2505,51,11.2133,53,2.4115,55,10.5763,57,1.3816,59,10.077,61,3.8114,63,11.2982,65,12.103,67,2.6694,69,10.2478,71,13.0208,73,1.4897,75,7.315,77,8.1571,79,10.7042,81,11.5384,83,1.6442,85,4.1254,87,13.9811,87,1.8525,89,2.0949,91,3.9748,93,10.4523,95,2.7874,97,2.8463,99,9.6294,99,1.9553,101,2.1916,103,1.3477,105,1.957,107,1.7331,109,1.9924,
111,9.0692,113,9.4871,113,9.3655,115,9.3856,115,14.0077,117,15.261,119,15.966,121,10.2551,123,5.5532,123,11.2349,125,13.5454,127,8.5778,129,11.8604,131,3.5159,133,5.6234,135,4.2582,137,4.7634,138,5.6615,139,6.0612,137,4.88,139,5.39,141,2.37,141,13.0359,143,2.319,145,1.429,143,11.59,147,5.62,147,1.7748,149,14631,151,10.5856,153,4.6745,155,1.312,157,1.72,159,10.23,161,1.4654,163,2.0508,165,9.0883,167,1.2281,169,3.531,171,7.5261,173,2.073,175,4.8626,176,3.451,177,1.7282,179,1.0856,180,4.087,181,5.1627,
183,1.7957,185,9.7176,187,9.817,187,0.9856,189,3.3536,191,0.7658,191,0.8319,195,9.2922,197,0.7406,199,7.7123,201,2.8469,203,24.7316,205,24.9749,207,9.034,209,6.963,209,11.7,211,9.16,223,5.95,223,1.3746,225,11.187,227,5.6,229,1.4,231,10.2,235,0.83,237,9.57,239,3.09,243,4.6,1E100]);b.gyroMap=new java.util.Hashtable;for(var b=0,a=JSV.source.JDXDataObject.gyroData.length-1;b<a;b+=2)JSV.source.JDXDataObject.gyroMap.put(""+w(JSV.source.JDXDataObject.gyroData[b]),Double.$valueOf(JSV.source.JDXDataObject.gyroData[b+
1]))});m("JSV.source");x(["java.util.Iterator"],"JSV.source.JDXDecompressor",["JSV.common.Coordinate","JU.Logger"],function(){var b=s(function(){this.ich=this.nPoints=this.yFactor=this.xFactor=0;this.t=null;this.lastX=this.firstX=0;this.maxY=4.9E-324;this.minY=1.7976931348623157E308;this.debugging=!1;this.line=this.xyCoords=null;this.lineLen=0;this.errorLog=null;this.lastDif=-2147483648;this.lastY=this.nptsFound=this.dupCount=0;this.isDIF=!0;r(this,arguments)},JSV.source,"JDXDecompressor",null,java.util.Iterator);
u(b,function(a,b,c,f,e,g){this.t=a;this.firstX=b;this.lastX=c;this.xFactor=f;this.yFactor=e;this.nPoints=g;this.debugging=JU.Logger.isActiveLevel(6)},"JSV.source.JDXSourceStreamTokenizer,~N,~N,~N,~N,~N");u(b,function(a,b){this.line=a.trim();this.lineLen=a.length;this.lastY=b},"~S,~N");c(b,"getMinY",function(){return this.minY});c(b,"getMaxY",function(){return this.maxY});c(b,"decompressData",function(a){this.errorLog=a;a=JSV.common.Coordinate.deltaX(this.lastX,this.firstX,this.nPoints);this.debugging&&
this.logError("firstX="+this.firstX+" lastX="+this.lastX+" xFactor="+this.xFactor+" yFactor="+this.yFactor+" deltaX="+a+" nPoints="+this.nPoints);this.xyCoords=Array(this.nPoints);var b=0,c=0,f=this.lastX,e=this.lastX=this.firstX,g=null,j=0,k=0,l=!1,m=this.t.labelLineNo;try{for(;null!=(this.line=this.t.readLineTrimmed())&&0>this.line.indexOf("##");)if(m++,0!=(this.lineLen=this.line.length)){this.ich=0;var n=this.isDIF,q=this.readSignedFloat()*this.xFactor,k=this.nextValue(k);!n&&0<j&&(e+=a);this.debugging&&
this.logError("Line: "+m+" isCP="+n+"\t>>"+this.line+"<<\n x, xcheck "+e+" "+e/this.xFactor+" "+q/this.xFactor+" "+a/this.xFactor);var r=k*this.yFactor,s=(new JSV.common.Coordinate).set(e,r);if(0==j||!n)this.addPoint(s,j++);else if(j<this.nPoints){var u=this.xyCoords[j-1].getYVal();r!=u&&(this.xyCoords[j-1]=s,this.logError(g+"\n"+this.line+"\nY-value Checkpoint Error! Line "+m+" for y="+r+" yLast="+u));(q==b||q<b!=0>a)&&this.logError(g+"\n"+this.line+"\nX-sequence Checkpoint Error! Line "+m+" order for xCheck="+
q+" after prevXCheck="+b);var w=Math.abs(q-b),x=Math.abs((j-c)*a),z=Math.abs(w-x)/w;this.debugging&&System.err.println("JDXD fracDif = "+q+"\t"+b+"\txcheckDif="+w+"\txiptDif="+x+"\tf="+z);0.5<z&&this.logError(g+"\n"+this.line+"\nX-value Checkpoint Error! Line "+m+" expected "+x+" but X-Sequence Check difference reads "+w)}for(var c=1==j?0:j,b=q,A=0;this.hasNext();){var C=this.ich;this.debugging&&this.logError("line "+m+" char "+C+":"+this.line.substring(0,C)+">>>>"+this.line.substring(this.ich));
Double.isNaN(k=this.nextValue(k))?this.logError("There was an error reading line "+m+" char "+C+":"+this.line.substring(0,C)+">>>>"+this.line.substring(C)):(e+=a,1.7976931348623157E308==k&&(k=0,this.logError("Point marked invalid '?' for line "+m+" char "+C+":"+this.line.substring(0,C)+">>>>"+this.line.substring(C))),this.addPoint((new JSV.common.Coordinate).set(e,k*this.yFactor),j++),this.debugging&&this.logError("nx="+ ++A+" "+e+" "+e/this.xFactor+" yval="+k))}this.lastX=e;!l&&j>this.nPoints&&(this.logError("! points overflow nPoints!"),
l=!0);g=this.line}}catch(D){if(E(D,"java.io.IOException"))D.printStackTrace();else throw D;}this.checkZeroFill(j,f);return this.xyCoords},"JU.SB");c(b,"checkZeroFill",function(a,b){this.nptsFound=a;if(this.nPoints==this.nptsFound)1E-5<Math.abs(b-this.lastX)&&this.logError("Something went wrong! The last X value was "+this.lastX+" but expected "+b);else{this.logError("Decompressor did not find "+this.nPoints+" points -- instead "+this.nptsFound+" xyCoords.length set to "+this.nPoints);for(var c=this.nptsFound;c<
this.nPoints;c++)this.addPoint((new JSV.common.Coordinate).set(0,NaN),c)}},"~N,~N");c(b,"addPoint",function(a,b){if(!(b>=this.nPoints)){this.xyCoords[b]=a;var c=a.getYVal();c>this.maxY?this.maxY=c:c<this.minY&&(this.minY=c);this.debugging&&this.logError("Coord: "+b+a)}},"JSV.common.Coordinate,~N");c(b,"logError",function(a){this.debugging&&JU.Logger.debug(a);System.err.println(a);this.errorLog.append(a).appendC("\n")},"~S");c(b,"nextValue",function(a){if(0<this.dupCount)return this.getDuplicate(a);
var b=this.skipUnknown();switch(JSV.source.JDXDecompressor.actions[b.charCodeAt(0)]){case 1:return this.isDIF=!0,a+(this.lastDif=this.readNextInteger("%"==b?0:"R">=b?b.charCodeAt(0)-73:105-b.charCodeAt(0)));case 2:return this.dupCount=this.readNextInteger("s"==b?9:b.charCodeAt(0)-82)-1,this.getDuplicate(a);case 3:a=this.readNextSqueezedNumber(b);break;case 4:this.ich--;a=this.readSignedFloat();break;case -1:a=1.7976931348623157E308;break;default:a=NaN}this.isDIF=!1;return a},"~N");c(b,"skipUnknown",
function(){for(var a="\x00";this.ich<this.lineLen&&0==JSV.source.JDXDecompressor.actions[(a=this.line.charAt(this.ich++)).charCodeAt(0)];);return a});c(b,"readSignedFloat",function(){for(var a=this.ich,b="\x00";this.ich<this.lineLen&&0<=" ,\t\n".indexOf(b=this.line.charAt(this.ich));)this.ich++;var c=1;switch(b.charCodeAt(0)){case 45:c=-1;case 43:a=++this.ich}if("E"==this.scanToNonnumeric()&&this.ich+3<this.lineLen)switch(this.line.charAt(this.ich+1).charCodeAt(0)){case 45:case 43:this.ich+=4,this.ich<
this.lineLen&&("0"<=(b=this.line.charAt(this.ich))&&"9">=b)&&this.ich++}return c*Double.parseDouble(this.line.substring(a,this.ich))});c(b,"getDuplicate",function(a){this.dupCount--;return this.isDIF?a+this.lastDif:a},"~N");c(b,"readNextInteger",function(a){for(var b=String.fromCharCode(0);this.ich<this.lineLen&&"0"<=(b=this.line.charAt(this.ich))&&"9">=b;)a=10*a+(0>a?48-b.charCodeAt(0):b.charCodeAt(0)-48),this.ich++;return a},"~N");c(b,"readNextSqueezedNumber",function(a){var b=this.ich;this.scanToNonnumeric();
return Double.parseDouble((96<a.charCodeAt(0)?96-a.charCodeAt(0):a.charCodeAt(0)-64)+this.line.substring(b,this.ich))},"~S");c(b,"scanToNonnumeric",function(){for(var a=String.fromCharCode(0);this.ich<this.lineLen&&("."==(a=this.line.charAt(this.ich))||"0"<=a&&"9">=a);)this.ich++;return this.ich<this.lineLen?a:"\x00"});c(b,"getNPointsFound",function(){return this.nptsFound});f(b,"hasNext",function(){return this.ich<this.lineLen||0<this.dupCount});f(b,"next",function(){return this.hasNext()?Double.$valueOf(this.lastY=
this.nextValue(this.lastY)):null});f(b,"remove",function(){});b.actions=D(255,0);for(b=37;115>=b;b++)switch(String.fromCharCode(b).charCodeAt(0)){case 37:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:JSV.source.JDXDecompressor.actions[b]=1;break;case 43:case 45:case 46:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:JSV.source.JDXDecompressor.actions[b]=4;break;
case 63:JSV.source.JDXDecompressor.actions[b]=-1;break;case 64:case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:JSV.source.JDXDecompressor.actions[b]=3;break;case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 115:JSV.source.JDXDecompressor.actions[b]=2}});m("JSV.source");x(["JU.Lst"],"JSV.source.JDXHeader",["java.util.Hashtable","JSV.source.JDXSourceStreamTokenizer"],function(){var b=
s(function(){this.title="";this.jcampdx="5.01";this.origin=this.dataClass=this.dataType="";this.owner="PUBLIC DOMAIN";this.time=this.date=this.longDate="";this.headerTable=this.qualifiedType=null;r(this,arguments)},JSV.source,"JDXHeader",null);N(b,function(){this.headerTable=new JU.Lst});c(b,"setTitle",function(a){this.title=a},"~S");c(b,"setJcampdx",function(a){this.jcampdx=a},"~S");c(b,"setDataType",function(a){this.dataType=a},"~S");c(b,"setDataClass",function(a){this.dataClass=a},"~S");c(b,"setOrigin",
function(a){this.origin=a},"~S");c(b,"setOwner",function(a){this.owner=a},"~S");c(b,"setLongDate",function(a){this.longDate=a},"~S");c(b,"setDate",function(a){this.date=a},"~S");c(b,"setTime",function(a){this.time=a},"~S");c(b,"getTitle",function(){return this.title});b.getTypeName=c(b,"getTypeName",function(a){a=a.toUpperCase();for(var b=0;b<JSV.source.JDXHeader.typeNames.length;b++)if(JSV.source.JDXHeader.typeNames[b].startsWith(a))return JSV.source.JDXHeader.typeNames[b].substring(18);return a},
"~S");c(b,"getQualifiedDataType",function(){return null==this.qualifiedType?this.qualifiedType=JSV.source.JDXHeader.getTypeName(this.dataType):this.qualifiedType});c(b,"getJcampdx",function(){return this.jcampdx});c(b,"getDataType",function(){return this.dataType});c(b,"getOrigin",function(){return this.origin});c(b,"getOwner",function(){return this.owner});c(b,"getLongDate",function(){return this.longDate});c(b,"getDate",function(){return this.date});c(b,"getTime",function(){return this.time});c(b,
"getDataClass",function(){return this.dataClass});c(b,"setHeaderTable",function(a){this.headerTable=a},"JU.Lst");c(b,"getHeaderTable",function(){return this.headerTable});c(b,"getHeaderRowDataAsArray",function(a,b){var c=Array((a?6:5)+this.headerTable.size()+b),e=0;c[e++]=z(-1,["##TITLE",this.title]);c[e++]=z(-1,["##JCAMP-DX",this.jcampdx]);c[e++]=z(-1,["##DATA TYPE",this.dataType]);a&&(c[e++]=z(-1,["##DATA CLASS",this.dataClass]));c[e++]=z(-1,["##ORIGIN",this.origin]);c[e++]=z(-1,["##OWNER",this.owner]);
for(var g=0;g<this.headerTable.size();g++)c[e++]=this.getRow(g);return c},"~B,~N");c(b,"getRow",function(a){a=this.headerTable.get(a);return[a[0],JU.PT.rep(a[1],"<","&lt;")]},"~N");var a=s(function(){this.map=this.table=null;r(this,arguments)},JSV.source.JDXHeader,"DataLDRTable",null);u(a,function(){this.table=new JU.Lst;this.map=new java.util.Hashtable});c(a,"addHeader",function(a,b){var c=this.map.get(a);null==c?(c=Integer.$valueOf(this.table.size()),this.table.addLast(z(-1,[a,b,JSV.source.JDXSourceStreamTokenizer.cleanLabel(a)])),
this.map.put(a,c)):this.table.get(c.intValue())[1]=b},"~S,~S");b.typeNames=z(-1,"ND NMR SPECTRUM   NMR;NMR SPECTRUM      NMR;INFRARED SPECTRUM IR;MASS SPECTRUM     MS;RAMAN SPECTRUM    RAMAN;GAS CHROMATOGRAM  GC;UV/VIS SPECTRUM   UV/VIS".split(";"))});m("JSV.source");x(["J.api.JmolJDXMOLReader"],"JSV.source.JDXReader","java.io.BufferedReader $.FileInputStream $.StringReader java.util.Hashtable $.LinkedHashMap $.StringTokenizer javajs.api.Interface JU.AU $.Lst $.PT $.Rdr $.SB JSV.common.Coordinate $.JSVFileManager $.JSViewer $.PeakInfo $.Spectrum JSV.exception.JSVException JSV.source.JDXDecompressor $.JDXHeader $.JDXSource $.JDXSourceStreamTokenizer JU.Logger".split(" "),
function(){var b=s(function(){this.mnovaParamValue=null;this.nmrMaxY=NaN;this.errorLog=this.t=this.source=null;this.isZipFile=this.done=this.obscure=!1;this.filePath=null;this.loadImaginary=!0;this.ignorePeakTables=this.ignoreShiftReference=this.isSimulation=!1;this.lastErrPath=null;this.isTabularData=!1;this.blockID=this.nSpec=this.lastSpec=this.firstSpec=0;this.peakData=this.acdMolFile=this.acdAssignments=this.modelSpectrum=this.reader=this.mpr=null;r(this,arguments)},JSV.source,"JDXReader",null,
J.api.JmolJDXMOLReader);u(b,function(a,b,c,f,e,g){a=JU.PT.trimQuotes(a);if(this.isSimulation=null!=a&&a.startsWith("http://SIMULATION/"))this.nmrMaxY=Double.isNaN(g)?1E4:g;this.filePath=a;this.obscure=b;this.firstSpec=f;this.lastSpec=e;this.loadImaginary=c},"~S,~B,~B,~N,~N,~N");b.getVarList=c(b,"getVarList",function(a){a=JSV.source.JDXReader.VAR_LIST_TABLE[0].indexOf(a);return JSV.source.JDXReader.VAR_LIST_TABLE[1].substring(a+1,a+12).trim()},"~S");b.createJDXSourceFromStream=c(b,"createJDXSourceFromStream",
function(a,b,c,f){return JSV.source.JDXReader.createJDXSource(null,a,"stream",b,c,-1,-1,f)},"java.io.InputStream,~B,~B,~N");b.getHeaderMap=c(b,"getHeaderMap",function(a,b){return JSV.source.JDXReader.getHeaderMapS(a,b,-1,null)},"java.io.InputStream,java.util.Map");b.getHeaderMapS=c(b,"getHeaderMapS",function(a,b,c,f){a=JSV.source.JDXReader.createJDXSource(null,a,null,!1,!1,0,-1,0).getJDXSpectrum(c).headerTable;null==b&&(b=new java.util.LinkedHashMap);c=0;for(var e=a.size();c<e;c++){var g=a.get(c);
b.put(null==f?g[2]:g[2]+f,g[1])}return b},"java.io.InputStream,java.util.Map,~N,~S");b.createJDXSource=c(b,"createJDXSource",function(a,b,c,f,e,g,j,k){var l=j<g,m=null,n=null;if(JU.AU.isAB(b)&&(n=b,JU.Rdr.isZipB(n)))return JSV.source.JDXReader.readBrukerFileZip(n,null==a?c:a.getFullPath());"string"==typeof b||null!=n?("string"==typeof b&&(m=b),b=JSV.common.JSVFileManager.getBufferedReaderForStringOrBytes(b)):b=C(b,"java.io.InputStream")?JSV.common.JSVFileManager.getBufferedReaderForInputStream(b):
b;var q=n=null;try{if(null==b){if(null!=a&&a.isDirectory())return JSV.source.JDXReader.readBrukerFileDir(a.getFullPath());b=JSV.common.JSVFileManager.getBufferedReaderFromName(c)}if(!l){b.mark(400);var r=da(400,"\x00");b.read(r,0,400);b.reset();n=String.instantialize(r);if(n.startsWith("PK"))return b.close(),JSV.source.JDXReader.readBrukerFileZip(null,a.getFullPath());if(0<=n.indexOf("\x00")||0==n.indexOf("##TITLE= Parameter file")||0==n.indexOf("##TITLE= Audit trail"))return b.close(),JSV.source.JDXReader.readBrukerFileDir(a.getParentAsFile().getFullPath());
var s=n.indexOf("#"),u=n.indexOf("<");if(0>s||0<=u&&u<s){var w=n.toLowerCase(),w=w.contains("<animl")||w.contains("<!doctype technique")?"AnIML":w.contains("xml-cml")?"CML":w.contains("<nmrml")?"NMRML":null;if(null==w)return JSV.source.JDXReader.readBrukerFileDir(a.getFullPath());q=JSV.common.JSViewer.getInterface("JSV.source."+w+"Reader").getSource(c,b);b.close();if(null==q)throw JU.Logger.error(n+"..."),new JSV.exception.JSVException("File type not recognized");}}null==q&&(q=(new JSV.source.JDXReader(c,
f,e,g,j,k)).getJDXSource(b,l));null!=m&&q.setInlineData(m);return q}catch(x){if(E(x,Exception))throw JSV.common.JSViewer.isJS||x.printStackTrace(),null!=b&&b.close(),null!=n&&JU.Logger.error(n+"..."),a=x.getMessage(),new JSV.exception.JSVException("Error reading data: "+a);throw x;}},"J.api.GenericFileInterface,~O,~S,~B,~B,~N,~N,~N");b.readBrukerFileDir=c(b,"readBrukerFileDir",function(a){return javajs.api.Interface.getInterface("JSV.source.BrukerReader").readBrukerDir(a)},"~S");b.readBrukerFileZip=
c(b,"readBrukerFileZip",function(a,b){return javajs.api.Interface.getInterface("JSV.source.BrukerReader").readBrukerZip(a,b)},"~A,~S");c(b,"getJDXSource",function(a,b){this.source=new JSV.source.JDXSource(0,this.filePath);this.isZipFile=C(a,"JSV.api.JSVZipReader");this.t=new JSV.source.JDXSourceStreamTokenizer(a);this.errorLog=new JU.SB;for(var c=null,f=null,e=!1;!this.done&&"##TITLE".equals(this.t.peakLabel());){e=!0;null!=c&&!this.isZipFile&&this.logError("Warning - file is a concatenation without LINK record -- does not conform to JCAMP-DX standard 6.1.3!");
var g=new JSV.common.Spectrum,j=new JSV.source.JDXHeader.DataLDRTable;for(b&&g.setHeaderTable(j.table);!this.done&&null!=(c=this.t.getLabel())&&null!=(f=this.getValue(c));)if(this.isTabularData){if(b){j.addHeader(this.t.rawLabel,"<data>");break}this.processTabularData(g,j,c,b);this.addSpectrum(g,!1);this.isSimulation&&g.getXUnits().equals("PPM")&&g.setHZtoPPM(!0);g=null}else{if(!b){if(c.equals("##DATATYPE")&&f.toUpperCase().equals("LINK")){this.getBlockSpectra(j);g=null;continue}if(c.equals("##NTUPLES")||
c.equals("##VARNAME")){this.getNTupleSpectra(j,g,c);g=null;continue}}c.equals("##JCAMPDX")&&this.setVenderSpecificValues(this.t.rawLine);null==g&&(g=new JSV.common.Spectrum);this.processLabel(g,j,c,f,b)}b&&null!=g&&this.addSpectrum(g,!1)}if(!e)throw new JSV.exception.JSVException("##TITLE record not found");this.source.setErrorLog(this.errorLog.toString());return this.source},"~O,~B");c(b,"processLabel",function(a,b,c,f,e){if(this.readDataLabel(a,c,f,this.errorLog,this.obscure,e)||e){if(null!=this.mnovaParamValue){var g;
if(f.startsWith("(")&&0<=(g=f.indexOf(","))){var j=f.substring(1,g).trim();g=f.indexOf(")",g+1);0<g&&(f=f.substring(g+1).trim());b.addHeader(j,f)}this.mnovaParamValue=null}else b.addHeader(this.t.rawLabel,f);e||this.checkCustomTags(a,c,f)}},"JSV.common.Spectrum,JSV.source.JDXHeader.DataLDRTable,~S,~S,~B");c(b,"logError",function(a){this.errorLog.append(null==this.filePath||this.filePath.equals(this.lastErrPath)?"":this.filePath).append("\n").append(a).append("\n");this.lastErrPath=this.filePath},
"~S");c(b,"setVenderSpecificValues",function(a){0<=a.indexOf("JEOL")&&(System.out.println("Skipping ##.SHIFTREFERENCE for JEOL "+a),this.ignoreShiftReference=!0);0<=a.indexOf("MestReNova")&&(this.ignorePeakTables=!0)},"~S");c(b,"getValue",function(a){var b=this.isTabularDataLabel(a)?"":this.t.getValue();return"##END".equals(a)?null:b},"~S");c(b,"isTabularDataLabel",function(a){return this.isTabularData=0<="##DATATABLE##PEAKTABLE##XYDATA##XYPOINTS#".indexOf(a+"#")},"~S");c(b,"addSpectrum",function(a,
b){if(!this.loadImaginary&&a.isImaginary())return JU.Logger.info("FileReader skipping imaginary spectrum -- use LOADIMAGINARY TRUE to load this spectrum."),!0;if(null!=this.acdAssignments){if(!a.dataType.equals("MASS SPECTRUM")&&!a.isContinuous())return JU.Logger.info("Skipping ACD Labs line spectrum for "+a),!0;if(0<this.acdAssignments.size())try{this.mpr.setACDAssignments(a.title,a.getTypeLabel(),this.source.peakCount,this.acdAssignments,this.acdMolFile)}catch(c){if(E(c,Exception))JU.Logger.info("Failed to create peak data: "+
c);else throw c;}null!=this.acdMolFile&&JSV.common.JSVFileManager.cachePut("mol",this.acdMolFile)}Float.isNaN(this.nmrMaxY)?1E4<=a.getMaxY()&&a.normalizeSimulation(1E3):a.normalizeSimulation(this.nmrMaxY);this.isSimulation&&a.setSimulated(this.filePath);this.nSpec++;if(0<this.firstSpec&&this.nSpec<this.firstSpec)return!0;if(0<this.lastSpec&&this.nSpec>this.lastSpec)return!(this.done=!0);a.setBlockID(this.blockID);this.source.addJDXSpectrum(null,a,b);return!0},"JSV.common.Spectrum,~B");c(b,"getBlockSpectra",
function(a){JU.Logger.debug("--JDX block start--");for(var b="",c=null,f=0==this.source.type,e=!1;null!=(b=this.t.getLabel())&&!b.equals("##TITLE");)c=this.getValue(b),f&&!this.readHeaderLabel(this.source,b,c,this.errorLog,this.obscure)&&a.addHeader(this.t.rawLabel,c),b.equals("##BLOCKS")&&100<JU.PT.parseInt(c)&&0>=this.firstSpec&&(e=!0);c=this.getValue(b);if(!"##TITLE".equals(b))throw new JSV.exception.JSVException("Unable to read block source");f&&this.source.setHeaderTable(a.table);this.source.type=
1;this.source.isCompoundSource=!0;a=new JSV.common.Spectrum;f=new JSV.source.JDXHeader.DataLDRTable;this.readDataLabel(a,b,c,this.errorLog,this.obscure,!1);try{for(var g;null!=(g=this.t.getLabel());){if(null==(c=this.getValue(g))&&"##END".equals(b)){JU.Logger.debug("##END= "+this.t.getValue());break}b=g;if(this.isTabularData)this.processTabularData(a,f,b,!1);else{if(b.equals("##DATATYPE"))if(c.toUpperCase().equals("LINK"))this.getBlockSpectra(f),b=a=null;else{if(c.toUpperCase().startsWith("NMR PEAK")&&
this.ignorePeakTables)return this.done=!0,this.source}else if(b.equals("##NTUPLES")||b.equals("##VARNAME"))this.getNTupleSpectra(f,a,b),a=null,b="";if(this.done)break;if(null==a){a=new JSV.common.Spectrum;f=new JSV.source.JDXHeader.DataLDRTable;if(""===b)continue;if(null==b){b="##END";continue}}if(null==c){if(0<a.getXYCoords().length&&!this.addSpectrum(a,e))return this.source;a=new JSV.common.Spectrum;f=new JSV.source.JDXHeader.DataLDRTable}else this.processLabel(a,f,b,c,!1)}}}catch(j){if(E(j,Exception))throw JSV.common.JSViewer.isJS||
j.printStackTrace(),new JSV.exception.JSVException(j.getMessage());throw j;}this.addErrorLogSeparator();this.source.setErrorLog(this.errorLog.toString());JU.Logger.debug("--JDX block end--");return this.source},"JSV.source.JDXHeader.DataLDRTable");c(b,"addErrorLogSeparator",function(){0<this.errorLog.length()&&this.errorLog.lastIndexOf("=====================\n")!=this.errorLog.length()-22&&this.logError("=====================\n")});c(b,"getNTupleSpectra",function(a,b,c){var f=S(-1,[1.7976931348623157E308,
4.9E-324]);this.blockID=Math.random();0<this.firstSpec&&b.setNumDim(1);var e=c.equals("##VARNAME");e||(c="");var g=new java.util.Hashtable,j=Array(2);0==this.source.type&&(this.source.type=2,this.source.isCompoundSource=!0,this.source.setHeaderTable(a.table));for(;!(c=e?c:this.t.getLabel()).equals("##PAGE");){for(var e=!1,k=new java.util.StringTokenizer(this.t.getValue(),","),l=new JU.Lst;k.hasMoreTokens();)l.addLast(k.nextToken().trim());g.put(c,l)}e=g.get("##SYMBOL");if(!c.equals("##PAGE"))throw new JSV.exception.JSVException("Error Reading NTuple Source");
for(var k=this.t.getValue(),l=null,m=!0;!this.done;){if((c=this.t.getLabel()).equals("##ENDNTUPLES")){this.t.getValue();break}if(c.equals("##PAGE"))k=this.t.getValue();else{if(null==l&&(l=new JSV.common.Spectrum,b.copyTo(l),l.setTitle(b.getTitle()),!l.is1D())){var n=k.indexOf("=");if(0<=n)try{l.setY2D(this.parseAFFN(k.substring(0,n),k.substring(n+1).trim()));var q=k.substring(0,n).trim(),r=e.indexOf(q);0<=r&&l.setY2DUnits(g.get("##UNITS").get(r))}catch(s){if(!E(s,Exception))throw s;}}n=new JSV.source.JDXHeader.DataLDRTable;
for(l.setHeaderTable(n.table);!c.equals("##DATATABLE");)n.addHeader(this.t.rawLabel,this.t.getValue()),c=this.t.getLabel();c=!0;r=this.t.flushLine();0<r.trim().indexOf("PEAKS")&&(c=!1);var u=r.indexOf("("),w=r.lastIndexOf(")");if(-1==u||-1==w)throw new JSV.exception.JSVException("Variable List not Found");u=r.substring(u,w+1);for(r=w=0;r<e.size();r++){var x=e.get(r).trim();-1!=u.indexOf(x)&&(j[w++]=x);if(2==w)break}this.setTabularDataType(l,"##"+(c?"XYDATA":"PEAKTABLE"));if(!this.readNTUPLECoords(l,
g,j,f))throw new JSV.exception.JSVException("Unable to read Ntuple Source");l.nucleusX.equals("?")||(b.nucleusX=l.nucleusX);b.nucleusY=l.nucleusY;b.freq2dX=l.freq2dX;b.freq2dY=l.freq2dY;b.y2DUnits=l.y2DUnits;r=0;for(c=a.table.size();r<c;r++)u=a.table.get(r),w=JSV.source.JDXSourceStreamTokenizer.cleanLabel(u[0]),!w.equals("##TITLE")&&(!w.equals("##DATACLASS")&&!w.equals("##NTUPLES"))&&n.table.addLast(u);this.addSpectrum(l,!m);m=!1;l=null}}this.addErrorLogSeparator();this.source.setErrorLog(this.errorLog.toString());
JU.Logger.info("NTUPLE MIN/MAX Y = "+f[0]+" "+f[1]);return this.source},"JSV.source.JDXHeader.DataLDRTable,JSV.source.JDXDataObject,~S");c(b,"readDataLabel",function(a,b,c,f,e,g){if(!this.readHeaderLabel(a,b,c,f,e))return!1;b+=" ";if(0<="##MINX ##MINY ##MAXX ##MAXY ##FIRSTY ##DELTAX ##DATACLASS ".indexOf(b))return!1;switch("##FIRSTX  ##LASTX   ##NPOINTS ##XFACTOR ##YFACTOR ##XUNITS  ##YUNITS  ##XLABEL  ##YLABEL  ##NUMDIM  ##OFFSET  ".indexOf(b)){case 0:return a.fileFirstX=this.parseAFFN(b,c),!1;case 10:return a.fileLastX=
this.parseAFFN(b,c),!1;case 20:return a.fileNPoints=Integer.parseInt(c),!1;case 30:return a.setXFactor(this.parseAFFN(b,c)),!1;case 40:return a.yFactor=this.parseAFFN(b,c),!1;case 50:return a.setXUnits(c),!1;case 60:return a.setYUnits(c),!1;case 70:return a.setXLabel(c),!0;case 80:return a.setYLabel(c),!0;case 90:return a.setNumDim(Integer.parseInt(c)),!1;case 100:return a.isShiftTypeSpecified()||a.setShiftReference(this.parseAFFN(b,c),1,1),!1;default:if(17>b.length||g&&0<=c.indexOf(","))return!g;
if(b.equals("##.OBSERVEFREQUENCY "))return a.setObservedFreq(this.parseAFFN(b,c)),!1;if(b.equals("##.OBSERVENUCLEUS "))return a.setObservedNucleus(c),!1;if(b.equals("##$REFERENCEPOINT ")&&!a.isShiftTypeSpecified()){var j=c.indexOf(" ");0<j&&(c=c.substring(0,j));a.setShiftReference(this.parseAFFN(b,c),1,2);return!1}if(b.equals("##.SHIFTREFERENCE ")){if(this.ignoreShiftReference||!a.dataType.toUpperCase().contains("SPECTRUM"))return!1;c=JU.PT.replaceAllCharacters(c,")(","");c=new java.util.StringTokenizer(c,
",");if(4!=c.countTokens())return!1;try{c.nextToken();c.nextToken();var j=F(Float.parseFloat(c.nextToken().trim())),k=this.parseAFFN(b,c.nextToken().trim());a.setShiftReference(k,j,0)}catch(l){if(!E(l,Exception))throw l;}return!1}return!0}},"JSV.source.JDXDataObject,~S,~S,JU.SB,~B,~B");c(b,"readHeaderLabel",function(a,b,c,f,e){switch(b){case "##TITLE":return a.setTitle(e||null==c||c.equals("")?"Unknown":c),!1;case "##JCAMPDX":return a.jcampdx=c,a=JU.PT.parseFloat(c),(6<=a||Float.isNaN(a))&&null!=
f&&f.append("Warning: JCAMP-DX version may not be fully supported: "+c+"\n"),!1;case "##ORIGIN":return a.origin=null!=c&&!c.equals("")?c:"Unknown",!1;case "##OWNER":return a.owner=null!=c&&!c.equals("")?c:"Unknown",!1;case "##DATATYPE":return a.dataType=c,!1;case "##LONGDATE":return a.longDate=c,!1;case "##DATE":return a.date=c,!1;case "##TIME":return a.time=c,!1;case "##$PARAMETERFILE":return this.mnovaParamValue=c,!1}return!0},"JSV.source.JDXHeader,~S,~S,JU.SB,~B");c(b,"setTabularDataType",function(a,
b){b.equals("##PEAKASSIGNMENTS")?a.setDataClass("PEAKASSIGNMENTS"):b.equals("##PEAKTABLE")?a.setDataClass("PEAKTABLE"):b.equals("##XYDATA")?a.setDataClass("XYDATA"):b.equals("##XYPOINTS")&&a.setDataClass("XYPOINTS")},"JSV.source.JDXDataObject,~S");c(b,"processTabularData",function(a,b,c,f){this.setTabularDataType(a,c);a.setHeaderTable(b.table);if(a.dataClass.equals("XYDATA"))a.checkJDXRequiredTokens(),f||this.decompressData(a,null);else if(a.dataClass.equals("PEAKTABLE")||a.dataClass.equals("XYPOINTS")){a.setContinuous(a.dataClass.equals("XYPOINTS"));
try{this.t.readLineTrimmed()}catch(e){if(!E(e,"java.io.IOException"))throw e;}1.7976931348623157E308!=a.xFactor&&1.7976931348623157E308!=a.yFactor?(b=this.t.getValue(),b=JSV.common.Coordinate.parseDSV(b,a.xFactor,a.yFactor)):b=JSV.common.Coordinate.parseDSV(this.t.getValue(),1,1);a.setXYCoords(b);b=JSV.common.Coordinate.deltaX(b[b.length-1].getXVal(),b[0].getXVal(),b.length);a.setIncreasing(0<b)}else throw new JSV.exception.JSVException("Unable to read JDX file tabular data for line "+this.t.labelLineNo);
},"JSV.source.JDXDataObject,JSV.source.JDXHeader.DataLDRTable,~S,~B");c(b,"readNTUPLECoords",function(a,b,c,f){var e;if(a.dataClass.equals("XYDATA")){e=b.get("##SYMBOL");var g=e.indexOf(c[0]),j=e.indexOf(c[1]);e=b.get("##VARNAME");a.setVarName(e.get(j).toUpperCase());e=b.get(c="##FACTOR");a.setXFactor(this.parseAFFN(c,e.get(g)));a.setYFactor(this.parseAFFN(c,e.get(j)));e=b.get(c="##LAST");a.fileLastX=this.parseAFFN(c,e.get(g));e=b.get(c="##FIRST");a.fileFirstX=this.parseAFFN(c,e.get(g));e=b.get("##VARDIM");
a.fileNPoints=Integer.parseInt(e.get(g));e=b.get("##UNITS");a.setXUnits(e.get(g));a.setYUnits(e.get(j));null==a.nucleusX&&null!=(e=b.get("##.NUCLEUS"))?(a.setNucleusAndFreq(e.get(0),!1),a.setNucleusAndFreq(e.get(g),!0)):null==a.nucleusX&&(a.nucleusX="?");this.decompressData(a,f);return!0}return a.dataClass.equals("PEAKTABLE")||a.dataClass.equals("XYPOINTS")?(a.setContinuous(a.dataClass.equals("XYPOINTS")),e=b.get("##SYMBOL"),g=e.indexOf(c[0]),j=e.indexOf(c[1]),e=b.get("##UNITS"),a.setXUnits(e.get(g)),
a.setYUnits(e.get(j)),a.setXYCoords(JSV.common.Coordinate.parseDSV(this.t.getValue(),a.xFactor,a.yFactor)),!0):!1},"JSV.source.JDXDataObject,java.util.Map,~A,~A");c(b,"parseAFFN",function(a,b){var c=b.indexOf("E");if(0<c){var f;switch(b.length-c){case 2:case 3:this.logError("Warning - "+a+" value "+b+" is not of the format xxxE[+/-]nn or xxxE[+/-]nnn (spec. 4.5.3) -- warning only; accepted");break;case 4:case 5:if("+"==(f=b.charAt(c+1))||"-"==f)break;default:this.logError("Error - "+a+" value "+b+
" is not of the format xxxE[+/-]nn or xxxE[+/-]nnn (spec. 4.5.3) -- "+b.substring(c)+" ignored!"),b=b.substring(0,c)}}return Double.parseDouble(b)},"~S,~S");c(b,"decompressData",function(a,b){var c=this.errorLog.length();a.setIncreasing(a.fileLastX>a.fileFirstX);a.setContinuous(!0);var f=new JSV.source.JDXDecompressor(this.t,a.fileFirstX,a.fileLastX,a.xFactor,a.yFactor,a.fileNPoints),e=System.currentTimeMillis(),g=f.decompressData(this.errorLog);JU.Logger.debugging&&JU.Logger.debug("decompression time = "+
(System.currentTimeMillis()-e)+" ms");a.setXYCoords(g);e=f.getMinY();null!=b&&(e<b[0]&&(b[0]=e),e=f.getMaxY(),e>b[1]&&(b[1]=e));a.finalizeCoordinates();this.errorLog.length()!=c&&(c=JSV.common.Coordinate.deltaX(a.fileLastX,a.fileFirstX,a.fileNPoints),this.logError(a.getTitle()),this.logError("firstX from Header "+a.fileFirstX),this.logError("lastX from Header "+a.fileLastX+" Found "+f.lastX),this.logError("deltaX from Header "+c),this.logError("Number of points in Header "+a.fileNPoints+" Found "+
f.getNPointsFound()));JU.Logger.debugging&&System.err.println(this.errorLog.toString())},"JSV.source.JDXDataObject,~A");c(b,"checkCustomTags",function(a,b,c){10<b.length&&(b=b.substring(0,10));null==a?System.out.println(b):this.modelSpectrum=a;b="##$MODELS ##$PEAKS  ##$SIGNALS##$MOLFILE##PEAKASSI##$UVIRASS##$MSFRAGM".indexOf(b);if(0>b)return!1;this.getMpr().set(this,this.filePath,null);try{switch(this.reader=new java.io.BufferedReader(new java.io.StringReader(c)),b){case 0:this.mpr.readModels();break;
case 10:case 20:this.peakData=new JU.Lst;this.source.peakCount+=this.mpr.readPeaks(20==b,this.source.peakCount);break;case 30:this.acdAssignments=new JU.Lst;this.acdMolFile=JU.PT.rep(c,"$$ Empty String","");break;case 40:case 50:case 60:return this.acdAssignments=new JU.Lst,this.mpr.readACDAssignments(a.fileNPoints,40==b,this.acdAssignments)}}catch(f){if(E(f,Exception))throw new JSV.exception.JSVException(f.getMessage());throw f;}finally{this.reader=null}return!0},"JSV.common.Spectrum,~S,~S");c(b,
"getMpr",function(){return null==this.mpr?this.mpr=JSV.common.JSViewer.getInterface("J.jsv.JDXMOLParser"):this.mpr});f(b,"rd",function(){return this.reader.readLine()});f(b,"setSpectrumPeaks",function(a,b,c){this.modelSpectrum.setPeakList(this.peakData,b,c);this.modelSpectrum.isNMR()&&this.modelSpectrum.setHydrogenCount(a)},"~N,~S,~S");f(b,"addPeakData",function(a){null==this.peakData&&(this.peakData=new JU.Lst);this.peakData.addLast(new JSV.common.PeakInfo(a))},"~S");f(b,"processModelData",function(){},
"~S,~S,~S,~S,~S,~N,~N,~B");f(b,"discardLinesUntilContains",function(a){for(var b;null!=(b=this.rd())&&0>b.indexOf(a););return b},"~S");f(b,"discardLinesUntilContains2",function(a,b){for(var c;null!=(c=this.rd())&&0>c.indexOf(a)&&0>c.indexOf(b););return c},"~S,~S");f(b,"discardLinesUntilNonBlank",function(){for(var a;null!=(a=this.rd())&&0==a.trim().length;);return a});b.main=c(b,"main",function(){try{for(var a=JSV.source.JDXReader.getHeaderMap(new java.io.FileInputStream("c:/temp/t6.jdx"),null),b,
c=a.keySet().iterator();c.hasNext()&&((b=c.next())||1);)if(!b.startsWith("##")){var f=a.get(b);30<f.length&&(f=f.substring(0,30)+"...");System.out.println(b+"="+f)}}catch(e){if(E(e,Exception))e.printStackTrace();else throw e;}System.out.println("done")},"~A");b.VAR_LIST_TABLE=z(-1,["PEAKTABLE   XYDATA      XYPOINTS"," (XY..XY)    (X++(Y..Y)) (XY..XY)    "])});m("JSV.source");x(["JSV.source.JDXHeader"],"JSV.source.JDXSource",["JU.Lst"],function(){var b=s(function(){this.type=0;this.isCompoundSource=
!1;this.jdxSpectra=null;this.errors="";this.filePath=null;this.peakCount=0;this.isView=!1;this.inlineData=null;r(this,arguments)},JSV.source,"JDXSource",JSV.source.JDXHeader);u(b,function(a,b){K(this,JSV.source.JDXSource,[]);this.type=a;this.setFilePath(b);this.headerTable=new JU.Lst;this.jdxSpectra=new JU.Lst;this.isCompoundSource=0!=a},"~N,~S");c(b,"dispose",function(){this.jdxSpectra=this.headerTable=null});c(b,"getJDXSpectrum",function(a){0>a&&(a+=this.jdxSpectra.size());return this.jdxSpectra.size()<=
a?null:this.jdxSpectra.get(a)},"~N");c(b,"addJDXSpectrum",function(a,b,c){null==a&&(a=this.filePath);b.setFilePath(a);null!=this.inlineData&&b.setInlineData(this.inlineData);a=this.jdxSpectra.size();(0==a||!this.jdxSpectra.get(a-1).addSubSpectrum(b,c))&&this.jdxSpectra.addLast(b)},"~S,JSV.common.Spectrum,~B");c(b,"getNumberOfSpectra",function(){return this.jdxSpectra.size()});c(b,"getSpectra",function(){return this.jdxSpectra});c(b,"getSpectraAsArray",function(){return null==this.jdxSpectra?null:
this.jdxSpectra.toArray()});c(b,"getErrorLog",function(){return this.errors});c(b,"setErrorLog",function(a){this.errors=a},"~S");c(b,"setFilePath",function(a){this.filePath=a},"~S");c(b,"getFilePath",function(){return this.filePath});b.createView=c(b,"createView",function(a){var b=new JSV.source.JDXSource(-2,"view");b.isView=!0;for(var c=0;c<a.size();c++)b.addJDXSpectrum(a.get(c).getFilePath(),a.get(c),!1);return b},"JU.Lst");c(b,"getHeaderRowDataAsArray",function(a,b){null==b&&(b=z(0,0,null));for(var c=
this.getHeaderRowDataAsArray(a,b.length),f=b.length;0<=--f;)c[c.length-b.length+f]=b[f];return c},"~B,~A");c(b,"setID",function(a){this.jdxSpectra.get(0).sourceID=a},"~S");c(b,"matchesFilePath",function(a){return this.filePath.equals(a)||this.filePath.$replace("\\","/").equals(a)},"~S");c(b,"setInlineData",function(a){this.inlineData=a;if(null!=this.jdxSpectra)for(var b=this.jdxSpectra.size();0<=--b;)this.jdxSpectra.get(b).setInlineData(a)},"~S")});m("JSV.source");x(null,"JSV.source.JDXSourceStreamTokenizer",
["JU.SB","JU.Logger"],function(){var b=s(function(){this.value=this.rawLabel=this.br=null;this.labelLineNo=0;this.line=null;this.lineNo=0;this.rawLine=null;r(this,arguments)},JSV.source,"JDXSourceStreamTokenizer",null);u(b,function(a){this.br=a},"java.io.BufferedReader");c(b,"peakLabel",function(){return this.nextLabel(!1)});c(b,"getLabel",function(){return this.nextLabel(!0)});c(b,"nextLabel",function(a){for(this.value=this.rawLabel=null;null==this.line||0==this.line.length;){try{this.readLine();
if(null==this.line)return this.line="",null;this.line=this.line.trim()}catch(b){if(E(b,"java.io.IOException"))return this.line="",null;throw b;}if(this.line.startsWith("##"))break;this.line=null}this.rawLine=this.line;var c=this.line.indexOf("=");0>c?(a&&JU.Logger.info("BAD JDX LINE -- no '=' (line "+this.lineNo+"): "+this.line),this.rawLabel=this.line,a||(this.line="")):(this.rawLabel=this.line.substring(0,c).trim(),a&&(this.line=this.line.substring(c+1)));this.labelLineNo=this.lineNo;JU.Logger.debugging&&
JU.Logger.info(this.rawLabel);return JSV.source.JDXSourceStreamTokenizer.cleanLabel(this.rawLabel)},"~B");b.cleanLabel=c(b,"cleanLabel",function(a){if(null==a)return null;if(!a.startsWith("#"))return a;var b,c=new JU.SB;for(b=0;b<a.length;b++)switch(a.charAt(b).charCodeAt(0)){case 47:case 92:case 32:case 45:case 95:break;default:c.appendC(a.charAt(b))}return c.toString().toUpperCase()},"~S");c(b,"getValue",function(){if(null!=this.value)return this.value;var a=(new JU.SB).append(this.line);0<a.length()&&
a.appendC("\n");try{for(;null!=this.readLine()&&!(0<=this.line.indexOf("##")&&this.line.trim().startsWith("##"));)a.append(this.line).appendC("\n")}catch(b){if(E(b,"java.io.IOException"))JU.Logger.info(b.toString());else throw b;}this.value=this.rawLabel.startsWith("##$")?a.toString().trim():JSV.source.JDXSourceStreamTokenizer.trimLines(a);JU.Logger.debugging&&JU.Logger.info(this.value);return this.value});c(b,"readLineTrimmed",function(){this.readLine();if(null==this.line)return null;if(0>this.line.indexOf("$$"))return this.line.trim();
var a=(new JU.SB).append(this.line);return JSV.source.JDXSourceStreamTokenizer.trimLines(a)});c(b,"flushLine",function(){var a=(new JU.SB).append(this.line);this.line=null;return JSV.source.JDXSourceStreamTokenizer.trimLines(a)});c(b,"readLine",function(){this.line=this.br.readLine();this.lineNo++;return this.line});b.trimLines=c(b,"trimLines",function(a){var b=a.length(),c=b-1,f=JSV.source.JDXSourceStreamTokenizer.ptNonWhite(a,0,b);if(f>=b)return"";for(var e=da(b-f,"\x00"),g=0;f<b;f++){var j;switch((j=
a.charAt(f)).charCodeAt(0)){case 13:if(f<c&&"\n"==a.charAt(f+1))continue;j="\n";break;case 10:0<g&&"\n"!=e[g-1]&&(g-=f-JSV.source.JDXSourceStreamTokenizer.ptNonSpaceRev(a,f)-1);f=JSV.source.JDXSourceStreamTokenizer.ptNonSpace(a,++f,b)-1;break;case 36:if(f<c&&"$"==a.charAt(f+1)){for(f++;++f<b&&0>"\n\r".indexOf(a.charAt(f)););continue}}"\n"==j&&0<g&&"\n"==e[g-1]||(e[g++]=j)}0<g&&"\n"==e[g-1]&&--g;return String.instantialize(e).substring(0,g).trim()},"JU.SB");b.ptNonWhite=c(b,"ptNonWhite",function(a,
b,c){for(;b<c&&Character.isWhitespace(a.charAt(b));)b++;return b},"JU.SB,~N,~N");b.ptNonSpace=c(b,"ptNonSpace",function(a,b,c){for(;b<c&&(" "==a.charAt(b)||"\t"==a.charAt(b));)b++;return b},"JU.SB,~N,~N");b.ptNonSpaceRev=c(b,"ptNonSpaceRev",function(a,b){for(;0<=--b&&(" "==a.charAt(b)||"\t"==a.charAt(b)););return b},"JU.SB,~N")});m("JSV.tree");x(["JSV.api.JSVTree"],"JSV.tree.SimpleTree",["JSV.common.JSVFileManager","$.PanelNode","JSV.tree.SimpleTreeModel","$.SimpleTreeNode","$.SimpleTreePath"],function(){var b=
s(function(){this.selectedPath=this.vwr=this.spectraTreeModel=this.rootNode=this.si=null;r(this,arguments)},JSV.tree,"SimpleTree",null,JSV.api.JSVTree);u(b,function(a){this.vwr=a;this.rootNode=new JSV.tree.SimpleTreeNode("Spectra",null);this.spectraTreeModel=new JSV.tree.SimpleTreeModel(this.rootNode)},"JSV.common.JSViewer");f(b,"getRootNode",function(){return this.rootNode});c(b,"valueChanged",function(){this.vwr.selectedTreeNode(this.getLastSelectedPathComponent())});c(b,"getLastSelectedPathComponent",
function(){return null==this.selectedPath?null:this.selectedPath.getLastPathComponent()});f(b,"setSelectedPanel",function(a,b){if(null!=b){var c=JSV.common.PanelNode.findNode(b,this.vwr.panelNodes).treeNode;this.setSelectionPath(this.vwr.spectraTree.newTreePath(c.getPath()))}},"JSV.api.ScriptInterface,JSV.api.JSVPanel");c(b,"setSelectionPath",function(a){this.selectedPath=a;this.valueChanged()},"JSV.api.JSVTreePath");f(b,"createTree",function(a,b,c){var f=this.vwr.spectraTree,e=f.getRootNode(),g=
this.vwr.panelNodes,j=JSV.common.JSVFileManager.getTagName(b.getFilePath()),k=new JSV.common.PanelNode(null,j,b,null),l=new JSV.tree.SimpleTreeNode(j,k);k.setTreeNode(l);f.spectraTreeModel.insertNodeInto(l,e,e.getChildCount());for(e=0;e<c.length;e++){var k=new JSV.common.PanelNode(a+"."+(e+1),j,b,c[e]),m=new JSV.tree.SimpleTreeNode(k.toString(),k);k.setTreeNode(m);g.addLast(k);f.spectraTreeModel.insertNodeInto(m,l,l.getChildCount())}this.vwr.selectFrameNode(c[0]);return l},"~N,JSV.source.JDXSource,~A");
f(b,"setPath",function(a){this.setSelectionPath(a)},"JSV.api.JSVTreePath");c(b,"newTreePath",function(a){return new JSV.tree.SimpleTreePath(a)},"~A");f(b,"deleteNodes",function(a){for(var b=0;b<a.size();b++)this.spectraTreeModel.removeNodeFromParent(a.get(b))},"JU.Lst")});m("JSV.tree");x(["java.util.Enumeration"],"JSV.tree.SimpleTreeEnumeration",null,function(){var b=s(function(){this.node=null;this.pt=0;r(this,arguments)},JSV.tree,"SimpleTreeEnumeration",null,java.util.Enumeration);u(b,function(a){this.node=
a},"JSV.tree.SimpleTreeNode");f(b,"hasMoreElements",function(){return this.pt<this.node.$children.size()});f(b,"nextElement",function(){return this.node.$children.get(this.pt++)})});m("JSV.tree");var Na=s(function(){this.rootNode=null;r(this,arguments)},JSV.tree,"SimpleTreeModel",null);u(Na,function(b){this.rootNode=b},"JSV.api.JSVTreeNode");c(Na,"insertNodeInto",function(b,a,c){a.$children.add(c,b);b.prevNode=a},"JSV.api.JSVTreeNode,JSV.api.JSVTreeNode,~N");c(Na,"removeNodeFromParent",function(b){b.prevNode.$children.removeObj(b)},
"JSV.api.JSVTreeNode");m("JSV.tree");x(["JSV.api.JSVTreeNode"],"JSV.tree.SimpleTreeNode",["JU.Lst","JSV.tree.SimpleTreeEnumeration"],function(){var b=s(function(){this.panelNode=null;this.index=0;this.text=this.$children=this.prevNode=null;r(this,arguments)},JSV.tree,"SimpleTreeNode",null,JSV.api.JSVTreeNode);u(b,function(a,b){this.text=a;this.panelNode=b;this.$children=new JU.Lst},"~S,JSV.common.PanelNode");f(b,"getPanelNode",function(){return this.panelNode});f(b,"getIndex",function(){return this.index});
f(b,"setIndex",function(a){this.index=a},"~N");f(b,"children",function(){return new JSV.tree.SimpleTreeEnumeration(this)});f(b,"getChildCount",function(){return this.$children.size()});f(b,"getPath",function(){var a=new JU.Lst,b=this;for(a.addLast(b);null!=(b=b.prevNode);)a.add(0,b);return a.toArray()});f(b,"isLeaf",function(){return null!=this.prevNode&&null!=this.prevNode.prevNode});f(b,"toString",function(){return this.text})});m("JSV.tree");x(["JSV.api.JSVTreePath"],"JSV.tree.SimpleTreePath",
null,function(){var b=s(function(){this.path=null;r(this,arguments)},JSV.tree,"SimpleTreePath",null,JSV.api.JSVTreePath);u(b,function(a){this.path=a},"~A");f(b,"getLastPathComponent",function(){return null==this.path||0==this.path.length?null:this.path[this.path.length-1]})})}qa._coreLoaded=!0})(Clazz,Clazz.getClassName,Clazz.newLongArray,Clazz.doubleToByte,Clazz.doubleToInt,Clazz.doubleToLong,Clazz.declarePackage,Clazz.instanceOf,Clazz.load,Clazz.instantialize,Clazz.decorateAsClass,Clazz.floatToInt,
Clazz.floatToLong,Clazz.makeConstructor,Clazz.defineEnumConstant,Clazz.exceptionOf,Clazz.newIntArray,Clazz.newFloatArray,Clazz.declareType,Clazz.prepareFields,Clazz.superConstructor,Clazz.newByteArray,Clazz.declareInterface,Clazz.newShortArray,Clazz.innerTypeInstance,Clazz.isClassDefined,Clazz.prepareCallback,Clazz.newArray,Clazz.castNullAs,Clazz.floatToShort,Clazz.superCall,Clazz.decorateAsType,Clazz.newBooleanArray,Clazz.newCharArray,Clazz.implementOf,Clazz.newDoubleArray,Clazz.overrideConstructor,
Clazz.clone,Clazz.doubleToShort,Clazz.getInheritedLevel,Clazz.getParamsType,Clazz.isAF,Clazz.isAB,Clazz.isAI,Clazz.isAS,Clazz.isASS,Clazz.isAP,Clazz.isAFloat,Clazz.isAII,Clazz.isAFF,Clazz.isAFFF,Clazz.tryToSearchAndExecute,Clazz.getStackTrace,Clazz.inheritArgs,Clazz.alert,Clazz.defineMethod,Clazz.overrideMethod,Clazz.declareAnonymous,Clazz.cloneFinals);
