UNPKG

biojs-vis-pdbviewer

Version:

A BioJS 2.0 component to view protein structures

3,314 lines 1.72 MB
(function(Z,wa,xa,q,ya,n,p,w,s,t,z,u,v,y,D,C,L,B,K,E,O,H,F,G,T,M,N,Q,P,U,Y,R,V,ca,$,da,X,W,ja,ka,la,ma,fa,ea,na,oa,pa,qa,ra,ga,sa,ta,ha,ia,ua,c,h,S,va){___JmolDate="$Date: 2014-08-03 08:56:51 -0500 (Sun, 03 Aug 2014) $";___fullJmolProperties="src/org/jmol/viewer/Jmol.properties";___JmolVersion="14.2.4_2014.08.03";(function(n){n._Loader.registerPackages("java",["io","lang","lang.reflect","util"]);var q=java.util;n._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.Calendar java.text.SimpleDateFormat java.text.DateFormat java.util.concurrent.Executors".split(" "));
Math.log10||(Math.log10=function(a){return Math.log(a)/2.302585092994046});if(n._supportsNativeObject)for(var v=0;v<n._extendedObjectMethods.length-2;v++){var a=n._extendedObjectMethods[v];Array.prototype[a]=n._O.prototype[a];Number.prototype[a]=n._O.prototype[a]}java.lang.Number=Number;Number.__CLASS_NAME__="Number";da(Number,java.io.Serializable);Number.equals=n._innerFunctions.equals;Number.getName=n._innerFunctions.getName;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())});h(Number,"hashCode",function(){return this.valueOf()});java.lang.Integer=Integer=function(){s(this,arguments)};V(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()};W(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;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,e=a<<16;0!=e&&(d-=16,a=e);e=a<<8;0!=e&&(d-=8,a=e);e=a<<4;0!=e&&(d-=4,a=e);e=a<<2;0!=e&&(d-=2,a=e);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 e=a.length;0<=--e;){var c=a.charCodeAt(e);if(!(48<=c&&57>=c)&&(0<e||43!=c&&45!=c))throw new NumberFormatException("Not a Number : "+a);}e=parseInt(a,d);if(isNaN(e))throw new NumberFormatException("Not a Number : "+a);return e},"String, Number");Integer.parseIntRadix=Integer.prototype.parseIntRadix;c(Integer,"parseInt",function(a){return Integer.parseIntRadix(a,10)},"String");Integer.parseInt=Integer.prototype.parseInt;h(Integer,"$valueOf",function(a){return new Integer(a)});Integer.$valueOf=
Integer.prototype.$valueOf;h(Integer,"equals",function(a){return null==a||!p(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=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);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");h(Integer,"hashCode",function(){return this.valueOf()});java.lang.Long=Long=function(){s(this,arguments)};V(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()};W(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.parseInteger(a,d||10)});Long.parseLong=Long.prototype.parseLong;h(Long,"$valueOf",function(a){return new Long(a)});Long.$valueOf=Long.prototype.$valueOf;h(Long,"equals",function(a){return null==a||!p(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(){s(this,arguments)};V(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()};
W(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;h(Short,"$valueOf",function(a){return new Short(a)});Short.$valueOf=Short.prototype.$valueOf;h(Short,"equals",function(a){return null==a||!p(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(){s(this,arguments)};V(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;h(Byte,"$valueOf",function(a){return new Byte(a)});Byte.$valueOf=Byte.prototype.$valueOf;h(Byte,"equals",function(a){return null==a||!p(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");n._floatToString=function(a){a=""+a;0>a.indexOf(".")&&0>a.indexOf("e")&&(a+=".0");return a};java.lang.Float=Float=function(){s(this,arguments)};V(Float,"Float",Number,Comparable,null,!0);Float.prototype.valueOf=function(){return 0};Float.toString=Float.prototype.toString=function(){return 0!=arguments.length?n._floatToString(arguments[0]):this===Float?"class java.lang.Float":n._floatToString(this.valueOf())};
W(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=3.4028235E38;Float.MAX_VALUE=Float.prototype.MAX_VALUE=1.4E-45;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;h(Float,"$valueOf",function(a){return new Float(a)});Float.$valueOf=Float.prototype.$valueOf;c(Float,"isNaN",function(a){return isNaN(a)},"Number");Float.isNaN=Float.prototype.isNaN;c(Float,"isInfinite",function(a){return!isFinite(a)},"Number");Float.isInfinite=Float.prototype.isInfinite;h(Float,"equals",function(a){return null==
a||!p(a,Float)?!1:a.valueOf()==this.valueOf()},"Object");java.lang.Double=Double=function(){s(this,arguments)};V(Double,"Double",Number,Comparable,null,!0);Double.prototype.valueOf=function(){return 0};Double.toString=Double.prototype.toString=function(){return 0!=arguments.length?n._floatToString(arguments[0]):this===Double?"class java.lang.Double":n._floatToString(this.valueOf())};W(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(a)},"Number");Double.isNaN=Double.prototype.isNaN;c(Double,"isInfinite",function(a){return!isFinite(a)},
"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;h(Double,"equals",function(a){return null==a||!p(a,Double)?!1:a.valueOf()==
this.valueOf()},"Object");Boolean=java.lang.Boolean=Boolean||function(){s(this,arguments)};if(n._supportsNativeObject)for(v=0;v<n._extendedObjectMethods.length;v++)a=n._extendedObjectMethods[v],Boolean.prototype[a]=n._O.prototype[a];Boolean.__CLASS_NAME__="Boolean";da(Boolean,[java.io.Serializable,java.lang.Comparable]);Boolean.equals=n._innerFunctions.equals;Boolean.getName=n._innerFunctions.getName;Boolean.serialVersionUID=Boolean.prototype.serialVersionUID=-0x32df8d7f2a630600;W(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=h(Boolean,"$valueOf",function(a){return("string"==typeof a?"true".equalsIgnoreCase(a):a)?Boolean.TRUE:Boolean.FALSE});h(Boolean,"toString",function(){return this.valueOf()?"true":"false"});h(Boolean,"hashCode",function(){return this.valueOf()?
1231:1237});h(Boolean,"equals",function(a){return p(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(e){if(!p(e,IllegalArgumentException)&&!p(e,NullPointerException))throw e;}return d},"~S");h(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;n._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.readUTF8=function(d){var e=this.guessEncoding(d),c=0;e==a.UTF8?c=3:e==a.UTF16&&
(c=2);for(e=[];c<d.length;c++){var k=d.charCodeAt(c);if(128>k)e[e.length]=d.charAt(c);else if(192<k&&224>k){k&=31;c++;var l=d.charCodeAt(c)&63,k=(k<<6)+l;e[e.length]=String.fromCharCode(k)}else if(224<=k){k&=15;c++;l=d.charCodeAt(c)&63;c++;var h=d.charCodeAt(c)&63,k=(k<<12)+(l<<6)+h;e[e.length]=String.fromCharCode(k)}}return e.join("")};a.convert2UTF8=function(d){var e=this.guessEncoding(d),c=0;if(e==a.UTF8)return d;e==a.UTF16&&(c=2);for(var e=Array(0+d.length-c),k=c;k<d.length;k++){var l=d.charCodeAt(k);
if(128>l)e[0+k-c]=d.charAt(k);else if(2047>=l){var h=192+((l&1984)>>6),r=128+(l&63);e[0+k-c]=String.fromCharCode(h)+String.fromCharCode(r)}else h=224+((l&61440)>>12),r=128+((l&4032)>>6),l=128+(l&63),e[0+k-c]=String.fromCharCode(h)+String.fromCharCode(r)+String.fromCharCode(l)}return e.join("")};a.base64Chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");a.encodeBase64=function(d){if(null==d||0==d.length)return d;for(var e=a.base64Chars,c=d.length,k=0,l=[],h,r;k<c;)h=
d.charCodeAt(k++),l[l.length]=e[h>>2],k<c?(r=d.charCodeAt(k++),l[l.length]=e[h<<4&48|r>>4],k<c?(h=d.charCodeAt(k++),l[l.length]=e[r<<2&60|h>>6],l[l.length]=e[h&63]):(l[l.length]=e[r<<2&60],l[l.length]="=")):(l[l.length]=e[h<<4&48],l[l.length]="=",l[l.length]="=");return l.join("")};a.decodeBase64=function(d){if(null==d||0==d.length)return d;var e=a.base64Chars,c=a.xBase64Chars;if(null==a.xBase64Chars){for(var c={},k=0;k<e.length;k++)c[e[k]]=k;a.xBase64Chars=c}for(var e=d.length,k=0,l=[],h,r,x,A,I=
0;k<e&&6E4>I++;)h=c[d.charAt(k++)],r=c[d.charAt(k++)],x=c[d.charAt(k++)],A=c[d.charAt(k++)],l[l.length]=String.fromCharCode(h<<2&255|r>>4),null!=x&&(l[l.length]=String.fromCharCode(r<<4&255|x>>2),null!=A&&(l[l.length]=String.fromCharCode(x<<6&255|A)));return l.join("")};if(null==String.prototype.$replace){java.lang.String=String;if(n._supportsNativeObject)for(var d=0;d<n._extendedObjectMethods.length;d++){var e=n._extendedObjectMethods[d];"to$tring"==e||("toString"==e||"equals"==e||"hashCode"==e)||
(String.prototype[e]=n._O.prototype[e])}da(String,[java.io.Serializable,CharSequence,Comparable]);String.getName=n._innerFunctions.getName;String.serialVersionUID=String.prototype.serialVersionUID=-0x5f0f5bc785c44c00;(function(d){d.$replace=function(a,b){if(a==b||0>this.indexOf(a))return""+this;1==a.length?0<="\\$.*+|?^{}()[]".indexOf(a)&&(a="\\"+a):a=a.replace(/([\\\$\.\*\+\|\?\^\{\}\(\)\[\]])/g,function(a,b){return"\\"+b});return this.replace(RegExp(a,"gm"),b)};d.$generateExpFunction=function(a){var b=
[],d=[],e=0;b[0]="";for(var c=0;c<a.length;c++){var g=a.charAt(c);c!=a.length-1&&"\\"==g?(c++,g=a.charAt(c),"\\"==g&&(b[e]+="\\"),b[e]+=g):c!=a.length-1&&"$"==g?(c++,d[e]=parseInt(a.charAt(c)),e++,b[e]=""):b[e]="\r"==g?b[e]+"\\r":"\n"==g?b[e]+"\\n":"\t"==g?b[e]+"\\t":'"'==g?b[e]+'\\"':b[e]+g}a="f = function (";e=Math.max.apply({},d);for(c=0;c<=e;c++)a+="$"+c,c!=e&&(a+=", ");a+=") { return ";for(c=0;c<b.length-1;c++)a+='"'+b[c]+'" + $'+d[c]+" + ";a+='"'+b[c]+'"; }';eval(a);return null};d.replaceAll=
function(a,b){return this.replace(RegExp(a,"gm"),this.$generateExpFunction(b))};d.replaceFirst=function(a,b){return this.replace(RegExp(a,"m"),this.$generateExpFunction(b))};d.matches=function(a){null!=a&&(a="^("+a+")$");a=this.match(RegExp(a,"gm"));return null!=a&&0!=a.length};d.regionMatches=function(a,b,d,e,c){if("number"==typeof a||!0!=a&&!1!=a)c=e,e=d,d=b,b=a,a=!1;if(0>e||0>b||b>this.length-c||e>d.length-c)return!1;b=this.substring(b,b+c);d=d.substring(e,e+c);a&&(b=b.toLowerCase(),d=d.toLowerCase());
return b==d};d.$plit=function(a,b){if(!b&&" "==a)return this.split(a);if(null!=b&&0<b){if(1==b)return this;var d=RegExp("("+a+")","gm"),e=1,c=this.replace(d,function(a){e++;return e==b?"@@_@@":a}),d=RegExp(a,"gm"),d=this.split(d);d.length>b&&(d[b-1]=c.substring(c.indexOf("@@_@@")+5),d.length=b);return d}d=RegExp(a,"gm");return this.split(d)};d.trim||(d.trim=function(){return this.replace(/^\s+/g,"").replace(/\s+$/g,"")});if(!d.startsWith||!d.endsWith){var e=function(a,b,d){var e=d,c=0,g=b.length;
if(0>d||d>a.length-g)return!1;for(;0<=--g;)if(a.charAt(e++)!=b.charAt(c++))return!1;return!0};d.startsWith=function(a){return 1==arguments.length?e(this,arguments[0],0):2==arguments.length?e(this,arguments[0],arguments[1]):!1};d.endsWith=function(a){return e(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 b=0,d=
this.length,e=0;e<d;e++)a=31*a+this.charCodeAt(b++),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 e=arguments[0].toString().toLowerCase(),c="utf-8 UTF8 us-ascii iso-8859-1 8859_1 gb2312 gb18030 gbk".split(" "),g=!1,f=0;f<c.length;f++)if(c[f]==e){g=!0;break}if(!g)throw new java.io.UnsupportedEncodingException;if("utf-8"==e||"utf8"==e)d=a.convert2UTF8(this)}e=
Array(d.length);for(f=g=c=0;f<d.length;f++)c=d.charCodeAt(f),255<c?(e[g]=26,e[g+1]=c&255,e[g+2]=(c&65280)>>8,g+=2):e[g]=c,g++;return e};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),b=0;b<this.length;b++)a[b]=this.charAt(b);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 b=arguments[1],d=arguments[2],e=Array(d),c=0;c<d;c++)e[c]=a[b+c];return e.join("")}return""+a};d.subSequence=function(a,b){return this.substring(a,b)};d.compareToIgnoreCase=function(a){if(null==a)throw new NullPointerException;var b=this.toUpperCase(),d=a.toUpperCase();if(b==d)return 0;b=this.toLowerCase();d=a.toLowerCase();return b==d?0:b>d?1:-1};d.contentEquals=function(a){if(this.length!=a.length())return!1;a=a.getValue();for(var b=0,d=0,e=this.length;0!=e--;)if(this.charCodeAt(b++)!=a[d++])return!1;
return!0};d.getChars=function(a,b,d,e){if(0>a)throw new StringIndexOutOfBoundsException(a);if(b>this.length)throw new StringIndexOutOfBoundsException(b);if(a>b)throw new StringIndexOutOfBoundsException(b-a);if(null==d)throw new NullPointerException;for(var c=0;c<b-a;c++)d[e+c]=this.charAt(a+c)};d.$concat=d.concat;d.concat=function(a){if(null==a)throw new NullPointerException;return this.$concat(a)};d.$lastIndexOf=d.lastIndexOf;d.lastIndexOf=function(a,b){return null!=b&&0>=b+this.length?-1:null!=
b?this.$lastIndexOf(a,b):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);String.instantialize=function(){switch(arguments.length){case 0:return new String;case 1:var d=arguments[0];if("string"==typeof d||d instanceof String)return new String(d);if(d instanceof
Array||d instanceof Int32Array){if(0==d.length)return"";if("number"!=typeof d[0])return d.join("");for(var e=Array(d.length),c=0;c<d.length;c++)e[c]=String.fromCharCode(d[c]&255);return a.readUTF8(e.join(""))}if("StringBuffer"==d.__CLASS_NAME__||"java.lang.StringBuffer"==d.__CLASS_NAME__){for(var e=d.shareValue(),k=d.length(),d=Array(k),c=0;c<k;c++)d[c]=e[c];return d.join("")}return""+d;case 2:return d=arguments[0],k=arguments[1],"string"==typeof k?String.instantialize(d,0,d.length,k):String.instantialize(d,
k,0,d.length);case 3:var d=arguments[0],l=arguments[1],k=arguments[2];arguments[2]instanceof Array&&(d=arguments[2],l=arguments[0],k=arguments[1]);e=Array(k);if(0>l||k+l>d.length)throw new IndexOutOfBoundsException;if(0<k)if(null!=d[l].length)for(c=0;c<k;c++)e[c]=d[l+c];else for(c=0;c<k;c++)e[c]=String.fromCharCode(d[l+c]);return e.join("");case 4:var d=arguments[0],h=arguments[3];if("string"==typeof h||h instanceof String){l=arguments[1];k=arguments[2];e=Array(k);for(c=0;c<k;c++)e[c]=d[l+c],"number"==
typeof e[c]&&(e[c]=String.fromCharCode(e[c]&255));c=h.toLowerCase();return"utf-8"==c||"utf8"==c?a.readUTF8(e.join("")):e.join("")}c=arguments[3];l=arguments[2];k=arguments[1];e=Array(c);if(0==k)for(;0<c--;)e[c]=String.fromCharCode(d[c+l]&255);else for(k<<=8;0<c--;)e[c]=String.fromCharCode(k|d[c+l]&255);return e.join("");default:e="";for(c=0;c<arguments.length;c++)e+=arguments[c];return e}};-1!=navigator.userAgent.toLowerCase().indexOf("chrome")&&(String.prototype.toString=function(){return this})}})(n._Encoding);
c$=t(function(){this.value=0;s(this,arguments)},java.lang,"Character",null,[java.io.Serializable,Comparable]);u(c$,function(a){this.value=a},"~N");c(c$,"charValue",function(){return this.value});h(c$,"hashCode",function(){return this.value.charCodeAt(0)});h(c$,"equals",function(a){return p(a,Character)?this.value.charCodeAt(0)==a.charValue().charCodeAt(0):!1},"~O");h(c$,"compareTo",function(a){return this.value.charCodeAt(0)-a.value.charCodeAt(0)},"Character");c$.toLowerCase=c(c$,"toLowerCase",function(a){return(""+
a).toLowerCase().charAt(0)},"~N");c$.toUpperCase=c(c$,"toUpperCase",function(a){return(""+a).toUpperCase().charAt(0)},"~N");c$.isDigit=c(c$,"isDigit",function(a){if(48<=a.charCodeAt(0)&&57>=a.charCodeAt(0))return!0;a.charCodeAt(0);return!1},"~N");c$.isUpperCase=c(c$,"isUpperCase",function(a){return 65<=a.charCodeAt(0)&&90>=a.charCodeAt(0)?!0:!1},"~N");c$.isLowerCase=c(c$,"isLowerCase",function(a){return 97<=a.charCodeAt(0)&&122>=a.charCodeAt(0)?!0:!1},"~N");c$.isWhitespace=c(c$,"isWhitespace",function(a){a=
a.charCodeAt(0);if(28<=a&&32>=a||9<=a&&13>=a||5760==a)return!0;if(8192>a||8199==a)return!1;8203>=returni||8232==a||8233==a||12288==a},"~N");c$.isLetter=c(c$,"isLetter",function(a){a=a.charCodeAt(0);return 65<=a&&90>=a||97<=a&&122>=a},"~N");c$.isLetterOrDigit=c(c$,"isLetterOrDigit",function(a){return Character.isLetter(a)||Character.isDigit(a)},"~N");c$.isSpaceChar=c(c$,"isSpaceChar",function(a){a=a.charCodeAt(0);if(32==a||160==a||5760==a)return!0;if(8192>a)return!1;8203>=returni||8232==a||8233==a||
8239==a||12288==a},"~N");c$.digit=c(c$,"digit",function(a,d){var e=a.charCodeAt(0);if(2<=d&&36>=d&&128>e){var c=-1;48<=e&&57>=e?c=e-48:97<=e&&122>=e?c=e-87:65<=e&&90>=e&&(c=e-55);return c<d?c:-1}return-1},"~N,~N");h(c$,"toString",function(){return String.valueOf([this.value])});c$.toString=h(c$,"toString",function(a){return this===Character?"class java.lang.Character":String.valueOf(a)},"~N");C(c$,"MIN_VALUE","\x00","MAX_VALUE","\uffff","MIN_RADIX",2,"MAX_RADIX",36,"TYPE",null);java.lang.Character.TYPE=
java.lang.Character.prototype.TYPE=java.lang.Character;Array.getComponentType=function(){return Object};c$=B(java.lang.reflect,"Array");c$.newInstance=c(c$,"newInstance",function(){return P(length)},"Class,~N");q.Date=Date;Date.TYPE="javautil.Date";Date.__CLASS_NAME__="Date";da(Date,[java.io.Serializable,java.lang.Comparable]);c(q.Date,"clone",function(){return new Date(this.getTime())});c(q.Date,"before",function(a){return this.getTime()<a.getTime()},"javautil.Date");c(q.Date,"after",function(a){return this.getTime()>
a.getTime()},"javautil.Date");c(q.Date,"equals",function(a){return p(a,q.Date)&&this.getTime()==a.getTime()},"Object");c(q.Date,"compareTo",function(a){var d=this.getTime();a=a.getTime();return d<a?-1:d==a?0:1},"javautil.Date");c(q.Date,"compareTo",function(a){return this.compareTo(a)},"Object");h(q.Date,"hashCode",function(){var a=this.getTime();return parseInt(a)^parseInt(a>>32)});c$=t(function(){this.source=null;s(this,arguments)},q,"EventObject",null,java.io.Serializable);u(c$,function(a){if(null!=
a)this.source=a;else throw new IllegalArgumentException;},"~O");c(c$,"getSource",function(){return this.source});h(c$,"toString",function(){return this.getClass().getName()+"[source="+String.valueOf(this.source)+"]"});H(q,"EventListener");c$=t(function(){this.listener=null;s(this,arguments)},q,"EventListenerProxy",null,q.EventListener);u(c$,function(a){this.listener=a},"javautil.EventListener");c(c$,"getListener",function(){return this.listener});H(q,"Iterator");H(q,"ListIterator",q.Iterator);H(q,
"Enumeration");H(q,"Collection",Iterable);H(q,"Set",q.Collection);H(q,"Map");H(q.Map,"Entry");H(q,"List",q.Collection);H(q,"Queue",q.Collection);H(q,"RandomAccess");c$=t(function(){this.stackTrace=this.cause=this.detailMessage=null;s(this,arguments)},java.lang,"Throwable",null,java.io.Serializable);K(c$,function(){this.cause=this});u(c$,function(){this.fillInStackTrace()});u(c$,function(a){this.fillInStackTrace();this.detailMessage=a},"~S");u(c$,function(a,d){this.fillInStackTrace();this.detailMessage=
a;this.cause=d},"~S,Throwable");u(c$,function(a){this.fillInStackTrace();this.detailMessage=null==a?null:a.toString();this.cause=a},"Throwable");c(c$,"getMessage",function(){return this.message||this.detailMessage||this.toString()});c(c$,"getLocalizedMessage",function(){return this.getMessage()});c(c$,"getCause",function(){return this.cause===this?null:this.cause});c(c$,"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");h(c$,"toString",function(){var a=this.getClass().getName(),d=this.message||this.detailMessage;return d?a+": "+d:a});c(c$,"printStackTrace",function(){System.err.println(this.getStackTrace?this.getStackTrace():this.message+" "+ha())});c(c$,"getStackTrace",function(){for(var a=""+this+"\n",d=0;d<this.stackTrace.length;d++){var e=this.stackTrace[d],c=e.methodName.indexOf("(");if("construct"!=e.methodName.substring(0,c).replace(/\s+/g,"")||null==e.nativeClazz||0>
la(e.nativeClazz,Throwable))a+=e+"\n"}return a});c(c$,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintStream");c(c$,"printStackTrace",function(){this.printStackTrace()},"java.io.PrintWriter");c(c$,"fillInStackTrace",function(){this.stackTrace=[];for(var a=arguments.callee.caller,d=null,e=[],c=n._callingStackTraces.length-1,f=!0;-1<c||null!=a;){var j=null;if(!f||a==ta||a==R||null==a){if(0>c)break;f=!0;d=n._callingStackTraces[c].caller;j=n._callingStackTraces[c].owner;c--}else d=
a,null!=d.claxxOwner?j=d.claxxOwner:null!=d.exClazz&&(j=d.exClazz);a=new StackTraceElement(null!=j&&0!=j.__CLASS_NAME__.length?j.__CLASS_NAME__:"anonymous",(null==d.exName?"anonymous":d.exName)+" ("+ma(d.arguments)+")",null,-1);a.nativeClazz=j;this.stackTrace[this.stackTrace.length]=a;for(j=0;j<e.length;j++)e[j]==d&&(a=new StackTraceElement("lost","missing",null,-3),a.nativeClazz=null,this.stackTrace[this.stackTrace.length]=a,f=!1);null!=d&&(e[e.length]=d);a=d.arguments.callee.caller}n._initializingException=
!1;return this});c(c$,"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");c$=t(function(){this.fileName=this.methodName=this.declaringClass=null;this.lineNumber=0;s(this,arguments)},java.lang,"StackTraceElement",null,java.io.Serializable);u(c$,function(a,d,e,c){if(null==a||null==d)throw new NullPointerException;this.declaringClass=a;this.methodName=d;this.fileName=e;this.lineNumber=c},"~S,~S,~S,~N");
h(c$,"equals",function(a){if(!p(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(c$,"getClassName",function(){return null==this.declaringClass?"<unknown class>":this.declaringClass});c(c$,"getFileName",
function(){return this.fileName});c(c$,"getLineNumber",function(){return this.lineNumber});c(c$,"getMethodName",function(){return null==this.methodName?"<unknown method>":this.methodName});h(c$,"hashCode",function(){return null==this.methodName?0:this.methodName.hashCode()^this.declaringClass.hashCode()});c(c$,"isNativeMethod",function(){return-2==this.lineNumber});h(c$,"toString",function(){var a=new StringBuilder(80);a.append(this.getClassName());a.append(".");a.append(this.getMethodName());if(this.isNativeMethod())a.append("(Native Method)");
else{var d=this.getFileName();if(null==d)a.append("(Unknown Source)");else{var e=this.getLineNumber();a.append("(");a.append(d);0<=e&&(a.append(":"),a.append(e));a.append(")")}}return a.toString()});TypeError.prototype.getMessage||(TypeError.prototype.getMessage=function(){return(this.message||this.toString())+(this.getStackTrace?this.getStackTrace():ha())});c$=B(java.lang,"Error",Throwable);c$=B(java.lang,"LinkageError",Error);c$=B(java.lang,"IncompatibleClassChangeError",LinkageError);c$=B(java.lang,
"AbstractMethodError",IncompatibleClassChangeError);c$=B(java.lang,"AssertionError",Error);u(c$,function(a){E(this,AssertionError,[String.valueOf(a),p(a,Throwable)?a:null])},"~O");u(c$,function(a){this.construct(""+a)},"~B");u(c$,function(a){this.construct(""+a)},"~N");c$=B(java.lang,"ClassCircularityError",LinkageError);c$=B(java.lang,"ClassFormatError",LinkageError);c$=t(function(){this.exception=null;s(this,arguments)},java.lang,"ExceptionInInitializerError",LinkageError);u(c$,function(){E(this,
ExceptionInInitializerError);this.initCause(null)});u(c$,function(a){E(this,ExceptionInInitializerError,[a]);this.initCause(null)},"~S");u(c$,function(a){E(this,ExceptionInInitializerError);this.exception=a;this.initCause(a)},"Throwable");c(c$,"getException",function(){return this.exception});h(c$,"getCause",function(){return this.exception});c$=B(java.lang,"IllegalAccessError",IncompatibleClassChangeError);c$=B(java.lang,"InstantiationError",IncompatibleClassChangeError);c$=B(java.lang,"VirtualMachineError",
Error);c$=B(java.lang,"InternalError",VirtualMachineError);c$=B(java.lang,"NoClassDefFoundError",LinkageError);c$=B(java.lang,"NoSuchFieldError",IncompatibleClassChangeError);c$=B(java.lang,"NoSuchMethodError",IncompatibleClassChangeError);c$=B(java.lang,"OutOfMemoryError",VirtualMachineError);c$=B(java.lang,"StackOverflowError",VirtualMachineError);c$=B(java.lang,"UnknownError",VirtualMachineError);c$=B(java.lang,"UnsatisfiedLinkError",LinkageError);c$=B(java.lang,"UnsupportedClassVersionError",
ClassFormatError);c$=B(java.lang,"VerifyError",LinkageError);c$=B(java.lang,"ThreadDeath",Error);u(c$,function(){E(this,ThreadDeath,[])});c$=B(java.lang,"Exception",Throwable);c$=B(java.lang,"RuntimeException",Exception);c$=B(java.lang,"ArithmeticException",RuntimeException);c$=B(java.lang,"IndexOutOfBoundsException",RuntimeException);c$=B(java.lang,"ArrayIndexOutOfBoundsException",IndexOutOfBoundsException);u(c$,function(a){E(this,ArrayIndexOutOfBoundsException,["Array index out of range: "+a])},
"~N");c$=B(java.lang,"ArrayStoreException",RuntimeException);c$=B(java.lang,"ClassCastException",RuntimeException);c$=t(function(){this.ex=null;s(this,arguments)},java.lang,"ClassNotFoundException",Exception);u(c$,function(){E(this,ClassNotFoundException,[U("Throwable")])});u(c$,function(a){E(this,ClassNotFoundException,[a,null])},"~S");u(c$,function(a,d){E(this,ClassNotFoundException,[a]);this.ex=d},"~S,Throwable");c(c$,"getException",function(){return this.ex});h(c$,"getCause",function(){return this.ex});
c$=B(java.lang,"CloneNotSupportedException",Exception);c$=B(java.lang,"IllegalAccessException",Exception);c$=B(java.lang,"IllegalArgumentException",RuntimeException);u(c$,function(a){E(this,IllegalArgumentException,[null==a?null:a.toString(),a])},"Throwable");c$=B(java.lang,"IllegalMonitorStateException",RuntimeException);c$=B(java.lang,"IllegalStateException",RuntimeException);u(c$,function(a){E(this,IllegalStateException,[null==a?null:a.toString(),a])},"Throwable");c$=B(java.lang,"IllegalThreadStateException",
IllegalArgumentException);c$=B(java.lang,"InstantiationException",Exception);c$=B(java.lang,"InterruptedException",Exception);c$=B(java.lang,"NegativeArraySizeException",RuntimeException);c$=B(java.lang,"NoSuchFieldException",Exception);c$=B(java.lang,"NoSuchMethodException",Exception);c$=B(java.lang,"NullPointerException",RuntimeException);c$=B(java.lang,"NumberFormatException",IllegalArgumentException);c$=B(java.lang,"SecurityException",RuntimeException);u(c$,function(a){E(this,SecurityException,
[null==a?null:a.toString(),a])},"Throwable");c$=B(java.lang,"StringIndexOutOfBoundsException",IndexOutOfBoundsException);u(c$,function(a){E(this,StringIndexOutOfBoundsException,["String index out of range: "+a])},"~N");c$=B(java.lang,"UnsupportedOperationException",RuntimeException);u(c$,function(){E(this,UnsupportedOperationException,[])});u(c$,function(a){E(this,UnsupportedOperationException,[null==a?null:a.toString(),a])},"Throwable");c$=t(function(){this.target=null;s(this,arguments)},java.lang.reflect,
"InvocationTargetException",Exception);u(c$,function(){E(this,java.lang.reflect.InvocationTargetException,[U("Throwable")])});u(c$,function(a){E(this,java.lang.reflect.InvocationTargetException,[null,a]);this.target=a},"Throwable");u(c$,function(a,d){E(this,java.lang.reflect.InvocationTargetException,[d,a]);this.target=a},"Throwable,~S");c(c$,"getTargetException",function(){return this.target});h(c$,"getCause",function(){return this.target});c$=t(function(){this.undeclaredThrowable=null;s(this,arguments)},
java.lang.reflect,"UndeclaredThrowableException",RuntimeException);u(c$,function(a){E(this,java.lang.reflect.UndeclaredThrowableException);this.undeclaredThrowable=a;this.initCause(a)},"Throwable");u(c$,function(a,d){E(this,java.lang.reflect.UndeclaredThrowableException,[d]);this.undeclaredThrowable=a;this.initCause(a)},"Throwable,~S");c(c$,"getUndeclaredThrowable",function(){return this.undeclaredThrowable});h(c$,"getCause",function(){return this.undeclaredThrowable});c$=B(java.io,"IOException",
Exception);c$=B(java.io,"CharConversionException",java.io.IOException);c$=B(java.io,"EOFException",java.io.IOException);c$=B(java.io,"FileNotFoundException",java.io.IOException);c$=t(function(){this.bytesTransferred=0;s(this,arguments)},java.io,"InterruptedIOException",java.io.IOException);c$=B(java.io,"ObjectStreamException",java.io.IOException);c$=t(function(){this.classname=null;s(this,arguments)},java.io,"InvalidClassException",java.io.ObjectStreamException);u(c$,function(a,d){E(this,java.io.InvalidClassException,
[d]);this.classname=a},"~S,~S");c(c$,"getMessage",function(){var a=R(this,java.io.InvalidClassException,"getMessage",[]);null!=this.classname&&(a=this.classname+"; "+a);return a});c$=B(java.io,"InvalidObjectException",java.io.ObjectStreamException);c$=B(java.io,"NotActiveException",java.io.ObjectStreamException);c$=B(java.io,"NotSerializableException",java.io.ObjectStreamException);c$=t(function(){this.eof=!1;this.length=0;s(this,arguments)},java.io,"OptionalDataException",java.io.ObjectStreamException);
c$=B(java.io,"StreamCorruptedException",java.io.ObjectStreamException);c$=B(java.io,"SyncFailedException",java.io.IOException);c$=B(java.io,"UnsupportedEncodingException",java.io.IOException);c$=B(java.io,"UTFDataFormatException",java.io.IOException);c$=t(function(){this.detail=null;s(this,arguments)},java.io,"WriteAbortedException",java.io.ObjectStreamException);u(c$,function(a,d){E(this,java.io.WriteAbortedException,[a]);this.detail=d;this.initCause(d)},"~S,Exception");c(c$,"getMessage",function(){var a=
R(this,java.io.WriteAbortedException,"getMessage",[]);return this.detail?a+"; "+this.detail.toString():a});h(c$,"getCause",function(){return this.detail});c$=B(q,"ConcurrentModificationException",RuntimeException);u(c$,function(){E(this,q.ConcurrentModificationException,[])});c$=B(q,"EmptyStackException",RuntimeException);c$=t(function(){this.key=this.className=null;s(this,arguments)},q,"MissingResourceException",RuntimeException);u(c$,function(a,d,e){E(this,q.MissingResourceException,[a]);this.className=
d;this.key=e},"~S,~S,~S");c(c$,"getClassName",function(){return this.className});c(c$,"getKey",function(){return this.key});c$=B(q,"NoSuchElementException",RuntimeException);c$=B(q,"TooManyListenersException",Exception);c$=B(java.lang,"Void");C(c$,"TYPE",null);java.lang.Void.TYPE=java.lang.Void;H(java.lang.reflect,"GenericDeclaration");H(java.lang.reflect,"AnnotatedElement");c$=B(java.lang.reflect,"AccessibleObject",null,java.lang.reflect.AnnotatedElement);u(c$,function(){});c(c$,"isAccessible",function(){return!1});
c$.setAccessible=c(c$,"setAccessible",function(){},"~A,~B");c(c$,"setAccessible",function(){},"~B");h(c$,"isAnnotationPresent",function(){return!1},"Class");h(c$,"getDeclaredAnnotations",function(){return[]});h(c$,"getAnnotations",function(){return[]});h(c$,"getAnnotation",function(){return null},"Class");c$.marshallArguments=c(c$,"marshallArguments",function(){return null},"~A,~A");c(c$,"invokeV",function(){},"~O,~A");c(c$,"invokeL",function(){return null},"~O,~A");c(c$,"invokeI",function(){return 0},
"~O,~A");c(c$,"invokeJ",function(){return 0},"~O,~A");c(c$,"invokeF",function(){return 0},"~O,~A");c(c$,"invokeD",function(){return 0},"~O,~A");c$.emptyArgs=c$.prototype.emptyArgs=[];H(java.lang.reflect,"InvocationHandler");c$=H(java.lang.reflect,"Member");C(c$,"PUBLIC",0,"DECLARED",1);c$=B(java.lang.reflect,"Modifier");u(c$,function(){});c$.isAbstract=c(c$,"isAbstract",function(a){return 0!=(a&1024)},"~N");c$.isFinal=c(c$,"isFinal",function(a){return 0!=(a&16)},"~N");c$.isInterface=c(c$,"isInterface",
function(a){return 0!=(a&512)},"~N");c$.isNative=c(c$,"isNative",function(a){return 0!=(a&256)},"~N");c$.isPrivate=c(c$,"isPrivate",function(a){return 0!=(a&2)},"~N");c$.isProtected=c(c$,"isProtected",function(a){return 0!=(a&4)},"~N");c$.isPublic=c(c$,"isPublic",function(a){return 0!=(a&1)},"~N");c$.isStatic=c(c$,"isStatic",function(a){return 0!=(a&8)},"~N");c$.isStrict=c(c$,"isStrict",function(a){return 0!=(a&2048)},"~N");c$.isSynchronized=c(c$,"isSynchronized",function(a){return 0!=(a&32)},"~N");
c$.isTransient=c(c$,"isTransient",function(a){return 0!=(a&128)},"~N");c$.isVolatile=c(c$,"isVolatile",function(a){return 0!=(a&64)},"~N");c$.toString=c(c$,"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");C(c$,"PUBLIC",1,"PRIVATE",2,"PROTECTED",4,"STATIC",8,"FINAL",16,"SYNCHRONIZED",32,"VOLATILE",64,"TRANSIENT",128,"NATIVE",256,"INTERFACE",512,"ABSTRACT",1024,"STRICT",2048,"BRIDGE",64,"VARARGS",128,"SYNTHETIC",4096,"ANNOTATION",8192,"ENUM",16384);c$=t(function(){this.exceptionTypes=this.parameterTypes=this.clazz=null;this.modifiers=0;s(this,arguments)},java.lang.reflect,"Constructor",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,java.lang.reflect.Member]);u(c$,
function(a,d,e,c){E(this,java.lang.reflect.Constructor,[]);this.clazz=a;this.parameterTypes=d;this.exceptionTypes=e;this.modifiers=c},"Class,~A,~A,~N");h(c$,"getTypeParameters",function(){return null});c(c$,"toGenericString",function(){return null});c(c$,"getGenericParameterTypes",function(){return null});c(c$,"getGenericExceptionTypes",function(){return null});c(c$,"getParameterAnnotations",function(){return null});c(c$,"isVarArgs",function(){return!1});h(c$,"isSynthetic",function(){return!1});h(c$,
"equals",function(a){if(null!=a&&p(a,java.lang.reflect.Constructor)&&this.getDeclaringClass()===a.getDeclaringClass()){var d=this.parameterTypes;a=a.parameterTypes;if(d.length==a.length){for(var e=0;e<d.length;e++)if(d[e]!==a[e])return!1;return!0}}return!1},"~O");h(c$,"getDeclaringClass",function(){return this.clazz});c(c$,"getExceptionTypes",function(){return this.exceptionTypes});h(c$,"getModifiers",function(){return this.modifiers});h(c$,"getName",function(){return this.getDeclaringClass().getName()});
c(c$,"getParameterTypes",function(){return this.parameterTypes});h(c$,"hashCode",function(){return this.getDeclaringClass().getName().hashCode()});c(c$,"newInstance",function(a){var d=new this.clazz(ia);s(d,a);return d},"~A");h(c$,"toString",function(){return null});c$=B(java.lang.reflect,"Field",java.lang.reflect.AccessibleObject,java.lang.reflect.Member);h(c$,"isSynthetic",function(){return!1});c(c$,"toGenericString",function(){return null});c(c$,"isEnumConstant",function(){return!1});c(c$,"getGenericType",
function(){return null});h(c$,"equals",function(){return!1},"~O");h(c$,"getDeclaringClass",function(){return null});h(c$,"getName",function(){return null});c(c$,"getType",function(){return null});h(c$,"hashCode",function(){return 0});h(c$,"toString",function(){return null});c$=t(function(){this.exceptionTypes=this.parameterTypes=this.returnType=this.name=this.clazz=null;this.modifiers=0;s(this,arguments)},java.lang.reflect,"Method",java.lang.reflect.AccessibleObject,[java.lang.reflect.GenericDeclaration,
java.lang.reflect.Member]);u(c$,function(a,d,e,c,f,j){E(this,java.lang.reflect.Method,[]);this.clazz=a;this.name=d;this.parameterTypes=e;this.returnType=c;this.exceptionTypes=f;this.modifiers=j},"Class,~S,~A,Class,~A,~N");h(c$,"getTypeParameters",function(){return null});c(c$,"toGenericString",function(){return null});c(c$,"getGenericParameterTypes",function(){return null});c(c$,"getGenericExceptionTypes",function(){return null});c(c$,"getGenericReturnType",function(){return null});c(c$,"getParameterAnnotations",
function(){return null});c(c$,"isVarArgs",function(){return!1});c(c$,"isBridge",function(){return!1});h(c$,"isSynthetic",function(){return!1});c(c$,"getDefaultValue",function(){return null});h(c$,"equals",function(a){if(null!=a&&p(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 e=0;e<d.length;e++)if(d[e]!==a[e])return!1;return!0}}return!1},"~O");h(c$,"getDeclaringClass",
function(){return this.clazz});c(c$,"getExceptionTypes",function(){return this.exceptionTypes});h(c$,"getModifiers",function(){return this.modifiers});h(c$,"getName",function(){return this.name});c(c$,"getParameterTypes",function(){return this.parameterTypes});c(c$,"getReturnType",function(){return this.returnType});h(c$,"hashCode",function(){return this.getDeclaringClass().getName().hashCode()^this.getName().hashCode()});c(c$,"invoke",function(a,d){var e=this.clazz.prototype[this.getName()];null==
e&&(e=this.clazz[this.getName()]);null!=e&&e.apply(a,d)},"~O,~A");h(c$,"toString",function(){return null})})(Z);(function(){if(!Jmol._debugCode){w(null,"java.lang.AbstractStringBuilder","java.io.InvalidObjectException java.lang.ArrayIndexOutOfBoundsException $.IndexOutOfBoundsException $.NegativeArraySizeException $.NullPointerException $.StringIndexOutOfBoundsException".split(" "),function(){c$=t(function(){this.value=null;this.count=0;this.shared=!1;s(this,arguments)},java.lang,"AbstractStringBuilder");
c(c$,"getValue",function(){return this.value});c(c$,"shareValue",function(){this.shared=!0;return this.value});c(c$,"set",function(a,b){null==a&&(a=P(0,"\x00"));if(a.length<b)throw new java.io.InvalidObjectException("K0199");this.shared=!1;this.value=a;this.count=b},"~A,~N");u(c$,function(){this.value=P(16,"\x00")});u(c$,function(a){if(0>a)throw new NegativeArraySizeException;this.value=P(a,"\x00")},"~N");u(c$,function(a){this.count=a.length;this.shared=!1;this.value=P(this.count+16,"\x00");a.getChars(0,
this.count,this.value,0)},"~S");c(c$,"enlargeBuffer",($fz=function(a){var b=(this.value.length<<1)+2;a=P(a>b?a:b,"\x00");System.arraycopy(this.value,0,a,0,this.count);this.value=a;this.shared=!1},$fz.isPrivate=!0,$fz),"~N");c(c$,"appendNull",function(){var a=this.count+4;a>this.value.length?this.enlargeBuffer(a):this.shared&&(this.value=this.value.clone(),this.shared=!1);this.value[this.count++]="n";this.value[this.count++]="u";this.value[this.count++]="l";this.value[this.count++]="l"});c(c$,"append0",
function(a){var b=this.count+a.length;b>this.value.length?this.enlargeBuffer(b):this.shared&&(this.value=this.value.clone(),this.shared=!1);System.arraycopy(a,0,this.value,this.count,a.length);this.count=b},"~A");c(c$,"append0",function(a,b,d){if(null==a)throw new NullPointerException;if(0<=b&&0<=d&&d<=a.length-b){var e=this.count+d;e>this.value.length?this.enlargeBuffer(e):this.shared&&(this.value=this.value.clone(),this.shared=!1);System.arraycopy(a,b,this.value,this.count,d);this.count=e}else throw new ArrayIndexOutOfBoundsException;
},"~A,~N,~N");c(c$,"append0",function(a){this.count==this.value.length&&this.enlargeBuffer(this.count+1);this.shared&&(this.value=this.value.clone(),this.shared=!1);this.value[this.count++]=a},"~N");c(c$,"append0",function(a){if(null==a)this.appendNull();else{var b=a.length,d=this.count+b;d>this.value.length?this.enlargeBuffer(d):this.shared&&(this.value=this.value.clone(),this.shared=!1);a.getChars(0,b,this.value,this.count);this.count=d}},"~S");c(c$,"append0",function(a,b,d){null==a&&(a="null");
if(0>b||0>d||b>d||d>a.length())throw new IndexOutOfBoundsException;this.append0(a.subSequence(b,d).toString())},"CharSequence,~N,~N");c(c$,"capacity",function(){return this.value.length});c(c$,"charAt",function(a){if(0>a||a>=this.count)throw new StringIndexOutOfBoundsException(a);return this.value[a]},"~N");c(c$,"delete0",function(a,b){if(0<=a){b>this.count&&(b=this.count);if(b==a)return;if(b>a){var d=this.count-b;if(0<d)if(this.shared){var e=P(this.value.length,"\x00");System.arraycopy(this.value,
0,e,0,a);System.arraycopy(this.value,b,e,a,d);this.value=e;this.shared=!1}else System.arraycopy(this.value,b,this.value,a,d);this.count-=b-a;return}}throw new StringIndexOutOfBoundsException;},"~N,~N");c(c$,"deleteCharAt0",function(a){if(0>a||a>=this.count)throw new StringIndexOutOfBoundsException(a);var b=this.count-a-1;if(0<b)if(this.shared){var d=P(this.value.length,"\x00");System.arraycopy(this.value,0,d,0,a);System.arraycopy(this.value,a+1,d,a,b);this.value=d;this.shared=!1}else System.arraycopy(this.value,
a+1,this.value,a,b);this.count--},"~N");c(c$,"ensureCapacity",function(a){a>this.value.length&&this.enlargeBuffer(a)},"~N");c(c$,"getChars",function(a,b,d,e){if(a>this.count||b>this.count||a>b)throw new StringIndexOutOfBoundsException;System.arraycopy(this.value,a,d,e,b-a)},"~N,~N,~A,~N");c(c$,"insert0",function(a,b){if(0>a||a>this.count)throw new StringIndexOutOfBoundsException(a);0!=b.length&&(this.move(b.length,a),System.arraycopy(b,0,this.value,a,b.length),this.count+=b.length)},"~N,~A");c(c$,
"insert0",function(a,b,d,e){if(0<=a&&a<=this.count){if(0<=d&&0<=e&&e<=b.length-d){0!=e&&(this.move(e,a),System.arraycopy(b,d,this.value,a,e),this.count+=e);return}throw new StringIndexOutOfBoundsException("offset "+d+", len "+e+", array.length "+b.length);}throw new StringIndexOutOfBoundsException(a);},"~N,~A,~N,~N");c(c$,"insert0",function(a,b){if(0>a||a>this.count)throw new ArrayIndexOutOfBoundsException(a);this.move(1,a);this.value[a]=b;this.count++},"~N,~N");c(c$,"insert0",function(a,b){if(0<=
a&&a<=this.count){null==b&&(b="null");var d=b.length;0!=d&&(this.move(d,a),b.getChars(0,d,this.value,a),this.count+=d)}else throw new StringIndexOutOfBoundsException(a);},"~N,~S");c(c$,"insert0",function(a,b,d,e){null==b&&(b="null");if(0>a||a>this.count||0>d||0>e||d>e||e>b.length())throw new IndexOutOfBoundsException;this.insert0(a,b.subSequence(d,e).toString())},"~N,CharSequence,~N,~N");c(c$,"length",function(){return this.count});c(c$,"move",($fz=function(a,b){var d;if(this.value.length-this.count>=
a){if(!this.shared){System.arraycopy(this.value,b,this.value,b+a,this.count-b);return}d=this.value.length}else{d=this.count+a;var e=(this.value.length<<1)+2;d=d>e?d:e}d=P(d,"\x00");System.arraycopy(this.value,0,d,0,b);System.arraycopy(this.value,b,d,b+a,this.count-b);this.value=d;this.shared=!1},$fz.isPrivate=!0,$fz),"~N,~N");c(c$,"replace0",function(a,b,d){if(0<=a){b>this.count&&(b=this.count);if(b>a){var e=d.length,c=b-a-e;if(0<c)if(this.shared){var f=P(this.value.length,"\x00");System.arraycopy(this.value,
0,f,0,a);System.arraycopy(this.value,b,f,a+e,this.count-b);this.value=f;this.shared=!1}else System.arraycopy(this.value,b,this.value,a+e,this.count-b);else 0>c?this.move(-c,b):this.shared&&(this.value=this.value.clone(),this.shared=!1);d.getChars(0,e,this.value,a);this.count-=c;return}if(a==b){if(null==d)throw new NullPointerException;this.insert0(a,d);return}}throw new StringIndexOutOfBoundsException;},"~N,~N,~S");c(c$,"reverse0",function(){if(!(2>this.count))if(this.shared){for(var a=P(this.value.length,
"\x00"),b=0,d=this.count;b<this.count;b++)a[--d]=this.value[b];this.value=a;this.shared=!1}else for(var b=0,d=this.count,a=Math.floor(this.count/2);b<a;b++){var e=this.value[--d];this.value[d]=this.value[b];this.value[b]=e}});c(c$,"setCharAt",function(a,b){if(0>a||a>=this.count)throw new StringIndexOutOfBoundsException(a);this.shared&&(this.value=this.value.clone(),this.shared=!1);this.value[a]=b},"~N,~N");c(c$,"setLength",function(a){if(0>a)throw new StringIndexOutOfBoundsException(a);if(this.count<
a)if(a>this.value.length)this.enlargeBuffer(a);else if(this.shared){var b=P(this.value.length,"\x00");System.arraycopy(this.value,0,b,0,this.count);this.value=b;this.shared=!1}else for(b=this.count;b<a;b++)this.value[b]=String.fromCharCode(0);this.count=a},"~N");c(c$,"substring",function(a){if(0<=a&&a<=this.count){if(a==this.count)return"";this.shared=!0;return String.instantialize(a,this.count-a,this.value)}throw new StringIndexOutOfBoundsException(a);},"~N");c(c$,"substring",function(a,b){if(0<=
a&&a<=b&&b<=this.count){if(a==b)return"";this.shared=!0;return String.instantialize(this.value,a,b-a)}throw new StringIndexOutOfBoundsException;},"~N,~N");h(c$,"toString",function(){if(0==this.count)return"";if(256<=this.count&&this.count<=this.value.length>>1)return String.instantialize(this.value,0,this.count);this.shared=!0;return String.instantialize(0,this.count,this.value)});c(c$,"subSequence",function(a,b){return this.substring(a,b)},"~N,~N");c(c$,"indexOf",function(a){return this.indexOf(a,
0)},"~S");c(c$,"indexOf",function(a,b){0>b&&(b=0);var d=a.length;if(0<d){if(d+b>this.count)return-1;for(var e=a.charAt(0);;){for(var c=b,f=!1;c<this.count;c++)if(this.value[c].charCodeAt(0)==e.charCodeAt(0)){f=!0;break}if(!f||d+c>this.count)return-1;for(var f=c,j=0;++j<d&&this.value[++f].charCodeAt(0)==a.charAt(j).charCodeAt(0););if(j==d)return c;b=c+1}}return b<this.count||0==b?b:this.count},"~S,~N");c(c$,"lastIndexOf",function(a){return this.lastIndexOf(a,this.count)},"~S");c(c$,"lastIndexOf",function(a,
b){var d=a.length;if(d<=this.count&&0<=b){if(0<d){b>this.count-d&&(b=this.count-d);for(var e=a.charAt(0);;){for(var c=b,f=!1;0<=c;--c)if(this.value[c].charCodeAt(0)==e.charCodeAt(0)){f=!0;break}if(!f)return-1;for(var f=c,j=0;++j<d&&this.value[++f].charCodeAt(0)==a.charAt(j).charCodeAt(0););if(j==d)return c;b=c-1}}return b<this.count?b:this.count}return-1},"~S,~N");c(c$,"trimToSize",function(){if(this.count<this.value.length){var a=P(this.count,"\x00");System.arraycopy(this.value,0,a,0,this.count);
this.value=a;this.shared=!1}});C(c$,"INITIAL_CAPACITY",16)});w(null,"java.lang.Enum",["java.lang.CloneNotSupportedException","$.IllegalArgumentException","$.NullPointerException","java.security.AccessController","$.PrivilegedExceptionAction"],function(){c$=t(function(){this.$name=null;this.$ordinal=0;s(this,arguments)},java.lang,"Enum",null,[java.io.Serializable,Comparable]);u(c$,function(a,b){this.$name=a;this.$ordinal=b},"~S,~N");c(c$,"name",function(){return this.$name});c(c$,"ordinal",function(){return this.$ordinal});
h(c$,"toString",function(){return this.$name});h(c$,"equals",function(a){return this===a},"~O");h(c$,"hashCode",function(){return this.$ordinal+(null==this.$name?0:this.$name.hashCode())});h(c$,"clone",function(){throw new CloneNotSupportedException("KA004");});h(c$,"compareTo",function(a){return this.$ordinal-a.$ordinal},"~O");c(c$,"getDeclaringClass",function(){var a=this.getClass(),b=a.getSuperclass();return Enum===b?a:b});c$.$valueOf=c(c$,"$valueOf",function(a,b){if(null==a||null==b)throw new NullPointerException("KA001");
var d=Enum.getValues(a);if(null==d)throw new IllegalArgumentException("KA005");for(var e,c=0;c<d.length&&((e=d[c])||1);c++)if(e.$name.equals(b))return e;throw new IllegalArgumentException("KA006");},"Class,~S");c$.getValues=c(c$,"getValues",function(a){try{return java.security.AccessController.doPrivileged((N("Enum$1")?0:java.lang.Enum.$Enum$1$(),M(Enum$1,this,va("enumType",a)))).invoke(a,U("Array"))}catch(b){if(p(b,Exception))return null;throw b;}},"Class");c$.$Enum$1$=function(){G(self.c$);c$=S(null,
"Enum$1",null,java.security.PrivilegedExceptionAction);h(c$,"run",function(){var a=this.f$.enumType.getMethod("values",null);a.setAccessible(!0);return a});c$=F()}});w(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuffer",["java.lang.Character","$.Double","$.Float","$.Long"],function(){c$=B(java.lang,"StringBuffer",AbstractStringBuilder,[Appendable,java.io.Serializable,CharSequence]);u(c$,function(a){if(null==a)throw new NullPointerException;E(this,StringBuffer,[a.toString()])},
"CharSequence");c(c$,"append",function(a){return this.append(a?"true":"false")},"~B");c(c$,"append",function(a){this.append0(a);return this},"~N");c(c$,"append",function(a){return this.append(Double.toString(a))},"~N");c(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());return this},"~O");c(c$,"append",function(a){this.append0(a);return this},"~S");c(c$,"append",function(a){null==a?this.appendNull():this.append0(a.getValue(),0,a.length());return this},"StringBuffer");c(c$,
"append",function(a){this.append0(a);return this},"~A");c(c$,"append",function(a,b,d){this.append0(a,b,d);return this},"~A,~N,~N");c(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());return this},"CharSequence");c(c$,"append",function(a,b,d){this.append0(a,b,d);return this},"CharSequence,~N,~N");c(c$,"appendCodePoint",function(a){return this.append(Character.toChars(a))},"~N");c(c$,"$delete",function(a,b){this.delete0(a,b);return this},"~N,~N");c(c$,"deleteCharAt",function(a){this.deleteCharAt0(a);
return this},"~N");c(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~N");c(c$,"insert",function(a,b){return this.insert(a,b?"true":"false")},"~N,~B");c(c$,"insert",function(a,b){return this.insert(a,Integer.toString(b))},"~N,~N");c(c$,"insert",function(a,b){return this.insert(a,Long.toString(b))},"~N,~N");c(c$,"insert",function(a,b){return this.insert(a,Double.toString(b))},"~N,~N");c(c$,"insert",function(a,b){return this.insert(a,Float.toString(b))},"~N,~N");c(c$,"insert",function(a,
b){return this.insert(a,null==b?"null":b.toString())},"~N,~O");c(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~S");c(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~A");c(c$,"insert",function(a,b,d,e){this.insert0(a,b,d,e);return this},"~N,~A,~N,~N");c(c$,"insert",function(a,b){this.insert0(a,null==b?"null":b.toString());return this},"~N,CharSequence");c(c$,"insert",function(a,b,d,e){this.insert0(a,b,d,e);return this},"~N,CharSequence,~N,~N");c(c$,"replace",function(a,
b,d){this.replace0(a,b,d);return this},"~N,~N,~S");c(c$,"reverse",function(){this.reverse0();return this});h(c$,"subSequence",function(a,b){return R(this,StringBuffer,"substring",[a,b])},"~N,~N")});w(["java.lang.AbstractStringBuilder","$.Appendable"],"java.lang.StringBuilder",["java.lang.Double","$.Float","$.Long"],function(){c$=B(java.lang,"StringBuilder",AbstractStringBuilder,[Appendable,CharSequence,java.io.Serializable]);u(c$,function(a){E(this,StringBuilder,[a.toString()])},"CharSequence");c(c$,
"append",function(a){this.append0(a?"true":"false");return this},"~B");c(c$,"append",function(a){this.append0(a);return this},"~N");c(c$,"append",function(a){this.append0(Integer.toString(a));return this},"~N");c(c$,"append",function(a){this.append0(Long.toString(a));return this},"~N");c(c$,"append",function(a){this.append0(Float.toString(a));return this},"~N");c(c$,"append",function(a){this.append0(Double.toString(a));return this},"~N");c(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());
return this},"~O");c(c$,"append",function(a){this.append0(a);return this},"~S");c(c$,"append",function(a){null==a?this.appendNull():this.append0(a.getValue(),0,a.length());return this},"StringBuffer");c(c$,"append",function(a){this.append0(a);return this},"~A");c(c$,"append",function(a,b,d){this.append0(a,b,d);return this},"~A,~N,~N");c(c$,"append",function(a){null==a?this.appendNull():this.append0(a.toString());return this},"CharSequence");c(c$,"append",function(a,b,d){this.append0(a,b,d);return this},
"CharSequence,~N,~N");c(c$,"$delete",function(a,b){this.delete0(a,b);return this},"~N,~N");c(c$,"deleteCharAt",function(a){this.deleteCharAt0(a);return this},"~N");c(c$,"insert",function(a,b){this.insert0(a,b?"true":"false");return this},"~N,~B");c(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~N");c(c$,"insert",function(a,b){this.insert0(a,Integer.toString(b));return this},"~N,~N");c(c$,"insert",function(a,b){this.insert0(a,Long.toString(b));return this},"~N,~N");c(c$,"insert",function(a,
b){this.insert0(a,Float.toString(b));return this},"~N,~N");c(c$,"insert",function(a,b){this.insert0(a,Double.toString(b));return this},"~N,~N");c(c$,"insert",function(a,b){this.insert0(a,null==b?"null":b.toString());return this},"~N,~O");c(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~S");c(c$,"insert",function(a,b){this.insert0(a,b);return this},"~N,~A");c(c$,"insert",function(a,b,d,e){this.insert0(a,b,d,e);return this},"~N,~A,~N,~N");c(c$,"insert",function(a,b){this.insert0(a,null==
b?"null":b.toString());return this},"~N,CharSequence");c(c$,"insert",function(a,b,d,e){this.insert0(a,b,d,e);return this},"~N,CharSequence,~N,~N");c(c$,"replace",function(a,b,d){this.replace0(a,b,d);return this},"~N,~N,~S");c(c$,"reverse",function(){this.reverse0();return this})});w(null,"java.lang.Thread",["java.lang.IllegalArgumentException","$.ThreadGroup","java.util.Date"],function(){c$=t(function(){this.name=this.group=this.target=null;this.priority=0;s(this,arguments)},java.lang,"Thread",null,
Runnable);c$.currentThread=c(c$,"currentThread",function(){null==Thread.J2S_THREAD&&(Thread.J2S_THREAD=new Thread,Thread.prototype.J2S_THREAD=Thread.J2S_THREAD);return Thread.J2S_THREAD});c$.sleep=c(c$,"sleep",function(){ua("Thread.sleep is not implemented in Java2Script!")},"~N");u(c$,function(){});u(c$,function(a){this.init(null,a,"Thread-"+(new java.util.Date).getTime()+Math.random(),0)},"Runnable");u(c$,function(a,b){this.init(a,b,"Thread-"+(new java.util.Date).getTime()+Math.random(),0)},"ThreadGroup,Runnable");
u(c$,function(a){this.init(null,null,a,0)},"~S");u(c$,function(a,b){this.init(a,null,b,0)},"ThreadGroup,~S");u(c$,function(a,b){this.init(null,a,b,0)},"Runnable,~S");u(c$,function(a,b,d){this.init(a,b,d,0)},"ThreadGroup,Runnable,~S");u(c$,function(a,b,d,e){this.init(a,b,d,e)},"ThreadGroup,Runnable,~S,~N");c(c$,"init",($fz=function(a,b,d){null==a&&(a=new ThreadGroup);this.group=a;this.target=b;this.name=d;this.priority=5},$fz.isPrivate=!0,$fz),"ThreadGroup,Runnable,~S,~N");c(c$,"start",function(){window.setTimeout(function(a){return function(){a.run()}}(this),
0)});c(c$,"run",function(){null!=this.target&&this.target.run()});c(c$,"setPriority",function(a){if(10<a||1>a)throw new IllegalArgumentException;this.priority=a},"~N");c(c$,"getPriority",function(){return this.priority});c(c$,"interrupt",function(){});c(c$,"setName",function(a){this.name=a},"~S");c(c$,"getName",function(){return String.valueOf(this.name)});c(c$,"getThreadGroup",function(){return this.group});h(c$,"toString",function(){var a=this.getThreadGroup();return null!=a?"Thread["+this.getName()+
","+this.getPriority()+","+a.getName()+"]":"Thread["+this.getName()+","+this.getPriority()+",]"});C(c$,"MIN_PRIORITY",1,"NORM_PRIORITY",5,"MAX_PRIORITY",10,"J2S_THREAD",null)});w(null,"java.lang.ThreadGroup",["java.lang.NullPointerException","$.Thread"],function(){c$=t(function(){this.name=this.parent=null;this.maxPriority=0;s(this,arguments)},java.lang,"ThreadGroup");u(c$,function(){this.name="system";this.maxPriority=10});u(c$,function(a){this.construct(Thread.currentThread().getThreadGroup(),a)},
"~S");u(c$,function(a,b){if(null==a)throw new NullPointerException;this.name=b;this.parent=a;this.maxPriority=10},"ThreadGroup,~S");c(c$,"getName",function(){return this.name});c(c$,"getParent",function(){return this.parent});c(c$,"getMaxPriority",function(){return this.maxPriority})});w(["java.io.FilterInputStream"],"java.io.BufferedInputStream",["java.io.IOException","java.lang.IndexOutOfBoundsException"],function(){c$=t(function(){this.buf=null;this.pos=this.count=0;this.markpos=-1;this.marklimit=
0;s(this,arguments)},java.io,"BufferedInputStream",java.io.FilterInputStream);c(c$,"getInIfOpen",function(){var a=this.$in;if(null==a)throw new java.io.IOException("Stream closed");return a});c(c$,"getBufIfOpen",function(){var a=this.buf;if(null==a)throw new java.io.IOException("Stream closed");return a});h(c$,"resetStream",function(){});u(c$,function(a){E(this,java.io.BufferedInputStream,[a]);this.buf=O(8192,0)},"java.io.InputStream");c(c$,"fill",function(){var a=this.getBufIfOpen();if(0>this.markpos)this.pos=
0;else if(this.pos>=a.length)if(0<this.markpos){var b=this.pos-this.markpos;System.arraycopy(a,this.markpos,a,0,b);this.pos=b;this.markpos=0}else a.length>=this.marklimit?(this.markpos=-1,this.pos=0):(b=2*this.pos,b>this.marklimit&&(b=this.marklimit),b=O(b,0),System.arraycopy(a,0,b,0,this.pos),a=this.buf=b);this.count=this.pos;a=this.getInIfOpen().read(a,this.pos,a.length-this.pos);0<a&&(this.count=a+this.pos)});h(c$,"readByteAsInt",function(){return this.pos>=this.count&&(this.fill(),this.pos>=this.count)?
-1:this.getBufIfOpen()[this.pos++]&255});c(c$,"read1",function(a,b,d){var e=this.count-this.pos;if(0>=e){if(d>=this.getBufIfOpen().length&&0>this.markpos)return this.getInIfOpen().read(a,b,d);this.fill();e=this.count-this.pos;if(0>=e)return-1}d=e<d?e:d;System.arraycopy(this.getBufIfOpen(),this.pos,a,b,d);this.pos+=d;return d},"~A,~N,~N");h(c$,"read",function(a,b,d){this.getBufIfOpen();if(0>(b|d|b+d|a.length-(b+d)))throw new IndexOutOfBoundsException;if(0==d)return 0;for(var e=0;;){var c=this.read1(a,
b+e,d-e);if(0>=c)return 0==e?c:e;e+=c;if(e>=d)return e;c=this.$in;if(null!=c&&0>=c.available())return e}},"~A,~N,~N");h(c$,"skip",function(a){this.getBufIfOpen();if(0>=a)return 0;var b=this.count-this.pos;if(0>=b){if(0>this.markpos)return this.getInIfOpen().skip(a);this.fill();b=this.count-this.pos;if(0>=b)return 0}a=b<a?b:a;this.pos+=a;return a},"~N");h(c$,"available",function(){var a=this.count-this.pos,b=this.getInIfOpen().available();return a>2147483647-b?2147483647:a+b});h(c$,"mark",function(a){this.marklimit=
a;this.markpos=this.pos},"~N");h(c$,"reset",function(){this.getBufIfOpen();if(0>this.markpos)throw new java.io.IOException("Resetting to invalid mark");this.pos=this.markpos});h(c$,"markSupported",function(){return!0});h(c$,"close",function(){var a=this.$in;this.$in=null;null!=a&&a.close()});C(c$,"DEFAULT_BUFFER_SIZE",8192)});w(["java.io.Reader"],"java.io.BufferedReader",["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","JU.SB"],function(){c$=t(function(){this.cb=
this.$in=null;this.nextChar=this.nChars=0;this.markedChar=-1;this.readAheadLimit=0;this.markedSkipLF=this.skipLF=!1;s(this,arguments)},java.io,"BufferedReader",java.io.Reader);c(c$,"setSize",function(a){if(0>=a)throw new IllegalArgumentException("Buffer size <= 0");this.cb=$(a,"\x00");this.nextChar=this.nChars=0},"~N");u(c$,function(a){E(this,java.io.BufferedReader,[a]);this.$in=a;this.setSize(8192)},"java.io.Reader");c(c$,"ensureOpen",function(){if(null==this.$in)throw new java.io.IOException("Stream closed");
});c(c$,"fill",function(){var a;if(-1>=this.markedChar)a=0;else{var b=this.nextChar-this.markedChar;b>=this.readAheadLimit?(this.markedChar=-2,a=this.readAheadLimit=0):(this.readAheadLimit<=this.cb.length?System.arraycopy(this.cb,this.markedChar,this.cb,0,b):(a=$(this.readAheadLimit,"\x00"),System.arraycopy(this.cb,this.markedChar,a,0,b),this.cb=a),this.markedChar=0,this.nextChar=this.nChars=a=b)}do b=this.$in.read(this.cb,a,this.cb.length-a);while(0==b);0<b&&(this.nChars=a+b,this.nextChar=a)});c(c$,
"read1",function(a,b,d){if(this.nextChar>=this.nChars){if(d>=this.cb.length&&-1>=this.markedChar&&!this.skipLF)return this.$in.read(a,b,d);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;d=Math.min(d,this.nChars-this.nextChar);System.arraycopy(this.cb,this.nextChar,a,b,d);this.nextChar+=d;return d},"~A,~N,~N");c(c$,"read",function(a,b,d){this.ensureOpen();
if(0>b||b>a.length||0>d||b+d>a.length||0>b+d)throw new IndexOutOfBoundsException;if(0==d)return 0;var e=this.read1(a,b,d);if(0>=e)return e;for(;e<d&&this.$in.ready();){var c=this.read1(a,b+e,d-e);if(0>=c)break;e+=c}return e},"~A,~N,~N");c(c$,"readLine1",function(a){var b=null,d;this.ensureOpen();for(var e=a||this.skipLF;;){this.nextChar>=this.nChars&&this.fill();if(this.nextChar>=this.nChars)return null!=b&&0<b.length()?b.toString():null;var c=!1;a=String.fromCharCode(0);var f;e&&"\n"==this.cb[this.nextChar]&&
this.nextChar++;e=this.skipLF=!1;f=this.nextChar;a:for(;f<this.nChars;f++)if(a=this.cb[f],"\n"==a||"\r"==a){c=!0;break a}d=this.nextChar;this.nextChar=f;if(c)return null==b?b=String.instantialize(this.cb,d,f-d):(b.appendCB(this.cb,d,f-d),b=b.toString()),this.nextChar++,"\r"==a&&(this.skipLF=!0),b;null==b&&(b=JU.SB.newN(80));b.appendCB(this.cb,d,f-d)}},"~B");c(c$,"readLine",function(){return this.readLine1(!1)});h(c$,"skip",function(a){if(0>a)throw new IllegalArgumentException("skip value is negative");
this.ensureOpen();for(var b=a;0<b;){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 d=this.nChars-this.nextChar;if(b<=d){this.nextChar+=b;b=0;break}b-=d;this.nextChar=this.nChars}return a-b},"~N");c(c$,"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()});h(c$,"markSupported",function(){return!0});h(c$,"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");h(c$,"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(c$,"close",function(){null!=this.$in&&(this.$in.close(),this.cb=this.$in=null)});C(c$,"INVALIDATED",-2,"UNMARKED",-1,"DEFAULT_CHAR_BUFFER_SIZE",8192,"DEFAULT_EXPECTED_LINE_LENGTH",80)});w(["java.io.Writer"],"java.io.BufferedWriter",["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","$.StringIndexOutOfBoundsException"],function(){c$=t(function(){this.buf=this.out=null;this.pos=0;this.lineSeparator="\r\n";s(this,arguments)},java.io,"BufferedWriter",java.io.Writer);
u(c$,function(a){E(this,java.io.BufferedWriter,[a]);this.out=a;this.buf=P(8192,"\x00")},"java.io.Writer");u(c$,function(a,b){E(this,java.io.BufferedWriter,[a]);if(0<b)this.out=a,this.buf=P(b,"\x00");else throw new IllegalArgumentException("K0058");},"java.io.Writer,~N");c(c$,"close",function(){this.isOpen()&&(this.flush(),this.out.close(),this.out=this.buf=null)});c(c$,"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(c$,"isOpen",($fz=function(){return null!=this.out},$fz.isPrivate=!0,$fz));c(c$,"newLine",function(){this.write("\r\n",0,2)});c(c$,"write",function(a,b,d){if(!this.isOpen())throw new java.io.IOException("K005d");if(0>b||b>a.length-d||0>d)throw new IndexOutOfBoundsException;if(0==this.pos&&d>=this.buf.length)this.out.write(a,b,d);else{var e=this.buf.length-this.pos;d<e&&(e=d);0<e&&(System.arraycopy(a,b,this.buf,this.pos,e),this.pos+=e);this.pos==this.buf.length&&(this.out.write(this.buf,0,this.buf.length),
this.pos=0,d>e&&(b+=e,e=d-e,e>=this.buf.length?this.out.write(a,b,e):(System.arraycopy(a,b,this.buf,this.pos,e),this.pos+=e)))}},"~A,~N,~N");c(c$,"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(c$,"write",function(a,b,d){if(!this.isOpen())throw new java.io.IOException("K005d");if(!(0>=d)){if(b>a.length-d||0>b)throw new StringIndexOutOfBoundsException;
if(0==this.pos&&d>=this.buf.length){var e=P(d,"\x00");a.getChars(b,b+d,e,0);this.out.write(e,0,d)}else{var c=this.buf.length-this.pos;d<c&&(c=d);0<c&&(a.getChars(b,b+c,this.buf,this.pos),this.pos+=c);this.pos==this.buf.length&&(this.out.write(this.buf,0,this.buf.length),this.pos=0,d>c&&(b+=c,c=d-c,c>=this.buf.length?(e=P(d,"\x00"),a.getChars(b,b+c,e,0),this.out.write(e,0,c)):(a.getChars(b,b+c,this.buf,this.pos),this.pos+=c)))}}},"~S,~N,~N")});w(["java.io.InputStream"],"java.io.ByteArrayInputStream",
["java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=t(function(){this.buf=null;this.count=this.$mark=this.pos=0;s(this,arguments)},java.io,"ByteArrayInputStream",java.io.InputStream);u(c$,function(a){E(this,java.io.ByteArrayInputStream,[]);this.buf=a;this.pos=0;this.count=a.length},"~A");h(c$,"readByteAsInt",function(){return this.pos<this.count?this.buf[this.pos++]&255:-1});h(c$,"read",function(a,b,d){if(null==a)throw new NullPointerException;if(0>b||0>d||d>a.length-b)throw new IndexOutOfBoundsException;
if(this.pos>=this.count)return-1;var e=this.count-this.pos;d>e&&(d=e);if(0>=d)return 0;System.arraycopy(this.buf,this.pos,a,b,d);this.pos+=d;return d},"~A,~N,~N");h(c$,"skip",function(a){var b=this.count-this.pos;a<b&&(b=0>a?0:a);this.pos+=b;return b},"~N");h(c$,"available",function(){return this.count-this.pos});h(c$,"markSupported",function(){return!0});h(c$,"mark",function(){this.$mark=this.pos},"~N");h(c$,"resetStream",function(){});h(c$,"reset",function(){this.pos=this.$mark});h(c$,"close",function(){})});
w(["java.io.OutputStream"],"java.io.ByteArrayOutputStream",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","$.OutOfMemoryError"],function(){c$=t(function(){this.buf=null;this.count=0;s(this,arguments)},java.io,"ByteArrayOutputStream",java.io.OutputStream);u(c$,function(){this.construct(32)});u(c$,function(a){E(this,java.io.ByteArrayOutputStream,[]);if(0>a)throw new IllegalArgumentException("Negative initial size: "+a);this.buf=O(a,0)},"~N");c(c$,"ensureCapacity",function(a){0<
a-this.buf.length&&this.grow(a)},"~N");c(c$,"grow",function(a){var b=this.buf.length<<1;0>b-a&&(b=a);if(0>b){if(0>a)throw new OutOfMemoryError;b=a}this.buf=java.io.ByteArrayOutputStream.arrayCopyByte(this.buf,b)},"~N");c$.arrayCopyByte=c(c$,"arrayCopyByte",function(a,b){var d=O(b,0);System.arraycopy(a,0,d,0,a.length<b?a.length:b);return d},"~A,~N");h(c$,"writeByteAsInt",function(a){this.ensureCapacity(this.count+1);this.buf[this.count]=a;this.count+=1},"~N");c(c$,"write",function(a,b,d){if(0>b||b>
a.length||0>d||0<b+d-a.length)throw new IndexOutOfBoundsException;this.ensureCapacity(this.count+d);System.arraycopy(a,b,this.buf,this.count,d);this.count+=d},"~A,~N,~N");c(c$,"writeTo",function(a){a.write(this.buf,0,this.count)},"java.io.OutputStream");c(c$,"reset",function(){this.count=0});c(c$,"toByteArray",function(){return this.count==this.buf.length?this.buf:java.io.ByteArrayOutputStream.arrayCopyByte(this.buf,this.count)});c(c$,"size",function(){return this.count});h(c$,"toString",function(){return String.instantialize(this.buf,
0,this.count)});h(c$,"close",function(){})});w(["java.io.InputStream"],"java.io.FilterInputStream",null,function(){c$=t(function(){this.$in=null;s(this,arguments)},java.io,"FilterInputStream",java.io.InputStream);u(c$,function(a){E(this,java.io.FilterInputStream,[]);this.$in=a},"java.io.InputStream");c(c$,"readByteAsInt",function(){return this.$in.readByteAsInt()});c(c$,"read",function(a,b,d){return this.$in.read(a,b,d)},"~A,~N,~N");c(c$,"skip",function(a){return this.$in.skip(a)},"~N");c(c$,"available",
function(){return this.$in.available()});c(c$,"close",function(){this.$in.close()});c(c$,"mark",function(a){this.$in.mark(a)},"~N");c(c$,"reset",function(){this.$in.reset()});c(c$,"markSupported",function(){return this.$in.markSupported()})});w(null,"java.io.InputStream",["java.io.IOException","java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=B(java.io,"InputStream");c(c$,"read",function(a,b,d){if(null==a)throw new NullPointerException;if(0>b||0>d||d>a.length-b)throw new IndexOutOfBoundsException;
if(0==d)return 0;var e=this.readByteAsInt();if(-1==e)return-1;a[b]=e;var c=1;try{for(;c<d;c++){e=this.readByteAsInt();if(-1==e)break;a[b+c]=e}}catch(f){if(!y(f,java.io.IOException))throw f;}return c},"~A,~N,~N");c(c$,"skip",function(a){var b=a,d;null==java.io.InputStream.skipBuffer&&(java.io.InputStream.skipBuffer=O(2048,0));var e=java.io.InputStream.skipBuffer;if(0>=a)return 0;for(;0<b;){d=this.read(e,0,Math.min(2048,b));if(0>d)break;b-=d}return a-b},"~N");c(c$,"available",function(){return 0});
c(c$,"close",function(){});c(c$,"mark",function(){},"~N");c(c$,"reset",function(){throw new java.io.IOException("mark/reset not supported");});c(c$,"markSupported",function(){return!1});c(c$,"resetStream",function(){});C(c$,"SKIP_BUFFER_SIZE",2048,"skipBuffer",null)});w(["java.io.Reader"],"java.io.InputStreamReader",["java.lang.NullPointerException"],function(){c$=t(function(){this.$in=null;this.isOpen=!0;this.charsetName=null;this.isUTF8=!1;this.bytearr=null;this.pos=0;s(this,arguments)},java.io,
"InputStreamReader",java.io.Reader);u(c$,function(a,b){E(this,java.io.InputStreamReader,[a]);this.$in=a;this.charsetName=b;if(!(this.isUTF8="UTF-8".equals(b))&&!"ISO-8859-1".equals(b))throw new NullPointerException("charsetName");},"java.io.InputStream,~S");c(c$,"getEncoding",function(){return this.charsetName});h(c$,"read",function(a,b,d){if(null==this.bytearr||this.bytearr.length<d)this.bytearr=O(d,0);var e,c,f=0,j=b,k=this.$in.read(this.bytearr,this.pos,d-this.pos),l=this.$in.available();if(0>
k)return-1;for(var h=k;f<h;){d=this.bytearr[f]&255;if(this.isUTF8)switch(d>>4){case 12:case 13:if(f+1>=k){if(1<=l){h=f;continue}}else if(128==((e=this.bytearr[f+1])&192)){a[j++]=String.fromCharCode((d&31)<<6|e&63);f+=2;continue}this.isUTF8=!1;break;case 14:if(f+2>=k){if(2<=l){h=f;continue}}else if(128==((e=this.bytearr[f+1])&192)&&128==((c=this.bytearr[f+2])&192)){a[j++]=String.fromCharCode((d&15)<<12|(e&63)<<6|c&63);f+=3;continue}this.isUTF8=!1}f++;a[j++]=String.fromCharCode(d)}this.pos=k-f;for(a=
0;a<this.pos;a++)this.bytearr[a]=this.bytearr[f++];return j-b},"~A,~N,~N");h(c$,"ready",function(){return this.isOpen});h(c$,"close",function(){this.$in.close();this.isOpen=!1})});w(["java.io.Closeable","$.Flushable"],"java.io.OutputStream",["java.lang.IndexOutOfBoundsException","$.NullPointerException"],function(){c$=B(java.io,"OutputStream",null,[java.io.Closeable,java.io.Flushable]);c(c$,"write",function(a,b,d){if(null==a)throw new NullPointerException;if(0>b||b>a.length||0>d||b+d>a.length||0>
b+d)throw new IndexOutOfBoundsException;if(0!=d)for(var e=0;e<d;e++)this.writeByteAsInt(a[b+e])},"~A,~N,~N");h(c$,"flush",function(){});h(c$,"close",function(){})});w(["java.io.Closeable"],"java.io.Reader",["java.io.IOException","java.lang.IllegalArgumentException","$.NullPointerException"],function(){c$=t(function(){this.skipBuffer=this.lock=null;s(this,arguments)},java.io,"Reader",null,java.io.Closeable);u(c$,function(a){if(null==a)throw new NullPointerException;this.lock=a},"~O");c(c$,"skip",function(a){if(0>
a)throw new IllegalArgumentException("skip value is negative");var b=Math.min(a,8192);if(null==this.skipBuffer||this.skipBuffer.length<b)this.skipBuffer=$(b,"\x00");for(var d=a;0<d;){var e=this.read(this.skipBuffer,0,Math.min(d,b));if(-1==e)break;d-=e}return a-d},"~N");c(c$,"ready",function(){return!1});c(c$,"markSupported",function(){return!1});c(c$,"mark",function(){throw new java.io.IOException("mark() not supported");},"~N");c(c$,"reset",function(){throw new java.io.IOException("reset() not supported");
});C(c$,"MAX_SKIP_BUFFE_SIZE",8192)});w(["java.io.Reader"],"java.io.StringReader",["java.io.IOException","java.lang.IllegalArgumentException","$.IndexOutOfBoundsException"],function(){c$=t(function(){this.str=null;this.$mark=this.next=this.length=0;s(this,arguments)},java.io,"StringReader",java.io.Reader);u(c$,function(a){E(this,java.io.StringReader,[a]);this.str=a;this.length=a.length},"~S");c(c$,"ensureOpen",function(){if(null==this.str)throw new java.io.IOException("Stream closed");});h(c$,"read",
function(a,b,d){this.ensureOpen();if(0>b||b>a.length||0>d||b+d>a.length||0>b+d)throw new IndexOutOfBoundsException;if(0==d)return 0;if(this.next>=this.length)return-1;d=Math.min(this.length-this.next,d);this.str.getChars(this.next,this.next+d,a,b);this.next+=d;return d},"~A,~N,~N");h(c$,"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");h(c$,"ready",function(){this.ensureOpen();return!0});
h(c$,"markSupported",function(){return!0});h(c$,"mark",function(a){if(0>a)throw new IllegalArgumentException("Read-ahead limit < 0");this.ensureOpen();this.$mark=this.next},"~N");h(c$,"reset",function(){this.ensureOpen();this.next=this.$mark});h(c$,"close",function(){this.str=null})});w(["java.io.Closeable","$.Flushable","java.lang.Appendable"],"java.io.Writer",["java.lang.NullPointerException","$.StringIndexOutOfBoundsException"],function(){c$=t(function(){this.lock=null;s(this,arguments)},java.io,
"Writer",null,[Appendable,java.io.Closeable,java.io.Flushable]);u(c$,function(){this.lock=this});u(c$,function(a){if(null!=a)this.lock=a;else throw new NullPointerException;},"~O");c(c$,"write",function(a){this.write(a,0,a.length)},"~A");c(c$,"write",function(a){var b=P(1,"\x00");b[0]=String.fromCharCode(a);this.write(b)},"~N");c(c$,"write",function(a){var b=P(a.length,"\x00");a.getChars(0,b.length,b,0);this.write(b)},"~S");c(c$,"write",function(a,b,d){if(0<=d){var e=P(d,"\x00");a.getChars(b,b+d,
e,0);this.write(e)}else throw new StringIndexOutOfBoundsException;},"~S,~N,~N");c(c$,"append",function(a){this.write(a.charCodeAt(0));return this},"~N");c(c$,"append",function(a){null==a?this.write("null"):this.write(a.toString());return this},"CharSequence");c(c$,"append",function(a,b,d){null==a?this.write("null".substring(b,d)):this.write(a.subSequence(b,d).toString());return this},"CharSequence,~N,~N");C(c$,"TOKEN_NULL","null")});n("java.net");w(["java.io.IOException"],"java.net.MalformedURLException",
null,function(){c$=B(java.net,"MalformedURLException",java.io.IOException);u(c$,function(){E(this,java.net.MalformedURLException,[])})});n("java.net");w(["java.util.Hashtable"],"java.net.URL",["java.io.IOException","java.lang.Character","$.Error","java.net.MalformedURLException"],function(){c$=t(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;s(this,arguments)},java.net,"URL",null,java.io.Serializable);
u(c$,function(a,b,d){var e,c,f,j=0,k=null,l=!1,h=!1;if(null!=d){var r=System.getSecurityManager();null!=r&&this.checkSpecifyHandler(r)}try{for(c=b.length;0<c&&" ">=b.charAt(c-1);)c--;for(;j<c&&" ">=b.charAt(j);)j++;b.regionMatches(!0,j,"url:",0,4)&&(j+=4);j<b.length&&"#"==b.charAt(j)&&(l=!0);for(e=j;!l&&e<c&&47!=(f=b.charCodeAt(e));e++)if(58==f){var x=b.substring(j,e).toLowerCase();this.isValidProtocol(x)&&(k=x,j=e+1);break}this.protocol=k;if(null!=a&&(null==k||k.equalsIgnoreCase(a.protocol)))null==
d&&(d=a.handler),null!=a.path&&a.path.startsWith("/")&&(k=null),null==k&&(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,h=!0);if(null==this.protocol)throw new java.net.MalformedURLException("no protocol: "+b);if(null==d&&null==(d=java.net.URL.getURLStreamHandler(this.protocol)))throw new java.net.MalformedURLException("unknown protocol: "+this.protocol);this.handler=d;e=b.indexOf("#",j);0<=e&&(this.ref=
b.substring(e+1,c),c=e);h&&j==c&&(this.query=a.query,null==this.ref&&(this.ref=a.ref));d.parseURL(this,b,j,c)}catch(A){if(y(A,java.net.MalformedURLException))throw A;if(y(A,Exception))throw a=A,b=new java.net.MalformedURLException(a.getMessage()),b.initCause(a),b;throw A;}},"java.net.URL,~S,java.net.URLStreamHandler");c(c$,"isValidProtocol",function(a){var b=a.length;if(1>b)return!1;var d=a.charAt(0);if(!Character.isLetter(d))return!1;for(var e=1;e<b;e++)if(d=a.charAt(e),!Character.isLetterOrDigit(d)&&
"."!=d&&"+"!=d&&"-"!=d)return!1;return!0},"~S");c(c$,"checkSpecifyHandler",function(){},"SecurityManager");c(c$,"set5",function(a,b,d,e,c){this.protocol=a;this.host=b;this.authority=-1==d?b:b+":"+d;this.port=d;this.file=e;this.ref=c;this.$hashCode=-1;a=e.lastIndexOf("?");-1!=a?(this.query=e.substring(a+1),this.path=e.substring(0,a)):this.path=e},"~S,~S,~N,~S,~S");c(c$,"set",function(a,b,d,e,c,f,j,k){this.protocol=a;this.host=b;this.port=d;this.file=null==j?f:f+"?"+j;this.userInfo=c;this.path=f;this.ref=
k;this.$hashCode=-1;this.query=j;this.authority=e},"~S,~S,~N,~S,~S,~S,~S,~S");c(c$,"getQuery",function(){return this.query});c(c$,"getPath",function(){return this.path});c(c$,"getUserInfo",function(){return this.userInfo});c(c$,"getAuthority",function(){return this.authority});c(c$,"getPort",function(){return this.port});c(c$,"getDefaultPort",function(){return this.handler.getDefaultPort()});c(c$,"getProtocol",function(){return this.protocol});c(c$,"getHost",function(){return this.host});c(c$,"getFile",
function(){return this.file});c(c$,"getRef",function(){return this.ref});h(c$,"equals",function(a){return!p(a,java.net.URL)?!1:this.handler.equals2(this,a)},"~O");h(c$,"hashCode",function(){return-1!=this.$hashCode?this.$hashCode:this.$hashCode=this.handler.hashCode(this)});c(c$,"sameFile",function(a){return this.handler.sameFile(this,a)},"java.net.URL");h(c$,"toString",function(){return this.toExternalForm()});c(c$,"toExternalForm",function(){return this.handler.toExternalForm(this)});c(c$,"openConnection",
function(){return this.handler.openConnection(this)});c(c$,"openStream",function(){return this.openConnection().getInputStream()});c(c$,"getContent",function(){return this.openConnection().getInputStream()});c$.setURLStreamHandlerFactory=c(c$,"setURLStreamHandlerFactory",function(a){if(null!=java.net.URL.factory)throw Error("factory already defined");var b=System.getSecurityManager();null!=b&&b.checkSetFactory();java.net.URL.handlers.clear();java.net.URL.factory=a},"java.net.URLStreamHandlerFactory");
c$.getURLStreamHandler=c(c$,"getURLStreamHandler",function(a){var b=java.net.URL.handlers.get(a);null==b&&null!=java.net.URL.factory&&(b=java.net.URL.factory.createURLStreamHandler(a));return b},"~S");C(c$,"factory",null);c$.handlers=c$.prototype.handlers=new java.util.Hashtable;c$.streamHandlerLock=c$.prototype.streamHandlerLock=new Z._O});n("java.net");w(null,"java.net.URLConnection",["java.lang.IllegalStateException","$.NullPointerException","java.net.UnknownServiceException","JU.Lst"],function(){c$=
t(function(){this.url=null;this.doInput=!0;this.connected=this.doOutput=!1;this.requests=null;s(this,arguments)},java.net,"URLConnection");c(c$,"setDoInput",function(a){if(this.connected)throw new IllegalStateException("Already connected");this.doInput=a},"~B");c(c$,"getDoInput",function(){return this.doInput});c(c$,"setDoOutput",function(a){if(this.connected)throw new IllegalStateException("Already connected");this.doOutput=a},"~B");c(c$,"getDoOutput",function(){return this.doOutput});u(c$,function(a){this.url=
a},"java.net.URL");c(c$,"getURL",function(){return this.url});c(c$,"getInputStream",function(){throw new java.net.UnknownServiceException("protocol doesn't support input");});c(c$,"getOutputStream",function(){throw new java.net.UnknownServiceException("protocol doesn't support output");});c(c$,"setRequestProperty",function(a,b){if(this.connected)throw new IllegalStateException("Already connected");if(null==a)throw new NullPointerException("key is null");null==this.requests&&(this.requests=new JU.Lst);
for(var d=this.requests.size();0<=--d;)if(this.requests.get(d)[0].equals(a)){this.requests.get(d)[1]=b;return}this.requests.addLast([a,b])},"~S,~S")});n("java.net");c$=B(java.net,"URLEncoder");c$.encode=c(c$,"encode",function(a){return encodeURIComponent(a)},"~S");c$.encode=c(c$,"encode",function(a){return encodeURIComponent(a)},"~S,~S");C(c$,"digits","0123456789ABCDEF");n("java.net");w(null,"java.net.URLStreamHandler",["java.lang.IllegalArgumentException","$.SecurityException","$.UnsupportedOperationException"],
function(){c$=B(java.net,"URLStreamHandler");c(c$,"openConnectionProxy",function(){throw new UnsupportedOperationException("Method not implemented.");},"java.net.URL,java.net.Proxy");c(c$,"parseURL",function(a,b,d,e){var c=a.getProtocol(),f=a.getAuthority(),j=a.getUserInfo(),k=a.getHost(),l=a.getPort(),h=a.getPath(),r=a.getQuery(),x=a.getRef(),A=!1,I=!1;if(d<e){var q=b.indexOf("?"),I=q==d;-1!=q&&q<e&&(r=b.substring(q+1,e),e>q&&(e=q),b=b.substring(0,q))}var n=0;if(!(d<=e-4&&"/"==b.charAt(d)&&"/"==
b.charAt(d+1)&&"/"==b.charAt(d+2)&&"/"==b.charAt(d+3))&&d<=e-2&&"/"==b.charAt(d)&&"/"==b.charAt(d+1)){d+=2;n=b.indexOf("/",d);0>n&&(n=b.indexOf("?",d),0>n&&(n=e));k=f=b.substring(d,n);q=f.indexOf("@");-1!=q?(j=f.substring(0,q),k=f.substring(q+1)):j=null;if(null!=k){if(0<k.length&&"["==k.charAt(0))throw new IllegalArgumentException("Invalid host: "+k);q=k.indexOf(":");l=-1;0<=q&&(k.length>q+1&&(l=Integer.parseInt(k.substring(q+1))),k=k.substring(0,q))}else k="";if(-1>l)throw new IllegalArgumentException("Invalid port number :"+
l);d=n;0<f.length&&(h="")}null==k&&(k="");d<e?"/"==b.charAt(d)?h=b.substring(d,e):null!=h&&0<h.length?(A=!0,q=h.lastIndexOf("/"),I="",-1==q&&null!=f&&(I="/"),h=h.substring(0,q+1)+I+b.substring(d,e)):h=(null!=f?"/":"")+b.substring(d,e):I&&null!=h&&(q=h.lastIndexOf("/"),0>q&&(q=0),h=h.substring(0,q)+"/");null==h&&(h="");if(A){for(;0<=(n=h.indexOf("/./"));)h=h.substring(0,n)+h.substring(n+2);for(n=0;0<=(n=h.indexOf("/../",n));)0<n&&0<=(e=h.lastIndexOf("/",n-1))&&0!=h.indexOf("/../",e)?(h=h.substring(0,
e)+h.substring(n+3),n=0):n+=3;for(;h.endsWith("/..");)if(n=h.indexOf("/.."),0<=(e=h.lastIndexOf("/",n-1)))h=h.substring(0,e+1);else break;h.startsWith("./")&&2<h.length&&(h=h.substring(2));h.endsWith("/.")&&(h=h.substring(0,h.length-1))}this.setURL(a,c,k,l,f,j,h,r,x)},"java.net.URL,~S,~N,~N");c(c$,"getDefaultPort",function(){return-1});c(c$,"equals2",function(a,b){var d=a.getRef(),e=b.getRef();return(d===e||null!=d&&d.equals(e))&&this.sameFile(a,b)},"java.net.URL,java.net.URL");c(c$,"hashCode",function(a){var b=
0,d=a.getProtocol();null!=d&&(b+=d.hashCode());b+=a.toString().hashCode();d=a.getFile();null!=d&&(b+=d.hashCode());b=-1==a.getPort()?b+this.getDefaultPort():b+a.getPort();a=a.getRef();null!=a&&(b+=a.hashCode());return b},"java.net.URL");c(c$,"sameFile",function(a,b){if(!(a.getProtocol()===b.getProtocol()||null!=a.getProtocol()&&a.getProtocol().equalsIgnoreCase(b.getProtocol()))||!(a.getFile()===b.getFile()||null!=a.getFile()&&a.getFile().equals(b.getFile())))return!1;var d,e;d=-1!=a.getPort()?a.getPort():
a.handler.getDefaultPort();e=-1!=b.getPort()?b.getPort():b.handler.getDefaultPort();return d!=e||!this.hostsEqual(a,b)?!1:!0},"java.net.URL,java.net.URL");c(c$,"hostsEqual",function(a,b){return null!=a.getHost()&&null!=b.getHost()?a.getHost().equalsIgnoreCase(b.getHost()):null==a.getHost()&&null==b.getHost()},"java.net.URL,java.net.URL");c(c$,"toExternalForm",function(){return""},"java.net.URL");c(c$,"setURL",function(a,b,d,e,c,f,j,k,l){if(this!==a.handler)throw new SecurityException("handler for url different from this handler");
a.set(a.getProtocol(),d,e,c,f,j,k,l)},"java.net.URL,~S,~S,~N,~S,~S,~S,~S,~S");c(c$,"setURLDeprecated",function(a,b,d,e,c,f){var j=null,k=null;if(null!=d&&0!=d.length){var j=-1==e?d:d+":"+e,l=d.lastIndexOf("@");-1!=l&&(k=d.substring(0,l),d=d.substring(l+1))}var h=null,l=null;null!=c&&(h=c.lastIndexOf("?"),-1!=h?(l=c.substring(h+1),h=c.substring(0,h)):h=c);this.setURL(a,b,d,e,j,k,h,l,f)},"java.net.URL,~S,~S,~N,~S,~S")});n("java.net");H(java.net,"URLStreamHandlerFactory");n("java.text");c$=t(function(){this.pattern=
null;s(this,arguments)},java.text,"MessageFormat");u(c$,function(a){this.pattern=a},"~S");u(c$,function(a){this.pattern=a},"~S,java.util.Locale");c$.format=c(c$,"format",function(a,b){return a.replace(/\{(\d+)\}/g,function(a,e){var c=parseInt(e);return null==b?null:b[c]})},"~S,~A");c(c$,"format",function(a){return java.text.MessageFormat.format(this.pattern,[a])},"~O");w(["java.util.Collection"],"java.util.AbstractCollection",["java.lang.StringBuilder","$.UnsupportedOperationException","java.lang.reflect.Array"],
function(){c$=B(java.util,"AbstractCollection",null,java.util.Collection);u(c$,function(){});h(c$,"add",function(){throw new UnsupportedOperationException;},"~O");h(c$,"addAll",function(a){var b=!1;for(a=a.iterator();a.hasNext();)this.add(a.next())&&(b=!0);return b},"java.util.Collection");h(c$,"clear",function(){for(var a=this.iterator();a.hasNext();)a.next(),a.remove()});h(c$,"contains",function(a){var b=this.iterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next()))return!0}else for(;b.hasNext();)if(null==
b.next())return!0;return!1},"~O");h(c$,"containsAll",function(a){for(a=a.iterator();a.hasNext();)if(!this.contains(a.next()))return!1;return!0},"java.util.Collection");h(c$,"isEmpty",function(){return 0==this.size()});h(c$,"remove",function(a){var b=this.iterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next()))return b.remove(),!0}else for(;b.hasNext();)if(null==b.next())return b.remove(),!0;return!1},"~O");h(c$,"removeAll",function(a){for(var b=!1,d=this.iterator();d.hasNext();)a.contains(d.next())&&
(d.remove(),b=!0);return b},"java.util.Collection");h(c$,"retainAll",function(a){for(var b=!1,d=this.iterator();d.hasNext();)a.contains(d.next())||(d.remove(),b=!0);return b},"java.util.Collection");c(c$,"toArray",function(){for(var a=this.size(),b=0,d=this.iterator(),e=Array(a);b<a;)e[b++]=d.next();return e});c(c$,"toArray",function(a){var b=this.size(),d=0;b>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,b));for(var e,b=this.iterator();b.hasNext()&&((e=b.next())||
1);)a[d++]=e;d<a.length&&(a[d]=null);return a},"~A");h(c$,"toString",function(){if(this.isEmpty())return"[]";var a=new StringBuilder(16*this.size());a.append("[");for(var b=this.iterator();b.hasNext();){var d=b.next();d!==this?a.append(d):a.append("(this Collection)");b.hasNext()&&a.append(", ")}a.append("]");return a.toString()})});w("java.util.AbstractCollection $.Iterator $.List $.ListIterator $.RandomAccess $.NoSuchElementException".split(" "),"java.util.AbstractList",["java.lang.IllegalArgumentException",
"$.IllegalStateException","$.IndexOutOfBoundsException","$.UnsupportedOperationException","java.util.ConcurrentModificationException"],function(){c$=t(function(){this.modCount=0;N("java.util.AbstractList.SimpleListIterator")||java.util.AbstractList.$AbstractList$SimpleListIterator$();N("java.util.AbstractList.FullListIterator")||java.util.AbstractList.$AbstractList$FullListIterator$();s(this,arguments)},java.util,"AbstractList",java.util.AbstractCollection,java.util.List);c(c$,"add",function(){throw new UnsupportedOperationException;
},"~N,~O");c(c$,"add",function(a){this.add(this.size(),a);return!0},"~O");c(c$,"addAll",function(a,b){for(var d=b.iterator();d.hasNext();)this.add(a++,d.next());return!b.isEmpty()},"~N,java.util.Collection");h(c$,"clear",function(){this.removeRange(0,this.size())});h(c$,"equals",function(a){if(this===a)return!0;if(p(a,java.util.List)){if(a.size()!=this.size())return!1;var b=this.iterator();for(a=a.iterator();b.hasNext();){var d=b.next(),e=a.next();if(!(null==d?null==e:d.equals(e)))return!1}return!0}return!1},
"~O");h(c$,"hashCode",function(){for(var a=1,b=this.iterator();b.hasNext();)var d=b.next(),a=31*a+(null==d?0:d.hashCode());return a});h(c$,"indexOf",function(a){var b=this.listIterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next()))return b.previousIndex()}else for(;b.hasNext();)if(null==b.next())return b.previousIndex();return-1},"~O");h(c$,"iterator",function(){return M(java.util.AbstractList.SimpleListIterator,this,null)});h(c$,"lastIndexOf",function(a){var b=this.listIterator(this.size());
if(null!=a)for(;b.hasPrevious();){if(a.equals(b.previous()))return b.nextIndex()}else for(;b.hasPrevious();)if(null==b.previous())return b.nextIndex();return-1},"~O");c(c$,"listIterator",function(){return this.listIterator(0)});c(c$,"listIterator",function(a){return M(java.util.AbstractList.FullListIterator,this,null,a)},"~N");c(c$,"remove",function(){throw new UnsupportedOperationException;},"~N");c(c$,"removeRange",function(a,b){for(var d=this.listIterator(a),e=a;e<b;e++)d.next(),d.remove()},"~N,~N");
h(c$,"set",function(){throw new UnsupportedOperationException;},"~N,~O");h(c$,"subList",function(a,b){if(0<=a&&b<=this.size()){if(a<=b)return p(this,java.util.RandomAccess)?new java.util.AbstractList.SubAbstractListRandomAccess(this,a,b):new java.util.AbstractList.SubAbstractList(this,a,b);throw new IllegalArgumentException;}throw new IndexOutOfBoundsException;},"~N,~N");c$.$AbstractList$SimpleListIterator$=function(){G(self.c$);c$=t(function(){Q(this,arguments);this.pos=-1;this.expectedModCount=
0;this.lastPosition=-1;s(this,arguments)},java.util.AbstractList,"SimpleListIterator",null,java.util.Iterator);u(c$,function(){this.expectedModCount=this.b$["java.util.AbstractList"].modCount});h(c$,"hasNext",function(){return this.pos+1<this.b$["java.util.AbstractList"].size()});h(c$,"next",function(){if(this.expectedModCount==this.b$["java.util.AbstractList"].modCount)try{var a=this.b$["java.util.AbstractList"].get(this.pos+1);this.lastPosition=++this.pos;return a}catch(b){if(p(b,IndexOutOfBoundsException))throw new java.util.NoSuchElementException;
throw b;}throw new java.util.ConcurrentModificationException;});h(c$,"remove",function(){if(this.expectedModCount==this.b$["java.util.AbstractList"].modCount){try{this.b$["java.util.AbstractList"].remove(this.lastPosition)}catch(a){if(p(a,IndexOutOfBoundsException))throw new IllegalStateException;throw a;}this.b$["java.util.AbstractList"].modCount!=this.expectedModCount&&this.expectedModCount++;this.pos==this.lastPosition&&this.pos--;this.lastPosition=-1}else throw new java.util.ConcurrentModificationException;
});c$=F()};c$.$AbstractList$FullListIterator$=function(){G(self.c$);c$=t(function(){Q(this,arguments);s(this,arguments)},java.util.AbstractList,"FullListIterator",java.util.AbstractList.SimpleListIterator,java.util.ListIterator,M(java.util.AbstractList.SimpleListIterator,this,null,ia));u(c$,function(a){E(this,java.util.AbstractList.FullListIterator);if(0<=a&&a<=this.b$["java.util.AbstractList"].size())this.pos=a-1;else throw new IndexOutOfBoundsException;},"~N");h(c$,"add",function(a){if(this.expectedModCount==
this.b$["java.util.AbstractList"].modCount){try{this.b$["java.util.AbstractList"].add(this.pos+1,a)}catch(b){if(p(b,IndexOutOfBoundsException))throw new java.util.NoSuchElementException;throw b;}this.pos++;this.lastPosition=-1;this.b$["java.util.AbstractList"].modCount!=this.expectedModCount&&this.expectedModCount++}else throw new java.util.ConcurrentModificationException;},"~O");h(c$,"hasPrevious",function(){return 0<=this.pos});h(c$,"nextIndex",function(){return this.pos+1});h(c$,"previous",function(){if(this.expectedModCount==
this.b$["java.util.AbstractList"].modCount)try{var a=this.b$["java.util.AbstractList"].get(this.pos);this.lastPosition=this.pos;this.pos--;return a}catch(b){if(p(b,IndexOutOfBoundsException))throw new java.util.NoSuchElementException;throw b;}throw new java.util.ConcurrentModificationException;});h(c$,"previousIndex",function(){return this.pos});h(c$,"set",function(a){if(this.expectedModCount==this.b$["java.util.AbstractList"].modCount)try{this.b$["java.util.AbstractList"].set(this.lastPosition,a)}catch(b){if(p(b,
IndexOutOfBoundsException))throw new IllegalStateException;throw b;}else throw new java.util.ConcurrentModificationException;},"~O");c$=F()};G(self.c$);c$=B(java.util.AbstractList,"SubAbstractListRandomAccess",java.util.AbstractList.SubAbstractList,java.util.RandomAccess);c$=F();G(self.c$);c$=t(function(){this.fullList=null;this.$size=this.offset=0;s(this,arguments)},java.util.AbstractList,"SubAbstractList",java.util.AbstractList);u(c$,function(a,b,d){E(this,java.util.AbstractList.SubAbstractList);
this.fullList=a;this.modCount=this.fullList.modCount;this.offset=b;this.$size=d-b},"java.util.AbstractList,~N,~N");c(c$,"add",function(a,b){if(this.modCount==this.fullList.modCount)if(0<=a&&a<=this.$size)this.fullList.add(a+this.offset,b),this.$size++,this.modCount=this.fullList.modCount;else throw new IndexOutOfBoundsException;else throw new java.util.ConcurrentModificationException;},"~N,~O");c(c$,"addAll",function(a,b){if(this.modCount==this.fullList.modCount){if(0<=a&&a<=this.$size){var d=this.fullList.addAll(a+
this.offset,b);d&&(this.$size+=b.size(),this.modCount=this.fullList.modCount);return d}throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;},"~N,java.util.Collection");c(c$,"addAll",function(a){if(this.modCount==this.fullList.modCount){var b=this.fullList.addAll(this.offset+this.$size,a);b&&(this.$size+=a.size(),this.modCount=this.fullList.modCount);return b}throw new java.util.ConcurrentModificationException;},"java.util.Collection");c(c$,"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");h(c$,"iterator",function(){return this.listIterator(0)});c(c$,"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(c$,"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(c$,"removeRange",function(a,b){if(a!=b)if(this.modCount==this.fullList.modCount)this.fullList.removeRange(a+this.offset,b+this.offset),this.$size-=b-a,this.modCount=
this.fullList.modCount;else throw new java.util.ConcurrentModificationException;},"~N,~N");c(c$,"set",function(a,b){if(this.modCount==this.fullList.modCount){if(0<=a&&a<this.$size)return this.fullList.set(a+this.offset,b);throw new IndexOutOfBoundsException;}throw new java.util.ConcurrentModificationException;},"~N,~O");h(c$,"size",function(){return this.$size});c(c$,"sizeChanged",function(a){a?this.$size++:this.$size--;this.modCount=this.fullList.modCount},"~B");G(self.c$);c$=t(function(){this.iterator=
this.subList=null;this.end=this.start=0;s(this,arguments)},java.util.AbstractList.SubAbstractList,"SubAbstractListIterator",null,java.util.ListIterator);u(c$,function(a,b,d,e){this.iterator=a;this.subList=b;this.start=d;this.end=this.start+e},"java.util.ListIterator,java.util.AbstractList.SubAbstractList,~N,~N");c(c$,"add",function(a){this.iterator.add(a);this.subList.sizeChanged(!0);this.end++},"~O");h(c$,"hasNext",function(){return this.iterator.nextIndex()<this.end});h(c$,"hasPrevious",function(){return this.iterator.previousIndex()>=
this.start});c(c$,"next",function(){if(this.iterator.nextIndex()<this.end)return this.iterator.next();throw new java.util.NoSuchElementException;});c(c$,"nextIndex",function(){return this.iterator.nextIndex()-this.start});c(c$,"previous",function(){if(this.iterator.previousIndex()>=this.start)return this.iterator.previous();throw new java.util.NoSuchElementException;});c(c$,"previousIndex",function(){var a=this.iterator.previousIndex();return a>=this.start?a-this.start:-1});c(c$,"remove",function(){this.iterator.remove();
this.subList.sizeChanged(!1);this.end--});c(c$,"set",function(a){this.iterator.set(a)},"~O");c$=F();c$=F()});w(["java.util.Map"],"java.util.AbstractMap",["java.lang.StringBuilder","$.UnsupportedOperationException","java.util.AbstractCollection","$.AbstractSet","$.Iterator"],function(){c$=t(function(){this.valuesCollection=this.$keySet=null;s(this,arguments)},java.util,"AbstractMap",null,java.util.Map);u(c$,function(){});h(c$,"clear",function(){this.entrySet().clear()});h(c$,"containsKey",function(a){var b=
this.entrySet().iterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next().getKey()))return!0}else for(;b.hasNext();)if(null==b.next().getKey())return!0;return!1},"~O");h(c$,"containsValue",function(a){var b=this.entrySet().iterator();if(null!=a)for(;b.hasNext();){if(a.equals(b.next().getValue()))return!0}else for(;b.hasNext();)if(null==b.next().getValue())return!0;return!1},"~O");h(c$,"equals",function(a){if(this===a)return!0;if(p(a,java.util.Map)){if(this.size()!=a.size())return!1;a=a.entrySet();
for(var b=this.entrySet().iterator();b.hasNext();)if(!a.contains(b.next()))return!1;return!0}return!1},"~O");h(c$,"get",function(a){var b=this.entrySet().iterator();if(null!=a)for(;b.hasNext();){var d=b.next();if(a.equals(d.getKey()))return d.getValue()}else for(;b.hasNext();)if(d=b.next(),null==d.getKey())return d.getValue();return null},"~O");h(c$,"hashCode",function(){for(var a=0,b=this.entrySet().iterator();b.hasNext();)a+=b.next().hashCode();return a});h(c$,"isEmpty",function(){return 0==this.size()});
h(c$,"keySet",function(){null==this.$keySet&&(this.$keySet=(N("java.util.AbstractMap$1")?0:java.util.AbstractMap.$AbstractMap$1$(),M(java.util.AbstractMap$1,this,null)));return this.$keySet});h(c$,"put",function(){throw new UnsupportedOperationException;},"~O,~O");h(c$,"putAll",function(a){var b;for(a=a.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.put(b.getKey(),b.getValue())},"java.util.Map");h(c$,"remove",function(a){var b=this.entrySet().iterator();if(null!=a)for(;b.hasNext();){var d=
b.next();if(a.equals(d.getKey()))return b.remove(),d.getValue()}else for(;b.hasNext();)if(d=b.next(),null==d.getKey())return b.remove(),d.getValue();return null},"~O");h(c$,"size",function(){return this.entrySet().size()});h(c$,"toString",function(){if(this.isEmpty())return"{}";var a=new StringBuilder(28*this.size());a.append("{");for(var b=this.entrySet().iterator();b.hasNext();){var d=b.next(),e=d.getKey();e!==this?a.append(e):a.append("(this Map)");a.append("=");d=d.getValue();d!==this?a.append(d):
a.append("(this Map)");b.hasNext()&&a.append(", ")}a.append("}");return a.toString()});h(c$,"values",function(){null==this.valuesCollection&&(this.valuesCollection=(N("java.util.AbstractMap$2")?0:java.util.AbstractMap.$AbstractMap$2$(),M(java.util.AbstractMap$2,this,null)));return this.valuesCollection});c(c$,"clone",function(){var a=R(this,java.util.AbstractMap,"clone",[]);a.$keySet=null;a.valuesCollection=null;return a});c$.$AbstractMap$1$=function(){G(self.c$);c$=S(java.util,"AbstractMap$1",java.util.AbstractSet);
h(c$,"contains",function(a){return this.b$["java.util.AbstractMap"].containsKey(a)},"~O");h(c$,"size",function(){return this.b$["java.util.AbstractMap"].size()});h(c$,"iterator",function(){return N("java.util.AbstractMap$1$1")?0:java.util.AbstractMap.$AbstractMap$1$1$(),M(java.util.AbstractMap$1$1,this,null)});c$=F()};c$.$AbstractMap$1$1$=function(){G(self.c$);c$=t(function(){Q(this,arguments);this.setIterator=null;s(this,arguments)},java.util,"AbstractMap$1$1",null,java.util.Iterator);K(c$,function(){this.setIterator=
this.b$["java.util.AbstractMap"].entrySet().iterator()});h(c$,"hasNext",function(){return this.setIterator.hasNext()});h(c$,"next",function(){return this.setIterator.next().getKey()});h(c$,"remove",function(){this.setIterator.remove()});c$=F()};c$.$AbstractMap$2$=function(){G(self.c$);c$=S(java.util,"AbstractMap$2",java.util.AbstractCollection);h(c$,"size",function(){return this.b$["java.util.AbstractMap"].size()});h(c$,"contains",function(a){return this.b$["java.util.AbstractMap"].containsValue(a)},
"~O");h(c$,"iterator",function(){return N("java.util.AbstractMap$2$1")?0:java.util.AbstractMap.$AbstractMap$2$1$(),M(java.util.AbstractMap$2$1,this,null)});c$=F()};c$.$AbstractMap$2$1$=function(){G(self.c$);c$=t(function(){Q(this,arguments);this.setIterator=null;s(this,arguments)},java.util,"AbstractMap$2$1",null,java.util.Iterator);K(c$,function(){this.setIterator=this.b$["java.util.AbstractMap"].entrySet().iterator()});h(c$,"hasNext",function(){return this.setIterator.hasNext()});h(c$,"next",function(){return this.setIterator.next().getValue()});
h(c$,"remove",function(){this.setIterator.remove()});c$=F()}});w(["java.util.AbstractCollection","$.Set"],"java.util.AbstractSet",null,function(){c$=B(java.util,"AbstractSet",java.util.AbstractCollection,java.util.Set);h(c$,"equals",function(a){return this===a?!0:p(a,java.util.Set)?this.size()==a.size()&&this.containsAll(a):!1},"~O");h(c$,"hashCode",function(){for(var a=0,b=this.iterator();b.hasNext();)var d=b.next(),a=a+(null==d?0:d.hashCode());return a});h(c$,"removeAll",function(a){var b=!1;if(this.size()<=
a.size())for(var d=this.iterator();d.hasNext();)a.contains(d.next())&&(d.remove(),b=!0);else for(d=a.iterator();d.hasNext();)b=this.remove(d.next())||b;return b},"java.util.Collection")});w(["java.util.AbstractList","$.List","$.RandomAccess"],"java.util.ArrayList",["java.lang.IllegalArgumentException","$.IndexOutOfBoundsException","java.lang.reflect.Array","java.util.Arrays"],function(){c$=t(function(){this.lastIndex=this.firstIndex=0;this.array=null;s(this,arguments)},java.util,"ArrayList",java.util.AbstractList,
[java.util.List,Cloneable,java.io.Serializable,java.util.RandomAccess]);W(c$,function(){this.setup(0)});c(c$,"setup",function(a){E(this,java.util.ArrayList,[]);this.firstIndex=this.lastIndex=0;try{this.array=this.newElementArray(a)}catch(b){if(p(b,NegativeArraySizeException))throw new IllegalArgumentException;throw b;}},"~N");c(c$,"newElementArray",($fz=function(a){return Array(a)},$fz.isPrivate=!0,$fz),"~N");h(c$,"add",function(a,b){if(1==arguments.length)return this.add1(a);var d=this.size();if(0<
a&&a<d){if(0==this.firstIndex&&this.lastIndex==this.array.length)this.growForInsert(a,1);else if(a<Math.floor(d/2)&&0<this.firstIndex||this.lastIndex==this.array.length)System.arraycopy(this.array,this.firstIndex,this.array,--this.firstIndex,a);else{var e=a+this.firstIndex;System.arraycopy(this.array,e,this.array,e+1,d-a);this.lastIndex++}this.array[a+this.firstIndex]=b}else if(0==a)0==this.firstIndex&&this.growAtFront(1),this.array[--this.firstIndex]=b;else if(a==d)this.lastIndex==this.array.length&&
this.growAtEnd(1),this.array[this.lastIndex++]=b;else throw new IndexOutOfBoundsException;this.modCount++},"~N,~O");h(c$,"add1",function(a){this.lastIndex==this.array.length&&this.growAtEnd(1);this.array[this.lastIndex++]=a;this.modCount++;return!0},"~O");h(c$,"addAll",function(a){var b=a.size();if(0<b){this.lastIndex>this.array.length-b&&this.growAtEnd(b);a=a.iterator();for(b=this.lastIndex+b;this.lastIndex<b;)this.array[this.lastIndex++]=a.next();this.modCount++;return!0}return!1},"java.util.Collection");
h(c$,"clear",function(){this.firstIndex!=this.lastIndex&&(this.fill(this.firstIndex,this.lastIndex),this.firstIndex=this.lastIndex=0,this.modCount++)});c(c$,"fill",function(a,b){for(var d=b;--d>=a;)this.array[d]=null},"~N,~N");c(c$,"clone",function(){try{var a=R(this,java.util.ArrayList,"clone",[]);a.array=this.array.clone();return a}catch(b){if(p(b,CloneNotSupportedException))return null;throw b;}});h(c$,"contains",function(a){if(null!=a)for(var b=this.firstIndex;b<this.lastIndex;b++){if(a.equals(this.array[b]))return!0}else for(b=
this.firstIndex;b<this.lastIndex;b++)if(null==this.array[b])return!0;return!1},"~O");c(c$,"ensureCapacity",function(a){this.array.length<a&&(0<this.firstIndex?this.growAtFront(a-this.array.length):this.growAtEnd(a-this.array.length))},"~N");h(c$,"get",function(a){if(0<=a&&a<this.size())return this.array[this.firstIndex+a];throw new IndexOutOfBoundsException;},"~N");c(c$,"growAtEnd",($fz=function(a){var b=this.size();if(this.firstIndex>=a-(this.array.length-this.lastIndex))a=this.lastIndex-this.firstIndex,
0<b&&(System.arraycopy(this.array,this.firstIndex,this.array,0,b),this.fill(a<this.firstIndex?this.firstIndex:a,this.array.length)),this.firstIndex=0,this.lastIndex=a;else{var d=Math.floor(b/2);a>d&&(d=a);12>d&&(d=12);a=this.newElementArray(b+d);0<b&&System.arraycopy(this.array,this.firstIndex,a,this.firstIndex,b);this.array=a}},$fz.isPrivate=!0,$fz),"~N");c(c$,"growAtFront",($fz=function(a){var b=this.size();if(this.array.length-this.lastIndex>=a)a=this.array.length-b,0<b&&(System.arraycopy(this.array,
this.firstIndex,this.array,a,b),this.fill(this.firstIndex,this.firstIndex+b>a?a:this.firstIndex+b)),this.firstIndex=a,this.lastIndex=this.array.length;else{var d=Math.floor(b/2);a>d&&(d=a);12>d&&(d=12);a=this.newElementArray(b+d);0<b&&System.arraycopy(this.array,this.firstIndex,a,a.length-b,b);this.firstIndex=a.length-b;this.lastIndex=a.length;this.array=a}},$fz.isPrivate=!0,$fz),"~N");c(c$,"growForInsert",($fz=function(a,b){var d=this.size(),e=Math.floor(d/2);b>e&&(e=b);12>e&&(e=12);var c=this.newElementArray(d+
e);if(a<Math.floor(d/2)){var f=c.length-(d+b);System.arraycopy(this.array,a,c,a+e,d-a);System.arraycopy(this.array,this.firstIndex,c,f,a);this.firstIndex=f;this.lastIndex=c.length}else System.arraycopy(this.array,this.firstIndex,c,0,a),System.arraycopy(this.array,a,c,a+b,d-a),this.firstIndex=0,this.lastIndex+=b;this.array=c},$fz.isPrivate=!0,$fz),"~N,~N");h(c$,"indexOf",function(a){if(null!=a)for(var b=this.firstIndex;b<this.lastIndex;b++){if(a.equals(this.array[b]))return b-this.firstIndex}else for(b=
this.firstIndex;b<this.lastIndex;b++)if(null==this.array[b])return b-this.firstIndex;return-1},"~O");h(c$,"isEmpty",function(){return this.lastIndex==this.firstIndex});h(c$,"lastIndexOf",function(a){if(null!=a)for(var b=this.lastIndex-1;b>=this.firstIndex;b--){if(a.equals(this.array[b]))return b-this.firstIndex}else for(b=this.lastIndex-1;b>=this.firstIndex;b--)if(null==this.array[b])return b-this.firstIndex;return-1},"~O");h(c$,"remove",function(a){var b,d=this.size();if(0<=a&&a<d)if(a==d-1)b=this.array[--this.lastIndex],
this.array[this.lastIndex]=null;else if(0==a)b=this.array[this.firstIndex],this.array[this.firstIndex++]=null;else{var e=this.firstIndex+a;b=this.array[e];a<Math.floor(d/2)?(System.arraycopy(this.array,this.firstIndex,this.array,this.firstIndex+1,a),this.array[this.firstIndex++]=null):(System.arraycopy(this.array,e+1,this.array,e,d-a-1),this.array[--this.lastIndex]=null)}else throw new IndexOutOfBoundsException;this.modCount++;return b},"~N");c(c$,"removeObject",function(a){a=this.indexOf(a);return 0>
a?null:this.remove(a)},"~O");h(c$,"removeRange",function(a,b){if(0<=a&&a<=b&&b<=this.size()){if(a!=b){var d=this.size();b==d?(this.fill(this.firstIndex+a,this.lastIndex),this.lastIndex=this.firstIndex+a):0==a?(this.fill(this.firstIndex,this.firstIndex+b),this.firstIndex+=b):(System.arraycopy(this.array,this.firstIndex+b,this.array,this.firstIndex+a,d-b),d=this.lastIndex+a-b,this.fill(d,this.lastIndex),this.lastIndex=d);this.modCount++}}else throw new IndexOutOfBoundsException;},"~N,~N");h(c$,"set",
function(a,b){if(0<=a&&a<this.size()){var d=this.array[this.firstIndex+a];this.array[this.firstIndex+a]=b;return d}throw new IndexOutOfBoundsException;},"~N,~O");h(c$,"size",function(){return this.lastIndex-this.firstIndex});h(c$,"toArray",function(a){var b=this.size();if(!a||b>a.length)a=Array(b);System.arraycopy(this.array,this.firstIndex,a,0,b);b<a.length&&(a[b]=null);return a},"~O");c(c$,"trimToSize",function(){var a=this.size(),b=this.newElementArray(a);System.arraycopy(this.array,this.firstIndex,
b,0,a);this.array=b;this.firstIndex=0;this.lastIndex=this.array.length})});w(["java.util.AbstractList","$.RandomAccess"],"java.util.Arrays",["java.lang.ArrayIndexOutOfBoundsException","$.IllegalArgumentException","$.NullPointerException"],function(){c$=B(java.util,"Arrays");c$.sort=h(c$,"sort",function(a,b,d,e){switch(arguments.length){case 1:for(var c=a.sort(function(a,b){return"string"==typeof a||a instanceof Comparable?a.compareTo(b):a-b}),f=0;f<a.length;f++)a[f]=c[f];break;case 2:c=a.sort(function(a,
d){return null!=b?b.compare(a,d):"string"==typeof a||a instanceof Comparable?a.compareTo(d):a-d});for(f=0;f<a.length;f++)a[f]=c[f];break;case 3:var j=b,k=d;this.rangeCheck(a.length,j,k);c=[];for(f=j;f<k;f++)c[f-j]=a[f];c=c.sort(function(a,b){return"string"==typeof a||a instanceof Comparable?a.compareTo(b):a-b});for(f=j;f<k;f++)a[f]=c[f-j];break;case 4:j=b;k=d;b=e;this.rangeCheck(a.length,j,k);c=[];for(f=j;f<k;f++)c[f-j]=a[f];c=c.sort(function(a,d){return null!=b?b.compare(a,d):"string"==typeof a||
a instanceof Comparable?a.compareTo(d):a-d});for(f=j;f<k;f++)a[f]=c[f-j]}});c$.rangeCheck=c(c$,"rangeCheck",($fz=function(a,b,d){if(b>d)throw new IllegalArgumentException("fromIndex("+b+") > toIndex("+d+")");if(0>b)throw new ArrayIndexOutOfBoundsException(b);if(d>a)throw new ArrayIndexOutOfBoundsException(d);},$fz.isPrivate=!0,$fz),"~N,~N,~N");c$.binarySearch=c(c$,"binarySearch",function(a,b){for(var d=0,e=a.length-1;d<=e;){var c=d+e>>1,f=a[c];if(f<b)d=c+1;else if(f>b)e=c-1;else return c}return-(d+
1)},"~A,~N");c$.binarySearch=c(c$,"binarySearch",function(a,b){for(var d=0,e=a.length-1;d<=e;){var c=d+e>>1,f=a[c].compareTo(b);if(0>f)d=c+1;else if(0<f)e=c-1;else return c}return-(d+1)},"~A,~O");c$.binarySearch=c(c$,"binarySearch",function(a,b,d){if(null==d)return java.util.Arrays.binarySearch(a,b);for(var e=0,c=a.length-1;e<=c;){var f=e+c>>1,j=d.compare(a[f],b);if(0>j)e=f+1;else if(0<j)c=f-1;else return f}return-(e+1)},"~A,~O,java.util.Comparator");c$.equals=c(c$,"equals",function(a,b){if(a===b)return!0;
if(null==a||null==b)return!1;var d=a.length;if(b.length!=d)return!1;for(var e=0;e<d;e++){var c=a[e],f=b[e];if(!(null==c?null==f:null==c.equals?c==f:c.equals(f)))return!1}return!0},"~A,~A");c$.fill=h(c$,"fill",function(a,b,d,e){2==arguments.length&&(e=b,b=0,d=a.length);java.util.Arrays.rangeCheck(a.length,b,d);for(var c=b;c<d;c++)a[c]=e});c$.asList=c(c$,"asList",function(a){return new java.util.Arrays.ArrayList(a)},"~A");G(self.c$);c$=t(function(){this.a=null;s(this,arguments)},java.util.Arrays,"ArrayList",
java.util.AbstractList,[java.util.RandomAccess,java.io.Serializable]);u(c$,function(a){E(this,java.util.Arrays.ArrayList,[]);if(null==a)throw new NullPointerException;this.a=a},"~A");h(c$,"size",function(){return this.a.length});c(c$,"toArray",function(){return this.a.clone()});h(c$,"get",function(a){return this.a[a]},"~N");h(c$,"set",function(a,b){var d=this.a[a];this.a[a]=b;return d},"~N,~O");h(c$,"indexOf",function(a){if(null==a)for(var b=0;b<this.a.length;b++){if(null==this.a[b])return b}else for(b=
0;b<this.a.length;b++)if(a.equals(this.a[b]))return b;return-1},"~O");h(c$,"contains",function(a){return-1!=this.indexOf(a)},"~O");c$=F();C(c$,"INSERTIONSORT_THRESHOLD",7)});w("java.util.AbstractList $.AbstractMap $.AbstractSet $.Collection $.Iterator $.List $.ListIterator $.Map $.RandomAccess $.Set $.SortedMap $.SortedSet java.lang.NullPointerException $.UnsupportedOperationException java.lang.reflect.Array".split(" "),"java.util.Collections","java.lang.ArrayIndexOutOfBoundsException $.ClassCastException $.IllegalArgumentException $.IndexOutOfBoundsException java.util.ArrayList $.Arrays $.Enumeration java.util.Map.Entry java.util.NoSuchElementException $.Random".split(" "),
function(){c$=B(java.util,"Collections");c$.binarySearch=c(c$,"binarySearch",function(a,b){if(null==a)throw new NullPointerException;if(a.isEmpty())return-1;if(!p(a,java.util.RandomAccess)){for(var d=a.listIterator();d.hasNext();){var e;if(0>=(e=b.compareTo(d.next())))return 0==e?d.previousIndex():-d.previousIndex()-1}return-a.size()-1}var d=0,c=a.size(),f=c-1;for(e=-1;d<=f;)if(c=d+f>>1,0<(e=b.compareTo(a.get(c))))d=c+1;else{if(0==e)return c;f=c-1}return-c-(0>e?1:2)},"java.util.List,~O");c$.binarySearch=
c(c$,"binarySearch",function(a,b,d){if(null==d)return java.util.Collections.binarySearch(a,b);if(!p(a,java.util.RandomAccess)){for(var e=a.listIterator();e.hasNext();){var c;if(0>=(c=d.compare(b,e.next())))return 0==c?e.previousIndex():-e.previousIndex()-1}return-a.size()-1}var e=0,f=a.size(),j=f-1;for(c=-1;e<=j;)if(f=e+j>>1,0<(c=d.compare(b,a.get(f))))e=f+1;else{if(0==c)return f;j=f-1}return-f-(0>c?1:2)},"java.util.List,~O,java.util.Comparator");c$.copy=c(c$,"copy",function(a,b){if(a.size()<b.size())throw new ArrayIndexOutOfBoundsException;
for(var d=b.iterator(),e=a.listIterator();d.hasNext();){try{e.next()}catch(c){if(p(c,java.util.NoSuchElementException))throw new ArrayIndexOutOfBoundsException;throw c;}e.set(d.next())}},"java.util.List,java.util.List");c$.enumeration=c(c$,"enumeration",function(a){N("java.util.Collections$1")||java.util.Collections.$Collections$1$(a);return M(java.util.Collections$1,this,null)},"java.util.Collection");c$.fill=c(c$,"fill",function(a,b){for(var d=a.listIterator();d.hasNext();)d.next(),d.set(b)},"java.util.List,~O");
c$.max=c(c$,"max",function(a){a=a.iterator();for(var b=a.next();a.hasNext();){var d=a.next();0>b.compareTo(d)&&(b=d)}return b},"java.util.Collection");c$.max=c(c$,"max",function(a,b){for(var d=a.iterator(),e=d.next();d.hasNext();){var c=d.next();0>b.compare(e,c)&&(e=c)}return e},"java.util.Collection,java.util.Comparator");c$.min=c(c$,"min",function(a){a=a.iterator();for(var b=a.next();a.hasNext();){var d=a.next();0<b.compareTo(d)&&(b=d)}return b},"java.util.Collection");c$.min=c(c$,"min",function(a,
b){for(var d=a.iterator(),e=d.next();d.hasNext();){var c=d.next();0<b.compare(e,c)&&(e=c)}return e},"java.util.Collection,java.util.Comparator");c$.nCopies=c(c$,"nCopies",function(a,b){return new java.util.Collections.CopiesList(a,b)},"~N,~O");c$.reverse=c(c$,"reverse",function(a){var b=a.size(),d=a.listIterator();a=a.listIterator(b);for(var e=0;e<Math.floor(b/2);e++){var c=d.next(),f=a.previous();d.set(f);a.set(c)}},"java.util.List");c$.reverseOrder=c(c$,"reverseOrder",function(){return new java.util.Collections.ReverseComparator});
c$.reverseOrder=c(c$,"reverseOrder",function(a){return null==a?java.util.Collections.reverseOrder():new java.util.Collections.ReverseComparatorWithComparator(a)},"java.util.Comparator");c$.shuffle=c(c$,"shuffle",function(a){java.util.Collections.shuffle(a,new java.util.Random)},"java.util.List");c$.shuffle=c(c$,"shuffle",function(a,b){if(p(a,java.util.RandomAccess))for(e=a.size()-1;0<e;e--)c=b.nextInt()%(e+1),0>c&&(c=-c),a.set(c,a.set(e,a.get(c)));else{for(var d=a.toArray(),e=d.length-1;0<e;e--){var c=
b.nextInt()%(e+1);0>c&&(c=-c);var f=d[e];d[e]=d[c];d[c]=f}e=0;for(c=a.listIterator();c.hasNext();)c.next(),c.set(d[e++])}},"java.util.List,java.util.Random");c$.singleton=c(c$,"singleton",function(a){return new java.util.Collections.SingletonSet(a)},"~O");c$.singletonList=c(c$,"singletonList",function(a){return new java.util.Collections.SingletonList(a)},"~O");c$.singletonMap=c(c$,"singletonMap",function(a,b){return new java.util.Collections.SingletonMap(a,b)},"~O,~O");c$.sort=c(c$,"sort",function(a){var b=
a.toArray();java.util.Arrays.sort(b);var d=0;for(a=a.listIterator();a.hasNext();)a.next(),a.set(b[d++])},"java.util.List");c$.sort=c(c$,"sort",function(a,b){var d=a.toArray(Array(a.size()));java.util.Arrays.sort(d,b);for(var e=0,c=a.listIterator();c.hasNext();)c.next(),c.set(d[e++])},"java.util.List,java.util.Comparator");c$.swap=c(c$,"swap",function(a,b,d){if(null==a)throw new NullPointerException;b!=d&&a.set(d,a.set(b,a.get(d)))},"java.util.List,~N,~N");c$.replaceAll=c(c$,"replaceAll",function(a,
b,d){for(var e,c=!1;-1<(e=a.indexOf(b));)c=!0,a.set(e,d);return c},"java.util.List,~O,~O");c$.rotate=c(c$,"rotate",function(a,b){var d=a.size();if(0!=d){var e;e=0<b?b%d:d- -1*(b%d);if(!(0==e||e==d))if(p(a,java.util.RandomAccess))for(var c=a.get(0),f=0,j=0,k=0;k<d;k++)f=(f+e)%d,c=a.set(f,c),f==j&&(f=++j,c=a.get(j));else c=(d-e)%d,e=a.subList(0,c),d=a.subList(c,d),java.util.Collections.reverse(e),java.util.Collections.reverse(d),java.util.Collections.reverse(a)}},"java.util.List,~N");c$.indexOfSubList=
c(c$,"indexOfSubList",function(a,b){var d=a.size(),e=b.size();if(e>d)return-1;if(0==e)return 0;var c=b.get(0),f=a.indexOf(c);if(-1==f)return-1;for(;f<d&&d-f>=e;){var j=a.listIterator(f);if(null==c?null==j.next():c.equals(j.next())){for(var k=b.listIterator(1),l=!1;k.hasNext();){var h=k.next();if(!j.hasNext())return-1;if(null==h?null!=j.next():!h.equals(j.next())){l=!0;break}}if(!l)return f}f++}return-1},"java.util.List,java.util.List");c$.lastIndexOfSubList=c(c$,"lastIndexOfSubList",function(a,b){var d=
b.size(),e=a.size();if(d>e)return-1;if(0==d)return e;for(var e=b.get(d-1),c=a.lastIndexOf(e);-1<c&&c+1>=d;){var f=a.listIterator(c+1);if(null==e?null==f.previous():e.equals(f.previous())){for(var j=b.listIterator(d-1),k=!1;j.hasPrevious();){var l=j.previous();if(!f.hasPrevious())return-1;if(null==l?null!=f.previous():!l.equals(f.previous())){k=!0;break}}if(!k)return f.nextIndex()}c--}return-1},"java.util.List,java.util.List");c$.list=c(c$,"list",function(a){for(var b=new java.util.ArrayList;a.hasMoreElements();)b.add(a.nextElement());
return b},"java.util.Enumeration");c$.synchronizedCollection=c(c$,"synchronizedCollection",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedCollection(a)},"java.util.Collection");c$.synchronizedList=c(c$,"synchronizedList",function(a){if(null==a)throw new NullPointerException;return p(a,java.util.RandomAccess)?new java.util.Collections.SynchronizedRandomAccessList(a):new java.util.Collections.SynchronizedList(a)},"java.util.List");c$.synchronizedMap=
c(c$,"synchronizedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedMap(a)},"java.util.Map");c$.synchronizedSet=c(c$,"synchronizedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSet(a)},"java.util.Set");c$.synchronizedSortedMap=c(c$,"synchronizedSortedMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSortedMap(a)},"java.util.SortedMap");
c$.synchronizedSortedSet=c(c$,"synchronizedSortedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.SynchronizedSortedSet(a)},"java.util.SortedSet");c$.unmodifiableCollection=c(c$,"unmodifiableCollection",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableCollection(a)},"java.util.Collection");c$.unmodifiableList=c(c$,"unmodifiableList",function(a){if(null==a)throw new NullPointerException;return p(a,java.util.RandomAccess)?
new java.util.Collections.UnmodifiableRandomAccessList(a):new java.util.Collections.UnmodifiableList(a)},"java.util.List");c$.unmodifiableMap=c(c$,"unmodifiableMap",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableMap(a)},"java.util.Map");c$.unmodifiableSet=c(c$,"unmodifiableSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSet(a)},"java.util.Set");c$.unmodifiableSortedMap=c(c$,"unmodifiableSortedMap",
function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSortedMap(a)},"java.util.SortedMap");c$.unmodifiableSortedSet=c(c$,"unmodifiableSortedSet",function(a){if(null==a)throw new NullPointerException;return new java.util.Collections.UnmodifiableSortedSet(a)},"java.util.SortedSet");c$.frequency=c(c$,"frequency",function(a,b){if(null==a)throw new NullPointerException;if(a.isEmpty())return 0;for(var d=0,e=a.iterator();e.hasNext();){var c=e.next();(null==b?
null==c:b.equals(c))&&d++}return d},"java.util.Collection,~O");c$.emptyList=c(c$,"emptyList",function(){return java.util.Collections.EMPTY_LIST});c$.emptySet=c(c$,"emptySet",function(){return java.util.Collections.EMPTY_SET});c$.emptyMap=c(c$,"emptyMap",function(){return java.util.Collections.EMPTY_MAP});c$.checkedCollection=c(c$,"checkedCollection",function(a,b){return new java.util.Collections.CheckedCollection(a,b)},"java.util.Collection,Class");c$.checkedMap=c(c$,"checkedMap",function(a,b,d){return new java.util.Collections.CheckedMap(a,
b,d)},"java.util.Map,Class,Class");c$.checkedList=c(c$,"checkedList",function(a,b){return p(a,java.util.RandomAccess)?new java.util.Collections.CheckedRandomAccessList(a,b):new java.util.Collections.CheckedList(a,b)},"java.util.List,Class");c$.checkedSet=c(c$,"checkedSet",function(a,b){return new java.util.Collections.CheckedSet(a,b)},"java.util.Set,Class");c$.checkedSortedMap=c(c$,"checkedSortedMap",function(a,b,d){return new java.util.Collections.CheckedSortedMap(a,b,d)},"java.util.SortedMap,Class,Class");
c$.checkedSortedSet=c(c$,"checkedSortedSet",function(a,b){return new java.util.Collections.CheckedSortedSet(a,b)},"java.util.SortedSet,Class");c$.addAll=c(c$,"addAll",function(a,b){for(var d=!1,e=0;e<b.length;e++)d=(new Boolean(d|a.add(b[e]))).valueOf();return d},"java.util.Collection,~A");c$.disjoint=c(c$,"disjoint",function(a,b){if(p(a,java.util.Set)&&!p(b,java.util.Set)||b.size()>a.size()){var d=a;a=b;b=d}for(d=a.iterator();d.hasNext();)if(b.contains(d.next()))return!1;return!0},"java.util.Collection,java.util.Collection");
c$.checkType=c(c$,"checkType",function(a,b){if(!b.isInstance(a))throw new ClassCastException("Attempt to insert "+a.getClass()+" element into collection with element type "+b);return a},"~O,Class");c$.$Collections$1$=function(a){G(self.c$);c$=t(function(){Q(this,arguments);this.it=null;s(this,arguments)},java.util,"Collections$1",null,java.util.Enumeration);K(c$,function(){this.it=a.iterator()});c(c$,"hasMoreElements",function(){return this.it.hasNext()});c(c$,"nextElement",function(){return this.it.next()});
c$=F()};G(self.c$);c$=t(function(){this.n=0;this.element=null;s(this,arguments)},java.util.Collections,"CopiesList",java.util.AbstractList,java.io.Serializable);u(c$,function(a,b){E(this,java.util.Collections.CopiesList,[]);if(0>a)throw new IllegalArgumentException;this.n=a;this.element=b},"~N,~O");h(c$,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");h(c$,"size",function(){return this.n});h(c$,"get",function(a){if(0<=a&&a<this.n)return this.element;throw new IndexOutOfBoundsException;
},"~N");c$=F();G(self.c$);c$=B(java.util.Collections,"EmptyList",java.util.AbstractList,java.io.Serializable);h(c$,"contains",function(){return!1},"~O");h(c$,"size",function(){return 0});h(c$,"get",function(){throw new IndexOutOfBoundsException;},"~N");c$=F();G(self.c$);c$=B(java.util.Collections,"EmptySet",java.util.AbstractSet,java.io.Serializable);h(c$,"contains",function(){return!1},"~O");h(c$,"size",function(){return 0});h(c$,"iterator",function(){return N("java.util.Collections$EmptySet$1")?
0:java.util.Collections.EmptySet.$Collections$EmptySet$1$(),M(java.util.Collections$EmptySet$1,this,null)});c$.$Collections$EmptySet$1$=function(){G(self.c$);c$=S(java.util,"Collections$EmptySet$1",null,java.util.Iterator);h(c$,"hasNext",function(){return!1});h(c$,"next",function(){throw new java.util.NoSuchElementException;});h(c$,"remove",function(){throw new UnsupportedOperationException;});c$=F()};c$=F();G(self.c$);c$=B(java.util.Collections,"EmptyMap",java.util.AbstractMap,java.io.Serializable);
h(c$,"containsKey",function(){return!1},"~O");h(c$,"containsValue",function(){return!1},"~O");h(c$,"entrySet",function(){return java.util.Collections.EMPTY_SET});h(c$,"get",function(){return null},"~O");h(c$,"keySet",function(){return java.util.Collections.EMPTY_SET});h(c$,"values",function(){return java.util.Collections.EMPTY_LIST});c$=F();G(self.c$);c$=B(java.util.Collections,"ReverseComparator",null,[java.util.Comparator,java.io.Serializable]);h(c$,"compare",function(a,b){return b.compareTo(a)},
"~O,~O");c$=F();G(self.c$);c$=t(function(){this.comparator=null;s(this,arguments)},java.util.Collections,"ReverseComparatorWithComparator",null,[java.util.Comparator,java.io.Serializable]);u(c$,function(a){this.comparator=a},"java.util.Comparator");c(c$,"compare",function(a,b){return this.comparator.compare(b,a)},"~O,~O");c$=F();G(self.c$);c$=t(function(){this.element=null;s(this,arguments)},java.util.Collections,"SingletonSet",java.util.AbstractSet,java.io.Serializable);u(c$,function(a){E(this,java.util.Collections.SingletonSet,
[]);this.element=a},"~O");h(c$,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");h(c$,"size",function(){return 1});h(c$,"iterator",function(){return N("java.util.Collections$SingletonSet$1")?0:java.util.Collections.SingletonSet.$Collections$SingletonSet$1$(),M(java.util.Collections$SingletonSet$1,this,null)});c$.$Collections$SingletonSet$1$=function(){G(self.c$);c$=t(function(){Q(this,arguments);this.$hasNext=!0;s(this,arguments)},java.util,"Collections$SingletonSet$1",
null,java.util.Iterator);h(c$,"hasNext",function(){return this.$hasNext});h(c$,"next",function(){if(this.$hasNext)return this.$hasNext=!1,this.b$["java.util.Collections.SingletonSet"].element;throw new java.util.NoSuchElementException;});h(c$,"remove",function(){throw new UnsupportedOperationException;});c$=F()};c$=F();G(self.c$);c$=t(function(){this.element=null;s(this,arguments)},java.util.Collections,"SingletonList",java.util.AbstractList,java.io.Serializable);u(c$,function(a){E(this,java.util.Collections.SingletonList,
[]);this.element=a},"~O");h(c$,"contains",function(a){return null==this.element?null==a:this.element.equals(a)},"~O");h(c$,"get",function(a){if(0==a)return this.element;throw new IndexOutOfBoundsException;},"~N");h(c$,"size",function(){return 1});c$=F();G(self.c$);c$=t(function(){this.v=this.k=null;s(this,arguments)},java.util.Collections,"SingletonMap",java.util.AbstractMap,java.io.Serializable);u(c$,function(a,b){E(this,java.util.Collections.SingletonMap,[]);this.k=a;this.v=b},"~O,~O");h(c$,"containsKey",
function(a){return null==this.k?null==a:this.k.equals(a)},"~O");h(c$,"containsValue",function(a){return null==this.v?null==a:this.v.equals(a)},"~O");h(c$,"get",function(a){return this.containsKey(a)?this.v:null},"~O");h(c$,"size",function(){return 1});h(c$,"entrySet",function(){return N("java.util.Collections$SingletonMap$1")?0:java.util.Collections.SingletonMap.$Collections$SingletonMap$1$(),M(java.util.Collections$SingletonMap$1,this,null)});c$.$Collections$SingletonMap$1$=function(){G(self.c$);
c$=S(java.util,"Collections$SingletonMap$1",java.util.AbstractSet);h(c$,"contains",function(a){return p(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");h(c$,"size",function(){return 1});h(c$,"iterator",function(){return N("java.util.Collections$SingletonMap$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$(),M(java.util.Collections$SingletonMap$1$1,this,null)});
c$=F()};c$.$Collections$SingletonMap$1$1$=function(){G(self.c$);c$=t(function(){Q(this,arguments);this.$hasNext=!0;s(this,arguments)},java.util,"Collections$SingletonMap$1$1",null,java.util.Iterator);h(c$,"hasNext",function(){return this.$hasNext});h(c$,"next",function(){if(this.$hasNext)return this.$hasNext=!1,N("java.util.Collections$SingletonMap$1$1$1")?0:java.util.Collections.$Collections$SingletonMap$1$1$1$(),M(java.util.Collections$SingletonMap$1$1$1,this,null);throw new java.util.NoSuchElementException;
});h(c$,"remove",function(){throw new UnsupportedOperationException;});c$=F()};c$.$Collections$SingletonMap$1$1$1$=function(){G(self.c$);c$=S(java.util,"Collections$SingletonMap$1$1$1",null,java.util.Map.Entry);h(c$,"equals",function(a){return this.b$["java.util.Collections$SingletonMap$1"].contains(a)},"~O");h(c$,"getKey",function(){return this.b$["java.util.Collections.SingletonMap"].k});h(c$,"getValue",function(){return this.b$["java.util.Collections.SingletonMap"].v});h(c$,"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())});h(c$,"setValue",function(){throw new UnsupportedOperationException;},"~O");c$=F()};c$=F();G(self.c$);c$=t(function(){this.mutex=this.c=null;s(this,arguments)},java.util.Collections,"SynchronizedCollection",null,[java.util.Collection,java.io.Serializable]);u(c$,function(a){this.c=
a;this.mutex=this},"java.util.Collection");u(c$,function(a,b){this.c=a;this.mutex=b},"java.util.Collection,~O");c(c$,"add",function(a){return this.c.add(a)},"~O");c(c$,"addAll",function(a){return this.c.addAll(a)},"java.util.Collection");c(c$,"clear",function(){this.c.clear()});c(c$,"contains",function(a){return this.c.contains(a)},"~O");c(c$,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");c(c$,"isEmpty",function(){return this.c.isEmpty()});c(c$,"iterator",function(){return this.c.iterator()});
c(c$,"remove",function(a){return this.c.remove(a)},"~O");c(c$,"removeAll",function(a){return this.c.removeAll(a)},"java.util.Collection");c(c$,"retainAll",function(a){return this.c.retainAll(a)},"java.util.Collection");c(c$,"size",function(){return this.c.size()});c(c$,"toArray",function(){return this.c.toArray()});c(c$,"toString",function(){return this.c.toString()});c(c$,"toArray",function(a){return this.c.toArray(a)},"~A");c$=F();G(self.c$);c$=B(java.util.Collections,"SynchronizedRandomAccessList",
java.util.Collections.SynchronizedList,java.util.RandomAccess);h(c$,"subList",function(a,b){return new java.util.Collections.SynchronizedRandomAccessList(this.list.subList(a,b),this.mutex)},"~N,~N");c$=F();G(self.c$);c$=t(function(){this.list=null;s(this,arguments)},java.util.Collections,"SynchronizedList",java.util.Collections.SynchronizedCollection,java.util.List);u(c$,function(a){E(this,java.util.Collections.SynchronizedList,[a]);this.list=a},"java.util.List");u(c$,function(a,b){E(this,java.util.Collections.SynchronizedList,
[a,b]);this.list=a},"java.util.List,~O");c(c$,"add",function(a,b){this.list.add(a,b)},"~N,~O");c(c$,"addAll",function(a,b){return this.list.addAll(a,b)},"~N,java.util.Collection");h(c$,"equals",function(a){return this.list.equals(a)},"~O");c(c$,"get",function(a){return this.list.get(a)},"~N");h(c$,"hashCode",function(){return this.list.hashCode()});c(c$,"indexOf",function(a){return this.list.indexOf(a)},"~O");c(c$,"lastIndexOf",function(a){return this.list.lastIndexOf(a)},"~O");c(c$,"listIterator",
function(){return this.list.listIterator()});c(c$,"listIterator",function(a){return this.list.listIterator(a)},"~N");c(c$,"remove",function(a){return this.list.remove(a)},"~N");c(c$,"set",function(a,b){return this.list.set(a,b)},"~N,~O");c(c$,"subList",function(a,b){return new java.util.Collections.SynchronizedList(this.list.subList(a,b),this.mutex)},"~N,~N");c$=F();G(self.c$);c$=t(function(){this.mutex=this.m=null;s(this,arguments)},java.util.Collections,"SynchronizedMap",null,[java.util.Map,java.io.Serializable]);
u(c$,function(a){this.m=a;this.mutex=this},"java.util.Map");u(c$,function(a,b){this.m=a;this.mutex=b},"java.util.Map,~O");c(c$,"clear",function(){this.m.clear()});c(c$,"containsKey",function(a){return this.m.containsKey(a)},"~O");c(c$,"containsValue",function(a){return this.m.containsValue(a)},"~O");c(c$,"entrySet",function(){return new java.util.Collections.SynchronizedSet(this.m.entrySet(),this.mutex)});h(c$,"equals",function(a){return this.m.equals(a)},"~O");c(c$,"get",function(a){return this.m.get(a)},
"~O");h(c$,"hashCode",function(){return this.m.hashCode()});c(c$,"isEmpty",function(){return this.m.isEmpty()});c(c$,"keySet",function(){return new java.util.Collections.SynchronizedSet(this.m.keySet(),this.mutex)});c(c$,"put",function(a,b){return this.m.put(a,b)},"~O,~O");c(c$,"putAll",function(a){this.m.putAll(a)},"java.util.Map");c(c$,"remove",function(a){return this.m.remove(a)},"~O");c(c$,"size",function(){return this.m.size()});c(c$,"values",function(){return new java.util.Collections.SynchronizedCollection(this.m.values(),
this.mutex)});c(c$,"toString",function(){return this.m.toString()});c$=F();G(self.c$);c$=B(java.util.Collections,"SynchronizedSet",java.util.Collections.SynchronizedCollection,java.util.Set);h(c$,"equals",function(a){return this.c.equals(a)},"~O");h(c$,"hashCode",function(){return this.c.hashCode()});c$=F();G(self.c$);c$=t(function(){this.sm=null;s(this,arguments)},java.util.Collections,"SynchronizedSortedMap",java.util.Collections.SynchronizedMap,java.util.SortedMap);u(c$,function(a){E(this,java.util.Collections.SynchronizedSortedMap,
[a]);this.sm=a},"java.util.SortedMap");u(c$,function(a,b){E(this,java.util.Collections.SynchronizedSortedMap,[a,b]);this.sm=a},"java.util.SortedMap,~O");c(c$,"comparator",function(){return this.sm.comparator()});c(c$,"firstKey",function(){return this.sm.firstKey()});c(c$,"headMap",function(a){return new java.util.Collections.SynchronizedSortedMap(this.sm.headMap(a),this.mutex)},"~O");c(c$,"lastKey",function(){return this.sm.lastKey()});c(c$,"subMap",function(a,b){return new java.util.Collections.SynchronizedSortedMap(this.sm.subMap(a,
b),this.mutex)},"~O,~O");c(c$,"tailMap",function(a){return new java.util.Collections.SynchronizedSortedMap(this.sm.tailMap(a),this.mutex)},"~O");c$=F();G(self.c$);c$=t(function(){this.ss=null;s(this,arguments)},java.util.Collections,"SynchronizedSortedSet",java.util.Collections.SynchronizedSet,java.util.SortedSet);u(c$,function(a){E(this,java.util.Collections.SynchronizedSortedSet,[a]);this.ss=a},"java.util.SortedSet");u(c$,function(a,b){E(this,java.util.Collections.SynchronizedSortedSet,[a,b]);this.ss=
a},"java.util.SortedSet,~O");c(c$,"comparator",function(){return this.ss.comparator()});c(c$,"first",function(){return this.ss.first()});c(c$,"headSet",function(a){return new java.util.Collections.SynchronizedSortedSet(this.ss.headSet(a),this.mutex)},"~O");c(c$,"last",function(){return this.ss.last()});c(c$,"subSet",function(a,b){return new java.util.Collections.SynchronizedSortedSet(this.ss.subSet(a,b),this.mutex)},"~O,~O");c(c$,"tailSet",function(a){return new java.util.Collections.SynchronizedSortedSet(this.ss.tailSet(a),
this.mutex)},"~O");c$=F();G(self.c$);c$=t(function(){this.c=null;s(this,arguments)},java.util.Collections,"UnmodifiableCollection",null,[java.util.Collection,java.io.Serializable]);u(c$,function(a){this.c=a},"java.util.Collection");h(c$,"add",function(){throw new UnsupportedOperationException;},"~O");h(c$,"addAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");h(c$,"clear",function(){throw new UnsupportedOperationException;});c(c$,"contains",function(a){return this.c.contains(a)},
"~O");c(c$,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");c(c$,"isEmpty",function(){return this.c.isEmpty()});c(c$,"iterator",function(){return N("java.util.Collections$UnmodifiableCollection$1")?0:java.util.Collections.UnmodifiableCollection.$Collections$UnmodifiableCollection$1$(),M(java.util.Collections$UnmodifiableCollection$1,this,null)});h(c$,"remove",function(){throw new UnsupportedOperationException;},"~O");h(c$,"removeAll",function(){throw new UnsupportedOperationException;
},"java.util.Collection");h(c$,"retainAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");c(c$,"size",function(){return this.c.size()});c(c$,"toArray",function(){return this.c.toArray()});c(c$,"toArray",function(a){return this.c.toArray(a)},"~A");c(c$,"toString",function(){return this.c.toString()});c$.$Collections$UnmodifiableCollection$1$=function(){G(self.c$);c$=t(function(){Q(this,arguments);this.iterator=null;s(this,arguments)},java.util,"Collections$UnmodifiableCollection$1",
null,java.util.Iterator);K(c$,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableCollection"].c.iterator()});c(c$,"hasNext",function(){return this.iterator.hasNext()});c(c$,"next",function(){return this.iterator.next()});h(c$,"remove",function(){throw new UnsupportedOperationException;});c$=F()};c$=F();G(self.c$);c$=B(java.util.Collections,"UnmodifiableRandomAccessList",java.util.Collections.UnmodifiableList,java.util.RandomAccess);h(c$,"subList",function(a,b){return new java.util.Collections.UnmodifiableRandomAccessList(this.list.subList(a,
b))},"~N,~N");c$=F();G(self.c$);c$=t(function(){this.list=null;s(this,arguments)},java.util.Collections,"UnmodifiableList",java.util.Collections.UnmodifiableCollection,java.util.List);u(c$,function(a){E(this,java.util.Collections.UnmodifiableList,[a]);this.list=a},"java.util.List");c(c$,"add",function(){throw new UnsupportedOperationException;},"~N,~O");c(c$,"addAll",function(){throw new UnsupportedOperationException;},"~N,java.util.Collection");h(c$,"equals",function(a){return this.list.equals(a)},
"~O");c(c$,"get",function(a){return this.list.get(a)},"~N");h(c$,"hashcode",function(){return this.list.hashCode()});c(c$,"indexOf",function(a){return this.list.indexOf(a)},"~O");c(c$,"lastIndexOf",function(a){return this.list.lastIndexOf(a)},"~O");c(c$,"listIterator",function(){return this.listIterator(0)});c(c$,"listIterator",function(){return N("java.util.Collections$UnmodifiableList$1")?0:java.util.Collections.UnmodifiableList.$Collections$UnmodifiableList$1$(),M(java.util.Collections$UnmodifiableList$1,
this,null)},"~N");c(c$,"remove",function(){throw new UnsupportedOperationException;},"~N");h(c$,"set",function(){throw new UnsupportedOperationException;},"~N,~O");c(c$,"subList",function(a,b){return new java.util.Collections.UnmodifiableList(this.list.subList(a,b))},"~N,~N");c$.$Collections$UnmodifiableList$1$=function(){G(self.c$);c$=t(function(){Q(this,arguments);this.iterator=null;s(this,arguments)},java.util,"Collections$UnmodifiableList$1",null,java.util.ListIterator);K(c$,function(){this.iterator=
this.b$["java.util.Collections.UnmodifiableList"].list.listIterator(location)});h(c$,"add",function(){throw new UnsupportedOperationException;},"~O");c(c$,"hasNext",function(){return this.iterator.hasNext()});c(c$,"hasPrevious",function(){return this.iterator.hasPrevious()});c(c$,"next",function(){return this.iterator.next()});c(c$,"nextIndex",function(){return this.iterator.nextIndex()});c(c$,"previous",function(){return this.iterator.previous()});c(c$,"previousIndex",function(){return this.iterator.previousIndex()});
h(c$,"remove",function(){throw new UnsupportedOperationException;});h(c$,"set",function(){throw new UnsupportedOperationException;},"~O");c$=F()};c$=F();G(self.c$);c$=t(function(){this.m=null;s(this,arguments)},java.util.Collections,"UnmodifiableMap",null,[java.util.Map,java.io.Serializable]);u(c$,function(a){this.m=a},"java.util.Map");h(c$,"clear",function(){throw new UnsupportedOperationException;});c(c$,"containsKey",function(a){return this.m.containsKey(a)},"~O");c(c$,"containsValue",function(a){return this.m.containsValue(a)},
"~O");c(c$,"entrySet",function(){return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet(this.m.entrySet())});h(c$,"equals",function(a){return this.m.equals(a)},"~O");c(c$,"get",function(a){return this.m.get(a)},"~O");h(c$,"hashcode",function(){return this.m.hashCode()});c(c$,"isEmpty",function(){return this.m.isEmpty()});c(c$,"keySet",function(){return new java.util.Collections.UnmodifiableSet(this.m.keySet())});h(c$,"put",function(){throw new UnsupportedOperationException;},"~O,~O");
h(c$,"putAll",function(){throw new UnsupportedOperationException;},"java.util.Map");h(c$,"remove",function(){throw new UnsupportedOperationException;},"~O");c(c$,"size",function(){return this.m.size()});c(c$,"values",function(){return new java.util.Collections.UnmodifiableCollection(this.m.values())});c(c$,"toString",function(){return this.m.toString()});G(self.c$);c$=B(java.util.Collections.UnmodifiableMap,"UnmodifiableEntrySet",java.util.Collections.UnmodifiableSet);h(c$,"iterator",function(){return N("java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1")?
0:java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$(),M(java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1,this,null)});c(c$,"toArray",function(){for(var a=this.c.size(),b=Array(a),d=this.iterator();0<=--a;)b[a]=d.next();return b});c(c$,"toArray",function(a){var b=this.c.size(),d=0,e=this.iterator();b>a.length&&(a=a.getClass().getComponentType(),a=java.lang.reflect.Array.newInstance(a,b));for(;d<b;)a[d++]=e.next();d<a.length&&
(a[d]=null);return a},"~A");c$.$Collections$UnmodifiableMap$UnmodifiableEntrySet$1$=function(){G(self.c$);c$=t(function(){Q(this,arguments);this.iterator=null;s(this,arguments)},java.util,"Collections$UnmodifiableMap$UnmodifiableEntrySet$1",null,java.util.Iterator);K(c$,function(){this.iterator=this.b$["java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet"].c.iterator()});c(c$,"hasNext",function(){return this.iterator.hasNext()});c(c$,"next",function(){return new java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet.UnmodifiableMapEntry(this.iterator.next())});
h(c$,"remove",function(){throw new UnsupportedOperationException;});c$=F()};G(self.c$);c$=t(function(){this.mapEntry=null;s(this,arguments)},java.util.Collections.UnmodifiableMap.UnmodifiableEntrySet,"UnmodifiableMapEntry",null,java.util.Map.Entry);u(c$,function(a){this.mapEntry=a},"java.util.Map.Entry");h(c$,"equals",function(a){return this.mapEntry.equals(a)},"~O");c(c$,"getKey",function(){return this.mapEntry.getKey()});c(c$,"getValue",function(){return this.mapEntry.getValue()});h(c$,"hashcode",
function(){return this.mapEntry.hashCode()});h(c$,"setValue",function(){throw new UnsupportedOperationException;},"~O");c(c$,"toString",function(){return this.mapEntry.toString()});c$=F();c$=F();c$=F();G(self.c$);c$=B(java.util.Collections,"UnmodifiableSet",java.util.Collections.UnmodifiableCollection,java.util.Set);h(c$,"equals",function(a){return this.c.equals(a)},"~O");h(c$,"hashCode",function(){return this.c.hashCode()});c$=F();G(self.c$);c$=t(function(){this.sm=null;s(this,arguments)},java.util.Collections,
"UnmodifiableSortedMap",java.util.Collections.UnmodifiableMap,java.util.SortedMap);u(c$,function(a){E(this,java.util.Collections.UnmodifiableSortedMap,[a]);this.sm=a},"java.util.SortedMap");c(c$,"comparator",function(){return this.sm.comparator()});c(c$,"firstKey",function(){return this.sm.firstKey()});c(c$,"headMap",function(a){return new java.util.Collections.UnmodifiableSortedMap(this.sm.headMap(a))},"~O");c(c$,"lastKey",function(){return this.sm.lastKey()});c(c$,"subMap",function(a,b){return new java.util.Collections.UnmodifiableSortedMap(this.sm.subMap(a,
b))},"~O,~O");c(c$,"tailMap",function(a){return new java.util.Collections.UnmodifiableSortedMap(this.sm.tailMap(a))},"~O");c$=F();G(self.c$);c$=t(function(){this.ss=null;s(this,arguments)},java.util.Collections,"UnmodifiableSortedSet",java.util.Collections.UnmodifiableSet,java.util.SortedSet);u(c$,function(a){E(this,java.util.Collections.UnmodifiableSortedSet,[a]);this.ss=a},"java.util.SortedSet");c(c$,"comparator",function(){return this.ss.comparator()});c(c$,"first",function(){return this.ss.first()});
c(c$,"headSet",function(a){return new java.util.Collections.UnmodifiableSortedSet(this.ss.headSet(a))},"~O");c(c$,"last",function(){return this.ss.last()});c(c$,"subSet",function(a,b){return new java.util.Collections.UnmodifiableSortedSet(this.ss.subSet(a,b))},"~O,~O");c(c$,"tailSet",function(a){return new java.util.Collections.UnmodifiableSortedSet(this.ss.tailSet(a))},"~O");c$=F();G(self.c$);c$=t(function(){this.type=this.c=null;s(this,arguments)},java.util.Collections,"CheckedCollection",null,
[java.util.Collection,java.io.Serializable]);u(c$,function(a,b){if(null==a||null==b)throw new NullPointerException;this.c=a;this.type=b},"java.util.Collection,Class");c(c$,"size",function(){return this.c.size()});c(c$,"isEmpty",function(){return this.c.isEmpty()});c(c$,"contains",function(a){return this.c.contains(a)},"~O");c(c$,"iterator",function(){var a=this.c.iterator();p(a,java.util.ListIterator)&&(a=new java.util.Collections.CheckedListIterator(a,this.type));return a});c(c$,"toArray",function(){return this.c.toArray()});
c(c$,"toArray",function(a){return this.c.toArray(a)},"~A");c(c$,"add",function(a){return this.c.add(java.util.Collections.checkType(a,this.type))},"~O");c(c$,"remove",function(a){return this.c.remove(a)},"~O");c(c$,"containsAll",function(a){return this.c.containsAll(a)},"java.util.Collection");h(c$,"addAll",function(a){var b=a.size();if(0==b)return!1;var d=Array(b);a=a.iterator();for(var e=0;e<b;e++)d[e]=java.util.Collections.checkType(a.next(),this.type);a=!1;for(e=0;e<b;e++)a=(new Boolean(a|this.c.add(d[e]))).valueOf();
return a},"java.util.Collection");c(c$,"removeAll",function(a){return this.c.removeAll(a)},"java.util.Collection");c(c$,"retainAll",function(a){return this.c.retainAll(a)},"java.util.Collection");c(c$,"clear",function(){this.c.clear()});c(c$,"toString",function(){return this.c.toString()});c$=F();G(self.c$);c$=t(function(){this.type=this.i=null;s(this,arguments)},java.util.Collections,"CheckedListIterator",null,java.util.ListIterator);u(c$,function(a,b){this.i=a;this.type=b},"java.util.ListIterator,Class");
c(c$,"hasNext",function(){return this.i.hasNext()});c(c$,"next",function(){return this.i.next()});c(c$,"remove",function(){this.i.remove()});c(c$,"hasPrevious",function(){return this.i.hasPrevious()});c(c$,"previous",function(){return this.i.previous()});c(c$,"nextIndex",function(){return this.i.nextIndex()});c(c$,"previousIndex",function(){return this.i.previousIndex()});c(c$,"set",function(a){this.i.set(java.util.Collections.checkType(a,this.type))},"~O");c(c$,"add",function(a){this.i.add(java.util.Collections.checkType(a,
this.type))},"~O");c$=F();G(self.c$);c$=t(function(){this.l=null;s(this,arguments)},java.util.Collections,"CheckedList",java.util.Collections.CheckedCollection,java.util.List);u(c$,function(a,b){E(this,java.util.Collections.CheckedList,[a,b]);this.l=a},"java.util.List,Class");c(c$,"addAll",function(a,b){var d=b.size();if(0==d)return!1;for(var e=Array(d),c=b.iterator(),f=0;f<d;f++)e[f]=java.util.Collections.checkType(c.next(),this.type);return this.l.addAll(a,java.util.Arrays.asList(e))},"~N,java.util.Collection");
c(c$,"get",function(a){return this.l.get(a)},"~N");c(c$,"set",function(a,b){return this.l.set(a,java.util.Collections.checkType(b,this.type))},"~N,~O");c(c$,"add",function(a,b){this.l.add(a,java.util.Collections.checkType(b,this.type))},"~N,~O");c(c$,"remove",function(a){return this.l.remove(a)},"~N");c(c$,"indexOf",function(a){return this.l.indexOf(a)},"~O");c(c$,"lastIndexOf",function(a){return this.l.lastIndexOf(a)},"~O");c(c$,"listIterator",function(){return new java.util.Collections.CheckedListIterator(this.l.listIterator(),
this.type)});c(c$,"listIterator",function(a){return new java.util.Collections.CheckedListIterator(this.l.listIterator(a),this.type)},"~N");c(c$,"subList",function(a,b){return java.util.Collections.checkedList(this.l.subList(a,b),this.type)},"~N,~N");h(c$,"equals",function(a){return this.l.equals(a)},"~O");h(c$,"hashcode",function(){return this.l.hashCode()});c$=F();G(self.c$);c$=B(java.util.Collections,"CheckedRandomAccessList",java.util.Collections.CheckedList,java.util.RandomAccess);c$=F();G(self.c$);
c$=B(java.util.Collections,"CheckedSet",java.util.Collections.CheckedCollection,java.util.Set);h(c$,"equals",function(a){return this.c.equals(a)},"~O");h(c$,"hashCode",function(){return this.c.hashCode()});c$=F();G(self.c$);c$=t(function(){this.valueType=this.keyType=this.m=null;s(this,arguments)},java.util.Collections,"CheckedMap",null,[java.util.Map,java.io.Serializable]);u(c$,($fz=function(a,b,d){if(null==a||null==b||null==d)throw new NullPointerException;this.m=a;this.keyType=b;this.valueType=
d},$fz.isPrivate=!0,$fz),"java.util.Map,Class,Class");c(c$,"size",function(){return this.m.size()});c(c$,"isEmpty",function(){return this.m.isEmpty()});c(c$,"containsKey",function(a){return this.m.containsKey(a)},"~O");c(c$,"containsValue",function(a){return this.m.containsValue(a)},"~O");c(c$,"get",function(a){return this.m.get(a)},"~O");c(c$,"put",function(a,b){return this.m.put(java.util.Collections.checkType(a,this.keyType),java.util.Collections.checkType(b,this.valueType))},"~O,~O");c(c$,"remove",
function(a){return this.m.remove(a)},"~O");h(c$,"putAll",function(a){var b=a.size();if(0!=b){var d=Array(b);a=a.entrySet().iterator();for(var e=0;e<b;e++){var c=a.next();java.util.Collections.checkType(c.getKey(),this.keyType);java.util.Collections.checkType(c.getValue(),this.valueType);d[e]=c}for(c=0;c<b;c++)this.m.put(d[c].getKey(),d[c].getValue())}},"java.util.Map");c(c$,"clear",function(){this.m.clear()});c(c$,"keySet",function(){return this.m.keySet()});c(c$,"values",function(){return this.m.values()});
c(c$,"entrySet",function(){return new java.util.Collections.CheckedMap.CheckedEntrySet(this.m.entrySet(),this.valueType)});h(c$,"equals",function(a){return this.m.equals(a)},"~O");h(c$,"hashcode",function(){return this.m.hashCode()});c(c$,"toString",function(){return this.m.toString()});G(self.c$);c$=t(function(){this.valueType=this.e=null;s(this,arguments)},java.util.Collections.CheckedMap,"CheckedEntry",null,java.util.Map.Entry);u(c$,function(a,b){if(null==a)throw new NullPointerException;this.e=
a;this.valueType=b},"java.util.Map.Entry,Class");c(c$,"getKey",function(){return this.e.getKey()});c(c$,"getValue",function(){return this.e.getValue()});c(c$,"setValue",function(a){return this.e.setValue(java.util.Collections.checkType(a,this.valueType))},"~O");h(c$,"equals",function(a){return this.e.equals(a)},"~O");h(c$,"hashcode",function(){return this.e.hashCode()});c$=F();G(self.c$);c$=t(function(){this.valueType=this.s=null;s(this,arguments)},java.util.Collections.CheckedMap,"CheckedEntrySet",
null,java.util.Set);u(c$,function(a,b){this.s=a;this.valueType=b},"java.util.Set,Class");c(c$,"iterator",function(){return new java.util.Collections.CheckedMap.CheckedEntrySet.CheckedEntryIterator(this.s.iterator(),this.valueType)});c(c$,"toArray",function(){for(var a=this.size(),b=Array(a),d=this.iterator(),e=0;e<a;e++)b[e]=d.next();return b});c(c$,"toArray",function(a){var b=this.size();if(a.length<b){var d=a.getClass().getComponentType();a=java.lang.reflect.Array.newInstance(d,b)}for(var d=this.iterator(),
e=0;e<b;e++)a[e]=d.next();b<a.length&&(a[b]=null);return a},"~A");c(c$,"retainAll",function(a){return this.s.retainAll(a)},"java.util.Collection");c(c$,"removeAll",function(a){return this.s.removeAll(a)},"java.util.Collection");c(c$,"containsAll",function(a){return this.s.containsAll(a)},"java.util.Collection");h(c$,"addAll",function(){throw new UnsupportedOperationException;},"java.util.Collection");c(c$,"remove",function(a){return this.s.remove(a)},"~O");c(c$,"contains",function(a){return this.s.contains(a)},
"~O");h(c$,"add",function(){throw new UnsupportedOperationException;},"java.util.Map.Entry");c(c$,"isEmpty",function(){return this.s.isEmpty()});c(c$,"clear",function(){this.s.clear()});c(c$,"size",function(){return this.s.size()});h(c$,"hashcode",function(){return this.s.hashCode()});h(c$,"equals",function(a){return this.s.equals(a)},"~O");G(self.c$);c$=t(function(){this.valueType=this.i=null;s(this,arguments)},java.util.Collections.CheckedMap.CheckedEntrySet,"CheckedEntryIterator",null,java.util.Iterator);
u(c$,function(a,b){this.i=a;this.valueType=b},"java.util.Iterator,Class");c(c$,"hasNext",function(){return this.i.hasNext()});c(c$,"remove",function(){this.i.remove()});c(c$,"next",function(){return new java.util.Collections.CheckedMap.CheckedEntry(this.i.next(),this.valueType)});c$=F();c$=F();c$=F();G(self.c$);c$=t(function(){this.ss=null;s(this,arguments)},java.util.Collections,"CheckedSortedSet",java.util.Collections.CheckedSet,java.util.SortedSet);u(c$,function(a,b){E(this,java.util.Collections.CheckedSortedSet,
[a,b]);this.ss=a},"java.util.SortedSet,Class");c(c$,"comparator",function(){return this.ss.comparator()});c(c$,"subSet",function(a,b){return new java.util.Collections.CheckedSortedSet(this.ss.subSet(a,b),this.type)},"~O,~O");c(c$,"headSet",function(a){return new java.util.Collections.CheckedSortedSet(this.ss.headSet(a),this.type)},"~O");c(c$,"tailSet",function(a){return new java.util.Collections.CheckedSortedSet(this.ss.tailSet(a),this.type)},"~O");c(c$,"first",function(){return this.ss.first()});
c(c$,"last",function(){return this.ss.last()});c$=F();G(self.c$);c$=t(function(){this.sm=null;s(this,arguments)},java.util.Collections,"CheckedSortedMap",java.util.Collections.CheckedMap,java.util.SortedMap);u(c$,function(a,b,d){E(this,java.util.Collections.CheckedSortedMap,[a,b,d]);this.sm=a},"java.util.SortedMap,Class,Class");c(c$,"comparator",function(){return this.sm.comparator()});c(c$,"subMap",function(a,b){return new java.util.Collections.CheckedSortedMap(this.sm.subMap(a,b),this.keyType,this.valueType)},
"~O,~O");c(c$,"headMap",function(a){return new java.util.Collections.CheckedSortedMap(this.sm.headMap(a),this.keyType,this.valueType)},"~O");c(c$,"tailMap",function(a){return new java.util.Collections.CheckedSortedMap(this.sm.tailMap(a),this.keyType,this.valueType)},"~O");c(c$,"firstKey",function(){return this.sm.firstKey()});c(c$,"lastKey",function(){return this.sm.lastKey()});c$=F();c$.EMPTY_LIST=c$.prototype.EMPTY_LIST=new java.util.Collections.EmptyList;c$.EMPTY_SET=c$.prototype.EMPTY_SET=new java.util.Collections.EmptySet;
c$.EMPTY_MAP=c$.prototype.EMPTY_MAP=new java.util.Collections.EmptyMap});c$=B(java.util,"Dictionary");u(c$,function(){});w("java.util.Dictionary $.Enumeration $.Iterator $.Map $.MapEntry $.NoSuchElementException".split(" "),"java.util.Hashtable","java.lang.IllegalArgumentException $.IllegalStateException $.NullPointerException $.StringBuilder java.util.AbstractCollection $.AbstractSet $.Arrays $.Collections $.ConcurrentModificationException java.util.MapEntry.Type".split(" "),function(){c$=t(function(){this.elementCount=
0;this.elementData=null;this.firstSlot=this.threshold=this.loadFactor=0;this.lastSlot=-1;this.modCount=0;N("java.util.Hashtable.HashIterator")||java.util.Hashtable.$Hashtable$HashIterator$();N("java.util.Hashtable.HashEnumerator")||java.util.Hashtable.$Hashtable$HashEnumerator$();s(this,arguments)},java.util,"Hashtable",java.util.Dictionary,[java.util.Map,Cloneable,java.io.Serializable]);c$.newEntry=c(c$,"newEntry",($fz=function(a,b){return new java.util.Hashtable.Entry(a,b)},$fz.isPrivate=!0,$fz),
"~O,~O,~N");W(c$,function(){this.elementCount=0;this.elementData=this.newElementArray(11);this.firstSlot=this.elementData.length;this.loadFactor=0.75;this.computeMaxSize()});c(c$,"newElementArray",($fz=function(a){return Array(a)},$fz.isPrivate=!0,$fz),"~N");h(c$,"clear",function(){this.elementCount=0;for(var a=this.elementData.length;0<=--a;)this.elementData[a]=null;this.modCount++});c(c$,"clone",function(){try{var a=R(this,java.util.Hashtable,"clone",[]);a.elementData=this.elementData.clone();for(var b,
d=this.elementData.length;0<=--d;)if(null!=(b=this.elementData[d]))a.elementData[d]=b.clone();return a}catch(e){if(p(e,CloneNotSupportedException))return null;throw e;}});c(c$,"computeMaxSize",($fz=function(){this.threshold=Math.round(this.elementData.length*this.loadFactor)},$fz.isPrivate=!0,$fz));c(c$,"contains",function(a){if(null==a)throw new NullPointerException;for(var b=this.elementData.length;0<=--b;)for(var d=this.elementData[b];null!=d;){if(a.equals(d.value))return!0;d=d.next}return!1},
"~O");h(c$,"containsKey",function(a){return null!=this.getEntry(a)},"~O");h(c$,"containsValue",function(a){return this.contains(a)},"~O");h(c$,"elements",function(){return 0==this.elementCount?java.util.Hashtable.EMPTY_ENUMERATION:M(java.util.Hashtable.HashEnumerator,this,null,!1)});h(c$,"entrySet",function(){var a,b=new java.util.Collections.SynchronizedSet((N("java.util.Hashtable$2")?0:java.util.Hashtable.$Hashtable$2$(),a=M(java.util.Hashtable$2,this,null)),this);a&&(a.b$H=a.b$["java.util.Hashtable"]);
return b});h(c$,"equals",function(a){if(this===a)return!0;if(p(a,java.util.Map)){if(this.size()!=a.size())return!1;var b=this.entrySet(),d;for(a=a.entrySet().iterator();a.hasNext()&&((d=a.next())||1);)if(!b.contains(d))return!1;return!0}return!1},"~O");h(c$,"get",function(a){for(var b=a.hashCode(),d=this.elementData[(b&2147483647)%this.elementData.length];null!=d;){if(d.equalsKey(a,b))return d.value;d=d.next}return null},"~O");c(c$,"getEntry",function(a){for(var b=a.hashCode(),d=this.elementData[(b&
2147483647)%this.elementData.length];null!=d;){if(d.equalsKey(a,b))return d;d=d.next}return null},"~O");h(c$,"hashCode",function(){for(var a=0,b=this.entrySet().iterator();b.hasNext();)var d=b.next(),e=d.getKey(),d=d.getValue(),e=(e!==this?e.hashCode():0)^(d!==this?null!=d?d.hashCode():0:0),a=a+e;return a});h(c$,"isEmpty",function(){return 0==this.elementCount});h(c$,"keys",function(){return 0==this.elementCount?java.util.Hashtable.EMPTY_ENUMERATION:M(java.util.Hashtable.HashEnumerator,this,null,
!0)});h(c$,"keySet",function(){var a,b=new java.util.Collections.SynchronizedSet((N("java.util.Hashtable$3")?0:java.util.Hashtable.$Hashtable$3$(),a=M(java.util.Hashtable$3,this,null)),this);a&&(a.b$H=a.b$["java.util.Hashtable"]);return b});h(c$,"put",function(a,b){if(null!=a&&null!=b){if(!a.hashCode){var d=Math.floor(1E7*Math.random());a.hashCode=function(){return d};a.equals=function(a){return this.hashCode()==a.hashCode()}}for(var e=a.hashCode(),c=(e&2147483647)%this.elementData.length,f=this.elementData[c];null!=
f&&!f.equalsKey(a,e);)f=f.next;if(null==f)return this.modCount++,++this.elementCount>this.threshold&&(this.rehash(),c=(e&2147483647)%this.elementData.length),c<this.firstSlot&&(this.firstSlot=c),c>this.lastSlot&&(this.lastSlot=c),f=java.util.Hashtable.newEntry(a,b,e),f.next=this.elementData[c],this.elementData[c]=f,null;e=f.value;f.value=b;return e}throw new NullPointerException;},"~O,~O");h(c$,"putAll",function(a){var b;for(a=a.entrySet().iterator();a.hasNext()&&((b=a.next())||1);)this.put(b.getKey(),
b.getValue())},"java.util.Map");c(c$,"rehash",function(){var a=(this.elementData.length<<1)+1;0==a&&(a=1);for(var b=a,d=-1,e=this.newElementArray(a),c=this.lastSlot+1;--c>=this.firstSlot;)for(var f=this.elementData[c];null!=f;){var j=(f.getKeyHash()&2147483647)%a;j<b&&(b=j);j>d&&(d=j);var k=f.next;f.next=e[j];e[j]=f;f=k}this.firstSlot=b;this.lastSlot=d;this.elementData=e;this.computeMaxSize()});h(c$,"remove",function(a){for(var b=a.hashCode(),d=(b&2147483647)%this.elementData.length,e=null,c=this.elementData[d];null!=
c&&!c.equalsKey(a,b);)e=c,c=c.next;return null!=c?(this.modCount++,null==e?this.elementData[d]=c.next:e.next=c.next,this.elementCount--,a=c.value,c.value=null,a):null},"~O");h(c$,"size",function(){return this.elementCount});h(c$,"toString",function(){if(this.isEmpty())return"{}";var a=new StringBuilder(28*this.size());a.append("{");for(var b=this.lastSlot;b>=this.firstSlot;b--)for(var d=this.elementData[b];null!=d;)d.key!==this?a.append(d.key):a.append("(this Map)"),a.append("="),d.value!==this?a.append(d.value):
a.append("(this Map)"),a.append(", "),d=d.next;0<this.elementCount&&a.setLength(a.length()-2);a.append("}");return a.toString()});h(c$,"values",function(){var a,b=new java.util.Collections.SynchronizedCollection((N("java.util.Hashtable$4")?0:java.util.Hashtable.$Hashtable$4$(),a=M(java.util.Hashtable$4,this,null)),this);a&&(a.b$H=a.b$["java.util.Hashtable"]);return b});c$.$Hashtable$HashIterator$=function(){G(self.c$);c$=t(function(){Q(this,arguments);this.expectedModCount=this.position=0;this.lastEntry=
this.type=null;this.lastPosition=0;this.canRemove=!1;s(this,arguments)},java.util.Hashtable,"HashIterator",null,java.util.Iterator);u(c$,function(a){this.type=a;this.b$H=this.b$["java.util.Hashtable"];this.position=this.b$H.lastSlot;this.expectedModCount=this.b$H.modCount},"java.util.MapEntry.Type");h(c$,"hasNext",function(){if(null!=this.lastEntry&&null!=this.lastEntry.next)return!0;for(;this.position>=this.b$H.firstSlot;)if(null==this.b$H.elementData[this.position])this.position--;else return!0;
return!1});h(c$,"next",function(){if(this.expectedModCount==this.b$H.modCount){null!=this.lastEntry&&(this.lastEntry=this.lastEntry.next);if(null==this.lastEntry){for(;this.position>=this.b$H.firstSlot&&null==(this.lastEntry=this.b$H.elementData[this.position]);)this.position--;null!=this.lastEntry&&(this.lastPosition=this.position,this.position--)}if(null!=this.lastEntry)return this.canRemove=!0,this.type.get(this.lastEntry);throw new java.util.NoSuchElementException;}throw new java.util.ConcurrentModificationException;
});h(c$,"remove",function(){if(this.expectedModCount==this.b$H.modCount)if(this.canRemove){var a=this.canRemove=!1,b=this.b$H.elementData[this.lastPosition];if(b===this.lastEntry)this.b$H.elementData[this.lastPosition]=b.next,a=!0;else{for(;null!=b&&b.next!==this.lastEntry;)b=b.next;null!=b&&(b.next=this.lastEntry.next,a=!0)}if(a){this.b$H.modCount++;this.b$H.elementCount--;this.expectedModCount++;return}}else throw new IllegalStateException;throw new java.util.ConcurrentModificationException;});
c$=F()};c$.$Hashtable$HashEnumerator$=function(){G(self.c$);c$=t(function(){Q(this,arguments);this.key=!1;this.start=0;this.entry=null;s(this,arguments)},java.util.Hashtable,"HashEnumerator",null,java.util.Enumeration);u(c$,function(a){this.key=a;this.b$H=this.b$["java.util.Hashtable"];this.start=this.b$H.lastSlot+1},"~B");h(c$,"hasMoreElements",function(){if(null!=this.entry)return!0;for(;--this.start>=this.b$H.firstSlot;)if(null!=this.b$H.elementData[this.start])return this.entry=this.b$H.elementData[this.start],
!0;return!1});h(c$,"nextElement",function(){if(this.hasMoreElements()){var a=this.key?this.entry.key:this.entry.value;this.entry=this.entry.next;return a}throw new java.util.NoSuchElementException;});c$=F()};c$.$Hashtable$2$=function(){G(self.c$);c$=S(java.util,"Hashtable$2",java.util.AbstractSet);h(c$,"size",function(){return this.b$H.elementCount});h(c$,"clear",function(){this.b$H.clear()});h(c$,"remove",function(a){return this.contains(a)?(this.b$H.remove(a.getKey()),!0):!1},"~O");c(c$,"contains",
function(a){var b=this.b$H.getEntry(a.getKey());return a.equals(b)},"~O");c(c$,"iterator",function(){return M(java.util.Hashtable.HashIterator,this,null,(N("java.util.Hashtable$2$1")?0:java.util.Hashtable.$Hashtable$2$1$(),M(java.util.Hashtable$2$1,this,null)))});c$=F()};c$.$Hashtable$2$1$=function(){G(self.c$);c$=S(java.util,"Hashtable$2$1",null,java.util.MapEntry.Type);h(c$,"get",function(a){return a},"java.util.MapEntry");c$=F()};c$.$Hashtable$3$=function(){G(self.c$);c$=S(java.util,"Hashtable$3",
java.util.AbstractSet);h(c$,"contains",function(a){return this.b$H.containsKey(a)},"~O");h(c$,"size",function(){return this.b$H.elementCount});h(c$,"clear",function(){this.b$H.clear()});h(c$,"remove",function(a){return this.b$H.containsKey(a)?(this.b$H.remove(a),!0):!1},"~O");h(c$,"iterator",function(){return M(java.util.Hashtable.HashIterator,this,null,(N("java.util.Hashtable$3$1")?0:java.util.Hashtable.$Hashtable$3$1$(),M(java.util.Hashtable$3$1,this,null)))});c$=F()};c$.$Hashtable$3$1$=function(){G(self.c$);
c$=S(java.util,"Hashtable$3$1",null,java.util.MapEntry.Type);h(c$,"get",function(a){return a.key},"java.util.MapEntry");c$=F()};c$.$Hashtable$4$=function(){G(self.c$);c$=S(java.util,"Hashtable$4",java.util.AbstractCollection);h(c$,"contains",function(a){return this.b$H.contains(a)},"~O");h(c$,"size",function(){return this.b$H.elementCount});h(c$,"clear",function(){this.b$H.clear()});h(c$,"iterator",function(){return M(java.util.Hashtable.HashIterator,this,null,(N("java.util.Hashtable$4$1")?0:java.util.Hashtable.$Hashtable$4$1$(),
M(java.util.Hashtable$4$1,this,null)))});c$=F()};c$.$Hashtable$4$1$=function(){G(self.c$);c$=S(java.util,"Hashtable$4$1",null,java.util.MapEntry.Type);h(c$,"get",function(a){return a.value},"java.util.MapEntry");c$=F()};c$.$Hashtable$1$=function(){G(self.c$);c$=S(java.util,"Hashtable$1",null,java.util.Enumeration);h(c$,"hasMoreElements",function(){return!1});h(c$,"nextElement",function(){throw new java.util.NoSuchElementException;});c$=F()};G(self.c$);c$=t(function(){this.next=null;this.hashcode=
0;s(this,arguments)},java.util.Hashtable,"Entry",java.util.MapEntry);W(c$,function(a,b){this.key=a;this.value=b;this.hashcode=a.hashCode()});c(c$,"clone",function(){var a=R(this,java.util.Hashtable.Entry,"clone",[]);null!=this.next&&(a.next=this.next.clone());return a});h(c$,"setValue",function(a){if(null==a)throw new NullPointerException;var b=this.value;this.value=a;return b},"~O");c(c$,"getKeyHash",function(){return this.key.hashCode()});c(c$,"equalsKey",function(a){return this.hashcode==a.hashCode()&&
this.key.equals(a)},"~O,~N");h(c$,"toString",function(){return this.key+"="+this.value});c$=F();c$.EMPTY_ENUMERATION=c$.prototype.EMPTY_ENUMERATION=(N("java.util.Hashtable$1")?0:java.util.Hashtable.$Hashtable$1$(),M(java.util.Hashtable$1,this,null))});w(["java.util.Map"],"java.util.MapEntry",null,function(){c$=t(function(){this.value=this.key=null;s(this,arguments)},java.util,"MapEntry",null,[java.util.Map.Entry,Cloneable]);u(c$,function(a){this.key=a},"~O");u(c$,function(a,b){this.key=a;this.value=
b},"~O,~O");c(c$,"clone",function(){try{return R(this,java.util.MapEntry,"clone",[])}catch(a){if(p(a,CloneNotSupportedException))return null;throw a;}});h(c$,"equals",function(a){return this===a?!0:p(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");h(c$,"getKey",function(){return this.key});h(c$,"getValue",function(){return this.value});h(c$,"hashCode",function(){return(null==this.key?
0:this.key.hashCode())^(null==this.value?0:this.value.hashCode())});h(c$,"setValue",function(a){var b=this.value;this.value=a;return b},"~O");h(c$,"toString",function(){return this.key+"="+this.value});H(java.util.MapEntry,"Type")});w(["java.util.Hashtable"],"java.util.Properties",["java.lang.NullPointerException","$.StringBuffer"],function(){c$=t(function(){this.defaults=this.builder=null;s(this,arguments)},java.util,"Properties",java.util.Hashtable);u(c$,function(a){E(this,java.util.Properties,
[]);this.defaults=a},"java.util.Properties");c(c$,"dumpString",($fz=function(a,b,d){var e=0;!d&&(e<b.length&&32==b.charAt(e).charCodeAt(0))&&(a.append("\\ "),e++);for(;e<b.length;e++){var c=b.charAt(e);switch(c){case "\t":a.append("\\t");break;case "\n":a.append("\\n");break;case "\f":a.append("\\f");break;case "\r":a.append("\\r");break;default:(0<="\\#!=:".indexOf(c)||d&&32==c.charCodeAt(0))&&a.append("\\");if(!(32<=c.charCodeAt(0)&&126>=c.charCodeAt(0))){c=Integer.toHexString(c.charCodeAt(0));
a.append("\\u");for(var f=0;f<4-c.length;f++)a.append("0")}a.append(c)}}},$fz.isPrivate=!0,$fz),"StringBuilder,~S,~B");c(c$,"getProperty",function(a){var b=this.get(a),b=p(b,String)?b:null;null==b&&null!=this.defaults&&(b=this.defaults.getProperty(a));return b},"~S");c(c$,"getProperty",function(a,b){var d=this.get(a),d=p(d,String)?d:null;null==d&&null!=this.defaults&&(d=this.defaults.getProperty(a));return null==d?b:d},"~S,~S");c(c$,"list",function(a){if(null==a)throw new NullPointerException;for(var b=
new StringBuffer(80),d=this.propertyNames();d.hasMoreElements();){var e=d.nextElement();b.append(e);b.append("=");for(var c=this.get(e),f=this.defaults;null==c;)c=f.get(e),f=f.defaults;40<c.length?(b.append(c.substring(0,37)),b.append("...")):b.append(c);a.println(b.toString());b.setLength(0)}},"java.io.PrintStream");c(c$,"list",function(a){if(null==a)throw new NullPointerException;for(var b=new StringBuffer(80),d=this.propertyNames();d.hasMoreElements();){var e=d.nextElement();b.append(e);b.append("=");
for(var c=this.get(e),f=this.defaults;null==c;)c=f.get(e),f=f.defaults;40<c.length?(b.append(c.substring(0,37)),b.append("...")):b.append(c);a.println(b.toString());b.setLength(0)}},"java.io.PrintWriter");c(c$,"load",function(){},"java.io.InputStream");c(c$,"propertyNames",function(){if(null==this.defaults)return this.keys();for(var a=new java.util.Hashtable(this.defaults.size()+this.size()),b=this.defaults.propertyNames();b.hasMoreElements();)a.put(b.nextElement(),a);for(b=this.keys();b.hasMoreElements();)a.put(b.nextElement(),
a);return a.keys()});c(c$,"save",function(a,b){try{this.store(a,b)}catch(d){if(!p(d,java.io.IOException))throw d;}},"java.io.OutputStream,~S");c(c$,"setProperty",function(a,b){return this.put(a,b)},"~S,~S");c(c$,"store",function(){},"java.io.OutputStream,~S");c(c$,"loadFromXML",function(){},"java.io.InputStream");c(c$,"storeToXML",function(){},"java.io.OutputStream,~S");c(c$,"storeToXML",function(){},"java.io.OutputStream,~S,~S");c(c$,"substitutePredefinedEntries",($fz=function(a){return a.replaceAll("&",
"&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll("'","&apos;").replaceAll('"',"&quot;")},$fz.isPrivate=!0,$fz),"~S");C(c$,"PROP_DTD_NAME","http://java.sun.com/dtd/properties.dtd","PROP_DTD",'<?xml version="1.0" encoding="UTF-8"?>    <!ELEMENT properties (comment?, entry*) >    <!ATTLIST properties version CDATA #FIXED "1.0" >    <!ELEMENT comment (#PCDATA) >    <!ELEMENT entry (#PCDATA) >    <!ATTLIST entry key CDATA #REQUIRED >',"NONE",0,"SLASH",1,"UNICODE",2,"CONTINUE",3,"KEY_DONE",
4,"IGNORE",5,"lineSeparator",null)});w(null,"java.util.Random",["java.lang.IllegalArgumentException"],function(){c$=t(function(){this.haveNextNextGaussian=!1;this.nextNextGaussian=this.seed=0;s(this,arguments)},java.util,"Random",null,java.io.Serializable);u(c$,function(){this.setSeed(System.currentTimeMillis())});u(c$,function(a){this.setSeed(a)},"~N");c(c$,"next",function(a){this.seed=25214903917*this.seed+11&0xffffffffffff;return this.seed>>>48-a},"~N");c(c$,"nextBoolean",function(){return 0.5<
Math.random()});c(c$,"nextBytes",function(){for(var a=0;a<bytes.length;a++)bytes[a]=Math.round(256*Math.random())},"~A");c(c$,"nextDouble",function(){return Math.random()});c(c$,"nextFloat",function(){return Math.random()});c(c$,"nextGaussian",function(){if(this.haveNextNextGaussian)return this.haveNextNextGaussian=!1,this.nextNextGaussian;var a,b,d;do a=2*this.nextDouble()-1,b=2*this.nextDouble()-1,d=a*a+b*b;while(1<=d);d=Math.sqrt(-2*Math.log(d)/d);this.nextNextGaussian=b*d;this.haveNextNextGaussian=
!0;return a*d});c(c$,"nextInt",function(){return Math.ceil(65535*Math.random())-32768});c(c$,"nextInt",function(a){if(0<a){if((a&-a)==a)return a*this.next(31)>>31;var b,d;do b=this.next(31),d=b%a;while(0>b-d+(a-1));return d}throw new IllegalArgumentException;},"~N");c(c$,"nextLong",function(){return Math.ceil(4294967295*Math.random())-2147483648});c(c$,"setSeed",function(a){this.seed=(a^25214903917)&0xffffffffffff;this.haveNextNextGaussian=!1},"~N");C(c$,"multiplier",25214903917)});w(["java.util.Map"],
"java.util.SortedMap",null,function(){H(java.util,"SortedMap",java.util.Map)});w(["java.util.Set"],"java.util.SortedSet",null,function(){H(java.util,"SortedSet",java.util.Set)});w(["java.util.Enumeration"],"java.util.StringTokenizer",["java.lang.NullPointerException","java.util.NoSuchElementException"],function(){c$=t(function(){this.delimiters=this.string=null;this.returnDelimiters=!1;this.position=0;s(this,arguments)},java.util,"StringTokenizer",null,java.util.Enumeration);u(c$,function(a){this.construct(a,
" \t\n\r\f",!1)},"~S");u(c$,function(a,b){this.construct(a,b,!1)},"~S,~S");u(c$,function(a,b,d){if(null!=a)this.string=a,this.delimiters=b,this.returnDelimiters=d,this.position=0;else throw new NullPointerException;},"~S,~S,~B");c(c$,"countTokens",function(){for(var a=0,b=!1,d=this.position,e=this.string.length;d<e;d++)0<=this.delimiters.indexOf(this.string.charAt(d),0)?(this.returnDelimiters&&a++,b&&(a++,b=!1)):b=!0;b&&a++;return a});h(c$,"hasMoreElements",function(){return this.hasMoreTokens()});
c(c$,"hasMoreTokens",function(){var a=this.string.length;if(this.position<a){if(this.returnDelimiters)return!0;for(var b=this.position;b<a;b++)if(-1==this.delimiters.indexOf(this.string.charAt(b),0))return!0}return!1});h(c$,"nextElement",function(){return this.nextToken()});c(c$,"nextToken",function(){var a=this.position,b=this.string.length;if(a<b){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<b;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<b&&0<=this.delimiters.indexOf(this.string.charAt(a),0);)a++;this.position=a;if(a<b){for(this.position++;this.position<b;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;
});c(c$,"nextToken",function(a){this.delimiters=a;return this.nextToken()},"~S")});n("javajs.api");H(javajs.api,"BytePoster");n("javajs.api");H(javajs.api,"EventManager");n("javajs.api");H(javajs.api,"FontManager");n("javajs.api");H(javajs.api,"GenericColor");n("javajs.api");H(javajs.api,"GenericFileInterface");n("javajs.api");H(javajs.api,"GenericMenuInterface");n("javajs.api");H(javajs.api,"GenericMouseInterface");n("javajs.api");w(["javajs.api.FontManager"],"javajs.api.GenericPlatform",null,function(){c$=
H(javajs.api,"GenericPlatform",javajs.api.FontManager);C(c$,"CURSOR_DEFAULT",0,"CURSOR_CROSSHAIR",1,"CURSOR_WAIT",3,"CURSOR_ZOOM",8,"CURSOR_HAND",12,"CURSOR_MOVE",13)});n("javajs.api");H(javajs.api,"JSInterface");n("javajs.api");H(javajs.api,"JSONEncodable");n("javajs.api");H(javajs.api,"PlatformViewer");n("javajs.api");H(javajs.api,"ZInputStream");n("javajs.awt");w(["javajs.api.GenericColor"],"javajs.awt.Color",null,function(){c$=t(function(){this.argb=0;s(this,arguments)},javajs.awt,"Color",null,
javajs.api.GenericColor);h(c$,"getRGB",function(){return this.argb&16777215});h(c$,"getOpacity255",function(){return this.argb>>24&255});h(c$,"setOpacity255",function(a){this.argb=this.argb&16777215|(a&255)<<24},"~N");c$.get1=c(c$,"get1",function(a){var b=new javajs.awt.Color;b.argb=a|4278190080;return b},"~N");c$.get3=c(c$,"get3",function(a,b,d){return(new javajs.awt.Color).set4(a,b,d,255)},"~N,~N,~N");c$.get4=c(c$,"get4",function(a,b,d,e){return(new javajs.awt.Color).set4(a,b,d,e)},"~N,~N,~N,~N");
c(c$,"set4",function(a,b,d,e){this.argb=(e<<24|a<<16|b<<8|d)&4294967295;return this},"~N,~N,~N,~N");h(c$,"toString",function(){var a="00000000"+Integer.toHexString(this.argb);return"[0x"+a.substring(a.length-8,a.length)+"]"})});n("javajs.awt");c$=t(function(){this.height=this.width=0;s(this,arguments)},javajs.awt,"Dimension");u(c$,function(a,b){this.set(a,b)},"~N,~N");c(c$,"set",function(a,b){this.width=a;this.height=b;return this},"~N,~N");n("javajs.awt.event");c$=t(function(){this.source=null;s(this,
arguments)},javajs.awt.event,"Event");c(c$,"getSource",function(){return this.source});C(c$,"MOUSE_LEFT",16,"MOUSE_MIDDLE",8,"MOUSE_RIGHT",4,"MOUSE_WHEEL",32,"MAC_COMMAND",20,"BUTTON_MASK",28,"MOUSE_DOWN",501,"MOUSE_UP",502,"MOUSE_MOVE",503,"MOUSE_ENTER",504,"MOUSE_EXIT",505,"MOUSE_DRAG",506,"SHIFT_MASK",1,"ALT_MASK",8,"CTRL_MASK",2,"CTRL_ALT",10,"CTRL_SHIFT",3,"META_MASK",4,"VK_SHIFT",16,"VK_ALT",18,"VK_CONTROL",17,"VK_META",157,"VK_LEFT",37,"VK_RIGHT",39,"VK_PERIOD",46,"VK_SPACE",32,"VK_DOWN",40,
"VK_UP",38,"VK_ESCAPE",27,"VK_DELETE",127,"VK_BACK_SPACE",8,"VK_PAGE_DOWN",34,"VK_PAGE_UP",33,"MOVED",0,"DRAGGED",1,"CLICKED",2,"WHEELED",3,"PRESSED",4,"RELEASED",5);n("javajs.awt");w(null,"javajs.awt.Font",["JU.AU"],function(){c$=t(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;s(this,arguments)},javajs.awt,"Font");u(c$,
function(a,b,d,e,c,f,j){this.manager=a;this.fid=b;this.fontFace=javajs.awt.Font.fontFaces[d];this.fontStyle=javajs.awt.Font.fontStyles[e];this.idFontFace=d;this.idFontStyle=e;this.fontSize=c;this.isBold=1==(e&1);this.isItalic=2==(e&2);this.fontSizeNominal=f;this.font=a.newFont(javajs.awt.Font.fontFaces[d],this.isBold,this.isItalic,c);this.fontMetrics=a.getFontMetrics(this,j);this.descent=a.getFontDescent(this.fontMetrics);this.ascent=a.getFontAscent(this.fontMetrics)},"javajs.api.FontManager,~N,~N,~N,~N,~N,~O");
c$.getFont3D=c(c$,"getFont3D",function(a){return javajs.awt.Font.font3ds[a&255]},"~N");c$.createFont3D=c(c$,"createFont3D",function(a,b,d,e,c,f){255<d&&(d=255);for(var j=z(d)<<4,j=a&3|(b&3)<<2|j<<4,k=javajs.awt.Font.fontkeyCount;0<--k;)if(j==javajs.awt.Font.fontkeys[k]&&javajs.awt.Font.font3ds[k].fontSizeNominal==e)return javajs.awt.Font.font3ds[k];k=javajs.awt.Font.fontkeyCount++;k==javajs.awt.Font.fontkeys.length&&(javajs.awt.Font.fontkeys=JU.AU.arrayCopyI(javajs.awt.Font.fontkeys,k+8));javajs.awt.Font.font3ds=
JU.AU.arrayCopyObject(javajs.awt.Font.font3ds,k+8);a=new javajs.awt.Font(c,k,a,b,d,e,f);javajs.awt.Font.font3ds[k]=a;javajs.awt.Font.fontkeys[k]=j;return a},"~N,~N,~N,~N,javajs.api.FontManager,~O");c$.getFontFaceID=c(c$,"getFontFaceID",function(a){return"Monospaced".equalsIgnoreCase(a)?2:"Serif".equalsIgnoreCase(a)?1:0},"~S");c$.getFontStyleID=c(c$,"getFontStyleID",function(a){for(var b=4;0<=--b;)if(javajs.awt.Font.fontStyles[b].equalsIgnoreCase(a))return b;return-1},"~S");c(c$,"getAscent",function(){return this.ascent});
c(c$,"getDescent",function(){return this.descent});c(c$,"getHeight",function(){return this.getAscent()+this.getDescent()});c(c$,"getFontMetrics",function(){return this.fontMetrics});c(c$,"stringWidth",function(a){return this.manager.fontStringWidth(this,a)},"~S");c(c$,"getInfo",function(){return this.fontSizeNominal+" "+this.fontFace+" "+this.fontStyle});C(c$,"FONT_ALLOCATION_UNIT",8,"fontkeyCount",1,"fontkeys",D(8,0));c$.font3ds=c$.prototype.font3ds=Array(8);C(c$,"FONT_FACE_SANS",0,"FONT_FACE_SERIF",
1,"FONT_FACE_MONO",2,"fontFaces",["SansSerif","Serif","Monospaced",""],"FONT_STYLE_PLAIN",0,"FONT_STYLE_BOLD",1,"FONT_STYLE_ITALIC",2,"FONT_STYLE_BOLDITALIC",3,"fontStyles",["Plain","Bold","Italic","BoldItalic"])});n("JU");w(["javajs.api.JSONEncodable"],"JU.A4",["JU.T3"],function(){c$=t(function(){this.angle=this.z=this.y=this.x=0;s(this,arguments)},JU,"A4",null,[javajs.api.JSONEncodable,java.io.Serializable]);u(c$,function(){this.z=1});c$.new4=c(c$,"new4",function(a,b,d,e){var c=new JU.A4;c.set4(a,
b,d,e);return c},"~N,~N,~N,~N");c$.newAA=c(c$,"newAA",function(a){var b=new JU.A4;b.set4(a.x,a.y,a.z,a.angle);return b},"JU.A4");c$.newVA=c(c$,"newVA",function(a,b){var d=new JU.A4;d.setVA(a,b);return d},"JU.V3,~N");c(c$,"setVA",function(a,b){this.x=a.x;this.y=a.y;this.z=a.z;this.angle=b},"JU.V3,~N");c(c$,"set4",function(a,b,d,e){this.x=a;this.y=b;this.z=d;this.angle=e},"~N,~N,~N,~N");c(c$,"setAA",function(a){this.x=a.x;this.y=a.y;this.z=a.z;this.angle=a.angle},"JU.A4");c(c$,"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(c$,"setFromMat",function(a,b,d,e,c,f,j,k,l){a=0.5*(a+c+l-1);this.x=k-f;this.y=d-j;this.z=e-b;b=0.5*Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z);this.angle=Math.atan2(b,a)},"~N,~N,~N,~N,~N,~N,~N,~N,~N");h(c$,"hashCode",function(){return JU.T3.floatToIntBits0(this.x)^JU.T3.floatToIntBits0(this.y)^JU.T3.floatToIntBits0(this.z)^JU.T3.floatToIntBits0(this.angle)});h(c$,"equals",function(a){return!p(a,JU.A4)?!1:this.x==a.x&&this.y==a.y&&
this.z==a.z&&this.angle==a.angle},"~O");h(c$,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.angle+")"});h(c$,"toJSON",function(){return"["+this.x+","+this.y+","+this.z+","+180*this.angle/3.141592653589793+"]"})});n("JU");w(["java.net.URLConnection"],"JU.AjaxURLConnection",null,function(){c$=t(function(){this.bytesOut=null;this.postOut="";s(this,arguments)},JU,"AjaxURLConnection",java.net.URLConnection);c(c$,"doAjax",function(){return Jmol._doAjax(this.url,this.postOut,this.bytesOut)});
h(c$,"connect",function(){});c(c$,"outputBytes",function(a){this.bytesOut=a},"~A");c(c$,"outputString",function(a){this.postOut=a},"~S");c(c$,"getContents",function(){return this.doAjax()})});n("JU");w(["java.net.URLStreamHandler"],"JU.AjaxURLStreamHandler",["JU.AjaxURLConnection","$.SB"],function(){c$=t(function(){this.protocol=null;s(this,arguments)},JU,"AjaxURLStreamHandler",java.net.URLStreamHandler);u(c$,function(a){E(this,JU.AjaxURLStreamHandler,[]);this.protocol=a},"~S");h(c$,"openConnection",
function(a){return new JU.AjaxURLConnection(a)},"java.net.URL");h(c$,"toExternalForm",function(a){var b=new JU.SB;b.append(a.getProtocol());b.append(":");null!=a.getAuthority()&&0<a.getAuthority().length&&(b.append("//"),b.append(a.getAuthority()));null!=a.getPath()&&b.append(a.getPath());null!=a.getQuery()&&(b.append("?"),b.append(a.getQuery()));null!=a.getRef()&&(b.append("#"),b.append(a.getRef()));return b.toString()},"java.net.URL")});n("JU");w(["java.net.URLStreamHandlerFactory","java.util.Hashtable"],
"JU.AjaxURLStreamHandlerFactory",["JU.AjaxURLStreamHandler"],function(){c$=t(function(){this.htFactories=null;s(this,arguments)},JU,"AjaxURLStreamHandlerFactory",null,java.net.URLStreamHandlerFactory);K(c$,function(){this.htFactories=new java.util.Hashtable});h(c$,"createURLStreamHandler",function(a){var b=this.htFactories.get(a);null==b&&this.htFactories.put(a,b=new JU.AjaxURLStreamHandler(a));return null==b.protocol?null:b},"~S")});n("JU");w(null,"JU.AU",["java.util.Arrays","JU.Lst"],function(){c$=
B(JU,"AU");c$.ensureLength=c(c$,"ensureLength",function(a,b){return null!=a&&JU.AU.getLength(a)>=b?a:JU.AU.arrayCopyObject(a,b)},"~O,~N");c$.ensureLengthS=c(c$,"ensureLengthS",function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyS(a,b)},"~A,~N");c$.ensureLengthA=c(c$,"ensureLengthA",function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyF(a,b)},"~A,~N");c$.ensureLengthI=c(c$,"ensureLengthI",function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyI(a,b)},"~A,~N");c$.ensureLengthShort=
c(c$,"ensureLengthShort",function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyShort(a,b)},"~A,~N");c$.ensureLengthByte=c(c$,"ensureLengthByte",function(a,b){return null!=a&&a.length>=b?a:JU.AU.arrayCopyByte(a,b)},"~A,~N");c$.doubleLength=c(c$,"doubleLength",function(a){return JU.AU.arrayCopyObject(a,null==a?16:2*JU.AU.getLength(a))},"~O");c$.doubleLengthS=c(c$,"doubleLengthS",function(a){return JU.AU.arrayCopyS(a,null==a?16:2*a.length)},"~A");c$.doubleLengthF=c(c$,"doubleLengthF",function(a){return JU.AU.arrayCopyF(a,
null==a?16:2*a.length)},"~A");c$.doubleLengthI=c(c$,"doubleLengthI",function(a){return JU.AU.arrayCopyI(a,null==a?16:2*a.length)},"~A");c$.doubleLengthShort=c(c$,"doubleLengthShort",function(a){return JU.AU.arrayCopyShort(a,null==a?16:2*a.length)},"~A");c$.doubleLengthByte=c(c$,"doubleLengthByte",function(a){return JU.AU.arrayCopyByte(a,null==a?16:2*a.length)},"~A");c$.doubleLengthBool=c(c$,"doubleLengthBool",function(a){return JU.AU.arrayCopyBool(a,null==a?16:2*a.length)},"~A");c$.deleteElements=
c(c$,"deleteElements",function(a,b,d){if(0==d||null==a)return a;var e=JU.AU.getLength(a);if(b>=e)return a;e-=b+d;0>e&&(e=0);var c=JU.AU.newInstanceO(a,b+e);0<b&&System.arraycopy(a,0,c,0,b);0<e&&System.arraycopy(a,b+d,c,b,e);return c},"~O,~N,~N");c$.arrayCopyObject=c(c$,"arrayCopyObject",function(a,b){if(null==a)return null;var d=JU.AU.getLength(a);if(b==d)return a;var e=JU.AU.newInstanceO(a,b);System.arraycopy(a,0,e,0,d<b?d:b);return e},"~O,~N");c$.newInstanceO=c(c$,"newInstanceO",function(a,b){return Array(b)},
"~O,~N");c$.getLength=c(c$,"getLength",function(a){return a.length},"~O");c$.arrayCopyS=c(c$,"arrayCopyS",function(a,b){0>b&&(b=a.length);var d=Array(b);if(null!=a){var e=a.length;System.arraycopy(a,0,d,0,e<b?e:b)}return d},"~A,~N");c$.arrayCopyII=c(c$,"arrayCopyII",function(a,b){var d=JU.AU.newInt2(b);if(null!=a){var e=a.length;System.arraycopy(a,0,d,0,e<b?e:b)}return d},"~A,~N");c$.arrayCopyPt=c(c$,"arrayCopyPt",function(a,b){0>b&&(b=a.length);var d=Array(b);if(null!=a){var e=a.length;System.arraycopy(a,
0,d,0,e<b?e:b)}return d},"~A,~N");c$.arrayCopyF=c(c$,"arrayCopyF",function(a,b){0>b&&(b=a.length);var d=L(b,0);if(null!=a){var e=a.length;System.arraycopy(a,0,d,0,e<b?e:b)}return d},"~A,~N");c$.arrayCopyI=c(c$,"arrayCopyI",function(a,b){0>b&&(b=a.length);var d=D(b,0);if(null!=a){var e=a.length;System.arraycopy(a,0,d,0,e<b?e:b)}return d},"~A,~N");c$.arrayCopyRangeI=c(c$,"arrayCopyRangeI",function(a,b,d){if(null==a)return null;var e=a.length;-1==d&&(d=e);-2==d&&(d=q(e/2));d-=b;e=D(d,0);System.arraycopy(a,
b,e,0,d);return e},"~A,~N,~N");c$.arrayCopyRangeRevI=c(c$,"arrayCopyRangeRevI",function(a,b,d){if(null==a)return null;b=JU.AU.arrayCopyRangeI(a,b,d);0>d&&(d=a.length);for(a=q(d/2);0<=--a;)JU.AU.swapInt(b,a,d-1-a);return b},"~A,~N,~N");c$.arrayCopyShort=c(c$,"arrayCopyShort",function(a,b){0>b&&(b=a.length);var d=T(b,0);if(null!=a){var e=a.length;System.arraycopy(a,0,d,0,e<b?e:b)}return d},"~A,~N");c$.arrayCopyByte=c(c$,"arrayCopyByte",function(a,b){0>b&&(b=a.length);var d=O(b,0);if(null!=a){var e=
a.length;System.arraycopy(a,0,d,0,e<b?e:b)}return d},"~A,~N");c$.arrayCopyBool=c(c$,"arrayCopyBool",function(a,b){0>b&&(b=a.length);var d=ca(b,!1);if(null!=a){var e=a.length;System.arraycopy(a,0,d,0,e<b?e:b)}return d},"~A,~N");c$.swapInt=c(c$,"swapInt",function(a,b,d){var e=a[b];a[b]=a[d];a[d]=e},"~A,~N,~N");c$.dumpArray=c(c$,"dumpArray",function(a,b,d,e,c,f){a="dumpArray: "+a+"\n";for(var j=d;j<=e;j++)a+="\t*"+j+"*";for(;f>=c;f--){a+="\n*"+f+"*";for(j=d;j<=e;j++)a+="\t"+(j<b.length&&f<b[j].length?
b[j][f]:NaN)}return a},"~S,~A,~N,~N,~N,~N");c$.dumpIntArray=c(c$,"dumpIntArray",function(a,b){for(var d="",e=0;e<b;e++)d+=" "+a[e];return d},"~A,~N");c$.sortedItem=c(c$,"sortedItem",function(a,b){if(0==a.size())return null;if(1==a.size())return a.get(0);var d=a.toArray(Array(a.size()));java.util.Arrays.sort(d);return d[b%d.length]},"JU.Lst,~N");c$.createArrayOfArrayList=c(c$,"createArrayOfArrayList",function(a){return Array(a)},"~N");c$.createArrayOfHashtable=c(c$,"createArrayOfHashtable",function(a){return Array(a)},
"~N");c$.swap=c(c$,"swap",function(a,b,d){var e=a[b];a[b]=a[d];a[d]=e},"~A,~N,~N");c$.newFloat2=c(c$,"newFloat2",function(a){return P(a,null)},"~N");c$.newInt2=c(c$,"newInt2",function(a){return P(a,null)},"~N");c$.newInt3=c(c$,"newInt3",function(a){return P(a,null)},"~N,~N");c$.newFloat3=c(c$,"newFloat3",function(a){return P(a,null)},"~N,~N");c$.newInt4=c(c$,"newInt4",function(a){return P(a,null)},"~N");c$.newShort2=c(c$,"newShort2",function(a){return P(a,null)},"~N");c$.newByte2=c(c$,"newByte2",
function(a){return P(a,null)},"~N");c$.newDouble2=c(c$,"newDouble2",function(a){return P(a,null)},"~N");c$.removeMapKeys=c(c$,"removeMapKeys",function(a,b){for(var d=new JU.Lst,e,c=a.keySet().iterator();c.hasNext()&&((e=c.next())||1);)e.startsWith(b)&&d.addLast(e);for(e=d.size();0<=--e;)a.remove(d.get(e));return d.size()},"java.util.Map,~S")});n("JU");w(null,"JU.Base64",["JU.SB"],function(){c$=B(JU,"Base64");c$.getBytes64=c(c$,"getBytes64",function(a){return JU.Base64.getBase64(a).toBytes(0,-1)},
"~A");c$.getBase64=c(c$,"getBase64",function(a){var b=a.length,d=new JU.SB;if(0==b)return d;for(var e=0,c=0;e<b&&0==c;){0==e%75&&0!=e&&d.append("\r\n");var c=e+2==b?1:e+1==b?2:0,f=a[e++]<<16&16711680|(2==c?0:a[e++]<<8)&65280|(1<=c?0:a[e++])&255;d.appendC(JU.Base64.base64.charAt(f>>18&63));d.appendC(JU.Base64.base64.charAt(f>>12&63));d.appendC(2==c?"=":JU.Base64.base64.charAt(f>>6&63));d.appendC(1<=c?"=":JU.Base64.base64.charAt(f&63))}return d},"~A");c$.decodeBase64=c(c$,"decodeBase64",function(a){var b=
0,d,e=a.indexOf(";base64,")+1;0<e&&(e+=7);a=a.toCharArray();var c=a.length;if(0==c)return O(0,0);for(var f=c;--f>=e;)b+=65==(d=a[f].charCodeAt(0)&127)||0<JU.Base64.decode64[d]?3:0;for(var b=b>>2,j=O(b,0),k=18,f=e,l=e=0;f<c;f++)if(0<JU.Base64.decode64[d=a[f].charCodeAt(0)&127]||65==d||61==d)l|=JU.Base64.decode64[d]<<k,k-=6,0>k&&(j[e++]=(l&16711680)>>16,e<b&&(j[e++]=(l&65280)>>8),e<b&&(j[e++]=l&255),k=18,l=0);return j},"~S");C(c$,"base64","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
"decode64",[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])});n("JU");w(["javajs.api.JSONEncodable"],"JU.BS",["java.lang.Character","$.IndexOutOfBoundsException","$.NegativeArraySizeException","JU.SB"],function(){c$=t(function(){this.words=
null;this.wordsInUse=0;this.sizeIsSticky=!1;s(this,arguments)},JU,"BS",null,[Cloneable,javajs.api.JSONEncodable]);c$.wordIndex=c(c$,"wordIndex",function(a){return a>>5},"~N");c(c$,"recalculateWordsInUse",function(){var a;for(a=this.wordsInUse-1;0<=a&&0==this.words[a];a--);this.wordsInUse=a+1});u(c$,function(){this.initWords(32);this.sizeIsSticky=!1});c$.newN=c(c$,"newN",function(a){var b=new JU.BS;b.init(a);return b},"~N");c(c$,"init",function(a){if(0>a)throw new NegativeArraySizeException("nbits < 0: "+
a);this.initWords(a);this.sizeIsSticky=!0},"~N");c(c$,"initWords",function(a){this.words=D(JU.BS.wordIndex(a-1)+1,0)},"~N");c(c$,"ensureCapacity",function(a){this.words.length<a&&(a=Math.max(2*this.words.length,a),this.setLength(a),this.sizeIsSticky=!1)},"~N");c(c$,"expandTo",function(a){a+=1;this.wordsInUse<a&&(this.ensureCapacity(a),this.wordsInUse=a)},"~N");c(c$,"set",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var b=JU.BS.wordIndex(a);this.expandTo(b);this.words[b]|=
1<<a},"~N");c(c$,"setBitTo",function(a,b){b?this.set(a):this.clear(a)},"~N,~B");c(c$,"setBits",function(a,b){if(a!=b){var d=JU.BS.wordIndex(a),e=JU.BS.wordIndex(b-1);this.expandTo(e);var c=-1<<a,f=-1>>>-b;if(d==e)this.words[d]|=c&f;else{this.words[d]|=c;for(d+=1;d<e;d++)this.words[d]=-1;this.words[e]|=f}}},"~N,~N");c(c$,"clear",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+a);var b=JU.BS.wordIndex(a);b>=this.wordsInUse||(this.words[b]&=~(1<<a),this.recalculateWordsInUse())},
"~N");c(c$,"clearBits",function(a,b){if(a!=b){var d=JU.BS.wordIndex(a);if(!(d>=this.wordsInUse)){var e=JU.BS.wordIndex(b-1);e>=this.wordsInUse&&(b=this.length(),e=this.wordsInUse-1);var c=-1<<a,f=-1>>>-b;if(d==e)this.words[d]&=~(c&f);else{this.words[d]&=~c;for(d+=1;d<e;d++)this.words[d]=0;this.words[e]&=~f}this.recalculateWordsInUse()}}},"~N,~N");c(c$,"clearAll",function(){for(;0<this.wordsInUse;)this.words[--this.wordsInUse]=0});c(c$,"get",function(a){if(0>a)throw new IndexOutOfBoundsException("bitIndex < 0: "+
a);var b=JU.BS.wordIndex(a);return b<this.wordsInUse&&0!=(this.words[b]&1<<a)},"~N");c(c$,"nextSetBit",function(a){if(0>a)throw new IndexOutOfBoundsException("fromIndex < 0: "+a);var b=JU.BS.wordIndex(a);if(b>=this.wordsInUse)return-1;for(a=this.words[b]&-1<<a;;){if(0!=a)return 32*b+Integer.numberOfTrailingZeros(a);if(++b==this.wordsInUse)return-1;a=this.words[b]}},"~N");c(c$,"nextClearBit",function(a){if(0>a)throw new IndexOutOfBoundsException("fromIndex < 0: "+a);var b=JU.BS.wordIndex(a);if(b>=
this.wordsInUse)return a;for(a=~this.words[b]&-1<<a;;){if(0!=a)return 32*b+Integer.numberOfTrailingZeros(a);if(++b==this.wordsInUse)return 32*this.wordsInUse;a=~this.words[b]}},"~N");c(c$,"length",function(){return 0==this.wordsInUse?0:32*(this.wordsInUse-1)+(32-Integer.numberOfLeadingZeros(this.words[this.wordsInUse-1]))});c(c$,"isEmpty",function(){return 0==this.wordsInUse});c(c$,"intersects",function(a){for(var b=Math.min(this.wordsInUse,a.wordsInUse)-1;0<=b;b--)if(0!=(this.words[b]&a.words[b]))return!0;
return!1},"JU.BS");c(c$,"cardinality",function(){for(var a=0,b=0;b<this.wordsInUse;b++)a+=Integer.bitCount(this.words[b]);return a});c(c$,"and",function(a){if(this!==a){for(;this.wordsInUse>a.wordsInUse;)this.words[--this.wordsInUse]=0;for(var b=0;b<this.wordsInUse;b++)this.words[b]&=a.words[b];this.recalculateWordsInUse()}},"JU.BS");c(c$,"or",function(a){if(this!==a){var b=Math.min(this.wordsInUse,a.wordsInUse);this.wordsInUse<a.wordsInUse&&(this.ensureCapacity(a.wordsInUse),this.wordsInUse=a.wordsInUse);
for(var d=0;d<b;d++)this.words[d]|=a.words[d];b<a.wordsInUse&&System.arraycopy(a.words,b,this.words,b,this.wordsInUse-b)}},"JU.BS");c(c$,"xor",function(a){var b=Math.min(this.wordsInUse,a.wordsInUse);this.wordsInUse<a.wordsInUse&&(this.ensureCapacity(a.wordsInUse),this.wordsInUse=a.wordsInUse);for(var d=0;d<b;d++)this.words[d]^=a.words[d];b<a.wordsInUse&&System.arraycopy(a.words,b,this.words,b,a.wordsInUse-b);this.recalculateWordsInUse()},"JU.BS");c(c$,"andNot",function(a){for(var b=Math.min(this.wordsInUse,
a.wordsInUse)-1;0<=b;b--)this.words[b]&=~a.words[b];this.recalculateWordsInUse()},"JU.BS");h(c$,"hashCode",function(){for(var a=1234,b=this.wordsInUse;0<=--b;)a^=this.words[b]*(b+1);return a>>32^a});c(c$,"size",function(){return 32*this.words.length});h(c$,"equals",function(a){if(!p(a,JU.BS))return!1;if(this===a)return!0;if(this.wordsInUse!=a.wordsInUse)return!1;for(var b=0;b<this.wordsInUse;b++)if(this.words[b]!=a.words[b])return!1;return!0},"~O");h(c$,"clone",function(){!this.sizeIsSticky&&this.wordsInUse!=
this.words.length&&this.setLength(this.wordsInUse);return JU.BS.copy(this)});c(c$,"setLength",function(a){var b=D(a,0);System.arraycopy(this.words,0,b,0,Math.min(this.wordsInUse,a));this.words=b},"~N");h(c$,"toString",function(){return JU.BS.escape(this,"{","}")});c$.copy=c(c$,"copy",function(a){var b;b=ja(a);var d=a.wordsInUse;0==d?b.words=JU.BS.emptyBitmap:(b.words=D(b.wordsInUse=d,0),System.arraycopy(a.words,0,b.words,0,d));return b},"JU.BS");c(c$,"cardinalityN",function(a){for(var b=this.cardinality(),
d=this.length();--d>=a;)this.get(d)&&b--;return b},"~N");h(c$,"toJSON",function(){var a=128<this.wordsInUse?this.cardinality():32*this.wordsInUse,a=JU.SB.newN(6*a+2);a.appendC("[");var b=this.nextSetBit(0);if(-1!=b){a.appendI(b);for(b=this.nextSetBit(b+1);0<=b;b=this.nextSetBit(b+1)){var d=this.nextClearBit(b);do a.append(", ").appendI(b);while(++b<d)}}a.appendC("]");return a.toString()});c$.escape=c(c$,"escape",function(a,b,d){if(null==a)return b+"{}"+d;var e=new JU.SB;e.append(b+"{");b=a.length();
for(var c=-1,f=-2,j=-1;++j<=b;){var k=a.get(j);if(j==b||0<=c&&!k){0<=c&&f!=c&&e.append((f==c-1?" ":":")+c);if(j==b)break;c=-1}a.get(j)&&(0>c&&(e.append((-2==f?"":" ")+j),f=j),c=j)}e.append("}").appendC(d);return e.toString()},"JU.BS,~S,~S");c$.unescape=c(c$,"unescape",function(a){var b,d;if(null==a||4>(d=(a=a.trim()).length)||a.equalsIgnoreCase("({null})")||"("!=(b=a.charAt(0))&&"["!=b||a.charAt(d-1)!=("("==b?")":"]")||"{"!=a.charAt(1)||a.indexOf("}")!=d-2)return null;for(var e=d-=2;2<=--e;)if(!Character.isDigit(b=
a.charAt(e))&&" "!=b&&"\t"!=b&&":"!=b)return null;for(var c=d;Character.isDigit(a.charAt(--c)););if(++c==d)c=0;else try{c=Integer.parseInt(a.substring(c,d))}catch(f){if(y(f,NumberFormatException))return null;throw f;}for(var j=JU.BS.newN(c),k=c=-1,l=-2,e=2;e<=d;e++)switch(b=a.charAt(e)){case "\t":case " ":case "}":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 ":":k=c=l;l=-2;break;default:Character.isDigit(b)&&(0>l&&(l=0),l=10*l+(b.charCodeAt(0)-48))}return 0<=
k?null:j},"~S");C(c$,"ADDRESS_BITS_PER_WORD",5,"BITS_PER_WORD",32,"WORD_MASK",4294967295,"emptyBitmap",D(0,0))});n("JU");w(["java.util.Hashtable"],"JU.CU",["JU.P3","$.PT"],function(){c$=B(JU,"CU");c$.toRGBHexString=c(c$,"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 e="00"+Integer.toHexString(d>>8&255),e=e.substring(e.length-2),d="00"+Integer.toHexString(d&255),d=d.substring(d.length-2);return a+e+d},"javajs.api.GenericColor");
c$.toCSSString=c(c$,"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");c$.getArgbFromString=c(c$,"getArgbFromString",function(a){var d=0;if(null==a||0==(d=a.length))return 0;if("["==a.charAt(0)&&"]"==a.charAt(d-1)){var e;if(0<=a.indexOf(",")){e=JU.PT.split(a.substring(1,a.length-1),",");if(3!=e.length)return 0;a=JU.PT.parseFloat(e[0]);d=JU.PT.parseFloat(e[1]);
e=JU.PT.parseFloat(e[2]);return JU.CU.colorTriadToFFRGB(a,d,e)}switch(d){case 9:e="x";break;case 10:e="0x";break;default:return 0}if(1!=a.indexOf(e))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(c){if(y(c,Exception))return 0;throw c;}a=JU.CU.mapJavaScriptColors.get(a.toLowerCase());return null==a?0:a.intValue()},"~S");c$.colorTriadToFFRGB=c(c$,"colorTriadToFFRGB",function(a,d,e){1>=a&&(1>=d&&1>=e)&&(0<a&&(a=256*
a-1),0<d&&(d=256*d-1),0<e&&(e=256*e-1));return JU.CU.rgb(z(a),z(d),z(e))},"~N,~N,~N");c$.rgb=c(c$,"rgb",function(a,d,e){return 4278190080|a<<16|d<<8|e},"~N,~N,~N");c$.colorPtFromString=c(c$,"colorPtFromString",function(a,d){return JU.CU.toRGBpt(JU.CU.getArgbFromString(a),d)},"~S,JU.P3");c$.colorPtFromInt=c(c$,"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");c$.colorPtToFFRGB=c(c$,"colorPtToFFRGB",function(a){return JU.CU.colorTriadToFFRGB(a.x,
a.y,a.z)},"JU.T3");c$.toRGBpt=c(c$,"toRGBpt",function(a,d){d.x=a>>16&255;d.y=a>>8&255;d.z=a&255;return d},"~N,JU.P3");c$.toRGB3f=c(c$,"toRGB3f",function(a,d){d[0]=(a>>16&255)/255;d[1]=(a>>8&255)/255;d[2]=(a&255)/255},"~N,~A");c$.toFFGGGfromRGB=c(c$,"toFFGGGfromRGB",function(a){a=q((2989*(a>>16&255)+5870*(a>>8&255)+1140*(a&255)+5E3)/1E4)&16777215;return JU.CU.rgb(a,a,a)},"~N");c$.rgbToHSL=c(c$,"rgbToHSL",function(a,d){var e=a.x/255,c=a.y/255,f=a.z/255,j=Math.min(e,Math.min(c,f)),k=Math.max(e,Math.max(c,
f)),l=k+j,j=k-j,e=60*(0==j?0:k==e?(c-f)/j+6:k==c?(f-e)/j+2:(e-c)/j+4)%360,c=j/(0==j?1:1>=l?l:2-l);return d?JU.P3.new3(Math.round(10*e)/10,Math.round(1E3*c)/10,Math.round(500*l)/10):JU.P3.new3(e,100*c,50*l)},"JU.P3,~B");c$.hslToRGB=c(c$,"hslToRGB",function(a){var d=a.x/60,e=a.z/100;a=e-(0.5>e?e:1-e)*(a.y/100);var c=2*(e-a),e=JU.CU.toRGB(a,c,d+2),f=JU.CU.toRGB(a,c,d),d=JU.CU.toRGB(a,c,d-2);return JU.P3.new3(Math.round(255*e),Math.round(255*f),Math.round(255*d))},"JU.P3");c$.toRGB=c(c$,"toRGB",function(a,
d,e){return 1>(e+=0>e?6:6<e?-6:0)?a+d*e:3>e?a+d:4>e?a+d*(4-e):a},"~N,~N,~N");C(c$,"colorNames","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 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 pinktint redorange yellowtint".split(" "),
"colorArgbs",[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,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,4294945723,4294919424,4294375029]);c$.mapJavaScriptColors=c$.prototype.mapJavaScriptColors=new java.util.Hashtable;for(var a=JU.CU.colorNames.length;0<=--a;)JU.CU.mapJavaScriptColors.put(JU.CU.colorNames[a],Integer.$valueOf(JU.CU.colorArgbs[a]))});n("JU");w(["java.lang.Boolean"],
"JU.DF",["java.lang.Double","$.Float","JU.PT","$.SB"],function(){c$=B(JU,"DF");c$.setUseNumberLocalization=c(c$,"setUseNumberLocalization",function(a){JU.DF.useNumberLocalization[0]=a?Boolean.TRUE:Boolean.FALSE},"~B");c$.formatDecimalDbl=c(c$,"formatDecimalDbl",function(a,b){return 2147483647==b||-Infinity==a||Infinity==a||Double.isNaN(a)?""+a:JU.DF.formatDecimal(a,b)},"~N,~N");c$.formatDecimal=c(c$,"formatDecimal",function(a,b){if(2147483647==b||-Infinity==a||Infinity==a||Float.isNaN(a))return""+
a;var d;if(0>b){b=-b;b>JU.DF.formattingStrings.length&&(b=JU.DF.formattingStrings.length);if(0==a)return JU.DF.formattingStrings[b]+"E+0";var e;1>Math.abs(a)?(d=10,e=1E-10*a):(d=-10,e=1E10*a);e=(""+e).toUpperCase();var c=e.indexOf("E");d=JU.PT.parseInt(e.substring(c+1))+d;return 0>c?""+a:JU.DF.formatDecimal(JU.PT.parseFloat(e.substring(0,c)),b-1)+"E"+(0<=d?"+":"")+d}b>=JU.DF.formattingStrings.length&&(b=JU.DF.formattingStrings.length-1);e=(""+a).toUpperCase();var f=e.startsWith("-");f&&(e=e.substring(1));
d=e.indexOf(".");if(0>d)return e+JU.DF.formattingStrings[b].substring(1);c=e.indexOf("E-");0<c&&(d=JU.PT.parseInt(e.substring(c+1)),e="0."+"0000000000000000000000000000000000000000".substring(0,-d-1)+e.substring(0,1)+e.substring(2,c),d=1);c=e.indexOf("E");0<c&&(d=JU.PT.parseInt(e.substring(c+1)),e=e.substring(0,1)+e.substring(2,c)+"0000000000000000000000000000000000000000",e=e.substring(0,d+1)+"."+e.substring(d+1),d=e.indexOf("."));var j=e.length,c=b+d+1;if(c<j&&"5"<=e.charAt(c))return JU.DF.formatDecimal(a+
(f?-1:1)*JU.DF.formatAdds[b],b);for(var k=JU.SB.newS(e.substring(0,0==b?d:++d)),c=0;c<b;c++,d++)d<j?k.appendC(e.charAt(d)):k.appendC("0");e=(f?"-":"")+k;return Boolean.TRUE.equals(JU.DF.useNumberLocalization[0])?e:e.$replace(",",".")},"~N,~N");c$.formatDecimalTrimmed=c(c$,"formatDecimalTrimmed",function(a,b){for(var d=JU.DF.formatDecimalDbl(a,b),e=d.length-1;0<=e&&"0"==d.charAt(e);)e--;return d.substring(0,e+1)},"~N,~N");C(c$,"formattingStrings","0 0.0 0.00 0.000 0.0000 0.00000 0.000000 0.0000000 0.00000000 0.000000000".split(" "),
"zeros","0000000000000000000000000000000000000000","formatAdds",[0.5,0.05,0.005,5E-4,5E-5,5E-6,5E-7,5E-8,5E-9,5E-10]);c$.useNumberLocalization=c$.prototype.useNumberLocalization=[Boolean.TRUE]});n("JU");w(["java.lang.Enum"],"JU.Encoding",null,function(){c$=B(JU,"Encoding",Enum);v(c$,"NONE",0,[]);v(c$,"UTF8",1,[]);v(c$,"UTF_16BE",2,[]);v(c$,"UTF_16LE",3,[]);v(c$,"UTF_32BE",4,[]);v(c$,"UTF_32LE",5,[])});n("JU");w(["java.util.ArrayList"],"JU.Lst",null,function(){c$=B(JU,"Lst",java.util.ArrayList);c(c$,
"addLast",function(a){return this.add1(a)},"~O");c(c$,"removeObj",function(a){return this.removeObject(a)},"~O")});n("JU");w(null,"JU.M34",["java.lang.ArrayIndexOutOfBoundsException"],function(){c$=t(function(){this.m22=this.m21=this.m20=this.m12=this.m11=this.m10=this.m02=this.m01=this.m00=0;s(this,arguments)},JU,"M34");c(c$,"setAA33",function(a){var b=a.x,d=a.y,e=a.z;a=a.angle;var c=Math.sqrt(b*b+d*d+e*e),c=1/c,b=b*c,d=d*c,e=e*c,f=Math.cos(a);a=Math.sin(a);c=1-f;this.m00=f+b*b*c;this.m11=f+d*d*
c;this.m22=f+e*e*c;var f=b*d*c,j=e*a;this.m01=f-j;this.m10=f+j;f=b*e*c;j=d*a;this.m02=f+j;this.m20=f-j;f=d*e*c;j=b*a;this.m12=f-j;this.m21=f+j},"JU.A4");c(c$,"rotate",function(a){this.rotate2(a,a)},"JU.T3");c(c$,"rotate2",function(a,b){b.set(this.m00*a.x+this.m01*a.y+this.m02*a.z,this.m10*a.x+this.m11*a.y+this.m12*a.z,this.m20*a.x+this.m21*a.y+this.m22*a.z)},"JU.T3,JU.T3");c(c$,"setM33",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.M34");c(c$,"clear33",function(){this.m00=this.m01=this.m02=this.m10=this.m11=this.m12=this.m20=this.m21=this.m22=0});c(c$,"set33",function(a,b,d){switch(a){case 0:switch(b){case 0:this.m00=d;return;case 1:this.m01=d;return;case 2:this.m02=d;return}break;case 1:switch(b){case 0:this.m10=d;return;case 1:this.m11=d;return;case 2:this.m12=d;return}break;case 2:switch(b){case 0:this.m20=d;return;case 1:this.m21=d;return;case 2:this.m22=d;return}}this.err()},"~N,~N,~N");
c(c$,"get33",function(a,b){switch(a){case 0:switch(b){case 0:return this.m00;case 1:return this.m01;case 2:return this.m02}break;case 1:switch(b){case 0:return this.m10;case 1:return this.m11;case 2:return this.m12}break;case 2:switch(b){case 0:return this.m20;case 1:return this.m21;case 2:return this.m22}}this.err();return 0},"~N,~N");c(c$,"setRow33",function(a,b){switch(a){case 0:this.m00=b[0];this.m01=b[1];this.m02=b[2];break;case 1:this.m10=b[0];this.m11=b[1];this.m12=b[2];break;case 2:this.m20=
b[0];this.m21=b[1];this.m22=b[2];break;default:this.err()}},"~N,~A");c(c$,"getRow33",function(a,b){switch(a){case 0:b[0]=this.m00;b[1]=this.m01;b[2]=this.m02;return;case 1:b[0]=this.m10;b[1]=this.m11;b[2]=this.m12;return;case 2:b[0]=this.m20;b[1]=this.m21;b[2]=this.m22;return}this.err()},"~N,~A");c(c$,"setColumn33",function(a,b){switch(a){case 0:this.m00=b[0];this.m10=b[1];this.m20=b[2];break;case 1:this.m01=b[0];this.m11=b[1];this.m21=b[2];break;case 2:this.m02=b[0];this.m12=b[1];this.m22=b[2];break;
default:this.err()}},"~N,~A");c(c$,"getColumn33",function(a,b){switch(a){case 0:b[0]=this.m00;b[1]=this.m10;b[2]=this.m20;break;case 1:b[0]=this.m01;b[1]=this.m11;b[2]=this.m21;break;case 2:b[0]=this.m02;b[1]=this.m12;b[2]=this.m22;break;default:this.err()}},"~N,~A");c(c$,"add33",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.M34");c(c$,"sub33",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.M34");c(c$,"mul33",function(a){this.m00*=a;this.m01*=a;this.m02*=a;this.m10*=a;this.m11*=a;this.m12*=a;this.m20*=a;this.m21*=a;this.m22*=a},"~N");c(c$,"transpose33",function(){var a=this.m01;this.m01=this.m10;this.m10=a;a=this.m02;this.m02=this.m20;this.m20=a;a=this.m12;this.m12=this.m21;this.m21=a});c(c$,"setXRot",function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=1;this.m10=this.m02=
this.m01=0;this.m11=b;this.m12=-a;this.m20=0;this.m21=a;this.m22=b},"~N");c(c$,"setYRot",function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=b;this.m01=0;this.m02=a;this.m10=0;this.m11=1;this.m12=0;this.m20=-a;this.m21=0;this.m22=b},"~N");c(c$,"setZRot",function(a){var b=Math.cos(a);a=Math.sin(a);this.m00=b;this.m01=-a;this.m02=0;this.m10=a;this.m11=b;this.m21=this.m20=this.m12=0;this.m22=1},"~N");c(c$,"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(c$,"err",function(){throw new ArrayIndexOutOfBoundsException("matrix column/row out of bounds");})});n("JU");w(["JU.M34"],"JU.M3",["JU.T3"],function(){c$=B(JU,"M3",JU.M34,java.io.Serializable);u(c$,function(){E(this,JU.M3,[])});c$.newA9=c(c$,"newA9",function(a){var b=new JU.M3;b.setA(a);return b},"~A");c$.newM3=c(c$,"newM3",function(a){var b=new JU.M3;if(null==a)return b.setScale(1),b;b.m00=a.m00;b.m01=a.m01;b.m02=a.m02;
b.m10=a.m10;b.m11=a.m11;b.m12=a.m12;b.m20=a.m20;b.m21=a.m21;b.m22=a.m22;return b},"JU.M3");c(c$,"setScale",function(a){this.clear33();this.m00=this.m11=this.m22=a},"~N");c(c$,"setM3",function(a){this.setM33(a)},"JU.M34");c(c$,"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(c$,"setElement",function(a,b,d){this.set33(a,b,d)},"~N,~N,~N");c(c$,"getElement",function(a,b){return this.get33(a,b)},"~N,~N");
c(c$,"setRow",function(a,b,d,e){switch(a){case 0:this.m00=b;this.m01=d;this.m02=e;break;case 1:this.m10=b;this.m11=d;this.m12=e;break;case 2:this.m20=b;this.m21=d;this.m22=e;break;default:this.err()}},"~N,~N,~N,~N");c(c$,"setRowV",function(a,b){switch(a){case 0:this.m00=b.x;this.m01=b.y;this.m02=b.z;break;case 1:this.m10=b.x;this.m11=b.y;this.m12=b.z;break;case 2:this.m20=b.x;this.m21=b.y;this.m22=b.z;break;default:this.err()}},"~N,JU.T3");c(c$,"setRowA",function(a,b){this.setRow33(a,b)},"~N,~A");
h(c$,"getRow",function(a,b){this.getRow33(a,b)},"~N,~A");c(c$,"setColumn3",function(a,b,d,e){switch(a){case 0:this.m00=b;this.m10=d;this.m20=e;break;case 1:this.m01=b;this.m11=d;this.m21=e;break;case 2:this.m02=b;this.m12=d;this.m22=e;break;default:this.err()}},"~N,~N,~N,~N");c(c$,"setColumnV",function(a,b){switch(a){case 0:this.m00=b.x;this.m10=b.y;this.m20=b.z;break;case 1:this.m01=b.x;this.m11=b.y;this.m21=b.z;break;case 2:this.m02=b.x;this.m12=b.y;this.m22=b.z;break;default:this.err()}},"~N,JU.T3");
c(c$,"getColumnV",function(a,b){switch(a){case 0:b.x=this.m00;b.y=this.m10;b.z=this.m20;break;case 1:b.x=this.m01;b.y=this.m11;b.z=this.m21;break;case 2:b.x=this.m02;b.y=this.m12;b.z=this.m22;break;default:this.err()}},"~N,JU.T3");c(c$,"setColumnA",function(a,b){this.setColumn33(a,b)},"~N,~A");c(c$,"getColumn",function(a,b){this.getColumn33(a,b)},"~N,~A");c(c$,"add",function(a){this.add33(a)},"JU.M3");c(c$,"sub",function(a){this.sub33(a)},"JU.M3");c(c$,"transpose",function(){this.transpose33()});
c(c$,"transposeM",function(a){this.setM33(a);this.transpose33()},"JU.M3");c(c$,"invertM",function(a){this.setM33(a);this.invert()},"JU.M3");c(c$,"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(c$,"setAsXRotation",function(a){this.setXRot(a);return this},"~N");c(c$,"setAsYRotation",function(a){this.setYRot(a);return this},"~N");c(c$,"setAsZRotation",function(a){this.setZRot(a);return this},"~N");c(c$,"scale",function(a){this.mul33(a)},"~N");c(c$,"mul",function(a){this.mul2(this,a)},"JU.M3");c(c$,"mul2",function(a,b){this.set9(a.m00*b.m00+a.m01*b.m10+a.m02*b.m20,a.m00*b.m01+a.m01*b.m11+a.m02*b.m21,a.m00*b.m02+a.m01*b.m12+a.m02*b.m22,
a.m10*b.m00+a.m11*b.m10+a.m12*b.m20,a.m10*b.m01+a.m11*b.m11+a.m12*b.m21,a.m10*b.m02+a.m11*b.m12+a.m12*b.m22,a.m20*b.m00+a.m21*b.m10+a.m22*b.m20,a.m20*b.m01+a.m21*b.m11+a.m22*b.m21,a.m20*b.m02+a.m21*b.m12+a.m22*b.m22)},"JU.M3,JU.M3");h(c$,"equals",function(a){return!p(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");h(c$,"hashCode",function(){return JU.T3.floatToIntBits0(this.m00)^
JU.T3.floatToIntBits0(this.m01)^JU.T3.floatToIntBits0(this.m02)^JU.T3.floatToIntBits0(this.m10)^JU.T3.floatToIntBits0(this.m11)^JU.T3.floatToIntBits0(this.m12)^JU.T3.floatToIntBits0(this.m20)^JU.T3.floatToIntBits0(this.m21)^JU.T3.floatToIntBits0(this.m22)});c(c$,"setZero",function(){this.clear33()});c(c$,"set9",function(a,b,d,e,c,f,j,k,l){this.m00=a;this.m01=b;this.m02=d;this.m10=e;this.m11=c;this.m12=f;this.m20=j;this.m21=k;this.m22=l},"~N,~N,~N,~N,~N,~N,~N,~N,~N");h(c$,"toString",function(){return"[\n  ["+
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(c$,"setAA",function(a){this.setAA33(a);return this},"JU.A4");c(c$,"setAsBallRotation",function(a,b,d){var e=Math.sqrt(b*b+d*d),c=e*a;if(0==c)return this.setScale(1),!1;a=Math.cos(c);c=Math.sin(c);d=-d/e;b/=e;e=a-1;this.m00=1+e*d*d;this.m01=this.m10=e*d*b;this.m20=-(this.m02=c*d);this.m11=1+e*b*b;this.m21=-(this.m12=c*b);this.m22=a;return!0},"~N,~N,~N");c(c$,"isRotation",
function(){return 0.001>Math.abs(this.determinant3()-1)})});n("JU");w(["JU.M34"],"JU.M4",["JU.T3"],function(){c$=t(function(){this.m33=this.m32=this.m31=this.m30=this.m23=this.m13=this.m03=0;s(this,arguments)},JU,"M4",JU.M34);u(c$,function(){E(this,JU.M4,[])});c$.newA16=c(c$,"newA16",function(a){var b=new JU.M4;b.m00=a[0];b.m01=a[1];b.m02=a[2];b.m03=a[3];b.m10=a[4];b.m11=a[5];b.m12=a[6];b.m13=a[7];b.m20=a[8];b.m21=a[9];b.m22=a[10];b.m23=a[11];b.m30=a[12];b.m31=a[13];b.m32=a[14];b.m33=a[15];return b},
"~A");c$.newM4=c(c$,"newM4",function(a){var b=new JU.M4;if(null==a)return b.setIdentity(),b;b.setToM3(a);b.m03=a.m03;b.m13=a.m13;b.m23=a.m23;b.m30=a.m30;b.m31=a.m31;b.m32=a.m32;b.m33=a.m33;return b},"JU.M4");c$.newMV=c(c$,"newMV",function(a,b){var d=new JU.M4;d.setMV(a,b);return d},"JU.M3,JU.T3");c(c$,"setZero",function(){this.clear33();this.m03=this.m13=this.m23=this.m30=this.m31=this.m32=this.m33=0});c(c$,"setIdentity",function(){this.setZero();this.m00=this.m11=this.m22=this.m33=1});c(c$,"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},"JU.M4");c(c$,"setMV",function(a,b){this.setM33(a);this.setTranslation(b);this.m33=1},"JU.M3,JU.T3");c(c$,"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(c$,"setToAA",function(a){this.setIdentity();this.setAA33(a)},"JU.A4");c(c$,"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(c$,"setTranslation",function(a){this.m03=a.x;this.m13=a.y;this.m23=a.z},"JU.T3");c(c$,"setElement",function(a,b,d){if(3>a&&3>b)this.set33(a,b,d);else{(3<a||3<b)&&this.err();switch(a){case 0:this.m03=d;return;case 1:this.m13=d;return;case 2:this.m23=d;return}switch(b){case 0:this.m30=d;break;case 1:this.m31=d;break;
case 2:this.m32=d;break;case 3:this.m33=d}}},"~N,~N,~N");c(c$,"getElement",function(a,b){if(3>a&&3>b)return this.get33(a,b);if(3<a||3<b)return this.err(),0;switch(a){case 0:return this.m03;case 1:return this.m13;case 2:return this.m23;default:switch(b){case 0:return this.m30;case 1:return this.m31;case 2:return this.m32;default:return this.m33}}},"~N,~N");c(c$,"getTranslation",function(a){a.x=this.m03;a.y=this.m13;a.z=this.m23},"JU.T3");c(c$,"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(c$,"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(c$,"setRowA",function(a,b){3>a&&this.setRow33(a,b);switch(a){case 0:this.m03=b[3];return;case 1:this.m13=b[3];return;case 2:this.m23=b[3];return;case 3:this.m30=b[0];this.m31=b[1];this.m32=b[2];this.m33=
b[3];return}this.err()},"~N,~A");h(c$,"getRow",function(a,b){3>a&&this.getRow33(a,b);switch(a){case 0:b[3]=this.m03;return;case 1:b[3]=this.m13;return;case 2:b[3]=this.m23;return;case 3:b[0]=this.m30;b[1]=this.m31;b[2]=this.m32;b[3]=this.m33;return}this.err()},"~N,~A");c(c$,"setColumn4",function(a,b,d,e,c){0==a?(this.m00=b,this.m10=d,this.m20=e,this.m30=c):1==a?(this.m01=b,this.m11=d,this.m21=e,this.m31=c):2==a?(this.m02=b,this.m12=d,this.m22=e,this.m32=c):3==a?(this.m03=b,this.m13=d,this.m23=e,this.m33=
c):this.err()},"~N,~N,~N,~N,~N");c(c$,"setColumnA",function(a,b){3>a&&this.setColumn33(a,b);switch(a){case 0:this.m30=b[3];break;case 1:this.m31=b[3];break;case 2:this.m32=b[3];break;case 3:this.m03=b[0];this.m13=b[1];this.m23=b[2];this.m33=b[3];break;default:this.err()}},"~N,~A");c(c$,"getColumn",function(a,b){3>a&&this.getColumn33(a,b);switch(a){case 0:b[3]=this.m30;break;case 1:b[3]=this.m31;break;case 2:b[3]=this.m32;break;case 3:b[0]=this.m03;b[1]=this.m13;b[2]=this.m23;b[3]=this.m33;break;default:this.err()}},
"~N,~A");c(c$,"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(c$,"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(c$,"invertM",function(a){this.setM4(a);this.invert()},"JU.M4");c(c$,"invert",function(){var a=this.determinant4();0!=a&&(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))});c(c$,"set",function(a,b,d,e,c,f,j,k,l,h,r,x,A,I,q,n){this.m00=a;this.m01=b;this.m02=d;this.m03=e;this.m10=c;this.m11=f;this.m12=j;this.m13=k;this.m20=l;this.m21=h;this.m22=r;this.m23=x;this.m30=A;this.m31=I;this.m32=q;this.m33=n},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");c(c$,
"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(c$,"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(c$,"mul",function(a){this.mul2(this,a)},"JU.M4");c(c$,"mul2",function(a,b){this.set(a.m00*b.m00+a.m01*b.m10+a.m02*b.m20+a.m03*b.m30,a.m00*b.m01+a.m01*b.m11+a.m02*b.m21+a.m03*b.m31,a.m00*b.m02+a.m01*b.m12+a.m02*b.m22+a.m03*b.m32,a.m00*b.m03+a.m01*b.m13+a.m02*b.m23+a.m03*b.m33,a.m10*b.m00+a.m11*b.m10+a.m12*b.m20+a.m13*b.m30,a.m10*b.m01+a.m11*b.m11+a.m12*b.m21+a.m13*b.m31,a.m10*b.m02+
a.m11*b.m12+a.m12*b.m22+a.m13*b.m32,a.m10*b.m03+a.m11*b.m13+a.m12*b.m23+a.m13*b.m33,a.m20*b.m00+a.m21*b.m10+a.m22*b.m20+a.m23*b.m30,a.m20*b.m01+a.m21*b.m11+a.m22*b.m21+a.m23*b.m31,a.m20*b.m02+a.m21*b.m12+a.m22*b.m22+a.m23*b.m32,a.m20*b.m03+a.m21*b.m13+a.m22*b.m23+a.m23*b.m33,a.m30*b.m00+a.m31*b.m10+a.m32*b.m20+a.m33*b.m30,a.m30*b.m01+a.m31*b.m11+a.m32*b.m21+a.m33*b.m31,a.m30*b.m02+a.m31*b.m12+a.m32*b.m22+a.m33*b.m32,a.m30*b.m03+a.m31*b.m13+a.m32*b.m23+a.m33*b.m33)},"JU.M4,JU.M4");c(c$,"transform",
function(a){this.transform2(a,a)},"JU.T4");c(c$,"transform2",function(a,b){b.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(c$,"rotTrans",function(a){this.rotTrans2(a,a)},"JU.T3");c(c$,"rotTrans2",function(a,b){b.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)},"JU.T3,JU.T3");c(c$,"setAsXYRotation",function(a){this.setIdentity();var b=Math.cos(a);a=Math.sin(a);this.m22=b;this.m23=-a;this.m32=a;this.m33=b;return this},"~N");c(c$,"setAsYZRotation",function(a){this.setIdentity();var b=Math.cos(a);a=Math.sin(a);this.m00=b;this.m03=-a;this.m30=a;this.m33=b;return this},"~N");c(c$,"setAsXZRotation",function(a){this.setIdentity();var b=Math.cos(a);a=Math.sin(a);this.m11=b;this.m13=-a;this.m31=a;this.m33=b;return this},"~N");
h(c$,"equals",function(a){return!p(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");h(c$,"hashCode",function(){return JU.T3.floatToIntBits0(this.m00)^JU.T3.floatToIntBits0(this.m01)^JU.T3.floatToIntBits0(this.m02)^JU.T3.floatToIntBits0(this.m03)^JU.T3.floatToIntBits0(this.m10)^
JU.T3.floatToIntBits0(this.m11)^JU.T3.floatToIntBits0(this.m12)^JU.T3.floatToIntBits0(this.m13)^JU.T3.floatToIntBits0(this.m20)^JU.T3.floatToIntBits0(this.m21)^JU.T3.floatToIntBits0(this.m22)^JU.T3.floatToIntBits0(this.m23)^JU.T3.floatToIntBits0(this.m30)^JU.T3.floatToIntBits0(this.m31)^JU.T3.floatToIntBits0(this.m32)^JU.T3.floatToIntBits0(this.m33)});h(c$,"toString",function(){return"[\n  ["+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+"] ]"})});n("JU");w(["java.io.OutputStream"],"JU.OC","java.io.BufferedWriter $.ByteArrayOutputStream $.FileOutputStream $.OutputStreamWriter JU.Base64 $.SB".split(" "),function(){c$=t(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;s(this,
arguments)},JU,"OC",java.io.OutputStream);c(c$,"setParams",function(a,b,d,e){this.bytePoster=a;this.fileName=b;if(this.$isBase64=";base64,".equals(b))b=null,this.os0=e,e=null;this.os=e;this.isLocalFile=null!=b&&!(b.startsWith("http://")||b.startsWith("https://"));d&&(!this.$isBase64&&null!=e)&&(this.bw=new java.io.BufferedWriter(new java.io.OutputStreamWriter(e)));return this},"javajs.api.BytePoster,~S,~B,java.io.OutputStream");c(c$,"setBytes",function(a){this.bytes=a;return this},"~A");c(c$,"getFileName",
function(){return this.fileName});c(c$,"getName",function(){return null==this.fileName?null:this.fileName.substring(this.fileName.lastIndexOf("/")+1)});c(c$,"getByteCount",function(){return this.byteCount});c(c$,"setType",function(a){this.type=a},"~S");c(c$,"getType",function(){return this.type});c(c$,"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 b=a.getBytes();this.os.write(b,0,b.length);this.byteCount+=
b.length;return this}}catch(d){if(!y(d,java.io.IOException))throw d;}this.byteCount+=a.length;return this},"~S");c(c$,"reset",function(){this.sb=null;try{p(this.os,java.io.FileOutputStream)?(this.os.close(),this.os=new java.io.FileOutputStream(this.fileName)):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(a){if(y(a,Exception))System.out.println(a.toString());else throw a;}this.byteCount=0});
h(c$,"write",function(a,b,d){null==this.os&&(this.os=new java.io.ByteArrayOutputStream);this.os.write(a,b,d);this.byteCount+=d},"~A,~N,~N");h(c$,"writeByteAsInt",function(a){null==this.os&&(this.os=new java.io.ByteArrayOutputStream);this.os.writeByteAsInt(a);this.byteCount++},"~N");c(c$,"cancel",function(){this.isCanceled=!0;this.closeChannel()});c(c$,"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(!y(a,Exception))throw a;}if(this.isCanceled)return this.closed=!0,null;if(null==this.fileName){if(this.$isBase64){var b=this.getBase64();null!=this.os0&&(this.os=this.os0,this.append(b));this.sb=new JU.SB;this.sb.append(b);this.$isBase64=!1;return this.closeChannel()}return null==this.sb?null:this.sb.toString()}this.closed=!0;b=null==this.sb?this.toByteArray():this.sb.toString();"function"==typeof this.fileName?this.fileName(b):
Jmol._doAjax(this.fileName,null,b);return null});c(c$,"isBase64",function(){return this.$isBase64});c(c$,"getBase64",function(){return JU.Base64.getBase64(this.toByteArray()).toString()});c(c$,"toByteArray",function(){return null!=this.bytes?this.bytes:p(this.os,java.io.ByteArrayOutputStream)?this.os.toByteArray():null});c(c$,"close",function(){this.closeChannel()});h(c$,"toString",function(){if(null!=this.bw)try{this.bw.flush()}catch(a){if(!y(a,java.io.IOException))throw a;}return null!=this.sb?
this.closeChannel():this.byteCount+" bytes"});c(c$,"postByteArray",function(){var a=null==this.sb?this.toByteArray():this.sb.toString().getBytes();return this.bytePoster.postByteArray(this.fileName,a)})});n("JU");w(["JU.T3"],"JU.P3",null,function(){c$=B(JU,"P3",JU.T3);u(c$,function(){E(this,JU.P3,[])});c$.newP=c(c$,"newP",function(a){var b=new JU.P3;b.x=a.x;b.y=a.y;b.z=a.z;return b},"JU.T3");c$.new3=c(c$,"new3",function(a,b,d){var e=new JU.P3;e.x=a;e.y=b;e.z=d;return e},"~N,~N,~N")});n("JU");w(["JU.T3i"],
"JU.P3i",null,function(){c$=B(JU,"P3i",JU.T3i);c$.new3=c(c$,"new3",function(a,b,d){var e=new JU.P3i;e.x=a;e.y=b;e.z=d;return e},"~N,~N,~N")});n("JU");w(["JU.T4"],"JU.P4",null,function(){c$=B(JU,"P4",JU.T4);c$.new4=c(c$,"new4",function(a,b,d,e){var c=new JU.P4;c.set4(a,b,d,e);return c},"~N,~N,~N,~N");c$.newPt=c(c$,"newPt",function(a){var b=new JU.P4;b.set4(a.x,a.y,a.z,a.w);return b},"JU.P4");c(c$,"distance4",function(a){var b=this.x-a.x,d=this.y-a.y,e=this.z-a.z;a=this.w-a.w;return Math.sqrt(b*b+d*
d+e*e+a*a)},"JU.P4")});n("JU");w(null,"JU.PT","java.lang.Boolean $.Character $.Float $.Number java.util.Map javajs.api.JSONEncodable JU.AU $.DF $.Lst $.M34 $.M4 $.SB".split(" "),function(){c$=B(JU,"PT");c$.parseInt=c(c$,"parseInt",function(a){return JU.PT.parseIntNext(a,[0])},"~S");c$.parseIntNext=c(c$,"parseIntNext",function(a,b){var d=a.length;return 0>b[0]||b[0]>=d?-2147483648:JU.PT.parseIntChecked(a,d,b)},"~S,~A");c$.parseIntChecked=c(c$,"parseIntChecked",function(a,b,d){var e=!1,c=0,f=d[0];if(0>
f)return-2147483648;for(var j;f<b&&JU.PT.isWhiteSpace(a,f);)++f;var k=!1;f<b&&45==a.charCodeAt(f)&&(k=!0,++f);for(;f<b&&48<=(j=a.charCodeAt(f))&&57>=j;)c=10*c+(j-48),e=!0,++f;e?k&&(c=-c):c=-2147483648;d[0]=f;return c},"~S,~N,~A");c$.isWhiteSpace=c(c$,"isWhiteSpace",function(a,b){var d;return 0<=b&&(" "==(d=a.charAt(b))||"\t"==d||"\n"==d)},"~S,~N");c$.parseFloatChecked=c(c$,"parseFloatChecked",function(a,b,d,e){var c=!1,f=d[0];if(e&&a.indexOf("\n")!=a.lastIndexOf("\n"))return NaN;for(;f<b&&JU.PT.isWhiteSpace(a,
f);)++f;var j=!1;f<b&&"-"==a.charAt(f)&&(++f,j=!0);for(var k=0,l=0,h=0;f<b&&48<=(k=a.charCodeAt(f))&&57>=k;)l=10*l+1*(k-48),++f,c=!0;var r=!1,x=0,A=0==l?-1:0;if(46==k)for(r=!0;++f<b&&48<=(k=a.charCodeAt(f))&&57>=k;){c=!0;if(0>A){if(48==k){A--;continue}A=-A}x<JU.PT.decimalScale.length&&(h=10*h+1*(k-48),x++)}c?0<h?(c=h*JU.PT.decimalScale[x-1],c=1<A?A-2<JU.PT.decimalScale.length?c*JU.PT.decimalScale[A-2]:c*Math.pow(10,1-A):c+l):c=l:c=NaN;l=!1;if(f<b&&(69==k||101==k||68==k)){l=!0;if(++f>=b)return NaN;
k=a.charCodeAt(f);if(43==k&&++f>=b)return NaN;d[0]=f;f=JU.PT.parseIntChecked(a,b,d);if(-2147483648==f)return NaN;0<f&&f<=JU.PT.tensScale.length?c*=JU.PT.tensScale[f-1]:0>f&&-f<=JU.PT.decimalScale.length?c*=JU.PT.decimalScale[-f-1]:0!=f&&(c*=Math.pow(10,f))}else d[0]=f;j&&(c=-c);Infinity==c&&(c=3.4028235E38);return!e||(!l||r)&&JU.PT.checkTrailingText(a,d[0],b)?c:NaN},"~S,~N,~A,~B");c$.checkTrailingText=c(c$,"checkTrailingText",function(a,b,d){for(var e;b<d&&(Character.isWhitespace(e=a.charAt(b))||
";"==e);)++b;return b==d},"~S,~N,~N");c$.parseFloatArray=c(c$,"parseFloatArray",function(a){return JU.PT.parseFloatArrayNext(a,D(1,0),null,null,null)},"~S");c$.parseFloatArrayInfested=c(c$,"parseFloatArrayInfested",function(a,b){for(var d=b.length,e=a.length,c=0,f=0,j=0;0<=j&&j<d&&c<e;j++){for(var k;Float.isNaN(k=JU.PT.parseFloat(a[c++]))&&c<e;);Float.isNaN(k)||(b[f=j]=k);if(c==e)break}return f+1},"~A,~A");c$.parseFloatArrayNext=c(c$,"parseFloatArrayNext",function(a,b,d,e,c){var f=0,j=b[0];0<=j&&
(null!=e&&(f=a.indexOf(e,j),0<=f&&(b[0]=f+e.length)),a=a.substring(b[0]),j=null==c?-1:a.indexOf(c),0>j?j=a.length:a=a.substring(0,j),b[0]+=j+1,a=JU.PT.getTokens(a),null==d&&(d=L(a.length,0)),f=JU.PT.parseFloatArrayInfested(a,d));if(null==d)return L(0,0);for(a=f;a<d.length;a++)d[a]=NaN;return d},"~S,~A,~A,~S,~S");c$.parseFloatRange=c(c$,"parseFloatRange",function(a,b,d){var e=a.length;b>e&&(b=e);return 0>d[0]||d[0]>=b?NaN:JU.PT.parseFloatChecked(a,b,d,!1)},"~S,~N,~A");c$.parseFloatNext=c(c$,"parseFloatNext",
function(a,b){var d=null==a?-1:a.length;return 0>b[0]||b[0]>=d?NaN:JU.PT.parseFloatChecked(a,d,b,!1)},"~S,~A");c$.parseFloatStrict=c(c$,"parseFloatStrict",function(a){var b=a.length;return 0==b?NaN:JU.PT.parseFloatChecked(a,b,[0],!0)},"~S");c$.parseFloat=c(c$,"parseFloat",function(a){return JU.PT.parseFloatNext(a,[0])},"~S");c$.parseIntRadix=c(c$,"parseIntRadix",function(a,b){return Integer.parseIntRadix(a,b)},"~S,~N");c$.getTokens=c(c$,"getTokens",function(a){return JU.PT.getTokensAt(a,0)},"~S");
c$.parseToken=c(c$,"parseToken",function(a){return JU.PT.parseTokenNext(a,[0])},"~S");c$.parseTrimmed=c(c$,"parseTrimmed",function(a){return JU.PT.parseTrimmedRange(a,0,a.length)},"~S");c$.parseTrimmedAt=c(c$,"parseTrimmedAt",function(a,b){return JU.PT.parseTrimmedRange(a,b,a.length)},"~S,~N");c$.parseTrimmedRange=c(c$,"parseTrimmedRange",function(a,b,d){var e=a.length;d<e&&(e=d);return e<b?"":JU.PT.parseTrimmedChecked(a,b,e)},"~S,~N,~N");c$.getTokensAt=c(c$,"getTokensAt",function(a,b){if(null==a)return null;
var d=a.length;if(0>b||b>d)return null;var e=JU.PT.countTokens(a,b),c=Array(e),f=D(1,0);f[0]=b;for(var j=0;j<e;++j)c[j]=JU.PT.parseTokenChecked(a,d,f);return c},"~S,~N");c$.countTokens=c(c$,"countTokens",function(a,b){var d=0;if(null!=a)for(var e=a.length;;){for(;b<e&&JU.PT.isWhiteSpace(a,b);)++b;if(b==e)break;++d;do++b;while(b<e&&!JU.PT.isWhiteSpace(a,b))}return d},"~S,~N");c$.parseTokenNext=c(c$,"parseTokenNext",function(a,b){var d=a.length;return 0>b[0]||b[0]>=d?null:JU.PT.parseTokenChecked(a,
d,b)},"~S,~A");c$.parseTokenRange=c(c$,"parseTokenRange",function(a,b,d){var e=a.length;b>e&&(b=e);return 0>d[0]||d[0]>=b?null:JU.PT.parseTokenChecked(a,b,d)},"~S,~N,~A");c$.parseTokenChecked=c(c$,"parseTokenChecked",function(a,b,d){for(var e=d[0];e<b&&JU.PT.isWhiteSpace(a,e);)++e;for(var c=e;e<b&&!JU.PT.isWhiteSpace(a,e);)++e;d[0]=e;return c==e?null:a.substring(c,e)},"~S,~N,~A");c$.parseTrimmedChecked=c(c$,"parseTrimmedChecked",function(a,b,d){for(;b<d&&JU.PT.isWhiteSpace(a,b);)++b;for(d-=1;d>=b&&
JU.PT.isWhiteSpace(a,d);)--d;return d<b?"":a.substring(b,d+1)},"~S,~N,~N");c$.dVal=c(c$,"dVal",function(a){if(null==a)throw new NumberFormatException("null");var b=parseFloat(a);if(isNaN(b))throw new NumberFormatException("Not a Number : "+a);return b},"~S");c$.fVal=c(c$,"fVal",function(a){return this.dVal(a)},"~S");c$.parseIntRange=c(c$,"parseIntRange",function(a,b,d){var e=a.length;b>e&&(b=e);return 0>d[0]||d[0]>=b?-2147483648:JU.PT.parseIntChecked(a,b,d)},"~S,~N,~A");c$.parseFloatArrayData=c(c$,
"parseFloatArrayData",function(a,b){JU.PT.parseFloatArrayDataN(a,b,b.length)},"~A,~A");c$.parseFloatArrayDataN=c(c$,"parseFloatArrayDataN",function(a,b,d){for(;0<=--d;)b[d]=d>=a.length?NaN:JU.PT.parseFloat(a[d])},"~A,~A,~N");c$.split=c(c$,"split",function(a,b){if(0==a.length)return[];var d=1,e=a.indexOf(b),c,f=b.length;if(0>e||0==f)return c=Array(1),c[0]=a,c;for(var j=a.length-f;0<=e&&e<j;d++)e=a.indexOf(b,e+f);c=Array(d);for(var k=e=0,l=0;0<=(k=a.indexOf(b,e))&&l+1<d;)c[l++]=a.substring(e,k),e=k+
f;a.indexOf(b,j)!=j&&(j+=f);c[l]=a.substring(e,j);return c},"~S,~S");c$.getQuotedStringAt=c(c$,"getQuotedStringAt",function(a,b){return JU.PT.getQuotedStringNext(a,[b])},"~S,~N");c$.getQuotedStringNext=c(c$,"getQuotedStringNext",function(a,b){var d=a,e=b[0];if(0>e||0>(e=d.indexOf('"',e)))return"";b[0]=++e;d=d.substring(e);for(e=-1;++e<d.length&&'"'!=d.charAt(e);)"\\"==d.charAt(e)&&e++;b[0]+=e+1;return d.substring(0,e)},"~S,~A");c$.isOneOf=c(c$,"isOneOf",function(a,b){if(0==b.length)return!1;";"!=
b.charAt(0)&&(b=";"+b+";");return 0>a.indexOf(";")&&0<=b.indexOf(";"+a+";")},"~S,~S");c$.getQuotedAttribute=c(c$,"getQuotedAttribute",function(a,b){var d=a.indexOf(b+"=");return 0>d?null:JU.PT.getQuotedStringAt(a,d)},"~S,~S");c$.approx=c(c$,"approx",function(a,b){return Math.round(a*b)/b},"~N,~N");c$.rep=c(c$,"rep",function(a,b,d){if(null==a||0==b.length||0>a.indexOf(b))return a;var e=0<=d.indexOf(b);do a=a.$replace(b,d);while(!e&&0<=a.indexOf(b));return a},"~S,~S,~S");c$.formatF=c(c$,"formatF",function(a,
b,d,e,c){return JU.PT.formatS(JU.DF.formatDecimal(a,d),b,0,e,c)},"~N,~N,~N,~B,~B");c$.formatD=c(c$,"formatD",function(a,b,d,e,c){return JU.PT.formatS(JU.DF.formatDecimal(a,-1-d),b,0,e,c)},"~N,~N,~N,~B,~B,~B");c$.formatS=c(c$,"formatS",function(a,b,d,e,c){if(null==a)return"";var f=a.length;2147483647!=d&&0<d&&d<f?a=a.substring(0,d):0>d&&0<=f+d&&(a=a.substring(f+d+1));d=b-a.length;if(0>=d)return a;b=c&&!e&&"-"==a.charAt(0);c=c?"0":" ";var j=b?"-":c,f=new JU.SB;e&&f.append(a);for(f.appendC(j);0<--d;)f.appendC(c);
e||f.append(b?c+a.substring(1):a);return f.toString()},"~S,~N,~N,~B,~B");c$.replaceWithCharacter=c(c$,"replaceWithCharacter",function(a,b,d){if(null==a)return null;for(var e=b.length;0<=--e;)a=a.$replace(b.charAt(e),d);return a},"~S,~S,~S");c$.replaceAllCharacters=c(c$,"replaceAllCharacters",function(a,b,d){for(var e=b.length;0<=--e;){var c=b.substring(e,e+1);a=JU.PT.rep(a,c,d)}return a},"~S,~S,~S");c$.trim=c(c$,"trim",function(a,b){if(0==b.length)return a.trim();for(var d=a.length,e=0;e<d&&0<=b.indexOf(a.charAt(e));)e++;
for(d=a.length-1;d>e&&0<=b.indexOf(a.charAt(d));)d--;return a.substring(e,d+1)},"~S,~S");c$.trimQuotes=c(c$,"trimQuotes",function(a){return null!=a&&1<a.length&&a.startsWith('"')&&a.endsWith('"')?a.substring(1,a.length-1):a},"~S");c$.isNonStringPrimitive=c(c$,"isNonStringPrimitive",function(a){return p(a,Number)||p(a,Boolean)},"~O");c$.arrayGet=c(c$,"arrayGet",function(a,b){return a[b]},"~O,~N");c$.toJSON=c(c$,"toJSON",function(a,b){if(null==b)return JU.PT.packageJSON(a,null);if(JU.PT.isNonStringPrimitive(b))return JU.PT.packageJSON(a,
b.toString());for(var d=null,e=null;;){if(p(b,String)){d=b;"undefined"==typeof d&&(d="null");0!=d.indexOf('{"')&&(d=JU.PT.rep(d,'"','\\"'),d=JU.PT.rep(d,"\n","\\n"),d='"'+d+'"');break}if(p(b,javajs.api.JSONEncodable)){if(null==(d=b.toJSON()))d="null";break}e=new JU.SB;if(p(b,java.util.Map)){e.append("{ ");for(var c="",f,j=b.keySet().iterator();j.hasNext()&&((f=j.next())||1);)e.append(c).append(JU.PT.packageJSON(f,JU.PT.toJSON(null,b.get(f)))),c=",";e.append(" }");break}if(p(b,JU.Lst)){e.append("[ ");
f=b.size();for(c=0;c<f;c++)0<c&&e.appendC(","),e.append(JU.PT.toJSON(null,b.get(c)));e.append(" ]");break}if(p(b,JU.M34)){f=p(b,JU.M4)?4:3;var j=L(f,0),k=b;e.appendC("[");for(c=0;c<f;c++)0<c&&e.appendC(","),k.getRow(c,j),e.append(JU.PT.toJSON(null,j));e.appendC("]");break}d=JU.PT.nonArrayString(b);if(null==d){e.append("[");f=JU.AU.getLength(b);for(c=0;c<f;c++)0<c&&e.appendC(","),e.append(JU.PT.toJSON(null,JU.PT.arrayGet(b,c)));e.append("]");break}b=b.toString()}return JU.PT.packageJSON(a,null==d?
e.toString():d)},"~S,~O");c$.nonArrayString=c(c$,"nonArrayString",function(a){a=a.toString();return a.startsWith("[object")&&a.endsWith("Array]")?null:a},"~O");c$.byteArrayToJSON=c(c$,"byteArrayToJSON",function(a){var b=new JU.SB;b.append("[");for(var d=a.length,e=0;e<d;e++)0<e&&b.appendC(","),b.appendI(a[e]&255);b.append("]");return b.toString()},"~A");c$.packageJSON=c(c$,"packageJSON",function(a,b){return null==a?b:'"'+a+'": '+b},"~S,~S");c$.isAS=c(c$,"isAS",function(a){return na(a)},"~O");c$.isASS=
c(c$,"isASS",function(a){return oa(a)},"~O");c$.isAP=c(c$,"isAP",function(a){return pa(a)},"~O");c$.isAF=c(c$,"isAF",function(a){return fa(a)},"~O");c$.isAFloat=c(c$,"isAFloat",function(a){return qa(a)},"~O");c$.isAD=c(c$,"isAD",function(a){return fa(a)},"~O");c$.isADD=c(c$,"isADD",function(a){return ga(a)},"~O");c$.isAB=c(c$,"isAB",function(a){return ea(a)},"~O");c$.isAI=c(c$,"isAI",function(a){return ea(a)},"~O");c$.isAII=c(c$,"isAII",function(a){return ra(a)},"~O");c$.isAFF=c(c$,"isAFF",function(a){return ga(a)},
"~O");c$.isAFFF=c(c$,"isAFFF",function(a){return sa(a)},"~O");c$.escapeUrl=c(c$,"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,"]","%5D");return a=JU.PT.rep(a," ","%20")},"~S");c$.esc=c(c$,"esc",function(a){if(null==a||0==a.length)return'""';for(var b=!1,d=0;10>d;d+=2)if(0<=a.indexOf('\\\\\tt\rr\nn""'.charAt(d))){b=!0;break}if(b)for(;10>d;){for(var b=-1,e='\\\\\tt\rr\nn""'.charAt(d++),c='\\\\\tt\rr\nn""'.charAt(d++),
f=new JU.SB,j=0;0<=(b=a.indexOf(e,b+1));)f.append(a.substring(j,b)).appendC("\\").appendC(c),j=b+1;f.append(a.substring(j,a.length));a=f.toString()}for(d=a.length;0<=--d;)127<a.charCodeAt(d)&&(b="0000"+Integer.toHexString(a.charCodeAt(d)),a=a.substring(0,d)+"\\u"+b.substring(b.length-4)+a.substring(d+1));return'"'+a+'"'},"~S");c$.escF=c(c$,"escF",function(a){a=""+a;0>a.indexOf(".")&&0>a.indexOf("e")&&(a+=".0");return a},"~N");c$.join=c(c$,"join",function(a,b,d){if(a.length<d)return null;var e=new JU.SB;
for(e.append(a[d++]);d<a.length;d++)e.appendC(b).append(a[d]);return e.toString()},"~A,~S,~N");c$.isLike=c(c$,"isLike",function(a,b){var d=a.equals(b);if(d)return!0;var e=b.startsWith("*"),c=b.endsWith("*");return!e&&!c?d:e&&c?1==b.length||a.contains(b.substring(1,b.length-1)):e?a.endsWith(b.substring(1)):a.startsWith(b.substring(0,b.length-1))},"~S,~S");c$.getMapValueNoCase=c(c$,"getMapValueNoCase",function(a,b){if("this".equals(b))return a;var d=a.get(b);if(null==d)for(var e,c=a.entrySet().iterator();c.hasNext()&&
((e=c.next())||1);)if(e.getKey().equalsIgnoreCase(b))return e.getValue();return d},"java.util.Map,~S");c$.getMapSubset=c(c$,"getMapSubset",function(a,b,d){var e=a.get(b);if(null!=e)d.put(b,e);else{var c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);)e=c.getKey(),JU.PT.isLike(e,b)&&d.put(e,c.getValue())}},"java.util.Map,~S,java.util.Map");c$.clean=c(c$,"clean",function(a){return JU.PT.rep(JU.PT.replaceAllCharacters(a," \t\n\r"," "),"  "," ").trim()},"~S");C(c$,"tensScale",[10,100,1E3,
1E4,1E5,1E6],"decimalScale",[0.1,0.01,0.001,1E-4,1E-5,1E-6,1E-7,1E-8,1E-9],"FLOAT_MIN_SAFE",2E-45,"escapable",'\\\\\tt\rr\nn""')});n("JU");c$=t(function(){this.s=this.sb=null;s(this,arguments)},JU,"SB");u(c$,function(){this.s=""});c$.newN=c(c$,"newN",function(){return new JU.SB},"~N");c$.newS=c(c$,"newS",function(a){var b=new JU.SB;b.s=a;return b},"~S");c(c$,"append",function(a){this.s+=a;return this},"~S");c(c$,"appendC",function(a){this.s+=a;return this},"~S");c(c$,"appendI",function(a){this.s+=
a;return this},"~N");c(c$,"appendB",function(a){this.s+=a;return this},"~B");c(c$,"appendF",function(a){a=""+a;0>a.indexOf(".")&&0>a.indexOf("e")&&(a+=".0");this.s+=a;return this},"~N");c(c$,"appendD",function(a){a=""+a;0>a.indexOf(".")&&0>a.indexOf("e")&&(a+=".0");this.s+=a;return this},"~N");c(c$,"appendSB",function(a){this.s+=a.s;return this},"JU.SB");c(c$,"appendO",function(a){null!=a&&(this.s+=a.toString());return this},"~O");c(c$,"appendCB",function(a,b,d){for(;0<=--d;)this.s+=a[b++]},"~A,~N,~N");
h(c$,"toString",function(){return this.s});c(c$,"length",function(){return this.s.length});c(c$,"indexOf",function(a){return this.s.indexOf(a)},"~S");c(c$,"charAt",function(a){return this.s.charAt(a)},"~N");c(c$,"charCodeAt",function(a){return this.s.charCodeAt(a)},"~N");c(c$,"setLength",function(a){this.s=this.s.substring(0,a)},"~N");c(c$,"lastIndexOf",function(a){return this.s.lastIndexOf(a)},"~S");c(c$,"indexOf2",function(a,b){return this.s.indexOf(a,b)},"~S,~N");c(c$,"substring",function(a){return this.s.substring(a)},
"~N");c(c$,"substring2",function(a,b){return this.s.substring(a,b)},"~N,~N");c(c$,"toBytes",function(a,b){0>b&&(b=this.length()-a);for(var d=O(b,0),e=a+b,c=e-a;--e>=a;)d[--c]=this.charAt(e).charCodeAt(0);return d},"~N,~N");n("JU");w(["javajs.api.JSONEncodable"],"JU.T3",["java.lang.Float"],function(){c$=t(function(){this.z=this.y=this.x=0;s(this,arguments)},JU,"T3",null,[javajs.api.JSONEncodable,java.io.Serializable]);c(c$,"set",function(a,b,d){this.x=a;this.y=b;this.z=d},"~N,~N,~N");c(c$,"setA",function(a){this.x=
a[0];this.y=a[1];this.z=a[2]},"~A");c(c$,"setT",function(a){this.x=a.x;this.y=a.y;this.z=a.z},"JU.T3");c(c$,"add2",function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z},"JU.T3,JU.T3");c(c$,"add",function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},"JU.T3");c(c$,"distanceSquared",function(a){var b=this.x-a.x,d=this.y-a.y;a=this.z-a.z;return b*b+d*d+a*a},"JU.T3");c(c$,"distance",function(a){return Math.sqrt(this.distanceSquared(a))},"JU.T3");c(c$,"sub2",function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;
this.z=a.z-b.z},"JU.T3,JU.T3");c(c$,"sub",function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},"JU.T3");c(c$,"scale",function(a){this.x*=a;this.y*=a;this.z*=a},"~N");c(c$,"add3",function(a,b,d){this.x+=a;this.y+=b;this.z+=d},"~N,~N,~N");c(c$,"scaleT",function(a){this.x*=a.x;this.y*=a.y;this.z*=a.z},"JU.T3");c(c$,"scaleAdd2",function(a,b,d){this.x=a*b.x+d.x;this.y=a*b.y+d.y;this.z=a*b.z+d.z},"~N,JU.T3,JU.T3");c(c$,"ave",function(a,b){this.x=(a.x+b.x)/2;this.y=(a.y+b.y)/2;this.z=(a.z+b.z)/2},"JU.T3,JU.T3");
c(c$,"dot",function(a){return this.x*a.x+this.y*a.y+this.z*a.z},"JU.T3");c(c$,"lengthSquared",function(){return this.x*this.x+this.y*this.y+this.z*this.z});c(c$,"length",function(){return Math.sqrt(this.lengthSquared())});c(c$,"normalize",function(){var a=this.length();this.x/=a;this.y/=a;this.z/=a});c(c$,"cross",function(a,b){this.set(a.y*b.z-a.z*b.y,a.z*b.x-a.x*b.z,a.x*b.y-a.y*b.x)},"JU.T3,JU.T3");h(c$,"hashCode",function(){var a;a=31+JU.T3.floatToIntBits0(this.x);a=31*a+JU.T3.floatToIntBits0(this.y);
a=31*a+JU.T3.floatToIntBits0(this.z);return a^a>>32});c$.floatToIntBits0=c(c$,"floatToIntBits0",function(a){return 0==a?0:Float.floatToIntBits(a)},"~N");h(c$,"equals",function(a){return!p(a,JU.T3)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z},"~O");h(c$,"toString",function(){return"{"+this.x+", "+this.y+", "+this.z+"}"});h(c$,"toJSON",function(){return"["+this.x+","+this.y+","+this.z+"]"})});n("JU");c$=t(function(){this.z=this.y=this.x=0;s(this,arguments)},JU,"T3i",null,java.io.Serializable);u(c$,function(){});
c(c$,"set",function(a,b,d){this.x=a;this.y=b;this.z=d},"~N,~N,~N");c(c$,"setT",function(a){this.x=a.x;this.y=a.y;this.z=a.z},"JU.T3i");c(c$,"add",function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},"JU.T3i");c(c$,"scaleAdd",function(a,b,d){this.x=a*b.x+d.x;this.y=a*b.y+d.y;this.z=a*b.z+d.z},"~N,JU.T3i,JU.T3i");h(c$,"hashCode",function(){return this.x^this.y^this.z});h(c$,"equals",function(a){return!p(a,JU.T3i)?!1:this.x==a.x&&this.y==a.y&&this.z==a.z},"~O");h(c$,"toString",function(){return"("+this.x+
", "+this.y+", "+this.z+")"});n("JU");w(["JU.T3"],"JU.T4",null,function(){c$=t(function(){this.w=0;s(this,arguments)},JU,"T4",JU.T3);c(c$,"set4",function(a,b,d,e){this.x=a;this.y=b;this.z=d;this.w=e},"~N,~N,~N,~N");c(c$,"scale4",function(a){this.scale(a);this.w*=a},"~N");h(c$,"hashCode",function(){return JU.T3.floatToIntBits0(this.x)^JU.T3.floatToIntBits0(this.y)^JU.T3.floatToIntBits0(this.z)^JU.T3.floatToIntBits0(this.w)});h(c$,"equals",function(a){return!p(a,JU.T4)?!1:this.x==a.x&&this.y==a.y&&
this.z==a.z&&this.w==a.w},"~O");h(c$,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"});h(c$,"toJSON",function(){return"["+this.x+", "+this.y+", "+this.z+", "+this.w+"]"})});n("JU");w(["JU.T3"],"JU.V3",null,function(){c$=B(JU,"V3",JU.T3);u(c$,function(){E(this,JU.V3,[])});c$.newV=c(c$,"newV",function(a){return JU.V3.new3(a.x,a.y,a.z)},"JU.T3");c$.newVsub=c(c$,"newVsub",function(a,b){return JU.V3.new3(a.x-b.x,a.y-b.y,a.z-b.z)},"JU.T3,JU.T3");c$.new3=c(c$,"new3",function(a,
b,d){var e=new JU.V3;e.x=a;e.y=b;e.z=d;return e},"~N,~N,~N");c(c$,"angle",function(a){var b=this.y*a.z-this.z*a.y,d=this.z*a.x-this.x*a.z,e=this.x*a.y-this.y*a.x,b=Math.sqrt(b*b+d*d+e*e);return Math.abs(Math.atan2(b,this.dot(a)))},"JU.V3")});n("javajs.api");H(javajs.api,"GenericBinaryDocument");n("javajs.api");H(javajs.api,"GenericZipTools");n("javajs.api");H(javajs.api,"GenericLineReader");n("javajs.api");c$=H(javajs.api,"GenericCifDataParser");C(c$,"NONE",-1);n("javajs.api");c$=B(javajs.api,"Interface");
c$.getInterface=c(c$,"getInterface",function(a){try{var b=Z._4Name(a);return null==b?null:b.newInstance()}catch(d){if(y(d,Exception))return System.out.println("Interface.java Error creating instance for "+a+": \n"+d),null;throw d;}},"~S");n("JU");c$=t(function(){this.data=null;s(this,arguments)},JU,"BArray");u(c$,function(a){this.data=a},"~A");h(c$,"equals",function(a){if(p(a,JU.BArray)&&(a=a.data,a.length==this.data.length)){for(var b=0;b<a.length;b++)if(a[b]!=this.data[b])return!1;return!0}return!1},
"~O");c(c$,"hashCode",function(){return this.data.hashCode()});h(c$,"toString",function(){return String.instantialize(this.data)});n("JU");c$=t(function(){this.buf=null;this.ichCurrent=this.cchBuf=0;s(this,arguments)},JU,"LimitedLineReader");u(c$,function(a,b){a.mark(b+1);this.buf=$(b,"\x00");this.cchBuf=Math.max(a.read(this.buf,0,b),0);this.ichCurrent=0;a.reset()},"java.io.BufferedReader,~N");c(c$,"getHeader",function(a){return 0==a?String.instantialize(this.buf):String.instantialize(this.buf,0,
Math.min(this.cchBuf,a))},"~N");c(c$,"readLineWithNewline",function(){for(;this.ichCurrent<this.cchBuf;){for(var a=this.ichCurrent,b=String.fromCharCode(0);this.ichCurrent<this.cchBuf&&"\r"!=(b=this.buf[this.ichCurrent++])&&"\n"!=b;);"\r"==b&&(this.ichCurrent<this.cchBuf&&"\n"==this.buf[this.ichCurrent])&&++this.ichCurrent;b=this.ichCurrent-a;if("#"!=this.buf[a])return String.instantialize(this.buf,a,b)}return""});n("JU");c$=t(function(){this.a=null;this.n=this.m=0;N("JU.Matrix.LUDecomp")||JU.Matrix.$Matrix$LUDecomp$();
s(this,arguments)},JU,"Matrix",null,Cloneable);u(c$,function(a,b,d){this.a=null==a?X(b,d,0):a;this.m=b;this.n=d},"~A,~N,~N");c(c$,"getRowDimension",function(){return this.m});c(c$,"getColumnDimension",function(){return this.n});c(c$,"getArray",function(){return this.a});c(c$,"getArrayCopy",function(){for(var a=X(this.m,this.n,0),b=this.m;0<=--b;)for(var d=this.n;0<=--d;)a[b][d]=this.a[b][d];return a});c(c$,"copy",function(){for(var a=new JU.Matrix(null,this.m,this.n),b=a.a,d=this.m;0<=--d;)for(var e=
this.n;0<=--e;)b[d][e]=this.a[d][e];return a});h(c$,"clone",function(){return this.copy()});c(c$,"getSubmatrix",function(a,b,d,e){for(var c=new JU.Matrix(null,d,e),f=c.a;0<=--d;)for(var j=e;0<=--j;)f[d][j]=this.a[a+d][b+j];return c},"~N,~N,~N,~N");c(c$,"getMatrixSelected",function(a,b){for(var d=new JU.Matrix(null,a.length,b),e=d.a,c=a.length;0<=--c;)for(var f=this.a[a[c]],j=b;0<=--j;)e[c][j]=f[j];return d},"~A,~N");c(c$,"transpose",function(){for(var a=new JU.Matrix(null,this.n,this.m),b=a.a,d=this.m;0<=
--d;)for(var e=this.n;0<=--e;)b[e][d]=this.a[d][e];return a});c(c$,"add",function(a){return this.scaleAdd(a,1)},"JU.Matrix");c(c$,"sub",function(a){return this.scaleAdd(a,-1)},"JU.Matrix");c(c$,"scaleAdd",function(a,b){for(var d=new JU.Matrix(null,this.m,this.n),e=d.a,c=a.a,f=this.m;0<=--f;)for(var j=this.n;0<=--j;)e[f][j]=c[f][j]*b+this.a[f][j];return d},"JU.Matrix,~N");c(c$,"mul",function(a){if(a.m!=this.n)return null;var b=new JU.Matrix(null,this.m,a.n),d=b.a,e=a.a;for(a=a.n;0<=--a;)for(var c=
this.m;0<=--c;){for(var f=this.a[c],j=0,k=this.n;0<=--k;)j+=f[k]*e[k][a];d[c][a]=j}return b},"JU.Matrix");c(c$,"inverse",function(){return M(JU.Matrix.LUDecomp,this,null,this.m,this.n).solve(JU.Matrix.identity(this.m,this.m),this.n)});c(c$,"trace",function(){for(var a=0,b=Math.min(this.m,this.n);0<=--b;)a+=this.a[b][b];return a});c$.identity=c(c$,"identity",function(a,b){for(var d=new JU.Matrix(null,a,b),e=d.a,c=Math.min(a,b);0<=--c;)e[c][c]=1;return d},"~N,~N");c(c$,"getRotation",function(){return this.getSubmatrix(0,
0,this.m-1,this.n-1)});c(c$,"getTranslation",function(){return this.getSubmatrix(0,this.n-1,this.m-1,1)});c$.newT=c(c$,"newT",function(a,b){return b?new JU.Matrix([[a.x],[a.y],[a.z]],3,1):new JU.Matrix([[a.x,a.y,a.z]],1,3)},"JU.T3,~B");h(c$,"toString",function(){for(var a="[\n",b=0;b<this.m;b++){for(var a=a+"  [",d=0;d<this.n;d++)a+=" "+this.a[b][d];a+="]\n"}return a+"]"});c$.$Matrix$LUDecomp$=function(){G(self.c$);c$=t(function(){Q(this,arguments);this.piv=this.LU=null;this.pivsign=0;s(this,arguments)},
JU.Matrix,"LUDecomp");u(c$,function(a,b){this.LU=this.b$["JU.Matrix"].getArrayCopy();this.piv=D(a,0);for(var d=a;0<=--d;)this.piv[d]=d;this.pivsign=1;for(var e,d=X(a,0),c=0;c<b;c++){for(var f=a;0<=--f;)d[f]=this.LU[f][c];for(var j=a;0<=--j;){e=this.LU[j];for(var f=Math.min(j,c),k=0,l=f;0<=--l;)k+=e[l]*d[l];e[c]=d[j]-=k}f=c;for(k=a;--k>c;)Math.abs(d[k])>Math.abs(d[f])&&(f=k);if(f!=c){for(l=b;0<=--l;)e=this.LU[f][l],this.LU[f][l]=this.LU[c][l],this.LU[c][l]=e;e=this.piv[f];this.piv[f]=this.piv[c];this.piv[c]=
e;this.pivsign=-this.pivsign}if((new Boolean(c<a&0!=this.LU[c][c])).valueOf())for(l=a;--l>c;)this.LU[l][c]/=this.LU[c][c]}},"~N,~N");c(c$,"solve",function(a,b){for(var d=0;d<b;d++)if(0==this.LU[d][d])return null;for(var d=a.n,e=a.getMatrixSelected(this.piv,d),c=e.a,f=0;f<b;f++)for(var j=f+1;j<b;j++)for(var k=0;k<d;k++)c[j][k]-=c[f][k]*this.LU[j][f];for(f=b;0<=--f;){for(j=d;0<=--j;)c[f][j]/=this.LU[f][f];for(j=f;0<=--j;)for(k=d;0<=--k;)c[j][k]-=c[f][k]*this.LU[j][f]}return e},"JU.Matrix,~N");c$=F()};
n("JU");w(["JU.P4"],"JU.Quat",["java.lang.Float","JU.A4","$.M3","$.P3","$.V3"],function(){c$=t(function(){this.q3=this.q2=this.q1=this.q0=0;this.mat=null;s(this,arguments)},JU,"Quat");u(c$,function(){this.q0=1});c$.newQ=c(c$,"newQ",function(a){var b=new JU.Quat;b.set(a);return b},"JU.Quat");c$.newVA=c(c$,"newVA",function(a,b){var d=new JU.Quat;d.setTA(a,b);return d},"JU.T3,~N");c$.newM=c(c$,"newM",function(a){var b=new JU.Quat;b.setM(JU.M3.newM3(a));return b},"JU.M3");c$.newAA=c(c$,"newAA",function(a){var b=
new JU.Quat;b.setAA(a);return b},"JU.A4");c$.newP4=c(c$,"newP4",function(a){var b=new JU.Quat;b.setP4(a);return b},"JU.P4");c$.new4=c(c$,"new4",function(a,b,d,e){var c=new JU.Quat;if(-1>a)return c.q0=-1,c;if(1<a)return c.q0=1,c;c.q0=a;c.q1=b;c.q2=d;c.q3=e;return c},"~N,~N,~N,~N");c(c$,"set",function(a){this.q0=a.q0;this.q1=a.q1;this.q2=a.q2;this.q3=a.q3},"JU.Quat");c(c$,"setP4",function(a){var b=null==a?0:a.distance4(JU.Quat.qZero);0==b?this.q0=1:(this.q0=a.w/b,this.q1=a.x/b,this.q2=a.y/b,this.q3=
a.z/b)},"JU.P4");c(c$,"setTA",function(a,b){if(0==a.x&&0==a.y&&0==a.z)this.q0=1;else{var d=Math.sin(0.017453292519943295*(b/2))/Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z);this.q0=Math.cos(0.017453292519943295*(b/2));this.q1=a.x*d;this.q2=a.y*d;this.q3=a.z*d}},"JU.T3,~N");c(c$,"setAA",function(a){a=JU.A4.newAA(a);0==a.angle&&(a.y=1);this.setM((new JU.M3).setAA(a))},"JU.A4");c(c$,"setM",function(a){this.mat=a;var b=a.m00+a.m11+a.m22,d,e,c;0.5<=b?(b=Math.sqrt(1+b),d=(a.m21-a.m12)/b,e=(a.m02-a.m20)/b,c=(a.m10-
a.m01)/b):0.5<=(d=a.m00+a.m00-b)?(d=Math.sqrt(1+d),b=(a.m21-a.m12)/d,e=(a.m10+a.m01)/d,c=(a.m20+a.m02)/d):0.5<=(d=a.m11+a.m11-b)||a.m11>a.m22?(e=Math.sqrt(1+d),b=(a.m02-a.m20)/e,d=(a.m10+a.m01)/e,c=(a.m21+a.m12)/e):(c=Math.sqrt(1+a.m22+a.m22-b),b=(a.m10-a.m01)/c,d=(a.m20+a.m02)/c,e=(a.m21+a.m12)/c);this.q0=0.5*b;this.q1=0.5*d;this.q2=0.5*e;this.q3=0.5*c},"JU.M3");c(c$,"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");
c$.getQuaternionFrame=c(c$,"getQuaternionFrame",function(a,b,d){b=JU.V3.newV(b);d=JU.V3.newV(d);null!=a&&(b.sub(a),d.sub(a));return JU.Quat.getQuaternionFrameV(b,d,null,!1)},"JU.P3,JU.T3,JU.T3");c$.getQuaternionFrameV=c(c$,"getQuaternionFrameV",function(a,b,d,e){null==d&&(d=new JU.V3,d.cross(a,b),e&&a.cross(b,d));b=new JU.V3;b.cross(d,a);a.normalize();b.normalize();d.normalize();e=new JU.M3;e.setColumnV(0,a);e.setColumnV(1,b);e.setColumnV(2,d);return JU.Quat.newM(e)},"JU.V3,JU.V3,JU.V3,~B");c(c$,
"getMatrix",function(){null==this.mat&&this.setMatrix();return this.mat});c(c$,"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(c$,"add",function(a){return JU.Quat.newVA(this.getNormal(),this.getTheta()+a)},"~N");c(c$,"mul",function(a){return 1==a?JU.Quat.new4(this.q0,this.q1,this.q2,this.q3):JU.Quat.newVA(this.getNormal(),this.getTheta()*a)},"~N");c(c$,"mulQ",function(a){return JU.Quat.new4(this.q0*a.q0-this.q1*a.q1-this.q2*a.q2-this.q3*a.q3,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)},"JU.Quat");c(c$,"div",function(a){return this.mulQ(a.inv())},"JU.Quat");c(c$,"divLeft",function(a){return this.inv().mulQ(a)},"JU.Quat");c(c$,"dot",function(a){return this.q0*a.q0+this.q1*a.q1+this.q2*a.q2+this.q3*a.q3},"JU.Quat");c(c$,"inv",function(){return JU.Quat.new4(this.q0,-this.q1,-this.q2,-this.q3)});c(c$,"negate",function(){return JU.Quat.new4(-this.q0,-this.q1,-this.q2,
-this.q3)});c(c$,"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(c$,"getVector",function(a){return this.getVectorScaled(a,1)},"~N");c(c$,"getVectorScaled",function(a,b){if(-1==a)return b*=this.getFixFactor(),JU.V3.new3(this.q1*b,this.q2*b,this.q3*b);null==this.mat&&this.setMatrix();var d=new JU.V3;this.mat.getColumnV(a,d);1!=b&&d.scale(b);return d},"~N,~N");c(c$,"getNormal",function(){var a=JU.Quat.getRawNormal(this);a.scale(this.getFixFactor());
return a});c$.getRawNormal=c(c$,"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(c$,"getTheta",function(){return 360*Math.acos(Math.abs(this.q0))/3.141592653589793});c(c$,"getThetaRadians",function(){return 2*Math.acos(Math.abs(this.q0))});c(c$,"getNormalDirected",function(a){var b=this.getNormal();0>b.x*a.x+b.y*a.y+b.z*a.z&&b.scale(-1);return b},"JU.V3");c(c$,"get3dProjection",function(a){a.set(this.q1,this.q2,
this.q3);return a},"JU.V3");c(c$,"getThetaDirected",function(a){var b=this.getTheta(),d=this.getNormal();0>a.x*this.q1+a.y*this.q2+a.z*this.q3&&(d.scale(-1),b=-b);a.set4(d.x,d.y,d.z,b);return a},"JU.P4");c(c$,"getThetaDirectedV",function(a){var b=this.getTheta(),d=this.getNormal();0>a.x*this.q1+a.y*this.q2+a.z*this.q3&&(d.scale(-1),b=-b);return b},"JU.V3");c(c$,"toPoint4f",function(){return JU.P4.new4(this.q1,this.q2,this.q3,this.q0)});c(c$,"toAxisAngle4f",function(){var a=2*Math.acos(Math.abs(this.q0)),
b=Math.sin(a/2),d=this.getNormal();0>b&&(d.scale(-1),a=3.141592653589793-a);return JU.A4.newVA(d,a)});c(c$,"transformPt",function(a){null==this.mat&&this.setMatrix();a=JU.P3.newP(a);this.mat.rotate(a);return a},"JU.P3");c(c$,"transformP2",function(a,b){null==this.mat&&this.setMatrix();this.mat.rotate2(a,b);return b},"JU.T3,JU.T3");c(c$,"transform",function(a){null==this.mat&&this.setMatrix();a=JU.V3.newV(a);this.mat.rotate(a);return a},"JU.V3");c(c$,"leftDifference",function(a){a=0>this.dot(a)?a.negate():
a;return this.inv().mulQ(a)},"JU.Quat");c(c$,"rightDifference",function(a){a=0>this.dot(a)?a.negate():a;return this.mulQ(a.inv())},"JU.Quat");h(c$,"toString",function(){return"{"+this.q1+" "+this.q2+" "+this.q3+" "+this.q0+"}"});c$.div=c(c$,"div",function(a,b,d,e){var c;if(null==a||null==b||0==(c=Math.min(a.length,b.length)))return null;0<d&&c>d&&(c=d);d=Array(c);for(var f=0;f<c;f++){if(null==a[f]||null==b[f])return null;d[f]=e?a[f].divLeft(b[f]):a[f].div(b[f])}return d},"~A,~A,~N,~B");c$.sphereMean=
c(c$,"sphereMean",function(a,b,d){if(null==a||0==a.length)return new JU.Quat;null==b&&(b=L(1,0));if(1==a.length)return b[0]=0,JU.Quat.newQ(a[0]);for(var e=3.4028235E38,c=3.4028235E38,f=JU.Quat.simpleAverage(a);e>d&&0!=c;)f=JU.Quat.newMean(a,f),b[0]=JU.Quat.stdDev(a,f),e=Math.abs(b[0]-c),c=b[0];return f},"~A,~A,~N");c$.simpleAverage=c(c$,"simpleAverage",function(a){var b=JU.V3.new3(0,0,1),d=a[0].getNormal();b.add(d);for(var e=a.length;0<=--e;)b.add(a[e].getNormalDirected(b));b.sub(d);b.normalize();
for(var c=0,e=a.length;0<=--e;)c+=Math.abs(a[e].get3dProjection(d).dot(b));0!=c&&b.scale(c/a.length);c=Math.sqrt(1-b.lengthSquared());Float.isNaN(c)&&(c=0);return JU.Quat.newP4(JU.P4.new4(b.x,b.y,b.z,c))},"~A");c$.newMean=c(c$,"newMean",function(a,b){for(var d=new JU.V3,e,c,f=a.length;0<=--f;)e=a[f],c=e.div(b),e=c.getNormal(),e.scale(c.getTheta()),d.add(e);d.scale(1/a.length);return JU.Quat.newVA(d,d.length()).mulQ(b)},"~A,JU.Quat");c$.stdDev=c(c$,"stdDev",function(a,b){for(var d=0,e=a.length,c=e;0<=
--c;)var f=a[c].div(b).getTheta(),d=d+f*f;return Math.sqrt(d/e)},"~A,JU.Quat");c(c$,"getEulerZYZ",function(){var a,b,d;a=Math.atan2(2*(this.q2*this.q3-this.q0*this.q1),2*(this.q1*this.q3+this.q0*this.q2));b=Math.acos(this.q3*this.q3-this.q2*this.q2-this.q1*this.q1+this.q0*this.q0);d=Math.atan2(2*(this.q2*this.q3+this.q0*this.q1),2*(this.q0*this.q2-this.q1*this.q3));return[a/0.017453292519943295,b/0.017453292519943295,d/0.017453292519943295]});c(c$,"getEulerZXZ",function(){var a,b,d;a=Math.atan2(2*
(this.q1*this.q3+this.q0*this.q2),2*(this.q0*this.q1-this.q2*this.q3));b=Math.acos(this.q3*this.q3-this.q2*this.q2-this.q1*this.q1+this.q0*this.q0);d=Math.atan2(2*(this.q1*this.q3-this.q0*this.q2),2*(this.q2*this.q3+this.q0*this.q1));return[a/0.017453292519943295,b/0.017453292519943295,d/0.017453292519943295]});c$.qZero=c$.prototype.qZero=new JU.P4;C(c$,"RAD_PER_DEG",0.017453292519943295)});n("JU");w(["javajs.api.GenericLineReader"],"JU.Rdr","java.io.BufferedInputStream $.BufferedReader $.ByteArrayInputStream $.InputStreamReader $.StringReader javajs.api.Interface JU.AU $.Base64 $.Encoding $.SB".split(" "),
function(){c$=t(function(){this.reader=null;s(this,arguments)},JU,"Rdr",null,javajs.api.GenericLineReader);u(c$,function(a){this.reader=a},"java.io.BufferedReader");h(c$,"readNextLine",function(){return this.reader.readLine()});c$.getCifParser=c(c$,"getCifParser",function(){return javajs.api.Interface.getInterface("JU.CifDataParser")});c$.readCifData=c(c$,"readCifData",function(a){return JU.Rdr.getCifParser().set(null,a).getAllCifData()},"java.io.BufferedReader");c$.fixUTF=c(c$,"fixUTF",function(a){var b=
JU.Rdr.getUTFEncoding(a);if(b!==JU.Encoding.NONE)try{var d=String.instantialize(a,b.name().$replace("_","-"));switch(b){case JU.Encoding.UTF8:case JU.Encoding.UTF_16BE:case JU.Encoding.UTF_16LE:d=d.substring(1)}return d}catch(e){if(y(e,java.io.UnsupportedEncodingException))System.out.println(e);else throw e;}return String.instantialize(a)},"~A");c$.getUTFEncoding=c(c$,"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");c$.getUTFEncodingForStream=c(c$,"getUTFEncodingForStream",function(a){a.resetStream();var b=O(4,0);b[3]=1;try{a.mark(5)}catch(d){if(y(d,Exception))return JU.Encoding.NONE;throw d;}a.read(b,0,4);a.reset();return JU.Rdr.getUTFEncoding(b)},"java.io.BufferedInputStream");
c$.isBase64=c(c$,"isBase64",function(a){return 0==a.indexOf(";base64,")},"JU.SB");c$.isCompoundDocumentS=c(c$,"isCompoundDocumentS",function(a){return JU.Rdr.isCompoundDocumentB(JU.Rdr.getMagic(a,8))},"java.io.InputStream");c$.isCompoundDocumentB=c(c$,"isCompoundDocumentB",function(a){return 8<=a.length&&208==a[0]&&207==a[1]&&17==a[2]&&224==a[3]&&161==a[4]&&177==a[5]&&26==a[6]&&225==a[7]},"~A");c$.isGzipS=c(c$,"isGzipS",function(a){return JU.Rdr.isGzipB(JU.Rdr.getMagic(a,2))},"java.io.InputStream");
c$.isGzipB=c(c$,"isGzipB",function(a){return null!=a&&2<=a.length&&31==a[0]&&139==a[1]},"~A");c$.isPickleS=c(c$,"isPickleS",function(a){return JU.Rdr.isPickleB(JU.Rdr.getMagic(a,2))},"java.io.InputStream");c$.isPickleB=c(c$,"isPickleB",function(a){return null!=a&&2<=a.length&&125==a[0]&&113==a[1]},"~A");c$.isPngZipStream=c(c$,"isPngZipStream",function(a){return JU.Rdr.isPngZipB(JU.Rdr.getMagic(a,55))},"java.io.InputStream");c$.isPngZipB=c(c$,"isPngZipB",function(a){return 0==a[50]&&80==a[51]&&78==
a[52]&&71==a[53]&&74==a[54]},"~A");c$.isZipS=c(c$,"isZipS",function(a){return JU.Rdr.isZipB(JU.Rdr.getMagic(a,4))},"java.io.InputStream");c$.isZipB=c(c$,"isZipB",function(a){return 4<=a.length&&80==a[0]&&75==a[1]&&3==a[2]&&4==a[3]},"~A");c$.getMagic=c(c$,"getMagic",function(a,b){var d=O(b,0);a.resetStream();try{a.mark(b+1),a.read(d,0,b)}catch(e){if(!y(e,java.io.IOException))throw e;}try{a.reset()}catch(c){if(!y(c,java.io.IOException))throw c;}return d},"java.io.InputStream,~N");c$.getBIS=c(c$,"getBIS",
function(a){return new java.io.BufferedInputStream(new java.io.ByteArrayInputStream(a))},"~A");c$.getBR=c(c$,"getBR",function(a){return new java.io.BufferedReader(new java.io.StringReader(a))},"~S");c$.getUnzippedInputStream=c(c$,"getUnzippedInputStream",function(a){for(;JU.Rdr.isGzipS(a);)a=new java.io.BufferedInputStream(JU.Rdr.newGZIPInputStream(a));return a},"java.io.BufferedInputStream");c$.getBytesFromSB=c(c$,"getBytesFromSB",function(a){return JU.Rdr.isBase64(a)?JU.Base64.decodeBase64(a.substring(8)):
a.toBytes(0,-1)},"JU.SB");c$.getStreamAsBytes=c(c$,"getStreamAsBytes",function(a,b){for(var d=O(1024,0),e=null==b?O(4096,0):null,c=0,f=0;0<(c=a.read(d,0,1024));)f+=c,null==b?(f>=e.length&&(e=JU.AU.ensureLengthByte(e,2*f)),System.arraycopy(d,0,e,f-c,c)):b.write(d,0,c);a.close();return null==b?JU.AU.arrayCopyByte(e,f):f+" bytes"},"java.io.BufferedInputStream,JU.OC");c$.getBufferedReader=c(c$,"getBufferedReader",function(a,b){if(JU.Rdr.getUTFEncodingForStream(a)===JU.Encoding.NONE)return new java.io.BufferedReader(new java.io.InputStreamReader(a,
null==b?"UTF-8":b));var d=JU.Rdr.getLimitedStreamBytes(a,-1);a.close();return JU.Rdr.getBR(null==b?JU.Rdr.fixUTF(d):String.instantialize(d,b))},"java.io.BufferedInputStream,~S");c$.getLimitedStreamBytes=c(c$,"getLimitedStreamBytes",function(a,b){var d=0<b&&1024>b?b:1024,e=O(d,0),c=O(0>b?4096:b,0),f=0,j=0;for(0>b&&(b=2147483647);j<b&&0<(f=a.read(e,0,d));)j+=f,j>c.length&&(c=JU.AU.ensureLengthByte(c,2*j)),System.arraycopy(e,0,c,j-f,f),2147483647!=b&&j+d>c.length&&(d=c.length-j);if(j==c.length)return c;
e=O(j,0);System.arraycopy(c,0,e,0,j);return e},"java.io.InputStream,~N");c$.StreamToUTF8String=c(c$,"StreamToUTF8String",function(a){var b=Array(1);try{JU.Rdr.readAllAsString(JU.Rdr.getBufferedReader(a,"UTF-8"),-1,!0,b,0)}catch(d){if(!y(d,java.io.IOException))throw d;}return b[0]},"java.io.BufferedInputStream");c$.readAllAsString=c(c$,"readAllAsString",function(a,b,d,e,c){try{var f=JU.SB.newN(8192),j;if(0>b){if(j=a.readLine(),d||null!=j&&0>j.indexOf("\x00")&&(4!=j.length||65533!=j.charCodeAt(0)||
1!=j.indexOf("PNG")))for(f.append(j).appendC("\n");null!=(j=a.readLine());)f.append(j).appendC("\n")}else{d=0;for(var k;d<b&&null!=(j=a.readLine());){if(b-d<(k=j.length)+1)j=j.substring(0,b-d-1);f.append(j).appendC("\n");d+=k+1}}a.close();e[c]=f.toString();return!0}catch(l){if(y(l,Exception))return e[c]=l.toString(),!1;throw l;}},"java.io.BufferedReader,~N,~B,~A,~N");c$.getPngZipPointAndCount=c(c$,"getPngZipPointAndCount",function(a,b){a.mark(75);try{var d=JU.Rdr.getLimitedStreamBytes(a,74);a.reset();
for(var e=0,c=64,f=1;54<--c;f*=10)e+=(d[c]-48)*f;for(var j=0,c=74,f=1;64<--c;f*=10)j+=(d[c]-48)*f;b[0]=e;b[1]=j}catch(k){b[1]=0}},"java.io.BufferedInputStream,~A");c$.getPngZipStream=c(c$,"getPngZipStream",function(a,b){if(!JU.Rdr.isPngZipStream(a))return a;var d=O(0,0);a.mark(75);try{var e=D(2,0);JU.Rdr.getPngZipPointAndCount(a,e);if(0!=e[1]){for(var c=e[0];0<c;)c-=a.skip(c);if(!b)return a;d=JU.Rdr.getLimitedStreamBytes(a,e[1])}}catch(f){}finally{try{b&&a.close()}catch(j){if(!y(j,Exception))throw j;
}}return JU.Rdr.getBIS(d)},"java.io.BufferedInputStream,~B");c$.getJzt=c(c$,"getJzt",function(){return null==JU.Rdr.jzt?JU.Rdr.jzt=javajs.api.Interface.getInterface("JU.ZipTools"):JU.Rdr.jzt});c$.readFileAsMap=c(c$,"readFileAsMap",function(a,b,d){JU.Rdr.getJzt().readFileAsMap(a,b,d)},"java.io.BufferedInputStream,java.util.Map,~S");c$.getZipDirectoryAsStringAndClose=c(c$,"getZipDirectoryAsStringAndClose",function(a){return JU.Rdr.getJzt().getZipDirectoryAsStringAndClose(a)},"java.io.BufferedInputStream");
c$.newGZIPInputStream=c(c$,"newGZIPInputStream",function(a){return JU.Rdr.getJzt().newGZIPInputStream(a)},"java.io.BufferedInputStream");c$.newZipInputStream=c(c$,"newZipInputStream",function(a){return JU.Rdr.getJzt().newZipInputStream(a)},"java.io.InputStream");c$.getZipFileDirectory=c(c$,"getZipFileDirectory",function(a,b,d,e){return JU.Rdr.getJzt().getZipFileDirectory(a,b,d,e)},"java.io.BufferedInputStream,~A,~N,~B");c$.getZipDirectoryAndClose=c(c$,"getZipDirectoryAndClose",function(a,b){return JU.Rdr.getJzt().getZipDirectoryAndClose(a,
b)},"java.io.BufferedInputStream,~S");c$.getAllZipData=c(c$,"getAllZipData",function(a,b,d,e,c){JU.Rdr.getJzt().getAllZipData(a,b,d,e,c)},"java.io.BufferedInputStream,~A,~S,~S,java.util.Map");c$.getZipFileContentsAsBytes=c(c$,"getZipFileContentsAsBytes",function(a,b,d){return JU.Rdr.getJzt().getZipFileContentsAsBytes(a,b,d)},"java.io.BufferedInputStream,~A,~N");c$.addZipEntry=c(c$,"addZipEntry",function(a,b){JU.Rdr.getJzt().addZipEntry(a,b)},"~O,~S");c$.closeZipEntry=c(c$,"closeZipEntry",function(a){JU.Rdr.getJzt().closeZipEntry(a)},
"~O");c$.getZipOutputStream=c(c$,"getZipOutputStream",function(a){return JU.Rdr.getJzt().getZipOutputStream(a)},"~O");c$.getCrcValue=c(c$,"getCrcValue",function(a){return JU.Rdr.getJzt().getCrcValue(a)},"~A");c$.getZipRoot=c(c$,"getZipRoot",function(a){var b=a.indexOf("|");return 0>b?a:a.substring(0,b)},"~S");C(c$,"jzt",null)});n("JU");w(null,"JU.T3d",["java.lang.Double"],function(){c$=t(function(){this.z=this.y=this.x=0;s(this,arguments)},JU,"T3d",null,java.io.Serializable);u(c$,function(){});c(c$,
"set",function(a,b,d){this.x=a;this.y=b;this.z=d},"~N,~N,~N");c(c$,"setA",function(a){this.x=a[0];this.y=a[1];this.z=a[2]},"~A");c(c$,"setT",function(a){this.x=a.x;this.y=a.y;this.z=a.z},"JU.T3d");c(c$,"add2",function(a,b){this.x=a.x+b.x;this.y=a.y+b.y;this.z=a.z+b.z},"JU.T3d,JU.T3d");c(c$,"add",function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z},"JU.T3d");c(c$,"sub2",function(a,b){this.x=a.x-b.x;this.y=a.y-b.y;this.z=a.z-b.z},"JU.T3d,JU.T3d");c(c$,"sub",function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z},
"JU.T3d");c(c$,"scale",function(a){this.x*=a;this.y*=a;this.z*=a},"~N");c(c$,"scaleAdd",function(a,b,d){this.x=a*b.x+d.x;this.y=a*b.y+d.y;this.z=a*b.z+d.z},"~N,JU.T3d,JU.T3d");h(c$,"hashCode",function(){var a=JU.T3d.doubleToLongBits0(this.x),b=JU.T3d.doubleToLongBits0(this.y),d=JU.T3d.doubleToLongBits0(this.z);return a^a>>32^b^b>>32^d^d>>32});c$.doubleToLongBits0=c(c$,"doubleToLongBits0",function(a){return 0==a?0:Double.doubleToLongBits(a)},"~N");h(c$,"equals",function(a){return!p(a,JU.T3d)?!1:this.x==
a.x&&this.y==a.y&&this.z==a.z},"~O");h(c$,"toString",function(){return"("+this.x+", "+this.y+", "+this.z+")"})});n("JU");w(["JU.T3d"],"JU.V3d",null,function(){c$=B(JU,"V3d",JU.T3d);c(c$,"cross",function(a,b){this.set(a.y*b.z-a.z*b.y,a.z*b.x-a.x*b.z,a.x*b.y-a.y*b.x)},"JU.V3d,JU.V3d");c(c$,"normalize",function(){var a=this.length();this.x/=a;this.y/=a;this.z/=a});c(c$,"dot",function(a){return this.x*a.x+this.y*a.y+this.z*a.z},"JU.V3d");c(c$,"lengthSquared",function(){return this.x*this.x+this.y*this.y+
this.z*this.z});c(c$,"length",function(){return Math.sqrt(this.lengthSquared())})});n("J.adapter.readers.molxyz");w(["J.adapter.smarter.AtomSetCollectionReader"],"J.adapter.readers.molxyz.MolReader","java.lang.Exception $.Float J.adapter.smarter.Atom J.api.Interface $.JmolAdapter JU.Logger".split(" "),function(){c$=t(function(){this.haveAtomSerials=this.is2D=!1;this.dimension=null;this.allow2D=!0;this.iatom0=0;this.vr=null;s(this,arguments)},J.adapter.readers.molxyz,"MolReader",J.adapter.smarter.AtomSetCollectionReader);
h(c$,"initializeReader",function(){this.is2D=this.checkFilterKey("2D")});h(c$,"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});h(c$,"finalizeReader",function(){this.finalizeReaderMR()});c(c$,"finalizeReaderMR",function(){this.is2D&&this.set2D();this.isTrajectory=!1;this.finalizeReaderASCR()});c(c$,"processMolSdHeader",function(){var a,b=this.line;a=""+(this.line+"\n");this.asc.setCollectionName(this.line);this.rd();if(null!=this.line){a+=this.line+"\n";this.dimension=22>this.line.length?"3D":this.line.substring(20,22);if(!this.allow2D&&
this.dimension.equals("2D"))throw new Exception("File is 2D, not 3D");this.asc.setInfo("dimension",this.dimension);this.rd();null!=this.line&&(a+=this.line+"\n",JU.Logger.info(a),this.checkCurrentLineForScript(),this.asc.setInfo("fileHeader",a),this.newAtomSet(b))}});c(c$,"processCtab",function(a){a&&this.discardLinesUntilStartsWith("$CTAB");null!=this.rd()&&(0<=this.line.indexOf("V3000")?(this.is2D=this.dimension.equals("2D"),this.vr=J.api.Interface.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(c$,"readAtomsAndBonds",function(a,b){for(var d=0;d<a;++d){this.rd();var e=this.line.length,c,f,j,k,l=0,h=0,r=-2147483648;f=this.parseFloatRange(this.line,0,10);j=this.parseFloatRange(this.line,10,20);k=this.parseFloatRange(this.line,20,30);if(34>e)c=this.line.substring(31).trim();
else if(c=this.line.substring(31,34).trim(),39<=e){e=this.parseIntRange(this.line,36,39);1<=e&&7>=e&&(l=4-e);e=this.parseIntRange(this.line,34,36);if(0!=e&&-3<=e&&4>=e)switch(h=J.api.JmolAdapter.getNaturalIsotope(J.api.JmolAdapter.getElementNumber(c)),h){case 0:break;case 1:h=-e;break;default:h+=e}-2147483648==r&&this.haveAtomSerials&&(r=d+1)}this.addMolAtom(r,h,c,l,f,j,k)}for(d=0;d<b;++d)this.rd(),j=0,c=this.line.substring(0,3).trim(),f=this.line.substring(3,6).trim(),k=this.parseIntRange(this.line,
6,9),this.is2D&&(1==k&&12<=this.line.length)&&(j=this.parseIntRange(this.line,9,12)),k=this.fixOrder(k,j),this.haveAtomSerials?this.asc.addNewBondFromNames(c,f,k):this.asc.addNewBondWithOrder(this.iatom0+this.parseIntStr(c)-1,this.iatom0+this.parseIntStr(f)-1,k);for(;null!=this.rd()&&0!=this.line.indexOf("$$$$");)if(this.line.toUpperCase().contains("_PARTIAL_CHARGES"))try{for(var x=this.asc.atoms,d=this.parseIntStr(this.rd());0<=--d;){var A=J.adapter.smarter.AtomSetCollectionReader.getTokensStr(this.rd()),
I=this.parseIntStr(A[0])+this.iatom0-1,q=this.parseFloatStr(A[1]);Float.isNaN(q)||(x[I].partialCharge=q)}}catch(n){if(y(n,Exception))break;else throw n;}},"~N,~N");c(c$,"addMolAtom",function(a,b,d,e,c,f,j){switch(b){case 0:break;case -1:d="D";break;case -2:d="T";break;default:d=b+d}this.is2D&&0!=j&&(this.is2D=!1);b=new J.adapter.smarter.Atom;b.elementSymbol=d;b.formalCharge=e;this.setAtomCoordXYZ(b,c,f,j);-2147483648==a?this.asc.addAtom(b):(this.haveAtomSerials=!0,b.atomSerial=a,this.asc.addAtomWithMappedSerialNumber(b))},
"~N,~N,~S,~N,~N,~N,~N");c(c$,"fixOrder",function(a,b){switch(a){default:case 0:case -10:return 1;case 1:switch(b){case 1:return 1025;case 3:case 6:return 1041}break;case 2:case 3:break;case 4:return 515;case 5:return 66;case 6:return 513;case 7:return 514;case 8:case 9:return 33}return a},"~N,~N");c(c$,"addMolBond",function(a,b,d,e){d=this.fixOrder(d,e);this.haveAtomSerials?this.asc.addNewBondFromNames(a,b,d):this.asc.addNewBondWithOrder(this.iatom0+this.parseIntStr(a)-1,this.iatom0+this.parseIntStr(b)-
1,d)},"~S,~S,~N,~N")});n("J.adapter.readers.molxyz");w(["J.adapter.smarter.AtomSetCollectionReader"],"J.adapter.readers.molxyz.XyzReader",["java.lang.Float","JU.Logger"],function(){c$=B(J.adapter.readers.molxyz,"XyzReader",J.adapter.smarter.AtomSetCollectionReader);h(c$,"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 b=this.line;this.readAtoms(a);this.applySymmetryAndSetTrajectory();this.asc.setAtomSetName(b);if(this.isLastModel(this.modelNumber))return this.continuing=!1}else this.skipAtomSet(a);this.discardLinesUntilNonBlank();return!1});h(c$,"finalizeReader",function(){this.isTrajectory=!1;this.finalizeReaderASCR()});c(c$,"skipAtomSet",function(a){for(this.rd();0<=--a;)this.rd()},"~N");c(c$,"readAtoms",function(a){for(var b=0;b<a;++b){this.rd();var d=
this.getTokens();if(4>d.length)JU.Logger.warn("line cannot be read for XYZ atom data: "+this.line);else{var e=this.addAtomXYZSymName(d,1,null,null);this.setElementAndIsotope(e,d[0]);var c=4;switch(d.length){case 4:continue;case 5:case 6:case 8:case 9:if(0<=d[4].indexOf("."))e.partialCharge=this.parseFloatStr(d[4]);else{var f=this.parseIntStr(d[4]);-2147483648!=f&&(e.formalCharge=f)}switch(d.length){case 5:continue;case 6:e.radius=this.parseFloatStr(d[5]);continue;case 9:e.atomSerial=this.parseIntStr(d[8])}c++;
default:var f=this.parseFloatStr(d[c++]),j=this.parseFloatStr(d[c++]),d=this.parseFloatStr(d[c++]);if(Float.isNaN(f)||Float.isNaN(j)||Float.isNaN(d))continue;this.asc.addVibrationVector(e.index,f,j,d)}}}},"~N")});n("J.adapter.smarter");w(["JU.P3"],"J.adapter.smarter.Atom",["java.lang.Float","JU.AU","$.Lst","$.V3","JU.Vibration"],function(){c$=t(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.chainID=0;this.altLoc="\x00";this.group3=null;this.sequenceNumber=-2147483648;this.insertionCode="\x00";this.tensors=this.anisoBorU=null;this.ignoreSymmetry=!1;s(this,arguments)},J.adapter.smarter,"Atom",JU.P3,Cloneable);c(c$,"addTensor",function(a,b,d){if(null==a)return null;if(d||null==this.tensors)this.tensors=new JU.Lst;this.tensors.addLast(a);null!=
b&&a.setType(b);return a},"JU.Tensor,~S,~B");W(c$,function(){this.set(NaN,NaN,NaN)});c(c$,"getClone",function(){var a=this.clone();null!=this.vib&&(a.vib=p(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 b=this.tensors.size();0<=--b;)a.tensors.addLast(this.tensors.get(b).copyTensor())}return a});c(c$,"getElementSymbol",function(){if(null==this.elementSymbol&&null!=
this.atomName){for(var a=this.atomName.length,b=0,d=String.fromCharCode(0);b<a&&!J.adapter.smarter.Atom.isValidFirstSymbolChar(d=this.atomName.charAt(b));)++b;switch(a-b){case 0:break;default:if(a=this.atomName.charAt(b+1),J.adapter.smarter.Atom.isValidElementSymbolNoCaseSecondChar2(d,a)){this.elementSymbol=""+d+a;break}case 1:J.adapter.smarter.Atom.isValidElementSymbol(d)&&(this.elementSymbol=""+d)}}return this.elementSymbol});c$.isValidElementSymbol=c(c$,"isValidElementSymbol",function(a){return"A"<=
a&&"Z">=a&&0>J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-65]},"~S");c$.isValidElementSymbol2=c(c$,"isValidElementSymbol2",function(a,b){return"A"<=a&&"Z">=a&&"a"<=b&&"z">=b&&0!=(J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-65]>>b.charCodeAt(0)-97&1)},"~S,~S");c$.isValidElementSymbolNoCaseSecondChar2=c(c$,"isValidElementSymbolNoCaseSecondChar2",function(a,b){"A"<=b&&"Z">=b&&(b=String.fromCharCode(b.charCodeAt(0)+32));return"A">a||"Z"<a||"a">b||"z"<b?!1:0!=(J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-
65]>>b.charCodeAt(0)-97&1)},"~S,~S");c$.isValidFirstSymbolChar=c(c$,"isValidFirstSymbolChar",function(a){return"A"<=a&&"Z">=a&&0!=J.adapter.smarter.Atom.elementCharMasks[a.charCodeAt(0)-65]},"~S");c$.isValidElementSymbolNoCaseSecondChar=c(c$,"isValidElementSymbolNoCaseSecondChar",function(a){if(null==a)return!1;var b=a.length;if(0==b)return!1;var d=a.charAt(0);if(1==b)return J.adapter.smarter.Atom.isValidElementSymbol(d);if(2<b)return!1;a=a.charAt(1);return J.adapter.smarter.Atom.isValidElementSymbolNoCaseSecondChar2(d,
a)},"~S");c(c$,"scaleVector",function(a){null==this.vib||Float.isNaN(this.vib.z)||this.vib.scale(a)},"~N");C(c$,"elementCharMasks",[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])});n("J.adapter.smarter");w(["J.api.JmolAdapterAtomIterator"],"J.adapter.smarter.AtomIterator",["java.lang.Float","J.api.JmolAdapter"],
function(){c$=t(function(){this.iatom=0;this.atom=null;this.ac=0;this.bsAtoms=this.atoms=null;s(this,arguments)},J.adapter.smarter,"AtomIterator",null,J.api.JmolAdapterAtomIterator);u(c$,function(a){this.ac=a.ac;this.atoms=a.atoms;this.bsAtoms=a.bsAtoms;this.iatom=0},"J.adapter.smarter.AtomSetCollection");h(c$,"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});h(c$,"getAtomSetIndex",function(){return this.atom.atomSetIndex});h(c$,"getSymmetry",function(){return this.atom.bsSymmetry});h(c$,"getAtomSite",function(){return this.atom.atomSite+1});h(c$,"getUniqueID",function(){return Integer.$valueOf(this.atom.index)});h(c$,"getElementNumber",function(){return 0<this.atom.elementNumber?this.atom.elementNumber:J.api.JmolAdapter.getElementNumber(this.atom.getElementSymbol())});h(c$,"getAtomName",function(){return this.atom.atomName});
h(c$,"getFormalCharge",function(){return this.atom.formalCharge});h(c$,"getPartialCharge",function(){return this.atom.partialCharge});h(c$,"getTensors",function(){return this.atom.tensors});h(c$,"getRadius",function(){return this.atom.radius});h(c$,"getVib",function(){return null==this.atom.vib||Float.isNaN(this.atom.vib.z)?null:this.atom.vib});h(c$,"getSeqID",function(){return null==this.atom.vib||!Float.isNaN(this.atom.vib.y)||1095761940!=this.atom.vib.z?0:z(this.atom.vib.x)});h(c$,"getBfactor",
function(){return this.atom.bfactor});h(c$,"getOccupancy",function(){return 100*this.atom.foccupancy});h(c$,"getIsHetero",function(){return this.atom.isHetero});h(c$,"getSerial",function(){return this.atom.atomSerial});h(c$,"getChainID",function(){return this.atom.chainID});h(c$,"getAltLoc",function(){return J.api.JmolAdapter.canonizeAlternateLocationID(this.atom.altLoc)});h(c$,"getGroup3",function(){return this.atom.group3});h(c$,"getSequenceNumber",function(){return this.atom.sequenceNumber});h(c$,
"getInsertionCode",function(){return J.api.JmolAdapter.canonizeInsertionCode(this.atom.insertionCode)});h(c$,"getXYZ",function(){return this.atom})});n("J.adapter.smarter");w(["java.util.Hashtable"],"J.adapter.smarter.AtomSetCollection","java.lang.Boolean $.Float java.util.Collections $.Properties JU.AU $.BS $.Lst $.P3 $.V3 J.adapter.smarter.Atom $.Bond $.SmarterJmolAdapter J.api.Interface JU.Logger".split(" "),function(){c$=t(function(){this.atoms=this.ascAuxiliaryInfo=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.bsStructuredModels=this.readerList=
null;this.haveAnisou=!1;this.baseSymmetryAtomCount=0;this.checkLatticeOnly=!1;this.xtalSymmetry=null;this.bondIndex0=0;this.checkSpecial=!0;this.atomSymbolicMap=null;this.haveUnitCell=!1;this.vibScale=0;s(this,arguments)},J.adapter.smarter,"AtomSetCollection");K(c$,function(){this.ascAuxiliaryInfo=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});c(c$,"setCollectionName",function(a){if(!(null==a||0==(a=a.trim()).length))this.collectionName=a},"~S");c(c$,"clearGlobalBoolean",function(a){this.ascAuxiliaryInfo.remove(J.adapter.smarter.AtomSetCollection.globalBooleans[a])},"~N");c(c$,"setGlobalBoolean",function(a){this.setInfo(J.adapter.smarter.AtomSetCollection.globalBooleans[a],Boolean.TRUE)},"~N");c(c$,"getGlobalBoolean",function(a){return this.getAtomSetCollectionAuxiliaryInfo(J.adapter.smarter.AtomSetCollection.globalBooleans[a])===
Boolean.TRUE},"~N");u(c$,function(a,b,d,e){this.fileTypeName=a;this.reader=b;this.allowMultiple=null==b||0>b.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);if(null!=d){e=0;this.readerList=new JU.Lst;for(a=0;a<d.length;a++)(0<d[a].ac||null!=d[a].reader&&d[a].reader.mustFinalizeModelSet)&&this.appendAtomSetCollection(e++,d[a]);1<e&&this.setInfo("isMultiFile",Boolean.TRUE)}else null!=
e&&(this.setInfo("isMultiFile",Boolean.TRUE),this.appendAtomSetCollectionList(e))},"~S,J.adapter.smarter.AtomSetCollectionReader,~A,JU.Lst");c(c$,"appendAtomSetCollectionList",function(a){var b=a.size();if(0==b)this.errorMessage="No file found!";else for(var d=0;d<b;d++){var e=a.get(d);p(e,JU.Lst)?this.appendAtomSetCollectionList(e):this.appendAtomSetCollection(d,e)}},"JU.Lst");c(c$,"setTrajectory",function(){this.isTrajectory||(this.trajectorySteps=new JU.Lst);this.isTrajectory=!0;var a=null==this.bsAtoms?
this.ac:this.bsAtoms.cardinality();if(0!=a){for(var b=Array(a),d=0<a&&null!=this.atoms[0].vib&&!Float.isNaN(this.atoms[0].vib.z),a=d?Array(a):null,e=0==this.trajectoryStepCount?null:this.trajectorySteps.get(this.trajectoryStepCount-1),c=0,f=0;c<this.ac;c++)if(null==this.bsAtoms||this.bsAtoms.get(c)){var j=JU.P3.newP(this.atoms[c]);this.doFixPeriodic&&null!=e&&(j=J.adapter.smarter.AtomSetCollection.fixPeriodic(j,e[c]));b[f]=j;d&&(a[f]=this.atoms[c].vib);f++}if(d){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(b);this.trajectoryStepCount++}});c(c$,"appendAtomSetCollection",function(a,b){null!=b.reader&&b.reader.mustFinalizeModelSet&&this.readerList.addLast(b.reader);var d=this.ac;this.setInfo("loadState",b.getAtomSetCollectionAuxiliaryInfo("loadState"));if(null!=b.bsAtoms){null==this.bsAtoms&&(this.bsAtoms=new JU.BS);for(var e=b.bsAtoms.nextSetBit(0);0<=e;e=b.bsAtoms.nextSetBit(e+
1))this.bsAtoms.set(d+e)}for(var e=0,c=this.atomSetCount,f=0;f<b.atomSetCount;f++){this.newAtomSet();var j=(this.atomSetAuxiliaryInfo[this.iSet]=b.atomSetAuxiliaryInfo[f]).get("PDB_CONECT_firstAtom_count_max");null!=j&&(j[0]+=d);this.setAtomSetAuxiliaryInfo("title",b.collectionName);this.setAtomSetName(b.getAtomSetName(f));for(j=0;j<b.atomSetAtomCounts[f];j++){try{null!=this.bsAtoms&&this.bsAtoms.set(this.ac),this.newCloneAtom(b.atoms[e])}catch(k){if(y(k,Exception))this.errorMessage="appendAtomCollection error: "+
k;else throw k;}e++}this.atomSetNumbers[this.iSet]=0>a?this.iSet+1:1E6*(a+1)+b.atomSetNumbers[f]}for(e=0;e<b.bondCount;e++)f=b.bonds[e],this.addNewBondWithOrder(f.atomIndex1+d,f.atomIndex2+d,f.order);for(e=J.adapter.smarter.AtomSetCollection.globalBooleans.length;0<=--e;)b.getGlobalBoolean(e)&&this.setGlobalBoolean(e);for(e=0;e<b.structureCount;e++)d=b.structures[e],this.addStructure(d),d.modelStartEnd[0]+=c,d.modelStartEnd[1]+=c},"~N,J.adapter.smarter.AtomSetCollection");c(c$,"setNoAutoBond",function(){this.setInfo("noAutoBond",
Boolean.TRUE)});c(c$,"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.setAtomSetAuxiliaryInfoForSet("initialAtomCount",Integer.$valueOf(this.atomSetAtomCounts[a]),a),this.setAtomSetAuxiliaryInfoForSet("initialBondCount",Integer.$valueOf(this.atomSetBondCounts[a]),
a)},"~B");c(c$,"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 b=this.structures[a].modelStartEnd[0];0<=b&&(this.structures[a].modelStartEnd[0]=this.atomSetCount-1-this.structures[a].modelStartEnd[1],this.structures[a].modelStartEnd[1]=this.atomSetCount-1-b)}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 d=JU.AU.createArrayOfArrayList(this.atomSetCount),
a=0;a<this.atomSetCount;a++)d[a]=new JU.Lst;for(a=0;a<this.ac;a++)d[this.atoms[a].atomSetIndex].addLast(this.atoms[a]);for(var b=D(this.ac,0),e=this.ac,a=this.atomSetCount;0<=--a;)for(var c=d[a].size();0<=--c;){var f=this.atoms[--e]=d[a].get(c);b[f.index]=e;f.index=e}for(a=0;a<this.bondCount;a++)this.bonds[a].atomIndex1=b[this.bonds[a].atomIndex1],this.bonds[a].atomIndex2=b[this.bonds[a].atomIndex2];for(a=0;a<this.atomSetCount;a++)d=this.getAtomSetAuxiliaryInfoValue(a,"PDB_CONECT_firstAtom_count_max"),
null!=d&&(d[0]=b[d[0]],d[1]=this.atomSetAtomCounts[a])});c(c$,"reverseSets",function(a,b){for(var d=JU.AU.createArrayOfArrayList(this.atomSetCount),e=0;e<this.atomSetCount;e++)d[e]=new JU.Lst;for(e=0;e<b;e++){if(0>a[e].atomSetIndex)return;d[a[e].atomSetIndex].addLast(a[e])}for(e=this.atomSetCount;0<=--e;)for(var c=d[e].size();0<=--c;)a[--b]=d[e].get(c)},"~A,~N");c(c$,"reverseObject",function(a){for(var b=this.atomSetCount,d=q(b/2);0<=--d;)JU.AU.swap(a,d,b-1-d)},"~A");c$.reverseList=c(c$,"reverseList",
function(a){null!=a&&java.util.Collections.reverse(a)},"JU.Lst");c(c$,"reverseArray",function(a){for(var b=this.atomSetCount,d=q(b/2);0<=--d;)JU.AU.swapInt(a,d,b-1-d)},"~A");c(c$,"getList",function(a){var b;for(b=this.ac;0<=--b&&!(null!=this.atoms[b]&&"\x00"!=(a?this.atoms[b].altLoc:this.atoms[b].insertionCode)););if(!(0>b)){var d=Array(this.atomSetCount);for(b=0;b<this.atomSetCount;b++)d[b]="";var e;for(b=0;b<this.ac;b++)if(null!=this.atoms[b]){var c=a?this.atoms[b].altLoc:this.atoms[b].insertionCode;
if("\x00"!=c&&0>d[e=this.atoms[b].atomSetIndex].indexOf(c))d[e]+=c}a=a?"altLocs":"insertionCodes";for(b=0;b<this.atomSetCount;b++)0<d[b].length&&this.setAtomSetAuxiliaryInfoForSet(a,d[b],b)}},"~B");c(c$,"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.ascAuxiliaryInfo=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(c$,"discardPreviousAtoms",function(){for(var a=this.ac;0<=--a;)this.atoms[a]=null;this.ac=0;this.clearSymbolicMap();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(c$,"removeAtomSet",function(a){null==this.bsAtoms&&(this.bsAtoms=new JU.BS,this.bsAtoms.setBits(0,this.ac));var b=this.atomSetAtomIndexes[a],d=b+this.atomSetAtomCounts[a];this.bsAtoms.clearBits(b,d);for(b=d;b<this.ac;b++)this.atoms[b].atomSetIndex--;for(b=a+1;b<this.atomSetCount;b++)this.atomSetAuxiliaryInfo[b-1]=this.atomSetAuxiliaryInfo[b],this.atomSetAtomIndexes[b-1]=this.atomSetAtomIndexes[b],this.atomSetBondCounts[b-1]=this.atomSetBondCounts[b],this.atomSetAtomCounts[b-
1]=this.atomSetAtomCounts[b],this.atomSetNumbers[b-1]=this.atomSetNumbers[b];for(b=d=0;b<this.structureCount;b++){var e=this.structures[b];e.modelStartEnd[0]==a&&e.modelStartEnd[1]==a&&(this.structures[b]=null,d++)}if(0<d){a=Array(this.structureCount-d);for(d=b=0;b<this.structureCount;b++)null!=this.structures[b]&&(a[d++]=this.structures[b]);this.structures=a}for(b=0;b<this.bondCount;b++)this.bonds[b].atomSetIndex=this.atoms[this.bonds[b].atomIndex1].atomSetIndex;this.atomSetAuxiliaryInfo[--this.atomSetCount]=
null},"~N");c(c$,"removeCurrentAtomSet",function(){0>this.iSet||(this.iSet--,this.atomSetCount--)});c(c$,"getHydrogenAtomCount",function(){for(var a=0,b=0;b<this.ac;b++)(1==this.atoms[b].elementNumber||this.atoms[b].elementSymbol.equals("H"))&&a++;return a});c(c$,"newCloneAtom",function(a){a=a.getClone();this.addAtom(a);return a},"J.adapter.smarter.Atom");c(c$,"cloneFirstAtomSet",function(a){if(!this.allowMultiple)return 0;this.newAtomSet();0==a&&(a=this.atomSetAtomCounts[0]);for(var b=0;b<a;++b)this.newCloneAtom(this.atoms[b]);
return this.ac},"~N");c(c$,"cloneAtomSetWithBonds",function(a){var b=this.atomSetBondCounts[a?this.iSet:0];a=a?this.cloneLastAtomSet():this.cloneFirstAtomSet(0);if(0<a)for(var d=0;d<b;d++){var e=this.bonds[this.bondCount-b];this.addNewBondWithOrder(e.atomIndex1+a,e.atomIndex2+a,e.order)}},"~B");c(c$,"cloneLastAtomSet",function(){return this.cloneLastAtomSetFromPoints(0,null)});c(c$,"cloneLastAtomSetFromPoints",function(a,b){if(!this.allowMultiple)return 0;var d=0<a?a:this.getLastAtomSetAtomCount(),
e=this.getLastAtomSetAtomIndex();this.newAtomSet();for(var c=0;c<d;++c){var f=this.newCloneAtom(this.atoms[e++]);null!=b&&f.setT(b[c])}return d},"~N,~A");c(c$,"getFirstAtomSetAtomCount",function(){return this.atomSetAtomCounts[0]});c(c$,"getLastAtomSetAtomCount",function(){return this.atomSetAtomCounts[this.iSet]});c(c$,"getLastAtomSetAtomIndex",function(){return this.ac-this.atomSetAtomCounts[this.iSet]});c(c$,"addNewAtom",function(){return this.addAtom(new J.adapter.smarter.Atom)});c(c$,"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=this.atomSetAtomCounts[this.iSet]++;return a},"J.adapter.smarter.Atom");c(c$,"addAtomWithMappedName",function(a){var b=this.addAtom(a).atomName;null!=b&&this.atomSymbolicMap.put(b,a)},"J.adapter.smarter.Atom");c(c$,"addAtomWithMappedSerialNumber",
function(a){var b=this.addAtom(a).atomSerial;-2147483648!=b&&this.atomSymbolicMap.put(""+b,a)},"J.adapter.smarter.Atom");c(c$,"getAtomFromName",function(a){return this.atomSymbolicMap.get(a)},"~S");c(c$,"getAtomIndex",function(a){a=this.atomSymbolicMap.get(a);return null==a?-1:a.index},"~S");c(c$,"addNewBondWithOrder",function(a,b,d){if(0>a||a>=this.ac||0>b||b>=this.ac)return null;a=new J.adapter.smarter.Bond(a,b,d);this.addBond(a);return a},"~N,~N,~N");c(c$,"addNewBondFromNames",function(a,b,d){return this.addNewBondWithOrderA(this.getAtomFromName(a),
this.getAtomFromName(b),d)},"~S,~S,~N");c(c$,"addNewBondWithOrderA",function(a,b,d){return null==a||null==b?null:this.addNewBondWithOrder(a.index,b.index,d)},"J.adapter.smarter.Atom,J.adapter.smarter.Atom,~N");c(c$,"addBond",function(a){0<this.trajectoryStepCount||(0>a.atomIndex1||0>a.atomIndex2||0>a.order||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.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(c$,"finalizeStructures",function(){if(0!=this.structureCount){this.bsStructuredModels=new JU.BS;for(var a=new java.util.Hashtable,b=0;b<this.structureCount;b++){var d=this.structures[b];-1==d.modelStartEnd[0]&&(d.modelStartEnd[0]=0,d.modelStartEnd[1]=this.atomSetCount-1);this.bsStructuredModels.setBits(d.modelStartEnd[0],
d.modelStartEnd[1]+1);if(0!=d.strandCount){var d=d.structureID+" "+d.modelStartEnd[0],e=a.get(d),e=(null==e?0:e.intValue())+1;a.put(d,Integer.$valueOf(e))}}for(b=0;b<this.structureCount;b++)d=this.structures[b],1==d.strandCount&&(d.strandCount=a.get(d.structureID+" "+d.modelStartEnd[0]).intValue())}});c(c$,"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(c$,"addVibrationVectorWithSymmetry",function(a,b,d,e,c){if(c){c=this.atoms[a].atomSite;for(var f=this.atoms[a].atomSetIndex;a<this.ac&&this.atoms[a].atomSetIndex==f;a++)this.atoms[a].atomSite==c&&this.addVibrationVector(a,b,d,e)}else this.addVibrationVector(a,b,d,e)},"~N,~N,~N,~N,~B");c(c$,"addVibrationVector",function(a,b,d,e){this.allowMultiple||(a%=this.ac);return this.atoms[a].vib=JU.V3.new3(b,d,e)},"~N,~N,~N,~N");c(c$,"setAtomSetSpaceGroupName",function(a){this.setAtomSetAuxiliaryInfo("spaceGroup",
a+"")},"~S");c(c$,"setCoordinatesAreFractional",function(a){this.coordinatesAreFractional=a;this.setAtomSetAuxiliaryInfo("coordinatesAreFractional",Boolean.$valueOf(a));a&&this.setGlobalBoolean(0)},"~B");c(c$,"setAnisoBorU",function(a,b,d){this.haveAnisou=!0;a.anisoBorU=b;b[6]=d},"J.adapter.smarter.Atom,~A,~N");c(c$,"setU",function(a,b,d){var e=a.anisoBorU;null==e&&this.setAnisoBorU(a,e=L(8,0),8);e[b]=d},"J.adapter.smarter.Atom,~N,~N");c(c$,"getXSymmetry",function(){null==this.xtalSymmetry&&(this.xtalSymmetry=
J.api.Interface.getOption("adapter.smarter.XtalSymmetry").set(this));return this.xtalSymmetry});c(c$,"getSymmetry",function(){return this.getXSymmetry().getSymmetry()});c(c$,"setSymmetry",function(a){return null==a?null:this.getXSymmetry().setSymmetry(a)},"J.api.SymmetryInterface");c(c$,"setTensors",function(){this.haveAnisou&&this.getXSymmetry().setTensors()});c(c$,"setCheckSpecial",function(a){this.checkSpecial=a},"~B");c(c$,"clearSymbolicMap",function(){this.atomSymbolicMap.clear()});c(c$,"setInfo",
function(a,b){null==b?this.ascAuxiliaryInfo.remove(a):this.ascAuxiliaryInfo.put(a,b)},"~S,~O");c(c$,"setAtomSetCollectionPartialCharges",function(a){if(!this.ascAuxiliaryInfo.containsKey(a))return!1;for(var b=this.ascAuxiliaryInfo.get(a),d=b.size();0<=--d;)this.atoms[d].partialCharge=b.get(d).floatValue();JU.Logger.info("Setting partial charges type "+a);return!0},"~S");c(c$,"mapPartialCharge",function(a,b){this.getAtomFromName(a).partialCharge=b},"~S,~N");c(c$,"getAtomSetCollectionAuxiliaryInfo",
function(a){return this.ascAuxiliaryInfo.get(a)},"~S");c$.fixPeriodic=c(c$,"fixPeriodic",function(a,b){a.x=J.adapter.smarter.AtomSetCollection.fixPoint(a.x,b.x);a.y=J.adapter.smarter.AtomSetCollection.fixPoint(a.y,b.y);a.z=J.adapter.smarter.AtomSetCollection.fixPoint(a.z,b.z);return a},"JU.P3,JU.P3");c$.fixPoint=c(c$,"fixPoint",function(a,b){for(;0.9<a-b;)a-=1;for(;-0.9>a-b;)a+=1;return a},"~N,~N");c(c$,"finalizeTrajectoryAs",function(a,b){this.trajectorySteps=a;this.vibrationSteps=b;this.trajectoryStepCount=
a.size();this.finalizeTrajectory()},"JU.Lst,JU.Lst");c(c$,"finalizeTrajectory",function(){if(0!=this.trajectoryStepCount){var a=this.trajectorySteps.get(0),b=null==this.vibrationSteps?null:this.vibrationSteps.get(0),d=null==this.bsAtoms?this.ac:this.bsAtoms.cardinality();if(null!=this.vibrationSteps&&null!=b&&b.length<d||a.length<d)this.errorMessage="File cannot be loaded as a trajectory";else{for(var d=new JU.V3,e=0,c=0;e<this.ac;e++)if(null==this.bsAtoms||this.bsAtoms.get(e))null!=this.vibrationSteps&&
(this.atoms[e].vib=null==b?d:b[c]),null!=a[c]&&this.atoms[e].setT(a[c]),c++;this.setInfo("trajectorySteps",this.trajectorySteps);null!=this.vibrationSteps&&this.setInfo("vibrationSteps",this.vibrationSteps)}}});c(c$,"newAtomSet",function(){this.newAtomSetClear(!0)});c(c$,"newAtomSetClear",function(a){!this.allowMultiple&&0<=this.iSet&&this.discardPreviousAtoms();this.bondIndex0=this.bondCount;this.isTrajectory&&this.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.atomSymbolicMap.clear();this.setAtomSetAuxiliaryInfo("title",this.collectionName)},"~B");c(c$,"getAtomSetAtomIndex",function(a){return this.atomSetAtomIndexes[a]},"~N");c(c$,"getAtomSetAtomCount",function(a){return this.atomSetAtomCounts[a]},"~N");c(c$,"getAtomSetBondCount",function(a){return this.atomSetBondCounts[a]},"~N");c(c$,"setAtomSetName",function(a){this.isTrajectory?
this.setTrajectoryName(a):(this.setAtomSetAuxiliaryInfoForSet("name",a,this.iSet),this.allowMultiple||this.setCollectionName(a))},"~S");c(c$,"setTrajectoryName",function(a){if(0!=this.trajectoryStepCount){null==this.trajectoryNames&&(this.trajectoryNames=new JU.Lst);for(var b=this.trajectoryNames.size();b<this.trajectoryStepCount;b++)this.trajectoryNames.addLast(null);this.trajectoryNames.set(this.trajectoryStepCount-1,a)}},"~S");c(c$,"setAtomSetNames",function(a,b,d){for(var e=this.iSet;0<=--b&&
0<=e;--e)(null==d||!d.get(e))&&this.setAtomSetAuxiliaryInfoForSet("name",a,e)},"~S,~N,JU.BS");c(c$,"setCurrentAtomSetNumber",function(a){this.setAtomSetNumber(this.iSet+(this.isTrajectory?this.trajectoryStepCount:0),a)},"~N");c(c$,"setAtomSetNumber",function(a,b){this.atomSetNumbers[a]=b},"~N,~N");c(c$,"setAtomSetModelProperty",function(a,b){this.setAtomSetModelPropertyForSet(a,b,this.iSet)},"~S,~S");c(c$,"setAtomSetModelPropertyForSet",function(a,b,d){var e=this.getAtomSetAuxiliaryInfoValue(d,"modelProperties");
null==e&&this.setAtomSetAuxiliaryInfoForSet("modelProperties",e=new java.util.Properties,d);e.put(a,b);a.startsWith(".")&&e.put(a.substring(1),b)},"~S,~S,~N");c(c$,"setAtomProperties",function(a,b,d){p(b,String)&&!b.endsWith("\n")&&(b+="\n");0>d&&(d=this.iSet);var e=this.getAtomSetAuxiliaryInfoValue(d,"atomProperties");null==e&&this.setAtomSetAuxiliaryInfoForSet("atomProperties",e=new java.util.Hashtable,d);e.put(a,b)},"~S,~O,~N,~B");c(c$,"setAtomSetPartialCharges",function(a){if(!this.atomSetAuxiliaryInfo[this.iSet].containsKey(a))return!1;
a=this.getAtomSetAuxiliaryInfoValue(this.iSet,a);for(var b=a.size();0<=--b;)this.atoms[b].partialCharge=a.get(b).floatValue();return!0},"~S");c(c$,"getAtomSetAuxiliaryInfoValue",function(a,b){return this.atomSetAuxiliaryInfo[0<=a?a:this.iSet].get(b)},"~N,~S");c(c$,"setAtomSetAuxiliaryInfo",function(a,b){this.setAtomSetAuxiliaryInfoForSet(a,b,this.iSet)},"~S,~O");c(c$,"setAtomSetAuxiliaryInfoForSet",function(a,b,d){0>d||(null==this.atomSetAuxiliaryInfo[d]&&(this.atomSetAuxiliaryInfo[d]=new java.util.Hashtable),
null==b?this.atomSetAuxiliaryInfo[d].remove(a):this.atomSetAuxiliaryInfo[d].put(a,b))},"~S,~O,~N");c(c$,"setAtomSetPropertyForSets",function(a,b,d){for(var e=this.iSet;0<=--d&&0<=e;--e)this.setAtomSetModelPropertyForSet(a,b,e)},"~S,~S,~N");c(c$,"cloneLastAtomSetProperties",function(){this.cloneAtomSetProperties(this.iSet-1)});c(c$,"cloneAtomSetProperties",function(a){a=this.getAtomSetAuxiliaryInfoValue(a,"modelProperties");null!=a&&this.setAtomSetAuxiliaryInfoForSet("modelProperties",a.clone(),this.iSet)},
"~N");c(c$,"getAtomSetNumber",function(a){return this.atomSetNumbers[a>=this.atomSetCount?0:a]},"~N");c(c$,"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(c$,"getAtomSetAuxiliaryInfo",function(a){a=a>=this.atomSetCount?this.atomSetCount-1:a;return 0>a?null:this.atomSetAuxiliaryInfo[a]},"~N");c(c$,"setAtomNames",function(a){if(null==
a)return null;for(var b,d=0;d<this.ac;d++)if(null!=(b=a.getProperty(this.atoms[d].atomName)))this.atoms[d].atomName=b;return null},"java.util.Properties");c(c$,"setAtomSetEnergy",function(a,b){0>this.iSet||(JU.Logger.info("Energy for model "+(this.iSet+1)+" = "+a),this.setAtomSetAuxiliaryInfo("EnergyString",a),this.setAtomSetAuxiliaryInfo("Energy",Float.$valueOf(b)),this.setAtomSetModelProperty("Energy",""+b))},"~S,~N");c(c$,"setAtomSetFrequency",function(a,b,d,e){this.setAtomSetModelProperty("FreqValue",
d);d+=" "+(null==e?"cm^-1":e);e=(null==b?"":b+" ")+d;this.setAtomSetName(e);this.setAtomSetModelProperty("Frequency",d);null!=b&&this.setAtomSetModelProperty("FrequencyLabel",b);this.setAtomSetModelProperty(".PATH",(null==a?"":a+J.adapter.smarter.SmarterJmolAdapter.PATH_SEPARATOR+"Frequencies")+"Frequencies");return e},"~S,~S,~S,~S");c(c$,"toCartesian",function(a){for(var b=this.getLastAtomSetAtomIndex();b<this.ac;b++)a.toCartesian(this.atoms[b],!0)},"J.api.SymmetryInterface");c(c$,"getBondList",
function(){for(var a=Array(this.bondCount),b=0;b<this.bondCount;b++)a[b]=[this.atoms[this.bonds[b].atomIndex1].atomName,this.atoms[this.bonds[b].atomIndex2].atomName,""+this.bonds[b].order];return a});c(c$,"centralize",function(){for(var a=new JU.P3,b=0;b<this.atomSetCount;b++){var d=this.atomSetAtomCounts[b],e=this.atomSetAtomIndexes[b];a.set(0,0,0);for(var c=e+d;--c>=e;)a.add(this.atoms[c]);a.scale(1/d);for(c=e+d;--c>=e;)this.atoms[c].sub(a)}});c(c$,"mergeTrajectories",function(a){if(this.isTrajectory&&
a.isTrajectory&&null==this.vibrationSteps){for(var b=0;b<a.trajectoryStepCount;b++)this.trajectorySteps.add(this.trajectoryStepCount++,a.trajectorySteps.get(b));this.setInfo("trajectorySteps",this.trajectorySteps)}},"J.adapter.smarter.AtomSetCollection");C(c$,"globalBooleans","someModelsHaveFractionalCoordinates someModelsHaveSymmetry someModelsHaveUnitcells someModelsHaveCONECT isPDB someModelsHaveDomains someModelsHaveValidations".split(" "),"GLOBAL_FRACTCOORD",0,"GLOBAL_SYMMETRY",1,"GLOBAL_UNITCELLS",
2,"GLOBAL_CONECT",3,"GLOBAL_ISPDB",4,"GLOBAL_DOMAINS",5,"GLOBAL_VALIDATIONS",6)});n("J.adapter.smarter");w(["javajs.api.GenericLineReader","JU.SB"],"J.adapter.smarter.AtomSetCollectionReader","java.io.BufferedReader java.lang.Boolean $.Character $.Float javajs.api.GenericBinaryDocument JU.BS $.Lst $.M3 $.P3 $.PT $.Quat $.V3 J.adapter.smarter.Atom $.AtomSetCollection J.api.Interface $.JmolAdapter JU.BSUtil $.Logger $.Parser".split(" "),function(){c$=t(function(){this.isBinary=!1;this.next=this.prevline=
this.line=this.validation=this.domains=this.trajectorySteps=this.htParams=this.readerName=this.binaryDoc=this.reader=this.asc=null;this.ptLine=0;this.latticeCells=null;this.iHaveSymmetryOperators=this.iHaveUnitCell=this.doProcessLines=!1;this.continuing=!0;this.vwr=null;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=!1;this.calculationType="?";this.sgName=null;this.ignoreFileSpaceGroupName=this.ignoreFileUnitCell=!1;this.notionalUnitCell=null;this.desiredModelNumber=-2147483648;this.out=this.symmetry=null;this.doPackUnitCell=this.iHaveFractionalCoordinates=!1;this.ptSupercell=this.strSupercell=null;this.forcePacked=this.mustFinalizeModelSet=!1;this.packingError=0.02;this.loadNote=null;this.merging=this.fileCoordinatesAreFractional=this.doConvertToFractional=
!1;this.symmetryRange=0;this.firstLastStep=null;this.lastModelNumber=2147483647;this.desiredSpaceGroupIndex=-1;this.unitCellOffset=this.fileOffsetFractional=this.fileOffset=this.fileScaling=null;this.unitCellOffsetFractional=!1;this.fileName=this.filePath=this.moreUnitCellInfo=null;this.stateScriptVersionInt=2147483647;this.baseAtomIndex=0;this.haveModel=!1;this.previousUnitCell=this.previousSpaceGroup=null;this.nMatrixElements=0;this.filter=this.bsFilter=this.matUnitCellOrientation=null;this.filterAtomType=
this.filterAtomName=this.filterChain=this.filterGroup3=this.filterAltLoc=this.haveAtomFilter=!1;this.filterAtomTypeStr=null;this.filterAtomNameTerminator=";";this.filterEveryNth=this.filterHetero=this.filterElement=!1;this.filterSymop=null;this.nFiltered=this.filterN=0;this.reverseModels=this.doReadMolecularOrbitals=this.allowPDBFilter=this.useAltNames=this.addVibrations=this.doCentralize=this.doSetOrientation=!1;this.nameRequired=null;this.centroidPacked=this.doCentroidUnitCell=!1;this.ms=this.matRot=
this.filter2=this.filter1=this.altCell=null;this.vibsFractional=!1;this.siteScript=this.previousScript=null;s(this,arguments)},J.adapter.smarter,"AtomSetCollectionReader",null,javajs.api.GenericLineReader);K(c$,function(){this.next=D(1,0);this.loadNote=new JU.SB});c(c$,"setup",function(a,b,d){this.setupASCR(a,b,d)},"~S,java.util.Map,~O");c(c$,"setupASCR",function(a,b,d){null!=a&&(this.htParams=b,this.filePath=a.$replace("\\","/"),a=this.filePath.lastIndexOf("/"),this.fileName=this.filePath.substring(a+
1),p(d,java.io.BufferedReader)?this.reader=d:p(d,javajs.api.GenericBinaryDocument)&&(this.binaryDoc=d))},"~S,java.util.Map,~O");c(c$,"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.finalizeReader()}catch(a){JU.Logger.info("Reader error: "+
a),this.vwr.isJS||a.printStackTrace(),this.setError(a)}null!=this.reader&&this.reader.close();null!=this.binaryDoc&&this.binaryDoc.close();return this.finish()});c(c$,"fixBaseIndices",function(){try{var a=this.htParams.get("baseModelIndex").intValue();this.baseAtomIndex+=this.asc.ac;a+=this.asc.atomSetCount;this.htParams.put("baseAtomIndex",Integer.$valueOf(this.baseAtomIndex));this.htParams.put("baseModelIndex",Integer.$valueOf(a))}catch(b){if(!y(b,Exception))throw b;}});c(c$,"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(c$,"processDOM",function(){},"~O");c(c$,"processBinaryDocument",function(){});c(c$,"initializeReader",function(){});c(c$,"checkLine",function(){return!0});c(c$,"checkLastModel",function(){if(this.isLastModel(this.modelNumber)&&this.doProcessLines)return this.continuing=this.doProcessLines=!1;this.doProcessLines=!1;return!0});c(c$,"isLastModel",function(a){return 0<
this.desiredModelNumber||a>=this.lastModelNumber},"~N");c(c$,"appendLoadNote",function(a){null==a?this.loadNote=new JU.SB:(this.loadNote.append(a).append("\n"),JU.Logger.info(a))},"~S");c(c$,"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(c$,"finalizeReader",function(){this.finalizeReaderASCR()});c(c$,"finalizeReaderASCR",
function(){this.applySymmetryAndSetTrajectory();this.asc.finalizeStructures();this.doCentralize&&this.asc.centralize();var a=this.asc.getAtomSetAuxiliaryInfo(0);if(null!=this.domains&&null!=a){this.asc.setGlobalBoolean(5);var b=this.domains.getMapKeys(2,!0),d=b.indexOf("{ ",2);0<=d&&(b=b.substring(d+2));d=b.indexOf("_metadata");0>d&&(d=b.indexOf("metadata"));0<=d&&(b=b.substring(0,d));b=JU.PT.rep(JU.PT.replaceAllCharacters(b,"{}","").trim(),"\n","\n  ")+"\n\nUse SHOW DOMAINS for details.";this.appendLoadNote("\nDomains loaded:\n   "+
b);for(b=this.asc.atomSetCount;0<=--b;)a=this.asc.getAtomSetAuxiliaryInfo(b),a.put("domains",this.domains)}if(null!=this.validation&&null!=a)for(b=this.asc.atomSetCount;0<=--b;)a=this.asc.getAtomSetAuxiliaryInfo(b),a.put("validation",this.validation);this.setLoadNote()});c(c$,"setLoadNote",function(){var a=this.loadNote.toString();0<this.loadNote.length()&&this.asc.setInfo("modelLoadNote",a);return a});c(c$,"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(c$,"setModelPDB",function(a){this.asc.setAtomSetAuxiliaryInfo("isPDB",a?Boolean.TRUE:null)},"~B");c(c$,"finish",function(){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));this.htParams.containsKey("bsFilter")&&this.htParams.put("filteredAtomCount",Integer.$valueOf(JU.BSUtil.cardinalityOf(this.htParams.get("bsFilter"))));this.calculationType.equals("?")||this.asc.setInfo("calculationType",this.calculationType);var b=a=this.asc.fileTypeName;0<=b.indexOf("(")&&(b=b.substring(0,b.indexOf("(")));for(var d=this.asc.atomSetCount;0<=--d;)this.asc.setAtomSetAuxiliaryInfoForSet("fileName",this.filePath,d),this.asc.setAtomSetAuxiliaryInfoForSet("fileType",
b,d);this.asc.freeze(this.reverseModels);if(null!=this.asc.errorMessage)return this.asc.errorMessage+"\nfor file "+this.filePath+"\ntype "+a;if(0==(null==this.asc.bsAtoms?this.asc.ac:this.asc.bsAtoms.cardinality())&&0>b.indexOf("DataOnly")&&null==this.asc.getAtomSetCollectionAuxiliaryInfo("dataOnly"))return"No atoms found\nfor file "+this.filePath+"\ntype "+a;this.fixBaseIndices();return this.asc});c(c$,"setError",function(a){var b;b=a.getMessage?a.getMessage():a.toString();this.asc.errorMessage=
null==this.line?"Error reading file at end of file \n"+b:"Error reading file at line "+this.ptLine+":\n"+this.line+"\n"+b;this.vwr.isJS||a.printStackTrace()},"Throwable");c(c$,"initialize",function(){this.baseAtomIndex=this.htParams.get("baseAtomIndex").intValue();var a=this.htParams.get("supercell");p(a,String)?this.strSupercell=a:this.ptSupercell=a;if(null!=(a=this.htParams.get("packingError")))this.packingError=a.floatValue();this.initializeSymmetry();this.vwr=this.htParams.remove("vwr");this.htParams.containsKey("stateScriptVersionInt")&&
(this.stateScriptVersionInt=this.htParams.get("stateScriptVersionInt").intValue());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.htParams.get("bsFilter");this.setFilter(null);null!=this.altCell&&!this.checkFilterKey("NOPACK")&&(this.forcePacked=!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),p(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.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.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.addPrimitiveLatticeVector(0,a,0),this.addPrimitiveLatticeVector(1,
a,3),this.addPrimitiveLatticeVector(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")});c(c$,"initializeSymmetryOptions",function(){this.latticeCells=D(3,0);this.doApplySymmetry=!1;var a=this.htParams.get("lattice");if(null==a||0==a.length()){if(!this.forcePacked)return;a=JU.P3.new3(1,1,1)}this.latticeCells[0]=
z(a.x);this.latticeCells[1]=z(a.y);this.latticeCells[2]=z(a.z);if((this.doCentroidUnitCell=this.htParams.containsKey("centroid"))&&(-1==this.latticeCells[2]||0==this.latticeCells[2]))this.latticeCells[2]=1;a=this.forcePacked||this.htParams.containsKey("packed");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(c$,"doGetModel",function(a,b){if(null!=b&&null!=this.nameRequired&&0<this.nameRequired.length&&0>b.toUpperCase().indexOf(this.nameRequired))return!1;var d=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]);d&&0==this.desiredModelNumber&&this.asc.discardPreviousAtoms();this.haveModel=
(new Boolean(this.haveModel|d)).valueOf();d&&(this.doProcessLines=!0);return d},"~N,~S");c(c$,"initializeSymmetry",function(){this.previousSpaceGroup=this.sgName;this.previousUnitCell=this.notionalUnitCell;this.iHaveUnitCell=this.ignoreFileUnitCell;if(!this.ignoreFileUnitCell){this.notionalUnitCell=L(25,0);for(var a=25;0<=--a;)this.notionalUnitCell[a]=NaN;null!=this.ptSupercell&&(this.notionalUnitCell[22]=Math.max(1,z(this.ptSupercell.x)),this.notionalUnitCell[23]=Math.max(1,z(this.ptSupercell.y)),
this.notionalUnitCell[24]=Math.max(1,z(this.ptSupercell.z)));this.symmetry=null}this.ignoreFileSpaceGroupName||(this.sgName="unspecified!");this.doCheckUnitCell=!1});c(c$,"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.setAtomSetAuxiliaryInfoForSet("name",a,Math.max(0,this.asc.iSet))},"~S");c(c$,"cloneLastAtomSet",function(a,b){var d=this.asc.getLastAtomSetAtomCount();
this.asc.cloneLastAtomSetFromPoints(a,b);this.asc.haveUnitCell&&(this.doCheckUnitCell=this.iHaveUnitCell=!0,this.sgName=this.previousSpaceGroup,this.notionalUnitCell=this.previousUnitCell);return d},"~N,~A");c(c$,"setSpaceGroupName",function(a){this.ignoreFileSpaceGroupName||(this.sgName=a.trim(),JU.Logger.info("Setting space group name to "+this.sgName))},"~S");c(c$,"setSymmetryOperator",function(a){if(this.ignoreFileSymmetryOperators)return-1;var b=this.asc.getXSymmetry().addSpaceGroupOperation(this,
a);0>b&&JU.Logger.warn("Skippings symmetry operation "+a);this.iHaveSymmetryOperators=!0;return b},"~S");c(c$,"initializeCartesianToFractional",function(){for(var a=0;16>a;a++)if(!Float.isNaN(this.notionalUnitCell[6+a]))return;for(a=0;16>a;a++)this.notionalUnitCell[6+a]=0==a%5?1:0;this.nMatrixElements=0});c(c$,"clearUnitCell",function(){if(!this.ignoreFileUnitCell){for(var a=6;22>a;a++)this.notionalUnitCell[a]=NaN;this.checkUnitCell(6)}});c(c$,"setUnitCellItem",function(a,b){if(!this.ignoreFileUnitCell&&
!(0==a&&1==b||3==a&&0==b))!Float.isNaN(b)&&(6<=a&&Float.isNaN(this.notionalUnitCell[6]))&&this.initializeCartesianToFractional(),this.notionalUnitCell[a]=b,JU.Logger.debugging&&JU.Logger.debug("setunitcellitem "+a+" "+b),6>a||Float.isNaN(b)?this.iHaveUnitCell=this.checkUnitCell(6):12==++this.nMatrixElements&&this.checkUnitCell(22)},"~N,~N");c(c$,"setUnitCell",function(a,b,d,e,c,f){this.ignoreFileUnitCell||(this.clearUnitCell(),this.notionalUnitCell[0]=a,this.notionalUnitCell[1]=b,this.notionalUnitCell[2]=
d,0!=e&&(this.notionalUnitCell[3]=e),0!=c&&(this.notionalUnitCell[4]=c),0!=f&&(this.notionalUnitCell[5]=f),this.iHaveUnitCell=this.checkUnitCell(6))},"~N,~N,~N,~N,~N,~N");c(c$,"addPrimitiveLatticeVector",function(a,b,d){if(!this.ignoreFileUnitCell){if(0==a)for(var e=0;6>e;e++)this.notionalUnitCell[e]=0;a=6+3*a;this.notionalUnitCell[a++]=b[d++];this.notionalUnitCell[a++]=b[d++];this.notionalUnitCell[a]=b[d];if(Float.isNaN(this.notionalUnitCell[0]))for(a=0;6>a;a++)this.notionalUnitCell[a]=-1;this.iHaveUnitCell=
this.checkUnitCell(15)}},"~N,~A,~N");c(c$,"checkUnitCell",function(a){for(var b=0;b<a;b++)if(Float.isNaN(this.notionalUnitCell[b]))return!1;this.doApplySymmetry&&(this.getSymmetry(),this.doConvertToFractional=!this.fileCoordinatesAreFractional);return!0},"~N");c(c$,"getSymmetry",function(){if(!this.iHaveUnitCell)return null;null==this.symmetry&&(this.getNewSymmetry().setUnitCell(this.notionalUnitCell,!1),this.checkUnitCellOffset());return this.symmetry});c(c$,"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(c$,"getNewSymmetry",function(){return this.symmetry=J.api.Interface.getSymmetry()});c(c$,"setFractionalCoordinates",function(a){this.iHaveFractionalCoordinates=this.fileCoordinatesAreFractional=a;this.checkUnitCellOffset()},
"~B");c(c$,"setFilterAtomTypeStr",function(a){this.filterAtomTypeStr=a;this.filterAtomNameTerminator="\x00"},"~S");c(c$,"setFilter",function(a){null==a?a=this.htParams.get("filter"):this.bsFilter=null;null!=a&&(a=a.toUpperCase());this.filter=a;this.doSetOrientation=!this.checkFilterKey("NOORIENT");this.doCentralize=!this.checkFilterKey("NOCENTER")&&this.checkFilterKey("CENTER");this.addVibrations=!this.checkFilterKey("NOVIB");this.doReadMolecularOrbitals=!this.checkFilterKey("NOMO");this.useAltNames=
this.checkFilterKey("ALTNAME");this.reverseModels=this.checkFilterKey("REVERSEMODELS");if(null!=this.filter&&(this.checkFilterKey("HETATM")&&(this.filterHetero=!0,this.filter=JU.PT.rep(this.filter,"HETATM","HETATM-Y")),this.checkFilterKey("ATOM")&&(this.filterHetero=!0,this.filter=JU.PT.rep(this.filter,"ATOM","HETATM-N")),this.checkFilterKey("CELL=")&&(this.altCell=this.filter.substring(this.filter.indexOf("CELL=")+5).toLowerCase()),this.nameRequired=JU.PT.getQuotedAttribute(this.filter,"NAME"),null!=
this.nameRequired&&(this.nameRequired.startsWith("'")?this.nameRequired=JU.PT.split(this.nameRequired,"'")[1]:this.nameRequired.startsWith('"')&&(this.nameRequired=JU.PT.split(this.nameRequired,'"')[1]),this.filter=JU.PT.rep(this.filter,this.nameRequired,""),this.filter=JU.PT.rep(this.filter,"NAME=","")),this.filterAtomName=this.checkFilterKey("*.")||this.checkFilterKey("!."),this.filterElement=this.checkFilterKey("_"),this.filterGroup3=this.checkFilterKey("["),this.filterChain=this.checkFilterKey(":"),
this.filterAltLoc=this.checkFilterKey("%"),(this.filterEveryNth=this.checkFilterKey("/="))?this.filterN=this.parseIntStr(this.filter.substring(this.filter.indexOf("/=")+2)):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("/="),null==this.bsFilter&&(this.bsFilter=
new JU.BS,this.htParams.put("bsFilter",this.bsFilter),this.filter=(";"+this.filter+";").$replace(",",";"),a=this.getFilter("SYMOP="),null!=a&&(this.filterSymop=" "+a+" "),JU.Logger.info("filtering with "+this.filter),this.haveAtomFilter&&(this.filter1=this.filter,0<=(a=this.filter.indexOf("|"))))))this.filter1=this.filter.substring(0,a).trim()+";",this.filter2=";"+this.filter.substring(a).trim()},"~S");c(c$,"getFilter",function(a){var b=null==this.filter?-1:this.filter.indexOf(a);return 0>b?null:
this.filter.substring(b+a.length,this.filter.indexOf(";",b))},"~S");c(c$,"checkFilterKey",function(a){return null!=this.filter&&0<=this.filter.indexOf(a)},"~S");c(c$,"filterAtom",function(a,b){if(!this.haveAtomFilter)return!0;var d=this.checkFilter(a,this.filter1);null!=this.filter2&&(d=(new Boolean(d|this.checkFilter(a,this.filter2))).valueOf());d&&this.filterEveryNth&&(d=0==this.nFiltered++%this.filterN);this.bsFilter.setBitTo(0<=b?b:this.asc.ac,d);return d},"J.adapter.smarter.Atom,~N");c(c$,"checkFilter",
function(a,b){return(!this.filterGroup3||null==a.group3||!this.filterReject(b,"[",a.group3.toUpperCase()+"]"))&&(!this.filterAtomName||this.allowAtomName(a.atomName,b))&&(null==this.filterAtomTypeStr||null==a.atomName||0<=a.atomName.toUpperCase().indexOf("\x00"+this.filterAtomTypeStr))&&(!this.filterElement||null==a.elementSymbol||!this.filterReject(b,"_",a.elementSymbol.toUpperCase()+";"))&&(!this.filterChain||0==a.chainID||!this.filterReject(b,":",""+this.vwr.getChainIDStr(a.chainID)))&&(!this.filterAltLoc||
"\x00"==a.altLoc||!this.filterReject(b,"%",""+a.altLoc))&&(!this.filterHetero||!this.allowPDBFilter||!this.filterReject(b,"HETATM",a.isHetero?"-Y":"-N"))},"J.adapter.smarter.Atom,~S");c(c$,"rejectAtomName",function(a){return this.filterAtomName&&!this.allowAtomName(a,this.filter)},"~S");c(c$,"allowAtomName",function(a,b){return null==a||!this.filterReject(b,".",a.toUpperCase()+this.filterAtomNameTerminator)},"~S,~S");c(c$,"filterReject",function(a,b,d){return 0<=a.indexOf(b)&&0<=a.indexOf("!"+b)==
0<=a.indexOf(b+d)},"~S,~S,~S");c(c$,"set2D",function(){this.asc.setInfo("is2D",Boolean.TRUE);this.checkFilterKey("NOMIN")||this.asc.setInfo("doMinimize",Boolean.TRUE)});c(c$,"doGetVibration",function(a){return this.addVibrations&&(0>=this.desiredVibrationNumber||a==this.desiredVibrationNumber)},"~N");c(c$,"setTransform",function(a,b,d,e,c,f,j,k,l){null==this.matRot&&this.doSetOrientation&&(this.matRot=new JU.M3,a=JU.V3.new3(a,b,d),a.normalize(),this.matRot.setColumnV(0,a),a.set(e,c,f),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)),e=JU.Quat.newM(this.matRot),this.asc.setInfo("defaultOrientationQuaternion",e),JU.Logger.info("defaultOrientationMatrix = "+this.matRot))},"~N,~N,~N,~N,~N,~N,~N,~N,~N");c(c$,"setAtomCoordXYZ",function(a,b,d,e){a.set(b,d,e);this.setAtomCoord(a)},"J.adapter.smarter.Atom,~N,~N,~N");c(c$,"setAtomCoordScaled",function(a,b,d,e){null==a&&(a=this.asc.addNewAtom());
this.setAtomCoordXYZ(a,this.parseFloatStr(b[d])*e,this.parseFloatStr(b[d+1])*e,this.parseFloatStr(b[d+2])*e);return a},"J.adapter.smarter.Atom,~A,~N,~N");c(c$,"setAtomCoordTokens",function(a,b,d){this.setAtomCoordXYZ(a,this.parseFloatStr(b[d]),this.parseFloatStr(b[d+1]),this.parseFloatStr(b[d+2]))},"J.adapter.smarter.Atom,~A,~N");c(c$,"addAtomXYZSymName",function(a,b,d,e){var c=this.asc.addNewAtom();null!=d&&(c.elementSymbol=d);null!=e&&(c.atomName=e);this.setAtomCoordTokens(c,a,b);return c},"~A,~N,~S,~S");
c(c$,"setAtomCoord",function(a){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);this.doConvertToFractional&&(!this.fileCoordinatesAreFractional&&null!=this.getSymmetry())&&(this.symmetry.haveUnitCell()||this.symmetry.setUnitCell(this.notionalUnitCell,!1),this.symmetry.toFractional(a,!1),this.iHaveFractionalCoordinates=!0);this.doCheckUnitCell=!0},"J.adapter.smarter.Atom");c(c$,"addSites",
function(a){this.asc.setAtomSetAuxiliaryInfo("pdbSites",a);var b="",d;for(a=a.entrySet().iterator();a.hasNext()&&((d=a.next())||1);){for(var e=d.getKey(),c=d.getValue(),f,j=e.length;0<=--j;)if(!Character.isLetterOrDigit(f=e.charAt(j))&&"'"!=f)e=e.substring(0,j)+"_"+e.substring(j+1);c=c.get("groups");0!=c.length&&(this.addSiteScript("@site_"+e+" "+c),this.addSiteScript("site_"+e+' = ["'+JU.PT.rep(c,",",'","')+'"]'),b+=',"site_'+e+'"')}0<b.length&&this.addSiteScript("site_list = ["+b.substring(1)+"]")},
"java.util.Map");c(c$,"applySymmetryAndSetTrajectory",function(){this.applySymTrajASCR()});c(c$,"applySymTrajASCR",function(){this.forcePacked&&this.initializeSymmetryOptions();var a=this.iHaveUnitCell&&this.doCheckUnitCell?this.asc.getXSymmetry().applySymmetryFromReader(this,this.getSymmetry()):null;null==a&&this.asc.setTensors();this.isTrajectory&&this.asc.setTrajectory();null!=this.moreUnitCellInfo&&(this.asc.setAtomSetAuxiliaryInfo("moreUnitCellInfo",this.moreUnitCellInfo),this.moreUnitCellInfo=
null);this.initializeSymmetry();return a});c(c$,"doPreSymmetry",function(){});c(c$,"finalizeMOData",function(a){this.asc.setAtomSetAuxiliaryInfo("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");c$.getElementSymbol=c(c$,"getElementSymbol",function(a){return J.api.JmolAdapter.getElementSymbol(a)},"~N");c(c$,"fillDataBlockFixed",function(a,b,d,e){if(0==d)this.fillDataBlock(a,e);else{e=a.length;for(var c=
0;c<e;c++){this.discardLinesUntilNonBlank();var f=q((this.line.length-b+1)/d);a[c]=Array(f);for(var j=0,k=b;j<f;j++,k+=d)a[c][j]=this.line.substring(k,Math.min(this.line.length,k+d))}}},"~A,~N,~N,~N");c(c$,"fillDataBlock",function(a,b){for(var d=a.length,e=0;e<d;e++)a[e]=J.adapter.smarter.AtomSetCollectionReader.getTokensStr(this.discardLinesUntilNonBlank()),a[e].length<b&&--e},"~A,~N");c(c$,"fillFloatArray",function(a,b,d){for(var e=[],c=0,f=0;f<d.length;f++){for(;null!=e&&c>=e.length;){null==a&&
(a=this.rd());if(0==b)e=J.adapter.smarter.AtomSetCollectionReader.getTokensStr(a);else{e=Array(q(a.length/b));for(c=0;c<e.length;c++)e[c]=a.substring(c*b,(c+1)*b)}a=null;c=0}if(null==e)break;d[f]=this.parseFloatStr(e[c++])}return d},"~S,~N,~A");c(c$,"fillFrequencyData",function(a,b,d,e,c,f,j,k,l){var h=d!=b;null!=k&&(b=k.length);b=c?b:3*b;var r=e.length,x=Array(b);this.fillDataBlockFixed(x,f,j,l);for(j=f=0;f<b;f++,j++){l=x[f];for(var A=c?null:x[++f],I=c?null:x[++f],q=l.length-(c?3*r:r)-1,n=0,s=0;s<
r;s++){++q;var p=l[q];")"==p.charAt(0)&&(p=p.substring(1));var p=this.parseFloatStr(p),u=this.parseFloatStr(c?l[++q]:A[q]),t=this.parseFloatStr(c?l[++q]:I[q]);if(!e[s]){var v=null==k?j:k[j];0>v||(JU.Logger.debugging&&JU.Logger.debug("atom "+v+" vib"+n+": "+p+" "+u+" "+t),this.asc.addVibrationVectorWithSymmetry(a+d*n++ +v,p,u,t,h))}}}},"~N,~N,~N,~A,~B,~N,~N,~A,~N");c(c$,"readLines",function(a){for(;0<=--a;)this.rd();return this.line},"~N");c(c$,"discardLinesUntilStartsWith",function(a){for(;null!=
this.rd()&&!this.line.startsWith(a););return this.line},"~S");c(c$,"discardLinesUntilContains",function(a){for(;null!=this.rd()&&0>this.line.indexOf(a););return this.line},"~S");c(c$,"discardLinesUntilContains2",function(a,b){for(;null!=this.rd()&&0>this.line.indexOf(a)&&0>this.line.indexOf(b););return this.line},"~S,~S");c(c$,"discardLinesUntilBlank",function(){for(;null!=this.rd()&&0!=this.line.trim().length;);return this.line});c(c$,"discardLinesUntilNonBlank",function(){for(;null!=this.rd()&&
0==this.line.trim().length;);return this.line});c(c$,"checkLineForScript",function(a){this.line=a;this.checkCurrentLineForScript()},"~S");c(c$,"checkCurrentLineForScript",function(){if(0<=this.line.indexOf("Jmol")&&(0<=this.line.indexOf("Jmol PDB-encoded data")&&(this.asc.setInfo("jmolData",this.line),this.line.endsWith("#noautobond")||(this.line+="#noautobond")),0<=this.line.indexOf("Jmol data min"))){JU.Logger.info(this.line);var a=L(15,0);this.parseStringInfestedFloatArray(this.line.substring(10).$replace("=",
" ").$replace("{"," ").$replace("}"," "),a);var b=JU.P3.new3(a[0],a[1],a[2]),d=JU.P3.new3(a[3],a[4],a[5]);this.fileScaling=JU.P3.new3(a[6],a[7],a[8]);this.fileOffset=JU.P3.new3(a[9],a[10],a[11]);a=JU.P3.new3(a[12],a[13],a[14]);0>=a.x&&(a.x=100);0>=a.y&&(a.y=100);0>=a.z&&(a.z=100);0==this.fileScaling.y&&(this.fileScaling.y=1);0==this.fileScaling.z&&(this.fileScaling.z=1);this.setFractionalCoordinates(!0);this.latticeCells=D(3,0);this.asc.xtalSymmetry=null;this.setUnitCell(2*a.x/(d.x-b.x),2*a.y/(d.y-
b.y),2*a.z/(d.z==b.z?1:d.z-b.z),90,90,90);this.unitCellOffset=JU.P3.newP(a);this.unitCellOffset.scale(-1);this.getSymmetry();this.symmetry.toFractional(this.unitCellOffset,!1);this.unitCellOffset.scaleAdd2(-1,b,this.unitCellOffset);this.symmetry.setOffsetPt(this.unitCellOffset);this.asc.setInfo("jmolDataScaling",[b,d,a]);this.doApplySymmetry=!0}this.line.endsWith("#noautobond")&&(this.line=this.line.substring(0,this.line.lastIndexOf("#")).trim(),this.asc.setNoAutoBond());b=this.line.indexOf("jmolscript:");
0<=b&&(d=this.line.substring(b+11,this.line.length),0<=d.indexOf("#")&&(d=d.substring(0,d.indexOf("#"))),this.addJmolScript(d),this.line=this.line.substring(0,b).trim())});c(c$,"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(c$,"addSiteScript",function(a){null==this.siteScript?this.siteScript=
"":this.siteScript.endsWith(";")||(this.siteScript+=";");this.siteScript+=a;this.asc.setInfo("sitescript",this.siteScript)},"~S");c(c$,"rd",function(){return this.RL()});c(c$,"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++;JU.Logger.debugging&&JU.Logger.debug(this.line);return this.line});c$.getStrings=c(c$,"getStrings",function(a,b,d){for(var e=Array(b),c=0,f=0;c<b;c++,f+=d)e[c]=a.substring(f,
f+d);return e},"~S,~N,~N");c(c$,"getTokens",function(){return JU.PT.getTokens(this.line)});c(c$,"parseStringInfestedFloatArray",function(a,b){JU.Parser.parseStringInfestedFloatArray(a,null,b)},"~S,~A");c$.getTokensFloat=c(c$,"getTokensFloat",function(a,b,d){null==b&&(b=L(d,0));JU.PT.parseFloatArrayDataN(J.adapter.smarter.AtomSetCollectionReader.getTokensStr(a),b,d);return b},"~S,~A,~N");c$.getTokensStr=c(c$,"getTokensStr",function(a){return JU.PT.getTokens(a)},"~S");c$.getTokensAt=c(c$,"getTokensAt",
function(a,b){return JU.PT.getTokensAt(a,b)},"~S,~N");c(c$,"parseFloat",function(){return JU.PT.parseFloatNext(this.line,this.next)});c(c$,"parseFloatStr",function(a){this.next[0]=0;return JU.PT.parseFloatNext(a,this.next)},"~S");c(c$,"parseFloatRange",function(a,b,d){this.next[0]=b;return JU.PT.parseFloatRange(a,d,this.next)},"~S,~N,~N");c(c$,"parseInt",function(){return JU.PT.parseIntNext(this.line,this.next)});c(c$,"parseIntStr",function(a){this.next[0]=0;return JU.PT.parseIntNext(a,this.next)},
"~S");c(c$,"parseIntAt",function(a,b){this.next[0]=b;return JU.PT.parseIntNext(a,this.next)},"~S,~N");c(c$,"parseIntRange",function(a,b,d){this.next[0]=b;return JU.PT.parseIntRange(a,d,this.next)},"~S,~N,~N");c(c$,"parseToken",function(){return JU.PT.parseTokenNext(this.line,this.next)});c(c$,"parseTokenStr",function(a){this.next[0]=0;return JU.PT.parseTokenNext(a,this.next)},"~S");c(c$,"parseTokenNext",function(a){return JU.PT.parseTokenNext(a,this.next)},"~S");c(c$,"parseTokenRange",function(a,
b,d){this.next[0]=b;return JU.PT.parseTokenRange(a,d,this.next)},"~S,~N,~N");c$.parseTrimmedAt=c(c$,"parseTrimmedAt",function(a,b){return JU.PT.parseTrimmedAt(a,b)},"~S,~N");c$.parseTrimmedRange=c(c$,"parseTrimmedRange",function(a,b,d){return JU.PT.parseTrimmedRange(a,b,d)},"~S,~N,~N");c$.getFortranFormatLengths=c(c$,"getFortranFormatLengths",function(a){var b=new JU.Lst,d=0,e=0,c=1,f=!1,j=!0;a+=",";for(var k=0;k<a.length;k++){var l=a.charAt(k);switch(l){case ".":f=!1;continue;case ",":for(f=0;f<
e;f++)b.addLast(Integer.$valueOf(d*c));f=!1;j=!0;e=0;continue;case "X":d=e;e=1;c=-1;continue}Character.isDigit(l)?f?d=10*d+l.charCodeAt(0)-48:j&&(e=10*e+l.charCodeAt(0)-48):Character.isLetter(l)?(d=0,f=!0,j=!1,c=1):f=!1}return b},"~S");c(c$,"read3Vectors",function(a){for(var b=Array(3),d=L(3,0),e=0;3>e;e++){if(0<e||Float.isNaN(this.parseFloatStr(this.line)))if(this.rd(),0==e&&null!=this.line){e=-1;continue}this.fillFloatArray(this.line,0,d);b[e]=new JU.V3;b[e].setA(d);a&&b[e].scale(0.5291772)}return b},
"~B");c(c$,"setElementAndIsotope",function(a,b){var d=this.parseIntStr(b);-2147483648==d?a.elementSymbol=b:(b=b.substring((""+d).length),a.elementNumber=0==b.length?d:(d<<7)+J.api.JmolAdapter.getElementNumber(b))},"J.adapter.smarter.Atom,~S");c(c$,"finalizeModelSet",function(){});c(c$,"setChainID",function(a,b){a.chainID=this.vwr.getChainID(""+b)},"J.adapter.smarter.Atom,~S");h(c$,"readNextLine",function(){null!=this.rd()&&0<=this.line.indexOf("#jmolscript:")&&this.checkCurrentLineForScript();return this.line});
c(c$,"processDSSR",function(a,b){var d=this.vwr.getAnnotationParser().processDSSR(this.asc.getAtomSetAuxiliaryInfo(2147483647),a,this.line,b);this.appendLoadNote(d)},"javajs.api.GenericLineReader,java.util.Map");c(c$,"appendUunitCellInfo",function(a){null==this.moreUnitCellInfo&&(this.moreUnitCellInfo=new JU.Lst);this.moreUnitCellInfo.addLast(a);this.appendLoadNote(a)},"~S");C(c$,"ANGSTROMS_PER_BOHR",0.5291772)});n("J.adapter.smarter");c$=t(function(){this.atomSetIndex=0;s(this,arguments)},J.adapter.smarter,
"AtomSetObject");n("J.adapter.smarter");w(["J.adapter.smarter.AtomSetObject"],"J.adapter.smarter.Bond",null,function(){c$=t(function(){this.order=this.atomIndex2=this.atomIndex1=0;this.uniqueID=this.colix=this.radius=-1;s(this,arguments)},J.adapter.smarter,"Bond",J.adapter.smarter.AtomSetObject);u(c$,function(a,b,d){E(this,J.adapter.smarter.Bond,[]);this.atomIndex1=a;this.atomIndex2=b;this.order=d},"~N,~N,~N")});n("J.adapter.smarter");w(["J.api.JmolAdapterBondIterator"],"J.adapter.smarter.BondIterator",
null,function(){c$=t(function(){this.bonds=this.bsAtoms=null;this.ibond=0;this.bond=null;this.bondCount=0;s(this,arguments)},J.adapter.smarter,"BondIterator",J.api.JmolAdapterBondIterator);u(c$,function(a){E(this,J.adapter.smarter.BondIterator,[]);this.bsAtoms=a.bsAtoms;this.bonds=a.bonds;this.bondCount=a.bondCount;this.ibond=0},"J.adapter.smarter.AtomSetCollection");h(c$,"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});h(c$,"getAtomUniqueID1",function(){return Integer.$valueOf(this.bond.atomIndex1)});h(c$,"getAtomUniqueID2",function(){return Integer.$valueOf(this.bond.atomIndex2)});h(c$,"getEncodedOrder",function(){return this.bond.order});h(c$,"getRadius",function(){return this.bond.radius});h(c$,"getColix",function(){return this.bond.colix})});n("J.adapter.smarter");w(null,"J.adapter.smarter.Resolver",
"java.lang.Character $.Float java.util.StringTokenizer javajs.api.GenericBinaryDocument JU.LimitedLineReader $.PT J.adapter.smarter.AtomSetCollectionReader $.SmarterJmolAdapter J.api.Interface JU.Logger".split(" "),function(){c$=B(J.adapter.smarter,"Resolver");c$.getReaderClassBase=c(c$,"getReaderClassBase",function(a){var b=a+"Reader";if(a.startsWith("Xml"))return"J.adapter.readers.xml."+b;a=";"+a+";";for(var d=1;d<J.adapter.smarter.Resolver.readerSets.length;d+=2)if(0<=J.adapter.smarter.Resolver.readerSets[d].indexOf(a))return"J.adapter.readers."+
J.adapter.smarter.Resolver.readerSets[d-1]+b;return"J.adapter.readers.???."+b},"~S");c$.getFileType=c(c$,"getFileType",function(a){try{return J.adapter.smarter.Resolver.determineAtomSetCollectionReader(a,!1)}catch(b){if(y(b,Exception))return null;throw b;}},"java.io.BufferedReader");c$.getAtomCollectionReader=c(c$,"getAtomCollectionReader",function(a,b,d,e,c){var f=null;a=a.$replace("\\","/");var j=null;null!=b?(f=J.adapter.smarter.Resolver.getReaderFromType(b),null==f&&(f=J.adapter.smarter.Resolver.getReaderFromType("Xml"+
b)),null==f?j="unrecognized file format type "+b:JU.Logger.info("The Resolver assumes "+f)):(f=J.adapter.smarter.Resolver.determineAtomSetCollectionReader(d,!0),"\n"==f.charAt(0)&&(b=e.get("defaultType"),null!=b&&(b=J.adapter.smarter.Resolver.getReaderFromType(b),null!=b&&(f=b))),"\n"==f.charAt(0)?j="unrecognized file format for file\n"+a+"\n"+J.adapter.smarter.Resolver.split(f,50):f.equals("spt")?j="NOTE: file recognized as a script file: "+a+"\n":a.equals("ligand")||JU.Logger.info("The Resolver thinks "+
f));if(null!=j)return J.adapter.smarter.SmarterJmolAdapter.close(d),j;e.put("ptFile",Integer.$valueOf(c));0>=c&&e.put("readerName",f);0==f.indexOf("Xml")&&(f="Xml");a=a=null;a=J.adapter.smarter.Resolver.getReaderClassBase(f);return null==(f=J.api.Interface.getInterface(a))?(a="File reader was not found:"+a,JU.Logger.error(a),a):f},"~S,~S,~O,java.util.Map,~N");c$.getReaderFromType=c(c$,"getReaderFromType",function(a){a=";"+a.toLowerCase()+";";for(var b,d,e=J.adapter.smarter.Resolver.readerSets.length;0<=
--e;)if(0<=(d=(b=J.adapter.smarter.Resolver.readerSets[e--]).toLowerCase().indexOf(a)))return b.substring(d+1,b.indexOf(";",d+2));return null},"~S");c$.split=c(c$,"split",function(a,b){for(var d="",e=a.length,c=0,f=0;c<e;c=f)d+=a.substring(c,f=Math.min(c+b,e))+"\n";return d},"~S,~N");c$.DOMResolve=c(c$,"DOMResolve",function(a,b){var d=null,e,d=J.adapter.smarter.Resolver.getXmlType(b.get("nameSpaceInfo"));JU.Logger.debugging&&JU.Logger.debug("The Resolver thinks "+d);b.put("readerName",d);d="J.adapter.readers.xml.XmlReader";
if(null!=(e=J.api.Interface.getInterface(d)))return e;d="File reader was not found:"+d;JU.Logger.error(d);return d},"~O,java.util.Map");c$.determineAtomSetCollectionReader=c(c$,"determineAtomSetCollectionReader",function(a,b){if(p(a,javajs.api.GenericBinaryDocument))return"PyMOL";for(var d=new JU.LimitedLineReader(a,16384),e=d.getHeader(64).trim(),c=0;c<J.adapter.smarter.Resolver.fileStartsWithRecords.length;++c)for(var f=J.adapter.smarter.Resolver.fileStartsWithRecords[c],j=1;j<f.length;++j)if(e.startsWith(f[j]))return f[0];
if(1==e.indexOf("PNG")&&0<=e.indexOf("PNGJ"))return"pngj";if(1==e.indexOf("PNG")||1==e.indexOf("JPG")||6==e.indexOf("JFIF"))return"spt";if(e.startsWith("##TITLE"))return"Jcampdx";e=Array(16);for(c=f=0;c<e.length;++c)e[c]=d.readLineWithNewline(),0<e[c].length&&f++;var k;return null!=(k=J.adapter.smarter.Resolver.checkSpecial(f,e,!1))||null!=(k=J.adapter.smarter.Resolver.checkLineStarts(e))||null!=(k=J.adapter.smarter.Resolver.checkHeaderContains(d.getHeader(0)))||null!=(k=J.adapter.smarter.Resolver.checkSpecial(f,
e,!0))?k:b?"\n"+e[0]+"\n"+e[1]+"\n"+e[2]+"\n":null},"~O,~B");c$.checkHeaderContains=c(c$,"checkHeaderContains",function(a){for(var b=0;b<J.adapter.smarter.Resolver.headerContainsRecords.length;++b)for(var d=J.adapter.smarter.Resolver.headerContainsRecords[b],e=1;e<d.length;++e)if(!(0>a.indexOf(d[e])))return b=d[0],!b.equals("Xml")?b: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");
c$.checkLineStarts=c(c$,"checkLineStarts",function(a){for(var b=0;b<J.adapter.smarter.Resolver.lineStartsWithRecords.length;++b)for(var d=J.adapter.smarter.Resolver.lineStartsWithRecords[b],e=1;e<d.length;++e)for(var c=d[e],f=0;f<a.length;f++)if(a[f].startsWith(c))return d[0];return null},"~A");c$.getXmlType=c(c$,"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("arguslab")?"XmlArgus":
0<=a.indexOf("jvxl")||0<=a.indexOf("http://www.xml-cml.org/schema")||0<=a.indexOf("cml:")?"XmlCml":0<=a.indexOf("XSD")?"XmlXsd":0<=a.indexOf(">vasp")?"XmlVasp":0<=a.indexOf("<GEOMETRY_INFO>")?"XmlQE":"XmlCml(unidentified)"},"~S");c$.checkSpecial=c(c$,"checkSpecial",function(a,b,d){if(d){if(J.adapter.smarter.Resolver.checkGromacs(b))return"Gromacs";if(J.adapter.smarter.Resolver.checkCrystal(b))return"Crystal";if(J.adapter.smarter.Resolver.checkCastep(b))return"Castep";if(J.adapter.smarter.Resolver.checkVaspposcar(b))return"VaspPoscar"}else{if(1==
a&&0<b[0].length&&Character.isDigit(b[0].charAt(0)))return"Jme";if(J.adapter.smarter.Resolver.checkMopacGraphf(b))return"MopacGraphf";if(J.adapter.smarter.Resolver.checkOdyssey(b))return"Odyssey";switch(J.adapter.smarter.Resolver.checkMol(b)){case 1:case 3:case 2E3:case 3E3:return"Mol"}switch(J.adapter.smarter.Resolver.checkXyz(b)){case 1:return"Xyz";case 2:return"Bilbao"}if(J.adapter.smarter.Resolver.checkAlchemy(b[0]))return"Alchemy";if(J.adapter.smarter.Resolver.checkFoldingXyz(b))return"FoldingXyz";
if(J.adapter.smarter.Resolver.checkCube(b))return"Cube";if(J.adapter.smarter.Resolver.checkWien2k(b))return"Wien2k";if(J.adapter.smarter.Resolver.checkAims(b))return"Aims";if(J.adapter.smarter.Resolver.checkGenNBO(b))return"GenNBO"}return null},"~N,~A,~B");c$.checkAims=c(c$,"checkAims",function(a){for(var b=0;b<a.length&&!a[b].startsWith("mol 1");b++){var d=JU.PT.getTokens(a[b]);if(0!=d.length&&(d[0].startsWith("atom")&&5<=d.length||d[0].startsWith("multipole")&&6<=d.length||d[0].startsWith("lattice_vector")&&
4<=d.length))return!0}return!1},"~A");c$.checkAlchemy=c(c$,"checkAlchemy",function(a){var b;if(0<=(b=a.indexOf("ATOMS"))&&a.indexOf("BONDS")>b)try{return 0<Integer.parseInt(a.substring(0,b).trim())}catch(d){if(!y(d,NumberFormatException))throw d;}return!1},"~S");c$.checkCastep=c(c$,"checkCastep",function(a){for(var b=0;b<a.length;b++)if(1==a[b].indexOf("Frequencies in         cm-1")||a[b].contains("CASTEP")||a[b].toUpperCase().startsWith("%BLOCK LATTICE_ABC")||a[b].toUpperCase().startsWith("%BLOCK LATTICE_CART")||
a[b].toUpperCase().startsWith("%BLOCK POSITIONS_FRAC")||a[b].toUpperCase().startsWith("%BLOCK POSITIONS_ABS")||a[b].contains("<-- E"))return!0;return!1},"~A");c$.checkVaspposcar=c(c$,"checkVaspposcar",function(a){var b=a[8].trim().toLowerCase();if(b.contains("direct")||b.contains("cartesian")||b.contains("selective"))return!0;a=a[7].trim().toLowerCase();return a.contains("direct")||a.contains("cartesian")?!0:!1},"~A");c$.checkCrystal=c(c$,"checkCrystal",function(a){var b=a[1].trim();if(b.equals("SLAB")||
b.equals("MOLECULE")||b.equals("CRYSTAL")||b.equals("POLYMER")||(b=a[3]).equals("SLAB")||b.equals("MOLECULE")||b.equals("POLYMER"))return!0;for(b=0;b<a.length;b++)if(a[b].trim().equals("OPTGEOM")||a[b].trim().equals("FREQCALC")||a[b].contains("DOVESI")||a[b].contains("TORINO")||a[b].contains("http://www.crystal.unito.it")||a[b].contains("Pcrystal")||a[b].contains("MPPcrystal")||a[b].contains("crystal executable"))return!0;return!1},"~A");c$.checkCube=c(c$,"checkCube",function(a){try{for(var b=2;5>=
b;b++){var d=new java.util.StringTokenizer(a[b]),e=d.countTokens();if(!(4==e||2==b&&5==e))return!1;Integer.parseInt(d.nextToken());for(var c=3;0<=--c;)JU.PT.fVal(d.nextToken());5==e&&Integer.parseInt(d.nextToken())}return!0}catch(f){if(!y(f,NumberFormatException))throw f;}return!1},"~A");c$.checkFoldingXyz=c(c$,"checkFoldingXyz",function(a){var b=new java.util.StringTokenizer(a[0].trim()," \t");if(2>b.countTokens())return!1;try{Integer.parseInt(b.nextToken().trim())}catch(d){if(y(d,NumberFormatException))return!1;
throw d;}b=a[1].trim();0==b.length&&(b=a[2].trim());b=new java.util.StringTokenizer(b," \t");if(0==b.countTokens())return!1;try{Integer.parseInt(b.nextToken().trim())}catch(e){if(y(e,NumberFormatException))return!1;throw e;}return!0},"~A");c$.checkGenNBO=c(c$,"checkGenNBO",function(a){return a[1].startsWith(" Basis set information needed for plotting orbitals")||0<=a[1].indexOf("s in the AO basis:")||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");c$.checkGromacs=c(c$,"checkGromacs",
function(a){if(-2147483648==JU.PT.parseInt(a[1]))return!1;for(var b=-1,d=2;16>d&&0!=b;d++)if(69!=(b=a[d].length)&&45!=b&&0!=b)return!1;return!0},"~A");c$.checkMol=c(c$,"checkMol",function(a){var b=("X"+a[3]).trim().toUpperCase();if(7>b.length||0<=b.indexOf("."))return 0;if(b.endsWith("V2000"))return 2E3;if(b.endsWith("V3000"))return 3E3;try{var d=Integer.parseInt(a[3].substring(0,3).trim()),e=Integer.parseInt(a[3].substring(3,6).trim());return 0<d&&0<=e&&0!=a[0].indexOf("@<TRIPOS>")&&0!=a[1].indexOf("@<TRIPOS>")&&
0!=a[2].indexOf("@<TRIPOS>")?3:0}catch(c){if(!y(c,NumberFormatException))throw c;}return 0},"~A");c$.checkMopacGraphf=c(c$,"checkMopacGraphf",function(a){return 2<a[0].indexOf("MOPAC-Graphical data")},"~A");c$.checkOdyssey=c(c$,"checkOdyssey",function(a){var b;for(b=0;b<a.length&&(a[b].startsWith("C ")||0==a[b].length);b++);if(b>=a.length||" "!=a[b].charAt(0)||(b+=2)+1>=a.length)return!1;try{var d=Integer.parseInt(a[b].substring(2).trim()),e=Integer.parseInt(a[b].substring(0,2).trim()),c=Integer.parseInt(a[++b].substring(0,
2).trim());if(0>d||5<d||0>=c||5<e)return!1;var f=J.adapter.smarter.AtomSetCollectionReader.getTokensFloat(a[b],null,5);return!Float.isNaN(f[1])&&!Float.isNaN(f[2])&&!Float.isNaN(f[3])&&Float.isNaN(f[4])}catch(j){if(!y(j,Exception))throw j;}return!1},"~A");c$.checkWien2k=c(c$,"checkWien2k",function(a){return a[2].startsWith("MODE OF CALC=")||a[2].startsWith("             RELA")||a[2].startsWith("             NREL")},"~A");c$.checkXyz=c(c$,"checkXyz",function(a){try{Integer.parseInt(a[0].trim());try{Integer.parseInt(a[2].trim())}catch(b){if(y(b,
NumberFormatException))return 1;throw b;}return 2}catch(d){if(y(d,NumberFormatException)){if(0<=a[0].indexOf("Bilbao Crys"))return 2}else throw d;}return 0},"~A");C(c$,"classBase","J.adapter.readers.");c$.readerSets=c$.prototype.readerSets="cif. ;Cif;MMCif; molxyz. ;Mol3D;Mol;Xyz; more. ;BinaryDcd;Gromacs;Jcampdx;MdCrd;MdTop;Mol2;TlsDataOnly; quantum. ;Adf;Csf;Dgrid;GamessUK;GamessUS;Gaussian;GaussianFchk;GaussianWfn;Jaguar;Molden;MopacGraphf;GenNBO;NWChem;Odyssey;Psi;Qchem;Spartan;SpartanSmol;WebMO; pdb. ;Pdb;Pqr;P2n; pymol. ;PyMOL; simple. ;Alchemy;Ampac;Cube;FoldingXyz;GhemicalMM;HyperChem;Jme;JSON;Mopac;MopacArchive;Tinker;ZMatrix; xtal. ;Abinit;Aims;Bilbao;Castep;Crystal;Dmol;Espresso;Gulp;Jana;Magres;Shelx;Siesta;VaspOutcar;VaspPoscar;Wien2k;Xcrysden; xml. ;XmlArgus;XmlCml;XmlChem3d;XmlMolpro;XmlOdyssey;XmlXsd;XmlVasp;XmlQE;".split(" ");
C(c$,"CML_NAMESPACE_URI","http://www.xml-cml.org/schema","LEADER_CHAR_MAX",64,"sptContainsRecords",["spt","# Jmol state","# Jmol script","JmolManifest"],"cubeFileStartRecords",["Cube","JVXL","#JVXL"],"mol2Records",["Mol2","mol2","@<TRIPOS>"],"webmoFileStartRecords",["WebMO","[HEADER]"],"moldenFileStartRecords",["Molden","[Molden"],"dcdFileStartRecords",["BinaryDcd","T\x00\x00\x00CORD","\x00\x00\x00TCORD"],"tlsDataOnlyFileStartRecords",["TlsDataOnly","REFMAC\n\nTL","REFMAC\r\n\r\n","REFMAC\r\rTL"],
"zMatrixFileStartRecords",["ZMatrix","#ZMATRIX"],"magresFileStartRecords",["Magres","#$magres","# magres"],"pymolStartRecords",["PyMOL","}q"],"janaStartRecords",["Jana","Version Jana"],"jsonStartRecords",["JSON",'{"mol":'],"m3dStartRecords",["Alchemy","STRUCTURE  1.00     1"]);c$.fileStartsWithRecords=c$.prototype.fileStartsWithRecords=[J.adapter.smarter.Resolver.sptContainsRecords,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.zMatrixFileStartRecords,J.adapter.smarter.Resolver.magresFileStartRecords,J.adapter.smarter.Resolver.pymolStartRecords,J.adapter.smarter.Resolver.janaStartRecords,J.adapter.smarter.Resolver.jsonStartRecords];C(c$,"pqrLineStartRecords",["Pqr","REMARK   1 PQR"],"p2nLineStartRecords",
["P2n","REMARK   1 P2N"],"pdbLineStartRecords","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  ".split(";"),"shelxLineStartRecords","Shelx;TITL ;ZERR ;LATT ;SYMM ;CELL ".split(";"),"cifLineStartRecords",["Cif","data_","_publ"],"mmcifLineStartRecords",["MMCif","_database_PDB_"],"ghemicalMMLineStartRecords",["GhemicalMM","!Header mm1gp",
"!Header gpr"],"jaguarLineStartRecords",["Jaguar","  |  Jaguar version"],"mdlLineStartRecords",["Mol","$MDL "],"spartanSmolLineStartRecords",["SpartanSmol","INPUT="],"csfLineStartRecords",["Csf","local_transform"],"mdTopLineStartRecords",["MdTop","%FLAG TITLE"],"hyperChemLineStartRecords",["HyperChem","mol 1"],"vaspOutcarLineStartRecords",["VaspOutcar"," vasp."," INCAR:"]);c$.lineStartsWithRecords=c$.prototype.lineStartsWithRecords=[J.adapter.smarter.Resolver.mmcifLineStartRecords,J.adapter.smarter.Resolver.cifLineStartRecords,
J.adapter.smarter.Resolver.pqrLineStartRecords,J.adapter.smarter.Resolver.p2nLineStartRecords,J.adapter.smarter.Resolver.pdbLineStartRecords,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];C(c$,"xmlContainsRecords",'Xml <?xml <atom <molecule <reaction <cml <bond .dtd" <list> <entry <identifier http://www.xml-cml.org/schema/cml2/core'.split(" "),"gaussianContainsRecords",["Gaussian","Entering Gaussian System","Entering Link 1","1998 Gaussian, Inc."],"bilbaoContainsRecords",["Bilbao",">Bilbao Crystallographic Server<"],"gaussianFchkContainsRecords",["GaussianFchk","Number of point charges in /Mol/"],
"ampacContainsRecords",["Ampac","AMPAC Version"],"mopacContainsRecords","Mopac;MOPAC 93 (c) Fujitsu;MOPAC FOR LINUX (PUBLIC DOMAIN VERSION);MOPAC:  VERSION  6;MOPAC   7;MOPAC2;MOPAC (PUBLIC".split(";"),"qchemContainsRecords",["Qchem","Welcome to Q-Chem","A Quantum Leap Into The Future Of Chemistry"],"gamessUKContainsRecords",["GamessUK","GAMESS-UK","G A M E S S - U K"],"gamessUSContainsRecords",["GamessUS","GAMESS"],"spartanBinaryContainsRecords",["SpartanSmol","|PropertyArchive","_spartan","spardir",
"BEGIN Directory Entry Molecule"],"spartanContainsRecords",["Spartan","Spartan"],"adfContainsRecords",["Adf","Amsterdam Density Functional"],"dgridContainsRecords",["Dgrid","BASISFILE   created by DGrid"],"dmolContainsRecords",["Dmol","DMol^3"],"gulpContainsRecords",["Gulp","GENERAL UTILITY LATTICE PROGRAM"],"psiContainsRecords",["Psi","    PSI  3","PSI3:"],"nwchemContainsRecords",["NWChem"," argument  1 = "],"uicrcifContainsRecords",["Cif","Crystallographic Information File"],"crystalContainsRecords",
["Crystal","*                                CRYSTAL","TORINO","DOVESI"],"espressoContainsRecords",["Espresso","Program PWSCF","Program PHONON"],"siestaContainsRecords",["Siesta","MD.TypeOfRun","SolutionMethod","MeshCutoff","WELCOME TO SIESTA"],"xcrysDenContainsRecords",["Xcrysden","PRIMVEC","CONVVEC","PRIMCOORD","ANIMSTEP"],"mopacArchiveContainsRecords",["MopacArchive","SUMMARY OF PM"],"abinitContainsRecords",["Abinit","http://www.abinit.org","Catholique","Louvain"]);c$.headerContainsRecords=c$.prototype.headerContainsRecords=
[J.adapter.smarter.Resolver.sptContainsRecords,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.qchemContainsRecords,J.adapter.smarter.Resolver.gamessUKContainsRecords,J.adapter.smarter.Resolver.gamessUSContainsRecords,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]});n("J.adapter.smarter");w(["J.api.JmolAdapter"],"J.adapter.smarter.SmarterJmolAdapter","java.io.BufferedReader javajs.api.GenericBinaryDocument JU.Rdr J.adapter.smarter.AtomIterator $.AtomSetCollection $.AtomSetCollectionReader $.BondIterator $.Resolver $.StructureIterator JU.Logger".split(" "),
function(){c$=B(J.adapter.smarter,"SmarterJmolAdapter",J.api.JmolAdapter);h(c$,"getFileTypeName",function(a){return p(a,J.adapter.smarter.AtomSetCollection)?a.fileTypeName:p(a,java.io.BufferedReader)?J.adapter.smarter.Resolver.getFileType(a):null},"~O");h(c$,"getAtomSetCollectionReader",function(a,b,d,e){return J.adapter.smarter.SmarterJmolAdapter.staticGetAtomSetCollectionReader(a,b,d,e)},"~S,~S,~O,java.util.Map");c$.staticGetAtomSetCollectionReader=c(c$,"staticGetAtomSetCollectionReader",function(a,
b,d,e){try{var c=J.adapter.smarter.Resolver.getAtomCollectionReader(a,b,d,e,-1);if(p(c,String))try{J.adapter.smarter.SmarterJmolAdapter.close(d)}catch(f){if(!y(f,Exception))throw f;}else c.setup(a,e,d);return c}catch(j){try{J.adapter.smarter.SmarterJmolAdapter.close(d)}catch(k){if(!y(k,Exception))throw k;}JU.Logger.error(""+j);return""+j}},"~S,~S,~O,java.util.Map");c(c$,"getAtomSetCollectionFromReader",function(a,b,d){var e=J.adapter.smarter.Resolver.getAtomCollectionReader(a,null,b,d,-1);return p(e,
J.adapter.smarter.AtomSetCollectionReader)?(e.setup(a,d,b),e.readData()):""+e},"~S,~O,java.util.Map");h(c$,"getAtomSetCollection",function(a){return J.adapter.smarter.SmarterJmolAdapter.staticGetAtomSetCollection(a)},"~O");c$.staticGetAtomSetCollection=c(c$,"staticGetAtomSetCollection",function(a){var b=null;try{var b=a.reader,d=a.readData();return!p(d,J.adapter.smarter.AtomSetCollection)?d:null!=d.errorMessage?d.errorMessage:d}catch(e){try{JU.Logger.info(e.toString())}catch(c){if(y(c,Exception))JU.Logger.error(e.toString());
else throw c;}try{b.close()}catch(f){if(!y(f,Exception))throw f;}JU.Logger.error(""+e);return""+e}},"J.adapter.smarter.AtomSetCollectionReader");h(c$,"getAtomSetCollectionReaders",function(a,b,d,e,c){var f=e.get("vwr"),j=b.length,k=c?Array(j):null,l=null;if(e.containsKey("concatenate")){for(var l="",h=0;h<j;h++){var r=f.getFileAsString(b[h],!1);if(0<h&&3>=j&&r.startsWith("{")){var x=r.contains("/outliers/")?"validation":"domains",r=f.evaluateExpressionAsVariable(r);null!=r&&null!=r.getMap()&&e.put(x,
r)}else l+=r,l.endsWith("\n")||(l+="\n")}j=1;l=JU.Rdr.getBR(l)}x=c?null:Array(j);r=null;for(h=0;h<j;h++)try{null!=r&&e.put("vwr",f);null==l&&(l=a.getBufferedReaderOrBinaryDocument(h,!1));if(!p(l,java.io.BufferedReader)&&!p(l,javajs.api.GenericBinaryDocument))return l;var A=J.adapter.smarter.Resolver.getAtomCollectionReader(b[h],null==d?null:d[h],l,e,h);if(!p(A,J.adapter.smarter.AtomSetCollectionReader))return A;r=A;r.setup(null,null,null);r.isBinary?r.setup(b[h],e,a.getBufferedReaderOrBinaryDocument(h,
!0)):r.setup(b[h],e,l);l=null;if(c)k[h]=r;else{A=r.readData();if(!p(A,J.adapter.smarter.AtomSetCollection))return A;x[h]=A;if(null!=x[h].errorMessage)return x[h].errorMessage}}catch(I){return JU.Logger.error(""+I),f.isJS||I.printStackTrace(),""+I}return c?k:this.getAtomSetCollectionFromSet(k,x,e)},"J.api.JmolFilesReaderInterface,~A,~A,java.util.Map,~B");h(c$,"getAtomSetCollectionFromSet",function(a,b,d){var e=null==b?Array(a.length):b;if(null==b)for(b=0;b<a.length;b++)try{var c=a[b].readData();if(!p(c,
J.adapter.smarter.AtomSetCollection))return c;e[b]=c;if(null!=e[b].errorMessage)return e[b].errorMessage}catch(f){return JU.Logger.error(""+f),""+f}if(d.containsKey("trajectorySteps")){a=e[0];try{a.finalizeTrajectoryAs(d.get("trajectorySteps"),d.get("vibrationSteps"))}catch(j){if(y(j,Exception))null==a.errorMessage&&(a.errorMessage=""+j);else throw j;}}else if(e[0].isTrajectory){a=e[0];for(b=1;b<e.length;b++)e[0].mergeTrajectories(e[b])}else a=1==e.length?e[0]:new J.adapter.smarter.AtomSetCollection("Array",
null,e,null);return null==a.errorMessage?a:a.errorMessage},"~O,~O,java.util.Map");h(c$,"getAtomSetCollectionFromDOM",function(a,b){try{var d=J.adapter.smarter.Resolver.DOMResolve(a,b);if(!p(d,J.adapter.smarter.AtomSetCollectionReader))return d;var e=d;e.setup("DOM node",b,null);d=e.readDataObject(a);return!p(d,J.adapter.smarter.AtomSetCollection)?d:null!=d.errorMessage?d.errorMessage:d}catch(c){return JU.Logger.error(""+c),""+c}},"~O,java.util.Map");h(c$,"finish",function(a){a.finish()},"~O");h(c$,
"getAtomSetCollectionName",function(a){return a.collectionName},"~O");h(c$,"getAtomSetCollectionAuxiliaryInfo",function(a){return a.ascAuxiliaryInfo},"~O");h(c$,"getAtomSetCount",function(a){return a.atomSetCount},"~O");h(c$,"getAtomSetNumber",function(a,b){return a.getAtomSetNumber(b)},"~O,~N");h(c$,"getAtomSetName",function(a,b){return a.getAtomSetName(b)},"~O,~N");h(c$,"getAtomSetAuxiliaryInfo",function(a,b){return a.getAtomSetAuxiliaryInfo(b)},"~O,~N");h(c$,"getHydrogenAtomCount",function(a){return a.getHydrogenAtomCount()},
"~O");h(c$,"getBondList",function(a){return a.getBondList()},"~O");h(c$,"getAtomCount",function(a){return null==a.bsAtoms?a.ac:a.bsAtoms.cardinality()},"~O");h(c$,"coordinatesAreFractional",function(a){return a.coordinatesAreFractional},"~O");h(c$,"getAtomIterator",function(a){return new J.adapter.smarter.AtomIterator(a)},"~O");h(c$,"getBondIterator",function(a){return new J.adapter.smarter.BondIterator(a)},"~O");h(c$,"getStructureIterator",function(a){return 0==a.structureCount?null:new J.adapter.smarter.StructureIterator(a)},
"~O");c$.close=c(c$,"close",function(a){p(a,java.io.BufferedReader);a.close()},"~O");C(c$,"PATH_KEY",".PATH");c$.PATH_SEPARATOR=c$.prototype.PATH_SEPARATOR=System.getProperty("path.separator","/")});n("J.adapter.smarter");w(["J.api.JmolAdapterStructureIterator"],"J.adapter.smarter.StructureIterator",["J.api.JmolAdapter"],function(){c$=t(function(){this.structureCount=0;this.structure=this.structures=null;this.istructure=0;this.bsModelsDefined=null;s(this,arguments)},J.adapter.smarter,"StructureIterator",
J.api.JmolAdapterStructureIterator);u(c$,function(a){E(this,J.adapter.smarter.StructureIterator,[]);this.structureCount=a.structureCount;this.structures=a.structures;this.istructure=0;this.bsModelsDefined=a.bsStructuredModels},"J.adapter.smarter.AtomSetCollection");h(c$,"hasNext",function(){if(this.istructure==this.structureCount)return!1;this.structure=this.structures[this.istructure++];return!0});h(c$,"getStructureType",function(){return this.structure.structureType});h(c$,"getSubstructureType",
function(){return this.structure.substructureType});h(c$,"getStructureID",function(){return this.structure.structureID});h(c$,"getSerialID",function(){return this.structure.serialID});h(c$,"getStartChainID",function(){return this.structure.startChainID});h(c$,"getStartSequenceNumber",function(){return this.structure.startSequenceNumber});h(c$,"getStartInsertionCode",function(){return J.api.JmolAdapter.canonizeInsertionCode(this.structure.startInsertionCode)});h(c$,"getEndChainID",function(){return this.structure.endChainID});
h(c$,"getEndSequenceNumber",function(){return this.structure.endSequenceNumber});h(c$,"getEndInsertionCode",function(){return this.structure.endInsertionCode});h(c$,"getStrandCount",function(){return this.structure.strandCount});h(c$,"getStructuredModels",function(){return this.bsModelsDefined});h(c$,"getAtomIndices",function(){return this.structure.atomStartEnd});h(c$,"getModelIndices",function(){return this.structure.modelStartEnd})});n("J.api");H(J.api,"AtomIndexIterator");n("J.api");w(null,"J.api.Interface",
["JU.Logger"],function(){c$=B(J.api,"Interface");c$.getInterface=c(c$,"getInterface",function(a){try{var b=Z._4Name(a);return null==b?null:b.newInstance()}catch(d){if(y(d,Exception))return JU.Logger.error("Interface.java Error creating instance for "+a+": \n"+d),null;throw d;}},"~S");c$.getOption=c(c$,"getOption",function(a){return J.api.Interface.getInterface("J."+a)},"~S");c$.getUtil=c(c$,"getUtil",function(a){return J.api.Interface.getInterface("JU."+a)},"~S");c$.getSymmetry=c(c$,"getSymmetry",
function(){return J.api.Interface.getInterface("JS.Symmetry")})});n("J.api");w(["J.c.QS"],"J.api.JmolAdapter",["java.util.Hashtable","J.api.JmolViewer","JU.Elements","JV.JC"],function(){c$=B(J.api,"JmolAdapter");c$.getShellEnumeration=c(c$,"getShellEnumeration",function(a){return J.c.QS.getItem(a)},"~N");c$.getNewDfCoefMap=c(c$,"getNewDfCoefMap",function(){return J.c.QS.getNewDfCoefMap()});c$.getElementSymbol=c(c$,"getElementSymbol",function(a){return JU.Elements.elementSymbolFromNumber(a)},"~N");
c$.getElementNumber=c(c$,"getElementNumber",function(a){return JU.Elements.elementNumberFromSymbol(a,!1)},"~S");c$.getNaturalIsotope=c(c$,"getNaturalIsotope",function(a){return JU.Elements.getNaturalIsotope(a)},"~N");c$.isHetero=c(c$,"isHetero",function(a){return JV.JC.isHetero(a)},"~S");c$.getQuantumShellTag=c(c$,"getQuantumShellTag",function(a){return J.c.QS.getQuantumShellTag(a)},"~N");c$.getQuantumShellTagID=c(c$,"getQuantumShellTagID",function(a){return J.c.QS.getQuantumShellTagID(a)},"~S");
c$.getQuantumShellTagIDSpherical=c(c$,"getQuantumShellTagIDSpherical",function(a){return J.c.QS.getQuantumShellTagIDSpherical(a)},"~S");c$.getBondingRadius=c(c$,"getBondingRadius",function(a,b){return JU.Elements.getBondingRadius(a,b)},"~N,~N");c(c$,"getAtomSetCollectionFromReader",function(a,b,d,e){null==e&&(e=new java.util.Hashtable);e.containsKey("vwr")||e.put("vwr",J.api.JmolViewer.allocateViewer(null,this));a=this.getAtomSetCollectionReader(a,b,d,e);return p(a,String)?a:this.getAtomSetCollection(a)},
"~S,~S,~O,java.util.Map");c(c$,"openBufferedReader",function(a,b){return this.getAtomSetCollectionFromReader(a,null,b,null)},"~S,java.io.BufferedReader");c(c$,"openBufferedReader",function(a,b,d){return this.getAtomSetCollectionFromReader(a,null,b,d)},"~S,java.io.BufferedReader,java.util.Map");c(c$,"openBufferedReader",function(a,b,d){return this.getAtomSetCollectionFromReader(a,b,d,null)},"~S,~S,java.io.BufferedReader");c$.canonizeAlphaDigit=c(c$,"canonizeAlphaDigit",function(a){return"A"<=a&&"Z">=
a||"a"<=a&&"z">=a||"0"<=a&&"9">=a?a:"\x00"},"~S");c$.canonizeInsertionCode=c(c$,"canonizeInsertionCode",function(a){return J.api.JmolAdapter.canonizeAlphaDigit(a)},"~S");c$.canonizeAlternateLocationID=c(c$,"canonizeAlternateLocationID",function(a){return J.api.JmolAdapter.canonizeAlphaDigit(a)},"~S");C(c$,"ORDER_COVALENT_SINGLE",1,"ORDER_COVALENT_DOUBLE",2,"ORDER_COVALENT_TRIPLE",3,"ORDER_AROMATIC",515,"ORDER_AROMATIC_SINGLE",513,"ORDER_AROMATIC_DOUBLE",514,"ORDER_HBOND",2048,"ORDER_STEREO_NEAR",
1025,"ORDER_STEREO_FAR",1041,"ORDER_PARTIAL01",33,"ORDER_PARTIAL12",66,"ORDER_PARTIAL23",97,"ORDER_PARTIAL32",100,"ORDER_UNSPECIFIED",17,"ORDER_PYMOL_SINGLE",65536,"ORDER_PYMOL_MULT",98304);c$.SHELL_S=c$.prototype.SHELL_S=J.c.QS.S.id;c$.SHELL_P=c$.prototype.SHELL_P=J.c.QS.P.id;c$.SHELL_SP=c$.prototype.SHELL_SP=J.c.QS.SP.id;c$.SHELL_L=c$.prototype.SHELL_L=J.c.QS.SP.id;c$.SHELL_D_SPHERICAL=c$.prototype.SHELL_D_SPHERICAL=J.c.QS.D_SPHERICAL.id;c$.SHELL_D_CARTESIAN=c$.prototype.SHELL_D_CARTESIAN=J.c.QS.D_CARTESIAN.id;
c$.SHELL_F_SPHERICAL=c$.prototype.SHELL_F_SPHERICAL=J.c.QS.F_SPHERICAL.id;c$.SHELL_F_CARTESIAN=c$.prototype.SHELL_F_CARTESIAN=J.c.QS.F_CARTESIAN.id;c$.SHELL_G_SPHERICAL=c$.prototype.SHELL_G_SPHERICAL=J.c.QS.G_SPHERICAL.id;c$.SHELL_G_CARTESIAN=c$.prototype.SHELL_G_CARTESIAN=J.c.QS.G_CARTESIAN.id;c$.SHELL_H_SPHERICAL=c$.prototype.SHELL_H_SPHERICAL=J.c.QS.H_SPHERICAL.id;c$.SHELL_H_CARTESIAN=c$.prototype.SHELL_H_CARTESIAN=J.c.QS.H_CARTESIAN.id;c$.SUPPORTED_BASIS_FUNCTIONS=c$.prototype.SUPPORTED_BASIS_FUNCTIONS=
"SPLDF";c$.NOTE_SCRIPT_FILE=c$.prototype.NOTE_SCRIPT_FILE="NOTE: file recognized as a script file: ";C(c$,"cellParamNames","_cell_length_a _cell_length_b _cell_length_c _cell_angle_alpha _cell_angle_beta _cell_angle_gamma".split(" "))});n("J.api");H(J.api,"JmolAdapterAtomIterator");n("J.api");c$=B(J.api,"JmolAdapterBondIterator");n("J.api");c$=B(J.api,"JmolAdapterStructureIterator");n("J.api");H(J.api,"JmolAppConsoleInterface");n("J.api");w(["J.api.JmolSyncInterface"],"J.api.JmolAppletInterface",
null,function(){H(J.api,"JmolAppletInterface",J.api.JmolSyncInterface)});n("J.api");H(J.api,"JmolCallbackListener");n("J.api");H(J.api,"JmolAnnotationParser");n("J.api");H(J.api,"JmolGraphicsInterface");n("J.api");H(J.api,"JmolMeasurementClient");n("J.api");H(J.api,"JmolModulationSet");n("J.api");H(J.api,"JmolNavigatorInterface",Runnable);n("J.api");w(["J.api.JmolGraphicsInterface"],"J.api.JmolRendererInterface",null,function(){H(J.api,"JmolRendererInterface",J.api.JmolGraphicsInterface)});n("J.api");
H(J.api,"JmolRepaintManager");n("J.api");w(["J.api.JmolCallbackListener"],"J.api.JmolStatusListener",null,function(){H(J.api,"JmolStatusListener",J.api.JmolCallbackListener)});n("J.api");H(J.api,"JmolSyncInterface");n("J.api");w(null,"J.api.JmolViewer",["java.lang.Boolean","java.util.Hashtable"],function(){c$=t(function(){this.apiPlatform=this.menuStructure=null;s(this,arguments)},J.api,"JmolViewer");c$.allocateViewer=c(c$,"allocateViewer",function(a,b,d,e,c,f,j,k){var l=new java.util.Hashtable;null!=
a&&l.put("display",a);null!=b&&l.put("adapter",b);null!=j&&l.put("statuslistener",j);null!=k&&l.put("platform",k);null!=f&&l.put("options",f);null!=d&&l.put("fullname",d);null!=e&&l.put("documentbase",e);null!=c&&l.put("codebase",c);return new JV.Viewer(l)},"~O,J.api.JmolAdapter,~S,java.net.URL,java.net.URL,~S,J.api.JmolStatusListener,javajs.api.GenericPlatform");c$.allocateViewer=c(c$,"allocateViewer",function(a,b){return J.api.JmolViewer.allocateViewer(a,b,null,null,null,null,null,null)},"~O,J.api.JmolAdapter");
c$.allocateViewer=c(c$,"allocateViewer",function(a,b,d,e,c,f,j){return J.api.JmolViewer.allocateViewer(a,b,d,e,c,f,j,null)},"~O,J.api.JmolAdapter,~S,java.net.URL,java.net.URL,~S,J.api.JmolStatusListener");c(c$,"setConsole",function(a){this.getProperty("DATA_API","getAppConsole",a)},"J.api.JmolAppConsoleInterface");c$.getJmolVersion=c(c$,"getJmolVersion",function(){return JV.Viewer.getJmolVersion()});c$.checkOption=c(c$,"checkOption",function(a,b){var d=a.getParameter(b);return p(d,Boolean)&&d.booleanValue()||
p(d,Integer)&&0!=d.intValue()},"J.api.JmolViewer,~S");c(c$,"openFileAsync",function(a){this.openFileAsyncSpecial(a,0)},"~S");c(c$,"renderScreenImage",function(a,b){this.apiPlatform.renderScreenImage(a,b)},"~O,~O,~O");c(c$,"getJsObjectInfo",function(a,b,d){return this.apiPlatform.getJsObjectInfo(a,b,d)},"~A,~S,~A");c$.getJmolValueAsString=c(c$,"getJmolValueAsString",function(a,b){return null==a?"":""+a.getParameter(b)},"J.api.JmolViewer,~S");c(c$,"dispose",function(){})});n("J.api");H(J.api,"JmolZipUtilities");
n("J.api");H(J.api,"Translator");n("J.appletjs");w(["javajs.api.JSInterface","JU.GenericApplet","java.util.Hashtable"],"J.appletjs.Jmol",["JU.PT","JU.Logger","$.Parser"],function(){c$=t(function(){this.htParams=null;s(this,arguments)},J.appletjs,"Jmol",JU.GenericApplet,javajs.api.JSInterface);K(c$,function(){this.htParams=new java.util.Hashtable});u(c$,function(a){E(this,J.appletjs.Jmol,[]);null==a&&(a=new java.util.Hashtable);this.vwrOptions=a;for(var b,d=a.entrySet().iterator();d.hasNext()&&((b=
d.next())||1);)this.htParams.put(b.getKey().toLowerCase(),b.getValue());this.documentBase=""+a.get("documentBase");this.codeBase=""+a.get("codePath");this.isJS=!0;this.init(this)},"java.util.Map");h(c$,"setStereoGraphics",function(a){return a?vwr.apiPlatform.context:null},"~B");h(c$,"initOptions",function(){this.vwrOptions.remove("debug");this.vwrOptions.put("fullName",this.fullName);this.haveDocumentAccess="true".equalsIgnoreCase(""+this.getValue("allowjavascript","true"));this.mayScript=!0});h(c$,
"getJmolParameter",function(a){a=this.htParams.get(a.toLowerCase());return null==a?null:""+a},"~S");h(c$,"doSendJsTextStatus",function(a){System.out.println(a)},"~S");h(c$,"doSendJsTextareaStatus",function(a){System.out.println(a)},"~S");h(c$,"doFunctionXY",function(a,b,d){var e=L(Math.abs(b),Math.abs(d),0);if(!this.mayScript||!this.haveDocumentAccess||0==b||0==d)return e;try{if(0<b&&0<d)for(var c=0;c<b;c++)for(var f=0;f<d;f++)e[c][f]=eval(a)(this.htmlName,c,f);else if(0<d){var j;j=eval(a)(this.htmlName,
b,d);b=Math.abs(b);var k=L(b*d,0);JU.Parser.parseStringInfestedFloatArray(j,null,k);for(a=c=0;c<b;c++)for(f=0;f<d;f++,a++)e[c][f]=k[a]}else eval(a)(this.htmlName,b,d,e)}catch(l){if(y(l,Exception))JU.Logger.error("Exception "+l+" with nX, nY: "+b+" "+d);else throw l;}return e},"~S,~N,~N");h(c$,"doFunctionXYZ",function(a,b,d,e){var c=L(Math.abs(b),Math.abs(d),Math.abs(e),0);if(!this.mayScript||!this.haveDocumentAccess||0==b||0==d||0==e)return c;try{eval(a)(this.htmlName,b,d,e,c)}catch(f){if(y(f,Exception))JU.Logger.error("Exception "+
f+" for "+a+" with nX, nY, nZ: "+b+" "+d+" "+e);else throw f;}return c},"~S,~N,~N,~N");h(c$,"doShowDocument",function(a){window.open(a.toString())},"java.net.URL");h(c$,"doSendCallback",function(a,b,d){if(!(null==a||0==a.length))if(a.equals("alert"))alert(d);else{d=JU.PT.split(a,".");try{for(var e=window[d[0]],c=1;c<d.length;c++)e=e[d[c]];for(c=0;c<b.length;c++)b[c]&&b[c].booleanValue&&(b[c]=b[c].booleanValue());return e(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7])}catch(f){System.out.println(a+" failed "+
f)}}return""},"~S,~A,~S");h(c$,"doEval",function(a){try{return""+eval(a)}catch(b){if(y(b,Exception))JU.Logger.error("# error evaluating "+a+":"+b.toString());else throw b;}return""},"~S");h(c$,"doShowStatus",function(a){try{System.out.println(a)}catch(b){if(!y(b,Exception))throw b;}},"~S");h(c$,"cacheFileByName",function(a,b){return this.viewer.cacheFileByName(a,b)},"~S,~B");h(c$,"cachePut",function(a,b){this.viewer.cachePut(a,b)},"~S,~O");h(c$,"getGLmolView",function(){return this.viewer.getGLmolView()});
h(c$,"getFullName",function(){return this.fullName});h(c$,"processMouseEvent",function(a,b,d,e,c){return this.viewer.processMouseEvent(a,b,d,e,c)},"~N,~N,~N,~N,~N");h(c$,"setDisplay",function(a){this.viewer.setDisplay(a)},"~O");h(c$,"setStatusDragDropped",function(a,b,d,e){return this.viewer.setStatusDragDropped(a,b,d,e)},"~N,~N,~N,~S");h(c$,"startHoverWatcher",function(a){this.viewer.startHoverWatcher(a)},"~B");h(c$,"update",function(){this.viewer.updateJS()});h(c$,"openFile",function(a){return this.viewer.openFile(a)},
"~S");h(c$,"openFileAsyncSpecial",function(a,b){this.viewer.openFileAsyncSpecial(a,b)},"~S,~N");h(c$,"processTwoPointGesture",function(a){this.viewer.processTwoPointGesture(a)},"~A");h(c$,"setScreenDimension",function(a,b){this.viewer.setScreenDimension(a,b)},"~N,~N")});n("J.atomdata");c$=t(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.atomXyz=this.atomIndex=null;this.adpMode=this.hydrogenAtomCount=this.ac=0;s(this,arguments)},J.atomdata,"AtomData");u(c$,function(){});C(c$,"MODE_FILL_COORDS",1,"MODE_FILL_RADII",2,"MODE_FILL_MOLECULES",4,"MODE_GET_ATTACHED_HYDROGENS",8,"MODE_FILL_MULTIMODEL",16);n("J.atomdata");H(J.atomdata,"AtomDataServer");n("J.atomdata");w(["java.lang.Enum","J.c.VDW"],"J.atomdata.RadiusData",["java.lang.Float","JU.SB"],function(){c$=t(function(){this.vdwType=
this.factorType=this.info=null;this.value=NaN;this.valueExtended=0;this.values=null;s(this,arguments)},J.atomdata,"RadiusData");K(c$,function(){this.factorType=J.atomdata.RadiusData.EnumType.ABSOLUTE;this.vdwType=J.c.VDW.AUTO});u(c$,function(a,b,d,e){null!=a?(this.values=a,this.value=2147483647):null!=d&&(this.factorType=d,this.value=b,null!=e&&(this.vdwType=e))},"~A,~N,J.atomdata.RadiusData.EnumType,J.c.VDW");h(c$,"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(z(100*this.value)).append("%");this.vdwType!==J.c.VDW.AUTO&&a.append(this.vdwType.getVdwLabel());break;case J.atomdata.RadiusData.EnumType.SCREEN:a.appendI(z(this.value))}return a.toString()});G(self.c$);c$=B(J.atomdata.RadiusData,"EnumType",Enum);v(c$,"ABSOLUTE",0,[]);v(c$,"OFFSET",1,[]);v(c$,"FACTOR",2,[]);v(c$,"SCREEN",3,[]);c$=F()});n("J.awtjs");
c$=B(J.awtjs,"Image");c$.grabPixels=c(c$,"grabPixels",function(){return null},"~O,~N,~N");c$.drawImageToBuffer=c(c$,"drawImageToBuffer",function(){return null},"~O,~O,~O,~N,~N,~N");c$.getTextPixels=c(c$,"getTextPixels",function(){return null},"~S,javajs.awt.Font,~O,~O,~N,~N,~N");c$.newBufferedImage=c(c$,"newBufferedImage",function(){return null},"~O,~N,~N");c$.newBufferedImage=c(c$,"newBufferedImage",function(){return null},"~N,~N");c$.allocateRgbImage=c(c$,"allocateRgbImage",function(){return null},
"~N,~N,~A,~N,~B");c$.getStaticGraphics=c(c$,"getStaticGraphics",function(){return null},"~O,~B");c$.getGraphics=c(c$,"getGraphics",function(){return null},"~O");c$.flush=c(c$,"flush",function(){},"~O");c$.disposeGraphics=c(c$,"disposeGraphics",function(){},"~O");n("J.awtjs");c$=B(J.awtjs,"JSFont");c$.newFont=c(c$,"newFont",function(){return null},"~S,~B,~B,~N");c$.getFontMetrics=c(c$,"getFontMetrics",function(){return null},"~O,~O");c$.getAscent=c(c$,"getAscent",function(){return 0},"~O");c$.getDescent=
c(c$,"getDescent",function(){return 0},"~O");c$.stringWidth=c(c$,"stringWidth",function(){return 0},"javajs.awt.Font,~S");n("J.awtjs");w(["J.awtjs2d.Platform"],"J.awtjs.Platform",["J.awtjs.Image","$.JSFont"],function(){c$=B(J.awtjs,"Platform",J.awtjs2d.Platform);h(c$,"allocateRgbImage",function(a,b,d,e,c){return J.awtjs.Image.allocateRgbImage(a,b,d,e,c)},"~N,~N,~A,~N,~B,~B");h(c$,"disposeGraphics",function(a){J.awtjs.Image.disposeGraphics(a)},"~O");h(c$,"drawImage",function(){},"~O,~O,~N,~N,~N,~N");
h(c$,"grabPixels",function(){return null},"~O,~N,~N,~A,~N,~N");h(c$,"drawImageToBuffer",function(a,b,d,e,c,f){return J.awtjs.Image.drawImageToBuffer(a,b,d,e,c,f)},"~O,~O,~O,~N,~N,~N");h(c$,"getTextPixels",function(a,b,d,e,c,f,j){return J.awtjs.Image.getTextPixels(a,b,d,e,c,f,j)},"~S,javajs.awt.Font,~O,~O,~N,~N,~N");h(c$,"flushImage",function(a){J.awtjs.Image.flush(a)},"~O");h(c$,"getGraphics",function(a){return J.awtjs.Image.getGraphics(a)},"~O");h(c$,"getStaticGraphics",function(a,b){return J.awtjs.Image.getStaticGraphics(a,
b)},"~O,~B");h(c$,"newBufferedImage",function(a,b,d){return J.awtjs.Image.newBufferedImage(a,b,d)},"~O,~N,~N");h(c$,"newOffScreenImage",function(a,b){return J.awtjs.Image.newBufferedImage(a,b)},"~N,~N");h(c$,"fontStringWidth",function(a,b){return J.awtjs.JSFont.stringWidth(a,b)},"javajs.awt.Font,~S");h(c$,"getFontAscent",function(a){return J.awtjs.JSFont.getAscent(a)},"~O");h(c$,"getFontDescent",function(a){return J.awtjs.JSFont.getDescent(a)},"~O");h(c$,"getFontMetrics",function(a,b){return J.awtjs.JSFont.getFontMetrics(b,
a)},"javajs.awt.Font,~O");h(c$,"newFont",function(a,b,d,e){return J.awtjs.JSFont.newFont(a,b,d,e)},"~S,~B,~B,~N")});n("J.awtjs2d");c$=B(J.awtjs2d,"Display");c$.getFullScreenDimensions=c(c$,"getFullScreenDimensions",function(a,b){b[0]=a.width;b[1]=a.height},"~O,~A");c$.hasFocus=c(c$,"hasFocus",function(){return!0},"~O");c$.requestFocusInWindow=c(c$,"requestFocusInWindow",function(){},"~O");c$.renderScreenImage=c(c$,"renderScreenImage",function(){},"javajs.api.PlatformViewer,~O,~O");c$.setTransparentCursor=
c(c$,"setTransparentCursor",function(){},"~O");c$.setCursor=c(c$,"setCursor",function(){},"~N,~O");c$.prompt=c(c$,"prompt",function(a,b){var d=prompt(a,b);return null!=d?d:"null"},"~S,~S,~A,~B");c$.convertPointFromScreen=c(c$,"convertPointFromScreen",function(){},"~O,JU.P3");c$.drawImage=c(c$,"drawImage",function(a,b,d,e,c,f){var j=b.buf8,k=b.buf32;f*=c;for(var l=4*(b.width-c),h=0,r=4*d;h<f;)j[r++]=k[h]>>16&255,j[r++]=k[h]>>8&255,j[r++]=k[h]&255,j[r++]=255,0==++h%c&&(r+=l);a.putImageData(b.imgdata,
d,e)},"~O,~O,~N,~N,~N,~N");n("J.awtjs2d");c$=B(J.awtjs2d,"Image");c$.getWidth=c(c$,"getWidth",function(a){return a.imageWidth?a.imageWidth:a.width},"~O");c$.getHeight=c(c$,"getHeight",function(a){return a.imageHeight?a.imageHeight:a.height},"~O");c$.grabPixels=c(c$,"grabPixels",function(a,b,d){if(a._buf32)return a._buf32;a=a.getImageData(0,0,b,d).data;return this.toIntARGB(a)},"~O,~N,~N");c$.toIntARGB=c(c$,"toIntARGB",function(a){for(var b=q(a.length/4),d=D(b,0),e=0,c=0;e<b;c++)d[e++]=a[c++]<<16|
a[c++]<<8|a[c++]|4278190080;return d},"~A");c$.getTextPixels=c(c$,"getTextPixels",function(a,b,d,e,c,f){d.fillStyle="#000000";d.fillRect(0,0,e,c);d.fillStyle="#FFFFFF";d.font=b.font;d.fillText(a,0,f);return this.grabPixels(d,e,c)},"~S,javajs.awt.Font,~O,~N,~N,~N");c$.allocateRgbImage=c(c$,"allocateRgbImage",function(a,b,d,e,c,f){null==f&&(f={width:a,height:b});f.buf32=d;return f},"~N,~N,~A,~N,~B,~O");c$.getStaticGraphics=c(c$,"getStaticGraphics",function(a){return this.getGraphics(a)},"~O,~B");c$.getGraphics=
c(c$,"getGraphics",function(a){return a.getContext("2d")},"~O");n("J.awtjs2d");w(["javajs.api.GenericFileInterface"],"J.awtjs2d.JSFile",["JU.PT","JV.FileManager","$.Viewer"],function(){c$=t(function(){this.fullName=this.name=null;s(this,arguments)},J.awtjs2d,"JSFile",null,javajs.api.GenericFileInterface);c$.newFile=c(c$,"newFile",function(a){return new J.awtjs2d.JSFile(a)},"~S");u(c$,function(a){this.name=a.$replace("\\","/");this.fullName=a;!this.fullName.startsWith("/")&&0>JV.FileManager.urlTypeIndex(a)&&
(this.fullName=JV.Viewer.jsDocumentBase+"/"+this.fullName);this.fullName=JU.PT.rep(this.fullName,"/./","/");a.substring(a.lastIndexOf("/")+1)},"~S");h(c$,"getParentAsFile",function(){var a=this.fullName.lastIndexOf("/");return 0>a?null:new J.awtjs2d.JSFile(this.fullName.substring(0,a))});h(c$,"getFullPath",function(){return this.fullName});h(c$,"getName",function(){return this.name});h(c$,"isDirectory",function(){return this.fullName.endsWith("/")});h(c$,"length",function(){return 0});c$.getURLContents=
c(c$,"getURLContents",function(a,b,d){try{var e=a.openConnection();null!=b?e.outputBytes(b):null!=d&&e.outputString(d);return e.getContents()}catch(c){if(y(c,Exception))return c.toString();throw c;}},"java.net.URL,~A,~S")});n("J.awtjs2d");c$=B(J.awtjs2d,"JSFont");c$.newFont=c(c$,"newFont",function(a,b,d,e,c){a=a.equals("Monospaced")?"Courier":a.startsWith("Sans")?"Sans-Serif":"Serif";return(b?"bold ":"")+(d?"italic ":"")+e+c+" "+a},"~S,~B,~B,~N,~S");c$.getFontMetrics=c(c$,"getFontMetrics",function(a,
b){b.font!=a.font&&(b.font=a.font,a.font=b.font,b._fontAscent=Math.ceil(a.fontSize),b._fontDescent=Math.ceil(0.25*a.fontSize));return b},"javajs.awt.Font,~O");c$.getAscent=c(c$,"getAscent",function(a){return Math.ceil(a._fontAscent)},"~O");c$.getDescent=c(c$,"getDescent",function(a){return Math.ceil(a._fontDescent)},"~O");c$.stringWidth=c(c$,"stringWidth",function(a,b,d){b.font=a.font;return Math.ceil(b.measureText(d).width)},"javajs.awt.Font,~O,~S");n("J.awtjs2d");w(["javajs.api.GenericMouseInterface",
"javajs.awt.event.Event"],"J.awtjs2d.Mouse",["java.lang.Character","JU.PT","$.V3","JU.Logger"],function(){c$=t(function(){this.manager=this.vwr=null;this.keyBuffer="";this.wheeling=this.isMouseDown=!1;this.modifiersWhenPressed10=this.yWhenPressed=this.xWhenPressed=0;s(this,arguments)},J.awtjs2d,"Mouse",null,javajs.api.GenericMouseInterface);u(c$,function(a,b){this.vwr=b;this.manager=this.vwr.getActionManager()},"~N,javajs.api.PlatformViewer,~O");h(c$,"clear",function(){});h(c$,"dispose",function(){});
h(c$,"processEvent",function(a,b,d,e,c){-1!=a&&(e=J.awtjs2d.Mouse.applyLeftMouse(e));switch(a){case -1:this.wheeled(c,b,e);break;case 501:this.xWhenPressed=b;this.yWhenPressed=d;this.modifiersWhenPressed10=e;this.pressed(c,b,d,e,!1);break;case 506:this.dragged(c,b,d,e);break;case 504:this.entry(c,b,d,!1);break;case 505:this.entry(c,b,d,!0);break;case 503:this.moved(c,b,d,e);break;case 502:this.released(c,b,d,e);b==this.xWhenPressed&&(d==this.yWhenPressed&&e==this.modifiersWhenPressed10)&&this.clicked(c,
b,d,e,1);break;default:return!1}return!0},"~N,~N,~N,~N,~N");h(c$,"processTwoPointGesture",function(a){if(!(2>a[0].length)){var b=a[0],d=a[1],e=b[0],c=b[d.length-1];a=e[0];var f=c[0],e=e[1],c=c[1],j=JU.V3.new3(f-a,c-e,0),k=j.length(),l=d[0],h=d[d.length-1],d=l[0],r=h[0],l=l[1],h=h[1],x=JU.V3.new3(r-d,h-l,0),A=x.length();1>k||1>A||(j.normalize(),x.normalize(),j=j.dot(x),0.8<j?(a=z(f-b[b.length-2][0]),b=z(c-b[b.length-2][1]),this.vwr.translateXYBy(a,b)):-0.8>j&&(j=JU.V3.new3(d-a,l-e,0),x=JU.V3.new3(r-
f,h-c,0),b=x.length()-j.length(),this.wheeled(System.currentTimeMillis(),0>b?-1:1,32)))}},"~A");c(c$,"mouseClicked",function(a){this.clicked(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.getClickCount())},"java.awt.event.MouseEvent");c(c$,"mouseEntered",function(a){this.entry(a.getWhen(),a.getX(),a.getY(),!1)},"java.awt.event.MouseEvent");c(c$,"mouseExited",function(a){this.entry(a.getWhen(),a.getX(),a.getY(),!0)},"java.awt.event.MouseEvent");c(c$,"mousePressed",function(a){this.pressed(a.getWhen(),
a.getX(),a.getY(),a.getModifiers(),a.isPopupTrigger())},"java.awt.event.MouseEvent");c(c$,"mouseReleased",function(a){this.released(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(c$,"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(c$,"mouseMoved",function(a){this.moved(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(c$,"mouseWheelMoved",
function(a){a.consume();this.wheeled(a.getWhen(),a.getWheelRotation(),a.getModifiers())},"java.awt.event.MouseWheelEvent");c(c$,"keyTyped",function(a){a.consume();if(this.vwr.menuEnabled()){var b=a.getKeyChar(),d=a.getModifiers();JU.Logger.debuggingHigh&&JU.Logger.debug("MouseManager keyTyped: "+b+" "+(0+b.charCodeAt(0))+" "+d);if(0!=d&&1!=d)switch(b){case String.fromCharCode(11):case "k":a=!this.vwr.getBooleanProperty("allowKeyStrokes");switch(d){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 "z":switch(d){case 2:this.vwr.undoMoveAction(4165,1);break;case 3:this.vwr.undoMoveAction(4139,1)}break;case 25:case "y":switch(d){case 2:this.vwr.undoMoveAction(4139,1)}}else this.vwr.getBooleanProperty("allowKeyStrokes")&&this.addKeyBuffer(1==a.getModifiers()?
Character.toUpperCase(b):b)}},"java.awt.event.KeyEvent");c(c$,"keyPressed",function(a){this.vwr.isApplet()&&a.consume();this.manager.keyPressed(a.getKeyCode(),a.getModifiers())},"java.awt.event.KeyEvent");c(c$,"keyReleased",function(a){a.consume();this.manager.keyReleased(a.getKeyCode())},"java.awt.event.KeyEvent");c(c$,"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(c$,"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(c$,"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(c$,"entry",function(a,b,d,e){this.wheeling=!1;this.manager.mouseEnterExit(a,b,d,e)},"~N,~N,~N,~B");c(c$,"clicked",function(a,b,d,e){this.clearKeyBuffer();this.manager.mouseAction(2,a,b,d,1,e)},"~N,~N,~N,~N,~N");c(c$,"moved",function(a,b,d,e){this.clearKeyBuffer();this.isMouseDown?this.manager.mouseAction(1,a,b,d,0,J.awtjs2d.Mouse.applyLeftMouse(e)):this.manager.mouseAction(0,a,b,d,0,e)},"~N,~N,~N,~N");
c(c$,"wheeled",function(a,b,d){this.clearKeyBuffer();this.wheeling=!0;this.manager.mouseAction(3,a,0,b,0,d&-29|32)},"~N,~N,~N");c(c$,"pressed",function(a,b,d,e){this.clearKeyBuffer();this.isMouseDown=!0;this.wheeling=!1;this.manager.mouseAction(4,a,b,d,0,e)},"~N,~N,~N,~N,~B");c(c$,"released",function(a,b,d,e){this.wheeling=this.isMouseDown=!1;this.manager.mouseAction(5,a,b,d,0,e)},"~N,~N,~N,~N");c(c$,"dragged",function(a,b,d,e){this.wheeling||(20==(e&20)&&(e=e&-5|2),this.manager.mouseAction(1,a,b,
d,0,e))},"~N,~N,~N,~N");c$.applyLeftMouse=c(c$,"applyLeftMouse",function(a){return 0==(a&28)?a|16:a},"~N")});n("J.awtjs2d");w(["javajs.api.GenericPlatform"],"J.awtjs2d.Platform","java.net.URL JU.AjaxURLStreamHandlerFactory $.Rdr $.SB J.api.Interface J.awtjs2d.Display $.Image $.JSFile $.JSFont $.Mouse".split(" "),function(){c$=t(function(){this.context=this.vwr=this.canvas=null;s(this,arguments)},J.awtjs2d,"Platform",null,javajs.api.GenericPlatform);h(c$,"setViewer",function(a,b){this.vwr=a;this.canvas=
b;null!=b&&(this.context=b.getContext("2d"),b.imgdata=this.context.getImageData(0,0,b.width,b.height),b.buf8=b.imgdata.data);try{java.net.URL.setURLStreamHandlerFactory(new JU.AjaxURLStreamHandlerFactory)}catch(d){}},"javajs.api.PlatformViewer,~O");h(c$,"isSingleThreaded",function(){return!0});h(c$,"getJsObjectInfo",function(a,b,d){return"localName"==b?a[0].nodeName:null==d?a[0][b]:a[0][b](d[0])},"~A,~S,~A");h(c$,"isHeadless",function(){return!1});h(c$,"getMouseManager",function(a,b){return new J.awtjs2d.Mouse(a,
this.vwr,b)},"~N,~O");h(c$,"convertPointFromScreen",function(a,b){J.awtjs2d.Display.convertPointFromScreen(a,b)},"~O,JU.P3");h(c$,"getFullScreenDimensions",function(a,b){J.awtjs2d.Display.getFullScreenDimensions(a,b)},"~O,~A");h(c$,"getMenuPopup",function(a,b){var d="j"==b?"awtjs2d.JmolJSPopup":"awtjs2d.JSModelKitPopup",e=J.api.Interface.getOption(d);try{null!=e&&e.jpiInitialize(this.vwr,a)}catch(c){if(y(c,Exception))return System.out.println("Exception creating "+d+":"+c),null;throw c;}return e},
"~S,~S");h(c$,"hasFocus",function(a){return J.awtjs2d.Display.hasFocus(a)},"~O");h(c$,"prompt",function(a,b,d,e){return J.awtjs2d.Display.prompt(a,b,d,e)},"~S,~S,~A,~B");h(c$,"renderScreenImage",function(a,b){J.awtjs2d.Display.renderScreenImage(this.vwr,a,b)},"~O,~O");h(c$,"drawImage",function(a,b,d,e,c,f){J.awtjs2d.Display.drawImage(a,b,d,e,c,f)},"~O,~O,~N,~N,~N,~N");h(c$,"requestFocusInWindow",function(a){J.awtjs2d.Display.requestFocusInWindow(a)},"~O");h(c$,"repaint",function(){"undefined"!=typeof Jmol&&
Jmol._repaint&&Jmol._repaint(this.vwr.html5Applet,!0)},"~O");h(c$,"setTransparentCursor",function(a){J.awtjs2d.Display.setTransparentCursor(a)},"~O");h(c$,"setCursor",function(a,b){J.awtjs2d.Display.setCursor(a,b)},"~N,~O");h(c$,"allocateRgbImage",function(a,b,d,e,c,f){return J.awtjs2d.Image.allocateRgbImage(a,b,d,e,c,f?null:this.canvas)},"~N,~N,~A,~N,~B,~B");h(c$,"notifyEndOfRendering",function(){});h(c$,"createImage",function(){return null},"~O");h(c$,"disposeGraphics",function(){},"~O");h(c$,"grabPixels",
function(a,b,d){a.image&&(b!=a.width||d!=a.height)&&Jmol._setCanvasImage(a,b,d);if(a.buf32)return a.buf32;b=J.awtjs2d.Image.grabPixels(J.awtjs2d.Image.getGraphics(a),b,d);return a.buf32=b},"~O,~N,~N,~A,~N,~N");h(c$,"drawImageToBuffer",function(a,b,d,e,c){return this.grabPixels(d,e,c,null,0,0)},"~O,~O,~O,~N,~N,~N");h(c$,"getTextPixels",function(a,b,d,e,c,f,j){return J.awtjs2d.Image.getTextPixels(a,b,d,c,f,j)},"~S,javajs.awt.Font,~O,~O,~N,~N,~N");h(c$,"flushImage",function(){},"~O");h(c$,"getGraphics",
function(a){return null==a?this.context:J.awtjs2d.Image.getGraphics(a)},"~O");h(c$,"getImageHeight",function(a){return null==a?-1:J.awtjs2d.Image.getHeight(a)},"~O");h(c$,"getImageWidth",function(a){return null==a?-1:J.awtjs2d.Image.getWidth(a)},"~O");h(c$,"getStaticGraphics",function(a,b){return J.awtjs2d.Image.getStaticGraphics(a,b)},"~O,~B");h(c$,"newBufferedImage",function(a,b,d){return"undefined"!=typeof Jmol&&Jmol._getHiddenCanvas?Jmol._getHiddenCanvas(this.vwr.html5Applet,"stereoImage",b,d):
null},"~O,~N,~N");h(c$,"newOffScreenImage",function(a,b){return"undefined"!=typeof Jmol&&Jmol._getHiddenCanvas?Jmol._getHiddenCanvas(this.vwr.html5Applet,"textImage",a,b):null},"~N,~N");h(c$,"waitForDisplay",function(a,b){if("undefined"==typeof Jmol||!Jmol._getHiddenCanvas)return!1;var d=this.vwr,e=d.getEvalContextAndHoldQueue(d.eval),c=a[0];return Jmol._loadImage(this,a,b,function(a,b){d.loadImageData(a,b,c,e)})},"~O,~O");h(c$,"fontStringWidth",function(a,b){return J.awtjs2d.JSFont.stringWidth(a,
this.context,b)},"javajs.awt.Font,~S");h(c$,"getFontAscent",function(a){return J.awtjs2d.JSFont.getAscent(a)},"~O");h(c$,"getFontDescent",function(a){return J.awtjs2d.JSFont.getDescent(a)},"~O");h(c$,"getFontMetrics",function(a,b){return J.awtjs2d.JSFont.getFontMetrics(a,b)},"javajs.awt.Font,~O");h(c$,"newFont",function(a,b,d,e){return J.awtjs2d.JSFont.newFont(a,b,d,e,"px")},"~S,~B,~B,~N");h(c$,"getDateFormat",function(a){if(null!=a){if(0<=a.indexOf("8824")){var b=new Date;a=b.toString().split(" ");
var d="0"+b.getMonth(),d=d.substring(d.length-2),b="0"+b.getDate(),b=b.substring(b.length-2);return a[3]+d+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(" "),d="0"+b.getMonth(),d=d.substring(d.length-2),b="0"+b.getDate(),b=b.substring(b.length-2),a[3]+d+b+a[4].replace(/\:/g,"")+a[5].substring(3,6)+"'"+a[5].substring(6,8)+"'"}return(""+new Date).split(" (")[0]},"~S");h(c$,"newFile",function(a){return new J.awtjs2d.JSFile(a)},
"~S");h(c$,"getBufferedFileInputStream",function(){return null},"~S");h(c$,"getURLContents",function(a,b,d,e){return J.awtjs2d.Platform.getURLContentsStatic(a,b,d,e)},"java.net.URL,~A,~S,~B");c$.getURLContentsStatic=c(c$,"getURLContentsStatic",function(a,b,d,e){a=J.awtjs2d.JSFile.getURLContents(a,b,d);try{return!e?a:p(a,String)?a:p(a,JU.SB)?a.toString():p(a,Array)?String.instantialize(a):String.instantialize(JU.Rdr.getStreamAsBytes(a,null))}catch(c){if(y(c,Exception))return""+c;throw c;}},"java.net.URL,~A,~S,~B");
h(c$,"getLocalUrl",function(){return null},"~S")});n("J.bspt");w(null,"J.bspt.Bspf",["JU.AU","J.bspt.Bspt","JU.Logger"],function(){c$=t(function(){this.dimMax=0;this.bspts=null;this.isValid=!1;this.cubeIterators=this.bsptsValid=null;s(this,arguments)},J.bspt,"Bspf");c(c$,"validate",function(a){this.isValid=a},"~B");c(c$,"validateModel",function(a,b){this.bsptsValid[a]=b},"~N,~B");c(c$,"isInitialized",function(){return this.isValid});c(c$,"isInitializedIndex",function(a){return this.bspts.length>a&&
null!=this.bspts[a]&&this.bsptsValid[a]},"~N");u(c$,function(a){this.dimMax=a;this.bspts=Array(1);this.bsptsValid=ca(1,!1);this.cubeIterators=[]},"~N");c(c$,"getBsptCount",function(){return this.bspts.length});c(c$,"addTuple",function(a,b){a>=this.bspts.length&&(this.bspts=JU.AU.arrayCopyObject(this.bspts,a+1),this.bsptsValid=JU.AU.arrayCopyBool(this.bsptsValid,a+1));var d=this.bspts[a];null==d&&(d=this.bspts[a]=new J.bspt.Bspt(this.dimMax,a));d.addTuple(b)},"~N,JU.P3");c(c$,"stats",function(){for(var a=
0;a<this.bspts.length;++a)null!=this.bspts[a]&&this.bspts[a].stats()});c(c$,"dump",function(){for(var a=0;a<this.bspts.length;++a)JU.Logger.info(">>>>\nDumping bspt #"+a+"\n>>>>"),this.bspts[a].dump();JU.Logger.info("<<<<")});c(c$,"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(c$,"getNewCubeIterator",function(a){return this.bspts[a].allocateCubeIterator()},"~N");c(c$,"initialize",function(a,b,d){null!=this.bspts[a]&&this.bspts[a].reset();for(var e=d.nextSetBit(0);0<=e;e=d.nextSetBit(e+1))this.addTuple(a,b[e]);this.bsptsValid[a]=!0},"~N,~A,JU.BS")});n("J.bspt");w(null,"J.bspt.Bspt",["JU.SB","J.bspt.CubeIterator","$.Leaf","JU.Logger"],function(){c$=t(function(){this.index=this.dimMax=this.treeDepth=
0;this.eleRoot=null;s(this,arguments)},J.bspt,"Bspt");u(c$,function(a,b){this.dimMax=a;this.index=b;this.reset()},"~N,~N");c(c$,"reset",function(){this.eleRoot=new J.bspt.Leaf(this,null,0);this.treeDepth=1});c(c$,"addTuple",function(a){this.eleRoot=this.eleRoot.addTuple(0,a)},"JU.P3");c(c$,"stats",function(){});c(c$,"dump",function(){var a=new JU.SB;this.eleRoot.dump(0,a);JU.Logger.info(a.toString())});c(c$,"allocateCubeIterator",function(){return new J.bspt.CubeIterator(this)});C(c$,"leafCountMax",
2,"MAX_TREE_DEPTH",100)});n("J.bspt");w(null,"J.bspt.CubeIterator",["J.bspt.Node"],function(){c$=t(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;s(this,arguments)},J.bspt,"CubeIterator");u(c$,function(a){this.set(a)},"J.bspt.Bspt");c(c$,"set",function(a){this.bspt=a;this.stack=Array(a.treeDepth)},"J.bspt.Bspt");c(c$,"initialize",function(a,b,d){this.radius=b;this.tHemisphere=!1;this.cx=
a.x;this.cy=a.y;this.cz=a.z;this.leaf=null;this.stack[0]=this.bspt.eleRoot;this.sp=1;this.findLeftLeaf();this.tHemisphere=d},"JU.T3,~N,~B");c(c$,"release",function(){this.set(this.bspt)});c(c$,"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(c$,"nextElement",function(){return this.leaf.tuples[this.leafIndex++]});c(c$,"foundDistance2",function(){return this.dx*
this.dx+this.dy*this.dy+this.dz*this.dz});c(c$,"findLeftLeaf",function(){this.leaf=null;if(0!=this.sp){for(var a=this.stack[--this.sp];p(a,J.bspt.Node);){var b;switch(a.dim){case 0:b=this.cx;break;case 1:b=this.cy;break;default:b=this.cz}var d=b+this.radius;if(!this.tHemisphere||0!=a.dim)b-=this.radius;if(b<=a.maxLeft&&d>=a.minLeft)d>=a.minRight&&b<=a.maxRight&&(this.stack[this.sp++]=a.eleRight),a=a.eleLeft;else if(d>=a.minRight&&b<=a.maxRight)a=a.eleRight;else{if(0==this.sp)return;a=this.stack[--this.sp]}}this.leaf=
a;this.leafIndex=0}});c(c$,"isWithinRadius",function(a){this.dx=a.x-this.cx;return(!this.tHemisphere||0<=this.dx)&&(this.dx=Math.abs(this.dx))<=this.radius&&(this.dy=Math.abs(a.y-this.cy))<=this.radius&&(this.dz=Math.abs(a.z-this.cz))<=this.radius},"JU.T3")});n("J.bspt");c$=t(function(){this.bspt=null;this.count=0;s(this,arguments)},J.bspt,"Element");n("J.bspt");w(["J.bspt.Element"],"J.bspt.Leaf",["J.bspt.Node","JU.Escape"],function(){c$=t(function(){this.tuples=null;s(this,arguments)},J.bspt,"Leaf",
J.bspt.Element);u(c$,function(a,b,d){E(this,J.bspt.Leaf,[]);this.bspt=a;this.count=0;this.tuples=Array(2);if(null!=b){for(a=d;2>a;++a)this.tuples[this.count++]=b.tuples[a],b.tuples[a]=null;b.count=d}},"J.bspt.Bspt,J.bspt.Leaf,~N");c(c$,"sort",function(a){for(var b=this.count;0<--b;)for(var d=this.tuples[b],e=J.bspt.Node.getDimensionValue(d,a),c=b;0<=--c;){var f=this.tuples[c],j=J.bspt.Node.getDimensionValue(f,a);j>e&&(this.tuples[b]=f,this.tuples[c]=d,d=f,e=j)}},"~N");h(c$,"addTuple",function(a,b){return 2>
this.count?(this.tuples[this.count++]=b,this):(new J.bspt.Node(this.bspt,a,this)).addTuple(a,b)},"~N,JU.P3");h(c$,"dump",function(a,b){for(var d=0;d<this.count;++d){for(var e=this.tuples[d],c=0;c<a;++c)b.append(".");b.append(JU.Escape.eP(e)).append("Leaf ").appendI(d).append(": ").append(e.getInfo())}},"~N,JU.SB");h(c$,"toString",function(){return"leaf:"+this.count+"\n"})});n("J.bspt");w(["J.bspt.Element"],"J.bspt.Node",["java.lang.NullPointerException","J.bspt.Leaf"],function(){c$=t(function(){this.maxLeft=
this.minLeft=this.dim=0;this.eleLeft=null;this.maxRight=this.minRight=0;this.eleRight=null;s(this,arguments)},J.bspt,"Node",J.bspt.Element);u(c$,function(a,b,d){E(this,J.bspt.Node,[]);this.bspt=a;b==a.treeDepth&&(a.treeDepth=b+1);if(2!=d.count)throw new NullPointerException;this.dim=b%a.dimMax;d.sort(this.dim);a=new J.bspt.Leaf(a,d,1);this.minLeft=J.bspt.Node.getDimensionValue(d.tuples[0],this.dim);this.maxLeft=J.bspt.Node.getDimensionValue(d.tuples[d.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=d;this.eleRight=a;this.count=2},"J.bspt.Bspt,~N,J.bspt.Leaf");c(c$,"addTuple",function(a,b){var d=J.bspt.Node.getDimensionValue(b,this.dim);++this.count;d<this.maxLeft||(d>this.minRight?0:d==this.maxLeft?d==this.minRight?this.eleLeft.count<this.eleRight.count:1:d==this.minRight?0:this.eleLeft.count<this.eleRight.count)?(d<this.minLeft?this.minLeft=d:d>this.maxLeft&&(this.maxLeft=d),this.eleLeft=this.eleLeft.addTuple(a+
1,b)):(d<this.minRight?this.minRight=d:d>this.maxRight&&(this.maxRight=d),this.eleRight=this.eleRight.addTuple(a+1,b));return this},"~N,JU.P3");c(c$,"dump",function(a,b){b.append("\nnode LEFT"+a);this.eleLeft.dump(a+1,b);for(var d=0;d<a;++d)b.append("->");b.append(" RIGHT"+a);this.eleRight.dump(a+1,b)},"~N,JU.SB");c(c$,"toString",function(){return this.eleLeft.toString()+this.dim+":\n"+this.eleRight.toString()});c$.getDimensionValue=c(c$,"getDimensionValue",function(a,b){return 0==b?a.x:1==b?a.y:
a.z},"JU.P3,~N")});n("J.c");w(["java.lang.Enum"],"J.c.ANIM",null,function(){c$=B(J.c,"ANIM",Enum);v(c$,"ONCE",0,[]);v(c$,"LOOP",1,[]);v(c$,"PALINDROME",2,[])});n("J.c");w(["java.lang.Enum"],"J.c.AXES",null,function(){c$=t(function(){this.code=0;s(this,arguments)},J.c,"AXES",Enum);u(c$,function(a){this.code=a},"~N");c(c$,"getCode",function(){return this.code});c$.getAxesMode=c(c$,"getAxesMode",function(a){for(var b,d=0,e=J.c.AXES.values();d<e.length&&((b=e[d])||1);d++)if(b.getCode()==a)return b;return null},
"~N");v(c$,"BOUNDBOX",0,[0]);v(c$,"MOLECULAR",1,[1]);v(c$,"UNITCELL",2,[2])});n("J.c");w(["java.lang.Enum"],"J.c.CBK",["JU.SB"],function(){c$=B(J.c,"CBK",Enum);c$.getCallback=c(c$,"getCallback",function(a){a=a.toUpperCase();a=a.substring(0,Math.max(a.indexOf("CALLBACK"),0));for(var b,d=0,e=J.c.CBK.values();d<e.length&&((b=e[d])||1);d++)if(b.name().equalsIgnoreCase(a))return b;return null},"~S");c$.getNameList=c(c$,"getNameList",function(){if(null==J.c.CBK.nameList){for(var a=new JU.SB,b,d=0,e=J.c.CBK.values();d<
e.length&&((b=e[d])||1);d++)a.append(b.name().toLowerCase()).append("Callback;");J.c.CBK.nameList=a.toString()}return J.c.CBK.nameList});c$.nameList=null;v(c$,"ANIMFRAME",0,[]);v(c$,"APPLETREADY",1,[]);v(c$,"ATOMMOVED",2,[]);v(c$,"CLICK",3,[]);v(c$,"DRAGDROP",4,[]);v(c$,"ECHO",5,[]);v(c$,"ERROR",6,[]);v(c$,"EVAL",7,[]);v(c$,"HOVER",8,[]);v(c$,"LOADSTRUCT",9,[]);v(c$,"MEASURE",10,[]);v(c$,"MESSAGE",11,[]);v(c$,"MINIMIZATION",12,[]);v(c$,"PICK",13,[]);v(c$,"RESIZE",14,[]);v(c$,"SCRIPT",15,[]);v(c$,
"SYNC",16,[]);v(c$,"STRUCTUREMODIFIED",17,[])});n("J.c");w(["java.lang.Enum"],"J.c.FIL",null,function(){c$=t(function(){this.code=0;s(this,arguments)},J.c,"FIL",Enum);c(c$,"getCode",function(){return this.code});u(c$,function(a){this.code=a},"~N");v(c$,"DELETED",0,[5]);v(c$,"CREATED",1,[3]);v(c$,"CREATING_MODELSET",2,[2]);v(c$,"ZAPPED",3,[0]);v(c$,"NOT_LOADED",4,[-1])});n("J.c");w(["java.lang.Enum"],"J.c.PAL",["java.lang.Byte"],function(){c$=t(function(){this.$$name=null;this.id=0;s(this,arguments)},
J.c,"PAL",Enum);u(c$,function(a,b){this.$$name=a;this.id=b},"~S,~N");c$.pidOf=c(c$,"pidOf",function(a){return p(a,J.c.PAL)?a.id:p(a,Byte)?a.byteValue():J.c.PAL.UNKNOWN.id},"~O");c$.isPaletteVariable=c(c$,"isPaletteVariable",function(a){return 0!=(a&64)},"~N");c$.getPalette=c(c$,"getPalette",function(a){if(0>a.indexOf("_"))for(var b,d=0,e=J.c.PAL.values();d<e.length&&((b=e[d])||1);d++)if(a.equalsIgnoreCase(b.$$name))return b;return 0==a.indexOf("property_")?J.c.PAL.PROPERTY:J.c.PAL.UNKNOWN},"~S");
c$.getPaletteID=c(c$,"getPaletteID",function(a){if(0>a.indexOf("_"))for(var b,d=0,e=J.c.PAL.values();d<e.length&&((b=e[d])||1);d++)if(a.equalsIgnoreCase(b.$$name))return b.id;return 0==a.indexOf("property_")?J.c.PAL.PROPERTY.id:J.c.PAL.UNKNOWN.id},"~S");c$.getPaletteName=c(c$,"getPaletteName",function(a){for(var b,d=0,e=J.c.PAL.values();d<e.length&&((b=e[d])||1);d++)if(b.id==a)return b.$$name;return null},"~N");c$.argbsCpkRasmol=[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];c$.argbsCpk=[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];v(c$,"UNKNOWN",0,[null,255]);v(c$,"NONE",1,["none",0]);v(c$,"CPK",2,["cpk",1]);v(c$,
"PARTIAL_CHARGE",3,["partialcharge",2]);v(c$,"FORMAL_CHARGE",4,["formalcharge",3]);v(c$,"TEMP",5,["temperature",68]);v(c$,"FIXEDTEMP",6,["fixedtemperature",5]);v(c$,"SURFACE",7,["surfacedistance",70]);v(c$,"STRUCTURE",8,["structure",7]);v(c$,"AMINO",9,["amino",8]);v(c$,"SHAPELY",10,["shapely",9]);v(c$,"CHAIN",11,["chain",10]);v(c$,"GROUP",12,["group",75]);v(c$,"MONOMER",13,["monomer",76]);v(c$,"MOLECULE",14,["molecule",77]);v(c$,"ALTLOC",15,["altloc",14]);v(c$,"INSERTION",16,["insertion",15]);v(c$,
"JMOL",17,["jmol",16]);v(c$,"RASMOL",18,["rasmol",17]);v(c$,"TYPE",19,["type",18]);v(c$,"ENERGY",20,["energy",19]);v(c$,"PROPERTY",21,["property",84]);v(c$,"VARIABLE",22,["variable",85]);v(c$,"STRAIGHTNESS",23,["straightness",86]);v(c$,"POLYMER",24,["polymer",87])});n("J.c");w(["java.lang.Enum"],"J.c.QS",["JU.SB"],function(){c$=t(function(){this.tag2=this.tag=null;this.idSpherical=this.id=0;s(this,arguments)},J.c,"QS",Enum);u(c$,function(a,b,d,e){this.tag=a;this.tag2=b;this.id=d;this.idSpherical=
e},"~S,~S,~N,~N");c$.getNewDfCoefMap=c(c$,"getNewDfCoefMap",function(){return[D(1,0),D(3,0),D(4,0),D(5,0),D(6,0),D(7,0),D(10,0),D(9,0),D(15,0),D(11,0),D(21,0),D(13,0),D(28,0)]});c$.getQuantumShellTagID=c(c$,"getQuantumShellTagID",function(a){if(a.equals("L"))return J.c.QS.SP.id;a=J.c.QS.getQuantumShell(a);return null==a?-1:a.id},"~S");c$.getQuantumShell=c(c$,"getQuantumShell",function(a){for(var b,d=0,e=J.c.QS.values();d<e.length&&((b=e[d])||1);d++)if(b.tag.equals(a)||b.tag2.equals(a))return b;return null},
"~S");c$.getQuantumShellTagIDSpherical=c(c$,"getQuantumShellTagIDSpherical",function(a){if(a.equals("L"))return J.c.QS.SP.idSpherical;a=J.c.QS.getQuantumShell(a);return null==a?-1:a.idSpherical},"~S");c$.getItem=c(c$,"getItem",function(a){switch(a){case 0:return J.c.QS.S;case 1:return J.c.QS.P;case 2:return J.c.QS.SP;case 3:return J.c.QS.D_SPHERICAL;case 4:return J.c.QS.D_CARTESIAN;case 5:return J.c.QS.F_SPHERICAL;case 6:return J.c.QS.F_CARTESIAN;case 7:return J.c.QS.G_SPHERICAL;case 8:return J.c.QS.G_CARTESIAN;
case 9:return J.c.QS.H_SPHERICAL;case 10:return J.c.QS.H_CARTESIAN;case 11:return J.c.QS.I_SPHERICAL;case 12:return J.c.QS.I_CARTESIAN}return null},"~N");c$.getQuantumShellTag=c(c$,"getQuantumShellTag",function(a){for(var b,d=0,e=J.c.QS.values();d<e.length&&((b=e[d])||1);d++)if(b.id==a)return b.tag;return""+a},"~N");c$.getMOString=c(c$,"getMOString",function(a){var b=new JU.SB;if(2==a.length)return""+z(0>a[0]?-a[1]:a[1]);b.appendC("[");for(var d=0;d<a.length;d+=2)0<d&&b.append(", "),b.appendF(a[d]).append(" ").appendI(z(a[d+
1]));b.appendC("]");return b.toString()},"~A");c$.SUPPORTED_BASIS_FUNCTIONS="SPLDF";v(c$,"S",0,["S","S",0,0]);v(c$,"P",1,["P","X",1,1]);v(c$,"SP",2,["SP","SP",2,2]);v(c$,"D_SPHERICAL",3,["5D","5D",3,3]);v(c$,"D_CARTESIAN",4,["D","XX",4,3]);v(c$,"F_SPHERICAL",5,["7F","7F",5,5]);v(c$,"F_CARTESIAN",6,["F","XXX",6,5]);v(c$,"G_SPHERICAL",7,["9G","9G",7,7]);v(c$,"G_CARTESIAN",8,["G","XXXX",8,7]);v(c$,"H_SPHERICAL",9,["11H","11H",9,9]);v(c$,"H_CARTESIAN",10,["H","XXXXX",10,9]);v(c$,"I_SPHERICAL",11,["13I",
"13I",11,11]);v(c$,"I_CARTESIAN",12,["I","XXXXXX",12,11])});n("J.c");w(["java.lang.Enum"],"J.c.STER",null,function(){c$=t(function(){this.$$name=null;this.$isBiColor=!1;s(this,arguments)},J.c,"STER",Enum);u(c$,function(a,b){this.$$name=a;this.$isBiColor=b},"~S,~B");c(c$,"getName",function(){return this.$$name});c(c$,"isBiColor",function(){return this.$isBiColor});c$.getStereoMode=c(c$,"getStereoMode",function(a){for(var b,d=0,e=J.c.STER.values();d<e.length&&((b=e[d])||1);d++)if(b.$$name.equalsIgnoreCase(a))return b;
return null},"~S");c$.DEFAULT_STEREO_DEGREES=-5;v(c$,"NONE",0,["OFF",!1]);v(c$,"DOUBLE",1,["",!1]);v(c$,"REDCYAN",2,["REDCYAN",!0]);v(c$,"REDBLUE",3,["REDBLUE",!0]);v(c$,"REDGREEN",4,["REDGREEN",!0]);v(c$,"CUSTOM",5,["",!0])});n("J.c");w(["java.lang.Enum"],"J.c.STR",null,function(){c$=t(function(){this.color=this.id=0;s(this,arguments)},J.c,"STR",Enum);u(c$,function(a,b){this.id=a;this.color=b},"~N,~N");c(c$,"getId",function(){return this.id});c(c$,"getColor",function(){return this.color});c$.getProteinStructureType=
c(c$,"getProteinStructureType",function(a){for(var b,d=0,e=J.c.STR.values();d<e.length&&((b=e[d])||1);d++)if(a.equalsIgnoreCase(b.name()))return b.isProtein()?b:J.c.STR.NOT;return J.c.STR.NOT},"~S");c(c$,"getBioStructureTypeName",function(a){return 0>this.id?"":a&&this.isProtein()?"protein":this.name()},"~B");c(c$,"isProtein",function(){return 0<=this.id&&3>=this.id||7<=this.id});v(c$,"NOT",0,[-1,4286611584]);v(c$,"NONE",1,[0,4294967295]);v(c$,"TURN",2,[1,4284514559]);v(c$,"SHEET",3,[2,4294952960]);
v(c$,"HELIX",4,[3,4294901888]);v(c$,"DNA",5,[4,4289593598]);v(c$,"RNA",6,[5,4294771042]);v(c$,"CARBOHYDRATE",7,[6,4289111802]);v(c$,"HELIX310",8,[7,4288675968]);v(c$,"HELIXALPHA",9,[8,4294901888]);v(c$,"HELIXPI",10,[9,4284481664]);v(c$,"ANNOTATION",11,[-2,0])});n("J.c");w(["java.lang.Enum"],"J.c.VDW",null,function(){c$=t(function(){this.pt=0;this.type2=this.type=null;s(this,arguments)},J.c,"VDW",Enum);u(c$,function(a,b,d){this.pt=a;this.type=b;this.type2=d},"~N,~S,~S");c(c$,"getVdwLabel",function(){return null==
this.type?this.type2:this.type});c$.getVdwType=c(c$,"getVdwType",function(a){if(null!=a)for(var b,d=0,e=J.c.VDW.values();d<e.length&&((b=e[d])||1);d++)if(a.equalsIgnoreCase(b.type))return b;return null},"~S");c$.getVdwType2=c(c$,"getVdwType2",function(a){if(null!=a)for(var b,d=0,e=J.c.VDW.values();d<e.length&&((b=e[d])||1);d++)if(a.equalsIgnoreCase(b.type2))return b;return null},"~S");v(c$,"JMOL",0,[0,"Jmol",null]);v(c$,"BABEL",1,[1,"Babel",null]);v(c$,"RASMOL",2,[2,"RasMol",null]);v(c$,"BABEL21",
3,[3,"Babel21",null]);v(c$,"AUTO_JMOL",4,[0,null,"Jmol"]);v(c$,"AUTO_BABEL",5,[1,null,"Babel"]);v(c$,"AUTO_RASMOL",6,[2,null,"RasMol"]);v(c$,"AUTO",7,[0,"Auto",null]);v(c$,"USER",8,[-1,"User",null]);v(c$,"ADPMAX",9,[-1,null,"adpmax"]);v(c$,"ADPMIN",10,[-1,null,"adpmin"]);v(c$,"HYDRO",11,[-1,null,"hydrophobic"]);v(c$,"BONDING",12,[-1,null,"bondingradius"]);v(c$,"TEMP",13,[-1,null,"temperature"]);v(c$,"NOJMOL",14,[-1,null,null]);v(c$,"NADA",15,[-1,null,null])});n("J.g3d");w(null,"J.g3d.CylinderRenderer",
["JU.AU"],function(){c$=t(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.zA=this.yA=this.xA=0;this.tEvenDiameter=!1;this.endcaps=this.diameter=0;this.tEndcapOpen=!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.drawBackside=this.clipped=
!1;this.rasterCount=this.zTip=this.yTip=this.xTip=0;this.fp8ShadeIndexUp=this.zRaster=this.yRaster=this.xRaster=this.tzRaster=this.tyRaster=this.txRaster=this.tRaster=null;this.zXMax=this.zXMin=this.xMax=this.xMin=this.yMax=this.yMin=0;s(this,arguments)},J.g3d,"CylinderRenderer");K(c$,function(){this.tRaster=L(32,0);this.txRaster=L(32,0);this.tyRaster=L(32,0);this.tzRaster=L(32,0);this.xRaster=D(32,0);this.yRaster=D(32,0);this.zRaster=D(32,0);this.fp8ShadeIndexUp=D(32,0)});u(c$,function(a){this.g3d=
a;this.line3d=a.line3d;this.shader=a.shader},"J.g3d.Graphics3D");c(c$,"render",function(a,b,d,e,c,f,j,k,l,h,r,x){if(!(f>3*this.g3d.getRenderHeight())){var A=q(f/2)+1,I=this.g3d.clipCode3(j-A,k-A,l-A),n=this.g3d.clipCode3(j+A,k+A,l+A),p=this.g3d.clipCode3(h-A,r-A,x-A),A=this.g3d.clipCode3(h+A,r+A,x+A);this.clipped=0!=(I|n|p|A);if(0==(I&A&n&p))if(this.dxB=h-j,this.dyB=r-k,this.dzB=x-l,1>=f)this.line3d.plotLineDelta(this.g3d.getColorArgbOrGray(a),d,this.g3d.getColorArgbOrGray(b),e,j,k,l,this.dxB,this.dyB,
this.dzB,this.clipped);else{this.drawBackside=this.clipped||2==c||0==c;this.diameter=f;this.xA=j;this.yA=k;this.zA=l;this.endcaps=c;this.shadesA=this.g3d.getShades(this.colixA=a);this.shadesB=this.g3d.getShades(this.colixB=b);this.calcArgbEndcap(!0,!1);this.generateBaseEllipse();(2==c||4==c)&&this.renderFlatEndcap(!0);this.g3d.setZMargin(5);for(a=this.rasterCount;0<=--a;)b=this.fp8ShadeIndexUp[a]>>8,f=b>>1,j=this.xRaster[a],k=this.yRaster[a],l=this.zRaster[a],this.tEndcapOpen&&0!=this.argbEndcap&&
(this.clipped?(this.g3d.plotPixelClippedArgb(this.argbEndcap,this.xEndcap+j,this.yEndcap+k,this.zEndcap-l-1),this.g3d.plotPixelClippedArgb(this.argbEndcap,this.xEndcap-j,this.yEndcap-k,this.zEndcap+l-1)):(this.g3d.plotPixelUnclippedArgb(this.argbEndcap,this.xEndcap+j,this.yEndcap+k,this.zEndcap-l-1),this.g3d.plotPixelUnclippedArgb(this.argbEndcap,this.xEndcap-j,this.yEndcap-k,this.zEndcap+l-1))),this.line3d.plotLineDeltaA(this.shadesA,d,this.shadesB,e,b,this.xA+j,this.yA+k,this.zA-l,this.dxB,this.dyB,
this.dzB,this.clipped),this.drawBackside&&this.line3d.plotLineDelta(this.shadesA[f],d,this.shadesB[f],e,this.xA-j,this.yA-k,this.zA+l,this.dxB,this.dyB,this.dzB,this.clipped);this.g3d.setZMargin(0);3==c&&this.renderSphericalEndcaps()}}},"~N,~N,~B,~B,~N,~N,~N,~N,~N,~N,~N,~N");c(c$,"renderBits",function(a,b,d,e,c,f,j,k,l,h,r,x){if(!(f>3*this.g3d.getRenderHeight())){var A=q(f/2)+1,I=Math.round(j),n=Math.round(k),p=Math.round(l),s=Math.round(h),u=Math.round(r),t=Math.round(x),v=this.g3d.clipCode3(I-A,
n-A,p-A),I=this.g3d.clipCode3(I+A,n+A,p+A),n=this.g3d.clipCode3(s-A,u-A,t-A),A=this.g3d.clipCode3(s+A,u+A,t+A);this.clipped=0!=(v|I|n|A);if(0==(v&A&I&n))if(this.dxBf=h-j,this.dyBf=r-k,this.dzBf=x-l,0==f||1==f)this.line3d.plotLineDelta(this.g3d.getColorArgbOrGray(a),d,this.g3d.getColorArgbOrGray(b),e,z(j),z(k),z(l),z(this.dxBf),z(this.dyBf),z(this.dzBf),this.clipped);else{0<f&&(this.diameter=f,this.xAf=j,this.yAf=k,this.zAf=l);this.drawBackside=!d&&!e&&(this.clipped||2==c||0==c);this.xA=z(this.xAf);
this.yA=z(this.yAf);this.zA=z(this.zAf);this.dxB=z(this.dxBf);this.dyB=z(this.dyBf);this.dzB=z(this.dzBf);this.shadesA=this.g3d.getShades(this.colixA=a);this.shadesB=this.g3d.getShades(this.colixB=b);this.endcaps=c;this.calcArgbEndcap(!0,!0);0<f&&this.generateBaseEllipsePrecisely(!1);2==c&&this.renderFlatEndcapPrecisely(!0);this.line3d.setLineBits(this.dxBf,this.dyBf);this.g3d.setZMargin(5);for(a=this.rasterCount;0<=--a;)b=this.fp8ShadeIndexUp[a]>>8,f=b>>1,j=this.xRaster[a],k=this.yRaster[a],l=this.zRaster[a],
this.tEndcapOpen&&0!=this.argbEndcap&&(this.clipped?(this.g3d.plotPixelClippedArgb(this.argbEndcap,this.xEndcap+j,this.yEndcap+k,this.zEndcap-l-1),this.g3d.plotPixelClippedArgb(this.argbEndcap,this.xEndcap-j,this.yEndcap-k,this.zEndcap+l-1)):(this.g3d.plotPixelUnclippedArgb(this.argbEndcap,this.xEndcap+j,this.yEndcap+k,this.zEndcap-l-1),this.g3d.plotPixelUnclippedArgb(this.argbEndcap,this.xEndcap-j,this.yEndcap-k,this.zEndcap+l-1))),this.line3d.plotLineDeltaBits(this.shadesA,d,this.shadesB,e,b,this.xA+
j,this.yA+k,this.zA-l,this.dxB,this.dyB,this.dzB,this.clipped),this.drawBackside&&this.line3d.plotLineDelta(this.shadesA[f],d,this.shadesB[f],e,this.xA-j,this.yA-k,this.zA+l,this.dxB,this.dyB,this.dzB,this.clipped);this.g3d.setZMargin(0);3==c&&this.renderSphericalEndcaps();this.xAf+=this.dxBf;this.yAf+=this.dyBf;this.zAf+=this.dzBf}}},"~N,~N,~B,~B,~N,~N,~N,~N,~N,~N,~N,~N");c(c$,"renderCone",function(a,b,d,e,c,f,j,k,l,h,r,x){if(!(e>3*this.g3d.getRenderHeight()))if(this.dxBf=k-(this.xAf=c),this.dyBf=
l-(this.yAf=f),this.dzBf=h-(this.zAf=j),this.xA=q(Math.floor(this.xAf)),this.yA=q(Math.floor(this.yAf)),this.zA=q(Math.floor(this.zAf)),this.dxB=q(Math.floor(this.dxBf)),this.dyB=q(Math.floor(this.dyBf)),this.dzB=q(Math.floor(this.dzBf)),this.xTip=k,this.yTip=l,this.zTip=h,this.colixA=a,this.shadesA=this.g3d.getShades(a),a=this.shader.getShadeIndex(this.dxB,this.dyB,-this.dzB),this.g3d.plotPixelClippedScreened(this.shadesA[a],b,z(k),z(l),z(h)),this.diameter=e,1>=e)1==e&&this.line3d.plotLineDelta(this.colixA,
b,this.colixA,b,this.xA,this.yA,this.zA,this.dxB,this.dyB,this.dzB,this.clipped);else{this.endcaps=d;this.calcArgbEndcap(!1,!0);this.generateBaseEllipsePrecisely(x);!x&&2==this.endcaps&&this.renderFlatEndcapPrecisely(!1);this.g3d.setZMargin(5);for(d=this.rasterCount;0<=--d;)h=this.txRaster[d],a=this.tyRaster[d],c=this.tzRaster[d],e=this.xAf+h,k=this.yAf+a,l=this.zAf-c,h=this.xAf-h,a=this.yAf-a,c=this.zAf+c,f=this.shadesA[0],this.tEndcapOpen&&0!=this.argbEndcap&&(this.g3d.plotPixelClippedScreened(this.argbEndcap,
b,z(e),z(k),z(l)),this.g3d.plotPixelClippedScreened(this.argbEndcap,b,z(h),z(a),z(c))),j=this.fp8ShadeIndexUp[d]>>8,0!=f&&(this.line3d.plotLineDeltaA(this.shadesA,b,this.shadesA,b,j,z(e),z(k),z(l),q(Math.ceil(this.xTip-e)),q(Math.ceil(this.yTip-k)),q(Math.ceil(this.zTip-l)),!0),r&&(this.line3d.plotLineDeltaA(this.shadesA,b,this.shadesA,b,j,z(e),z(k)+1,z(l),q(Math.ceil(this.xTip-e)),q(Math.ceil(this.yTip-k))+1,q(Math.ceil(this.zTip-l)),!0),this.line3d.plotLineDeltaA(this.shadesA,b,this.shadesA,b,j,
z(e)+1,z(k),z(l),q(Math.ceil(this.xTip-e))+1,q(Math.ceil(this.yTip-k)),q(Math.ceil(this.zTip-l)),!0)),!x&&!(2!=this.endcaps&&0<this.dzB)&&this.line3d.plotLineDelta(f,b,f,b,z(h),z(a),z(c),q(Math.ceil(this.xTip-h)),q(Math.ceil(this.yTip-a)),q(Math.ceil(this.zTip-c)),!0));this.g3d.setZMargin(0)}},"~N,~B,~N,~N,~N,~N,~N,~N,~N,~N,~B,~B");c(c$,"generateBaseEllipse",function(){this.tEvenDiameter=0==(this.diameter&1);this.radius=this.diameter/2;this.radius2=this.radius*this.radius;var a=this.dxB*this.dxB+
this.dyB*this.dyB;if(0==a)this.cosPhi=this.cosTheta=1,this.sinPhi=0;else{var b=Math.sqrt(a),a=Math.sqrt(a+this.dzB*this.dzB);this.cosTheta=this.dzB/a;this.cosPhi=this.dxB/b;this.sinPhi=this.dyB/b}this.calcRotatedPoint(0,0,!1);this.calcRotatedPoint(0.5,1,!1);this.calcRotatedPoint(1,2,!1);this.rasterCount=3;this.interpolate(0,1);this.interpolate(1,2)});c(c$,"generateBaseEllipsePrecisely",function(a){this.tEvenDiameter=0==(this.diameter&1);this.radius=this.diameter/2;this.radius2=this.radius*this.radius;
var b=this.dxBf*this.dxBf+this.dyBf*this.dyBf;if(0==b)this.cosPhi=this.cosTheta=1,this.sinPhi=0;else{var d=Math.sqrt(b),b=Math.sqrt(b+this.dzBf*this.dzBf);this.cosTheta=this.dzBf/b;this.cosPhi=this.dxBf/d;this.sinPhi=this.dyBf/d}a?(this.calcRotatedPoint(0,0,!0),this.calcRotatedPoint(0.5,1,!0),this.rasterCount=2,this.interpolatePrecisely(0,1)):(this.calcRotatedPoint(0,0,!0),this.calcRotatedPoint(0.5,1,!0),this.calcRotatedPoint(1,2,!0),this.rasterCount=3,this.interpolatePrecisely(0,1),this.interpolatePrecisely(1,
2));for(a=0;a<this.rasterCount;a++)this.xRaster[a]=q(Math.floor(this.txRaster[a])),this.yRaster[a]=q(Math.floor(this.tyRaster[a])),this.zRaster[a]=q(Math.floor(this.tzRaster[a]))},"~B");c(c$,"calcRotatedPoint",function(a,b,d){this.tRaster[b]=a;a*=3.141592653589793;var e=Math.sin(a)*this.cosTheta,c=Math.cos(a);a=this.radius*(e*this.cosPhi-c*this.sinPhi);e=this.radius*(e*this.sinPhi+c*this.cosPhi);c=this.radius2-(a*a+e*e);c=0<c?Math.sqrt(c):0;d?(this.txRaster[b]=a,this.tyRaster[b]=e,this.tzRaster[b]=
c):(this.tEvenDiameter?(this.xRaster[b]=q(a-0.5),this.yRaster[b]=q(e-0.5)):(this.xRaster[b]=q(a),this.yRaster[b]=q(e)),this.zRaster[b]=q(c+0.5));this.fp8ShadeIndexUp[b]=this.shader.getShadeFp8(a,e,c)},"~N,~N,~B");c(c$,"interpolate",function(a,b){var d=this.xRaster[b]-this.xRaster[a];0>d&&(d=-d);var e=this.yRaster[b]-this.yRaster[a];0>e&&(e=-e);if(!(1>=d+e)){for(var d=this.tRaster[a],e=this.tRaster[b],c=this.allocRaster(!1),f=4;0<=--f;){var j=(d+e)/2;this.calcRotatedPoint(j,c,!1);if(this.xRaster[c]==
this.xRaster[a]&&this.yRaster[c]==this.yRaster[a])this.fp8ShadeIndexUp[a]=this.fp8ShadeIndexUp[a]+this.fp8ShadeIndexUp[c]>>>1,d=j;else if(this.xRaster[c]==this.xRaster[b]&&this.yRaster[c]==this.yRaster[b])this.fp8ShadeIndexUp[b]=this.fp8ShadeIndexUp[b]+this.fp8ShadeIndexUp[c]>>>1,e=j;else{this.interpolate(a,c);this.interpolate(c,b);return}}this.xRaster[c]=this.xRaster[a];this.yRaster[c]=this.yRaster[b]}},"~N,~N");c(c$,"interpolatePrecisely",function(a,b){var d=q(Math.floor(this.txRaster[b]))-q(Math.floor(this.txRaster[a]));
0>d&&(d=-d);var e=q(Math.floor(this.tyRaster[b]))-q(Math.floor(this.tyRaster[a]));0>e&&(e=-e);if(!(1>=d+e)){for(var d=this.tRaster[a],e=this.tRaster[b],c=this.allocRaster(!0),f=4;0<=--f;){var j=(d+e)/2;this.calcRotatedPoint(j,c,!0);if(q(Math.floor(this.txRaster[c]))==q(Math.floor(this.txRaster[a]))&&q(Math.floor(this.tyRaster[c]))==q(Math.floor(this.tyRaster[a])))this.fp8ShadeIndexUp[a]=this.fp8ShadeIndexUp[a]+this.fp8ShadeIndexUp[c]>>>1,d=j;else if(q(Math.floor(this.txRaster[c]))==q(Math.floor(this.txRaster[b]))&&
q(Math.floor(this.tyRaster[c]))==q(Math.floor(this.tyRaster[b])))this.fp8ShadeIndexUp[b]=this.fp8ShadeIndexUp[b]+this.fp8ShadeIndexUp[c]>>>1,e=j;else{this.interpolatePrecisely(a,c);this.interpolatePrecisely(c,b);return}}this.txRaster[c]=this.txRaster[a];this.tyRaster[c]=this.tyRaster[b]}},"~N,~N");c(c$,"allocRaster",function(a){for(;this.rasterCount>=this.xRaster.length;)this.xRaster=JU.AU.doubleLengthI(this.xRaster),this.yRaster=JU.AU.doubleLengthI(this.yRaster),this.zRaster=JU.AU.doubleLengthI(this.zRaster),
this.tRaster=JU.AU.doubleLengthF(this.tRaster);for(;this.rasterCount>=this.fp8ShadeIndexUp.length;)this.fp8ShadeIndexUp=JU.AU.doubleLengthI(this.fp8ShadeIndexUp);if(a)for(;this.rasterCount>=this.txRaster.length;)this.txRaster=JU.AU.doubleLengthF(this.txRaster),this.tyRaster=JU.AU.doubleLengthF(this.tyRaster),this.tzRaster=JU.AU.doubleLengthF(this.tzRaster);return this.rasterCount++},"~B");c(c$,"findMinMaxY",function(){this.yMin=this.yMax=this.yRaster[0];for(var a=this.rasterCount;0<--a;){var b=this.yRaster[a];
b<this.yMin?this.yMin=b:b>this.yMax?this.yMax=b:(b=-b,b<this.yMin?this.yMin=b:b>this.yMax&&(this.yMax=b))}});c(c$,"findMinMaxX",function(a){this.xMin=2147483647;this.xMax=-2147483648;for(var b=this.rasterCount;0<=--b;){if(this.yRaster[b]==a){var d=this.xRaster[b];d<this.xMin&&(this.xMin=d,this.zXMin=this.zRaster[b]);d>this.xMax&&(this.xMax=d,this.zXMax=this.zRaster[b])}this.yRaster[b]==-a&&(d=-this.xRaster[b],d<this.xMin&&(this.xMin=d,this.zXMin=-this.zRaster[b]),d>this.xMax&&(this.xMax=d,this.zXMax=
-this.zRaster[b]))}},"~N");c(c$,"renderFlatEndcap",function(a){if(0!=this.dzB&&this.g3d.setC(this.colixEndcap)){var b=this.xA,d=this.yA,e=this.zA;if(a&&0>this.dzB){if(4==this.endcaps)return;b+=this.dxB;d+=this.dyB;e+=this.dzB}this.findMinMaxY();for(a=this.yMin;a<=this.yMax;++a){this.findMinMaxX(a);var c=this.xMax-this.xMin+1;this.g3d.setColorNoisy(this.endcapShadeIndex);this.g3d.plotPixelsClippedRaster(c,b+this.xMin,d+a,e-this.zXMin-1,e-this.zXMax-1,null,null)}}},"~B");c(c$,"renderFlatEndcapPrecisely",
function(a){if(0!=this.dzBf&&this.g3d.setC(this.colixEndcap)){var b=this.xAf,d=this.yAf,e=this.zAf;a&&0>this.dzBf&&(b+=this.dxBf,d+=this.dyBf,e+=this.dzBf);a=z(b);d=z(d);e=z(e);this.findMinMaxY();for(b=this.yMin;b<=this.yMax;++b){this.findMinMaxX(b);var c=this.xMax-this.xMin+1;this.g3d.setColorNoisy(this.endcapShadeIndex);this.g3d.plotPixelsClippedRaster(c,a+this.xMin,d+b,e-this.zXMin-1,e-this.zXMax-1,null,null)}}},"~B");c(c$,"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(c$,"calcArgbEndcap",function(a,b){this.tEndcapOpen=!1;var d=b?this.dzBf:this.dzB;if(!(3==this.endcaps||0==d)){this.xEndcap=this.xA;this.yEndcap=this.yA;this.zEndcap=this.zA;var e=b?this.dxBf:this.dxB,c=b?this.dyBf:this.dyB;0<=d||!a?(this.endcapShadeIndex=this.shader.getShadeIndex(-e,-c,d),this.colixEndcap=
this.colixA,d=this.shadesA):(this.endcapShadeIndex=this.shader.getShadeIndex(e,c,-d),this.colixEndcap=this.colixB,d=this.shadesB,this.xEndcap+=this.dxB,this.yEndcap+=this.dyB,this.zEndcap+=this.dzB);56<this.endcapShadeIndex&&(this.endcapShadeIndex=56);this.argbEndcap=d[this.endcapShadeIndex];this.tEndcapOpen=1==this.endcaps}},"~B,~B")});n("J.g3d");H(J.g3d,"G3DRenderer");n("J.g3d");w(["J.api.JmolRendererInterface","JU.GData","JU.V3","JU.Normix"],"J.g3d.Graphics3D","java.lang.NullPointerException java.util.Arrays javajs.awt.Font JU.AU J.api.Interface J.c.STER J.g3d.CylinderRenderer $.ImageRenderer $.LineRenderer $.Pixelator $.PixelatorShaded $.Platform3D $.SphereRenderer $.TextRenderer $.TextSorter $.TextString JU.C".split(" "),
function(){c$=t(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.aap=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.isScreened=!1;this.argbNoisyDn=this.argbNoisyUp=0;this.pixel=
this.currentFont=null;this.zMargin=0;this.aobuf=null;this.saveDiffuse=this.saveAmbient=this.translucencyLog=this.lastRawColor=this.currentShadeIndex=0;this.$currentlyRendering=!1;this.shadeIndexes2Sided=this.shadeIndexes=this.transformedVectors=this.vectorNormal=this.vectorAC=this.vectorAB=null;s(this,arguments)},J.g3d,"Graphics3D",JU.GData,J.api.JmolRendererInterface);K(c$,function(){this.vectorAB=new JU.V3;this.vectorAC=new JU.V3;this.vectorNormal=new JU.V3;this.transformedVectors=Array(J.g3d.Graphics3D.normixCount);
for(var a=J.g3d.Graphics3D.normixCount;0<=--a;)this.transformedVectors[a]=new JU.V3;this.shadeIndexes=O(J.g3d.Graphics3D.normixCount,0);this.shadeIndexes2Sided=O(J.g3d.Graphics3D.normixCount,0)});h(c$,"clear",function(){this.stringCount=0;this.strings=null;J.g3d.TextRenderer.clearFontCache()});h(c$,"destroy",function(){this.releaseBuffers();this.graphicsForMetrics=this.platform=null});h(c$,"getGData",function(){return this});c(c$,"setZMargin",function(a){this.zMargin=a},"~N");u(c$,function(){E(this,
J.g3d.Graphics3D,[])});h(c$,"initialize",function(a){this.apiPlatform=a;this.platform=new J.g3d.Platform3D(a);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)},"javajs.api.GenericPlatform");h(c$,"addRenderer",function(a){switch(a){case 1073741880:null==this.circle3d&&(this.circle3d=this.getRenderer("Circle"));break;case 553648147:null==this.hermite3d&&
(this.hermite3d=this.getRenderer("Hermite"));case 1073742182:null==this.triangle3d&&(this.triangle3d=this.getRenderer("Triangle"))}},"~N");c(c$,"getRenderer",function(a){return J.api.Interface.getOption("g3d."+a+"Renderer").set(this)},"~S");h(c$,"currentlyRendering",function(){return this.$currentlyRendering});h(c$,"setWindowParameters",function(a,b,d){this.setWinParams(a,b,d);this.$currentlyRendering&&this.endRendering()},"~N,~N,~B");h(c$,"checkTranslucent",function(a){a&&(this.$haveTranslucentObjects=
!0);return!this.twoPass||this.twoPass&&this.$isPass2==a},"~B");h(c$,"beginRendering",function(a,b,d,e){this.$currentlyRendering&&this.endRendering();this.renderLow=e;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.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=0;this.$haveTranslucentObjects=!1;this.translucentCoverOnly=!b;this.aap=!0;null==this.pbuf&&(this.platform.allocateBuffers(this.windowWidth,this.windowHeight,this.antialiasThisFrame,d),this.pbuf=this.platform.pBuffer,this.zbuf=this.platform.zBuffer,this.aobuf=
null);this.setWidthHeight(this.antialiasThisFrame);this.platform.clearBuffer();null!=this.backgroundImage&&this.plotImage(-2147483648,0,-2147483648,this.backgroundImage,null,0,0,0)},"JU.M3,~B,~B,~B");h(c$,"setBackgroundTransparent",function(a){null!=this.platform&&this.platform.setBackgroundTransparent(a)},"~B");c(c$,"releaseBuffers",function(){this.aobuf=this.zbufT=this.pbufT=this.zbuf=this.pbuf=null;this.platform.releaseBuffers();this.line3d.clearLineCache()});h(c$,"setPass2",function(a){if(!this.$haveTranslucentObjects||
!this.$currentlyRendering)return!1;this.$isPass2=!0;this.colixCurrent=0;this.aap=!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();return!0},"~B");h(c$,"endRendering",function(){if(this.$currentlyRendering){if(null!=this.pbuf){if(this.$isPass2&&null!=this.pbufT)for(var a=this.pbufT.length;0<=
--a;)J.g3d.Graphics3D.mergeBufferPixel(this.pbuf,a,this.pbufT[a],this.bgcolor);if(0!=this.ambientOcclusion){if(null==this.aobuf)this.aobuf=D(this.pbuf.length,0);else for(a=this.pbuf.length;0<=--a;)this.aobuf[a]=0;this.shader.occludePixels(this.pbuf,this.zbuf,this.aobuf,this.width,this.height,this.ambientOcclusion)}this.antialiasThisFrame&&this.downsampleFullSceneAntialiasing(!1)}this.platform.setBackgroundColor(this.bgcolor);this.platform.notifyEndOfRendering();this.$currentlyRendering=!1}});c$.mergeBufferPixel=
c(c$,"mergeBufferPixel",function(a,b,d,e){if(0!=d){var c=a[b];if(c!=d){0==c&&(c=e);e=c&16711935;var c=c&65280,f=d&16711935,j=d&65280;switch(d>>24&15){case 0:e=f;c=j;break;case 1:e=(f<<2)+(f<<1)+f+e>>3&16711935;c=(j<<2)+ +(j<<1)+j+c>>3&65280;break;case 2:e=(f<<1)+f+e>>2&16711935;c=(j<<1)+j+c>>2&65280;break;case 3:e=(f<<2)+f+(e<<1)+e>>3&16711935;c=(j<<2)+j+(c<<1)+c>>3&65280;break;case 4:e=e+f>>1&16711935;c=c+j>>1&65280;break;case 5:e=(f<<1)+f+(e<<2)+e>>3&16711935;c=(j<<1)+j+(c<<2)+c>>3&65280;break;
case 6:e=(e<<1)+e+f>>2&16711935;c=(c<<1)+c+j>>2&65280;break;case 7:e=(e<<2)+(e<<1)+e+f>>3&16711935,c=(c<<2)+(c<<1)+c+j>>3&65280}a[b]=4278190080|e|c}}},"~A,~N,~N,~N");h(c$,"getScreenImage",function(a){var b=this.platform.bufferedImage;a&&this.releaseBuffers();return b},"~B");h(c$,"applyAnaglygh",function(a,b){switch(a){case J.c.STER.REDCYAN:this.applyCyanAnaglyph();break;case J.c.STER.CUSTOM:this.applyCustomAnaglyph(b);break;case J.c.STER.REDBLUE:this.applyBlueAnaglyph();break;case J.c.STER.REDGREEN:this.applyGreenAnaglyph()}},
"J.c.STER,~A");h(c$,"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]});c(c$,"applyCustomAnaglyph",function(a){var b=a[0];a=a[1]&16777215;for(var d=this.anaglyphLength;0<=--d;){var e=
this.anaglyphChannelBytes[d]&255,e=(e|(e|e<<8)<<8)&a;this.pbuf[d]=this.pbuf[d]&b|e}},"~A");c(c$,"applyGreenAnaglyph",function(){for(var a=this.anaglyphLength;0<=--a;)this.pbuf[a]=this.pbuf[a]&4294901760|(this.anaglyphChannelBytes[a]&255)<<8});c(c$,"applyBlueAnaglyph",function(){for(var a=this.anaglyphLength;0<=--a;)this.pbuf[a]=this.pbuf[a]&4294901760|this.anaglyphChannelBytes[a]&255});c(c$,"applyCyanAnaglyph",function(){for(var a=this.anaglyphLength;0<=--a;){var b=this.anaglyphChannelBytes[a]&255;
this.pbuf[a]=this.pbuf[a]&4294901760|b<<8|b}});h(c$,"releaseScreenImage",function(){this.platform.clearScreenBufferThreaded()});h(c$,"haveTranslucentObjects",function(){return this.$haveTranslucentObjects});c(c$,"setTempZSlab",function(a){this.zSlab=a},"~N");h(c$,"setZShade",function(a,b,d,e){a?(this.setZShade2(b,d,e),this.pixel=new J.g3d.PixelatorShaded(this)):this.pixel=new J.g3d.Pixelator(this)},"~B,~N,~N,~N");c(c$,"downsampleFullSceneAntialiasing",function(a){var b=this.width,d=0,e=0,c=this.bgcolor;
a&&(c+=255==(c&255)?-1:1);for(var f=this.pbuf.length;0<=--f;)0==this.pbuf[f]&&(this.pbuf[f]=c);c&=16777215;for(f=this.windowHeight;0<=--f;e+=b)for(var j=this.windowWidth;0<=--j;++d){var k=(this.pbuf[e]>>2&1061109567)+(this.pbuf[e++ +b]>>2&1061109567)+(this.pbuf[e]>>2&1061109567)+(this.pbuf[e++ +b]>>2&1061109567),k=k+((k&3233857728)>>6);this.pbuf[d]=k&16777215|4278190080}if(a){d=e=0;for(f=this.windowHeight;0<=--f;e+=b)for(j=this.windowWidth;0<=--j;++d,++e)a=Math.min(this.zbuf[e],this.zbuf[e+b]),a=
Math.min(a,this.zbuf[++e]),a=Math.min(a,this.zbuf[e+b]),2147483647!=a&&(a>>=1),this.zbuf[d]=this.pbuf[d]==c?2147483647:a;this.antialiasThisFrame=!1;this.setWidthHeight(!1)}},"~B");c(c$,"hasContent",function(){return this.platform.hasContent()});h(c$,"setColor",function(a){this.argbCurrent=this.argbNoisyUp=this.argbNoisyDn=a},"~N");h(c$,"setC",function(a){var b=JU.C.isColixLastAvailable(a);if(!b&&a==this.colixCurrent&&-1==this.currentShadeIndex)return!0;var d=a&30720;if(16384==d)return!1;this.renderLow&&
(d=0);var e=0!=d;this.isScreened=e&&30720==d;if(!this.checkTranslucent(e&&!this.isScreened))return!1;this.aap=this.$isPass2||!e;this.$isPass2?(this.translucencyMask=d<<13|16777215,this.translucencyLog=d>>11):this.translucencyLog=0;this.colixCurrent=a;b&&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(c$,"addPixel",function(a,b,d){this.pixel.addPixel(a,b,d)},"~N,~N,~N");c(c$,"clearPixel",function(a,b){this.pixel.clearPixel(a,b)},"~N,~N");h(c$,"drawFilledCircle",function(a,b,d,e,c,f){if(!this.isClippedZ(f)){var j=q((d+1)/2),j=e<j||e+j>=this.width||c<j||c+j>=this.height;if(!j||!this.isClippedXY(d,e,c))0!=a&&this.setC(a)&&(j?this.circle3d.plotCircleCenteredClipped(e,c,f,d):this.circle3d.plotCircleCenteredUnclipped(e,c,f,d)),0!=b&&this.setC(b)&&
(j?this.circle3d.plotFilledCircleCenteredClipped(e,c,f,d):this.circle3d.plotFilledCircleCenteredUnclipped(e,c,f,d))}},"~N,~N,~N,~N,~N,~N");h(c$,"volumeRender4",function(a,b,d,e){if(1==a)this.plotPixelClippedXYZ(b,d,e);else if(!this.isClippedZ(e)){var c=q((a+1)/2),c=b<c||b+c>=this.width||d<c||d+c>=this.height;if(!c||!this.isClippedXY(a,b,d))c?this.circle3d.plotFilledCircleCenteredClipped(b,d,e,a):this.circle3d.plotFilledCircleCenteredUnclipped(b,d,e,a)}},"~N,~N,~N,~N");h(c$,"fillSphereXYZ",function(a,
b,d,e){switch(a){case 1:this.plotPixelClippedArgb(this.argbCurrent,b,d,e);return;case 0:return}a<=(this.antialiasThisFrame?2E3:1E3)&&this.sphere3d.render(this.shadesCurrent,!this.aap,a,b,d,e,null,null,null,-1,null,this.aap)},"~N,~N,~N,~N");h(c$,"volumeRender",function(a){a?(this.saveAmbient=this.shader.ambientPercent,this.saveDiffuse=this.shader.diffusePercent,this.setAmbientPercent(100),this.setDiffusePercent(0),this.addRenderer(1073741880)):(this.setAmbientPercent(this.saveAmbient),this.setDiffusePercent(this.saveDiffuse))},
"~B");h(c$,"fillSphereI",function(a,b){this.fillSphereXYZ(a,b.x,b.y,b.z)},"~N,JU.P3i");h(c$,"fillSphere",function(a,b){this.fillSphereXYZ(a,Math.round(b.x),Math.round(b.y),Math.round(b.z))},"~N,JU.P3");h(c$,"fillEllipsoid",function(a,b,d,e,c,f,j,k,l,h,r){switch(f){case 1:this.plotPixelClippedArgb(this.argbCurrent,d,e,c);return;case 0:return}f<=(this.antialiasThisFrame?2E3:1E3)&&this.sphere3d.render(this.shadesCurrent,!this.aap,f,d,e,c,j,k,l,h,r,this.aap)},"JU.P3,~A,~N,~N,~N,~N,JU.M3,~A,JU.M4,~N,~A");
h(c$,"drawRect",function(a,b,d,e,c,f){if(!(0!=e&&this.isClippedZ(e))){e=c-1;f-=1;c=a+e;var j=b+f;0<=b&&b<this.height&&this.drawHLine(a,b,d,e);0<=j&&j<this.height&&this.drawHLine(a,j,d,e);0<=a&&a<this.width&&this.drawVLine(a,b,d,f);0<=c&&c<this.width&&this.drawVLine(c,b,d,f)}},"~N,~N,~N,~N,~N,~N");c(c$,"drawHLine",function(a,b,d,e){0>e&&(a+=e,e=-e);0>a&&(e+=a,a=0);a+e>=this.width&&(e=this.width-1-a);var c=a+this.width*b;if(this.aap)for(a=0;a<=e;a++)d<this.zbuf[c]&&this.addPixel(c,d,this.argbCurrent),
c++;else{b=0!=((a^b)&1);for(a=0;a<=e;a++)(b=!b)&&d<this.zbuf[c]&&this.addPixel(c,d,this.argbCurrent),c++}},"~N,~N,~N,~N");c(c$,"drawVLine",function(a,b,d,e){0>e&&(b+=e,e=-e);0>b&&(e+=b,b=0);b+e>=this.height&&(e=this.height-1-b);var c=a+this.width*b;if(this.aap)for(a=0;a<=e;a++)d<this.zbuf[c]&&this.addPixel(c,d,this.argbCurrent),c+=this.width;else{b=0!=((a^b)&1);for(a=0;a<=e;a++)(b=!b)&&d<this.zbuf[c]&&this.addPixel(c,d,this.argbCurrent),c+=this.width}},"~N,~N,~N,~N");h(c$,"fillRect",function(a,b,
d,e,c,f){if(!this.isClippedZ(e)){if(0>a){c+=a;if(0>=c)return;a=0}if(a+c>this.width&&(c=this.width-a,0>=c))return;if(0>b){f+=b;if(0>=f)return;b=0}for(b+f>this.height&&(f=this.height-b);0<=--f;)this.plotPixelsUnclippedCount(c,a,b++,d)}},"~N,~N,~N,~N,~N,~N");h(c$,"drawString",function(a,b,d,e,c,f,j){this.currentShadeIndex=0;null!=a&&(this.isClippedZ(f)||this.drawStringNoSlab(a,b,d,e,c,j))},"~S,javajs.awt.Font,~N,~N,~N,~N,~N");h(c$,"drawStringNoSlab",function(a,b,d,e,c,f){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==b?this.currentFont:this.currentFont=b,this.argbCurrent,JU.C.isColixTranslucent(f)?this.getColorArgbOrGray(f)&16777215|(f&30720)<<13:0,d,e,c);this.strings[this.stringCount++]=j}},"~S,javajs.awt.Font,~N,~N,~N,~N");h(c$,"renderAllStrings",function(a){if(null!=this.strings){2<=this.stringCount&&(null==J.g3d.Graphics3D.sort&&(J.g3d.Graphics3D.sort=
new J.g3d.TextSorter),java.util.Arrays.sort(this.strings,J.g3d.Graphics3D.sort));for(var b=0;b<this.stringCount;b++){var d=this.strings[b];this.plotText(d.x,d.y,d.z,d.argb,d.bgargb,d.text,d.font,a)}this.strings=null;this.stringCount=0}},"~O");h(c$,"plotText",function(a,b,d,e,c,f,j,k){J.g3d.TextRenderer.plot(a,b,d,e,c,f,j,this,k,this.antialiasThisFrame)},"~N,~N,~N,~N,~N,~S,javajs.awt.Font,J.api.JmolRendererInterface");h(c$,"drawImage",function(a,b,d,e,c,f,j,k){null==a||(0==j||0==k||this.isClippedZ(c))||
this.plotImage(b,d,e,a,null,f,j,k)},"~O,~N,~N,~N,~N,~N,~N,~N");h(c$,"plotImage",function(a,b,d,e,c,f,j,k){this.setC(f);this.$isPass2||(this.translucencyMask=-1);0==f&&(this.argbCurrent=0);J.g3d.ImageRenderer.plotImage(a,b,d,e,this,c,this.antialiasThisFrame,this.argbCurrent,j,k)},"~N,~N,~N,~O,J.api.JmolRendererInterface,~N,~N,~N");h(c$,"setFontFid",function(a){this.currentFont=javajs.awt.Font.getFont3D(a)},"~N");h(c$,"setFont",function(a){this.currentFont=a},"javajs.awt.Font");h(c$,"getFont3DCurrent",
function(){return this.currentFont});h(c$,"drawPixel",function(a,b,d){this.plotPixelClippedXYZ(a,b,d)},"~N,~N,~N");h(c$,"drawPoints",function(a,b,d){if(1<d)for(var e=0.8*d*d,c=-d;c<d;c++)for(var f=-d;f<d;f++)c*c+f*f>e||(this.plotPoints(a,b,c,f),this.plotPoints(a,b,c,f));else this.plotPoints(a,b,0,0)},"~N,~A,~N");h(c$,"drawDashedLine",function(a,b,d,e){this.line3d.plotDashedLine(this.argbCurrent,!this.aap,a,b,d.x,d.y,d.z,e.x,e.y,e.z,!0)},"~N,~N,JU.P3i,JU.P3i");h(c$,"drawDottedLine",function(a,b){this.line3d.plotDashedLine(this.argbCurrent,
!this.aap,2,1,a.x,a.y,a.z,b.x,b.y,b.z,!0)},"JU.P3i,JU.P3i");h(c$,"drawLineXYZ",function(a,b,d,e,c,f){this.line3d.plotLine(this.argbCurrent,!this.aap,this.argbCurrent,!this.aap,a,b,d,e,c,f,!0)},"~N,~N,~N,~N,~N,~N");h(c$,"drawLine",function(a,b,d,e,c,f,j,k){this.setC(a)||(a=0);var l=!this.aap,h=this.argbCurrent;this.setC(b)||(b=0);0==a&&0==b||this.line3d.plotLine(h,l,this.argbCurrent,!this.aap,d,e,c,f,j,k,!0)},"~N,~N,~N,~N,~N,~N,~N,~N");h(c$,"drawLineAB",function(a,b){this.line3d.plotLine(this.argbCurrent,
!this.aap,this.argbCurrent,!this.aap,a.x,a.y,a.z,b.x,b.y,b.z,!0)},"JU.P3i,JU.P3i");h(c$,"fillCylinderXYZ",function(a,b,d,e,c,f,j,k,l,h){this.setC(a)||(a=0);var r=!this.aap;this.setC(b)||(b=0);0==a&&0==b||this.cylinder3d.render(a,b,r,!this.aap,d,e,c,f,j,k,l,h)},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");h(c$,"fillCylinderScreen",function(a,b,d,e,c,f,j,k){this.cylinder3d.render(this.colixCurrent,this.colixCurrent,!this.aap,!this.aap,a,b,d,e,c,f,j,k)},"~N,~N,~N,~N,~N,~N,~N,~N");h(c$,"fillCylinderScreen3I",function(a,
b,d,e){this.cylinder3d.render(this.colixCurrent,this.colixCurrent,!this.aap,!this.aap,a,b,d.x,d.y,d.z,e.x,e.y,e.z)},"~N,~N,JU.P3i,JU.P3i,JU.P3,JU.P3,~N");h(c$,"fillCylinder",function(a,b,d,e){this.cylinder3d.render(this.colixCurrent,this.colixCurrent,!this.aap,!this.aap,a,b,d.x,d.y,d.z,e.x,e.y,e.z)},"~N,~N,JU.P3i,JU.P3i");h(c$,"fillCylinderBits",function(a,b,d,e){this.cylinder3d.renderBits(this.colixCurrent,this.colixCurrent,!this.aap,!this.aap,a,b,d.x,d.y,d.z,e.x,e.y,e.z)},"~N,~N,JU.P3,JU.P3");h(c$,
"fillConeScreen",function(a,b,d,e,c){this.cylinder3d.renderCone(this.colixCurrent,!this.aap,a,b,d.x,d.y,d.z,e.x,e.y,e.z,!1,c)},"~N,~N,JU.P3i,JU.P3i,~B");h(c$,"fillConeSceen3f",function(a,b,d,e){this.cylinder3d.renderCone(this.colixCurrent,!this.aap,a,b,d.x,d.y,d.z,e.x,e.y,e.z,!0,!1)},"~N,~N,JU.P3,JU.P3");h(c$,"drawHermite4",function(a,b,d,e,c){this.hermite3d.renderHermiteRope(!1,a,0,0,0,b,d,e,c)},"~N,JU.P3i,JU.P3i,JU.P3i,JU.P3i");h(c$,"drawHermite7",function(a,b,d,e,c,f,j,k,l,h,r,x,A){if(0==A)this.hermite3d.renderHermiteRibbon(a,
b,d,e,c,f,j,k,l,h,r,x,0);else{this.hermite3d.renderHermiteRibbon(a,b,d,e,c,f,j,k,l,h,r,x,1);var I=this.colixCurrent;this.setC(A);this.hermite3d.renderHermiteRibbon(a,b,d,e,c,f,j,k,l,h,r,x,-1);this.setC(I)}},"~B,~B,~N,JU.P3i,JU.P3i,JU.P3i,JU.P3i,JU.P3i,JU.P3i,JU.P3i,JU.P3i,~N,~N");h(c$,"fillHermite",function(a,b,d,e,c,f,j,k){this.hermite3d.renderHermiteRope(!0,a,b,d,e,c,f,j,k)},"~N,~N,~N,~N,JU.P3i,JU.P3i,JU.P3i,JU.P3i");h(c$,"drawTriangle3C",function(a,b,d,e,c,f,j){1==(j&1)&&this.drawLine(b,e,a.x,
a.y,a.z,d.x,d.y,d.z);2==(j&2)&&this.drawLine(e,f,d.x,d.y,d.z,c.x,c.y,c.z);4==(j&4)&&this.drawLine(b,f,a.x,a.y,a.z,c.x,c.y,c.z)},"JU.P3i,~N,JU.P3i,~N,JU.P3i,~N,~N");h(c$,"drawTriangle3I",function(a,b,d,e){1==(e&1)&&this.line3d.plotLine(this.argbCurrent,!this.aap,this.argbCurrent,!this.aap,a.x,a.y,a.z,b.x,b.y,b.z,!0);2==(e&2)&&this.line3d.plotLine(this.argbCurrent,!this.aap,this.argbCurrent,!this.aap,b.x,b.y,b.z,d.x,d.y,d.z,!0);4==(e&4)&&this.line3d.plotLine(this.argbCurrent,!this.aap,this.argbCurrent,
!this.aap,a.x,a.y,a.z,d.x,d.y,d.z,!0)},"JU.P3i,JU.P3i,JU.P3i,~N");h(c$,"fillTriangleTwoSided",function(a,b,d,e,c,f,j,k,l,h){this.setColorNoisy(this.getShadeIndex(a));this.triangle3d.fillTriangleXYZ(b,d,e,c,f,j,k,l,h,!1)},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");h(c$,"fillTriangle3f",function(a,b,d,e){var c=this.getShadeIndexP3(a,b,d);e?this.setColorNoisy(c):this.setColor(this.shadesCurrent[c]);this.triangle3d.fillTriangleP3f(a,b,d,!1)},"JU.P3,JU.P3,JU.P3,~B");h(c$,"fillTriangle3i",function(a,b,d){this.triangle3d.fillTriangleP3i(a,
b,d,!1)},"JU.P3i,JU.P3i,JU.P3i,JU.P3,JU.P3,JU.P3");h(c$,"fillTriangle",function(a,b,d,e,c,f,j,k,l,h){if(!this.$isPass2&&d==f&&d==l&&b==c&&b==k)this.setTriangleColixAndShadeIndex(b,this.getShadeIndex(d)),b=!1;else{if(!this.setTriangleTranslucency(b,c,k))return;this.triangle3d.setGouraud(this.getShades(b)[this.getShadeIndex(d)],this.getShades(c)[this.getShadeIndex(f)],this.getShades(k)[this.getShadeIndex(l)]);b=!0}this.triangle3d.fillTriangleP3if(a,e,j,h,b)},"JU.P3i,~N,~N,JU.P3i,~N,~N,JU.P3i,~N,~N,~N");
h(c$,"fillTriangle3CN",function(a,b,d,e,c,f,j,k,l){if(!this.$isPass2&&d==f&&d==l&&b==c&&b==k)this.setTriangleColixAndShadeIndex(b,this.getShadeIndex(d)),b=!1;else{if(!this.setTriangleTranslucency(b,c,k))return;this.triangle3d.setGouraud(this.getShades(b)[this.getShadeIndex(d)],this.getShades(c)[this.getShadeIndex(f)],this.getShades(k)[this.getShadeIndex(l)]);b=!0}this.triangle3d.fillTriangleP3i(a,e,j,b)},"JU.P3i,~N,~N,JU.P3i,~N,~N,JU.P3i,~N,~N");c(c$,"setTriangleColixAndShadeIndex",function(a,b){a==
this.colixCurrent&&this.currentShadeIndex==b||(this.currentShadeIndex=-1,this.setC(a),this.setColorNoisy(b))},"~N,~N");c(c$,"setTriangleTranslucency",function(a,b,d){if(!this.$isPass2)return!0;a&=14336;b&=14336;d&=14336;this.translucencyMask=(JU.GData.roundInt(q((a+b+d)/3))&30720)<<13|16777215;return!0},"~N,~N,~N");h(c$,"drawQuadrilateral",function(a,b,d,e,c){this.setC(a);this.drawLineAB(b,d);this.drawLineAB(d,e);this.drawLineAB(e,c);this.drawLineAB(c,b)},"~N,JU.P3i,JU.P3i,JU.P3i,JU.P3i");h(c$,"fillQuadrilateral",
function(a,b,d,e){this.setColorNoisy(this.getShadeIndexP3(a,b,d));this.triangle3d.fillTriangleP3f(a,b,d,!1);this.triangle3d.fillTriangleP3f(a,d,e,!1)},"JU.P3,JU.P3,JU.P3,JU.P3");h(c$,"fillQuadrilateral3i",function(a,b,d,e,c,f,j,k,l,h,r,x){this.fillTriangle3CN(a,b,d,e,c,f,j,k,l);this.fillTriangle3CN(a,b,d,j,k,l,h,r,x)},"JU.P3i,~N,~N,JU.P3i,~N,~N,JU.P3i,~N,~N,JU.P3i,~N,~N");h(c$,"drawSurface",function(){},"JU.MeshSurface,~N");c(c$,"plotPixelClippedXYZ",function(a,b,d){this.isClipped3(a,b,d)||(a=b*this.width+
a,d<this.zbuf[a]&&this.addPixel(a,d,this.argbCurrent))},"~N,~N,~N");h(c$,"plotPixelClippedP3i",function(a){this.plotPixelClippedXYZ(a.x,a.y,a.z)},"JU.P3i");c(c$,"plotPixelClippedArgb",function(a,b,d,e){this.isClipped3(b,d,e)||(b=d*this.width+b,e<this.zbuf[b]&&this.addPixel(b,e,a))},"~N,~N,~N,~N");h(c$,"plotImagePixel",function(a,b,d,e,c,f){this.isClipped(b,d)||(b=d*this.width+b,e<this.zbuf[b]&&this.shadeTextPixel(b,e,a,f,c))},"~N,~N,~N,~N,~N,~N");c(c$,"plotPixelClippedScreened",function(a,b,d,e,c){!this.isClipped3(d,
e,c)&&!(b&&0!=((d^e)&1))&&(b=e*this.width+d,c<this.zbuf[b]&&this.addPixel(b,c,a))},"~N,~B,~N,~N,~N");c(c$,"plotPixelUnclipped",function(a,b,d){a=b*this.width+a;d<this.zbuf[a]&&this.addPixel(a,d,this.argbCurrent)},"~N,~N,~N");c(c$,"plotPixelUnclippedArgb",function(a,b,d,e){b=d*this.width+b;e<this.zbuf[b]&&this.addPixel(b,e,a)},"~N,~N,~N,~N");c(c$,"plotPixelsClipped",function(a,b,d,e){if(!(0>d||d>=this.height||b>=this.width))if(0>b&&(a+=b,b=0),a+b>this.width&&(a=this.width-b),!(0>=a)){var c=d*this.width+
b;a=c+a;var f=1;this.aap||(f=2,0!=((b^d)&1)&&++c);for(;c<a;)e<this.zbuf[c]&&this.addPixel(c,e,this.argbCurrent),c+=f}},"~N,~N,~N,~N");c(c$,"plotPixelsClippedRaster",function(a,b,d,e,c,f,j){if(!(0>=a||0>d||d>=this.height||b>=this.width||e<this.slab&&c<this.slab||e>this.depth&&c>this.depth)){var k=(b<<16)+(d<<1)^858993459,l=(e<<10)+512;e=c-e;c=q(a/2);e=JU.GData.roundInt(q(((e<<10)+(0<=e?c:-c))/a));if(0>b){b=-b;l+=e*b;a-=b;if(0>=a)return;b=0}a+b>this.width&&(a=this.width-b);c=0!=((b^d)&1);b=d*this.width+
b;if(null==f)for(;0<=--a;){if(this.aap||!0==(c=!c))j=l>>10,j>=this.slab&&(j<=this.depth&&j<this.zbuf[b])&&(k=(k<<16)+(k<<1)+k&2147483647,f=k>>16&7,this.addPixel(b,j,0==f?this.argbNoisyDn:1==f?this.argbNoisyUp:this.argbCurrent));++b;l+=e}else{k=f.r<<8;d=q((j.r-f.r<<8)/a);var h=f.g,r=q((j.g-h)/a);f=f.b;for(var x=q((j.b-f)/a);0<=--a;){if(this.aap||(c=!c))j=l>>10,j>=this.slab&&(j<=this.depth&&j<this.zbuf[b])&&this.addPixel(b,j,4278190080|k&16711680|h&65280|f>>8&255);++b;l+=e;k+=d;h+=r;f+=x}}}},"~N,~N,~N,~N,~N,JU.Rgb16,JU.Rgb16");
c(c$,"plotPixelsUnclippedRaster",function(a,b,d,e,c,f,j){if(!(0>=a)){var k=((b<<16)+(d<<1)^858993459)&2147483647,l=0!=((b^d)&1),h=(e<<10)+512;e=c-e;c=q(a/2);e=JU.GData.roundInt(q(((e<<10)+(0<=e?c:-c))/a));b=d*this.width+b;if(null==f)for(;0<=--a;){if(this.aap||(l=!l))j=h>>10,j<this.zbuf[b]&&(k=(k<<16)+(k<<1)+k&2147483647,f=k>>16&7,this.addPixel(b,j,0==f?this.argbNoisyDn:1==f?this.argbNoisyUp:this.argbCurrent));++b;h+=e}else{k=f.r<<8;d=JU.GData.roundInt(q((j.r-f.r<<8)/a));c=f.g;var r=JU.GData.roundInt(q((j.g-
c)/a));f=f.b;for(var x=JU.GData.roundInt(q((j.b-f)/a));0<=--a;){if(this.aap||(l=!l))j=h>>10,j<this.zbuf[b]&&this.addPixel(b,j,4278190080|k&16711680|c&65280|f>>8&255);++b;h+=e;k+=d;c+=r;f+=x}}}},"~N,~N,~N,~N,~N,JU.Rgb16,JU.Rgb16");c(c$,"plotPixelsUnclippedCount",function(a,b,d,e){var c=d*this.width+b;if(this.aap)for(;0<=--a;)e<this.zbuf[c]&&this.addPixel(c,e,this.argbCurrent),++c;else if(a=c+a,!(0!=((b^d)&1)&&++c==a)){do e<this.zbuf[c]&&this.addPixel(c,e,this.argbCurrent),c+=2;while(c<a)}},"~N,~N,~N,~N");
c(c$,"plotPoints",function(a,b,d,e){for(a*=3;0<a;){var c=b[--a],f=b[--a]+e,j=b[--a]+d;if(!this.isClipped3(j,f,c)){var k=f*this.width+j++;c<this.zbuf[k]&&this.addPixel(k,c,this.argbCurrent);this.antialiasThisFrame&&(k=f*this.width+j,!this.isClipped3(j,f,c)&&c<this.zbuf[k]&&this.addPixel(k,c,this.argbCurrent),k=++f*this.width+j,!this.isClipped3(j,f,c)&&c<this.zbuf[k]&&this.addPixel(k,c,this.argbCurrent),k=f*this.width+--j,!this.isClipped3(j,f,c)&&c<this.zbuf[k]&&this.addPixel(k,c,this.argbCurrent))}}},
"~N,~A,~N,~N");c(c$,"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");h(c$,"setNoisySurfaceShade",function(a,b,d){this.vectorAB.set(b.x-a.x,b.y-a.y,b.z-a.z);null==d?a=this.shader.getShadeIndex(-this.vectorAB.x,-this.vectorAB.y,this.vectorAB.z):(this.vectorAC.set(d.x-a.x,d.y-a.y,d.z-a.z),this.vectorAB.cross(this.vectorAB,this.vectorAC),a=0<=this.vectorAB.z?
this.shader.getShadeIndex(-this.vectorAB.x,-this.vectorAB.y,this.vectorAB.z):this.shader.getShadeIndex(this.vectorAB.x,this.vectorAB.y,-this.vectorAB.z));56<a&&(a=56);this.setColorNoisy(a)},"JU.P3i,JU.P3i,JU.P3i");c(c$,"getShadeIndexP3",function(a,b,d){this.vectorAB.sub2(b,a);this.vectorAC.sub2(d,a);this.vectorNormal.cross(this.vectorAB,this.vectorAC);return 0<=this.vectorNormal.z?this.shader.getShadeIndex(-this.vectorNormal.x,-this.vectorNormal.y,this.vectorNormal.z):this.shader.getShadeIndex(this.vectorNormal.x,
this.vectorNormal.y,-this.vectorNormal.z)},"JU.P3,JU.P3,JU.P3");h(c$,"renderBackground",function(a){null!=this.backgroundImage&&this.plotImage(-2147483648,0,-2147483648,this.backgroundImage,a,0,0,0)},"J.api.JmolRendererInterface");h(c$,"drawAtom",function(a){this.fillSphereXYZ(a.sD,a.sX,a.sY,a.sZ)},"JM.Atom");h(c$,"getExportType",function(){return 0});h(c$,"getExportName",function(){return null});c(c$,"canDoTriangles",function(){return!0});c(c$,"isCartesianExport",function(){return!1});h(c$,"initializeExporter",
function(){return null},"JV.Viewer,~N,JU.GData,java.util.Map");h(c$,"finalizeOutput",function(){return null});h(c$,"drawBond",function(){},"JU.P3,JU.P3,~N,~N,~N,~N,~N");h(c$,"drawEllipse",function(){return!1},"JU.P3,JU.P3,JU.P3,~B,~B");c(c$,"getPrivateKey",function(){return 0});h(c$,"clearFontCache",function(){J.g3d.TextRenderer.clearFontCache()});h(c$,"getTransformedVertexVectors",function(){return this.transformedVectors});h(c$,"isDirectedTowardsCamera",function(a){return 0>a||0<this.transformedVectors[a].z},
"~N");c(c$,"setRotationMatrix",function(a){for(var b=JU.Normix.getVertexVectors(),d=J.g3d.Graphics3D.normixCount;0<=--d;){var e=this.transformedVectors[d];a.rotate2(b[d],e);this.shadeIndexes[d]=this.shader.getShadeB(e.x,-e.y,e.z);this.shadeIndexes2Sided[d]=0<=e.z?this.shadeIndexes[d]:this.shader.getShadeB(-e.x,e.y,-e.z)}},"JU.M3");c(c$,"getShadeIndex",function(a){return-1E4==a||9999==a?J.g3d.Graphics3D.nullShadeIndex:0>a?this.shadeIndexes2Sided[~a]:this.shadeIndexes[a]},"~N");h(c$,"renderCrossHairs",
function(a,b,d,e,c){b=this.isAntialiased();this.setC(0>c?10:100<c?11:23);c=Math.max(Math.min(this.width,Math.round(e.x)),0);d=Math.max(Math.min(this.height,Math.round(e.y)),0);var f=Math.round(e.z)+1,j=b?8:4,k=b?20:10;b=b?2:1;this.drawRect(c-j,d,f,0,k,b);this.drawRect(c,d-j,f,0,b,k);this.drawRect(c-j,d-j,f,0,k,k);j=k;k>>=1;this.setC(a[1]<e.x?21:11);this.drawRect(c-j,d,f,0,k,b);this.setC(a[0]>e.x?21:11);this.drawRect(c+k,d,f,0,k,b);this.setC(a[3]<e.y?21:11);this.drawRect(c,d-j,f,0,b,k);this.setC(a[2]>
e.y?21:11);this.drawRect(c,d+k,f,0,b,k)},"~A,~N,~N,JU.P3,~N");h(c$,"initializeOutput",function(){return!1},"JV.Viewer,~N,JU.GData,java.util.Map");c(c$,"shadeTextPixel",function(a,b,d,e,c){switch(c){case 8:this.addPixel(a,b,d);return}0!=e&&J.g3d.Graphics3D.mergeBufferPixel(this.pbuf,a,e,this.bgcolor);c+=this.translucencyLog;7<c||(J.g3d.Graphics3D.mergeBufferPixel(this.pbuf,a,d&16777215|c<<24,this.bgcolor),this.zbuf[a]=b)},"~N,~N,~N,~N,~N");C(c$,"sort",null);c$.normixCount=c$.prototype.normixCount=
JU.Normix.getNormixCount();C(c$,"nullShadeIndex",50)});n("J.g3d");c$=B(J.g3d,"ImageRenderer");c$.plotImage=c(c$,"plotImage",function(a,b,d,e,c,f,j,k,l,h){k=(j=-2147483648==a)?c.bgcolor:k;j&&(a=0,d=2147483646,l=c.width,h=c.height);0>=a+l||(a>=c.width||0>=b+h||b>=c.height)||(e=c.apiPlatform.drawImageToBuffer(null,c.platform.offscreenImage,e,l,h,j?k:0),null!=e&&(null!=f||0>a||a+l>c.width||0>b||b+h>c.height?J.g3d.ImageRenderer.plotImageClipped(a,b,d,c,f,l,h,e,k):J.g3d.ImageRenderer.plotImageUnClipped(a,
b,d,c,l,h,e,k)))},"~N,~N,~N,~O,J.g3d.Graphics3D,J.api.JmolRendererInterface,~B,~N,~N,~N");c$.plotImageClipped=c(c$,"plotImageClipped",function(a,b,d,e,c,f,j,k,l){null==c&&(c=e);for(var h=e=0;e<j;e++)for(var r=0;r<f;r++){var x=k[h++];c.plotImagePixel(x,a+r,b+e,d,8,l)}},"~N,~N,~N,J.g3d.Graphics3D,J.api.JmolRendererInterface,~N,~N,~A,~N");c$.plotImageUnClipped=c(c$,"plotImageUnClipped",function(a,b,d,e,c,f,j){var k=e.zbuf,l=e.width;a=b*l+a;for(var h=b=0,r=0;b<f;){for(;h<c;)d<k[a]&&e.addPixel(a,d,j[r]),
++r,++h,++a;++b;h-=c;a+=l-c}},"~N,~N,~N,J.g3d.Graphics3D,~N,~N,~A,~N");n("J.g3d");w(["java.util.Hashtable"],"J.g3d.LineRenderer",["java.lang.Float","JU.BS","JU.Logger"],function(){c$=t(function(){this.lineBits=this.shader=this.g3d=null;this.slope=0;this.lineTypeX=!1;this.nFound=this.nCached=this.nBits=0;this.slopeKey=this.lineCache=null;this.cc2=this.cc1=this.z2t=this.y2t=this.x2t=this.z1t=this.y1t=this.x1t=0;s(this,arguments)},J.g3d,"LineRenderer");K(c$,function(){this.lineCache=new java.util.Hashtable});
u(c$,function(a){this.g3d=a;this.shader=a.shader},"J.g3d.Graphics3D");c(c$,"setLineBits",function(a,b){this.slope=0!=a?b/a:0<=b?3.4028235E38:-3.4028235E38;this.nBits=(this.lineTypeX=1>=this.slope&&-1<=this.slope)?this.g3d.getRenderWidth():this.g3d.getRenderHeight();if(!this.getCachedLine()){this.lineBits=JU.BS.newN(this.nBits);b=Math.abs(b);a=Math.abs(a);if(b>a){var d=a;a=b;b=d}for(var d=0,e=a+a,c=b+b,f=0;f<this.nBits;f++)d+=c,d>a&&(this.lineBits.set(f),d-=e);this.lineCache.put(this.slopeKey,this.lineBits);
this.nCached++}},"~N,~N");c(c$,"clearLineCache",function(){this.lineCache.clear();this.nCached=0});c(c$,"plotLine",function(a,b,d,e,c,f,j,k,l,h,r){this.x1t=c;this.x2t=k;this.y1t=f;this.y2t=l;this.z1t=j;this.z2t=h;if(r)switch(this.getTrimmedLine()){case 0:r=!1;break;case 2:return}this.plotLineClipped(a,b,d,e,c,f,j,k-c,l-f,h-j,r,0,0)},"~N,~B,~N,~B,~N,~N,~N,~N,~N,~N,~B");c(c$,"plotLineDelta",function(a,b,d,e,c,f,j,k,l,h,r){this.x1t=c;this.x2t=c+k;this.y1t=f;this.y2t=f+l;this.z1t=j;this.z2t=j+h;if(r)switch(this.getTrimmedLine()){case 2:return;
case 0:r=!1}this.plotLineClipped(a,b,d,e,c,f,j,k,l,h,r,0,0)},"~N,~B,~N,~B,~N,~N,~N,~N,~N,~N,~B");c(c$,"plotLineDeltaA",function(a,b,d,e,c,f,j,k,l,h,r,x){this.x1t=f;this.x2t=f+l;this.y1t=j;this.y2t=j+h;this.z1t=k;this.z2t=k+r;if(x)switch(this.getTrimmedLine()){case 2:return;case 0:x=!1}this.plotLineClippedA(a,b,d,e,c,f,j,k,l,h,r,x,0,0)},"~A,~B,~A,~B,~N,~N,~N,~N,~N,~N,~N,~B");c(c$,"plotLineDeltaBits",function(a,b,d,e,c,f,j,k,l,h,r,x){this.x1t=f;this.x2t=f+l;this.y1t=j;this.y2t=j+h;this.z1t=k;this.z2t=
k+r;x&&2==this.getTrimmedLine()||this.plotLineClippedBits(a,b,d,e,c,f,j,k,l,h,r,0,0)},"~A,~B,~A,~B,~N,~N,~N,~N,~N,~N,~N,~B");c(c$,"plotDashedLine",function(a,b,d,e,c,f,j,k,l,h,r){this.x1t=c;this.x2t=k;this.y1t=f;this.y2t=l;this.z1t=j;this.z2t=h;if(r)switch(this.getTrimmedLine()){case 2:return;case 0:r=!1}this.plotLineClipped(a,b,a,b,c,f,j,k-c,l-f,h-j,r,d,e)},"~N,~B,~N,~N,~N,~N,~N,~N,~N,~N,~B");c(c$,"getCachedLine",function(){this.slopeKey=Float.$valueOf(this.slope);if(!this.lineCache.containsKey(this.slopeKey))return!1;
this.lineBits=this.lineCache.get(this.slopeKey);JU.Logger.debugging&&(this.nFound++,1E6==this.nFound&&JU.Logger.debug("nCached/nFound lines: "+this.nCached+" "+this.nFound));return!0});c(c$,"getTrimmedLine",function(){this.cc1=this.g3d.clipCode3(this.x1t,this.y1t,this.z1t);this.cc2=this.g3d.clipCode3(this.x2t,this.y2t,this.z2t);if(0==(this.cc1|this.cc2))return 0;var a=this.g3d.xLast,b=this.g3d.yLast,d=this.g3d.slab,e=this.g3d.depth;do{if(0!=(this.cc1&this.cc2))return 2;var c=this.x2t-this.x1t,f=this.y2t-
this.y1t,j=this.z2t-this.z1t;0!=this.cc1?(0!=(this.cc1&8)?(this.y1t+=z(-this.x1t*f/c),this.z1t+=z(-this.x1t*j/c),this.x1t=0):0!=(this.cc1&4)?(this.y1t+=z((a-this.x1t)*f/c),this.z1t+=z((a-this.x1t)*j/c),this.x1t=a):0!=(this.cc1&2)?(this.x1t+=z(-this.y1t*c/f),this.z1t+=z(-this.y1t*j/f),this.y1t=0):0!=(this.cc1&1)?(this.x1t+=z((b-this.y1t)*c/f),this.z1t+=z((b-this.y1t)*j/f),this.y1t=b):0!=(this.cc1&32)?(this.x1t+=z((d-this.z1t)*c/j),this.y1t+=z((d-this.z1t)*f/j),this.z1t=d):(this.x1t+=z((e-this.z1t)*
c/j),this.y1t+=z((e-this.z1t)*f/j),this.z1t=e),this.cc1=this.g3d.clipCode3(this.x1t,this.y1t,this.z1t)):(0!=(this.cc2&8)?(this.y2t+=z(-this.x2t*f/c),this.z2t+=z(-this.x2t*j/c),this.x2t=0):0!=(this.cc2&4)?(this.y2t+=z((a-this.x2t)*f/c),this.z2t+=z((a-this.x2t)*j/c),this.x2t=a):0!=(this.cc2&2)?(this.x2t+=z(-this.y2t*c/f),this.z2t+=z(-this.y2t*j/f),this.y2t=0):0!=(this.cc2&1)?(this.x2t+=z((b-this.y2t)*c/f),this.z2t+=z((b-this.y2t)*j/f),this.y2t=b):0!=(this.cc2&32)?(this.x2t+=z((d-this.z2t)*c/j),this.y2t+=
z((d-this.z2t)*f/j),this.z2t=d):(this.x2t+=z((e-this.z2t)*c/j),this.y2t+=z((e-this.z2t)*f/j),this.z2t=e),this.cc2=this.g3d.clipCode3(this.x2t,this.y2t,this.z2t))}while(0!=(this.cc1|this.cc2));return 1});c(c$,"plotLineClipped",function(a,b,d,e,c,f,j,k,l,h,r,x,A){var I=this.g3d.zbuf,n=this.g3d.getRenderWidth(),p=0;0==x&&(A=2147483647,x=1);var s=f*n+c,u=this.g3d.bufferSize,t=0!=((c^f)&1);0!=a&&(!r&&0<=s&&s<u&&j<I[s]&&(!b||(t=!t)))&&this.g3d.addPixel(s,j,a);if(!(0==k&&0==l)){r=1;var v=n;c+=k;var w=f+
l;0>k&&(k=-k,r=-1);0>l&&(l=-l,v=-n);n=k+k;f=l+l;j<<=10;if(l<=k){var y=k-1;0>h&&(y=-y);h=q(((h<<10)+y)/k);l=0;y=Math.abs(c-this.x2t)-1;c=Math.abs(c-this.x1t)-1;for(var w=k-1,B=q(w/2);--w>=y&&!(w==B&&(b=e,a=d,0==a));){s+=r;j+=h;l+=f;l>k&&(s+=v,l-=n,t=!t);if(0!=a&&w<c&&0<=s&&s<u&&p<A&&(!b||(t=!t))){var z=j>>10;z<I[s]&&this.g3d.addPixel(s,z,a)}p=(p+1)%x}}else{y=l-1;0>h&&(y=-y);h=q(((h<<10)+y)/l);k=0;y=Math.abs(w-this.y2t)-1;c=Math.abs(w-this.y1t)-1;w=l-1;for(B=q(w/2);--w>=y&&!(w==B&&(b=e,a=d,0==a));){s+=
v;j+=h;k+=n;k>l&&(s+=r,k-=f,t=!t);if(0!=a&&w<c&&0<=s&&s<u&&p<A&&(!b||(t=!t)))z=j>>10,z<I[s]&&this.g3d.addPixel(s,z,a);p=(p+1)%x}}}},"~N,~B,~N,~B,~N,~N,~N,~N,~N,~N,~B,~N,~N");c(c$,"plotLineClippedA",function(a,b,d,e,c,f,j,k,l,h,r,x,A,I){var n=this.g3d.zbuf,s=this.g3d.getRenderWidth(),p=0;0==A&&(I=2147483647,A=1);var t=j*s+f,u=this.g3d.bufferSize,v=63>c?c+1:c,w=0<c?c-1:c,y=a[v],z=a[w],B=d[c],v=d[v];d=d[w];a=a[c];c=b;var C=0!=((f^j)&1);0!=a&&(!x&&0<=t&&t<u&&k<n[t]&&(!c||(C=!C)))&&this.g3d.addPixel(t,
k,a);if(!(0==l&&0==h)){x=1;var w=s,D=f+l,E=j+h;0>l&&(l=-l,x=-1);0>h&&(h=-h,w=-s);j=l+l;f=h+h;k<<=10;if(h<=l){var F=l-1;0>r&&(F=-F);r=q(((r<<10)+F)/l);h=0;for(var F=Math.abs(D-this.x2t)-1,D=Math.abs(D-this.x1t)-1,E=l-1,G=q(E/2);--E>=F;){if(E==G){a=B;if(0==a)break;y=v;z=d;if((c=e)&&!b)var C=q(t/s),H=t%s,C=0==((H^C)&1)}t+=x;k+=r;h+=f;h>l&&(t+=w,h-=j,C=!C);if(0!=a&&E<D&&0<=t&&t<u&&p<I&&(!c||(C=!C)))if(H=k>>10,H<n[t]){var K=this.shader.nextRandom8Bit();this.g3d.addPixel(t,H,85>K?z:170<K?y:a)}p=(p+1)%A}}else{F=
h-1;0>r&&(F=-F);r=q(((r<<10)+F)/h);l=0;F=Math.abs(E-this.y2t)-1;D=Math.abs(E-this.y1t)-1;E=h-1;for(G=q(E/2);--E>=F;){if(E==G){a=B;if(0==a)break;y=v;z=d;if((c=e)&&!b)C=q(t/s),H=t%s,C=0==((H^C)&1)}t+=w;k+=r;l+=j;l>h&&(t+=x,l-=f,C=!C);if(0!=a&&E<D&&0<=t&&t<u&&p<I&&(!c||(C=!C)))H=k>>10,H<n[t]&&(K=this.g3d.shader.nextRandom8Bit(),this.g3d.addPixel(t,H,85>K?z:170<K?y:a));p=(p+1)%A}}}},"~A,~B,~A,~B,~N,~N,~N,~N,~N,~N,~N,~B,~N,~N");c(c$,"plotLineClippedBits",function(a,b,d,e,c,f,j,k,l,h,r,x,A){var I=this.g3d.zbuf,
n=this.g3d.width,s=0;0==x&&(A=2147483647,x=1);var t=63>c?c+1:c,p=0<c?c-1:c,u=a[c],v=a[t],w=a[p];c=d[c];t=d[t];d=d[p];var p=b,y=0!=((f^j)&1);a=j*n+f;var B=this.g3d.bufferSize,C,D,E,F,G;this.lineTypeX?(C=f,D=this.x1t,E=this.x2t,f+=q(l/2),F=j=0<=l?1:-1,G=0<=h?n:-n,l=r/Math.abs(l)):(C=j,D=this.y1t,E=this.y2t,f=j+q(h/2),j=0<=h?1:-1,F=0<=h?n:-n,G=0<=l?1:-1,l=r/Math.abs(h));h=!1;for(r=C;;r+=j,C+=j){r==D&&(h=!0);if(r==f){u=c;if(0==u)break;v=t;w=d;if((p=e)&&!b)y=q(a/n),y=0==((a%n^y)&1)}if(0!=u&&(h&&0<=a&&
a<B&&s<A&&(!p||(y=!y)))&&k<I[a]){var H=this.shader.nextRandom8Bit();this.g3d.addPixel(a,z(k),85>H?w:170<H?v:u)}if(r==E)break;s=(s+1)%x;for(a+=F;0>C;)C+=this.nBits;this.lineBits.get(C%this.nBits)&&(a+=G);k+=l}},"~A,~B,~A,~B,~N,~N,~N,~N,~N,~N,~N,~N,~N");C(c$,"VISIBILITY_UNCLIPPED",0,"VISIBILITY_CLIPPED",1,"VISIBILITY_OFFSCREEN",2)});n("J.g3d");w(null,"J.g3d.Pixelator",["J.g3d.Graphics3D"],function(){c$=t(function(){this.g=null;s(this,arguments)},J.g3d,"Pixelator");u(c$,function(a){this.g=a},"J.g3d.Graphics3D");
c(c$,"clearPixel",function(a,b){!this.g.$isPass2&&this.g.zbuf[a]>b&&(this.g.zbuf[a]=2147483647)},"~N,~N");c(c$,"addPixel",function(a,b,d){this.addPixel1(a,b,d)},"~N,~N,~N");c(c$,"addPixel1",function(a,b,d){if(this.g.$isPass2){var c=this.g.zbufT[a];if(b<c){var g=this.g.pbufT[a];!this.g.translucentCoverOnly&&(0!=g&&c-b>this.g.zMargin)&&J.g3d.Graphics3D.mergeBufferPixel(this.g.pbuf,a,g,this.g.bgcolor);this.g.zbufT[a]=b;this.g.pbufT[a]=d&this.g.translucencyMask}else b!=c&&!this.g.translucentCoverOnly&&
b-c>this.g.zMargin&&J.g3d.Graphics3D.mergeBufferPixel(this.g.pbuf,a,d&this.g.translucencyMask,this.g.bgcolor)}else this.g.zbuf[a]=b,this.g.pbuf[a]=d},"~N,~N,~N")});n("J.g3d");w(["J.g3d.Pixelator"],"J.g3d.PixelatorShaded",null,function(){c$=B(J.g3d,"PixelatorShaded",J.g3d.Pixelator);h(c$,"addPixel",function(a,b,d){if(!(b>this.g.zDepth)){if(b<=this.g.zDepth&&b>=this.g.zSlab){var c=(d&65280)>>8,g=(d&16711680)>>16,f=d&4278190080,j=(this.g.zDepth-b)/(this.g.zDepth-this.g.zSlab);if(1<this.g.zShadePower)for(var k=
0;k<this.g.zShadePower;k++)j*=j;d=this.g.zShadeR+z(j*((d&255)-this.g.zShadeR));c=this.g.zShadeG+z(j*(c-this.g.zShadeG));g=this.g.zShadeB+z(j*(g-this.g.zShadeB));d=g<<16|c<<8|d|f}this.addPixel1(a,b,d)}},"~N,~N,~N")});n("J.g3d");c$=t(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;s(this,arguments)},J.g3d,"Platform3D");u(c$,function(a){this.apiPlatform=a},"javajs.api.GenericPlatform");c(c$,"getGraphicsForMetrics",function(){return this.apiPlatform.getGraphics(this.allocateOffscreenImage(1,1))});c(c$,"allocateTBuffers",function(a){this.bufferSizeT=a?this.bufferSize:this.windowSize;this.zBufferT=D(this.bufferSizeT,0);this.pBufferT=D(this.bufferSizeT,0)},"~B");c(c$,"allocateBuffers",function(a,b,d,c){this.windowWidth=a;this.windowHeight=
b;this.windowSize=a*b;d&&(a*=2,b*=2);this.bufferWidth=a;this.bufferHeight=b;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,c)},"~N,~N,~B,~B");c(c$,"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(c$,"hasContent",function(){for(var a=this.bufferSize;0<=--a;)if(2147483647!=this.zBuffer[a])return!0;return!1});c(c$,"clearScreenBuffer",function(){for(var a=this.bufferSize;0<=--a;)this.zBuffer[a]=2147483647,this.pBuffer[a]=0});c(c$,"setBackgroundColor",function(a){if(null!=this.pBuffer)for(var b=this.bufferSize;0<=--b;)0==this.pBuffer[b]&&(this.pBuffer[b]=a)},
"~N");c(c$,"clearTBuffer",function(){for(var a=this.bufferSizeT;0<=--a;)this.zBufferT[a]=2147483647,this.pBufferT[a]=0});c(c$,"clearBuffer",function(){this.clearScreenBuffer()});c(c$,"clearScreenBufferThreaded",function(){});c(c$,"notifyEndOfRendering",function(){this.apiPlatform.notifyEndOfRendering()});c(c$,"getGraphicsForTextOrImage",function(a,b){if(a>this.widthOffscreen||b>this.heightOffscreen)null!=this.offscreenImage&&(this.apiPlatform.disposeGraphics(this.graphicsForTextOrImage),this.apiPlatform.flushImage(this.offscreenImage)),
a>this.widthOffscreen&&(this.widthOffscreen=a),b>this.heightOffscreen&&(this.heightOffscreen=b),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(c$,"allocateOffscreenImage",function(a,b){return this.apiPlatform.newOffScreenImage(a,b)},"~N,~N");c(c$,"setBackgroundTransparent",function(a){J.g3d.Platform3D.backgroundTransparent=
a},"~B");C(c$,"backgroundTransparent",!1);n("J.g3d");w(["JU.P3"],"J.g3d.SphereRenderer",["JU.GData"],function(){c$=t(function(){this.shader=this.g3d=null;this.diameter=this.z=this.y=this.x=this.maxZ=this.minZ=this.maxY=this.minY=this.maxX=this.minX=0;this.tScreened=!1;this.mDeriv=this.coef=this.mat=this.zroot=this.shades=null;this.selectedOctant=0;this.octantPoints=null;this.planeShade=0;this.zbuf=null;this.offsetPbufBeginLine=this.slab=this.depth=this.height=this.width=0;this.addAllPixels=!1;this.dxyz=
this.planeShades=this.ptTemp=null;this.z0=0;s(this,arguments)},J.g3d,"SphereRenderer");K(c$,function(){this.zroot=X(2,0);this.ptTemp=new JU.P3;this.planeShades=D(3,0);this.dxyz=L(3,3,0)});u(c$,function(a){this.g3d=a;this.shader=a.shader},"J.g3d.Graphics3D");c(c$,"render",function(a,b,d,c,g,f,j,k,l,h,r,x){if(1!=f&&(this.width=this.g3d.width,this.height=this.g3d.height,49<d&&(d&=-2),!this.g3d.isClippedXY(d,c,g))){var A=d+1>>1;this.minX=c-A;this.maxX=c+A;this.minY=g-A;this.maxY=g+A;this.slab=this.g3d.slab;
this.depth=this.g3d.depth;this.minZ=f-A;this.maxZ=f+A;this.maxZ<this.slab||this.minZ>this.depth||(this.shader.nOut=this.shader.nIn=0,this.zbuf=this.g3d.zbuf,this.addAllPixels=x,this.offsetPbufBeginLine=this.width*g+c,this.x=c,this.y=g,this.z=f,this.diameter=d,this.tScreened=b,this.shades=a,this.mat=j,null!=j&&(this.coef=k,this.mDeriv=l,this.selectedOctant=h,this.octantPoints=r),null!=j||128<d?(this.renderLarge(),null!=j&&(this.octantPoints=this.mDeriv=this.coef=this.mat=null)):(a=this.shader.sphereShapeCache[d-
1],null==a&&(a=this.createSphereShape(d)),0>this.minX||this.maxX>=this.width||0>this.minY||this.maxY>=this.height||this.minZ<this.slab||f>this.depth?this.renderShapeClipped(a,c,g,f,d):this.renderShapeUnclipped(a,c,g,f,d)),this.zbuf=this.shades=null)}},"~A,~B,~N,~N,~N,~N,JU.M3,~A,JU.M4,~N,~A,~B");c(c$,"createSphereShape",function(a){for(var b=this.shader,d=0,c=0!=(a&1),g=a/2,f=g*g,j=q((a+1)/2),k=c?0:0.5,l=0;l<j;++l,++k)for(var h=k*k,r=c?0:0.5,x=0;x<j;++x,++r){var A=r*r,A=f-h-A;0<=A&&++d}for(var d=
D(d,0),I=0,k=c?0:0.5,l=0;l<j;++l,++k){h=k*k;r=c?0:0.5;for(x=0;x<j;++x,++r)if(A=r*r,A=f-h-A,0<=A){var n=Math.sqrt(A),A=z(n),s=b.getShadeN(r,k,n,g),t=b.getShadeN(-r,k,n,g),p=b.getShadeN(r,-k,n,g),n=b.getShadeN(-r,-k,n,g),A=A|s<<7|t<<13|p<<19|n<<25;d[I++]=A}d[I-1]|=2147483648}return b.sphereShapeCache[a-1]=d},"~N");c(c$,"renderShapeUnclipped",function(a,b,d,c,g){var f=0,j=1-(g&1),k=this.offsetPbufBeginLine,h=k-j*this.width;g=q((g+1)/2);var m=this.shades,r=this.g3d,x=this.zbuf,A=this.width;if(this.tScreened){b=
(b^d)&1;d=b^j;b=b|(b^j)<<1|d<<2|(d^j)<<3;do{I=k;n=k-j;s=h;t=h-j;d=b=~b;do p=a[f++],u=c-(p&127),0!=(d&1)&&u<x[I]&&r.addPixel(I,u,m[p>>7&63]),0!=(d&2)&&u<x[n]&&r.addPixel(n,u,m[p>>13&63]),0!=(d&4)&&u<x[s]&&r.addPixel(s,u,m[p>>19&63]),0!=(d&8)&&u<x[t]&&r.addPixel(t,u,m[p>>25&63]),++I,--n,++s,--t,d=~d;while(0<=p);k+=A;h-=A}while(0<--g)}else{do{var I=k,n=k-j,s=h,t=h-j,p;do{p=a[f++];var u=c-(p&127);u<x[I]&&r.addPixel(I,u,m[p>>7&63]);u<x[n]&&r.addPixel(n,u,m[p>>13&63]);u<x[s]&&r.addPixel(s,u,m[p>>19&63]);
u<x[t]&&r.addPixel(t,u,m[p>>25&63]);++I;--n;++s;--t}while(0<=p);k+=A;h-=A}while(0<--g)}},"~A,~N,~N,~N,~N");c(c$,"renderShapeClipped",function(a,b,d,c,g){var f=0,j=1-(g&1),k=this.offsetPbufBeginLine,h=k-j*this.width;g=q((g+1)/2);var m=d,r=d-j,x=(b<<16)+(d<<1)^858993459;d=(b^d)&1;var A=d^j;d=d|(d^j)<<1|A<<2|(A^j)<<3;var A=this.shades,I=this.g3d,n=this.zbuf;do{var s=0<=m&&m<this.height,t=0<=r&&r<this.height,p=k,u=k-j,v=h,w=h-j,y,z=d=~d,B=b,C=b-j;do{var D=0<=C&&C<this.width,E=0<=B&&B<this.width;y=a[f++];
var F;F=y&127;var G;c<this.slab?(G=c+F,F=G>=this.slab):(G=c-F,F=G<this.slab);F&&(G=this.slab);if(G>=this.slab&&G<=this.depth){if(s){if(E&&(this.addAllPixels||0!=(z&1))&&G<n[p]){var H=F?44+(x>>7&7):y>>7&63;I.addPixel(p,G,A[H])}if(D&&(this.addAllPixels||0!=(z&2))&&G<n[u])H=F?44+(x>>13&7):y>>13&63,I.addPixel(u,G,A[H])}if(t){if(E&&(!this.tScreened||0!=(z&4))&&G<n[v])H=F?44+(x>>19&7):y>>19&63,I.addPixel(v,G,A[H]);if(D&&(!this.tScreened||0!=(z&8))&&G<n[w])H=F?44+(x>>25&7):y>>25&63,I.addPixel(w,G,A[H])}}++p;
--u;++v;--w;++B;--C;z=~z;F&&(x=(x<<16)+(x<<1)+x&2147483647)}while(0<=y);k+=this.width;h-=this.width;++m;--r}while(0<--g)},"~A,~N,~N,~N,~N");c(c$,"renderLarge",function(){null!=this.mat&&(null==this.shader.ellipsoidShades&&this.shader.createEllipsoidShades(),null!=this.octantPoints&&this.setPlaneDerivatives());this.renderQuadrant(-1,-1);this.renderQuadrant(-1,1);this.renderQuadrant(1,-1);this.renderQuadrant(1,1)});c(c$,"renderQuadrant",function(a,b){var d=q(this.diameter/2),c=this.x+d*a,g=(0>this.x?
-1:this.x<this.width?0:1)+(0>c?-2:c<this.width?0:2);-3==g||3==g||(c=this.y+d*b,c=(0>this.y?-1:this.y<this.height?0:1)+(0>c?-2:c<this.height?0:2),-3==c||3==c||(null==this.mat&&0==g&&0==c&&this.z-d>=this.slab&&this.z<=this.depth?this.renderQuadrantUnclipped(d,a,b):this.renderQuadrantClipped(d,a,b)))},"~N,~N");c(c$,"renderQuadrantUnclipped",function(a,b,d){for(var c=a*a,g=2*a+1,f=0==((this.x^this.y)&1),j=0>d?-this.width:this.width,k=this.offsetPbufBeginLine,h=0,m=0;m<=c;m+=h+ ++h,k+=j)for(var r=k,x=
f=!f,A=c-m,I=this.z-a,n=q((h*d+a<<8)/g),p=0,s=0;s<=A;s+=p+ ++p,r+=b)if((this.addAllPixels||(x=!x))&&!(this.zbuf[r]<=I))if(I=q(Math.sqrt(A-s)),I=this.z-I,!(this.zbuf[r]<=I)){var t=q((p*b+a<<8)/g);this.g3d.addPixel(r,I,this.shades[this.shader.sphereShadeIndexes[(n<<8)+t]])}},"~N,~N,~N");c(c$,"renderQuadrantClipped",function(a,b,d){for(var c=null!=this.mat,g=0<=this.selectedOctant,f=a*a,j=2*a+1,k=0>d?-this.width:this.width,h=this.offsetPbufBeginLine,m=(this.x<<16)+(this.y<<1)^858993459,r=this.y,x=0,
A=0,I=0,n=0;n<=f;n+=I+ ++I,h+=k,r+=d)if(0>r){if(0>d)break}else if(r>=this.height){if(0<d)break}else{var s=f-(c?0:n),p=this.x;c||(x=q((I*d+a<<8)/j));for(var m=(m<<16)+(m<<1)+m&2147483647,t=-1,u=1,v=h,w=0,y=0;y<=s;y+=w+ ++w,v+=b,p+=b)if(0>p){if(0>b)break}else if(p>=this.width){if(0<b)break}else if(!(this.tScreened&&0!=((p^r)&1))){var z;if(c){if(!J.g3d.SphereRenderer.getQuardricZ(p,r,this.coef,this.zroot)){if(0<=t)break;continue}t=this.z<this.slab?1:0;z=q(this.zroot[t]);0==z&&(z=this.z);u=2;this.z0=
z;if(g){this.ptTemp.set(p-this.x,r-this.y,z-this.z);this.mat.rotate(this.ptTemp);JU.GData.getScreenOctant(this.ptTemp)==this.selectedOctant&&(A=this.getPlaneShade(p,r,this.zroot),z=q(this.zroot[0]),u=3);var B=this.z<this.slab?z>=this.slab:z<this.slab;B&&(this.z0=z=this.slab,u=0)}if(z<this.slab||z>this.depth||this.zbuf[v]<=this.z0)continue}else{z=q(Math.sqrt(s-y));z=this.z+(this.z<this.slab?z:-z);if(B=this.z<this.slab?z>=this.slab:z<this.slab)z=this.slab,u=0;if(z<this.slab||z>this.depth||this.zbuf[v]<=
z)continue}switch(u){case 0:A=44+(m>>8&7);m=(m<<16)+(m<<1)+m&2147483647;u=1;break;case 2:A=this.shader.getEllipsoidShade(p,r,this.zroot[t],a,this.mDeriv);break;case 3:this.g3d.clearPixel(v,this.z0);break;default:A=q((w*b+a<<8)/j),A=this.shader.sphereShadeIndexes[(x<<8)+A]}this.g3d.addPixel(v,z,this.shades[A])}m=(m+p+r|1)&2147483647}},"~N,~N,~N");c$.getQuardricZ=c(c$,"getQuardricZ",function(a,b,d,c){var g=(d[4]*a+d[5]*b+d[8])/d[2]/2;a=g*g-(d[0]*a*a+d[1]*b*b+d[3]*a*b+d[6]*a+d[7]*b-1)/d[2];if(0>a)return!1;
a=Math.sqrt(a);c[0]=-g-a;c[1]=-g+a;return!0},"~N,~N,~A,~A");c(c$,"setPlaneDerivatives",function(){this.planeShade=-1;for(var a=0;3>a;a++){var b=this.dxyz[a][0]=this.octantPoints[a].x-this.x,d=this.dxyz[a][1]=this.octantPoints[a].y-this.y,c=this.dxyz[a][2]=this.octantPoints[a].z-this.z;this.planeShades[a]=this.shader.getShadeIndex(b,d,-c);if(0==b&&0==d){this.planeShade=this.planeShades[a];break}}});c(c$,"getPlaneShade",function(a,b,d){if(0<=this.planeShade)return this.planeShade;for(var c=3,g,f=3.4028235E38,
j=0;3>j;j++)if(0!=(g=this.dxyz[j][2]))g=this.z+(-this.dxyz[j][0]*(a-this.x)-this.dxyz[j][1]*(b-this.y))/g,g<f&&(f=g,c=j);3==c&&(c=0,f=this.z);d[0]=f;return this.planeShades[c]},"~N,~N,~A");C(c$,"maxOddSizeSphere",49,"maxSphereDiameter",1E3,"maxSphereDiameter2",2E3,"SHADE_SLAB_CLIPPED",47)});n("J.g3d");w(["java.util.Hashtable"],"J.g3d.TextRenderer",["JU.CU"],function(){c$=t(function(){this.size=this.mapWidth=this.width=this.ascent=this.height=0;this.tmap=null;this.isInvalid=!1;s(this,arguments)},J.g3d,
"TextRenderer");c$.clearFontCache=c(c$,"clearFontCache",function(){J.g3d.TextRenderer.working||(J.g3d.TextRenderer.htFont3d.clear(),J.g3d.TextRenderer.htFont3dAntialias.clear())});c$.plot=c(c$,"plot",function(a,b,d,c,g,f,j,k,h,m){if(0==f.length)return 0;if(0<=f.indexOf("<su")||0<=f.indexOf("<color"))return J.g3d.TextRenderer.plotByCharacter(a,b,d,c,g,f,j,k,h,m);var r=j.getAscent();b-=r;f=J.g3d.TextRenderer.getPlotText3D(a,b,k,f,j,m);if(f.isInvalid)return f.width;m&&0==(c&12632256)&&(c|=263172);null!=
h||0>a||a+f.width>k.width||0>b||b+f.height>k.height?J.g3d.TextRenderer.plotClipped(a,b,d,c,g,k,h,f.mapWidth,f.height,f.tmap):J.g3d.TextRenderer.plotUnclipped(a,b,d,c,g,k,f.mapWidth,f.height,f.tmap);return f.width},"~N,~N,~N,~N,~N,~S,javajs.awt.Font,J.g3d.Graphics3D,J.api.JmolRendererInterface,~B");c$.plotByCharacter=c(c$,"plotByCharacter",function(a,b,d,c,g,f,j,k,h,m){for(var r=0,x=f.length,A=Math.round(0.25*j.getHeight()),I=-Math.round(0.3*j.getHeight()),n=0,q=0;q<x;q++){if("<"==f.charAt(q)){if(q+
5<x&&f.substring(q,q+6).equals("<color")){var n=c,p=f.indexOf(">",q);if(0>p)continue;c=JU.CU.getArgbFromString(f.substring(q+7,p).trim());q=p;continue}if(q+7<x&&f.substring(q,q+8).equals("</color>")){q+=7;c=n;continue}if(q+4<x&&f.substring(q,q+5).equals("<sub>")){q+=4;b+=A;continue}if(q+4<x&&f.substring(q,q+5).equals("<sup>")){q+=4;b+=I;continue}if(q+5<x&&f.substring(q,q+6).equals("</sub>")){q+=5;b-=A;continue}if(q+5<x&&f.substring(q,q+6).equals("</sup>")){q+=5;b-=I;continue}}p=J.g3d.TextRenderer.plot(a+
r,b,d,c,g,f.substring(q,q+1),j,k,h,m);r+=p}return r},"~N,~N,~N,~N,~N,~S,javajs.awt.Font,J.g3d.Graphics3D,J.api.JmolRendererInterface,~B");c$.plotUnclipped=c(c$,"plotUnclipped",function(a,b,d,c,g,f,j,k,h){var m=0,r=f.zbuf,x=f.width;a=b*x+a;for(b=0;b<k;b++){for(var A=0;A<j;A++){var I=h[m++];0!=I&&d<r[a]&&f.shadeTextPixel(a,d,c,g,I);a++}a+=x-j}},"~N,~N,~N,~N,~N,J.g3d.Graphics3D,~N,~N,~A");c$.plotClipped=c(c$,"plotClipped",function(a,b,d,c,g,f,j,k,h,m){null==j&&(j=f);for(var r=f=0;r<h;r++)for(var x=0;x<
k;x++){var A=m[f++];0!=A&&j.plotImagePixel(c,a+x,b+r,d,A,g)}},"~N,~N,~N,~N,~N,J.g3d.Graphics3D,J.api.JmolRendererInterface,~N,~N,~A");u(c$,function(a,b){this.ascent=b.getAscent();this.height=b.getHeight();this.width=b.stringWidth(a);0!=this.width&&(this.mapWidth=this.width,this.size=this.mapWidth*this.height)},"~S,javajs.awt.Font");c$.getPlotText3D=c(c$,"getPlotText3D",function(a,b,d,c,g,f){J.g3d.TextRenderer.working=!0;f=f?J.g3d.TextRenderer.htFont3dAntialias:J.g3d.TextRenderer.htFont3d;var j=f.get(g),
k=null,h=!1,m=!1;null!=j?k=j.get(c):(j=new java.util.Hashtable,h=!0);null==k&&(k=new J.g3d.TextRenderer(c,g),m=!0);k.isInvalid=0==k.width||0>=a+k.width||a>=d.width||0>=b+k.height||b>=d.height;if(k.isInvalid)return k;h&&f.put(g,j);m&&(k.setTranslucency(c,g,d),j.put(c,k));J.g3d.TextRenderer.working=!1;return k},"~N,~N,J.g3d.Graphics3D,~S,javajs.awt.Font,~B");c(c$,"setTranslucency",function(a,b,d){a=d.apiPlatform.getTextPixels(a,b,d.platform.getGraphicsForTextOrImage(this.mapWidth,this.height),d.platform.offscreenImage,
this.mapWidth,this.height,this.ascent);if(null!=a){this.tmap=O(this.size,0);for(b=a.length;0<=--b;)d=a[b]&255,0!=d&&(this.tmap[b]=J.g3d.TextRenderer.translucency[d>>5])}},"~S,javajs.awt.Font,J.g3d.Graphics3D");C(c$,"translucency",[7,6,5,4,3,2,1,8],"working",!1);c$.htFont3d=c$.prototype.htFont3d=new java.util.Hashtable;c$.htFont3dAntialias=c$.prototype.htFont3dAntialias=new java.util.Hashtable});n("J.g3d");c$=B(J.g3d,"TextSorter",null,java.util.Comparator);h(c$,"compare",function(a,b){return null==
a||null==b?0:a.z>b.z?-1:a.z<b.z?1:0},"J.g3d.TextString,J.g3d.TextString");n("J.g3d");w(["JU.P3i"],"J.g3d.TextString",null,function(){c$=t(function(){this.font=this.text=null;this.bgargb=this.argb=0;s(this,arguments)},J.g3d,"TextString",JU.P3i);c(c$,"setText",function(a,b,d,c,g,f,j){this.text=a;this.font=b;this.argb=d;this.bgargb=c;this.x=g;this.y=f;this.z=j},"~S,javajs.awt.Font,~N,~N,~N,~N,~N");c(c$,"toString",function(){return R(this,J.g3d.TextString,"toString",[])+" "+this.text})});n("J.g3d");w(["J.g3d.G3DRenderer",
"JU.Rgb16"],"J.g3d.TriangleRenderer",["JU.GData"],function(){c$=t(function(){this.rgb16t2=this.rgb16t1=this.rgb16sGouraud=this.rgb16sE=this.rgb16sW=this.azE=this.axE=this.azW=this.axW=this.az=this.ay=this.ax=this.g3d=null;s(this,arguments)},J.g3d,"TriangleRenderer",null,J.g3d.G3DRenderer);K(c$,function(){this.ax=D(3,0);this.ay=D(3,0);this.az=D(3,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(c$,function(){});h(c$,"set",
function(a){try{this.rgb16sW=Array(64);this.rgb16sE=Array(64);for(var b=64;0<=--b;)this.rgb16sW[b]=new JU.Rgb16,this.rgb16sE[b]=new JU.Rgb16;this.g3d=a;this.rgb16sGouraud=Array(3);for(b=3;0<=--b;)this.rgb16sGouraud[b]=new JU.Rgb16}catch(d){if(!y(d,Exception))throw d;}return this},"J.api.JmolRendererInterface");c(c$,"reallocRgb16s",function(a,b){var d=Array(b);System.arraycopy(a,0,d,0,a.length);for(var c=a.length;c<b;++c)d[c]=new JU.Rgb16;return d},"~A,~N");c(c$,"setGouraud",function(a,b,d){this.rgb16sGouraud[0].setInt(a);
this.rgb16sGouraud[1].setInt(b);this.rgb16sGouraud[2].setInt(d)},"~N,~N,~N");c(c$,"drawfillTriangle",function(a,b,d,c,g,f,j,k,h,m){this.ax[0]=a;this.ax[1]=c;this.ax[2]=j;this.ay[0]=b;this.ay[1]=g;this.ay[2]=k;this.az[0]=d;this.az[1]=f;this.az[2]=h;this.fillTriangleB(m)},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~B");c(c$,"fillTriangleXYZ",function(a,b,d,c,g,f,j,k,h,m){this.ax[0]=a;this.ax[1]=c;this.ax[2]=j;this.ay[0]=b;this.ay[1]=g;this.ay[2]=k;this.az[0]=d;this.az[1]=f;this.az[2]=h;this.fillTriangleB(m)},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~B");
c(c$,"fillTriangleP3i",function(a,b,d,c){this.ax[0]=a.x;this.ax[1]=b.x;this.ax[2]=d.x;this.ay[0]=a.y;this.ay[1]=b.y;this.ay[2]=d.y;this.az[0]=a.z;this.az[1]=b.z;this.az[2]=d.z;this.fillTriangleB(c)},"JU.P3i,JU.P3i,JU.P3i,~B");c(c$,"fillTriangleP3f",function(a,b,d,c){this.ax[0]=Math.round(a.x);this.ax[1]=Math.round(b.x);this.ax[2]=Math.round(d.x);this.ay[0]=Math.round(a.y);this.ay[1]=Math.round(b.y);this.ay[2]=Math.round(d.y);this.az[0]=Math.round(a.z);this.az[1]=Math.round(b.z);this.az[2]=Math.round(d.z);
this.fillTriangleB(c)},"JU.P3,JU.P3,JU.P3,~B");c(c$,"fillTriangleP3if",function(a,b,d,c,g){this.ax[0]=a.x;this.ax[1]=b.x;this.ax[2]=d.x;this.ay[0]=a.y;this.ay[1]=b.y;this.ay[2]=d.y;this.az[0]=a.z;this.az[1]=b.z;this.az[2]=d.z;J.g3d.TriangleRenderer.adjustVertex(this.ax,c);J.g3d.TriangleRenderer.adjustVertex(this.ay,c);J.g3d.TriangleRenderer.adjustVertex(this.az,c);this.fillTriangleB(g)},"JU.P3i,JU.P3i,JU.P3i,~N,~B");c$.adjustVertex=c(c$,"adjustVertex",function(a,b){for(var d=(a[0]+a[1]+a[2])/3,c=
0;3>c;c++)a[c]+=b*(d-a[c])},"~A,~N");c(c$,"fillTriangleB",function(a){if(!(1>=this.az[0]||1>=this.az[1]||1>=this.az[2])){var b=this.g3d.clipCode3(this.ax[0],this.ay[0],this.az[0]),d=this.g3d.clipCode3(this.ax[1],this.ay[1],this.az[1]),c=this.g3d.clipCode3(this.ax[2],this.ay[2],this.az[2]),g=0!=(b|d|c);if(!(g&&0!=(b&d&c))){b=0;this.ay[1]<this.ay[b]&&(b=1);this.ay[2]<this.ay[b]&&(b=2);d=(b+1)%3;c=(b+2)%3;if(this.ay[d]>this.ay[c])var f=d,d=c,c=f;var j=this.ay[b],k=this.ay[d],h=this.ay[c],m=h-j+1;if(!(m>
3*this.g3d.height)){m>this.axW.length&&this.reallocRasterArrays(m);var r,x;a?(r=this.rgb16sW,x=this.rgb16sE):r=x=null;f=k-j;0==f?(this.ax[d]<this.ax[b]&&(f=d,d=b,b=f),this.generateRaster(m,b,c,this.axW,this.azW,0,r),this.generateRaster(m,d,c,this.axE,this.azE,0,x)):k==h?(this.ax[c]<this.ax[d]&&(f=d,d=c,c=f),this.generateRaster(m,b,d,this.axW,this.azW,0,r),this.generateRaster(m,b,c,this.axE,this.azE,0,x)):(k=this.ax[c]-this.ax[b],h=JU.GData.roundInt(q(m/2)),0>k&&(h=-h),this.ax[b]+q((k*f+h)/m)<this.ax[d]?
(this.generateRaster(m,b,c,this.axW,this.azW,0,r),this.generateRaster(f+1,b,d,this.axE,this.azE,0,x),this.generateRaster(m-f,d,c,this.axE,this.azE,f,x)):(this.generateRaster(f+1,b,d,this.axW,this.azW,0,r),this.generateRaster(m-f,d,c,this.axW,this.azW,f,r),this.generateRaster(m,b,c,this.axE,this.azE,0,x)));this.g3d.setZMargin(5);a?this.fillRasterG(j,m,g,this.g3d.$isPass2?1:0):this.fillRaster(j,m,g,this.g3d.$isPass2?1:0);this.g3d.setZMargin(0)}}}},"~B");c(c$,"reallocRasterArrays",function(a){a=a+31&
-32;this.axW=D(a,0);this.azW=D(a,0);this.axE=D(a,0);this.azE=D(a,0);this.rgb16sW=this.reallocRgb16s(this.rgb16sW,a);this.rgb16sE=this.reallocRgb16s(this.rgb16sE,a)},"~N");c(c$,"generateRaster",function(a,b,d,c,g,f,j){var k=this.ax[b],h=this.az[b],m=this.ax[d]-k,r=this.az[d]-h,x,A,I;0<=m?(x=1,A=m,I=0):(x=-1,A=-m,I=1-a);var h=(h<<10)+512,n=JU.GData.roundInt(q(a/2));0>r&&(n=-n);r=q(((r<<10)+n)/a);A<=a?n=0:(n=JU.GData.roundInt(q(m/a)),A%=a);for(var p=0,m=f;p<a;h+=r,++m,++p)c[m]=k,g[m]=h>>10,k+=n,I+=A,
0<I&&(k+=x,I-=a);if(null!=j){c=this.rgb16t1;c.setRgb(this.rgb16sGouraud[b]);b=this.rgb16t2;b.diffDiv(this.rgb16sGouraud[d],c,a);m=f;for(a=f+a;m<a;++m)j[m].setAndIncrement(c,b)}},"~N,~N,~N,~A,~A,~N,~A");c(c$,"fillRaster",function(a,b,d,c){var g=0;0>a&&(b+=a,g-=a,a=0);a+b>this.g3d.height&&(b=this.g3d.height-a);if(d)for(;--b>=c;++a,++g){d=this.axW[g];var f=this.axE[g]-d+1-c;0<f&&this.g3d.plotPixelsClippedRaster(f,d,a,this.azW[g],this.azE[g],null,null)}else for(;--b>=c;++a,++g)f=this.axE[g]-(d=this.axW[g])+
1-c,1==c&&0>f&&(f=1,d--),0<f&&this.g3d.plotPixelsUnclippedRaster(f,d,a,this.azW[g],this.azE[g],null,null)},"~N,~N,~B,~N");c(c$,"fillRasterG",function(a,b,d,c){var g=0;0>a&&(b+=a,g-=a,a=0);a+b>this.g3d.height&&(b=this.g3d.height-a);if(d)for(;--b>=c;++a,++g){d=this.axW[g];var f=this.axE[g]-d+1-c;0<f&&this.g3d.plotPixelsClippedRaster(f,d,a,this.azW[g],this.azE[g],this.rgb16sW[g],this.rgb16sE[g])}else for(;--b>=c;++a,++g)f=this.axE[g]-(d=this.axW[g])+1-c,1==c&&0>f&&(f=1,d--),0<f&&this.g3d.plotPixelsUnclippedRaster(f,
d,a,this.azW[g],this.azE[g],this.rgb16sW[g],this.rgb16sE[g])},"~N,~N,~B,~N");C(c$,"DEFAULT",64)});n("J.i18n");w(["J.api.Translator","java.util.Hashtable","J.i18n.Language","$.Resource"],"J.i18n.GT",["java.text.MessageFormat","JU.Logger"],function(){c$=t(function(){this.resources=null;this.resourceCount=0;this.doTranslate=!0;this.language=null;s(this,arguments)},J.i18n,"GT",null,J.api.Translator);u(c$,function(){});h(c$,"translate",function(a){return J.i18n.GT._(a)},"~S");u(c$,function(a,b){J.i18n.GT.vwr=
a;this.resources=null;this.resourceCount=0;J.i18n.GT.$getTextWrapper=this;null!=b&&0==b.length&&(b="none");null!=b&&(this.language=b);"none".equals(this.language)&&(this.language=null);null==this.language&&(this.language=J.i18n.Resource.getLanguage());null==this.language&&(this.language="en");var d=this.language,c=null,g=null,f=this.language.indexOf("_");if(0<=f&&(d=d.substring(0,f),c=this.language,0<=(f=c.indexOf("_",++f))))c=c.substring(0,f),g=this.language;if(null==(this.language=this.getSupported(g))&&
null==(this.language=this.getSupported(c))&&null==(this.language=this.getSupported(d)))this.language="en",System.out.println(this.language+" not supported -- using en");else{c=g=null;switch(this.language.length){default:g=this.language;c=this.language.substring(0,5);d=this.language.substring(0,2);break;case 5:c=this.language;d=this.language.substring(0,2);break;case 2:d=this.language}c=this.getSupported(c);d=this.getSupported(d);if(d===c||"en_US".equals(d))d=null;c===g&&(c=null);"en_US".equals(c)||
(J.i18n.GT.allowDebug&&JU.Logger.debugging&&JU.Logger.debug("Instantiating gettext wrapper for "+this.language+" using files for language:"+d+" country:"+c+" variant:"+g),J.i18n.GT.$ignoreApplicationBundle||this.addBundles("Jmol",g,c,d),this.addBundles("JmolApplet",g,c,d))}},"J.api.JmolViewer,~S");c$.getLanguageList=c(c$,"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");c$.getLanguage=
c(c$,"getLanguage",function(){return J.i18n.GT.getTextWrapper().language});c$.ignoreApplicationBundle=c(c$,"ignoreApplicationBundle",function(){J.i18n.GT.$ignoreApplicationBundle=!0});c$.setDoTranslate=c(c$,"setDoTranslate",function(a){var b=J.i18n.GT.getDoTranslate();J.i18n.GT.getTextWrapper().doTranslate=a;return b},"~B");c$.getDoTranslate=c(c$,"getDoTranslate",function(){return J.i18n.GT.getTextWrapper().doTranslate});c$._=c(c$,"_",function(a){return J.i18n.GT.getTextWrapper().getString(a)},"~S");
c$.o=c(c$,"o",function(a,b){p(b,Array)||(b=[b]);return java.text.MessageFormat.format(a,b)},"~S,~O");c$.i=c(c$,"i",function(a,b){return J.i18n.GT.o(a,""+b)},"~S,~N");c$.escapeHTML=c(c$,"escapeHTML",function(a){for(var b,d=a.length;0<=--d;)if(127<(b=a.charAt(d)).charCodeAt(0))a=a.substring(0,d)+"&#"+b.charCodeAt(0)+";"+a.substring(d+1);return a},"~S");c$.getTextWrapper=c(c$,"getTextWrapper",function(){return null==J.i18n.GT.$getTextWrapper?J.i18n.GT.$getTextWrapper=new J.i18n.GT(null,null):J.i18n.GT.$getTextWrapper});
c(c$,"createLanguageList",function(){var a=this.doTranslate;this.doTranslate=!1;J.i18n.GT.languageList=J.i18n.Language.getLanguageList();this.doTranslate=a});c(c$,"getSupported",function(a){if(null==a)return null;var b=J.i18n.GT.htLanguages.get(a);if(null!=b)return 0==b.length?null:b;b=J.i18n.Language.getSupported(J.i18n.GT.getLanguageList(this),a);J.i18n.GT.htLanguages.put(a,null==b?"":b);return b},"~S");c(c$,"addBundles",function(a,b,d,c){try{a="J.translation."+a+".",null!=b&&this.addBundle(a,b),
null!=d&&this.addBundle(a,d),null!=c&&this.addBundle(a,c)}catch(g){if(y(g,Exception))J.i18n.GT.allowDebug&&JU.Logger.errorEx("Some exception occurred!",g),this.resources=null,this.resourceCount=0;else throw g;}},"~S,~S,~S,~S");c(c$,"addBundle",function(a,b){var d=J.i18n.Resource.getResource(a,b);null!=d&&(null==this.resources&&(this.resources=Array(8),this.resourceCount=0),this.resources[this.resourceCount]=d,this.resourceCount++,J.i18n.GT.allowDebug&&JU.Logger.debug("GT adding "+a))},"~S,~S");c(c$,
"getString",function(a){var b=null;if(this.doTranslate){for(var d=this.resourceCount;0<=--d;)if(b=this.resources[d].getString(a),null!=b){a=b;break}0<this.resourceCount&&(null==b&&J.i18n.GT.allowDebug&&JU.Logger.debugging)&&JU.Logger.debug("No trans, using default: "+a)}null==b&&(a.startsWith("[")?a=a.substring(a.indexOf("]")+1):a.endsWith("]")&&(a=a.substring(0,a.indexOf("["))));return a},"~S");C(c$,"$ignoreApplicationBundle",!1,"$getTextWrapper",null,"languageList",null,"allowDebug",!1,"vwr",null);
c$.htLanguages=c$.prototype.htLanguages=new java.util.Hashtable});n("J.i18n");w(null,"J.i18n.Language",["J.i18n.GT"],function(){c$=t(function(){this.nativeLanguage=this.language=this.code=null;this.display=!1;s(this,arguments)},J.i18n,"Language");c$.getLanguageList=c(c$,"getLanguageList",function(){return[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",!1),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)]});u(c$,function(a,b,d,c){this.code=a;this.language=b;this.nativeLanguage=d;this.display=c},"~S,~S,~S,~B");c$.getSupported=c(c$,"getSupported",function(a,b){for(var d=a.length;0<=--d;)if(a[d].code.equalsIgnoreCase(b))return a[d].code;for(d=a.length;0<=--d;)if(a[d].code.startsWith(b))return a[d].code;
return null},"~A,~S")});n("J.i18n");w(null,"J.i18n.Resource","java.util.Hashtable JU.PT J.api.Interface J.i18n.GT JU.Logger JV.Viewer".split(" "),function(){c$=t(function(){this.resourceMap=this.resource=null;s(this,arguments)},J.i18n,"Resource");u(c$,function(a,b){null==b?this.resourceMap=a:this.resource=a},"~O,~S");c$.getResource=c(c$,"getResource",function(a,b){var d=null;if(null!=J.i18n.GT.vwr&&J.i18n.GT.vwr.isApplet())return d=JV.Viewer.appletIdiomaBase+"/"+b+".po",JU.Logger.info("Loading language resource "+
d),d=J.i18n.GT.vwr.getFileAsString(d,!1),J.i18n.Resource.getResourceFromPO(d);a+=b+".Messages_"+b;d=J.api.Interface.getInterface(a);return null==d?null:new J.i18n.Resource(d,a)},"~S,~S");c(c$,"getString",function(a){try{return null==this.resource?this.resourceMap.get(a):this.resource.getString(a)}catch(b){if(y(b,Exception))return null;throw b;}},"~S");c$.getLanguage=c(c$,"getLanguage",function(){var a=null;return a=Jmol.featureDetection.getDefaultLanguage().replace(/-/g,"_")});c$.getResourceFromPO=
c(c$,"getResourceFromPO",function(a){if(null==a||0==a.length)return null;var b=new java.util.Hashtable;try{var d=JU.PT.split(a,"\n");a=0;for(var c="",g="",f=0;f<d.length;f++){var j=d[f];2>=j.length?(2==a&&(0!=c.length&&0!=g.length)&&b.put(g,c),a=0):0==j.indexOf("msgid")?(a=1,g=J.i18n.Resource.fix(j)):0==j.indexOf("msgstr")?(a=2,c=J.i18n.Resource.fix(j)):1==a?g+=J.i18n.Resource.fix(j):2==a&&(c+=J.i18n.Resource.fix(j))}}catch(k){if(!y(k,Exception))throw k;}JU.Logger.info(b.size()+" translations loaded");
return 0==b.size()?null:new J.i18n.Resource(b,null)},"~S");c$.fix=c(c$,"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")});n("J.io");w(null,"J.io.FileReader","java.io.BufferedInputStream $.BufferedReader $.Reader javajs.api.GenericBinaryDocument $.ZInputStream JU.PT J.api.Interface J.io.JmolBinary JU.Logger".split(" "),function(){c$=t(function(){this.htParams=this.reader=this.atomSetCollection=this.fileTypeIn=
this.nameAsGivenIn=this.fullPathNameIn=this.fileNameIn=this.vwr=this.fm=null;this.isAppend=!1;this.bytes=null;s(this,arguments)},J.io,"FileReader");u(c$,function(a,b,d,c,g,f,j,k,h){this.fm=a;this.vwr=b;this.fileNameIn=d;this.fullPathNameIn=c;this.nameAsGivenIn=g;this.fileTypeIn=f;this.reader=p(j,java.io.BufferedReader)?j:p(j,java.io.Reader)?new java.io.BufferedReader(j):null;this.bytes=JU.PT.isAB(j)?j:null;this.htParams=k;this.isAppend=h},"JV.FileManager,JV.Viewer,~S,~S,~S,~S,~O,java.util.Map,~B");
c(c$,"run",function(){!this.isAppend&&this.vwr.displayLoadErrors&&this.vwr.zap(!1,!0,!1);var a=null,a=null;if(null==this.reader){a=this.fm.getUnzippedReaderOrStreamFromName(this.fullPathNameIn,this.bytes,!0,!1,!1,!0,this.htParams);if(null==a||p(a,String)){a=null==a?"error opening:"+this.nameAsGivenIn:a;a.startsWith("NOTE:")||JU.Logger.error("file ERROR: "+this.fullPathNameIn+"\n"+a);this.atomSetCollection=a;return}if(p(a,java.io.BufferedReader))this.reader=a;else if(p(a,javajs.api.ZInputStream)){var b=
this.fullPathNameIn,d=null,b=b.$replace("\\","/");0<=b.indexOf("|")&&!b.endsWith(".zip")&&(d=JU.PT.split(b,"|"),b=d[0]);null!=d&&this.htParams.put("subFileList",d);d=a;a=this.fm.getZipDirectory(b,!0,!0);this.atomSetCollection=a=J.io.JmolBinary.getAtomSetCollectionOrBufferedReaderFromZip(this.vwr.getModelAdapter(),d,b,a,this.htParams,!1);try{d.close()}catch(c){if(!y(c,Exception))throw c;}}}p(a,java.io.BufferedInputStream)&&(b=J.api.Interface.getInterface("JU.BinaryDocument"),b.setStream(a,!0),this.reader=
b);if(null!=this.reader){this.atomSetCollection=this.vwr.getModelAdapter().getAtomSetCollectionReader(this.fullPathNameIn,this.fileTypeIn,this.reader,this.htParams);p(this.atomSetCollection,String)||(this.atomSetCollection=this.vwr.getModelAdapter().getAtomSetCollection(this.atomSetCollection));try{p(this.reader,java.io.BufferedReader)?this.reader.close():p(this.reader,javajs.api.GenericBinaryDocument)&&this.reader.close()}catch(g){if(!y(g,java.io.IOException))throw g;}}p(this.atomSetCollection,String)||
(!this.isAppend&&!this.vwr.displayLoadErrors&&this.vwr.zap(!1,!0,!1),this.fm.setFileInfo([this.fullPathNameIn,this.fileNameIn,this.nameAsGivenIn]))});c(c$,"getAtomSetCollection",function(){return this.atomSetCollection})});n("J.io");w(null,"J.io.JmolBinary","java.io.BufferedInputStream java.util.Hashtable JU.PT $.Rdr J.api.Interface JU.Logger JV.FileManager".split(" "),function(){c$=t(function(){this.spardirCache=this.pngjCache=this.fm=null;s(this,arguments)},J.io,"JmolBinary");u(c$,function(a){this.fm=
a},"JV.FileManager");c$.determineSurfaceTypeIs=c(c$,"determineSurfaceTypeIs",function(a){var b;try{b=JU.Rdr.getBufferedReader(new java.io.BufferedInputStream(a),"ISO-8859-1")}catch(d){if(y(d,java.io.IOException))return null;throw d;}return J.io.JmolBinary.determineSurfaceFileType(b)},"java.io.InputStream");c$.getEmbeddedScript=c(c$,"getEmbeddedScript",function(a){if(null==a)return a;var b=a.indexOf("**** Jmol Embedded Script ****");if(0>b)return a;var d=a.lastIndexOf("/*",b),c=a.indexOf(("*"==a.charAt(d+
2)?"*":"")+"*/",b);for(0<=d&&c>=b&&(a=a.substring(b+30,c)+"\n");0<=(d=a.indexOf(" #Jmol...\x00"));)a=a.substring(0,d)+a.substring(d+10+4);JU.Logger.debugging&&JU.Logger.debug(a);return a},"~S");c$.getJzu=c(c$,"getJzu",function(){return null==J.io.JmolBinary.jzu?J.io.JmolBinary.jzu=J.api.Interface.getOption("io.JmolUtil"):J.io.JmolBinary.jzu});c(c$,"getCachedPngjBytes",function(a){return 0>a.indexOf(".png")?null:J.io.JmolBinary.getJzu().getCachedPngjBytes(this,a)},"~S");c(c$,"clearAndCachePngjFile",
function(a){this.pngjCache=new java.util.Hashtable;if(null==a)return!1;a[1]=null;return null==a[0]?!1:J.io.JmolBinary.getJzu().cachePngjFile(this,a)},"~A");c(c$,"spardirPut",function(a,b){null==this.spardirCache&&(this.spardirCache=new java.util.Hashtable);this.spardirCache.put(a,b)},"~S,~A");c(c$,"clearPngjCache",function(a){null!=a&&(null==this.pngjCache||!this.pngjCache.containsKey(a))||(this.pngjCache=null,JU.Logger.info("PNGJ cache cleared"))},"~S");c$.getAtomSetCollectionOrBufferedReaderFromZip=
c(c$,"getAtomSetCollectionOrBufferedReaderFromZip",function(a,b,d,c,g,f){return J.io.JmolBinary.getJzu().getAtomSetCollectionOrBufferedReaderFromZip(JU.Rdr.getJzt(),a,b,d,c,g,1,f)},"J.api.JmolAdapter,java.io.InputStream,~S,~A,java.util.Map,~B");c$.spartanFileList=c(c$,"spartanFileList",function(a,b){return J.io.JmolBinary.getJzu().spartanFileList(JU.Rdr.getJzt(),a,b)},"~S,~S");c$.determineSurfaceFileType=c(c$,"determineSurfaceFileType",function(a){return J.io.JmolBinary.getJzu().determineSurfaceFileType(a)},
"java.io.BufferedReader");c(c$,"getImage",function(a,b,d){return J.io.JmolBinary.getJzu().getImage(a,b,d)},"JV.Viewer,~O,~S");c$.getFileReferences=c(c$,"getFileReferences",function(a,b){for(var d=0;d<JV.FileManager.scriptFilePrefixes.length;d++)for(var c=JV.FileManager.scriptFilePrefixes[d],g=-1;0<=(g=a.indexOf(c,g+1));){var f=JU.PT.getQuotedStringAt(a,g);0<=f.indexOf("::")&&(f=JU.PT.split(f,"::")[1]);b.addLast(f)}},"~S,JU.Lst");c$.getManifestScriptPath=c(c$,"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");c$.getBufferedReaderForResource=c(c$,"getBufferedReaderForResource",function(a,b,d,c){c=a.vwrOptions.get("codePath")+d+c;return a.getBufferedReaderOrErrorMessageFromName(c,[null,null],!1)},"JV.Viewer,~O,~S,~S");C(c$,"JPEG_CONTINUE_STRING"," #Jmol...\x00","PMESH_BINARY_MAGIC_NUMBER",
"PM\u0001\x00","jzu",null)});n("J.render");w(["J.render.ShapeRenderer"],"J.render.BallsRenderer",["J.shape.Shape"],function(){c$=B(J.render,"BallsRenderer",J.render.ShapeRenderer);h(c$,"render",function(){var a=!1;if(this.isExport||this.vwr.checkMotionRendering(1141899265))for(var b=this.ms.at,d=this.shape.colixes,c=this.vwr.getRenderableBitSet(),g=c.nextSetBit(0);0<=g;g=c.nextSetBit(g+1)){var f=b[g];0<f.sD&&0!=(f.shapeVisibilityFlags&this.myVisibilityFlag)&&(this.g3d.setC(null==d?f.getColix():J.shape.Shape.getColix(d,
g,f))?this.g3d.drawAtom(f):a=!0)}return a})});n("J.render");w(["J.render.ShapeRenderer","JU.P3","$.P3i","$.V3"],"J.render.FontLineShapeRenderer",["java.lang.Float","J.c.AXES","JU.Txt"],function(){c$=t(function(){this.imageFontScaling=0;this.tickInfo=this.vectorT3=this.vectorT2=this.vectorT=this.pointT3=this.pointT2=this.pointT=this.s2=this.s1=this.pt2i=this.pt1i=this.pt0i=this.font3d=this.atomB=this.atomA=null;this.draw000=!0;this.width=0;this.endcap=3;this.colixB=this.colixA=0;this.dotsOrDashes=
!1;this.dashDots=null;this.asLineOnly=!1;s(this,arguments)},J.render,"FontLineShapeRenderer",J.render.ShapeRenderer);K(c$,function(){this.pt0i=new JU.P3i;this.pt1i=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});c(c$,"getDiameter",function(a,b){var d;d=20<b;switch(this.exportType){case 1:d=d?b:q(Math.floor(1E3*this.vwr.tm.unscaleToScreen(a,
2*b)));break;default:d?d=z(this.vwr.tm.scaleToScreen(a,b)):(this.g3d.isAntialiased()&&(b+=b),d=b)}return d},"~N,~N");c(c$,"renderLine",function(a,b,d,c,g,f){c.set(q(Math.floor(a.x)),q(Math.floor(a.y)),q(Math.floor(a.z)));g.set(q(Math.floor(b.x)),q(Math.floor(b.y)),q(Math.floor(b.z)));0>d?this.g3d.drawDottedLine(c,g):this.g3d.fillCylinder(this.endcap,d,c,g);f&&null!=this.tickInfo&&(this.atomA.sX=c.x,this.atomA.sY=c.y,this.atomA.sZ=c.z,this.atomB.sX=g.x,this.atomB.sY=g.y,this.atomB.sZ=g.z,this.drawTicks(this.atomA,
this.atomB,d,!0))},"JU.P3,JU.P3,~N,JU.P3i,JU.P3i,~B");c(c$,"drawTicks",function(a,b,d,c){Float.isNaN(this.tickInfo.first)&&(this.tickInfo.first=0);this.drawTicks2(a,b,this.tickInfo.ticks.x,8,d,!c?null:null==this.tickInfo.tickLabelFormats?["%0.2f"]:this.tickInfo.tickLabelFormats);this.drawTicks2(a,b,this.tickInfo.ticks.y,4,d,null);this.drawTicks2(a,b,this.tickInfo.ticks.z,2,d,null)},"JU.Point3fi,JU.Point3fi,~N,~B");c(c$,"drawTicks2",function(a,b,d,c,g,f){if(0!=d&&(this.g3d.isAntialiased()&&(c*=2),
this.vectorT2.set(b.sX,b.sY,0),this.vectorT.set(a.sX,a.sY,0),this.vectorT2.sub(this.vectorT),!(50>this.vectorT2.length()))){var j=this.tickInfo.signFactor;this.vectorT.sub2(b,a);var k=this.vectorT.length();if(null!=this.tickInfo.scale)if(Float.isNaN(this.tickInfo.scale.x)){var h=this.vwr.getUnitCellInfo(0);Float.isNaN(h)||this.vectorT.set(this.vectorT.x/h,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);h=this.vectorT.length()+1E-4*d;if(!(h<d)){this.vectorT.scale(d/h*k/h);b=(b.sZ-a.sZ)/(h/d);h+=this.tickInfo.first;k=q(Math.floor(this.tickInfo.first/d))*d-this.tickInfo.first;this.pointT.scaleAdd2(k/d,this.vectorT,a);k+=this.tickInfo.first;a=a.sZ;0>g&&(g=1);this.vectorT2.set(-this.vectorT2.y,this.vectorT2.x,0);this.vectorT2.scale(c/this.vectorT2.length());c=this.tickInfo.reference;null==c?(this.pointT3.setT(this.vwr.getBoundBoxCenter()),
this.vwr.g.axesMode===J.c.AXES.BOUNDBOX&&this.pointT3.add3(1,1,1)):this.pointT3.setT(c);this.tm.transformPtScr(this.pointT3,this.pt2i);c=0.2>Math.abs(this.vectorT2.x/this.vectorT2.y);for(var m=!c,r=!c&&0>this.vectorT2.x,x=null!=f&&0<f.length,A,I,n=Array(1),p=this.draw000?0:-1;k<h;){if(k>=this.tickInfo.first&&(this.pointT2.setT(this.pointT),this.tm.transformPt3f(this.pointT2,this.pointT2),this.drawLine(q(Math.floor(this.pointT2.x)),q(Math.floor(this.pointT2.y)),z(a),A=q(Math.floor(this.pointT2.x+this.vectorT2.x)),
I=q(Math.floor(this.pointT2.y+this.vectorT2.y)),z(a),g),x&&(this.draw000||0!=k))){n[0]=Float.$valueOf(0==k?0:k*j);var s=JU.Txt.sprintf(f[p%f.length],"f",n);this.drawString(A,I,z(a),4,r,c,m,q(Math.floor(this.pointT2.y)),s)}this.pointT.add(this.vectorT);k+=d;a+=b;p++}}}},"JU.Point3fi,JU.Point3fi,~N,~N,~N,~A");c(c$,"drawLine",function(a,b,d,c,g,f,j){return this.drawLine2(a,b,d,c,g,f,j)},"~N,~N,~N,~N,~N,~N,~N");c(c$,"drawLine2",function(a,b,d,c,g,f,j){this.pt0i.set(a,b,d);this.pt1i.set(c,g,f);if(this.dotsOrDashes)null!=
this.dashDots&&this.drawDashed(a,b,d,c,g,f,this.dashDots);else{if(0>j)return this.g3d.drawDashedLine(4,2,this.pt0i,this.pt1i),1;this.g3d.fillCylinder(2,j,this.pt0i,this.pt1i)}return q((j+1)/2)},"~N,~N,~N,~N,~N,~N,~N");c(c$,"drawString",function(a,b,d,c,g,f,j,k,h){if(null!=h){var m=this.font3d.stringWidth(h),r=this.font3d.getAscent();a=g?a-(q(c/2)+2+m):f?a-(q(c/2)+2+q(m/2)):a+(q(c/2)+2);g=b;g=j?g+q(r/2):0==k||k<b?g+r:g-q(c/2);b=d-c-2;1>b&&(b=1);this.g3d.drawString(h,this.font3d,a,g,b,b,0)}},"~N,~N,~N,~N,~B,~B,~B,~N,~S");
c(c$,"drawDashed",function(a,b,d,c,g,f,j){if(!(null==j||0>this.width)){var k=j[0];c-=a;g-=b;f-=d;var h=0,m=j===J.render.FontLineShapeRenderer.ndots,r=m||j===J.render.FontLineShapeRenderer.sixdots;if(r){var x=(c*c+g*g)/(this.width*this.width);m?(k=Math.sqrt(x)/1.5,h=z(k)+3):8>x?j=J.render.FontLineShapeRenderer.twodots:32>x&&(j=J.render.FontLineShapeRenderer.fourdots)}var x=j[1],A=j[2],I=this.colixA,n=0==A?this.colixB:this.colixA;0==h&&(h=j.length);for(var p=0,s=3;s<h;s++){var p=m?p+1:j[s],t=q(Math.floor(a+
c*p/k)),u=q(Math.floor(b+g*p/k)),v=q(Math.floor(d+f*p/k));if(r)this.s1.set(t,u,v),s==x?this.g3d.setC(this.colixA):s==A&&this.g3d.setC(this.colixB),this.g3d.fillSphereI(this.width,this.s1);else{s==x&&(I=this.colixB);p=j[++s];s==A&&(n=this.colixB);var w=q(Math.floor(a+c*p/k)),y=q(Math.floor(b+g*p/k)),B=q(Math.floor(d+f*p/k));this.fillCylinder(I,n,2,this.width,t,u,v,w,y,B)}}}},"~N,~N,~N,~N,~N,~N,~A");c(c$,"fillCylinder",function(a,b,d,c,g,f,j,k,h,m){this.asLineOnly?this.g3d.drawLine(a,b,g,f,j,k,h,m):
this.g3d.fillCylinderXYZ(a,b,d,!this.isExport||1==this.mad?c:this.mad,g,f,j,k,h,m)},"~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");C(c$,"dashes",[12,0,0,2,5,7,10],"hDashes",[10,7,6,1,3,4,6,7,9],"ndots",[0,3,1E3],"sixdots",[12,3,6,1,3,5,7,9,11],"fourdots",[13,3,5,2,5,8,11],"twodots",[12,3,4,3,9])});n("J.render");w(["J.render.ShapeRenderer"],"J.render.FrankRenderer",["JU.C"],function(){c$=B(J.render,"FrankRenderer",J.render.ShapeRenderer);h(c$,"render",function(){var a=this.shape,b=this.vwr.getBooleanProperty("allowKeyStrokes"),
d=this.vwr.getBoolean(603979883);this.colix=d?20:this.vwr.isSignedApplet()?b||this.vwr.isJS&&!this.vwr.isWebGL?5:10:b?7:12;if(this.isExport||!this.vwr.getShowFrank())return!1;if(!this.g3d.setC(JU.C.getColixTranslucent3(this.colix,this.g3d.haveTranslucentObjects(),0.5)))return!0;b=this.vwr.getImageFontScaling();a.getFont(b);var b=z(a.frankWidth+4*b),c=a.frankDescent;this.g3d.drawStringNoSlab(a.frankString,a.font3d,this.g3d.getRenderWidth()-b,this.g3d.getRenderHeight()-c,0,0);d&&this.g3d.fillRect(0,
0,0,0,2*c,q(3*b/2));return!1})});n("J.render");w(["J.api.JmolRepaintManager","JU.BS"],"J.render.RepaintManager",["J.api.Interface","JU.Logger","JV.JC"],function(){c$=t(function(){this.bsTranslucent=this.renderers=this.shapeManager=this.vwr=null;this.holdRepaint=0;this.repaintPending=!1;s(this,arguments)},J.render,"RepaintManager",null,J.api.JmolRepaintManager);K(c$,function(){this.bsTranslucent=JU.BS.newN(36)});u(c$,function(){});h(c$,"set",function(a,b){this.vwr=a;this.shapeManager=b},"JV.Viewer,JV.ShapeManager");
h(c$,"isRepaintPending",function(){return this.repaintPending});h(c$,"pushHoldRepaint",function(){++this.holdRepaint},"~S");h(c$,"popHoldRepaint",function(a,b){--this.holdRepaint;0>=this.holdRepaint&&(this.holdRepaint=0,a&&(this.repaintPending=!0,this.repaintNow(b)))},"~B,~S");h(c$,"requestRepaintAndWait",function(){"undefined"!=typeof Jmol&&Jmol._repaint&&Jmol._repaint(this.vwr.html5Applet,!1);this.repaintDone()},"~S");h(c$,"repaintIfReady",function(a){if(this.repaintPending)return!1;this.repaintPending=
!0;0==this.holdRepaint&&this.repaintNow(a);return!0},"~S");c(c$,"repaintNow",function(){this.vwr.haveDisplay&&this.vwr.apiPlatform.repaint(this.vwr.getDisplay())},"~S");h(c$,"repaintDone",function(){this.repaintPending=!1});h(c$,"clear",function(a){if(null!=this.renderers)if(0<=a)this.renderers[a]=null;else for(a=0;36>a;++a)this.renderers[a]=null},"~N");c(c$,"getRenderer",function(a){if(null!=this.renderers[a])return this.renderers[a];var b=JV.JC.getShapeClassName(a,!0)+"Renderer";if(null==(b=J.api.Interface.getInterface(b)))return null;
b.setViewerG3dShapeID(this.vwr,a);return this.renderers[a]=b},"~N");h(c$,"render",function(a,b,d,c){var g=this.vwr.getBoolean(603979934);try{a.renderBackground(null);if(d){this.bsTranslucent.clearAll();null!=c&&a.renderCrossHairs(c,this.vwr.getScreenWidth(),this.vwr.getScreenHeight(),this.vwr.tm.getNavigationOffset(),this.vwr.tm.getNavigationDepthPercent());var f=this.vwr.getRubberBandSelection();null!=f&&a.setC(this.vwr.cm.colixRubberband)&&a.drawRect(f.x,f.y,0,0,f.width,f.height)}null==this.renderers&&
(this.renderers=Array(36));c=null;for(f=0;36>f&&a.currentlyRendering();++f){var j=this.shapeManager.getShape(f);null!=j&&(g&&(c="rendering "+JV.JC.getShapeClassName(f,!1),JU.Logger.startTimer(c)),(d||this.bsTranslucent.get(f))&&this.getRenderer(f).renderShape(a,b,j)&&this.bsTranslucent.set(f),g&&JU.Logger.checkTimer(c,!1))}a.renderAllStrings(null)}catch(k){if(y(k,Exception))this.vwr.isJS||k.printStackTrace(),JU.Logger.error("rendering error? "+k);else throw k;}},"JU.GData,JM.ModelSet,~B,~A");h(c$,
"renderExport",function(a,b,d){a=this.vwr.getBoolean(603979934);this.vwr.finalizeTransformParameters();this.shapeManager.finalizeAtoms(null,null);var c=this.vwr.initializeExporter(d);if(null==c)return JU.Logger.error("Cannot export "+d.get("type")),null;c.renderBackground(c);null==this.renderers&&(this.renderers=Array(36));d=null;for(var g=0;36>g;++g){var f=this.shapeManager.getShape(g);null!=f&&(a&&(d="rendering "+JV.JC.getShapeClassName(g,!1),JU.Logger.startTimer(d)),this.getRenderer(g).renderShape(c,
b,f),a&&JU.Logger.checkTimer(d,!1))}c.renderAllStrings(c);return c.finalizeOutput()},"JU.GData,JM.ModelSet,java.util.Map")});n("J.render");w(null,"J.render.ShapeRenderer",["JV.JC"],function(){c$=t(function(){this.shape=this.ms=this.g3d=this.tm=this.vwr=null;this.exportType=this.madEnd=this.madMid=this.madBeg=this.mad=this.colix=this.shapeID=this.myVisibilityFlag=0;this.isExport=!1;s(this,arguments)},J.render,"ShapeRenderer");c(c$,"initRenderer",function(){});c(c$,"setViewerG3dShapeID",function(a,
b){this.vwr=a;this.tm=a.tm;this.shapeID=b;this.myVisibilityFlag=JV.JC.getShapeVisibilityFlag(b);this.initRenderer()},"JV.Viewer,~N");c(c$,"renderShape",function(a,b,d){this.g3d=a;this.ms=b;this.shape=d;this.exportType=a.getExportType();this.isExport=0!=this.exportType;a=this.render();this.exportType=0;this.isExport=!1;return a},"J.api.JmolRendererInterface,JM.ModelSet,J.shape.Shape");c(c$,"isVisibleForMe",function(a){return a.isVisible(this.myVisibilityFlag|9)},"JM.Atom")});n("J.render");w(["J.render.FontLineShapeRenderer",
"JU.BS","$.P3","$.V3"],"J.render.SticksRenderer",["java.lang.Float","J.c.PAL","JM.Bond","JU.C","$.Edge"],function(){c$=t(function(){this.showMultipleBonds=!1;this.modeMultipleBond=this.multipleBondRadiusFactor=this.multipleBondSpacing=0;this.isCartesianExport=!1;this.endcaps=0;this.hbondsSolid=this.bondsBackbone=this.hbondsBackbone=this.ssbondsBackbone=!1;this.bond=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.isPass2=!1;this.dyStep=this.dxStep=this.yAxis2=this.xAxis2=this.yAxis1=this.xAxis1=0;s(this,arguments)},J.render,"SticksRenderer",J.render.FontLineShapeRenderer);K(c$,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)});h(c$,"render",function(){var a=this.ms.bo;if(null==a)return!1;(this.isPass2=this.g3d.isPass2())||this.bsForPass2.clearAll();
this.slabbing=this.tm.slabEnabled;this.slabByAtom=this.vwr.getBoolean(603979939);this.endcaps=3;this.dashDots=this.vwr.getBoolean(603979889)?J.render.FontLineShapeRenderer.sixdots:J.render.FontLineShapeRenderer.dashes;this.isCartesianExport=1==this.exportType;this.getMultipleBondSettings(!1);this.wireframeOnly=!this.vwr.checkMotionRendering(1678770178);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();var b=!1;if(!this.isExport&&this.isPass2)for(var d=this.bsForPass2.nextSetBit(0);0<=d;d=this.bsForPass2.nextSetBit(d+1))this.bond=a[d],this.renderBond();else for(d=this.ms.bondCount;0<=--d;)this.bond=a[d],0!=(this.bond.getShapeVisibilityFlags()&this.myVisibilityFlag)&&this.renderBond()&&(b=!0,this.bsForPass2.set(d));return b});c(c$,"getMultipleBondSettings",function(a){this.multipleBondSpacing=
a?0.15:this.vwr.getFloat(570425370);this.multipleBondRadiusFactor=a?0.4:this.vwr.getFloat(570425369);0==this.multipleBondSpacing&&this.isCartesianExport&&(this.multipleBondSpacing=0.2);this.modeMultipleBond=this.vwr.g.modeMultipleBond;this.showMultipleBonds=0!=this.multipleBondSpacing&&0!=this.modeMultipleBond&&this.vwr.getBoolean(603979928)},"~B");c(c$,"renderBond",function(){var a,b;this.a=a=this.bond.getAtom1();this.b=b=this.bond.getAtom2();var d=this.bond.order&-131073;this.bondsBackbone&&(this.ssbondsBackbone&&
0!=(d&256)?(this.a=this.a.getGroup().getLeadAtomOr(this.a),this.b=this.b.getGroup().getLeadAtomOr(this.b)):this.hbondsBackbone&&JM.Bond.isOrderH(d)&&(this.a=this.a.getGroup().getLeadAtomOr(this.a),this.b=this.b.getGroup().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))||this.slabbing&&(this.g3d.isClippedZ(this.a.sZ)&&this.g3d.isClippedZ(this.b.sZ)||this.slabByAtom&&
(this.g3d.isClippedZ(this.a.sZ)||this.g3d.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.getColix();this.colixB=b.getColix();2==((this.colix=this.bond.colix)&-30721)?(this.colix&=30720,this.colixA=JU.C.getColixInherited(this.colix|this.vwr.getColixAtomPalette(a,J.c.PAL.CPK.id),this.colixA),this.colixB=JU.C.getColixInherited(this.colix|this.vwr.getColixAtomPalette(b,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));a=!1;if(!this.isExport&&!this.isPass2){b=!JU.C.isColixTranslucent(this.colixA);var c=!JU.C.isColixTranslucent(this.colixB);if(!b||!c){if(!b&&!c&&!a)return this.g3d.setC(!b?this.colixA:this.colixB),!0;a=!0}}this.bondOrder=d&-131073;if(0==(this.bondOrder&224)&&(0!=(this.bondOrder&256)&&(this.bondOrder&=-257),0!=(this.bondOrder&1023)&&(!this.showMultipleBonds||2==this.modeMultipleBond&&500<this.mad||65536==(this.bondOrder&98304))))this.bondOrder=
1;b=0;switch(this.bondOrder){case 1:case 2:case 3:case 4:break;case 17:case 513:this.bondOrder=1;b=513==d?0:1;break;case 515:case 514:this.bondOrder=2;b=515==d?this.getAromaticDottedBondMask():0;break;default:0!=(this.bondOrder&224)?(this.bondOrder=JU.Edge.getPartialBondOrder(d),b=JU.Edge.getPartialBondDotted(d)):JM.Bond.isOrderH(this.bondOrder)?(this.bondOrder=1,this.hbondsSolid||(b=-1)):32768==this.bondOrder?this.bondOrder=1:98304==(this.bondOrder&98304)&&(this.getMultipleBondSettings(!0),this.bondOrder&=
3,b=-2)}this.xA=this.a.sX;this.yA=this.a.sY;this.xB=this.b.sX;this.yB=this.b.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=z(this.vwr.tm.scaleToScreen(q((this.zA+this.zB)/2),this.mad));this.wireframeOnly&&0<this.width&&(this.width=1);if(!this.isCartesianExport&&(this.asLineOnly=1>=this.width)&&this.isAntialiased)this.width=3,this.asLineOnly=!1;switch(b){case -2:this.drawBond(0);
this.getMultipleBondSettings(!1);break;case -1:this.drawDashed(this.xA,this.yA,this.zA,this.xB,this.yB,this.zB,J.render.FontLineShapeRenderer.hDashes);break;default:this.drawBond(b)}return a});c(c$,"drawBond",function(a){if(this.isCartesianExport&&1==this.bondOrder)this.g3d.drawBond(this.a,this.b,this.colixA,this.colixB,this.endcaps,this.mad,-1);else{var b=0==this.dx&&0==this.dy;if(!b||!this.asLineOnly){var d=1<this.bondOrder&&0<this.multipleBondSpacing,c=d&&(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&&!d){a=q(this.width/8)+3;a=this.width+a;d=this.yA-q((this.bondOrder-1)*a/2);do this.fillCylinder(this.colixA,this.colixA,this.endcaps,this.width,this.xA,d,this.zA,this.xA,d,this.zA),d+=a;while(0<--this.bondOrder)}else if(b=0!=(a&1),1==this.bondOrder)b?this.drawDashed(this.xA,this.yA,this.zA,this.xB,this.yB,this.zB,this.dashDots):this.fillCylinder(this.colixA,this.colixB,this.endcaps,
this.width,this.xA,this.yA,this.zA,this.xB,this.yB,this.zB);else if(d){c||this.z.set(3.141592653589793,2.718281828459045,8.539734222673566);this.x.sub2(this.b,this.a);this.y.cross(this.x,this.z);this.y.normalize();Float.isNaN(this.y.x)&&(this.z.set(3.141592653589793,2.718281828459045,8.539734222673566),this.y.cross(this.x,this.z),this.y.cross(this.y,this.x),this.y.normalize());this.y.scale(this.multipleBondSpacing);this.x.setT(this.y);this.x.scale((this.bondOrder-1)/2);this.p1.sub2(this.a,this.x);
for(this.p2.sub2(this.b,this.x);;){this.isCartesianExport&&!b?this.g3d.drawBond(this.p1,this.p2,this.colixA,this.colixB,this.endcaps,this.mad,-2):(this.tm.transformPtScr(this.p1,this.s1),this.tm.transformPtScr(this.p2,this.s2),b?this.drawDashed(this.s1.x,this.s1.y,this.s1.z,this.s2.x,this.s2.y,this.s2.z,this.dashDots):this.fillCylinder(this.colixA,this.colixB,this.endcaps,this.width,this.s1.x,this.s1.y,this.s1.z,this.s2.x,this.s2.y,this.s2.z),a>>=1,b=0!=(a&1));if(0>=--this.bondOrder)break;this.p1.add(this.y);
this.p2.add(this.y);this.stepAxisCoordinates()}}else{this.mag2d=Math.round(Math.sqrt(this.dx*this.dx+this.dy*this.dy));for(this.resetAxisCoordinates();;){0!=(a&1)?this.drawDashed(this.xAxis1,this.yAxis1,this.zA,this.xAxis2,this.yAxis2,this.zB,this.dashDots):this.fillCylinder(this.colixA,this.colixB,this.endcaps,this.width,this.xAxis1,this.yAxis1,this.zA,this.xAxis2,this.yAxis2,this.zB);a>>=1;if(0>=--this.bondOrder)break;this.stepAxisCoordinates()}}}}},"~N");c(c$,"resetAxisCoordinates",function(){var a=
this.mag2d>>3;-1!=this.multipleBondSpacing&&0>this.multipleBondSpacing&&(a*=-this.multipleBondSpacing);a=this.width+a;this.dxStep=q(a*this.dy/this.mag2d);this.dyStep=q(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-=q(this.dxStep*a/2);this.yAxis1-=q(this.dyStep*a/2);this.xAxis2-=q(this.dxStep*a/2);this.yAxis2-=q(this.dyStep*a/2)});c(c$,"stepAxisCoordinates",function(){this.xAxis1+=this.dxStep;this.yAxis1+=this.dyStep;
this.xAxis2+=this.dxStep;this.yAxis2+=this.dyStep});c(c$,"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})});n("JS");w(["JS.T"],"JS.ContextToken",["java.util.Hashtable","JS.SV"],function(){c$=t(function(){this.name0=this.contextVariables=null;s(this,arguments)},JS,"ContextToken",JS.T);c$.newContext=c(c$,"newContext",function(a){a=a?JS.ContextToken.newCmd(1276384259,"{"):JS.ContextToken.newCmd(1276383249,
"}");a.intValue=0;return a},"~B");c$.newCmd=c(c$,"newCmd",function(a,b){var d=new JS.ContextToken;d.tok=a;d.value=b;return d},"~N,~O");c(c$,"addName",function(a){null==this.contextVariables&&(this.contextVariables=new java.util.Hashtable);this.contextVariables.put(a,JS.SV.newS("").setName(a))},"~S")});n("JS");w(null,"JS.ScriptContext",["java.util.Hashtable","JS.SV"],function(){c$=t(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.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.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;s(this,arguments)},JS,"ScriptContext");u(c$,function(){this.id=++JS.ScriptContext.contextCount});c(c$,"setMustResume",function(){for(var a=this;null!=a;)a.mustResumeEval=!0,a.pc=a.pc0,a=a.parentContext});c(c$,"getVariable",function(a){for(var b=this;null!=b&&!b.isFunction;){if(null!=b.vars&&b.vars.containsKey(a))return b.vars.get(a);b=b.parentContext}return null},
"~S");c(c$,"getFullMap",function(){var a=new java.util.Hashtable,b=this;for(null!=this.contextPath&&a.put("_path",JS.SV.newS(this.contextPath));null!=b&&!b.isFunction;){if(null!=b.vars)for(var d,c=b.vars.keySet().iterator();c.hasNext()&&((d=c.next())||1);)if(!a.containsKey(d)){var g=b.vars.get(d);(2!=g.tok||2147483647!=g.intValue)&&a.put(d,g)}b=b.parentContext}return a});C(c$,"contextCount",0)});n("JS");w(["java.lang.Exception"],"JS.ScriptException",null,function(){c$=t(function(){this.untranslated=
this.message=this.eval=null;this.isError=!1;s(this,arguments)},JS,"ScriptException",Exception);u(c$,function(a,b,d,c){E(this,JS.ScriptException,[]);this.eval=a;this.message=b;(this.isError=c)&&this.eval.setException(this,b,d)},"JS.ScriptError,~S,~S,~B");c(c$,"getErrorMessageUntranslated",function(){return this.untranslated});h(c$,"toString",function(){return this.message})});n("JS");w(["javajs.api.JSONEncodable","JS.T","JU.P3"],"JS.SV","java.lang.Boolean $.Float java.util.Arrays $.Collections $.Hashtable $.Map JU.AU $.BArray $.BS $.Base64 $.Lst $.M3 $.M34 $.M4 $.Measure $.P4 $.PT $.Quat $.SB $.T3 $.V3 JM.BondSet JS.ScriptContext JU.BSUtil $.Escape $.Txt".split(" "),
function(){c$=t(function(){this.index=2147483647;this.flags=2;this.myName=null;N("JS.SV.Sort")||JS.SV.$SV$Sort$();s(this,arguments)},JS,"SV",JS.T,javajs.api.JSONEncodable);c$.newV=c(c$,"newV",function(a,b){var d=new JS.SV;d.tok=a;d.value=b;return d},"~N,~O");c$.newI=c(c$,"newI",function(a){var b=new JS.SV;b.tok=2;b.intValue=a;return b},"~N");c$.newS=c(c$,"newS",function(a){return JS.SV.newV(4,a)},"~S");c$.newT=c(c$,"newT",function(a){return JS.SV.newSV(a.tok,a.intValue,a.value)},"JS.T");c$.newSV=
c(c$,"newSV",function(a,b,d){a=JS.SV.newV(a,d);a.intValue=b;return a},"~N,~N,~O");c(c$,"setv",function(a){this.index=a.index;this.intValue=a.intValue;this.tok=a.tok;this.value=a.value;return this},"JS.SV");c$.sizeOf=c(c$,"sizeOf",function(a){switch(null==a?0:a.tok){case 10:return JU.BSUtil.cardinalityOf(JS.SV.bsSelectToken(a));case 1048589:case 1048588: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;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();default:return 0}},"JS.T");c$.isVariableType=c(c$,"isVariableType",function(a){return p(a,JS.SV)||p(a,Boolean)||p(a,Integer)||p(a,Float)||p(a,String)||p(a,JU.T3)||p(a,JU.BS)||p(a,JU.P4)||p(a,JU.Quat)||p(a,JU.M34)||p(a,java.util.Map)||p(a,JU.Lst)||p(a,JU.BArray)||p(a,JS.ScriptContext)||JS.SV.isArray(a)},"~O");c$.isArray=c(c$,
"isArray",function(a){return p(a,Array)},"~O");c$.getVariable=c(c$,"getVariable",function(a){return null==a?JS.SV.newS(""):p(a,JS.SV)?a:p(a,Boolean)?JS.SV.getBoolean(a.booleanValue()):p(a,Integer)?JS.SV.newI(a.intValue()):p(a,Float)?JS.SV.newV(3,a):p(a,String)?(a=JS.SV.unescapePointOrBitsetAsVariable(a),p(a,JS.SV)?a:JS.SV.newV(4,a)):p(a,JU.P3)?JS.SV.newV(8,a):p(a,JU.V3)?JS.SV.newV(8,JU.P3.newP(a)):p(a,JU.BS)?JS.SV.newV(10,a):p(a,JU.P4)?JS.SV.newV(9,a):p(a,JU.Quat)?JS.SV.newV(9,a.toPoint4f()):p(a,
JU.M34)?JS.SV.newV(p(a,JU.M4)?12:11,a):p(a,java.util.Map)?JS.SV.getVariableMap(a):p(a,JU.Lst)?JS.SV.getVariableList(a):p(a,JU.BArray)?JS.SV.newV(15,a):p(a,JS.ScriptContext)?JS.SV.newV(14,a):JU.Escape.isAV(a)?JS.SV.getVariableAV(a):JU.PT.isAI(a)?JS.SV.getVariableAI(a):JU.PT.isAB(a)?JS.SV.getVariableAB(a):JU.PT.isAF(a)?JS.SV.getVariableAF(a):JU.PT.isAD(a)?JS.SV.getVariableAD(a):JU.PT.isAS(a)?JS.SV.getVariableAS(a):JU.PT.isAP(a)?JS.SV.getVariableAP(a):JU.PT.isAII(a)?JS.SV.getVariableAII(a):JU.PT.isAFF(a)?
JS.SV.getVariableAFF(a):JU.PT.isASS(a)?JS.SV.getVariableASS(a):JU.PT.isADD(a)?JS.SV.getVariableADD(a):JU.PT.isAFloat(a)?JS.SV.newV(13,a):JS.SV.newS(a.toString())},"~O");c$.getVariableMap=c(c$,"getVariableMap",function(a){for(var b=a,d=null,c,g=b.values().iterator();g.hasNext()&&((c=g.next())||1);){d=c;break}if(!p(d,JS.SV)){a=new java.util.Hashtable;for(var f,b=b.entrySet().iterator();b.hasNext()&&((f=b.next())||1);)a.put(f.getKey(),JS.SV.getVariable(f.getValue()))}return JS.SV.newV(6,a)},"java.util.Map");
c$.getVariableList=c(c$,"getVariableList",function(a){var b=a.size();if(0<b&&p(a.get(0),JS.SV))return JS.SV.newV(7,a);for(var d=new JU.Lst,c=0;c<b;c++)d.addLast(JS.SV.getVariable(a.get(c)));return JS.SV.newV(7,d)},"JU.Lst");c$.getVariableAV=c(c$,"getVariableAV",function(a){for(var b=new JU.Lst,d=0;d<a.length;d++)b.addLast(a[d]);return JS.SV.newV(7,b)},"~A");c$.getVariableAD=c(c$,"getVariableAD",function(a){for(var b=new JU.Lst,d=0;d<a.length;d++)b.addLast(JS.SV.newV(3,Float.$valueOf(a[d])));return JS.SV.newV(7,
b)},"~A");c$.getVariableAS=c(c$,"getVariableAS",function(a){for(var b=new JU.Lst,d=0;d<a.length;d++)b.addLast(JS.SV.newV(4,a[d]));return JS.SV.newV(7,b)},"~A");c$.getVariableAP=c(c$,"getVariableAP",function(a){for(var b=new JU.Lst,d=0;d<a.length;d++)b.addLast(JS.SV.newV(8,a[d]));return JS.SV.newV(7,b)},"~A");c$.getVariableAFF=c(c$,"getVariableAFF",function(a){for(var b=new JU.Lst,d=0;d<a.length;d++)b.addLast(JS.SV.getVariableAF(a[d]));return JS.SV.newV(7,b)},"~A");c$.getVariableADD=c(c$,"getVariableADD",
function(a){for(var b=new JU.Lst,d=0;d<a.length;d++)b.addLast(JS.SV.getVariableAD(a[d]));return JS.SV.newV(7,b)},"~A");c$.getVariableASS=c(c$,"getVariableASS",function(a){for(var b=new JU.Lst,d=0;d<a.length;d++)b.addLast(JS.SV.getVariableAS(a[d]));return JS.SV.newV(7,b)},"~A");c$.getVariableAII=c(c$,"getVariableAII",function(a){for(var b=new JU.Lst,d=0;d<a.length;d++)b.addLast(JS.SV.getVariableAI(a[d]));return JS.SV.newV(7,b)},"~A");c$.getVariableAF=c(c$,"getVariableAF",function(a){for(var b=new JU.Lst,
d=0;d<a.length;d++)b.addLast(JS.SV.newV(3,Float.$valueOf(a[d])));return JS.SV.newV(7,b)},"~A");c$.getVariableAI=c(c$,"getVariableAI",function(a){for(var b=new JU.Lst,d=0;d<a.length;d++)b.addLast(JS.SV.newI(a[d]));return JS.SV.newV(7,b)},"~A");c$.getVariableAB=c(c$,"getVariableAB",function(a){for(var b=new JU.Lst,d=0;d<a.length;d++)b.addLast(JS.SV.newI(a[d]));return JS.SV.newV(7,b)},"~A");c(c$,"setName",function(a){this.myName=a;this.flags|=1;return this},"~S");c(c$,"isModified",function(){return JS.T.tokAttr(this.flags,
2)});c(c$,"setModified",function(a){this.flags=a?this.flags|2:this.flags&-3},"~B");c(c$,"canIncrement",function(){return!0});c(c$,"increment",function(a){if(!this.canIncrement())return!1;switch(this.tok){case 2:this.intValue+=a;break;case 3:this.value=Float.$valueOf(this.value.floatValue()+a);break;default:return!1}return!0},"~N");c(c$,"asBoolean",function(){return JS.SV.bValue(this)});c(c$,"asInt",function(){return JS.SV.iValue(this)});c(c$,"asFloat",function(){return JS.SV.fValue(this)});c(c$,"asString",
function(){return JS.SV.sValue(this)});c$.oValue=c(c$,"oValue",function(a){switch(null==a?0:a.tok){case 1048589:return Boolean.TRUE;case 0:case 1048588:return Boolean.FALSE;case 2:return Integer.$valueOf(a.intValue);case 10:case 135266306:return JS.SV.selectItemVar(a).value;default:return a.value}},"JS.SV");c$.nValue=c(c$,"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=z(JS.SV.toFloat(a.value));
break;case 8:return Float.$valueOf(a.value.length());default:a=0}return Integer.$valueOf(a)},"JS.T");c$.bValue=c(c$,"bValue",function(a){switch(null==a?0:a.tok){case 1048589:case 6:case 14:return!0;case 1048588: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));default:return!1}},"JS.T");c$.iValue=c(c$,"iValue",function(a){switch(null==a?0:a.tok){case 1048589:return 1;
case 1048588:return 0;case 2:return a.intValue;case 3:case 7:case 4:case 8:case 9:case 11:case 12:return z(JS.SV.fValue(a));case 10:return JU.BSUtil.cardinalityOf(JS.SV.bsSelectToken(a));case 15:return a.value.data.length;default:return 0}},"JS.T");c$.fValue=c(c$,"fValue",function(a){switch(null==a?0:a.tok){case 1048589:return 1;case 1048588: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 b=new JU.P3;a.value.rotate(b);return b.length();case 12:return b=new JU.P3,a.value.rotTrans(b),b.length();default:return 0}},"JS.T");c$.sValue=c(c$,"sValue",function(a){if(null==a)return"";var b;switch(a.tok){case 1048589:return"true";case 1048588:return"false";case 2:return""+a.intValue;case 10:return b=JS.SV.bsSelectToken(a),p(a.value,JM.BondSet)?JU.Escape.eBond(b):
JU.Escape.eBS(b);case 7:var d=a.getList();b=a.intValue;0>=b&&(b=d.size()-b);if(2147483647!=b)return 1>b||b>d.size()?"":JS.SV.sValue(d.get(b-1));case 6:case 14:if(p(a.value,String))return a.value;b=new JU.SB;JS.SV.sValueArray(b,a,"","",!1,!0,!0,2147483647,!1);return JU.PT.rep(b.toString(),"\n\x00"," ");case 4:return d=a.value,b=a.intValue,0>=b&&(b=d.length-b),2147483647==b?d:1>b||b>d.length?"":""+d.charAt(b-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");c$.sValueArray=c(c$,"sValueArray",function(a,b,d,c,g,f,j,k,h){switch(b.tok){case 6:case 14:case 7:var m=";"+b.hashCode()+";";if(0<=d.indexOf(m)){a.append(g?"{}":null==b.myName?'\x00"<circular reference>"':"<"+b.myName+">");break}d+=m;if(7==b.tok){if(!j)break;f||a.append(g?"[ ":c+"[\n");b=b.getList();for(m=0;m<b.size();m++){g&&0<m&&a.append(",");var r=b.get(m);JS.SV.sValueArray(a,r,d,c+"  ",g,0==c.length&&!g&&JS.SV.isRawType(r.tok),j,k,h);g||a.append("\n")}f||
a.append(g?" ]":c+"]")}else 0<=--k&&(f=14==b.tok?b.value.getFullMap():b.getMap(),JS.SV.addKeys(a,d,f,c,g,j,k,h));break;default:if(!j)break;!f&&!g&&a.append(c);a.append(g?b.escape():JS.SV.sValue(b))}},"JU.SB,JS.SV,~S,~S,~B,~B,~B,~N,~B");c$.addKeys=c(c$,"addKeys",function(a,b,d,c,g,f,j,k){if(!(0>j)){var h=d.keySet(),h=d.keySet().toArray(Array(h.size()));java.util.Arrays.sort(h);if(g){a.append("{ ");for(var m="",r=0;r<h.length;r++){g=h[r];var x=d.get(g);k&&7==x.tok&&0==x.getList().size()||6==x.tok&&
x.getMap().isEmpty()||(f?a.append(m).append(JU.PT.esc(g)).append(":"):a.appendC(" ").append(g),JS.SV.sValueArray(a,x,b,c+"  ",!0,!1,f,j,k),m=",")}a.append(" }");f||a.append("\n")}else{a.append(c).append("{\n");c+="  ";for(r=0;r<h.length;r++)a.append(c),g=h[r],a.append(g).append("  :"),m=new JU.SB,x=d.get(g),g=JS.SV.isRawType(x.tok),JS.SV.sValueArray(m,x,b,c,g,!1,f,j,k),m=m.toString(),g&&f?a.append("  "):a.append("\n"),a.append(m).append("\n");a.append(c.substring(1)).append("}")}}},"JU.SB,~S,java.util.Map,~S,~B,~B,~N,~B");
c$.isRawType=c(c$,"isRawType",function(a){switch(a){case 4:case 3:case 2:case 8:case 9:case 10:case 15:case 1048589:case 1048588:return!0}return!1},"~N");c$.ptValue=c(c$,"ptValue",function(a){switch(a.tok){case 8:return a.value;case 4:if(a=JU.Escape.uP(a.value),p(a,JU.P3))return a}return null},"JS.SV");c$.pt4Value=c(c$,"pt4Value",function(a){switch(a.tok){case 9:return a.value;case 4:a=JU.Escape.uP(a.value);if(!p(a,JU.P4))break;return a}return null},"JS.SV");c$.toFloat=c(c$,"toFloat",function(a){return a.equalsIgnoreCase("true")?
1:0==a.length||a.equalsIgnoreCase("false")?0:JU.PT.parseFloatStrict(a)},"~S");c$.concatList=c(c$,"concatList",function(a,b,d){var c=a.getList(),g=b.getList();if(!d){if(null==g)c.addLast(JS.SV.newT(b));else for(d=0;d<g.size();d++)c.addLast(g.get(d));return a}var f=new JU.Lst;if(null==c)f.addLast(a);else for(d=0;d<c.size();d++)f.addLast(c.get(d));if(null==g)f.addLast(b);else for(d=0;d<g.size();d++)f.addLast(g.get(d));return JS.SV.getVariableList(f)},"JS.SV,JS.SV,~B");c$.bsSelectToken=c(c$,"bsSelectToken",
function(a){a=JS.SV.selectItemTok(a,-2147483648);return a.value},"JS.T");c$.bsSelectVar=c(c$,"bsSelectVar",function(a){2147483647==a.index&&(a=JS.SV.selectItemVar(a));return a.value},"JS.SV");c$.bsSelectRange=c(c$,"bsSelectRange",function(a,b){a=JS.SV.selectItemTok(a,-2147483648);a=JS.SV.selectItemTok(a,0>=b?b:1);a=JS.SV.selectItemTok(a,0>=b?2147483646:b);return a.value},"JS.T,~N");c$.selectItemVar=c(c$,"selectItemVar",function(a){return 2147483647!=a.index||(7==a.tok||15==a.tok)&&2147483647==a.intValue?
a:JS.SV.selectItemTok(a,-2147483648)},"JS.SV");c$.selectItemTok=c(c$,"selectItemTok",function(a,b){switch(a.tok){case 11:case 12:case 10:case 7:case 15:case 4:break;default:return a}var d=null,c=null,g=a.intValue,f=-2147483648==b;if(2147483647==g)return JS.SV.newSV(a.tok,f?g:b,a.value);var j=0,k=p(a,JS.SV)&&2147483647!=a.index,h=JS.SV.newSV(a.tok,2147483647,null);switch(a.tok){case 10:p(a.value,JM.BondSet)?(d=new JM.BondSet(a.value,a.value.getAssociatedAtoms()),j=JU.BSUtil.cardinalityOf(d)):(d=JU.BSUtil.copy(a.value),
j=k?1:JU.BSUtil.cardinalityOf(d));break;case 15:j=a.value.data.length;break;case 7:j=a.getList().size();break;case 4:c=a.value;j=c.length;break;case 11:j=-3;break;case 12:j=-4}if(0>j){j=-j;if(0<g&&Math.abs(g)>j)return h=g%10,g=q((g-h)/10),0<h&&h<=j&&g<=j?JS.SV.newV(3,Float.$valueOf(a.value.getElement(g-1,h-1))):JS.SV.newV(4,"");if(Math.abs(g)>j)return JS.SV.newV(4,"");d=L(j,0);0>g?a.value.getColumn(-1-g,d):a.value.getRow(g-1,d);return f?JS.SV.getVariableAF(d):1>b||b>j?JS.SV.newV(4,""):JS.SV.newV(3,
Float.$valueOf(d[b-1]))}0>=g&&(g=j+g);f||(1>g&&(g=1),0==b?b=j:0>b&&(b=j+b),b<g&&(b=g));switch(a.tok){case 10:h.value=d;if(k){1<g&&d.clearAll();break}if(f){g==j?b=d.length()-1:1==g&&(b=d.nextSetBit(0));if(-1<=b){d.clearAll();0<=b&&d.set(b);break}b=g}j=0;for(f=d.nextSetBit(0);0<=f;f=d.nextSetBit(f+1))(++j<g||j>b)&&d.clear(f);break;case 4:h.value=0>--g||g>=j?"":f?c.substring(g,g+1):c.substring(g,Math.min(b,j));break;case 7:if(0>--g||g>=j)return JS.SV.newV(4,"");if(f)return a.getList().get(g);d=new JU.Lst;
f=a.getList();c=Math.min(b,j)-g;for(j=0;j<c;j++)d.addLast(JS.SV.newT(f.get(j+g)));h.value=d;break;case 15:if(0>--g||g>=j)return JS.SV.newV(4,"");d=a.value.data;if(f)return JS.SV.newI(d[g]);f=O(Math.min(b,j)-g,0);for(j=f.length;0<=--j;)f[j]=d[g+j];h.value=new JU.BArray(f)}return h},"JS.T,~N");c(c$,"setSelectedValue",function(a,b,d){if(2147483647!=a){var c;switch(this.tok){case 11:case 12:c=11==this.tok?3:4;if(2147483647!=b){var g=a;if(0<b&&b<=c&&g<=c){this.value.setElement(g-1,b-1,JS.SV.fValue(d));
break}}if(0!=a&&(Math.abs(a)<=c&&7==d.tok)&&(d=d.getList(),d.size()==c)){g=L(c,0);for(b=0;b<c;b++)g[b]=JS.SV.fValue(d.get(b));0<a?this.value.setRowA(a-1,g):this.value.setColumnA(-1-a,g);break}break;case 4:c=this.value;g=c.length;0>=a&&(a=g+a);for(0>--a&&(a=0);a>=c.length;)c+=" ";if(2147483647==b)b=a;else for(0>--b&&(b=g+b);b>=c.length;)c+=" ";b>=a&&(this.value=c.substring(0,a)+JS.SV.sValue(d)+c.substring(++b));this.intValue=this.index=2147483647;break;case 7:c=this.getList().size();0>=a&&(a=c+a);
0>--a&&(a=0);if(c<=a)for(b=c;b<=a;b++)this.getList().addLast(JS.SV.newV(4,""));this.getList().set(a,d)}}},"~N,~N,JS.SV");c(c$,"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)}});c$.unescapePointOrBitsetAsVariable=c(c$,"unescapePointOrBitsetAsVariable",function(a){if(null==a)return a;
var b=null,d=null;if(p(a,JS.SV))switch(a.tok){case 8:case 9:case 11:case 12:case 10:b=a.value;break;case 4:d=a.value;break;default:d=JS.SV.sValue(a)}else p(a,String)&&(d=a);if(null!=d&&0==d.length)return d;null==b&&(b=JU.Escape.uABsM(d));return p(b,JU.P3)?JS.SV.newV(8,b):p(b,JU.P4)?JS.SV.newV(9,b):p(b,JU.BS)?(null!=d&&0==d.indexOf("[{")&&(b=new JM.BondSet(b)),JS.SV.newV(10,b)):p(b,JU.M34)?JS.SV.newV(p(b,JU.M3)?11:12,b):a},"~O");c$.getBoolean=c(c$,"getBoolean",function(a){return JS.SV.newT(a?JS.SV.vT:
JS.SV.vF)},"~B");c$.sprintf=c(c$,"sprintf",function(a,b){if(null==b)return a;var d=0<=a.indexOf("d")||0<=a.indexOf("i")?D(1,0):null,c=7==b.tok,g=0<=a.indexOf("f")?L(1,0):null,f=0<=a.indexOf("e")?X(1,0):null,j=0<=a.indexOf("s"),k=0<=a.indexOf("p")&&(c||8==b.tok),h=0<=a.indexOf("q")&&(c||9==b.tok),m=[d,g,f,null,null,null];if(!c)return JS.SV.sprintf(a,b,m,d,g,f,j,k,h);for(var c=b.getList(),r=Array(c.size()),x=0;x<r.length;x++)r[x]=JS.SV.sprintf(a,c.get(x),m,d,g,f,j,k,h);return r},"~S,JS.SV");c$.sprintf=
c(c$,"sprintf",function(a,b,d,c,g,f,j,k,h){null!=c&&(c[0]=JS.SV.iValue(b));null!=g&&(g[0]=JS.SV.fValue(b));null!=f&&(f[0]=JS.SV.fValue(b));j&&(d[3]=JS.SV.sValue(b));k&&(d[4]=b.value);h&&(d[5]=b.value);return JU.Txt.sprintf(a,"IFDspq",d)},"~S,JS.SV,~A,~A,~A,~A,~B,~B,~B");c$.getFormatType=c(c$,"getFormatType",function(a){return 0<=a.indexOf(";")?-1:";json;base64;bytearray;array;".indexOf(";"+a.toLowerCase()+";")},"~S");c$.format=c(c$,"format",function(a,b){switch(a.length){case 0:return"";case 1:return JS.SV.sValue(a[0]);
case 2:switch(2147483647==b&&(b=JS.SV.getFormatType(a[0].asString())),b){case 0:return a[1].toJSON();case 5:case 12:case 22:var d;switch(a[1].tok){case 15:d=JU.AU.arrayCopyByte(a[1].value.data,-1);break;case 7:var c=a[1].getList();if(22==b){d=new JU.Lst;for(var g=c.size();0<=--g;)d.addLast(c.get(g));return d}d=O(c.size(),0);for(g=d.length;0<=--g;)d[g]=c.get(g).asInt();break;default:if(g=a[1].asString(),g.startsWith(";base64,")){if(5==b)return g;d=JU.Base64.decodeBase64(g)}else d=g.getBytes()}return 22==
b?JS.SV.getVariable(d):12==b?new JU.BArray(d):";base64,"+JU.Base64.getBase64(d).toString()}}c=new JU.SB;d=JU.PT.split(JU.PT.rep(JS.SV.sValue(a[0]),"%%","\u0001"),"%");c.append(d[0]);for(g=1;g<d.length;g++){var f=JS.SV.sprintf(JU.Txt.formatCheck("%"+d[g]),g<a.length?a[g]:null);if(JU.PT.isAS(f))for(var j=0;j<f.length;j++)c.append(f[j]).append("\n");else c.append(f)}return c.toString()},"~A,~N");c$.getBitSet=c(c$,"getBitSet",function(a,b){switch(a.tok){case 10:return JS.SV.bsSelectVar(a);case 7:for(var d=
new JU.BS,c=a.value,g=0;g<c.size();g++)if(!c.get(g).unEscapeBitSetArray(d)&&b)return null;return d}return b?null:new JU.BS},"JS.SV,~B");c$.areEqual=c(c$,"areEqual",function(a,b){if(null==a||null==b)return!1;if(a.tok==b.tok)switch(a.tok){case 4:return a.value.equalsIgnoreCase(b.value);case 10:case 15:case 6:case 7:case 14:return a.equals(b);case 8:return 1E-6>a.value.distance(b.value);case 9:return 1E-6>a.value.distance4(b.value)}return 1E-6>Math.abs(JS.SV.fValue(a)-JS.SV.fValue(b))},"JS.SV,JS.SV");
c$.isLike=c(c$,"isLike",function(a,b){return null!=a&&null!=b&&4==a.tok&&4==b.tok&&JU.PT.isLike(a.value,b.value)},"JS.SV,JS.SV");c(c$,"sortOrReverse",function(a){var b=this.getList();if(null!=b&&1<b.size())if(-2147483648==a){a=b.size();for(var d=0;d<a;d++){var c=b.get(d);b.set(d,b.get(--a));b.set(a,c)}}else java.util.Collections.sort(this.getList(),M(JS.SV.Sort,this,null,--a));return this},"~N");c(c$,"pushPop",function(a,b){if(null!=b){var d=this.getMap();if(null==a){var c;return null==d||null==(c=
d.remove(b.asString()))?JS.SV.newS(""):c}null!=d&&d.put(b.asString(),JS.SV.newI(0).setv(a))}else{d=this.getList();if(null==a||null==d)return null==d||0==d.size()?JS.SV.newS(""):d.remove(d.size()-1);d.addLast(JS.SV.newI(0).setv(a))}return this},"JS.SV,JS.SV");c(c$,"unEscapeBitSetArray",function(a){switch(this.tok){case 4:var b=JU.BS.unescape(this.value);if(null==b)break;a.or(b);return!0;case 10:return a.or(this.value),!0}return!1},"JU.BS");c$.unEscapeBitSetArray=c(c$,"unEscapeBitSetArray",function(a,
b){for(var d=new JU.BS,c=0;c<a.size();c++)if(!a.get(c).unEscapeBitSetArray(d)&&b)return null;return d},"java.util.ArrayList,~B");c$.strListValue=c(c$,"strListValue",function(a){if(7!=a.tok)return[JS.SV.sValue(a)];a=a.getList();for(var b=Array(a.size()),d=a.size();0<=--d;)b[d]=JS.SV.sValue(a.get(d));return b},"JS.T");c$.flistValue=c(c$,"flistValue",function(a,b){if(7!=a.tok)return[JS.SV.fValue(a)];var d=a.getList(),c;c=L(Math.max(b,d.size()),0);0==b&&(b=c.length);for(var g=Math.min(d.size(),b);0<=
--g;)c[g]=JS.SV.fValue(d.get(g));return c},"JS.T,~N");c(c$,"toArray",function(){var a,b=null,d=null;switch(this.tok){case 11:b=this.value;a=3;break;case 12:d=this.value;a=4;break;default:return}this.tok=7;for(var c=new JU.Lst,g=0;g<a;g++){var f=L(a,0);null==b?d.getRow(g,f):b.getRow(g,f);c.addLast(JS.SV.getVariableAF(f))}this.value=c});c(c$,"mapValue",function(a){switch(this.tok){case 6:return this.value.get(a);case 14:var b=this.value;return a.equals("_path")?JS.SV.newS(b.contextPath):b.getVariable(a)}return null},
"~S");c(c$,"getList",function(){return 7==this.tok?this.value:null});c$.isScalar=c(c$,"isScalar",function(a){switch(a.tok){case 7:return!1;case 4:return 0>a.value.indexOf("\n");default:return!0}},"JS.SV");h(c$,"toJSON",function(){switch(this.tok){case 1048589:case 1048588: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());default:return JU.PT.toJSON(null,this.value)}});c(c$,"mapPut",function(a,b){this.getMap().put(a,
b)},"~S,JS.SV");c(c$,"mapGet",function(a){return 6==this.tok?this.value.get(a):JS.SV.newS("")},"~S");c(c$,"getMap",function(){switch(this.tok){case 6:return this.value;case 14:return this.value.vars}return null});h(c$,"toString",function(){return this.toString2()+"["+this.myName+" index ="+this.index+" intValue="+this.intValue+"]"});c(c$,"getMapKeys",function(a,b){if(6!=this.tok)return"";var d=new JU.SB;JS.SV.sValueArray(d,this,"","",!0,!1,!1,a+1,b);return d.toString()},"~N,~B");c$.$SV$Sort$=function(){G(self.c$);
c$=t(function(){Q(this,arguments);this.arrayPt=0;s(this,arguments)},JS.SV,"Sort",null,java.util.Comparator);u(c$,function(a){this.arrayPt=a},"~N");h(c$,"compare",function(a,b){if(a.tok!=b.tok){if(3==a.tok||2==a.tok||3==b.tok||2==b.tok){var d=JS.SV.fValue(a),c=JS.SV.fValue(b);return d<c?-1:d>c?1:0}if(4==a.tok||4==b.tok)return JS.SV.sValue(a).compareTo(JS.SV.sValue(b))}switch(a.tok){case 4:return JS.SV.sValue(a).compareTo(JS.SV.sValue(b));case 7:d=a.getList();c=b.getList();if(d.size()!=c.size())return d.size()<
c.size()?-1:1;var g=this.arrayPt;0>g&&(g+=d.size());return 0>g||g>=d.size()?0:this.compare(d.get(g),c.get(g));default:return d=JS.SV.fValue(a),c=JS.SV.fValue(b),d<c?-1:d>c?1:0}},"JS.SV,JS.SV");c$=F()};c$.vT=c$.prototype.vT=JS.SV.newSV(1048589,1,"true");c$.vF=c$.prototype.vF=JS.SV.newSV(1048588,0,"false");C(c$,"FLAG_CANINCREMENT",1,"FLAG_MODIFIED",2);c$.pt0=c$.prototype.pt0=new JU.P3});n("JS");w(["java.util.Hashtable"],"JS.T",["java.lang.Boolean","java.util.Arrays","JU.AU","$.Lst","JU.Logger"],function(){c$=
t(function(){this.tok=0;this.value=null;this.intValue=2147483647;s(this,arguments)},JS,"T");c$.t=c(c$,"t",function(a){var b=new JS.T;b.tok=a;return b},"~N");c$.tv=c(c$,"tv",function(a,b,d){a=JS.T.t(a);a.intValue=b;a.value=d;return a},"~N,~N,~O");c$.o=c(c$,"o",function(a,b){var d=JS.T.t(a);d.value=b;return d},"~N,~O");c$.n=c(c$,"n",function(a,b){var d=JS.T.t(a);d.intValue=b;return d},"~N,~N");c$.i=c(c$,"i",function(a){var b=JS.T.t(2);b.intValue=a;return b},"~N");c$.tokAttr=c(c$,"tokAttr",function(a,
b){return(a&b)==(b&b)},"~N,~N");c$.tokAttrOr=c(c$,"tokAttrOr",function(a,b,d){return(a&b)==(b&b)||(a&d)==(d&d)},"~N,~N,~N");c$.getPrecedence=c(c$,"getPrecedence",function(a){return a>>4&15},"~N");c$.getMaxMathParams=c(c$,"getMaxMathParams",function(a){return a>>9&3},"~N");c$.addToken=c(c$,"addToken",function(a,b){JS.T.tokenMap.put(a,b)},"~S,JS.T");c$.getTokenFromName=c(c$,"getTokenFromName",function(a){null==a&&System.out.println("???");return JS.T.tokenMap.get(a)},"~S");c$.getTokFromName=c(c$,"getTokFromName",
function(a){a=JS.T.getTokenFromName(a.toLowerCase());return null==a?0:a.tok},"~S");c$.nameOf=c(c$,"nameOf",function(a){for(var b,d=JS.T.tokenMap.values().iterator();d.hasNext()&&((b=d.next())||1);)if(b.tok==a)return""+b.value;return"0x"+Integer.toHexString(a)},"~N");h(c$,"toString",function(){return this.toString2()});c(c$,"toString2",function(){return"Token["+JS.T.astrType[16>this.tok?this.tok:16]+"("+this.tok%512+"/0x"+Integer.toHexString(this.tok)+")"+(2147483647==this.intValue?"":" intValue="+
this.intValue+"(0x"+Integer.toHexString(this.intValue)+")")+(null==this.value?"":p(this.value,String)?' value="'+this.value+'"':" value="+this.value)+"]"});c$.getCommandSet=c(c$,"getCommandSet",function(a){var b="",d=new java.util.Hashtable,c=0;a=null==a||0==a.length?null:a.toLowerCase();for(var e=null!=a&&1<a.length,f,g=JS.T.tokenMap.entrySet().iterator();g.hasNext()&&((f=g.next())||1);){var j=f.getKey(),k=f.getValue();0!=(k.tok&4096)&&((null==a||0==j.indexOf(a))&&(e||k.value.equals(j)))&&d.put(j,
Boolean.TRUE)}for(g=d.entrySet().iterator();g.hasNext()&&((f=g.next())||1);)if(j=f.getKey(),"s"!=j.charAt(j.length-1)||!d.containsKey(j.substring(0,j.length-1)))b+=(0==c++?"":";")+j;return b},"~S");c$.getAtomPropertiesLike=c(c$,"getAtomPropertiesLike",function(a){a=a.toLowerCase();for(var b=new JU.Lst,d=0==a.length,c,e=JS.T.tokenMap.entrySet().iterator();e.hasNext()&&((c=e.next())||1);){var f=c.getKey();if("_"!=f.charAt(0)){var g=c.getValue();if(JS.T.tokAttr(g.tok,1078984704)&&(d||f.toLowerCase().startsWith(a))){if(d||
!g.value.toLowerCase().startsWith(a))g=JS.T.o(g.tok,f);b.addLast(g)}}}return 0==b.size()?null:b},"~S");c$.getTokensLike=c(c$,"getTokensLike",function(a){a=a.equals("setparam")?536870912:a.equals("misc")?1073741824:a.equals("mathfunc")?135266304:4096;for(var b=536870912==a?1610612736:0,d=new JU.Lst,c,e=JS.T.tokenMap.entrySet().iterator();e.hasNext()&&((c=e.next())||1);){var f=c.getKey(),g=c.getValue();JS.T.tokAttr(g.tok,a)&&(0==b||!JS.T.tokAttr(g.tok,b))&&d.addLast(f)}c=d.toArray(Array(d.size()));
java.util.Arrays.sort(c);return c},"~S");c$.getSettableTokFromString=c(c$,"getSettableTokFromString",function(a){a=JS.T.getTokFromName(a);return 0!=a&&JS.T.tokAttr(a,2048)&&!JS.T.tokAttr(a,1141899264)?a:0},"~S");c$.completeCommand=c(c$,"completeCommand",function(a,b,d,c,e){null==a?a=JS.T.tokenMap:d=!1;var f=new JU.Lst;c=c.toLowerCase();var g;for(a=a.keySet().iterator();a.hasNext()&&((g=a.next())||1);)if(g.startsWith(c)){var j=JS.T.getTokFromName(g);(d?JS.T.tokAttr(j,4096):b?JS.T.tokAttr(j,536870912)&&
!JS.T.tokAttr(j,1610612736):1)&&f.addLast(g)}return JU.AU.sortedItem(f,e)},"java.util.Map,~B,~B,~S,~N");c$.getParamType=c(c$,"getParamType",function(a){return!JS.T.tokAttr(a,536870912)?0:a&662700032},"~N");c$.getTokensType=c(c$,"getTokensType",function(a,b){for(var d,c=JS.T.tokenMap.entrySet().iterator();c.hasNext()&&((d=c.next())||1);){var e=d.getValue();JS.T.tokAttr(e.tok,b)&&a.put(d.getKey(),d.getValue())}},"java.util.Map,~N");c$.isIDcmd=c(c$,"isIDcmd",function(a){switch(a){case 135180:case 135176:case 135174:case 135188:case 135402505:return!0;
default:return!1}},"~N");c(c$,"equals",function(a){if(!p(a,JS.T))return!1;if(this.tok==a.tok)return a.intValue==this.intValue&&(2==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");C(c$,"astrType",null);JS.T.astrType="nada identifier integer decimal string seqcode hash array point point4 bitset matrix3f matrix4f array hash bytearray keyword".$plit(" ");
C(c$);c$.tokenSpaceBeforeSquare=c$.prototype.tokenSpaceBeforeSquare=JS.T.o(1073742195," ");c$.tokenOn=c$.prototype.tokenOn=JS.T.tv(1048589,1,"on");c$.tokenOff=c$.prototype.tokenOff=JS.T.tv(1048588,0,"off");c$.tokenAll=c$.prototype.tokenAll=JS.T.o(1048579,"all");c$.tokenIf=c$.prototype.tokenIf=JS.T.o(135369225,"if");c$.tokenAnd=
c$.prototype.tokenAnd=JS.T.o(269484128,"and");c$.tokenAndSpec=c$.prototype.tokenAndSpec=JS.T.o(269484160,"");c$.tokenOr=c$.prototype.tokenOr=JS.T.o(269484112,"or");c$.tokenAndFALSE=c$.prototype.tokenAndFALSE=JS.T.o(269484128,"and");c$.tokenOrTRUE=c$.prototype.tokenOrTRUE=JS.T.o(269484112,"or");c$.tokenOpIf=c$.prototype.tokenOpIf=JS.T.o(806354977,"?");c$.tokenComma=c$.prototype.tokenComma=JS.T.o(269484080,",");c$.tokenDefineString=c$.prototype.tokenDefineString=JS.T.tv(1060866,4,"@");c$.tokenPlus=
c$.prototype.tokenPlus=JS.T.o(269484193,"+");c$.tokenMinus=c$.prototype.tokenMinus=JS.T.o(269484192,"-");c$.tokenMul3=c$.prototype.tokenMul3=JS.T.o(1276117508,"mul3");c$.tokenTimes=c$.prototype.tokenTimes=JS.T.o(269484209,"*");c$.tokenDivide=c$.prototype.tokenDivide=JS.T.o(269484208,"/");c$.tokenLeftParen=c$.prototype.tokenLeftParen=JS.T.o(269484048,"(");c$.tokenRightParen=c$.prototype.tokenRightParen=JS.T.o(269484049,")");c$.tokenArraySquare=c$.prototype.tokenArraySquare=JS.T.o(135266306,"[");c$.tokenArraySelector=
c$.prototype.tokenArraySelector=JS.T.o(269484096,"[");c$.tokenExpressionBegin=c$.prototype.tokenExpressionBegin=JS.T.o(1048577,"expressionBegin");c$.tokenExpressionEnd=c$.prototype.tokenExpressionEnd=JS.T.o(1048578,"expressionEnd");c$.tokenConnected=c$.prototype.tokenConnected=JS.T.o(135266310,"connected");c$.tokenCoordinateBegin=c$.prototype.tokenCoordinateBegin=JS.T.o(1048586,"{");c$.tokenRightBrace=c$.prototype.tokenRightBrace=JS.T.o(1048590,"}");c$.tokenCoordinateEnd=c$.prototype.tokenCoordinateEnd=
JS.T.tokenRightBrace;c$.tokenColon=c$.prototype.tokenColon=JS.T.o(269484066,":");c$.tokenSetCmd=c$.prototype.tokenSetCmd=JS.T.o(1085443,"set");c$.tokenSet=c$.prototype.tokenSet=JS.T.tv(1085443,61,"");c$.tokenSetArray=c$.prototype.tokenSetArray=JS.T.tv(1085443,91,"");c$.tokenSetProperty=c$.prototype.tokenSetProperty=JS.T.tv(1085443,46,"");c$.tokenSetVar=c$.prototype.tokenSetVar=JS.T.tv(36868,61,"var");c$.tokenEquals=c$.prototype.tokenEquals=JS.T.o(269484436,"=");c$.tokenScript=c$.prototype.tokenScript=
JS.T.o(135271429,"script");c$.tokenSwitch=c$.prototype.tokenSwitch=JS.T.o(102410,"switch");c$.tokenMap=c$.prototype.tokenMap=new java.util.Hashtable;for(var a=["(",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],b,d=null,e,g,f=a.length-1,j=0;j<f;j+=2)e=a[j],g=e.toLowerCase(),b=a[j+1],null==b?b=d:null==b.value&&(b.value=e),JS.T.tokenMap.put(g,b),d=b;var a=null,a="+= -= *= /= \\= &= |= not ! xor tog < <= >= > != <> LIKE 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 measure measures monitor monitors meshribbon meshribbons message minimize minimization mo model models modulation move moveTo navigate navigation origin out parallel pause wait plot plot3d pmesh polygon polyhedra 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 synchronize sync trace translate translateSelected try unbind unitcell var vector vectors vibration while wireframe write zap zoom zoomTo atom atoms axis axisangle basepair basepairs orientation orientations pdbheader polymer polymers residue residues rotation row sequence shape state symbol symmetry spaceGroup transform translation url abs absolute acos add adpmax adpmin align altloc altlocs ambientOcclusion amino angle array as atomID _atomID _a atomIndex atomName atomno atomType atomX atomY atomZ average babel babel21 back backlit balls baseModel best bin bondCount bottom branch brillouin bzone wignerSeitz 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 groupID _groupID _g groupIndex hidden highlight hkl hydrophobicity hydrophobic hydro id identify ident image info 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 molecule molecules modelIndex monomer morph movie mouse mul mul3 nci next noDots noFill noMesh none null inherit normal noContourLines nonequivalent notFrontOnly noTriangles now nucleic occupancy omega only opaque options partialCharge phi 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 RNA rock rubberband saSurface saved scale scene search smarts selected seqid shapely sidechain sin site size smiles substructure solid sort specialPosition sqrt split starWidth starScale stddev straightness structureId supercell sub sum sum2 surface surfaceDistance symop sx sy sz sxyz temperature relativeTemperature tensor theta thisModel ticks top torsion trajectory trajectories translucent triangles trim type ux uy uz uxyz user valence vanderWaals vdw vdwRadius visible volume vx vy vz vxyz xyz w x y z addHydrogens allConnected angstroms anisotropy append arc area aromatic arrow auto barb binary blockData cancel cap cavity centroid check chemical circle collapsed col colorScheme command commands contour contours corners count criterion create crossed curve cutoff cylinder diameter discrete distanceFactor downsample drawing eccentricity ed edges energy exitJmol faceCenterOffset filter first fixed fix flat fps from frontEdges full fullPlane functionXY functionXYZ gridPoints homo ignore InChI InChIKey increment insideout interior intersection intersect internal lattice line lineData link lobe lonePair lp lumo manifest mapProperty map 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 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 backgroundModel celShading celShadingPower debug defaultLattice measurements measurement scale3D toggleLabel userColorScheme throw timeout timeouts animationMode appletProxy atomTypes axesColor axis1Color axis2Color axis3Color backgroundColor bondmode boundBoxColor boundingBoxColor currentLocalPath dataSeparator defaultAngleLabel defaultColorScheme defaultColors defaultDirectory defaultDistanceLabel defaultDropScript defaultLabelPDB defaultLabelXYZ defaultLoadFilter defaultLoadScript defaults defaultTorsionLabel defaultVDW drawFontSize edsUrlCutoff edsUrlFormat energyUnits fileCacheDirectory fontsize helpPath hoverLabel language loadFormat loadLigandFormat logFile measurementUnits nmrPredictFormat nmrUrlFormat pathForAllFiles picking pickingStyle pickLabel platformSpeed propertyColorScheme quaternionFrame smilesUrlFormat smiles2dImageFormat unitCellColor axesScale axisScale bondTolerance cameraDepth defaultDrawArrowScale defaultTranslucent dipoleScale ellipsoidAxisDiameter gestureSwipeFactor hbondsAngleMinimum hbondsDistanceMaximum hoverDelay loadAtomDataTolerance minBondDistance minimizationCriterion 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 vibrationPeriod vibrationScale visualRange ambientPercent ambient animationFps axesMode bondRadiusMilliAngstroms bondingVersion delayMaximumMs diffusePercent diffuse dotDensity dotScale ellipsoidDotCount helixStep hermiteLevel historyLevel lighting logLevel meshScale minimizationSteps minPixelSelRadius percentVdwAtom perspectiveModel phongExponent pickingSpinRate propertyAtomNumberField propertyAtomNumberColumnCount propertyDataColumnCount propertyDataField repaintWaitMs ribbonAspectRatio 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 autobond autoFPS axesMolecular axesOrientationRasmol axesUnitCell axesWindow backboneSteps bondModeOr bondPicking bonds bond cartoonBaseEdges cartoonsFancy cartoonFancy cartoonLadders cartoonRibose cartoonRockets chainCaseSensitive colorRasmol debugScript defaultStructureDssp disablePopupMenu displayCellParameters dotsSelectedOnly dotSurface dragSelected drawHover drawPicking dsspCalculateHydrogenAlways 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 justifyMeasurements languageTranslation leadAtom leadAtoms legacyAutoBonding legacyHAddition logCommands logGestures measureAllModels measurementLabels measurementNumbers messageStyleChime minimizationRefresh minimizationSilent modelkitMode monitorEnergy multipleBondRadiusFactor multipleBondSpacing multiProcessor navigateSurface navigationMode navigationPeriodic partialDots pdbAddHydrogens pdbGetHeader pdbSequential perspectiveDepth preserveState rangeSelected redoMove refreshing ribbonBorder rocketBarrels saveProteinStructureState scriptQueue selectAllModels selectHetero selectHydrogen showAxes showBoundBox showBoundingBox showFrank showHiddenSelectionHalos showHydrogens showKeyStrokes showMeasurements showMultipleBonds showNavigationPointAlways showTiming showUnitcell showUnitcellDetails showUnitcellInfo slabByAtom slabByMolecule slabEnabled smartAromatic solvent solventProbe ssBondsBackbone statusReporting strutsMultiple syncMouse syncScript testFlag1 testFlag2 testFlag3 testFlag4 traceAlpha twistedSheets undo undoMove useMinimizationThread useNumberLocalization waitForMoveTo windowCentered wireframeRotation zeroBasedXyzRasmol zoomEnabled zoomHeight zoomLarge zShade".split(" "),
k=[269484242,-1,-1,-1,-1,-1,-1,269484144,-1,269484113,269484114,269484435,269484434,269484433,269484432,269484437,-1,269484438,135266325,1048583,1048584,269484096,269484097,1048586,1048590,1048582,269484210,1048591,269484226,269484225,269484227,269484211,4097,-1,4098,1611272194,1115297793,1610616835,4100,4101,1679429641,-1,102407,4102,4103,1113200642,-1,102411,102412,1069064,12289,-1,4105,135174,1766856708,-1,135270405,1095766024,-1,-1,4106,528395,135402505,-1,102408,135270408,102413,1060866,-1,528397,
12291,1073741914,554176526,135175,-1,1610625028,1276117505,1113198595,135176,537022465,1113198596,-1,364547,102402,1150985,364548,266255,135266829,1229984263,-1,4114,135369224,1288701959,4115,-1,1611272202,135368713,-1,1113198597,1276121098,20500,1113200646,-1,137363467,3145735,3145736,3145738,1612189718,-1,20482,12294,1610616855,544771,135369225,1276116993,266264,4121,135180,135287308,1826248716,-1,135182,-1,135271426,36869,528410,1746538509,-1,-1,-1,1113200647,-1,20485,4126,-1,1183762,1095766030,
-1,1276121113,4128,4130,4131,-1,1073742078,1073742079,102436,20487,-1,4133,135190,135188,1073742106,135192,36865,102439,135304707,135270418,-1,266281,1052714,-1,266284,4141,-1,4142,12295,36866,1113200649,-1,1113200650,-1,528432,4145,4146,135280132,1611141171,-1,-1,3145760,135270926,554176565,1113200651,-1,1611141175,1611141176,-1,1113200652,-1,266298,-1,528443,1650071565,-1,1641025539,-1,1095761942,1708058,-1,3158024,4156,-1,1113200654,4160,4162,364558,4164,1614417948,36868,135198,-1,4166,102406,
659488,135270422,1060873,4168,4170,1141899265,-1,1073741854,135266307,1073741864,-1,1073742077,-1,1073742088,1095761937,-1,1073742120,-1,1073742132,1276117515,1087373320,1087373323,1073742158,1087375373,1089470478,1073742152,1073742176,1073742178,1074790760,135266826,1073741826,135266819,1276118017,1112539137,1112539138,1073741832,1087373315,-1,553648129,3145730,135266305,135266306,1073741848,1095761922,-1,-1,1095761923,1087375362,1095763969,1087375361,1112541185,1112541186,1112541187,96,1073741856,
1073741858,1073741859,1073741862,1073741860,3145776,1073741863,1276118529,1095761924,1073741871,1048580,1073741872,-1,-1,135270423,3145764,1095761925,1087373316,-1,1095761927,1112539139,-1,1073741881,1073741882,3145766,1073741884,135266310,14,1073741894,1073741898,1048581,-1,-1,135266821,135267329,1112539140,-1,1073741918,1073741922,3145768,1276118018,1276117504,3145732,1073741925,1073741926,1073741915,1073741916,1087375365,1095763978,1095761929,1073741935,570425358,1073741938,1276118531,1073741946,
545259560,1632634891,-1,1112539141,1073741954,1073741958,1073741960,1073741964,1112541188,1112541189,1112541190,1146095627,1112541191,1112541192,1112541193,1146095629,1087373318,-1,1087373319,1095761932,-1,-1,1095761933,3145770,536870920,135267841,1114638362,-1,-1,1074790550,1087373321,-1,1073741979,1073741982,1073741983,1087373322,-1,1073741989,-1,1073741990,-1,1112541195,-1,-1,1048585,1073741991,1073741992,1276117506,1141899281,1073741993,1073741996,1141899267,1141899268,1073742001,1112539142,-1,
1112539143,64,1073742016,1073742018,1073742019,32,1073742022,1073742024,1073742025,1073742026,1095761936,-1,1095761935,1073742029,1073742030,1073742032,1073742031,1276117507,1276117508,1073742036,1073742037,1073742042,1073742046,1073742052,1048587,-1,-1,1073742056,1073742039,3145778,1073742058,1073742060,135266318,3145742,1129318401,1112539144,1073742072,1073742074,1073742075,1112541196,1112539145,135266319,-1,1073742096,1073742098,135266320,-1,1073742102,1095761938,1276383249,1073742108,-1,1073742109,
1716520985,-1,3145744,1112539146,3145746,1276384259,1073742110,3145748,135267332,1073742114,1073742116,1276120578,1095761939,4143,1073742126,1141899269,1073742128,3145750,1073742129,1073742134,1073742135,1073742136,1073742138,1073742139,135267335,-1,1114638363,1095761940,1073742144,3145754,135266820,1095761941,1141899270,135267336,1238369286,1073742150,1276117011,3145772,135266822,1276117510,570425403,-1,192,1112539150,1087373324,1073742163,1276117511,128,160,3145756,1112539151,1297090050,1112539147,
1112539148,1112539149,1146095628,1112541199,-1,1276117016,1112539152,3145758,1073742164,1074790748,1073742174,536870926,-1,603979967,1073742182,1276117512,1141899272,1112539153,1112539154,1112539155,1146093582,1073742186,1095763991,1649412120,-1,-1,3145774,1313866249,1112541202,1112541203,1112541204,1146095631,1146095626,1141899280,1112541205,1112541206,1112541207,1073741828,1073741834,1073741836,1073741837,1073741839,1074790416,1073741842,1076887572,1073741846,1073741852,1073741861,1073741866,1073741868,
1073741874,1074790451,1073741876,1095761926,1073741878,1073741879,1073741880,1073741886,1276117514,1073741888,1073741890,1073741892,1073741896,1073741900,1073741902,1276117012,1073741905,1073741904,1073741906,1073741908,1073741910,1073741912,1073741917,1073741920,1073741924,1073741928,1073741929,1073741930,1074790508,1073741933,1073741934,266256,1073741937,1073741940,1073741942,1060869,-1,1073741948,1074790526,1073741952,1073741956,1073741961,1073741962,1073741966,1073741968,1073741970,1073741973,
1073741976,1073741977,1073741978,1073741981,1073741984,1073741986,135267842,-1,1073741988,1073741994,1073741998,1073742E3,1073741999,1073742002,1073742004,1073742006,1073742008,1073742010,1052700,-1,1073742014,1073742015,1073742020,1073742027,1073742028,1073742033,1073742034,1073742035,1073742038,1073742040,1073742041,1073742044,1073742048,1073742050,1073742054,1073742064,1073742062,1073742066,1073742068,1073742070,1073742076,1073741850,1073742080,1073742082,1073742083,1073742084,1074790662,1073742090,
-1,1073742092,-1,1073742094,1073742100,1073742104,1073742112,1073742111,1073742118,1073742119,1073742122,1073742124,1073742130,1073742140,1073742146,1073742147,1073742148,1073742154,1073742156,1073742159,1073742160,1073742162,1073742166,1073742168,1074790746,1073742189,1073742188,1073742190,1073742192,1073742194,1073742196,536870914,603979822,553648137,536870916,536870918,537006096,-1,1610612740,1610612741,536870930,36870,536875070,-1,545259521,545259522,545259524,545259526,545259528,545259530,545259532,
545259534,1610612737,545259536,-1,545259538,545259540,545259542,545259545,-1,545259546,545259547,545259548,545259543,545259544,545259549,545259550,545259552,545259554,545259555,570425356,545259556,545259557,545259558,545259559,1610612738,545259561,545259562,545259564,545259565,545259566,545259567,545259568,545259569,545259570,545259571,545259572,545259574,545259576,553648158,545259578,545259580,545259582,545259584,545259586,570425346,-1,570425348,570425350,570425352,570425354,570425355,570425357,
570425359,570425360,570425361,570425362,570425363,570425364,570425365,570425366,570425367,570425368,570425371,570425372,570425373,570425374,570425376,570425378,570425380,570425381,570425382,570425384,1666189314,570425388,570425390,570425392,570425393,570425394,570425396,570425398,570425400,570425402,570425404,570425406,570425408,1649410049,603979972,603979973,570425412,570425414,570425416,553648130,-1,553648132,553648134,553648136,553648138,553648140,553648142,-1,553648143,553648144,553648145,553648146,
553648147,553648148,1073741995,553648150,553648151,553648152,553648153,553648154,553648155,553648156,553648157,553648159,553648160,553648162,553648164,553648165,553648166,553648168,536870922,553648170,536870924,553648172,553648174,-1,553648176,-1,553648178,553648180,553648182,553648184,553648186,553648188,553648190,603979778,603979780,603979781,603979782,603979783,603979784,603979785,603979786,603979788,603979790,603979792,603979794,603979796,603979798,603979800,603979804,603979806,603979808,603979810,
603979811,603979812,603979814,1678770178,-1,603979816,603979817,-1,603979818,603979819,603979820,603979823,603979824,603979825,603979826,603979827,603979828,603979829,603979830,603979831,603979832,603979833,603979834,603979836,603979837,603979838,603979839,603979840,603979841,603979842,603979844,603979845,603979846,603979848,603979850,603979852,603979853,603979854,1613758470,603979858,603979860,603979862,603979864,1613758476,-1,603979868,603979869,603979870,603979871,553648149,603979872,603979873,
3145741,-1,603979874,603979875,603979876,603979877,603979878,603979879,1610612739,603979880,603979881,603979882,603979883,603979884,570425369,570425370,603979885,603979886,603979887,603979888,603979889,603979890,603979891,603979892,603979893,603979894,603979895,4139,603979896,603979898,603979900,603979902,603979904,603979906,603979908,603979910,603979914,603979916,-1,603979918,603979920,603979922,603979924,603979926,603979928,603979930,603979934,603979936,603979937,603979938,603979939,603979940,603979942,
603979944,1613758488,603979948,603979952,603979954,603979955,603979956,603979958,603979960,603979962,603979964,603979965,603979966,603979968,536870928,4165,603979970,603979971,603979974,603979975,603979976,603979978,603979980,603979982,603979983,603979984];a.length!=k.length&&JU.Logger.error("sTokens.length ("+a.length+") != iTokens.length! ("+k.length+")");f=a.length;for(j=0;j<f;j++)e=a[j],g=e.toLowerCase(),b=k[j],b=d=-1==b?d:JS.T.o(b,e),null!=JS.T.tokenMap.get(g)&&JU.Logger.error("duplicate token definition:"+
g),JS.T.tokenMap.put(g,b);k=a=null});n("J.shape");w(["J.shape.Shape"],"J.shape.AtomShape","JU.AU $.BS J.atomdata.RadiusData J.c.PAL $.VDW JU.BSUtil $.C".split(" "),function(){c$=t(function(){this.mad=-1;this.paletteIDs=this.colixes=this.mads=null;this.ac=0;this.atoms=null;this.isActive=!1;this.monomerCount=0;this.rd=this.bsSizeDefault=null;s(this,arguments)},J.shape,"AtomShape",J.shape.Shape);c(c$,"getMonomers",function(){return null});h(c$,"initModelSet",function(){this.atoms=this.ms.at;this.ac=
this.ms.getAtomCount();null!=this.mads&&(this.mads=JU.AU.arrayCopyShort(this.mads,this.ac));null!=this.colixes&&(this.colixes=JU.AU.arrayCopyShort(this.colixes,this.ac));null!=this.paletteIDs&&(this.paletteIDs=JU.AU.arrayCopyByte(this.paletteIDs,this.ac))});h(c$,"getSize",function(a){return null==this.mads?0:this.mads[a]},"~N");h(c$,"setSize",function(a,b){this.setSize2(a,b)},"~N,JU.BS");c(c$,"setSize2",function(a,b){0==a?this.setSizeRD(null,b):(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,b))},"~N,JU.BS");h(c$,"setSizeRD",function(a,b){if(null!=this.atoms){this.isActive=!0;null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS);var d=null!=a&&0!=a.value,c=null==b,g=c?this.ac-1:b.nextSetBit(0);null==this.mads&&0<=g&&(this.mads=T(this.ac,0));for(;0<=g;g=c?g-1:b.nextSetBit(g+1))this.setSizeRD2(g,a,d)}},"J.atomdata.RadiusData,JU.BS");c(c$,"setSizeRD2",function(a,b,d){var c=this.atoms[a];this.mads[a]=c.calculateMad(this.vwr,
b);this.bsSizeSet.setBitTo(a,d);this.setShapeVisibility(c,d)},"~N,J.atomdata.RadiusData,~B");c(c$,"setPropAS",function(a,b,d){if("color"===a){this.isActive=!0;var c=JU.C.getColixO(b);a=J.c.PAL.pidOf(b);null==this.bsColixSet&&(this.bsColixSet=new JU.BS);for(b=d.nextSetBit(0);0<=b;b=d.nextSetBit(b+1))this.setColixAndPalette(c,a,b)}else if("params"===a){this.isActive=!0;a=b[0];var g=b[1],f=b[2],j=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);b=d.nextSetBit(0);null==this.mads&&0<=b&&(this.mads=T(this.ac,0));for(var k=0;0<=b;b=d.nextSetBit(b+1),k++){c=null==a?0:a[k];0==c&&(c=0);var h=null==g?0:g[k];0.01<h&&(c=JU.C.getColixTranslucent3(c,!0,h));this.setColixAndPalette(c,J.c.PAL.UNKNOWN.id,b);null!=f&&(c=0<(j.value=f[k]),this.setSizeRD2(b,j,c))}}else if("translucency"===a){this.isActive=!0;a=b.equals("translucent");null==this.bsColixSet&&(this.bsColixSet=new JU.BS);
for(b=d.nextSetBit(0);0<=b;b=d.nextSetBit(b+1))null==this.colixes&&(this.colixes=T(this.ac,0),this.paletteIDs=O(this.ac,0)),this.colixes[b]=JU.C.getColixTranslucent3(this.colixes[b],a,this.translucentLevel),a&&this.bsColixSet.set(b)}else"deleteModelAtoms"===a?(this.atoms=b[1],a=b[2],this.ac=this.ms.getAtomCount(),b=a[1],a=a[2],this.mads=JU.AU.deleteElements(this.mads,b,a),this.colixes=JU.AU.deleteElements(this.colixes,b,a),this.paletteIDs=JU.AU.deleteElements(this.paletteIDs,b,a),JU.BSUtil.deleteBits(this.bsSizeSet,
d),JU.BSUtil.deleteBits(this.bsColixSet,d)):this.setPropS(a,b,d)},"~S,~O,JU.BS");c(c$,"setColixAndPalette",function(a,b,d){if(null==this.colixes||d>=this.colixes.length){if(0==a)return;this.colixes=JU.AU.ensureLengthShort(this.colixes,d+1);this.paletteIDs=JU.AU.ensureLengthByte(this.paletteIDs,d+1)}null==this.bsColixSet&&(this.bsColixSet=JU.BS.newN(this.ac));this.colixes[d]=a=this.getColixI(a,b,d);this.bsColixSet.setBitTo(d,0!=a);this.paletteIDs[d]=b},"~N,~N,~N");h(c$,"setModelClickability",function(){if(this.isActive)for(var a=
this.ac;0<=--a;){var b=this.atoms[a];0==(b.shapeVisibilityFlags&this.vf)||this.ms.isAtomHidden(a)||b.setClickable(this.vf)}});h(c$,"getShapeState",function(){return this.isActive?this.vwr.getAtomShapeState(this):""});c(c$,"getInfoAsString",function(){return null},"~N")});n("J.shape");w(["J.shape.AtomShape"],"J.shape.Balls",["JU.BS","J.c.PAL","JU.C"],function(){c$=B(J.shape,"Balls",J.shape.AtomShape);h(c$,"setSize",function(a,b){2147483647==a?(this.isActive=!0,null==this.bsSizeSet&&(this.bsSizeSet=
new JU.BS),this.bsSizeSet.or(b)):this.setSize2(a,b)},"~N,JU.BS");h(c$,"setSizeRD",function(a,b){this.isActive=!0;null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS);for(var d=Math.min(this.atoms.length,b.length()),c=b.nextSetBit(0);0<=c&&c<d;c=b.nextSetBit(c+1))this.atoms[c].setMadAtom(this.vwr,a),this.bsSizeSet.set(c)},"J.atomdata.RadiusData,JU.BS");h(c$,"setProperty",function(a,b,d){if("color"===a){var c=JU.C.getColixO(b);0==c&&(c=2);null==this.bsColixSet&&(this.bsColixSet=new JU.BS);var g=J.c.PAL.pidOf(b);
for(a=d.nextSetBit(0);0<=a;a=d.nextSetBit(a+1)){var f=this.atoms[a];f.setColixAtom(this.getColixA(c,g,f));this.bsColixSet.setBitTo(a,2!=c||g!=J.c.PAL.NONE.id);f.setPaletteID(g)}}else if("colorValues"===a){if(0!=b.length){null==this.bsColixSet&&(this.bsColixSet=new JU.BS);var j=0,g=null;for(a=d.nextSetBit(0);0<=a&&!(j>=b.length);a=d.nextSetBit(a+1))g=Integer.$valueOf(b[j++]),c=JU.C.getColixO(g),0==c&&(c=2),g=J.c.PAL.pidOf(g),f=this.atoms[a],f.setColixAtom(this.getColixA(c,g,f)),this.bsColixSet.setBitTo(a,
2!=c||g!=J.c.PAL.NONE.id),f.setPaletteID(g)}}else if("colors"===a){b=b[0];null==this.bsColixSet&&(this.bsColixSet=new JU.BS);for(a=d.nextSetBit(0);0<=a;a=d.nextSetBit(a+1))a>=b.length||(this.atoms[a].setColixAtom(b[a]),this.atoms[a].setPaletteID(J.c.PAL.UNKNOWN.id),this.bsColixSet.set(a))}else if("translucency"===a){b=b.equals("translucent");null==this.bsColixSet&&(this.bsColixSet=new JU.BS);for(a=d.nextSetBit(0);0<=a;a=d.nextSetBit(a+1))this.atoms[a].setTranslucent(b,this.translucentLevel),b&&this.bsColixSet.set(a)}else a.startsWith("ball")&&
(a=a.substring(4).intern()),this.setPropAS(a,b,d)},"~S,~O,JU.BS");h(c$,"setModelClickability",function(){for(var a=this.vwr.getDeletedAtoms(),b=this.ac;0<=--b;){var d=this.atoms[b];d.setClickable(0);null!=a&&a.get(b)||(0==(d.shapeVisibilityFlags&this.vf)||this.ms.isAtomHidden(b))||d.setClickable(this.vf)}});h(c$,"getShapeState",function(){return this.vwr.getShapeState(this)})});n("J.shape");w(["J.shape.FontShape"],"J.shape.FontLineShape",null,function(){c$=t(function(){this.tickInfos=null;this.mad=
0;s(this,arguments)},J.shape,"FontLineShape",J.shape.FontShape);K(c$,function(){this.tickInfos=Array(4)});c(c$,"setPropFLS",function(a,b){"tickInfo"===a?null==b.ticks?b.type.equals(" ")?this.tickInfos[0]=this.tickInfos[1]=this.tickInfos[2]=this.tickInfos[3]=null:this.tickInfos["xyz".indexOf(b.type)+1]=null:this.tickInfos["xyz".indexOf(b.type)+1]=b:this.setPropFS(a,b)},"~S,~O");h(c$,"getShapeState",function(){var a=this.vwr.getFontState(this.myType,this.font3d);return null==this.tickInfos?a:this.vwr.getFontLineShapeState(a,
this.myType,this.tickInfos)})});n("J.shape");w(["J.shape.Shape"],"J.shape.FontShape",null,function(){c$=t(function(){this.font3d=this.myType=null;s(this,arguments)},J.shape,"FontShape",J.shape.Shape);h(c$,"initShape",function(){this.translucentAllowed=!1});c(c$,"setPropFS",function(a,b){"font"===a&&(this.font3d=b)},"~S,~O")});n("J.shape");w(["J.shape.FontShape"],"J.shape.Frank",["J.i18n.GT"],function(){c$=t(function(){this.frankString="Jmol";this.baseFont3d=this.currentMetricsFont3d=null;this.dy=
this.dx=this.y=this.x=this.frankDescent=this.frankAscent=this.frankWidth=0;s(this,arguments)},J.shape,"Frank",J.shape.FontShape);c(c$,"initShape",function(){R(this,J.shape.Frank,"initShape",[]);this.myType="frank";this.baseFont3d=this.font3d=this.gdata.getFont3DFSS("SansSerif","Plain",16);this.calcMetrics()});h(c$,"setProperty",function(a,b){this.setPropFS(a,b)},"~S,~O,JU.BS");h(c$,"wasClicked",function(a,b){var d=this.vwr.getScreenWidth(),c=this.vwr.getScreenHeight();return 0<d&&0<c&&a>d-this.frankWidth-
4&&b>c-this.frankAscent-4},"~N,~N");h(c$,"checkObjectHovered",function(a,b){if(!this.vwr.getShowFrank()||!this.wasClicked(a,b)||!this.vwr.menuEnabled())return!1;this.gdata.isDisplayAntialiased()&&!this.vwr.isSingleThreaded&&(a<<=1,b<<=1);this.vwr.hoverOnPt(a,b,J.i18n.GT._("Click for menu..."),null,null);return!0},"~N,~N,JU.BS");c(c$,"calcMetrics",function(){this.vwr.isJS?this.frankString="JSmol":this.vwr.isSignedApplet()&&(this.frankString="Jmol_S");this.font3d!==this.currentMetricsFont3d&&(this.currentMetricsFont3d=
this.font3d,this.frankWidth=this.font3d.stringWidth(this.frankString),this.frankDescent=this.font3d.getDescent(),this.frankAscent=this.font3d.getAscent())});c(c$,"getFont",function(a){this.font3d=this.gdata.getFont3DScaled(this.baseFont3d,a);this.calcMetrics()},"~N");h(c$,"getShapeState",function(){return this.vwr.getFontState(this.myType,this.font3d)});C(c$,"defaultFontName","SansSerif","defaultFontStyle","Plain","defaultFontSize",16,"frankMargin",4)});n("J.shape");w(null,"J.shape.Shape",["J.c.PAL",
"JU.C","$.Logger","JV.JC"],function(){c$=t(function(){this.gdata=this.ms=this.vwr=null;this.translucentLevel=this.vf=this.shapeID=0;this.translucentAllowed=!0;this.isBioShape=!1;this.bsColixSet=this.bsSizeSet=null;s(this,arguments)},J.shape,"Shape");c(c$,"getViewer",function(){return this.vwr});c(c$,"initializeShape",function(a,b,d,c){this.vwr=a;this.gdata=b;this.shapeID=c;this.vf=JV.JC.getShapeVisibilityFlag(c);this.setModelSet(d);this.initShape()},"JV.Viewer,JU.GData,JM.ModelSet,~N");c(c$,"setVisibilityFlags",
function(){},"JU.BS");c(c$,"getSize",function(){return 0},"~N");c(c$,"getSizeG",function(){return 0},"JM.Group");c(c$,"setModelSet",function(a){this.ms=a;this.initModelSet()},"JM.ModelSet");c(c$,"initModelSet",function(){});c(c$,"setShapeVisibility",function(a,b){a.setShapeVisibility(this.vf,b)},"JM.Atom,~B");c(c$,"initShape",function(){});c(c$,"merge",function(){},"J.shape.Shape");c(c$,"setShapeSizeRD",function(a,b,d){null==b?this.setSize(a,d):this.setSizeRD(b,d)},"~N,J.atomdata.RadiusData,JU.BS");
c(c$,"setSize",function(){},"~N,JU.BS");c(c$,"setSizeRD",function(){},"J.atomdata.RadiusData,JU.BS");c(c$,"getPropertyData",function(){return!1},"~S,~A");c(c$,"setPropS",function(a,b,d){if("setProperties"===a)for(null==d&&(d=this.vwr.bsA());0<b.size();)a=b.remove(0),this.setProperty(a[0].intern(),a[1],d);else"translucentLevel"===a?this.translucentLevel=b.floatValue():"refreshTrajectories"!==a&&JU.Logger.warn("unassigned "+JV.JC.shapeClassBases[this.shapeID]+" + shape setProperty:"+a+":"+b)},"~S,~O,JU.BS");
c(c$,"getProperty",function(){return null},"~S,~N");c(c$,"getIndexFromName",function(){return-1},"~S");c(c$,"wasClicked",function(){return!1},"~N,~N");c(c$,"findNearestAtomIndex",function(){},"~N,~N,~A,JU.BS");c(c$,"checkBoundsMinMax",function(){},"JU.P3,JU.P3");c(c$,"setModelClickability",function(){});c(c$,"checkObjectClicked",function(){return null},"~N,~N,~N,JU.BS,~B");c(c$,"checkObjectHovered",function(){return!1},"~N,~N,JU.BS");c(c$,"checkObjectDragged",function(){return!1},"~N,~N,~N,~N,~N,JU.BS");
c(c$,"coordinateInRange",function(a,b,d,c,g){this.vwr.tm.transformPtScr(d,g);a=(a-g.x)*(a-g.x)+(b-g.y)*(b-g.y);return a<c?a:-1},"~N,~N,JU.T3,~N,JU.P3i");c(c$,"getColixI",function(a,b,d){return this.getColixA(a,b,this.ms.at[d])},"~N,~N,~N");c(c$,"getColixA",function(a,b,d){return 2==a?this.vwr.getColixAtomPalette(d,b):a},"~N,~N,JM.Atom");c(c$,"getColixB",function(a,b,d){return 2==a?this.vwr.getColixBondPalette(d,b):a},"~N,~N,JM.Bond");c(c$,"getShapeDetail",function(){return null});c$.getColix=c(c$,
"getColix",function(a,b,d){return JU.C.getColixInherited(null==a||b>=a.length?0:a[b],d.getColix())},"~A,~N,JM.Atom");c$.getFontCommand=c(c$,"getFontCommand",function(a,b){return null==b?"":"font "+a+" "+b.getInfo()},"~S,javajs.awt.Font");c$.getColorCommandUnk=c(c$,"getColorCommandUnk",function(a,b,d){return J.shape.Shape.getColorCommand(a,J.c.PAL.UNKNOWN.id,b,d)},"~S,~N,~B");c$.getColorCommand=c(c$,"getColorCommand",function(a,b,d,c){if(b==J.c.PAL.UNKNOWN.id&&0==d)return"";b=b==J.c.PAL.UNKNOWN.id&&
0==d?"":(c?J.shape.Shape.getTranslucentLabel(d)+" ":"")+(b!=J.c.PAL.UNKNOWN.id&&!J.c.PAL.isPaletteVariable(b)?J.c.PAL.getPaletteName(b):J.shape.Shape.encodeColor(d));return"color "+a+" "+b},"~S,~N,~N,~B");c$.encodeColor=c(c$,"encodeColor",function(a){return JU.C.isColixColorInherited(a)?"none":JU.C.getHexCode(a)},"~N");c$.getTranslucentLabel=c(c$,"getTranslucentLabel",function(a){return JU.C.isColixTranslucent(a)?"translucent "+JU.C.getColixTranslucencyFractional(a):"opaque"},"~N");c$.appendCmd=c(c$,
"appendCmd",function(a,b){0!=b.length&&a.append("  ").append(b).append(";\n")},"JU.SB,~S");C(c$,"RADIUS_MAX",4)});n("J.shape");w(["J.shape.Shape","JU.P3i"],"J.shape.Sticks","java.util.Hashtable JU.BS $.P3 J.c.PAL JU.BSUtil $.C $.Edge $.Escape".split(" "),function(){c$=t(function(){this.myMask=0;this.reportAll=!1;this.ptXY=this.selectedBonds=this.bsOrderSet=null;s(this,arguments)},J.shape,"Sticks",J.shape.Shape);K(c$,function(){this.ptXY=new JU.P3i});c(c$,"initShape",function(){R(this,J.shape.Sticks,
"initShape",[]);this.myMask=1023;this.reportAll=!1});h(c$,"setSize",function(a,b){if(2147483647==a)this.selectedBonds=JU.BSUtil.copy(b);else if(-2147483648==a)null==this.bsOrderSet&&(this.bsOrderSet=new JU.BS),this.bsOrderSet.or(b);else{null==this.bsSizeSet&&(this.bsSizeSet=new JU.BS);for(var d=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):this.ms.getBondIteratorForType(this.myMask,b);d.hasNext();)this.bsSizeSet.set(d.nextIndex()),d.next().setMad(a)}},"~N,JU.BS");h(c$,"setProperty",
function(a,b,d){if("type"===a)this.myMask=b.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=b.shortValue();for(d=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):this.ms.getBondIteratorForType(65535,d);d.hasNext();)this.bsOrderSet.set(d.nextIndex()),d.next().setOrder(a)}else if("color"===a)if(null==this.bsColixSet&&
(this.bsColixSet=new JU.BS),a=JU.C.getColixO(b),b=p(b,J.c.PAL)?b:null,b===J.c.PAL.TYPE||b===J.c.PAL.ENERGY){var c=b===J.c.PAL.ENERGY;for(d=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):this.ms.getBondIteratorForType(this.myMask,d);d.hasNext();){this.bsColixSet.set(d.nextIndex());var g=d.next();c?(g.setColix(this.getColixB(a,b.id,g)),g.setPaletteID(b.id)):g.setColix(JU.C.getColix(JU.Edge.getArgbHbondType(g.order)))}}else{if(!(2==a&&b!==J.c.PAL.CPK))for(d=null!=this.selectedBonds?
this.ms.getBondIterator(this.selectedBonds):this.ms.getBondIteratorForType(this.myMask,d);d.hasNext();)b=d.nextIndex(),g=d.next(),g.setColix(a),this.bsColixSet.setBitTo(b,0!=a&&2!=a)}else if("translucency"===a){null==this.bsColixSet&&(this.bsColixSet=new JU.BS);a=b.equals("translucent");for(d=null!=this.selectedBonds?this.ms.getBondIterator(this.selectedBonds):this.ms.getBondIteratorForType(this.myMask,d);d.hasNext();)this.bsColixSet.set(d.nextIndex()),d.next().setTranslucent(a,this.translucentLevel)}else"deleteModelAtoms"!==
a&&this.setPropS(a,b,d)},"~S,~O,JU.BS");h(c$,"getProperty",function(a){return a.equals("selectionState")?null!=this.selectedBonds?"select BONDS "+JU.Escape.eBS(this.selectedBonds)+"\n":"":a.equals("sets")?[this.bsOrderSet,this.bsSizeSet,this.bsColixSet]:null},"~S,~N");h(c$,"setModelClickability",function(){for(var a=this.ms.bo,b=this.ms.bondCount;0<=--b;){var d=a[b];0==(d.getShapeVisibilityFlags()&this.vf)||(this.ms.isAtomHidden(d.getAtomIndex1())||this.ms.isAtomHidden(d.getAtomIndex2()))||(d.getAtom1().setClickable(this.vf),
d.getAtom2().setClickable(this.vf))}});h(c$,"getShapeState",function(){return this.vwr.getBondState(this,this.bsOrderSet,this.reportAll)});h(c$,"checkObjectHovered",function(a,b,d){var c=new JU.P3;a=this.findPickedBond(a,b,d,c);if(null==a)return!1;this.vwr.highlightBond(a.index,!0);return!0},"~N,~N,JU.BS");h(c$,"checkObjectClicked",function(a,b,d,c){d=new JU.P3;a=this.findPickedBond(a,b,c,d);if(null==a)return null;b=a.getAtom1().mi;c=a.getIdentity();var g=new java.util.Hashtable;g.put("pt",d);g.put("index",
Integer.$valueOf(a.index));g.put("modelIndex",Integer.$valueOf(b));g.put("model",this.vwr.getModelNumberDotted(b));g.put("type","bond");g.put("info",c);this.vwr.setStatusAtomPicked(-3,'["bond","'+a.getIdentity()+'",'+d.x+","+d.y+","+d.z+"]",g);return g},"~N,~N,~N,JU.BS,~B");c(c$,"findPickedBond",function(a,b,d,c){d=100;this.gdata.isAntialiased()&&(a<<=1,b<<=1,d<<=1);for(var g=null,f=new JU.P3,j=this.ms.bo,k=this.ms.bondCount;0<=--k;){var h=j[k];if(0!=h.getShapeVisibilityFlags()){var m=h.getAtom1(),
r=h.getAtom2();if(m.checkVisible()&&r.checkVisible()){f.ave(m,r);var x=this.coordinateInRange(a,b,f,d,this.ptXY);0<=x&&(m=1*(this.ptXY.x-m.sX)/(r.sX-m.sX),0.4>m||0.6<m||(d=x,g=h,c.setT(f)))}}}return g},"~N,~N,JU.BS,JU.P3");C(c$,"MAX_BOND_CLICK_DISTANCE_SQUARED",100)});n("J.thread");w(["J.thread.JmolThread"],"J.thread.HoverWatcherThread",["java.lang.Thread"],function(){c$=t(function(){this.moved=this.current=this.actionManager=null;this.hoverDelay=0;s(this,arguments)},J.thread,"HoverWatcherThread",
J.thread.JmolThread);u(c$,function(a,b,d,c){E(this,J.thread.HoverWatcherThread);this.setViewer(c,"HoverWatcher");this.actionManager=a;this.current=b;this.moved=d;this.start()},"JV.ActionManager,JV.MouseState,JV.MouseState,JV.Viewer");h(c$,"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.hoverDelay&&!this.stopped&&this.actionManager.checkHover()),a=0}},"~N")});n("J.thread");w(["java.lang.Thread"],"J.thread.JmolThread",["JU.Logger"],function(){c$=t(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;s(this,arguments)},J.thread,"JmolThread",Thread);c(c$,"setManager",function(){return 0},"~O,JV.Viewer,~O");c(c$,"setViewer",function(a,b){this.setName(b);this.$name=b+"_"+ ++J.thread.JmolThread.threadIndex;this.vwr=a;this.isJS=a.isSingleThreaded},"JV.Viewer,~S");c(c$,"setEval",function(a){this.eval=a;this.sc=this.vwr.getEvalContextAndHoldQueue(a);null!=this.sc&&(this.useTimeout=a.getAllowJSThreads())},"J.api.JmolScriptEvaluator");c(c$,"resumeEval",function(){null==this.eval||(!this.isJS||!this.useTimeout)||
(this.sc.mustResumeEval=!this.stopped,this.eval.resumeEval(this.sc),this.sc=this.eval=null)});c(c$,"start",function(){this.isJS?this.run():R(this,J.thread.JmolThread,"start",[])});h(c$,"run",function(){this.startTime=System.currentTimeMillis();try{this.run1(-1)}catch(a){if(y(a,InterruptedException)){var b=a;JU.Logger.debugging&&!p(this,J.thread.HoverWatcherThread)&&this.oops(b)}else if(y(a,Exception))this.oops(a);else throw a;}});c(c$,"oops",function(a){JU.Logger.debug(this.$name+" exception "+a);
this.vwr.isJS||a.printStackTrace();this.vwr.queueOnHold=!1},"Exception");c(c$,"runSleep",function(a,b){if(this.isJS&&!this.useTimeout)return!0;var d=this;setTimeout(function(){d.run1(b)},Math.max(a,0));return!1},"~N,~N");c(c$,"interrupt",function(){this.stopped=!0;this.vwr.startHoverWatcher(!0);this.isJS||R(this,J.thread.JmolThread,"interrupt",[])});c(c$,"checkInterrupted",function(a){return this.haveReference&&(null==a||!a.$name.equals(this.$name))?!0:this.stopped},"J.thread.JmolThread");c(c$,"reset",
function(){this.isReset=!0;this.interrupt()});C(c$,"threadIndex",0,"INIT",-1,"MAIN",0,"FINISH",-2,"CHECK1",1,"CHECK2",2,"CHECK3",3)});n("J.thread");w(["J.thread.JmolThread"],"J.thread.TimeoutThread",["java.lang.Thread","JU.SB"],function(){c$=t(function(){this.script=null;this.status=0;this.triggered=!0;this.timeouts=null;s(this,arguments)},J.thread,"TimeoutThread",J.thread.JmolThread);u(c$,function(a,b,d,c){E(this,J.thread.TimeoutThread,[]);this.setViewer(a,b);this.$name=b;this.set(d,c)},"JV.Viewer,~S,~N,~S");
c(c$,"set",function(a,b){this.sleepTime=a;null!=b&&(this.script=b)},"~N,~S");h(c$,"toString",function(){return"timeout name="+this.$name+" executions="+this.status+" mSec="+this.sleepTime+" secRemaining="+(this.targetTime-System.currentTimeMillis())/1E3+" script="+this.script});h(c$,"run1",function(a){for(;;)switch(a){case -1:this.isJS||Thread.currentThread().setPriority(1);this.timeouts=this.vwr.getTimeouts();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.timeouts.get(this.$name))return;this.status++;(a=0>this.sleepTime)?this.targetTime=System.currentTimeMillis()+Math.abs(this.sleepTime):this.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.timeouts.remove(this.$name);return}},"~N");c$.clear=c(c$,"clear",function(a){for(var b,d=a.values().iterator();d.hasNext()&&((b=d.next())||1);){var c=b;c.script.equals("exitJmol")||c.interrupt()}a.clear()},"java.util.Map");c$.setTimeout=c(c$,"setTimeout",function(a,b,d,c,g){var f=b.get(d);0==c?null!=f&&(f.interrupt(),b.remove(d)):null!=f?f.set(c,g):(f=new J.thread.TimeoutThread(a,d,c,g),b.put(d,f),f.start())},
"JV.Viewer,java.util.Map,~S,~N,~S");c$.trigger=c(c$,"trigger",function(a,b){var d=a.get(b);null!=d&&(d.triggered=0>d.sleepTime)},"java.util.Map,~S");c$.showTimeout=c(c$,"showTimeout",function(a,b){var d=new JU.SB;if(null!=a)for(var c,g=a.values().iterator();g.hasNext()&&((c=g.next())||1);){var f=c;(null==b||f.$name.equalsIgnoreCase(b))&&d.append(f.toString()).append("\n")}return 0<d.length()?d.toString():"<no timeouts set>"},"java.util.Map,~S")});n("JM");w(["JU.BNode","$.Point3fi","J.c.PAL"],"JM.Atom",
"java.lang.Float JU.CU $.P3 $.PT $.SB $.V3 J.atomdata.RadiusData J.c.VDW JU.C $.Elements JV.JC".split(" "),function(){c$=t(function(){this.altloc="\x00";this.atomSite=this.atomID=0;this.group=null;this.atomicAndIsotopeNumber=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;s(this,arguments)},JM,
"Atom",JU.Point3fi,JU.BNode);K(c$,function(){this.paletteID=J.c.PAL.CPK.id});c(c$,"getAtomID",function(){return this.atomID});c(c$,"getBonds",function(){return this.bonds});c(c$,"setBonds",function(a){this.bonds=a},"~A");c(c$,"getNBackbonesDisplayed",function(){return this.nBackbonesDisplayed});h(c$,"setAtom",function(a,b,d,c,g,f,j,k,h){this.mi=a;this.atomSymmetry=g;this.atomSite=f;this.i=b;this.atomicAndIsotopeNumber=j;h&&(this.formalChargeAndFlags=2);0!=k&&-2147483648!=k&&this.setFormalCharge(k);
this.userDefinedVanDerWaalRadius=c;this.setT(d);return this},"~N,~N,JU.P3,~N,JU.BS,~N,~N,~N,~B");c(c$,"setAltLoc",function(a){this.altloc=a},"~S");c(c$,"setShapeVisibility",function(a,b){this.shapeVisibilityFlags=b?this.shapeVisibilityFlags|a:this.shapeVisibilityFlags&~a},"~N,~B");c(c$,"isCovalentlyBonded",function(a){if(null!=this.bonds)for(var b=this.bonds.length;0<=--b;)if(this.bonds[b].isCovalent()&&this.bonds[b].getOtherAtom(this)===a)return!0;return!1},"JM.Atom");c(c$,"isBonded",function(a){if(null!=
this.bonds)for(var b=this.bonds.length;0<=--b;)if(this.bonds[b].getOtherAtom(this)===a)return!0;return!1},"JM.Atom");c(c$,"getBond",function(a){if(null!=this.bonds)for(var b=this.bonds.length;0<=--b;)if(null!=this.bonds[b].getOtherAtom(a))return this.bonds[b];return null},"JM.Atom");c(c$,"addDisplayedBond",function(a,b){this.nBondsDisplayed+=b?1:-1;this.setShapeVisibility(a,0<this.nBondsDisplayed)},"~N,~B");c(c$,"addDisplayedBackbone",function(a,b){this.nBackbonesDisplayed+=b?1:-1;this.setShapeVisibility(a,
b)},"~N,~B");c(c$,"deleteBond",function(a){if(null!=this.bonds)for(var b=this.bonds.length;0<=--b;)if(this.bonds[b]===a){this.deleteBondAt(b);break}},"JM.Bond");c(c$,"deleteBondAt",function(a){var b=this.bonds.length-1;if(0==b)this.bonds=null;else{for(var d=Array(b),c=0;c<a;++c)d[c]=this.bonds[c];for(;c<b;++c)d[c]=this.bonds[c+1];this.bonds=d}},"~N");c(c$,"clearBonds",function(){this.bonds=null});h(c$,"getBondedAtomIndex",function(a){return this.bonds[a].getOtherAtom(this).i},"~N");c(c$,"setMadAtom",
function(a,b){this.madAtom=this.calculateMad(a,b)},"JV.Viewer,J.atomdata.RadiusData");c(c$,"calculateMad",function(a,b){if(null==b)return 0;var d=b.value;if(0==d)return 0;switch(b.factorType){case J.atomdata.RadiusData.EnumType.SCREEN:return Y(d);case J.atomdata.RadiusData.EnumType.FACTOR:case J.atomdata.RadiusData.EnumType.OFFSET:var c=0;switch(b.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(b.vdwType===J.c.VDW.ADPMAX);break;default:c=this.getVanderwaalsRadiusFloat(a,b.vdwType)}d=b.factorType===J.atomdata.RadiusData.EnumType.FACTOR?d*c:d+c;break;case J.atomdata.RadiusData.EnumType.ABSOLUTE:if(16.1==d)return JM.Atom.MAD_GLOBAL}c=Y(0>d?d:2E3*d);0>c&&0<d&&(c=0);return c},"JV.Viewer,J.atomdata.RadiusData");c(c$,"getADPMinMax",function(a){var b=this.getTensors();if(null==b)return 0;
var d=b[0];if(null==d||1!=d.iType)return 0;this.group.chain.model.ms.isModulated(this.i)&&d.isUnmodulated&&(d=b[1]);return d.getFactoredValue(a?2:1)},"~B");c(c$,"getTensors",function(){return this.group.chain.model.ms.getAtomTensorList(this.i)});c(c$,"getRasMolRadius",function(){return Math.abs(q(this.madAtom/8))});h(c$,"getCovalentBondCount",function(){if(null==this.bonds)return 0;for(var a=0,b,d=this.bonds.length;0<=--d;)0!=((b=this.bonds[d]).order&1023)&&!b.getOtherAtom(this).isDeleted()&&++a;
return a});h(c$,"getCovalentHydrogenCount",function(){if(null==this.bonds)return 0;for(var a=0,b=this.bonds.length;0<=--b;)if(0!=(this.bonds[b].order&1023)){var d=this.bonds[b].getOtherAtom(this);0<=d.valence&&1==d.getElementNumber()&&++a}return a});h(c$,"getEdges",function(){return null==this.bonds?[]:this.bonds});c(c$,"setColixAtom",function(a){this.colixAtom=a},"~N");c(c$,"setPaletteID",function(a){this.paletteID=a},"~N");c(c$,"setTranslucent",function(a,b){this.colixAtom=JU.C.getColixTranslucent3(this.colixAtom,
a,b)},"~B,~N");c(c$,"isTranslucent",function(){return JU.C.isColixTranslucent(this.colixAtom)});h(c$,"getElementNumber",function(){return JU.Elements.getElementNumber(this.atomicAndIsotopeNumber)});h(c$,"getIsotopeNumber",function(){return JU.Elements.getIsotopeNumber(this.atomicAndIsotopeNumber)});h(c$,"getAtomicAndIsotopeNumber",function(){return this.atomicAndIsotopeNumber});c(c$,"setAtomicAndIsotopeNumber",function(a){if(0>a||(a&127)>=JU.Elements.elementNumberMax||32767<a)a=0;this.atomicAndIsotopeNumber=
a},"~N");c(c$,"getElementSymbolIso",function(a){return JU.Elements.elementSymbolFromNumber(a?this.atomicAndIsotopeNumber:this.atomicAndIsotopeNumber&127)},"~B");c(c$,"getElementSymbol",function(){return this.getElementSymbolIso(!0)});c(c$,"getAlternateLocationID",function(){return this.altloc});c(c$,"isAltLoc",function(a){if(null==a)return"\x00"==this.altloc;if(1!=a.length)return!1;a=a.charAt(0);return"*"==a||"?"==a&&"\x00"!=this.altloc||this.altloc==a},"~S");c(c$,"isHetero",function(){return 0!=
(this.formalChargeAndFlags&2)});c(c$,"hasVibration",function(){return 0!=(this.formalChargeAndFlags&1)});c(c$,"setFormalCharge",function(a){this.formalChargeAndFlags=this.formalChargeAndFlags&3|(-2147483648==a?0:7<a?7:-3>a?-3:a)<<2},"~N");c(c$,"setVibrationVector",function(){this.formalChargeAndFlags|=1});h(c$,"getFormalCharge",function(){return this.formalChargeAndFlags>>2});c(c$,"getOccupancy100",function(){var a=this.group.chain.model.ms.occupancies;return null==a?100:Math.round(a[this.i])});c(c$,
"getBfactor100",function(){var a=this.group.chain.model.ms.bfactor100s;return null==a?0:a[this.i]});c(c$,"getHydrophobicity",function(){var a=this.group.chain.model.ms.hydrophobicities;return null==a?JU.Elements.getHydrophobicity(this.group.getGroupID()):a[this.i]});c(c$,"setRadius",function(a){return!Float.isNaN(this.userDefinedVanDerWaalRadius=0<a?a:NaN)},"~N");c(c$,"deleteBonds",function(a){this.valence=-1;if(null!=this.bonds)for(var b=this.bonds.length;0<=--b;){var d=this.bonds[b];d.getOtherAtom(this).deleteBond(d);
a.set(d.index)}this.bonds=null},"JU.BS");h(c$,"isDeleted",function(){return 0>this.valence});c(c$,"setValence",function(a){this.isDeleted()||(this.valence=0>a?0:239>a?a:239)},"~N");h(c$,"getValence",function(){if(this.isDeleted())return-1;var a=this.valence;if(0==a&&null!=this.bonds)for(var b=this.bonds.length;0<=--b;)a+=this.bonds[b].getValence();return a});h(c$,"getImplicitHydrogenCount",function(){return this.group.chain.model.ms.getImplicitHydrogenCount(this,!1)});c(c$,"getTargetValence",function(){switch(this.getElementNumber()){case 6:case 14: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(c$,"getDimensionValue",function(a){return 0==a?this.x:1==a?this.y:this.z},"~N");c(c$,"getVanderwaalsRadiusFloat",function(a,b){return Float.isNaN(this.userDefinedVanDerWaalRadius)?a.getVanderwaalsMarType(this.atomicAndIsotopeNumber,this.getVdwType(b))/1E3:this.userDefinedVanDerWaalRadius},"JV.Viewer,J.c.VDW");c(c$,"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(c$,"getBondingRadius",function(){var a=this.group.chain.model.ms.bondingRadii,a=null==a?0:a[this.i];return 0==a?JU.Elements.getBondingRadius(this.atomicAndIsotopeNumber,this.getFormalCharge()):a});c(c$,"getVolume",function(a,b){var d=null==b?this.userDefinedVanDerWaalRadius:NaN;Float.isNaN(d)&&(d=a.getVanderwaalsMarType(this.getElementNumber(),this.getVdwType(b))/
1E3);var c=0;if(null!=this.bonds)for(var g=0;g<this.bonds.length;g++)if(this.bonds[g].isCovalent()){var f=this.bonds[g].getOtherAtom(this),j=null==b?f.userDefinedVanDerWaalRadius:NaN;Float.isNaN(j)&&(j=a.getVanderwaalsMarType(f.getElementNumber(),f.getVdwType(b))/1E3);f=this.distance(f);if(!(f>d+j)){if(f+d<=j)return 0;j=d-(d*d+f*f-j*j)/(2*f);c-=1.0471975511965976*j*j*(3*d-j)}}return c+4.1887902047863905*d*d*d},"JV.Viewer,J.c.VDW");c(c$,"getCurrentBondCount",function(){return null==this.bonds?0:this.bonds.length});
c(c$,"getColix",function(){return this.colixAtom});c(c$,"getPaletteID",function(){return this.paletteID});c(c$,"getRadius",function(){return Math.abs(this.madAtom/2E3)});h(c$,"getIndex",function(){return this.i});h(c$,"getAtomSite",function(){return this.atomSite});c(c$,"setAtomSymmetry",function(a){this.atomSymmetry=a},"JU.BS");c(c$,"getAtomSymmetry",function(){return this.atomSymmetry});c(c$,"setGroup",function(a){this.group=a},"JM.Group");c(c$,"getGroup",function(){return this.group});h(c$,"getGroupBits",
function(a){this.group.selectAtoms(a)},"JU.BS");h(c$,"getAtomName",function(){return 0<this.atomID?JV.JC.getSpecialAtomName(this.atomID):this.group.chain.model.ms.atomNames[this.i]});h(c$,"getAtomType",function(){var a=this.group.chain.model.ms.atomTypes,a=null==a?null:a[this.i];return null==a?this.getAtomName():a});c(c$,"getAtomNumber",function(){var a=this.group.chain.model.ms.atomSerials;return null==a?this.i:a[this.i]});c(c$,"getSeqID",function(){var a=this.group.chain.model.ms.atomSeqIDs;return null==
a?0:a[this.i]});c(c$,"isVisible",function(a){return(this.shapeVisibilityFlags&a)==a},"~N");c(c$,"getPartialCharge",function(){var a=this.group.chain.model.ms.partialCharges;return null==a?0:a[this.i]});c(c$,"getSymmetryTranslation",function(a,b,d){for(var c=0;c<b.length;c++)if(this.atomSymmetry.get(a+=d))return b[c];return 0},"~N,~A,~N");c(c$,"getCellTranslation",function(a,b,d){for(var c=d,g=0;g<b.length;g++)for(var f=0;f<d;f++,c++)if(this.atomSymmetry.get(c)&&b[g]==a)return b[g];return 0},"~N,~A,~N");
c(c$,"getSymmetryOperatorList",function(){var a="",b=this.group.chain.model.ms,d=b.getModelSymmetryCount(this.mi);if(0==d||null==this.atomSymmetry)return"";for(var b=b.getModelCellRange(this.mi),c=d,g=null==b?1:b.length,f=0;f<g;f++)for(var j=0;j<d;j++)this.atomSymmetry.get(c++)&&(a+=","+(j+1)+""+b[f]);return 0==a.length?"":a.substring(1)});h(c$,"getModelIndex",function(){return this.mi});c(c$,"getMoleculeNumber",function(a){return this.group.chain.model.ms.getMoleculeIndex(this.i,a)+1},"~B");c(c$,
"getFractionalCoord",function(a,b,d){d=this.getFractionalCoordPt(b,d);return"X"==a?d.x:"Y"==a?d.y:d.z},"~S,~B,JU.P3");c(c$,"getFractionalCoordPt",function(a,b){var d=this.getUnitCell();if(null==d)return this;null==b?b=JU.P3.newP(this):b.setT(this);d.toFractional(b,a);return b},"~B,JU.P3");c(c$,"getUnitCell",function(){return this.group.chain.model.ms.getUnitCellForAtom(this.i)});c(c$,"getFractionalUnitCoord",function(a,b){b=this.getFractionalUnitCoordPt(!1,b);return"X"==a?b.x:"Y"==a?b.y:b.z},"~S,JU.P3");
c(c$,"getFractionalUnitCoordPt",function(a,b){var d=this.getUnitCell();if(null==d)return this;null==b?b=JU.P3.newP(this):b.setT(this);this.group.chain.model.isJmolDataFrame?(d.toFractional(b,!1),a&&d.toCartesian(b,!1)):(d.toUnitCell(b,null),a||d.toFractional(b,!1));return b},"~B,JU.P3");c(c$,"getFractionalUnitDistance",function(a,b,d){var c=this.getUnitCell();if(null==c)return this.distance(a);b.setT(this);d.setT(a);this.group.chain.model.isJmolDataFrame?(c.toFractional(b,!0),c.toFractional(d,!0)):
(c.toUnitCell(b,null),c.toUnitCell(d,null));return b.distance(d)},"JU.P3,JU.P3,JU.P3");c(c$,"setFractionalCoord",function(a,b,d){var c=this.getUnitCell();null!=c&&c.toFractional(this,d);switch(a){case 1112541191:case 1112541188:this.x=b;break;case 1112541192:case 1112541189:this.y=b;break;case 1112541193:case 1112541190:this.z=b}null!=c&&c.toCartesian(this,d)},"~N,~N,~B");c(c$,"setFractionalCoordTo",function(a,b){this.setFractionalCoordPt(this,a,b)},"JU.P3,~B");c(c$,"setFractionalCoordPt",function(a,
b,d){a.setT(b);b=this.getUnitCell();null!=b&&b.toCartesian(a,d&&!this.group.chain.model.isJmolDataFrame)},"JU.P3,JU.P3,~B");c(c$,"isCursorOnTopOf",function(a,b,d,c){var g=q(this.sD/2);g<d&&(g=d);d=g*g;g=this.sX-a;g*=g;if(g>d)return!1;var f=this.sY-b;d-=g+f*f;if(0>d)return!1;if(null==c)return!0;var g=this.sZ,f=c.sZ,j=q(c.sD/2);if(g<f-j)return!0;a=c.sX-a;b=c.sY-b;b=j*j-(a*a+b*b);return g-Math.sqrt(d)<f-Math.sqrt(b)},"~N,~N,~N,JM.Atom");c(c$,"getInfo",function(){return this.getIdentity(!0)});c(c$,"getInfoXYZ",
function(a,b){if(a){var d=this.getGroup3(!0),c=this.getChainID();b=this.getFractionalCoordPt(!0,b);return"Atom: "+(null==d?this.getElementSymbol():this.getAtomName())+" "+this.getAtomNumber()+(null!=d&&0<d.length?(this.isHetero()?" Hetero: ":" Group: ")+d+" "+this.getResno()+(0!=c&&32!=c?" Chain: "+this.group.chain.getIDStr():""):"")+" Model: "+this.getModelNumber()+" Coordinates: "+this.x+" "+this.y+" "+this.z+(null==b?"":" Fractional: "+b.x+" "+b.y+" "+b.z)}return this.getIdentityXYZ(!0,b)},"~B,JU.P3");
c(c$,"getIdentityXYZ",function(a,b){b=this.group.chain.model.isJmolDataFrame?this.getFractionalCoordPt(!1,b):this;return this.getIdentity(a)+" "+b.x+" "+b.y+" "+b.z},"~B,JU.P3");c(c$,"getIdentity",function(a){var b=new JU.SB,d=this.getGroup3(!0);if(null!=d&&0<d.length){b.append("[");b.append(d);b.append("]");d=this.getSeqcodeString();null!=d&&b.append(d);d=this.getChainID();if(0!=d&&32!=d){b.append(":");var c=this.getChainIDStr();256<=d&&(c=JU.PT.esc(c));b.append(c)}if(!a)return b.toString();b.append(".")}b.append(this.getAtomName());
0==b.length()&&(b.append(this.getElementSymbolIso(!1)),b.append(" "),b.appendI(this.getAtomNumber()));0!=this.altloc.charCodeAt(0)&&(b.append("%"),b.appendC(this.altloc));1<this.group.chain.model.ms.mc&&(b.append("/"),b.append(this.getModelNumberForLabel()));b.append(" #");b.appendI(this.getAtomNumber());return b.toString()},"~B");h(c$,"getGroup3",function(a){var b=this.group.getGroup3();return a||null!=b&&0<b.length?b:"UNK"},"~B");h(c$,"getGroup1",function(a){var b=this.group.getGroup1();return"\x00"!=
b?""+b:"\x00"!=a?""+a:""},"~S");h(c$,"isProtein",function(){return this.group.isProtein()});c(c$,"isCarbohydrate",function(){return this.group.isCarbohydrate()});h(c$,"isNucleic",function(){return this.group.isNucleic()});h(c$,"isDna",function(){return this.group.isDna()});h(c$,"isRna",function(){return this.group.isRna()});h(c$,"isPurine",function(){return this.group.isPurine()});h(c$,"isPyrimidine",function(){return this.group.isPyrimidine()});c(c$,"getSeqcode",function(){return this.group.seqcode});
h(c$,"getResno",function(){return this.group.getResno()});c(c$,"isClickable",function(){return this.checkVisible()&&0!=this.clickabilityFlags&&0!=((this.shapeVisibilityFlags|this.group.shapeVisibilityFlags)&this.clickabilityFlags)});c(c$,"setClickable",function(a){0==a?this.clickabilityFlags=0:(this.clickabilityFlags|=a,this.shapeVisibilityFlags|=a)},"~N");c(c$,"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});h(c$,"isLeadAtom",function(){return this.group.isLeadAtom(this.i)});c(c$,"getGroupParameter",function(a){return this.group.getGroupParameter(a)},"~N");h(c$,"getChainID",function(){return this.group.chain.chainID});h(c$,"getChainIDStr",function(){return this.group.chain.getIDStr()});
c(c$,"getSurfaceDistance100",function(){return this.group.chain.model.ms.getSurfaceDistance100(this.i)});c(c$,"getVibrationVector",function(){return this.group.chain.model.ms.getVibration(this.i,!1)});c(c$,"getVibrationCoord",function(a){return this.group.chain.model.ms.getVibrationCoord(this.i,a)},"~S");c(c$,"getPolymerLength",function(){return this.group.getBioPolymerLength()});c(c$,"getPolymerIndexInModel",function(){return this.group.getBioPolymerIndexInModel()});c(c$,"getMonomerIndex",function(){return this.group.getMonomerIndex()});
c(c$,"getSelectedGroupCountWithinChain",function(){return this.group.chain.selectedGroupCount});c(c$,"getSelectedGroupIndexWithinChain",function(){return this.group.getSelectedGroupIndex()});c(c$,"getSelectedMonomerCountWithinPolymer",function(){return this.group.getSelectedMonomerCount()});c(c$,"getSelectedMonomerIndexWithinPolymer",function(){return this.group.getSelectedMonomerIndex()});c(c$,"getChain",function(){return this.group.chain});c(c$,"getModelNumberForLabel",function(){return this.group.chain.model.ms.getModelNumberForAtomLabel(this.mi)});
c(c$,"getModelNumber",function(){return this.group.chain.model.ms.getModelNumber(this.mi)%1E6});c(c$,"getModelFileIndex",function(){return this.group.chain.model.fileIndex});c(c$,"getModelFileNumber",function(){return this.group.chain.model.ms.getModelFileNumber(this.mi)});h(c$,"getBioStructureTypeName",function(){return this.getProteinStructureType().getBioStructureTypeName(!0)});c(c$,"getProteinStructureType",function(){return this.group.getProteinStructureType()});c(c$,"getProteinStructureSubType",
function(){return this.group.getProteinStructureSubType()});c(c$,"getStrucNo",function(){return this.group.getStrucNo()});c(c$,"getStructureId",function(){return this.group.getStructureId()});c(c$,"getProteinStructureTag",function(){return this.group.getProteinStructureTag()});c(c$,"getGroupID",function(){return this.group.groupID});c(c$,"getSeqcodeString",function(){return this.group.getSeqcodeString()});c(c$,"getInsertionCode",function(){return this.group.getInsertionCode()});h(c$,"equals",function(a){return this===
a},"~O");h(c$,"hashCode",function(){return this.i});c(c$,"findAromaticNeighbor",function(a){if(null==this.bonds)return null;for(var b=this.bonds.length;0<=--b;){var d=this.bonds[b],c=d.getOtherAtom(this);if(d.isAromatic()&&c.i!=a)return c}return null},"~N");c$.atomPropertyInt=c(c$,"atomPropertyInt",function(a,b){switch(b){case 1095763969:return a.getAtomNumber();case 1095761940:return a.getSeqID();case 1095761922:return a.atomID;case 1095761923:return a.i;case 1095761924:return a.getCovalentBondCount();
case 1095761927:return a.group.chain.index+1;case 1766856708:return a.group.chain.model.ms.vwr.getColorArgbOrGray(a.getColix());case 1087375365:case 1095763978:return a.getElementNumber();case 1095761929:return a.atomicAndIsotopeNumber;case 1229984263:return a.getModelFileIndex()+1;case 1632634891:return a.getFormalCharge();case 1095761932:return a.getGroupID();case 1095761933:return a.group.getGroupIndex();case 1095766030:return a.getModelNumber();case -1095766030:return a.getModelFileNumber();case 1095761935:return a.mi;
case 1095761936:return a.getMoleculeNumber(!0);case 1129318401:return a.getOccupancy100();case 1095761937:return a.getGroup().getBioPolymerIndexInModel()+1;case 1095761938:return a.getPolymerLength();case 1666189314:return a.getRasMolRadius();case 1095761939:return a.getResno();case 1095761941:return a.getAtomSite();case 1641025539:return a.getProteinStructureType().getId();case 1238369286:return a.getProteinStructureSubType().getId();case 1095761942:return a.getStrucNo();case 1297090050:return a.getSymOp();
case 1095763991:return a.getValence()}return 0},"JM.Atom,~N");c(c$,"getSymOp",function(){return null==this.atomSymmetry?0:this.atomSymmetry.nextSetBit(0)+1});c$.atomPropertyFloat=c(c$,"atomPropertyFloat",function(a,b,d,c){switch(d){case 1112539137:return b.getADPMinMax(!0);case 1112539138:return b.getADPMinMax(!1);case 1112541185:case 1112541205:return b.x;case 1112541186:case 1112541206:return b.y;case 1112541187:case 1112541207:return b.z;case 1115297793:case 1113200642:case 1113198595:case 1113198596:case 1113198597:case 1113200646:case 1113200647:case 1113200649:case 1113200650:case 1113200652:case 1650071565:case 1113200654:return a.shm.getAtomShapeValue(d,
b.group,b.i);case 1112541195:return b.getBondingRadius();case 1112539139:return a.getNMRCalculation().getChemicalShift(b);case 1112539140:return JU.Elements.getCovalentRadius(b.atomicAndIsotopeNumber);case 1112539141:case 1112539152:case 1112539150:return b.getGroupParameter(d);case 1112541188:return b.getFractionalCoord("X",!0,c);case 1112541189:return b.getFractionalCoord("Y",!0,c);case 1112541190:return b.getFractionalCoord("Z",!0,c);case 1112541191:return b.getFractionalCoord("X",!1,c);case 1112541192:return b.getFractionalCoord("Y",
!1,c);case 1112541193:return b.getFractionalCoord("Z",!1,c);case 1114638362:return b.getHydrophobicity();case 1112539142:return a.getNMRCalculation().getMagneticShielding(b);case 1112539143:return b.getMass();case 1129318401:return b.getOccupancy100()/100;case 1112541196:return b.getPartialCharge();case 1112539145:case 1112539146:case 1112539144:if(b.group.chain.model.isJmolDataFrame&&b.group.chain.model.jmolFrameType.startsWith("plot ramachandran"))switch(d){case 1112539145:return b.getFractionalCoord("X",
!1,c);case 1112539146:return b.getFractionalCoord("Y",!1,c);case 1112539144:if(b.group.chain.model.isJmolDataFrame&&b.group.chain.model.jmolFrameType.equals("plot ramachandran"))return a=b.getFractionalCoord("Z",!1,c)-180,-180>a?360+a:a}return b.getGroupParameter(d);case 1666189314:case 1113200651:return b.getRadius();case 1112539147:return b.sX;case 1112539148:return b.group.chain.model.ms.vwr.getScreenHeight()-b.sY;case 1112539149:return b.sZ;case 1114638363:return a.isAtomSelected(b.i)?1:0;case 1112539151:return b.group.chain.model.ms.getSurfaceDistanceMax(),
b.getSurfaceDistance100()/100;case 1112541199:return b.getBfactor100()/100;case 1112539153:return b.getFractionalUnitCoord("X",c);case 1112539154:return b.getFractionalUnitCoord("Y",c);case 1112539155:return b.getFractionalUnitCoord("Z",c);case 1649412120:return b.getVanderwaalsRadiusFloat(a,J.c.VDW.AUTO);case 1649410049:return b=b.getVibrationVector(),null==b?0:b.length()*a.getFloat(1649410049);case 1112541202:return b.getVibrationCoord("X");case 1112541203:return b.getVibrationCoord("Y");case 1112541204:return b.getVibrationCoord("Z");
case 1313866249:return b.getVolume(a,J.c.VDW.AUTO);case 1146095627:case 1146095629:case 1146093582:case 1146095628:case 1146095631:case 1146095626:return JM.Atom.atomPropertyTuple(b,d,c).length()}return JM.Atom.atomPropertyInt(b,d)},"JV.Viewer,JM.Atom,~N,JU.P3");c(c$,"getMass",function(){var a=this.getIsotopeNumber();return 0<a?a:JU.Elements.getAtomicMass(this.getElementNumber())});c$.atomPropertyString=c(c$,"atomPropertyString",function(a,b,d){switch(d){case 1087373315:return a=b.altloc,"\x00"==
a?"":""+a;case 1087375362:return b.getAtomName();case 1087375361:return b.getAtomType();case 1087373316:return b.getChainIDStr();case 1087373320:return b.getGroup1("?");case 1087373319:return b.getGroup1("\x00");case 1087373318:return b.getGroup3(!1);case 1087375365:return b.getElementSymbolIso(!0);case 1087373321:return b.getIdentity(!0);case 1087373322:return a=b.getInsertionCode(),"\x00"==a?"":""+a;case 1826248716:case 1288701959:return a=a.shm.getShapePropertyIndex(5,"label",b.i),null==a&&(a=
""),a;case 1641025539:return b.getProteinStructureType().getBioStructureTypeName(!1);case 1238369286:return b.getProteinStructureSubType().getBioStructureTypeName(!1);case 1087373324:return b.getStructureId();case 1087373323:return a.getHybridizationAndAxes(b.i,null,null,"d");case 1087375373:return b.getElementSymbolIso(!1);case 1089470478:return b.getSymmetryOperatorList()}return""},"JV.Viewer,JM.Atom,~N");c$.atomPropertyTuple=c(c$,"atomPropertyTuple",function(a,b,d){switch(b){case 1146095627:return a.getFractionalCoordPt(!a.group.chain.model.isJmolDataFrame,
d);case 1146095629:return a.getFractionalCoordPt(!1,d);case 1146093582:return a.group.chain.model.isJmolDataFrame?a.getFractionalCoordPt(!1,d):a.getFractionalUnitCoordPt(!1,d);case 1146095628:return JU.P3.new3(a.sX,a.group.chain.model.ms.vwr.getScreenHeight()-a.sY,a.sZ);case 1146095631:return a=a.getVibrationVector(),null==a&&(a=new JU.V3),a;case 1146095626:return a;case 1766856708:return JU.CU.colorPtFromInt(a.group.chain.model.ms.vwr.getColorArgbOrGray(a.getColix()),d)}return null},"JM.Atom,~N,JU.P3");
c(c$,"isWithinStructure",function(a){return this.group.isWithinStructure(a)},"J.c.STR");h(c$,"getOffsetResidueAtom",function(a,b){return this.group.getAtomIndex(a,b)},"~S,~N");h(c$,"isCrossLinked",function(a){return this.group.isCrossLinked(a.getGroup())},"JU.BNode");h(c$,"getCrossLinkLeadAtomIndexes",function(a){return this.group.getCrossLinkLead(a)},"JU.Lst");h(c$,"toString",function(){return this.getInfo()});c(c$,"isWithinFourBonds",function(a){if(this.mi!=a.mi)return!1;if(this.isCovalentlyBonded(a))return!0;
for(var b=a.bonds,d=0;d<b.length;d++){var c=b[d].getOtherAtom(a);if(this.isCovalentlyBonded(c))return!0;for(var g=0;g<this.bonds.length;g++)if(this.bonds[g].getOtherAtom(this).isCovalentlyBonded(c))return!0}return!1},"JM.Atom");h(c$,"findAtomsLike",function(a){return this.group.chain.model.ms.vwr.getAtomBitSet(a)},"~S");C(c$,"VIBRATION_VECTOR_FLAG",1,"IS_HETERO_FLAG",2,"FLAG_MASK",3,"RADIUS_MAX",16,"RADIUS_GLOBAL",16.1,"MAD_GLOBAL",32200)});n("JM");w(["java.lang.Float","JU.BS","$.V3"],"JM.AtomCollection",
"java.lang.Character java.util.Arrays $.Hashtable JU.A4 $.AU $.Lst $.M3 $.Measure $.P3 $.PT J.api.Interface J.atomdata.RadiusData J.c.PAL $.STR $.VDW JM.Group JS.T JU.BSUtil $.Elements $.Escape $.Logger $.Parser $.Txt $.Vibration JV.JC".split(" "),function(){c$=t(function(){this.at=this.g3d=this.vwr=null;this.ac=0;this.surfaceDistance100s=this.atomTensors=this.atomTensorList=this.hydrophobicities=this.bondingRadii=this.partialCharges=this.bfactor100s=this.occupancies=this.vibrations=this.atomSeqIDs=
this.atomSerials=this.atomTypes=this.atomNames=null;this.haveStraightness=!1;this.labeler=this.bsHidden=null;this.maxVanderwaalsRadius=this.maxBondingRadius=1.4E-45;this.hasBfactorRange=!1;this.surfaceDistanceMax=this.bfactor100Hi=this.bfactor100Lo=0;this.bsSurface=null;this.nSurfaceAtoms=0;this.bspf=this.averageAtomPoint=null;this.preserveState=!0;this.tainted=null;this.canSkipLoad=!0;this.aaRet=this.bsFoundRectangle=this.bsEmpty=null;N("JM.AtomCollection.AtomSorter")||JM.AtomCollection.$AtomCollection$AtomSorter$();
this.bsClickable=this.bsVisible=null;this.haveBSClickable=this.haveBSVisible=!1;this.bsModulated=null;s(this,arguments)},JM,"AtomCollection");K(c$,function(){this.bsHidden=new JU.BS;this.bsEmpty=new JU.BS;this.bsFoundRectangle=new JU.BS;this.bsVisible=new JU.BS;this.bsClickable=new JU.BS});c(c$,"releaseModelSet",function(){this.releaseModelSetAC()});c(c$,"releaseModelSetAC",function(){this.atomTensors=this.bondingRadii=this.partialCharges=this.bfactor100s=this.occupancies=this.vibrations=this.atomSeqIDs=
this.atomSerials=this.atomTypes=this.atomNames=this.tainted=this.bsSurface=this.surfaceDistance100s=this.bspf=this.g3d=this.vwr=this.at=null});c(c$,"mergeAtomArrays",function(a){this.tainted=a.tainted;this.atomNames=a.atomNames;this.atomTypes=a.atomTypes;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.atomTensors=a.atomTensors;
this.atomTensorList=a.atomTensorList;this.bsModulated=a.bsModulated;this.setHaveStraightness(!1);this.surfaceDistance100s=null},"JM.AtomCollection");c(c$,"setHaveStraightness",function(a){this.haveStraightness=a},"~B");c(c$,"getHaveStraightness",function(){return this.haveStraightness});c(c$,"getAtomPointVector",function(a){var b=new JU.Lst;if(null!=a)for(var d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))b.addLast(this.at[d]);return b},"JU.BS");c(c$,"getAtomCount",function(){return this.ac});c(c$,"modelSetHasVibrationVectors",
function(){return null!=this.vibrations});c(c$,"getAtomTypes",function(){return this.atomTypes});c(c$,"getPartialCharges",function(){return this.partialCharges});c(c$,"getBondingRadii",function(){return this.bondingRadii});c(c$,"getBFactors",function(){return this.bfactor100s});c(c$,"getHydrophobicity",function(){return this.hydrophobicities});c(c$,"setBsHidden",function(a){this.bsHidden=a},"JU.BS");c(c$,"isAtomHidden",function(a){return this.bsHidden.get(a)},"~N");c(c$,"getLabeler",function(){return null==
this.labeler?this.labeler=J.api.Interface.getInterface("JM.LabelToken"):this.labeler});c(c$,"getAtomInfo",function(a,b,d){return null==b?this.at[a].getInfo():this.getLabeler().formatLabel(this.vwr,this.at[a],b,d)},"~N,~S,JU.P3");c(c$,"getAtomInfoXYZ",function(a,b,d){return this.at[a].getInfoXYZ(b,d)},"~N,~B,JU.P3");c(c$,"getElementSymbol",function(a){return this.at[a].getElementSymbol()},"~N");c(c$,"getElementNumber",function(a){return this.at[a].getElementNumber()},"~N");c(c$,"getElementName",function(a){return JU.Elements.elementNameFromNumber(this.at[a].getAtomicAndIsotopeNumber())},
"~N");c(c$,"getAtomName",function(a){return this.at[a].getAtomName()},"~N");c(c$,"getAtomNumber",function(a){return this.at[a].getAtomNumber()},"~N");c(c$,"getAtomPoint3f",function(a){return this.at[a]},"~N");c(c$,"getAtomRadius",function(a){return this.at[a].getRadius()},"~N");c(c$,"getAtomVdwRadius",function(a,b){return this.at[a].getVanderwaalsRadiusFloat(this.vwr,b)},"~N,J.c.VDW");c(c$,"getAtomColix",function(a){return this.at[a].getColix()},"~N");c(c$,"getAtomChain",function(a){return this.at[a].getChainIDStr()},
"~N");c(c$,"getQuaternion",function(a,b){return 0>a?null:this.at[a].group.getQuaternion(b)},"~N,~S");c(c$,"getAtomIndexFromAtomNumber",function(a,b){for(var d=0;d<this.ac;d++){var c=this.at[d];if(c.getAtomNumber()==a&&b.get(c.mi))return d}return-1},"~N,JU.BS");c(c$,"setFormalCharges",function(a,b){if(null!=a)for(var d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))this.at[d].setFormalCharge(b),this.taintAtom(d,4)},"JU.BS,~N");c(c$,"getAtomicCharges",function(){for(var a=L(this.ac,0),b=this.ac;0<=--b;)a[b]=
this.at[b].getElementNumber();return a});c(c$,"getRadiusVdwJmol",function(a){return JU.Elements.getVanderwaalsMar(a.getElementNumber(),J.c.VDW.JMOL)/1E3},"JM.Atom");c(c$,"getMaxVanderwaalsRadius",function(){1.4E-45==this.maxVanderwaalsRadius&&this.findMaxRadii();return this.maxVanderwaalsRadius});c(c$,"findMaxRadii",function(){for(var a,b=this.ac;0<=--b;){var d=this.at[b];if((a=d.getBondingRadius())>this.maxBondingRadius)this.maxBondingRadius=a;if((a=d.getVanderwaalsRadiusFloat(this.vwr,J.c.VDW.AUTO))>
this.maxVanderwaalsRadius)this.maxVanderwaalsRadius=a}});c(c$,"clearBfactorRange",function(){this.hasBfactorRange=!1});c(c$,"calcBfactorRange",function(a){if(!this.hasBfactorRange){this.bfactor100Lo=2147483647;this.bfactor100Hi=-2147483648;if(null==a)for(var b=0;b<this.ac;b++)this.setBf(b);else for(b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))this.setBf(b);this.hasBfactorRange=!0}},"JU.BS");c(c$,"setBf",function(a){a=this.at[a].getBfactor100();a<this.bfactor100Lo?this.bfactor100Lo=a:a>this.bfactor100Hi&&
(this.bfactor100Hi=a)},"~N");c(c$,"getBfactor100Lo",function(){this.hasBfactorRange||(this.vwr.g.rangeSelected?this.calcBfactorRange(this.vwr.bsA()):this.calcBfactorRange(null));return this.bfactor100Lo});c(c$,"getBfactor100Hi",function(){this.getBfactor100Lo();return this.bfactor100Hi});c(c$,"getSurfaceDistanceMax",function(){null==this.surfaceDistance100s&&this.calcSurfaceDistances();return this.surfaceDistanceMax});c(c$,"calculateVolume",function(a,b){var d=0;if(null!=a)for(var c=a.nextSetBit(0);0<=
c;c=a.nextSetBit(c+1))d+=this.at[c].getVolume(this.vwr,b);return d},"JU.BS,J.c.VDW");c(c$,"getSurfaceDistance100",function(a){if(0==this.nSurfaceAtoms)return-1;null==this.surfaceDistance100s&&this.calcSurfaceDistances();return this.surfaceDistance100s[a]},"~N");c(c$,"calcSurfaceDistances",function(){this.calculateSurface(null,-1)});c(c$,"calculateSurface",function(a,b){0>b&&(b=3);var d=J.api.Interface.getOption("geodesic.EnvelopeCalculation").set(this.vwr,this.ac,null);d.calculate(new J.atomdata.RadiusData(null,
b,J.atomdata.RadiusData.EnumType.ABSOLUTE,null),3.4028235E38,a,JU.BSUtil.copyInvert(a,this.ac),!1,!1,!1,!0);var c=d.getPoints();this.surfaceDistanceMax=0;this.bsSurface=d.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 d=3.4028235E38==b?0:b,g=0;g<this.ac;g++)if(this.bsSurface.get(g))this.surfaceDistance100s[g]=0;else{for(var f=3.4028235E38,j=this.at[g],k=c.length;0<=
--k;){var h=Math.abs(c[k].distance(j)-d);0>h&&JU.Logger.debugging&&JU.Logger.debug("draw d"+k+" "+JU.Escape.eP(c[k])+' "'+h+" ? "+j.getInfo()+'"');f=Math.min(h,f)}h=this.surfaceDistance100s[g]=q(Math.floor(100*f));this.surfaceDistanceMax=Math.max(this.surfaceDistanceMax,h)}return c},"JU.BS,~N");c(c$,"setAtomCoord2",function(a,b,d){var c=null,g=null,f=null,j=0,k=1;if(p(d,JU.P3))c=d;else if(p(d,JU.Lst)){f=d;if(0==(k=f.size()))return;j=1}else if(JU.PT.isAP(d)){g=d;if(0==(k=g.length))return;j=2}else return;
d=0;if(null!=a)for(var h=a.nextSetBit(0);0<=h;h=a.nextSetBit(h+1)){switch(j){case 1:if(d>=k)return;c=f.get(d++);break;case 2:if(d>=k)return;c=g[d++]}switch(b){case 1146095626:this.setAtomCoord(h,c.x,c.y,c.z);break;case 1146095627:this.at[h].setFractionalCoordTo(c,!0);this.taintAtom(h,2);break;case 1146095629:this.at[h].setFractionalCoordTo(c,!1);this.taintAtom(h,2);break;case 1146095631:this.setAtomVibrationVector(h,c)}}},"JU.BS,~N,~O");c(c$,"setAtomVibrationVector",function(a,b){this.setVibrationVector(a,
b);this.taintAtom(a,12)},"~N,JU.T3");c(c$,"setAtomCoord",function(a,b,d,c){if(!(0>a||a>=this.ac)){var g=this.at[a];g.set(b,d,c);this.fixTrajectory(g);this.taintAtom(a,2)}},"~N,~N,~N,~N");c(c$,"fixTrajectory",function(a){var b=a.mi;if(this.isTrajectory(b)){var d=null!=this.unitCells&&this.unitCells[b].getCoordinatesAreFractional(),c=this.trajectorySteps.get(b)[a.i-this.am[b].firstAtomIndex];c.set(a.x,a.y,a.z);d&&this.unitCells[b].toFractional(c,!0)}},"JM.Atom");c(c$,"setAtomCoordRelative",function(a,
b,d,c){if(!(0>a||a>=this.ac)){var g=this.at[a];g.add3(b,d,c);this.fixTrajectory(g);this.taintAtom(a,2)}},"~N,~N,~N,~N");c(c$,"setAtomsCoordRelative",function(a,b,d,c){if(null!=a)for(var g=a.nextSetBit(0);0<=g;g=a.nextSetBit(g+1))this.setAtomCoordRelative(g,b,d,c)},"JU.BS,~N,~N,~N");c(c$,"setAPa",function(a,b,d,c,g,f,j){var k=0;if(!(null!=f&&0==f.length||null==a)){for(var h=null!=f&&f.length==this.ac||null!=j&&j.length==this.ac,m=a.nextSetBit(0);0<=m;m=a.nextSetBit(m+1)){h&&(k=m);if(null!=f){if(k>=
f.length)return;c=f[k++];d=z(c)}else if(null!=j){if(k>=j.length)return;g=j[k++]}var r=this.at[m];switch(b){case 1087375362:this.taintAtom(m,0);this.setAtomName(m,g);break;case 1095763969:this.taintAtom(m,13);this.setAtomNumber(m,d);break;case 1095761940:this.taintAtom(m,14);this.setAtomSeqID(m,d);break;case 1087375361:this.taintAtom(m,1);this.setAtomType(m,g);break;case 1112541185:case 1112541205:this.setAtomCoord(m,c,r.y,r.z);break;case 1112541186:case 1112541206:this.setAtomCoord(m,r.x,c,r.z);break;
case 1112541187:case 1112541207:this.setAtomCoord(m,r.x,r.y,c);break;case 1112541202:case 1112541203:case 1112541204:this.setVibrationVector2(m,b,c);break;case 1112541188:case 1112541189:case 1112541190:r.setFractionalCoord(b,c,!0);this.taintAtom(m,2);break;case 1112541191:case 1112541192:case 1112541193:r.setFractionalCoord(b,c,!1);this.taintAtom(m,2);break;case 1095763978:case 1087375365:this.setElement(r,d);break;case 1632634891:r.setFormalCharge(d);this.taintAtom(m,4);break;case 1114638362:this.setHydrophobicity(m,
c)&&this.taintAtom(m,5);break;case 1826248716:case 1288701959:this.vwr.shm.setAtomLabel(g,m);break;case 1129318401:2>c&&0.01<c&&(c*=100);this.setOccupancy(m,c)&&this.taintAtom(m,7);break;case 1112541196:this.setPartialCharge(m,c)&&this.taintAtom(m,8);break;case 1112541195:this.setBondingRadius(m,c)&&this.taintAtom(m,6);break;case 1666189314:case 1113200651:0>c?c=0:16<c&&(c=16.1);r.madAtom=Y(2E3*c);break;case 1114638363:this.vwr.slm.setSelectedAtom(r.i,0!=c);break;case 1112541199:this.setBFactor(m,
c)&&this.taintAtom(m,9);break;case 1095763991:r.setValence(d);this.taintAtom(m,10);break;case 1649412120:r.setRadius(c)?this.taintAtom(m,11):this.untaint(m,11);break;default:JU.Logger.error("unsettable atom property: "+JS.T.nameOf(b))}}switch(b){case 1114638363:this.vwr.slm.setSelectedAtom(-1,!1);break;case 1666189314:case 1113200651:this.vwr.setShapeSize(0,2147483647,a)}}},"JU.BS,~N,~N,~N,~S,~A,~A");c(c$,"setElement",function(a,b){this.taintAtom(a.i,3);a.setAtomicAndIsotopeNumber(b);a.setPaletteID(J.c.PAL.CPK.id);
a.setColixAtom(this.vwr.getColixAtomPalette(a,J.c.PAL.CPK.id))},"JM.Atom,~N");c(c$,"getVibrationCoord",function(a,b){var d;if(null==this.vibrations||null==(d=this.vibrations[a]))return 0;switch(b){case "X":return d.x;case "Y":return d.y;default:return d.z}},"~N,~S");c(c$,"getVibration",function(a,b){var d=null==this.vibrations?null:this.vibrations[a];return null==d&&b?new JU.Vibration:d},"~N,~B");c(c$,"setVibrationVector",function(a,b){if(!Float.isNaN(b.x)&&!Float.isNaN(b.y)&&!Float.isNaN(b.z)){if(null==
this.vibrations||this.vibrations.length<a)this.vibrations=Array(this.at.length);p(b,JU.Vibration)?this.vibrations[a]=b:(null==this.vibrations[a]&&(this.vibrations[a]=new JU.Vibration),this.vibrations[a].setT(b));this.at[a].setVibrationVector()}},"~N,JU.T3");c(c$,"setVibrationVector2",function(a,b,d){var c=this.getVibration(a,!0);switch(b){case 1112541202:c.x=d;break;case 1112541203:c.y=d;break;case 1112541204:c.z=d}this.setAtomVibrationVector(a,c)},"~N,~N,~N");c(c$,"setAtomName",function(a,b){var d=
JV.JC.lookupSpecialAtomID(b);this.at[a].atomID=d;0<d&&this.am[this.at[a].mi].isBioModel||(null==this.atomNames&&(this.atomNames=Array(this.at.length)),this.atomNames[a]=b)},"~N,~S");c(c$,"setAtomType",function(a,b){null==this.atomTypes&&(this.atomTypes=Array(this.at.length));this.atomTypes[a]=b},"~N,~S");c(c$,"setAtomNumber",function(a,b){null==this.atomSerials&&(this.atomSerials=D(this.at.length,0));this.atomSerials[a]=b;return!0},"~N,~N");c(c$,"setAtomSeqID",function(a,b){null==this.atomSeqIDs&&
(this.atomSeqIDs=D(this.at.length,0));this.atomSeqIDs[a]=b;return!0},"~N,~N");c(c$,"setOccupancy",function(a,b){if(null==this.occupancies){if(100==b)return!1;this.occupancies=L(this.at.length,0);for(var d=this.at.length;0<=--d;)this.occupancies[d]=100}this.occupancies[a]=b;return!0},"~N,~N");c(c$,"setPartialCharge",function(a,b){if(Float.isNaN(b))return!1;if(null==this.partialCharges){if(0==b&&!Float.$valueOf(b).equals(JM.AtomCollection.MINUSZERO))return!1;this.partialCharges=L(this.at.length,0)}this.partialCharges[a]=
b;return!0},"~N,~N");c(c$,"setBondingRadius",function(a,b){if(Float.isNaN(b))return!1;null==this.bondingRadii&&(this.bondingRadii=L(this.at.length,0));this.bondingRadii[a]=b;return!0},"~N,~N");c(c$,"setBFactor",function(a,b){if(Float.isNaN(b))return!1;if(null==this.bfactor100s){if(0==b&&null==this.bfactor100s)return!1;this.bfactor100s=T(this.at.length,0)}this.bfactor100s[a]=ka(100*(-327.68>b?-327.68:327.67<b?327.67:b)+(0>b?-0.5:0.5));return!0},"~N,~N");c(c$,"setHydrophobicity",function(a,b){if(Float.isNaN(b))return!1;
if(null==this.hydrophobicities){this.hydrophobicities=L(this.at.length,0);for(var d=0;d<this.at.length;d++)this.hydrophobicities[d]=JU.Elements.getHydrophobicity(this.at[d].getGroupID())}this.hydrophobicities[a]=b;return!0},"~N,~N");c(c$,"setAtomData",function(a,b,d,c){var g=null,f=null;switch(a){case 2:this.loadCoordinates(d,!1,!c);return;case 12:this.loadCoordinates(d,!0,!0);return;case 15:g=L(this.ac,0),f=JU.BS.newN(this.ac)}c=JU.Parser.markLines(d,";");var j=0;try{for(var k=JU.PT.parseInt(d.substring(0,
c[0]-1)),h=1;h<=k;h++){var m=JU.PT.getTokens(JU.PT.parseTrimmed(d.substring(c[h],c[h+1]-1))),r=JU.PT.parseInt(m[0])-1;if(!(0>r||r>=this.ac)){var x=this.at[r];j++;var A=m.length-1,I=JU.PT.parseFloat(m[A]);switch(a){case 15:g[r]=I;f.set(r);continue;case 13:this.setAtomNumber(r,z(I));break;case 14:this.setAtomSeqID(r,z(I));break;case 0:this.setAtomName(r,m[A]);break;case 1:this.setAtomType(r,m[A]);break;case 3:x.setAtomicAndIsotopeNumber(z(I));x.setPaletteID(J.c.PAL.CPK.id);x.setColixAtom(this.vwr.getColixAtomPalette(x,
J.c.PAL.CPK.id));break;case 4:x.setFormalCharge(z(I));break;case 5:this.setHydrophobicity(r,I);break;case 6:this.setBondingRadius(r,I);break;case 8:this.setPartialCharge(r,I);break;case 9:this.setBFactor(r,I);break;case 10:x.setValence(z(I));break;case 11:x.setRadius(I)}this.taintAtom(r,a)}}15==a&&0<j&&this.vwr.setData(b,[b,g,f,Integer.$valueOf(1)],0,0,0,0,0)}catch(n){if(y(n,Exception))JU.Logger.error("AtomCollection.loadData error: "+n);else throw n;}},"~N,~S,~S,~B");c(c$,"loadCoordinates",function(a,
b,d){var c=JU.Parser.markLines(a,";"),g=b?new JU.V3:null;try{for(var f=JU.PT.parseInt(a.substring(0,c[0]-1)),j=1;j<=f;j++){var k=JU.PT.getTokens(JU.PT.parseTrimmed(a.substring(c[j],c[j+1]))),h=JU.PT.parseInt(k[0])-1,m=JU.PT.parseFloat(k[3]),r=JU.PT.parseFloat(k[4]),x=JU.PT.parseFloat(k[5]);b?(g.set(m,r,x),this.setAtomVibrationVector(h,g)):(this.setAtomCoord(h,m,r,x),d||this.untaint(h,2))}}catch(A){if(y(A,Exception))JU.Logger.error("Frame.loadCoordinate error: "+A);else throw A;}},"~S,~B,~B");c(c$,
"validateBspf",function(a){null!=this.bspf&&this.bspf.validate(a);this.averageAtomPoint=null},"~B");c(c$,"validateBspfForModel",function(a,b){null!=this.bspf&&this.bspf.validateModel(a,b)},"~N,~B");c(c$,"setPreserveState",function(a){this.preserveState=a},"~B");c$.getUserSettableType=c(c$,"getUserSettableType",function(a){var b=0==a.indexOf("property_");a=b?a.substring(9):a;for(var d=0;15>d;d++)if(JM.AtomCollection.userSettableValues[d].equalsIgnoreCase(a))return d;return b?15:-1},"~S");c(c$,"getTaintedAtoms",
function(a){return null==this.tainted?null:this.tainted[a]},"~N");c(c$,"taintAtoms",function(a,b){this.canSkipLoad=!1;if(this.preserveState)for(var d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))this.taintAtom(d,b)},"JU.BS,~N");c(c$,"taintAtom",function(a,b){this.preserveState&&(null==this.tainted&&(this.tainted=Array(15)),null==this.tainted[b]&&(this.tainted[b]=JU.BS.newN(this.ac)),this.tainted[b].set(a),2==b&&this.validateBspfForModel(this.am[this.at[a].mi].trajectoryBaseIndex,!1))},"~N,~N");c(c$,"untaint",
function(a,b){this.preserveState&&(null==this.tainted||null==this.tainted[b]||this.tainted[b].clear(a))},"~N,~N");c(c$,"setTaintedAtoms",function(a,b){this.preserveState&&(null==a?null!=this.tainted&&(this.tainted[b]=null):(null==this.tainted&&(this.tainted=Array(15)),null==this.tainted[b]&&(this.tainted[b]=JU.BS.newN(this.ac)),JU.BSUtil.copy2(a,this.tainted[b])))},"JU.BS,~N");c(c$,"unTaintAtoms",function(a,b){if(!(null==this.tainted||null==this.tainted[b])){for(var d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+
1))this.tainted[b].clear(d);0>this.tainted[b].nextSetBit(0)&&(this.tainted[b]=null)}},"JU.BS,~N");c(c$,"findNearest2",function(a,b,d,c,g){for(var f=null,j=this.ac;0<=--j;)if(!(null!=c&&c.get(j))){var k=this.at[j];k.isClickable()&&this.isCursorOnTopOf(k,a,b,g,f)&&(f=k)}d[0]=f},"~N,~N,~A,JU.BS,~N");c(c$,"isCursorOnTopOf",function(a,b,d,c,g){return 1<a.sZ&&!this.g3d.isClippedZ(a.sZ)&&this.g3d.isInDisplayRange(a.sX,a.sY)&&a.isCursorOnTopOf(b,d,c,g)},"JM.Atom,~N,~N,~N,JM.Atom");c(c$,"findAtomsInRectangle",
function(a){var b=this.vwr.getVisibleFramesBitSet();this.bsFoundRectangle.and(this.bsEmpty);for(var d=this.ac;0<=--d;){var c=this.at[d];b.get(c.mi)&&(c.checkVisible()&&a.contains(c.sX,c.sY))&&this.bsFoundRectangle.set(d)}return this.bsFoundRectangle},"JU.Rectangle");c(c$,"fillADa",function(a,b){a.atomXyz=this.at;a.ac=this.ac;a.atomicNumber=D(this.ac,0);var d=0!=(b&2);d&&(a.atomRadius=L(this.ac,0));for(var c=0!=(b&16),g=0;g<this.ac;g++){var f=this.at[g];f.isDeleted()||!c&&0<=a.modelIndex&&f.mi!=a.firstModelIndex?
(null==a.bsIgnored&&(a.bsIgnored=new JU.BS),a.bsIgnored.set(g)):(a.atomicNumber[g]=f.getElementNumber(),a.lastModelIndex=f.mi,d&&(a.atomRadius[g]=this.getWorkingRadius(f,a)))}},"J.atomdata.AtomData,~N");c(c$,"getWorkingRadius",function(a,b){var d=0,c=b.radiusData;switch(c.factorType){case J.atomdata.RadiusData.EnumType.ABSOLUTE:d=c.value;break;case J.atomdata.RadiusData.EnumType.FACTOR:case J.atomdata.RadiusData.EnumType.OFFSET:switch(c.vdwType){case J.c.VDW.BONDING:d=a.getBondingRadius();break;case J.c.VDW.ADPMAX:d=
a.getADPMinMax(!0);break;case J.c.VDW.ADPMIN:d=a.getADPMinMax(!1);break;default:d=a.getVanderwaalsRadiusFloat(this.vwr,b.radiusData.vdwType)}d=c.factorType===J.atomdata.RadiusData.EnumType.FACTOR?d*c.value:d+c.value}return d+c.valueExtended},"JM.Atom,J.atomdata.AtomData");c(c$,"calculateHydrogens",function(a,b,d,c,g){var f=new JU.V3,j=new JU.V3,k=Array(this.ac),h=this.vwr.getDeletedAtoms(),m,r=0;if(null!=a)for(var x=a.nextSetBit(0);0<=x;x=a.nextSetBit(x+1))if(!(null!=h&&h.get(x))){var A=this.at[x],
I=A.getElementNumber();if(!(c&&6!=I)){var n=6>=I?1.1:10>=I?1:1.3;switch(I){case 7:case 8:n=1}if(!(d&&0<A.getCovalentHydrogenCount())&&(m=this.getImplicitHydrogenCount(A,!1),0!=m)){var q=this.aaRet[0],p=this.aaRet[2],s=this.aaRet[3];k[x]=Array(m);var t=0;if(0==s)switch(m){case 4:f.set(0.635,0.635,0.635),m=JU.P3.newP(f),m.add(A),k[x][t++]=m,null!=g&&g.addLast(A);case 3:f.set(-0.635,-0.635,0.635),m=JU.P3.newP(f),m.add(A),k[x][t++]=m,null!=g&&g.addLast(A);case 2:f.set(-0.635,0.635,-0.635),m=JU.P3.newP(f),
m.add(A),k[x][t++]=m,null!=g&&g.addLast(A);case 1:f.set(0.635,-0.635,-0.635),m=JU.P3.newP(f),m.add(A),k[x][t++]=m,null!=g&&g.addLast(A)}else switch(m){case 3:this.getHybridizationAndAxes(x,I,f,j,"sp3b",!1,!0);m=new JU.P3;m.scaleAdd2(n,f,A);k[x][t++]=m;null!=g&&g.addLast(A);this.getHybridizationAndAxes(x,I,f,j,"sp3c",!1,!0);m=new JU.P3;m.scaleAdd2(n,f,A);k[x][t++]=m;null!=g&&g.addLast(A);this.getHybridizationAndAxes(x,I,f,j,"sp3d",!1,!0);m=new JU.P3;m.scaleAdd2(n,f,A);k[x][t++]=m;null!=g&&g.addLast(A);
break;case 2:p=2==p||5==I||1==s&&4==q||7==I&&this.isAdjacentSp2(A);this.getHybridizationAndAxes(x,I,f,j,p?"sp2b":3==q?"sp3c":"lpa",!1,!0);m=JU.P3.newP(f);m.scaleAdd2(n,f,A);k[x][t++]=m;null!=g&&g.addLast(A);this.getHybridizationAndAxes(x,I,f,j,p?"sp2c":3==q?"sp3d":"lpb",!1,!0);m=JU.P3.newP(f);m.scaleAdd2(n,f,A);k[x][t++]=m;null!=g&&g.addLast(A);break;case 1:switch(q-s){case 1:if(8==I&&A===A.getGroup().getCarbonylOxygenAtom()){k[x]=null;continue}null!=this.getHybridizationAndAxes(x,I,f,j,2==p||5==
I||7==I&&this.isAdjacentSp2(A)?"sp2c":"sp3d",!0,!1)?(m=JU.P3.newP(f),m.scaleAdd2(n,f,A),k[x][t++]=m,null!=g&&g.addLast(A)):k[x]=[];break;case 2:this.getHybridizationAndAxes(x,I,f,j,4==q?"sp2c":"sp2b",!1,!1);m=JU.P3.newP(f);m.scaleAdd2(n,f,A);k[x][t++]=m;null!=g&&g.addLast(A);break;case 3:this.getHybridizationAndAxes(x,I,f,j,"spb",!1,!0),m=JU.P3.newP(f),m.scaleAdd2(n,f,A),k[x][t++]=m,null!=g&&g.addLast(A)}}r+=t}}}b[0]=r;return k},"JU.BS,~A,~B,~B,JU.Lst");c(c$,"isAdjacentSp2",function(a){for(var b=
a.bonds,d=0;d<b.length;d++)for(var c=b[d].getOtherAtom(a).bonds,g=0;g<c.length;g++)switch(c[g].order){case 515:case 514:case 2:case 3:return!0}return!1},"JM.Atom");c(c$,"getImplicitHydrogenCount",function(a,b){var d=a.getTargetValence();if(0>d)return 0;var c=a.getFormalCharge();null==this.aaRet&&(this.aaRet=D(4,0));this.aaRet[0]=d;this.aaRet[1]=c;this.aaRet[2]=0;this.aaRet[3]=a.getCovalentBondCount();var g=this.am[a.mi],g=g.isBioModel&&!g.isPdbWithMultipleBonds?a.group.getGroup3():null;null!=g&&0==
c&&JV.JC.getAminoAcidValenceAndCharge(g,a.getAtomName(),this.aaRet)&&(d=this.aaRet[0],c=this.aaRet[1]);0!=c&&(d+=4==d?-Math.abs(c):c,this.aaRet[0]=d);d-=a.getValence();return 0>d&&!b?0:d},"JM.Atom,~B");c(c$,"fixFormalCharges",function(a){for(var b=0,d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1)){var c=this.at[d],g=this.getImplicitHydrogenCount(c,!0);if(0!=g){var f=c.getFormalCharge(),g=f-g;c.setFormalCharge(g);this.taintAtom(d,4);JU.Logger.debugging&&JU.Logger.debug("atom "+c+" formal charge "+f+" -> "+
g);b++}}return b},"JU.BS");c(c$,"getHybridizationAndAxes",function(a,b,d,c,g,f,j){var k=0<g.length&&"-"==g.charAt(0)?g.substring(1):g;if(0<=g.indexOf("d")&&!g.endsWith("sp3d"))return this.getHybridizationAndAxesD(a,d,c,k);g=this.at[a];0==b&&(b=g.getElementNumber());var h=this.getAttached(g,4,f),m=h.length,r=k.charCodeAt(k.length-1)-97;if(0>r||6<r)r=0;d.set(0,0,0);c.set(0,0,0);for(var x=Array(4),A=0;A<m;A++)x[A]=JU.V3.newVsub(g,h[A]),x[A].normalize(),d.add(x[A]);0<m&&c.setT(x[0]);A=!1;a=new JU.V3;
if(3<=m){2.984513>c.angle(x[1])?a.cross(c,x[1]):a.cross(c,x[2]);a.normalize();var n=new JU.V3;2.984513>x[1].angle(x[2])?n.cross(x[1],x[2]):n.cross(c,x[2]);n.normalize();A=0.95<=Math.abs(n.dot(a))}var q=0==k.indexOf("sp3"),p=!q&&0==k.indexOf("sp2"),s=!q&&!p&&0==k.indexOf("sp"),t=0==k.indexOf("p"),u=0==k.indexOf("lp"),n=null;if(f){if(0==m)return null;if(q){if(3<r||4<m)return null}else if(p){if(2<r||3<m)return null}else if(s&&(1<r||2<m))return null;switch(m){case 1:if(1==b&&!q)return null;if(q){n="sp3";
break}switch(h[0].getCovalentBondCount()){case 1:if(2!=h[0].getValence()){n="sp";break}case 2:n=s?"sp":"sp2";break;case 3:if(!p&&!t)return null;n="sp2"}break;case 2:if(0.1>d.length()){if(0<=k.indexOf("2")||0<=k.indexOf("3"))return null;n="sp";break}n=q?"sp3":"sp2";if(0==k.indexOf("sp"))break;if(u){n="lp";break}n=k;break;default:if(A)n="sp2";else{if(u&&3==m){n="lp";break}n="sp3"}}if(null==n)return null;if(0==k.indexOf("p")){if("sp3"===n)return null}else if(0>k.indexOf(n))return null}if(r<m&&!k.startsWith("p")&&
!k.startsWith("l"))return d.sub2(h[r],g),d.normalize(),n;switch(m){case 0:k.equals("sp3c")||k.equals("sp2d")||k.equals("lpa")?d.set(-0.5,-0.7,1):k.equals("sp3b")||k.equals("lpb")?d.set(0.5,-0.7,-1):k.equals("sp3a")?d.set(0,1,0):d.set(0,0,1);c.set(1,0,0);break;case 1:a.setT(JM.AtomCollection.vRef);c.cross(a,d);if(q){for(A=0;A<h[0].bonds.length;A++)if(h[0].bonds[A].isCovalent()&&h[0].getBondedAtomIndex(A)!=g.i&&(c.sub2(h[0],h[0].bonds[A].getOtherAtom(h[0])),c.cross(d,c),0!=c.length())){c.cross(c,d);
break}c.normalize();Float.isNaN(c.x)&&(c.setT(JM.AtomCollection.vRef),c.cross(c,d));a.cross(d,c);a.normalize();d.normalize();c.scaleAdd2(2.828,c,d);3!=r&&(c.normalize(),(new JU.M3).setAA(JU.A4.new4(d.x,d.y,d.z,2.09439507*(2==r?1:-1))).rotate(c));d.setT(c);c.cross(a,d);break}a.cross(c,d);switch(h[0].getCovalentBondCount()){case 1:if(2!=h[0].getValence())break;case 2:j=h[0];c.setT(d);for(a.setT(JM.AtomCollection.vRef);null!=j&&2==j.getCovalentBondCount();){k=j.bonds;b=null;for(A=0;A<k.length;A++)if(k[A].isCovalent()&&
(b=k[A].getOtherAtom(j),b!==g)){a.sub2(b,j);break}a.cross(a,c);if(0.1<a.length()||2!=b.getCovalentBondCount())break;g=j;j=b}0.1<a.length()?(d.cross(a,c),d.normalize(),1==r&&d.scale(-1),d.scale(JM.AtomCollection.sqrt3_2),d.scaleAdd2(0.5,c,d),t&&(a.cross(d,c),d.setT(a),a.setT(c)),c.cross(a,d)):(d.setT(c),c.cross(JM.AtomCollection.vRef,c));break;case 3:this.getHybridizationAndAxes(h[0].i,0,c,a,"pz",!1,j),a.setT(c),p?(c.cross(c,d),1==r&&c.scale(-1),c.scale(JM.AtomCollection.sqrt3_2),d.scaleAdd2(0.5,d,
c)):(a.setT(d),d.setT(c)),c.cross(a,d)}break;case 2:if(0.1>d.length()){if(!k.equals("pz")){b=h[0];(g=3==b.getCovalentBondCount())||(g=3==(b=h[1]).getCovalentBondCount());if(g){this.getHybridizationAndAxes(b.i,0,c,d,"pz",!1,j);k.equals("px")&&c.scale(-1);d.setT(x[0]);break}a.setT(JM.AtomCollection.vRef);d.cross(a,c);a.cross(d,c)}d.setT(c);c.cross(a,d);break}a.cross(d,c);if(p){c.cross(d,a);break}if(q||u){a.normalize();d.normalize();k.equals("lp")||(0==r||2==r?d.scaleAdd2(-1.2,a,d):d.scaleAdd2(1.2,a,
d));c.cross(d,a);break}c.cross(d,a);d.setT(a);0>d.z&&(d.scale(-1),c.scale(-1));break;default:if(q)break;if(!A){c.cross(d,c);break}d.setT(a);0>d.z&&j&&(d.scale(-1),c.scale(-1))}c.normalize();d.normalize();return n},"~N,~N,JU.V3,JU.V3,~S,~B,~B");c(c$,"getHybridizationAndAxesD",function(a,b,d,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 g=c.startsWith("dsp3"),
f=c.charCodeAt(c.length-1)-97;if(null!=b&&(!g&&(5<f||!c.startsWith("d2sp3"))||g&&4<f))return null;a=this.at[a];c=this.getAttached(a,6,!0);if(null==c)return null==b?null:"?";var j=c.length;if(3>j&&null!=b)return null;for(var k=f>=j,h=q(j*(j-1)/2),m=JU.AU.newInt2(h),r=D(3,0),h=D(3,h,0),x=0,A=0,n=0;n<j-1;n++)for(var p=n+1;p<j;p++){var s=JU.Measure.computeAngleABC(c[n],a,c[p],!0),s=105>s?0:150<=s?2:1;h[s][r[s]]=x;r[s]++;m[x++]=[n,p];0==n&&1==s&&A++}x=100*r[0]+10*r[1]+r[2];if(null==b)switch(x){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==A%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(x){default:return null;
case 201:break;case 210:case 330:case 411:case 631:if(!g)return null;break;case 300:case 402:case 501:case 802:case 1203:if(g)return null}if(k)if(g)switch(r[1]){case 0:b.sub2(c[m[h[0][0]][0]],a);d.sub2(c[m[h[0][0]][1]],a);b.cross(b,d);b.normalize();4==f&&b.scale(-1);r=this.findNotAttached(j,m,h[2],r[2]);n=r.nextSetBit(0);d.sub2(c[n],a);d.normalize();d.scale(0.5);b.scaleAdd2(JM.AtomCollection.sqrt3_2,b,d);f=-1;break;case 1:4==f?(d=m[h[1][0]],b.add2(c[d[0]],c[d[1]]),b.scaleAdd2(-2,a,b),f=-1):(r=this.findNotAttached(j,
m,h[1],r[1]),f=r.nextSetBit(0));break;default:r=this.findNotAttached(j,m,h[1],r[1]),f=r.nextSetBit(0)}else{x=!1;if(4==j)switch(r[2]){case 1:r=this.findNotAttached(j,m,h[2],r[2]);n=r.nextSetBit(0);f=4==f?n:r.nextSetBit(n+1);break;default:x=!0}else{r=this.findNotAttached(j,m,h[2],r[2]);n=r.nextSetBit(0);for(p=j;p<f&&0<=n;p++)n=r.nextSetBit(n+1);-1==n?x=!0:f=n}x&&(b.sub2(c[m[h[0][0]][0]],a),d.sub2(c[m[h[0][0]][1]],a),b.cross(b,d),4==f&&b.scale(-1),f=-1)}0<=f&&b.sub2(c[f],a);k&&b.scale(-1);b.normalize();
return g?"dsp3":"d2sp3"},"~N,JU.V3,JU.V3,~S");c(c$,"getAttached",function(a,b,d){var c=a.getCovalentBondCount();if(c>b)return null;b=Array(c);if(0<c){for(var c=a.bonds,g=0,f=0;f<c.length;f++)c[f].isCovalent()&&(b[g++]=c[f].getOtherAtom(a));d&&java.util.Arrays.sort(b,M(JM.AtomCollection.AtomSorter,this,null))}return b},"JM.Atom,~N,~B");c(c$,"findNotAttached",function(a,b,d,c){var g=JU.BS.newN(a);g.setBits(0,a);for(var f=0;f<a;f++)for(var j=0;j<c;j++){var k=b[d[j]];(k[0]==f||k[1]==f)&&g.clear(f)}return g},
"~N,~A,~A,~N");c(c$,"getAtomBitsMDa",function(a,b){var d=new JU.BS,c,g;c=p(b,Integer)?b.intValue():0;var f=0;switch(a){case 1613758488:return this.getWaterAtoms(d);case 1095761939:for(f=this.ac;0<=--f;)this.at[f].getResno()==c&&d.set(f);break;case 1297090050:for(f=this.ac;0<=--f;)this.at[f].getSymOp()==c&&d.set(f);break;case 1095763969:for(f=this.ac;0<=--f;)this.at[f].getAtomNumber()==c&&d.set(f);break;case 1087375362:c=","+b+",";for(f=this.ac;0<=--f;)g=this.at[f].getAtomName(),0<=c.indexOf(g)&&0<=
c.indexOf(","+g+",")&&d.set(f);break;case 1087375361:c=","+b+",";for(f=this.ac;0<=--f;)g=this.at[f].getAtomType(),0<=c.indexOf(g)&&0<=c.indexOf(","+g+",")&&d.set(f);break;case 1048613:for(f=this.ac;0<=--f;)this.at[f].getGroupID()==c&&d.set(f);break;case 1048609:return JU.BSUtil.copy(this.getChainBits(c));case 1048614:return JU.BSUtil.copy(this.getSeqcodeBits(c,!0));case 1613758470:for(f=this.ac;0<=--f;)this.at[f].isHetero()&&d.set(f);break;case 1613758476:for(f=this.ac;0<=--f;)1==this.at[f].getElementNumber()&&
d.set(f);break;case 3145741:for(f=this.ac;0<=--f;)this.at[f].isLeadAtom()&&d.set(f);break;case 3145744:for(f=this.ac;0<=--f;)this.at[f].isProtein()&&d.set(f);break;case 3145764:for(f=this.ac;0<=--f;)this.at[f].isCarbohydrate()&&d.set(f);break;case 137363467:case 3145760:g=137363467==a?J.c.STR.HELIX:J.c.STR.SHEET;for(f=this.ac;0<=--f;)this.at[f].isWithinStructure(g)&&d.set(f);break;case 3145742:for(f=this.ac;0<=--f;)this.at[f].isNucleic()&&d.set(f);break;case 3145732:for(f=this.ac;0<=--f;)this.at[f].isDna()&&
d.set(f);break;case 3145750:for(f=this.ac;0<=--f;)this.at[f].isRna()&&d.set(f);break;case 3145746:for(f=this.ac;0<=--f;)this.at[f].isPurine()&&d.set(f);break;case 3145748:for(f=this.ac;0<=--f;)this.at[f].isPyrimidine()&&d.set(f);break;case 1087375365:c=b;g=new JU.BS;for(f=c.nextSetBit(0);0<=f;f=c.nextSetBit(f+1))g.set(this.getElementNumber(f));for(f=this.ac;0<=--f;)g.get(this.getElementNumber(f))&&d.set(f);break;case 1095761941:c=b;g=new JU.BS;for(f=c.nextSetBit(0);0<=f;f=c.nextSetBit(f+1))g.set(this.at[f].atomSite);
for(f=this.ac;0<=--f;)g.get(this.at[f].atomSite)&&d.set(f);break;case 1073741824:return this.getIdentifierOrNull(b);case 1048608:c=b.toUpperCase();0<=c.indexOf("\\?")&&(c=JU.PT.rep(c,"\\?","\u0001"));(g=c.startsWith("?*"))&&(c=c.substring(1));for(f=this.ac;0<=--f;)this.isAtomNameMatch(this.at[f],c,g,g)&&d.set(f);break;case 1048607:for(f=this.ac;0<=--f;)this.at[f].isAltLoc(b)&&d.set(f);break;case 1048612:return this.getSpecName(b)}if(0>f)return d;c=b;var j;g=c.nextSetBit(0);if(0>g)return d;f=0;switch(a){case 1087373318:for(f=
g;0<=f;f=c.nextSetBit(f+1))g=this.at[f].getGroup().selectAtoms(d),g>f&&(f=g);break;case 1095766030:for(f=g;0<=f;f=c.nextSetBit(f+1))if(!d.get(f)){j=this.at[f].mi;d.set(f);for(g=f;0<=--g;)if(this.at[g].mi==j)d.set(g);else break;for(;++f<this.ac;)if(this.at[f].mi==j)d.set(f);else break}break;case 1087373316:c=JU.BSUtil.copy(b);for(f=c.nextSetBit(0);0<=f;f=c.nextSetBit(f+1))this.at[f].getChain().setAtomBitSet(d),c.andNot(d);break;case 1095761937:for(f=g;0<=f;f=c.nextSetBit(f+1))if(!d.get(f)){j=this.at[f].getPolymerIndexInModel();
d.set(f);for(g=f;0<=--g;)if(this.at[g].getPolymerIndexInModel()==j)d.set(g);else break;for(;++f<this.ac;)if(this.at[f].getPolymerIndexInModel()==j)d.set(f);else break}break;case 1641025539:for(f=g;0<=f;f=c.nextSetBit(f+1))if(!d.get(f)){j=this.at[f].getGroup().getStructure();d.set(f);for(g=f;0<=--g;)if(this.at[g].getGroup().getStructure()===j)d.set(g);else break;for(;++f<this.ac;)if(this.at[f].getGroup().getStructure()===j)d.set(f);else break}}0==f&&JU.Logger.error("MISSING getAtomBits entry for "+
JS.T.nameOf(a));return d},"~N,~O");c(c$,"getWaterAtoms",function(a){for(var b=D(2,0),d,c=this.ac;0<=--c;){var g=this.at[c].getGroupID();if(42<=g&&45>g)a.set(c);else if(8==(d=this.at[c]).getElementNumber()&&2==d.getCovalentBondCount()){for(var g=d.getBonds(),f=0,j,k=g.length;0<=--k&&3>f;)if(g[k].isCovalent()&&1==(j=g[k].getOtherAtom(d)).getElementNumber())b[f++%2]=j.i;2==f&&(a.set(b[1]),a.set(b[0]),a.set(c))}}return a},"JU.BS");c(c$,"getIdentifierOrNull",function(a){var b=this.getSpecNameOrNull(a,
!1);0<=a.indexOf("\\?")&&(a=JU.PT.rep(a,"\\?","\u0001"));if(null!=b||0<a.indexOf("?"))return b;if(0<a.indexOf("*"))return this.getSpecNameOrNull(a,!0);for(var d=a.length,c=0;c<d&&Character.isLetter(a.charAt(c));)++c;b=this.getSpecNameOrNull(a.substring(0,c),!1);if(c==d)return b;null==b&&(b=new JU.BS);for(var g=c;c<d&&Character.isDigit(a.charAt(c));)++c;var f=0;try{f=Integer.parseInt(a.substring(g,c))}catch(j){if(y(j,NumberFormatException))return null;throw j;}g=" ";c<d&&"^"==a.charAt(c)&&++c<d&&(g=
a.charAt(c));f=JM.Group.getSeqcodeFor(f,g);f=this.getSeqcodeBits(f,!1);if(null==f){" "!=g&&(f=this.getSeqcodeBits(Character.toUpperCase(a.charAt(c)).charCodeAt(0),!1));if(null==f)return null;c++}b.and(f);if(c>=d)return b;if(c!=d-1)return null;b.and(this.getChainBits(a.charCodeAt(c)));return b},"~S");c(c$,"getSpecName",function(a){var b=this.getSpecNameOrNull(a,!1);if(null!=b)return b;0<a.indexOf("*")&&(b=this.getSpecNameOrNull(a,!0));return null==b?new JU.BS:b},"~S");c(c$,"getSpecNameOrNull",function(a,
b){var d=null;a=a.toUpperCase();0<=a.indexOf("\\?")&&(a=JU.PT.rep(a,"\\?","\u0001"));var c=a.startsWith("?*");c&&(a=a.substring(1));for(var g=this.ac;0<=--g;){var f=this.at[g].getGroup3(!0);if(null!=f&&0<f.length){if(JU.Txt.isMatch(f,a,b,!0)){null==d&&(d=JU.BS.newN(g+1));for(d.set(g);0<=--g&&this.at[g].getGroup3(!0).equals(f);)d.set(g);g++}}else this.isAtomNameMatch(this.at[g],a,b,c)&&(null==d&&(d=JU.BS.newN(g+1)),d.set(g))}return d},"~S,~B");c(c$,"isAtomNameMatch",function(a,b,d,c){return JU.Txt.isMatch(a.getAtomName().toUpperCase(),
b,d,c)},"JM.Atom,~S,~B,~B");c(c$,"getSeqcodeBits",function(a,b){var d=new JU.BS,c=JM.Group.getSeqNumberFor(a),g=2147483647!=c,f=!0,j=JM.Group.getInsertionCodeChar(a);switch(j){case "?":for(var k=this.ac;0<=--k;){var h=this.at[k].getSeqcode();if(!g||c==JM.Group.getSeqNumberFor(h)&&0!=JM.Group.getInsertionCodeFor(h))d.set(k),f=!1}break;default:for(k=this.ac;0<=--k;)if(h=this.at[k].getSeqcode(),a==h||!g&&a==JM.Group.getInsertionCodeFor(h)||"*"==j&&c==JM.Group.getSeqNumberFor(h))d.set(k),f=!1}return!f||
b?d:null},"~N,~B");c(c$,"getChainBits",function(a){var b=256>a&&this.vwr.getBoolean(603979823);b||(a=JM.AtomCollection.chainToUpper(a));for(var d=new JU.BS,c=JU.BS.newN(this.ac),g,f=c.nextClearBit(0);f<this.ac;f=c.nextClearBit(f+1)){var j=this.at[f].getChain();a==(g=j.chainID)||!b&&a==JM.AtomCollection.chainToUpper(g)?(j.setAtomBitSet(d),c.or(d)):j.setAtomBitSet(c)}return d},"~N");c$.chainToUpper=c(c$,"chainToUpper",function(a){return String.fromCharCode(a).toUpperCase().charCodeAt(0)},"~N");c(c$,
"getAtomIndices",function(a){for(var b=0,d=D(this.ac,0),c=a.nextSetBit(0);0<=c&&c<this.ac;c=a.nextSetBit(c+1))d[c]=++b;return d},"JU.BS");c(c$,"getAtomsNearPlane",function(a,b){for(var d=new JU.BS,c=this.ac;0<=--c;){var g=this.at[c],f=JU.Measure.distanceToPlane(b,g);(0<a&&-0.1<=f&&f<=a||0>a&&0.1>=f&&f>=a||0==a&&0.01>Math.abs(f))&&d.set(g.i)}return d},"~N,JU.P4");c(c$,"getAtomsNearPts",function(a,b,d){var c=new JU.BS;if(0==b.length||null!=d&&0==d.cardinality())return c;null==d&&(d=JU.BSUtil.setAll(b.length));
for(var g=this.ac;0<=--g;)for(var f=this.at[g],j=d.nextSetBit(0);0<=j;j=d.nextSetBit(j+1))if(f.distance(b[j])<a){c.set(g);break}return c},"~N,~A,JU.BS");c(c$,"getRenderable",function(a){a.clearAll();this.haveBSClickable=this.haveBSVisible=!1;for(var b=this.ac;0<=--b;)this.at[b].isVisible(1)&&a.set(b)},"JU.BS");c(c$,"getVisibleSet",function(){if(this.haveBSVisible)return this.bsVisible;this.bsVisible.clearAll();for(var a=this.ac;0<=--a;)this.at[a].checkVisible()&&this.bsVisible.set(a);this.haveBSVisible=
!0;return this.bsVisible});c(c$,"getClickableSet",function(){if(this.haveBSClickable)return this.bsClickable;this.bsClickable.clearAll();for(var a=this.ac;0<=--a;)this.at[a].isClickable()&&this.bsClickable.set(a);this.haveBSClickable=!0;return this.bsClickable});c(c$,"isModulated",function(a){return null!=this.bsModulated&&this.bsModulated.get(a)},"~N");c(c$,"deleteModelAtoms",function(a,b,d){this.at=JU.AU.deleteElements(this.at,a,b);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,d);this.deleteAtomTensors(d);this.atomNames=JU.AU.deleteElements(this.atomNames,a,b);this.atomTypes=JU.AU.deleteElements(this.atomTypes,a,b);this.atomSerials=JU.AU.deleteElements(this.atomSerials,a,b);this.atomSeqIDs=JU.AU.deleteElements(this.atomSeqIDs,a,b);this.bfactor100s=JU.AU.deleteElements(this.bfactor100s,a,b);this.hasBfactorRange=!1;this.occupancies=JU.AU.deleteElements(this.occupancies,a,b);this.partialCharges=
JU.AU.deleteElements(this.partialCharges,a,b);this.atomTensorList=JU.AU.deleteElements(this.atomTensorList,a,b);this.vibrations=JU.AU.deleteElements(this.vibrations,a,b);this.nSurfaceAtoms=0;this.surfaceDistance100s=this.bsSurface=null;if(null!=this.tainted)for(a=0;15>a;a++)JU.BSUtil.deleteBits(this.tainted[a],d)},"~N,~N,JU.BS");c(c$,"getAtomIdentityInfo",function(a,b,d){b.put("_ipt",Integer.$valueOf(a));b.put("atomIndex",Integer.$valueOf(a));b.put("atomno",Integer.$valueOf(this.getAtomNumber(a)));
b.put("info",this.getAtomInfo(a,null,d));b.put("sym",this.getElementSymbol(a))},"~N,java.util.Map,JU.P3");c(c$,"getAtomTensorList",function(a){return 0>a||null==this.atomTensorList||a>=this.atomTensorList.length?null:this.atomTensorList[a]},"~N");c(c$,"deleteAtomTensors",function(a){if(null!=this.atomTensors){for(var b=new JU.Lst,d,c=this.atomTensors.keySet().iterator();c.hasNext()&&((d=c.next())||1);){for(var g=this.atomTensors.get(d),f=g.size();0<=--f;){var j=g.get(f);(a.get(j.atomIndex1)||0<=j.atomIndex2&&
a.get(j.atomIndex2))&&g.remove(f)}0==g.size()&&b.addLast(d)}for(f=b.size();0<=--f;)this.atomTensors.remove(b.get(f))}},"JU.BS");c(c$,"setAtomTensors",function(a,b){if(!(null==b||0==b.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(b);for(var d=b.size();0<=--d;){var c=b.get(d);
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$.getTensorList=c(c$,"getTensorList",function(a){for(var b=-1,d=!1,c=a.size(),g=c;0<=--g;){var f=a.get(g);f.forThermalEllipsoid?b=g:2==f.iType&&(d=!0)}var j=Array((0<=b||!d?0:1)+c);if(0<=b&&(j[0]=a.get(b),1==a.size()))return j;if(d){b=0;for(g=c;0<=--g;)f=a.get(g),f.forThermalEllipsoid||(j[++b]=f)}else for(g=0;g<c;g++)j[g]=a.get(g);return j},"JU.Lst");c(c$,
"getAtomTensor",function(a,b){var d=this.getAtomTensorList(a);if(null!=d&&null!=b){b=b.toLowerCase();for(var c=0;c<d.length;c++){var g=d[c];if(null!=g&&(b.equals(g.type)||b.equals(g.altType)))return g}}return null},"~N,~S");c(c$,"addTensor",function(a,b){b=b.toLowerCase();var d=this.atomTensors.get(b);null==d&&this.atomTensors.put(b,d=new JU.Lst);d.addLast(a)},"JU.Tensor,~S");c(c$,"getAllAtomTensors",function(a){if(null==this.atomTensors)return null;if(null!=a)return this.atomTensors.get(a.toLowerCase());
a=new JU.Lst;for(var b,d=this.atomTensors.entrySet().iterator();d.hasNext()&&((b=d.next())||1);)a.addAll(b.getValue());return a},"~S");c$.$AtomCollection$AtomSorter$=function(){G(self.c$);c$=t(function(){Q(this,arguments);s(this,arguments)},JM.AtomCollection,"AtomSorter",null,java.util.Comparator);h(c$,"compare",function(a,b){return a.i>b.i?1:a.i<b.i?-1:0},"JM.Atom,JM.Atom");c$=F()};c$.MINUSZERO=c$.prototype.MINUSZERO=Float.$valueOf(-0);C(c$,"TAINT_ATOMNAME",0,"TAINT_ATOMTYPE",1,"TAINT_COORD",2,"TAINT_ELEMENT",
3,"TAINT_FORMALCHARGE",4,"TAINT_HYDROPHOBICITY",5,"TAINT_BONDINGRADIUS",6,"TAINT_OCCUPANCY",7,"TAINT_PARTIALCHARGE",8,"TAINT_TEMPERATURE",9,"TAINT_VALENCE",10,"TAINT_VANDERWAALS",11,"TAINT_VIBRATION",12,"TAINT_ATOMNO",13,"TAINT_SEQID",14,"TAINT_MAX",15,"userSettableValues",null);JM.AtomCollection.userSettableValues="atomName atomType coord element formalCharge hydrophobicity ionic occupany partialCharge temperature valence vanderWaals vibrationVector atomNo seqID".$plit(" ");c$.sqrt3_2=c$.prototype.sqrt3_2=
Math.sqrt(3)/2;c$.vRef=c$.prototype.vRef=JU.V3.new3(3.14159,2.71828,1.41421);C(c$,"almost180",2.984513)});n("JM");w(["J.api.AtomIndexIterator"],"JM.AtomIteratorWithinModel",["J.atomdata.RadiusData"],function(){c$=t(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;s(this,arguments)},JM,"AtomIteratorWithinModel",null,J.api.AtomIndexIterator);u(c$,function(){});c(c$,"initialize",function(a,b,d,c,g,f){this.bspf=a;this.bsSelected=b;this.isGreaterOnly=d;this.isZeroBased=c;this.hemisphereOnly=g;this.threadSafe=f;this.cubeIterator=null},"J.bspt.Bspf,JU.BS,~B,~B,~B,~B");h(c$,"setModel",function(a,b,d,c,g,f,j){this.threadSafe&&(b=-1-b);if(b!=this.modelIndex||null==this.cubeIterator)this.cubeIterator=this.bspf.getCubeIterator(b),
this.modelIndex=b;this.zeroBase=this.isZeroBased?d:0;if(-2147483648!=f){this.atomIndex=0>f?-1:c;if(this.isVdw=null!=j)this.radiusData=j,this.atoms=a.at,this.vwr=a.vwr,f=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(g,f)}},"JM.ModelSet,~N,~N,~N,JU.T3,~N,J.atomdata.RadiusData");h(c$,"setCenter",function(a,b){this.setCenter2(a,b)},"JU.T3,~N");
c(c$,"setCenter2",function(a,b){null!=this.cubeIterator&&(this.cubeIterator.initialize(a,b,this.hemisphereOnly),this.distanceSquared=b*b)},"JU.T3,~N");h(c$,"hasNext",function(){return this.hasNext2()});c(c$,"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});h(c$,"next",function(){return this.iNext-this.zeroBase});h(c$,"foundDistance2",function(){return null==this.cubeIterator?-1:this.cubeIterator.foundDistance2()});h(c$,"addAtoms",function(a){for(var b;this.hasNext();)if(0<=(b=this.next())){var d;if(this.isVdw){d=this.atoms[b].getVanderwaalsRadiusFloat(this.vwr,this.radiusData.vdwType)+this.vdw1;switch(this.radiusData.factorType){case J.atomdata.RadiusData.EnumType.OFFSET:d+=
2*this.radiusData.value;break;case J.atomdata.RadiusData.EnumType.FACTOR:d*=this.radiusData.value}d*=d}else d=this.distanceSquared;this.foundDistance2()<=d&&a.set(b)}},"JU.BS");h(c$,"release",function(){null!=this.cubeIterator&&(this.cubeIterator.release(),this.cubeIterator=null)})});n("JM");w(["JM.AtomIteratorWithinModel"],"JM.AtomIteratorWithinModelSet",null,function(){c$=t(function(){this.center=this.bsModels=null;this.distance=0;s(this,arguments)},JM,"AtomIteratorWithinModelSet",JM.AtomIteratorWithinModel);
u(c$,function(a){E(this,JM.AtomIteratorWithinModelSet,[]);this.bsModels=a},"JU.BS");h(c$,"setCenter",function(a,b){this.center=a;this.distance=b;this.set(0)},"JU.T3,~N");c(c$,"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");h(c$,"hasNext",function(){return this.hasNext2()?!0:!this.set(this.modelIndex+1)?!1:this.hasNext()})});n("JM");w(["JU.Edge",
"JV.JC"],"JM.Bond",["JU.C"],function(){c$=t(function(){this.atom2=this.atom1=null;this.shapeVisibilityFlags=this.colix=this.mad=0;s(this,arguments)},JM,"Bond",JU.Edge);u(c$,function(a,b,d,c,g){E(this,JM.Bond,[]);this.atom1=a;this.atom2=b;this.colix=g;this.setOrder(d);this.setMad(c)},"JM.Atom,JM.Atom,~N,~N,~N");c(c$,"setMad",function(a){this.mad=a;this.setShapeVisibility(0!=a)},"~N");c(c$,"setShapeVisibilityFlags",function(a){this.shapeVisibilityFlags=a},"~N");c(c$,"getShapeVisibilityFlags",function(){return this.shapeVisibilityFlags});
c(c$,"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(c$,"getIdentity",function(){return this.index+1+" "+this.getOrderNumberAsString()+" "+this.atom1.getInfo()+" -- "+this.atom2.getInfo()+" "+this.atom1.distance(this.atom2)});
h(c$,"isCovalent",function(){return 0!=(this.order&1023)});h(c$,"isHydrogen",function(){return JM.Bond.isOrderH(this.order)});c$.isOrderH=c(c$,"isOrderH",function(a){return 0!=(a&30720)},"~N");c(c$,"isStereo",function(){return 0!=(this.order&1024)});c(c$,"isPartial",function(){return 0!=(this.order&224)});c(c$,"isAromatic",function(){return 0!=(this.order&512)});c(c$,"isPymolStyle",function(){return 98304==(this.order&98304)});c(c$,"setPaletteID",function(){},"~N");c(c$,"getEnergy",function(){return 0});
c(c$,"getValence",function(){return!this.isCovalent()?0:this.isPartial()||this.is(515)?1:this.order&7});c(c$,"deleteAtomReferences",function(){null!=this.atom1&&this.atom1.deleteBond(this);null!=this.atom2&&this.atom2.deleteBond(this);this.atom1=this.atom2=null});c(c$,"setColix",function(a){this.colix=a},"~N");c(c$,"setTranslucent",function(a,b){this.colix=JU.C.getColixTranslucent3(this.colix,a,b)},"~B,~N");c(c$,"setOrder",function(a){16==this.atom1.getElementNumber()&&16==this.atom2.getElementNumber()&&
(a|=256);512==a&&(a=515);this.order=a|this.order&131072},"~N");c(c$,"getAtom1",function(){return this.atom1});c(c$,"getAtom2",function(){return this.atom2});h(c$,"getAtomIndex1",function(){return this.atom1.i});h(c$,"getAtomIndex2",function(){return this.atom2.i});c(c$,"getRadius",function(){return this.mad/2E3});h(c$,"getCovalentOrder",function(){return JU.Edge.getCovalentBondOrder(this.order)});c(c$,"getOrderName",function(){return JU.Edge.getBondOrderNameFromOrder(this.order)});c(c$,"getOrderNumberAsString",
function(){return JU.Edge.getBondOrderNumberFromOrder(this.order)});c(c$,"getColix1",function(){return JU.C.getColixInherited(this.colix,this.atom1.colixAtom)});c(c$,"getColix2",function(){return JU.C.getColixInherited(this.colix,this.atom2.colixAtom)});c(c$,"getOtherAtom",function(a){return this.atom1===a?this.atom2:this.atom2===a?this.atom1:null},"JM.Atom");c(c$,"setIndex",function(a){this.index=a},"~N");c(c$,"is",function(a){return(this.order&-131073)==a},"~N");h(c$,"getOtherAtomNode",function(a){return this.atom1===
a?this.atom2:this.atom2===a?this.atom1:null},"JU.Node");h(c$,"toString",function(){return this.atom1+" - "+this.atom2});c$.myVisibilityFlag=c$.prototype.myVisibilityFlag=JV.JC.getShapeVisibilityFlag(1)});n("JM");w(["JM.AtomCollection","JU.BS"],"JM.BondCollection","JU.AU JM.Bond $.BondIteratorSelected $.HBond JU.BSUtil $.Edge $.Logger".split(" "),function(){c$=t(function(){this.molecules=null;this.moleculeCount=0;this.bo=null;this.bondCount=0;this.freeBonds=this.numCached=null;this.haveWarned=!1;this.defaultCovalentMad=
0;this.bsAromatic=this.bsAromaticDouble=this.bsAromaticSingle=null;this.haveHiddenBonds=!1;s(this,arguments)},JM,"BondCollection",JM.AtomCollection);K(c$,function(){this.numCached=D(5,0);this.freeBonds=Array(5);for(var a=5;0<--a;)this.freeBonds[a]=Array(200);this.bsAromatic=new JU.BS});h(c$,"releaseModelSet",function(){this.releaseModelSetBC()});c(c$,"releaseModelSetBC",function(){this.freeBonds=this.bo=null;this.releaseModelSetAC()});c(c$,"resetMolecules",function(){this.molecules=null;this.moleculeCount=
0});c(c$,"getBondAt",function(a){return this.bo[a]},"~N");c(c$,"getBondIteratorForType",function(a,b){return new JM.BondIteratorSelected(this.bo,this.bondCount,a,b,this.vwr.getBoolean(603979812))},"~N,JU.BS");c(c$,"getBondIterator",function(a){return new JM.BondIteratorSelected(this.bo,this.bondCount,131071,a,!1)},"JU.BS");c(c$,"getBondAtom1",function(a){return this.bo[a].atom1},"~N");c(c$,"getBondAtom2",function(a){return this.bo[a].atom2},"~N");c(c$,"getBondRadius",function(a){return this.bo[a].getRadius()},
"~N");c(c$,"getBondOrder",function(a){return this.bo[a].order},"~N");c(c$,"getBondColix1",function(a){return this.bo[a].getColix1()},"~N");c(c$,"getBondColix2",function(a){return this.bo[a].getColix2()},"~N");c(c$,"getBondModelIndex",function(a){return this.bo[a].atom1.mi},"~N");c(c$,"getBondCountInModel",function(a){for(var b=0,d=this.bondCount;0<=--d;)this.bo[d].atom1.mi==a&&b++;return b},"~N");c(c$,"getBondsForSelectedAtoms",function(a,b){for(var d=new JU.BS,c=0;c<this.bondCount;++c){var g=this.bo[c],
f=a.get(g.atom1.i),g=a.get(g.atom2.i);((new Boolean(!b&f&g)).valueOf()||(new Boolean(b&(new Boolean(f|g)).valueOf())).valueOf())&&d.set(c)}return d},"JU.BS,~B");c(c$,"bondAtoms",function(a,b,d,c,g,f,j,k){d=this.getOrAddBond(a,b,d,c,g,f,!0);k&&(d.order|=131072,j&&(a.group=b.group,a.group.addAtoms(a.i)));return d},"JM.Atom,JM.Atom,~N,~N,JU.BS,~N,~B,~B");c(c$,"getOrAddBond",function(a,b,d,c,g,f,j){if(131071==d||65535==d)d=1;a.isBonded(b)?(a=a.getBond(b).index,j&&(this.bo[a].setOrder(d),this.bo[a].setMad(c),
p(this.bo[a],JM.HBond)&&(this.bo[a].energy=f))):(this.bondCount==this.bo.length&&(this.bo=JU.AU.arrayCopyObject(this.bo,this.bondCount+250)),a=this.setBond(this.bondCount++,this.bondMutually(a,b,d,c,f)).index);null!=g&&g.set(a);return this.bo[a]},"JM.Atom,JM.Atom,~N,~N,JU.BS,~N,~B");c(c$,"setBond",function(a,b){return this.bo[b.index=a]=b},"~N,JM.Bond");c(c$,"bondMutually",function(a,b,d,c,g){d=JM.Bond.isOrderH(d)?new JM.HBond(a,b,d,c,0,g):new JM.Bond(a,b,d,c,0);this.addBondToAtom(a,d);this.addBondToAtom(b,
d);return d},"JM.Atom,JM.Atom,~N,~N,~N");c(c$,"addBondToAtom",function(a,b){null==a.bonds?(a.bonds=Array(1),a.bonds[0]=b):a.bonds=this.addToBonds(b,a.bonds)},"JM.Atom,JM.Bond");c(c$,"addToBonds",function(a,b){var d;if(null==b)d=0<this.numCached[1]?this.freeBonds[1][--this.numCached[1]]:Array(1),d[0]=a;else{var c=b.length;d=c+1;d=5>d&&0<this.numCached[d]?this.freeBonds[d][--this.numCached[d]]:Array(d);d[c]=a;for(var g=c;0<=--g;)d[g]=b[g];5>c&&200>this.numCached[c]&&(this.freeBonds[c][this.numCached[c]++]=
b)}return d},"JM.Bond,~A");c(c$,"addHBond",function(a,b,d,c){this.bondCount==this.bo.length&&(this.bo=JU.AU.arrayCopyObject(this.bo,this.bondCount+250));return this.setBond(this.bondCount++,this.bondMutually(a,b,d,1,c)).index},"JM.Atom,JM.Atom,~N,~N");c$.getBondOrderFull=c(c$,"getBondOrderFull",function(a,b,d,c,g){if(0==a||0==b||d<c)return 0;a=a+b+g;return d>a*a?0:1},"~N,~N,~N,~N,~N");c(c$,"checkValencesAndBond",function(a,b,d,c,g){if(20<a.getCurrentBondCount()||20<b.getCurrentBondCount())return this.haveWarned||
JU.Logger.warn("maximum auto bond count reached"),this.haveWarned=!0,!1;var f=a.getFormalCharge();if(0!=f){var j=b.getFormalCharge();if(0>f&&0>j||0<f&&0<j)return!1}if(a.altloc!=b.altloc&&"\x00"!=a.altloc&&"\x00"!=b.altloc&&null==this.getVibration(a.i,!1))return!1;this.getOrAddBond(a,b,d,c,g,0,!1);return!0},"JM.Atom,JM.Atom,~N,~N,JU.BS");c(c$,"deleteAllBonds2",function(){this.vwr.setShapeProperty(1,"reset",null);for(var a=this.bondCount;0<=--a;)this.bo[a].deleteAtomReferences(),this.bo[a]=null;this.bondCount=
0});c(c$,"getDefaultMadFromOrder",function(a){return JM.Bond.isOrderH(a)?1:32768==a?q(Math.floor(2E3*this.vwr.getFloat(570425406))):this.defaultCovalentMad},"~N");c(c$,"deleteConnections",function(a,b,d,c,g,f,j){var k=0>a,h=0>b,m=k||h;a=this.fixD(a,k);b=this.fixD(b,h);var r=new JU.BS,x=0,A=d|=131072;!j&&JM.Bond.isOrderH(d)&&(d=30720);if(f)f=c;else{f=new JU.BS;for(var n=c.nextSetBit(0);0<=n;n=c.nextSetBit(n+1)){var q=this.at[n];if(null!=q.bonds)for(var p=q.bonds.length;0<=--p;)g.get(q.getBondedAtomIndex(p))&&
f.set(q.bonds[p].index)}}for(n=f.nextSetBit(0);n<this.bondCount&&0<=n;n=f.nextSetBit(n+1))if(c=this.bo[n],this.isInRange(c.atom1,c.atom2,a,b,k,h,m)&&(j||A==(c.order&-257|131072)||0!=(d&c.order&30720)))r.set(n),x++;0<x&&this.dBm(r,!1);return[0,x]},"~N,~N,~N,JU.BS,JU.BS,~B,~B");c(c$,"fixD",function(a,b){return b?-a:a*a},"~N,~B");c(c$,"isInRange",function(a,b,d,c,g,f,j){var k=a.distanceSquared(b);return j?(j=Math.sqrt(k),a=a.getBondingRadius()+b.getBondingRadius(),(g?j>=a*d:k>=d)&&(f?j<=a*c:k<=c)):k>=
d&&k<=c},"JM.Atom,JM.Atom,~N,~N,~B,~B,~B");c(c$,"dBm",function(a,b){this.deleteBonds(a,b)},"JU.BS,~B");c(c$,"dBb",function(a,b){var d=a.nextSetBit(0);if(!(0>d)){this.resetMolecules();for(var c=-1,g=a.cardinality(),f=d;f<this.bondCount;++f){var j=this.bo[f];if(0<g&&a.get(f)){g--;if(!b){var k=j.atom1.mi;k!=c&&this.am[c=k].resetBoundCount()}j.deleteAtomReferences()}else this.setBond(d++,j)}for(c=this.bondCount;--c>=d;)this.bo[c]=null;this.bondCount=d;d=this.vwr.getShapeProperty(1,"sets");if(null!=d)for(c=
0;c<d.length;c++)JU.BSUtil.deleteBits(d[c],a);JU.BSUtil.deleteBits(this.bsAromatic,a)}},"JU.BS,~B");c(c$,"resetAromatic",function(){for(var a=this.bondCount;0<=--a;){var b=this.bo[a];b.isAromatic()&&b.setOrder(515)}});c(c$,"assignAromaticBonds",function(){this.assignAromaticBondsBs(!0,null)});c(c$,"assignAromaticBondsBs",function(a,b){a||(this.bsAromatic=new JU.BS);this.bsAromaticSingle=new JU.BS;this.bsAromaticDouble=new JU.BS;for(var d=null==b,c=d?this.bondCount-1:b.nextSetBit(0),g=c;0<=g;g=d?g-
1:b.nextSetBit(g+1)){var f=this.bo[g];this.bsAromatic.get(g)&&f.setOrder(515);switch(f.order&-131073){case 515:this.bsAromatic.set(g);break;case 513:this.bsAromaticSingle.set(g);break;case 514:this.bsAromaticDouble.set(g)}}for(g=c=(d=null==b)?this.bondCount-1:b.nextSetBit(0);0<=g;g=d?g-1:b.nextSetBit(g+1))f=this.bo[g],f.is(515)&&(!this.bsAromaticDouble.get(g)&&!this.bsAromaticSingle.get(g))&&(this.assignAromaticDouble(f)||this.assignAromaticSingle(f));for(g=c;0<=g;g=d?g-1:b.nextSetBit(g+1))if(f=this.bo[g],
this.bsAromaticDouble.get(g))f.is(514)||(this.bsAromatic.set(g),f.setOrder(514));else if((this.bsAromaticSingle.get(g)||f.isAromatic())&&!f.is(513))this.bsAromatic.set(g),f.setOrder(513);this.assignAromaticNandO(b);this.bsAromaticDouble=this.bsAromaticSingle=null},"~B,JU.BS");c(c$,"assignAromaticDouble",function(a){var b=a.index;if(this.bsAromaticSingle.get(b))return!1;if(this.bsAromaticDouble.get(b))return!0;this.bsAromaticDouble.set(b);return!this.assignAromaticSingleForAtom(a.atom1,b)||!this.assignAromaticSingleForAtom(a.atom2,
b)?(this.bsAromaticDouble.clear(b),!1):!0},"JM.Bond");c(c$,"assignAromaticSingle",function(a){var b=a.index;if(this.bsAromaticDouble.get(b))return!1;if(this.bsAromaticSingle.get(b))return!0;this.bsAromaticSingle.set(b);return!this.assignAromaticDoubleForAtom(a.atom1)||!this.assignAromaticDoubleForAtom(a.atom2)?(this.bsAromaticSingle.clear(b),!1):!0},"JM.Bond");c(c$,"assignAromaticSingleForAtom",function(a,b){var d=a.bonds;if(null==d||this.assignAromaticSingleHetero(a))return!1;for(var c=d.length;0<=
--c;){var g=d[c],f=g.index;if(!(f==b||!g.isAromatic()||this.bsAromaticSingle.get(f)))if(this.bsAromaticDouble.get(f)||!this.assignAromaticSingle(g))return!1}return!0},"JM.Atom,~N");c(c$,"assignAromaticDoubleForAtom",function(a){var b=a.bonds;if(null==b)return!1;a=this.assignAromaticSingleHetero(a);for(var d=-1,c=b.length;0<=--c;)this.bsAromaticDouble.get(b[c].index)&&(a=!0),b[c].isAromatic()&&(d=c);for(c=b.length;0<=--c;){var g=b[c],f=g.index;if(g.isAromatic()&&!this.bsAromaticDouble.get(f)&&!this.bsAromaticSingle.get(f))if(!a&&
this.assignAromaticDouble(g))a=!0;else if((a||c<d)&&!this.assignAromaticSingle(g))return!1}return a},"JM.Atom");c(c$,"assignAromaticSingleHetero",function(a){var b=a.getElementNumber();switch(b){case 6:case 7:case 8:case 16:break;default:return!0}var d=a.getValence();switch(b){case 6:return 4==d;case 7:case 8:return d==10-b&&1>a.getFormalCharge();case 16:return d==18-b&&1>a.getFormalCharge()}return!1},"JM.Atom");c(c$,"assignAromaticNandO",function(a){for(var b,d=null==a,c=d?this.bondCount-1:a.nextSetBit(0);0<=
c;c=d?c-1:a.nextSetBit(c+1))if(b=this.bo[c],b.is(513)){var g,f=b.atom2,j,k=f.getElementNumber();7==k||8==k?(j=k,g=f,f=b.atom1,k=f.getElementNumber()):(g=b.atom1,j=g.getElementNumber());if(!(7!=j&&8!=j)){var h=g.getValence();if(!(0>h)){var m=g.getCovalentBondCount();g=g.getFormalCharge();switch(j){case 7:3==h&&(3==m&&1>g&&6==k&&3==f.getValence())&&b.setOrder(514);break;case 8:1==h&&(0==g&&(14==k||16==k))&&b.setOrder(514)}}}}},"JU.BS");c(c$,"getAtomBitsMDb",function(a,b){var d;switch(a){default:return this.getAtomBitsMDa(a,
b);case 1678770178:d=new JU.BS;for(var c=b.nextSetBit(0);0<=c;c=b.nextSetBit(c+1))d.set(this.bo[c].atom1.i),d.set(this.bo[c].atom2.i);return d;case 1048585:d=new JU.BS;for(c=this.bondCount;0<=--c;)this.bo[c].isAromatic()&&(d.set(this.bo[c].atom1.i),d.set(this.bo[c].atom2.i));return d}},"~N,~O");c(c$,"setBondOrder",function(a,b){var d=b.charCodeAt(0)-48,c=this.bo[a];switch(b){case "0":case "1":case "2":case "3":break;case "p":case "m":d=JU.Edge.getBondOrderNumberFromOrder(c.getCovalentOrder()).charCodeAt(0)-
48+("p"==b?1:-1);3<d?d=1:0>d&&(d=3);break;default:return null}var g=new JU.BS;try{if(0==d){var f=new JU.BS;f.set(c.index);g.set(c.getAtomIndex1());g.set(c.getAtomIndex2());this.dBm(f,!1);return g}c.setOrder(d|131072);this.removeUnnecessaryBonds(c.atom1,!1);this.removeUnnecessaryBonds(c.atom2,!1);g.set(c.getAtomIndex1());g.set(c.getAtomIndex2())}catch(j){if(y(j,Exception))JU.Logger.error("Exception in seBondOrder: "+j.toString());else throw j;}return g},"~N,~S");c(c$,"removeUnnecessaryBonds",function(a,
b){var d=new JU.BS,c=new JU.BS,g=a.bonds;if(null!=g){for(var f=0;f<g.length;f++)g[f].isCovalent()?1==g[f].getOtherAtom(a).getElementNumber()&&d.set(g[f].getOtherAtom(a).i):c.set(g[f].index);0<=c.nextSetBit(0)&&this.dBm(c,!1);b&&d.set(a.i);0<=d.nextSetBit(0)&&this.vwr.deleteAtoms(d,!1)}},"JM.Atom,~B");c(c$,"displayBonds",function(a,b){b||(this.haveHiddenBonds=!0);for(var d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))d<this.bondCount&&0!=this.bo[d].mad&&this.bo[d].setShapeVisibility(b)},"JM.BondSet,~B");
C(c$,"BOND_GROWTH_INCREMENT",250,"MAX_BONDS_LENGTH_TO_CACHE",5,"MAX_NUM_TO_CACHE",200)});n("JM");H(JM,"BondIterator");n("JM");w(["JM.BondIterator"],"JM.BondIteratorSelected",null,function(){c$=t(function(){this.bonds=null;this.iBond=this.bondType=this.bondCount=0;this.bsSelected=null;this.bondSelectionModeOr=!1;s(this,arguments)},JM,"BondIteratorSelected",null,JM.BondIterator);u(c$,function(a,b,d,c,g){this.bonds=a;this.bondCount=b;this.bondType=d;this.bsSelected=c;this.bondSelectionModeOr=g},"~A,~N,~N,JU.BS,~B");
h(c$,"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(!(65535!=this.bondType&&0==(a.order&this.bondType))&&!(65535==this.bondType&&32768!=a.order)){var b=this.bsSelected.get(a.atom1.i),a=this.bsSelected.get(a.atom2.i);if(!this.bondSelectionModeOr&&b&&a||this.bondSelectionModeOr&&(b||a))return!0}}return!1});h(c$,"nextIndex",function(){return this.iBond});
h(c$,"next",function(){return this.bonds[this.iBond++]})});n("JM");w(["JU.BS"],"JM.BondSet",["JU.BSUtil"],function(){c$=t(function(){this.associatedAtoms=null;s(this,arguments)},JM,"BondSet",JU.BS);u(c$,function(){E(this,JM.BondSet,[])});c(c$,"getAssociatedAtoms",function(){return this.associatedAtoms});u(c$,function(a){E(this,JM.BondSet,[]);JU.BSUtil.copy2(a,this)},"JU.BS");u(c$,function(a,b){this.construct(a);this.associatedAtoms=b},"JU.BS,~A")});n("JM");c$=t(function(){this.model=null;this.index=
this.chainID=0;this.isRna=this.isDna=!1;this.groupCount=0;this.groups=null;this.selectedGroupCount=0;s(this,arguments)},JM,"Chain");K(c$,function(){this.groups=Array(16)});c(c$,"getAtom",function(a){return this.model.ms.at[a]},"~N");u(c$,function(a,b,d){this.model=a;this.chainID=b;this.index=d},"JM.Model,~N,~N");c(c$,"getGroup",function(a){return this.groups[a]},"~N");c(c$,"getGroupCount",function(){return this.groupCount});c(c$,"calcSelectedGroupsCount",function(a){for(var b=this.selectedGroupCount=
0;b<this.groupCount;b++)this.groups[b].selectedIndex=this.groups[b].isSelected(a)?this.selectedGroupCount++:-1},"JU.BS");c(c$,"selectSeqcodeRange",function(a,b,d,c){var g,f,j,k=!1;for(f=a;f<this.groupCount&&this.groups[f].seqcode!=b;f++);if(f==this.groupCount){if(0<a)return-1;k=!0;j=2147483647;for(var h=this.groupCount;0<=--h;)if((g=this.groups[h].seqcode)>b&&g-b<j)f=h,j=g-b;if(2147483647==j)return-1}if(2147483647==d)b=this.groupCount-1,k=!0;else{for(b=f;b<this.groupCount&&this.groups[b].seqcode!=
d;b++);if(b==this.groupCount){if(0<a)return-1;k=!0;j=2147483647;for(h=f;h<this.groupCount;h++)if((g=this.groups[h].seqcode)<d&&d-g<j)b=h,j=d-g;if(2147483647==j)return-1}}for(h=f;h<=b;++h)this.groups[h].selectAtoms(c);return k?-1:b+1},"~N,~N,~N,JU.BS");c(c$,"fixIndices",function(a,b){for(var d=0;d<this.groupCount;d++)this.groups[d].fixIndices(a,b)},"~N,JU.BS");c(c$,"setAtomBitSet",function(a){for(var b=0;b<this.groupCount;b++)this.groups[b].selectAtoms(a)},"JU.BS");c(c$,"getIDStr",function(){return 0==
this.chainID?"":256>this.chainID?""+String.fromCharCode(this.chainID):this.model.ms.vwr.chainMap.get(Integer.$valueOf(this.chainID))});n("JM");w(["java.lang.Short","JV.JC"],"JM.Group","java.util.Hashtable JU.BS $.Quat J.c.STR JU.BSUtil $.Escape $.Logger".split(" "),function(){c$=t(function(){this.groupIndex=0;this.group1="\x00";this.chain=null;this.leadAtomIndex=this.firstAtomIndex=-1;this.groupID=this.seqcode=this.lastAtomIndex=0;this.$isProtein=!1;this.shapeVisibilityFlags=this.selectedIndex=0;
this.bsAdded=null;s(this,arguments)},JM,"Group");c(c$,"getGroupIndex",function(){return this.groupIndex});c(c$,"setGroupIndex",function(a){this.groupIndex=a},"~N");u(c$,function(){});c(c$,"setGroup",function(a,b,d,c,g){this.chain=a;this.seqcode=d;null==b&&(b="");this.groupID=JV.JC.getGroupIdFor(b);this.$isProtein=1<=this.groupID&&24>this.groupID;this.firstAtomIndex=c;this.lastAtomIndex=g;return this},"JM.Chain,~S,~N,~N,~N");c(c$,"setModelSet",function(a){this.chain.model.ms=a},"JM.ModelSet");c(c$,
"setShapeVisibility",function(a,b){this.shapeVisibilityFlags=b?this.shapeVisibilityFlags|a:this.shapeVisibilityFlags&~a},"~N,~B");c(c$,"getGroup3",function(){return JV.JC.group3Names[this.groupID]});c(c$,"getGroup1",function(){return this.groupID<JV.JC.predefinedGroup1Names.length?JV.JC.predefinedGroup1Names[this.groupID]:1<this.group1.charCodeAt(0)?this.group1:1==this.group1.charCodeAt(0)?"?":this.group1=this.getGroup1b()});c(c$,"getGroup1b",function(){return"?"});c(c$,"getGroupID",function(){return this.groupID});
c(c$,"getChainID",function(){return this.chain.chainID});c(c$,"getBioPolymerLength",function(){return 0});c(c$,"getMonomerIndex",function(){return-1});c(c$,"getGroups",function(){return null});c(c$,"getStructure",function(){return null});c(c$,"getStrucNo",function(){return 0});c(c$,"getProteinStructureType",function(){return J.c.STR.NOT});c(c$,"getProteinStructureSubType",function(){return this.getProteinStructureType()});c(c$,"setProteinStructureType",function(){return-1},"J.c.STR,~N");c(c$,"isProtein",
function(){return this.$isProtein});c(c$,"isNucleic",function(){return 24<=this.groupID&&42>this.groupID});c(c$,"isDna",function(){return!1});c(c$,"isRna",function(){return!1});c(c$,"isPurine",function(){return!1});c(c$,"isPyrimidine",function(){return!1});c(c$,"isCarbohydrate",function(){return!1});c(c$,"getResno",function(){return-2147483648==this.seqcode?0:this.seqcode>>8});c$.getSeqNumberFor=c(c$,"getSeqNumberFor",function(a){return JM.Group.haveSequenceNumber(a)?a>>8:2147483647},"~N");c$.haveSequenceNumber=
c(c$,"haveSequenceNumber",function(a){return 0!=(a&128)},"~N");c(c$,"getSeqcodeString",function(){return JM.Group.getSeqcodeStringFor(this.seqcode)});c$.getSeqcodeFor=c(c$,"getSeqcodeFor",function(a,b){if(-2147483648==a)return a;"A"<=b&&"Z">=b||("a"<=b&&"z">=b||"0"<=b&&"9">=b||"?"==b||"*"==b)||(" "!=b&&"\x00"!=b&&JU.Logger.warn("unrecognized insertionCode:"+b),b="\x00");return(2147483647==a?0:a<<8|128)+b.charCodeAt(0)},"~N,~S");c$.getSeqcodeStringFor=c(c$,"getSeqcodeStringFor",function(a){return-2147483648==
a?null:0==(a&127)?""+(a>>8):""+(a>>8)+"^"+String.fromCharCode(a&127)},"~N");c(c$,"getInsertionCode",function(){return-2147483648==this.seqcode?"\x00":String.fromCharCode(this.seqcode&127)});c$.getInsertionCodeFor=c(c$,"getInsertionCodeFor",function(a){return a&127},"~N");c$.getInsertionCodeChar=c(c$,"getInsertionCodeChar",function(a){return-2147483648==a?"\x00":String.fromCharCode(a&127)},"~N");c(c$,"isAdded",function(a){return null!=this.bsAdded&&this.bsAdded.get(a)},"~N");c(c$,"addAtoms",function(a){null==
this.bsAdded&&(this.bsAdded=new JU.BS);this.bsAdded.set(a)},"~N");c(c$,"selectAtoms",function(a){a.setBits(this.firstAtomIndex,this.lastAtomIndex+1);null!=this.bsAdded&&a.or(this.bsAdded);return this.lastAtomIndex},"JU.BS");c(c$,"isSelected",function(a){var b=a.nextSetBit(this.firstAtomIndex);return 0<=b&&b<=this.lastAtomIndex||null!=this.bsAdded&&this.bsAdded.intersects(a)},"JU.BS");c(c$,"isHetero",function(){return this.chain.getAtom(this.firstAtomIndex).isHetero()});h(c$,"toString",function(){return"["+
this.getGroup3()+"-"+this.getSeqcodeString()+"]"});c(c$,"scaleToScreen",function(a,b){return this.chain.model.ms.vwr.tm.scaleToScreen(a,b)},"~N,~N");c(c$,"isCursorOnTopOf",function(a,b,d,c,g){return this.chain.model.ms.isCursorOnTopOf(a,b,d,c,g)},"JM.Atom,~N,~N,~N,JM.Atom");c(c$,"isAtomHidden",function(a){return this.chain.model.ms.isAtomHidden(a)},"~N");c(c$,"getModel",function(){return this.chain.model});c(c$,"getModelIndex",function(){return this.chain.model.modelIndex});c(c$,"getSelectedMonomerCount",
function(){return 0});c(c$,"getSelectedMonomerIndex",function(){return-1});c(c$,"getSelectedGroupIndex",function(){return this.selectedIndex});c(c$,"isLeadAtom",function(){return!1},"~N");c(c$,"getLeadAtomOr",function(a){var b=this.getLeadAtom();return null==b?a:b},"JM.Atom");c(c$,"getLeadAtom",function(){return null});c(c$,"getQuaternion",function(){return null},"~S");c(c$,"getQuaternionFrame",function(a){if(3>this.lastAtomIndex-this.firstAtomIndex)return null;var b=this.firstAtomIndex;return JU.Quat.getQuaternionFrame(a[b],
a[++b],a[++b])},"~A");c(c$,"setStrucNo",function(){},"~N");c(c$,"getHelixData",function(a){return JU.Escape.escapeHelical(null,a,null,null,null)},"~N,~S,~N");c(c$,"isWithinStructure",function(){return!1},"J.c.STR");c(c$,"getProteinStructureTag",function(){return null});c(c$,"getStructureId",function(){return""});c(c$,"getBioPolymerIndexInModel",function(){return-1});c(c$,"isCrossLinked",function(){return!1},"JM.Group");c(c$,"getCrossLinkLead",function(){return!1},"JU.Lst");c(c$,"isConnectedPrevious",
function(){return!1});c(c$,"getNitrogenAtom",function(){return null});c(c$,"getCarbonylOxygenAtom",function(){return null});c(c$,"fixIndices",function(a,b){this.firstAtomIndex-=a;this.leadAtomIndex-=a;this.lastAtomIndex-=a;null!=this.bsAdded&&JU.BSUtil.deleteBits(this.bsAdded,b)},"~N,JU.BS");c(c$,"getGroupInfo",function(a,b){var d=new java.util.Hashtable;d.put("groupIndex",Integer.$valueOf(a));d.put("groupID",Short.$valueOf(this.groupID));var c=this.getSeqcodeString();null!=c&&d.put("seqCode",c);
d.put("_apt1",Integer.$valueOf(this.firstAtomIndex));d.put("_apt2",Integer.$valueOf(this.lastAtomIndex));null!=this.bsAdded&&d.put("addedAtoms",this.bsAdded);d.put("atomInfo1",this.chain.model.ms.getAtomInfo(this.firstAtomIndex,null,b));d.put("atomInfo2",this.chain.model.ms.getAtomInfo(this.lastAtomIndex,null,b));d.put("visibilityFlags",Integer.$valueOf(this.shapeVisibilityFlags));return d},"~N,JU.P3");c(c$,"getMinZ",function(a,b){b[0]=2147483647;for(var d=this.firstAtomIndex;d<=this.lastAtomIndex;d++)this.checkMinZ(a[d],
b);if(null!=this.bsAdded)for(d=this.bsAdded.nextSetBit(0);0<=d;d=this.bsAdded.nextSetBit(d+1))this.checkMinZ(a[d],b)},"~A,~A");c(c$,"checkMinZ",function(a,b){var d=a.sZ-q(a.sD/2)-2;d<b[0]&&(b[0]=Math.max(1,d))},"JM.Atom,~A");c(c$,"getGroupParameter",function(){return NaN},"~N");c(c$,"getAtomIndex",function(){return-1},"~S,~N");c(c$,"getBSSideChain",function(){return new JU.BS});C(c$,"SEQUENCE_NUMBER_FLAG",128,"INSERTION_CODE_MASK",127,"SEQUENCE_NUMBER_SHIFT",8)});n("JM");w(["JM.Bond"],"JM.HBond",
["JU.Logger"],function(){c$=t(function(){this.paletteID=this.energy=0;s(this,arguments)},JM,"HBond",JM.Bond);u(c$,function(a,b,d,c,g,f){E(this,JM.HBond,[a,b,d,c,g]);this.energy=f;JU.Logger.debugging&&JU.Logger.debug("HBond energy = "+f+" #"+this.getIdentity())},"JM.Atom,JM.Atom,~N,~N,~N,~N");c(c$,"getEnergy",function(){return this.energy});c(c$,"getPaletteId",function(){return this.paletteID});h(c$,"setPaletteID",function(a){this.paletteID=a},"~N");c$.getEnergy=c(c$,"getEnergy",function(a,b,d,c){return Math.round(-27888/
a- -27888/c+-27888/d- -27888/b)},"~N,~N,~N,~N");C(c$,"QConst",-27888)});n("JM");w(null,"JM.LabelToken","java.lang.Character $.Float java.util.Hashtable JU.PT $.SB JM.Atom JS.T".split(" "),function(){c$=t(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;s(this,arguments)},JM,"LabelToken");u(c$,function(){});c(c$,"set",function(a,b){this.text=a;this.pt=b;return this},"~S,~N");c$.isLabelPropertyTok=
c(c$,"isLabelPropertyTok",function(a){for(var b=JM.LabelToken.labelTokenIds.length;0<=--b;)if(JM.LabelToken.labelTokenIds[b]==a)return!0;return!1},"~N");c$.compile=c(c$,"compile",function(a,b,d,c){if(null==b||0==b.length)return null;if(0>b.indexOf("%")||2>b.length)return[(new JM.LabelToken).set(b,-1)];for(var g=0,f=-1,j=b.length;++f<j&&0<=(f=b.indexOf("%",f));)g++;for(var g=Array(2*g+1),k,h=0,f=0;0<=(k=b.indexOf("%",f));)f!=k&&(g[h++]=(new JM.LabelToken).set(b.substring(f,k),-1)),f=g[h++]=(new JM.LabelToken).set(null,
k),a.autoCalculate(f.tok),f=JM.LabelToken.setToken(a,b,f,j,d.charCodeAt(0),c);f<j&&(g[h++]=(new JM.LabelToken).set(b.substring(f),-1));return g},"JV.Viewer,~S,~S,java.util.Map");c(c$,"formatLabel",function(a,b,d,c){return null==d||0==d.length?null:JM.LabelToken.formatLabelAtomArray(a,b,JM.LabelToken.compile(a,d,"\x00",null),"\x00",null,c)},"JV.Viewer,JM.Atom,~S,JU.P3");c$.formatLabelAtomArray=c(c$,"formatLabelAtomArray",function(a,b,d,c,g,f){if(null==b)return null;var j="0"<c?null:new JU.SB;if(null!=
d)for(var k=0;k<d.length;k++){var h=d[k];if(null==h)break;"0"<c&&h.ch1!=c||(0>=h.tok||null!=h.key?null!=j&&(j.append(h.text),"\x00"!=h.ch1&&j.appendC(h.ch1)):JM.LabelToken.appendAtomTokenValue(a,b,h,j,g,f))}return null==j?null:j.toString().intern()},"JV.Viewer,JM.Atom,~A,~S,~A,JU.P3");c$.getBondLabelValues=c(c$,"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});
c$.formatLabelBond=c(c$,"formatLabelBond",function(a,b,d,c,g,f){c.put("#",""+(b.index+1));c.put("ORDER",""+b.getOrderNumberAsString());c.put("TYPE",b.getOrderName());c.put("LENGTH",Float.$valueOf(b.atom1.distance(b.atom2)));c.put("ENERGY",Float.$valueOf(b.getEnergy()));JM.LabelToken.setValues(d,c);JM.LabelToken.formatLabelAtomArray(a,b.atom1,d,"1",g,f);JM.LabelToken.formatLabelAtomArray(a,b.atom2,d,"2",g,f);return JM.LabelToken.getLabel(d)},"JV.Viewer,JM.Bond,~A,java.util.Map,~A,JU.P3");c$.formatLabelMeasure=
c(c$,"formatLabelMeasure",function(a,b,d,c,g){var f=new java.util.Hashtable;f.put("#",""+(b.index+1));f.put("VALUE",Float.$valueOf(c));f.put("UNITS",g);d=JM.LabelToken.compile(a,d,"\u0001",f);if(null==d)return"";JM.LabelToken.setValues(d,f);f=b.ms.at;b=b.countPlusIndices;for(c=b[0];1<=c;--c)0<=b[c]&&JM.LabelToken.formatLabelAtomArray(a,f[b[c]],d,String.fromCharCode(48+c),null,null);d=JM.LabelToken.getLabel(d);return null==d?"":d},"JV.Viewer,JM.Measurement,~S,~N,~S");c$.setValues=c(c$,"setValues",
function(a,b){for(var d=0;d<a.length;d++){var c=a[d];if(null==c)break;if(null!=c.key){var g=b.get(c.key);c.text=p(g,Float)?c.format(g.floatValue(),null,null):c.format(NaN,g,null)}}},"~A,java.util.Map");c$.getLabel=c(c$,"getLabel",function(a){for(var b=new JU.SB,d=0;d<a.length;d++){var c=a[d];if(null==c)break;b.append(c.text)}return b.toString()},"~A");c$.setToken=c(c$,"setToken",function(a,b,d,c,g,f){var j=d.pt+1;if(j>=c)return j;var k;"-"==b.charAt(j)&&(d.alignLeft=!0,++j);j<c&&"0"==b.charAt(j)&&
(d.zeroPad=!0,++j);for(;j<c&&Character.isDigit(k=b.charAt(j));)d.width=10*d.width+(k.charCodeAt(0)-48),++j;d.precision=2147483647;var h=!1;if(j<c&&"."==b.charAt(j)){++j;if(j<c&&"-"==(k=b.charAt(j)))h=!0,++j;if(j<c&&Character.isDigit(k=b.charAt(j)))d.precision=k.charCodeAt(0)-48,h&&(d.precision=-1-d.precision),++j}if(j<c&&null!=f){var m;for(f=f.keySet().iterator();f.hasNext()&&((m=f.next())||1);)if(b.indexOf(m)==j)return j+(d.key=m).length}if(j<c)switch(k=b.charAt(j++)){case "%":return d.text="%",
j;case "[":m=b.indexOf("]",j);if(m<j){j=c;break}j=b.substring(j,m).toLowerCase();j.startsWith("property_")?(d.text=j,d.tok=135270408,d.data=a.getDataFloat(d.text)):j.startsWith("validation.")?(d.text=j.substring(11),d.tok=1073742189,d.data=a.getDataFloat("property_"+d.text)):(a=JS.T.getTokenFromName(j),null!=a&&JM.LabelToken.isLabelPropertyTok(a.tok)&&(d.tok=a.tok));j=m+1;break;case "{":m=b.indexOf("}",j);if(m<j){j=c;break}d.text=b.substring(j,m);d.data=a.getDataFloat(d.text);null==d.data?(d.data=
a.getData(d.text),p(d.data,Array)&&(d.data=d.data[1],p(d.data,String)&&(d.data=JU.PT.split(d.data,"\n")),JU.PT.isAS(d.data)||(d.data=null)),d.tok=null==d.data?4:135266306):d.tok=135270408;j=m+1;break;default:var r,x;if(j<c&&0<=(r="fuv".indexOf(k))&&0<=(x="xyz".indexOf(b.charAt(j))))d.tok=JM.LabelToken.twoCharLabelTokenIds[3*r+x],j++;else if(0<=(r="AaBbCcDEefGgIiLlMmNnoPpQqRrSsTtUuVvWXxxYyyZzz%%%gqW".indexOf(k)))d.tok=JM.LabelToken.labelTokenIds[r]}d.text=b.substring(d.pt,j);if(j<c&&0!=g&&Character.isDigit(k=
b.charAt(j)))j++,d.ch1=k,k.charCodeAt(0)!=g&&1!=g&&(d.tok=0);return j},"JV.Viewer,~S,JM.LabelToken,~N,~N,java.util.Map");c$.appendAtomTokenValue=c(c$,"appendAtomTokenValue",function(a,b,d,c,g,f){var j=null,k=NaN,h=null;try{switch(d.tok){case 1095761923:j=""+(null==g?b.i:g[b.i]);break;case 1766856708:h=JM.Atom.atomPropertyTuple(b,d.tok,f);break;case 135270408:case 1073742189:if(null!=d.data&&(k=d.data[b.i],1073742189==d.tok&&1!=k&&0!=k)){var m=a.getAtomValidation(d.text.substring(13,d.text.length-
1),b);if(null==m)System.out.println("?? o is null ??");else if(1==m.size())k=m.get(0).floatValue();else{k=NaN;j="";a=0;for(var r=m.size();a<r;a++)j+=","+m.get(a);1<j.length&&(j=j.substring(1))}}break;case 135266306:if(null!=d.data)var x=d.data,j=b.i<x.length?x[b.i]:"";break;case 1632634891:var n=b.getFormalCharge(),j=0<n?""+n+"+":0>n?""+-n+"-":"";break;case "g":j=""+b.getSelectedGroupIndexWithinChain();break;case 1095766030:j=b.getModelNumberForLabel();break;case 1129318401:j=""+JM.Atom.atomPropertyInt(b,
d.tok);break;case "Q":k=b.getOccupancy100()/100;break;case 1666189314:k=JM.Atom.atomPropertyFloat(a,b,d.tok,f);break;case "r":j=b.getSeqcodeString();break;case 1087373324:j=b.getStructureId();break;case 1095761942:var q=b.getStrucNo(),j=0>=q?"":""+q;break;case 1112539150:k=b.getGroupParameter(1112539150);Float.isNaN(k)&&(j="null");break;case 4:j=a.ms.getAtomProp(b,d.text.substring(2,d.text.length-1));break;case 1641025539:case 1238369286:j=JM.Atom.atomPropertyString(a,b,d.tok);break;case "W":j=b.getIdentityXYZ(!1,
f);break;default:switch(d.tok&1137704960){case 1095761920:d.intAsFloat?k=JM.Atom.atomPropertyInt(b,d.tok):j=""+JM.Atom.atomPropertyInt(b,d.tok);break;case 1112539136:k=JM.Atom.atomPropertyFloat(a,b,d.tok,f);break;case 1087373312:j=JM.Atom.atomPropertyString(a,b,d.tok);break;case 1078984704:h=JM.Atom.atomPropertyTuple(b,d.tok,f)}}}catch(p){if(y(p,IndexOutOfBoundsException))k=NaN,h=j=null;else throw p;}j=d.format(k,j,h);null==c?d.text=j:c.append(j)},"JV.Viewer,JM.Atom,JM.LabelToken,JU.SB,~A,JU.P3");
c(c$,"format",function(a,b,d){return Float.isNaN(a)?null!=b?JU.PT.formatS(b,this.width,this.precision,this.alignLeft,this.zeroPad):null!=d?(0==this.width&&2147483647==this.precision&&(this.width=6,this.precision=2),JU.PT.formatF(d.x,this.width,this.precision,!1,!1)+JU.PT.formatF(d.y,this.width,this.precision,!1,!1)+JU.PT.formatF(d.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");C(c$,"labelTokenParams","AaBbCcDEefGgIiLlMmNnoPpQqRrSsTtUuVvWXxxYyyZzz%%%gqW",
"labelTokenIds",[1087373315,1087375362,1087375361,1112541199,1632634891,1087373316,1095761923,1087373322,1087375365,1112539145,1095761933,"g",1112541195,1095763969,1095761938,1095763978,1095766030,1087373319,1095761936,1087373318,1089470478,1112541196,1112539146,"Q",1129318401,1095761939,"r",1095761941,1087373316,1112539150,1112541199,1087373321,1112539151,1649412120,1146095631,"W",1112541188,1112541185,1112541205,1112541189,1112541186,1112541206,1112541190,1112541187,1112541207,1115297793,1113200642,
1113198595,1113198596,1113198597,1113200646,1113200647,1113200649,1113200650,1113200652,1650071565,1113200654,1112539137,1112539138,1095761922,1095761924,1766856708,1095761932,1112539140,1229984263,1288701959,1826248716,1112539143,1095761935,1112539141,1112539144,1095761937,1716520985,1666189314,1114638363,1087373323,1087373320,1113200651,1641025539,1238369286,1095761942,1087373324,1087375373,1112539152,1112539153,1112539154,1112539155,1095763991,1649410049,1112541202,1112541203,1112541204,1313866249,
1146093582,1146095627,1146095626,1146095629,1112541191,1112541192,1112541193,1114638362,1112539147,1112539148,1112539149,1146095628,1112539142,1112539139,1095761927,1095761940],"STANDARD_LABEL","%[identify]","twoCharLabelTokenParams","fuv","twoCharLabelTokenIds",[1112541188,1112541189,1112541190,1112539153,1112539154,1112539155,1112541202,1112541203,1112541204])});n("JM");w(null,"JM.Measurement","java.lang.Float JU.Lst $.Measure $.PT $.SB J.atomdata.RadiusData J.c.VDW JM.LabelToken JU.Escape".split(" "),
function(){c$=t(function(){this.ms=this.thisID=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.type=this.strMeasurement=this.vwr=this.text=this.strFormat=null;this.tainted=!1;this.renderArc=this.renderAxis=null;s(this,arguments)},JM,"Measurement");K(c$,function(){this.countPlusIndices=D(5,0)});c(c$,
"isTainted",function(){return this.tainted&&!(this.tainted=!1)});c(c$,"setM",function(a,b,d,c,g,f){this.ms=a;this.index=f;this.vwr=a.vwr;this.colix=c;this.strFormat=g;null!=b&&(this.tickInfo=b.tickInfo,this.pts=b.pts,this.mad=b.mad,this.thisID=b.thisID,this.text=b.text,null!=this.thisID&&null!=this.text&&(this.labelColix=this.text.colix));null==this.pts&&(this.pts=Array(4));b=null==b?null:b.countPlusIndices;this.count=null==b?0:b[0];0<this.count&&(System.arraycopy(b,0,this.countPlusIndices,0,this.count+
1),this.isTrajectory=a.isTrajectoryMeasurement(this.countPlusIndices));this.value=Float.isNaN(d)||this.isTrajectory?this.getMeasurement(null):d;this.formatMeasurement(null);return this},"JM.ModelSet,JM.Measurement,~N,~N,~S,~N");c(c$,"setPoints",function(a,b,d,c){this.ms=a;this.countPlusIndices=b;this.count=b[0];this.pts=null==d?Array(4):d;this.vwr=a.vwr;this.tickInfo=c;return this},"JM.ModelSet,~A,~A,JM.TickInfo");c(c$,"setCount",function(a){this.setCountM(a)},"~N");c(c$,"setCountM",function(a){this.count=
this.countPlusIndices[0]=a},"~N");c(c$,"getAtomIndex",function(a){return 0<a&&a<=this.count?this.countPlusIndices[a]:-1},"~N");c(c$,"getAtom",function(a){a=this.countPlusIndices[a];return-1>a?this.pts[-2-a]:this.ms.at[a]},"~N");c(c$,"getLastIndex",function(){return 0<this.count?this.countPlusIndices[this.count]:-1});c(c$,"getString",function(){return this.strMeasurement});c(c$,"getStringUsing",function(a,b,d){this.vwr=a;this.value=this.getMeasurement(null);this.formatMeasurementAs(b,d,!0);return null==
b?this.getInfoAsString(d):this.strMeasurement},"JV.Viewer,~S,~S");c(c$,"getStringDetail",function(){return(2==this.count?"Distance":3==this.count?"Angle":"Torsion")+this.getMeasurementScript(" - ",!1)+" : "+this.value});c(c$,"refresh",function(a){this.value=this.getMeasurement(a);this.isTrajectory=this.ms.isTrajectoryMeasurement(this.countPlusIndices);this.formatMeasurement(null)},"~A");c(c$,"getMeasurementScript",function(a,b){for(var d="",c=a.equals(" "),g=1;g<=this.count;g++)d+=(1<g?a:" ")+this.getLabel(g,
c,b);return d},"~S,~B");c(c$,"formatMeasurementAs",function(a,b,d){null!=a&&0==a.length&&(a=null);if(d||!(null!=a&&0!=a.indexOf(this.countPlusIndices[0]+":")))this.strFormat=a,this.formatMeasurement(b)},"~S,~S,~B");c(c$,"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(c$,"reformatDistanceIfSelected",
function(){2==this.count&&this.vwr.slm.isSelected(this.countPlusIndices[1])&&this.vwr.slm.isSelected(this.countPlusIndices[2])&&this.formatMeasurement(null)});c(c$,"formatDistance",function(a){var b=this.getLabelString();if(null==b)return"";if(null==a){var d=this.strFormat.indexOf("//");a=0<=d?this.strFormat.substring(d+2):null;null==a&&(a=this.vwr.g.measureDistanceUnits,this.strFormat+="//"+a)}a=JM.Measurement.fixUnits(a);d=b.indexOf("//");0<=d&&(b=b.substring(0,d),0==b.length&&(b="%VALUE"));d=this.fixValue(a,
0<=b.indexOf("%V"));return this.formatString(d,a,b)},"~S");c$.fixUnits=c(c$,"fixUnits",function(a){return a.equals("nanometers")?"nm":a.equals("picometers")?"pm":a.equals("angstroms")?"\u00c5":a.equals("vanderwaals")||a.equals("vdw")?"%":a},"~S");c(c$,"fixValue",function(a,b){if(2!=this.count)return this.value;var d=this.value;if(null!=a){var c=a.equals("%");if(c||a.endsWith("hz")){var g=this.getAtomIndex(1),f=this.getAtomIndex(2);if(0<=g&&0<=f){var g=this.getAtom(1),f=this.getAtom(2),j=!c&&1==JM.Measurement.nmrType(a);
this.type=c?"percent":j?"dipoleCouplingConstant":"J-CouplingConstant";d=c?d/(g.getVanderwaalsRadiusFloat(this.vwr,J.c.VDW.AUTO)+f.getVanderwaalsRadiusFloat(this.vwr,J.c.VDW.AUTO)):j?this.vwr.getNMRCalculation().getDipolarConstantHz(g,f):this.vwr.getNMRCalculation().getIsoOrAnisoHz(!0,g,f,a,null);this.$isValid=!Float.isNaN(d);c&&(a="pm")}}if(a.equals("nm"))return b?Math.round(100*d)/1E3:d/10;if(a.equals("pm"))return b?Math.round(1E3*d)/10:100*d;if(a.equals("au"))return b?Math.round(1E3*(d/0.5291772))/
1E3:d/0.5291772;if(a.endsWith("khz"))return b?Math.round(d/10)/100:d/1E3}return b?Math.round(100*d)/100:d},"~S,~B");c$.nmrType=c(c$,"nmrType",function(a){return 0>a.indexOf("hz")?0:a.startsWith("dc_")||a.equals("khz")?1:2},"~S");c(c$,"formatAngle",function(a){var b=this.getLabelString();0<=b.indexOf("%V")&&(a=Math.round(10*a)/10);return this.formatString(a,"\u00b0",b)},"~N");c(c$,"getLabelString",function(){var a=this.countPlusIndices[0]+":",b=null;if(null!=this.strFormat){if(0==this.strFormat.length)return null;
b=2<this.strFormat.length&&0==this.strFormat.indexOf(a)?this.strFormat:null}null==b&&(this.strFormat=null,b=this.vwr.getDefaultMeasurementLabel(this.countPlusIndices[0]));0==b.indexOf(a)&&(b=b.substring(2));null==this.strFormat&&(this.strFormat=a+b);return b});c(c$,"formatString",function(a,b,d){return JM.LabelToken.formatLabelMeasure(this.vwr,this,d,a,b)},"~N,~S,~S");c(c$,"sameAsPoints",function(a,b){if(this.count!=a[0])return!1;for(var d=!0,c=1;c<=this.count&&d;c++)d=this.countPlusIndices[c]==a[c];
if(d)for(c=0;c<this.count&&d;c++)null!=b[c]&&(d=0.01>this.pts[c].distance(b[c]));if(d)return!0;switch(this.count){default:return!0;case 2:return this.sameAsIJ(a,b,1,2)&&this.sameAsIJ(a,b,2,1);case 3:return this.sameAsIJ(a,b,1,3)&&this.sameAsIJ(a,b,2,2)&&this.sameAsIJ(a,b,3,1);case 4:return this.sameAsIJ(a,b,1,4)&&this.sameAsIJ(a,b,2,3)&&this.sameAsIJ(a,b,3,2)&&this.sameAsIJ(a,b,4,1)}},"~A,~A");c(c$,"sameAsIJ",function(a,b,d,c){d=this.countPlusIndices[d];a=a[c];return 0<=d||0<=a?d==a:0.01>this.pts[-2-
d].distance(b[-2-a])},"~A,~A,~N,~N");c(c$,"sameAs",function(a,b){return this.sameAsIJ(this.countPlusIndices,this.pts,a,b)},"~N,~N");c(c$,"toVector",function(a){for(var b=new JU.Lst,d=1;d<=this.count;d++)b.addLast(this.getLabel(d,a,!1));b.addLast(this.strMeasurement);return b},"~B");c(c$,"getMeasurement",function(a){if(null==this.countPlusIndices||2>this.count)return NaN;for(var b=this.count;0<=--b;)if(-1==this.countPlusIndices[b+1])return NaN;var b=null==a?this.getAtom(1):a[0],d=null==a?this.getAtom(2):
a[1],c;switch(this.count){case 2:return b.distance(d);case 3:return c=null==a?this.getAtom(3):a[2],JU.Measure.computeAngleABC(b,d,c,!0);case 4:return c=null==a?this.getAtom(3):a[2],a=null==a?this.getAtom(4):a[3],JU.Measure.computeTorsion(b,d,c,a,!0);default:return NaN}},"~A");c(c$,"getLabel",function(a,b,d){var c=this.countPlusIndices[a];return 0>c?(d?"modelIndex "+this.getAtom(a).mi+" ":"")+JU.Escape.eP(this.getAtom(a)):b?"(({"+c+"}))":this.vwr.getAtomInfo(c)},"~N,~B,~B");c(c$,"setModelIndex",function(a){if(null!=
this.pts)for(var b=0;b<this.count;b++)null!=this.pts[b]&&(this.pts[b].mi=a)},"~N");c(c$,"isValid",function(){return!(this.sameAs(1,2)||2<this.count&&this.sameAs(1,3)||4==this.count&&this.sameAs(2,4))});c$.find=c(c$,"find",function(a,b){for(var d=b.countPlusIndices,c=b.pts,g=a.size();0<=--g;)if(a.get(g).sameAsPoints(d,c))return g;return-1},"JU.Lst,JM.Measurement");c(c$,"isConnected",function(a,b){for(var d=-1,c=1;c<=b;c++){var g=this.getAtomIndex(c);if(!(0>g)){if(0<=d&&!a[g].isBonded(a[d]))return!1;
d=g}}return!0},"~A,~N");c(c$,"getInfoAsString",function(a){var b=this.fixValue(a,!0);a=new JU.SB;a.append(2==this.count?null==this.type?"distance":this.type:3==this.count?"angle":"dihedral");a.append(" \t").appendF(b);a.append(" \t").append(JU.PT.esc(this.strMeasurement));for(b=1;b<=this.count;b++)a.append(" \t").append(this.getLabel(b,!1,!1));null!=this.thisID&&a.append(" \t").append(this.thisID);return a.toString()},"~S");c(c$,"isInRange",function(a,b){if(a.factorType===J.atomdata.RadiusData.EnumType.FACTOR){var d=
this.getAtom(1),c=this.getAtom(2),d=(d.getVanderwaalsRadiusFloat(this.vwr,a.vdwType)+c.getVanderwaalsRadiusFloat(this.vwr,a.vdwType))*a.value;return b<=d}return 3.4028235E38==a.values[0]||b>=a.values[0]&&b<=a.values[1]},"J.atomdata.RadiusData,~N");c(c$,"isIntramolecular",function(a,b){for(var d=-1,c=1;c<=b;c++){var g=this.getAtomIndex(c);if(!(0>g))if(g=a[g].getMoleculeNumber(!1),0>d)d=g;else if(g!=d)return!1}return!0},"~A,~N");c(c$,"isMin",function(a){var b=this.getAtom(1),d=this.getAtom(2),c=z(100*
d.distanceSquared(b)),b=b.getAtomName(),d=d.getAtomName(),d=0>b.compareTo(d)?b+d:d+b;a=a.get(d);return null!=a&&c==a.intValue()},"java.util.Map");C(c$,"NMR_NOT",0,"NMR_DC",1,"NMR_JC",2)});n("JM");w(["J.api.JmolMeasurementClient"],"JM.MeasurementData",["java.lang.Float","JU.BS","$.Lst","JM.Measurement","JU.BSUtil"],function(){c$=t(function(){this.points=this.measurements=this.measurementStrings=this.client=null;this.mustNotBeConnected=this.mustBeConnected=!1;this.tickInfo=null;this.tokAction=1060866;
this.note=this.strFormat=this.radiusData=null;this.isAll=!1;this.colix=0;this.intramolecular=null;this.mad=0;this.vwr=this.ms=this.minArray=this.units=this.atoms=this.text=this.thisID=null;this.iFirstAtom=0;this.justOneModel=!0;this.htMin=null;s(this,arguments)},JM,"MeasurementData",null,J.api.JmolMeasurementClient);u(c$,function(){});c(c$,"init",function(a,b,d){this.vwr=b;this.points=d;this.thisID=a;return this},"~S,JV.Viewer,JU.Lst");c(c$,"setModelSet",function(a){this.ms=a;return this},"JM.ModelSet");
c(c$,"set",function(a,b,d,c,g,f,j,k,h,m,r,x,n){this.ms=this.vwr.ms;this.tokAction=a;2<=this.points.size()&&(p(this.points.get(0),JU.BS)&&p(this.points.get(1),JU.BS))&&(this.justOneModel=JU.BSUtil.haveCommon(this.vwr.ms.getModelBS(this.points.get(0),!1),this.vwr.ms.getModelBS(this.points.get(1),!1)));this.htMin=b;this.radiusData=d;this.strFormat=c;this.units=g;this.tickInfo=f;this.mustBeConnected=j;this.mustNotBeConnected=k;this.intramolecular=h;this.isAll=m;this.mad=r;this.colix=x;this.text=n;return this},
"~N,java.util.Map,J.atomdata.RadiusData,~S,~S,JM.TickInfo,~B,~B,Boolean,~B,~N,~N,JM.Text");c(c$,"processNextMeasure",function(a){var b=a.getMeasurement(null);if(!(null!=this.htMin&&!a.isMin(this.htMin)||null!=this.radiusData&&!a.isInRange(this.radiusData,b)))if(null==this.measurementStrings&&null==this.measurements){var d=this.minArray[this.iFirstAtom];a.value=b;b=a.fixValue(this.units,!1);this.minArray[this.iFirstAtom]=-Infinity==1/d?b:Math.min(d,b)}else null!=this.measurementStrings?this.measurementStrings.addLast(a.getStringUsing(this.vwr,
this.strFormat,this.units)):this.measurements.addLast(Float.$valueOf(a.getMeasurement(null)))},"JM.Measurement");c(c$,"getMeasurements",function(a,b){if(b){this.minArray=L(this.points.get(0).cardinality(),0);for(var d=0;d<this.minArray.length;d++)this.minArray[d]=-0;this.define(null,this.ms);return this.minArray}if(a)return 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(c$,"define",function(a,b){this.client=null==a?this:a;this.atoms=b.at;var d=this.points.size();if(!(2>d)){var c=-1,g=Array(4),f=D(5,0),j=(new JM.Measurement).setPoints(b,f,g,null);j.setCount(d);for(var k=-1,h=0;h<d;h++){var m=this.points.get(h);if(p(m,JU.BS)){k=m.cardinality();if(0==k)return;1<k&&(c=0);k=h;0==h&&(this.iFirstAtom=0);f[h+1]=m.nextSetBit(0)}else g[h]=m,f[h+1]=-2-h}this.nextMeasure(0,k,j,c)}},"J.api.JmolMeasurementClient,JM.ModelSet");c(c$,"nextMeasure",function(a,b,d,c){if(a>b)d.isValid()&&
((!this.mustBeConnected||d.isConnected(this.atoms,a))&&(!this.mustNotBeConnected||!d.isConnected(this.atoms,a))&&(null==this.intramolecular||d.isIntramolecular(this.atoms,a)==this.intramolecular.booleanValue()))&&this.client.processNextMeasure(d);else{var g=this.points.get(a),f=d.countPlusIndices,j=0==a?2147483647:f[a];if(0>j)this.nextMeasure(a+1,b,d,c);else{for(var k=!1,h=g.nextSetBit(0),m=0;0<=h;h=g.nextSetBit(h+1),m++)if(h!=j){var r=this.atoms[h].getModelIndex();if(0<=c&&this.justOneModel)if(0==
a)c=r;else if(c!=r)continue;f[a+1]=h;0==a&&(this.iFirstAtom=m);k=!0;this.nextMeasure(a+1,b,d,c)}k||this.nextMeasure(a+1,b,d,c)}}},"~N,~N,JM.Measurement,~N")});n("JM");w(["JM.Measurement"],"JM.MeasurementPending",null,function(){c$=t(function(){this.haveModified=this.haveTarget=!1;this.numSet=0;this.lastIndex=-1;s(this,arguments)},JM,"MeasurementPending",JM.Measurement);c(c$,"set",function(a){return this.setM(a,null,NaN,0,null,0)},"JM.ModelSet");c(c$,"checkPoint",function(a){for(var b=1;b<=this.numSet;b++)if(this.countPlusIndices[b]==
-1-b&&0.01>this.pts[b-1].distance(a))return!1;return!0},"JU.Point3fi");c(c$,"getIndexOf",function(a){for(var b=1;b<=this.numSet;b++)if(this.countPlusIndices[b]==a)return b;return 0},"~N");h(c$,"setCount",function(a){this.setCountM(a);this.numSet=a},"~N");c(c$,"addPoint",function(a,b,d){this.haveModified=a!=this.lastIndex;this.lastIndex=a;if(null==b){if(0<this.getIndexOf(a))return d&&(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(b))return d&&(this.numSet=this.count),this.count;a=this.numSet;this.haveModified=this.haveTarget=!0;this.count=this.numSet+1;this.pts[a]=b;this.countPlusIndices[this.count]=-2-a}this.countPlusIndices[0]=this.count;d&&(this.numSet=this.count);this.value=this.getMeasurement(null);this.strFormat=null;this.formatMeasurement(null);return this.count},"~N,JU.Point3fi,~B")});n("JM");w(["JU.BS","$.SB"],"JM.Model",["java.util.Hashtable",
"JU.AU","JU.BSUtil"],function(){c$=t(function(){this.ms=null;this.hydrogenCount=this.fileIndex=this.modelIndex=0;this.hasRasmolHBonds=this.isPdbWithMultipleBonds=this.isBioModel=!1;this.loadState="";this.loadScript=null;this.isModelKit=!1;this.dataFrames=null;this.dataSourceFrame=-1;this.jmolFrameType=this.jmolData=null;this.ac=this.firstAtomIndex=0;this.bsAtomsDeleted=this.bsAtoms=null;this.trajectoryBaseIndex=0;this.isTrajectory=!1;this.bondCount=this.selectedTrajectory=-1;this.nInsertions=this.nAltLocs=
this.moleculeCount=this.firstMoleculeIndex=0;this.groupCount=-1;this.chainCount=0;this.chains=null;this.biosymmetryCount=0;this.properties=this.auxiliaryInfo=null;this.defaultRotationRadius=0;this.orientation=this.biosymmetry=this.defaultStructure=null;this.isJmolDataFrame=this.structureTainted=!1;this.frameDelay=0;this.dssrCache=this.simpleCage=null;s(this,arguments)},JM,"Model");K(c$,function(){this.loadScript=new JU.SB;this.bsAtoms=new JU.BS;this.bsAtomsDeleted=new JU.BS;this.chains=Array(8)});
c(c$,"getModelSet",function(){return this.ms});c(c$,"isModelkit",function(){return this.isModelKit});c(c$,"getTrueAtomCount",function(){return this.bsAtoms.cardinality()-this.bsAtomsDeleted.cardinality()});c(c$,"setSelectedTrajectory",function(a){this.selectedTrajectory=a},"~N");c(c$,"getSelectedTrajectory",function(){return this.selectedTrajectory});c(c$,"resetBoundCount",function(){this.bondCount=-1});c(c$,"getBondCount",function(){if(0<=this.bondCount)return this.bondCount;var a=this.ms.bo;this.bondCount=
0;for(var b=this.ms.bondCount;0<=--b;)a[b].atom1.mi==this.modelIndex&&this.bondCount++;return this.bondCount});u(c$,function(){});c(c$,"set",function(a,b,d,c,g,f){this.ms=a;this.dataSourceFrame=this.modelIndex=b;this.trajectoryBaseIndex=(this.isTrajectory=0<=d)?d:b;null==f&&(f=new java.util.Hashtable);this.auxiliaryInfo=f;f.containsKey("biosymmetryCount")&&(this.biosymmetryCount=f.get("biosymmetryCount").intValue(),this.biosymmetry=f.get("biosymmetry"));this.properties=g;null==c?this.jmolFrameType=
"modelSet":(this.jmolData=c,this.isJmolDataFrame=!0,f.put("jmolData",c),f.put("title",c),this.jmolFrameType=0<=c.indexOf("ramachandran")?"ramachandran":0<=c.indexOf("quaternion")?"quaternion":"data");return this},"JM.ModelSet,~N,~N,~S,java.util.Properties,java.util.Map");c(c$,"setNAltLocs",function(a){this.nAltLocs=a},"~N");c(c$,"setNInsertions",function(a){this.nInsertions=a},"~N");c(c$,"getModelNumberDotted",function(){return this.ms.getModelNumberDotted(this.modelIndex)});c(c$,"getModelTitle",
function(){return this.ms.getModelTitle(this.modelIndex)});c(c$,"isStructureTainted",function(){return this.structureTainted});c(c$,"getChains",function(){return this.chains});c(c$,"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(c$,"getGroupCountHetero",function(a){for(var b=0,d=this.chainCount;0<=--d;)for(var c=this.chains[d].groupCount;0<=--c;)this.chains[d].groups[c].isHetero()==
a&&b++;return b},"~B");c(c$,"calcSelectedGroupsCount",function(a){for(var b=this.chainCount;0<=--b;)this.chains[b].calcSelectedGroupsCount(a)},"JU.BS");c(c$,"getGroupCount",function(){if(0>this.groupCount){this.groupCount=0;for(var a=this.chainCount;0<=--a;)this.groupCount+=this.chains[a].getGroupCount()}return this.groupCount});c(c$,"getChainAt",function(a){return a<this.chainCount?this.chains[a]:null},"~N");c(c$,"getChain",function(a){for(var b=this.chainCount;0<=--b;){var d=this.chains[b];if(d.chainID==
a)return d}return null},"~N");c(c$,"fixIndices",function(a,b,d){this.fixIndicesM(a,b,d)},"~N,~N,JU.BS");c(c$,"fixIndicesM",function(a,b,d){this.dataSourceFrame>a&&this.dataSourceFrame--;this.trajectoryBaseIndex>a&&this.trajectoryBaseIndex--;this.firstAtomIndex-=b;for(a=0;a<this.chainCount;a++)this.chains[a].fixIndices(b,d);JU.BSUtil.deleteBits(this.bsAtoms,d);JU.BSUtil.deleteBits(this.bsAtomsDeleted,d)},"~N,~N,JU.BS");c(c$,"freeze",function(){this.freezeM()});c(c$,"freezeM",function(){this.chains=
JU.AU.arrayCopyObject(this.chains,this.chainCount);this.groupCount=-1;this.getGroupCount();for(var a=0;a<this.chainCount;++a)this.chains[a].groups=JU.AU.arrayCopyObject(this.chains[a].groups,this.chains[a].groupCount)});c(c$,"getPdbData",function(){},"JV.Viewer,~S,~S,~B,JU.BS,JU.OC,~A,JU.SB,JU.BS");c(c$,"getDefaultLargePDBRendering",function(){},"JU.SB,~N");c(c$,"getBioBranches",function(a){return a},"JU.Lst");c(c$,"getGroupsWithin",function(){},"~N,JU.BS,JU.BS");c(c$,"getSequenceBits",function(){},
"~S,JU.BS,JU.BS");c(c$,"getRasmolHydrogenBonds",function(){},"JU.BS,JU.BS,JU.Lst,~B,~N,~B,JU.BS");c(c$,"clearRasmolHydrogenBonds",function(){},"JU.BS");c(c$,"clearBioPolymers",function(){});c(c$,"calcSelectedMonomersCount",function(){},"JU.BS");c(c$,"calculatePolymers",function(){},"~A,~N,~N,JU.BS,~B");c(c$,"getAllPolymerInfo",function(){},"JU.BS,java.util.Map,JU.Lst");c(c$,"getBioPolymerCount",function(){return 0});c(c$,"getPolymerPointsAndVectors",function(){},"JU.BS,JU.Lst,~B,~N");c(c$,"getPolymerLeadMidPoints",
function(){return null},"~N");c(c$,"recalculateLeadMidpointsAndWingVectors",function(){});c(c$,"calculateStructures",function(){return""},"~B,~B,~B,~B,~B");c(c$,"setStructureList",function(){},"java.util.Map");c(c$,"getChimeInfo",function(a,b){this.getChimeInfoM(a,b)},"JU.SB,~N");c(c$,"getChimeInfoM",function(a,b){a.append("\nNumber of Atoms ..... "+(this.ms.ac-b));0<b&&a.append(" ("+b+")");a.append("\nNumber of Bonds ..... "+this.ms.bondCount);a.append("\nNumber of Models ...... "+this.ms.mc)},"JU.SB,~N");
c(c$,"calculateStruts",function(){return 0},"JM.ModelSet,JU.BS,JU.BS");c(c$,"calculateStraightness",function(){},"JV.Viewer,~S,~S,~N");c(c$,"selectSeqcodeRange",function(){},"~N,~N,~N,JU.BS,~B");c(c$,"setConformation",function(){},"JU.BS");c(c$,"getPdbConformation",function(){return!1},"JU.BS,~N");c(c$,"getProteinStructureState",function(){return null},"JU.BS,~B,~B,~N");c(c$,"getFullPDBHeader",function(){return null})});n("JM");w(["java.util.Hashtable","JU.BS","JV.JC"],"JM.ModelLoader","java.lang.Boolean $.Float $.NullPointerException java.util.Arrays JU.AU $.Lst $.P3 $.PT $.SB $.V3 J.api.Interface JM.Chain $.Group $.Model $.ModelSet JU.BSUtil $.Elements $.JmolMolecule $.Logger".split(" "),
function(){c$=t(function(){this.mergeModelSet=this.ms=this.vwr=null;this.appendNew=this.merging=!1;this.specialAtomIndexes=this.group3Counts=this.group3Lists=this.jmolData=null;this.doAddHydrogens=this.doMinimize=this.isPyMOLsession=this.isTrajectory=this.isPDB=this.is2D=this.someModelsAreModulated=this.someModelsHaveUnitcells=!1;this.groups=this.jbr=this.fileHeader=null;this.groupCount=0;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.htGroup1=null;this.iChain=0;this.structuresDefinedInFile=this.vStereo=null;s(this,arguments)},JM,"ModelLoader");
K(c$,function(){this.specialAtomIndexes=D(JV.JC.ATOMID_MAX,0);this.htAtomMap=new java.util.Hashtable;this.structuresDefinedInFile=new JU.BS});u(c$,function(a,b,d,c,g,f){this.vwr=a;this.ms=new JM.ModelSet(a,b);var j=a.getModelAdapter();this.mergeModelSet=g;(this.merging=null!=this.mergeModelSet&&0<this.mergeModelSet.ac)?this.ms.canSkipLoad=!1:a.resetShapes(!1);this.ms.preserveState=a.getPreserveState();this.ms.showRebondTimes=a.getBoolean(603979934);null==f?(this.initializeInfo(b,null),this.createModelSet(null,
null,null),a.setStringProperty("_fileType","")):(this.ms.preserveState||(this.ms.canSkipLoad=!1),a=j.getAtomSetCollectionAuxiliaryInfo(c),a.put("loadScript",d),this.initializeInfo(j.getFileTypeName(c).toLowerCase().intern(),a),this.createModelSet(j,c,f))},"JV.Viewer,~S,JU.SB,~O,JM.ModelSet,JU.BS");c(c$,"initializeInfo",function(a,b){this.ms.g3d=this.vwr.gdata;this.ms.modelSetTypeName=a;this.ms.isXYZ="xyz"===a;this.ms.msInfo=b;this.ms.modelSetProperties=this.ms.getInfoM("properties");if(this.isPDB=
this.ms.isPDB=this.ms.getMSInfoB("isPDB"))this.jbr=J.api.Interface.getInterface("JM.Resolver"),this.jbr.initialize(this);this.jmolData=this.ms.getInfoM("jmolData");this.fileHeader=this.ms.getInfoM("fileHeader");this.ms.trajectorySteps=this.ms.getInfoM("trajectorySteps");this.isTrajectory=null!=this.ms.trajectorySteps;this.isPyMOLsession=this.ms.getMSInfoB("isPyMOL");this.doAddHydrogens=null!=this.jbr&&!this.isTrajectory&&!this.isPyMOLsession&&!this.ms.getMSInfoB("pdbNoHydrogens")&&(this.ms.getMSInfoB("pdbAddHydrogens")||
this.vwr.getBooleanProperty("pdbAddHydrogens"));null!=b&&(b.remove("pdbNoHydrogens"),b.remove("pdbAddHydrogens"),b.remove("trajectorySteps"),this.isTrajectory&&(this.ms.vibrationSteps=b.remove("vibrationSteps")));this.htGroup1=this.ms.getInfoM("htGroup1");this.modulationOn=this.ms.getMSInfoB("modulationOn");this.noAutoBond=this.ms.getMSInfoB("noAutoBond");this.doMinimize=(this.is2D=this.ms.getMSInfoB("is2D"))&&this.ms.getMSInfoB("doMinimize");this.adapterTrajectoryCount=null==this.ms.trajectorySteps?
0:this.ms.trajectorySteps.size();this.ms.someModelsHaveSymmetry=this.ms.getMSInfoB("someModelsHaveSymmetry");this.someModelsHaveUnitcells=this.ms.getMSInfoB("someModelsHaveUnitcells");this.someModelsAreModulated=this.ms.getMSInfoB("someModelsAreModulated");this.ms.someModelsHaveFractionalCoordinates=this.ms.getMSInfoB("someModelsHaveFractionalCoordinates");this.merging&&(this.ms.isPDB=(new Boolean(this.ms.isPDB|this.mergeModelSet.isPDB)).valueOf(),this.ms.someModelsHaveSymmetry=(new Boolean(this.ms.someModelsHaveSymmetry|
this.mergeModelSet.getMSInfoB("someModelsHaveSymmetry"))).valueOf(),this.someModelsHaveUnitcells=(new Boolean(this.someModelsHaveUnitcells|this.mergeModelSet.getMSInfoB("someModelsHaveUnitcells"))).valueOf(),this.ms.someModelsHaveFractionalCoordinates=(new Boolean(this.ms.someModelsHaveFractionalCoordinates|this.mergeModelSet.getMSInfoB("someModelsHaveFractionalCoordinates"))).valueOf(),this.ms.someModelsHaveAromaticBonds=(new Boolean(this.ms.someModelsHaveAromaticBonds|this.mergeModelSet.someModelsHaveAromaticBonds)).valueOf(),
this.ms.msInfo.put("someModelsHaveSymmetry",Boolean.$valueOf(this.ms.someModelsHaveSymmetry)),this.ms.msInfo.put("someModelsHaveUnitcells",Boolean.$valueOf(this.someModelsHaveUnitcells)),this.ms.msInfo.put("someModelsHaveFractionalCoordinates",Boolean.$valueOf(this.ms.someModelsHaveFractionalCoordinates)),this.ms.msInfo.put("someModelsHaveAromaticBonds",Boolean.$valueOf(this.ms.someModelsHaveAromaticBonds)))},"~S,java.util.Map");c(c$,"getGroup3",function(a){return a>=this.group3Of.length?null:this.group3Of[a]},
"~N");c(c$,"getFirstAtomIndex",function(a){return this.firstAtomIndexes[a]},"~N");c(c$,"getAtomCount",function(){return this.ms.ac});c(c$,"createModelSet",function(a,b,d){var c=null==a?0:a.getAtomCount(b);0<c&&JU.Logger.info("reading "+c+" atoms");this.adapterModelCount=null==a?1:a.getAtomSetCount(b);this.appendNew=!this.merging||null==a||1<this.adapterModelCount||this.isTrajectory||this.vwr.getBoolean(603979792);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;if(this.merging&&(this.baseModelCount=this.mergeModelSet.mc,this.baseTrajectoryCount=this.mergeModelSet.mergeTrajectories(this.isTrajectory),0<this.baseTrajectoryCount)){if(this.isTrajectory){if(null==this.mergeModelSet.vibrationSteps){this.mergeModelSet.vibrationSteps=new JU.Lst;for(var g=this.mergeModelSet.trajectorySteps.size();0<=
--g;)this.mergeModelSet.vibrationSteps.addLast(null)}for(g=0;g<this.ms.trajectorySteps.size();g++)this.mergeModelSet.trajectorySteps.addLast(this.ms.trajectorySteps.get(g)),this.mergeModelSet.vibrationSteps.addLast(null==this.ms.vibrationSteps?null:this.ms.vibrationSteps.get(g))}this.ms.trajectorySteps=this.mergeModelSet.trajectorySteps;this.ms.vibrationSteps=this.mergeModelSet.vibrationSteps}this.initializeAtomBondModelCounts(c);null!=d&&(this.doMinimize||this.is2D)&&d.setBits(this.baseAtomIndex,
this.baseAtomIndex+c);null==a?this.setModelNameNumberProperties(0,-1,"",1,null,null,null):(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.')),g=this.ms.getInfoM("defaultOrientationQuaternion"),
null!=g&&(JU.Logger.info("defaultOrientationQuaternion = "+g),JU.Logger.info('Use "set autoLoadOrientation TRUE" before loading or "restore orientation DEFAULT" after loading to view this orientation.')),this.iterateOverAllNewModels(a,b),this.iterateOverAllNewAtoms(a,b),this.iterateOverAllNewBonds(a,b),this.merging&&!this.appendNew&&(g=a.getAtomSetAuxiliaryInfo(b,0),this.ms.setInfo(this.baseModelIndex,"initialAtomCount",g.get("initialAtomCount")),this.ms.setInfo(this.baseModelIndex,"initialBondCount",
g.get("initialBondCount"))),this.initializeUnitCellAndSymmetry(),this.initializeBonding());this.finalizeGroupBuild();this.is2D&&this.doMinimize&&this.applyStereochemistry();this.doAddHydrogens&&this.jbr.finalizeHydrogens();null!=a&&(this.ms.calculatePolymers(this.groups,this.groupCount,this.baseGroupIndex,null),null!=this.jbr&&this.jbr.iterateOverAllNewStructures(a,b));this.setDefaultRendering(this.vwr.getInt(553648170));var f=this.vwr.rd;d=this.ms.ac;c=this.ms.at;for(g=this.baseAtomIndex;g<d;g++)c[g].setMadAtom(this.vwr,
f);f=this.ms.am;for(g=f[this.baseModelIndex].firstAtomIndex;g<d;g++)f[c[g].mi].bsAtoms.set(g);this.freeze();this.finalizeShapes();this.vwr.setModelSet(this.ms);this.setAtomProperties();null!=a&&a.finish(b);null!=this.mergeModelSet&&this.mergeModelSet.releaseModelSet();this.mergeModelSet=null},"J.api.JmolAdapter,~O,JU.BS");c(c$,"setDefaultRendering",function(a){if(!this.isPyMOLsession){for(var b=new JU.SB,d=this.ms.mc,c=this.ms.am,g=this.baseModelIndex;g<d;g++)c[g].isBioModel&&c[g].getDefaultLargePDBRendering(b,
a);0!=b.length()&&(b.append("select *;"),a=this.ms.getInfoM("jmolscript"),null==a&&(a=""),b.append(a),this.ms.msInfo.put("jmolscript",b.toString()))}},"~N");c(c$,"setAtomProperties",function(){for(var a=this.ms.mc,b=this.baseModelIndex;b<a;b++){var d=this.ms.getInfo(b,"atomProperties"),c=this.ms.getInfo(b,"groupPropertyList");if(null!=d)for(var g,d=d.entrySet().iterator();d.hasNext()&&((g=d.next())||1);){var f=g.getKey(),j=g.getValue(),k=this.ms.getModelAtomBitSetIncludingDeleted(b,!0);if(this.doAddHydrogens)var h=
null!=c&&JU.PT.isOneOf(f,c),j=this.jbr.fixPropertyValue(k,j,h);f="property_"+f.toLowerCase();JU.Logger.info("creating "+f+" for model "+this.ms.getModelName(b));this.vwr.setData(f,[f,j,k,Integer.$valueOf(-1),Boolean.FALSE],this.ms.ac,0,0,2147483647,0)}}});c(c$,"initializeAtomBondModelCounts",function(a){var b=this.adapterTrajectoryCount;this.merging?(this.appendNew?(this.baseModelIndex=this.baseModelCount,this.ms.mc=this.baseModelCount+this.adapterModelCount):(this.baseModelIndex=this.vwr.am.cmi,
0>this.baseModelIndex&&(this.baseModelIndex=this.baseModelCount-1),this.ms.mc=this.baseModelCount),this.ms.ac=this.baseAtomIndex=this.mergeModelSet.ac,this.ms.bondCount=this.mergeModelSet.bondCount,this.$mergeGroups=this.mergeModelSet.getGroups(),this.groupCount=this.baseGroupIndex=this.$mergeGroups.length,this.ms.mergeModelArrays(this.mergeModelSet),this.ms.growAtomArrays(this.ms.ac+a)):(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.doAddHydrogens&&this.jbr.initializeHydrogenAddition();1<b&&(this.ms.mc+=b-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.mergeModelSet.mc;a++)(this.ms.am[a]=this.mergeModelSet.am[a]).ms=this.ms},"~N");c(c$,"mergeGroups",function(){var a=this.mergeModelSet.getAuxiliaryInfo(null),b=a.get("group3Lists"),a=a.get("group3Counts");if(null!=b){for(var d=0;d<this.baseModelCount;d++)this.group3Lists[d+1]=b[d+1],this.group3Counts[d+1]=a[d+1],this.structuresDefinedInFile.set(d);this.group3Lists[0]=b[0];this.group3Counts[0]=a[0]}!this.appendNew&&this.isPDB&&this.structuresDefinedInFile.clear(this.baseModelIndex)});
c(c$,"iterateOverAllNewModels",function(a,b){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 d=this.isTrajectory?this.baseTrajectoryCount:-1,c=this.baseModelIndex,g=0;g<this.adapterModelCount;++g,++c){var f=a.getAtomSetNumber(b,g),j=a.getAtomSetName(b,g),k=a.getAtomSetAuxiliaryInfo(b,g);k.containsKey("modelID")&&k.put("modelID0",k.get("modelID"));var h=k.get("modelProperties");this.vwr.setStringProperty("_fileType",
k.get("fileType"));null==j&&(j=null!=this.jmolData&&2<this.jmolData.indexOf(";")?this.jmolData.substring(this.jmolData.indexOf(":")+2,this.jmolData.indexOf(";")):this.appendNew?""+f%1E6:"");this.setModelNameNumberProperties(c,d,j,f,h,k,this.jmolData)&&(this.group3Lists[c+1]=JV.JC.getGroup3List(),this.group3Counts[c+1]=D(JV.JC.getGroup3Count()+10,0),null==this.group3Lists[0]&&(this.group3Lists[0]=JV.JC.getGroup3List(),this.group3Counts[0]=D(JV.JC.getGroup3Count()+10,0)));null!=this.ms.getInfo(c,"periodicOriginXyz")&&
(this.ms.someModelsHaveSymmetry=!0)}d=this.ms.am[this.baseModelIndex];this.vwr.setSmilesString(this.ms.msInfo.get("smilesString"));g=this.ms.msInfo.remove("loadState");f=this.ms.msInfo.remove("loadScript");if(0>f.indexOf("Viewer.AddHydrogens")||!d.isModelKit){j=JU.PT.split(g,"\n");k=new JU.SB;for(g=0;g<j.length;g++)h=d.loadState.indexOf(j[g]),(0>h||h!=d.loadState.lastIndexOf(j[g]))&&k.append(j[g]).appendC("\n");d.loadState+=d.loadScript.toString()+k.toString();d.loadScript=new JU.SB;d.loadScript.append("  ").appendSB(f).append(";\n")}if(this.isTrajectory){g=
this.ms.mc-c+1;JU.Logger.info(g+" trajectory steps read");this.ms.setInfo(this.baseModelCount,"trajectoryStepCount",Integer.$valueOf(g));d=this.adapterModelCount;for(g=c;g<this.ms.mc;g++,d++)this.ms.am[g]=this.ms.am[this.baseModelCount],this.ms.modelNumbers[g]=a.getAtomSetNumber(b,d),this.ms.modelNames[g]=a.getAtomSetName(b,d),this.structuresDefinedInFile.set(g)}this.finalizeModels(this.baseModelCount)},"J.api.JmolAdapter,~O");c(c$,"setModelNameNumberProperties",function(a,b,d,c,g,f,j){var k=null!=
f&&Boolean.TRUE===f.get("isPDB");this.appendNew?(this.ms.am[a]=k?this.jbr.getBioModel(a,b,j,g,f):(new JM.Model).set(this.ms,a,b,j,g,f),this.ms.modelNumbers[a]=c,this.ms.modelNames[a]=d):(b=f.get("PDB_CONECT_firstAtom_count_max"),null!=b&&this.ms.setInfo(a,"PDB_CONECT_firstAtom_count_max",b));b=this.ms.am;c=this.ms.at;b[a].bsAtoms.set(c.length+1);b[a].bsAtoms.clear(c.length+1);c=this.ms.getInfo(a,"altLocs");b[a].setNAltLocs(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");b[a].setNInsertions(null==c?0:c.length);d=null!=this.ms.modelSetName&&this.ms.modelSetName.startsWith("Jmol Model Kit")||d.startsWith("Jmol Model Kit")||"Jme".equals(this.ms.getInfo(a,"fileType"));b[a].isModelKit=d;return k},"~N,~N,~S,~N,java.util.Properties,java.util.Map,~S");c(c$,"finalizeModels",function(a){var b=this.ms.mc;if(b!=a){var d,c=0,g=-1,f=this.ms.modelNumbers,j=this.ms.modelNames;if(this.isTrajectory)for(var k=
a;++k<this.ms.mc;)f[k]=f[k-1]+1;if(0<a){if(1E6>f[0])for(k=0;k<a;k++)0==j[k].length&&(j[k]=""+f[k]),f[k]+=1E6,this.ms.modelNumbersForAtomLabel[k]="1."+(k+1);var h=f[a-1],h=h-h%1E6;1E6>f[a]&&(h+=1E6);for(k=a;k<b;k++)f[k]+=h}for(var m=this.ms.am,k=a;k<b;++k)if(this.ms.setInfo(k,"fileType",this.ms.modelSetTypeName),null!=this.fileHeader&&this.ms.setInfo(k,"fileHeader",this.fileHeader),h=q(f[k]/1E6),h!=g&&(c=0,g=h),c++,0==h?(d=""+this.ms.getModelNumber(k),h=1):d=h+"."+c,this.ms.modelNumbersForAtomLabel[k]=
d,m[k].fileIndex=h-1,this.ms.modelFileNumbers[k]=1E6*h+c,null==j[k]||0==j[k].length)j[k]=d;if(this.merging)for(k=0;k<a;k++)m[k].ms=this.ms;for(k=0;k<b;k++)this.ms.setInfo(k,"modelName",j[k]),this.ms.setInfo(k,"modelNumber",Integer.$valueOf(f[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(c$,"iterateOverAllNewAtoms",function(a,b){var d=-1,c=!1,g=!1,f=a.getAtomIterator(b),j=0,k=this.ms.am;0<this.ms.mc&&(this.nullGroup=(new JM.Group).setGroup(new JM.Chain(this.ms.am[this.baseModelIndex],32,-1),"",0,-1,-1));for(;f.hasNext();){j++;var h=f.getAtomSetIndex()+this.baseModelIndex;h!=d&&(this.iChain=0,this.iModel=h,this.model=k[h],this.currentChainID=2147483647,this.isNewChain=!0,k[h].bsAtoms.clearAll(),c=k[h].isBioModel,d=h,g=c&&this.doAddHydrogens,
null!=this.jbr&&this.jbr.setHaveHsAlready(!1));var h=f.getGroup3(),m=f.getChainID();this.checkNewGroup(a,m,h,f.getSequenceNumber(),f.getInsertionCode(),g,!1);m=f.getElementNumber();g&&1==JU.Elements.getElementNumber(m)&&this.jbr.setHaveHsAlready(!0);var r=f.getAtomName(),x=g?this.getPdbCharge(h,r):f.getFormalCharge();this.addAtom(c,f.getSymmetry(),f.getAtomSite(),f.getUniqueID(),m,r,x,f.getPartialCharge(),f.getTensors(),f.getOccupancy(),f.getBfactor(),f.getXYZ(),f.getIsHetero(),f.getSerial(),f.getSeqID(),
h,f.getVib(),f.getAltLoc(),f.getRadius())}0<this.groupCount&&g&&this.jbr.addImplicitHydrogenAtoms(a,this.groupCount-1,this.isNewChain?1:0);d=-1;c=null;g=this.ms.at;for(f=0;f<this.ms.ac;f++)g[f].mi!=d&&(d=g[f].mi,k[d].firstAtomIndex=f,h=this.ms.getDefaultVdwType(d),h!==c&&(JU.Logger.info("Default Van der Waals type for model set to "+h.getVdwLabel()),c=h));JU.Logger.info(j+" atoms created")},"J.api.JmolAdapter,~O");c(c$,"getPdbCharge",function(a,b){return a.equals("ARG")&&b.equals("NH1")||a.equals("LYS")&&
b.equals("NZ")||a.equals("HIS")&&b.equals("ND1")?1:0},"~S,~S");c(c$,"addAtom",function(a,b,d,c,g,f,j,k,h,m,r,x,n,q,p,s,t,u,v){var w=0;null!=f&&(a&&0<=f.indexOf("*")&&(f=f.$replace("*","'")),w=JV.JC.lookupSpecialAtomID(f),a&&(2==w&&"CA".equalsIgnoreCase(s))&&(w=0));a=this.ms.addAtom(this.iModel,this.nullGroup,g,f,q,p,d,x,v,t,j,k,m,r,h,n,w,b);a.setAltLoc(u);this.htAtomMap.put(c,a)},"~B,JU.BS,~N,~O,~N,~S,~N,~N,JU.Lst,~N,~N,JU.P3,~B,~N,~N,~S,JU.V3,~S,~N");c(c$,"checkNewGroup",function(a,b,d,c,g,f,j){var k=
null==d?null:d.intern();b!=this.currentChainID&&(this.currentChainID=b,this.currentChain=this.getOrAllocateChain(this.model,b),this.currentGroupInsertionCode="\uffff",this.currentGroupSequenceNumber=-1,this.currentGroup3="xxxx",this.isNewChain=!0);if(c!=this.currentGroupSequenceNumber||g!=this.currentGroupInsertionCode||k!==this.currentGroup3){0<this.groupCount&&f&&(this.jbr.addImplicitHydrogenAtoms(a,this.groupCount-1,this.isNewChain&&!j?1:0),this.jbr.setHaveHsAlready(!1));this.currentGroupSequenceNumber=
c;this.currentGroupInsertionCode=g;for(this.currentGroup3=k;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]=d;this.seqcodes[this.groupCount]=JM.Group.getSeqcodeFor(c,g);++this.groupCount}},
"J.api.JmolAdapter,~N,~S,~N,~S,~B,~B");c(c$,"getOrAllocateChain",function(a,b){var d=a.getChain(b);if(null!=d)return d;a.chainCount==a.chains.length&&(a.chains=JU.AU.doubleLength(a.chains));return a.chains[a.chainCount++]=new JM.Chain(a,b,0==b||32==b?-1:this.iChain++)},"JM.Model,~N");c(c$,"iterateOverAllNewBonds",function(a,b){var d=a.getBondIterator(b);if(null!=d){var c=this.vwr.getMadBond();this.ms.defaultCovalentMad=null==this.jmolData?c:0;for(var g=!1;d.hasNext();){var f=d.getEncodedOrder(),j=
f,k=this.bondAtoms(d.getAtomUniqueID1(),d.getAtomUniqueID2(),j);null!=k&&(1<j&&(1025!=j&&1041!=j)&&(g=!0),j=d.getRadius(),0<j&&k.setMad(Y(2E3*j)),j=d.getColix(),0<=j&&k.setColix(j),k.order|=f&98304)}g&&(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.');this.ms.defaultCovalentMad=c}},"J.api.JmolAdapter,~O");c(c$,"bondAtoms",function(a,b,d){var c=this.htAtomMap.get(a);
if(null==c)return JU.Logger.error("bondAtoms cannot find atomUid1?:"+a),null;a=this.htAtomMap.get(b);if(null==a)return JU.Logger.error("bondAtoms cannot find atomUid2?:"+b),null;if(c.isBonded(a))return null;1025==d||1041==d?(b=this.ms.bondMutually(c,a,this.is2D?d:1,this.ms.getDefaultMadFromOrder(1),0),null==this.vStereo&&(this.vStereo=new JU.Lst),this.vStereo.addLast(b)):(b=this.ms.bondMutually(c,a,d,this.ms.getDefaultMadFromOrder(d),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(c$,"initializeUnitCellAndSymmetry",function(){this.someModelsAreModulated&&null==this.ms.bsModulated&&(this.ms.bsModulated=new JU.BS);if(this.someModelsHaveUnitcells){this.ms.unitCells=Array(this.ms.mc);this.ms.haveUnitCells=!0;for(var a=null!=this.mergeModelSet&&null!=this.mergeModelSet.unitCells,b=0,d=0;b<this.ms.mc;b++)if(a&&b<this.baseModelCount)this.ms.unitCells[b]=
this.mergeModelSet.unitCells[b];else{this.ms.unitCells[b]=J.api.Interface.getSymmetry();var c=null;if(this.isTrajectory){var g=this.ms.getInfoM("unitCells");null!=g&&(c=g.get(d++))}this.ms.unitCells[b].setSymmetryInfo(b,this.ms.getModelAuxiliaryInfo(b),c)}}if(this.appendNew&&this.ms.someModelsHaveSymmetry){this.ms.getAtoms(1089470478,null);a=this.ms.at;b=this.baseAtomIndex;d=-1;for(c=0;b<this.ms.ac;b++)a[b].mi!=d&&(d=a[b].mi,c=this.baseAtomIndex+this.ms.getInfoI(d,"presymmetryAtomIndex")+this.ms.getInfoI(d,
"presymmetryAtomCount")),b>=c&&this.ms.bsSymmetry.set(b)}if(this.appendNew&&this.ms.someModelsHaveFractionalCoordinates){a=this.ms.at;c=-1;d=null;for(b=this.baseAtomIndex;b<this.ms.ac;b++)a[b].mi!=c&&(c=a[b].mi,d=this.ms.getUnitCell(c)),null!=d&&d.getCoordinatesAreFractional()&&(d=a[b].getUnitCell(),d.toCartesian(d.toSupercell(a[b]),!1));for(a=this.baseModelIndex;a<this.ms.mc;a++)if(this.ms.isTrajectory(a)&&(d=this.ms.getUnitCell(a),null!=d&&d.getCoordinatesAreFractional()&&d.isSupercell())){c=this.ms.trajectorySteps.get(a);
for(b=c.length;0<=--b;)null!=c[b]&&d.toSupercell(c[b])}}});c(c$,"initializeBonding",function(){var a=null==this.ms.getInfoM("someModelsHaveCONECT")?null:new JU.BS;null!=a&&this.ms.setPdbConectBonding(this.baseAtomIndex,this.baseModelIndex,a);var b=0,d=this.vwr.getBoolean(603979794),c=this.vwr.getBoolean(603979798),g=this.vwr.getBoolean(603979846),f=null,j=!1,k=this.ms.mc,h=this.ms.am;if(!this.noAutoBond)for(var m=this.baseModelIndex;m<k;m++){var b=h[m].bsAtoms.cardinality(),r=this.ms.getInfoI(m,"initialBondCount"),
x=h[m].isBioModel;0>r&&(r=this.ms.bondCount);var n=this.ms.getInfoB(m,"hasSymmetry");if(g||c&&(0==r||x&&null==this.jmolData&&(this.ms.getMSInfoB("havePDBHeaderName")||r<q(b/2))||n&&!d&&!this.ms.getInfoB(m,"hasBonds")))if(j=!0,this.merging||1<k)null==f&&(f=JU.BS.newN(this.ms.ac)),(m==this.baseModelIndex||!this.isTrajectory)&&f.or(h[m].bsAtoms)}j?(this.modulationOn&&this.ms.setModulation(null,!0,null,!1),this.ms.autoBondBs4(f,f,a,null,this.ms.defaultCovalentMad,this.vwr.getBoolean(603979874)),JU.Logger.info("ModelSet: autobonding; use  autobond=false  to not generate bonds automatically")):
(this.ms.initializeBspf(),JU.Logger.info("ModelSet: not autobonding; use  forceAutobond=true  to force automatic bond creation"))});c(c$,"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],this.groups[a].setModelSet(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]);if(null!=this.group3Lists&&null!=this.ms.msInfo){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(c$,"distinguishAndPropagateGroup",function(a,b,d,c,g,f){var j=f-1;if(j<g)throw new NullPointerException;var k=this.ms.at[g].mi,h=null==d||null==this.jbr?null:this.jbr.distinguishAndPropagateGroup(b,d,c,g,f,
k,this.specialAtomIndexes,this.ms.at);null==h?(h=(new JM.Group).setGroup(b,d,c,g,j),c="o>"):c=h.isProtein()?"p>":h.isNucleic()?"n>":h.isCarbohydrate()?"c>":"o>";null!=d&&(this.countGroup(k,c,d),h.isNucleic()&&(d=null==this.htGroup1?null:this.htGroup1.get(d),null!=d&&(h.group1=d.charAt(0))));this.addGroup(b,h);this.groups[a]=h;h.setGroupIndex(a);for(a=f;--a>=g;)this.ms.at[a].setGroup(h)},"~N,JM.Chain,~S,~N,~N,~N");c(c$,"addGroup",function(a,b){a.groupCount==a.groups.length&&(a.groups=JU.AU.doubleLength(a.groups));
a.groups[a.groupCount++]=b},"JM.Chain,JM.Group");c(c$,"countGroup",function(a,b,d){var c=a+1;if(!(null==this.group3Lists||null==this.group3Lists[c])){var g=(d+"   ").substring(0,3),f=this.group3Lists[c].indexOf(g);0>f&&(this.group3Lists[c]+=",["+g+"]",f=this.group3Lists[c].indexOf(g),this.group3Counts[c]=JU.AU.arrayCopyI(this.group3Counts[c],this.group3Counts[c].length+10));this.group3Counts[c][q(f/6)]++;f=this.group3Lists[c].indexOf(",["+g);0<=f&&(this.group3Lists[c]=this.group3Lists[c].substring(0,
f)+b+this.group3Lists[c].substring(f+2));0<=a&&this.countGroup(-1,b,d)}},"~N,~S,~S");c(c$,"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 b=this.ms.freeBonds[a],d=b.length;0<=--d;)b[d]=null}this.ms.setAtomNamesAndNumbers(0,this.baseAtomIndex,this.mergeModelSet);this.findElementsPresent();
this.ms.resetMolecules();this.currentChain=this.model=null;!this.isPDB||this.isPyMOLsession?this.ms.freezeModels():(a=this.vwr.getBoolean(603979826),a=this.ms.calculateStructuresAllExcept(this.structuresDefinedInFile,a,!1,!0,!0,a),0<a.length&&JU.Logger.info(a))});c(c$,"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 b=this.ms.at[a].getAtomicAndIsotopeNumber();b>=JU.Elements.elementNumberMax&&
(b=JU.Elements.elementNumberMax+JU.Elements.altElementIndexFromNumber(b));this.ms.elementsPresent[this.ms.at[a].mi].set(b)}});c(c$,"applyStereochemistry",function(){this.set2dZ(this.baseAtomIndex,this.ms.ac);if(null!=this.vStereo){var a=new JU.BS;a.setBits(this.baseAtomIndex,this.ms.ac);for(var b=this.vStereo.size();0<=--b;){var d=this.vStereo.get(b),c=1025==d.order?3:-3;d.order=1;d.atom2.z!=d.atom1.z&&0>c==d.atom2.z<d.atom1.z&&(c/=3);var g=JU.JmolMolecule.getBranchBitSet(this.ms.at,d.atom2.i,a,null,
d.atom1.i,!1,!0);g.set(d.atom2.i);for(var f=g.nextSetBit(0);0<=f;f=g.nextSetBit(f+1))this.ms.at[f].z+=c;d.atom2.x=(d.atom1.x+d.atom2.x)/2;d.atom2.y=(d.atom1.y+d.atom2.y)/2}this.vStereo=null}this.is2D=!1});c(c$,"set2dZ",function(a,b){var d=JU.BS.newN(b),c=new JU.BS,g=new JU.V3,f=JU.V3.new3(0,1,0),j=new JU.V3,k=new JU.BS;k.setBits(a,b);for(var h=a;h<b;h++)!d.get(h)&&!c.get(h)&&(c=this.getBranch2dZ(h,-1,k,c,g,f,j),d.or(c))},"~N,~N");c(c$,"getBranch2dZ",function(a,b,d,c,g,f,j){c=JU.BS.newN(this.ms.ac);
if(0>a)return c;var k=new JU.BS;k.or(d);0<=b&&k.clear(b);JM.ModelLoader.setBranch2dZ(this.ms.at[a],c,k,g,f,j);return c},"~N,~N,JU.BS,JU.BS,JU.V3,JU.V3,JU.V3");c$.setBranch2dZ=c(c$,"setBranch2dZ",function(a,b,d,c,g,f){var j=a.i;if(d.get(j)&&(d.clear(j),b.set(j),null!=a.bonds))for(j=a.bonds.length;0<=--j;){var k=a.bonds[j];k.isHydrogen()||(k=k.getOtherAtom(a),JM.ModelLoader.setAtom2dZ(a,k,c,g,f),JM.ModelLoader.setBranch2dZ(k,b,d,c,g,f))}},"JM.Atom,JU.BS,JU.BS,JU.V3,JU.V3,JU.V3");c$.setAtom2dZ=c(c$,
"setAtom2dZ",function(a,b,d,c,g){d.sub2(b,a);d.z=0;d.normalize();g.cross(c,d);d=Math.acos(d.dot(c));b.z=a.z+0.8*Math.sin(4*d)},"JM.Atom,JM.Atom,JU.V3,JU.V3,JU.V3");c(c$,"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();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(c$,"undeleteAtom",function(a){this.ms.at[a].valence=0},"~N");c$.createAtomDataSet=c(c$,"createAtomDataSet",function(a,b,d,c,g){if(null==c)return null;var f=a.getModelAdapter(),j=new JU.P3,k=b.at,h=a.getFloat(570425363);if(null!=b.unitCells)for(var m=g.nextSetBit(0);0<=m;m=g.nextSetBit(m+1))if(null!=k[m].getAtomSymmetry()){h=-h;break}for(var m=-1,r=0,x=JU.BSUtil.cardinalityOf(g)==a.getAtomCount(),n=f.getAtomIterator(c);n.hasNext();){var q=
n.getXYZ();if(!Float.isNaN(q.x+q.y+q.z))if(1146095626==d){m=g.nextSetBit(m+1);if(0>m)break;r++;JU.Logger.debugging&&JU.Logger.debug("atomIndex = "+m+": "+k[m]+" --\x3e ("+q.x+","+q.y+","+q.z);b.setAtomCoord(m,q.x,q.y,q.z)}else{j.setT(q);q=JU.BS.newN(b.ac);b.getAtomsWithin(h,j,q,-1);q.and(g);if(x)if(r=JU.BSUtil.cardinalityOf(q),0==r){JU.Logger.warn("createAtomDataSet: no atom found at position "+j);continue}else 1<r&&JU.Logger.debugging&&JU.Logger.debug("createAtomDataSet: "+r+" atoms found at position "+
j);switch(d){case 1146095631:var p=n.getVib();if(null==p)continue;JU.Logger.debugging&&JU.Logger.debug("xyz: "+j+" vib: "+p);b.setAtomCoords(q,1146095631,p);break;case 1129318401:b.setAtomProperty(q,d,0,n.getOccupancy(),null,null,null);break;case 1112541196:b.setAtomProperty(q,d,0,n.getPartialCharge(),null,null,null);break;case 1112541199:b.setAtomProperty(q,d,0,n.getBfactor(),null,null,null)}}}switch(d){case 1146095631:b=f.getAtomSetName(c,0);JU.Logger.info("_vibrationName = "+b);a.setStringProperty("_vibrationName",
b);break;case 1146095626:if(JU.Logger.info(r+" atom positions read"),b.recalculateLeadMidpointsAndWingVectors(-1),r==b.ac)return"boundbox {*};reset"}return null},"JV.Viewer,JM.ModelSet,~N,~O,JU.BS");C(c$,"defaultGroupCount",32)});n("JM");w("JM.BondCollection JU.BS $.Lst $.M3 $.M4 $.P3 $.V3 JU.BoxInfo".split(" "),"JM.ModelSet","java.lang.Boolean $.Float java.util.Hashtable JU.A4 $.AU $.Measure $.P4 $.PT $.Quat $.SB J.api.Interface $.JmolModulationSet J.atomdata.RadiusData J.bspt.Bspf J.c.PAL $.VDW JM.Atom $.AtomIteratorWithinModel $.AtomIteratorWithinModelSet $.Bond $.BondSet $.HBond $.Model $.StateScript JS.SV JU.BSUtil $.Elements $.Escape $.JmolMolecule $.Logger $.Txt JV.JC".split(" "),
function(){c$=t(function(){this.echoShapeActive=this.selectionHaloEnabled=!1;this.am=this.modelSetName=this.bsSymmetry=this.pointGroup=this.closest=this.modelSetTypeName=null;this.mc=0;this.unitCells=null;this.haveUnitCells=!1;this.elementsPresent=this.frameTitles=this.modelNames=this.modelNumbersForAtomLabel=this.modelFileNumbers=this.modelNumbers=null;this.isPDB=this.isXYZ=!1;this.msInfo=this.modelSetProperties=null;this.someModelsHaveFractionalCoordinates=this.someModelsHaveAromaticBonds=this.someModelsHaveSymmetry=
!1;this.ptTemp=null;this.isBbcageDefault=!1;this.stateScripts=this.boxInfo=this.bboxAtoms=this.bboxModels=null;this.thisStateModel=0;this.selectedMolecules=this.vibrationSteps=this.trajectorySteps=null;this.showRebondTimes=!0;this.ptTemp2=this.ptTemp1=this.sm=this.bsAll=null;this.proteinStructureTainted=!1;this.vTemp=this.mat4t=this.mat4=this.matInv=this.matTemp=this.triangulator=this.vOrientations=this.htPeaks=this.symTemp=null;s(this,arguments)},JM,"ModelSet",JM.BondCollection);K(c$,function(){this.closest=
Array(1);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.ptTemp=new JU.P3;this.boxInfo=new JU.BoxInfo;this.boxInfo.addBoundBoxPoint(JU.P3.new3(-10,-10,-10));this.boxInfo.addBoundBoxPoint(JU.P3.new3(10,10,10));this.stateScripts=new JU.Lst;this.selectedMolecules=new JU.BS;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});u(c$,function(a,b){E(this,JM.ModelSet,[]);this.vwr=a;this.modelSetName=b},"JV.Viewer,~S");h(c$,"releaseModelSet",function(){this.am=null;this.unitCells=this.bsAll=this.bsSymmetry=this.am=this.closest[0]=null;this.releaseModelSetBC()});c(c$,"setSelectionHaloEnabled",function(a){this.selectionHaloEnabled=a},"~B");c(c$,"getSelectionHaloEnabled",function(){return this.selectionHaloEnabled});c(c$,"getEchoStateActive",function(){return this.echoShapeActive});c(c$,"setEchoStateActive",
function(a){this.echoShapeActive=a},"~B");c(c$,"getModelSetTypeName",function(){return this.modelSetTypeName});c(c$,"getModelNumberIndex",function(a,b,d){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}for(b=0;b<this.mc;b++)if(this.modelFileNumbers[b]==a)return d&&this.isTrajectory(b)&&this.setTrajectory(b),b;return-1},"~N,~B,~B");c(c$,"getBitSetTrajectories",function(){if(null==this.trajectorySteps)return null;for(var a=new JU.BS,b=this.mc;0<=
--b;){var d=this.am[b].getSelectedTrajectory();0<=d&&(a.set(d),b=this.am[b].trajectoryBaseIndex)}return a});c(c$,"setTrajectoryBs",function(a){for(var b=0;b<this.mc;b++)a.get(b)&&this.setTrajectory(b)},"JU.BS");c(c$,"setTrajectory",function(a){if(!(0>a)&&this.isTrajectory(a)&&this.at[this.am[a].firstAtomIndex].mi!=a){var b=this.am[a].trajectoryBaseIndex;this.am[b].setSelectedTrajectory(a);this.setAtomPositions(b,a,this.trajectorySteps.get(a),null,0,null==this.vibrationSteps?null:this.vibrationSteps.get(a),
!0);b=this.vwr.am.cmi;0<=b&&(b!=a&&this.am[b].fileIndex==this.am[a].fileIndex)&&this.vwr.setCurrentModelIndexClear(a,!1)}},"~N");c(c$,"morphTrajectories",function(a,b,d){if(!(0>a||0>b||!this.isTrajectory(a)||!this.isTrajectory(b)))if(0==d)this.setTrajectory(a);else if(1==d)this.setTrajectory(b);else{var c=this.am[a].trajectoryBaseIndex;this.am[c].setSelectedTrajectory(a);this.setAtomPositions(c,a,this.trajectorySteps.get(a),this.trajectorySteps.get(b),d,null==this.vibrationSteps?null:this.vibrationSteps.get(a),
!0);b=this.vwr.am.cmi;0<=b&&(b!=a&&this.am[b].fileIndex==this.am[a].fileIndex)&&this.vwr.setCurrentModelIndexClear(a,!1)}},"~N,~N,~N");c(c$,"setAtomPositions",function(a,b,d,c,g,f,j){var k=new JU.BS,h=new JU.V3,m=this.am[a].firstAtomIndex,r=m+this.getAtomCountInModel(a);if(0==g)for(var x=0;m<r&&x<d.length;m++,x++)this.at[m].mi=b,null!=d[x]&&(j?this.at[m].setFractionalCoordTo(d[x],!0):this.at[m].setT(d[x]),null!=this.vibrationSteps&&(null!=f&&null!=f[x]&&(h=f[x]),this.setVibrationVector(m,h)),k.set(m));
else{f=new JU.P3;h=Math.min(d.length,c.length);for(x=0;m<r&&x<h;m++,x++)this.at[m].mi=b,null==d[x]||null==c[x]||(f.sub2(c[x],d[x]),f.scaleAdd2(g,f,d[x]),j?this.at[m].setFractionalCoordTo(f,!0):this.at[m].setT(f),k.set(m))}this.initializeBspf();this.validateBspfForModel(a,!1);this.recalculateLeadMidpointsAndWingVectors(a);this.sm.refreshShapeTrajectories(a,k,null);this.am[a].hasRasmolHBonds&&(this.am[a].clearRasmolHydrogenBonds(null),this.am[a].getRasmolHydrogenBonds(k,k,null,!1,2147483647,!1,null))},
"~N,~N,~A,~A,~N,~A,~B");c(c$,"getFrameOffsets",function(a){if(null==a)return null;for(var b=Array(this.mc),d=0;d<this.mc;d++)b[d]=new JU.P3;for(var c=0,g=0,f=b[0],j=null!=this.trajectorySteps&&this.trajectorySteps.size()==this.mc,k=j?this.mc:1,h=0;h<k;h++){j&&this.setTrajectory(h);for(d=0;d<=this.ac;d++){if(d==this.ac||this.at[d].mi!=c){0<g&&(f.scale(-1/g),0!=c&&f.sub(b[0]),g=0);if(d==this.ac)break;c=this.at[d].mi;f=b[c]}a.get(d)&&(f.add(this.at[d]),g++)}}b[0].set(0,0,0);return b},"JU.BS");c(c$,"getAtoms",
function(a,b){switch(a){default:return JU.BSUtil.andNot(this.getAtomBitsMaybeDeleted(a,b),this.vwr.getDeletedAtoms());case 1048610:var d=b.intValue(),c=this.getModelNumberIndex(d,!0,!0);return 0>c&&0<d?new JU.BS:this.vwr.getModelUndeletedAtomsBitSet(c)}},"~N,~O");c(c$,"findNearestAtomIndex",function(a,b,d,c){if(0==this.ac)return-1;this.closest[0]=null;this.g3d.isAntialiased()&&(a<<=1,b<<=1);this.findNearest2(a,b,this.closest,d,c);this.sm.findNearestShapeAtomIndex(a,b,this.closest,d);a=null==this.closest[0]?
-1:this.closest[0].i;this.closest[0]=null;return a},"~N,~N,JU.BS,~N");c(c$,"calculateStructures",function(a,b,d,c,g){var f=new JU.BS;a=JU.BSUtil.copyInvert(this.modelsOf(a,f),this.mc);if(!g)return this.calculateStructuresAllExcept(a,b,d,c,!1,!1);for(g=0;g<this.mc;g++)a.get(g)||this.am[g].clearBioPolymers();this.calculatePolymers(null,0,0,a);b=this.calculateStructuresAllExcept(a,b,d,c,!0,!1);this.vwr.shm.resetBioshapes(f);this.setStructureIndexes();return b},"JU.BS,~B,~B,~B,~B");c(c$,"calculatePointGroup",
function(a){return this.calculatePointGroupForFirstModel(a,!1,!1,!1,null,0,0)},"JU.BS");c(c$,"getPointGroupInfo",function(a){return this.calculatePointGroupForFirstModel(a,!1,!1,!0,null,0,0)},"JU.BS");c(c$,"getPointGroupAsString",function(a,b,d,c,g){return this.calculatePointGroupForFirstModel(a,!0,b,!1,d,c,g)},"JU.BS,~B,~S,~N,~N");c(c$,"calculatePointGroupForFirstModel",function(a,b,d,c,g,f,j){var k=this.vwr.am.cmi,h=null==a?-1:a.nextSetBit(0);0>k&&0<=h&&(k=this.at[h].getModelIndex());0>k&&(k=this.vwr.getVisibleFramesBitSet().nextSetBit(0),
a=null);var m=this.vwr.getModelUndeletedAtomsBitSet(k);null!=a&&m.and(a);h=m.nextSetBit(0);0>h&&(m=this.vwr.getModelUndeletedAtomsBitSet(k),h=m.nextSetBit(0));a=this.vwr.shm.getShapePropertyIndex(18,"mad",h);a=null!=a&&0!=a.intValue()||this.vwr.tm.vibrationOn;this.pointGroup=J.api.Interface.getSymmetry().setPointGroup(this.pointGroup,this.at,m,a,this.vwr.getFloat(570425382),this.vwr.getFloat(570425384));if(!b&&!c)return this.pointGroup.getPointGroupName();b=this.pointGroup.getPointGroupInfo(k,d,c,
g,f,j);return c?b:(1<this.mc?"frame "+this.getModelNumberDotted(k)+"; ":"")+b},"JU.BS,~B,~B,~B,~S,~N,~N");c(c$,"modelsOf",function(a,b){for(var d=JU.BS.newN(this.mc),c=null==a,g=c?this.ac-1:a.nextSetBit(0);0<=g;g=c?g-1:a.nextSetBit(g+1)){var f=this.am[this.at[g].mi].trajectoryBaseIndex;this.isJmolDataFrameForModel(f)||(d.set(f),b.set(g))}return d},"JU.BS,JU.BS");c(c$,"getDefaultStructure",function(a,b){for(var d=this.modelsOf(a,b),c=new JU.SB,g=d.nextSetBit(0);0<=g;g=d.nextSetBit(g+1))this.am[g].isBioModel&&
null!=this.am[g].defaultStructure&&c.append(this.am[g].defaultStructure);return c.toString()},"JU.BS,JU.BS");c(c$,"makeConnections",function(a,b,d,c,g,f,j,k,h,m){if(1073741852==c&&2048!=d){var r="connect ";0.1!=a&&(r+=a+" ");1E8!=b&&(r+=b+" ");this.addStateScript(r,k?g:null,k?null:g,k?null:f," auto",!1,!0)}this.moleculeCount=0;return this.makeConnections2(a,b,d,c,g,f,j,k,h,m)},"~N,~N,~N,~N,JU.BS,JU.BS,JU.BS,~B,~B,~N");c(c$,"setPdbConectBonding",function(a,b,d){for(var c=this.vwr.getMadBond();b<this.mc;b++){var g=
this.getInfo(b,"PDB_CONECT_bonds");if(null!=g){var f=g.size();this.setInfo(b,"initialBondCount",Integer.$valueOf(f));for(var j=this.getInfo(b,"PDB_CONECT_firstAtom_count_max"),k=j[0]+a,h=k+j[1],j=j[2],m=D(j+1,0),r=k;r<h;r++)if(0<(k=this.atomSerials[r]))m[k]=r+1;for(h=0;h<f;h++){var r=g.get(h),x=r[0],k=r[1],r=r[2];0>x||(0>k||x>j||k>j)||(x=m[x]-1,k=m[k]-1,0>x||0>k||(null!=d&&(this.at[x].isHetero()&&d.set(x),this.at[k].isHetero()&&d.set(k)),this.checkValencesAndBond(this.at[x],this.at[k],r,2048==r?1:
c,null)))}}}},"~N,~N,JU.BS");c(c$,"deleteAllBonds",function(){this.moleculeCount=0;for(var a=this.stateScripts.size();0<=--a;)this.stateScripts.get(a).isConnect()&&this.stateScripts.remove(a);this.deleteAllBonds2()});c(c$,"includeAllRelatedFrames",function(a){for(var b,d=0;d<this.mc;d++)if(a.get(d)){if(this.isTrajectory(d)&&!a.get(b=this.am[d].trajectoryBaseIndex)){a.set(b);this.includeAllRelatedFrames(a);break}}else(this.isTrajectory(d)&&a.get(this.am[d].trajectoryBaseIndex)||this.isJmolDataFrameForModel(d)&&
a.get(this.am[d].dataSourceFrame))&&a.set(d)},"JU.BS");c(c$,"deleteModels",function(a){this.moleculeCount=0;this.includeAllRelatedFrames(a);var b=JU.BSUtil.cardinalityOf(a);if(0==b)return null;for(var d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))this.clearDataFrameReference(d);if(b==this.mc)return b=this.getModelAtomBitSetIncludingDeleted(-1,!0),this.vwr.zap(!0,!1,!1),b;this.validateBspf(!1);for(var c=Array(this.mc-b),g=this.am,b=new JU.BS,f=d=0;d<this.mc;d++)a.get(d)?(this.getAtomCountInModel(d),b.or(this.getModelAtomBitSetIncludingDeleted(d,
!1))):(this.am[d].modelIndex=f,c[f++]=this.am[d]);this.am=c;var j=this.mc,k=this.getBondsForSelectedAtoms(b,!0);this.deleteBonds(k,!0);for(f=d=0;d<j;d++)if(a.get(d)){var h=g[d].ac;if(0!=h){var m=g[d].bsAtoms,r=g[d].firstAtomIndex;JU.BSUtil.deleteBits(this.bsSymmetry,m);this.deleteModel(f,r,h,m,k);for(var x=j;--x>d;)g[x].fixIndices(f,h,m);this.vwr.shm.deleteShapeAtoms([c,this.at,[f,r,h]],m);this.mc--}}else f++;this.deleteModel(-1,0,0,null,null);return b},"JU.BS");c(c$,"setAtomProperty",function(a,
b,d,c,g,f,j){switch(b){case 1115297793:case 1113200642:case 1113200647:case 1113200649:case 1113200650:case 1650071565:case 1113200654:if(4<c&&(c=4),null!=f){d=L(this.ac,0);try{var k=a.nextSetBit(0);for(g=0;0<=k;k=a.nextSetBit(k+1))d[k]=f[g++]}catch(h){if(y(h,Exception))return;throw h;}f=d}case 1113200646:case 1113200652:k=null;d=0;null==f?(16<c&&(c=16.1),0>c&&(c=0),d=q(Math.floor(2E3*c))):k=new J.atomdata.RadiusData(f,0,null,null);this.sm.setShapeSizeBs(JV.JC.shapeTokenIndex(b),d,k,a);return}this.setAPm(a,
b,d,c,g,f,j)},"JU.BS,~N,~N,~N,~S,~A,~A");c(c$,"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(c$,"addHydrogens",function(a,b){var d=this.mc-1,c=new JU.BS;if(this.isTrajectory(d)||1<this.am[d].getGroupCount())return c;this.growAtomArrays(this.ac+b.length);var g=this.vwr.rd,f=this.getDefaultMadFromOrder(1);this.am[d].dssrCache=
null;for(var j=0,k=this.am[d].ac+1;j<a.size();j++,k++){var h=a.get(j),m=this.addAtom(d,h.group,1,"H"+k,k,h.getSeqID(),k,b[j],NaN,null,0,0,100,NaN,null,!1,0,null);m.setMadAtom(this.vwr,g);c.set(m.i);this.bondAtoms(h,m,1,f,null,0,!1,!1)}this.sm.loadDefaultShapes(this);return c},"JU.Lst,~A");c(c$,"mergeModelArrays",function(a){this.at=a.at;this.bo=a.bo;this.stateScripts=a.stateScripts;this.proteinStructureTainted=a.proteinStructureTainted;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.mergeAtomArrays(a)},"JM.ModelSet");c(c$,"getUnitCell",function(a){return!this.haveUnitCells||0>a||a>=this.mc?null:null!=this.am[a].simpleCage?this.am[a].simpleCage:null==this.unitCells||a>=this.unitCells.length||!this.unitCells[a].haveUnitCell()?null:this.unitCells[a]},"~N");c(c$,"setModelCage",function(a,b){0>a||a>=this.mc||
(this.am[a].simpleCage=b,this.haveUnitCells=!0)},"~N,J.api.SymmetryInterface");c(c$,"getPlaneIntersection",function(a,b,d,c,g){var f=null;switch(a){case 1614417948:if(null==g)return null;f=g.getCanonicalCopy(d,!0);break;case 1679429641:f=this.boxInfo.getCanonicalCopy(d)}a=new JU.Lst;a.addLast(f);return this.intersectPlane(b,a,c)},"~N,JU.P4,~N,~N,J.api.SymmetryInterface");c(c$,"getModelName",function(a){return 1>this.mc?"":0<=a?this.modelNames[a]:this.modelNumbersForAtomLabel[-1-a]},"~N");c(c$,"getModelTitle",
function(a){return this.getInfo(a,"title")},"~N");c(c$,"getModelFileName",function(a){return this.getInfo(a,"fileName")},"~N");c(c$,"getModelFileType",function(a){return this.getInfo(a,"fileType")},"~N");c(c$,"setFrameTitle",function(a,b){if(p(b,String))for(var d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))this.frameTitles[d]=b;else for(var d=a.nextSetBit(0),c=0;0<=d;d=a.nextSetBit(d+1))c<b.length&&(this.frameTitles[d]=b[c++])},"JU.BS,~O");c(c$,"getFrameTitle",function(a){return 0<=a&&a<this.mc?this.frameTitles[a]:
""},"~N");c(c$,"getModelNumberForAtomLabel",function(a){return this.modelNumbersForAtomLabel[a]},"~N");c(c$,"calculatePolymers",function(a,b,d,c){if(this.isPDB)for(var g=!this.vwr.getBoolean(603979892),f=0;f<this.mc;f++)if((null==c||!c.get(f))&&this.am[f].isBioModel){this.am[f].calculatePolymers(a,b,d,c,g);break}},"~A,~N,~N,JU.BS");c(c$,"getGroups",function(){for(var a=0,b=0;b<this.mc;b++)a+=this.am[b].getGroupCount();for(var a=Array(a),d=b=0;b<this.mc;b++)for(var c=0;c<this.am[b].chainCount;c++)for(var g=
0;g<this.am[b].chains[c].groupCount;g++)a[d]=this.am[b].chains[c].groups[g],a[d].groupIndex=d,d++;return a});c(c$,"getNotionalUnitcell",function(){var a=this.getUnitCell(0);return null==a?null:a.getNotionalUnitCell()});c(c$,"setCrystallographicDefaults",function(){return!this.isPDB&&this.someModelsHaveSymmetry&&this.someModelsHaveFractionalCoordinates});c(c$,"getBoundBoxCenter",function(a){return this.isJmolDataFrameForModel(a)?new JU.P3:this.boxInfo.getBoundBoxCenter()},"~N");c(c$,"getBoundBoxCornerVector",
function(){return this.boxInfo.getBoundBoxCornerVector()});c(c$,"getBBoxVertices",function(){return this.boxInfo.getBoundBoxVertices()});c(c$,"getBoundBoxModels",function(){return this.bboxModels});c(c$,"setBoundBox",function(a,b,d,c){this.isBbcageDefault=!1;this.bboxAtoms=this.bboxModels=null;this.boxInfo.setBoundBox(a,b,d,c)},"JU.P3,JU.P3,~B,~N");c(c$,"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(c$,"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(c$,"setRotationRadius",function(a,
b){return this.isJmolDataFrameForModel(a)?(this.am[a].defaultRotationRadius=b,!1):!0},"~N,~N");c(c$,"calcRotationRadius",function(a,b){if(this.isJmolDataFrameForModel(a)){var d=this.am[a].defaultRotationRadius;return 0==d?10:d}for(var d=0,c=this.ac;0<=--c;)if(this.isJmolDataFrameForAtom(this.at[c]))for(a=this.at[c].mi;0<=c&&this.at[c].mi==a;)c--;else{var g=this.at[c],g=b.distance(g)+this.getRadiusVdwJmol(g);g>d&&(d=g)}return 0==d?10:d},"~N,JU.P3");c(c$,"calcBoundBoxDimensions",function(a,b){null!=
a&&0>a.nextSetBit(0)&&(a=null);null==a&&this.isBbcageDefault||0==this.ac||(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(),this.boxInfo.setBbcage(b))},"JU.BS,~N");c(c$,"getBoxInfo",function(a,b){if(null==a)return this.boxInfo;var d=new JU.BoxInfo;this.calcAtomsMinMax(a,d);d.setBbcage(b);return d},"JU.BS,~N");c(c$,"calcAtomsMinMax",function(a,b){b.reset();
for(var d=0,c=null==a,g=c?this.ac-1:a.nextSetBit(0);0<=g;g=c?g-1:a.nextSetBit(g+1))d++,this.isJmolDataFrameForAtom(this.at[g])||b.addBoundBoxPoint(this.at[g]);return d},"JU.BS,JU.BoxInfo");c(c$,"calcUnitCellMinMax",function(){for(var a=0;a<this.mc;a++)if(this.unitCells[a].getCoordinatesAreFractional())for(var b=this.unitCells[a].getUnitCellVertices(),d=0;8>d;d++)this.boxInfo.addBoundBoxPoint(b[d])});c(c$,"calcRotationRadiusBs",function(a){for(var b=this.getAtomSetCenter(a),d=0,c=a.nextSetBit(0);0<=
c;c=a.nextSetBit(c+1)){var g=this.at[c],g=b.distance(g)+this.getRadiusVdwJmol(g);g>d&&(d=g)}return 0==d?10:d},"JU.BS");c(c$,"getCenterAndPoints",function(a,b){for(var d,c,g=b?1:0,f=a.size();0<=--f;){var j=a.get(f);d=j[0];p(j[1],JU.BS)?(c=j[1],g+=Math.min(d.cardinality(),c.cardinality())):g+=Math.min(d.cardinality(),j[1].length)}var k=P(2,g,null);b&&(k[0][0]=new JU.P3,k[1][0]=new JU.P3);for(f=a.size();0<=--f;)if(j=a.get(f),d=j[0],p(j[1],JU.BS)){c=j[1];for(var j=d.nextSetBit(0),h=c.nextSetBit(0);0<=
j&&0<=h;j=d.nextSetBit(j+1),h=c.nextSetBit(h+1))k[0][--g]=this.at[j],k[1][g]=this.at[h],b&&(k[0][0].add(this.at[j]),k[1][0].add(this.at[h]))}else{c=j[1];j=d.nextSetBit(0);for(h=0;0<=j&&h<c.length;j=d.nextSetBit(j+1),h++)k[0][--g]=this.at[j],k[1][g]=c[h],b&&(k[0][0].add(this.at[j]),k[1][0].add(c[h]))}b&&(k[0][0].scale(1/(k[0].length-1)),k[1][0].scale(1/(k[1].length-1)));return k},"JU.Lst,~B");c(c$,"getAtomSetCenter",function(a){for(var b=new JU.P3,d=0,c=a.nextSetBit(0);0<=c;c=a.nextSetBit(c+1))this.isJmolDataFrameForAtom(this.at[c])||
(d++,b.add(this.at[c]));0<d&&b.scale(1/d);return b},"JU.BS");c(c$,"getAverageAtomPoint",function(){null==this.averageAtomPoint&&(this.averageAtomPoint=new JU.P3).setT(this.getAtomSetCenter(this.vwr.getAllAtoms()));return this.averageAtomPoint});c(c$,"setAPm",function(a,b,d,c,g,f,j){this.setAPa(a,b,d,c,g,f,j);switch(b){case 1095763991:case 1632634891:this.vwr.getBoolean(603979944)&&this.assignAromaticBonds()}},"JU.BS,~N,~N,~N,~S,~A,~A");c(c$,"addStateScript",function(a,b,d,c,g,f,j){var k=this.vwr.am.cmi;
f?(this.thisStateModel!=k&&(a="frame "+(0>k?"all #"+k:this.getModelNumberDotted(k))+";\n  "+a),this.thisStateModel=k):this.thisStateModel=-1;a=new JM.StateScript(this.thisStateModel,a,b,d,c,g,j);a.isValid()&&this.stateScripts.addLast(a);return a},"~S,JU.BS,JU.BS,JU.BS,~S,~B,~B");c(c$,"calculateStructuresAllExcept",function(a,b,d,c,g,f){this.freezeModels();var j="";a=JU.BSUtil.copyInvert(a,this.mc);g&&this.setDefaultStructure(a);for(var k=a.nextSetBit(0);0<=k;k=a.nextSetBit(k+1))j+=this.am[k].calculateStructures(b,
d,c,g,f);g&&this.setStructureIndexes();return j},"JU.BS,~B,~B,~B,~B,~B");c(c$,"setDefaultStructure",function(a){for(var b=a.nextSetBit(0);0<=b;b=a.nextSetBit(b+1))this.am[b].isBioModel&&null==this.am[b].defaultStructure&&(this.am[b].defaultStructure=this.getProteinStructureState(this.am[b].bsAtoms,!1,!1,0))},"JU.BS");c(c$,"setProteinType",function(a,b){var d=-1,c=-1,g=this.getModelBS(a,!1);this.setDefaultStructure(g);for(var f=a.nextSetBit(0);0<=f;f=a.nextSetBit(f+1)){c!=f-1&&(d=-1);var d=this.at[f].group.setProteinStructureType(b,
d),j=this.at[f].mi;this.proteinStructureTainted=this.am[j].structureTainted=!0;c=f=this.at[f].group.lastAtomIndex}d=D(this.mc,0);for(f=0;f<this.ac;)j=this.at[f].mi,g.get(j)?(c=this.at[f].getStrucNo(),1E3>c&&c>d[j]&&(d[j]=c),f=this.at[f].group.lastAtomIndex+1):f=this.am[j].firstAtomIndex+this.am[j].ac;for(f=0;f<this.ac;)j=this.at[f].mi,g.get(j)?(1E3<this.at[f].getStrucNo()&&this.at[f].group.setStrucNo(++d[j]),f=this.at[f].group.lastAtomIndex+1):f=this.am[j].firstAtomIndex+this.am[j].ac},"JU.BS,J.c.STR");
c(c$,"freezeModels",function(){for(var a=this.mc;0<=--a;)this.am[a].freeze()});c(c$,"getStructureList",function(){return this.vwr.getStructureList()});c(c$,"setStructureList",function(a){for(var b=this.mc;0<=--b;)this.am[b].setStructureList(a)},"java.util.Map");c(c$,"setConformation",function(a){for(var b=this.getModelBS(a,!1),d=b.nextSetBit(0);0<=d;d=b.nextSetBit(d+1))this.am[d].setConformation(a);return a},"JU.BS");c(c$,"getConformation",function(a,b,d){for(var c=new JU.BS,g=this.mc;0<=--g;)if(g==
a||0>a){var f=this.getAltLocListInModel(g),j=this.getAltLocCountInModel(g);if(!(0<b&&b>=j)){var k=this.vwr.getModelUndeletedAtomsBitSet(g);if(0<=b&&!this.am[g].getPdbConformation(k,b))for(;0<=--j;)j!=b&&k.andNot(this.getAtomBitsMDa(1048607,f.substring(j,j+1)));0<=k.nextSetBit(0)&&(c.or(k),d&&this.am[g].setConformation(k))}}return c},"~N,~N,~B");c(c$,"getHeteroList",function(a){for(var b=new java.util.Hashtable,d=!1,c=this.mc;0<=--c;)if(0>a||c==a){var g=this.getInfo(c,"hetNames");if(null!=g)for(var d=
!0,f,g=g.entrySet().iterator();g.hasNext()&&((f=g.next())||1);){var j=f.getKey();b.put(j,f.getValue())}}return d?b:this.getInfoM("hetNames")},"~N");c(c$,"getMSProperties",function(){return this.modelSetProperties});c(c$,"getMSInfo",function(){return this.msInfo});c(c$,"getInfoM",function(a){return null==this.msInfo?null:this.msInfo.get(a)},"~S");c(c$,"getMSInfoB",function(a){a=this.getInfoM(a);return p(a,Boolean)&&a.booleanValue()},"~S");c(c$,"mergeTrajectories",function(a){if(null==this.trajectorySteps){if(!a)return 0;
this.trajectorySteps=new JU.Lst}for(a=this.trajectorySteps.size();a<this.mc;a++)this.trajectorySteps.addLast(null);return this.mc},"~B");c(c$,"getTrajectoryIndex",function(a){return this.am[a].trajectoryBaseIndex},"~N");c(c$,"isTrajectory",function(a){return this.am[a].isTrajectory},"~N");c(c$,"isTrajectoryMeasurement",function(a){if(null==a)return!1;for(var b=a[0],d,c=1;c<=b;c++)if(0<=(d=a[c])&&this.am[this.at[d].mi].isTrajectory)return!0;return!1},"~A");c(c$,"getModelBS",function(a,b){for(var d=
new JU.BS,c=0,g=null==a,c=g?0:a.nextSetBit(0);0<=c&&c<this.ac;c=g?c+1:a.nextSetBit(c+1)){d.set(c=this.at[c].mi);if(b)for(var f=this.am[c].trajectoryBaseIndex,j=0;j<this.mc;j++)this.am[j].trajectoryBaseIndex==f&&d.set(j);c=this.am[c].firstAtomIndex+this.am[c].ac-1}return d},"JU.BS,~B");c(c$,"getIterativeModels",function(a){for(var b=new JU.BS,d=0;d<this.mc;d++)(a||!this.isJmolDataFrameForModel(d))&&this.am[d].trajectoryBaseIndex==d&&b.set(d);return b},"~B");c(c$,"isTrajectorySubFrame",function(a){return this.am[a].isTrajectory&&
this.am[a].trajectoryBaseIndex!=a},"~N");c(c$,"selectDisplayedTrajectories",function(a){for(var b=0;b<this.mc;b++)this.am[b].isTrajectory&&this.at[this.am[b].firstAtomIndex].mi!=b&&a.clear(b);return a},"JU.BS");c(c$,"fillAtomData",function(a,b){if(0!=(b&4)){this.getMolecules();a.bsMolecules=Array(this.molecules.length);a.atomMolecule=D(this.ac,0);for(var d,c=0;c<this.molecules.length;c++){d=a.bsMolecules[c]=this.molecules[c].atomList;for(var g=d.nextSetBit(0);0<=g;g=d.nextSetBit(g+1))a.atomMolecule[g]=
c}}0!=(b&8)?(d=D(1,0),a.hAtomRadius=this.vwr.getVanderwaalsMar(1)/1E3,a.hAtoms=this.calculateHydrogens(a.bsSelected,d,!1,!0,null),a.hydrogenAtomCount=d[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(c$,"getModelNumberDotted",function(a){return 1>
this.mc||a>=this.mc||0>a?"":JU.Escape.escapeModelFileNumber(this.modelFileNumbers[a])},"~N");c(c$,"getModelNumber",function(a){2147483647==a&&(a=this.mc-1);return this.modelNumbers[a]},"~N");c(c$,"getModelFileNumber",function(a){return this.modelFileNumbers[a]},"~N");c(c$,"getModelProperties",function(a){return this.am[a].properties},"~N");c(c$,"getModelProperty",function(a,b){var d=this.am[a].properties;return null==d?null:d.getProperty(b)},"~N,~S");c(c$,"getModelAuxiliaryInfo",function(a){return 0>
a?null:this.am[a].auxiliaryInfo},"~N");c(c$,"setInfo",function(a,b,d){this.am[a].auxiliaryInfo.put(b,d)},"~N,~O,~O");c(c$,"getInfo",function(a,b){return 0>a?null:this.am[a].auxiliaryInfo.get(b)},"~N,~S");c(c$,"getInfoB",function(a,b){var d=this.am[a].auxiliaryInfo;return null!=d&&d.containsKey(b)&&d.get(b).booleanValue()},"~N,~S");c(c$,"getInfoI",function(a,b){var d=this.am[a].auxiliaryInfo;return null!=d&&d.containsKey(b)?d.get(b).intValue():-2147483648},"~N,~S");c(c$,"getAtomProp",function(a,b){var d=
this.getInfo(a.mi,b);if(!p(d,Array))return"";var c=a.i-this.am[a.mi].firstAtomIndex;return c<d.length?d[c].toString():""},"JM.Atom,~S");c(c$,"getInsertionCountInModel",function(a){return this.am[a].nInsertions},"~N");c$.modelFileNumberFromFloat=c(c$,"modelFileNumberFromFloat",function(a){var b=q(Math.floor(a));for(a=q(Math.floor(1E4*(a-b+1E-5)));0!=a&&0==a%10;)a/=10;return 1E6*b+a},"~N");c(c$,"getAltLocCountInModel",function(a){return this.am[a].nAltLocs},"~N");c(c$,"getChainCount",function(a){for(var b=
0,d=this.mc;0<=--d;)b+=this.am[d].getChainCount(a);return b},"~B");c(c$,"getBioPolymerCount",function(){for(var a=0,b=this.mc;0<=--b;)this.isTrajectorySubFrame(b)||(a+=this.am[b].getBioPolymerCount());return a});c(c$,"getBioPolymerCountInModel",function(a){return 0>a?this.getBioPolymerCount():this.isTrajectorySubFrame(a)?0:this.am[a].getBioPolymerCount()},"~N");c(c$,"getPolymerPointsAndVectors",function(a,b,d,c){for(var g=0;g<this.mc;++g)this.am[g].getPolymerPointsAndVectors(a,b,d,c)},"JU.BS,JU.Lst,~B,~N");
c(c$,"recalculateLeadMidpointsAndWingVectors",function(a){if(0>a)for(a=0;a<this.mc;a++)this.isTrajectorySubFrame(a)||this.am[a].recalculateLeadMidpointsAndWingVectors();else this.am[a].recalculateLeadMidpointsAndWingVectors()},"~N");c(c$,"getPolymerLeadMidPoints",function(a,b){return this.am[a].getPolymerLeadMidPoints(b)},"~N,~N");c(c$,"getChainCountInModelWater",function(a,b){return 0>a?this.getChainCount(b):this.am[a].getChainCount(b)},"~N,~B");c(c$,"getGroupCount",function(){for(var a=0,b=this.mc;0<=
--b;)a+=this.am[b].getGroupCount();return a});c(c$,"getGroupCountInModel",function(a){return 0>a?this.getGroupCount():this.am[a].getGroupCount()},"~N");c(c$,"calcSelectedGroupsCount",function(){for(var a=this.vwr.bsA(),b=this.mc;0<=--b;)this.am[b].calcSelectedGroupsCount(a)});c(c$,"calcSelectedMonomersCount",function(){for(var a=this.vwr.bsA(),b=this.mc;0<=--b;)this.am[b].calcSelectedMonomersCount(a)});c(c$,"calcRasmolHydrogenBonds",function(a,b,d,c,g,f,j){for(var k=null==b||a.equals(b),h=this.mc;0<=
--h;)this.am[h].isBioModel&&this.am[h].trajectoryBaseIndex==h&&(null==d&&(this.am[h].clearRasmolHydrogenBonds(a),k||this.am[h].clearRasmolHydrogenBonds(b)),this.am[h].getRasmolHydrogenBonds(a,b,d,c,g,f,j))},"JU.BS,JU.BS,JU.Lst,~B,~N,~B,JU.BS");c(c$,"calculateStraightness",function(){if(!this.getHaveStraightness()){for(var a=this.vwr.getQuaternionFrame(),b=this.vwr.getInt(553648146),d=this.mc;0<=--d;)this.am[d].calculateStraightness(this.vwr,"S",a,b);this.setHaveStraightness(!0)}});c(c$,"getAtomGroupQuaternions",
function(a,b,d){for(var c=0,g=new JU.Lst,f=a.nextSetBit(0);0<=f&&c<b;f=a.nextSetBit(f+1)){var j=this.at[f].group,k=j.getQuaternion(d);if(null==k&&(-2147483648==j.seqcode&&(k=j.getQuaternionFrame(this.at)),null==k))continue;c++;g.addLast(k);f=j.lastAtomIndex}return g.toArray(Array(g.size()))},"JU.BS,~N,~S");c(c$,"isJmolDataFrameForModel",function(a){return 0<=a&&a<this.mc&&this.am[a].isJmolDataFrame},"~N");c(c$,"isJmolDataFrameForAtom",function(a){return this.am[a.mi].isJmolDataFrame},"JM.Atom");c(c$,
"setJmolDataFrame",function(a,b,d){var c=this.am[null==a?this.am[d].dataSourceFrame:b];null==a&&(a=this.am[d].jmolFrameType);0<=b&&(null==c.dataFrames&&(c.dataFrames=new java.util.Hashtable),this.am[d].dataSourceFrame=b,this.am[d].jmolFrameType=a,c.dataFrames.put(a,Integer.$valueOf(d)));a.startsWith("quaternion")&&0>a.indexOf("deriv")&&(a=a.substring(0,a.indexOf(" ")),c.dataFrames.put(a,Integer.$valueOf(d)))},"~S,~N,~N");c(c$,"getJmolDataFrameIndex",function(a,b){if(null==this.am[a].dataFrames)return-1;
var d=this.am[a].dataFrames.get(b);return null==d?-1:d.intValue()},"~N,~S");c(c$,"clearDataFrameReference",function(a){for(var b=0;b<this.mc;b++){var d=this.am[b].dataFrames;if(null!=d)for(d=d.values().iterator();d.hasNext();)d.next().intValue()==a&&d.remove()}},"~N");c(c$,"getJmolFrameType",function(a){return 0<=a&&a<this.mc?this.am[a].jmolFrameType:"modelSet"},"~N");c(c$,"getJmolDataSourceFrame",function(a){return 0<=a&&a<this.mc?this.am[a].dataSourceFrame:-1},"~N");c(c$,"saveModelOrientation",
function(a,b){this.am[a].orientation=b},"~N,JM.Orientation");c(c$,"getModelOrientation",function(a){return this.am[a].orientation},"~N");c(c$,"getPDBHeader",function(a){return this.am[a].isBioModel?this.am[a].getFullPDBHeader():this.getFileHeader(a)},"~N");c(c$,"getFileHeader",function(a){if(0>a)return"";if(this.am[a].isBioModel)return this.am[a].getFullPDBHeader();a=this.getInfo(a,"fileHeader");null==a&&(a=this.modelSetName);return null!=a?a:"no header information found"},"~N");c(c$,"getAltLocIndexInModel",
function(a,b){if("\x00"==b)return 0;var d=this.getAltLocListInModel(a);return 0==d.length?0:d.indexOf(b)+1},"~N,~S");c(c$,"getInsertionCodeIndexInModel",function(a,b){if("\x00"==b)return 0;var d=this.getInsertionListInModel(a);return 0==d.length?0:d.indexOf(b)+1},"~N,~S");c(c$,"getAltLocListInModel",function(a){if(0>a)return"";a=this.getInfo(a,"altLocs");return null==a?"":a},"~N");c(c$,"getInsertionListInModel",function(a){a=this.getInfo(a,"insertionCodes");return null==a?"":a},"~N");c(c$,"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(c$,"getModelCellRange",function(a){return null==this.unitCells?null:this.unitCells[a].getCellRange()},"~N");c(c$,"getLastVibrationVector",function(a,b){if(null!=this.vibrations)for(var d=this.ac;0<=--d;)if((0>a||this.at[d].mi==a)&&null!=this.vibrations[d]&&0<this.vibrations[d].length()&&(0==b||1276121113==b==p(this.vibrations[d],
J.api.JmolModulationSet)))return d;return-1},"~N,~N");c(c$,"getModulationList",function(a,b,d){var c=new JU.Lst;if(null!=this.vibrations)for(var g=a.nextSetBit(0);0<=g;g=a.nextSetBit(g+1))p(this.vibrations[g],J.api.JmolModulationSet)?c.addLast(this.vibrations[g].getModulation(b,d)):c.addLast(null);return c},"JU.BS,~S,JU.P3");c(c$,"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(c$,"getMoleculeIndex",
function(a,b){0==this.moleculeCount&&this.getMolecules();for(var d=0;d<this.moleculeCount;d++)if(this.molecules[d].atomList.get(a))return b?this.molecules[d].indexInModel:d;return 0},"~N,~B");c(c$,"getMoleculeBitSet",function(a){0==this.moleculeCount&&this.getMolecules();var b=JU.BSUtil.copy(a);a=JU.BSUtil.copy(a);for(var d=0,c=new JU.BS;0<=(d=a.length()-1);)c=this.getMoleculeBitSetForAtom(d),null==c?(a.clear(d),b.clear(d)):(a.andNot(c),b.or(c));return b},"JU.BS");c(c$,"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(c$,"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(c$,"calculateMolecularDipole",function(a,b){if(null!=b){var d=b.nextSetBit(0);if(0>d)return null;a=this.at[d].getModelIndex()}if(null==this.partialCharges||0>a)return null;var c=
d=0,g=0,f=0,j=new JU.V3,k=new JU.V3;null==b&&(b=this.getModelAtomBitSetIncludingDeleted(-1,!1));for(var h=b.nextSetBit(0);0<=h;h=b.nextSetBit(h+1))if(!(this.at[h].mi!=a||this.at[h].isDeleted())){var m=this.partialCharges[h];0>m?(c++,f+=m,k.scaleAdd2(m,this.at[h],k)):0<m&&(d++,g+=m,j.scaleAdd2(m,this.at[h],j))}if(0.01<Math.abs(g+f))return JU.Logger.info("Dipole calculation requires balanced charges: "+g+" "+f),null;if(0==c||0==d)return null;j.add(k);j.scale(4.8);return j},"~N,JU.BS");c(c$,"getMoleculeCountInModel",
function(a){var b=0;0==this.moleculeCount&&this.getMolecules();if(0>a)return this.moleculeCount;for(var d=0;d<this.mc;d++)a==d&&(b+=this.am[d].moleculeCount);return b},"~N");c(c$,"calcSelectedMoleculesCount",function(){var a=this.vwr.bsA();0==this.moleculeCount&&this.getMolecules();this.selectedMolecules.xor(this.selectedMolecules);for(var b=new JU.BS,d=0;d<this.moleculeCount;d++)JU.BSUtil.copy2(a,b),b.and(this.molecules[d].atomList),0<b.length()&&this.selectedMolecules.set(d)});c(c$,"setCentroid",
function(a,b){var d=this.getNotInCentroid(a,b);null!=d&&0<=d.nextSetBit(0)&&this.vwr.deleteAtoms(d,!1)},"JU.BS,~A");c(c$,"getNotInCentroid",function(a,b){var d=a.nextSetBit(0);if(0>d)return null;d=this.getUnitCell(this.at[d].mi);return null==d?null:d.notInCentroid(this,a,b)},"JU.BS,~A");c(c$,"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),d=null,c=0;c<this.mc;c++)b[c]=this.vwr.getModelUndeletedAtomsBitSet(c),
a=this.am[c],a.moleculeCount=0,d=a.getBioBranches(d);this.molecules=JU.JmolMolecule.getMolecules(this.at,b,d,null);for(c=this.moleculeCount=this.molecules.length;0<=--c;)a=this.am[this.molecules[c].modelIndex],a.firstMoleculeIndex=c,a.moleculeCount++;return this.molecules});c(c$,"initializeBspf",function(){if(!(null!=this.bspf&&this.bspf.isInitialized())){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),d=this.ac;0<=--d;){var c=this.at[d];!c.isDeleted()&&!this.isTrajectorySubFrame(c.mi)&&(a.addTuple(this.am[c.mi].trajectoryBaseIndex,c),b.set(c.mi))}this.showRebondTimes&&(JU.Logger.checkTimer("build bspf",!1),a.stats());for(d=b.nextSetBit(0);0<=d;d=b.nextSetBit(d+1))a.validateModel(d,!0);a.validate(!0);this.bspf=a}});c(c$,"initializeBspt",function(a){this.initializeBspf();this.bspf.isInitializedIndex(a)||this.bspf.initialize(a,this.at,this.vwr.getModelUndeletedAtomsBitSet(a))},
"~N");c(c$,"setIteratorForPoint",function(a,b,d,c){0>b?a.setCenter(d,c):(this.initializeBspt(b),a.setModel(this,b,this.am[b].firstAtomIndex,2147483647,d,c,null))},"J.api.AtomIndexIterator,~N,JU.T3,~N");c(c$,"setIteratorForAtom",function(a,b,d,c,g){0>b&&(b=this.at[d].mi);b=this.am[b].trajectoryBaseIndex;this.initializeBspt(b);a.setModel(this,b,this.am[b].firstAtomIndex,d,this.at[d],c,g)},"J.api.AtomIndexIterator,~N,~N,~N,J.atomdata.RadiusData");c(c$,"getSelectedAtomIterator",function(a,b,d,c,g){this.initializeBspf();
if(g){g=this.getModelBS(a,!1);for(var f=g.nextSetBit(0);0<=f;f=g.nextSetBit(f+1))this.initializeBspt(f);g=new JM.AtomIteratorWithinModelSet(g)}else g=new JM.AtomIteratorWithinModel;g.initialize(this.bspf,a,b,d,c,this.vwr.isParallel());return g},"JU.BS,~B,~B,~B,~B");h(c$,"getBondCountInModel",function(a){return 0>a?this.bondCount:this.am[a].getBondCount()},"~N");c(c$,"calculateStruts",function(a,b){this.vwr.setModelVisibility();this.makeConnections2(0,3.4028235E38,32768,12291,a,b,null,!1,!1,0);var d=
a.nextSetBit(0);if(0>d)return 0;d=this.am[this.at[d].mi];return d.isBioModel?d.calculateStruts(this,a,b):0},"JU.BS,JU.BS");c(c$,"getAtomCountInModel",function(a){return 0>a?this.ac:this.am[a].ac},"~N");c(c$,"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 d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1))b.or(this.getModelAtomBitSetIncludingDeleted(d,!1));return b},"JU.BS");c(c$,"getModelAtomBitSetIncludingDeleted",
function(a,b){var d=0>a?this.bsAll:this.am[a].bsAtoms;null==d&&(d=this.bsAll=JU.BSUtil.setAll(this.ac));return b?JU.BSUtil.copy(d):d},"~N,~B");c(c$,"getAtomBitsMaybeDeleted",function(a,b){var d,c;switch(a){default:return this.getAtomBitsMDa(a,b);case 1073741925:return this.getAnnotationBits("domains",1073741925,b);case 1073742189:return this.getAnnotationBits("validation",1073742189,b);case 1073741916:return this.getAnnotationBits("dssr",1073741916,b);case 1678770178:case 1048585:return this.getAtomBitsMDb(a,
b);case 1073741864:return this.getBasePairBits(b);case 1679429641:var g=this.getBoxInfo(b,1);c=this.getAtomsWithin(g.getBoundBoxCornerVector().length()+1E-4,g.getBoundBoxCenter(),null,-1);for(d=c.nextSetBit(0);0<=d;d=c.nextSetBit(d+1))g.isWithin(this.at[d])||c.clear(d);return c;case 1095761925:c=new JU.BS;d=b;this.ptTemp1.set(d[0]/1E3,d[1]/1E3,d[2]/1E3);for(d=this.ac;0<=--d;)this.isInLatticeCell(d,this.ptTemp1,this.ptTemp2,!1)&&c.set(d);return c;case 1095761926:c=JU.BSUtil.newBitSet2(0,this.ac);d=
b;g=[q(d[0]/1E3)-1,q(d[1]/1E3)-1,q(d[2]/1E3)-1,q(d[0]/1E3),q(d[1]/1E3),q(d[2]/1E3),0];for(d=this.mc;0<=--d;){var f=this.getUnitCell(d);null==f?JU.BSUtil.andNot(c,this.am[d].bsAtoms):c.andNot(f.notInCentroid(this,this.am[d].bsAtoms,g))}return c;case 3145754:c=b.nextSetBit(0);if(0>c)return new JU.BS;if(this.at[c].group.$isProtein)return this.at[c].group.getBSSideChain();case 1095761936:return this.getMoleculeBitSet(b);case 1087373320:return this.getSequenceBits(b,null);case 1048615:d=b;var g=d[0],f=
d[1],j=d[2];c=new JU.BS;var k=this.vwr.getBoolean(603979823);0<=j&&(256>j&&!k)&&(j=JM.AtomCollection.chainToUpper(j));for(d=this.mc;0<=--d;)this.am[d].isBioModel&&this.am[d].selectSeqcodeRange(g,f,j,c,k);return c;case 3145772:c=JU.BS.newN(this.ac);g=-1;f=0;for(d=this.ac;0<=--d;)if(k=this.at[d],j=k.getAtomSymmetry(),null!=j){if(k.mi!=g){g=k.mi;if(null==this.getModelCellRange(g))continue;f=this.getModelSymmetryCount(g)}for(var k=0,h=f;0<=--h;)if(j.get(h)&&1<++k){c.set(d);break}}return c;case 1089470478:return JU.BSUtil.copy(null==
this.bsSymmetry?this.bsSymmetry=JU.BS.newN(this.ac):this.bsSymmetry);case 1614417948:c=new JU.BS;if(null==this.vwr.getCurrentUnitCell())return c;this.ptTemp1.set(1,1,1);for(d=this.ac;0<=--d;)this.isInLatticeCell(d,this.ptTemp1,this.ptTemp2,!1)&&c.set(d);return c}},"~N,~O");c(c$,"getAnnotationBits",function(a,b,d){for(var c=new JU.BS,g=this.vwr.getAnnotationParser(),f,j=this.mc;0<=--j;)null!=(f=this.getInfo(j,a))&&c.or(g.getAtomBits(this.vwr,d,this.getCachedAnnotationMap(j,a+" V ",f),this.am[j].dssrCache,
b,j,this.am[j].bsAtoms));return c},"~S,~N,~S");c(c$,"getCachedAnnotationMap",function(a,b,d){a=null==this.am[a].dssrCache&&null!=d?this.am[a].dssrCache=new java.util.Hashtable:this.am[a].dssrCache;if(null==a)return null;var c=a.get(b);null==c&&null!=d&&(c=p(d,JS.SV)?d:this.vwr.evaluateExpressionAsVariable(d),a.put(b,c));return p(c,JS.SV)?c:null},"~N,~S,~O");c(c$,"isInLatticeCell",function(a,b,d,c){var g=this.getUnitCell(this.at[a].mi);d.setT(this.at[a]);return null!=g&&g.checkUnitCell(g,b,d,c)},"~N,JU.P3,JU.P3,~B");
c(c$,"getAtomsWithinRadius",function(a,b,d,c){var g=new JU.BS,f=this.getIterativeModels(!1);b=JU.BSUtil.andNot(b,this.vwr.getDeletedAtoms());var j=this.getSelectedAtomIterator(null,!1,!1,!1,!1);if(d){d=new JU.P3;for(var k=b.nextSetBit(0);0<=k;k=b.nextSetBit(k+1))for(var h=this.mc;0<=--h;)f.get(h)&&(0>a?this.getAtomsWithin(a,this.at[k].getFractionalUnitCoordPt(!0,d),g,-1):(this.setIteratorForAtom(j,h,k,a,c),j.addAtoms(g)))}else{g.or(b);for(k=b.nextSetBit(0);0<=k;k=b.nextSetBit(k+1))0>a?this.getAtomsWithin(a,
this.at[k],g,this.at[k].mi):(this.setIteratorForAtom(j,-1,k,a,c),j.addAtoms(g))}j.release();return g},"~N,JU.BS,~B,J.atomdata.RadiusData");c(c$,"getGroupsWithin",function(a,b){for(var d=this.getIterativeModels(!1),c=new JU.BS,g=this.mc;0<=--g;)d.get(g)&&this.am[g].isBioModel&&this.am[g].getGroupsWithin(a,b,c);return c},"~N,JU.BS");c(c$,"getAtomsWithin",function(a,b,d,c){null==d&&(d=new JU.BS);if(0>a){a=-a;for(var g=this.ac;0<=--g;){var f=this.at[g];0<=c&&this.at[g].mi!=c||!d.get(g)&&f.getFractionalUnitDistance(b,
this.ptTemp1,this.ptTemp2)<=a&&d.set(f.i)}return d}c=this.getIterativeModels(!0);g=this.getSelectedAtomIterator(null,!1,!1,!1,!1);for(f=this.mc;0<=--f;)c.get(f)&&(this.setIteratorForAtom(g,-1,this.am[f].firstAtomIndex,-1,null),g.setCenter(b,a),g.addAtoms(d));g.release();return d},"~N,JU.P3,JU.BS,~N");c(c$,"getBasePairBits",function(a){var b=new JU.BS;if(0!=a.length%2)return b;var d=null,c=null,b=new JU.Lst;if(0==a.length)d=c=this.vwr.getAllAtoms(),this.calcRasmolHydrogenBonds(d,c,b,!0,1,!1,null);
else for(var g=0;g<a.length;)d=this.getSequenceBits(a.substring(g,++g),null),0!=d.cardinality()&&(c=this.getSequenceBits(a.substring(g,++g),null),0!=c.cardinality()&&this.calcRasmolHydrogenBonds(d,c,b,!0,1,!1,null));a=new JU.BS;for(g=b.size();0<=--g;)d=b.get(g),a.set(d.atom1.i),a.set(d.atom2.i);return this.getAtomBitsMDb(1087373318,a)},"~S");c(c$,"getSequenceBits",function(a,b){null==b&&(b=this.vwr.getAllAtoms());var d=new JU.BS;if(0<a.length)for(var c=0;c<this.mc;++c)this.am[c].isBioModel&&this.am[c].getSequenceBits(a,
b,d);return d},"~S,JU.BS");c(c$,"deleteBonds",function(a,b){if(!b)for(var d=new JU.BS,c=new JU.BS,g=a.nextSetBit(0);0<=g;g=a.nextSetBit(g+1)){var f=this.bo[g].atom1;this.am[f.mi].isModelKit||(d.clearAll(),c.clearAll(),d.set(f.i),c.set(this.bo[g].getAtomIndex2()),this.addStateScript("connect ",null,d,c,"delete",!1,!0))}this.dBb(a,b)},"JU.BS,~B");c(c$,"makeConnections2",function(a,b,d,c,g,f,j,k,h,m){null==j&&(j=new JU.BS);var r=65535==d,x=131071==d;x&&(d=1);var n=JM.Bond.isOrderH(d),q=!1,p=!1,s=!1,
t=!1;switch(c){case 12291:return this.deleteConnections(a,b,d,g,f,k,x);case 603979874:case 1073741852:if(515!=d)return this.autoBond(g,f,j,k,n,603979874==c);p=t=!0;break;case 1087373321:q=p=!0;break;case 1073742025:p=!0;break;case 1073741904:s=!0}c=!q||r;r=!q&&!r;this.defaultCovalentMad=this.vwr.getMadBond();var x=0>a,u=0>b,v=x||u,w=!k||0.1!=a||1E8!=b;w&&(a=this.fixD(a,x),b=this.fixD(b,u));var z=this.getDefaultMadFromOrder(d),B=0,C=0,D=null,E=null,F=null,G="\x00",H=d|131072;try{for(var K=g.nextSetBit(0);0<=
K;K=g.nextSetBit(K+1)){if(k)D=this.bo[K],E=D.atom1,F=D.atom2;else{E=this.at[K];if(E.isDeleted())continue;G=this.isModulated(K)?"\x00":E.altloc}for(var L=k?0:f.nextSetBit(0);0<=L;L=f.nextSetBit(L+1)){if(k)L=2147483646;else{if(L==K)continue;F=this.at[L];if(E.mi!=F.mi||F.isDeleted())continue;if("\x00"!=G&&G!=F.altloc&&"\x00"!=F.altloc)continue;D=E.getBond(F)}if(!((null==D?p:s)||w&&!this.isInRange(E,F,a,b,x,u,v)))if(null==D)j.set(this.bondAtoms(E,F,d,z,j,m,h,!0).index),B++;else if(r&&(D.setOrder(d),this.bsAromatic.clear(D.index)),
c||d==D.order||H==D.order||n&&D.isHydrogen())j.set(D.index),C++}}}catch(M){if(!y(M,Exception))throw M;}t&&this.assignAromaticBondsBs(!0,j);q||this.sm.setShapeSizeBs(1,-2147483648,null,j);return[B,C]},"~N,~N,~N,~N,JU.BS,JU.BS,JU.BS,~B,~B,~N");c(c$,"autoBondBs4",function(a,b,d,c,g,f){if(f)return this.autoBond_Pre_11_9_24(a,b,d,c,g);if(0==this.ac)return 0;0==g&&(g=1);1.4E-45==this.maxBondingRadius&&this.findMaxRadii();f=this.vwr.getFloat(570425348);var j=this.vwr.getFloat(570425364),j=j*j,h=0;this.showRebondTimes&&
JU.Logger.startTimer("autobond");var l=-1,m=null==a,r,x;m?(x=0,r=null):(a.equals(b)?r=a:(r=JU.BSUtil.copy(a),r.or(b)),x=r.nextSetBit(0));for(var n=this.getSelectedAtomIterator(null,!1,!1,!0,!1),q=!1;0<=x&&x<this.ac;x=m?x+1:r.nextSetBit(x+1)){var p=m||a.get(x),s=m||b.get(x),t=this.at[x];if(!t.isDeleted()){var u=t.mi;if(u!=l){l=u;if(this.isJmolDataFrameForModel(u)){x=this.am[u].firstAtomIndex+this.am[u].ac-1;continue}q=this.getInfoB(u,"autoBondUsingOccupation")}u=t.getBondingRadius();if(0!=u){var v=
null!=d&&d.get(x);for(this.setIteratorForAtom(n,-1,x,u+this.maxBondingRadius+f,null);n.hasNext();){var w=this.at[n.next()];if(!w.isDeleted()){var y=w.i,z=m||a.get(y),B=m||b.get(y);!z&&!B||(!(p&&B||s&&z)||v&&d.get(y)||q&&null!=this.occupancies&&50>this.occupancies[x]!=50>this.occupancies[y])||(y=JM.BondCollection.getBondOrderFull(u,w.getBondingRadius(),n.foundDistance2(),j,f),0<y&&this.checkValencesAndBond(t,w,y,g,c)&&h++)}}n.release()}}}this.showRebondTimes&&JU.Logger.checkTimer("autoBond",!1);return h},
"JU.BS,JU.BS,JU.BS,JU.BS,~N,~B");c(c$,"autoBond_Pre_11_9_24",function(a,b,d,c,g){if(0==this.ac)return 0;0==g&&(g=1);1.4E-45==this.maxBondingRadius&&this.findMaxRadii();var f=this.vwr.getFloat(570425348),j=this.vwr.getFloat(570425364),j=j*j,h=0;this.initializeBspf();for(var l=-1,m=this.ac;0<=--m;){var r=null==a||a.get(m),x=null==b||b.get(m);if(r||x){var n=this.at[m];if(!n.isDeleted()){var q=n.mi;if(q!=l&&(l=q,this.isJmolDataFrameForModel(q))){for(;0<=--m&&this.at[m].mi==q;);m++;continue}var p=n.getBondingRadius();
if(0!=p){var s=p+this.maxBondingRadius+f;this.initializeBspt(q);q=this.bspf.getCubeIterator(q);for(q.initialize(n,s,!0);q.hasMoreElements();)if(s=q.nextElement(),!(s===n||s.isDeleted())){var t=s.i,u=null==a||a.get(t),v=null==b||b.get(t);if(!(!u&&!v||null!=d&&d.get(t)&&d.get(m)))if(r&&v||x&&u)t=JM.BondCollection.getBondOrderFull(p,s.getBondingRadius(),q.foundDistance2(),j,f),0<t&&this.checkValencesAndBond(n,s,t,g,c)&&h++}q.release()}}}}return h},"JU.BS,JU.BS,JU.BS,JU.BS,~N");c(c$,"autoBond",function(a,
b,d,c,g,f){if(c){c=a;a=new JU.BS;b=new JU.BS;for(var j=c.nextSetBit(0);0<=j;j=c.nextSetBit(j+1))a.set(this.bo[j].atom1.i),b.set(this.bo[j].atom2.i)}return[g?this.autoHbond(a,b,!1):this.autoBondBs4(a,b,null,d,this.vwr.getMadBond(),f),0]},"JU.BS,JU.BS,JU.BS,~B,~B,~B");c(c$,"autoHbond",function(a,b,d){if(d){for(var c=this.getModelBS(a,!1),g=c.nextSetBit(0);0<=g&&d;g=c.nextSetBit(g+1))d=!this.am[g].hasRasmolHBonds;if(d)return 0}d=!1;for(g=a.nextSetBit(0);0<=g;g=a.nextSetBit(g+1))if(1==this.at[g].getElementNumber()){d=
!0;break}c=new JU.BS;g=this.vwr.getBoolean(603979853);if(null==b||g&&!d)return JU.Logger.info((null==b?"DSSP/DSSR ":"RasMol")+" pseudo-hbond calculation"),this.calcRasmolHydrogenBonds(a,b,null,!1,2147483647,!1,c),-JU.BSUtil.cardinalityOf(c);JU.Logger.info(d?"Standard Hbond calculation":"Jmol pseudo-hbond calculation");var f=null;if(!d){f=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:f.set(g)}}var j=this.vwr.getFloat(570425361),
h=3.141592653589793*this.vwr.getFloat(570425360)/180,l=j*j,m=JM.ModelSet.hbondMin*JM.ModelSet.hbondMin,r=j>JM.ModelSet.hbondMin?m:l,x=j>JM.ModelSet.hbondMin?JM.ModelSet.hbondMin:j,n=0,q=0,p=new JU.V3,s=new JU.V3;this.showRebondTimes&&JU.Logger.debugging&&JU.Logger.startTimer("hbond");var t=null,u=null;b=this.getSelectedAtomIterator(b,!1,!1,!1,!1);for(g=a.nextSetBit(0);0<=g;g=a.nextSetBit(g+1)){var v=this.at[g],w=v.getElementNumber(),y=1==w;if(!(!y&&(d||7!=w&&8!=w)||y&&!d)){var z,B,C;if(y){w=v.bonds;
if(null==w)continue;C=!1;for(z=0;z<w.length&&!C;z++)C=w[z].getOtherAtom(v).getElementNumber(),C=7==C||8==C;if(!C)continue;B=x;w=1;z=r;C=!1}else B=j,w=m,z=l,C=f.get(g);for(this.setIteratorForAtom(b,-1,v.i,B,null);b.hasNext();){B=this.at[b.next()];var D=B.getElementNumber();if(!(B===v||!y&&7!=D&&8!=D||y&&1==D||(q=b.foundDistance2())<w||q>z||C&&f.get(B.i)||v.isBonded(B))){if(0<h){p.sub2(v,B);if(null==(u=JM.ModelSet.checkMinAttachedAngle(v,h,p,s,d)))continue;p.scale(-1);if(null==(t=JM.ModelSet.checkMinAttachedAngle(B,
h,p,s,d)))continue}var D=0,E;y&&!Float.isNaN(t.x)&&!Float.isNaN(u.x)?(E=4096,D=JM.HBond.getEnergy(Math.sqrt(q),t.distance(v),t.distance(u),B.distance(u))/1E3):E=2048;c.set(this.addHBond(v,B,E,D));n++}}}}b.release();this.sm.setShapeSizeBs(1,-2147483648,null,c);this.showRebondTimes&&JU.Logger.checkTimer("hbond",!1);return d?n:-n},"JU.BS,JU.BS,~B");c$.checkMinAttachedAngle=c(c$,"checkMinAttachedAngle",function(a,b,d,c,g){var f=a.bonds;if(null==f||0==f.length)return JU.P3.new3(NaN,0,0);for(var j=null,
h=3.4028235E38,l=f.length;0<=--l;)if(f[l].isCovalent()){var m=f[l].getOtherAtom(a);if(g||1!=m.getElementNumber()){c.sub2(a,m);var r=c.angle(d);if(r<b)return null;r<h&&(j=m,h=r)}}return j},"JM.Atom,~N,JU.V3,JU.V3,~B");c(c$,"setStructureIndexes",function(){for(var a,b=0,d=-1,c=-1,g=-1,f=0;f<this.ac;f++){if((c=this.at[f].mi)!=g)b=0,g=c,d=-1;if((a=this.at[f].getStrucNo())!=d&&0!=a)this.at[f].getGroup().setStrucNo(++b),d=b}});c(c$,"getProteinStructureState",function(a,b,d,c){if(!this.isPDB)return"";for(var g=
0;g<this.mc;g++)if(this.am[g].isBioModel)return this.am[g].getProteinStructureState(a,b,d,c);return""},"JU.BS,~B,~B,~N");c(c$,"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 d=b.nextElement();a.append('\n <property name="').append(d).append('" value=').append(JU.PT.esc(this.modelSetProperties.getProperty(d))).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"))),d=this.vwr.getJDXBaseModelIndex(b),d!=b&&a.append(" baseModelId=").append(JU.PT.esc(this.getInfo(d,"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(c$,"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 d=this.getUnitCell(b);a.append(null==d?"no symmetry information":d.getSymmetryInfoStr())}return a.toString()});c(c$,"getAtomsConnected",function(a,b,d,c){for(var g=p(c,JM.BondSet),f=g?new JM.BondSet:new JU.BS,j=D(this.ac,0),h,l=30720==d,m=65535==
d,r=0;r<this.bondCount;r++){var x=this.bo[r];if(m||x.is(d)||l&&x.isHydrogen())g?f.set(r):(c.get(x.atom1.i)&&(j[h=x.atom2.i]++,f.set(h)),c.get(x.atom2.i)&&(j[h=x.atom1.i]++,f.set(h)))}if(g)return f;d=0==a;for(h=this.ac;0<=--h;)c=j[h],c<a||c>b?f.clear(h):d&&0==c&&f.set(h);return f},"~N,~N,~N,JU.BS");c(c$,"getSymTemp",function(a){return null==this.symTemp||a?this.symTemp=J.api.Interface.getSymmetry():this.symTemp},"~B");c(c$,"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 d=q(this.getModelFileNumber(this.mc-1)/1E6)+1,c=this.mc,g=0;c<a;c++)this.modelNumbers[c]=c+this.mc,this.modelFileNumbers[c]=1E6*d+ ++g,this.modelNumbersForAtomLabel[c]=
this.modelNames[c]=d+"."+g;this.thisStateModel=-1;d=this.getInfoM("group3Lists");null!=d&&(c=this.getInfoM("group3Counts"),d=JU.AU.arrayCopyS(d,a),c=JU.AU.arrayCopyII(c,a),this.msInfo.put("group3Lists",d),this.msInfo.put("group3Counts",c));this.unitCells=JU.AU.arrayCopyObject(this.unitCells,a);for(c=this.mc;c<a;c++)b[c]=(new JM.Model).set(this,c,-1,null,null,null),b[c].loadState=" model create #"+c+";";this.am=b;this.mc=a},"~N");c(c$,"deleteModel",function(a,b,d,c,g){if(0>a)this.validateBspf(!1),
this.bsAll=null,this.resetMolecules(),this.isBbcageDefault=!1,this.calcBoundBoxDimensions(null,1);else{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 f=this.getInfoM("group3Lists"),j=this.getInfoM("group3Counts"),
h=a+1;if(null!=f&&null!=f[h])for(var l=q(f[h].length/6);0<=--l;)0<j[h][l]&&(j[0][l]-=j[h][l],0==j[0][l]&&(f[0]=f[0].substring(0,6*l)+",["+f[0].substring(6*l+2)));null!=f&&(this.msInfo.put("group3Lists",JU.AU.deleteElements(f,a,1)),this.msInfo.put("group3Counts",JU.AU.deleteElements(j,a,1)));null!=this.unitCells&&(this.unitCells=JU.AU.deleteElements(this.unitCells,a,1));for(l=this.stateScripts.size();0<=--l;)this.stateScripts.get(l).deleteAtoms(a,g,c)||this.stateScripts.remove(l);this.deleteModelAtoms(b,
d,c);this.vwr.deleteModelAtoms(a,b,d,c)}},"~N,~N,~N,JU.BS,JU.BS");c(c$,"getMoInfo",function(a){for(var b=new JU.SB,d=0;d<this.mc;d++)if(!(0<=a&&d!=a)){var c=this.vwr.getModelAuxiliaryInfoValue(d,"moData");if(null!=c){var c=c.get("mos"),g=null==c?0:c.size();if(0!=g)for(;0<=--g;){var f=c.get(g),j=f.get("type");null==j&&(j="");var h=f.get("energyUnits");null==h&&(h="");var l=f.get("occupancy");null!=l&&(j="occupancy "+l.floatValue()+" "+j);l=f.get("symmetry");null!=l&&(j+=l);l=""+f.get("energy");Float.isNaN(JU.PT.parseFloat(l))?
b.append(JU.Txt.sprintf("model %-2s;  mo %-2i # %s\n","sis",[this.getModelNumberDotted(d),Integer.$valueOf(g+1),j])):b.append(JU.Txt.sprintf("model %-2s;  mo %-2i # energy %-8.3f %s %s\n","sifss",[this.getModelNumberDotted(d),Integer.$valueOf(g+1),f.get("energy"),h,j]))}}}return b.toString()},"~N");c(c$,"assignAtom",function(a,b,d){null==b&&(b="C");var c=this.at[a],g=new JU.BS,f=1==c.getElementNumber(),g=JU.Elements.elementNumberFromSymbol(b,!0),j=!1;if(0<g)this.setElement(c,g),this.vwr.shm.setShapeSizeBs(0,
0,this.vwr.rd,JU.BSUtil.newAndSetBit(a)),this.setAtomName(a,b+c.getAtomNumber()),this.am[c.mi].isModelKit||this.taintAtom(a,0);else if(b.equals("Pl"))c.setFormalCharge(c.getFormalCharge()+1);else if(b.equals("Mi"))c.setFormalCharge(c.getFormalCharge()-1);else if(b.equals("X"))j=!0;else if(!b.equals("."))return;this.removeUnnecessaryBonds(c,j);b=0;1==c.getCovalentBondCount()&&(f?b=1.5:!f&&1==g&&(b=1));0!=b&&(f=JU.V3.newVsub(c,this.at[c.getBondedAtomIndex(0)]),j=f.length(),f.normalize(),f.scale(b-j),
this.setAtomCoordRelative(a,f.x,f.y,f.z));a=JU.BSUtil.newAndSetBit(a);1!=g&&d&&(this.validateBspf(!1),g=this.getAtomsWithinRadius(1,a,!1,null),g.andNot(a),0<=g.nextSetBit(0)&&this.vwr.deleteAtoms(g,!1),g=this.vwr.getModelUndeletedAtomsBitSet(c.mi),g.andNot(this.getAtomBitsMDa(1613758476,null)),this.makeConnections2(0.1,1.8,1,1073741904,a,g,null,!1,!1,0));this.vwr.addHydrogens(a,!1,!0)},"~N,~S,~B");c(c$,"deleteAtoms",function(a){this.averageAtomPoint=null;if(null!=a){for(var b=new JU.BS,d=a.nextSetBit(0);0<=
d&&d<this.ac;d=a.nextSetBit(d+1))this.at[d].deleteBonds(b);for(d=0;d<this.mc;d++)this.am[d].bsAtomsDeleted.or(a),this.am[d].bsAtomsDeleted.and(this.am[d].bsAtoms),this.am[d].dssrCache=null;this.deleteBonds(b,!1)}},"JU.BS");c(c$,"adjustAtomArrays",function(a,b,d){this.ac=d;for(var c=b;c<d;c++){this.at[c]=this.at[a[c]];this.at[c].i=c;var g=this.am[this.at[c].mi];g.firstAtomIndex==a[c]&&(g.firstAtomIndex=c);g.bsAtoms.set(c)}if(null!=this.vibrations)for(c=b;c<d;c++)this.vibrations[c]=this.vibrations[a[c]];
if(null!=this.occupancies)for(c=b;c<d;c++)this.occupancies[c]=this.occupancies[a[c]];if(null!=this.bfactor100s)for(c=b;c<d;c++)this.bfactor100s[c]=this.bfactor100s[a[c]];if(null!=this.partialCharges)for(c=b;c<d;c++)this.partialCharges[c]=this.partialCharges[a[c]];if(null!=this.atomTensorList)for(c=b;c<d;c++)if(g=this.atomTensorList[c]=this.atomTensorList[a[c]],null!=g)for(var f=g.length;0<=--f;){var j=g[f];null!=j&&(j.atomIndex1=c)}if(null!=this.atomNames)for(c=b;c<d;c++)this.atomNames[c]=this.atomNames[a[c]];
if(null!=this.atomTypes)for(c=b;c<d;c++)this.atomTypes[c]=this.atomTypes[a[c]];if(null!=this.atomSerials)for(c=b;c<d;c++)this.atomSerials[c]=this.atomSerials[a[c]];if(null!=this.atomSeqIDs)for(c=b;c<d;c++)this.atomSeqIDs[c]=this.atomSeqIDs[a[c]]},"~A,~N,~N");c(c$,"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.atomSerials&&(this.atomSerials=JU.AU.arrayCopyI(this.atomSerials,a));null!=this.atomSeqIDs&&
(this.atomSeqIDs=JU.AU.arrayCopyI(this.atomSeqIDs,a))},"~N");c(c$,"addAtom",function(a,b,d,c,g,f,j,h,l,m,r,x,n,q,p,s,t,u){j=(new JM.Atom).setAtom(a,this.ac,h,l,u,j,d,r,s);this.am[a].ac++;this.am[a].bsAtoms.set(this.ac);JU.Elements.isElement(d,1)&&this.am[a].hydrogenCount++;this.ac>=this.at.length&&this.growAtomArrays(this.ac+100);this.at[this.ac]=j;this.setBFactor(this.ac,q);this.setOccupancy(this.ac,n);this.setPartialCharge(this.ac,x);null!=p&&this.setAtomTensors(this.ac,p);j.group=b;j.colixAtom=
this.vwr.getColixAtomPalette(j,J.c.PAL.CPK.id);if(null!=c){if(0<=(a=c.indexOf("\x00")))null==this.atomTypes&&(this.atomTypes=Array(this.at.length)),this.atomTypes[this.ac]=c.substring(a+1),c=c.substring(0,a);j.atomID=t;0==t&&(null==this.atomNames&&(this.atomNames=Array(this.at.length)),this.atomNames[this.ac]=c.intern())}-2147483648!=g&&(null==this.atomSerials&&(this.atomSerials=D(this.at.length,0)),this.atomSerials[this.ac]=g);0!=f&&(null==this.atomSeqIDs&&(this.atomSeqIDs=D(this.at.length,0)),this.atomSeqIDs[this.ac]=
f);null!=m&&this.setVibrationVector(this.ac,m);this.ac++;return j},"~N,JM.Group,~N,~S,~N,~N,~N,JU.P3,~N,JU.V3,~N,~N,~N,~N,JU.Lst,~B,~N,JU.BS");c(c$,"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 null;a=b.indexOf2('"',a+7);var d=b.lastIndexOf('end "');return d<a||0>a?null:b.substring2(a+2,d)},"~N");c(c$,"isAtomPDB",function(a){return 0<=a&&this.am[this.at[a].mi].isBioModel},
"~N");c(c$,"isAtomAssignable",function(a){return 0<=a&&this.at[a].mi==this.mc-1},"~N");c(c$,"haveModelKit",function(){for(var a=0;a<this.mc;a++)if(this.am[a].isModelKit)return!0;return!1});c(c$,"getModelKitStateBitset",function(a,b){for(var d=JU.BSUtil.copy(b),c=0;c<this.mc;c++)this.am[c].isModelKit||d.andNot(this.am[c].bsAtoms);return JU.BSUtil.deleteBits(a,d)},"JU.BS,JU.BS");c(c$,"setAtomNamesAndNumbers",function(a,b,d){0>b&&(a=this.am[this.at[a].mi].firstAtomIndex);null==this.atomSerials&&(this.atomSerials=
D(this.ac,0));null==this.atomNames&&(this.atomNames=Array(this.ac));for(var c=this.isXYZ&&this.vwr.getBoolean(603979978),g=2147483647,f=1;a<this.ac;++a){var j=this.at[a];j.mi!=g&&(g=j.mi,f=c?0:1);if(a>=-b){if(0==this.atomSerials[a]||0>b)this.atomSerials[a]=a<b?d.atomSerials[a]:f;if(null==this.atomNames[a]||0>b)this.atomNames[a]=(j.getElementSymbol()+this.atomSerials[a]).intern()}(!this.am[g].isModelKit||0<j.getElementNumber()&&!j.isDeleted())&&f++}},"~N,~N,JM.AtomCollection");c(c$,"setUnitCellOffset",
function(a,b,d){null!=a&&(null==b?a.setOffset(d):a.setOffsetPt(b))},"J.api.SymmetryInterface,JU.T3,~N");c(c$,"connect",function(a){this.resetMolecules();for(var b=new JU.BS,d=0;d<a.length;d++){var c=a[d];if(!(null==c||2>c.length)){var g=z(c[0]),f=0>g;f&&(g=-1-g);var j=z(c[1]);if(!(0>j||g>=this.ac||j>=this.ac)){var h=2<c.length?z(c[2]):1;0>h&&(h&=65535);var l=3<c.length?Y(1E3*a[d][3]):this.getDefaultMadFromOrder(h);0==h||0==l&&32768!=h&&!JM.Bond.isOrderH(h)?(c=this.at[g].getBond(this.at[j]),null!=
c&&b.set(c.index)):this.bondAtoms(this.at[g],this.at[j],h,l,null,4<c.length?c[4]:0,f,!0)}}}0<=b.nextSetBit(0)&&this.deleteBonds(b,!1)},"~A");c(c$,"allowSpecAtom",function(){return 1!=this.mc||this.am[0].isBioModel});c(c$,"setFrameDelayMs",function(a,b){for(var d=b.nextSetBit(0);0<=d;d=b.nextSetBit(d+1))this.am[this.am[d].trajectoryBaseIndex].frameDelay=a},"~N,JU.BS");c(c$,"getFrameDelayMs",function(a){return a<this.am.length&&0<=a?this.am[this.am[a].trajectoryBaseIndex].frameDelay:0},"~N");c(c$,"getModelIndexFromId",
function(a){var b=0<=a.indexOf("#"),d=a.toLowerCase().endsWith(".basemodel");d&&(a=a.substring(0,a.length-10));for(var c=-1,g=null,f=0;f<this.mc;f++){var j=this.getInfo(f,"modelID"),h=a.startsWith("~")?"~"+this.getModelNumberDotted(f):null;if(!(null==h&&null==j&&null==(j=this.getModelTitle(f)))){b&&(g=this.getModelFileName(f),g.endsWith("#molfile")?j=g:(g+="#",j=g+j));if(a.equalsIgnoreCase(j)||a.equalsIgnoreCase(h))return d?this.vwr.getJDXBaseModelIndex(f):f;null!=g&&a.startsWith(g)&&(c=-2)}}return null==
g&&!b?-2:c},"~S");c(c$,"getAuxiliaryInfo",function(a){var b=this.msInfo;if(null==b)return null;for(var d=new JU.Lst,c=0;c<this.mc;++c)if(null==a||a.get(c)){var g=this.getModelAuxiliaryInfo(c);d.addLast(g)}b.put("models",d);return b},"JU.BS");c(c$,"getDihedralMap",function(a){for(var b=new JU.Lst,d=a.length,c=null,g=null,f=null,j=null,h=d-1;0<=--h;)for(var l=d;--l>h;)if(c=this.at[a[h]],g=this.at[a[l]],c.isBonded(g))for(var m=d;0<=--m;)if(m!=h&&m!=l&&(f=this.at[a[m]]).isBonded(c))for(var r=d;0<=--r;)if(r!=
h&&r!=l&&r!=m&&(j=this.at[a[r]]).isBonded(g)){var x=D(4,0);x[0]=f.i;x[1]=c.i;x[2]=g.i;x[3]=j.i;b.addLast(x)}d=b.size();a=JU.AU.newInt2(d);for(h=d;0<=--h;)a[d-h-1]=b.get(h);return a},"~A");c(c$,"setModulation",function(a,b,d,c){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(1276121113),f=!1,j=a.nextSetBit(0);0<=j;j=a.nextSetBit(j+1)){var h=this.getVibration(j,!1);p(h,J.api.JmolModulationSet)&&
(h.setModTQ(this.at[j],b,d,c,g),null!=this.bsModulated&&this.bsModulated.setBitTo(j,b),f=!0)}f||(this.bsModulated=null)},"JU.BS,~B,JU.P3,~B");c(c$,"getBoundBoxOrientation",function(a,b){var d=b.nextSetBit(0);if(0>d)return"{0 0 0 1}";var c=null==this.vOrientations?0:this.vOrientations.length;if(0==c){for(var g=Array(3375),c=0,f=new JU.P4,j=-7;7>=j;j++)for(var h=-7;7>=h;h++)for(var l=0;14>=l;l++,c++)1<(g[c]=JU.V3.new3(j/7,h/7,l/14)).length()&&--c;this.vOrientations=Array(c);for(j=c;0<=--j;)l=Math.sqrt(1-
g[j].lengthSquared()),Float.isNaN(l)&&(l=0),f.set4(g[j].x,g[j].y,g[j].z,l),this.vOrientations[j]=JU.Quat.newP4(f)}for(var g=new JU.P3,f=3.4028235E38,m=null,r=null,j=0;j<c;j++){var l=this.vOrientations[j],x=new JU.BoxInfo;x.setMargin(0);for(h=d;0<=h;h=b.nextSetBit(h+1))x.addBoundBoxPoint(l.transformP2(this.at[h],g));switch(a){default:case 1313866249:case 1073741863:h=(x.bbCorner1.x-x.bbCorner0.x)*(x.bbCorner1.y-x.bbCorner0.y)*(x.bbCorner1.z-x.bbCorner0.z);break;case 1112541205:h=x.bbCorner1.x-x.bbCorner0.x;
break;case 1112541206:h=x.bbCorner1.y-x.bbCorner0.y;break;case 1112541207:h=x.bbCorner1.z-x.bbCorner0.z}h<f&&(m=l,r=x,f=h)}if(1313866249!=a&&1073741863!=a)return m.toString();l=JU.Quat.newQ(m);d=r.bbCorner1.x-r.bbCorner0.x;c=r.bbCorner1.y-r.bbCorner0.y;j=r.bbCorner1.z-r.bbCorner0.z;d<c&&(g.set(0,0,1),l=JU.Quat.newVA(g,90).mulQ(l),h=d,d=c,c=h);c<j&&(j>d&&(g.set(0,1,0),l=JU.Quat.newVA(g,90).mulQ(l),h=d,d=j,j=h),g.set(1,0,0),l=JU.Quat.newVA(g,90).mulQ(l),h=c,c=j,j=h);return 1313866249==a?f+"\t{"+d+" "+
c+" "+j+"}":0==l.getTheta()?"{0 0 0 1}":l.toString()},"~N,JU.BS");c(c$,"intersectPlane",function(a,b,d){return(null==this.triangulator?this.triangulator=J.api.Interface.getUtil("TriangleData"):this.triangulator).intersectPlane(a,b,d)},"JU.P4,JU.Lst,~N");c(c$,"getUnitCellForAtom",function(a){if(0>a||a>this.ac)return null;if(null!=this.bsModulated){var b=this.getVibration(a,!1),b=null==b?null:b.getUnitCell();if(null!=b)return b}return this.getUnitCell(this.at[a].mi)},"~N");c(c$,"clearCache",function(){for(var a=
this.mc;0<=--a;)this.am[a].dssrCache=null});c(c$,"getSymMatrices",function(a){var b=this.getModelSymmetryCount(a);if(0==b)return null;var d=Array(b),c=this.am[a].biosymmetry;null==c&&(c=this.getUnitCell(a));for(a=b;0<=--a;)d[a]=c.getSpaceGroupOperation(a);return d},"~N");c(c$,"getBsBranches",function(a){for(var b=q(a.length/6),d=Array(b),c=new java.util.Hashtable,g=0,f=0;g<b;g++,f+=6)if(!(1>Math.abs(a[f+5]-a[f+4]))){var j=z(a[f+1]),h=z(a[f+2]),l=""+j+"_"+h;if(!c.containsKey(l)){c.put(l,Boolean.TRUE);
for(var l=this.vwr.getBranchBitSet(h,j,!0),m=this.at[j].bonds,j=this.at[j],r=0;r<m.length;r++){var x=m[r];if(x.isCovalent()&&(x=x.getOtherAtom(j).i,x!=h&&l.get(x))){l=null;break}}d[g]=l}}return d},"~A");c(c$,"recalculatePositionDependentQuantities",function(a,b){this.getHaveStraightness()&&this.calculateStraightness();this.recalculateLeadMidpointsAndWingVectors(-1);for(var d=this.getModelBS(a,!1),c=d.nextSetBit(0);0<=c;c=d.nextSetBit(c+1))this.sm.refreshShapeTrajectories(c,a,b);this.averageAtomPoint=
null},"JU.BS,JU.M4");c(c$,"moveAtoms",function(a,b,d,c,g,f,j){if(!j){null==a?this.matTemp.setM3(b):(this.matInv.setM3(b),this.matInv.invert(),this.ptTemp.set(0,0,0),this.matTemp.mul2(a,b),this.matTemp.mul2(this.matInv,this.matTemp));f?(this.vTemp.setT(g),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(a=c.nextSetBit(0);0<=a;a=c.nextSetBit(a+1))f?this.mat4.rotTrans(this.at[a]):(this.ptTemp.add(this.at[a]),this.mat4.rotTrans(this.at[a]),this.ptTemp.sub(this.at[a])),this.taintAtom(a,2);f||(this.ptTemp.scale(1/c.cardinality()),null==d&&(d=new JU.V3),d.add(this.ptTemp))}if(null!=d){for(a=c.nextSetBit(0);0<=a;a=c.nextSetBit(a+1))this.at[a].add(d);j||(this.mat4t.setIdentity(),this.mat4t.setTranslation(d),this.mat4.mul2(this.mat4t,this.mat4))}this.recalculatePositionDependentQuantities(c,this.mat4)},
"JU.M3,JU.M3,JU.V3,JU.BS,JU.P3,~B,~B");c(c$,"setDihedrals",function(a,b,d){var c=q(a.length/6);1<d&&(d=1);for(var g=0,f=0;g<c;g++,f+=6){var j=b[g];if(!(null==j||j.isEmpty())){var h=this.at[z(a[f+1])],l=JU.V3.newVsub(this.at[z(a[f+2])],h),l=JU.A4.newVA(l,-((a[f+5]-a[f+4])*d)/57.29577951308232);this.matTemp.setAA(l);this.ptTemp.setT(h);for(h=j.nextSetBit(0);0<=h;h=j.nextSetBit(h+1))this.at[h].sub(this.ptTemp),this.matTemp.rotate(this.at[h]),this.at[h].add(this.ptTemp),this.taintAtom(h,2)}}},"~A,~A,~N");
c(c$,"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(c$,"setAtomCoords",function(a,b,d){this.setAtomCoord2(a,b,d);switch(b){case 1112541202:case 1112541203:case 1112541204:case 1146095631:break;default:this.recalculatePositionDependentQuantities(a,null)}},"JU.BS,~N,~O");c(c$,"invertSelected",function(a,b,d,c,g){if(null!=
a)for(var f=g.nextSetBit(0);0<=f;f=g.nextSetBit(f+1)){d=2*(a.x-this.at[f].x);c=2*(a.y-this.at[f].y);var j=2*(a.z-this.at[f].z);this.setAtomCoordRelative(f,d,c,j)}else if(null!=b){a=JU.V3.new3(b.x,b.y,b.z);a.normalize();for(var h=Math.sqrt(b.x*b.x+b.y*b.y+b.z*b.z),f=g.nextSetBit(0);0<=f;f=g.nextSetBit(f+1))j=2*-JU.Measure.distanceToPlaneD(b,h,this.at[f]),d=a.x*j,c=a.y*j,j*=a.z,this.setAtomCoordRelative(f,d,c,j)}else if(0<=d&&(b=this.at[d],a=b.bonds,null!=a)){g=new JU.BS;j=new JU.Lst;h=this.vwr.getModelUndeletedAtomsBitSet(b.mi);
for(f=0;f<a.length;f++){var l=a[f].getOtherAtom(b);c.get(l.i)?g.or(JU.JmolMolecule.getBranchBitSet(this.at,l.i,h,null,d,!0,!0)):j.addLast(l)}0!=j.size()&&(a=JU.Measure.getCenterAndPoints(j)[0],f=JU.V3.newVsub(b,a),f=JU.Quat.newVA(f,180),this.moveAtoms(null,f.getMatrix(),null,g,b,!0,!1))}},"JU.P3,JU.P4,~N,JU.BS,JU.BS");c(c$,"setMSInfo",function(a,b){this.msInfo.put(a,b)},"~S,~O");C(c$,"hbondMin",2.5)});n("JM");w(["JU.M3","$.P3"],"JM.Orientation",["JU.PT","JU.Escape"],function(){c$=t(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;s(this,arguments)},JM,"Orientation");K(c$,function(){this.rotationMatrix=new JU.M3;this.center=new JU.P3;this.navCenter=new JU.P3});u(c$,function(a,b,d){this.vwr=a;null!=d?(this.pymolView=d,this.moveToText="moveTo -1.0 PyMOL "+
JU.Escape.eAF(d)):(a.finalizeTransformParameters(),b?(b=a.ms.getInfoM("defaultOrientationMatrix"),null==b?this.rotationMatrix.setScale(1):this.rotationMatrix.setM3(b)):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.getRotationCenter()),this.windowCenteredFlag=a.tm.isWindowCentered(),this.rotationRadius=a.getFloat(570425388),this.navigationMode=a.getBoolean(603979887),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.getNavigationDepthPercent(),this.navCenter=JU.P3.newP(a.tm.getNavigationCenter())),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");c(c$,"getMoveToText",function(a){return a?"   "+this.moveToText+"\n  save orientation "+JU.PT.esc(this.saveName.substring(12))+
";\n":this.moveToText},"~B");c(c$,"restore",function(a,b){b?(this.vwr.setBooleanProperty("windowCentered",this.windowCenteredFlag),this.vwr.setBooleanProperty("navigationMode",this.navigationMode),null==this.pymolView?this.vwr.moveTo(this.vwr.eval,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")});n("JM");w(null,"JM.StateScript",["JU.SB","JU.BSUtil","$.Escape"],function(){c$=t(function(){this.modelIndex=0;this.script2=this.script1=this.bsAtoms2=this.bsAtoms1=this.bsBonds=null;this.inDefinedStateBlock=!1;s(this,arguments)},JM,"StateScript");u(c$,function(a,b,d,c,g,f,j){this.modelIndex=a;this.script1=b;this.bsBonds=JU.BSUtil.copy(d);this.bsAtoms1=JU.BSUtil.copy(c);this.bsAtoms2=JU.BSUtil.copy(g);this.script2=f;this.inDefinedStateBlock=j},"~N,~S,JU.BS,JU.BS,JU.BS,~S,~B");
c(c$,"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))});h(c$,"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(c$,"isConnect",function(){return 0<=this.script1.indexOf("connect")});c(c$,"deleteAtoms",function(a,b,d){if(a==this.modelIndex)return!1;if(a>this.modelIndex)return!0;JU.BSUtil.deleteBits(this.bsBonds,b);JU.BSUtil.deleteBits(this.bsAtoms1,d);JU.BSUtil.deleteBits(this.bsAtoms2,d);return this.isValid()},"~N,JU.BS,JU.BS");c(c$,"setModelIndex",function(a){this.modelIndex=a},"~N")});n("JM");c$=t(function(){this.id=
"";this.type=" ";this.scale=this.tickLabelFormats=this.ticks=null;this.first=0;this.signFactor=1;this.reference=null;s(this,arguments)},JM,"TickInfo");u(c$,function(a){this.ticks=a},"JU.P3");n("JU");w(["JU.P3","$.P3i","$.V3"],"JU.BoxInfo",["JU.Lst","$.Measure","$.P4","JU.Point3fi"],function(){c$=t(function(){this.bbVertices=this.bbVector=this.bbCenter=this.bbCorner1=this.bbCorner0=null;this.isScaleSet=!1;this.margin=0;s(this,arguments)},JU,"BoxInfo");K(c$,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=8;0<=--a;)this.bbVertices[a]=new JU.Point3fi;for(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(c$,function(){this.reset()});c(c$,"intersectPlane",function(a,b,d,c){var g=new JU.Lst;g.addLast(this.getCanonicalCopy(d));return a.intersectPlane(b,g,c)},"JM.ModelSet,JU.P4,~N,~N");c(c$,"getCanonicalCopy",
function(a){return JU.BoxInfo.getCanonicalCopy(this.bbVertices,a)},"~N");c$.getCanonicalCopy=c(c$,"getCanonicalCopy",function(a,b){for(var d=Array(8),c=0;8>c;c++)d[JU.BoxInfo.toCanonical[c]]=JU.P3.newP(a[c]);JU.BoxInfo.scaleBox(d,b);return d},"~A,~N");c$.scaleBox=c(c$,"scaleBox",function(a,b){if(!(0==b||1==b)){for(var d=new JU.P3,c=new JU.V3,g=0;8>g;g++)d.add(a[g]);d.scale(0.125);for(g=0;8>g;g++)c.sub2(a[g],d),c.scale(b),a[g].add2(d,c)}},"~A,~N");c$.getFacesFromCriticalPoints=c(c$,"getFacesFromCriticalPoints",
function(a){for(var b=Array(6),d=new JU.V3,c=new JU.V3,g=new JU.V3,f=new JU.P3,j=new JU.P3,h=new JU.P3,l=Array(8),m=0;8>m;m++)l[m]=JU.P3.newP(a[0]),1==(m&1)&&l[m].add(a[1]),2==(m&2)&&l[m].add(a[2]),4==(m&4)&&l[m].add(a[3]);for(m=0;6>m;m++)f.setT(l[JU.BoxInfo.facePoints[m].x]),j.setT(l[JU.BoxInfo.facePoints[m].y]),h.setT(l[JU.BoxInfo.facePoints[m].z]),JU.Measure.getPlaneThroughPoints(f,j,h,d,c,g,b[m]=new JU.P4);return b},"~A");c$.getCriticalPoints=c(c$,"getCriticalPoints",function(a,b){var d=JU.P3.newP(a[0]),
c=JU.P3.newP(a[1]),g=JU.P3.newP(a[2]),f=JU.P3.newP(a[4]);c.sub(d);g.sub(d);f.sub(d);null!=b&&d.add(b);return[d,c,g,f]},"~A,JU.T3");c(c$,"getBoundBoxCenter",function(){this.isScaleSet||this.setBbcage(1);return this.bbCenter});c(c$,"getBoundBoxCornerVector",function(){this.isScaleSet||this.setBbcage(1);return this.bbVector});c(c$,"getBoundBoxPoints",function(a){this.isScaleSet||this.setBbcage(1);return a?[this.bbCenter,JU.P3.newP(this.bbVector),this.bbCorner0,this.bbCorner1]:[this.bbCorner0,this.bbCorner1]},
"~B");c(c$,"getBoundBoxVertices",function(){this.isScaleSet||this.setBbcage(1);return this.bbVertices});c(c$,"setBoundBox",function(a,b,d,c){if(null!=a){if(0==c)return;if(d){if(0==a.distance(b))return;this.bbCorner0.set(Math.min(a.x,b.x),Math.min(a.y,b.y),Math.min(a.z,b.z));this.bbCorner1.set(Math.max(a.x,b.x),Math.max(a.y,b.y),Math.max(a.z,b.z))}else{if(0==b.x||0==b.y&&0==b.z)return;this.bbCorner0.set(a.x-b.x,a.y-b.y,a.z-b.z);this.bbCorner1.set(a.x+b.x,a.y+b.y,a.z+b.z)}}this.setBbcage(c)},"JU.P3,JU.P3,~B,~N");
c(c$,"reset",function(){this.isScaleSet=!1;this.bbCorner0.set(3.4028235E38,3.4028235E38,3.4028235E38);this.bbCorner1.set(-3.4028235E38,-3.4028235E38,-3.4028235E38)});c(c$,"setMargin",function(a){this.margin=a},"~N");c(c$,"addBoundBoxPoint",function(a){this.isScaleSet=!1;JU.BoxInfo.addPoint(a,this.bbCorner0,this.bbCorner1,this.margin)},"JU.T3");c$.addPoint=c(c$,"addPoint",function(a,b,d,c){a.x-c<b.x&&(b.x=a.x-c);a.x+c>d.x&&(d.x=a.x+c);a.y-c<b.y&&(b.y=a.y-c);a.y+c>d.y&&(d.y=a.y+c);a.z-c<b.z&&(b.z=a.z-
c);a.z+c>d.z&&(d.z=a.z+c)},"JU.T3,JU.P3,JU.P3,~N");c$.addPointXYZ=c(c$,"addPointXYZ",function(a,b,d,c,g,f){a-f<c.x&&(c.x=a-f);a+f>g.x&&(g.x=a+f);b-f<c.y&&(c.y=b-f);b+f>g.y&&(g.y=b+f);d-f<c.z&&(c.z=d-f);d+f>g.z&&(g.z=d+f)},"~N,~N,~N,JU.P3,JU.P3,~N");c(c$,"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(a=8;0<=--a;){var b=this.bbVertices[a];b.setT(JU.BoxInfo.unitBboxPoints[a]);b.x*=this.bbVector.x;b.y*=this.bbVector.y;b.z*=this.bbVector.z;b.add(this.bbCenter)}this.bbCorner0.setT(this.bbVertices[0]);this.bbCorner1.setT(this.bbVertices[7])},"~N");c(c$,"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(c$,"bbcageTickEdges","z\x00\x00yx\x00\x00\x00\x00\x00\x00\x00".split(""),
"uccageTickEdges","zyx\x00\x00\x00\x00\x00\x00\x00\x00\x00".split(""),"edges",[0,1,0,2,0,4,1,3,1,5,2,3,2,6,3,7,4,5,4,6,5,7,6,7]);c$.unitCubePoints=c$.prototype.unitCubePoints=[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)];c$.facePoints=c$.prototype.facePoints=[JU.P3i.new3(4,0,6),JU.P3i.new3(4,6,5),JU.P3i.new3(5,7,1),JU.P3i.new3(1,3,0),JU.P3i.new3(6,2,7),JU.P3i.new3(1,0,5)];C(c$,"toCanonical",[0,3,4,
7,1,2,5,6]);c$.cubeVertexOffsets=c$.prototype.cubeVertexOffsets=[JU.P3i.new3(0,0,0),JU.P3i.new3(1,0,0),JU.P3i.new3(1,0,1),JU.P3i.new3(0,0,1),JU.P3i.new3(0,1,0),JU.P3i.new3(1,1,0),JU.P3i.new3(1,1,1),JU.P3i.new3(0,1,1)];c$.unitBboxPoints=c$.prototype.unitBboxPoints=Array(8)});n("JU");w(["JU.BS"],"JU.BSUtil",null,function(){c$=B(JU,"BSUtil");c$.newAndSetBit=c(c$,"newAndSetBit",function(a){var b=JU.BS.newN(a+1);b.set(a);return b},"~N");c$.areEqual=c(c$,"areEqual",function(a,b){return null==a||null==b?
null==a&&null==b:a.equals(b)},"JU.BS,JU.BS");c$.haveCommon=c(c$,"haveCommon",function(a,b){return null==a||null==b?!1:a.intersects(b)},"JU.BS,JU.BS");c$.cardinalityOf=c(c$,"cardinalityOf",function(a){return null==a?0:a.cardinality()},"JU.BS");c$.newBitSet2=c(c$,"newBitSet2",function(a,b){var d=JU.BS.newN(b);d.setBits(a,b);return d},"~N,~N");c$.setAll=c(c$,"setAll",function(a){var b=JU.BS.newN(a);b.setBits(0,a);return b},"~N");c$.andNot=c(c$,"andNot",function(a,b){null!=b&&null!=a&&a.andNot(b);return a},
"JU.BS,JU.BS");c$.copy=c(c$,"copy",function(a){return null==a?null:a.clone()},"JU.BS");c$.copy2=c(c$,"copy2",function(a,b){if(null==a||null==b)return null;b.clearAll();b.or(a);return b},"JU.BS,JU.BS");c$.copyInvert=c(c$,"copyInvert",function(a,b){return null==a?null:JU.BSUtil.andNot(JU.BSUtil.setAll(b),a)},"JU.BS,~N");c$.invertInPlace=c(c$,"invertInPlace",function(a,b){return JU.BSUtil.copy2(JU.BSUtil.copyInvert(a,b),a)},"JU.BS,~N");c$.toggleInPlace=c(c$,"toggleInPlace",function(a,b){a.equals(b)?
a.clearAll():0==JU.BSUtil.andNot(JU.BSUtil.copy(b),a).length()?JU.BSUtil.andNot(a,b):a.or(b);return a},"JU.BS,JU.BS");c$.deleteBits=c(c$,"deleteBits",function(a,b){if(null==a||null==b)return a;var d=b.nextSetBit(0);if(0>d)return a;var c=a.length(),g=Math.min(c,b.length()),f;for(f=b.nextClearBit(d);f<g&&0<=f;f=b.nextClearBit(f+1))a.setBitTo(d++,a.get(f));for(f=g;f<c;f++)a.setBitTo(d++,a.get(f));d<c&&a.clearBits(d,c);return a},"JU.BS,JU.BS");c$.shiftBits=c(c$,"shiftBits",function(a,b,d,c){if(!(null==
a||null==b)){for(var g=b.length(),f=JU.BS.newN(g),j=!1,h=!1,l=d,m=0,r=0;m<g&&r<c;m++)b.get(m)?(h&&f.set(m),l=d,j=!1):a.get(r++)?(f.set(m),l&&(l=!1,h=j=!0)):l&&!j&&(h=!1);a.clearAll();a.or(f)}},"JU.BS,JU.BS,~B,~N");c$.offset=c(c$,"offset",function(a,b,d){if(null!=a){for(var c=JU.BS.newN(a.length()+d),g=a.nextSetBit(0);g>=b;g=a.nextSetBit(g+1))c.set(g+d);JU.BSUtil.copy2(c,a)}},"JU.BS,~N,~N");c$.setMapBitSet=c(c$,"setMapBitSet",function(a,b,d,c){var g;a.containsKey(c)?g=a.get(c):a.put(c,g=new JU.BS);
g.setBits(b,d+1)},"java.util.Map,~N,~N,~S");c$.emptySet=c$.prototype.emptySet=new JU.BS});n("JU");w(["JU.Int2IntHash"],"JU.C","java.lang.Byte $.Float JU.AU $.CU $.PT $.SB J.c.PAL JU.Escape $.Logger".split(" "),function(){c$=B(JU,"C");u(c$,function(){});c$.getColix=c(c$,"getColix",function(a){if(0==a)return 0;var b=0;-16777216!=(a&4278190080)&&(b=JU.C.getTranslucentFlag(a>>24&255),a|=4278190080);var c=JU.C.colixHash.get(a);3==(c&3)&&(b=0);return(0<c?c:JU.C.allocateColix(a))|b},"~N");c$.allocateColix=
c(c$,"allocateColix",function(a){for(var b=JU.C.colixMax;4<=--b;)if((a&16777215)==(JU.C.argbs[b]&16777215))return b;JU.C.colixMax==JU.C.argbs.length&&(b=2*JU.C.colixMax,2048<b&&(b=2048),JU.C.argbs=JU.AU.arrayCopyI(JU.C.argbs,b),null!=JU.C.argbsGreyscale&&(JU.C.argbsGreyscale=JU.AU.arrayCopyI(JU.C.argbsGreyscale,b)));JU.C.argbs[JU.C.colixMax]=a;null!=JU.C.argbsGreyscale&&(JU.C.argbsGreyscale[JU.C.colixMax]=JU.CU.toFFGGGfromRGB(a));JU.C.colixHash.put(a,JU.C.colixMax);return 2047>JU.C.colixMax?JU.C.colixMax++:
JU.C.colixMax},"~N");c$.setLastGrey=c(c$,"setLastGrey",function(a){JU.C.calcArgbsGreyscale();JU.C.argbsGreyscale[2047]=JU.CU.toFFGGGfromRGB(a)},"~N");c$.calcArgbsGreyscale=c(c$,"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}});c$.getArgbGreyscale=c(c$,"getArgbGreyscale",function(a){null==JU.C.argbsGreyscale&&JU.C.calcArgbsGreyscale();return JU.C.argbsGreyscale[a&
-30721]},"~N");c$.getColixO=c(c$,"getColixO",function(a){if(null==a)return 0;if(p(a,J.c.PAL))return a===J.c.PAL.NONE?0:2;if(p(a,Integer))return JU.C.getColix(a.intValue());if(p(a,String))return JU.C.getColixS(a);if(p(a,Byte))return 0==a.byteValue()?0:2;JU.Logger.debugging&&JU.Logger.debug("?? getColix("+a+")");return 22},"~O");c$.getTranslucentFlag=c(c$,"getTranslucentFlag",function(a){return 0==a?0:0>a?30720:Float.isNaN(a)||255<=a||1==a?16384:(q(Math.floor(1>a?256*a:9>=a?q(Math.floor(a-1))<<5:15>
a?256:a))>>5&15)<<11},"~N");c$.isColixLastAvailable=c(c$,"isColixLastAvailable",function(a){return 0<a&&2047==(a&2047)},"~N");c$.getArgb=c(c$,"getArgb",function(a){return JU.C.argbs[a&-30721]},"~N");c$.isColixColorInherited=c(c$,"isColixColorInherited",function(a){switch(a){case 0:case 1:return!0;default:return 1==(a&-30721)}},"~N");c$.getColixInherited=c(c$,"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");
c$.isColixTranslucent=c(c$,"isColixTranslucent",function(a){return 0!=(a&30720)},"~N");c$.getChangeableColixIndex=c(c$,"getChangeableColixIndex",function(a){return 0<=a?-1:a&2047},"~N");c$.getColixTranslucent3=c(c$,"getColixTranslucent3",function(a,b,c){a&=-30721;0==a&&(a=1);return b?a|JU.C.getTranslucentFlag(c):a},"~N,~B,~N");c$.copyColixTranslucency=c(c$,"copyColixTranslucency",function(a,b){return JU.C.getColixTranslucent3(b,JU.C.isColixTranslucent(a),JU.C.getColixTranslucencyLevel(a))},"~N,~N");
c$.getColixTranslucencyFractional=c(c$,"getColixTranslucencyFractional",function(a){a=JU.C.getColixTranslucencyLevel(a);return-1==a?0.5:0==a?0:255==a?1:a/256},"~N");c$.getColixTranslucencyLevel=c(c$,"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");c$.getColixS=c(c$,"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");c$.getColixArray=c(c$,"getColixArray",function(a){if(null==a||0==a.length)return null;a=JU.PT.getTokens(a);for(var b=T(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");c$.getHexCode=c(c$,"getHexCode",function(a){return JU.Escape.escapeColor(JU.C.getArgb(a))},"~N");c$.getHexCodes=c(c$,"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");c$.getColixTranslucent=c(c$,"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");c$.getBgContrast=c(c$,"getBgContrast",function(a){return 128>(JU.CU.toFFGGGfromRGB(a)&255)?8:4},"~N");C(c$,"INHERIT_ALL",0,"INHERIT_COLOR",1,"USE_PALETTE",2,"RAW_RGB",3,"SPECIAL_COLIX_MAX",4,"colixMax",4,"argbs",D(128,0),"argbsGreyscale",null);c$.colixHash=c$.prototype.colixHash=
new JU.Int2IntHash(256);C(c$,"RAW_RGB_INT",3,"UNMASK_CHANGEABLE_TRANSLUCENT",2047,"CHANGEABLE_MASK",32768,"LAST_AVAILABLE_COLIX",2047,"TRANSLUCENT_SHIFT",11,"ALPHA_SHIFT",13,"TRANSLUCENT_MASK",30720,"TRANSLUCENT_SCREENED",30720,"TRANSPARENT",16384,"OPAQUE_MASK",-30721,"BLACK",4,"ORANGE",5,"PINK",6,"BLUE",7,"WHITE",8,"CYAN",9,"RED",10,"GREEN",11,"GRAY",12,"SILVER",13,"LIME",14,"MAROON",15,"NAVY",16,"OLIVE",17,"PURPLE",18,"TEAL",19,"MAGENTA",20,"YELLOW",21,"HOTPINK",22,"GOLD",23);for(var a=[4278190080,
4294944E3,4294951115,4278190335,4294967295,4278255615,4294901760,4278222848,4286611584,4290822336,4278255360,4286578688,4278190208,4286611456,4286578816,4278222976,4294902015,4294967040,4294928820,4294956800],b=0;b<a.length;++b)JU.C.getColix(a[b])});n("JU");w(null,"JU.ColorEncoder","java.lang.Boolean $.Float java.util.Hashtable JU.AU $.CU $.Lst $.PT J.c.PAL JU.C $.Escape $.Logger JV.JC".split(" "),function(){c$=t(function(){this.argbsAmino=this.argbsShapely=this.argbsRwb=this.argbsRoygb=this.argbsCpk=
this.paletteFriendly=this.paletteWB=this.paletteBW=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;s(this,arguments)},JU,"ColorEncoder");K(c$,function(){this.userScale=[-8355712];this.thisScale=[-8355712]});u(c$,function(a){null==a?(this.schemes=new java.util.Hashtable,this.argbsCpk=J.c.PAL.argbsCpk,this.argbsRoygb=
JV.JC.argbsRoygbScale,this.argbsRwb=JV.JC.argbsRwbScale,this.argbsShapely=JV.JC.argbsShapely,this.argbsAmino=JV.JC.argbsAmino,this.ihalf=q(JV.JC.argbsRoygbScale.length/3),this.ce=this):(this.ce=a,this.schemes=a.schemes)},"JU.ColorEncoder");c$.getSchemeIndex=c(c$,"getSchemeIndex",function(a){for(var b=0;b<JU.ColorEncoder.colorSchemes.length;b++)if(JU.ColorEncoder.colorSchemes[b].equalsIgnoreCase(a))return 16<=b?b-16:13>b?b:-b;return-1},"~S");c$.fixName=c(c$,"fixName",function(a){if(a.equalsIgnoreCase("byelement"))return"byelement_jmol";
var b=JU.ColorEncoder.getSchemeIndex(a);return 0<=b?JU.ColorEncoder.colorSchemes[b]:a.toLowerCase()},"~S");c(c$,"makeColorScheme",function(a,b,d){a=JU.ColorEncoder.fixName(a);if(null==b){this.schemes.remove(a);a=this.createColorScheme(a,!1,d);if(d)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 5:this.argbsAmino=JV.JC.argbsAmino;break;case 4:this.argbsShapely=JV.JC.argbsShapely}return a}this.schemes.put(a,b);this.setThisScheme(a,b);a=this.createColorScheme(a,!1,d);if(d)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=q(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 4:this.argbsShapely=this.thisScale}return-1},"~S,~A,~B");c(c$,"createColorScheme",function(a,b,d){a=a.toLowerCase();if(a.equals("inherit"))return 15;var c=Math.max(a.indexOf("="),a.indexOf("["));if(0<=c){b=JU.PT.replaceAllCharacters(a.substring(0,c)," =","");0<b.length&&(d=!0);var g=0;a.length>c+1&&!a.contains("[")&&(a="["+a.substring(c+1).trim()+"]",a=JU.PT.rep(a.$replace("\n"," "),"  ",
" "),a=JU.PT.rep(a,", ",",").$replace(" ",","),a=JU.PT.rep(a,",","]["));for(c=-1;0<=(c=a.indexOf("[",c+1));)g++;if(0==g)return this.makeColorScheme(b,null,d);for(var f=D(g,0),g=0;0<=(c=a.indexOf("[",c+1));){var j=a.indexOf("]",c);0>j&&(j=a.length-1);var h=JU.CU.getArgbFromString(a.substring(c,j+1));0==h&&(h=JU.CU.getArgbFromString(a.substring(c+1,j).trim()));if(0==h)return JU.Logger.error("error in color value: "+a.substring(c,j+1)),0;f[g++]=h}return b.equals("user")?(this.setUserScale(f),-13):this.makeColorScheme(b,
f,d)}a=JU.ColorEncoder.fixName(a);d=JU.ColorEncoder.getSchemeIndex(a);return this.schemes.containsKey(a)?(this.setThisScheme(a,this.schemes.get(a)),d):-1!=d?d:b?0:2147483647},"~S,~B,~B");c(c$,"setUserScale",function(a){this.ce.userScale=a;this.makeColorScheme("user",a,!1)},"~A");c(c$,"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 b=JU.AU.arrayCopyRangeI(this.ce.argbsRoygb,this.ce.argbsRoygb.length-2*this.ce.ihalf,-1);a=D(this.ce.ihalf,0);for(var d=a.length,c=b.length;0<=--d&&0<=--c;)a[d]=b[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.argbsShapely;
case 5:return this.ce.argbsAmino;case -13:return this.ce.userScale;case -14:return JU.AU.arrayCopyRangeRevI(this.ce.userScale,0,-1);default:return null}},"~N");c(c$,"getColorIndexFromPalette",function(a,b,d,c,g){c=JU.C.getColix(this.getArgbFromPalette(a,b,d,c));g&&(a=(d-a)/(d-b),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(c$,"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.argbsCpk.length;case 3:return JU.ColorEncoder.getRasmolScale().length;case 4:return this.ce.argbsShapely.length;case 5:return this.ce.argbsAmino.length;case 12:return this.getPaletteAC().length;default:return 0}},"~N");c(c$,"getArgbFromPalette",function(a,b,d,c){if(Float.isNaN(a))return-8355712;var g=this.getPaletteColorCount(c);
switch(c){case -1:return this.isColorIndex&&(b=0,d=this.thisScale.length),this.thisScale[JU.ColorEncoder.quantize4(a,b,d,g)];case 10:return this.getPaletteBW()[JU.ColorEncoder.quantize4(a,b,d,g)];case 11:return this.getPaletteWB()[JU.ColorEncoder.quantize4(a,b,d,g)];case 0:return this.ce.argbsRoygb[JU.ColorEncoder.quantize4(a,b,d,g)];case 1:return this.ce.argbsRoygb[JU.ColorEncoder.quantize4(-a,-d,-b,g)];case 8:return this.ce.argbsRoygb[JU.ColorEncoder.quantize4(a,b,d,g)];case 9:return this.ce.argbsRoygb[this.ce.ihalf+
2*JU.ColorEncoder.quantize4(a,b,d,g)];case 6:return this.ce.argbsRwb[JU.ColorEncoder.quantize4(a,b,d,g)];case 7:return this.ce.argbsRwb[JU.ColorEncoder.quantize4(-a,-d,-b,g)];case -13:return 0==this.ce.userScale.length?-8355712:this.ce.userScale[JU.ColorEncoder.quantize4(a,b,d,g)];case -14:return 0==this.ce.userScale.length?-8355712:this.ce.userScale[JU.ColorEncoder.quantize4(-a,-d,-b,g)];case 2:return this.ce.argbsCpk[JU.ColorEncoder.colorIndex(a,g)];case 3:return JU.ColorEncoder.getRasmolScale()[JU.ColorEncoder.colorIndex(a,
g)];case 4:return this.ce.argbsShapely[JU.ColorEncoder.colorIndex(a,g)];case 5:return this.ce.argbsAmino[JU.ColorEncoder.colorIndex(a,g)];case 12:return this.getPaletteAC()[JU.ColorEncoder.colorIndexRepeat(a,g)];default:return-8355712}},"~N,~N,~N,~N");c(c$,"setThisScheme",function(a,b){this.thisName=a;this.thisScale=b;a.equals("user")&&(this.userScale=b);this.isColorIndex=0==a.indexOf("byelement")||0==a.indexOf("byresidue")},"~S,~A");c(c$,"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(c$,"getArgbMinMax",function(a,b,d){return this.isReversed?this.getArgbFromPalette(-a,-d,-b,this.currentPalette):this.getArgbFromPalette(a,b,d,this.currentPalette)},"~N,~N,~N");c(c$,"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(c$,"getColorKey",function(){for(var a=new java.util.Hashtable,b=this.getPaletteColorCount(this.currentPalette),d=new JU.Lst,c=L(b+1,0),g=(this.hi-this.lo)/b,f=g*(this.isReversed?-0.5:0.5),j=0;j<b;j++)c[j]=this.isReversed?this.hi-j*g:this.lo+j*g,d.addLast(JU.CU.colorPtFromInt(this.getArgb(c[j]+f),null));c[b]=this.isReversed?this.lo:this.hi;a.put("values",c);a.put("colors",d);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(c$,"getColorScheme",function(){return(this.isTranslucent?"translucent ":"")+(0>this.currentPalette?JU.ColorEncoder.getColorSchemeList(this.getColorSchemeArray(this.currentPalette)):this.getColorSchemeName(this.currentPalette))});c(c$,"setColorScheme",function(a,b){this.isTranslucent=b;null!=a&&(this.currentPalette=this.createColorScheme(a,!0,!1))},"~S,~B");c(c$,"setRange",function(a,b,d){3.4028235E38==b&&(a=1,b=this.getPaletteColorCount(this.currentPalette)+
1);this.lo=Math.min(a,b);this.hi=Math.max(a,b);this.isReversed=d},"~N,~N,~B");c(c$,"getCurrentColorSchemeName",function(){return this.getColorSchemeName(this.currentPalette)});c(c$,"getColorSchemeName",function(a){var b=Math.abs(a);return-1==a?this.thisName:b<JU.ColorEncoder.colorSchemes.length&&0<=b?JU.ColorEncoder.colorSchemes[b]:null},"~N");c$.getColorSchemeList=c(c$,"getColorSchemeList",function(a){if(null==a)return"";for(var b="",d=0;d<a.length;d++)b+=(0==d?"":" ")+JU.Escape.escapeColor(a[d]);
return b},"~A");c$.getRasmolScale=c(c$,"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,b=JU.ColorEncoder.rasmolScale.length;0<=--b;)JU.ColorEncoder.rasmolScale[b]=a;for(b=J.c.PAL.argbsCpkRasmol.length;0<=--b;)a=J.c.PAL.argbsCpkRasmol[b],JU.ColorEncoder.rasmolScale[a>>24]=a|4278190080;return JU.ColorEncoder.rasmolScale});c(c$,"getPaletteAC",function(){return null==
this.ce.paletteFriendly?this.ce.paletteFriendly=[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(c$,"getPaletteWB",function(){if(null!=this.ce.paletteWB)return this.ce.paletteWB;for(var a=D(JV.JC.argbsRoygbScale.length,0),b=0;b<a.length;b++){var d=1/a.length*(a.length-b);a[b]=JU.CU.colorTriadToFFRGB(d,d,d)}return this.ce.paletteWB=a});c$.getPaletteAtoB=
c(c$,"getPaletteAtoB",function(a,b,d){2>d&&(d=JV.JC.argbsRoygbScale.length);var c=D(d,0),g=L(3,0),f=L(3,0);JU.CU.toRGB3f(a,g);JU.CU.toRGB3f(b,f);a=(f[0]-g[0])/(d-1);b=(f[1]-g[1])/(d-1);for(var f=(f[2]-g[2])/(d-1),j=0;j<d;j++)c[j]=JU.CU.colorTriadToFFRGB(g[0]+a*j,g[1]+b*j,g[2]+f*j);return c},"~N,~N,~N");c(c$,"getPaletteBW",function(){if(null!=this.ce.paletteBW)return this.ce.paletteBW;for(var a=D(JV.JC.argbsRoygbScale.length,0),b=0;b<a.length;b++){var d=1/a.length*b;a[b]=JU.CU.colorTriadToFFRGB(d,
d,d)}return this.ce.paletteBW=a});c(c$,"quantize",function(a,b){var d=this.getPaletteColorCount(this.currentPalette);a=(z(a*d)+(b?0:1))/d;return 0>=a?this.lo:1<=a?this.hi:this.lo+(this.hi-this.lo)*a},"~N,~B");c$.quantize4=c(c$,"quantize4",function(a,b,d,c){d-=b;if(0>=d||Float.isNaN(a))return q(c/2);a-=b;if(0>=a)return 0;a=z(a/(d/c)+1E-4);a>=c&&(a=c-1);return a},"~N,~N,~N,~N");c$.colorIndex=c(c$,"colorIndex",function(a,b){return q(Math.floor(0>=a||a>=b?0:a))},"~N,~N");c$.colorIndexRepeat=c(c$,"colorIndexRepeat",
function(a,b){return q(Math.floor(0>=a?0:a))%b},"~N,~N");C(c$,"GRAY",4286611584,"BYELEMENT_PREFIX","byelement","BYRESIDUE_PREFIX","byresidue");c$.BYELEMENT_JMOL=c$.prototype.BYELEMENT_JMOL="byelement_jmol";c$.BYELEMENT_RASMOL=c$.prototype.BYELEMENT_RASMOL="byelement_rasmol";c$.BYRESIDUE_SHAPELY=c$.prototype.BYRESIDUE_SHAPELY="byresidue_shapely";c$.BYRESIDUE_AMINO=c$.prototype.BYRESIDUE_AMINO="byresidue_amino";C(c$,"CUSTOM",-1,"ROYGB",0,"BGYOR",1,"JMOL",2,"RASMOL",3,"SHAPELY",4,"AMINO",5,"RWB",6,"BWR",
7,"LOW",8,"HIGH",9,"BW",10,"WB",11,"FRIENDLY",12,"USER",-13,"RESU",-14,"INHERIT",15,"ALT",16);c$.colorSchemes=c$.prototype.colorSchemes="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".split(" ");C(c$,"rasmolScale",null)});n("JU");w(null,"JU.CommandHistory",["JU.Lst"],function(){c$=t(function(){this.commandList=null;this.maxSize=100;this.cursorPos=this.nextCommand=0;this.isOn=!0;s(this,arguments)},
JU,"CommandHistory");u(c$,function(){this.reset(100)});c(c$,"clear",function(){this.reset(this.maxSize)});c(c$,"reset",function(a){this.maxSize=a;this.commandList=new JU.Lst;this.nextCommand=0;this.commandList.addLast("");this.cursorPos=0},"~N");c(c$,"setMaxSize",function(a){if(a!=this.maxSize){for(2>a&&(a=2);this.nextCommand>a;)this.commandList.remove(0),this.nextCommand--;this.nextCommand>a&&(this.nextCommand=a-1);this.cursorPos=this.nextCommand;this.maxSize=a}},"~N");c(c$,"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(c$,"getCommandDown",function(){if(this.cursorPos>=this.nextCommand)return null;this.cursorPos++;return this.getCommand()});c(c$,"getCommand",function(){return this.commandList.get(this.cursorPos)});c(c$,"addCommand",function(a){if((this.isOn||a.endsWith("#??"))&&!a.endsWith("#----")){for(var b;0<=(b=a.indexOf("\n"));){var d=a.substring(0,
b);0<d.length&&this.addCommandLine(d);a=a.substring(b+1)}0<a.length&&this.addCommandLine(a)}},"~S");c(c$,"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 b="";a<this.nextCommand;a++)this.commandList.get(a).toUpperCase().startsWith("WRITE HISTORY")||
(b+=this.commandList.get(a)+"\n");return b},"~N");c(c$,"removeCommand",function(){return this.removeCommand(this.nextCommand-1)});c(c$,"removeCommand",function(a){if(0>a||a>=this.nextCommand)return"";a=this.commandList.remove(a);this.nextCommand--;return a},"~N");c(c$,"addCommandLine",function(a){if(!(null==a||0==a.length)&&!a.endsWith("#--"))this.nextCommand>=this.maxSize&&(this.commandList.remove(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(c$,"ERROR_FLAG","#??","NOHISTORYLINE_FLAG","#--","NOHISTORYATALL_FLAG","#----","DEFAULT_MAX_SIZE",100)});n("JU");w(["JU.LoggerInterface"],"JU.DefaultLogger",["JU.Logger"],function(){c$=B(JU,"DefaultLogger",null,JU.LoggerInterface);c(c$,"log",function(a,b,d,c){a===System.err&&System.out.flush();if(null!=a&&(null!=d||null!=c))if(a.println((JU.Logger.logLevel()?"["+JU.Logger.getLevel(b)+"] ":"")+(null!=d?d:"")+(null!=c?": "+c.toString():
"")),null!=c&&(b=c.getStackTrace(),null!=b))for(d=0;d<b.length;d++)a.println(b[d].getClassName()+" - "+b[d].getLineNumber()+" - "+b[d].getMethodName());a===System.err&&System.err.flush()},"java.io.PrintStream,~N,~S,Throwable");h(c$,"debug",function(a){this.log(System.out,5,a,null)},"~S");h(c$,"info",function(a){this.log(System.out,4,a,null)},"~S");h(c$,"warn",function(a){this.log(System.out,3,a,null)},"~S");h(c$,"warnEx",function(a,b){this.log(System.out,3,a,b)},"~S,Throwable");h(c$,"error",function(a){this.log(System.err,
2,a,null)},"~S");h(c$,"errorEx",function(a,b){this.log(System.err,2,a,b)},"~S,Throwable");h(c$,"fatal",function(a){this.log(System.err,1,a,null)},"~S");h(c$,"fatalEx",function(a,b){this.log(System.err,1,a,b)},"~S,Throwable")});n("JU");w(["JU.BS"],"JU.Elements",["java.lang.Character","java.util.Hashtable","JU.PT","JU.Logger"],function(){c$=B(JU,"Elements");c$.getAtomicMass=c(c$,"getAtomicMass",function(a){return 1>a||a>=JU.Elements.atomicMass.length?0:JU.Elements.atomicMass[a]},"~N");c$.elementNumberFromSymbol=
c(c$,"elementNumberFromSymbol",function(a,d){if(null==JU.Elements.htElementMap){for(var c=new java.util.Hashtable,g=JU.Elements.elementNumberMax;0<=--g;){var f=JU.Elements.elementSymbols[g],j=Integer.$valueOf(g);c.put(f,j);2==f.length&&c.put(f.toUpperCase(),j)}for(g=JU.Elements.altElementMax;4<=--g;)f=JU.Elements.altElementSymbols[g],j=Integer.$valueOf(JU.Elements.altElementNumbers[g]),c.put(f,j),2==f.length&&c.put(f.toUpperCase(),j);JU.Elements.htElementMap=c}if(null==a)return 0;c=JU.Elements.htElementMap.get(a);
if(null!=c)return c.intValue();if(Character.isDigit(a.charAt(0))&&(f=a.length-2,0<=f&&Character.isDigit(a.charAt(f))&&f++,c=0<f?JU.PT.parseInt(a.substring(0,f)):0,0<c&&(f=JU.Elements.elementNumberFromSymbol(a.substring(f),!0),0<f)))return c=JU.Elements.getAtomicAndIsotopeNumber(f,c),JU.Elements.htElementMap.put(a.toUpperCase(),Integer.$valueOf(c)),c;d||JU.Logger.error("'"+a+"' is not a recognized symbol");return 0},"~S,~B");c$.elementSymbolFromNumber=c(c$,"elementSymbolFromNumber",function(a){var d=
0;if(a>=JU.Elements.elementNumberMax){for(d=JU.Elements.altElementMax;0<=--d;)if(a==JU.Elements.altElementNumbers[d])return JU.Elements.altElementSymbols[d];d=JU.Elements.getIsotopeNumber(a);return""+d+JU.Elements.getElementSymbol(a%128)}return JU.Elements.getElementSymbol(a)},"~N");c$.getElementSymbol=c(c$,"getElementSymbol",function(a){if(0>a||a>=JU.Elements.elementNumberMax)a=0;return JU.Elements.elementSymbols[a]},"~N");c$.elementNameFromNumber=c(c$,"elementNameFromNumber",function(a){if(a>=JU.Elements.elementNumberMax){for(var d=
JU.Elements.altElementMax;0<=--d;)if(a==JU.Elements.altElementNumbers[d])return JU.Elements.altElementNames[d];a%=128}if(0>a||a>=JU.Elements.elementNumberMax)a=0;return JU.Elements.elementNames[a]},"~N");c$.elementNumberFromName=c(c$,"elementNumberFromName",function(a){for(var d=1;d<JU.Elements.elementNumberMax;d++)if(JU.Elements.elementNames[d].equalsIgnoreCase(a))return d;return-1},"~S");c$.altElementNameFromIndex=c(c$,"altElementNameFromIndex",function(a){return JU.Elements.altElementNames[a]},
"~N");c$.altElementNumberFromIndex=c(c$,"altElementNumberFromIndex",function(a){return JU.Elements.altElementNumbers[a]},"~N");c$.altElementSymbolFromIndex=c(c$,"altElementSymbolFromIndex",function(a){return JU.Elements.altElementSymbols[a]},"~N");c$.altIsotopeSymbolFromIndex=c(c$,"altIsotopeSymbolFromIndex",function(a){a=JU.Elements.altElementNumbers[a];return(a>>7)+JU.Elements.elementSymbolFromNumber(a&127)},"~N");c$.altIsotopeSymbolFromIndex2=c(c$,"altIsotopeSymbolFromIndex2",function(a){a=JU.Elements.altElementNumbers[a];
return JU.Elements.elementSymbolFromNumber(a&127)+(a>>7)},"~N");c$.getElementNumber=c(c$,"getElementNumber",function(a){return a&127},"~N");c$.getIsotopeNumber=c(c$,"getIsotopeNumber",function(a){return a>>7},"~N");c$.getAtomicAndIsotopeNumber=c(c$,"getAtomicAndIsotopeNumber",function(a,d){return(0>a?0:a)+(0>=d?0:d<<7)},"~N,~N");c$.altElementIndexFromNumber=c(c$,"altElementIndexFromNumber",function(a){for(var d=0;d<JU.Elements.altElementMax;d++)if(JU.Elements.altElementNumbers[d]==a)return d;return 0},
"~N");c$.getNaturalIsotope=c(c$,"getNaturalIsotope",function(a){for(var d=0;d<JU.Elements.naturalIsotopeMasses.length;d+=2)if(JU.Elements.naturalIsotopeMasses[d]==a)return JU.Elements.naturalIsotopeMasses[++d];return 0},"~N");c$.isNaturalIsotope=c(c$,"isNaturalIsotope",function(a){return 0<="1H,12C,14N,".indexOf(a+",")},"~S");c$.getBondingRadius=c(c$,"getBondingRadius",function(a,d){var c=a&127;return 0<d&&JU.Elements.bsCations.get(c)?JU.Elements.getBondingRadFromTable(c,d,JU.Elements.cationLookupTable):
0>d&&JU.Elements.bsAnions.get(c)?JU.Elements.getBondingRadFromTable(c,d,JU.Elements.anionLookupTable):JU.Elements.defaultBondingMars[(c<<1)+JU.Elements.bondingVersion]/1E3},"~N,~N");c$.getCovalentRadius=c(c$,"getCovalentRadius",function(a){return JU.Elements.defaultBondingMars[((a&127)<<1)+JU.Elements.covalentVersion]/1E3},"~N");c$.getBondingRadFromTable=c(c$,"getBondingRadFromTable",function(a,d,c){d=(a<<4)+(d+4);for(var g=0,f=0,j=0,h=q(c.length/2);j!=h;)if(f=q((j+h)/2),g=c[f<<1],g>d)h=f;else if(g<
d)j=f+1;else return c[(f<<1)+1]/1E3;g>d&&f--;g=c[f<<1];a!=g>>4&&f++;return c[(f<<1)+1]/1E3},"~N,~N,~A");c$.getVanderwaalsMar=c(c$,"getVanderwaalsMar",function(a,d){return JU.Elements.vanderwaalsMars[((a&127)<<2)+d.pt%4]},"~N,J.c.VDW");c$.getHydrophobicity=c(c$,"getHydrophobicity",function(a){return 1>a||a>=JU.Elements.hydrophobicities.length?0:JU.Elements.hydrophobicities[a]},"~N");c$.getAllredRochowElectroNeg=c(c$,"getAllredRochowElectroNeg",function(a){return 0<a&&a<JU.Elements.electroNegativities.length?
JU.Elements.electroNegativities[a]:0},"~N");c$.isElement=c(c$,"isElement",function(a,d){return(a&127)==d},"~N,~N");C(c$,"elementSymbols","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(" "),"atomicMass",[0,1.008,4.003,6.941,9.012,
10.81,12.011,14.007,15.999,18.998,20.18,22.99,24.305,26.981,28.086,30.974,32.07,35.453,39.948,39.1,40.08,44.956,47.88,50.941,52,54.938,55.847,58.93,58.69,63.55,65.39,69.72,72.61,74.92,78.96,79.9,83.8,85.47,87.62,88.91,91.22,92.91,95.94,98.91,101.07,102.91,106.42,107.87,112.41,114.82,118.71,121.75,127.6,126.91,131.29,132.91,137.33,138.91,140.12,140.91,144.24,144.9,150.36,151.96,157.25,158.93,162.5,164.93,167.26,168.93,173.04,174.97,178.49,180.95,183.85,186.21,190.2,192.22,195.08,196.97,200.59,204.38,
207.2,208.98,210,210,222,223,226.03,227.03,232.04,231.04,238.03,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]);c$.elementNumberMax=c$.prototype.elementNumberMax=JU.Elements.elementSymbols.length;C(c$,"htElementMap",null,"elementNames","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(" "),
"naturalIsotopeMasses",[1,1,6,12,7,14,8,16],"naturalIsotopes","1H,12C,14N,","firstIsotope",4,"altElementNumbers",[0,13,16,55,257,385,1414,1670,1798,1927]);c$.altElementMax=c$.prototype.altElementMax=JU.Elements.altElementNumbers.length;C(c$,"altElementSymbols","Xx Al S Cs D T 11C 13C 14C 15N".split(" "),"altElementNames","dummy aluminium sulphur caesium deuterium tritium    ".split(" "),"VdwPROBE","#VDW radii for PROBE;{_H}.vdw = 1.0;{_H and connected(_C) and not connected(within(smiles,'[a]'))}.vdw = 1.17;{_C}.vdw = 1.75;{_C and connected(3) and connected(_O)}.vdw = 1.65;{_N}.vdw = 1.55;{_O}.vdw = 1.4;{_P}.vdw = 1.8;{_S}.vdw = 1.8;message VDW radii for H, C, N, O, P, and S set according to Word, et al., J. Mol. Biol. (1999) 285, 1711-1733",
"vanderwaalsMars",[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],"RAD_COV_IONIC_OB1_100_1",0,"RAD_COV_BODR_2014_02_22",1,"covalentVersion",1,"bondingVersion",0,"defaultBondingMars",[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],"FORMAL_CHARGE_MIN",-4,"FORMAL_CHARGE_MAX",7,"cationLookupTable",[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],"anionLookupTable",[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]);c$.bsCations=c$.prototype.bsCations=new JU.BS;c$.bsAnions=c$.prototype.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);C(c$,"hydrophobicities",[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);C(c$,"electroNegativities",[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])});n("JU");w(null,"JU.Escape","java.lang.Float java.util.Map JU.A4 $.BS $.Lst $.M3 $.M34 $.M4 $.P3 $.P4 $.PT $.Quat $.SB $.T3 $.V3 JS.SV".split(" "),function(){c$=B(JU,"Escape");c$.escapeColor=c(c$,"escapeColor",function(a){return 0==a?null:"[x"+JU.Escape.getHexColorFromRGB(a)+"]"},"~N");c$.getHexColorFromRGB=c(c$,"getHexColorFromRGB",function(a){if(0==
a)return null;var b="00"+Integer.toHexString(a>>16&255),b=b.substring(b.length-2),d="00"+Integer.toHexString(a>>8&255),d=d.substring(d.length-2);a="00"+Integer.toHexString(a&255);a=a.substring(a.length-2);return b+d+a},"~N");c$.eP=c(c$,"eP",function(a){return null==a?"null":"{"+a.x+" "+a.y+" "+a.z+"}"},"JU.T3");c$.matrixToScript=c(c$,"matrixToScript",function(a){return JU.PT.replaceAllCharacters(a.toString(),"\n\r ","").$replace("\t"," ")},"~O");c$.eP4=c(c$,"eP4",function(a){return"{"+a.x+" "+a.y+
" "+a.z+" "+a.w+"}"},"JU.P4");c$.drawQuat=c(c$,"drawQuat",function(a,b,d,c,g){c=" VECTOR "+JU.Escape.eP(c)+" ";0==g&&(g=1);return"draw "+b+"x"+d+c+JU.Escape.eP(a.getVectorScaled(0,g))+" color red\ndraw "+b+"y"+d+c+JU.Escape.eP(a.getVectorScaled(1,g))+" color green\ndraw "+b+"z"+d+c+JU.Escape.eP(a.getVectorScaled(2,g))+" color blue\n"},"JU.Quat,~S,~S,JU.P3,~N");c$.e=c(c$,"e",function(a){if(null==a)return"null";if(JU.PT.isNonStringPrimitive(a))return a.toString();if(p(a,String))return JU.PT.esc(a);
if(p(a,JU.Lst))return JU.Escape.eV(a);if(p(a,java.util.Map))return JU.Escape.escapeMap(a);if(p(a,JU.BS))return JU.Escape.eBS(a);if(p(a,JU.T3))return JU.Escape.eP(a);if(p(a,JU.P4))return JU.Escape.eP4(a);if(JU.PT.isAS(a))return JU.Escape.eAS(a,!0);if(p(a,JU.M34))return JU.PT.rep(a.toString(),"\t",",\t");if(p(a,JU.A4))return"{"+a.x+" "+a.y+" "+a.z+" "+180*a.angle/3.141592653589793+"}";if(p(a,JU.Quat))return a.toString();var b=JU.PT.nonArrayString(a);return null==b?JU.PT.toJSON(null,a):b},"~O");c$.eV=
c(c$,"eV",function(a){if(null==a)return JU.PT.esc("");var b=new JU.SB;b.append("[");for(var d=0;d<a.size();d++)0<d&&b.append(", "),b.append(JU.Escape.escapeNice(a.get(d).asString()));b.append("]");return b.toString()},"JU.Lst");c$.escapeMap=c(c$,"escapeMap",function(a){var b=new JU.SB;b.append("{ ");var d="",c;for(a=a.entrySet().iterator();a.hasNext()&&((c=a.next())||1);){var g=c.getKey();b.append(d).append(JU.PT.esc(g)).appendC(":");d=c.getValue();p(d,JS.SV)||(d=JS.SV.getVariable(d));b.append(d.escape());
d=","}b.append(" }");return b.toString()},"java.util.Map");c$.escapeFloatA=c(c$,"escapeFloatA",function(a,b){if(b)return JU.PT.toJSON(null,a);for(var d=new JU.SB,c=0;c<a.length;c++)0<c&&d.appendC("\n"),d.appendF(a[c]);return d.toString()},"~A,~B");c$.escapeFloatAA=c(c$,"escapeFloatAA",function(a,b){for(var d=new JU.SB,c=b?";\n":"\n",g=0;g<a.length;g++)if(null!=a[g]){0<g&&d.append(c);for(var f=0;f<a[g].length;f++)d.appendF(a[g][f]).appendC("\t")}return d.toString()},"~A,~B");c$.escapeFloatAAA=c(c$,
"escapeFloatAAA",function(a,b){var d=new JU.SB,c=b?";\n":"\n";if(null==a[0]||null==a[0][0])return"0 0 0"+c;d.appendI(a.length).append(" ").appendI(a[0].length).append(" ").appendI(a[0][0].length);for(var g=0;g<a.length;g++)if(null!=a[g]){d.append(c);for(var f=0;f<a[g].length;f++)if(null!=a[g][f]){d.append(c);for(var j=0;j<a[g][f].length;j++)d.appendF(a[g][f][j]).appendC("\t")}}return d.toString()},"~A,~B");c$.eAS=c(c$,"eAS",function(a,b){if(null==a)return JU.PT.esc("");var d=new JU.SB;d.append("[");
for(var c=0;c<a.length;c++)0<c&&d.append(", "),d.append(b?JU.Escape.escapeNice(a[c]):JU.PT.esc(a[c]));d.append("]");return d.toString()},"~A,~B");c$.eAI=c(c$,"eAI",function(a){if(null==a)return JU.PT.esc("");var b=new JU.SB;b.append("[");for(var d=0;d<a.length;d++)0<d&&b.append(", "),b.appendI(a[d]);return b.append("]").toString()},"~A");c$.eAD=c(c$,"eAD",function(a){if(null==a)return JU.PT.esc("");var b=new JU.SB;b.append("[");for(var d=0;d<a.length;d++)0<d&&b.append(", "),b.appendD(a[d]);return b.append("]").toString()},
"~A");c$.eAF=c(c$,"eAF",function(a){if(null==a)return JU.PT.esc("");var b=new JU.SB;b.append("[");for(var d=0;d<a.length;d++)0<d&&b.append(", "),b.appendF(a[d]);return b.append("]").toString()},"~A");c$.eAP=c(c$,"eAP",function(a){if(null==a)return JU.PT.esc("");var b=new JU.SB;b.append("[");for(var d=0;d<a.length;d++)0<d&&b.append(", "),b.append(JU.Escape.eP(a[d]));return b.append("]").toString()},"~A");c$.escapeNice=c(c$,"escapeNice",function(a){if(null==a)return"null";var b=JU.PT.parseFloatStrict(a);
return Float.isNaN(b)?JU.PT.esc(a):a},"~S");c$.uABsM=c(c$,"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");c$.isStringArray=c(c$,"isStringArray",function(a){return a.startsWith("({")&&0==a.lastIndexOf("({")&&a.indexOf("})")==a.length-2},"~S");c$.uP=c(c$,"uP",function(a){if(null==
a||0==a.length)return a;var b=a.$replace("\n"," ").trim();if("{"!=b.charAt(0)||"}"!=b.charAt(b.length-1))return a;for(var d=L(5,0),c=0,b=b.substring(1,b.length-1),g=D(1,0);5>c;c++)if(d[c]=JU.PT.parseFloatNext(b,g),Float.isNaN(d[c])){if(g[0]>=b.length||","!=b.charAt(g[0]))break;g[0]++;c--}return 3==c?JU.P3.new3(d[0],d[1],d[2]):4==c?JU.P4.new4(d[0],d[1],d[2],d[3]):a},"~S");c$.unescapeMatrix=c(c$,"unescapeMatrix",function(a){if(null==a||0==a.length)return a;var b=a.$replace("\n"," ").trim();if(0!=b.lastIndexOf("[[")||
b.indexOf("]]")!=b.length-2)return a;for(var d=L(16,0),b=b.substring(2,b.length-2).$replace("["," ").$replace("]"," ").$replace(","," "),c=D(1,0),g=0;16>g&&!(d[g]=JU.PT.parseFloatNext(b,c),Float.isNaN(d[g]));g++);return!Float.isNaN(JU.PT.parseFloatNext(b,c))?a:9==g?JU.M3.newA9(d):16==g?JU.M4.newA16(d):a},"~S");c$.eBS=c(c$,"eBS",function(a){return JU.BS.escape(a,"(",")")},"JU.BS");c$.eBond=c(c$,"eBond",function(a){return JU.BS.escape(a,"[","]")},"JU.BS");c$.toReadable=c(c$,"toReadable",function(a,
b){var d=new JU.SB,c="";if(null==b)return"null";if(JU.PT.isNonStringPrimitive(b))return JU.Escape.packageReadable(a,null,b.toString());if(p(b,String))return JU.Escape.packageReadable(a,null,JU.PT.esc(b));if(p(b,JS.SV))return JU.Escape.packageReadable(a,null,b.escape());if(JU.PT.isAS(b)){d.append("[");for(var g=b.length,f=0;f<g;f++)d.append(c).append(JU.PT.esc(b[f])),c=",";d.append("]");return JU.Escape.packageReadableSb(a,"String["+g+"]",d)}if(JU.PT.isAI(b)){d.append("[");g=b.length;for(f=0;f<g;f++)d.append(c).appendI(b[f]),
c=",";d.append("]");return JU.Escape.packageReadableSb(a,"int["+g+"]",d)}if(JU.PT.isAF(b)){d.append("[");g=b.length;for(f=0;f<g;f++)d.append(c).appendF(b[f]),c=",";d.append("]");return JU.Escape.packageReadableSb(a,"float["+g+"]",d)}if(JU.PT.isAD(b)){d.append("[");g=b.length;for(f=0;f<g;f++)d.append(c).appendD(b[f]),c=",";d.append("]");return JU.Escape.packageReadableSb(a,"double["+g+"]",d)}if(JU.PT.isAP(b)){d.append("[");g=b.length;for(f=0;f<g;f++)d.append(c).append(JU.Escape.eP(b[f])),c=",";d.append("]");
return JU.Escape.packageReadableSb(a,"point3f["+g+"]",d)}if(JU.PT.isASS(b)){d.append("[");g=b.length;for(f=0;f<g;f++)d.append(c).append(JU.Escape.toReadable(null,b[f])),c=",\n";d.append("]");return JU.Escape.packageReadableSb(a,"String["+g+"][]",d)}if(JU.PT.isAII(b)){d.append("[");g=b.length;for(f=0;f<g;f++)d.append(c).append(JU.Escape.toReadable(null,b[f])),c=",";d.append("]");return JU.Escape.packageReadableSb(a,"int["+g+"][]",d)}if(JU.PT.isAFF(b)){d.append("[\n");g=b.length;for(f=0;f<g;f++)d.append(c).append(JU.Escape.toReadable(null,
b[f])),c=",\n";d.append("]");return JU.Escape.packageReadableSb(a,"float[][]",d)}if(JU.PT.isADD(b)){d.append("[\n");g=b.length;for(f=0;f<g;f++)d.append(c).append(JU.Escape.toReadable(null,b[f])),c=",\n";d.append("]");return JU.Escape.packageReadableSb(a,"double[][]",d)}if(p(b,JU.Lst)){g=b.size();for(f=0;f<g;f++)d.append(JU.Escape.toReadable(a+"["+(f+1)+"]",b.get(f)));return JU.Escape.packageReadableSb(a,"List["+g+"]",d)}if(p(b,JU.M34)||p(b,JU.T3)||p(b,JU.P4)||p(b,JU.A4))return d.append(JU.Escape.e(b)),
JU.Escape.packageReadableSb(a,null,d);if(p(b,java.util.Map)){for(c=b.keySet().iterator();c.hasNext();)g=c.next(),d.append(JU.Escape.toReadable((null==a?"":a+".")+g,b.get(g)));return d.toString()}return JU.Escape.packageReadable(a,null,JU.PT.toJSON(null,b))},"~S,~O");c$.packageReadableSb=c(c$,"packageReadableSb",function(a,b,d){return JU.Escape.packageReadable(a,b,d.toString())},"~S,~S,JU.SB");c$.packageReadable=c(c$,"packageReadable",function(a,b,d){return null==a?(null==b?"":b+"\t")+d:"\n"+a+"\t"+
(null==b?"":"*"+b+"\t")+d},"~S,~S,~S");c$.escapeModelFileNumber=c(c$,"escapeModelFileNumber",function(a){return""+q(a/1E6)+"."+a%1E6},"~N");c$.encapsulateData=c(c$,"encapsulateData",function(a,b,d){return'  DATA "'+a+'"\n'+(2==d?JU.Escape.escapeFloatAA(b,!0)+";\n":3==d?JU.Escape.escapeFloatAAA(b,!0)+";\n":b)+'    END "'+a+'";\n'},"~S,~O,~N");c$.unescapeUnicode=c(c$,"unescapeUnicode",function(a){for(var b=a.length,d=JU.SB.newN(b),c=0;c<b;){var g=a.charAt(c++);if("\\"==g&&c<b)switch(g=a.charAt(c++),
g){case "u":if(c<b){for(var g=0,f=4;0<=--f&&c<b;){var j=a.charAt(c),j=JU.Escape.getHexitValue(j);if(0>j)break;g<<=4;g+=j;++c}g=String.fromCharCode(g)}}d.appendC(g)}return d.toString()},"~S");c$.getHexitValue=c(c$,"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");c$.unescapeStringArray=c(c$,"unescapeStringArray",function(a){if(null==
a||!a.startsWith("[")||!a.endsWith("]"))return null;var b=new JU.Lst,d=D(1,0);for(d[0]=1;d[0]<a.length;){var c=JU.PT.getQuotedStringNext(a,d);if(null==c)return null;for(b.addLast(JU.PT.rep(c,'\\"','"'));d[0]<a.length&&'"'!=a.charAt(d[0]);)d[0]++}return b.toArray(Array(b.size()))},"~S");c$.isAV=c(c$,"isAV",function(a){return p(a[0],JS.SV)},"~O");c$.escapeHelical=c(c$,"escapeHelical",function(a,b,d,c,g){switch(b){case 135266320:return null==g?new JU.P3:g[0];case 1073741854:case 1666189314:return null==
g?new JU.V3:g[1073741854==b?1:2];case 135266305:return Float.$valueOf(null==g?NaN:g[3].x);case 135176:return null==g?"":'draw ID "'+a+'" VECTOR '+JU.Escape.eP(g[0])+" "+JU.Escape.eP(g[1])+" color "+(0>g[3].x?"{255.0 200.0 0.0}":"{255.0 0.0 128.0}");case 1746538509:return(null==g?"":"measure "+JU.Escape.eP(d)+JU.Escape.eP(g[0])+JU.Escape.eP(g[4]))+JU.Escape.eP(c);default:return null==g?[]:g}},"~S,~N,JU.P3,JU.P3,~A")});n("JU");w(["J.api.JmolGraphicsInterface"],"JU.GData","javajs.awt.Font JU.AU $.P3 $.V3 JU.C $.Shader".split(" "),
function(){c$=t(function(){this.apiPlatform=null;this.translucentCoverOnly=!1;this.displayMaxY=this.displayMinY=this.displayMaxX=this.displayMinX=this.windowHeight=this.windowWidth=0;this.inGreyscaleMode=this.antialiasEnabled=this.antialiasThisFrame=!1;this.backgroundImage=this.changeableColixMap=null;this.newWindowHeight=this.newWindowWidth=0;this.newAntialiasing=!1;this.zDepth=this.zSlab=this.height=this.width=this.depth=this.slab=this.yLast=this.xLast=this.bgcolor=0;this.zShadePower=3;this.bufferSize=
this.argbCurrent=this.colixCurrent=0;this.shader=null;this.zShadeB=this.zShadeG=this.zShadeR=0;this.graphicsForMetrics=null;this.$isPass2=!1;this.ambientOcclusion=0;s(this,arguments)},JU,"GData",null,J.api.JmolGraphicsInterface);K(c$,function(){this.changeableColixMap=T(16,0)});c(c$,"setTranslucentCoverOnly",function(a){this.translucentCoverOnly=a},"~B");c(c$,"getTranslucentCoverOnly",function(){return this.translucentCoverOnly});u(c$,function(){this.shader=new JU.Shader});c(c$,"initialize",function(a){this.apiPlatform=
a},"javajs.api.GenericPlatform");h(c$,"setDepth",function(a){this.depth=0>a?0:a},"~N");h(c$,"setSlab",function(a){this.slab=0>a?0:a},"~N");c(c$,"setZShade",function(a,b,d,c){a&&this.setZShade2(b,d,c)},"~B,~N,~N,~N");c(c$,"setZShade2",function(a,b,d){this.zShadeR=this.bgcolor&255;this.zShadeG=(this.bgcolor&65280)>>8;this.zShadeB=(this.bgcolor&16711680)>>16;this.zSlab=0>a?0:a;this.zDepth=0>b?0:b;this.zShadePower=d},"~N,~N,~N");h(c$,"setAmbientOcclusion",function(a){this.ambientOcclusion=a},"~N");h(c$,
"getRenderWidth",function(){return this.width});h(c$,"getRenderHeight",function(){return this.height});h(c$,"getSlab",function(){return this.slab});h(c$,"getDepth",function(){return this.depth});c(c$,"isDisplayAntialiased",function(){return this.antialiasEnabled});h(c$,"isAntialiased",function(){return this.antialiasThisFrame});c(c$,"getChangeableColix",function(a,b){a>=this.changeableColixMap.length&&(this.changeableColixMap=JU.AU.arrayCopyShort(this.changeableColixMap,a+16));0==this.changeableColixMap[a]&&
(this.changeableColixMap[a]=JU.C.getColix(b));return a|-32768},"~N,~N");c(c$,"changeColixArgb",function(a,b){a<this.changeableColixMap.length&&0!=this.changeableColixMap[a]&&(this.changeableColixMap[a]=JU.C.getColix(b))},"~N,~N");c(c$,"getBgColixes",function(a){return a},"~A");h(c$,"getColorArgbOrGray",function(a){0>a&&(a=this.changeableColixMap[a&2047]);return this.inGreyscaleMode?JU.C.getArgbGreyscale(a):JU.C.getArgb(a)},"~N");c(c$,"getShades",function(a){0>a&&(a=this.changeableColixMap[a&2047]);
return this.inGreyscaleMode?this.shader.getShadesG(a):this.shader.getShades(a)},"~N");c(c$,"setGreyscaleMode",function(a){this.inGreyscaleMode=a},"~B");c(c$,"getSpecularPower",function(){return this.shader.specularPower});c(c$,"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(c$,"getSpecularPercent",function(){return this.shader.specularPercent});c(c$,"setSpecularPercent",
function(a){this.shader.specularPercent!=a&&(this.shader.specularPercent=a,this.shader.specularFactor=a/100,this.shader.flushCaches())},"~N");c(c$,"getSpecularExponent",function(){return this.shader.specularExponent});c(c$,"setSpecularExponent",function(a){this.shader.specularExponent!=a&&(this.shader.specularExponent=a,this.shader.phongExponent=q(Math.pow(2,a)),this.shader.usePhongExponent=!1,this.shader.flushCaches())},"~N");c(c$,"getPhongExponent",function(){return this.shader.phongExponent});
c(c$,"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!=z(a),this.shader.usePhongExponent||(this.shader.specularExponent=z(a)),this.shader.flushCaches())},"~N");c(c$,"getDiffusePercent",function(){return this.shader.diffusePercent});c(c$,"setDiffusePercent",function(a){this.shader.diffusePercent!=a&&(this.shader.diffusePercent=a,this.shader.diffuseFactor=a/100,this.shader.flushCaches())},
"~N");c(c$,"getAmbientPercent",function(){return this.shader.ambientPercent});c(c$,"setAmbientPercent",function(a){this.shader.ambientPercent!=a&&(this.shader.ambientPercent=a,this.shader.ambientFraction=a/100,this.shader.flushCaches())},"~N");c(c$,"getSpecular",function(){return this.shader.specularOn});c(c$,"setSpecular",function(a){this.shader.specularOn!=a&&(this.shader.specularOn=a,this.shader.flushCaches())},"~B");c(c$,"setCel",function(a){this.shader.setCel(a,this.shader.celPower,this.bgcolor)},
"~B");c(c$,"getCel",function(){return this.shader.celOn});c(c$,"getCelPower",function(){return this.shader.celPower});c(c$,"setCelPower",function(a){this.shader.setCel(this.shader.celOn||0==this.shader.celPower,a,this.bgcolor)},"~N");c(c$,"getLightSource",function(){return this.shader.lightSource});c(c$,"isClipped3",function(a,b,d){return 0>a||a>=this.width||0>b||b>=this.height||d<this.slab||d>this.depth},"~N,~N,~N");c(c$,"isClipped",function(a,b){return 0>a||a>=this.width||0>b||b>=this.height},"~N,~N");
h(c$,"isInDisplayRange",function(a,b){return a>=this.displayMinX&&a<this.displayMaxX&&b>=this.displayMinY&&b<this.displayMaxY},"~N,~N");h(c$,"isClippedXY",function(a,b,d){a=a+1>>1;return b<-a||b>=this.width+a||d<-a||d>=this.height+a},"~N,~N,~N");h(c$,"isClippedZ",function(a){return-2147483648!=a&&(a<this.slab||a>this.depth)},"~N");c(c$,"clipCode3",function(a,b,d){var c=0;0>a?c|=8:a>=this.width&&(c|=4);0>b?c|=2:b>=this.height&&(c|=1);d<this.slab?c|=32:d>this.depth&&(c|=16);return c},"~N,~N,~N");c(c$,
"clipCode",function(a){var b=0;a<this.slab?b|=32:a>this.depth&&(b|=16);return b},"~N");c(c$,"getFont3D",function(a){return javajs.awt.Font.createFont3D(0,0,a,a,this.apiPlatform,this.graphicsForMetrics)},"~N");c(c$,"getFont3DFS",function(a,b){return javajs.awt.Font.createFont3D(javajs.awt.Font.getFontFaceID(a),0,b,b,this.apiPlatform,this.graphicsForMetrics)},"~S,~N");c(c$,"getFontFidFS",function(a,b){return this.getFont3DFSS(a,"Bold",b).fid},"~S,~N");c(c$,"getFont3DFSS",function(a,b,d){b=javajs.awt.Font.getFontStyleID(b);
0>b&&(b=0);return javajs.awt.Font.createFont3D(javajs.awt.Font.getFontFaceID(a),b,d,d,this.apiPlatform,this.graphicsForMetrics)},"~S,~S,~N");h(c$,"getFont3DScaled",function(a,b){var d=a.fontSizeNominal*b;return d==a.fontSize?a:javajs.awt.Font.createFont3D(a.idFontFace,a.idFontStyle,d,a.fontSizeNominal,this.apiPlatform,this.graphicsForMetrics)},"javajs.awt.Font,~N");h(c$,"getFontFid",function(a){return this.getFont3D(a).fid},"~N");c$.getFontStyleID=c(c$,"getFontStyleID",function(a){return javajs.awt.Font.getFontStyleID(a)},
"~S");c(c$,"setBackgroundTransparent",function(){},"~B");c(c$,"setBackgroundArgb",function(a){this.bgcolor=a;this.setCel(this.shader.celOn)},"~N");c(c$,"setBackgroundImage",function(a){this.backgroundImage=a},"~O");c(c$,"setWindowParameters",function(a,b,d){this.setWinParams(a,b,d)},"~N,~N,~B");c(c$,"setWinParams",function(a,b,d){this.newWindowWidth=a;this.newWindowHeight=b;this.newAntialiasing=d},"~N,~N,~B");c(c$,"setNewWindowParametersForExport",function(){this.windowWidth=this.newWindowWidth;this.windowHeight=
this.newWindowHeight;this.setWidthHeight(!1)});c(c$,"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.bufferSize=this.width*this.height},"~B");c(c$,"beginRendering",function(){},"JU.M3,~B,~B,~B");c(c$,"endRendering",
function(){});c(c$,"snapshotAnaglyphChannelBytes",function(){});c(c$,"getScreenImage",function(){return null},"~B");c(c$,"releaseScreenImage",function(){});c(c$,"applyAnaglygh",function(){},"J.c.STER,~A");c(c$,"setPass2",function(){return!1},"~B");c(c$,"destroy",function(){});c(c$,"clearFontCache",function(){});c(c$,"plotImage",function(){},"~N,~N,~N,~O,J.api.JmolRendererInterface,~N,~N,~N");c(c$,"plotText",function(){},"~N,~N,~N,~N,~N,~S,javajs.awt.Font,J.api.JmolRendererInterface");c(c$,"renderBackground",
function(){},"J.api.JmolRendererInterface");c(c$,"getFont3DCurrent",function(){return null});c(c$,"setFont",function(){},"javajs.awt.Font");c(c$,"setFontFid",function(){},"~N");c(c$,"setColor",function(a){this.argbCurrent=a},"~N");c(c$,"isPass2",function(){return this.$isPass2});c(c$,"setC",function(){return!0},"~N");c(c$,"isDirectedTowardsCamera",function(){return!0},"~N");c(c$,"getTransformedVertexVectors",function(){return null});c(c$,"setNoisySurfaceShade",function(){},"JU.P3i,JU.P3i,JU.P3i");
c$.roundInt=c(c$,"roundInt",function(a){return a},"~N");c(c$,"clear",function(){});h(c$,"renderAllStrings",function(){},"~O");c$.getScreenOctant=c(c$,"getScreenOctant",function(a){var b=0;0>a.x&&(b|=1);0>a.y&&(b|=2);0>a.z&&(b|=4);return b},"JU.P3");c(c$,"addRenderer",function(){},"~N");c$.getHermiteList=c(c$,"getHermiteList",function(a,b,d,c,g,f,j,h,l,m){var r=l+1;l-=1;var x=d.x,n=d.y,q=d.z,p=c.x,s=c.y;c=c.z;var t=(p-b.x)*a/8,u=(s-b.y)*a/8;b=(c-b.z)*a/8;var v=(g.x-x)*a/8,w=(g.y-n)*a/8,y=(g.z-q)*a/
8,z=(f.x-p)*a/8,B=(f.y-s)*a/8;a=(f.z-c)*a/8;j[h]=d;for(d=0;d<r;d++){var C=d/l;d==r-1&&(x=p,n=s,q=c,p=g.x,s=g.y,c=g.z,t=v,u=w,b=y,v=z,w=B,y=a,C-=1);var D=C*C,E=D*C;f=2*E-3*D+1;var F=-2*E+3*D,C=E-2*D+C,G=E-D,D=f*x+F*p+C*t+G*v,E=f*n+F*s+C*u+G*w;f=f*q+F*c+C*b+G*y;j[h+d]=m?JU.P3.new3(D,E,f):JU.V3.new3(D,E,f)}},"~N,JU.T3,JU.T3,JU.T3,JU.T3,JU.T3,~A,~N,~N,~B");C(c$,"ENDCAPS_NONE",0,"ENDCAPS_OPEN",1,"ENDCAPS_FLAT",2,"ENDCAPS_SPHERICAL",3,"ENDCAPS_OPENEND",4,"EXPORT_RAYTRACER",2,"EXPORT_CARTESIAN",1,"EXPORT_NOT",
0,"yGT",1,"yLT",2,"xGT",4,"xLT",8,"zGT",16,"zLT",32)});n("JU");w(["J.api.JmolAppletInterface","$.JmolStatusListener","java.util.Hashtable"],"JU.GenericApplet","java.lang.Boolean java.net.URL javajs.awt.Dimension JU.Lst $.PT $.SB J.c.CBK J.i18n.GT JU.Logger JV.JC $.Viewer".split(" "),function(){c$=t(function(){this.isJS=!1;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=this.isJNLP=!1;this.outputBuffer=this.syncId=null;s(this,arguments)},JU,"GenericApplet",null,[J.api.JmolAppletInterface,J.api.JmolStatusListener]);K(c$,function(){this.b$=new java.util.Hashtable});c(c$,"init",function(a){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").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(c$,"initApplication",function(){this.vwrOptions.put("applet",
Boolean.TRUE);null==this.getJmolParameter("statusListener")&&this.vwrOptions.put("statusListener",this);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 b,a=0,d=J.c.CBK.values();a<d.length&&((b=
d[a])||1);a++)this.setValue(b.name()+"Callback",null);this.loading=!1;this.language=this.getJmolParameter("language");new J.i18n.GT(this.viewer,this.language);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);b=this.getJmolParameter("menuFile");null!=b&&this.viewer.setMenu(b,!0);b=this.getValue("script","");a=this.getValue("loadInline",null);if(null==a){if(null!=(a=this.getValue("load",null)))b='load "'+a+'";'+b;a=null}this.viewer.popHoldRepaint("applet init");null!=a&&null!=this.viewer.loadInline(a)&&(b="");0<b.length&&this.scriptProcessor(b,null,2);
this.viewer.notifyStatusReady(!0)});h(c$,"destroy",function(){this.gRight=null;this.viewer.notifyStatusReady(!1);this.viewer=null;JU.GenericApplet.checkOut(this.fullName)});c(c$,"getBooleanValue",function(a,b){var d=this.getValue(a,b?"true":"");return d.equalsIgnoreCase("true")||d.equalsIgnoreCase("on")||d.equalsIgnoreCase("yes")},"~S,~B");c(c$,"getValue",function(a,b){var d=this.getJmolParameter(a);System.out.println("Jmol getValue "+a+" "+d);return null==d?b:d},"~S,~S");c(c$,"getValueLowerCase",
function(a,b){var d=this.getValue(a,b);null!=d&&(d=d.trim().toLowerCase(),0==d.length&&(d=null));return d},"~S,~S");c(c$,"setValue",function(a,b){this.setStringProperty(a,this.getValue(a,b))},"~S,~S");c(c$,"setStringProperty",function(a,b){null!=b&&(JU.Logger.info(a+' = "'+b+'"'),this.viewer.setStringProperty(a,b))},"~S,~S");c(c$,"scriptProcessor",function(a,b,d){if(null==a||0==a.length)return"";switch(d){case 0:return a=this.viewer.scriptCheck(a),p(a,String)?a:"";case 1:return null!=b?this.viewer.scriptWaitStatus(a,
b).toString():this.viewer.scriptWait(a);default:return this.viewer.script(a)}},"~S,~S,~N");h(c$,"register",function(a,b){JU.GenericApplet.checkIn(a,b)},"~S,J.api.JmolSyncInterface");h(c$,"getJSpecViewProperty",function(){return null},"~S");c(c$,"syncScript",function(a){this.viewer.syncScript(a,"~",0)},"~S");h(c$,"handleEvent",function(a){return null==this.viewer?!1:this.viewer.processMouseEvent(a.id,a.x,a.y,a.modifiers,a.when)},"java.awt.Event");h(c$,"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"),
[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)});h(c$,"script",function(a){this.scriptNoWait(a)},"~S");h(c$,"scriptCheck",function(a){return null==a||0==a.length?"":this.scriptProcessor(a,null,0)},"~S");h(c$,"scriptNoWait",function(a){return null==a||0==a.length?"":this.scriptProcessor(a,null,2)},"~S");c(c$,"scriptWait",function(a){return this.scriptWait(a,
null)},"~S");c(c$,"scriptWait",function(a,b){if(null==a||0==a.length)return"";this.outputBuffer=null;return this.scriptProcessor(a,b,1)},"~S,~S");h(c$,"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");h(c$,"getModelIndexFromId",function(a){return this.viewer.getModelIndexFromId(a)},"~S");h(c$,"getProperty",function(a,b){b||(b=
"");return this.viewer.getProperty(null,a,b)},"~S,~S");h(c$,"getPropertyAsString",function(a,b){b||(b="");return this.viewer.getProperty("readable",a,b).toString()},"~S,~S");h(c$,"getPropertyAsJSON",function(a,b){b||(b="");return this.viewer.getProperty("JSON",a,b).toString()},"~S,~S");h(c$,"loadInlineString",function(a,b,d){a=this.viewer.loadInlineAppend(a,d);null==a&&this.script(b);return a},"~S,~S,~B");h(c$,"loadInlineArray",function(a,b,d){if(null==a||0==a.length)return null;a=this.viewer.loadInline(a,
d);null==a&&this.script(b);return a},"~A,~S,~B");h(c$,"loadDOMNode",function(a){return this.viewer.openDOM(a)},"~O");c(c$,"loadInline",function(a){return this.loadInlineString(a,"",!1)},"~S");c(c$,"loadInline",function(a,b){return this.loadInlineString(a,b,!1)},"~S,~S");c(c$,"loadInline",function(a){return this.loadInlineArray(a,"",!1)},"~A");c(c$,"loadInline",function(a,b){return this.loadInlineArray(a,b,!1)},"~A,~S");c(c$,"output",function(a){null!=this.outputBuffer&&null!=a&&this.outputBuffer.append(a).appendC("\n")},
"~S");h(c$,"setCallbackFunction",function(a,b){if(!a.equalsIgnoreCase("modelkit"))if(a.equalsIgnoreCase("language"))this.consoleMessage(""),this.consoleMessage(null);else{var d=J.c.CBK.getCallback(a);null!=d&&(this.loading||d!==J.c.CBK.EVAL)?null==b?this.b$.remove(d):this.b$.put(d,b):this.consoleMessage("Available callbacks include: "+J.c.CBK.getNameList().$replace(";"," ").trim())}},"~S,~S");c(c$,"consoleMessage",function(a){this.notifyCallback(J.c.CBK.ECHO,["",a])},"~S");h(c$,"notifyEnabled",function(a){switch(a){case J.c.CBK.ECHO:case J.c.CBK.MESSAGE:case J.c.CBK.MEASURE:case J.c.CBK.PICK:case J.c.CBK.SYNC:return!0;
case J.c.CBK.ANIMFRAME:case J.c.CBK.DRAGDROP:case J.c.CBK.ERROR:case J.c.CBK.EVAL:case J.c.CBK.LOADSTRUCT:case J.c.CBK.SCRIPT:return!this.isJNLP}return null!=this.b$.get(a)},"J.c.CBK");c(c$,"notifyCallback",function(a,b){var d=this.b$.get(a),c=null!=d&&(null==b||null==b[0]),g=!1;null!=b&&(b[0]=this.htmlName);var f=null==b||null==b[1]?null:b[1].toString();switch(a){case J.c.CBK.APPLETREADY:b[3]=this.appletObject;break;case J.c.CBK.CLICK:"alert".equals(d)&&(f="x="+b[1]+" y="+b[2]+" action="+b[3]+" clickCount="+
b[4]);break;case J.c.CBK.ANIMFRAME:var j=b[1],h=j[0],l=j[1],m=j[2],r=j[3],j=j[4],x=-2>=h,n=0>r?-1:1,q=0>j?-1:1;c&&(b=[this.htmlName,Integer.$valueOf(Math.max(h,-2-h)),Integer.$valueOf(l),Integer.$valueOf(m),Integer.$valueOf(Math.abs(r)),Integer.$valueOf(Math.abs(j)),Integer.$valueOf(x?1:0),Integer.$valueOf(n),Integer.$valueOf(q),b[2],b[3]]);break;case J.c.CBK.ECHO:l=(h=2==b.length)||1==b[2].intValue();c||(l&&(g=!0),c=!h&&null!=(d=this.b$.get(a=J.c.CBK.MESSAGE)));g||this.output(f);break;case J.c.CBK.LOADSTRUCT:h=
b[4];if(null!=h){h=(0<=h.indexOf("NOTE:")?"":J.i18n.GT._("File Error:"))+h;this.doShowStatus(h);this.notifyCallback(J.c.CBK.MESSAGE,["",h]);return}break;case J.c.CBK.MEASURE:c||(c=null!=(d=this.b$.get(a=J.c.CBK.MESSAGE)));h=b[3];0<=h.indexOf("Picked")||0<=h.indexOf("Sequence")?(this.doShowStatus(f),g=!0):0<=h.indexOf("Completed")&&(f=h+": "+f,g=!0);break;case J.c.CBK.MESSAGE:g=!c;c=(new Boolean(c&null!=f)).valueOf();g||this.output(f);break;case J.c.CBK.PICK:this.doShowStatus(f);g=!0;break;case J.c.CBK.SCRIPT:!(0<
b[3].intValue())&&!c&&(c=null!=(d=this.b$.get(a=J.c.CBK.MESSAGE)));this.output(f);this.doShowStatus(f);break;case J.c.CBK.SYNC:this.sendScript(f,b[2],!0,c);return}g&&(g=this.viewer.getProperty("DATA_API","getAppConsole",null),null!=g&&(g.notifyCallback(a,b),this.output(f),this.doSendJsTextareaStatus(f)));if(c&&this.mayScript)try{this.doSendCallback(d,b,f)}catch(p){if(y(p,Exception))this.haveNotifiedError||JU.Logger.debugging&&JU.Logger.debug(a.name()+"Callback call error to "+d+": "+p),this.haveNotifiedError=
!0;else throw p;}},"J.c.CBK,~A");c(c$,"sendScript",function(a,b,d,c){if(c&&(a=this.notifySync(a,b),null==a||0==a.length||a.equals("0")))return"";var g=new JU.Lst;JU.GenericApplet.findApplets(b,this.syncId,this.fullName,g);var f=g.size();if(0==f)return!c&&!b.equals("*")&&JU.Logger.error(this.fullName+" couldn't find applet "+b),"";b=d?null:new JU.SB;c=d&&a.equals("GET_GRAPHICS");var j=d&&a.equals("SET_GRAPHICS_OFF");c&&this.viewer.setStereo(!1,this.gRight=null);for(var h=0;h<f;h++){var l=g.get(h),
m=JU.GenericApplet.htRegistry.get(l);JU.Logger.debugging&&JU.Logger.debug(this.fullName+" sending to "+l+": "+a);try{if(c||j)return this.viewer.setStereo(this.isStereoSlave=c,this.gRight=m.setStereoGraphics(c)),"";d?m.syncScript(a):b.append(m.scriptWait(a,"output")).append("\n")}catch(r){if(y(r,Exception))l=this.htmlName+" couldn't send to "+l+": "+a+": "+r,JU.Logger.error(l),d||b.append(l);else throw r;}}return d?"":b.toString()},"~S,~S,~B,~B");c(c$,"notifySync",function(a,b){var d=this.b$.get(J.c.CBK.SYNC);
if(!this.mayScript||null==d)return a;try{return this.doSendCallback(d,[this.fullName,a,b],null)}catch(c){if(y(c,Exception))this.haveNotifiedError||JU.Logger.debugging&&JU.Logger.debug("syncCallback call error to "+d+": "+c),this.haveNotifiedError=!0;else throw c;}return a},"~S,~S");h(c$,"eval",function(a){var b=a.indexOf("\u0001");return 0<=b?this.sendScript(a.substring(b+1),a.substring(0,b),!1,!1):!this.haveDocumentAccess?"NO EVAL ALLOWED":null!=this.b$.get(J.c.CBK.EVAL)?(this.notifyCallback(J.c.CBK.EVAL,
[null,a]),""):this.doEval(a)},"~S");h(c$,"functionXY",function(a,b,d){return this.doFunctionXY(a,b,d)},"~S,~N,~N");h(c$,"functionXYZ",function(a,b,d,c){return this.doFunctionXYZ(a,b,d,c)},"~S,~N,~N,~N");h(c$,"createImage",function(){return null},"~S,~S,~O,~N");h(c$,"getRegistryInfo",function(){JU.GenericApplet.checkIn(null,null);return JU.GenericApplet.htRegistry});h(c$,"showUrl",function(a){JU.Logger.debugging&&JU.Logger.debug("showUrl("+a+")");if(null!=a&&0<a.length)try{this.doShowDocument(new java.net.URL(U("java.net.URL"),
a,null))}catch(b){if(y(b,java.net.MalformedURLException))this.consoleMessage("Malformed URL:"+a);else throw b;}},"~S");h(c$,"resizeInnerPanel",function(){return new javajs.awt.Dimension(0,0)},"~S");c$.checkIn=c(c$,"checkIn",function(a,b){null!=a&&(JU.Logger.info("AppletRegistry.checkIn("+a+")"),JU.GenericApplet.htRegistry.put(a,b));if(JU.Logger.debugging)for(var d,c=JU.GenericApplet.htRegistry.entrySet().iterator();c.hasNext()&&((d=c.next())||1);){var g=d.getKey();JU.Logger.debug(g+" "+d.getValue())}},
"~S,~O");c$.checkOut=c(c$,"checkOut",function(a){JU.GenericApplet.htRegistry.remove(a)},"~S");c$.findApplets=c(c$,"findApplets",function(a,b,d,c){if(null!=a&&0<=a.indexOf(",")){var g=JU.PT.split(a,",");for(a=0;a<g.length;a++)JU.GenericApplet.findApplets(g[a],b,d,c)}else if(b="__"+b+"__",null==a||a.equals("*")||a.equals(">"))for(a=JU.GenericApplet.htRegistry.keySet().iterator();a.hasNext()&&((g=a.next())||1);)!g.equals(d)&&0<g.indexOf(b)&&c.addLast(g);else 0<=d.indexOf("_object")&&0>a.indexOf("_object")&&
(a+="_object"),0>a.indexOf("__")&&(a+=b),JU.GenericApplet.htRegistry.containsKey(a)||(a="jmolApplet"+a),!a.equals(d)&&JU.GenericApplet.htRegistry.containsKey(a)&&c.addLast(a)},"~S,~S,~S,JU.Lst");c$.htRegistry=c$.prototype.htRegistry=new java.util.Hashtable;C(c$,"SCRIPT_CHECK",0,"SCRIPT_WAIT",1,"SCRIPT_NOWAIT",2)});n("JU");w(["JU.AU"],"JU.Geodesic",["java.lang.NullPointerException","$.Short","java.util.Hashtable","JU.V3"],function(){c$=B(JU,"Geodesic");c$.getNeighborVertexesArrays=c(c$,"getNeighborVertexesArrays",
function(){null==JU.Geodesic.vertexCounts&&JU.Geodesic.createGeodesic(3);return JU.Geodesic.neighborVertexesArrays});c$.getVertexCount=c(c$,"getVertexCount",function(a){null==JU.Geodesic.vertexCounts&&JU.Geodesic.createGeodesic(3);return JU.Geodesic.vertexCounts[a]},"~N");c$.getVertexVectors=c(c$,"getVertexVectors",function(){null==JU.Geodesic.vertexCounts&&JU.Geodesic.createGeodesic(3);return JU.Geodesic.vertexVectors});c$.getVertexVector=c(c$,"getVertexVector",function(a){return JU.Geodesic.vertexVectors[a]},
"~N");c$.getFaceVertexes=c(c$,"getFaceVertexes",function(a){return JU.Geodesic.faceVertexesArrays[a]},"~N");c$.createGeodesic=c(c$,"createGeodesic",function(a){if(!(a<JU.Geodesic.currentLevel)){JU.Geodesic.currentLevel=a;var b=T(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 d=0;5>d;++d)JU.Geodesic.vertexVectors[d+1]=JU.V3.new3(Math.cos(1.2566371*
d),Math.sin(1.2566371*d),0.5),JU.Geodesic.vertexVectors[d+6]=JU.V3.new3(Math.cos(1.2566371*d+0.62831855),Math.sin(1.2566371*d+0.62831855),-0.5);JU.Geodesic.vertexVectors[11]=JU.V3.new3(0,0,-JU.Geodesic.halfRoot5);for(d=12;0<=--d;)JU.Geodesic.vertexVectors[d].normalize();JU.Geodesic.faceVertexesArrays[0]=JU.Geodesic.faceVertexesIcosahedron;JU.Geodesic.neighborVertexesArrays[0]=JU.Geodesic.neighborVertexesIcosahedron;b[0]=12;for(d=0;d<a;++d)JU.Geodesic.quadruple(d,b);JU.Geodesic.vertexCounts=b}},"~N");
c$.quadruple=c(c$,"quadruple",function(a,b){JU.Geodesic.htVertex=new java.util.Hashtable;var d=JU.Geodesic.vertexVectors.length,c=JU.Geodesic.faceVertexesArrays[a],g=c.length,f=q(g/3),j=d+(d+f-2),f=4*f;JU.Geodesic.vertexVectors=JU.AU.arrayCopyObject(JU.Geodesic.vertexVectors,j);f=T(3*f,0);JU.Geodesic.faceVertexesArrays[a+1]=f;var h=T(6*j,0);JU.Geodesic.neighborVertexesArrays[a+1]=h;for(var l=h.length;0<=--l;)h[l]=-1;b[a+1]=j;JU.Geodesic.vertexNext=d;for(l=d=0;l<g;){var m=c[l++],r=c[l++],x=c[l++],
n=JU.Geodesic.getVertex(m,r),p=JU.Geodesic.getVertex(r,x),s=JU.Geodesic.getVertex(x,m);f[d++]=m;f[d++]=n;f[d++]=s;f[d++]=r;f[d++]=p;f[d++]=n;f[d++]=x;f[d++]=s;f[d++]=p;f[d++]=s;f[d++]=n;f[d++]=p;JU.Geodesic.addNeighboringVertexes(h,n,m);JU.Geodesic.addNeighboringVertexes(h,n,s);JU.Geodesic.addNeighboringVertexes(h,n,p);JU.Geodesic.addNeighboringVertexes(h,n,r);JU.Geodesic.addNeighboringVertexes(h,p,r);JU.Geodesic.addNeighboringVertexes(h,p,s);JU.Geodesic.addNeighboringVertexes(h,p,x);JU.Geodesic.addNeighboringVertexes(h,
s,x);JU.Geodesic.addNeighboringVertexes(h,s,m)}g=JU.Geodesic.vertexVectors.length;if(d!=f.length)throw new NullPointerException;if(JU.Geodesic.vertexNext!=j)throw new NullPointerException;for(l=0;12>l;++l)for(c=0;5>c;++c){d=h[6*l+c];if(0>d)throw new NullPointerException;if(d>=g)throw new NullPointerException;if(-1!=h[6*l+5])throw new NullPointerException;}for(l=72;l<h.length;++l){d=h[l];if(0>d)throw new NullPointerException;if(d>=g)throw new NullPointerException;}for(l=0;l<j;++l){g=0;for(c=h.length;0<=
--c;)h[c]==l&&++g;if(12>l&&5!=g||12<=l&&6!=g)throw new NullPointerException;g=0;for(c=f.length;0<=--c;)f[c]==l&&++g;if(12>l&&5!=g||12<=l&&6!=g)throw new NullPointerException;}JU.Geodesic.htVertex=null},"~N,~A");c$.addNeighboringVertexes=c(c$,"addNeighboringVertexes",function(a,b,d){for(var c=6*b,g=c+6;c<g;++c){if(a[c]==d)return;if(0>a[c]){a[c]=d;for(var f=6*d,j=f+6;f<j;++f){if(a[f]==b)return;if(0>a[f]){a[f]=b;return}}}}throw new NullPointerException;},"~A,~N,~N");c$.getVertex=c(c$,"getVertex",function(a,
b){if(a>b){var d=a;a=b;b=d}var d=Integer.$valueOf((a<<16)+b),c=JU.Geodesic.htVertex.get(d);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[b]);c.normalize();JU.Geodesic.htVertex.put(d,Short.$valueOf(JU.Geodesic.vertexNext));return JU.Geodesic.vertexNext++},"~N,~N");c$.halfRoot5=c$.prototype.halfRoot5=0.5*Math.sqrt(5);C(c$,"oneFifth",1.2566371,"oneTenth",0.62831855,"faceVertexesIcosahedron",
[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],"neighborVertexesIcosahedron",[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],"standardLevel",3,"maxLevel",3,"vertexCounts",null,"vertexVectors",null,"faceVertexesArrays",null,"neighborVertexesArrays",null,"currentLevel",0,"vertexNext",0,"htVertex",
null,"VALIDATE",!0)});n("JU");c$=t(function(){this.entryCount=0;this.entries=null;N("JU.Int2IntHash.Entry")||JU.Int2IntHash.$Int2IntHash$Entry$();s(this,arguments)},JU,"Int2IntHash");u(c$,function(a){this.entries=Array(a)},"~N");c(c$,"get",function(a){for(var b=this.entries,b=b[(a&2147483647)%b.length];null!=b;b=b.next)if(b.key==a)return b.value;return-2147483648},"~N");c(c$,"put",function(a,b){for(var d=this.entries,c=d.length,g=(a&2147483647)%c,f=d[g];null!=f;f=f.next)if(f.key==a){f.value=b;return}if(this.entryCount>
c){for(var g=c,c=c+(c+1),j=Array(c),h=g;0<=--h;)for(f=d[h];null!=f;){var l=f,f=f.next,g=(l.key&2147483647)%c;l.next=j[g];j[g]=l}d=this.entries=j;g=(a&2147483647)%c}d[g]=M(JU.Int2IntHash.Entry,this,null,a,b,d[g]);++this.entryCount},"~N,~N");c$.$Int2IntHash$Entry$=function(){G(self.c$);c$=t(function(){Q(this,arguments);this.value=this.key=0;this.next=null;s(this,arguments)},JU.Int2IntHash,"Entry");u(c$,function(a,b,d){this.key=a;this.value=b;this.next=d},"~N,~N,JU.Int2IntHash.Entry");c$=F()};n("JU");
H(JU,"Node");n("JU");w(["JU.Node"],"JU.BNode",null,function(){H(JU,"BNode",JU.Node)});n("JU");w(["java.lang.Enum"],"JU.Edge",null,function(){c$=t(function(){this.index=-1;this.order=0;s(this,arguments)},JU,"Edge");c$.getArgbHbondType=c(c$,"getArgbHbondType",function(a){return JU.Edge.argbsHbondType[(a&30720)>>11]},"~N");c$.getBondOrderNumberFromOrder=c(c$,"getBondOrderNumberFromOrder",function(a){a&=-131073;return 131071==a||65535==a?"0":JM.Bond.isOrderH(a)||0!=(a&256)?JU.Edge.EnumBondOrder.SINGLE.number:
0!=(a&224)?(a>>5)+"."+(a&31):JU.Edge.EnumBondOrder.getNumberFromCode(a)},"~N");c$.getCmlBondOrder=c(c$,"getCmlBondOrder",function(a){a=JU.Edge.getBondOrderNameFromOrder(a);switch(a.charAt(0)){case "s":case "d":case "t":return""+a.toUpperCase().charAt(0);case "a":return 0<=a.indexOf("Double")?"D":0<=a.indexOf("Single")?"S":"aromatic";case "p":return 0<=a.indexOf(" ")?a.substring(a.indexOf(" ")+1):"partial12"}return null},"~N");c$.getBondOrderNameFromOrder=c(c$,"getBondOrderNameFromOrder",function(a){a&=
-131073;switch(a){case 65535:case 131071:return"";case 32768:return JU.Edge.EnumBondOrder.STRUT.$$name;case 1:return JU.Edge.EnumBondOrder.SINGLE.$$name;case 2:return JU.Edge.EnumBondOrder.DOUBLE.$$name}return 0!=(a&224)?"partial "+JU.Edge.getBondOrderNumberFromOrder(a):JM.Bond.isOrderH(a)?JU.Edge.EnumBondOrder.H_REGULAR.$$name:0!=(a&256)?JU.Edge.EnumBondOrder.SINGLE.$$name:JU.Edge.EnumBondOrder.getNameFromCode(a)},"~N");c$.getPartialBondDotted=c(c$,"getPartialBondDotted",function(a){return a&31},
"~N");c$.getPartialBondOrder=c(c$,"getPartialBondOrder",function(a){return(a&-131073)>>5},"~N");c$.getCovalentBondOrder=c(c$,"getCovalentBondOrder",function(a){if(0==(a&1023))return 0;a&=-131073;if(0!=(a&224))return JU.Edge.getPartialBondOrder(a);0!=(a&256)&&(a&=-257);0!=(a&248)&&(a=1);return a&7},"~N");c$.getBondOrderFromFloat=c(c$,"getBondOrderFromFloat",function(a){switch(z(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}return 131071},"~N");c$.getBondOrderFromString=c(c$,"getBondOrderFromString",function(a){return JU.Edge.EnumBondOrder.getCodeFromName(a)},"~S");G(self.c$);c$=t(function(){this.code=0;this.$$name=this.number=null;s(this,arguments)},JU.Edge,"EnumBondOrder",Enum);u(c$,function(a,b,d){this.code=a;this.number=b;this.$$name=d},"~N,~S,~S");c$.getCodeFromName=c(c$,"getCodeFromName",function(a){for(var b,d=0,c=JU.Edge.EnumBondOrder.values();d<c.length&&
((b=c[d])||1);d++)if(b.$$name.equalsIgnoreCase(a))return b.code;return 131071},"~S");c$.getNameFromCode=c(c$,"getNameFromCode",function(a){for(var b,d=0,c=JU.Edge.EnumBondOrder.values();d<c.length&&((b=c[d])||1);d++)if(b.code==a)return b.$$name;return"?"},"~N");c$.getNumberFromCode=c(c$,"getNumberFromCode",function(a){for(var b,d=0,c=JU.Edge.EnumBondOrder.values();d<c.length&&((b=c[d])||1);d++)if(b.code==a)return b.number;return"?"},"~N");v(c$,"SINGLE",0,[1,"1","single"]);v(c$,"DOUBLE",1,[2,"2","double"]);
v(c$,"TRIPLE",2,[3,"3","triple"]);v(c$,"QUADRUPLE",3,[4,"4","quadruple"]);v(c$,"AROMATIC",4,[515,"1.5","aromatic"]);v(c$,"STRUT",5,[32768,"1","struts"]);v(c$,"H_REGULAR",6,[2048,"1","hbond"]);v(c$,"PARTIAL01",7,[33,"0.5","partial"]);v(c$,"PARTIAL12",8,[66,"1.5","partialDouble"]);v(c$,"PARTIAL23",9,[97,"2.5","partialTriple"]);v(c$,"PARTIAL32",10,[100,"2.5","partialTriple2"]);v(c$,"AROMATIC_SINGLE",11,[513,"1","aromaticSingle"]);v(c$,"AROMATIC_DOUBLE",12,[514,"2","aromaticDouble"]);v(c$,"UNSPECIFIED",
13,[17,"1","unspecified"]);c$=F();C(c$,"BOND_STEREO_MASK",1024,"BOND_STEREO_NEAR",1025,"BOND_STEREO_FAR",1041,"BOND_AROMATIC_MASK",512,"BOND_AROMATIC_SINGLE",513,"BOND_AROMATIC_DOUBLE",514,"BOND_AROMATIC",515,"BOND_SULFUR_MASK",256,"BOND_PARTIAL_MASK",224,"BOND_PARTIAL01",33,"BOND_PARTIAL12",66,"BOND_PARTIAL23",97,"BOND_PARTIAL32",100,"BOND_COVALENT_MASK",1023,"BOND_COVALENT_SINGLE",1,"BOND_COVALENT_DOUBLE",2,"BOND_COVALENT_TRIPLE",3,"BOND_COVALENT_QUADRUPLE",4,"BOND_ORDER_UNSPECIFIED",17,"BOND_ORDER_ANY",
65535,"BOND_ORDER_NULL",131071,"BOND_STRUT",32768,"BOND_PYMOL_SINGLE",65536,"BOND_PYMOL_MULT",98304,"BOND_NEW",131072,"BOND_HBOND_SHIFT",11,"BOND_HYDROGEN_MASK",30720,"BOND_H_REGULAR",2048,"BOND_H_CALC_MASK",28672,"BOND_H_CALC",4096,"BOND_H_PLUS_2",6144,"BOND_H_PLUS_3",8192,"BOND_H_PLUS_4",10240,"BOND_H_PLUS_5",12288,"BOND_H_MINUS_3",14336,"BOND_H_MINUS_4",16384,"BOND_H_NUCLEOTIDE",18432,"argbsHbondType",[4294928820,4294967040,4294967040,4294967295,4294902015,4294901760,4294944E3,4278255615,4278255360,
4294934656],"FLAG_AROMATIC_DOUBLE",16,"FLAG_AROMATIC_DEFINED",8,"FLAG_AROMATIC_STRICT",4,"FLAG_IGNORE_STEREOCHEMISTRY",2,"FLAG_NO_AROMATIC",1)});n("JU");w(["JU.Elements"],"JU.JmolMolecule",["JU.AU","$.BS","JU.BNode"],function(){c$=t(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.atomList=this.mf=null;s(this,arguments)},JU,"JmolMolecule");
K(c$,function(){this.elementCounts=D(JU.Elements.elementNumberMax,0);this.altElementCounts=D(JU.Elements.altElementMax,0)});u(c$,function(){});c$.getMolecules=c(c$,"getMolecules",function(a,b,d,c){var g=null,f=new JU.BS,j=-1,h=0,l=0,m=Array(4);null==c&&(c=new JU.BS);for(var r=0;r<a.length;r++)if(!c.get(r)&&!f.get(r))if(a[r].isDeleted())c.set(r);else{var x=a[r].getModelIndex();x!=j&&(j=x,h=0,g=b[x]);f=JU.JmolMolecule.getBranchBitSet(a,r,g,d,-1,!0,!0);0<=f.nextSetBit(0)&&(m=JU.JmolMolecule.addMolecule(m,
l++,a,r,f,x,h++,c))}return JU.JmolMolecule.allocateArray(m,l)},"~A,~A,JU.Lst,JU.BS");c$.getBranchBitSet=c(c$,"getBranchBitSet",function(a,b,d,c,g,f,j){var h=JU.BS.newN(a.length);if(0>b)return h;0<=g&&d.clear(g);return JU.JmolMolecule.getCovalentlyConnectedBitSet(a,a[b],d,f,j,c,h)?h:new JU.BS},"~A,~N,JU.BS,JU.Lst,~N,~B,~B");c$.addMolecule=c(c$,"addMolecule",function(a,b,d,c,g,f,j,h){h.or(g);b==a.length&&(a=JU.JmolMolecule.allocateArray(a,2*b+1));a[b]=JU.JmolMolecule.initialize(d,b,c,g,f,j);return a},
"~A,~N,~A,~N,JU.BS,~N,~N,JU.BS");c$.getMolecularFormula=c(c$,"getMolecularFormula",function(a,b,d){var c=new JU.JmolMolecule;c.nodes=a;c.atomList=b;return c.getMolecularFormula(d)},"~A,JU.BS,~B");c(c$,"getMolecularFormula",function(a){if(null!=this.mf)return this.mf;this.getElementAndAtomCount(a);for(var b=a="",d,c=1;c<=this.elementNumberMax;c++)d=this.elementCounts[c],0!=d&&(a+=b+JU.Elements.elementSymbolFromNumber(c)+" "+d,b=" ");for(c=1;c<=this.altElementMax;c++)d=this.altElementCounts[c],0!=d&&
(a+=b+JU.Elements.elementSymbolFromNumber(JU.Elements.altElementNumberFromIndex(c))+" "+d,b=" ");return a},"~B");c$.initialize=c(c$,"initialize",function(a,b,d,c,g,f){var j=new JU.JmolMolecule;j.nodes=a;j.firstAtomIndex=d;j.atomList=c;j.ac=c.cardinality();j.moleculeIndex=b;j.modelIndex=g;j.indexInModel=f;return j},"~A,~N,~N,JU.BS,~N,~N");c(c$,"getElementAndAtomCount",function(a){null==this.atomList&&(this.atomList=new JU.BS,this.atomList.setBits(0,this.nodes.length));this.elementCounts=D(JU.Elements.elementNumberMax,
0);this.altElementCounts=D(JU.Elements.altElementMax,0);this.ac=this.atomList.cardinality();for(var b=this.atomList.nextSetBit(0);0<=b;b=this.atomList.nextSetBit(b+1)){var d=this.nodes[b].getAtomicAndIsotopeNumber();d<JU.Elements.elementNumberMax?(this.elementCounts[d]++,1==this.elementCounts[d]&&this.nElements++,this.elementNumberMax=Math.max(this.elementNumberMax,d),a&&(d=this.nodes[b].getImplicitHydrogenCount(),0<d&&(0==this.elementCounts[1]&&this.nElements++,this.elementCounts[1]+=d))):(d=JU.Elements.altElementIndexFromNumber(d),
this.altElementCounts[d]++,1==this.altElementCounts[d]&&this.nElements++,this.altElementMax=Math.max(this.altElementMax,d))}},"~B");c$.getCovalentlyConnectedBitSet=c(c$,"getCovalentlyConnectedBitSet",function(a,b,d,c,g,f,j){var h=b.getIndex();if(!d.get(h)||!g&&p(b,JU.BNode)&&0<b.getBioStructureTypeName().length)return c;d.clear(h);if(null!=f&&!j.get(h))for(var l=f.size();0<=--l;){var m=f.get(l);if(m.get(h)){j.or(m);d.andNot(m);for(l=m.nextSetBit(0);0<=l;l=m.nextSetBit(l+1)){var r=a[l];d.set(l);JU.JmolMolecule.getCovalentlyConnectedBitSet(a,
r,d,c,g,f,j);d.clear(l)}break}}j.set(h);h=b.getEdges();if(null==h)return!0;for(l=h.length;0<=--l;)if(m=h[l],m.isCovalent()&&!JU.JmolMolecule.getCovalentlyConnectedBitSet(a,m.getOtherAtomNode(b),d,c,g,f,j))return!1;return!0},"~A,JU.Node,JU.BS,~B,~B,JU.Lst,JU.BS");c$.allocateArray=c(c$,"allocateArray",function(a,b){return b==a.length?a:JU.AU.arrayCopyObject(a,b)},"~A,~N")});n("JU");w(["java.util.Hashtable","JU.DefaultLogger"],"JU.Logger",["java.lang.Long"],function(){c$=B(JU,"Logger");c$.getProperty=
c(c$,"getProperty",function(a,b){try{var d=System.getProperty("jmol.logger."+a,null);if(null!=d)return d.equalsIgnoreCase("true")}catch(c){if(!y(c,Exception))throw c;}return b},"~S,~B");c$.setLogger=c(c$,"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");c$.isActiveLevel=c(c$,"isActiveLevel",function(a){return null!=JU.Logger._logger&&0<=
a&&7>a&&JU.Logger._activeLevels[a]},"~N");c$.setActiveLevel=c(c$,"setActiveLevel",function(a,b){0>a&&(a=0);7<=a&&(a=6);JU.Logger._activeLevels[a]=b;JU.Logger.debugging=JU.Logger.isActiveLevel(5)||JU.Logger.isActiveLevel(6);JU.Logger.debuggingHigh=JU.Logger.debugging&&JU.Logger._activeLevels[6]},"~N,~B");c$.setLogLevel=c(c$,"setLogLevel",function(a){for(var b=7;0<=--b;)JU.Logger.setActiveLevel(b,b<=a)},"~N");c$.getLevel=c(c$,"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");c$.logLevel=c(c$,"logLevel",function(){return JU.Logger._logLevel});c$.doLogLevel=c(c$,"doLogLevel",function(a){JU.Logger._logLevel=a},"~B");c$.debug=c(c$,"debug",function(a){if(JU.Logger.debugging)try{JU.Logger._logger.debug(a)}catch(b){}},"~S");c$.info=c(c$,"info",function(a){try{JU.Logger.isActiveLevel(4)&&JU.Logger._logger.info(a)}catch(b){}},"~S");c$.warn=c(c$,"warn",function(a){try{JU.Logger.isActiveLevel(3)&&
JU.Logger._logger.warn(a)}catch(b){}},"~S");c$.warnEx=c(c$,"warnEx",function(a,b){try{JU.Logger.isActiveLevel(3)&&JU.Logger._logger.warnEx(a,b)}catch(d){}},"~S,Throwable");c$.error=c(c$,"error",function(a){try{JU.Logger.isActiveLevel(2)&&JU.Logger._logger.error(a)}catch(b){}},"~S");c$.errorEx=c(c$,"errorEx",function(a,b){try{JU.Logger.isActiveLevel(2)&&JU.Logger._logger.errorEx(a,b)}catch(d){}},"~S,Throwable");c$.getLogLevel=c(c$,"getLogLevel",function(){for(var a=7;0<=--a;)if(JU.Logger.isActiveLevel(a))return a;
return 0});c$.fatal=c(c$,"fatal",function(a){try{JU.Logger.isActiveLevel(1)&&JU.Logger._logger.fatal(a)}catch(b){}},"~S");c$.fatalEx=c(c$,"fatalEx",function(a,b){try{JU.Logger.isActiveLevel(1)&&JU.Logger._logger.fatalEx(a,b)}catch(d){}},"~S,Throwable");c$.startTimer=c(c$,"startTimer",function(a){null!=a&&JU.Logger.htTiming.put(a,Long.$valueOf(System.currentTimeMillis()))},"~S");c$.getTimerMsg=c(c$,"getTimerMsg",function(a,b){0==b&&(b=JU.Logger.getTimeFrom(a));return"Time for "+a+": "+b+" ms"},"~S,~N");
c$.getTimeFrom=c(c$,"getTimeFrom",function(a){var b;return null==a||null==(b=JU.Logger.htTiming.get(a))?-1:System.currentTimeMillis()-b.longValue()},"~S");c$.checkTimer=c(c$,"checkTimer",function(a,b){var d=JU.Logger.getTimeFrom(a);0<=d&&!a.startsWith("(")&&JU.Logger.info(JU.Logger.getTimerMsg(a,d));b&&JU.Logger.startTimer(a);return d},"~S,~B");c$.checkMemory=c(c$,"checkMemory",function(){JU.Logger.info("Memory: Total-Free=0; Total=0; Free=0; Max=0")});c$._logger=c$.prototype._logger=new JU.DefaultLogger;
C(c$,"LEVEL_FATAL",1,"LEVEL_ERROR",2,"LEVEL_WARN",3,"LEVEL_INFO",4,"LEVEL_DEBUG",5,"LEVEL_DEBUGHIGH",6,"LEVEL_MAX",7,"_activeLevels",ca(7,!1),"_logLevel",!1,"debugging",!1,"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];c$.htTiming=c$.prototype.htTiming=new java.util.Hashtable});n("JU");H(JU,"LoggerInterface");n("JU");w(["JU.V3"],"JU.Measure","java.lang.Float javajs.api.Interface JU.Lst $.P3 $.P4 $.Quat".split(" "),function(){c$=B(JU,"Measure");c$.computeAngle=
c(c$,"computeAngle",function(a,b,d,c,g,f){c.sub2(a,b);g.sub2(d,b);a=c.angle(g);return f?a/0.017453292:a},"JU.T3,JU.T3,JU.T3,JU.V3,JU.V3,~B");c$.computeAngleABC=c(c$,"computeAngleABC",function(a,b,d,c){var g=new JU.V3,f=new JU.V3;return JU.Measure.computeAngle(a,b,d,g,f,c)},"JU.T3,JU.T3,JU.T3,~B");c$.computeTorsion=c(c$,"computeTorsion",function(a,b,d,c,g){var f=a.x-b.x,j=a.y-b.y;a=a.z-b.z;var h=d.x-b.x,l=d.y-b.y,m=d.z-b.z,r=d.x-c.x,x=d.y-c.y,n=d.z-c.z;c=j*m-a*l;b=a*h-f*m;var q=f*l-j*h;d=l*n-m*x;m=
m*r-h*n;h=h*x-l*r;r=1/(d*d+m*m+h*h);l=Math.sqrt(1/(c*c+b*b+q*q));r=Math.sqrt(r);c=(c*d+b*m+q*h)*l*r;1<c&&(c=1);-1>c&&(c=-1);c=Math.acos(c);f=f*d+j*m+a*h;j=Math.abs(f);c=0<f/j?c:-c;return g?c/0.017453292:c},"JU.T3,JU.T3,JU.T3,JU.T3,~B");c$.computeHelicalAxis=c(c$,"computeHelicalAxis",function(a,b,d){var c=new JU.V3;c.sub2(b,a);var g=d.getTheta(),f=d.getNormal(),j=c.dot(f);1E-4>Math.abs(j)&&(j=0);var h=new JU.V3;h.cross(c,f);0!=h.dot(h)&&h.normalize();var l=new JU.V3,m=JU.V3.newV(f);0==j&&(j=1.4E-45,
m.scale(j));l.sub2(m,c);l.scale(0.5);h.scale(0==g?0:l.length()/Math.tan(3.141592653589793*(g/2/180)));c=JU.V3.newV(h);0!=g&&c.add(l);l=JU.P3.newP(a);l.sub(c);h=JU.P3.newP(l);h.add(f);g=JU.Measure.computeTorsion(a,l,h,b,!0);if(Float.isNaN(g)||1E-4>c.length())g=d.getThetaDirectedV(f);a=Math.abs(0==g?0:360/g);j=Math.abs(1.4E-45==j?0:f.length()*(0==g?1:360/g));return[l,f,c,JU.P3.new3(g,j,a),h]},"JU.P3,JU.P3,JU.Quat");c$.getPlaneThroughPoints=c(c$,"getPlaneThroughPoints",function(a,b,d,c,g,f,j){a=JU.Measure.getNormalThroughPoints(a,
b,d,c,g,f);j.set4(c.x,c.y,c.z,a)},"JU.T3,JU.T3,JU.T3,JU.V3,JU.V3,JU.V3,JU.P4");c$.getPlaneThroughPoint=c(c$,"getPlaneThroughPoint",function(a,b,d){d.set4(b.x,b.y,b.z,-b.dot(a))},"JU.T3,JU.V3,JU.P4");c$.distanceToPlane=c(c$,"distanceToPlane",function(a,b){return null==a?NaN:(a.x*b.x+a.y*b.y+a.z*b.z+a.w)/Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z)},"JU.P4,JU.T3");c$.distanceToPlaneD=c(c$,"distanceToPlaneD",function(a,b,d){return null==a?NaN:(a.x*d.x+a.y*d.y+a.z*d.z+a.w)/b},"JU.P4,~N,JU.P3");c$.distanceToPlaneV=
c(c$,"distanceToPlaneV",function(a,b,d){return null==a?NaN:(a.x*d.x+a.y*d.y+a.z*d.z+b)/Math.sqrt(a.x*a.x+a.y*a.y+a.z*a.z)},"JU.V3,~N,JU.P3");c$.calcNormalizedNormal=c(c$,"calcNormalizedNormal",function(a,b,d,c,g,f){g.sub2(b,a);f.sub2(d,a);c.cross(g,f);c.normalize()},"JU.T3,JU.T3,JU.T3,JU.V3,JU.V3,JU.V3");c$.getDirectedNormalThroughPoints=c(c$,"getDirectedNormalThroughPoints",function(a,b,d,c,g,f,j){b=JU.Measure.getNormalThroughPoints(a,b,d,g,f,j);null!=c&&(d=JU.P3.newP(a),d.add(g),f=d.distance(c),
d.sub2(a,g),f>d.distance(c)&&(g.scale(-1),b=-b));return b},"JU.T3,JU.T3,JU.T3,JU.T3,JU.V3,JU.V3,JU.V3");c$.getNormalThroughPoints=c(c$,"getNormalThroughPoints",function(a,b,d,c,g,f){JU.Measure.calcNormalizedNormal(a,b,d,c,g,f);g.setT(a);return-g.dot(c)},"JU.T3,JU.T3,JU.T3,JU.V3,JU.V3,JU.V3");c$.getPlaneProjection=c(c$,"getPlaneProjection",function(a,b,d,c){var g=JU.Measure.distanceToPlane(b,a);c.set(b.x,b.y,b.z);c.normalize();c.scale(-g);d.add2(a,c)},"JU.P3,JU.P4,JU.P3,JU.V3");c$.getNormalFromCenter=
c(c$,"getNormalFromCenter",function(a,b,d,c,g,f){var j=new JU.V3,h=new JU.V3;b=JU.Measure.getNormalThroughPoints(b,d,c,f,j,h);a=0<JU.Measure.distanceToPlaneV(f,b,a);a==g&&f.scale(-1);return!a},"JU.P3,JU.P3,JU.P3,JU.P3,~B,JU.V3");c$.getNormalToLine=c(c$,"getNormalToLine",function(a,b,d){d.sub2(a,b);d.cross(d,JU.Measure.axisY);d.normalize();Float.isNaN(d.x)&&d.set(1,0,0)},"JU.P3,JU.P3,JU.V3");c$.getBisectingPlane=c(c$,"getBisectingPlane",function(a,b,d,c,g){d.scaleAdd2(0.5,b,a);c.setT(b);c.normalize();
JU.Measure.getPlaneThroughPoint(d,c,g)},"JU.P3,JU.V3,JU.P3,JU.V3,JU.P4");c$.projectOntoAxis=c(c$,"projectOntoAxis",function(a,b,d,c){c.sub2(a,b);var g=c.dot(d);a.scaleAdd2(g,d,b);c.sub2(a,b)},"JU.P3,JU.P3,JU.V3,JU.V3");c$.calcBestAxisThroughPoints=c(c$,"calcBestAxisThroughPoints",function(a,b,d,c,g){var f=a.length;b.setT(a[0]);d.sub2(a[f-1],b);d.normalize();JU.Measure.calcAveragePointN(a,f,b);for(var j=0;j++<g&&0.001<JU.Measure.findAxis(a,f,b,d,c););a=JU.P3.newP(a[0]);JU.Measure.projectOntoAxis(a,
b,d,c);b.setT(a)},"~A,JU.P3,JU.V3,JU.V3,~N");c$.findAxis=c(c$,"findAxis",function(a,b,d,c,g){for(var f=new JU.V3,j=new JU.V3,h=new JU.P3,l=new JU.P3,m=JU.V3.newV(c),r=0;0<=--b;)h.setT(a[b]),l.setT(h),JU.Measure.projectOntoAxis(l,d,c,g),j.sub2(h,l),j.cross(g,j),f.add(j),r+=g.lengthSquared();a=JU.V3.newV(f);a.scale(1/r);j.cross(a,c);c.add(j);c.normalize();j.sub2(c,m);return j.length()},"~A,~N,JU.P3,JU.V3,JU.V3");c$.calcAveragePoint=c(c$,"calcAveragePoint",function(a,b,d){d.set((a.x+b.x)/2,(a.y+b.y)/
2,(a.z+b.z)/2)},"JU.P3,JU.P3,JU.P3");c$.calcAveragePointN=c(c$,"calcAveragePointN",function(a,b,d){d.setT(a[0]);for(var c=1;c<b;c++)d.add(a[c]);d.scale(1/b)},"~A,~N,JU.P3");c$.transformPoints=c(c$,"transformPoints",function(a,b,d){for(var c=new JU.Lst,g=0;g<a.size();g++){var f=JU.P3.newP(a.get(g));f.sub(d);b.rotTrans2(f,f);f.add(d);c.addLast(f)}return c},"JU.Lst,JU.M4,JU.P3");c$.isInTetrahedron=c(c$,"isInTetrahedron",function(a,b,d,c,g,f,j,h,l,m){JU.Measure.getPlaneThroughPoints(c,g,b,j,h,l,f);var r=
0<=JU.Measure.distanceToPlane(f,a);JU.Measure.getPlaneThroughPoints(b,g,d,j,h,l,f);if(r!=0<=JU.Measure.distanceToPlane(f,a))return!1;JU.Measure.getPlaneThroughPoints(d,g,c,j,h,l,f);if(r!=0<=JU.Measure.distanceToPlane(f,a))return!1;JU.Measure.getPlaneThroughPoints(b,d,c,j,h,l,f);a=JU.Measure.distanceToPlane(f,a);if(m)return r==0<=a;g=JU.Measure.distanceToPlane(f,g);return 0>=g*a||Math.abs(g)>Math.abs(a)},"JU.P3,JU.P3,JU.P3,JU.P3,JU.P3,JU.P4,JU.V3,JU.V3,JU.V3,~B");c$.getIntersectionPP=c(c$,"getIntersectionPP",
function(a,b){var d=a.x,c=a.y,g=a.z,f=a.w,j=b.x,h=b.y,l=b.z,m=b.w,r=JU.V3.new3(d,c,g),x=JU.V3.new3(j,h,l),n=new JU.V3;n.cross(r,x);var r=Math.abs(n.x),x=Math.abs(n.y),q=Math.abs(n.z);switch(r>x?r>q?1:3:x>q?2:3){case 1:r=0;x=c*l-h*g;if(0.01>Math.abs(x))return null;g=(g*m-l*f)/x;d=(h*f-m*c)/x;break;case 2:x=d*l-j*g;if(0.01>Math.abs(x))return null;r=(g*m-l*f)/x;g=0;d=(j*f-m*d)/x;break;default:x=d*h-j*c;if(0.01>Math.abs(x))return null;r=(c*m-h*f)/x;g=(j*f-m*d)/x;d=0}c=new JU.Lst;c.addLast(JU.P3.new3(r,
g,d));n.normalize();c.addLast(n);return c},"JU.P4,JU.P4");c$.getIntersection=c(c$,"getIntersection",function(a,b,d,c,g,f){JU.Measure.getPlaneProjection(a,d,c,g);g.set(d.x,d.y,d.z);g.normalize();null==b&&(b=JU.V3.newV(g));d=b.dot(g);if(0.01>Math.abs(d))return null;f.sub2(c,a);c.scaleAdd2(f.dot(g)/d,b,a);return c},"JU.P3,JU.V3,JU.P4,JU.P3,JU.V3,JU.V3");c$.calculateQuaternionRotation=c(c$,"calculateQuaternionRotation",function(a,b){b[1]=NaN;var d=new JU.Quat;if(1==a[0].length||a[0].length!=a[1].length)return d;
var c=a[0].length-1;if(2>c)return d;for(var g=0,f=0,j=0,h=0,l=0,m=0,r=0,x=0,n=0,q=new JU.P3,p=new JU.P3,c=c+1;1<=--c;){var s=a[1][c];q.sub2(a[0][c],a[0][0]);p.sub2(s,a[0][1]);g+=q.x*p.x;f+=q.x*p.y;j+=q.x*p.z;h+=q.y*p.x;l+=q.y*p.y;m+=q.y*p.z;r+=q.z*p.x;x+=q.z*p.y;n+=q.z*p.z}b[0]=JU.Measure.getRmsd(a,d);d=X(4,4,0);d[0][0]=g+l+n;d[0][1]=d[1][0]=m-x;d[0][2]=d[2][0]=r-j;d[0][3]=d[3][0]=f-h;d[1][1]=g-l-n;d[1][2]=d[2][1]=f+h;d[1][3]=d[3][1]=r+j;d[2][2]=-g+l-n;d[2][3]=d[3][2]=m+x;d[3][3]=-g-l+n;g=javajs.api.Interface.getInterface("JU.Eigen").setM(d).getEigenvectorsFloatTransposed()[3];
d=JU.Quat.newP4(JU.P4.new4(g[1],g[2],g[3],g[0]));b[1]=JU.Measure.getRmsd(a,d);return d},"~A,~A");c$.getTransformMatrix4=c(c$,"getTransformMatrix4",function(a,b,d,c){a=JU.Measure.getCenterAndPoints(a);var g=JU.Measure.getCenterAndPoints(b);b=L(2,0);var f=JU.Measure.calculateQuaternionRotation([a,g],b),g=JU.V3.newVsub(g[0],a[0]);d.setMV(f.getMatrix(),g);null!=c&&c.setT(a[0]);return b[1]},"JU.Lst,JU.Lst,JU.M4,JU.P3");c$.getCenterAndPoints=c(c$,"getCenterAndPoints",function(a){var b=a.size(),d=Array(b+
1);d[0]=new JU.P3;if(0<b){for(var c=0;c<b;c++)d[0].add(d[c+1]=a.get(c));d[0].scale(1/b)}return d},"JU.Lst");c$.getRmsd=c(c$,"getRmsd",function(a,b){for(var d=0,c=a[0],g=a[1],f=c[0],j=g[0],h=c.length-1,l=new JU.P3,m=h+1;1<=--m;)l.sub2(c[m],f),b.transformP2(l,l).add(j),d+=l.distanceSquared(g[m]);return Math.sqrt(d/h)},"~A,JU.Quat");C(c$,"radiansPerDegree",0.017453292519943295);c$.axisY=c$.prototype.axisY=JU.V3.new3(0,1,0)});n("JU");w(null,"JU.MeshSurface","java.lang.Float java.util.Hashtable JU.AU $.BS $.Lst $.Measure $.P3 $.P4 $.PT $.SB JU.BSUtil $.BoxInfo $.C $.Escape $.Geodesic $.TempArray".split(" "),
function(){c$=t(function(){this.meshType=this.spanningVectors=null;this.vc=0;this.vertexSource=this.vvs=this.vs=null;this.pc=0;this.polygonTranslucencies=this.pis=null;this.haveQuads=this.isTriangleSet=!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.checkCount=2;this.vertexCount0=this.polygonCount0=
this.iC=this.iB=this.iA=this.lastColix=this.lastColor=0;this.bsTransPolygons=this.bsSlabGhost=this.bsSlabDisplay=null;this.slabColix=this.slabMeshType=0;this.slabOptions=this.bsDisplay=null;this.doCap=this.doGhost=this.doClear=!1;this.mergePolygonCount0=this.mergeVertexCount0=this.iE=this.iD=0;this.isMerged=!1;s(this,arguments)},JU,"MeshSurface");u(c$,function(){});c$.newMesh=c(c$,"newMesh",function(a,b,d,c,g,f){var j=new JU.MeshSurface;j.pis=c;a?j.altVertices=b:j.vs=b;j.vc=0==d?b.length:d;j.normals=
g;j.normalCount=0==f&&null!=g?g.length:f;return j},"~B,~A,~N,~A,~A,~N");c$.newSlab=c(c$,"newSlab",function(a,b,d,c,g,f){var j=new JU.MeshSurface;j.vs=a;j.vvs=d;j.vc=b;j.pis=c;j.pc=g;j.checkCount=f;return j},"~A,~N,~A,~A,~N,~N");c(c$,"getVertices",function(){return null==this.altVertices?this.vs:this.altVertices});c(c$,"getFaces",function(){return this.pis});c(c$,"setColix",function(a){this.colix=a},"~N");c(c$,"setColixBack",function(a){this.colixBack=a},"~N");c(c$,"addV",function(a,b){0==this.vc?
this.vs=Array(25):this.vc==this.vs.length&&(this.vs=JU.AU.doubleLength(this.vs));this.vs[this.vc]=b?JU.P3.newP(a):a;return this.vc++},"JU.T3,~B");c(c$,"addTriangle",function(a,b,d){this.addPolygon([a,b,d],null)},"~N,~N,~N");c(c$,"addQuad",function(a,b,d,c){this.haveQuads=!0;this.addPolygon([a,b,d,c],null)},"~N,~N,~N,~N");c(c$,"setPolygonCount",function(a){this.pc=a;if(!(0>a)&&(null==this.pis||a>this.pis.length))this.pis=JU.AU.newInt2(a)},"~N");c(c$,"addVCVal",function(a,b,d){0==this.vc?this.vvs=L(25,
0):this.vc>=this.vvs.length&&(this.vvs=JU.AU.doubleLengthF(this.vvs));this.vvs[this.vc]=b;return this.addV(a,d)},"JU.T3,~N,~B");c(c$,"addTriangleCheck",function(a,b,d,c,g,f){return null==this.vs||null!=this.vvs&&(Float.isNaN(this.vvs[a])||Float.isNaN(this.vvs[b])||Float.isNaN(this.vvs[d]))||Float.isNaN(this.vs[a].x)||Float.isNaN(this.vs[b].x)||Float.isNaN(this.vs[d].x)?-1:this.addPolygonV3(a,b,d,c,g,f,null)},"~N,~N,~N,~N,~N,~N");c(c$,"addPolygonV3",function(a,b,d,c,g,f,j){return 2==this.checkCount?
this.addPolygonC([a,b,d,c,g],f,j):this.addPolygon([a,b,d,c],j)},"~N,~N,~N,~N,~N,~N,JU.BS");c(c$,"addPolygonC",function(a,b,d){if(0!=b){if(null==this.pcs||0==this.pc)this.lastColor=0;b=b==this.lastColor?this.lastColix:this.lastColix=JU.C.getColix(this.lastColor=b);this.setPolygonColix(this.pc,b)}return this.addPolygon(a,d)},"~A,~N,JU.BS");c(c$,"addPolygon",function(a,b){var d=this.pc;0==this.pc?this.pis=JU.AU.newInt2(25):this.pc==this.pis.length&&(this.pis=JU.AU.doubleLength(this.pis));null!=b&&b.set(this.pc);
this.pis[this.pc++]=a;return d},"~A,JU.BS");c(c$,"setPolygonColix",function(a,b){null==this.pcs?this.pcs=T(25,0):a>=this.pcs.length&&(this.pcs=JU.AU.doubleLengthShort(this.pcs));this.pcs[a]=b},"~N,~N");c(c$,"invalidatePolygons",function(){for(var a=this.pc;--a>=this.mergePolygonCount0;)if((null==this.bsSlabDisplay||this.bsSlabDisplay.get(a))&&!this.setABC(a))this.pis[a]=null});c(c$,"setABC",function(a){if(null!=this.bsSlabDisplay&&!this.bsSlabDisplay.get(a)&&(null==this.bsSlabGhost||!this.bsSlabGhost.get(a)))return!1;
a=this.pis[a];if(null==a||3>a.length)return!1;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]))},"~N");c(c$,"setTranslucentVertices",function(){},"JU.BS");c(c$,"setSlab",function(a,b,d,c,g){this.bsSlabDisplay=a;this.bsSlabGhost=b;this.slabMeshType=d.equalsIgnoreCase("mesh")?1073742018:1073741938;this.slabColix=JU.C.getColixTranslucent3(JU.C.getColixS(c),!0,g)},"JU.BS,JU.BS,~S,~S,~N");c(c$,
"getSlabColor",function(){return null==this.bsSlabGhost?null:JU.C.getHexCode(this.slabColix)});c(c$,"getSlabTranslucency",function(){return null==this.bsSlabGhost?null:""+JU.C.getColixTranslucencyFractional(this.slabColix)});c(c$,"getSlabType",function(){return null!=this.bsSlabGhost&&1073742018==this.slabMeshType?"mesh":null});c(c$,"resetTransPolygons",function(){for(var a=JU.C.isColixTranslucent(this.colix),b=JU.C.getColixTranslucencyFractional(this.colix),d=0;d<this.pc;d++)this.bsTransPolygons.get(d)&&
this.setABC(d)&&(this.vcs[this.iA]=JU.C.getColixTranslucent3(this.vcs[this.iA],a,b),this.vcs[this.iB]=JU.C.getColixTranslucent3(this.vcs[this.iB],a,b),this.vcs[this.iC]=JU.C.getColixTranslucent3(this.vcs[this.iC],a,b));this.polygonTranslucencies=this.bsTransPolygons=null});c(c$,"resetSlab",function(){this.slabPolygons(JU.TempArray.getSlabObjectType(1048587,null,!1,null),!1)});c$.getCapSlabObject=c(c$,"getCapSlabObject",function(a,b){try{if(0==a.indexOf("array")){var d=JU.PT.split(a.substring(6,a.length-
1),",");return JU.TempArray.getSlabObjectType(1679429641,[JU.Escape.uP(d[0]),JU.Escape.uP(d[1]),JU.Escape.uP(d[2]),JU.Escape.uP(d[3])],b,null)}var c=JU.Escape.uP(a);if(p(c,JU.P4))return JU.TempArray.getSlabObjectType(135266319,c,b,null)}catch(g){if(!y(g,Exception))throw g;}return null},"~S,~B");c(c$,"slabPolygonsList",function(a,b){for(var d=0;d<a.size()&&this.slabPolygons(a.get(d),b);d++);},"JU.Lst,~B");c(c$,"slabPolygons",function(a,b){if(0>this.polygonCount0)return!1;var d=a[0].intValue();if(1048587==
d||1073741872==d){if(null!=this.bsSlabDisplay&&(0!=this.polygonCount0||0!=this.vertexCount0))this.pc=this.polygonCount0,this.vc=this.vertexCount0,this.polygonCount0=this.vertexCount0=0,this.normixCount=this.isTriangleSet?this.pc:this.vc,this.bsSlabDisplay.setBits(0,0==this.pc?this.vc:this.pc),this.slabOptions=(new JU.SB).append(this.meshType+" slab none"),this.bsSlabGhost=null,this.slabMeshType=1048587;if(1048587==d)return!1}var c=a[1],g=a[2].booleanValue()&&1073741872!=d;if(g&&!b)return!1;var f=
a[3],j=null!=f;if(null==this.bsSlabDisplay||0==this.polygonCount0&&0==this.vertexCount0){if(this.polygonCount0=this.pc,this.vertexCount0=this.vc,this.bsSlabDisplay=JU.BSUtil.setAll(0==this.pc?this.vc:this.pc),this.bsSlabGhost=null,0==this.pc&&0==this.vc)return!1}else this.isMerged&&(0==this.pc?this.bsSlabDisplay.setBits(this.mergeVertexCount0,this.vc):this.bsSlabDisplay.setBits(this.mergePolygonCount0,this.pc));j&&(null==this.bsSlabGhost&&(this.bsSlabGhost=new JU.BS),this.slabMeshType=f[0].intValue(),
this.slabColix=f[1].shortValue(),g=!1,this.colix=JU.C.getColixTranslucent3(this.colix,!1,0));f=new JU.SB;f.append(g?" cap ":" slab ");if(j){f.append("translucent ").appendF(JU.C.getColixTranslucencyFractional(this.slabColix)).append(" ");var h=JU.C.getHexCode(this.slabColix);null!=h&&f.append(h).append(" ");1073742018==this.slabMeshType&&f.append("mesh ")}switch(d){case 1073741872:f.append("brillouin");this.slabBrillouin(c);break;case 3:this.getIntersection(0,null,null,null,null,c,null,g,!1,3,j);
break;case 135266319:f.append(JU.Escape.eP4(c));this.getIntersection(0,c,null,null,null,null,null,g,!1,135266319,j);break;case 1614417948:case 1679429641:f.append("within ").append(JU.Escape.eAP(c));c=JU.BoxInfo.getFacesFromCriticalPoints(c);for(h=0;h<c.length;h++)this.getIntersection(0,c[h],null,null,null,null,null,g,!1,135266319,j);break;case 135270408:this.getIntersection(0,null,null,null,c,null,null,!1,!1,32,j);break;case 135266325:case 1073742114:case 1073742018:switch(h=c[0].floatValue(),d){case 135266325:d=
c[1];c=c[2];f.append("within ").appendF(h).append(null==c?JU.Escape.e(d):JU.Escape.e(c));this.getIntersection(h,null,d,null,null,null,null,g,!1,0<h?1276118018:1073742154,j);break;case 1073742114:if(null==this.vvs)return!1;d=c[1].floatValue();f.append("within range ").appendF(h).append(" ").appendF(d);c=d<h?JU.BSUtil.copy(this.bsSlabDisplay):null;this.getIntersection(h,null,null,null,null,null,null,g,!1,32,j);h=null==c?null:JU.BSUtil.copy(this.bsSlabDisplay);JU.BSUtil.copy2(c,this.bsSlabDisplay);this.getIntersection(d,
null,null,null,null,null,null,g,!1,64,j);null!=h&&this.bsSlabDisplay.or(h);break;case 1073742018:this.getIntersection(0,null,null,null,null,null,c[1],g,!1,0>h?32:64,j)}}g=f.toString();null==this.slabOptions&&(this.slabOptions=new JU.SB);0>this.slabOptions.indexOf(g)&&this.slabOptions.append(0<this.slabOptions.length()?"; ":"").append(this.meshType).append(g);return!0},"~A,~B");c(c$,"slabBrillouin",function(){},"~A");c(c$,"addIntersectionVertex",function(a,b,d,c,g,f,j){j=f>j?j+"_"+f:f+"_"+j;if(0<=
f&&(f=g.get(j),null!=f))return f.intValue();null!=this.vertexSource&&(this.vc>=this.vertexSource.length&&(this.vertexSource=JU.AU.doubleLengthI(this.vertexSource)),this.vertexSource[this.vc]=d);null!=this.vertexSets&&(this.vc>=this.vertexSets.length&&(this.vertexSets=JU.AU.doubleLengthI(this.vertexSets)),this.vertexSets[this.vc]=c);a=this.addVCVal(a,b,!0);g.put(j,Integer.$valueOf(a));return a},"JU.T3,~N,~N,~N,java.util.Map,~N,~N");c(c$,"getIntersection",function(a,b,d,c,g,f,j,h,l,m,r){var n=null==
c,q=null;if(null==g)if(3==m&&null!=f){if(null==this.vertexSource)return;g=L(this.vc,0);for(j=0;j<this.vc;j++)-1==(g[j]=this.vertexSource[j])&&System.out.println("meshsurface hmm")}else g=this.vvs;var p=new java.util.Hashtable;if(null!=d||r)h=!1;var s=L(2,0),t=L(2,0),u=Math.abs(a),v,w,y,z,B,C,E=0,F=0,G=0,H=0,K=h?new JU.Lst:null;if(0==this.pc)for(j=this.mergeVertexCount0;j<this.vc;j++)(Float.isNaN(g[j])||0<JU.MeshSurface.checkSlab(m,this.vs[j],g[j],a,b,d,f))&&this.bsSlabDisplay.clear(j);else{var M=
this.pc;for(j=this.mergePolygonCount0;j<M;j++)if(this.setABC(j)){var N=null!=this.bsSlabGhost&&this.bsSlabGhost.get(j)?this.bsSlabGhost:this.bsSlabDisplay,O=this.pis[j][3],P=2==this.checkCount?this.pis[j][4]:0,Q=this.vs[this.iA],R=this.vs[this.iB],S=this.vs[this.iC];z=g[this.iA];B=g[this.iB];C=g[this.iC];null!=this.vertexSource&&(E=this.vertexSource[this.iA],F=this.vertexSource[this.iB],G=this.vertexSource[this.iC]);null!=this.vertexSets&&(H=this.vertexSets[this.iA]);v=JU.MeshSurface.checkSlab(m,
Q,z,null==f?a:E,b,d,f);w=JU.MeshSurface.checkSlab(m,R,B,null==f?a:F,b,d,f);y=JU.MeshSurface.checkSlab(m,S,C,null==f?a:G,b,d,f);var T=(0!=v&&0>v?1:0)+(0!=w&&0>w?2:0)+(0!=y&&0>y?4:0);switch(T){case 1:case 6:q=null==d?[JU.MeshSurface.interpolatePoint(Q,R,-v,w,z,B,s,t,0),JU.MeshSurface.interpolatePoint(Q,S,-v,y,z,C,s,t,1)]:[this.interpolateSphere(Q,R,-v,-w,u,z,B,s,t,0),this.interpolateSphere(Q,S,-v,-y,u,z,C,s,t,1)];break;case 2:case 5:q=null==d?[JU.MeshSurface.interpolatePoint(R,Q,-w,v,B,z,s,t,1),JU.MeshSurface.interpolatePoint(R,
S,-w,y,B,C,s,t,0)]:[this.interpolateSphere(R,Q,-w,-v,u,B,z,s,t,1),this.interpolateSphere(R,S,-w,-y,u,B,C,s,t,0)];break;case 3:case 4:q=null==d?[JU.MeshSurface.interpolatePoint(S,Q,-y,v,C,z,s,t,0),JU.MeshSurface.interpolatePoint(S,R,-y,w,C,B,s,t,1)]:[this.interpolateSphere(S,Q,-y,-v,u,C,z,s,t,0),this.interpolateSphere(S,R,-y,-w,u,C,B,s,t,1)]}this.doClear=!0;this.doGhost=r;this.doCap=h;if(n){switch(T){case 0:this.doCap=!1;break;case 7:continue;case 1:case 6:if((w=1==T)||r){if(!this.getDE(t,0,this.iA,
this.iB,this.iC,w))break;0>this.iD&&(this.iD=this.addIntersectionVertex(q[0],s[0],E,H,p,this.iA,this.iB));0>this.iE&&(this.iE=this.addIntersectionVertex(q[1],s[1],E,H,p,this.iA,this.iC));v=w?N:this.bsSlabGhost;this.addPolygonV3(this.iA,this.iD,this.iE,O&5|2,P,0,v);if(!r)break}if(!this.getDE(t,1,this.iA,this.iC,this.iB,w))break;v=w?this.bsSlabGhost:N;0>this.iE&&(this.iE=this.addIntersectionVertex(q[0],s[0],F,H,p,this.iA,this.iB),this.addPolygonV3(this.iE,this.iB,this.iC,O&3,P,0,v));0>this.iD&&(this.iD=
this.addIntersectionVertex(q[1],s[1],G,H,p,this.iA,this.iC),this.addPolygonV3(this.iD,this.iE,this.iC,O&4|1,P,0,v));break;case 5:case 2:if((w=2==T)||r){if(!this.getDE(t,0,this.iB,this.iC,this.iA,w))break;v=w?N:this.bsSlabGhost;0>this.iE&&(this.iE=this.addIntersectionVertex(q[0],s[0],F,H,p,this.iB,this.iA));0>this.iD&&(this.iD=this.addIntersectionVertex(q[1],s[1],F,H,p,this.iB,this.iC));this.addPolygonV3(this.iE,this.iB,this.iD,O&3|4,P,0,v);if(!r)break}if(!this.getDE(t,1,this.iB,this.iA,this.iC,w))break;
v=w?this.bsSlabGhost:N;0>this.iD&&(this.iD=this.addIntersectionVertex(q[0],s[0],E,H,p,this.iB,this.iA),this.addPolygonV3(this.iA,this.iD,this.iC,O&5,P,0,v));0>this.iE&&(this.iE=this.addIntersectionVertex(q[1],s[1],G,H,p,this.iB,this.iC),this.addPolygonV3(this.iD,this.iE,this.iC,O&2|1,P,0,v));break;case 4:case 3:if((w=4==T)||r){if(!this.getDE(t,0,this.iC,this.iA,this.iB,w))break;0>this.iD&&(this.iD=this.addIntersectionVertex(q[0],s[0],G,H,p,this.iA,this.iC));0>this.iE&&(this.iE=this.addIntersectionVertex(q[1],
s[1],G,H,p,this.iB,this.iC));v=w?N:this.bsSlabGhost;this.addPolygonV3(this.iD,this.iE,this.iC,O&6|1,P,0,v);if(!r)break}if(!this.getDE(t,1,this.iC,this.iB,this.iA,w))break;v=w?this.bsSlabGhost:N;0>this.iE&&(this.iE=this.addIntersectionVertex(q[0],s[0],E,H,p,this.iA,this.iC),this.addPolygonV3(this.iA,this.iB,this.iE,O&5,P,0,v));0>this.iD&&(this.iD=this.addIntersectionVertex(q[1],s[1],F,H,p,this.iB,this.iC),this.addPolygonV3(this.iE,this.iB,this.iD,O&2|4,P,0,v))}this.doClear&&(N.clear(j),this.doGhost&&
this.bsSlabGhost.set(j));this.doCap&&K.addLast([this.iD,this.iE])}else null!=q&&c.addLast(q)}if(h&&0<K.size()){b=new JU.P3;for(j=K.size();0<=--j;)a=K.get(j),b.add(this.vs[a[0]]),b.add(this.vs[a[1]]);b.scale(0.5/K.size());p=this.addIntersectionVertex(b,0,-1,H,p,-1,-1);for(j=K.size();0<=--j;)a=K.get(j),this.addPolygonV3(a[0],p,a[1],0,0,0,this.bsSlabDisplay)}if(l){p=new JU.BS;H=new JU.BS;for(j=0;j<this.pc;j++)if(null!=this.pis[j]){H.set(j);for(l=0;3>l;l++)p.set(this.pis[j][l])}K=0;H=H.cardinality();
if(H!=this.pc){a=D(this.vc,0);for(j=0;j<this.vc;j++)p.get(j)&&(a[j]=K++);b=Array(K);for(j=K=0;j<this.vc;j++)p.get(j)&&(b[K++]=this.vs[j]);p=JU.AU.newInt2(H);for(j=H=0;j<this.pc;j++)if(null!=this.pis[j]){for(l=0;3>l;l++)this.pis[j][l]=a[this.pis[j][l]];p[H++]=this.pis[j]}this.vs=b;this.vc=K;this.pis=p;this.pc=H}}}},"~N,JU.P4,~A,JU.Lst,~A,JU.BS,JU.MeshSurface,~B,~B,~N,~B");c$.setPoint=c(c$,"setPoint",function(a,b,d,c){return 0==a[b]?d:1==a[b]?c:-1},"~A,~N,~N,~N");c(c$,"getDE",function(a,b,d,c,g,f){this.iD=
JU.MeshSurface.setPoint(a,b,d,c);this.iE=JU.MeshSurface.setPoint(a,1-b,d,g);if(this.iD==d&&this.iE==d)return this.doClear=f,this.doCap=!1;if(this.iD==c&&this.iE==g)return this.doClear=!f,!1;if(this.iD==d||this.iE==d)return this.doClear=f,0>this.iD?this.iD=f?c:g:0>this.iE&&(this.iE=f?g:c),this.doCap;this.doGhost=!1;return!0},"~A,~N,~N,~N,~N,~B");c$.checkSlab=c(c$,"checkSlab",function(a,b,d,c,g,f,j){switch(a){case 3:return 0<=d&&j.get(z(d))?1:-1;case 32:a=c-d;break;case 64:a=d-c;break;case 135266319:a=
JU.Measure.distanceToPlane(g,b);break;case 1276118018:a=JU.MeshSurface.minDist(b,f)-c;break;default:a=-JU.MeshSurface.minDist(b,f)-c}return 1E-4>Math.abs(a)?0:a},"~N,JU.T3,~N,~N,JU.P4,~A,JU.BS");c$.minDist=c(c$,"minDist",function(a,b){for(var d=2147483647,c=b.length;0<=--c;){var g=b[c].distance(a);g<d&&(d=g)}return d},"JU.T3,~A");c(c$,"interpolateSphere",function(a,b,d,c,g,f,j,h,l,m){return JU.MeshSurface.interpolateFraction(a,b,JU.MeshSurface.getSphericalInterpolationFraction(g,d,c,a.distance(b)),
f,j,h,l,m)},"JU.T3,JU.T3,~N,~N,~N,~N,~N,~A,~A,~N");c$.interpolatePoint=c(c$,"interpolatePoint",function(a,b,d,c,g,f,j,h,l){return JU.MeshSurface.interpolateFraction(a,b,d/(d+c),g,f,j,h,l)},"JU.T3,JU.T3,~N,~N,~N,~N,~A,~A,~N");c$.interpolateFraction=c(c$,"interpolateFraction",function(a,b,d,c,g,f,j,h){1E-4>d?d=0:0.9999<d&&(d=1);j[h]=d;f[h]=(g-c)*d+c;return JU.P3.new3(a.x+(b.x-a.x)*d,a.y+(b.y-a.y)*d,a.z+(b.z-a.z)*d)},"JU.T3,JU.T3,~N,~N,~N,~A,~A,~N");c$.getSphericalInterpolationFraction=c(c$,"getSphericalInterpolationFraction",
function(a,b,d,c){b=Math.abs(a+b)/c;d=Math.abs(a+d)/c;a/=c;c=b*b;var g=c-d*d+1;return(g+(b<d?1:-1)*Math.sqrt(g*g+4*(a*a-c)))/2},"~N,~N,~N,~N");c$.getSphereData=c(c$,"getSphereData",function(a){JU.Geodesic.createGeodesic(a);var b=JU.Geodesic.getVertexCount(a),d=JU.Geodesic.getFaceVertexes(a),c=q(d.length/3);a=JU.AU.newInt2(c);for(var g=0,f=0;g<c;g++)a[g]=[d[f++],d[f++],d[f++]];d=Array(b);for(g=0;g<b;g++)d[g]=JU.Geodesic.getVertexVector(g);return JU.MeshSurface.newMesh(!0,d,0,a,d,0)},"~N");C(c$,"SEED_COUNT",
25)});n("JU");w(["JU.Geodesic"],"JU.Normix",["JU.BS"],function(){c$=B(JU,"Normix");c$.getNormixCount=c(c$,"getNormixCount",function(){return 1<JU.Normix.normixCount?JU.Normix.normixCount:JU.Normix.normixCount=JU.Geodesic.getVertexCount(3)});c$.newVertexBitSet=c(c$,"newVertexBitSet",function(){return JU.BS.newN(JU.Normix.getNormixCount())});c$.getVertexVectors=c(c$,"getVertexVectors",function(){null==JU.Normix.vertexVectors&&(JU.Normix.vertexVectors=JU.Geodesic.getVertexVectors());return JU.Normix.vertexVectors});
c$.setInverseNormixes=c(c$,"setInverseNormixes",function(){if(null==JU.Normix.inverseNormixes){JU.Normix.getNormixCount();JU.Normix.getVertexVectors();JU.Normix.inverseNormixes=T(JU.Normix.normixCount,0);for(var a=new JU.BS,b=JU.Normix.normixCount;0<=--b;){var d=JU.Normix.vertexVectors[b];JU.Normix.inverseNormixes[b]=JU.Normix.getNormix(-d.x,-d.y,-d.z,3,a)}}});c$.getInverseNormix=c(c$,"getInverseNormix",function(a){return JU.Normix.inverseNormixes[a]},"~N");c$.getNeighborVertexArrays=c(c$,"getNeighborVertexArrays",
function(){null==JU.Normix.neighborVertexesArrays&&(JU.Normix.neighborVertexesArrays=JU.Geodesic.getNeighborVertexesArrays());return JU.Normix.neighborVertexesArrays});c$.getNormixV=c(c$,"getNormixV",function(a,b){return JU.Normix.getNormix(a.x,a.y,a.z,3,b)},"JU.V3,JU.BS");c$.get2SidedNormix=c(c$,"get2SidedNormix",function(a,b){return~JU.Normix.getNormixV(a,b)},"JU.V3,JU.BS");c$.getNormix=c(c$,"getNormix",function(a,b,d,c,g){var f,j;0<=d?(f=0,j=d-1):(f=11,j=d- -1);g.clearAll();g.set(f);JU.Normix.getVertexVectors();
JU.Normix.getNeighborVertexArrays();j=a*a+b*b+j*j;for(var h=0;h<=c;++h)for(var l=JU.Normix.neighborVertexesArrays[h],m=6*f,r=m+(12>f?5:6);--r>=m;){var n=l[r];if(!g.get(n)){g.set(n);var q=JU.Normix.vertexVectors[n],p;p=q.x-a;var s=p*p;s>=j||(p=q.y-b,s+=p*p,s>=j||(p=q.z-d,s+=p*p,s>=j||(f=n,j=s)))}}return f},"~N,~N,~N,~N,JU.BS");C(c$,"NORMIX_GEODESIC_LEVEL",3,"normixCount",0,"vertexVectors",null,"inverseNormixes",null,"neighborVertexesArrays",null,"NORMIX_NULL",9999)});n("JU");w(null,"JU.Parser",["java.lang.Float",
"JU.PT"],function(){c$=B(JU,"Parser");c$.parseStringInfestedFloatArray=c(c$,"parseStringInfestedFloatArray",function(a,b,d){return JU.Parser.parseFloatArrayBsData(JU.PT.getTokens(a),b,d)},"~S,JU.BS,~A");c$.parseFloatArrayBsData=c(c$,"parseFloatArrayBsData",function(a,b,d){for(var c=d.length,g=a.length,f=0,j=0,h=null!=b,l=h?b.nextSetBit(0):0;0<=l&&l<c&&f<g;l=h?b.nextSetBit(l+1):l+1){for(var m;Float.isNaN(m=JU.PT.parseFloat(a[f++]))&&f<g;);Float.isNaN(m)||(d[j=l]=m);if(f==g)break}return j+1},"~A,JU.BS,~A");
c$.parseFloatArrayFromMatchAndField=c(c$,"parseFloatArrayFromMatchAndField",function(a,b,d,c,g,f,j,h,l){var m,r=-1,n=null!=g,q=JU.Parser.markLines(a,0<=a.indexOf("\n")?"\n":";");l=1>=l||l>=q.length?0:l-1;var p=0==l?0:q[l-1],s=q.length;null==h&&(h=L(s-l,0));for(var t=h.length,u=0>=j?Math.max(f,d):Math.max(f+j,d+c)-1,v=null!=b;l<s;l++){var w=a.substring(p,q[l]).trim(),p=q[l],y=0>=j?JU.PT.getTokens(w):null;if(0>=j){if(y.length<u||Float.isNaN(m=JU.PT.parseFloat(y[f-1])))continue}else if(w.length<u||Float.isNaN(m=
JU.PT.parseFloat(w.substring(f-1,f+j-1))))continue;if(n){w=JU.PT.parseInt(null==y?w.substring(d-1,d+c-1):y[d-1]);if(-2147483648==w||0>w||w>=t||0>(w=g[w]))continue;v&&b.set(w)}else{v?r=b.nextSetBit(r+1):r++;if(0>r||r>=t)break;w=r}h[w]=m}return h},"~S,JU.BS,~N,~N,~A,~N,~N,~A,~N");c$.fixDataString=c(c$,"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");c$.markLines=c(c$,"markLines",function(a,
b){for(var d=0,c=a.length;0<=--c;)a.charAt(c)==b&&d++;for(var c=D(d+1,0),g=d=0;0<=(g=a.indexOf(b,g));)c[d++]=++g;c[d]=a.length;return c},"~S,~S")});n("JU");w(["JU.P3"],"JU.Point3fi",null,function(){c$=t(function(){this.mi=-1;this.sZ=this.sY=this.sX=this.i=0;this.sD=-1;s(this,arguments)},JU,"Point3fi",JU.P3,Cloneable);c$.set2=c(c$,"set2",function(a,b){a.x=b.x;a.y=b.y;a.z=b.z},"JU.P3,JU.P3i");c(c$,"copy",function(){try{return this.clone()}catch(a){if(y(a,CloneNotSupportedException))return null;throw a;
}})});n("JU");c$=t(function(){this.height=this.width=this.y=this.x=0;s(this,arguments)},JU,"Rectangle");c(c$,"contains",function(a,b){return a>=this.x&&b>=this.y&&a-this.x<this.width&&b-this.y<this.height},"~N,~N");n("JU");w(null,"JU.Rgb16",["JU.SB"],function(){c$=t(function(){this.b=this.g=this.r=0;s(this,arguments)},JU,"Rgb16");u(c$,function(){});c$.newI=c(c$,"newI",function(a){var b=new JU.Rgb16;b.setInt(a);return b},"~N");c(c$,"setInt",function(a){this.r=a>>8&65280|128;this.g=a&65280|128;this.b=
a<<8&65280|128},"~N");c(c$,"setRgb",function(a){this.r=a.r;this.g=a.g;this.b=a.b},"JU.Rgb16");c(c$,"diffDiv",function(a,b,d){this.r=q((a.r-b.r)/d);this.g=q((a.g-b.g)/d);this.b=q((a.b-b.b)/d)},"JU.Rgb16,JU.Rgb16,~N");c(c$,"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(c$,"getArgb",function(){return 4278190080|this.r<<8&16711680|this.g&65280|this.b>>8});h(c$,"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()})});n("JU");w(["JU.AU","$.V3"],"JU.Shader",["JU.CU","JU.C"],function(){c$=t(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;s(this,arguments)},JU,"Shader");K(c$,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(c$,function(){this.setLightSource(-1,-1,2.5)});c(c$,"setLightSource",function(a,b,d){this.lightSource.set(a,b,d);this.lightSource.normalize();this.xLight=this.lightSource.x;this.yLight=this.lightSource.y;this.zLight=this.lightSource.z},"~N,~N,~N");c(c$,"setCel",function(a,b,d){a=a&&0!=b;d=JU.C.getArgb(JU.C.getBgContrast(d));d=4278190080==d?4278453252:-1==d?-2:d+1;this.celOn==a&&this.celRGB==d&&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=d,this.flushCaches())},"~B,~N,~N");c(c$,"flushCaches",function(){this.flushShades();this.flushSphereCache()});c(c$,"setLastColix",function(a,b){JU.C.allocateColix(a);this.checkShades();b&&JU.C.setLastGrey(a);this.ashades[2047]=this.getShades2(a,!1)},"~N,~B");c(c$,"getShades",function(a){this.checkShades();a&=-30721;var b=this.ashades[a];null==b&&(b=this.ashades[a]=this.getShades2(JU.C.argbs[a],!1));
return b},"~N");c(c$,"getShadesG",function(a){this.checkShades();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(c$,"checkShades",function(){null!=this.ashades&&this.ashades.length==JU.C.colixMax||(this.ashades=JU.AU.arrayCopyII(this.ashades,JU.C.colixMax),null!=this.ashadesGreyscale&&(this.ashadesGreyscale=JU.AU.arrayCopyII(this.ashadesGreyscale,
JU.C.colixMax)))});c(c$,"flushShades",function(){this.checkShades();for(var a=JU.C.colixMax;0<=--a;)this.ashades[a]=null;this.calcSphereShading()});c(c$,"getShades2",function(a,b){var d=D(64,0);if(0==a)return d;for(var c=a>>16&255,g=a>>8&255,f=a&255,j=0,h=0,l=0,m=this.ambientFraction;;)if(j=c*m+0.5,h=g*m+0.5,l=f*m+0.5,0<m&&4>j&&4>h&&4>l)c++,g++,f++,0.1>m&&(m+=0.1),a=JU.CU.rgb(q(Math.floor(c)),q(Math.floor(g)),q(Math.floor(f)));else break;var r=0,m=(1-m)/52,c=c*m,g=g*m,f=f*m;if(this.celOn){m=JU.CU.rgb(q(Math.floor(j)),
q(Math.floor(h)),q(Math.floor(l)));if(0<=this.celPower)for(;32>r;++r)d[r]=m;h+=32*g;l+=32*f;for(m=JU.CU.rgb(q(Math.floor(j+32*c)),q(Math.floor(h)),q(Math.floor(l)));64>r;r++)d[r]=m;d[0]=d[1]=this.celRGB}else{for(;52>r;++r)d[r]=JU.CU.rgb(q(Math.floor(j)),q(Math.floor(h)),q(Math.floor(l))),j+=c,h+=g,l+=f;d[r++]=a;m=this.intenseFraction/(64-r);c=(255.5-j)*m;g=(255.5-h)*m;for(f=(255.5-l)*m;64>r;r++)j+=c,h+=g,l+=f,d[r]=JU.CU.rgb(q(Math.floor(j)),q(Math.floor(h)),q(Math.floor(l)))}if(b)for(;0<=--r;)d[r]=
JU.CU.toFFGGGfromRGB(d[r]);return d},"~N,~B");c(c$,"getShadeIndex",function(a,b,d){var c=Math.sqrt(a*a+b*b+d*d);return Math.round(63*this.getShadeF(a/c,b/c,d/c))},"~N,~N,~N");c(c$,"getShadeB",function(a,b,d){return Math.round(63*this.getShadeF(a,b,d))},"~N,~N,~N");c(c$,"getShadeFp8",function(a,b,d){var c=Math.sqrt(a*a+b*b+d*d);return q(Math.floor(16128*this.getShadeF(a/c,b/c,d/c)))},"~N,~N,~N");c(c$,"getShadeF",function(a,b,d){b=this.useLight?a*this.xLight+b*this.yLight+d*this.zLight:d;if(0>=b)return 0;
a=b*this.diffuseFactor;if(this.specularOn&&(b=2*b*d-this.zLight,0<b)){if(this.usePhongExponent)b=Math.pow(b,this.phongExponent);else for(var c=this.specularExponent;0<=--c&&1E-4<b;)b*=b;a+=b*this.specularFactor}return this.celOn&&d<this.celZ?0:1<a?1:a},"~N,~N,~N");c(c$,"getShadeN",function(a,b,d,c){b=q(Math.floor(16128*this.getShadeF(a/c,b/c,d/c)));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(c$,
"calcSphereShading",function(){for(var a=-127.5,b=0;256>b;++a,++b)for(var d=-127.5,c=a*a,g=0;256>g;++d,++g){var f=0,j=16900-c-d*d;0<j&&(f=Math.sqrt(j),f=this.getShadeN(a,d,f,130));this.sphereShadeIndexes[(g<<8)+b]=f}});c(c$,"nextRandom8Bit",function(){var a=this.seed;this.seed=a=(a<<16)+(a<<1)+a&2147483647;return a>>23});c(c$,"getEllipsoidShade",function(a,b,d,c,g){var f=g.m00*a+g.m01*b+g.m02*d+g.m03,j=g.m10*a+g.m11*b+g.m12*d+g.m13;a=g.m20*a+g.m21*b+g.m22*d+g.m23;c=Math.min(c/2,45)/Math.sqrt(f*f+
j*j+a*a);f=z(-f*c);j=z(-j*c);c=z(a*c);if(a=-20>f||20<=f||-20>j||20<=j||0>c||40<=c){for(;0==f%2&&0==j%2&&0==c%2&&0<f+j+c;)f>>=1,j>>=1,c>>=1;a=-20>f||20<=f||-20>j||20<=j||0>c||40<=c}a?this.nOut++:this.nIn++;return a?this.getShadeIndex(f,j,c):this.ellipsoidShades[f+20][j+20][c]},"~N,~N,~N,~N,JU.M4");c(c$,"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 d=0;40>d;d++)this.ellipsoidShades[a][b][d]=this.getShadeIndex(a-20,b-20,d)});c(c$,
"flushSphereCache",function(){for(var a=128;0<=--a;)this.sphereShapeCache[a]=null;this.ellipsoidShades=null});c(c$,"occludePixels",function(a,b,d,c,g){a=b.length;for(var f=d=0,j=0;j<a;j++){var h=Math.min(b[j]>>5,0);if(0!=h){for(var l=Math.min(c,d+h),m=Math.min(g,f+h),r=Math.max(0,d-h);r<l;r++)for(var n=Math.max(0,f-h);n<m;n++);++d==c&&(d=0,f++)}}},"~A,~A,~A,~N,~N,~N");C(c$,"SHADE_INDEX_MAX",64,"SHADE_INDEX_LAST",63,"SHADE_INDEX_NORMAL",52,"SHADE_INDEX_NOISY_LIMIT",56,"SLIM",20,"SDIM",40,"maxSphereCache",
128)});n("JU");w(null,"JU.SimpleUnitCell",["java.lang.Float","JU.AU","$.M4","$.V3"],function(){c$=t(function(){this.matrixFractionalToCartesian=this.matrixCartesianToFractional=this.notionalUnitcell=null;this.dimension=this.c_=this.b_=this.a_=this.cB_=this.cA_=this.volume=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;this.matrixFtoCNoOffset=this.matrixCtoFANoOffset=null;s(this,arguments)},
JU,"SimpleUnitCell");c(c$,"isSupercell",function(){return 1<this.na||1<this.nb||1<this.nc});c$.isValid=c(c$,"isValid",function(a){return null!=a&&(0<a[0]||14<a.length&&!Float.isNaN(a[14]))},"~A");u(c$,function(){});c$.newA=c(c$,"newA",function(a){var b=new JU.SimpleUnitCell;b.init(a);return b},"~A");c(c$,"init",function(a){null==a&&(a=[1,1,1,90,90,90]);if(JU.SimpleUnitCell.isValid(a)){this.notionalUnitcell=JU.AU.arrayCopyF(a,a.length);this.a=a[0];this.b=a[1];this.c=a[2];this.alpha=a[3];this.beta=
a[4];this.gamma=a[5];this.na=Math.max(1,25<=a.length&&!Float.isNaN(a[22])?z(a[22]):1);this.nb=Math.max(1,25<=a.length&&!Float.isNaN(a[23])?z(a[23]):1);this.nc=Math.max(1,25<=a.length&&!Float.isNaN(a[24])?z(a[24]):1);if(0>=this.a){var b=JU.V3.new3(a[6],a[7],a[8]),d=JU.V3.new3(a[9],a[10],a[11]),c=JU.V3.new3(a[12],a[13],a[14]);this.a=b.length();this.b=d.length();this.c=c.length();if(0==this.a)return;0==this.b?this.b=this.c=-1:0==this.c&&(this.c=-1);this.alpha=0>this.b||0>this.c?90:d.angle(c)/0.017453292;
this.beta=0>this.c?90:b.angle(c)/0.017453292;this.gamma=0>this.b?90:b.angle(d)/0.017453292;0>this.c&&(a=JU.AU.arrayCopyF(a,-1),0>this.b&&(d.set(0,0,1),d.cross(d,b),0.001>d.length()&&d.set(0,1,0),d.normalize(),a[9]=d.x,a[10]=d.y,a[11]=d.z),0>this.c&&(c.cross(b,d),c.normalize(),a[12]=c.x,a[13]=c.y,a[14]=c.z))}this.a*=this.na;0>=this.b?this.dimension=this.b=this.c=1:0>=this.c?(this.c=1,this.b*=this.nb,this.dimension=2):(this.b*=this.nb,this.c*=this.nc,this.dimension=3);this.cosAlpha=Math.cos(0.017453292*
this.alpha);this.sinAlpha=Math.sin(0.017453292*this.alpha);this.cosBeta=Math.cos(0.017453292*this.beta);this.sinBeta=Math.sin(0.017453292*this.beta);this.cosGamma=Math.cos(0.017453292*this.gamma);this.sinGamma=Math.sin(0.017453292*this.gamma);b=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*b;this.cA_=(this.cosAlpha-this.cosBeta*this.cosGamma)/this.sinGamma;this.cB_=b/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;if(21<a.length&&!Float.isNaN(a[21])){b=L(16,0);for(d=0;16>d;d++){switch(d%4){case 0:c=this.na;break;case 1:c=this.nb;break;case 2:c=this.nc;break;default:c=1}b[d]=a[6+d]*c}this.matrixCartesianToFractional=JU.M4.newA16(b);this.matrixFractionalToCartesian=new JU.M4;this.matrixFractionalToCartesian.invertM(this.matrixCartesianToFractional)}else 14<a.length&&!Float.isNaN(a[14])?
(b=this.matrixFractionalToCartesian=new JU.M4,b.setColumn4(0,a[6]*this.na,a[7]*this.na,a[8]*this.na,0),b.setColumn4(1,a[9]*this.nb,a[10]*this.nb,a[11]*this.nb,0),b.setColumn4(2,a[12]*this.nc,a[13]*this.nc,a[14]*this.nc,0)):(b=this.matrixFractionalToCartesian=new JU.M4,b.setColumn4(0,this.a,0,0,0),b.setColumn4(1,this.b*this.cosGamma,this.b*this.sinGamma,0,0),b.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)),b.setColumn4(3,0,0,0,1),this.matrixCartesianToFractional=new JU.M4,this.matrixCartesianToFractional.invertM(this.matrixFractionalToCartesian);this.matrixCtoFANoOffset=this.matrixCartesianToFractional;this.matrixFtoCNoOffset=this.matrixFractionalToCartesian}},"~A");c(c$,"toSupercell",function(a){a.x/=this.na;a.y/=this.nb;a.z/=this.nc;return a},"JU.P3");c(c$,"toCartesian",function(a,b){null!=this.matrixFractionalToCartesian&&(b?this.matrixFtoCNoOffset:this.matrixFractionalToCartesian).rotTrans(a)},
"JU.T3,~B");c(c$,"toFractional",function(a,b){null!=this.matrixCartesianToFractional&&(b?this.matrixCtoFANoOffset:this.matrixCartesianToFractional).rotTrans(a)},"JU.T3,~B");c(c$,"isPolymer",function(){return 1==this.dimension});c(c$,"isSlab",function(){return 2==this.dimension});c(c$,"getNotionalUnitCell",function(){return this.notionalUnitcell});c(c$,"getUnitCellAsArray",function(a){var b=this.matrixFractionalToCartesian;return a?[b.m00,b.m10,b.m20,b.m01,b.m11,b.m21,b.m02,b.m12,b.m22]:[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.volume]},"~B");c(c$,"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}return NaN},"~N");c$.ijkToPoint3f=c(c$,"ijkToPoint3f",function(a,b,d){var c=1E9<a?1E3:1E6<a?100:10,g=c*c;d-=0<=d?q(5*c/10):d;b.x=q(a/g)%c+d;b.y=q(a%g/c)+d;b.z=a%c+d},"~N,JU.P3,~N");
C(c$,"toRadians",0.017453292,"INFO_DIMENSIONS",6,"INFO_GAMMA",5,"INFO_BETA",4,"INFO_ALPHA",3,"INFO_C",2,"INFO_B",1,"INFO_A",0)});n("JU");w(null,"JU.TempArray",["java.lang.Boolean","$.Float","JU.P3","$.P3i"],function(){c$=t(function(){this.freeEnum=this.lengthsFreeEnum=this.freeScreens=this.lengthsFreeScreens=this.freePoints=this.lengthsFreePoints=null;s(this,arguments)},JU,"TempArray");K(c$,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(c$,function(){});c(c$,"clear",function(){this.clearTempPoints();this.clearTempScreens()});c$.findBestFit=c(c$,"findBestFit",function(a,b){for(var d=-1,c=2147483647,g=b.length;0<=--g;){var f=b[g];f>=a&&f<c&&(c=f,d=g)}0<=d&&(b[d]=0);return d},"~N,~A");c$.findShorter=c(c$,"findShorter",function(a,b){for(var d=b.length;0<=--d;)if(0==b[d])return b[d]=a,d;for(var c=0,g=b[0],d=b.length;0<--d;)b[d]<g&&(g=b[d],c=d);return g<a?(b[c]=a,c):-1},"~N,~A");
c(c$,"clearTempPoints",function(){for(var a=0;6>a;a++)this.lengthsFreePoints[a]=0,this.freePoints[a]=null});c(c$,"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(c$,"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(c$,"clearTempScreens",function(){for(var a=0;6>a;a++)this.lengthsFreeScreens[a]=0,this.freeScreens[a]=null});c(c$,"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(c$,"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(c$,"allocTempEnum",function(a){var b=JU.TempArray.findBestFit(a,this.lengthsFreeEnum);return 0<b?this.freeEnum[b]:Array(a)},"~N");c(c$,"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");c$.getSlabWithinRange=c(c$,"getSlabWithinRange",function(a,b){return[Integer.$valueOf(1073742114),[Float.$valueOf(a),
Float.$valueOf(b)],Boolean.FALSE,null]},"~N,~N");c$.getSlabObjectType=c(c$,"getSlabObjectType",function(a,b,d,c){return[Integer.$valueOf(a),b,Boolean.$valueOf(d),c]},"~N,~O,~B,~O");C(c$,"freePointsSize",6,"freeScreensSize",6,"freeEnumSize",2)});n("JU");w(null,"JU.Txt",["java.lang.Character","$.Double","$.Float","JU.PT","$.SB"],function(){c$=B(JU,"Txt");c$.formatStringS=c(c$,"formatStringS",function(a,b,d){return JU.Txt.formatString(a,b,d,NaN,NaN,!1)},"~S,~S,~S");c$.formatStringF=c(c$,"formatStringF",
function(a,b,d){return JU.Txt.formatString(a,b,null,d,NaN,!1)},"~S,~S,~N");c$.formatStringI=c(c$,"formatStringI",function(a,b,d){return JU.Txt.formatString(a,b,""+d,NaN,NaN,!1)},"~S,~S,~N");c$.sprintf=c(c$,"sprintf",function(a,b,d){if(null==d)return a;var c=b.length;if(c==d.length)try{for(var g=0;g<c;g++)if(null!=d[g])switch(b.charAt(g)){case "s":a=JU.Txt.formatString(a,"s",d[g],NaN,NaN,!0);break;case "f":a=JU.Txt.formatString(a,"f",null,d[g].floatValue(),NaN,!0);break;case "i":a=JU.Txt.formatString(a,
"d",""+d[g],NaN,NaN,!0);a=JU.Txt.formatString(a,"i",""+d[g],NaN,NaN,!0);break;case "d":a=JU.Txt.formatString(a,"e",null,NaN,d[g].doubleValue(),!0);break;case "p":var f=d[g];a=JU.Txt.formatString(a,"p",null,f.x,NaN,!0);a=JU.Txt.formatString(a,"p",null,f.y,NaN,!0);a=JU.Txt.formatString(a,"p",null,f.z,NaN,!0);break;case "q":var j=d[g];a=JU.Txt.formatString(a,"q",null,j.x,NaN,!0);a=JU.Txt.formatString(a,"q",null,j.y,NaN,!0);a=JU.Txt.formatString(a,"q",null,j.z,NaN,!0);a=JU.Txt.formatString(a,"q",null,
j.w,NaN,!0);break;case "S":for(var h=d[g],l=0;l<h.length;l++)a=JU.Txt.formatString(a,"s",h[l],NaN,NaN,!0);break;case "F":for(var m=d[g],l=0;l<m.length;l++)a=JU.Txt.formatString(a,"f",null,m[l],NaN,!0);break;case "I":for(var r=d[g],l=0;l<r.length;l++)a=JU.Txt.formatString(a,"d",""+r[l],NaN,NaN,!0);for(l=0;l<r.length;l++)a=JU.Txt.formatString(a,"i",""+r[l],NaN,NaN,!0);break;case "D":for(var n=d[g],l=0;l<n.length;l++)a=JU.Txt.formatString(a,"e",null,NaN,n[l],!0)}return JU.PT.rep(a,"%%","%")}catch(q){if(!y(q,
Exception))throw q;}System.out.println("TextFormat.sprintf error "+b+" "+a);return JU.PT.rep(a,"%","?")},"~S,~S,~A");c$.formatString=c(c$,"formatString",function(a,b,d,c,g,f){if(null==a)return null;if("".equals(a))return"";var j=b.length;if(0>a.indexOf("%")||0==j||0>a.indexOf(b))return a;var h="",l,m,r;for(l=0;0<=(m=a.indexOf("%",l))&&0<=(r=a.indexOf(b,m+1));)if(l!=m&&(h+=a.substring(l,m)),l=m+1,r>m+6)h+="%";else try{var n=!1;"-"==a.charAt(l)&&(n=!0,++l);var q=!1;"0"==a.charAt(l)&&(q=!0,++l);for(var p,
s=0;"0"<=(p=a.charAt(l))&&"9">=p;)s=10*s+(p.charCodeAt(0)-48),++l;var t=2147483647,u=!1;if("."==a.charAt(l)){++l;if("-"==(p=a.charAt(l)))u=!0,++l;if("0"<=(p=a.charAt(l))&&"9">=p)t=p.charCodeAt(0)-48,++l;u&&(t=-t-(null==d?1:0))}if(a.substring(l,l+j).equals(b)){if(l+=j,Float.isNaN(c)?null!=d?h+=JU.PT.formatS(d,s,t,n,q):Double.isNaN(g)||(h+=JU.PT.formatD(g,s,t,n,q,!0)):h+=JU.PT.formatF(c,s,t,n,q),f)break}else l=m+1,h+="%"}catch(v){if(y(v,IndexOutOfBoundsException)){l=m;break}else throw v;}return h+=
a.substring(l)},"~S,~S,~S,~N,~N,~B");c$.formatCheck=c(c$,"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 b=new JU.SB;b.append(a[0]);for(var d=1;d<a.length;d++){var c="%"+a[d],g;if(3<=c.length){if(0<=(g=c.indexOf("p")))c=JU.Txt.fdup(c,g,3);if(0<=(g=c.indexOf("q")))c=JU.Txt.fdup(c,g,4)}b.append(c)}return b.toString().$replace("\u0001","%")},"~S");c$.fdup=c(c$,
"fdup",function(a,b,d){for(var c,g=0,f=b;1<=--f;)if(!Character.isDigit(c=a.charAt(f)))switch(c){case ".":if(0!=g++)return a;continue;case "-":if(1!=f&&"."!=a.charAt(f-1))return a;continue;default:return a}c=a.substring(0,b+1);g=new JU.SB;for(f=0;f<d;f++)g.append(c);g.append(a.substring(b+1));return g.toString()},"~S,~N,~N");c$.leftJustify=c(c$,"leftJustify",function(a,b,d){a.append(d);d=b.length-d.length;0<d&&a.append(b.substring(0,d))},"JU.SB,~S,~S");c$.rightJustify=c(c$,"rightJustify",function(a,
b,d){var c=b.length-d.length;0<c&&a.append(b.substring(0,c));a.append(d)},"JU.SB,~S,~S");c$.safeTruncate=c(c$,"safeTruncate",function(a,b){-0.001<a&&0.001>a&&(a=0);return(a+"         ").substring(0,b)},"~N,~N");c$.isWild=c(c$,"isWild",function(a){return null!=a&&(0<=a.indexOf("*")||0<=a.indexOf("?"))},"~S");c$.isMatch=c(c$,"isMatch",function(a,b,d,c){if(a.equals(b))return!0;var g=b.length;if(0==g)return!1;var f=d&&c?"*"==b.charAt(0):!1;if(1==g&&f)return!0;var j=d&&b.endsWith("*");if(!(0<=b.indexOf("?"))){if(f)return j?
3>g||0<=a.indexOf(b.substring(1,g-1)):a.endsWith(b.substring(1));if(j)return a.startsWith(b.substring(0,g-1))}for(var h=a.length,l="????",m=4;m<h;)l+=l,m+=4;d&&(f&&(b=l+b.substring(1),g+=m-1),j&&(b=b.substring(0,g-1)+l,g+=m-1));if(g<h)return!1;for(d=0;g>h;){if(c&&"?"==b.charAt(d))++d;else if("?"!=b.charAt(d+g-1))return!1;--g}for(c=h;0<=--c;)if(g=b.charAt(d+c),"?"!=g&&(h=a.charAt(c),g!=h&&("\u0001"!=g||"?"!=h)))return!1;return!0},"~S,~S,~B,~B");c$.replaceQuotedStrings=c(c$,"replaceQuotedStrings",function(a,
b,d){for(var c=b.size(),g=0;g<c;g++){var f=b.get(g),j=d.get(g);j.equals(f)||(a=JU.PT.rep(a,'"'+f+'"','"'+j+'"'))}return a},"~S,java.util.List,java.util.List");c$.replaceStrings=c(c$,"replaceStrings",function(a,b,d){for(var c=b.size(),g=0;g<c;g++){var f=b.get(g),j=d.get(g);j.equals(f)||(a=JU.PT.rep(a,f,j))}return a},"~S,java.util.List,java.util.List");c$.ichMathTerminator=c(c$,"ichMathTerminator",function(a,b,d){for(var c=1,g="\x00",f="\x00";0<c&&++b<d;){var j=a.charAt(b);if("\x00"!=g)"\\"==f?j="\x00":
j==g&&(g="\x00"),f=j;else switch(j){case "'":case '"':g=j;break;case "{":c++;break;case "}":c--}}return b},"~S,~N,~N")});n("JU");w(["JU.V3"],"JU.Vibration",null,function(){c$=t(function(){this.modDim=-1;s(this,arguments)},JU,"Vibration",JU.V3);c(c$,"setTempPoint",function(a,b,d){-1<=this.modDim&&a.scaleAdd2(Math.cos(6.283185307179586*b.x)*d,this,a)},"JU.T3,JU.T3,~N,~N");c(c$,"getInfo",function(a){a.put("vibVector",JU.V3.newV(this));a.put("vibType",-3==this.modDim?"displacement":-2==this.modDim?"spin":
-1==this.modDim?"vib":"mod")},"java.util.Map");c(c$,"getUnitCell",function(){return null});h(c$,"clone",function(){var a=new JU.Vibration;a.setT(this);a.modDim=this.modDim;return a});C(c$,"twoPI",6.283185307179586,"TYPE_MODULATION",0,"TYPE_VIBRATION",-1,"TYPE_SPIN",-2,"TYPE_DISPLACEMENT",-3)});n("JV");w(["javajs.api.EventManager","JU.Rectangle","JV.MouseState"],"JV.ActionManager","java.lang.Character $.Float JU.P3 $.PT J.api.Interface J.i18n.GT J.thread.HoverWatcherThread JU.BSUtil $.Escape $.Logger $.Point3fi JV.binding.Binding $.JmolBinding".split(" "),
function(){c$=t(function(){this.vwr=null;this.haveMultiTouchInput=!1;this.predragBinding=this.rasmolBinding=this.dragBinding=this.pfaatBinding=this.jmolBinding=this.b=null;this.LEFT_DRAGGED=this.LEFT_CLICKED=0;this.hoverWatcherThread=null;N("JV.ActionManager.MotionPoint")||JV.ActionManager.$ActionManager$MotionPoint$();this.dragGesture=null;N("JV.ActionManager.Gesture")||JV.ActionManager.$ActionManager$Gesture$();this.apm=1;this.pickingStyleSelect=this.pickingStyle=this.bondPickingMode=0;this.pickingStyleMeasure=
5;this.rootPickingStyle=0;this.pickAtomAssignType="C";this.pickBondAssignType="p";this.isPickAtomAssignCharge=!1;this.xyRange=0;this.mouseDragFactor=this.gestureSwipeFactor=1;this.mouseWheelFactor=1.15;this.dragged=this.pressed=this.clicked=this.moved=this.current=null;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=!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=!1;s(this,arguments)},JV,"ActionManager",null,javajs.api.EventManager);K(c$,function(){this.dragGesture=M(JV.ActionManager.Gesture,this,null,20);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");this.rectRubber=new JU.Rectangle});c(c$,"setViewer",function(a){this.vwr=a;this.setBinding(this.jmolBinding=new JV.binding.JmolBinding);this.LEFT_CLICKED=JV.binding.Binding.getMouseAction(1,16,2);this.LEFT_DRAGGED=JV.binding.Binding.getMouseAction(1,16,1)},"JV.Viewer,~S");c(c$,"checkHover",function(){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.getAtomPickingMode()&&this.bnd(JV.binding.Binding.getMouseAction(this.clickedCount,this.moved.modifiers,1),10);this.vwr.hoverOn(a,b)}}});c(c$,"processMultitouchEvent",function(){},"~N,~N,~N,~N,JU.P3,~N");c(c$,"bnd",function(a,b){return this.b.isBound(a,b)},"~N,~N");c(c$,"bind",function(a,b){var d=JV.ActionManager.getActionFromName(b),c=JV.binding.Binding.getMouseActionStr(a);0!=c&&(0<=d?this.b.bindAction(c,d):this.b.bindName(c,b))},"~S,~S");c(c$,"clearBindings",
function(){this.setBinding(this.jmolBinding=new JV.binding.JmolBinding);this.rasmolBinding=this.dragBinding=this.pfaatBinding=null});c(c$,"unbindAction",function(a,b){if(null==a&&null==b)this.clearBindings();else{var d=JV.ActionManager.getActionFromName(b),c=JV.binding.Binding.getMouseActionStr(a);0<=d?this.b.unbindAction(c,d):0!=c&&this.b.unbindName(c,b);null==b&&this.b.unbindUserAction(a)}},"~S,~S");c$.newAction=c(c$,"newAction",function(a,b,d){JV.ActionManager.actionInfo[a]=d;JV.ActionManager.actionNames[a]=
b},"~N,~S,~S");c$.getActionName=c(c$,"getActionName",function(a){return a<JV.ActionManager.actionNames.length?JV.ActionManager.actionNames[a]:null},"~N");c$.getActionFromName=c(c$,"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(c$,"getBindingInfo",function(a){return this.b.getBindingInfo(JV.ActionManager.actionInfo,JV.ActionManager.actionNames,a)},"~S");c(c$,"setBinding",function(a){this.b=
a},"JV.binding.Binding");c$.getPickingModeName=c(c$,"getPickingModeName",function(a){return 0>a||a>=JV.ActionManager.pickingModeNames.length?"off":JV.ActionManager.pickingModeNames[a]},"~N");c$.getPickingMode=c(c$,"getPickingMode",function(a){for(var b=JV.ActionManager.pickingModeNames.length;0<=--b;)if(a.equalsIgnoreCase(JV.ActionManager.pickingModeNames[b]))return b;return-1},"~S");c$.getPickingStyleName=c(c$,"getPickingStyleName",function(a){return 0>a||a>=JV.ActionManager.pickingStyleNames.length?
"toggle":JV.ActionManager.pickingStyleNames[a]},"~N");c$.getPickingStyleIndex=c(c$,"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(c$,"getAtomPickingMode",function(){return this.apm});c(c$,"setPickingMode",function(a){var b=!1;switch(a){case -1:b=!0;this.bondPickingMode=35;a=1;break;case 35:case 34:case 33:this.vwr.setBooleanProperty("bondPicking",!0);this.bondPickingMode=
a;return;case 8:this.bondPickingMode=a;if(this.vwr.getBondPicking())return;b=!0}b=(new Boolean(b|this.apm!=a)).valueOf();this.apm=a;b&&this.resetMeasurement()},"~N");c(c$,"setAtomPickingOption",function(a){switch(this.apm){case 32:this.pickAtomAssignType=a,this.isPickAtomAssignCharge=this.pickAtomAssignType.equals("Pl")||this.pickAtomAssignType.equals("Mi")}},"~S");c(c$,"setBondPickingOption",function(a){switch(this.bondPickingMode){case 33:this.pickBondAssignType=Character.toLowerCase(a.charAt(0))}},
"~S");c(c$,"getPickingState",function(){var a=";set modelkitMode "+this.vwr.getBoolean(603979883)+";set picking "+JV.ActionManager.getPickingModeName(this.apm);32==this.apm&&(a+="_"+this.pickAtomAssignType);a+=";";0!=this.bondPickingMode&&(a+="set picking "+JV.ActionManager.getPickingModeName(this.bondPickingMode));33==this.bondPickingMode&&(a+="_"+this.pickBondAssignType);return a+";"});c(c$,"getPickingStyle",function(){return this.pickingStyle});c(c$,"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("Pfaat"):this.pfaatBinding);break;case 3:this.b.name.equals("drag")||this.setBinding(null==this.dragBinding?this.dragBinding=JV.binding.Binding.newBinding("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("Rasmol"):this.rasmolBinding);break;default:this.b!==this.jmolBinding&&this.setBinding(this.jmolBinding)}this.b.name.equals("drag")||(this.predragBinding=this.b)},"~N");c(c$,"setGestureSwipeFactor",function(a){this.gestureSwipeFactor=a},"~N");c(c$,"setMouseDragFactor",function(a){this.mouseDragFactor=a},"~N");c(c$,"setMouseWheelFactor",function(a){this.mouseWheelFactor=
a},"~N");c(c$,"setCurrent",function(a,b,d,c){this.vwr.hoverOff();this.current.set(a,b,d,c)},"~N,~N,~N,~N");c(c$,"getCurrentX",function(){return this.current.x});c(c$,"getCurrentY",function(){return this.current.y});c(c$,"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.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(c$,"clearMouseInfo",function(){this.pressedCount=this.clickedCount=0;this.dragGesture.setAction(0,0);this.exitMeasurementMode(null)});c(c$,"isMTClient",function(){return this.isMultiTouchClient});c(c$,"isMTServer",function(){return this.isMultiTouchServer});c(c$,"dispose",function(){this.clear()});
c(c$,"clear",function(){this.startHoverWatcher(!1);null!=this.predragBinding&&(this.b=this.predragBinding);this.vwr.setPickingMode(null,1);this.vwr.setPickingStyle(null,this.rootPickingStyle);this.isAltKeyReleased=!0});c(c$,"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(!y(b,Exception))throw b;}},"~B");c(c$,"setModeMouse",function(a){-1==a&&this.startHoverWatcher(!1)},"~N");h(c$,"keyPressed",function(a,b){if(this.keyProcessing)return!1;this.vwr.hoverOff();this.keyProcessing=!0;switch(a){case 18:this.dragSelectedMode&&this.isAltKeyReleased&&this.vwr.moveSelected(-2147483648,0,-2147483648,-2147483648,-2147483648,null,!1,!1);this.isAltKeyReleased=!1;this.moved.modifiers|=8;break;case 16:this.dragged.modifiers|=1;this.moved.modifiers|=
1;break;case 17:this.moved.modifiers|=2;break;case 27:this.exitMeasurementMode("escape")}var d=8464|this.moved.modifiers;!this.labelMode&&!this.b.isUserAction(d)&&this.checkMotionRotateZoom(d,this.current.x,0,0,!1);if(this.vwr.getBoolean(603979887))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");h(c$,"keyReleased",function(a){switch(a){case 18:this.dragSelectedMode&&this.vwr.moveSelected(2147483647,0,-2147483648,-2147483648,
-2147483648,null,!1,!1);this.isAltKeyReleased=!0;this.moved.modifiers&=-9;break;case 16:this.moved.modifiers&=-2;break;case 17:this.moved.modifiers&=-3}0==this.moved.modifiers&&this.vwr.setCursor(0);if(this.vwr.getBoolean(603979887))switch(a){case 38:case 40:case 37:case 39:this.vwr.navigate(0,0)}},"~N");h(c$,"mouseEnterExit",function(a,b,d,c){this.setCurrent(a,b,d,0);c&&this.exitMeasurementMode("mouseExit")},"~N,~N,~N,~B");c(c$,"setMouseActions",function(a,b,d){this.pressAction=JV.binding.Binding.getMouseAction(a,
b,d?5:4);this.dragAction=JV.binding.Binding.getMouseAction(a,b,1);this.clickAction=JV.binding.Binding.getMouseAction(a,b,2)},"~N,~N,~B");h(c$,"mouseAction",function(a,b,d,c,g,f){if(this.vwr.getMouseEnabled())switch(JU.Logger.debuggingHigh&&0!=a&&this.vwr.showString("mouse action: "+a+" "+f+" "+JV.binding.Binding.getMouseActionName(JV.binding.Binding.getMouseAction(g,f,a),!1),!1),a){case 0:this.setCurrent(b,d,c,f);this.moved.setCurrent(this.current,0);if(null!=this.mp||this.hoverActive){this.clickAction=
JV.binding.Binding.getMouseAction(this.clickedCount,f,0);this.checkClickAction(d,c,b,0);break}if(this.isZoomArea(d)){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,d,c,f,b,700)?this.pressedCount+1:1;1==this.pressedCount&&(this.vwr.checkInMotion(1),this.setCurrent(b,d,c,f));this.pressAction=JV.binding.Binding.getMouseAction(this.pressedCount,f,4);this.vwr.setCursor(12);
this.pressed.setCurrent(this.current,1);this.dragged.setCurrent(this.current,1);this.vwr.setFocus();this.dragGesture.setAction(this.dragAction,b);this.checkPressedAction(d,c,b);break;case 1:this.setMouseMode();this.setMouseActions(this.pressedCount,f,!1);a=d-this.dragged.x;g=c-this.dragged.y;this.setCurrent(b,d,c,f);this.dragged.setCurrent(this.current,-1);32!=this.apm&&this.exitMeasurementMode(null);this.dragGesture.add(this.dragAction,d,c,b);this.checkDragWheelAction(this.dragAction,d,c,a,g,b,1);
break;case 5:this.setMouseActions(this.pressedCount,f,!0);this.setCurrent(b,d,c,f);this.vwr.spinXYBy(0,0,0);f=!this.pressed.check(this.xyRange,d,c,f,b,9223372036854775E3);this.checkReleaseAction(d,c,b,f);break;case 3:if(this.vwr.isApplet()&&!this.vwr.hasFocus())break;this.setCurrent(b,this.current.x,this.current.y,f);this.checkDragWheelAction(JV.binding.Binding.getMouseAction(0,f,3),this.current.x,this.current.y,0,c,b,3);break;case 2:this.setMouseMode();this.clickedCount=1<g?g:this.clicked.check(0,
0,0,f,b,700)?this.clickedCount+1:1;1==this.clickedCount&&this.setCurrent(b,d,c,f);this.setMouseActions(this.clickedCount,f,!1);this.clicked.setCurrent(this.current,this.clickedCount);this.vwr.setFocus();if(9!=this.apm&&this.bnd(JV.binding.Binding.getMouseAction(1,f,4),31))break;this.clickAction=JV.binding.Binding.getMouseAction(this.clickedCount,f,2);this.checkClickAction(d,c,b,this.clickedCount)}},"~N,~N,~N,~N,~N,~N");c(c$,"checkPressedAction",function(a,b,d){var c=JV.binding.Binding.getButtonMods(this.pressAction),
g=this.bnd(JV.binding.Binding.getMouseAction(1,c,4),31);if(0!=c){this.pressAction=this.vwr.notifyMouseClicked(a,b,this.pressAction,4);if(0==this.pressAction)return;c=JV.binding.Binding.getButtonMods(this.pressAction)}this.setMouseActions(this.pressedCount,c,!1);JU.Logger.debugging&&JU.Logger.debug(JV.binding.Binding.getMouseActionName(this.pressAction,!1));if(this.drawMode&&(this.bnd(this.dragAction,8)||this.bnd(this.dragAction,9))||this.labelMode&&this.bnd(this.dragAction,10))this.vwr.checkObjectDragged(-2147483648,
0,a,b,this.dragAction);else{this.checkUserAction(this.pressAction,a,b,0,0,d,4);d=!1;switch(this.apm){case 32:d=this.bnd(this.clickAction,0);break;case 28:d=this.bnd(this.dragAction,7)||this.bnd(this.dragAction,14);break;case 26:case 36:case 27:d=this.bnd(this.dragAction,7)||this.bnd(this.dragAction,27)||this.bnd(this.dragAction,14);break;case 29:d=this.bnd(this.dragAction,11)||this.bnd(this.dragAction,14);break;case 30:d=this.bnd(this.dragAction,12)||this.bnd(this.dragAction,27)||this.bnd(this.dragAction,
14)}if(d){if(this.dragAtomIndex=this.vwr.findNearestAtomIndexMovable(a,b,!0),0<=this.dragAtomIndex&&(32==this.apm||31==this.apm)&&this.vwr.isAtomAssignable(this.dragAtomIndex))this.enterMeasurementMode(this.dragAtomIndex),this.mp.addPoint(this.dragAtomIndex,null,!1)}else this.bnd(this.pressAction,23)?(g="j",this.vwr.getBoolean(603979883)&&(g=this.vwr.checkObjectClicked(a,b,this.LEFT_CLICKED),g=null!=g&&"bond".equals(g.get("type"))?"b":0<=this.vwr.findNearestAtomIndex(a,b)?"a":"m"),this.vwr.popupMenu(a,
b,g)):this.dragSelectedMode?(this.haveSelection=!0,g&&(this.haveSelection=0<=this.vwr.findNearestAtomIndexMovable(a,b,!0)),this.haveSelection&&(this.bnd(this.dragAction,13)||this.bnd(this.dragAction,14))&&this.vwr.moveSelected(-2147483648,0,-2147483648,-2147483648,-2147483648,null,!1,!1)):this.checkMotionRotateZoom(this.dragAction,a,0,0,!0)}},"~N,~N,~N");c(c$,"checkDragWheelAction",function(a,b,d,c,g,f,j){var h=JV.binding.Binding.getButtonMods(a);if(0!=h){h=this.vwr.notifyMouseClicked(b,d,JV.binding.Binding.getMouseAction(this.pressedCount,
h,j),j);if(0==h)return;0<h&&(a=h)}if(this.isRubberBandSelect(a))this.calcRectRubberBand(),this.vwr.refresh(3,"rubberBand selection");else if(!this.checkUserAction(a,b,d,c,g,f,j)){if(0<=this.vwr.getRotateBondIndex()){if(this.bnd(a,26)){this.vwr.moveSelected(c,g,-2147483648,b,d,null,!1,!1);return}this.bnd(a,25)||this.vwr.setRotateBondIndex(-1)}f=null;if(0<=this.dragAtomIndex)switch(this.apm){case 26:this.setMotion(13,!0);this.bnd(a,27)&&this.vwr.getBoolean(603979785)?this.vwr.rotateSelected(this.getDegrees(c,
!0),this.getDegrees(g,!1),null):this.vwr.moveSelected(c,g,this.bnd(a,14)?-g:-2147483648,-2147483648,-2147483648,null,!0,!1);return;case 36:case 27:case 30:f=this.vwr.ms.getAtoms(3145754,JU.BSUtil.newAndSetBit(this.dragAtomIndex)),36==this.apm&&f.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(c,!0),this.getDegrees(g,!1),f);
else{switch(this.apm){case 36:case 27:case 30:this.vwr.select(f,!1,0,!0)}this.vwr.moveAtomWithHydrogens(this.dragAtomIndex,c,g,this.bnd(a,14)?-g:-2147483648,f)}return}0<=this.dragAtomIndex&&1==j&&this.bnd(this.clickAction,0)&&32==this.apm?(a=this.vwr.findNearestAtomIndexMovable(b,d,!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.mp.traceX=
b,this.mp.traceY=d,this.vwr.refresh(3,"assignNew"))):!this.drawMode&&!this.labelMode&&this.bnd(a,45)?this.vwr.translateXYBy(c,g):this.dragSelectedMode&&this.haveSelection&&(this.bnd(a,13)||this.bnd(a,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,!1,!1),this.setMotion(13,!0),this.bnd(a,27)&&this.vwr.getBoolean(603979785)?this.vwr.rotateSelected(this.getDegrees(c,
!0),this.getDegrees(g,!1),null):this.vwr.moveSelected(c,g,-2147483648,-2147483648,-2147483648,null,!0,!1))):this.drawMode&&(this.bnd(a,8)||this.bnd(a,9))||this.labelMode&&this.bnd(a,10)?(this.setMotion(13,!0),this.vwr.checkObjectDragged(this.dragged.x,this.dragged.y,b,d,a)):this.checkMotionRotateZoom(a,b,c,g,!0)?this.vwr.tm.slabEnabled&&this.checkSlideZoom(a)?this.vwr.slabDepthByPixels(g):this.vwr.zoomBy(g):this.bnd(a,25)?this.vwr.rotateXYBy(this.getDegrees(c,!0),this.getDegrees(g,!1)):this.bnd(a,
29)?0==c&&1<Math.abs(g)?(this.setMotion(8,!0),this.vwr.zoomBy(g+(0<g?-1:1))):0==g&&1<Math.abs(c)&&(this.setMotion(13,!0),this.vwr.rotateZBy(-c+(0<c?1:-1),2147483647,2147483647)):this.bnd(a,46)?this.zoomByFactor(g,2147483647,2147483647):this.bnd(a,28)?(this.setMotion(13,!0),this.vwr.rotateZBy(-c,2147483647,2147483647)):this.vwr.tm.slabEnabled&&(this.bnd(a,6)?this.vwr.depthByPixels(g):this.bnd(a,38)?this.vwr.slabByPixels(g):this.bnd(a,39)&&this.vwr.slabDepthByPixels(g))}},"~N,~N,~N,~N,~N,~N,~N");c(c$,
"checkReleaseAction",function(a,b,d,c){JU.Logger.debugging&&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,d);c&&this.vwr.setRotateBondIndex(-2147483648);0<=this.dragAtomIndex&&(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.assignNew(a,b);else if(this.dragAtomIndex=-1,
this.isRubberBandSelect(this.dragAction)&&this.selectRb(this.clickAction),this.rubberbandSelectionMode=this.b.name.equals("drag"),this.rectRubber.x=2147483647,c&&this.vwr.notifyMouseClicked(a,b,JV.binding.Binding.getMouseAction(this.pressedCount,0,5),5),this.drawMode&&(this.bnd(this.dragAction,8)||this.bnd(this.dragAction,9))||this.labelMode&&this.bnd(this.dragAction,10))this.vwr.checkObjectDragged(2147483647,0,a,b,this.dragAction);else if(this.dragSelectedMode&&(this.bnd(this.dragAction,13)&&this.haveSelection)&&
this.vwr.moveSelected(2147483647,0,-2147483648,-2147483648,-2147483648,null,!1,!1),(!c||!this.checkUserAction(this.pressAction,a,b,0,0,d,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(c$,"checkClickAction",function(a,b,d,c){if(this.vwr.haveModelSet()){if(0<c){if(this.checkUserAction(this.clickAction,
a,b,0,0,d,32768))return;this.clickAction=this.vwr.notifyMouseClicked(a,b,this.clickAction,32768);if(0==this.clickAction)return}JU.Logger.debugging&&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(0,0,"m");return}}d=null;var g=!1,f=!1,j=null;this.drawMode||(j=this.vwr.checkObjectClicked(a,b,this.clickAction),null!=
j&&(g="bond".equals(j.get("type")),f="isosurface".equals(j.get("type")),d=this.getPoint(j)));g&&(c=1);if(!(null!=d&&Float.isNaN(d.x))){var h=this.findNearestAtom(a,b,d,0<c);if(0==c&&32!=this.apm)null!=this.mp&&((null!=d||0==this.mp.getIndexOf(h))&&this.mp.addPoint(h,d,!1),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(603979887)&&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(g){if(this.bnd(this.clickAction,34==this.bondPickingMode||33==this.bondPickingMode?0:5)){this.bondPicked(j.get("index").intValue());return}}else{if(f)return;if(32!=this.apm&&null!=this.mp&&this.bnd(this.clickAction,20)){this.atomOrPointPicked(h,d);4==this.addToMeasurement(h,d,!1)&&this.toggleMeasurement();return}if(this.bnd(this.clickAction,37)){null!=this.mp?
(this.addToMeasurement(h,d,!0),this.toggleMeasurement()):!this.drawMode&&(!this.labelMode&&!this.dragSelectedMode&&this.measuresEnabled)&&(this.enterMeasurementMode(h),this.addToMeasurement(h,d,!0));this.atomOrPointPicked(h,d);return}}this.isSelectAction(this.clickAction)?f||this.atomOrPointPicked(h,d):this.bnd(this.clickAction,24)&&0>h&&this.reset()}}}},"~N,~N,~N,~N");c(c$,"checkUserAction",function(a,b,d,c,g,f,j){if(!this.b.isUserAction(a))return!1;for(var h=!1,l,m=this.b.getBindings(),r=a+"\t",
n,q=m.keySet().iterator();q.hasNext()&&((n=q.next())||1);)if(0==n.indexOf(r)&&JU.PT.isAS(l=m.get(n))){var p=l[1],s=null;if(0<=p.indexOf("_ATOM")){var t=this.findNearestAtom(b,d,null,!0),p=JU.PT.rep(p,"_ATOM","({"+(0<=t?""+t:"")+"})");0<=t&&(p=JU.PT.rep(p,"_POINT",JU.Escape.eP(this.vwr.ms.at[t])))}if(!this.drawMode&&(0<=p.indexOf("_POINT")||0<=p.indexOf("_OBJECT")||0<=p.indexOf("_BOND"))){t=this.vwr.checkObjectClicked(b,d,a);if(null!=t&&null!=(s=t.get("pt")))t.get("type").equals("bond")&&(p=JU.PT.rep(p,
"_BOND","[{"+t.get("index")+"}]")),p=JU.PT.rep(p,"_POINT",JU.Escape.eP(s)),p=JU.PT.rep(p,"_OBJECT",JU.Escape.escapeMap(t));p=JU.PT.rep(p,"_BOND","[{}]");p=JU.PT.rep(p,"_OBJECT","{}")}p=JU.PT.rep(p,"_POINT","{}");p=JU.PT.rep(p,"_ACTION",""+a);p=JU.PT.rep(p,"_X",""+b);p=JU.PT.rep(p,"_Y",""+(this.vwr.getScreenHeight()-d));p=JU.PT.rep(p,"_DELTAX",""+c);p=JU.PT.rep(p,"_DELTAY",""+g);p=JU.PT.rep(p,"_TIME",""+f);p=JU.PT.rep(p,"_MODE",""+j);p.startsWith("+:")&&(h=!0,p=p.substring(2));this.vwr.evalStringQuiet(p)}return!h},
"~N,~N,~N,~N,~N,~N,~N");c(c$,"checkMotionRotateZoom",function(a,b,d,c,g){b=this.checkSlideZoom(a);var f=this.bnd(a,25),j=this.bnd(a,29);if(!b&&!f&&!j)return!1;a=(d=j&&(0==d||Math.abs(c)>5*Math.abs(d)))||this.isZoomArea(this.moved.x)||this.bnd(a,46)?8:f||j?13:this.bnd(a,1)?12:0;this.setMotion(a,g);return d||b},"~N,~N,~N,~N,~B");c(c$,"getExitRate",function(){return 10<this.dragGesture.getTimeDifference(2)?0:this.dragGesture.getSpeedPixelsPerMillisecond(4,2)});c(c$,"isRubberBandSelect",function(a){a=
a&-8193|32768;return this.rubberbandSelectionMode&&(this.bnd(a,35)||this.bnd(a,34)||this.bnd(a,32))},"~N");c(c$,"getRubberBand",function(){return this.rubberbandSelectionMode&&2147483647!=this.rectRubber.x?this.rectRubber:null});c(c$,"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(c$,"getDegrees",function(a,b){return 180*(a/Math.min(500,b?this.vwr.getScreenWidth():this.vwr.getScreenHeight()))*this.mouseDragFactor},"~N,~B");c(c$,"checkSlideZoom",function(a){return this.bnd(a,40)&&this.isZoomArea(this.pressed.x)},"~N");c(c$,"isZoomArea",function(a){return a>
98*this.vwr.getScreenWidth()*(this.vwr.isStereoDouble()?2:1)/100},"~N");c(c$,"getPoint",function(a){var b=new JU.Point3fi;b.setT(a.get("pt"));b.mi=a.get("modelIndex").intValue();return b},"java.util.Map");c(c$,"findNearestAtom",function(a,b,d,c){a=this.drawMode||null!=d?-1:this.vwr.findNearestAtomIndexMovable(a,b,!1);return 0<=a&&(c||null==this.mp)&&!this.vwr.slm.isInSelectionSubset(a)?-1:a},"~N,~N,JU.Point3fi,~B");c(c$,"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)||this.bnd(this.dragAction,13))||this.bnd(a,22)||this.bnd(a,35)||this.bnd(a,32)||this.bnd(a,34)||this.bnd(a,36)||this.bnd(a,30)},"~N");c(c$,"enterMeasurementMode",function(a){this.vwr.setPicked(-1);this.vwr.setPicked(a);this.vwr.setCursor(1);this.vwr.setPendingMeasurement(this.mp=this.getMP());this.measurementQueued=this.mp},"~N");c(c$,"getMP",function(){return J.api.Interface.getInterface("JM.MeasurementPending").set(this.vwr.ms)});
c(c$,"addToMeasurement",function(a,b,d){if(-1==a&&null==b||null==this.mp)return this.exitMeasurementMode(null),0;var c=this.mp.count;-2147483648!=this.mp.traceX&&2==c&&this.mp.setCount(c=1);return 4==c&&!d?c:this.mp.addPoint(a,b,!0)},"~N,JU.Point3fi,~B");c(c$,"resetMeasurement",function(){this.exitMeasurementMode(null);this.measurementQueued=this.getMP()});c(c$,"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(c$,"getSequence",function(){var a=this.measurementQueued.getAtomIndex(1),b=this.measurementQueued.getAtomIndex(2);if(!(0>a||0>b))try{var d=this.vwr.getSmilesOpt(null,a,b,!1,!0,!1,!1,!1);this.vwr.setStatusMeasuring("measureSequence",-2,d,0)}catch(c){if(y(c,Exception))JU.Logger.error(c.toString());else throw c;}});c(c$,"minimize",function(a){this.vwr.stopMinimization();var b=this.dragAtomIndex;a&&(this.dragAtomIndex=-1);a=0==this.vwr.getMotionFixedAtoms().cardinality()?this.vwr.ms.getAtoms(this.vwr.isAtomPDB(b)?
1087373318:1095761936,JU.BSUtil.newAndSetBit(b)):JU.BSUtil.setAll(this.vwr.getAtomCount());this.vwr.minimize(2147483647,0,a,null,0,!1,!1,!1,!1)},"~B");c(c$,"queueAtom",function(a,b){var d=this.measurementQueued.addPoint(a,b,!0);0<=a&&this.vwr.setStatusAtomPicked(a,"Atom #"+d+":"+this.vwr.getAtomInfo(a),null);return d},"~N,JU.Point3fi");c(c$,"setMotion",function(a,b){switch(this.vwr.currentCursor){case 3:break;default:this.vwr.setCursor(a)}b&&this.vwr.setInMotion(!0)},"~N,~B");c(c$,"zoomByFactor",
function(a,b,d){0!=a&&(this.setMotion(8,!0),this.vwr.zoomByFactor(Math.pow(this.mouseWheelFactor,a),b,d),this.vwr.setInMotion(!1))},"~N,~N,~N");c(c$,"runScript",function(a){this.vwr.script(a)},"~S");c(c$,"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 d=2;switch(this.apm){case 28:case 29:return;case 0:return;case 25:case 24:case 8:var c=8==this.apm,d=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":d?"STRUTS":"";this.runScript("connect "+this.measurementQueued.getMeasurementScript(" ",!0)+c);this.resetMeasurement();return;case 21:d++;case 20:d++;case 18:case 19:case 22:if(!this.bnd(this.clickAction,20))return;
if(null==this.measurementQueued||0==this.measurementQueued.count||this.measurementQueued.count>d)this.resetMeasurement(),this.enterMeasurementMode(a);this.addToMeasurement(a,b,!0);this.queueAtom(a,b);c=this.measurementQueued.count;1==c&&(this.vwr.setPicked(-1),this.vwr.setPicked(a));if(c<d)return;22==this.apm?this.getSequence():(this.vwr.setStatusMeasuring("measurePicked",d,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:this.bnd(this.clickAction,17)&&this.checkTwoAtomAction(b,a)}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);return;case 2:this.bnd(this.clickAction,19)&&(this.runScript("set labeltoggle {atomindex="+a+"}"),this.vwr.setStatusAtomPicked(a,null,null));return;case 31:if(this.bnd(this.clickAction,0)){var d=this.vwr.getAtomBitSet("connected(atomIndex="+a+") and !within(SMARTS,'[r50,R]')"),g=d.cardinality();switch(g){case 0:case 1:return;case 3:case 4:for(var f=D(g,0),j=D(g,0),h=0,c=d.nextSetBit(0);0<=c;c=d.nextSetBit(c+1),h++)f[h]=this.vwr.getBranchBitSet(c,a,!0).cardinality(),j[h]=c;for(h=0;h<g-2;h++){for(var l=
-2147483648,m=0,c=0;c<g;c++)f[c]>=l&&d.get(j[c])&&(m=j[c],l=f[c]);d.clear(m)}}this.vwr.undoMoveActionClear(a,2,!0);this.vwr.invertSelected(null,null,a,d);this.vwr.setStatusAtomPicked(a,"inverted: "+JU.Escape.eBS(d),null)}return;case 7:this.bnd(this.clickAction,4)&&(d=JU.BSUtil.newAndSetBit(a),this.vwr.deleteAtoms(d,!1),this.vwr.setStatusAtomPicked(a,"deleted: "+JU.Escape.eBS(d),null));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+")")}this.vwr.clearClickCount();this.vwr.setStatusAtomPicked(a,null,null)}},"~N,JU.Point3fi");
c(c$,"assignNew",function(a,b){if(2==this.mp.count)this.vwr.undoMoveActionClear(-1,4146,!0),this.runScript("assign connect "+this.mp.getMeasurementScript(" ",!1));else if(this.pickAtomAssignType.equals("Xx"))this.exitMeasurementMode("bond dropped");else if(this.pressed.inRange(this.xyRange,this.dragged.x,this.dragged.y)){var d="assign atom ({"+this.dragAtomIndex+'}) "'+this.pickAtomAssignType+'"';this.isPickAtomAssignCharge?(d+=";{atomindex="+this.dragAtomIndex+"}.label='%C'; ",this.vwr.undoMoveActionClear(this.dragAtomIndex,
4,!0)):this.vwr.undoMoveActionClear(-1,4146,!0);this.runScript(d)}else this.isPickAtomAssignCharge||(this.vwr.undoMoveActionClear(-1,4146,!0),d=this.vwr.ms.at[this.dragAtomIndex],1==d.getElementNumber()?this.runScript("assign atom ({"+this.dragAtomIndex+'}) "X"'):(d=JU.P3.new3(a,b,d.sZ),this.vwr.tm.unTransformPoint(d,d),this.runScript("assign atom ({"+this.dragAtomIndex+'}) "'+this.pickAtomAssignType+'" '+JU.Escape.eP(d))));this.exitMeasurementMode(null)},"~N,~N");c(c$,"bondPicked",function(a){33==
this.bondPickingMode&&this.vwr.undoMoveActionClear(-1,4146,!0);switch(this.bondPickingMode){case 33:this.runScript("assign bond [{"+a+'}] "'+this.pickBondAssignType+'"');break;case 34:this.vwr.setRotateBondIndex(a);break;case 8:this.vwr.deleteBonds(JU.BSUtil.newAndSetBit(a))}},"~N");c(c$,"checkTwoAtomAction",function(a,b){var d=5==this.apm;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 c=this.measurementQueued.count;if(1==c)if(null==a){if(this.measurementQueued.getAtomIndex(1)==b)return}else if(0==this.measurementQueued.getAtom(1).distance(a))return;if(0<=b||null!=a)c=this.queueAtom(b,a);2>c?d?this.vwr.scriptStatus(1==c?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==c?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=this.measurementQueued.getMeasurementScript(" ",!1),d?this.runScript("spin"+c+" "+this.vwr.getInt(553648157)):this.runScript("draw symop"+c+";show symop"+c))}},"JU.Point3fi,~N");c(c$,"reset",function(){this.runScript("!reset")});c(c$,"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 d=this.vwr.getAtomBitSetEval(null,b+("("+a+")"));this.vwr.select(d,!1,0,!1);this.vwr.refresh(3,"selections set")}catch(c){if(!y(c,Exception))throw c;}this.selectionWorking=!1}},"~S");c(c$,"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(c$,"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(c$,"zoomTo",function(a){this.runScript("zoomTo (atomindex="+
a+")");this.vwr.setStatusAtomPicked(a,null,null)},"~N");h(c$,"keyTyped",function(){return!1},"~N,~N");c$.$ActionManager$MotionPoint$=function(){G(self.c$);c$=t(function(){Q(this,arguments);this.time=this.y=this.x=this.index=0;s(this,arguments)},JV.ActionManager,"MotionPoint");c(c$,"set",function(a,b,d,c){this.index=a;this.x=b;this.y=d;this.time=c},"~N,~N,~N,~N");h(c$,"toString",function(){return"[x = "+this.x+" y = "+this.y+" time = "+this.time+" ]"});c$=F()};c$.$ActionManager$Gesture$=function(){G(self.c$);
c$=t(function(){Q(this,arguments);this.action=0;this.nodes=null;this.time0=this.ptNext=0;s(this,arguments)},JV.ActionManager,"Gesture");u(c$,function(a){this.nodes=Array(a);for(var b=0;b<a;b++)this.nodes[b]=M(JV.ActionManager.MotionPoint,this,null)},"~N");c(c$,"setAction",function(a,b){this.action=a;this.ptNext=0;this.time0=b;for(var d=0;d<this.nodes.length;d++)this.nodes[d].index=-1},"~N,~N");c(c$,"add",function(a,b,d,c){this.action=a;this.getNode(this.ptNext).set(this.ptNext,b,d,c-this.time0);this.ptNext++;
return this.ptNext},"~N,~N,~N,~N");c(c$,"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(c$,"getSpeedPixelsPerMillisecond",function(a,b){a=this.getPointCount2(a,b);if(2>a)return 0;var d=this.getNode(this.ptNext-1-b),c=this.getNode(this.ptNext-a-b),g=360*((d.x-c.x)/this.b$["JV.ActionManager"].vwr.getScreenWidth()),f=360*((d.y-c.y)/this.b$["JV.ActionManager"].vwr.getScreenHeight());
return Math.sqrt(g*g+f*f)/(d.time-c.time)},"~N,~N");c(c$,"getDX",function(a,b){a=this.getPointCount2(a,b);if(2>a)return 0;var d=this.getNode(this.ptNext-1-b),c=this.getNode(this.ptNext-a-b);return d.x-c.x},"~N,~N");c(c$,"getDY",function(a,b){a=this.getPointCount2(a,b);if(2>a)return 0;var d=this.getNode(this.ptNext-1-b),c=this.getNode(this.ptNext-a-b);return d.y-c.y},"~N,~N");c(c$,"getPointCount",function(){return this.ptNext});c(c$,"getPointCount2",function(a,b){a>this.nodes.length-b&&(a=this.nodes.length-
b);for(var d=a+1;0<=--d&&!(0<=this.getNode(this.ptNext-d-b).index););return d},"~N,~N");c(c$,"getNode",function(a){return this.nodes[(a+this.nodes.length+this.nodes.length)%this.nodes.length]},"~N");h(c$,"toString",function(){return 0==this.nodes.length?""+this:JV.binding.Binding.getMouseActionName(this.action,!1)+" nPoints = "+this.ptNext+" "+this.nodes[0]});c$=F()};C(c$);c$.actionInfo=c$.prototype.actionInfo=
Array(47);c$.actionNames=c$.prototype.actionNames=Array(47);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})"),["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"));C(c$);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".$plit(" ");
C(c$,"pickingStyleNames",null);JV.ActionManager.pickingStyleNames="toggle selectOrToggle extendedSelect drag measure measureoff".$plit(" ");C(c$,"MAX_DOUBLE_CLICK_MILLIS",700,"MININUM_GESTURE_DELAY_MILLISECONDS",10,"SLIDE_ZOOM_X_PERCENT",98,"DEFAULT_MOUSE_DRAG_FACTOR",1,"DEFAULT_MOUSE_WHEEL_FACTOR",1.15,"DEFAULT_GESTURE_SWIPE_FACTOR",1)});n("JV");w(["JU.BS","J.c.ANIM"],"JV.AnimationManager",["J.api.Interface","JU.BSUtil"],function(){c$=t(function(){this.vwr=this.animationThread=null;this.animationOn=
!1;this.lastFrameDelayMs=this.firstFrameDelayMs=this.animationFps=0;this.animationFrames=this.bsDisplay=this.animationReplayMode=this.bsVisibleModels=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;s(this,arguments)},JV,"AnimationManager");K(c$,function(){this.bsVisibleModels=new JU.BS;this.animationReplayMode=J.c.ANIM.ONCE});u(c$,function(a){this.vwr=a},"JV.Viewer");c(c$,"setAnimationOn",function(a){a!=this.animationOn&&(!a||!this.vwr.haveModelSet()||this.vwr.isHeadless()?this.stopThread(!1):(this.vwr.tm.spinOn||this.vwr.refresh(3,"Anim:setAnimationOn"),this.setAnimationRange(-1,-1),this.resumeAnimation()))},"~B");c(c$,"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,!0)},"~B");c(c$,"setAnimationNext",function(){return this.setAnimationRelative(this.animationDirection)});c(c$,"currentIsLast",function(){return this.isMovie?this.lastFramePainted==this.caf:this.lastModelPainted==this.cmi});c(c$,"currentFrameIs",function(a){var b=this.cmi;return 0==this.morphCount?b==a:0.001>Math.abs(this.currentMorphModel-
a)},"~N");c(c$,"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(J.c.ANIM.ONCE,0,0);this.initializePointers(0)});c(c$,"getModelSpecial",function(a){switch(a){case -1:a=this.firstFrameIndex;break;case 0:if(0<this.morphCount)return"-"+(1+this.currentMorphModel);a=this.cmi;break;case 1:a=this.lastFrameIndex}return this.vwr.getModelNumberDotted(a)},
"~N");c(c$,"setDisplay",function(a){this.bsDisplay=null==a||0==a.cardinality()?null:JU.BSUtil.copy(a)},"JU.BS");c(c$,"setMorphCount",function(a){this.morphCount=this.isMovie?0:a},"~N");c(c$,"morph",function(a){var b=z(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 d;this.setModel(b,!0);d=b+1;this.currentMorphModel=b+a;d==b||(0>d||0>b)||this.vwr.ms.morphTrajectories(b,d,a)}},"~N");c(c$,"setModel",function(a,b){0>a&&this.stopThread(!1);
var d=this.cmi,c=this.vwr.ms,g=null==c?0:c.mc;if(1==g)this.cmi=a=0;else if(0>a||a>=g)a=-1;var c=null,f=!1;if(this.cmi!=a){if(0<g){var g=this.vwr.ms,j=g.isJmolDataFrameForModel(a),h=g.isJmolDataFrameForModel(this.cmi);h&&g.setJmolDataFrame(null,-1,this.cmi);-1!=this.cmi&&this.vwr.saveModelOrientation();if(h||j)c=g.getJmolFrameType(a)+" "+a+" <--  "+this.cmi+" "+g.getJmolFrameType(this.cmi),f=g.getJmolDataSourceFrame(a)==g.getJmolDataSourceFrame(this.cmi)}this.cmi=a;null!=c&&(0<=a&&this.vwr.restoreModelOrientation(a),
f&&(0<=c.indexOf("quaternion")||0>c.indexOf("plot")&&0>c.indexOf("ramachandran")&&0>c.indexOf(" property "))&&this.vwr.restoreModelRotation(d))}this.setViewer(b)},"~N,~B");c(c$,"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(c$,"initializePointers",function(a){this.firstFrameIndex=0;this.lastFrameIndex=(0==a?0:this.getFrameCount())-1;this.frameStep=
a;this.vwr.setFrameVariables()},"~N");c(c$,"setAnimationDirection",function(a){this.animationDirection=a},"~N");c(c$,"setAnimationFps",function(a){1>a&&(a=1);50<a&&(a=50);this.animationFps=a;this.vwr.setFrameVariables()},"~N");c(c$,"setAnimationReplayMode",function(a,b,d){this.firstFrameDelay=0<b?b:0;this.firstFrameDelayMs=z(1E3*this.firstFrameDelay);this.lastFrameDelay=0<d?d:0;this.lastFrameDelayMs=z(1E3*this.lastFrameDelay);this.animationReplayMode=a;this.vwr.setFrameVariables()},"J.c.ANIM,~N,~N");
c(c$,"setAnimationRange",function(a,b){var d=this.getFrameCount();0>a&&(a=0);0>b&&(b=d);a>=d&&(a=d-1);b>=d&&(b=d-1);this.currentMorphModel=this.firstFrameIndex=a;this.lastFrameIndex=b;this.frameStep=b<a?-1:1;this.rewindAnimation()},"~N,~N");c(c$,"pauseAnimation",function(){this.stopThread(!0)});c(c$,"reverseAnimation",function(){this.currentDirection=-this.currentDirection;this.animationOn||this.resumeAnimation()});c(c$,"repaintDone",function(){this.lastModelPainted=this.cmi;this.lastFramePainted=
this.caf});c(c$,"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.animationThread.setManager(this,this.vwr,[this.firstFrameIndex,this.lastFrameIndex,this.intAnimThread]),this.animationThread.start()))});c(c$,"setAnimationLast",function(){this.setFrame(0<
this.animationDirection?this.lastFrameIndex:this.firstFrameIndex)});c(c$,"rewindAnimation",function(){this.setFrame(0<this.animationDirection?this.firstFrameIndex:this.lastFrameIndex);this.currentDirection=1;this.vwr.setFrameVariables()});c(c$,"setAnimationPrevious",function(){return this.setAnimationRelative(-this.animationDirection)});c(c$,"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),d=1*(a-b)/this.animationFps+this.firstFrameDelay+this.lastFrameDelay;b<=a;b++)d+=this.vwr.getFrameDelayMs(this.modelIndexForFrame(b))/1E3;return d});c(c$,"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},"java.util.Map");c(c$,"getAnimationFrames",function(){return this.animationFrames});c(c$,"getCurrentFrameIndex",function(){return this.caf});c(c$,"modelIndexForFrame",function(a){return this.isMovie?this.animationFrames[a]-1:a},
"~N");c(c$,"getFrameCount",function(){return this.isMovie?this.animationFrames.length:this.vwr.getModelCount()});c(c$,"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(d){if(!y(d,Exception))throw d;}},"~N");c(c$,"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);this.setFrameRangeVisible();this.vwr.setStatusFrameChanged(!1,
!0);null!=this.vwr.ms&&!this.vwr.g.selectAllModels&&this.vwr.setSelectionSubset(this.vwr.getModelUndeletedAtomsBitSet(this.cmi))},"~B");c(c$,"setFrameRangeVisible",function(){this.bsVisibleModels.clearAll();0<=this.backgroundModelIndex&&this.bsVisibleModels.set(this.backgroundModelIndex);if(0<=this.cmi)this.bsVisibleModels.set(this.cmi);else if(0!=this.frameStep){for(var a=0,b=0,d=this.firstFrameIndex;d!=this.lastFrameIndex;d+=this.frameStep){var c=this.modelIndexForFrame(d);this.vwr.ms.isJmolDataFrameForModel(c)||
(this.bsVisibleModels.set(c),a++,b=d)}c=this.modelIndexForFrame(this.lastFrameIndex);if(this.firstFrameIndex==this.lastFrameIndex||!this.vwr.ms.isJmolDataFrameForModel(c)||0==a)this.bsVisibleModels.set(c),0==a&&(this.firstFrameIndex=this.lastFrameIndex),a=0;1==a&&0>this.cmi&&this.setFrame(b)}});c(c$,"animation",function(a){this.animationOn=a;this.vwr.setBooleanProperty("_animating",a)},"~B");c(c$,"setAnimationRelative",function(a){a=this.getFrameStep(a);var b=(this.isMovie?this.caf:this.cmi)+a,d=
0,c=0,g;0<this.morphCount?(d=1/(this.morphCount+1),c=this.currentMorphModel+a*d,g=this.isNotInRange(c)):g=this.isNotInRange(b);if(g)switch(this.animationReplayMode){case J.c.ANIM.ONCE:return!1;case J.c.ANIM.LOOP:c=b=this.animationDirection==this.currentDirection?this.firstFrameIndex:this.lastFrameIndex;break;case J.c.ANIM.PALINDROME:this.currentDirection=-this.currentDirection,b-=2*a,c-=2*a*d}if(1>this.morphCount){if(0>b||b>=this.getFrameCount())return!1;this.setFrame(b);return!0}this.morph(c+1);
return!0},"~N");c(c$,"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(c$,"getFrameStep",function(a){return this.frameStep*a*this.currentDirection},"~N");C(c$,"FRAME_FIRST",-1,"FRAME_LAST",1,"MODEL_CURRENT",0)});n("JV.binding");w(["java.util.Hashtable"],"JV.binding.Binding","java.lang.Boolean java.util.Arrays JU.Lst $.PT $.SB J.api.Interface JU.Escape $.Logger $.Txt".split(" "),function(){c$=
t(function(){this.bindings=this.name=null;s(this,arguments)},JV.binding,"Binding");K(c$,function(){this.bindings=new java.util.Hashtable});c$.getMouseAction=c(c$,"getMouseAction",function(a,b,d){2<a&&(a=2);switch(a){case 0:break;case 1:a=256;break;default:a=512}switch(d){case 4:d=4096;break;case 1:d=8192;break;case 5:d=16384;break;case 2:d=32768;break;case 3:d=32}return b&63|a|d},"~N,~N,~N");c$.getMouseActionStr=c(c$,"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");c$.getButtonMods=c(c$,"getButtonMods",function(a){return a&63},"~N");c$.getClickCount=c(c$,"getClickCount",function(a){return(a&768)>>8},"~N");c$.getMouseActionName=
c(c$,"getMouseActionName",function(a,b){var d=new JU.SB;if(0==a)return"";var c=JV.binding.Binding.includes(a,8)&&!JV.binding.Binding.includes(a,16)&&!JV.binding.Binding.includes(a,4),g="      ".toCharArray();JV.binding.Binding.includes(a,2)&&(d.append("CTRL+"),g[5]="C");!c&&JV.binding.Binding.includes(a,8)&&(d.append("ALT+"),g[4]="A");JV.binding.Binding.includes(a,1)&&(d.append("SHIFT+"),g[3]="S");JV.binding.Binding.includes(a,16)?(g[2]="L",d.append("LEFT")):JV.binding.Binding.includes(a,4)?(g[2]=
"R",d.append("RIGHT")):c?(g[2]="M",d.append("MIDDLE")):JV.binding.Binding.includes(a,32)&&(g[2]="W",d.append("WHEEL"));JV.binding.Binding.includes(a,512)&&(d.append("+double"),g[1]="2");JV.binding.Binding.includes(a,4096)?(d.append("+down"),g[0]="1"):JV.binding.Binding.includes(a,8192)?(d.append("+drag"),g[0]="2"):JV.binding.Binding.includes(a,16384)?(d.append("+up"),g[0]="3"):JV.binding.Binding.includes(a,32768)&&(d.append("+click"),g[0]="4");return b?String.instantialize(g)+":"+d.toString():d.toString()},
"~N,~B");c(c$,"getBindings",function(){return this.bindings});u(c$,function(){});c(c$,"bindAction",function(a,b){this.addBinding(a+"\t"+b,[a,b])},"~N,~N");c(c$,"bindName",function(a,b){this.addBinding(a+"\t",Boolean.TRUE);this.addBinding(a+"\t"+b,[JV.binding.Binding.getMouseActionName(a,!1),b])},"~N,~S");c(c$,"unbindAction",function(a,b){0==a?this.unbindJmolAction(b):this.removeBinding(null,a+"\t"+b)},"~N,~N");c(c$,"unbindName",function(a,b){null==b?this.unbindMouseAction(a):this.removeBinding(null,
a+"\t"+b)},"~N,~S");c(c$,"unbindJmolAction",function(a){var b=this.bindings.keySet().iterator();for(a="\t"+a;b.hasNext();){var d=b.next();d.endsWith(a)&&this.removeBinding(b,d)}},"~N");c(c$,"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(c$,"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(c$,
"unbindUserAction",function(a){var b=this.bindings.keySet().iterator();for(a="\t"+a;b.hasNext();){var d=b.next();d.endsWith(a)&&this.removeBinding(b,d)}},"~S");c(c$,"unbindMouseAction",function(a){var b=this.bindings.keySet().iterator();for(a+="\t";b.hasNext();){var d=b.next();d.startsWith(a)&&this.removeBinding(b,d)}},"~N");c(c$,"isBound",function(a,b){return this.bindings.containsKey(a+"\t"+b)},"~N,~N");c(c$,"isUserAction",function(a){return this.bindings.containsKey(a+"\t")},"~N");c(c$,"getBindingInfo",
function(a,b,d){var c=new JU.SB;d=null==d||d.equalsIgnoreCase("all")?null:d.toLowerCase();for(var g=Array(a.length),f=new JU.Lst,j,h=this.bindings.values().iterator();h.hasNext()&&((j=h.next())||1);)if(JU.PT.isAI(j)){var l=j,m=l[1];null==g[m]&&(g[m]=new JU.Lst);l=JV.binding.Binding.getMouseActionName(l[0],!0);(null==d||0<=(b[m]+";"+a[m]+";"+l).toLowerCase().indexOf(d))&&g[m].addLast(l)}else JU.PT.isAS(j)&&(m=j[0],l=j[1],(null==d||0<=d.indexOf("user")||0<=m.indexOf(d)||0<=l.indexOf(d))&&f.addLast(j));
for(m=0;m<a.length;m++){var r;null==g[m]||0==(r=g[m].size())||this.addInfo(c,g[m].toArray(Array(r)),b[m],a[m])}for(m=0;m<f.size();m++)l=f.get(m),this.addInfo(c,["USER:::"+l[0]],"user-defined",l[1]);return c.toString()},"~A,~A,~S");c(c$,"addInfo",function(a,b,d,c){java.util.Arrays.sort(b);JU.Txt.leftJustify(a,"                      ",d);a.append("\t");d="";for(var g=a.length(),f=0;f<b.length;f++)a.append(d).append(b[f].substring(7)),d=", ";g=a.length()-g;20>g&&a.append("                 ".substring(0,
20-g));a.append("\t").append(c).appendC("\n")},"JU.SB,~A,~S,~S");c$.includes=c(c$,"includes",function(a,b){return(a&b)==b},"~N,~N");c$.newBinding=c(c$,"newBinding",function(a){return J.api.Interface.getInterface("JV.binding."+a+"Binding")},"~S");C(c$,"LEFT",16,"MIDDLE",8,"RIGHT",4,"WHEEL",32,"ALT",8,"CTRL",2,"SHIFT",1,"CTRL_ALT",10,"CTRL_SHIFT",3,"MAC_COMMAND",20,"BUTTON_MASK",28,"BUTTON_MODIFIER_MASK",63,"SINGLE",256,"DOUBLE",512,"COUNT_MASK",768,"DOWN",4096,"DRAG",8192,"UP",16384,"CLICK",32768,
"MODE_MASK",61440)});n("JV.binding");w(["JV.binding.JmolBinding"],"JV.binding.DragBinding",null,function(){c$=B(JV.binding,"DragBinding",JV.binding.JmolBinding);u(c$,function(){E(this,JV.binding.DragBinding,[]);this.set("drag")});h(c$,"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)})});n("JV.binding");w(["JV.binding.Binding"],"JV.binding.JmolBinding",
null,function(){c$=B(JV.binding,"JmolBinding",JV.binding.Binding);u(c$,function(){E(this,JV.binding.JmolBinding,[]);this.set("toggle")});c(c$,"set",function(a){this.name=a;this.setGeneralBindings();this.setSelectBindings()},"~S");c(c$,"setSelectBindings",function(){this.bindAction(33296,30);this.bindAction(33040,36)});c(c$,"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(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(8465,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)})});n("JV");w(["JU.ColorEncoder"],"JV.ColorManager","java.lang.Float JU.AU J.c.PAL JU.C $.Elements $.Logger JV.JC".split(" "),function(){c$=t(function(){this.colorData=this.altArgbsCpk=this.argbsCpk=this.g3d=this.vwr=this.ce=null;this.isDefaultColorRasmol=!1;this.colixRubberband=22;this.colixBackgroundContrast=0;s(this,arguments)},JV,"ColorManager");K(c$,function(){this.ce=new JU.ColorEncoder(null)});u(c$,function(a,b){this.vwr=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(c$,"clear",function(){});c(c$,"getDefaultColorRasmol",function(){return this.isDefaultColorRasmol});c(c$,"resetElementColors",function(){this.setDefaultColors(!1)});c(c$,"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(c$,"setRubberbandArgb",function(a){this.colixRubberband=0==a?0:JU.C.getColix(a)},"~N");c(c$,"setColixBackgroundContrast",function(a){this.colixBackgroundContrast=JU.C.getBgContrast(a)},"~N");c(c$,"getColixBondPalette",function(a,b){switch(b){case 19:return this.ce.getColorIndexFromPalette(a.getEnergy(),
-2.5,-0.5,7,!1)}return 10},"JM.Bond,~N");c(c$,"getColixAtomPalette",function(a,b){var d=0,c;c=this.vwr.ms;switch(b){case 84:return null==this.colorData||a.i>=this.colorData.length?12:this.getColixForPropertyValue(this.colorData[a.i]);case 0:case 1:c=a.getAtomicAndIsotopeNumber();if(c<JU.Elements.elementNumberMax)return this.g3d.getChangeableColix(c,this.argbsCpk[c]);d=c;c=JU.Elements.altElementIndexFromNumber(c);if(0<c)return this.g3d.getChangeableColix(JU.Elements.elementNumberMax+c,this.altArgbsCpk[c]);
c=JU.Elements.getElementNumber(d);return this.g3d.getChangeableColix(c,this.argbsCpk[c]);case 2:return c=JU.ColorEncoder.quantize4(a.getPartialCharge(),-1,1,JV.JC.PARTIAL_CHARGE_RANGE_SIZE),this.g3d.getChangeableColix(JV.JC.PARTIAL_CHARGE_COLIX_RED+c,JV.JC.argbsRwbScale[c]);case 3:return c=a.getFormalCharge()- -4,this.g3d.getChangeableColix(JV.JC.FORMAL_CHARGE_COLIX_RED+c,JV.JC.argbsFormalCharge[c]);case 68:case 5:return 68==b?(c=this.vwr.ms.getBfactor100Lo(),d=this.vwr.ms.getBfactor100Hi()):(c=0,
d=1E4),this.ce.getColorIndexFromPalette(a.getBfactor100(),c,d,7,!1);case 86:return this.ce.getColorIndexFromPalette(a.getGroupParameter(1112539150),-1,1,7,!1);case 70:return d=this.vwr.ms.getSurfaceDistanceMax(),this.ce.getColorIndexFromPalette(a.getSurfaceDistance100(),0,d,7,!1);case 8:return this.ce.getColorIndexFromPalette(a.getGroupID(),0,0,5,!1);case 9:return this.ce.getColorIndexFromPalette(a.getGroupID(),0,0,4,!1);case 75:return this.ce.getColorIndexFromPalette(a.getSelectedGroupIndexWithinChain(),
0,a.getSelectedGroupCountWithinChain()-1,1,!1);case 87:return c=this.vwr.ms.am[a.mi],this.ce.getColorIndexFromPalette(a.getPolymerIndexInModel(),0,c.getBioPolymerCount()-1,1,!1);case 76:return this.ce.getColorIndexFromPalette(a.getSelectedMonomerIndexWithinPolymer(),0,a.getSelectedMonomerCountWithinPolymer()-1,1,!1);case 77:return this.ce.getColorIndexFromPalette(c.getMoleculeIndex(a.i,!0),0,c.getMoleculeCountInModel(a.getModelIndex())-1,0,!1);case 14:return d=a.getModelIndex(),this.ce.getColorIndexFromPalette(c.getAltLocIndexInModel(d,
a.getAlternateLocationID()),0,c.getAltLocCountInModel(d),0,!1);case 15:return d=a.getModelIndex(),this.ce.getColorIndexFromPalette(c.getInsertionCodeIndexInModel(d,a.getInsertionCode()),0,c.getInsertionCountInModel(d),0,!1);case 16:c=a.getAtomicAndIsotopeNumber();d=this.getJmolOrRasmolArgb(c,1073741991);break;case 17:c=a.getAtomicAndIsotopeNumber();d=this.getJmolOrRasmolArgb(c,1073742116);break;case 7:d=a.getProteinStructureSubType().getColor();break;case 10:c=a.getChainID(),c=((0>c?0:256<=c?c-256:
c)&31)%JV.JC.argbsChainAtom.length,d=(a.isHetero()?JV.JC.argbsChainHetero:JV.JC.argbsChainAtom)[c]}return 0==d?22:JU.C.getColix(d)},"JM.Atom,~N");c(c$,"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(c$,"setElementArgb",
function(a,b){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)),a<JU.Elements.elementNumberMax?(this.argbsCpk[a]=b,this.g3d.changeColixArgb(a,b)):(a=JU.Elements.altElementIndexFromNumber(a),this.altArgbsCpk[a]=b,this.g3d.changeColixArgb(JU.Elements.elementNumberMax+a,b)))},"~N,~N");c(c$,"getPropertyColorRange",
function(){return this.ce.isReversed?[this.ce.hi,this.ce.lo]:[this.ce.lo,this.ce.hi]});c(c$,"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 d=null==b,c,g=d?a.length-1:b.nextSetBit(0);0<=g;g=d?g-1:b.nextSetBit(g+1))if(!Float.isNaN(c=a[g]))this.ce.hi=Math.max(this.ce.hi,c),this.ce.lo=Math.min(this.ce.lo,c);this.setPropertyColorRange(this.ce.lo,
this.ce.hi)}},"~A,JU.BS");c(c$,"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(c$,"setPropertyColorScheme",function(a,b,d){var c=0==a.length;c&&(a="=");var g=this.getPropertyColorRange();this.ce.currentPalette=this.ce.createColorScheme(a,!0,d);c||this.setPropertyColorRange(g[0],g[1]);this.ce.isTranslucent=b},"~S,~B,~B");c(c$,"setUserScale",function(a){this.ce.setUserScale(a)},
"~A");c(c$,"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(c$,"getColixForPropertyValue",function(a){return this.ce.getColorIndex(a)},"~N");c(c$,"getColorEncoder",function(a){if(null==a||0==a.length)return this.ce;var b=new JU.ColorEncoder(this.ce);b.currentPalette=b.createColorScheme(a,!1,!0);return 2147483647==b.currentPalette?null:b},"~S")});n("JV");
w(["javajs.api.BytePoster","java.util.Hashtable"],"JV.FileManager","java.io.BufferedInputStream $.BufferedReader java.lang.Boolean java.net.URL $.URLEncoder java.util.Map JU.AU $.BArray $.Base64 $.Lst $.PT $.Rdr $.SB J.api.Interface J.io.FileReader $.JmolBinary JS.SV JU.Logger $.Txt JV.Viewer".split(" "),function(){c$=t(function(){this.jmb=this.vwr=null;this.pathForAllFiles="";this.nameAsGiven="zapped";this.lastFullPathName=this.fullPathName=null;this.lastNameAsGiven="zapped";this.cache=this.appletProxy=
this.appletDocumentBaseURL=this.fileName=null;s(this,arguments)},JV,"FileManager",null,javajs.api.BytePoster);K(c$,function(){this.cache=new java.util.Hashtable});u(c$,function(a){this.vwr=a;this.jmb=new J.io.JmolBinary(this);this.clear()},"JV.Viewer");c(c$,"clear",function(){this.setFileInfo([this.vwr.getZapName()]);this.jmb.spardirCache=null});c(c$,"getSpardirCache",function(){return this.jmb.spardirCache});c(c$,"clearPngjCache",function(a){this.jmb.clearPngjCache(null==a?null:this.getCanonicalName(JU.Rdr.getZipRoot(a)))},
"~S");c(c$,"setLoadState",function(a){this.vwr.getPreserveState()&&a.put("loadState",this.vwr.g.getLoadState(a))},"java.util.Map");c(c$,"getPathForAllFiles",function(){return this.pathForAllFiles});c(c$,"setPathForAllFiles",function(a){0<a.length&&(!a.endsWith("/")&&!a.endsWith("|"))&&(a+="/");return this.pathForAllFiles=a},"~S");c(c$,"setFileInfo",function(a){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(c$,"getFileInfo",function(){return[this.fullPathName,this.fileName,this.nameAsGiven]});c(c$,"getFullPathName",function(a){var b=null!=this.fullPathName?this.fullPathName:this.nameAsGiven;return!a||!b.equals("zapped")?b:null!=this.lastFullPathName?this.lastFullPathName:this.lastNameAsGiven},"~B");c(c$,"getFileName",function(){return null!=this.fileName?this.fileName:this.nameAsGiven});c(c$,"getAppletDocumentBase",
function(){return null==this.appletDocumentBaseURL?"":this.appletDocumentBaseURL.toString()});c(c$,"setAppletContext",function(a){try{System.out.println('setting document base to "'+a+'"'),this.appletDocumentBaseURL=0==a.length?null:new java.net.URL(U("java.net.URL"),a,null)}catch(b){if(y(b,java.net.MalformedURLException))System.out.println("error setting document base to "+a);else throw b;}},"~S");c(c$,"setAppletProxy",function(a){this.appletProxy=null==a||0==a.length?null:a},"~S");c(c$,"createAtomSetCollectionFromFile",
function(a,b,d){null==b.get("atomDataOnly")&&this.setLoadState(b);a=this.vwr.resolveDatabaseFormat(a);var c=a.indexOf("::"),g=0<=c?a.substring(c+2):a,c=0<=c?a.substring(0,c):null;JU.Logger.info("\nFileManager.getAtomSetCollectionFromFile("+g+")"+(a.equals(g)?"":" //"+a));var f=this.getClassifiedName(g,!0);if(1==f.length)return f[0];a=f[0];f=f[1];b.put("fullPathName",(null==c?"":c+"::")+a.$replace("\\","/"));this.vwr.getBoolean(603979880)&&this.vwr.getBoolean(603979825)&&this.vwr.scriptStatus("Requesting "+
a);b=new J.io.FileReader(this,this.vwr,f,a,g,c,null,b,d);b.run();return b.getAtomSetCollection()},"~S,java.util.Map,~B");c(c$,"createAtomSetCollectionFromFiles",function(a,b,d){this.setLoadState(b);for(var c=Array(a.length),g=Array(a.length),f=Array(a.length),j=0;j<a.length;j++){var h=a[j].indexOf("::"),l=0<=h?a[j].substring(h+2):a[j],h=0<=h?a[j].substring(0,h):null,m=this.getClassifiedName(l,!0);if(1==m.length)return m[0];c[j]=m[0];a[j]=m[0].$replace("\\","/");f[j]=h;g[j]=l}b.put("fullPathNames",
c);b.put("fileTypes",f);a=this.newFilesReader(c,g,f,null,b,d);a.run();return a.getAtomSetCollection()},"~A,java.util.Map,~B");c(c$,"createAtomSetCollectionFromString",function(a,b,d){this.setLoadState(b);var c=0<=a.indexOf("Viewer.AddHydrogens")?this.getFileInfo():null;b=new J.io.FileReader(this,this.vwr,"string","string","string",null,JU.Rdr.getBR(a),b,d);b.run();null!=c&&this.setFileInfo(c);!d&&!p(b.getAtomSetCollection(),String)&&(this.vwr.zap(!1,!0,!1),this.setFileInfo(["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(c$,"createAtomSeCollectionFromStrings",function(a,b,d,c){if(!d.containsKey("isData")){var g='"'+this.vwr.getDataSeparator()+'"',f='"'+(c?"append":"model")+' inline"',j=new JU.SB;j.append('set dataSeparator "~~~next file~~~";\ndata ').append(f);for(var h=0;h<a.length;h++)0<h&&j.append("~~~next file~~~"),j.append(a[h]);j.append("end ").append(f).append(";set dataSeparator ").append(g);b.appendSB(j)}this.setLoadState(d);
JU.Logger.info("FileManager.getAtomSetCollectionFromStrings(string[])");b=Array(a.length);g=Array(a.length);for(h=0;h<a.length;h++)b[h]="string["+h+"]",g[h]=JV.FileManager.newDataReader(a[h]);a=this.newFilesReader(b,b,null,g,d,c);a.run();return a.getAtomSetCollection()},"~A,JU.SB,java.util.Map,~B");c(c$,"createAtomSeCollectionFromArrayData",function(a,b,d){JU.Logger.info("FileManager.getAtomSetCollectionFromArrayData(Vector)");for(var c=a.size(),g=Array(c),f=Array(c),j=0;j<c;j++)g[j]="String["+j+
"]",f[j]=JV.FileManager.newDataReader(a.get(j));a=this.newFilesReader(g,g,null,f,b,d);a.run();return a.getAtomSetCollection()},"JU.Lst,java.util.Map,~B");c$.newDataReader=c(c$,"newDataReader",function(a){var b=p(a,String)?"String":JU.PT.isAS(a)?"Array":p(a,JU.Lst)?"List":null;return null==b?null:J.api.Interface.getInterface("JU."+b+"DataReader").setData(a)},"~O");c(c$,"newFilesReader",function(a,b,d,c,g,f){var j=J.api.Interface.getOption("io.FilesReader");j.set(this,this.vwr,a,b,d,c,g,f);return j},
"~A,~A,~A,~A,java.util.Map,~B");c(c$,"createAtomSetCollectionFromDOM",function(a,b){var d=J.api.Interface.getOption("io.DOMReadaer");d.set(this,this.vwr,a,b);d.run();return d.getAtomSetCollection()},"~O,java.util.Map");c(c$,"createAtomSetCollectionFromReader",function(a,b,d,c){a=new J.io.FileReader(this,this.vwr,b,a,b,null,d,c,!1);a.run();return a.getAtomSetCollection()},"~S,~S,~O,java.util.Map");c(c$,"getBufferedInputStream",function(a){a=this.getBufferedReaderOrErrorMessageFromName(a,Array(2),!0,
!0);return p(a,java.io.BufferedInputStream)?a:null},"~S");c(c$,"getBufferedInputStreamOrErrorMessageFromName",function(a,b,d,c,g,f,j){var h=null;j&&null==g&&(h=null==b||null==this.jmb.pngjCache?null:this.getCachedPngjBytes(b),null==h&&(h=this.cacheGet(a,!0)));var l=b=null;try{if(null==h){var m=0<=a.indexOf("?POST?_PNGJBIN_"),r=m||0<=a.indexOf("?POST?_PNGJ_");if(0<a.indexOf("?POST?_PNG_")||r){var n=Array(1),q=this.vwr.getImageAsBytes(r?"PNGJ":"PNG",0,0,-1,n);if(null!=n[0])return n[0];m?(g=q,a=JU.PT.rep(a,
"?_","=_")):a=(new JU.SB).append(a).append("=").appendSB(JU.Base64.getBase64(q)).toString()}var s=JV.FileManager.urlTypeIndex(a),m=0<=s,r=null;if(m&&0<=(s=a.indexOf("?POST?")))r=a.substring(s+6),a=a.substring(0,s);var t=null!=this.appletDocumentBaseURL;j&&(0<=a.indexOf(".png")&&null==this.jmb.pngjCache&&this.vwr.cachePngFiles())&&this.jmb.clearAndCachePngjFile(null);if(t||m){t&&(m&&null!=this.appletProxy)&&(a=this.appletProxy+"?url="+this.urlEncode(a));var u=t?new java.net.URL(this.appletDocumentBaseURL,
a,null):new java.net.URL(U("java.net.URL"),a,null);if(c)return null;a=u.toString();d&&0>a.toLowerCase().indexOf("password")&&JU.Logger.info("FileManager opening 1 "+a);l=this.vwr.apiPlatform.getURLContents(u,g,r,!1);q=null;if(p(l,JU.SB)){a=l;if(f&&!JU.Rdr.isBase64(a))return JU.Rdr.getBR(a.toString());q=JU.Rdr.getBytesFromSB(a)}else JU.PT.isAB(l)&&(q=l);null!=q&&(l=JU.Rdr.getBIS(q))}else if(!j||null==(h=this.cacheGet(a,!0)))d&&JU.Logger.info("FileManager opening 2 "+a),l=this.vwr.apiPlatform.getBufferedFileInputStream(a);
if(p(l,String))return l}b=null==h?l:JU.Rdr.getBIS(h);c&&(b.close(),b=null);return b}catch(v){if(y(v,Exception))try{null!=b&&b.close()}catch(w){if(!y(w,java.io.IOException))throw w;}else throw v;}return""+v},"~S,~S,~B,~B,~A,~B,~B");c(c$,"urlEncode",function(a){try{return java.net.URLEncoder.encode(a,"utf-8")}catch(b){if(y(b,java.io.UnsupportedEncodingException))return a;throw b;}},"~S");c(c$,"getEmbeddedFileState",function(a,b){var d=null,d=this.getZipDirectory(a,!1,b);if(0==d.length)return d=this.vwr.getFileAsString4(a,
-1,!1,!0,!1),0>d.indexOf("**** Jmol Embedded Script ****")?"":J.io.JmolBinary.getEmbeddedScript(d);for(var c=0;c<d.length;c++)if(0<=d[c].indexOf(".spt"))return d=[a+"|"+d[c],null],this.getFileDataOrErrorAsString(d,-1,!1,!1,!1),d[1];return""},"~S,~B");c(c$,"getFullPathNameOrError",function(a,b,d){var c=this.getClassifiedName(a,!0);if(null==c||null==c[0]||2>c.length)return[null,"cannot read file name: "+a];a=c[0];c=c[0].$replace("\\","/");a=JU.Rdr.getZipRoot(a);b=this.getBufferedInputStreamOrErrorMessageFromName(a,
c,!1,!b,null,!1,!b);d[0]=c;p(b,String)&&(d[1]=b);return b},"~S,~B,~A");c(c$,"getBufferedReaderOrErrorMessageFromName",function(a,b,d,c){var g=this.cacheGet(a,!1),f=JU.PT.isAB(g),j=f?g:null;if(a.startsWith("cache://")){if(null==g)return"cannot read "+a;if(f)j=g;else return JU.Rdr.getBR(g)}g=this.getClassifiedName(a,!0);if(null==g)return"cannot read file name: "+a;null!=b&&(b[0]=g[0].$replace("\\","/"));return this.getUnzippedReaderOrStreamFromName(g[0],j,!1,d,!1,c,null)},"~S,~A,~B,~B");c(c$,"getUnzippedReaderOrStreamFromName",
function(a,b,d,c,g,f,j){var h=null;f=null==b&&f?this.getSpartanFileList(a):null;var l=a;if(null!=f){if(g)return f;if(null!=f[2]){d=f[1];c=new java.util.Hashtable;3==f.length&&(h=this.getObjectAsSections(f[2],d,c),c.put("OUTPUT",h),f=J.io.JmolBinary.spartanFileList(a,c.get(h)),3==f.length&&(h=this.getObjectAsSections(f[2],d,c),c.put("OUTPUT",h),f=J.io.JmolBinary.spartanFileList(f[1],c.get(h))));h=new JU.SB;null!=c.get("OUTPUT")&&h.append(c.get(c.get("OUTPUT")));for(var m=2;m<f.length;m++)a=f[m],a=
this.getObjectAsSections(a,d,c),JU.Logger.info("reading "+a),a=c.get(a),h.append(a);a=h.toString();this.jmb.spardirPut(l.$replace("\\","/"),a.getBytes());return JU.Rdr.getBR(a)}}null==b&&null!=this.jmb.pngjCache&&(b=this.getCachedPngjBytes(a),null!=b&&null!=j&&j.put("sourcePNGJ",Boolean.TRUE));f=a;0<=a.indexOf("|")&&(h=JU.PT.split(a.$replace("\\","/"),"|"),null==b&&JU.Logger.info("FileManager opening 3 "+a),a=h[0]);a=null==b?this.getBufferedInputStreamOrErrorMessageFromName(a,f,!0,!1,null,!c,!0):
JU.Rdr.getBIS(b);try{if(p(a,String)||p(a,java.io.BufferedReader))return a;m=JU.Rdr.getUnzippedInputStream(a);if(JU.Rdr.isCompoundDocumentS(m)){var r=J.api.Interface.getInterface("JU.CompoundDocument");r.setStream(m,!0);return JU.Rdr.getBR(r.getAllDataFiles("Molecule","Input").toString())}if(JU.Rdr.isPickleS(m))return m;m=JU.Rdr.getPngZipStream(m,!0);if(JU.Rdr.isZipS(m)){if(d)return JU.Rdr.newZipInputStream(m);var n=JU.Rdr.getZipFileDirectory(m,h,1,c);return p(n,String)?JU.Rdr.getBR(n):n}return c?
m:JU.Rdr.getBufferedReader(m,null)}catch(q){if(y(q,Exception))return q.toString();throw q;}},"~S,~A,~B,~B,~B,~B,java.util.Map");c(c$,"getSpartanFileList",function(a){if(a.endsWith(".spt"))return[null,null,null];if(a.endsWith(".spardir.zip"))return["SpartanSmol","Directory Entry ",a+"|output"];a=a.$replace("\\","/");if(!a.endsWith(".spardir")&&0>a.indexOf(".spardir/"))return null;var b=a.lastIndexOf(".spardir");return 0>b?null:a.lastIndexOf("/")>b?["SpartanSmol","Directory Entry ",a+"/input",a+"/archive",
a+"/Molecule:asBinaryString",a+"/proparc"]:["SpartanSmol","Directory Entry ",a+"/output"]},"~S");c(c$,"getObjectAsSections",function(a,b,d){if(null==a)return null;var c=null,g=!1,f=a.$replace("\\","/");0<=a.indexOf(":asBinaryString")&&(g=!0,a=a.substring(0,a.indexOf(":asBinaryString")));var j=null;if(d.containsKey(f))return f;if(0<=a.indexOf("#JMOL_MODEL "))return d.put(f,f+"\n"),f;var h=a;0<=a.indexOf("|")&&(c=JU.PT.split(a,"|"),a=c[0]);var l=null;try{var m=this.getBufferedInputStreamOrErrorMessageFromName(a,
h,!1,!1,null,!1,!0);if(p(m,String))return d.put(f,m+"\n"),f;l=m;if(JU.Rdr.isCompoundDocumentS(l)){var r=J.api.Interface.getInterface("JU.CompoundDocument");r.setStream(l,!0);r.getAllDataMapped(a.$replace("\\","/"),"Molecule",d)}else if(JU.Rdr.isZipS(l))JU.Rdr.getAllZipData(l,c,a.$replace("\\","/"),"Molecule",d);else{if(g){var n=J.api.Interface.getInterface("JU.BinaryDocument");n.setStream(l,!1);j=new JU.SB;null!=b&&j.append("BEGIN Directory Entry "+f+"\n");try{for(;;)j.append(Integer.toHexString(n.readByte()&
255)).appendC(" ")}catch(q){if(y(q,Exception))j.appendC("\n");else throw q;}}else{var s=JU.Rdr.getBufferedReader(JU.Rdr.isGzipS(l)?new java.io.BufferedInputStream(JU.Rdr.newGZIPInputStream(l)):l,null),t,j=new JU.SB;for(null!=b&&j.append("BEGIN Directory Entry "+f+"\n");null!=(t=s.readLine());)j.append(t),j.appendC("\n");s.close()}null!=b&&j.append("\nEND Directory Entry "+f+"\n");d.put(f,j.toString())}}catch(u){if(y(u,Exception))d.put(f,u.toString());else throw u;}if(null!=l)try{l.close()}catch(v){if(!y(v,
Exception))throw v;}d.containsKey(f)||d.put(f,"FILE NOT FOUND: "+f+"\n");return f},"~S,~S,java.util.Map");c(c$,"getZipDirectory",function(a,b,d){a=this.getBufferedInputStreamOrErrorMessageFromName(a,a,!1,!1,null,!1,d);return JU.Rdr.getZipDirectoryAndClose(a,b?"JmolManifest":null)},"~S,~B,~B");c(c$,"getFileAsBytes",function(a,b,d){if(null==a)return null;var c=a,g=null;0<=a.indexOf("|")&&(g=JU.PT.split(a,"|"),a=g[0],d=!0);a=this.getBufferedInputStreamOrErrorMessageFromName(a,c,!1,!1,null,!1,!0);if(p(a,
String))return"Error:"+a;try{var f=null!=b||!d||null==g||1>=g.length||!JU.Rdr.isZipS(a)&&!JU.Rdr.isPngZipStream(a)?JU.Rdr.getStreamAsBytes(a,b):JU.Rdr.getZipFileContentsAsBytes(a,g,1);a.close();return f}catch(j){if(y(j,Exception))return j.toString();throw j;}},"~S,JU.OC,~B");c(c$,"getFileAsMap",function(a){var b=new java.util.Hashtable,d;if(null==a){d=Array(1);var c=this.vwr.getImageAsBytes("PNGJ",-1,-1,-1,d);if(null!=d[0])return b.put("_ERROR_",d[0]),b;d=JU.Rdr.getBIS(c)}else{c=Array(2);d=this.getFullPathNameOrError(a,
!0,c);if(p(d,String))return b.put("_ERROR_",d),b;if(!this.checkSecurity(c[0]))return b.put("_ERROR_","java.io. Security exception: cannot read file "+c[0]),b}try{JU.Rdr.readFileAsMap(d,b,a)}catch(g){if(y(g,Exception))b.clear(),b.put("_ERROR_",""+g);else throw g;}return b},"~S");c(c$,"getFileDataOrErrorAsString",function(a,b,d,c,g){a[1]="";var f=a[0];if(null==f)return!1;d=this.getBufferedReaderOrErrorMessageFromName(f,a,!1,d);if(p(d,String))return a[1]=d,!1;if(g&&!this.checkSecurity(a[0]))return a[1]=
"java.io. Security exception: cannot read file "+a[0],!1;try{return JU.Rdr.readAllAsString(d,b,c,a,1)}catch(j){if(y(j,Exception))return!1;throw j;}},"~A,~N,~B,~B,~B");c(c$,"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(c$,"loadImage",function(a,b){var d=null,c=null,g=null;p(a,java.util.Map)&&(a=a.containsKey("_DATA_")?a.get("_DATA_"):a.get("_IMAGE_"));
p(a,JS.SV)&&(a=a.value);var f=p(a,String)?a:null;null!=f&&f.startsWith(";base64,")?g=JU.Base64.decodeBase64(f):p(a,JU.BArray)?g=a.data:(f=this.getClassifiedName(a,!0),c=null==f?"cannot read file name: "+a:f[0].$replace("\\","/"),null!=f&&(d=this.jmb.getImage(this.vwr,c,b)));null!=g&&(d=this.jmb.getImage(this.vwr,g,b));p(d,String)&&(c=d,d=null);this.vwr.isJS||(null!=d&&null!=g&&(c=";base64,"+JU.Base64.getBase64(g).toString()),this.vwr.loadImageData(d,c,b,null))},"~O,~S");c$.urlTypeIndex=c(c$,"urlTypeIndex",
function(a){if(null==a)return-2;for(var b=0;b<JV.FileManager.urlPrefixes.length;++b)if(a.startsWith(JV.FileManager.urlPrefixes[b]))return b;return-1},"~S");c$.isLocal=c(c$,"isLocal",function(a){if(null==a)return!1;a=JV.FileManager.urlTypeIndex(a);return 0>a||4==a},"~S");c(c$,"getClassifiedName",function(a,b){if(null==a)return[null];var d=0<this.pathForAllFiles.length;if(a.startsWith("?")||a.startsWith("http://?")){if(null==(a=this.vwr.dialogAsk("Load",a)))return[b?"#CANCELED#":null];d=!1}var c=null,
g=null,f=null;if(a.startsWith("cache://"))return f=Array(3),f[0]=f[2]=a,f[1]=JV.FileManager.stripPath(f[0]),f;a=this.vwr.resolveDatabaseFormat(a);0>a.indexOf(":")&&0!=a.indexOf("/")&&(a=JV.FileManager.addDirectory(this.vwr.getDefaultDirectory(),a));if(null==this.appletDocumentBaseURL)if(0<=JV.FileManager.urlTypeIndex(a)||this.vwr.haveAccess(JV.Viewer.ACCESS.NONE)||this.vwr.haveAccess(JV.Viewer.ACCESS.READSPT)&&!a.endsWith(".spt")&&!a.endsWith("/"))try{g=new java.net.URL(U("java.net.URL"),a,null)}catch(j){if(y(j,
java.net.MalformedURLException))return[b?j.toString():null];throw j;}else var c=this.vwr.apiPlatform.newFile(a),f=c.getFullPath(),h=c.getName(),f=[null==f?h:f,h,null==f?h:"file:/"+f.$replace("\\","/")];else try{if(1==a.indexOf(":\\")||1==a.indexOf(":/"))a="file:/"+a;g=new java.net.URL(this.appletDocumentBaseURL,a,null)}catch(l){if(y(l,java.net.MalformedURLException))return[b?l.toString():null];throw l;}null!=g&&(f=Array(3),f[0]=f[2]=g.toString(),f[1]=JV.FileManager.stripPath(f[0]));d&&(d=f[0],f[0]=
this.pathForAllFiles+f[1],JU.Logger.info("FileManager substituting "+d+" --\x3e "+f[0]));if(b&&(null!=c||4==JV.FileManager.urlTypeIndex(f[0])))c=null==c?JU.PT.trim(f[0].substring(5),"/"):f[0],d=c.length-f[1].length-1,0<d&&(c=c.substring(0,d),JV.FileManager.setLocalPath(this.vwr,c,!0));return f},"~S,~B");c$.addDirectory=c(c$,"addDirectory",function(a,b){if(0==a.length)return b;var d=0<b.length?b.charAt(0):" ",c=a.toLowerCase();if((c.endsWith(".zip")||c.endsWith(".tar"))&&"|"!=d&&"/"!=d)a+="|";return a+
("/"==d||"/"==d||"|"==(d=a.charAt(a.length-1))||"/"==d?"":"/")+b},"~S,~S");c(c$,"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");c$.fixPath=c(c$,"fixPath",function(a){a=a.$replace("\\","/");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 d=a.substring(0,b);for(a=a.substring(b);0<=(b=a.lastIndexOf("/../"));){var c=
a.substring(0,b).lastIndexOf("/");if(0>c)return JU.PT.rep(d+a,"/../","/");a=a.substring(0,c)+a.substring(b+3)}0==a.length&&(a="/");return d+a},"~S");c(c$,"getFilePath",function(a,b,d){a=this.getClassifiedName(a,!1);return null==a||1==a.length?"":d?a[1]:b?a[2]:null==a[0]?"":a[0].$replace("\\","/")},"~S,~B,~B");c$.getLocalDirectory=c(c$,"getLocalDirectory",function(a,b){var d=a.getP(b?"currentLocalPath":"defaultDirectoryLocal");b&&0==d.length&&(d=a.getP("defaultDirectoryLocal"));if(0==d.length)return a.isApplet()?
null:a.apiPlatform.newFile(System.getProperty("user.dir","."));a.isApplet()&&0==d.indexOf("file:/")&&(d=d.substring(6));d=a.apiPlatform.newFile(d);try{return d.isDirectory()?d:d.getParentAsFile()}catch(c){if(y(c,Exception))return null;throw c;}},"JV.Viewer,~B");c$.setLocalPath=c(c$,"setLocalPath",function(a,b,d){for(;b.endsWith("/")||b.endsWith("\\");)b=b.substring(0,b.length-1);a.setStringProperty("currentLocalPath",b);d||a.setStringProperty("defaultDirectoryLocal",b)},"JV.Viewer,~S,~B");c$.getLocalPathForWritingFile=
c(c$,"getLocalPathForWritingFile",function(a,b){if(b.startsWith("http://"))return b;b=JU.PT.rep(b,"?","");if(0==b.indexOf("file:/"))return b.substring(6);if(0==b.indexOf("/")||0<=b.indexOf(":"))return b;var d=null;try{d=JV.FileManager.getLocalDirectory(a,!1)}catch(c){if(!y(c,Exception))throw c;}return null==d?b:JV.FileManager.fixPath(d.toString()+"/"+b)},"JV.Viewer,~S");c$.setScriptFileReferences=c(c$,"setScriptFileReferences",function(a,b,d,c){null!=b&&(a=JV.FileManager.setScriptFileRefs(a,b,!0));
null!=d&&(a=JV.FileManager.setScriptFileRefs(a,d,!1));a=JU.PT.rep(a,'\u0001"','"');if(null!=c){for(;c.endsWith("/");)c=c.substring(0,c.length-1);for(b=0;b<JV.FileManager.scriptFilePrefixes.length;b++)d=JV.FileManager.scriptFilePrefixes[b],a=JU.PT.rep(a,d+".",d+c)}return a},"~S,~S,~S,~S");c$.setScriptFileRefs=c(c$,"setScriptFileRefs",function(a,b,d){if(null==b)return a;var c=0==b.length,g=new JU.Lst;J.io.JmolBinary.getFileReferences(a,g);for(var f=new JU.Lst,j=new JU.Lst,h=g.size(),l=0;l<h;l++){var m=
g.get(l),r=m;if(d==JV.FileManager.isLocal(r)){var n=c?-1:r.indexOf("/"+b+"/");0<=n?r=r.substring(n+1):(n=r.lastIndexOf("/"),0>n&&!c&&(r="/"+r),(0>n||c)&&n++,r=b+r.substring(n))}JU.Logger.info("FileManager substituting "+m+" --\x3e "+r);f.addLast('"'+m+'"');j.addLast('\u0001"'+r+'"')}return JU.Txt.replaceStrings(a,f,j)},"~S,~S,~B");c$.stripPath=c(c$,"stripPath",function(a){var b=Math.max(a.lastIndexOf("|"),a.lastIndexOf("/"));return a.substring(b+1)},"~S");c$.fixFileNameVariables=c(c$,"fixFileNameVariables",
function(a,b){var d=JU.PT.rep(a,"%FILE",b);if(0>d.indexOf("%LC"))return d;b=b.toLowerCase();d=JU.PT.rep(d,"%LCFILE",b);4==b.length&&(d=JU.PT.rep(d,"%LC13",b.substring(1,3)));return d},"~S,~S");c(c$,"cachePut",function(a,b){a=a.$replace("\\","/");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(c$,"getCachedPngjBytes",function(a){return this.jmb.getCachedPngjBytes(a)},"~S");c(c$,"cacheGet",function(a,
b){a=a.$replace("\\","/");var d=a.indexOf("|");0<=d&&(a=a.substring(0,d));d=null;(d=Jmol.Cache.get(a))||(d=this.cache.get(a));return b&&p(d,String)?null:d},"~S,~B");c(c$,"cacheClear",function(){JU.Logger.info("cache cleared");this.cache.clear();this.clearPngjCache(null)});c(c$,"cacheFileByNameAdd",function(a,b){if(null==a||!b&&a.equalsIgnoreCase(""))return this.cacheClear(),-1;var d;if(b){a=this.vwr.resolveDatabaseFormat(a);d=this.getFileAsBytes(a,null,!0);if(p(d,String))return 0;this.cachePut(a,
d)}else{if(a.endsWith("*"))return JU.AU.removeMapKeys(this.cache,a.substring(0,a.length-1));d=this.cache.remove(a.$replace("\\","/"))}return null==d?0:(p(d,String),d.length)},"~S,~B");c(c$,"cacheList",function(){for(var a=new java.util.Hashtable,b,d=this.cache.entrySet().iterator();d.hasNext()&&((b=d.next())||1);)a.put(b.getKey(),Integer.$valueOf(JU.PT.isAB(b.getValue())?b.getValue().length:b.getValue().toString().length));return a});c(c$,"getCanonicalName",function(a){var b=this.getClassifiedName(a,
!0);return null==b?a:b[2]},"~S");h(c$,"postByteArray",function(a,b){var d=this.getBufferedInputStreamOrErrorMessageFromName(a,null,!1,!1,b,!1,!0);if(p(d,String))return d;try{d=JU.Rdr.getStreamAsBytes(d,null)}catch(c){if(y(c,java.io.IOException))try{d.close()}catch(g){if(!y(g,java.io.IOException))throw g;}else throw c;}return null==d?"":JU.Rdr.fixUTF(d)},"~S,~A");C(c$,"SIMULATION_PROTOCOL","http://SIMULATION/","URL_LOCAL",4,"urlPrefixes",["http:","https:","sftp:","ftp:","file:"]);c$.scriptFilePrefixes=
c$.prototype.scriptFilePrefixes=['/*file*/"','FILE0="','FILE1="']});n("JV");w(["java.util.Hashtable","JU.P3","J.c.AXES","$.CBK"],"JV.GlobalSettings","java.lang.Boolean $.Float JU.BS $.DF $.Lst $.PT $.SB J.c.STR JS.SV JU.BSUtil $.Escape $.Logger $.Txt JV.JC $.StateManager $.Viewer".split(" "),function(){c$=t(function(){this.databases=this.htUserVariables=this.htPropertyFlagsRemoved=this.htBooleanParameterFlags=this.htNonbooleanParameterValues=this.vwr=null;this.ambientPercent=45;this.diffusePercent=
84;this.specular=!0;this.specularExponent=6;this.phongExponent=64;this.specularPercent=22;this.specularPower=40;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}){color structure}else{wireframe -0.1};if (!{visible}){spacefill 23%};select *}";this.forceAutoBond=!1;this.fractionalRelative=!0;this.inlineNewlineChar="|";this.pubChemFormat=this.nihResolverFormat=
this.smilesUrlFormat=this.nmrPredictFormat=this.nmrUrlFormat=this.loadLigandFormat=this.loadFormat=null;this.edsUrlFormat="http://eds.bmc.uu.se/eds/dfs/%LC13/%LCFILE/%LCFILE.omap";this.edsUrlCutoff="http://eds.bmc.uu.se/eds/dfs/%LC13/%LCFILE/%LCFILE.sfdat";this.edsUrlOptions="within 2.0 {*}";this.minBondDistance=0.4;this.minPixelSelRadius=6;this.pdbSequential=this.pdbGetHeader=this.pdbAddHydrogens=!1;this.percentVdwAtom=23;this.smallMoleculeMaxAtoms=4E4;this.smartAromatic=!0;this.allowMoveAtoms=this.allowRotateSelected=
this.legacyHAddition=this.legacyAutoBonding=this.zeroBasedXyzRasmol=!1;this.defaultPerspectiveDepth=!0;this.visualRange=5;this.solventOn=!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.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=!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.hbondsBackbone=this.bondModeOr=this.partialDots=!1;this.hbondsAngleMinimum=
90;this.hbondsDistanceMaximum=3.25;this.hbondsRasmol=!0;this.hbondsSolid=!1;this.modeMultipleBond=2;this.showMultipleBonds=this.showHydrogens=!0;this.ssbondsBackbone=!1;this.multipleBondSpacing=-1;this.multipleBondRadiusFactor=0;this.chainCaseSensitive=this.cartoonRibose=this.cartoonLadders=this.cartoonFancy=this.backboneSteps=this.cartoonRockets=this.cartoonBaseEdges=!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.allowGestures=this.twistedSheets=!1;this.allowMultiTouch=this.allowModelkit=!0;this.allowKeyStrokes=!1;this.animationFps=10;this.atomPicking=!0;this.autoFps=!1;this.axesMode=null;this.axesScale=2;this.starWidth=0.05;this.bondPicking=!1;this.defaultCameraDepth=3;this.celShading=!1;this.celShadingPower=10;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=14;this.drawPicking=this.drawHover=this.dragSelected=this.disablePopupMenu=!1;this.dsspCalcHydrogen=!0;this.energyUnits="kJ";this.exportScale=1;this.helpPath="http://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.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.showUnitCellInfo=this.showUnitCellDetails=this.saveProteinStructureState=!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.strutsMultiple=!1;this.waitForMoveTo=this.useScriptQueue=this.useNumberLocalization=this.useMinimizationThread=!0;this.vectorScale=1;this.vectorsCentered=this.vectorSymmetry=!1;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.objMad=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.userDatabases=null;this.bondingVersion=0;s(this,arguments)},
JV,"GlobalSettings");K(c$,function(){this.htUserVariables=new java.util.Hashtable;this.ptDefaultLattice=new JU.P3;this.axesMode=J.c.AXES.BOUNDBOX;this.objColors=D(8,0);this.objStateOn=ca(8,!1);this.objMad=D(8,0);this.structureList=new java.util.Hashtable;this.structureList.put(J.c.STR.TURN,[30,90,-15,95]);this.structureList.put(J.c.STR.SHEET,[-180,-10,70,180,-180,-45,-180,-130,140,180,90,180]);this.structureList.put(J.c.STR.HELIX,[-160,0,-100,45])});u(c$,function(a,b,d){this.vwr=a;this.registerAllValues(b,
d)},"JV.Viewer,JV.GlobalSettings,~B");c(c$,"clear",function(){for(var a=this.htUserVariables.keySet().iterator();a.hasNext();){var b=a.next();("@"==b.charAt(0)||b.startsWith("site_"))&&a.remove()}this.setPicked(-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(c$,"registerAllValues",function(a,
b){this.htNonbooleanParameterValues=new java.util.Hashtable;this.htBooleanParameterFlags=new java.util.Hashtable;this.htPropertyFlagsRemoved=new java.util.Hashtable;null!=a&&(b||(this.htUserVariables=a.htUserVariables),this.debugScript=a.debugScript,this.disablePopupMenu=a.disablePopupMenu,this.messageStyleChime=a.messageStyleChime,this.defaultDirectory=a.defaultDirectory,this.allowGestures=a.allowGestures,this.allowModelkit=a.allowModelkit,this.allowMultiTouch=a.allowMultiTouch,this.allowKeyStrokes=
a.allowKeyStrokes,this.legacyAutoBonding=a.legacyAutoBonding,this.legacyHAddition=a.legacyHAddition,this.bondingVersion=a.bondingVersion,this.platformSpeed=a.platformSpeed,this.useScriptQueue=a.useScriptQueue,this.databases=a.databases,this.showTiming=a.showTiming,this.wireframeRotation=a.wireframeRotation,this.testFlag1=a.testFlag1,this.testFlag2=a.testFlag2,this.testFlag3=a.testFlag3,this.testFlag4=a.testFlag4);null==this.databases&&(this.databases=new java.util.Hashtable,this.getDataBaseList(JV.JC.databases),
this.getDataBaseList(this.userDatabases));this.loadFormat=this.databases.get("pdb");this.loadLigandFormat=this.databases.get("ligand");this.nmrUrlFormat=this.databases.get("nmr");this.nmrPredictFormat=this.databases.get("nmrdb");this.smilesUrlFormat=this.databases.get("nci")+"/file?format=sdf&get3d=True";this.nihResolverFormat=this.databases.get("nci");this.pubChemFormat=this.databases.get("pubchem");for(var d,c=0,g=J.c.CBK.values();c<g.length&&((d=g[c])||1);c++)this.resetValue(d.name()+"Callback",
a);this.setI("historyLevel",0);this.setI("depth",0);this.setF("gestureSwipeFactor",1);this.setB("hideNotSelected",!1);this.setO("hoverLabel","");this.setB("isKiosk",this.vwr.isKiosk());this.setO("logFile",this.vwr.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.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.setI("stereoDegrees",-5);this.setI("stateversion",0);this.setB("syncScript",this.vwr.getStatusManager().syncingScripts);this.setB("syncMouse",this.vwr.getStatusManager().syncingMouse);this.setB("syncStereo",this.vwr.getStatusManager().stereoSync);this.setB("windowCentered",!0);this.setB("zoomEnabled",!0);this.setI("zDepth",0);this.setB("zShade",!1);this.setI("zSlab",50);this.setI("_version",JV.JC.versionInt);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;Tachyon;Obj");this.setI("propertyAtomNumberColumnCount",0);this.setI("propertyAtomNumberField",0);this.setI("propertyDataColumnCount",
0);this.setI("propertyDataField",0);this.setB("undo",!0);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("ambientPercent",this.ambientPercent);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",this.axesMode.getCode());this.setF("axesScale",
this.axesScale);this.setB("axesOrientationRasmol",this.axesOrientationRasmol);this.setB("backboneSteps",this.backboneSteps);this.setB("bondModeOr",this.bondModeOr);this.setB("bondPicking",this.bondPicking);this.setI("bondRadiusMilliAngstroms",this.bondRadiusMilliAngstroms);this.setF("bondTolerance",this.bondTolerance);this.setF("cameraDepth",this.defaultCameraDepth);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("celShading",this.celShading);this.setI("celShadingPower",this.celShadingPower);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.setI("diffusePercent",this.diffusePercent);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.setO("edsUrlFormat",this.edsUrlFormat);this.setO("edsUrlCutoff",this.edsUrlCutoff);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("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("hbondsDistanceMaximum",this.hbondsDistanceMaximum);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("highResolution",this.highResolutionFlag);this.setF("hoverDelay",this.hoverDelayMs/1E3);this.setB("imageState",this.imageState);this.setB("isosurfaceKey",this.isosurfaceKey);this.setB("isosurfacePropertySmoothing",this.isosurfacePropertySmoothing);this.setI("isosurfacePropertySmoothingPower",this.isosurfacePropertySmoothingPower);this.setB("justifyMeasurements",this.justifyMeasurements);this.setB("legacyAutoBonding",this.legacyAutoBonding);this.setB("legacyHAddition",this.legacyHAddition);
this.setF("loadAtomDataTolerance",this.loadAtomDataTolerance);this.setO("loadFormat",this.loadFormat);this.setO("loadLigandFormat",this.loadLigandFormat);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("minimizationSteps",this.minimizationSteps);this.setB("minimizationRefresh",this.minimizationRefresh);this.setB("minimizationSilent",this.minimizationSilent);this.setF("minimizationCriterion",this.minimizationCriterion);this.setB("modelKitMode",this.modelKitMode);this.setF("modulationScale",this.modulationScale);this.setB("monitorEnergy",this.monitorEnergy);this.setF("multipleBondRadiusFactor",this.multipleBondRadiusFactor);
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.setO("nmrPredictFormat",this.nmrPredictFormat);this.setO("nmrUrlFormat",this.nmrUrlFormat);this.setB("partialDots",this.partialDots);this.setB("pdbAddHydrogens",this.pdbAddHydrogens);this.setB("pdbGetHeader",this.pdbGetHeader);
this.setB("pdbSequential",this.pdbSequential);this.setB("perspectiveDepth",this.defaultPerspectiveDepth);this.setI("percentVdwAtom",this.percentVdwAtom);this.setI("phongExponent",this.phongExponent);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("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("smallMoleculeMaxAtoms",this.smallMoleculeMaxAtoms);this.setO("smilesUrlFormat",this.smilesUrlFormat);this.setO("nihResolverFormat",this.nihResolverFormat);this.setO("pubChemFormat",this.pubChemFormat);this.setB("showUnitCellDetails",this.showUnitCellDetails);this.setB("showUnitCellInfo",
this.showUnitCellInfo);this.setB("solventProbe",this.solventOn);this.setF("solventProbeRadius",this.solventProbeRadius);this.setB("specular",this.specular);this.setI("specularExponent",this.specularExponent);this.setI("specularPercent",this.specularPercent);this.setI("specularPower",this.specularPower);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("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.setF("vibrationPeriod",this.vibrationPeriod);this.setF("vibrationScale",this.vibrationScale);this.setF("visualRange",this.visualRange);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.GlobalSettings,~B");c(c$,"setUnits",function(a){var b=this.measureDistanceUnits,d=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)?d.equalsIgnoreCase(this.energyUnits)||this.setO("energyUnits",this.energyUnits):this.setO("measurementUnits",this.measureDistanceUnits)},"~S");c(c$,"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(c$,"resetValue",function(a,b){this.setO(a,null==b?"":b.getParameter(a,
!0))},"~S,JV.GlobalSettings");c(c$,"setB",function(a,b){a=a.toLowerCase();this.htNonbooleanParameterValues.containsKey(a)||this.htBooleanParameterFlags.put(a,b?Boolean.TRUE:Boolean.FALSE)},"~S,~B");c(c$,"setI",function(a,b){2147483647!=b&&this.setO(a,Integer.$valueOf(b))},"~S,~N");c(c$,"setF",function(a,b){Float.isNaN(b)||this.setO(a,Float.$valueOf(b))},"~S,~N");c(c$,"setO",function(a,b){a=a.toLowerCase();null==b||this.htBooleanParameterFlags.containsKey(a)||this.htNonbooleanParameterValues.put(a,
b)},"~S,~O");c(c$,"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(c$,"setUserVariable",function(a,b){if(null==b)return null;a=a.toLowerCase();this.htUserVariables.put(a,b.setName(a));return b},"~S,JS.SV");c(c$,"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(c$,"removeUserVariable",function(a){this.htUserVariables.remove(a)},"~S");c(c$,"getUserVariable",function(a){if(null==a)return null;a=a.toLowerCase();return this.htUserVariables.get(a)},"~S");c(c$,"getParameterEscaped",function(a,b){a=a.toLowerCase();
if(this.htNonbooleanParameterValues.containsKey(a)){var d=this.htNonbooleanParameterValues.get(a);return JV.StateManager.varClip(a,JU.Escape.e(d),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(c$,"getParameter",function(a,b){var d=this.getParam(a,!1);return null==d&&b?"":d},"~S,~B");c(c$,"getOrSetNewVariable",
function(a,b){if(null==a||0==a.length)a="x";var d=this.getParam(a,!0);return null==d&&b&&"_"!=a.charAt(0)?this.setUserVariable(a,JS.SV.newV(4,"")):JS.SV.getVariable(d)},"~S,~B");c(c$,"getParam",function(a,b){a=a.toLowerCase();if(a.equals("_memory")){var d=JU.DF.formatDecimal(0,1)+"/"+JU.DF.formatDecimal(0,1);this.htNonbooleanParameterValues.put("_memory",d)}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)?(d=this.htUserVariables.get(a),b?d:JS.SV.oValue(d)):null},"~S,~B");c(c$,"getVariableList",function(){return JV.StateManager.getVariableList(this.htUserVariables,0,!0,!1)});c(c$,"setStructureList",function(a,b){this.haveSetStructureList=!0;this.structureList.put(b,a)},"~A,J.c.STR");c(c$,"getStructureList",function(){return this.structureList});c(c$,"setPicked",function(a){var b=null,d=null;0<=a&&(this.setI("_atompicked",
a),b=this.getParam("picked",!0),d=this.getParam("pickedList",!0));if(null==b||10!=b.tok)b=JS.SV.newV(10,new JU.BS),d=JS.SV.getVariableList(new JU.Lst),this.setUserVariable("picked",b),this.setUserVariable("pickedList",d);0>a||(JS.SV.getBitSet(b,!1).set(a),b=d.pushPop(null,null),10==b.tok&&d.pushPop(b,null),(10!=b.tok||!b.value.get(a))&&d.pushPop(JS.SV.newV(10,JU.BSUtil.newAndSetBit(a)),null))},"~N");c(c$,"resolveDataBase",function(a,b){var d=this.databases.get(a.toLowerCase());if(null==d)return null;
0>b.indexOf("/")&&(a.equals("pubchem")?b="name/"+b:a.equals("nci")&&(b+="/file?format=sdf&get3d=True"));return 0>d.indexOf("%FILE")?d+b:JU.Txt.formatStringS(d,"FILE",b)},"~S,~S");c$.doReportProperty=c(c$,"doReportProperty",function(a){return"_"!=a.charAt(0)&&0>JV.GlobalSettings.unreportedProperties.indexOf(";"+a+";")},"~S");c(c$,"getDataBaseList",function(a){if(null!=a)for(var b=0;b<a.length;b+=2)this.databases.put(a[b].toLowerCase(),a[b+1])},"~A");c(c$,"getAllVariables",function(){var a=new java.util.Hashtable;
a.putAll(this.htBooleanParameterFlags);a.putAll(this.htNonbooleanParameterValues);a.putAll(this.htUserVariables);return a});c(c$,"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 d=this.vwr.getDefaultVdwNameOrData(-2147483648,null,null);this.app(b,"set defaultVDW "+d);d.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.loadLigandFormat));
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 edsUrlFormat "+JU.PT.esc(this.edsUrlFormat));this.app(b,"#set edsUrlCutoff "+JU.PT.esc(this.edsUrlCutoff));this.app(b,"set bondingVersion "+this.bondingVersion);this.app(b,"set legacyAutoBonding "+this.legacyAutoBonding);this.app(b,"set legacyHAddition "+this.legacyHAddition);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 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(c$,"app",function(a,b){0!=b.length&&a.append("  ").append(b).append(";\n")},"JU.SB,~S");c$.unreportedProperties=c$.prototype.unreportedProperties=(";ambientpercent;animationfps;antialiasdisplay;antialiasimages;antialiastranslucent;appendnew;axescolor;axesposition;axesmolecular;axesorientationrasmol;axesunitcell;axeswindow;axis1color;axis2color;axis3color;backgroundcolor;backgroundmodel;bondsymmetryatoms;boundboxcolor;cameradepth;bondingversion;debug;debugscript;defaultlatttice;defaults;defaultdropscript;diffusepercent;;exportdrivers;exportscale;_filecaching;_filecache;fontcaching;fontscaling;forcefield;language;legacyautobonding;legacyhaddition;loglevel;logfile;loggestures;logcommands;measurestylechime;loadformat;loadligandformat;smilesurlformat;pubchemformat;nihresolverformat;edsurlformat;edsurlcutoff;multiprocessor;navigationmode;;pathforallfiles;perspectivedepth;phongexponent;perspectivemodel;platformspeed;preservestate;refreshing;repaintwaitms;rotationradius;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;propertycolorschemeoverload;radius;rgbblue;rgbgreen;rgbred;scaleangstromsperinch;selectionhalos;showscript;showselections;solvent;strandcount;spinx;spiny;spinz;spinfps;navx;navy;navz;navfps;"+
J.c.CBK.getNameList()+";undo;atompicking;drawpicking;bondpicking;pickspinrate;picklabel;modelkitmode;allowgestures;allowkeystrokes;allowmultitouch;allowmodelkit;").toLowerCase()});n("JV");w(["java.util.Hashtable","JU.SB","$.V3","JU.Elements","$.Txt"],"JV.JC",["java.lang.Short","JU.AU","$.PT"],function(){c$=B(JV,"JC");c$.embedScript=c(c$,"embedScript",function(a){return"\n/****** Jmol Embedded Script **** \n"+a+"\n**/"},"~S");c$.getSpecialAtomName=c(c$,"getSpecialAtomName",function(a){return JV.JC.specialAtomNames[a]},
"~N");c$.getSpecialAtomNames=c(c$,"getSpecialAtomNames",function(){JV.JC.htSpecialAtoms=new java.util.Hashtable;for(var a=JV.JC.specialAtomNames.length;0<=--a;){var b=JV.JC.specialAtomNames[a];null!=b&&JV.JC.htSpecialAtoms.put(b,Integer.$valueOf(a))}});c$.lookupSpecialAtomID=c(c$,"lookupSpecialAtomID",function(a){null==JV.JC.htSpecialAtoms&&JV.JC.getSpecialAtomNames();a=JV.JC.htSpecialAtoms.get(a);return null!=a?a.intValue():0},"~S");c$.getAminoAcidValenceAndCharge=c(c$,"getAminoAcidValenceAndCharge",
function(a,b,d){if(null==a||0==a.length||3<a.length||b.equals("CA")||b.equals("CB"))return!1;var c=b.charAt(0),e=1==b.length?"\x00":b.charAt(1),g=!1,h=d[3];switch(a.length){case 3:if(1==b.length)switch(c){case "N":if(1<h)return!1;d[1]=1;break;case "O":g=0>"HOH;DOD;WAT".indexOf(a);break;default:g=!0}else a+=c,g=0<="ARGN;ASNN;ASNO;ASPO;GLNN;GLNO;GLUO;HISN;HISC;PHECTRPC;TRPN;TYRC".indexOf(a),0<="LYSN".indexOf(a)?d[1]=1:"O"==c&&"X"==e&&(d[1]=-1);break;case 1:case 2:if(2<b.length&&"'"==b.charAt(2))return!1;
switch(c){case "C":if("7"==e)return!1;break;case "N":switch(e){case "1":case "3":0<="A3;A1;C3;G3;I3".indexOf(""+a.charAt(a.length-1)+e)&&d[0]--;break;case "7":d[0]--}}g=!0}if(g)switch(c){case "N":d[2]=2;break;case "C":d[2]=2;d[0]--;break;case "O":d[0]--}return!0},"~S,~S,~A");c$.getStandardPdbHydrogenCount=c(c$,"getStandardPdbHydrogenCount",function(a){a=JV.JC.knownPDBGroupID(a);return 0>a||a>=JV.JC.pdbHydrogenCount.length?-1:JV.JC.pdbHydrogenCount[a]},"~S");c$.addGroup3Name=c(c$,"addGroup3Name",function(a){JV.JC.group3NameCount==
JV.JC.group3Names.length&&(JV.JC.group3Names=JU.AU.doubleLengthS(JV.JC.group3Names));var b=JV.JC.group3NameCount++;JV.JC.group3Names[b]=a;JV.JC.htGroup.put(a,Short.$valueOf(b));return b},"~S");c$.getGroup3For=c(c$,"getGroup3For",function(a){return JV.JC.group3Names[a]},"~N");c$.getGroupIdFor=c(c$,"getGroupIdFor",function(a){if(null==a)return-1;var b=JV.JC.knownPDBGroupID(a);return-1==b?JV.JC.addGroup3Name(a):b},"~S");c$.knownPDBGroupID=c(c$,"knownPDBGroupID",function(a){return null!=a&&(a=JV.JC.htGroup.get(a),
null!=a)?a.shortValue():-1},"~S");c$.getPdbBondInfo=c(c$,"getPdbBondInfo",function(a,b){null==JV.JC.htPdbBondInfo&&(JV.JC.htPdbBondInfo=new java.util.Hashtable);var d=JV.JC.htPdbBondInfo.get(a);if(null!=d)return d;d=JV.JC.knownPDBGroupID(a);if(0>d||d>JV.JC.pdbBondInfo.length)return null;var c=JV.JC.pdbBondInfo[d];if(b&&0<=(d=c.indexOf("O3'")))c=c.substring(0,d);for(var e=JU.PT.getTokens(c),d=Array(q(e.length/2)),g=0,h=0;g<d.length;g++){var n=e[h++],p=e[h++];if(1==p.length)switch(p.charAt(0)){case "N":p=
"H@H2";break;case "B":p="HB3@HB2";break;case "D":p="HD2@HD3";break;case "G":p="HG3@HG2";break;case "2":p="H2''@H2'";break;case "5":p="H5''@H5'"}"H"!=p.charAt(0)&&0<n.compareTo(p)&&(c=p,p=n,n=c);d[g]=[n,p,p.startsWith("H")?"1":"2"]}JV.JC.htPdbBondInfo.put(a,d);return d},"~S,~B");c$.checkCarbohydrate=c(c$,"checkCarbohydrate",function(a){return null!=a&&0<=",[AHR],[ALL],[AMU],[ARA],[ARB],[BDF],[BDR],[BGC],[BMA],[FCA],[FCB],[FRU],[FUC],[FUL],[GAL],[GLA],[GLC],[GXL],[GUP],[LXC],[MAN],[RAM],[RIB],[RIP],[XYP],[XYS],[CBI],[CT3],[CTR],[CTT],[LAT],[MAB],[MAL],[MLR],[MTT],[SUC],[TRE],[GCU],[MTL],[NAG],[NDG],[RHA],[SOR],[SOL],[SOE],[XYL],[A2G],[LBT],[NGA],[SIA],[SLB],[AFL],[AGC],[GLB],[NAN],[RAA]".indexOf("["+
a.toUpperCase()+"]")},"~S");c$.getGroup3List=c(c$,"getGroup3List",function(){if(null!=JV.JC.group3List)return JV.JC.group3List;for(var a=new JU.SB,b=1;42>b;b++)a.append(",[").append((JV.JC.predefinedGroup3Names[b]+"   ").substring(0,3)+"]");a.append(",[AHR],[ALL],[AMU],[ARA],[ARB],[BDF],[BDR],[BGC],[BMA],[FCA],[FCB],[FRU],[FUC],[FUL],[GAL],[GLA],[GLC],[GXL],[GUP],[LXC],[MAN],[RAM],[RIB],[RIP],[XYP],[XYS],[CBI],[CT3],[CTR],[CTT],[LAT],[MAB],[MAL],[MLR],[MTT],[SUC],[TRE],[GCU],[MTL],[NAG],[NDG],[RHA],[SOR],[SOL],[SOE],[XYL],[A2G],[LBT],[NGA],[SIA],[SLB],[AFL],[AGC],[GLB],[NAN],[RAA]");
JV.JC.group3Count=q(a.length()/6);return JV.JC.group3List=a.toString()});c$.isHetero=c(c$,"isHetero",function(a){return 42<=JV.JC.getGroup3Pt(a)},"~S");c$.getGroup3Pt=c(c$,"getGroup3Pt",function(a){JV.JC.getGroup3List();var b=(new JU.SB).append("[");b.append(a);switch(a.length){case 1:b.append("  ");break;case 2:b.append(" ")}a=JV.JC.group3List.indexOf(b.toString());return 0>a?2147483647:q(a/6)+1},"~S");c$.getGroup3Count=c(c$,"getGroup3Count",function(){if(0<JV.JC.group3Count)return JV.JC.group3Count;
JV.JC.getGroup3List();return JV.JC.group3Count=q(JV.JC.group3List.length/6)});c$.isShapeSecondary=c(c$,"isShapeSecondary",function(a){return 9<=a&&16>a},"~N");c$.getShapeVisibilityFlag=c(c$,"getShapeVisibilityFlag",function(a){return 16<<Math.min(a,27)},"~N");c$.shapeTokenIndex=c(c$,"shapeTokenIndex",function(a){switch(a){case 1141899265:case 1073741860:return 0;case 1678770178:case 659488:return 1;case 1612189718:return 2;case 1611141176:return 3;case 1708058:return 4;case 1826248716:return 5;case 1746538509:case 537006096:return 6;
case 1113200652:return 7;case 1113200646:return 8;case 1115297793:return 9;case 1113200654:return 10;case 1113200642:return 11;case 1650071565:return 12;case 1113200647:return 13;case 1113200649:return 14;case 1113200650:return 15;case 1113198595:return 16;case 135175:return 17;case 135198:return 18;case 1113198597:return 19;case 1113198596:return 20;case 135192:return 21;case 135174:return 23;case 135176:return 22;case 135180:return 24;case 135402505:return 25;case 135182:return 26;case 1183762:return 27;
case 135188:return 28;case 135190:return 29;case 537022465:return 30;case 1611272194:return 33;case 1679429641:return 31;case 1614417948:return 32;case 544771:return 34;case 1611272202:return 35}return-1},"~N");c$.getShapeClassName=c(c$,"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&&29>a?"surface.":23==a?"cgo.":".")+JV.JC.shapeClassBases[a]},"~N,~B");c$.isScriptType=c(c$,"isScriptType",function(a){return JU.PT.isOneOf(a.substring(a.lastIndexOf(".")+
1),";pse;spt;png;pngj;jmol;zip;")},"~S");c$.getOffset=c(c$,"getOffset",function(a,b){a=Math.min(Math.max(a,-127),127);b=Math.min(Math.max(b,-127),127);return(a&255)<<8|b&255},"~N,~N");c$.getXOffset=c(c$,"getXOffset",function(a){switch(a){case 0:return 4;case 32767:return 0;default:return a<<48>>56}},"~N");c$.getYOffset=c(c$,"getYOffset",function(a){switch(a){case 0:return-4;case 32767:return 0;default:return-(a<<56>>56)}},"~N");c$.getAlignmentName=c(c$,"getAlignmentName",function(a){return JV.JC.hAlignNames[a&
3]},"~N");c$.getPointer=c(c$,"getPointer",function(a){return 0==(a&1)?"":0<(a&2)?"background":"on"},"~N");c$.getJSVSyncSignal=c(c$,"getJSVSyncSignal",function(a){return 7>a.length?-1:"JSPECVIPEAKS: SELECT:JSVSTR:H1SIMUL".indexOf(a.substring(0,7).toUpperCase())},"~S");C(c$,"databases","dssr;http://x3dna.bio.columbia.edu/dssr/report.php?id=%FILE&opts=--jmol%20--more;dssrModel;http://x3dna.bio.columbia.edu/dssr/report.php?POST?opts=--jmol --more&model=;ligand;http://www.rcsb.org/pdb/files/ligand/%FILE.cif;mp;http://www.materialsproject.org/materials/%FILE/cif;nci;http://cactus.nci.nih.gov/chemical/structure/%FILE;nmr;http://www.nmrdb.org/new_predictor?POST?molfile=;nmrdb;http://www.nmrdb.org/service/predictor?POST?molfile=;pdb;http://www.rcsb.org/pdb/files/%FILE.pdb.gz;pdbe;http://www.ebi.ac.uk/pdbe/entry-files/download/%FILE.cif;pubchem;http://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/%FILE/SDF?record_type=3d;map;http://wwwdev.ebi.ac.uk/pdbe/api/%TYPE/%FILE?pretty=false&metadata=true".split(";"),
"copyright","(C) 2012 Jmol Development","version",null,"date",null,"versionInt",0);var a=null,b=null,a=___JmolVersion,b=___JmolDate;null!=b&&(b=b.substring(7,23));JV.JC.version=null!=a?a:"(Unknown version)";JV.JC.date=null!=b?b:"(Unknown date)";a=-1;try{var d=JV.JC.version,e=d.indexOf(".");0>e&&(a=1E5*Integer.parseInt(d),d=null);null!=d&&(a=1E5*Integer.parseInt(d.substring(0,e)),d=d.substring(e+1),e=d.indexOf("."),0>e&&(a+=1E3*Integer.parseInt(d),d=null),null!=d&&(a+=1E3*Integer.parseInt(d.substring(0,
e)),d=d.substring(e+1),e=d.indexOf("_"),0<=e&&(d=d.substring(0,e)),e=d.indexOf(" "),0<=e&&(d=d.substring(0,e)),a+=Integer.parseInt(d)))}catch(g){if(!y(g,NumberFormatException))throw g;}JV.JC.versionInt=a;C(c$,"officialRelease",!1,"DEFAULT_HELP_PATH","http://chemapps.stolaf.edu/jmol/docs/index.htm","STATE_VERSION_STAMP","# Jmol state version ","EMBEDDED_SCRIPT_TAG","**** Jmol Embedded Script ****","NOTE_SCRIPT_FILE","NOTE: file recognized as a script file: ","SCRIPT_EDITOR_IGNORE","\u0001## EDITOR_IGNORE ##",
"REPAINT_IGNORE","\u0001## REPAINT_IGNORE ##","LOAD_ATOM_DATA_TYPES",";xyz;vxyz;vibration;temperature;occupancy;partialcharge;","radiansPerDegree",0.017453292519943295,"allowedQuaternionFrames","RC;RP;a;b;c;n;p;q;x;","EXPORT_DRIVER_LIST","Idtf;Maya;Povray;Vrml;X3d;Tachyon;Obj");c$.center=c$.prototype.center=JU.V3.new3(0,0,0);c$.axisX=c$.prototype.axisX=JU.V3.new3(1,0,0);c$.axisY=c$.prototype.axisY=JU.V3.new3(0,1,0);c$.axisZ=c$.prototype.axisZ=JU.V3.new3(0,0,1);c$.axisNX=c$.prototype.axisNX=JU.V3.new3(-1,
0,0);c$.axisNY=c$.prototype.axisNY=JU.V3.new3(0,-1,0);c$.axisNZ=c$.prototype.axisNZ=JU.V3.new3(0,0,-1);c$.unitAxisVectors=c$.prototype.unitAxisVectors=[JV.JC.axisX,JV.JC.axisY,JV.JC.axisZ,JV.JC.axisNX,JV.JC.axisNY,JV.JC.axisNZ];C(c$,"XY_ZTOP",100,"DEFAULT_PERCENT_VDW_ATOM",23,"DEFAULT_BOND_RADIUS",0.15,"DEFAULT_BOND_MILLIANGSTROM_RADIUS",Y(150),"DEFAULT_STRUT_RADIUS",0.3,"DEFAULT_BOND_TOLERANCE",0.45,"DEFAULT_MIN_BOND_DISTANCE",0.4,"DEFAULT_MAX_CONNECT_DISTANCE",1E8,"DEFAULT_MIN_CONNECT_DISTANCE",
0.1,"MINIMIZATION_ATOM_MAX",200,"MINIMIZE_FIXED_RANGE",5,"ENC_CALC_MAX_DIST",3,"ENV_CALC_MAX_LEVEL",3,"LABEL_FRONT_FLAG",32,"LABEL_GROUP_FLAG",16,"LABEL_POINTER_FLAGS",3,"LABEL_ALIGN_FLAGS",12,"LABEL_ZPOS_FLAGS",48,"LABEL_SCALE_FLAG",64,"LABEL_EXACT_OFFSET_FLAG",128,"LABEL_FLAGS",255,"LABEL_FLAG_OFFSET",8,"MOUSE_NONE",-1,"MULTIBOND_NEVER",0,"MULTIBOND_WIREFRAME",1,"MULTIBOND_NOTSMALL",2,"MULTIBOND_ALWAYS",3,"MAXIMUM_AUTO_BOND_COUNT",20,"madMultipleBondSmallMaximum",500,"ANGSTROMS_PER_BOHR",0.5291772,
"altArgbsCpk",[4294907027,4290750118,4294967088,4283897743,4294967232,4294967200,4292401368,4283453520,4282400832,4279259216],"argbsAmino",[4290682990,4291348680,4279524095,4278246620,4293265930,4293322240,4278246620,4293265930,4293651435,4286743250,4279206415,4279206415,4279524095,4293322240,4281479850,4292646530,4294612480,4294612480,4290009780,4281479850,4279206415,4294928820,4294928820,4290682990],"argbShapelyBackbone",4290295992,"argbShapelySpecial",4284350558,"argbShapelyDefault",4294902015,
"argbsChainAtom",[4294967295,4290826495,4289789872,4294951112,4294967168,4294951167,4289786096,4294955120,4293951616,4294303411,4278239231,4291648604,4284927402,4288335154,4293821166,4278243025,4278255487,4282168177,4278190219,4290623339,4278215680,4286578688,4286611456,4286578816,4278222976,4290283019,4289864226],"argbsChainHetero",[4294967295,-7298865,-8335464,-3174224,-3158160,-3174193,-8339264,-3170208,-4173712,-3821949,-16734257,-4895668,-11094638,-7686870,-4296002,-16730463,-16724113,-13329567,
-16777029,-5922981,-16739328,-5242880,-5197824,-5242704,-16731984,-1526253,-4050382],"argbsFormalCharge",[4294901760,4294918208,4294934656,4294951104,4294967295,4292401407,4290032895,4287664383,4285295871,4282927359,4280558847,4278190335],"argbsRwbScale",[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]);c$.FORMAL_CHARGE_COLIX_RED=c$.prototype.FORMAL_CHARGE_COLIX_RED=JU.Elements.elementSymbols.length+JV.JC.altArgbsCpk.length;c$.PARTIAL_CHARGE_COLIX_RED=c$.prototype.PARTIAL_CHARGE_COLIX_RED=JV.JC.FORMAL_CHARGE_COLIX_RED+JV.JC.argbsFormalCharge.length;c$.PARTIAL_CHARGE_RANGE_SIZE=c$.prototype.PARTIAL_CHARGE_RANGE_SIZE=JV.JC.argbsRwbScale.length;C(c$,"argbsRoygbScale",[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],"argbsIsosurfacePositive",4283441312,"argbsIsosurfaceNegative",4288684112,"specialAtomNames",[null,"N","CA","C","O","O1","O5'","C5'","C4'","C3'","O3'","C2'","C1'",
"P","OD1","OD2","OE1","OE2","SG",null,null,null,null,null,null,null,null,null,null,null,null,null,"N1","C2","N3","C4","C5","C6","O2","N7","C8","N9","N4","N2","N6","C5M","O6","O4","S4","C7","H1","H2","H3",null,null,null,null,null,null,null,null,null,null,null,"OXT","H","1H","2H","3H","HA","1HA","2HA","H5T","O5T","O1P","OP1","O2P","OP2","O4'","O2'","1H5'","2H5'","H4'","H3'","1H2'","2H2'","2HO'","H1'","H3T","HO3'","HO5'","HA2","HA3","HA2","H5'","H5''","H2'","H2''","HO2'","O3P","OP3"]);c$.ATOMID_MAX=
c$.prototype.ATOMID_MAX=JV.JC.specialAtomNames.length;C(c$,"ATOMID_AMINO_NITROGEN",1,"ATOMID_ALPHA_CARBON",2,"ATOMID_CARBONYL_CARBON",3,"ATOMID_CARBONYL_OXYGEN",4,"ATOMID_O1",5,"ATOMID_ALPHA_ONLY_MASK",4,"ATOMID_PROTEIN_MASK",14,"ATOMID_O5_PRIME",6,"ATOMID_C5_PRIME",7,"ATOMID_C4_PRIME",8,"ATOMID_C3_PRIME",9,"ATOMID_O3_PRIME",10,"ATOMID_C2_PRIME",11,"ATOMID_C1_PRIME",12,"ATOMID_O4_PRIME",78,"ATOMID_NUCLEIC_MASK",8128,"ATOMID_NUCLEIC_PHOSPHORUS",13,"ATOMID_PHOSPHORUS_ONLY_MASK",8192,"ATOMID_DISTINGUISHING_ATOM_MAX",
14,"ATOMID_CARBONYL_OD1",14,"ATOMID_CARBONYL_OD2",15,"ATOMID_CARBONYL_OE1",16,"ATOMID_CARBONYL_OE2",17,"ATOMID_SG",18,"ATOMID_N1",32,"ATOMID_C2",33,"ATOMID_N3",34,"ATOMID_C4",35,"ATOMID_C5",36,"ATOMID_C6",37,"ATOMID_O2",38,"ATOMID_N7",39,"ATOMID_C8",40,"ATOMID_N9",41,"ATOMID_N4",42,"ATOMID_N2",43,"ATOMID_N6",44,"ATOMID_C5M",45,"ATOMID_O6",46,"ATOMID_O4",47,"ATOMID_S4",48,"ATOMID_C7",49,"ATOMID_TERMINATING_OXT",64,"ATOMID_H5T_TERMINUS",72,"ATOMID_O5T_TERMINUS",73,"ATOMID_O1P",74,"ATOMID_OP1",75,"ATOMID_O2P",
76,"ATOMID_OP2",77,"ATOMID_O2_PRIME",79,"ATOMID_H3T_TERMINUS",88,"ATOMID_HO3_PRIME",89,"ATOMID_HO5_PRIME",90,"htSpecialAtoms",null,"GROUPID_ARGININE",2,"GROUPID_ASPARAGINE",3,"GROUPID_ASPARTATE",4,"GROUPID_CYSTEINE",5,"GROUPID_GLUTAMINE",6,"GROUPID_GLUTAMATE",7,"GROUPID_HISTIDINE",9,"GROUPID_LYSINE",12,"GROUPID_PROLINE",15,"GROUPID_TRYPTOPHAN",19,"GROUPID_AMINO_MAX",24,"GROUPID_NUCLEIC_MAX",42,"GROUPID_WATER",42,"GROUPID_SOLVENT_MIN",45,"GROUPID_ION_MIN",46,"GROUPID_ION_MAX",48,"predefinedGroup3Names",
" ALA ARG ASN ASP CYS GLN GLU GLY HIS ILE LEU LYS MET PHE PRO SER THR TRP TYR VAL ASX GLX UNK G C A T U I DG DC DA DT DU DI +G +C +A +T +U +I HOH DOD WAT UREA PO4 SO4 UNL".split(" "),"naNoH","A3;A1;C3;G3;I3","aaSp2","ARGN;ASNN;ASNO;ASPO;GLNN;GLNO;GLUO;HISN;HISC;PHECTRPC;TRPN;TYRC","aaPlus","LYSN");c$.htGroup=c$.prototype.htGroup=new java.util.Hashtable;c$.group3Names=c$.prototype.group3Names=Array(128);C(c$,"group3NameCount",0);for(e=0;e<JV.JC.predefinedGroup3Names.length;++e)JV.JC.addGroup3Name(JV.JC.predefinedGroup3Names[e]);
C(c$,"htPdbBondInfo",null,"pdbBondInfo",";N N CA HA C O CB HB?;N N CA HA C O CB HB2@HB3 CG HG2@HG3 CD D NE HE CZ NH1 NH1 HH11@HH12 NH2 HH21@HH22;N N CA HA C O CB B CG OD1 ND2 HD21@HD22;N N CA HA C O CB B CG OD1;N N CA HA C O CB B SG HG;N N CA HA C O CB B CG G CD OE1 NE2 HE21@HE22;N N CA HA C O CB B CG G CD OE1;N N CA HA2@HA3 C O;N N CA HA C O CB B CG CD2 ND1 CE1 ND1 HD1 CD2 HD2 CE1 HE1 NE2 HE2;N N CA HA C O CB HB CG1 HG12@HG13 CG2 HG2? CD1 HD1?;N N CA HA C O CB HB2@HB3 CG HG CD1 HD1? CD2 HD2?;N N CA HA C O CB B CG G CD HD2@HD3 CE HE3@HE2 NZ HZ?;N N CA HA C O CB HB2@HB3 CG HG2@HG3 CE HE?;N N CA HA C O CB B CG CD1 CD1 HD1 CD2 CE2 CD2 HD2 CE1 CZ CE1 HE1 CE2 HE2 CZ HZ;N H CA HA C O CB B CG G CD HD2@HD3;N N CA HA C O CB B OG HG;N N CA HA C O CB HB OG1 HG1 CG2 HG2?;N N CA HA C O CB B CG CD1 CD1 HD1 CD2 CE2 NE1 HE1 CE3 CZ3 CE3 HE3 CZ2 CH2 CZ2 HZ2 CZ3 HZ3 CH2 HH2;N N CA HA C O CB B CG CD1 CD1 HD1 CD2 CE2 CD2 HD2 CE1 CZ CE1 HE1 CE2 HE2 OH HH;N N CA HA C O CB HB CG1 HG1? CG2 HG2?;CA HA C O CB HB2@HB1 C H;CA HA C O CB HB1 CB HB2 CG HG1 CG HG2;;P OP1 C5' 5 C4' H4' C3' H3' C2' H2' O2' HO2' C1' H1' C8 N7 C8 H8 C5 C4 C6 O6 N1 H1 C2 N3 N2 H21@H22 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' H2' O2' HO2' C1' H1' C2 O2 N3 C4 N4 H41@H42 C5 C6 C5 H5 C6 H6 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' H2' O2' HO2' C1' H1' C8 N7 C8 H8 C5 C4 C6 N1 N6 H61@H62 C2 N3 C2 H2 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C2 O2 N3 H3 C4 O4 C5 C6 C7 H7? C6 H6 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' H2' O2' HO2' C1' H1' C2 O2 N3 H3 C4 O4 C5 C6 C5 H5 C6 H6 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' H2' O2' HO2' C1' H1' C8 N7 C8 H8 C5 C4 C6 O6 N1 H1 C2 N3 C2 H2 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C8 N7 C8 H8 C5 C4 C6 O6 N1 H1 C2 N3 N2 H21@H22 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C2 O2 N3 C4 N4 H41@H42 C5 C6 C5 H5 C6 H6 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C8 N7 C8 H8 C5 C4 C6 N1 N6 H61@H62 C2 N3 C2 H2 O3' HO3' O5' HO5';P OP1 C5' H5'@H5'' C4' H4' C3' H3' C2' H2'@H2'' C1' H1' C2 O2 N3 H3 C4 O4 C5 C6 C7 H7? C6 H6 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' H2'@H2'' C1' H1' C2 O2 N3 H3 C4 O4 C5 C6 C5 H5 C6 H6 O3' HO3' O5' HO5';P OP1 C5' 5 C4' H4' C3' H3' C2' 2 C1' H1' C8 N7 C8 H8 C5 C4 C6 O6 N1 H1 C2 N3 C2 H2 O3' HO3' O5' HO5'".split(";"),
"pdbHydrogenCount",[0,6,16,7,6,6,9,8,4,9,12,12,14,10,10,8,6,8,11,10,10,3,5,0,13,13,13,-1,12,12,13,13,13,14,12,12],"argbsShapely",[4294902015,4278190204,4294933616,4287430540,4288675906,4294967152,4294921292,4284874752,4294967295,4285559039,4278209536,4282736197,4282861496,4283649106,4290289730,4283585106,4294930498,4290268160,4283385344,4287393868,4294937855,4294902015,4294902015,4294902015,4294930544,4294937675,4288717055,4288741280,4294934656,4286644223,4294930544,4294937675,4288717055,4288741280,
4294934656,4286644223,4294930544,4294937675,4288717055,4288741280,4294934656,4286644223],"allCarbohydrates",",[AHR],[ALL],[AMU],[ARA],[ARB],[BDF],[BDR],[BGC],[BMA],[FCA],[FCB],[FRU],[FUC],[FUL],[GAL],[GLA],[GLC],[GXL],[GUP],[LXC],[MAN],[RAM],[RIB],[RIP],[XYP],[XYS],[CBI],[CT3],[CTR],[CTT],[LAT],[MAB],[MAL],[MLR],[MTT],[SUC],[TRE],[GCU],[MTL],[NAG],[NDG],[RHA],[SOR],[SOL],[SOE],[XYL],[A2G],[LBT],[NGA],[SIA],[SLB],[AFL],[AGC],[GLB],[NAN],[RAA]","group3List",null,"group3Count",0,"predefinedGroup1Names",
"\x00ARNDCQEGHILKMFPSTWYVAG?GCATUIGCATUIGCATUI".split(""),"predefinedVariable","@_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;@bonded bondcount>0".split(";"),"predefinedStatic","@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;@cyclic his,phe,pro,trp,tyr;@acyclic amino&!cyclic;@aliphatic ala,gly,ile,leu,val;@aromatic his,phe,trp,tyr;@cystine within(group, (cys.sg or cyx.sg) and connected(cys.sg or cyx.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;@backbone protein&(_a>=1&_a<6|_a>=64&_a<72)|nucleic&(_a>=6&_a<14|_a>=72);@spine protein&_a>=1&_a<4|nucleic&_a>=6&_a<14&_a!=12;@sidechain (protein,nucleic) & !backbone;@base nucleic & !backbone;@dynamic_flatring search('[a]')".split(";"),
"MODELKIT_ZAP_STRING","5\n\nC 0 0 0\nH .63 .63 .63\nH -.63 -.63 .63\nH -.63 .63 -.63\nH .63 -.63 -.63","MODELKIT_ZAP_TITLE","Jmol Model Kit","ADD_HYDROGEN_TITLE","Viewer.AddHydrogens","DEFAULT_FONTFACE","SansSerif","DEFAULT_FONTSTYLE","Plain","LABEL_MINIMUM_FONTSIZE",6,"LABEL_MAXIMUM_FONTSIZE",63,"LABEL_DEFAULT_FONTSIZE",13,"LABEL_DEFAULT_X_OFFSET",4,"LABEL_DEFAULT_Y_OFFSET",4,"MEASURE_DEFAULT_FONTSIZE",15,"AXES_DEFAULT_FONTSIZE",14,"SHAPE_BALLS",0,"SHAPE_STICKS",1,"SHAPE_HSTICKS",2,"SHAPE_SSSTICKS",
3,"SHAPE_STRUTS",4,"SHAPE_LABELS",5,"SHAPE_MEASURES",6,"SHAPE_STARS",7,"SHAPE_MIN_HAS_SETVIS",8,"SHAPE_HALOS",8,"SHAPE_MIN_SECONDARY",9,"SHAPE_BACKBONE",9,"SHAPE_TRACE",10,"SHAPE_CARTOON",11,"SHAPE_STRANDS",12,"SHAPE_MESHRIBBON",13,"SHAPE_RIBBONS",14,"SHAPE_ROCKETS",15,"SHAPE_MAX_SECONDARY",16,"SHAPE_MIN_SPECIAL",16,"SHAPE_DOTS",16,"SHAPE_DIPOLES",17,"SHAPE_VECTORS",18,"SHAPE_GEOSURFACE",19,"SHAPE_ELLIPSOIDS",20,"SHAPE_MAX_SIZE_ZERO_ON_RESTRICT",21,"SHAPE_POLYHEDRA",21,"SHAPE_MIN_HAS_ID",22,"SHAPE_MIN_MESH_COLLECTION",
22,"SHAPE_DRAW",22,"SHAPE_MAX_SPECIAL",23,"SHAPE_CGO",23,"SHAPE_MIN_SURFACE",24,"SHAPE_ISOSURFACE",24,"SHAPE_CONTACT",25,"SHAPE_LCAOCARTOON",26,"SHAPE_MO",27,"SHAPE_LAST_ATOM_VIS_FLAG",27,"SHAPE_PMESH",28,"SHAPE_PLOT3D",29,"SHAPE_MAX_SURFACE",29,"SHAPE_MAX_MESH_COLLECTION",29,"SHAPE_ECHO",30,"SHAPE_MAX_HAS_ID",31,"SHAPE_BBCAGE",31,"SHAPE_MAX_HAS_SETVIS",32,"SHAPE_UCCAGE",32,"SHAPE_AXES",33,"SHAPE_HOVER",34,"SHAPE_FRANK",35,"SHAPE_MAX",36,"ATOM_INFRAME",1,"ATOM_VISSET",2,"ATOM_VISIBLE",4,"ATOM_NOTHIDDEN",
8,"ATOM_NOFLAGS",-64,"ATOM_INFRAME_NOTHIDDEN",9,"ATOM_SHAPE_VIS_MASK",-10,"VIS_BOND_FLAG",32,"VIS_BALLS_FLAG",16,"VIS_LABEL_FLAG",512,"VIS_BACKBONE_FLAG",8192,"shapeClassBases","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 Pmesh Plot3D Echo Bbcage Uccage Axes Hover Frank".split(" "),"SCRIPT_COMPLETED","Script completed",
"JPEG_EXTENSIONS",";jpg;jpeg;jpg64;jpeg64;");c$.IMAGE_TYPES=c$.prototype.IMAGE_TYPES=";jpg;jpeg;jpg64;jpeg64;gif;pdf;ppm;png;pngj;pngt;";c$.IMAGE_OR_SCENE=c$.prototype.IMAGE_OR_SCENE=";jpg;jpeg;jpg64;jpeg64;gif;pdf;ppm;png;pngj;pngt;scene;";C(c$,"hAlignNames",["","left","center","right",""],"vAlignNames",["xy","top","bottom","middle"],"POINTER_NONE",0,"POINTER_ON",1,"POINTER_BACKGROUND",2,"VALIGN_XY",0,"VALIGN_TOP",1,"VALIGN_BOTTOM",2,"VALIGN_MIDDLE",3,"VALIGN_XYZ",4,"ALIGN_NONE",0,"ALIGN_LEFT",1,
"ALIGN_CENTER",2,"ALIGN_RIGHT",3,"JSV_NOT",-1,"JSV_SEND_JDXMOL",0,"JSV_SETPEAKS",7,"JSV_SELECT",14,"JSV_STRUCTURE",21,"JSV_SEND_H1SIMULATE",28)});n("JV");w(null,"JV.ModelManager",["JM.ModelLoader"],function(){c$=t(function(){this.fileName=this.modelSetPathName=this.modelSet=this.vwr=null;s(this,arguments)},JV,"ModelManager");u(c$,function(a){this.vwr=a},"JV.Viewer");c(c$,"zap",function(){this.modelSetPathName=this.fileName=null;new JM.ModelLoader(this.vwr,this.vwr.getZapName(),null,null,null,null)});
c(c$,"getModelSetFileName",function(){return null!=this.fileName?this.fileName:this.vwr.getZapName()});c(c$,"getModelSetPathName",function(){return this.modelSetPathName});c(c$,"createModelSet",function(a,b,d,c,g,f){var j=null;f?(j=this.modelSet.modelSetName,j.equals("zapped")?j=null:0>j.indexOf(" (modified)")&&(j+=" (modified)")):null==c?this.zap():(this.modelSetPathName=a,this.fileName=b);null!=c&&(null==j&&(j=this.vwr.getModelAdapter().getAtomSetCollectionName(c),null!=j&&(j=j.trim(),0==j.length&&
(j=null)),null==j&&(j=JV.ModelManager.reduceFilename(b))),new JM.ModelLoader(this.vwr,j,d,c,f?this.modelSet:null,g));0==this.modelSet.getAtomCount()&&!this.modelSet.getMSInfoB("isPyMOL")&&this.zap()},"~S,~S,JU.SB,~O,JU.BS,~B");c$.reduceFilename=c(c$,"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(c$,"createAtomDataSet",function(a,b){return JM.ModelLoader.createAtomDataSet(this.vwr,this.modelSet,
b,a,this.vwr.bsA())},"~O,~N")});n("JV");c$=t(function(){this.y=this.x=-1E3;this.modifiers=0;this.time=-1;this.name=null;s(this,arguments)},JV,"MouseState");u(c$,function(a){this.name=a},"~S");c(c$,"set",function(a,b,d,c){this.time=a;this.x=b;this.y=d;this.modifiers=c},"~N,~N,~N,~N");c(c$,"setCurrent",function(a,b){this.time=a.time;2>b&&(this.x=a.x,this.y=a.y);this.modifiers=a.modifiers},"JV.MouseState,~N");c(c$,"inRange",function(a,b,d){return Math.abs(this.x-b)<=a&&Math.abs(this.y-d)<=a},"~N,~N,~N");
c(c$,"check",function(a,b,d,c,g,f){return this.modifiers==c&&(2147483647<=f?this.inRange(a,b,d):g-this.time<f&&20<g-this.time)},"~N,~N,~N,~N,~N,~N");c(c$,"is",function(a){return a.x==this.x&&a.y==this.y&&a.time==this.time},"JV.MouseState");C(c$,"MIN_DELAY_MS",20);n("JV");w(["JU.BS"],"JV.SelectionManager",["JU.AU","J.i18n.GT","JU.BSUtil"],function(){c$=t(function(){this.bsDeleted=this.bsSubset=this.bsFixed=this.bsSelection=this.bsHidden=this.listeners=this.vwr=null;this.empty=1;this.hideNotSelected=
!1;this.bsTemp=null;s(this,arguments)},JV,"SelectionManager");K(c$,function(){this.listeners=[];this.bsHidden=new JU.BS;this.bsSelection=new JU.BS;this.bsFixed=new JU.BS;this.bsTemp=new JU.BS});u(c$,function(a){this.vwr=a},"JV.Viewer");c(c$,"processDeletedModelAtoms",function(a){null!=this.bsDeleted&&JU.BSUtil.deleteBits(this.bsDeleted,a);null!=this.bsSubset&&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)},"JU.BS");c(c$,"clear",function(){this.clearSelection(!0);this.hide(null,null,0,!0);this.setSelectionSubset(null);this.bsDeleted=null;this.setMotionFixedAtoms(null)});c(c$,"display",function(a,b,d,c){switch(d){default:d=a.getModelAtomBitSetIncludingDeleted(-1,!1),this.bsHidden.or(d);case 1276118017: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);
c||this.vwr.reportSelection(J.i18n.GT.i(J.i18n.GT._("{0} atoms hidden"),this.bsHidden.cardinality()))},"JM.ModelSet,JU.BS,~N,~B");c(c$,"hide",function(a,b,d,c){JV.SelectionManager.setBitSet(this.bsHidden,b,d);null!=a&&a.setBsHidden(this.bsHidden);c||this.vwr.reportSelection(J.i18n.GT.i(J.i18n.GT._("{0} atoms hidden"),this.bsHidden.cardinality()))},"JM.ModelSet,JU.BS,~N,~B");c(c$,"setSelectionSet",function(a,b){JV.SelectionManager.setBitSet(this.bsSelection,a,b);this.empty=-1;this.selectionChanged(!1)},
"JU.BS,~N");c$.setBitSet=c(c$,"setBitSet",function(a,b,d){switch(d){default:a.clearAll();case 1276118017:null!=b&&a.or(b);break;case 1073742119:null!=b&&a.andNot(b)}},"JU.BS,JU.BS,~N");c(c$,"getHiddenSet",function(){return this.bsHidden});c(c$,"getHideNotSelected",function(){return this.hideNotSelected});c(c$,"setHideNotSelected",function(a){(this.hideNotSelected=a)&&this.selectionChanged(!1)},"~B");c(c$,"isSelected",function(a){return 0<=a&&this.bsSelection.get(a)},"~N");c(c$,"select",function(a,
b,d){null==a?(this.selectAll(!0),this.vwr.getBoolean(1613758476)||this.excludeSelectionSet(this.vwr.ms.getAtoms(1613758476,null)),this.vwr.getBoolean(1613758470)||this.excludeSelectionSet(this.vwr.ms.getAtoms(1613758470,null)),this.selectionChanged(!1)):this.setSelectionSet(a,b);if((a=this.vwr.getBoolean(603979880))||!d)b=this.getSelectionCount(),a?this.vwr.reportSelection((0==b?"No atoms":1==b?"1 atom":b+" atoms")+" selected!"):d||this.vwr.reportSelection(J.i18n.GT.i(J.i18n.GT._("{0} atoms selected"),
b))},"JU.BS,~N,~B");c(c$,"selectAll",function(a){var b=this.vwr.getAtomCount();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(c$,"clearSelection",function(a){this.setHideNotSelected(!1);this.bsSelection.clearAll();this.empty=1;this.selectionChanged(a)},"~B");c(c$,"isAtomSelected",function(a){return((null==this.bsSubset||this.bsSubset.get(a))&&null==this.bsDeleted||!this.bsDeleted.get(a))&&this.bsSelection.get(a)},
"~N");c(c$,"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(c$,"setSelectionSubset",function(a){this.bsSubset=a},"JU.BS");c(c$,"isInSelectionSubset",function(a){return 0>a||null==this.bsSubset||this.bsSubset.get(a)},"~N");c(c$,"invertSelection",function(){JU.BSUtil.invertInPlace(this.bsSelection,this.vwr.getAtomCount());this.empty=0<this.bsSelection.length()?
0:1;this.selectionChanged(!1)});c(c$,"excludeSelectionSet",function(a){null==a||1==this.empty||(this.bsSelection.andNot(a),this.empty=-1)},"JU.BS");c(c$,"getSelectionCount",function(){if(1==this.empty)return 0;this.empty=1;var a;null!=this.bsSubset?(this.bsTemp.clearAll(),this.bsTemp.or(this.bsSubset),this.bsTemp.and(this.bsSelection),a=this.bsTemp):a=this.bsSelection;a=a.cardinality();0<a&&(this.empty=0);return a});c(c$,"addListener",function(a){for(var b=this.listeners.length;0<=--b;)if(this.listeners[b]===
a){this.listeners[b]=null;break}for(var d=this.listeners.length,b=d;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[d]=a},"J.api.JmolSelectionListener");c(c$,"selectionChanged",function(a){this.hideNotSelected&&this.hide(this.vwr.ms,JU.BSUtil.copyInvert(this.bsSelection,this.vwr.getAtomCount()),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(c$,"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(c$,"getDeletedAtoms",function(){return this.bsDeleted});c(c$,"getSelectedAtoms",function(){if(null==this.bsSubset)return this.bsSelection;var a=JU.BSUtil.copy(this.bsSelection);a.and(this.bsSubset);
return a});c(c$,"getSelectedAtomsNoSubset",function(){return JU.BSUtil.copy(this.bsSelection)});c(c$,"getSelectionSubset",function(){return this.bsSubset});c(c$,"excludeAtoms",function(a,b){null!=this.bsDeleted&&a.andNot(this.bsDeleted);!b&&null!=this.bsSubset&&a.and(this.bsSubset)},"JU.BS,~B");c(c$,"setMotionFixedAtoms",function(a){this.bsFixed.clearAll();null!=a&&this.bsFixed.or(a)},"JU.BS");c(c$,"getMotionFixedAtoms",function(){return this.bsFixed});C(c$,"TRUE",1,"FALSE",0,"UNKNOWN",-1)});n("JV");
w(["JU.BS"],"JV.ShapeManager","java.lang.Boolean JU.P3 J.api.Interface J.c.PAL $.VDW JM.Atom JU.BSUtil JV.JC".split(" "),function(){c$=t(function(){this.navigationCrossHairMinMax=this.bsRenderableAtoms=this.vwr=this.shapes=this.ms=this.gdata=null;s(this,arguments)},JV,"ShapeManager");K(c$,function(){this.bsRenderableAtoms=new JU.BS;this.navigationCrossHairMinMax=D(4,0)});u(c$,function(a){this.vwr=a;this.gdata=a.gdata},"JV.Viewer");c(c$,"findNearestShapeAtomIndex",function(a,b,d,c){if(null!=this.shapes)for(var g=
0;g<this.shapes.length&&null==d[0];++g)null!=this.shapes[g]&&this.shapes[g].findNearestAtomIndex(a,b,d,c)},"~N,~N,~A,JU.BS");c(c$,"getShapes",function(){return this.shapes});c(c$,"getShapePropertyIndex",function(a,b,d){if(null==this.shapes||null==this.shapes[a])return null;this.vwr.setShapeErrorState(a,"get "+b);a=this.shapes[a].getProperty(b,d);this.vwr.setShapeErrorState(-1,null);return a},"~N,~S,~N");c(c$,"getShapePropertyData",function(a,b,d){if(null==this.shapes||null==this.shapes[a])return!1;
this.vwr.setShapeErrorState(a,"get "+b);a=this.shapes[a].getPropertyData(b,d);this.vwr.setShapeErrorState(-1,null);return a},"~N,~S,~A");c(c$,"getShapeIdFromObjectName",function(a){if(null!=this.shapes)for(var b=16;29>b;++b)if(null!=this.shapes[b]&&0<=this.shapes[b].getIndexFromName(a))return b;return-1},"~S");c(c$,"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(c$,"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)))return null;this.vwr.setShapeErrorState(a,"allocate");b.initializeShape(this.vwr,this.gdata,this.ms,a);this.vwr.setShapeErrorState(-1,null);return this.shapes[a]=b},"~N");c(c$,"refreshShapeTrajectories",function(a,b,d){var c=Integer.$valueOf(a);a=this.vwr.getModelUndeletedAtomsBitSet(a);
for(var g=0;36>g;g++)null!=this.shapes[g]&&this.setShapePropertyBs(g,"refreshTrajectories",[c,b,d],a)},"~N,JU.BS,JU.M4");c(c$,"releaseShape",function(a){null!=this.shapes&&(this.shapes[a]=null)},"~N");c(c$,"resetShapes",function(){this.vwr.noGraphicsAllowed()||(this.shapes=Array(36))});c(c$,"setShapeSizeBs",function(a,b,d,c){if(null!=this.shapes){if(null==c&&(1!=a||2147483647!=b))c=this.vwr.bsA();null!=d&&(0!=d.value&&d.vdwType===J.c.VDW.TEMP)&&this.ms.getBfactor100Lo();this.vwr.setShapeErrorState(a,
"set size");(null==d?0!=b:0!=d.value)&&this.loadShape(a);null!=this.shapes[a]&&this.shapes[a].setShapeSizeRD(b,d,c);this.vwr.setShapeErrorState(-1,null)}},"~N,~N,J.atomdata.RadiusData,JU.BS");c(c$,"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(c$,"setShapePropertyBs",function(a,b,d,c){null==this.shapes||null==this.shapes[a]||(null==c&&(c=this.vwr.bsA()),this.vwr.setShapeErrorState(a,
"set "+b),this.shapes[a].setProperty(b.intern(),d,c),this.vwr.setShapeErrorState(-1,null))},"~N,~S,~O,JU.BS");c(c$,"checkFrankclicked",function(a,b){var d=this.shapes[35];return null!=d&&d.wasClicked(a,b)},"~N,~N");c(c$,"checkObjectClicked",function(a,b,d,c,g){var f,j=null;if(0!=d&&this.vwr.getBondPicking()&&null!=(j=this.shapes[1].checkObjectClicked(a,b,d,c,!1)))return j;for(var h=0;h<JV.ShapeManager.clickableMax;h++)if(null!=(f=this.shapes[JV.ShapeManager.hoverable[h]])&&null!=(j=f.checkObjectClicked(a,
b,d,c,g)))return j;return null},"~N,~N,~N,JU.BS,~B");c(c$,"checkObjectDragged",function(a,b,d,c,g,f,j){for(var h=!1,l=0<j?j+1:36;!h&&j<l;++j)null!=this.shapes[j]&&(h=this.shapes[j].checkObjectDragged(a,b,d,c,g,f));return h},"~N,~N,~N,~N,~N,JU.BS,~N");c(c$,"checkObjectHovered",function(a,b,d,c){var g=this.shapes[1];if(c&&null!=g&&g.checkObjectHovered(a,b,d))return!0;for(c=0;c<JV.ShapeManager.hoverable.length;c++)if(g=this.shapes[JV.ShapeManager.hoverable[c]],null!=g&&g.checkObjectHovered(a,b,d))return!0;
return!1},"~N,~N,JU.BS,~B");c(c$,"deleteShapeAtoms",function(a,b){if(null!=this.shapes)for(var d=0;36>d;d++)null!=this.shapes[d]&&this.setShapePropertyBs(d,"deleteModelAtoms",a,b)},"~A,JU.BS");c(c$,"deleteVdwDependentShapes",function(a){null==a&&(a=this.vwr.bsA());null!=this.shapes[24]&&this.shapes[24].setProperty("deleteVdw",null,a);null!=this.shapes[25]&&this.shapes[25].setProperty("deleteVdw",null,a)},"JU.BS");c(c$,"getAtomShapeValue",function(a,b,d){a=JV.JC.shapeTokenIndex(a);if(0>a||null==this.shapes[a])return 0;
d=this.shapes[a].getSize(d);if(0==d){if(0==(b.shapeVisibilityFlags&this.shapes[a].vf))return 0;d=this.shapes[a].getSizeG(b)}return d/2E3},"~N,JM.Group,~N");c(c$,"getObjectMap",function(a,b){if(null!=this.shapes)for(var d=Boolean.$valueOf(b),c=16;29>c;++c)this.getShapePropertyData(c,"getNames",[a,d])},"java.util.Map,~B");c(c$,"getProperty",function(a){return a.equals("getShapes")?this.shapes:null},"~O");c(c$,"getRenderableBitSet",function(){return this.bsRenderableAtoms});c(c$,"getShape",function(a){return null==
this.shapes?null:this.shapes[a]},"~N");c(c$,"mergeShapes",function(a){if(null!=a)if(null==this.shapes)this.shapes=a;else for(var b=0;b<a.length;++b)null!=a[b]&&(null==this.shapes[b]&&this.loadShape(b),this.shapes[b].merge(a[b]))},"~A");c(c$,"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(c$,"setAtomLabel",function(a,b){null!=this.shapes&&(this.loadShape(5),this.shapes[5].setProperty("label:"+a,Integer.$valueOf(b),null))},"~S,~N");c(c$,"setModelVisibility",function(){var a=this.shapes;if(!(null==a||null==a[0])){for(var b=this.vwr.getVisibleFramesBitSet(),d=8;32>d;d++)null!=a[d]&&a[d].setVisibilityFlags(b);for(var c=this.vwr.getBoolean(603979922),g=this.vwr.getDeletedAtoms(),f=this.ms.at,d=this.ms.ac;0<=--d;){var j=f[d];j.shapeVisibilityFlags&=-64;if(!(null!=g&&g.get(d)||
!c&&1==j.getElementNumber())){var h=j.getModelIndex();b.get(h)&&(h=1,this.ms.isAtomHidden(d)||(h|=8,0!=j.madAtom&&(h|=16),j.setShapeVisibility(h,!0)))}}for(d=0;36>d;++d)b=a[d],null!=b&&b.setModelClickability()}});c(c$,"finalizeAtoms",function(a,b){var d=this.vwr,c=d.tm,g=this.bsRenderableAtoms,f=this.gdata;if(null!=a){var j=this.ms.getAtomSetCenter(a),h=new JU.P3;c.transformPt3f(j,h);h.add(b);c.unTransformPoint(h,h);h.sub(j);d.setAtomCoordsRelative(h,a);b.set(0,0,0)}this.ms.getRenderable(g);for(var l=
this.ms.vibrations,m=null!=l&&c.vibrationOn,j=this.ms.at,r=g.nextSetBit(0);0<=r;r=g.nextSetBit(r+1)){var h=j[r],n=m&&h.hasVibration()?c.transformPtVib(h,l[r]):c.transformPt(h);h.sX=n.x;h.sY=n.y;h.sZ=n.z;var p=Math.abs(h.madAtom);p==JM.Atom.MAD_GLOBAL&&(p=z(2E3*d.getFloat(1141899265)));h.sD=Y(d.tm.scaleToScreen(n.z,p))}if(c.slabEnabled){r=d.getBoolean(603979940);c=d.getBoolean(603979939);l=f.getSlab();m=f.getDepth();if(r){n=this.ms.getMolecules();p=this.ms.getMoleculeCountInModel(-1);for(r=0;r<p;r++){var s=
n[r],t=0,h=s.firstAtomIndex;if(g.get(h)){for(;t<s.ac&&!f.isClippedZ(j[h].sZ-(j[h].sD>>1));t++,h++);if(t!=s.ac){h=s.firstAtomIndex;for(t=0;t<s.ac;t++)g.clear(h),j[h++].sZ=0}}}}for(r=g.nextSetBit(0);0<=r;r=this.bsRenderableAtoms.nextSetBit(r+1))if(h=j[r],f.isClippedZ(h.sZ-(c?j[r].sD>>1:0)))h.setClickable(0),n=q((c?-1:1)*h.sD/2),(h.sZ+n<l||h.sZ-n>m||!f.isInDisplayRange(h.sX,h.sY))&&g.clear(r)}if(0==this.ms.getAtomCount()||!d.getShowNavigationPoint())return null;d=2147483647;f=-2147483648;c=2147483647;
l=-2147483648;for(r=g.nextSetBit(0);0<=r;r=g.nextSetBit(r+1))h=j[r],h.sX<d&&(d=h.sX),h.sX>f&&(f=h.sX),h.sY<c&&(c=h.sY),h.sY>l&&(l=h.sY);this.navigationCrossHairMinMax[0]=d;this.navigationCrossHairMinMax[1]=f;this.navigationCrossHairMinMax[2]=c;this.navigationCrossHairMinMax[3]=l;return this.navigationCrossHairMinMax},"JU.BS,JU.P3");c(c$,"setModelSet",function(a){this.ms=this.vwr.ms=a},"JM.ModelSet");c(c$,"checkInheritedShapes",function(){null!=this.shapes[24]&&this.setShapePropertyBs(24,"remapInherited",
null,null)});c(c$,"restrictSelected",function(a,b){var d=this.vwr.getSelectedAtomsNoSubset();if(b){this.vwr.invertSelection();var c=this.vwr.getSelectionSubset();null!=c&&(d=this.vwr.getSelectedAtomsNoSubset(),d.and(c),this.vwr.select(d,!1,0,!0),JU.BSUtil.invertInPlace(d,this.vwr.getAtomCount()),d.and(c))}JU.BSUtil.andNot(d,this.vwr.getDeletedAtoms());c=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 g=this.vwr.bsA(),f=21;0<=--f;)6!=f&&null!=this.getShape(f)&&this.setShapeSizeBs(f,0,null,g);null!=this.getShape(21)&&this.setShapePropertyBs(21,"delete",g,null);this.setLabel(null,g);a||this.vwr.setBooleanProperty("bondModeOr",c);this.vwr.select(d,!1,0,!0)},"~B,~B");C(c$,"hoverable",[30,25,24,22,35]);c$.clickableMax=c$.prototype.clickableMax=JV.ShapeManager.hoverable.length-
1});n("JV");w(["java.util.Hashtable"],"JV.StateManager","java.util.Arrays JU.BS $.SB JM.Orientation JU.BSUtil JV.GlobalSettings".split(" "),function(){c$=t(function(){this.saved=this.vwr=null;this.lastCoordinates=this.lastShape=this.lastState=this.lastSelected=this.lastScene=this.lastConnections=this.lastContext=this.lastOrientation="";N("JV.StateManager.Scene")||JV.StateManager.$StateManager$Scene$();N("JV.StateManager.Connections")||JV.StateManager.$StateManager$Connections$();N("JV.StateManager.Connection")||
JV.StateManager.$StateManager$Connection$();s(this,arguments)},JV,"StateManager");K(c$,function(){this.saved=new java.util.Hashtable});c$.getVariableList=c(c$,"getVariableList",function(a,b,d,c){var g=new JU.SB,f=0,j=Array(a.size()),h;for(a=a.entrySet().iterator();a.hasNext()&&((h=a.next())||1);){var l=h.getKey(),m=h.getValue();if((d||!l.startsWith("site_"))&&(!c||"@"==l.charAt(0)))j[f++]=l+("@"==l.charAt(0)?" "+m.asString():" = "+JV.StateManager.varClip(l,m.escape(),b))}java.util.Arrays.sort(j,0,
f);for(b=0;b<f;b++)null!=j[b]&&g.append("  ").append(j[b]).append(";\n");0==f&&!c&&g.append("# --no global user variables defined--;\n");return g.toString()},"java.util.Map,~N,~B,~B");c$.getObjectIdFromName=c(c$,"getObjectIdFromName",function(a){if(null==a)return-1;a="background axis1      axis2      axis3      boundbox   unitcell   frank      ".indexOf(a.toLowerCase());return 0>a?a:q(a/11)},"~S");c$.getObjectNameFromId=c(c$,"getObjectNameFromId",function(a){return 0>a||8<=a?null:"background axis1      axis2      axis3      boundbox   unitcell   frank      ".substring(11*
a,11*a+11).trim()},"~N");u(c$,function(a){this.vwr=a},"JV.Viewer");c(c$,"getGlobalSettings",function(a,b){return new JV.GlobalSettings(this.vwr,a,b)},"JV.GlobalSettings,~B");c(c$,"clear",function(a){this.vwr.setShowAxes(!1);this.vwr.setShowBbcage(!1);this.vwr.setShowUnitCell(!1);a.clear()},"JV.GlobalSettings");c(c$,"setCrystallographicDefaults",function(){this.vwr.setAxesModeUnitCell(!0);this.vwr.setShowAxes(!0);this.vwr.setShowUnitCell(!0);this.vwr.setBooleanProperty("perspectiveDepth",!1)});c(c$,
"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(c$,"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(c$,"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(c$,"setPyMOLDefaults",function(){this.setCommonDefaults();
this.vwr.setStringProperty("measurementUnits","ANGSTROMS");this.vwr.setBooleanProperty("zoomHeight",!0)});c$.getNoCase=c(c$,"getNoCase",function(a,b){for(var d,c=a.entrySet().iterator();c.hasNext()&&((d=c.next())||1);)if(d.getKey().equalsIgnoreCase(b))return d.getValue();return null},"java.util.Map,~S");c(c$,"listSavedStates",function(){for(var a="",b,d=this.saved.keySet().iterator();d.hasNext()&&((b=d.next())||1);)a+="\n"+b;return a});c(c$,"deleteSavedType",function(a){for(var b=this.saved.keySet().iterator();b.hasNext();)b.next().startsWith(a)&&
b.remove()},"~S");c(c$,"deleteSaved",function(a){for(var b=this.saved.keySet().iterator();b.hasNext();){var d=b.next();(d.startsWith(a)||d.endsWith("_"+a)&&d.indexOf("_")==d.lastIndexOf("_"+a))&&b.remove()}},"~S");c(c$,"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(c$,"restoreSelection",function(a){a=JV.StateManager.getNoCase(this.saved,0<a.length?"Selected_"+a:this.lastSelected);
if(null==a)return this.vwr.select(new JU.BS,!1,0,!1),!1;this.vwr.select(a,!1,0,!1);return!0},"~S");c(c$,"saveState",function(a){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("State_"):(a=this.lastState="State_"+a,this.saved.put(a,this.vwr.getStateInfo()))},"~S");c(c$,"getSavedState",function(a){a=JV.StateManager.getNoCase(this.saved,0<a.length?"State_"+a:this.lastState);return null==a?"":a},"~S");c(c$,"saveStructure",function(a){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Shape_"):(a=this.lastShape=
"Shape_"+a,this.saved.put(a,this.vwr.getStructureState()))},"~S");c(c$,"getSavedStructure",function(a){a=JV.StateManager.getNoCase(this.saved,0<a.length?"Shape_"+a:this.lastShape);return null==a?"":a},"~S");c(c$,"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(c$,"getSavedCoordinates",function(a){a=JV.StateManager.getNoCase(this.saved,0<a.length?
"Coordinates_"+a:this.lastCoordinates);return null==a?"":a},"~S");c(c$,"getOrientation",function(){return new JM.Orientation(this.vwr,!1,null)});c(c$,"getSavedOrientationText",function(a){var b;if(null!=a)return b=this.getOrientationFor(a),null==b?"":b.getMoveToText(!0);a=new JU.SB;for(var d=this.saved.entrySet().iterator();d.hasNext()&&((b=d.next())||1);)b.getKey().startsWith("Orientation_")&&a.append(b.getValue().getMoveToText(!0));return a.toString()},"~S");c(c$,"saveScene",function(a,b){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("Scene_");
else{var d=M(JV.StateManager.Scene,this,null,b);d.saveName=this.lastScene="Scene_"+a;this.saved.put(d.saveName,d)}},"~S,java.util.Map");c(c$,"restoreScene",function(a,b){var d=JV.StateManager.getNoCase(this.saved,0<a.length?"Scene_"+a:this.lastScene);return null!=d&&d.restore(b)},"~S,~N");c(c$,"saveOrientation",function(a,b){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("Orientation_");else{var d=new JM.Orientation(this.vwr,a.equalsIgnoreCase("default"),b);d.saveName=this.lastOrientation="Orientation_"+
a;this.saved.put(d.saveName,d)}},"~S,~A");c(c$,"restoreOrientation",function(a,b,d){a=this.getOrientationFor(a);return null!=a&&a.restore(b,d)},"~S,~N,~B");c(c$,"getOrientationFor",function(a){return JV.StateManager.getNoCase(this.saved,0<a.length?"Orientation_"+a:this.lastOrientation)},"~S");c(c$,"saveContext",function(a,b){a.equalsIgnoreCase("DELETE")?this.deleteSavedType("Context_"):this.saved.put(this.lastContext="Context_"+a,b)},"~S,~O");c(c$,"getContext",function(a){return this.saved.get(0==
a.length?this.lastContext:"Context_"+a)},"~S");c(c$,"saveBonds",function(a){if(a.equalsIgnoreCase("DELETE"))this.deleteSavedType("Bonds_");else{var b=M(JV.StateManager.Connections,this,null);b.saveName=this.lastConnections="Bonds_"+a;this.saved.put(b.saveName,b)}},"~S");c(c$,"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");c$.varClip=c(c$,"varClip",function(a,b,d){0<
d&&b.length>d&&(b=b.substring(0,d)+" #...more ("+b.length+" bytes -- use SHOW "+a+" or MESSAGE @"+a+" to view)");return b},"~S,~S,~N");c$.$StateManager$Scene$=function(){G(self.c$);c$=t(function(){Q(this,arguments);this.scene=this.saveName=null;s(this,arguments)},JV.StateManager,"Scene");u(c$,function(a){this.scene=a},"java.util.Map");c(c$,"restore",function(a){var b=this.scene.get("generator");null!=b&&b.generateScene(this.scene);b=this.scene.get("pymolView");return null!=b&&this.b$["JV.StateManager"].vwr.tm.moveToPyMOL(this.b$["JV.StateManager"].vwr.eval,
a,b)},"~N");c$=F()};c$.$StateManager$Connections$=function(){G(self.c$);c$=t(function(){Q(this,arguments);this.saveName=null;this.bondCount=0;this.connections=null;s(this,arguments)},JV.StateManager,"Connections");u(c$,function(){var a=this.b$["JV.StateManager"].vwr.ms;if(null!=a){this.bondCount=a.bondCount;this.connections=Array(this.bondCount+1);for(var a=a.bo,b=this.bondCount;0<=--b;){var d=a[b];this.connections[b]=M(JV.StateManager.Connection,this,null,d.getAtomIndex1(),d.getAtomIndex2(),d.mad,
d.colix,d.order,d.getEnergy(),d.getShapeVisibilityFlags())}}});c(c$,"restore",function(){var a=this.b$["JV.StateManager"].vwr.ms;if(null==a)return!1;a.deleteAllBonds();for(var b=this.bondCount;0<=--b;){var d=this.connections[b],c=a.getAtomCount();d.atomIndex1>=c||d.atomIndex2>=c||(c=a.bondAtoms(a.at[d.atomIndex1],a.at[d.atomIndex2],d.order,d.mad,null,d.energy,!1,!0),c.setColix(d.colix),c.setShapeVisibilityFlags(d.shapeVisibilityFlags))}for(d=this.bondCount;0<=--d;)a.getBondAt(d).setIndex(d);this.b$["JV.StateManager"].vwr.setShapeProperty(1,
"reportAll",null);return!0});c$=F()};c$.$StateManager$Connection$=function(){G(self.c$);c$=t(function(){Q(this,arguments);this.shapeVisibilityFlags=this.energy=this.order=this.colix=this.mad=this.atomIndex2=this.atomIndex1=0;s(this,arguments)},JV.StateManager,"Connection");u(c$,function(a,b,d,c,g,f,j){this.atomIndex1=a;this.atomIndex2=b;this.mad=d;this.colix=c;this.order=g;this.energy=f;this.shapeVisibilityFlags=j},"~N,~N,~N,~N,~N,~N,~N");c$=F()};C(c$,"OBJ_BACKGROUND",0,"OBJ_AXIS1",1,"OBJ_AXIS2",
2,"OBJ_AXIS3",3,"OBJ_BOUNDBOX",4,"OBJ_UNITCELL",5,"OBJ_FRANK",6,"OBJ_MAX",8,"objectNameList","background axis1      axis2      axis3      boundbox   unitcell   frank      ")});n("JV");w(["java.util.Hashtable"],"JV.StatusManager","java.lang.Boolean $.Float javajs.awt.Dimension JU.Lst $.PT J.api.Interface J.c.CBK JU.Logger".split(" "),function(){c$=t(function(){this.cbl=this.jsl=this.vwr=null;this.statusList="";this.allowStatusReporting=!1;this.messageQueue=null;this.statusPtr=0;this.jmolScriptCallbacks=
null;this.minSyncRepeatMs=100;this.stereoSync=this.syncDisabled=this.isSynced=this.drivingSync=this.syncingMouse=this.syncingScripts=!1;this.qualityPNG=this.qualityJPG=-1;this.imageType=null;s(this,arguments)},JV,"StatusManager");K(c$,function(){this.messageQueue=new java.util.Hashtable;this.jmolScriptCallbacks=new java.util.Hashtable});u(c$,function(a){this.vwr=a},"JV.Viewer");c(c$,"setAllowStatusReporting",function(a){this.allowStatusReporting=a},"~B");c(c$,"getStatusList",function(){return this.statusList});
c(c$,"getMessageQueue",function(){return this.messageQueue});c(c$,"recordStatus",function(a){return this.allowStatusReporting&&0<this.statusList.length&&(this.statusList.equals("all")||0<=this.statusList.indexOf(a))},"~S");c(c$,"setStatusChanged",function(a,b,d,c){if(this.recordStatus(a)){var g=new JU.Lst;g.addLast(Integer.$valueOf(++this.statusPtr));g.addLast(a);g.addLast(Integer.$valueOf(b));g.addLast(d);b=c?null:this.messageQueue.get(a);null==b?this.messageQueue.put(a,b=new JU.Lst):b.size()==JV.StatusManager.MAXIMUM_QUEUE_LENGTH&&
b.remove(0);b.addLast(g)}},"~S,~N,~O,~B");c(c$,"getStatusChanged",function(a){var b=0<a.length&&"-"==a.charAt(0),d=0<a.length&&"+"==a.charAt(0),c=!1;b?this.statusList=JU.PT.rep(this.statusList,a.substring(1,a.length),""):(a=JU.PT.rep(a,"+",""),this.statusList.equals(a)||d&&0<=this.statusList.indexOf(a)?c=!0:(d||(this.statusList=""),this.statusList+=a,JU.Logger.debugging&&JU.Logger.debug("StatusManager messageQueue = "+this.statusList)));a=new JU.Lst;if(c)for(var g,c=this.messageQueue.entrySet().iterator();c.hasNext()&&
((g=c.next())||1);)a.addLast(g.getValue());this.messageQueue.clear();this.statusPtr=0;return a},"~S");c(c$,"setJmolStatusListener",function(a,b){this.jsl=a;this.cbl=null==b?a:b},"J.api.JmolStatusListener,J.api.JmolCallbackListener");c(c$,"setJmolCallbackListener",function(a){this.cbl=a},"J.api.JmolCallbackListener");c(c$,"jmolScriptCallback",function(a){a=this.jmolScriptCallbacks.get(a);null!=a&&this.vwr.evalStringQuietSync(a,!0,!1);return a},"J.c.CBK");c(c$,"setCallbackFunction",function(a,b){var d=
J.c.CBK.getCallback(a);if(null!=d){var c=null==b?0:7<b.length&&0==b.toLowerCase().indexOf("script:")?7:11<b.length&&0==b.toLowerCase().indexOf("jmolscript:")?11:0;0==c?this.jmolScriptCallbacks.remove(d):this.jmolScriptCallbacks.put(d,b.substring(c).trim())}null!=this.cbl&&this.cbl.setCallbackFunction(a,b)},"~S,~S");c(c$,"notifyEnabled",function(a){return null!=this.cbl&&this.cbl.notifyEnabled(a)},"J.c.CBK");c(c$,"setStatusAppletReady",function(a,b){var d=b?this.jmolScriptCallback(J.c.CBK.APPLETREADY):
null;this.notifyEnabled(J.c.CBK.APPLETREADY)&&this.cbl.notifyCallback(J.c.CBK.APPLETREADY,[d,a,Boolean.$valueOf(b),null])},"~S,~B");c(c$,"setStatusAtomMoved",function(a){var b=this.jmolScriptCallback(J.c.CBK.ATOMMOVED);this.setStatusChanged("atomMoved",-1,a,!1);this.notifyEnabled(J.c.CBK.ATOMMOVED)&&this.cbl.notifyCallback(J.c.CBK.ATOMMOVED,[b,a])},"JU.BS");c(c$,"setStatusAtomPicked",function(a,b,d){var c=this.jmolScriptCallback(J.c.CBK.PICK);JU.Logger.info("setStatusAtomPicked("+a+","+b+")");this.setStatusChanged("atomPicked",
a,b,!1);this.notifyEnabled(J.c.CBK.PICK)&&this.cbl.notifyCallback(J.c.CBK.PICK,[c,b,Integer.$valueOf(a),d])},"~N,~S,java.util.Map");c(c$,"setStatusClicked",function(a,b,d,c,g){var f=this.jmolScriptCallback(J.c.CBK.CLICK);if(!this.notifyEnabled(J.c.CBK.CLICK))return d;g=[d,g];this.cbl.notifyCallback(J.c.CBK.CLICK,[f,Integer.$valueOf(a),Integer.$valueOf(b),Integer.$valueOf(d),Integer.$valueOf(c),g]);return g[0]},"~N,~N,~N,~N,~N");c(c$,"setStatusResized",function(a,b){var d=this.jmolScriptCallback(J.c.CBK.RESIZE);
this.notifyEnabled(J.c.CBK.RESIZE)&&this.cbl.notifyCallback(J.c.CBK.RESIZE,[d,Integer.$valueOf(a),Integer.$valueOf(b)])},"~N,~N");c(c$,"setStatusAtomHovered",function(a,b){var d=this.jmolScriptCallback(J.c.CBK.HOVER);this.notifyEnabled(J.c.CBK.HOVER)&&this.cbl.notifyCallback(J.c.CBK.HOVER,[d,b,Integer.$valueOf(a)])},"~N,~S");c(c$,"setStatusObjectHovered",function(a,b,d){var c=this.jmolScriptCallback(J.c.CBK.HOVER);this.notifyEnabled(J.c.CBK.HOVER)&&this.cbl.notifyCallback(J.c.CBK.HOVER,[c,b,Integer.$valueOf(-1),
a,Float.$valueOf(d.x),Float.$valueOf(d.y),Float.$valueOf(d.z)])},"~S,~S,JU.T3");c(c$,"setFileLoadStatus",function(a,b,d,c,g,f,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",g,a,!1);null!=c&&this.setStatusChanged("fileLoadError",g,c,!1);var h=this.jmolScriptCallback(J.c.CBK.LOADSTRUCT);f&&this.notifyEnabled(J.c.CBK.LOADSTRUCT)&&(f=this.vwr.getP("_smilesString"),0!=f.length&&(b=
f),this.cbl.notifyCallback(J.c.CBK.LOADSTRUCT,[h,a,b,d,c,Integer.$valueOf(g),this.vwr.getP("_modelNumber"),this.vwr.getModelNumberDotted(this.vwr.getModelCount()-1),j]))},"~S,~S,~S,~S,~N,~B,Boolean");c(c$,"setStatusFrameChanged",function(a,b,d,c,g,f,j){if(null!=this.vwr.ms){var h=this.vwr.am.animationOn,l=h?-2-g:g;this.setStatusChanged("frameChanged",l,0<=g?this.vwr.getModelNumberDotted(g):"",!1);var m=this.jmolScriptCallback(J.c.CBK.ANIMFRAME);this.notifyEnabled(J.c.CBK.ANIMFRAME)&&this.cbl.notifyCallback(J.c.CBK.ANIMFRAME,
[m,[l,a,b,d,c,g],j,Float.$valueOf(f)]);null!=this.vwr.jmolpopup&&!h&&this.vwr.jmolpopup.jpiUpdateComputedMenus()}},"~N,~N,~N,~N,~N,~N,~S");c(c$,"setStatusDragDropped",function(a,b,d,c){this.setStatusChanged("dragDrop",0,"",!1);var g=this.jmolScriptCallback(J.c.CBK.DRAGDROP);if(!this.notifyEnabled(J.c.CBK.DRAGDROP))return!1;this.cbl.notifyCallback(J.c.CBK.DRAGDROP,[g,Integer.$valueOf(a),Integer.$valueOf(b),Integer.$valueOf(d),c]);return!0},"~N,~N,~N,~S");c(c$,"setScriptEcho",function(a,b){if(null!=
a){this.setStatusChanged("scriptEcho",0,a,!1);var d=this.jmolScriptCallback(J.c.CBK.ECHO);this.notifyEnabled(J.c.CBK.ECHO)&&this.cbl.notifyCallback(J.c.CBK.ECHO,[d,a,Integer.$valueOf(b?1:0)])}},"~S,~B");c(c$,"setStatusMeasuring",function(a,b,d,c){this.setStatusChanged(a,b,d,!1);var g=null;a.equals("measureCompleted")?(JU.Logger.info("measurement["+b+"] = "+d),g=this.jmolScriptCallback(J.c.CBK.MEASURE)):a.equals("measurePicked")&&(this.setStatusChanged("measurePicked",b,d,!1),JU.Logger.info("measurePicked "+
b+" "+d));this.notifyEnabled(J.c.CBK.MEASURE)&&this.cbl.notifyCallback(J.c.CBK.MEASURE,[g,d,Integer.$valueOf(b),a,Float.$valueOf(c)])},"~S,~N,~S,~N");c(c$,"notifyError",function(a,b,d){var c=this.jmolScriptCallback(J.c.CBK.ERROR);this.notifyEnabled(J.c.CBK.ERROR)&&this.cbl.notifyCallback(J.c.CBK.ERROR,[c,a,b,this.vwr.getShapeErrorState(),d])},"~S,~S,~S");c(c$,"notifyMinimizationStatus",function(a,b,d,c,g){var f=this.jmolScriptCallback(J.c.CBK.MINIMIZATION);this.notifyEnabled(J.c.CBK.MINIMIZATION)&&
this.cbl.notifyCallback(J.c.CBK.MINIMIZATION,[f,a,b,d,c,g])},"~S,Integer,Float,Float,~S");c(c$,"setScriptStatus",function(a,b,d,c){if(-1>d){var g=-2-d;this.setStatusChanged("scriptStarted",g,b,!1);a="script "+g+" started"}else if(null==a)return;var g=0==d?this.jmolScriptCallback(J.c.CBK.SCRIPT):null,f="Script completed"===a;if(this.recordStatus("script")){var j=null!=c;this.setStatusChanged(j?"scriptError":"scriptStatus",0,a,!1);if(j||f)this.setStatusChanged("scriptTerminated",1,"Jmol script terminated"+
(j?" unsuccessfully: "+a:" successfully"),!1)}f&&(this.vwr.getBoolean(603979880)&&this.vwr.getBoolean(603979825))&&(a=[null,"script <exiting>",b,Integer.$valueOf(-1),c],this.notifyEnabled(J.c.CBK.SCRIPT)&&this.cbl.notifyCallback(J.c.CBK.SCRIPT,a),this.processScript(a),a="Jmol script completed.");a=[g,a,b,Integer.$valueOf(f?-1:d),c];this.notifyEnabled(J.c.CBK.SCRIPT)&&this.cbl.notifyCallback(J.c.CBK.SCRIPT,a);this.processScript(a)},"~S,~S,~N,~S");c(c$,"processScript",function(a){var b=a[3].intValue();
null!=this.vwr.scriptEditor&&(0<b?this.vwr.scriptEditor.notifyScriptTermination():0>b?-2==b&&this.vwr.scriptEditor.notifyScriptStart():this.vwr.scriptEditor.isVisible()&&0<a[2].length&&this.vwr.scriptEditor.notifyContext(this.vwr.getScriptContext("SE notify"),a));null!=this.vwr.appConsole&&0==b&&this.vwr.appConsole.sendConsoleMessage(null==a[1]?null:a[1].toString())},"~A");c(c$,"doSync",function(){return this.isSynced&&this.drivingSync&&!this.syncDisabled});c(c$,"setSync",function(a){this.syncingMouse?
null!=a&&this.syncSend(a,"*",0):this.syncingScripts||this.syncSend("!"+this.vwr.tm.getMoveToText(this.minSyncRepeatMs/1E3,!1),"*",0)},"~S");c(c$,"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(c$,"syncSend",function(a,b,d){(0!=d||this.notifyEnabled(J.c.CBK.SYNC))&&this.cbl.notifyCallback(J.c.CBK.SYNC,[null,a,b,Integer.$valueOf(d)])},"~S,~S,~N");c(c$,"modifySend",function(a,b,d,c){this.notifyEnabled(J.c.CBK.STRUCTUREMODIFIED)&&this.cbl.notifyCallback(J.c.CBK.STRUCTUREMODIFIED,
[null,Integer.$valueOf(d),Integer.$valueOf(a),Integer.$valueOf(b),c])},"~N,~N,~N,~S");c(c$,"getSyncMode",function(){return!this.isSynced?0:this.drivingSync?1:2});c(c$,"showUrl",function(a){null!=this.jsl&&this.jsl.showUrl(a)},"~S");c(c$,"clearConsole",function(){null!=this.vwr.appConsole&&this.vwr.appConsole.sendConsoleMessage(null);null!=this.jsl&&this.cbl.notifyCallback(J.c.CBK.MESSAGE,null)});c(c$,"functionXY",function(a,b,d){return null==this.jsl?L(Math.abs(b),Math.abs(d),0):this.jsl.functionXY(a,
b,d)},"~S,~N,~N");c(c$,"functionXYZ",function(a,b,d,c){return null==this.jsl?L(Math.abs(b),Math.abs(d),Math.abs(d),0):this.jsl.functionXYZ(a,b,d,c)},"~S,~N,~N,~N");c(c$,"jsEval",function(a){return null==this.jsl?"":this.jsl.eval(a)},"~S");c(c$,"createImage",function(a,b,d,c,g){return null==this.jsl?null:this.jsl.createImage(a,b,null==d?c:d,g)},"~S,~S,~S,~A,~N");c(c$,"getRegistryInfo",function(){return null==this.jsl?null:this.jsl.getRegistryInfo()});c(c$,"dialogAsk",function(a,b){var d=a.equals("Save Image"),
c=J.api.Interface.getOption("dialog.Dialog");if(null==c)return null;c.setupUI(!1);d&&c.setImageInfo(this.qualityJPG,this.qualityPNG,this.imageType);var g=c.getFileNameFromDialog(this.vwr,a,b);d&&null!=g&&(this.qualityJPG=c.getQuality("JPG"),this.qualityPNG=c.getQuality("PNG"),d=c.getType(),null!=d&&(this.imageType=d));return g},"~S,~S");c(c$,"getJspecViewProperties",function(a){return null==this.jsl?null:this.jsl.getJSpecViewProperty(null==a||0==a.length?"":":"+a)},"~S");c(c$,"resizeInnerPanel",function(a,
b){return null==this.jsl?new javajs.awt.Dimension(a,b):this.jsl.resizeInnerPanel("preferredWidthHeight "+a+" "+b+";")},"~N,~N");C(c$,"MAXIMUM_QUEUE_LENGTH",16,"SYNC_OFF",0,"SYNC_DRIVER",1,"SYNC_SLAVE",2,"SYNC_DISABLE",3,"SYNC_ENABLE",4,"SYNC_STEREO",5)});n("JV");w("JU.A4 $.M3 $.M4 $.P3 $.P3i $.V3 J.c.STER JU.Point3fi".split(" "),"JV.TransformManager","java.lang.Boolean $.Float java.util.Hashtable JU.P4 $.Quat $.SB J.api.Interface JU.Escape $.Logger".split(" "),function(){c$=t(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.navigationDepth=0;this.vectorTemp=this.matrixTemp=null;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.zShadeEnabled=this.internalSlab=this.slabEnabled=!1;this.depthPercentSetting=this.slabPercentSetting=0;this.zSlabPercentSetting=50;this.zDepthPercentSetting=0;this.zSlabPoint=null;this.slabRange=this.zDepthValue=this.zSlabValue=this.depthValue=
this.slabValue=0;this.depthPlane=this.slabPlane=null;this.perspectiveDepth=!0;this.scale3D=!1;this.cameraDepthSetting=this.cameraDepth=3;this.visualRange=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.ptVibTemp=this.point3iScreenTemp=this.point3fScreenTemp=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.spinOn=!1;this.vibrationScale=this.vibrationPeriodMs=this.vibrationPeriod=0;this.stereoColors=this.stereoMode=this.vibrationT=null;this.stereoDegrees=NaN;this.stereoRadians=0;this.stereoFrame=!1;this.matrixStereo=null;this.windowCentered=!1;this.ptOffset=this.bsSelectedAtoms=this.frameOffset=this.frameOffsets=
null;this.navMode=1;this.zoomFactor=3.4028235E38;this.navigationSlabOffset=0;this.nav=null;s(this,arguments)},JV,"TransformManager");K(c$,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.point3fScreenTemp=new JU.P3;this.point3iScreenTemp=new JU.P3i;
this.ptVibTemp=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(c$,function(){});c$.getTransformManager=c(c$,"getTransformManager",function(a,b,d,c){c=c?J.api.Interface.getInterface("JV.TransformManager4D"):new JV.TransformManager;c.vwr=a;c.setScreenParameters(b,
d,!0,!1,!0,!0);return c},"JV.Viewer,~N,~N,~B");c(c$,"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(c$,"setRotation",function(a){a.isRotation()?this.matrixRotate.setM3(a):this.resetRotation()},"JU.M3");c(c$,"resetRotation",
function(){this.matrixRotate.setScale(1)});c(c$,"clearThreads",function(){this.clearVibration();this.clearSpin();this.setNavOn(!1);this.stopMotion()});c(c$,"clear",function(){this.fixedRotationCenter.set(0,0,0);this.navigating=!1;this.zSlabPoint=this.depthPlane=this.slabPlane=null;this.resetNavigationPoint(!0)});c(c$,"setFixedRotationCenter",function(a){null!=a&&this.fixedRotationCenter.setT(a)},"JU.P3");c(c$,"setRotationPointXY",function(a){a=this.transformPt(a);this.fixedTranslation.set(a.x,a.y,
0)},"JU.P3");c(c$,"spinXYBy",function(a,b,d){if(0==a&&0==b)null!=this.spinThread&&this.spinIsGesture&&this.clearSpin();else{this.clearSpin();var c=JU.P3.newP(this.fixedRotationCenter),g=new JU.P3;this.transformPt3f(c,g);a=JU.P3.new3(-b,a,0);a.add(g);this.unTransformPoint(a,a);this.vwr.setInMotion(!1);this.rotateAboutPointsInternal(null,a,c,10*d,NaN,!1,!0,null,!0,null,null,null)}},"~N,~N,~N");c(c$,"rotateXYBy",function(a,b,d){this.rotate3DBall(a,b,d)},"~N,~N,JU.BS");c(c$,"rotateZBy",function(a,b,d){2147483647!=
b&&2147483647!=d&&this.resetXYCenter(b,d);this.rotateZRadians(a/57.29577951308232)},"~N,~N,~N");c(c$,"applyRotation",function(a,b,d,c,g){null==d?this.matrixRotate.mul2(a,this.matrixRotate):(this.vwr.moveAtoms(a,this.matrixRotate,c,this.internalRotationCenter,b,d,g),null!=c&&this.internalRotationCenter.add(c))},"JU.M3,~B,JU.BS,JU.V3,~B");c(c$,"rotate3DBall",function(a,b,d){this.matrixTemp3.setAsBallRotation(0.017453292,-b,-a)&&this.applyRotation(this.matrixTemp3,!1,d,null,!1)},"~N,~N,JU.BS");c(c$,
"rotateXRadians",function(a,b){this.applyRotation(this.matrixTemp3.setAsXRotation(a),!1,b,null,!1)},"~N,JU.BS");c(c$,"rotateYRadians",function(a,b){this.applyRotation(this.matrixTemp3.setAsYRotation(a),!1,b,null,!1)},"~N,JU.BS");c(c$,"rotateZRadians",function(a){this.applyRotation(this.matrixTemp3.setAsZRotation(a),!1,null,null,!1)},"~N");c(c$,"rotateAxisAngle",function(a,b){this.axisangleT.setVA(a,b);this.rotateAxisAngle2(this.axisangleT,null)},"JU.V3,~N");c(c$,"rotateAxisAngle2",function(a,b){this.applyRotation(this.matrixTemp3.setAA(a),
!1,b,null,!1)},"JU.A4,JU.BS");c(c$,"rotateAxisAngleAtCenter",function(a,b,d,c,g,f,j){null!=b&&this.moveRotationCenter(b,!0);this.setSpinOff();this.setNavOn(!1);if(this.vwr.isHeadless()){if(f&&3.4028235E38==g)return!1;f=!1}if(Float.isNaN(c)||0==c||0==g)return!1;null!=b&&this.setRotationPointXY(b);this.setFixedRotationCenter(b);this.rotationAxis.setT(d);this.rotationRate=c;if(f)return this.fixedRotationAxis.setVA(d,0.017453292*c),this.isSpinInternal=!1,this.isSpinFixed=!0,this.isSpinSelected=null!=
j,this.setSpin(a,!0,g,null,null,j,!1),!1;a=0.017453292*g;this.fixedRotationAxis.setVA(d,g);this.rotateAxisAngleRadiansFixed(a,j);return!0},"J.api.JmolScriptEvaluator,JU.P3,JU.V3,~N,~N,~B,JU.BS");c(c$,"rotateAxisAngleRadiansFixed",function(a,b){this.axisangleT.setAA(this.fixedRotationAxis);this.axisangleT.angle=a;this.rotateAxisAngle2(this.axisangleT,b)},"~N,JU.BS");c(c$,"rotateAboutPointsInternal",function(a,b,d,c,g,f,j,h,l,m,r,n){this.setSpinOff();this.setNavOn(!1);if(null==n&&(null==m||0.001>m.length())&&
(!j||0==g||Float.isNaN(c)||0==c)&&(j||0==g))return!1;var p=null;null==n&&(p=JU.V3.newVsub(d,b),f&&p.scale(-1),this.internalRotationCenter.setT(b),this.rotationAxis.setT(p),this.internalTranslation=null==m?null:JU.V3.newV(m));b=null!=h;if(j)return null==n?(j=q(Math.abs(g)/Math.abs(c)*this.spinFps+0.5),Float.isNaN(g)?this.rotationRate=c:(this.rotationRate=g/j*this.spinFps,null!=m&&this.internalTranslation.scale(1/j)),this.internalRotationAxis.setVA(p,0.017453292*(Float.isNaN(this.rotationRate)?0:this.rotationRate)),
this.isSpinInternal=!0,this.isSpinFixed=!1,this.isSpinSelected=b):g=c,this.setSpin(a,!0,g,r,n,h,l),null!=n||null!=h;a=0.017453292*g;this.internalRotationAxis.setVA(p,a);this.rotateAxisAngleRadiansInternal(a,h);return!1},"J.api.JmolScriptEvaluator,JU.T3,JU.T3,~N,~N,~B,~B,JU.BS,~B,JU.V3,JU.Lst,~A");c(c$,"rotateAxisAngleRadiansInternal",function(a,b){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);null==b&&this.getNewFixedRotationCenter()},"~N,JU.BS");c(c$,"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=new JU.P3;
this.matrixTemp4.rotTrans2(this.pointT2,a);a.add(this.vectorT);this.setRotationCenterAndRadiusXYZ(a,!1)});c(c$,"setTranslationFractions",function(){this.xTranslationFraction=this.fixedTranslation.x/this.width;this.yTranslationFraction=this.fixedTranslation.y/this.height});c(c$,"centerAt",function(a,b,d){null==d?this.translateXYBy(a,b):(this.windowCentered&&this.vwr.setBooleanProperty("windowCentered",!1),this.fixedTranslation.x=a,this.fixedTranslation.y=b,this.setFixedRotationCenter(d))},"~N,~N,JU.P3");
c(c$,"percentToPixels",function(a,b){switch(a){case "x":return q(Math.floor(b/100*this.width));case "y":return q(Math.floor(b/100*this.height));case "z":return q(Math.floor(b/100*this.screenPixelCount))}return 0},"~S,~N");c(c$,"angstromsToPixels",function(a){return q(Math.floor(this.scalePixelsPerAngstrom*a))},"~N");c(c$,"translateXYBy",function(a,b){this.fixedTranslation.x+=a;this.fixedTranslation.y+=b;this.setTranslationFractions()},"~N,~N");c(c$,"setCamera",function(a,b){this.cameraSetting.set(a,
b,0==a&&0==b?0:1)},"~N,~N");c(c$,"translateToPercent",function(a,b){switch(a){case "x":this.xTranslationFraction=0.5+b/100;this.fixedTranslation.x=this.width*this.xTranslationFraction;break;case "y":this.yTranslationFraction=0.5+b/100;this.fixedTranslation.y=this.height*this.yTranslationFraction;break;case "z":1==this.mode&&this.setNavigationDepthPercent(b)}},"~S,~N");c(c$,"getTranslationXPercent",function(){return 0==this.width?0:100*(this.fixedTranslation.x-this.width/2)/this.width});c(c$,"getTranslationYPercent",
function(){return 0==this.height?0:100*(this.fixedTranslation.y-this.height/2)/this.height});c(c$,"getTranslationZPercent",function(){return 0});c(c$,"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(c$,"getOrientationText",function(a){switch(a){case 4130:return this.getMoveToText(1,!1);case 1073742132:return this.getRotationQuaternion().toString();case 1073742178:return a=
new JU.SB,JV.TransformManager.truncate2(a,this.getTranslationXPercent()),JV.TransformManager.truncate2(a,this.getTranslationYPercent()),a.toString();default:return this.getMoveToText(1,!0)+"\n#OR\n"+this.getRotateZyzText(!0)}},"~N");c(c$,"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;this.getAxisAngle(b);a.put("axisAngle",b);a.put("quaternion",
JU.Quat.newAA(b).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.getNavigationDepthPercent())));return a});c(c$,"getAxisAngle",function(a){a.setM(this.matrixRotate)},"JU.A4");c(c$,"getTransformText",function(){return this.matrixRotate.toString()});c(c$,"getMatrixRotate",function(){return JU.M3.newM3(this.matrixRotate)});c(c$,"getRotation",function(a){a.setM3(this.matrixRotate)},
"JU.M3");c(c$,"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(c$,"getZoomPercentFloat",function(){return this.zmPct});c(c$,"zoomToPercent",function(a){this.zmPctSet=a;this.zoomRatio=0},"~N");c(c$,"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(c$,"resetXYCenter",function(a,b){if(!(2147483647==a||2147483647==b)){this.windowCentered&&this.vwr.setBooleanProperty("windowCentered",!1);var d=new JU.P3;this.transformPt3f(this.fixedRotationCenter,d);d.set(a,b,d.z);this.unTransformPoint(d,d);this.fixedTranslation.set(a,b,0);this.setFixedRotationCenter(d)}},"~N,~N");c(c$,"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(c$,"setScaleAngstromsPerInch",function(a){if(this.scale3D=0<a)this.scale3DAngstromsPerInch=a;this.perspectiveDepth=!this.scale3D},"~N");c(c$,"setZslabPoint",function(a){this.zSlabPoint=null==a?null:JU.P3.newP(a)},"JU.P3");c(c$,"getZShadeStart",function(){return this.zShadeEnabled?this.zDepthValue:0});c(c$,"setSlabRange",function(a){this.slabRange=a},"~N");c(c$,"setSlabEnabled",function(a){this.slabEnabled=a;this.vwr.g.setB("slabEnabled",a)},"~B");c(c$,"setZShadeEnabled",
function(a){this.zShadeEnabled=a;this.vwr.g.setB("zShade",a)},"~B");c(c$,"setZoomEnabled",function(a){this.zoomEnabled=a;this.vwr.g.setB("zoomEnabled",a)},"~B");c(c$,"slabReset",function(){this.slabToPercent(100);this.depthToPercent(0);this.slabPlane=this.depthPlane=null;this.setSlabEnabled(!1);this.setZShadeEnabled(!1)});c(c$,"getSlabPercentSetting",function(){return this.slabPercentSetting});c(c$,"slabByPercentagePoints",function(a){this.slabPlane=null;this.slabPercentSetting+=a;this.slabDepthChanged();
this.depthPercentSetting>=this.slabPercentSetting&&(this.depthPercentSetting=this.slabPercentSetting-1)},"~N");c(c$,"slabDepthChanged",function(){this.vwr.g.setI("slab",this.slabPercentSetting);this.vwr.g.setI("depth",this.depthPercentSetting)});c(c$,"depthByPercentagePoints",function(a){this.depthPlane=null;this.depthPercentSetting+=a;this.slabPercentSetting<=this.depthPercentSetting&&(this.slabPercentSetting=this.depthPercentSetting+1);this.slabDepthChanged()},"~N");c(c$,"slabDepthByPercentagePoints",
function(a){this.depthPlane=this.slabPlane=null;this.slabPercentSetting+=a;this.depthPercentSetting+=a;this.slabDepthChanged()},"~N");c(c$,"slabToPercent",function(a){this.vwr.setFloatProperty("slabRange",0);this.slabPercentSetting=a;this.slabPlane=null;this.depthPercentSetting>=this.slabPercentSetting&&(this.depthPercentSetting=this.slabPercentSetting-1);this.slabDepthChanged()},"~N");c(c$,"depthToPercent",function(a){this.vwr.g.setI("depth",a);this.depthPercentSetting=a;this.slabPercentSetting<=
this.depthPercentSetting&&(this.slabPercentSetting=this.depthPercentSetting+1);this.slabDepthChanged()},"~N");c(c$,"zSlabToPercent",function(a){this.zSlabPercentSetting=a;this.zDepthPercentSetting>this.zSlabPercentSetting&&(this.zDepthPercentSetting=a)},"~N");c(c$,"zDepthToPercent",function(a){this.zDepthPercentSetting=a;this.zDepthPercentSetting>this.zSlabPercentSetting&&(this.zSlabPercentSetting=a)},"~N");c(c$,"slabInternal",function(a,b){b?(this.depthPlane=a,this.depthPercentSetting=0):(this.slabPlane=
a,this.slabPercentSetting=100)},"JU.P4,~B");c(c$,"setSlabDepthInternal",function(a){this.finalizeTransformParameters();a?this.depthPlane=null:this.slabPlane=null;this.slabInternal(this.getSlabDepthPlane(a),a)},"~B");c(c$,"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(c$,"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(q(this.screenWidth/2),q(this.screenHeight/2),this.referencePlaneOffset);this.unTransformPoint(a,a);var b=JU.P3.new3(q(this.screenWidth/2),q(this.screenHeight/2),0);this.vwr.tm.unTransformPoint(b,b);b.sub(this.fixedRotationCenter);var d=JU.P3.new3(q(this.screenWidth/2),q(this.screenHeight/2),this.cameraDistanceFromCenter*
this.scalePixelsPerAngstrom);this.vwr.tm.unTransformPoint(d,d);d.sub(this.fixedRotationCenter);b.add(d);System.out.println("TM no "+this.navigationOffset+" rpo "+this.referencePlaneOffset+" aa "+this.aperatureAngle+" sppa "+this.scalePixelsPerAngstrom+" vr "+this.visualRange+" sw/vr "+this.screenWidth/this.visualRange+" "+a+" "+this.fixedRotationCenter);return[a,b,this.fixedRotationCenter,JU.P3.new3(this.cameraDistanceFromCenter,this.aperatureAngle,this.scalePixelsPerAngstrom)]});c(c$,"setPerspectiveDepth",
function(a){this.perspectiveDepth!=a&&(this.perspectiveDepth=a,this.vwr.g.setB("perspectiveDepth",a),this.resetFitToScreen(!1))},"~B");c(c$,"getPerspectiveDepth",function(){return this.perspectiveDepth});c(c$,"setCameraDepthPercent",function(a,b){this.resetNavigationPoint(b);var d=0>a?-a/100:a;0!=d&&(this.cameraDepthSetting=d,this.vwr.g.setF("cameraDepth",this.cameraDepthSetting),this.cameraDepth=NaN)},"~N,~B");c(c$,"getCameraDepth",function(){return this.cameraDepthSetting});c(c$,"setVisualRange",
function(a){this.visualRange=a},"~N");c(c$,"setScreenParameters0",function(a,b,d,c,g,f){2147483647!=a&&(this.screenWidth=a,this.screenHeight=b,this.useZoomLarge=d,this.width=(this.antialias=c)?2*a:a,this.height=c?2*b:b,this.scaleFitToScreen(!1,d,g,f))},"~N,~N,~B,~B,~B,~B");c(c$,"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(c$,"defaultScaleToScreen",function(a){return this.screenPixelCount/2/a},"~N");c(c$,"resetFitToScreen",function(a){this.scaleFitToScreen(a,this.vwr.g.zoomLarge,!0,!0)},"~B");c(c$,"scaleFitToScreen",function(a,b,d,c){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),c&&this.resetNavigationPoint(d),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(c$,"scaleToScreen",function(a,b){if(0==b||2>a)return 0;var d=this.scaleToPerspective(a,b*this.scalePixelsPerAngstrom/1E3);return 0<d?d:1},"~N,~N");c(c$,"unscaleToScreen",function(a,b){var d=b/this.scalePixelsPerAngstrom;return this.perspectiveDepth?d/this.getPerspectiveFactor(a):
d},"~N,~N");c(c$,"scaleToPerspective",function(a,b){return this.perspectiveDepth?b*this.getPerspectiveFactor(a):b},"~N,~N");c(c$,"getMatrixtransform",function(){return this.matrixTransform});c(c$,"setNavigationMode",function(a){this.mode=a&&this.canNavigate()?1:this.defaultMode;this.resetNavigationPoint(!0)},"~B");c(c$,"isNavigating",function(){return this.navigating||this.navOn});c(c$,"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(c$,"getZoomSetting",function(){5>this.zmPctSet&&(this.zmPctSet=5);2E5<this.zmPctSet&&(this.zmPctSet=2E5);return this.zoomEnabled||1==this.mode?
this.zmPctSet:100});c(c$,"calcSlabAndDepthValues",function(){this.slabValue=1>this.slabRange?this.zValueFromPercent(this.slabPercentSetting):q(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.transformPt3f(this.zSlabPoint,this.pointT2),this.zSlabValue=z(this.pointT2.z)}catch(a){if(!y(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(c$,"zValueFromPercent",function(a){return q(Math.floor((1-a/50)*this.modelRadiusPixels+this.modelCenterOffset))},
"~N");c(c$,"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.invertM(this.matrixTransform)}catch(a){if(y(a,Exception))System.out.println("ERROR INVERTING matrixTransform!");else throw a;}});c(c$,"rotatePoint",function(a,b){this.matrixRotate.rotate2(a,b);b.y=-b.y},"JU.T3,JU.T3");c(c$,"getScreenTemp",function(a){this.matrixTransform.rotTrans2(a,this.point3fScreenTemp)},"JU.T3");c(c$,"transformPoints",function(a,b,d){for(;0<=
--a;)d[a].setT(this.transformPt(b[a]))},"~N,~A,~A");c(c$,"transformPtScr",function(a,b){b.setT(this.transformPt(a))},"JU.T3,JU.P3i");c(c$,"transformPtNoClip",function(a,b){this.applyPerspective(a,null);b.setT(this.point3fScreenTemp)},"JU.P3,JU.P3");c(c$,"transformPt",function(a){return this.applyPerspective(a,this.internalSlab?a:null)},"JU.T3");c(c$,"transformPtVib",function(a,b){this.ptVibTemp.setT(a);return this.applyPerspective(this.getVibrationPoint(b,this.ptVibTemp,NaN),a)},"JU.P3,JU.Vibration");
c(c$,"getVibrationPoint",function(a,b,d){a.setTempPoint(b,this.vibrationT,Float.isNaN(d)?this.vibrationScale:d,this.vwr.g.modulationScale);return b},"JU.Vibration,JU.T3,~N");c(c$,"transformPt3f",function(a,b){this.applyPerspective(a,a);b.setT(this.point3fScreenTemp)},"JU.T3,JU.P3");c(c$,"transformPt2D",function(a){-3.4028235E38==a.z?(this.point3iScreenTemp.x=q(Math.floor(a.x/100*this.screenWidth)),this.point3iScreenTemp.y=q(Math.floor((1-a.y/100)*this.screenHeight))):(this.point3iScreenTemp.x=z(a.x),
this.point3iScreenTemp.y=this.screenHeight-z(a.y));this.antialias&&(this.point3iScreenTemp.x<<=1,this.point3iScreenTemp.y<<=1);this.matrixTransform.rotTrans2(this.fixedRotationCenter,this.point3fScreenTemp);this.point3iScreenTemp.z=z(this.point3fScreenTemp.z);return this.point3iScreenTemp},"JU.T3");c(c$,"applyPerspective",function(a,b){this.getScreenTemp(a);var d=this.point3fScreenTemp.z;Float.isNaN(d)?(!this.haveNotifiedNaN&&JU.Logger.debugging&&JU.Logger.debug("NaN seen in TransformPoint"),this.haveNotifiedNaN=
!0,d=this.point3fScreenTemp.z=1):0>=d&&(d=this.point3fScreenTemp.z=1);switch(this.mode){case 1:this.point3fScreenTemp.x-=this.navigationShiftXY.x;this.point3fScreenTemp.y-=this.navigationShiftXY.y;break;case 2:this.point3fScreenTemp.x+=this.perspectiveShiftXY.x,this.point3fScreenTemp.y+=this.perspectiveShiftXY.y}this.perspectiveDepth&&(d=this.getPerspectiveFactor(d),this.point3fScreenTemp.x*=d,this.point3fScreenTemp.y*=d);switch(this.mode){case 1:this.point3fScreenTemp.x+=this.navigationOffset.x;
this.point3fScreenTemp.y+=this.navigationOffset.y;break;case 2:this.point3fScreenTemp.x-=this.perspectiveShiftXY.x,this.point3fScreenTemp.y-=this.perspectiveShiftXY.y;case 0:this.point3fScreenTemp.x+=this.fixedRotationOffset.x,this.point3fScreenTemp.y+=this.fixedRotationOffset.y}Float.isNaN(this.point3fScreenTemp.x)&&!this.haveNotifiedNaN&&(JU.Logger.debugging&&JU.Logger.debug("NaN found in transformPoint "),this.haveNotifiedNaN=!0);this.point3iScreenTemp.set(z(this.point3fScreenTemp.x),z(this.point3fScreenTemp.y),
z(this.point3fScreenTemp.z));if(null!=b&&(null!=this.slabPlane&&0<b.x*this.slabPlane.x+b.y*this.slabPlane.y+b.z*this.slabPlane.z+this.slabPlane.w||null!=this.depthPlane&&0>b.x*this.depthPlane.x+b.y*this.depthPlane.y+b.z*this.depthPlane.z+this.depthPlane.w))this.point3iScreenTemp.z=1;return this.point3iScreenTemp},"JU.T3,JU.T3");c(c$,"transformVector",function(a,b){this.matrixTransform.rotate2(a,b)},"JU.V3,JU.V3");c(c$,"move",function(a,b,d,c,g,f,j){this.movetoThread=J.api.Interface.getOption("thread.MoveToThread");
this.movetoThread.setManager(this,this.vwr,[b,c,[d,g,f,j]]);0<f&&this.movetoThread.setEval(a);this.movetoThread.run()},"J.api.JmolScriptEvaluator,JU.V3,~N,JU.V3,~N,~N,~N");c(c$,"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(c$,"moveToPyMOL",function(a,b,d){var c=JU.M3.newA9(d);c.invert();var g=d[9],f=-d[10],j=-d[11],h=JU.P3.new3(d[12],d[13],d[14]),l=d[15],m=d[16],r=d[17];this.setPerspectiveDepth(!(0<=r));var r=Math.abs(r)/2,n=Math.tan(3.141592653589793*r/180),r=j*n,n=0.5/n-0.5,q=50/r;0<l&&(l=50+z((j-l)*q),j=50+z((j-m)*q),this.setSlabEnabled(!0),this.slabToPercent(l),this.depthToPercent(j),21==d.length&&(m=0!=d[18],q=0!=d[19],d=d[20],this.setZShadeEnabled(m),m&&(q?this.vwr.setIntProperty("zSlab",z(Math.min(100,
l+d*(j-l)))):this.vwr.setIntProperty("zSlab",z((l+j)/2)),this.vwr.setIntProperty("zDepth",j))));this.moveTo(a,b,h,null,0,c,100,NaN,NaN,r,null,NaN,NaN,NaN,n,g,f);return!0},"J.api.JmolScriptEvaluator,~N,~A");c(c$,"moveTo",function(a,b,d,c,g,f,j,h,l,m,r,n,q,p,s,t,u){if(null==f)if(f=new JU.M3,c=JU.V3.newV(c),Float.isNaN(g))f.m00=NaN;else if(0.01>g&&-0.01<g)f.setScale(1);else{if(0==c.x&&0==c.y&&0==c.z)return;var v=new JU.A4;v.setVA(c,g/57.29577951308232);f.setAA(v)}t==this.cameraSetting.x&&(t=NaN);u==
this.cameraSetting.y&&(u=NaN);s==this.cameraDepth&&(s=NaN);Float.isNaN(t)||(h=50*t/m/this.width*this.screenPixelCount);Float.isNaN(u)||(l=50*u/m/this.height*this.screenPixelCount);g=null==d?this.scaleDefaultPixelsPerAngstrom:this.defaultScaleToScreen(m);if(0>=b)this.setAll(d,f,r,j,h,l,m,g,p,n,q,s,t,u),this.vwr.moveUpdate(b),this.vwr.finalizeTransformParameters();else try{null==this.movetoThread&&(this.movetoThread=J.api.Interface.getOption("thread.MoveToThread"));var w=this.movetoThread.setManager(this,
this.vwr,[d,f,r,[b,j,h,l,m,g,p,n,q,s,t,u]]);0>=w||this.vwr.g.waitForMoveTo?(0<w&&this.movetoThread.setEval(a),this.movetoThread.run(),this.vwr.isSingleThreaded||(this.movetoThread=null)):this.movetoThread.start()}catch(z){if(!y(z,Exception))throw z;}},"J.api.JmolScriptEvaluator,~N,JU.P3,JU.T3,~N,JU.M3,~N,~N,~N,~N,JU.P3,~N,~N,~N,~N,~N,~N");c(c$,"stopMotion",function(){this.movetoThread=null});c(c$,"getRotationQuaternion",function(){return JU.Quat.newM(this.matrixRotate)});c(c$,"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(c$,"getMoveToText",function(a,b){this.finalizeTransformParameters();
var d=new JU.SB;d.append("moveto ");b&&d.append("/* time, axisAngle */ ");d.appendF(a);d.append(" ").append(this.getRotationText());b&&d.append(" /* zoom, translation */ ");JV.TransformManager.truncate2(d,this.zmPctSet);JV.TransformManager.truncate2(d,this.getTranslationXPercent());JV.TransformManager.truncate2(d,this.getTranslationYPercent());d.append(" ");b&&d.append(" /* center, rotationRadius */ ");d.append(this.getCenterText());d.append(" ").appendF(this.modelRadius);d.append(this.getNavigationText(b));
b&&d.append(" /* cameraDepth, cameraX, cameraY */ ");JV.TransformManager.truncate2(d,this.cameraDepth);JV.TransformManager.truncate2(d,this.cameraSetting.x);JV.TransformManager.truncate2(d,this.cameraSetting.y);d.append(";");return d.toString()},"~N,~B");c(c$,"getCenterText",function(){return JU.Escape.eP(this.fixedRotationCenter)});c(c$,"getRotateXyzText",function(){var a=new JU.SB,b=this.matrixRotate.m20,d=-(57.29577951308232*Math.asin(b)),c;0.999<b||-0.999>b?(b=-(57.29577951308232*Math.atan2(this.matrixRotate.m12,
this.matrixRotate.m11)),c=0):(b=57.29577951308232*Math.atan2(this.matrixRotate.m21,this.matrixRotate.m22),c=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!=d&&(a.append("; rotate y"),JV.TransformManager.truncate2(a,d));0!=c&&(a.append("; rotate z"),JV.TransformManager.truncate2(a,c));a.append(";");this.addZoomTranslationNavigationText(a);
return a.toString()});c(c$,"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.getNavigationDepthPercent()),a.append(";"))},"JU.SB");c(c$,"getRotateZyzText",function(a){var b=new JU.SB,
d=this.vwr.ms.getInfoM("defaultOrientationMatrix");null==d?d=this.matrixRotate:(d=JU.M3.newM3(d),d.invert(),d.mul2(this.matrixRotate,d));var c=d.m22,g=57.29577951308232*Math.acos(c);0.999<c||-0.999>c?(c=57.29577951308232*Math.atan2(d.m10,d.m11),d=0):(c=57.29577951308232*Math.atan2(d.m21,-d.m20),d=57.29577951308232*Math.atan2(d.m12,d.m02));0!=c&&(0!=g&&0!=d&&a)&&b.append("#Follows Z-Y-Z convention for Euler angles\n");b.append("reset");b.append(";center ").append(this.getCenterText());0!=c&&(b.append("; rotate z"),
JV.TransformManager.truncate2(b,c));0!=g&&(b.append("; rotate y"),JV.TransformManager.truncate2(b,g));0!=d&&(b.append("; rotate z"),JV.TransformManager.truncate2(b,d));b.append(";");this.addZoomTranslationNavigationText(b);return b.toString()},"~B");c$.truncate0=c(c$,"truncate0",function(a,b){a.appendC(" ");a.appendI(Math.round(b))},"JU.SB,~N");c$.truncate2=c(c$,"truncate2",function(a,b){a.appendC(" ");a.appendF(Math.round(100*b)/100)},"JU.SB,~N");c(c$,"setSpinXYZ",function(a,b,d){Float.isNaN(a)||
(this.spinX=a);Float.isNaN(b)||(this.spinY=b);Float.isNaN(d)||(this.spinZ=d);(this.isSpinInternal||this.isSpinFixed)&&this.clearSpin()},"~N,~N,~N");c(c$,"setSpinFps",function(a){0>=a?a=1:50<a&&(a=50);this.spinFps=a},"~N");c(c$,"setNavXYZ",function(a,b,d){Float.isNaN(a)||(this.navX=a);Float.isNaN(b)||(this.navY=b);Float.isNaN(d)||(this.navZ=d)},"~N,~N,~N");c(c$,"clearSpin",function(){this.setSpinOff();this.setNavOn(!1);this.isSpinFixed=this.isSpinInternal=!1});c(c$,"setSpinOn",function(){this.setSpin(null,
!0,3.4028235E38,null,null,null,!1)});c(c$,"setSpinOff",function(){this.setSpin(null,!1,3.4028235E38,null,null,null,!1)});c(c$,"setSpin",function(a,b,d,c,g,f,j){this.navOn&&b&&this.setNavOn(!1);this.spinOn!=b&&(this.spinOn=b,this.vwr.g.setB("_spinning",b),b?null==this.spinThread&&(this.spinThread=J.api.Interface.getOption("thread.SpinThread"),this.spinThread.setManager(this,this.vwr,[Float.$valueOf(d),c,g,f,j?Boolean.TRUE:null]),this.spinIsGesture=j,null==f&&null==g?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.BS,~B");c(c$,"setNavOn",function(a){if(!Float.isNaN(this.navFps)){var b=this.navOn;a&&this.spinOn&&this.setSpin(null,!1,0,null,null,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.spinThread.setManager(this,this.vwr,null),this.spinThread.start())):b&&null!=this.spinThread&&(this.spinThread.interrupt(),this.spinThread=null)}},"~B");c(c$,"setVibrationScale",function(a){this.vibrationScale=a},"~N");c(c$,"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=z(1E3*this.vibrationPeriod);if(0<a)return;a=-a}this.setVibrationOn(0<a&&0<=this.vwr.modelGetLastVibrationIndex(this.vwr.am.cmi,
0))},"~N");c(c$,"setVibrationT",function(a){this.vibrationT.x=a;0==this.vibrationScale&&(this.vibrationScale=this.vwr.g.vibrationScale)},"~N");c(c$,"isVibrationOn",function(){return this.vibrationOn});c(c$,"setVibrationOn",function(a){a?1>this.vwr.getModelCount()?(this.vibrationOn=!1,this.vibrationT.x=0):(null==this.vibrationThread&&(this.vibrationThread=J.api.Interface.getOption("thread.VibrationThread"),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=0)},"~B");c(c$,"clearVibration",function(){this.setVibrationOn(!1);this.vibrationScale=0});c(c$,"setStereoMode2",function(a){this.stereoMode=J.c.STER.CUSTOM;this.stereoColors=a},"~A");c(c$,"setStereoMode",function(a){this.stereoColors=null;this.stereoMode=a},"J.c.STER");c(c$,"setStereoDegrees",function(a){this.stereoDegrees=a;this.stereoRadians=0.017453292*a},"~N");c(c$,
"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(c$,"isWindowCentered",function(){return this.windowCentered});c(c$,"setWindowCentered",function(a){this.windowCentered=a;this.resetNavigationPoint(!0)},"~B");c(c$,"getRotationCenter",function(){return this.fixedRotationCenter});c(c$,"getRotationRadius",function(){return this.modelRadius});
c(c$,"setRotationRadius",function(a,b){a=this.modelRadius=0>=a?this.vwr.calcRotationRadius(this.fixedRotationCenter):a;b&&this.vwr.setRotationRadius(a,!1);return a},"~N,~B");c(c$,"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.calcRotationRadius(this.fixedRotationCenter)))},"JU.P3,~B");
c(c$,"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(c$,"moveRotationCenter",function(a,b){this.setRotationCenterAndRadiusXYZ(a,!1);b&&this.setRotationPointXY(this.fixedRotationCenter)},"JU.P3,~B");c(c$,"setCenter",function(){this.setRotationCenterAndRadiusXYZ(this.fixedRotationCenter,
!0)});c(c$,"setCenterAt",function(a,b){var d=JU.P3.newP(b);switch(a){case 96:d.add(this.vwr.ms.getAverageAtomPoint());break;case 1679429641:d.add(this.vwr.getBoundBoxCenter());break;case 1073741826:d.setT(this.rotationCenterDefault)}this.setRotationCenterAndRadiusXYZ(d,!0);this.resetFitToScreen(!0)},"~N,JU.P3");c(c$,"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(c$,"setFrameOffsets",
function(a){this.frameOffsets=a},"~A");c(c$,"setSelectedTranslation",function(a,b,d){this.bsSelectedAtoms=a;switch(b){case "X":case "x":this.ptOffset.x+=d;break;case "Y":case "y":this.ptOffset.y+=d;break;case "Z":case "z":this.ptOffset.z+=d}},"JU.BS,~S,~N");c(c$,"setNavFps",function(a){this.navFps=a},"~N");c(c$,"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.visualRange;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.visualRange*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(c$,"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(c$,"getPerspectiveFactor",function(a){return 0>=a?this.referencePlaneOffset:this.referencePlaneOffset/
a},"~N");c(c$,"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.point3fScreenTemp.x+=this.perspectiveShiftXY.x,this.point3fScreenTemp.y+=this.perspectiveShiftXY.y;case 0:this.untransformedPoint.x-=this.fixedRotationOffset.x,this.untransformedPoint.y-=this.fixedRotationOffset.y}if(this.perspectiveDepth){var d=this.getPerspectiveFactor(this.untransformedPoint.z);
this.untransformedPoint.x/=d;this.untransformedPoint.y/=d}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(c$,"canNavigate",function(){return!0});c(c$,"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(c$,"setNavigatePt",function(a){this.navigationCenter.setT(a);this.navMode=3;this.navigating=!0;this.finalizeTransformParameters();this.navigating=!1},"JU.P3");c(c$,"getNavigationCenter",function(){return this.navigationCenter});
c(c$,"getNavigationDepthPercent",function(){return this.navigationDepth});c(c$,"setNavigationSlabOffsetPercent",function(a){this.vwr.g.setF("navigationSlab",a);this.calcCameraFactors();this.navigationSlabOffset=a/50*this.modelRadiusPixels},"~N");c(c$,"getNavigationOffset",function(){this.transformPt3f(this.navigationCenter,this.navigationOffset);return this.navigationOffset});c(c$,"getNavPtHeight",function(){return this.height/2});c(c$,"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(c$,"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.getNavigationDepthPercent()},"~B");
c(c$,"setScreenParameters",function(a,b,d,c,g,f){var j=1==this.mode?JU.P3.newP(this.navigationCenter):null,h=JU.P3.newP(this.navigationOffset);h.x/=this.width;h.y/=this.height;this.setScreenParameters0(a,b,d,c,g,f);null!=j&&(this.navigationCenter.setT(j),this.navTranslatePercentOrTo(-1,h.x*this.width,h.y*this.height),this.setNavigatePt(j))},"~N,~N,~B,~B,~B,~B");c(c$,"navInterrupt",function(){null!=this.nav&&this.nav.interrupt()});c(c$,"getNav",function(){if(null!=this.nav)return!0;this.nav=J.api.Interface.getOption("navigate.Navigator");
if(null==this.nav)return!1;this.nav.set(this,this.vwr);return!0});c(c$,"navigateList",function(a,b){this.getNav()&&this.nav.navigateList(a,b)},"J.api.JmolScriptEvaluator,JU.Lst");c(c$,"navigateAxis",function(a,b){this.getNav()&&this.nav.navigateAxis(a,b)},"JU.V3,~N");c(c$,"zoomByFactor",function(a,b,d){!(0>=a)&&this.zoomEnabled&&(1!=this.mode?(this.zoomRatio=a,this.zmPctSet*=a,this.resetXYCenter(b,d)):this.getNav()&&this.nav.zoomByFactor(a,b,d))},"~N,~N,~N");c(c$,"setNavigationOffsetRelative",function(){this.getNav()&&
this.nav.setNavigationOffsetRelative()});c(c$,"navigateKey",function(a,b){this.getNav()&&this.nav.navigateKey(a,b)},"~N,~N");c(c$,"setNavigationDepthPercent",function(a){this.getNav()&&this.nav.setNavigationDepthPercent(a)},"~N");c(c$,"navTranslatePercentOrTo",function(a,b,d){this.getNav()&&this.nav.navTranslatePercentOrTo(a,b,d)},"~N,~N,~N");c(c$,"calcNavigationPoint",function(){this.getNav()&&this.nav.calcNavigationPoint()});c(c$,"getNavigationState",function(){return 1==this.mode&&this.getNav()?
this.nav.getNavigationState():""});c(c$,"setZoomHeight",function(a,b){this.zoomHeight=a;this.scaleFitToScreen(!1,b,!1,!0)},"~B,~B");c(c$,"setAll",function(a,b,d,c,g,f,j,h,l,m,r,n,q,p){Float.isNaN(b.m00)||this.setRotation(b);null!=a&&this.moveRotationCenter(a,!this.windowCentered);null!=d&&1==this.mode&&this.navigationCenter.setT(d);Float.isNaN(n)||this.setCameraDepthPercent(n,!1);!Float.isNaN(q)&&!Float.isNaN(p)&&this.setCamera(q,p);Float.isNaN(c)||this.zoomToPercent(c);Float.isNaN(j)||(this.modelRadius=
j);Float.isNaN(h)||(this.scaleDefaultPixelsPerAngstrom=h);!Float.isNaN(g)&&!Float.isNaN(f)&&(this.translateToPercent("x",g),this.translateToPercent("y",f));1==this.mode&&(!Float.isNaN(m)&&!Float.isNaN(r)&&this.navTranslatePercentOrTo(0,m,r),Float.isNaN(l)||this.setNavigationDepthPercent(l))},"JU.P3,JU.M3,JU.P3,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N,~N");C(c$,"degreesPerRadian",57.29577951308232,"DEFAULT_NAV_FPS",10,"DEFAULT_SPIN_Y",30,"DEFAULT_SPIN_FPS",30,"MAXIMUM_ZOOM_PERCENTAGE",2E5,"MAXIMUM_ZOOM_PERSPECTIVE_DEPTH",
1E4,"MODE_STANDARD",0,"MODE_NAVIGATION",1,"MODE_PERSPECTIVE_PYMOL",2,"DEFAULT_PERSPECTIVE_MODEL",11,"NAV_MODE_IGNORE",-2,"NAV_MODE_ZOOMED",-1,"NAV_MODE_NONE",0,"NAV_MODE_RESET",1,"NAV_MODE_NEWXY",2,"NAV_MODE_NEWXYZ",3,"NAV_MODE_NEWZ",4)});n("JV");w("java.lang.Enum javajs.api.PlatformViewer J.api.JmolViewer J.atomdata.AtomDataServer java.util.Hashtable javajs.awt.Dimension JU.Lst J.atomdata.RadiusData J.c.VDW JU.CommandHistory".split(" "),"JV.Viewer","java.io.Reader java.lang.Boolean $.Character $.Float JU.BS $.CU $.DF $.Measure $.P3 $.P3i $.PT $.Rdr $.SB $.V3 J.adapter.smarter.SmarterJmolAdapter J.api.Interface $.JmolAppConsoleInterface J.c.ANIM $.AXES $.FIL $.STER J.i18n.GT JS.SV $.T J.thread.TimeoutThread JU.BSUtil $.C $.Elements $.Escape $.GData $.JmolMolecule $.Logger $.Parser $.TempArray $.Txt JV.ActionManager $.AnimationManager $.ColorManager $.FileManager $.JC $.ModelManager $.SelectionManager $.ShapeManager $.StateManager $.StatusManager $.TransformManager JV.binding.Binding".split(" "),
function(){c$=t(function(){this.queueOnHold=this.isSingleThreaded=this.isWebGL=this.isJS=this.haveDisplay=this.autoExit=!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.insertedCommand=this.appletName=this.htmlName="";this.tm=this.sm=this.g=this.rm=this.slm=this.shm=this.dm=this.cm=this.am=this.actionManager=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.access=this.modelAdapter=this.display=this.vwrOptions=this.commandOptions=null;this.$isPreviewOnly=this.allowArrayDotNotation=!1;this.mouseEnabled=!0;this.noneSelected=!1;this.frameOffsets=this.bsFrameOffsets=this.jsc=this.smilesMatcher=this.minimizer=
this.annotationParser=this.ligandModelSet=this.ligandModels=this.mouse=null;this.motionEventNumber=0;this.inMotion=!1;this.refreshing=!0;this.axesAreTainted=!1;this.dimScreen=null;this.maximumSize=2147483647;this.imageFontScaling=1;this.gRight=null;this.isStereoSlave=!1;this.jsParams=this.captureParams=null;this.antialiased=!1;this.hoverAtomIndex=-1;this.hoverText=null;this.hoverEnabled=!0;this.currentCursor=0;this.ptTemp=null;this.prevFrame=-2147483648;this.prevMorphModel=0;this.haveJDX=!1;this.rd=
this.jsv=null;this.frankOn=!0;this.scriptEditorVisible=!1;this.pm=this.headlessImageParams=this.modelkitPopup=this.jmolpopup=this.scriptEditor=this.appConsole=null;this.isTainted=!0;this.showSelected=this.movingSelected=!1;this.rotatePrev2=this.rotatePrev1=this.rotateBondIndex=-1;this.bsRotateBranch=null;this.creatingImage=!1;this.errorMessageUntranslated=this.errorMessage=this.defaultVdw=this.userVdwMars=this.userVdws=this.bsUserVdws=this.outputManager=null;this.currentShapeID=-1;this.localFunctions=
this.currentShapeState=null;this.privateKey=0;this.$isKiosk=!1;this.executor=null;this.displayLoadErrors=!0;this.$isParallel=!1;this.actionStatesRedo=this.actionStates=null;this.stateScriptVersionInt=0;this.logFileName=this.nmrCalculation=this.chainList=this.chainMap=this.timeouts=this.jsExporter3D=null;s(this,arguments)},JV,"Viewer",J.api.JmolViewer,[J.atomdata.AtomDataServer,javajs.api.PlatformViewer]);K(c$,function(){this.commandHistory=new JU.CommandHistory;this.dimScreen=new javajs.awt.Dimension(0,
0);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.actionStates=new JU.Lst;this.actionStatesRedo=new JU.Lst;this.chainMap=new java.util.Hashtable;this.chainList=new JU.Lst});c(c$,"finalize",function(){JU.Logger.debugging&&JU.Logger.debug("vwr finalize "+this);R(this,JV.Viewer,"finalize",[])});c(c$,"hasDisplay",function(){return this.haveDisplay});h(c$,"isApplet",function(){return this.$isApplet});
c(c$,"setInsertedCommand",function(a){this.insertedCommand=a},"~S");c(c$,"getActionManager",function(){return this.actionManager});c(c$,"getLogFilePath",function(){return this.logFilePath});c(c$,"isSignedApplet",function(){return this.$isSignedApplet});c$.getJmolVersion=h(c$,"getJmolVersion",function(){return null==JV.Viewer.version_date?JV.Viewer.version_date=JV.JC.version+"  "+JV.JC.date:JV.Viewer.version_date});c$.allocateViewer=c(c$,"allocateViewer",function(a,b,d,c,g,f,j,h){var l=new java.util.Hashtable;
l.put("display",a);l.put("adapter",b);l.put("statusListener",j);l.put("platform",h);l.put("options",f);l.put("fullName",d);l.put("documentBase",c);l.put("codeBase",g);return new JV.Viewer(l)},"~O,J.api.JmolAdapter,~S,java.net.URL,java.net.URL,~S,J.api.JmolStatusListener,javajs.api.GenericPlatform");u(c$,function(a){E(this,JV.Viewer,[]);this.setOptions(a)},"java.util.Map");c(c$,"getStatusManager",function(){return this.sm});c(c$,"haveAccess",function(a){return this.access===a},"JV.Viewer.ACCESS");
h(c$,"getModelAdapter",function(){null==this.modelAdapter&&(this.modelAdapter=new J.adapter.smarter.SmarterJmolAdapter);return this.modelAdapter});c(c$,"getSymmetryInfo",function(a,b,d,c,g,f,j){return this.getPropertyManager().getSymmetryInfo(a,b,d,c,g,f,j)},"JU.BS,~S,~N,JU.P3,JU.P3,~S,~N");h(c$,"getSmartsMatch",function(a,b){null==b&&(b=this.bsA());return this.getSmilesMatcher().getSubstructureSet(a,this.ms.at,this.getAtomCount(),b,!0,!1)},"~S,JU.BS");c(c$,"getViewerOptions",function(){return this.vwrOptions});
c(c$,"setOptions",function(a){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 d=a.get("codePath");null==d&&(d="../java/");JV.Viewer.appletCodeBase=d.toString();JV.Viewer.appletIdiomaBase=JV.Viewer.appletCodeBase.substring(0,JV.Viewer.appletCodeBase.lastIndexOf("/",JV.Viewer.appletCodeBase.length-2)+1)+"idioma";d=a.get("documentBase");
JV.Viewer.appletDocumentBase=null==d?"":d.toString();d=a.get("options");this.commandOptions=null==d?"":d.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 c=this.fullName.indexOf("__");this.htmlName=0>c?this.fullName:this.fullName.substring(0,c);this.appletName=JU.PT.split(this.htmlName+"_","_")[0];this.syncId=0>c?"":this.fullName.substring(c+2,this.fullName.length-2);this.access=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");d=a.get("platform");c="unknown";null==d&&(d=this.commandOptions.contains("platform=")?this.commandOptions.substring(this.commandOptions.indexOf("platform=")+9):"J.awt.Platform");if(p(d,String)){c=d;this.isJS=(this.isWebGL=0<=c.indexOf(".awtjs."))||0<=c.indexOf(".awtjs2d.");var d=null,g="?";self.Jmol&&(d=Jmol._applets[this.htmlName.split("_object")[0]],g=Jmol._version);null!=g&&(this.html5Applet=d,JV.Viewer.strJavaVersion=
g,JV.Viewer.strJavaVendor="Java2Script "+(this.isWebGL?"(WebGL)":"(HTML5)"));d=J.api.Interface.getInterface(c)}this.apiPlatform=d;this.display=a.get("display");this.isSingleThreaded=this.apiPlatform.isSingleThreaded();this.$noGraphicsAllowed=this.checkOption2("noGraphics","-n");this.haveDisplay=this.isWebGL||null!=this.display&&!this.$noGraphicsAllowed&&!this.isHeadless()&&!this.checkOption2("isDataOnly","\x00");this.$noGraphicsAllowed=(new Boolean(this.$noGraphicsAllowed&null==this.display)).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);d=a.get("graphicsAdapter");null==d&&!this.isWebGL&&(d=J.api.Interface.getOption("g3d.Graphics3D"));this.gdata=null==d?new JU.GData:d;this.gdata.initialize(this.apiPlatform);this.stm=new JV.StateManager(this);this.cm=new JV.ColorManager(this,this.gdata);this.sm=new JV.StatusManager(this);
c=a.containsKey("4DMouse");this.tm=JV.TransformManager.getTransformManager(this,2147483647,0,c);this.slm=new JV.SelectionManager(this);this.haveDisplay&&(this.actionManager=this.multiTouch?J.api.Interface.getOption("multitouch.ActionManagerMT"):new JV.ActionManager,this.actionManager.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.tempArray=new JU.TempArray;this.am=new JV.AnimationManager(this);d=a.get("repaintManager");null==d&&(d=J.api.Interface.getOption("render.RepaintManager"));null!=d&&!d.equals("")&&(this.rm=d).set(this,this.shm);this.initialize(!0);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"),
!this.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,c=b.indexOf("#"),0<=c&&(b=b.substring(0,c)),c=b.lastIndexOf("?"),0<=c&&(b=b.substring(0,c)),c=b.lastIndexOf("/"),0<=c&&(b=b.substring(0,c)),JV.Viewer.jsDocumentBase=b,this.fm.setAppletContext(JV.Viewer.appletDocumentBase),a=a.get("appletProxy"),null!=a&&this.setStringProperty("appletProxy",
a),this.$isSignedApplet?(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):this.isJS||(this.logFilePath=null)):(this.gdata.setBackgroundTransparent(this.checkOption2("backgroundTransparent","-b")),(this.isSilent=this.checkOption2("silent","-i"))&&JU.Logger.setLogLevel(3),this.isSyntaxCheck=(this.isSyntaxAndFileCheck=this.checkOption2("checkLoad",
"-C"))||this.checkOption2("check","-c"),this.listCommands=this.checkOption2("listCommands","-l"),this.autoExit=this.checkOption2("exit","-x"),this.cd("."),this.isHeadless()&&(this.headlessImageParams=a.get("headlessImage"),d=a.get("headlistMaxTimeMs"),null==d&&(d=Integer.$valueOf(6E4)),this.setTimeout(""+Math.random(),d.intValue(),"exitJmol")));this.useCommandThread=!this.isHeadless()&&this.checkOption2("useCommandThread","-threaded");this.setStartupBooleans();this.setIntProperty("_nProcessors",JV.Viewer.nProcessors);
this.isSilent||JU.Logger.info("(C) 2012 Jmol Development\nJmol Version: "+JV.Viewer.getJmolVersion()+"\njava.vendor: "+JV.Viewer.strJavaVendor+"\njava.version: "+JV.Viewer.strJavaVersion+"\nos.name: "+JV.Viewer.strOSName+"\nAccess: "+this.access+"\nmemory: "+this.getP("_memory")+"\nprocessors available: "+JV.Viewer.nProcessors+"\nuseCommandThread: "+this.useCommandThread+(!this.$isApplet?"":"\nappletId:"+this.htmlName+(this.$isSignedApplet?" (signed)":"")));this.zap(!1,!0,!1);this.g.setO("language",
J.i18n.GT.getLanguage());this.stm.setJmolDefaults();JU.Elements.covalentVersion=1;this.allowArrayDotNotation=!0},"java.util.Map");c(c$,"setDisplay",function(a){this.display=a;this.apiPlatform.setViewer(this,a)},"~O");c(c$,"newMeasurementData",function(a,b){return J.api.Interface.getInterface("JM.MeasurementData").init(a,this,b)},"~S,JU.Lst");c(c$,"getDataManager",function(){return null==this.dm?this.dm=J.api.Interface.getInterface("JV.DataManager").set(this):this.dm});c(c$,"getScriptManager",function(){if(this.allowScripting&&
null==this.scm){this.scm=J.api.Interface.getInterface("JS.ScriptManager");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(c$,"checkOption2",function(a,b){return this.vwrOptions.containsKey(a)||0<=this.commandOptions.indexOf(b)},"~S,~S");c(c$,"isPreviewOnly",function(){return this.$isPreviewOnly});c(c$,"isHeadless",function(){return this.apiPlatform.isHeadless()});c(c$,"setStartupBooleans",
function(){this.setBooleanProperty("_applet",this.$isApplet);this.setBooleanProperty("_jspecview",!1);this.setBooleanProperty("_signedApplet",this.$isSignedApplet);this.setBooleanProperty("_headless",this.apiPlatform.isHeadless());this.setStringProperty("_restrict",'"'+this.access+'"');this.setBooleanProperty("_useCommandThread",this.useCommandThread)});c(c$,"noGraphicsAllowed",function(){return this.$noGraphicsAllowed});c(c$,"getExportDriverList",function(){return this.haveAccess(JV.Viewer.ACCESS.ALL)?
this.g.getParameter("exportDrivers",!0):""});c(c$,"getHtmlName",function(){return this.htmlName});h(c$,"getDisplay",function(){return this.display});h(c$,"dispose",function(){this.gRight=null;null!=this.mouse&&(this.actionManager.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.modelkitPopup&&this.modelkitPopup.jpiDispose();
try{null!=this.appConsole&&(this.appConsole.dispose(),this.appConsole=null),null!=this.scriptEditor&&(this.scriptEditor.dispose(),this.scriptEditor=null)}catch(a){if(!y(a,Exception))throw a;}});c(c$,"reset",function(a){this.ms.calcBoundBoxDimensions(null,1);this.axesAreTainted=!0;this.tm.homePosition(a);this.ms.setCrystallographicDefaults()?this.stm.setCrystallographicDefaults():this.setAxesModeMolecular(!1);this.prevFrame=-2147483648;this.tm.spinOn||this.refresh(-1,"Viewer:homePosition()")},"~B");
h(c$,"homePosition",function(){this.evalString("reset spin")});c(c$,"initialize",function(a){this.g=this.stm.getGlobalSettings(this.g,a);this.setStartupBooleans();this.g.setI("_width",this.dimScreen.width);this.g.setI("_height",this.dimScreen.height);this.haveDisplay&&(this.g.setB("_is2D",this.isJS&&!this.isWebGL),this.g.setB("_multiTouchClient",this.actionManager.isMTClient()),this.g.setB("_multiTouchServer",this.actionManager.isMTServer()));this.cm.resetElementColors();this.setObjectColor("background",
"black");this.setObjectColor("axis1","red");this.setObjectColor("axis2","green");this.setObjectColor("axis3","blue");this.gdata.setAmbientPercent(this.g.ambientPercent);this.gdata.setDiffusePercent(this.g.diffusePercent);this.gdata.setSpecular(this.g.specular);this.gdata.setCel(this.g.celShading);this.gdata.setCelPower(this.g.celShadingPower);this.gdata.setSpecularPercent(this.g.specularPercent);this.gdata.setSpecularPower(-this.g.specularExponent);this.gdata.setPhongExponent(this.g.phongExponent);
this.gdata.setSpecularPower(this.g.specularPower);null!=this.ms&&this.am.setAnimationOn(!1);this.am.setAnimationFps(this.g.animationFps);this.sm.setAllowStatusReporting(this.g.statusReporting);this.setBooleanProperty("antialiasDisplay",this.g.antialiasDisplay);this.setTransformManagerDefaults()},"~B");c(c$,"saveModelOrientation",function(){this.ms.saveModelOrientation(this.am.cmi,this.stm.getOrientation())});c(c$,"restoreModelOrientation",function(a){a=this.ms.getModelOrientation(a);null!=a&&a.restore(-1,
!0)},"~N");c(c$,"restoreModelRotation",function(a){a=this.ms.getModelOrientation(a);null!=a&&a.restore(-1,!1)},"~N");c(c$,"getGLmolView",function(){var a=this.tm;return{center:a.fixedRotationCenter,quaternion:a.getRotationQuaternion(),xtrans:a.xTranslationFraction,ytrans:a.yTranslationFraction,scale:a.scalePixelsPerAngstrom,zoom:a.zoomPercent,cameraDistance:a.cameraDistance,pixelCount:a.screenPixelCount,perspective:a.perspectiveDepth,width:a.width,height:a.height}});c(c$,"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(c$,"setCenterBitSet",function(a,b){var d=0<JU.BSUtil.cardinalityOf(a)?this.ms.getAtomSetCenter(a):null;this.isJmolDataFrame()||this.tm.setNewRotationCenter(d,b)},"JU.BS,~B");c(c$,"setNewRotationCenter",function(a){this.isJmolDataFrame()||this.tm.setNewRotationCenter(a,!0)},"JU.P3");c(c$,"navigate",function(a,b){this.isJmolDataFrame()||(this.tm.navigateKey(a,b),!this.tm.vibrationOn&&
0!=a&&this.refresh(1,"Viewer:navigate()"))},"~N,~N");c(c$,"move",function(a,b,d,c,g,f,j){this.tm.move(a,b,d,c,g,f,j);this.moveUpdate(f)},"J.api.JmolScriptEvaluator,JU.V3,~N,JU.V3,~N,~N,~N");c(c$,"moveTo",function(a,b,d,c,g,f,j,h,l,m,r,n,q,p,s,t,u){this.haveDisplay||(b=0);this.setTainted(!0);this.tm.moveTo(a,b,d,c,g,f,j,h,l,m,r,n,q,p,s,t,u)},"J.api.JmolScriptEvaluator,~N,JU.P3,JU.V3,~N,JU.M3,~N,~N,~N,~N,JU.P3,~N,~N,~N,~N,~N,~N");c(c$,"moveUpdate",function(a){0<a?this.requestRepaintAndWait("moveUpdate"):
0==a&&this.setSync()},"~N");c(c$,"navigatePt",function(a){this.tm.setNavigatePt(a);this.setSync()},"JU.P3");c(c$,"navigateAxis",function(a,b){this.tm.navigateAxis(a,b);this.setSync()},"JU.V3,~N");c(c$,"navTranslatePercent",function(a,b){this.isJmolDataFrame()||(this.tm.navTranslatePercentOrTo(0,a,b),this.setSync())},"~N,~N");c(c$,"setMouseEnabled",function(a){this.mouseEnabled=a},"~B");h(c$,"processMultitouchEvent",function(a,b,d,c,g,f){this.actionManager.processMultitouchEvent(a,b,d,c,g,f)},"~N,~N,~N,~N,JU.P3,~N");
c(c$,"zoomBy",function(a){this.mouseEnabled&&this.tm.zoomBy(a);this.refresh(2,this.sm.syncingMouse?"Mouse: zoomBy "+a:"")},"~N");c(c$,"zoomByFactor",function(a,b,d){this.mouseEnabled&&this.tm.zoomByFactor(a,b,d);this.refresh(2,!this.sm.syncingMouse?"":"Mouse: zoomByFactor "+a+(2147483647==b?"":" "+b+" "+d))},"~N,~N,~N");c(c$,"rotateXYBy",function(a,b){this.mouseEnabled&&this.tm.rotateXYBy(a,b,null);this.refresh(2,this.sm.syncingMouse?"Mouse: rotateXYBy "+a+" "+b:"")},"~N,~N");c(c$,"spinXYBy",function(a,
b,d){this.mouseEnabled&&this.tm.spinXYBy(a,b,d);0==a&&0==b||this.refresh(2,this.sm.syncingMouse?"Mouse: spinXYBy "+a+" "+b+" "+d:"")},"~N,~N,~N");c(c$,"rotateZBy",function(a,b,d){this.mouseEnabled&&this.tm.rotateZBy(a,b,d);this.refresh(2,this.sm.syncingMouse?"Mouse: rotateZBy "+a+(2147483647==b?"":" "+b+" "+d):"")},"~N,~N,~N");c(c$,"rotateSelected",function(a,b,d){this.isJmolDataFrame()||(this.mouseEnabled&&(this.tm.rotateXYBy(a,b,this.setMovableBitSet(d,!1)),this.refreshMeasures(!0)),this.refresh(2,
this.sm.syncingMouse?"Mouse: rotateMolecule "+a+" "+b:""))},"~N,~N,JU.BS");c(c$,"setMovableBitSet",function(a,b){null==a&&(a=this.bsA());a=JU.BSUtil.copy(a);JU.BSUtil.andNot(a,this.getMotionFixedAtoms());b&&!this.g.allowMoveAtoms&&(a=this.ms.getMoleculeBitSet(a));return a},"JU.BS,~B");c(c$,"translateXYBy",function(a,b){this.mouseEnabled&&this.tm.translateXYBy(a,b);this.refresh(2,this.sm.syncingMouse?"Mouse: translateXYBy "+a+" "+b:"")},"~N,~N");h(c$,"rotateFront",function(){this.tm.resetRotation();
this.refresh(1,"Viewer:rotateFront()")});c(c$,"translate",function(a,b,d,c){var g="\x00"==d?z(b):"%"==d?this.tm.percentToPixels(a,b):this.tm.angstromsToPixels(b*("n"==d?10:1));if(null!=c){if(0==g)return;this.tm.setSelectedTranslation(c,a,g)}else switch(a){case "X":case "x":"\x00"==d?this.tm.translateToPercent("x",b):this.tm.translateXYBy(g,0);break;case "Y":case "y":"\x00"==d?this.tm.translateToPercent("y",b):this.tm.translateXYBy(0,g);break;case "Z":case "z":"\x00"==d?this.tm.translateToPercent("z",
b):this.tm.translateZBy(g)}this.refresh(1,"Viewer:translate()")},"~S,~N,~S,JU.BS");h(c$,"getZoomPercent",function(){return z(this.tm.getZoomSetting())});h(c$,"getZoomPercentFloat",function(){return this.tm.getZoomPercentFloat()});c(c$,"getMaxZoomPercent",function(){return 2E5});c(c$,"slabByPixels",function(a){this.tm.slabByPercentagePoints(a);this.refresh(3,"slabByPixels")},"~N");c(c$,"depthByPixels",function(a){this.tm.depthByPercentagePoints(a);this.refresh(3,"depthByPixels")},"~N");c(c$,"slabDepthByPixels",
function(a){this.tm.slabDepthByPercentagePoints(a);this.refresh(3,"slabDepthByPixels")},"~N");c(c$,"finalizeTransformParameters",function(){this.tm.finalizeTransformParameters();this.gdata.setSlab(this.tm.slabValue);this.gdata.setDepth(this.tm.depthValue);this.gdata.setZShade(this.tm.zShadeEnabled,this.tm.zSlabValue,this.tm.zDepthValue,this.g.zShadePower)});c(c$,"getScalePixelsPerAngstrom",function(a){return this.tm.scalePixelsPerAngstrom*(a||!this.antialiased?1:0.5)},"~B");c(c$,"setSpin",function(a,
b){if(JU.PT.isOneOf(a,";x;y;z;fps;X;Y;Z;FPS;")){var d="x;y;z;fps;X;Y;Z;FPS".indexOf(a);switch(d){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>d?"spin":"nav")+a,b)}},"~S,~N");c(c$,"getSpinState",function(){return this.getStateCreator().getSpinState(!1)});
c(c$,"getOrientationText",function(a,b){switch(a){case 1313866249:case 1073741863:case 1112541205:case 1112541206:case 1112541207:case 135270418:return this.ms.getBoundBoxOrientation(a,this.bsA());case 1073742035:return this.stm.getSavedOrientationText(b);default:return this.tm.getOrientationText(a)}},"~N,~S");c(c$,"getCurrentColorRange",function(){return this.cm.getPropertyColorRange()});c(c$,"setDefaultColors",function(a){this.cm.setDefaultColors(a);this.g.setB("colorRasmol",a);this.g.setO("defaultColorScheme",
a?"rasmol":"jmol")},"~B");c(c$,"getColorArgbOrGray",function(a){return this.gdata.getColorArgbOrGray(a)},"~N");c(c$,"setElementArgb",function(a,b){this.g.setO("=color "+JU.Elements.elementNameFromNumber(a),JU.Escape.escapeColor(b));this.cm.setElementArgb(a,b)},"~N,~N");h(c$,"setVectorScale",function(a){this.g.setF("vectorScale",a);this.g.vectorScale=a},"~N");h(c$,"setVibrationScale",function(a){this.tm.setVibrationScale(a);this.g.vibrationScale=a;this.g.setF("vibrationScale",a)},"~N");c(c$,"setVibrationOff",
function(){this.tm.setVibrationPeriod(0)});h(c$,"setVibrationPeriod",function(a){this.tm.setVibrationPeriod(a);a=Math.abs(a);this.g.vibrationPeriod=a;this.g.setF("vibrationPeriod",a)},"~N");c(c$,"setObjectColor",function(a,b){null==b||0==b.length||this.setObjectArgb(a,JU.CU.getArgbFromString(b))},"~S,~S");c(c$,"setObjectVisibility",function(a,b){var d=JV.StateManager.getObjectIdFromName(a);0<=d&&this.setShapeProperty(d,"display",b?Boolean.TRUE:Boolean.FALSE)},"~S,~B");c(c$,"setObjectArgb",function(a,
b){var d=JV.StateManager.getObjectIdFromName(a);if(0>d)a.equalsIgnoreCase("axes")&&(this.setObjectArgb("axis1",b),this.setObjectArgb("axis2",b),this.setObjectArgb("axis3",b));else{this.g.objColors[d]=b;switch(d){case 0:this.gdata.setBackgroundArgb(b),this.cm.setColixBackgroundContrast(b)}this.g.setO(a+"Color",JU.Escape.escapeColor(b))}},"~S,~N");c(c$,"setBackgroundImage",function(a,b){this.g.backgroundImageFileName=a;this.gdata.setBackgroundImage(b)},"~S,~O");c(c$,"getObjectColix",function(a){a=this.g.objColors[a];
return 0==a?this.getColixBackgroundContrast():JU.C.getColix(a)},"~N");c(c$,"getFontState",function(a,b){return this.getStateCreator().getFontState(a,b)},"~S,javajs.awt.Font");h(c$,"setColorBackground",function(a){this.setObjectColor("background",a)},"~S");h(c$,"getBackgroundArgb",function(){return this.g.objColors[0]});c(c$,"setObjectMad",function(a,b,d){var c=JV.StateManager.getObjectIdFromName(b.equalsIgnoreCase("axes")?"axis":b);if(!(0>c)){if(-2==d||-4==d){var g=d+3;d=this.getObjectMad(c);0==d&&
(d=g)}this.g.setB("show"+b,0!=d);this.g.objStateOn[c]=0!=d;0!=d&&(this.g.objMad[c]=d,this.setShapeSize(a,d,null))}},"~N,~S,~N");c(c$,"getObjectMad",function(a){return this.g.objStateOn[a]?this.g.objMad[a]:0},"~N");c(c$,"setPropertyColorScheme",function(a,b,d){this.g.propertyColorScheme=a;a.startsWith("translucent ")&&(b=!0,a=a.substring(12).trim());this.cm.setPropertyColorScheme(a,b,d)},"~S,~B,~B");c(c$,"getPropertyColorScheme",function(){return this.g.propertyColorScheme});c(c$,"getColixBackgroundContrast",
function(){return this.cm.colixBackgroundContrast});c(c$,"getSpecularState",function(){return this.getStateCreator().getSpecularState()});c(c$,"getColixAtomPalette",function(a,b){return this.cm.getColixAtomPalette(a,b)},"JM.Atom,~N");c(c$,"getColixBondPalette",function(a,b){return this.cm.getColixBondPalette(a,b)},"JM.Bond,~N");c(c$,"getColorSchemeList",function(a){return this.cm.getColorSchemeList(a)},"~S");c(c$,"setUserScale",function(a){this.cm.setUserScale(a)},"~A");c(c$,"getColixForPropertyValue",
function(a){return this.cm.getColixForPropertyValue(a)},"~N");c(c$,"getColorPointForPropertyValue",function(a){return JU.CU.colorPtFromInt(this.gdata.getColorArgbOrGray(this.cm.getColixForPropertyValue(a)),null)},"~N");c(c$,"select",function(a,b,d,c){b&&(a=this.getUndeletedGroupAtomBits(a));this.slm.select(a,d,c);this.shm.setShapeSizeBs(1,2147483647,null,null)},"JU.BS,~B,~N,~B");h(c$,"setSelectionSet",function(a){this.select(a,!1,0,!0)},"JU.BS");c(c$,"selectBonds",function(a){this.shm.setShapeSizeBs(1,
2147483647,null,a)},"JU.BS");c(c$,"displayAtoms",function(a,b,d,c,g){d&&(a=this.getUndeletedGroupAtomBits(a));b?this.slm.display(this.ms,a,c,g):this.slm.hide(this.ms,a,c,g)},"JU.BS,~B,~B,~N,~B");c(c$,"getUndeletedGroupAtomBits",function(a){a=this.ms.getAtoms(1087373318,a);JU.BSUtil.andNot(a,this.slm.getDeletedAtoms());return a},"JU.BS");c(c$,"reportSelection",function(a){this.ms.getSelectionHaloEnabled()&&this.setTainted(!0);(this.isScriptQueued()||this.g.debugScript)&&this.scriptStatus(a)},"~S");
c(c$,"clearAtomSets",function(){this.setSelectionSubset(null);this.definedAtomSets.clear()});c(c$,"getDefinedAtomSet",function(a){a=this.definedAtomSets.get(a.toLowerCase());return p(a,JU.BS)?a:new JU.BS},"~S");h(c$,"selectAll",function(){this.slm.selectAll(!1)});c(c$,"setNoneSelected",function(a){this.noneSelected=a},"~B");c(c$,"getNoneSelected",function(){return this.noneSelected?Boolean.TRUE:Boolean.FALSE});h(c$,"clearSelection",function(){this.slm.clearSelection(!0);this.g.setB("hideNotSelected",
!1)});c(c$,"setSelectionSubset",function(a){this.slm.setSelectionSubset(a)},"JU.BS");c(c$,"getSelectionSubset",function(){return this.slm.getSelectionSubset()});c(c$,"invertSelection",function(){this.slm.invertSelection()});h(c$,"getSelectedAtoms",function(){return this.bsA()});c(c$,"bsA",function(){return this.slm.getSelectedAtoms()});c(c$,"getSelectedAtomsNoSubset",function(){return this.slm.getSelectedAtomsNoSubset()});c(c$,"isAtomSelected",function(a){return this.slm.isAtomSelected(a)},"~N");
h(c$,"getSelectionCount",function(){return this.slm.getSelectionCount()});c(c$,"setFormalCharges",function(a){this.ms.setFormalCharges(this.bsA(),a)},"~N");h(c$,"addSelectionListener",function(a){this.slm.addListener(a)},"J.api.JmolSelectionListener");h(c$,"removeSelectionListener",function(a){this.slm.addListener(a)},"J.api.JmolSelectionListener");c(c$,"getAtomBitSetEval",function(a,b){return this.allowScripting?this.getScriptManager().getAtomBitSetEval(a,b):new JU.BS},"J.api.JmolScriptEvaluator,~O");
c(c$,"processTwoPointGesture",function(a){this.mouse.processTwoPointGesture(a)},"~A");c(c$,"processMouseEvent",function(a,b,d,c,g){return this.mouse.processEvent(a,b,d,c,g)},"~N,~N,~N,~N,~N");c(c$,"getRubberBandSelection",function(){return this.haveDisplay?this.actionManager.getRubberBand():null});c(c$,"isBound",function(a,b){return this.haveDisplay&&this.actionManager.bnd(a,b)},"~N,~N");c(c$,"getCursorX",function(){return this.haveDisplay?this.actionManager.getCurrentX():0});c(c$,"getCursorY",function(){return this.haveDisplay?
this.actionManager.getCurrentY():0});c(c$,"getDefaultDirectory",function(){return this.g.defaultDirectory});c(c$,"getLocalUrl",function(a){return this.apiPlatform.getLocalUrl(a)},"~S");h(c$,"getBufferedInputStream",function(a){return this.fm.getBufferedInputStream(a)},"~S");c(c$,"getBufferedReaderOrErrorMessageFromName",function(a,b,d){return this.fm.getBufferedReaderOrErrorMessageFromName(a,b,d,!0)},"~S,~A,~B");c(c$,"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);a.put("stateScriptVersionInt",Integer.$valueOf(this.stateScriptVersionInt));if(!a.containsKey("filter")){var d=this.g.defaultLoadFilter;0<d.length&&a.put("filter",d)}d=b&&!this.g.appendNew&&
0<this.getAtomCount();a.put("baseAtomIndex",Integer.$valueOf(b?this.getAtomCount():0));a.put("baseModelIndex",Integer.$valueOf(0==this.getAtomCount()?0:this.getModelCount()+(d?-1:0)));d&&a.put("merging",Boolean.TRUE);return a},"java.util.Map,~B");h(c$,"openFileAsyncSpecial",function(a,b){this.getScriptManager().openFileAsync(a,b)},"~S,~N");h(c$,"openFile",function(a){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint(null,a,null,null)},"~S");h(c$,"openFiles",function(a){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint(null,
null,a,null)},"~A");h(c$,"openReader",function(a,b,d){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint(a,b,null,d)},"~S,~S,java.io.Reader");h(c$,"openDOM",function(a){this.zap(!0,!0,!1);return this.loadModelFromFileRepaint("?","?",null,a)},"~O");c(c$,"loadModelFromFileRepaint",function(a,b,d,c){a=this.loadModelFromFile(a,b,d,c,!1,null,null,null,0,!1);this.refresh(1,"loadModelFromFileRepaint");return a},"~S,~S,~A,~O");c(c$,"loadModelFromFile",function(a,b,d,c,g,f,j,h,l,m){null==f&&(f=this.setLoadParameters(null,
g));m&&f.put("concatenate",Boolean.TRUE);var r=this.fm.getFileInfo();if(null!=d){if(null==j){j=(new JU.SB).append("load files");for(a=0;a<d.length;a++)j.append(0==a||!m?" ":"+").append("/*file*/$FILENAME"+(a+1)+"$")}0<h.length()&&j.append(" /*options*/ ").append(h.toString());a=System.currentTimeMillis();h=this.fm.createAtomSetCollectionFromFiles(d,this.setLoadParameters(f,g),g);a=System.currentTimeMillis()-a;JU.Logger.info("openFiles("+d.length+") "+a+" ms");d=f.get("fullPathNames");m=f.get("fileTypes");
j=j.toString();for(a=0;a<d.length;a++)b=d[a],null!=m&&null!=m[a]&&(b=m[a]+"::"+b),j=JU.PT.rep(j,"$FILENAME"+(a+1)+"$",JU.PT.esc(b.$replace("\\","/")));j=(new JU.SB).append(j)}else null==c?(null==j&&(j=(new JU.SB).append("load /*file*/$FILENAME$")),h=this.openFileFull(b,g,f,j)):h=p(c,java.io.Reader)?this.fm.createAtomSetCollectionFromReader(a,b,c,f):this.fm.createAtomSetCollectionFromDOM(c,f);if(0!=l)return this.fm.setFileInfo(r),this.loadAtomDataAndReturnError(h,l);if(f.containsKey("isData"))return h;
null!=j&&(b=f.get("fullPathName"),null==b&&(b=""),f.containsKey("loadScript")&&(j=f.get("loadScript")),f.put("loadScript",j=(new JU.SB).append(JU.PT.rep(j.toString(),"$FILENAME$",JU.PT.esc(b.$replace("\\","/"))))));return this.createModelSetAndReturnError(h,g,j,f)},"~S,~S,~A,~O,~B,java.util.Map,JU.SB,JU.SB,~N,~B");c(c$,"setLigandModel",function(a,b){null==this.ligandModels&&(this.ligandModels=new java.util.Hashtable);this.ligandModels.put(a,b)},"~S,~S");c(c$,"getLigandModel",function(a,b,d,c){if(null==
a){if(null!=this.ligandModelSet)for(a=this.ligandModels.entrySet().iterator();a.hasNext();){var g=a.next();p(g.getValue(),Boolean)&&a.remove()}return null}var f=b.equals("ligand_");f&&(a=a.toUpperCase());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 j=0<a.indexOf("|");j&&(a=a.substring(a.indexOf("|")+1));var h=null==c?this.ligandModels.get(a):null,g=null;if(p(h,
Boolean))return null;if(null==h&&(null==c||j))h=this.ligandModels.get(a+d);j=!1;if(null==h){if(f){g=this.setLoadFormat("#"+a,"#",!1);if(0==g.length)return null;this.scriptEcho("fetching "+g);h=this.getFileAsString(g,!1)}else h=this.getFileAsString(b,!1),c=null==c?-1:h.indexOf(c),0<=c&&(h=h.substring(0,c));(j=0==h.indexOf("java."))||this.ligandModels.put(a+d,h)}if(!f)return h;!j&&p(h,String)&&(d=h,0!=d.length&&(f=new java.util.Hashtable,f.put("modelOnly",Boolean.TRUE),h=this.getModelAdapter().getAtomSetCollectionReader("ligand",
null,JU.Rdr.getBR(d),f),j=p(h,String),j||(h=this.getModelAdapter().getAtomSetCollection(h),j=p(h,String),null!=g&&!j&&this.scriptEcho(this.getModelAdapter().getAtomSetCollectionAuxiliaryInfo(h).get("modelLoadNote")))));return j?(this.scriptEcho(h.toString()),this.ligandModels.put(a,Boolean.FALSE),null):h},"~S,~S,~S,~S");c(c$,"openFileFull",function(a,b,d,c){if(null==a||0<=a.indexOf("[]"))return null;var g="openFile("+a+")";JU.Logger.startTimer(g);d=this.setLoadParameters(d,b);var f=a.startsWith("@"),
h=d.containsKey("fileData");0==a.indexOf("$")&&d.put("smilesString",a.substring(1));var k=a.equalsIgnoreCase("string")||a.equals("Jmol Model Kit"),l=null;if(h){if(l=d.get("fileData"),d.containsKey("isData"))return this.loadInlineScript(l,"\x00",b,d)}else if(k){l=this.ms.getInlineData(-1);if(null==l)if(this.g.modelKitMode)l="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!=c&&d.put("loadScript",c=(new JU.SB).append(JU.PT.rep(c.toString(),
"$FILENAME$",'data "model inline"\n'+l+'end "model inline"')))}null!=l?(b||this.zap(!0,!1,!1),!f&&(!h||k)&&this.getStateCreator().getInlineData(c,l,b,this.g.defaultLoadFilter),a=this.fm.createAtomSetCollectionFromString(l,d,b)):a=this.fm.createAtomSetCollectionFromFile(a,d,b);JU.Logger.checkTimer(g,!1);return a},"~S,~B,java.util.Map,JU.SB");h(c$,"openStringInline",function(a){a=this.openStringInlineParamsAppend(a,null,!1);this.refresh(1,"openStringInline");return a},"~S");c(c$,"loadInline",function(a){return this.loadInlineScriptRepaint(a,
this.g.inlineNewlineChar,!1)},"~S");c(c$,"loadInline",function(a,b){return this.loadInlineScriptRepaint(a,b,!1)},"~S,~S");h(c$,"loadInlineAppend",function(a,b){return this.loadInlineScriptRepaint(a,"\x00",b)},"~S,~B");c(c$,"loadInlineScriptRepaint",function(a,b,d){a=this.loadInlineScript(a,b,d,null);this.refresh(1,"loadInlineScript");return a},"~S,~S,~B");c(c$,"loadInline",function(a){return this.loadInline(a,!1)},"~A");c(c$,"loadInline",function(a,b){if(null==a||0==a.length)return null;var d=this.openStringsInlineParamsAppend(a,
null,b);this.refresh(1,"loadInline String[]");return d},"~A,~B");c(c$,"loadInline",function(a,b){if(null==a||0==a.size())return null;b||this.zap(!0,!1,!1);for(var d=new JU.Lst,c=0;c<a.size();c++)d.addLast(a.get(c));d=this.fm.createAtomSeCollectionFromArrayData(d,this.setLoadParameters(null,b),b);d=this.createModelSetAndReturnError(d,b,null,null);this.refresh(1,"loadInline");return d},"java.util.List,~B");c(c$,"loadInlineScript",function(a,b,d,c){if(null==a||0==a.length)return null;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="+d);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 f=2;0<=(g=a.indexOf(b,g+1));)f++;var h=Array(f),k=0,l=0;for(g=0;g<f;g++)k=a.indexOf(b,l),0>k&&(k=a.length),h[g]=a.substring(l,k),l=k+b.length;return this.openStringsInlineParamsAppend(h,c,d)}return this.openStringInlineParamsAppend(a,
c,d)},"~S,~S,~B,java.util.Map");c$.fixInlineString=c(c$,"fixInlineString",function(a,b){var d;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 c=0<=a.indexOf("\n"),g=a.length;for(d=0;d<g&&" "==a.charAt(d);++d);d<g&&a.charAt(d)==b&&(a=a.substring(d+1));a=c?JU.PT.rep(a,""+b,""):a.$replace(b,"\n")}return a},"~S,~S");c(c$,"openStringInlineParamsAppend",function(a,b,d){var c=JU.Rdr.getBR(a),c=this.getModelAdapter().getFileTypeName(c);
if(null==c)return"unknown file type";if(c.equals("spt"))return"cannot open script inline";b=this.setLoadParameters(b,d);var c=b.get("loadScript"),g=b.containsKey("isData");null==c&&(c=new JU.SB);d||this.zap(!0,!1,!1);g||this.getStateCreator().getInlineData(c,a,d,this.g.defaultLoadFilter);a=this.fm.createAtomSetCollectionFromString(a,b,d);return this.createModelSetAndReturnError(a,d,c,null)},"~S,java.util.Map,~B");c(c$,"openStringsInlineParamsAppend",function(a,b,d){var c=new JU.SB;d||this.zap(!0,
!1,!1);a=this.fm.createAtomSeCollectionFromStrings(a,c,this.setLoadParameters(b,d),d);return this.createModelSetAndReturnError(a,d,c,null)},"~A,java.util.Map,~B");c(c$,"getInlineChar",function(){return this.g.inlineNewlineChar});c(c$,"getDataSeparator",function(){return this.g.getParameter("dataseparator",!0)});c(c$,"createModelSetAndReturnError",function(a,b,d,c){var g=this.fm.getFullPathName(!1),f=this.fm.getFileName();null==d&&(this.setBooleanProperty("preserveState",!1),d=(new JU.SB).append('load "???"'));
if(p(a,String))return this.setFileLoadStatus(J.c.FIL.NOT_LOADED,g,null,null,a,null),this.displayLoadErrors&&(!b&&!a.equals("#CANCELED#"))&&this.zapMsg(a),a;b?this.clearAtomSets():this.g.modelKitMode&&!f.equals("Jmol Model Kit")&&this.setModelKitMode(!1);this.setFileLoadStatus(J.c.FIL.CREATING_MODELSET,g,f,null,null,null);this.pushHoldRepaintWhy("createModelSet");this.setErrorMessage(null,null);try{var h=new JU.BS;this.mm.createModelSet(g,f,d,a,h,b);if(0<h.cardinality()){var k=this.ms.getInfoM("jmolscript");
this.ms.getMSInfoB("doMinimize")?this.minimize(2147483647,0,h,null,0,!0,!0,!0,!0):this.addHydrogens(h,!1,!0);null!=k&&this.ms.getMSInfo().put("jmolscript",k)}this.initializeModel(b)}catch(l){if(y(l,Error))this.handleError(l,!0),a=this.getShapeErrorState(),a="ERROR creating model: "+l+(0==a.length?"":"|"+a),this.zapMsg(a),this.setErrorMessage(a,null);else throw l;}this.popHoldRepaint("createModelSet \u0001## REPAINT_IGNORE ##");a=this.getErrorMessage();this.setFileLoadStatus(J.c.FIL.CREATED,g,f,this.getModelSetName(),
a,null==c?null:c.get("async"));b&&(this.selectAll(),this.setTainted(!0),this.axesAreTainted=!0);System.gc();return a},"~O,~B,JU.SB,java.util.Map");c(c$,"loadAtomDataAndReturnError",function(a,b){if(p(a,String))return a;this.setErrorMessage(null,null);try{var d=this.mm.createAtomDataSet(a,b);switch(b){case 1146095626:null!=d&&this.runScript(d);break;case 4166:this.setStatusFrameChanged(!0,!0);break;case 1649412120:this.shm.deleteVdwDependentShapes(null)}}catch(c){if(y(c,Error))this.handleError(c,!0),
d=this.getShapeErrorState(),d="ERROR adding atom data: "+c+(0==d.length?"":"|"+d),this.zapMsg(d),this.setErrorMessage(d,null),this.setParallel(!1);else throw c;}return this.getErrorMessage()},"~O,~N");c(c$,"getEmbeddedFileState",function(a,b){return this.fm.getEmbeddedFileState(a,b)},"~S,~B");h(c$,"getFileAsBytes",function(a,b){return this.fm.getFileAsBytes(a,b,!0)},"~S,JU.OC");c(c$,"getCurrentFileAsString",function(){var a=this.getFullPathName(!1);return a.equals("string")||a.equals("Jmol Model Kit")?
this.ms.getInlineData(this.am.cmi):0<=a.indexOf("[]")?a:"JSNode"===a?"<DOM NODE>":this.getFileAsString4(a,-1,!0,!1,!1)});c(c$,"getFullPathName",function(a){return this.fm.getFullPathName(a)},"~B");c(c$,"getFileName",function(){return this.fm.getFileName()});c(c$,"getFullPathNameOrError",function(a){var b=Array(2);this.fm.getFullPathNameOrError(a,!1,b);return b},"~S");h(c$,"getFileAsString",function(a,b){return this.getFileAsString4(a,-1,!1,!1,b)},"~S,~B");c(c$,"getFileAsMap",function(a){return this.fm.getFileAsMap(a)},
"~S");c(c$,"getFileAsString4",function(a,b,d,c,g){if(null==a)return this.getCurrentFileAsString();var f=Array(2);f[0]=a;this.fm.getFileDataOrErrorAsString(f,b,d,c,g);return f[1]},"~S,~N,~B,~B,~B");c(c$,"getFileAsStringBin",function(a,b){return this.fm.getFileDataOrErrorAsString(a,-1,!1,b,!b)},"~A,~B");c(c$,"getFilePath",function(a,b){return this.fm.getFilePath(a,!1,b)},"~S,~B");c(c$,"getFileInfo",function(){return this.fm.getFileInfo()});c(c$,"setFileInfo",function(a){this.fm.setFileInfo(a)},"~A");
c(c$,"autoCalculate",function(a){switch(a){case 1112539151:this.ms.getSurfaceDistanceMax();break;case 1112539150:this.ms.calculateStraightness()}},"~N");c(c$,"calculateStraightness",function(){this.ms.setHaveStraightness(!1);this.ms.calculateStraightness()});c(c$,"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(c$,"getStructureList",function(){return this.g.getStructureList()});c(c$,"setStructureList",function(a,b){this.g.setStructureList(a,b);this.ms.setStructureList(this.getStructureList())},"~A,J.c.STR");c(c$,"getDefaultStructure",function(a,b){null==a&&(a=this.bsA());return this.ms.getDefaultStructure(a,b)},"JU.BS,JU.BS");c(c$,"calculateStructures",function(a,b,d){null==a&&(a=this.bsA());return this.ms.calculateStructures(a,b,!this.am.animationOn,this.g.dsspCalcHydrogen,d)},"JU.BS,~B,~B");c(c$,"getAnnotationParser",
function(){return null==this.annotationParser?this.annotationParser=J.api.Interface.getOption("dssx.AnnotationParser"):this.annotationParser});h(c$,"getSelectedAtomIterator",function(a,b,d,c){return this.ms.getSelectedAtomIterator(a,b,d,!1,c)},"JU.BS,~B,~B,~B");h(c$,"setIteratorForAtom",function(a,b,d){this.ms.setIteratorForAtom(a,-1,b,d,null)},"J.api.AtomIndexIterator,~N,~N");h(c$,"setIteratorForPoint",function(a,b,d,c){this.ms.setIteratorForPoint(a,b,d,c)},"J.api.AtomIndexIterator,~N,JU.T3,~N");
h(c$,"fillAtomData",function(a,b){a.programInfo="Jmol Version "+JV.Viewer.getJmolVersion();a.fileName=this.getFileName();this.ms.fillAtomData(a,b)},"J.atomdata.AtomData,~N");c(c$,"addStateScript",function(a,b,d){return this.ms.addStateScript(a,null,null,null,null,b,d)},"~S,~B,~B");c(c$,"getMinimizer",function(a){return null==this.minimizer&&a?(this.minimizer=J.api.Interface.getInterface("JM.Minimizer")).setProperty("vwr",this):this.minimizer},"~B");c(c$,"getSmilesMatcher",function(){return null==
this.smilesMatcher?this.smilesMatcher=J.api.Interface.getInterface("JS.SmilesMatcher"):this.smilesMatcher});c(c$,"clearModelDependentObjects",function(){this.setFrameOffsets(null);this.stopMinimization();this.smilesMatcher=this.minimizer=null});c(c$,"zap",function(a,b,d){this.clearThreads();null!=this.ms?(this.ligandModelSet=null,this.clearModelDependentObjects(),this.fm.clear(),this.clearRepaintManager(-1),this.am.clear(),this.tm.clear(),this.slm.clear(),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.actionManager.clear()),this.stm.clear(this.g),this.tempArray.clear(),this.chainMap.clear(),this.chainList.clear(),this.cm.clear(),this.definedAtomSets.clear(),null!=this.dm&&this.dm.clear(),b&&(d&&this.g.modelKitMode&&(this.openStringInlineParamsAppend("5\n\nC 0 0 0\nH .63 .63 .63\nH -.63 -.63 .63\nH -.63 .63 -.63\nH .63 -.63 -.63",
null,!0),this.setRotationRadius(5,!0),this.setStringProperty("picking","assignAtom_C"),this.setStringProperty("picking","assignBond_p")),this.undoClear()),System.gc()):this.mm.zap();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(c$,"zapMsg",function(a){this.zap(!0,!0,!1);this.echoMessage(a)},"~S");c(c$,"echoMessage",function(a){this.shm.loadShape(30);this.setShapeProperty(30,
"font",this.getFont3D("SansSerif","Plain",9));this.setShapeProperty(30,"target","error");this.setShapeProperty(30,"text",a)},"~S");c(c$,"initializeModel",function(a){this.clearThreads();a?this.am.initializePointers(1):(this.reset(!0),this.selectAll(),this.rotatePrev1=this.rotateBondIndex=-1,this.noneSelected=this.movingSelected=!1,this.hoverEnabled=!0,this.tm.setCenter(),this.am.initializePointers(1),this.ms.getMSInfoB("isPyMOL")||(this.clearAtomSets(),this.setCurrentModelIndex(0)),this.setBackgroundModelIndex(-1),
this.setFrankOn(this.getShowFrank()),this.startHoverWatcher(!0),this.setTainted(!0),this.finalizeTransformParameters())},"~B");c(c$,"startHoverWatcher",function(a){a&&this.inMotion||(!this.haveDisplay||a&&(!this.hoverEnabled||this.am.animationOn))||this.actionManager.startHoverWatcher(a)},"~B");h(c$,"getModelSetPathName",function(){return this.mm.getModelSetPathName()});h(c$,"getModelSetFileName",function(){return this.mm.getModelSetFileName()});c(c$,"getUnitCellInfoText",function(){var a=this.getCurrentUnitCell();
return null==a?"not applicable":a.getUnitCellInfo()});c(c$,"getUnitCellInfo",function(a){var b=this.getCurrentUnitCell();return null==b?NaN:b.getUnitCellInfoType(a)},"~N");c(c$,"getV0abc",function(a){var b=this.getCurrentUnitCell();return null==b?null:b.getV0abc(a)},"~O");c(c$,"getSymmetryOperation",function(a,b,d,c){return this.ms.getSymTemp(!0).getSymmetryInfoString(this.ms,this.am.cmi,a,b,d,null,c)},"~N,JU.P3,JU.P3,~S");c(c$,"getSpaceGroupInfo",function(a){return this.ms.getSymTemp(!0).getSpaceGroupInfo(this.ms,
-1,a,0,null,null,null,null)},"~S");c(c$,"getPolymerPointsAndVectors",function(a,b){this.ms.getPolymerPointsAndVectors(a,b,this.g.traceAlpha,this.g.sheetSmoothing)},"JU.BS,JU.Lst");h(c$,"getModelSetName",function(){return null==this.ms?null:this.ms.modelSetName});h(c$,"getBondCount",function(){return this.ms.bondCount});h(c$,"haveFrame",function(){return this.haveModelSet()});c(c$,"haveModelSet",function(){return null!=this.ms});c(c$,"getHybridizationAndAxes",function(a,b,d,c){return this.ms.getHybridizationAndAxes(a,
0,b,d,c,!0,!0)},"~N,JU.V3,JU.V3,~S");c(c$,"getAllAtoms",function(){return this.getModelUndeletedAtomsBitSet(-1)});c(c$,"getModelUndeletedAtomsBitSet",function(a){return this.excludeAtoms(this.ms.getModelAtomBitSetIncludingDeleted(a,!0),!1)},"~N");c(c$,"getModelUndeletedAtomsBitSetBs",function(a){return this.excludeAtoms(this.ms.getModelAtomBitSetIncludingDeletedBs(a),!1)},"JU.BS");c(c$,"excludeAtoms",function(a,b){this.slm.excludeAtoms(a,b);return a},"JU.BS,~B");h(c$,"getBoundBoxCenter",function(){return this.ms.getBoundBoxCenter(this.am.cmi)});
c(c$,"calcBoundBoxDimensions",function(a,b){this.ms.calcBoundBoxDimensions(a,b);this.axesAreTainted=!0},"JU.BS,~N");c(c$,"calcRotationRadius",function(a){return this.ms.calcRotationRadius(this.am.cmi,a)},"JU.P3");h(c$,"getBoundBoxCornerVector",function(){return this.ms.getBoundBoxCornerVector()});c(c$,"getBoundBoxCenterX",function(){return q(this.dimScreen.width/2)});c(c$,"getBoundBoxCenterY",function(){return q(this.dimScreen.height/2)});h(c$,"getModelCount",function(){return null==this.ms?0:this.ms.mc});
h(c$,"getModelSetProperties",function(){return this.ms.getMSProperties()});h(c$,"getModelSetAuxiliaryInfo",function(){return this.ms.getMSInfo()});h(c$,"getModelNumber",function(a){return 0>a?a:this.ms.getModelNumber(a)},"~N");c(c$,"getModelFileNumber",function(a){return 0>a?0:this.ms.getModelFileNumber(a)},"~N");h(c$,"getModelNumberDotted",function(a){return 0>a?"0":null==this.ms?null:this.ms.getModelNumberDotted(a)},"~N");h(c$,"getModelName",function(a){return null==this.ms?null:this.ms.getModelName(a)},
"~N");h(c$,"getModelProperties",function(a){return this.ms.getModelProperties(a)},"~N");h(c$,"getModelProperty",function(a,b){return this.ms.getModelProperty(a,b)},"~N,~S");h(c$,"getModelAuxiliaryInfo",function(a){return this.ms.getModelAuxiliaryInfo(a)},"~N");h(c$,"getModelAuxiliaryInfoValue",function(a,b){return this.ms.getInfo(a,b)},"~N,~S");h(c$,"modelGetLastVibrationIndex",function(a,b){return this.ms.getLastVibrationVector(a,b)},"~N,~N");h(c$,"modelHasVibrationVectors",function(a){return 0<=
this.ms.getLastVibrationVector(a,4166)},"~N");h(c$,"getChainCount",function(){return this.ms.getChainCount(!0)});h(c$,"getChainCountInModel",function(a){return this.ms.getChainCountInModelWater(a,!1)},"~N");h(c$,"getGroupCount",function(){return this.ms.getGroupCount()});h(c$,"getGroupCountInModel",function(a){return this.ms.getGroupCountInModel(a)},"~N");h(c$,"getPolymerCount",function(){return this.ms.getBioPolymerCount()});h(c$,"getPolymerCountInModel",function(a){return this.ms.getBioPolymerCountInModel(a)},
"~N");h(c$,"getAtomCount",function(){return this.ms.getAtomCount()});h(c$,"getAtomCountInModel",function(a){return this.ms.getAtomCountInModel(a)},"~N");h(c$,"getBondCountInModel",function(a){return this.ms.getBondCountInModel(a)},"~N");c(c$,"getBondsForSelectedAtoms",function(a){return this.ms.getBondsForSelectedAtoms(a,this.g.bondModeOr||1==JU.BSUtil.cardinalityOf(a))},"JU.BS");c(c$,"frankClicked",function(a,b){return!this.g.disablePopupMenu&&this.getShowFrank()&&this.shm.checkFrankclicked(a,b)},
"~N,~N");c(c$,"frankClickedModelKit",function(a,b){return!this.g.disablePopupMenu&&this.g.modelKitMode&&0<=a&&0<=b&&40>a&&80>b},"~N,~N");h(c$,"findNearestAtomIndex",function(a,b){return this.findNearestAtomIndexMovable(a,b,!1)},"~N,~N");c(c$,"findNearestAtomIndexMovable",function(a,b,d){return null==this.ms||!this.g.atomPicking?-1:this.ms.findNearestAtomIndex(a,b,d?this.slm.getMotionFixedAtoms():null,this.g.minPixelSelRadius)},"~N,~N,~B");c(c$,"toCartesian",function(a,b){var d=this.getCurrentUnitCell();
null!=d&&d.toCartesian(a,b)},"JU.P3,~B");c(c$,"toFractional",function(a,b){var d=this.getCurrentUnitCell();null!=d&&d.toFractional(a,b)},"JU.T3,~B");c(c$,"toUnitCell",function(a,b){var d=this.getCurrentUnitCell();null!=d&&d.toUnitCell(a,b)},"JU.P3,JU.P3");c(c$,"setCurrentCage",function(a){a=[a,null];this.shm.getShapePropertyData(24,"unitCell",a);this.ms.setModelCage(this.am.cmi,a[1])},"~S");c(c$,"setCurrentCagePts",function(a,b){try{this.ms.setModelCage(this.am.cmi,null==a?null:J.api.Interface.getSymmetry().getUnitCell(a,
!1,b))}catch(d){if(!y(d,Exception))throw d;}},"~A,~S");c(c$,"addUnitCellOffset",function(a){var b=this.getCurrentUnitCell();null!=b&&a.add(b.getCartesianOffset())},"JU.P3");c(c$,"setAtomData",function(a,b,d,c){this.ms.setAtomData(a,b,d,c);2==a&&this.checkCoordinatesChanged();this.refreshMeasures(!0)},"~N,~S,~S,~B");h(c$,"setCenterSelected",function(){this.setCenterBitSet(this.bsA(),!0)});c(c$,"setApplySymmetryToBonds",function(a){this.g.applySymmetryToBonds=a},"~B");h(c$,"setBondTolerance",function(a){this.g.setF("bondTolerance",
a);this.g.bondTolerance=a},"~N");h(c$,"setMinBondDistance",function(a){this.g.setF("minBondDistance",a);this.g.minBondDistance=a},"~N");c(c$,"getAtomsNearPt",function(a,b){var d=new JU.BS;this.ms.getAtomsWithin(a,b,d,-1);return d},"~N,JU.P3");c(c$,"getBranchBitSet",function(a,b,d){return 0>a||a>=this.getAtomCount()?new JU.BS:JU.JmolMolecule.getBranchBitSet(this.ms.at,a,this.getModelUndeletedAtomsBitSet(this.ms.at[a].mi),null,b,d,!0)},"~N,~N,~B");c(c$,"getAtomIndexFromAtomNumber",function(a){return this.ms.getAtomIndexFromAtomNumber(a,
this.getVisibleFramesBitSet())},"~N");h(c$,"getElementsPresentBitSet",function(a){return this.ms.getElementsPresentBitSet(a)},"~N");h(c$,"getHeteroList",function(a){return this.ms.getHeteroList(a)},"~N");c(c$,"getFileHeader",function(){return this.ms.getFileHeader(this.am.cmi)});c(c$,"getFileData",function(){return this.ms.getFileData(this.am.cmi)});c(c$,"getCifData",function(a){a=this.getModelFileName(a);a=this.getFileAsString(a,!1);return null==a?null:JU.Rdr.readCifData(JU.Rdr.getBR(a))},"~N");
c(c$,"getPDBHeader",function(){return this.ms.getPDBHeader(this.am.cmi)});c(c$,"getStateCreator",function(){null==this.jsc&&(this.jsc=J.api.Interface.getInterface("JV.StateCreator")).setViewer(this);return this.jsc});c(c$,"getWrappedStateScript",function(){return this.getOutputManager().getWrappedState(null,null,null,null)});h(c$,"getStateInfo",function(){return this.getStateInfo3(null,0,0)});c(c$,"getStateInfo3",function(a,b,d){return this.g.preserveState?this.getStateCreator().getStateScript(a,
b,d):""},"~S,~N,~N");c(c$,"getStructureState",function(){return this.getStateCreator().getModelState(null,!1,!0)});c(c$,"getProteinStructureState",function(){return this.ms.getProteinStructureState(this.bsA(),!1,!1,3)});c(c$,"getCoordinateState",function(a){return this.getStateCreator().getAtomicPropertyState(2,a)},"JU.BS");c(c$,"setCurrentColorRange",function(a){var b=this.getDataFloat(a);a=null==b?null:this.getDataManager().getData(a)[2];null!=a&&this.g.rangeSelected&&a.and(this.bsA());this.cm.setPropertyColorRangeData(b,
a)},"~S");c(c$,"setData",function(a,b,d,c,g,f,h){this.getDataManager().setData(a,b,d,this.getAtomCount(),c,g,f,h)},"~S,~A,~N,~N,~N,~N,~N");c(c$,"getData",function(a){return this.getDataManager().getData(a)},"~S");c(c$,"getDataFloat",function(a){return this.getDataManager().getDataFloatA(a)},"~S");c(c$,"getDataFloat2D",function(a){return this.getDataManager().getDataFloat2D(a)},"~S");c(c$,"getDataFloat3D",function(a){return this.getDataManager().getDataFloat3D(a)},"~S");c(c$,"getDataFloatAt",function(a,
b){return this.getDataManager().getDataFloat(a,b)},"~S,~N");h(c$,"getAltLocListInModel",function(a){return this.ms.getAltLocListInModel(a)},"~N");c(c$,"getConformation",function(a,b,d){return this.ms.getConformation(a,b,d)},"~N,~N,~B");c(c$,"autoHbond",function(a,b,d){null==a&&(a=b=this.bsA());return this.ms.autoHbond(a,b,d)},"JU.BS,JU.BS,~B");h(c$,"havePartialCharges",function(){return null!=this.ms.getPartialCharges()});c(c$,"getCurrentUnitCell",function(){if(0<=this.am.cai)return this.ms.getUnitCellForAtom(this.am.cai);
var a=this.am.cmi;if(0<=a)return this.ms.getUnitCell(a);for(var a=this.getVisibleFramesBitSet(),b=null,d=a.nextSetBit(0);0<=d;d=a.nextSetBit(d+1)){var c=this.ms.getUnitCell(d);if(null!=c)if(null==b)b=c;else if(!b.unitCellEquals(c))return null}return b});c(c$,"getModelUnitCell",function(a){return this.ms.getUnitCell(a)},"~N");c(c$,"getDefaultMeasurementLabel",function(a){switch(a){case 2:return this.g.defaultDistanceLabel;case 3:return this.g.defaultAngleLabel;default:return this.g.defaultTorsionLabel}},
"~N");h(c$,"getMeasurementCount",function(){var a=this.getShapePropertyAsInt(6,"count");return 0>=a?0:a});h(c$,"getMeasurementStringValue",function(a){return""+this.shm.getShapePropertyIndex(6,"stringValue",a)},"~N");c(c$,"getMeasurementInfoAsString",function(){return this.getShapeProperty(6,"infostring")});h(c$,"getMeasurementCountPlusIndices",function(a){return this.shm.getShapePropertyIndex(6,"countPlusIndices",a)},"~N");c(c$,"setPendingMeasurement",function(a){this.shm.loadShape(6);this.setShapeProperty(6,
"pending",a)},"JM.MeasurementPending");c(c$,"getPendingMeasurement",function(){return this.getShapeProperty(6,"pending")});c(c$,"clearAllMeasurements",function(){this.setShapeProperty(6,"clear",null)});h(c$,"clearMeasurements",function(){this.evalString("measures delete")});c(c$,"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 1073742126:this.am.rewindAnimation();break;case 1073741993:this.am.setAnimationLast()}},"~N");h(c$,"setAnimationFps",function(a){this.am.setAnimationFps(a)},"~N");c(c$,"setAnimationMode",function(a){a.equalsIgnoreCase("once")?this.am.setAnimationReplayMode(J.c.ANIM.ONCE,0,0):a.equalsIgnoreCase("loop")?this.am.setAnimationReplayMode(J.c.ANIM.LOOP,1,1):a.startsWith("pal")&&
this.am.setAnimationReplayMode(J.c.ANIM.PALINDROME,1,1)},"~S");c(c$,"setAnimationOn",function(a){a!=this.am.animationOn&&this.am.setAnimationOn(a)},"~B");c(c$,"setAnimationRange",function(a,b){this.am.setAnimationRange(a,b)},"~N,~N");h(c$,"getVisibleFramesBitSet",function(){return this.ms.selectDisplayedTrajectories(JU.BSUtil.copy(this.am.bsVisibleModels))});c(c$,"defineAtomSets",function(a){this.definedAtomSets.putAll(a)},"java.util.Map");c(c$,"setAnimDisplay",function(a){this.am.setDisplay(a);this.am.animationOn||
this.am.morph(this.am.currentMorphModel+1)},"JU.BS");c(c$,"setCurrentModelIndex",function(a){-2147483648==a?(this.prevFrame=-2147483648,this.setCurrentModelIndexClear(this.am.cmi,!0)):this.am.setModel(a,!0)},"~N");c(c$,"getTrajectoryState",function(){return this.getStateCreator().getTrajectoryState()});c(c$,"setFrameOffsets",function(a){this.bsFrameOffsets=a;this.tm.setFrameOffsets(this.frameOffsets=this.ms.getFrameOffsets(this.bsFrameOffsets))},"JU.BS");c(c$,"getFrameOffsets",function(){return this.bsFrameOffsets});
c(c$,"setCurrentModelIndexClear",function(a,b){this.am.setModel(a,b)},"~N,~B");h(c$,"getDisplayModelIndex",function(){return this.am.cmi});c(c$,"haveFileSet",function(){return 1<this.getModelCount()&&2E6<this.getModelNumber(2147483647)});c(c$,"setBackgroundModelIndex",function(a){this.am.setBackgroundModelIndex(a);this.g.setO("backgroundModel",this.ms.getModelNumberDotted(a))},"~N");c(c$,"setFrameVariables",function(){this.g.setO("animationMode",this.am.animationReplayMode.name());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(c$,"getInMotion",function(a){return this.inMotion||a&&this.am.animationOn},"~B");h(c$,"getMotionEventNumber",function(){return this.motionEventNumber});h(c$,"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(c$,"setRefreshing",function(a){this.refreshing=a},"~B");c(c$,"getRefreshing",function(){return this.refreshing});h(c$,"pushHoldRepaint",function(){this.pushHoldRepaintWhy(null)});c(c$,"pushHoldRepaintWhy",function(a){null!=this.rm&&this.rm.pushHoldRepaint(a)},"~S");h(c$,"popHoldRepaint",function(a){null!=this.rm&&this.rm.popHoldRepaint(0>a.indexOf("\u0001## REPAINT_IGNORE ##"),
a)},"~S");h(c$,"refresh",function(a,b){if(null!=this.rm&&this.refreshing&&!(6==a&&this.getInMotion(!0))){if(this.isWebGL){if(2==a||7==a){this.tm.finalizeTransformParameters();if(!this.applet)return;this.html5Applet._refresh()}}else 0<a&&7!=a&&this.rm.repaintIfReady("refresh "+a+" "+b);7!=a&&0!=a%3&&this.sm.doSync()&&this.sm.setSync(2==a?b:null)}},"~N,~S");c(c$,"requestRepaintAndWait",function(a){this.haveDisplay&&null!=this.rm&&(this.rm.requestRepaintAndWait(a),this.setSync())},"~S");c(c$,"clearShapeRenderers",
function(){this.clearRepaintManager(-1)});c(c$,"isRepaintPending",function(){return null==this.rm?!1:this.rm.isRepaintPending()});h(c$,"notifyViewerRepaintDone",function(){null!=this.rm&&this.rm.repaintDone();this.am.repaintDone()});c(c$,"areAxesTainted",function(){var a=this.axesAreTainted;this.axesAreTainted=!1;return a});c(c$,"setMaximumSize",function(a){this.maximumSize=Math.max(a,100)},"~N");h(c$,"setScreenDimension",function(a,b){b=Math.min(b,this.maximumSize);a=Math.min(a,this.maximumSize);
this.isStereoDouble()&&(a=q((a+1)/2));this.dimScreen.width==a&&this.dimScreen.height==b||this.resizeImage(a,b,!1,!1,!0)},"~N,~N");c(c$,"setStereo",function(a,b){this.isStereoSlave=a;this.gRight=b},"~B,~O");c(c$,"getImageFontScaling",function(){return this.imageFontScaling});c(c$,"resizeImage",function(a,b,d,c,g){if(d||!this.creatingImage)!c&&!d&&this.setShapeProperty(5,"clearBoxes",null),this.antialiased=g?this.g.antialiasDisplay&&this.checkMotionRendering(603979786):d&&!c?this.g.antialiasImages:
!1,this.imageFontScaling=(g||0>=a?1:q((this.g.zoomLarge==b>a?b:a)/this.getScreenDim()))*(this.antialiased?2:1),0<a?(this.dimScreen.width=a,this.dimScreen.height=b,d||(this.g.setI("_width",a),this.g.setI("_height",b))):(a=0==this.dimScreen.width?this.dimScreen.width=500:this.dimScreen.width,b=0==this.dimScreen.height?this.dimScreen.height=500:this.dimScreen.height),this.tm.setScreenParameters(a,b,d||g?this.g.zoomLarge:!1,this.antialiased,!1,!1),this.gdata.setWindowParameters(a,b,this.antialiased),
0<a&&!d&&this.setStatusResized(a,b)},"~N,~N,~B,~B,~B");h(c$,"getScreenWidth",function(){return this.dimScreen.width});h(c$,"getScreenHeight",function(){return this.dimScreen.height});c(c$,"getScreenDim",function(){return this.g.zoomLarge==this.dimScreen.height>this.dimScreen.width?this.dimScreen.height:this.dimScreen.width});h(c$,"generateOutputForExport",function(a){return this.$noGraphicsAllowed||null==this.rm?null:this.getOutputManager().getOutputFromExport(a)},"java.util.Map");c(c$,"clearRepaintManager",
function(a){null!=this.rm&&this.rm.clear(a)},"~N");c(c$,"renderScreenImageStereo",function(a,b,d,c){this.updateWindow(d,c)&&(!b||null==this.gRight?this.getScreenImageBuffer(a,!1):(this.render1(this.gRight,this.getImage(!0,!1),0,0),this.render1(a,this.getImage(!1,!1),0,0)));null!=this.captureParams&&Boolean.FALSE!==this.captureParams.get("captureEnabled")&&(System.currentTimeMillis()+50>this.captureParams.get("endTime").longValue()&&this.captureParams.put("captureMode","end"),this.processWriteOrCapture(this.captureParams));
this.notifyViewerRepaintDone()},"~O,~B,~N,~N");c(c$,"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(c$,"updateJSView",function(a,b){var d=this.html5Applet;d&&null!=d._viewSet&&d._atomPickedCallback(a,b)},"~N,~N");c(c$,"updateWindow",function(a,b){if(!this.refreshing||
this.creatingImage)return!1;(this.isTainted||this.tm.slabEnabled)&&this.setModelVisibility();this.isTainted=!1;null!=this.rm&&0!=a&&this.setScreenDimension(a,b);return!0},"~N,~N");c(c$,"renderScreenImage",function(a,b,d){this.renderScreenImageStereo(a,!1,b,d)},"~O,~N,~N");c(c$,"getImage",function(a,b){if(this.isWebGL)return null;var d=null;try{this.beginRendering(a,b),this.render(),this.gdata.endRendering(),d=this.gdata.getScreenImage(b)}catch(c){if(y(c,Error))this.gdata.getScreenImage(b),this.handleError(c,
!1),this.setErrorMessage("Error during rendering: "+c,null);else throw c;}return d},"~B,~B");c(c$,"beginRendering",function(a,b){this.gdata.beginRendering(this.tm.getStereoRotationMatrix(a),this.g.translucent,b,!this.checkMotionRendering(603979967))},"~B,~B");c(c$,"render",function(){if(!(null==this.ms||!this.mustRender||!this.refreshing&&!this.creatingImage||null==this.rm)){var a=this.antialiased&&this.g.antialiasTranslucent;this.finalizeTransformParameters();var b=this.shm.finalizeAtoms(this.tm.bsSelectedAtoms,
this.tm.ptOffset);this.tm.bsSelectedAtoms=null;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(c$,"render1",function(a,b,d,c){null!=a&&null!=b&&this.apiPlatform.drawImage(a,b,d,c,this.dimScreen.width,this.dimScreen.height);this.gdata.releaseScreenImage()},"~O,~O,~N,~N");
h(c$,"getScreenImageBuffer",function(a,b){if(this.isWebGL)return null;var d=null==a&&this.isStereoDouble(),c;this.tm.stereoMode.isBiColor()?(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),c=this.gdata.getScreenImage(b)):c=this.getImage(this.isStereoDouble(),b);var g=null;d&&(g=this.apiPlatform.newBufferedImage(c,
this.dimScreen.width<<1,this.dimScreen.height),a=this.apiPlatform.getGraphics(g));null!=a&&(this.isStereoDouble()&&(this.render1(a,c,this.dimScreen.width,0),c=this.getImage(!1,!1)),this.render1(a,c,0,0));return d?g:c},"~O,~B");h(c$,"getImageAsBytes",function(a,b,d,c,g){return this.isWebGL?null:this.getOutputManager().getImageAsBytes(a,b,d,c,g)},"~S,~N,~N,~N,~A");h(c$,"releaseScreenImage",function(){this.gdata.releaseScreenImage()});h(c$,"evalFile",function(a){return this.allowScripting&&null!=this.getScriptManager()?
this.scm.evalFile(a):null},"~S");c(c$,"getInsertedCommand",function(){var a=this.insertedCommand;this.insertedCommand="";JU.Logger.debugging&&""!==a&&JU.Logger.debug("inserting: "+a);return a});h(c$,"script",function(a){return this.evalStringQuietSync(a,!1,!0)},"~S");h(c$,"evalString",function(a){return this.evalStringQuietSync(a,!1,!0)},"~S");h(c$,"evalStringQuiet",function(a){return this.evalStringQuietSync(a,!0,!0)},"~S");c(c$,"evalStringQuietSync",function(a,b,d){return null==this.getScriptManager()?
null:this.scm.evalStringQuietSync(a,b,d)},"~S,~B,~B");c(c$,"clearScriptQueue",function(){null!=this.scm&&this.scm.clearQueue()});c(c$,"setScriptQueue",function(a){(this.g.useScriptQueue=a)||this.clearScriptQueue()},"~B");h(c$,"checkHalt",function(a,b){return null!=this.scm&&this.scm.checkHalt(a,b)},"~S,~B");h(c$,"scriptWait",function(a){return this.evalWait("JSON",a,"+scriptStarted,+scriptStatus,+scriptEcho,+scriptTerminated")},"~S");h(c$,"scriptWaitStatus",function(a,b){return this.evalWait("object",
a,b)},"~S,~S");c(c$,"evalWait",function(a,b,d){if(null==this.getScriptManager())return null;this.scm.waitForQueue();var c=J.i18n.GT.setDoTranslate(!1);a=this.evalStringWaitStatusQueued(a,b,d,!1,!1,!1);J.i18n.GT.setDoTranslate(c);return a},"~S,~S,~S");c(c$,"evalStringWaitStatusQueued",function(a,b,d,c,g,f){return 0==b.indexOf("JSCONSOLE")?(this.html5Applet._showInfo(0>b.indexOf("CLOSE")),0<=b.indexOf("CLEAR")&&this.html5Applet._clearConsole(),null):null==this.getScriptManager()?null:this.scm.evalStringWaitStatusQueued(a,
b,d,c,g,f)},"~S,~S,~S,~B,~B,~B");c(c$,"exitJmol",function(){if(!this.$isApplet||this.isJNLP){if(null!=this.headlessImageParams)try{this.isHeadless()&&this.outputToFile(this.headlessImageParams)}catch(a){if(!y(a,Exception))throw a;}JU.Logger.debugging&&JU.Logger.debug("exitJmol -- exiting");System.out.flush();System.exit(0)}});c(c$,"scriptCheckRet",function(a,b){return null==this.getScriptManager()?null:this.scm.scriptCheckRet(a,b)},"~S,~B");h(c$,"scriptCheck",function(a){return null==this.getScriptManager()?
null:this.scriptCheckRet(a,!1)},"~S");h(c$,"isScriptExecuting",function(){return null!=this.eval&&this.eval.isExecuting()});h(c$,"haltScriptExecution",function(){null!=this.eval&&(this.eval.haltExecution(),this.eval.stopScriptThreads());this.setStringPropertyTok("pathForAllFiles",545259571,"");this.clearTimeouts()});c(c$,"pauseScriptExecution",function(){null!=this.eval&&this.eval.pauseExecution(!0)});c(c$,"resolveDatabaseFormat",function(a){JV.Viewer.hasDatabasePrefix(a)&&(a=this.setLoadFormat(a,
a.charAt(0),!1));return a},"~S");c$.isDatabaseCode=c(c$,"isDatabaseCode",function(a){return"*"==a||"$"==a||"="==a||":"==a},"~S");c$.hasDatabasePrefix=c(c$,"hasDatabasePrefix",function(a){return 0!=a.length&&JV.Viewer.isDatabaseCode(a.charAt(0))},"~S");c(c$,"setLoadFormat",function(a,b,d){var c=a.substring(1);switch(b){case "=":if(a.startsWith("=="))c=c.substring(1),b="#";else if(0<c.indexOf("/"))try{var g=c.indexOf("/"),f=c.substring(0,g),c=this.g.resolveDataBase(f,c.substring(g+1));return null==
c?a:c}catch(h){if(y(h,Exception))return a;throw h;}case "#":return a="="==b?this.g.loadFormat:this.g.loadLigandFormat,0<c.indexOf(".")&&0<=a.indexOf("%FILE.")&&(a=a.substring(0,a.indexOf("%FILE")+5)),JU.Txt.formatStringS(a,"FILE",c);case "*":return a.startsWith("*dom/")?(g=a.lastIndexOf("/"),c=a.substring(g+1),a=4<g?a.substring(5):"mappings",JU.PT.rep(this.g.resolveDataBase("map",c),"%TYPE",a)):a.startsWith("*val/")?(d=a.lastIndexOf("/"),c=a.substring(d+1),a=4<d?a.substring(5):"validation/outliers/all",
JU.PT.rep(this.g.resolveDataBase("map",c),"%TYPE",a)):this.g.resolveDataBase("pdbe",c);case ":":a=this.g.pubChemFormat;if(c.equals(""))try{c="smiles:"+this.getSmiles(this.bsA())}catch(k){if(!y(k,Exception))throw k;}d=c.toLowerCase();b=-2147483648;try{b=Integer.parseInt(c)}catch(l){if(!y(l,Exception))throw l;}-2147483648!=b?c="cid/"+b:d.startsWith("smiles:")?(a+="?POST?smiles="+c.substring(7),c="smiles"):c.startsWith("cid:")||c.startsWith("inchikey:")||c.startsWith("cas:")?c=c.$replace(":","/"):(d.startsWith("name:")&&
(c=c.substring(5)),c="name/"+JU.PT.escapeUrl(c));return JU.Txt.formatStringS(a,"FILE",c);case "$":if(a.startsWith("$$"))return c=c.substring(1),a=JU.PT.rep(this.g.smilesUrlFormat,"&get3d=True",""),JU.Txt.formatStringS(a,"FILE",JU.PT.escapeUrl(c));if(a.equals("$"))try{c=this.getSmiles(this.bsA())}catch(m){if(!y(m,Exception))throw m;}case "N":case "2":case "I":case "K":case "S":case "T":case "/":c=JU.PT.escapeUrl(c);switch(b){case "N":a=this.g.nihResolverFormat+"/names";break;case "2":a=this.g.nihResolverFormat+
"/image";break;case "I":a=this.g.nihResolverFormat+"/stdinchi";break;case "K":a=this.g.nihResolverFormat+"/inchikey";break;case "S":a=this.g.nihResolverFormat+"/stdinchikey";break;case "T":a=this.g.nihResolverFormat+"/stdinchi";break;case "/":a=this.g.nihResolverFormat+"/";break;default:a=this.g.smilesUrlFormat}return(d?"MOL3D::":"")+JU.Txt.formatStringS(a,"FILE",c);case "_":return a=JV.FileManager.fixFileNameVariables(this.g.edsUrlFormat,c),c=JV.FileManager.fixFileNameVariables(this.g.edsUrlCutoff,
c),[a,c]}return c},"~S,~S,~B");c(c$,"getElectronDensityLoadInfo",function(){return[this.g.edsUrlFormat,this.g.edsUrlCutoff,this.g.edsUrlOptions]});c(c$,"getStandardLabelFormat",function(a){switch(a){default:case 0:return"%[identify]";case 1:return this.g.defaultLabelXYZ;case 2:return this.g.defaultLabelPDB}},"~N");c(c$,"getAdditionalHydrogens",function(a,b,d,c){null==a&&(a=this.bsA());var g=D(1,0);a=this.ms.calculateHydrogens(a,g,b,d,c);g=Array(g[0]);for(d=b=0;b<a.length;b++)if(null!=a[b])for(c=0;c<
a[b].length;c++)g[d++]=a[b][c];return g},"JU.BS,~B,~B,JU.Lst");h(c$,"setMarBond",function(a){this.g.bondRadiusMilliAngstroms=a;this.g.setI("bondRadiusMilliAngstroms",a);this.setShapeSize(1,2*a,JU.BSUtil.setAll(this.getAtomCount()))},"~N");c(c$,"setHoverLabel",function(a){this.shm.loadShape(34);this.setShapeProperty(34,"label",a);(this.hoverEnabled=null!=a)||this.startHoverWatcher(!1)},"~S");c(c$,"hoverOn",function(a,b){this.setStatusAtomHovered(a,this.getAtomInfoXYZ(a,!1));if(this.hoverEnabled)if(this.g.modelKitMode)this.isAtomAssignable(a)&&
this.highlight(JU.BSUtil.newAndSetBit(a)),this.refresh(3,"hover on atom");else if(!(null!=this.eval&&this.isScriptExecuting()||a==this.hoverAtomIndex||0==this.g.hoverDelayMs)&&this.slm.isInSelectionSubset(a))this.shm.loadShape(34),b&&this.ms.at[a].isVisible(512)&&this.setShapeProperty(34,"specialLabel",J.i18n.GT._("Drag to move label")),this.setShapeProperty(34,"text",null),this.setShapeProperty(34,"target",Integer.$valueOf(a)),this.hoverText=null,this.hoverAtomIndex=a,this.refresh(3,"hover on atom")},
"~N,~B");c(c$,"hoverOnPt",function(a,b,d,c,g){this.hoverEnabled&&!(null!=this.eval&&this.isScriptExecuting())&&(this.shm.loadShape(34),this.setShapeProperty(34,"xy",JU.P3i.new3(a,b,0)),this.setShapeProperty(34,"target",null),this.setShapeProperty(34,"specialLabel",null),this.setShapeProperty(34,"text",d),this.hoverAtomIndex=-1,this.hoverText=d,null!=c&&null!=g&&this.setStatusObjectHovered(c,d,g),this.refresh(3,"hover on point"))},"~N,~N,~S,~S,JU.T3");c(c$,"hoverOff",function(){try{if(this.g.modelKitMode&&
this.highlight(null),this.hoverEnabled){var a=null!=this.hoverText||0<=this.hoverAtomIndex;0<=this.hoverAtomIndex&&(this.setShapeProperty(34,"target",null),this.hoverAtomIndex=-1);null!=this.hoverText&&(this.setShapeProperty(34,"text",null),this.hoverText=null);this.setShapeProperty(34,"specialLabel",null);a&&this.refresh(3,"hover off")}}catch(b){if(!y(b,Exception))throw b;}});h(c$,"setDebugScript",function(a){this.g.debugScript=a;this.g.setB("debugScript",a);null!=this.eval&&this.eval.setDebugging()},
"~B");c(c$,"clearClickCount",function(){this.setTainted(!0)});c(c$,"setCursor",function(a){if(!this.$isKiosk&&!(this.currentCursor==a||this.multiTouch||!this.haveDisplay))this.apiPlatform.setCursor(this.currentCursor=a,this.display)},"~N");c(c$,"setPickingMode",function(a,b){if(this.haveDisplay){this.showSelected=!1;var d=null;if(null!=a){var c=a.indexOf("_");0<=c&&(d=a.substring(c+1),a=a.substring(0,c));b=JV.ActionManager.getPickingMode(a)}0>b&&(b=1);this.actionManager.setPickingMode(b);this.g.setO("picking",
JV.ActionManager.getPickingModeName(this.actionManager.getAtomPickingMode()));if(!(null==d||0==d.length))switch(d=Character.toUpperCase(d.charAt(0))+(1==d.length?"":d.substring(1,2)),b){case 32:this.setAtomPickingOption(d);break;case 33:this.setBondPickingOption(d);break;default:JU.Logger.error("Bad picking mode: "+a+"_"+d)}}},"~S,~N");c(c$,"getPickingMode",function(){return this.haveDisplay?this.actionManager.getAtomPickingMode():0});c(c$,"setPickingStyle",function(a,b){this.haveDisplay&&(null!=
a&&(b=JV.ActionManager.getPickingStyleIndex(a)),0>b&&(b=0),this.actionManager.setPickingStyle(b),this.g.setO("pickingStyle",JV.ActionManager.getPickingStyleName(this.actionManager.getPickingStyle())))},"~S,~N");c(c$,"getDrawHover",function(){return this.haveDisplay&&this.g.drawHover});h(c$,"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(c$,"getAtomInfoXYZ",function(a,
b){null==this.ptTemp&&(this.ptTemp=new JU.P3);return this.ms.getAtomInfoXYZ(a,b,this.ptTemp)},"~N,~B");c(c$,"setSync",function(){this.sm.doSync()&&this.sm.setSync(null)});h(c$,"setJmolCallbackListener",function(a){this.sm.setJmolCallbackListener(a)},"J.api.JmolCallbackListener");h(c$,"setJmolStatusListener",function(a){this.sm.setJmolStatusListener(a,null)},"J.api.JmolStatusListener");c(c$,"getStatusChanged",function(a){return null==a?null:this.sm.getStatusChanged(a)},"~S");c(c$,"menuEnabled",function(){return!this.g.disablePopupMenu&&
null!=this.getPopupMenu()});c(c$,"popupMenu",function(a,b,d){if(this.haveDisplay&&this.refreshing&&!this.$isPreviewOnly&&!this.g.disablePopupMenu)switch(d){case "j":try{this.getPopupMenu(),this.jmolpopup.jpiShow(a,b)}catch(c){JU.Logger.info(c.toString()),this.g.disablePopupMenu=!0}break;case "a":case "b":case "m":if(null==this.modelkitPopup&&null==(this.modelkitPopup=this.apiPlatform.getMenuPopup(null,d)))break;this.modelkitPopup.jpiShow(a,b)}},"~N,~N,~S");c(c$,"getMenu",function(a){this.getPopupMenu();
return a.equals("\x00")?(this.popupMenu(this.dimScreen.width-120,0,"j"),"OK"):null==this.jmolpopup?"":this.jmolpopup.jpiGetMenuAsString("Jmol version "+JV.Viewer.getJmolVersion()+"|_GET_MENU|"+a)},"~S");c(c$,"getPopupMenu",function(){return null==this.jmolpopup&&(this.jmolpopup=this.allowScripting?this.apiPlatform.getMenuPopup(this.menuStructure,"j"):null,null==this.jmolpopup)?(this.g.disablePopupMenu=!0,null):this.jmolpopup.jpiGetMenuAsObject()});h(c$,"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.getFileAsString(a,!1));this.getProperty("DATA_API","setMenu",a);this.sm.setCallbackFunction("menu",a)},"~S,~B");c(c$,"setStatusFrameChanged",function(a){a&&(this.prevFrame=-2147483648);this.tm.setVibrationPeriod(NaN);var b=this.am.firstFrameIndex,d=this.am.lastFrameIndex,c=this.am.isMovie;a=this.am.cmi;b==d&&!c&&(a=b);var g=this.getModelFileNumber(a),f=this.am.cmi,h=g,k=g%1E6,l=c?b:this.getModelFileNumber(b),m=c?d:this.getModelFileNumber(d),
r;c?r=""+(f+1):0==h?(r=this.getModelNumberDotted(b),b!=d&&(r+=" - "+this.getModelNumberDotted(d)),q(l/1E6)==q(m/1E6)&&(h=l)):r=this.getModelNumberDotted(a);0!=h&&(h=1E6>h?1:q(h/1E6));c||(this.g.setI("_currentFileNumber",h),this.g.setI("_currentModelNumberInFile",k));b=this.am.currentMorphModel;this.g.setI("_currentFrame",f);this.g.setI("_morphCount",this.am.morphCount);this.g.setF("_currentMorphFrame",b);this.g.setI("_frameID",g);this.g.setO("_modelNumber",r);this.g.setO("_modelName",0>a?"":this.getModelName(a));
g=0>a?"":this.getModelTitle(a);this.g.setO("_modelTitle",null==g?"":g);this.g.setO("_modelFile",0>a?"":this.ms.getModelFileName(a));this.g.setO("_modelType",0>a?"":this.ms.getModelFileType(a));f==this.prevFrame&&b==this.prevMorphModel||(this.prevFrame=f,this.prevMorphModel=b,c?c=""+(f+1):(c=this.getModelName(f),g=""+this.getModelNumberDotted(f),c.equals(g)||(c=g+": "+c),50<c.length&&(c=c.substring(0,45)+"...")),this.sm.setStatusFrameChanged(h,k,0>this.am.animationDirection?-l:l,0>this.am.currentDirection?
-m:m,f,b,c),this.doHaveJDX()&&this.getJSV().setModel(a),this.isJS&&this.updateJSView(a,-1))},"~B,~B");c(c$,"doHaveJDX",function(){return this.haveJDX||(this.haveJDX=this.getBooleanProperty("_jspecview"))});c(c$,"getJSV",function(){null==this.jsv&&(this.jsv=J.api.Interface.getOption("jsv.JSpecView"),this.jsv.setViewer(this));return this.jsv});c(c$,"getJDXBaseModelIndex",function(a){return!this.doHaveJDX()?a:this.getJSV().getBaseModelIndex(a)},"~N");c(c$,"getJspecViewProperties",function(a){a=this.sm.getJspecViewProperties(""+
a);null!=a&&(this.haveJDX=!0);return a},"~O");c(c$,"scriptEcho",function(a){JU.Logger.isActiveLevel(4)&&(System.out.println(a),this.sm.setScriptEcho(a,this.isScriptQueued()),this.listCommands&&(null!=a&&0==a.indexOf("$["))&&JU.Logger.info(a))},"~S");c(c$,"isScriptQueued",function(){return null!=this.scm&&this.scm.isScriptQueued()});c(c$,"notifyError",function(a,b,d){this.g.setO("_errormessage",d);this.sm.notifyError(a,b,d)},"~S,~S,~S");c(c$,"jsEval",function(a){return this.sm.jsEval(a)},"~S");c(c$,
"setStatusAtomHovered",function(a,b){this.g.setI("_atomhovered",a);this.g.setO("hovered",JU.BSUtil.newAndSetBit(a));this.sm.setStatusAtomHovered(a,b)},"~N,~S");c(c$,"setStatusObjectHovered",function(a,b,d){this.g.setO("_objecthovered",a);this.sm.setStatusObjectHovered(a,b,d)},"~S,~S,JU.T3");c(c$,"setFileLoadStatus",function(a,b,d,c,g,f){this.setErrorMessage(g,null);this.g.setI("_loadPoint",a.getCode());var h=a!==J.c.FIL.CREATING_MODELSET;h&&this.setStatusFrameChanged(!1,!1);this.sm.setFileLoadStatus(b,
d,c,g,a.getCode(),h,f);h&&(this.doHaveJDX()&&this.getJSV().setModel(this.am.cmi),this.isJS&&this.updateJSView(this.am.cmi,-2))},"J.c.FIL,~S,~S,~S,~S,Boolean");c(c$,"getZapName",function(){return this.g.modelKitMode?"Jmol Model Kit":"zapped"});c(c$,"setStatusMeasuring",function(a,b,d,c){this.sm.setStatusMeasuring(a,b,d,c)},"~S,~N,~S,~N");c(c$,"notifyMinimizationStatus",function(){var a=this.getP("_minimizationStep"),b=this.getP("_minimizationForceField");this.sm.notifyMinimizationStatus(this.getP("_minimizationStatus"),
p(a,String)?Integer.$valueOf(0):a,this.getP("_minimizationEnergy"),a.toString().equals("0")?Float.$valueOf(0):this.getP("_minimizationEnergyDiff"),b)});c(c$,"setStatusAtomPicked",function(a,b,d){null==b&&(b=this.g.pickLabel,b=0==b.length?this.getAtomInfoXYZ(a,this.g.messageStyleChime):this.ms.getAtomInfo(a,b,this.ptTemp));this.g.setPicked(a);this.g.setO("_pickinfo",b);this.sm.setStatusAtomPicked(a,b,d);0>a||(1==this.sm.getSyncMode()&&this.doHaveJDX()&&this.getJSV().atomPicked(a),this.isJS&&this.updateJSView(this.getAtomModelIndex(a),
a))},"~N,~S,java.util.Map");c(c$,"setStatusDragDropped",function(a,b,d,c){0==a&&(this.g.setO("_fileDropped",c),this.g.setB("doDrop",!0));return!this.sm.setStatusDragDropped(a,b,d,c)||this.getP("doDrop").toString().equals("true")},"~N,~N,~N,~S");c(c$,"setStatusResized",function(a,b){this.sm.setStatusResized(a,b)},"~N,~N");c(c$,"scriptStatus",function(a){this.setScriptStatus(a,"",0,null)},"~S");c(c$,"scriptStatusMsg",function(a,b){this.setScriptStatus(a,b,0,null)},"~S,~S");c(c$,"setScriptStatus",function(a,
b,d,c){this.sm.setScriptStatus(a,b,d,c)},"~S,~S,~N,~S");c(c$,"getModelTitle",function(a){return null==this.ms?null:this.ms.getModelTitle(a)},"~N");h(c$,"getModelFileName",function(a){return null==this.ms?null:this.ms.getModelFileName(a)},"~N");c(c$,"dialogAsk",function(a,b){return prompt(a,b)},"~S,~S");h(c$,"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(c$,"setMeshCreator",function(a){this.shm.loadShape(24);this.setShapeProperty(24,"meshCreator",a)},"~O");c(c$,"showConsole",function(a){if(this.haveDisplay)try{null==this.appConsole&&a&&this.getProperty("DATA_API","getAppConsole",Boolean.TRUE),this.appConsole.setVisible(!0)}catch(b){}},"~B");h(c$,"getParameter",function(a){return this.getP(a)},"~S");c(c$,"getP",function(a){return this.g.getParameter(a,
!0)},"~S");c(c$,"getPOrNull",function(a){return this.g.getParameter(a,!1)},"~S");c(c$,"unsetProperty",function(a){a=a.toLowerCase();(a.equals("all")||a.equals("variables"))&&this.fm.setPathForAllFiles("");this.g.unsetUserVariable(a)},"~S");h(c$,"notifyStatusReady",function(a){System.out.println("Jmol applet "+this.fullName+(a?" ready":" destroyed"));a||this.dispose();this.sm.setStatusAppletReady(this.fullName,a)},"~B");h(c$,"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.actionManager)return!1;var b=this.actionManager.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.getDefaultColorRasmol();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.ms.getSelectionHaloEnabled();if(this.g.htUserVariables.containsKey(a)){b=this.g.getUserVariable(a);if(1048589==b.tok)return!0;if(1048588==b.tok)return!1}JU.Logger.error("vwr.getBooleanProperty("+a+") - unrecognized");return!1},"~S");h(c$,"getInt",function(a){switch(a){case 553648132:return this.am.animationFps;case 553648143:return this.g.dotDensity;
case 553648144:return this.g.dotScale;case 553648146:return this.g.helixStep;case 553648151:return this.g.meshScale;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 553648170:return this.g.smallMoleculeMaxAtoms;case 553648184:return this.g.strutSpacing}JU.Logger.error("viewer.getInt("+JS.T.nameOf(a)+") - not listed");return 0},
"~N");c(c$,"getDelayMaximumMs",function(){return this.haveDisplay?this.g.delayMaximumMs:1});c(c$,"getHermiteLevel",function(){return this.tm.spinOn?0:this.g.hermiteLevel});c(c$,"getHoverDelay",function(){return this.g.modelKitMode?20:this.g.hoverDelayMs});h(c$,"getBoolean",function(a){switch(a){case 1074790662:return this.ms.getMSInfoB("isPDB");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.backboneSteps;case 603979812:return this.g.bondModeOr;case 603979816:return this.g.cartoonBaseEdges;case 603979817:return this.g.cartoonFancy;case 603979818:return this.g.cartoonLadders;case 603979819:return this.g.cartoonRibose;case 603979820:return this.g.cartoonRockets;
case 603979823:return this.g.chainCaseSensitive||0<this.chainList.size();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 603979833:return this.g.drawPicking;case 603979844:return this.g.fontCaching;case 603979845:return this.g.fontScaling;case 603979846:return this.g.forceAutoBond;
case 603979848: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 1613758470:return this.g.rasmolHeteroSetting;case 603979858:return this.g.hideNameInPopup;case 603979864:return this.g.highResolutionFlag;case 1613758476:return this.g.rasmolHydrogenSetting;case 603979870:return this.g.isosurfaceKey;case 603979872:return this.g.justifyMeasurements;case 603979874:return this.g.legacyAutoBonding;
case 603979875:return this.g.legacyHAddition;case 603979877:return this.g.logGestures;case 603979878:return this.g.measureAllModels;case 603979879:return this.g.measurementLabels;case 603979880:return this.g.messageStyleChime;case 603979883:return this.g.modelKitMode;case 603979887:return this.g.navigationMode;case 603979888:return this.g.navigationPeriodic;case 603979889:return this.g.partialDots;case 603979892:return this.g.pdbSequential;case 603979894:return this.g.preserveState;case 603979898:return this.g.ribbonBorder;
case 603979900:return this.g.rocketBarrels;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 603979928:return this.g.showMultipleBonds;case 603979934:return this.g.showTiming;case 603979938:return this.g.showUnitCellInfo;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 1613758488:return this.g.solventOn;case 603979952:return this.g.ssbondsBackbone;case 603979955:return this.g.strutsMultiple;case 603979966:return this.g.traceAlpha;case 603979967:return this.g.translucent;case 603979968:return this.g.twistedSheets;case 603979972:return this.g.vectorsCentered;case 603979973:return this.g.vectorSymmetry;case 603979974: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(c$,"allowEmbeddedScripts",function(){return this.g.allowEmbeddedScripts&&!this.$isPreviewOnly});c(c$,"getDragSelected",function(){return this.g.dragSelected&&!this.g.modelKitMode});c(c$,"getBondPicking",function(){return this.g.bondPicking||this.g.modelKitMode});c(c$,"useMinimizationThread",function(){return this.g.useMinimizationThread&&!this.autoExit});h(c$,"getFloat",function(a){switch(a){case 1141899265:return this.g.particleRadius;case 570425346:return this.g.axesScale;case 570425348:return this.g.bondTolerance;
case 570425354:return this.g.defaultTranslucent;case 570425352:return this.g.defaultDrawArrowScale;case 570425355:return this.g.dipoleScale;case 570425356:return this.g.drawFontSize;case 570425358:return this.g.exportScale;case 570425360:return this.g.hbondsAngleMinimum;case 570425361:return this.g.hbondsDistanceMaximum;case 570425363:return this.g.loadAtomDataTolerance;case 570425364:return this.g.minBondDistance;case 1276121113: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.getRotationRadius();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 1649410049:return this.g.vectorScale;
case 570425412:return this.g.vibrationPeriod}JU.Logger.error("viewer.getFloat("+JS.T.nameOf(a)+") - not listed");return 0},"~N");h(c$,"setStringProperty",function(a,b){if(null!=b)if("_"==a.charAt(0))this.g.setO(a,b);else{var d=JS.T.getTokFromName(a);switch(JS.T.getParamType(d)){case 603979776:this.setBooleanPropertyTok(a,d,JS.SV.newV(4,b).asBoolean());break;case 553648128:this.setIntPropertyTok(a,d,JS.SV.newV(4,b).asInt());break;case 570425344:this.setFloatPropertyTok(a,d,JU.PT.parseFloat(b));break;
default:this.setStringPropertyTok(a,d,b)}}},"~S,~S");c(c$,"setStringPropertyTok",function(a,b,d){switch(b){case 545259521:this.setAnimationMode(d);return;case 545259569:this.g.nmrPredictFormat=d;break;case 545259548:this.g.defaultDropScript=d;break;case 545259571:d=this.fm.setPathForAllFiles(d);break;case 545259558:this.setUnits(d,!1);return;case 545259560:this.g.forceField=d="UFF".equalsIgnoreCase(d)?"UFF":"MMFF";this.minimizer=null;break;case 545259570:this.g.nmrUrlFormat=d;break;case 545259568:this.setUnits(d,
!0);return;case 545259566:this.g.loadLigandFormat=d;break;case 545259543:this.g.defaultLabelPDB=d;break;case 545259544:this.g.defaultLabelXYZ=d;break;case 545259549:this.g.defaultLoadFilter=d;break;case 545259567:d=this.getOutputManager().setLogFile(d);if(null==d)return;break;case 545259559:break;case 545259524:this.g.atomTypes=d;break;case 545259538:break;case 545259576:this.g.pickLabel=d;break;case 545259580:this.g.quaternionFrame=2==d.length&&d.startsWith("R")?d.substring(0,2):""+(d.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.setHaveStraightness(!1);break;case 545259555:this.setVdwStr(d);return;case 545259564:new J.i18n.GT(this,d);b=J.i18n.GT.getLanguage();this.modelkitPopup=null;null!=this.jmolpopup&&(this.jmolpopup.jpiDispose(),this.jmolpopup=null,this.getPopupMenu());this.sm.setCallbackFunction("language",b);d=J.i18n.GT.getLanguage();break;case 545259565:this.g.loadFormat=d;break;case 545259534:this.setObjectColor("background",
d);return;case 545259528:this.setObjectColor("axis1",d);return;case 545259530:this.setObjectColor("axis2",d);return;case 545259532:this.setObjectColor("axis3",d);return;case 545259536:this.setObjectColor("boundbox",d);return;case 545259586:this.setObjectColor("unitcell",d);return;case 545259578:this.setPropertyColorScheme(d,!1,!1);break;case 545259562:this.shm.loadShape(34);this.setShapeProperty(34,"atomLabel",d);break;case 545259547:this.g.defaultDistanceLabel=d;break;case 545259542:this.g.defaultAngleLabel=
d;break;case 545259554:this.g.defaultTorsionLabel=d;break;case 545259550:this.g.defaultLoadScript=d;break;case 545259522:this.fm.setAppletProxy(d);break;case 545259546:null==d&&(d="");d=d.$replace("\\","/");this.g.defaultDirectory=d;break;case 545259561:this.g.helpPath=d;break;case 545259552:!d.equalsIgnoreCase("RasMol")&&!d.equalsIgnoreCase("PyMOL")&&(d="Jmol");this.setDefaultsType(d);break;case 545259545:this.setDefaultColors(d.equalsIgnoreCase("rasmol"));return;case 545259572:this.setPickingMode(d,
0);return;case 545259574:this.setPickingStyle(d,0);return;case 545259540:break;default:if(a.toLowerCase().endsWith("callback")){this.sm.setCallbackFunction(a,0==d.length||d.equalsIgnoreCase("none")?null:d);break}if(!this.g.htNonbooleanParameterValues.containsKey(a.toLowerCase())){this.g.setUserVariable(a,JS.SV.newV(4,d));return}}this.g.setO(a,d)},"~S,~N,~S");h(c$,"setFloatProperty",function(a,b){if(!Float.isNaN(b))if("_"==a.charAt(0))this.g.setF(a,b);else{var d=JS.T.getTokFromName(a);switch(JS.T.getParamType(d)){case 545259520:this.setStringPropertyTok(a,
d,""+b);break;case 603979776:this.setBooleanPropertyTok(a,d,0!=b);break;case 553648128:this.setIntPropertyTok(a,d,z(b));break;default:this.setFloatPropertyTok(a,d,b)}}},"~S,~N");c(c$,"setFloatPropertyTok",function(a,b,d){switch(b){case 570425366:this.ms.setModulation(null,!1,null,!1);this.g.modulationScale=d=Math.max(0.1,d);this.ms.setModulation(null,!0,null,!1);break;case 570425381:this.g.particleRadius=Math.abs(d);break;case 570425356:this.g.drawFontSize=d;break;case 570425358:this.g.exportScale=
d;break;case 570425403:this.g.starWidth=d;break;case 570425369:this.g.multipleBondRadiusFactor=d;break;case 570425370:this.g.multipleBondSpacing=d;break;case 570425393:this.tm.setSlabRange(d);break;case 570425365:this.g.minimizationCriterion=d;break;case 570425359:this.haveDisplay&&this.actionManager.setGestureSwipeFactor(d);break;case 570425367:this.haveDisplay&&this.actionManager.setMouseDragFactor(d);break;case 570425368:this.haveDisplay&&this.actionManager.setMouseWheelFactor(d);break;case 570425408:this.g.strutLengthMaximum=
d;break;case 570425406:this.g.strutDefaultRadius=d;break;case 570425376:this.setSpin("X",z(d));break;case 570425378:this.setSpin("Y",z(d));break;case 570425380:this.setSpin("Z",z(d));break;case 570425371:if(Float.isNaN(d))return;this.setSpin("FPS",z(d));break;case 570425363:this.g.loadAtomDataTolerance=d;break;case 570425360:this.g.hbondsAngleMinimum=d;break;case 570425361:this.g.hbondsDistanceMaximum=d;break;case 570425382:this.g.pointGroupDistanceTolerance=d;break;case 570425384:this.g.pointGroupLinearTolerance=
d;break;case 570425357:this.g.ellipsoidAxisDiameter=d;break;case 570425398:this.setSpin("x",z(d));break;case 570425400:this.setSpin("y",z(d));break;case 570425402:this.setSpin("z",z(d));break;case 570425396:this.setSpin("fps",z(d));break;case 570425352:this.g.defaultDrawArrowScale=d;break;case 570425354:this.g.defaultTranslucent=d;break;case 570425346:this.setAxesScale(d);break;case 570425416:this.tm.setVisualRange(d);this.refresh(1,"set visualRange");break;case 570425372:this.setNavigationDepthPercent(d);
break;case 570425374:this.g.navigationSpeed=d;break;case 570425373:this.tm.setNavigationSlabOffsetPercent(d);break;case 570425350:this.tm.setCameraDepthPercent(d,!1);this.refresh(1,"set cameraDepth");return;case 570425388:this.setRotationRadius(d,!0);return;case 570425362:this.g.hoverDelayMs=z(1E3*d);break;case 570425392:this.g.sheetSmoothing=d;break;case 570425355:d=JV.Viewer.checkFloatRange(d,-10,10);this.g.dipoleScale=d;break;case 570425404:this.tm.setStereoDegrees(d);break;case 1649410049:this.setVectorScale(d);
return;case 570425412:this.setVibrationPeriod(d);return;case 570425414:this.setVibrationScale(d);return;case 570425348:this.setBondTolerance(d);return;case 570425364:this.setMinBondDistance(d);return;case 570425390:this.tm.setScaleAngstromsPerInch(d);break;case 570425394:d=JV.Viewer.checkFloatRange(d,0,10);this.g.solventProbeRadius=d;break;default:if(!this.g.htNonbooleanParameterValues.containsKey(a.toLowerCase())){this.g.setUserVariable(a,JS.SV.newV(3,Float.$valueOf(d)));return}}this.g.setF(a,d)},
"~S,~N,~N");h(c$,"setIntProperty",function(a,b){if(-2147483648!=b)if("_"==a.charAt(0))this.g.setI(a,b);else{var d=JS.T.getTokFromName(a);switch(JS.T.getParamType(d)){case 545259520:this.setStringPropertyTok(a,d,""+b);break;case 603979776:this.setBooleanPropertyTok(a,d,0!=b);break;case 570425344:this.setFloatPropertyTok(a,d,b);break;default:this.setIntPropertyTok(a,d,b)}}},"~S,~N");c(c$,"setIntPropertyTok",function(a,b,d){switch(b){case 553648138:d=0==d?0:1;this.g.bondingVersion=JU.Elements.bondingVersion=
d;break;case 553648137:this.g.celShadingPower=d;this.gdata.setCelPower(d);break;case 553648129:this.gdata.setAmbientOcclusion(d);break;case 553648158:this.g.platformSpeed=Math.min(Math.max(d,0),10);break;case 553648151:this.g.meshScale=d;break;case 553648153:this.g.minPixelSelRadius=d;break;case 553648149:this.g.isosurfacePropertySmoothingPower=d;break;case 553648165:this.g.repaintWaitMs=d;break;case 553648170:this.g.smallMoleculeMaxAtoms=d;break;case 553648152:this.g.minimizationSteps=d;break;case 553648184:this.g.strutSpacing=
d;break;case 553648156:d=JV.Viewer.checkIntRange(d,0,1E3);this.gdata.setPhongExponent(d);break;case 553648146:this.g.helixStep=d;this.ms.setHaveStraightness(!1);break;case 553648144:this.g.dotScale=d;break;case 553648143:this.g.dotDensity=d;break;case 553648140:this.g.delayMaximumMs=d;break;case 553648150:JU.Logger.setLogLevel(d);JU.Logger.info("logging level set to "+d);this.g.setI("logLevel",d);null!=this.eval&&this.eval.setDebugging();return;case 553648134:switch(J.c.AXES.getAxesMode(d)){case J.c.AXES.MOLECULAR:this.setAxesModeMolecular(!0);
break;case J.c.AXES.BOUNDBOX:this.setAxesModeMolecular(!1);break;case J.c.AXES.UNITCELL:this.setAxesModeUnitCell(!0)}return;case 553648178:this.setStrandCount(0,d);return;case 553648182:this.setStrandCount(12,d);return;case 553648180:this.setStrandCount(13,d);return;case 553648155:return;case 536870922:this.g.scriptDelay=d;break;case 553648176:d=0>d?JV.Viewer.checkIntRange(d,-10,-1):JV.Viewer.checkIntRange(d,0,100);this.gdata.setSpecularPower(d);break;case 553648172:d=JV.Viewer.checkIntRange(-d,-10,
-1);this.gdata.setSpecularPower(d);break;case 553648136:this.setMarBond(d);return;case 536870924:this.setBooleanPropertyTok(a,b,1==d);return;case 553648174:d=JV.Viewer.checkIntRange(d,0,100);this.gdata.setSpecularPercent(d);break;case 553648142:d=JV.Viewer.checkIntRange(d,0,100);this.gdata.setDiffusePercent(d);break;case 553648130:d=JV.Viewer.checkIntRange(d,0,100);this.gdata.setAmbientPercent(d);break;case 553648186:this.tm.zDepthToPercent(d);break;case 553648188:this.tm.zSlabToPercent(d);break;
case 554176526:this.tm.depthToPercent(d);break;case 554176565:this.tm.slabToPercent(d);break;case 553648190:this.g.zShadePower=Math.max(d,1);break;case 553648166:this.g.ribbonAspectRatio=d;break;case 553648157:this.g.pickingSpinRate=1>d?1:d;break;case 553648132:this.setAnimationFps(d);return;case 553648154:this.setPercentVdwAtom(d);break;case 553648147:this.g.hermiteLevel=d;break;case 553648145:case 553648148:case 553648160:case 553648159:case 553648162:case 553648164:break;default:if(!this.g.htNonbooleanParameterValues.containsKey(a)){this.g.setUserVariable(a,
JS.SV.newI(d));return}}this.g.setI(a,d)},"~S,~N,~N");c$.checkIntRange=c(c$,"checkIntRange",function(a,b,d){return a<b?b:a>d?d:a},"~N,~N,~N");c$.checkFloatRange=c(c$,"checkFloatRange",function(a,b,d){return a<b?b:a>d?d:a},"~N,~N,~N");h(c$,"setBooleanProperty",function(a,b){if("_"==a.charAt(0))this.g.setB(a,b);else{var d=JS.T.getTokFromName(a);switch(JS.T.getParamType(d)){case 545259520:this.setStringPropertyTok(a,d,"");break;case 553648128:this.setIntPropertyTok(a,d,b?1:0);break;case 570425344:this.setFloatPropertyTok(a,
d,b?1:0);break;default:this.setBooleanPropertyTok(a,d,b)}}},"~S,~B");c(c$,"setBooleanPropertyTok",function(a,b,d){var c=!0;switch(b){case 603979938:this.g.showUnitCellInfo=d;break;case 603979937:this.g.showUnitCellDetails=d;break;case 603979848:c=!1;break;case 603979972:this.g.vectorsCentered=d;break;case 603979811:this.g.backboneSteps=d;break;case 603979819:(this.g.cartoonRibose=d)&&this.getBoolean(603979816)&&this.setBooleanPropertyTok("cartoonBaseEdges",603979816,!1);break;case 603979837:this.g.ellipsoidArrows=
d;break;case 603979967:this.g.translucent=d;break;case 603979818:this.g.cartoonLadders=d;break;case 603979968:b=this.g.twistedSheets;this.g.twistedSheets=d;b!=d&&this.checkCoordinatesChanged();break;case 603979822:this.g.celShading=d;this.gdata.setCel(d);break;case 603979817:this.g.cartoonFancy=d;break;case 603979934:this.g.showTiming=d;break;case 603979973:this.g.vectorSymmetry=d;break;case 603979870:this.g.isosurfaceKey=d;break;case 603979889:this.g.partialDots=d;break;case 603979874:this.g.legacyAutoBonding=
d;break;case 603979826:this.g.defaultStructureDSSP=d;break;case 603979834:this.g.dsspCalcHydrogen=d;break;case 603979782:(this.g.allowModelkit=d)||this.setModelKitMode(!1);break;case 603979883:this.setModelKitMode(d);break;case 603979885:this.g.multiProcessor=d&&1<JV.Viewer.nProcessors;break;case 603979884:this.g.monitorEnergy=d;break;case 603979853:this.g.hbondsRasmol=d;break;case 603979881:this.g.minimizationRefresh=d;break;case 603979882:this.g.minimizationSilent=d;break;case 603979869:d&&(this.$isKiosk=
!0,this.g.disablePopupMenu=!0,null!=this.display&&this.apiPlatform.setTransparentCursor(this.display));break;case 603979974:this.g.waitForMoveTo=d;break;case 603979876:this.g.logCommands=!0;break;case 603979877:this.g.logGestures=!0;break;case 603979784:this.g.allowMultiTouch=d;break;case 603979894:this.g.preserveState=d;this.ms.setPreserveState(d);this.undoClear();break;case 603979955:this.g.strutsMultiple=d;break;case 603979842:break;case 603979939:this.g.slabByAtom=d;break;case 603979940:this.g.slabByMolecule=
d;break;case 603979902:this.g.saveProteinStructureState=d;break;case 603979780:this.g.allowGestures=d;break;case 603979868:this.g.imageState=d;break;case 603979970:this.g.useMinimizationThread=d;break;case 603979781:this.g.disablePopupMenu&&(d=!1);this.g.allowKeyStrokes=d;break;case 603979831:this.g.dragSelected=d;this.showSelected=!1;break;case 603979924:this.g.showKeyStrokes=d;break;case 603979844:this.g.fontCaching=d;break;case 603979796:this.g.atomPicking=d;break;case 603979814:this.highlight(null);
this.g.bondPicking=d;break;case 603979906:this.g.selectAllModels=d;break;case 603979880:this.g.messageStyleChime=d;break;case 603979892:this.g.pdbSequential=d;break;case 603979890:this.g.pdbAddHydrogens=d;break;case 603979891:this.g.pdbGetHeader=d;break;case 603979838:this.g.ellipsoidAxes=d;break;case 603979836:this.g.ellipsoidArcs=d;break;case 603979839:this.g.ellipsoidBall=d;break;case 603979840:this.g.ellipsoidDots=d;break;case 603979841:this.g.ellipsoidFill=d;break;case 603979845:this.g.fontScaling=
d;break;case 603979956:this.setSyncTarget(0,d);break;case 603979958:this.setSyncTarget(1,d);break;case 603979976:this.g.wireframeRotation=d;break;case 603979871:this.g.isosurfacePropertySmoothing=d;break;case 603979833:this.g.drawPicking=d;break;case 603979786:case 603979790:case 603979788:this.setAntialias(b,d);break;case 603979944:this.g.smartAromatic=d;break;case 603979794:this.setApplySymmetryToBonds(d);break;case 603979792:this.g.appendNew=d;break;case 603979800:this.g.autoFps=d;break;case 603979971:JU.DF.setUseNumberLocalization(this.g.useNumberLocalization=
d);break;case 603979918:case 1611272202:a="showFrank";this.setFrankOn(d);break;case 1613758488:a="solventProbe";this.g.solventOn=d;break;case 603979948:this.g.solventOn=d;break;case 603979785:this.g.allowRotateSelected=d;break;case 603979783:this.g.allowMoveAtoms=d;this.g.allowRotateSelected=d;this.g.dragSelected=d;this.showSelected=!1;break;case 536870922:this.setIntPropertyTok("showScript",b,d?1:0);return;case 603979778:this.g.allowEmbeddedScripts=d;break;case 603979888:this.g.navigationPeriodic=
d;break;case 603979984:this.tm.setZShadeEnabled(d);return;case 603979832:this.haveDisplay&&(this.g.drawHover=d);break;case 603979887:this.setNavigationMode(d);break;case 603979886:return;case 603979860:this.g.hideNavigationPoint=d;break;case 603979930:this.g.showNavigationPointAlways=d;break;case 603979896:this.setRefreshing(d);break;case 603979872:this.g.justifyMeasurements=d;break;case 603979952:this.g.ssbondsBackbone=d;break;case 603979852:this.g.hbondsBackbone=d;break;case 603979854:this.g.hbondsSolid=
d;break;case 536870924:this.gdata.setSpecular(d);break;case 603979942:this.tm.setSlabEnabled(d);return;case 603979980:this.tm.setZoomEnabled(d);return;case 603979864:this.g.highResolutionFlag=d;break;case 603979966:this.g.traceAlpha=d;break;case 603979983:this.g.zoomLarge=d;this.tm.setZoomHeight(this.g.zoomHeight,d);break;case 603979982:this.g.zoomHeight=d;this.tm.setZoomHeight(d,this.g.zoomLarge);break;case 603979873:J.i18n.GT.setDoTranslate(d);break;case 603979862:this.slm.setHideNotSelected(d);
break;case 603979904:this.setScriptQueue(d);break;case 603979830:this.g.dotSurface=d;break;case 603979829:this.g.dotsSelectedOnly=d;break;case 1611141171:this.setSelectionHalos(d);break;case 603979910:this.g.rasmolHydrogenSetting=d;break;case 603979908:this.g.rasmolHeteroSetting=d;break;case 603979928:this.g.showMultipleBonds=d;break;case 603979920:this.g.showHiddenSelectionHalos=d;break;case 603979975:this.tm.setWindowCentered(d);break;case 603979828:this.g.displayCellParameters=d;break;case 603979960:this.g.testFlag1=
d;break;case 603979962:this.g.testFlag2=d;break;case 603979964:this.g.testFlag3=d;break;case 603979965:this.jmolTest();this.g.testFlag4=d;break;case 603979898:this.g.ribbonBorder=d;break;case 603979816:(this.g.cartoonBaseEdges=d)&&this.getBoolean(603979819)&&this.setBooleanPropertyTok("cartoonRibose",603979819,!1);break;case 603979820:this.g.cartoonRockets=d;break;case 603979900:this.g.rocketBarrels=d;break;case 603979850:this.gdata.setGreyscaleMode(this.g.greyscaleRendering=d);break;case 603979879:this.g.measurementLabels=
d;break;case 603979810:this.setAxesModeMolecular(!d);return;case 603979804:this.setAxesModeMolecular(d);return;case 603979808:this.setAxesModeUnitCell(d);return;case 603979806:this.setAxesOrientationRasmol(d);return;case 603979824:this.setStringPropertyTok("defaultcolorscheme",545259545,d?"rasmol":"jmol");return;case 603979825:this.setDebugScript(d);return;case 603979893:this.setPerspectiveDepth(d);return;case 603979798:this.setAutoBond(d);return;case 603979914:this.setShowAxes(d);return;case 603979916:this.setShowBbcage(d);
return;case 603979922:this.setShowHydrogens(d);return;case 603979926:this.setShowMeasurements(d);return;case 603979936:this.setShowUnitCell(d);return;case 603979812:c=!1;this.g.bondModeOr=d;break;case 603979978:c=!1;this.g.zeroBasedXyzRasmol=d;this.reset(!0);break;case 603979895:c=!1;this.g.rangeSelected=d;break;case 603979878:c=!1;this.g.measureAllModels=d;break;case 603979954:c=!1;this.sm.setAllowStatusReporting(d);break;case 603979823:c=!1;this.g.chainCaseSensitive=d;break;case 603979858:c=!1;
this.g.hideNameInPopup=d;break;case 603979827:c=!1;this.g.disablePopupMenu=d;break;case 603979846:c=!1;this.g.forceAutoBond=d;break;default:if(!this.g.htBooleanParameterFlags.containsKey(a.toLowerCase())){this.g.setUserVariable(a,JS.SV.getBoolean(d));return}}this.g.setB(a,d);c&&this.setTainted(!0)},"~S,~N,~B");c(c$,"setModelKitMode",function(a){if(null!=this.actionManager&&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.highlight(null);a?(this.setNavigationMode(!1),this.selectAll(),this.setAtomPickingOption("C"),this.setBondPickingOption("p"),this.$isApplet||this.popupMenu(0,0,"m"),b&&this.sm.setCallbackFunction("modelkit","ON"),this.g.modelKitMode=!0,0==this.getAtomCount()&&this.zap(!1,!0,!0)):(this.actionManager.setPickingMode(-1),this.setStringProperty("pickingStyle","toggle"),this.setBooleanProperty("bondPicking",!1),b&&this.sm.setCallbackFunction("modelkit","OFF"))}},"~B");c(c$,
"setSmilesString",function(a){null==a?this.g.removeParam("_smilesString"):this.g.setO("_smilesString",a)},"~S");c(c$,"removeUserVariable",function(a){this.g.removeUserVariable(a);a.endsWith("callback")&&this.sm.setCallbackFunction(a,null)},"~S");c(c$,"isJmolVariable",function(a){return this.g.isJmolVariable(a)},"~S");c(c$,"jmolTest",function(){});c(c$,"showParameter",function(a,b,d){d=""+this.g.getParameterEscaped(a,d);(b||0>d.indexOf("<not defined>"))&&this.showString(a+" = "+d,!1)},"~S,~B,~N");
c(c$,"showString",function(a,b){this.isScriptQueued()&&((!this.isSilent||b)&&!this.isJS)&&JU.Logger.warn(a);this.scriptEcho(a)},"~S,~B");c(c$,"getAllSettings",function(a){return this.getStateCreator().getAllSettings(a)},"~S");c(c$,"getBindingInfo",function(a){return this.haveDisplay?this.actionManager.getBindingInfo(a):""},"~S");c(c$,"getIsosurfacePropertySmoothing",function(a){return a?this.g.isosurfacePropertySmoothingPower:this.g.isosurfacePropertySmoothing?1:0},"~B");c(c$,"setNavigationDepthPercent",
function(a){this.tm.setNavigationDepthPercent(a);this.refresh(1,"set navigationDepth")},"~N");c(c$,"getShowNavigationPoint",function(){return!this.g.navigationMode||!this.tm.canNavigate()?!1:this.tm.isNavigating()&&!this.g.hideNavigationPoint||this.g.showNavigationPointAlways||this.getInMotion(!0)});c(c$,"getCurrentSolventProbeRadius",function(){return this.g.solventOn?this.g.solventProbeRadius:0});c(c$,"getTestFlag",function(a){switch(a){case 1:return this.g.testFlag1;case 2:return this.g.testFlag2;
case 3:return this.g.testFlag3;case 4:return this.g.testFlag4}return!1},"~N");h(c$,"setPerspectiveDepth",function(a){this.tm.setPerspectiveDepth(a)},"~B");h(c$,"setAxesOrientationRasmol",function(a){this.g.setB("axesOrientationRasmol",a);this.g.axesOrientationRasmol=a;this.reset(!0)},"~B");c(c$,"setAxesScale",function(a){a=JV.Viewer.checkFloatRange(a,-100,100);this.g.axesScale=a;this.axesAreTainted=!0},"~N");c(c$,"getAxisPoints",function(){this.shm.loadShape(33);return 0==this.getObjectMad(1)||this.g.axesMode!==
J.c.AXES.UNITCELL||this.getShapeProperty(33,"axesTypeXY").booleanValue()||null!=this.getShapeProperty(33,"origin")?null:this.getShapeProperty(33,"axisPoints")});c(c$,"resetError",function(){this.g.removeParam("_errormessage")});c(c$,"setAxesModeMolecular",function(a){this.g.axesMode=a?J.c.AXES.MOLECULAR:J.c.AXES.BOUNDBOX;this.axesAreTainted=!0;this.g.removeParam("axesunitcell");this.g.removeParam(a?"axeswindow":"axesmolecular");this.g.setI("axesMode",this.g.axesMode.getCode());this.g.setB(a?"axesMolecular":
"axesWindow",!0)},"~B");c(c$,"setAxesModeUnitCell",function(a){this.g.axesMode=a?J.c.AXES.UNITCELL:J.c.AXES.BOUNDBOX;this.axesAreTainted=!0;this.g.removeParam("axesmolecular");this.g.removeParam(a?"axeswindow":"axesunitcell");this.g.setB(a?"axesUnitcell":"axesWindow",!0);this.g.setI("axesMode",this.g.axesMode.getCode())},"~B");h(c$,"getPerspectiveDepth",function(){return this.tm.getPerspectiveDepth()});h(c$,"setSelectionHalos",function(a){null==this.ms||a==this.ms.getSelectionHaloEnabled()||(this.g.setB("selectionHalos",
a),this.shm.loadShape(8),this.ms.setSelectionHaloEnabled(a))},"~B");c(c$,"getSelectionHaloEnabled",function(a){var b=this.ms.getSelectionHaloEnabled()||a&&this.showSelected;a&&(this.showSelected=!1);return b},"~B");c(c$,"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(c$,"getStrandCount",function(a){return 12==a?this.g.strandCountForStrands:this.g.strandCountForMeshRibbon},"~N");c(c$,"setNavigationMode",function(a){this.g.navigationMode=a;this.tm.setNavigationMode(a)},"~B");c(c$,"setTransformManagerDefaults",function(){this.tm.setCameraDepthPercent(this.g.defaultCameraDepth,!0);this.tm.setPerspectiveDepth(this.g.defaultPerspectiveDepth);this.tm.setStereoDegrees(-5);
this.tm.setVisualRange(this.g.visualRange);this.tm.setSpinOff();this.tm.setVibrationPeriod(0);this.tm.setFrameOffsets(this.frameOffsets)});h(c$,"setAutoBond",function(a){this.g.setB("autobond",a);this.g.autoBond=a},"~B");c(c$,"makeConnections",function(a,b,d,c,g,f,h,k,l,m){this.clearModelDependentObjects();this.clearMinimization();return this.ms.makeConnections(a,b,d,c,g,f,h,k,l,m)},"~N,~N,~N,~N,JU.BS,JU.BS,JU.BS,~B,~B,~N");h(c$,"rebond",function(){this.rebondState(!1)});c(c$,"rebondState",function(a){this.clearModelDependentObjects();
this.ms.deleteAllBonds();a=a&&this.g.legacyAutoBonding;this.ms.autoBondBs4(null,null,null,null,this.getMadBond(),a);this.addStateScript(a?"set legacyAutoBonding TRUE;connect;set legacyAutoBonding FALSE;":"connect;",!1,!0)},"~B");h(c$,"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");h(c$,"getMadBond",function(){return 2*
this.g.bondRadiusMilliAngstroms});h(c$,"setShowHydrogens",function(a){this.g.setB("showHydrogens",a);this.g.showHydrogens=a},"~B");h(c$,"setShowBbcage",function(a){this.setObjectMad(31,"boundbox",a?-4:0);this.g.setB("showBoundBox",a)},"~B");h(c$,"getShowBbcage",function(){return 0!=this.getObjectMad(4)});c(c$,"setShowUnitCell",function(a){this.setObjectMad(32,"unitcell",a?-2:0);this.g.setB("showUnitCell",a)},"~B");c(c$,"getShowUnitCell",function(){return 0!=this.getObjectMad(5)});h(c$,"setShowAxes",
function(a){this.setObjectMad(33,"axes",a?-2:0);this.g.setB("showAxes",a)},"~B");h(c$,"getShowAxes",function(){return 0!=this.getObjectMad(1)});h(c$,"setFrankOn",function(a){this.$isPreviewOnly&&(a=!1);this.frankOn=a;this.setObjectMad(35,"frank",a?1:0)},"~B");c(c$,"getShowFrank",function(){return this.$isPreviewOnly||this.$isApplet&&this.creatingImage?!1:this.$isSignedApplet&&!this.isSignedAppletLocal&&!this.isJS||this.frankOn});h(c$,"setShowMeasurements",function(a){this.g.setB("showMeasurements",
a);this.g.showMeasurements=a},"~B");c(c$,"setUnits",function(a,b){this.g.setUnits(a);b&&(this.g.setUnits(a),this.setShapeProperty(6,"reformatDistances",null))},"~S,~B");h(c$,"setRasmolDefaults",function(){this.setDefaultsType("RasMol")});h(c$,"setJmolDefaults",function(){this.setDefaultsType("Jmol")});c(c$,"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(c$,"setAntialias",function(a,b){switch(a){case 603979786:this.g.antialiasDisplay=b;break;case 603979790:this.g.antialiasTranslucent=b;break;case 603979788:this.g.antialiasImages=b;return}this.resizeImage(0,0,!1,!1,!0)},"~N,~B");c(c$,"allocTempPoints",function(a){return this.tempArray.allocTempPoints(a)},"~N");c(c$,"freeTempPoints",function(a){this.tempArray.freeTempPoints(a)},"~A");c(c$,"allocTempScreens",function(a){return this.tempArray.allocTempScreens(a)},
"~N");c(c$,"freeTempScreens",function(a){this.tempArray.freeTempScreens(a)},"~A");c(c$,"allocTempEnum",function(a){return this.tempArray.allocTempEnum(a)},"~N");c(c$,"freeTempEnum",function(a){this.tempArray.freeTempEnum(a)},"~A");c(c$,"getFont3D",function(a,b,d){return this.gdata.getFont3DFSS(a,b,d)},"~S,~S,~N");c(c$,"formatText",function(a){if(0>a.indexOf("@{")&&0>a.indexOf("%{"))return a;var b=a,d=0<=b.indexOf("\\");d&&(b=JU.PT.rep(b,"\\%","\u0001"),b=JU.PT.rep(b,"\\@","\u0002"),d=!b.equals(a));
for(var b=JU.PT.rep(b,"%{","@{"),c;0<=(a=b.indexOf("@{"));){a++;var g=a+1;c=b.length;a=JU.Txt.ichMathTerminator(b,a,c);if(a>=c)return b;c=b.substring(g,a);if(0==c.length)return b;c=this.evaluateExpression(c);p(c,JU.P3)&&(c=JU.Escape.eP(c));b=b.substring(0,g-2)+c.toString()+b.substring(a+1)}d&&(b=JU.PT.rep(b,"\u0002","@"),b=JU.PT.rep(b,"\u0001","%"));return b},"~S");c(c$,"getElementSymbol",function(a){return this.ms.getElementSymbol(a)},"~N");c(c$,"getElementNumber",function(a){return this.ms.getElementNumber(a)},
"~N");h(c$,"getAtomName",function(a){return this.ms.getAtomName(a)},"~N");h(c$,"getAtomNumber",function(a){return this.ms.getAtomNumber(a)},"~N");h(c$,"getAtomPoint3f",function(a){return this.ms.at[a]},"~N");h(c$,"getAtomRadius",function(a){return this.ms.getAtomRadius(a)},"~N");h(c$,"getAtomArgb",function(a){return this.gdata.getColorArgbOrGray(this.ms.getAtomColix(a))},"~N");h(c$,"getAtomModelIndex",function(a){return this.ms.at[a].mi},"~N");h(c$,"getBondRadius",function(a){return this.ms.getBondRadius(a)},
"~N");h(c$,"getBondOrder",function(a){return this.ms.getBondOrder(a)},"~N");h(c$,"getBondArgb1",function(a){return this.gdata.getColorArgbOrGray(this.ms.getBondColix1(a))},"~N");h(c$,"getBondModelIndex",function(a){return this.ms.getBondModelIndex(a)},"~N");h(c$,"getBondArgb2",function(a){return this.gdata.getColorArgbOrGray(this.ms.getBondColix2(a))},"~N");h(c$,"getPolymerLeadMidPoints",function(a,b){return this.ms.getPolymerLeadMidPoints(a,b)},"~N,~N");c(c$,"getAtomGroupQuaternions",function(a,
b){return this.ms.getAtomGroupQuaternions(a,b,this.getQuaternionFrame())},"JU.BS,~N");c(c$,"setStereoMode",function(a,b,d){this.setFloatProperty("stereoDegrees",d);this.setBooleanProperty("greyscaleRendering",b.isBiColor());null!=a?this.tm.setStereoMode2(a):this.tm.setStereoMode(b)},"~A,J.c.STER,~N");c(c$,"isStereoDouble",function(){return this.tm.stereoMode===J.c.STER.DOUBLE});c(c$,"getChimeInfo",function(a){return this.getPropertyManager().getChimeInfo(a,this.bsA())},"~N");c(c$,"getModelFileInfo",
function(){return this.getPropertyManager().getModelFileInfo(this.getVisibleFramesBitSet())});c(c$,"getModelFileInfoAll",function(){return this.getPropertyManager().getModelFileInfo(null)});h(c$,"getProperty",function(a,b,d){if(!"DATA_API".equals(a))return this.getPropertyManager().getProperty(a,b,d);switch("scriptCheck.........consoleText.........scriptEditor........scriptEditorState...getAppConsole.......getScriptEditor.....setMenu.............spaceGroupInfo......disablePopupMenu....defaultDirectory....getPopupMenu........shapeManager........".indexOf(b)){case 0:return this.scriptCheckRet(d,
!0);case 20:return null==this.appConsole?"":this.appConsole.getText();case 40:return this.showEditor(d),null;case 60:return this.scriptEditorVisible=d.booleanValue(),null;case 80:return this.$isKiosk?this.appConsole=null:p(d,J.api.JmolAppConsoleInterface)?this.appConsole=d:null!=d&&!d.booleanValue()?this.appConsole=null:null==this.appConsole&&(null!=d&&d.booleanValue())&&(this.isJS&&(this.appConsole=J.api.Interface.getOption("consolejs.AppletConsole")),null!=this.appConsole&&this.appConsole.start(this)),
this.scriptEditor=this.isJS||null==this.appConsole?null:this.appConsole.getScriptEditor(),this.appConsole;case 100:return null==this.appConsole&&(null!=d&&d.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=d;case 140:return this.getSpaceGroupInfo(null);case 160:return this.g.disablePopupMenu=
!0,null;case 180:return this.g.defaultDirectory;case 200:return p(d,String)?this.getMenu(d):this.getPopupMenu();case 220:return this.shm.getProperty(d)}JU.Logger.error("ERROR in getProperty DATA_API: "+b);return null},"~S,~S,~O");c(c$,"showEditor",function(a){var b=this.getProperty("DATA_API","getScriptEditor",Boolean.TRUE);null!=b&&b.show(a)},"~A");c(c$,"getPropertyManager",function(){null==this.pm&&(this.pm=J.api.Interface.getInterface("JV.PropertyManager")).setViewer(this);return this.pm});c(c$,
"getModelExtract",function(a,b,d,c){return this.getPropertyManager().getModelExtract(this.getAtomBitSet(a),b,d,c)},"~O,~B,~B,~S");c(c$,"setTainted",function(a){this.isTainted=this.axesAreTainted=a&&(this.refreshing||this.creatingImage)},"~B");c(c$,"notifyMouseClicked",function(a,b,d,c){var g=JV.binding.Binding.getButtonMods(d),f=JV.binding.Binding.getClickCount(d);this.g.setI("_mouseX",a);this.g.setI("_mouseY",this.dimScreen.height-b);this.g.setI("_mouseAction",d);this.g.setI("_mouseModifiers",g);
this.g.setI("_clickCount",f);return this.sm.setStatusClicked(a,this.dimScreen.height-b,d,f,c)},"~N,~N,~N,~N");c(c$,"checkObjectClicked",function(a,b,d){return this.shm.checkObjectClicked(a,b,d,this.getVisibleFramesBitSet(),this.g.drawPicking)},"~N,~N,~N");c(c$,"checkObjectHovered",function(a,b){return 0<=a&&null!=this.shm&&this.shm.checkObjectHovered(a,b,this.getVisibleFramesBitSet(),this.getBondPicking())},"~N,~N");c(c$,"checkObjectDragged",function(a,b,d,c,g){var f=0;switch(this.getPickingMode()){case 2:f=
5;break;case 4:f=22}this.shm.checkObjectDragged(a,b,d,c,g,this.getVisibleFramesBitSet(),f)&&(this.refresh(1,"checkObjectDragged"),22==f&&this.scriptEcho(this.getShapeProperty(22,"command")))},"~N,~N,~N,~N,~N");c(c$,"rotateAxisAngleAtCenter",function(a,b,d,c,g,f,h){(a=this.tm.rotateAxisAngleAtCenter(a,b,d,c,g,f,h))&&this.refresh(-1,"rotateAxisAngleAtCenter");return a},"J.api.JmolScriptEvaluator,JU.P3,JU.V3,~N,~N,~B,JU.BS");c(c$,"rotateAboutPointsInternal",function(a,b,d,c,g,f,h,k,l,m){if(this.isHeadless()){if(f&&
3.4028235E38==g)return!1;f=!1}(a=this.tm.rotateAboutPointsInternal(a,b,d,c,g,!1,f,h,!1,k,l,m))&&this.refresh(-1,"rotateAxisAboutPointsInternal");return a},"J.api.JmolScriptEvaluator,JU.P3,JU.P3,~N,~N,~B,JU.BS,JU.V3,JU.Lst,~A");c(c$,"startSpinningAxis",function(a,b,d){this.tm.spinOn||this.tm.navOn?(this.tm.setSpinOff(),this.tm.setNavOn(!1)):this.tm.rotateAboutPointsInternal(null,a,b,this.g.pickingSpinRate,3.4028235E38,d,!0,null,!1,null,null,null)},"JU.T3,JU.T3,~B");c(c$,"getModelDipole",function(){return this.ms.getModelDipole(this.am.cmi)});
c(c$,"calculateMolecularDipole",function(a){return this.ms.calculateMolecularDipole(this.am.cmi,a)},"JU.BS");c(c$,"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(c$,"getDefaultLattice",function(){return this.g.ptDefaultLattice});c(c$,"getData",function(a,b){var d="";if(b.equalsIgnoreCase("MOL")||b.equalsIgnoreCase("SDF")||b.equalsIgnoreCase("V2000")||b.equalsIgnoreCase("V3000")||b.equalsIgnoreCase("XYZVIB")||
b.equalsIgnoreCase("CD")||b.equalsIgnoreCase("JSON"))return this.getModelExtract(a,!1,!1,b);if(0==b.toLowerCase().indexOf("property_"))d='{selected}.label("%{'+b+'}")';else{if(b.equalsIgnoreCase("CML"))return this.getModelCml(this.getAtomBitSet(a),2147483647,!0);d=b.equalsIgnoreCase("PDB")?'{selected and not hetero}.label("ATOM  %5i %-4a%1A%3.3n %1c%4R%1E   %8.3x%8.3y%8.3z%6.2Q%6.2b          %2e  ").lines+{selected and hetero}.label("HETATM%5i %-4a%1A%3.3n %1c%4R%1E   %8.3x%8.3y%8.3z%6.2Q%6.2b          %2e  ").lines':
b.equalsIgnoreCase("XYZRN")?'"" + {selected}.size + "\n\n"+{selected}.label("%-2e %8.3x %8.3y %8.3z %4.2[vdw] 1 [%n]%r.%a#%i").lines':b.startsWith("USER:")?'{selected}.label("'+b.substring(5)+'").lines':'"" + {selected}.size + "\n\n"+{selected}.label("%-2e %10.5x %10.5y %10.5z").lines'}a.equals("selected")||(d=JU.PT.rep(d,"selected",a));return this.evaluateExpression(d)},"~S,~S");c(c$,"getModelCml",function(a,b,d){return this.getPropertyManager().getModelCml(a,b,d)},"JU.BS,~N,~B");c(c$,"getPdbAtomData",
function(a,b){return this.getPropertyManager().getPdbAtomData(null==a?this.bsA():a,b)},"JU.BS,JU.OC");c(c$,"isJmolDataFrame",function(){return this.ms.isJmolDataFrameForModel(this.am.cmi)});c(c$,"setFrameTitle",function(a,b){this.ms.setFrameTitle(JU.BSUtil.newAndSetBit(a),b)},"~N,~S");c(c$,"setFrameTitleObj",function(a){this.shm.loadShape(30);this.ms.setFrameTitle(this.getVisibleFramesBitSet(),a)},"~O");c(c$,"getFrameTitle",function(){return this.ms.getFrameTitle(this.am.cmi)});c(c$,"setAtomProperty",
function(a,b,d,c,g,f,h){1649412120==b&&this.shm.deleteVdwDependentShapes(a);this.clearMinimization();this.ms.setAtomProperty(a,b,d,c,g,f,h);switch(b){case 1112541185:case 1112541186:case 1112541187:case 1112541188:case 1112541189:case 1112541190:case 1112539153:case 1112539154:case 1112539155:case 1087375365:this.refreshMeasures(!0)}},"JU.BS,~N,~N,~N,~S,~A,~A");c(c$,"checkCoordinatesChanged",function(){this.ms.recalculatePositionDependentQuantities(null,null);this.refreshMeasures(!0)});c(c$,"setAtomCoords",
function(a,b,d){0!=a.cardinality()&&(this.ms.setAtomCoords(a,b,d),this.checkMinimization(),this.sm.setStatusAtomMoved(a))},"JU.BS,~N,~O");c(c$,"setAtomCoordsRelative",function(a,b){null==b&&(b=this.bsA());0!=b.cardinality()&&(this.ms.setAtomCoordsRelative(a,b),this.checkMinimization(),this.sm.setStatusAtomMoved(b))},"JU.T3,JU.BS");c(c$,"invertAtomCoordPt",function(a,b){this.ms.invertSelected(a,null,-1,null,b);this.checkMinimization();this.sm.setStatusAtomMoved(b)},"JU.P3,JU.BS");c(c$,"invertAtomCoordPlane",
function(a,b){this.ms.invertSelected(null,a,-1,null,b);this.checkMinimization();this.sm.setStatusAtomMoved(b)},"JU.P4,JU.BS");c(c$,"invertSelected",function(a,b,d,c){var g=this.bsA();0!=g.cardinality()&&(this.ms.invertSelected(a,b,d,c,g),this.checkMinimization(),this.sm.setStatusAtomMoved(g))},"JU.P3,JU.P4,~N,JU.BS");c(c$,"moveAtoms",function(a,b,d,c,g,f,h){0!=f.cardinality()&&(this.ms.moveAtoms(a,b,d,f,c,g,h),this.checkMinimization(),this.sm.setStatusAtomMoved(f))},"JU.M3,JU.M3,JU.V3,JU.P3,~B,JU.BS,~B");
c(c$,"moveSelected",function(a,b,d,c,g,f,h,k){0!=d&&(-2147483648==c&&(this.rotateBondIndex=-1),this.isJmolDataFrame()||(-2147483648==a?(this.showSelected=!0,this.shm.loadShape(8),this.refresh(6,"moveSelected")):2147483647==a?this.showSelected&&(this.showSelected=!1,this.refresh(6,"moveSelected")):this.movingSelected||(this.movingSelected=!0,this.stopMinimization(),0<=this.rotateBondIndex&&-2147483648!=c?this.actionRotateBond(a,b,c,g):(f=this.setMovableBitSet(f,!k),0!=f.cardinality()&&(h?(c=this.ms.getAtomSetCenter(f),
this.tm.finalizeTransformParameters(),g=this.g.antialiasDisplay?2:1,h=this.tm.transformPt(c),a=-2147483648!=d?JU.P3.new3(h.x,h.y,h.z+d+0.5):JU.P3.new3(h.x+a*g+0.5,h.y+b*g+0.5,h.z),b=new JU.P3,this.tm.unTransformPoint(a,b),b.sub(c),this.setAtomCoordsRelative(b,f)):this.tm.rotateXYBy(a,b,f))),this.refresh(2,""),this.movingSelected=!1)))},"~N,~N,~N,~N,~N,JU.BS,~B,~B");c(c$,"highlightBond",function(a,b){if(!b||this.hoverEnabled){var d=null;if(0<=a){var c=this.ms.bo[a],d=c.getAtomIndex2();if(!this.isAtomAssignable(d))return;
d=JU.BSUtil.newAndSetBit(d);d.set(c.getAtomIndex1())}this.highlight(d);this.refresh(3,"highlightBond")}},"~N,~B");c(c$,"highlight",function(a){null!=a&&this.shm.loadShape(8);this.setShapeProperty(8,"highlight",a)},"JU.BS");c(c$,"setRotateBondIndex",function(a){if(0<=this.rotateBondIndex||!(0>a))this.rotatePrev1=-1,this.bsRotateBranch=null,-2147483648!=a&&(this.rotateBondIndex=a,this.highlightBond(a,!1))},"~N");c(c$,"getRotateBondIndex",function(){return this.rotateBondIndex});c(c$,"actionRotateBond",
function(a,b,d,c){if(!(0>this.rotateBondIndex)){var g=this.bsRotateBranch,f,h;if(null==g){h=this.ms.bo[this.rotateBondIndex];f=h.getAtom1();h=h.getAtom2();this.undoMoveActionClear(f.i,2,!0);d=JU.P3.new3(d,c,q((f.sZ+h.sZ)/2));this.tm.unTransformPoint(d,d);if(1==h.getCovalentBondCount()||d.distance(f)<d.distance(h)&&1!=f.getCovalentBondCount())c=f,f=h,h=c;if(90<JU.Measure.computeAngleABC(d,f,h,!0)||90<JU.Measure.computeAngleABC(d,h,f,!0))g=this.getBranchBitSet(h.i,f.i,!0);if(null!=g){d=0;for(c=f.getBonds().length;0<=
--c;)if(g.get(f.getBondedAtomIndex(c))&&2==++d){g=null;break}}null==g&&(g=this.ms.getMoleculeBitSetForAtom(f.i));this.bsRotateBranch=g;this.rotatePrev1=f.i;this.rotatePrev2=h.i}else f=this.ms.at[this.rotatePrev1],h=this.ms.at[this.rotatePrev2];d=JU.V3.new3(h.sX-f.sX,h.sY-f.sY,0);a=JU.V3.new3(a,b,0);d.cross(d,a);a=(0<d.z?1:-1)*a.length();g=JU.BSUtil.copy(g);g.andNot(this.slm.getMotionFixedAtoms());this.rotateAboutPointsInternal(this.eval,f,h,0,a,!1,g,null,null,null)}},"~N,~N,~N,~N");c(c$,"refreshMeasures",
function(a){this.setShapeProperty(6,"refresh",null);a&&this.stopMinimization()},"~B");c(c$,"functionXY",function(a,b,d){var c=null;if(0==a.indexOf("file:"))c=this.getFileAsString(a.substring(5),!1);else if(0!=a.indexOf("data2d_"))return this.sm.functionXY(a,b,d);b=Math.abs(b);d=Math.abs(d);if(null==c){a=this.getDataFloat2D(a);if(null!=a)return a;c=""}a=L(b,d,0);var g=L(b*d,0);JU.Parser.parseStringInfestedFloatArray(c,null,g);for(var f=c=0;c<b;c++)for(var h=0;h<d;h++)a[c][h]=g[f++];return a},"~S,~N,~N");
c(c$,"functionXYZ",function(a,b,d,c){var g=null;if(0==a.indexOf("file:"))g=this.getFileAsString(a.substring(5),!1);else if(0!=a.indexOf("data3d_"))return this.sm.functionXYZ(a,b,d,c);b=Math.abs(b);d=Math.abs(d);c=Math.abs(c);if(null==g){a=this.getDataFloat3D(a);if(null!=a)return a;g=""}a=L(b,d,c,0);var f=L(b*d*c,0);JU.Parser.parseStringInfestedFloatArray(g,null,f);for(var h=g=0;g<b;g++)for(var k=0;k<d;k++)for(var l=0;l<c;l++)a[g][k][l]=f[h++];return a},"~S,~N,~N,~N");h(c$,"extractMolData",function(a){if(null==
a){a=this.am.cmi;if(0>a)return null;a=this.getModelNumberDotted(a)}return this.getModelExtract(a,!0,!1,"V2000")},"~S");c(c$,"getNMRPredict",function(a){var b=this.getModelExtract("selected",!0,!1,"V2000"),d=b.indexOf("\n"),b="Jmol "+JV.Viewer.version_date+b.substring(d);return a?(this.$isApplet?this.showUrl(this.g.nmrUrlFormat+b):(this.syncScript("true","*",0),this.syncScript("H1Simulate:",".",0)),null):this.getFileAsString(this.g.nmrPredictFormat+b,!1)},"~B");c(c$,"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.version):a="&"+a;this.showUrl(this.g.helpPath+a)},"~S");c(c$,"show2D",function(a){this.showUrl(this.setLoadFormat("_"+a,"2",!1))},"~S");c(c$,"getChemicalInfo",function(a,b){var d=null,c="/";switch(null==b?1073742035:b.tok){case 1073741977:c="I";break;case 1073741978:c="K";break;case 1073742159:c="T";break;case 1073742160:c="S";break;case 1073742035:c="N";break;default:d=JS.SV.sValue(b)}var g=
this.setLoadFormat("_"+a,c,!1);"/"==c&&(g+=JU.PT.rep(d," ","%20"));return this.getFileAsString4(g,-1,!1,!1,!1)},"~S,JS.T");c(c$,"addCommand",function(a){!this.autoExit&&(this.haveDisplay&&this.getPreserveState())&&this.commandHistory.addCommand(JU.PT.replaceAllCharacters(a,"\r\n\t"," "))},"~S");c(c$,"removeCommand",function(){return this.commandHistory.removeCommand()});h(c$,"getSetHistory",function(a){return this.commandHistory.getSetHistory(a)},"~N");c(c$,"getOutputChannel",function(a,b){return this.getOutputManager().getOutputChannel(a,
b)},"~S,~A");h(c$,"writeTextFile",function(a,b){var c=new java.util.Hashtable;c.put("fileName",a);c.put("type","txt");c.put("text",b);this.outputToFile(c)},"~S,~S");h(c$,"clipImageOrPasteText",function(a){return!this.haveAccess(JV.Viewer.ACCESS.ALL)?"no":this.getOutputManager().clipImageOrPasteText(a)},"~S");h(c$,"getClipboardText",function(){if(!this.haveAccess(JV.Viewer.ACCESS.ALL))return"no";try{return this.getOutputManager().getClipboardText()}catch(a){if(y(a,Error))return J.i18n.GT._("clipboard is not accessible -- use signed applet");
throw a;}});c(c$,"processWriteOrCapture",function(a){return this.getOutputManager().processWriteOrCapture(a)},"java.util.Map");c(c$,"createZip",function(a,b,c){var e=new java.util.Hashtable;e.put("fileName",a);e.put("type",b);e.put("text",this.getStateInfo());p(c,Array)?e.put("scripts",c):p(c,JU.Lst)&&e.put("imageData",c);return this.getOutputManager().outputToFile(e)},"~S,~S,~O");h(c$,"outputToFile",function(a){return this.getOutputManager().outputToFile(a)},"java.util.Map");c(c$,"getOutputManager",
function(){return null!=this.outputManager?this.outputManager:(this.outputManager=J.api.Interface.getInterface("JV.OutputManager"+(this.isJS&&!this.isWebGL?"JS":"Awt"))).setViewer(this,this.privateKey)});c(c$,"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.refresh(-1,"set sync")},"~N,~B");h(c$,"syncScript",function(a,b,c){this.getStateCreator().syncScript(a,b,c)},"~S,~S,~N");h(c$,"getModelIndexFromId",function(a){return this.ms.getModelIndexFromId(a)},"~S");c(c$,"setSyncDriver",function(a){this.sm.setSyncDriver(a)},"~N");c(c$,"getPartialCharges",function(){return this.ms.getPartialCharges()});c(c$,"setProteinType",function(a,b){this.ms.setProteinType(null==
b?this.bsA():b,a)},"J.c.STR,JU.BS");h(c$,"getBondPoint3f1",function(a){return this.ms.getBondAtom1(a)},"~N");h(c$,"getBondPoint3f2",function(a){return this.ms.getBondAtom2(a)},"~N");c(c$,"getVanderwaalsMar",function(a){return this.defaultVdw===J.c.VDW.USER?this.userVdwMars[a]:JU.Elements.getVanderwaalsMar(a,this.defaultVdw)},"~N");c(c$,"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(c$,"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(c$,"setUserVdw",function(a){this.userVdwMars=D(JU.Elements.elementNumberMax,0);this.userVdws=L(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(c$,"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(c$,"deleteAtoms",function(a,b){var c=null==a?-1:a.nextSetBit(0);if(0>c)return 0;this.clearModelDependentObjects();if(!b){this.sm.modifySend(c,this.ms.at[c].mi,4,"deleting atom "+this.getAtomName(c));this.ms.deleteAtoms(a);var e=this.slm.deleteAtoms(a);
this.setTainted(!0);this.sm.modifySend(c,this.ms.at[c].mi,-4,"OK");return e}return this.deleteModels(this.ms.at[c].mi,a)},"JU.BS,~B");c(c$,"deleteModels",function(a,b){this.clearModelDependentObjects();this.sm.modifySend(-1,a,5,"deleting model "+this.getModelNumberDotted(a));this.setCurrentModelIndexClear(0,!1);this.am.setAnimationOn(!1);var c=JU.BSUtil.copy(this.getDeletedAtoms()),e=null==b?JU.BSUtil.newAndSetBit(a):this.ms.getModelBS(b,!1),e=this.ms.deleteModels(e);this.slm.processDeletedModelAtoms(e);
null!=this.eval&&this.eval.deleteAtomsInVariables(e);this.setAnimationRange(0,0);this.clearRepaintManager(-1);this.am.clear();this.am.initializePointers(1);this.setCurrentModelIndexClear(1<this.getModelCount()?-1:0,1<this.getModelCount());this.hoverAtomIndex=-1;this.setFileLoadStatus(J.c.FIL.DELETED,null,null,null,null,null);this.refreshMeasures(!0);null!=c&&e.andNot(c);this.sm.modifySend(-1,a,-5,"OK");return JU.BSUtil.cardinalityOf(e)},"~N,JU.BS");c(c$,"deleteBonds",function(a){var b=this.ms.getBondModelIndex(a.nextSetBit(0));
this.sm.modifySend(-1,b,2,"delete bonds "+JU.Escape.eBond(a));this.ms.deleteBonds(a,!1);this.sm.modifySend(-1,b,-2,"OK")},"JU.BS");c(c$,"deleteModelAtoms",function(a,b,c,e){this.sm.modifySend(-1,a,1,"delete atoms "+JU.Escape.eBS(e));JU.BSUtil.deleteBits(this.getFrameOffsets(),e);this.setFrameOffsets(this.getFrameOffsets());this.getDataManager().deleteModelAtoms(b,c,e);this.sm.modifySend(-1,a,-1,"OK")},"~N,~N,~N,JU.BS");c(c$,"getDeletedAtoms",function(){return this.slm.getDeletedAtoms()});c(c$,"getQuaternionFrame",
function(){return this.g.quaternionFrame.charAt(2==this.g.quaternionFrame.length?1:0)});c(c$,"calculatePointGroup",function(){return this.ms.calculatePointGroup(this.bsA())});c(c$,"getPointGroupInfo",function(a){return this.ms.getPointGroupInfo(this.getAtomBitSet(a))},"~O");c(c$,"getPointGroupAsString",function(a,b,c,e){return this.ms.getPointGroupAsString(this.bsA(),a,b,c,e)},"~B,~S,~N,~N");c(c$,"loadImageData",function(a,b,c,e){null==a&&this.scriptEcho(b);null==c?this.setBackgroundImage(null==a?
null:b,a):(this.shm.loadShape(30),this.setShapeProperty(30,"text",b),null!=a&&this.setShapeProperty(30,"image",a));this.isJS&&null!=e&&(e.mustResumeEval=!0,this.eval.resumeEval(e))},"~O,~S,~S,JS.ScriptContext");c(c$,"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(c$,"setErrorMessage",function(a,b){this.errorMessageUntranslated=b;null!=a&&this.eval.stopScriptThreads();return this.errorMessage=a},"~S,~S");h(c$,"getErrorMessage",function(){return this.errorMessage});h(c$,"getErrorMessageUn",function(){return null==this.errorMessageUntranslated?this.errorMessage:this.errorMessageUntranslated});c(c$,"setShapeErrorState",function(a,b){this.currentShapeID=a;this.currentShapeState=b},"~N,~S");c(c$,"getShapeErrorState",
function(){if(0>this.currentShapeID)return"";null!=this.ms&&this.shm.releaseShape(this.currentShapeID);this.clearRepaintManager(this.currentShapeID);return JV.JC.getShapeClassName(this.currentShapeID,!1)+" "+this.currentShapeState});c(c$,"handleError",function(a,b){try{b&&this.zapMsg(""+a),this.undoClear(),0==JU.Logger.getLogLevel()&&JU.Logger.setLogLevel(4),this.setCursor(0),this.setBooleanProperty("refreshing",!0),this.fm.setPathForAllFiles(""),JU.Logger.error("vwr handling error condition: "+a+
"  "),this.isJS||a.printStackTrace(),this.notifyError("Error","doClear="+b+"; "+a,""+a)}catch(c){try{JU.Logger.error("Could not notify error "+a+": due to "+c)}catch(e){}}},"Error,~B");c(c$,"getAtomicCharges",function(){return this.ms.getAtomicCharges()});c(c$,"getFunctions",function(a){return a?JV.Viewer.staticFunctions:this.localFunctions},"~B");c(c$,"removeFunction",function(a){a=a.toLowerCase();null!=this.getFunction(a)&&(JV.Viewer.staticFunctions.remove(a),this.localFunctions.remove(a))},"~S");
c(c$,"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");c$.isStaticFunction=c(c$,"isStaticFunction",function(a){return a.startsWith("static_")},"~S");c(c$,"isFunction",function(a){return(JV.Viewer.isStaticFunction(a)?JV.Viewer.staticFunctions:this.localFunctions).containsKey(a)},"~S");c(c$,"clearFunctions",function(){JV.Viewer.staticFunctions.clear();this.localFunctions.clear()});
c(c$,"addFunction",function(a){var b=a.getName();(JV.Viewer.isStaticFunction(b)?JV.Viewer.staticFunctions:this.localFunctions).put(b,a)},"J.api.JmolScriptFunction");c(c$,"getFunctionCalls",function(a){return this.getStateCreator().getFunctionCalls(a)},"~S");c(c$,"warn",function(a){this.isPrintOnly||JU.Logger.warn(a)},"~S");c(c$,"getMoInfo",function(a){return this.ms.getMoInfo(a)},"~N");c(c$,"checkPrivateKey",function(a){return a==this.privateKey},"~N");c(c$,"bindAction",function(a,b){this.haveDisplay&&
this.actionManager.bind(a,b)},"~S,~S");c(c$,"unBindAction",function(a,b){this.haveDisplay&&this.actionManager.unbindAction(a,b)},"~S,~S");c(c$,"getPlaneIntersection",function(a,b,c,e){return this.ms.getPlaneIntersection(a,b,c,e,1614417948==a?this.getCurrentUnitCell():null)},"~N,JU.P4,~N,~N");c(c$,"calculateStruts",function(a,b){return this.ms.calculateStruts(null==a?this.bsA():a,null==b?this.bsA():b)},"JU.BS,JU.BS");c(c$,"getPreserveState",function(){return this.g.preserveState&&null!=this.scm});
c(c$,"isKiosk",function(){return this.$isKiosk});c(c$,"hasFocus",function(){return this.haveDisplay&&(this.$isKiosk||this.apiPlatform.hasFocus(this.display))});c(c$,"setFocus",function(){this.haveDisplay&&!this.apiPlatform.hasFocus(this.display)&&this.apiPlatform.requestFocusInWindow(this.display)});c(c$,"stopMinimization",function(){null!=this.minimizer&&this.minimizer.setProperty("stop",null)});c(c$,"clearMinimization",function(){null!=this.minimizer&&this.minimizer.setProperty("clear",null)});
c(c$,"getMinimizationInfo",function(){return null==this.minimizer?"":this.minimizer.getProperty("log",0)});c(c$,"checkMinimization",function(){this.refreshMeasures(!0);this.g.monitorEnergy&&(this.minimize(0,0,this.getAllAtoms(),null,0,!1,!1,!0,!1),this.echoMessage(this.getP("_minimizationForceField")+" Energy = "+this.getP("_minimizationEnergy")))});c(c$,"minimize",function(a,b,c,e,g,f,h,k,l){var m=this.g.forceField,r=this.getModelUndeletedAtomsBitSetBs(this.getVisibleFramesBitSet());null==c?c=this.getModelUndeletedAtomsBitSet(this.getVisibleFramesBitSet().length()-
1):c.and(r);0>=g&&(g=5);e=JU.BSUtil.copy(null==e?this.slm.getMotionFixedAtoms():e);var n=0<e.cardinality();n&&c.andNot(e);g=h?new JU.BS:this.ms.getAtomsWithinRadius(g,c,!0,null);g.andNot(c);n?e.and(g):e=g;e.and(r);f&&c.or(this.addHydrogens(c,l,k));if(200<c.cardinality())JU.Logger.error("Too many atoms for minimization (>200)");else try{k||JU.Logger.info("Minimizing "+c.cardinality()+" atoms"),this.getMinimizer(!0).minimize(a,b,c,e,n,k,m)}catch(q){if(y(q,Exception))JU.Logger.error("Minimization error: "+
q.toString()),this.isJS||q.printStackTrace();else throw q;}},"~N,~N,JU.BS,JU.BS,~N,~B,~B,~B,~B");c(c$,"setMotionFixedAtoms",function(a){this.slm.setMotionFixedAtoms(a)},"JU.BS");c(c$,"getMotionFixedAtoms",function(){return this.slm.getMotionFixedAtoms()});c(c$,"getAtomicPropertyState",function(a,b,c,e,g){this.getStateCreator().getAtomicPropertyStateBuffer(a,b,c,e,g)},"JU.SB,~N,JU.BS,~S,~A");c(c$,"getCenterAndPoints",function(a,b){return this.ms.getCenterAndPoints(a,b)},"JU.Lst,~B");c(c$,"writeFileData",
function(a,b,c,e){return this.getOutputManager().writeFileData(a,b,c,e)},"~S,~S,~N,~A");c(c$,"getPdbData",function(a,b,c,e,g,f){return this.getPropertyManager().getPdbData(a,b,null==c?this.bsA():c,e,g,f)},"~N,~S,JU.BS,~A,JU.OC,~B");c(c$,"getGroupsWithin",function(a,b){return this.ms.getGroupsWithin(a,b)},"~N,JU.BS");c(c$,"getExecutor",function(){if(null!=this.executor||2>JV.Viewer.nProcessors)return this.executor;try{this.executor=J.api.Interface.getInterface("JS.ScriptParallelProcessor").getExecutor()}catch(a){if(y(a,
Exception))this.executor=null;else if(y(a,Error))this.executor=null;else throw a;}null==this.executor&&JU.Logger.error("parallel processing is not available");return this.executor});c(c$,"setShapeSize",function(a,b,c){null==c&&(c=this.bsA());this.shm.setShapeSizeBs(a,b,null,c)},"~N,~N,JU.BS");c(c$,"setShapeProperty",function(a,b,c){0>a||this.shm.setShapePropertyBs(a,b,c,null)},"~N,~S,~O");c(c$,"getShapeProperty",function(a,b){return this.shm.getShapePropertyIndex(a,b,-2147483648)},"~N,~S");c(c$,"getShapePropertyAsInt",
function(a,b){var c=this.getShapeProperty(a,b);return null==c||!p(c,Integer)?-2147483648:c.intValue()},"~N,~S");c(c$,"setModelVisibility",function(){null!=this.shm&&this.shm.setModelVisibility()});c(c$,"resetShapes",function(a){this.shm.resetShapes();a&&(this.shm.loadDefaultShapes(this.ms),this.clearRepaintManager(-1))},"~B");c(c$,"setParallel",function(a){return this.$isParallel=this.g.multiProcessor&&a},"~B");c(c$,"isParallel",function(){return this.g.multiProcessor&&this.$isParallel});c(c$,"getRenderableBitSet",
function(){return this.shm.getRenderableBitSet()});c(c$,"setAtomPickingOption",function(a){this.haveDisplay&&this.actionManager.setAtomPickingOption(a)},"~S");c(c$,"setBondPickingOption",function(a){this.haveDisplay&&this.actionManager.setBondPickingOption(a)},"~S");c(c$,"undoClear",function(){this.actionStates.clear();this.actionStatesRedo.clear()});c(c$,"undoMoveAction",function(a,b){this.getStateCreator().undoMoveAction(a,b)},"~N,~N");c(c$,"undoMoveActionClear",function(a,b,c){this.g.preserveState&&
this.getStateCreator().undoMoveActionClear(a,b,c)},"~N,~N,~B");c(c$,"moveAtomWithHydrogens",function(a,b,c,e,g){this.stopMinimization();if(null==g){var f=this.ms.at[a];g=JU.BSUtil.newAndSetBit(a);a=f.getBonds();if(null!=a)for(var h=0;h<a.length;h++){var k=a[h].getOtherAtom(f);1==k.getElementNumber()&&g.set(k.i)}}this.moveSelected(b,c,e,-2147483648,-2147483648,g,!0,!0)},"~N,~N,~N,~N,JU.BS");c(c$,"isAtomPDB",function(a){return this.ms.isAtomPDB(a)},"~N");c(c$,"isModelPDB",function(a){return this.ms.am[a].isBioModel},
"~N");c(c$,"isAtomAssignable",function(a){return this.ms.isAtomAssignable(a)},"~N");h(c$,"deleteMeasurement",function(a){this.setShapeProperty(6,"delete",Integer.$valueOf(a))},"~N");c(c$,"haveModelKit",function(){return this.ms.haveModelKit()});c(c$,"getModelKitStateBitSet",function(a,b){return this.ms.getModelKitStateBitset(a,b)},"JU.BS,JU.BS");h(c$,"getSmiles",function(a){return this.getSmilesOpt(a,-1,-1,!1,!1,!1,!1,!1)},"JU.BS");c(c$,"getSmilesOpt",function(a,b,c,e,g,f,h,k){var l=this.ms.at;null==
a&&(0>b||0>c?a=this.bsA():(g&&(b>c&&(a=b,b=c,c=a),b=l[b].getGroup().firstAtomIndex,c=l[c].getGroup().lastAtomIndex),a=new JU.BS,a.setBits(b,c+1)));b=k?JV.Viewer.getJmolVersion()+" "+this.getModelName(this.am.cmi):null;return this.getSmilesMatcher().getSmiles(l,this.getAtomCount(),a,g,f,h,b,e)},"JU.BS,~N,~N,~B,~B,~B,~B,~B");c(c$,"connect",function(a){this.ms.connect(a)},"~A");c(c$,"prompt",function(a,b,c,e){return this.$isKiosk?"null":this.apiPlatform.prompt(a,b,c,e)},"~S,~S,~A,~B");c(c$,"initializeExporter",
function(a){var b=a.get("type").equals("JS");if(b){if(null!=this.jsExporter3D)return this.jsExporter3D.initializeOutput(this,this.privateKey,this.gdata,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");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(c$,"getMouseEnabled",function(){return this.refreshing&&!this.creatingImage});h(c$,"calcAtomsMinMax",function(a,b){this.ms.calcAtomsMinMax(a,b)},"JU.BS,JU.BoxInfo");c(c$,"getObjectMap",function(a,b){switch(b){case "{":if(null!=this.getScriptManager()){var c=this.eval.getDefinedAtomSets();null!=c&&a.putAll(c);JS.T.getTokensType(a,3145728)}break;case "$":case "0":this.shm.getObjectMap(a,"$"==b)}},"java.util.Map,~S");c(c$,"getPdbBondInfo",function(a){return JV.JC.getPdbBondInfo(a,this.g.legacyHAddition)},
"~S");c(c$,"setPicked",function(a){this.g.setPicked(a)},"~N");h(c$,"runScript",function(a){var b=new JU.SB;try{if(null==this.getScriptManager())return null;this.eval.runScriptBuffer(a,b)}catch(c){if(y(c,Exception))return this.eval.getErrorMessage();throw c;}return b.toString()},"~S");c(c$,"allowSpecAtom",function(){return this.ms.allowSpecAtom()});c(c$,"setFrameDelayMs",function(a){this.ms.setFrameDelayMs(a,this.getVisibleFramesBitSet())},"~N");c(c$,"getFrameDelayMs",function(a){return this.ms.getFrameDelayMs(a)},
"~N");c(c$,"getBaseModelBitSet",function(){return this.ms.getModelAtomBitSetIncludingDeleted(this.getJDXBaseModelIndex(this.am.cmi),!0)});c(c$,"getTimeouts",function(){return this.timeouts});c(c$,"clearTimeouts",function(){null!=this.timeouts&&J.thread.TimeoutThread.clear(this.timeouts)});c(c$,"setTimeout",function(a,b,c){this.haveDisplay&&(!this.isHeadless()&&!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(c$,"triggerTimeout",function(a){this.haveDisplay&&null!=this.timeouts&&J.thread.TimeoutThread.trigger(this.timeouts,a)},"~S");c(c$,"clearTimeout",function(a){this.setTimeout(a,0,null)},"~S");c(c$,"showTimeout",function(a){return this.haveDisplay?J.thread.TimeoutThread.showTimeout(this.timeouts,a):""},"~S");c(c$,"calculatePartialCharges",function(a){if(null==a||0==a.cardinality())a=this.getModelUndeletedAtomsBitSetBs(this.getVisibleFramesBitSet());this.getMinimizer(!0).calculatePartialCharges(this.ms.bo,
this.ms.bondCount,this.ms.at,a)},"JU.BS");c(c$,"setCurrentModelID",function(a){var b=this.am.cmi;0<=b&&this.ms.setInfo(b,"modelID",a)},"~S");c(c$,"setCentroid",function(a,b){this.ms.setCentroid(a,b)},"JU.BS,~A");c(c$,"getPathForAllFiles",function(){return this.fm.getPathForAllFiles()});c(c$,"cacheGet",function(a){return this.fm.cacheGet(a,!1)},"~S");c(c$,"cacheClear",function(){this.fm.cacheClear();this.ligandModels=this.ligandModelSet=null;this.ms.clearCache()});c(c$,"cachePut",function(a,b){JU.Logger.info("Viewer cachePut "+
a);this.fm.cachePut(a,b)},"~S,~O");c(c$,"cacheFileByName",function(a,b){return null==a?(this.cacheClear(),-1):this.fm.cacheFileByNameAdd(a,b)},"~S,~B");c(c$,"cacheList",function(){return this.fm.cacheList()});c(c$,"clearThreads",function(){null!=this.eval&&this.eval.stopScriptThreads();this.stopMinimization();this.tm.clearThreads();this.setAnimationOn(!1)});c(c$,"getEvalContextAndHoldQueue",function(a){if(null==a||!this.isJS)return null;a.pushContextDown("getEvalContextAndHoldQueue");a=a.getThisContext();
a.setMustResume();this.queueOnHold=a.isJSThread=!0;return a},"J.api.JmolScriptEvaluator");c(c$,"checkInheritedShapes",function(){this.shm.checkInheritedShapes()});h(c$,"resizeInnerPanel",function(a,b){return this.autoExit||!this.haveDisplay?(this.setScreenDimension(a,b),this.dimScreen):this.sm.resizeInnerPanel(a,b)},"~N,~N");c(c$,"getFontLineShapeState",function(a,b,c){return this.getStateCreator().getFontLineShapeState(a,b,c)},"~S,~S,~A");c(c$,"getShapeSetState",function(a,b,c,e,g,f,h){this.getStateCreator().getShapeSetState(a,
b,c,e,g,f,h)},"J.shape.AtomShape,J.shape.Shape,~N,~A,JU.BS,java.util.Map,java.util.Map");c(c$,"getMeasurementState",function(a,b,c,e,g){return this.getStateCreator().getMeasurementState(a,b,c,e,g)},"J.shape.Measures,JU.Lst,~N,javajs.awt.Font,JM.TickInfo");c(c$,"getBondState",function(a,b,c){return this.getStateCreator().getBondState(a,b,c)},"J.shape.Shape,JU.BS,~B");c(c$,"getAtomShapeSetState",function(a,b){return this.getStateCreator().getAtomShapeSetState(a,b)},"J.shape.Shape,~A");c(c$,"getShapeState",
function(a){return this.getStateCreator().getShapeState(a)},"J.shape.Shape");c(c$,"getAtomShapeState",function(a){return this.getStateCreator().getAtomShapeState(a)},"J.shape.AtomShape");c(c$,"getDefaultPropertyParam",function(a){return this.getPropertyManager().getDefaultPropertyParam(a)},"~N");c(c$,"getPropertyNumber",function(a){return this.getPropertyManager().getPropertyNumber(a)},"~S");c(c$,"checkPropertyParameter",function(a){return this.getPropertyManager().checkPropertyParameter(a)},"~S");
c(c$,"extractProperty",function(a,b,c){return this.getPropertyManager().extractProperty(a,b,c,null,!1)},"~O,~O,~N");c(c$,"addHydrogens",function(a,b,c){var e=null==a;null==a&&(a=this.getModelUndeletedAtomsBitSet(this.getVisibleFramesBitSet().length()-1));var g=new JU.BS;if(0==a.cardinality()||this.ms.at[a.nextSetBit(0)].mi!=this.ms.mc-1)return g;var f=new JU.Lst,e=this.getAdditionalHydrogens(a,e,!1,f),h=!1,h=this.g.appendNew;if(0<e.length){this.clearModelDependentObjects();try{g=b?this.ms.addHydrogens(f,
e):this.addHydrogensInline(a,f,e)}catch(k){if(y(k,Exception))System.out.println(k.toString());else throw k;}h&&(this.g.appendNew=!0)}c||this.scriptStatus(J.i18n.GT.i(J.i18n.GT._("{0} hydrogens added"),e.length));return g},"JU.BS,~B,~B");c(c$,"addHydrogensInline",function(a,b,c){return null==this.getScriptManager()?null:this.scm.addHydrogensInline(a,b,c)},"JU.BS,JU.Lst,~A");h(c$,"evalFunctionFloat",function(a,b,c){return null==this.getScriptManager()?0:this.eval.evalFunctionFloat(a,b,c)},"~O,~O,~A");
c(c$,"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");h(c$,"evaluateExpression",function(a){return null==this.getScriptManager()?null:this.eval.evaluateExpression(a,!1,!1)},"~O");c(c$,"evaluateExpressionAsVariable",function(a){return null==this.getScriptManager()?null:this.eval.evaluateExpression(a,!0,!1)},"~O");c(c$,"getAtomBitSet",function(a){if(p(a,
JU.BS))return this.excludeAtoms(a,!1);this.getScriptManager();return this.getAtomBitSetEval(this.eval,a)},"~O");c(c$,"getAtomBitSetVector",function(a){return null==this.getScriptManager()?null:this.eval.getAtomBitSetVector(this.getAtomCount(),a)},"~O");c(c$,"getContextVariables",function(){return null==this.getScriptManager()?null:this.eval.getContextVariables()});c(c$,"getScriptContext",function(a){return null==this.getScriptManager()?null:this.eval.getScriptContext(a)},"~S");h(c$,"getAtomDefs",
function(a){return this.getStateCreator().getAtomDefs(a)},"java.util.Map");c(c$,"setCGO",function(a){this.shm.loadShape(23);this.shm.setShapePropertyBs(23,"setCGO",a,null)},"JU.Lst");c(c$,"setModelSet",function(a){this.ms=this.mm.modelSet=a},"JM.ModelSet");c(c$,"setObjectProp",function(a,b){this.getScriptManager();null==a&&(a="*");return null==this.eval?null:this.eval.setObjectPropSafe(a,b)},"~S,~N");c(c$,"getSceneList",function(){try{return this.ms.getInfoM("scenes")}catch(a){if(y(a,Exception))return null;
throw a;}});c(c$,"getDihedralMap",function(a){return this.ms.getDihedralMap(a)},"~A");c(c$,"setDihedrals",function(a,b,c){null==b&&(b=this.getBsBranches(a));this.ms.setDihedrals(a,b,c)},"~A,~A,~N");c(c$,"getBsBranches",function(a){return this.ms.getBsBranches(a)},"~A");c(c$,"getChainID",function(a){var b=this.chainMap.get(a);if(null!=b)return b.intValue();var c=a.charCodeAt(0);1<a.length&&(c=256+this.chainList.size(),this.chainList.addLast(a));b=Integer.$valueOf(c);this.chainMap.put(b,a);this.chainMap.put(a,
b);return c},"~S");c(c$,"getChainIDStr",function(a){return this.chainMap.get(Integer.$valueOf(a))},"~N");c(c$,"getScriptQueueInfo",function(){return null!=this.scm&&this.scm.isQueueProcessing()?Boolean.TRUE:Boolean.FALSE});c(c$,"getNMRCalculation",function(){return null==this.nmrCalculation?(this.nmrCalculation=J.api.Interface.getOption("quantum.NMRCalculation")).setViewer(this):this.nmrCalculation});c(c$,"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(c$,"calculateFormalCharges",function(a){null==a&&(a=this.bsA());return this.ms.fixFormalCharges(a)},"JU.BS");c(c$,"cachePngFiles",function(){return!this.getTestFlag(1)});c(c$,"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(c$,"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(c$,"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 1678770178:case 1141899265:b=2;break;case 1113198596:b=3;break;case 1113198597:b=4;break;case 1113200642:b=5;break;
case 1073742018:b=6;break;case 603979967:b=7;break;case 603979786:b=8}return this.g.platformSpeed>=b},"~N");c(c$,"openExportChannel",function(a,b,c){return this.getOutputManager().openOutputChannel(a,b,c,!1)},"~N,~S,~B");h(c$,"log",function(a){null!=a&&this.getOutputManager().logToFile(a)},"~S");c(c$,"getLogFileName",function(){return null==this.logFileName?"":this.logFileName});c(c$,"getCommands",function(a,b,c){return this.getStateCreator().getCommands(a,b,c)},"java.util.Map,java.util.Map,~S");
c(c$,"allowCapture",function(){return!this.$isApplet||this.$isSignedApplet});c(c$,"getHtml5Applet",function(){return this.html5Applet});c(c$,"compileExpr",function(a){var b=null==this.getScriptManager()?null:this.eval.evaluateExpression(a,!1,!0);return p(b,Array)?b:[JS.T.o(4,a)]},"~S");c(c$,"checkSelect",function(a,b){return null!=this.getScriptManager()&&this.eval.checkSelect(a,b)},"java.util.Map,~A");c(c$,"getAnnotationInfo",function(a,b,c){return this.getAnnotationParser().getAnnotationInfo(this,
a,b,c,this.am.cmi)},"JS.SV,~S,~N");c(c$,"getAtomValidation",function(a,b){return this.getAnnotationParser().getAtomValidation(this,a,b)},"~S,JM.Atom");G(self.c$);c$=B(JV.Viewer,"ACCESS",Enum);v(c$,"NONE",0,[]);v(c$,"READSPT",1,[]);v(c$,"ALL",2,[]);c$=F();self.Jmol&&Jmol.extend&&Jmol.extend("vwr",JV.Viewer.prototype);C(c$,"appletDocumentBase","","appletCodeBase","","appletIdiomaBase",null,"jsDocumentBase","");c$.strJavaVendor=c$.prototype.strJavaVendor="Java: "+System.getProperty("java.vendor","j2s");
c$.strOSName=c$.prototype.strOSName=System.getProperty("os.name","");c$.strJavaVersion=c$.prototype.strJavaVersion="Java "+System.getProperty("java.version","");C(c$,"version_date",null,"SYNC_GRAPHICS_MESSAGE","GET_GRAPHICS","SYNC_NO_GRAPHICS_MESSAGE","SET_GRAPHICS_OFF");c$.staticFunctions=c$.prototype.staticFunctions=new java.util.Hashtable;C(c$,"nProcessors",1)});n("J.api");H(J.api,"JmolJDXMOLParser");n("J.api");H(J.api,"JmolJDXMOLReader");n("J.jsv");w(["J.api.JmolJDXMOLParser"],"J.jsv.JDXMOLParser",
"java.util.Hashtable JU.BS $.Lst $.PT $.SB JU.Logger".split(" "),function(){c$=t(function(){this.line=null;this.lastModel="";this.baseModel=this.thisModelID=null;this.vibScale=0;this.loader=this.piUnitsY=this.piUnitsX=null;this.modelIdList="";this.peakFilePath=this.peakIndex=null;s(this,arguments)},J.jsv,"JDXMOLParser",null,J.api.JmolJDXMOLParser);u(c$,function(){});h(c$,"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");h(c$,"getAttribute",function(a,b){var c=JU.PT.getQuotedAttribute(a,b);return null==c?"":c},"~S,~S");h(c$,"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");h(c$,"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});h(c$,"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",
"")});h(c$,"readACDAssignments",function(a,b){var c=new JU.Lst;try{this.readLine();0>a&&(a=2147483647);for(var e=0;e<a;e++){var g=this.readLine();if(null==g||0==g.indexOf("#"))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 f=g.indexOf("'");if(0<=f)var h=g.indexOf("'",f+1),g=g.substring(0,f)+JU.PT.rep(g.substring(f+1,h),",",";")+g.substring(h+1);JU.Logger.info("Peak Assignment: "+g);var k=JU.PT.split(g,
",");c.addLast(k)}}catch(l){if(y(l,Exception))JU.Logger.error("Error reading peak assignments at "+this.line+": "+l);else throw l;}return c},"~N,~B");h(c$,"setACDAssignments",function(a,b,c,e,g){try{0<=c&&(this.peakIndex=[c]);var f=0==b.indexOf("MASS"),h=" file="+JU.PT.esc(this.peakFilePath.$replace("\\","/"));a=" model="+JU.PT.esc(a+" (assigned)");this.piUnitsY=this.piUnitsX="";var k=this.getACDPeakWidth(b)/2,l=new java.util.Hashtable,m=new JU.Lst;c=null;var r,n,q=0;if(f){c=new java.util.Hashtable;
for(var p=JU.PT.split(g,"M  ZZC"),s=p.length;1<=--s;){var t=JU.PT.getTokens(p[s]),q=Math.max(q,JU.PT.parseInt(t[0]));c.put(t[1],t[0])}r=4;n=0}else 0<=b.indexOf("NMR")?(r=0,n=3):(r=0,n=2);for(var u=e.size(),s=0;s<u;s++){var v=e.get(s),w=JU.PT.parseFloat(v[r]),z=v[n],z=f?this.fixACDAtomList(z,c,q):z.$replace(";",",");if(0<=z.indexOf("select")){var B=z.indexOf("select atomno=");if(0>B)continue;z=JU.PT.split(z.substring(B+14)," ")[0]}var C=f?"m/z="+Math.round(w)+": "+v[2]+" ("+v[1]+")":2==n?""+Math.round(10*
w)/10:null;this.getStringInfo(h,C,b,a,z,l,""+w,m,' atoms="%ATOMS%" xMin="'+(w-k)+'" xMax="'+(w+k)+'">')}return this.setPeakData(m,0)}catch(D){if(y(D,Exception))return 0;throw D;}},"~S,~S,~N,JU.Lst,~S");c(c$,"fixACDAtomList",function(a,b,c){a=a.trim();a=JU.PT.getTokens(a.$replace(";"," "));for(var e=new JU.BS,g=!1,f=0;f<a.length;f++){var h=a[f];(g=0<=h.indexOf("M"))&&(h="1-"+c);var k=h.indexOf("-");if(0<=k)for(var l=JU.PT.parseInt(h.substring(0,k)),h=JU.PT.parseInt(h.substring(k+1))+1;l<h;l++)e.set(g?
l:JU.PT.parseInt(b.get(""+l)));else e.set(JU.PT.parseInt(b.get(h)))}b=e.toJSON();return b.substring(1,b.length-1)},"~S,java.util.Map,~N");c(c$,"getACDPeakWidth",function(a){return 0<=a.indexOf("HNMR")?0.05:0<=a.indexOf("CNMR")?1:0<=a.indexOf("MASS")?1:10},"~S");h(c$,"readPeaks",function(a,b){try{0<=b&&(this.peakIndex=[b]);var c=a?1:0,e=a?"Signals":"Peaks",g=a?"<Signal":"<PeakData";if(!this.findRecord(e))return 0;var f=" file="+JU.PT.esc(this.peakFilePath.$replace("\\","/")),h=JU.PT.getQuotedAttribute(this.line,
"model"),h=" model="+JU.PT.esc(null==h?this.thisModelID:h),k=JU.PT.getQuotedAttribute(this.line,"type");this.piUnitsX=JU.PT.getQuotedAttribute(this.line,"xLabel");this.piUnitsY=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("</"+e);)if(this.line.startsWith(g)){this.getRecord(g);JU.Logger.info(this.line);var r=JU.PT.getQuotedAttribute(this.line,"title");null==k&&(k=JU.PT.getQuotedAttribute(this.line,
"type"));var n=JU.PT.getQuotedAttribute(this.line,"atoms"),q=z(100*JU.PT.parseFloat(JU.PT.getQuotedAttribute(this.line,"xMin")))+"_"+z(100*JU.PT.parseFloat(JU.PT.getQuotedAttribute(this.line,"xMax")));this.getStringInfo(f,r,k,null==JU.PT.getQuotedAttribute(this.line,"model")?h:"",n,l,q,m,this.line.substring(g.length).trim())}return this.setPeakData(m,c)}catch(p){if(y(p,Exception))return 0;throw p;}},"~B,~N");c(c$,"setPeakData",function(a,b){for(var c=0,e=a.size(),g=0;g<e;g++){var f=a.get(g),h=JU.PT.rep(f[0],
"%INDEX%",""+ ++this.peakIndex[0]),k=f[1];if(null!=k){for(var f="",l=k.nextSetBit(0);0<=l;l=k.nextSetBit(l+1))f+=","+(l+b);k=k.cardinality();c+=k;h=JU.PT.rep(h,"%ATOMS%",f.substring(1));h=JU.PT.rep(h,"%S%",1==k?"":"s");h=JU.PT.rep(h,"%NATOMS%",""+k)}JU.Logger.info("adding PeakData "+h);this.loader.addPeakData(h)}this.loader.setSpectrumPeaks(c,this.piUnitsX,this.piUnitsY);return e},"JU.Lst,~N");c(c$,"getStringInfo",function(a,b,c,e,g,f,h,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+e+" "+l;null!=g&&(a=JU.PT.rep(a,'atoms="'+g+'"','atoms="%ATOMS%"'));b=f.get(h);null==b&&(b=[a,null==g?null:new JU.BS],f.put(h,b),k.addLast(b));null!=g&&(f=b[1],g=g.$replace(","," "),g.equals("*")&&(g="0:1000"),f.or(JU.BS.unescape("({"+g+"})")))},"~S,~S,~S,~S,~S,java.util.Map,~S,JU.Lst,~S");c(c$,"getModelData",function(a){this.lastModel=
this.thisModelID;this.thisModelID=this.getAttribute(this.line,"id");var b=";"+this.thisModelID+";";if(0<=this.modelIdList.indexOf(b))this.line=this.loader.discardLinesUntilContains("</ModelData>");else{this.modelIdList+=b;for(this.baseModel=this.getAttribute(this.line,"baseModel");0>this.line.indexOf(">")&&0>this.line.indexOf("type");)this.readLine();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(c$,"findRecord",function(a){null==this.line&&this.readLine();0>this.line.indexOf("<"+a)&&(this.line=this.loader.discardLinesUntilContains2("<"+a,"##"));return 0<=this.line.indexOf("<"+a)},"~S");c(c$,"readLine",function(){return this.line=
this.loader.rd()});h(c$,"setLine",function(a){this.line=a},"~S")});n("JSV.api");H(JSV.api,"AnnotationData");n("JSV.api");H(JSV.api,"AppletFrame");n("JSV.api");w(["JSV.api.JSVAppletInterface","$.ScriptInterface"],"JSV.api.JSVAppInterface",null,function(){H(JSV.api,"JSVAppInterface",[JSV.api.JSVAppletInterface,JSV.api.ScriptInterface])});n("JSV.api");H(JSV.api,"JSVAppletInterface");n("JSV.api");H(JSV.api,"JSVFileHelper");n("JSV.api");H(JSV.api,"JSVGraphics");n("JSV.api");w(["JSV.api.JSVViewPanel"],
"JSV.api.JSVMainPanel",null,function(){H(JSV.api,"JSVMainPanel",JSV.api.JSVViewPanel)});n("JSV.api");w(["JSV.api.JSVViewPanel"],"JSV.api.JSVPanel",null,function(){H(JSV.api,"JSVPanel",JSV.api.JSVViewPanel)});n("JSV.api");H(JSV.api,"JSVTree");n("JSV.api");H(JSV.api,"JSVTreeNode");n("JSV.api");H(JSV.api,"JSVTreePath");n("JSV.api");H(JSV.api,"JSVViewPanel");n("JSV.api");H(JSV.api,"JSVZipReader");n("JSV.api");H(JSV.api,"PanelListener");n("JSV.api");H(JSV.api,"ScriptInterface");n("JSV.app");w(["JSV.api.JSVAppInterface",
"$.PanelListener"],"JSV.app.JSVApp","java.lang.Double JU.Lst $.PT JSV.common.Coordinate $.JSVFileManager $.JSViewer $.PeakPickEvent $.ScriptToken $.SubSpecChangeEvent $.ZoomEvent JU.Logger".split(" "),function(){c$=t(function(){this.appletFrame=null;this.isNewWindow=!1;this.prevPanel=this.vwr=this.syncCallbackFunctionName=this.peakCallbackFunctionName=this.loadFileCallbackFunctionName=this.coordCallbackFunctionName=this.appletReadyCallbackFunctionName=null;s(this,arguments)},JSV.app,"JSVApp",null,
[JSV.api.PanelListener,JSV.api.JSVAppInterface]);u(c$,function(a,b){this.appletFrame=a;this.initViewer(b);this.initParams(a.getParameter("script"))},"JSV.api.AppletFrame,~B");c(c$,"initViewer",function(a){this.vwr=new JSV.common.JSViewer(this,!0,a);this.appletFrame.setDropTargetListener(this.isSigned(),this.vwr);a=this.appletFrame.getDocumentBase();JSV.common.JSVFileManager.setDocumentBase(this.vwr,a)},"~B");h(c$,"isPro",function(){return this.isSigned()});h(c$,"isSigned",function(){return!0});c(c$,
"getAppletFrame",function(){return this.appletFrame});c(c$,"dispose",function(){try{this.vwr.dispose()}catch(a){if(y(a,Exception))a.printStackTrace();else throw a;}});h(c$,"getPropertyAsJavaObject",function(a){return this.vwr.getPropertyAsJavaObject(a)},"~S");h(c$,"getPropertyAsJSON",function(a){return JU.PT.toJSON(null,this.getPropertyAsJavaObject(a))},"~S");h(c$,"getCoordinate",function(){return this.vwr.getCoordinate()});h(c$,"loadInline",function(a){this.siOpenDataOrFile(a,null,null,null,-1,-1,
!0,null,null);this.appletFrame.validateContent(3)},"~S");h(c$,"exportSpectrum",function(a,b){return this.vwr.$export(a,b)},"~S,~N");h(c$,"setFilePath",function(a){this.runScript("load "+JU.PT.esc(a))},"~S");h(c$,"setSpectrumNumber",function(a){this.runScript(JSV.common.ScriptToken.SPECTRUMNUMBER+" "+a)},"~N");h(c$,"reversePlot",function(){this.toggle(JSV.common.ScriptToken.REVERSEPLOT)});h(c$,"toggleGrid",function(){this.toggle(JSV.common.ScriptToken.GRIDON)});h(c$,"toggleCoordinate",function(){this.toggle(JSV.common.ScriptToken.COORDINATESON)});
h(c$,"toggleIntegration",function(){this.toggle(JSV.common.ScriptToken.INTEGRATE)});c(c$,"toggle",function(a){null!=this.vwr.selectedPanel&&this.runScript(a+" TOGGLE")},"JSV.common.ScriptToken");h(c$,"addHighlight",function(a,b,c,e,g,f){this.runScript("HIGHLIGHT "+a+" "+b+" "+c+" "+e+" "+g+" "+f)},"~N,~N,~N,~N,~N,~N");h(c$,"removeHighlight",function(a,b){this.runScript("HIGHLIGHT "+a+" "+b+" OFF")},"~N,~N");h(c$,"removeAllHighlights",function(){this.runScript("HIGHLIGHT OFF")});h(c$,"syncScript",
function(a){this.vwr.syncScript(a)},"~S");h(c$,"writeStatus",function(a){JU.Logger.info(a)},"~S");c(c$,"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(c$,"newAppletPanel",function(){JU.Logger.info("newAppletPanel");this.appletFrame.createMainPanel(this.vwr)});h(c$,"repaint",function(){var a=
null==this.vwr?null:this.vwr.html5Applet;a&&self.Jmol&&Jmol._repaint&&Jmol._repaint(a,!0)});c(c$,"updateJS",function(){},"~N,~N");h(c$,"runScriptNow",function(a){return this.vwr.runScriptNow(a)},"~S");c(c$,"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,[Double.$valueOf(a.getXVal()),Double.$valueOf(a.getYVal()),Integer.$valueOf(c+1)]):this.appletFrame.callToJavaScript(this.peakCallbackFunctionName,[Double.$valueOf(a.getXVal()),Double.$valueOf(a.getYVal()),Double.$valueOf(b.getXVal()),Double.$valueOf(b.getYVal()),Integer.$valueOf(c+1)])}}});c(c$,"doAdvanced",function(){},"~S");h(c$,"panelEvent",function(a){p(a,JSV.common.PeakPickEvent)?this.vwr.processPeakPickEvent(a,!1):p(a,
JSV.common.ZoomEvent)||p(a,JSV.common.SubSpecChangeEvent)},"~O");h(c$,"getSolnColour",function(){return this.vwr.getSolutionColorStr(!0)});c(c$,"updateJSView",function(a){var b=this.vwr.html5Applet,c=null==b?null:this.vwr.selectedPanel;b&&null!=b._viewSet&&b._updateView(c,a)},"~S");h(c$,"syncToJmol",function(a){this.updateJSView(a);null!=this.syncCallbackFunctionName&&(JU.Logger.info("JSVApp.syncToJmol JSV>Jmol "+a),this.appletFrame.callToJavaScript(this.syncCallbackFunctionName,[this.vwr.fullName,
a]))},"~S");h(c$,"setVisible",function(a){this.appletFrame.setPanelVisible(a)},"~B");h(c$,"setCursor",function(a){this.vwr.apiPlatform.setCursor(a,this.appletFrame)},"~N");h(c$,"runScript",function(a){this.vwr.runScript(a)},"~S");h(c$,"getScriptQueue",function(){return this.vwr.scriptQueue});h(c$,"siSetCurrentSource",function(a){this.vwr.currentSource=a},"JSV.source.JDXSource");h(c$,"siSendPanelChange",function(){this.vwr.selectedPanel!==this.prevPanel&&(this.prevPanel=this.vwr.selectedPanel,this.vwr.sendPanelChange())});
h(c$,"siNewWindow",function(a,b){this.isNewWindow=a;b?null!=this.vwr.jsvpPopupMenu&&this.vwr.jsvpPopupMenu.setSelected("Window",!1):this.appletFrame.newWindow(a)},"~B,~B");h(c$,"siValidateAndRepaint",function(){var a=this.vwr.pd();null!=a&&(a.taintedAll=!0);this.appletFrame.validate();this.repaint()},"~B");h(c$,"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");
h(c$,"siOpenDataOrFile",function(a,b,c,e,g,f,h,k,l){switch(this.vwr.openDataOrFile(a,b,c,e,g,f,h,l)){case 0:null!=k&&this.runScript(k);break;case -1:return;default:this.siSetSelectedPanel(null);return}null!=this.vwr.jsvpPopupMenu&&this.vwr.jsvpPopupMenu.setCompoundMenu(this.vwr.panelNodes,this.vwr.allowCompoundMenu);JU.Logger.info(this.appletFrame.getAppletInfo()+" File "+this.vwr.currentSource.getFilePath()+" Loaded Successfully")},"~O,~S,JU.Lst,~S,~N,~N,~B,~S,~S");h(c$,"siProcessCommand",function(a){this.vwr.runScriptNow(a)},
"~S");h(c$,"siSetSelectedPanel",function(a){this.vwr.mainPanel.setSelectedPanel(this.vwr,a,this.vwr.panelNodes);this.vwr.selectedPanel=a;this.vwr.spectraTree.setSelectedPanel(this,a);null==a&&(this.vwr.selectedPanel=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");h(c$,"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");h(c$,"siLoaded",function(a){null!=this.loadFileCallbackFunctionName&&this.appletFrame.callToJavaScript(this.loadFileCallbackFunctionName,
[this.vwr.appletName,a]);this.updateJSView(null);return null},"~S");h(c$,"siExecHidden",function(){},"~B");h(c$,"siExecScriptComplete",function(a){this.vwr.showMessage(a);this.siValidateAndRepaint(!1)},"~S,~B");h(c$,"siUpdateBoolean",function(){},"JSV.common.ScriptToken,~B");h(c$,"siCheckCallbacks",function(){this.checkCallbacks()},"~S");h(c$,"siNodeSet",function(){this.appletFrame.validateContent(2);this.siValidateAndRepaint(!1)},"JSV.common.PanelNode");h(c$,"siSourceClosed",function(){},"JSV.source.JDXSource");
h(c$,"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");h(c$,"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");h(c$,"siSetPropertiesFromPreferences",function(){this.vwr.checkAutoIntegrate()},"JSV.api.JSVPanel,~B");h(c$,"siSetLoaded",function(){},"~S,~S");h(c$,"siSetMenuEnables",function(){},"JSV.common.PanelNode,~B");h(c$,"siUpdateRecentMenus",function(){},"~S");h(c$,"siExecTest",function(){this.loadInline("")},"~S");h(c$,"print",function(a){return this.vwr.print(a)},"~S")});n("JSV.app");
w(["javajs.api.GenericMouseInterface","javajs.awt.event.Event"],"JSV.app.GenericMouse",["JU.Logger"],function(){c$=t(function(){this.jsvp=this.pd=null;this.modifiersWhenPressed10=this.yWhenPressed=this.xWhenPressed=0;this.disposed=this.isMouseDown=!1;s(this,arguments)},JSV.app,"GenericMouse",null,javajs.api.GenericMouseInterface);u(c$,function(a){this.jsvp=a;this.pd=a.getPanelData()},"JSV.api.JSVPanel");h(c$,"clear",function(){});h(c$,"processEvent",function(a,b,c,e,g){if(null==this.pd)return!this.disposed&&
(501==a&&0!=(e&4))&&this.jsvp.showMenu(b,c),!0;-1!=a&&(e=JSV.app.GenericMouse.applyLeftMouse(e));switch(a){case -1:this.wheeled(g,b,e|32);break;case 501:this.xWhenPressed=b;this.yWhenPressed=c;this.modifiersWhenPressed10=e;this.pressed(g,b,c,e,!1);break;case 506:this.dragged(g,b,c,e);break;case 504:this.entered(g,b,c);break;case 505:this.exited(g,b,c);break;case 503:this.moved(g,b,c,e);break;case 502:this.released(g,b,c,e);b==this.xWhenPressed&&(c==this.yWhenPressed&&e==this.modifiersWhenPressed10)&&
this.clicked(g,b,c,e,1);break;default:return!1}return!0},"~N,~N,~N,~N,~N");c(c$,"mouseEntered",function(a){this.entered(a.getWhen(),a.getX(),a.getY())},"java.awt.event.MouseEvent");c(c$,"mouseExited",function(a){this.exited(a.getWhen(),a.getX(),a.getY())},"java.awt.event.MouseEvent");c(c$,"mouseMoved",function(a){this.moved(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(c$,"mousePressed",function(a){this.pressed(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.isPopupTrigger())},
"java.awt.event.MouseEvent");c(c$,"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(c$,"mouseReleased",function(a){this.released(a.getWhen(),a.getX(),a.getY(),a.getModifiers())},"java.awt.event.MouseEvent");c(c$,"mouseClicked",function(a){this.clicked(a.getWhen(),a.getX(),a.getY(),a.getModifiers(),a.getClickCount())},"java.awt.event.MouseEvent");c(c$,"mouseWheelMoved",function(a){a.consume();this.wheeled(a.getWhen(),
a.getWheelRotation(),a.getModifiers()|32)},"java.awt.event.MouseWheelEvent");c(c$,"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(c$,"keyPressed",function(a){null!=this.pd&&this.pd.keyPressed(a.getKeyCode(),a.getModifiers())&&a.consume()},"java.awt.event.KeyEvent");c(c$,"keyReleased",function(a){null!=this.pd&&this.pd.keyReleased(a.getKeyCode())},
"java.awt.event.KeyEvent");c(c$,"entered",function(a,b,c){null!=this.pd&&this.pd.mouseEnterExit(a,b,c,!1)},"~N,~N,~N");c(c$,"exited",function(a,b,c){null!=this.pd&&this.pd.mouseEnterExit(a,b,c,!0)},"~N,~N,~N");c(c$,"clicked",function(a,b,c,e){null!=this.pd&&this.pd.mouseAction(2,a,b,c,1,e)},"~N,~N,~N,~N,~N");c(c$,"moved",function(a,b,c,e){null!=this.pd&&(this.isMouseDown?this.pd.mouseAction(1,a,b,c,0,JSV.app.GenericMouse.applyLeftMouse(e)):this.pd.mouseAction(0,a,b,c,0,e&-29))},"~N,~N,~N,~N");c(c$,
"wheeled",function(a,b,c){null!=this.pd&&this.pd.mouseAction(3,a,0,b,0,c)},"~N,~N,~N");c(c$,"pressed",function(a,b,c,e){null==this.pd?this.disposed||this.jsvp.showMenu(b,c):(this.isMouseDown=!0,this.pd.mouseAction(4,a,b,c,0,e))},"~N,~N,~N,~N,~B");c(c$,"released",function(a,b,c,e){null!=this.pd&&(this.isMouseDown=!1,this.pd.mouseAction(5,a,b,c,0,e))},"~N,~N,~N,~N");c(c$,"dragged",function(a,b,c,e){null!=this.pd&&(20==(e&20)&&(e=e&-5|2),this.pd.mouseAction(1,a,b,c,0,e))},"~N,~N,~N,~N");c$.applyLeftMouse=
c(c$,"applyLeftMouse",function(a){return 0==(a&28)?a|16:a},"~N");h(c$,"processTwoPointGesture",function(){},"~A");h(c$,"dispose",function(){this.jsvp=this.pd=null;this.disposed=!0})});n("JSV.appletjs");w(["javajs.api.JSInterface","JSV.api.AppletFrame","$.JSVAppletInterface"],"JSV.appletjs.JSVApplet","java.lang.Boolean java.net.URL java.util.Hashtable JU.PT JSV.app.JSVApp JSV.common.JSVersion JSV.js2d.JsMainPanel $.JsPanel JU.Logger".split(" "),function(){c$=t(function(){this.viewer=this.app=null;
this.isStandalone=!1;this.htParams=this.viewerOptions=null;s(this,arguments)},JSV.appletjs,"JSVApplet",null,[JSV.api.JSVAppletInterface,JSV.api.AppletFrame,javajs.api.JSInterface]);u(c$,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(c$,"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,[this.viewer.appletName,this.viewer.fullName,Boolean.TRUE,this])});c(c$,"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(c$,"setLogging",function(){var a=
this.getValue("logLevel",this.getBooleanValue("debug",!1)?"5":"4").charCodeAt(0)-48;4!=a&&System.out.println("setting logLevel="+a+' -- To change, use script "set logLevel [0-5]"');JU.Logger.setLogLevel(a)});c(c$,"getParameter",function(a){a=this.htParams.get(a.toLowerCase());return null==a?null:String.instantialize(a.toString())},"~S");c(c$,"getBooleanValue",function(a,b){var c=this.getValue(a,b?"true":"");return c.equalsIgnoreCase("true")||c.equalsIgnoreCase("on")||c.equalsIgnoreCase("yes")},"~S,~B");
c(c$,"getValue",function(a,b){var c=this.getParameter(a);System.out.println("getValue "+a+" = "+c);return null!=c?c:b},"~S,~S");h(c$,"isPro",function(){return this.app.isPro()});h(c$,"isSigned",function(){return this.app.isSigned()});h(c$,"finalize",function(){System.out.println("JSpecView "+this+" finalized")});h(c$,"destroy",function(){this.app.dispose();this.app=null});c(c$,"getParameter",function(a,b){return this.isStandalone?System.getProperty(a,b):null!=this.getParameter(a)?this.getParameter(a):
b},"~S,~S");h(c$,"getAppletInfo",function(){return"JSpecView Applet "+JSV.common.JSVersion.VERSION});h(c$,"getSolnColour",function(){return this.app.getSolnColour()});h(c$,"getCoordinate",function(){return this.app.getCoordinate()});h(c$,"loadInline",function(a){this.app.loadInline(a)},"~S");c(c$,"$export",function(a,b){return this.app.exportSpectrum(a,b)},"~S,~N");h(c$,"exportSpectrum",function(a,b){return this.app.exportSpectrum(a,b)},"~S,~N");h(c$,"setFilePath",function(a){this.app.setFilePath(a)},
"~S");h(c$,"setSpectrumNumber",function(a){this.app.setSpectrumNumber(a)},"~N");h(c$,"toggleGrid",function(){this.app.toggleGrid()});h(c$,"toggleCoordinate",function(){this.app.toggleCoordinate()});h(c$,"toggleIntegration",function(){this.app.toggleIntegration()});h(c$,"addHighlight",function(a,b,c,e,g,f){this.app.addHighlight(a,b,c,e,g,f)},"~N,~N,~N,~N,~N,~N");h(c$,"removeAllHighlights",function(){this.app.removeAllHighlights()});h(c$,"removeHighlight",function(a,b){this.app.removeHighlight(a,b)},
"~N,~N");h(c$,"reversePlot",function(){this.app.reversePlot()});c(c$,"script",function(a){this.app.initParams(a)},"~S");h(c$,"runScript",function(a){this.app.runScript(a)},"~S");h(c$,"syncScript",function(a){this.app.syncScript(a)},"~S");h(c$,"writeStatus",function(a){this.app.writeStatus(a)},"~S");h(c$,"getPropertyAsJavaObject",function(a){return this.app.getPropertyAsJavaObject(a)},"~S");h(c$,"getPropertyAsJSON",function(a){return this.app.getPropertyAsJSON(a)},"~S");h(c$,"runScriptNow",function(a){return this.app.runScriptNow(a)},
"~S");h(c$,"print",function(a){return this.app.print(a)},"~S");h(c$,"setDropTargetListener",function(){},"~B,JSV.common.JSViewer");h(c$,"validateContent",function(){},"~N");h(c$,"createMainPanel",function(a){a.mainPanel=new JSV.js2d.JsMainPanel},"JSV.common.JSViewer");h(c$,"newWindow",function(){},"~B");h(c$,"callToJavaScript",function(a,b){var c=JU.PT.split(a,".");try{for(var e=window[c[0]],g=1;g<c.length;g++)e=e[c[g]];return e(b[0],b[1],b[2],b[3],b[4],b[5],b[6],b[7],b[8],b[9])}catch(f){System.out.println(a+
" failed "+f)}},"~S,~A");h(c$,"setPanelVisible",function(){},"~B");h(c$,"getJSVPanel",function(a,b){return null==b?JSV.js2d.JsPanel.getEmptyPanel(a):JSV.js2d.JsPanel.getPanelMany(a,b)},"JSV.common.JSViewer,JU.Lst");h(c$,"setVisible",function(){},"~B");h(c$,"getDocumentBase",function(){try{return new java.net.URL(U("java.net.URL"),this.viewerOptions.get("documentBase"),null)}catch(a){if(y(a,java.net.MalformedURLException))return null;throw a;}});h(c$,"repaint",function(){});h(c$,"validate",function(){});
h(c$,"doExitJmol",function(){});h(c$,"getApp",function(){return this.app});h(c$,"setStatusDragDropped",function(){return!0},"~N,~N,~N,~S");h(c$,"cacheFileByName",function(){return 0},"~S,~B");h(c$,"cachePut",function(){},"~S,~O");h(c$,"getGLmolView",function(){return null});h(c$,"getFullName",function(){return this.app.vwr.fullName});h(c$,"processMouseEvent",function(a,b,c,e,g){return this.app.vwr.processMouseEvent(a,b,c,e,g)},"~N,~N,~N,~N,~N");h(c$,"setDisplay",function(a){this.app.vwr.setDisplay(a)},
"~O");h(c$,"startHoverWatcher",function(){},"~B");h(c$,"update",function(){this.app.vwr.updateJS()});h(c$,"loadInlineString",function(){return null},"~S,~S,~B");h(c$,"openFile",function(a){this.app.vwr.openFile(a,!0);return null},"~S");h(c$,"openFileAsyncSpecial",function(a,b){this.app.vwr.openFileAsyncSpecial(a,b)},"~S,~N");h(c$,"processTwoPointGesture",function(a){this.app.vwr.processTwoPointGesture(a)},"~A");h(c$,"setScreenDimension",function(a,b){this.app.vwr.setScreenDimension(a,b)},"~N,~N")});
n("JSV.common");w(["java.lang.Enum","JSV.common.Coordinate"],"JSV.common.Annotation",["java.lang.Double","JU.CU"],function(){c$=t(function(){this.text="";this.is2D=this.$isPixels=!1;this.offsetY=this.offsetX=0;this.spec=null;s(this,arguments)},JSV.common,"Annotation",JSV.common.Coordinate);c(c$,"setA",function(a,b,c,e,g,f,h,k){this.set(a,b);this.spec=c;this.text=e;this.$isPixels=g;this.is2D=f;this.offsetX=h;this.offsetY=k;return this},"~N,~N,JSV.common.Spectrum,~S,~B,~B,~N,~N");c(c$,"setSpec",function(a){this.spec=
a;return this},"JSV.common.Spectrum");c(c$,"addSpecShift",function(a){this.setXVal(this.getXVal()+a)},"~N");c(c$,"isPixels",function(){return this.$isPixels});h(c$,"toString",function(){return"["+this.getXVal()+", "+this.getYVal()+","+this.text+"]"});c$.getColoredAnnotation=c(c$,"getColoredAnnotation",function(a,b,c,e){var g,f=0,h=1,k=2,l=3,m=c.size();try{switch(m){default:return null;case 1:g=c.get(0);f=h=-1;'"'==g.charAt(0)?(l=0,k=-1):(k=0,l=-1);break;case 2:f=h=-1;g=c.get(0);'"'==g.charAt(0)?(l=
0,k=1):(k=0,l=1);break;case 3:case 4:g=c.get(2),'"'==g.charAt(0)?(l=2,k=4==m?3:-1):(k=2,l=4==m?3:-1),g=c.get(2),'"'==g.charAt(0)?(l=2,k=-1):(k=2,l=-1)}if(null==e&&(0>f||0>h||0>l||0>k))return null;var r=0>f?e.getXVal():Double.$valueOf(c.get(f)).doubleValue(),n=0>h?e.getYVal():Double.$valueOf(c.get(h)).doubleValue(),q=0>k?e.getColor():a.getColor1(JU.CU.getArgbFromString(c.get(k))),p;0>l?p=e.text:(p=c.get(l),'"'==p.charAt(0)&&(p=p.substring(1,p.length-1)));return(new JSV.common.ColoredAnnotation).setCA(r,
n,b,p,q,!1,!1,0,0)}catch(s){if(y(s,Exception))return null;throw s;}},"JSV.api.JSVGraphics,JSV.common.Spectrum,JU.Lst,JSV.common.Annotation");G(self.c$);c$=B(JSV.common.Annotation,"AType",Enum);v(c$,"Integration",0,[]);v(c$,"PeakList",1,[]);v(c$,"Measurements",2,[]);v(c$,"OverlayLegend",3,[]);v(c$,"Views",4,[]);v(c$,"NONE",5,[]);c$=F()});n("JSV.common");w(["JSV.common.Annotation"],"JSV.common.ColoredAnnotation",null,function(){c$=t(function(){this.color=null;s(this,arguments)},JSV.common,"ColoredAnnotation",
JSV.common.Annotation);c(c$,"getColor",function(){return this.color});u(c$,function(){E(this,JSV.common.ColoredAnnotation,[])});c(c$,"setCA",function(a,b,c,e,g,f,h,k,l){this.setA(a,b,c,e,f,h,k,l);this.color=g;return this},"~N,~N,JSV.common.Spectrum,~S,javajs.api.GenericColor,~B,~B,~N,~N")});n("JSV.common");w(["JSV.common.Parameters"],"JSV.common.ColorParameters",["java.util.Hashtable","$.StringTokenizer","JU.CU","$.Lst","JSV.common.ScriptToken"],function(){c$=t(function(){this.plotColors=this.elementColors=
this.displayFontName=this.titleFontName=null;this.isDefault=!1;s(this,arguments)},JSV.common,"ColorParameters",JSV.common.Parameters);u(c$,function(){E(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.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(c$,"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(c$,"set",function(a,b,c){var e=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.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:e=
this.setColorFromString(b,c);break;case JSV.common.ScriptToken.TITLEFONTNAME:case JSV.common.ScriptToken.DISPLAYFONTNAME:e=this.getFontName(b,c)}null!=a&&null!=e&&a.setColorOrFont(this,b)},"JSV.common.PanelData,JSV.common.ScriptToken,~S");c(c$,"getElementColor",function(a){return this.elementColors.get(a)},"JSV.common.ScriptToken");c(c$,"setColor",function(a,b){null!=b&&this.elementColors.put(a,b);return b},"JSV.common.ScriptToken,javajs.api.GenericColor");c(c$,"copy",function(){return this.copy(this.name)});
c(c$,"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(c$,"getColorFromString",function(a){return this.getColor1(JU.CU.getArgbFromString(a))},"~S");c(c$,"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(y(c,Exception))return null;throw c;}return b.toArray(Array(b.size()))},"~S");c(c$,"setColorFromString",function(a,b){return this.setColor(a,this.getColorFromString(b))},"JSV.common.ScriptToken,~S");c(c$,"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");C(c$,"BLACK",null,"RED",null,"LIGHT_GRAY",null,"DARK_GRAY",null,"BLUE",null,"WHITE",null);c$.defaultPlotColors=c$.prototype.defaultPlotColors=Array(8);c$.defaultPlotColorNames=c$.prototype.defaultPlotColorNames="black darkGreen darkred orange magenta cyan maroon darkGray".split(" ")});n("JSV.common");c$=B(JSV.common,"CoordComparator",null,java.util.Comparator);h(c$,"compare",function(a,b){return a.getXVal()>b.getXVal()?
1:a.getXVal()<b.getXVal()?-1:0},"JSV.common.Coordinate,JSV.common.Coordinate");n("JSV.common");w(["JSV.common.CoordComparator"],"JSV.common.Coordinate",["java.lang.Double","java.util.Arrays","$.StringTokenizer","JU.DF","$.Lst"],function(){c$=t(function(){this.yVal=this.xVal=0;s(this,arguments)},JSV.common,"Coordinate");u(c$,function(){});c(c$,"set",function(a,b){this.xVal=a;this.yVal=b;return this},"~N,~N");c(c$,"getXVal",function(){return this.xVal});c(c$,"getYVal",function(){return this.yVal});
c(c$,"getXString",function(){return JU.DF.formatDecimalTrimmed(this.xVal,8)});c(c$,"getYString",function(){return JU.DF.formatDecimalTrimmed(this.yVal,8)});c(c$,"setXVal",function(a){this.xVal=a},"~N");c(c$,"setYVal",function(a){this.yVal=a},"~N");c(c$,"copy",function(){return(new JSV.common.Coordinate).set(this.xVal,this.yVal)});c(c$,"equals",function(a){return a.xVal==this.xVal&&a.yVal==this.yVal},"JSV.common.Coordinate");h(c$,"toString",function(){return"["+this.xVal+", "+this.yVal+"]"});c$.isYInRange=
c(c$,"isYInRange",function(a,b,c){return JSV.common.Coordinate.getMinY(a,0,a.length)>=b&&JSV.common.Coordinate.getMaxY(a,0,a.length)>=c},"~A,~N,~N");c$.normalise=c(c$,"normalise",function(a,b,c){var e=Array(a.length),g=JSV.common.Coordinate.getMinY(a,0,a.length);c=(JSV.common.Coordinate.getMaxY(a,0,a.length)-g)/(c-b);for(var f=0;f<a.length;f++)e[f]=(new JSV.common.Coordinate).set(a[f].getXVal(),(a[f].getYVal()-g)/c-b);return e},"~A,~N,~N");c$.reverse=c(c$,"reverse",function(a){for(var b=a.length,
c=0;c<b;c++){var e=a[c];a[c]=a[--b];a[b]=e}return a},"~A");c$.parseDSV=c(c$,"parseDSV",function(a,b,c){var e,g=e=0,f=new JU.Lst;for(a=new java.util.StringTokenizer(a," \t\n\r\f,;");a.hasMoreTokens();)e=a.nextToken().trim(),g=a.nextToken().trim(),e=Double.parseDouble(e),g=Double.parseDouble(g),e=(new JSV.common.Coordinate).set(e*b,g*c),f.addLast(e);b=Array(f.size());return f.toArray(b)},"~S,~N,~N");c$.deltaX=c(c$,"deltaX",function(a,b,c){return(a-b)/(c-1)},"~N,~N,~N");c$.removeScale=c(c$,"removeScale",
function(a,b,c){JSV.common.Coordinate.applyScale(a,1/b,1/c)},"~A,~N,~N");c$.applyScale=c(c$,"applyScale",function(a,b,c){if(1!=b||1!=c)for(var e=0;e<a.length;e++)a[e].setXVal(a[e].getXVal()*b),a[e].setYVal(a[e].getYVal()*c)},"~A,~N,~N");c$.applyShiftReference=c(c$,"applyShiftReference",function(a,b,c,e,g,f,h){if(!(b>a.length||0>b)){switch(h){case 0:g=a[a.length-b].getXVal()-g*f;break;case 1:g=c-g*f;break;case 2:g=e+g}for(c=0;c<a.length;c++)b=a[c],b.setXVal(b.getXVal()-g),a[c]=b}},"~A,~N,~N,~N,~N,~N,~N");
c$.getMinX=c(c$,"getMinX",function(a,b,c){for(var e=1.7976931348623157E308;b<c;b++){var g=a[b].getXVal();g<e&&(e=g)}return e},"~A,~N,~N");c$.getMinX=c(c$,"getMinX",function(a,b){for(var c=1.7976931348623157E308,e=0;e<a.size();e++){var g=a.get(e).getXYCoords(),g=JSV.common.Coordinate.getMinX(g,b.getStartingPointIndex(e),b.getEndingPointIndex(e));g<c&&(c=g)}return c},"JU.Lst,JSV.common.ViewData");c$.getMaxX=c(c$,"getMaxX",function(a,b,c){for(var e=-1.7976931348623157E308;b<c;b++){var g=a[b].getXVal();
g>e&&(e=g)}return e},"~A,~N,~N");c$.getMaxX=c(c$,"getMaxX",function(a,b){for(var c=-1.7976931348623157E308,e=0;e<a.size();e++){var g=a.get(e).getXYCoords(),g=JSV.common.Coordinate.getMaxX(g,b.getStartingPointIndex(e),b.getEndingPointIndex(e));g>c&&(c=g)}return c},"JU.Lst,JSV.common.ViewData");c$.getMinY=c(c$,"getMinY",function(a,b,c){for(var e=1.7976931348623157E308;b<c;b++){var g=a[b].getYVal();g<e&&(e=g)}return e},"~A,~N,~N");c$.getMinYUser=c(c$,"getMinYUser",function(a,b){for(var c=1.7976931348623157E308,
e=0;e<a.size();e++){var g=a.get(e).getUserYFactor(),f=a.get(e).getYRef(),h=a.get(e).getXYCoords(),g=(JSV.common.Coordinate.getMinY(h,b.getStartingPointIndex(e),b.getEndingPointIndex(e))-f)*g+f;g<c&&(c=g)}return c},"JU.Lst,JSV.common.ViewData");c$.getMaxY=c(c$,"getMaxY",function(a,b,c){for(var e=-1.7976931348623157E308;b<c;b++){var g=a[b].getYVal();g>e&&(e=g)}return e},"~A,~N,~N");c$.getMaxYUser=c(c$,"getMaxYUser",function(a,b){for(var c=-1.7976931348623157E308,e=0;e<a.size();e++){var g=a.get(e).getUserYFactor(),
f=a.get(e).getYRef(),h=a.get(e).getXYCoords(),g=(JSV.common.Coordinate.getMaxY(h,b.getStartingPointIndex(e),b.getEndingPointIndex(e))-f)*g+f;g>c&&(c=g)}return c},"JU.Lst,JSV.common.ViewData");c$.getYValueAt=c(c$,"getYValueAt",function(a,b){var c=JSV.common.Coordinate.getNearestIndexForX(a,b);if(0==c||c==a.length)return NaN;var e=a[c].getXVal(),g=a[c-1].getXVal(),f=a[c].getYVal(),c=a[c-1].getYVal();return e==g?f:c+(f-c)/(e-g)*(b-g)},"~A,~N");c$.intoRange=c(c$,"intoRange",function(a,b,c){return Math.max(Math.min(a,
c),b)},"~N,~N,~N");c$.getNearestIndexForX=c(c$,"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");c$.findXForPeakNearest=c(c$,"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");c$.parabolicInterpolation=c(c$,"parabolicInterpolation",function(a,b){var c=a[b-1].yVal,e=a[b+1].yVal;return a[b].xVal+(c-e)/2/(c-2*a[b].yVal+e)*(a[b+1].xVal-a[b].xVal)},"~A,~N");c$.getPickedCoordinates=c(c$,"getPickedCoordinates",function(a,b,c,e){if(null==b)return!1;var g=b.getXVal();c.setXVal(g);c.setYVal(b.getYVal());if(null==e)return!0;b=JSV.common.Coordinate.getNearestIndexForX(a,g);e.setXVal(a[b].getXVal());e.setYVal(a[b].getYVal());
return!0},"~A,JSV.common.Coordinate,JSV.common.Coordinate,JSV.common.Coordinate");c$.shiftX=c(c$,"shiftX",function(a,b){for(var c=a.length;0<=--c;)a[c].xVal+=b},"~A,~N");c$.getNearestXWithYAbove=c(c$,"getNearestXWithYAbove",function(a,b,c,e,g){b=JSV.common.Coordinate.getNearestIndexForX(a,b);var f=e?-1:1;if(g)for(;b<a.length&&0>f*(a[b].yVal-c);)b++;else for(;0<=b&&0>f*(a[b].yVal-c);)b--;return-1==b||b==a.length?NaN:JSV.common.Coordinate.findXForPeakNearest(a,a[b].getXVal(),e)},"~A,~N,~N,~B,~B");c$.c=
c$.prototype.c=new JSV.common.CoordComparator});n("JSV.common");w(["java.lang.Enum"],"JSV.common.ExportType",null,function(){c$=B(JSV.common,"ExportType",Enum);c$.getType=c(c$,"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,e=JSV.common.ExportType.values();c<e.length&&((b=e[c])||1);c++)if(b.name().equals(a))return b;return JSV.common.ExportType.UNK},"~S");c$.isExportMode=
c(c$,"isExportMode",function(a){return JSV.common.ExportType.getType(a)!==JSV.common.ExportType.UNK},"~S");v(c$,"UNK",0,[]);v(c$,"SOURCE",1,[]);v(c$,"DIF",2,[]);v(c$,"FIX",3,[]);v(c$,"SQZ",4,[]);v(c$,"PAC",5,[]);v(c$,"XY",6,[]);v(c$,"DIFDUP",7,[]);v(c$,"PNG",8,[]);v(c$,"JPG",9,[]);v(c$,"SVG",10,[]);v(c$,"SVGI",11,[]);v(c$,"CML",12,[]);v(c$,"AML",13,[]);v(c$,"PDF",14,[])});n("JSV.common");w("JSV.common.XYScaleConverter java.util.Hashtable JU.BS $.Lst JSV.common.Coordinate JSV.dialog.JSVDialog".split(" "),
"JSV.common.GraphSet","java.lang.Boolean $.Double $.Float JU.DF $.PT JSV.common.Annotation $.ColorParameters $.ColoredAnnotation $.ImageView $.Integral $.IntegralData $.Measurement $.MeasurementData $.PanelData $.Parameters $.PeakData $.PeakPickEvent $.PlotWidget $.ScaleData $.ScriptToken $.Spectrum $.ViewData JU.Logger".split(" "),function(){c$=t(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.iSpectrumClicked=this.iSpectrumMovedTo=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.xPixels0=this.xPixel10=this.yPixels=this.xPixels=this.yPixel000=this.yPixel11=this.xPixel11=this.yPixel00=this.xPixel00=this.yHArrows=this.xHArrows=this.xVArrows=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=!1;this.mapX=null;N("JSV.common.GraphSet.Highlight")||JSV.common.GraphSet.$GraphSet$Highlight$();this.triggered=!0;this.gMain=this.g2d=this.plotColors=this.image2D=this.jsvp=this.aIntegrationRatios=this.dialogs=null;s(this,arguments)},JSV.common,"GraphSet",null,JSV.common.XYScaleConverter);
K(c$,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(c$,function(a){this.pd=a;this.jsvp=a.jsvp;this.g2d=a.g2d},"JSV.common.PanelData");c(c$,"setSpectrumMovedTo",function(a){return this.iSpectrumMovedTo=a},"~N");c(c$,"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(c$,"setSpectrumSelected",function(a){var b=a!=this.iSpectrumSelected;this.iSpectrumSelected=a;b&&this.getCurrentView();return this.iSpectrumSelected},"~N");c(c$,"closeDialogsExcept",function(a){if(null!=this.dialogs)for(var b,c=this.dialogs.entrySet().iterator();c.hasNext()&&((b=c.next())||1);){var e=b.getValue();p(e,JSV.dialog.JSVDialog)&&(a===JSV.common.Annotation.AType.NONE||e.getAType()!==a)&&e.setVisible(!1)}},
"JSV.common.Annotation.AType");c(c$,"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();p(c,JSV.dialog.JSVDialog)&&c.dispose()}this.dialogs=null});c(c$,"isDrawNoSpectra",function(){return-2147483648==this.iSpectrumSelected});c(c$,"getFixedSelectedSpectrumIndex",
function(){return Math.max(this.iSpectrumSelected,0)});c(c$,"getSpectrum",function(){return this.getSpectrumAt(this.getFixedSelectedSpectrumIndex()).getCurrentSubSpectrum()});c(c$,"getSpectrumAt",function(a){return this.spectra.get(a)},"~N");c(c$,"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(c$,"addSpec",function(a){this.spectra.addLast(a);this.nSpectra++},"JSV.common.Spectrum");c(c$,"splitStack",function(a,
b){b&&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&&!b,this.setSpectrumClicked(this.iSpectrumSelected));this.stackSelected=!1;JSV.common.GraphSet.setFractionalPositions(this.pd,a,JSV.common.PanelData.LinkMode.NONE)},"JU.Lst,~B");c(c$,"setPositionForFrame",function(a){0>a&&(a=0);var b=this.height-50;this.xPixel00=q(this.width*
this.fX0);this.xPixel11=q(this.xPixel00+this.width*this.fracX-1);this.xHArrows=this.xPixel00+25;this.xVArrows=this.xPixel11-q(this.right/2);this.xPixel0=this.xPixel00+q(this.left*(1-this.fX0));this.xPixel10=this.xPixel1=this.xPixel11-this.right;this.xPixels0=this.xPixels=this.xPixel1-this.xPixel0+1;this.yPixel000=(0==this.fY0?25:0)+q(this.height*this.fY0);this.yPixel00=this.yPixel000+q(b*this.fracY*a);this.yPixel11=this.yPixel00+q(b*this.fracY)-1;this.yHArrows=this.yPixel11-12;this.yPixel0=this.yPixel00+
q(this.top/2);this.yPixel1=this.yPixel11-q(this.bottom/2);this.yPixels=this.yPixel1-this.yPixel0+1;null!=this.imageView&&this.is2DSpectrum&&(this.setImageWindow(),this.pd.display1D?(this.xPixels=q(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(c$,"hasPoint",function(a,b){return a>=this.xPixel00&&a<=this.xPixel11&&b>=this.yPixel000&&
b<=this.yPixel11*this.nSplit},"~N,~N");c(c$,"isInPlotRegion",function(a,b){return a>=this.xPixel0&&a<=this.xPixel1&&b>=this.yPixel0&&b<=this.yPixel1},"~N,~N");c(c$,"getSplitPoint",function(a){return Math.max(0,Math.min(q((a-this.yPixel000)/(this.yPixel11-this.yPixel00)),this.nSplit-1))},"~N");c(c$,"isSplitWidget",function(a,b){return this.isSplittable&&a>=this.xPixel11-20&&b>=this.yPixel00+1&&a<=this.xPixel11-10&&b<=this.yPixel00+11},"~N,~N");c(c$,"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),e=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 g=0;g<
this.nSpectra;g++){var f=this.spectra.get(g).getXYCoords().length-1;c[g]=JSV.common.Coordinate.intoRange(a,0,f);e[g]=JSV.common.Coordinate.intoRange(b,0,f);this.allowStackedYScale=(new Boolean(this.allowStackedYScale&(this.spectra.get(g).getYUnits().equals(this.spectra.get(0).getYUnits())&&this.spectra.get(g).getUserYFactor()==this.spectra.get(0).getUserYFactor()))).valueOf()}this.getView(0,0,0,0,c,e,null,null);this.viewList=new JU.Lst;this.viewList.addLast(this.viewData)},"~N,~N");c(c$,"getView",
function(a,b,c,e,g,f,h,k){var l=0==this.graphsTemp.size()?this.spectra:this.graphsTemp,m=this.getSpectrumAt(0).getSubSpectra(),r=null==m||2==m.size()&&m.get(1).isImaginary(),n=!this.getSpectrumAt(0).is1D();r&&c==e?l=this.spectra:c==e&&(this.viewData=new JSV.common.ViewData(m,c,e,this.getSpectrum().isContinuous()),l=null);null!=l&&(this.viewData=new JSV.common.ViewData(l,c,e,g,f,this.getSpectrumAt(0).isContinuous(),n),a!=b&&this.getScale().setXRange(a,b));null!=h&&(JSV.common.ScaleData.copyScaleFactors(h,
this.viewData.getScaleData()),null!=k&&JSV.common.ScaleData.copyYScales(k,this.viewData.getScaleData()),this.getCurrentView())},"~N,~N,~N,~N,~A,~A,~A,~A");c(c$,"isNearby",function(a,b,c,e){var g=a.getXVal(),f=c.toPixelX(g);a=this.toPixelY(a.getYVal());g=b.getXVal();c=c.toPixelX(g);b=this.toPixelY(b.getYVal());return Math.abs(f-c)+Math.abs(a-b)<e},"JSV.common.Coordinate,JSV.common.Coordinate,JSV.common.XYScaleConverter,~N");c(c$,"setReversePlot",function(a){(this.reversePlot=a)&&this.closeDialogsExcept(JSV.common.Annotation.AType.NONE);
this.setDrawXAxis()},"~B");c(c$,"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(c$,"isInTopBar",function(a,b){return a==this.fixX(a)&&b>this.pin1Dx0.yPixel0-2&&b<this.pin1Dx0.yPixel1},"~N,~N");c(c$,"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(c$,"isInRightBar",function(a,b){return b==this.fixY(b)&&a>this.pin1Dy0.xPixel1&&a<this.pin1Dy0.xPixel0+2},"~N,~N");c(c$,"isInRightBar2D",function(a,b){return null!=this.imageView&&b==this.fixY(b)&&a>this.pin2Dy0.xPixel1&&a<this.pin2Dy0.xPixel0+2},"~N,~N");c(c$,"toX0",function(a){return this.viewList.get(0).getScale().toX0(this.fixX(a),this.xPixel0,this.xPixel1,this.drawXAxisLeftToRight)},"~N");c(c$,"toY0",function(a){return this.viewList.get(0).getScale().toY0(this.fixY(a),this.yPixel0,
this.yPixel1)},"~N");h(c$,"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");h(c$,"toY",function(a){return this.getScale().toY(a,this.yPixel0)},"~N");c(c$,"toPixelX",function(a){return this.getScale().toPixelX(a,this.xPixel0,this.xPixel1,this.drawXAxisLeftToRight)},"~N");c(c$,"toPixelY",function(a){return this.getScale().toPixelY(a,this.yPixel1)},"~N");c(c$,"toPixelX0",
function(a){return this.viewList.get(0).getScale().toPixelX0(a,this.xPixel0,this.xPixel1,this.drawXAxisLeftToRight)},"~N");c(c$,"toPixelY0",function(a){return this.fixY(this.viewList.get(0).getScale().toPixelY0(a,this.yPixel0,this.yPixel1))},"~N");c(c$,"fixX",function(a){return JSV.common.Coordinate.intoRange(a,this.xPixel0,this.xPixel1)},"~N");c(c$,"fixY",function(a){return JSV.common.Coordinate.intoRange(a,this.yPixel0,this.yPixel1)},"~N");c(c$,"getXPixel0",function(){return this.xPixel0});c(c$,
"getXPixels",function(){return this.xPixels});h(c$,"getYPixels",function(){return this.yPixels});c(c$,"getScale",function(){return this.viewData.getScale()});c(c$,"toPixelYint",function(a){return this.yPixel1-q(Double.isNaN(a)?-2147483648:this.yPixels*a)},"~N");c(c$,"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(c$,"addAnnotation",function(a,b){null==this.annotations&&
(this.annotations=new JU.Lst);for(var c=!1,e=this.annotations.size();0<=--e;)if(a.is2D?this.isNearby(this.annotations.get(e),a,this.imageView,10):a.equals(this.annotations.get(e)))c=!0,this.annotations.remove(e);0<a.text.length&&(!c||!b)&&this.annotations.addLast(a)},"JSV.common.Annotation,~B");c(c$,"setImageWindow",function(){this.imageView.setPixelWidthHeight(q((this.pd.display1D?0.6:1)*this.xPixels0),this.yPixels);this.imageView.setXY0(this.getSpectrumAt(0),q(Math.floor(this.xPixel10-this.imageView.xPixels)),
this.yPixel0)});c(c$,"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(c$,"setXPixelMovedTo",function(a,b,c,e){1.7976931348623157E308==a&&1.7976931348623157E308==b?(this.xPixelMovedTo=c,this.xPixelMovedTo2=e,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(c$,"processPendingMeasurement",function(a,b,c){if(this.isInPlotRegion(a,b)){var e=this.toX(a),g=this.toY(b),f=e;switch(c){case 0:this.pendingMeasurement.setPt2(this.toX(a),this.toY(b));
break;case 3:case 2:if(0>this.iSpectrumClicked)break;var h=this.spectra.get(this.iSpectrumClicked);this.setScale(this.iSpectrumClicked);3!=c&&(c=this.findMeasurement(this.selectedSpectrumMeasurements,a,b,1),null!=c?(e=c.getXVal(),g=c.getYVal()):null!=(c=this.findMeasurement(this.selectedSpectrumMeasurements,a,b,2))?(e=c.getXVal2(),g=c.getYVal2()):e=this.getNearestPeak(h,e,g));this.pendingMeasurement=(new JSV.common.Measurement).setM1(e,g,h);this.pendingMeasurement.setPt2(f,g);this.pd.repaint();break;
case 1:case -2:case -3:for(f=null!=this.pendingMeasurement&&this.isVisible(this.getDialog(JSV.common.Annotation.AType.Measurements,-1));f;){this.setScale(this.getSpectrumIndex(this.pendingMeasurement.spec));if(3!=c){if(!this.findNearestMaxMin()){f=!1;break}a=this.xPixelMovedTo}e=this.toX(a);g=this.toY(b);this.pendingMeasurement.setPt2(e,g);if(0==this.pendingMeasurement.text.length){f=!1;break}this.setMeasurement(this.pendingMeasurement);if(1!=c){f=!1;break}this.setSpectrumClicked(this.getSpectrumIndex(this.pendingMeasurement.spec));
this.pendingMeasurement=(new JSV.common.Measurement).setM1(e,g,this.pendingMeasurement.spec);break}f||(this.pendingMeasurement=null);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}}else this.pendingMeasurement=null},"~N,~N,~N");c(c$,"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(c$,"getNearestPeak",function(a,b,c){var e=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(e)?a:Double.isNaN(a)?e:Math.abs(e-b)<Math.abs(a-b)?e:a},"JSV.common.Spectrum,~N,~N");c(c$,"findMeasurement",function(a,b,c,e){if(null==a||0==a.size())return null;if(0==e){var g=this.findMeasurement(a,
b,c,-1);return null!=g||p(a.get(0),JSV.common.Integral)?g:this.findMeasurement(a,b,c,-2)}for(var f=a.size();0<=--f;){var g=a.get(f),h,k,l,m;p(g,JSV.common.Integral)?(h=k=this.toPixelX(g.getXVal2()),l=this.toPixelYint(g.getYVal()),m=this.toPixelYint(g.getYVal2())):(h=this.toPixelX(g.getXVal()),k=this.toPixelX(g.getXVal2()),l=m=-2==e?this.yPixel1-2:this.toPixelY(g.getYVal()));switch(e){case 1:if(4>Math.abs(b-h)+Math.abs(c-l))return g;break;case 2:if(4>Math.abs(b-k)+Math.abs(c-m))return g;break;case -5:l=
m=q((l+m)/2),k=h+20;default:if(JSV.common.GraphSet.isOnLine(b,c,h,l,k,m))return g}}return null},"JSV.common.MeasurementData,~N,~N,~N");c(c$,"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(c$,"checkArrowUpDownClick",function(a,b){var c=!1,e=this.isArrowClick(a,b,3)?JSV.common.GraphSet.RT2:this.isArrowClick(a,b,4)?1/JSV.common.GraphSet.RT2:0;if(0!=e){1<this.nSplit&&this.setSpectrumSelected(this.iSpectrumMovedTo);if((1==this.nSpectra||0<=this.iSpectrumSelected)&&this.spectra.get(this.getFixedSelectedSpectrumIndex()).isTransmittance())e=1/e;this.viewData.scaleSpectrum(null==this.imageView?this.iSpectrumSelected:-2,e);c=!0}else this.isArrowClick(a,b,-1)&&
(this.resetViewCompletely(),c=!0);c&&(null!=this.imageView&&(this.update2dImage(!1),this.resetPinsFromView()),this.pd.taintedAll=!0);return c},"~N,~N");c(c$,"resetViewCompletely",function(){this.clearViews();this.showAllStacked&&!this.stackSelected&&this.closeDialogsExcept(JSV.common.Annotation.AType.NONE);this.viewData.resetScaleFactors();this.updateDialogs()});c(c$,"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(c$,"isArrowClick",function(a,b,c){switch(c){case 3:case 4:case -1:return c=q((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(c$,"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?""+q(Math.min(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal()))+" - "+q(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 e=Double.$valueOf(b.substring(0,c)).doubleValue(),g=Double.$valueOf(b.substring(c+1)).doubleValue();a===this.pin1Dx01?this.doZoom(e,this.pin1Dy0.getYVal(),g,this.pin1Dy1.getYVal(),!0,!1,!1,!0,!0):a===this.pin1Dy01?this.doZoom(this.pin1Dx0.getXVal(),e,this.pin1Dx1.getXVal(),g,null==this.imageView,null==this.imageView,!1,!1,!0):a===this.pin2Dx01?(this.imageView.setView0(this.imageView.toPixelX0(e),this.pin2Dy0.yPixel0,this.imageView.toPixelX0(g),this.pin2Dy1.yPixel0),this.doZoom(e,this.pin1Dy0.getYVal(),
g,this.pin1Dy1.getYVal(),!1,!1,!1,!0,!0)):a===this.pin2Dy01&&(this.imageView.setView0(this.pin2Dx0.xPixel0,this.imageView.toPixelY0(e),this.pin2Dx1.xPixel0,this.imageView.toPixelY0(g)),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 f=Double.$valueOf(b).doubleValue();a.isXtype?(g=a===this.pin1Dx0||a===this.cur2Dx0||a===this.pin2Dx0?this.pin1Dx1.getXVal():
this.pin1Dx0.getXVal(),this.doZoom(f,0,g,0,!a.is2D,!1,!1,!0,!0)):a===this.cur2Dy?this.setCurrentSubSpectrum(q(f)):a===this.pin2Dy0||a===this.pin2Dy1?(g=a===this.pin2Dy0?this.pin2Dy1.yPixel0:this.pin2Dy0.yPixel0,this.imageView.setView0(this.pin2Dx0.xPixel0,this.imageView.subIndexToPixelY(q(f)),this.pin2Dx1.xPixel0,g)):(g=a===this.pin1Dy0?this.pin1Dy1.getYVal():this.pin1Dy0.getYVal(),this.doZoom(this.pin1Dx0.getXVal(),f,this.pin1Dx1.getXVal(),g,null==this.imageView,null==this.imageView,!1,!1,!0))}}catch(h){if(!y(h,
Exception))throw h;}}},"JSV.common.PlotWidget");c(c$,"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.remove(b)},"JSV.common.Spectrum");c(c$,"setCoordClicked",function(a,b,c){0==c&&(this.nextClickForSetPeak=!1);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(c$,"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(c$,"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=[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(c$,"setWidgetX",function(a,b){a.setX(b,this.toPixelX0(b))},"JSV.common.PlotWidget,~N");c(c$,"setWidgetY",function(a,b){a.setY(b,this.toPixelY0(b))},"JSV.common.PlotWidget,~N");c(c$,"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(c$,"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(c$,"resetX",function(a){this.setWidgetX(a,a.getXVal())},"JSV.common.PlotWidget");c(c$,"resetY",function(a){this.setWidgetY(a,a.getYVal())},
"JSV.common.PlotWidget");c(c$,"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?q((this.xPixel1+this.imageView.xPixel0)/2):this.imageView.xPixel0-6,this.cur2Dy.xPixel1=this.imageView.xPixel1+5)},"~B");c(c$,"setDerivedPins",function(a){this.triggered=!0;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,q((this.pin1Dx0.xPixel0+this.pin1Dx1.xPixel0)/2));this.pin1Dy01.setY(0,q((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,q((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,q((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(c$,"doZoom",function(a,b,c,e,g,f,h,k,l){a==c?(a=this.getScale().minXOnScale,c=this.getScale().maxXOnScale):this.isLinked&&k&&this.pd.doZoomLinked(this,a,
c,l,h,g);a>c&&(k=a,a=c,c=k);b>e&&(k=b,b=e,e=k);k=!g&&null!=this.imageView&&(this.imageView.minZ!=b||this.imageView.maxZ!=e);if(this.zoomEnabled||k){if(h){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.taintedAll=!0;h=this.viewData.getScaleData();var m=D(this.nSpectra,0),r=D(this.nSpectra,0);this.graphsTemp.clear();var n=this.getSpectrumAt(0).getSubSpectra(),
n=null==n||2==n.size();if(this.getSpectrumAt(0).is1D()&&!n){if(this.graphsTemp.addLast(this.getSpectrum()),!JSV.common.ScaleData.setDataPointIndices(this.graphsTemp,a,c,3,m,r))return}else if(!JSV.common.ScaleData.setDataPointIndices(this.spectra,a,c,3,m,r))return;if(n=b==e)g=!k&&g?g=this.getScale().spectrumScaleFactor:1,1E-4>Math.abs(g-1)&&(b=this.getScale().minYOnScale,e=this.getScale().maxYOnScale);g=null;if(n||f)this.getCurrentView(),g=this.viewData.getNewScales(this.iSpectrumSelected,n,b,e);this.getView(a,
c,b,e,m,r,h,g);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,e);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(c$,"updateDialogs",function(){this.updateDialog(JSV.common.Annotation.AType.PeakList,
-1);this.updateDialog(JSV.common.Annotation.AType.Measurements,-1)});c(c$,"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(c$,"addCurrentZoom",function(){if(this.viewList.size()>this.currentZoomIndex+1)for(var a=this.viewList.size()-1;a>this.currentZoomIndex;a--)this.viewList.remove(a);this.viewList.addLast(this.viewData);
this.currentZoomIndex++});c(c$,"setZoomTo",function(a){this.currentZoomIndex=a;this.viewData=this.viewList.get(a);this.resetPinsFromView()},"~N");c(c$,"clearViews",function(){this.isLinked&&this.pd.clearLinkViews(this);this.setZoom(0,0,0,0);for(var a=this.viewList.size();1<=--a;)this.viewList.remove(a)});c(c$,"drawAll",function(a,b,c,e,g,f){this.g2d=this.pd.g2d;this.gMain=a;var h=this.getSpectrumAt(0).getSubIndex();this.is2DSpectrum=!this.getSpectrumAt(0).is1D()&&(this.isLinked||this.pd.getBoolean(JSV.common.ScriptToken.DISPLAY2D))&&
(null!=this.imageView||this.get2DImage());null!=this.imageView&&f&&(this.pd.isPrinting&&this.g2d!==this.pd.g2d0&&this.g2d.newGrayScaleImage(a,this.image2D,this.imageView.imageWidth,this.imageView.imageHeight,this.imageView.getBuffer()),this.is2DSpectrum&&this.setPositionForFrame(e),this.draw2DImage());var k=this.stackSelected||!this.showAllStacked?this.iSpectrumSelected:-1,l=!this.showAllStacked||1==this.nSpectra||0<=k,m=null==this.imageView||this.pd.display1D,r=0<=k?1:0,n=this.getFixedSelectedSpectrumIndex();
if(m&&f&&(this.fillBox(a,this.xPixel0,this.yPixel0,this.xPixel1,this.yPixel1,JSV.common.ScriptToken.PLOTAREACOLOR),0>k)){l=!0;for(k=0;k<this.nSpectra;k++)this.doPlot(k,e)&&0!=r++&&(l=(new Boolean(l&this.viewData.areYScalesSame(k-1,k))).valueOf())}var q=1==this.nSpectra?0:!this.showAllStacked?this.iSpectrumMovedTo:this.iSpectrumSelected;c=c===a?b:c;if(f){var k=!this.isLinked&&this.isSplittable&&(1==this.nSplit||this.pd.currentSplitPoint==e),p=this.zoomEnabled&&!this.isDrawNoSpectra()&&this.pd.isCurrentGraphSet(this)&&
this.spectra.get(0).isScalable()&&(k||1==this.nSpectra)&&(1==this.nSplit||this.pd.currentSplitPoint==this.iSpectrumMovedTo);this.drawFrame(a,q,k,this.isSplittable,p)}if(this.pd.isCurrentGraphSet(this)&&e==this.pd.currentSplitPoint&&(2>r||0<=this.iSpectrumSelected))this.$haveSelectedSpectrum=!0;this.haveSingleYScale=this.showAllStacked&&1<this.nSpectra?this.allowStackedYScale&&l:!0;if(m){l=z(this.yPixels*(this.yStackOffsetPercent/100));this.haveLeftRightArrows=!1;for(p=k=0;k<this.nSpectra;k++)if(this.doPlot(k,
e)){var q=this.stackSelected&&0<=this.iSpectrumSelected&&this.iSpectrumSelected!=k,s=!this.reversePlot&&this.getShowAnnotation(JSV.common.Annotation.AType.Integration,k)&&(!this.showAllStacked||this.iSpectrumSelected==k)?this.getDialog(JSV.common.Annotation.AType.Integration,k).getData():null;this.setScale(k);var t=this.spectra.get(k);1<this.nSplit&&(n=k);var u=!q&&(1==this.nSplit||this.showAllStacked||this.iSpectrumSelected==e),v=u&&this.$haveSelectedSpectrum&&k==n;u&&(this.resetPinsFromView(),this.drawWidgets(b,
c,h,g,m,v,!1));this.haveSingleYScale&&(k==n&&f)&&(this.drawGrid(a),this.pd.isPrinting&&1<this.nSplit&&this.drawSpectrumSource(a,k));u&&this.drawWidgets(b,c,h,!1,m,v,!0);!this.isDrawNoSpectra()&&((1==this.nSpectra||0<=this.iSpectrumSelected)&&(this.haveSingleYScale&&k==n||this.showAllStacked&&this.stackSelected&&k==this.iSpectrumSelected))&&this.drawHighlightsAndPeakTabs(b,c,k);if(f){if((1==r&&0>this.iSpectrumSelected||this.iSpectrumSelected==k&&this.pd.isCurrentGraphSet(this))&&this.pd.titleOn&&!this.pd.titleDrawn)this.pd.drawTitle(a,
this.height,this.width,this.pd.getDrawTitle(this.pd.isPrinting)),this.pd.titleDrawn=!0;this.haveSingleYScale&&k==n&&(this.pd.getBoolean(JSV.common.ScriptToken.YSCALEON)&&this.drawYScale(a,this),this.pd.getBoolean(JSV.common.ScriptToken.YUNITSON)&&this.drawYUnits(a))}u=t.isContinuous();v=(1<this.nSplit?k==this.iSpectrumMovedTo:this.isLinked||k==n)&&!this.pd.isPrinting&&t.isContinuous();f&&this.drawSpectrum(a,k,p,q,s,u,v);this.drawMeasurements(b,k);null!=this.pendingMeasurement&&this.pendingMeasurement.spec===
t&&this.drawMeasurement(b,this.pendingMeasurement);v&&0<=this.xPixelMovedTo&&this.drawSpectrumPointer(b,t,p,s);1<this.nSpectra&&(1==this.nSplit&&this.pd.isCurrentGraphSet(this)&&f)&&(this.haveLeftRightArrows=!0,this.pd.isPrinting||(this.setScale(0),q=this.iSpectrumSelected,2!=this.nSpectra&&(this.setPlotColor(a,(q+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<=q&&(this.setPlotColor(a,
q),this.fillCircle(a,this.xHArrows,this.yHArrows,!0)),this.setCurrentBoxColor(a),this.fillCircle(a,this.xHArrows,this.yHArrows,!1),this.setPlotColor(a,(q+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)));p-=l}f&&(this.pd.getBoolean(JSV.common.ScriptToken.XSCALEON)&&this.drawXScale(a,this),this.pd.getBoolean(JSV.common.ScriptToken.XUNITSON)&&this.drawXUnits(a))}else f&&(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<=h&&this.draw2DUnits(a)),this.drawWidgets(b,c,h,g,m,!0,!1),this.drawWidgets(b,c,h,g,m,!0,!0);null!=this.annotations&&this.drawAnnotations(b,this.annotations,null)},"~O,~O,~O,~N,~B,~B");c(c$,"drawSpectrumSource",function(a,b){this.pd.printFilePath(a,this.pd.thisWidth-this.pd.right,this.yPixel0,this.spectra.get(b).getFilePath())},"~O,~N");c(c$,"doPlot",function(a,b){var c=this.stackSelected&&
0<=this.iSpectrumSelected&&this.iSpectrumSelected!=a,e=this.showAllStacked||-1==this.iSpectrumSelected||this.iSpectrumSelected==a;return 1<this.nSplit?a==b:e&&(!this.pd.isPrinting||!c)},"~N,~N");c(c$,"drawSpectrumPointer",function(a,b,c,e){this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);var g=this.pd.integralShiftMode;null!=e&&((!this.pd.ctrlPressed||this.pd.isIntegralDrag)&&!this.isOnSpectrum(this.pd.mouseX,this.pd.mouseY,-1)?e=null:0==g&&(g=this.getShiftMode(this.pd.mouseX,this.pd.mouseY)));
var f=this.yValueMovedTo;this.yValueMovedTo=null==e?b.getYValueAt(this.xValueMovedTo):e.getPercentYValueAt(this.xValueMovedTo);this.setCoordStr(this.xValueMovedTo,this.yValueMovedTo);0!=g?(this.setPlotColor(a,0),b=0>g?this.yPixelPlot0:this.yPixelPlot1,this.drawHandle(a,0>g?this.xPixelPlot1:this.xPixelPlot0,b,!1)):(null!=e&&this.g2d.setStrokeBold(a,!0),Double.isNaN(f)||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==e?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!=e&&this.g2d.setStrokeBold(a,!1))},"~O,JSV.common.Spectrum,~N,JSV.common.IntegralData");c(c$,"setScale",function(a){this.viewData.setScale(a,this.xPixels,this.yPixels,this.spectra.get(a).isInverted())},"~N");c(c$,
"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(c$,"drawPeakTabs",function(a,b,c){var e=1==this.nSpectra||0<=this.iSpectrumSelected?c.getPeakList():null;if(null!=e&&0<e.size()){null!=this.piMouseOver&&this.piMouseOver.spectrum===
c&&this.pd.isMouseUp()?(this.g2d.setGraphicsColor(b,this.g2d.getColor4(240,240,240,140)),this.drawPeak(b,this.piMouseOver,0),c.setHighlightedPeak(this.piMouseOver)):c.setHighlightedPeak(null);this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);for(b=e.size();0<=--b;){var g=e.get(b);this.drawPeak(a,g,g===c.getSelectedPeak()?14:7)}}},"~O,~O,JSV.common.Spectrum");c(c$,"drawPeak",function(a,b,c){if(!this.pd.isPrinting){var e=b.getXMin(),g=b.getXMax();e!=g&&this.drawBar(a,b,e,g,null,c)}},"~O,JSV.common.PeakInfo,~N");
c(c$,"drawWidgets",function(a,b,c,e,g,f,h){this.setWidgets(e,c,g);if(!this.pd.isPrinting||!(null==this.imageView?!this.cur1D2Locked:this.sticky2Dcursor)){!this.pd.isPrinting&&!h&&(g?(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),f&&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(e=this.widgets[c],!(null==e||!e.isPinOrCursor&&!this.zoomEnabled)){var k=e===this.cur1D2x1||e===this.cur1D2x2||e===this.cur2Dx0||e===this.cur2Dx1||e===this.cur2Dy;if((e.isPin||!e.isPinOrCursor)!=h){if(e.is2D){if(e===this.cur2Dx0&&!g)continue}else{var l=e===this.pin1Dy0||e===this.pin1Dy1||
e===this.pin1Dy01;if(null!=this.imageView&&g==l||l&&!f||e===this.cur1D2x1&&null==this.gs2dLinkedX||e===this.cur1D2x2&&null==this.gs2dLinkedY||e===this.zoomBox1D&&(this.pd.isIntegralDrag||0!=this.pd.integralShiftMode))if(!this.isLinked||null!=this.imageView)continue}if(!this.pd.isPrinting||k)e.isPinOrCursor?(this.setColorFromToken(a,e.color),this.g2d.drawLine(a,e.xPixel0,e.yPixel0,e.xPixel1,e.yPixel1),e.isVisible=!0,e.isPin&&this.drawHandle(a,e.xPixel0,e.yPixel0,!e.isEnabled)):e.xPixel1!=e.xPixel0&&
this.fillBox(b,e.xPixel0,e.yPixel0,e.xPixel1,e.yPixel1,e===this.zoomBox1D&&this.pd.shiftPressed?JSV.common.ScriptToken.ZOOMBOXCOLOR2:JSV.common.ScriptToken.ZOOMBOXCOLOR)}}}},"~O,~O,~N,~B,~B,~B,~B");c(c$,"drawBar",function(a,b,c,e,g,f){var h=e+c,k=Math.abs(e-c),l=Math.abs(this.toX(this.xPixel1)-this.toX(this.xPixel0));0<f&&k>l/20&&(k=l/20,c=h/2-k,e=h/2+k);c=this.toPixelX(c);e=this.toPixelX(e);c>e&&(h=c,c=e,e=h);c=this.fixX(c);e=this.fixX(e);3>e-c&&(c-=2,e+=2);null!=b&&b.setPixelRange(c,e);0==f?this.fillBox(a,
c,this.yPixel0,e,this.yPixel0+this.yPixels,g):(this.fillBox(a,c,this.yPixel0,e,this.yPixel0+3,g),null!=b&&(c=q((c+e)/2),this.fillBox(a,c-1,this.yPixel0,c+1,this.yPixel0+f,g)))},"~O,JSV.common.PeakInfo,~N,~N,JSV.common.ScriptToken,~N");c(c$,"drawSpectrum",function(a,b,c,e,g,f,h){var k=this.spectra.get(b);this.drawPlot(a,b,k,f,c,e,null,h);null!=g&&(this.haveIntegralDisplayed(b)&&this.drawPlot(a,b,k,!0,c,!1,g,!0),this.drawIntegralValues(a,b,c));null!=this.getIntegrationRatios(b)&&this.drawAnnotations(a,
this.getIntegrationRatios(b),JSV.common.ScriptToken.INTEGRALPLOTCOLOR)},"~O,~N,~N,~B,JSV.common.IntegralData,~B,~B");c(c$,"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(c$,"drawPlot",function(a,b,c,e,g,f,h,k){var l=null==h?c.getXYCoords():this.getIntegrationGraph(b).getXYCoords(),m=null!=h;h=null==h?null:h.getBitSet();k=!m&&!f&&null!=this.pendingIntegral&&this.pendingIntegral.spec===
this.spectra.get(b)||null!=c.fillColor&&k;f=f?-2:m?-1:!this.allowStacking?0:b;this.setPlotColor(a,f);var n=!0,q=this.toPixelY(0);m?k=(new Boolean(k&q==this.fixY(q))).valueOf():q=this.fixY(q);var p=this.viewData.getStartingPointIndex(b);b=this.viewData.getEndingPointIndex(b);if(e){b--;var s=!k&&this.g2d.canDoLineTo();s&&this.g2d.doStroke(a,!0);var t=!1;for(e=p;e<=b;e++){var u=l[e],v=l[e+1],w=m?this.toPixelYint(u.getYVal()):this.toPixelY(u.getYVal());if(-2147483648!=w){var y=m?this.toPixelYint(v.getYVal()):
this.toPixelY(v.getYVal());if(-2147483648!=y){var z=this.toPixelX(u.getXVal()),B=this.toPixelX(v.getXVal()),w=this.fixY(g+w),y=this.fixY(g+y);m&&(e==p&&(this.xPixelPlot1=z,this.yPixelPlot0=w),this.xPixelPlot0=B,this.yPixelPlot1=y);if(!(B==z&&w==y))if(k&&(!m||this.pendingIntegral.overlaps(u.getXVal(),v.getXVal())))m?(this.g2d.setGraphicsColor(a,this.pd.getColor(JSV.common.ScriptToken.INTEGRALPLOTCOLOR)),this.g2d.drawLine(a,z,q,z,w)):(this.g2d.setGraphicsColor(a,c.fillColor),this.g2d.fillRect(a,z,Math.min(q,
w),B-z,Math.abs(q-w))),this.setPlotColor(a,f);else if(!(w==y&&w==this.yPixel0)&&(null!=h&&h.get(e)!=n&&(n=h.get(e),!this.pd.isPrinting&&0!=this.pd.integralShiftMode?this.setPlotColor(a,0):n?this.setColorFromToken(a,JSV.common.ScriptToken.INTEGRALPLOTCOLOR):this.setPlotColor(a,-3)),!this.pd.isPrinting||n))t?this.g2d.lineTo(a,B,y):(this.g2d.drawLine(a,z,w,B,y),t=s)}}}s&&this.g2d.doStroke(a,!1)}else{for(e=p;e<=b;e++)c=l[e],y=this.toPixelY(c.getYVal()),-2147483648!=y&&(z=this.toPixelX(c.getXVal()),w=
this.toPixelY(Math.max(this.getScale().minYOnScale,0)),w=this.fixY(g+w),y=this.fixY(g+y),w==y&&(w==this.yPixel0||w==this.yPixel1)||this.g2d.drawLine(a,z,w,z,y));this.getScale().isYZeroOnScale()&&(g+=this.toPixelY(this.getScale().spectrumYRef),g==this.fixY(g)&&this.g2d.drawLine(a,this.xPixel1,g,this.xPixel0,g))}},"~O,~N,JSV.common.Spectrum,~B,~N,~B,JSV.common.IntegralData,~B");c(c$,"drawFrame",function(a,b,c,e,g){if(!this.pd.gridOn||this.pd.isPrinting)if(this.setColorFromToken(a,JSV.common.ScriptToken.GRIDCOLOR),
this.g2d.drawRect(a,this.xPixel0,this.yPixel0,this.xPixels,this.yPixels),this.pd.isPrinting)return;this.setCurrentBoxColor(a);g&&(0<=b&&(this.setPlotColor(a,b),this.fillArrow(a,3,this.xVArrows,q((this.yPixel00+this.yPixel11)/2)-9,!0),this.fillArrow(a,4,this.xVArrows,q((this.yPixel00+this.yPixel11)/2)+9,!0),this.setCurrentBoxColor(a)),this.fillArrow(a,3,this.xVArrows,q((this.yPixel00+this.yPixel11)/2)-9,!1),this.fillCircle(a,this.xVArrows,q((this.yPixel00+this.yPixel11)/2),!1),this.fillArrow(a,4,this.xVArrows,
q((this.yPixel00+this.yPixel11)/2)+9,!1));if(null==this.imageView&&c){b=this.xPixel00+10;c=this.xPixel11-10;g=this.yPixel00+1;var f=this.yPixel11-2;this.g2d.drawLine(a,b,g,c,g);this.g2d.drawLine(a,c,g,c,f);this.g2d.drawLine(a,b,f,c,f);e&&this.fillBox(a,c-10,g,c,g+10,null)}},"~O,~N,~B,~B,~B");c(c$,"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 e=this.toPixelX(c);this.g2d.drawLine(a,e,this.yPixel0,e,this.yPixel1)}}else{b=1.0001*this.getScale().maxXOnScale;for(c=this.getScale().firstX;c<=b;c+=this.getScale().steps[0])e=this.toPixelX(c),this.g2d.drawLine(a,e,this.yPixel0,e,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(c$,"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],e=this.pd.setFont(a,b.getXPixels(),0,this.pd.isPrinting?10:12,!1),g=this.yPixel1,f=this.yPixel1+4*this.pd.scalingFactor,h=this.yPixel1+2*this.pd.scalingFactor,e=e.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]),p=0;2>p;p++){1==p&&JSV.common.ScaleData.fixScale(this.mapX);for(var s=1E10,t=m;t<=n;t+=this.getScale().steps[0]){var k=b.toPixelX(t),u=Double.$valueOf(t),v;switch(p){case 0:v=JU.DF.formatDecimalDbl(t,c);this.mapX.put(u,v);this.drawTick(a,k,g,f,b);k=Math.abs(s-t);s=this.getScale().minorTickCounts[0];if(0!=s){k/=s;for(v=1;v<s;v++)this.drawTick(a,b.toPixelX(t-v*k),g,h,b)}s=
t;continue;case 1:v=this.mapX.get(u);if(null==v||k!=b.fixX(k))continue;var u=this.pd.getStringWidth(v),w=k+q(u/2)==b.fixX(k+q(u/2))?2:0;0<w&&this.g2d.drawString(a,v,k-q(u/w),f+e);t+=Math.floor(u/l)*this.getScale().steps[0]}}}this.mapX.clear()},"~O,JSV.common.XYScaleConverter");c(c$,"drawTick",function(a,b,c,e,g){b==g.fixX(b)&&this.g2d.drawLine(a,b,c,b,e)},"~O,~N,~N,~N,JSV.common.XYScaleConverter");c(c$,"drawYScale",function(a,b){var c=b.getScale(),e=c.precision[1],g=this.pd.setFont(a,b.getXPixels(),
0,this.pd.isPrinting?10:12,!1).getHeight(),f=c.maxYOnScale+c.steps[1]/2,h=-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<f;l+=c.steps[1]){var m=Double.$valueOf(l),n=b.getXPixel0(),p=b.toPixelY(l);if(p==b.fixY(p)){var s;0==k&&this.g2d.drawLine(a,n,p,n-3*this.pd.scalingFactor,p);if(!(Math.abs(p-h)<=g))switch(h=p,k){case 0:s=JU.DF.formatDecimalDbl(l,e);this.mapX.put(m,s);break;case 1:s=this.mapX.get(m);
if(null==s)continue;s.startsWith("0")&&s.contains("E")&&(s="0");this.g2d.drawString(a,s,n-4*this.pd.scalingFactor-this.pd.getStringWidth(s),p+q(g/3))}}}}this.mapX.clear()},"~O,JSV.common.XYScaleConverter");c(c$,"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(c$,"drawUnits",function(a,b,c,e,g,f){this.setColorFromToken(a,JSV.common.ScriptToken.UNITSCOLOR);this.pd.setFont(a,
(null==this.imageView?this:this.imageView).getXPixels(),2,10,!1);this.g2d.drawString(a,b,q(c-this.pd.getStringWidth(b)*g),q(e+this.pd.getFontHeight()*f))},"~O,~S,~N,~N,~N,~N");c(c$,"drawYUnits",function(a){var b=this.spectra.get(0).getAxisLabel(!1);null!=b&&this.drawUnits(a,b,(this.pd.isPrinting?30:5)*this.pd.scalingFactor,this.yPixel0+(this.pd.isPrinting?0:5)*this.pd.scalingFactor,0,-1)},"~O");c(c$,"drawHighlightsAndPeakTabs",function(a,b,c){var e=this.getMeasurements(JSV.common.Annotation.AType.PeakList,
c),g=this.spectra.get(c);if(this.pd.isPrinting)null!=e&&(this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR),this.printPeakList(a,g,e));else{if(null==e){for(var f=0;f<this.highlights.size();f++){var h=this.highlights.get(f);h.spectrum===g&&(this.pd.setHighlightColor(h.color),this.drawBar(b,null,h.x1,h.x2,JSV.common.ScriptToken.HIGHLIGHTCOLOR,0))}this.drawPeakTabs(a,b,g)}if(null!=e){b=g.isInverted()?this.yPixel1-10*this.pd.scalingFactor:this.yPixel0;this.setColorFromToken(a,JSV.common.ScriptToken.PEAKTABCOLOR);
for(f=e.size();0<=--f;)g=e.get(f),g=this.toPixelX(g.getXVal()),this.g2d.drawLine(a,g,b,g,b+10*this.pd.scalingFactor);this.isVisible(this.getDialog(JSV.common.Annotation.AType.PeakList,c))&&(b=this.toPixelY(e.getThresh()),b==this.fixY(b)&&!this.pd.isPrinting&&this.g2d.drawLine(a,this.xPixel0,b,this.xPixel1,b))}}},"~O,~O,~N");c(c$,"printPeakList",function(a,b,c){var e=c.getMeasurementListArray(null);if(0!=e.length){this.pd.setFont(a,this.xPixels,0,8,!1);for(var g=this.pd.getFontHeight(),f=D(c.size(),
0),h=D(c.size(),0),k=0,l=5*this.pd.scalingFactor,m=10*this.pd.scalingFactor,n=15*this.pd.scalingFactor,p=25*this.pd.scalingFactor,s=0;s<e.length;s++)h[s]=this.toPixelX(Double.parseDouble(e[s][1])),0==s?f[s]=h[s]:(f[s]=Math.max(f[s-1]+g,h[s]+g),k+=f[s]-h[s]);k/=2*e.length;f[0]-k<this.xPixel0+p&&(k=f[0]-(this.xPixel0+p));for(s=0;s<e.length;s++)f[s]-=k;s=b.isInverted();b=this.pd.getStringWidth("99.9999");for(var k=6<=e[0].length?this.pd.getStringWidth("99.99"):0,p=s?-1:1,t=(s?this.yPixel1:this.yPixel0)+
p*(k+b+n),s=0;s<e.length;s++)this.g2d.drawLine(a,f[s],t,f[s],t+l*p),this.g2d.drawLine(a,f[s],t+l*p,h[s],t+m*p),this.g2d.drawLine(a,h[s],t+m*p,h[s],t+n*p),0<k&&0<e[s][4].length&&this.g2d.drawLine(a,q((f[s]+f[s-1])/2),t-b+l,q((f[s]+f[s-1])/2),t-b-l);t-=2*p*this.pd.scalingFactor;0<k&&(this.drawStringRotated(a,-90,f[0]-n,t,"  ppm"),this.drawStringRotated(a,-90,f[0]-n,t-b-l," Hz"));for(s=c.size();0<=--s;)this.drawStringRotated(a,-90*p,f[s]+q(p*g/3),t,e[s][1]),0<k&&0<e[s][4].length&&(c=q((f[s]+f[s-1])/
2)+q(g/3),this.drawStringRotated(a,-90,c,t-b-l,e[s][4]))}},"~O,JSV.common.Spectrum,JSV.common.PeakData");c(c$,"drawStringRotated",function(a,b,c,e,g){this.g2d.drawStringRotated(a,g,c,e,b)},"~O,~N,~N,~N,~S");c(c$,"drawAnnotations",function(a,b,c){this.pd.setFont(a,this.xPixels,1,12,!1);for(var e=b.size();0<=--e;){var g=b.get(e);this.setAnnotationColor(a,g,c);var f=(g.is2D?this.imageView:this).toPixelX(g.getXVal()),h=g.isPixels()?q(this.yPixel0+10*this.pd.scalingFactor-g.getYVal()):g.is2D?this.imageView.subIndexToPixelY(q(g.getYVal())):
this.toPixelY(g.getYVal());this.g2d.drawString(a,g.text,f+g.offsetX*this.pd.scalingFactor,h-g.offsetY*this.pd.scalingFactor)}},"~O,JU.Lst,JSV.common.ScriptToken");c(c$,"drawIntegralValues",function(a,b,c){var e=this.getMeasurements(JSV.common.Annotation.AType.Integration,b);if(null!=e){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 g=this.pd.getFontHeight();this.g2d.setStrokeBold(a,
!0);for(var f=e.size();0<=--f;){var h=e.get(f);if(0!=h.getValue()){var k=this.toPixelX(h.getXVal2()),l=c*this.pd.scalingFactor+this.toPixelYint(h.getYVal()),m=c*this.pd.scalingFactor+this.toPixelYint(h.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,"  "+h.text,k,q((l+m)/2)+q(g/3)))}}this.g2d.setStrokeBold(a,!1)}b==this.getFixedSelectedSpectrumIndex()&&(this.selectedSpectrumIntegrals=e)},"~O,~N,~N");c(c$,"drawMeasurements",
function(a,b){var c=this.getMeasurements(JSV.common.Annotation.AType.Measurements,b);if(null!=c)for(var e=c.size();0<=--e;)this.drawMeasurement(a,c.get(e));b==this.getFixedSelectedSpectrumIndex()&&(this.selectedSpectrumMeasurements=c)},"~O,~N");c(c$,"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()),e=this.toPixelY(b.getYVal()),g=this.toPixelX(b.getXVal2());if(!Double.isNaN(b.getXVal())&&!(c!=this.fixX(c)||g!=this.fixX(g))){var f=2<=Math.abs(c-g),h=this.getScale().isYZeroOnScale()&&b.spec.isHNMR(),k=q((c+g)/2);this.g2d.setStrokeBold(a,!0);f&&this.g2d.drawLine(a,c,e,g,e);h&&this.g2d.drawLine(a,c+1,this.yPixel1-1,g,this.yPixel1-1);this.g2d.setStrokeBold(a,!1);f&&this.g2d.drawString(a,b.text,k+b.offsetX,e-b.offsetY);h&&(this.g2d.drawLine(a,c,this.yPixel1,c,this.yPixel1-
6*this.pd.scalingFactor),this.g2d.drawLine(a,g,this.yPixel1,g,this.yPixel1-6*this.pd.scalingFactor))}}},"~O,JSV.common.Measurement");c(c$,"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(c$,"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 e=this.imageView.toY(b);this.pd.set2DCrossHairsLinked(this,c,e,!this.sticky2Dcursor)}},"~N,~N");c(c$,"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(c$,"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(c$,"checkIntegral",function(a,b,c){var e=this.getDialog(JSV.common.Annotation.AType.Integration,-1);null!=e&&(a=e.getData().addIntegralRegion(a,b),c&&p(e,JSV.dialog.JSVDialog)&&e.update(null,0,0),this.selectedSpectrumIntegrals=null,this.pendingIntegral=c?null:a)},"~N,~N,~B");
c(c$,"setToolTipForPixels",function(a,b){var c=this.getPinSelected(a,b),e=this.getScale().precision[0],g=this.getScale().precision[1];if(null!=c)this.setStartupPinTip()||(c===this.pin1Dx01||c===this.pin2Dx01?e=JU.DF.formatDecimalDbl(Math.min(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal()),e)+" - "+JU.DF.formatDecimalDbl(Math.max(this.pin1Dx0.getXVal(),this.pin1Dx1.getXVal()),e):c===this.pin1Dy01?e=JU.DF.formatDecimalDbl(Math.min(this.pin1Dy0.getYVal(),this.pin1Dy1.getYVal()),g)+" - "+JU.DF.formatDecimalDbl(Math.max(this.pin1Dy0.getYVal(),
this.pin1Dy1.getYVal()),g):c===this.cur2Dy?(c=this.imageView.toSubspectrumIndex(c.yPixel0),e=this.get2DYLabel(c,e)):e=c===this.pin2Dy01?""+q(Math.min(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal()))+" - "+q(Math.max(this.pin2Dy0.getYVal(),this.pin2Dy1.getYVal())):c.isXtype?JU.DF.formatDecimalDbl(c.getXVal(),e):c.is2D?""+q(c.getYVal()):JU.DF.formatDecimalDbl(c.getYVal(),g),this.pd.setToolTipText(e));else{if(null!=this.imageView){if(this.imageView.fixX(a)==a&&this.fixY(b)==b){c=this.imageView.toSubspectrumIndex(b);
e=JU.DF.formatDecimalDbl(this.imageView.toX(a),e)+" "+this.getSpectrum().getAxisLabel(!0)+",  "+this.get2DYLabel(c,e);this.pd.setToolTipText(this.pd.display1D?e:"");this.pd.coordStr=e;return}if(!this.pd.display1D){this.pd.setToolTipText("");this.pd.coordStr="";return}}var c=this.toX(this.fixX(a)),e=null!=this.imageView&&this.imageView.isXWithinRange(a)?this.imageView.toSubspectrumIndex(this.fixY(b)):this.toY(this.fixY(b)),g=this.setCoordStr(c,e),f=this.getFixedSelectedSpectrumIndex();this.isInPlotRegion(a,
b)?1!=this.nSpectra&&this.haveIntegralDisplayed(f)&&(e=this.getIntegrationGraph(f).getPercentYValueAt(c),g+=", "+JU.DF.formatDecimalDbl(e,1)):e=NaN;this.pd.setToolTipText(null!=this.pendingMeasurement||null!=this.selectedMeasurement||null!=this.selectedIntegral?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(e)?null:g)}},"~N,~N");c(c$,"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(c$,"setStartupPinTip",function(){if(null==this.pd.startupPinTip)return!1;this.pd.setToolTipText(this.pd.startupPinTip);this.pd.startupPinTip=null;return!0});c(c$,"get2DYLabel",function(a,b){var c=this.getSpectrumAt(0).getSubSpectra().get(a);
return JU.DF.formatDecimalDbl(c.getY2D(),b)+(c.y2DUnits.equals("HZ")?" HZ ("+JU.DF.formatDecimalDbl(c.getY2DPPM(),b)+" PPM)":"")},"~N,~N");c(c$,"isOnSpectrum",function(a,b,c){var e=null,g=!0,f=0>c;if(f){e=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==e)return!1;e=e.getData().getXYCoords();c=this.getFixedSelectedSpectrumIndex()}else{this.setScale(c);var h=this.spectra.get(c),e=h.xyCoords,g=h.isContinuous()}var h=c*z(this.yPixels*(this.yStackOffsetPercent/100)),k=this.viewData.getStartingPointIndex(c);
c=this.viewData.getEndingPointIndex(c);if(g)for(g=k;g<c;g++){var l=e[g],m=e[g+1],k=this.toPixelX(l.getXVal()),n=this.toPixelX(m.getXVal()),l=f?this.toPixelYint(l.getYVal()):this.toPixelY(l.getYVal()),m=f?this.toPixelYint(m.getYVal()):this.toPixelY(m.getYVal());if(!(-2147483648==l||-2147483648==m))if(l=this.fixY(l)-h,m=this.fixY(m)-h,JSV.common.GraphSet.isOnLine(a,b,k,l,n,m))return!0}else for(g=k;g<=c;g++)if(f=e[g],m=this.toPixelY(f.getYVal()),-2147483648!=m&&(k=this.toPixelX(f.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");c$.distance=c(c$,"distance",function(a,b){return Math.sqrt(a*a+b*b)},"~N,~N");c$.findCompatibleGraphSet=c(c$,"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");c$.isGoodEvent=c(c$,"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");c$.isOnLine=c(c$,"isOnLine",function(a,b,c,e,g,f){var h=Math.abs(c-a);if(2>h&&2>Math.abs(e-b))return!0;var k=g-a;if(2>Math.abs(k)&&2>Math.abs(f-b))return!0;var l=e-f;if(2<Math.abs(l)&&e<b==f<b)return!1;var m=c-g;return 2<Math.abs(m)&&c<a==g<a?!1:JSV.common.GraphSet.distance(h,e-b)+JSV.common.GraphSet.distance(k,
b-f)<JSV.common.GraphSet.distance(m,l)+2},"~N,~N,~N,~N,~N,~N");c$.setFractionalPositions=c(c$,"setFractionalPositions",function(a,b,c){var e=b.size(),g=0,f=0;a.isLinked=c!==JSV.common.PanelData.LinkMode.NONE;if(c===JSV.common.PanelData.LinkMode.NONE){for(var h=0;h<e;h++)c=b.get(h),g+=(c.getSpectrumAt(0).is1D(),1)*c.nSplit;g=1/g;for(h=0;h<e;h++)c=b.get(h),c.isLinked=!1,a=c.getSpectrumAt(0).is1D()?g:1*g,c.fX0=0,c.fY0=f,c.fracX=1,c.fracY=a,f+=a*c.nSplit}else{var g=null,k=-1;if(2==e||3==e)for(h=0;h<e;h++)if(c=
b.get(h),!c.getSpectrum().is1D()){g=c;0<=k&&(h=-2);k=h;break}if(-2==k||-1==k&&2!=e)JSV.common.GraphSet.setFractionalPositions(a,b,JSV.common.PanelData.LinkMode.NONE);else for(h=0;h<e;h++)c=b.get(h),c.isLinked=!0,a=c.getSpectrumAt(0),a.is1D()?(null!=g&&(k=g.getSpectrumAt(0),JSV.common.Spectrum.areLinkableX(a,k)&&(c.gs2dLinkedX=g),JSV.common.Spectrum.areLinkableY(a,k)&&(c.gs2dLinkedY=g)),c.fX0=0,c.fY0=f,c.fracX=null==g?1:0.5,c.fracY=3==e||null==g?0.5:1,f+=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(c$,"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(c$,"addHighlight",function(a,b,c,e){null==c&&(c=this.getSpectrumAt(0));a=M(JSV.common.GraphSet.Highlight,this,null,a,b,c,null==e?this.pd.getColor(JSV.common.ScriptToken.HIGHLIGHTCOLOR):e);this.highlights.contains(a)||this.highlights.addLast(a)},"~N,~N,JSV.common.Spectrum,javajs.api.GenericColor");c(c$,"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 e=a.toString();if(null!=e){var g=JU.PT.getQuotedAttribute(e,"xMin"),e=JU.PT.getQuotedAttribute(e,"xMax");if(null==g||null==e)break;g=JU.PT.parseFloat(g);e=JU.PT.parseFloat(e);if(Float.isNaN(g)||Float.isNaN(e))break;this.pd.addHighlight(this,g,e,c,200,140,140,100);c.setSelectedPeak(a);!this.getScale().isInRangeX(g)&&!(this.getScale().isInRangeX(e)||
g<this.getScale().minX&&this.getScale().maxX<e)&&this.setZoomTo(0)}}}},"JSV.common.PeakInfo");c(c$,"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(c$,"checkSpectrumClickedEvent",function(a,b,c){if(this.nextClickForSetPeak)return!1;if(0<c&&this.checkArrowLeftRightClick(a,b))return!0;if(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(c$,"getShiftMode",function(a,b){return this.isStartEndIntegral(a,!1)?b:this.isStartEndIntegral(a,!0)?-b:0},"~N,~N");c(c$,"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(c$,"isStartEndIntegral",function(a,b){return b?
20>this.xPixelPlot1-a:20>a-this.xPixelPlot0},"~N,~B");c(c$,"checkWidgetEvent",function(a,b,c){if(this.zoomEnabled&&this.triggered)if(this.triggered=!1,c)2==this.pd.clickCount&&null==this.pendingMeasurement?(-1==this.iSpectrumClicked&&0<=this.iPreviousSpectrumClicked&&this.setSpectrumClicked(this.iPreviousSpectrumClicked),this.processPendingMeasurement(a,b,2)):null==this.pendingMeasurement&&(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),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);else if(this.nextClickForSetPeak=!1,c=this.pd.thisWidget,null!=c)if(c===this.zoomBox1D)this.zoomBox1D.xPixel1=this.fixX(a),this.zoomBox1D.yPixel1=this.fixY(b),this.pd.isIntegralDrag&&this.zoomBox1D.xPixel0!=this.zoomBox1D.xPixel1&&
this.checkIntegral(this.zoomBox1D.getXVal(),this.toX(this.zoomBox1D.xPixel1),!1);else if(c===this.zoomBox2D)this.zoomBox2D.xPixel1=this.imageView.fixX(a),this.zoomBox2D.yPixel1=this.fixY(b);else if(c===this.cur2Dy)b=this.fixY(b),this.cur2Dy.yPixel0=this.cur2Dy.yPixel1=b,this.setCurrentSubSpectrum(this.imageView.toSubspectrumIndex(b));else if(!(c===this.cur2Dx0||c===this.cur2Dx1))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-q((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;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)}else 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-q((this.pin1Dy0.yPixel0+this.pin1Dy1.yPixel0)/2)+1;b=this.pin1Dy0.yPixel0+c;a=
this.pin1Dy1.yPixel0+c;c=this.toY0(b);var e=this.toY0(a);if(Math.min(c,e)==this.getScale().minY||Math.max(c,e)==this.getScale().maxY)return;this.pin1Dy0.setY(c,b);this.pin1Dy1.setY(e,a)}this.doZoom(0,this.pin1Dy0.getYVal(),0,this.pin1Dy1.getYVal(),null==this.imageView,null==this.imageView,!1,!1,!1)}else 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-q((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;this.pin2Dx0.setX(this.imageView.toX0(a),a);this.pin2Dx1.setX(this.imageView.toX0(b),b)}JSV.common.GraphSet.isGoodEvent(this.pin2Dx0,this.pin2Dx1,!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)):this.reset2D(!0)}else 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-q((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;this.pin2Dy0.setY(this.imageView.toSubspectrumIndex(b),b);this.pin2Dy1.setY(this.imageView.toSubspectrumIndex(a),a)}JSV.common.GraphSet.isGoodEvent(this.pin2Dy0,this.pin2Dy1,!1)?this.imageView.setView0(this.pin2Dx0.xPixel0,this.pin2Dy0.yPixel0,
this.pin2Dx1.xPixel1,this.pin2Dy1.yPixel1):this.reset2D(!1)}},"~N,~N,~B");c(c$,"clearIntegrals",function(){this.checkIntegral(NaN,0,!1)});c(c$,"clearMeasurements",function(){this.removeDialog(this.getFixedSelectedSpectrumIndex(),JSV.common.Annotation.AType.Measurements)});c$.createGraphSetsAndSetLinkMode=c(c$,"createGraphSetsAndSetLinkMode",function(a,b,c,e,g,f){for(var h=new JU.Lst,k=0;k<c.size();k++){var l=c.get(k),m=f===JSV.common.PanelData.LinkMode.NONE?JSV.common.GraphSet.findCompatibleGraphSet(h,
l):null;null==m&&h.addLast(m=new JSV.common.GraphSet(b.getPanelData()));m.addSpec(l)}JSV.common.GraphSet.setFractionalPositions(a,h,f);for(k=h.size();0<=--k;)h.get(k).initGraphSet(e,g),JU.Logger.info("JSVGraphSet "+(k+1)+" nSpectra = "+h.get(k).nSpectra);return h},"JSV.common.PanelData,JSV.api.JSVPanel,JU.Lst,~N,~N,JSV.common.PanelData.LinkMode");c(c$,"drawGraphSet",function(a,b,c,e,g,f,h,k,l,m,n){this.zoomEnabled=this.pd.getBoolean(JSV.common.ScriptToken.ENABLEZOOM);this.height=g*this.pd.scalingFactor;
this.width=e*this.pd.scalingFactor;this.left=f*this.pd.scalingFactor;this.right=h*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.pd.isPrinting&&null!=this.widgets)for(e=0;e<this.widgets.length;e++)null!=this.widgets[e]&&(this.widgets[e].isVisible=!1);for(e=0;e<this.nSplit;e++)this.setPositionForFrame(e),this.drawAll(a,b,c,e,m||1<this.nSplit,n);this.setPositionForFrame(1<
this.nSplit?this.pd.currentSplitPoint:0)},"~O,~O,~O,~N,~N,~N,~N,~N,~N,~B,~B");c(c$,"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");c$.findGraphSet=c(c$,"findGraphSet",function(a,b,c){for(var e=a.size();0<=--e;)if(a.get(e).hasPoint(b,c))return a.get(e);return null},"JU.Lst,~N,~N");c(c$,"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(c$,"getCurrentSpectrumIndex",function(){return 1==this.nSpectra?0:this.iSpectrumSelected});c(c$,"getSelectedIntegral",function(){return this.selectedIntegral});c(c$,
"getShowAnnotation",function(a,b){var c=this.getDialog(a,b);return null!=c&&c.getState()},"JSV.common.Annotation.AType,~N");c(c$,"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(c$,"haveSelectedSpectrum",function(){return this.$haveSelectedSpectrum});c(c$,"mouseClickedEvent",function(a,b,c,e){this.selectedIntegral=this.selectedMeasurement=null;var g=this.nextClickForSetPeak;this.nextClickForSetPeak=
!1;if(!this.checkArrowUpDownClick(a,b))if(this.lastClickX=NaN,this.lastPixelX=2147483647,this.isSplitWidget(a,b))this.splitStack(this.pd.graphSets,1==this.nSplit);else{var f=this.getPinSelected(a,b);if(null!=f)this.setWidgetValueByUser(f);else if(f=null!=this.imageView&&a==this.imageView.fixX(a)&&b==this.fixY(b),2==c&&(-1==this.iSpectrumClicked&&0<=this.iPreviousSpectrumClicked)&&this.setSpectrumClicked(this.iPreviousSpectrumClicked),!f&&e)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)f?(this.sticky2Dcursor&&this.addAnnotation(this.getAnnotation(this.imageView.toX(a),this.imageView.toSubspectrumIndex(b),this.pd.coordStr,!1,!0,5,5),!0),this.sticky2Dcursor=!this.sticky2Dcursor,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(f){if(null!=this.annotations&&(c=(new JSV.common.Coordinate).set(this.imageView.toX(a),this.imageView.toSubspectrumIndex(b)),
c=this.findAnnotation2D(c),null!=c&&this.setAnnotationText(c)))return;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(g){this.shiftSpectrum(NaN,NaN);return}}else this.setCoordClicked(0,NaN,
0);this.pd.notifyPeakPickedListeners(null)}}},"~N,~N,~N,~B");c(c$,"updateDialog",function(a,b){var c=this.getDialog(a,b);if(null!=c&&this.isVisible(c)){var e=this.toX(this.xPixel1)-this.toX(this.xPixel0),g=this.getSpectrum().isInverted()?this.yPixel1-this.pd.mouseY:this.pd.mouseY-this.yPixel0;c.update(this.pd.coordClicked,e,g)}},"JSV.common.Annotation.AType,~N");c(c$,"isVisible",function(a){return p(a,JSV.dialog.JSVDialog)&&a.isVisible()},"JSV.api.AnnotationData");c(c$,"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,e=this.pd.shiftPressed;this.doZoom(this.toX(this.zoomBox1D.xPixel0),e?this.toY(this.zoomBox1D.yPixel0):0,this.toX(c),e?this.toY(this.zoomBox1D.yPixel1):0,!0,e,!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(c$,"mouseMovedEvent",function(a,b){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)}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),e=c.getData().getXYCoords(),e=e[0<this.pd.integralShiftMode?e.length-1:0].getYVal();c.getData().shiftY(this.pd.integralShiftMode,this.toPixelYint(e)+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)))},"~N,~N");c(c$,"nextView",function(){this.currentZoomIndex+1<this.viewList.size()&&this.setZoomTo(this.currentZoomIndex+1)});c(c$,"previousView",function(){0<this.currentZoomIndex&&this.setZoomTo(this.currentZoomIndex-
1)});c(c$,"resetView",function(){this.setZoomTo(0)});c(c$,"removeAllHighlights",function(){this.removeAllHighlights(null)});c(c$,"removeHighlight",function(a){this.highlights.remove(a)},"~N");c(c$,"removeHighlight",function(a,b){for(var c=this.highlights.size();0<=--c;){var e=this.highlights.get(c);e.x1==a&&e.x2==b&&this.highlights.remove(c)}},"~N,~N");c(c$,"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(c$,"selectSpectrum",function(a,b,c){for(var e=!1,g=this.spectra.size();0<=--g;)if((null==a||this.getSpectrumAt(g).getFilePathForwardSlash().equals(a))&&this.getSpectrumAt(g).matchesPeakTypeModel(b,c))this.setSpectrumSelected(g),1<this.nSplit&&this.splitStack(this.pd.graphSets,!0),e=!0;1<this.nSpectra&&(!e&&0<=this.iSpectrumSelected&&!this.pd.isCurrentGraphSet(this))&&this.setSpectrumSelected(-2147483648);
return e},"~S,~S,~S");c(c$,"selectPeakByFileIndex",function(a,b,c){for(var e,g=this.spectra.size();0<=--g;)if(null!=(e=this.getSpectrumAt(g).selectPeakByFileIndex(a,b,c)))return e;return null},"~S,~S,~S");c(c$,"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(c$,"setSelectedIntegral",function(a){var b=this.selectedIntegral.getSpectrum();
this.getIntegrationGraph(this.getSpectrumIndex(b)).setSelectedIntegral(this.selectedIntegral,a)},"~N");c(c$,"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)p(c,JSV.dialog.JSVDialog)?c.setVisible(!1):c.setState(!c.getState());else{var e=b.booleanValue();c.setState(e);(e||p(c,JSV.dialog.JSVDialog))&&
this.pd.showDialog(a)}},"JSV.common.Annotation.AType,Boolean");c(c$,"checkIntegral",function(a,b){if(!this.getSpectrum().canIntegrate()||this.reversePlot)return!1;var c=this.getFixedSelectedSpectrumIndex(),e=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.ON:this.integrate(c,a);break;case JSV.common.IntegralData.IntMode.OFF:this.integrate(c,null);break;case JSV.common.IntegralData.IntMode.TOGGLE:this.integrate(c,
null==e?a:null);break;case JSV.common.IntegralData.IntMode.AUTO:null==e&&(this.checkIntegral(a,"ON"),e=this.getDialog(JSV.common.Annotation.AType.Integration,-1));null!=e&&e.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==e&&(this.checkIntegral(a,"ON"),e=this.getDialog(JSV.common.Annotation.AType.Integration,-1));null!=e&&e.getData().addMarks(b.substring(4).trim());
break;case JSV.common.IntegralData.IntMode.MIN:if(null!=e)try{var g=Double.parseDouble(JSV.common.ScriptToken.getTokens(b).get(1));e.getData().setMinimumIntegral(g)}catch(f){if(!y(f,Exception))throw f;}break;case JSV.common.IntegralData.IntMode.UPDATE:null!=e&&e.getData().update(a)}this.updateDialog(JSV.common.Annotation.AType.Integration,-1);return!0},"JSV.common.Parameters,~S");c(c$,"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(c$,"setSpectrumJDX",function(a){var b=this.getFixedSelectedSpectrumIndex();this.spectra.remove(b);this.spectra.add(b,a);this.pendingMeasurement=null;this.clearViews();this.viewData.newSpectrum(this.spectra)},"JSV.common.Spectrum");c(c$,"setZoom",function(a,b,c,e){this.setZoomTo(0);0==a&&0==c&&0==b&&0==e?(this.newPins(),this.imageView=null,this.getScale(),this.getScale()):this.doZoom(a,b,c,e,!0,b!=
e,!1,!0,!0)},"~N,~N,~N,~N");c(c$,"shiftSpectrum",function(a,b){var c=this.getSpectrum();if(!c.isNMR()||!c.is1D())return!1;if(1.7976931348623157E308==b||1.7976931348623157E308==a)a=-c.addSpecShift(0);else{if(4.9E-324==b)return this.nextClickForSetPeak=!0,this.jsvp.showMessage("Click on or beside a peak to set its chemical shift.","Set Reference"),!1;if(Double.isNaN(a)||4.9E-324==a){var e=4.9E-324==a?this.lastClickX:this.getNearestPeak(c,this.lastClickX,this.toY(this.pd.mouseY));if(Double.isNaN(e))return!1;
if(Double.isNaN(b))try{var g=this.pd.getInput("New chemical shift (set blank to reset)","Set Reference",""+e).trim();b=0==g.length?e-c.addSpecShift(0):Double.parseDouble(g)}catch(f){if(y(f,Exception))return!1;throw f;}a=b-e}}if(0==a)return!1;c.addSpecShift(a);if(null!=this.annotations)for(e=this.annotations.size();0<=--e;)this.annotations.get(e).spec===c&&this.annotations.get(e).addSpecShift(a);if(null!=this.dialogs)for(var h,e=this.dialogs.entrySet().iterator();e.hasNext()&&((h=e.next())||1);)h.getValue().getSpectrum()===
c&&h.getValue().setSpecShift(a);this.getScale().addSpecShift(a);Double.isNaN(this.lastClickX)||(this.lastClickX+=a);this.updateDialogs();this.doZoom(0,this.getScale().minYOnScale,0,this.getScale().maxYOnScale,!0,!0,!1,!0,!1);this.pd.repaint();return!0},"~N,~N");c(c$,"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(c$,"scaleSelectedBy",function(a){for(var b=this.bsSelected.nextSetBit(0);0<=b;b=this.bsSelected.nextSetBit(b+1))this.viewData.scaleSpectrum(b,a)},"~N");h(c$,"toString",function(){return"gs: "+this.nSpectra+" "+this.spectra+" "+this.spectra.get(0).getFilePath()});c(c$,"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(c$,"setXPointer2",function(a,b){null!=a&&this.setSpectrumClicked(this.getSpectrumIndex(a));this.setXPixelMovedTo(1.7976931348623157E308,b,0,0)},"JSV.common.Spectrum,~N");c(c$,"hasCurrentMeasurement",function(a){return null!=(a===JSV.common.Annotation.AType.Integration?this.selectedSpectrumIntegrals:
this.selectedSpectrumMeasurements)},"JSV.common.Annotation.AType");c(c$,"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(c$,"removeDialog",function(a,b){null!=this.dialogs&&0<=a&&this.dialogs.remove(b+"_"+a)},"~N,JSV.common.Annotation.AType");c(c$,"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(c$,"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(c$,"getPeakListing",function(a,b,c){0>a&&(a=this.getCurrentSpectrumIndex());if(0>a)return null;var e=this.getDialog(JSV.common.Annotation.AType.PeakList,-1);if(null==e){if(!c)return null;this.addDialog(a,JSV.common.Annotation.AType.PeakList,e=new JSV.common.PeakData(JSV.common.Annotation.AType.PeakList,
this.getSpectrum()))}e.getData().setPeakList(b,-2147483648,this.viewData.getScale());p(e,JSV.dialog.JSVDialog)&&e.setFields();return e.getData()},"~N,JSV.common.Parameters,~B");c(c$,"setPeakListing",function(a){var b=this.getDialog(JSV.common.Annotation.AType.PeakList,-1),c=p(b,JSV.dialog.JSVDialog)?b:null;(null==a?null==c||!c.isVisible():a.booleanValue())?this.pd.showDialog(JSV.common.Annotation.AType.PeakList):p(b,JSV.dialog.JSVDialog)&&b.setVisible(!1)},"Boolean");c(c$,"haveIntegralDisplayed",
function(a){a=this.getDialog(JSV.common.Annotation.AType.Integration,a);return null!=a&&a.getState()},"~N");c(c$,"getIntegrationGraph",function(a){a=this.getDialog(JSV.common.Annotation.AType.Integration,a);return null==a?null:a.getData()},"~N");c(c$,"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(c$,"getIntegrationRatios",function(a){return null==this.aIntegrationRatios?null:this.aIntegrationRatios[a]},"~N");c(c$,"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(c$,"getIntegration",function(a,b,c){0>a&&(a=this.getCurrentSpectrumIndex());if(0>a)return null;
var e=this.getDialog(JSV.common.Annotation.AType.Integration,-1);if(null==e){if(!c)return null;e=this.addDialog(a,JSV.common.Annotation.AType.Integration,new JSV.common.IntegralData(this.getSpectrum(),b))}return e.getData()},"~N,JSV.common.Parameters,~B");c(c$,"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 e=new java.util.Hashtable;c.getInfo(e);return e},"JSV.common.Annotation.AType,~N");c(c$,"getInfo",function(a,b){var c=new java.util.Hashtable;if("viewInfo".equalsIgnoreCase(a))return this.getScale().getInfo(c);var e=new JU.Lst;c.put("spectra",e);for(var g=0;g<this.nSpectra;g++)if(!(0<=b&&g!=b)){var f=this.spectra.get(g),h=f.getInfo(a);if(0<=b&&null!=a&&(2==h.size()||a.equalsIgnoreCase("id")))return 2==h.size()&&h.remove("id"),h;JSV.common.Parameters.putInfo(a,h,"type",f.getDataType());
JSV.common.Parameters.putInfo(a,h,"titleLabel",f.getTitleLabel());JSV.common.Parameters.putInfo(a,h,"filePath",f.getFilePath().$replace("\\","/"));JSV.common.Parameters.putInfo(a,h,"PeakList",JSV.common.Parameters.isMatch(a,"PeakList")?this.getMeasurementInfo(JSV.common.Annotation.AType.PeakList,g):null);JSV.common.Parameters.putInfo(a,h,"Integration",JSV.common.Parameters.isMatch(a,"Integration")?this.getMeasurementInfo(JSV.common.Annotation.AType.Integration,g):null);if(0<=b)return h;e.addLast(h)}return c},
"~S,~N");c(c$,"getTitle",function(a){return 1==this.nSpectra||0<=this.iSpectrumSelected&&(!a||1==this.nSplit)?this.getSpectrum().getTitle():null},"~B");c(c$,"getCurrentView",function(){this.setScale(this.getFixedSelectedSpectrumIndex());return this.viewData.getScale()});c(c$,"set2DXY",function(a,b,c){var e;null!=this.gs2dLinkedX&&(e=this.toPixelX(a),e!=this.fixX(e)&&(e=-2147483648,a=1.7976931348623157E308),this.cur1D2x1.setX(a,e));null!=this.gs2dLinkedY&&(e=this.toPixelX(b),e!=this.fixX(e)&&(e=-2147483648,
b=1.7976931348623157E308),this.cur1D2x2.setX(b,e));this.cur1D2Locked=c},"~N,~N,~B");c(c$,"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 e=b.getValue();this.isVisible(e)&&(null==a?e.setVisible(!0):e.setFocus(e.getSpectrum()===a))}}},"JSV.common.Spectrum");c(c$,"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 e=0,b=b.length;e<c;e++,b++)a[b]=this.generateRandomColor();b=a}this.plotColors=b},"~O");c(c$,"disposeImage",function(){null!=this.image2D&&this.image2D.parentNode.removeChild(this.image2D);this.plotColors=this.highlights=this.pd=this.jsvp=this.image2D=null});c(c$,"generateRandomColor",function(){for(;;){var a=q(255*Math.random()),b=q(255*Math.random()),c=q(255*Math.random()),
a=this.g2d.getColor3(a,b,c);if(0!=a.getRGB())return a}});c(c$,"setPlotColor0",function(a){this.plotColors[0]=a},"~O");c(c$,"getPlotColor",function(a){return a>=this.plotColors.length?null:this.plotColors[a]},"~N");c(c$,"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(c$,"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(c$,"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(c$,"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});c(c$,"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(c$,"getAnnotation",function(a,b,c,e,g,f,h){return(new JSV.common.ColoredAnnotation).setCA(a,b,this.getSpectrum(),c,this.pd.BLACK,e,g,f,h)},"~N,~N,~S,~B,~B,~N,~N");c(c$,"getAnnotation",function(a,b){return JSV.common.Annotation.getColoredAnnotation(this.g2d,this.getSpectrum(),a,b)},"JU.Lst,JSV.common.Annotation");c(c$,"fillBox",function(a,b,c,e,g,f){this.setColorFromToken(a,
f);this.g2d.fillRect(a,Math.min(b,e),Math.min(c,g),Math.abs(b-e),Math.abs(c-g))},"~O,~N,~N,~N,~N,JSV.common.ScriptToken");c(c$,"drawHandle",function(a,b,c,e){e?this.g2d.drawRect(a,b-2,c-2,4,4):this.g2d.fillRect(a,b-2,c-2,5,5)},"~O,~N,~N,~B");c(c$,"setCurrentBoxColor",function(a){this.g2d.setGraphicsColor(a,this.pd.BLACK)},"~O");c(c$,"fillArrow",function(a,b,c,e,g){var f=1;switch(b){case 1:case 3:f=-1}c=[c-5,c-5,c+5,c+5,c+8,c,c-8];e=[e+5*f,e-f,e-f,e+5*f,e+5*f,e+10*f,e+5*f];switch(b){case 1:case 2:g?
this.g2d.fillPolygon(a,e,c,7):this.g2d.drawPolygon(a,e,c,7);break;case 3:case 4:g?this.g2d.fillPolygon(a,c,e,7):this.g2d.drawPolygon(a,c,e,7)}},"~O,~N,~N,~N,~B");c(c$,"fillCircle",function(a,b,c,e){e?this.g2d.fillCircle(a,b-4,c-4,8):this.g2d.drawCircle(a,b-4,c-4,8)},"~O,~N,~N,~B");c(c$,"setAnnotationColor",function(a,b,c){null!=c?this.setColorFromToken(a,c):(c=null,p(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(c$,"setSolutionColor",function(a,b,c){for(var e=0;e<this.nSpectra;e++){var g=this.spectra.get(e),f=b||!g.canShowSolutionColor()?-1:a.getColour(g,c);g.setFillColor(-1==f?null:this.pd.vwr.parameters.getColor1(f))}},"JSV.api.VisibleInterface,~B,~B");c(c$,"setIRMode",function(a,b){for(var c=0;c<this.nSpectra;c++){var e=this.spectra.get(c);if(e.dataType.equals(b)){var g=JSV.common.Spectrum.taConvert(e,a);g!==e&&this.pd.setSpecForIRMode(g)}}},"JSV.common.Spectrum.IRMode,~S");c$.$GraphSet$Highlight$=function(){G(self.c$);
c$=t(function(){Q(this,arguments);this.x2=this.x1=0;this.spectrum=this.color=null;s(this,arguments)},JSV.common.GraphSet,"Highlight");h(c$,"toString",function(){return"highlight "+this.x1+" "+this.x2+" "+this.spectrum});u(c$,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");h(c$,"equals",function(a){return!p(a,JSV.common.GraphSet.Highlight)?!1:a.x1==this.x1&&a.x2==this.x2},"~O");c$=F()};C(c$,"ARROW_RESET",-1,"ARROW_HOME",0,"ARROW_LEFT",
1,"ARROW_RIGHT",2,"ARROW_UP",3,"ARROW_DOWN",4);c$.RT2=c$.prototype.RT2=Math.sqrt(2);C(c$,"veryLightGrey",null,"minNumOfPointsForZoom",3,"MIN_DRAG_PIXELS",5,"ONLINE_CUTOFF",2)});n("JSV.common");w(["JSV.common.XYScaleConverter"],"JSV.common.ImageView",["java.lang.Double","JSV.common.Coordinate","$.ScaleData"],function(){c$=t(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;s(this,arguments)},JSV.common,"ImageView",null,JSV.common.XYScaleConverter);c(c$,"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(c$,"setZoom",function(a,b,c,e){this.xPixelZoom1=
Math.min(a,c);this.yPixelZoom1=Math.min(b,e);this.xPixelZoom2=Math.max(a,c);this.yPixelZoom2=Math.max(b,e);this.setView()},"~N,~N,~N,~N");c(c$,"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(c$,"setPixelWidthHeight",function(a,b){this.xPixels=a;this.yPixels=b},"~N,~N");c(c$,"resetView",function(){this.yView1=this.xView1=0;this.xView2=this.imageWidth-1;this.yView2=
this.imageHeight-1});c(c$,"setView",function(){0==this.xPixelZoom1&&this.resetZoom();var a=this.toImageX(this.xPixelZoom1),b=this.toImageY(this.yPixelZoom1),c=this.toImageX(this.xPixelZoom2),e=this.toImageY(this.yPixelZoom2);this.xView1=Math.min(a,c);this.yView1=Math.min(b,e);this.xView2=Math.max(a,c);this.yView2=Math.max(b,e);this.setScaleData();this.resetZoom()});c(c$,"resetZoom",function(){this.xPixelZoom1=this.xPixel0;this.yPixelZoom1=this.yPixel0;this.xPixelZoom2=this.xPixel1;this.yPixelZoom2=
this.yPixel1});c(c$,"toImageX",function(a){return this.xView1+q(Math.floor((a-this.xPixel0)/(this.xPixels-1)*(this.xView2-this.xView1)))},"~N");c(c$,"toImageY",function(a){return this.yView1+q(Math.floor((a-this.yPixel0)/(this.yPixels-1)*(this.yView2-this.yView1)))},"~N");c(c$,"toImageX0",function(a){return JSV.common.Coordinate.intoRange(q((1*a-this.xPixel0)/(this.xPixels-1)*(this.imageWidth-1)),0,this.imageWidth-1)},"~N");c(c$,"toImageY0",function(a){return JSV.common.Coordinate.intoRange(q((1*
a-this.yPixel0)/(this.yPixels-1)*(this.imageHeight-1)),0,this.imageHeight-1)},"~N");c(c$,"isXWithinRange",function(a){return a>=this.xPixel0-5&&a<this.xPixel0+this.xPixels+5},"~N");c(c$,"toSubspectrumIndex",function(a){return JSV.common.Coordinate.intoRange(this.imageHeight-1-this.toImageY(a),0,this.imageHeight-1)},"~N");c(c$,"toX0",function(a){return this.maxX+(this.minX-this.maxX)*(this.fixX(a)-this.xPixel0)/(this.xPixels-1)},"~N");c(c$,"toPixelX0",function(a){return this.xPixel1-q((a-this.minX)/
(this.maxX-this.minX)*(this.xPixels-1))},"~N");c(c$,"toPixelY0",function(a){return this.yPixel1-q(a/(this.imageHeight-1)*(this.yPixels-1))},"~N");c(c$,"subIndexToPixelY",function(a){return this.yPixel0+q(1*(this.imageHeight-1-a-this.yView1)/(this.yView2-this.yView1)*(this.yPixels-1))},"~N");c(c$,"fixSubIndex",function(a){return JSV.common.Coordinate.intoRange(a,this.imageHeight-1-this.yView2,this.imageHeight-1-this.yView1)},"~N");c(c$,"setView0",function(a,b,c,e){a=this.toImageX0(a);b=this.toImageY0(b);
c=this.toImageX0(c);e=this.toImageY0(e);this.xView1=Math.min(a,c);this.yView1=Math.min(b,e);this.xView2=Math.max(a,c);this.yView2=Math.max(b,e);this.resetZoom()},"~N,~N,~N,~N");c(c$,"get2dBuffer",function(a,b){var c=a.getSubSpectra();if(null==c||!c.get(0).isContinuous())return null;var e=a.getXYCoords(),g=c.size();this.imageWidth=e.length;this.imageHeight=g;var f=255/(this.maxZ-this.minZ);if(!b&&null!=this.buf2d&&f==this.grayFactorLast)return this.buf2d;this.grayFactorLast=f;for(var h=this.imageWidth*
this.imageHeight,k=D(h,0),l=0,m=0;m<g;m++){var n=c.get(m).xyCoords;if(n.length!=e.length)return null;for(var p=c.get(m).getUserYFactor(),s=0;s<e.length;s++){var t=n[s].getYVal(),t=255-JSV.common.Coordinate.intoRange(q((t*p-this.minZ)*f),0,255);k[--h]=t;l+=t}}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(c$,"adjustView",function(a,b){for(var c=0,e=!1;((e=0.05>this.averageGray)||0.3<
this.averageGray)&&10>c++;)b.scaleSpectrum(-2,e?2:0.5),this.set(b.getScale()),this.get2dBuffer(a,!1);return this.buf2d},"JSV.common.Spectrum,JSV.common.ViewData");c(c$,"getBuffer",function(){return this.buf2d});c(c$,"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(c$,"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)});h(c$,"fixX",function(a){return a<this.xPixel0?this.xPixel0:a>this.xPixel1?this.xPixel1:a},"~N");h(c$,"fixY",function(a){return JSV.common.Coordinate.intoRange(a,this.yPixel0,this.yPixel1)},"~N");h(c$,"getScale",function(){return this.scaleData});h(c$,"toX",function(a){return this.maxX+(this.minX-this.maxX)*this.toImageX(this.fixX(a))/(this.imageWidth-1)},"~N");h(c$,"toY",function(a){a=
this.toSubspectrumIndex(a);return this.maxY+(this.minY-this.maxY)*a/(this.imageWidth-1)},"~N");h(c$,"toPixelX",function(a){var b=this.toX(this.xPixel0),c=this.toX(this.xPixel1);return this.xPixel0+q((a-b)/(c-b)*(this.xPixels-1))},"~N");h(c$,"toPixelY",function(a){return q(this.yPixel0+(a-this.scaleData.minYOnScale)/(this.scaleData.maxYOnScale-this.scaleData.minYOnScale)*this.yPixels)},"~N");h(c$,"getXPixels",function(){return this.xPixels});h(c$,"getYPixels",function(){return this.yPixels});h(c$,
"getXPixel0",function(){return this.xPixel0});C(c$,"DEFAULT_MIN_GRAY",0.05,"DEFAULT_MAX_GRAY",0.3)});n("JSV.common");w(["JSV.common.Measurement"],"JSV.common.Integral",null,function(){c$=B(JSV.common,"Integral",JSV.common.Measurement);c(c$,"setInt",function(a,b,c,e,g,f){this.setA(a,b,c,"",!1,!1,0,6);this.setPt2(g,f);this.setValue(e);return this},"~N,~N,JSV.common.Spectrum,~N,~N,~N")});n("JSV.common");c$=B(JSV.common,"IntegralComparator",null,java.util.Comparator);h(c$,"compare",function(a,b){return a.getXVal()<
b.getXVal()?-1:a.getXVal()>b.getXVal()?1:0},"JSV.common.Measurement,JSV.common.Measurement");n("JSV.common");w(["java.lang.Enum","JSV.common.MeasurementData","$.IntegralComparator"],"JSV.common.IntegralData","java.lang.Double java.util.Collections $.StringTokenizer JU.AU $.BS $.DF $.Lst $.PT JSV.common.Annotation $.Coordinate $.Integral $.ScriptToken".split(" "),function(){c$=t(function(){this.intRange=this.percentOffset=this.percentMinY=0;this.normalizationFactor=1;this.integralTotal=this.offset=
this.percentRange=0;this.haveRegions=!1;this.xyCoords=null;s(this,arguments)},JSV.common,"IntegralData",JSV.common.MeasurementData);c(c$,"getPercentMinimumY",function(){return this.percentMinY});c(c$,"getPercentOffset",function(){return this.percentOffset});c(c$,"getIntegralFactor",function(){return this.intRange});u(c$,function(a,b,c,e){E(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(c$,function(a,b){E(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(c$,"update",function(a){this.update(a.integralMinY,a.integralOffset,a.integralRange)},"JSV.common.Parameters");c(c$,"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(c$,"getYValueAt",function(a){return JSV.common.Coordinate.getYValueAt(this.xyCoords,a)},"~N");c(c$,"addIntegralRegion",function(a,b){if(Double.isNaN(a))return this.haveRegions=!1,this.clear(),null;if(a==b)return 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");h(c$,"setSpecShift",function(a){JSV.common.Coordinate.shiftX(this.xyCoords,a);for(var b=this.size();1<=--b;)this.get(b).addSpecShift(a)},"~N");c(c$,"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 h=Double.$valueOf(c.substring(0,g).trim()).doubleValue(),k=Double.$valueOf(c.substring(g+1).trim()).doubleValue();0==k&&0==h&&this.clear();if(k!=h){var l=this.addIntegralRegion(Math.max(k,h),Math.min(k,h));null!=l&&0<e&&this.setSelectedIntegral(l,e)}}}catch(m){if(!y(m,Exception))throw m;}},"~S");c(c$,"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(c=0;c<a.length;c++)e=a[c].getYVal(),-1.7976931348623157E308<e&&(this.integralTotal+=e-b);this.intRange=this.percentRange/100/this.integralTotal;this.offset=this.percentOffset/100;for(var g=0,c=a.length;0<=--c;)e=a[c].getYVal(),-1.7976931348623157E308<e&&(g+=e-b),this.xyCoords[c]=(new JSV.common.Coordinate).set(a[c].getXVal(),g*this.intRange+this.offset);return this.xyCoords});c(c$,"checkRange",function(){this.percentOffset=Math.max(5,this.percentOffset);this.percentRange=
Math.max(10,this.percentRange)});c$.getIntegrationRatiosFromString=c(c$,"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(c$,"getXYCoords",function(){return this.xyCoords});c(c$,"getPercentYValueAt",function(a){return 100*
this.getYValueAt(a)},"~N");c(c$,"dispose",function(){this.xyCoords=this.spec=null});c(c$,"setSelectedIntegral",function(a,b){var c=a.getValue();this.factorAllIntegrals(0>=b?1/this.normalizationFactor:b/c,0>=b)},"JSV.common.Measurement,~N");c(c$,"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(c$,"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});h(c$,"getMeasurementListArray",function(){for(var a=Array(this.size()),b=0,c=this.size();0<=--c;)a[b++]=[""+b,JU.DF.formatDecimalDbl(this.get(c).getXVal(),2),JU.DF.formatDecimalDbl(this.get(c).getXVal2(),2),this.get(c).text];return a},
"~S");h(c$,"getMeasurementListArrayReal",function(){for(var a=JU.AU.newDouble2(this.size()),b=0,c=this.size();0<=--c;b++)a[b]=[this.get(c).getXVal(),this.get(c).getXVal2(),this.get(c).getValue()];return a},"~S");h(c$,"getDataHeader",function(){return JSV.common.IntegralData.$HEADER});c(c$,"shiftY",function(a,b,c,e){b=q(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(c$,"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)}0<this.spec.nH&&this.factorAllIntegrals(this.spec.nH/this.percentRange,!1)}});c(c$,"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));R(this,JSV.common.IntegralData,"getInfo",[a])},"java.util.Map");c(c$,"setMinimumIntegral",function(a){for(var b=this.size();0<=--b;)this.get(b).getValue()<a&&this.remove(b)},"~N");G(self.c$);c$=B(JSV.common.IntegralData,"IntMode",Enum);c$.getMode=c(c$,"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.ON},"~S");v(c$,"OFF",0,[]);v(c$,"ON",1,[]);v(c$,"TOGGLE",2,[]);v(c$,"AUTO",3,[]);v(c$,"LIST",4,[]);v(c$,"MARK",5,[]);v(c$,"MIN",6,[]);v(c$,"UPDATE",7,[]);c$=F();C(c$,"DEFAULT_OFFSET",30,"DEFAULT_RANGE",50,"DEFAULT_MINY",0.1);c$.c=c$.prototype.c=new JSV.common.IntegralComparator;c$.$HEADER=c$.prototype.$HEADER=["peak","start/ppm","end/ppm","value"]});
n("JSV.common");w(["java.lang.Enum","JSV.source.JDXDataObject","JU.Lst"],"JSV.common.Spectrum","java.lang.Boolean $.Double java.util.Hashtable JU.PT JSV.common.Coordinate $.Parameters $.PeakInfo JSV.source.JDXSourceStreamTokenizer JU.Logger".split(" "),function(){c$=t(function(){this.highlightedPeak=this.selectedPeak=this.piUnitsY=this.piUnitsX=this.peakList=this.subSpectra=null;this.currentSubSpectrumIndex=this.specShift=0;this.$isForcedSubset=!1;this.id="";this.convertedSpectrum=null;this.userYFactor=
1;this.exportXAxisLeftToRight=!1;this.fillColor=null;s(this,arguments)},JSV.common,"Spectrum",JSV.source.JDXDataObject);K(c$,function(){this.peakList=new JU.Lst});h(c$,"finalize",function(){System.out.println("JDXSpectrum "+this+" finalized "+this.title)});c(c$,"dispose",function(){});c(c$,"isForcedSubset",function(){return this.$isForcedSubset});c(c$,"setId",function(a){this.id=a},"~S");u(c$,function(){E(this,JSV.common.Spectrum,[]);this.headerTable=new JU.Lst;this.xyCoords=[];this.parent=this});
c(c$,"copy",function(){var a=new JSV.common.Spectrum;this.copyTo(a);a.setPeakList(this.peakList,this.piUnitsX,null);a.fillColor=this.fillColor;return a});c(c$,"getXYCoords",function(){return this.getCurrentSubSpectrum().xyCoords});c(c$,"getPeakList",function(){return this.peakList});c(c$,"setPeakList",function(a,b,c){this.peakList=a;this.piUnitsX=b;this.piUnitsY=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(c$,"selectPeakByFileIndex",function(a,b,c){if(null!=this.peakList&&0<this.peakList.size()&&(null==c||this.sourceID.equals(b)))for(var e=0;e<this.peakList.size();e++)if(this.peakList.get(e).checkFileIndex(a,b,c))return System.out.println("selecting peak by FileIndex "+this+" "+this.peakList.get(e)),this.selectedPeak=this.peakList.get(e);return null},"~S,~S,~S");c(c$,"selectPeakByFilePathTypeModel",function(a,b,c){if(null!=this.peakList&&0<this.peakList.size())for(var e=
0;e<this.peakList.size();e++)if(this.peakList.get(e).checkFileTypeModel(a,b,c))return System.out.println("selecting peak byFilePathTypeModel "+this+" "+this.peakList.get(e)),this.selectedPeak=this.peakList.get(e);return null},"~S,~S,~S");c(c$,"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(c$,
"setSelectedPeak",function(a){this.selectedPeak=a},"JSV.common.PeakInfo");c(c$,"setHighlightedPeak",function(a){this.highlightedPeak=a},"JSV.common.PeakInfo");c(c$,"getSelectedPeak",function(){return this.selectedPeak});c(c$,"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(c$,"getAssociatedPeakInfo",function(a,b){this.selectedPeak=this.findPeakByCoord(a,
b);return null==this.selectedPeak?this.getBasePeakInfo():this.selectedPeak},"~N,JSV.common.Coordinate");c(c$,"findPeakByCoord",function(a,b){if(null!=b&&null!=this.peakList&&0<this.peakList.size()){for(var c=b.getXVal(),e=-1,g=1E100,f=0;f<this.peakList.size();f++){var h=this.peakList.get(f).checkRange(a,c);h<g&&(g=h,e=f)}if(0<=e)return this.peakList.get(e)}return null},"~N,JSV.common.Coordinate");c(c$,"getPeakTitle",function(){return null!=this.selectedPeak?this.selectedPeak.getTitle():null!=this.highlightedPeak?
this.highlightedPeak.getTitle():this.getTitleLabel()});c(c$,"getTitleLabel",function(){var a=null==this.peakList||0==this.peakList.size()?this.getQualifiedDataType():this.peakList.get(0).getType();return(null!=a&&0<a.length?a+" ":"")+this.getTitle()});c(c$,"setNextPeak",function(a,b){if(null==this.peakList||0==this.peakList.size())return-1;for(var c=a.getXVal()+1E-6*b,e=-1,g=-1,f=1.7976931348623157E308*b,h=0,k=this.peakList.size();0<=--k;){var l=this.peakList.get(k).getX();0<b?l>c&&l<f?(e=k,f=l):
l<c&&l-c<h&&(g=k,h=l-c):l<c&&l>f?(e=k,f=l):l>c&&l-c>h&&(g=k,h=l-c)}if(0>e){if(0>g)return-1;e=g}return e},"JSV.common.Coordinate,~N");c(c$,"getPercentYValueAt",function(a){return!this.isContinuous()?NaN:this.getYValueAt(a)},"~N");c(c$,"getYValueAt",function(a){return JSV.common.Coordinate.getYValueAt(this.xyCoords,a)},"~N");c(c$,"setUserYFactor",function(a){this.userYFactor=a},"~N");c(c$,"getUserYFactor",function(){return this.userYFactor});c(c$,"getConvertedSpectrum",function(){return this.convertedSpectrum});
c(c$,"setConvertedSpectrum",function(a){this.convertedSpectrum=a},"JSV.common.Spectrum");c$.taConvert=c(c$,"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");
c$.toT=c(c$,"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 e=0;e<b.length;e++)c[e]=(new JSV.common.Coordinate).set(b[e].getXVal(),JSV.common.Spectrum.toTransmittance(b[e].getYVal()));return JSV.common.Spectrum.newSpectrum(a,c,"TRANSMITTANCE")},"JSV.common.Spectrum");c$.toA=c(c$,"toA",function(a){if(!a.isTransmittance())return null;for(var b=a.getXYCoords(),c=Array(b.length),
e=JSV.common.Coordinate.isYInRange(b,-2,2),g=0;g<b.length;g++)c[g]=(new JSV.common.Coordinate).set(b[g].getXVal(),JSV.common.Spectrum.toAbsorbance(b[g].getYVal(),e));return JSV.common.Spectrum.newSpectrum(a,c,"ABSORBANCE")},"JSV.common.Spectrum");c$.newSpectrum=c(c$,"newSpectrum",function(a,b,c){var e=a.copy();e.setOrigin("JSpecView Converted");e.setOwner("JSpecView Generated");e.setXYCoords(b);e.setYUnits(c);a.setConvertedSpectrum(e);e.setConvertedSpectrum(a);return e},"JSV.common.Spectrum,~A,~S");
c$.toAbsorbance=c(c$,"toAbsorbance",function(a,b){return Math.min(4,b?2-JSV.common.Spectrum.log10(a):-JSV.common.Spectrum.log10(a))},"~N,~B");c$.toTransmittance=c(c$,"toTransmittance",function(a){return 0>=a?1:Math.pow(10,-a)},"~N");c$.log10=c(c$,"log10",function(a){return Math.log(a)/Math.log(10)},"~N");c$.process=c(c$,"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(c$,"getSubSpectra",function(){return this.subSpectra});c(c$,"getCurrentSubSpectrum",function(){return null==this.subSpectra?this:this.subSpectra.get(this.currentSubSpectrumIndex)});c(c$,"advanceSubSpectrum",function(a){return this.setCurrentSubSpectrum(this.currentSubSpectrumIndex+a)},"~N");c(c$,"setCurrentSubSpectrum",function(a){return this.currentSubSpectrumIndex=JSV.common.Coordinate.intoRange(a,0,this.subSpectra.size()-1)},"~N");c(c$,"addSubSpectrum",
function(a,b){if(!b&&(2>this.numDim||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(c$,"getSubIndex",function(){return null==this.subSpectra?-1:this.currentSubSpectrumIndex});c(c$,"setExportXAxisDirection",function(a){this.exportXAxisLeftToRight=a},"~B");c(c$,"isExportXAxisLeftToRight",function(){return this.exportXAxisLeftToRight});
c(c$,"getInfo",function(a){var b=new java.util.Hashtable;if("id".equalsIgnoreCase(a))return b.put(a,this.id),b;b.put("id",this.id);JSV.common.Parameters.putInfo(a,b,"specShift",Double.$valueOf(this.specShift));var c="header".equals(a);if(!c&&null!=a)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,f=this.getHeaderRowDataAsArray(),e=0;e<f.length;e++){var h=JSV.source.JDXSourceStreamTokenizer.cleanLabel(f[e][0]);
if(!(null!=a&&!c&&!h.equals(a))){var k=JSV.common.Spectrum.fixInfoValue(f[e][1]);if(null==a){var l=new java.util.Hashtable;l.put("value",k);l.put("index",Integer.$valueOf(e+1));b.put(h,l)}else b.put(h,k)}}0<g.size()&&b.put("header",g);c||(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())));return b},"~S");c$.fixInfoValue=c(c$,"fixInfoValue",function(a){try{return Integer.$valueOf(a)}catch(b){if(!y(b,Exception))throw b;}try{return Double.$valueOf(a)}catch(c){if(!y(c,Exception))throw c;}return a},"~S");h(c$,"toString",function(){return this.getTitleLabel()});c(c$,"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(c$,"getBasePeakInfo",function(){return 0==this.peakList.size()?new JSV.common.PeakInfo:new JSV.common.PeakInfo(' baseModel="" '+this.peakList.get(0))});c(c$,"getAxisLabel",function(a){var b=a?this.piUnitsX:this.piUnitsY;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(c$,"findXForPeakNearest",function(a){return JSV.common.Coordinate.findXForPeakNearest(this.xyCoords,
a,this.isInverted())},"~N");c(c$,"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");c$.allowSubSpec=c(c$,"allowSubSpec",function(a,b){return a.is1D()==b.is1D()&&a.xUnits.equalsIgnoreCase(b.xUnits)&&a.isHNMR()==b.isHNMR()},"JSV.common.Spectrum,JSV.common.Spectrum");c$.areXScalesCompatible=
c(c$,"areXScalesCompatible",function(a,b,c,e){var g=a.isNMR();if(g!=b.isNMR()||a.isContinuous()!=b.isContinuous()||!e&&!JSV.common.Spectrum.areUnitsCompatible(a.xUnits,b.xUnits))return!1;if(c){if(a.is1D()!=b.is1D())return!1}else if(e){if(!g)return!0}else if(!a.is1D()||!b.is1D())return!1;return!g||b.is1D()&&a.parent.nucleusX.equals(b.parent.nucleusX)},"JSV.common.Spectrum,JSV.common.Spectrum,~B,~B");c$.areUnitsCompatible=c(c$,"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");c$.areLinkableX=c(c$,"areLinkableX",function(a,b){return a.isNMR()&&b.isNMR()&&a.nucleusX.equals(b.nucleusX)},"JSV.common.Spectrum,JSV.common.Spectrum");c$.areLinkableY=c(c$,"areLinkableY",function(a,b){return a.isNMR()&&b.isNMR()&&a.nucleusX.equals(b.nucleusY)},"JSV.common.Spectrum,JSV.common.Spectrum");c(c$,"setNHydrogens",function(a){this.nH=a},"~N");c(c$,"getPeakWidth",function(){return(this.getLastX()-
this.getFirstX())/100});c(c$,"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(c$,"setFillColor",function(a){this.fillColor=a;null!=this.convertedSpectrum&&(this.convertedSpectrum.fillColor=a)},"javajs.api.GenericColor");G(self.c$);c$=B(JSV.common.Spectrum,"IRMode",Enum);c$.getMode=c(c$,"getMode",function(a){switch(null==a?"I":a.toUpperCase().charAt(0)){case "A":return JSV.common.Spectrum.IRMode.TO_ABS;
case "T":return a.equalsIgnoreCase("TOGGLE")?JSV.common.Spectrum.IRMode.TOGGLE:JSV.common.Spectrum.IRMode.TO_TRANS;case "N":return JSV.common.Spectrum.IRMode.NO_CONVERT;default:return JSV.common.Spectrum.IRMode.TOGGLE}},"~S");v(c$,"NO_CONVERT",0,[]);v(c$,"TO_TRANS",1,[]);v(c$,"TO_ABS",2,[]);v(c$,"TOGGLE",3,[]);c$=F();C(c$,"MAXABS",4)});___date="$Date: 2014-06-28 02:24:08 -0500 (Sat, 28 Jun 2014) $";___svnRev="$LastChangedRevision: 1655 $";___version="14.2.1";n("JSV.common");c$=B(JSV.common,"JSVersion");
C(c$,"VERSION",null,"VERSION_SHORT",null);var V=null,aa=null,ba=null,V=self.___version,aa=self.___date,ba=self.___svnRev;null!=aa&&(aa=aa.substring(7,23));null!=ba&&(ba=ba.substring(22,27));JSV.common.JSVersion.VERSION_SHORT=null!=V?V:"(Unknown version)";JSV.common.JSVersion.VERSION=JSV.common.JSVersion.VERSION_SHORT+"/SVN"+ba+"/"+(null!=aa?aa:"(Unknown date)");n("JSV.common");w(["java.util.Hashtable"],"JSV.common.JSVFileManager","java.io.BufferedInputStream $.BufferedReader $.InputStreamReader $.StringReader java.net.URL JU.AU $.Encoding $.PT $.SB JSV.common.JSVersion $.JSViewer JSV.exception.JSVException JU.Logger".split(" "),
function(){c$=B(JSV.common,"JSVFileManager");c(c$,"isApplet",function(){return null!=JSV.common.JSVFileManager.appletDocumentBase});c$.getFileAsString=c(c$,"getFileAsString",function(a){if(null==a)return null;var b,c=new JU.SB;try{b=JSV.common.JSVFileManager.getBufferedReaderFromName(a,null);for(var e;null!=(e=b.readLine());)c.append(e),c.appendC("\n");b.close()}catch(g){if(y(g,Exception))return null;throw g;}return c.toString()},"~S");c$.getBufferedReaderForInputStream=c(c$,"getBufferedReaderForInputStream",
function(a){try{return new java.io.BufferedReader(new java.io.InputStreamReader(a,"UTF-8"))}catch(b){if(y(b,Exception))return null;throw b;}},"java.io.InputStream");c$.getBufferedReaderForData=c(c$,"getBufferedReaderForData",function(a){return null==a?null:new java.io.BufferedReader(new java.io.StringReader(p(a,String)?a:String.instantialize(a)))},"~O");c$.getBufferedReaderFromName=c(c$,"getBufferedReaderFromName",function(a,b){if(null==a)throw new JSV.exception.JSVException("Cannot find "+a);JU.Logger.info("JSVFileManager getBufferedReaderFromName "+
a);var c=JSV.common.JSVFileManager.getFullPathName(a);c.equals(a)||JU.Logger.info("JSVFileManager getBufferedReaderFromName "+c);return JSV.common.JSVFileManager.getUnzippedBufferedReaderFromName(c,b)},"~S,~S");c$.getFullPathName=c(c$,"getFullPathName",function(a){try{if(null==JSV.common.JSVFileManager.appletDocumentBase){if(JSV.common.JSVFileManager.isURL(a)){var b=new java.net.URL(U("java.net.URL"),a,null);return b.toString()}return JSV.common.JSVFileManager.viewer.apiPlatform.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(y(c,Exception))throw new JSV.exception.JSVException("Cannot create path for "+a);throw c;}},"~S");c$.isURL=c(c$,"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");c$.urlTypeIndex=c(c$,"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");c$.isLocal=c(c$,"isLocal",function(a){if(null==a)return!1;a=JSV.common.JSVFileManager.urlTypeIndex(a);return 0>a||4==a},"~S");c$.getUnzippedBufferedReaderFromName=c(c$,"getUnzippedBufferedReaderFromName",function(a,b){var c=null;0<=a.indexOf("|")&&(c=JU.PT.split(a,"|"),null!=c&&0<c.length&&(a=c[0]));if(a.startsWith("http://SIMULATION/"))return JSV.common.JSVFileManager.getSimulationReader(a);
try{var e=JSV.common.JSVFileManager.getInputStream(a,!0,null);if(p(e,JU.SB)||p(e,String))return new java.io.BufferedReader(new java.io.StringReader(e.toString()));if(JSV.common.JSVFileManager.isAB(e))return new java.io.BufferedReader(new java.io.StringReader(String.instantialize(e)));var g=new java.io.BufferedInputStream(e),e=g;if(JSV.common.JSVFileManager.isZipFile(g))return JSV.common.JSViewer.getInterface("JSV.common.JSVZipUtil").newJSVZipFileSequentialReader(e,c,b);JSV.common.JSVFileManager.isGzip(g)&&
(e=JSV.common.JSViewer.getInterface("JSV.common.JSVZipUtil").newGZIPInputStream(e));return new java.io.BufferedReader(new java.io.InputStreamReader(e,"UTF-8"))}catch(f){if(y(f,Exception))throw new JSV.exception.JSVException("Cannot read file "+a+" "+f);throw f;}},"~S,~S");c$.getAbbrSimulationFileName=c(c$,"getAbbrSimulationFileName",function(a){var b=JSV.common.JSVFileManager.getAbbreviatedSimulationName(a,!0);0<=a.indexOf("MOL=")&&(a=JSV.common.JSVFileManager.htCorrelationCache.get(a),null!=a&&JSV.common.JSVFileManager.htCorrelationCache.put(b,
a));return b},"~S");c$.getAbbreviatedSimulationName=c(c$,"getAbbreviatedSimulationName",function(a,b){return 0<=a.indexOf("MOL=")?(b?"http://SIMULATION/":"")+"MOL="+JSV.common.JSVFileManager.getSimulationHash(a):a},"~S,~B");c$.getSimulationHash=c(c$,"getSimulationHash",function(a){return""+Math.abs(a.substring(a.indexOf("V2000")+1).hashCode())},"~S");c$.getSimulationFileData=c(c$,"getSimulationFileData",function(a){return JSV.common.JSVFileManager.htCorrelationCache.get(a.startsWith("MOL=")?a.substring(4):
JSV.common.JSVFileManager.getAbbreviatedSimulationName(a,!1))},"~S");c$.getSimulationReader=c(c$,"getSimulationReader",function(a){var b=JSV.common.JSVFileManager.htCorrelationCache.get(a);null==b&&(b=JSV.common.JSVFileManager.getNMRSimulationJCampDX(a.substring(18)),null!=b&&JSV.common.JSVFileManager.htCorrelationCache.put(a,b));return JSV.common.JSVFileManager.getBufferedReaderForData(b)},"~S");c$.isAB=c(c$,"isAB",function(a){return ea(a)},"~O");c$.isZipFile=c(c$,"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(e){if(y(e,Exception))throw new JSV.exception.JSVException(e.toString());throw e;}},"java.io.InputStream");c$.isGzip=c(c$,"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(e){if(y(e,Exception))throw new JSV.exception.JSVException(e.toString());throw e;}},"java.io.InputStream");c$.getStreamAsBytes=c(c$,"getStreamAsBytes",function(a,
b){try{for(var c=O(1024,0),e=null==b?O(4096,0):null,g=0,f=0;0<(g=a.read(c,0,1024));)f+=g,null==b?(f>=e.length&&(e=JU.AU.ensureLengthByte(e,2*f)),System.arraycopy(c,0,e,f-g,g)):b.write(c,0,g);a.close();return null==b?JU.AU.arrayCopyByte(e,f):f+" bytes"}catch(h){if(y(h,Exception))throw new JSV.exception.JSVException(h.toString());throw h;}},"java.io.BufferedInputStream,JU.OC");c$.postByteArray=c(c$,"postByteArray",function(a,b){var c=null;try{c=JSV.common.JSVFileManager.getInputStream(a,!1,b)}catch(e){if(y(e,
Exception))c=e.toString();else throw e;}if(p(c,String))return c;try{c=JSV.common.JSVFileManager.getStreamAsBytes(c,null)}catch(g){if(y(g,JSV.exception.JSVException))try{c.close()}catch(f){if(!y(f,Exception))throw f;}else throw g;}return null==c?"":JSV.common.JSVFileManager.fixUTF(c)},"~S,~A");c$.getUTFEncoding=c(c$,"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");c$.fixUTF=c(c$,"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(e){if(y(e,java.io.IOException))JU.Logger.error("fixUTF error "+
e);else throw e;}return String.instantialize(a)},"~A");c$.getInputStream=c(c$,"getInputStream",function(a,b,c){var e=JSV.common.JSVFileManager.isURL(a),g=null!=JSV.common.JSVFileManager.appletDocumentBase,f=null,f=null,h;if(e&&0<=(h=a.indexOf("?POST?")))f=a.substring(h+6),a=a.substring(0,h);if(g||e){var k;try{k=new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,a,null)}catch(l){if(y(l,Exception))throw new JSV.exception.JSVException("Cannot read "+a);throw l;}JU.Logger.info("JSVFileManager opening URL "+
k+(null==f?"":" with POST of "+f.length+" bytes"));f=JSV.common.JSVFileManager.viewer.apiPlatform.getURLContents(k,c,f,!1)}else b&&JU.Logger.info("JSVFileManager opening file "+a),f=JSV.common.JSVFileManager.viewer.apiPlatform.getBufferedFileInputStream(a);if(p(f,String))throw new JSV.exception.JSVException(f);return f},"~S,~B,~A");c$.getNMRSimulationJCampDX=c(c$,"getNMRSimulationJCampDX",function(a){var b=""+JSV.common.JSVFileManager.getSimulationHash(a),c=JSV.common.JSVFileManager.htCorrelationCache.get(b);
if(null!=c)return c;var e=a.startsWith("MOL="),g,f=e?null:JU.PT.rep(JSV.common.JSVFileManager.nciResolver,"%FILE",JU.PT.escapeUrl(a));null==(g=e?JU.PT.rep(a.substring(4),"\\n","\n"):JSV.common.JSVFileManager.getFileAsString(f))&&JU.Logger.info("no data returned");c=JSV.common.JSVFileManager.getFileAsString(JSV.common.JSVFileManager.nmrdbServer+g);JSV.common.JSVFileManager.htCorrelationCache.put("json",c);JU.Logger.debug(c);if(0<=c.indexOf('"error":'))return null;var c=JU.PT.rep(c,"\\r\\n","\n"),c=
JU.PT.rep(c,"\\t","\t"),c=JU.PT.rep(c,"\\n","\n"),h=JSV.common.JSVFileManager.getQuotedJSONAttribute(c,"molfile",null);JSV.common.JSVFileManager.htCorrelationCache.put("mol",h);e||Jmol.Cache.put("http://SIMULATION/"+a+"#molfile",h.getBytes());h=JSV.common.JSVFileManager.getQuotedJSONAttribute(c,"xml",null);h=JU.PT.rep(h,"<Signals>","<Signals src="+JU.PT.esc(JU.PT.rep(JSV.common.JSVFileManager.nmrdbServer,"?POST?molfile=",""))+">");h=JU.PT.rep(h,"</","\n</");h=JU.PT.rep(h,"><",">\n<");h=JU.PT.rep(h,
'\\"','"');JSV.common.JSVFileManager.htCorrelationCache.put("xml",h);var c=JSV.common.JSVFileManager.getQuotedJSONAttribute(c,"jcamp",null),c="##TITLE="+(e?"JMOL SIMULATION":a)+"\n"+c.substring(c.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=c.indexOf("##.");a=JSV.common.JSVFileManager.getAbbreviatedSimulationName(a,
!1);var l=a.indexOf("id='");e&&0<l&&(a=a.substring(l+4,(a+"'").indexOf("'",l+4)));c=c.substring(0,k)+"##$MODELS=\n<Models>\n<ModelData id="+JU.PT.esc(a)+' type="MOL" src='+JU.PT.esc(f)+">\n"+g+"</ModelData>\n</Models>\n##$SIGNALS=\n"+h+"\n"+c.substring(k);JSV.common.JSVFileManager.htCorrelationCache.put("jcamp",c);JSV.common.JSVFileManager.htCorrelationCache.put(b,c);return c},"~S");c$.getResource=c(c$,"getResource",function(a,b,c){var e=null;try{if(null==(e=a.getClass().getResource(b)))c[0]="Couldn't find file: "+
b}catch(g){if(y(g,Exception))c[0]="Exception "+g+" in getResource "+b;else throw g;}return e},"~O,~S,~A");c$.getResourceString=c(c$,"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(p(a,String))return JSV.common.JSVFileManager.getFileAsString(a);b=new JU.SB;try{for(var e=new java.io.BufferedReader(new java.io.InputStreamReader(a.getContent(),"UTF-8")),g;null!=(g=e.readLine());)b.append(g).append("\n");e.close()}catch(f){if(y(f,
Exception))c[0]=f.toString();else throw f;}return b.toString()},"~O,~S,~A");c$.getJmolFilePath=c(c$,"getJmolFilePath",function(a){try{a=JSV.common.JSVFileManager.getFullPathName(a)}catch(b){if(y(b,JSV.exception.JSVException))return null;throw b;}return null==JSV.common.JSVFileManager.appletDocumentBase?a.$replace("\\","/"):a},"~S");c$.getTagName=c(c$,"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(U("java.net.URL"),a,null)).getFile();return b.substring(b.lastIndexOf("/")+1)}catch(c){if(y(c,java.io.IOException))return null;throw c;}return JSV.common.JSVFileManager.viewer.apiPlatform.newFile(a).getName()},"~S");c$.getQuotedJSONAttribute=c(c$,"getQuotedJSONAttribute",function(a,b,c){null==c&&(c=b);c='"'+c+'":';b=a.indexOf('"'+b+'":');var e=a.indexOf(c,b);return 0>b||0>e?null:JU.PT.getQuotedStringAt(a,e+c.length)},"~S,~S,~S");c$.setDocumentBase=c(c$,"setDocumentBase",function(a,
b){JSV.common.JSVFileManager.viewer=a;JSV.common.JSVFileManager.appletDocumentBase=b},"JSV.common.JSViewer,java.net.URL");C(c$,"SIMULATION_PROTOCOL","http://SIMULATION/","appletDocumentBase",null,"viewer",null,"jsDocumentBase","");c$.htCorrelationCache=c$.prototype.htCorrelationCache=new java.util.Hashtable;c$.urlPrefixes=c$.prototype.urlPrefixes=["http:","https:","ftp:","http://SIMULATION/","file:"];C(c$,"URL_LOCAL",4,"nciResolver","http://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf&get3d=True",
"nmrdbServer","http://www.nmrdb.org/tools/jmol/predict.php?POST?molfile=","stringCount",0)});n("JSV.common");w(["javajs.api.BytePoster","$.PlatformViewer","javajs.awt.Dimension","JSV.common.Spectrum"],"JSV.common.JSViewer","java.io.File java.lang.Boolean $.Double $.Float $.Thread java.net.URL java.util.Hashtable JU.CU $.Lst $.OC $.PT $.SB JSV.common.Annotation $.ExportType $.JSVFileManager $.PanelData $.PanelNode $.Parameters $.PeakInfo $.PrintLayout $.RepaintManager $.ScriptToken $.ScriptTokenizer JSV.source.JDXReader $.JDXSource JSV.tree.SimpleTree JU.Logger".split(" "),
function(){c$=t(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=null;this.autoShowLegend=this.autoIntegrate=this.interfaceOverlaid=this.loadImaginary=!1;this.obscureTitleFromUser=null;this.allowMenu=this.allowCompoundMenu=!0;this.initialEndIndex=this.initialStartIndex=
-1;this.isSigned=this.isJS=this.isApplet=this.isSingleThreaded=!1;this.recentScript="";this.display=this.html5Applet=this.syncID=this.fullName=this.appletName=null;this.maximumSize=2147483647;this.dimScreen=null;this.scriptLevelCount=this.nViews=this.fileCount=0;this.apiPlatform=this.integrationRatios=this.returnFromJmolModel=null;this.popupZoomEnabled=this.popupAllowMenu=!0;this.defaultLoadScript=null;this.nmrMaxY=NaN;this.overlayLegendVisible=!1;this.recentStackPercent=5;this.offWindowFrame=this.lastPrintLayout=
null;this.recentOpenURL="http://";this.recentURL=null;this.recentSimulation="tylenol";s(this,arguments)},JSV.common,"JSViewer",null,[javajs.api.PlatformViewer,javajs.api.BytePoster]);K(c$,function(){this.irMode=JSV.common.Spectrum.IRMode.NO_CONVERT;this.dimScreen=new javajs.awt.Dimension(0,0)});c(c$,"setProperty",function(a,b){null!=this.properties&&this.properties.setProperty(a,b)},"~S,~S");c(c$,"setNode",function(a){a.jsvp!==this.selectedPanel&&this.si.siSetSelectedPanel(a.jsvp);this.si.siSendPanelChange();
this.si.siNodeSet(a)},"JSV.common.PanelNode");u(c$,function(a,b,c){this.si=a;this.isJS=(this.isApplet=b)&&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");c(c$,"setPopupMenu",function(a,b){this.popupAllowMenu=a;this.popupZoomEnabled=b},"~B,~B");c(c$,"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(y(c,Exception)){JU.Logger.error(c+" initializing popup menu");return}throw c;}this.jsvpPopupMenu.jpiShow(a,b)}},"~N,~N");c(c$,"runScriptNow",function(a){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 e=null;null!=
a&&a.hasMoreTokens()&&0<c&&b;){var g=a.nextToken(),f=new JSV.common.ScriptTokenizer(g,!1),h=JSV.common.ScriptToken.getKey(f);if(null!=h){var k=JSV.common.ScriptToken.getScriptToken(h),f=JSV.common.ScriptToken.getValue(k,f,g);try{switch(k){case JSV.common.ScriptToken.UNKNOWN:JU.Logger.info("Unrecognized parameter: "+h);--c;break;default:if(null==this.selectedPanel)break;this.parameters.set(this.pd(),k,f);this.si.siUpdateBoolean(k,JSV.common.Parameters.isTrue(f));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,
f);break;case JSV.common.ScriptToken.DEFAULTLOADSCRIPT:f=JU.PT.rep(f,"''",'"');this.defaultLoadScript=0<f.length?f:null;break;case JSV.common.ScriptToken.DEFAULTNMRNORMALIZATION:this.nmrMaxY=JU.PT.parseFloat(f);break;case JSV.common.ScriptToken.AUTOINTEGRATE:this.autoIntegrate=JSV.common.Parameters.isTrue(f);break;case JSV.common.ScriptToken.CLOSE:this.execClose(f);break;case JSV.common.ScriptToken.DEBUG:JU.Logger.setLogLevel(f.toLowerCase().equals("high")?6:JSV.common.Parameters.isTrue(f)?5:4);break;
case JSV.common.ScriptToken.GETPROPERTY:var l=null==this.selectedPanel?null:this.getPropertyAsJavaObject(f);null!=l&&this.selectedPanel.showMessage(JU.PT.toJSON(null,l),f);break;case JSV.common.ScriptToken.HIDDEN:this.si.siExecHidden(JSV.common.Parameters.isTrue(f));break;case JSV.common.ScriptToken.INTEGRATIONRATIOS:this.integrationRatios=f;this.execIntegrate(null);break;case JSV.common.ScriptToken.INTERFACE:this.interfaceOverlaid=this.checkOvelayInterface(f);break;case JSV.common.ScriptToken.INTEGRALOFFSET:case JSV.common.ScriptToken.INTEGRALRANGE:this.execSetIntegralParameter(k,
Double.parseDouble(f));break;case JSV.common.ScriptToken.JMOL:this.si.syncToJmol(f);break;case JSV.common.ScriptToken.JSV:this.syncScript(JU.PT.trimQuotes(f));break;case JSV.common.ScriptToken.LOAD:if(0==f.length){null!=this.defaultLoadScript&&this.runScriptNow(this.defaultLoadScript);break}this.load(f,(null==this.defaultLoadScript?"":this.defaultLoadScript+";")+a.getRemainingScript());e=null==this.selectedPanel?null:this.si.siLoaded(f);a=null;break;case JSV.common.ScriptToken.LOADIMAGINARY:this.loadImaginary=
JSV.common.Parameters.isTrue(f);break;case JSV.common.ScriptToken.PEAK:this.execPeak(f);break;case JSV.common.ScriptToken.PEAKLIST:this.execPeakList(f);break;case JSV.common.ScriptToken.SCALEBY:this.scaleSelectedBy(this.panelNodes,f);break;case JSV.common.ScriptToken.SCRIPT:if(f.equals("")||f.toLowerCase().startsWith("inline"))this.execScriptInline(f);else{var m=JSV.common.JSVFileManager.getFileAsString(f);null!=m&&100>this.scriptLevelCount&&this.runScriptNow(m)}break;case JSV.common.ScriptToken.SELECT:this.execSelect(f);
break;case JSV.common.ScriptToken.SPECTRUM:case JSV.common.ScriptToken.SPECTRUMNUMBER:this.setSpectrum(f)||(b=!1);break;case JSV.common.ScriptToken.STACKOFFSETY:this.execOverlayOffsetY(JU.PT.parseInt(""+JU.PT.parseFloat(f)));break;case JSV.common.ScriptToken.TEST:this.si.siExecTest(f);break;case JSV.common.ScriptToken.OVERLAY:case JSV.common.ScriptToken.VIEW:this.execView(f,!0);break;case JSV.common.ScriptToken.HIGHLIGHT:b=this.highlight(g);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.SHOWKEY: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(f));break;case JSV.common.ScriptToken.GETSOLUTIONCOLOR:this.show("solutioncolor"+f.toLowerCase());break;case JSV.common.ScriptToken.INTEGRATION:case JSV.common.ScriptToken.INTEGRATE:this.execIntegrate(f);break;case JSV.common.ScriptToken.IRMODE:this.execIRMode(f);break;case JSV.common.ScriptToken.LABEL:this.pd().addAnnotation(JSV.common.ScriptToken.getTokens(f));break;case JSV.common.ScriptToken.LINK:this.pd().linkSpectra(JSV.common.PanelData.LinkMode.getMode(f));
break;case JSV.common.ScriptToken.OVERLAYSTACKED:this.pd().splitStack(!JSV.common.Parameters.isTrue(f));break;case JSV.common.ScriptToken.PRINT:e=this.execWrite(null);break;case JSV.common.ScriptToken.SETPEAK:this.pd().shiftSpectrum(NaN,f.equalsIgnoreCase("NONE")?1.7976931348623157E308:f.equalsIgnoreCase("?")?4.9E-324:Double.parseDouble(f));break;case JSV.common.ScriptToken.SETX:this.pd().shiftSpectrum(4.9E-324,Double.parseDouble(f));break;case JSV.common.ScriptToken.SHIFTX:this.pd().shiftSpectrum(f.equalsIgnoreCase("NONE")?
1.7976931348623157E308:Double.parseDouble(f),NaN);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(f));break;case JSV.common.ScriptToken.SHOWKEY:this.setOverlayLegendVisibility(JSV.common.Parameters.getTFToggle(f),!0);break;case JSV.common.ScriptToken.SHOWMEASUREMENTS:this.pd().showAnnotation(JSV.common.Annotation.AType.Measurements,JSV.common.Parameters.getTFToggle(f));
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(f));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(f);break;case JSV.common.ScriptToken.WINDOW:this.si.siNewWindow(JSV.common.Parameters.isTrue(f),
!1);break;case JSV.common.ScriptToken.WRITE:e=this.execWrite(f);break;case JSV.common.ScriptToken.ZOOM:b=this.execZoom(f)}}}catch(n){if(y(n,Exception))e=n.toString(),JU.Logger.error(n.toString()),b=!1,--c;else throw n;}}}this.scriptLevelCount--;this.si.siExecScriptComplete(e,!0);return b},"~S");c(c$,"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(c$,"checkOvelayInterface",
function(a){return a.equalsIgnoreCase("single")||a.equalsIgnoreCase("overlay")},"~S");c(c$,"execPeak",function(a){try{var b=JSV.common.ScriptToken.getTokens(a);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(!y(c,Exception))throw c;}},"~S");c(c$,"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 for(var c=JSV.common.ScriptToken.getTokens(a),e=c.size();0<=--e;){a=c.get(e);var g=a.indexOf("=");if(!(0>=g)){var f=a.substring(0,g);a=a.substring(g+1);try{f.startsWith("thr")?b.peakListThreshold=Double.$valueOf(a).doubleValue():f.startsWith("int")&&(b.peakListInterpolation=a.equalsIgnoreCase("none")?"NONE":"parabolic"),this.isClosed()||this.pd().getPeakListing(b,Boolean.TRUE)}catch(h){if(!y(h,Exception))throw h;}}}},"~S");
c(c$,"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 e=JU.PT.parseFloat(2<c?b.get(2):""),g=this.getRGB(3<c?b.get(3):"100"),f=this.getRGB(4<c?b.get(4):"100"),h=this.getRGB(5<c?b.get(5):"100"),b=this.getRGB(6<c?b.get(6):"100");Float.isNaN(a)||Float.isNaN(e)?this.pd().removeAllHighlights():(this.pd().removeHighlight(a,
e),0>b&&(b=150),0<=g&&(0<=f&&0<=h)&&this.pd().addHighlight(null,a,e,null,g,f,h,b));this.repaint(!0)}return!0},"~S");c(c$,"getRGB",function(a){a=JU.PT.parseFloat(a);return z(Float.isNaN(a)?-1:1<a?a:255*a)},"~S");c(c$,"execZoom",function(a){var b=0,c=0,e=0,g=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(),!0;case 2:b=Double.parseDouble(a.get(0));c=Double.parseDouble(a.get(1));break;case 4:b=Double.parseDouble(a.get(0)),e=Double.parseDouble(a.get(1)),c=Double.parseDouble(a.get(2)),
g=Double.parseDouble(a.get(3))}this.pd().setZoom(b,e,c,g);return!0},"~S");c(c$,"scaleSelectedBy",function(a,b){try{for(var c=Double.parseDouble(b),e=a.size();0<=--e;)a.get(e).pd().scaleSelectedBy(c)}catch(g){if(!y(g,Exception))throw g;}},"JU.Lst,~S");c(c$,"pd",function(){return null==this.selectedPanel?null:this.selectedPanel.getPanelData()});c(c$,"isClosed",function(){return null==this.pd()});c(c$,"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(!y(b,Exception))throw b;}}else{for(var c=this.panelNodes,e=c.size();0<=--e;)c.get(e).pd().selectFromEntireSet(-2147483648);c=new JU.Lst;this.fillSpecList(a,c,!1)}},"~S");c(c$,"execView",function(a,b){if(a.equals(""))this.checkOverlay();else{var c=new JU.Lst,e=this.fillSpecList(a,c,!0);0<c.size()&&this.si.siOpenDataOrFile(null,e,c,e,-1,-1,!1,null,null);b||this.si.siValidateAndRepaint(!1)}},"~S,~B");c(c$,"execIRMode",function(a){for(var b=JSV.common.Spectrum.IRMode.getMode(a),
c=this.pd().getSpectrum().dataType,e=this.panelNodes.size();0<=--e;)this.panelNodes.get(e).pd().setIRMode(b,c);this.setIRmode(a)},"~S");c(c$,"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(c$,"repaint",function(a){this.selectedPanel.doRepaint(a)},"~B");c(c$,"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(c$,"setYScale",function(a){var b=JSV.common.ScriptToken.getTokens(a),c=0,e=!1;1<b.size()&&b.get(0).equalsIgnoreCase("ALL")&&(e=!0,c++);a=Double.parseDouble(b.get(c++));b=Double.parseDouble(b.get(c));if(e){e=this.pd().getSpectrum();for(c=this.panelNodes.size();0<=--c;){var g=
this.panelNodes.get(c);g.source===this.currentSource&&JSV.common.Spectrum.areXScalesCompatible(e,g.getSpectrum(),!1,!1)&&g.pd().setZoom(0,a,0,b)}}else this.pd().setZoom(0,a,0,b)},"~S");c(c$,"setOverlayLegendVisibility",function(a,b){b&&(this.overlayLegendVisible=null==a?!this.overlayLegendVisible:a===Boolean.TRUE);for(var c=JSV.common.PanelNode.findNode(this.selectedPanel,this.panelNodes),e=this.panelNodes.size();0<=--e;)this.showOverlayLegend(this.panelNodes.get(e),this.panelNodes.get(e)===c&&this.overlayLegendVisible)},
"Boolean,~B");c(c$,"showOverlayLegend",function(a,b){var c=a.legend;null==c&&b&&(c=a.setLegend(1<a.pd().getNumberOfSpectraInCurrentSet()&&1==a.pd().getNumberOfGraphSets()?this.getDialog(JSV.common.Annotation.AType.OverlayLegend,null):null));null!=c&&c.setVisible(b)},"JSV.common.PanelNode,~B");c(c$,"syncScript",function(a){a.equals("TEST")&&(a=JSV.common.JSViewer.testScript);JU.Logger.info("JSViewer.syncScript Jmol>JSV "+a);if(0>a.indexOf("<PeakData"))a.startsWith("JSVSTR:")?this.si.syncToJmol(a):
(this.runScriptNow(a),0<=a.indexOf("#SYNC_PEAKS")&&this.syncPeaksAfterSyncScript());else{JU.Logger.info(">>toJSV>> "+a);var b=JU.PT.getQuotedAttribute(a,"sourceID"),c,e,g,f;if(null==b){e=JU.PT.getQuotedAttribute(a,"file");g=JU.PT.getQuotedAttribute(a,"index");if(null==e||null==g)return;e=JU.PT.rep(e,"#molfile","");c=JU.PT.getQuotedAttribute(a,"model");b=JU.PT.getQuotedAttribute(a,"src");f=null!=b&&b.startsWith("Jmol")?null:this.returnFromJmolModel;if(null!=c&&null!=f&&!c.equals(f)){JU.Logger.info("JSV ignoring model "+
c+"; should be "+f);return}this.returnFromJmolModel=null;if(0==this.panelNodes.size()||!this.checkFileAlreadyLoaded(e))JU.Logger.info("file "+e+" not found -- JSViewer closing all and reopening"),this.si.siSyncLoad(e);a=JU.PT.getQuotedAttribute(a,"type");f=null}else e=null,g=c=b,f=","+JU.PT.getQuotedAttribute(a,"atom")+",",a="ID";g=this.selectPanelByPeak(e,g,f);f=this.pd();f.selectSpectrum(e,a,c,!0);this.si.siSendPanelChange();f.addPeakHighlight(g);this.repaint(!0);(null==b||null!=g&&null!=g.getAtoms())&&
this.si.syncToJmol(this.jmolSelect(g))}},"~S");c(c$,"syncPeaksAfterSyncScript",function(){var a=this.currentSource;if(null!=a)try{var b="file="+JU.PT.esc(a.getFilePath()),c=a.getSpectra().get(0).getPeakList(),e=new JU.SB;e.append("[");for(var g=c.size(),a=0;a<g;a++){var f=c.get(a).toString(),f=f+" "+b;e.append(JU.PT.esc(f));0<a&&e.append(",")}e.append("]");this.si.syncToJmol("Peaks: "+e)}catch(h){if(!y(h,Exception))throw h;}});c(c$,"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(c$,"selectPanelByPeak",function(a,b,c){if(null==this.panelNodes)return null;for(var e=null,g=this.panelNodes.size();0<=--g;)this.panelNodes.get(g).pd().addPeakHighlight(null);e=this.pd().selectPeakByFileIndex(a,b,c);if(null!=e)this.setNode(JSV.common.PanelNode.findNode(this.selectedPanel,
this.panelNodes));else for(g=this.panelNodes.size();0<=--g;){var f=this.panelNodes.get(g);if(null!=(e=f.pd().selectPeakByFileIndex(a,b,c))){this.setNode(f);break}}return e},"~S,~S,~S");c(c$,"processPeakPickEvent",function(a){if(p(a,JSV.common.PeakInfo)){var b=this.pd().findMatchingPeakInfo(a);if(null==b){if(!"ALL".equals(a.getTitle()))return;for(var c=null,e=0;e<this.panelNodes.size();e++)if(null!=(b=this.panelNodes.get(e).pd().findMatchingPeakInfo(a))){c=this.panelNodes.get(e);break}if(null==c)return;
this.setNode(c)}a=b}else this.si.siSetSelectedPanel(a.getSource()),a=a.getPeakInfo();this.pd().addPeakHighlight(a);this.syncToJmol(a);a.isClearAll()?this.repaint(!1):this.pd().selectSpectrum(a.getFilePath(),a.getType(),a.getModel(),!0);this.si.siCheckCallbacks(a.getTitle())},"~O,~B");c(c$,"newStructToJmol",function(a){JU.Logger.info("sending new structure to Jmol:\n"+a);this.si.syncToJmol("struct:"+a)},"~S");c(c$,"syncToJmol",function(a){this.repaint(!0);this.returnFromJmolModel=a.getModel();this.si.syncToJmol(this.jmolSelect(a))},
"JSV.common.PeakInfo");c(c$,"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.syncToJmol(c)});c(c$,"jmolSelect",function(a){var b="IR".equals(a.getType())||"RAMAN".equals(a.getType())?"vibration ON; selectionHalos OFF;":"vibration OFF; selectionhalos "+(null==a.getAtoms()?
"OFF":"ON");return"Select: "+a+' script="'+b+' " sourceID="'+this.pd().getSpectrum().sourceID+'"'},"JSV.common.PeakInfo");c(c$,"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.htCorrelationCache.get(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);var e=this.pd().getInfo(!0,a);if(!c&&null!=e)return e;null!=e&&b.put("current",e);c=new JU.Lst;for(e=0;e<this.panelNodes.size();e++)null!=this.panelNodes.get(e).jsvp&&c.addLast(this.panelNodes.get(e).getInfo(a));b.put("items",c);return b},"~S");c(c$,"getCoordinate",function(){if(!this.isClosed()){var a=this.pd().getClickedCoordinate();if(null!=a)return a.getXVal()+" "+a.getYVal()}return""});c(c$,"fillSpecList",function(a,b,c){var e,g=null,f=a.equalsIgnoreCase("NONE");
if(f||a.equalsIgnoreCase("all"))a="*";if(0>a.indexOf("*")){e=a.$plit(" ");a=new JU.SB;for(var h=0;h<e.length;h++){var k=e[h].indexOf(".");k!=e[h].lastIndexOf(".")&&(e[h]=e[h].substring(0,k+1)+e[h].substring(k+1).$replace(".","_"));a.append(e[h]).append(" ")}a=a.toString().trim()}if(a.equals("*"))e=JSV.common.ScriptToken.getTokens(JSV.common.PanelNode.getSpectrumListAsString(this.panelNodes));else if(a.startsWith('"')||a.startsWith("'"))e=JSV.common.ScriptToken.getTokens(a);else if(a=JU.PT.rep(a,"_",
" _ "),a=JU.PT.rep(a,"-"," - "),e=JSV.common.ScriptToken.getTokens(a),g=JSV.common.ScriptToken.getTokens(JSV.common.PanelNode.getSpectrumListAsString(this.panelNodes)),0==g.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=e.size(),n=null,h=0;h<m;h++){var p=e.get(h),k=NaN,q=-1;h+1<m&&e.get(h+1).equals("*")?(h+=2,k=Double.parseDouble(e.get(h))):h+1<m&&e.get(h+1).equals("_")&&(h+=
2,q=Integer.parseInt(e.get(h)));if(p.equals("-")){null==n&&(n=g.get(0));p=h+1==m?g.get(g.size()-1):e.get(++h);p.contains(".")||(p=l+p);for(k=0;k<g.size()&&!g.get(k).equals(n);)k++;for(k++;k<g.size()&&!n.equals(p);){var s=JSV.common.PanelNode.findNodeById(n=g.get(k++),this.panelNodes);b.addLast(s.pd().getSpectrumAt(0));a.append(",").append(n)}}else if(p.startsWith("'")&&p.endsWith("'")&&(p='"'+JU.PT.trim(p,"'")+'"'),p.startsWith('"'))for(var p=JU.PT.trim(p,'"'),q=this.panelNodes.size(),t=0;t<q;t++){if(s=
this.panelNodes.get(t),null!=s.fileName&&s.fileName.startsWith(p)||null!=s.frameTitle&&s.frameTitle.startsWith(p))this.addSpecToList(s.pd(),k,-1,b,c),a.append(",").append(s.id)}else p.contains(".")||(p=l+p),s=JSV.common.PanelNode.findNodeById(p,this.panelNodes),null!=s&&(n=p,this.addSpecToList(s.pd(),k,q,b,c),a.append(",").append(p),0<q&&a.append(".").appendI(q))}c&&0<b.size()&&(s=JSV.common.PanelNode.findNodeById(a.substring(1),this.panelNodes),null!=s&&(this.setNode(s),b.clear()));return f?"NONE":
0<a.length()?a.toString().substring(1):null},"~S,JU.Lst,~B");c(c$,"addSpecToList",function(a,b,c,e,g){g?(a.getSpectrumAt(0).setUserYFactor(Double.isNaN(b)?1:b),a.addToList(c-1,e)):a.selectFromEntireSet(c-1)},"JSV.common.PanelData,~N,~N,JU.Lst,~B");c(c$,"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(c$,"openDataOrFile",function(a,b,c,e,g,f,h,k){if("NONE".equals(b))return this.close("View*"),
0;this.si.writeStatus("");var l=null,m=null,n=null,p=!1;null!=e&&e.startsWith("cache://")&&(a=Jmol.Cache.get(b=e));if(null!=a)try{n=b,m=l=JSV.common.JSVFileManager.getFullPathName(b)}catch(q){if(!y(q,JSV.exception.JSVException))throw q;}else if(null!=c)p=!0,m=n=l="View"+ ++this.nViews;else if(null!=e)try{this.recentURL=l=(new java.net.URL(JSV.common.JSVFileManager.appletDocumentBase,e,null)).toString(),n=JSV.common.JSVFileManager.getTagName(l)}catch(s){if(y(s,java.net.MalformedURLException))l=this.apiPlatform.newFile(e),
n=l.getName(),m=l=l.getFullPath(),this.recentURL=null;else throw s;}b=-1;if(0<=(b=JSV.common.PanelNode.isOpen(this.panelNodes,l))||0<=(b=JSV.common.PanelNode.isOpen(this.panelNodes,e)))return p?(--this.nViews,this.setNode(this.panelNodes.get(b))):this.si.writeStatus(l+" is already open"),-1;!h&&!p&&this.close("all");this.si.setCursor(3);try{this.si.siSetCurrentSource(p?JSV.source.JDXSource.createView(c):JSV.source.JDXReader.createJDXSource(JSV.common.JSVFileManager.getBufferedReaderForData(a),l,this.obscureTitleFromUser===
Boolean.TRUE,this.loadImaginary,g,f,this.nmrMaxY))}catch(t){if(y(t,Exception))return alert(t.toString()),this.si.setCursor(0),this.isApplet&&this.selectedPanel.showMessage(t.toString(),"Error Opening File"),-3;throw t;}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&&!p&&(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();p||c&&this.currentSource.isCompoundSource?this.combineSpectra(p?e:null):this.splitSpectra();this.pd().taintedAll=!0;p||this.si.siUpdateRecentMenus(l);return 0},"~O,~S,JU.Lst,~S,~N,~N,~B,~S");c(c$,"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 e=
"all"===a;if(null==a||0==b&&a.equalsIgnoreCase("all"))this.closeSource(null);else{var g=a.equalsIgnoreCase("views"),c=new JU.Lst;a=a.$replace("\\","/");var f=this.panelNodes.size(),b=f-b;if(a.endsWith("*"))for(a=a.substring(0,a.length-1);0<=--f;)this.panelNodes.get(f).fileName.startsWith(a)&&c.addLast(this.panelNodes.get(f).source);else if(a.equalsIgnoreCase("selected"))for(a=null;0<=--f;)e=this.panelNodes.get(f).source,this.panelNodes.get(f).isSelected&&(null==a||a!==e)&&c.addLast(e),a=e;else if(e||
g||a.equalsIgnoreCase("simulations"))for(a=0;0<=--f&&a<b;){if(e||(g?this.panelNodes.get(f).isView:this.panelNodes.get(f).isSimulation))c.addLast(this.panelNodes.get(f).source),a++}else e=0==a.length?this.currentSource:JSV.common.PanelNode.findSourceByNameOrId(a,this.panelNodes),null!=e&&c.addLast(e);for(f=c.size();0<=--f;)this.closeSource(c.get(f));null==this.selectedPanel&&0<this.panelNodes.size()&&this.si.siSetSelectedPanel(JSV.common.PanelNode.getLastFileFirstNode(this.panelNodes))}},"~S");c(c$,
"load",function(a,b){var c=JSV.common.ScriptToken.getTokens(a),e=c.get(0),g=null,f=0;e.equalsIgnoreCase("ID")&&(g=JU.PT.trimQuotes(c.get(1)),e=c.get(2),f=2);var h=e.equalsIgnoreCase("APPEND"),k=e.equalsIgnoreCase("CHECK");(h||k)&&f++;0<f&&(e=c.get(f));null==b&&(b=this.defaultLoadScript);e.equals("?")?this.openFileFromDialog(h,!1,!1,b):e.equals("http://?")?this.openFileFromDialog(h,!0,!1,null):e.equals("$?")?this.openFileFromDialog(h,!0,!0,null):(e.equalsIgnoreCase("MOL")&&(e="http://SIMULATION/MOL="+
JU.PT.trimQuotes(c.get(++f))),!k&&!h&&(e.equals('""')&&null!=this.currentSource&&(e=this.currentSource.getFilePath()),this.close("all")),e=JU.PT.trimQuotes(e),e.startsWith("$")&&(e="http://SIMULATION/"+e.substring(1)),k=f+1<c.size()?Integer.$valueOf(c.get(++f)).intValue():-1,c=f+1<c.size()?Integer.$valueOf(c.get(++f)).intValue():k,this.si.siOpenDataOrFile(null,null,null,e,k,c,h,b,g))},"~S,~S");c(c$,"combineSpectra",function(a){var b=this.currentSource,c=b.getSpectra(),c=this.si.siGetNewJSVPanel2(c);
c.setTitle(b.getTitle());c.getTitle().equals("")&&(c.getPanelData().setViewTitle(b.getFilePath()),c.setTitle(a));this.si.siSetPropertiesFromPreferences(c,!0);this.spectraTree.createTree(++this.fileCount,b,[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)},"~S");
c(c$,"closeSource",function(a){for(var b=this.spectraTree.getRootNode(),c=null==a?null:a.getFilePath(),e=new JU.Lst,b=b.children();b.hasMoreElements();){var g=b.nextElement();if(null==c||g.getPanelNode().source.getFilePath().equals(c)){for(var f=g.children();f.hasMoreElements();){var h=f.nextElement();e.addLast(h);this.panelNodes.removeObj(h.getPanelNode())}e.addLast(g);if(null!=c)break}}this.spectraTree.deleteNodes(e);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(e=c=0;e<this.panelNodes.size();e++)b=JU.PT.parseFloat(this.panelNodes.get(e).id),b>=c+1&&(c=q(Math.floor(b)));this.fileCount=c;System.gc();JU.Logger.checkMemory();this.si.siSourceClosed(a)},"JSV.source.JDXSource");c(c$,"setFrameAndTreeNode",function(a){null==this.panelNodes||(0>a||a>=this.panelNodes.size())||this.setNode(this.panelNodes.get(a))},
"~N");c(c$,"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()));this.setOverlayLegendVisibility(null,!1);return a},"JSV.api.JSVPanel");c(c$,"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(c$,"splitSpectra",function(){for(var a=this.currentSource,b=a.getSpectra(),c=Array(b.size()),e=null,g=0;g<b.size();g++)e=b.get(g),e=this.si.siGetNewJSVPanel(e),this.si.siSetPropertiesFromPreferences(e,!0),c[g]=e;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(c$,"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(c$,"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.remove(a)});
c(c$,"runScript",function(a){null==this.scriptQueue?this.si.siProcessCommand(a):this.scriptQueue.addLast(a)},"~S");c(c$,"requestRepaint",function(){null!=this.selectedPanel&&this.repaintManager.refresh()});c(c$,"repaintDone",function(){this.repaintManager.repaintDone()});c(c$,"checkOverlay",function(){null!=this.mainPanel&&this.markSelectedPanels(this.panelNodes,this.mainPanel.getCurrentPanelIndex());this.viewDialog=this.getDialog(JSV.common.Annotation.AType.Views,null)});c(c$,"markSelectedPanels",
function(a,b){for(var c=a.size();0<=--c;)a.get(c).isSelected=b==c},"JU.Lst,~N");c(c$,"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=z(a)}this.recentStackPercent=a;this.parameters.viewOffset=a;this.isClosed()&&this.pd().setYStackOffsetPercent(a)},"~N");c(c$,"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(c$,"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(c$,"setScreenDimension",function(a,b){b=Math.min(b,this.maximumSize);a=Math.min(a,this.maximumSize);this.dimScreen.width==a&&
this.dimScreen.height==b||this.resizeImage(a,b)},"~N,~N");c(c$,"resizeImage",function(a,b){0<a?(this.dimScreen.width=a,this.dimScreen.height=b):(a=0==this.dimScreen.width?this.dimScreen.width=500:this.dimScreen.width,b=0==this.dimScreen.height?this.dimScreen.height=500:this.dimScreen.height);this.g2d.setWindowParameters(a,b)},"~N,~N");c(c$,"updateJS",function(){null!=this.selectedPanel&&this.selectedPanel.paintComponent(this.apiPlatform.getGraphics(null))});c(c$,"processMouseEvent",function(a,b,c,
e,g){return null!=this.selectedPanel&&this.selectedPanel.processMouseEvent(a,b,c,e,g)},"~N,~N,~N,~N,~N");c(c$,"processTwoPointGesture",function(a){this.isClosed()||this.selectedPanel.processTwoPointGesture(a)},"~A");c(c$,"getApplet",function(){return this.html5Applet});c(c$,"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+'"'))},"~S,~N");c(c$,"getHeight",function(){return this.dimScreen.height});c(c$,"getWidth",function(){return this.dimScreen.width});c(c$,"getPlatformInterface",function(a){return JSV.common.JSViewer.getInterface("JSV."+(this.isJS?"js2d.Js":"java.Awt")+a)},"~S");c(c$,"getDialogManager",function(){if(null!=this.dialogManager)return this.dialogManager;this.dialogManager=this.getPlatformInterface("DialogManager");return this.dialogManager.set(this)});c(c$,"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(c$,"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().getFilePath());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 />",this.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(c$,"getDialogPrint",function(a){if(!this.isJS)try{var b=this.getPlatformInterface("PrintDialog").set(this.offWindowFrame,this.lastPrintLayout,a).getPrintLayout();null!=b&&(this.lastPrintLayout=
b);return b}catch(c){if(!y(c,Exception))throw c;}return new JSV.common.PrintLayout},"~B");c(c$,"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(c$,"getOptionFromDialog",function(a,b,c){return this.getDialogManager().getOptionFromDialog(null,a,this.selectedPanel,b,c)},"~A,~S,~S");c(c$,"print",function(a){return this.execWrite('PDF "'+a+'"')},"~S");c(c$,"execWrite",
function(a){this.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(c$,"$export",function(a,b){null==a&&(a="XY");var c=this.pd(),e=c.getNumberOfSpectraInCurrentSet();if(-1>b||b>=e)return"Maximum spectrum index (0-based) is "+(e-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,!1)}catch(g){if(y(g,Exception))return JU.Logger.error(g.toString()),null;throw g;}},"~S,~N");h(c$,"postByteArray",function(a,b){return JSV.common.JSVFileManager.postByteArray(a,b)},"~S,~A");c(c$,"getOutputChannel",function(a,b){for(;a.startsWith("/");)a=a.substring(1);return(new JU.OC).setParams(this,a,!b,null)},"~S,~B");c$.getInterface=c(c$,"getInterface",function(a){try{var b=Z._4Name(a);return null==b?null:b.newInstance()}catch(c){if(y(c,
Exception))return JU.Logger.error("Interface.java Error creating instance for "+a+": \n"+c),null;throw c;}},"~S");c(c$,"showMessage",function(a){null!=this.selectedPanel&&null!=a&&this.selectedPanel.showMessage(a,null)},"~S");c(c$,"openFileFromDialog",function(a,b,c,e){var g=null;c?(g=this.fileHelper.getUrlFromDialog("Enter the name or identifier of a compound",this.recentSimulation),null!=g&&(this.recentSimulation=g,this.load((a?"APPEND ":"")+'"$'+g+'"',e))):b?(g=this.fileHelper.getUrlFromDialog("Enter the URL of a JCAMP-DX File",
null==this.recentURL?this.recentOpenURL:this.recentURL),null!=g&&(this.recentOpenURL=g,this.load((a?"APPEND ":"")+'"'+g+'"',e))):(b=[Boolean.$valueOf(a),e],b=this.fileHelper.showFileOpenDialog(this.mainPanel,b),null!=b&&this.openFile(b.getFullPath(),!a))},"~B,~B,~B,~S");c(c$,"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(c$,"selectPanel",function(a,b){var c=-1;if(null!=b){for(var e=b.size();0<=--e;){var g=b.get(e).jsvp;g===a?c=e:(g.setEnabled(!1),g.setFocusable(!1),g.getPanelData().closeAllDialogsExcept(JSV.common.Annotation.AType.NONE))}this.markSelectedPanels(b,c)}return c},"JSV.api.JSVPanel,JU.Lst");c(c$,"checkAutoIntegrate",function(){this.autoIntegrate&&this.pd().integrateAll(this.parameters)});c(c$,"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),e=c.nextToken();e.equalsIgnoreCase("SET")&&(e=c.nextToken());var e=e.toUpperCase(),g=JSV.common.ScriptToken.getScriptToken(e),b=JSV.common.ScriptToken.getValue(g,c,b);JU.Logger.info("KEY-> "+e+" VALUE-> "+b+" : "+g);try{switch(g){default:this.parameters.set(null,g,b);break;case JSV.common.ScriptToken.UNKNOWN:break;case JSV.common.ScriptToken.APPLETID:this.fullName=
this.appletName+"__"+(this.appletName=b)+"__";e=null;"undefined"!=typeof Jmol&&(e=Jmol._applets[b]);this.html5Applet=e;break;case JSV.common.ScriptToken.AUTOINTEGRATE:this.autoIntegrate=JSV.common.Parameters.isTrue(b);break;case JSV.common.ScriptToken.COMPOUNDMENUON:this.allowCompoundMenu=Boolean.parseBoolean(b);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(g,
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(f){if(!y(f,Exception))throw f;}}},"~S");c(c$,"getSolutionColorStr",function(a){a=JU.CU.colorPtFromInt(this.getSolutionColor(a),null);return z(a.x)+","+z(a.y)+","+z(a.z)},"~B");C(c$,"sourceLabel","Original...","FILE_OPEN_OK",0,"FILE_OPEN_ALREADY",-1,"FILE_OPEN_ERROR",-3,"FILE_OPEN_NO_DATA",-4,"OVERLAY_DIALOG",-1,"OVERLAY_OFFSET",99,"PORTRAIT",1,"PAGE_EXISTS",0,"NO_SUCH_PAGE",1,"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"',
"NLEVEL_MAX",100)});n("JSV.common");w(["JSV.common.Annotation","$.Coordinate"],"JSV.common.Measurement",null,function(){c$=t(function(){this.pt2=null;this.value=0;s(this,arguments)},JSV.common,"Measurement",JSV.common.Annotation);K(c$,function(){this.pt2=new JSV.common.Coordinate});c(c$,"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(c$,"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(c$,"setPt2",function(a,b){this.spec=a;b&&this.setPt2(this.getXVal(),this.getYVal());return this},"JSV.common.Spectrum,~B");c(c$,"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(c$,"getSpectrum",function(){return this.spec});c(c$,"setValue",function(a){this.value=
a;this.text=this.spec.setMeasurementText(this)},"~N");c(c$,"getValue",function(){return this.value});c(c$,"getXVal2",function(){return this.pt2.getXVal()});c(c$,"getYVal2",function(){return this.pt2.getYVal()});h(c$,"addSpecShift",function(a){this.setXVal(this.getXVal()+a);this.pt2.setXVal(this.pt2.getXVal()+a)},"~N");c(c$,"setYVal2",function(a){this.pt2.setYVal(a)},"~N");c(c$,"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");h(c$,"toString",function(){return"["+this.getXVal()+","+this.pt2.getXVal()+"]"})});n("JSV.common");w(["JU.Lst","JSV.api.AnnotationData"],"JSV.common.MeasurementData",["JU.AU","$.DF","JSV.common.Annotation","$.Parameters"],function(){c$=t(function(){this.units=this.spec=this.type=null;this.precision=0;this.myParams=null;this.isON=!0;this.key=null;s(this,arguments)},JSV.common,"MeasurementData",JU.Lst,JSV.api.AnnotationData);u(c$,function(a,b){E(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(c$,"getMeasurements",function(){return this});h(c$,"getAType",function(){return this.type});h(c$,"getState",function(){return this.isON});h(c$,"setState",function(a){this.isON=a},"~B");c(c$,"setMeasurements",function(){},"JU.Lst");h(c$,"getParameters",function(){return this.myParams});c(c$,"getDataHeader",function(){return JSV.common.MeasurementData.HEADER});
c(c$,"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 e=Array(this.size()),g=this.size();0<=--g;)e[g]=[""+(g+1),JU.DF.formatDecimalDbl(b[g][0],c),JU.DF.formatDecimalDbl(b[g][1],c),JU.DF.formatDecimalDbl(b[g][2],a)];return e},"~S");c(c$,"getMeasurementListArrayReal",function(a){a=this.spec.isNMR()&&a.equalsIgnoreCase("HZ");for(var b=JU.AU.newDouble2(this.size()),c=0,e=this.size();0<=
--e;){var g=this.get(e).getValue();a&&(g*=this.spec.observedFreq);b[c++]=[this.get(e).getXVal(),this.get(e).getXVal2(),g]}return b},"~S");c$.checkParameters=c(c$,"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");h(c$,"getSpectrum",function(){return this.spec});
h(c$,"getData",function(){return this});c(c$,"clear",function(a,b){for(var c=this.size();0<=--c;){var e=this.get(c);(0==e.text.length||e.overlaps(a,b))&&this.remove(c)}},"~N,~N");h(c$,"setSpecShift",function(a){for(var b=this.size();0<=--b;){var c=this.get(b),e=c.getXVal()+a;c.setXVal(e);c.setValue(e);c.text=JU.DF.formatDecimalDbl(e,this.precision)}},"~N");h(c$,"getGraphSetKey",function(){return this.key});h(c$,"setGraphSetKey",function(a){this.key=a},"~S");h(c$,"isVisible",function(){return!0});
c(c$,"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");c$.HEADER=c$.prototype.HEADER=["","start","end","value"]});n("JSV.common");w(["java.lang.Enum","javajs.api.EventManager","java.util.Hashtable","JU.Lst"],"JSV.common.PanelData","java.lang.Boolean $.Double javajs.awt.Font JU.CU JSV.api.JSVGraphics JSV.common.Annotation $.Coordinate $.GraphSet $.JSVFileManager $.JSVersion $.JSViewer $.MeasurementData $.Parameters $.PeakPickEvent $.ScriptToken $.Spectrum $.SubSpecChangeEvent $.ZoomEvent JSV.dialog.JSVDialog JU.Logger".split(" "),
function(){c$=t(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.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.mouseState=this.currentFont=null;this.titleOn=this.gridOn=!1;this.mouseY=this.mouseX=0;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.peakTabColor=this.integralPlotColor=this.gridColor=this.coordinatesColor=null;s(this,arguments)},JSV.common,"PanelData",null,javajs.api.EventManager);K(c$,function(){this.listeners=new JU.Lst;this.options=new java.util.Hashtable});u(c$,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(c$,"addListener",function(a){this.listeners.contains(a)||this.listeners.addLast(a)},"JSV.api.PanelListener");c(c$,"getCurrentGraphSet",function(){return this.currentGraphSet});c(c$,"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(c$,"setViewTitle",function(a){this.viewTitle=a},"~S");c(c$,"getViewTitle",function(){return null==this.viewTitle?this.getTitle():this.viewTitle});c(c$,"getInfo",function(a,b){var c=new java.util.Hashtable,e=null;if(a)return this.currentGraphSet.getInfo(b,this.getCurrentSpectrumIndex());for(var g,e=this.options.entrySet().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()));e=new JU.Lst;for(g=this.graphSets.size();0<=--g;)e.addLast(this.graphSets.get(g).getInfo(b,-1));c.put("sets",e);return c},"~B,~S");c(c$,"setBooleans",function(a,b){if(null==b)for(var c,e=a.getBooleans().entrySet().iterator();e.hasNext()&&((c=e.next())||1);)this.setBooleans(a,c.getKey());
else this.setBoolean(b,a.getBoolean(b))},"JSV.common.Parameters,JSV.common.ScriptToken");c(c$,"setBoolean",function(a,b){this.taintedAll=!0;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(c$,"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&&p(a,Boolean)&&a===Boolean.TRUE},"JSV.common.ScriptToken");c(c$,"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(c$,"getDisplay1D",function(){return this.display1D});c(c$,"initOne",function(a){this.spectra=new JU.Lst;this.spectra.addLast(a);this.initMany(this.spectra,
0,0)},"JSV.common.Spectrum");c(c$,"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(c$,"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.title=this.getSpectrum().getTitleLabel()},"JSV.common.PanelData.LinkMode");c(c$,"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(c$,"integrateAll",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).integrate(-1,a)},"JSV.common.ColorParameters");c(c$,"getNumberOfGraphSets",function(){return this.graphSets.size()});
c(c$,"getTitle",function(){return this.title});c(c$,"refresh",function(){this.doReset=!0});c(c$,"addAnnotation",function(a){a=this.currentGraphSet.addAnnotation(a,this.getTitle());null!=a&&(this.title=a)},"JU.Lst");c(c$,"addPeakHighlight",function(a){for(var b=0;b<this.graphSets.size();b++)this.graphSets.get(b).addPeakHighlight(a)},"JSV.common.PeakInfo");c(c$,"selectPeakByFileIndex",function(a,b,c){var e=this.currentGraphSet.selectPeakByFileIndex(a,b,c);if(null==e)for(var g=this.graphSets.size();0<=
--g&&!(this.graphSets.get(g)!==this.currentGraphSet&&null!=(e=this.graphSets.get(g).selectPeakByFileIndex(a,b,c))););return e},"~S,~S,~S");c(c$,"setPlotColors",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).setPlotColors(a)},"~A");c(c$,"selectSpectrum",function(a,b,c,e){e&&this.currentGraphSet.selectSpectrum(a,b,c);if("ID".equals(b))this.jumpToSpectrumIndex(this.getCurrentSpectrumIndex(),!0);else for(e=0;e<this.graphSets.size();e++)this.graphSets.get(e)!==this.currentGraphSet&&
this.graphSets.get(e).selectSpectrum(a,b,c)},"~S,~S,~S,~B");c(c$,"hasFileLoaded",function(a){for(var b=this.graphSets.size();0<=--b;)if(this.graphSets.get(b).hasFileLoaded(a))return!0;return!1},"~S");c(c$,"clearAllView",function(){for(var a=this.graphSets.size();0<=--a;)this.graphSets.get(a).resetViewCompletely()});c(c$,"drawGraph",function(a,b,c,e,g,f){var h;this.gMain=a;this.display1D=!this.isLinked&&this.getBoolean(JSV.common.ScriptToken.DISPLAY1D);var k=40,l=50,m=this.isPrinting||this.doReset||
this.thisWidth!=e||this.thisHeight!=g;m&&(this.taintedAll=!0);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.isPrinting?(k*=3,l*=3,this.scalingFactor=10,h=!1):(this.scalingFactor=1,h=this.getBoolean(JSV.common.ScriptToken.COORDINATESON),this.titleOn=this.getBoolean(JSV.common.ScriptToken.TITLEON),this.gridOn=this.getBoolean(JSV.common.ScriptToken.GRIDON));this.titleDrawn=this.doReset=
!1;this.thisWidth=e;this.thisHeight=g;for(var n=this.graphSets.size();0<=--n;)this.graphSets.get(n).drawGraphSet(a,b,c,e,g,this.left,this.right,k,l,m,this.taintedAll);this.titleOn&&(!this.titleDrawn&&this.taintedAll)&&this.drawTitle(a,g*this.scalingFactor,e*this.scalingFactor,this.getDrawTitle(this.isPrinting));h&&null!=this.coordStr&&this.drawCoordinates(b,k,this.thisWidth-this.right,k-20);f&&this.taintedAll&&(c=null!=this.commonFilePath?this.commonFilePath:1==this.graphSets.size()&&null!=this.currentGraphSet.getTitle(!0)?
this.getSpectrum().getFilePath():null,null!=c&&this.printFilePath(a,this.left,g,c));this.isPrinting&&this.printVersion(a,g);this.taintedAll=this.isPrinting||a===b},"~O,~O,~O,~N,~N,~B");c(c$,"drawCoordinates",function(a,b,c,e){this.g2d.setGraphicsColor(a,this.coordinatesColor);b=this.setFont(a,this.jsvp.getWidth(),0,12,!0);this.g2d.drawString(a,this.coordStr,c-b.stringWidth(this.coordStr),e)},"~O,~N,~N,~N");c(c$,"setFont",function(a,b,c,e,g){return this.g2d.setFont(a,this.getFont(a,b,c,e,g))},"~O,~N,~N,~N,~B");
c(c$,"printFilePath",function(a,b,c,e){b*=this.scalingFactor;c*=this.scalingFactor;0<e.indexOf("?")&&(e=e.substring(e.indexOf("?")+1));e=e.substring(e.lastIndexOf("/")+1);e=e.substring(e.lastIndexOf("\\")+1);this.g2d.setGraphicsColor(a,this.BLACK);var g=this.setFont(a,1E3,0,9,!0);b!=this.left*this.scalingFactor&&(b-=g.stringWidth(e));this.g2d.drawString(a,e,b,c-g.getHeight())},"~O,~N,~N,~S");c(c$,"printVersion",function(a,b){this.g2d.setGraphicsColor(a,this.BLACK);var c=this.setFont(a,100,0,12,!0),
e=this.jsvp.getApiPlatform().getDateFormat(null)+" JSpecView "+JSV.common.JSVersion.VERSION_SHORT,g=c.stringWidth(e);this.g2d.drawString(a,e,(this.thisWidth-this.right)*this.scalingFactor-g,b*this.scalingFactor-3*c.getHeight())},"~O,~N");c(c$,"drawTitle",function(a,b,c,e){e=e.$replace("\n"," ");var g=this.getFont(a,c,this.isPrinting||this.getBoolean(JSV.common.ScriptToken.TITLEBOLDON)?1:0,14,!0),f=g.stringWidth(e);f>c&&(g=q(14*c/f),10>g&&(g=10),g=this.getFont(a,c,this.isPrinting||this.getBoolean(JSV.common.ScriptToken.TITLEBOLDON)?
1:0,g,!0));this.g2d.setGraphicsColor(a,this.titleColor);this.setCurrentFont(this.g2d.setFont(a,g));this.g2d.drawString(a,e,this.isPrinting?this.left*this.scalingFactor:5,b-q(g.getHeight()*(this.isPrinting?2:0.5)))},"~O,~N,~N,~S");c(c$,"setCurrentFont",function(a){this.currentFont=a},"javajs.awt.Font");c(c$,"getFontHeight",function(){return this.currentFont.getAscent()});c(c$,"getStringWidth",function(a){return this.currentFont.stringWidth(a)},"~S");c(c$,"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 e=this.graphSets.get(b).spectra,g=0;g<e.size();g++,c++)(0>a||a==c)&&this.graphSets.get(b).setSelected(g)},"~N");c(c$,"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(c$,"scaleSelectedBy",function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).scaleSelectedBy(a)},"~N");c(c$,"setCurrentGraphSet",function(a,
b,c){b=1<a.nSplit?a.getSplitPoint(b):a.getCurrentSpectrumIndex();var e=this.currentGraphSet!==a,g=e||this.currentSplitPoint!=b;this.currentGraphSet=a;this.currentSplitPoint=b;(e||1<a.nSplit&&g)&&this.setSpectrum(b,!0);if(!e){e=a.checkSpectrumClickedEvent(this.mouseX,this.mouseY,c);if(!e)return;this.currentSplitPoint=b=a.getCurrentSpectrumIndex();this.setSpectrum(b,!0)}this.jumpToSpectrumIndex(b,e||1<a.nSplit&&g)},"JSV.common.GraphSet,~N,~N");c(c$,"jumpToSpectrum",function(a){a=this.currentGraphSet.getSpectrumIndex(a);
this.jumpToSpectrumIndex(a,!0)},"JSV.common.Spectrum");c(c$,"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(c$,"splitStack",function(a){this.currentGraphSet.splitStack(this.graphSets,a)},"~B");c(c$,"getNumberOfSpectraInCurrentSet",function(){return this.currentGraphSet.nSpectra});c(c$,
"getSourceID",function(){return this.getSpectrumAt(0).sourceID});c(c$,"getStartingPointIndex",function(a){return this.currentGraphSet.viewData.getStartingPointIndex(a)},"~N");c(c$,"getEndingPointIndex",function(a){return this.currentGraphSet.viewData.getEndingPointIndex(a)},"~N");c(c$,"haveSelectedSpectrum",function(){return this.currentGraphSet.haveSelectedSpectrum()});c(c$,"getShowAnnotation",function(a){return this.currentGraphSet.getShowAnnotation(a,-1)},"JSV.common.Annotation.AType");c(c$,"showAnnotation",
function(a,b){this.currentGraphSet.setShowAnnotation(a,b)},"JSV.common.Annotation.AType,Boolean");c(c$,"setYStackOffsetPercent",function(a){this.currentGraphSet.yStackOffsetPercent=a},"~N");c(c$,"setSpectrum",function(a,b){this.currentGraphSet.setSpectrum(a,b)},"~N,~B");c(c$,"getSpectrum",function(){return this.currentGraphSet.getSpectrum()});c(c$,"setSpecForIRMode",function(a){this.taintedAll=!0;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(c$,"isShowAllStacked",function(){return this.currentGraphSet.showAllStacked});c(c$,"getCurrentSpectrumIndex",function(){return this.currentGraphSet.getCurrentSpectrumIndex()});c(c$,"getSpectrumAt",function(a){return null==this.currentGraphSet?null:this.currentGraphSet.getSpectrumAt(a)},"~N");c(c$,"addHighlight",function(a,b,c,e,g,f,h,k){(null==a?this.currentGraphSet:a).addHighlight(b,c,e,this.g2d.getColor4(g,f,h,k))},"JSV.common.GraphSet,~N,~N,JSV.common.Spectrum,~N,~N,~N,~N");
c(c$,"removeHighlight",function(a,b){this.currentGraphSet.removeHighlight(a,b)},"~N,~N");c(c$,"removeAllHighlights",function(){this.currentGraphSet.removeAllHighlights()});c(c$,"setZoom",function(a,b,c,e){this.currentGraphSet.setZoom(a,b,c,e);this.taintedAll=this.doReset=!0;this.notifyListeners(new JSV.common.ZoomEvent)},"~N,~N,~N,~N");c(c$,"resetView",function(){this.currentGraphSet.resetView()});c(c$,"previousView",function(){this.currentGraphSet.previousView()});c(c$,"nextView",function(){this.currentGraphSet.nextView()});
c(c$,"getSelectedIntegral",function(){return this.currentGraphSet.getSelectedIntegral()});c(c$,"advanceSubSpectrum",function(a){this.currentGraphSet.advanceSubSpectrum(a)},"~N");c(c$,"setSelectedIntegral",function(a){this.currentGraphSet.setSelectedIntegral(a)},"~N");c(c$,"scaleYBy",function(a){this.currentGraphSet.scaleYBy(a)},"~N");c(c$,"toPeak",function(a){this.currentGraphSet.toPeak(a)},"~N");c(c$,"getClickedCoordinate",function(){return this.coordClicked});c(c$,"getPickedCoordinates",function(a,
b){return JSV.common.Coordinate.getPickedCoordinates(this.coordsClicked,this.coordClicked,a,b)},"JSV.common.Coordinate,JSV.common.Coordinate");c(c$,"shiftSpectrum",function(a,b){return this.currentGraphSet.shiftSpectrum(a,b)},"~N,~N");c(c$,"findX",function(a,b){this.currentGraphSet.setXPointer(a,b)},"JSV.common.Spectrum,~N");c(c$,"setXPointers",function(a,b,c,e){this.currentGraphSet.setXPointer(a,b);this.currentGraphSet.setXPointer2(c,e)},"JSV.common.Spectrum,~N,JSV.common.Spectrum,~N");c(c$,"isCurrentGraphSet",
function(a){return a===this.currentGraphSet},"JSV.common.GraphSet");c(c$,"repaint",function(){this.jsvp.doRepaint(!1)});c(c$,"setToolTipText",function(a){this.jsvp.setToolTipText(a)},"~S");c(c$,"setHighlightColor",function(a){this.setColor(JSV.common.ScriptToken.HIGHLIGHTCOLOR,a)},"javajs.api.GenericColor");c(c$,"getInput",function(a,b,c){return this.jsvp.getInput(a,b,c)},"~S,~S,~S");c(c$,"getFont",function(a,b,c,e,g){e*=this.scalingFactor;g?400>b&&(e=b*e/400):250>b&&(e=b*e/250);b=this.jsvp.getFontFaceID(this.isPrinting?
this.printingFontName:this.displayFontName);return this.currentFont=javajs.awt.Font.createFont3D(b,c,e,e,this.jsvp.getApiPlatform(),a)},"~O,~N,~N,~N,~B");c(c$,"notifySubSpectrumChange",function(a,b){this.notifyListeners(new JSV.common.SubSpecChangeEvent(a,null==b?null:b.getTitleLabel()))},"~N,JSV.common.Spectrum");c(c$,"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(c$,"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(c$,"escapeKeyPressed",function(a){this.currentGraphSet.escapeKeyPressed(a)},"~B");c(c$,"hasFocus",function(){return this.jsvp.hasFocus()});c(c$,"isMouseUp",function(){return this.mouseState===JSV.common.PanelData.Mouse.UP});c(c$,"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&&c.mouseMovedEvent(a,b)},"~N,~N");c(c$,"doMousePressed",function(a,b){this.mouseState=JSV.common.PanelData.Mouse.DOWN;var c=JSV.common.GraphSet.findGraphSet(this.graphSets,a,b);null!=c&&(this.setCurrentGraphSet(c,b,0),this.clickCount=++this.clickCount%3,c.checkWidgetEvent(a,b,!0))},"~N,~N");c(c$,"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.currentGraphSet.mouseMovedEvent(a,b))},"~N,~N");c(c$,"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(c$,"doMouseClicked",function(a,b,c){var e=JSV.common.GraphSet.findGraphSet(this.graphSets,a,b);null!=e&&(this.setCurrentGraphSet(e,b,this.clickCount),e.mouseClickedEvent(a,b,this.clickCount,c),this.repaint())},"~N,~N,~B");c(c$,"hasCurrentMeasurements",function(a){return this.currentGraphSet.hasCurrentMeasurement(a)},"JSV.common.Annotation.AType");c(c$,"getDialog",function(a){return this.currentGraphSet.getDialog(a,-1)},"JSV.common.Annotation.AType");c(c$,"addDialog",function(a,b,c){this.currentGraphSet.addDialog(a,
b,c)},"~N,JSV.common.Annotation.AType,JSV.api.AnnotationData");c(c$,"getPeakListing",function(a,b){null!=a&&this.currentGraphSet.getPeakListing(-1,a,!0);this.currentGraphSet.setPeakListing(b)},"JSV.common.Parameters,Boolean");c(c$,"checkIntegral",function(a,b){this.currentGraphSet.checkIntegral(a,b)},"JSV.common.Parameters,~S");c(c$,"setIntegrationRatios",function(a){this.currentGraphSet.setIntegrationRatios(a)},"~S");c(c$,"getView",function(){return this.currentGraphSet.getCurrentView()});c(c$,"closeAllDialogsExcept",
function(a){for(var b=this.graphSets.size();0<=--b;)this.graphSets.get(b).closeDialogsExcept(a)},"JSV.common.Annotation.AType");c(c$,"removeDialog",function(a){this.currentGraphSet.removeDialog(a)},"JSV.dialog.JSVDialog");c(c$,"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(!y(c,Exception))throw c;
}}});c(c$,"getDrawTitle",function(a){var b=null;a?b=this.printJobTitle:1==this.nSpectra?b=this.getSpectrum().getPeakTitle():null!=this.viewTitle?(null!=this.currentGraphSet.getTitle(!1)&&(b=this.getSpectrum().getPeakTitle()),null==b&&(b=this.viewTitle)):b=this.jsvp.getTitle().trim();0<=b.indexOf("\n")&&(b=b.substring(0,b.indexOf("\n")).trim());return b},"~B");c(c$,"getPrintJobTitle",function(a){var b=null;1==this.nSpectra?b=this.getSpectrum().getTitle():null!=this.viewTitle?(1==this.graphSets.size()&&
(b=this.currentGraphSet.getTitle(a)),null==b&&(b=this.viewTitle)):b=this.jsvp.getTitle().trim();0<=b.indexOf("\n")?b=b.substring(0,b.indexOf("\n")).trim():b.startsWith("$")&&(b=b.substring(1));return b},"~B");c(c$,"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(c$,"doZoomLinked",function(a,b,c,e,g,f){if(!this.linking){this.linking=!0;for(var h=a.getSpectrumAt(0),k=this.graphSets.size();0<=--k;){var l=this.graphSets.get(k);l!==a&&JSV.common.Spectrum.areXScalesCompatible(h,this.graphSets.get(k).getSpectrumAt(0),!1,!0)&&l.doZoom(b,0,c,0,f,!1,g,!1,e)}this.linking=!1}},"JSV.common.GraphSet,~N,~N,~B,~B,~B");c(c$,"clearLinkViews",function(a){if(!this.linking){this.linking=!0;for(var b=a.getSpectrum(),c=this.graphSets.size();0<=
--c;){var e=this.graphSets.get(c);e!==a&&JSV.common.Spectrum.areXScalesCompatible(b,this.graphSets.get(c).getSpectrum(),!1,!0)&&e.clearViews()}this.linking=!1}},"JSV.common.GraphSet");c(c$,"setlinkedXMove",function(a,b,c){if(!this.linking){this.linking=!0;for(var e=a.getSpectrum(),g=this.graphSets.size();0<=--g;){var f=this.graphSets.get(g);f!==a&&JSV.common.Spectrum.areXScalesCompatible(e,this.graphSets.get(g).getSpectrum(),!1,!0)&&null==f.imageView&&(c?f.setXPixelMovedTo(1.7976931348623157E308,
b,0,0):f.setXPixelMovedTo(b,1.7976931348623157E308,0,0))}this.linking=!1}},"JSV.common.GraphSet,~N,~B");c(c$,"set2DCrossHairsLinked",function(a,b,c,e){for(var g=this.graphSets.size();0<=--g;){var f=this.graphSets.get(g);f!==a&&f.set2DXY(b,c,e)}},"JSV.common.GraphSet,~N,~N,~B");c(c$,"dialogsToFront",function(a){this.currentGraphSet.dialogsToFront(a)},"JSV.common.Spectrum");c(c$,"setColor",function(a,b){null!=b&&this.options.put(a,JU.CU.toRGBHexString(b));switch(a){case JSV.common.ScriptToken.BACKGROUNDCOLOR:this.jsvp.setBackgroundColor(this.bgcolor=
b);this.taintedAll=!0;break;case JSV.common.ScriptToken.COORDINATESCOLOR:this.coordinatesColor=b;break;case JSV.common.ScriptToken.GRIDCOLOR:this.gridColor=b;this.taintedAll=!0;break;case JSV.common.ScriptToken.HIGHLIGHTCOLOR:this.highlightColor=b;255==this.highlightColor.getOpacity255()&&this.highlightColor.setOpacity255(150);break;case JSV.common.ScriptToken.INTEGRALPLOTCOLOR:this.integralPlotColor=b;this.taintedAll=!0;break;case JSV.common.ScriptToken.PEAKTABCOLOR:this.peakTabColor=b;this.taintedAll=
!0;break;case JSV.common.ScriptToken.PLOTCOLOR:for(var c=this.graphSets.size();0<=--c;)this.graphSets.get(c).setPlotColor0(b);this.taintedAll=!0;break;case JSV.common.ScriptToken.PLOTAREACOLOR:this.plotAreaColor=b;this.taintedAll=!0;break;case JSV.common.ScriptToken.SCALECOLOR:this.scaleColor=b;this.taintedAll=!0;break;case JSV.common.ScriptToken.TITLECOLOR:this.titleColor=b;this.taintedAll=!0;break;case JSV.common.ScriptToken.UNITSCOLOR:this.unitsColor=b;this.taintedAll=!0;break;case JSV.common.ScriptToken.ZOOMBOXCOLOR:this.zoomBoxColor=
b;break;case JSV.common.ScriptToken.ZOOMBOXCOLOR2:this.zoomBoxColor2=b;break;default:JU.Logger.warn("AwtPanel --- unrecognized color: "+a)}},"JSV.common.ScriptToken,javajs.api.GenericColor");c(c$,"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.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(c$,"getOverlayLegendData",
function(){for(var a=this.currentGraphSet.nSpectra,b=Array(a),c=this.getSpectrumAt(0).getFilePath(),e=this.getSpectrumAt(a-1).getFilePath(),c=!c.equals(e),e=0;e<a;e++){var g=Array(3),f=this.getSpectrumAt(e);this.title=f.getTitle();c&&(this.title=JSV.common.JSVFileManager.getTagName(f.getFilePath())+" - "+this.title);f=this.getCurrentPlotColor(e);g[0]=new Integer(e+1);g[1]=f;g[2]=" "+this.title;b[e]=g}return b});c(c$,"setColorOrFont",function(a,b){if(null==b){for(var c,e=a.elementColors.entrySet().iterator();e.hasNext()&&
((c=e.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(c$,"getCurrentPlotColor",function(a){return this.currentGraphSet.getPlotColor(a)},
"~N");c(c$,"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.showTitle,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(c$,"showDialog",function(a){var b=this.getDialog(a);this.closeAllDialogsExcept(a);if(null!=b&&p(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 e=this.getSpectrum(),g=this.vwr.getDialog(a,e);null==b&&a===JSV.common.Annotation.AType.Measurements&&(b=new JSV.common.MeasurementData(JSV.common.Annotation.AType.Measurements,
e));null!=b&&g.setData(b);this.addDialog(c,a,g);g.reEnable();return g},"JSV.common.Annotation.AType");c(c$,"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)},"JSV.api.JSVGraphics,JSV.common.PrintLayout");c(c$,"print",function(a,b,c,e,g,f,h,k,l){this.g2d=this.g2d0;if(0==l)return this.isPrinting=!0,l=!1,p(a,JSV.api.JSVGraphics)&&(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")?l=!0:k?(b=450,c=280,e=q(q(h-c)/2),g=q(q(f-b)/2)):(b=280,c=450,g=q(q(h-280)/2),e=q(q(f-450)/2)),this.g2d.translateScale(a,e,g,0.1),this.taintedAll=!0,this.drawGraph(a,a,a,q(c),q(b),l),this.isPrinting=!1,0;this.isPrinting=!1;return 1},"~O,~N,~N,~N,~N,~N,~N,~B,~N");h(c$,"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.repaint(),!0}var c=0,e=!1;if(0==b)switch(a){case 37:case 39:this.doMouseMoved(39==a?++this.mouseX:--this.mouseX,this.mouseY);this.repaint();e=!0;break;case 33:case 34:c=33==a?JSV.common.GraphSet.RT2:1/JSV.common.GraphSet.RT2;e=!0;break;case 40:case 38:e=40==a?-1:1,null==this.getSpectrumAt(0).getSubSpectra()?this.notifySubSpectrumChange(e,null):(this.advanceSubSpectrum(e),this.repaint()),e=!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;e=!0;break;case 37:case 39:this.toPeak(39==a?1:-1),e=!0}0!=c&&(this.scaleYBy(c),this.repaint());return e},"~N,~N");h(c$,"keyReleased",function(a){this.isPrinting||this.checkKeyControl(a,!1)},"~N");h(c$,"keyTyped",function(a,b){if(this.isPrinting)return!1;switch(a){case "n":if(0!=b)break;this.normalizeIntegral();return!0;case 26:if(2!=b)break;this.previousView();this.repaint();return!0;case 25:if(2!=b)break;this.nextView();this.repaint();return!0}return!1},
"~N,~N");h(c$,"mouseAction",function(a,b,c,e,g,f){if(!this.isPrinting)switch(a){case 4:if(!this.checkMod(f,16))break;this.doMousePressed(c,e);break;case 5:this.doMouseReleased(c,e,this.checkMod(f,16));this.repaint();break;case 1:this.doMouseDragged(c,e);this.repaint();break;case 0:this.jsvp.getFocusNow(!1);if(0!=(f&28)){this.doMouseDragged(c,e);this.repaint();break}this.doMouseMoved(c,e);null!=this.coordStr&&this.repaint();break;case 2:if(this.checkMod(f,4)){this.jsvp.showMenu(c,e);break}this.ctrlPressed=
!1;this.doMouseClicked(c,e,this.updateControlPressed(f))}},"~N,~N,~N,~N,~N,~N");c(c$,"checkMod",function(a,b){return(a&b)==b},"~N,~N");c(c$,"checkKeyControl",function(a,b){switch(a){case 17:case 157:this.ctrlPressed=b;break;case 16:this.shiftPressed=b}},"~N,~B");c(c$,"updateControlPressed",function(a){return this.ctrlPressed=(new Boolean(this.ctrlPressed|(this.checkMod(a,2)||this.checkMod(a,20)))).valueOf()},"~N");h(c$,"mouseEnterExit",function(a,b,c,e){if(e)this.thisWidget=null,this.isIntegralDrag=
!1,this.integralShiftMode=0;else try{this.jsvp.getFocusNow(!1)}catch(g){if(y(g,Exception))System.out.println("pd "+this+" cannot focus");else throw g;}},"~N,~N,~N,~B");c(c$,"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 e=this.graphSets.size();0<=--e;)this.graphSets.get(e).setSolutionColor(a,
b,c)}},"~S");c(c$,"setIRMode",function(a,b){for(var c=this.graphSets.size();0<=--c;)this.graphSets.get(c).setIRMode(a,b)},"JSV.common.Spectrum.IRMode,~S");G(self.c$);c$=B(JSV.common.PanelData,"LinkMode",Enum);c$.getMode=c(c$,"getMode",function(a){if(a.equals("*"))return JSV.common.PanelData.LinkMode.ALL;for(var b,c=0,e=JSV.common.PanelData.LinkMode.values();c<e.length&&((b=e[c])||1);c++)if(b.name().equalsIgnoreCase(a))return b;return JSV.common.PanelData.LinkMode.NONE},"~S");v(c$,"ALL",0,[]);v(c$,
"NONE",1,[]);v(c$,"AB",2,[]);v(c$,"ABC",3,[]);c$=F();G(self.c$);c$=B(JSV.common.PanelData,"Mouse",Enum);v(c$,"UP",0,[]);v(c$,"DOWN",1,[]);c$=F();C(c$,"defaultPrintHeight",450,"defaultPrintWidth",280,"topMargin",40,"bottomMargin",50,"leftMargin",60,"rightMargin",50)});n("JSV.common");w(null,"JSV.common.PanelNode",["JU.SB","JSV.common.Parameters"],function(){c$=t(function(){this.legend=this.id=this.jsvp=this.fileName=this.source=this.treeNode=null;this.isSimulation=this.isView=this.isSelected=!1;this.frameTitle=
null;s(this,arguments)},JSV.common,"PanelNode");u(c$,function(a,b,c,e){this.id=a;this.source=c;this.fileName=b;this.isSimulation=0<=c.getFilePath().indexOf("http://SIMULATION/");this.jsvp=e;null!=e&&(this.pd().getSpectrumAt(0).setId(a),this.frameTitle=e.getTitle())},"~S,~S,JSV.source.JDXSource,JSV.api.JSVPanel");c(c$,"setTreeNode",function(a){this.treeNode=a},"JSV.api.JSVTreeNode");c(c$,"getTreeNode",function(){return this.treeNode});c(c$,"dispose",function(){this.source.dispose();null!=this.jsvp&&
this.jsvp.dispose();this.legend=this.jsvp=this.source=null});c(c$,"pd",function(){return this.jsvp.getPanelData()});c(c$,"getSpectrum",function(){return this.pd().getSpectrum()});c(c$,"setLegend",function(a){null!=this.legend&&this.legend.dispose();return this.legend=a},"JSV.dialog.JSVDialog");h(c$,"toString",function(){return(null==this.id?"":this.id+": ")+(null==this.frameTitle?this.fileName:this.frameTitle)});c$.findSourceByNameOrId=c(c$,"findSourceByNameOrId",function(a,b){for(var c=b.size();0<=
--c;){var e=b.get(c);if(a.equals(e.id)||a.equalsIgnoreCase(e.source.getFilePath()))return e.source}for(c=b.size();0<=--c;)if(e=b.get(c),a.equals(e.fileName))return e.source;return null},"~S,JU.Lst");c$.findNodeById=c(c$,"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");c$.findNode=c(c$,"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");c$.getSpectrumListAsString=c(c$,"getSpectrumListAsString",function(a){for(var b=new JU.SB,c=0;c<a.size();c++){var e=a.get(c);e.isView||b.append(" ").append(e.id)}return b.toString().trim()},"JU.Lst");c$.isOpen=c(c$,"isOpen",function(a,b){if(null!=b)for(var c=a.size();0<=--c&&!b.equals(a.get(c).source.getFilePath())&&!b.equals(a.get(c).frameTitle););return-1},"JU.Lst,~S");c(c$,"setFrameTitle",function(a){this.frameTitle=a},"~S");c$.getLastFileFirstNode=c(c$,"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(c$,"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")});n("JSV.common");w(null,"JSV.common.Parameters",["java.lang.Boolean","java.util.Hashtable",
"JSV.common.ScriptToken"],function(){c$=t(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;s(this,arguments)},JSV.common,"Parameters");u(c$,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.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(c$,"setName",function(a){this.name=a;return this},"~S");c(c$,"getBooleans",function(){return this.htBooleans});c(c$,"setBoolean",function(a,b){this.htBooleans.put(a,Boolean.$valueOf(b));
return b},"JSV.common.ScriptToken,~B");c(c$,"getBoolean",function(a){return Boolean.TRUE===this.htBooleans.get(a)},"JSV.common.ScriptToken");c$.isTrue=c(c$,"isTrue",function(a){return 0==a.length||Boolean.parseBoolean(a)},"~S");c$.getTFToggle=c(c$,"getTFToggle",function(a){return a.equalsIgnoreCase("TOGGLE")?null:JSV.common.Parameters.isTrue(a)?Boolean.TRUE:Boolean.FALSE},"~S");c(c$,"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.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");
c$.isMatch=c(c$,"isMatch",function(a,b){return null==a||b.equalsIgnoreCase(a)},"~S,~S");c$.putInfo=c(c$,"putInfo",function(a,b,c,e){null!=e&&JSV.common.Parameters.isMatch(a,c)&&b.put(null==a?c:a,e)},"~S,java.util.Map,~S,~O")});n("JSV.common");w(["JSV.common.MeasurementData"],"JSV.common.PeakData",["java.lang.Double","JU.DF","JSV.common.Coordinate","$.PeakPick"],function(){c$=t(function(){this.maxY=this.minY=this.thresh=0;s(this,arguments)},JSV.common,"PeakData",JSV.common.MeasurementData);c(c$,"getThresh",
function(){return this.thresh});h(c$,"getDataHeader",function(){return this.spec.isHNMR()?JSV.common.PeakData.HNMR_HEADER:["peak",this.spec.getXUnits(),this.spec.getYUnits()]});h(c$,"getMeasurementListArray",function(){for(var a=Array(this.size()),b=[-1E100,1E100,1E100],c,e=0,g=this.size();0<=--g;e++)c=this.spec.getPeakListArray(this.get(g),b,this.maxY),a[e]=2==c.length?[""+(e+1),JU.DF.formatDecimalDbl(c[0],2),JU.DF.formatDecimalDbl(c[1],4)]:[""+(e+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");h(c$,"getMeasurementListArrayReal",function(){for(var a=X(this.size(),0),b=[-1E100,1E100,1E100],c=0,e=this.size();0<=--e;c++)a[c]=this.spec.getPeakListArray(this.get(e),b,this.maxY);return a},"~S");c(c$,"getInfo",function(a){a.put("interpolation",this.myParams.peakListInterpolation);a.put("threshold",Double.$valueOf(this.myParams.peakListThreshold));
R(this,JSV.common.PeakData,"getInfo",[a])},"java.util.Map");c(c$,"setPeakList",function(a,b,c){this.precision=-2147483648==b?this.spec.getDefaultUnitPrecision():b;var e=this.spec.getXYCoords();if(!(3>e.length)){this.clear();null!=a&&(this.myParams.peakListInterpolation=a.peakListInterpolation,this.myParams.peakListThreshold=a.peakListThreshold);a=this.myParams.peakListInterpolation.equals("parabolic");var g=this.spec.isInverted();this.minY=c.minYOnScale;this.maxY=c.maxYOnScale;var f=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 h=0,k=[e[0].getYVal(),h=e[1].getYVal(),0],l=0;if(g)for(g=2;g<e.length;g++){var m=k[g%3]=e[g].getYVal();if(h<this.thresh&&(k[(g-2)%3]>h&&h<m)&&(h=a?JSV.common.Coordinate.parabolicInterpolation(e,g-1):e[g-1].getXVal(),h>=f||h<=c))if(h=(new JSV.common.PeakPick).setValue(h,m,this.spec,null,0),this.addLast(h),100==++l)break;h=m}else for(g=2;g<
e.length;g++){m=k[g%3]=e[g].getYVal();if(h>this.thresh&&(k[(g-2)%3]<h&&h>m)&&(h=a?JSV.common.Coordinate.parabolicInterpolation(e,g-1):e[g-1].getXVal(),h>=f&&h<=c&&(h=(new JSV.common.PeakPick).setValue(h,m,this.spec,JU.DF.formatDecimalDbl(h,b),h),this.addLast(h),100==++l)))break;h=m}}},"JSV.common.Parameters,~N,JSV.common.ScaleData");c$.HNMR_HEADER=c$.prototype.HNMR_HEADER="peak shift/ppm intens shift/hz diff/hz 2-diff 3-diff".split(" ")});n("JSV.common");w(null,"JSV.common.PeakInfo",["JU.PT"],function(){c$=
t(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;s(this,arguments)},JSV.common,"PeakInfo");u(c$,function(){});u(c$,function(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("pi 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(c$,"isClearAll",function(){return null==this.spectrum});c(c$,"getType",function(){return this.type});c(c$,"getAtoms",
function(){return this.atoms});c(c$,"getXMax",function(){return this.xMax});c(c$,"getXMin",function(){return this.xMin});c(c$,"getYMin",function(){return this.yMin});c(c$,"getYMax",function(){return this.yMax});c(c$,"getX",function(){return(this.xMax+this.xMin)/2});c(c$,"getMatch",function(){return this._match});c$.fixType=c(c$,"fixType",function(a){return a.equals("HNMR")?"1HNMR":a.equals("CNMR")?"13CNMR":a},"~S");h(c$,"toString",function(){return this.stringInfo});c(c$,"getIndex",function(){return this.index});
c(c$,"getTitle",function(){return this.title});c(c$,"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(c$,"checkFileTypeModel",function(a,b,c){return a.equals(this.file)&&this.checkModel(c)&&this.type.endsWith(b)},"~S,~S,~S");c(c$,"checkTypeModel",function(a,b){return this.checkType(a)&&this.checkModel(b)},"~S,~S");c(c$,"checkModel",function(a){return null!=a&&a.equals(this.model)},
"~S");c(c$,"checkType",function(a){return a.endsWith(this.type)},"~S");c(c$,"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(c$,"checkId",function(a){return null!=this.id&&null!=a&&a.toUpperCase().startsWith("ID=")&&((a=a.substring(3)).equals(this.id)||a.startsWith("#")&&a.equals("#"+this.index))},"~S");c(c$,"getModel",function(){return this.model});c(c$,"getFilePath",
function(){return this.file});c(c$,"autoSelectOnLoad",function(){return this.type.startsWith("GC")});c(c$,"setPixelRange",function(a,b){this.px0=a;this.px1=b},"~N,~N");c(c$,"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(c$,"getXPixel",function(){return q((this.px0+this.px1)/2)});c$.nullPeakInfo=c$.prototype.nullPeakInfo=new JSV.common.PeakInfo});n("JSV.common");w(["JSV.common.Measurement"],"JSV.common.PeakPick",
null,function(){c$=B(JSV.common,"PeakPick",JSV.common.Measurement);c(c$,"setValue",function(a,b,c,e,g){null==e?(this.set(a,b),this.setPt2(c,!1)):(this.setA(a,b,c,e,!1,!1,0,6),this.value=g,this.setPt2(this.getXVal(),this.getYVal()));return this},"~N,~N,JSV.common.Spectrum,~S,~N")});n("JSV.common");w(["java.util.EventObject"],"JSV.common.PeakPickEvent",null,function(){c$=t(function(){this.peakInfo=this.coord=null;s(this,arguments)},JSV.common,"PeakPickEvent",java.util.EventObject);u(c$,function(a,b,
c){E(this,JSV.common.PeakPickEvent,[a]);this.coord=b;this.peakInfo=null==c?null:c},"~O,JSV.common.Coordinate,JSV.common.PeakInfo");c(c$,"getCoord",function(){return this.coord});c(c$,"getPeakInfo",function(){return this.peakInfo});h(c$,"toString",function(){return null==this.peakInfo?null:this.peakInfo.toString()})});n("JSV.common");w(["JSV.common.Coordinate","$.ScriptToken"],"JSV.common.PlotWidget",null,function(){c$=t(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;s(this,arguments)},JSV.common,"PlotWidget",JSV.common.Coordinate);K(c$,function(){this.color=JSV.common.ScriptToken.PLOTCOLOR});h(c$,"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)});u(c$,function(a){E(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");c(c$,"selected",function(a,b){return this.isVisible&&5>Math.abs(a-this.xPixel0)&&5>Math.abs(b-this.yPixel0)},"~N,~N");c(c$,"setX",function(a,b){this.setXVal(a);this.xPixel0=this.xPixel1=b},"~N,~N");c(c$,"setY",function(a,b){this.setYVal(a);this.yPixel0=this.yPixel1=b},"~N,~N");c(c$,"getValue",function(){return this.isXtype?
this.getXVal():this.getYVal()});c(c$,"setEnabled",function(a){this.isEnabled=a},"~B")});n("JSV.common");c$=t(function(){this.imageableWidth=this.imageableHeight=this.paperWidth=this.paperHeight=this.imageableY=this.imageableX=0;this.layout="landscape";this.position="fit to page";this.showTitle=this.showYScale=this.showXScale=this.showGrid=!0;this.font="Helvetica";this.paper=null;this.asPDF=!0;this.date=this.title=null;s(this,arguments)},JSV.common,"PrintLayout");K(c$,function(){this.paperHeight=z(72*
Math.min(11,11.69));this.paperWidth=z(72*Math.min(8.5,8.27));this.imageableHeight=this.paperHeight;this.imageableWidth=this.paperWidth});n("JSV.common");c$=t(function(){this.repaintPending=!1;this.vwr=null;s(this,arguments)},JSV.common,"RepaintManager");u(c$,function(a){this.vwr=a},"JSV.common.JSViewer");c(c$,"refresh",function(){if(this.repaintPending)return!1;this.repaintPending=!0;this.vwr.pd().taintedAll=!0;var a=this.vwr.html5Applet;"undefined"!=typeof Jmol&&(Jmol._repaint&&a)&&Jmol._repaint(a,
!1);this.repaintDone();return!0});c(c$,"repaintDone",function(){this.repaintPending=!1;this.notify()});n("JSV.common");w(null,"JSV.common.ScaleData",["java.lang.Double","JSV.common.Coordinate"],function(){c$=t(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;s(this,arguments)},JSV.common,"ScaleData");K(c$,function(){this.precision=D(2,0);this.exportPrecision=D(2,0);this.steps=X(2,0);this.minorTickCounts=D(2,0)});u(c$,function(){});u(c$,function(a,b){this.startDataPointIndex=a;this.endDataPointIndex=b;this.pointCount=this.endDataPointIndex-
this.startDataPointIndex+1},"~N,~N");u(c$,function(a,b,c,e,g){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&&!e&&(this.minY=0);this.maxY=JSV.common.Coordinate.getMaxY(a,b,c);this.setScale(e,g)},"~A,~N,~N,~B,~B");c(c$,"setScale",function(a,b){this.setXScale();a||(this.maxXOnScale+=this.steps[0]/2);this.setYScale(this.minY,this.maxY,!0,b)},"~B,~B");c(c$,"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(c$,"isYZeroOnScale",function(){return this.minYOnScale<this.spectrumYRef&&this.maxYOnScale>this.spectrumYRef});c(c$,"setYScale",function(a,b,c,e){0==a&&0==b&&(b=1);this.isShiftZoomedY&&(a=this.minYOnScale,b=this.maxYOnScale);var g=this.setScaleParams(a,b,1),f=e?g/2:g/4;e=e?g/4:g/2;this.isShiftZoomedY||(this.minYOnScale=0==a?0:c?f*Math.floor(a/
f):a,this.maxYOnScale=c?e*Math.ceil(1.05*b/e):b);this.firstY=0==a?0:Math.floor(a/f)*f;if(0>this.minYOnScale&&0<this.maxYOnScale)for(this.firstY=0;this.firstY-g>this.minYOnScale;)this.firstY-=g;else 0!=this.minYOnScale&&1E-4<Math.abs((a-this.firstY)/f)&&(this.firstY+=f);c&&(this.initMinYOnScale=this.minYOnScale,this.initMaxYOnScale=this.maxYOnScale,this.initMinY=a,this.initMaxY=b)},"~N,~N,~B,~B");c(c$,"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(c$,"setXRange",function(a,b){this.minX=a;this.maxX=b;this.setXScale()},"~N,~N");c$.getXRange=c(c$,"getXRange",function(a,b,c,e,g,f,h,k){for(var l=0,m=0,l=g;l<=f;l++)if(g=b[l].getXVal(),g>=c){h[a]=l;break}for(;l<=f&&!(g=b[l].getXVal(),m++,g>=e);l++);k[a]=l-1;return m},"~N,~A,~N,~N,~N,~N,~A,~A");c(c$,"setScaleParams",function(a,b,c){a=b==a?1:Math.abs(b-a)/14;var e=Math.log10(Math.abs(a));b=q(Math.floor(e));this.exportPrecision[c]=b;this.precision[c]=0>=b?Math.min(8,
1-b):3<b?-2:0;a=0;for(e=Math.pow(10,e-b);e>JSV.common.ScaleData.NTICKS[a];)a++;this.steps[c]=Math.pow(10,b)*JSV.common.ScaleData.NTICKS[a];e=Math.log10(Math.abs(100010*this.steps[c]));b=e-Math.floor(e);for(a=e=0;a<JSV.common.ScaleData.NTICKS.length;a++)if(0.001>Math.abs(b-JSV.common.ScaleData.LOGTICKS[a])){e=JSV.common.ScaleData.NTICKS[a];break}this.minorTickCounts[c]=e;return this.steps[c]},"~N,~N,~N");c(c$,"isInRangeX",function(a){return a>=this.minX&&a<=this.maxX},"~N");c(c$,"addSpecShift",function(a){this.specShift+=
a;this.minX+=a;this.maxX+=a;this.minXOnScale+=a;this.maxXOnScale+=a;this.firstX+=a},"~N");c(c$,"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(c$,"setMinMax",function(a,b,c,e){this.minX=a;this.maxX=b;this.minY=c;this.maxY=e},"~N,~N,~N,~N");c(c$,"toX",function(a,b,c){return this.toXScaled(a,b,c,this.xFactorForScale)},"~N,~N,~B");c(c$,"toX0",function(a,b,c,e){return this.toXScaled(a,c,e,(this.maxXOnScale-this.minXOnScale)/(c-b))},"~N,~N,~N,~B");c(c$,"toXScaled",function(a,
b,c,e){return c?this.maxXOnScale-(b-a)*e:this.minXOnScale+(b-a)*e},"~N,~N,~B,~N");c(c$,"toPixelX",function(a,b,c,e){return this.toPixelXScaled(a,b,c,e,this.xFactorForScale)},"~N,~N,~N,~B");c(c$,"toPixelX0",function(a,b,c,e){return this.toPixelXScaled(a,b,c,e,(this.maxXOnScale-this.minXOnScale)/(c-b))},"~N,~N,~N,~B");c(c$,"toPixelXScaled",function(a,b,c,e,g){a=q((a-this.minXOnScale)/g);return e?b+a:c-a},"~N,~N,~N,~B,~N");c(c$,"toY",function(a,b){return this.maxYOnScale+(b-a)*this.yFactorForScale},
"~N,~N");c(c$,"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(c$,"toPixelY",function(a,b){return Double.isNaN(a)?-2147483648:b-q(((a-this.spectrumYRef)*this.userYFactor+this.spectrumYRef-this.minYOnScale)/this.yFactorForScale)},"~N,~N");c(c$,"toPixelY0",function(a,b,c){return q(b+(this.maxYOnScale-a)/((this.maxYOnScale-this.minYOnScale)/(c-b)))},"~N,~N,~N");c(c$,"setXYScale",function(a,
b,c){var e=this.spectrumYRef,g=this.spectrumScaleFactor,f=1!=g||this.isShiftZoomedY,h=f?this.initMinYOnScale:this.minY,k=f?this.initMaxYOnScale:this.maxY;f&&e<h&&(e=h);f&&e>k&&(e=k);this.setYScale((h-e)/g+e,(k-e)/g+e,1==g,c);this.xFactorForScale=(this.maxXOnScale-this.minXOnScale)/(a-1);this.yFactorForScale=(this.maxYOnScale-this.minYOnScale)/(b-1)},"~N,~N,~B");c$.copyScaleFactors=c(c$,"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");c$.copyYScales=c(c$,"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");c$.setDataPointIndices=c(c$,"setDataPointIndices",
function(a,b,c,e,g,f){for(var h=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,g,f)>=e&&h++}return h==k},"JU.Lst,~N,~N,~N,~A,~A");c$.fixScale=c(c$,"fixScale",function(a){if(!a.isEmpty())for(;;){for(var b,c=a.entrySet().iterator();c.hasNext()&&((b=c.next())||1);){var e=b.getValue(),g=e.indexOf("E");0<=g&&(e=e.substring(0,g));if(0>e.indexOf(".")||!e.endsWith("0")&&!e.endsWith("."))return}for(c=a.entrySet().iterator();c.hasNext()&&((b=c.next())||
1);)e=b.getValue(),g=e.indexOf("E"),0<=g?b.setValue(e.substring(0,g-1)+e.substring(g)):b.setValue(e.substring(0,e.length-1))}},"java.util.Map");c(c$,"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");C(c$,"NTICKS",[2,5,10,10]);c$.LOGTICKS=c$.prototype.LOGTICKS=[Math.log10(2),Math.log10(5),0,1]});n("JSV.common");
w(["java.lang.Enum"],"JSV.common.ScriptToken",["java.util.Hashtable","JU.Lst","$.PT","$.SB","JSV.common.ScriptTokenizer"],function(){c$=t(function(){this.tip=null;s(this,arguments)},JSV.common,"ScriptToken",Enum);c(c$,"getTip",function(){return"  "+("T"===this.tip?"TRUE/FALSE/TOGGLE":"TF"===this.tip?"TRUE or FALSE":"C"===this.tip?"<color>":this.tip)});u(c$,function(){});u(c$,function(a){this.tip=a},"~S");c$.getScriptToken=c(c$,"getScriptToken",function(a){if(null==JSV.common.ScriptToken.htParams){JSV.common.ScriptToken.htParams=
new java.util.Hashtable;for(var b,c=0,e=JSV.common.ScriptToken.values();c<e.length&&((b=e[c])||1);c++)JSV.common.ScriptToken.htParams.put(b.name(),b)}a=JSV.common.ScriptToken.htParams.get(a.toUpperCase());return null==a?JSV.common.ScriptToken.UNKNOWN:a},"~S");c$.getScriptTokenList=c(c$,"getScriptTokenList",function(a,b){a=a.toUpperCase();var c=new JU.Lst,e=JSV.common.ScriptToken.getScriptToken(a);if(b)null!=e&&c.addLast(e);else for(var g,e=JSV.common.ScriptToken.htParams.entrySet().iterator();e.hasNext()&&
((g=e.next())||1);)g.getKey().startsWith(a)&&null!=g.getValue().tip&&c.addLast(g.getValue());return c},"~S,~B");c$.getValue=c(c$,"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");c$.removeCommandName=c(c$,"removeCommandName",function(a){var b=a.indexOf(" ");return 0>b?"":a.substring(b).trim()},"~S");c$.getKey=c(c$,"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");c$.getTokens=c(c$,"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");c$.getNameList=c(c$,"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$.htParams=null;v(c$,"UNKNOWN",0,[]);v(c$,"APPLETID",1,[]);v(c$,"APPLETREADYCALLBACKFUNCTIONNAME",2,[]);v(c$,"AUTOINTEGRATE",3,["TF"]);v(c$,"BACKGROUNDCOLOR",4,["C"]);v(c$,"CLOSE",5,["spectrumId or fileName or ALL or VIEWS or SIMULATIONS"]);v(c$,"COMPOUNDMENUON",6,["TF"]);v(c$,"COORDCALLBACKFUNCTIONNAME",7,[]);v(c$,"COORDINATESCOLOR",8,["C"]);v(c$,"COORDINATESON",9,["T"]);v(c$,"DEBUG",10,["TF"]);
v(c$,"DEFAULTLOADSCRIPT",11,['"script..."']);v(c$,"DEFAULTNMRNORMALIZATION",12,["maxYvalue"]);v(c$,"DISPLAYFONTNAME",13,["fontName"]);v(c$,"DISPLAY1D",14,["T"]);v(c$,"DISPLAY2D",15,["T"]);v(c$,"ENABLEZOOM",16,["T"]);v(c$,"ENDINDEX",17,[]);v(c$,"FINDX",18,["x-value"]);v(c$,"GETPROPERTY",19,["[ALL] [propertyName]"]);v(c$,"GETSOLUTIONCOLOR",20,[" FILL or FILLNONE or FILLALL or FILLALLNONE"]);v(c$,"GRIDCOLOR",21,["C"]);v(c$,"GRIDON",22,["T"]);v(c$,"HIDDEN",23,["TF"]);v(c$,"HIGHLIGHTCOLOR",24,["C"]);v(c$,
"HIGHLIGHT",25,["OFF or X1 X2 [OFF] or X1 X2 r g b [a]"]);v(c$,"INTEGRALOFFSET",26,["percent"]);v(c$,"INTEGRALRANGE",27,["percent"]);v(c$,"INTEGRATE",28,[]);v(c$,"INTEGRATION",29,["ON/OFF/AUTO/TOGGLE/MIN value/MARK ppm1-ppm2:norm,ppm3-ppm4,... (start with 0-0 to clear)"]);v(c$,"INTEGRALPLOTCOLOR",30,[]);v(c$,"INTEGRATIONRATIOS",31,[]);v(c$,"INTERFACE",32,[]);v(c$,"IRMODE",33,["A or T or TOGGLE"]);v(c$,"JMOL",34,["...Jmol command..."]);v(c$,"JSV",35,[]);v(c$,"LABEL",36,['x y [color and/or "text"]']);
v(c$,"LINK",37,["AB or ABC or NONE or ALL"]);v(c$,"LOAD",38,['[APPEND] "fileName" [first] [last]; use "" to reload current file']);v(c$,"LOADFILECALLBACKFUNCTIONNAME",39,[]);v(c$,"LOADIMAGINARY",40,["T/F - default is to NOT load imaginary spectra"]);v(c$,"MENUON",41,[]);v(c$,"OBSCURE",42,[]);v(c$,"OVERLAY",43,[]);v(c$,"OVERLAYSTACKED",44,["TF"]);v(c$,"PEAK",45,['<type(IR,CNMR,HNMR,MS, etc)> id=xxx or "match" [ALL], for example: PEAK HNMR id=3']);v(c$,"PEAKCALLBACKFUNCTIONNAME",46,[]);v(c$,"PEAKLIST",
47,[" Example: PEAKLIST threshold=20 [%, or include=10] skip=0 interpolate=parabolic [or NONE]"]);v(c$,"PEAKTABCOLOR",48,["C"]);v(c$,"PLOTAREACOLOR",49,["C"]);v(c$,"PLOTCOLOR",50,["C"]);v(c$,"PLOTCOLORS",51,["color,color,color,..."]);v(c$,"PRINT",52,[]);v(c$,"REVERSEPLOT",53,["T"]);v(c$,"SCALEBY",54,["factor"]);v(c$,"SCALECOLOR",55,["C"]);v(c$,"SCRIPT",56,["filename.jsv"]);v(c$,"SELECT",57,["spectrumID, spectrumID,..."]);v(c$,"SETPEAK",58,["x (ppm) or NONE does peak search, unlike SETX -- NMR only"]);
v(c$,"SETX",59,["x (ppm) does no peak search, unlike SETPEAK -- NMR only"]);v(c$,"SHIFTX",60,["dx (ppm) or NONE -- NMR only"]);v(c$,"SHOWERRORS",61,[]);v(c$,"SHOWINTEGRATION",62,["T"]);v(c$,"SHOWKEY",63,["T"]);v(c$,"SHOWMEASUREMENTS",64,["T"]);v(c$,"SHOWMENU",65,[]);v(c$,"SHOWPEAKLIST",66,["T"]);v(c$,"SHOWPROPERTIES",67,[]);v(c$,"SHOWSOURCE",68,[]);v(c$,"SPECTRUM",69,["spectrumID"]);v(c$,"SPECTRUMNUMBER",70,[]);v(c$,"STACKOFFSETY",71,["percent"]);v(c$,"STARTINDEX",72,[]);v(c$,"SYNCCALLBACKFUNCTIONNAME",
73,[]);v(c$,"SYNCID",74,[]);v(c$,"TEST",75,[]);v(c$,"TITLEON",76,["T"]);v(c$,"TITLEBOLDON",77,["T"]);v(c$,"TITLECOLOR",78,["C"]);v(c$,"TITLEFONTNAME",79,["fontName"]);v(c$,"UNITSCOLOR",80,["C"]);v(c$,"VERSION",81,[]);v(c$,"VIEW",82,['spectrumID, spectrumID, ... Example: VIEW 3.1, 3.2  or  VIEW "acetophenone"']);v(c$,"XSCALEON",83,["T"]);v(c$,"XUNITSON",84,["T"]);v(c$,"YSCALE",85,["[ALL] lowValue highValue"]);v(c$,"YSCALEON",86,["T"]);v(c$,"YUNITSON",87,["T"]);v(c$,"WINDOW",88,[]);v(c$,"WRITE",89,
['[XY,DIF,DIFDUP,PAC,FIX,SQZ,AML,CML,JPG,PDF,PNG,SVG] "filename"']);v(c$,"ZOOM",90,["OUT or x1,x2 or x1,y1 x2,y2"]);v(c$,"ZOOMBOXCOLOR",91,[]);v(c$,"ZOOMBOXCOLOR2",92,[])});n("JSV.common");w(null,"JSV.common.ScriptTokenizer",["JU.PT"],function(){c$=t(function(){this.str=null;this.pt=-1;this.len=0;this.isCmd=!1;this.doCheck=!0;s(this,arguments)},JSV.common,"ScriptTokenizer");u(c$,function(a,b){this.str=a;this.len=a.length;this.isCmd=b},"~S,~B");c$.nextStringToken=c(c$,"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(c$,"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)){case '"':if(b){if(this.isCmd){b=!1;continue}this.pt++;break}this.isCmd&&(b=!0);continue;case " ":if(!this.isCmd&&!b)break;continue;case ";":case "\n":if(this.isCmd&&!b)break;continue;default:continue}break}this.doCheck=
!0;return this.str.substring(a,this.pt)});c(c$,"hasMoreTokens",function(){for(;++this.pt<this.len;){switch(this.str.charAt(this.pt)){case " ":case ";":case "\n":continue}break}this.doCheck=!1;return this.pt<this.len});c(c$,"getRemainingScript",function(){return this.str.substring(this.pt)})});n("JSV.common");c$=t(function(){this.isub=0;this.title=null;s(this,arguments)},JSV.common,"SubSpecChangeEvent");u(c$,function(a,b){this.isub=a;this.title=b},"~N,~S");c(c$,"isValid",function(){return null!=this.title});
c(c$,"getSubIndex",function(){return this.isub});h(c$,"toString",function(){return this.title});n("JSV.common");w(null,"JSV.common.ViewData",["JSV.common.Coordinate","$.ScaleData"],function(){c$=t(function(){this.thisScale=this.scaleData=null;this.iThisScale=this.nSpectra=0;s(this,arguments)},JSV.common,"ViewData");c(c$,"getScaleData",function(){return this.scaleData});c(c$,"getScale",function(){return this.thisScale});u(c$,function(a,b,c,e,g,f,h){this.nSpectra=h?1:a.size();this.scaleData=Array(this.nSpectra);
for(h=0;h<this.nSpectra;h++)this.scaleData[h]=new JSV.common.ScaleData(e[h],g[h]);this.init(a,b,c,f)},"JU.Lst,~N,~N,~A,~A,~B,~B");u(c$,function(a,b,c,e){this.nSpectra=a.size();var g=a.get(0).getXYCoords().length;this.scaleData=Array(1);this.scaleData[0]=new JSV.common.ScaleData(0,g-1);this.init(a,b,c,e)},"JU.Lst,~N,~N,~B");c(c$,"init",function(a,b,c,e){this.thisScale=this.scaleData[this.iThisScale=0];for(var g=0;g<this.scaleData.length;g++)this.scaleData[g].userYFactor=a.get(g).getUserYFactor(),this.scaleData[g].spectrumYRef=
a.get(g).getYRef();this.resetScaleFactors();var f=JSV.common.Coordinate.getMinX(a,this),h=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&&(g=k,k=l,l=g));a=a.get(0).isInverted();for(g=0;g<this.scaleData.length;g++)this.scaleData[g].setMinMax(f,h,k,l),this.scaleData[g].setScale(e,a)},"JU.Lst,~N,~N,~B");c(c$,"newSpectrum",function(a){this.init(a,0,0,!1)},"JU.Lst");c(c$,"setXRangeForSubSpectrum",function(a){this.setXRange(0,
a,this.scaleData[0].minX,this.scaleData[0].maxX,0,a.length-1)},"~A");c(c$,"setXRange",function(a,b,c,e,g,f){for(var h=0,k=0,h=g;h<=f;h++)if(g=b[h].getXVal(),g>=c){this.scaleData[a%this.scaleData.length].startDataPointIndex=h;break}for(;h<=f&&!(g=b[h].getXVal(),k++,g>=e);h++);this.scaleData[a%this.scaleData.length].endDataPointIndex=h-1;return k},"~N,~A,~N,~N,~N,~N");c(c$,"getStartingPointIndex",function(a){return this.scaleData[a%this.scaleData.length].startDataPointIndex},"~N");c(c$,"getEndingPointIndex",
function(a){return this.scaleData[a%this.scaleData.length].endDataPointIndex},"~N");c(c$,"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(c$,"setScale",function(a,b,c,e){this.iThisScale=a%this.scaleData.length;this.thisScale=this.scaleData[this.iThisScale];this.thisScale.setXYScale(b,c,e)},"~N,~N,~N,~B");c(c$,"resetScaleFactors",
function(){for(var a=0;a<this.scaleData.length;a++)this.scaleData[a].spectrumScaleFactor=1});c(c$,"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(c$,"getNewScales",function(a,b,c,e){if(b)return this.scaleData;a%=this.scaleData.length;b=(c-this.thisScale.minYOnScale)/(this.thisScale.maxYOnScale-this.thisScale.minYOnScale);
e=(e-this.thisScale.minYOnScale)/(this.thisScale.maxYOnScale-this.thisScale.minYOnScale);c=Array(this.scaleData.length);for(var g=0;g<this.scaleData.length;g++)c[g]=0<=a&&g!=a?this.scaleData[g]:new JSV.common.ScaleData;JSV.common.ScaleData.copyScaleFactors(this.scaleData,c);JSV.common.ScaleData.copyYScales(this.scaleData,c);for(g=0;g<this.scaleData.length;g++)0<=a&&g!=a||(c[g].isShiftZoomedY=!0,c[g].minYOnScale=this.scaleData[g].minYOnScale*(1-b)+b*this.scaleData[g].maxYOnScale,c[g].maxYOnScale=this.scaleData[g].minYOnScale*
(1-e)+e*this.scaleData[g].maxYOnScale);return c},"~N,~B,~N,~N")});n("JSV.common");H(JSV.common,"XYScaleConverter");n("JSV.common");c$=B(JSV.common,"ZoomEvent");u(c$,function(){});n("JSV.dialog");w(["JSV.api.AnnotationData","JSV.common.Annotation"],"JSV.dialog.JSVDialog",["java.lang.Double","JU.DF","$.PT","JSV.common.IntegralData","$.PeakData"],function(){c$=t(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.lastNorm=1;this.iSelected=this.iRowColSelected=-1;this.skipCreate=!1;this.iColSelected=this.iRowSelected=-1;s(this,arguments)},JSV.dialog,"JSVDialog",JSV.common.Annotation,JSV.api.AnnotationData);
c(c$,"setParams",function(a,b,c){this.title=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(c$,"initDialog",function(){this.dialog=this.manager.getDialog(this);this.restoreDialogPosition(this.jsvp,this.getPosXY());this.dialog.setTitle(this.title);this.layoutDialog()});c(c$,"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(c$,"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(c$,"addUniqueControls",function(){},"JSV.dialog.DialogManager");h(c$,"getAType",function(){return this.type});h(c$,"getGraphSetKey",function(){return this.graphSetKey});h(c$,"setGraphSetKey",function(a){this.graphSetKey=
a},"~S");h(c$,"getSpectrum",function(){return this.$spec});h(c$,"getState",function(){return this.isON});h(c$,"setState",function(a){this.isON=a},"~B");c(c$,"checkEnables",function(){var a=this.checkVisible();this.dialog.setText(this.showHideButton,a?"Hide":"Show")});c(c$,"createTable",function(a,b,c){this.tableData=a;this.dialog.createTable(a,b,c)},"~A,~A,~A");c(c$,"setTableSelectionEnabled",function(a){this.dialog.setCellSelectionEnabled(a)},"~B");c(c$,"getParameters",function(){return this.myParams});
c(c$,"showMessage",function(a,b,c){this.manager.showMessageDialog(this.dialog,a,b,c)},"~S,~S,~N");c(c$,"setThreshold",function(a){this.dialog.setText(this.txt1,this.getThreasholdText(a))},"~N");c(c$,"setComboSelected",function(a){this.dialog.setSelectedIndex(this.combo1,a)},"~N");c(c$,"applyFromFields",function(){this.apply(null)});c(c$,"reEnable",function(){this.paramsReEnable();return this});c(c$,"dispose",function(){this.dialog.dispose()});c(c$,"setVisible",function(a){this.dialog.setVisible(a)},
"~B");h(c$,"isVisible",function(){return this.dialog.isVisible()});c(c$,"selectTableRow",function(a){this.dialog.selectTableRow(a)},"~N");c(c$,"repaint",function(){this.dialog.repaint()});c(c$,"setFields",function(){switch(this.type){case JSV.common.Annotation.AType.PeakList:this.myParams=this.xyData.getParameters(),this.setThreshold(this.myParams.peakListThreshold),this.setComboSelected(this.myParams.peakListInterpolation.equals("none")?1:0),this.createData()}});c(c$,"setFocus",function(a){this.dialog.setFocus(a)},
"~B");c(c$,"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 e=1E100;a=a.getXVal();var g=this.xyData;b=Math.abs(b/20);for(var f=g.size();0<=--f;){var h=Math.abs(a-g.get(f).getXVal());h<e&&
(e=h,c=f)}e<b&&(this.selectTableRow(g.size()-2-c),this.repaint())}},"JSV.common.Coordinate,~N,~N");c(c$,"getPeakData",function(){var a=new JSV.common.PeakData(JSV.common.Annotation.AType.PeakList,this.$spec);a.setPeakList(this.myParams,this.precision,this.jsvp.getPanelData().getView());this.xyData=a;return null});h(c$,"getData",function(){null==this.xyData&&this.createData();return this.xyData});c(c$,"setData",function(a){this.myParams=a.getParameters();this.xyData=a},"JSV.api.AnnotationData");h(c$,
"setSpecShift",function(a){null!=this.xyData&&this.xyData.setSpecShift(a)},"~N");c(c$,"setType",function(a){this.type=a;switch(a){case JSV.common.Annotation.AType.Measurements:this.addUnits=!0}},"JSV.common.Annotation.AType");c(c$,"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(e){if(!y(e,Exception))throw e;}},"~A");c(c$,"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(c$,"restoreDialogPosition",function(a,b){if(null!=a){-2147483648==b[0]&&(b[0]=0,b[1]=-20);var c=this.manager.getLocationOnScreen(a),e=a.getHeight();this.loc=[Math.max(0,c[0]+b[0]),Math.max(0,c[1]+e+b[1])];this.dialog.setIntLocation(this.loc)}},"JSV.api.JSVPanel,~A");c(c$,"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(!y(c,
Exception))throw c;}},"~A");c(c$,"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(c$,"checkVisible",function(){return this.vwr.pd().getShowAnnotation(this.type)});c(c$,"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(c$,"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(c$,"eventApply",function(){switch(this.type){case JSV.common.Annotation.AType.PeakList:this.createData(),
this.skipCreate=!0}this.applyFromFields()});c(c$,"eventShowHide",function(a){(this.isON=a)&&this.eventApply();this.jsvp.doRepaint(!0);this.checkEnables()},"~B");c(c$,"clear",function(){this.setState(!0);null!=this.xyData&&(this.xyData.clear(),this.applyFromFields())});c(c$,"paramsReEnable",function(){switch(this.type){case JSV.common.Annotation.AType.PeakList:this.skipCreate=!0}this.setVisible(!0);this.isON=!0;this.applyFromFields()});c(c$,"tableCellSelect",function(a,b){System.out.println(a+" jSVDial "+
b);0>a&&(a=q(this.iRowColSelected/1E3),b=this.iRowColSelected%1E3,this.iRowColSelected=-1);var c=this.tableData[a][1],e=1E3*a+b;if(e!=this.iRowColSelected){this.iRowColSelected=e;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 g=
Double.parseDouble(c),f=Double.parseDouble(this.tableData[a+3-b][1]);this.jsvp.getPanelData().setXPointers(this.$spec,g,this.$spec,f);break;default:this.jsvp.getPanelData().findX(this.$spec,Double.parseDouble(c))}}catch(h){if(y(h,Exception))this.jsvp.getPanelData().findX(this.$spec,1E100);else throw h;}this.jsvp.doRepaint(!1);break;case JSV.common.Annotation.AType.OverlayLegend:this.jsvp.getPanelData().setSpectrum(a,!1)}}catch(k){if(!y(k,Exception))throw k;}}},"~N,~N");c(c$,"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=[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=[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=[40,65,50,50,50,50,50];this.createTable(a,b,c);this.setTableSelectionEnabled(!0);break;case JSV.common.Annotation.AType.OverlayLegend:b=["No.","Plot Color","Title"],a=this.vwr.selectedPanel.getPanelData().getOverlayLegendData(),c=[30,60,250],this.createTable(a,b,c),this.setTableSelectionEnabled(!0)}});c(c$,"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(!y(c,Exception))throw c;}}});c(c$,"setPrecision",function(a){this.precision=this.formatOptions[a]},"~N");c(c$,"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(c$,"getField",function(a,b){a+="&";var c="&"+b+"=",e=a.indexOf(c);return 0>e?null:a.substring(e+c.length,a.indexOf("&",e+1))},"~S,~S")});n("JSV.exception");w(["java.lang.Exception"],"JSV.exception.JSVException",null,function(){c$=B(JSV.exception,"JSVException",Exception)});n("JSV.js2d");c$=B(JSV.js2d,"Display");c$.getFullScreenDimensions=
c(c$,"getFullScreenDimensions",function(a,b){b[0]=a.width;b[1]=a.height},"~O,~A");c$.hasFocus=c(c$,"hasFocus",function(){return!0},"~O");c$.requestFocusInWindow=c(c$,"requestFocusInWindow",function(){},"~O");c$.repaint=c(c$,"repaint",function(){},"~O");c$.renderScreenImage=c(c$,"renderScreenImage",function(){},"javajs.api.PlatformViewer,~O,~O");c$.setTransparentCursor=c(c$,"setTransparentCursor",function(){},"~O");c$.setCursor=c(c$,"setCursor",function(){},"~N,~O");c$.prompt=c(c$,"prompt",function(a,
b){var c=prompt(a,b);return null!=c?c:"null"},"~S,~S,~A,~B");c$.convertPointFromScreen=c(c$,"convertPointFromScreen",function(){},"~O,JU.P3");n("JSV.js2d");c$=B(JSV.js2d,"Image");c$.getWidth=c(c$,"getWidth",function(a){return a.imageWidth?a.imageWidth:a.width},"~O");c$.getHeight=c(c$,"getHeight",function(a){return a.imageHeight?a.imageHeight:a.height},"~O");c$.grabPixels=c(c$,"grabPixels",function(a,b,c){var e=null;if(a._buf32)return a._buf32;e=a.getImageData(0,0,b,c).data;return JSV.js2d.Image.toIntARGB(e)},
"~O,~N,~N");c$.toIntARGB=c(c$,"toIntARGB",function(a){for(var b=q(a.length/4),c=D(b,0),e=0,g=0;e<b;g++)c[e++]=a[g++]<<16|a[g++]<<8|a[g++]|4278190080;return c},"~A");c$.fromIntARGB=c(c$,"fromIntARGB",function(a,b){for(var c=b.length>>2,e=0,g=0;e<c;e++)b[g++]=a[e]>>16&255,b[g++]=a[e]>>8&255,b[g++]=a[e]&255,b[g++]=255},"~A,~A");c$.getTextPixels=c(c$,"getTextPixels",function(a,b,c,e,g,f){c.fillStyle="#000000";c.fillRect(0,0,e,g);c.fillStyle="#FFFFFF";c.font=b.font;c.fillText(a,0,f);return JSV.js2d.Image.grabPixels(c,
e,g)},"~S,javajs.awt.Font,~O,~N,~N,~N");c$.allocateRgbImage=c(c$,"allocateRgbImage",function(a,b,c,e,g,f){null==f&&(f={width:a,height:b});f.buf32=c},"~N,~N,~A,~N,~B,~O");c$.getStaticGraphics=c(c$,"getStaticGraphics",function(a){return JSV.js2d.Image.getGraphics(a)},"~O,~B");c$.getGraphics=c(c$,"getGraphics",function(a){return a.getContext("2d")},"~O");c$.drawImage=c(c$,"drawImage",function(a,b,c,e){this.fromIntARGB(b.buf32,b.buf8);a.putImageData(b.imgdata,c,e)},"~O,~O,~N,~N,~N,~N");n("JSV.js2d");
w(["javajs.api.GenericFileInterface"],"JSV.js2d.JsFile",["JU.PT","JSV.common.JSVFileManager"],function(){c$=t(function(){this.fullName=this.name=null;s(this,arguments)},JSV.js2d,"JsFile",null,javajs.api.GenericFileInterface);c$.newFile=c(c$,"newFile",function(a){return new JSV.js2d.JsFile(a)},"~S");u(c$,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");h(c$,"getParentAsFile",function(){var a=this.fullName.lastIndexOf("/");return 0>a?null:new JSV.js2d.JsFile(this.fullName.substring(0,a))});h(c$,"getFullPath",function(){return this.fullName});h(c$,"getName",function(){return this.name});h(c$,"isDirectory",function(){return this.fullName.endsWith("/")});h(c$,"length",function(){return 0});c$.getURLContents=c(c$,"getURLContents",function(a,b,c){try{var e=
a.openConnection();null!=b?e.outputBytes(b):null!=c&&e.outputString(c);return e.getContents()}catch(g){if(y(g,Exception))return g.toString();throw g;}},"java.net.URL,~A,~S")});n("JSV.js2d");w(["JSV.api.JSVFileHelper"],"JSV.js2d.JsFileHelper",["JU.PT","JSV.js2d.JsFile"],function(){c$=t(function(){this.vwr=null;s(this,arguments)},JSV.js2d,"JsFileHelper",null,JSV.api.JSVFileHelper);u(c$,function(){});h(c$,"set",function(a){this.vwr=a;return this},"JSV.common.JSViewer");h(c$,"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");h(c$,"setDirLastExported",function(a){return a},"~S");h(c$,"setFileChooser",function(){},"JSV.common.ExportType");h(c$,"showFileOpenDialog",function(a,b){Jmol._loadFileAsynchronously(this,this.vwr.html5Applet,"?",b);return null},"~O,~A");c(c$,"setData",function(a,b,c){if(null!=a)if(null==b)this.vwr.selectedPanel.showMessage(a,"File Open Error");else{var e=null==c?null:"",g=!1,g=c[0],
e=c[1];this.vwr.si.siOpenDataOrFile(String.instantialize(b),"cache://"+a,null,null,-1,-1,g,null,null);null!=e&&this.vwr.runScript(e)}},"~S,~O,~A");h(c$,"getUrlFromDialog",function(a,b){return prompt(a,b)},"~S,~S")});n("JSV.js2d");c$=B(JSV.js2d,"JsFont");c$.newFont=c(c$,"newFont",function(a,b,c,e,g){a=a.equals("Monospaced")?"Courier":a.startsWith("Sans")?"Sans-Serif":"Serif";return(b?"bold ":"")+(c?"italic ":"")+e+g+" "+a},"~S,~B,~B,~N,~S");c$.getFontMetrics=c(c$,"getFontMetrics",function(a,b){b.font!=
a.font&&(b.font=a.font,a.font=b.font,b._fontAscent=Math.ceil(a.fontSize),b._fontDescent=Math.ceil(0.25*a.fontSize));return b},"javajs.awt.Font,~O");c$.getAscent=c(c$,"getAscent",function(a){return Math.ceil(a._fontAscent)},"~O");c$.getDescent=c(c$,"getDescent",function(a){return Math.ceil(a._fontDescent)},"~O");c$.stringWidth=c(c$,"stringWidth",function(a,b){a.fontMetrics.font=a.font;return Math.ceil(a.fontMetrics.measureText(b).width)},"javajs.awt.Font,~S");n("JSV.js2d");w(["JSV.api.JSVGraphics"],
"JSV.js2d.JsG2D",["javajs.awt.Color","JU.CU"],function(){c$=t(function(){this.windowHeight=this.windowWidth=0;this.inPath=this.isShifted=!1;s(this,arguments)},JSV.js2d,"JsG2D",null,JSV.api.JSVGraphics);u(c$,function(){});h(c$,"getColor4",function(a,b,c,e){return javajs.awt.Color.get4(a,b,c,e)},"~N,~N,~N,~N");h(c$,"getColor3",function(a,b,c){return javajs.awt.Color.get3(a,b,c)},"~N,~N,~N");h(c$,"getColor1",function(a){return javajs.awt.Color.get1(a)},"~N");h(c$,"newGrayScaleImage",function(a,b,c,e,
g){return b=Jmol._newGrayScaleImage(a,b,c,e,g)},"~O,~O,~N,~N,~A");h(c$,"drawGrayScaleImage",function(a,b,c,e,g,f,h,k,l,m){a=g-c+1;f=f-e+1;l=l-h+1;m=m-k+1;g=b.w*a/l;var n=b.h*f/m;b.width=g;b.height=n;var p=b.div;b=b.layer;b.style.left=c+"px";b.style.top=e+"px";b.style.width=a+"px";b.style.height=f+"px";p.style.left=-h*a/l+"px";p.style.top=-k*f/m+"px";p.style.width=g+"px";p.style.height=n+"px"},"~O,~O,~N,~N,~N,~N,~N,~N,~N,~N");h(c$,"drawLine",function(a,b,c,e,g){var f=this.inPath;f||a.beginPath();a.moveTo(b,
c);a.lineTo(e,g);f||a.stroke()},"~O,~N,~N,~N,~N");h(c$,"drawCircle",function(a,b,c,e){e/=2;a.beginPath();a.arc(b+e,c+e,e,0,2*Math.PI,!1);a.stroke()},"~O,~N,~N,~N");h(c$,"drawPolygon",function(a,b,c,e){this.doPoly(a,b,c,e,!1)},"~O,~A,~A,~N");c(c$,"doPoly",function(a,b,c,e,g){a.beginPath();a.moveTo(b[0],c[0]);for(var f=1;f<e;f++)a.lineTo(b[f],c[f]);g?a.fill():a.stroke()},"~O,~A,~A,~N,~B");h(c$,"drawRect",function(a,b,c,e,g){a.beginPath();a.rect(b,c,e,g);a.stroke()},"~O,~N,~N,~N,~N");h(c$,"drawString",
function(a,b,c,e){a.fillText(b,c,e)},"~O,~S,~N,~N");h(c$,"drawStringRotated",function(){},"~O,~S,~N,~N,~N");h(c$,"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");h(c$,"fillCircle",function(a,b,c,e){e/=2;a.beginPath();a.arc(b+e,c+e,e,0,2*Math.PI,!1);a.fill()},"~O,~N,~N,~N");h(c$,"fillPolygon",
function(a,b,c,e){this.doPoly(a,b,c,e,!0)},"~O,~A,~A,~N");h(c$,"fillRect",function(a,b,c,e,g){a.fillRect(b,c,e,g)},"~O,~N,~N,~N,~N");h(c$,"setGraphicsColor",function(a,b){var c=JU.CU.toCSSString(b);a.fillStyle=a.strokeStyle=c},"~O,javajs.api.GenericColor");h(c$,"setFont",function(a,b){var c=b.getInfo(),e=c.indexOf(" "),c=c.substring(0,e)+"px"+c.substring(e);a.font=c;return b},"~O,javajs.awt.Font");h(c$,"setStrokeBold",function(a,b){a.lineWidth=b?2:1},"~O,~B");h(c$,"setWindowParameters",function(a,
b){this.windowWidth=a;this.windowHeight=b},"~N,~N");h(c$,"translateScale",function(){},"~O,~N,~N,~N");h(c$,"canDoLineTo",function(){return!0});h(c$,"doStroke",function(a,b){(this.inPath=b)?a.beginPath():a.stroke()},"~O,~B");h(c$,"lineTo",function(a,b,c){a.lineTo(b,c)},"~O,~N,~N")});n("JSV.js2d");w(["JSV.api.JSVPanel"],"JSV.js2d.JsPanel",["javajs.awt.Font","JSV.common.JSViewer","$.PanelData","JU.Logger"],function(){c$=t(function(){this.bgcolor=this.name=this.vwr=this.mouse=this.pd=this.apiPlatform=
null;s(this,arguments)},JSV.js2d,"JsPanel",null,JSV.api.JSVPanel);h(c$,"finalize",function(){JU.Logger.info("JSVPanel "+this+" finalized")});h(c$,"getApiPlatform",function(){return this.apiPlatform});h(c$,"getPanelData",function(){return this.pd});c$.getEmptyPanel=c(c$,"getEmptyPanel",function(a){a=new JSV.js2d.JsPanel(a,!1);a.pd=null;return a},"JSV.common.JSViewer");c$.getPanelMany=c(c$,"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");u(c$,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");h(c$,"getTitle",function(){return this.pd.getTitle()});h(c$,"dispose",function(){null!=this.pd&&this.pd.dispose();this.pd=null;this.mouse.dispose();this.mouse=null});h(c$,"setTitle",function(a){this.name=this.pd.title=a},"~S");c(c$,"setColorOrFont",function(a,b){this.pd.setColorOrFont(a,
b)},"JSV.common.ColorParameters,JSV.common.ScriptToken");h(c$,"setBackgroundColor",function(a){this.bgcolor=a},"javajs.api.GenericColor");h(c$,"getInput",function(a,b,c){b=null;b=prompt(a,c);this.getFocusNow(!0);return b},"~S,~S,~S");h(c$,"showMessage",function(a,b){JU.Logger.info(a);this.vwr.html5Applet._showStatus(a,b);this.getFocusNow(!0)},"~S,~S");h(c$,"getFocusNow",function(){null!=this.pd&&this.pd.dialogsToFront(null)},"~B");h(c$,"getFontFaceID",function(){return javajs.awt.Font.getFontFaceID("SansSerif")},
"~S");h(c$,"doRepaint",function(a){null!=this.pd&&(this.pd.taintedAll=(new Boolean(this.pd.taintedAll|a)).valueOf(),this.pd.isPrinting||this.vwr.requestRepaint())},"~B");h(c$,"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),this.vwr.repaintDone()))},"~O");h(c$,"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(e){if(y(e,Exception))this.showMessage(e.toString(),"creating PDF");else throw e;}finally{this.pd.setPrint(null,null)}},"JSV.common.PrintLayout,java.io.OutputStream,~S");
h(c$,"saveImage",function(){return null},"~S,javajs.api.GenericFileInterface");h(c$,"hasFocus",function(){return!1});h(c$,"repaint",function(){});h(c$,"setToolTipText",function(){},"~S");h(c$,"getHeight",function(){return this.vwr.getHeight()});h(c$,"getWidth",function(){return this.vwr.getWidth()});h(c$,"isEnabled",function(){return!1});h(c$,"isFocusable",function(){return!1});h(c$,"isVisible",function(){return!1});h(c$,"setEnabled",function(){},"~B");h(c$,"setFocusable",function(){},"~B");h(c$,
"toString",function(){return null==this.pd?"<closed>":""+this.pd.getSpectrumAt(0)});h(c$,"processMouseEvent",function(a,b,c,e,g){return null!=this.mouse&&this.mouse.processEvent(a,b,c,e,g)},"~N,~N,~N,~N,~N");h(c$,"processTwoPointGesture",function(a){null!=this.mouse&&this.mouse.processTwoPointGesture(a)},"~A");h(c$,"showMenu",function(a,b){this.vwr.showMenu(a,b)},"~N,~N")});n("JSV.js2d");w(["JSV.common.ColorParameters"],"JSV.js2d.JsParameters",["javajs.awt.Color"],function(){c$=B(JSV.js2d,"JsParameters",
JSV.common.ColorParameters);u(c$,function(){E(this,JSV.js2d.JsParameters,[])});h(c$,"isValidFontName",function(){return!0},"~S");h(c$,"getColor1",function(a){return javajs.awt.Color.get1(a)},"~N");h(c$,"getColor3",function(a,b,c){return javajs.awt.Color.get3(a,b,c)},"~N,~N,~N");c(c$,"copy",function(a){return(new JSV.js2d.JsParameters).setName(a).setElementColors(this)},"~S")});n("JSV.js2d");w(["javajs.api.GenericPlatform"],"JSV.js2d.JsPlatform","java.net.URL JU.AjaxURLStreamHandlerFactory $.Rdr $.SB JSV.app.GenericMouse JSV.js2d.Display $.Image $.JsFile $.JsFont".split(" "),
function(){c$=t(function(){this.context=this.viewer=this.canvas=null;s(this,arguments)},JSV.js2d,"JsPlatform",null,javajs.api.GenericPlatform);h(c$,"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(e){}},"javajs.api.PlatformViewer,~O");h(c$,"isSingleThreaded",function(){return!0});
h(c$,"getJsObjectInfo",function(a,b,c){return"localName"==b?a[0].nodeName:null==c?a[0][b]:a[0][b](c[0])},"~A,~S,~A");h(c$,"isHeadless",function(){return!1});h(c$,"getMouseManager",function(a,b){return new JSV.app.GenericMouse(b)},"~N,~O");h(c$,"convertPointFromScreen",function(a,b){JSV.js2d.Display.convertPointFromScreen(a,b)},"~O,JU.P3");h(c$,"getFullScreenDimensions",function(a,b){JSV.js2d.Display.getFullScreenDimensions(a,b)},"~O,~A");h(c$,"getMenuPopup",function(){return null},"~S,~S");h(c$,"hasFocus",
function(a){return JSV.js2d.Display.hasFocus(a)},"~O");h(c$,"prompt",function(a,b,c,e){return JSV.js2d.Display.prompt(a,b,c,e)},"~S,~S,~A,~B");h(c$,"renderScreenImage",function(a,b){JSV.js2d.Display.renderScreenImage(this.viewer,a,b)},"~O,~O");h(c$,"drawImage",function(a,b,c,e,g,f){JSV.js2d.Image.drawImage(a,b,c,e,g,f)},"~O,~O,~N,~N,~N,~N");h(c$,"requestFocusInWindow",function(a){JSV.js2d.Display.requestFocusInWindow(a)},"~O");h(c$,"repaint",function(a){JSV.js2d.Display.repaint(a)},"~O");h(c$,"setTransparentCursor",
function(a){JSV.js2d.Display.setTransparentCursor(a)},"~O");h(c$,"setCursor",function(a,b){JSV.js2d.Display.setCursor(a,b)},"~N,~O");h(c$,"allocateRgbImage",function(a,b,c,e,g,f){return JSV.js2d.Image.allocateRgbImage(a,b,c,e,g,f?null:this.canvas)},"~N,~N,~A,~N,~B,~B");h(c$,"notifyEndOfRendering",function(){});h(c$,"createImage",function(){return null},"~O");h(c$,"disposeGraphics",function(){},"~O");h(c$,"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,~N,~N");h(c$,"drawImageToBuffer",function(a,b,c,e,g){return this.grabPixels(c,e,g,null,0,0)},"~O,~O,~O,~N,~N,~N");h(c$,"getTextPixels",function(a,b,c,e,g,f,h){return JSV.js2d.Image.getTextPixels(a,b,c,g,f,h)},"~S,javajs.awt.Font,~O,~O,~N,~N,~N");h(c$,"flushImage",function(){},"~O");h(c$,"getGraphics",function(a){return null==a?this.context:this.context=JSV.js2d.Image.getGraphics(this.canvas=
a)},"~O");h(c$,"getImageHeight",function(a){return null==a?-1:JSV.js2d.Image.getHeight(a)},"~O");h(c$,"getImageWidth",function(a){return null==a?-1:JSV.js2d.Image.getWidth(a)},"~O");h(c$,"getStaticGraphics",function(a,b){return JSV.js2d.Image.getStaticGraphics(a,b)},"~O,~B");h(c$,"newBufferedImage",function(a,b,c){return self.Jmol&&Jmol._getHiddenCanvas?Jmol._getHiddenCanvas(this.vwr.html5Applet,"stereoImage",b,c):null},"~O,~N,~N");h(c$,"newOffScreenImage",function(a,b){return self.Jmol&&Jmol._getHiddenCanvas?
Jmol._getHiddenCanvas(this.vwr.html5Applet,"textImage",a,b):null},"~N,~N");h(c$,"waitForDisplay",function(){return!1},"~O,~O");h(c$,"fontStringWidth",function(a,b){return JSV.js2d.JsFont.stringWidth(a,b)},"javajs.awt.Font,~S");h(c$,"getFontAscent",function(a){return JSV.js2d.JsFont.getAscent(a)},"~O");h(c$,"getFontDescent",function(a){return JSV.js2d.JsFont.getDescent(a)},"~O");h(c$,"getFontMetrics",function(a,b){return JSV.js2d.JsFont.getFontMetrics(a,b)},"javajs.awt.Font,~O");h(c$,"newFont",function(a,
b,c,e){return JSV.js2d.JsFont.newFont(a,b,c,e,"px")},"~S,~B,~B,~N");h(c$,"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");h(c$,"newFile",function(a){return new JSV.js2d.JsFile(a)},"~S");h(c$,"getBufferedFileInputStream",function(){return null},"~S");h(c$,"getURLContents",function(a,b,c,e){a=JSV.js2d.JsFile.getURLContents(a,b,c);try{return!e?a:p(a,String)?a:p(a,JU.SB)?a.toString():p(a,Array)?String.instantialize(a):String.instantialize(JU.Rdr.getStreamAsBytes(a,null))}catch(g){if(y(g,Exception))return""+
g;throw g;}},"java.net.URL,~A,~S,~B");h(c$,"getLocalUrl",function(){return null},"~S")});n("JSV.js2d");w(["JSV.api.JSVMainPanel"],"JSV.js2d.JsMainPanel",null,function(){c$=t(function(){this.selectedPanel=null;this.currentPanelIndex=0;this.title=null;this.enabled=this.focusable=this.visible=!1;s(this,arguments)},JSV.js2d,"JsMainPanel",null,JSV.api.JSVMainPanel);h(c$,"getCurrentPanelIndex",function(){return this.currentPanelIndex});h(c$,"dispose",function(){});h(c$,"getTitle",function(){return this.title});
h(c$,"setTitle",function(a){this.title=a},"~S");h(c$,"setSelectedPanel",function(a,b,c){b!==this.selectedPanel&&(this.selectedPanel=b);a=a.selectPanel(b,c);0<=a&&(this.currentPanelIndex=a);this.visible=!0},"JSV.common.JSViewer,JSV.api.JSVPanel,JU.Lst");c(c$,"getHeight",function(){return null==this.selectedPanel?0:this.selectedPanel.getHeight()});c(c$,"getWidth",function(){return null==this.selectedPanel?0:this.selectedPanel.getWidth()});h(c$,"isEnabled",function(){return this.enabled});h(c$,"isFocusable",
function(){return this.focusable});h(c$,"isVisible",function(){return this.visible});h(c$,"setEnabled",function(a){this.enabled=a},"~B");h(c$,"setFocusable",function(a){this.focusable=a},"~B")});n("JSV.source");w(["JSV.source.JDXHeader"],"JSV.source.JDXDataObject","java.lang.Character $.Double JU.DF $.PT JSV.common.Annotation $.Coordinate $.Integral JSV.exception.JSVException JU.Logger".split(" "),function(){c$=t(function(){this.filePathForwardSlash=this.filePath=null;this.isSimulation=!1;this.sourceID=
"";this.blockID=0;this.fileLastX=this.fileFirstX=1.7976931348623157E308;this.nPointsFile=-1;this.yFactor=this.xFactor=1.7976931348623157E308;this.yUnits=this.xUnits=this.varName="";this.yLabel=this.xLabel=null;this.nH=0;this.observedNucl="";this.observedFreq=1.7976931348623157E308;this.parent=null;this.offset=1.7976931348623157E308;this.dataPointNum=this.shiftRefType=-1;this.numDim=1;this.nucleusX=null;this.nucleusY="?";this.y2D=this.freq2dY=this.freq2dX=NaN;this.y2DUnits="";this.$isHZtoPPM=!1;this.xIncreases=
!0;this.continuous=!1;this.xyCoords=null;this.deltaX=this.maxY=this.maxX=this.minY=this.minX=NaN;this.normalizationFactor=1;s(this,arguments)},JSV.source,"JDXDataObject",JSV.source.JDXHeader);c(c$,"setFilePath",function(a){null!=a&&(this.filePath=a.trim(),this.filePathForwardSlash=this.filePath.$replace("\\","/"))},"~S");c(c$,"getFilePath",function(){return this.filePath});c(c$,"getFilePathForwardSlash",function(){return this.filePathForwardSlash});c(c$,"setBlockID",function(a){this.blockID=a},"~N");
c(c$,"isImaginary",function(){return this.varName.contains("IMAG")});c(c$,"setXFactor",function(a){this.xFactor=a},"~N");c(c$,"getXFactor",function(){return this.xFactor});c(c$,"setYFactor",function(a){this.yFactor=a},"~N");c(c$,"getYFactor",function(){return this.yFactor});c(c$,"checkRequiredTokens",function(){var a=1.7976931348623157E308==this.fileFirstX?"##FIRSTX":1.7976931348623157E308==this.fileLastX?"##LASTX":-1==this.nPointsFile?"##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(c$,"setXUnits",function(a){this.xUnits=a},"~S");c(c$,"getXUnits",function(){return this.xUnits});c(c$,"setYUnits",function(a){a.equals("PPM")&&(a="ARBITRARY UNITS");this.yUnits=a},"~S");c(c$,"getYUnits",function(){return this.yUnits});c(c$,"setXLabel",function(a){this.xLabel=a},"~S");c(c$,"setYLabel",function(a){this.yLabel=a},"~S");c(c$,"setObservedNucleus",
function(a){this.observedNucl=a;1==this.numDim&&(this.parent.nucleusX=this.nucleusX=this.fixNucleus(a))},"~S");c(c$,"setObservedFreq",function(a){this.observedFreq=a},"~N");c(c$,"getObservedFreq",function(){return this.observedFreq});c(c$,"is1D",function(){return 1==this.numDim});c(c$,"setY2D",function(a){this.y2D=a},"~N");c(c$,"getY2D",function(){return this.y2D});c(c$,"setY2DUnits",function(a){this.y2DUnits=a},"~S");c(c$,"getY2DPPM",function(){var a=this.y2D;this.y2DUnits.equals("HZ")&&(a/=this.freq2dY);
return a});c(c$,"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.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(c$,"fixNucleus",function(a){return JU.PT.rep(JU.PT.trim(a,"[]^<>"),"NUC_","")},"~S");c$.getGyroMagneticRatio=
c(c$,"getGyroMagneticRatio",function(a){for(var b=0;b<a.length&&!Character.isDigit(a.charAt(b));)b++;b=JU.PT.parseInt(a.substring(b));for(a=0;a<JSV.source.JDXDataObject.gyroData.length&&!(JSV.source.JDXDataObject.gyroData[a]>=b);a+=2);return JSV.source.JDXDataObject.gyroData[a]==b?JSV.source.JDXDataObject.gyroData[a+1]:NaN},"~S");c(c$,"isTransmittance",function(){var a=this.yUnits.toLowerCase();return a.equals("transmittance")||a.contains("trans")||a.equals("t")});c(c$,"isAbsorbance",function(){var a=
this.yUnits.toLowerCase();return a.equals("absorbance")||a.contains("abs")||a.equals("a")});c(c$,"canSaveAsJDX",function(){return this.getDataClass().equals("XYDATA")});c(c$,"canIntegrate",function(){return this.continuous&&(this.isHNMR()||this.isGC())&&this.is1D()});c(c$,"isAutoOverlayFromJmolClick",function(){return this.isGC()});c(c$,"isGC",function(){return this.dataType.startsWith("GC")||this.dataType.startsWith("GAS")});c(c$,"isMS",function(){return this.dataType.startsWith("MASS")||this.dataType.startsWith("MS")});
c(c$,"isStackable",function(){return!this.isMS()});c(c$,"isScalable",function(){return!0});c(c$,"getYRef",function(){return!this.isTransmittance()?0:2>JSV.common.Coordinate.getMaxY(this.xyCoords,0,this.xyCoords.length)?1:100});c(c$,"isInverted",function(){return this.isTransmittance()});c(c$,"canConvertTransAbs",function(){return this.continuous&&this.yUnits.toLowerCase().contains("abs")||this.yUnits.toLowerCase().contains("trans")});c(c$,"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(c$,"isHZtoPPM",function(){return this.$isHZtoPPM});c(c$,"setHZtoPPM",function(a){this.$isHZtoPPM=a},"~B");c(c$,"setIncreasing",function(a){this.xIncreases=a},"~B");c(c$,"isXIncreasing",function(){return this.xIncreases});c(c$,"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(c$,"setContinuous",function(a){this.continuous=a},"~B");c(c$,"isContinuous",function(){return this.continuous});c(c$,"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++]=["##.OBSERVE FREQUENCY",""+this.observedFreq]);""!==this.observedNucl&&(b[a++]=["##.OBSERVE NUCLEUS",this.observedNucl]);b[a++]=["##XUNITS",this.$isHZtoPPM?"HZ":this.xUnits];b[a++]=["##YUNITS",this.yUnits];var c=this.xIncreases?this.getFirstX():this.getLastX();b[a++]=["##FIRSTX",String.valueOf(this.isHZtoPPM()?c*this.observedFreq:c)];c=this.xIncreases?this.getLastX():this.getFirstX();b[a++]=["##FIRSTY",String.valueOf(this.xIncreases?
this.getFirstY():this.getLastY())];b[a++]=["##LASTX",String.valueOf(this.isHZtoPPM()?c*this.observedFreq:c)];b[a++]=["##XFACTOR",String.valueOf(this.getXFactor())];b[a++]=["##YFACTOR",String.valueOf(this.getYFactor())];b[a++]=["##NPOINTS",String.valueOf(this.xyCoords.length)];return b});c(c$,"getDefaultUnitPrecision",function(){return 2});c(c$,"setMeasurementText",function(a){var b=a.getValue();if(Double.isNaN(b))return"";var c=1,e="";if(this.isNMR())if(1==this.numDim)a=p(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(c$,"isNMR",function(){return 0<=this.dataType.toUpperCase().indexOf("NMR")});c(c$,"isHNMR",function(){return this.isNMR()&&0<=this.observedNucl.toUpperCase().indexOf("H")});c(c$,"setXYCoords",function(a){this.xyCoords=a},"~A");c(c$,"getFirstX",function(){return this.xyCoords[0].getXVal()});c(c$,"getFirstY",function(){return this.xyCoords[0].getYVal()});c(c$,"getLastX",
function(){return this.xyCoords[this.xyCoords.length-1].getXVal()});c(c$,"getLastY",function(){return this.xyCoords[this.xyCoords.length-1].getYVal()});c(c$,"getMinX",function(){return Double.isNaN(this.minX)?this.minX=JSV.common.Coordinate.getMinX(this.xyCoords,0,this.xyCoords.length):this.minX});c(c$,"getMinY",function(){return Double.isNaN(this.minY)?this.minY=JSV.common.Coordinate.getMinY(this.xyCoords,0,this.xyCoords.length):this.minY});c(c$,"getMaxX",function(){return Double.isNaN(this.maxX)?
this.maxX=JSV.common.Coordinate.getMaxX(this.xyCoords,0,this.xyCoords.length):this.maxX});c(c$,"getMaxY",function(){return Double.isNaN(this.maxY)?this.maxY=JSV.common.Coordinate.getMaxY(this.xyCoords,0,this.xyCoords.length):this.maxY});c(c$,"doNormalize",function(a){this.isNMR()&&this.is1D()&&(this.normalizationFactor=a/this.getMaxY(),this.maxY=NaN,JSV.common.Coordinate.applyScale(this.xyCoords,1,this.normalizationFactor),JU.Logger.info("Y values have been scaled by a factor of "+this.normalizationFactor))},
"~N");c(c$,"getDeltaX",function(){return Double.isNaN(this.deltaX)?this.deltaX=JSV.common.Coordinate.deltaX(this.getLastX(),this.getFirstX(),this.xyCoords.length):this.deltaX});c(c$,"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.offset=this.offset;a.dataPointNum=this.dataPointNum;a.shiftRefType=this.shiftRefType;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(c$,"getTypeLabel",
function(){return this.isNMR()?this.nucleusX+"NMR":this.dataType});c(c$,"getDefaultAnnotationInfo",function(a){var b,c=this.isNMR();switch(a){case JSV.common.Annotation.AType.Integration:return[null,[1],null];case JSV.common.Annotation.AType.Measurements:return a=c?["Hz","ppm"]:[""],b=this.isHNMR()?[1,4]:[1,3],[a,b,Integer.$valueOf(0)];case JSV.common.Annotation.AType.PeakList:return a=c?["Hz","ppm"]:[""],b=this.isHNMR()?[1,2]:[1,1],[a,b,Integer.$valueOf(c?1:0)]}return null},"JSV.common.Annotation.AType");
c(c$,"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()?[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]:[e,a]},"JSV.common.Measurement,~A,~N");C(c$,"ERROR",1.7976931348623157E308,"SCALE_NONE",0,"SCALE_TOP",1,"SCALE_BOTTOM",2,"SCALE_TOP_BOTTOM",3,"gyroData",[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])});n("JSV.source");w(null,"JSV.source.JDXDecompressor",
["java.lang.Double","JSV.common.Coordinate","JU.Logger"],function(){c$=t(function(){this.lineNumber=this.ich=this.nPoints=this.deltaX=this.yFactor=this.xFactor=0;this.t=null;this.dx=this.firstX=0;this.maxY=4.9E-324;this.minY=1.7976931348623157E308;this.debugging=!1;this.xyCoords=null;this.ipt=0;this.lastLine=this.line=null;this.lineLen=0;this.errorLog=null;this.lastDif=this.difVal=-2147483648;this.yval=this.xval=this.dupCount=0;this.firstLastX=null;s(this,arguments)},JSV.source,"JDXDecompressor");
c(c$,"getMinY",function(){return this.minY});c(c$,"getMaxY",function(){return this.maxY});u(c$,function(a,b,c,e,g,f){this.t=a;this.firstX=b;this.xFactor=c;this.yFactor=e;this.deltaX=g;this.nPoints=f;this.lineNumber=a.labelLineNo;this.debugging=JU.Logger.isActiveLevel(6)},"JSV.source.JDXSourceStreamTokenizer,~N,~N,~N,~N,~N");c(c$,"addPoint",function(a){if(this.ipt==this.xyCoords.length){var b=Array(2*this.ipt);System.arraycopy(this.xyCoords,0,b,0,this.ipt);this.xyCoords=b}b=a.getYVal();b>this.maxY?
this.maxY=b:b<this.minY&&(this.minY=b);this.debugging&&this.logError("Coord: "+this.ipt+a);this.xyCoords[this.ipt++]=a;this.firstLastX[1]=a.getXVal()},"JSV.common.Coordinate");c(c$,"decompressData",function(a,b){this.errorLog=a;this.firstLastX=b;this.debugging&&this.logError("firstX="+this.firstX+" xFactor="+this.xFactor+" yFactor="+this.yFactor+" deltaX="+this.deltaX+" nPoints="+this.nPoints);this.testAlgorithm();this.xyCoords=Array(this.nPoints);var c=Math.abs(0.35*this.deltaX),e=Math.abs(1.4*this.deltaX),
g=Math.abs(0.6*this.deltaX);try{for(;null!=(this.line=this.t.readLineTrimmed())&&0>this.line.indexOf("##");)if(this.lineNumber++,this.debugging&&this.logError(this.lineNumber+"\t"+this.line),0!=(this.lineLen=this.line.length)){this.ich=0;var f=-2147483648!=this.lastDif;this.xval=this.getValueDelim()*this.xFactor;0==this.ipt&&(b[0]=this.xval,this.dx=this.firstX-this.xval);this.xval+=this.dx;var h=(new JSV.common.Coordinate).set(this.xval,(this.yval=this.getYValue())*this.yFactor);if(0==this.ipt)this.addPoint(h);
else{var k=this.xyCoords[this.ipt-1],l=Math.abs(k.getXVal()-h.getXVal());if(f&&l<c){this.xyCoords[this.ipt-1]=h;var m=k.getYVal(),n=h.getYVal();n!=m&&this.logError(this.lastLine+"\n"+this.line+"\nY-value Checkpoint Error! Line "+this.lineNumber+" for y1="+n+" y0="+m)}else this.addPoint(h),(l<g||l>e)&&this.logError(this.lastLine+"\n"+this.line+"\nX-sequence Checkpoint Error! Line "+this.lineNumber+" |x1-x0|="+l+" instead of "+Math.abs(this.deltaX)+" for x1="+h.getXVal()+" x0="+k.getXVal())}for(;this.ich<
this.lineLen||-2147483648!=this.difVal||0<this.dupCount;)this.xval+=this.deltaX,Double.isNaN(this.yval=this.getYValue())||this.addPoint((new JSV.common.Coordinate).set(this.xval,this.yval*this.yFactor));this.lastLine=this.line}}catch(p){if(!y(p,java.io.IOException))throw p;}this.nPoints!=this.ipt&&(this.logError("Decompressor did not find "+this.nPoints+" points -- instead "+this.ipt),c=Array(this.ipt),System.arraycopy(this.xyCoords,0,c,0,this.ipt),this.xyCoords=c);return 0<this.deltaX?this.xyCoords:
JSV.common.Coordinate.reverse(this.xyCoords)},"JU.SB,~A");c(c$,"logError",function(a){this.debugging&&JU.Logger.debug(a);this.errorLog.append(a).appendC("\n")},"~S");c(c$,"getYValue",function(){if(0<this.dupCount)return--this.dupCount,this.yval=-2147483648==this.lastDif?this.yval:this.yval+this.lastDif;if(-2147483648!=this.difVal)return this.yval+=this.difVal,this.lastDif=this.difVal,this.difVal=-2147483648,this.yval;if(this.ich==this.lineLen)return NaN;var a=this.line.charAt(this.ich);this.debugging&&
JU.Logger.info(""+a);switch(a){case "%":this.difVal=0;break;case "J":case "K":case "L":case "M":case "N":case "O":case "P":case "Q":case "R":this.difVal=a.charCodeAt(0)-73;break;case "j":case "k":case "l":case "m":case "n":case "o":case "p":case "q":case "r":this.difVal=105-a.charCodeAt(0);break;case "S":case "T":case "U":case "V":case "W":case "X":case "Y":case "Z":this.dupCount=a.charCodeAt(0)-82;break;case "s":this.dupCount=9;break;case "+":case "-":case ".":case "0":case "1":case "2":case "3":case "4":case "5":case "6":case "7":case "8":case "9":case "@":case "A":case "B":case "C":case "D":case "E":case "F":case "G":case "H":case "I":case "a":case "b":case "c":case "d":case "e":case "f":case "g":case "h":case "i":return this.lastDif=
-2147483648,this.getValue();case "?":return this.lastDif=-2147483648,NaN;default:return this.ich++,this.lastDif=-2147483648,this.getYValue()}this.ich++;-2147483648!=this.difVal?this.difVal=this.getDifDup(this.difVal):this.dupCount=this.getDifDup(this.dupCount)-1;return this.getYValue()});c(c$,"getDifDup",function(a){var b=this.ich;this.next();var c=a+this.line.substring(b,this.ich);return b==this.ich?a:Integer.$valueOf(c).intValue()},"~N");c(c$,"getValue",function(){var a=this.ich;if(this.ich==this.lineLen)return NaN;
var a=this.line.charAt(this.ich),b=0;switch(a){case "+":case "-":case ".":case "0":case "1":case "2":case "3":case "4":case "5":case "6":case "7":case "8":case "9":return this.getValueDelim();case "@":case "A":case "B":case "C":case "D":case "E":case "F":case "G":case "H":case "I":b=a.charCodeAt(0)-64;a=++this.ich;break;case "a":case "b":case "c":case "d":case "e":case "f":case "g":case "h":case "i":b=96-a.charCodeAt(0);a=++this.ich;break;default:return this.ich++,this.getValue()}this.next();return Double.$valueOf(b+
this.line.substring(a,this.ich)).doubleValue()});c(c$,"getValueDelim",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){case "-":c=-1;case "+":a=++this.ich}b=this.next();if("E"==b&&this.ich+3<this.lineLen)switch(this.line.charAt(this.ich+1)){case "-":case "+":this.ich+=4,this.ich<this.lineLen&&("0"<=(b=this.line.charAt(this.ich))&&"9">=b)&&this.ich++}return c*Double.$valueOf(this.line.substring(a,this.ich)).doubleValue()});
c(c$,"next",function(){for(;this.ich<this.lineLen&&0>"+-%@ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs? ,\t\n".indexOf(this.line.charAt(this.ich));)this.ich++;return this.ich==this.lineLen?"\x00":this.line.charAt(this.ich)});c(c$,"testAlgorithm",function(){});C(c$,"allDelim","+-%@ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs? ,\t\n","WHITE_SPACE"," ,\t\n")});n("JSV.source");w(["JU.Lst"],"JSV.source.JDXHeader",null,function(){c$=t(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;s(this,arguments)},JSV.source,"JDXHeader");K(c$,function(){this.headerTable=new JU.Lst});c(c$,"setTitle",function(a){this.title=a},"~S");c(c$,"setJcampdx",function(a){this.jcampdx=a},"~S");c(c$,"setDataType",function(a){this.dataType=a},"~S");c(c$,"setDataClass",function(a){this.dataClass=a},"~S");c(c$,"setOrigin",function(a){this.origin=a},"~S");c(c$,"setOwner",function(a){this.owner=
a},"~S");c(c$,"setLongDate",function(a){this.longDate=a},"~S");c(c$,"setDate",function(a){this.date=a},"~S");c(c$,"setTime",function(a){this.time=a},"~S");c(c$,"getTitle",function(){return this.title});c$.getTypeName=c(c$,"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(c$,"getQualifiedDataType",function(){return null==this.qualifiedType?
this.qualifiedType=JSV.source.JDXHeader.getTypeName(this.dataType):this.qualifiedType});c(c$,"getJcampdx",function(){return this.jcampdx});c(c$,"getDataType",function(){return this.dataType});c(c$,"getOrigin",function(){return this.origin});c(c$,"getOwner",function(){return this.owner});c(c$,"getLongDate",function(){return this.longDate});c(c$,"getDate",function(){return this.date});c(c$,"getTime",function(){return this.time});c(c$,"getDataClass",function(){return this.dataClass});c(c$,"setHeaderTable",
function(a){this.headerTable=a},"JU.Lst");c(c$,"getHeaderTable",function(){return this.headerTable});c(c$,"getHeaderRowDataAsArray",function(a,b){var c=Array((a?6:5)+this.headerTable.size()+b),e=0;c[e++]=["##TITLE",this.title];c[e++]=["##JCAMP-DX",this.jcampdx];c[e++]=["##DATA TYPE",this.dataType];a&&(c[e++]=["##DATA CLASS",this.dataClass]);c[e++]=["##ORIGIN",this.origin];c[e++]=["##OWNER",this.owner];for(var g=0;g<this.headerTable.size();g++)c[e++]=this.getRow(g);return c},"~B,~N");c(c$,"getRow",
function(a){a=this.headerTable.get(a);return[a[0],JU.PT.rep(a[1],"<","&lt;")]},"~N");C(c$,"typeNames","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(";"))});n("JSV.source");w(["J.api.JmolJDXMOLReader"],"JSV.source.JDXReader","java.io.BufferedReader $.StringReader java.lang.Double $.Float java.util.Hashtable $.StringTokenizer JU.Lst $.PT $.SB JSV.api.JSVZipReader JSV.common.Coordinate $.JSVFileManager $.JSViewer $.PeakInfo $.Spectrum JSV.exception.JSVException JSV.source.JDXDecompressor $.JDXSource $.JDXSourceStreamTokenizer JU.Logger".split(" "),
function(){c$=t(function(){this.nmrMaxY=NaN;this.errorLog=this.t=this.source=null;this.isZipFile=this.done=this.obscure=!1;this.filePath=null;this.loadImaginary=!0;this.isTabularData=this.isSimulation=!1;this.blockID=this.nSpec=this.lastSpec=this.firstSpec=0;this.peakData=this.acdMolFile=this.acdAssignments=this.modelSpectrum=this.reader=this.mpr=null;s(this,arguments)},JSV.source,"JDXReader",null,J.api.JmolJDXMOLReader);c$.getVarList=c(c$,"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");u(c$,function(a,b,c,e,g,f){a=JU.PT.trimQuotes(a);if(this.isSimulation=null!=a&&a.startsWith("http://SIMULATION/"))this.nmrMaxY=Float.isNaN(f)?1E4:f;this.filePath=a;this.obscure=b;this.firstSpec=e;this.lastSpec=g;this.loadImaginary=c},"~S,~B,~B,~N,~N,~N");c$.createJDXSourceFromStream=c(c$,"createJDXSourceFromStream",function(a,b,c,e){return JSV.source.JDXReader.createJDXSource(JSV.common.JSVFileManager.getBufferedReaderForInputStream(a),
"stream",b,c,-1,-1,e)},"java.io.InputStream,~B,~B,~N");c$.createJDXSource=c(c$,"createJDXSource",function(a,b,c,e,g,f,h){var k=null;try{null==a&&(a=JSV.common.JSVFileManager.getBufferedReaderFromName(b,"##TITLE"));a.mark(400);var l=$(400,"\x00");a.read(l,0,400);a.reset();var k=String.instantialize(l),m=k.indexOf("#"),n=k.indexOf("<");if(0>m||0<=n&&n<m){var p=k.toLowerCase(),p=p.contains("<animl")||p.contains("<!doctype technique")?"AnIML":p.contains("xml-cml")?"CML":null;c=null;null!=p&&(c=JSV.common.JSViewer.getInterface("JSV.source."+
p+"Reader").getSource(b,a));a.close();if(null==c)throw JU.Logger.error(k+"..."),new JSV.exception.JSVException("File type not recognized");return c}return(new JSV.source.JDXReader(b,c,e,g,f,h)).getJDXSource(a)}catch(q){if(y(q,Exception))throw null!=a&&a.close(),null!=k&&JU.Logger.error(k+"..."),a=q.getMessage(),new JSV.exception.JSVException("Error reading data: "+a);throw q;}},"java.io.BufferedReader,~S,~B,~B,~N,~N,~N");c(c$,"getJDXSource",function(a){this.source=new JSV.source.JDXSource(0,this.filePath);
this.isZipFile=p(a,JSV.api.JSVZipReader);this.t=new JSV.source.JDXSourceStreamTokenizer(a);this.errorLog=new JU.SB;for(var b=a=null,c=!1;!this.done&&"##TITLE".equals(this.t.peakLabel());){c=!0;null!=a&&!this.isZipFile&&this.errorLog.append("Warning - file is a concatenation without LINK record -- does not conform to IUPAC standards!\n");for(var e=new JSV.common.Spectrum,g=new JU.Lst;!this.done&&null!=(a=this.t.getLabel())&&null!=(b=this.getValue(a));)if(this.isTabularData){this.setTabularDataType(e,
a);if(!this.processTabularData(e,g))throw new JSV.exception.JSVException("Unable to read JDX file");this.addSpectrum(e,!1);e=null}else a.equals("##DATATYPE")&&b.toUpperCase().equals("LINK")?(this.getBlockSpectra(g),e=null):a.equals("##NTUPLES")||a.equals("##VARNAME")?(this.getNTupleSpectra(g,e,a),e=null):(null==e&&(e=new JSV.common.Spectrum),this.readDataLabel(e,a,b,this.errorLog,this.obscure)||(JSV.source.JDXReader.addHeader(g,this.t.rawLabel,b),this.checkCustomTags(e,a,b)))}if(!c)throw new JSV.exception.JSVException("##TITLE record not found");
this.source.setErrorLog(this.errorLog.toString());return this.source},"~O");c(c$,"getValue",function(a){var b=this.isTabularDataLabel(a)?"":this.t.getValue();return"##END".equals(a)?null:b},"~S");c(c$,"isTabularDataLabel",function(a){return this.isTabularData=0<="##DATATABLE##PEAKTABLE##XYDATA##XYPOINTS#".indexOf(a+"#")},"~S");c(c$,"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(y(c,Exception))JU.Logger.info("Failed to create peak data: "+c);else throw c;}null!=this.acdMolFile&&JSV.common.JSVFileManager.htCorrelationCache.put("mol",this.acdMolFile)}Float.isNaN(this.nmrMaxY)?
1E4<=a.getMaxY()&&a.doNormalize(1E3):a.doNormalize(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(c$,"getBlockSpectra",function(a){JU.Logger.debug("--JDX block start--");for(var b="",c=null,e=0==this.source.type,g=!1;null!=(b=this.t.getLabel())&&!b.equals("##TITLE");)c=
this.getValue(b),e&&!JSV.source.JDXReader.readHeaderLabel(this.source,b,c,this.errorLog,this.obscure)&&JSV.source.JDXReader.addHeader(a,this.t.rawLabel,c),b.equals("##BLOCKS")&&100<JU.PT.parseInt(c)&&0>=this.firstSpec&&(g=!0);c=this.getValue(b);if(!"##TITLE".equals(b))throw new JSV.exception.JSVException("Unable to read block source");e&&this.source.setHeaderTable(a);this.source.type=1;this.source.isCompoundSource=!0;e=new JSV.common.Spectrum;a=new JU.Lst;this.readDataLabel(e,b,c,this.errorLog,this.obscure);
try{for(var f;null!=(f=this.t.getLabel());){if(null==(c=this.getValue(f))&&"##END".equals(b)){JU.Logger.debug("##END= "+this.t.getValue());break}b=f;if(this.isTabularData){if(this.setTabularDataType(e,b),!this.processTabularData(e,a))throw new JSV.exception.JSVException("Unable to read Block Source");}else{if(b.equals("##DATATYPE")&&c.toUpperCase().equals("LINK"))this.getBlockSpectra(a),b=e=null;else if(b.equals("##NTUPLES")||b.equals("##VARNAME"))this.getNTupleSpectra(a,e,b),e=null,b="";if(this.done)break;
if(null==e){e=new JSV.common.Spectrum;a=new JU.Lst;if(""===b)continue;if(null==b){b="##END";continue}}if(null==c){if(0<e.getXYCoords().length&&!this.addSpectrum(e,g))return this.source;e=new JSV.common.Spectrum;a=new JU.Lst}else this.readDataLabel(e,b,c,this.errorLog,this.obscure)||(JSV.source.JDXReader.addHeader(a,this.t.rawLabel,c),this.checkCustomTags(e,b,c))}}}catch(h){if(y(h,Exception))throw new JSV.exception.JSVException(h.getMessage());throw h;}this.addErrorLogSeparator();this.source.setErrorLog(this.errorLog.toString());
JU.Logger.debug("--JDX block end--");return this.source},"JU.Lst");c(c$,"addErrorLogSeparator",function(){0<this.errorLog.length()&&this.errorLog.lastIndexOf("=====================\n")!=this.errorLog.length()-22&&this.errorLog.append("=====================\n")});c(c$,"getNTupleSpectra",function(a,b,c){var e=[1.7976931348623157E308,4.9E-324];this.blockID=Math.random();0<this.firstSpec&&(b.numDim=1);var g=c.equals("##VARNAME");g||(c="");var f=new java.util.Hashtable,h=Array(2);0==this.source.type&&
(this.source.type=2,this.source.isCompoundSource=!0,this.source.setHeaderTable(a));for(;!(c=g?c:this.t.getLabel()).equals("##PAGE");){for(var g=!1,k=new java.util.StringTokenizer(this.t.getValue(),","),l=new JU.Lst;k.hasMoreTokens();)l.addLast(k.nextToken().trim());f.put(c,l)}g=f.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(Double.parseDouble(k.substring(n+1).trim()));var p=k.substring(0,n).trim(),q=g.indexOf(p);0<=q&&l.setY2DUnits(f.get("##UNITS").get(q))}catch(s){if(!y(s,Exception))throw s;}}n=new JU.Lst;for(l.setHeaderTable(n);!c.equals("##DATATABLE");)JSV.source.JDXReader.addHeader(n,this.t.rawLabel,this.t.getValue()),c=this.t.getLabel();
c=!0;q=this.t.flushLine();0<q.trim().indexOf("PEAKS")&&(c=!1);var t=q.indexOf("("),u=q.lastIndexOf(")");if(-1==t||-1==u)throw new JSV.exception.JSVException("Variable List not Found");t=q.substring(t,u+1);for(q=u=0;q<g.size();q++){var v=g.get(q).trim();-1!=t.indexOf(v)&&(h[u++]=v);if(2==u)break}this.setTabularDataType(l,"##"+(c?"XYDATA":"PEAKTABLE"));if(!this.readNTUPLECoords(l,f,h,e))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;for(q=0;q<a.size();q++)c=a.get(q),t=JSV.source.JDXSourceStreamTokenizer.cleanLabel(c[0]),!t.equals("##TITLE")&&(!t.equals("##DATACLASS")&&!t.equals("##NTUPLES"))&&n.addLast(c);this.addSpectrum(l,!m);m=!1;l=null}}this.addErrorLogSeparator();this.source.setErrorLog(this.errorLog.toString());JU.Logger.info("NTUPLE MIN/MAX Y = "+e[0]+" "+e[1]);return this.source},"JU.Lst,JSV.source.JDXDataObject,~S");c(c$,"readDataLabel",
function(a,b,c,e,g){if(JSV.source.JDXReader.readHeaderLabel(a,b,c,e,g))return!0;b+=" ";if(0<="##MINX ##MINY ##MAXX ##MAXY ##FIRSTY ##DELTAX ##DATACLASS ".indexOf(b))return!0;switch("##FIRSTX  ##LASTX   ##NPOINTS ##XFACTOR ##YFACTOR ##XUNITS  ##YUNITS  ##XLABEL  ##YLABEL  ##NUMDIM  ##OFFSET  ".indexOf(b)){case 0:return a.fileFirstX=Double.parseDouble(c),!0;case 10:return a.fileLastX=Double.parseDouble(c),!0;case 20:return a.nPointsFile=Integer.parseInt(c),!0;case 30:return a.xFactor=Double.parseDouble(c),
!0;case 40:return a.yFactor=Double.parseDouble(c),!0;case 50:return a.setXUnits(c),!0;case 60:return a.setYUnits(c),!0;case 70:a.setXLabel(c);break;case 80:a.setYLabel(c);break;case 90:return a.numDim=Integer.parseInt(c),!0;case 100:0!=a.shiftRefType&&(1.7976931348623157E308==a.offset&&(a.offset=Double.parseDouble(c)),a.dataPointNum=1,a.shiftRefType=1);break;default:if(17>b.length)break;if(b.equals("##.OBSERVEFREQUENCY "))return a.observedFreq=Double.parseDouble(c),!0;if(b.equals("##.OBSERVENUCLEUS "))return a.setObservedNucleus(c),
!0;if(b.equals("##$REFERENCEPOINT ")&&0!=a.shiftRefType){a.offset=Double.parseDouble(c);a.dataPointNum=1;a.shiftRefType=2;break}if(b.equals("##.SHIFTREFERENCE ")){if(!a.dataType.toUpperCase().contains("SPECTRUM"))return!0;b=new java.util.StringTokenizer(c,",");if(4!=b.countTokens())return!0;try{b.nextToken(),b.nextToken(),a.dataPointNum=Integer.parseInt(b.nextToken().trim()),a.offset=Double.parseDouble(b.nextToken().trim())}catch(f){if(y(f,Exception))return!0;throw f;}0>=a.dataPointNum&&(a.dataPointNum=
1);a.shiftRefType=0;return!0}}return!1},"JSV.source.JDXDataObject,~S,~S,JU.SB,~B");c$.readHeaderLabel=c(c$,"readHeaderLabel",function(a,b,c,e,g){switch("##TITLE#####JCAMPDX###ORIGIN####OWNER#####DATATYPE##LONGDATE##DATE######TIME####".indexOf(b+"#")){case 0:return a.setTitle(g||null==c||c.equals("")?"Unknown":c),!0;case 10:return a.jcampdx=c,a=JU.PT.parseFloat(c),(6<=a||Float.isNaN(a))&&null!=e&&e.append("Warning: JCAMP-DX version may not be fully supported: "+c+"\n"),!0;case 20:return a.origin=null!=
c&&!c.equals("")?c:"Unknown",!0;case 30:return a.owner=null!=c&&!c.equals("")?c:"Unknown",!0;case 40:return a.dataType=c,!0;case 50:return a.longDate=c,!0;case 60:return a.date=c,!0;case 70:return a.time=c,!0}return!1},"JSV.source.JDXHeader,~S,~S,JU.SB,~B");c(c$,"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(c$,"processTabularData",function(a,b){a.setHeaderTable(b);if(a.dataClass.equals("XYDATA"))return a.checkRequiredTokens(),this.decompressData(a,null),!0;if(a.dataClass.equals("PEAKTABLE")||a.dataClass.equals("XYPOINTS")){a.setContinuous(a.dataClass.equals("XYPOINTS"));try{this.t.readLineTrimmed()}catch(c){if(!y(c,java.io.IOException))throw c;}var e;e=1.7976931348623157E308!=a.xFactor&&1.7976931348623157E308!=a.yFactor?JSV.common.Coordinate.parseDSV(this.t.getValue(),
a.xFactor,a.yFactor):JSV.common.Coordinate.parseDSV(this.t.getValue(),1,1);a.setXYCoords(e);e=JSV.common.Coordinate.deltaX(e[e.length-1].getXVal(),e[0].getXVal(),e.length);a.setIncreasing(0<e);return!0}return!1},"JSV.source.JDXDataObject,JU.Lst");c(c$,"readNTUPLECoords",function(a,b,c,e){var g;if(a.dataClass.equals("XYDATA")){g=b.get("##SYMBOL");var f=g.indexOf(c[0]);c=g.indexOf(c[1]);g=b.get("##VARNAME");a.varName=g.get(c).toUpperCase();g=b.get("##FACTOR");a.xFactor=Double.parseDouble(g.get(f));
a.yFactor=Double.parseDouble(g.get(c));g=b.get("##LAST");a.fileLastX=Double.parseDouble(g.get(f));g=b.get("##FIRST");a.fileFirstX=Double.parseDouble(g.get(f));g=b.get("##VARDIM");a.nPointsFile=Integer.parseInt(g.get(f));g=b.get("##UNITS");a.setXUnits(g.get(f));a.setYUnits(g.get(c));null==a.nucleusX&&null!=(g=b.get("##.NUCLEUS"))?(a.setNucleusAndFreq(g.get(0),!1),a.setNucleusAndFreq(g.get(f),!0)):null==a.nucleusX&&(a.nucleusX="?");this.decompressData(a,e);return!0}return a.dataClass.equals("PEAKTABLE")||
a.dataClass.equals("XYPOINTS")?(a.setContinuous(a.dataClass.equals("XYPOINTS")),g=b.get("##SYMBOL"),f=g.indexOf(c[0]),c=g.indexOf(c[1]),g=b.get("##UNITS"),a.setXUnits(g.get(f)),a.setYUnits(g.get(c)),a.setXYCoords(JSV.common.Coordinate.parseDSV(this.t.getValue(),a.xFactor,a.yFactor)),!0):!1},"JSV.source.JDXDataObject,java.util.Map,~A,~A");c(c$,"decompressData",function(a,b){var c=this.errorLog.length(),e=JSV.common.Coordinate.deltaX(a.fileLastX,a.fileFirstX,a.nPointsFile);a.setIncreasing(0<e);a.setContinuous(!0);
var g=new JSV.source.JDXDecompressor(this.t,a.fileFirstX,a.xFactor,a.yFactor,e,a.nPointsFile),f=X(2,0),h=System.currentTimeMillis(),k=g.decompressData(this.errorLog,f);JU.Logger.debugging&&JU.Logger.debug("decompression time = "+(System.currentTimeMillis()-h)+" ms");a.setXYCoords(k);h=g.getMinY();null!=b&&(h<b[0]&&(b[0]=h),h=g.getMaxY(),h>b[1]&&(b[1]=h));g=Double.isNaN(a.freq2dX)?a.observedFreq:a.freq2dX;1.7976931348623157E308!=a.offset&&(1.7976931348623157E308!=g&&a.dataType.toUpperCase().contains("SPECTRUM"))&&
JSV.common.Coordinate.applyShiftReference(k,a.dataPointNum,a.fileFirstX,a.fileLastX,a.offset,g,a.shiftRefType);1.7976931348623157E308!=g&&a.getXUnits().toUpperCase().equals("HZ")&&(JSV.common.Coordinate.applyScale(k,1/g,1),a.setXUnits("PPM"),a.setHZtoPPM(!0));this.errorLog.length()!=c&&(this.errorLog.append(a.getTitle()).append("\n"),this.errorLog.append("firstX: "+a.fileFirstX+" Found "+f[0]+"\n"),this.errorLog.append("lastX from Header "+a.fileLastX+" Found "+f[1]+"\n"),this.errorLog.append("deltaX from Header "+
e+"\n"),this.errorLog.append("Number of points in Header "+a.nPointsFile+" Found "+k.length+"\n"));JU.Logger.debugging&&System.err.println(this.errorLog.toString())},"JSV.source.JDXDataObject,~A");c$.addHeader=c(c$,"addHeader",function(a,b,c){for(var e,g=0;g<a.size();g++)if((e=a.get(g))[0].equals(b)){e[1]=c;return}a.addLast([b,c,JSV.source.JDXSourceStreamTokenizer.cleanLabel(b)])},"JU.Lst,~S,~S");c(c$,"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:this.acdAssignments=
this.mpr.readACDAssignments(a.nPointsFile,40==b);break}}catch(e){if(y(e,Exception))throw new JSV.exception.JSVException(e.getMessage());throw e;}finally{this.reader=null}return!0},"JSV.common.Spectrum,~S,~S");c(c$,"getMpr",function(){return null==this.mpr?this.mpr=JSV.common.JSViewer.getInterface("J.jsv.JDXMOLParser"):this.mpr});h(c$,"rd",function(){return this.reader.readLine()});h(c$,"setSpectrumPeaks",function(a,b,c){this.modelSpectrum.setPeakList(this.peakData,b,c);this.modelSpectrum.isNMR()&&
this.modelSpectrum.setNHydrogens(a)},"~N,~S,~S");h(c$,"addPeakData",function(a){null==this.peakData&&(this.peakData=new JU.Lst);this.peakData.addLast(new JSV.common.PeakInfo(a))},"~S");h(c$,"processModelData",function(){},"~S,~S,~S,~S,~S,~N,~N,~B");h(c$,"discardLinesUntilContains",function(a){for(var b;null!=(b=this.rd())&&0>b.indexOf(a););return b},"~S");h(c$,"discardLinesUntilContains2",function(a,b){for(var c;null!=(c=this.rd())&&0>c.indexOf(a)&&0>c.indexOf(b););return c},"~S,~S");h(c$,"discardLinesUntilNonBlank",
function(){for(var a;null!=(a=this.rd())&&0==a.trim().length;);return a});C(c$,"VAR_LIST_TABLE",["PEAKTABLE   XYDATA      XYPOINTS"," (XY..XY)    (X++(Y..Y)) (XY..XY)    "],"ERROR_SEPARATOR","=====================\n")});n("JSV.source");w(["JSV.source.JDXHeader"],"JSV.source.JDXSource",["JU.Lst"],function(){c$=t(function(){this.type=0;this.isCompoundSource=!1;this.jdxSpectra=null;this.errors="";this.filePath=null;this.peakCount=0;this.isView=!1;s(this,arguments)},JSV.source,"JDXSource",JSV.source.JDXHeader);
c(c$,"dispose",function(){this.jdxSpectra=this.headerTable=null});u(c$,function(a,b){E(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(c$,"getJDXSpectrum",function(a){return this.jdxSpectra.size()<=a?null:this.jdxSpectra.get(a)},"~N");c(c$,"addJDXSpectrum",function(a,b,c){null==a&&(a=this.filePath);b.setFilePath(a);a=this.jdxSpectra.size();(0==a||!this.jdxSpectra.get(a-1).addSubSpectrum(b,c))&&
this.jdxSpectra.addLast(b)},"~S,JSV.common.Spectrum,~B");c(c$,"getNumberOfSpectra",function(){return this.jdxSpectra.size()});c(c$,"getSpectra",function(){return this.jdxSpectra});c(c$,"getSpectraAsArray",function(){return null==this.jdxSpectra?null:this.jdxSpectra.toArray()});c(c$,"getErrorLog",function(){return this.errors});c(c$,"setErrorLog",function(a){this.errors=a},"~S");c(c$,"setFilePath",function(a){this.filePath=a},"~S");c(c$,"getFilePath",function(){return this.filePath});c$.createView=
c(c$,"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(c$,"getHeaderRowDataAsArray",function(a,b){null==b&&(b=P(0,0,null));for(var c=this.getHeaderRowDataAsArray(a,b.length),e=b.length;0<=--e;)c[c.length-b.length+e]=b[e];return c},"~B,~A");c(c$,"setID",function(a){this.jdxSpectra.get(0).sourceID=a},"~S");C(c$,"TYPE_VIEW",-2,"TYPE_UNKNOWN",-1,"TYPE_SIMPLE",0,"TYPE_BLOCK",
1,"TYPE_NTUPLE",2)});n("JSV.source");w(null,"JSV.source.JDXSourceStreamTokenizer",["java.lang.Character","JU.SB","JU.Logger"],function(){c$=t(function(){this.value=this.rawLabel=this.br=null;this.labelLineNo=0;this.line=null;this.lineNo=0;s(this,arguments)},JSV.source,"JDXSourceStreamTokenizer");u(c$,function(a){this.br=a},"java.io.BufferedReader");c(c$,"peakLabel",function(){return this.nextLabel(!1)});c(c$,"getLabel",function(){return this.nextLabel(!0)});c(c$,"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(y(b,java.io.IOException))return this.line="",null;throw b;}if(this.line.startsWith("##"))break;this.line=null}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");c$.cleanLabel=c(c$,"cleanLabel",function(a){if(null==a)return null;var b,c=new JU.SB;for(b=0;b<a.length;b++)switch(a.charAt(b)){case "/":case "\\":case " ":case "-":case "_":break;default:c.appendC(a.charAt(b))}return c.toString().toUpperCase()},"~S");c(c$,"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(y(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(c$,"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(c$,"flushLine",function(){var a=(new JU.SB).append(this.line);this.line=null;return JSV.source.JDXSourceStreamTokenizer.trimLines(a)});c(c$,"readLine",function(){this.line=this.br.readLine();this.lineNo++;return this.line});c$.trimLines=c(c$,"trimLines",function(a){var b=a.length(),c=b-1,e=JSV.source.JDXSourceStreamTokenizer.ptNonWhite(a,0,b);if(e>=b)return"";
for(var g=$(b-e,"\x00"),f=0;e<b;e++){var h;switch(h=a.charAt(e)){case "\r":if(e<c&&"\n"==a.charAt(e+1))continue;h="\n";break;case "\n":0<f&&"\n"!=g[f-1]&&(f-=e-JSV.source.JDXSourceStreamTokenizer.ptNonSpaceRev(a,e)-1);e=JSV.source.JDXSourceStreamTokenizer.ptNonSpace(a,++e,b)-1;break;case "$":if(e<c&&"$"==a.charAt(e+1)){for(e++;++e<b&&0>"\n\r".indexOf(a.charAt(e)););continue}}"\n"==h&&0<f&&"\n"==g[f-1]||(g[f++]=h)}0<f&&"\n"==g[f-1]&&--f;return String.instantialize(g).substring(0,f).trim()},"JU.SB");
c$.ptNonWhite=c(c$,"ptNonWhite",function(a,b,c){for(;b<c&&Character.isWhitespace(a.charAt(b));)b++;return b},"JU.SB,~N,~N");c$.ptNonSpace=c(c$,"ptNonSpace",function(a,b,c){for(;b<c&&(" "==a.charAt(b)||"\t"==a.charAt(b));)b++;return b},"JU.SB,~N,~N");c$.ptNonSpaceRev=c(c$,"ptNonSpaceRev",function(a,b){for(;0<=--b&&(" "==a.charAt(b)||"\t"==a.charAt(b)););return b},"JU.SB,~N")});n("JSV.tree");w(["JSV.api.JSVTree"],"JSV.tree.SimpleTree",["JSV.common.JSVFileManager","$.PanelNode","JSV.tree.SimpleTreeModel",
"$.SimpleTreeNode","$.SimpleTreePath"],function(){c$=t(function(){this.selectedPath=this.vwr=this.spectraTreeModel=this.rootNode=this.si=null;s(this,arguments)},JSV.tree,"SimpleTree",null,JSV.api.JSVTree);h(c$,"getRootNode",function(){return this.rootNode});u(c$,function(a){this.vwr=a;this.rootNode=new JSV.tree.SimpleTreeNode("Spectra",null);this.spectraTreeModel=new JSV.tree.SimpleTreeModel(this.rootNode)},"JSV.common.JSViewer");c(c$,"valueChanged",function(){this.vwr.selectedTreeNode(this.getLastSelectedPathComponent())});
c(c$,"getLastSelectedPathComponent",function(){return null==this.selectedPath?null:this.selectedPath.getLastPathComponent()});h(c$,"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(c$,"setSelectionPath",function(a){this.selectedPath=a;this.valueChanged()},"JSV.api.JSVTreePath");h(c$,"createTree",function(a,b,c){var e=this.vwr.spectraTree,
g=e.getRootNode(),f=this.vwr.panelNodes,h=JSV.common.JSVFileManager.getTagName(b.getFilePath()),k=new JSV.common.PanelNode(null,h,b,null),l=new JSV.tree.SimpleTreeNode(h,k);k.setTreeNode(l);e.spectraTreeModel.insertNodeInto(l,g,g.getChildCount());for(g=0;g<c.length;g++){var k=new JSV.common.PanelNode(a+"."+(g+1),h,b,c[g]),m=new JSV.tree.SimpleTreeNode(k.toString(),k);k.setTreeNode(m);f.addLast(k);e.spectraTreeModel.insertNodeInto(m,l,l.getChildCount())}this.vwr.selectFrameNode(c[0]);return l},"~N,JSV.source.JDXSource,~A");
h(c$,"setPath",function(a){this.setSelectionPath(a)},"JSV.api.JSVTreePath");c(c$,"newTreePath",function(a){return new JSV.tree.SimpleTreePath(a)},"~A");h(c$,"deleteNodes",function(a){for(var b=0;b<a.size();b++)this.spectraTreeModel.removeNodeFromParent(a.get(b))},"JU.Lst")});n("JSV.tree");w(["java.util.Enumeration"],"JSV.tree.SimpleTreeEnumeration",null,function(){c$=t(function(){this.node=null;this.pt=0;s(this,arguments)},JSV.tree,"SimpleTreeEnumeration",null,java.util.Enumeration);u(c$,function(a){this.node=
a},"JSV.tree.SimpleTreeNode");h(c$,"hasMoreElements",function(){return this.pt<this.node.$children.size()});h(c$,"nextElement",function(){return this.node.$children.get(this.pt++)})});n("JSV.tree");c$=t(function(){this.rootNode=null;s(this,arguments)},JSV.tree,"SimpleTreeModel");u(c$,function(a){this.rootNode=a},"JSV.api.JSVTreeNode");c(c$,"insertNodeInto",function(a,b,c){b.$children.add(c,a);a.prevNode=b},"JSV.api.JSVTreeNode,JSV.api.JSVTreeNode,~N");c(c$,"removeNodeFromParent",function(a){a.prevNode.$children.removeObj(a)},
"JSV.api.JSVTreeNode");n("JSV.tree");w(["JSV.api.JSVTreeNode"],"JSV.tree.SimpleTreeNode",["JU.Lst","JSV.tree.SimpleTreeEnumeration"],function(){c$=t(function(){this.panelNode=null;this.index=0;this.text=this.$children=this.prevNode=null;s(this,arguments)},JSV.tree,"SimpleTreeNode",null,JSV.api.JSVTreeNode);u(c$,function(a,b){this.text=a;this.panelNode=b;this.$children=new JU.Lst},"~S,JSV.common.PanelNode");h(c$,"getPanelNode",function(){return this.panelNode});h(c$,"getIndex",function(){return this.index});
h(c$,"setIndex",function(a){this.index=a},"~N");h(c$,"children",function(){return new JSV.tree.SimpleTreeEnumeration(this)});h(c$,"getChildCount",function(){return this.$children.size()});h(c$,"getPath",function(){var a=new JU.Lst,b=this;for(a.addLast(b);null!=(b=b.prevNode);)a.add(0,b);return a.toArray()});h(c$,"isLeaf",function(){return null!=this.prevNode&&null!=this.prevNode.prevNode});h(c$,"toString",function(){return this.text})});n("JSV.tree");w(["JSV.api.JSVTreePath"],"JSV.tree.SimpleTreePath",
null,function(){c$=t(function(){this.path=null;s(this,arguments)},JSV.tree,"SimpleTreePath",null,JSV.api.JSVTreePath);u(c$,function(a){this.path=a},"~A");h(c$,"getLastPathComponent",function(){return null==this.path||0==this.path.length?null:this.path[this.path.length-1]})})}})();Z._coreLoaded=!0})(Clazz,Clazz.newLongArray,Clazz.doubleToByte,Clazz.doubleToInt,Clazz.doubleToLong,Clazz.declarePackage,Clazz.instanceOf,Clazz.load,Clazz.instantialize,Clazz.decorateAsClass,Clazz.floatToInt,Clazz.makeConstructor,
Clazz.defineEnumConstant,Clazz.exceptionOf,Clazz.newIntArray,Clazz.defineStatics,Clazz.newFloatArray,Clazz.declareType,Clazz.prepareFields,Clazz.superConstructor,Clazz.newByteArray,Clazz.declareInterface,Clazz.p0p,Clazz.pu$h,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.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);